@dra2020/baseclient 1.0.152 → 1.0.154

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.
@@ -35,13 +35,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
35
35
  }) : function(o, v) {
36
36
  o["default"] = v;
37
37
  });
38
- var __importStar = (this && this.__importStar) || function (mod) {
39
- if (mod && mod.__esModule) return mod;
40
- var result = {};
41
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
42
- __setModuleDefault(result, mod);
43
- return result;
44
- };
38
+ var __importStar = (this && this.__importStar) || (function () {
39
+ var ownKeys = function(o) {
40
+ ownKeys = Object.getOwnPropertyNames || function (o) {
41
+ var ar = [];
42
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
43
+ return ar;
44
+ };
45
+ return ownKeys(o);
46
+ };
47
+ return function (mod) {
48
+ if (mod && mod.__esModule) return mod;
49
+ var result = {};
50
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
51
+ __setModuleDefault(result, mod);
52
+ return result;
53
+ };
54
+ })();
45
55
  Object.defineProperty(exports, "__esModule", ({ value: true }));
46
56
  exports.Detail = exports.DataFlow = exports.Colors = exports.CSV = exports.Emit = exports.G = exports.FilterExpr = exports.OTE = exports.OT = exports.LogClient = exports.LogAbstract = exports.Poly = exports.FSM = exports.Context = exports.Util = void 0;
47
57
  // Client and Server
@@ -102,15 +112,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
102
112
  }) : function(o, v) {
103
113
  o["default"] = v;
104
114
  });
105
- var __importStar = (this && this.__importStar) || function (mod) {
106
- if (mod && mod.__esModule) return mod;
107
- var result = {};
108
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
109
- __setModuleDefault(result, mod);
110
- return result;
111
- };
115
+ var __importStar = (this && this.__importStar) || (function () {
116
+ var ownKeys = function(o) {
117
+ ownKeys = Object.getOwnPropertyNames || function (o) {
118
+ var ar = [];
119
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
120
+ return ar;
121
+ };
122
+ return ownKeys(o);
123
+ };
124
+ return function (mod) {
125
+ if (mod && mod.__esModule) return mod;
126
+ var result = {};
127
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
128
+ __setModuleDefault(result, mod);
129
+ return result;
130
+ };
131
+ })();
112
132
  Object.defineProperty(exports, "__esModule", ({ value: true }));
113
- exports.getPalette = exports.orderedColors = exports.genColor = exports.defaultDistrictsPalette = exports.EthnicBackgroundColor = exports.CountEthnicBackgroundColor = exports.PartisanDistrictClassicColors = exports.CountPartisanDistrictClassicColors = exports.PartisanPrecinctClassicColors = exports.CountPartisanPrecinctClassicColors = exports.EthnicFewClassicColors = exports.CountEthnicFewClassicColors = exports.ColorValues = exports.DefaultColorNames = exports.MaxClassicColors = exports.MaxColors = exports.MaxOrderedColors = void 0;
133
+ exports.defaultDistrictsPalette = exports.EthnicBackgroundColor = exports.CountEthnicBackgroundColor = exports.PartisanDistrictClassicColors = exports.CountPartisanDistrictClassicColors = exports.PartisanPrecinctClassicColors = exports.CountPartisanPrecinctClassicColors = exports.EthnicFewClassicColors = exports.CountEthnicFewClassicColors = exports.ColorValues = exports.DefaultColorNames = exports.MaxClassicColors = exports.MaxColors = exports.MaxOrderedColors = void 0;
134
+ exports.genColor = genColor;
135
+ exports.orderedColors = orderedColors;
136
+ exports.getPalette = getPalette;
114
137
  const JsColorMapsData = __importStar(__webpack_require__(/*! ./jscolormapsdata */ "./lib/colors/jscolormapsdata.ts"));
115
138
  const all_1 = __webpack_require__(/*! ../all/all */ "./lib/all/all.ts");
116
139
  exports.MaxOrderedColors = 50;
@@ -392,7 +415,6 @@ function genColor(i, useFirstColor, palette) {
392
415
  // Unexpected to get here, but something in case of an error
393
416
  return genDRAColor(i, useFirstColor);
394
417
  }
395
- exports.genColor = genColor;
396
418
  // DRA classic color palette
397
419
  function genDRAColor(i, useFirstColor) {
398
420
  // i is district number, 0 => District[0] (unassigned), so subtract 1 to access ColorTable
@@ -425,7 +447,6 @@ function orderedColors(palette) {
425
447
  }
426
448
  return OrderedColorTable[palette];
427
449
  }
428
- exports.orderedColors = orderedColors;
429
450
  function getPalette(palette) {
430
451
  if (palette === 'draclassic') {
431
452
  // return draclassic palette with only 50 colors
@@ -436,7 +457,6 @@ function getPalette(palette) {
436
457
  }
437
458
  return getColorTable(palette);
438
459
  }
439
- exports.getPalette = getPalette;
440
460
  // Generate table for palette
441
461
  function getColorTable(palette) {
442
462
  if (palette === 'demographicsclassic') {
@@ -795,15 +815,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
795
815
  }) : function(o, v) {
796
816
  o["default"] = v;
797
817
  });
798
- var __importStar = (this && this.__importStar) || function (mod) {
799
- if (mod && mod.__esModule) return mod;
800
- var result = {};
801
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
802
- __setModuleDefault(result, mod);
803
- return result;
804
- };
818
+ var __importStar = (this && this.__importStar) || (function () {
819
+ var ownKeys = function(o) {
820
+ ownKeys = Object.getOwnPropertyNames || function (o) {
821
+ var ar = [];
822
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
823
+ return ar;
824
+ };
825
+ return ownKeys(o);
826
+ };
827
+ return function (mod) {
828
+ if (mod && mod.__esModule) return mod;
829
+ var result = {};
830
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
831
+ __setModuleDefault(result, mod);
832
+ return result;
833
+ };
834
+ })();
805
835
  Object.defineProperty(exports, "__esModule", ({ value: true }));
806
- exports.create = void 0;
836
+ exports.create = create;
807
837
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
808
838
  class Context {
809
839
  constructor() {
@@ -852,7 +882,6 @@ class Context {
852
882
  function create() {
853
883
  return new Context();
854
884
  }
855
- exports.create = create;
856
885
 
857
886
 
858
887
  /***/ }),
@@ -908,13 +937,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
908
937
  }) : function(o, v) {
909
938
  o["default"] = v;
910
939
  });
911
- var __importStar = (this && this.__importStar) || function (mod) {
912
- if (mod && mod.__esModule) return mod;
913
- var result = {};
914
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
915
- __setModuleDefault(result, mod);
916
- return result;
917
- };
940
+ var __importStar = (this && this.__importStar) || (function () {
941
+ var ownKeys = function(o) {
942
+ ownKeys = Object.getOwnPropertyNames || function (o) {
943
+ var ar = [];
944
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
945
+ return ar;
946
+ };
947
+ return ownKeys(o);
948
+ };
949
+ return function (mod) {
950
+ if (mod && mod.__esModule) return mod;
951
+ var result = {};
952
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
953
+ __setModuleDefault(result, mod);
954
+ return result;
955
+ };
956
+ })();
918
957
  Object.defineProperty(exports, "__esModule", ({ value: true }));
919
958
  exports.ParseOne = exports.ParseMany = void 0;
920
959
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
@@ -1060,7 +1099,7 @@ exports.ParseOne = ParseOne;
1060
1099
 
1061
1100
 
1062
1101
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1063
- exports.csvParseLine = void 0;
1102
+ exports.csvParseLine = csvParseLine;
1064
1103
  const reField = /^\s*("([^"]*(?:""[^"]*)*)"|[^,|]*)\s*[|,]?/;
1065
1104
  const reQuote = /^"/;
1066
1105
  const reAddOne = /[|,]$/;
@@ -1089,7 +1128,6 @@ function csvParseLine(s) {
1089
1128
  fields.push('');
1090
1129
  return fields;
1091
1130
  }
1092
- exports.csvParseLine = csvParseLine;
1093
1131
 
1094
1132
 
1095
1133
  /***/ }),
@@ -1147,6 +1185,14 @@ class DataFlow {
1147
1185
  this.inCompute = false;
1148
1186
  }
1149
1187
  // override in subclass
1188
+ destroy() {
1189
+ this._destroy();
1190
+ }
1191
+ _destroy() {
1192
+ // Premise is that the 'id' value may contain significant storage
1193
+ this.usesList.forEach(ui => { delete ui.id; });
1194
+ }
1195
+ // override in subclass
1150
1196
  dfid() { return null; }
1151
1197
  // override in subclass
1152
1198
  compute() {
@@ -1270,13 +1316,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1270
1316
  }) : function(o, v) {
1271
1317
  o["default"] = v;
1272
1318
  });
1273
- var __importStar = (this && this.__importStar) || function (mod) {
1274
- if (mod && mod.__esModule) return mod;
1275
- var result = {};
1276
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1277
- __setModuleDefault(result, mod);
1278
- return result;
1279
- };
1319
+ var __importStar = (this && this.__importStar) || (function () {
1320
+ var ownKeys = function(o) {
1321
+ ownKeys = Object.getOwnPropertyNames || function (o) {
1322
+ var ar = [];
1323
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
1324
+ return ar;
1325
+ };
1326
+ return ownKeys(o);
1327
+ };
1328
+ return function (mod) {
1329
+ if (mod && mod.__esModule) return mod;
1330
+ var result = {};
1331
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
1332
+ __setModuleDefault(result, mod);
1333
+ return result;
1334
+ };
1335
+ })();
1280
1336
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1281
1337
  exports.FormatDetail = void 0;
1282
1338
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
@@ -1541,13 +1597,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1541
1597
  }) : function(o, v) {
1542
1598
  o["default"] = v;
1543
1599
  });
1544
- var __importStar = (this && this.__importStar) || function (mod) {
1545
- if (mod && mod.__esModule) return mod;
1546
- var result = {};
1547
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1548
- __setModuleDefault(result, mod);
1549
- return result;
1550
- };
1600
+ var __importStar = (this && this.__importStar) || (function () {
1601
+ var ownKeys = function(o) {
1602
+ ownKeys = Object.getOwnPropertyNames || function (o) {
1603
+ var ar = [];
1604
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
1605
+ return ar;
1606
+ };
1607
+ return ownKeys(o);
1608
+ };
1609
+ return function (mod) {
1610
+ if (mod && mod.__esModule) return mod;
1611
+ var result = {};
1612
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
1613
+ __setModuleDefault(result, mod);
1614
+ return result;
1615
+ };
1616
+ })();
1551
1617
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1552
1618
  exports.FilterExpr = void 0;
1553
1619
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
@@ -2194,13 +2260,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
2194
2260
  }) : function(o, v) {
2195
2261
  o["default"] = v;
2196
2262
  });
2197
- var __importStar = (this && this.__importStar) || function (mod) {
2198
- if (mod && mod.__esModule) return mod;
2199
- var result = {};
2200
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
2201
- __setModuleDefault(result, mod);
2202
- return result;
2203
- };
2263
+ var __importStar = (this && this.__importStar) || (function () {
2264
+ var ownKeys = function(o) {
2265
+ ownKeys = Object.getOwnPropertyNames || function (o) {
2266
+ var ar = [];
2267
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
2268
+ return ar;
2269
+ };
2270
+ return ownKeys(o);
2271
+ };
2272
+ return function (mod) {
2273
+ if (mod && mod.__esModule) return mod;
2274
+ var result = {};
2275
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
2276
+ __setModuleDefault(result, mod);
2277
+ return result;
2278
+ };
2279
+ })();
2204
2280
  Object.defineProperty(exports, "__esModule", ({ value: true }));
2205
2281
  exports.FsmArray = exports.FsmLoop = exports.DefaultLoopOptions = exports.FsmTracker = exports.FsmSerializer = exports.FsmSleep = exports.FsmOnDone = exports.Fsm = exports.FsmManager = exports.FSM_CUSTOM9 = exports.FSM_CUSTOM8 = exports.FSM_CUSTOM7 = exports.FSM_CUSTOM6 = exports.FSM_CUSTOM5 = exports.FSM_CUSTOM4 = exports.FSM_CUSTOM3 = exports.FSM_CUSTOM2 = exports.FSM_CUSTOM1 = exports.FSM_RELEASED = exports.FSM_CANCEL = exports.FSM_ERROR = exports.FSM_DONE = exports.FSM_PENDING = exports.FSM_STARTING = void 0;
2206
2282
  // Shared libraries
@@ -2606,7 +2682,7 @@ __exportStar(__webpack_require__(/*! ./multiblockmapping */ "./lib/geo/multibloc
2606
2682
 
2607
2683
 
2608
2684
  Object.defineProperty(exports, "__esModule", ({ value: true }));
2609
- exports.flexName = void 0;
2685
+ exports.flexName = flexName;
2610
2686
  function flexName(f) {
2611
2687
  if (!f || !f.properties)
2612
2688
  return null;
@@ -2630,7 +2706,6 @@ function flexName(f) {
2630
2706
  }
2631
2707
  return `${f.properties.id}`;
2632
2708
  }
2633
- exports.flexName = flexName;
2634
2709
 
2635
2710
 
2636
2711
  /***/ }),
@@ -2658,15 +2733,42 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
2658
2733
  }) : function(o, v) {
2659
2734
  o["default"] = v;
2660
2735
  });
2661
- var __importStar = (this && this.__importStar) || function (mod) {
2662
- if (mod && mod.__esModule) return mod;
2663
- var result = {};
2664
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
2665
- __setModuleDefault(result, mod);
2666
- return result;
2667
- };
2736
+ var __importStar = (this && this.__importStar) || (function () {
2737
+ var ownKeys = function(o) {
2738
+ ownKeys = Object.getOwnPropertyNames || function (o) {
2739
+ var ar = [];
2740
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
2741
+ return ar;
2742
+ };
2743
+ return ownKeys(o);
2744
+ };
2745
+ return function (mod) {
2746
+ if (mod && mod.__esModule) return mod;
2747
+ var result = {};
2748
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
2749
+ __setModuleDefault(result, mod);
2750
+ return result;
2751
+ };
2752
+ })();
2668
2753
  Object.defineProperty(exports, "__esModule", ({ value: true }));
2669
- exports.geoIntersect = exports.geoIntersectOptions = exports.GeoMultiCollection = exports.geoMapEqual = exports.geoEqual = exports.geoTopoToCollectionNonNull = exports.geoTopoToCollection = exports.geoCollectionToTopoNonNull = exports.geoCollectionToTopo = exports.geoMapToCollectionNonNull = exports.geoMapToCollection = exports.geoCollectionToMap = exports.geoNormalizeCollection = exports.geoNormalizeFeature = exports.geoEnsureID = exports.isValidId = exports.applyCanonicalID = exports.hidemapConcat = exports.dumpMetrics = void 0;
2754
+ exports.geoIntersectOptions = exports.GeoMultiCollection = void 0;
2755
+ exports.dumpMetrics = dumpMetrics;
2756
+ exports.hidemapConcat = hidemapConcat;
2757
+ exports.applyCanonicalID = applyCanonicalID;
2758
+ exports.isValidId = isValidId;
2759
+ exports.geoEnsureID = geoEnsureID;
2760
+ exports.geoNormalizeFeature = geoNormalizeFeature;
2761
+ exports.geoNormalizeCollection = geoNormalizeCollection;
2762
+ exports.geoCollectionToMap = geoCollectionToMap;
2763
+ exports.geoMapToCollection = geoMapToCollection;
2764
+ exports.geoMapToCollectionNonNull = geoMapToCollectionNonNull;
2765
+ exports.geoCollectionToTopo = geoCollectionToTopo;
2766
+ exports.geoCollectionToTopoNonNull = geoCollectionToTopoNonNull;
2767
+ exports.geoTopoToCollection = geoTopoToCollection;
2768
+ exports.geoTopoToCollectionNonNull = geoTopoToCollectionNonNull;
2769
+ exports.geoEqual = geoEqual;
2770
+ exports.geoMapEqual = geoMapEqual;
2771
+ exports.geoIntersect = geoIntersect;
2670
2772
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
2671
2773
  const Poly = __importStar(__webpack_require__(/*! ../poly/all */ "./lib/poly/all.ts"));
2672
2774
  // Tracing/debugging aid
@@ -2682,7 +2784,6 @@ function dumpMetrics() {
2682
2784
  console.log(`G.${action}: count: ${metrics[action].count}, total: ${metrics[action].total}`);
2683
2785
  });
2684
2786
  }
2685
- exports.dumpMetrics = dumpMetrics;
2686
2787
  function hidemapConcat(...args) {
2687
2788
  let hm = {};
2688
2789
  for (let i = 0; i < args.length; i++)
@@ -2690,13 +2791,11 @@ function hidemapConcat(...args) {
2690
2791
  Object.keys(args[i]).forEach(id => hm[id] = true);
2691
2792
  return hm;
2692
2793
  }
2693
- exports.hidemapConcat = hidemapConcat;
2694
2794
  const NormalizeAll = { joinPolygons: true, checkRewind: true, ensureID: true };
2695
2795
  function applyCanonicalID(col) {
2696
2796
  if (col && Array.isArray(col.features))
2697
2797
  col.features.forEach((f, n) => { f.properties.id = String(n + 1); });
2698
2798
  }
2699
- exports.applyCanonicalID = applyCanonicalID;
2700
2799
  function isValidId(col) {
2701
2800
  if (!col || !Array.isArray(col.features))
2702
2801
  return true;
@@ -2713,7 +2812,6 @@ function isValidId(col) {
2713
2812
  }
2714
2813
  return true;
2715
2814
  }
2716
- exports.isValidId = isValidId;
2717
2815
  // set the canonical 'id' property from the best property value.
2718
2816
  // if joinPolygons is true, we do not enforce uniqueness.
2719
2817
  //
@@ -2742,14 +2840,12 @@ function geoEnsureID(col, options) {
2742
2840
  applyCanonicalID(col);
2743
2841
  }
2744
2842
  }
2745
- exports.geoEnsureID = geoEnsureID;
2746
2843
  function geoNormalizeFeature(f, options) {
2747
2844
  options = Util.shallowAssignImmutable({}, options);
2748
2845
  if (options.checkRewind)
2749
2846
  Poly.featureRewind(f);
2750
2847
  return f;
2751
2848
  }
2752
- exports.geoNormalizeFeature = geoNormalizeFeature;
2753
2849
  function onlyPolygons(col) {
2754
2850
  if (col && Array.isArray(col.features))
2755
2851
  for (let i = 0; i < col.features.length; i++) {
@@ -2801,7 +2897,6 @@ function geoNormalizeCollection(col, options) {
2801
2897
  }
2802
2898
  return col;
2803
2899
  }
2804
- exports.geoNormalizeCollection = geoNormalizeCollection;
2805
2900
  function geoCollectionToMap(col) {
2806
2901
  if (col == null)
2807
2902
  return null;
@@ -2809,13 +2904,11 @@ function geoCollectionToMap(col) {
2809
2904
  col.features.forEach((f) => { map[String(f.properties.id)] = f; });
2810
2905
  return map;
2811
2906
  }
2812
- exports.geoCollectionToMap = geoCollectionToMap;
2813
2907
  function geoMapToCollection(map) {
2814
2908
  if (Util.countKeys(map) == 0)
2815
2909
  return null;
2816
2910
  return geoMapToCollectionNonNull(map);
2817
2911
  }
2818
- exports.geoMapToCollection = geoMapToCollection;
2819
2912
  function geoMapToCollectionNonNull(map) {
2820
2913
  if (map == null)
2821
2914
  return null;
@@ -2823,7 +2916,6 @@ function geoMapToCollectionNonNull(map) {
2823
2916
  Object.keys(map).forEach((geoid) => { col.features.push(map[geoid]); });
2824
2917
  return col;
2825
2918
  }
2826
- exports.geoMapToCollectionNonNull = geoMapToCollectionNonNull;
2827
2919
  function geoCollectionToTopo(col) {
2828
2920
  let topo = Poly.topoFromCollection(col);
2829
2921
  Poly.topoPack(topo);
@@ -2832,11 +2924,9 @@ function geoCollectionToTopo(col) {
2832
2924
  topo.datasets = col.datasets;
2833
2925
  return topo;
2834
2926
  }
2835
- exports.geoCollectionToTopo = geoCollectionToTopo;
2836
2927
  function geoCollectionToTopoNonNull(col) {
2837
2928
  return geoCollectionToTopo(col);
2838
2929
  }
2839
- exports.geoCollectionToTopoNonNull = geoCollectionToTopoNonNull;
2840
2930
  function geoTopoToCollection(topo) {
2841
2931
  let col = Poly.topoToCollection(topo);
2842
2932
  Poly.featurePack(col);
@@ -2845,11 +2935,9 @@ function geoTopoToCollection(topo) {
2845
2935
  col.datasets = topo.datasets;
2846
2936
  return col;
2847
2937
  }
2848
- exports.geoTopoToCollection = geoTopoToCollection;
2849
2938
  function geoTopoToCollectionNonNull(topo) {
2850
2939
  return geoTopoToCollection(topo);
2851
2940
  }
2852
- exports.geoTopoToCollectionNonNull = geoTopoToCollectionNonNull;
2853
2941
  function geoEqual(m1, m2) {
2854
2942
  let n1 = m1 ? m1.length : 0;
2855
2943
  let n2 = m2 ? m2.length : 0;
@@ -2863,7 +2951,6 @@ function geoEqual(m1, m2) {
2863
2951
  eq = false; });
2864
2952
  return eq;
2865
2953
  }
2866
- exports.geoEqual = geoEqual;
2867
2954
  function geoMapEqual(m1, m2) {
2868
2955
  if (m1 == null)
2869
2956
  return Util.isEmpty(m2);
@@ -2880,7 +2967,6 @@ function geoMapEqual(m1, m2) {
2880
2967
  return false;
2881
2968
  return true;
2882
2969
  }
2883
- exports.geoMapEqual = geoMapEqual;
2884
2970
  class GeoMultiCollection {
2885
2971
  constructor(tag, topo, col, map) {
2886
2972
  this.stamp = Math.trunc(Math.random() * Number.MAX_SAFE_INTEGER / 2);
@@ -3289,7 +3375,6 @@ function geoIntersect(multi, bbox, opt) {
3289
3375
  result.add('result', null, null, m);
3290
3376
  return result;
3291
3377
  }
3292
- exports.geoIntersect = geoIntersect;
3293
3378
 
3294
3379
 
3295
3380
  /***/ }),
@@ -3302,7 +3387,8 @@ exports.geoIntersect = geoIntersect;
3302
3387
 
3303
3388
 
3304
3389
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3305
- exports.MultiBlockMapping = exports.reverseBlockMapping = void 0;
3390
+ exports.MultiBlockMapping = void 0;
3391
+ exports.reverseBlockMapping = reverseBlockMapping;
3306
3392
  function reverseBlockMapping(bm) {
3307
3393
  let rev = {};
3308
3394
  if (bm)
@@ -3315,7 +3401,6 @@ function reverseBlockMapping(bm) {
3315
3401
  Object.values(rev).forEach((a) => a.sort());
3316
3402
  return rev;
3317
3403
  }
3318
- exports.reverseBlockMapping = reverseBlockMapping;
3319
3404
  class MultiBlockMapping {
3320
3405
  constructor(tag, bm) {
3321
3406
  this.entries = [];
@@ -3421,15 +3506,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
3421
3506
  }) : function(o, v) {
3422
3507
  o["default"] = v;
3423
3508
  });
3424
- var __importStar = (this && this.__importStar) || function (mod) {
3425
- if (mod && mod.__esModule) return mod;
3426
- var result = {};
3427
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3428
- __setModuleDefault(result, mod);
3429
- return result;
3430
- };
3509
+ var __importStar = (this && this.__importStar) || (function () {
3510
+ var ownKeys = function(o) {
3511
+ ownKeys = Object.getOwnPropertyNames || function (o) {
3512
+ var ar = [];
3513
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
3514
+ return ar;
3515
+ };
3516
+ return ownKeys(o);
3517
+ };
3518
+ return function (mod) {
3519
+ if (mod && mod.__esModule) return mod;
3520
+ var result = {};
3521
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
3522
+ __setModuleDefault(result, mod);
3523
+ return result;
3524
+ };
3525
+ })();
3431
3526
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3432
- exports.computeVFeature = void 0;
3527
+ exports.computeVFeature = computeVFeature;
3433
3528
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
3434
3529
  const Poly = __importStar(__webpack_require__(/*! ../poly/all */ "./lib/poly/all.ts"));
3435
3530
  // Given the topology for a precinct, the bintrie mapping and the list of blocks, construct the
@@ -3458,7 +3553,6 @@ function computeVFeature(topoPrecinct, bintrie, blocks) {
3458
3553
  f.properties.blocks = blocks;
3459
3554
  return f;
3460
3555
  }
3461
- exports.computeVFeature = computeVFeature;
3462
3556
 
3463
3557
 
3464
3558
  /***/ }),
@@ -3513,13 +3607,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
3513
3607
  }) : function(o, v) {
3514
3608
  o["default"] = v;
3515
3609
  });
3516
- var __importStar = (this && this.__importStar) || function (mod) {
3517
- if (mod && mod.__esModule) return mod;
3518
- var result = {};
3519
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3520
- __setModuleDefault(result, mod);
3521
- return result;
3522
- };
3610
+ var __importStar = (this && this.__importStar) || (function () {
3611
+ var ownKeys = function(o) {
3612
+ ownKeys = Object.getOwnPropertyNames || function (o) {
3613
+ var ar = [];
3614
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
3615
+ return ar;
3616
+ };
3617
+ return ownKeys(o);
3618
+ };
3619
+ return function (mod) {
3620
+ if (mod && mod.__esModule) return mod;
3621
+ var result = {};
3622
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
3623
+ __setModuleDefault(result, mod);
3624
+ return result;
3625
+ };
3626
+ })();
3523
3627
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3524
3628
  exports.SyncTimer = exports.AsyncTimer = exports.Timer = void 0;
3525
3629
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
@@ -3606,15 +3710,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
3606
3710
  }) : function(o, v) {
3607
3711
  o["default"] = v;
3608
3712
  });
3609
- var __importStar = (this && this.__importStar) || function (mod) {
3610
- if (mod && mod.__esModule) return mod;
3611
- var result = {};
3612
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3613
- __setModuleDefault(result, mod);
3614
- return result;
3615
- };
3713
+ var __importStar = (this && this.__importStar) || (function () {
3714
+ var ownKeys = function(o) {
3715
+ ownKeys = Object.getOwnPropertyNames || function (o) {
3716
+ var ar = [];
3717
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
3718
+ return ar;
3719
+ };
3720
+ return ownKeys(o);
3721
+ };
3722
+ return function (mod) {
3723
+ if (mod && mod.__esModule) return mod;
3724
+ var result = {};
3725
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
3726
+ __setModuleDefault(result, mod);
3727
+ return result;
3728
+ };
3729
+ })();
3616
3730
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3617
- exports.create = void 0;
3731
+ exports.create = create;
3618
3732
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
3619
3733
  class LogManager {
3620
3734
  constructor(env) {
@@ -3683,7 +3797,6 @@ class LogManager {
3683
3797
  function create(env) {
3684
3798
  return new LogManager(env);
3685
3799
  }
3686
- exports.create = create;
3687
3800
 
3688
3801
 
3689
3802
  /***/ }),
@@ -3739,13 +3852,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
3739
3852
  }) : function(o, v) {
3740
3853
  o["default"] = v;
3741
3854
  });
3742
- var __importStar = (this && this.__importStar) || function (mod) {
3743
- if (mod && mod.__esModule) return mod;
3744
- var result = {};
3745
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3746
- __setModuleDefault(result, mod);
3747
- return result;
3748
- };
3855
+ var __importStar = (this && this.__importStar) || (function () {
3856
+ var ownKeys = function(o) {
3857
+ ownKeys = Object.getOwnPropertyNames || function (o) {
3858
+ var ar = [];
3859
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
3860
+ return ar;
3861
+ };
3862
+ return ownKeys(o);
3863
+ };
3864
+ return function (mod) {
3865
+ if (mod && mod.__esModule) return mod;
3866
+ var result = {};
3867
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
3868
+ __setModuleDefault(result, mod);
3869
+ return result;
3870
+ };
3871
+ })();
3749
3872
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3750
3873
  exports.OTEditUtil = void 0;
3751
3874
  const OT = __importStar(__webpack_require__(/*! ../ot-js/all */ "./lib/ot-js/all.ts"));
@@ -3928,13 +4051,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
3928
4051
  }) : function(o, v) {
3929
4052
  o["default"] = v;
3930
4053
  });
3931
- var __importStar = (this && this.__importStar) || function (mod) {
3932
- if (mod && mod.__esModule) return mod;
3933
- var result = {};
3934
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3935
- __setModuleDefault(result, mod);
3936
- return result;
3937
- };
4054
+ var __importStar = (this && this.__importStar) || (function () {
4055
+ var ownKeys = function(o) {
4056
+ ownKeys = Object.getOwnPropertyNames || function (o) {
4057
+ var ar = [];
4058
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
4059
+ return ar;
4060
+ };
4061
+ return ownKeys(o);
4062
+ };
4063
+ return function (mod) {
4064
+ if (mod && mod.__esModule) return mod;
4065
+ var result = {};
4066
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
4067
+ __setModuleDefault(result, mod);
4068
+ return result;
4069
+ };
4070
+ })();
3938
4071
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3939
4072
  exports.Editor = exports.REPLACE = exports.MERGE = void 0;
3940
4073
  const OT = __importStar(__webpack_require__(/*! ../ot-js/all */ "./lib/ot-js/all.ts"));
@@ -4154,13 +4287,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
4154
4287
  }) : function(o, v) {
4155
4288
  o["default"] = v;
4156
4289
  });
4157
- var __importStar = (this && this.__importStar) || function (mod) {
4158
- if (mod && mod.__esModule) return mod;
4159
- var result = {};
4160
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4161
- __setModuleDefault(result, mod);
4162
- return result;
4163
- };
4290
+ var __importStar = (this && this.__importStar) || (function () {
4291
+ var ownKeys = function(o) {
4292
+ ownKeys = Object.getOwnPropertyNames || function (o) {
4293
+ var ar = [];
4294
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
4295
+ return ar;
4296
+ };
4297
+ return ownKeys(o);
4298
+ };
4299
+ return function (mod) {
4300
+ if (mod && mod.__esModule) return mod;
4301
+ var result = {};
4302
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
4303
+ __setModuleDefault(result, mod);
4304
+ return result;
4305
+ };
4306
+ })();
4164
4307
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4165
4308
  exports.OTArrayResource = exports.OTStringResource = exports.OTArrayLikeResource = exports.OTArrayOperations = exports.OTStringOperations = exports.OTSingleArrayEditor = exports.OpTmpRetain = exports.OpSet = exports.OpCursor = exports.OpRetain = exports.OpDelete = exports.OpInsert = void 0;
4166
4309
  const OT = __importStar(__webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts"));
@@ -5126,13 +5269,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
5126
5269
  }) : function(o, v) {
5127
5270
  o["default"] = v;
5128
5271
  });
5129
- var __importStar = (this && this.__importStar) || function (mod) {
5130
- if (mod && mod.__esModule) return mod;
5131
- var result = {};
5132
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5133
- __setModuleDefault(result, mod);
5134
- return result;
5135
- };
5272
+ var __importStar = (this && this.__importStar) || (function () {
5273
+ var ownKeys = function(o) {
5274
+ ownKeys = Object.getOwnPropertyNames || function (o) {
5275
+ var ar = [];
5276
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
5277
+ return ar;
5278
+ };
5279
+ return ownKeys(o);
5280
+ };
5281
+ return function (mod) {
5282
+ if (mod && mod.__esModule) return mod;
5283
+ var result = {};
5284
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
5285
+ __setModuleDefault(result, mod);
5286
+ return result;
5287
+ };
5288
+ })();
5136
5289
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5137
5290
  exports.OTClientEngine = void 0;
5138
5291
  const OTC = __importStar(__webpack_require__(/*! ./otcomposite */ "./lib/ot-js/otcomposite.ts"));
@@ -5404,13 +5557,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
5404
5557
  }) : function(o, v) {
5405
5558
  o["default"] = v;
5406
5559
  });
5407
- var __importStar = (this && this.__importStar) || function (mod) {
5408
- if (mod && mod.__esModule) return mod;
5409
- var result = {};
5410
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5411
- __setModuleDefault(result, mod);
5412
- return result;
5413
- };
5560
+ var __importStar = (this && this.__importStar) || (function () {
5561
+ var ownKeys = function(o) {
5562
+ ownKeys = Object.getOwnPropertyNames || function (o) {
5563
+ var ar = [];
5564
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
5565
+ return ar;
5566
+ };
5567
+ return ownKeys(o);
5568
+ };
5569
+ return function (mod) {
5570
+ if (mod && mod.__esModule) return mod;
5571
+ var result = {};
5572
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
5573
+ __setModuleDefault(result, mod);
5574
+ return result;
5575
+ };
5576
+ })();
5414
5577
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5415
5578
  exports.OTCompositeResource = exports.clockSeenValue = exports.clockUndoValue = exports.clockInitializeValue = exports.clockFailureValue = exports.clockRandomizeValue = exports.clockTerminateValue = exports.clockInitialValue = void 0;
5416
5579
  const OT = __importStar(__webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts"));
@@ -5646,13 +5809,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
5646
5809
  }) : function(o, v) {
5647
5810
  o["default"] = v;
5648
5811
  });
5649
- var __importStar = (this && this.__importStar) || function (mod) {
5650
- if (mod && mod.__esModule) return mod;
5651
- var result = {};
5652
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5653
- __setModuleDefault(result, mod);
5654
- return result;
5655
- };
5812
+ var __importStar = (this && this.__importStar) || (function () {
5813
+ var ownKeys = function(o) {
5814
+ ownKeys = Object.getOwnPropertyNames || function (o) {
5815
+ var ar = [];
5816
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
5817
+ return ar;
5818
+ };
5819
+ return ownKeys(o);
5820
+ };
5821
+ return function (mod) {
5822
+ if (mod && mod.__esModule) return mod;
5823
+ var result = {};
5824
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
5825
+ __setModuleDefault(result, mod);
5826
+ return result;
5827
+ };
5828
+ })();
5656
5829
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5657
5830
  exports.OTCounterResource = exports.OpCounterDel = exports.OpCounterAdd = void 0;
5658
5831
  const OT = __importStar(__webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts"));
@@ -5844,13 +6017,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
5844
6017
  }) : function(o, v) {
5845
6018
  o["default"] = v;
5846
6019
  });
5847
- var __importStar = (this && this.__importStar) || function (mod) {
5848
- if (mod && mod.__esModule) return mod;
5849
- var result = {};
5850
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5851
- __setModuleDefault(result, mod);
5852
- return result;
5853
- };
6020
+ var __importStar = (this && this.__importStar) || (function () {
6021
+ var ownKeys = function(o) {
6022
+ ownKeys = Object.getOwnPropertyNames || function (o) {
6023
+ var ar = [];
6024
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
6025
+ return ar;
6026
+ };
6027
+ return ownKeys(o);
6028
+ };
6029
+ return function (mod) {
6030
+ if (mod && mod.__esModule) return mod;
6031
+ var result = {};
6032
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
6033
+ __setModuleDefault(result, mod);
6034
+ return result;
6035
+ };
6036
+ })();
5854
6037
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5855
6038
  exports.OTMapResource = exports.OpMapDel = exports.OpMapSet = void 0;
5856
6039
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
@@ -5987,13 +6170,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
5987
6170
  }) : function(o, v) {
5988
6171
  o["default"] = v;
5989
6172
  });
5990
- var __importStar = (this && this.__importStar) || function (mod) {
5991
- if (mod && mod.__esModule) return mod;
5992
- var result = {};
5993
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5994
- __setModuleDefault(result, mod);
5995
- return result;
5996
- };
6173
+ var __importStar = (this && this.__importStar) || (function () {
6174
+ var ownKeys = function(o) {
6175
+ ownKeys = Object.getOwnPropertyNames || function (o) {
6176
+ var ar = [];
6177
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
6178
+ return ar;
6179
+ };
6180
+ return ownKeys(o);
6181
+ };
6182
+ return function (mod) {
6183
+ if (mod && mod.__esModule) return mod;
6184
+ var result = {};
6185
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
6186
+ __setModuleDefault(result, mod);
6187
+ return result;
6188
+ };
6189
+ })();
5997
6190
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5998
6191
  exports.OTServerEngine = exports.ClientIDForServer = void 0;
5999
6192
  const OTC = __importStar(__webpack_require__(/*! ./otcomposite */ "./lib/ot-js/otcomposite.ts"));
@@ -6263,7 +6456,10 @@ exports.OTServerEngine = OTServerEngine;
6263
6456
 
6264
6457
 
6265
6458
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6266
- exports.SessionFilterFunction = exports.accessMapFindUser = exports.accessFindUser = exports.ServerStateMaintenance = exports.ServerStateRunning = exports.PermAll = exports.PermEdit = exports.PermVersion = exports.PermAdmin = exports.PermOwner = exports.PermWrite = exports.PermRead = exports.PermNone = exports.FilterCount = exports.FilterMyGroupDatasets = exports.FilterPublicDatasets = exports.FilterMyDatasets = exports.FilterMyGroups = exports.FilterMyGroupMaps = exports.FilterCOI = exports.FilterOfficial = exports.FilterPublic = exports.FilterTrash = exports.FilterRecent = exports.FilterMyPublic = exports.FilterSharedWithMe = exports.FilterMyMaps = exports.EClockAnomaly = exports.EMaintenance = exports.ENoAccess = exports.ENoPerm = exports.ELoadFailed = exports.EBadRequest = exports.ENoUser = exports.EClockReset = exports.EClockFailure = exports.EClockSeen = exports.ENoSession = exports.ERetry = exports.EFull = exports.EFail = exports.ESuccess = void 0;
6459
+ exports.ServerStateMaintenance = exports.ServerStateRunning = exports.PermAll = exports.PermEdit = exports.PermVersion = exports.PermAdmin = exports.PermOwner = exports.PermWrite = exports.PermRead = exports.PermNone = exports.FilterCount = exports.FilterMyGroupDatasets = exports.FilterPublicDatasets = exports.FilterMyDatasets = exports.FilterMyGroups = exports.FilterMyGroupMaps = exports.FilterCOI = exports.FilterOfficial = exports.FilterPublic = exports.FilterTrash = exports.FilterRecent = exports.FilterMyPublic = exports.FilterSharedWithMe = exports.FilterMyMaps = exports.EClockAnomaly = exports.EMaintenance = exports.ENoAccess = exports.ENoPerm = exports.ELoadFailed = exports.EBadRequest = exports.ENoUser = exports.EClockReset = exports.EClockFailure = exports.EClockSeen = exports.ENoSession = exports.ERetry = exports.EFull = exports.EFail = exports.ESuccess = void 0;
6460
+ exports.accessFindUser = accessFindUser;
6461
+ exports.accessMapFindUser = accessMapFindUser;
6462
+ exports.SessionFilterFunction = SessionFilterFunction;
6267
6463
  // Errors
6268
6464
  exports.ESuccess = 0; // Generic success
6269
6465
  exports.EFail = 1; // Generic failure
@@ -6322,7 +6518,6 @@ function accessFindUser(a, uid) {
6322
6518
  return a.perm;
6323
6519
  return exports.PermNone;
6324
6520
  }
6325
- exports.accessFindUser = accessFindUser;
6326
6521
  function accessMapFindUser(accessMap, uid, aid) {
6327
6522
  if (aid !== undefined)
6328
6523
  return accessFindUser(accessMap[aid], uid);
@@ -6340,7 +6535,6 @@ function accessMapFindUser(accessMap, uid, aid) {
6340
6535
  return perm;
6341
6536
  }
6342
6537
  }
6343
- exports.accessMapFindUser = accessMapFindUser;
6344
6538
  function SessionFilterFunction(p, uid, f) {
6345
6539
  if (f === exports.FilterPublic)
6346
6540
  return p.published !== undefined;
@@ -6361,7 +6555,6 @@ function SessionFilterFunction(p, uid, f) {
6361
6555
  }
6362
6556
  return !p.deleted;
6363
6557
  }
6364
- exports.SessionFilterFunction = SessionFilterFunction;
6365
6558
 
6366
6559
 
6367
6560
  /***/ }),
@@ -6497,15 +6690,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
6497
6690
  }) : function(o, v) {
6498
6691
  o["default"] = v;
6499
6692
  });
6500
- var __importStar = (this && this.__importStar) || function (mod) {
6501
- if (mod && mod.__esModule) return mod;
6502
- var result = {};
6503
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6504
- __setModuleDefault(result, mod);
6505
- return result;
6506
- };
6693
+ var __importStar = (this && this.__importStar) || (function () {
6694
+ var ownKeys = function(o) {
6695
+ ownKeys = Object.getOwnPropertyNames || function (o) {
6696
+ var ar = [];
6697
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
6698
+ return ar;
6699
+ };
6700
+ return ownKeys(o);
6701
+ };
6702
+ return function (mod) {
6703
+ if (mod && mod.__esModule) return mod;
6704
+ var result = {};
6705
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
6706
+ __setModuleDefault(result, mod);
6707
+ return result;
6708
+ };
6709
+ })();
6507
6710
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6508
- exports.blend = void 0;
6711
+ exports.blend = blend;
6509
6712
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
6510
6713
  const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
6511
6714
  // Takes array of polygon or multi-polygon coordinate structures and returns a single multi-polygon
@@ -6527,7 +6730,6 @@ function blend(polys) {
6527
6730
  }
6528
6731
  return result;
6529
6732
  }
6530
- exports.blend = blend;
6531
6733
 
6532
6734
 
6533
6735
  /***/ }),
@@ -6555,26 +6757,42 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
6555
6757
  }) : function(o, v) {
6556
6758
  o["default"] = v;
6557
6759
  });
6558
- var __importStar = (this && this.__importStar) || function (mod) {
6559
- if (mod && mod.__esModule) return mod;
6560
- var result = {};
6561
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6562
- __setModuleDefault(result, mod);
6563
- return result;
6564
- };
6760
+ var __importStar = (this && this.__importStar) || (function () {
6761
+ var ownKeys = function(o) {
6762
+ ownKeys = Object.getOwnPropertyNames || function (o) {
6763
+ var ar = [];
6764
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
6765
+ return ar;
6766
+ };
6767
+ return ownKeys(o);
6768
+ };
6769
+ return function (mod) {
6770
+ if (mod && mod.__esModule) return mod;
6771
+ var result = {};
6772
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
6773
+ __setModuleDefault(result, mod);
6774
+ return result;
6775
+ };
6776
+ })();
6565
6777
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6566
- exports.boundboxContains = exports.boundboxIntersects = exports.boundboxArea = exports.boundboxEmpty = exports.boundboxPoly = exports.boundbox = exports.boundboxExtend = exports.clipLon = exports.boundboxCY = exports.boundboxCX = exports.boundboxHeight = exports.boundboxWidth = void 0;
6778
+ exports.boundboxWidth = boundboxWidth;
6779
+ exports.boundboxHeight = boundboxHeight;
6780
+ exports.boundboxCX = boundboxCX;
6781
+ exports.boundboxCY = boundboxCY;
6782
+ exports.clipLon = clipLon;
6783
+ exports.boundboxExtend = boundboxExtend;
6784
+ exports.boundbox = boundbox;
6785
+ exports.boundboxPoly = boundboxPoly;
6786
+ exports.boundboxEmpty = boundboxEmpty;
6787
+ exports.boundboxArea = boundboxArea;
6788
+ exports.boundboxIntersects = boundboxIntersects;
6789
+ exports.boundboxContains = boundboxContains;
6567
6790
  const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
6568
6791
  function boundboxWidth(bb) { return Math.abs(bb.right - bb.left); }
6569
- exports.boundboxWidth = boundboxWidth;
6570
6792
  function boundboxHeight(bb) { return Math.abs(bb.bottom - bb.top); }
6571
- exports.boundboxHeight = boundboxHeight;
6572
6793
  function boundboxCX(bb) { return bb.left + (bb.right - bb.left) / 2; }
6573
- exports.boundboxCX = boundboxCX;
6574
6794
  function boundboxCY(bb) { return bb.top + (bb.bottom - bb.top) / 2; }
6575
- exports.boundboxCY = boundboxCY;
6576
6795
  function clipLon(lon) { return lon <= 0 ? lon : -179; }
6577
- exports.clipLon = clipLon;
6578
6796
  function boundboxExtend(bbox, x, y) {
6579
6797
  x = clipLon(x);
6580
6798
  if (bbox.left === undefined || x < bbox.left)
@@ -6586,7 +6804,6 @@ function boundboxExtend(bbox, x, y) {
6586
6804
  if (bbox.bottom === undefined || y < bbox.bottom)
6587
6805
  bbox.bottom = y;
6588
6806
  }
6589
- exports.boundboxExtend = boundboxExtend;
6590
6807
  function boundboxExtendPacked(pp, bbox) {
6591
6808
  let buffer = pp.buffer;
6592
6809
  let offset = pp.buffer[pp.offset + 1] + pp.offset;
@@ -6625,27 +6842,21 @@ function boundbox(poly, bbox) {
6625
6842
  }
6626
6843
  return bbox;
6627
6844
  }
6628
- exports.boundbox = boundbox;
6629
6845
  function boundboxPoly(bb) {
6630
6846
  return [[[bb.left, bb.top], [bb.left, bb.bottom], [bb.right, bb.bottom], [bb.right, bb.top], [bb.left, bb.top]]];
6631
6847
  }
6632
- exports.boundboxPoly = boundboxPoly;
6633
6848
  function boundboxEmpty(bb) {
6634
6849
  return !bb || bb.left === undefined || P.polyArea(boundboxPoly(bb)) == 0;
6635
6850
  }
6636
- exports.boundboxEmpty = boundboxEmpty;
6637
6851
  function boundboxArea(poly) {
6638
6852
  return P.polyArea(boundboxPoly(boundbox(poly)));
6639
6853
  }
6640
- exports.boundboxArea = boundboxArea;
6641
6854
  function boundboxIntersects(bb1, bb2) {
6642
6855
  return !(bb1.left > bb2.right || bb1.right < bb2.left || bb1.top < bb2.bottom || bb1.bottom > bb2.top);
6643
6856
  }
6644
- exports.boundboxIntersects = boundboxIntersects;
6645
6857
  function boundboxContains(bb, x, y) {
6646
6858
  return !(bb.left >= x || bb.right < x || bb.top <= y || bb.bottom > y);
6647
6859
  }
6648
- exports.boundboxContains = boundboxContains;
6649
6860
 
6650
6861
 
6651
6862
  /***/ }),
@@ -6676,15 +6887,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
6676
6887
  }) : function(o, v) {
6677
6888
  o["default"] = v;
6678
6889
  });
6679
- var __importStar = (this && this.__importStar) || function (mod) {
6680
- if (mod && mod.__esModule) return mod;
6681
- var result = {};
6682
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6683
- __setModuleDefault(result, mod);
6684
- return result;
6685
- };
6890
+ var __importStar = (this && this.__importStar) || (function () {
6891
+ var ownKeys = function(o) {
6892
+ ownKeys = Object.getOwnPropertyNames || function (o) {
6893
+ var ar = [];
6894
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
6895
+ return ar;
6896
+ };
6897
+ return ownKeys(o);
6898
+ };
6899
+ return function (mod) {
6900
+ if (mod && mod.__esModule) return mod;
6901
+ var result = {};
6902
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
6903
+ __setModuleDefault(result, mod);
6904
+ return result;
6905
+ };
6906
+ })();
6686
6907
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6687
- exports.polyDiameterFlat = exports.polyPerimeterFlat = exports.polyAreaFlat = exports.polyParts = void 0;
6908
+ exports.polyParts = polyParts;
6909
+ exports.polyAreaFlat = polyAreaFlat;
6910
+ exports.polyPerimeterFlat = polyPerimeterFlat;
6911
+ exports.polyDiameterFlat = polyDiameterFlat;
6688
6912
  const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
6689
6913
  const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
6690
6914
  // HELPER
@@ -6713,7 +6937,6 @@ function polyParts(poly) {
6713
6937
  });
6714
6938
  return parts;
6715
6939
  }
6716
- exports.polyParts = polyParts;
6717
6940
  // CARTESIAN ("FLAT") AREA, PERIMETER, AND DIAMETER
6718
6941
  function polyAreaFlat(poly) {
6719
6942
  let pp = P.polyNormalize(poly);
@@ -6723,7 +6946,6 @@ function polyAreaFlat(poly) {
6723
6946
  });
6724
6947
  return a;
6725
6948
  }
6726
- exports.polyAreaFlat = polyAreaFlat;
6727
6949
  // Algorithm for the area of a simple/single planar polygon:
6728
6950
  // https://algorithmtutor.com/Computational-Geometry/Area-of-a-polygon-given-a-set-of-points/
6729
6951
  // https://mathopenref.com/coordpolygonarea2.html
@@ -6768,7 +6990,6 @@ function polyPerimeterFlat(poly) {
6768
6990
  });
6769
6991
  return perimeter;
6770
6992
  }
6771
- exports.polyPerimeterFlat = polyPerimeterFlat;
6772
6993
  function _distance(x1, y1, x2, y2) {
6773
6994
  const dLat = y2 - y1;
6774
6995
  const dLon = x2 - x1;
@@ -6782,7 +7003,6 @@ function polyDiameterFlat(poly) {
6782
7003
  let circle = P.polyToCircle(poly);
6783
7004
  return circle ? circle.r * 2 : 0;
6784
7005
  }
6785
- exports.polyDiameterFlat = polyDiameterFlat;
6786
7006
 
6787
7007
 
6788
7008
  /***/ }),
@@ -6795,7 +7015,7 @@ exports.polyDiameterFlat = polyDiameterFlat;
6795
7015
 
6796
7016
 
6797
7017
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6798
- exports.featureCleanHoles = void 0;
7018
+ exports.featureCleanHoles = featureCleanHoles;
6799
7019
  const union_1 = __webpack_require__(/*! ./union */ "./lib/poly/union.ts");
6800
7020
  const poly_1 = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
6801
7021
  function flattenMultiPoly(polys) {
@@ -6873,7 +7093,6 @@ function featureCleanHoles(f) {
6873
7093
  }
6874
7094
  return f;
6875
7095
  }
6876
- exports.featureCleanHoles = featureCleanHoles;
6877
7096
 
6878
7097
 
6879
7098
  /***/ }),
@@ -6909,15 +7128,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
6909
7128
  }) : function(o, v) {
6910
7129
  o["default"] = v;
6911
7130
  });
6912
- var __importStar = (this && this.__importStar) || function (mod) {
6913
- if (mod && mod.__esModule) return mod;
6914
- var result = {};
6915
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6916
- __setModuleDefault(result, mod);
6917
- return result;
6918
- };
7131
+ var __importStar = (this && this.__importStar) || (function () {
7132
+ var ownKeys = function(o) {
7133
+ ownKeys = Object.getOwnPropertyNames || function (o) {
7134
+ var ar = [];
7135
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
7136
+ return ar;
7137
+ };
7138
+ return ownKeys(o);
7139
+ };
7140
+ return function (mod) {
7141
+ if (mod && mod.__esModule) return mod;
7142
+ var result = {};
7143
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
7144
+ __setModuleDefault(result, mod);
7145
+ return result;
7146
+ };
7147
+ })();
6919
7148
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6920
- exports.makeConvexHullGrahamScan = void 0;
7149
+ exports.makeConvexHullGrahamScan = makeConvexHullGrahamScan;
6921
7150
  const poly_1 = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
6922
7151
  const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
6923
7152
  function makeConvexHullGrahamScan(poly, options) {
@@ -6931,7 +7160,6 @@ function makeConvexHullGrahamScan(poly, options) {
6931
7160
  const ch = scanner.getHull();
6932
7161
  return [ch];
6933
7162
  }
6934
- exports.makeConvexHullGrahamScan = makeConvexHullGrahamScan;
6935
7163
  // NOTE - This finds the exterior points of a polygon in standard form and returns
6936
7164
  // it as an array if [x, y] points, in contrast to polyToExteriorPoints() which
6937
7165
  // uses the packed format and the poly.ts-private point form.
@@ -7280,15 +7508,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
7280
7508
  }) : function(o, v) {
7281
7509
  o["default"] = v;
7282
7510
  });
7283
- var __importStar = (this && this.__importStar) || function (mod) {
7284
- if (mod && mod.__esModule) return mod;
7285
- var result = {};
7286
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7287
- __setModuleDefault(result, mod);
7288
- return result;
7289
- };
7511
+ var __importStar = (this && this.__importStar) || (function () {
7512
+ var ownKeys = function(o) {
7513
+ ownKeys = Object.getOwnPropertyNames || function (o) {
7514
+ var ar = [];
7515
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
7516
+ return ar;
7517
+ };
7518
+ return ownKeys(o);
7519
+ };
7520
+ return function (mod) {
7521
+ if (mod && mod.__esModule) return mod;
7522
+ var result = {};
7523
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
7524
+ __setModuleDefault(result, mod);
7525
+ return result;
7526
+ };
7527
+ })();
7290
7528
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7291
- exports.polyMapTo = exports.polyMapToByCentroid = void 0;
7529
+ exports.polyMapToByCentroid = polyMapToByCentroid;
7530
+ exports.polyMapTo = polyMapTo;
7292
7531
  const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
7293
7532
  const PL = __importStar(__webpack_require__(/*! ./polylabel */ "./lib/poly/polylabel.ts"));
7294
7533
  const BB = __importStar(__webpack_require__(/*! ./boundbox */ "./lib/poly/boundbox.ts"));
@@ -7349,7 +7588,6 @@ function polyMapToByCentroid(districts, centroids) {
7349
7588
  });
7350
7589
  return map;
7351
7590
  }
7352
- exports.polyMapToByCentroid = polyMapToByCentroid;
7353
7591
  function polyMapTo(districts, blocks) {
7354
7592
  // Cache labelx, labely if necessary
7355
7593
  setLabels(blocks);
@@ -7359,7 +7597,6 @@ function polyMapTo(districts, blocks) {
7359
7597
  });
7360
7598
  return polyMapToByCentroid(districts, centroids);
7361
7599
  }
7362
- exports.polyMapTo = polyMapTo;
7363
7600
 
7364
7601
 
7365
7602
  /***/ }),
@@ -7375,17 +7612,30 @@ exports.polyMapTo = polyMapTo;
7375
7612
  // SOME BASIC MATRIX OPERATIONS FOR MBR
7376
7613
  //
7377
7614
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7378
- exports.dotProduct = exports.subset = exports.range = exports.index = exports.dotMultiply = exports.subtract = exports.column = exports.row = exports.concat = exports.max = exports.min = exports.apply = exports.transpose = exports.multiply = exports.matrix = void 0;
7379
- function matrix(a) {
7380
- return a;
7381
- }
7382
7615
  exports.matrix = matrix;
7383
- function multiply(a, b) {
7384
- protect((nRows(a) > 0), "In multiply, input matrix 'a' has no rows. ");
7385
- protect((nCols(a) > 0), "In multiply, input matrix 'a' has no columns. ");
7386
- protect((nRows(b) > 0), "In multiply, input matrix 'b' has no rows. ");
7387
- protect((nCols(b) > 0), "In multiply, input matrix 'b' has no columns. ");
7388
- const m = nRows(a);
7616
+ exports.multiply = multiply;
7617
+ exports.transpose = transpose;
7618
+ exports.apply = apply;
7619
+ exports.min = min;
7620
+ exports.max = max;
7621
+ exports.concat = concat;
7622
+ exports.row = row;
7623
+ exports.column = column;
7624
+ exports.subtract = subtract;
7625
+ exports.dotMultiply = dotMultiply;
7626
+ exports.index = index;
7627
+ exports.range = range;
7628
+ exports.subset = subset;
7629
+ exports.dotProduct = dotProduct;
7630
+ function matrix(a) {
7631
+ return a;
7632
+ }
7633
+ function multiply(a, b) {
7634
+ protect((nRows(a) > 0), "In multiply, input matrix 'a' has no rows. ");
7635
+ protect((nCols(a) > 0), "In multiply, input matrix 'a' has no columns. ");
7636
+ protect((nRows(b) > 0), "In multiply, input matrix 'b' has no rows. ");
7637
+ protect((nCols(b) > 0), "In multiply, input matrix 'b' has no columns. ");
7638
+ const m = nRows(a);
7389
7639
  const n = nCols(a);
7390
7640
  const p = nRows(b);
7391
7641
  const q = nCols(b);
@@ -7400,7 +7650,6 @@ function multiply(a, b) {
7400
7650
  }
7401
7651
  return c;
7402
7652
  }
7403
- exports.multiply = multiply;
7404
7653
  function transpose(a) {
7405
7654
  protect((nRows(a) > 0), "In transpose, input matrix has no rows. ");
7406
7655
  protect((nCols(a) > 0), "In transpose, input matrix has no columns. ");
@@ -7414,7 +7663,6 @@ function transpose(a) {
7414
7663
  }
7415
7664
  return b;
7416
7665
  }
7417
- exports.transpose = transpose;
7418
7666
  function apply(a, over, cb) {
7419
7667
  protect((nRows(a) > 0), "In apply, input matrix has no rows. ");
7420
7668
  protect((nCols(a) > 0), "In apply, input matrix has no columns. ");
@@ -7429,15 +7677,12 @@ function apply(a, over, cb) {
7429
7677
  }
7430
7678
  return result;
7431
7679
  }
7432
- exports.apply = apply;
7433
7680
  function min(v) {
7434
7681
  return Math.min(...v);
7435
7682
  }
7436
- exports.min = min;
7437
7683
  function max(v) {
7438
7684
  return Math.max(...v);
7439
7685
  }
7440
- exports.max = max;
7441
7686
  function concat(a, b, by) {
7442
7687
  protect((nRows(a) > 0), "In concat, input matrix 'a' has no rows. ");
7443
7688
  protect((nCols(a) > 0), "In concat, input matrix 'a' has no columns. ");
@@ -7469,14 +7714,12 @@ function concat(a, b, by) {
7469
7714
  }
7470
7715
  return c;
7471
7716
  }
7472
- exports.concat = concat;
7473
7717
  function row(a, i) {
7474
7718
  protect((nRows(a) > 0), "In row, input matrix has no rows. ");
7475
7719
  protect((nCols(a) > 0), "In row, input matrix has no columns. ");
7476
7720
  protect((i >= 0), "In row, invalid row index.");
7477
7721
  return a[i];
7478
7722
  }
7479
- exports.row = row;
7480
7723
  function column(a, j) {
7481
7724
  protect((nRows(a) > 0), "In column, input matrix has no rows. ");
7482
7725
  protect((nCols(a) > 0), "In column, input matrix has no columns. ");
@@ -7487,7 +7730,6 @@ function column(a, j) {
7487
7730
  }
7488
7731
  return v;
7489
7732
  }
7490
- exports.column = column;
7491
7733
  function subtract(a, b) {
7492
7734
  protect((a.length == b.length), "In subtract, the input vectors have different lengths.");
7493
7735
  let c = [];
@@ -7496,7 +7738,6 @@ function subtract(a, b) {
7496
7738
  }
7497
7739
  return c;
7498
7740
  }
7499
- exports.subtract = subtract;
7500
7741
  function dotMultiply(a, b) {
7501
7742
  protect((a.length > 0) && (a.length == b.length), "In dotMultiply, the vectors aren't the same length. ");
7502
7743
  let c = [];
@@ -7505,11 +7746,9 @@ function dotMultiply(a, b) {
7505
7746
  }
7506
7747
  return c;
7507
7748
  }
7508
- exports.dotMultiply = dotMultiply;
7509
7749
  function index(a, b) {
7510
7750
  return [a, b];
7511
7751
  }
7512
- exports.index = index;
7513
7752
  function range(start, end, includeEnd = false) {
7514
7753
  let r = [];
7515
7754
  end += includeEnd ? 1 : 0;
@@ -7518,7 +7757,6 @@ function range(start, end, includeEnd = false) {
7518
7757
  }
7519
7758
  return r;
7520
7759
  }
7521
- exports.range = range;
7522
7760
  function subset(a, select) {
7523
7761
  protect((nRows(a) > 0), "In subset, input matrix has no rows. ");
7524
7762
  protect((nCols(a) > 0), "In subset, input matrix has no columns. ");
@@ -7538,7 +7776,6 @@ function subset(a, select) {
7538
7776
  }
7539
7777
  return b;
7540
7778
  }
7541
- exports.subset = subset;
7542
7779
  // HELPERS
7543
7780
  function initialize(rows, cols) {
7544
7781
  protect(((rows > 0) || (cols > 0)), "In initialize, the # of rows or columns is not positive. ");
@@ -7551,7 +7788,6 @@ function dotProduct(a, b) {
7551
7788
  protect((a.length > 0) && (a.length == b.length), "In dotProduct, the vectors aren't the same length. ");
7552
7789
  return a.map((value, i) => value * b[i]).reduce((acc, val) => acc + val, 0);
7553
7790
  }
7554
- exports.dotProduct = dotProduct;
7555
7791
  ;
7556
7792
  function protect(condition, message) {
7557
7793
  if (!condition)
@@ -7587,15 +7823,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
7587
7823
  }) : function(o, v) {
7588
7824
  o["default"] = v;
7589
7825
  });
7590
- var __importStar = (this && this.__importStar) || function (mod) {
7591
- if (mod && mod.__esModule) return mod;
7592
- var result = {};
7593
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7594
- __setModuleDefault(result, mod);
7595
- return result;
7596
- };
7826
+ var __importStar = (this && this.__importStar) || (function () {
7827
+ var ownKeys = function(o) {
7828
+ ownKeys = Object.getOwnPropertyNames || function (o) {
7829
+ var ar = [];
7830
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
7831
+ return ar;
7832
+ };
7833
+ return ownKeys(o);
7834
+ };
7835
+ return function (mod) {
7836
+ if (mod && mod.__esModule) return mod;
7837
+ var result = {};
7838
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
7839
+ __setModuleDefault(result, mod);
7840
+ return result;
7841
+ };
7842
+ })();
7597
7843
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7598
- exports.minimumBoundingRectangle = void 0;
7844
+ exports.minimumBoundingRectangle = minimumBoundingRectangle;
7599
7845
  //
7600
7846
  // WHUBER'S ELEGANT, TRIG-FREE SOLUTION IN R
7601
7847
  //
@@ -7679,7 +7925,6 @@ function minimumBoundingRectangle(poly) {
7679
7925
  // Convert to standard polygon form
7680
7926
  return [points];
7681
7927
  }
7682
- exports.minimumBoundingRectangle = minimumBoundingRectangle;
7683
7928
  //
7684
7929
  // THIS RE-IMPLEMENTS THE R IN TYPESCRIPT, USING MATHJS FOR MATRIX OPERATIONS
7685
7930
  //
@@ -7802,15 +8047,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
7802
8047
  }) : function(o, v) {
7803
8048
  o["default"] = v;
7804
8049
  });
7805
- var __importStar = (this && this.__importStar) || function (mod) {
7806
- if (mod && mod.__esModule) return mod;
7807
- var result = {};
7808
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7809
- __setModuleDefault(result, mod);
7810
- return result;
7811
- };
8050
+ var __importStar = (this && this.__importStar) || (function () {
8051
+ var ownKeys = function(o) {
8052
+ ownKeys = Object.getOwnPropertyNames || function (o) {
8053
+ var ar = [];
8054
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
8055
+ return ar;
8056
+ };
8057
+ return ownKeys(o);
8058
+ };
8059
+ return function (mod) {
8060
+ if (mod && mod.__esModule) return mod;
8061
+ var result = {};
8062
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
8063
+ __setModuleDefault(result, mod);
8064
+ return result;
8065
+ };
8066
+ })();
7812
8067
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7813
- exports.polyContainsPoint = void 0;
8068
+ exports.polyContainsPoint = polyContainsPoint;
7814
8069
  const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
7815
8070
  function polyContainsPoint(poly, x, y) {
7816
8071
  let pp = PP.polyPack(poly);
@@ -7843,7 +8098,6 @@ function polyContainsPoint(poly, x, y) {
7843
8098
  bInside = true;
7844
8099
  return bInside;
7845
8100
  }
7846
- exports.polyContainsPoint = polyContainsPoint;
7847
8101
 
7848
8102
 
7849
8103
  /***/ }),
@@ -7871,15 +8125,45 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
7871
8125
  }) : function(o, v) {
7872
8126
  o["default"] = v;
7873
8127
  });
7874
- var __importStar = (this && this.__importStar) || function (mod) {
7875
- if (mod && mod.__esModule) return mod;
7876
- var result = {};
7877
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7878
- __setModuleDefault(result, mod);
7879
- return result;
7880
- };
8128
+ var __importStar = (this && this.__importStar) || (function () {
8129
+ var ownKeys = function(o) {
8130
+ ownKeys = Object.getOwnPropertyNames || function (o) {
8131
+ var ar = [];
8132
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
8133
+ return ar;
8134
+ };
8135
+ return ownKeys(o);
8136
+ };
8137
+ return function (mod) {
8138
+ if (mod && mod.__esModule) return mod;
8139
+ var result = {};
8140
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
8141
+ __setModuleDefault(result, mod);
8142
+ return result;
8143
+ };
8144
+ })();
7881
8145
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7882
- exports.polyBadCoordinates = exports.polyRewindRings = exports.featureRewind = exports.polyRingWindings = exports.polyTransform = exports.npoints = exports.polyDescribe = exports.polyCompactness = exports.makeConvexHullMonotoneChain2D = exports.polyConvexHull = exports.polyToExteriorPoints = exports.polyFromCircle = exports.polyToPolsbyPopperCircle = exports.polyToCircle = exports.Circle = exports.polyPerimeter = exports.polyDiameter = exports.polyArea = exports.polyNull = exports.polyNormalize = exports.polySimpleArea = exports.DefaultOptions = exports.EARTH_RADIUS = exports.DefaultTickOptions = void 0;
8146
+ exports.Circle = exports.DefaultOptions = exports.EARTH_RADIUS = exports.DefaultTickOptions = void 0;
8147
+ exports.polySimpleArea = polySimpleArea;
8148
+ exports.polyNormalize = polyNormalize;
8149
+ exports.polyNull = polyNull;
8150
+ exports.polyArea = polyArea;
8151
+ exports.polyDiameter = polyDiameter;
8152
+ exports.polyPerimeter = polyPerimeter;
8153
+ exports.polyToCircle = polyToCircle;
8154
+ exports.polyToPolsbyPopperCircle = polyToPolsbyPopperCircle;
8155
+ exports.polyFromCircle = polyFromCircle;
8156
+ exports.polyToExteriorPoints = polyToExteriorPoints;
8157
+ exports.polyConvexHull = polyConvexHull;
8158
+ exports.makeConvexHullMonotoneChain2D = makeConvexHullMonotoneChain2D;
8159
+ exports.polyCompactness = polyCompactness;
8160
+ exports.polyDescribe = polyDescribe;
8161
+ exports.npoints = npoints;
8162
+ exports.polyTransform = polyTransform;
8163
+ exports.polyRingWindings = polyRingWindings;
8164
+ exports.featureRewind = featureRewind;
8165
+ exports.polyRewindRings = polyRewindRings;
8166
+ exports.polyBadCoordinates = polyBadCoordinates;
7883
8167
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
7884
8168
  const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
7885
8169
  const graham_scan_1 = __webpack_require__(/*! ./graham-scan */ "./lib/poly/graham-scan.ts");
@@ -7933,18 +8217,15 @@ function polySimpleArea(b, iOffset, n) {
7933
8217
  }
7934
8218
  return Math.abs(total);
7935
8219
  }
7936
- exports.polySimpleArea = polySimpleArea;
7937
8220
  // Allow bare polygon coordinates array or GeoJSON feature.
7938
8221
  // Normalize to multipolygon points array.
7939
8222
  function polyNormalize(poly) {
7940
8223
  return PP.polyPack(poly);
7941
8224
  }
7942
- exports.polyNormalize = polyNormalize;
7943
8225
  function polyNull(poly) {
7944
8226
  let pp = PP.polyPack(poly);
7945
8227
  return pp == null || pp.length == 2;
7946
8228
  }
7947
- exports.polyNull = polyNull;
7948
8229
  // Area of geodesic polygon
7949
8230
  function polyArea(poly) {
7950
8231
  let pp = polyNormalize(poly);
@@ -7955,7 +8236,6 @@ function polyArea(poly) {
7955
8236
  });
7956
8237
  return a;
7957
8238
  }
7958
- exports.polyArea = polyArea;
7959
8239
  // NOTE - COMPACTNESS: Added the diameter of the geodesic polygon in meters
7960
8240
  function polyDiameter(poly, options) {
7961
8241
  if (options === undefined)
@@ -7970,7 +8250,6 @@ function polyDiameter(poly, options) {
7970
8250
  const diameter = Math.max(lonDistance, latDistance);
7971
8251
  return diameter;
7972
8252
  }
7973
- exports.polyDiameter = polyDiameter;
7974
8253
  // Return distance in meters given two lat/lon points
7975
8254
  function haversine(x1, y1, x2, y2, options) {
7976
8255
  let dLat = Util.deg2rad(y2 - y1);
@@ -8007,7 +8286,6 @@ function polyPerimeter(poly, options) {
8007
8286
  });
8008
8287
  return perimeter;
8009
8288
  }
8010
- exports.polyPerimeter = polyPerimeter;
8011
8289
  class Point {
8012
8290
  constructor(x, y) {
8013
8291
  this.x = x;
@@ -8031,7 +8309,6 @@ exports.Circle = Circle;
8031
8309
  function polyToCircle(poly) {
8032
8310
  return makeCircle(polyToExteriorPoints(poly));
8033
8311
  }
8034
- exports.polyToCircle = polyToCircle;
8035
8312
  //
8036
8313
  // Returns the circle whose perimeter is equal to the perimeter of the bounding perimeter
8037
8314
  // of the polygon. Use binary search to find an approximation.
@@ -8045,7 +8322,6 @@ function polyToPolsbyPopperCircle(poly, options) {
8045
8322
  c.r = (p / (2 * Math.PI)) / 111139;
8046
8323
  return c;
8047
8324
  }
8048
- exports.polyToPolsbyPopperCircle = polyToPolsbyPopperCircle;
8049
8325
  function makeCircle(points) {
8050
8326
  if (points == null)
8051
8327
  return null;
@@ -8208,7 +8484,6 @@ function polyFromCircle(c, nSegments) {
8208
8484
  // return multi-polygon
8209
8485
  return [[poly]];
8210
8486
  }
8211
- exports.polyFromCircle = polyFromCircle;
8212
8487
  // isLeft(): tests if a point is Left|On|Right of an infinite line.
8213
8488
  // Input: three points P0, P1, and P2
8214
8489
  // Return: >0 for P2 left of the line through P0 and P1
@@ -8236,7 +8511,6 @@ function polyToExteriorPoints(poly) {
8236
8511
  });
8237
8512
  return points.length > 0 ? points : null;
8238
8513
  }
8239
- exports.polyToExteriorPoints = polyToExteriorPoints;
8240
8514
  //
8241
8515
  // polyConvexHull() - Two algorithms:
8242
8516
  // * Gram Scan (default) - in graham-scan.ts
@@ -8247,7 +8521,6 @@ function polyConvexHull(poly, altAlgorithm) {
8247
8521
  return makeConvexHullMonotoneChain2D(poly);
8248
8522
  return (0, graham_scan_1.makeConvexHullGrahamScan)(poly);
8249
8523
  }
8250
- exports.polyConvexHull = polyConvexHull;
8251
8524
  function makeConvexHullMonotoneChain2D(poly) {
8252
8525
  // Normalize input
8253
8526
  let points = polyToExteriorPoints(poly);
@@ -8324,7 +8597,6 @@ function makeConvexHullMonotoneChain2D(poly) {
8324
8597
  H[++top] = points[minmin]; // push joining endpoint onto stack
8325
8598
  return pointsToPoly(H);
8326
8599
  }
8327
- exports.makeConvexHullMonotoneChain2D = makeConvexHullMonotoneChain2D;
8328
8600
  function polyCompactness(poly, options) {
8329
8601
  if (options === undefined)
8330
8602
  options = exports.DefaultOptions;
@@ -8346,7 +8618,6 @@ function polyCompactness(poly, options) {
8346
8618
  result.value = Math.trunc(((result.reock + result.polsby_popper) / 2) * 100);
8347
8619
  return result;
8348
8620
  }
8349
- exports.polyCompactness = polyCompactness;
8350
8621
  const EmptyPolyDescription = { npoly: 0, nhole: 0, npoint: 0 };
8351
8622
  function polyDescribe(poly) {
8352
8623
  let pp = polyNormalize(poly);
@@ -8360,12 +8631,10 @@ function polyDescribe(poly) {
8360
8631
  });
8361
8632
  return d;
8362
8633
  }
8363
- exports.polyDescribe = polyDescribe;
8364
8634
  function npoints(poly) {
8365
8635
  let d = polyDescribe(poly);
8366
8636
  return d.npoint;
8367
8637
  }
8368
- exports.npoints = npoints;
8369
8638
  //
8370
8639
  // polyTransform: transform each point. Called for all polygons and all rings.
8371
8640
  // point, by point. Returns a packed structure.
@@ -8383,7 +8652,6 @@ function polyTransform(poly, transformFn) {
8383
8652
  });
8384
8653
  return pp;
8385
8654
  }
8386
- exports.polyTransform = polyTransform;
8387
8655
  function identityTransform(pt) {
8388
8656
  return [pt[0], pt[1]];
8389
8657
  }
@@ -8443,7 +8711,6 @@ function polyRingWindings(poly) {
8443
8711
  });
8444
8712
  return windings;
8445
8713
  }
8446
- exports.polyRingWindings = polyRingWindings;
8447
8714
  function flattenMultiPoly(polys) {
8448
8715
  let c = [];
8449
8716
  polys.forEach((poly) => {
@@ -8495,7 +8762,6 @@ function featureRewind(f, options) {
8495
8762
  });
8496
8763
  return f;
8497
8764
  }
8498
- exports.featureRewind = featureRewind;
8499
8765
  //
8500
8766
  // polyRewindRings: Check the winding order of the polygon's ring. Rewind them,
8501
8767
  // if necessary. Return a packed polygon.
@@ -8542,7 +8808,6 @@ function polyRewindRings(pp, bLog = false) {
8542
8808
  });
8543
8809
  return pp;
8544
8810
  }
8545
- exports.polyRewindRings = polyRewindRings;
8546
8811
  //
8547
8812
  // To figure out which way a ring is wound:
8548
8813
  //
@@ -8576,7 +8841,6 @@ function polyBadCoordinates(f) {
8576
8841
  }
8577
8842
  return bad;
8578
8843
  }
8579
- exports.polyBadCoordinates = polyBadCoordinates;
8580
8844
 
8581
8845
 
8582
8846
  /***/ }),
@@ -8604,15 +8868,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
8604
8868
  }) : function(o, v) {
8605
8869
  o["default"] = v;
8606
8870
  });
8607
- var __importStar = (this && this.__importStar) || function (mod) {
8608
- if (mod && mod.__esModule) return mod;
8609
- var result = {};
8610
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
8611
- __setModuleDefault(result, mod);
8612
- return result;
8613
- };
8871
+ var __importStar = (this && this.__importStar) || (function () {
8872
+ var ownKeys = function(o) {
8873
+ ownKeys = Object.getOwnPropertyNames || function (o) {
8874
+ var ar = [];
8875
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
8876
+ return ar;
8877
+ };
8878
+ return ownKeys(o);
8879
+ };
8880
+ return function (mod) {
8881
+ if (mod && mod.__esModule) return mod;
8882
+ var result = {};
8883
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
8884
+ __setModuleDefault(result, mod);
8885
+ return result;
8886
+ };
8887
+ })();
8614
8888
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8615
- exports.topoFromBuffer = exports.topoToBuffer = exports.unpackCollection = exports.packCollection = void 0;
8889
+ exports.packCollection = packCollection;
8890
+ exports.unpackCollection = unpackCollection;
8891
+ exports.topoToBuffer = topoToBuffer;
8892
+ exports.topoFromBuffer = topoFromBuffer;
8616
8893
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
8617
8894
  const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
8618
8895
  const T = __importStar(__webpack_require__(/*! ./topo */ "./lib/poly/topo.ts"));
@@ -8693,7 +8970,6 @@ function packCollection(coder, col) {
8693
8970
  PP.featureUnpack(col);
8694
8971
  return ab;
8695
8972
  }
8696
- exports.packCollection = packCollection;
8697
8973
  function reverse(buf8, s, n) {
8698
8974
  let e = s + n - 1;
8699
8975
  while (s < e) {
@@ -8745,7 +9021,6 @@ function unpackCollection(coder, ab) {
8745
9021
  f.geometry.packed.buffer = buf64; });
8746
9022
  return col;
8747
9023
  }
8748
- exports.unpackCollection = unpackCollection;
8749
9024
  // Format of packed buffer:
8750
9025
  // [Size of JSON string] [4 bytes]
8751
9026
  // [Size of packedarcs] [4 bytes]
@@ -8794,7 +9069,6 @@ function topoToBuffer(coder, topo) {
8794
9069
  topo.packed = savepack;
8795
9070
  return ab;
8796
9071
  }
8797
- exports.topoToBuffer = topoToBuffer;
8798
9072
  function topoFromBuffer(coder, ab) {
8799
9073
  let buf8 = new Uint8Array(ab);
8800
9074
  let buf32 = new Int32Array(ab);
@@ -8808,7 +9082,6 @@ function topoFromBuffer(coder, ab) {
8808
9082
  topo.packed.arcindices = new Int32Array(ab, stringLength + HeaderSize + arcsByteLength, arcindicesByteLength / 4);
8809
9083
  return topo;
8810
9084
  }
8811
- exports.topoFromBuffer = topoFromBuffer;
8812
9085
 
8813
9086
 
8814
9087
  /***/ }),
@@ -8836,18 +9109,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
8836
9109
  }) : function(o, v) {
8837
9110
  o["default"] = v;
8838
9111
  });
8839
- var __importStar = (this && this.__importStar) || function (mod) {
8840
- if (mod && mod.__esModule) return mod;
8841
- var result = {};
8842
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
8843
- __setModuleDefault(result, mod);
8844
- return result;
8845
- };
9112
+ var __importStar = (this && this.__importStar) || (function () {
9113
+ var ownKeys = function(o) {
9114
+ ownKeys = Object.getOwnPropertyNames || function (o) {
9115
+ var ar = [];
9116
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
9117
+ return ar;
9118
+ };
9119
+ return ownKeys(o);
9120
+ };
9121
+ return function (mod) {
9122
+ if (mod && mod.__esModule) return mod;
9123
+ var result = {};
9124
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
9125
+ __setModuleDefault(result, mod);
9126
+ return result;
9127
+ };
9128
+ })();
8846
9129
  var __importDefault = (this && this.__importDefault) || function (mod) {
8847
9130
  return (mod && mod.__esModule) ? mod : { "default": mod };
8848
9131
  };
8849
9132
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8850
- exports.polyLabel = exports.polyDistance = void 0;
9133
+ exports.polyDistance = polyDistance;
9134
+ exports.polyLabel = polyLabel;
8851
9135
  const tinyqueue_1 = __importDefault(__webpack_require__(/*! tinyqueue */ "tinyqueue"));
8852
9136
  const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
8853
9137
  const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
@@ -8922,7 +9206,6 @@ function polyDistance(poly, x, y) {
8922
9206
  });
8923
9207
  return minInside;
8924
9208
  }
8925
- exports.polyDistance = polyDistance;
8926
9209
  //
8927
9210
  // polyLabel: given polygon, return contained point furthest from any edge, and that distance
8928
9211
  //
@@ -9020,7 +9303,6 @@ function polyLabel(poly, precision, debug) {
9020
9303
  }
9021
9304
  return { x: bestCell.x, y: bestCell.y, d: bestCell.d };
9022
9305
  }
9023
- exports.polyLabel = polyLabel;
9024
9306
  function compareMax(a, b) { return b.max - a.max; }
9025
9307
  class Cell {
9026
9308
  constructor(x, y, h, forEachPointPair) {
@@ -9107,15 +9389,45 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
9107
9389
  }) : function(o, v) {
9108
9390
  o["default"] = v;
9109
9391
  });
9110
- var __importStar = (this && this.__importStar) || function (mod) {
9111
- if (mod && mod.__esModule) return mod;
9112
- var result = {};
9113
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
9114
- __setModuleDefault(result, mod);
9115
- return result;
9116
- };
9392
+ var __importStar = (this && this.__importStar) || (function () {
9393
+ var ownKeys = function(o) {
9394
+ ownKeys = Object.getOwnPropertyNames || function (o) {
9395
+ var ar = [];
9396
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
9397
+ return ar;
9398
+ };
9399
+ return ownKeys(o);
9400
+ };
9401
+ return function (mod) {
9402
+ if (mod && mod.__esModule) return mod;
9403
+ var result = {};
9404
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
9405
+ __setModuleDefault(result, mod);
9406
+ return result;
9407
+ };
9408
+ })();
9117
9409
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9118
- exports.featureUnpackString = exports.featurePackString = exports.featureRepack = exports.featureUnpackTemporarily = exports.featureUnpack = exports.featurePack = exports.featurePackSize = exports.polyUnpack = exports.polyPackCopy = exports.polyPack = exports.polyPackTopoArcs = exports.countArcPoints = exports.countOneArcPoints = exports.countArcRings = exports.countArcPolygons = exports.normalizeArcs = exports.polyPacked = exports.polyPackCountPoints = exports.polyPackEachPoint = exports.polyPackEachRing = exports.polyPackSize = void 0;
9410
+ exports.polyPackSize = polyPackSize;
9411
+ exports.polyPackEachRing = polyPackEachRing;
9412
+ exports.polyPackEachPoint = polyPackEachPoint;
9413
+ exports.polyPackCountPoints = polyPackCountPoints;
9414
+ exports.polyPacked = polyPacked;
9415
+ exports.normalizeArcs = normalizeArcs;
9416
+ exports.countArcPolygons = countArcPolygons;
9417
+ exports.countArcRings = countArcRings;
9418
+ exports.countOneArcPoints = countOneArcPoints;
9419
+ exports.countArcPoints = countArcPoints;
9420
+ exports.polyPackTopoArcs = polyPackTopoArcs;
9421
+ exports.polyPack = polyPack;
9422
+ exports.polyPackCopy = polyPackCopy;
9423
+ exports.polyUnpack = polyUnpack;
9424
+ exports.featurePackSize = featurePackSize;
9425
+ exports.featurePack = featurePack;
9426
+ exports.featureUnpack = featureUnpack;
9427
+ exports.featureUnpackTemporarily = featureUnpackTemporarily;
9428
+ exports.featureRepack = featureRepack;
9429
+ exports.featurePackString = featurePackString;
9430
+ exports.featureUnpackString = featureUnpackString;
9119
9431
  // Shared libraries
9120
9432
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
9121
9433
  function polyPackSize(coords) {
@@ -9143,7 +9455,6 @@ function polyPackSize(coords) {
9143
9455
  }
9144
9456
  return nFloats;
9145
9457
  }
9146
- exports.polyPackSize = polyPackSize;
9147
9458
  function polyPackEachRing(pack, cb) {
9148
9459
  if (pack == null || pack.buffer == null)
9149
9460
  return;
@@ -9168,7 +9479,6 @@ function polyPackEachRing(pack, cb) {
9168
9479
  }
9169
9480
  }
9170
9481
  }
9171
- exports.polyPackEachRing = polyPackEachRing;
9172
9482
  function polyPackEachPoint(pack, cb) {
9173
9483
  polyPackEachRing(pack, (b, iPoly, iRing, iOffset, nPoints) => {
9174
9484
  let iEnd = iOffset + (nPoints * 2);
@@ -9176,13 +9486,11 @@ function polyPackEachPoint(pack, cb) {
9176
9486
  cb(b, iPoly, iRing, iOffset);
9177
9487
  });
9178
9488
  }
9179
- exports.polyPackEachPoint = polyPackEachPoint;
9180
9489
  function polyPackCountPoints(pack) {
9181
9490
  let n = 0;
9182
9491
  polyPackEachRing(pack, (b, iPoly, iRing, iOffset, nPoints) => { n += nPoints; });
9183
9492
  return n;
9184
9493
  }
9185
- exports.polyPackCountPoints = polyPackCountPoints;
9186
9494
  function polyPacked(f) {
9187
9495
  if (f == null)
9188
9496
  return false;
@@ -9194,7 +9502,6 @@ function polyPacked(f) {
9194
9502
  return polyPacked(f.features[0]);
9195
9503
  return false;
9196
9504
  }
9197
- exports.polyPacked = polyPacked;
9198
9505
  // Convert to multi-polygon format if necessary
9199
9506
  function normalizeArcs(arcs) {
9200
9507
  let d = Util.depthof(arcs);
@@ -9203,12 +9510,10 @@ function normalizeArcs(arcs) {
9203
9510
  } // note that depth is n-1 compared to coords because leaf is just number, not [x,y]
9204
9511
  return arcs;
9205
9512
  }
9206
- exports.normalizeArcs = normalizeArcs;
9207
9513
  function countArcPolygons(arcs) {
9208
9514
  arcs = normalizeArcs(arcs);
9209
9515
  return arcs.length;
9210
9516
  }
9211
- exports.countArcPolygons = countArcPolygons;
9212
9517
  function countArcRings(arcs, iPoly) {
9213
9518
  arcs = normalizeArcs(arcs);
9214
9519
  let r = 0;
@@ -9216,7 +9521,6 @@ function countArcRings(arcs, iPoly) {
9216
9521
  r += a.length; });
9217
9522
  return r;
9218
9523
  }
9219
- exports.countArcRings = countArcRings;
9220
9524
  function countOneArcPoints(topo, ring) {
9221
9525
  // for each ring
9222
9526
  let n = 0;
@@ -9231,7 +9535,6 @@ function countOneArcPoints(topo, ring) {
9231
9535
  n = 4;
9232
9536
  return n;
9233
9537
  }
9234
- exports.countOneArcPoints = countOneArcPoints;
9235
9538
  function countArcPoints(topo, arcs, iPoly) {
9236
9539
  arcs = normalizeArcs(arcs);
9237
9540
  let npoints = 0;
@@ -9241,7 +9544,6 @@ function countArcPoints(topo, arcs, iPoly) {
9241
9544
  });
9242
9545
  return npoints;
9243
9546
  }
9244
- exports.countArcPoints = countArcPoints;
9245
9547
  // This packs the TopoJSON arc format into a PolyPack. Basics:
9246
9548
  // 1) Negative indices indicate arc should be traversed backward.
9247
9549
  // 2) First and last point of sequential arcs are duplicated, so only include one instance. Easiest way
@@ -9303,7 +9605,6 @@ function polyPackTopoArcs(topo, arcs, iPoly) {
9303
9605
  });
9304
9606
  return prepack;
9305
9607
  }
9306
- exports.polyPackTopoArcs = polyPackTopoArcs;
9307
9608
  function polyPack(coords, prepack) {
9308
9609
  // Null feature?
9309
9610
  if (coords == null || (coords.length !== undefined && coords.length == 0))
@@ -9368,7 +9669,6 @@ function polyPack(coords, prepack) {
9368
9669
  }
9369
9670
  return prepack;
9370
9671
  }
9371
- exports.polyPack = polyPack;
9372
9672
  function polyPackCopy(coords) {
9373
9673
  let pp = polyPack(coords);
9374
9674
  if (pp == null)
@@ -9382,7 +9682,6 @@ function polyPackCopy(coords) {
9382
9682
  afDst[i] = afSrc[i + pp.offset];
9383
9683
  return copy;
9384
9684
  }
9385
- exports.polyPackCopy = polyPackCopy;
9386
9685
  function polyUnpack(prepack) {
9387
9686
  // Check if not packed
9388
9687
  if (prepack == null)
@@ -9411,13 +9710,11 @@ function polyUnpack(prepack) {
9411
9710
  }
9412
9711
  return coords.length > 1 ? coords : coords[0];
9413
9712
  }
9414
- exports.polyUnpack = polyUnpack;
9415
9713
  function featurePackSize(f) {
9416
9714
  if (f && f.geometry && f.geometry.coordinates && f.geometry.type !== 'Point')
9417
9715
  return polyPackSize(f.geometry.coordinates);
9418
9716
  return 0;
9419
9717
  }
9420
- exports.featurePackSize = featurePackSize;
9421
9718
  function featurePack(f, prepack) {
9422
9719
  if (f && f.type === 'Feature') {
9423
9720
  if (f.geometry && f.geometry.type === 'Point')
@@ -9468,7 +9765,6 @@ function featurePack(f, prepack) {
9468
9765
  }
9469
9766
  return null;
9470
9767
  }
9471
- exports.featurePack = featurePack;
9472
9768
  function featureUnpack(f) {
9473
9769
  if (f && f.geometry && f.geometry.packed !== undefined) {
9474
9770
  f.geometry.coordinates = polyUnpack(f.geometry.packed);
@@ -9490,7 +9786,6 @@ function featureUnpack(f) {
9490
9786
  }
9491
9787
  return f;
9492
9788
  }
9493
- exports.featureUnpack = featureUnpack;
9494
9789
  function featureUnpackTemporarily(f, save) {
9495
9790
  if (save === undefined)
9496
9791
  save = new WeakMap();
@@ -9509,7 +9804,6 @@ function featureUnpackTemporarily(f, save) {
9509
9804
  }
9510
9805
  return save;
9511
9806
  }
9512
- exports.featureUnpackTemporarily = featureUnpackTemporarily;
9513
9807
  function featureRepack(f, save) {
9514
9808
  if (f && f.type === 'Feature') {
9515
9809
  if (f.geometry) {
@@ -9525,7 +9819,6 @@ function featureRepack(f, save) {
9525
9819
  }
9526
9820
  return f;
9527
9821
  }
9528
- exports.featureRepack = featureRepack;
9529
9822
  function featurePackString(f) {
9530
9823
  let packed = f.offset ? f : (f.geometry.packed ? f.geometry.packed : polyPack(f.geometry.coordinates));
9531
9824
  let af = packed.buffer;
@@ -9534,7 +9827,6 @@ function featurePackString(f) {
9534
9827
  a.push(String(af[i]));
9535
9828
  return a.join(' ');
9536
9829
  }
9537
- exports.featurePackString = featurePackString;
9538
9830
  function featureUnpackString(s) {
9539
9831
  let a = s.split(' ');
9540
9832
  let ab = new ArrayBuffer(a.length * 8);
@@ -9547,7 +9839,6 @@ function featureUnpackString(s) {
9547
9839
  f.geometry.type = 'MultiPolygon';
9548
9840
  return f;
9549
9841
  }
9550
- exports.featureUnpackString = featureUnpackString;
9551
9842
 
9552
9843
 
9553
9844
  /***/ }),
@@ -9575,15 +9866,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
9575
9866
  }) : function(o, v) {
9576
9867
  o["default"] = v;
9577
9868
  });
9578
- var __importStar = (this && this.__importStar) || function (mod) {
9579
- if (mod && mod.__esModule) return mod;
9580
- var result = {};
9581
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
9582
- __setModuleDefault(result, mod);
9583
- return result;
9584
- };
9869
+ var __importStar = (this && this.__importStar) || (function () {
9870
+ var ownKeys = function(o) {
9871
+ ownKeys = Object.getOwnPropertyNames || function (o) {
9872
+ var ar = [];
9873
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
9874
+ return ar;
9875
+ };
9876
+ return ownKeys(o);
9877
+ };
9878
+ return function (mod) {
9879
+ if (mod && mod.__esModule) return mod;
9880
+ var result = {};
9881
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
9882
+ __setModuleDefault(result, mod);
9883
+ return result;
9884
+ };
9885
+ })();
9585
9886
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9586
- exports.polyRound = void 0;
9887
+ exports.polyRound = polyRound;
9587
9888
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
9588
9889
  const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
9589
9890
  // Round feature geometry to 6 decimal precision
@@ -9609,7 +9910,6 @@ function polyRound(o) {
9609
9910
  }
9610
9911
  return o;
9611
9912
  }
9612
- exports.polyRound = polyRound;
9613
9913
 
9614
9914
 
9615
9915
  /***/ }),
@@ -9637,15 +9937,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
9637
9937
  }) : function(o, v) {
9638
9938
  o["default"] = v;
9639
9939
  });
9640
- var __importStar = (this && this.__importStar) || function (mod) {
9641
- if (mod && mod.__esModule) return mod;
9642
- var result = {};
9643
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
9644
- __setModuleDefault(result, mod);
9645
- return result;
9646
- };
9940
+ var __importStar = (this && this.__importStar) || (function () {
9941
+ var ownKeys = function(o) {
9942
+ ownKeys = Object.getOwnPropertyNames || function (o) {
9943
+ var ar = [];
9944
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
9945
+ return ar;
9946
+ };
9947
+ return ownKeys(o);
9948
+ };
9949
+ return function (mod) {
9950
+ if (mod && mod.__esModule) return mod;
9951
+ var result = {};
9952
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
9953
+ __setModuleDefault(result, mod);
9954
+ return result;
9955
+ };
9956
+ })();
9647
9957
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9648
- exports.polySimplify = void 0;
9958
+ exports.polySimplify = polySimplify;
9649
9959
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
9650
9960
  const simplify_1 = __webpack_require__(/*! ./simplify */ "./lib/poly/simplify.ts");
9651
9961
  function polySimplify(poly, tolerance = 0.0001) {
@@ -9666,7 +9976,6 @@ function polySimplify(poly, tolerance = 0.0001) {
9666
9976
  p[j] = (0, simplify_1.simplify)(p[j], tolerance, true);
9667
9977
  }
9668
9978
  }
9669
- exports.polySimplify = polySimplify;
9670
9979
 
9671
9980
 
9672
9981
  /***/ }),
@@ -9694,15 +10003,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
9694
10003
  }) : function(o, v) {
9695
10004
  o["default"] = v;
9696
10005
  });
9697
- var __importStar = (this && this.__importStar) || function (mod) {
9698
- if (mod && mod.__esModule) return mod;
9699
- var result = {};
9700
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
9701
- __setModuleDefault(result, mod);
9702
- return result;
9703
- };
10006
+ var __importStar = (this && this.__importStar) || (function () {
10007
+ var ownKeys = function(o) {
10008
+ ownKeys = Object.getOwnPropertyNames || function (o) {
10009
+ var ar = [];
10010
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
10011
+ return ar;
10012
+ };
10013
+ return ownKeys(o);
10014
+ };
10015
+ return function (mod) {
10016
+ if (mod && mod.__esModule) return mod;
10017
+ var result = {};
10018
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
10019
+ __setModuleDefault(result, mod);
10020
+ return result;
10021
+ };
10022
+ })();
9704
10023
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9705
- exports.FsmQuadTree = exports.DefaultQuadOptions = exports.unionPolys = void 0;
10024
+ exports.FsmQuadTree = exports.DefaultQuadOptions = void 0;
10025
+ exports.unionPolys = unionPolys;
9706
10026
  // Public libraries
9707
10027
  const PC = __importStar(__webpack_require__(/*! polygon-clipping */ "polygon-clipping"));
9708
10028
  // Shared libraries
@@ -9748,7 +10068,6 @@ function unionPolys(polys) {
9748
10068
  let poly = cleanPolys.pop();
9749
10069
  return PR.polyRound(_union(poly, ...cleanPolys));
9750
10070
  }
9751
- exports.unionPolys = unionPolys;
9752
10071
  exports.DefaultQuadOptions = { maxLeafCount: 20, maxDepth: 20, tickStep: 1 };
9753
10072
  ;
9754
10073
  // Use geo orientation for t/b (that is, t > b)
@@ -9930,15 +10249,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
9930
10249
  }) : function(o, v) {
9931
10250
  o["default"] = v;
9932
10251
  });
9933
- var __importStar = (this && this.__importStar) || function (mod) {
9934
- if (mod && mod.__esModule) return mod;
9935
- var result = {};
9936
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
9937
- __setModuleDefault(result, mod);
9938
- return result;
9939
- };
10252
+ var __importStar = (this && this.__importStar) || (function () {
10253
+ var ownKeys = function(o) {
10254
+ ownKeys = Object.getOwnPropertyNames || function (o) {
10255
+ var ar = [];
10256
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
10257
+ return ar;
10258
+ };
10259
+ return ownKeys(o);
10260
+ };
10261
+ return function (mod) {
10262
+ if (mod && mod.__esModule) return mod;
10263
+ var result = {};
10264
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
10265
+ __setModuleDefault(result, mod);
10266
+ return result;
10267
+ };
10268
+ })();
9940
10269
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9941
- exports.selfIntersect = void 0;
10270
+ exports.selfIntersect = selfIntersect;
9942
10271
  const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
9943
10272
  const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
9944
10273
  // Given three colinear points p, q, r, the function checks if
@@ -10013,7 +10342,6 @@ function selfIntersect(poly) {
10013
10342
  });
10014
10343
  return bIntersect;
10015
10344
  }
10016
- exports.selfIntersect = selfIntersect;
10017
10345
 
10018
10346
 
10019
10347
  /***/ }),
@@ -10041,18 +10369,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
10041
10369
  }) : function(o, v) {
10042
10370
  o["default"] = v;
10043
10371
  });
10044
- var __importStar = (this && this.__importStar) || function (mod) {
10045
- if (mod && mod.__esModule) return mod;
10046
- var result = {};
10047
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
10048
- __setModuleDefault(result, mod);
10049
- return result;
10050
- };
10372
+ var __importStar = (this && this.__importStar) || (function () {
10373
+ var ownKeys = function(o) {
10374
+ ownKeys = Object.getOwnPropertyNames || function (o) {
10375
+ var ar = [];
10376
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
10377
+ return ar;
10378
+ };
10379
+ return ownKeys(o);
10380
+ };
10381
+ return function (mod) {
10382
+ if (mod && mod.__esModule) return mod;
10383
+ var result = {};
10384
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
10385
+ __setModuleDefault(result, mod);
10386
+ return result;
10387
+ };
10388
+ })();
10051
10389
  var __importDefault = (this && this.__importDefault) || function (mod) {
10052
10390
  return (mod && mod.__esModule) ? mod : { "default": mod };
10053
10391
  };
10054
10392
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10055
- exports.selfIntersectFast = void 0;
10393
+ exports.selfIntersectFast = selfIntersectFast;
10056
10394
  const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
10057
10395
  const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
10058
10396
  // Adapted from rowanwins/shamos-hoey
@@ -10277,7 +10615,6 @@ function selfIntersectFast(poly) {
10277
10615
  });
10278
10616
  return runCheck(eventQueue);
10279
10617
  }
10280
- exports.selfIntersectFast = selfIntersectFast;
10281
10618
 
10282
10619
 
10283
10620
  /***/ }),
@@ -10296,7 +10633,7 @@ exports.selfIntersectFast = selfIntersectFast;
10296
10633
  mourner.github.io/simplify-js
10297
10634
  */
10298
10635
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10299
- exports.simplify = void 0;
10636
+ exports.simplify = simplify;
10300
10637
  // square distance between 2 points
10301
10638
  function getSqDist(p1, p2) {
10302
10639
  var dx = p1[0] - p2[0], dy = p1[1] - p2[1];
@@ -10369,7 +10706,6 @@ function simplify(points, tolerance = 1, highestQuality = false) {
10369
10706
  points = simplifyDouglasPeucker(points, sqTolerance);
10370
10707
  return points;
10371
10708
  }
10372
- exports.simplify = simplify;
10373
10709
 
10374
10710
 
10375
10711
  /***/ }),
@@ -10397,15 +10733,36 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
10397
10733
  }) : function(o, v) {
10398
10734
  o["default"] = v;
10399
10735
  });
10400
- var __importStar = (this && this.__importStar) || function (mod) {
10401
- if (mod && mod.__esModule) return mod;
10402
- var result = {};
10403
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
10404
- __setModuleDefault(result, mod);
10405
- return result;
10406
- };
10736
+ var __importStar = (this && this.__importStar) || (function () {
10737
+ var ownKeys = function(o) {
10738
+ ownKeys = Object.getOwnPropertyNames || function (o) {
10739
+ var ar = [];
10740
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
10741
+ return ar;
10742
+ };
10743
+ return ownKeys(o);
10744
+ };
10745
+ return function (mod) {
10746
+ if (mod && mod.__esModule) return mod;
10747
+ var result = {};
10748
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
10749
+ __setModuleDefault(result, mod);
10750
+ return result;
10751
+ };
10752
+ })();
10407
10753
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10408
- exports.topoUnpack = exports.topoPack = exports.topoPacked = exports.FsmTopoUnion = exports.topoMergeFeatures = exports.topoMerge = exports.topoSimplifyCollection = exports.topoToCollection = exports.topoSplice = exports.topoToFeature = exports.topoContiguity = exports.topoFromCollection = void 0;
10754
+ exports.FsmTopoUnion = void 0;
10755
+ exports.topoFromCollection = topoFromCollection;
10756
+ exports.topoContiguity = topoContiguity;
10757
+ exports.topoToFeature = topoToFeature;
10758
+ exports.topoSplice = topoSplice;
10759
+ exports.topoToCollection = topoToCollection;
10760
+ exports.topoSimplifyCollection = topoSimplifyCollection;
10761
+ exports.topoMerge = topoMerge;
10762
+ exports.topoMergeFeatures = topoMergeFeatures;
10763
+ exports.topoPacked = topoPacked;
10764
+ exports.topoPack = topoPack;
10765
+ exports.topoUnpack = topoUnpack;
10409
10766
  // Forked version that supports packing
10410
10767
  const TopoClient = __importStar(__webpack_require__(/*! @dra2020/topojson-client */ "@dra2020/topojson-client"));
10411
10768
  // Forked version that fixes self-looping hole problem
@@ -10450,7 +10807,6 @@ function topoFromCollection(col) {
10450
10807
  topo.datasets = col.datasets;
10451
10808
  return topo;
10452
10809
  }
10453
- exports.topoFromCollection = topoFromCollection;
10454
10810
  function ringsCancel(outerPoly, innerRing) {
10455
10811
  if (outerPoly.length != 1)
10456
10812
  return false;
@@ -10486,17 +10842,14 @@ function topoContiguity(topo) {
10486
10842
  });
10487
10843
  return result;
10488
10844
  }
10489
- exports.topoContiguity = topoContiguity;
10490
10845
  function topoToFeature(topo, geoid) {
10491
10846
  return correctGeometry(TopoClient.feature(topo, topo.objects[geoid]));
10492
10847
  }
10493
- exports.topoToFeature = topoToFeature;
10494
10848
  function topoSplice(topoarray) {
10495
10849
  if (topoarray)
10496
10850
  topoarray.forEach(e => topoPack(e.topology));
10497
10851
  return TopoClient.splice(topoarray);
10498
10852
  }
10499
- exports.topoSplice = topoSplice;
10500
10853
  function topoToCollection(topo) {
10501
10854
  let col = { type: 'FeatureCollection', features: [] };
10502
10855
  if (topo)
@@ -10507,7 +10860,6 @@ function topoToCollection(topo) {
10507
10860
  col.datasets = topo.datasets;
10508
10861
  return col;
10509
10862
  }
10510
- exports.topoToCollection = topoToCollection;
10511
10863
  function keepArcs(topo, arcs, keepweight) {
10512
10864
  arcs.forEach((a) => {
10513
10865
  if (Array.isArray(a))
@@ -10698,7 +11050,6 @@ function topoSimplifyCollection(col, options) {
10698
11050
  log(options.log, `topoSimplifyCollection: total elapsed time: ${bigTimeString(elapsedTotal.ms())}`);
10699
11051
  return col;
10700
11052
  }
10701
- exports.topoSimplifyCollection = topoSimplifyCollection;
10702
11053
  function topoMerge(topo, geoids) {
10703
11054
  if (geoids == null || geoids.length == 0)
10704
11055
  return null;
@@ -10706,14 +11057,12 @@ function topoMerge(topo, geoids) {
10706
11057
  geoids.forEach((geoid) => objects.push(topo.objects[geoid]));
10707
11058
  return correctGeometry({ type: 'Feature', properties: {}, geometry: TopoClient.merge(topo, objects) });
10708
11059
  }
10709
- exports.topoMerge = topoMerge;
10710
11060
  function topoMergeFeatures(topo, features) {
10711
11061
  if (features == null || features.length == 0)
10712
11062
  return null;
10713
11063
  let prop = getGEOID(features);
10714
11064
  return topoMerge(topo, features.map(f => f.properties[prop]));
10715
11065
  }
10716
- exports.topoMergeFeatures = topoMergeFeatures;
10717
11066
  let UniqueState = FSM.FSM_CUSTOM1;
10718
11067
  let FSM_COMPUTING = UniqueState++;
10719
11068
  class FsmIncrementalUnion extends FSM.Fsm {
@@ -10821,20 +11170,17 @@ exports.FsmTopoUnion = FsmTopoUnion;
10821
11170
  function topoPacked(topo) {
10822
11171
  return topo.packed !== undefined;
10823
11172
  }
10824
- exports.topoPacked = topoPacked;
10825
11173
  function topoPack(topo) {
10826
11174
  let tc = TopoClient;
10827
11175
  TopoClient.packArcs(topo);
10828
11176
  TopoClient.packArcIndices(topo);
10829
11177
  return topo;
10830
11178
  }
10831
- exports.topoPack = topoPack;
10832
11179
  function topoUnpack(topo) {
10833
11180
  TopoClient.unpackArcs(topo);
10834
11181
  TopoClient.unpackArcIndices(topo);
10835
11182
  return topo;
10836
11183
  }
10837
- exports.topoUnpack = topoUnpack;
10838
11184
 
10839
11185
 
10840
11186
  /***/ }),
@@ -10862,15 +11208,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
10862
11208
  }) : function(o, v) {
10863
11209
  o["default"] = v;
10864
11210
  });
10865
- var __importStar = (this && this.__importStar) || function (mod) {
10866
- if (mod && mod.__esModule) return mod;
10867
- var result = {};
10868
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
10869
- __setModuleDefault(result, mod);
10870
- return result;
10871
- };
11211
+ var __importStar = (this && this.__importStar) || (function () {
11212
+ var ownKeys = function(o) {
11213
+ ownKeys = Object.getOwnPropertyNames || function (o) {
11214
+ var ar = [];
11215
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
11216
+ return ar;
11217
+ };
11218
+ return ownKeys(o);
11219
+ };
11220
+ return function (mod) {
11221
+ if (mod && mod.__esModule) return mod;
11222
+ var result = {};
11223
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
11224
+ __setModuleDefault(result, mod);
11225
+ return result;
11226
+ };
11227
+ })();
10872
11228
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10873
- exports.FsmUnion = exports.polyDifference = exports.polyIntersectArea = exports.polyIntersects = void 0;
11229
+ exports.FsmUnion = void 0;
11230
+ exports.polyIntersects = polyIntersects;
11231
+ exports.polyIntersectArea = polyIntersectArea;
11232
+ exports.polyDifference = polyDifference;
10874
11233
  const PC = __importStar(__webpack_require__(/*! polygon-clipping */ "polygon-clipping"));
10875
11234
  const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
10876
11235
  const FSM = __importStar(__webpack_require__(/*! ../fsm/all */ "./lib/fsm/all.ts"));
@@ -10928,7 +11287,6 @@ function polyIntersects(p1, p2) {
10928
11287
  });
10929
11288
  return bIntersects;
10930
11289
  }
10931
- exports.polyIntersects = polyIntersects;
10932
11290
  function polyIntersectArea(p1, p2) {
10933
11291
  let pp1 = Poly.polyNormalize(p1);
10934
11292
  let pp2 = Poly.polyNormalize(p2);
@@ -10944,7 +11302,6 @@ function polyIntersectArea(p1, p2) {
10944
11302
  });
10945
11303
  return area;
10946
11304
  }
10947
- exports.polyIntersectArea = polyIntersectArea;
10948
11305
  function polyDifference(main, parts) {
10949
11306
  main = PP.polyUnpack(coords(main));
10950
11307
  // need to explode multipolygon so that "exploded" is a valid multipolygon input to underlying difference routine
@@ -10958,7 +11315,6 @@ function polyDifference(main, parts) {
10958
11315
  });
10959
11316
  return PR.polyRound(_difference(main, exploded));
10960
11317
  }
10961
- exports.polyDifference = polyDifference;
10962
11318
  class FsmDifference extends FSM.Fsm {
10963
11319
  constructor(env, accum, polys) {
10964
11320
  super(env);
@@ -11245,15 +11601,27 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
11245
11601
  }) : function(o, v) {
11246
11602
  o["default"] = v;
11247
11603
  });
11248
- var __importStar = (this && this.__importStar) || function (mod) {
11249
- if (mod && mod.__esModule) return mod;
11250
- var result = {};
11251
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
11252
- __setModuleDefault(result, mod);
11253
- return result;
11254
- };
11604
+ var __importStar = (this && this.__importStar) || (function () {
11605
+ var ownKeys = function(o) {
11606
+ ownKeys = Object.getOwnPropertyNames || function (o) {
11607
+ var ar = [];
11608
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
11609
+ return ar;
11610
+ };
11611
+ return ownKeys(o);
11612
+ };
11613
+ return function (mod) {
11614
+ if (mod && mod.__esModule) return mod;
11615
+ var result = {};
11616
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
11617
+ __setModuleDefault(result, mod);
11618
+ return result;
11619
+ };
11620
+ })();
11255
11621
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11256
- exports.BinTrieBuilder = exports.BinTrie = exports.u82s = exports.s2u8 = void 0;
11622
+ exports.BinTrieBuilder = exports.BinTrie = void 0;
11623
+ exports.s2u8 = s2u8;
11624
+ exports.u82s = u82s;
11257
11625
  const U = __importStar(__webpack_require__(/*! ./util */ "./lib/util/util.ts"));
11258
11626
  /*
11259
11627
  -- For Node
@@ -11267,11 +11635,9 @@ const MaxKeyLength = 128;
11267
11635
  function s2u8(coder, s) {
11268
11636
  return coder.encoder.encode(s);
11269
11637
  }
11270
- exports.s2u8 = s2u8;
11271
11638
  function u82s(coder, u8, offset, n) {
11272
11639
  return coder.decoder.decode(u8.subarray(offset, offset + n));
11273
11640
  }
11274
- exports.u82s = u82s;
11275
11641
  const NullFragment = { count: 0, used: 0, offset: 0, s: '' };
11276
11642
  function sortBestPair(p1, p2) {
11277
11643
  let d = (p1.f1.count + p1.f2.count) - (p2.f1.count + p2.f2.count);
@@ -11857,7 +12223,9 @@ exports.CountedHash = CountedHash;
11857
12223
 
11858
12224
 
11859
12225
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11860
- exports.asCSSGradient = exports.parseGradient = exports.execGradient = void 0;
12226
+ exports.execGradient = execGradient;
12227
+ exports.parseGradient = parseGradient;
12228
+ exports.asCSSGradient = asCSSGradient;
11861
12229
  function parseStops(stops) {
11862
12230
  if (stops[0].rgb)
11863
12231
  return;
@@ -11894,7 +12262,6 @@ function execGradient(stops, value) {
11894
12262
  }
11895
12263
  return toHexColor(r, g, b);
11896
12264
  }
11897
- exports.execGradient = execGradient;
11898
12265
  function parseGradient(sStops) {
11899
12266
  let stops = [];
11900
12267
  let re = / ?([^ ]+) ([^ ,]+%?),?(.*)/;
@@ -11921,7 +12288,6 @@ function parseGradient(sStops) {
11921
12288
  }
11922
12289
  return stops;
11923
12290
  }
11924
- exports.parseGradient = parseGradient;
11925
12291
  function asCSSGradient(stops) {
11926
12292
  parseStops(stops);
11927
12293
  let a = [];
@@ -11931,7 +12297,6 @@ function asCSSGradient(stops) {
11931
12297
  });
11932
12298
  return `linear-gradient(to right, ${a.join(', ')})`;
11933
12299
  }
11934
- exports.asCSSGradient = asCSSGradient;
11935
12300
 
11936
12301
 
11937
12302
  /***/ }),
@@ -12013,9 +12378,46 @@ exports.IndexedArray = IndexedArray;
12013
12378
 
12014
12379
 
12015
12380
  Object.defineProperty(exports, "__esModule", ({ value: true }));
12016
- exports.toSafeNumber = exports.toNumber = exports.isNumber = exports.wrapLon = exports.rad2deg = exports.deg2rad = exports.distance = exports.toRGBAIntensity = exports.toRGBA = exports.toHex = exports.hashObject = exports.hash = exports.percentString = exports.precisionRound = exports.deepAccum = exports.deepCopy = exports.shallowEqual = exports.shallowAssignImmutable = exports.shallowDelete = exports.shallowAssign = exports.shallowCopy = exports.textToHtml = exports.recentDate = exports.relativeDate = exports.prettyDate = exports.deepEqual = exports.partialEqual = exports.nthKey = exports.nthProperty = exports.countKeys = exports.isEmpty = exports.depthof = exports.sizeof = exports.guidKey = exports.createKeyedGuid = exports.isGuid = exports.createGuid = exports.Deadline = exports.MultiTimer = exports.Elapsed = exports.Now = void 0;
12017
- function Now() { return (new Date()).toJSON(); }
12381
+ exports.Deadline = exports.MultiTimer = exports.Elapsed = void 0;
12018
12382
  exports.Now = Now;
12383
+ exports.createGuid = createGuid;
12384
+ exports.isGuid = isGuid;
12385
+ exports.createKeyedGuid = createKeyedGuid;
12386
+ exports.guidKey = guidKey;
12387
+ exports.sizeof = sizeof;
12388
+ exports.depthof = depthof;
12389
+ exports.isEmpty = isEmpty;
12390
+ exports.countKeys = countKeys;
12391
+ exports.nthProperty = nthProperty;
12392
+ exports.nthKey = nthKey;
12393
+ exports.partialEqual = partialEqual;
12394
+ exports.deepEqual = deepEqual;
12395
+ exports.prettyDate = prettyDate;
12396
+ exports.relativeDate = relativeDate;
12397
+ exports.recentDate = recentDate;
12398
+ exports.textToHtml = textToHtml;
12399
+ exports.shallowCopy = shallowCopy;
12400
+ exports.shallowAssign = shallowAssign;
12401
+ exports.shallowDelete = shallowDelete;
12402
+ exports.shallowAssignImmutable = shallowAssignImmutable;
12403
+ exports.shallowEqual = shallowEqual;
12404
+ exports.deepCopy = deepCopy;
12405
+ exports.deepAccum = deepAccum;
12406
+ exports.precisionRound = precisionRound;
12407
+ exports.percentString = percentString;
12408
+ exports.hash = hash;
12409
+ exports.hashObject = hashObject;
12410
+ exports.toHex = toHex;
12411
+ exports.toRGBA = toRGBA;
12412
+ exports.toRGBAIntensity = toRGBAIntensity;
12413
+ exports.distance = distance;
12414
+ exports.deg2rad = deg2rad;
12415
+ exports.rad2deg = rad2deg;
12416
+ exports.wrapLon = wrapLon;
12417
+ exports.isNumber = isNumber;
12418
+ exports.toNumber = toNumber;
12419
+ exports.toSafeNumber = toSafeNumber;
12420
+ function Now() { return (new Date()).toJSON(); }
12019
12421
  // polyfill
12020
12422
  let hrtime = global && global.process && global.process.hrtime ? global.process.hrtime : null;
12021
12423
  class Elapsed {
@@ -12111,23 +12513,19 @@ function createGuid() {
12111
12513
  return v.toString(16);
12112
12514
  });
12113
12515
  }
12114
- exports.createGuid = createGuid;
12115
12516
  const reGuid = /.*-.*-.*-.*-/;
12116
12517
  function isGuid(s) {
12117
12518
  return reGuid.test(s) && s.length >= 36;
12118
12519
  }
12119
- exports.isGuid = isGuid;
12120
12520
  function createKeyedGuid(key) {
12121
12521
  return `xxxxxxxx-xxxx-${key}xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g, function (c) {
12122
12522
  var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);
12123
12523
  return v.toString(16);
12124
12524
  });
12125
12525
  }
12126
- exports.createKeyedGuid = createKeyedGuid;
12127
12526
  function guidKey(guid) {
12128
12527
  return guid.substr(14, 1); // See above
12129
12528
  }
12130
- exports.guidKey = guidKey;
12131
12529
  function _sizeof(a, loops) {
12132
12530
  if (a === null || a === undefined)
12133
12531
  return 0;
@@ -12170,7 +12568,6 @@ function sizeof(a) {
12170
12568
  let n = _sizeof(a, loops);
12171
12569
  return n;
12172
12570
  }
12173
- exports.sizeof = sizeof;
12174
12571
  function depthof(a) {
12175
12572
  if (a === null || a === undefined)
12176
12573
  return 1;
@@ -12197,7 +12594,6 @@ function depthof(a) {
12197
12594
  }
12198
12595
  }
12199
12596
  }
12200
- exports.depthof = depthof;
12201
12597
  function isEmpty(o) {
12202
12598
  if (o === null || o === undefined)
12203
12599
  return true;
@@ -12206,7 +12602,6 @@ function isEmpty(o) {
12206
12602
  return false;
12207
12603
  return true;
12208
12604
  }
12209
- exports.isEmpty = isEmpty;
12210
12605
  function countKeys(o) {
12211
12606
  if (o === undefined || typeof o !== 'object')
12212
12607
  return -1;
@@ -12216,7 +12611,6 @@ function countKeys(o) {
12216
12611
  count++;
12217
12612
  return count;
12218
12613
  }
12219
- exports.countKeys = countKeys;
12220
12614
  function nthProperty(o, n = 0) {
12221
12615
  for (let p in o)
12222
12616
  if (o.hasOwnProperty(p)) {
@@ -12226,7 +12620,6 @@ function nthProperty(o, n = 0) {
12226
12620
  }
12227
12621
  return undefined;
12228
12622
  }
12229
- exports.nthProperty = nthProperty;
12230
12623
  function nthKey(o, n = 0) {
12231
12624
  for (let p in o)
12232
12625
  if (o.hasOwnProperty(p)) {
@@ -12236,7 +12629,6 @@ function nthKey(o, n = 0) {
12236
12629
  }
12237
12630
  return undefined;
12238
12631
  }
12239
- exports.nthKey = nthKey;
12240
12632
  function partialEqual(o, subset) {
12241
12633
  for (let p in subset)
12242
12634
  if (subset.hasOwnProperty(p))
@@ -12244,7 +12636,6 @@ function partialEqual(o, subset) {
12244
12636
  return false;
12245
12637
  return true;
12246
12638
  }
12247
- exports.partialEqual = partialEqual;
12248
12639
  function exactEqual(o1, o2, options) {
12249
12640
  if (o1 === o2)
12250
12641
  return true;
@@ -12304,7 +12695,6 @@ function deepEqual(o1, o2, options) {
12304
12695
  }
12305
12696
  return true;
12306
12697
  }
12307
- exports.deepEqual = deepEqual;
12308
12698
  const Months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
12309
12699
  function prettyDate(d) {
12310
12700
  if (d == null)
@@ -12320,7 +12710,6 @@ function prettyDate(d) {
12320
12710
  hh -= 12;
12321
12711
  return `${mmm} ${dd}, ${yyyy} at ${hh}:${mm} ${ampm}`;
12322
12712
  }
12323
- exports.prettyDate = prettyDate;
12324
12713
  function relativeDate(d) {
12325
12714
  if (d == null)
12326
12715
  return 'unknown';
@@ -12344,7 +12733,6 @@ function relativeDate(d) {
12344
12733
  else
12345
12734
  return `${mmm} ${dd}, ${yyyy}`;
12346
12735
  }
12347
- exports.relativeDate = relativeDate;
12348
12736
  const OneMinute = 1000 * 60;
12349
12737
  const OneHour = OneMinute * 60;
12350
12738
  const OneDay = OneHour * 24;
@@ -12365,7 +12753,6 @@ function recentDate(d) {
12365
12753
  else
12366
12754
  return relativeDate(d);
12367
12755
  }
12368
- exports.recentDate = recentDate;
12369
12756
  function textToHtml(sText) {
12370
12757
  let lines = sText.split('\n');
12371
12758
  let aHtml = [];
@@ -12399,7 +12786,6 @@ function textToHtml(sText) {
12399
12786
  aHtml.push('</body>');
12400
12787
  return aHtml.join('');
12401
12788
  }
12402
- exports.textToHtml = textToHtml;
12403
12789
  function shallowCopy(src) {
12404
12790
  if (src === null || src === undefined)
12405
12791
  return src;
@@ -12423,7 +12809,6 @@ function shallowCopy(src) {
12423
12809
  }
12424
12810
  }
12425
12811
  }
12426
- exports.shallowCopy = shallowCopy;
12427
12812
  function shallowAssign(o1, o2) {
12428
12813
  if (o1 === null || o1 === undefined)
12429
12814
  o1 = {};
@@ -12436,7 +12821,6 @@ function shallowAssign(o1, o2) {
12436
12821
  o1[p] = o2[p];
12437
12822
  return o1;
12438
12823
  }
12439
- exports.shallowAssign = shallowAssign;
12440
12824
  function shallowDelete(o1, o2) {
12441
12825
  if (o1 == null || o2 == null)
12442
12826
  return o1;
@@ -12447,7 +12831,6 @@ function shallowDelete(o1, o2) {
12447
12831
  delete o1[p];
12448
12832
  return o1;
12449
12833
  }
12450
- exports.shallowDelete = shallowDelete;
12451
12834
  function shallowAssignImmutable(o1, o2) {
12452
12835
  if (o1 === null || o1 === undefined)
12453
12836
  o1 = {};
@@ -12468,7 +12851,6 @@ function shallowAssignImmutable(o1, o2) {
12468
12851
  shallowAssign(oNew, o2);
12469
12852
  return oNew;
12470
12853
  }
12471
- exports.shallowAssignImmutable = shallowAssignImmutable;
12472
12854
  function shallowEqual(o1, o2) {
12473
12855
  if (o1 === undefined || o2 === undefined || typeof o1 !== 'object' || typeof o2 !== 'object')
12474
12856
  return o1 === o2;
@@ -12493,7 +12875,6 @@ function shallowEqual(o1, o2) {
12493
12875
  return true;
12494
12876
  }
12495
12877
  }
12496
- exports.shallowEqual = shallowEqual;
12497
12878
  function deepCopy(src) {
12498
12879
  // Beware typeof oddities
12499
12880
  if (src === null || src === undefined)
@@ -12518,7 +12899,6 @@ function deepCopy(src) {
12518
12899
  else
12519
12900
  return src;
12520
12901
  }
12521
- exports.deepCopy = deepCopy;
12522
12902
  function deepAccum(accum, o) {
12523
12903
  if (accum == null)
12524
12904
  accum = {};
@@ -12553,19 +12933,16 @@ function deepAccum(accum, o) {
12553
12933
  }
12554
12934
  return accum;
12555
12935
  }
12556
- exports.deepAccum = deepAccum;
12557
12936
  function precisionRound(n, p) {
12558
12937
  let f = Math.pow(10, p);
12559
12938
  return Math.round(n * f) / f;
12560
12939
  }
12561
- exports.precisionRound = precisionRound;
12562
12940
  function percentString(num, den, precision = 0) {
12563
12941
  if (den == 0)
12564
12942
  return '(-)';
12565
12943
  let p = precisionRound((num / den) * 100, precision);
12566
12944
  return String(p) + '%';
12567
12945
  }
12568
- exports.percentString = percentString;
12569
12946
  function hash(s) {
12570
12947
  let hash = 5381;
12571
12948
  let i = s.length;
@@ -12576,11 +12953,9 @@ function hash(s) {
12576
12953
  * signed int to an unsigned by doing an unsigned bitshift. */
12577
12954
  return hash >>> 0;
12578
12955
  }
12579
- exports.hash = hash;
12580
12956
  function hashObject(o) {
12581
12957
  return hash(o ? JSON.stringify(o) : '');
12582
12958
  }
12583
- exports.hashObject = hashObject;
12584
12959
  const HexTable = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
12585
12960
  function toHex(n) {
12586
12961
  if (n < 0 || n > 255)
@@ -12588,7 +12963,6 @@ function toHex(n) {
12588
12963
  n = Math.floor(n);
12589
12964
  return HexTable[n >> 4] + HexTable[n & 15];
12590
12965
  }
12591
- exports.toHex = toHex;
12592
12966
  function toRGBA(color, alpha) {
12593
12967
  // Allow passing rgba in rather than only '#ffffff' form
12594
12968
  if (color.indexOf('rgba') === 0)
@@ -12615,31 +12989,24 @@ function toRGBA(color, alpha) {
12615
12989
  }
12616
12990
  return `rgba(${String(r)}, ${String(g)}, ${String(b)}, ${String(alpha)})`;
12617
12991
  }
12618
- exports.toRGBA = toRGBA;
12619
12992
  function toRGBAIntensity(color, intensity, alpha) {
12620
12993
  // for now assume color is black
12621
12994
  let g = precisionRound(255 * intensity, 0);
12622
12995
  return `rgba(${String(g)}, ${String(g)}, ${String(g)}, ${String(alpha)})`;
12623
12996
  }
12624
- exports.toRGBAIntensity = toRGBAIntensity;
12625
12997
  // Geo functions
12626
12998
  function distance(x0, y0, x1, y1) {
12627
12999
  return Math.hypot(x0 - x1, y0 - y1);
12628
13000
  }
12629
- exports.distance = distance;
12630
13001
  function deg2rad(num) { return num * Math.PI / 180; }
12631
- exports.deg2rad = deg2rad;
12632
13002
  function rad2deg(num) { return num / Math.PI * 180; }
12633
- exports.rad2deg = rad2deg;
12634
13003
  // Restricts lon to range [-180..180]
12635
13004
  function wrapLon(lon) {
12636
13005
  let worlds = Math.floor((lon + 180) / 360);
12637
13006
  return lon - (worlds * 360);
12638
13007
  }
12639
- exports.wrapLon = wrapLon;
12640
13008
  let reNumber = /^\s*-?\d+(\.\d+)?([eE][+-]?\d+)?\s*$/;
12641
13009
  function isNumber(s) { return !!s && reNumber.test(s); }
12642
- exports.isNumber = isNumber;
12643
13010
  function toNumber(a) {
12644
13011
  if (typeof a === 'number')
12645
13012
  return a;
@@ -12647,12 +13014,10 @@ function toNumber(a) {
12647
13014
  return NaN;
12648
13015
  return Number(a);
12649
13016
  }
12650
- exports.toNumber = toNumber;
12651
13017
  function toSafeNumber(a) {
12652
13018
  let n = toNumber(a);
12653
13019
  return (isNaN(n) || typeof n !== 'number') ? 0 : n;
12654
13020
  }
12655
- exports.toSafeNumber = toSafeNumber;
12656
13021
 
12657
13022
 
12658
13023
  /***/ }),