@dra2020/baseclient 1.0.15 → 1.0.16

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.
Files changed (96) hide show
  1. package/README.md +5 -16
  2. package/dist/all/all.d.ts +2 -18
  3. package/dist/baseclient.js +1297 -167
  4. package/dist/baseclient.js.map +1 -1
  5. package/dist/filterexpr/filterexpr.d.ts +3 -0
  6. package/dist/fsm/fsm.d.ts +1 -0
  7. package/dist/geo/all.d.ts +2 -0
  8. package/dist/geo/geo.d.ts +67 -0
  9. package/dist/geo/vfeature.d.ts +4 -0
  10. package/dist/ot-js/otsession.d.ts +3 -0
  11. package/dist/poly/union.d.ts +1 -0
  12. package/docs/filterexpr.md +22 -0
  13. package/lib/all/all.ts +2 -22
  14. package/lib/filterexpr/filterexpr.ts +79 -5
  15. package/lib/fsm/fsm.ts +12 -2
  16. package/lib/geo/all.ts +2 -0
  17. package/lib/geo/geo.ts +452 -0
  18. package/lib/geo/vfeature.ts +34 -0
  19. package/lib/ot-js/otsession.ts +4 -1
  20. package/lib/poly/hash.ts +1 -1
  21. package/lib/poly/polypack.ts +12 -2
  22. package/lib/poly/topo.ts +26 -41
  23. package/lib/poly/union.ts +17 -0
  24. package/package.json +17 -5
  25. package/dist/all/allclient.d.ts +0 -18
  26. package/dist/base.js +0 -33010
  27. package/dist/base.js.map +0 -1
  28. package/dist/dbabstract/all.d.ts +0 -1
  29. package/dist/dbabstract/db.d.ts +0 -83
  30. package/dist/dbdynamo/all.d.ts +0 -1
  31. package/dist/dbdynamo/dbdynamo.d.ts +0 -190
  32. package/dist/fsmfile/all.d.ts +0 -1
  33. package/dist/fsmfile/fsmfile.d.ts +0 -47
  34. package/dist/jsonstream/all.d.ts +0 -1
  35. package/dist/jsonstream/jsonstream.d.ts +0 -130
  36. package/dist/lambda/all.d.ts +0 -1
  37. package/dist/lambda/env.d.ts +0 -10
  38. package/dist/lambda/lambda.d.ts +0 -18
  39. package/dist/logserver/all.d.ts +0 -5
  40. package/dist/logserver/log.d.ts +0 -11
  41. package/dist/logserver/logaccum.d.ts +0 -154
  42. package/dist/logserver/logblob.d.ts +0 -24
  43. package/dist/logserver/logconcat.d.ts +0 -55
  44. package/dist/logserver/logkey.d.ts +0 -28
  45. package/dist/memsqs/all.d.ts +0 -4
  46. package/dist/memsqs/client.d.ts +0 -13
  47. package/dist/memsqs/loopback.d.ts +0 -11
  48. package/dist/memsqs/orderedlist.d.ts +0 -19
  49. package/dist/memsqs/queue.d.ts +0 -84
  50. package/dist/memsqs/server.d.ts +0 -37
  51. package/dist/storage/all.d.ts +0 -4
  52. package/dist/storage/datablob.d.ts +0 -9
  53. package/dist/storage/env.d.ts +0 -10
  54. package/dist/storage/splitsblob.d.ts +0 -13
  55. package/dist/storage/storage.d.ts +0 -166
  56. package/dist/storages3/all.d.ts +0 -1
  57. package/dist/storages3/s3.d.ts +0 -62
  58. package/docs/dbabstract.md +0 -2
  59. package/docs/dbdynamo.md +0 -2
  60. package/docs/fsmfile.md +0 -2
  61. package/docs/jsonstream.md +0 -44
  62. package/docs/lambda.md +0 -2
  63. package/docs/logserver.md +0 -2
  64. package/docs/storage.md +0 -2
  65. package/docs/storages3.md +0 -2
  66. package/lib/all/allclient.ts +0 -19
  67. package/lib/dbabstract/all.ts +0 -1
  68. package/lib/dbabstract/db.ts +0 -246
  69. package/lib/dbdynamo/all.ts +0 -1
  70. package/lib/dbdynamo/dbdynamo.ts +0 -1551
  71. package/lib/fsmfile/all.ts +0 -1
  72. package/lib/fsmfile/fsmfile.ts +0 -236
  73. package/lib/jsonstream/all.ts +0 -1
  74. package/lib/jsonstream/jsonstream.ts +0 -940
  75. package/lib/lambda/all.ts +0 -1
  76. package/lib/lambda/env.ts +0 -13
  77. package/lib/lambda/lambda.ts +0 -120
  78. package/lib/logserver/all.ts +0 -5
  79. package/lib/logserver/log.ts +0 -565
  80. package/lib/logserver/logaccum.ts +0 -1445
  81. package/lib/logserver/logblob.ts +0 -84
  82. package/lib/logserver/logconcat.ts +0 -313
  83. package/lib/logserver/logkey.ts +0 -125
  84. package/lib/memsqs/all.ts +0 -4
  85. package/lib/memsqs/client.ts +0 -268
  86. package/lib/memsqs/loopback.ts +0 -64
  87. package/lib/memsqs/orderedlist.ts +0 -74
  88. package/lib/memsqs/queue.ts +0 -395
  89. package/lib/memsqs/server.ts +0 -262
  90. package/lib/storage/all.ts +0 -4
  91. package/lib/storage/datablob.ts +0 -36
  92. package/lib/storage/env.ts +0 -14
  93. package/lib/storage/splitsblob.ts +0 -63
  94. package/lib/storage/storage.ts +0 -604
  95. package/lib/storages3/all.ts +0 -1
  96. package/lib/storages3/s3.ts +0 -576
@@ -4,42 +4,63 @@
4
4
  else if(typeof define === 'function' && define.amd)
5
5
  define([], factory);
6
6
  else if(typeof exports === 'object')
7
- exports["base"] = factory();
7
+ exports["baseclient"] = factory();
8
8
  else
9
- root["base"] = factory();
9
+ root["baseclient"] = factory();
10
10
  })(global, function() {
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ "use strict";
13
13
  /******/ var __webpack_modules__ = ({
14
14
 
15
- /***/ "./lib/all/allclient.ts":
16
- /*!******************************!*\
17
- !*** ./lib/all/allclient.ts ***!
18
- \******************************/
19
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
15
+ /***/ "./lib/all/all.ts":
16
+ /*!************************!*\
17
+ !*** ./lib/all/all.ts ***!
18
+ \************************/
19
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
20
20
 
21
21
 
22
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
25
+ }) : (function(o, m, k, k2) {
26
+ if (k2 === undefined) k2 = k;
27
+ o[k2] = m[k];
28
+ }));
29
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
30
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
31
+ }) : function(o, v) {
32
+ o["default"] = v;
33
+ });
34
+ var __importStar = (this && this.__importStar) || function (mod) {
35
+ if (mod && mod.__esModule) return mod;
36
+ var result = {};
37
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
38
+ __setModuleDefault(result, mod);
39
+ return result;
40
+ };
22
41
  Object.defineProperty(exports, "__esModule", ({ value: true }));
23
- exports.FilterExpr = exports.OTE = exports.OT = exports.LogClient = exports.LogAbstract = exports.Poly = exports.FSM = exports.Context = exports.Util = void 0;
42
+ exports.G = exports.FilterExpr = exports.OTE = exports.OT = exports.LogClient = exports.LogAbstract = exports.Poly = exports.FSM = exports.Context = exports.Util = void 0;
24
43
  // Client and Server
25
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
44
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
26
45
  exports.Util = Util;
27
- const Context = __webpack_require__(/*! ../context/all */ "./lib/context/all.ts");
46
+ const Context = __importStar(__webpack_require__(/*! ../context/all */ "./lib/context/all.ts"));
28
47
  exports.Context = Context;
29
- const FSM = __webpack_require__(/*! ../fsm/all */ "./lib/fsm/all.ts");
48
+ const FSM = __importStar(__webpack_require__(/*! ../fsm/all */ "./lib/fsm/all.ts"));
30
49
  exports.FSM = FSM;
31
- const Poly = __webpack_require__(/*! ../poly/all */ "./lib/poly/all.ts");
50
+ const Poly = __importStar(__webpack_require__(/*! ../poly/all */ "./lib/poly/all.ts"));
32
51
  exports.Poly = Poly;
33
- const LogAbstract = __webpack_require__(/*! ../logabstract/all */ "./lib/logabstract/all.ts");
52
+ const LogAbstract = __importStar(__webpack_require__(/*! ../logabstract/all */ "./lib/logabstract/all.ts"));
34
53
  exports.LogAbstract = LogAbstract;
35
- const LogClient = __webpack_require__(/*! ../logclient/all */ "./lib/logclient/all.ts");
54
+ const LogClient = __importStar(__webpack_require__(/*! ../logclient/all */ "./lib/logclient/all.ts"));
36
55
  exports.LogClient = LogClient;
37
- const OT = __webpack_require__(/*! ../ot-js/all */ "./lib/ot-js/all.ts");
56
+ const OT = __importStar(__webpack_require__(/*! ../ot-js/all */ "./lib/ot-js/all.ts"));
38
57
  exports.OT = OT;
39
- const OTE = __webpack_require__(/*! ../ot-editutil/all */ "./lib/ot-editutil/all.ts");
58
+ const OTE = __importStar(__webpack_require__(/*! ../ot-editutil/all */ "./lib/ot-editutil/all.ts"));
40
59
  exports.OTE = OTE;
41
60
  const all_1 = __webpack_require__(/*! ../filterexpr/all */ "./lib/filterexpr/all.ts");
42
61
  Object.defineProperty(exports, "FilterExpr", ({ enumerable: true, get: function () { return all_1.FilterExpr; } }));
62
+ const G = __importStar(__webpack_require__(/*! ../geo/all */ "./lib/geo/all.ts"));
63
+ exports.G = G;
43
64
 
44
65
 
45
66
  /***/ }),
@@ -71,12 +92,31 @@ __exportStar(__webpack_require__(/*! ./context */ "./lib/context/context.ts"), e
71
92
  /*!********************************!*\
72
93
  !*** ./lib/context/context.ts ***!
73
94
  \********************************/
74
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
95
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
75
96
 
76
97
 
98
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
99
+ if (k2 === undefined) k2 = k;
100
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
101
+ }) : (function(o, m, k, k2) {
102
+ if (k2 === undefined) k2 = k;
103
+ o[k2] = m[k];
104
+ }));
105
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
106
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
107
+ }) : function(o, v) {
108
+ o["default"] = v;
109
+ });
110
+ var __importStar = (this && this.__importStar) || function (mod) {
111
+ if (mod && mod.__esModule) return mod;
112
+ var result = {};
113
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
114
+ __setModuleDefault(result, mod);
115
+ return result;
116
+ };
77
117
  Object.defineProperty(exports, "__esModule", ({ value: true }));
78
118
  exports.create = void 0;
79
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
119
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
80
120
  class Context {
81
121
  constructor() {
82
122
  this.values = {};
@@ -156,12 +196,31 @@ __exportStar(__webpack_require__(/*! ./filterexpr */ "./lib/filterexpr/filterexp
156
196
  /*!**************************************!*\
157
197
  !*** ./lib/filterexpr/filterexpr.ts ***!
158
198
  \**************************************/
159
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
199
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
160
200
 
161
201
 
202
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
203
+ if (k2 === undefined) k2 = k;
204
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
205
+ }) : (function(o, m, k, k2) {
206
+ if (k2 === undefined) k2 = k;
207
+ o[k2] = m[k];
208
+ }));
209
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
210
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
211
+ }) : function(o, v) {
212
+ o["default"] = v;
213
+ });
214
+ var __importStar = (this && this.__importStar) || function (mod) {
215
+ if (mod && mod.__esModule) return mod;
216
+ var result = {};
217
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
218
+ __setModuleDefault(result, mod);
219
+ return result;
220
+ };
162
221
  Object.defineProperty(exports, "__esModule", ({ value: true }));
163
222
  exports.FilterExpr = void 0;
164
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
223
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
165
224
  const Space = 32;
166
225
  const Tab = 9;
167
226
  const Newline = 10;
@@ -538,6 +597,40 @@ function wordyDate(s) {
538
597
  // But this is close enough to match what gets displayed by "prettyDate" while also letting selection by month year
539
598
  return s;
540
599
  }
600
+ function clauseEqual(c1, c2) {
601
+ if (c1 == null && c2 == null)
602
+ return true;
603
+ if (c1 == null || c2 == null)
604
+ return false;
605
+ if (c1.op.tt === c2.op.tt) {
606
+ if (c1.op.tt === TokType.Text)
607
+ return c1.op.text === c2.op.text;
608
+ else
609
+ return clauseEqual(c1.operand1, c2.operand1) && clauseEqual(c1.operand2, c2.operand2);
610
+ }
611
+ else
612
+ return false;
613
+ }
614
+ function containsClause(c, s) {
615
+ if (clauseEqual(c, s))
616
+ return true;
617
+ if (c == null || s == null)
618
+ return false;
619
+ return containsClause(c.operand1, s) || containsClause(c.operand2, s);
620
+ }
621
+ function removeClause(c, s) {
622
+ if (c == null || (c.op.tt === TokType.Text && c.op.tt !== s.op.tt))
623
+ return c;
624
+ else if (clauseEqual(c, s))
625
+ return null;
626
+ else {
627
+ c.operand1 = removeClause(c.operand1, s);
628
+ c.operand2 = removeClause(c.operand2, s);
629
+ if ((c.op.tt === TokType.And || c.op.tt === TokType.Or) && (c.operand1 == null || c.operand2 == null))
630
+ return c.operand1 || c.operand2;
631
+ return c;
632
+ }
633
+ }
541
634
  class FilterExpr {
542
635
  constructor(coder, expr) {
543
636
  this.lexer = new Lexer(coder);
@@ -555,13 +648,38 @@ class FilterExpr {
555
648
  asString() {
556
649
  return this.asStringClause(this.parser.clause);
557
650
  }
651
+ containsClause(expr) {
652
+ let sub = new FilterExpr(this.lexer.coder, expr);
653
+ return containsClause(this.parser.clause, sub.parser.clause);
654
+ }
655
+ addClause(expr) {
656
+ let sub = new FilterExpr(this.lexer.coder, expr);
657
+ if (!containsClause(this.parser.clause, sub.parser.clause)) {
658
+ if (this.parser.clause)
659
+ this.parser.clauses = [{ op: { tt: TokType.And }, operand1: this.parser.clause, operand2: sub.parser.clause }];
660
+ else
661
+ this.parser.clauses = [sub.parser.clause];
662
+ }
663
+ }
664
+ removeClause(expr) {
665
+ if (this.containsClause(expr)) {
666
+ let sub = new FilterExpr(this.lexer.coder, expr);
667
+ this.parser.clauses = [removeClause(this.parser.clause, sub.parser.clause)];
668
+ }
669
+ }
558
670
  asStringClause(clause) {
559
671
  if (clause == null)
560
672
  return '';
561
- if (clause.op.tt == TokType.Text)
562
- return `'${clause.op.text}'`;
673
+ if (clause.op.tt == TokType.Text) {
674
+ this.lexer.set(clause.op.text);
675
+ if (this.lexer.tokens.length == 1 && this.lexer.tokens[0].tt === TokType.Text)
676
+ return clause.op.text;
677
+ else
678
+ return `'${clause.op.text}'`;
679
+ }
563
680
  let a = [];
564
- a.push('(');
681
+ if (clause !== this.parser.clause)
682
+ a.push('(');
565
683
  switch (clause.op.tt) {
566
684
  case TokType.And:
567
685
  a.push(this.asStringClause(clause.operand1));
@@ -578,8 +696,7 @@ class FilterExpr {
578
696
  a.push(this.asStringClause(clause.operand1));
579
697
  break;
580
698
  case TokType.Colon:
581
- a.push(this.asStringClause(clause.operand1));
582
- a.push(':');
699
+ a.push(`${this.asStringClause(clause.operand1)}:`);
583
700
  a.push(this.asStringClause(clause.operand2));
584
701
  break;
585
702
  case TokType.Equal:
@@ -594,7 +711,8 @@ class FilterExpr {
594
711
  default:
595
712
  throw 'Unexpected token in asString';
596
713
  }
597
- a.push(')');
714
+ if (clause !== this.parser.clause)
715
+ a.push(')');
598
716
  return a.join(' ');
599
717
  }
600
718
  testClause(o, types, clause, prop, relation) {
@@ -686,13 +804,32 @@ __exportStar(__webpack_require__(/*! ./fsm */ "./lib/fsm/fsm.ts"), exports);
686
804
  /*!************************!*\
687
805
  !*** ./lib/fsm/fsm.ts ***!
688
806
  \************************/
689
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
807
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
690
808
 
691
809
 
810
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
811
+ if (k2 === undefined) k2 = k;
812
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
813
+ }) : (function(o, m, k, k2) {
814
+ if (k2 === undefined) k2 = k;
815
+ o[k2] = m[k];
816
+ }));
817
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
818
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
819
+ }) : function(o, v) {
820
+ o["default"] = v;
821
+ });
822
+ var __importStar = (this && this.__importStar) || function (mod) {
823
+ if (mod && mod.__esModule) return mod;
824
+ var result = {};
825
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
826
+ __setModuleDefault(result, mod);
827
+ return result;
828
+ };
692
829
  Object.defineProperty(exports, "__esModule", ({ value: true }));
693
830
  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_ERROR = exports.FSM_DONE = exports.FSM_PENDING = exports.FSM_STARTING = void 0;
694
831
  // Shared libraries
695
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
832
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
696
833
  // States
697
834
  exports.FSM_STARTING = 0;
698
835
  exports.FSM_PENDING = 1 << 0;
@@ -916,9 +1053,17 @@ class FsmSleep extends Fsm {
916
1053
  this.delay = delay;
917
1054
  }
918
1055
  tick() {
919
- if (this.ready && this.state === exports.FSM_STARTING) {
1056
+ // This allows canceling by simply setting state to done
1057
+ if (this.done && this.timeoutHandle !== undefined) {
1058
+ clearTimeout(this.timeoutHandle);
1059
+ delete this.timeoutHandle;
1060
+ }
1061
+ else if (this.ready && this.state === exports.FSM_STARTING) {
920
1062
  this.setState(exports.FSM_PENDING);
921
- setTimeout(() => { this.setState(exports.FSM_DONE); }, this.delay);
1063
+ this.timeoutHandle = setTimeout(() => {
1064
+ delete this.timeoutHandle;
1065
+ this.setState(exports.FSM_DONE);
1066
+ }, this.delay);
922
1067
  }
923
1068
  }
924
1069
  }
@@ -1080,6 +1225,486 @@ class FsmArray extends Fsm {
1080
1225
  exports.FsmArray = FsmArray;
1081
1226
 
1082
1227
 
1228
+ /***/ }),
1229
+
1230
+ /***/ "./lib/geo/all.ts":
1231
+ /*!************************!*\
1232
+ !*** ./lib/geo/all.ts ***!
1233
+ \************************/
1234
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1235
+
1236
+
1237
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1238
+ if (k2 === undefined) k2 = k;
1239
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
1240
+ }) : (function(o, m, k, k2) {
1241
+ if (k2 === undefined) k2 = k;
1242
+ o[k2] = m[k];
1243
+ }));
1244
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
1245
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1246
+ };
1247
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
1248
+ __exportStar(__webpack_require__(/*! ./geo */ "./lib/geo/geo.ts"), exports);
1249
+ __exportStar(__webpack_require__(/*! ./vfeature */ "./lib/geo/vfeature.ts"), exports);
1250
+
1251
+
1252
+ /***/ }),
1253
+
1254
+ /***/ "./lib/geo/geo.ts":
1255
+ /*!************************!*\
1256
+ !*** ./lib/geo/geo.ts ***!
1257
+ \************************/
1258
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1259
+
1260
+
1261
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1262
+ if (k2 === undefined) k2 = k;
1263
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
1264
+ }) : (function(o, m, k, k2) {
1265
+ if (k2 === undefined) k2 = k;
1266
+ o[k2] = m[k];
1267
+ }));
1268
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
1269
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1270
+ }) : function(o, v) {
1271
+ o["default"] = v;
1272
+ });
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
+ };
1280
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
1281
+ exports.geoIntersect = exports.geoIntersectOptions = exports.GeoMultiCollection = exports.geoMapEqual = exports.geoEqual = exports.geoTopoToCollection = exports.geoCollectionToTopo = exports.geoMapToCollection = exports.geoCollectionToMap = void 0;
1282
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
1283
+ const Poly = __importStar(__webpack_require__(/*! ../poly/all */ "./lib/poly/all.ts"));
1284
+ function geoCollectionToMap(col) {
1285
+ if (col == null)
1286
+ return null;
1287
+ let map = {};
1288
+ col.features.forEach((f) => { map[String(f.properties.id)] = f; });
1289
+ return map;
1290
+ }
1291
+ exports.geoCollectionToMap = geoCollectionToMap;
1292
+ function geoMapToCollection(map) {
1293
+ if (map == null || Util.countKeys(map) == 0)
1294
+ return null;
1295
+ let col = { type: 'FeatureCollection', features: [] };
1296
+ Object.keys(map).forEach((geoid) => { col.features.push(map[geoid]); });
1297
+ return col;
1298
+ }
1299
+ exports.geoMapToCollection = geoMapToCollection;
1300
+ function geoCollectionToTopo(col) {
1301
+ let topo = Poly.topoFromCollection(col);
1302
+ Poly.topoPack(topo);
1303
+ return topo;
1304
+ }
1305
+ exports.geoCollectionToTopo = geoCollectionToTopo;
1306
+ function geoTopoToCollection(topo) {
1307
+ let col = Poly.topoToCollection(topo);
1308
+ Poly.featurePack(col);
1309
+ return col;
1310
+ }
1311
+ exports.geoTopoToCollection = geoTopoToCollection;
1312
+ function geoEqual(m1, m2) {
1313
+ let n1 = m1 ? m1.length : 0;
1314
+ let n2 = m2 ? m2.length : 0;
1315
+ if (n1 != n2)
1316
+ return false;
1317
+ if (n1 == 0)
1318
+ return true;
1319
+ let n = 0;
1320
+ let eq = true;
1321
+ m1.forEach(f => { if (eq && !m2.find(f.properties.id))
1322
+ eq = false; });
1323
+ return eq;
1324
+ }
1325
+ exports.geoEqual = geoEqual;
1326
+ function geoMapEqual(m1, m2) {
1327
+ if (m1 == null)
1328
+ return Util.isEmpty(m2);
1329
+ if (m2 == null)
1330
+ return Util.isEmpty(m1);
1331
+ let p;
1332
+ for (p in m1)
1333
+ if (m1.hasOwnProperty(p))
1334
+ if (m1[p] !== m2[p])
1335
+ return false;
1336
+ for (p in m2)
1337
+ if (m2.hasOwnProperty(p))
1338
+ if (m1[p] === undefined)
1339
+ return false;
1340
+ return true;
1341
+ }
1342
+ exports.geoMapEqual = geoMapEqual;
1343
+ class GeoMultiCollection {
1344
+ constructor(tag, topo, col, map) {
1345
+ this.stamp = Math.trunc(Math.random() * Number.MAX_SAFE_INTEGER / 2);
1346
+ this.empty();
1347
+ if (tag)
1348
+ this.add(tag, topo, col, map);
1349
+ }
1350
+ empty() {
1351
+ this.entries = {};
1352
+ this.hidden = {};
1353
+ this._onChange();
1354
+ }
1355
+ get nEntries() { return Util.countKeys(this.entries); }
1356
+ nthEntry(n) {
1357
+ return Util.nthProperty(this.entries, n);
1358
+ }
1359
+ add(tag, topo, col, map) {
1360
+ let entry = this.entries[tag];
1361
+ if (entry === undefined)
1362
+ entry = { tag: tag }, this.entries[tag] = entry;
1363
+ if ((topo && entry.topo !== topo) || (col && entry.col !== col) || (map && entry.map !== map)) {
1364
+ entry.topo = topo;
1365
+ entry.col = col;
1366
+ entry.map = map;
1367
+ this._onChange();
1368
+ }
1369
+ else if (topo == null && col == null && map == null)
1370
+ this.remove(tag);
1371
+ }
1372
+ addMulti(multi) {
1373
+ multi.forEachEntry(e => {
1374
+ this.add(e.tag, e.topo, e.col, e.map);
1375
+ });
1376
+ for (let p in multi.hidden)
1377
+ if (multi.hidden.hasOwnProperty(p)) {
1378
+ this.hidden[p] = true;
1379
+ this._onChange();
1380
+ }
1381
+ }
1382
+ remove(tag) {
1383
+ let entry = this.entries[tag];
1384
+ if (entry) {
1385
+ if (entry.topo || entry.col || entry.map)
1386
+ this._onChange();
1387
+ delete this.entries[tag];
1388
+ }
1389
+ }
1390
+ _onChange() {
1391
+ this.all = { tag: 'all' };
1392
+ this.stamp++;
1393
+ }
1394
+ _col(e) {
1395
+ if (e == null)
1396
+ return null;
1397
+ if (!e.col) {
1398
+ if (e.map)
1399
+ e.col = geoMapToCollection(e.map);
1400
+ else if (e.topo)
1401
+ e.col = geoTopoToCollection(e.topo);
1402
+ }
1403
+ return e.col;
1404
+ }
1405
+ _map(e) {
1406
+ if (e == null)
1407
+ return null;
1408
+ if (!e.map) {
1409
+ if (e.col)
1410
+ e.map = geoCollectionToMap(e.col);
1411
+ else if (e.topo) {
1412
+ e.col = geoTopoToCollection(e.topo);
1413
+ e.map = geoCollectionToMap(e.col);
1414
+ }
1415
+ }
1416
+ return e.map;
1417
+ }
1418
+ _topo(e) {
1419
+ if (e == null)
1420
+ return null;
1421
+ if (!e.topo) {
1422
+ if (e.col)
1423
+ e.topo = geoCollectionToTopo(e.col);
1424
+ else if (e.map) {
1425
+ e.col = geoMapToCollection(e.map);
1426
+ e.topo = geoCollectionToTopo(e.col);
1427
+ }
1428
+ }
1429
+ return e.topo;
1430
+ }
1431
+ colOf(tag) { return this._col(this.entries[tag]); }
1432
+ mapOf(tag) { return this._map(this.entries[tag]); }
1433
+ topoOf(tag) { return this._topo(this.entries[tag]); }
1434
+ forEachEntry(cb) {
1435
+ Object.values(this.entries).forEach(cb);
1436
+ }
1437
+ allCol() {
1438
+ if (this.nEntries == 0)
1439
+ return null;
1440
+ if (!this.all.col) {
1441
+ // optimise case where one entry
1442
+ let n = this.nEntries;
1443
+ if (n == 1)
1444
+ this.all.col = this._col(this.nthEntry(0));
1445
+ else
1446
+ // Going from map to collection guarantees that any duplicates are removed
1447
+ this.all.col = geoMapToCollection(this.allMap());
1448
+ }
1449
+ return this.all.col;
1450
+ }
1451
+ allMap() {
1452
+ if (this.nEntries == 0)
1453
+ return null;
1454
+ if (!this.all.map) {
1455
+ // optimise case where one entry
1456
+ let n = this.nEntries;
1457
+ if (n == 1)
1458
+ this.all.map = this._map(this.nthEntry(0));
1459
+ else {
1460
+ let map = {};
1461
+ this.all.map = map;
1462
+ this.forEach(f => { map[String(f.properties.id)] = f; });
1463
+ }
1464
+ }
1465
+ return this.all.map;
1466
+ }
1467
+ allTopo() {
1468
+ if (this.nEntries == 0)
1469
+ return null;
1470
+ if (!this.all.topo) {
1471
+ // optimise case where one entry
1472
+ let n = this.nEntries;
1473
+ if (n == 1)
1474
+ this.all.topo = this._topo(this.nthEntry(0));
1475
+ else
1476
+ this.all.topo = geoCollectionToTopo(this.allCol());
1477
+ }
1478
+ return this.all.topo;
1479
+ }
1480
+ hide(id) {
1481
+ if (id) {
1482
+ if (typeof id === 'string')
1483
+ this.hidden[id] = true;
1484
+ else if (Array.isArray(id))
1485
+ id.forEach((i) => { this.hidden[i] = true; });
1486
+ else if (typeof id === 'object')
1487
+ for (let p in id)
1488
+ if (id.hasOwnProperty(p))
1489
+ this.hidden[p] = true;
1490
+ this._onChange();
1491
+ }
1492
+ }
1493
+ show(id) {
1494
+ if (id) {
1495
+ if (typeof id === 'string')
1496
+ delete this.hidden[id];
1497
+ else if (Array.isArray(id))
1498
+ id.forEach((i) => { delete this.hidden[i]; });
1499
+ else if (typeof id === 'object')
1500
+ for (let p in id)
1501
+ if (id.hasOwnProperty(p))
1502
+ delete this.hidden[p];
1503
+ this._onChange();
1504
+ }
1505
+ }
1506
+ showAll() {
1507
+ if (!Util.isEmpty(this.hidden)) {
1508
+ this.hidden = {};
1509
+ this._onChange();
1510
+ }
1511
+ }
1512
+ get length() {
1513
+ let n = 0;
1514
+ this.forEachEntry(e => {
1515
+ if (e.col)
1516
+ n += e.col.features.length;
1517
+ else if (e.map)
1518
+ n += Util.countKeys(e.map);
1519
+ else if (e.topo)
1520
+ n += Util.countKeys(e.topo.objects);
1521
+ });
1522
+ return n;
1523
+ }
1524
+ // Use forEach in preference to iteration using this function
1525
+ nthFeature(n) {
1526
+ let found;
1527
+ if (n >= 0)
1528
+ this.forEachEntry(e => {
1529
+ if (found)
1530
+ return;
1531
+ let col = this._col(e);
1532
+ if (col)
1533
+ if (n > col.features.length)
1534
+ n -= col.features.length;
1535
+ else
1536
+ found = col.features[n];
1537
+ });
1538
+ return found;
1539
+ }
1540
+ nthFilteredFeature(n, cb) {
1541
+ let found;
1542
+ this.forEachEntry(e => {
1543
+ if (found)
1544
+ return;
1545
+ let col = this._col(e);
1546
+ if (col)
1547
+ for (let i = 0; !found && i < col.features.length; i++) {
1548
+ let f = col.features[i];
1549
+ if (this.hidden[f.properties.id] === undefined && cb(f)) {
1550
+ if (n === 0) {
1551
+ found = f;
1552
+ break;
1553
+ }
1554
+ n--;
1555
+ }
1556
+ }
1557
+ });
1558
+ return found;
1559
+ }
1560
+ forEach(cb) {
1561
+ this.forEachEntry(e => {
1562
+ let col = this._col(e);
1563
+ if (e.col)
1564
+ e.col.features.forEach(f => { if (this.hidden[f.properties.id] === undefined)
1565
+ cb(f); });
1566
+ });
1567
+ }
1568
+ map(cb) {
1569
+ let features = [];
1570
+ this.forEach((f) => { features.push(cb(f)); });
1571
+ return features;
1572
+ }
1573
+ isHidden(id) {
1574
+ return this.hidden[id] !== undefined;
1575
+ }
1576
+ find(id) {
1577
+ if (this.hidden[id] !== undefined)
1578
+ return undefined;
1579
+ let entries = Object.values(this.entries);
1580
+ for (let i = 0; i < entries.length; i++) {
1581
+ let map = this._map(entries[i]);
1582
+ if (map[id])
1583
+ return map[id];
1584
+ }
1585
+ return undefined;
1586
+ }
1587
+ filter(test) {
1588
+ let m = new GeoMultiCollection();
1589
+ this.forEachEntry(e => {
1590
+ let col = this._col(e);
1591
+ let features = col ? col.features.filter(test) : null;
1592
+ if (features && features.length)
1593
+ m.add(e.tag, null, { type: 'FeatureCollection', features: features }, null);
1594
+ });
1595
+ return m;
1596
+ }
1597
+ }
1598
+ exports.GeoMultiCollection = GeoMultiCollection;
1599
+ var geoIntersectOptions;
1600
+ (function (geoIntersectOptions) {
1601
+ geoIntersectOptions[geoIntersectOptions["Intersects"] = 0] = "Intersects";
1602
+ geoIntersectOptions[geoIntersectOptions["Bounds"] = 1] = "Bounds";
1603
+ geoIntersectOptions[geoIntersectOptions["BoundsCenter"] = 2] = "BoundsCenter";
1604
+ })(geoIntersectOptions = exports.geoIntersectOptions || (exports.geoIntersectOptions = {}));
1605
+ ;
1606
+ function geoBoxIntersect(x1, x2, opt) {
1607
+ if (x1.left === undefined || x2.left === undefined)
1608
+ return false;
1609
+ let l1 = x1.left;
1610
+ let l2 = x2.left;
1611
+ let r1 = x1.right;
1612
+ let r2 = x2.right;
1613
+ let b1 = x1.top; // flip
1614
+ let b2 = x2.top; // flip
1615
+ let t1 = x1.bottom; // flip
1616
+ let t2 = x2.bottom; // flip
1617
+ let cx2 = l2 + (r2 - l2) / 2;
1618
+ let cy2 = t2 + (b2 - t2) / 2;
1619
+ // Note I flipped top and bottom above when extracting,
1620
+ // in order to make below logic work for normal y axis alignment (0 at top).
1621
+ switch (opt) {
1622
+ case geoIntersectOptions.Intersects:
1623
+ return !(l2 > r1 || r2 < l1 || t2 > b1 || b2 < t1);
1624
+ case geoIntersectOptions.Bounds:
1625
+ return l1 <= l2 && t1 <= t2 && r1 >= r2 && b1 >= b2;
1626
+ case geoIntersectOptions.BoundsCenter:
1627
+ return l1 <= cx2 && t1 <= cy2 && r1 >= cx2 && b1 >= cy2;
1628
+ }
1629
+ }
1630
+ function geoIntersect(multi, bbox, opt) {
1631
+ let m = {};
1632
+ let bboxPoly = Poly.boundboxPoly(bbox);
1633
+ multi.forEach((f) => {
1634
+ let box = Poly.boundbox(f);
1635
+ if (geoBoxIntersect(bbox, box, opt)) {
1636
+ if (opt !== geoIntersectOptions.Intersects || Poly.polyIntersects(bboxPoly, f))
1637
+ m[f.properties.id] = f;
1638
+ }
1639
+ });
1640
+ let result = new GeoMultiCollection();
1641
+ result.add('result', null, null, m);
1642
+ return result;
1643
+ }
1644
+ exports.geoIntersect = geoIntersect;
1645
+
1646
+
1647
+ /***/ }),
1648
+
1649
+ /***/ "./lib/geo/vfeature.ts":
1650
+ /*!*****************************!*\
1651
+ !*** ./lib/geo/vfeature.ts ***!
1652
+ \*****************************/
1653
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1654
+
1655
+
1656
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1657
+ if (k2 === undefined) k2 = k;
1658
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
1659
+ }) : (function(o, m, k, k2) {
1660
+ if (k2 === undefined) k2 = k;
1661
+ o[k2] = m[k];
1662
+ }));
1663
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
1664
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1665
+ }) : function(o, v) {
1666
+ o["default"] = v;
1667
+ });
1668
+ var __importStar = (this && this.__importStar) || function (mod) {
1669
+ if (mod && mod.__esModule) return mod;
1670
+ var result = {};
1671
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1672
+ __setModuleDefault(result, mod);
1673
+ return result;
1674
+ };
1675
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
1676
+ exports.computeVFeature = void 0;
1677
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
1678
+ const Poly = __importStar(__webpack_require__(/*! ../poly/all */ "./lib/poly/all.ts"));
1679
+ // Given the topology for a precinct, the bintrie mapping and the list of blocks, construct the
1680
+ // feature data for the virtual feature.
1681
+ //
1682
+ function computeVFeature(topoPrecinct, bintrie, blocks) {
1683
+ let contiguity = new Util.IndexedArray();
1684
+ let block_contiguity = new Util.IndexedArray();
1685
+ let f = Poly.topoMerge(topoPrecinct, blocks);
1686
+ f.properties.datasets = {};
1687
+ blocks.forEach(blockid => {
1688
+ let b = topoPrecinct.objects[blockid];
1689
+ if (b.properties.datasets)
1690
+ Util.deepAccum(f.properties.datasets, b.properties.datasets);
1691
+ if (b.properties.contiguity) {
1692
+ b.properties.contiguity.forEach((id) => {
1693
+ contiguity.set(id === 'OUT_OF_STATE' ? id : bintrie.get(id));
1694
+ });
1695
+ b.properties.contiguity.forEach((id) => {
1696
+ block_contiguity.set(id);
1697
+ });
1698
+ }
1699
+ });
1700
+ f.properties.contiguity = contiguity.asArray();
1701
+ f.properties.block_contiguity = block_contiguity.asArray();
1702
+ f.properties.blocks = blocks;
1703
+ return f;
1704
+ }
1705
+ exports.computeVFeature = computeVFeature;
1706
+
1707
+
1083
1708
  /***/ }),
1084
1709
 
1085
1710
  /***/ "./lib/logabstract/all.ts":
@@ -1109,12 +1734,31 @@ __exportStar(__webpack_require__(/*! ./log */ "./lib/logabstract/log.ts"), expor
1109
1734
  /*!********************************!*\
1110
1735
  !*** ./lib/logabstract/log.ts ***!
1111
1736
  \********************************/
1112
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1737
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1113
1738
 
1114
1739
 
1740
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1741
+ if (k2 === undefined) k2 = k;
1742
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
1743
+ }) : (function(o, m, k, k2) {
1744
+ if (k2 === undefined) k2 = k;
1745
+ o[k2] = m[k];
1746
+ }));
1747
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
1748
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1749
+ }) : function(o, v) {
1750
+ o["default"] = v;
1751
+ });
1752
+ var __importStar = (this && this.__importStar) || function (mod) {
1753
+ if (mod && mod.__esModule) return mod;
1754
+ var result = {};
1755
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1756
+ __setModuleDefault(result, mod);
1757
+ return result;
1758
+ };
1115
1759
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1116
1760
  exports.SyncTimer = exports.AsyncTimer = exports.Timer = void 0;
1117
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
1761
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
1118
1762
  class Timer {
1119
1763
  constructor(ilog, kind, o, verbosity = 0) {
1120
1764
  this.ilog = ilog;
@@ -1175,12 +1819,31 @@ __exportStar(__webpack_require__(/*! ./log */ "./lib/logclient/log.ts"), exports
1175
1819
  /*!******************************!*\
1176
1820
  !*** ./lib/logclient/log.ts ***!
1177
1821
  \******************************/
1178
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1822
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1179
1823
 
1180
1824
 
1825
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1826
+ if (k2 === undefined) k2 = k;
1827
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
1828
+ }) : (function(o, m, k, k2) {
1829
+ if (k2 === undefined) k2 = k;
1830
+ o[k2] = m[k];
1831
+ }));
1832
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
1833
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1834
+ }) : function(o, v) {
1835
+ o["default"] = v;
1836
+ });
1837
+ var __importStar = (this && this.__importStar) || function (mod) {
1838
+ if (mod && mod.__esModule) return mod;
1839
+ var result = {};
1840
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1841
+ __setModuleDefault(result, mod);
1842
+ return result;
1843
+ };
1181
1844
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1182
1845
  exports.create = void 0;
1183
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
1846
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
1184
1847
  class LogManager {
1185
1848
  constructor(env) {
1186
1849
  this.env = env;
@@ -1281,13 +1944,32 @@ __exportStar(__webpack_require__(/*! ./otmaputil */ "./lib/ot-editutil/otmaputil
1281
1944
  /*!***************************************!*\
1282
1945
  !*** ./lib/ot-editutil/oteditutil.ts ***!
1283
1946
  \***************************************/
1284
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1947
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1285
1948
 
1286
1949
 
1950
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1951
+ if (k2 === undefined) k2 = k;
1952
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
1953
+ }) : (function(o, m, k, k2) {
1954
+ if (k2 === undefined) k2 = k;
1955
+ o[k2] = m[k];
1956
+ }));
1957
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
1958
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1959
+ }) : function(o, v) {
1960
+ o["default"] = v;
1961
+ });
1962
+ var __importStar = (this && this.__importStar) || function (mod) {
1963
+ if (mod && mod.__esModule) return mod;
1964
+ var result = {};
1965
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1966
+ __setModuleDefault(result, mod);
1967
+ return result;
1968
+ };
1287
1969
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1288
1970
  exports.OTEditUtil = void 0;
1289
- const OT = __webpack_require__(/*! ../ot-js/all */ "./lib/ot-js/all.ts");
1290
- const DMP = __webpack_require__(/*! diff-match-patch */ "diff-match-patch");
1971
+ const OT = __importStar(__webpack_require__(/*! ../ot-js/all */ "./lib/ot-js/all.ts"));
1972
+ const DMP = __importStar(__webpack_require__(/*! diff-match-patch */ "diff-match-patch"));
1291
1973
  let DiffMatchPatch = new DMP.diff_match_patch();
1292
1974
  let DIFF_DELETE = DMP.DIFF_DELETE;
1293
1975
  let DIFF_INSERT = DMP.DIFF_INSERT;
@@ -1447,13 +2129,32 @@ exports.OTEditUtil = OTEditUtil;
1447
2129
  /*!**************************************!*\
1448
2130
  !*** ./lib/ot-editutil/otmaputil.ts ***!
1449
2131
  \**************************************/
1450
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2132
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1451
2133
 
1452
2134
 
2135
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2136
+ if (k2 === undefined) k2 = k;
2137
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2138
+ }) : (function(o, m, k, k2) {
2139
+ if (k2 === undefined) k2 = k;
2140
+ o[k2] = m[k];
2141
+ }));
2142
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
2143
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
2144
+ }) : function(o, v) {
2145
+ o["default"] = v;
2146
+ });
2147
+ var __importStar = (this && this.__importStar) || function (mod) {
2148
+ if (mod && mod.__esModule) return mod;
2149
+ var result = {};
2150
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
2151
+ __setModuleDefault(result, mod);
2152
+ return result;
2153
+ };
1453
2154
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1454
2155
  exports.Editor = exports.REPLACE = exports.MERGE = void 0;
1455
- const OT = __webpack_require__(/*! ../ot-js/all */ "./lib/ot-js/all.ts");
1456
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
2156
+ const OT = __importStar(__webpack_require__(/*! ../ot-js/all */ "./lib/ot-js/all.ts"));
2157
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
1457
2158
  exports.MERGE = 0;
1458
2159
  exports.REPLACE = 1;
1459
2160
  class Editor {
@@ -1646,12 +2347,31 @@ __exportStar(__webpack_require__(/*! ./otsession */ "./lib/ot-js/otsession.ts"),
1646
2347
  /*!******************************!*\
1647
2348
  !*** ./lib/ot-js/otarray.ts ***!
1648
2349
  \******************************/
1649
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2350
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1650
2351
 
1651
2352
 
2353
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2354
+ if (k2 === undefined) k2 = k;
2355
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2356
+ }) : (function(o, m, k, k2) {
2357
+ if (k2 === undefined) k2 = k;
2358
+ o[k2] = m[k];
2359
+ }));
2360
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
2361
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
2362
+ }) : function(o, v) {
2363
+ o["default"] = v;
2364
+ });
2365
+ var __importStar = (this && this.__importStar) || function (mod) {
2366
+ if (mod && mod.__esModule) return mod;
2367
+ var result = {};
2368
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
2369
+ __setModuleDefault(result, mod);
2370
+ return result;
2371
+ };
1652
2372
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1653
2373
  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;
1654
- const OT = __webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts");
2374
+ const OT = __importStar(__webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts"));
1655
2375
  const TestUnitSize = 4;
1656
2376
  let TestCounter = 0;
1657
2377
  // Array Ops
@@ -2583,13 +3303,32 @@ function counterValue(ops, c) {
2583
3303
  /*!*************************************!*\
2584
3304
  !*** ./lib/ot-js/otclientengine.ts ***!
2585
3305
  \*************************************/
2586
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3306
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2587
3307
 
2588
3308
 
3309
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3310
+ if (k2 === undefined) k2 = k;
3311
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3312
+ }) : (function(o, m, k, k2) {
3313
+ if (k2 === undefined) k2 = k;
3314
+ o[k2] = m[k];
3315
+ }));
3316
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
3317
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
3318
+ }) : function(o, v) {
3319
+ o["default"] = v;
3320
+ });
3321
+ var __importStar = (this && this.__importStar) || function (mod) {
3322
+ if (mod && mod.__esModule) return mod;
3323
+ var result = {};
3324
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3325
+ __setModuleDefault(result, mod);
3326
+ return result;
3327
+ };
2589
3328
  Object.defineProperty(exports, "__esModule", ({ value: true }));
2590
3329
  exports.OTClientEngine = void 0;
2591
- const OTC = __webpack_require__(/*! ./otcomposite */ "./lib/ot-js/otcomposite.ts");
2592
- const OTE = __webpack_require__(/*! ./otengine */ "./lib/ot-js/otengine.ts");
3330
+ const OTC = __importStar(__webpack_require__(/*! ./otcomposite */ "./lib/ot-js/otcomposite.ts"));
3331
+ const OTE = __importStar(__webpack_require__(/*! ./otengine */ "./lib/ot-js/otengine.ts"));
2593
3332
  class OTClientEngine extends OTE.OTEngine {
2594
3333
  // Constructor
2595
3334
  constructor(ilog, rid, cid) {
@@ -2833,15 +3572,34 @@ exports.OTClientEngine = OTClientEngine;
2833
3572
  /*!**********************************!*\
2834
3573
  !*** ./lib/ot-js/otcomposite.ts ***!
2835
3574
  \**********************************/
2836
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3575
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2837
3576
 
2838
3577
 
3578
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3579
+ if (k2 === undefined) k2 = k;
3580
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3581
+ }) : (function(o, m, k, k2) {
3582
+ if (k2 === undefined) k2 = k;
3583
+ o[k2] = m[k];
3584
+ }));
3585
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
3586
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
3587
+ }) : function(o, v) {
3588
+ o["default"] = v;
3589
+ });
3590
+ var __importStar = (this && this.__importStar) || function (mod) {
3591
+ if (mod && mod.__esModule) return mod;
3592
+ var result = {};
3593
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3594
+ __setModuleDefault(result, mod);
3595
+ return result;
3596
+ };
2839
3597
  Object.defineProperty(exports, "__esModule", ({ value: true }));
2840
3598
  exports.OTCompositeResource = exports.clockSeenValue = exports.clockUndoValue = exports.clockInitializeValue = exports.clockFailureValue = exports.clockRandomizeValue = exports.clockTerminateValue = exports.clockInitialValue = void 0;
2841
- const OT = __webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts");
2842
- const OTA = __webpack_require__(/*! ./otarray */ "./lib/ot-js/otarray.ts");
2843
- const OTM = __webpack_require__(/*! ./otmap */ "./lib/ot-js/otmap.ts");
2844
- const OTC = __webpack_require__(/*! ./otcounter */ "./lib/ot-js/otcounter.ts");
3599
+ const OT = __importStar(__webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts"));
3600
+ const OTA = __importStar(__webpack_require__(/*! ./otarray */ "./lib/ot-js/otarray.ts"));
3601
+ const OTM = __importStar(__webpack_require__(/*! ./otmap */ "./lib/ot-js/otmap.ts"));
3602
+ const OTC = __importStar(__webpack_require__(/*! ./otcounter */ "./lib/ot-js/otcounter.ts"));
2845
3603
  exports.clockInitialValue = -1; // Initial value
2846
3604
  exports.clockTerminateValue = -2; // Terminal action from client.
2847
3605
  exports.clockRandomizeValue = -3; // Fill in with random data.
@@ -3032,12 +3790,31 @@ exports.OTCompositeResource = OTCompositeResource;
3032
3790
  /*!********************************!*\
3033
3791
  !*** ./lib/ot-js/otcounter.ts ***!
3034
3792
  \********************************/
3035
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3793
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3036
3794
 
3037
3795
 
3796
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3797
+ if (k2 === undefined) k2 = k;
3798
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3799
+ }) : (function(o, m, k, k2) {
3800
+ if (k2 === undefined) k2 = k;
3801
+ o[k2] = m[k];
3802
+ }));
3803
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
3804
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
3805
+ }) : function(o, v) {
3806
+ o["default"] = v;
3807
+ });
3808
+ var __importStar = (this && this.__importStar) || function (mod) {
3809
+ if (mod && mod.__esModule) return mod;
3810
+ var result = {};
3811
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3812
+ __setModuleDefault(result, mod);
3813
+ return result;
3814
+ };
3038
3815
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3039
3816
  exports.OTCounterResource = exports.OpCounterDel = exports.OpCounterAdd = void 0;
3040
- const OT = __webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts");
3817
+ const OT = __importStar(__webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts"));
3041
3818
  // This implements OT for a simple map of counters. Instead of a new value replacing the
3042
3819
  // keyed value, values are added together. This allows a simple accumulating counter.
3043
3820
  // Possible future additions:
@@ -3207,13 +3984,32 @@ exports.OTEngine = OTEngine;
3207
3984
  /*!****************************!*\
3208
3985
  !*** ./lib/ot-js/otmap.ts ***!
3209
3986
  \****************************/
3210
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3987
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3211
3988
 
3212
3989
 
3990
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3991
+ if (k2 === undefined) k2 = k;
3992
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3993
+ }) : (function(o, m, k, k2) {
3994
+ if (k2 === undefined) k2 = k;
3995
+ o[k2] = m[k];
3996
+ }));
3997
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
3998
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
3999
+ }) : function(o, v) {
4000
+ o["default"] = v;
4001
+ });
4002
+ var __importStar = (this && this.__importStar) || function (mod) {
4003
+ if (mod && mod.__esModule) return mod;
4004
+ var result = {};
4005
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4006
+ __setModuleDefault(result, mod);
4007
+ return result;
4008
+ };
3213
4009
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3214
4010
  exports.OTMapResource = exports.OpMapDel = exports.OpMapSet = void 0;
3215
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
3216
- const OT = __webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts");
4011
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
4012
+ const OT = __importStar(__webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts"));
3217
4013
  // This implements OT for a dictionary of objects. OT is pretty trivial for maps - last wins.
3218
4014
  exports.OpMapSet = 1;
3219
4015
  exports.OpMapDel = 2;
@@ -3327,14 +4123,33 @@ exports.OTMapResource = OTMapResource;
3327
4123
  /*!*************************************!*\
3328
4124
  !*** ./lib/ot-js/otserverengine.ts ***!
3329
4125
  \*************************************/
3330
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4126
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3331
4127
 
3332
4128
 
4129
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4130
+ if (k2 === undefined) k2 = k;
4131
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4132
+ }) : (function(o, m, k, k2) {
4133
+ if (k2 === undefined) k2 = k;
4134
+ o[k2] = m[k];
4135
+ }));
4136
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
4137
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
4138
+ }) : function(o, v) {
4139
+ o["default"] = v;
4140
+ });
4141
+ var __importStar = (this && this.__importStar) || function (mod) {
4142
+ if (mod && mod.__esModule) return mod;
4143
+ var result = {};
4144
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4145
+ __setModuleDefault(result, mod);
4146
+ return result;
4147
+ };
3333
4148
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3334
4149
  exports.OTServerEngine = exports.ClientIDForServer = void 0;
3335
- const OTC = __webpack_require__(/*! ./otcomposite */ "./lib/ot-js/otcomposite.ts");
3336
- const OTS = __webpack_require__(/*! ./otsession */ "./lib/ot-js/otsession.ts");
3337
- const OTE = __webpack_require__(/*! ./otengine */ "./lib/ot-js/otengine.ts");
4150
+ const OTC = __importStar(__webpack_require__(/*! ./otcomposite */ "./lib/ot-js/otcomposite.ts"));
4151
+ const OTS = __importStar(__webpack_require__(/*! ./otsession */ "./lib/ot-js/otsession.ts"));
4152
+ const OTE = __importStar(__webpack_require__(/*! ./otengine */ "./lib/ot-js/otengine.ts"));
3338
4153
  exports.ClientIDForServer = '-Server-';
3339
4154
  class OTServerEngine extends OTE.OTEngine {
3340
4155
  // Constructor
@@ -3572,7 +4387,7 @@ exports.OTServerEngine = OTServerEngine;
3572
4387
 
3573
4388
 
3574
4389
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3575
- exports.SessionFilterFunction = exports.accessMapFindUser = exports.accessFindUser = exports.ServerStateMaintenance = exports.ServerStateRunning = exports.PermAll = exports.PermEdit = exports.PermAdmin = exports.PermOwner = exports.PermWrite = exports.PermRead = exports.PermNone = exports.FilterCount = 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;
4390
+ exports.SessionFilterFunction = exports.accessMapFindUser = exports.accessFindUser = exports.ServerStateMaintenance = exports.ServerStateRunning = exports.PermAll = exports.PermEdit = exports.PermAdmin = exports.PermOwner = exports.PermWrite = exports.PermRead = exports.PermNone = exports.FilterCount = 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;
3576
4391
  // Errors
3577
4392
  exports.ESuccess = 0; // Generic success
3578
4393
  exports.EFail = 1; // Generic failure
@@ -3597,7 +4412,8 @@ exports.FilterRecent = 3;
3597
4412
  exports.FilterTrash = 4;
3598
4413
  exports.FilterPublic = 5;
3599
4414
  exports.FilterOfficial = 6;
3600
- exports.FilterCount = 7;
4415
+ exports.FilterCOI = 7;
4416
+ exports.FilterCount = 8;
3601
4417
  // Permissions
3602
4418
  exports.PermNone = 0; // No permissions
3603
4419
  exports.PermRead = 1; // Can view
@@ -3765,13 +4581,32 @@ __exportStar(__webpack_require__(/*! ./shamos */ "./lib/poly/shamos.ts"), export
3765
4581
  /*!***************************!*\
3766
4582
  !*** ./lib/poly/blend.ts ***!
3767
4583
  \***************************/
3768
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4584
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3769
4585
 
3770
4586
 
4587
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4588
+ if (k2 === undefined) k2 = k;
4589
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4590
+ }) : (function(o, m, k, k2) {
4591
+ if (k2 === undefined) k2 = k;
4592
+ o[k2] = m[k];
4593
+ }));
4594
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
4595
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
4596
+ }) : function(o, v) {
4597
+ o["default"] = v;
4598
+ });
4599
+ var __importStar = (this && this.__importStar) || function (mod) {
4600
+ if (mod && mod.__esModule) return mod;
4601
+ var result = {};
4602
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4603
+ __setModuleDefault(result, mod);
4604
+ return result;
4605
+ };
3771
4606
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3772
4607
  exports.blend = void 0;
3773
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
3774
- const PP = __webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts");
4608
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
4609
+ const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
3775
4610
  // Takes array of polygon or multi-polygon coordinate structures and returns a single multi-polygon
3776
4611
  // structure. The coordinates may be passed in using packed format.
3777
4612
  function blend(polys) {
@@ -3800,12 +4635,31 @@ exports.blend = blend;
3800
4635
  /*!******************************!*\
3801
4636
  !*** ./lib/poly/boundbox.ts ***!
3802
4637
  \******************************/
3803
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4638
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3804
4639
 
3805
4640
 
4641
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4642
+ if (k2 === undefined) k2 = k;
4643
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4644
+ }) : (function(o, m, k, k2) {
4645
+ if (k2 === undefined) k2 = k;
4646
+ o[k2] = m[k];
4647
+ }));
4648
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
4649
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
4650
+ }) : function(o, v) {
4651
+ o["default"] = v;
4652
+ });
4653
+ var __importStar = (this && this.__importStar) || function (mod) {
4654
+ if (mod && mod.__esModule) return mod;
4655
+ var result = {};
4656
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4657
+ __setModuleDefault(result, mod);
4658
+ return result;
4659
+ };
3806
4660
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3807
4661
  exports.boundboxIntersects = exports.boundboxArea = exports.boundboxPoly = exports.boundbox = exports.boundboxExtend = exports.clipLon = exports.boundboxCY = exports.boundboxCX = exports.boundboxHeight = exports.boundboxWidth = void 0;
3808
- const P = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
4662
+ const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
3809
4663
  function boundboxWidth(bb) { return Math.abs(bb.right - bb.left); }
3810
4664
  exports.boundboxWidth = boundboxWidth;
3811
4665
  function boundboxHeight(bb) { return Math.abs(bb.bottom - bb.top); }
@@ -3887,16 +4741,35 @@ exports.boundboxIntersects = boundboxIntersects;
3887
4741
  /*!*******************************!*\
3888
4742
  !*** ./lib/poly/cartesian.ts ***!
3889
4743
  \*******************************/
3890
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4744
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3891
4745
 
3892
4746
 
3893
4747
  //
3894
4748
  // GEO-FEATURES UTILITIES
3895
4749
  //
4750
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4751
+ if (k2 === undefined) k2 = k;
4752
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4753
+ }) : (function(o, m, k, k2) {
4754
+ if (k2 === undefined) k2 = k;
4755
+ o[k2] = m[k];
4756
+ }));
4757
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
4758
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
4759
+ }) : function(o, v) {
4760
+ o["default"] = v;
4761
+ });
4762
+ var __importStar = (this && this.__importStar) || function (mod) {
4763
+ if (mod && mod.__esModule) return mod;
4764
+ var result = {};
4765
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4766
+ __setModuleDefault(result, mod);
4767
+ return result;
4768
+ };
3896
4769
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3897
4770
  exports.polyDiameterFlat = exports.polyPerimeterFlat = exports.polyAreaFlat = exports.polyParts = void 0;
3898
- const P = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
3899
- const PP = __webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts");
4771
+ const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
4772
+ const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
3900
4773
  // HELPER
3901
4774
  function bufferToRing(b, s, nPoints) {
3902
4775
  let r = [];
@@ -4001,7 +4874,7 @@ exports.polyDiameterFlat = polyDiameterFlat;
4001
4874
  /*!*********************************!*\
4002
4875
  !*** ./lib/poly/graham-scan.ts ***!
4003
4876
  \*********************************/
4004
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4877
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
4005
4878
 
4006
4879
 
4007
4880
  //
@@ -4012,10 +4885,29 @@ exports.polyDiameterFlat = polyDiameterFlat;
4012
4885
  * https://www.tutorialspoint.com/Graham-Scan-Algorithm <<< pseudo code
4013
4886
  * http://brian3kb.github.io/graham_scan_js/ <<< basis for this implementation
4014
4887
  */
4888
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4889
+ if (k2 === undefined) k2 = k;
4890
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4891
+ }) : (function(o, m, k, k2) {
4892
+ if (k2 === undefined) k2 = k;
4893
+ o[k2] = m[k];
4894
+ }));
4895
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
4896
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
4897
+ }) : function(o, v) {
4898
+ o["default"] = v;
4899
+ });
4900
+ var __importStar = (this && this.__importStar) || function (mod) {
4901
+ if (mod && mod.__esModule) return mod;
4902
+ var result = {};
4903
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4904
+ __setModuleDefault(result, mod);
4905
+ return result;
4906
+ };
4015
4907
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4016
4908
  exports.makeConvexHullGrahamScan = void 0;
4017
4909
  const poly_1 = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
4018
- const PP = __webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts");
4910
+ const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
4019
4911
  function makeConvexHullGrahamScan(poly, options) {
4020
4912
  let points = getExteriorPoints(poly);
4021
4913
  if (points == null)
@@ -4554,12 +5446,31 @@ function protect(condition, message) {
4554
5446
  /*!******************************!*\
4555
5447
  !*** ./lib/poly/minbound.ts ***!
4556
5448
  \******************************/
4557
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5449
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
4558
5450
 
4559
5451
 
4560
5452
  //
4561
5453
  // MINIMUM BOUNDING RECTANGLE - aka minimum area rectangle -or- smallest enclosing rectangle
4562
5454
  //
5455
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5456
+ if (k2 === undefined) k2 = k;
5457
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5458
+ }) : (function(o, m, k, k2) {
5459
+ if (k2 === undefined) k2 = k;
5460
+ o[k2] = m[k];
5461
+ }));
5462
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
5463
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
5464
+ }) : function(o, v) {
5465
+ o["default"] = v;
5466
+ });
5467
+ var __importStar = (this && this.__importStar) || function (mod) {
5468
+ if (mod && mod.__esModule) return mod;
5469
+ var result = {};
5470
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5471
+ __setModuleDefault(result, mod);
5472
+ return result;
5473
+ };
4563
5474
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4564
5475
  exports.minimumBoundingRectangle = void 0;
4565
5476
  //
@@ -4594,7 +5505,7 @@ MBR <- function(p) {
4594
5505
  // THIS RE-IMPLEMENTS THE R IN TYPESCRIPT, USING CUSTOM MATRIX OPERATIONS
4595
5506
  //
4596
5507
  const poly_1 = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
4597
- const M = __webpack_require__(/*! ./matrix */ "./lib/poly/matrix.ts");
5508
+ const M = __importStar(__webpack_require__(/*! ./matrix */ "./lib/poly/matrix.ts"));
4598
5509
  // For point addressing
4599
5510
  const X = 0, Y = 1;
4600
5511
  function minimumBoundingRectangle(poly) {
@@ -4749,13 +5660,32 @@ export function minimumBoundingRectangle(poly: any): any
4749
5660
  /*!**************************!*\
4750
5661
  !*** ./lib/poly/poly.ts ***!
4751
5662
  \**************************/
4752
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5663
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
4753
5664
 
4754
5665
 
5666
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5667
+ if (k2 === undefined) k2 = k;
5668
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5669
+ }) : (function(o, m, k, k2) {
5670
+ if (k2 === undefined) k2 = k;
5671
+ o[k2] = m[k];
5672
+ }));
5673
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
5674
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
5675
+ }) : function(o, v) {
5676
+ o["default"] = v;
5677
+ });
5678
+ var __importStar = (this && this.__importStar) || function (mod) {
5679
+ if (mod && mod.__esModule) return mod;
5680
+ var result = {};
5681
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5682
+ __setModuleDefault(result, mod);
5683
+ return result;
5684
+ };
4755
5685
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4756
5686
  exports.polyRewindRings = exports.featureRewind = 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;
4757
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
4758
- const PP = __webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts");
5687
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
5688
+ const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
4759
5689
  const graham_scan_1 = __webpack_require__(/*! ./graham-scan */ "./lib/poly/graham-scan.ts");
4760
5690
  exports.DefaultTickOptions = { maxLeafCount: 256, maxDepth: 20, tickStep: 1 };
4761
5691
  // Internal utilities
@@ -5365,14 +6295,33 @@ function twoTimesArea(x2, x1, y2, y1) {
5365
6295
  /*!*****************************!*\
5366
6296
  !*** ./lib/poly/polybin.ts ***!
5367
6297
  \*****************************/
5368
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6298
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
5369
6299
 
5370
6300
 
6301
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6302
+ if (k2 === undefined) k2 = k;
6303
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
6304
+ }) : (function(o, m, k, k2) {
6305
+ if (k2 === undefined) k2 = k;
6306
+ o[k2] = m[k];
6307
+ }));
6308
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
6309
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
6310
+ }) : function(o, v) {
6311
+ o["default"] = v;
6312
+ });
6313
+ var __importStar = (this && this.__importStar) || function (mod) {
6314
+ if (mod && mod.__esModule) return mod;
6315
+ var result = {};
6316
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6317
+ __setModuleDefault(result, mod);
6318
+ return result;
6319
+ };
5371
6320
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5372
6321
  exports.topoFromBuffer = exports.topoToBuffer = exports.unpackCollection = exports.packCollection = void 0;
5373
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
5374
- const PP = __webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts");
5375
- const T = __webpack_require__(/*! ./topo */ "./lib/poly/topo.ts");
6322
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
6323
+ const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
6324
+ const T = __importStar(__webpack_require__(/*! ./topo */ "./lib/poly/topo.ts"));
5376
6325
  // Packed Buffer format:
5377
6326
  //
5378
6327
  // (strings are packed as UTF8 bytes, padded to 4 byte boundary)
@@ -5570,14 +6519,36 @@ exports.topoFromBuffer = topoFromBuffer;
5570
6519
  /*!*******************************!*\
5571
6520
  !*** ./lib/poly/polylabel.ts ***!
5572
6521
  \*******************************/
5573
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6522
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
5574
6523
 
5575
6524
 
6525
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6526
+ if (k2 === undefined) k2 = k;
6527
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
6528
+ }) : (function(o, m, k, k2) {
6529
+ if (k2 === undefined) k2 = k;
6530
+ o[k2] = m[k];
6531
+ }));
6532
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
6533
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
6534
+ }) : function(o, v) {
6535
+ o["default"] = v;
6536
+ });
6537
+ var __importStar = (this && this.__importStar) || function (mod) {
6538
+ if (mod && mod.__esModule) return mod;
6539
+ var result = {};
6540
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6541
+ __setModuleDefault(result, mod);
6542
+ return result;
6543
+ };
6544
+ var __importDefault = (this && this.__importDefault) || function (mod) {
6545
+ return (mod && mod.__esModule) ? mod : { "default": mod };
6546
+ };
5576
6547
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5577
6548
  exports.polyLabel = void 0;
5578
- const tinyqueue_1 = __webpack_require__(/*! tinyqueue */ "tinyqueue");
5579
- const P = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
5580
- const PP = __webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts");
6549
+ const tinyqueue_1 = __importDefault(__webpack_require__(/*! tinyqueue */ "tinyqueue"));
6550
+ const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
6551
+ const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
5581
6552
  //
5582
6553
  // polyLabel: given polygon, return contained point furthest from any edge, and that distance
5583
6554
  //
@@ -5743,13 +6714,32 @@ function getSegDistSq(px, py, ax, ay, bx, by) {
5743
6714
  /*!******************************!*\
5744
6715
  !*** ./lib/poly/polypack.ts ***!
5745
6716
  \******************************/
5746
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6717
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
5747
6718
 
5748
6719
 
6720
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6721
+ if (k2 === undefined) k2 = k;
6722
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
6723
+ }) : (function(o, m, k, k2) {
6724
+ if (k2 === undefined) k2 = k;
6725
+ o[k2] = m[k];
6726
+ }));
6727
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
6728
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
6729
+ }) : function(o, v) {
6730
+ o["default"] = v;
6731
+ });
6732
+ var __importStar = (this && this.__importStar) || function (mod) {
6733
+ if (mod && mod.__esModule) return mod;
6734
+ var result = {};
6735
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6736
+ __setModuleDefault(result, mod);
6737
+ return result;
6738
+ };
5749
6739
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5750
6740
  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;
5751
6741
  // Shared libraries
5752
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
6742
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
5753
6743
  function polyPackSize(coords) {
5754
6744
  // Null feature?
5755
6745
  if (coords == null || (coords.length !== undefined && coords.length == 0))
@@ -5949,7 +6939,9 @@ function polyPack(coords, prepack) {
5949
6939
  coords = coords.geometry.coordinates;
5950
6940
  // Transparently handle polygon or multi-polygon
5951
6941
  let depth = Util.depthof(coords);
5952
- if (depth == 3)
6942
+ if (depth == 2)
6943
+ coords = [[[coords]]];
6944
+ else if (depth == 3)
5953
6945
  coords = [[coords]];
5954
6946
  else if (depth == 4)
5955
6947
  coords = [coords];
@@ -6076,9 +7068,16 @@ exports.featurePack = featurePack;
6076
7068
  function featureUnpack(f) {
6077
7069
  if (f && f.geometry && f.geometry.packed !== undefined) {
6078
7070
  f.geometry.coordinates = polyUnpack(f.geometry.packed);
7071
+ let depth = Util.depthof(f.geometry.coordinates);
6079
7072
  // Check for oops, optimized away the multipolygon in polyUnpack
6080
- if (f.geometry.type === 'MultiPolygon' && Util.depthof(f.geometry.coordinates) === 4)
7073
+ if (f.geometry.type === 'MultiPolygon' && depth === 4)
6081
7074
  f.geometry.coordinates = [f.geometry.coordinates];
7075
+ else if (f.geometry.type === 'Point' && depth != 2) {
7076
+ while (depth > 2) {
7077
+ f.geometry.coordinates = f.geometry.coordinates[0];
7078
+ depth = Util.depthof(f.geometry.coordinates);
7079
+ }
7080
+ }
6082
7081
  delete f.geometry.packed;
6083
7082
  }
6084
7083
  else if (f.type && f.type === 'FeatureCollection' && f.features) {
@@ -6153,13 +7152,32 @@ exports.featureUnpackString = featureUnpackString;
6153
7152
  /*!*******************************!*\
6154
7153
  !*** ./lib/poly/polyround.ts ***!
6155
7154
  \*******************************/
6156
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7155
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6157
7156
 
6158
7157
 
7158
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7159
+ if (k2 === undefined) k2 = k;
7160
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
7161
+ }) : (function(o, m, k, k2) {
7162
+ if (k2 === undefined) k2 = k;
7163
+ o[k2] = m[k];
7164
+ }));
7165
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
7166
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
7167
+ }) : function(o, v) {
7168
+ o["default"] = v;
7169
+ });
7170
+ var __importStar = (this && this.__importStar) || function (mod) {
7171
+ if (mod && mod.__esModule) return mod;
7172
+ var result = {};
7173
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7174
+ __setModuleDefault(result, mod);
7175
+ return result;
7176
+ };
6159
7177
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6160
7178
  exports.polyRound = void 0;
6161
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
6162
- const PP = __webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts");
7179
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
7180
+ const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
6163
7181
  // Round feature geometry to 6 decimal precision
6164
7182
  function polyRound(o) {
6165
7183
  if (o) {
@@ -6192,12 +7210,31 @@ exports.polyRound = polyRound;
6192
7210
  /*!**********************************!*\
6193
7211
  !*** ./lib/poly/polysimplify.ts ***!
6194
7212
  \**********************************/
6195
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7213
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6196
7214
 
6197
7215
 
7216
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7217
+ if (k2 === undefined) k2 = k;
7218
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
7219
+ }) : (function(o, m, k, k2) {
7220
+ if (k2 === undefined) k2 = k;
7221
+ o[k2] = m[k];
7222
+ }));
7223
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
7224
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
7225
+ }) : function(o, v) {
7226
+ o["default"] = v;
7227
+ });
7228
+ var __importStar = (this && this.__importStar) || function (mod) {
7229
+ if (mod && mod.__esModule) return mod;
7230
+ var result = {};
7231
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7232
+ __setModuleDefault(result, mod);
7233
+ return result;
7234
+ };
6198
7235
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6199
7236
  exports.polySimplify = void 0;
6200
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
7237
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
6201
7238
  const simplify_1 = __webpack_require__(/*! ./simplify */ "./lib/poly/simplify.ts");
6202
7239
  function polySimplify(poly, tolerance = 0.0001) {
6203
7240
  if (poly == null)
@@ -6226,21 +7263,40 @@ exports.polySimplify = polySimplify;
6226
7263
  /*!**************************!*\
6227
7264
  !*** ./lib/poly/quad.ts ***!
6228
7265
  \**************************/
6229
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7266
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6230
7267
 
6231
7268
 
7269
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7270
+ if (k2 === undefined) k2 = k;
7271
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
7272
+ }) : (function(o, m, k, k2) {
7273
+ if (k2 === undefined) k2 = k;
7274
+ o[k2] = m[k];
7275
+ }));
7276
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
7277
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
7278
+ }) : function(o, v) {
7279
+ o["default"] = v;
7280
+ });
7281
+ var __importStar = (this && this.__importStar) || function (mod) {
7282
+ if (mod && mod.__esModule) return mod;
7283
+ var result = {};
7284
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7285
+ __setModuleDefault(result, mod);
7286
+ return result;
7287
+ };
6232
7288
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6233
7289
  exports.FsmQuadTree = exports.DefaultQuadOptions = exports.unionPolys = void 0;
6234
7290
  // Public libraries
6235
- const PC = __webpack_require__(/*! polygon-clipping */ "polygon-clipping");
7291
+ const PC = __importStar(__webpack_require__(/*! polygon-clipping */ "polygon-clipping"));
6236
7292
  // Shared libraries
6237
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
6238
- const FSM = __webpack_require__(/*! ../fsm/all */ "./lib/fsm/all.ts");
7293
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
7294
+ const FSM = __importStar(__webpack_require__(/*! ../fsm/all */ "./lib/fsm/all.ts"));
6239
7295
  // Local libraries
6240
- const Poly = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
6241
- const PP = __webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts");
6242
- const BB = __webpack_require__(/*! ./boundbox */ "./lib/poly/boundbox.ts");
6243
- const PR = __webpack_require__(/*! ./polyround */ "./lib/poly/polyround.ts");
7296
+ const Poly = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
7297
+ const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
7298
+ const BB = __importStar(__webpack_require__(/*! ./boundbox */ "./lib/poly/boundbox.ts"));
7299
+ const PR = __importStar(__webpack_require__(/*! ./polyround */ "./lib/poly/polyround.ts"));
6244
7300
  let _union = undefined;
6245
7301
  let anyPC = PC;
6246
7302
  if (anyPC.union)
@@ -6435,13 +7491,32 @@ exports.FsmQuadTree = FsmQuadTree;
6435
7491
  /*!***********************************!*\
6436
7492
  !*** ./lib/poly/selfintersect.ts ***!
6437
7493
  \***********************************/
6438
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7494
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6439
7495
 
6440
7496
 
7497
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7498
+ if (k2 === undefined) k2 = k;
7499
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
7500
+ }) : (function(o, m, k, k2) {
7501
+ if (k2 === undefined) k2 = k;
7502
+ o[k2] = m[k];
7503
+ }));
7504
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
7505
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
7506
+ }) : function(o, v) {
7507
+ o["default"] = v;
7508
+ });
7509
+ var __importStar = (this && this.__importStar) || function (mod) {
7510
+ if (mod && mod.__esModule) return mod;
7511
+ var result = {};
7512
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7513
+ __setModuleDefault(result, mod);
7514
+ return result;
7515
+ };
6441
7516
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6442
7517
  exports.selfIntersect = void 0;
6443
- const P = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
6444
- const PP = __webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts");
7518
+ const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
7519
+ const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
6445
7520
  // Given three colinear points p, q, r, the function checks if
6446
7521
  // point q lies on line segment 'pr'
6447
7522
  function onSegment(px, py, qx, qy, rx, ry) {
@@ -6523,13 +7598,35 @@ exports.selfIntersect = selfIntersect;
6523
7598
  /*!****************************!*\
6524
7599
  !*** ./lib/poly/shamos.ts ***!
6525
7600
  \****************************/
6526
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7601
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6527
7602
 
6528
7603
 
7604
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7605
+ if (k2 === undefined) k2 = k;
7606
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
7607
+ }) : (function(o, m, k, k2) {
7608
+ if (k2 === undefined) k2 = k;
7609
+ o[k2] = m[k];
7610
+ }));
7611
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
7612
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
7613
+ }) : function(o, v) {
7614
+ o["default"] = v;
7615
+ });
7616
+ var __importStar = (this && this.__importStar) || function (mod) {
7617
+ if (mod && mod.__esModule) return mod;
7618
+ var result = {};
7619
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7620
+ __setModuleDefault(result, mod);
7621
+ return result;
7622
+ };
7623
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7624
+ return (mod && mod.__esModule) ? mod : { "default": mod };
7625
+ };
6529
7626
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6530
7627
  exports.selfIntersectFast = void 0;
6531
- const P = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
6532
- const PP = __webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts");
7628
+ const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
7629
+ const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
6533
7630
  // Adapted from rowanwins/shamos-hoey
6534
7631
  /*
6535
7632
  MIT License
@@ -6555,8 +7652,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
6555
7652
  SOFTWARE.
6556
7653
  */
6557
7654
  // External libraries
6558
- const tinyqueue_1 = __webpack_require__(/*! tinyqueue */ "tinyqueue");
6559
- const splaytree_1 = __webpack_require__(/*! splaytree */ "splaytree");
7655
+ const tinyqueue_1 = __importDefault(__webpack_require__(/*! tinyqueue */ "tinyqueue"));
7656
+ const splaytree_1 = __importDefault(__webpack_require__(/*! splaytree */ "splaytree"));
6560
7657
  class Event {
6561
7658
  constructor(x, y) {
6562
7659
  this.x = x;
@@ -6853,22 +7950,41 @@ exports.simplify = simplify;
6853
7950
  /*!**************************!*\
6854
7951
  !*** ./lib/poly/topo.ts ***!
6855
7952
  \**************************/
6856
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7953
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
6857
7954
 
6858
7955
 
7956
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7957
+ if (k2 === undefined) k2 = k;
7958
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
7959
+ }) : (function(o, m, k, k2) {
7960
+ if (k2 === undefined) k2 = k;
7961
+ o[k2] = m[k];
7962
+ }));
7963
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
7964
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
7965
+ }) : function(o, v) {
7966
+ o["default"] = v;
7967
+ });
7968
+ var __importStar = (this && this.__importStar) || function (mod) {
7969
+ if (mod && mod.__esModule) return mod;
7970
+ var result = {};
7971
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
7972
+ __setModuleDefault(result, mod);
7973
+ return result;
7974
+ };
6859
7975
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6860
7976
  exports.topoUnpack = exports.topoPack = exports.topoPacked = exports.FsmTopoUnion = exports.topoMergeFeatures = exports.topoMerge = exports.topoSimplifyCollection = exports.topoToCollection = exports.topoToFeature = exports.topoContiguity = exports.topoFromCollection = void 0;
6861
7977
  // Forked version that supports packing
6862
- const TopoClient = __webpack_require__(/*! @dra2020/topojson-client */ "@dra2020/topojson-client");
7978
+ const TopoClient = __importStar(__webpack_require__(/*! @dra2020/topojson-client */ "@dra2020/topojson-client"));
6863
7979
  // Forked version that fixes self-looping hole problem
6864
- const TopoServer = __webpack_require__(/*! @dra2020/topojson-server */ "@dra2020/topojson-server");
7980
+ const TopoServer = __importStar(__webpack_require__(/*! @dra2020/topojson-server */ "@dra2020/topojson-server"));
6865
7981
  // Forked version that fixes performance problem
6866
- const TopoSimplify = __webpack_require__(/*! @dra2020/topojson-simplify */ "@dra2020/topojson-simplify");
6867
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
6868
- const FSM = __webpack_require__(/*! ../fsm/all */ "./lib/fsm/all.ts");
6869
- const P = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
6870
- const PP = __webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts");
6871
- const PL = __webpack_require__(/*! ./polylabel */ "./lib/poly/polylabel.ts");
7982
+ const TopoSimplify = __importStar(__webpack_require__(/*! @dra2020/topojson-simplify */ "@dra2020/topojson-simplify"));
7983
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
7984
+ const FSM = __importStar(__webpack_require__(/*! ../fsm/all */ "./lib/fsm/all.ts"));
7985
+ const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
7986
+ const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
7987
+ const PL = __importStar(__webpack_require__(/*! ./polylabel */ "./lib/poly/polylabel.ts"));
6872
7988
  const shamos_1 = __webpack_require__(/*! ./shamos */ "./lib/poly/shamos.ts");
6873
7989
  function getGEOID(f) {
6874
7990
  if (f.features && f.features.length)
@@ -6912,24 +8028,19 @@ function ringsCancel(outerPoly, innerRing) {
6912
8028
  function correctGeometry(f) {
6913
8029
  if (f && f.geometry && f.geometry.type === 'MultiPolygon' && f.geometry.coordinates) {
6914
8030
  let multiPoly = f.geometry.coordinates;
6915
- /* Comment this out right now - might have been do to not rewinding merge output
6916
- // topojson will under certain circumstances return a MultiPolygon with the first Polygon containing holes
6917
- // that are precisely filled by a subsequent polygon. We make a secondary union pass to try to correct for this.
6918
- // If we have a really degenerate multipolygon (test above some number of polygons) omit this expensive pass
6919
- // since cleanup is unlikely.
6920
- if (multiPoly.length > 1 && multiPoly.length < 50)
6921
- {
6922
- let result = Q.unionPolys(multiPoly);
6923
- if (Util.depthof(result) == 4) result = [ result ];
6924
- multiPoly = result;
6925
- }
6926
- */
6927
8031
  // Convert degenerate MultiPolygon to Polygon
6928
8032
  if (multiPoly.length == 1) {
6929
8033
  f.geometry.type = 'Polygon';
6930
8034
  f.geometry.coordinates = multiPoly[0];
6931
8035
  }
6932
8036
  }
8037
+ if (f && f.geometry && f.geometry.type === 'Point' && f.geometry.coordinates) {
8038
+ while (Array.isArray(f.geometry.coordinates[0]))
8039
+ f.geometry.coordinates = f.geometry.coordinates[0];
8040
+ }
8041
+ else
8042
+ // TopoJSON does not guarantee proper winding order which messes up later processing. Fix it.
8043
+ P.featureRewind(f);
6933
8044
  return f;
6934
8045
  }
6935
8046
  function topoContiguity(topo) {
@@ -7023,6 +8134,9 @@ function bigTimeString(ms) {
7023
8134
  return `${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
7024
8135
  }
7025
8136
  const DefaultSimplifyOptions = { minArea: 500 };
8137
+ function log(s) {
8138
+ //console.log(s);
8139
+ }
7026
8140
  //
7027
8141
  // topoSimplifyCollection:
7028
8142
  // This implements our simplification strategy for block/precinct level shapes. The basic idea is to
@@ -7045,10 +8159,10 @@ function topoSimplifyCollection(col, options) {
7045
8159
  let elapsedTotal = new Util.Elapsed();
7046
8160
  let elapsed = new Util.Elapsed();
7047
8161
  let topo = topoFromCollection(col);
7048
- console.log(`topoSimplifyCollection: fromCollection: ${Math.round(elapsed.ms())}ms`);
8162
+ log(`topoSimplifyCollection: fromCollection: ${Math.round(elapsed.ms())}ms`);
7049
8163
  elapsed.start();
7050
8164
  topo = TopoSimplify.presimplify(topo, TopoSimplify['sphericalTriangleArea']);
7051
- console.log(`topoSimplifyCollection: presimplify: ${Math.round(elapsed.ms())}ms`);
8165
+ log(`topoSimplifyCollection: presimplify: ${Math.round(elapsed.ms())}ms`);
7052
8166
  elapsed.start();
7053
8167
  // Keep iterating on removing simplification from degenerate shapes
7054
8168
  let nTries = 1;
@@ -7065,6 +8179,9 @@ function topoSimplifyCollection(col, options) {
7065
8179
  col.features.forEach((f) => {
7066
8180
  let oOld = topo.objects[f.properties.id];
7067
8181
  let oNew = testtopo.objects[f.properties.id];
8182
+ // Ignore points
8183
+ if (f.geometry && f.geometry.type === 'Point')
8184
+ keepTiny.set(f, f);
7068
8185
  if (!keepTiny.has(f)) {
7069
8186
  // Walk through each polygon of a multipolygon separately since I may have a large non-degenerate
7070
8187
  // shape combined with degenerate smaller shapes that I want to identify. I do not examine holes
@@ -7104,11 +8221,11 @@ function topoSimplifyCollection(col, options) {
7104
8221
  }
7105
8222
  }
7106
8223
  });
7107
- console.log(`topoSimplifyCollection: pass ${nTries}: ${nBad} (${nTiny} tiny) of ${col.features.length} features are degenerate`);
8224
+ log(`topoSimplifyCollection: pass ${nTries}: ${nBad} (${nTiny} tiny) of ${col.features.length} features are degenerate`);
7108
8225
  // If not making progress, keep more points
7109
8226
  if (nBad >= nBadLast) {
7110
8227
  keepweight /= 10;
7111
- console.log(`topoSimplifyCollection: pass ${nTries}: reducing weight limit to ${keepweight}`);
8228
+ log(`topoSimplifyCollection: pass ${nTries}: reducing weight limit to ${keepweight}`);
7112
8229
  }
7113
8230
  nBadLast = nBad;
7114
8231
  if (nBad && nTries > MAX_TRIES)
@@ -7120,7 +8237,7 @@ function topoSimplifyCollection(col, options) {
7120
8237
  }
7121
8238
  nTries++;
7122
8239
  }
7123
- console.log(`topoSimplifyCollection: total elapsed time: ${bigTimeString(elapsedTotal.ms())}`);
8240
+ log(`topoSimplifyCollection: total elapsed time: ${bigTimeString(elapsedTotal.ms())}`);
7124
8241
  return col;
7125
8242
  }
7126
8243
  exports.topoSimplifyCollection = topoSimplifyCollection;
@@ -7129,27 +8246,7 @@ function topoMerge(topo, geoids) {
7129
8246
  return null;
7130
8247
  let objects = [];
7131
8248
  geoids.forEach((geoid) => objects.push(topo.objects[geoid]));
7132
- let f = correctGeometry({ type: 'Feature', properties: {}, geometry: TopoClient.merge(topo, objects) });
7133
- P.featureRewind(f);
7134
- /* Comment out for now - may be due to merge output needing to be rewound
7135
- // If I get a bad output from topoMerge, just do more expensive poly union. This can happen if input polygons
7136
- // are a little funky (in particular, if they double back along the same edge.
7137
- if (selfIntersectFast(f))
7138
- {
7139
- //console.log('topoMerge: patching selfIntersect');
7140
- let polys: any[] = [];
7141
- geoids.forEach((geoid) => polys.push(topoToFeature(topo, geoid).geometry.coordinates));
7142
- let result = Q.unionPolys(polys);
7143
- let depth = Util.depthof(result);
7144
- if (depth === 5 && result.length === 1)
7145
- {
7146
- depth = 4;
7147
- result = result[0];
7148
- }
7149
- f = { type: 'feature', properties: {}, geometry: { type: depth == 4 ? 'Polygon' : 'MultiPolygon', coordinates: result } };
7150
- }
7151
- */
7152
- return f;
8249
+ return correctGeometry({ type: 'Feature', properties: {}, geometry: TopoClient.merge(topo, objects) });
7153
8250
  }
7154
8251
  exports.topoMerge = topoMerge;
7155
8252
  function topoMergeFeatures(topo, features) {
@@ -7187,7 +8284,7 @@ class FsmIncrementalUnion extends FSM.Fsm {
7187
8284
  let values = Object.values(map);
7188
8285
  this.work = { nUnion: values.length, nDifference: 0, ms: 0 };
7189
8286
  let elapsed = new Util.Elapsed();
7190
- this.result = topoMergeFeatures(this.key.topo, values);
8287
+ this.result = topoMergeFeatures(this.key.multi.allTopo(), values);
7191
8288
  this.work.ms = elapsed.ms();
7192
8289
  this.map = map;
7193
8290
  }
@@ -7290,18 +8387,37 @@ exports.topoUnpack = topoUnpack;
7290
8387
  /*!***************************!*\
7291
8388
  !*** ./lib/poly/union.ts ***!
7292
8389
  \***************************/
7293
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8390
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
7294
8391
 
7295
8392
 
8393
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8394
+ if (k2 === undefined) k2 = k;
8395
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
8396
+ }) : (function(o, m, k, k2) {
8397
+ if (k2 === undefined) k2 = k;
8398
+ o[k2] = m[k];
8399
+ }));
8400
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
8401
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
8402
+ }) : function(o, v) {
8403
+ o["default"] = v;
8404
+ });
8405
+ var __importStar = (this && this.__importStar) || function (mod) {
8406
+ if (mod && mod.__esModule) return mod;
8407
+ var result = {};
8408
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
8409
+ __setModuleDefault(result, mod);
8410
+ return result;
8411
+ };
7296
8412
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7297
- exports.FsmUnion = exports.polyIntersects = void 0;
7298
- const PC = __webpack_require__(/*! polygon-clipping */ "polygon-clipping");
7299
- const Util = __webpack_require__(/*! ../util/all */ "./lib/util/all.ts");
7300
- const FSM = __webpack_require__(/*! ../fsm/all */ "./lib/fsm/all.ts");
7301
- const Poly = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
7302
- const Q = __webpack_require__(/*! ./quad */ "./lib/poly/quad.ts");
7303
- const PP = __webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts");
7304
- const PR = __webpack_require__(/*! ./polyround */ "./lib/poly/polyround.ts");
8413
+ exports.FsmUnion = exports.polyDifference = exports.polyIntersects = void 0;
8414
+ const PC = __importStar(__webpack_require__(/*! polygon-clipping */ "polygon-clipping"));
8415
+ const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
8416
+ const FSM = __importStar(__webpack_require__(/*! ../fsm/all */ "./lib/fsm/all.ts"));
8417
+ const Poly = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
8418
+ const Q = __importStar(__webpack_require__(/*! ./quad */ "./lib/poly/quad.ts"));
8419
+ const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
8420
+ const PR = __importStar(__webpack_require__(/*! ./polyround */ "./lib/poly/polyround.ts"));
7305
8421
  // Confusion on how polygon-clipping exposes its interface - be flexible
7306
8422
  let _union = undefined;
7307
8423
  let _difference = undefined;
@@ -7353,6 +8469,20 @@ function polyIntersects(p1, p2) {
7353
8469
  return bIntersects;
7354
8470
  }
7355
8471
  exports.polyIntersects = polyIntersects;
8472
+ function polyDifference(main, parts) {
8473
+ main = PP.polyUnpack(coords(main));
8474
+ // need to explode multipolygon so that "exploded" is a valid multipolygon input to underlying difference routine
8475
+ let exploded = [];
8476
+ parts.forEach((p) => {
8477
+ p = PP.polyUnpack(coords(p));
8478
+ if (Util.depthof(p) == 5)
8479
+ p.forEach((poly) => { exploded.push(poly); });
8480
+ else
8481
+ exploded.push(p);
8482
+ });
8483
+ return PR.polyRound(_difference(main, exploded));
8484
+ }
8485
+ exports.polyDifference = polyDifference;
7356
8486
  class FsmDifference extends FSM.Fsm {
7357
8487
  constructor(env, accum, polys) {
7358
8488
  super(env);
@@ -8984,7 +10114,7 @@ module.exports = require("tinyqueue");;
8984
10114
  /******/ // module exports must be returned from runtime so entry inlining is disabled
8985
10115
  /******/ // startup
8986
10116
  /******/ // Load entry module and return exports
8987
- /******/ return __webpack_require__("./lib/all/allclient.ts");
10117
+ /******/ return __webpack_require__("./lib/all/all.ts");
8988
10118
  /******/ })()
8989
10119
  ;
8990
10120
  });