mapshaper 0.5.116 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/www/modules.js CHANGED
@@ -266,6 +266,48 @@ function DBCSCodec(codecOptions, iconv) {
266
266
  for (var i = 0; i < mappingTable.length; i++)
267
267
  this._addDecodeChunk(mappingTable[i]);
268
268
 
269
+ // Load & create GB18030 tables when needed.
270
+ if (typeof codecOptions.gb18030 === 'function') {
271
+ this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges.
272
+
273
+ // Add GB18030 common decode nodes.
274
+ var commonThirdByteNodeIdx = this.decodeTables.length;
275
+ this.decodeTables.push(UNASSIGNED_NODE.slice(0));
276
+
277
+ var commonFourthByteNodeIdx = this.decodeTables.length;
278
+ this.decodeTables.push(UNASSIGNED_NODE.slice(0));
279
+
280
+ // Fill out the tree
281
+ var firstByteNode = this.decodeTables[0];
282
+ for (var i = 0x81; i <= 0xFE; i++) {
283
+ var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]];
284
+ for (var j = 0x30; j <= 0x39; j++) {
285
+ if (secondByteNode[j] === UNASSIGNED) {
286
+ secondByteNode[j] = NODE_START - commonThirdByteNodeIdx;
287
+ } else if (secondByteNode[j] > NODE_START) {
288
+ throw new Error("gb18030 decode tables conflict at byte 2");
289
+ }
290
+
291
+ var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]];
292
+ for (var k = 0x81; k <= 0xFE; k++) {
293
+ if (thirdByteNode[k] === UNASSIGNED) {
294
+ thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx;
295
+ } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) {
296
+ continue;
297
+ } else if (thirdByteNode[k] > NODE_START) {
298
+ throw new Error("gb18030 decode tables conflict at byte 3");
299
+ }
300
+
301
+ var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]];
302
+ for (var l = 0x30; l <= 0x39; l++) {
303
+ if (fourthByteNode[l] === UNASSIGNED)
304
+ fourthByteNode[l] = GB18030_CODE;
305
+ }
306
+ }
307
+ }
308
+ }
309
+ }
310
+
269
311
  this.defaultCharUnicode = iconv.defaultCharUnicode;
270
312
 
271
313
 
@@ -309,30 +351,6 @@ function DBCSCodec(codecOptions, iconv) {
309
351
  this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];
310
352
  if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];
311
353
  if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0);
312
-
313
-
314
- // Load & create GB18030 tables when needed.
315
- if (typeof codecOptions.gb18030 === 'function') {
316
- this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges.
317
-
318
- // Add GB18030 decode tables.
319
- var thirdByteNodeIdx = this.decodeTables.length;
320
- var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0);
321
-
322
- var fourthByteNodeIdx = this.decodeTables.length;
323
- var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0);
324
-
325
- for (var i = 0x81; i <= 0xFE; i++) {
326
- var secondByteNodeIdx = NODE_START - this.decodeTables[0][i];
327
- var secondByteNode = this.decodeTables[secondByteNodeIdx];
328
- for (var j = 0x30; j <= 0x39; j++)
329
- secondByteNode[j] = NODE_START - thirdByteNodeIdx;
330
- }
331
- for (var i = 0x81; i <= 0xFE; i++)
332
- thirdByteNode[i] = NODE_START - fourthByteNodeIdx;
333
- for (var i = 0x30; i <= 0x39; i++)
334
- fourthByteNode[i] = GB18030_CODE
335
- }
336
354
  }
337
355
 
338
356
  DBCSCodec.prototype.encoder = DBCSEncoder;
@@ -341,7 +359,7 @@ DBCSCodec.prototype.decoder = DBCSDecoder;
341
359
  // Decoder helpers
342
360
  DBCSCodec.prototype._getDecodeTrieNode = function(addr) {
343
361
  var bytes = [];
344
- for (; addr > 0; addr >>= 8)
362
+ for (; addr > 0; addr >>>= 8)
345
363
  bytes.push(addr & 0xFF);
346
364
  if (bytes.length == 0)
347
365
  bytes.push(0);
@@ -466,19 +484,32 @@ DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {
466
484
 
467
485
  DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) {
468
486
  var node = this.decodeTables[nodeIdx];
487
+ var hasValues = false;
488
+ var subNodeEmpty = {};
469
489
  for (var i = 0; i < 0x100; i++) {
470
490
  var uCode = node[i];
471
491
  var mbCode = prefix + i;
472
492
  if (skipEncodeChars[mbCode])
473
493
  continue;
474
494
 
475
- if (uCode >= 0)
495
+ if (uCode >= 0) {
476
496
  this._setEncodeChar(uCode, mbCode);
477
- else if (uCode <= NODE_START)
478
- this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars);
479
- else if (uCode <= SEQ_START)
497
+ hasValues = true;
498
+ } else if (uCode <= NODE_START) {
499
+ var subNodeIdx = NODE_START - uCode;
500
+ if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030).
501
+ var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive.
502
+ if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars))
503
+ hasValues = true;
504
+ else
505
+ subNodeEmpty[subNodeIdx] = true;
506
+ }
507
+ } else if (uCode <= SEQ_START) {
480
508
  this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);
509
+ hasValues = true;
510
+ }
481
511
  }
512
+ return hasValues;
482
513
  }
483
514
 
484
515
 
@@ -605,10 +636,15 @@ DBCSEncoder.prototype.write = function(str) {
605
636
  newBuf[j++] = dbcsCode >> 8; // high byte
606
637
  newBuf[j++] = dbcsCode & 0xFF; // low byte
607
638
  }
608
- else {
639
+ else if (dbcsCode < 0x1000000) {
609
640
  newBuf[j++] = dbcsCode >> 16;
610
641
  newBuf[j++] = (dbcsCode >> 8) & 0xFF;
611
642
  newBuf[j++] = dbcsCode & 0xFF;
643
+ } else {
644
+ newBuf[j++] = dbcsCode >>> 24;
645
+ newBuf[j++] = (dbcsCode >>> 16) & 0xFF;
646
+ newBuf[j++] = (dbcsCode >>> 8) & 0xFF;
647
+ newBuf[j++] = dbcsCode & 0xFF;
612
648
  }
613
649
  }
614
650
 
@@ -657,7 +693,7 @@ DBCSEncoder.prototype.findIdx = findIdx;
657
693
  function DBCSDecoder(options, codec) {
658
694
  // Decoder state
659
695
  this.nodeIdx = 0;
660
- this.prevBuf = Buffer.alloc(0);
696
+ this.prevBytes = [];
661
697
 
662
698
  // Static data
663
699
  this.decodeTables = codec.decodeTables;
@@ -669,15 +705,12 @@ function DBCSDecoder(options, codec) {
669
705
  DBCSDecoder.prototype.write = function(buf) {
670
706
  var newBuf = Buffer.alloc(buf.length*2),
671
707
  nodeIdx = this.nodeIdx,
672
- prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length,
673
- seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence.
708
+ prevBytes = this.prevBytes, prevOffset = this.prevBytes.length,
709
+ seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence.
674
710
  uCode;
675
711
 
676
- if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later.
677
- prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]);
678
-
679
712
  for (var i = 0, j = 0; i < buf.length; i++) {
680
- var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset];
713
+ var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset];
681
714
 
682
715
  // Lookup in current trie node.
683
716
  var uCode = this.decodeTables[nodeIdx][curByte];
@@ -687,13 +720,18 @@ DBCSDecoder.prototype.write = function(buf) {
687
720
  }
688
721
  else if (uCode === UNASSIGNED) { // Unknown char.
689
722
  // TODO: Callback with seq.
690
- //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);
691
- i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle).
692
723
  uCode = this.defaultCharUnicode.charCodeAt(0);
724
+ i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again.
693
725
  }
694
726
  else if (uCode === GB18030_CODE) {
695
- var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset);
696
- var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30);
727
+ if (i >= 3) {
728
+ var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30);
729
+ } else {
730
+ var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 +
731
+ (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 +
732
+ (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 +
733
+ (curByte-0x30);
734
+ }
697
735
  var idx = findIdx(this.gb18030.gbChars, ptr);
698
736
  uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];
699
737
  }
@@ -714,13 +752,13 @@ DBCSDecoder.prototype.write = function(buf) {
714
752
  throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte);
715
753
 
716
754
  // Write the character to buffer, handling higher planes using surrogate pair.
717
- if (uCode > 0xFFFF) {
755
+ if (uCode >= 0x10000) {
718
756
  uCode -= 0x10000;
719
- var uCodeLead = 0xD800 + Math.floor(uCode / 0x400);
757
+ var uCodeLead = 0xD800 | (uCode >> 10);
720
758
  newBuf[j++] = uCodeLead & 0xFF;
721
759
  newBuf[j++] = uCodeLead >> 8;
722
760
 
723
- uCode = 0xDC00 + uCode % 0x400;
761
+ uCode = 0xDC00 | (uCode & 0x3FF);
724
762
  }
725
763
  newBuf[j++] = uCode & 0xFF;
726
764
  newBuf[j++] = uCode >> 8;
@@ -730,7 +768,10 @@ DBCSDecoder.prototype.write = function(buf) {
730
768
  }
731
769
 
732
770
  this.nodeIdx = nodeIdx;
733
- this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset);
771
+ this.prevBytes = (seqStart >= 0)
772
+ ? Array.prototype.slice.call(buf, seqStart)
773
+ : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf));
774
+
734
775
  return newBuf.slice(0, j).toString('ucs2');
735
776
  }
736
777
 
@@ -738,18 +779,19 @@ DBCSDecoder.prototype.end = function() {
738
779
  var ret = '';
739
780
 
740
781
  // Try to parse all remaining chars.
741
- while (this.prevBuf.length > 0) {
782
+ while (this.prevBytes.length > 0) {
742
783
  // Skip 1 character in the buffer.
743
784
  ret += this.defaultCharUnicode;
744
- var buf = this.prevBuf.slice(1);
785
+ var bytesArr = this.prevBytes.slice(1);
745
786
 
746
787
  // Parse remaining as usual.
747
- this.prevBuf = Buffer.alloc(0);
788
+ this.prevBytes = [];
748
789
  this.nodeIdx = 0;
749
- if (buf.length > 0)
750
- ret += this.write(buf);
790
+ if (bytesArr.length > 0)
791
+ ret += this.write(bytesArr);
751
792
  }
752
793
 
794
+ this.prevBytes = [];
753
795
  this.nodeIdx = 0;
754
796
  return ret;
755
797
  }
@@ -761,7 +803,7 @@ function findIdx(table, val) {
761
803
 
762
804
  var l = 0, r = table.length;
763
805
  while (l < r-1) { // always table[l] <= val < table[r]
764
- var mid = l + Math.floor((r-l+1)/2);
806
+ var mid = l + ((r-l+1) >> 1);
765
807
  if (table[mid] <= val)
766
808
  l = mid;
767
809
  else
@@ -771,7 +813,7 @@ function findIdx(table, val) {
771
813
  }
772
814
 
773
815
 
774
- },{"safer-buffer":37}],5:[function(require,module,exports){
816
+ },{"safer-buffer":39}],5:[function(require,module,exports){
775
817
  "use strict";
776
818
 
777
819
  // Description of supported double byte encodings and aliases.
@@ -941,7 +983,19 @@ module.exports = {
941
983
  'big5hkscs': {
942
984
  type: '_dbcs',
943
985
  table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) },
944
- encodeSkipVals: [0xa2cc],
986
+ encodeSkipVals: [
987
+ // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of
988
+ // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU.
989
+ // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter.
990
+ 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe,
991
+ 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca,
992
+ 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62,
993
+ 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef,
994
+ 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed,
995
+
996
+ // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345
997
+ 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce,
998
+ ],
945
999
  },
946
1000
 
947
1001
  'cnbig5': 'big5hkscs',
@@ -956,6 +1010,7 @@ module.exports = {
956
1010
  // We support Browserify by skipping automatic module discovery and requiring modules directly.
957
1011
  var modules = [
958
1012
  require("./internal"),
1013
+ require("./utf32"),
959
1014
  require("./utf16"),
960
1015
  require("./utf7"),
961
1016
  require("./sbcs-codec"),
@@ -965,7 +1020,7 @@ var modules = [
965
1020
  require("./dbcs-data"),
966
1021
  ];
967
1022
 
968
- // Put all encoding/alias/codec definitions to single object and export it.
1023
+ // Put all encoding/alias/codec definitions to single object and export it.
969
1024
  for (var i = 0; i < modules.length; i++) {
970
1025
  var module = modules[i];
971
1026
  for (var enc in module)
@@ -973,7 +1028,7 @@ for (var i = 0; i < modules.length; i++) {
973
1028
  exports[enc] = module[enc];
974
1029
  }
975
1030
 
976
- },{"./dbcs-codec":4,"./dbcs-data":5,"./internal":7,"./sbcs-codec":8,"./sbcs-data":10,"./sbcs-data-generated":9,"./utf16":19,"./utf7":20}],7:[function(require,module,exports){
1031
+ },{"./dbcs-codec":4,"./dbcs-data":5,"./internal":7,"./sbcs-codec":8,"./sbcs-data":10,"./sbcs-data-generated":9,"./utf16":19,"./utf32":20,"./utf7":21}],7:[function(require,module,exports){
977
1032
  "use strict";
978
1033
  var Buffer = require("safer-buffer").Buffer;
979
1034
 
@@ -1029,10 +1084,20 @@ if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.
1029
1084
 
1030
1085
 
1031
1086
  function InternalDecoder(options, codec) {
1032
- StringDecoder.call(this, codec.enc);
1087
+ this.decoder = new StringDecoder(codec.enc);
1033
1088
  }
1034
1089
 
1035
- InternalDecoder.prototype = StringDecoder.prototype;
1090
+ InternalDecoder.prototype.write = function(buf) {
1091
+ if (!Buffer.isBuffer(buf)) {
1092
+ buf = Buffer.from(buf);
1093
+ }
1094
+
1095
+ return this.decoder.write(buf);
1096
+ }
1097
+
1098
+ InternalDecoder.prototype.end = function() {
1099
+ return this.decoder.end();
1100
+ }
1036
1101
 
1037
1102
 
1038
1103
  //------------------------------------------------------------------------------
@@ -1163,7 +1228,7 @@ InternalDecoderCesu8.prototype.end = function() {
1163
1228
  return res;
1164
1229
  }
1165
1230
 
1166
- },{"safer-buffer":37,"string_decoder":38}],8:[function(require,module,exports){
1231
+ },{"safer-buffer":39,"string_decoder":40}],8:[function(require,module,exports){
1167
1232
  "use strict";
1168
1233
  var Buffer = require("safer-buffer").Buffer;
1169
1234
 
@@ -1237,7 +1302,7 @@ SBCSDecoder.prototype.write = function(buf) {
1237
1302
  SBCSDecoder.prototype.end = function() {
1238
1303
  }
1239
1304
 
1240
- },{"safer-buffer":37}],9:[function(require,module,exports){
1305
+ },{"safer-buffer":39}],9:[function(require,module,exports){
1241
1306
  "use strict";
1242
1307
 
1243
1308
  // Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.
@@ -1714,6 +1779,11 @@ module.exports = {
1714
1779
  "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
1715
1780
  },
1716
1781
 
1782
+ "cp720": {
1783
+ "type": "_sbcs",
1784
+ "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0"
1785
+ },
1786
+
1717
1787
  // Aliases of generated encodings.
1718
1788
  "ascii8bit": "ascii",
1719
1789
  "usascii": "ascii",
@@ -2925,7 +2995,7 @@ module.exports=[
2925
2995
  ["a7c2","",14],
2926
2996
  ["a7f2","",12],
2927
2997
  ["a896","",10],
2928
- ["a8bc",""],
2998
+ ["a8bc","ḿ"],
2929
2999
  ["a8bf","ǹ"],
2930
3000
  ["a8c1",""],
2931
3001
  ["a8ea","",20],
@@ -2949,7 +3019,8 @@ module.exports=[
2949
3019
  ["fca1","",93],
2950
3020
  ["fda1","",93],
2951
3021
  ["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"],
2952
- ["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93]
3022
+ ["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93],
3023
+ ["8135f437",""]
2953
3024
  ]
2954
3025
 
2955
3026
  },{}],18:[function(require,module,exports){
@@ -3143,6 +3214,7 @@ Utf16BEDecoder.prototype.write = function(buf) {
3143
3214
  }
3144
3215
 
3145
3216
  Utf16BEDecoder.prototype.end = function() {
3217
+ this.overflowByte = -1;
3146
3218
  }
3147
3219
 
3148
3220
 
@@ -3185,8 +3257,8 @@ Utf16Encoder.prototype.end = function() {
3185
3257
 
3186
3258
  function Utf16Decoder(options, codec) {
3187
3259
  this.decoder = null;
3188
- this.initialBytes = [];
3189
- this.initialBytesLen = 0;
3260
+ this.initialBufs = [];
3261
+ this.initialBufsLen = 0;
3190
3262
 
3191
3263
  this.options = options || {};
3192
3264
  this.iconv = codec.iconv;
@@ -3195,17 +3267,22 @@ function Utf16Decoder(options, codec) {
3195
3267
  Utf16Decoder.prototype.write = function(buf) {
3196
3268
  if (!this.decoder) {
3197
3269
  // Codec is not chosen yet. Accumulate initial bytes.
3198
- this.initialBytes.push(buf);
3199
- this.initialBytesLen += buf.length;
3270
+ this.initialBufs.push(buf);
3271
+ this.initialBufsLen += buf.length;
3200
3272
 
3201
- if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below)
3273
+ if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below)
3202
3274
  return '';
3203
3275
 
3204
3276
  // We have enough bytes -> detect endianness.
3205
- var buf = Buffer.concat(this.initialBytes),
3206
- encoding = detectEncoding(buf, this.options.defaultEncoding);
3277
+ var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
3207
3278
  this.decoder = this.iconv.getDecoder(encoding, this.options);
3208
- this.initialBytes.length = this.initialBytesLen = 0;
3279
+
3280
+ var resStr = '';
3281
+ for (var i = 0; i < this.initialBufs.length; i++)
3282
+ resStr += this.decoder.write(this.initialBufs[i]);
3283
+
3284
+ this.initialBufs.length = this.initialBufsLen = 0;
3285
+ return resStr;
3209
3286
  }
3210
3287
 
3211
3288
  return this.decoder.write(buf);
@@ -3213,52 +3290,387 @@ Utf16Decoder.prototype.write = function(buf) {
3213
3290
 
3214
3291
  Utf16Decoder.prototype.end = function() {
3215
3292
  if (!this.decoder) {
3216
- var buf = Buffer.concat(this.initialBytes),
3217
- encoding = detectEncoding(buf, this.options.defaultEncoding);
3293
+ var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
3218
3294
  this.decoder = this.iconv.getDecoder(encoding, this.options);
3219
3295
 
3220
- var res = this.decoder.write(buf),
3221
- trail = this.decoder.end();
3296
+ var resStr = '';
3297
+ for (var i = 0; i < this.initialBufs.length; i++)
3298
+ resStr += this.decoder.write(this.initialBufs[i]);
3299
+
3300
+ var trail = this.decoder.end();
3301
+ if (trail)
3302
+ resStr += trail;
3222
3303
 
3223
- return trail ? (res + trail) : res;
3304
+ this.initialBufs.length = this.initialBufsLen = 0;
3305
+ return resStr;
3224
3306
  }
3225
3307
  return this.decoder.end();
3226
3308
  }
3227
3309
 
3228
- function detectEncoding(buf, defaultEncoding) {
3229
- var enc = defaultEncoding || 'utf-16le';
3310
+ function detectEncoding(bufs, defaultEncoding) {
3311
+ var b = [];
3312
+ var charsProcessed = 0;
3313
+ var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE.
3314
+
3315
+ outer_loop:
3316
+ for (var i = 0; i < bufs.length; i++) {
3317
+ var buf = bufs[i];
3318
+ for (var j = 0; j < buf.length; j++) {
3319
+ b.push(buf[j]);
3320
+ if (b.length === 2) {
3321
+ if (charsProcessed === 0) {
3322
+ // Check BOM first.
3323
+ if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le';
3324
+ if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be';
3325
+ }
3326
+
3327
+ if (b[0] === 0 && b[1] !== 0) asciiCharsBE++;
3328
+ if (b[0] !== 0 && b[1] === 0) asciiCharsLE++;
3329
+
3330
+ b.length = 0;
3331
+ charsProcessed++;
3230
3332
 
3231
- if (buf.length >= 2) {
3232
- // Check BOM.
3233
- if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM
3234
- enc = 'utf-16be';
3235
- else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM
3236
- enc = 'utf-16le';
3333
+ if (charsProcessed >= 100) {
3334
+ break outer_loop;
3335
+ }
3336
+ }
3337
+ }
3338
+ }
3339
+
3340
+ // Make decisions.
3341
+ // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon.
3342
+ // So, we count ASCII as if it was LE or BE, and decide from that.
3343
+ if (asciiCharsBE > asciiCharsLE) return 'utf-16be';
3344
+ if (asciiCharsBE < asciiCharsLE) return 'utf-16le';
3345
+
3346
+ // Couldn't decide (likely all zeros or not enough data).
3347
+ return defaultEncoding || 'utf-16le';
3348
+ }
3349
+
3350
+
3351
+
3352
+ },{"safer-buffer":39}],20:[function(require,module,exports){
3353
+ 'use strict';
3354
+
3355
+ var Buffer = require('safer-buffer').Buffer;
3356
+
3357
+ // == UTF32-LE/BE codec. ==========================================================
3358
+
3359
+ exports._utf32 = Utf32Codec;
3360
+
3361
+ function Utf32Codec(codecOptions, iconv) {
3362
+ this.iconv = iconv;
3363
+ this.bomAware = true;
3364
+ this.isLE = codecOptions.isLE;
3365
+ }
3366
+
3367
+ exports.utf32le = { type: '_utf32', isLE: true };
3368
+ exports.utf32be = { type: '_utf32', isLE: false };
3369
+
3370
+ // Aliases
3371
+ exports.ucs4le = 'utf32le';
3372
+ exports.ucs4be = 'utf32be';
3373
+
3374
+ Utf32Codec.prototype.encoder = Utf32Encoder;
3375
+ Utf32Codec.prototype.decoder = Utf32Decoder;
3376
+
3377
+ // -- Encoding
3378
+
3379
+ function Utf32Encoder(options, codec) {
3380
+ this.isLE = codec.isLE;
3381
+ this.highSurrogate = 0;
3382
+ }
3383
+
3384
+ Utf32Encoder.prototype.write = function(str) {
3385
+ var src = Buffer.from(str, 'ucs2');
3386
+ var dst = Buffer.alloc(src.length * 2);
3387
+ var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE;
3388
+ var offset = 0;
3389
+
3390
+ for (var i = 0; i < src.length; i += 2) {
3391
+ var code = src.readUInt16LE(i);
3392
+ var isHighSurrogate = (0xD800 <= code && code < 0xDC00);
3393
+ var isLowSurrogate = (0xDC00 <= code && code < 0xE000);
3394
+
3395
+ if (this.highSurrogate) {
3396
+ if (isHighSurrogate || !isLowSurrogate) {
3397
+ // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low
3398
+ // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character
3399
+ // (technically wrong, but expected by some applications, like Windows file names).
3400
+ write32.call(dst, this.highSurrogate, offset);
3401
+ offset += 4;
3402
+ }
3403
+ else {
3404
+ // Create 32-bit value from high and low surrogates;
3405
+ var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000;
3406
+
3407
+ write32.call(dst, codepoint, offset);
3408
+ offset += 4;
3409
+ this.highSurrogate = 0;
3410
+
3411
+ continue;
3412
+ }
3413
+ }
3414
+
3415
+ if (isHighSurrogate)
3416
+ this.highSurrogate = code;
3237
3417
  else {
3238
- // No BOM found. Try to deduce encoding from initial content.
3239
- // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon.
3240
- // So, we count ASCII as if it was LE or BE, and decide from that.
3241
- var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions
3242
- _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even.
3243
-
3244
- for (var i = 0; i < _len; i += 2) {
3245
- if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++;
3246
- if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++;
3418
+ // Even if the current character is a low surrogate, with no previous high surrogate, we'll
3419
+ // encode it as a semi-invalid stand-alone character for the same reasons expressed above for
3420
+ // unpaired high surrogates.
3421
+ write32.call(dst, code, offset);
3422
+ offset += 4;
3423
+ this.highSurrogate = 0;
3424
+ }
3425
+ }
3426
+
3427
+ if (offset < dst.length)
3428
+ dst = dst.slice(0, offset);
3429
+
3430
+ return dst;
3431
+ };
3432
+
3433
+ Utf32Encoder.prototype.end = function() {
3434
+ // Treat any leftover high surrogate as a semi-valid independent character.
3435
+ if (!this.highSurrogate)
3436
+ return;
3437
+
3438
+ var buf = Buffer.alloc(4);
3439
+
3440
+ if (this.isLE)
3441
+ buf.writeUInt32LE(this.highSurrogate, 0);
3442
+ else
3443
+ buf.writeUInt32BE(this.highSurrogate, 0);
3444
+
3445
+ this.highSurrogate = 0;
3446
+
3447
+ return buf;
3448
+ };
3449
+
3450
+ // -- Decoding
3451
+
3452
+ function Utf32Decoder(options, codec) {
3453
+ this.isLE = codec.isLE;
3454
+ this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0);
3455
+ this.overflow = [];
3456
+ }
3457
+
3458
+ Utf32Decoder.prototype.write = function(src) {
3459
+ if (src.length === 0)
3460
+ return '';
3461
+
3462
+ var i = 0;
3463
+ var codepoint = 0;
3464
+ var dst = Buffer.alloc(src.length + 4);
3465
+ var offset = 0;
3466
+ var isLE = this.isLE;
3467
+ var overflow = this.overflow;
3468
+ var badChar = this.badChar;
3469
+
3470
+ if (overflow.length > 0) {
3471
+ for (; i < src.length && overflow.length < 4; i++)
3472
+ overflow.push(src[i]);
3473
+
3474
+ if (overflow.length === 4) {
3475
+ // NOTE: codepoint is a signed int32 and can be negative.
3476
+ // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer).
3477
+ if (isLE) {
3478
+ codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24);
3479
+ } else {
3480
+ codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24);
3247
3481
  }
3482
+ overflow.length = 0;
3483
+
3484
+ offset = _writeCodepoint(dst, offset, codepoint, badChar);
3485
+ }
3486
+ }
3248
3487
 
3249
- if (asciiCharsBE > asciiCharsLE)
3250
- enc = 'utf-16be';
3251
- else if (asciiCharsBE < asciiCharsLE)
3252
- enc = 'utf-16le';
3488
+ // Main loop. Should be as optimized as possible.
3489
+ for (; i < src.length - 3; i += 4) {
3490
+ // NOTE: codepoint is a signed int32 and can be negative.
3491
+ if (isLE) {
3492
+ codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24);
3493
+ } else {
3494
+ codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24);
3253
3495
  }
3496
+ offset = _writeCodepoint(dst, offset, codepoint, badChar);
3497
+ }
3498
+
3499
+ // Keep overflowing bytes.
3500
+ for (; i < src.length; i++) {
3501
+ overflow.push(src[i]);
3254
3502
  }
3255
3503
 
3256
- return enc;
3504
+ return dst.slice(0, offset).toString('ucs2');
3505
+ };
3506
+
3507
+ function _writeCodepoint(dst, offset, codepoint, badChar) {
3508
+ // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations.
3509
+ if (codepoint < 0 || codepoint > 0x10FFFF) {
3510
+ // Not a valid Unicode codepoint
3511
+ codepoint = badChar;
3512
+ }
3513
+
3514
+ // Ephemeral Planes: Write high surrogate.
3515
+ if (codepoint >= 0x10000) {
3516
+ codepoint -= 0x10000;
3517
+
3518
+ var high = 0xD800 | (codepoint >> 10);
3519
+ dst[offset++] = high & 0xff;
3520
+ dst[offset++] = high >> 8;
3521
+
3522
+ // Low surrogate is written below.
3523
+ var codepoint = 0xDC00 | (codepoint & 0x3FF);
3524
+ }
3525
+
3526
+ // Write BMP char or low surrogate.
3527
+ dst[offset++] = codepoint & 0xff;
3528
+ dst[offset++] = codepoint >> 8;
3529
+
3530
+ return offset;
3531
+ };
3532
+
3533
+ Utf32Decoder.prototype.end = function() {
3534
+ this.overflow.length = 0;
3535
+ };
3536
+
3537
+ // == UTF-32 Auto codec =============================================================
3538
+ // Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic.
3539
+ // Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32
3540
+ // Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'});
3541
+
3542
+ // Encoder prepends BOM (which can be overridden with (addBOM: false}).
3543
+
3544
+ exports.utf32 = Utf32AutoCodec;
3545
+ exports.ucs4 = 'utf32';
3546
+
3547
+ function Utf32AutoCodec(options, iconv) {
3548
+ this.iconv = iconv;
3549
+ }
3550
+
3551
+ Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder;
3552
+ Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder;
3553
+
3554
+ // -- Encoding
3555
+
3556
+ function Utf32AutoEncoder(options, codec) {
3557
+ options = options || {};
3558
+
3559
+ if (options.addBOM === undefined)
3560
+ options.addBOM = true;
3561
+
3562
+ this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options);
3563
+ }
3564
+
3565
+ Utf32AutoEncoder.prototype.write = function(str) {
3566
+ return this.encoder.write(str);
3567
+ };
3568
+
3569
+ Utf32AutoEncoder.prototype.end = function() {
3570
+ return this.encoder.end();
3571
+ };
3572
+
3573
+ // -- Decoding
3574
+
3575
+ function Utf32AutoDecoder(options, codec) {
3576
+ this.decoder = null;
3577
+ this.initialBufs = [];
3578
+ this.initialBufsLen = 0;
3579
+ this.options = options || {};
3580
+ this.iconv = codec.iconv;
3257
3581
  }
3258
3582
 
3583
+ Utf32AutoDecoder.prototype.write = function(buf) {
3584
+ if (!this.decoder) {
3585
+ // Codec is not chosen yet. Accumulate initial bytes.
3586
+ this.initialBufs.push(buf);
3587
+ this.initialBufsLen += buf.length;
3588
+
3589
+ if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below)
3590
+ return '';
3591
+
3592
+ // We have enough bytes -> detect endianness.
3593
+ var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
3594
+ this.decoder = this.iconv.getDecoder(encoding, this.options);
3595
+
3596
+ var resStr = '';
3597
+ for (var i = 0; i < this.initialBufs.length; i++)
3598
+ resStr += this.decoder.write(this.initialBufs[i]);
3599
+
3600
+ this.initialBufs.length = this.initialBufsLen = 0;
3601
+ return resStr;
3602
+ }
3603
+
3604
+ return this.decoder.write(buf);
3605
+ };
3606
+
3607
+ Utf32AutoDecoder.prototype.end = function() {
3608
+ if (!this.decoder) {
3609
+ var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
3610
+ this.decoder = this.iconv.getDecoder(encoding, this.options);
3611
+
3612
+ var resStr = '';
3613
+ for (var i = 0; i < this.initialBufs.length; i++)
3614
+ resStr += this.decoder.write(this.initialBufs[i]);
3615
+
3616
+ var trail = this.decoder.end();
3617
+ if (trail)
3618
+ resStr += trail;
3619
+
3620
+ this.initialBufs.length = this.initialBufsLen = 0;
3621
+ return resStr;
3622
+ }
3623
+
3624
+ return this.decoder.end();
3625
+ };
3626
+
3627
+ function detectEncoding(bufs, defaultEncoding) {
3628
+ var b = [];
3629
+ var charsProcessed = 0;
3630
+ var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE.
3631
+ var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE.
3632
+
3633
+ outer_loop:
3634
+ for (var i = 0; i < bufs.length; i++) {
3635
+ var buf = bufs[i];
3636
+ for (var j = 0; j < buf.length; j++) {
3637
+ b.push(buf[j]);
3638
+ if (b.length === 4) {
3639
+ if (charsProcessed === 0) {
3640
+ // Check BOM first.
3641
+ if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) {
3642
+ return 'utf-32le';
3643
+ }
3644
+ if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) {
3645
+ return 'utf-32be';
3646
+ }
3647
+ }
3648
+
3649
+ if (b[0] !== 0 || b[1] > 0x10) invalidBE++;
3650
+ if (b[3] !== 0 || b[2] > 0x10) invalidLE++;
3651
+
3652
+ if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++;
3653
+ if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++;
3654
+
3655
+ b.length = 0;
3656
+ charsProcessed++;
3259
3657
 
3658
+ if (charsProcessed >= 100) {
3659
+ break outer_loop;
3660
+ }
3661
+ }
3662
+ }
3663
+ }
3260
3664
 
3261
- },{"safer-buffer":37}],20:[function(require,module,exports){
3665
+ // Make decisions.
3666
+ if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be';
3667
+ if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le';
3668
+
3669
+ // Couldn't decide (likely all zeros or not enough data).
3670
+ return defaultEncoding || 'utf-32le';
3671
+ }
3672
+
3673
+ },{"safer-buffer":39}],21:[function(require,module,exports){
3262
3674
  "use strict";
3263
3675
  var Buffer = require("safer-buffer").Buffer;
3264
3676
 
@@ -3335,7 +3747,7 @@ Utf7Decoder.prototype.write = function(buf) {
3335
3747
  if (i == lastI && buf[i] == minusChar) {// "+-" -> "+"
3336
3748
  res += "+";
3337
3749
  } else {
3338
- var b64str = base64Accum + buf.slice(lastI, i).toString();
3750
+ var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii");
3339
3751
  res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
3340
3752
  }
3341
3753
 
@@ -3352,7 +3764,7 @@ Utf7Decoder.prototype.write = function(buf) {
3352
3764
  if (!inBase64) {
3353
3765
  res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
3354
3766
  } else {
3355
- var b64str = base64Accum + buf.slice(lastI).toString();
3767
+ var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii");
3356
3768
 
3357
3769
  var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
3358
3770
  base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
@@ -3506,7 +3918,7 @@ Utf7IMAPDecoder.prototype.write = function(buf) {
3506
3918
  if (i == lastI && buf[i] == minusChar) { // "&-" -> "&"
3507
3919
  res += "&";
3508
3920
  } else {
3509
- var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/');
3921
+ var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/');
3510
3922
  res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
3511
3923
  }
3512
3924
 
@@ -3523,7 +3935,7 @@ Utf7IMAPDecoder.prototype.write = function(buf) {
3523
3935
  if (!inBase64) {
3524
3936
  res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
3525
3937
  } else {
3526
- var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/');
3938
+ var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/');
3527
3939
 
3528
3940
  var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
3529
3941
  base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
@@ -3550,7 +3962,7 @@ Utf7IMAPDecoder.prototype.end = function() {
3550
3962
 
3551
3963
 
3552
3964
 
3553
- },{"safer-buffer":37}],21:[function(require,module,exports){
3965
+ },{"safer-buffer":39}],22:[function(require,module,exports){
3554
3966
  "use strict";
3555
3967
 
3556
3968
  var BOMChar = '\uFEFF';
@@ -3604,7 +4016,118 @@ StripBOMWrapper.prototype.end = function() {
3604
4016
  }
3605
4017
 
3606
4018
 
3607
- },{}],22:[function(require,module,exports){
4019
+ },{}],23:[function(require,module,exports){
4020
+ "use strict";
4021
+
4022
+ var Buffer = require("safer-buffer").Buffer;
4023
+
4024
+ // NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments),
4025
+ // we opt to dependency-inject it instead of creating a hard dependency.
4026
+ module.exports = function(stream_module) {
4027
+ var Transform = stream_module.Transform;
4028
+
4029
+ // == Encoder stream =======================================================
4030
+
4031
+ function IconvLiteEncoderStream(conv, options) {
4032
+ this.conv = conv;
4033
+ options = options || {};
4034
+ options.decodeStrings = false; // We accept only strings, so we don't need to decode them.
4035
+ Transform.call(this, options);
4036
+ }
4037
+
4038
+ IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, {
4039
+ constructor: { value: IconvLiteEncoderStream }
4040
+ });
4041
+
4042
+ IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {
4043
+ if (typeof chunk != 'string')
4044
+ return done(new Error("Iconv encoding stream needs strings as its input."));
4045
+ try {
4046
+ var res = this.conv.write(chunk);
4047
+ if (res && res.length) this.push(res);
4048
+ done();
4049
+ }
4050
+ catch (e) {
4051
+ done(e);
4052
+ }
4053
+ }
4054
+
4055
+ IconvLiteEncoderStream.prototype._flush = function(done) {
4056
+ try {
4057
+ var res = this.conv.end();
4058
+ if (res && res.length) this.push(res);
4059
+ done();
4060
+ }
4061
+ catch (e) {
4062
+ done(e);
4063
+ }
4064
+ }
4065
+
4066
+ IconvLiteEncoderStream.prototype.collect = function(cb) {
4067
+ var chunks = [];
4068
+ this.on('error', cb);
4069
+ this.on('data', function(chunk) { chunks.push(chunk); });
4070
+ this.on('end', function() {
4071
+ cb(null, Buffer.concat(chunks));
4072
+ });
4073
+ return this;
4074
+ }
4075
+
4076
+
4077
+ // == Decoder stream =======================================================
4078
+
4079
+ function IconvLiteDecoderStream(conv, options) {
4080
+ this.conv = conv;
4081
+ options = options || {};
4082
+ options.encoding = this.encoding = 'utf8'; // We output strings.
4083
+ Transform.call(this, options);
4084
+ }
4085
+
4086
+ IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, {
4087
+ constructor: { value: IconvLiteDecoderStream }
4088
+ });
4089
+
4090
+ IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
4091
+ if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array))
4092
+ return done(new Error("Iconv decoding stream needs buffers as its input."));
4093
+ try {
4094
+ var res = this.conv.write(chunk);
4095
+ if (res && res.length) this.push(res, this.encoding);
4096
+ done();
4097
+ }
4098
+ catch (e) {
4099
+ done(e);
4100
+ }
4101
+ }
4102
+
4103
+ IconvLiteDecoderStream.prototype._flush = function(done) {
4104
+ try {
4105
+ var res = this.conv.end();
4106
+ if (res && res.length) this.push(res, this.encoding);
4107
+ done();
4108
+ }
4109
+ catch (e) {
4110
+ done(e);
4111
+ }
4112
+ }
4113
+
4114
+ IconvLiteDecoderStream.prototype.collect = function(cb) {
4115
+ var res = '';
4116
+ this.on('error', cb);
4117
+ this.on('data', function(chunk) { res += chunk; });
4118
+ this.on('end', function() {
4119
+ cb(null, res);
4120
+ });
4121
+ return this;
4122
+ }
4123
+
4124
+ return {
4125
+ IconvLiteEncoderStream: IconvLiteEncoderStream,
4126
+ IconvLiteDecoderStream: IconvLiteDecoderStream,
4127
+ };
4128
+ };
4129
+
4130
+ },{"safer-buffer":39}],24:[function(require,module,exports){
3608
4131
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
3609
4132
  exports.read = function (buffer, offset, isLE, mLen, nBytes) {
3610
4133
  var e, m
@@ -3691,7 +4214,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
3691
4214
  buffer[offset + i - d] |= s * 128
3692
4215
  }
3693
4216
 
3694
- },{}],23:[function(require,module,exports){
4217
+ },{}],25:[function(require,module,exports){
3695
4218
  // shim for using process in browser
3696
4219
  var process = module.exports = {};
3697
4220
 
@@ -3877,7 +4400,7 @@ process.chdir = function (dir) {
3877
4400
  };
3878
4401
  process.umask = function() { return 0; };
3879
4402
 
3880
- },{}],24:[function(require,module,exports){
4403
+ },{}],26:[function(require,module,exports){
3881
4404
  'use strict';
3882
4405
 
3883
4406
  var replace = String.prototype.replace;
@@ -3905,7 +4428,7 @@ module.exports = util.assign(
3905
4428
  Format
3906
4429
  );
3907
4430
 
3908
- },{"./utils":28}],25:[function(require,module,exports){
4431
+ },{"./utils":30}],27:[function(require,module,exports){
3909
4432
  'use strict';
3910
4433
 
3911
4434
  var stringify = require('./stringify');
@@ -3918,7 +4441,7 @@ module.exports = {
3918
4441
  stringify: stringify
3919
4442
  };
3920
4443
 
3921
- },{"./formats":24,"./parse":26,"./stringify":27}],26:[function(require,module,exports){
4444
+ },{"./formats":26,"./parse":28,"./stringify":29}],28:[function(require,module,exports){
3922
4445
  'use strict';
3923
4446
 
3924
4447
  var utils = require('./utils');
@@ -4188,7 +4711,7 @@ module.exports = function (str, opts) {
4188
4711
  return utils.compact(obj);
4189
4712
  };
4190
4713
 
4191
- },{"./utils":28}],27:[function(require,module,exports){
4714
+ },{"./utils":30}],29:[function(require,module,exports){
4192
4715
  'use strict';
4193
4716
 
4194
4717
  var utils = require('./utils');
@@ -4469,7 +4992,7 @@ module.exports = function (object, opts) {
4469
4992
  return joined.length > 0 ? prefix + joined : '';
4470
4993
  };
4471
4994
 
4472
- },{"./formats":24,"./utils":28}],28:[function(require,module,exports){
4995
+ },{"./formats":26,"./utils":30}],30:[function(require,module,exports){
4473
4996
  'use strict';
4474
4997
 
4475
4998
  var has = Object.prototype.hasOwnProperty;
@@ -4707,7 +5230,7 @@ module.exports = {
4707
5230
  merge: merge
4708
5231
  };
4709
5232
 
4710
- },{}],29:[function(require,module,exports){
5233
+ },{}],31:[function(require,module,exports){
4711
5234
  var slice = Array.prototype.slice;
4712
5235
 
4713
5236
  function dashify(method, file) {
@@ -4723,7 +5246,7 @@ exports.readFileSync = dashify(require("./read-file-sync"), "/dev/stdin");
4723
5246
  exports.writeFile = dashify(require("./write-file"), "/dev/stdout");
4724
5247
  exports.writeFileSync = dashify(require("./write-file-sync"), "/dev/stdout");
4725
5248
 
4726
- },{"./read-file":33,"./read-file-sync":32,"./write-file":35,"./write-file-sync":34}],30:[function(require,module,exports){
5249
+ },{"./read-file":35,"./read-file-sync":34,"./write-file":37,"./write-file-sync":36}],32:[function(require,module,exports){
4727
5250
  (function (Buffer){(function (){
4728
5251
  module.exports = function(options) {
4729
5252
  if (options) {
@@ -4750,7 +5273,7 @@ function encoding(encoding) {
4750
5273
  }
4751
5274
 
4752
5275
  }).call(this)}).call(this,require("buffer").Buffer)
4753
- },{"buffer":"buffer"}],31:[function(require,module,exports){
5276
+ },{"buffer":"buffer"}],33:[function(require,module,exports){
4754
5277
  (function (Buffer){(function (){
4755
5278
  module.exports = function(data, options) {
4756
5279
  return typeof data === "string"
@@ -4761,7 +5284,7 @@ module.exports = function(data, options) {
4761
5284
  };
4762
5285
 
4763
5286
  }).call(this)}).call(this,require("buffer").Buffer)
4764
- },{"buffer":"buffer"}],32:[function(require,module,exports){
5287
+ },{"buffer":"buffer"}],34:[function(require,module,exports){
4765
5288
  (function (Buffer){(function (){
4766
5289
  var fs = require("fs"),
4767
5290
  decode = require("./decode");
@@ -4794,7 +5317,7 @@ module.exports = function(filename, options) {
4794
5317
  var bufferSize = 1 << 16;
4795
5318
 
4796
5319
  }).call(this)}).call(this,require("buffer").Buffer)
4797
- },{"./decode":30,"buffer":"buffer","fs":"fs"}],33:[function(require,module,exports){
5320
+ },{"./decode":32,"buffer":"buffer","fs":"fs"}],35:[function(require,module,exports){
4798
5321
  (function (process){(function (){
4799
5322
  var fs = require("fs"),
4800
5323
  decode = require("./decode");
@@ -4821,7 +5344,7 @@ function readStream(stream, options, callback) {
4821
5344
  }
4822
5345
 
4823
5346
  }).call(this)}).call(this,require('_process'))
4824
- },{"./decode":30,"_process":23,"fs":"fs"}],34:[function(require,module,exports){
5347
+ },{"./decode":32,"_process":25,"fs":"fs"}],36:[function(require,module,exports){
4825
5348
  var fs = require("fs"),
4826
5349
  encode = require("./encode");
4827
5350
 
@@ -4855,7 +5378,7 @@ module.exports = function(filename, data, options) {
4855
5378
  }
4856
5379
  };
4857
5380
 
4858
- },{"./encode":31,"fs":"fs"}],35:[function(require,module,exports){
5381
+ },{"./encode":33,"fs":"fs"}],37:[function(require,module,exports){
4859
5382
  (function (process){(function (){
4860
5383
  var fs = require("fs"),
4861
5384
  encode = require("./encode");
@@ -4881,7 +5404,7 @@ function writeStream(stream, send, data, options, callback) {
4881
5404
  }
4882
5405
 
4883
5406
  }).call(this)}).call(this,require('_process'))
4884
- },{"./encode":31,"_process":23,"fs":"fs"}],36:[function(require,module,exports){
5407
+ },{"./encode":33,"_process":25,"fs":"fs"}],38:[function(require,module,exports){
4885
5408
  /* eslint-disable node/no-deprecated-api */
4886
5409
  var buffer = require('buffer')
4887
5410
  var Buffer = buffer.Buffer
@@ -4945,7 +5468,7 @@ SafeBuffer.allocUnsafeSlow = function (size) {
4945
5468
  return buffer.SlowBuffer(size)
4946
5469
  }
4947
5470
 
4948
- },{"buffer":"buffer"}],37:[function(require,module,exports){
5471
+ },{"buffer":"buffer"}],39:[function(require,module,exports){
4949
5472
  (function (process){(function (){
4950
5473
  /* eslint-disable node/no-deprecated-api */
4951
5474
 
@@ -5026,7 +5549,7 @@ if (!safer.constants) {
5026
5549
  module.exports = safer
5027
5550
 
5028
5551
  }).call(this)}).call(this,require('_process'))
5029
- },{"_process":23,"buffer":"buffer"}],38:[function(require,module,exports){
5552
+ },{"_process":25,"buffer":"buffer"}],40:[function(require,module,exports){
5030
5553
  // Copyright Joyent, Inc. and other Node contributors.
5031
5554
  //
5032
5555
  // Permission is hereby granted, free of charge, to any person obtaining a
@@ -5323,7 +5846,7 @@ function simpleWrite(buf) {
5323
5846
  function simpleEnd(buf) {
5324
5847
  return buf && buf.length ? this.write(buf) : '';
5325
5848
  }
5326
- },{"safe-buffer":36}],39:[function(require,module,exports){
5849
+ },{"safe-buffer":38}],41:[function(require,module,exports){
5327
5850
  "use strict";
5328
5851
  exports.__esModule = true;
5329
5852
  var qs_1 = require("qs");
@@ -5343,7 +5866,7 @@ function handleQs(url, query) {
5343
5866
  }
5344
5867
  exports["default"] = handleQs;
5345
5868
 
5346
- },{"qs":25}],"@tmcw/togeojson":[function(require,module,exports){
5869
+ },{"qs":27}],"@tmcw/togeojson":[function(require,module,exports){
5347
5870
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).toGeoJSON={})}(this,(function(e){"use strict";function t(e){return e&&e.normalize&&e.normalize(),e&&e.textContent||""}function n(e,t){const n=e.getElementsByTagName(t);return n.length?n[0]:null}function o(e){const o={};if(e){const s=n(e,"line");if(s){const e=t(n(s,"color")),r=parseFloat(t(n(s,"opacity"))),i=parseFloat(t(n(s,"width")));e&&(o.stroke=e),isNaN(r)||(o["stroke-opacity"]=r),isNaN(i)||(o["stroke-width"]=96*i/25.4)}}return o}function s(e){let n=[];if(null!==e)for(let o=0;o<e.childNodes.length;o++){const r=e.childNodes[o];if(1!==r.nodeType)continue;const i=["heart","gpxtpx:hr","hr"].includes(r.nodeName)?"heart":r.nodeName;if("gpxtpx:TrackPointExtension"===i)n=n.concat(s(r));else{const e=t(r);n.push([i,isNaN(e)?e:parseFloat(e)])}}return n}function r(e,o){const s={};let r,i;for(i=0;i<o.length;i++)r=n(e,o[i]),r&&(s[o[i]]=t(r));return s}function i(e){const n=r(e,["name","cmt","desc","type","time","keywords"]),o=e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*");for(let s=0;s<o.length;s++){const r=o[s];r.parentNode.parentNode===e&&(n[r.tagName.replace(":","_")]=t(r))}const s=e.getElementsByTagName("link");s.length&&(n.links=[]);for(let e=0;e<s.length;e++)n.links.push(Object.assign({href:s[e].getAttribute("href")},r(s[e],["text","type"])));return n}function l(e){const o=[parseFloat(e.getAttribute("lon")),parseFloat(e.getAttribute("lat"))],r=n(e,"ele"),i=n(e,"time");if(r){const e=parseFloat(t(r));isNaN(e)||o.push(e)}return{coordinates:o,time:i?t(i):null,extendedValues:s(n(e,"extensions"))}}function a(e){const t=c(e,"rtept");if(t)return{type:"Feature",properties:Object.assign(i(e),o(n(e,"extensions")),{_gpxType:"rte"}),geometry:{type:"LineString",coordinates:t.line}}}function c(e,t){const n=e.getElementsByTagName(t);if(n.length<2)return;const o=[],s=[],r={};for(let e=0;e<n.length;e++){const t=l(n[e]);o.push(t.coordinates),t.time&&s.push(t.time);for(let o=0;o<t.extendedValues.length;o++){const[s,i]=t.extendedValues[o],l="heart"===s?s:s.replace("gpxtpx:","")+"s";r[l]||(r[l]=Array(n.length).fill(null)),r[l][e]=i}}return{line:o,times:s,extendedValues:r}}function g(e){const t=e.getElementsByTagName("trkseg"),s=[],r=[],l=[];for(let e=0;e<t.length;e++){const n=c(t[e],"trkpt");n&&(l.push(n),n.times&&n.times.length&&r.push(n.times))}if(0===l.length)return;const a=l.length>1,g=Object.assign(i(e),o(n(e,"extensions")),{_gpxType:"trk"},r.length?{coordinateProperties:{times:a?r:r[0]}}:{});for(let e=0;e<l.length;e++){const t=l[e];s.push(t.line);for(const[n,o]of Object.entries(t.extendedValues)){g.coordinateProperties||(g.coordinateProperties={});const t=g.coordinateProperties;a?(t[n]||(t[n]=l.map((e=>new Array(e.line.length).fill(null)))),t[n][e]=o):t[n]=o}}return{type:"Feature",properties:g,geometry:a?{type:"MultiLineString",coordinates:s}:{type:"LineString",coordinates:s[0]}}}function*u(e){const t=e.getElementsByTagName("trk"),n=e.getElementsByTagName("rte"),o=e.getElementsByTagName("wpt");for(let e=0;e<t.length;e++){const n=g(t[e]);n&&(yield n)}for(let e=0;e<n.length;e++){const t=a(n[e]);t&&(yield t)}for(let e=0;e<o.length;e++)yield(s=o[e],{type:"Feature",properties:Object.assign(i(s),r(s,["sym"])),geometry:{type:"Point",coordinates:l(s).coordinates}});var s}const p=[["heartRate","heartRates"],["Cadence","cadences"],["Speed","speeds"],["Watts","watts"]],m=[["TotalTimeSeconds","totalTimeSeconds"],["DistanceMeters","distanceMeters"],["MaximumSpeed","maxSpeed"],["AverageHeartRateBpm","avgHeartRate"],["MaximumHeartRateBpm","maxHeartRate"],["AvgSpeed","avgSpeed"],["AvgWatts","avgWatts"],["MaxWatts","maxWatts"]];function d(e,o){const s=[];for(const[r,i]of o){let o=n(e,r);if(!o){const t=e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/ActivityExtension/v2",r);t.length&&(o=t[0])}const l=parseFloat(t(o));isNaN(l)||s.push([i,l])}return s}function f(e){const o=t(n(e,"LongitudeDegrees")),s=t(n(e,"LatitudeDegrees"));if(!o.length||!s.length)return null;const r=[parseFloat(o),parseFloat(s)],i=n(e,"AltitudeMeters"),l=n(e,"HeartRateBpm"),a=n(e,"Time");let c;return i&&(c=parseFloat(t(i)),isNaN(c)||r.push(c)),{coordinates:r,time:a?t(a):null,heartRate:l?parseFloat(t(l)):null,extensions:d(e,p)}}function h(e,t){const n=e.getElementsByTagName(t),o=[],s=[],r=[];if(n.length<2)return null;const i={extendedProperties:{}};for(let e=0;e<n.length;e++){const t=f(n[e]);if(null!==t){o.push(t.coordinates),t.time&&s.push(t.time),t.heartRate&&r.push(t.heartRate);for(const[o,s]of t.extensions)i.extendedProperties[o]||(i.extendedProperties[o]=Array(n.length).fill(null)),i.extendedProperties[o][e]=s}}return Object.assign(i,{line:o,times:s,heartRates:r})}function y(e){const o=e.getElementsByTagName("Track"),s=[],r=[],i=[],l=[];let a;const c=function(e){const t={};for(const[n,o]of e)t[n]=o;return t}(d(e,m)),g=n(e,"Name");g&&(c.name=t(g));for(let e=0;e<o.length;e++)a=h(o[e],"Trackpoint"),a&&(s.push(a.line),a.times.length&&r.push(a.times),a.heartRates.length&&i.push(a.heartRates),l.push(a.extendedProperties));for(let e=0;e<l.length;e++){const t=l[e];for(const n in t)1===o.length?c[n]=a.extendedProperties[n]:(c[n]||(c[n]=s.map((e=>Array(e.length).fill(null)))),c[n][e]=t[n])}if(0!==s.length)return(r.length||i.length)&&(c.coordinateProperties=Object.assign(r.length?{times:1===s.length?r[0]:r}:{},i.length?{heart:1===s.length?i[0]:i}:{})),{type:"Feature",properties:c,geometry:{type:1===s.length?"LineString":"MultiLineString",coordinates:1===s.length?s[0]:s}}}function*N(e){const t=e.getElementsByTagName("Lap");for(let e=0;e<t.length;e++){const n=y(t[e]);n&&(yield n)}const n=e.getElementsByTagName("Courses");for(let e=0;e<n.length;e++){const t=y(n[e]);t&&(yield t)}}const x=/\s*/g,T=/^\s*|\s*$/g,b=/\s+/;function S(e){if(!e||!e.length)return 0;let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t}function k(e){return e.replace(x,"").split(",").map(parseFloat)}function E(e){return e.replace(T,"").split(b).map(k)}function A(e){if(void 0!==e.xml)return e.xml;if(e.tagName){let t=e.tagName;for(let n=0;n<e.attributes.length;n++)t+=e.attributes[n].name+e.attributes[n].value;for(let n=0;n<e.childNodes.length;n++)t+=A(e.childNodes[n]);return t}return"#text"===e.nodeName?(e.nodeValue||e.value||"").trim():"#cdata-section"===e.nodeName?e.nodeValue:""}const B=["Polygon","LineString","Point","Track","gx:Track"];function P(e,o,s){let r=t(n(o,"color"))||"";const i="stroke"==s||"fill"===s?s:s+"-color";"#"===r.substr(0,1)&&(r=r.substr(1)),6===r.length||3===r.length?e[i]=r:8===r.length&&(e[s+"-opacity"]=parseInt(r.substr(0,2),16)/255,e[i]="#"+r.substr(6,2)+r.substr(4,2)+r.substr(2,2))}function F(e,o,s,r){const i=parseFloat(t(n(o,s)));isNaN(i)||(e[r]=i)}function v(e){let n=e.getElementsByTagName("coord");const o=[],s=[];0===n.length&&(n=e.getElementsByTagName("gx:coord"));for(let e=0;e<n.length;e++)o.push(t(n[e]).split(" ").map(parseFloat));const r=e.getElementsByTagName("when");for(let e=0;e<r.length;e++)s.push(t(r[e]));return{coords:o,times:s}}function L(e){let o,s,r,i,l;const a=[],c=[];if(n(e,"MultiGeometry"))return L(n(e,"MultiGeometry"));if(n(e,"MultiTrack"))return L(n(e,"MultiTrack"));if(n(e,"gx:MultiTrack"))return L(n(e,"gx:MultiTrack"));for(r=0;r<B.length;r++)if(s=e.getElementsByTagName(B[r]),s)for(i=0;i<s.length;i++)if(o=s[i],"Point"===B[r])a.push({type:"Point",coordinates:k(t(n(o,"coordinates")))});else if("LineString"===B[r])a.push({type:"LineString",coordinates:E(t(n(o,"coordinates")))});else if("Polygon"===B[r]){const e=o.getElementsByTagName("LinearRing"),s=[];for(l=0;l<e.length;l++)s.push(E(t(n(e[l],"coordinates"))));a.push({type:"Polygon",coordinates:s})}else if("Track"===B[r]||"gx:Track"===B[r]){const e=v(o);a.push({type:"LineString",coordinates:e.coords}),e.times.length&&c.push(e.times)}return{geoms:a,coordTimes:c}}function M(e,o,s,r){const i=L(e);let l;const a={},c=t(n(e,"name")),g=t(n(e,"address"));let u=t(n(e,"styleUrl"));const p=t(n(e,"description")),m=n(e,"TimeSpan"),d=n(e,"TimeStamp"),f=n(e,"ExtendedData");let h=n(e,"IconStyle"),y=n(e,"LabelStyle"),N=n(e,"LineStyle"),x=n(e,"PolyStyle");const T=n(e,"visibility");if(c&&(a.name=c),g&&(a.address=g),u){"#"!==u[0]&&(u="#"+u),a.styleUrl=u,o[u]&&(a.styleHash=o[u]),s[u]&&(a.styleMapHash=s[u],a.styleHash=o[s[u].normal]);const e=r[a.styleHash];e&&(h||(h=n(e,"IconStyle")),y||(y=n(e,"LabelStyle")),N||(N=n(e,"LineStyle")),x||(x=n(e,"PolyStyle")))}if(p&&(a.description=p),m){const e=t(n(m,"begin")),o=t(n(m,"end"));a.timespan={begin:e,end:o}}if(d&&(a.timestamp=t(n(d,"when"))),h){P(a,h,"icon"),F(a,h,"scale","icon-scale"),F(a,h,"heading","icon-heading");const e=n(h,"hotSpot");if(e){const t=parseFloat(e.getAttribute("x")),n=parseFloat(e.getAttribute("y"));isNaN(t)||isNaN(n)||(a["icon-offset"]=[t,n])}const o=n(h,"Icon");if(o){const e=t(n(o,"href"));e&&(a.icon=e)}}if(y&&(P(a,y,"label"),F(a,y,"scale","label-scale")),N&&(P(a,N,"stroke"),F(a,N,"width","stroke-width")),x){P(a,x,"fill");const e=t(n(x,"fill")),o=t(n(x,"outline"));e&&(a["fill-opacity"]="1"===e?a["fill-opacity"]||1:0),o&&(a["stroke-opacity"]="1"===o?a["stroke-opacity"]||1:0)}if(f){const e=f.getElementsByTagName("Data"),o=f.getElementsByTagName("SimpleData");for(l=0;l<e.length;l++)a[e[l].getAttribute("name")]=t(n(e[l],"value"));for(l=0;l<o.length;l++)a[o[l].getAttribute("name")]=t(o[l])}T&&(a.visibility=t(T)),i.coordTimes.length&&(a.coordinateProperties={times:1===i.coordTimes.length?i.coordTimes[0]:i.coordTimes});const b={type:"Feature",geometry:0===i.geoms.length?null:1===i.geoms.length?i.geoms[0]:{type:"GeometryCollection",geometries:i.geoms},properties:a};return e.getAttribute("id")&&(b.id=e.getAttribute("id")),b}function*w(e){const o={},s={},r={},i=e.getElementsByTagName("Placemark"),l=e.getElementsByTagName("Style"),a=e.getElementsByTagName("StyleMap");for(let e=0;e<l.length;e++){const t=l[e],n=S(A(t)).toString(16);let r=t.getAttribute("id");r||"CascadingStyle"!==t.parentNode.tagName.replace("gx:","")||(r=t.parentNode.getAttribute("kml:id")||t.parentNode.getAttribute("id")),o["#"+r]=n,s[n]=t}for(let e=0;e<a.length;e++){o["#"+a[e].getAttribute("id")]=S(A(a[e])).toString(16);const s=a[e].getElementsByTagName("Pair"),i={};for(let e=0;e<s.length;e++)i[t(n(s[e],"key"))]=t(n(s[e],"styleUrl"));r["#"+a[e].getAttribute("id")]=i}for(let e=0;e<i.length;e++){const t=M(i[e],o,r,s);t&&(yield t)}}e.gpx=function(e){return{type:"FeatureCollection",features:Array.from(u(e))}},e.gpxGen=u,e.kml=function(e){return{type:"FeatureCollection",features:Array.from(w(e))}},e.kmlGen=w,e.tcx=function(e){return{type:"FeatureCollection",features:Array.from(N(e))}},e.tcxGen=N,Object.defineProperty(e,"__esModule",{value:!0})}));
5348
5871
 
5349
5872
 
@@ -7128,1703 +7651,7 @@ function numberIsNaN (obj) {
7128
7651
  }
7129
7652
 
7130
7653
  }).call(this)}).call(this,require("buffer").Buffer)
7131
- },{"base64-js":1,"buffer":"buffer","ieee754":22}],"d3-color":[function(require,module,exports){
7132
- // https://d3js.org/d3-color/ v2.0.0 Copyright 2020 Mike Bostock
7133
- (function (global, factory) {
7134
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
7135
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
7136
- (global = global || self, factory(global.d3 = global.d3 || {}));
7137
- }(this, function (exports) { 'use strict';
7138
-
7139
- function define(constructor, factory, prototype) {
7140
- constructor.prototype = factory.prototype = prototype;
7141
- prototype.constructor = constructor;
7142
- }
7143
-
7144
- function extend(parent, definition) {
7145
- var prototype = Object.create(parent.prototype);
7146
- for (var key in definition) prototype[key] = definition[key];
7147
- return prototype;
7148
- }
7149
-
7150
- function Color() {}
7151
-
7152
- var darker = 0.7;
7153
- var brighter = 1 / darker;
7154
-
7155
- var reI = "\\s*([+-]?\\d+)\\s*",
7156
- reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
7157
- reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
7158
- reHex = /^#([0-9a-f]{3,8})$/,
7159
- reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
7160
- reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
7161
- reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
7162
- reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
7163
- reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
7164
- reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
7165
-
7166
- var named = {
7167
- aliceblue: 0xf0f8ff,
7168
- antiquewhite: 0xfaebd7,
7169
- aqua: 0x00ffff,
7170
- aquamarine: 0x7fffd4,
7171
- azure: 0xf0ffff,
7172
- beige: 0xf5f5dc,
7173
- bisque: 0xffe4c4,
7174
- black: 0x000000,
7175
- blanchedalmond: 0xffebcd,
7176
- blue: 0x0000ff,
7177
- blueviolet: 0x8a2be2,
7178
- brown: 0xa52a2a,
7179
- burlywood: 0xdeb887,
7180
- cadetblue: 0x5f9ea0,
7181
- chartreuse: 0x7fff00,
7182
- chocolate: 0xd2691e,
7183
- coral: 0xff7f50,
7184
- cornflowerblue: 0x6495ed,
7185
- cornsilk: 0xfff8dc,
7186
- crimson: 0xdc143c,
7187
- cyan: 0x00ffff,
7188
- darkblue: 0x00008b,
7189
- darkcyan: 0x008b8b,
7190
- darkgoldenrod: 0xb8860b,
7191
- darkgray: 0xa9a9a9,
7192
- darkgreen: 0x006400,
7193
- darkgrey: 0xa9a9a9,
7194
- darkkhaki: 0xbdb76b,
7195
- darkmagenta: 0x8b008b,
7196
- darkolivegreen: 0x556b2f,
7197
- darkorange: 0xff8c00,
7198
- darkorchid: 0x9932cc,
7199
- darkred: 0x8b0000,
7200
- darksalmon: 0xe9967a,
7201
- darkseagreen: 0x8fbc8f,
7202
- darkslateblue: 0x483d8b,
7203
- darkslategray: 0x2f4f4f,
7204
- darkslategrey: 0x2f4f4f,
7205
- darkturquoise: 0x00ced1,
7206
- darkviolet: 0x9400d3,
7207
- deeppink: 0xff1493,
7208
- deepskyblue: 0x00bfff,
7209
- dimgray: 0x696969,
7210
- dimgrey: 0x696969,
7211
- dodgerblue: 0x1e90ff,
7212
- firebrick: 0xb22222,
7213
- floralwhite: 0xfffaf0,
7214
- forestgreen: 0x228b22,
7215
- fuchsia: 0xff00ff,
7216
- gainsboro: 0xdcdcdc,
7217
- ghostwhite: 0xf8f8ff,
7218
- gold: 0xffd700,
7219
- goldenrod: 0xdaa520,
7220
- gray: 0x808080,
7221
- green: 0x008000,
7222
- greenyellow: 0xadff2f,
7223
- grey: 0x808080,
7224
- honeydew: 0xf0fff0,
7225
- hotpink: 0xff69b4,
7226
- indianred: 0xcd5c5c,
7227
- indigo: 0x4b0082,
7228
- ivory: 0xfffff0,
7229
- khaki: 0xf0e68c,
7230
- lavender: 0xe6e6fa,
7231
- lavenderblush: 0xfff0f5,
7232
- lawngreen: 0x7cfc00,
7233
- lemonchiffon: 0xfffacd,
7234
- lightblue: 0xadd8e6,
7235
- lightcoral: 0xf08080,
7236
- lightcyan: 0xe0ffff,
7237
- lightgoldenrodyellow: 0xfafad2,
7238
- lightgray: 0xd3d3d3,
7239
- lightgreen: 0x90ee90,
7240
- lightgrey: 0xd3d3d3,
7241
- lightpink: 0xffb6c1,
7242
- lightsalmon: 0xffa07a,
7243
- lightseagreen: 0x20b2aa,
7244
- lightskyblue: 0x87cefa,
7245
- lightslategray: 0x778899,
7246
- lightslategrey: 0x778899,
7247
- lightsteelblue: 0xb0c4de,
7248
- lightyellow: 0xffffe0,
7249
- lime: 0x00ff00,
7250
- limegreen: 0x32cd32,
7251
- linen: 0xfaf0e6,
7252
- magenta: 0xff00ff,
7253
- maroon: 0x800000,
7254
- mediumaquamarine: 0x66cdaa,
7255
- mediumblue: 0x0000cd,
7256
- mediumorchid: 0xba55d3,
7257
- mediumpurple: 0x9370db,
7258
- mediumseagreen: 0x3cb371,
7259
- mediumslateblue: 0x7b68ee,
7260
- mediumspringgreen: 0x00fa9a,
7261
- mediumturquoise: 0x48d1cc,
7262
- mediumvioletred: 0xc71585,
7263
- midnightblue: 0x191970,
7264
- mintcream: 0xf5fffa,
7265
- mistyrose: 0xffe4e1,
7266
- moccasin: 0xffe4b5,
7267
- navajowhite: 0xffdead,
7268
- navy: 0x000080,
7269
- oldlace: 0xfdf5e6,
7270
- olive: 0x808000,
7271
- olivedrab: 0x6b8e23,
7272
- orange: 0xffa500,
7273
- orangered: 0xff4500,
7274
- orchid: 0xda70d6,
7275
- palegoldenrod: 0xeee8aa,
7276
- palegreen: 0x98fb98,
7277
- paleturquoise: 0xafeeee,
7278
- palevioletred: 0xdb7093,
7279
- papayawhip: 0xffefd5,
7280
- peachpuff: 0xffdab9,
7281
- peru: 0xcd853f,
7282
- pink: 0xffc0cb,
7283
- plum: 0xdda0dd,
7284
- powderblue: 0xb0e0e6,
7285
- purple: 0x800080,
7286
- rebeccapurple: 0x663399,
7287
- red: 0xff0000,
7288
- rosybrown: 0xbc8f8f,
7289
- royalblue: 0x4169e1,
7290
- saddlebrown: 0x8b4513,
7291
- salmon: 0xfa8072,
7292
- sandybrown: 0xf4a460,
7293
- seagreen: 0x2e8b57,
7294
- seashell: 0xfff5ee,
7295
- sienna: 0xa0522d,
7296
- silver: 0xc0c0c0,
7297
- skyblue: 0x87ceeb,
7298
- slateblue: 0x6a5acd,
7299
- slategray: 0x708090,
7300
- slategrey: 0x708090,
7301
- snow: 0xfffafa,
7302
- springgreen: 0x00ff7f,
7303
- steelblue: 0x4682b4,
7304
- tan: 0xd2b48c,
7305
- teal: 0x008080,
7306
- thistle: 0xd8bfd8,
7307
- tomato: 0xff6347,
7308
- turquoise: 0x40e0d0,
7309
- violet: 0xee82ee,
7310
- wheat: 0xf5deb3,
7311
- white: 0xffffff,
7312
- whitesmoke: 0xf5f5f5,
7313
- yellow: 0xffff00,
7314
- yellowgreen: 0x9acd32
7315
- };
7316
-
7317
- define(Color, color, {
7318
- copy: function(channels) {
7319
- return Object.assign(new this.constructor, this, channels);
7320
- },
7321
- displayable: function() {
7322
- return this.rgb().displayable();
7323
- },
7324
- hex: color_formatHex, // Deprecated! Use color.formatHex.
7325
- formatHex: color_formatHex,
7326
- formatHsl: color_formatHsl,
7327
- formatRgb: color_formatRgb,
7328
- toString: color_formatRgb
7329
- });
7330
-
7331
- function color_formatHex() {
7332
- return this.rgb().formatHex();
7333
- }
7334
-
7335
- function color_formatHsl() {
7336
- return hslConvert(this).formatHsl();
7337
- }
7338
-
7339
- function color_formatRgb() {
7340
- return this.rgb().formatRgb();
7341
- }
7342
-
7343
- function color(format) {
7344
- var m, l;
7345
- format = (format + "").trim().toLowerCase();
7346
- return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
7347
- : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
7348
- : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
7349
- : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
7350
- : null) // invalid hex
7351
- : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
7352
- : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
7353
- : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
7354
- : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
7355
- : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
7356
- : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
7357
- : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
7358
- : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
7359
- : null;
7360
- }
7361
-
7362
- function rgbn(n) {
7363
- return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
7364
- }
7365
-
7366
- function rgba(r, g, b, a) {
7367
- if (a <= 0) r = g = b = NaN;
7368
- return new Rgb(r, g, b, a);
7369
- }
7370
-
7371
- function rgbConvert(o) {
7372
- if (!(o instanceof Color)) o = color(o);
7373
- if (!o) return new Rgb;
7374
- o = o.rgb();
7375
- return new Rgb(o.r, o.g, o.b, o.opacity);
7376
- }
7377
-
7378
- function rgb(r, g, b, opacity) {
7379
- return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
7380
- }
7381
-
7382
- function Rgb(r, g, b, opacity) {
7383
- this.r = +r;
7384
- this.g = +g;
7385
- this.b = +b;
7386
- this.opacity = +opacity;
7387
- }
7388
-
7389
- define(Rgb, rgb, extend(Color, {
7390
- brighter: function(k) {
7391
- k = k == null ? brighter : Math.pow(brighter, k);
7392
- return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
7393
- },
7394
- darker: function(k) {
7395
- k = k == null ? darker : Math.pow(darker, k);
7396
- return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
7397
- },
7398
- rgb: function() {
7399
- return this;
7400
- },
7401
- displayable: function() {
7402
- return (-0.5 <= this.r && this.r < 255.5)
7403
- && (-0.5 <= this.g && this.g < 255.5)
7404
- && (-0.5 <= this.b && this.b < 255.5)
7405
- && (0 <= this.opacity && this.opacity <= 1);
7406
- },
7407
- hex: rgb_formatHex, // Deprecated! Use color.formatHex.
7408
- formatHex: rgb_formatHex,
7409
- formatRgb: rgb_formatRgb,
7410
- toString: rgb_formatRgb
7411
- }));
7412
-
7413
- function rgb_formatHex() {
7414
- return "#" + hex(this.r) + hex(this.g) + hex(this.b);
7415
- }
7416
-
7417
- function rgb_formatRgb() {
7418
- var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
7419
- return (a === 1 ? "rgb(" : "rgba(")
7420
- + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
7421
- + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
7422
- + Math.max(0, Math.min(255, Math.round(this.b) || 0))
7423
- + (a === 1 ? ")" : ", " + a + ")");
7424
- }
7425
-
7426
- function hex(value) {
7427
- value = Math.max(0, Math.min(255, Math.round(value) || 0));
7428
- return (value < 16 ? "0" : "") + value.toString(16);
7429
- }
7430
-
7431
- function hsla(h, s, l, a) {
7432
- if (a <= 0) h = s = l = NaN;
7433
- else if (l <= 0 || l >= 1) h = s = NaN;
7434
- else if (s <= 0) h = NaN;
7435
- return new Hsl(h, s, l, a);
7436
- }
7437
-
7438
- function hslConvert(o) {
7439
- if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
7440
- if (!(o instanceof Color)) o = color(o);
7441
- if (!o) return new Hsl;
7442
- if (o instanceof Hsl) return o;
7443
- o = o.rgb();
7444
- var r = o.r / 255,
7445
- g = o.g / 255,
7446
- b = o.b / 255,
7447
- min = Math.min(r, g, b),
7448
- max = Math.max(r, g, b),
7449
- h = NaN,
7450
- s = max - min,
7451
- l = (max + min) / 2;
7452
- if (s) {
7453
- if (r === max) h = (g - b) / s + (g < b) * 6;
7454
- else if (g === max) h = (b - r) / s + 2;
7455
- else h = (r - g) / s + 4;
7456
- s /= l < 0.5 ? max + min : 2 - max - min;
7457
- h *= 60;
7458
- } else {
7459
- s = l > 0 && l < 1 ? 0 : h;
7460
- }
7461
- return new Hsl(h, s, l, o.opacity);
7462
- }
7463
-
7464
- function hsl(h, s, l, opacity) {
7465
- return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
7466
- }
7467
-
7468
- function Hsl(h, s, l, opacity) {
7469
- this.h = +h;
7470
- this.s = +s;
7471
- this.l = +l;
7472
- this.opacity = +opacity;
7473
- }
7474
-
7475
- define(Hsl, hsl, extend(Color, {
7476
- brighter: function(k) {
7477
- k = k == null ? brighter : Math.pow(brighter, k);
7478
- return new Hsl(this.h, this.s, this.l * k, this.opacity);
7479
- },
7480
- darker: function(k) {
7481
- k = k == null ? darker : Math.pow(darker, k);
7482
- return new Hsl(this.h, this.s, this.l * k, this.opacity);
7483
- },
7484
- rgb: function() {
7485
- var h = this.h % 360 + (this.h < 0) * 360,
7486
- s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
7487
- l = this.l,
7488
- m2 = l + (l < 0.5 ? l : 1 - l) * s,
7489
- m1 = 2 * l - m2;
7490
- return new Rgb(
7491
- hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
7492
- hsl2rgb(h, m1, m2),
7493
- hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
7494
- this.opacity
7495
- );
7496
- },
7497
- displayable: function() {
7498
- return (0 <= this.s && this.s <= 1 || isNaN(this.s))
7499
- && (0 <= this.l && this.l <= 1)
7500
- && (0 <= this.opacity && this.opacity <= 1);
7501
- },
7502
- formatHsl: function() {
7503
- var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
7504
- return (a === 1 ? "hsl(" : "hsla(")
7505
- + (this.h || 0) + ", "
7506
- + (this.s || 0) * 100 + "%, "
7507
- + (this.l || 0) * 100 + "%"
7508
- + (a === 1 ? ")" : ", " + a + ")");
7509
- }
7510
- }));
7511
-
7512
- /* From FvD 13.37, CSS Color Module Level 3 */
7513
- function hsl2rgb(h, m1, m2) {
7514
- return (h < 60 ? m1 + (m2 - m1) * h / 60
7515
- : h < 180 ? m2
7516
- : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
7517
- : m1) * 255;
7518
- }
7519
-
7520
- const radians = Math.PI / 180;
7521
- const degrees = 180 / Math.PI;
7522
-
7523
- // https://observablehq.com/@mbostock/lab-and-rgb
7524
- const K = 18,
7525
- Xn = 0.96422,
7526
- Yn = 1,
7527
- Zn = 0.82521,
7528
- t0 = 4 / 29,
7529
- t1 = 6 / 29,
7530
- t2 = 3 * t1 * t1,
7531
- t3 = t1 * t1 * t1;
7532
-
7533
- function labConvert(o) {
7534
- if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
7535
- if (o instanceof Hcl) return hcl2lab(o);
7536
- if (!(o instanceof Rgb)) o = rgbConvert(o);
7537
- var r = rgb2lrgb(o.r),
7538
- g = rgb2lrgb(o.g),
7539
- b = rgb2lrgb(o.b),
7540
- y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
7541
- if (r === g && g === b) x = z = y; else {
7542
- x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
7543
- z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
7544
- }
7545
- return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
7546
- }
7547
-
7548
- function gray(l, opacity) {
7549
- return new Lab(l, 0, 0, opacity == null ? 1 : opacity);
7550
- }
7551
-
7552
- function lab(l, a, b, opacity) {
7553
- return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
7554
- }
7555
-
7556
- function Lab(l, a, b, opacity) {
7557
- this.l = +l;
7558
- this.a = +a;
7559
- this.b = +b;
7560
- this.opacity = +opacity;
7561
- }
7562
-
7563
- define(Lab, lab, extend(Color, {
7564
- brighter: function(k) {
7565
- return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
7566
- },
7567
- darker: function(k) {
7568
- return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
7569
- },
7570
- rgb: function() {
7571
- var y = (this.l + 16) / 116,
7572
- x = isNaN(this.a) ? y : y + this.a / 500,
7573
- z = isNaN(this.b) ? y : y - this.b / 200;
7574
- x = Xn * lab2xyz(x);
7575
- y = Yn * lab2xyz(y);
7576
- z = Zn * lab2xyz(z);
7577
- return new Rgb(
7578
- lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
7579
- lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
7580
- lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
7581
- this.opacity
7582
- );
7583
- }
7584
- }));
7585
-
7586
- function xyz2lab(t) {
7587
- return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
7588
- }
7589
-
7590
- function lab2xyz(t) {
7591
- return t > t1 ? t * t * t : t2 * (t - t0);
7592
- }
7593
-
7594
- function lrgb2rgb(x) {
7595
- return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
7596
- }
7597
-
7598
- function rgb2lrgb(x) {
7599
- return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
7600
- }
7601
-
7602
- function hclConvert(o) {
7603
- if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
7604
- if (!(o instanceof Lab)) o = labConvert(o);
7605
- if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
7606
- var h = Math.atan2(o.b, o.a) * degrees;
7607
- return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
7608
- }
7609
-
7610
- function lch(l, c, h, opacity) {
7611
- return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
7612
- }
7613
-
7614
- function hcl(h, c, l, opacity) {
7615
- return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
7616
- }
7617
-
7618
- function Hcl(h, c, l, opacity) {
7619
- this.h = +h;
7620
- this.c = +c;
7621
- this.l = +l;
7622
- this.opacity = +opacity;
7623
- }
7624
-
7625
- function hcl2lab(o) {
7626
- if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
7627
- var h = o.h * radians;
7628
- return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
7629
- }
7630
-
7631
- define(Hcl, hcl, extend(Color, {
7632
- brighter: function(k) {
7633
- return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
7634
- },
7635
- darker: function(k) {
7636
- return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
7637
- },
7638
- rgb: function() {
7639
- return hcl2lab(this).rgb();
7640
- }
7641
- }));
7642
-
7643
- var A = -0.14861,
7644
- B = +1.78277,
7645
- C = -0.29227,
7646
- D = -0.90649,
7647
- E = +1.97294,
7648
- ED = E * D,
7649
- EB = E * B,
7650
- BC_DA = B * C - D * A;
7651
-
7652
- function cubehelixConvert(o) {
7653
- if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
7654
- if (!(o instanceof Rgb)) o = rgbConvert(o);
7655
- var r = o.r / 255,
7656
- g = o.g / 255,
7657
- b = o.b / 255,
7658
- l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
7659
- bl = b - l,
7660
- k = (E * (g - l) - C * bl) / D,
7661
- s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
7662
- h = s ? Math.atan2(k, bl) * degrees - 120 : NaN;
7663
- return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
7664
- }
7665
-
7666
- function cubehelix(h, s, l, opacity) {
7667
- return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
7668
- }
7669
-
7670
- function Cubehelix(h, s, l, opacity) {
7671
- this.h = +h;
7672
- this.s = +s;
7673
- this.l = +l;
7674
- this.opacity = +opacity;
7675
- }
7676
-
7677
- define(Cubehelix, cubehelix, extend(Color, {
7678
- brighter: function(k) {
7679
- k = k == null ? brighter : Math.pow(brighter, k);
7680
- return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
7681
- },
7682
- darker: function(k) {
7683
- k = k == null ? darker : Math.pow(darker, k);
7684
- return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
7685
- },
7686
- rgb: function() {
7687
- var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,
7688
- l = +this.l,
7689
- a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
7690
- cosh = Math.cos(h),
7691
- sinh = Math.sin(h);
7692
- return new Rgb(
7693
- 255 * (l + a * (A * cosh + B * sinh)),
7694
- 255 * (l + a * (C * cosh + D * sinh)),
7695
- 255 * (l + a * (E * cosh)),
7696
- this.opacity
7697
- );
7698
- }
7699
- }));
7700
-
7701
- exports.color = color;
7702
- exports.cubehelix = cubehelix;
7703
- exports.gray = gray;
7704
- exports.hcl = hcl;
7705
- exports.hsl = hsl;
7706
- exports.lab = lab;
7707
- exports.lch = lch;
7708
- exports.rgb = rgb;
7709
-
7710
- Object.defineProperty(exports, '__esModule', { value: true });
7711
-
7712
- }));
7713
-
7714
- },{}],"d3-interpolate":[function(require,module,exports){
7715
- // https://d3js.org/d3-interpolate/ v2.0.1 Copyright 2020 Mike Bostock
7716
- (function (global, factory) {
7717
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-color')) :
7718
- typeof define === 'function' && define.amd ? define(['exports', 'd3-color'], factory) :
7719
- (global = global || self, factory(global.d3 = global.d3 || {}, global.d3));
7720
- }(this, function (exports, d3Color) { 'use strict';
7721
-
7722
- function basis(t1, v0, v1, v2, v3) {
7723
- var t2 = t1 * t1, t3 = t2 * t1;
7724
- return ((1 - 3 * t1 + 3 * t2 - t3) * v0
7725
- + (4 - 6 * t2 + 3 * t3) * v1
7726
- + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2
7727
- + t3 * v3) / 6;
7728
- }
7729
-
7730
- function basis$1(values) {
7731
- var n = values.length - 1;
7732
- return function(t) {
7733
- var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),
7734
- v1 = values[i],
7735
- v2 = values[i + 1],
7736
- v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,
7737
- v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
7738
- return basis((t - i / n) * n, v0, v1, v2, v3);
7739
- };
7740
- }
7741
-
7742
- function basisClosed(values) {
7743
- var n = values.length;
7744
- return function(t) {
7745
- var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),
7746
- v0 = values[(i + n - 1) % n],
7747
- v1 = values[i % n],
7748
- v2 = values[(i + 1) % n],
7749
- v3 = values[(i + 2) % n];
7750
- return basis((t - i / n) * n, v0, v1, v2, v3);
7751
- };
7752
- }
7753
-
7754
- var constant = x => () => x;
7755
-
7756
- function linear(a, d) {
7757
- return function(t) {
7758
- return a + t * d;
7759
- };
7760
- }
7761
-
7762
- function exponential(a, b, y) {
7763
- return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {
7764
- return Math.pow(a + t * b, y);
7765
- };
7766
- }
7767
-
7768
- function hue(a, b) {
7769
- var d = b - a;
7770
- return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);
7771
- }
7772
-
7773
- function gamma(y) {
7774
- return (y = +y) === 1 ? nogamma : function(a, b) {
7775
- return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);
7776
- };
7777
- }
7778
-
7779
- function nogamma(a, b) {
7780
- var d = b - a;
7781
- return d ? linear(a, d) : constant(isNaN(a) ? b : a);
7782
- }
7783
-
7784
- var rgb = (function rgbGamma(y) {
7785
- var color = gamma(y);
7786
-
7787
- function rgb(start, end) {
7788
- var r = color((start = d3Color.rgb(start)).r, (end = d3Color.rgb(end)).r),
7789
- g = color(start.g, end.g),
7790
- b = color(start.b, end.b),
7791
- opacity = nogamma(start.opacity, end.opacity);
7792
- return function(t) {
7793
- start.r = r(t);
7794
- start.g = g(t);
7795
- start.b = b(t);
7796
- start.opacity = opacity(t);
7797
- return start + "";
7798
- };
7799
- }
7800
-
7801
- rgb.gamma = rgbGamma;
7802
-
7803
- return rgb;
7804
- })(1);
7805
-
7806
- function rgbSpline(spline) {
7807
- return function(colors) {
7808
- var n = colors.length,
7809
- r = new Array(n),
7810
- g = new Array(n),
7811
- b = new Array(n),
7812
- i, color;
7813
- for (i = 0; i < n; ++i) {
7814
- color = d3Color.rgb(colors[i]);
7815
- r[i] = color.r || 0;
7816
- g[i] = color.g || 0;
7817
- b[i] = color.b || 0;
7818
- }
7819
- r = spline(r);
7820
- g = spline(g);
7821
- b = spline(b);
7822
- color.opacity = 1;
7823
- return function(t) {
7824
- color.r = r(t);
7825
- color.g = g(t);
7826
- color.b = b(t);
7827
- return color + "";
7828
- };
7829
- };
7830
- }
7831
-
7832
- var rgbBasis = rgbSpline(basis$1);
7833
- var rgbBasisClosed = rgbSpline(basisClosed);
7834
-
7835
- function numberArray(a, b) {
7836
- if (!b) b = [];
7837
- var n = a ? Math.min(b.length, a.length) : 0,
7838
- c = b.slice(),
7839
- i;
7840
- return function(t) {
7841
- for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
7842
- return c;
7843
- };
7844
- }
7845
-
7846
- function isNumberArray(x) {
7847
- return ArrayBuffer.isView(x) && !(x instanceof DataView);
7848
- }
7849
-
7850
- function array(a, b) {
7851
- return (isNumberArray(b) ? numberArray : genericArray)(a, b);
7852
- }
7853
-
7854
- function genericArray(a, b) {
7855
- var nb = b ? b.length : 0,
7856
- na = a ? Math.min(nb, a.length) : 0,
7857
- x = new Array(na),
7858
- c = new Array(nb),
7859
- i;
7860
-
7861
- for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);
7862
- for (; i < nb; ++i) c[i] = b[i];
7863
-
7864
- return function(t) {
7865
- for (i = 0; i < na; ++i) c[i] = x[i](t);
7866
- return c;
7867
- };
7868
- }
7869
-
7870
- function date(a, b) {
7871
- var d = new Date;
7872
- return a = +a, b = +b, function(t) {
7873
- return d.setTime(a * (1 - t) + b * t), d;
7874
- };
7875
- }
7876
-
7877
- function number(a, b) {
7878
- return a = +a, b = +b, function(t) {
7879
- return a * (1 - t) + b * t;
7880
- };
7881
- }
7882
-
7883
- function object(a, b) {
7884
- var i = {},
7885
- c = {},
7886
- k;
7887
-
7888
- if (a === null || typeof a !== "object") a = {};
7889
- if (b === null || typeof b !== "object") b = {};
7890
-
7891
- for (k in b) {
7892
- if (k in a) {
7893
- i[k] = value(a[k], b[k]);
7894
- } else {
7895
- c[k] = b[k];
7896
- }
7897
- }
7898
-
7899
- return function(t) {
7900
- for (k in i) c[k] = i[k](t);
7901
- return c;
7902
- };
7903
- }
7904
-
7905
- var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
7906
- reB = new RegExp(reA.source, "g");
7907
-
7908
- function zero(b) {
7909
- return function() {
7910
- return b;
7911
- };
7912
- }
7913
-
7914
- function one(b) {
7915
- return function(t) {
7916
- return b(t) + "";
7917
- };
7918
- }
7919
-
7920
- function string(a, b) {
7921
- var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b
7922
- am, // current match in a
7923
- bm, // current match in b
7924
- bs, // string preceding current number in b, if any
7925
- i = -1, // index in s
7926
- s = [], // string constants and placeholders
7927
- q = []; // number interpolators
7928
-
7929
- // Coerce inputs to strings.
7930
- a = a + "", b = b + "";
7931
-
7932
- // Interpolate pairs of numbers in a & b.
7933
- while ((am = reA.exec(a))
7934
- && (bm = reB.exec(b))) {
7935
- if ((bs = bm.index) > bi) { // a string precedes the next number in b
7936
- bs = b.slice(bi, bs);
7937
- if (s[i]) s[i] += bs; // coalesce with previous string
7938
- else s[++i] = bs;
7939
- }
7940
- if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match
7941
- if (s[i]) s[i] += bm; // coalesce with previous string
7942
- else s[++i] = bm;
7943
- } else { // interpolate non-matching numbers
7944
- s[++i] = null;
7945
- q.push({i: i, x: number(am, bm)});
7946
- }
7947
- bi = reB.lastIndex;
7948
- }
7949
-
7950
- // Add remains of b.
7951
- if (bi < b.length) {
7952
- bs = b.slice(bi);
7953
- if (s[i]) s[i] += bs; // coalesce with previous string
7954
- else s[++i] = bs;
7955
- }
7956
-
7957
- // Special optimization for only a single match.
7958
- // Otherwise, interpolate each of the numbers and rejoin the string.
7959
- return s.length < 2 ? (q[0]
7960
- ? one(q[0].x)
7961
- : zero(b))
7962
- : (b = q.length, function(t) {
7963
- for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
7964
- return s.join("");
7965
- });
7966
- }
7967
-
7968
- function value(a, b) {
7969
- var t = typeof b, c;
7970
- return b == null || t === "boolean" ? constant(b)
7971
- : (t === "number" ? number
7972
- : t === "string" ? ((c = d3Color.color(b)) ? (b = c, rgb) : string)
7973
- : b instanceof d3Color.color ? rgb
7974
- : b instanceof Date ? date
7975
- : isNumberArray(b) ? numberArray
7976
- : Array.isArray(b) ? genericArray
7977
- : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object
7978
- : number)(a, b);
7979
- }
7980
-
7981
- function discrete(range) {
7982
- var n = range.length;
7983
- return function(t) {
7984
- return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
7985
- };
7986
- }
7987
-
7988
- function hue$1(a, b) {
7989
- var i = hue(+a, +b);
7990
- return function(t) {
7991
- var x = i(t);
7992
- return x - 360 * Math.floor(x / 360);
7993
- };
7994
- }
7995
-
7996
- function round(a, b) {
7997
- return a = +a, b = +b, function(t) {
7998
- return Math.round(a * (1 - t) + b * t);
7999
- };
8000
- }
8001
-
8002
- var degrees = 180 / Math.PI;
8003
-
8004
- var identity = {
8005
- translateX: 0,
8006
- translateY: 0,
8007
- rotate: 0,
8008
- skewX: 0,
8009
- scaleX: 1,
8010
- scaleY: 1
8011
- };
8012
-
8013
- function decompose(a, b, c, d, e, f) {
8014
- var scaleX, scaleY, skewX;
8015
- if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
8016
- if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
8017
- if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
8018
- if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
8019
- return {
8020
- translateX: e,
8021
- translateY: f,
8022
- rotate: Math.atan2(b, a) * degrees,
8023
- skewX: Math.atan(skewX) * degrees,
8024
- scaleX: scaleX,
8025
- scaleY: scaleY
8026
- };
8027
- }
8028
-
8029
- var svgNode;
8030
-
8031
- /* eslint-disable no-undef */
8032
- function parseCss(value) {
8033
- const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
8034
- return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
8035
- }
8036
-
8037
- function parseSvg(value) {
8038
- if (value == null) return identity;
8039
- if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
8040
- svgNode.setAttribute("transform", value);
8041
- if (!(value = svgNode.transform.baseVal.consolidate())) return identity;
8042
- value = value.matrix;
8043
- return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
8044
- }
8045
-
8046
- function interpolateTransform(parse, pxComma, pxParen, degParen) {
8047
-
8048
- function pop(s) {
8049
- return s.length ? s.pop() + " " : "";
8050
- }
8051
-
8052
- function translate(xa, ya, xb, yb, s, q) {
8053
- if (xa !== xb || ya !== yb) {
8054
- var i = s.push("translate(", null, pxComma, null, pxParen);
8055
- q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});
8056
- } else if (xb || yb) {
8057
- s.push("translate(" + xb + pxComma + yb + pxParen);
8058
- }
8059
- }
8060
-
8061
- function rotate(a, b, s, q) {
8062
- if (a !== b) {
8063
- if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path
8064
- q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b)});
8065
- } else if (b) {
8066
- s.push(pop(s) + "rotate(" + b + degParen);
8067
- }
8068
- }
8069
-
8070
- function skewX(a, b, s, q) {
8071
- if (a !== b) {
8072
- q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number(a, b)});
8073
- } else if (b) {
8074
- s.push(pop(s) + "skewX(" + b + degParen);
8075
- }
8076
- }
8077
-
8078
- function scale(xa, ya, xb, yb, s, q) {
8079
- if (xa !== xb || ya !== yb) {
8080
- var i = s.push(pop(s) + "scale(", null, ",", null, ")");
8081
- q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});
8082
- } else if (xb !== 1 || yb !== 1) {
8083
- s.push(pop(s) + "scale(" + xb + "," + yb + ")");
8084
- }
8085
- }
8086
-
8087
- return function(a, b) {
8088
- var s = [], // string constants and placeholders
8089
- q = []; // number interpolators
8090
- a = parse(a), b = parse(b);
8091
- translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
8092
- rotate(a.rotate, b.rotate, s, q);
8093
- skewX(a.skewX, b.skewX, s, q);
8094
- scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
8095
- a = b = null; // gc
8096
- return function(t) {
8097
- var i = -1, n = q.length, o;
8098
- while (++i < n) s[(o = q[i]).i] = o.x(t);
8099
- return s.join("");
8100
- };
8101
- };
8102
- }
8103
-
8104
- var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
8105
- var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
8106
-
8107
- var epsilon2 = 1e-12;
8108
-
8109
- function cosh(x) {
8110
- return ((x = Math.exp(x)) + 1 / x) / 2;
8111
- }
8112
-
8113
- function sinh(x) {
8114
- return ((x = Math.exp(x)) - 1 / x) / 2;
8115
- }
8116
-
8117
- function tanh(x) {
8118
- return ((x = Math.exp(2 * x)) - 1) / (x + 1);
8119
- }
8120
-
8121
- var zoom = (function zoomRho(rho, rho2, rho4) {
8122
-
8123
- // p0 = [ux0, uy0, w0]
8124
- // p1 = [ux1, uy1, w1]
8125
- function zoom(p0, p1) {
8126
- var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],
8127
- ux1 = p1[0], uy1 = p1[1], w1 = p1[2],
8128
- dx = ux1 - ux0,
8129
- dy = uy1 - uy0,
8130
- d2 = dx * dx + dy * dy,
8131
- i,
8132
- S;
8133
-
8134
- // Special case for u0 ≅ u1.
8135
- if (d2 < epsilon2) {
8136
- S = Math.log(w1 / w0) / rho;
8137
- i = function(t) {
8138
- return [
8139
- ux0 + t * dx,
8140
- uy0 + t * dy,
8141
- w0 * Math.exp(rho * t * S)
8142
- ];
8143
- };
8144
- }
8145
-
8146
- // General case.
8147
- else {
8148
- var d1 = Math.sqrt(d2),
8149
- b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),
8150
- b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
8151
- r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
8152
- r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
8153
- S = (r1 - r0) / rho;
8154
- i = function(t) {
8155
- var s = t * S,
8156
- coshr0 = cosh(r0),
8157
- u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
8158
- return [
8159
- ux0 + u * dx,
8160
- uy0 + u * dy,
8161
- w0 * coshr0 / cosh(rho * s + r0)
8162
- ];
8163
- };
8164
- }
8165
-
8166
- i.duration = S * 1000 * rho / Math.SQRT2;
8167
-
8168
- return i;
8169
- }
8170
-
8171
- zoom.rho = function(_) {
8172
- var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;
8173
- return zoomRho(_1, _2, _4);
8174
- };
8175
-
8176
- return zoom;
8177
- })(Math.SQRT2, 2, 4);
8178
-
8179
- function hsl(hue) {
8180
- return function(start, end) {
8181
- var h = hue((start = d3Color.hsl(start)).h, (end = d3Color.hsl(end)).h),
8182
- s = nogamma(start.s, end.s),
8183
- l = nogamma(start.l, end.l),
8184
- opacity = nogamma(start.opacity, end.opacity);
8185
- return function(t) {
8186
- start.h = h(t);
8187
- start.s = s(t);
8188
- start.l = l(t);
8189
- start.opacity = opacity(t);
8190
- return start + "";
8191
- };
8192
- }
8193
- }
8194
-
8195
- var hsl$1 = hsl(hue);
8196
- var hslLong = hsl(nogamma);
8197
-
8198
- function lab(start, end) {
8199
- var l = nogamma((start = d3Color.lab(start)).l, (end = d3Color.lab(end)).l),
8200
- a = nogamma(start.a, end.a),
8201
- b = nogamma(start.b, end.b),
8202
- opacity = nogamma(start.opacity, end.opacity);
8203
- return function(t) {
8204
- start.l = l(t);
8205
- start.a = a(t);
8206
- start.b = b(t);
8207
- start.opacity = opacity(t);
8208
- return start + "";
8209
- };
8210
- }
8211
-
8212
- function hcl(hue) {
8213
- return function(start, end) {
8214
- var h = hue((start = d3Color.hcl(start)).h, (end = d3Color.hcl(end)).h),
8215
- c = nogamma(start.c, end.c),
8216
- l = nogamma(start.l, end.l),
8217
- opacity = nogamma(start.opacity, end.opacity);
8218
- return function(t) {
8219
- start.h = h(t);
8220
- start.c = c(t);
8221
- start.l = l(t);
8222
- start.opacity = opacity(t);
8223
- return start + "";
8224
- };
8225
- }
8226
- }
8227
-
8228
- var hcl$1 = hcl(hue);
8229
- var hclLong = hcl(nogamma);
8230
-
8231
- function cubehelix(hue) {
8232
- return (function cubehelixGamma(y) {
8233
- y = +y;
8234
-
8235
- function cubehelix(start, end) {
8236
- var h = hue((start = d3Color.cubehelix(start)).h, (end = d3Color.cubehelix(end)).h),
8237
- s = nogamma(start.s, end.s),
8238
- l = nogamma(start.l, end.l),
8239
- opacity = nogamma(start.opacity, end.opacity);
8240
- return function(t) {
8241
- start.h = h(t);
8242
- start.s = s(t);
8243
- start.l = l(Math.pow(t, y));
8244
- start.opacity = opacity(t);
8245
- return start + "";
8246
- };
8247
- }
8248
-
8249
- cubehelix.gamma = cubehelixGamma;
8250
-
8251
- return cubehelix;
8252
- })(1);
8253
- }
8254
-
8255
- var cubehelix$1 = cubehelix(hue);
8256
- var cubehelixLong = cubehelix(nogamma);
8257
-
8258
- function piecewise(interpolate, values) {
8259
- if (values === undefined) values = interpolate, interpolate = value;
8260
- var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);
8261
- while (i < n) I[i] = interpolate(v, v = values[++i]);
8262
- return function(t) {
8263
- var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));
8264
- return I[i](t - i);
8265
- };
8266
- }
8267
-
8268
- function quantize(interpolator, n) {
8269
- var samples = new Array(n);
8270
- for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));
8271
- return samples;
8272
- }
8273
-
8274
- exports.interpolate = value;
8275
- exports.interpolateArray = array;
8276
- exports.interpolateBasis = basis$1;
8277
- exports.interpolateBasisClosed = basisClosed;
8278
- exports.interpolateCubehelix = cubehelix$1;
8279
- exports.interpolateCubehelixLong = cubehelixLong;
8280
- exports.interpolateDate = date;
8281
- exports.interpolateDiscrete = discrete;
8282
- exports.interpolateHcl = hcl$1;
8283
- exports.interpolateHclLong = hclLong;
8284
- exports.interpolateHsl = hsl$1;
8285
- exports.interpolateHslLong = hslLong;
8286
- exports.interpolateHue = hue$1;
8287
- exports.interpolateLab = lab;
8288
- exports.interpolateNumber = number;
8289
- exports.interpolateNumberArray = numberArray;
8290
- exports.interpolateObject = object;
8291
- exports.interpolateRgb = rgb;
8292
- exports.interpolateRgbBasis = rgbBasis;
8293
- exports.interpolateRgbBasisClosed = rgbBasisClosed;
8294
- exports.interpolateRound = round;
8295
- exports.interpolateString = string;
8296
- exports.interpolateTransformCss = interpolateTransformCss;
8297
- exports.interpolateTransformSvg = interpolateTransformSvg;
8298
- exports.interpolateZoom = zoom;
8299
- exports.piecewise = piecewise;
8300
- exports.quantize = quantize;
8301
-
8302
- Object.defineProperty(exports, '__esModule', { value: true });
8303
-
8304
- }));
8305
-
8306
- },{"d3-color":"d3-color"}],"d3-scale-chromatic":[function(require,module,exports){
8307
- // https://d3js.org/d3-scale-chromatic/ v2.0.0 Copyright 2020 Mike Bostock
8308
- (function (global, factory) {
8309
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-interpolate'), require('d3-color')) :
8310
- typeof define === 'function' && define.amd ? define(['exports', 'd3-interpolate', 'd3-color'], factory) :
8311
- (global = global || self, factory(global.d3 = global.d3 || {}, global.d3, global.d3));
8312
- }(this, function (exports, d3Interpolate, d3Color) { 'use strict';
8313
-
8314
- function colors(specifier) {
8315
- var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;
8316
- while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6);
8317
- return colors;
8318
- }
8319
-
8320
- var category10 = colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");
8321
-
8322
- var Accent = colors("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");
8323
-
8324
- var Dark2 = colors("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");
8325
-
8326
- var Paired = colors("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");
8327
-
8328
- var Pastel1 = colors("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");
8329
-
8330
- var Pastel2 = colors("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");
8331
-
8332
- var Set1 = colors("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");
8333
-
8334
- var Set2 = colors("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");
8335
-
8336
- var Set3 = colors("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");
8337
-
8338
- var Tableau10 = colors("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
8339
-
8340
- var ramp = scheme => d3Interpolate.interpolateRgbBasis(scheme[scheme.length - 1]);
8341
-
8342
- var scheme = new Array(3).concat(
8343
- "d8b365f5f5f55ab4ac",
8344
- "a6611adfc27d80cdc1018571",
8345
- "a6611adfc27df5f5f580cdc1018571",
8346
- "8c510ad8b365f6e8c3c7eae55ab4ac01665e",
8347
- "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e",
8348
- "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e",
8349
- "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e",
8350
- "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30",
8351
- "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30"
8352
- ).map(colors);
8353
-
8354
- var BrBG = ramp(scheme);
8355
-
8356
- var scheme$1 = new Array(3).concat(
8357
- "af8dc3f7f7f77fbf7b",
8358
- "7b3294c2a5cfa6dba0008837",
8359
- "7b3294c2a5cff7f7f7a6dba0008837",
8360
- "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837",
8361
- "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837",
8362
- "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837",
8363
- "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837",
8364
- "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b",
8365
- "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b"
8366
- ).map(colors);
8367
-
8368
- var PRGn = ramp(scheme$1);
8369
-
8370
- var scheme$2 = new Array(3).concat(
8371
- "e9a3c9f7f7f7a1d76a",
8372
- "d01c8bf1b6dab8e1864dac26",
8373
- "d01c8bf1b6daf7f7f7b8e1864dac26",
8374
- "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221",
8375
- "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221",
8376
- "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221",
8377
- "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221",
8378
- "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419",
8379
- "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419"
8380
- ).map(colors);
8381
-
8382
- var PiYG = ramp(scheme$2);
8383
-
8384
- var scheme$3 = new Array(3).concat(
8385
- "998ec3f7f7f7f1a340",
8386
- "5e3c99b2abd2fdb863e66101",
8387
- "5e3c99b2abd2f7f7f7fdb863e66101",
8388
- "542788998ec3d8daebfee0b6f1a340b35806",
8389
- "542788998ec3d8daebf7f7f7fee0b6f1a340b35806",
8390
- "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806",
8391
- "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806",
8392
- "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08",
8393
- "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08"
8394
- ).map(colors);
8395
-
8396
- var PuOr = ramp(scheme$3);
8397
-
8398
- var scheme$4 = new Array(3).concat(
8399
- "ef8a62f7f7f767a9cf",
8400
- "ca0020f4a58292c5de0571b0",
8401
- "ca0020f4a582f7f7f792c5de0571b0",
8402
- "b2182bef8a62fddbc7d1e5f067a9cf2166ac",
8403
- "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac",
8404
- "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac",
8405
- "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac",
8406
- "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061",
8407
- "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061"
8408
- ).map(colors);
8409
-
8410
- var RdBu = ramp(scheme$4);
8411
-
8412
- var scheme$5 = new Array(3).concat(
8413
- "ef8a62ffffff999999",
8414
- "ca0020f4a582bababa404040",
8415
- "ca0020f4a582ffffffbababa404040",
8416
- "b2182bef8a62fddbc7e0e0e09999994d4d4d",
8417
- "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d",
8418
- "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d",
8419
- "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d",
8420
- "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a",
8421
- "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a"
8422
- ).map(colors);
8423
-
8424
- var RdGy = ramp(scheme$5);
8425
-
8426
- var scheme$6 = new Array(3).concat(
8427
- "fc8d59ffffbf91bfdb",
8428
- "d7191cfdae61abd9e92c7bb6",
8429
- "d7191cfdae61ffffbfabd9e92c7bb6",
8430
- "d73027fc8d59fee090e0f3f891bfdb4575b4",
8431
- "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4",
8432
- "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4",
8433
- "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4",
8434
- "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695",
8435
- "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695"
8436
- ).map(colors);
8437
-
8438
- var RdYlBu = ramp(scheme$6);
8439
-
8440
- var scheme$7 = new Array(3).concat(
8441
- "fc8d59ffffbf91cf60",
8442
- "d7191cfdae61a6d96a1a9641",
8443
- "d7191cfdae61ffffbfa6d96a1a9641",
8444
- "d73027fc8d59fee08bd9ef8b91cf601a9850",
8445
- "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850",
8446
- "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850",
8447
- "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850",
8448
- "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837",
8449
- "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837"
8450
- ).map(colors);
8451
-
8452
- var RdYlGn = ramp(scheme$7);
8453
-
8454
- var scheme$8 = new Array(3).concat(
8455
- "fc8d59ffffbf99d594",
8456
- "d7191cfdae61abdda42b83ba",
8457
- "d7191cfdae61ffffbfabdda42b83ba",
8458
- "d53e4ffc8d59fee08be6f59899d5943288bd",
8459
- "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd",
8460
- "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd",
8461
- "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd",
8462
- "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2",
8463
- "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2"
8464
- ).map(colors);
8465
-
8466
- var Spectral = ramp(scheme$8);
8467
-
8468
- var scheme$9 = new Array(3).concat(
8469
- "e5f5f999d8c92ca25f",
8470
- "edf8fbb2e2e266c2a4238b45",
8471
- "edf8fbb2e2e266c2a42ca25f006d2c",
8472
- "edf8fbccece699d8c966c2a42ca25f006d2c",
8473
- "edf8fbccece699d8c966c2a441ae76238b45005824",
8474
- "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824",
8475
- "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b"
8476
- ).map(colors);
8477
-
8478
- var BuGn = ramp(scheme$9);
8479
-
8480
- var scheme$a = new Array(3).concat(
8481
- "e0ecf49ebcda8856a7",
8482
- "edf8fbb3cde38c96c688419d",
8483
- "edf8fbb3cde38c96c68856a7810f7c",
8484
- "edf8fbbfd3e69ebcda8c96c68856a7810f7c",
8485
- "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b",
8486
- "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b",
8487
- "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b"
8488
- ).map(colors);
8489
-
8490
- var BuPu = ramp(scheme$a);
8491
-
8492
- var scheme$b = new Array(3).concat(
8493
- "e0f3dba8ddb543a2ca",
8494
- "f0f9e8bae4bc7bccc42b8cbe",
8495
- "f0f9e8bae4bc7bccc443a2ca0868ac",
8496
- "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac",
8497
- "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e",
8498
- "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e",
8499
- "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081"
8500
- ).map(colors);
8501
-
8502
- var GnBu = ramp(scheme$b);
8503
-
8504
- var scheme$c = new Array(3).concat(
8505
- "fee8c8fdbb84e34a33",
8506
- "fef0d9fdcc8afc8d59d7301f",
8507
- "fef0d9fdcc8afc8d59e34a33b30000",
8508
- "fef0d9fdd49efdbb84fc8d59e34a33b30000",
8509
- "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000",
8510
- "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000",
8511
- "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000"
8512
- ).map(colors);
8513
-
8514
- var OrRd = ramp(scheme$c);
8515
-
8516
- var scheme$d = new Array(3).concat(
8517
- "ece2f0a6bddb1c9099",
8518
- "f6eff7bdc9e167a9cf02818a",
8519
- "f6eff7bdc9e167a9cf1c9099016c59",
8520
- "f6eff7d0d1e6a6bddb67a9cf1c9099016c59",
8521
- "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450",
8522
- "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450",
8523
- "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636"
8524
- ).map(colors);
8525
-
8526
- var PuBuGn = ramp(scheme$d);
8527
-
8528
- var scheme$e = new Array(3).concat(
8529
- "ece7f2a6bddb2b8cbe",
8530
- "f1eef6bdc9e174a9cf0570b0",
8531
- "f1eef6bdc9e174a9cf2b8cbe045a8d",
8532
- "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d",
8533
- "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b",
8534
- "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b",
8535
- "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858"
8536
- ).map(colors);
8537
-
8538
- var PuBu = ramp(scheme$e);
8539
-
8540
- var scheme$f = new Array(3).concat(
8541
- "e7e1efc994c7dd1c77",
8542
- "f1eef6d7b5d8df65b0ce1256",
8543
- "f1eef6d7b5d8df65b0dd1c77980043",
8544
- "f1eef6d4b9dac994c7df65b0dd1c77980043",
8545
- "f1eef6d4b9dac994c7df65b0e7298ace125691003f",
8546
- "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f",
8547
- "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f"
8548
- ).map(colors);
8549
-
8550
- var PuRd = ramp(scheme$f);
8551
-
8552
- var scheme$g = new Array(3).concat(
8553
- "fde0ddfa9fb5c51b8a",
8554
- "feebe2fbb4b9f768a1ae017e",
8555
- "feebe2fbb4b9f768a1c51b8a7a0177",
8556
- "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177",
8557
- "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177",
8558
- "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177",
8559
- "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a"
8560
- ).map(colors);
8561
-
8562
- var RdPu = ramp(scheme$g);
8563
-
8564
- var scheme$h = new Array(3).concat(
8565
- "edf8b17fcdbb2c7fb8",
8566
- "ffffcca1dab441b6c4225ea8",
8567
- "ffffcca1dab441b6c42c7fb8253494",
8568
- "ffffccc7e9b47fcdbb41b6c42c7fb8253494",
8569
- "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84",
8570
- "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84",
8571
- "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58"
8572
- ).map(colors);
8573
-
8574
- var YlGnBu = ramp(scheme$h);
8575
-
8576
- var scheme$i = new Array(3).concat(
8577
- "f7fcb9addd8e31a354",
8578
- "ffffccc2e69978c679238443",
8579
- "ffffccc2e69978c67931a354006837",
8580
- "ffffccd9f0a3addd8e78c67931a354006837",
8581
- "ffffccd9f0a3addd8e78c67941ab5d238443005a32",
8582
- "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32",
8583
- "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529"
8584
- ).map(colors);
8585
-
8586
- var YlGn = ramp(scheme$i);
8587
-
8588
- var scheme$j = new Array(3).concat(
8589
- "fff7bcfec44fd95f0e",
8590
- "ffffd4fed98efe9929cc4c02",
8591
- "ffffd4fed98efe9929d95f0e993404",
8592
- "ffffd4fee391fec44ffe9929d95f0e993404",
8593
- "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04",
8594
- "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04",
8595
- "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506"
8596
- ).map(colors);
8597
-
8598
- var YlOrBr = ramp(scheme$j);
8599
-
8600
- var scheme$k = new Array(3).concat(
8601
- "ffeda0feb24cf03b20",
8602
- "ffffb2fecc5cfd8d3ce31a1c",
8603
- "ffffb2fecc5cfd8d3cf03b20bd0026",
8604
- "ffffb2fed976feb24cfd8d3cf03b20bd0026",
8605
- "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026",
8606
- "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026",
8607
- "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026"
8608
- ).map(colors);
8609
-
8610
- var YlOrRd = ramp(scheme$k);
8611
-
8612
- var scheme$l = new Array(3).concat(
8613
- "deebf79ecae13182bd",
8614
- "eff3ffbdd7e76baed62171b5",
8615
- "eff3ffbdd7e76baed63182bd08519c",
8616
- "eff3ffc6dbef9ecae16baed63182bd08519c",
8617
- "eff3ffc6dbef9ecae16baed64292c62171b5084594",
8618
- "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594",
8619
- "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"
8620
- ).map(colors);
8621
-
8622
- var Blues = ramp(scheme$l);
8623
-
8624
- var scheme$m = new Array(3).concat(
8625
- "e5f5e0a1d99b31a354",
8626
- "edf8e9bae4b374c476238b45",
8627
- "edf8e9bae4b374c47631a354006d2c",
8628
- "edf8e9c7e9c0a1d99b74c47631a354006d2c",
8629
- "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32",
8630
- "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32",
8631
- "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b"
8632
- ).map(colors);
8633
-
8634
- var Greens = ramp(scheme$m);
8635
-
8636
- var scheme$n = new Array(3).concat(
8637
- "f0f0f0bdbdbd636363",
8638
- "f7f7f7cccccc969696525252",
8639
- "f7f7f7cccccc969696636363252525",
8640
- "f7f7f7d9d9d9bdbdbd969696636363252525",
8641
- "f7f7f7d9d9d9bdbdbd969696737373525252252525",
8642
- "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525",
8643
- "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000"
8644
- ).map(colors);
8645
-
8646
- var Greys = ramp(scheme$n);
8647
-
8648
- var scheme$o = new Array(3).concat(
8649
- "efedf5bcbddc756bb1",
8650
- "f2f0f7cbc9e29e9ac86a51a3",
8651
- "f2f0f7cbc9e29e9ac8756bb154278f",
8652
- "f2f0f7dadaebbcbddc9e9ac8756bb154278f",
8653
- "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486",
8654
- "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486",
8655
- "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d"
8656
- ).map(colors);
8657
-
8658
- var Purples = ramp(scheme$o);
8659
-
8660
- var scheme$p = new Array(3).concat(
8661
- "fee0d2fc9272de2d26",
8662
- "fee5d9fcae91fb6a4acb181d",
8663
- "fee5d9fcae91fb6a4ade2d26a50f15",
8664
- "fee5d9fcbba1fc9272fb6a4ade2d26a50f15",
8665
- "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d",
8666
- "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d",
8667
- "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d"
8668
- ).map(colors);
8669
-
8670
- var Reds = ramp(scheme$p);
8671
-
8672
- var scheme$q = new Array(3).concat(
8673
- "fee6cefdae6be6550d",
8674
- "feeddefdbe85fd8d3cd94701",
8675
- "feeddefdbe85fd8d3ce6550da63603",
8676
- "feeddefdd0a2fdae6bfd8d3ce6550da63603",
8677
- "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04",
8678
- "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04",
8679
- "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704"
8680
- ).map(colors);
8681
-
8682
- var Oranges = ramp(scheme$q);
8683
-
8684
- function cividis(t) {
8685
- t = Math.max(0, Math.min(1, t));
8686
- return "rgb("
8687
- + 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))))))) + ", "
8688
- + 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))))))) + ", "
8689
- + 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)))))))
8690
- + ")";
8691
- }
8692
-
8693
- var cubehelix = d3Interpolate.interpolateCubehelixLong(d3Color.cubehelix(300, 0.5, 0.0), d3Color.cubehelix(-240, 0.5, 1.0));
8694
-
8695
- var warm = d3Interpolate.interpolateCubehelixLong(d3Color.cubehelix(-100, 0.75, 0.35), d3Color.cubehelix(80, 1.50, 0.8));
8696
-
8697
- var cool = d3Interpolate.interpolateCubehelixLong(d3Color.cubehelix(260, 0.75, 0.35), d3Color.cubehelix(80, 1.50, 0.8));
8698
-
8699
- var c = d3Color.cubehelix();
8700
-
8701
- function rainbow(t) {
8702
- if (t < 0 || t > 1) t -= Math.floor(t);
8703
- var ts = Math.abs(t - 0.5);
8704
- c.h = 360 * t - 100;
8705
- c.s = 1.5 - 1.5 * ts;
8706
- c.l = 0.8 - 0.9 * ts;
8707
- return c + "";
8708
- }
8709
-
8710
- var c$1 = d3Color.rgb(),
8711
- pi_1_3 = Math.PI / 3,
8712
- pi_2_3 = Math.PI * 2 / 3;
8713
-
8714
- function sinebow(t) {
8715
- var x;
8716
- t = (0.5 - t) * Math.PI;
8717
- c$1.r = 255 * (x = Math.sin(t)) * x;
8718
- c$1.g = 255 * (x = Math.sin(t + pi_1_3)) * x;
8719
- c$1.b = 255 * (x = Math.sin(t + pi_2_3)) * x;
8720
- return c$1 + "";
8721
- }
8722
-
8723
- function turbo(t) {
8724
- t = Math.max(0, Math.min(1, t));
8725
- return "rgb("
8726
- + 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))))))) + ", "
8727
- + 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))))))) + ", "
8728
- + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))
8729
- + ")";
8730
- }
8731
-
8732
- function ramp$1(range) {
8733
- var n = range.length;
8734
- return function(t) {
8735
- return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
8736
- };
8737
- }
8738
-
8739
- var viridis = ramp$1(colors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));
8740
-
8741
- var magma = ramp$1(colors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));
8742
-
8743
- var inferno = ramp$1(colors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));
8744
-
8745
- var plasma = ramp$1(colors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
8746
-
8747
- exports.interpolateBlues = Blues;
8748
- exports.interpolateBrBG = BrBG;
8749
- exports.interpolateBuGn = BuGn;
8750
- exports.interpolateBuPu = BuPu;
8751
- exports.interpolateCividis = cividis;
8752
- exports.interpolateCool = cool;
8753
- exports.interpolateCubehelixDefault = cubehelix;
8754
- exports.interpolateGnBu = GnBu;
8755
- exports.interpolateGreens = Greens;
8756
- exports.interpolateGreys = Greys;
8757
- exports.interpolateInferno = inferno;
8758
- exports.interpolateMagma = magma;
8759
- exports.interpolateOrRd = OrRd;
8760
- exports.interpolateOranges = Oranges;
8761
- exports.interpolatePRGn = PRGn;
8762
- exports.interpolatePiYG = PiYG;
8763
- exports.interpolatePlasma = plasma;
8764
- exports.interpolatePuBu = PuBu;
8765
- exports.interpolatePuBuGn = PuBuGn;
8766
- exports.interpolatePuOr = PuOr;
8767
- exports.interpolatePuRd = PuRd;
8768
- exports.interpolatePurples = Purples;
8769
- exports.interpolateRainbow = rainbow;
8770
- exports.interpolateRdBu = RdBu;
8771
- exports.interpolateRdGy = RdGy;
8772
- exports.interpolateRdPu = RdPu;
8773
- exports.interpolateRdYlBu = RdYlBu;
8774
- exports.interpolateRdYlGn = RdYlGn;
8775
- exports.interpolateReds = Reds;
8776
- exports.interpolateSinebow = sinebow;
8777
- exports.interpolateSpectral = Spectral;
8778
- exports.interpolateTurbo = turbo;
8779
- exports.interpolateViridis = viridis;
8780
- exports.interpolateWarm = warm;
8781
- exports.interpolateYlGn = YlGn;
8782
- exports.interpolateYlGnBu = YlGnBu;
8783
- exports.interpolateYlOrBr = YlOrBr;
8784
- exports.interpolateYlOrRd = YlOrRd;
8785
- exports.schemeAccent = Accent;
8786
- exports.schemeBlues = scheme$l;
8787
- exports.schemeBrBG = scheme;
8788
- exports.schemeBuGn = scheme$9;
8789
- exports.schemeBuPu = scheme$a;
8790
- exports.schemeCategory10 = category10;
8791
- exports.schemeDark2 = Dark2;
8792
- exports.schemeGnBu = scheme$b;
8793
- exports.schemeGreens = scheme$m;
8794
- exports.schemeGreys = scheme$n;
8795
- exports.schemeOrRd = scheme$c;
8796
- exports.schemeOranges = scheme$q;
8797
- exports.schemePRGn = scheme$1;
8798
- exports.schemePaired = Paired;
8799
- exports.schemePastel1 = Pastel1;
8800
- exports.schemePastel2 = Pastel2;
8801
- exports.schemePiYG = scheme$2;
8802
- exports.schemePuBu = scheme$e;
8803
- exports.schemePuBuGn = scheme$d;
8804
- exports.schemePuOr = scheme$3;
8805
- exports.schemePuRd = scheme$f;
8806
- exports.schemePurples = scheme$o;
8807
- exports.schemeRdBu = scheme$4;
8808
- exports.schemeRdGy = scheme$5;
8809
- exports.schemeRdPu = scheme$g;
8810
- exports.schemeRdYlBu = scheme$6;
8811
- exports.schemeRdYlGn = scheme$7;
8812
- exports.schemeReds = scheme$p;
8813
- exports.schemeSet1 = Set1;
8814
- exports.schemeSet2 = Set2;
8815
- exports.schemeSet3 = Set3;
8816
- exports.schemeSpectral = scheme$8;
8817
- exports.schemeTableau10 = Tableau10;
8818
- exports.schemeYlGn = scheme$i;
8819
- exports.schemeYlGnBu = scheme$h;
8820
- exports.schemeYlOrBr = scheme$j;
8821
- exports.schemeYlOrRd = scheme$k;
8822
-
8823
- Object.defineProperty(exports, '__esModule', { value: true });
8824
-
8825
- }));
8826
-
8827
- },{"d3-color":"d3-color","d3-interpolate":"d3-interpolate"}],"flatbush":[function(require,module,exports){
7654
+ },{"base64-js":1,"buffer":"buffer","ieee754":24}],"flatbush":[function(require,module,exports){
8828
7655
  (function (global, factory) {
8829
7656
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
8830
7657
  typeof define === 'function' && define.amd ? define(factory) :
@@ -9288,11 +8115,8 @@ return Flatbush;
9288
8115
  },{}],"fs":[function(require,module,exports){
9289
8116
  arguments[4][2][0].apply(exports,arguments)
9290
8117
  },{"dup":2}],"iconv-lite":[function(require,module,exports){
9291
- (function (process){(function (){
9292
8118
  "use strict";
9293
8119
 
9294
- // Some environments don't have global Buffer (e.g. React Native).
9295
- // Solution would be installing npm modules "buffer" and "stream" explicitly.
9296
8120
  var Buffer = require("safer-buffer").Buffer;
9297
8121
 
9298
8122
  var bomHandling = require("./bom-handling"),
@@ -9424,27 +8248,55 @@ iconv.getDecoder = function getDecoder(encoding, options) {
9424
8248
  return decoder;
9425
8249
  }
9426
8250
 
8251
+ // Streaming API
8252
+ // NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add
8253
+ // up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default.
8254
+ // If you would like to enable it explicitly, please add the following code to your app:
8255
+ // > iconv.enableStreamingAPI(require('stream'));
8256
+ iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) {
8257
+ if (iconv.supportsStreams)
8258
+ return;
9427
8259
 
9428
- // Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json.
9429
- var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node;
9430
- if (nodeVer) {
8260
+ // Dependency-inject stream module to create IconvLite stream classes.
8261
+ var streams = require("./streams")(stream_module);
8262
+
8263
+ // Not public API yet, but expose the stream classes.
8264
+ iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream;
8265
+ iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream;
8266
+
8267
+ // Streaming API.
8268
+ iconv.encodeStream = function encodeStream(encoding, options) {
8269
+ return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);
8270
+ }
9431
8271
 
9432
- // Load streaming support in Node v0.10+
9433
- var nodeVerArr = nodeVer.split(".").map(Number);
9434
- if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) {
9435
- require("./streams")(iconv);
8272
+ iconv.decodeStream = function decodeStream(encoding, options) {
8273
+ return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);
9436
8274
  }
9437
8275
 
9438
- // Load Node primitive extensions.
9439
- require("./extend-node")(iconv);
8276
+ iconv.supportsStreams = true;
8277
+ }
8278
+
8279
+ // Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments).
8280
+ var stream_module;
8281
+ try {
8282
+ stream_module = require("stream");
8283
+ } catch (e) {}
8284
+
8285
+ if (stream_module && stream_module.Transform) {
8286
+ iconv.enableStreamingAPI(stream_module);
8287
+
8288
+ } else {
8289
+ // In rare cases where 'stream' module is not available by default, throw a helpful exception.
8290
+ iconv.encodeStream = iconv.decodeStream = function() {
8291
+ throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.");
8292
+ };
9440
8293
  }
9441
8294
 
9442
8295
  if ("Ā" != "\u0100") {
9443
- console.error("iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info.");
8296
+ console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info.");
9444
8297
  }
9445
8298
 
9446
- }).call(this)}).call(this,require('_process'))
9447
- },{"../encodings":6,"./bom-handling":21,"./extend-node":2,"./streams":2,"_process":23,"safer-buffer":37}],"kdbush":[function(require,module,exports){
8299
+ },{"../encodings":6,"./bom-handling":22,"./streams":23,"safer-buffer":39,"stream":2}],"kdbush":[function(require,module,exports){
9448
8300
  (function (global, factory) {
9449
8301
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
9450
8302
  typeof define === 'function' && define.amd ? define(factory) :
@@ -22289,14 +21141,14 @@ posix.posix = posix;
22289
21141
  module.exports = posix;
22290
21142
 
22291
21143
  }).call(this)}).call(this,require('_process'))
22292
- },{"_process":23}],"rw":[function(require,module,exports){
21144
+ },{"_process":25}],"rw":[function(require,module,exports){
22293
21145
  exports.dash = require("./lib/rw/dash");
22294
21146
  exports.readFile = require("./lib/rw/read-file");
22295
21147
  exports.readFileSync = require("./lib/rw/read-file-sync");
22296
21148
  exports.writeFile = require("./lib/rw/write-file");
22297
21149
  exports.writeFileSync = require("./lib/rw/write-file-sync");
22298
21150
 
22299
- },{"./lib/rw/dash":29,"./lib/rw/read-file":33,"./lib/rw/read-file-sync":32,"./lib/rw/write-file":35,"./lib/rw/write-file-sync":34}],"sync-request":[function(require,module,exports){
21151
+ },{"./lib/rw/dash":31,"./lib/rw/read-file":35,"./lib/rw/read-file-sync":34,"./lib/rw/write-file":37,"./lib/rw/write-file-sync":36}],"sync-request":[function(require,module,exports){
22300
21152
  "use strict";
22301
21153
  exports.__esModule = true;
22302
21154
  var handle_qs_js_1 = require("then-request/lib/handle-qs.js");
@@ -22367,4 +21219,4 @@ module.exports = doRequest;
22367
21219
  module.exports["default"] = doRequest;
22368
21220
  module.exports.FormData = fd;
22369
21221
 
22370
- },{"http-response-object":3,"then-request/lib/handle-qs.js":39}]},{},[]);
21222
+ },{"http-response-object":3,"then-request/lib/handle-qs.js":41}]},{},[]);