PageSourceSearch

https://www.vzome.com/modules/chunk-5PFIPZES.js

js vzome.com collected 2026-09-24 20:35:52 UTC 1,315,996 bytes, 31,574 lines download raw bytes

1// src/worker/legacy/candies/j4ts-2.1.0-SNAPSHOT/bundle.js
2var __extends = /* @__PURE__ */ (function() {
3  var extendStatics = function(d, b) {
4    extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
5      d2.__proto__ = b2;
6    } || function(d2, b2) {
7      for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
8    };
9    return extendStatics(d, b);
10  };
11  return function(d, b) {
12    extendStatics(d, b);
13    function __() {
14      this.constructor = d;
15    }
16    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17  };
18})();
19var __spreadArrays = function() {
20  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
21  for (var r = Array(s), k = 0, i = 0; i < il; i++)
22    for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
23      r[k] = a[j];
24  return r;
25};
26var javaemul;
27(function(javaemul13) {
28  var internal;
29  (function(internal2) {
30    var Coercions = (
31      /** @class */
32      (function() {
33        function Coercions2() {
34        }
35        Coercions2.ensureInt = function(value) {
36          return value | 0;
37        };
38        return Coercions2;
39      })()
40    );
41    internal2.Coercions = Coercions;
42    Coercions["__class"] = "javaemul.internal.Coercions";
43  })(internal = javaemul13.internal || (javaemul13.internal = {}));
44})(javaemul || (javaemul = {}));
45(function(javaemul13) {
46  var internal;
47  (function(internal2) {
48    var JreHelper = (
49      /** @class */
50      (function() {
51        function JreHelper2() {
52        }
53        JreHelper2.LOG10E_$LI$ = function() {
54          if (JreHelper2.LOG10E == null) {
55            JreHelper2.LOG10E = Math.LOG10E;
56          }
57          return JreHelper2.LOG10E;
58        };
59        return JreHelper2;
60      })()
61    );
62    internal2.JreHelper = JreHelper;
63    JreHelper["__class"] = "javaemul.internal.JreHelper";
64  })(internal = javaemul13.internal || (javaemul13.internal = {}));
65})(javaemul || (javaemul = {}));
66(function(javaemul13) {
67  var internal;
68  (function(internal2) {
69    var BooleanHelper = (
70      /** @class */
71      (function() {
72        function BooleanHelper2() {
73        }
74        BooleanHelper2.TYPE_$LI$ = function() {
75          if (BooleanHelper2.TYPE == null) {
76            BooleanHelper2.TYPE = Boolean;
77          }
78          return BooleanHelper2.TYPE;
79        };
80        BooleanHelper2.compare = function(x, y) {
81          return x === y ? 0 : x ? 1 : -1;
82        };
83        BooleanHelper2.hashCode = function(value) {
84          return value ? 1231 : 1237;
85        };
86        BooleanHelper2.logicalAnd = function(a, b) {
87          return a && b;
88        };
89        BooleanHelper2.logicalOr = function(a, b) {
90          return a || b;
91        };
92        BooleanHelper2.logicalXor = function(a, b) {
93          return a !== b;
94        };
95        BooleanHelper2.parseBoolean = function(s) {
96          return (
97            /* equalsIgnoreCase */
98            (function(o1, o2) {
99              return o1.toUpperCase() === (o2 === null ? o2 : o2.toUpperCase());
100            })("true", s)
101          );
102        };
103        BooleanHelper2.toString = function(x) {
104          return (
105            /* valueOf */
106            String(x).toString()
107          );
108        };
109        BooleanHelper2.valueOf$boolean = function(b) {
110          return b ? BooleanHelper2.TRUE : BooleanHelper2.FALSE;
111        };
112        BooleanHelper2.valueOf$java_lang_String = function(s) {
113          return BooleanHelper2.valueOf$boolean(BooleanHelper2.parseBoolean(s));
114        };
115        BooleanHelper2.valueOf = function(s) {
116          if (typeof s === "string" || s === null) {
117            return javaemul13.internal.BooleanHelper.valueOf$java_lang_String(s);
118          } else if (typeof s === "boolean" || s === null) {
119            return javaemul13.internal.BooleanHelper.valueOf$boolean(s);
120          } else
121            throw new Error("invalid overload");
122        };
123        BooleanHelper2.prototype.booleanValue = function() {
124          return BooleanHelper2.unsafeCast(javaemul13.internal.InternalPreconditions.checkNotNull(this));
125        };
126        BooleanHelper2.unsafeCast = function(value) {
127          return value;
128        };
129        BooleanHelper2.prototype.compareTo$javaemul_internal_BooleanHelper = function(b) {
130          return BooleanHelper2.compare(this.booleanValue(), b.booleanValue());
131        };
132        BooleanHelper2.prototype.compareTo = function(b) {
133          if (b != null && b instanceof javaemul13.internal.BooleanHelper || b === null) {
134            return this.compareTo$javaemul_internal_BooleanHelper(b);
135          } else
136            throw new Error("invalid overload");
137        };
138        BooleanHelper2.prototype.equals = function(o) {
139          return javaemul13.internal.InternalPreconditions.checkNotNull(this) === o;
140        };
141        BooleanHelper2.prototype.hashCode = function() {
142          return BooleanHelper2.hashCode(this.booleanValue());
143        };
144        BooleanHelper2.prototype.toString = function() {
145          return BooleanHelper2.toString(this.booleanValue());
146        };
147        BooleanHelper2.FALSE = false;
148        BooleanHelper2.TRUE = true;
149        return BooleanHelper2;
150      })()
151    );
152    internal2.BooleanHelper = BooleanHelper;
153    BooleanHelper["__class"] = "javaemul.internal.BooleanHelper";
154    BooleanHelper["__interfaces"] = ["java.lang.Comparable", "java.io.Serializable"];
155  })(internal = javaemul13.internal || (javaemul13.internal = {}));
156})(javaemul || (javaemul = {}));
157(function(javaemul13) {
158  var internal;
159  (function(internal2) {
160    var StringHashCache = (
161      /** @class */
162      (function() {
163        function StringHashCache2() {
164        }
165        StringHashCache2.back_$LI$ = function() {
166          if (StringHashCache2.back == null) {
167            StringHashCache2.back = StringHashCache2.createNativeObject();
168          }
169          return StringHashCache2.back;
170        };
171        StringHashCache2.front_$LI$ = function() {
172          if (StringHashCache2.front == null) {
173            StringHashCache2.front = StringHashCache2.createNativeObject();
174          }
175          return StringHashCache2.front;
176        };
177        StringHashCache2.getHashCode = function(str) {
178          var key = ":" + str;
179          var result = StringHashCache2.getProperty(StringHashCache2.front_$LI$(), key);
180          if (!javaemul13.internal.JsUtils.isUndefined(result)) {
181            return StringHashCache2.unsafeCastToInt(result);
182          }
183          result = StringHashCache2.getProperty(StringHashCache2.back_$LI$(), key);
184          var hashCode = javaemul13.internal.JsUtils.isUndefined(result) ? StringHashCache2.compute(str) : StringHashCache2.unsafeCastToInt(result);
185          StringHashCache2.increment();
186          javaemul13.internal.JsUtils.setIntProperty(StringHashCache2.front_$LI$(), key, hashCode);
187          return hashCode;
188        };
189        StringHashCache2.compute = function(str) {
190          var hashCode = 0;
191          var n = str.length;
192          var nBatch = n - 4;
193          var i = 0;
194          while (i < nBatch) {
195            {
196              hashCode = (function(c) {
197                return c.charCodeAt == null ? c : c.charCodeAt(0);
198              })(str.charAt(i + 3)) + 31 * ((function(c) {
199                return c.charCodeAt == null ? c : c.charCodeAt(0);
200              })(str.charAt(i + 2)) + 31 * ((function(c) {
201                return c.charCodeAt == null ? c : c.charCodeAt(0);
202              })(str.charAt(i + 1)) + 31 * ((function(c) {
203                return c.charCodeAt == null ? c : c.charCodeAt(0);
204              })(str.charAt(i)) + 31 * hashCode)));
205              hashCode = javaemul13.internal.Coercions.ensureInt(hashCode);
206              i += 4;
207            }
208          }
209          ;
210          while (i < n) {
211            {
212              hashCode = hashCode * 31 + (function(c) {
213                return c.charCodeAt == null ? c : c.charCodeAt(0);
214              })(str.charAt(i++));
215            }
216          }
217          ;
218          hashCode = javaemul13.internal.Coercions.ensureInt(hashCode);
219          return hashCode;
220        };
221        StringHashCache2.increment = function() {
222          if (StringHashCache2.count === StringHashCache2.MAX_CACHE) {
223            StringHashCache2.back = StringHashCache2.front;
224            StringHashCache2.front = StringHashCache2.createNativeObject();
225            StringHashCache2.count = 0;
226          }
227          ++StringHashCache2.count;
228        };
229        StringHashCache2.getProperty = function(map, key) {
230          return map[key];
231        };
232        StringHashCache2.createNativeObject = function() {
233          return {};
234        };
235        StringHashCache2.unsafeCastToInt = function(o) {
236          return o;
237        };
238        StringHashCache2.count = 0;
239        StringHashCache2.MAX_CACHE = 256;
240        return StringHashCache2;
241      })()
242    );
243    internal2.StringHashCache = StringHashCache;
244    StringHashCache["__class"] = "javaemul.internal.StringHashCache";
245  })(internal = javaemul13.internal || (javaemul13.internal = {}));
246})(javaemul || (javaemul = {}));
247(function(javaemul13) {
248  var internal;
249  (function(internal2) {
250    var stream;
251    (function(stream2) {
252      var ConsumingFunction = (
253        /** @class */
254        (function() {
255          function ConsumingFunction2(consumer) {
256            if (this.consumer === void 0) {
257              this.consumer = null;
258            }
259            this.consumer = (function(funcInst) {
260              if (funcInst == null || typeof funcInst == "function") {
261                return funcInst;
262              }
263              return function(arg0) {
264                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
265              };
266            })(consumer);
267          }
268          ConsumingFunction2.prototype.apply = function(t) {
269            (function(target) {
270              return typeof target === "function" ? target(t) : target.accept(t);
271            })(this.consumer);
272            return t;
273          };
274          return ConsumingFunction2;
275        })()
276      );
277      stream2.ConsumingFunction = ConsumingFunction;
278      ConsumingFunction["__class"] = "javaemul.internal.stream.ConsumingFunction";
279      ConsumingFunction["__interfaces"] = ["java.util.function.Function"];
280    })(stream = internal2.stream || (internal2.stream = {}));
281  })(internal = javaemul13.internal || (javaemul13.internal = {}));
282})(javaemul || (javaemul = {}));
283(function(javaemul13) {
284  var internal;
285  (function(internal2) {
286    var stream;
287    (function(stream2) {
288      var TerminalStreamRow = (
289        /** @class */
290        (function() {
291          function TerminalStreamRow2() {
292          }
293          TerminalStreamRow2.prototype.chain = function(next) {
294            if (next.constructor === javaemul13.internal.stream.StreamRowEnd) {
295              return;
296            }
297            throw new java.lang.IllegalStateException();
298          };
299          TerminalStreamRow2.prototype.end = function() {
300          };
301          return TerminalStreamRow2;
302        })()
303      );
304      stream2.TerminalStreamRow = TerminalStreamRow;
305      TerminalStreamRow["__class"] = "javaemul.internal.stream.TerminalStreamRow";
306      TerminalStreamRow["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
307    })(stream = internal2.stream || (internal2.stream = {}));
308  })(internal = javaemul13.internal || (javaemul13.internal = {}));
309})(javaemul || (javaemul = {}));
310(function(javaemul13) {
311  var internal;
312  (function(internal2) {
313    var stream;
314    (function(stream2) {
315      var RunnableChain = (
316        /** @class */
317        (function() {
318          function RunnableChain2(run) {
319            if (this.run === void 0) {
320              this.run = null;
321            }
322            if (this.next === void 0) {
323              this.next = null;
324            }
325            this.run = (function(funcInst) {
326              if (funcInst == null || typeof funcInst == "function") {
327                return funcInst;
328              }
329              return function() {
330                return (funcInst["run"] ? funcInst["run"] : funcInst).call(funcInst);
331              };
332            })(run);
333          }
334          RunnableChain2.prototype.chain = function(next) {
335            if (this.next == null) {
336              this.next = next;
337              return;
338            }
339            this.next.chain(next);
340          };
341          RunnableChain2.prototype.runChain = function() {
342            (function(target) {
343              return typeof target === "function" ? target() : target.run();
344            })(this.run);
345            if (this.next == null) {
346              return;
347            }
348            this.next.runChain();
349          };
350          return RunnableChain2;
351        })()
352      );
353      stream2.RunnableChain = RunnableChain;
354      RunnableChain["__class"] = "javaemul.internal.stream.RunnableChain";
355    })(stream = internal2.stream || (internal2.stream = {}));
356  })(internal = javaemul13.internal || (javaemul13.internal = {}));
357})(javaemul || (javaemul = {}));
358(function(javaemul13) {
359  var internal;
360  (function(internal2) {
361    var stream;
362    (function(stream2) {
363      var QuiteRunnable = (
364        /** @class */
365        (function() {
366          function QuiteRunnable2(loudRunnable) {
367            if (this.loudRunnable === void 0) {
368              this.loudRunnable = null;
369            }
370            this.loudRunnable = (function(funcInst) {
371              if (funcInst == null || typeof funcInst == "function") {
372                return funcInst;
373              }
374              return function() {
375                return (funcInst["run"] ? funcInst["run"] : funcInst).call(funcInst);
376              };
377            })(loudRunnable);
378          }
379          QuiteRunnable2.prototype.run = function() {
380            try {
381              (function(target) {
382                return typeof target === "function" ? target() : target.run();
383              })(this.loudRunnable);
384            } catch (e) {
385              console.error(e.message, e);
386            }
387          };
388          return QuiteRunnable2;
389        })()
390      );
391      stream2.QuiteRunnable = QuiteRunnable;
392      QuiteRunnable["__class"] = "javaemul.internal.stream.QuiteRunnable";
393      QuiteRunnable["__interfaces"] = ["java.lang.Runnable"];
394    })(stream = internal2.stream || (internal2.stream = {}));
395  })(internal = javaemul13.internal || (javaemul13.internal = {}));
396})(javaemul || (javaemul = {}));
397(function(javaemul13) {
398  var internal;
399  (function(internal2) {
400    var stream;
401    (function(stream2) {
402      var ChooseSmallest = (
403        /** @class */
404        (function() {
405          function ChooseSmallest2(comparator) {
406            if (this.comparator === void 0) {
407              this.comparator = null;
408            }
409            this.comparator = (function(funcInst) {
410              if (funcInst == null || typeof funcInst == "function") {
411                return funcInst;
412              }
413              return function(a, b) {
414                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
415              };
416            })(comparator);
417          }
418          ChooseSmallest2.prototype.apply = function(t1, t2) {
419            if (this.comparator(t1, t2) <= 0) {
420              return t1;
421            }
422            return t2;
423          };
424          return ChooseSmallest2;
425        })()
426      );
427      stream2.ChooseSmallest = ChooseSmallest;
428      ChooseSmallest["__class"] = "javaemul.internal.stream.ChooseSmallest";
429      ChooseSmallest["__interfaces"] = ["java.util.function.BiFunction", "java.util.function.BinaryOperator"];
430    })(stream = internal2.stream || (internal2.stream = {}));
431  })(internal = javaemul13.internal || (javaemul13.internal = {}));
432})(javaemul || (javaemul = {}));
433(function(javaemul13) {
434  var internal;
435  (function(internal2) {
436    var stream;
437    (function(stream2) {
438      var StreamHelper = (
439        /** @class */
440        (function() {
441          function StreamHelper2(data) {
442            if (this.onCloseChain === void 0) {
443              this.onCloseChain = null;
444            }
445            if (this.head === void 0) {
446              this.head = null;
447            }
448            if (this.end === void 0) {
449              this.end = null;
450            }
451            if (this.data === void 0) {
452              this.data = null;
453            }
454            this.head = new javaemul13.internal.stream.StreamRowMap(function(o) {
455              return o;
456            });
457            this.end = new javaemul13.internal.stream.StreamRowEnd(this.head);
458            this.head.chain(this.end);
459            this.data = data;
460          }
461          StreamHelper2.prototype.chain = function(streamRow) {
462            this.end.chain(streamRow);
463            return this;
464          };
465          StreamHelper2.prototype.play = function() {
466            for (var index = this.data.iterator(); index.hasNext(); ) {
467              var item = index.next();
468              {
469                if (!this.head.item(item)) {
470                  break;
471                }
472              }
473            }
474            this.head.end();
475          };
476          StreamHelper2.prototype.foldRight = function(identity, accumulator) {
477            var rowReduce = new javaemul13.internal.stream.StreamRowReduce(identity, (function(funcInst) {
478              if (funcInst == null || typeof funcInst == "function") {
479                return funcInst;
480              }
481              return function(arg0) {
482                return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
483              };
484            })(accumulator));
485            this.chain(rowReduce);
486            this.play();
487            return rowReduce.getResult();
488          };
489          StreamHelper2.prototype.filter = function(predicate) {
490            return this.chain(new javaemul13.internal.stream.StreamRowFilter((function(funcInst) {
491              if (funcInst == null || typeof funcInst == "function") {
492                return funcInst;
493              }
494              return function(arg0) {
495                return (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0);
496              };
497            })(predicate)));
498          };
499          StreamHelper2.prototype.map = function(mapper) {
500            return this.chain(new javaemul13.internal.stream.StreamRowMap((function(funcInst) {
501              if (funcInst == null || typeof funcInst == "function") {
502                return funcInst;
503              }
504              return function(arg0) {
505                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
506              };
507            })(mapper)));
508          };
509          StreamHelper2.prototype.mapToObj = function(mapper) {
510            return this.chain(new javaemul13.internal.stream.StreamRowMap(function(n) {
511              return (function(target) {
512                return typeof target === "function" ? target(n) : target.apply(n);
513              })(mapper);
514            }));
515          };
516          StreamHelper2.prototype.flatMap = function(mapper) {
517            return this.chain(new javaemul13.internal.stream.StreamRowFlatMap((function(funcInst) {
518              if (funcInst == null || typeof funcInst == "function") {
519                return funcInst;
520              }
521              return function(arg0) {
522                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
523              };
524            })(mapper)));
525          };
526          StreamHelper2.prototype.distinct = function() {
527            return this.chain(new javaemul13.internal.stream.StreamRowCollector(new java.util.LinkedHashSet()));
528          };
529          StreamHelper2.prototype.sorted$ = function() {
530            return this.sorted$java_util_Comparator(function(a, b) {
531              return a.compareTo(b);
532            });
533          };
534          StreamHelper2.prototype.sorted$java_util_Comparator = function(comparator) {
535            return this.chain(new javaemul13.internal.stream.StreamRowSortingCollector(new java.util.ArrayList(), (function(funcInst) {
536              if (funcInst == null || typeof funcInst == "function") {
537                return funcInst;
538              }
539              return function(a, b) {
540                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
541              };
542            })(comparator)));
543          };
544          StreamHelper2.prototype.sorted = function(comparator) {
545            if (typeof comparator === "function" && comparator.length === 2 || comparator === null) {
546              return this.sorted$java_util_Comparator(comparator);
547            } else if (comparator === void 0) {
548              return this.sorted$();
549            } else
550              throw new Error("invalid overload");
551          };
552          StreamHelper2.prototype.peek = function(action) {
553            return this.chain(new javaemul13.internal.stream.StreamRowMap((function(funcInst) {
554              if (funcInst == null || typeof funcInst == "function") {
555                return funcInst;
556              }
557              return function(arg0) {
558                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
559              };
560            })(new javaemul13.internal.stream.ConsumingFunction(action))));
561          };
562          StreamHelper2.prototype.limit = function(maxSize) {
563            return this.chain(new javaemul13.internal.stream.StreamRowFilterFlop((function(funcInst) {
564              if (funcInst == null || typeof funcInst == "function") {
565                return funcInst;
566              }
567              return function(arg0) {
568                return (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0);
569              };
570            })(new javaemul13.internal.stream.CountingPredicate(maxSize))));
571          };
572          StreamHelper2.prototype.skip = function(n) {
573            var p = new javaemul13.internal.stream.CountingPredicate(n);
574            return this.chain(new javaemul13.internal.stream.StreamRowFilter(/* @__PURE__ */ (function(p2) {
575              return function(v) {
576                return !p2.test(v);
577              };
578            })(p)));
579          };
580          StreamHelper2.prototype.forEach = function(action) {
581            this.peek((function(funcInst) {
582              if (funcInst == null || typeof funcInst == "function") {
583                return funcInst;
584              }
585              return function(arg0) {
586                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
587              };
588            })(action));
589            this.play();
590          };
591          StreamHelper2.prototype.forEachOrdered = function(action) {
592            this.forEach((function(funcInst) {
593              if (funcInst == null || typeof funcInst == "function") {
594                return funcInst;
595              }
596              return function(arg0) {
597                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
598              };
599            })(action));
600          };
601          StreamHelper2.prototype.toArray$ = function() {
602            var result = new java.util.ArrayList();
603            this.chain(new javaemul13.internal.stream.StreamRowCollector(result));
604            this.play();
605            return result["toArray$"]();
606          };
607          StreamHelper2.prototype.toArray$java_util_function_IntFunction = function(generator) {
608            var result = new java.util.ArrayList();
609            this.chain(new javaemul13.internal.stream.StreamRowCollector(result));
610            this.play();
611            return result["toArray$java_lang_Object_A"]((function(target) {
612              return typeof target === "function" ? target(result.size()) : target.apply(result.size());
613            })(generator));
614          };
615          StreamHelper2.prototype.toArray = function(generator) {
616            if (typeof generator === "function" && generator.length === 1 || generator === null) {
617              return this.toArray$java_util_function_IntFunction(generator);
618            } else if (generator === void 0) {
619              return this.toArray$();
620            } else
621              throw new Error("invalid overload");
622          };
623          StreamHelper2.prototype.reduce$java_lang_Object$java_util_function_BinaryOperator = function(identity, accumulator) {
624            return this.foldRight(java.util.Optional.of(identity), (function(funcInst) {
625              if (funcInst == null || typeof funcInst == "function") {
626                return funcInst;
627              }
628              return function(arg0) {
629                return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
630              };
631            })(accumulator)).get();
632          };
633          StreamHelper2.prototype.reduce$java_util_function_BinaryOperator = function(accumulator) {
634            return this.foldRight(java.util.Optional.empty(), (function(funcInst) {
635              if (funcInst == null || typeof funcInst == "function") {
636                return funcInst;
637              }
638              return function(arg0) {
639                return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
640              };
641            })(accumulator));
642          };
643          StreamHelper2.prototype.collect$java_util_stream_Collector = function(collector) {
644            var container = (function(target) {
645              return typeof target === "function" ? target() : target.get();
646            })(collector.supplier());
647            var accumulator = (function(funcInst) {
648              if (funcInst == null || typeof funcInst == "function") {
649                return funcInst;
650              }
651              return function(arg0, arg1) {
652                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0, arg1);
653              };
654            })(collector.accumulator());
655            this.chain(new javaemul13.internal.stream.StreamRowMap((function(funcInst) {
656              if (funcInst == null || typeof funcInst == "function") {
657                return funcInst;
658              }
659              return function(arg0) {
660                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
661              };
662            })(new javaemul13.internal.stream.ConsumingFunction(/* @__PURE__ */ (function(container2, accumulator2) {
663              return function(item) {
664                return (function(target) {
665                  return typeof target === "function" ? target(container2, item) : target.accept(container2, item);
666                })(accumulator2);
667              };
668            })(container, accumulator)))));
669            this.play();
670            return container;
671          };
672          StreamHelper2.prototype.min = function(comparator) {
673            return this.foldRight(java.util.Optional.empty(), function(a, b) {
674              return comparator(a, b) <= 0 ? a : b;
675            });
676          };
677          StreamHelper2.prototype.max = function(comparator) {
678            return this.foldRight(java.util.Optional.empty(), function(a, b) {
679              return comparator(a, b) >= 0 ? a : b;
680            });
681          };
682          StreamHelper2.prototype.count = function() {
683            var counter = new javaemul13.internal.stream.StreamRowCount();
684            this.chain(counter);
685            this.play();
686            return counter.getCount();
687          };
688          StreamHelper2.prototype.anyMatch = function(predicate) {
689            var streamRow = new javaemul13.internal.stream.StreamRowOnceFilter((function(funcInst) {
690              if (funcInst == null || typeof funcInst == "function") {
691                return funcInst;
692              }
693              return function(arg0) {
694                return (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0);
695              };
696            })(predicate));
697            this.chain(streamRow);
698            this.play();
699            return streamRow.getPredicateValue();
700          };
701          StreamHelper2.prototype.allMatch = function(predicate) {
702            var streamRow = new javaemul13.internal.stream.StreamRowAllFilter((function(funcInst) {
703              if (funcInst == null || typeof funcInst == "function") {
704                return funcInst;
705              }
706              return function(arg0) {
707                return (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0);
708              };
709            })(predicate));
710            this.chain(streamRow);
711            this.play();
712            return streamRow.getPredicateValue();
713          };
714          StreamHelper2.prototype.noneMatch = function(predicate) {
715            return this.allMatch(function(v) {
716              return !(function(target) {
717                return typeof target === "function" ? target(v) : target.test(v);
718              })(predicate);
719            });
720          };
721          StreamHelper2.prototype.findFirst = function() {
722            var streamRow = new javaemul13.internal.stream.StreamRowOnceFilter(function(o) {
723              return true;
724            });
725            this.chain(streamRow);
726            this.play();
727            return streamRow.getFirstMatch();
728          };
729          StreamHelper2.prototype.findAny = function() {
730            return this.findFirst();
731          };
732          StreamHelper2.prototype.iterator = function() {
733            var result = new java.util.ArrayList();
734            this.chain(new javaemul13.internal.stream.StreamRowCollector(result));
735            this.play();
736            return result.iterator();
737          };
738          StreamHelper2.prototype.isParallel = function() {
739            return false;
740          };
741          StreamHelper2.prototype.sequential = function() {
742            return this;
743          };
744          StreamHelper2.prototype.parallel = function() {
745            return this;
746          };
747          StreamHelper2.prototype.unordered = function() {
748            return this;
749          };
750          StreamHelper2.prototype.onClose = function(closeHandler) {
751            var chainItem = new javaemul13.internal.stream.RunnableChain((function(funcInst) {
752              if (funcInst == null || typeof funcInst == "function") {
753                return funcInst;
754              }
755              return function() {
756                return (funcInst["run"] ? funcInst["run"] : funcInst).call(funcInst);
757              };
758            })(new javaemul13.internal.stream.QuiteRunnable(closeHandler)));
759            if (this.onCloseChain == null) {
760              this.onCloseChain = chainItem;
761            } else {
762              this.onCloseChain.chain(chainItem);
763            }
764            return this;
765          };
766          StreamHelper2.prototype.close = function() {
767            if (this.onCloseChain == null) {
768              return;
769            }
770            this.onCloseChain.runChain();
771          };
772          StreamHelper2.prototype.mapToInt = function(mapper) {
773            throw new java.lang.IllegalStateException();
774          };
775          StreamHelper2.prototype.mapToLong = function(mapper) {
776            throw new java.lang.IllegalStateException();
777          };
778          StreamHelper2.prototype.mapToDouble = function(mapper) {
779            throw new java.lang.IllegalStateException();
780          };
781          StreamHelper2.prototype.flatMapToInt = function(mapper) {
782            throw new java.lang.IllegalStateException();
783          };
784          StreamHelper2.prototype.flatMapToLong = function(mapper) {
785            throw new java.lang.IllegalStateException();
786          };
787          StreamHelper2.prototype.flatMapToDouble = function(mapper) {
788            throw new java.lang.IllegalStateException();
789          };
790          StreamHelper2.prototype.spliterator = function() {
791            throw new java.lang.IllegalStateException();
792          };
793          StreamHelper2.prototype.reduce$java_lang_Object$java_util_function_BiFunction$java_util_function_BinaryOperator = function(identity, accumulator, combiner) {
794            throw new java.lang.IllegalStateException();
795          };
796          StreamHelper2.prototype.reduce = function(identity, accumulator, combiner) {
797            if ((identity != null || identity === null) && (typeof accumulator === "function" && accumulator.length === 2 || accumulator === null) && (typeof combiner === "function" && combiner.length === 2 || combiner === null)) {
798              return this.reduce$java_lang_Object$java_util_function_BiFunction$java_util_function_BinaryOperator(identity, accumulator, combiner);
799            } else if ((identity != null || identity === null) && (typeof accumulator === "function" && accumulator.length === 2 || accumulator === null) && combiner === void 0) {
800              return this.reduce$java_lang_Object$java_util_function_BinaryOperator(identity, accumulator);
801            } else if ((typeof identity === "function" && identity.length === 2 || identity === null) && accumulator === void 0 && combiner === void 0) {
802              return this.reduce$java_util_function_BinaryOperator(identity);
803            } else
804              throw new Error("invalid overload");
805          };
806          StreamHelper2.prototype.collect$java_util_function_Supplier$java_util_function_BiConsumer$java_util_function_BiConsumer = function(supplier, accumulator, combiner) {
807            throw new java.lang.IllegalStateException();
808          };
809          StreamHelper2.prototype.collect = function(supplier, accumulator, combiner) {
810            if ((typeof supplier === "function" && supplier.length === 0 || supplier === null) && (typeof accumulator === "function" && accumulator.length === 2 || accumulator === null) && (typeof combiner === "function" && combiner.length === 2 || combiner === null)) {
811              return this.collect$java_util_function_Supplier$java_util_function_BiConsumer$java_util_function_BiConsumer(supplier, accumulator, combiner);
812            } else if ((supplier != null && (supplier.constructor != null && supplier.constructor["__interfaces"] != null && supplier.constructor["__interfaces"].indexOf("java.util.stream.Collector") >= 0) || supplier === null) && accumulator === void 0 && combiner === void 0) {
813              return this.collect$java_util_stream_Collector(supplier);
814            } else
815              throw new Error("invalid overload");
816          };
817          return StreamHelper2;
818        })()
819      );
820      stream2.StreamHelper = StreamHelper;
821      StreamHelper["__class"] = "javaemul.internal.stream.StreamHelper";
822      StreamHelper["__interfaces"] = ["java.util.stream.Stream"];
823    })(stream = internal2.stream || (internal2.stream = {}));
824  })(internal = javaemul13.internal || (javaemul13.internal = {}));
825})(javaemul || (javaemul = {}));
826(function(javaemul13) {
827  var internal;
828  (function(internal2) {
829    var stream;
830    (function(stream2) {
831      var CountingPredicate = (
832        /** @class */
833        (function() {
834          function CountingPredicate2(n) {
835            if (this.countDown === void 0) {
836              this.countDown = 0;
837            }
838            this.countDown = n;
839          }
840          CountingPredicate2.prototype.test = function(t) {
841            if (this.countDown <= 0) {
842              return false;
843            }
844            --this.countDown;
845            return true;
846          };
847          return CountingPredicate2;
848        })()
849      );
850      stream2.CountingPredicate = CountingPredicate;
851      CountingPredicate["__class"] = "javaemul.internal.stream.CountingPredicate";
852      CountingPredicate["__interfaces"] = ["java.util.function.Predicate"];
853    })(stream = internal2.stream || (internal2.stream = {}));
854  })(internal = javaemul13.internal || (javaemul13.internal = {}));
855})(javaemul || (javaemul = {}));
856(function(javaemul13) {
857  var internal;
858  (function(internal2) {
859    var stream;
860    (function(stream2) {
861      var TransientStreamRow = (
862        /** @class */
863        (function() {
864          function TransientStreamRow2() {
865            if (this.next === void 0) {
866              this.next = null;
867            }
868          }
869          TransientStreamRow2.prototype.chain = function(next) {
870            this.next = next;
871          };
872          return TransientStreamRow2;
873        })()
874      );
875      stream2.TransientStreamRow = TransientStreamRow;
876      TransientStreamRow["__class"] = "javaemul.internal.stream.TransientStreamRow";
877      TransientStreamRow["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
878    })(stream = internal2.stream || (internal2.stream = {}));
879  })(internal = javaemul13.internal || (javaemul13.internal = {}));
880})(javaemul || (javaemul = {}));
881(function(javaemul13) {
882  var internal;
883  (function(internal2) {
884    var stream;
885    (function(stream2) {
886      var VoidRunnable = (
887        /** @class */
888        (function() {
889          function VoidRunnable2() {
890          }
891          VoidRunnable2.dryRun_$LI$ = function() {
892            if (VoidRunnable2.dryRun == null) {
893              VoidRunnable2.dryRun = new VoidRunnable2();
894            }
895            return VoidRunnable2.dryRun;
896          };
897          VoidRunnable2.prototype.run = function() {
898          };
899          return VoidRunnable2;
900        })()
901      );
902      stream2.VoidRunnable = VoidRunnable;
903      VoidRunnable["__class"] = "javaemul.internal.stream.VoidRunnable";
904      VoidRunnable["__interfaces"] = ["java.lang.Runnable"];
905    })(stream = internal2.stream || (internal2.stream = {}));
906  })(internal = javaemul13.internal || (javaemul13.internal = {}));
907})(javaemul || (javaemul = {}));
908(function(javaemul13) {
909  var internal;
910  (function(internal2) {
911    var JsUtils = (
912      /** @class */
913      (function() {
914        function JsUtils2() {
915        }
916        JsUtils2.getInfinity = function() {
917          return Infinity;
918        };
919        JsUtils2.isUndefined = function(value) {
920          return value == null;
921        };
922        JsUtils2.unsafeCastToString = function(string) {
923          return string;
924        };
925        JsUtils2.setPropertySafe = function(map, key, value) {
926          try {
927            map[key] = value;
928          } catch (e) {
929          }
930        };
931        JsUtils2.getIntProperty = function(map, key) {
932          return map[key];
933        };
934        JsUtils2.setIntProperty = function(map, key, value) {
935          map[key] = value;
936        };
937        JsUtils2.typeOf = function(o) {
938          return typeof o;
939        };
940        return JsUtils2;
941      })()
942    );
943    internal2.JsUtils = JsUtils;
944    JsUtils["__class"] = "javaemul.internal.JsUtils";
945  })(internal = javaemul13.internal || (javaemul13.internal = {}));
946})(javaemul || (javaemul = {}));
947(function(javaemul13) {
948  var internal;
949  (function(internal2) {
950    var LongCompareHolder = (
951      /** @class */
952      (function() {
953        function LongCompareHolder2() {
954        }
955        LongCompareHolder2.getLongComparator = function() {
956          return function(l1, l2) {
957            return l2 - l1;
958          };
959        };
960        return LongCompareHolder2;
961      })()
962    );
963    internal2.LongCompareHolder = LongCompareHolder;
964    LongCompareHolder["__class"] = "javaemul.internal.LongCompareHolder";
965  })(internal = javaemul13.internal || (javaemul13.internal = {}));
966})(javaemul || (javaemul = {}));
967(function(javaemul13) {
968  var internal;
969  (function(internal2) {
970    var ObjectHelper = (
971      /** @class */
972      (function() {
973        function ObjectHelper2() {
974        }
975        ObjectHelper2.clone = function(obj) {
976          var copy;
977          if (null == obj || "object" != typeof obj)
978            return obj;
979          if (obj instanceof Date) {
980            copy = /* @__PURE__ */ new Date();
981            copy.setTime(obj.getTime());
982            return copy;
983          }
984          ;
985          if (obj instanceof Array) {
986            copy = [];
987            for (var i = 0, len = obj.length; i < len; i++) {
988              copy[i] = ObjectHelper2.clone(obj[i]);
989            }
990            return copy;
991          }
992          ;
993          if (obj instanceof Object) {
994            copy = {};
995            for (var attr in obj) {
996              if (obj.hasOwnProperty(attr))
997                copy[attr] = ObjectHelper2.clone(obj[attr]);
998            }
999            return copy;
1000          }
1001          ;
1002          throw new Error("Unable to copy obj! Its type isn't supported.");
1003        };
1004        return ObjectHelper2;
1005      })()
1006    );
1007    internal2.ObjectHelper = ObjectHelper;
1008    ObjectHelper["__class"] = "javaemul.internal.ObjectHelper";
1009  })(internal = javaemul13.internal || (javaemul13.internal = {}));
1010})(javaemul || (javaemul = {}));
1011(function(javaemul13) {
1012  var internal;
1013  (function(internal2) {
1014    var CharacterHelper = (
1015      /** @class */
1016      (function() {
1017        function CharacterHelper2(value) {
1018          if (this.value === void 0) {
1019            this.value = null;
1020          }
1021          this.value = value;
1022        }
1023        CharacterHelper2.TYPE_$LI$ = function() {
1024          if (CharacterHelper2.TYPE == null) {
1025            CharacterHelper2.TYPE = String;
1026          }
1027          return CharacterHelper2.TYPE;
1028        };
1029        CharacterHelper2.charCount = function(codePoint) {
1030          return codePoint >= CharacterHelper2.MIN_SUPPLEMENTARY_CODE_POINT ? 2 : 1;
1031        };
1032        CharacterHelper2.codePointAt$char_A$int = function(a, index) {
1033          return CharacterHelper2.codePointAt$char_A$int$int(a, index, a.length);
1034        };
1035        CharacterHelper2.codePointAt$char_A$int$int = function(a, index, limit) {
1036          var hiSurrogate = a[index++];
1037          var loSurrogate;
1038          if (CharacterHelper2.isHighSurrogate(hiSurrogate) && index < limit && CharacterHelper2.isLowSurrogate(loSurrogate = a[index])) {
1039            return CharacterHelper2.toCodePoint(hiSurrogate, loSurrogate);
1040          }
1041          return hiSurrogate.charCodeAt(0);
1042        };
1043        CharacterHelper2.codePointAt = function(a, index, limit) {
1044          if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "string") || a === null) && (typeof index === "number" || index === null) && (typeof limit === "number" || limit === null)) {
1045            return javaemul13.internal.CharacterHelper.codePointAt$char_A$int$int(a, index, limit);
1046          } else if ((a != null && (a.constructor != null && a.constructor["__interfaces"] != null && a.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof a === "string") || a === null) && (typeof index === "number" || index === null) && (typeof limit === "number" || limit === null)) {
1047            return javaemul13.internal.CharacterHelper.codePointAt$java_lang_CharSequence$int$int(a, index, limit);
1048          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "string") || a === null) && (typeof index === "number" || index === null) && limit === void 0) {
1049            return javaemul13.internal.CharacterHelper.codePointAt$char_A$int(a, index);
1050          } else if ((a != null && (a.constructor != null && a.constructor["__interfaces"] != null && a.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof a === "string") || a === null) && (typeof index === "number" || index === null) && limit === void 0) {
1051            return javaemul13.internal.CharacterHelper.codePointAt$java_lang_CharSequence$int(a, index);
1052          } else
1053            throw new Error("invalid overload");
1054        };
1055        CharacterHelper2.codePointAt$java_lang_CharSequence$int = function(seq, index) {
1056          return CharacterHelper2.codePointAt$java_lang_CharSequence$int$int(seq, index, seq.length);
1057        };
1058        CharacterHelper2.codePointBefore$char_A$int = function(a, index) {
1059          return CharacterHelper2.codePointBefore$char_A$int$int(a, index, 0);
1060        };
1061        CharacterHelper2.codePointBefore$char_A$int$int = function(a, index, start) {
1062          var loSurrogate = a[--index];
1063          var highSurrogate;
1064          if (CharacterHelper2.isLowSurrogate(loSurrogate) && index > start && CharacterHelper2.isHighSurrogate(highSurrogate = a[index - 1])) {
1065            return CharacterHelper2.toCodePoint(highSurrogate, loSurrogate);
1066          }
1067          return loSurrogate.charCodeAt(0);
1068        };
1069        CharacterHelper2.codePointBefore = function(a, index, start) {
1070          if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "string") || a === null) && (typeof index === "number" || index === null) && (typeof start === "number" || start === null)) {
1071            return javaemul13.internal.CharacterHelper.codePointBefore$char_A$int$int(a, index, start);
1072          } else if ((a != null && (a.constructor != null && a.constructor["__interfaces"] != null && a.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof a === "string") || a === null) && (typeof index === "number" || index === null) && (typeof start === "number" || start === null)) {
1073            return javaemul13.internal.CharacterHelper.codePointBefore$java_lang_CharSequence$int$int(a, index, start);
1074          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "string") || a === null) && (typeof index === "number" || index === null) && start === void 0) {
1075            return javaemul13.internal.CharacterHelper.codePointBefore$char_A$int(a, index);
1076          } else if ((a != null && (a.constructor != null && a.constructor["__interfaces"] != null && a.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof a === "string") || a === null) && (typeof index === "number" || index === null) && start === void 0) {
1077            return javaemul13.internal.CharacterHelper.codePointBefore$java_lang_CharSequence$int(a, index);
1078          } else
1079            throw new Error("invalid overload");
1080        };
1081        CharacterHelper2.codePointBefore$java_lang_CharSequence$int = function(cs, index) {
1082          return CharacterHelper2.codePointBefore$java_lang_CharSequence$int$int(cs, index, 0);
1083        };
1084        CharacterHelper2.codePointCount$char_A$int$int = function(a, beginIndex, len) {
1085          var endIndex = beginIndex + len;
1086          var count = 0;
1087          for (var idx = beginIndex; idx < endIndex; ) {
1088            {
1089              var ch = a[idx++];
1090              if (CharacterHelper2.isHighSurrogate(ch) && idx < endIndex && CharacterHelper2.isLowSurrogate(a[idx])) {
1091                ++idx;
1092              }
1093              ++count;
1094            }
1095            ;
1096          }
1097          return count;
1098        };
1099        CharacterHelper2.codePointCount = function(a, beginIndex, len) {
1100          if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "string") || a === null) && (typeof beginIndex === "number" || beginIndex === null) && (typeof len === "
1100number" || len === null)) {
1101            return javaemul13.internal.CharacterHelper.codePointCount$char_A$int$int(a, beginIndex, len);
1102          } else if ((a != null && (a.constructor != null && a.constructor["__interfaces"] != null && a.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof a === "string") || a === null) && (typeof beginIndex === "number" || beginIndex === null) && (typeof len === "number" || len === null)) {
1103            return javaemul13.internal.CharacterHelper.codePointCount$java_lang_CharSequence$int$int(a, beginIndex, len);
1104          } else
1105            throw new Error("invalid overload");
1106        };
1107        CharacterHelper2.codePointCount$java_lang_CharSequence$int$int = function(seq, beginIndex, endIndex) {
1108          var count = 0;
1109          for (var idx = beginIndex; idx < endIndex; ) {
1110            {
1111              var ch = seq.charAt(idx++);
1112              if (CharacterHelper2.isHighSurrogate(ch) && idx < endIndex && CharacterHelper2.isLowSurrogate(seq.charAt(idx))) {
1113                ++idx;
1114              }
1115              ++count;
1116            }
1117            ;
1118          }
1119          return count;
1120        };
1121        CharacterHelper2.compare = function(x, y) {
1122          return (function(c) {
1123            return c.charCodeAt == null ? c : c.charCodeAt(0);
1124          })(x) - (function(c) {
1125            return c.charCodeAt == null ? c : c.charCodeAt(0);
1126          })(y);
1127        };
1128        CharacterHelper2.digit = function(c, radix) {
1129          if (radix < CharacterHelper2.MIN_RADIX || radix > CharacterHelper2.MAX_RADIX) {
1130            return -1;
1131          }
1132          if ((function(c2) {
1133            return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1134          })(c) >= "0".charCodeAt(0) && (function(c2) {
1135            return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1136          })(c) < "0".charCodeAt(0) + Math.min(radix, 10)) {
1137            return (function(c2) {
1138              return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1139            })(c) - "0".charCodeAt(0);
1140          }
1141          if ((function(c2) {
1142            return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1143          })(c) >= "a".charCodeAt(0) && (function(c2) {
1144            return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1145          })(c) < radix + "a".charCodeAt(0) - 10) {
1146            return (function(c2) {
1147              return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1148            })(c) - "a".charCodeAt(0) + 10;
1149          }
1150          if ((function(c2) {
1151            return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1152          })(c) >= "A".charCodeAt(0) && (function(c2) {
1153            return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1154          })(c) < radix + "A".charCodeAt(0) - 10) {
1155            return (function(c2) {
1156              return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1157            })(c) - "A".charCodeAt(0) + 10;
1158          }
1159          return -1;
1160        };
1161        CharacterHelper2.getNumericValue = function(ch) {
1162          return ch.charCodeAt(0) | 0;
1163        };
1164        CharacterHelper2.forDigit$int$int = function(digit, radix) {
1165          if (radix < CharacterHelper2.MIN_RADIX || radix > CharacterHelper2.MAX_RADIX) {
1166            return String.fromCharCode(0);
1167          }
1168          if (digit < 0 || digit >= radix) {
1169            return String.fromCharCode(0);
1170          }
1171          return CharacterHelper2.forDigit$int(digit);
1172        };
1173        CharacterHelper2.forDigit = function(digit, radix) {
1174          if ((typeof digit === "number" || digit === null) && (typeof radix === "number" || radix === null)) {
1175            return javaemul13.internal.CharacterHelper.forDigit$int$int(digit, radix);
1176          } else if ((typeof digit === "number" || digit === null) && radix === void 0) {
1177            return javaemul13.internal.CharacterHelper.forDigit$int(digit);
1178          } else
1179            throw new Error("invalid overload");
1180        };
1181        CharacterHelper2.hashCode = function(c) {
1182          return c.charCodeAt(0);
1183        };
1184        CharacterHelper2.isDigit = function(c) {
1185          var result = (
1186            /* valueOf */
1187            String(c).toString().match(CharacterHelper2.digitRegex())
1188          );
1189          return result != null && result.length > 0;
1190        };
1191        CharacterHelper2.digitRegex = function() {
1192          return new RegExp("\\d");
1193        };
1194        CharacterHelper2.isHighSurrogate = function(ch) {
1195          return (function(c) {
1196            return c.charCodeAt == null ? c : c.charCodeAt(0);
1197          })(ch) >= (function(c) {
1198            return c.charCodeAt == null ? c : c.charCodeAt(0);
1199          })(CharacterHelper2.MIN_HIGH_SURROGATE) && (function(c) {
1200            return c.charCodeAt == null ? c : c.charCodeAt(0);
1201          })(ch) <= (function(c) {
1202            return c.charCodeAt == null ? c : c.charCodeAt(0);
1203          })(CharacterHelper2.MAX_HIGH_SURROGATE);
1204        };
1205        CharacterHelper2.isLetter = function(c) {
1206          return (
1207            /* valueOf */
1208            String(c).toString().match(CharacterHelper2.leterRegex()).length > 0
1209          );
1210        };
1211        CharacterHelper2.leterRegex = function() {
1212          return new RegExp("[A-Z]", "i");
1213        };
1214        CharacterHelper2.isLetterOrDigit = function(c) {
1215          var array = (
1216            /* valueOf */
1217            String(c).toString().match(CharacterHelper2.leterOrDigitRegex())
1218          );
1219          if (array != null)
1220            return (
1221              /* valueOf */
1222              String(c).toString().match(CharacterHelper2.leterOrDigitRegex()).length > 0
1223            );
1224          return false;
1225        };
1226        CharacterHelper2.leterOrDigitRegex = function() {
1227          return new RegExp("[A-Z\\d]", "i");
1228        };
1229        CharacterHelper2.isLowerCase = function(c) {
1230          return (function(c2) {
1231            return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1232          })(CharacterHelper2.toLowerCase$char(c)) == (function(c2) {
1233            return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1234          })(c) && CharacterHelper2.isLetter(c);
1235        };
1236        CharacterHelper2.isLowSurrogate = function(ch) {
1237          return (function(c) {
1238            return c.charCodeAt == null ? c : c.charCodeAt(0);
1239          })(ch) >= (function(c) {
1240            return c.charCodeAt == null ? c : c.charCodeAt(0);
1241          })(CharacterHelper2.MIN_LOW_SURROGATE) && (function(c) {
1242            return c.charCodeAt == null ? c : c.charCodeAt(0);
1243          })(ch) <= (function(c) {
1244            return c.charCodeAt == null ? c : c.charCodeAt(0);
1245          })(CharacterHelper2.MAX_LOW_SURROGATE);
1246        };
1247        CharacterHelper2.isSpace = function(c) {
1248          switch (c.charCodeAt(0)) {
1249            case 32:
1250              return true;
1251            case 10:
1252              return true;
1253            case 9:
1254              return true;
1255            case 12:
1256              return true;
1257            case 13:
1258              return true;
1259            default:
1260              return false;
1261          }
1262        };
1263        CharacterHelper2.isNonEmpty = function(s) {
1264          return s != null && s.length > 0;
1265        };
1266        CharacterHelper2.isWhitespace$char = function(ch) {
1267          return CharacterHelper2.isNonEmpty(
1268            /* valueOf */
1269            String(ch).toString().match(CharacterHelper2.whitespaceRegex())
1270          );
1271        };
1272        CharacterHelper2.isWhitespace = function(ch) {
1273          if (typeof ch === "string" || ch === null) {
1274            return javaemul13.internal.CharacterHelper.isWhitespace$char(ch);
1275          } else if (typeof ch === "number" || ch === null) {
1276            return javaemul13.internal.CharacterHelper.isWhitespace$int(ch);
1277          } else
1278            throw new Error("invalid overload");
1279        };
1280        CharacterHelper2.isWhitespace$int = function(codePoint) {
1281          return CharacterHelper2.isNonEmpty(String.fromCharCode(codePoint).match(CharacterHelper2.whitespaceRegex()));
1282        };
1283        CharacterHelper2.whitespaceRegex = function() {
1284          return new RegExp("[\\t-\\r \\u1680\\u180E\\u2000-\\u2006\\u2008-\\u200A\\u2028\\u2029\\u205F\\u3000\\uFEFF]|[\\x1C-\\x1F]");
1285        };
1286        CharacterHelper2.isSupplementaryCodePoint = function(codePoint) {
1287          return codePoint >= CharacterHelper2.MIN_SUPPLEMENTARY_CODE_POINT && codePoint <= CharacterHelper2.MAX_CODE_POINT;
1288        };
1289        CharacterHelper2.isSurrogatePair = function(highSurrogate, lowSurrogate) {
1290          return CharacterHelper2.isHighSurrogate(highSurrogate) && CharacterHelper2.isLowSurrogate(lowSurrogate);
1291        };
1292        CharacterHelper2.isUpperCase = function(c) {
1293          return (function(c2) {
1294            return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1295          })(CharacterHelper2.toUpperCase$char(c)) == (function(c2) {
1296            return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1297          })(c) && CharacterHelper2.isLetter(c);
1298        };
1299        CharacterHelper2.isValidCodePoint = function(codePoint) {
1300          return codePoint >= CharacterHelper2.MIN_CODE_POINT && codePoint <= CharacterHelper2.MAX_CODE_POINT;
1301        };
1302        CharacterHelper2.offsetByCodePoints$char_A$int$int$int$int = function(a, start, count, index, codePointOffset) {
1303          return CharacterHelper2.offsetByCodePoints$java_lang_CharSequence$int$int((function(str, index2, len) {
1304            return str.substring(index2, index2 + len);
1305          })(a.join(""), start, count), index, codePointOffset);
1306        };
1307        CharacterHelper2.offsetByCodePoints = function(a, start, count, index, codePointOffset) {
1308          if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "string") || a === null) && (typeof start === "number" || start === null) && (typeof count === "number" || count === null) && (typeof index === "number" || index === null) && (typeof codePointOffset === "number" || codePointOffset === null)) {
1309            return javaemul13.internal.CharacterHelper.offsetByCodePoints$char_A$int$int$int$int(a, start, count, index, codePointOffset);
1310          } else if ((a != null && (a.constructor != null && a.constructor["__interfaces"] != null && a.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof a === "string") || a === null) && (typeof start === "number" || start === null) && (typeof count === "number" || count === null) && index === void 0 && codePointOffset === void 0) {
1311            return javaemul13.internal.CharacterHelper.offsetByCodePoints$java_lang_CharSequence$int$int(a, start, count);
1312          } else
1313            throw new Error("invalid overload");
1314        };
1315        CharacterHelper2.offsetByCodePoints$java_lang_CharSequence$int$int = function(seq, index, codePointOffset) {
1316          if (codePointOffset < 0) {
1317            while (codePointOffset < 0) {
1318              {
1319                --index;
1320                if (CharacterHelper2.isLowSurrogate(seq.charAt(index)) && CharacterHelper2.isHighSurrogate(seq.charAt(index - 1))) {
1321                  --index;
1322                }
1323                ++codePointOffset;
1324              }
1325            }
1326            ;
1327          } else {
1328            while (codePointOffset > 0) {
1329              {
1330                if (CharacterHelper2.isHighSurrogate(seq.charAt(index)) && CharacterHelper2.isLowSurrogate(seq.charAt(index + 1))) {
1331                  ++index;
1332                }
1333                ++index;
1334                --codePointOffset;
1335              }
1336            }
1337            ;
1338          }
1339          return index;
1340        };
1341        CharacterHelper2.toChars$int = function(codePoint) {
1342          javaemul13.internal.InternalPreconditions.checkCriticalArgument(
1343            codePoint >= 0 && codePoint <= CharacterHelper2.MAX_CODE_POINT,
1344            "CodePoint %s not in range [%s, %s]",
1345            /* toString */
1346            "" + codePoint,
1347            "0",
1348            /* toString */
1349            "" + CharacterHelper2.MAX_CODE_POINT
1350          );
1351          if (codePoint >= CharacterHelper2.MIN_SUPPLEMENTARY_CODE_POINT) {
1352            return [CharacterHelper2.getHighSurrogate(codePoint), CharacterHelper2.getLowSurrogate(codePoint)];
1353          } else {
1354            return [String.fromCharCode(codePoint)];
1355          }
1356        };
1357        CharacterHelper2.toChars$int$char_A$int = function(codePoint, dst, dstIndex) {
1358          javaemul13.internal.InternalPreconditions.checkCriticalArgument(
1359            codePoint >= 0 && codePoint <= CharacterHelper2.MAX_CODE_POINT,
1360            "CodePoint %s not in range [%s, %s]",
1361            /* toString */
1362            "" + codePoint,
1363            "0",
1364            /* toString */
1365            "" + CharacterHelper2.MAX_CODE_POINT
1366          );
1367          if (codePoint >= CharacterHelper2.MIN_SUPPLEMENTARY_CODE_POINT) {
1368            dst[dstIndex++] = CharacterHelper2.getHighSurrogate(codePoint);
1369            dst[dstIndex] = CharacterHelper2.getLowSurrogate(codePoint);
1370            return 2;
1371          } else {
1372            dst[dstIndex] = String.fromCharCode(codePoint);
1373            return 1;
1374          }
1375        };
1376        CharacterHelper2.toChars = function(codePoint, dst, dstIndex) {
1377          if ((typeof codePoint === "number" || codePoint === null) && (dst != null && dst instanceof Array && (dst.length == 0 || dst[0] == null || typeof dst[0] === "string") || dst === null) && (typeof dstIndex === "number" || dstIndex === null)) {
1378            return javaemul13.internal.CharacterHelper.toChars$int$char_A$int(codePoint, dst, dstIndex);
1379          } else if ((typeof codePoint === "number" || codePoint === null) && dst === void 0 && dstIndex === void 0) {
1380            return javaemul13.internal.CharacterHelper.toChars$int(codePoint);
1381          } else
1382            throw new Error("invalid overload");
1383        };
1384        CharacterHelper2.toCodePoint = function(highSurrogate, lowSurrogate) {
1385          return CharacterHelper2.MIN_SUPPLEMENTARY_CODE_POINT + (((function(c) {
1386            return c.charCodeAt == null ? c : c.charCodeAt(0);
1387          })(highSurrogate) & 1023) << 10) + ((function(c) {
1388            return c.charCodeAt == null ? c : c.charCodeAt(0);
1389          })(lowSurrogate) & 1023);
1390        };
1391        CharacterHelper2.toLowerCase$char = function(c) {
1392          return (
1393            /* valueOf */
1394            String(c).toString().toLowerCase().charAt(0)
1395          );
1396        };
1397        CharacterHelper2.toLowerCase = function(c) {
1398          if (typeof c === "string" || c === null) {
1399            return javaemul13.internal.CharacterHelper.toLowerCase$char(c);
1400          } else if (typeof c === "number" || c === null) {
1401            return javaemul13.internal.CharacterHelper.toLowerCase$int(c);
1402          } else
1403            throw new Error("invalid overload");
1404        };
1405        CharacterHelper2.toLowerCase$int = function(c) {
1406          return (
1407            /* valueOf */
1408            String(String.fromCharCode(c)).toString().toLowerCase().charAt(0).charCodeAt(0)
1409          );
1410        };
1411        CharacterHelper2.toString = function(x) {
1412          return (
1413            /* valueOf */
1414            String(x).toString()
1415          );
1416        };
1417        CharacterHelper2.toUpperCase$char = function(c) {
1418          return (
1419            /* valueOf */
1420            String(c).toString().toUpperCase().charAt(0)
1421          );
1422        };
1423        CharacterHelper2.toUpperCase = function(c) {
1424          if (typeof c === "string" || c === null) {
1425            return javaemul13.internal.CharacterHelper.toUpperCase$char(c);
1426          } else if (typeof c === "number" || c === null) {
1427            return javaemul13.internal.CharacterHelper.toUpperCase$int(c);
1428          } else
1429            throw new Error("invalid overload");
1430        };
1431        CharacterHelper2.toUpperCase$int = function(c) {
1432          return (
1433            /* valueOf */
1434            String(String.fromCharCode(c)).toString().toUpperCase().charAt(0)
1435          );
1436        };
1437        CharacterHelper2.valueOf = function(c) {
1438          if ((function(c2) {
1439            return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1440          })(c) < 128) {
1441            var result = CharacterHelper2.BoxedValues.boxedValues_$LI$()[c.charCo
1441deAt(0)];
1442            if ((function(c2) {
1443              return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
1444            })(result) == null) {
1445              result = CharacterHelper2.BoxedValues.boxedValues_$LI$()[c.charCodeAt(0)] = new String(c);
1446            }
1447            return result;
1448          }
1449          return new String(c);
1450        };
1451        CharacterHelper2.codePointAt$java_lang_CharSequence$int$int = function(cs, index, limit) {
1452          var hiSurrogate = cs.charAt(index++);
1453          var loSurrogate;
1454          if (CharacterHelper2.isHighSurrogate(hiSurrogate) && index < limit && CharacterHelper2.isLowSurrogate(loSurrogate = cs.charAt(index))) {
1455            return CharacterHelper2.toCodePoint(hiSurrogate, loSurrogate);
1456          }
1457          return hiSurrogate.charCodeAt(0);
1458        };
1459        CharacterHelper2.codePointBefore$java_lang_CharSequence$int$int = function(cs, index, start) {
1460          var loSurrogate = cs.charAt(--index);
1461          var highSurrogate;
1462          if (CharacterHelper2.isLowSurrogate(loSurrogate) && index > start && CharacterHelper2.isHighSurrogate(highSurrogate = cs.charAt(index - 1))) {
1463            return CharacterHelper2.toCodePoint(highSurrogate, loSurrogate);
1464          }
1465          return loSurrogate.charCodeAt(0);
1466        };
1467        CharacterHelper2.forDigit$int = function(digit) {
1468          var overBaseTen = digit - 10;
1469          return String.fromCharCode(overBaseTen < 0 ? "0".charCodeAt(0) + digit : "a".charCodeAt(0) + overBaseTen);
1470        };
1471        CharacterHelper2.getHighSurrogate = function(codePoint) {
1472          return String.fromCharCode((function(c) {
1473            return c.charCodeAt == null ? c : c.charCodeAt(0);
1474          })(CharacterHelper2.MIN_HIGH_SURROGATE) + (codePoint - CharacterHelper2.MIN_SUPPLEMENTARY_CODE_POINT >> 10 & 1023));
1475        };
1476        CharacterHelper2.getLowSurrogate = function(codePoint) {
1477          return String.fromCharCode((function(c) {
1478            return c.charCodeAt == null ? c : c.charCodeAt(0);
1479          })(CharacterHelper2.MIN_LOW_SURROGATE) + (codePoint - CharacterHelper2.MIN_SUPPLEMENTARY_CODE_POINT & 1023));
1480        };
1481        CharacterHelper2.prototype.charValue = function() {
1482          return this.value;
1483        };
1484        CharacterHelper2.prototype.compareTo$javaemul_internal_CharacterHelper = function(c) {
1485          return CharacterHelper2.compare(this.value, c.value);
1486        };
1487        CharacterHelper2.prototype.compareTo = function(c) {
1488          if (c != null && c instanceof javaemul13.internal.CharacterHelper || c === null) {
1489            return this.compareTo$javaemul_internal_CharacterHelper(c);
1490          } else
1491            throw new Error("invalid overload");
1492        };
1493        CharacterHelper2.prototype.equals = function(o) {
1494          return o != null && o instanceof javaemul13.internal.CharacterHelper && (function(c) {
1495            return c.charCodeAt == null ? c : c.charCodeAt(0);
1496          })(o.value) == (function(c) {
1497            return c.charCodeAt == null ? c : c.charCodeAt(0);
1498          })(this.value);
1499        };
1500        CharacterHelper2.prototype.hashCode = function() {
1501          return CharacterHelper2.hashCode(this.value);
1502        };
1503        CharacterHelper2.prototype.toString = function() {
1504          return (
1505            /* valueOf */
1506            String(this.value).toString()
1507          );
1508        };
1509        CharacterHelper2.MIN_RADIX = 2;
1510        CharacterHelper2.MAX_RADIX = 36;
1511        CharacterHelper2.MIN_VALUE = "\0";
1512        CharacterHelper2.MAX_VALUE = "\uFFFF";
1513        CharacterHelper2.MIN_SURROGATE = "\uD800";
1514        CharacterHelper2.MAX_SURROGATE = "\uDFFF";
1515        CharacterHelper2.MIN_LOW_SURROGATE = "\uDC00";
1516        CharacterHelper2.MAX_LOW_SURROGATE = "\uDFFF";
1517        CharacterHelper2.MIN_HIGH_SURROGATE = "\uD800";
1518        CharacterHelper2.MAX_HIGH_SURROGATE = "\uDBFF";
1519        CharacterHelper2.MIN_SUPPLEMENTARY_CODE_POINT = 65536;
1520        CharacterHelper2.MIN_CODE_POINT = 0;
1521        CharacterHelper2.MAX_CODE_POINT = 1114111;
1522        CharacterHelper2.SIZE = 16;
1523        return CharacterHelper2;
1524      })()
1525    );
1526    internal2.CharacterHelper = CharacterHelper;
1527    CharacterHelper["__class"] = "javaemul.internal.CharacterHelper";
1528    CharacterHelper["__interfaces"] = ["java.lang.Comparable", "j
1528ava.io.Serializable"];
1529    (function(CharacterHelper2) {
1530      var BoxedValues = (
1531        /** @class */
1532        (function() {
1533          function BoxedValues2() {
1534          }
1535          BoxedValues2.boxedValues_$LI$ = function() {
1536            if (BoxedValues2.boxedValues == null) {
1537              BoxedValues2.boxedValues = (function(s) {
1538                var a = [];
1539                while (s-- > 0)
1540                  a.push(null);
1541                return a;
1542              })(128);
1543            }
1544            return BoxedValues2.boxedValues;
1545          };
1546          return BoxedValues2;
1547        })()
1548      );
1549      CharacterHelper2.BoxedValues = BoxedValues;
1550      BoxedValues["__class"] = "javaemul.internal.CharacterHelper.BoxedValues";
1551    })(CharacterHelper = internal2.CharacterHelper || (internal2.CharacterHelper = {}));
1552  })(internal = javaemul13.internal || (javaemul13.internal = {}));
1553})(javaemul || (javaemul = {}));
1554(function(javaemul13) {
1555  var internal;
1556  (function(internal2) {
1557    var DateUtil = (
1558      /** @class */
1559      (function() {
1560        function DateUtil2() {
1561        }
1562        DateUtil2.now = function() {
1563          if (Date.now) {
1564            return Date.now();
1565          }
1566          ;
1567          return (/* @__PURE__ */ new Date()).getTime();
1568        };
1569        return DateUtil2;
1570      })()
1571    );
1572    internal2.DateUtil = DateUtil;
1573    DateUtil["__class"] = "javaemul.internal.DateUtil";
1574  })(internal = javaemul13.internal || (javaemul13.internal = {}));
1575})(javaemul || (javaemul = {}));
1576(function(javaemul13) {
1577  var internal;
1578  (function(internal2) {
1579    var ArrayHelper = (
1580      /** @class */
1581      (function() {
1582        function ArrayHelper2() {
1583        }
1584        ArrayHelper2.clone = function(array, fromIndex, toIndex) {
1585          var result = ArrayHelper2.unsafeClone(array, fromIndex, toIndex);
1586          return javaemul13.internal.ArrayStamper.stampJavaTypeInfo(result, array);
1587        };
1588        ArrayHelper2.unsafeClone = function(array, fromIndex, toIndex) {
1589          return array.slice(fromIndex, toIndex);
1590        };
1591        ArrayHelper2.createFrom = function(array, length) {
1592          var result = ArrayHelper2.createNativeArray(length);
1593          return javaemul13.internal.ArrayStamper.stampJavaTypeInfo(result, array);
1594        };
1595        ArrayHelper2.createNativeArray = function(length) {
1596          return new Array(length);
1597        };
1598        ArrayHelper2.getLength = function(array) {
1599          return array.length | 0;
1600        };
1601        ArrayHelper2.setLength = function(array, length) {
1602          array.length = length;
1603        };
1604        ArrayHelper2.removeFrom = function(array, index, deleteCount) {
1605          array.splice(index, deleteCount);
1606        };
1607        ArrayHelper2.insertTo$java_lang_Object$int$java_lang_Object = function(array, index, value) {
1608          array.splice(index, 0, value);
1609        };
1610        ArrayHelper2.insertTo$java_lang_Object$int$java_lang_Object_A = function(array, index, values) {
1611          ArrayHelper2.copy$java_lang_Object$int$java_lang_Object$int$int$boolean(values, 0, array, index, values.length, false);
1612        };
1613        ArrayHelper2.insertTo = function(array, index, values) {
1614          if ((array != null || array === null) && (typeof index === "number" || index === null) && (values != null && values instanceof Array && (values.length == 0 || values[0] == null || values[0] != null) || values === null)) {
1615            return javaemul13.internal.ArrayHelper.insertTo$java_lang_Object$int$java_lang_Object_A(array, index, values);
1616          } else if ((array != null || array === null) && (typeof index === "number" || index === null) && (values != null || values === null)) {
1617            return javaemul13.internal.ArrayHelper.insertTo$java_lang_Object$int$java_lang_Object(array, index, values);
1618          } else
1619            throw new Error("invalid overload");
1620        };
1621        ArrayHelper2.insertValuesToArray = function(array, index, values) {
1622          ArrayHelper2.copy$java_lang_Object$int$java_lang_Object$int$int$boolean(values, 0, array, index, values.length, false);
1623        };
1624        ArrayHelper2.copy$java_lang_Object$int$java_lang_Object$int$int = function(array, srcOfs, dest, destOfs, len) {
1625          ArrayHelper2.copy$java_lang_Object$int$java_lang_Object$int$int$boolean(array, srcOfs, dest, destOfs, len, true);
1626        };
1627        ArrayHelper2.copy$java_lang_Object$int$java_lang_Object$int$int$boolean = function(src, srcOfs, dest, destOfs, len, overwrite) {
1628          if (src === dest) {
1629            src = ArrayHelper2.unsafeClone(src, srcOfs, srcOfs + len);
1630            srcOfs = 0;
1631          }
1632          for (var batchStart = srcOfs, end = srcOfs + len; batchStart < end; ) {
1633            {
1634              var batchEnd = Math.min(batchStart + ArrayHelper2.ARRAY_PROCESS_BATCH_SIZE, end);
1635              len = batchEnd - batchStart;
1636              ArrayHelper2.applySplice(dest, destOfs, overwrite ? len : 0, ArrayHelper2.unsafeClone(src, batchStart, batchEnd));
1637              batchStart = batchEnd;
1638              destOfs += len;
1639            }
1640            ;
1641          }
1642        };
1643        ArrayHelper2.copy = function(src, srcOfs, dest, destOfs, len, overwrite) {
1644          if ((src != null || src === null) && (typeof srcOfs === "number" || srcOfs === null) && (dest != null || dest === null) && (typeof destOfs === "number" || destOfs === null) && (typeof len === "
1644number" || len === null) && (typeof overwrite === "boolean" || overwrite === null)) {
1645            return javaemul13.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int$boolean(src, srcOfs, dest, destOfs, len, overwrite);
1646          } else if ((src != null || src === null) && (typeof srcOfs === "number" || srcOfs === null) && (dest != null || dest === null) && (typeof destOfs === "number" || destOfs === null) && (typeof len === "number" || len === null) && overwrite === void 0) {
1647            return javaemul13.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(src, srcOfs, dest, destOfs, len);
1648          } else
1649            throw new Error("invalid overload");
1650        };
1651        ArrayHelper2.applySplice = function(arrayObject, index, deleteCount, arrayToAdd) {
1652          Array.prototype.splice.apply(arrayObject, [index, deleteCount].concat(arrayToAdd));
1653        };
1654        ArrayHelper2.ARRAY_PROCESS_BATCH_SIZE = 1e4;
1655        return ArrayHelper2;
1656      })()
1657    );
1658    internal2.ArrayHelper = ArrayHelper;
1659    ArrayHelper["__class"] = "javaemul.internal.ArrayHelper";
1660  })(internal = javaemul13.internal || (javaemul13.internal = {}));
1661})(javaemul || (javaemul = {}));
1662(function(javaemul13) {
1663  var internal;
1664  (function(internal2) {
1665    var MathHelper = (
1666      /** @class */
1667      (function() {
1668        function MathHelper2() {
1669        }
1670        MathHelper2.EPSILON_$LI$ = function() {
1671          if (MathHelper2.EPSILON == null) {
1672            MathHelper2.EPSILON = MathHelper2.pow(2, -52);
1673          }
1674          return MathHelper2.EPSILON;
1675        };
1676        MathHelper2.MAX_VALUE_$LI$ = function() {
1677          if (MathHelper2.MAX_VALUE == null) {
1678            MathHelper2.MAX_VALUE = (2 - MathHelper2.EPSILON_$LI$()) * MathHelper2.pow(2, 1023);
1679          }
1680          return MathHelper2.MAX_VALUE;
1681        };
1682        MathHelper2.MIN_VALUE_$LI$ = function() {
1683          if (MathHelper2.MIN_VALUE == null) {
1684            MathHelper2.MIN_VALUE = MathHelper2.pow(2, -1022);
1685          }
1686          return MathHelper2.MIN_VALUE;
1687        };
1688        MathHelper2.nextDown = function(x) {
1689          return -MathHelper2.nextUp(-x);
1690        };
1691        MathHelper2.ulp = function(x) {
1692          return x < 0 ? MathHelper2.nextUp(x) - x : x - -MathHelper2.nextUp(-x);
1693        };
1694        MathHelper2.nextUp = function(x) {
1695          if (x !== x) {
1696            return x;
1697          }
1698          if (x === (-1 / 0 | 0)) {
1699            return -MathHelper2.MAX_VALUE_$LI$();
1700          }
1701          if (x === (1 / 0 | 0)) {
1702            return 1 / 0 | 0;
1703          }
1704          if (x === +MathHelper2.MAX_VALUE_$LI$()) {
1705            return 1 / 0 | 0;
1706          }
1707          var y = x * (x < 0 ? 1 - MathHelper2.EPSILON_$LI$() / 2 : 1 + MathHelper2.EPSILON_$LI$());
1708          if (y === x) {
1709            y = MathHelper2.MIN_VALUE_$LI$() * MathHelper2.EPSILON_$LI$() > 0 ? x + MathHelper2.MIN_VALUE_$LI$() * MathHelper2.EPSILON_$LI$() : x + MathHelper2.MIN_VALUE_$LI$();
1710          }
1711          if (y === (1 / 0 | 0)) {
1712            y = +MathHelper2.MAX_VALUE_$LI$();
1713          }
1714          var b = x + (y - x) / 2;
1715          if (x < b && b < y) {
1716            y = b;
1717          }
1718          var c = (y + x) / 2;
1719          if (x < c && c < y) {
1720            y = c;
1721          }
1722          return y === 0 ? -0 : y;
1723        };
1724        MathHelper2.PI_OVER_180_$LI$ = function() {
1725          if (MathHelper2.PI_OVER_180 == null) {
1726            MathHelper2.PI_OVER_180 = MathHelper2.PI / 180;
1727          }
1728          return MathHelper2.PI_OVER_180;
1729        };
1730        MathHelper2.PI_UNDER_180_$LI$ = function() {
1731          if (MathHelper2.PI_UNDER_180 == null) {
1732            MathHelper2.PI_UNDER_180 = 180 / MathHelper2.PI;
1733          }
1734          return MathHelper2.PI_UNDER_180;
1735        };
1736        MathHelper2.abs$double = function(x) {
1737          return x <= 0 ? 0 - x : x;
1738        };
1739        MathHelper2.abs$float = function(x) {
1740          return MathHelper2.abs$double(x);
1741        };
1742        MathHelper2.abs$int = function(x) {
1743          return x < 0 ? -x : x;
1744        };
1745        MathHelper2.abs = function(x) {
1746          if (typeof x === "number" || x === null) {
1747            return javaemul13.internal.MathHelper.abs$int(x);
1748          } else if (typeof x === "number" || x === null) {
1749            return javaemul13.internal.MathHelper.abs$long(x);
1750          } else if (typeof x === "number" || x === null) {
1751            return javaemul13.internal.MathHelper.abs$float(x);
1752          } else if (typeof x === "number" || x === null) {
1753            return javaemul13.internal.MathHelper.abs$double(x);
1754          } else
1755            throw new Error("invalid overload");
1756        };
1757        MathHelper2.abs$long = function(x) {
1758          return x < 0 ? -x : x;
1759        };
1760        MathHelper2.acos = function(x) {
1761          return Math.acos(x);
1762        };
1763        MathHelper2.asin = function(x) {
1764          return Math.asin(x);
1765        };
1766        MathHelper2.atan = function(x) {
1767          return Math.atan(x);
1768        };
1769        MathHelper2.atan2 = function(y, x) {
1770          return Math.atan2(y, x);
1771        };
1772        MathHelper2.cbrt = function(x) {
1773          return MathHelper2.pow(x, 1 / 3);
1774        };
1775        MathHelper2.ceil = function(x) {
1776          return Math.ceil(x);
1777        };
1778        MathHelper2.copySign$double$double = function(magnitude, sign) {
1779          if (sign < 0) {
1780            return magnitude < 0 ? magnitude : -magnitude;
1781          } else {
1782            return magnitude > 0 ? magnitude : -magnitude;
1783          }
1784        };
1785        MathHelper2.copySign$float$float = function(magnitude, sign) {
1786          return MathHelper2.copySign$double$double(magnitude, sign);
1787        };
1788        MathHelper2.copySign = function(magnitude, sign) {
1789          if ((typeof magnitude === "number" || magnitude === null) && (typeof sign === "
1789number" || sign === null)) {
1790            return javaemul13.internal.MathHelper.copySign$float$float(magnitude, sign);
1791          } else if ((typeof magnitude === "number" || magnitude === null) && (typeof sign === "number" || sign === null)) {
1792            return javaemul13.internal.MathHelper.copySign$double$double(magnitude, sign);
1793          } else
1794            throw new Error("invalid overload");
1795        };
1796        MathHelper2.cos = function(x) {
1797          return Math.cos(x);
1798        };
1799        MathHelper2.cosh = function(x) {
1800          return (MathHelper2.exp(x) + MathHelper2.exp(-x)) / 2;
1801        };
1802        MathHelper2.exp = function(x) {
1803          return Math.exp(x);
1804        };
1805        MathHelper2.expm1 = function(d) {
1806          if (d === 0 || /* isNaN */
1807          isNaN(d)) {
1808            return d;
1809          } else if (!(function(value) {
1810            return Number.NEGATIVE_INFINITY === value || Number.POSITIVE_INFINITY === value;
1811          })(d)) {
1812            if (d < 0) {
1813              return -1;
1814            } else {
1815              return javaemul13.internal.DoubleHelper.POSITIVE_INFINITY;
1816            }
1817          }
1818          return MathHelper2.exp(d) + 1;
1819        };
1820        MathHelper2.floor = function(x) {
1821          return Math.floor(x);
1822        };
1823        MathHelper2.hypot = function(x, y) {
1824          return MathHelper2.sqrt(x * x + y * y);
1825        };
1826        MathHelper2.log = function(x) {
1827          return Math.log(x);
1828        };
1829        MathHelper2.log10 = function(x) {
1830          return Math.log(x) * Math.LOG10E;
1831        };
1832        MathHelper2.log1p = function(x) {
1833          return MathHelper2.log(x + 1);
1834        };
1835        MathHelper2.max$double$double = function(x, y) {
1836          return Math.max(x, y);
1837        };
1838        MathHelper2.max$float$float = function(x, y) {
1839          return Math.max(x, y);
1840        };
1841        MathHelper2.max$int$int = function(x, y) {
1842          return x > y ? x : y;
1843        };
1844        MathHelper2.max = function(x, y) {
1845          if ((typeof x === "number" || x === null) && (typeof y === "number" || y === null)) {
1846            return javaemul13.internal.MathHelper.max$int$int(x, y);
1847          } else if ((typeof x === "number" || x === null) && (typeof y === "number" || y === null)) {
1848            return javaemul13.internal.MathHelper.max$long$long(x, y);
1849          } else if ((typeof x === "number" || x === null) && (typeof y === "number" || y === null)) {
1850            return javaemul13.internal.MathHelper.max$float$float(x, y);
1851          } else if ((typeof x === "number" || x === null) && (typeof y === "number" || y === null)) {
1852            return javaemul13.internal.MathHelper.max$double$double(x, y);
1853          } else
1854            throw new Error("invalid overload");
1855        };
1856        MathHelper2.max$long$long = function(x, y) {
1857          return x > y ? x : y;
1858        };
1859        MathHelper2.min$double$double = function(x, y) {
1860          return Math.min(x, y);
1861        };
1862        MathHelper2.min$float$float = function(x, y) {
1863          return Math.min(x, y);
1864        };
1865        MathHelper2.min$int$int = function(x, y) {
1866          return x < y ? x : y;
1867        };
1868        MathHelper2.min = function(x, y) {
1869          if ((typeof x === "number" || x === null) && (typeof y === "number" || y === null)) {
1870            return javaemul13.internal.MathHelper.min$int$int(x, y);
1871          } else if ((typeof x === "number" || x === null) && (typeof y === "number" || y === null)) {
1872            return javaemul13.internal.MathHelper.min$long$long(x, y);
1873          } else if ((typeof x === "number" || x === null) && (typeof y === "number" || y === null)) {
1874            return javaemul13.internal.MathHelper.min$float$float(x, y);
1875          } else if ((typeof x === "number" || x === null) && (typeof y === "number" || y === null)) {
1876            return javaemul13.internal.MathHelper.min$double$double(x, y);
1877          } else
1878            throw new Error("invalid overload");
1879        };
1880        MathHelper2.min$long$long = function(x, y) {
1881          return x < y ? x : y;
1882        };
1883        MathHelper2.pow = function(x, exp) {
1884          return Math.pow(x, exp);
1885        };
1886        MathHelper2.random = function() {
1887          return Math.random();
1888        };
1889        MathHelper2.rint = function(d) {
1890          if (
1891            /* isNaN */
1892            isNaN(d)
1893          ) {
1894            return d;
1895          } else if (
1896            /* isInfinite */
1897            (function(value) {
1898              return Number.NEGATIVE_INFINITY === value || Number.POSITIVE_INFINITY === value;
1899            })(d)
1900          ) {
1901            return d;
1902          } else if (d === 0) {
1903            return d;
1904          } else {
1905            return MathHelper2.round$double(d);
1906          }
1907        };
1908        MathHelper2.round$double = function(x) {
1909          return (function(n) {
1910            return n < 0 ? Math.ceil(n) : Math.floor(n);
1911          })(Math.round(x));
1912        };
1913        MathHelper2.round$float = function(x) {
1914          var roundedValue = Math.round(x);
1915          return MathHelper2.unsafeCastToInt(roundedValue);
1916        };
1917        MathHelper2.round = function(x) {
1918          if (typeof x === "number" || x === null) {
1919            return javaemul13.internal.MathHelper.round$float(x);
1920          } else if (typeof x === "number" || x === null) {
1921            return javaemul13.internal.MathHelper.round$double(x);
1922          } else
1923            throw new Error("invalid overload");
1924        };
1925        MathHelper2.unsafeCastToInt = function(d) {
1926          return d;
1927        };
1928        MathHelper2.scalb$double$int = function(d, scaleFactor) {
1929          if (scaleFactor >= 31 || scaleFactor <= -31) {
1930            return d * MathHelper2.pow(2, scaleFactor);
1931          } else if (scaleFactor > 0) {
1932            return d * (1 << scaleFactor);
1933          } else if (scaleFactor === 0) {
1934            return d;
1935          } else {
1936            return d * 1 / (1 << -scaleFactor);
1937          }
1938        };
1939        MathHelper2.scalb$float$int = function(f, scaleFactor) {
1940          if (scaleFactor >= 31 || scaleFactor <= -31) {
1941            return f * MathHelper2.pow(2, scaleFactor);
1942          } else if (scaleFactor > 0) {
1943            return f * (1 << scaleFactor);
1944          } else if (scaleFactor === 0) {
1945            return f;
1946          } else {
1947            return f * 1 / (1 << -scaleFactor);
1948          }
1949        };
1950        MathHelper2.scalb = function(f, scaleFactor) {
1951          if ((typeof f === "number" || f === null) && (typeof scaleFactor === "number" || scaleFactor === null)) {
1952            return javaemul13.internal.MathHelper.scalb$float$int(f, scaleFactor);
1953          } else if ((typeof f === "number" || f === null) && (typeof scaleFactor === "number" || scaleFactor === null)) {
1954            return javaemul13.internal.MathHelper.scalb$double$int(f, scaleFactor);
1955          } else
1956            throw new Error("invalid overload");
1957        };
1958        MathHelper2.signum$double = function(d) {
1959          if (d > 0) {
1960            return 1;
1961          } else if (d < 0) {
1962            return -1;
1963          } else {
1964            return 0;
1965          }
1966        };
1967        MathHelper2.signum$float = function(f) {
1968          if (f > 0) {
1969            return 1;
1970          } else if (f < 0) {
1971            return -1;
1972          } else {
1973            return 0;
1974          }
1975        };
1976        MathHelper2.signum = function(f) {
1977          if (typeof f === "number" || f === null) {
1978            return javaemul13.internal.MathHelper.signum$float(f);
1979          } else if (typeof f === "number" || f === null) {
1980            return javaemul13.internal.MathHelper.signum$double(f);
1981          } else
1982            throw new Error("invalid overload");
1983        };
1984        MathHelper2.sin = function(x) {
1985          return Math.sin(x);
1986        };
1987        MathHelper2.sinh = function(x) {
1988          return (MathHelper2.exp(x) - MathHelper2.exp(-x)) / 2;
1989        };
1990        MathHelper2.sqrt = function(x) {
1991          return Math.sqrt(x);
1992        };
1993        MathHelper2.tan = function(x) {
1994          return Math.tan(x);
1995        };
1996        MathHelper2.tanh = function(x) {
1997          if (x === javaemul13.internal.JsUtils.getInfinity()) {
1998            return 1;
1999          } else if (x === -javaemul13.internal.JsUtils.getInfinity()) {
2000            return -1;
2001          }
2002          var e2x = MathHelper2.exp(2 * x);
2003          return (e2x - 1) / (e2x + 1);
2004        };
2005        MathHelper2.toDegrees = function(x) {
2006          return x * MathHelper2.PI_UNDER_180_$LI$();
2007        };
2008        MathHelper2.toRadians = function(x) {
2009          return x * MathHelper2.PI_OVER_180_$LI$();
2010        };
2011        MathHelper2.IEEEremainder = function(f1, f2) {
2012          var r = Math.abs(f1 % f2);
2013          if (
2014            /* isNaN */
2015            isNaN(r) || r === f2 || r <= Math.abs(f2) / 2
2016          ) {
2017            return r;
2018          } else {
2019            return (
2020              /* signum */
2021              (function(f) {
2022                if (f > 0) {
2023                  return 1;
2024                } else if (f < 0) {
2025                  return -1;
2026                } else {
2027                  return 0;
2028                }
2029              })(f1) * (r - f2)
2030            );
2031          }
2032        };
2033        MathHelper2.E = 2.718281828459045;
2034        MathHelper2.PI = 3.141592653589793;
2035        return MathHelper2;
2036      })()
2037    );
2038    internal2.MathHelper = MathHelper;
2039    MathHelper["__class"] = "javaemul.internal.MathHelper";
2040  })(internal = javaemul13.internal || (javaemul13.internal = {}));
2041})(javaemul || (javaemul = {}));
2042(function(javaemul13) {
2043  var internal;
2044  (function(internal2) {
2045    var ArrayStamper = (
2046      /** @class */
2047      (function() {
2048        function ArrayStamper2() {
2049        }
2050        ArrayStamper2.stampJavaTypeInfo = function(array, referenceType) {
2051          return array;
2052        };
2053        return ArrayStamper2;
2054      })()
2055    );
2056    internal2.ArrayStamper = ArrayStamper;
2057    ArrayStamper["__class"] = "javaemul.internal.ArrayStamper";
2058  })(internal = javaemul13.internal || (javaemul13.internal = {}));
2059})(javaemul || (javaemul = {}));
2060(function(javaemul13) {
2061  var internal;
2062  (function(internal2) {
2063    var HashCodes = (
2064      /** @class */
2065      (function() {
2066        function HashCodes2() {
2067        }
2068        HashCodes2.hashCodeForString = function(s) {
2069          return javaemul13.internal.StringHashCache.getHashCode(s);
2070        };
2071        HashCodes2.getIdentityHashCode = function(o) {
2072          if (o == null) {
2073            return 0;
2074          }
2075          return typeof o === "string" ? HashCodes2.hashCodeForString(javaemul13.internal.JsUtils.unsafeCastToString(o)) : HashCodes2.getObjectIdentityHashCode(o);
2076        };
2077        HashCodes2.getObjectIdentityHashCode = function(o) {
2078          if (o[HashCodes2.HASH_CODE_PROPERTY] != null) {
2079            return o[HashCodes2.HASH_CODE_PROPERTY];
2080          } else {
2081            return o[HashCodes2.HASH_CODE_PROPERTY] = HashCodes2.getNextHashId();
2082          }
2083        };
2084        HashCodes2.getNextHashId = function() {
2085          return ++HashCodes2.sNextHashId;
2086        };
2087        HashCodes2.sNextHashId = 0;
2088        HashCodes2.HASH_CODE_PROPERTY = "$H";
2089        return HashCodes2;
2090      })()
2091    );
2092    internal2.HashCodes = HashCodes;
2093    HashCodes["__class"] = "javaemul.internal.HashCodes";
2094  })(internal = javaemul13.internal || (javaemul13.internal = {}));
2095})(javaemul || (javaemul = {}));
2096(function(javaemul13) {
2097  var internal;
2098  (function(internal2) {
2099    var NumberHelper = (
2100      /** @class */
2101      (function() {
2102        function NumberHelper2() {
2103        }
2104        NumberHelper2.__decodeAndValidateInt = function(s, lowerBound, upperBound) {
2105          var decode = NumberHelper2.__decodeNumberString(s);
2106          return NumberHelper2.__parseAndValidateInt(decode.payload, decode.radix, lowerBound, upperBound);
2107        };
2108        NumberHelper2.__decodeNumberString = function(s) {
2109          var negative;
2110          if (
2111            /* startsWith */
2112            (function(str, searchString, position) {
2113              if (position === void 0) {
2114                position = 0;
2115              }
2116              return str.substr(position, searchString.length) === searchString;
2117            })(s, "-")
2118          ) {
2119            negative = true;
2120            s = s.substring(1);
2121          } else {
2122            negative = false;
2123            if (
2124              /* startsWith */
2125              (function(str, searchString, position) {
2126                if (position === void 0) {
2127                  position = 0;
2128                }
2129                return str.substr(position, searchString.length) === searchString;
2130              })(s, "+")
2131            ) {
2132              s = s.substring(1);
2133            }
2134          }
2135          var radix;
2136          if (
2137            /* startsWith */
2138            (function(str, searchString, position) {
2139              if (position === void 0) {
2140                position = 0;
2141              }
2142              return str.substr(position, searchString.length) === searchString;
2143            })(s, "0x") || /* startsWith */
2144            (function(str, searchString, position) {
2145              if (position === void 0) {
2146                position = 0;
2147              }
2148              return str.substr(position, searchString.length) === searchString;
2149            })(s, "0X")
2150          ) {
2151            s = s.substring(2);
2152            radix = 16;
2153          } else if (
2154            /* startsWith */
2155            (function(str, searchString, position) {
2156              if (position === void 0) {
2157                position = 0;
2158              }
2159              return str.substr(position, searchString.length) === searchString;
2160            })(s, "#")
2161          ) {
2162            s = s.substring(1);
2163            radix = 16;
2164          } else if (
2165            /* startsWith */
2166            (function(str, searchString, position) {
2167              if (position === void 0) {
2168                position = 0;
2169              }
2170              return str.substr(position, searchString.length) === searchString;
2171            })(s, "0")
2172          ) {
2173            radix = 8;
2174          } else {
2175            radix = 10;
2176          }
2177          if (negative) {
2178            s = "-" + s;
2179          }
2180          return new NumberHelper2.__Decode(radix, s);
2181        };
2182        NumberHelper2.__parseAndValidateDouble = function(s) {
2183          if (!NumberHelper2.__isValidDouble(s)) {
2184            throw java.lang.NumberFormatException.forInputString(s);
2185          }
2186          return parseFloat(s);
2187        };
2188        NumberHelper2.__parseAndValidateInt = function(s, radix, lowerBound, upperBound) {
2189          if (s == null) {
2190            throw java.lang.NumberFormatException.forNullInputString();
2191          }
2192          if (radix < javaemul13.internal.CharacterHelper.MIN_RADIX || radix > javaemul13.internal.CharacterHelper.MAX_RADIX) {
2193            throw java.lang.NumberFormatException.forRadix(radix);
2194          }
2195          var length = s.length;
2196          var startIndex = length > 0 && ((function(c) {
2197            return c.charCodeAt == null ? c : c.charCodeAt(0);
2198          })(s.charAt(0)) == "-".charCodeAt(0) || (function(c) {
2199            return c.charCodeAt == null ? c : c.charCodeAt(0);
2200          })(s.charAt(0)) == "+".charCodeAt(0)) ? 1 : 0;
2201          for (var i = startIndex; i < length; i++) {
2202            {
2203              if (javaemul13.internal.CharacterHelper.digit(s.charAt(i), radix) === -1) {
2204                throw java.lang.NumberFormatException.forInputString(s);
2205              }
2206            }
2207            ;
2208          }
2209          var toReturn = parseInt(s, radix) | 0;
2210          var isTooLow = toReturn < lowerBound;
2211          if (javaemul13.internal.DoubleHelper.isNaN(toReturn)) {
2212            throw java.lang.NumberFormatException.forInputString(s);
2213          } else if (isTooLow || toReturn > upperBound) {
2214            throw java.lang.NumberFormatException.forInputString(s);
2215          }
2216          return toReturn;
2217        };
2218        NumberHelper2.__parseAndValidateLong = function(s, radix) {
2219          if (s == null) {
2220            throw java.lang.NumberFormatException.forNullInputString();
2221          }
2222          if (radix < javaemul13.internal.CharacterHelper.MIN_RADIX || radix > javaemul13.internal.CharacterHelper.MAX_RADIX) {
2223            throw java.lang.NumberFormatException.forRadix(radix);
2224          }
2225          var orig = s;
2226          var length = s.length;
2227          var negative = false;
2228          if (length > 0) {
2229            var c = s.charAt(0);
2230            if ((function(c2) {
2231              return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
2232            })(c) == "-".charCodeAt(0) || (function(c2) {
2233              return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
2234            })(c) == "+".charCodeAt(0)) {
2235              s = s.substring(1);
2236              length--;
2237              negative = (function(c2) {
2238                return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
2239              })(c) == "-".charCodeAt(0);
2240            }
2241          }
2242          if (length === 0) {
2243            throw java.lang.NumberFormatException.forInputString(orig);
2244          }
2245          while (s.length > 0 && (function(c2) {
2246            return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
2247          })(s.charAt(0)) == "0".charCodeAt(0)) {
2248            {
2249              s = s.substring(1);
2250              length--;
2251            }
2252          }
2253          ;
2254          if (length > NumberHelper2.__ParseLong.maxLengthForRadix_$LI$()[radix]) {
2255            throw java.lang.NumberFormatException.forInputString(orig);
2256          }
2257          for (var i = 0; i < length; i++) {
2258            {
2259              if (javaemul13.internal.CharacterHelper.digit(s.charAt(i), radix) === -1) {
2260                throw java.lang.NumberFormatException.forInputString(orig);
2261              }
2262            }
2263            ;
2264          }
2265          var toReturn = 0;
2266          var maxDigits = NumberHelper2.__ParseLong.maxDigitsForRadix_$LI$()[radix];
2267          var radixPower = NumberHelper2.__ParseLong.maxDigitsRadixPower_$LI$()[radix];
2268          var minValue = -NumberHelper2.__ParseLong.maxValueForRadix_$LI$()[radix];
2269          var firstTime = true;
2270          var head = length % maxDigits;
2271          if (head > 0) {
2272            toReturn = -(parseInt(s.substring(0, head), radix) | 0);
2273            s = s.substring(head);
2274            length -= head;
2275            firstTime = false;
2276          }
2277          while (length >= maxDigits) {
2278            {
2279              head = parseInt(s.substring(0, maxDigits), radix) | 0;
2280              s = s.substring(maxDigits);
2281              length -= maxDigits;
2282              if (!firstTime) {
2283                if (toReturn < minValue) {
2284                  throw java.lang.NumberFormatException.forInputString(orig);
2285                }
2286                toReturn *= radixPower;
2287              } else {
2288                firstTime = false;
2289              }
2290              toReturn -= head;
2291            }
2292          }
2293          ;
2294          if (toReturn > 0) {
2295            throw java.lang.NumberFormatException.forInputString(orig);
2296          }
2297          if (!negative) {
2298            toReturn = -toReturn;
2299            if (toReturn < 0) {
2300              throw java.lang.NumberFormatException.forInputString(orig);
2301            }
2302          }
2303          return toReturn;
2304        };
2305        NumberHelper2.__isValidDouble = function(str) {
2306          if (NumberHelper2.floatRegex == null) {
2307            NumberHelper2.floatRegex = NumberHelper2.createFloatRegex();
2308          }
2309          return NumberHelper2.floatRegex.test(str);
2310        };
2311        NumberHelper2.createFloatRegex = function() {
2312          return /^\s*[+-]?(NaN|Infinity|((\d+\.?\d*)|(\.\d+))([eE][+-]?\d+)?[dDfF]?)\s*$/;
2313        };
2314        NumberHelper2.prototype.byteValue = function() {
2315          return this.intValue() | 0;
2316        };
2317        NumberHelper2.prototype.shortValue = function() {
2318          return this.intValue() | 0;
2319        };
2320        NumberHelper2.floatRegex = null;
2321        return NumberHelper2;
2322      })()
2323    );
2324    internal2.NumberHelper = NumberHelper;
2325    NumberHelper["__class"] = "javaemul.internal.NumberHelper";
2326    NumberHelper["__interfaces"] = ["java.io.Serializable"];
2327    (function(NumberHelper2) {
2328      var __Decode = (
2329        /** @class */
2330        /* @__PURE__ */ (function() {
2331          function __Decode2(radix, payload) {
2332            if (this.payload === void 0) {
2333              this.payload = null;
2334            }
2335            if (this.radix === void 0) {
2336              this.radix = 0;
2337            }
2338            this.radix = radix;
2339            this.payload = payload;
2340          }
2341          return __Decode2;
2342        })()
2343      );
2344      NumberHelper2.__Decode = __Decode;
2345      __Decode["__class"] = "javaemul.internal.NumberHelper.__Decode";
2346      var __ParseLong = (
2347        /** @class */
2348        (function() {
2349          function __ParseLong2() {
2350          }
2351          __ParseLong2.__static_initialize = function() {
2352            if (!__ParseLong2.__static_initialized) {
2353              __ParseLong2.__static_initialized = true;
2354              __ParseLong2.__static_initializer_0();
2355            }
2356          };
2357          __ParseLong2.maxDigitsForRadix_$LI$ = function() {
2358            __ParseLong2.__static_initialize();
2359            if (__ParseLong2.maxDigitsForRadix == null) {
2360              __ParseLong2.maxDigitsForRadix = [-1, -1, 30, 19, 15, 13, 11, 11, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5];
2361            }
2362            return __ParseLong2.maxDigitsForRadix;
2363          };
2364          __ParseLong2.maxDigitsRadixPower_$LI$ = function() {
2365            __ParseLong2.__static_initialize();
2366            if (__ParseLong2.maxDigitsRadixPower == null) {
2367              __ParseLong2.maxDigitsRadixPower = (function(s) {
2368                var a = [];
2369                while (s-- > 0)
2370                  a.push(0);
2371                return a;
2372              })(37);
2373            }
2374            return __ParseLong2.maxDigitsRadixPower;
2375          };
2376          __ParseLong2.maxLengthForRadix_$LI$ = function() {
2377            __ParseLong2.__static_initialize();
2378            if (__ParseLong2.maxLengthForRadix == null) {
2379              __ParseLong2.maxLengthForRadix = [-1, -1, 63, 40, 32, 28, 25, 23, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13];
2380            }
2381            return __ParseLong2.maxLengthForRadix;
2382          };
2383          __ParseLong2.maxValueForRadix_$LI$ = function() {
2384            __ParseLong2.__static_initialize();
2385            if (__ParseLong2.maxValueForRadix == null) {
2386              __ParseLong2.maxValueForRadix = (function(s) {
2387                var a = [];
2388                while (s-- > 0)
2389                  a.push(0);
2390                return a;
2391              })(37);
2392            }
2393            return __ParseLong2.maxValueForRadix;
2394          };
2395          __ParseLong2.__static_initializer_0 = function() {
2396            for (var i = 2; i <= 36; i++) {
2397              {
2398                __ParseLong2.maxDigitsRadixPower_$LI$()[i] = Math.pow(i, __ParseLong2.maxDigitsForRadix_$LI$()[i]) | 0;
2399                __ParseLong2.maxValueForRadix_$LI$()[i] = (function(n) {
2400                  return n < 0 ? Math.ceil(n) : Math.floor(n);
2401                })(9223372036854776e3 / __ParseLong2.maxDigitsRadixPower_$LI$()[i]);
2402              }
2403              ;
2404            }
2405          };
2406          __ParseLong2.__static_initialized = false;
2407          return __ParseLong2;
2408        })()
2409      );
2410      NumberHelper2.__ParseLong = __ParseLong;
2411      __ParseLong["__class"] = "javaemul.internal.NumberHelper.__ParseLong";
2412    })(NumberHelper = internal2.NumberHelper || (internal2.NumberHelper = {}));
2413  })(internal = javaemul13.internal || (javaemul13.internal = {}));
2414})(javaemul || (javaemul = {}));
2415var java;
2416(function(java2) {
2417  var net;
2418  (function(net2) {
2419    var URL = (
2420      /** @class */
2421      (function() {
2422        function URL2(protocol, host, port, file) {
2423          if ((typeof protocol === "string" || protocol === null) && (typeof host === "string" || host === null) && (typeof port === "number" || port === null) && (typeof file === "string" || file === null)) {
2424            var __args = arguments;
2425            {
2426              var __args_1 = arguments;
2427              var spec = protocol + "//" + host + ":" + port + "/" + file;
2428              if (this.jsUrl === void 0) {
2429                this.jsUrl = null;
2430              }
2431              this.jsUrl = java2.net.InternalJsURLFactory.newJsURL(spec);
2432            }
2433          } else if ((typeof protocol === "string" || protocol === null) && (typeof host === "string" || host === null) && (typeof port === "string" || port === null) && file === void 0) {
2434            var __args = arguments;
2435            var file_1 = __args[2];
2436            {
2437              var __args_2 = arguments;
2438              var spec = protocol + "//" + host + "/" + file_1;
2439              if (this.jsUrl === void 0) {
2440                this.jsUrl = null;
2441              }
2442              this.jsUrl = java2.net.InternalJsURLFactory.newJsURL(spec);
2443            }
2444          } else if ((protocol != null && protocol instanceof java2.net.URL || protocol === null) && (typeof host === "string" || host === null) && port === void 0 && file === void 0) {
2445            var __args = arguments;
2446            var url = __args[0];
2447            var string = __args[1];
2448            if (this.jsUrl === void 0) {
2449              this.jsUrl = null;
2450            }
2451            this.jsUrl = java2.net.InternalJsURLFactory.newJsURL(string, url.jsUrl);
2452          } else if ((typeof protocol === "string" || protocol === null) && host === void 0 && port === void 0 && file === void 0) {
2453            var __args = arguments;
2454            var spec = __args[0];
2455            if (this.jsUrl === void 0) {
2456              this.jsUrl = null;
2457            }
2458            this.jsUrl = java2.net.InternalJsURLFactory.newJsURL(spec);
2459          } else
2460            throw new Error("invalid overload");
2461        }
2462        URL2.prototype.openStream = function() {
2463          var request = this.makeConnection();
2464          switch (request.responseType) {
2465            case "arraybuffer":
2466              return new java2.io.ByteArrayInputStream(new Int8Array(request.response));
2467            case "blob":
2468              var fileReaderSyncConstructor = self["FileReaderSync"];
2469              if (typeof fileReaderSyncConstructor === "function") {
2470                return new java2.io.ByteArrayInputStream(fileReaderSyncConstructor["readAsArrayBuffer"](request.response));
2471              }
2472              return new java2.io.ByteArrayInputStream(
2473                /* getBytes */
2474                URL2.createObjectURL(request.response).split("").map(function(s) {
2475                  return s.charCodeAt(0);
2476                })
2477              );
2478            default:
2479              return new java2.io.ByteArrayInputStream(
2480                /* getBytes */
2481                request.response.toString().split("").map(function(s) {
2482                  return s.charCodeAt(0);
2483                })
2484              );
2485          }
2486        };
2487        URL2.createObjectURL = function(obj) {
2488          return java2.net.InternalJsURLFactory.jsURLCtor_$LI$()["createObjectURL"](obj);
2489        };
2490        URL2.prototype.equals = function(o) {
2491          if (this === o)
2492            return true;
2493          if (!(o != null && o instanceof java2.net.URL))
2494            return false;
2495          var url = o;
2496          return java2.util.Objects.equals(this.jsUrl, url.jsUrl);
2497        };
2498        URL2.prototype.hashCode = function() {
2499          return (
2500            /* hashCode */
2501            (function(o) {
2502              if (o.hashCode) {
2503                return o.hashCode();
2504              } else {
2505                return o.toString().split("").reduce(function(prevHash, currVal) {
2506                  return (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0;
2507                }, 0);
2508              }
2509            })(this.jsUrl)
2510          );
2511        };
2512        URL2.prototype.getAuthority = function() {
2513          var username = this.jsUrl["username"];
2514          var password = this.jsUrl["password"];
2515          if (username == null && password == null)
2516            return "";
2517          if (username != null && password != null)
2518            return username + ":" + password;
2519          return username != null ? username : password;
2520        };
2521        URL2.prototype.getContent = function() {
2522          return this.makeConnection().response;
2523        };
2524        URL2.prototype.getDefaultPort = function() {
2525          switch (this.getProtocol().toLowerCase()) {
2526            case "http":
2527            case "ws":
2528              return 80;
2529            case "https":
2530            case "wss":
2531              return 443;
2532            case "ftp":
2533              return 21;
2534            case "sftp":
2535              return 22;
2536            case "gopher":
2537              return 70;
2538            case "file":
2539              return 0;
2540          }
2541          return -1;
2542        };
2543        URL2.prototype.getFile = function() {
2544          var wholePath = this.getPath();
2545          var query = this.getQuery();
2546          return wholePath + (query.length > 0 ? "?" + query : "");
2547        };
2548        URL2.prototype.getHost = function() {
2549          return this.jsUrl["hostname"];
2550        };
2551        URL2.prototype.getPath = function() {
2552          return this.jsUrl["pathname"];
2553        };
2554        URL2.prototype.getPort = function() {
2555          return this.jsUrl["port"];
2556        };
2557        URL2.prototype.getProtocol = function() {
2558          return this.jsUrl["protocol"];
2559        };
2560        URL2.prototype.getQuery = function() {
2561          return this.jsUrl["search"];
2562        };
2563        URL2.prototype.getRef = function() {
2564          return this.jsUrl["hash"];
2565        };
2566        URL2.prototype.getUserInfo = function() {
2567          return this.jsUrl["username"];
2568        };
2569        URL2.prototype.sameFile = function(other) {
2570          return java2.util.Objects.equals(this.getProtocol(), other.getProtocol()) && java2.util.Objects.equals(this.getAuthority(), other.getAuthority()) && java2.util.Objects.equals(this.getHost(), other.getHost()) && this.getPort() === other.getPort() && java2.util.Objects.equals(this.getFile(), other.getFile());
2571        };
2572        URL2.prototype.toExternalForm = function() {
2573          return this.jsUrl.toString();
2574        };
2575        URL2.prototype.makeConnection = function() {
2576          var request = new XMLHttpRequest();
2577          request.open("GET", this.jsUrl["href"], false);
2578          request.send();
2579          return request;
2580        };
2581        URL2.prototype.toString = function() {
2582          return this.jsUrl["href"];
2583        };
2584        return URL2;
2585      })()
2586    );
2587    net2.URL = URL;
2588    URL["__class"] = "java.net.URL";
2589    URL["__interfaces"] = ["java.io.Serializable"];
2590  })(net = java2.net || (java2.net = {}));
2591})(java || (java = {}));
2592(function(java2) {
2593  var net;
2594  (function(net2) {
2595    var InternalJsURLFactory = (
2596      /** @class */
2597      (function() {
2598        function InternalJsURLFactory2() {
2599        }
2600        InternalJsURLFactory2.jsURLCtor_$LI$ = function() {
2601          if (InternalJsURLFactory2.jsURLCtor == null) {
2602            InternalJsURLFactory2.jsURLCtor = InternalJsURLFactory2.getJsURLConstructor();
2603          }
2604          return InternalJsURLFactory2.jsURLCtor;
2605        };
2606        InternalJsURLFactory2.getJsURLConstructor = function() {
2607          var URLConstructor;
2608          if (java2.lang.System.ENVIRONMENT_IS_NODE_$LI$()) {
2609            URLConstructor = (0, eval)('global.URL || (global.URL = require("url").URL)');
2610          } else if (java2.lang.System.ENVIRONMENT_IS_SHELL_$LI$()) {
2611            var internalJsURLForShellClass = java2.net.InternalJsURLForShell;
2612            URLConstructor = (0, eval)("this.URL || (this.URL = internalJsURLForShellClass)");
2613          } else {
2614            URLConstructor = (function() {
2615              return (0, eval)("URL");
2616            }).call(null);
2617          }
2618          return URLConstructor;
2619        };
2620        InternalJsURLFactory2.newJsURL = function() {
2621          var objects = [];
2622          for (var _i = 0; _i < arguments.length; _i++) {
2623            objects[_i] = arguments[_i];
2624          }
2625          var ctor = InternalJsURLFactory2.jsURLCtor_$LI$();
2626          return new (ctor.bind.apply(ctor, [null].concat(objects)))();
2627        };
2628        return InternalJsURLFactory2;
2629      })()
2630    );
2631    net2.InternalJsURLFactory = InternalJsURLFactory;
2632    InternalJsURLFactory["__class"] = "java.net.InternalJsURLFactory";
2633  })(net = java2.net || (java2.net = {}));
2634})(java || (java = {}));
2635(function(java2) {
2636  var net;
2637  (function(net2) {
2638    var InternalJsURLForShell = (
2639      /** @class */
2640      /* @__PURE__ */ (function() {
2641        function InternalJsURLForShell2(data, url) {
2642          if ((typeof data === "string" || data === null) && (url != null && url instanceof Object || url === null)) {
2643            var __args = arguments;
2644            {
2645              var __args_3 = arguments;
2646              var data_1 = url["href"] + __args_3[0];
2647              if (this.href === void 0) {
2648                this.href = null;
2649              }
2650              if (this.protocol === void 0) {
2651                this.protocol = null;
2652              }
2653              if (this.username === void 0) {
2654                this.username = null;
2655              }
2656              if (this.password === void 0) {
2657                this.password = null;
2658              }
2659              if (this.hostname === void 0) {
2660                this.hostname = null;
2661              }
2662              if (this.port === void 0) {
2663                this.port = null;
2664              }
2665              if (this.pathname === void 0) {
2666                this.pathname = null;
2667              }
2668              if (this.search === void 0) {
2669                this.search = null;
2670              }
2671              if (this.hash === void 0) {
2672                this.hash = null;
2673              }
2674              this.href = data_1;
2675              var protocolEnd = data_1.indexOf("://");
2676              if (protocolEnd === -1)
2677                throw new Error("Wrong URL, no protocol");
2678              this.protocol = data_1.substring(0, protocolEnd);
2679              var userPassEnd = data_1.indexOf("@", protocolEnd + 3);
2680              var userEnd = userPassEnd === -1 ? -1 : data_1.indexOf(":", protocolEnd + 3);
2681              if (userEnd > userPassEnd)
2682                userEnd = -1;
2683              this.username = userPassEnd === -1 ? null : userEnd === -1 ? data_1.substring(protocolEnd + 3, userPassEnd) : data_1.substring(protocolEnd + 3, userEnd);
2684              this.password = userPassEnd === -1 || userEnd === -1 ? null : data_1.substring(userPassEnd + 1, userEnd);
2685              var hostStart = userPassEnd === -1 ? protocolEnd + 3 : userPassEnd + 1;
2686              var hostPortEnd = data_1.indexOf("/", hostStart);
2687              var portStart = data_1.indexOf(":", hostStart);
2688              this.hostname = portStart === -1 || portStart > hostPortEnd ? data_1.substring(hostStart, hostPortEnd) : data_1.substring(hostStart, portStart);
2689              this.port = portStart !== -1 && portStart < hostPortEnd ? javaemul.internal.IntegerHelper.parseInt(data_1.substring(portStart + 1, hostPortEnd)) : null;
2690              var searchStart = data_1.indexOf("?", hostPortEnd);
2691              var hashStart = data_1.indexOf("#", hostPortEnd);
2692              this.search = searchStart !== -1 ? hashStart === -1 ? data_1.substring(searchStart + 1) : data_1.substring(searchStart + 1, hashStart) : null;
2693              this.hash = hashStart !== -1 ? data_1.substring(hashStart + 1) : null;
2694              this.pathname = searchStart === -1 && hashStart === -1 ? data_1.substring(hostPortEnd + 1) : data_1.substring(hostPortEnd + 1, searchStart === -1 ? hashStart : searchStart);
2695            }
2696          } else if ((typeof data === "string" || data === null) && url === void 0) {
2697            var __args = arguments;
2698            if (this.href === void 0) {
2699              this.href = null;
2700            }
2701            if (this.protocol === void 0) {
2702              this.protocol = null;
2703            }
2704            if (this.username === void 0) {
2705              this.username = null;
2706            }
2707            if (this.password === void 0) {
2708              this.password = null;
2709            }
2710            if (this.hostname === void 0) {
2711              this.hostname = null;
2712            }
2713            if (this.port === void 0) {
2714              this.port = null;
2715            }
2716            if (this.pathname === void 0) {
2717              this.pathname = null;
2718            }
2719            if (this.search === void 0) {
2720              this.search = null;
2721            }
2722            if (this.hash === void 0) {
2723              this.hash = null;
2724            }
2725            this.href = data;
2726            var protocolEnd = data.indexOf("://");
2727            if (protocolEnd === -1)
2728              throw new Error("Wrong URL, no protocol");
2729            this.protocol = data.substring(0, protocolEnd);
2730            var userPassEnd = data.indexOf("@", protocolEnd + 3);
2731            var userEnd = userPassEnd === -1 ? -1 : data.indexOf(":", protocolEnd + 3);
2732            if (userEnd > userPassEnd)
2733              userEnd = -1;
2734            this.username = userPassEnd === -1 ? null : userEnd === -1 ? data.substring(protocolEnd + 3, userPassEnd) : data.substring(protocolEnd + 3, userEnd);
2735            this.password = userPassEnd === -1 || userEnd === -1 ? null : data.substring(userPassEnd + 1, userEnd);
2736            var hostStart = userPassEnd === -1 ? protocolEnd + 3 : userPassEnd + 1;
2737            var hostPortEnd = data.indexOf("/", hostStart);
2738            var portStart = data.indexOf(":", hostStart);
2739            this.hostname = portStart === -1 || portStart > hostPortEnd ? data.substring(hostStart, hostPortEnd) : data.substring(hostStart, portStart);
2740            this.port = portStart !== -1 && portStart < hostPortEnd ? javaemul.internal.IntegerHelper.parseInt(data.substring(portStart + 1, hostPortEnd)) : null;
2741            var searchStart = data.indexOf("?", hostPortEnd);
2742            var hashStart = data.indexOf("#", hostPortEnd);
2743            this.search = searchStart !== -1 ? hashStart === -1 ? data.substring(searchStart + 1) : data.substring(searchStart + 1, hashStart) : null;
2744            this.hash = hashStart !== -1 ? data.substring(hashStart + 1) : null;
2745            this.pathname = searchStart === -1 && hashStart === -1 ? data.substring(hostPortEnd + 1) : data.substring(hostPortEnd + 1, searchStart === -1 ? hashStart : searchStart);
2746          } else
2747            throw new Error("invalid overload");
2748        }
2749        return InternalJsURLForShell2;
2750      })()
2751    );
2752    net2.InternalJsURLForShell = InternalJsURLForShell;
2753    InternalJsURLForShell["__class"] = "java.net.InternalJsURLForShell";
2754  })(net = java2.net || (java2.net = {}));
2755})(java || (java = {}));
2756(function(java2) {
2757  var util;
2758  (function(util2) {
2759    var EventListenerProxy = (
2760      /** @class */
2761      (function() {
2762        function EventListenerProxy2(listener) {
2763          if (this.listener === void 0) {
2764            this.listener = null;
2765          }
2766          this.listener = listener;
2767        }
2768        EventListenerProxy2.prototype.getListener = function() {
2769          return this.listener;
2770        };
2771        return EventListenerProxy2;
2772      })()
2773    );
2774    util2.EventListenerProxy = EventListenerProxy;
2775    EventListenerProxy["__class"] = "java.util.EventListenerProxy";
2776    EventListenerProxy["__interfaces"] = ["java.util.EventListener"];
2777  })(util = java2.util || (java2.util = {}));
2778})(java || (java = {}));
2779(function(java2) {
2780  var util;
2781  (function(util2) {
2782    var Map;
2783    (function(Map2) {
2784      var Entry;
2785      (function(Entry2) {
2786        function comparingByValue(cmp) {
2787          java2.util.Objects.requireNonNull((function(funcInst) {
2788            if (funcInst == null || typeof funcInst == "function") {
2789              return funcInst;
2790            }
2791            return function(a, b) {
2792              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
2793            };
2794          })(cmp));
2795          return (function(funcInst) {
2796            if (funcInst == null || typeof funcInst == "function") {
2797              return funcInst;
2798            }
2799            return function(a, b) {
2800              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
2801            };
2802          })(function(c1, c2) {
2803            return cmp(c1.getValue(), c2.getValue());
2804          });
2805        }
2806        Entry2.comparingByValue = comparingByValue;
2807      })(Entry = Map2.Entry || (Map2.Entry = {}));
2808    })(Map = util2.Map || (util2.Map = {}));
2809  })(util = java2.util || (java2.util = {}));
2810})(java || (java = {}));
2811(function(java2) {
2812  var util;
2813  (function(util2) {
2814    var InternalJsMapFactory = (
2815      /** @class */
2816      (function() {
2817        function InternalJsMapFactory2() {
2818        }
2819        InternalJsMapFactory2.jsMapCtor_$LI$ = function() {
2820          if (InternalJsMapFactory2.jsMapCtor == null) {
2821            InternalJsMapFactory2.jsMapCtor = InternalJsMapFactory2.getJsMapConstructor();
2822          }
2823          return InternalJsMapFactory2.jsMapCtor;
2824        };
2825        InternalJsMapFactory2.getJsMapConstructor = function() {
2826          return (function() {
2827            return (0, eval)("Map");
2828          }).call(null);
2829        };
2830        InternalJsMapFactory2.newJsMap = function() {
2831          return new (InternalJsMapFactory2.jsMapCtor_$LI$())();
2832        };
2833        return InternalJsMapFactory2;
2834      })()
2835    );
2836    util2.InternalJsMapFactory = InternalJsMapFactory;
2837    InternalJsMapFactory["__class"] = "java.util.InternalJsMapFactory";
2838  })(util = java2.util || (java2.util = {}));
2839})(java || (java = {}));
2840(function(java2) {
2841  var util;
2842  (function(util2) {
2843    var BitSet = (
2844      /** @class */
2845      (function() {
2846        function BitSet2(nbits) {
2847          if (typeof nbits === "number" || nbits === null) {
2848            var __args = arguments;
2849            this.bits = [];
2850            while (nbits > 0) {
2851              {
2852                this.bits.push(false);
2853                nbits--;
2854              }
2855            }
2856            ;
2857          } else if (nbits === void 0) {
2858            var __args = arguments;
2859            this.bits = [];
2860          } else
2861            throw new Error("invalid overload");
2862        }
2863        BitSet2.valueOf = function(longs) {
2864          var bs = new BitSet2();
2865          bs.bits = new Array(longs.length * 64);
2866          for (var n = 0; n < longs.length * 64; n++) {
2867            {
2868              bs.bits[n] = (longs[n / 64 | 0] & 1 << n % 64) !== 0;
2869            }
2870            ;
2871          }
2872          return bs;
2873        };
2874        BitSet2.prototype.flip$int = function(bitIndex) {
2875          this.bits[bitIndex] = !this.bits[bitIndex];
2876        };
2877        BitSet2.prototype.flip$int$int = function(fromIndex, toIndex) {
2878          for (var i = fromIndex; i <= toIndex; i++) {
2879            {
2880              this.flip$int(i);
2881            }
2882            ;
2883          }
2884        };
2885        BitSet2.prototype.flip = function(fromIndex, toIndex) {
2886          if ((typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null)) {
2887            return this.flip$int$int(fromIndex, toIndex);
2888          } else if ((typeof fromIndex === "number" || fromIndex === null) && toIndex === void 0) {
2889            return this.flip$int(fromIndex);
2890          } else
2891            throw new Error("invalid overload");
2892        };
2893        BitSet2.prototype.set$int = function(bitIndex) {
2894          this.bits[bitIndex] = true;
2895        };
2896        BitSet2.prototype.set$int$boolean = function(bitIndex, value) {
2897          if (value) {
2898            this.set$int(bitIndex);
2899          } else {
2900            this.clear$int(bitIndex);
2901          }
2902        };
2903        BitSet2.prototype.set$int$int = function(fromIndex, toIndex) {
2904          for (var i = fromIndex; i <= toIndex; i++) {
2905            {
2906              this.set$int(i);
2907            }
2908            ;
2909          }
2910        };
2911        BitSet2.prototype.set$int$int$boolean = function(fromIndex, toIndex, value) {
2912          if (value) {
2913            this.set$int$int(fromIndex, toIndex);
2914          } else {
2915            this.clear$int$int(fromIndex, toIndex);
2916          }
2917        };
2918        BitSet2.prototype.set = function(fromIndex, toIndex, value) {
2919          if ((typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && (typeof value === "boolean" || value === null)) {
2920            return this.set$int$int$boolean(fromIndex, toIndex, value);
2921          } else if ((typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "boolean" || toIndex === null) && value === void 0) {
2922            return this.set$int$boolean(fromIndex, toIndex);
2923          } else if ((typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && value === void 0) {
2924            return this.set$int$int(fromIndex, toIndex);
2925          } else if ((typeof fromIndex === "number" || fromIndex === null) && toIndex === void 0 && value === void 0) {
2926            return this.set$int(fromIndex);
2927          } else
2928            throw new Error("invalid overload");
2929        };
2930        BitSet2.prototype.clear$int = function(bitIndex) {
2931          this.bits[bitIndex] = false;
2932        };
2933        BitSet2.prototype.clear$int$int = function(fromIndex, toIndex) {
2934          for (var i = fromIndex; i <= toIndex; i++) {
2935            {
2936              this.clear$int(i);
2937            }
2938            ;
2939          }
2940        };
2941        BitSet2.prototype.clear = function(fromIndex, toIndex) {
2942          if ((typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null)) {
2943            return this.clear$int$int(fromIndex, toIndex);
2944          } else if ((typeof fromIndex === "number" || fromIndex === null) && toIndex === void 0) {
2945            return this.clear$int(fromIndex);
2946          } else if (fromIndex === void 0 && toIndex === void 0) {
2947            return this.clear$();
2948          } else
2949            throw new Error("invalid overload");
2950        };
2951        BitSet2.prototype.clear$ = function() {
2952          this.bits = [];
2953        };
2954        BitSet2.prototype.get$int = function(bitIndex) {
2955          return this.bits[bitIndex];
2956        };
2957        BitSet2.prototype.get$int$int = function(fromIndex, toIndex) {
2958          var bs = new BitSet2();
2959          for (var i = fromIndex; i <= toIndex; i++) {
2960            {
2961              bs.bits.push(this.bits[i]);
2962            }
2963            ;
2964          }
2965          return bs;
2966        };
2967        BitSet2.prototype.get = function(fromIndex, toIndex) {
2968          if ((typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null)) {
2969            return this.get$int$int(fromIndex, toIndex);
2970          } else if ((typeof fromIndex === "number" || fromIndex === null) && toIndex === void 0) {
2971            return this.get$int(fromIndex);
2972          } else
2973            throw new Error("invalid overload");
2974        };
2975        BitSet2.prototype.length = function() {
2976          return this.bits.length;
2977        };
2978        BitSet2.prototype.isEmpty = function() {
2979          return this.bits.length === 0;
2980        };
2981        BitSet2.prototype.cardinality = function() {
2982          var sum = 0;
2983          for (var i = 0; i < this.bits.length; i++) {
2984            {
2985              sum += this.bits[i] ? 1 : 0;
2986            }
2987            ;
2988          }
2989          return sum;
2990        };
2991        BitSet2.prototype.and = function(set) {
2992          for (var i = 0; i < this.bits.length; i++) {
2993            {
2994              this.bits[i] = this.bits[i] && set.get$int(i);
2995            }
2996            ;
2997          }
2998        };
2999        BitSet2.prototype.or = function(set) {
3000          for (var i = 0; i < this.bits.length; i++) {
3001            {
3002              this.bits[i] = this.bits[i] || set.get$int(i);
3003            }
3004            ;
3005          }
3006        };
3007        BitSet2.prototype.xor = function(set) {
3008          for (var i = 0; i < this.bits.length; i++) {
3009            {
3010              this.bits[i] = this.bits[i] && !set.get$int(i) || !this.bits[i] && set.get$int(i);
3011            }
3012            ;
3013          }
3014        };
3015        BitSet2.prototype.andNot = function(set) {
3016          for (var i = 0; i < this.bits.length; i++) {
3017            {
3018              this.bits[i] = this.bits[i] && !set.get$int(i);
3019            }
3020            ;
3021          }
3022        };
3023        BitSet2.prototype.size = function() {
3024          return this.bits.length;
3025        };
3026        BitSet2.prototype.equals = function(obj) {
3027          if (!(obj != null && obj instanceof java2.util.BitSet))
3028            return false;
3029          if (this === obj)
3030            return true;
3031          var set = obj;
3032          if (set.bits.length !== this.bits.length) {
3033            return false;
3034          }
3035          for (var i = 0; i < set.bits.length; i++) {
3036            {
3037              if (!set.bits[i] == this.bits[i]) {
3038                return false;
3039              }
3040            }
3041            ;
3042          }
3043          return true;
3044        };
3045        BitSet2.prototype.clone = function() {
3046          var bs = new BitSet2();
3047          bs.bits = this.bits.slice(0, this.bits.length);
3048          return bs;
3049        };
3050        return BitSet2;
3051      })()
3052    );
3053    util2.BitSet = BitSet;
3054    BitSet["__class"] = "java.util.BitSet";
3055    BitSet["__interfaces"] = ["java.lang.Cloneable", "java.io.Serializable"];
3056  })(util = java2.util || (java2.util = {}));
3057})(java || (java = {}));
3058(function(java2) {
3059  var util;
3060  (function(util2) {
3061    var Objects = (
3062      /** @class */
3063      (function() {
3064        function Objects2() {
3065        }
3066        Objects2.compare = function(a, b, c) {
3067          return a === b ? 0 : c(a, b);
3068        };
3069        Objects2.deepEquals = function(a, b) {
3070          if (a === b) {
3071            return true;
3072          }
3073          if (a == null || b == null) {
3074            return false;
3075          }
3076          if (
3077            /* equals */
3078            (function(o1, o2) {
3079              return o1 && o1.equals ? o1.equals(o2) : o1 === o2;
3080            })(a, b)
3081          ) {
3082            return true;
3083          }
3084          var class1 = a.constructor;
3085          var class2 = b.constructor;
3086          if (!class1.isArray() || !(function(o1, o2) {
3087            if (o1 && o1.equals) {
3088              return o1.equals(o2);
3089            } else {
3090              return o1 === o2;
3091            }
3092          })(class1, class2)) {
3093            return false;
3094          }
3095          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || a[0] != null)) {
3096            return java2.util.Arrays.deepEquals(a, b);
3097          }
3098          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "boolean")) {
3099            return java2.util.Arrays.equals$boolean_A$boolean_A(a, b);
3100          }
3101          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number")) {
3102            return java2.util.Arrays.equals$byte_A$byte_A(a, b);
3103          }
3104          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "string")) {
3105            return java2.util.Arrays.equals$char_A$char_A(a, b);
3106          }
3107          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number")) {
3108            return java2.util.Arrays.equals$short_A$short_A(a, b);
3109          }
3110          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number")) {
3111            return java2.util.Arrays.equals$int_A$int_A(a, b);
3112          }
3113          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number")) {
3114            return java2.util.Arrays.equals$long_A$long_A(a, b);
3115          }
3116          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number")) {
3117            return java2.util.Arrays.equals$float_A$float_A(a, b);
3118          }
3119          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number")) {
3120            return java2.util.Arrays.equals$double_A$double_A(a, b);
3121          }
3122          return true;
3123        };
3124        Objects2.equals = function(a, b) {
3125          return a === b || a != null && /* equals */
3126          (function(o1, o2) {
3127            return o1 && o1.equals ? o1.equals(o2) : o1 === o2;
3128          })(a, b);
3129        };
3130        Objects2.hashCode = function(o) {
3131          return o != null ? (
3132            /* hashCode */
3133            (function(o2) {
3134              if (o2.hashCode) {
3135                return o2.hashCode();
3136              } else {
3137                return o2.toString().split("").reduce(function(prevHash, currVal) {
3138                  return (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0;
3139                }, 0);
3140              }
3141            })(o)
3142          ) : 0;
3143        };
3144        Objects2.hash = function() {
3145          var values = [];
3146          for (var _i = 0; _i < arguments.length; _i++) {
3147            values[_i] = arguments[_i];
3148          }
3149          return java2.util.Arrays.hashCode$java_lang_Object_A(values);
3150        };
3151        Objects2.isNull = function(obj) {
3152          return obj == null;
3153        };
3154        Objects2.nonNull = function(obj) {
3155          return obj != null;
3156        };
3157        Objects2.requireNonNull$java_lang_Object = function(obj) {
3158          if (obj == null) {
3159            throw new java2.lang.NullPointerException();
3160          }
3161          return obj;
3162        };
3163        Objects2.requireNonNull$java_lang_Object$java_lang_String = function(obj, message) {
3164          if (obj == null) {
3165            throw new java2.lang.NullPointerException(message);
3166          }
3167          return obj;
3168        };
3169        Objects2.requireNonNull = function(obj, message) {
3170          if ((obj != null || obj === null) && (typeof message === "string" || message === null)) {
3171            return java2.util.Objects.requireNonNull$java_lang_Object$java_lang_String(obj, message);
3172          } else if ((obj != null || obj === null) && (typeof message === "function" && message.length === 0 || message === null)) {
3173            return java2.util.Objects.requireNonNull$java_lang_Object$java_util_function_Supplier(obj, message);
3174          } else if ((obj != null || obj === null) && message === void 0) {
3175            return java2.util.Objects.requireNonNull$java_lang_Object(obj);
3176          } else
3177            throw new Error("invalid overload");
3178        };
3179        Objects2.requireNonNull$java_lang_Object$java_util_function_Supplier = function(obj, messageSupplier) {
3180          if (obj == null) {
3181            throw new java2.lang.NullPointerException((function(target) {
3182              return typeof target === "function" ? target() : target.get();
3183            })(messageSupplier));
3184          }
3185          return obj;
3186        };
3187        Objects2.toString$java_lang_Object = function(o) {
3188          return (
3189            /* valueOf */
3190            String(o).toString()
3191          );
3192        };
3193        Objects2.toString$java_lang_Object$java_lang_String = function(o, nullDefault) {
3194          return o != null ? o.toString() : nullDefault;
3195        };
3196        Objects2.toString = function(o, nullDefault) {
3197          if ((o != null || o === null) && (typeof nullDefault === "string" || nullDefault === null)) {
3198            return java2.util.Objects.toString$java_lang_Object$java_lang_String(o, nullDefault);
3199          } else if ((o != null || o === null) && nullDefault === void 0) {
3200            return java2.util.Objects.toString$java_lang_Object(o);
3201          } else
3202            throw new Error("invalid overload");
3203        };
3204        return Objects2;
3205      })()
3206    );
3207    util2.Objects = Objects;
3208    Objects["__class"] = "java.util.Objects";
3209  })(util = java2.util || (java2.util = {}));
3210})(java || (java = {}));
3211(function(java2) {
3212  var util;
3213  (function(util2) {
3214    var Optional = (
3215      /** @class */
3216      (function() {
3217        function Optional2(ref) {
3218          if (ref != null || ref === null) {
3219            var __args = arguments;
3220            if (this.ref === void 0) {
3221              this.ref = null;
3222            }
3223            this.ref = javaemul.internal.InternalPreconditions.checkCriticalNotNull(ref);
3224          } else if (ref === void 0) {
3225            var __args = arguments;
3226            if (this.ref === void 0) {
3227              this.ref = null;
3228            }
3229            this.ref = null;
3230          } else
3231            throw new Error("invalid overload");
3232        }
3233        Optional2.empty = function() {
3234          return Optional2.EMPTY_$LI$();
3235        };
3236        Optional2.of = function(value) {
3237          return new Optional2(value);
3238        };
3239        Optional2.ofNullable = function(value) {
3240          return value == null ? Optional2.empty() : Optional2.of(value);
3241        };
3242        Optional2.EMPTY_$LI$ = function() {
3243          if (Optional2.EMPTY == null) {
3244            Optional2.EMPTY = new Optional2();
3245          }
3246          return Optional2.EMPTY;
3247        };
3248        Optional2.prototype.isPresent = function() {
3249          return this.ref != null;
3250        };
3251        Optional2.prototype.get = function() {
3252          javaemul.internal.InternalPreconditions.checkCriticalElement(this.isPresent());
3253          return this.ref;
3254        };
3255        Optional2.prototype.ifPresent = function(consumer) {
3256          var _this = this;
3257          if (this.isPresent()) {
3258            (function(target) {
3259              return typeof target === "function" ? target(_this.ref) : target.accept(_this.ref);
3260            })(consumer);
3261          }
3262        };
3263        Optional2.prototype.filter = function(predicate) {
3264          var _this = this;
3265          javaemul.internal.InternalPreconditions.checkCriticalNotNull((function(funcInst) {
3266            if (funcInst == null || typeof funcInst == "function") {
3267              return funcInst;
3268            }
3269            return function(arg0) {
3270              return (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0);
3271            };
3272          })(predicate));
3273          if (!this.isPresent() || (function(target) {
3274            return typeof target === "function" ? target(_this.ref) : target.test(_this.ref);
3275          })(predicate)) {
3276            return this;
3277          }
3278          return Optional2.empty();
3279        };
3280        Optional2.prototype.map = function(mapper) {
3281          var _this = this;
3282          javaemul.internal.InternalPreconditions.checkCriticalNotNull((function(funcInst) {
3283            if (funcInst == null || typeof funcInst == "function") {
3284              return funcInst;
3285            }
3286            return function(arg0) {
3287              return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
3288            };
3289          })(mapper));
3290          if (this.isPresent()) {
3291            return Optional2.ofNullable((function(target) {
3292              return typeof target === "function" ? target(_this.ref) : target.apply(_this.ref);
3293            })(mapper));
3294          }
3295          return Optional2.empty();
3296        };
3297        Optional2.prototype.flatMap = function(mapper) {
3298          var _this = this;
3299          javaemul.internal.InternalPreconditions.checkCriticalNotNull((function(funcInst) {
3300            if (funcInst == null || typeof funcInst == "function") {
3301              return funcInst;
3302            }
3303            return function(arg0) {
3304              return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
3305            };
3306          })(mapper));
3307          if (this.isPresent()) {
3308            return javaemul.internal.InternalPreconditions.checkCriticalNotNull((function(target) {
3309              return typeof target === "function" ? target(_this.ref) : target.apply(_this.ref);
3310            })(mapper));
3311          }
3312          return Optional2.empty();
3313        };
3314        Optional2.prototype.orElse = function(other) {
3315          return this.isPresent() ? this.ref : other;
3316        };
3317        Optional2.prototype.orElseGet = function(other) {
3318          return this.isPresent() ? this.ref : (function(target) {
3319            return typeof target === "function" ? target() : target.get();
3320          })(other);
3321        };
3322        Optional2.prototype.orElseThrow = function(exceptionSupplier) {
3323          if (this.isPresent()) {
3324            return this.ref;
3325          }
3326          throw (function(target) {
3327            return typeof target === "function" ? target() : target.get();
3328          })(exceptionSupplier);
3329        };
3330        Optional2.prototype.equals = function(obj) {
3331          if (obj === this) {
3332            return true;
3333          }
3334          if (!(obj != null && obj instanceof java2.util.Optional)) {
3335            return false;
3336          }
3337          var other = obj;
3338          return java2.util.Objects.equals(this.ref, other.ref);
3339        };
3340        Optional2.prototype.hashCode = function() {
3341          return java2.util.Objects.hashCode(this.ref);
3342        };
3343        Optional2.prototype.toString = function() {
3344          return this.isPresent() ? "Optional.of(" + /* valueOf */
3345          String(this.ref).toString() + ")" : "Optional.empty()";
3346        };
3347        return Optional2;
3348      })()
3349    );
3350    util2.Optional = Optional;
3351    Optional["__class"] = "java.util.Optional";
3352  })(util = java2.util || (java2.util = {}));
3353})(java || (java = {}));
3354(function(java2) {
3355  var util;
3356  (function(util2) {
3357    var OptionalDouble = (
3358      /** @class */
3359      (function() {
3360        function OptionalDouble2(value) {
3361          if (typeof value === "number" || value === null) {
3362            var __args = arguments;
3363            if (this.ref === void 0) {
3364              this.ref = 0;
3365            }
3366            if (this.present === void 0) {
3367              this.present = false;
3368            }
3369            this.ref = value;
3370            this.present = true;
3371          } else if (value === void 0) {
3372            var __args = arguments;
3373            if (this.ref === void 0) {
3374              this.ref = 0;
3375            }
3376            if (this.present === void 0) {
3377              this.present = false;
3378            }
3379            this.ref = 0;
3380            this.present = false;
3381          } else
3382            throw new Error("invalid overload");
3383        }
3384        OptionalDouble2.empty = function() {
3385          return OptionalDouble2.EMPTY_$LI$();
3386        };
3387        OptionalDouble2.of = function(value) {
3388          return new OptionalDouble2(value);
3389        };
3390        OptionalDouble2.EMPTY_$LI$ = function() {
3391          if (OptionalDouble2.EMPTY == null) {
3392            OptionalDouble2.EMPTY = new OptionalDouble2();
3393          }
3394          return OptionalDouble2.EMPTY;
3395        };
3396        OptionalDouble2.prototype.isPresent = function() {
3397          return this.present;
3398        };
3399        OptionalDouble2.prototype.getAsDouble = function() {
3400          javaemul.internal.InternalPreconditions.checkCriticalElement(this.present);
3401          return this.ref;
3402        };
3403        OptionalDouble2.prototype.ifPresent = function(consumer) {
3404          var _this = this;
3405          if (this.present) {
3406            (function(target) {
3407              return typeof target === "function" ? target(_this.ref) : target.accept(_this.ref);
3408            })(consumer);
3409          }
3410        };
3411        OptionalDouble2.prototype.orElse = function(other) {
3412          return this.present ? this.ref : other;
3413        };
3414        OptionalDouble2.prototype.orElseGet = function(other) {
3415          return this.present ? this.ref : (function(target) {
3416            return typeof target === "function" ? target() : target.getAsDouble();
3417          })(other);
3418        };
3419        OptionalDouble2.prototype.orElseThrow = function(exceptionSupplier) {
3420          if (this.present) {
3421            return this.ref;
3422          }
3423          throw (function(target) {
3424            return typeof target === "function" ? target() : target.get();
3425          })(exceptionSupplier);
3426        };
3427        OptionalDouble2.prototype.equals = function(obj) {
3428          if (obj === this) {
3429            return true;
3430          }
3431          if (!(obj != null && obj instanceof java2.util.OptionalDouble)) {
3432            return false;
3433          }
3434          var other = obj;
3435          return this.present === other.present && /* compare */
3436          this.ref - other.ref === 0;
3437        };
3438        OptionalDouble2.prototype.hashCode = function() {
3439          return this.present ? javaemul.internal.DoubleHelper.hashCode(this.ref) : 0;
3440        };
3441        OptionalDouble2.prototype.toString = function() {
3442          return this.present ? "OptionalDouble.of(" + /* toString */
3443          ("" + this.ref) + ")" : "OptionalDouble.empty()";
3444        };
3445        return OptionalDouble2;
3446      })()
3447    );
3448    util2.OptionalDouble = OptionalDouble;
3449    OptionalDouble["__class"] = "java.util.OptionalDouble";
3450  })(util = java2.util || (java2.util = {}));
3451})(java || (java = {}));
3452(function(java2) {
3453  var util;
3454  (function(util2) {
3455    var Observable = (
3456      /** @class */
3457      (function() {
3458        function Observable2() {
3459          this.changed = false;
3460          if (this.obs === void 0) {
3461            this.obs = null;
3462          }
3463          this.obs = new java2.util.Vector();
3464        }
3465        Observable2.prototype.addObserver = function(o) {
3466          if (o == null)
3467            throw new java2.lang.NullPointerException();
3468          if (!this.obs.contains(o)) {
3469            this.obs.addElement(o);
3470          }
3471        };
3472        Observable2.prototype.deleteObserver = function(o) {
3473          this.obs.removeElement(o);
3474        };
3475        Observable2.prototype.notifyObservers$ = function() {
3476          this.notifyObservers$java_lang_Object(null);
3477        };
3478        Observable2.prototype.notifyObservers$java_lang_Object = function(arg) {
3479          var arrLocal;
3480          if (!this.changed)
3481            return;
3482          arrLocal = this.obs.toArray$();
3483          this.clearChanged();
3484          for (var i = arrLocal.length - 1; i >= 0; i--) {
3485            arrLocal[i].update(this, arg);
3486          }
3487        };
3488        Observable2.prototype.notifyObservers = function(arg) {
3489          if (arg != null || arg === null) {
3490            return this.notifyObservers$java_lang_Object(arg);
3491          } else if (arg === void 0) {
3492            return this.notifyObservers$();
3493          } else
3494            throw new Error("invalid overload");
3495        };
3496        Observable2.prototype.deleteObservers = function() {
3497          this.obs.removeAllElements();
3498        };
3499        Observable2.prototype.setChanged = function() {
3500          this.changed = true;
3501        };
3502        Observable2.prototype.clearChanged = function() {
3503          this.changed = false;
3504        };
3505        Observable2.prototype.hasChanged = function() {
3506          return this.changed;
3507        };
3508        Observable2.prototype.countObservers = function() {
3509          return this.obs.size();
3510        };
3511        return Observable2;
3512      })()
3513    );
3514    util2.Observable = Observable;
3515    Observable["__class"] = "java.util.Observable";
3516  })(util = java2.util || (java2.util = {}));
3517})(java || (java = {}));
3518(function(java2) {
3519  var util;
3520  (function(util2) {
3521    var InternalHashCodeMap = (
3522      /** @class */
3523      (function() {
3524        function InternalHashCodeMap2(host) {
3525          this.backingMap = java2.util.InternalJsMapFactory.newJsMap();
3526          if (this.host === void 0) {
3527            this.host = null;
3528          }
3529          if (this.__size === void 0) {
3530            this.__size = 0;
3531          }
3532          this.host = host;
3533        }
3534        InternalHashCodeMap2.prototype.forEach = function(action) {
3535          javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
3536            if (funcInst == null || typeof funcInst == "function") {
3537              return funcInst;
3538            }
3539            return function(arg0) {
3540              return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
3541            };
3542          })(action));
3543          var _loop_1 = function(index2) {
3544            var t = index2.next();
3545            {
3546              (function(target) {
3547                return typeof target === "function" ? target(t) : target.accept(t);
3548              })(action);
3549            }
3550          };
3551          for (var index = this.iterator(); index.hasNext(); ) {
3552            _loop_1(index);
3553          }
3554        };
3555        InternalHashCodeMap2.prototype.put = function(key, value) {
3556          var hashCode = this.hash(key);
3557          var chain = this.getChainOrEmpty(hashCode);
3558          if (chain.length === 0) {
3559            this.backingMap.set(hashCode, chain);
3560          } else {
3561            var entry = this.findEntryInChain(key, chain);
3562            if (entry != null) {
3563              return entry.setValue(value);
3564            }
3565          }
3566          chain[chain.length] = new java2.util.AbstractMap.SimpleEntry(key, value);
3567          this.__size++;
3568          java2.util.ConcurrentModificationDetector.structureChanged(this.host);
3569          return null;
3570        };
3571        InternalHashCodeMap2.prototype.remove = function(key) {
3572          var hashCode = this.hash(key);
3573          var chain = this.getChainOrEmpty(hashCode);
3574          for (var i = 0; i < chain.length; i++) {
3575            {
3576              var entry = chain[i];
3577              if (this.host._equals(key, entry.getKey())) {
3578                if (chain.length === 1) {
3579                  javaemul.internal.ArrayHelper.setLength(chain, 0);
3580                  this.backingMap["delete"](hashCode);
3581                } else {
3582                  javaemul.internal.ArrayHelper.removeFrom(chain, i, 1);
3583                }
3584                this.__size--;
3585                java2.util.ConcurrentModificationDetector.structureChanged(this.host);
3586                return entry.getValue();
3587              }
3588            }
3589            ;
3590          }
3591          return null;
3592        };
3593        InternalHashCodeMap2.prototype.getEntry = function(key) {
3594          return this.findEntryInChain(key, this.getChainOrEmpty(this.hash(key)));
3595        };
3596        InternalHashCodeMap2.prototype.findEntryInChain = function(key, chain) {
3597          for (var index = 0; index < chain.length; index++) {
3598            var entry = chain[index];
3599            {
3600              if (this.host._equals(key, entry.getKey())) {
3601                return entry;
3602              }
3603            }
3604          }
3605          return null;
3606        };
3607        InternalHashCodeMap2.prototype.size = function() {
3608          return this.__size;
3609        };
3610        InternalHashCodeMap2.prototype.iterator = function() {
3611          return new InternalHashCodeMap2.InternalHashCodeMap$0(this);
3612        };
3613        InternalHashCodeMap2.prototype.getChainOrEmpty = function(hashCode) {
3614          var chain = this.unsafeCastToArray(this.backingMap.get(hashCode));
3615          return chain == null ? this.newEntryChain() : chain;
3616        };
3617        InternalHashCodeMap2.prototype.newEntryChain = function() {
3618          return [];
3619        };
3620        InternalHashCodeMap2.prototype.unsafeCastToArray = function(arr) {
3621          return arr;
3622        };
3623        InternalHashCodeMap2.prototype.hash = function(key) {
3624          return key == null ? 0 : this.host.getHashCode(key);
3625        };
3626        return InternalHashCodeMap2;
3627      })()
3628    );
3629    util2.InternalHashCodeMap = InternalHashCodeMap;
3630    InternalHashCodeMap["__class"] = "java.util.InternalHashCodeMap";
3631    InternalHashCodeMap["__interfaces"] = ["java.lang.Iterable"];
3632    (function(InternalHashCodeMap2) {
3633      var InternalHashCodeMap$0 = (
3634        /** @class */
3635        (function() {
3636          function InternalHashCodeMap$02(__parent) {
3637            this.__parent = __parent;
3638            this.chains = this.__parent.backingMap.entries();
3639            this.itemIndex = 0;
3640            this.chain = this.__parent.newEntryChain();
3641            this.lastEntry = null;
3642          }
3643          InternalHashCodeMap$02.prototype.forEachRemaining = function(consumer) {
3644            var _this = this;
3645            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
3646              if (funcInst == null || typeof funcInst == "function") {
3647                return funcInst;
3648              }
3649              return function(arg0) {
3650                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
3651              };
3652            })(consumer));
3653            while (this.hasNext()) {
3654              {
3655                (function(target) {
3656                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
3657                })(consumer);
3658              }
3659            }
3660            ;
3661          };
3662          InternalHashCodeMap$02.prototype.hasNext = function() {
3663            if (this.itemIndex < this.chain.length) {
3664              return true;
3665            }
3666            var current = this.chains.next();
3667            if (!current.done) {
3668              this.chain = this.__parent.unsafeCastToArray(current.value[1]);
3669              this.itemIndex = 0;
3670              return true;
3671            }
3672            return false;
3673          };
3674          InternalHashCodeMap$02.prototype.next = function() {
3675            this.lastEntry = this.chain[this.itemIndex++];
3676            return this.lastEntry;
3677          };
3678          InternalHashCodeMap$02.prototype.remove = function() {
3679            this.__parent.remove(this.lastEntry.getKey());
3680            if (this.itemIndex !== 0) {
3681              this.itemIndex--;
3682            }
3683          };
3684          return InternalHashCodeMap$02;
3685        })()
3686      );
3687      InternalHashCodeMap2.InternalHashCodeMap$0 = InternalHashCodeMap$0;
3688      InternalHashCodeMap$0["__interfaces"] = ["java.util.Iterator"];
3689    })(InternalHashCodeMap = util2.InternalHashCodeMap || (util2.InternalHashCodeMap = {}));
3690  })(util = java2.util || (java2.util = {}));
3691})(java || (java = {}));
3692(function(java2) {
3693  var util;
3694  (function(util2) {
3695    var stream;
3696    (function(stream2) {
3697      var IntStream;
3698      (function(IntStream2) {
3699        function range(startInclusive, endExclusive) {
3700          if (startInclusive >= endExclusive) {
3701            return java2.util.Collections.emptyList().stream();
3702          } else {
3703            var result = new java2.util.ArrayList();
3704            for (; startInclusive < endExclusive; ++startInclusive) {
3705              {
3706                result.add(startInclusive);
3707              }
3708              ;
3709            }
3710            return result.stream();
3711          }
3712        }
3713        IntStream2.range = range;
3714      })(IntStream = stream2.IntStream || (stream2.IntStream = {}));
3715    })(stream = util2.stream || (util2.stream = {}));
3716  })(util = java2.util || (java2.util = {}));
3717})(java || (java = {}));
3718(function(java2) {
3719  var util;
3720  (function(util2) {
3721    var stream;
3722    (function(stream2) {
3723      var Collector;
3724      (function(Collector2) {
3725        var Characteristics;
3726        (function(Characteristics2) {
3727          Characteristics2[Characteristics2["CONCURRENT"] = 0] = "CONCURRENT";
3728          Characteristics2[Characteristics2["UNORDERED"] = 1] = "UNORDERED";
3729          Characteristics2[Characteristics2["IDENTITY_FINISH"] = 2] = "IDENTITY_FINISH";
3730        })(Characteristics = Collector2.Characteristics || (Collector2.Characteristics = {}));
3731      })(Collector = stream2.Collector || (stream2.Collector = {}));
3732    })(stream = util2.stream || (util2.stream = {}));
3733  })(util = java2.util || (java2.util = {}));
3734})(java || (java = {}));
3735(function(java2) {
3736  var util;
3737  (function(util2) {
3738    var stream;
3739    (function(stream2) {
3740      var Stream;
3741      (function(Stream2) {
3742        function of() {
3743          var values = [];
3744          for (var _i = 0; _i < arguments.length; _i++) {
3745            values[_i] = arguments[_i];
3746          }
3747          return java2.util.Arrays.asList.apply(null, values).stream();
3748        }
3749        Stream2.of = of;
3750      })(Stream = stream2.Stream || (stream2.Stream = {}));
3751    })(stream = util2.stream || (util2.stream = {}));
3752  })(util = java2.util || (java2.util = {}));
3753})(java || (java = {}));
3754(function(java2) {
3755  var util;
3756  (function(util2) {
3757    var OptionalInt = (
3758      /** @class */
3759      (function() {
3760        function OptionalInt2(value) {
3761          if (typeof value === "number" || value === null) {
3762            var __args = arguments;
3763            if (this.ref === void 0) {
3764              this.ref = 0;
3765            }
3766            if (this.present === void 0) {
3767              this.present = false;
3768            }
3769            this.ref = value;
3770            this.present = true;
3771          } else if (value === void 0) {
3772            var __args = arguments;
3773            if (this.ref === void 0) {
3774              this.ref = 0;
3775            }
3776            if (this.present === void 0) {
3777              this.present = false;
3778            }
3779            this.ref = 0;
3780            this.present = false;
3781          } else
3782            throw new Error("invalid overload");
3783        }
3784        OptionalInt2.empty = function() {
3785          return OptionalInt2.EMPTY_$LI$();
3786        };
3787        OptionalInt2.of = function(value) {
3788          return new OptionalInt2(value);
3789        };
3790        OptionalInt2.EMPTY_$LI$ = function() {
3791          if (OptionalInt2.EMPTY == null) {
3792            OptionalInt2.EMPTY = new OptionalInt2();
3793          }
3794          return OptionalInt2.EMPTY;
3795        };
3796        OptionalInt2.prototype.isPresent = function() {
3797          return this.present;
3798        };
3799        OptionalInt2.prototype.getAsInt = function() {
3800          javaemul.internal.InternalPreconditions.checkCriticalElement(this.present);
3801          return this.ref;
3802        };
3803        OptionalInt2.prototype.ifPresent = function(consumer) {
3804          var _this = this;
3805          if (this.present) {
3806            (function(target) {
3807              return typeof target === "function" ? target(_this.ref) : target.accept(_this.ref);
3808            })(consumer);
3809          }
3810        };
3811        OptionalInt2.prototype.orElse = function(other) {
3812          return this.present ? this.ref : other;
3813        };
3814        OptionalInt2.prototype.orElseGet = function(other) {
3815          return this.present ? this.ref : (function(target) {
3816            return typeof target === "function" ? target() : target.getAsInt();
3817          })(other);
3818        };
3819        OptionalInt2.prototype.orElseThrow = function(exceptionSupplier) {
3820          if (this.present) {
3821            return this.ref;
3822          }
3823          throw (function(target) {
3824            return typeof target === "function" ? target() : target.get();
3825          })(exceptionSupplier);
3826        };
3827        OptionalInt2.prototype.equals = function(obj) {
3828          if (obj === this) {
3829            return true;
3830          }
3831          if (!(obj != null && obj instanceof java2.util.OptionalInt)) {
3832            return false;
3833          }
3834          var other = obj;
3835          return this.present === other.present && /* compare */
3836          this.ref - other.ref === 0;
3837        };
3838        OptionalInt2.prototype.hashCode = function() {
3839          return this.present ? javaemul.internal.IntegerHelper.hashCode(this.ref) : 0;
3840        };
3841        OptionalInt2.prototype.toString = function() {
3842          return this.present ? "OptionalInt.of(" + /* toString */
3843          ("" + this.ref) + ")" : "OptionalInt.empty()";
3844        };
3845        return OptionalInt2;
3846      })()
3847    );
3848    util2.OptionalInt = OptionalInt;
3849    OptionalInt["__class"] = "java.util.OptionalInt";
3850  })(util = java2.util || (java2.util = {}));
3851})(java || (java = {}));
3852(function(java2) {
3853  var util;
3854  (function(util2) {
3855    var OptionalLong = (
3856      /** @class */
3857      (function() {
3858        function OptionalLong2(value) {
3859          if (typeof value === "number" || value === null) {
3860            var __args = arguments;
3861            if (this.ref === void 0) {
3862              this.ref = 0;
3863            }
3864            if (this.present === void 0) {
3865              this.present = false;
3866            }
3867            this.ref = value;
3868            this.present = true;
3869          } else if (value === void 0) {
3870            var __args = arguments;
3871            if (this.ref === void 0) {
3872              this.ref = 0;
3873            }
3874            if (this.present === void 0) {
3875              this.present = false;
3876            }
3877            this.ref = 0;
3878            this.present = false;
3879          } else
3880            throw new Error("invalid overload");
3881        }
3882        OptionalLong2.empty = function() {
3883          return OptionalLong2.EMPTY_$LI$();
3884        };
3885        OptionalLong2.of = function(value) {
3886          return new OptionalLong2(value);
3887        };
3888        OptionalLong2.EMPTY_$LI$ = function() {
3889          if (OptionalLong2.EMPTY == null) {
3890            OptionalLong2.EMPTY = new OptionalLong2();
3891          }
3892          return OptionalLong2.EMPTY;
3893        };
3894        OptionalLong2.prototype.isPresent = function() {
3895          return this.present;
3896        };
3897        OptionalLong2.prototype.getAsLong = function() {
3898          javaemul.internal.InternalPreconditions.checkCriticalElement(this.present);
3899          return this.ref;
3900        };
3901        OptionalLong2.prototype.ifPresent = function(consumer) {
3902          var _this = this;
3903          if (this.present) {
3904            (function(target) {
3905              return typeof target === "function" ? target(_this.ref) : target.accept(_this.ref);
3906            })(consumer);
3907          }
3908        };
3909        OptionalLong2.prototype.orElse = function(other) {
3910          return this.present ? this.ref : other;
3911        };
3912        OptionalLong2.prototype.orElseGet = function(other) {
3913          return this.present ? this.ref : (function(target) {
3914            return typeof target === "function" ? target() : target.getAsLong();
3915          })(other);
3916        };
3917        OptionalLong2.prototype.orElseThrow = function(exceptionSupplier) {
3918          if (this.present) {
3919            return this.ref;
3920          }
3921          throw (function(target) {
3922            return typeof target === "function" ? target() : target.get();
3923          })(exceptionSupplier);
3924        };
3925        OptionalLong2.prototype.equals = function(obj) {
3926          if (obj === this) {
3927            return true;
3928          }
3929          if (!(obj != null && obj instanceof java2.util.OptionalLong)) {
3930            return false;
3931          }
3932          var other = obj;
3933          return this.present === other.present && /* compare */
3934          this.ref - other.ref === 0;
3935        };
3936        OptionalLong2.prototype.hashCode = function() {
3937          return this.present ? javaemul.internal.LongHelper.hashCode(this.ref) : 0;
3938        };
3939        OptionalLong2.prototype.toString = function() {
3940          return this.present ? "OptionalLong.of(" + /* toString */
3941          ("" + this.ref) + ")" : "OptionalLong.empty()";
3942        };
3943        return OptionalLong2;
3944      })()
3945    );
3946    util2.OptionalLong = OptionalLong;
3947    OptionalLong["__class"] = "java.util.OptionalLong";
3948  })(util = java2.util || (java2.util = {}));
3949})(java || (java = {}));
3950(function(java2) {
3951  var util;
3952  (function(util2) {
3953    var EventObject = (
3954      /** @class */
3955      (function() {
3956        function EventObject2(source) {
3957          if (this.source === void 0) {
3958            this.source = null;
3959          }
3960          this.source = source;
3961        }
3962        EventObject2.prototype.getSource = function() {
3963          return this.source;
3964        };
3965        return EventObject2;
3966      })()
3967    );
3968    util2.EventObject = EventObject;
3969    EventObject["__class"] = "java.util.EventObject";
3970  })(util = java2.util || (java2.util = {}));
3971})(java || (java = {}));
3972(function(java2) {
3973  var util;
3974  (function(util2) {
3975    var InternalJsMap;
3976    /* @__PURE__ */ (function(InternalJsMap2) {
3977    })(InternalJsMap = util2.InternalJsMap || (util2.InternalJsMap = {}));
3978  })(util = java2.util || (java2.util = {}));
3979})(java || (java = {}));
3980(function(java2) {
3981  var util;
3982  (function(util2) {
3983    var StringTokenizer = (
3984      /** @class */
3985      (function() {
3986        function StringTokenizer2(str, delim, returnDelims) {
3987          if ((typeof str === "string" || str === null) && (typeof delim === "string" || delim === null) && (typeof returnDelims === "boolean" || returnDelims === null)) {
3988            var __args = arguments;
3989            if (this.currentPosition === void 0) {
3990              this.currentPosition = 0;
3991            }
3992            if (this.newPosition === void 0) {
3993              this.newPosition = 0;
3994            }
3995            if (this.maxPosition === void 0) {
3996              this.maxPosition = 0;
3997            }
3998            if (this.str === void 0) {
3999              this.str = null;
4000            }
4001            if (this.delimiters === void 0) {
4002              this.delimiters = null;
4003            }
4004            if (this.retDelims === void 0) {
4005              this.retDelims = false;
4006            }
4007            if (this.delimsChanged === void 0) {
4008              this.delimsChanged = false;
4009            }
4010            if (this.maxDelimCodePoint === void 0) {
4011              this.maxDelimCodePoint = 0;
4012            }
4013            if (this.delimiterCodePoints === void 0) {
4014              this.delimiterCodePoints = null;
4015            }
4016            this.hasSurrogates = false;
4017            this.currentPosition = 0;
4018            this.newPosition = -1;
4019            this.delimsChanged = false;
4020            this.str = str;
4021            this.maxPosition = str.length;
4022            this.delimiters = delim;
4023            this.retDelims = returnDelims;
4024            this.setMaxDelimCodePoint();
4025          } else if ((typeof str === "string" || str === null) && (typeof delim === "string" || delim === null) && returnDelims === void 0) {
4026            var __args = arguments;
4027            {
4028              var __args_4 = arguments;
4029              var returnDelims_1 = false;
4030              if (this.currentPosition === void 0) {
4031                this.currentPosition = 0;
4032              }
4033              if (this.newPosition === void 0) {
4034                this.newPosition = 0;
4035              }
4036              if (this.maxPosition === void 0) {
4037                this.maxPosition = 0;
4038              }
4039              if (this.str === void 0) {
4040                this.str = null;
4041              }
4042              if (this.delimiters === void 0) {
4043                this.delimiters = null;
4044              }
4045              if (this.retDelims === void 0) {
4046                this.retDelims = false;
4047              }
4048              if (this.delimsChanged === void 0) {
4049                this.delimsChanged = false;
4050              }
4051              if (this.maxDelimCodePoint === void 0) {
4052                this.maxDelimCodePoint = 0;
4053              }
4054              if (this.delimiterCodePoints === void 0) {
4055                this.delimiterCodePoints = null;
4056              }
4057              this.hasSurrogates = false;
4058              this.currentPosition = 0;
4059              this.newPosition = -1;
4060              this.delimsChanged = false;
4061              this.str = str;
4062              this.maxPosition = str.length;
4063              this.delimiters = delim;
4064              this.retDelims = returnDelims_1;
4065              this.setMaxDelimCodePoint();
4066            }
4067          } else if ((typeof str === "string" || str === null) && delim === void 0 && returnDelims === void 0) {
4068            var __args = arguments;
4069            {
4070              var __args_5 = arguments;
4071              var delim_1 = " 	\n\r\f";
4072              var returnDelims_2 = false;
4073              if (this.currentPosition === void 0) {
4074                this.currentPosition = 0;
4075              }
4076              if (this.newPosition === void 0) {
4077                this.newPosition = 0;
4078              }
4079              if (this.maxPosition === void 0) {
4080                this.maxPosition = 0;
4081              }
4082              if (this.str === void 0) {
4083                this.str = null;
4084              }
4085              if (this.delimiters === void 0) {
4086                this.delimiters = null;
4087              }
4088              if (this.retDelims === void 0) {
4089                this.retDelims = false;
4090              }
4091              if (this.delimsChanged === void 0) {
4092                this.delimsChanged = false;
4093              }
4094              if (this.maxDelimCodePoint === void 0) {
4095                this.maxDelimCodePoint = 0;
4096              }
4097              if (this.delimiterCodePoints === void 0) {
4098                this.delimiterCodePoints = null;
4099              }
4100              this.hasSurrogates = false;
4101              this.currentPosition = 0;
4102              this.newPosition = -1;
4103              this.delimsChanged = false;
4104              this.str = str;
4105              this.maxPosition = str.length;
4106              this.delimiters = delim_1;
4107              this.retDelims = returnDelims_2;
4108              this.setMaxDelimCodePoint();
4109            }
4110          } else
4111            throw new Error("invalid overload");
4112        }
4113        StringTokenizer2.prototype.setMaxDelimCodePoint = function() {
4114          if (this.delimiters == null) {
4115            this.maxDelimCodePoint = 0;
4116            return;
4117          }
4118          var m = 0;
4119          var c;
4120          var count = 0;
4121          for (var i = 0; i < this.delimiters.length; i += javaemul.internal.CharacterHelper.charCount(c)) {
4122            {
4123              c = this.delimiters.charAt(i).charCodeAt(0);
4124              if (c >= (function(c2) {
4125                return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
4126              })(javaemul.internal.CharacterHelper.MIN_HIGH_SURROGATE) && c <= (function(c2) {
4127                return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
4128              })(javaemul.internal.CharacterHelper.MAX_LOW_SURROGATE)) {
4129                c = /* codePointAt */
4130                this.delimiters.charCodeAt(i);
4131                this.hasSurrogates = true;
4132              }
4133              if (m < c)
4134                m = c;
4135              count++;
4136            }
4137            ;
4138          }
4139          this.maxDelimCodePoint = m;
4140          if (this.hasSurrogates) {
4141            this.delimiterCodePoints = (function(s) {
4142              var a = [];
4143              while (s-- > 0)
4144                a.push(0);
4145              return a;
4146            })(count);
4147            for (var i = 0, j = 0; i < count; i++, j += javaemul.internal.CharacterHelper.charCount(c)) {
4148              {
4149                c = /* codePointAt */
4150                this.delimiters.charCodeAt(j);
4151                this.delimiterCodePoints[i] = c;
4152              }
4153              ;
4154            }
4155          }
4156        };
4157        StringTokenizer2.prototype.skipDelimiters = function(startPos) {
4158          if (this.delimiters == null)
4159            throw new java2.lang.NullPointerException();
4160          var position = startPos;
4161          while (!this.retDelims && position < this.maxPosition) {
4162            {
4163              if (!this.hasSurrogates) {
4164                var c = this.str.charAt(position);
4165                if ((function(c2) {
4166                  return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
4167                })(c) > this.maxDelimCodePoint || this.delimiters.indexOf(c) < 0)
4168                  break;
4169                position++;
4170              } else {
4171                var c = this.str.charCodeAt(position);
4172                if (c > this.maxDelimCodePoint || !this.isDelimiter(c)) {
4173                  break;
4174                }
4175                position += javaemul.internal.CharacterHelper.charCount(c);
4176              }
4177            }
4178          }
4179          ;
4180          return position;
4181        };
4182        StringTokenizer2.prototype.scanToken = function(startPos) {
4183          var position = startPos;
4184          while (position < this.maxPosition) {
4185            {
4186              if (!this.hasSurrogates) {
4187                var c = this.str.charAt(position);
4188                if ((function(c2) {
4189                  return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
4190                })(c) <= this.maxDelimCodePoint && this.delimiters.indexOf(c) >= 0)
4191                  break;
4192                position++;
4193              } else {
4194                var c = this.str.charCodeAt(position);
4195                if (c <= this.maxDelimCodePoint && this.isDelimiter(c))
4196                  break;
4197                position += javaemul.internal.CharacterHelper.charCount(c);
4198              }
4199            }
4200          }
4201          ;
4202          if (this.retDelims && startPos === position) {
4203            if (!this.hasSurrogates) {
4204              var c = this.str.charAt(position);
4205              if ((function(c2) {
4206                return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
4207              })(c) <= this.maxDelimCodePoint && this.delimiters.indexOf(c) >= 0)
4208                position++;
4209            } else {
4210              var c = this.str.charCodeAt(position);
4211              if (c <= this.maxDelimCodePoint && this.isDelimiter(c))
4212                position += javaemul.internal.CharacterHelper.charCount(c);
4213            }
4214          }
4215          return position;
4216        };
4217        StringTokenizer2.prototype.isDelimiter = function(codePoint) {
4218          for (var i = 0; i < this.delimiterCodePoints.length; i++) {
4219            {
4220              if (this.delimiterCodePoints[i] === codePoint) {
4221                return true;
4222              }
4223            }
4224            ;
4225          }
4226          return false;
4227        };
4228        StringTokenizer2.prototype.hasMoreTokens = function() {
4229          this.newPosition = this.skipDelimiters(this.currentPosition);
4230          return this.newPosition < this.maxPosition;
4231        };
4232        StringTokenizer2.prototype.nextToken$ = function() {
4233          this.currentPosition = this.newPosition >= 0 && !this.delimsChanged ? this.newPosition : this.skipDelimiters(this.currentPosition);
4234          this.delimsChanged = false;
4235          this.newPosition = -1;
4236          if (this.currentPosition >= this.maxPosition)
4237            throw new java2.util.NoSuchElementException();
4238          var start = this.currentPosition;
4239          this.currentPosition = this.scanToken(this.currentPosition);
4240          return this.str.substring(start, this.currentPosition);
4241        };
4242        StringTokenizer2.prototype.nextToken$java_lang_String = function(delim) {
4243          this.delimiters = delim;
4244          this.delimsChanged = true;
4245          this.setMaxDelimCodePoint();
4246          return this.nextToken$();
4247        };
4248        StringTokenizer2.prototype.nextToken = function(delim) {
4249          if (typeof delim === "string" || delim === null) {
4250            return this.nextToken$java_lang_String(delim);
4251          } else if (delim === void 0) {
4252            return this.nextToken$();
4253          } else
4254            throw new Error("invalid overload");
4255        };
4256        StringTokenizer2.prototype.hasMoreElements = function() {
4257          return this.hasMoreTokens();
4258        };
4259        StringTokenizer2.prototype.nextElement = function() {
4260          return this.nextToken$();
4261        };
4262        StringTokenizer2.prototype.countTokens = function() {
4263          var count = 0;
4264          var currpos = this.currentPosition;
4265          while (currpos < this.maxPosition) {
4266            {
4267              currpos = this.skipDelimiters(currpos);
4268              if (currpos >= this.maxPosition)
4269                break;
4270              currpos = this.scanToken(currpos);
4271              count++;
4272            }
4273          }
4274          ;
4275          return count;
4276        };
4277        return StringTokenizer2;
4278      })()
4279    );
4280    util2.StringTokenizer = StringTokenizer;
4281    StringTokenizer["__class"] = "java.util.StringTokenizer";
4282    StringTokenizer["__interfaces"] = ["java.util.Enumeration"];
4283  })(util = java2.util || (java2.util = {}));
4284})(java || (java = {}));
4285(function(java2) {
4286  var util;
4287  (function(util2) {
4288    var regex;
4289    (function(regex2) {
4290      var Matcher = (
4291        /** @class */
4292        (function() {
4293          function Matcher2(_pattern, text) {
4294            if (this._pattern === void 0) {
4295              this._pattern = null;
4296            }
4297            if (this.text === void 0) {
4298              this.text = null;
4299            }
4300            if (this.starts === void 0) {
4301              this.starts = null;
4302            }
4303            if (this.ends === void 0) {
4304              this.ends = null;
4305            }
4306            if (this.groups === void 0) {
4307              this.groups = null;
4308            }
4309            this.first = -1;
4310            this.last = 0;
4311            this.lastAppendPosition = 0;
4312            this._pattern = _pattern;
4313            this.text = text;
4314            this.reset$();
4315          }
4316          Matcher2.prototype.hasGroups = function() {
4317            if (this.groups == null)
4318              throw new java2.lang.IllegalStateException("No match available");
4319          };
4320          Matcher2.prototype.searchWith = function(regExp) {
4321            var startLastIndex = regExp.lastIndex | 0;
4322            var exec = regExp.exec(this.text);
4323            this.groups = exec;
4324            if (this.groups == null) {
4325              this.reset$();
4326              return false;
4327            }
4328            this.starts = [];
4329            this.ends = [];
4330            var parenthesisStart = [];
4331            var parenthesisEnds = [];
4332            var nonCapturesToCaptures = new Matcher2.NonCapturesToCaptures(parenthesisStart, parenthesisEnds);
4333            var regExpStringWithAllCaptures = regExp.source.replace(new RegExp("((?:\\\\.|\\[\\^?\\]\\]|\\[\\^?(?:[^\\\\\\]]|\\\\.|)+\\])+)|\\(((?:\\?\\:)?)|(\\))", "g"), (function(funcInst) {
4334              if (funcInst == null || typeof funcInst == "function") {
4335                return funcInst;
4336              }
4337              return function() {
4338                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
4339              };
4340            })(/* @__PURE__ */ (function(nonCapturesToCaptures2) {
4341              return function(args) {
4342                return nonCapturesToCaptures2.apply(args);
4343              };
4344            })(nonCapturesToCaptures)));
4345            var regExpWithAllCaptures = new RegExp(regExpStringWithAllCaptures);
4346            var indexGetter = new Matcher2.IndexGetter(regExp.source, parenthesisStart, parenthesisEnds, this.starts, this.ends, startLastIndex);
4347            this.text.substring(startLastIndex).replace(regExpWithAllCaptures, (function(funcInst) {
4348              if (funcInst == null || typeof funcInst == "function") {
4349                return funcInst;
4350              }
4351              return function() {
4352                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
4353              };
4354            })(/* @__PURE__ */ (function(indexGetter2) {
4355              return function(args) {
4356                return indexGetter2.apply(args);
4357              };
4358            })(indexGetter)));
4359            return true;
4360          };
4361          Matcher2.prototype.end$ = function() {
4362            return this.end$int(0);
4363          };
4364          Matcher2.prototype.end$int = function(i) {
4365            this.hasGroups();
4366            return this.ends[i];
4367          };
4368          Matcher2.prototype.end$java_lang_String = function(string) {
4369            return this.end$int(this._pattern.namedGroupsNames.get(string) + this.regionStart());
4370          };
4371          Matcher2.prototype.end = function(string) {
4372            if (typeof string === "string" || string === null) {
4373              return this.end$java_lang_String(string);
4374            } else if (typeof string === "number" || string === null) {
4375              return this.end$int(string);
4376            } else if (string === void 0) {
4377              return this.end$();
4378            } else
4379              throw new Error("invalid overload");
4380          };
4381          Matcher2.prototype.find$ = function() {
4382            return this.searchWith(this._pattern.regexp);
4383          };
4384          Matcher2.prototype.find$int = function(start) {
4385            this._pattern.regexp.lastIndex = start;
4386            return this.find$();
4387          };
4388          Matcher2.prototype.find = function(start) {
4389            if (typeof start === "number" || start === null) {
4390              return this.find$int(start);
4391            } else if (start === void 0) {
4392              return this.find$();
4393            } else
4394              throw new Error("invalid overload");
4395          };
4396          Matcher2.prototype.group$ = function() {
4397            return this.group$int(0);
4398          };
4399          Matcher2.prototype.group$int = function(i) {
4400            this.hasGroups();
4401            return this.groups[i];
4402          };
4403          Matcher2.prototype.group$java_lang_String = function(string) {
4404            return this.group$int(this._pattern.namedGroupsNames.get(string) + this.regionStart());
4405          };
4406          Matcher2.prototype.group = function(string) {
4407            if (typeof string === "string" || string === null) {
4408              return this.group$java_lang_String(string);
4409            } else if (typeof string === "number" || string === null) {
4410              return this.group$int(string);
4411            } else if (string === void 0) {
4412              return this.group$();
4413            } else
4414              throw new Error("invalid overload");
4415          };
4416          Matcher2.prototype.groupCount = function() {
4417            return this.groups.length - 1;
4418          };
4419          Matcher2.prototype.hitEnd = function() {
4420            return this.end$() === this.text.length;
4421          };
4422          Matcher2.prototype.lookingAt = function() {
4423            this.reset$();
4424            return this.searchWith(java2.util.regex.Pattern.compile$java_lang_String("^(?:" + this._pattern.pattern() + ")").regexp);
4425          };
4426          Matcher2.prototype.matches = function() {
4427            this.reset$();
4428            return this.searchWith(java2.util.regex.Pattern.compile$java_lang_String("^(?:" + this._pattern.pattern() + ")$").regexp);
4429          };
4430          Matcher2.prototype.pattern = function() {
4431            return this._pattern;
4432          };
4433          Matcher2.prototype.regionEnd = function() {
4434            this.hasGroups();
4435            return this.groups.length;
4436          };
4437          Matcher2.prototype.regionStart = function() {
4438            this.hasGroups();
4439            return 1;
4440          };
4441          Matcher2.prototype.replaceAll = function(replacement) {
4442            this.reset$();
4443            this.text = this.text.replace(this._pattern.regexp, replacement);
4444            return this.text;
4445          };
4446          Matcher2.prototype.replaceFirst = function(replacement) {
4447            this.reset$();
4448            var firstReplacer = new Matcher2.FirstReplacer(replacement);
4449            this.text = this.text.replace(this._pattern.regexp, (function(funcInst) {
4450              if (funcInst == null || typeof funcInst == "function") {
4451                return funcInst;
4452              }
4453              return function() {
4454                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
4455              };
4456            })((function(funcInst) {
4457              if (funcInst == null || typeof funcInst == "function") {
4458                return funcInst;
4459              }
4460              return function(arg0) {
4461                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
4462              };
4463            })(/* @__PURE__ */ (function(firstReplacer2) {
4464              return function(args) {
4465                return firstReplacer2.apply(args);
4466              };
4467            })(firstReplacer))));
4468            return this.text;
4469          };
4470          Matcher2.prototype.reset$ = function() {
4471            this._pattern.regexp.lastIndex = 0;
4472            this.groups = null;
4473            this.starts = null;
4474            this.ends = null;
4475            this.first = -1;
4476            this.last = 0;
4477            return this;
4478          };
4479          Matcher2.prototype.reset$java_lang_CharSequence = function(input) {
4480            this.text = input.toString();
4481            return this.reset$();
4482          };
4483          Matcher2.prototype.reset = function(input) {
4484            if (input != null && (input.constructor != null && input.constructor["__interfaces"] != null && input.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof input === "string") || input === null) {
4485              return this.reset$java_lang_CharSequence(input);
4486            } else if (input === void 0) {
4487              return this.reset$();
4488            } else
4489              throw new Error("invalid overload");
4490          };
4491          Matcher2.prototype.start$ = function() {
4492            return this.start$int(0);
4493          };
4494          Matcher2.prototype.start$int = function(i) {
4495            this.hasGroups();
4496            return this.starts[i];
4497          };
4498          Matcher2.prototype.start$java_lang_String = function(string) {
4499            return this.start$int(this._pattern.namedGroupsNames.get(string) + this.regionStart());
4500          };
4501          Matcher2.prototype.start = function(string) {
4502            if (typeof string === "string" || string === null) {
4503              return this.start$java_lang_String(string);
4504            } else if (typeof string === "number" || string === null) {
4505              return this.start$int(string);
4506            } else if (string === void 0) {
4507              return this.start$();
4508            } else
4509              throw new Error("invalid overload");
4510          };
4511          Matcher2.prototype.toMatchResult = function() {
4512            return this;
4513          };
4514          Matcher2.prototype.usePattern = function(newPattern) {
4515            this._pattern = newPattern;
4516            return this;
4517          };
4518          return Matcher2;
4519        })()
4520      );
4521      regex2.Matcher = Matcher;
4522      Matcher["__class"] = "java.util.regex.Matcher";
4523      Matcher["__interfaces"] = ["java.util.regex.MatchResult"];
4524      (function(Matcher2) {
4525        var IndexGetter = (
4526          /** @class */
4527          (function() {
4528            function IndexGetter2(regexString, parenthesisStart, parenthesisEnd, starts, ends, startLastIndex) {
4529              if (this.regexString === void 0) {
4530                this.regexString = null;
4531              }
4532              if (this.parenthesisStart === void 0) {
4533                this.parenthesisStart = null;
4534              }
4535              if (this.parenthesisEnd === void 0) {
4536                this.parenthesisEnd = null;
4537              }
4538              if (this.starts === void 0) {
4539                this.starts = null;
4540              }
4541              if (this.ends === void 0) {
4542                this.ends = null;
4543              }
4544              if (this.startLastIndex === void 0) {
4545                this.startLastIndex = 0;
4546              }
4547              this.regexString = regexString;
4548              this.parenthesisStart = parenthesisStart;
4549              this.parenthesisEnd = parenthesisEnd;
4550              this.starts = starts;
4551              this.ends = ends;
4552              this.startLastIndex = startLastIndex;
4553            }
4554            IndexGetter2.prototype.apply = function(args) {
4555              this.starts.push(args[args.length - 2]);
4556              this.ends.push(this.starts[0] + args[0].length);
4557              var lastIndices = new java2.util.Stack();
4558              lastIndices.push(this.ends[0]);
4559              lastIndices.push(this.starts[0]);
4560              var countEndsFrom = 0;
4561              for (var i = 0; i < args.length - 3; ++i) {
4562                {
4563                  var pl = this.parenthesisStart[i];
4564                  while (this.parenthesisEnd[countEndsFrom] < pl) {
4565                    {
4566                      countEndsFrom += 1;
4567                      lastIndices.pop();
4568                    }
4569                  }
4570                  ;
4571                  var start = lastIndices.pop();
4572                  var len = args[i + 1] != null ? args[i + 1].length : 0;
4573                  lastIndices.push(start + len);
4574                  lastIndices.push(start);
4575                  if ((function(c) {
4576                    return c.charCodeAt == null ? c : c.charCodeAt(0);
4577                  })(this.regexString.charAt(pl + 1)) == "?".charCodeAt(0)) {
4578                    continue;
4579                  }
4580                  if (len === 0) {
4581                    this.starts.push(-1);
4582                    this.ends.push(-1);
4583                  } else {
4584                    start += this.startLastIndex;
4585                    this.starts.push(start);
4586                    this.ends.push(start + len);
4587                  }
4588                }
4589                ;
4590              }
4591              this.starts[0] += this.startLastIndex;
4592              this.ends[0] += this.startLastIndex;
4593              return args[0];
4594            };
4595            return IndexGetter2;
4596          })()
4597        );
4598        Matcher2.IndexGetter = IndexGetter;
4599        IndexGetter["__class"] = "java.util.regex.Matcher.IndexGetter";
4600        IndexGetter["__interfaces"] = ["java.util.function.Function"];
4601        var NonCapturesToCaptures = (
4602          /** @class */
4603          (function() {
4604            function NonCapturesToCaptures2(start, ends) {
4605              if (this.start === void 0) {
4606                this.start = null;
4607              }
4608              if (this.ends === void 0) {
4609                this.ends = null;
4610              }
4611              this.start = start;
4612              this.ends = ends;
4613            }
4614            NonCapturesToCaptures2.prototype.apply = function(args) {
4615              if (args[1] !== void 0) {
4616                return args[1];
4617              }
4618              if (args[2] !== void 0) {
4619                this.start.push(javaemul.internal.IntegerHelper.parseInt(args[args.length - 2]));
4620                return "(";
4621              }
4622              if (args[3] !== void 0) {
4623                this.ends.push(javaemul.internal.IntegerHelper.parseInt(args[args.length - 2]));
4624                return args[3];
4625              }
4626              throw new Error("NonCapturesToCaptures");
4627            };
4628            return NonCapturesToCaptures2;
4629          })()
4630        );
4631        Matcher2.NonCapturesToCaptures = NonCapturesToCaptures;
4632        NonCapturesToCaptures["__class"] = "java.util.regex.Matcher.NonCapturesToCaptures";
4633        NonCapturesToCaptures["__interfaces"] = ["java.util.function.Function"];
4634        var FirstReplacer = (
4635          /** @class */
4636          (function() {
4637            function FirstReplacer2(replacement) {
4638              if (this.replacement === void 0) {
4639                this.replacement = null;
4640              }
4641              this.first = true;
4642              this.replacement = replacement;
4643            }
4644            FirstReplacer2.prototype.apply = function(args) {
4645              if (this.first) {
4646                this.first = false;
4647                return this.replacement;
4648              }
4649              return args[0];
4650            };
4651            return FirstReplacer2;
4652          })()
4653        );
4654        Matcher2.FirstReplacer = FirstReplacer;
4655        FirstReplacer["__class"] = "java.util.regex.Matcher.FirstReplacer";
4656        FirstReplacer["__interfaces"] = ["java.util.function.Function"];
4657      })(Matcher = regex2.Matcher || (regex2.Matcher = {}));
4658    })(regex = util2.regex || (util2.regex = {}));
4659  })(util = java2.util || (java2.util = {}));
4660})(java || (java = {}));
4661(function(java2) {
4662  var util;
4663  (function(util2) {
4664    var regex;
4665    (function(regex_1) {
4666      var Pattern = (
4667        /** @class */
4668        (function() {
4669          function Pattern2(regexp, _flags, namedGroupsNames) {
4670            if (this.regexp === void 0) {
4671              this.regexp = null;
4672            }
4673            if (this._flags === void 0) {
4674              this._flags = 0;
4675            }
4676            if (this.namedGroupsNames === void 0) {
4677              this.namedGroupsNames = null;
4678            }
4679            this.regexp = regexp;
4680            this._flags = _flags;
4681            this.namedGroupsNames = namedGroupsNames;
4682          }
4683          Pattern2.compile$java_lang_String = function(regexp) {
4684            return Pattern2.compile$java_lang_String$int(regexp, 0);
4685          };
4686          Pattern2.compile$java_lang_String$int = function(regexpString, flags) {
4687            var jsFlags = "g";
4688            if ((flags & Pattern2.MULTILINE) > 0) {
4689              jsFlags += "m";
4690            }
4691            if ((flags & Pattern2.CASE_INSENSITIVE) > 0) {
4692              jsFlags += "i";
4693            }
4694            if ((flags & Pattern2.UNICODE_CHARACTER_CLASS) > 0) {
4695              jsFlags += "u";
4696            }
4697            if ((flags & Pattern2.UNICODE_CASE) > 0) {
4698              jsFlags += "ui";
4699            }
4700            var namedGroupsNames = new java2.util.HashMap();
4701            var groupNameRemover = new Pattern2.GroupNameRemover(namedGroupsNames);
4702            var mapper = (function(funcInst) {
4703              if (funcInst == null || typeof funcInst == "function") {
4704                return funcInst;
4705              }
4706              return function() {
4707                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
4708              };
4709            })((function(funcInst) {
4710              if (funcInst == null || typeof funcInst == "function") {
4711                return funcInst;
4712              }
4713              return function(arg0) {
4714                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
4715              };
4716            })((function(args) {
4717              if (!Array.isArray(args) || args[2] === void 0 || args[2].length === 0) {
4718                return args[1];
4719              }
4720              var regexp = args[args.length - 1];
4721              var startIndexOfMatched = javaemul.internal.IntegerHelper.parseInt(args[args.length - 2]);
4722              var endIndexOfMatched = startIndexOfMatched + args[0].length;
4723              var hasOpenBracket = startIndexOfMatched > 0 && "(" === regexp.charAt(startIndexOfMatched - 1) || startIndexOfMatched > 2 && "(?:" === regexp.substr(startIndexOfMatched - 3, 3);
4724              var hasCloseBracket = regexp.length > endIndexOfMatched && ")" === regexp.charAt(endIndexOfMatched);
4725              if (hasOpenBracket && hasCloseBracket) {
4726                return args[1] + args[2];
4727              }
4728              return args[1] + "(?:" + args[2] + ")";
4729            })));
4730            regexpString = regexpString.replace(new RegExp("(?:\\\\\\\\)*(\\\\?)\\[\\^?\\]?|(?:\\\\\\\\)*(\\\\?)\\]|(?:\\\\\\\\)*(\\\\?)\\((?:(\\?\\:)|\\?<([^>]+)>)?", "g"), (function(funcInst) {
4731              if (funcInst == null || typeof funcInst == "function") {
4732                return funcInst;
4733              }
4734              return function() {
4735                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
4736              };
4737            })((function(funcInst) {
4738              if (funcInst == null || typeof funcInst == "function") {
4739                return funcInst;
4740              }
4741              return function(arg0) {
4742                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
4743              };
4744            })(/* @__PURE__ */ (function(groupNameRemover2) {
4745              return function(args) {
4746                return groupNameRemover2.apply(args);
4747              };
4748            })(groupNameRemover)))).replace(new RegExp("(\\?\\:|(?:[*+?]|\\{[^\\}]+\\})*)((?:[^\\\\()|]|\\\\.|\\[\\^?\\]\\]|\\[\\^?(?:[^\\\\\\]]|\\\\.|)+\\])*)", "g"), (function(funcInst) {
4749              if (funcInst == null || typeof funcInst == "function") {
4750                return funcInst;
4751              }
4752              return function() {
4753                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
4754              };
4755            })(mapper));
4756            try {
4757              return new Pattern2(new RegExp(regexpString, jsFlags), flags, namedGroupsNames);
4758            } catch (e) {
4759              throw new java2.util.regex.PatternSyntaxException(e, regexpString);
4760            }
4761          };
4762          Pattern2.compile = function(regexpString, flags) {
4763            if ((typeof regexpString === "string" || regexpString === null) && (typeof flags === "
4763number" || flags === null)) {
4764              return java2.util.regex.Pattern.compile$java_lang_String$int(regexpString, flags);
4765            } else if ((typeof regexpString === "string" || regexpString === null) && flags === void 0) {
4766              return java2.util.regex.Pattern.compile$java_lang_String(regexpString);
4767            } else
4768              throw new Error("invalid overload");
4769          };
4770          Pattern2.prototype.flags = function() {
4771            return this._flags;
4772          };
4773          Pattern2.prototype.matcher = function(sequence) {
4774            return new java2.util.regex.Matcher(this, sequence.toString());
4775          };
4776          Pattern2.matches = function(regex2, input) {
4777            return Pattern2.compile$java_lang_String(regex2).matcher(input).matches();
4778          };
4779          Pattern2.prototype.pattern = function() {
4780            return this.regexp.source;
4781          };
4782          Pattern2.quote = function(s) {
4783            return JSON.stringify(s);
4784          };
4785          Pattern2.prototype.split = function(input, limit) {
4786            if (limit === void 0) {
4787              limit = 0;
4788            }
4789            return input.toString().split(this.regexp, limit).toArray();
4790          };
4791          Pattern2.prototype.splitAsStream = function(input) {
4792            return java2.util.Arrays.stream(this.split(input));
4793          };
4794          Pattern2.prototype.toString = function() {
4795            return this.pattern();
4796          };
4797          Pattern2.CASE_INSENSITIVE = 2;
4798          Pattern2.MULTILINE = 8;
4799          Pattern2.UNICODE_CASE = 64;
4800          Pattern2.UNICODE_CHARACTER_CLASS = 256;
4801          return Pattern2;
4802        })()
4803      );
4804      regex_1.Pattern = Pattern;
4805      Pattern["__class"] = "java.util.regex.Pattern";
4806      Pattern["__interfaces"] = ["java.io.Serializable"];
4807      (function(Pattern2) {
4808        var GroupNameRemover = (
4809          /** @class */
4810          (function() {
4811            function GroupNameRemover2(namedGroupsNames) {
4812              if (this.namedGroupsNames === void 0) {
4813                this.namedGroupsNames = null;
4814              }
4815              this.count = 0;
4816              this.inBrackets = false;
4817              this.namedGroupsNames = namedGroupsNames;
4818            }
4819            GroupNameRemover2.prototype.apply = function(args) {
4820              if (this.inBrackets || args[2] !== void 0) {
4821                this.inBrackets = args[2] === void 0 || args[2].length === 1;
4822                return args[0];
4823              }
4824              if (args[1] !== void 0) {
4825                this.inBrackets = args[1].length === 0;
4826                return args[0];
4827              }
4828              if (args[3] !== void 0 && args[3].length !== 0) {
4829                return args[0];
4830              }
4831              if (args[4] === void 0) {
4832                this.count += 1;
4833              }
4834              if (args[5] !== void 0) {
4835                this.namedGroupsNames.put(args[5], this.count);
4836                args[0] = args[0].replace(new RegExp("\\?<[^>]+>"), "");
4837              }
4838              return args[0];
4839            };
4840            return GroupNameRemover2;
4841          })()
4842        );
4843        Pattern2.GroupNameRemover = GroupNameRemover;
4844        GroupNameRemover["__class"] = "java.util.regex.Pattern.GroupNameRemover";
4845        GroupNameRemover["__interfaces"] = ["java.util.function.Function"];
4846      })(Pattern = regex_1.Pattern || (regex_1.Pattern = {}));
4847    })(regex = util2.regex || (util2.regex = {}));
4848  })(util = java2.util || (java2.util = {}));
4849})(java || (java = {}));
4850(function(java2) {
4851  var util;
4852  (function(util2) {
4853    var AbstractCollection = (
4854      /** @class */
4855      (function() {
4856        function AbstractCollection2() {
4857        }
4858        AbstractCollection2.prototype.stream = function() {
4859          return new javaemul.internal.stream.StreamHelper(this);
4860        };
4861        AbstractCollection2.prototype.parallelStream = function() {
4862          return this.stream();
4863        };
4864        AbstractCollection2.prototype.removeIf = function(filter) {
4865          javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
4866            if (funcInst == null || typeof funcInst == "function") {
4867              return funcInst;
4868            }
4869            return function(arg0) {
4870              return (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0);
4871            };
4872          })(filter));
4873          var removed = false;
4874          var _loop_2 = function(it2) {
4875            {
4876              if ((function(target) {
4877                return typeof target === "function" ? target(it2.next()) : target.test(it2.next());
4878              })(filter)) {
4879                it2.remove();
4880                removed = true;
4881              }
4882            }
4883            ;
4884          };
4885          for (var it = this.iterator(); it.hasNext(); ) {
4886            _loop_2(it);
4887          }
4888          return removed;
4889        };
4890        AbstractCollection2.prototype.forEach = function(action) {
4891          javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
4892            if (funcInst == null || typeof funcInst == "function") {
4893              return funcInst;
4894            }
4895            return function(arg0) {
4896              return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
4897            };
4898          })(action));
4899          var _loop_3 = function(index2) {
4900            var t = index2.next();
4901            {
4902              (function(target) {
4903                return typeof target === "function" ? target(t) : target.accept(t);
4904              })(action);
4905            }
4906          };
4907          for (var index = this.iterator(); index.hasNext(); ) {
4908            _loop_3(index);
4909          }
4910        };
4911        AbstractCollection2.prototype.add = function(o) {
4912          throw new java2.lang.UnsupportedOperationException("Add not supported on this collection");
4913        };
4914        AbstractCollection2.prototype.addAll = function(c) {
4915          javaemul.internal.InternalPreconditions.checkNotNull(c);
4916          var changed = false;
4917          for (var index = c.iterator(); index.hasNext(); ) {
4918            var e = index.next();
4919            {
4920              changed = this.add(e) || changed;
4921            }
4922          }
4923          return changed;
4924        };
4925        AbstractCollection2.prototype.clear = function() {
4926          for (var iter = this.iterator(); iter.hasNext(); ) {
4927            {
4928              iter.next();
4929              iter.remove();
4930            }
4931            ;
4932          }
4933        };
4934        AbstractCollection2.prototype.contains = function(o) {
4935          return this.advanceToFind(o, false);
4936        };
4937        AbstractCollection2.prototype.containsAll = function(c) {
4938          javaemul.internal.InternalPreconditions.checkNotNull(c);
4939          for (var index = c.iterator(); index.hasNext(); ) {
4940            var e = index.next();
4941            {
4942              if (!this.contains(e)) {
4943                return false;
4944              }
4945            }
4946          }
4947          return true;
4948        };
4949        AbstractCollection2.prototype.isEmpty = function() {
4950          return this.size() === 0;
4951        };
4952        AbstractCollection2.prototype.remove = function(o) {
4953          return this.advanceToFind(o, true);
4954        };
4955        AbstractCollection2.prototype.removeAll = function(c) {
4956          javaemul.internal.InternalPreconditions.checkNotNull(c);
4957          var changed = false;
4958          for (var iter = this.iterator(); iter.hasNext(); ) {
4959            {
4960              var o = iter.next();
4961              if (c.contains(o)) {
4962                iter.remove();
4963                changed = true;
4964              }
4965            }
4966            ;
4967          }
4968          return changed;
4969        };
4970        AbstractCollection2.prototype.retainAll = function(c) {
4971          javaemul.internal.InternalPreconditions.checkNotNull(c);
4972          var changed = false;
4973          for (var iter = this.iterator(); iter.hasNext(); ) {
4974            {
4975              var o = iter.next();
4976              if (!c.contains(o)) {
4977                iter.remove();
4978                changed = true;
4979              }
4980            }
4981            ;
4982          }
4983          return changed;
4984        };
4985        AbstractCollection2.prototype.toArray$ = function() {
4986          return this.toArray$java_lang_Object_A((function(s) {
4987            var a = [];
4988            while (s-- > 0)
4989              a.push(null);
4990            return a;
4991          })(this.size()));
4992        };
4993        AbstractCollection2.prototype.toArray$java_lang_Object_A = function(a) {
4994          var size = this.size();
4995          if (a.length < size) {
4996            a = javaemul.internal.ArrayHelper.createFrom(a, size);
4997          }
4998          var result = a;
4999          var it = this.iterator();
5000          for (var i = 0; i < size; ++i) {
5001            {
5002              result[i] = it.next();
5003            }
5004            ;
5005          }
5006          if (a.length > size) {
5007            a[size] = null;
5008          }
5009          return a;
5010        };
5011        AbstractCollection2.prototype.toArray = function(a) {
5012          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || a[0] != null) || a === null) {
5013            return this.toArray$java_lang_Object_A(a);
5014          } else if (a === void 0) {
5015            return this.toArray$();
5016          } else
5017            throw new Error("invalid overload");
5018        };
5019        AbstractCollection2.prototype.toString = function() {
5020          var joiner = new java2.util.StringJoiner(", ", "[", "]");
5021          for (var index = this.iterator(); index.hasNext(); ) {
5022            var e = index.next();
5023            {
5024              joiner.add(e === this ? "(this Collection)" : (
5025                /* valueOf */
5026                String(e).toString()
5027              ));
5028            }
5029          }
5030          return joiner.toString();
5031        };
5032        AbstractCollection2.prototype.advanceToFind = function(o, remove) {
5033          for (var iter = this.iterator(); iter.hasNext(); ) {
5034            {
5035              var e = iter.next();
5036              if (java2.util.Objects.equals(o, e)) {
5037                if (remove) {
5038                  iter.remove();
5039                }
5040                return true;
5041              }
5042            }
5043            ;
5044          }
5045          return false;
5046        };
5047        return AbstractCollection2;
5048      })()
5049    );
5050    util2.AbstractCollection = AbstractCollection;
5051    AbstractCollection["__class"] = "java.util.AbstractCollection";
5052    AbstractCollection["__interfaces"] = ["java.util.Collection", "java.lang.Iterable"];
5053  })(util = java2.util || (java2.util = {}));
5054})(java || (java = {}));
5055(function(java2) {
5056  var util;
5057  (function(util2) {
5058    var TimerTask = (
5059      /** @class */
5060      (function() {
5061        function TimerTask2() {
5062          this.state = TimerTask2.VIRGIN;
5063          if (this.nextExecutionTime === void 0) {
5064            this.nextExecutionTime = 0;
5065          }
5066          this.period = 0;
5067          if (this.handle === void 0) {
5068            this.handle = 0;
5069          }
5070        }
5071        TimerTask2.prototype.cancel = function() {
5072          var success = this.state === TimerTask2.SCHEDULED;
5073          this.state = TimerTask2.CANCELLED;
5074          this.nextExecutionTime = 0;
5075          this.period = 0;
5076          return success;
5077        };
5078        TimerTask2.prototype.scheduledExecutionTime = function() {
5079          return this.period < 0 ? this.nextExecutionTime + this.period : this.nextExecutionTime - this.period;
5080        };
5081        TimerTask2.VIRGIN = 0;
5082        TimerTask2.SCHEDULED = 1;
5083        TimerTask2.EXECUTED = 2;
5084        TimerTask2.CANCELLED = 3;
5085        return TimerTask2;
5086      })()
5087    );
5088    util2.TimerTask = TimerTask;
5089    TimerTask["__class"] = "java.util.TimerTask";
5090    TimerTask["__interfaces"] = ["java.lang.Runnable"];
5091  })(util = java2.util || (java2.util = {}));
5092})(java || (java = {}));
5093(function(java2) {
5094  var util;
5095  (function(util2) {
5096    var Random = (
5097      /** @class */
5098      (function() {
5099        function Random2(seed) {
5100          if (typeof seed === "number" || seed === null) {
5101            var __args = arguments;
5102            if (this.nextNextGaussian === void 0) {
5103              this.nextNextGaussian = 0;
5104            }
5105            if (this.seedhi === void 0) {
5106              this.seedhi = 0;
5107            }
5108            if (this.seedlo === void 0) {
5109              this.seedlo = 0;
5110            }
5111            this.haveNextNextGaussian = false;
5112            this.setSeed$long(seed);
5113          } else if (seed === void 0) {
5114            var __args = arguments;
5115            if (this.nextNextGaussian === void 0) {
5116              this.nextNextGaussian = 0;
5117            }
5118            if (this.seedhi === void 0) {
5119              this.seedhi = 0;
5120            }
5121            if (this.seedlo === void 0) {
5122              this.seedlo = 0;
5123            }
5124            this.haveNextNextGaussian = false;
5125            var seed_1 = Random2.uniqueSeed++ + javaemul.internal.DateUtil.now();
5126            var hi = (Math.floor(seed_1 * Random2.twoToTheMinus24) | 0) & 16777215;
5127            var lo = seed_1 - hi * Random2.twoToThe24 | 0;
5128            this.setSeed$int$int(hi, lo);
5129          } else
5130            throw new Error("invalid overload");
5131        }
5132        Random2.__static_initialize = function() {
5133          if (!Random2.__static_initialized) {
5134            Random2.__static_initialized = true;
5135            Random2.__static_initializer_0();
5136          }
5137        };
5138        Random2.twoToTheXMinus24_$LI$ = function() {
5139          Random2.__static_initialize();
5140          if (Random2.twoToTheXMinus24 == null) {
5141            Random2.twoToTheXMinus24 = (function(s) {
5142              var a = [];
5143              while (s-- > 0)
5144                a.push(0);
5145              return a;
5146            })(25);
5147          }
5148          return Random2.twoToTheXMinus24;
5149        };
5150        Random2.twoToTheXMinus48_$LI$ = function() {
5151          Random2.__static_initialize();
5152          if (Random2.twoToTheXMinus48 == null) {
5153            Random2.twoToTheXMinus48 = (function(s) {
5154              var a = [];
5155              while (s-- > 0)
5156                a.push(0);
5157              return a;
5158            })(33);
5159          }
5160          return Random2.twoToTheXMinus48;
5161        };
5162        Random2.__static_initializer_0 = function() {
5163          var twoToTheXMinus48Tmp = 152587890625e-16;
5164          for (var i = 32; i >= 0; i--) {
5165            {
5166              Random2.twoToTheXMinus48_$LI$()[i] = twoToTheXMinus48Tmp;
5167              twoToTheXMinus48Tmp *= 0.5;
5168            }
5169            ;
5170          }
5171          var twoToTheXMinus24Tmp = 1;
5172          for (var i = 24; i >= 0; i--) {
5173            {
5174              Random2.twoToTheXMinus24_$LI$()[i] = twoToTheXMinus24Tmp;
5175              twoToTheXMinus24Tmp *= 0.5;
5176            }
5177            ;
5178          }
5179        };
5180        Random2.prototype.nextBoolean = function() {
5181          return this.nextInternal(1) !== 0;
5182        };
5183        Random2.prototype.nextBytes = function(buf) {
5184          javaemul.internal.InternalPreconditions.checkNotNull(buf);
5185          var rand = 0;
5186          var count = 0;
5187          var loop = 0;
5188          while (count < buf.length) {
5189            {
5190              if (loop === 0) {
5191                rand = this.nextInternal(32) | 0;
5192                loop = 3;
5193              } else {
5194                loop--;
5195              }
5196              buf[count++] = rand | 0;
5197              rand >>= 8;
5198            }
5199          }
5200          ;
5201        };
5202        Random2.prototype.nextDouble = function() {
5203          return this.nextInternal(26) * Random2.twoToTheMinus26 + this.nextInternal(27) * Random2.twoToTheMinus53;
5204        };
5205        Random2.prototype.nextFloat = function() {
5206          return this.nextInternal(24) * Random2.twoToTheMinus24;
5207        };
5208        Random2.prototype.nextGaussian = function() {
5209          if (this.haveNextNextGaussian) {
5210            this.haveNextNextGaussian = false;
5211            return this.nextNextGaussian;
5212          }
5213          var v1;
5214          var v2;
5215          var s;
5216          do {
5217            {
5218              v1 = 2 * this.nextDouble() - 1;
5219              v2 = 2 * this.nextDouble() - 1;
5220              s = v1 * v1 + v2 * v2;
5221            }
5222          } while (s >= 1);
5223          var norm = s === 0 ? 0 : Math.sqrt(-2 * Math.log(s) / s);
5224          this.nextNextGaussian = v2 * norm;
5225          this.haveNextNextGaussian = true;
5226          return v1 * norm;
5227        };
5228        Random2.prototype.nextInt$ = function() {
5229          return this.nextInternal(32) | 0;
5230        };
5231        Random2.prototype.nextInt$int = function(n) {
5232          javaemul.internal.InternalPreconditions.checkCriticalArgument(
5233            n > 0,
5234            "Random nextInt parameter can only be positive: %s",
5235            /* toString */
5236            "" + n
5237          );
5238          if ((n & -n) === n) {
5239            return n * this.nextInternal(31) * Random2.twoToTheMinus31 | 0;
5240          }
5241          var bits;
5242          var val;
5243          do {
5244            {
5245              bits = this.nextInternal(31);
5246              val = bits % n;
5247            }
5248          } while (bits - val + (n - 1) < 0);
5249          return val | 0;
5250        };
5251        Random2.prototype.nextInt = function(n) {
5252          if (typeof n === "number" || n === null) {
5253            return this.nextInt$int(n);
5254          } else if (n === void 0) {
5255            return this.nextInt$();
5256          } else
5257            throw new Error("invalid overload");
5258        };
5259        Random2.prototype.nextLong = function() {
5260          return ((function(n) {
5261            return n < 0 ? Math.ceil(n) : Math.floor(n);
5262          })(this.nextInternal(32)) << 32) + (function(n) {
5263            return n < 0 ? Math.ceil(n) : Math.floor(n);
5264          })(this.nextInternal(32));
5265        };
5266        Random2.prototype.setSeed$long = function(seed) {
5267          this.setSeed$int$int(seed >> 24 & 16777215 | 0, seed & 16777215 | 0);
5268        };
5269        Random2.prototype.next = function(bits) {
5270          return this.nextInternal(bits) | 0;
5271        };
5272        Random2.prototype.nextInternal = function(bits) {
5273          var hi = this.seedhi * Random2.multiplierLo + this.seedlo * Random2.multiplierHi;
5274          var lo = this.seedlo * Random2.multiplierLo + 11;
5275          var carry = Math.floor(lo * Random2.twoToTheMinus24);
5276          hi += carry;
5277          lo -= carry * Random2.twoToThe24;
5278          hi %= Random2.twoToThe24;
5279          this.seedhi = hi;
5280          this.seedlo = lo;
5281          if (bits <= 24) {
5282            return Math.floor(this.seedhi * Random2.twoToTheXMinus24_$LI$()[bits]);
5283          } else {
5284            var h = this.seedhi * (1 << bits - 24);
5285            var l = Math.floor(this.seedlo * Random2.twoToTheXMinus48_$LI$()[bits]);
5286            var dval = h + l;
5287            if (dval >= Random2.twoToThe31) {
5288              dval -= Random2.twoToThe32;
5289            }
5290            return dval;
5291          }
5292        };
5293        Random2.prototype.setSeed$int$int = function(seedhi, seedlo) {
5294          this.seedhi = seedhi ^ 1502;
5295          this.seedlo = seedlo ^ 15525485;
5296          this.haveNextNextGaussian = false;
5297        };
5298        Random2.prototype.setSeed = function(seedhi, seedlo) {
5299          if ((typeof seedhi === "number" || seedhi === null) && (typeof seedlo === "number" || seedlo === null)) {
5300            return this.setSeed$int$int(seedhi, seedlo);
5301          } else if ((typeof seedhi === "number" || seedhi === null) && seedlo === void 0) {
5302            return this.setSeed$long(seedhi);
5303          } else
5304            throw new Error("invalid overload");
5305        };
5306        Random2.__static_initialized = false;
5307        Random2.multiplierHi = 1502;
5308        Random2.multiplierLo = 15525485;
5309        Random2.twoToThe24 = 16777216;
5310        Random2.twoToThe31 = 2147483648;
5311        Random2.twoToThe32 = 4294967296;
5312        Random2.twoToTheMinus24 = 5960464477539063e-23;
5313        Random2.twoToTheMinus26 = 14901161193847656e-24;
5314        Random2.twoToTheMinus31 = 4656612873077393e-25;
5315        Random2.twoToTheMinus53 = 11102230246251565e-32;
5316        Random2.uniqueSeed = 0;
5317        return Random2;
5318      })()
5319    );
5320    util2.Random = Random;
5321    Random["__class"] = "java.util.Random";
5322  })(util = java2.util || (java2.util = {}));
5323})(java || (java = {}));
5324(function(java2) {
5325  var util;
5326  (function(util2) {
5327    var Locale = (
5328      /** @class */
5329      (function() {
5330        function Locale2() {
5331        }
5332        Locale2.ROOT_$LI$ = function() {
5333          if (Locale2.ROOT == null) {
5334            Locale2.ROOT = new Locale2.RootLocale();
5335          }
5336          return Locale2.ROOT;
5337        };
5338        Locale2.ENGLISH_$LI$ = function() {
5339          if (Locale2.ENGLISH == null) {
5340            Locale2.ENGLISH = new Locale2.EnglishLocale();
5341          }
5342          return Locale2.ENGLISH;
5343        };
5344        Locale2.US_$LI$ = function() {
5345          if (Locale2.US == null) {
5346            Locale2.US = new Locale2.USLocale();
5347          }
5348          return Locale2.US;
5349        };
5350        Locale2.FRANCE_$LI$ = function() {
5351          if (Locale2.FRANCE == null) {
5352            Locale2.FRANCE = new Locale2.FrenchLocale();
5353          }
5354          return Locale2.FRANCE;
5355        };
5356        Locale2.UK_$LI$ = function() {
5357          if (Locale2.UK == null) {
5358            Locale2.UK = new Locale2.UKLocale();
5359          }
5360          return Locale2.UK;
5361        };
5362        Locale2.defaultLocale_$LI$ = function() {
5363          if (Locale2.defaultLocale == null) {
5364            Locale2.defaultLocale = new Locale2.DefaultLocale();
5365          }
5366          return Locale2.defaultLocale;
5367        };
5368        Locale2.getDefault = function() {
5369          return Locale2.defaultLocale_$LI$();
5370        };
5371        return Locale2;
5372      })()
5373    );
5374    util2.Locale = Locale;
5375    Locale["__class"] = "java.util.Locale";
5376    (function(Locale2) {
5377      var RootLocale = (
5378        /** @class */
5379        (function(_super) {
5380          __extends(RootLocale2, _super);
5381          function RootLocale2() {
5382            return _super.call(this) || this;
5383          }
5384          RootLocale2.prototype.toString = function() {
5385            return "";
5386          };
5387          return RootLocale2;
5388        })(java2.util.Locale)
5389      );
5390      Locale2.RootLocale = RootLocale;
5391      RootLocale["__class"] = "java.util.Locale.RootLocale";
5392      var EnglishLocale = (
5393        /** @class */
5394        (function(_super) {
5395          __extends(EnglishLocale2, _super);
5396          function EnglishLocale2() {
5397            return _super.call(this) || this;
5398          }
5399          EnglishLocale2.prototype.toString = function() {
5400            return "en";
5401          };
5402          return EnglishLocale2;
5403        })(java2.util.Locale)
5404      );
5405      Locale2.EnglishLocale = EnglishLocale;
5406      EnglishLocale["__class"] = "java.util.Locale.EnglishLocale";
5407      var FrenchLocale = (
5408        /** @class */
5409        (function(_super) {
5410          __extends(FrenchLocale2, _super);
5411          function FrenchLocale2() {
5412            return _super.call(this) || this;
5413          }
5414          FrenchLocale2.prototype.toString = function() {
5415            return "fr";
5416          };
5417          return FrenchLocale2;
5418        })(java2.util.Locale)
5419      );
5420      Locale2.FrenchLocale = FrenchLocale;
5421      FrenchLocale["__class"] = "java.util.Locale.FrenchLocale";
5422      var USLocale = (
5423        /** @class */
5424        (function(_super) {
5425          __extends(USLocale2, _super);
5426          function USLocale2() {
5427            return _super.call(this) || this;
5428          }
5429          USLocale2.prototype.toString = function() {
5430            return "en_US";
5431          };
5432          return USLocale2;
5433        })(java2.util.Locale)
5434      );
5435      Locale2.USLocale = USLocale;
5436      USLocale["__class"] = "java.util.Locale.USLocale";
5437      var UKLocale = (
5438        /** @class */
5439        (function(_super) {
5440          __extends(UKLocale2, _super);
5441          function UKLocale2() {
5442            return _super.call(this) || this;
5443          }
5444          UKLocale2.prototype.toString = function() {
5445            return "en-gb";
5446          };
5447          return UKLocale2;
5448        })(java2.util.Locale)
5449      );
5450      Locale2.UKLocale = UKLocale;
5451      UKLocale["__class"] = "java.util.Locale.UKLocale";
5452      var DefaultLocale = (
5453        /** @class */
5454        (function(_super) {
5455          __extends(DefaultLocale2, _super);
5456          function DefaultLocale2() {
5457            return _super.call(this) || this;
5458          }
5459          DefaultLocale2.prototype.toString = function() {
5460            return "fr";
5461          };
5462          return DefaultLocale2;
5463        })(java2.util.Locale)
5464      );
5465      Locale2.DefaultLocale = DefaultLocale;
5466      DefaultLocale["__class"] = "java.util.Locale.DefaultLocale";
5467    }
5467)(Locale = util2.Locale || (util2.Locale = {}));
5468  })(util = java2.util || (java2.util = {}));
5469})(java || (java = {}));
5470(function(java2) {
5471  var util;
5472  (function(util2) {
5473    var Comparators = (
5474      /** @class */
5475      (function() {
5476        function Comparators2() {
5477        }
5478        Comparators2.NATURAL_$LI$ = function() {
5479          if (Comparators2.NATURAL == null) {
5480            Comparators2.NATURAL = (function(funcInst) {
5481              if (funcInst == null || typeof funcInst == "function") {
5482                return funcInst;
5483              }
5484              return function(a, b) {
5485                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
5486              };
5487            })(new Comparators2.NaturalComparator());
5488          }
5489          return Comparators2.NATURAL;
5490        };
5491        Comparators2.natural = function() {
5492          return (function(funcInst) {
5493            if (funcInst == null || typeof funcInst == "function") {
5494              return funcInst;
5495            }
5496            return function(a, b) {
5497              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
5498            };
5499          })((function(funcInst) {
5500            if (funcInst == null || typeof funcInst == "function") {
5501              return funcInst;
5502            }
5503            return function(a, b) {
5504              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
5505            };
5506          })(Comparators2.NATURAL_$LI$()));
5507        };
5508        return Comparators2;
5509      })()
5510    );
5511    util2.Comparators = Comparators;
5512    Comparators["__class"] = "java.util.Comparators";
5513    (function(Comparators2) {
5514      var NaturalComparator = (
5515        /** @class */
5516        (function() {
5517          function NaturalComparator2() {
5518          }
5519          NaturalComparator2.prototype.compare = function(o1, o2) {
5520            javaemul.internal.InternalPreconditions.checkNotNull(o1);
5521            javaemul.internal.InternalPreconditions.checkNotNull(o2);
5522            if (o1["compareTo"] === void 0) {
5523              return (
5524                /* compareTo */
5525                o1.toString().localeCompare(o2.toString())
5526              );
5527            }
5528            return o1.compareTo(o2);
5529          };
5530          return NaturalComparator2;
5531        })()
5532      );
5533      Comparators2.NaturalComparator = NaturalComparator;
5534      NaturalComparator["__class"] = "java.util.Comparators.NaturalComparator";
5535      NaturalComparator["__interfaces"] = ["java.util.Comparator"];
5536    })(Comparators = util2.Comparators || (util2.Comparators = {}));
5537  })(util = java2.util || (java2.util = {}));
5538})(java || (java = {}));
5539(function(java2) {
5540  var util;
5541  (function(util2) {
5542    var Date2 = (
5543      /** @class */
5544      (function() {
5545        function Date3(year, month, date, hrs, min, sec) {
5546          if ((typeof year === "number" || year === null) && (typeof month === "number" || month === null) && (typeof date === "number" || date === null) && (typeof hrs === "number" || hrs === null) && (typeof min === "number" || min === null) && (typeof sec === "number" || sec === null)) {
5547            var __args = arguments;
5548            if (this.jsdate === void 0) {
5549              this.jsdate = null;
5550            }
5551            this.jsdate = new (Date3.jsdateClass())();
5552            this.jsdate["setFullYear"](this.jsdate, year + 1900, month, date);
5553            this.jsdate["setHours"](this.jsdate, hrs, min, sec, 0);
5554            this.fixDaylightSavings(hrs);
5555          } else if ((typeof year === "number" || year === null) && (typeof month === "number" || month === null) && (typeof date === "number" || date === null) && (typeof hrs === "number" || hrs === null) && (typeof min === "number" || min === null) && sec === void 0) {
5556            var __args = arguments;
5557            {
5558              var __args_6 = arguments;
5559              var sec_1 = 0;
5560              if (this.jsdate === void 0) {
5561                this.jsdate = null;
5562              }
5563              this.jsdate = new (Date3.jsdateClass())();
5564              this.jsdate["setFullYear"](this.jsdate, year + 1900, month, date);
5565              this.jsdate["setHours"](this.jsdate, hrs, min, sec_1, 0);
5566              this.fixDaylightSavings(hrs);
5567            }
5568          } else if ((typeof year === "number" || year === null) && (typeof month 
5568=== "number" || month === null) && (typeof date === "number" || date === null) && hrs === void 0 && min === void 0 && sec === void 0) {
5569            var __args = arguments;
5570            {
5571              var __args_7 = arguments;
5572              var hrs_1 = 0;
5573              var min_1 = 0;
5574              var sec_2 = 0;
5575              if (this.jsdate === void 0) {
5576                this.jsdate = null;
5577              }
5578              this.jsdate = new (Date3.jsdateClass())();
5579              this.jsdate["setFullYear"](this.jsdate, year + 1900, month, date);
5580              this.jsdate["setHours"](this.jsdate, hrs_1, min_1, sec_2, 0);
5581              this.fixDaylightSavings(hrs_1);
5582            }
5583          } else if ((typeof year === "string" || year === null) && month === void 0 && date === void 0 && hrs === void 0 && min === void 0 && sec === void 0) {
5584            var __args = arguments;
5585            var date_1 = __args[0];
5586            {
5587              var __args_8 = arguments;
5588              var date_2 = Date3.parse(__args_8[0]);
5589              if (this.jsdate === void 0) {
5590                this.jsdate = null;
5591              }
5592              this.jsdate = new (Date3.jsdateClass())(date_2);
5593            }
5594          } else if ((typeof year === "number" || year === null) && month === void 0 && date === void 0 && hrs === void 0 && min === void 0 && sec === void 0) {
5595            var __args = arguments;
5596            var date_3 = __args[0];
5597            if (this.jsdate === void 0) {
5598              this.jsdate = null;
5599            }
5600            this.jsdate = new (Date3.jsdateClass())(date_3);
5601          } else if (year === void 0 && month === void 0 && date === void 0 && hrs === void 0 && min === void 0 && sec === void 0) {
5602            var __args = arguments;
5603            if (this.jsdate === void 0) {
5604              this.jsdate = null;
5605            }
5606            this.jsdate = new (Date3.jsdateClass())();
5607          } else
5608            throw new Error("invalid overload");
5609        }
5610        Date3.parse = function(s) {
5611          var parsed = Date3.jsdateClass()["parse"](s);
5612          if (
5613            /* isNaN */
5614            isNaN(parsed)
5615          ) {
5616            throw new java2.lang.IllegalArgumentException();
5617          }
5618          return (function(n) {
5619            return n < 0 ? Math.ceil(n) : Math.floor(n);
5620          })(parsed);
5621        };
5622        Date3.UTC = function(year, month, date, hrs, min, sec) {
5623          return Date3.jsdateClass()["UTC"](year + 1900, month, date, hrs, min, sec, 0);
5624        };
5625        Date3.padTwo = function(number) {
5626          if (number < 10) {
5627            return "0" + number;
5628          } else {
5629            return (
5630              /* valueOf */
5631              String(number).toString()
5632            );
5633          }
5634        };
5635        Date3.jsdateClass = function() {
5636          return window["Date"];
5637        };
5638        Date3.prototype.after = function(when) {
5639          return this.getTime() > when.getTime();
5640        };
5641        Date3.prototype.before = function(when) {
5642          return this.getTime() < when.getTime();
5643        };
5644        Date3.prototype.clone = function() {
5645          return new Date3(this.getTime());
5646        };
5647        Date3.prototype.compareTo$java_util_Date = function(other) {
5648          return (
5649            /* compare */
5650            this.getTime() - other.getTime()
5651          );
5652        };
5653        Date3.prototype.compareTo = function(other) {
5654          if (other != null && other instanceof Date3 || other === null) {
5655            return this.compareTo$java_util_Date(other);
5656          } else
5657            throw new Error("invalid overload");
5658        };
5659        Date3.prototype.equals = function(obj) {
5660          return obj != null && obj instanceof Date3 && this.getTime() === obj.getTime();
5661        };
5662        Date3.prototype.getDate = function() {
5663          return this.jsdate["getDate"](this.jsdate);
5664        };
5665        Date3.prototype.getDay = function() {
5666          return this.jsdate["getDay"](this.jsdate);
5667        };
5668        Date3.prototype.getHours = function() {
5669          return this.jsdate["getHours"](this.jsdate);
5670        };
5671        Date3.prototype.getMinutes = function() {
5672          return this.jsdate["getMinutes"](this.jsdate);
5673        };
5674        Date3.prototype.getMonth = function() {
5675          return this.jsdate["getMonth"](this.jsdate);
5676        };
5677        Date3.prototype.getSeconds = function() {
5678          return this.jsdate["getSeconds"](this.jsdate);
5679        };
5680        Date3.prototype.getTime = function() {
5681          return this.jsdate["getTime"](this.jsdate);
5682        };
5683        Date3.prototype.getTimezoneOffset = function() {
5684          return this.jsdate["getTimezoneOffset"](this.jsdate);
5685        };
5686        Date3.prototype.getYear = function() {
5687          return this.jsdate["getFullYear"](this.jsdate) - 1900;
5688        };
5689        Date3.prototype.hashCode = function() {
5690          var time = this.getTime();
5691          return time ^ time >>> 32 | 0;
5692        };
5693        Date3.prototype.setDate = function(date) {
5694          var hours = this.getHours();
5695          this.jsdate["setDate"](this.jsdate, date);
5696          this.fixDaylightSavings(hours);
5697        };
5698        Date3.prototype.setHours = function(hours) {
5699          this.jsdate["setHours"](this.jsdate, hours);
5700          this.fixDaylightSavings(hours);
5701        };
5702        Date3.prototype.setMinutes = function(minutes) {
5703          var hours = this.getHours() + (minutes / 60 | 0);
5704          this.jsdate["setMinutes"](this.jsdate, minutes);
5705          this.fixDaylightSavings(hours);
5706        };
5707        Date3.prototype.setMonth = function(month) {
5708          var hours = this.getHours();
5709          this.jsdate["setMonth"](this.jsdate, month);
5710          this.fixDaylightSavings(hours);
5711        };
5712        Date3.prototype.setSeconds = function(seconds) {
5713          var hours = this.getHours() + (seconds / (60 * 60) | 0);
5714          this.jsdate["setSeconds"](this.jsdate, seconds);
5715          this.fixDaylightSavings(hours);
5716        };
5717        Date3.prototype.setTime = function(time) {
5718          this.jsdate["setTime"](this.jsdate, time);
5719        };
5720        Date3.prototype.setYear = function(year) {
5721          var hours = this.getHours();
5722          this.jsdate["setFullYear"](this.jsdate, year + 1900);
5723          this.fixDaylightSavings(hours);
5724        };
5725        Date3.prototype.toGMTString = function() {
5726          return this.jsdate["getUTCDate"](this.jsdate) + " " + Date3.StringData.MONTHS_$LI$()[this.jsdate["getUTCMonth"](this.jsdate)] + " " + this.jsdate["getUTCFullYear"](this.jsdate) + " " + Date3.padTwo(this.jsdate["getUTCHours"](this.jsdate)) + ":" + Date3.padTwo(this.jsdate["getUTCMinutes"](this.jsdate)) + ":" + Date3.padTwo(this.jsdate["getUTCSeconds"](this.jsdate)) + " GMT";
5727        };
5728        Date3.prototype.toLocaleString = function() {
5729          return this.jsdate.toLocaleString();
5730        };
5731        Date3.prototype.toString = function() {
5732          var offset = -(this.getTimezoneOffset() | 0);
5733          var hourOffset = (offset >= 0 ? "+" : "") + (offset / 60 | 0);
5734          var minuteOffset = Date3.padTwo(Math.abs(offset) % 60);
5735          return Date3.StringData.DAYS_$LI$()[this.getDay() | 0] + " " + Date3.StringData.MONTHS_$LI$()[this.getMonth() | 0] + " " + Date3.padTwo(this.getDate() | 0) + " " + Date3.padTwo(this.getHours() | 0) + ":" + Date3.padTwo(this.getMinutes() | 0) + ":" + Date3.padTwo(this.getSeconds() | 0) + " GMT" + hourOffset + minuteOffset + " " + this.jsdate["getFullYear"](this.jsdate);
5736        };
5737        Date3.prototype.fixDaylightSavings = function(requestedHours) {
5738          requestedHours %= 24;
5739          if (this.getHours() !== requestedHours) {
5740            var copy = new (Date3.jsdateClass())(this.getTime());
5741            copy["setDate"](copy["getDate"](copy) + 1);
5742            var timeDiff = this.jsdate["getTimezoneOffset"](this.jsdate) - copy["getTimezoneOffset"](copy);
5743            if (timeDiff > 0) {
5744              var timeDiffHours = timeDiff / 60 | 0;
5745              var timeDiffMinutes = timeDiff % 60;
5746              var day = this.getDate() | 0;
5747              var badHours = this.getHours() | 0;
5748              if (badHours + timeDiffHours >= 24) {
5749                day++;
5750              }
5751              var newTime = new (Date3.jsdateClass())(this.jsdate["getFullYear"](this.jsdate), this.getMonth(), day, requestedHours + timeDiffHours, this.getMinutes() + timeDiffMinutes, this.get
5751Seconds(), this.jsdate["getMilliseconds"](this.jsdate));
5752              this.setTime(newTime["getMilliseconds"](newTime));
5753            }
5754          }
5755          var originalTimeInMillis = this.getTime();
5756          this.setTime(originalTimeInMillis + Date3.ONE_HOUR_IN_MILLISECONDS);
5757          if (this.getHours() !== requestedHours) {
5758            this.setTime(originalTimeInMillis);
5759          }
5760        };
5761        Date3.ONE_HOUR_IN_MILLISECONDS = 60 * 60 * 1e3;
5762        return Date3;
5763      })()
5764    );
5765    util2.Date = Date2;
5766    Date2["__class"] = "java.util.Date";
5767    Date2["__interfaces"] = ["java.lang.Cloneable", "java.lang.Comparable", "java.io.Serializable"];
5768    (function(Date3) {
5769      var StringData = (
5770        /** @class */
5771        (function() {
5772          function StringData2() {
5773          }
5774          StringData2.DAYS_$LI$ = function() {
5775            if (StringData2.DAYS == null) {
5776              StringData2.DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
5777            }
5778            return StringData2.DAYS;
5779          };
5780          StringData2.MONTHS_$LI$ = function() {
5781            if (StringData2.MONTHS == null) {
5782              StringData2.MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
5783            }
5784            return StringData2.MONTHS;
5785          };
5786          return StringData2;
5787        })()
5788      );
5789      Date3.StringData = StringData;
5790      StringData["__class"] = "java.util.Date.StringData";
5791    })(Date2 = util2.Date || (util2.Date = {}));
5792  })(util = java2.util || (java2.util = {}));
5793})(java || (java = {}));
5794(function(java2) {
5795  var util;
5796  (function(util2) {
5797    var logging;
5798    (function(logging2) {
5799      var Handler = (
5800        /** @class */
5801        (function() {
5802          function Handler2() {
5803            if (this.formatter === void 0) {
5804              this.formatter = null;
5805            }
5806            if (this.level === void 0) {
5807              this.level = null;
5808            }
5809          }
5810          Handler2.prototype.getFormatter = function() {
5811            return this.formatter;
5812          };
5813          Handler2.prototype.getLevel = function() {
5814            if (this.level != null) {
5815              return this.level;
5816            }
5817            return java2.util.logging.Level.ALL_$LI$();
5818          };
5819          Handler2.prototype.isLoggable = function(record) {
5820            return this.getLevel().intValue() <= record.getLevel().intValue();
5821          };
5822          Handler2.prototype.setFormatter = function(newFormatter) {
5823            this.formatter = newFormatter;
5824          };
5825          Handler2.prototype.setLevel = function(newLevel) {
5826            this.level = newLevel;
5827          };
5828          return Handler2;
5829        })()
5830      );
5831      logging2.Handler = Handler;
5832      Handler["__class"] = "java.util.logging.Handler";
5833    })(logging = util2.logging || (util2.logging = {}));
5834  })(util = java2.util || (java2.util = {}));
5835})(java || (java = {}));
5836(function(java2) {
5837  var util;
5838  (function(util2) {
5839    var logging;
5840    (function(logging2) {
5841      var LogRecord = (
5842        /** @class */
5843        (function() {
5844          function LogRecord2(level, msg) {
5845            if ((level != null && level instanceof java2.util.logging.Level || level === null) && (typeof msg === "string" || msg === null)) {
5846              var __args = arguments;
5847              if (this.level === void 0) {
5848                this.level = null;
5849              }
5850              if (this.msg === void 0) {
5851                this.msg = null;
5852              }
5853              if (this.millis === void 0) {
5854                this.millis = 0;
5855              }
5856              this.loggerName = "";
5857              this.thrown = null;
5858              this.level = level;
5859              this.msg = msg;
5860              this.millis = java2.lang.System.currentTimeMillis();
5861            } else if (level === void 0 && msg === void 0) {
5862              var __args = arguments;
5863              if (this.level === void 0) {
5864                this.level = null;
5865              }
5866              if (this.msg === void 0) {
5867                this.msg = null;
5868              }
5869              if (this.millis === void 0) {
5870                this.millis = 0;
5871              }
5872              this.loggerName = "";
5873              this.thrown = null;
5874            } else
5875              throw new Error("invalid overload");
5876          }
5877          LogRecord2.prototype.getLevel = function() {
5878            return this.level;
5879          };
5880          LogRecord2.prototype.getLoggerName = function() {
5881            return this.loggerName;
5882          };
5883          LogRecord2.prototype.getMessage = function() {
5884            return this.msg;
5885          };
5886          LogRecord2.prototype.getMillis = function() {
5887            return this.millis;
5888          };
5889          LogRecord2.prototype.getThrown = function() {
5890            return this.thrown;
5891          };
5892          LogRecord2.prototype.setLevel = function(newLevel) {
5893            this.level = newLevel;
5894          };
5895          LogRecord2.prototype.setLoggerName = function(newName) {
5896            this.loggerName = newName;
5897          };
5898          LogRecord2.prototype.setMessage = function(newMessage) {
5899            this.msg = newMessage;
5900          };
5901          LogRecord2.prototype.setMillis = function(newMillis) {
5902            this.millis = newMillis;
5903          };
5904          LogRecord2.prototype.setThrown = function(newThrown) {
5905            this.thrown = newThrown;
5906          };
5907          return LogRecord2;
5908        })()
5909      );
5910      logging2.LogRecord = LogRecord;
5911      LogRecord["__class"] = "java.util.logging.LogRecord";
5912      LogRecord["__interfaces"] = ["java.io.Serializable"];
5913    })(logging = util2.logging || (util2.logging = {}));
5914  })(util = java2.util || (java2.util = {}));
5915})(java || (java = {}));
5916(function(java2) {
5917  var util;
5918  (function(util2) {
5919    var logging;
5920    (function(logging2) {
5921      var LogManager = (
5922        /** @class */
5923        (function() {
5924          function LogManager2() {
5925            this.loggerMap = new java2.util.HashMap();
5926          }
5927          LogManager2.getLogManager = function() {
5928            if (LogManager2.singleton == null) {
5929              LogManager2.singleton = new LogManager2();
5930              var rootLogger = new java2.util.logging.Logger("", null);
5931              rootLogger.setLevel(java2.util.logging.Level.INFO_$LI$());
5932              LogManager2.singleton.addLoggerImpl(rootLogger);
5933            }
5934            return LogManager2.singleton;
5935          };
5936          LogManager2.prototype.addLogger = function(logger) {
5937            if (this.getLogger(logger.getName()) != null) {
5938              return false;
5939            }
5940            this.addLoggerAndEnsureParents(logger);
5941            return true;
5942          };
5943          LogManager2.prototype.getLogger = function(name) {
5944            return this.loggerMap.get(name);
5945          };
5946          LogManager2.prototype.getLoggerNames = function() {
5947            return java2.util.Collections.enumeration(this.loggerMap.keySet());
5948          };
5949          LogManager2.prototype.addLoggerAndEnsureParents = function(logger) {
5950            var name = logger.getName();
5951            var parentName = name.substring(0, Math.max(0, name.lastIndexOf(".")));
5952            logger.setParent(this.ensureLogger(parentName));
5953            this.addLoggerImpl(logger);
5954          };
5955          LogManager2.prototype.addLoggerImpl = function(logger) {
5956            if (java2.lang.System.getProperty$java_lang_String$java_lang_String("gwt.logging.simpleConsoleHandler", "ENABLED") === "ENABLED") {
5957              if (
5958                /* isEmpty */
5959                logger.getName().length === 0
5960              ) {
5961                logger.addHandler(new java2.util.logging.SimpleConsoleLogHandler());
5962              }
5963            }
5964            this.loggerMap.put(logger.getName(), logger);
5965          };
5966          LogManager2.prototype.ensureLogger = function(name) {
5967            var logger = this.getLogger(name);
5968            if (logger == null) {
5969              var newLogger = new java2.util.logging.Logger(name, null);
5970              this.addLoggerAndEnsureParents(newLogger);
5971              return newLogger;
5972            }
5973            return logger;
5974          };
5975          LogManager2.singleton = null;
5976          return LogManager2;
5977        })()
5978      );
5979      logging2.LogManager = LogManager;
5980      LogManager["__class"] = "java.util.logging.LogManager";
5981    })(logging = util2.logging || (util2.logging = {}));
5982  })(util = java2.util || (java2.util = {}));
5983})(java || (java = {}));
5984(function(java2) {
5985  var util;
5986  (function(util2) {
5987    var logging;
5988    (function(logging2) {
5989      var Formatter = (
5990        /** @class */
5991        (function() {
5992          function Formatter2() {
5993          }
5994          Formatter2.prototype.formatMessage = function(record) {
5995            return this.format(record);
5996          };
5997          return Formatter2;
5998        })()
5999      );
6000      logging2.Formatter = Formatter;
6001      Formatter["__class"] = "java.util.logging.Formatter";
6002    })(logging = util2.logging || (util2.logging = {}));
6003  })(util = java2.util || (java2.util = {}));
6004})(java || (java = {}));
6005(function(java2) {
6006  var util;
6007  (function(util2) {
6008    var logging;
6009    (function(logging2) {
6010      var Level = (
6011        /** @class */
6012        (function() {
6013          function Level2() {
6014          }
6015          Level2.ALL_$LI$ = function() {
6016            if (Level2.ALL == null) {
6017              Level2.ALL = new Level2.LevelAll();
6018            }
6019            return Level2.ALL;
6020          };
6021          Level2.CONFIG_$LI$ = function() {
6022            if (Level2.CONFIG == null) {
6023              Level2.CONFIG = new Level2.LevelConfig();
6024            }
6025            return Level2.CONFIG;
6026          };
6027          Level2.FINE_$LI$ = function() {
6028            if (Level2.FINE == null) {
6029              Level2.FINE = new Level2.LevelFine();
6030            }
6031            return Level2.FINE;
6032          };
6033          Level2.FINER_$LI$ = function() {
6034            if (Level2.FINER == null) {
6035              Level2.FINER = new Level2.LevelFiner();
6036            }
6037            return Level2.FINER;
6038          };
6039          Level2.FINEST_$LI$ = function() {
6040            if (Level2.FINEST == null) {
6041              Level2.FINEST = new Level2.LevelFinest();
6042            }
6043            return Level2.FINEST;
6044          };
6045          Level2.INFO_$LI$ = function() {
6046            if (Level2.INFO == null) {
6047              Level2.INFO = new Level2.LevelInfo();
6048            }
6049            return Level2.INFO;
6050          };
6051          Level2.OFF_$LI$ = function() {
6052            if (Level2.OFF == null) {
6053              Level2.OFF = new Level2.LevelOff();
6054            }
6055            return Level2.OFF;
6056          };
6057          Level2.SEVERE_$LI$ = function() {
6058            if (Level2.SEVERE == null) {
6059              Level2.SEVERE = new Level2.LevelSevere();
6060            }
6061            return Level2.SEVERE;
6062          };
6063          Level2.WARNING_$LI$ = function() {
6064            if (Level2.WARNING == null) {
6065              Level2.WARNING = new Level2.LevelWarning();
6066            }
6067            return Level2.WARNING;
6068          };
6069          Level2.parse = function(name) {
6070            java2.util.logging.Logger.assertLoggingValues();
6071            var loggingDisabled = java2.lang.System.getProperty$java_lang_String$java_lang_String("gwt.logging.enabled", "FALSE") === "FALSE";
6072            if (loggingDisabled) {
6073              return null;
6074            }
6075            var value = name.toUpperCase();
6076            switch (value) {
6077              case "ALL":
6078                return Level2.ALL_$LI$();
6079              case "CONFIG":
6080                return Level2.CONFIG_$LI$();
6081              case "FINE":
6082                return Level2.FINE_$LI$();
6083              case "FINER":
6084                return Level2.FINER_$LI$();
6085              case "FINEST":
6086                return Level2.FINEST_$LI$();
6087              case "INFO":
6088                return Level2.INFO_$LI$();
6089              case "OFF":
6090                return Level2.OFF_$LI$();
6091              case "SEVERE":
6092                return Level2.SEVERE_$LI$();
6093              case "WARNING":
6094                return Level2.WARNING_$LI$();
6095              default:
6096                throw new java2.lang.IllegalArgumentException('Invalid level "' + name + '"');
6097            }
6098          };
6099          Level2.prototype.getName = function() {
6100            return "DUMMY";
6101          };
6102          Level2.prototype.intValue = function() {
6103            return -1;
6104          };
6105          Level2.prototype.toString = function() {
6106            return this.getName();
6107          };
6108          return Level2;
6109        })()
6110      );
6111      logging2.Level = Level;
6112      Level["__class"] = "java.util.logging.Level";
6113      Level["__interfaces"] = ["java.io.Serializable"];
6114      (function(Level2) {
6115        var LevelAll = (
6116          /** @class */
6117          (function(_super) {
6118            __extends(LevelAll2, _super);
6119            function LevelAll2() {
6120              return _super.call(this) || this;
6121            }
6122            LevelAll2.prototype.getName = function() {
6123              return "ALL";
6124            };
6125            LevelAll2.prototype.intValue = function() {
6126              return javaemul.internal.IntegerHelper.MIN_VALUE;
6127            };
6128            return LevelAll2;
6129          })(java2.util.logging.Level)
6130        );
6131        Level2.LevelAll = LevelAll;
6132        LevelAll["__class"] = "java.util.logging.Level.LevelAll";
6133        LevelAll["__interfaces"] = ["java.io.Serializable"];
6134        var LevelConfig = (
6135          /** @class */
6136          (function(_super) {
6137            __extends(LevelConfig2, _super);
6138            function LevelConfig2() {
6139              return _super.call(this) || this;
6140            }
6141            LevelConfig2.prototype.getName = function() {
6142              return "CONFIG";
6143            };
6144            LevelConfig2.prototype.intValue = function() {
6145              return 700;
6146            };
6147            return LevelConfig2;
6148          })(java2.util.logging.Level)
6149        );
6150        Level2.LevelConfig = LevelConfig;
6151        LevelConfig["__class"] = "java.util.logging.Level.LevelConfig";
6152        LevelConfig["__interfaces"] = ["java.io.Serializable"];
6153        var LevelFine = (
6154          /** @class */
6155          (function(_super) {
6156            __extends(LevelFine2, _super);
6157            function LevelFine2() {
6158              return _super.call(this) || this;
6159            }
6160            LevelFine2.prototype.getName = function() {
6161              return "FINE";
6162            };
6163            LevelFine2.prototype.intValue = function() {
6164              return 500;
6165            };
6166            return LevelFine2;
6167          })(java2.util.logging.Level)
6168        );
6169        Level2.LevelFine = LevelFine;
6170        LevelFine["__class"] = "java.util.logging.Level.LevelFine";
6171        LevelFine["__interfaces"] = ["java.io.Serializable"];
6172        var LevelFiner = (
6173          /** @class */
6174          (function(_super) {
6175            __extends(LevelFiner2, _super);
6176            function LevelFiner2() {
6177              return _super.call(this) || this;
6178            }
6179            LevelFiner2.prototype.getName = function() {
6180              return "FINER";
6181            };
6182            LevelFiner2.prototype.intValue = function() {
6183              return 400;
6184            };
6185            return LevelFiner2;
6186          })(java2.util.logging.Level)
6187        );
6188        Level2.LevelFiner = LevelFiner;
6189        LevelFiner["__class"] = "java.util.logging.Level.LevelFiner";
6190        LevelFiner["__interfaces"] = ["java.io.Serializable"];
6191        var LevelFinest = (
6192          /** @class */
6193          (function(_super) {
6194            __extends(LevelFinest2, _super);
6195            function LevelFinest2() {
6196              return _super.call(this) || this;
6197            }
6198            LevelFinest2.prototype.getName = function() {
6199              return "FINEST";
6200            };
6201            LevelFinest2.prototype.intValue = function() {
6202              return 300;
6203            };
6204            return LevelFinest2;
6205          })(java2.util.logging.Level)
6206        );
6207        Level2.LevelFinest = LevelFinest;
6208        LevelFinest["__class"] = "java.util.logging.Level.LevelFinest";
6209        LevelFinest["__interfaces"] = ["java.io.Serializable"];
6210        var LevelInfo = (
6211          /** @class */
6212          (function(_super) {
6213            __extends(LevelInfo2, _super);
6214            function LevelInfo2() {
6215              return _super.call(this) || this;
6216            }
6217            LevelInfo2.prototype.getName = function() {
6218              return "INFO";
6219            };
6220            LevelInfo2.prototype.intValue = function() {
6221              return 800;
6222            };
6223            return LevelInfo2;
6224          })(java2.util.logging.Level)
6225        );
6226        Level2.LevelInfo = LevelInfo;
6227        LevelInfo["__class"] = "java.util.logging.Level.LevelInfo";
6228        LevelInfo["__interfaces"] = ["java.io.Serializable"];
6229        var LevelOff = (
6230          /** @class */
6231          (function(_super) {
6232            __extends(LevelOff2, _super);
6233            function LevelOff2() {
6234              return _super.call(this) || this;
6235            }
6236            LevelOff2.prototype.getName = function() {
6237              return "OFF";
6238            };
6239            LevelOff2.prototype.intValue = function() {
6240              return javaemul.internal.IntegerHelper.MAX_VALUE;
6241            };
6242            return LevelOff2;
6243          })(java2.util.logging.Level)
6244        );
6245        Level2.LevelOff = LevelOff;
6246        LevelOff["__class"] = "java.util.logging.Level.LevelOff";
6247        LevelOff["__interfaces"] = ["java.io.Serializable"];
6248        var LevelSevere = (
6249          /** @class */
6250          (function(_super) {
6251            __extends(LevelSevere2, _super);
6252            function LevelSevere2() {
6253              return _super.call(this) || this;
6254            }
6255            LevelSevere2.prototype.getName = function() {
6256              return "SEVERE";
6257            };
6258            LevelSevere2.prototype.intValue = function() {
6259              return 1e3;
6260            };
6261            return LevelSevere2;
6262          })(java2.util.logging.Level)
6263        );
6264        Level2.LevelSevere = LevelSevere;
6265        LevelSevere["__class"] = "java.util.logging.Level.LevelSevere";
6266        LevelSevere["__interfaces"] = ["java.io.Serializable"];
6267        var LevelWarning = (
6268          /** @class */
6269          (function(_super) {
6270            __extends(LevelWarning2, _super);
6271            function LevelWarning2() {
6272              return _super.call(this) || this;
6273            }
6274            LevelWarning2.prototype.getName = function() {
6275              return "WARNING";
6276            };
6277            LevelWarning2.prototype.intValue = function() {
6278              return 900;
6279            };
6280            return LevelWarning2;
6281          })(java2.util.logging.Level)
6282        );
6283        Level2.LevelWarning = LevelWarning;
6284        LevelWarning["__class"] = "java.util.logging.Level.LevelWarning";
6285        LevelWarning["__interfaces"] = ["java.io.Serializable"];
6286      })(Level = logging2.Level || (logging2.Level = {}));
6287    })(logging = util2.logging || (util2.logging = {}));
6288  })(util = java2.util || (java2.util = {}));
6289})(java || (java = {}));
6290(function(java2) {
6291  var util;
6292  (function(util2) {
6293    var StringJoiner = (
6294      /** @class */
6295      (function() {
6296        function StringJoiner2(delimiter, prefix, suffix) {
6297          if ((delimiter != null && (delimiter.constructor != null && delimiter.constructor["__interfaces"] != null && delimiter.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof delimiter === "string") || delimiter === null) && (prefix != null && (prefix.constructor != null && prefix.constructor["__interfaces"] != null && prefix.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof prefix === "string") || prefix === null) && (suffix != null && (suffix.constructor != null && suffix.constructor["__interfaces"] != null && suffix.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof suffix === "string") || suffix === null)) {
6298            var __args = arguments;
6299            if (this.delimiter === void 0) {
6300              this.delimiter = null;
6301            }
6302            if (this.prefix === void 0) {
6303              this.prefix = null;
6304            }
6305            if (this.suffix === void 0) {
6306              this.suffix = null;
6307            }
6308            if (this.builder === void 0) {
6309              this.builder = null;
6310            }
6311            if (this.emptyValue === void 0) {
6312              this.emptyValue = null;
6313            }
6314            javaemul.internal.InternalPreconditions.checkNotNull(delimiter, "delimiter");
6315            javaemul.internal.InternalPreconditions.checkNotNull(prefix, "prefix");
6316            javaemul.internal.InternalPreconditions.checkNotNull(suffix, "suffix");
6317            this.delimiter = delimiter.toString();
6318            this.prefix = prefix.toString();
6319            this.suffix = suffix.toString();
6320            this.emptyValue = this.prefix + this.suffix;
6321          } else if ((delimiter != null && (delimiter.constructor != null && delimiter.constructor["__interfaces"] != null && delimiter.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof delimiter === "string") || delimiter === null) && prefix === void 0 && suffix === void 0) {
6322            var __args = arguments;
6323            {
6324              var __args_9 = arguments;
6325              var prefix_1 = "";
6326              var suffix_1 = "";
6327              if (this.delimiter === void 0) {
6328                this.delimiter = null;
6329              }
6330              if (this.prefix === void 0) {
6331                this.prefix = null;
6332              }
6333              if (this.suffix === void 0) {
6334                this.suffix = null;
6335              }
6336              if (this.builder === void 0) {
6337                this.builder = null;
6338              }
6339              if (this.emptyValue === void 0) {
6340                this.emptyValue = null;
6341              }
6342              javaemul.internal.InternalPreconditions.checkNotNull(delimiter, "delimiter");
6343              javaemul.internal.InternalPreconditions.checkNotNull(prefix_1, "prefix");
6344              javaemul.internal.InternalPreconditions.checkNotNull(suffix_1, "suffix");
6345              this.delimiter = delimiter.toString();
6346              this.prefix = prefix_1.toString();
6347              this.suffix = suffix_1.toString();
6348              this.emptyValue = this.prefix + this.suffix;
6349            }
6350          } else
6351            throw new Error("invalid overload");
6352        }
6353        StringJoiner2.prototype.add = function(newElement) {
6354          this.initBuilderOrAddDelimiter();
6355          this.builder.append$java_lang_CharSequence(newElement);
6356          return this;
6357        };
6358        StringJoiner2.prototype.length = function() {
6359          if (this.builder == null) {
6360            return this.emptyValue.length;
6361          }
6362          return this.builder.length() + this.suffix.length;
6363        };
6364        StringJoiner2.prototype.merge = function(other) {
6365          if (other.builder != null) {
6366            var otherLength = other.builder.length();
6367            this.initBuilderOrAddDelimiter();
6368            this.builder.append$java_lang_CharSequence$int$int(other.builder, other.prefix.length, otherLength);
6369          }
6370          return this;
6371        };
6372        StringJoiner2.prototype.setEmptyValue = function(emptyValue) {
6373          javaemul.internal.InternalPreconditions.checkNotNull(emptyValue);
6374          this.emptyValue = emptyValue.toString();
6375          return this;
6376        };
6377        StringJoiner2.prototype.toString = function() {
6378          if (this.builder == null) {
6379            return this.emptyValue;
6380          } else if (
6381            /* isEmpty */
6382            this.suffix.length === 0
6383          ) {
6384            return this.builder.toString();
6385          } else {
6386            return this.builder.toString() + this.suffix;
6387          }
6388        };
6389        StringJoiner2.prototype.initBuilderOrAddDelimiter = function() {
6390          if (this.builder == null) {
6391            this.builder = new java2.lang.StringBuilder(this.prefix);
6392          } else {
6393            this.builder.append$java_lang_String(this.delimiter);
6394          }
6395        };
6396        return StringJoiner2;
6397      })()
6398    );
6399    util2.StringJoiner = StringJoiner;
6400    StringJoiner["__class"] = "java.util.StringJoiner";
6401  })(util = java2.util || (java2.util = {}));
6402})(java || (java = {}));
6403(function(java2) {
6404  var util;
6405  (function(util2) {
6406    var AbstractMapEntry = (
6407      /** @class */
6408      (function() {
6409        function AbstractMapEntry2() {
6410        }
6411        AbstractMapEntry2.prototype.equals = function(other) {
6412          if (!(other != null && (other.constructor != null && other.constructor["__interfaces"] != null && other.constructor["__interfaces"].indexOf("java.util.Map.Entry") >= 0))) {
6413            return false;
6414          }
6415          var entry = other;
6416          return java2.util.Objects.equals(this.getKey(), entry.getKey()) && java2.util.Objects.equals(this.getValue(), entry.getValue());
6417        };
6418        AbstractMapEntry2.prototype.hashCode = function() {
6419          return java2.util.Objects.hashCode(this.getKey()) ^ java2.util.Objects.hashCode(this.getValue());
6420        };
6421        AbstractMapEntry2.prototype.toString = function() {
6422          return this.getKey() + "=" + this.getValue();
6423        };
6424        return AbstractMapEntry2;
6425      })()
6426    );
6427    util2.AbstractMapEntry = AbstractMapEntry;
6428    AbstractMapEntry["__class"] = "java.util.AbstractMapEntry";
6429    AbstractMapEntry["__interfaces"] = ["java.util.Map.Entry"];
6430  })(util = java2.util || (java2.util = {}));
6431})(java || (java = {}));
6432(function(java2) {
6433  var security;
6434  (function(security2) {
6435    var MessageDigestSpi = (
6436      /** @class */
6437      (function() {
6438        function MessageDigestSpi2() {
6439        }
6440        MessageDigestSpi2.prototype.engineDigest$ = function() {
6441          throw new Error("cannot invoke abstract overloaded method... check your argument(s) type(s)");
6442        };
6443        MessageDigestSpi2.prototype.engineDigest$byte_A$int$int = function(buf, offset, len) {
6444          var digest = this.engineDigest$();
6445          if (buf.length < digest.length + offset) {
6446            throw new java2.security.DigestException("Insufficient buffer space for digest");
6447          }
6448          if (len < digest.length) {
6449            throw new java2.security.DigestException("Length not large enough to hold digest");
6450          }
6451          java2.lang.System.arraycopy(digest, 0, buf, offset, digest.length);
6452          return digest.length;
6453        };
6454        MessageDigestSpi2.prototype.engineDigest = function(buf, offset, len) {
6455          if ((buf != null && buf instanceof Array && (buf.length == 0 || buf[0] == null || typeof buf[0] === "number") || buf === null) && (typeof offset === "number" || offset === null) && (typeof len === "
6455number" || len === null)) {
6456            return this.engineDigest$byte_A$int$int(buf, offset, len);
6457          } else if (buf === void 0 && offset === void 0 && len === void 0) {
6458            return this.engineDigest$();
6459          } else
6460            throw new Error("invalid overload");
6461        };
6462        MessageDigestSpi2.prototype.engineGetDigestLength = function() {
6463          return 0;
6464        };
6465        MessageDigestSpi2.prototype.engineUpdate$byte = function(input) {
6466          throw new Error("cannot invoke abstract overloaded method... check your argument(s) type(s)");
6467        };
6468        MessageDigestSpi2.prototype.engineUpdate$byte_A$int$int = function(input, offset, len) {
6469          throw new Error("cannot invoke abstract overloaded method... check your argument(s) type(s)");
6470        };
6471        MessageDigestSpi2.prototype.engineUpdate = function(input, offset, len) {
6472          if ((input != null && input instanceof Array && (input.length == 0 || input[0] == null || typeof input[0] === "number") || input === null) && (typeof offset === "number" || offset === null) && (typeof len === "
6472number" || len === null)) {
6473            return this.engineUpdate$byte_A$int$int(input, offset, len);
6474          } else if ((typeof input === "number" || input === null) && offset === void 0 && len === void 0) {
6475            return this.engineUpdate$byte(input);
6476          } else
6477            throw new Error("invalid overload");
6478        };
6479        return MessageDigestSpi2;
6480      })()
6481    );
6482    security2.MessageDigestSpi = MessageDigestSpi;
6483    MessageDigestSpi["__class"] = "java.security.MessageDigestSpi";
6484  })(security = java2.security || (java2.security = {}));
6485})(java || (java = {}));
6486(function(java2) {
6487  var io;
6488  (function(io2) {
6489    var IOUtils = (
6490      /** @class */
6491      (function() {
6492        function IOUtils2() {
6493        }
6494        IOUtils2.checkOffsetAndCount$byte_A$int$int = function(buffer, byteOffset, byteCount) {
6495          javaemul.internal.InternalPreconditions.checkNotNull(buffer);
6496          IOUtils2.checkOffsetAndCount$int$int$int(buffer.length, byteOffset, byteCount);
6497        };
6498        IOUtils2.checkOffsetAndCount = function(buffer, byteOffset, byteCount) {
6499          if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && (typeof byteOffset === "number" || byteOffset === null) && (typeof byteCount === "number" || byteCount === null)) {
6500            return java2.io.IOUtils.checkOffsetAndCount$byte_A$int$int(buffer, byteOffset, byteCount);
6501          } else if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "string") || buffer === null) && (typeof byteOffset === "number" || byteOffset === null) && (typeof byteCount === "number" || byteCount === null)) {
6502            return java2.io.IOUtils.checkOffsetAndCount$char_A$int$int(buffer, byteOffset, byteCount);
6503          } else if ((typeof buffer === "number" || buffer === null) && (typeof byteOffset === "number" || byteOffset === null) && (typeof byteCount === "number" || byteCount === null)) {
6504            return java2.io.IOUtils.checkOffsetAndCount$int$int$int(buffer, byteOffset, byteCount);
6505          } else
6506            throw new Error("invalid overload");
6507        };
6508        IOUtils2.checkOffsetAndCount$char_A$int$int = function(buffer, charOffset, charCount) {
6509          javaemul.internal.InternalPreconditions.checkNotNull(buffer);
6510          IOUtils2.checkOffsetAndCount$int$int$int(buffer.length, charOffset, charCount);
6511        };
6512        IOUtils2.checkOffsetAndCount$int$int$int = function(length, offset, count) {
6513          if (offset < 0 || count < 0 || offset + count > length) {
6514            throw new java2.lang.IndexOutOfBoundsException();
6515          }
6516        };
6517        return IOUtils2;
6518      })()
6519    );
6520    io2.IOUtils = IOUtils;
6521    IOUtils["__class"] = "java.io.IOUtils";
6522  })(io = java2.io || (java2.io = {}));
6523})(java || (java = {}));
6524(function(java2) {
6525  var io;
6526  (function(io2) {
6527    var Writer = (
6528      /** @class */
6529      (function() {
6530        function Writer2(lock) {
6531          if (lock != null || lock === null) {
6532            var __args = arguments;
6533            if (this.writeBuffer === void 0) {
6534              this.writeBuffer = null;
6535            }
6536            if (this.lock === void 0) {
6537              this.lock = null;
6538            }
6539            if (lock == null) {
6540              throw new java2.lang.NullPointerException();
6541            }
6542            this.lock = lock;
6543          } else if (lock === void 0) {
6544            var __args = arguments;
6545            if (this.writeBuffer === void 0) {
6546              this.writeBuffer = null;
6547            }
6548            if (this.lock === void 0) {
6549              this.lock = null;
6550            }
6551            this.lock = this;
6552          } else
6553            throw new Error("invalid overload");
6554        }
6555        Writer2.prototype.write$int = function(c) {
6556          {
6557            if (this.writeBuffer == null) {
6558              this.writeBuffer = (function(s) {
6559                var a = [];
6560                while (s-- > 0)
6561                  a.push(null);
6562                return a;
6563              })(Writer2.WRITE_BUFFER_SIZE);
6564            }
6565            this.writeBuffer[0] = String.fromCharCode(c);
6566            this.write$char_A$int$int(this.writeBuffer, 0, 1);
6567          }
6568          ;
6569        };
6570        Writer2.prototype.write$char_A = function(cbuf) {
6571          this.write$char_A$int$int(cbuf, 0, cbuf.length);
6572        };
6573        Writer2.prototype.write$char_A$int$int = function(cbuf, off, len) {
6574          throw new Error("cannot invoke abstract overloaded method... check your argument(s) type(s)");
6575        };
6576        Writer2.prototype.write$java_lang_String = function(str) {
6577          this.write$java_lang_String$int$int(str, 0, str.length);
6578        };
6579        Writer2.prototype.write$java_lang_String$int$int = function(str, off, len) {
6580          {
6581            var cbuf = void 0;
6582            if (len <= Writer2.WRITE_BUFFER_SIZE) {
6583              if (this.writeBuffer == null) {
6584                this.writeBuffer = (function(s) {
6585                  var a = [];
6586                  while (s-- > 0)
6587                    a.push(null);
6588                  return a;
6589                })(Writer2.WRITE_BUFFER_SIZE);
6590              }
6591              cbuf = this.writeBuffer;
6592            } else {
6593              cbuf = (function(s) {
6594                var a = [];
6595                while (s-- > 0)
6596                  a.push(null);
6597                return a;
6598              })(len);
6599            }
6600            (function(a, s, e, d, l) {
6601              d.splice.apply(d, [l, e - s].concat(a.substring(s, e).split("")));
6602            })(str, off, off + len, cbuf, 0);
6603            this.write$char_A$int$int(cbuf, 0, len);
6604          }
6605          ;
6606        };
6607        Writer2.prototype.write = function(str, off, len) {
6608          if ((typeof str === "string" || str === null) && (typeof off === "number" || off === null) && (typeof len === "
6608number" || len === null)) {
6609            return this.write$java_lang_String$int$int(str, off, len);
6610          } else if ((str != null && str instanceof Array && (str.length == 0 || str[0] == null || typeof str[0] === "string") || str === null) && (typeof off === "number" || off === null) && (typeof len === "number" || len === null)) {
6611            return this.write$char_A$int$int(str, off, len);
6612          } else if ((str != null && str instanceof Array && (str.length == 0 || str[0] == null || typeof str[0] === "string") || str === null) && off === void 0 && len === void 0) {
6613            return this.write$char_A(str);
6614          } else if ((typeof str === "string" || str === null) && off === void 0 && len === void 0) {
6615            return this.write$java_lang_String(str);
6616          } else if ((typeof str === "number" || str === null) && off === void 0 && len === void 0) {
6617            return this.write$int(str);
6618          } else
6619            throw new Error("invalid overload");
6620        };
6621        Writer2.prototype.append$java_lang_CharSequence = function(csq) {
6622          if (csq == null)
6623            this.write$java_lang_String("null");
6624          else
6625            this.write$java_lang_String(csq.toString());
6626          return this;
6627        };
6628        Writer2.prototype.append$java_lang_CharSequence$int$int = function(csq, start, end) {
6629          var cs = csq == null ? "null" : csq;
6630          this.write$java_lang_String(
6631            /* subSequence */
6632            cs.substring(start, end).toString()
6633          );
6634          return this;
6635        };
6636        Writer2.prototype.append = function(csq, start, end) {
6637          if ((csq != null && (csq.constructor != null && csq.constructor["__interfaces"] != null && csq.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof csq === "string") || csq === null) && (typeof start === "number" || start === null) && (typeof end === "number" || end === null)) {
6638            return this.append$java_lang_CharSequence$int$int(csq, start, end);
6639          } else if ((csq != null && (csq.constructor != null && csq.constructor["__interfaces"] != null && csq.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof csq === "string") || csq === null) && start === void 0 && end === void 0) {
6640            return this.append$java_lang_CharSequence(csq);
6641          } else if ((typeof csq === "string" || csq === null) && start === void 0 && end === void 0) {
6642            return this.append$char(csq);
6643          } else
6644            throw new Error("invalid overload");
6645        };
6646        Writer2.prototype.append$char = function(c) {
6647          this.write$int(c.charCodeAt(0));
6648          return this;
6649        };
6650        Writer2.WRITE_BUFFER_SIZE = 1024;
6651        return Writer2;
6652      })()
6653    );
6654    io2.Writer = Writer;
6655    Writer["__class"] = "java.io.Writer";
6656    Writer["__interfaces"] = ["java.lang.Appendable", "java.io.Closeable", "java.lang.AutoCloseable", "java.io.Flushable"];
6657  })(io = java2.io || (java2.io = {}));
6658})(java || (java = {}));
6659(function(java2) {
6660  var io;
6661  (function(io2) {
6662    var InputStream = (
6663      /** @class */
6664      (function() {
6665        function InputStream2() {
6666        }
6667        InputStream2.prototype.available = function() {
6668          return 0;
6669        };
6670        InputStream2.prototype.close = function() {
6671        };
6672        InputStream2.prototype.mark = function(readlimit) {
6673        };
6674        InputStream2.prototype.markSupported = function() {
6675          return false;
6676        };
6677        InputStream2.prototype.read$ = function() {
6678          throw new Error("cannot invoke abstract overloaded method... check your argument(s) type(s)");
6679        };
6680        InputStream2.prototype.read$byte_A = function(buffer) {
6681          javaemul.internal.InternalPreconditions.checkNotNull(buffer);
6682          return this.read$byte_A$int$int(buffer, 0, buffer.length);
6683        };
6684        InputStream2.prototype.read$byte_A$int$int = function(buffer, byteOffset, byteCount) {
6685          java2.io.IOUtils.checkOffsetAndCount$byte_A$int$int(buffer, byteOffset, byteCount);
6686          for (var i = 0; i < byteCount; ++i) {
6687            {
6688              var c = void 0;
6689              try {
6690                if ((c = this.read$()) === -1) {
6691                  return i === 0 ? -1 : i;
6692                }
6693              } catch (e) {
6694                if (i !== 0) {
6695                  return i;
6696                }
6697                throw e;
6698              }
6699              buffer[byteOffset + i] = c | 0;
6700            }
6701            ;
6702          }
6703          return byteCount;
6704        };
6705        InputStream2.prototype.read = function(buffer, byteOffset, byteCount) {
6706          if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "
6706number") || buffer === null) && (typeof byteOffset === "number" || byteOffset === null) && (typeof byteCount === "number" || byteCount === null)) {
6707            return this.read$byte_A$int$int(buffer, byteOffset, byteCount);
6708          } else if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && byteOffset === void 0 && byteCount === void 0) {
6709            return this.read$byte_A(buffer);
6710          } else if (buffer === void 0 && byteOffset === void 0 && byteCount === void 0) {
6711            return this.read$();
6712          } else
6713            throw new Error("invalid overload");
6714        };
6715        InputStream2.prototype.reset = function() {
6716          throw new java2.io.IOException();
6717        };
6718        InputStream2.prototype.skip = function(byteCount) {
6719          if (byteCount <= 0) {
6720            return 0;
6721          }
6722          var bSize = Math.min(InputStream2.MAX_SKIP_BUFFER_SIZE, byteCount) | 0;
6723          var b = (function(s) {
6724            var a = [];
6725            while (s-- > 0)
6726              a.push(0);
6727            return a;
6728          })(bSize);
6729          var skipped = 0;
6730          while (skipped < byteCount) {
6731            {
6732              var toRead = Math.min(byteCount - skipped, b.length) | 0;
6733              var readCount = this.read$byte_A$int$int(b, 0, toRead);
6734              if (readCount === -1) {
6735                break;
6736              }
6737              skipped += readCount;
6738              if (readCount < toRead) {
6739                break;
6740              }
6741            }
6742          }
6743          ;
6744          return skipped;
6745        };
6746        InputStream2.MAX_SKIP_BUFFER_SIZE = 4096;
6747        return InputStream2;
6748      })()
6749    );
6750    io2.InputStream = InputStream;
6751    InputStream["__class"] = "java.io.InputStream";
6752    InputStream["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable"];
6753  })(io = java2.io || (java2.io = {}));
6754})(java || (java = {}));
6755(function(java2) {
6756  var io;
6757  (function(io2) {
6758    var Reader = (
6759      /** @class */
6760      (function() {
6761        function Reader2(lock) {
6762          if (lock != null || lock === null) {
6763            var __args = arguments;
6764            if (this.lock === void 0) {
6765              this.lock = null;
6766            }
6767            this.skipBuffer = null;
6768            if (lock == null) {
6769              throw new java2.lang.NullPointerException();
6770            }
6771            this.lock = lock;
6772          } else if (lock === void 0) {
6773            var __args = arguments;
6774            if (this.lock === void 0) {
6775              this.lock = null;
6776            }
6777            this.skipBuffer = null;
6778            this.lock = this;
6779          } else
6780            throw new Error("invalid overload");
6781        }
6782        Reader2.prototype.read$ = function() {
6783          var cb = [null];
6784          if (this.read$char_A$int$int(cb, 0, 1) === -1)
6785            return -1;
6786          else
6787            return cb[0].charCodeAt(0);
6788        };
6789        Reader2.prototype.read$char_A = function(cbuf) {
6790          return this.read$char_A$int$int(cbuf, 0, cbuf.length);
6791        };
6792        Reader2.prototype.read$char_A$int$int = function(cbuf, off, len) {
6793          throw new Error("cannot invoke abstract overloaded method... check your argument(s) type(s)");
6794        };
6795        Reader2.prototype.read = function(cbuf, off, len) {
6796          if ((cbuf != null && cbuf instanceof Array && (cbuf.length == 0 || cbuf[0] == null || typeof cbuf[0] === "string") || cbuf === null) && (typeof off === "number" || off === null) && (typeof len === "
6796number" || len === null)) {
6797            return this.read$char_A$int$int(cbuf, off, len);
6798          } else if ((cbuf != null && cbuf instanceof Array && (cbuf.length == 0 || cbuf[0] == null || typeof cbuf[0] === "string") || cbuf === null) && off === void 0 && len === void 0) {
6799            return this.read$char_A(cbuf);
6800          } else if (cbuf === void 0 && off === void 0 && len === void 0) {
6801            return this.read$();
6802          } else
6803            throw new Error("invalid overload");
6804        };
6805        Reader2.prototype.skip = function(n) {
6806          if (n < 0)
6807            throw new java2.lang.IllegalArgumentException("skip value is negative");
6808          var nn = Math.min(n, Reader2.maxSkipBufferSize) | 0;
6809          if (this.skipBuffer == null || this.skipBuffer.length < nn)
6810            this.skipBuffer = (function(s) {
6811              var a = [];
6812              while (s-- > 0)
6813                a.push(null);
6814              return a;
6815            })(nn);
6816          var r = n;
6817          while (r > 0) {
6818            {
6819              var nc = this.read$char_A$int$int(this.skipBuffer, 0, Math.min(r, nn) | 0);
6820              if (nc === -1)
6821                break;
6822              r -= nc;
6823            }
6824          }
6825          ;
6826          return n - r;
6827        };
6828        Reader2.prototype.ready = function() {
6829          return false;
6830        };
6831        Reader2.prototype.markSupported = function() {
6832          return false;
6833        };
6834        Reader2.prototype.mark = function(readAheadLimit) {
6835          throw new java2.io.IOException("mark() not supported");
6836        };
6837        Reader2.prototype.reset = function() {
6838          throw new java2.io.IOException("reset() not supported");
6839        };
6840        Reader2.maxSkipBufferSize = 8192;
6841        return Reader2;
6842      })()
6843    );
6844    io2.Reader = Reader;
6845    Reader["__class"] = "java.io.Reader";
6846    Reader["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable"];
6847  })(io = java2.io || (java2.io = {}));
6848})(java || (java = {}));
6849(function(java2) {
6850  var io;
6851  (function(io2) {
6852    var OutputStream = (
6853      /** @class */
6854      (function() {
6855        function OutputStream2() {
6856        }
6857        OutputStream2.prototype.close = function() {
6858        };
6859        OutputStream2.prototype.flush = function() {
6860        };
6861        OutputStream2.prototype.write$byte_A = function(buffer) {
6862          javaemul.internal.InternalPreconditions.checkNotNull(buffer);
6863          this.write$byte_A$int$int(buffer, 0, buffer.length);
6864        };
6865        OutputStream2.prototype.write$byte_A$int$int = function(buffer, offset, count) {
6866          java2.io.IOUtils.checkOffsetAndCount$byte_A$int$int(buffer, offset, count);
6867          for (var i = offset; i < offset + count; i++) {
6868            {
6869              this.write$int(buffer[i]);
6870            }
6871            ;
6872          }
6873        };
6874        OutputStream2.prototype.write = function(buffer, offset, count) {
6875          if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && (typeof offset === "number" || offset === null) && (typeof count === "number" || count === null)) {
6876            return this.write$byte_A$int$int(buffer, offset, count);
6877          } else if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && offset === void 0 && count === void 0) {
6878            return this.write$byte_A(buffer);
6879          } else if ((typeof buffer === "number" || buffer === null) && offset === void 0 && count === void 0) {
6880            return this.write$int(buffer);
6881          } else
6882            throw new Error("invalid overload");
6883        };
6884        OutputStream2.prototype.write$int = function(oneByte) {
6885          throw new Error("cannot invoke abstract overloaded method... check your argument(s) type(s)");
6886        };
6887        return OutputStream2;
6888      })()
6889    );
6890    io2.OutputStream = OutputStream;
6891    OutputStream["__class"] = "java.io.OutputStream";
6892    OutputStream["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable", "java.io.Flushable"];
6893  })(io = java2.io || (java2.io = {}));
6894})(java || (java = {}));
6895(function(java2) {
6896  var lang;
6897  (function(lang2) {
6898    var ref;
6899    (function(ref2) {
6900      var Reference = (
6901        /** @class */
6902        (function() {
6903          function Reference2(referent) {
6904            if (this.referent === void 0) {
6905              this.referent = null;
6906            }
6907            this.referent = referent;
6908          }
6909          Reference2.prototype.get = function() {
6910            return this.referent;
6911          };
6912          Reference2.prototype.clear = function() {
6913            this.referent = null;
6914          };
6915          return Reference2;
6916        })()
6917      );
6918      ref2.Reference = Reference;
6919      Reference["__class"] = "java.lang.ref.Reference";
6920    })(ref = lang2.ref || (lang2.ref = {}));
6921  })(lang = java2.lang || (java2.lang = {}));
6922})(java || (java = {}));
6923(function(java2) {
6924  var lang;
6925  (function(lang2) {
6926    var AssertionError = (
6927      /** @class */
6928      (function(_super) {
6929        __extends(AssertionError2, _super);
6930        function AssertionError2(message, cause) {
6931          var _this = this;
6932          if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null)) {
6933            var __args = arguments;
6934            _this = _super.call(this, message) || this;
6935            _this.message = message;
6936          } else if ((typeof message === "string" || message === null) && cause === void 0) {
6937            var __args = arguments;
6938            _this = _super.call(this, message) || this;
6939            _this.message = message;
6940          } else if ((typeof message === "boolean" || message === null) && cause === void 0) {
6941            var __args = arguments;
6942            {
6943              var __args_10 = arguments;
6944              var message_1 = String(__args_10[0]).toString();
6945              _this = _super.call(this, message_1) || this;
6946              _this.message = message_1;
6947            }
6948          } else if ((typeof message === "string" || message === null) && cause === void 0) {
6949            var __args = arguments;
6950            {
6951              var __args_11 = arguments;
6952              var message_2 = String(__args_11[0]).toString();
6953              _this = _super.call(this, message_2) || this;
6954              _this.message = message_2;
6955            }
6956          } else if ((typeof message === "number" || message === null) && cause === void 0) {
6957            var __args = arguments;
6958            {
6959              var __args_12 = arguments;
6960              var message_3 = String(__args_12[0]).toString();
6961              _this = _super.call(this, message_3) || this;
6962              _this.message = message_3;
6963            }
6964          } else if ((typeof message === "number" || message === null) && cause === void 0) {
6965            var __args = arguments;
6966            {
6967              var __args_13 = arguments;
6968              var message_4 = String(__args_13[0]).toString();
6969              _this = _super.call(this, message_4) || this;
6970              _this.message = message_4;
6971            }
6972          } else if ((typeof message === "number" || message === null) && cause === void 0) {
6973            var __args = arguments;
6974            {
6975              var __args_14 = arguments;
6976              var message_5 = String(__args_14[0]).toString();
6977              _this = _super.call(this, message_5) || this;
6978              _this.message = message_5;
6979            }
6980          } else if ((typeof message === "number" || message === null) && cause === void 0) {
6981            var __args = arguments;
6982            {
6983              var __args_15 = arguments;
6984              var message_6 = String(__args_15[0]).toString();
6985              _this = _super.call(this, message_6) || this;
6986              _this.message = message_6;
6987            }
6988          } else if ((message != null || message === null) && cause === void 0) {
6989            var __args = arguments;
6990            _this = _super.call(
6991              this,
6992              /* valueOf */
6993              String(message).toString()
6994            ) || this;
6995            _this.message = /* valueOf */
6996            String(message).toString();
6997          } else if (message === void 0 && cause === void 0) {
6998            var __args = arguments;
6999            _this = _super.call(this) || this;
7000          } else
7001            throw new Error("invalid overload");
7002          return _this;
7003        }
7004        return AssertionError2;
7005      })(Error)
7006    );
7007    lang2.AssertionError = AssertionError;
7008    AssertionError["__class"] = "java.lang.AssertionError";
7009    AssertionError["__interfaces"] = ["java.io.Serializable"];
7010  })(lang = java2.lang || (java2.lang = {}));
7011})(java || (java = {}));
7012(function(java2) {
7013  var lang;
7014  (function(lang2) {
7015    var StackTraceElement = (
7016      /** @class */
7017      (function() {
7018        function StackTraceElement2(className, methodName, fileName, lineNumber) {
7019          if ((typeof className === "string" || className === null) && (typeof methodName === "string" || methodName === null) && (typeof fileName === "string" || fileName === null) && (typeof lineNumber === "number" || lineNumber === null)) {
7020            var __args = arguments;
7021            if (this.className === void 0) {
7022              this.className = null;
7023            }
7024            if (this.fileName === void 0) {
7025              this.fileName = null;
7026            }
7027            if (this.lineNumber === void 0) {
7028              this.lineNumber = 0;
7029            }
7030            if (this.methodName === void 0) {
7031              this.methodName = null;
7032            }
7033            this.className = className;
7034            this.methodName = methodName;
7035            this.fileName = fileName;
7036            this.lineNumber = lineNumber;
7037          } else if (className === void 0 && methodName === void 0 && fileName === void 0 && lineNumber === void 0) {
7038            var __args = arguments;
7039            if (this.className === void 0) {
7040              this.className = null;
7041            }
7042            if (this.fileName === void 0) {
7043              this.fileName = null;
7044            }
7045            if (this.lineNumber === void 0) {
7046              this.lineNumber = 0;
7047            }
7048            if (this.methodName === void 0) {
7049              this.methodName = null;
7050            }
7051          } else
7052            throw new Error("invalid overload");
7053        }
7054        StackTraceElement2.prototype.getClassName = function() {
7055          return this.className;
7056        };
7057        StackTraceElement2.prototype.getFileName = function() {
7058          return this.fileName;
7059        };
7060        StackTraceElement2.prototype.getLineNumber = function() {
7061          return this.lineNumber;
7062        };
7063        StackTraceElement2.prototype.getMethodName = function() {
7064          return this.methodName;
7065        };
7066        StackTraceElement2.prototype.equals = function(other) {
7067          if (other != null && other instanceof java2.lang.StackTraceElement) {
7068            var st = other;
7069            return this.lineNumber === st.lineNumber && java2.util.Objects.equals(this.methodName, st.methodName) && java2.util.Objects.equals(this.className, st.className) && java2.util.Objects.equals(this.fileName, st.fileName);
7070          }
7071          return false;
7072        };
7073        StackTraceElement2.prototype.hashCode = function() {
7074          return java2.util.Objects.hash(this.lineNumber, this.className, this.methodName, this.fileName);
7075        };
7076        StackTraceElement2.prototype.toString = function() {
7077          return this.className + "." + this.methodName + "(" + (this.fileName != null ? this.fileName : "Unknown Source") + (this.lineNumber >= 0 ? ":" + this.lineNumber : "") + ")";
7078        };
7079        return StackTraceElement2;
7080      })()
7081    );
7082    lang2.StackTraceElement = StackTraceElement;
7083    StackTraceElement["__class"] = "java.lang.StackTraceElement";
7084    StackTraceElement["__interfaces"] = ["java.io.Serializable"];
7085  })(lang = java2.lang || (java2.lang = {}));
7086})(java || (java = {}));
7087(function(java2) {
7088  var lang;
7089  (function(lang2) {
7090    var VirtualMachineError = (
7091      /** @class */
7092      (function(_super) {
7093        __extends(VirtualMachineError2, _super);
7094        function VirtualMachineError2(message, cause) {
7095          var _this = this;
7096          if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null)) {
7097            var __args = arguments;
7098            _this = _super.call(this, message) || this;
7099            _this.message = message;
7100          } else if ((typeof message === "string" || message === null) && cause === void 0) {
7101            var __args = arguments;
7102            _this = _super.call(this, message) || this;
7103            _this.message = message;
7104          } else if ((message != null && message instanceof Error || message === null) && cause === void 0) {
7105            var __args = arguments;
7106            var cause_1 = __args[0];
7107            _this = _super.call(this, cause_1) || this;
7108            _this.message = cause_1;
7109          } else if (message === void 0 && cause === void 0) {
7110            var __args = arguments;
7111            _this = _super.call(this) || this;
7112          } else
7113            throw new Error("invalid overload");
7114          return _this;
7115        }
7116        VirtualMachineError2.serialVersionUID = 4161983926571568600;
7117        return VirtualMachineError2;
7118      })(Error)
7119    );
7120    lang2.VirtualMachineError = VirtualMachineError;
7121    VirtualMachineError["__class"] = "java.lang.VirtualMachineError";
7122    VirtualMachineError["__interfaces"] = ["java.io.Serializable"];
7123  })(lang = java2.lang || (java2.lang = {}));
7124})(java || (java = {}));
7125(function(java2) {
7126  var lang;
7127  (function(lang2) {
7128    var Exception = (
7129      /** @class */
7130      (function(_super) {
7131        __extends(Exception2, _super);
7132        function Exception2(message, cause, enableSuppression, writableStackTrace) {
7133          var _this = this;
7134          if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null) && (typeof enableSuppression === "boolean" || enableSuppression === null) && (typeof writableStackTrace === "boolean" || writableStackTrace === null)) {
7135            var __args = arguments;
7136            _this = _super.call(this, message) || this;
7137            _this.message = message;
7138          } else if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null) && enableSuppression === void 0 && writableStackTrace === void 0) {
7139            var __args = arguments;
7140            _this = _super.call(this, message) || this;
7141            _this.message = message;
7142          } else if ((typeof message === "string" || message === null) && cause === void 0 && enableSuppression === void 0 && writableStackTrace === void 0) {
7143            var __args = arguments;
7144            _this = _super.call(this, message) || this;
7145            _this.message = message;
7146          } else if ((message != null && message instanceof Error || message === null) && cause === void 0 && enableSuppression === void 0 && writableStackTrace === void 0) {
7147            var __args = arguments;
7148            var cause_2 = __args[0];
7149            _this = _super.call(this, cause_2) || this;
7150            _this.message = cause_2;
7151          } else if (message === void 0 && cause === void 0 && enableSuppression === void 0 && writableStackTrace === void 0) {
7152            var __args = arguments;
7153            _this = _super.call(this) || this;
7154          } else
7155            throw new Error("invalid overload");
7156          return _this;
7157        }
7158        return Exception2;
7159      })(Error)
7160    );
7161    lang2.Exception = Exception;
7162    Exception["__class"] = "java.lang.Exception";
7163    Exception["__interfaces"] = ["java.io.Serializable"];
7164  })(lang = java2.lang || (java2.lang = {}));
7165})(java || (java = {}));
7166(function(java2) {
7167  var lang;
7168  (function(lang2) {
7169    var Void = (
7170      /** @class */
7171      /* @__PURE__ */ (function() {
7172        function Void2() {
7173        }
7174        return Void2;
7175      })()
7176    );
7177    lang2.Void = Void;
7178    Void["__class"] = "java.lang.Void";
7179  })(lang = java2.lang || (java2.lang = {}));
7180})(java || (java = {}));
7181(function(java2) {
7182  var lang;
7183  (function(lang2) {
7184    var IllegalAccessError = (
7185      /** @class */
7186      (function(_super) {
7187        __extends(IllegalAccessError2, _super);
7188        function IllegalAccessError2(message, cause) {
7189          var _this = this;
7190          if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null)) {
7191            var __args = arguments;
7192            _this = _super.call(this, message) || this;
7193            _this.message = message;
7194          } else if ((typeof message === "string" || message === null) && cause === void 0) {
7195            var __args = arguments;
7196            _this = _super.call(this, message) || this;
7197            _this.message = message;
7198          } else if ((message != null && message instanceof Error || message === null) && cause === void 0) {
7199            var __args = arguments;
7200            var cause_3 = __args[0];
7201            _this = _super.call(this, cause_3) || this;
7202            _this.message = cause_3;
7203          } else if (message === void 0 && cause === void 0) {
7204            var __args = arguments;
7205            _this = _super.call(this) || this;
7206          } else
7207            throw new Error("invalid overload");
7208          return _this;
7209        }
7210        return IllegalAccessError2;
7211      })(Error)
7212    );
7213    lang2.IllegalAccessError = IllegalAccessError;
7214    IllegalAccessError["__class"] = "java.lang.IllegalAccessError";
7215    IllegalAccessError["__interfaces"] = ["java.io.Serializable"];
7216  })(lang = java2.lang || (java2.lang = {}));
7217})(java || (java = {}));
7218(function(java2) {
7219  var lang;
7220  (function(lang2) {
7221    var reflect;
7222    (function(reflect2) {
7223      var Array2 = (
7224        /** @class */
7225        (function() {
7226          function Array3() {
7227          }
7228          Array3.newInstance = function(componentType, length) {
7229            var array = [];
7230            array.length = length;
7231            return array;
7232          };
7233          return Array3;
7234        })()
7235      );
7236      reflect2.Array = Array2;
7237      Array2["__class"] = "java.lang.reflect.Array";
7238    })(reflect = lang2.reflect || (lang2.reflect = {}));
7239  })(lang = java2.lang || (java2.lang = {}));
7240})(java || (java = {}));
7241(function(java2) {
7242  var lang;
7243  (function(lang2) {
7244    var NoSuchMethodError = (
7245      /** @class */
7246      (function(_super) {
7247        __extends(NoSuchMethodError2, _super);
7248        function NoSuchMethodError2(message, cause) {
7249          var _this = this;
7250          if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null)) {
7251            var __args = arguments;
7252            _this = _super.call(this, message) || this;
7253            _this.message = message;
7254          } else if ((typeof message === "string" || message === null) && cause === void 0) {
7255            var __args = arguments;
7256            _this = _super.call(this, message) || this;
7257            _this.message = message;
7258          } else if ((message != null && message instanceof Error || message === null) && cause === void 0) {
7259            var __args = arguments;
7260            var cause_4 = __args[0];
7261            _this = _super.call(this, cause_4) || this;
7262            _this.message = cause_4;
7263          } else if (message === void 0 && cause === void 0) {
7264            var __args = arguments;
7265            _this = _super.call(this) || this;
7266          } else
7267            throw new Error("invalid overload");
7268          return _this;
7269        }
7270        return NoSuchMethodError2;
7271      })(Error)
7272    );
7273    lang2.NoSuchMethodError = NoSuchMethodError;
7274    NoSuchMethodError["__class"] = "java.lang.NoSuchMethodError";
7275    NoSuchMethodError["__interfaces"] = ["java.io.Serializable"];
7276  })(lang = java2.lang || (java2.lang = {}));
7277})(java || (java = {}));
7278(function(java2) {
7279  var lang;
7280  (function(lang2) {
7281    var annotation;
7282    (function(annotation2) {
7283      var ElementType;
7284      (function(ElementType2) {
7285        ElementType2[ElementType2["ANNOTATION_TYPE"] = 0] = "ANNOTATION_TYPE";
7286        ElementType2[ElementType2["CONSTRUCTOR"] = 1] = "CONSTRUCTOR";
7287        ElementType2[ElementType2["FIELD"] = 2] = "FIELD";
7288        ElementType2[ElementType2["LOCAL_VARIABLE"] = 3] = "LOCAL_VARIABLE";
7289        ElementType2[ElementType2["METHOD"] = 4] = "METHOD";
7290        ElementType2[ElementType2["PACKAGE"] = 5] = "PACKAGE";
7291        ElementType2[ElementType2["PARAMETER"] = 6] = "PARAMETER";
7292        ElementType2[ElementType2["TYPE"] = 7] = "TYPE";
7293      })(ElementType = annotation2.ElementType || (annotation2.ElementType = {}));
7294    })(annotation = lang2.annotation || (lang2.annotation = {}));
7295  })(lang = java2.lang || (java2.lang = {}));
7296})(java || (java = {}));
7297(function(java2) {
7298  var lang;
7299  (function(lang2) {
7300    var annotation;
7301    (function(annotation2) {
7302      var RetentionPolicy;
7303      (function(RetentionPolicy2) {
7304        RetentionPolicy2[RetentionPolicy2["CLASS"] = 0] = "CLASS";
7305        RetentionPolicy2[RetentionPolicy2["RUNTIME"] = 1] = "RUNTIME";
7306        RetentionPolicy2[RetentionPolicy2["SOURCE"] = 2] = "SOURCE";
7307      })(RetentionPolicy = annotation2.RetentionPolicy || (annotation2.RetentionPolicy = {}));
7308    })(annotation = lang2.annotation || (lang2.annotation = {}));
7309  })(lang = java2.lang || (java2.lang = {}));
7310})(java || (java = {}));
7311(function(java2) {
7312  var lang;
7313  (function(lang2) {
7314    var annotation;
7315    (function(annotation2) {
7316      var AnnotationFormatError = (
7317        /** @class */
7318        (function(_super) {
7319          __extends(AnnotationFormatError2, _super);
7320          function AnnotationFormatError2() {
7321            var _this = _super.call(this) || this;
7322            Object.setPrototypeOf(_this, AnnotationFormatError2.prototype);
7323            return _this;
7324          }
7325          return AnnotationFormatError2;
7326        })(Error)
7327      );
7328      annotation2.AnnotationFormatError = AnnotationFormatError;
7329      AnnotationFormatError["__class"] = "java.lang.annotation.AnnotationFormatError";
7330      AnnotationFormatError["__interfaces"] = ["java.io.Serializable"];
7331    })(annotation = lang2.annotation || (lang2.annotation = {}));
7332  })(lang = java2.lang || (java2.lang = {}));
7333})(java || (java = {}));
7334(function(java2) {
7335  var lang;
7336  (function(lang2) {
7337    var Class = (
7338      /** @class */
7339      (function() {
7340        function Class2() {
7341          if (this.enumValueOfFunc === void 0) {
7342            this.enumValueOfFunc = null;
7343          }
7344          if (this.modifiers === void 0) {
7345            this.modifiers = 0;
7346          }
7347          if (this.componentType === void 0) {
7348            this.componentType = null;
7349          }
7350          if (this.enumConstantsFunc === void 0) {
7351            this.enumConstantsFunc = null;
7352          }
7353          if (this.enumSuperclass === void 0) {
7354            this.enumSuperclass = null;
7355          }
7356          if (this.superclass === void 0) {
7357            this.superclass = null;
7358          }
7359          if (this.simpleName === void 0) {
7360            this.simpleName = null;
7361          }
7362          if (this.typeName === void 0) {
7363            this.typeName = null;
7364          }
7365          if (this.canonicalName === void 0) {
7366            this.canonicalName = null;
7367          }
7368          if (this.packageName === void 0) {
7369            this.packageName = null;
7370          }
7371          if (this.compoundName === void 0) {
7372            this.compoundName = null;
7373          }
7374          if (this.typeId === void 0) {
7375            this.typeId = null;
7376          }
7377          if (this.arrayLiterals === void 0) {
7378            this.arrayLiterals = null;
7379          }
7380          this.sequentialId = Class2.nextSequentialId++;
7381          this.typeName = null;
7382          this.simpleName = null;
7383          this.packageName = null;
7384          this.compoundName = null;
7385          this.canonicalName = null;
7386          this.typeId = null;
7387          this.arrayLiterals = null;
7388        }
7389        Class2.constructors_$LI$ = function() {
7390          if (Class2.constructors == null) {
7391            Class2.constructors = new Array();
7392          }
7393          return Class2.constructors;
7394        };
7395        Class2.classes_$LI$ = function() {
7396          if (Class2.classes == null) {
7397            Class2.classes = new Array();
7398          }
7399          return Class2.classes;
7400        };
7401        Class2.getConstructorForClass = function(clazz) {
7402          var index = Class2.classes_$LI$().indexOf(clazz) | 0;
7403          return index === -1 ? null : Class2.constructors_$LI$()[index];
7404        };
7405        Class2.getClassForConstructor = function(constructor) {
7406          var index = Class2.constructors_$LI$().indexOf(constructor) | 0;
7407          return index === -1 ? null : Class2.classes_$LI$()[index];
7408        };
7409        Class2.mapConstructorToClass = function(constructor, clazz) {
7410          Class2.constructors_$LI$().push(constructor);
7411          Class2.classes_$LI$().push(clazz);
7412        };
7413        Class2.getClassLiteralForArray = function(leafClass, dimensions) {
7414          var arrayLiterals = leafClass.arrayLiterals = leafClass.arrayLiterals == null ? [] : leafClass.arrayLiterals;
7415          return arrayLiterals[dimensions] != null ? arrayLiterals[dimensions] : arrayLiterals[dimensions] = leafClass.createClassLiteralForArray(dimensions);
7416        };
7417        Class2.prototype.createClassLiteralForArray = function(dimensions) {
7418          var clazz = new java2.lang.Class();
7419          clazz.modifiers = Class2.ARRAY;
7420          clazz.superclass = Object;
7421          if (dimensions > 1) {
7422            clazz.componentType = Class2.getClassLiteralForArray(this, dimensions - 1);
7423          } else {
7424            clazz.componentType = this;
7425          }
7426          return clazz;
7427        };
7428        Class2.createForClass = function(packageName, compoundClassName, typeId, superclass) {
7429          var clazz = Class2.createClassObject(packageName, compoundClassName, typeId);
7430          clazz.superclass = superclass;
7431          return clazz;
7432        };
7433        Class2.createForEnum = function(packageName, compoundClassName, typeId, superclass, enumConstantsFunc, enumValueOfFunc) {
7434          var clazz = Class2.createClassObject(packageName, compoundClassName, typeId);
7435          clazz.modifiers = enumConstantsFunc != null ? Class2.ENUM : 0;
7436          clazz.superclass = clazz.enumSuperclass = superclass;
7437          clazz.enumConstantsFunc = enumConstantsFunc;
7438          clazz.enumValueOfFunc = enumValueOfFunc;
7439          return clazz;
7440        };
7441        Class2.createForInterface = function(packageName, compoundClassName) {
7442          var clazz = Class2.createClassObject(packageName, compoundClassName, null);
7443          clazz.modifiers = Class2.INTERFACE;
7444          return clazz;
7445        };
7446        Class2.createForPrimitive = function(className, primitiveTypeId) {
7447          var clazz = Class2.createClassObject("", className, primitiveTypeId);
7448          clazz.modifiers = Class2.PRIMITIVE;
7449          return clazz;
7450        };
7451        Class2.getPrototypeForClass = function(clazz) {
7452          if (clazz.isPrimitive()) {
7453            return null;
7454          }
7455          return Class2.getConstructorForClass(clazz).prototype;
7456        };
7457        Class2.createClassObject = function(packageName, compoundClassName, typeId) {
7458          var clazz = new java2.lang.Class();
7459          clazz.packageName = packageName;
7460          clazz.compoundName = compoundClassName;
7461          return clazz;
7462        };
7463        Class2.initializeNames = function(clazz) {
7464          if (clazz.isArray()) {
7465            var componentType = clazz.componentType;
7466            if (componentType.isPrimitive()) {
7467              clazz.typeName = "[" + componentType.typeId;
7468            } else if (!componentType.isArray()) {
7469              clazz.typeName = "[L" + /* getName */
7470              (function(c) {
7471                return typeof c === "string" ? c : c["__class"] ? c["__class"] : c["name"];
7472              })(componentType) + ";";
7473            } else {
7474              clazz.typeName = "[" + /* getName */
7475              (function(c) {
7476                return typeof c === "string" ? c : c["__class"] ? c["__class"] : c["name"];
7477              })(componentType);
7478            }
7479            clazz.canonicalName = componentType.getCanonicalName() + "[]";
7480            clazz.simpleName = /* getSimpleName */
7481            (function(c) {
7482              return typeof c === "string" ? c.substring(c.lastIndexOf(".") + 1) : c["__class"] ? c["__class"].substring(c["__class"].lastIndexOf(".") + 1) : c["name"].substring(c["name"].lastIndexOf(".") + 1);
7483            })(componentType) + "[]";
7484            return;
7485          }
7486          var packageName = clazz.packageName;
7487          var compoundName = clazz.compoundName.split("/");
7488          clazz.typeName = [packageName, compoundName.join("$")].join(".");
7489          clazz.canonicalName = [packageName, compoundName.join(".")].join(".");
7490          clazz.simpleName = compoundName[compoundName.length - 1];
7491        };
7492        Class2.synthesizePrimitiveNamesFromTypeId = function(clazz, primitiveTypeId) {
7493          clazz.typeName = "Class$" + primitiveTypeId;
7494          clazz.canonicalName = clazz.typeName;
7495          clazz.simpleName = clazz.typeName;
7496        };
7497        Class2.prototype.desiredAssertionStatus = function() {
7498          return false;
7499        };
7500        Class2.prototype.ensureNamesAreInitialized = function() {
7501          if (this.typeName != null) {
7502            return;
7503          }
7504          Class2.initializeNames(this);
7505        };
7506        Class2.prototype.getCanonicalName = function() {
7507          this.ensureNamesAreInitialized();
7508          return this.canonicalName;
7509        };
7510        Class2.prototype.getComponentType = function() {
7511          return this.componentType;
7512        };
7513        Class2.prototype.getEnumConstants = function() {
7514          return this.enumConstantsFunc && this.enumConstantsFunc();
7515        };
7516        Class2.prototype.getName = function() {
7517          this.ensureNamesAreInitialized();
7518          return this.typeName;
7519        };
7520        Class2.prototype.getSimpleName = function() {
7521          this.ensureNamesAreInitialized();
7522          return this.simpleName;
7523        };
7524        Class2.prototype.getSuperclass = function() {
7525          return this.superclass;
7526        };
7527        Class2.prototype.isArray = function() {
7528          return (this.modifiers & Class2.ARRAY) !== 0;
7529        };
7530        Class2.prototype.isEnum = function() {
7531          return (this.modifiers & Class2.ENUM) !== 0;
7532        };
7533        Class2.prototype.isInterface = function() {
7534          return (this.modifiers & Class2.INTERFACE) !== 0;
7535        };
7536        Class2.prototype.isPrimitive = function() {
7537          return (this.modifiers & Class2.PRIMITIVE) !== 0;
7538        };
7539        Class2.prototype.toString = function() {
7540          return (this.isInterface() ? "interface " : this.isPrimitive() ? "" : "class ") + /* getName */
7541          (function(c) {
7542            return typeof c === "string" ? c : c["__class"] ? c["__class"] : c["name"];
7543          })(this);
7544        };
7545        Class2.prototype.getEnumSuperclass = function() {
7546          return this.enumSuperclass;
7547        };
7548        Class2.PRIMITIVE = 1;
7549        Class2.INTERFACE = 2;
7550        Class2.ARRAY = 4;
7551        Class2.ENUM = 8;
7552        Class2.nextSequentialId = 1;
7553        return Class2;
7554      })()
7555    );
7556    lang2.Class = Class;
7557    Class["__class"] = "java.lang.Class";
7558    Class["__interfaces"] = ["java.lang.reflect.Type"];
7559  })(lang = java2.lang || (java2.lang = {}));
7560})(java || (java = {}));
7561(function(java2) {
7562  var lang;
7563  (function(lang2) {
7564    var ThreadLocal = (
7565      /** @class */
7566      (function() {
7567        function ThreadLocal2() {
7568          if (this.value === void 0) {
7569            this.value = null;
7570          }
7571        }
7572        ThreadLocal2.prototype.initialValue = function() {
7573          return null;
7574        };
7575        ThreadLocal2.prototype.get = function() {
7576          return this.value;
7577        };
7578        ThreadLocal2.prototype.set = function(value) {
7579          this.value = value;
7580        };
7581        ThreadLocal2.prototype.remove = function() {
7582        };
7583        ThreadLocal2.prototype.childValue = function(parentValue) {
7584          throw new java2.lang.UnsupportedOperationException();
7585        };
7586        return ThreadLocal2;
7587      })()
7588    );
7589    lang2.ThreadLocal = ThreadLocal;
7590    ThreadLocal["__class"] = "java.lang.ThreadLocal";
7591  })(lang = java2.lang || (java2.lang = {}));
7592})(java || (java = {}));
7593(function(java2) {
7594  var lang;
7595  (function(lang2) {
7596    var AbstractStringBuilder = (
7597      /** @class */
7598      (function() {
7599        function AbstractStringBuilder2(string) {
7600          if (this.string === void 0) {
7601            this.string = null;
7602          }
7603          this.string = string;
7604        }
7605        AbstractStringBuilder2.prototype.length = function() {
7606          return this.string.length;
7607        };
7608        AbstractStringBuilder2.prototype.setLength = function(newLength) {
7609          var oldLength = this.length();
7610          if (newLength < oldLength) {
7611            this.string = this.string.substring(0, newLength);
7612          } else if (newLength > oldLength) {
7613            this.string += /* valueOf */
7614            String((function(s) {
7615              var a = [];
7616              while (s-- > 0)
7617                a.push(null);
7618              return a;
7619            })(newLength - oldLength)).toString();
7620          }
7621        };
7622        AbstractStringBuilder2.prototype.capacity = function() {
7623          return javaemul.internal.IntegerHelper.MAX_VALUE;
7624        };
7625        AbstractStringBuilder2.prototype.ensureCapacity = function(ignoredCapacity) {
7626        };
7627        AbstractStringBuilder2.prototype.trimToSize = function() {
7628        };
7629        AbstractStringBuilder2.prototype.charAt = function(index) {
7630          return this.string.charAt(index);
7631        };
7632        AbstractStringBuilder2.prototype.getChars = function(srcStart, srcEnd, dst, dstStart) {
7633          javaemul.internal.InternalPreconditions.checkStringBounds(srcStart, srcEnd, this.length());
7634          javaemul.internal.InternalPreconditions.checkStringBounds(dstStart, dstStart + (srcEnd - srcStart), dst.length);
7635          while (srcStart < srcEnd) {
7636            {
7637              dst[dstStart++] = this.string.charAt(srcStart++);
7638            }
7639          }
7640          ;
7641        };
7642        AbstractStringBuilder2.prototype.setCharAt = function(index, x) {
7643          this.replace0(
7644            index,
7645            index + 1,
7646            /* valueOf */
7647            String(x).toString()
7648          );
7649        };
7650        AbstractStringBuilder2.prototype.subSequence = function(start, end) {
7651          return this.string.substring(start, end);
7652        };
7653        AbstractStringBuilder2.prototype.substring$int = function(begin) {
7654          return this.string.substring(begin);
7655        };
7656        AbstractStringBuilder2.prototype.substring$int$int = function(begin, end) {
7657          return this.string.substring(begin, end);
7658        };
7659        AbstractStringBuilder2.prototype.substring = function(begin, end) {
7660          if ((typeof begin === "number" || begin === null) && (typeof end === "number" || end === null)) {
7661            return this.substring$int$int(begin, end);
7662          } else if ((typeof begin === "number" || begin === null) && end === void 0) {
7663            return this.substring$int(begin);
7664          } else
7665            throw new Error("invalid overload");
7666        };
7667        AbstractStringBuilder2.prototype.indexOf$java_lang_String = function(x) {
7668          return this.string.indexOf(x);
7669        };
7670        AbstractStringBuilder2.prototype.indexOf$java_lang_String$int = function(x, start) {
7671          return this.string.indexOf(x, start);
7672        };
7673        AbstractStringBuilder2.prototype.indexOf = function(x, start) {
7674          if ((typeof x === "string" || x === null) && (typeof start === "number" || start === null)) {
7675            return this.indexOf$java_lang_String$int(x, start);
7676          } else if ((typeof x === "string" || x === null) && start === void 0) {
7677            return this.indexOf$java_lang_String(x);
7678          } else
7679            throw new Error("invalid overload");
7680        };
7681        AbstractStringBuilder2.prototype.lastIndexOf$java_lang_String = function(s) {
7682          return this.string.lastIndexOf(s);
7683        };
7684        AbstractStringBuilder2.prototype.lastIndexOf$java_lang_String$int = function(s, start) {
7685          return this.string.lastIndexOf(s, start);
7686        };
7687        AbstractStringBuilder2.prototype.lastIndexOf = function(s, start) {
7688          if ((typeof s === "string" || s === null) && (typeof start === "number" || start === null)) {
7689            return this.lastIndexOf$java_lang_String$int(s, start);
7690          } else if ((typeof s === "string" || s === null) && start === void 0) {
7691            return this.lastIndexOf$java_lang_String(s);
7692          } else
7693            throw new Error("invalid overload");
7694        };
7695        AbstractStringBuilder2.prototype.toString = function() {
7696          return this.string;
7697        };
7698        AbstractStringBuilder2.prototype.append0 = function(x, start, end) {
7699          if (x == null) {
7700            x = "null";
7701          }
7702          this.string += /* subSequence */
7703          x.substring(start, end);
7704        };
7705        AbstractStringBuilder2.prototype.appendCodePoint0 = function(x) {
7706          this.string += /* valueOf */
7707          String(
7708            /* toChars */
7709            String.fromCharCode(x)
7710          ).toString();
7711        };
7712        AbstractStringBuilder2.prototype.replace0 = function(start, end, toInsert) {
7713          this.string = this.string.substring(0, start) + toInsert + this.string.substring(end);
7714        };
7715        AbstractStringBuilder2.prototype.reverse0 = function() {
7716          var length = this.string.length;
7717          if (length <= 1) {
7718            return;
7719          }
7720          var buffer = (function(s) {
7721            var a = [];
7722            while (s-- > 0)
7723              a.push(null);
7724            return a;
7725          })(length);
7726          buffer[0] = this.string.charAt(length - 1);
7727          for (var i = 1; i < length; i++) {
7728            {
7729              buffer[i] = this.string.charAt(length - 1 - i);
7730              if (javaemul.internal.CharacterHelper.isSurrogatePair(buffer[i], buffer[i - 1])) {
7731                AbstractStringBuilder2.swap(buffer, i - 1, i);
7732              }
7733            }
7734            ;
7735          }
7736          this.string = new String(buffer);
7737        };
7738        AbstractStringBuilder2.swap = function(buffer, f, s) {
7739          var tmp = buffer[f];
7740          buffer[f] = buffer[s];
7741          buffer[s] = tmp;
7742        };
7743        return AbstractStringBuilder2;
7744      })()
7745    );
7746    lang2.AbstractStringBuilder = AbstractStringBuilder;
7747    AbstractStringBuilder["__class"] = "java.lang.AbstractStringBuilder";
7748  })(lang = java2.lang || (java2.lang = {}));
7749})(java || (java = {}));
7750(function(java2) {
7751  var lang;
7752  (function(lang2) {
7753    var Enum = (
7754      /** @class */
7755      (function() {
7756        function Enum2(name, ordinal) {
7757          if (this.__name === void 0) {
7758            this.__name = null;
7759          }
7760          if (this.__ordinal === void 0) {
7761            this.__ordinal = 0;
7762          }
7763          this.__name = name;
7764          this.__ordinal = ordinal;
7765        }
7766        Enum2.valueOf$java_lang_Class$java_lang_String = function(enumType, name) {
7767          var enumValueOfFunc = javaemul.internal.InternalPreconditions.checkNotNull(enumType).enumValueOfFunc;
7768          javaemul.internal.InternalPreconditions.checkCriticalArgument(
7769            enumValueOfFunc != null,
7770            "EnumValueOfFunc is null at enum class: %s, enum value name: %s",
7771            /* getName */
7772            (function(c) {
7773              return typeof c === "string" ? c : c["__class"] ? c["__class"] : c["name"];
7774            })(enumType),
7775            name
7776          );
7777          javaemul.internal.InternalPreconditions.checkNotNull(name);
7778          return Enum2.invokeValueOf(enumValueOfFunc, name);
7779        };
7780        Enum2.valueOf = function(enumType, name) {
7781          if ((enumType != null && (enumType["__class"] != null || (function(t) {
7782            try {
7783              new t();
7784              return true;
7785            } catch (_a) {
7786              return false;
7787            }
7788          })(enumType)) || enumType === null) && (typeof name === "string" || name === null)) {
7789            return java2.lang.Enum.valueOf$java_lang_Class$java_lang_String(enumType, name);
7790          } else if ((enumType != null && enumType instanceof Object || enumType === null) && (typeof name === "string" || name === null)) {
7791            return java2.lang.Enum.valueOf$def_js_Object$java_lang_String(enumType, name);
7792          } else
7793            throw new Error("invalid overload");
7794        };
7795        Enum2.createValueOfMap = function(enumConstants) {
7796          var result = new Object();
7797          for (var index = 0; index < enumConstants.length; index++) {
7798            var value = enumConstants[index];
7799            {
7800              Enum2.put0(result, ":" + value.name(), value);
7801            }
7802          }
7803          return result;
7804        };
7805        Enum2.valueOf$def_js_Object$java_lang_String = function(map, name) {
7806          javaemul.internal.InternalPreconditions.checkNotNull(name);
7807          var result = java2.lang.Enum.get0(map, ":" + name);
7808          javaemul.internal.InternalPreconditions.checkCriticalArgument(result != null, "Enum constant undefined: %s", name);
7809          return result;
7810        };
7811        Enum2.get0 = function(map, name) {
7812          return map[name];
7813        };
7814        Enum2.invokeValueOf = function(enumValueOfFunc, name) {
7815          return enumValueOfFunc(name);
7816        };
7817        Enum2.put0 = function(map, name, value) {
7818          map[name] = value;
7819        };
7820        Enum2.prototype.compareTo$java_lang_Enum = function(other) {
7821          return this.__ordinal - other.__ordinal;
7822        };
7823        Enum2.prototype.compareTo = function(other) {
7824          if (other != null || other === null) {
7825            return this.compareTo$java_lang_Enum(other);
7826          } else
7827            throw new Error("invalid overload");
7828        };
7829        Enum2.prototype.getDeclaringClass = function() {
7830          return null;
7831        };
7832        Enum2.prototype.name = function() {
7833          return this.__name != null ? this.__name : "" + this.__ordinal;
7834        };
7835        Enum2.prototype.ordinal = function() {
7836          return this.__ordinal;
7837        };
7838        Enum2.prototype.toString = function() {
7839          return this.name();
7840        };
7841        return Enum2;
7842      })()
7843    );
7844    lang2.Enum = Enum;
7845    Enum["__class"] = "java.lang.Enum";
7846    Enum["__interfaces"] = ["java.lang.Comparable", "java.io.Serializable"];
7847  })(lang = java2.lang || (java2.lang = {}));
7848})(java || (java = {}));
7849(function(java2) {
7850  var beans;
7851  (function(beans2) {
7852    var Beans = (
7853      /** @class */
7854      (function() {
7855        function Beans2() {
7856        }
7857        Beans2.isDesignTime = function() {
7858          return false;
7859        };
7860        return Beans2;
7861      })()
7862    );
7863    beans2.Beans = Beans;
7864    Beans["__class"] = "java.beans.Beans";
7865  })(beans = java2.beans || (java2.beans = {}));
7866})(java || (java = {}));
7867(function(java2) {
7868  var beans;
7869  (function(beans2) {
7870    var PropertyDescriptor = (
7871      /** @class */
7872      (function() {
7873        function PropertyDescriptor2() {
7874        }
7875        PropertyDescriptor2.prototype.getPropertyType = function() {
7876          return null;
7877        };
7878        return PropertyDescriptor2;
7879      })()
7880    );
7881    beans2.PropertyDescriptor = PropertyDescriptor;
7882    PropertyDescriptor["__class"] = "java.beans.PropertyDescriptor";
7883  })(beans = java2.beans || (java2.beans = {}));
7884})(java || (java = {}));
7885(function(java2) {
7886  var nio;
7887  (function(nio2) {
7888    var file;
7889    (function(file2) {
7890      var Paths = (
7891        /** @class */
7892        (function() {
7893          function Paths2() {
7894          }
7895          Paths2.get = function() {
7896            var paths = [];
7897            for (var _i = 0; _i < arguments.length; _i++) {
7898              paths[_i] = arguments[_i];
7899            }
7900            return new java2.nio.file.Path(paths.join(java2.nio.file.Path.PATH_SEPARATOR_$LI$()));
7901          };
7902          return Paths2;
7903        })()
7904      );
7905      file2.Paths = Paths;
7906      Paths["__class"] = "java.nio.file.Paths";
7907    })(file = nio2.file || (nio2.file = {}));
7908  })(nio = java2.nio || (java2.nio = {}));
7909})(java || (java = {}));
7910(function(java2) {
7911  var nio;
7912  (function(nio2) {
7913    var ByteOrder = (
7914      /** @class */
7915      (function() {
7916        function ByteOrder2() {
7917        }
7918        ByteOrder2.BIG_ENDIAN_$LI$ = function() {
7919          if (ByteOrder2.BIG_ENDIAN == null) {
7920            ByteOrder2.BIG_ENDIAN = new ByteOrder2();
7921          }
7922          return ByteOrder2.BIG_ENDIAN;
7923        };
7924        ByteOrder2.LITTLE_ENDIAN_$LI$ = function() {
7925          if (ByteOrder2.LITTLE_ENDIAN == null) {
7926            ByteOrder2.LITTLE_ENDIAN = new ByteOrder2();
7927          }
7928          return ByteOrder2.LITTLE_ENDIAN;
7929        };
7930        ByteOrder2.prototype.toString = function() {
7931          return this === ByteOrder2.BIG_ENDIAN_$LI$() ? "BIG_ENDIAN" : "LITTLE_ENDIAN";
7932        };
7933        ByteOrder2.nativeOrder = function() {
7934          if (ByteOrder2.NativeInstanceHolder.INSTANCE == null) {
7935            ByteOrder2.NativeInstanceHolder.INSTANCE = ByteOrder2.NativeInstanceHolder.nativeOrderTester();
7936          }
7937          return ByteOrder2.NativeInstanceHolder.INSTANCE;
7938        };
7939        return ByteOrder2;
7940      })()
7941    );
7942    nio2.ByteOrder = ByteOrder;
7943    ByteOrder["__class"] = "java.nio.ByteOrder";
7944    (function(ByteOrder2) {
7945      var NativeInstanceHolder = (
7946        /** @class */
7947        (function() {
7948          function NativeInstanceHolder2() {
7949          }
7950          NativeInstanceHolder2.nativeOrderTester = function() {
7951            var arrayBuffer = new ArrayBuffer(2);
7952            var uint8Array = new Uint8Array(arrayBuffer);
7953            var uint16array = new Uint16Array(arrayBuffer);
7954            uint8Array.set(Uint8Array.from([170, 187]), 0);
7955            if (uint16array[0] === 48042)
7956              return java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$();
7957            if (uint16array[0] === 43707)
7958              return java2.nio.ByteOrder.BIG_ENDIAN_$LI$();
7959            throw new Error("Something crazy just happened in native order test");
7960          };
7961          NativeInstanceHolder2.INSTANCE = null;
7962          return NativeInstanceHolder2;
7963        })()
7964      );
7965      ByteOrder2.NativeInstanceHolder = NativeInstanceHolder;
7966      NativeInstanceHolder["__class"] = "java.nio.ByteOrder.NativeInstanceHolder";
7967    })(ByteOrder = nio2.ByteOrder || (nio2.ByteOrder = {}));
7968  })(nio = java2.nio || (java2.nio = {}));
7969})(java || (java = {}));
7970(function(java2) {
7971  var nio;
7972  (function(nio2) {
7973    var Buffer = (
7974      /** @class */
7975      (function() {
7976        function Buffer2(capacity, readOnly) {
7977          if (this._capacity === void 0) {
7978            this._capacity = 0;
7979          }
7980          if (this.readOnly === void 0) {
7981            this.readOnly = false;
7982          }
7983          if (this._position === void 0) {
7984            this._position = 0;
7985          }
7986          if (this._limit === void 0) {
7987            this._limit = 0;
7988          }
7989          if (this._mark === void 0) {
7990            this._mark = 0;
7991          }
7992          this._capacity = capacity;
7993          this.readOnly = readOnly;
7994          this._position = 0;
7995          this._limit = capacity;
7996          this._mark = -1;
7997        }
7998        Buffer2.prototype.arrayOffset = function() {
7999          return 0;
8000        };
8001        Buffer2.prototype.capacity = function() {
8002          return this._capacity;
8003        };
8004        Buffer2.prototype.clear = function() {
8005          this._limit = this._capacity;
8006          this._position = 0;
8007          this._mark = -1;
8008          return this;
8009        };
8010        Buffer2.prototype.flip = function() {
8011          this._limit = this._position;
8012          this._position = 0;
8013          this._mark = -1;
8014          return this;
8015        };
8016        Buffer2.prototype.hasArray = function() {
8017          return this.array() != null;
8018        };
8019        Buffer2.prototype.hasRemaining = function() {
8020          return this._position < this._limit;
8021        };
8022        Buffer2.prototype.isDirect = function() {
8023          return false;
8024        };
8025        Buffer2.prototype.isReadOnly = function() {
8026          return this.readOnly;
8027        };
8028        Buffer2.prototype.limit$ = function() {
8029          return this._limit;
8030        };
8031        Buffer2.prototype.limit$int = function(newLimit) {
8032          if (newLimit > this._capacity)
8033            throw new java2.lang.IllegalArgumentException("limit is bigger than capacity");
8034          this._limit = newLimit;
8035          this._position = Math.min(this._position, this._limit);
8036          if (this._mark > this._limit)
8037            this._mark = -1;
8038          return this;
8039        };
8040        Buffer2.prototype.limit = function(newLimit) {
8041          if (typeof newLimit === "number" || newLimit === null) {
8042            return this.limit$int(newLimit);
8043          } else if (newLimit === void 0) {
8044            return this.limit$();
8045          } else
8046            throw new Error("invalid overload");
8047        };
8048        Buffer2.prototype.mark = function() {
8049          this._mark = this._position;
8050          return this;
8051        };
8052        Buffer2.prototype.position$ = function() {
8053          return this._position;
8054        };
8055        Buffer2.prototype.position$int = function(newPosition) {
8056          if (newPosition > this._limit)
8057            throw new java2.lang.IllegalArgumentException("position is bigger than limit");
8058          this._position = newPosition;
8059          if (this._mark > this._position)
8060            this._mark = -1;
8061          return this;
8062        };
8063        Buffer2.prototype.position = function(newPosition) {
8064          if (typeof newPosition === "number" || newPosition === null) {
8065            return this.position$int(newPosition);
8066          } else if (newPosition === void 0) {
8067            return this.position$();
8068          } else
8069            throw new Error("invalid overload");
8070        };
8071        Buffer2.prototype.remaining = function() {
8072          return this._limit - this._position;
8073        };
8074        Buffer2.prototype.reset = function() {
8075          if (this._mark === -1)
8076            throw new java2.nio.InvalidMarkException();
8077          this._position = this._mark;
8078          return this;
8079        };
8080        Buffer2.prototype.rewind = function() {
8081          this._position = 0;
8082          this._mark = -1;
8083          return this;
8084        };
8085        return Buffer2;
8086      })()
8087    );
8088    nio2.Buffer = Buffer;
8089    Buffer["__class"] = "java.nio.Buffer";
8090  })(nio = java2.nio || (java2.nio = {}));
8091})(java || (java = {}));
8092(function(java2) {
8093  var nio;
8094  (function(nio2) {
8095    var charset;
8096    (function(charset2) {
8097      var Charset = (
8098        /** @class */
8099        (function() {
8100          function Charset2(name, aliasesIgnored) {
8101            if (this.__name === void 0) {
8102              this.__name = null;
8103            }
8104            this.__name = name;
8105          }
8106          Charset2.availableCharsets = function() {
8107            if (Charset2.AvailableCharsets.CHARSETS == null) {
8108              var map = new java2.util.TreeMap();
8109              map.put(javaemul.internal.EmulatedCharset.ISO_8859_1_$LI$().name(), javaemul.internal.EmulatedCharset.ISO_8859_1_$LI$());
8110              map.put(javaemul.internal.EmulatedCharset.ISO_LATIN_1_$LI$().name(), javaemul.internal.EmulatedCharset.ISO_LATIN_1_$LI$());
8111              map.put(javaemul.internal.EmulatedCharset.UTF_8_$LI$().name(), javaemul.internal.EmulatedCharset.UTF_8_$LI$());
8112              Charset2.AvailableCharsets.CHARSETS = java2.util.Collections.unmodifiableSortedMap(map);
8113            }
8114            return Charset2.AvailableCharsets.CHARSETS;
8115          };
8116          Charset2.forName = function(charsetName) {
8117            javaemul.internal.InternalPreconditions.checkArgument(charsetName != null, "Null charset name");
8118            charsetName = charsetName.toUpperCase();
8119            if (javaemul.internal.EmulatedCharset.ISO_8859_1_$LI$().name() === charsetName) {
8120              return javaemul.internal.EmulatedCharset.ISO_8859_1_$LI$();
8121            } else if (javaemul.internal.EmulatedCharset.ISO_LATIN_1_$LI$().name() === charsetName) {
8122              return javaemul.internal.EmulatedCharset.ISO_LATIN_1_$LI$();
8123            } else if (javaemul.internal.EmulatedCharset.UTF_8_$LI$().name() === charsetName) {
8124              return javaemul.internal.EmulatedCharset.UTF_8_$LI$();
8125            }
8126            if (!Charset2.createLegalCharsetNameRegex().test(charsetName)) {
8127              throw new java2.nio.charset.IllegalCharsetNameException(charsetName);
8128            } else {
8129              throw new java2.nio.charset.UnsupportedCharsetException(charsetName);
8130            }
8131          };
8132          Charset2.createLegalCharsetNameRegex = function() {
8133            return new RegExp("^[A-Za-z0-9][\\w-:\\.\\+]*$");
8134          };
8135          Charset2.prototype.name = function() {
8136            return this.__name;
8137          };
8138          Charset2.prototype.compareTo$java_nio_charset_Charset = function(that) {
8139            return (
8140              /* compareToIgnoreCase */
8141              this.__name.toUpperCase().localeCompare(that.__name.toUpperCase())
8142            );
8143          };
8144          Charset2.prototype.compareTo = function(that) {
8145            if (that != null && that instanceof java2.nio.charset.Charset || that === null) {
8146              return this.compareTo$java_nio_charset_Charset(that);
8147            } else
8148              throw new Error("invalid overload");
8149          };
8150          Charset2.prototype.hashCode = function() {
8151            return (
8152              /* hashCode */
8153              (function(o) {
8154                if (o.hashCode) {
8155                  return o.hashCode();
8156                } else {
8157                  return o.toString().split("").reduce(function(prevHash, currVal) {
8158                    return (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0;
8159                  }, 0);
8160                }
8161              })(this.__name)
8162            );
8163          };
8164          Charset2.prototype.equals = function(o) {
8165            if (o === this) {
8166              return true;
8167            }
8168            if (!(o != null && o instanceof java2.nio.charset.Charset)) {
8169              return false;
8170            }
8171            var that = o;
8172            return this.__name === that.__name;
8173          };
8174          Charset2.prototype.toString = function() {
8175            return this.__name;
8176          };
8177          return Charset2;
8178        })()
8179      );
8180      charset2.Charset = Charset;
8181      Charset["__class"] = "java.nio.charset.Charset";
8182      Charset["__interfaces"] = ["java.lang.Comparable"];
8183      (function(Charset2) {
8184        var AvailableCharsets = (
8185          /** @class */
8186          (function() {
8187            function AvailableCharsets2() {
8188            }
8189            AvailableCharsets2.CHARSETS = null;
8190            return AvailableCharsets2;
8191          })()
8192        );
8193        Charset2.AvailableCharsets = AvailableCharsets;
8194        AvailableCharsets["__class"] = "java.nio.charset.Charset.AvailableCharsets";
8195      })(Charset = charset2.Charset || (charset2.Charset = {}));
8196    })(charset = nio2.charset || (nio2.charset = {}));
8197  })(nio = java2.nio || (java2.nio = {}));
8198})(java || (java = {}));
8199(function(java2) {
8200  var text;
8201  (function(text2) {
8202    var Collator = (
8203      /** @class */
8204      (function() {
8205        function Collator2() {
8206        }
8207        Collator2.getInstance = function() {
8208          if (Collator2.collator == null) {
8209            Collator2.collator = new Collator2();
8210          }
8211          return Collator2.collator;
8212        };
8213        Collator2.prototype.compare = function(a, b) {
8214          return a.localeCompare(b);
8215        };
8216        Collator2.collator = null;
8217        return Collator2;
8218      })()
8219    );
8220    text2.Collator = Collator;
8221    Collator["__class"] = "java.text.Collator";
8222    Collator["__interfaces"] = ["java.util.Comparator"];
8223  })(text = java2.text || (java2.text = {}));
8224})(java || (java = {}));
8225(function(java2) {
8226  var text;
8227  (function(text2) {
8228    var Normalizer = (
8229      /** @class */
8230      (function() {
8231        function Normalizer2() {
8232        }
8233        Normalizer2.normalize = function(src, form) {
8234          return src.toString().normalize(
8235            /* Enum.name */
8236            java2.text.Normalizer.Form[form]
8237          ).toString();
8238        };
8239        return Normalizer2;
8240      })()
8241    );
8242    text2.Normalizer = Normalizer;
8243    Normalizer["__class"] = "java.text.Normalizer";
8244    (function(Normalizer2) {
8245      var Form;
8246      (function(Form2) {
8247        Form2[Form2["NFD"] = 0] = "NFD";
8248        Form2[Form2["NFC"] = 1] = "NFC";
8249        Form2[Form2["NFKD"] = 2] = "NFKD";
8250        Form2[Form2["NFKC"] = 3] = "NFKC";
8251      })(Form = Normalizer2.Form || (Normalizer2.Form = {}));
8252    })(Normalizer = text2.Normalizer || (text2.Normalizer = {}));
8253  })(text = java2.text || (java2.text = {}));
8254})(java || (java = {}));
8255(function(java2) {
8256  var text;
8257  (function(text2) {
8258    var ParsePosition = (
8259      /** @class */
8260      (function() {
8261        function ParsePosition2(index) {
8262          this.index = 0;
8263          this.errorIndex = -1;
8264          this.index = index;
8265        }
8266        ParsePosition2.prototype.getIndex = function() {
8267          return this.index;
8268        };
8269        ParsePosition2.prototype.setIndex = function(index) {
8270          this.index = index;
8271        };
8272        ParsePosition2.prototype.setErrorIndex = function(ei) {
8273          this.errorIndex = ei;
8274        };
8275        ParsePosition2.prototype.getErrorIndex = function() {
8276          return this.errorIndex;
8277        };
8278        ParsePosition2.prototype.equals = function(obj) {
8279          if (obj == null)
8280            return false;
8281          if (!(obj != null && obj instanceof java2.text.ParsePosition))
8282            return false;
8283          var other = obj;
8284          return this.index === other.index && this.errorIndex === other.errorIndex;
8285        };
8286        ParsePosition2.prototype.hashCode = function() {
8287          return this.errorIndex << 16 | this.index;
8288        };
8289        ParsePosition2.prototype.toString = function() {
8290          return (
8291            /* getName */
8292            (function(c) {
8293              return typeof c === "string" ? c : c["__class"] ? c["__class"] : c["name"];
8294            })(this.constructor) + "[index=" + this.index + ",errorIndex=" + this.errorIndex + "]"
8295          );
8296        };
8297        return ParsePosition2;
8298      })()
8299    );
8300    text2.ParsePosition = ParsePosition;
8301    ParsePosition["__class"] = "java.text.ParsePosition";
8302  })(text = java2.text || (java2.text = {}));
8303})(java || (java = {}));
8304(function(javaemul13) {
8305  var internal;
8306  (function(internal2) {
8307    var stream;
8308    (function(stream2) {
8309      var StreamRowEnd = (
8310        /** @class */
8311        (function(_super) {
8312          __extends(StreamRowEnd2, _super);
8313          function StreamRowEnd2(previous) {
8314            var _this = _super.call(this) || this;
8315            if (_this.previous === void 0) {
8316              _this.previous = null;
8317            }
8318            _this.previous = previous;
8319            return _this;
8320          }
8321          StreamRowEnd2.prototype.chain = function(next) {
8322            if (this.previous != null) {
8323              this.previous.chain(next);
8324            }
8325            this.previous = next;
8326            next.chain(this);
8327          };
8328          StreamRowEnd2.prototype.item = function(a) {
8329            return true;
8330          };
8331          return StreamRowEnd2;
8332        })(javaemul13.internal.stream.TerminalStreamRow)
8333      );
8334      stream2.StreamRowEnd = StreamRowEnd;
8335      StreamRowEnd["__class"] = "javaemul.internal.stream.StreamRowEnd";
8336      StreamRowEnd["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
8337    })(stream = internal2.stream || (internal2.stream = {}));
8338  })(internal = javaemul13.internal || (javaemul13.internal = {}));
8339})(javaemul || (javaemul = {}));
8340(function(javaemul13) {
8341  var internal;
8342  (function(internal2) {
8343    var stream;
8344    (function(stream2) {
8345      var StreamRowAllFilter = (
8346        /** @class */
8347        (function(_super) {
8348          __extends(StreamRowAllFilter2, _super);
8349          function StreamRowAllFilter2(predicate) {
8350            var _this = _super.call(this) || this;
8351            if (_this.predicate === void 0) {
8352              _this.predicate = null;
8353            }
8354            if (_this.predicateValue === void 0) {
8355              _this.predicateValue = false;
8356            }
8357            if (_this.attempts === void 0) {
8358              _this.attempts = 0;
8359            }
8360            _this.predicate = (function(funcInst) {
8361              if (funcInst == null || typeof funcInst == "function") {
8362                return funcInst;
8363              }
8364              return function(arg0) {
8365                return (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0);
8366              };
8367            })(predicate);
8368            return _this;
8369          }
8370          StreamRowAllFilter2.prototype.getPredicateValue = function() {
8371            return this.attempts === 0 || this.predicateValue;
8372          };
8373          StreamRowAllFilter2.prototype.item = function(a) {
8374            ++this.attempts;
8375            this.predicateValue = (function(target) {
8376              return typeof target === "function" ? target(a) : target.test(a);
8377            })(this.predicate) && this.predicateValue;
8378            return this.predicateValue;
8379          };
8380          return StreamRowAllFilter2;
8381        })(javaemul13.internal.stream.TerminalStreamRow)
8382      );
8383      stream2.StreamRowAllFilter = StreamRowAllFilter;
8384      StreamRowAllFilter["__class"] = "javaemul.internal.stream.StreamRowAllFilter";
8385      StreamRowAllFilter["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
8386    })(stream = internal2.stream || (internal2.stream = {}));
8387  })(internal = javaemul13.internal || (javaemul13.internal = {}));
8388})(javaemul || (javaemul = {}));
8389(function(javaemul13) {
8390  var internal;
8391  (function(internal2) {
8392    var stream;
8393    (function(stream2) {
8394      var StreamRowOnceFilter = (
8395        /** @class */
8396        (function(_super) {
8397          __extends(StreamRowOnceFilter2, _super);
8398          function StreamRowOnceFilter2(predicate) {
8399            var _this = _super.call(this) || this;
8400            if (_this.predicate === void 0) {
8401              _this.predicate = null;
8402            }
8403            if (_this.predicateValue === void 0) {
8404              _this.predicateValue = false;
8405            }
8406            _this.firstMatch = java.util.Optional.empty();
8407            _this.predicate = (function(funcInst) {
8408              if (funcInst == null || typeof funcInst == "function") {
8409                return funcInst;
8410              }
8411              return function(arg0) {
8412                return (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0);
8413              };
8414            })(predicate);
8415            return _this;
8416          }
8417          StreamRowOnceFilter2.prototype.getFirstMatch = function() {
8418            return this.firstMatch;
8419          };
8420          StreamRowOnceFilter2.prototype.getPredicateValue = function() {
8421            return this.predicateValue;
8422          };
8423          StreamRowOnceFilter2.prototype.item = function(a) {
8424            this.predicateValue = (function(target) {
8425              return typeof target === "function" ? target(a) : target.test(a);
8426            })(this.predicate);
8427            if (this.predicateValue) {
8428              this.firstMatch = java.util.Optional.of(a);
8429            }
8430            return !this.predicateValue;
8431          };
8432          return StreamRowOnceFilter2;
8433        })(javaemul13.internal.stream.TerminalStreamRow)
8434      );
8435      stream2.StreamRowOnceFilter = StreamRowOnceFilter;
8436      StreamRowOnceFilter["__class"] = "javaemul.internal.stream.StreamRowOnceFilter";
8437      StreamRowOnceFilter["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
8438    })(stream = internal2.stream || (internal2.stream = {}));
8439  })(internal = javaemul13.internal || (javaemul13.internal = {}));
8440})(javaemul || (javaemul = {}));
8441(function(javaemul13) {
8442  var internal;
8443  (function(internal2) {
8444    var stream;
8445    (function(stream2) {
8446      var StreamRowReduce = (
8447        /** @class */
8448        (function(_super) {
8449          __extends(StreamRowReduce2, _super);
8450          function StreamRowReduce2(result, operator) {
8451            var _this = _super.call(this) || this;
8452            if (_this.result === void 0) {
8453              _this.result = null;
8454            }
8455            if (_this.operator === void 0) {
8456              _this.operator = null;
8457            }
8458            _this.result = result;
8459            _this.operator = (function(funcInst) {
8460              if (funcInst == null || typeof funcInst == "function") {
8461                return funcInst;
8462              }
8463              return function(arg0) {
8464                return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
8465              };
8466            })(operator);
8467            return _this;
8468          }
8469          StreamRowReduce2.prototype.getResult = function() {
8470            return this.result;
8471          };
8472          StreamRowReduce2.prototype.item = function(a) {
8473            var _this = this;
8474            this.result = java.util.Optional.of(this.result.map(function(v) {
8475              return (function(target) {
8476                return typeof target === "function" ? target(v, a) : target.apply(v, a);
8477              })(_this.operator);
8478            }).orElse(a));
8479            return true;
8480          };
8481          return StreamRowReduce2;
8482        })(javaemul13.internal.stream.TerminalStreamRow)
8483      );
8484      stream2.StreamRowReduce = StreamRowReduce;
8485      StreamRowReduce["__class"] = "javaemul.internal.stream.StreamRowReduce";
8486      StreamRowReduce["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
8487    })(stream = internal2.stream || (internal2.stream = {}));
8488  })(internal = javaemul13.internal || (javaemul13.internal = {}));
8489})(javaemul || (javaemul = {}));
8490(function(javaemul13) {
8491  var internal;
8492  (function(internal2) {
8493    var stream;
8494    (function(stream2) {
8495      var StreamRowCount = (
8496        /** @class */
8497        (function(_super) {
8498          __extends(StreamRowCount2, _super);
8499          function StreamRowCount2() {
8500            var _this = _super.call(this) || this;
8501            if (_this.count === void 0) {
8502              _this.count = 0;
8503            }
8504            return _this;
8505          }
8506          StreamRowCount2.prototype.getCount = function() {
8507            return this.count;
8508          };
8509          StreamRowCount2.prototype.item = function(a) {
8510            ++this.count;
8511            return true;
8512          };
8513          return StreamRowCount2;
8514        })(javaemul13.internal.stream.TerminalStreamRow)
8515      );
8516      stream2.StreamRowCount = StreamRowCount;
8517      StreamRowCount["__class"] = "javaemul.internal.stream.StreamRowCount";
8518      StreamRowCount["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
8519    })(stream = internal2.stream || (internal2.stream = {}));
8520  })(internal = javaemul13.internal || (javaemul13.internal = {}));
8521})(javaemul || (javaemul = {}));
8522(function(javaemul13) {
8523  var internal;
8524  (function(internal2) {
8525    var stream;
8526    (function(stream2) {
8527      var StreamRowCollector = (
8528        /** @class */
8529        (function(_super) {
8530          __extends(StreamRowCollector2, _super);
8531          function StreamRowCollector2(collection) {
8532            var _this = _super.call(this) || this;
8533            if (_this.collection === void 0) {
8534              _this.collection = null;
8535            }
8536            _this.collection = collection;
8537            return _this;
8538          }
8539          StreamRowCollector2.prototype.item = function(a) {
8540            this.collection.add(a);
8541            return true;
8542          };
8543          StreamRowCollector2.prototype.end = function() {
8544            for (var index = this.collection.iterator(); index.hasNext(); ) {
8545              var item = index.next();
8546              {
8547                if (!this.next.item(item)) {
8548                  break;
8549                }
8550              }
8551            }
8552            this.next.end();
8553          };
8554          return StreamRowCollector2;
8555        })(javaemul13.internal.stream.TransientStreamRow)
8556      );
8557      stream2.StreamRowCollector = StreamRowCollector;
8558      StreamRowCollector["__class"] = "javaemul.internal.stream.StreamRowCollector";
8559      StreamRowCollector["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
8560    })(stream = internal2.stream || (internal2.stream = {}));
8561  })(internal = javaemul13.internal || (javaemul13.internal = {}));
8562})(javaemul || (javaemul = {}));
8563(function(javaemul13) {
8564  var internal;
8565  (function(internal2) {
8566    var stream;
8567    (function(stream2) {
8568      var StreamRowMap = (
8569        /** @class */
8570        (function(_super) {
8571          __extends(StreamRowMap2, _super);
8572          function StreamRowMap2(map) {
8573            var _this = _super.call(this) || this;
8574            if (_this.map === void 0) {
8575              _this.map = null;
8576            }
8577            _this.map = (function(funcInst) {
8578              if (funcInst == null || typeof funcInst == "function") {
8579                return funcInst;
8580              }
8581              return function(arg0) {
8582                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
8583              };
8584            })(map);
8585            return _this;
8586          }
8587          StreamRowMap2.prototype.item = function(a) {
8588            return this.next.item((function(target) {
8589              return typeof target === "function" ? target(a) : target.apply(a);
8590            })(this.map));
8591          };
8592          StreamRowMap2.prototype.end = function() {
8593            this.next.end();
8594          };
8595          return StreamRowMap2;
8596        })(javaemul13.internal.stream.TransientStreamRow)
8597      );
8598      stream2.StreamRowMap = StreamRowMap;
8599      StreamRowMap["__class"] = "javaemul.internal.stream.StreamRowMap";
8600      StreamRowMap["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
8601    })(stream = internal2.stream || (internal2.stream = {}));
8602  })(internal = javaemul13.internal || (javaemul13.internal = {}));
8603})(javaemul || (javaemul = {}));
8604(function(javaemul13) {
8605  var internal;
8606  (function(internal2) {
8607    var stream;
8608    (function(stream2) {
8609      var StreamRowFilter = (
8610        /** @class */
8611        (function(_super) {
8612          __extends(StreamRowFilter2, _super);
8613          function StreamRowFilter2(predicate) {
8614            var _this = _super.call(this) || this;
8615            if (_this.predicate === void 0) {
8616              _this.predicate = null;
8617            }
8618            _this.predicate = (function(funcInst) {
8619              if (funcInst == null || typeof funcInst == "function") {
8620                return funcInst;
8621              }
8622              return function(arg0) {
8623                return (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0);
8624              };
8625            })(predicate);
8626            return _this;
8627          }
8628          StreamRowFilter2.prototype.item = function(a) {
8629            if ((function(target) {
8630              return typeof target === "function" ? target(a) : target.test(a);
8631            })(this.predicate)) {
8632              return this.next.item(a);
8633            }
8634            return true;
8635          };
8636          StreamRowFilter2.prototype.end = function() {
8637            this.next.end();
8638          };
8639          return StreamRowFilter2;
8640        })(javaemul13.internal.stream.TransientStreamRow)
8641      );
8642      stream2.StreamRowFilter = StreamRowFilter;
8643      StreamRowFilter["__class"] = "javaemul.internal.stream.StreamRowFilter";
8644      StreamRowFilter["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
8645    })(stream = internal2.stream || (internal2.stream = {}));
8646  })(internal = javaemul13.internal || (javaemul13.internal = {}));
8647})(javaemul || (javaemul = {}));
8648(function(javaemul13) {
8649  var internal;
8650  (function(internal2) {
8651    var stream;
8652    (function(stream2) {
8653      var StreamRowFilterFlop = (
8654        /** @class */
8655        (function(_super) {
8656          __extends(StreamRowFilterFlop2, _super);
8657          function StreamRowFilterFlop2(predicate) {
8658            var _this = _super.call(this) || this;
8659            if (_this.predicate === void 0) {
8660              _this.predicate = null;
8661            }
8662            _this.predicate = (function(funcInst) {
8663              if (funcInst == null || typeof funcInst == "function") {
8664                return funcInst;
8665              }
8666              return function(arg0) {
8667                return (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0);
8668              };
8669            })(predicate);
8670            return _this;
8671          }
8672          StreamRowFilterFlop2.prototype.item = function(a) {
8673            var test = (function(target) {
8674              return typeof target === "function" ? target(a) : target.test(a);
8675            })(this.predicate);
8676            if (test) {
8677              return this.next.item(a);
8678            }
8679            return false;
8680          };
8681          StreamRowFilterFlop2.prototype.end = function() {
8682            this.next.end();
8683          };
8684          return StreamRowFilterFlop2;
8685        })(javaemul13.internal.stream.TransientStreamRow)
8686      );
8687      stream2.StreamRowFilterFlop = StreamRowFilterFlop;
8688      StreamRowFilterFlop["__class"] = "javaemul.internal.stream.StreamRowFilterFlop";
8689      StreamRowFilterFlop["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
8690    })(stream = internal2.stream || (internal2.stream = {}));
8691  })(internal = javaemul13.internal || (javaemul13.internal = {}));
8692})(javaemul || (javaemul = {}));
8693(function(javaemul13) {
8694  var internal;
8695  (function(internal2) {
8696    var stream;
8697    (function(stream2) {
8698      var StreamRowFlatMap = (
8699        /** @class */
8700        (function(_super) {
8701          __extends(StreamRowFlatMap2, _super);
8702          function StreamRowFlatMap2(flatMap) {
8703            var _this = _super.call(this) || this;
8704            if (_this.flatMap === void 0) {
8705              _this.flatMap = null;
8706            }
8707            _this.flatMap = (function(funcInst) {
8708              if (funcInst == null || typeof funcInst == "function") {
8709                return funcInst;
8710              }
8711              return function(arg0) {
8712                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
8713              };
8714            })(flatMap);
8715            return _this;
8716          }
8717          StreamRowFlatMap2.prototype.item = function(a) {
8718            var _this = this;
8719            var subStream = (function(target) {
8720              return typeof target === "function" ? target(a) : target.apply(a);
8721            })(this.flatMap);
8722            try {
8723              try {
8724                subStream.forEach(function(o) {
8725                  if (!_this.next.item(o)) {
8726                    throw new javaemul13.internal.stream.StopException();
8727                  }
8728                });
8729              } catch (e) {
8730                return false;
8731              }
8732            } finally {
8733              subStream.close();
8734            }
8735            return true;
8736          };
8737          StreamRowFlatMap2.prototype.end = function() {
8738            this.next.end();
8739          };
8740          return StreamRowFlatMap2;
8741        })(javaemul13.internal.stream.TransientStreamRow)
8742      );
8743      stream2.StreamRowFlatMap = StreamRowFlatMap;
8744      StreamRowFlatMap["__class"] = "javaemul.internal.stream.StreamRowFlatMap";
8745      StreamRowFlatMap["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
8746    })(stream = internal2.stream || (internal2.stream = {}));
8747  })(internal = javaemul13.internal || (javaemul13.internal = {}));
8748})(javaemul || (javaemul = {}));
8749(function(javaemul13) {
8750  var internal;
8751  (function(internal2) {
8752    var DoubleHelper = (
8753      /** @class */
8754      (function(_super) {
8755        __extends(DoubleHelper2, _super);
8756        function DoubleHelper2(s) {
8757          var _this = this;
8758          if (typeof s === "string" || s === null) {
8759            var __args = arguments;
8760            _this = _super.call(this) || this;
8761          } else if (typeof s === "number" || s === null) {
8762            var __args = arguments;
8763            var value = __args[0];
8764            _this = _super.call(this) || this;
8765          } else
8766            throw new Error("invalid overload");
8767          return _this;
8768        }
8769        DoubleHelper2.compare = function(x, y) {
8770          if (x < y) {
8771            return -1;
8772          }
8773          if (x > y) {
8774            return 1;
8775          }
8776          if (x === y) {
8777            return 0;
8778          }
8779          if (DoubleHelper2.isNaN(x)) {
8780            if (DoubleHelper2.isNaN(y)) {
8781              return 0;
8782            } else {
8783              return 1;
8784            }
8785          } else {
8786            return -1;
8787          }
8788        };
8789        DoubleHelper2.doubleToLongBits = function(value) {
8790          if (DoubleHelper2.isNaN(value)) {
8791            return 9221120237041091e3;
8792          }
8793          var negative = false;
8794          if (value === 0) {
8795            if (1 / value === DoubleHelper2.NEGATIVE_INFINITY) {
8796              return -9223372036854776e3;
8797            } else {
8798              return 0;
8799            }
8800          }
8801          if (value < 0) {
8802            negative = true;
8803            value = -value;
8804          }
8805          if (DoubleHelper2.isInfinite(value)) {
8806            if (negative) {
8807              return -4503599627370496;
8808            } else {
8809              return 9218868437227405e3;
8810            }
8811          }
8812          var exp = 0;
8813          if (value < 1) {
8814            var bit = 512;
8815            for (var i = 0; i < 10; i++, bit >>= 1) {
8816              {
8817                if (value < DoubleHelper2.PowersTable.invPowers_$LI$()[i] && exp - bit >= -1023) {
8818                  value *= DoubleHelper2.PowersTable.powers_$LI$()[i];
8819                  exp -= bit;
8820                }
8821              }
8822              ;
8823            }
8824            if (value < 1 && exp - 1 >= -1023) {
8825              value *= 2;
8826              exp--;
8827            }
8828          } else if (value >= 2) {
8829            var bit = 512;
8830            for (var i = 0; i < 10; i++, bit >>= 1) {
8831              {
8832                if (value >= DoubleHelper2.PowersTable.powers_$LI$()[i]) {
8833                  value *= DoubleHelper2.PowersTable.invPowers_$LI$()[i];
8834                  exp += bit;
8835                }
8836              }
8837              ;
8838            }
8839          }
8840          if (exp > -1023) {
8841            value -= 1;
8842          } else {
8843            value *= 0.5;
8844          }
8845          var ihi = (function(n) {
8846            return n < 0 ? Math.ceil(n) : Math.floor(n);
8847          })(value * DoubleHelper2.POWER_20);
8848          value -= ihi * DoubleHelper2.POWER_MINUS_20;
8849          var ilo = (function(n) {
8850            return n < 0 ? Math.ceil(n) : Math.floor(n);
8851          })(value * DoubleHelper2.POWER_52);
8852          ihi |= exp + 1023 << 20;
8853          if (negative) {
8854            ihi |= 2147483648;
8855          }
8856          return ihi << 32 | ilo;
8857        };
8858        DoubleHelper2.hashCode = function(d) {
8859          return d | 0;
8860        };
8861        DoubleHelper2.isInfinite = function(x) {
8862          return x === javaemul13.internal.JsUtils.getInfinity() || x === -javaemul13.internal.JsUtils.getInfinity();
8863        };
8864        DoubleHelper2.isNaN = function(x) {
8865          return isNaN(x);
8866        };
8867        DoubleHelper2.longBitsToDouble = function(bits) {
8868          var ihi = (function(n) {
8869            return n < 0 ? Math.ceil(n) : Math.floor(n);
8870          })(bits >> 32);
8871          var ilo = (function(n) {
8872            return n < 0 ? Math.ceil(n) : Math.floor(n);
8873          })(bits & 4294967295);
8874          if (ihi < 0) {
8875            ihi += 4294967296;
8876          }
8877          if (ilo < 0) {
8878            ilo += 4294967296;
8879          }
8880          var negative = (ihi & -2147483648) !== 0;
8881          var exp = ihi >> 20 & 2047 | 0;
8882          ihi &= 1048575;
8883          if (exp === 0) {
8884            var d_1 = ihi * DoubleHelper2.POWER_MINUS_20 + ilo * DoubleHelper2.POWER_MINUS_52;
8885            d_1 *= DoubleHelper2.POWER_MINUS_1022;
8886            return negative ? d_1 === 0 ? -0 : -d_1 : d_1;
8887          } else if (exp === 2047) {
8888            if (ihi === 0 && ilo === 0) {
8889              return negative ? DoubleHelper2.NEGATIVE_INFINITY : DoubleHelper2.POSITIVE_INFINITY;
8890            } else {
8891              return DoubleHelper2.NaN;
8892            }
8893          }
8894          exp -= 1023;
8895          var d = 1 + ihi * DoubleHelper2.POWER_MINUS_20 + ilo * DoubleHelper2.POWER_MINUS_52;
8896          if (exp > 0) {
8897            var bit = 512;
8898            for (var i = 0; i < 10; i++, bit >>= 1) {
8899              {
8900                if (exp >= bit) {
8901                  d *= DoubleHelper2.PowersTable.powers_$LI$()[i];
8902                  exp -= bit;
8903                }
8904              }
8905              ;
8906            }
8907          } else if (exp < 0) {
8908            while (exp < 0) {
8909              {
8910                var bit = 512;
8911                for (var i = 0; i < 10; i++, bit >>= 1) {
8912                  {
8913                    if (exp <= -bit) {
8914                      d *= DoubleHelper2.PowersTable.invPowers_$LI$()[i];
8915                      exp += bit;
8916                    }
8917                  }
8918                  ;
8919                }
8920              }
8921            }
8922            ;
8923          }
8924          return negative ? -d : d;
8925        };
8926        DoubleHelper2.parseDouble = function(s) {
8927          return internal2.NumberHelper.__parseAndValidateDouble(s);
8928        };
8929        DoubleHelper2.toString = function(b) {
8930          return (
8931            /* valueOf */
8932            String(b).toString()
8933          );
8934        };
8935        DoubleHelper2.valueOf$double = function(d) {
8936          return new Number(d);
8937        };
8938        DoubleHelper2.valueOf$java_lang_String = function(s) {
8939          return new Number(s);
8940        };
8941        DoubleHelper2.valueOf = function(s) {
8942          if (typeof s === "string" || s === null) {
8943            return javaemul13.internal.DoubleHelper.valueOf$java_lang_String(s);
8944          }
8944 else if (typeof s === "number" || s === null) {
8945            return javaemul13.internal.DoubleHelper.valueOf$double(s);
8946          } else
8947            throw new Error("invalid overload");
8948        };
8949        DoubleHelper2.prototype.byteValue = function() {
8950          return this.doubleValue() | 0;
8951        };
8952        DoubleHelper2.prototype.compareTo$javaemul_internal_DoubleHelper = function(b) {
8953          return DoubleHelper2.compare(this.doubleValue(), b.doubleValue());
8954        };
8955        DoubleHelper2.prototype.compareTo = function(b) {
8956          if (b != null && b instanceof javaemul13.internal.DoubleHelper || b === null) {
8957            return this.compareTo$javaemul_internal_DoubleHelper(b);
8958          } else
8959            throw new Error("invalid overload");
8960        };
8961        DoubleHelper2.prototype.doubleValue = function() {
8962          return DoubleHelper2.unsafeCast(javaemul13.internal.InternalPreconditions.checkNotNull(this));
8963        };
8964        DoubleHelper2.unsafeCast = function(instance) {
8965          return instance;
8966        };
8967        DoubleHelper2.prototype.equals = function(o) {
8968          return javaemul13.internal.InternalPreconditions.checkNotNull(this) === o;
8969        };
8970        DoubleHelper2.prototype.floatValue = function() {
8971          return this.doubleValue();
8972        };
8973        DoubleHelper2.prototype.hashCode = function() {
8974          return DoubleHelper2.hashCode(this.doubleValue());
8975        };
8976        DoubleHelper2.prototype.intValue = function() {
8977          return this.doubleValue() | 0;
8978        };
8979        DoubleHelper2.prototype.isInfinite = function() {
8980          return DoubleHelper2.isInfinite(this.doubleValue());
8981        };
8982        DoubleHelper2.prototype.isNaN = function() {
8983          return DoubleHelper2.isNaN(this.doubleValue());
8984        };
8985        DoubleHelper2.prototype.longValue = function() {
8986          return (function(n) {
8987            return n < 0 ? Math.ceil(n) : Math.floor(n);
8988          })(this.doubleValue());
8989        };
8990        DoubleHelper2.prototype.shortValue = function() {
8991          return this.doubleValue() | 0;
8992        };
8993        DoubleHelper2.prototype.toString = function() {
8994          return DoubleHelper2.toString(this.doubleValue());
8995        };
8996        DoubleHelper2.MAX_VALUE = 17976931348623157e292;
8997        DoubleHelper2.MIN_VALUE = 5e-324;
8998        DoubleHelper2.MIN_NORMAL = 22250738585072014e-324;
8999        DoubleHelper2.MAX_EXPONENT = 1023;
9000        DoubleHelper2.MIN_EXPONENT = -1022;
9001        DoubleHelper2.NaN = 0 / 0;
9002        DoubleHelper2.NEGATIVE_INFINITY = -1 / 0;
9003        DoubleHelper2.POSITIVE_INFINITY = 1 / 0;
9004        DoubleHelper2.SIZE = 64;
9005        DoubleHelper2.POWER_512 = 13407807929942597e138;
9006        DoubleHelper2.POWER_MINUS_512 = 7458340731200207e-170;
9007        DoubleHelper2.POWER_256 = 1157920892373162e62;
9008        DoubleHelper2.POWER_MINUS_256 = 8636168555094445e-93;
9009        DoubleHelper2.POWER_128 = 3402823669209385e23;
9010        DoubleHelper2.POWER_MINUS_128 = 2938735877055719e-54;
9011        DoubleHelper2.POWER_64 = 18446744073709552e3;
9012        DoubleHelper2.POWER_MINUS_64 = 5421010862427522e-35;
9013        DoubleHelper2.POWER_52 = 4503599627370496;
9014        DoubleHelper2.POWER_MINUS_52 = 2220446049250313e-31;
9015        DoubleHelper2.POWER_32 = 4294967296;
9016        DoubleHelper2.POWER_MINUS_32 = 23283064365386963e-26;
9017        DoubleHelper2.POWER_31 = 2147483648;
9018        DoubleHelper2.POWER_20 = 1048576;
9019        DoubleHelper2.POWER_MINUS_20 = 95367431640625e-20;
9020        DoubleHelper2.POWER_16 = 65536;
9021        DoubleHelper2.POWER_MINUS_16 = 152587890625e-16;
9022        DoubleHelper2.POWER_8 = 256;
9023        DoubleHelper2.POWER_MINUS_8 = 390625e-8;
9024        DoubleHelper2.POWER_4 = 16;
9025        DoubleHelper2.POWER_MINUS_4 = 0.0625;
9026        DoubleHelper2.POWER_2 = 4;
9027        DoubleHelper2.POWER_MINUS_2 = 0.25;
9028        DoubleHelper2.POWER_1 = 2;
9029        DoubleHelper2.POWER_MINUS_1 = 0.5;
9030        DoubleHelper2.POWER_MINUS_1022 = 22250738585072014e-324;
9031        return DoubleHelper2;
9032      })(javaemul13.internal.NumberHelper)
9033    );
9034    internal2.DoubleHelper = DoubleHelper;
9035    DoubleHelper["__class"] = "javaemul.internal.DoubleHelper";
9036    DoubleHelper["__interfaces"] = ["java.lang.Comparable", "java.io.Serializable"];
9037    (function(DoubleHelper2) {
9038      var PowersTable = (
9039        /** @class */
9040        (function() {
9041          function PowersTable2() {
9042          }
9043          PowersTable2.powers_$LI$ = function() {
9044            if (PowersTable2.powers == null) {
9045              PowersTable2.powers = [javaemul13.internal.DoubleHelper.POWER_512, javaemul13.internal.DoubleHelper.POWER_256, javaemul13.internal.DoubleHelper.POWER_128, javaemul13.internal.DoubleHelper.POWER_64, javaemul13.internal.DoubleHelper.POWER_32, javaemul13.internal.DoubleHelper.POWER_16, javaemul13.internal.DoubleHelper.POWER_8, javaemul13.internal.DoubleHelper.POWER_4, javaemul13.internal.DoubleHelper.POWER_2, javaemul13.internal.DoubleHelper.POWER_1];
9046            }
9047            return PowersTable2.powers;
9048          };
9049          PowersTable2.invPowers_$LI$ = function() {
9050            if (PowersTable2.invPowers == null) {
9051              PowersTable2.invPowers = [javaemul13.internal.DoubleHelper.POWER_MINUS_512, javaemul13.internal.DoubleHelper.POWER_MINUS_256, javaemul13.internal.DoubleHelper.POWER_MINUS_128, javaemul13.internal.DoubleHelper.POWER_MINUS_64, javaemul13.internal.DoubleHelper.POWER_MINUS_32, javaemul13.internal.DoubleHelper.POWER_MINUS_16, javaemul13.internal.DoubleHelper.POWER_MINUS_8, javaemul13.internal.DoubleHelper.POWER_MINUS_4, javaemul13.internal.DoubleHelper.POWER_MINUS_2, javaemul13.internal.DoubleHelper.POWER_MINUS_1];
9052            }
9053            return PowersTable2.invPowers;
9054          };
9055          return PowersTable2;
9056        })()
9057      );
9058      DoubleHelper2.PowersTable = PowersTable;
9059      PowersTable["__class"] = "javaemul.internal.DoubleHelper.PowersTable";
9060    })(DoubleHelper = internal2.DoubleHelper || (internal2.DoubleHelper = {}));
9061  })(internal = javaemul13.internal || (javaemul13.internal = {}));
9062})(javaemul || (javaemul = {}));
9063(function(javaemul13) {
9064  var internal;
9065  (function(internal2) {
9066    var ShortHelper = (
9067      /** @class */
9068      (function(_super) {
9069        __extends(ShortHelper2, _super);
9070        function ShortHelper2(s) {
9071          var _this = this;
9072          if (typeof s === "string" || s === null) {
9073            var __args = arguments;
9074            _this = _super.call(this) || this;
9075            if (_this.value === void 0) {
9076              _this.value = 0;
9077            }
9078            _this.value = ShortHelper2.parseShort(s);
9079          } else if (typeof s === "number" || s === null) {
9080            var __args = arguments;
9081            var value = __args[0];
9082            _this = _super.call(this) || this;
9083            if (_this.value === void 0) {
9084              _this.value = 0;
9085            }
9086            _this.value = value;
9087          } else
9088            throw new Error("invalid overload");
9089          return _this;
9090        }
9091        ShortHelper2.MIN_VALUE_$LI$ = function() {
9092          if (ShortHelper2.MIN_VALUE == null) {
9093            ShortHelper2.MIN_VALUE = 32768 | 0;
9094          }
9095          return ShortHelper2.MIN_VALUE;
9096        };
9097        ShortHelper2.MAX_VALUE_$LI$ = function() {
9098          if (ShortHelper2.MAX_VALUE == null) {
9099            ShortHelper2.MAX_VALUE = 32767 | 0;
9100          }
9101          return ShortHelper2.MAX_VALUE;
9102        };
9103        ShortHelper2.TYPE_$LI$ = function() {
9104          if (ShortHelper2.TYPE == null) {
9105            ShortHelper2.TYPE = Number;
9106          }
9107          return ShortHelper2.TYPE;
9108        };
9109        ShortHelper2.compare = function(x, y) {
9110          return x - y;
9111        };
9112        ShortHelper2.decode = function(s) {
9113          return ShortHelper2.valueOf$short(internal2.NumberHelper.__decodeAndValidateInt(s, ShortHelper2.MIN_VALUE_$LI$(), ShortHelper2.MAX_VALUE_$LI$()) | 0);
9114        };
9115        ShortHelper2.hashCode = function(s) {
9116          return s;
9117        };
9118        ShortHelper2.parseShort = function(s, radix) {
9119          if (radix === void 0) {
9120            radix = 10;
9121          }
9122          return internal2.NumberHelper.__parseAndValidateInt(s, radix, ShortHelper2.MIN_VALUE_$LI$(), ShortHelper2.MAX_VALUE_$LI$()) | 0;
9123        };
9124        ShortHelper2.reverseBytes = function(s) {
9125          return (s & 255) << 8 | (s & 65280) >> 8 | 0;
9126        };
9127        ShortHelper2.toString = function(b) {
9128          return (
9129            /* valueOf */
9130            String(b).toString()
9131          );
9132        };
9133        ShortHelper2.valueOf$short = function(s) {
9134          if (s > -129 && s < 128) {
9135            var rebase = s + 128;
9136            var result = ShortHelper2.BoxedValues.boxedValues_$LI$()[rebase];
9137            if (result == null) {
9138              result = ShortHelper2.BoxedValues.boxedValues_$LI$()[rebase] = new Number(s);
9139            }
9140            return result;
9141          }
9142          return new Number(s);
9143        };
9144        ShortHelper2.valueOf$java_lang_String = function(s) {
9145          return ShortHelper2.valueOf$java_lang_String$int(s, 10);
9146        };
9147        ShortHelper2.valueOf$java_lang_String$int = function(s, radix) {
9148          return ShortHelper2.valueOf$short(ShortHelper2.parseShort(s, radix));
9149        };
9150        ShortHelper2.valueOf = function(s, radix) {
9151          if ((typeof s === "string" || s === null) && (typeof radix === "
9151number" || radix === null)) {
9152            return javaemul13.internal.ShortHelper.valueOf$java_lang_String$int(s, radix);
9153          } else if ((typeof s === "string" || s === null) && radix === void 0) {
9154            return javaemul13.internal.ShortHelper.valueOf$java_lang_String(s);
9155          } else if ((typeof s === "number" || s === null) && radix === void 0) {
9156            return javaemul13.internal.ShortHelper.valueOf$short(s);
9157          } else
9158            throw new Error("invalid overload");
9159        };
9160        ShortHelper2.prototype.byteValue = function() {
9161          return this.value | 0;
9162        };
9163        ShortHelper2.prototype.compareTo$javaemul_internal_ShortHelper = function(b) {
9164          return ShortHelper2.compare(this.value, b.value);
9165        };
9166        ShortHelper2.prototype.compareTo = function(b) {
9167          if (b != null && b instanceof javaemul13.internal.ShortHelper || b === null) {
9168            return this.compareTo$javaemul_internal_ShortHelper(b);
9169          } else
9170            throw new Error("invalid overload");
9171        };
9172        ShortHelper2.prototype.doubleValue = function() {
9173          return this.value;
9174        };
9175        ShortHelper2.prototype.equals = function(o) {
9176          return o != null && o instanceof javaemul13.internal.ShortHelper && o.value === this.value;
9177        };
9178        ShortHelper2.prototype.floatValue = function() {
9179          return this.value;
9180        };
9181        ShortHelper2.prototype.hashCode = function() {
9182          return ShortHelper2.hashCode(this.value);
9183        };
9184        ShortHelper2.prototype.intValue = function() {
9185          return this.value;
9186        };
9187        ShortHelper2.prototype.longValue = function() {
9188          return this.value;
9189        };
9190        ShortHelper2.prototype.shortValue = function() {
9191          return this.value;
9192        };
9193        ShortHelper2.prototype.toString = function() {
9194          return ShortHelper2.toString(this.value);
9195        };
9196        ShortHelper2.SIZE = 16;
9197        return ShortHelper2;
9198      })(javaemul13.internal.NumberHelper)
9199    );
9200    internal2.ShortHelper = ShortHelper;
9201    ShortHelper["__class"] = "javaemul.internal.ShortHelper";
9202    ShortHelper["__interfaces"] = ["java.lang.Comparable", "java.io.Serializable"];
9203    (function(ShortHelper2) {
9204      var BoxedValues = (
9205        /** @class */
9206        (function() {
9207          function BoxedValues2() {
9208          }
9209          BoxedValues2.boxedValues_$LI$ = function() {
9210            if (BoxedValues2.boxedValues == null) {
9211              BoxedValues2.boxedValues = (function(s) {
9212                var a = [];
9213                while (s-- > 0)
9214                  a.push(null);
9215                return a;
9216              })(256);
9217            }
9218            return BoxedValues2.boxedValues;
9219          };
9220          return BoxedValues2;
9221        })()
9222      );
9223      ShortHelper2.BoxedValues = BoxedValues;
9224      BoxedValues["__class"] = "javaemul.internal.ShortHelper.BoxedValues";
9225    })(ShortHelper = internal2.ShortHelper || (internal2.ShortHelper = {}));
9226  })(internal = javaemul13.internal || (javaemul13.internal = {}));
9227})(javaemul || (javaemul = {}));
9228(function(javaemul13) {
9229  var internal;
9230  (function(internal2) {
9231    var ByteHelper = (
9232      /** @class */
9233      (function(_super) {
9234        __extends(ByteHelper2, _super);
9235        function ByteHelper2(s) {
9236          var _this = this;
9237          if (typeof s === "string" || s === null) {
9238            var __args = arguments;
9239            _this = _super.call(this) || this;
9240            if (_this.value === void 0) {
9241              _this.value = 0;
9242            }
9243            _this.value = ByteHelper2.parseByte(s);
9244          } else if (typeof s === "number" || s === null) {
9245            var __args = arguments;
9246            var value = __args[0];
9247            _this = _super.call(this) || this;
9248            if (_this.value === void 0) {
9249              _this.value = 0;
9250            }
9251            _this.value = value;
9252          } else
9253            throw new Error("invalid overload");
9254          return _this;
9255        }
9256        ByteHelper2.MIN_VALUE_$LI$ = function() {
9257          if (ByteHelper2.MIN_VALUE == null) {
9258            ByteHelper2.MIN_VALUE = 128 | 0;
9259          }
9260          return ByteHelper2.MIN_VALUE;
9261        };
9262        ByteHelper2.MAX_VALUE_$LI$ = function() {
9263          if (ByteHelper2.MAX_VALUE == null) {
9264            ByteHelper2.MAX_VALUE = 127 | 0;
9265          }
9266          return ByteHelper2.MAX_VALUE;
9267        };
9268        ByteHelper2.TYPE_$LI$ = function() {
9269          if (ByteHelper2.TYPE == null) {
9270            ByteHelper2.TYPE = Number;
9271          }
9272          return ByteHelper2.TYPE;
9273        };
9274        ByteHelper2.compare = function(x, y) {
9275          return x - y;
9276        };
9277        ByteHelper2.decode = function(s) {
9278          return ByteHelper2.valueOf$byte(internal2.NumberHelper.__decodeAndValidateInt(s, ByteHelper2.MIN_VALUE_$LI$(), ByteHelper2.MAX_VALUE_$LI$()) | 0);
9279        };
9280        ByteHelper2.hashCode = function(b) {
9281          return b;
9282        };
9283        ByteHelper2.parseByte = function(s, radix) {
9284          if (radix === void 0) {
9285            radix = 10;
9286          }
9287          return internal2.NumberHelper.__parseAndValidateInt(s, radix, ByteHelper2.MIN_VALUE_$LI$(), ByteHelper2.MAX_VALUE_$LI$()) | 0;
9288        };
9289        ByteHelper2.toString = function(b) {
9290          return (
9291            /* valueOf */
9292            String(b).toString()
9293          );
9294        };
9295        ByteHelper2.valueOf$byte = function(b) {
9296          var rebase = b + 128;
9297          var result = ByteHelper2.BoxedValues.boxedValues_$LI$()[rebase];
9298          if (result == null) {
9299            result = ByteHelper2.BoxedValues.boxedValues_$LI$()[rebase] = new Number(b);
9300          }
9301          return result;
9302        };
9303        ByteHelper2.valueOf$java_lang_String = function(s) {
9304          return ByteHelper2.valueOf$java_lang_String$int(s, 10);
9305        };
9306        ByteHelper2.valueOf$java_lang_String$int = function(s, radix) {
9307          return javaemul13.internal.ByteHelper.valueOf(ByteHelper2.parseByte(s, radix));
9308        };
9309        ByteHelper2.valueOf = function(s, radix) {
9310          if ((typeof s === "string" || s === null) && (typeof radix === "number" || radix === null)) {
9311            return javaemul13.internal.ByteHelper.valueOf$java_lang_String$int(s, radix);
9312          } else if ((typeof s === "string" || s === null) && radix === void 0) {
9313            return javaemul13.internal.ByteHelper.valueOf$java_lang_String(s);
9314          }
9314 else if ((typeof s === "number" || s === null) && radix === void 0) {
9315            return javaemul13.internal.ByteHelper.valueOf$byte(s);
9316          } else
9317            throw new Error("invalid overload");
9318        };
9319        ByteHelper2.prototype.byteValue = function() {
9320          return this.value;
9321        };
9322        ByteHelper2.prototype.compareTo$javaemul_internal_ByteHelper = function(b) {
9323          return ByteHelper2.compare(this.value, b.value);
9324        };
9325        ByteHelper2.prototype.compareTo = function(b) {
9326          if (b != null && b instanceof javaemul13.internal.ByteHelper || b === null) {
9327            return this.compareTo$javaemul_internal_ByteHelper(b);
9328          } else
9329            throw new Error("invalid overload");
9330        };
9331        ByteHelper2.prototype.doubleValue = function() {
9332          return this.value;
9333        };
9334        ByteHelper2.prototype.equals = function(o) {
9335          return o != null && o instanceof javaemul13.internal.ByteHelper && o.value === this.value;
9336        };
9337        ByteHelper2.prototype.floatValue = function() {
9338          return this.value;
9339        };
9340        ByteHelper2.prototype.hashCode = function() {
9341          return ByteHelper2.hashCode(this.value);
9342        };
9343        ByteHelper2.prototype.intValue = function() {
9344          return this.value;
9345        };
9346        ByteHelper2.prototype.longValue = function() {
9347          return this.value;
9348        };
9349        ByteHelper2.prototype.shortValue = function() {
9350          return this.value;
9351        };
9352        ByteHelper2.prototype.toString = function() {
9353          return ByteHelper2.toString(this.value);
9354        };
9355        ByteHelper2.SIZE = 8;
9356        return ByteHelper2;
9357      })(javaemul13.internal.NumberHelper)
9358    );
9359    internal2.ByteHelper = ByteHelper;
9360    ByteHelper["__class"] = "javaemul.internal.ByteHelper";
9361    ByteHelper["__interfaces"] = ["java.lang.Comparable", "java.io.Serializable"];
9362    (function(ByteHelper2) {
9363      var BoxedValues = (
9364        /** @class */
9365        (function() {
9366          function BoxedValues2() {
9367          }
9368          BoxedValues2.boxedValues_$LI$ = function() {
9369            if (BoxedValues2.boxedValues == null) {
9370              BoxedValues2.boxedValues = (function(s) {
9371                var a = [];
9372                while (s-- > 0)
9373                  a.push(null);
9374                return a;
9375              })(256);
9376            }
9377            return BoxedValues2.boxedValues;
9378          };
9379          return BoxedValues2;
9380        })()
9381      );
9382      ByteHelper2.BoxedValues = BoxedValues;
9383      BoxedValues["__class"] = "javaemul.internal.ByteHelper.BoxedValues";
9384    })(ByteHelper = internal2.ByteHelper || (internal2.ByteHelper = {}));
9385  })(internal = javaemul13.internal || (javaemul13.internal = {}));
9386})(javaemul || (javaemul = {}));
9387(function(javaemul13) {
9388  var internal;
9389  (function(internal2) {
9390    var FloatHelper = (
9391      /** @class */
9392      (function(_super) {
9393        __extends(FloatHelper2, _super);
9394        function FloatHelper2(s) {
9395          var _this = this;
9396          if (typeof s === "string" || s === null) {
9397            var __args = arguments;
9398            _this = _super.call(this) || this;
9399            if (_this.value === void 0) {
9400              _this.value = 0;
9401            }
9402            _this.value = FloatHelper2.parseFloat(s);
9403          } else if (typeof s === "number" || s === null) {
9404            var __args = arguments;
9405            var value = __args[0];
9406            _this = _super.call(this) || this;
9407            if (_this.value === void 0) {
9408              _this.value = 0;
9409            }
9410            _this.value = value;
9411          } else if (typeof s === "number" || s === null) {
9412            var __args = arguments;
9413            var value = __args[0];
9414            _this = _super.call(this) || this;
9415            if (_this.value === void 0) {
9416              _this.value = 0;
9417            }
9418            _this.value = value;
9419          } else
9420            throw new Error("invalid overload");
9421          return _this;
9422        }
9423        FloatHelper2.compare = function(x, y) {
9424          return javaemul13.internal.DoubleHelper.compare(x, y);
9425        };
9426        FloatHelper2.floatToIntBits = function(value) {
9427          if (FloatHelper2.isNaN(value)) {
9428            return 2143289344;
9429          }
9430          if (value === 0) {
9431            if (1 / value === FloatHelper2.NEGATIVE_INFINITY) {
9432              return -2147483648;
9433            } else {
9434              return 0;
9435            }
9436          }
9437          var negative = false;
9438          if (value < 0) {
9439            negative = true;
9440            value = -value;
9441          }
9442          if (FloatHelper2.isInfinite(value)) {
9443            if (negative) {
9444              return -8388608;
9445            } else {
9446              return 2139095040;
9447            }
9448          }
9449          var l = javaemul13.internal.DoubleHelper.doubleToLongBits(value);
9450          var exp = (l >> 52 & 2047) - 1023 | 0;
9451          var mantissa = (l & 4503599627370495) >> 29 | 0;
9452          if (exp <= -127) {
9453            mantissa = (8388608 | mantissa) >> -127 - exp + 1;
9454            exp = -127;
9455          }
9456          var bits = negative ? FloatHelper2.POWER_31_INT : 0;
9457          bits |= exp + 127 << 23;
9458          bits |= mantissa;
9459          return bits | 0;
9460        };
9461        FloatHelper2.hashCode = function(f) {
9462          return f | 0;
9463        };
9464        FloatHelper2.intBitsToFloat = function(bits) {
9465          var negative = (bits & -2147483648) !== 0;
9466          var exp = bits >> 23 & 255;
9467          bits &= 8388607;
9468          if (exp === 0) {
9469            if (bits === 0) {
9470              return negative ? -0 : 0;
9471            }
9472          } else if (exp === 255) {
9473            if (bits === 0) {
9474              return negative ? FloatHelper2.NEGATIVE_INFINITY : FloatHelper2.POSITIVE_INFINITY;
9475            } else {
9476              return FloatHelper2.NaN;
9477            }
9478          }
9479          if (exp === 0) {
9480            exp = 1;
9481            while ((bits & 8388608) === 0) {
9482              {
9483                bits <<= 1;
9484                exp--;
9485              }
9486            }
9487            ;
9488            bits &= 8388607;
9489          }
9490          var bits64 = negative ? -9223372036854776e3 : 0;
9491          bits64 |= (function(n) {
9492            return n < 0 ? Math.ceil(n) : Math.floor(n);
9493          })(exp + 896) << 52;
9494          bits64 |= (function(n) {
9495            return n < 0 ? Math.ceil(n) : Math.floor(n);
9496          })(bits) << 29;
9497          return javaemul13.internal.DoubleHelper.longBitsToDouble(bits64);
9498        };
9499        FloatHelper2.isInfinite = function(x) {
9500          return javaemul13.internal.DoubleHelper.isInfinite(x);
9501        };
9502        FloatHelper2.isNaN = function(x) {
9503          return javaemul13.internal.DoubleHelper.isNaN(x);
9504        };
9505        FloatHelper2.parseFloat = function(s) {
9506          var doubleValue = internal2.NumberHelper.__parseAndValidateDouble(s);
9507          if (doubleValue > FloatHelper2.MAX_VALUE) {
9508            return FloatHelper2.POSITIVE_INFINITY;
9509          } else if (doubleValue < -FloatHelper2.MAX_VALUE) {
9510            return FloatHelper2.NEGATIVE_INFINITY;
9511          }
9512          return doubleValue;
9513        };
9514        FloatHelper2.toString = function(b) {
9515          return (
9516            /* valueOf */
9517            String(b).toString()
9518          );
9519        };
9520        FloatHelper2.valueOf$float = function(f) {
9521          return new Number(f);
9522        };
9523        FloatHelper2.valueOf$java_lang_String = function(s) {
9524          return new Number(s);
9525        };
9526        FloatHelper2.valueOf = function(s) {
9527          if (typeof s === "string" || s === null) {
9528            return javaemul13.internal.FloatHelper.valueOf$java_lang_String(s);
9529          }
9529 else if (typeof s === "number" || s === null) {
9530            return javaemul13.internal.FloatHelper.valueOf$float(s);
9531          } else
9532            throw new Error("invalid overload");
9533        };
9534        FloatHelper2.prototype.byteValue = function() {
9535          return this.value | 0;
9536        };
9537        FloatHelper2.prototype.compareTo$javaemul_internal_FloatHelper = function(b) {
9538          return FloatHelper2.compare(this.value, b.value);
9539        };
9540        FloatHelper2.prototype.compareTo = function(b) {
9541          if (b != null && b instanceof javaemul13.internal.FloatHelper || b === null) {
9542            return this.compareTo$javaemul_internal_FloatHelper(b);
9543          } else
9544            throw new Error("invalid overload");
9545        };
9546        FloatHelper2.prototype.doubleValue = function() {
9547          return this.value;
9548        };
9549        FloatHelper2.prototype.equals = function(o) {
9550          return o != null && o instanceof javaemul13.internal.FloatHelper && o.value === this.value;
9551        };
9552        FloatHelper2.prototype.floatValue = function() {
9553          return this.value;
9554        };
9555        FloatHelper2.prototype.hashCode = function() {
9556          return FloatHelper2.hashCode(this.value);
9557        };
9558        FloatHelper2.prototype.intValue = function() {
9559          return this.value | 0;
9560        };
9561        FloatHelper2.prototype.isInfinite = function() {
9562          return FloatHelper2.isInfinite(this.value);
9563        };
9564        FloatHelper2.prototype.isNaN = function() {
9565          return FloatHelper2.isNaN(this.value);
9566        };
9567        FloatHelper2.prototype.longValue = function() {
9568          return (function(n) {
9569            return n < 0 ? Math.ceil(n) : Math.floor(n);
9570          })(this.value);
9571        };
9572        FloatHelper2.prototype.shortValue = function() {
9573          return this.value | 0;
9574        };
9575        FloatHelper2.prototype.toString = function() {
9576          return FloatHelper2.toString(this.value);
9577        };
9578        FloatHelper2.MAX_VALUE = 34028235e31;
9579        FloatHelper2.MIN_VALUE = 14e-46;
9580        FloatHelper2.MAX_EXPONENT = 127;
9581        FloatHelper2.MIN_EXPONENT = -126;
9582        FloatHelper2.MIN_NORMAL = 117549435e-46;
9583        FloatHelper2.NaN = 0 / 0;
9584        FloatHelper2.NEGATIVE_INFINITY = -1 / 0;
9585        FloatHelper2.POSITIVE_INFINITY = 1 / 0;
9586        FloatHelper2.SIZE = 32;
9587        FloatHelper2.POWER_31_INT = 2147483648;
9588        return FloatHelper2;
9589      })(javaemul13.internal.NumberHelper)
9590    );
9591    internal2.FloatHelper = FloatHelper;
9592    FloatHelper["__class"] = "javaemul.internal.FloatHelper";
9593    FloatHelper["__interfaces"] = ["java.lang.Comparable", "java.io.Serializable"];
9594  })(internal = javaemul13.internal || (javaemul13.internal = {}));
9595})(javaemul || (javaemul = {}));
9596(function(javaemul13) {
9597  var internal;
9598  (function(internal2) {
9599    var IntegerHelper = (
9600      /** @class */
9601      (function(_super) {
9602        __extends(IntegerHelper2, _super);
9603        function IntegerHelper2(s) {
9604          var _this = this;
9605          if (typeof s === "string" || s === null) {
9606            var __args = arguments;
9607            _this = _super.call(this) || this;
9608            if (_this.value === void 0) {
9609              _this.value = 0;
9610            }
9611            _this.value = IntegerHelper2.parseInt(s);
9612          } else if (typeof s === "number" || s === null) {
9613            var __args = arguments;
9614            var value = __args[0];
9615            _this = _super.call(this) || this;
9616            if (_this.value === void 0) {
9617              _this.value = 0;
9618            }
9619            _this.value = value;
9620          } else
9621            throw new Error("invalid overload");
9622          return _this;
9623        }
9624        IntegerHelper2.bitCount = function(x) {
9625          x -= x >> 1 & 1431655765;
9626          x = (x >> 2 & 858993459) + (x & 858993459);
9627          x = (x >> 4) + x & 252645135;
9628          x += x >> 8;
9629          x += x >> 16;
9630          return x & 63;
9631        };
9632        IntegerHelper2.compare = function(x, y) {
9633          if (x < y) {
9634            return -1;
9635          } else if (x > y) {
9636            return 1;
9637          } else {
9638            return 0;
9639          }
9640        };
9641        IntegerHelper2.decode = function(s) {
9642          return IntegerHelper2.valueOf$int(internal2.NumberHelper.__decodeAndValidateInt(s, IntegerHelper2.MIN_VALUE, IntegerHelper2.MAX_VALUE));
9643        };
9644        IntegerHelper2.hashCode = function(i) {
9645          return i;
9646        };
9647        IntegerHelper2.highestOneBit = function(i) {
9648          if (i < 0) {
9649            return IntegerHelper2.MIN_VALUE;
9650          } else if (i === 0) {
9651            return 0;
9652          } else {
9653            var rtn = void 0;
9654            for (rtn = 1073741824; (rtn & i) === 0; rtn >>= 1) {
9655              {
9656              }
9657              ;
9658            }
9659            return rtn;
9660          }
9661        };
9662        IntegerHelper2.lowestOneBit = function(i) {
9663          return i & -i;
9664        };
9665        IntegerHelper2.numberOfLeadingZeros = function(i) {
9666          if (i < 0) {
9667            return 0;
9668          } else if (i === 0) {
9669            return IntegerHelper2.SIZE;
9670          } else {
9671            var y = void 0;
9672            var m = void 0;
9673            var n = void 0;
9674            y = -(i >> 16);
9675            m = y >> 16 & 16;
9676            n = 16 - m;
9677            i = i >> m;
9678            y = i - 256;
9679            m = y >> 16 & 8;
9680            n += m;
9681            i <<= m;
9682            y = i - 4096;
9683            m = y >> 16 & 4;
9684            n += m;
9685            i <<= m;
9686            y = i - 16384;
9687            m = y >> 16 & 2;
9688            n += m;
9689            i <<= m;
9690            y = i >> 14;
9691            m = y & ~(y >> 1);
9692            return n + 2 - m;
9693          }
9694        };
9695        IntegerHelper2.numberOfTrailingZeros = function(i) {
9696          if (i === 0) {
9697            return IntegerHelper2.SIZE;
9698          } else {
9699            var rtn = 0;
9700            for (var r = 1; (r & i) === 0; r <<= 1) {
9701              {
9702                rtn++;
9703              }
9704              ;
9705            }
9706            return rtn;
9707          }
9708        };
9709        IntegerHelper2.parseInt = function(s, radix) {
9710          if (radix === void 0) {
9711            radix = 10;
9712          }
9713          return internal2.NumberHelper.__parseAndValidateInt(s, radix, IntegerHelper2.MIN_VALUE, IntegerHelper2.MAX_VALUE);
9714        };
9715        IntegerHelper2.reverse = function(i) {
9716          var nibbles = IntegerHelper2.ReverseNibbles.reverseNibbles_$LI$();
9717          return nibbles[i >>> 28] | nibbles[i >> 24 & 15] << 4 | nibbles[i >> 20 & 15] << 8 | nibbles[i >> 16 & 15] << 12 | nibbles[i >> 12 & 15] << 16 | nibbles[i >> 8 & 15] << 20 | nibbles[i >> 4 & 15] << 24 | nibbles[i & 15] << 28;
9718        };
9719        IntegerHelper2.reverseBytes = function(i) {
9720          return (i & 255) << 24 | (i & 65280) << 8 | (i & 16711680) >> 8 | (i & -16777216) >>> 24;
9721        };
9722        IntegerHelper2.rotateLeft = function(i, distance) {
9723          while (distance-- > 0) {
9724            {
9725              i = i << 1 | (i < 0 ? 1 : 0);
9726            }
9727          }
9728          ;
9729          return i;
9730        };
9731        IntegerHelper2.rotateRight = function(i, distance) {
9732          var ui = i & IntegerHelper2.MAX_VALUE;
9733          var carry = i < 0 ? 1073741824 : 0;
9734          while (distance-- > 0) {
9735            {
9736              var nextcarry = ui & 1;
9737              ui = carry | ui >> 1;
9738              carry = nextcarry === 0 ? 0 : 1073741824;
9739            }
9740          }
9741          ;
9742          if (carry !== 0) {
9743            ui = ui | IntegerHelper2.MIN_VALUE;
9744          }
9745          return ui;
9746        };
9747        IntegerHelper2.signum = function(i) {
9748          if (i === 0) {
9749            return 0;
9750          } else if (i < 0) {
9751            return -1;
9752          } else {
9753            return 1;
9754          }
9755        };
9756        IntegerHelper2.toBinaryString = function(value) {
9757          return IntegerHelper2.toUnsignedRadixString(value, 2);
9758        };
9759        IntegerHelper2.toHexString = function(value) {
9760          return IntegerHelper2.toUnsignedRadixString(value, 16);
9761        };
9762        IntegerHelper2.toOctalString = function(value) {
9763          return IntegerHelper2.toUnsignedRadixString(value, 8);
9764        };
9765        IntegerHelper2.toString$int = function(value) {
9766          return (
9767            /* valueOf */
9768            String(value).toString()
9769          );
9770        };
9771        IntegerHelper2.toString$int$int = function(value, radix) {
9772          if (radix === 10 || radix < javaemul13.internal.CharacterHelper.MIN_RADIX || radix > javaemul13.internal.CharacterHelper.MAX_RADIX) {
9773            return (
9774              /* valueOf */
9775              String(value).toString()
9776            );
9777          }
9778          return IntegerHelper2.toRadixString(value, radix);
9779        };
9780        IntegerHelper2.toString = function(value, radix) {
9781          if ((typeof value === "number" || value === null) && (typeof radix === "
9781number" || radix === null)) {
9782            return javaemul13.internal.IntegerHelper.toString$int$int(value, radix);
9783          } else if ((typeof value === "number" || value === null) && radix === void 0) {
9784            return javaemul13.internal.IntegerHelper.toString$int(value);
9785          } else
9786            throw new Error("invalid overload");
9787        };
9788        IntegerHelper2.valueOf$int = function(i) {
9789          if (i > -129 && i < 128) {
9790            var rebase = i + 128;
9791            var result = IntegerHelper2.BoxedValues.boxedValues_$LI$()[rebase];
9792            if (result == null) {
9793              result = IntegerHelper2.BoxedValues.boxedValues_$LI$()[rebase] = new Number(i);
9794            }
9795            return result;
9796          }
9797          return new Number(i);
9798        };
9799        IntegerHelper2.valueOf$java_lang_String = function(s) {
9800          return IntegerHelper2.valueOf$java_lang_String$int(s, 10);
9801        };
9802        IntegerHelper2.valueOf$java_lang_String$int = function(s, radix) {
9803          return IntegerHelper2.valueOf$int(IntegerHelper2.parseInt(s, radix));
9804        };
9805        IntegerHelper2.valueOf = function(s, radix) {
9806          if ((typeof s === "string" || s === null) && (typeof radix === "number" || radix === null)) {
9807            return javaemul13.internal.IntegerHelper.valueOf$java_lang_String$int(s, radix);
9808          } else if ((typeof s === "string" || s === null) && radix === void 0) {
9809            return javaemul13.internal.IntegerHelper.valueOf$java_lang_String(s);
9810          } else if ((typeof s === "number" || s === null) && radix === void 0) {
9811            return javaemul13.internal.IntegerHelper.valueOf$int(s);
9812          } else
9813            throw new Error("invalid overload");
9814        };
9815        IntegerHelper2.toRadixString = function(value, radix) {
9816          return value.toString(radix);
9817        };
9818        IntegerHelper2.toUnsignedRadixString = function(value, radix) {
9819          return (value >>> 0).toString(radix);
9820        };
9821        IntegerHelper2.prototype.byteValue = function() {
9822          return this.value | 0;
9823        };
9824        IntegerHelper2.prototype.compareTo$javaemul_internal_IntegerHelper = function(b) {
9825          return IntegerHelper2.compare(this.value, b.value);
9826        };
9827        IntegerHelper2.prototype.compareTo = function(b) {
9828          if (b != null && b instanceof javaemul13.internal.IntegerHelper || b === null) {
9829            return this.compareTo$javaemul_internal_IntegerHelper(b);
9830          } else
9831            throw new Error("invalid overload");
9832        };
9833        IntegerHelper2.prototype.doubleValue = function() {
9834          return this.value;
9835        };
9836        IntegerHelper2.prototype.equals = function(o) {
9837          return o != null && o instanceof javaemul13.internal.IntegerHelper && o.value === this.value;
9838        };
9839        IntegerHelper2.prototype.floatValue = function() {
9840          return this.value;
9841        };
9842        IntegerHelper2.prototype.hashCode = function() {
9843          return IntegerHelper2.hashCode(this.value);
9844        };
9845        IntegerHelper2.prototype.intValue = function() {
9846          return this.value;
9847        };
9848        IntegerHelper2.prototype.longValue = function() {
9849          return this.value;
9850        };
9851        IntegerHelper2.prototype.shortValue = function() {
9852          return this.value | 0;
9853        };
9854        IntegerHelper2.prototype.toString = function() {
9855          return IntegerHelper2.toString$int(this.value);
9856        };
9857        IntegerHelper2.getInteger = function(nm) {
9858          return IntegerHelper2.decode(java.lang.System.getProperty$java_lang_String(nm));
9859        };
9860        IntegerHelper2.MAX_VALUE = 2147483647;
9861        IntegerHelper2.MIN_VALUE = -2147483648;
9862        IntegerHelper2.SIZE = 32;
9863        return IntegerHelper2;
9864      })(javaemul13.internal.NumberHelper)
9865    );
9866    internal2.IntegerHelper = IntegerHelper;
9867    IntegerHelper["__class"] = "javaemul.internal.IntegerHelper";
9868    IntegerHelper["__interfaces"] = ["java.lang.Comparable", "java.io.Serializable"];
9869    (function(IntegerHelper2) {
9870      var BoxedValues = (
9871        /** @class */
9872        (function() {
9873          function BoxedValues2() {
9874          }
9875          BoxedValues2.boxedValues_$LI$ = function() {
9876            if (BoxedValues2.boxedValues == null) {
9877              BoxedValues2.boxedValues = (function(s) {
9878                var a = [];
9879                while (s-- > 0)
9880                  a.push(null);
9881                return a;
9882              })(256);
9883            }
9884            return BoxedValues2.boxedValues;
9885          };
9886          return BoxedValues2;
9887        })()
9888      );
9889      IntegerHelper2.BoxedValues = BoxedValues;
9890      BoxedValues["__class"] = "javaemul.internal.IntegerHelper.BoxedValues";
9891      var ReverseNibbles = (
9892        /** @class */
9893        (function() {
9894          function ReverseNibbles2() {
9895          }
9896          ReverseNibbles2.reverseNibbles_$LI$ = function() {
9897            if (ReverseNibbles2.reverseNibbles == null) {
9898              ReverseNibbles2.reverseNibbles = [0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15];
9899            }
9900            return ReverseNibbles2.reverseNibbles;
9901          };
9902          return ReverseNibbles2;
9903        })()
9904      );
9905      IntegerHelper2.ReverseNibbles = ReverseNibbles;
9906      ReverseNibbles["__class"] = "javaemul.internal.IntegerHelper.ReverseNibbles";
9907    })(IntegerHelper = internal2.IntegerHelper || (internal2.IntegerHelper = {}));
9908  })(internal = javaemul13.internal || (javaemul13.internal = {}));
9909})(javaemul || (javaemul = {}));
9910(function(javaemul13) {
9911  var internal;
9912  (function(internal2) {
9913    var LongHelper = (
9914      /** @class */
9915      (function(_super) {
9916        __extends(LongHelper2, _super);
9917        function LongHelper2(s) {
9918          var _this = this;
9919          if (typeof s === "string" || s === null) {
9920            var __args = arguments;
9921            _this = _super.call(this) || this;
9922            if (_this.value === void 0) {
9923              _this.value = 0;
9924            }
9925            _this.value = LongHelper2.parseLong(s);
9926          } else if (typeof s === "number" || s === null) {
9927            var __args = arguments;
9928            var value = __args[0];
9929            _this = _super.call(this) || this;
9930            if (_this.value === void 0) {
9931              _this.value = 0;
9932            }
9933            _this.value = value;
9934          } else
9935            throw new Error("invalid overload");
9936          return _this;
9937        }
9938        LongHelper2.bitCount = function(i) {
9939          var high = i >> 32 | 0;
9940          var low = i | 0;
9941          return javaemul13.internal.IntegerHelper.bitCount(high) + javaemul13.internal.IntegerHelper.bitCount(low);
9942        };
9943        LongHelper2.compare = function(x, y) {
9944          if (x < y) {
9945            return -1;
9946          } else if (x > y) {
9947            return 1;
9948          } else {
9949            return 0;
9950          }
9951        };
9952        LongHelper2.decode = function(s) {
9953          var decode = internal2.NumberHelper.__decodeNumberString(s);
9954          return LongHelper2.valueOf$java_lang_String$int(decode.payload, decode.radix);
9955        };
9956        LongHelper2.hashCode = function(l) {
9957          return l | 0;
9958        };
9959        LongHelper2.highestOneBit = function(i) {
9960          var high = i >> 32 | 0;
9961          if (high !== 0) {
9962            return (function(n) {
9963              return n < 0 ? Math.ceil(n) : Math.floor(n);
9964            })(javaemul13.internal.IntegerHelper.highestOneBit(high)) << 32;
9965          } else {
9966            return javaemul13.internal.IntegerHelper.highestOneBit(i | 0) & 4294967295;
9967          }
9968        };
9969        LongHelper2.lowestOneBit = function(i) {
9970          return i & -i;
9971        };
9972        LongHelper2.numberOfLeadingZeros = function(i) {
9973          var high = i >> 32 | 0;
9974          if (high !== 0) {
9975            return javaemul13.internal.IntegerHelper.numberOfLeadingZeros(high);
9976          } else {
9977            return javaemul13.internal.IntegerHelper.numberOfLeadingZeros(i | 0) + 32;
9978          }
9979        };
9980        LongHelper2.numberOfTrailingZeros = function(i) {
9981          var low = i | 0;
9982          if (low !== 0) {
9983            return javaemul13.internal.IntegerHelper.numberOfTrailingZeros(low);
9984          } else {
9985            return javaemul13.internal.IntegerHelper.numberOfTrailingZeros(i >> 32 | 0) + 32;
9986          }
9987        };
9988        LongHelper2.parseLong = function(s, radix) {
9989          if (radix === void 0) {
9990            radix = 10;
9991          }
9992          return internal2.NumberHelper.__parseAndValidateLong(s, radix);
9993        };
9994        LongHelper2.reverse = function(i) {
9995          var high = i >>> 32 | 0;
9996          var low = i | 0;
9997          return (function(n) {
9998            return n < 0 ? Math.ceil(n) : Math.floor(n);
9999          })(javaemul13.internal.IntegerHelper.reverse(low)) << 32 | javaemul13.internal.IntegerHelper.reverse(high) & 4294967295;
10000        };
10001        LongHelper2.reverseBytes = function(i) {
10002          var high = i >>> 32 | 0;
10003          var low = i | 0;
10004          return (function(n) {
10005            return n < 0 ? Math.ceil(n) : Math.floor(n);
10006          })(javaemul13.internal.IntegerHelper.reverseBytes(low)) << 32 | javaemul13.internal.IntegerHelper.reverseBytes(high) & 4294967295;
10007        };
10008        LongHelper2.rotateLeft = function(i, distance) {
10009          while (distance-- > 0) {
10010            {
10011              i = i << 1 | (i < 0 ? 1 : 0);
10012            }
10013          }
10014          ;
10015          return i;
10016        };
10017        LongHelper2.rotateRight = function(i, distance) {
10018          var ui = i & LongHelper2.MAX_VALUE;
10019          var carry = i < 0 ? 4611686018427388e3 : 0;
10020          while (distance-- > 0) {
10021            {
10022              var nextcarry = ui & 1;
10023              ui = carry | ui >> 1;
10024              carry = nextcarry === 0 ? 0 : 4611686018427388e3;
10025            }
10026          }
10027          ;
10028          if (carry !== 0) {
10029            ui = ui | LongHelper2.MIN_VALUE;
10030          }
10031          return ui;
10032        };
10033        LongHelper2.signum = function(i) {
10034          if (i === 0) {
10035            return 0;
10036          } else if (i < 0) {
10037            return -1;
10038          } else {
10039            return 1;
10040          }
10041        };
10042        LongHelper2.toBinaryString = function(value) {
10043          return LongHelper2.toPowerOfTwoUnsignedString(value, 1);
10044        };
10045        LongHelper2.toHexString = function(value) {
10046          return LongHelper2.toPowerOfTwoUnsignedString(value, 4);
10047        };
10048        LongHelper2.toOctalString = function(value) {
10049          return LongHelper2.toPowerOfTwoUnsignedString(value, 3);
10050        };
10051        LongHelper2.toString$long = function(value) {
10052          return (
10053            /* valueOf */
10054            String(value).toString()
10055          );
10056        };
10057        LongHelper2.toString$long$int = function(value, intRadix) {
10058          if (intRadix === 10 || intRadix < javaemul13.internal.CharacterHelper.MIN_RADIX || intRadix > javaemul13.internal.CharacterHelper.MAX_RADIX) {
10059            return (
10060              /* valueOf */
10061              String(value).toString()
10062            );
10063          }
10064          var intValue = value | 0;
10065          if (intValue === value) {
10066            return javaemul13.internal.IntegerHelper.toString$int$int(intValue, intRadix);
10067          }
10068          var negative = value < 0;
10069          if (!negative) {
10070            value = -value;
10071          }
10072          var bufLen = intRadix < 8 ? 65 : 23;
10073          var buf = (function(s) {
10074            var a = [];
10075            while (s-- > 0)
10076              a.push(null);
10077            return a;
10078          })(bufLen);
10079          var cursor = bufLen;
10080          var radix = intRadix;
10081          do {
10082            {
10083              var q = (function(n) {
10084                return n < 0 ? Math.ceil(n) : Math.floor(n);
10085              })(value / radix);
10086              buf[--cursor] = javaemul13.internal.CharacterHelper.forDigit$int(radix * q - value | 0);
10087              value = q;
10088            }
10089          } while (value !== 0);
10090          if (negative) {
10091            buf[--cursor] = "-";
10092          }
10093          return (
10094            /* valueOf */
10095            (function(str, index, len) {
10096              return str.join("").substring(index, index + len);
10097            })(buf, cursor, bufLen - cursor)
10098          );
10099        };
10100        LongHelper2.toString = function(value, intRadix) {
10101          if ((typeof value === "number" || value === null) && (typeof intRadix === "
10101number" || intRadix === null)) {
10102            return javaemul13.internal.LongHelper.toString$long$int(value, intRadix);
10103          } else if ((typeof value === "number" || value === null) && intRadix === void 0) {
10104            return javaemul13.internal.LongHelper.toString$long(value);
10105          } else
10106            throw new Error("invalid overload");
10107        };
10108        LongHelper2.valueOf$long = function(i) {
10109          if (i > -129 && i < 128) {
10110            var rebase = (i | 0) + 128;
10111            var result = LongHelper2.BoxedValues.boxedValues_$LI$()[rebase];
10112            if (result == null) {
10113              result = LongHelper2.BoxedValues.boxedValues_$LI$()[rebase] = new Number(i);
10114            }
10115            return result;
10116          }
10117          return new Number(i);
10118        };
10119        LongHelper2.valueOf$java_lang_String = function(s) {
10120          return LongHelper2.valueOf$java_lang_String$int(s, 10);
10121        };
10122        LongHelper2.valueOf$java_lang_String$int = function(s, radix) {
10123          return LongHelper2.valueOf$long(LongHelper2.parseLong(s, radix));
10124        };
10125        LongHelper2.valueOf = function(s, radix) {
10126          if ((typeof s === "string" || s === null) && (typeof radix === "number" || radix === null)) {
10127            return javaemul13.internal.LongHelper.valueOf$java_lang_String$int(s, radix);
10128          } else if ((typeof s === "string" || s === null) && radix === void 0) {
10129            return javaemul13.internal.LongHelper.valueOf$java_lang_String(s);
10130          } else if ((typeof s === "number" || s === null) && radix === void 0) {
10131            return javaemul13.internal.LongHelper.valueOf$long(s);
10132          } else
10133            throw new Error("invalid overload");
10134        };
10135        LongHelper2.toPowerOfTwoUnsignedString = function(value, shift) {
10136          var radix = 1 << shift;
10137          if (javaemul13.internal.IntegerHelper.MIN_VALUE <= value && value <= javaemul13.internal.IntegerHelper.MAX_VALUE) {
10138            return javaemul13.internal.IntegerHelper.toString$int$int(value | 0, radix);
10139          }
10140          var mask = radix - 1;
10141          var bufSize = (64 / shift | 0) + 1;
10142          var buf = (function(s) {
10143            var a = [];
10144            while (s-- > 0)
10145              a.push(null);
10146            return a;
10147          })(bufSize);
10148          var pos = bufSize;
10149          do {
10150            {
10151              buf[--pos] = javaemul13.internal.CharacterHelper.forDigit$int((value | 0) & mask);
10152              value >>>= shift;
10153            }
10154          } while (value !== 0);
10155          return (
10156            /* valueOf */
10157            (function(str, index, len) {
10158              return str.join("").substring(index, index + len);
10159            })(buf, pos, bufSize - pos)
10160          );
10161        };
10162        LongHelper2.prototype.byteValue = function() {
10163          return this.value | 0;
10164        };
10165        LongHelper2.prototype.compareTo$javaemul_internal_LongHelper = function(b) {
10166          return LongHelper2.compare(this.value, b.value);
10167        };
10168        LongHelper2.prototype.compareTo = function(b) {
10169          if (b != null && b instanceof javaemul13.internal.LongHelper || b === null) {
10170            return this.compareTo$javaemul_internal_LongHelper(b);
10171          } else
10172            throw new Error("invalid overload");
10173        };
10174        LongHelper2.prototype.doubleValue = function() {
10175          return this.value;
10176        };
10177        LongHelper2.prototype.equals = function(o) {
10178          return o != null && o instanceof javaemul13.internal.LongHelper && o.value === this.value;
10179        };
10180        LongHelper2.prototype.floatValue = function() {
10181          return this.value;
10182        };
10183        LongHelper2.prototype.hashCode = function() {
10184          return LongHelper2.hashCode(this.value);
10185        };
10186        LongHelper2.prototype.intValue = function() {
10187          return this.value | 0;
10188        };
10189        LongHelper2.prototype.longValue = function() {
10190          return this.value;
10191        };
10192        LongHelper2.prototype.shortValue = function() {
10193          return this.value | 0;
10194        };
10195        LongHelper2.prototype.toString = function() {
10196          return LongHelper2.toString$long(this.value);
10197        };
10198        LongHelper2.MAX_VALUE = 9223372036854776e3;
10199        LongHelper2.MIN_VALUE = -9223372036854776e3;
10200        LongHelper2.SIZE = 64;
10201        return LongHelper2;
10202      })(javaemul13.internal.NumberHelper)
10203    );
10204    internal2.LongHelper = LongHelper;
10205    LongHelper["__class"] = "javaemul.internal.LongHelper";
10206    LongHelper["__interfaces"] = ["java.lang.Comparable", "java.io.Serializable"];
10207    (function(LongHelper2) {
10208      var BoxedValues = (
10209        /** @class */
10210        (function() {
10211          function BoxedValues2() {
10212          }
10213          BoxedValues2.boxedValues_$LI$ = function() {
10214            if (BoxedValues2.boxedValues == null) {
10215              BoxedValues2.boxedValues = (function(s) {
10216                var a = [];
10217                while (s-- > 0)
10218                  a.push(null);
10219                return a;
10220              })(256);
10221            }
10222            return BoxedValues2.boxedValues;
10223          };
10224          return BoxedValues2;
10225        })()
10226      );
10227      LongHelper2.BoxedValues = BoxedValues;
10228      BoxedValues["__class"] = "javaemul.internal.LongHelper.BoxedValues";
10229    })(LongHelper = internal2.LongHelper || (internal2.LongHelper = {}));
10230  })(internal = javaemul13.internal || (javaemul13.internal = {}));
10231})(javaemul || (javaemul = {}));
10232(function(java2) {
10233  var util;
10234  (function(util2) {
10235    var Scanner = (
10236      /** @class */
10237      (function() {
10238        function Scanner2(string) {
10239          if (typeof string === "string" || string === null) {
10240            var __args = arguments;
10241            {
10242              var __args_16 = arguments;
10243              var reader = new java2.io.StringReader(string);
10244              if (this.reader === void 0) {
10245                this.reader = null;
10246              }
10247              if (this.matcher === void 0) {
10248                this.matcher = null;
10249              }
10250              if (this.nextDelimiterWithPattern === void 0) {
10251                this.nextDelimiterWithPattern = null;
10252              }
10253              this.currentDelimiter = Scanner2.whiteSpacePattern_$LI$();
10254              this.buf = (function(s) {
10255                var a = [];
10256                while (s-- > 0)
10257                  a.push(null);
10258                return a;
10259              })(1024);
10260              this.bufferFilledLength = 0;
10261              this.currentPosition = 0;
10262              this.nextTokenStart = 0;
10263              this.nextDelimiterStart = -1;
10264              this.nextDelimiterEnd = -1;
10265              this.defaultRadix = 10;
10266              this.closed = false;
10267              this.reader = reader;
10268            }
10269          } else if (string != null && string instanceof java2.io.InputStream || string === null) {
10270            var __args = arguments;
10271            var inputStream = __args[0];
10272            {
10273              var __args_17 = arguments;
10274              var reader = new java2.io.InputStreamReader(inputStream);
10275              if (this.reader === void 0) {
10276                this.reader = null;
10277              }
10278              if (this.matcher === void 0) {
10279                this.matcher = null;
10280              }
10281              if (this.nextDelimiterWithPattern === void 0) {
10282                this.nextDelimiterWithPattern = null;
10283              }
10284              this.currentDelimiter = Scanner2.whiteSpacePattern_$LI$();
10285              this.buf = (function(s) {
10286                var a = [];
10287                while (s-- > 0)
10288                  a.push(null);
10289                return a;
10290              })(1024);
10291              this.bufferFilledLength = 0;
10292              this.currentPosition = 0;
10293              this.nextTokenStart = 0;
10294              this.nextDelimiterStart = -1;
10295              this.nextDelimiterEnd = -1;
10296              this.defaultRadix = 10;
10297              this.closed = false;
10298              this.reader = reader;
10299            }
10300          } else if (string != null && string instanceof java2.io.Reader || string === null) {
10301            var __args = arguments;
10302            var reader = __args[0];
10303            if (this.reader === void 0) {
10304              this.reader = null;
10305            }
10306            if (this.matcher === void 0) {
10307              this.matcher = null;
10308            }
10309            if (this.nextDelimiterWithPattern === void 0) {
10310              this.nextDelimiterWithPattern = null;
10311            }
10312            this.currentDelimiter = Scanner2.whiteSpacePattern_$LI$();
10313            this.buf = (function(s) {
10314              var a = [];
10315              while (s-- > 0)
10316                a.push(null);
10317              return a;
10318            })(1024);
10319            this.bufferFilledLength = 0;
10320            this.currentPosition = 0;
10321            this.nextTokenStart = 0;
10322            this.nextDelimiterStart = -1;
10323            this.nextDelimiterEnd = -1;
10324            this.defaultRadix = 10;
10325            this.closed = false;
10326            this.reader = reader;
10327          } else
10328            throw new Error("invalid overload");
10329        }
10330        Scanner2.prototype.forEachRemaining = function(consumer) {
10331          var _this = this;
10332          javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
10333            if (funcInst == null || typeof funcInst == "function") {
10334              return funcInst;
10335            }
10336            return function(arg0) {
10337              return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
10338            };
10339          })(consumer));
10340          while (this.hasNext()) {
10341            {
10342              (function(target) {
10343                return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
10344              })(consumer);
10345            }
10346          }
10347          ;
10348        };
10349        Scanner2.prototype.remove = function() {
10350          throw new java2.lang.UnsupportedOperationException();
10351        };
10352        Scanner2.numeral_$LI$ = function() {
10353          if (Scanner2.numeral == null) {
10354            Scanner2.numeral = Scanner2.digit + "+";
10355          }
10356          return Scanner2.numeral;
10357        };
10358        Scanner2.decimalNumeral_$LI$ = function() {
10359          if (Scanner2.decimalNumeral == null) {
10360            Scanner2.decimalNumeral = "(?:" + Scanner2.numeral_$LI$() + "|" + Scanner2.numeral_$LI$() + Scanner2.decimalSeparator + Scanner2.digit + "*|" + Scanner2.decimalSeparator + Scanner2.digit + "+)";
10361          }
10362          return Scanner2.decimalNumeral;
10363        };
10364        Scanner2.exponent_$LI$ = function() {
10365          if (Scanner2.exponent == null) {
10366            Scanner2.exponent = "(?:[eE][+-]?" + Scanner2.digit + "+)";
10367          }
10368          return Scanner2.exponent;
10369        };
10370        Scanner2.decimal_$LI$ = function() {
10371          if (Scanner2.decimal == null) {
10372            Scanner2.decimal = "(?:[-+]?" + Scanner2.decimalNumeral_$LI$() + Scanner2.exponent_$LI$() + "?)";
10373          }
10374          return Scanner2.decimal;
10375        };
10376        Scanner2.signedNonNumber_$LI$ = function() {
10377          if (Scanner2.signedNonNumber == null) {
10378            Scanner2.signedNonNumber = "(?:[-+]?" + Scanner2.nonNumber + ")";
10379          }
10380          return Scanner2.signedNonNumber;
10381        };
10382        Scanner2.booleanPattern_$LI$ = function() {
10383          if (Scanner2.booleanPattern == null) {
10384            Scanner2.booleanPattern = java2.util.regex.Pattern.compile("true|TRUE|True|1|false|FALSE|False|0");
10385          }
10386          return Scanner2.booleanPattern;
10387        };
10388        Scanner2.integerPattern_$LI$ = function() {
10389          if (Scanner2.integerPattern == null) {
10390            Scanner2.integerPattern = java2.util.regex.Pattern.compile("[-+]?" + Scanner2.numeral_$LI$());
10391          }
10392          return Scanner2.integerPattern;
10393        };
10394        Scanner2.floatPattern_$LI$ = function() {
10395          if (Scanner2.floatPattern == null) {
10396            Scanner2.floatPattern = java2.util.regex.Pattern.compile(Scanner2.decimal_$LI$() + "|" + Scanner2.hexFloat + "|" + Scanner2.signedNonNumber_$LI$());
10397          }
10398          return Scanner2.floatPattern;
10399        };
10400        Scanner2.endLinePattern_$LI$ = function() {
10401          if (Scanner2.endLinePattern == null) {
10402            Scanner2.endLinePattern = java2.util.regex.Pattern.compile("[\\n\\r]+");
10403          }
10404          return Scanner2.endLinePattern;
10405        };
10406        Scanner2.whiteSpacePattern_$LI$ = function() {
10407          if (Scanner2.whiteSpacePattern == null) {
10408            Scanner2.whiteSpacePattern = java2.util.regex.Pattern.compile("\\s+");
10409          }
10410          return Scanner2.whiteSpacePattern;
10411        };
10412        Scanner2.prototype.close = function() {
10413          this.closed = true;
10414          this.reader.close();
10415        };
10416        Scanner2.prototype.delimiter = function() {
10417          return this.currentDelimiter;
10418        };
10419        Scanner2.prototype.useDelimiter$java_lang_String = function(currentDelimiter) {
10420          return this.useDelimiter$java_util_regex_Pattern(java2.util.regex.Pattern.compile$java_lang_String(currentDelimiter));
10421        };
10422        Scanner2.prototype.useDelimiter = function(currentDelimiter) {
10423          if (typeof currentDelimiter === "string" || currentDelimiter === null) {
10424            return this.useDelimiter$java_lang_String(currentDelimiter);
10425          } else if (currentDelimiter != null && currentDelimiter instanceof java2.util.regex.Pattern || currentDelimiter === null) {
10426            return this.useDelimiter$java_util_regex_Pattern(currentDelimiter);
10427          } else
10428            throw new Error("invalid overload");
10429        };
10430        Scanner2.prototype.useDelimiter$java_util_regex_Pattern = function(currentDelimiter) {
10431          this.currentDelimiter = currentDelimiter;
10432          return this;
10433        };
10434        Scanner2.prototype.hasNext$ = function() {
10435          if (this.closed && this.currentPosition === this.bufferFilledLength)
10436            return false;
10437          if (this.nextDelimiterStart === -1 || this.nextDelimiterWithPattern !== this.currentDelimiter) {
10438            this.searchNextTo$java_util_regex_Pattern(this.currentDelimiter);
10439            this.nextDelimiterWithPattern = this.currentDelimiter;
10440          }
10441          return this.currentPosition !== this.bufferFilledLength;
10442        };
10443        Scanner2.prototype.searchNextTo$java_util_regex_Pattern = function(pattern) {
10444          this.searchNextTo$java_util_regex_Pattern$boolean(pattern, false);
10445        };
10446        Scanner2.prototype.searchNextTo$java_util_regex_Pattern$boolean = function(pattern, canBeEmpty) {
10447          try {
10448            this.nextTokenStart = 0;
10449            while (!this.closed || this.bufferFilledLength !== this.currentPosition + this.nextTokenStart) {
10450              {
10451                this.matcher = pattern.matcher((function(str, index, len) {
10452                  return str.substring(index, index + len);
10453                })(this.buf.join(""), this.currentPosition + this.nextTokenStart, this.bufferFilledLength - this.currentPosition - this.nextTokenStart));
10454                if (this.matcher.find$()) {
10455                  if (this.matcher.start$() > 0 || canBeEmpty) {
10456                    this.nextDelimiterStart = this.currentPosition + this.nextTokenStart + this.matcher.start$();
10457                    this.nextDelimiterEnd = this.currentPosition + this.nextTokenStart + this.matcher.end$();
10458                    return;
10459                  }
10460                  this.nextTokenStart += this.matcher.end$();
10461                  if (this.currentPosition + this.nextTokenStart < this.bufferFilledLength)
10462                    continue;
10463                }
10464                if (this.buf.length === this.bufferFilledLength) {
10465                  if (this.currentPosition < (this.buf.length / 2 | 0)) {
10466                    var chars = (function(s) {
10467                      var a = [];
10468                      while (s-- > 0)
10469                        a.push(null);
10470                      return a;
10471                    })(this.buf.length * 2);
10472                    java2.lang.System.arraycopy(this.buf, this.currentPosition, chars, 0, this.bufferFilledLength - this.currentPosition);
10473                    this.buf = chars;
10474                  } else {
10475                    java2.lang.System.arraycopy(this.buf, this.currentPosition, this.buf, 0, this.bufferFilledLength - this.currentPosition);
10476                  }
10477                  this.bufferFilledLength -= this.currentPosition;
10478                  this.currentPosition = 0;
10479                  this.nextDelimiterStart = this.nextDelimiterEnd = -1;
10480                }
10481                if (this.closed)
10482                  break;
10483                var read = this.reader.read$char_A$int$int(this.buf, this.bufferFilledLength, this.buf.length - this.bufferFilledLength);
10484                if (read <= 0) {
10485                  try {
10486                    this.close();
10487                  } catch (ignored) {
10488                  }
10489                } else {
10490                  this.bufferFilledLength += read;
10491                }
10492              }
10493            }
10494            ;
10495          } catch (ignored) {
10496            try {
10497              this.close();
10498            } catch (ignored2) {
10499            }
10500          }
10501          this.nextDelimiterStart = this.nextDelimiterEnd = this.bufferFilledLength;
10502        };
10503        Scanner2.prototype.searchNextTo = function(pattern, canBeEmpty) {
10504          if ((pattern != null && pattern instanceof java2.util.regex.Pattern || pattern === null) && (typeof canBeEmpty === "boolean" || canBeEmpty === null)) {
10505            return this.searchNextTo$java_util_regex_Pattern$boolean(pattern, canBeEmpty);
10506          } else if ((pattern != null && pattern instanceof java2.util.regex.Pattern || pattern === null) && canBeEmpty === void 0) {
10507            return this.searchNextTo$java_util_regex_Pattern(pattern);
10508          } else
10509            throw new Error("invalid overload");
10510        };
10511        Scanner2.prototype.next = function() {
10512          if (!this.hasNext$())
10513            throw new java2.util.NoSuchElementException("No more token");
10514          var result = (function(str, index, len) {
10515            return str.substring(index, index + len);
10516          })(this.buf.join(""), this.currentPosition + this.nextTokenStart, this.nextDelimiterStart - this.currentPosition - this.nextTokenStart);
10517          this.currentPosition = this.nextDelimiterStart;
10518          this.nextDelimiterStart = this.nextDelimiterEnd = -1;
10519          return result;
10520        };
10521        Scanner2.prototype.hasNext$java_util_regex_Pattern = function(pattern) {
10522          return this.hasNext$() && pattern.matcher((function(str, index, len) {
10523            return str.substring(index, index + len);
10524          })(this.buf.join(""), this.currentPosition + this.nextTokenStart, this.nextDelimiterStart - this.currentPosition - this.nextTokenStart)).matches();
10525        };
10526        Scanner2.prototype.hasNext = function(pattern) {
10527          if (pattern != null && pattern instanceof java2.util.regex.Pattern || pattern === null) {
10528            return this.hasNext$java_util_regex_Pattern(pattern);
10529          } else if (typeof pattern === "string" || pattern === null) {
10530            return this.hasNext$java_lang_String(pattern);
10531          } else if (pattern === void 0) {
10532            return this.hasNext$();
10533          } else
10534            throw new Error("invalid overload");
10535        };
10536        Scanner2.prototype.hasNext$java_lang_String = function(pattern) {
10537          return this.hasNext$() && java2.util.regex.Pattern.matches(pattern, (function(str, index, len) {
10538            return str.substring(index, index + len);
10539          })(this.buf.join(""), this.currentPosition + this.nextTokenStart, this.nextDelimiterStart - this.currentPosition - this.nextTokenStart));
10540        };
10541        Scanner2.prototype.radix = function() {
10542          return this.defaultRadix;
10543        };
10544        Scanner2.prototype.hasNextBoolean = function() {
10545          return this.hasNext$java_util_regex_Pattern(Scanner2.booleanPattern_$LI$());
10546        };
10547        Scanner2.prototype.nextBoolean = function() {
10548          if (!this.hasNextBoolean())
10549            throw new java2.util.InputMismatchException("Next token is not a boolean");
10550          var firstChar = this.next().charAt(0);
10551          return (function(c) {
10552            return c.charCodeAt == null ? c : c.charCodeAt(0);
10553          })(firstChar) == "t".charCodeAt(0) || (function(c) {
10554            return c.charCodeAt == null ? c : c.charCodeAt(0);
10555          })(firstChar) == "T".charCodeAt(0) || (function(c) {
10556            return c.charCodeAt == null ? c : c.charCodeAt(0);
10557          })(firstChar) == "1".charCodeAt(0);
10558        };
10559        Scanner2.prototype.hasNextByte = function() {
10560          return this.hasNext$java_util_regex_Pattern(Scanner2.integerPattern_$LI$());
10561        };
10562        Scanner2.prototype.nextByte = function() {
10563          if (!this.hasNextByte())
10564            throw new java2.util.InputMismatchException("Next token is not a byte");
10565          return javaemul.internal.ByteHelper.parseByte(this.next());
10566        };
10567        Scanner2.prototype.hasNextDouble = function() {
10568          return this.hasNext$java_util_regex_Pattern(Scanner2.floatPattern_$LI$());
10569        };
10570        Scanner2.prototype.nextDouble = function() {
10571          if (!this.hasNextDouble())
10572            throw new java2.util.InputMismatchException("Next token is not a double");
10573          return javaemul.internal.DoubleHelper.parseDouble(this.next());
10574        };
10575        Scanner2.prototype.hasNextFloat = function() {
10576          return this.hasNext$java_util_regex_Pattern(Scanner2.floatPattern_$LI$());
10577        };
10578        Scanner2.prototype.nextFloat = function() {
10579          if (!this.hasNextFloat())
10580            throw new java2.util.InputMismatchException("Next token is not a float");
10581          return javaemul.internal.FloatHelper.parseFloat(this.next());
10582        };
10583        Scanner2.prototype.hasNextInt = function() {
10584          return this.hasNext$java_util_regex_Pattern(Scanner2.integerPattern_$LI$());
10585        };
10586        Scanner2.prototype.nextInt = function() {
10587          if (!this.hasNextInt())
10588            throw new java2.util.InputMismatchException("Next token is not a int");
10589          return javaemul.internal.IntegerHelper.parseInt(this.next());
10590        };
10591        Scanner2.prototype.hasNextLine = function() {
10592          if (this.closed && this.currentPosition === this.bufferFilledLength)
10593            return false;
10594          if (this.nextDelimiterStart === -1 || this.nextDelimiterWithPattern !== Scanner2.endLinePattern_$LI$()) {
10595            this.searchNextTo$java_util_regex_Pattern$boolean(Scanner2.endLinePattern_$LI$(), true);
10596            this.nextDelimiterWithPattern = Scanner2.endLinePattern_$LI$();
10597          }
10598          return this.currentPosition !== this.bufferFilledLength;
10599        };
10600        Scanner2.prototype.nextLine = function() {
10601          if (!this.hasNextLine())
10602            throw new java2.util.InputMismatchException("No new line");
10603          var result = (function(str, index, len) {
10604            return str.substring(index, index + len);
10605          })(this.buf.join(""), this.currentPosition, this.nextDelimiterStart - this.currentPosition);
10606          this.currentPosition = this.nextDelimiterEnd;
10607          this.nextDelimiterStart = this.nextDelimiterEnd = -1;
10608          return result;
10609        };
10610        Scanner2.prototype.hasNextLong = function() {
10611          return this.hasNext$java_util_regex_Pattern(Scanner2.integerPattern_$LI$());
10612        };
10613        Scanner2.prototype.nextLong = function() {
10614          if (!this.hasNextLong())
10615            throw new java2.util.InputMismatchException("Next token is not a long");
10616          return javaemul.internal.LongHelper.parseLong(this.next());
10617        };
10618        Scanner2.prototype.hasNextShort = function() {
10619          return this.hasNext$java_util_regex_Pattern(Scanner2.integerPattern_$LI$());
10620        };
10621        Scanner2.prototype.nextShort = function() {
10622          if (!this.hasNextShort())
10623            throw new java2.util.InputMismatchException("Next token is not a short");
10624          return javaemul.internal.ShortHelper.parseShort(this.next());
10625        };
10626        Scanner2.prototype.reset = function() {
10627          return this.useDelimiter$java_util_regex_Pattern(Scanner2.whiteSpacePattern_$LI$());
10628        };
10629        Scanner2.prototype.skip$java_lang_String = function(pattern) {
10630          return this.skip$java_util_regex_Pattern(java2.util.regex.Pattern.compile$java_lang_String(pattern));
10631        };
10632        Scanner2.prototype.skip = function(pattern) {
10633          if (typeof pattern === "string" || pattern === null) {
10634            return this.skip$java_lang_String(pattern);
10635          } else if (pattern != null && pattern instanceof java2.util.regex.Pattern || pattern === null) {
10636            return this.skip$java_util_regex_Pattern(pattern);
10637          } else
10638            throw new Error("invalid overload");
10639        };
10640        Scanner2.prototype.skip$java_util_regex_Pattern = function(pattern) {
10641          if (this.closed && this.currentPosition === this.bufferFilledLength)
10642            throw new java2.util.NoSuchElementException("No more token");
10643          this.searchNextTo$java_util_regex_Pattern$boolean(pattern, true);
10644          if (this.nextDelimiterStart !== this.currentPosition) {
10645            throw new java2.util.NoSuchElementException("The specified pattern was not found");
10646          }
10647          this.currentPosition = this.nextDelimiterEnd;
10648          this.nextDelimiterStart = this.nextDelimiterEnd = -1;
10649          return this;
10650        };
10651        Scanner2.prototype.findInLine$java_lang_String = function(pattern) {
10652          return this.findInLine$java_util_regex_Pattern(java2.util.regex.Pattern.compile$java_lang_String(pattern));
10653        };
10654        Scanner2.prototype.findInLine = function(pattern) {
10655          if (typeof pattern === "string" || pattern === null) {
10656            return this.findInLine$java_lang_String(pattern);
10657          } else if (pattern != null && pattern instanceof java2.util.regex.Pattern || pattern === null) {
10658            return this.findInLine$java_util_regex_Pattern(pattern);
10659          } else
10660            throw new Error("invalid overload");
10661        };
10662        Scanner2.prototype.findInLine$java_util_regex_Pattern = function(pattern) {
10663          if (!this.hasNextLine()) {
10664            return null;
10665          }
10666          this.matcher = pattern.matcher((function(str, index, len) {
10667            return str.substring(index, index + len);
10668          })(this.buf.join(""), this.currentPosition, this.nextDelimiterStart - this.currentPosition));
10669          if (this.matcher.find$()) {
10670            this.nextLine();
10671            return this.matcher.group$();
10672          } else {
10673            this.nextDelimiterStart = this.nextDelimiterEnd = -1;
10674            return null;
10675          }
10676        };
10677        Scanner2.prototype.match = function() {
10678          if (this.matcher == null)
10679            throw new java2.lang.IllegalStateException("No match result is available");
10680          return this.matcher;
10681        };
10682        Scanner2.digit = "[\\d]";
10683        Scanner2.decimalSeparator = "[.,]";
10684        Scanner2.hexFloat = "(?:[-+]?0[xX][0-9a-fA-F]*\\.[0-9a-fA-F]+(?:[pP][-+]?[0-9]+)?)";
10685        Scanner2.nonNumber = "(?:NaN|Infinity)";
10686        return Scanner2;
10687      })()
10688    );
10689    util2.Scanner = Scanner;
10690    Scanner["__class"] = "java.util.Scanner";
10691    Scanner["__interfaces"] = ["java.util.Iterator", "java.io.Closeable", "java.lang.AutoCloseable"];
10692  })(util = java2.util || (java2.util = {}));
10693})(java || (java = {}));
10694(function(java2) {
10695  var util;
10696  (function(util2) {
10697    var AbstractSet = (
10698      /** @class */
10699      (function(_super) {
10700        __extends(AbstractSet2, _super);
10701        function AbstractSet2() {
10702          return _super.call(this) || this;
10703        }
10704        AbstractSet2.prototype.equals = function(o) {
10705          if (o === this) {
10706            return true;
10707          }
10708          if (!(o != null && (o.constructor != null && o.constructor["__interfaces"] != null && o.constructor["__interfaces"].indexOf("java.util.Set") >= 0))) {
10709            return false;
10710          }
10711          var other = o;
10712          if (other.size() !== this.size()) {
10713            return false;
10714          }
10715          return this.containsAll(other);
10716        };
10717        AbstractSet2.prototype.hashCode = function() {
10718          return java2.util.Collections.hashCode$java_lang_Iterable(this);
10719        };
10720        AbstractSet2.prototype.removeAll = function(c) {
10721          javaemul.internal.InternalPreconditions.checkNotNull(c);
10722          var size = this.size();
10723          if (size < c.size()) {
10724            for (var iter = this.iterator(); iter.hasNext(); ) {
10725              {
10726                var o = iter.next();
10727                if (c.contains(o)) {
10728                  iter.remove();
10729                }
10730              }
10731              ;
10732            }
10733          } else {
10734            for (var index = c.iterator(); index.hasNext(); ) {
10735              var o1 = index.next();
10736              {
10737                this.remove(o1);
10738              }
10739            }
10740          }
10741          return size !== this.size();
10742        };
10743        return AbstractSet2;
10744      })(java2.util.AbstractCollection)
10745    );
10746    util2.AbstractSet = AbstractSet;
10747    AbstractSet["__class"] = "java.util.AbstractSet";
10748    AbstractSet["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable"];
10749  })(util = java2.util || (java2.util = {}));
10750})(java || (java = {}));
10751(function(java2) {
10752  var util;
10753  (function(util2) {
10754    var AbstractList = (
10755      /** @class */
10756      (function(_super) {
10757        __extends(AbstractList2, _super);
10758        function AbstractList2() {
10759          var _this = _super.call(this) || this;
10760          if (_this.modCount === void 0) {
10761            _this.modCount = 0;
10762          }
10763          return _this;
10764        }
10765        AbstractList2.prototype.sort = function(c) {
10766          var a = this.toArray();
10767          java2.util.Arrays.sort(a, (function(funcInst) {
10768            if (funcInst == null || typeof funcInst == "function") {
10769              return funcInst;
10770            }
10771            return function(a2, b) {
10772              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a2, b);
10773            };
10774          })((function(funcInst) {
10775            if (funcInst == null || typeof funcInst == "function") {
10776              return funcInst;
10777            }
10778            return function(a2, b) {
10779              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a2, b);
10780            };
10781          })(c)));
10782          var i = this.listIterator();
10783          for (var index = 0; index < a.length; index++) {
10784            var e = a[index];
10785            {
10786              i.next();
10787              i.set(e);
10788            }
10789          }
10790        };
10791        AbstractList2.prototype.add$java_lang_Object = function(obj) {
10792          this.add(this.size(), obj);
10793          return true;
10794        };
10795        AbstractList2.prototype.add$int$java_lang_Object = function(index, element) {
10796          throw new java2.lang.UnsupportedOperationException("Add not supported on this list");
10797        };
10798        AbstractList2.prototype.add = function(index, element) {
10799          if ((typeof index === "number" || index === null) && (element != null || element === null)) {
10800            return this.add$int$java_lang_Object(index, element);
10801          } else if ((index != null || index === null) && element === void 0) {
10802            return this.add$java_lang_Object(index);
10803          } else
10804            throw new Error("invalid overload");
10805        };
10806        AbstractList2.prototype.addAll$int$java_util_Collection = function(index, c) {
10807          javaemul.internal.InternalPreconditions.checkNotNull(c);
10808          var changed = false;
10809          for (var index1 = c.iterator(); index1.hasNext(); ) {
10810            var e = index1.next();
10811            {
10812              this.add(index++, e);
10813              changed = true;
10814            }
10815          }
10816          return changed;
10817        };
10818        AbstractList2.prototype.addAll = function(index, c) {
10819          if ((typeof index === "number" || index === null) && (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || c === null)) {
10820            return this.addAll$int$java_util_Collection(index, c);
10821          } else if ((index != null && (index.constructor != null && index.constructor["__interfaces"] != null && index.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || index === null) && c === void 0) {
10822            return _super.prototype.addAll.call(this, index);
10823          } else
10824            throw new Error("invalid overload");
10825        };
10826        AbstractList2.prototype.clear = function() {
10827          this.removeRange(0, this.size());
10828        };
10829        AbstractList2.prototype.equals = function(o) {
10830          if (o === this) {
10831            return true;
10832          }
10833          if (!(o != null && (o.constructor != null && o.constructor["__interfaces"] != null && o.constructor["__interfaces"].indexOf("java.util.List") >= 0))) {
10834            return false;
10835          }
10836          var other = o;
10837          if (this.size() !== other.size()) {
10838            return false;
10839          }
10840          var iterOther = other.iterator();
10841          for (var index = this.iterator(); index.hasNext(); ) {
10842            var elem = index.next();
10843            {
10844              var elemOther = iterOther.next();
10845              if (!java2.util.Objects.equals(elem, elemOther)) {
10846                return false;
10847              }
10848            }
10849          }
10850          return true;
10851        };
10852        AbstractList2.prototype.hashCode = function() {
10853          return java2.util.Collections.hashCode$java_lang_Iterable(this);
10854        };
10855        AbstractList2.prototype.indexOf = function(toFind) {
10856          for (var i = 0, n = this.size(); i < n; ++i) {
10857            {
10858              if (java2.util.Objects.equals(toFind, this.get(i))) {
10859                return i;
10860              }
10861            }
10862            ;
10863          }
10864          return -1;
10865        };
10866        AbstractList2.prototype.iterator = function() {
10867          return new AbstractList2.IteratorImpl(this);
10868        };
10869        AbstractList2.prototype.lastIndexOf = function(toFind) {
10870          for (var i = this.size() - 1; i > -1; --i) {
10871            {
10872              if (java2.util.Objects.equals(toFind, this.get(i))) {
10873                return i;
10874              }
10875            }
10876            ;
10877          }
10878          return -1;
10879        };
10880        AbstractList2.prototype.listIterator$ = function() {
10881          return this.listIterator$int(0);
10882        };
10883        AbstractList2.prototype.listIterator$int = function(from) {
10884          return new AbstractList2.ListIteratorImpl(this, from);
10885        };
10886        AbstractList2.prototype.listIterator = function(from) {
10887          if (typeof from === "number" || from === null) {
10888            return this.listIterator$int(from);
10889          } else if (from === void 0) {
10890            return this.listIterator$();
10891          } else
10892            throw new Error("invalid overload");
10893        };
10894        AbstractList2.prototype.remove$int = function(index) {
10895          throw new java2.lang.UnsupportedOperationException("Remove not supported on this list");
10896        };
10897        AbstractList2.prototype.remove = function(index) {
10898          if (typeof index === "number" || index === null) {
10899            return this.remove$int(index);
10900          } else if (index != null || index === null) {
10901            return _super.prototype.remove.call(this, index);
10902          } else
10903            throw new Error("invalid overload");
10904        };
10905        AbstractList2.prototype.set = function(index, o) {
10906          throw new java2.lang.UnsupportedOperationException("Set not supported on this list");
10907        };
10908        AbstractList2.prototype.subList = function(fromIndex, toIndex) {
10909          return new AbstractList2.SubList(this, fromIndex, toIndex);
10910        };
10911        AbstractList2.prototype.removeRange = function(fromIndex, endIndex) {
10912          var iter = this.listIterator$int(fromIndex);
10913          for (var i = fromIndex; i < endIndex; ++i) {
10914            {
10915              iter.next();
10916              iter.remove();
10917            }
10918            ;
10919          }
10920        };
10921        return AbstractList2;
10922      })(java2.util.AbstractCollection)
10923    );
10924    util2.AbstractList = AbstractList;
10925    AbstractList["__class"] = "java.util.AbstractList";
10926    AbstractList["__interfaces"] = ["java.util.List", "java.util.Collection", "java.lang.Iterable"];
10927    (function(AbstractList2) {
10928      var IteratorImpl = (
10929        /** @class */
10930        (function() {
10931          function IteratorImpl2(__parent) {
10932            this.__parent = __parent;
10933            if (this.i === void 0) {
10934              this.i = 0;
10935            }
10936            if (this.last === void 0) {
10937              this.last = 0;
10938            }
10939            this.i = 0;
10940            this.last = -1;
10941          }
10942          IteratorImpl2.prototype.forEachRemaining = function(consumer) {
10943            var _this = this;
10944            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
10945              if (funcInst == null || typeof funcInst == "function") {
10946                return funcInst;
10947              }
10948              return function(arg0) {
10949                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
10950              };
10951            })(consumer));
10952            while (this.hasNext()) {
10953              {
10954                (function(target) {
10955                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
10956                })(consumer);
10957              }
10958            }
10959            ;
10960          };
10961          IteratorImpl2.prototype.hasNext = function() {
10962            return this.i < this.__parent.size();
10963          };
10964          IteratorImpl2.prototype.next = function() {
10965            javaemul.internal.InternalPreconditions.checkElement(this.hasNext());
10966            return this.__parent.get(this.last = this.i++);
10967          };
10968          IteratorImpl2.prototype.remove = function() {
10969            javaemul.internal.InternalPreconditions.checkState(this.last !== -1);
10970            this.__parent.remove$int(this.last);
10971            this.i = this.last;
10972            this.last = -1;
10973          };
10974          return IteratorImpl2;
10975        })()
10976      );
10977      AbstractList2.IteratorImpl = IteratorImpl;
10978      IteratorImpl["__class"] = "java.util.AbstractList.IteratorImpl";
10979      IteratorImpl["__interfaces"] = ["java.util.Iterator"];
10980      var SubList = (
10981        /** @class */
10982        (function(_super) {
10983          __extends(SubList2, _super);
10984          function SubList2(wrapped, fromIndex, toIndex) {
10985            var _this = _super.call(this) || this;
10986            if (_this.wrapped === void 0) {
10987              _this.wrapped = null;
10988            }
10989            if (_this.fromIndex === void 0) {
10990              _this.fromIndex = 0;
10991            }
10992            if (_this.__size === void 0) {
10993              _this.__size = 0;
10994            }
10995            javaemul.internal.InternalPreconditions.checkCriticalPositionIndexes(fromIndex, toIndex, wrapped.size());
10996            _this.wrapped = wrapped;
10997            _this.fromIndex = fromIndex;
10998            _this.__size = toIndex - fromIndex;
10999            return _this;
11000          }
11001          SubList2.prototype.add$int$java_lang_Object = function(index, element) {
11002            javaemul.internal.InternalPreconditions.checkPositionIndex(index, this.__size);
11003            this.wrapped.add(this.fromIndex + index, element);
11004            this.__size++;
11005          };
11006          SubList2.prototype.add = function(index, element) {
11007            if ((typeof index === "number" || index === null) && (element != null || element === null)) {
11008              return this.add$int$java_lang_Object(index, element);
11009            } else if ((index != null || index === null) && element === void 0) {
11010              return this.add$java_lang_Object(index);
11011            } else
11012              throw new Error("invalid overload");
11013          };
11014          SubList2.prototype.get = function(index) {
11015            javaemul.internal.InternalPreconditions.checkElementIndex(index, this.__size);
11016            return this.wrapped.get(this.fromIndex + index);
11017          };
11018          SubList2.prototype.remove$int = function(index) {
11019            javaemul.internal.InternalPreconditions.checkElementIndex(index, this.__size);
11020            var result = this.wrapped["remove$int"](this.fromIndex + index);
11021            this.__size--;
11022            return result;
11023          };
11024          SubList2.prototype.remove = function(index) {
11025            if (typeof index === "number" || index === null) {
11026              return this.remove$int(index);
11027            } else if (index != null || index === null) {
11028              return _super.prototype.remove.call(this, index);
11029            } else
11030              throw new Error("invalid overload");
11031          };
11032          SubList2.prototype.set = function(index, element) {
11033            javaemul.internal.InternalPreconditions.checkElementIndex(index, this.__size);
11034            return this.wrapped.set(this.fromIndex + index, element);
11035          };
11036          SubList2.prototype.size = function() {
11037            return this.__size;
11038          };
11039          return SubList2;
11040        })(java2.util.AbstractList)
11041      );
11042      AbstractList2.SubList = SubList;
11043      SubList["__class"] = "java.util.AbstractList.SubList";
11044      SubList["__interfaces"] = ["java.util.List", "java.util.Collection", "java.lang.Iterable"];
11045      var ListIteratorImpl = (
11046        /** @class */
11047        (function(_super) {
11048          __extends(ListIteratorImpl2, _super);
11049          function ListIteratorImpl2(__parent, start) {
11050            var _this = this;
11051            if (typeof start === "number" || start === null) {
11052              var __args = Array.prototype.slice.call(arguments, [1]);
11053              _this = _super.call(this, __parent) || this;
11054              javaemul.internal.InternalPreconditions.checkPositionIndex(start, __parent.size());
11055              _this.i = start;
11056            } else if (start === void 0) {
11057              var __args = Array.prototype.slice.call(arguments, [1]);
11058              _this = _super.call(this, __parent) || this;
11059            } else
11060              throw new Error("invalid overload");
11061            return _this;
11062          }
11063          ListIteratorImpl2.prototype.add = function(o) {
11064            this.__parent.add(this.i, o);
11065            this.i++;
11066            this.last = -1;
11067          };
11068          ListIteratorImpl2.prototype.hasPrevious = function() {
11069            return this.i > 0;
11070          };
11071          ListIteratorImpl2.prototype.nextIndex = function() {
11072            return this.i;
11073          };
11074          ListIteratorImpl2.prototype.previous = function() {
11075            javaemul.internal.InternalPreconditions.checkElement(this.hasPrevious());
11076            return this.__parent.get(this.last = --this.i);
11077          };
11078          ListIteratorImpl2.prototype.previousIndex = function() {
11079            return this.i - 1;
11080          };
11081          ListIteratorImpl2.prototype.set = function(o) {
11082            javaemul.internal.InternalPreconditions.checkState(this.last !== -1);
11083            this.__parent.set(this.last, o);
11084          };
11085          return ListIteratorImpl2;
11086        })(AbstractList2.IteratorImpl)
11087      );
11088      AbstractList2.ListIteratorImpl = ListIteratorImpl;
11089      ListIteratorImpl["__class"] = "java.util.AbstractList.ListIteratorImpl";
11090      ListIteratorImpl["__interfaces"] = ["java.util.Iterator", "java.util.ListIterator"];
11091    })(AbstractList = util2.AbstractList || (util2.AbstractList = {}));
11092  })(util = java2.util || (java2.util = {}));
11093})(java || (java = {}));
11094(function(java2) {
11095  var util;
11096  (function(util2) {
11097    var AbstractQueue = (
11098      /** @class */
11099      (function(_super) {
11100        __extends(AbstractQueue2, _super);
11101        function AbstractQueue2() {
11102          return _super.call(this) || this;
11103        }
11104        AbstractQueue2.prototype.add = function(o) {
11105          javaemul.internal.InternalPreconditions.checkState(this.offer(o), "Unable to add element to queue");
11106          return true;
11107        };
11108        AbstractQueue2.prototype.addAll = function(c) {
11109          javaemul.internal.InternalPreconditions.checkNotNull(c);
11110          javaemul.internal.InternalPreconditions.checkArgument(c !== this, "Can't add a queue to itself");
11111          return _super.prototype.addAll.call(this, c);
11112        };
11113        AbstractQueue2.prototype.clear = function() {
11114          while (this.poll() != null) {
11115            {
11116            }
11117          }
11118          ;
11119        };
11120        AbstractQueue2.prototype.element = function() {
11121          var e = this.peek();
11122          javaemul.internal.InternalPreconditions.checkElement(e != null, "Queue is empty");
11123          return e;
11124        };
11125        AbstractQueue2.prototype.remove = function(o) {
11126          if (o != null || o === null) {
11127            return _super.prototype.remove.call(this, o);
11128          } else if (o === void 0) {
11129            return this.remove$();
11130          } else
11131            throw new Error("invalid overload");
11132        };
11133        AbstractQueue2.prototype.remove$ = function() {
11134          var e = this.poll();
11135          javaemul.internal.InternalPreconditions.checkElement(e != null, "Queue is empty");
11136          return e;
11137        };
11138        return AbstractQueue2;
11139      })(java2.util.AbstractCollection)
11140    );
11141    util2.AbstractQueue = AbstractQueue;
11142    AbstractQueue["__class"] = "java.util.AbstractQueue";
11143    AbstractQueue["__interfaces"] = ["java.util.Collection", "java.util.Queue", "j
11143ava.lang.Iterable"];
11144  })(util = java2.util || (java2.util = {}));
11145})(java || (java = {}));
11146(function(java2) {
11147  var util;
11148  (function(util2) {
11149    var ArrayDeque = (
11150      /** @class */
11151      (function(_super) {
11152        __extends(ArrayDeque2, _super);
11153        function ArrayDeque2(c) {
11154          var _this = this;
11155          if (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || c === null) {
11156            var __args = arguments;
11157            {
11158              var __args_18 = arguments;
11159              var numElements = c.size();
11160              _this = _super.call(this) || this;
11161              if (_this.head === void 0) {
11162                _this.head = 0;
11163              }
11164              if (_this.tail === void 0) {
11165                _this.tail = 0;
11166              }
11167              _this.array = (function(s) {
11168                var a = [];
11169                while (s-- > 0)
11170                  a.push(null);
11171                return a;
11172              })(ArrayDeque2.MIN_INITIAL_CAPACITY);
11173              javaemul.internal.ArrayHelper.setLength(_this.array, ArrayDeque2.nextArrayLe
11173ngth(numElements));
11174            }
11175            (function() {
11176              _this.addAll(c);
11177            })();
11178          } else if (typeof c === "number" || c === null) {
11179            var __args = arguments;
11180            var numElements = __args[0];
11181            _this = _super.call(this) || this;
11182            if (_this.head === void 0) {
11183              _this.head = 0;
11184            }
11185            if (_this.tail === void 0) {
11186              _this.tail = 0;
11187            }
11188            _this.array = (function(s) {
11189              var a = [];
11190              while (s-- > 0)
11191                a.push(null);
11192              return a;
11193            })(ArrayDeque2.MIN_INITIAL_CAPACITY);
11194            javaemul.internal.ArrayHelper.setLength(_this.array, ArrayDeque2.nextArrayLength(numElements));
11195          } else if (c === void 0) {
11196            var __args = arguments;
11197            _this = _super.call(this) || this;
11198            if (_this.head === void 0) {
11199              _this.head = 0;
11200            }
11201            if (_this.tail === void 0) {
11202              _this.tail = 0;
11203            }
11204            _this.array = (function(s) {
11205              var a = [];
11206              while (s-- > 0)
11207                a.push(null);
11208              return a;
11209            })(ArrayDeque2.MIN_INITIAL_CAPACITY);
11210          } else
11211            throw new Error("invalid overload");
11212          return _this;
11213        }
11214        ArrayDeque2.checkConcurrentModification = function(expression) {
11215          if (!expression) {
11216            throw new java2.util.ConcurrentModificationException();
11217          }
11218        };
11219        ArrayDeque2.nextArrayLength = function(numElements) {
11220          return ArrayDeque2.nextPowerOfTwo(Math.max(ArrayDeque2.MIN_INITIAL_CAPACITY, numElements));
11221        };
11222        ArrayDeque2.nextPowerOfTwo = function(num) {
11223          return javaemul.internal.IntegerHelper.highestOneBit(num) << 1;
11224        };
11225        ArrayDeque2.prototype.add = function(e) {
11226          this.addLast(e);
11227          return true;
11228        };
11229        ArrayDeque2.prototype.addFirst = function(e) {
11230          javaemul.internal.InternalPreconditions.checkCriticalNotNull(e);
11231          this.head = this.head - 1 & this.array.length - 1;
11232          this.array[this.head] = e;
11233          this.ensureCapacity();
11234        };
11235        ArrayDeque2.prototype.addLast = function(e) {
11236          javaemul.internal.InternalPreconditions.checkCriticalNotNull(e);
11237          this.array[this.tail] = e;
11238          this.tail = this.tail + 1 & this.array.length - 1;
11239          this.ensureCapacity();
11240        };
11241        ArrayDeque2.prototype.clear = function() {
11242          if (this.head === this.tail) {
11243            return;
11244          }
11245          this.array = (function(s) {
11246            var a = [];
11247            while (s-- > 0)
11248              a.push(null);
11249            return a;
11250          })(ArrayDeque2.MIN_INITIAL_CAPACITY);
11251          this.head = 0;
11252          this.tail = 0;
11253        };
11254        ArrayDeque2.prototype.clone = function() {
11255          return new ArrayDeque2(this);
11256        };
11257        ArrayDeque2.prototype.contains$java_lang_Object = function(o) {
11258          return this.contains$java_util_Iterator$java_lang_Object(this.iterator(), o);
11259        };
11260        ArrayDeque2.prototype.descendingIterator = function() {
11261          return new ArrayDeque2.DescendingIteratorImpl(this);
11262        };
11263        ArrayDeque2.prototype.element = function() {
11264          return this.getFirst();
11265        };
11266        ArrayDeque2.prototype.getFirst = function() {
11267          var e = this.peekFirstElement();
11268          javaemul.internal.InternalPreconditions.checkElement(e != null);
11269          return e;
11270        };
11271        ArrayDeque2.prototype.getLast = function() {
11272          var e = this.peekLastElement();
11273          javaemul.internal.InternalPreconditions.checkElement(e != null);
11274          return e;
11275        };
11276        ArrayDeque2.prototype.isEmpty = function() {
11277          return this.head === this.tail;
11278        };
11279        ArrayDeque2.prototype.iterator = function() {
11280          return new ArrayDeque2.IteratorImpl(this);
11281        };
11282        ArrayDeque2.prototype.offer = function(e) {
11283          return this.offerLast(e);
11284        };
11285        ArrayDeque2.prototype.offerFirst = function(e) {
11286          this.addFirst(e);
11287          return true;
11288        };
11289        ArrayDeque2.prototype.offerLast = function(e) {
11290          this.addLast(e);
11291          return true;
11292        };
11293        ArrayDeque2.prototype.peek = function() {
11294          return this.peekFirst();
11295        };
11296        ArrayDeque2.prototype.peekFirst = function() {
11297          return this.peekFirstElement();
11298        };
11299        ArrayDeque2.prototype.peekLast = function() {
11300          return this.peekLastElement();
11301        };
11302        ArrayDeque2.prototype.poll = function() {
11303          return this.pollFirst();
11304        };
11305        ArrayDeque2.prototype.pollFirst = function() {
11306          var e = this.peekFirstElement();
11307          if (e == null) {
11308            return null;
11309          }
11310          this.array[this.head] = null;
11311          this.head = this.head + 1 & this.array.length - 1;
11312          return e;
11313        };
11314        ArrayDeque2.prototype.pollLast = function() {
11315          var e = this.peekLastElement();
11316          if (e == null) {
11317            return null;
11318          }
11319          this.tail = this.tail - 1 & this.array.length - 1;
11320          this.array[this.tail] = null;
11321          return e;
11322        };
11323        ArrayDeque2.prototype.pop = function() {
11324          return this.removeFirst();
11325        };
11326        ArrayDeque2.prototype.push = function(e) {
11327          this.addFirst(e);
11328        };
11329        ArrayDeque2.prototype.remove$ = function() {
11330          return this.removeFirst();
11331        };
11332        ArrayDeque2.prototype.remove$java_lang_Object = function(o) {
11333          return this.removeFirstOccurrence(o);
11334        };
11335        ArrayDeque2.prototype.removeFirst = function() {
11336          var e = this.pollFirst();
11337          javaemul.internal.InternalPreconditions.checkElement(e != null);
11338          return e;
11339        };
11340        ArrayDeque2.prototype.removeFirstOccurrence = function(o) {
11341          return this.remove$java_util_Iterator$java_lang_Object(this.iterator(), o);
11342        };
11343        ArrayDeque2.prototype.removeLast = function() {
11344          var e = this.pollLast();
11345          javaemul.internal.InternalPreconditions.checkElement(e != null);
11346          return e;
11347        };
11348        ArrayDeque2.prototype.removeLastOccurrence = function(o) {
11349          return this.remove$java_util_Iterator$java_lang_Object(this.descendingIterator(), o);
11350        };
11351        ArrayDeque2.prototype.size = function() {
11352          return this.tail - this.head & this.array.length - 1;
11353        };
11354        ArrayDeque2.prototype.toArray$java_lang_Object_A = function(out) {
11355          var size = this.size();
11356          if (out.length < size) {
11357            out = javaemul.internal.ArrayHelper.createFrom(out, size);
11358          }
11359          this.copyElements(out, size);
11360          if (out.length > size) {
11361            out[size] = null;
11362          }
11363          return out;
11364        };
11365        ArrayDeque2.prototype.toArray = function(out) {
11366          if (out != null && out instanceof Array && (out.length == 0 || out[0] == null || out[0] != null) || out === null) {
11367            return this.toArray$java_lang_Object_A(out);
11368          } else if (out === void 0) {
11369            return this.toArray$();
11370          } else
11371            throw new Error("invalid overload");
11372        };
11373        ArrayDeque2.prototype.contains$java_util_Iterator$java_lang_Object = function(it, o) {
11374          if (o == null) {
11375            return false;
11376          }
11377          while (it.hasNext()) {
11378            {
11379              if (
11380                /* equals */
11381                (function(o1, o2) {
11382                  return o1 && o1.equals ? o1.equals(o2) : o1 === o2;
11383                })(o, it.next())
11384              ) {
11385                return true;
11386              }
11387            }
11388          }
11389          ;
11390          return false;
11391        };
11392        ArrayDeque2.prototype.contains = function(it, o) {
11393          if ((it != null && (it.constructor != null && it.constructor["__interfaces"] != null && it.constructor["__interfaces"].indexOf("java.util.Iterator") >= 0) || it === null) && (o != null || o === null)) {
11394            return this.contains$java_util_Iterator$java_lang_Object(it, o);
11395          } else if ((it != null || it === null) && o === void 0) {
11396            return this.contains$java_lang_Object(it);
11397          } else
11398            throw new Error("invalid overload");
11399        };
11400        ArrayDeque2.prototype.remove$java_util_Iterator$java_lang_Object = function(it, o) {
11401          if (this.contains$java_util_Iterator$java_lang_Object(it, o)) {
11402            it.remove();
11403            return true;
11404          }
11405          return false;
11406        };
11407        ArrayDeque2.prototype.remove = function(it, o) {
11408          if ((it != null && (it.constructor != null && it.constructor["__interfaces"] != null && it.constructor["__interfaces"].indexOf("java.util.Iterator") >= 0) || it === null) && (o != null || o === null)) {
11409            return this.remove$java_util_Iterator$java_lang_Object(it, o);
11410          } else if ((it != null || it === null) && o === void 0) {
11411            return this.remove$java_lang_Object(it);
11412          } else if (it === void 0 && o === void 0) {
11413            return this.remove$();
11414          } else
11415            throw new Error("invalid overload");
11416        };
11417        ArrayDeque2.prototype.peekFirstElement = function() {
11418          return this.array[this.head];
11419        };
11420        ArrayDeque2.prototype.peekLastElement = function() {
11421          return this.array[this.tail - 1 & this.array.length - 1];
11422        };
11423        ArrayDeque2.prototype.copyElements = function(dest, count) {
11424          var mask = this.array.length - 1;
11425          for (var i = this.head, dstIdx = 0; dstIdx < count; i = i + 1 & mask, ++dstIdx) {
11426            {
11427              dest[dstIdx] = this.array[i];
11428            }
11429            ;
11430          }
11431        };
11432        ArrayDeque2.prototype.ensureCapacity = function() {
11433          if (this.head !== this.tail) {
11434            return;
11435          }
11436          var numElements = this.array.length;
11437          var newLength = ArrayDeque2.nextArrayLength(numElements);
11438          if (this.head !== 0) {
11439            var newArray = javaemul.internal.ArrayHelper.createFrom(this.array, newLength);
11440            this.copyElements(newArray, numElements);
11441            this.array = newArray;
11442            this.head = 0;
11443          } else {
11444            javaemul.internal.ArrayHelper.setLength(this.array, newLength);
11445          }
11446          this.tail = numElements;
11447        };
11448        ArrayDeque2.prototype.removeAtIndex = function(i) {
11449          var mask = this.array.length - 1;
11450          var headDistance = i - this.head & mask;
11451          var tailDistance = this.tail - i & mask;
11452          var size = this.tail - this.head & mask;
11453          ArrayDeque2.checkConcurrentModification(headDistance < size);
11454          if (headDistance >= tailDistance) {
11455            this.shiftLeftAtIndex(i);
11456            return -1;
11457          } else {
11458            this.shiftRightAtIndex(i);
11459            return 1;
11460          }
11461        };
11462        ArrayDeque2.prototype.shiftLeftAtIndex = function(i) {
11463          var mask = this.array.length - 1;
11464          this.tail = this.tail - 1 & mask;
11465          while (i !== this.tail) {
11466            {
11467              var nextOffset = i + 1 & mask;
11468              this.array[i] = this.array[nextOffset];
11469              i = nextOffset;
11470            }
11471          }
11472          ;
11473          this.array[this.tail] = null;
11474        };
11475        ArrayDeque2.prototype.shiftRightAtIndex = function(i) {
11476          var mask = this.array.length - 1;
11477          while (i !== this.head) {
11478            {
11479              var prevOffset = i - 1 & mask;
11480              this.array[i] = this.array[prevOffset];
11481              i = prevOffset;
11482            }
11483          }
11484          ;
11485          this.array[this.head] = null;
11486          this.head = this.head + 1 & mask;
11487        };
11488        ArrayDeque2.MIN_INITIAL_CAPACITY = 8;
11489        return ArrayDeque2;
11490      })(java2.util.AbstractCollection)
11491    );
11492    util2.ArrayDeque = ArrayDeque;
11493    ArrayDeque["__class"] = "java.util.ArrayDeque";
11494    ArrayDeque["__interfaces"] = ["java.lang.Cloneable", "java.util.Collection", "java.util.Queue", "java.util.Deque", "java.lang.Iterable"];
11495    (function(ArrayDeque2) {
11496      var IteratorImpl = (
11497        /** @class */
11498        (function() {
11499          function IteratorImpl2(__parent) {
11500            this.__parent = __parent;
11501            this.currentIndex = this.__parent.head;
11502            this.fence = this.__parent.tail;
11503            this.lastIndex = -1;
11504          }
11505          IteratorImpl2.prototype.forEachRemaining = function(consumer) {
11506            var _this = this;
11507            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
11508              if (funcInst == null || typeof funcInst == "function") {
11509                return funcInst;
11510              }
11511              return function(arg0) {
11512                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
11513              };
11514            })(consumer));
11515            while (this.hasNext()) {
11516              {
11517                (function(target) {
11518                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
11519                })(consumer);
11520              }
11521            }
11522            ;
11523          };
11524          IteratorImpl2.prototype.hasNext = function() {
11525            return this.currentIndex !== this.fence;
11526          };
11527          IteratorImpl2.prototype.next = function() {
11528            javaemul.internal.InternalPreconditions.checkCriticalElement(this.hasNext());
11529            var e = this.__parent.array[this.currentIndex];
11530            ArrayDeque2.checkConcurrentModification(this.fence === this.__parent.tail && e != null);
11531            this.lastIndex = this.currentIndex;
11532            this.currentIndex = this.currentIndex + 1 & this.__parent.array.length - 1;
11533            return e;
11534          };
11535          IteratorImpl2.prototype.remove = function() {
11536            javaemul.internal.InternalPreconditions.checkState(this.lastIndex >= 0);
11537            if (this.__parent.removeAtIndex(this.lastIndex) < 0) {
11538              this.currentIndex = this.currentIndex - 1 & this.__parent.array.length - 1;
11539              this.fence = this.__parent.tail;
11540            }
11541            this.lastIndex = -1;
11542          };
11543          return IteratorImpl2;
11544        })()
11545      );
11546      ArrayDeque2.IteratorImpl = IteratorImpl;
11547      IteratorImpl["__class"] = "java.util.ArrayDeque.IteratorImpl";
11548      IteratorImpl["__interfaces"] = ["java.util.Iterator"];
11549      var DescendingIteratorImpl = (
11550        /** @class */
11551        (function() {
11552          function DescendingIteratorImpl2(__parent) {
11553            this.__parent = __parent;
11554            this.currentIndex = this.__parent.tail;
11555            this.fence = this.__parent.head;
11556            this.lastIndex = -1;
11557          }
11558          DescendingIteratorImpl2.prototype.forEachRemaining = function(consumer) {
11559            var _this = this;
11560            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
11561              if (funcInst == null || typeof funcInst == "function") {
11562                return funcInst;
11563              }
11564              return function(arg0) {
11565                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
11566              };
11567            })(consumer));
11568            while (this.hasNext()) {
11569              {
11570                (function(target) {
11571                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
11572                })(consumer);
11573              }
11574            }
11575            ;
11576          };
11577          DescendingIteratorImpl2.prototype.hasNext = function() {
11578            return this.currentIndex !== this.fence;
11579          };
11580          DescendingIteratorImpl2.prototype.next = function() {
11581            javaemul.internal.InternalPreconditions.checkCriticalElement(this.hasNext());
11582            this.currentIndex = this.currentIndex - 1 & this.__parent.array.length - 1;
11583            var e = this.__parent.array[this.currentIndex];
11584            ArrayDeque2.checkConcurrentModification(this.fence === this.__parent.head && e != null);
11585            this.lastIndex = this.currentIndex;
11586            return e;
11587          };
11588          DescendingIteratorImpl2.prototype.remove = function() {
11589            javaemul.internal.InternalPreconditions.checkState(this.lastIndex >= 0);
11590            if (this.__parent.removeAtIndex(this.lastIndex) > 0) {
11591              this.currentIndex = this.currentIndex + 1 & this.__parent.array.length - 1;
11592              this.fence = this.__parent.head;
11593            }
11594            this.lastIndex = -1;
11595          };
11596          return DescendingIteratorImpl2;
11597        })()
11598      );
11599      ArrayDeque2.DescendingIteratorImpl = DescendingIteratorImpl;
11600      DescendingIteratorImpl["__class"] = "java.util.ArrayDeque.DescendingIteratorImpl";
11601      DescendingIteratorImpl["__interfaces"] = ["java.util.Iterator"];
11602    })(ArrayDeque = util2.ArrayDeque || (util2.ArrayDeque = {}));
11603  })(util = java2.util || (java2.util = {}));
11604})(java || (java = {}));
11605(function(java2) {
11606  var util;
11607  (function(util2) {
11608    var Timer = (
11609      /** @class */
11610      (function() {
11611        function Timer2(name, daemon) {
11612          if ((typeof name === "string" || name === null) && (typeof daemon === "boolean" || daemon === null)) {
11613            var __args = arguments;
11614            if (this.name === void 0) {
11615              this.name = null;
11616            }
11617            this.timeouts = new Array();
11618            this.intervals = new Array();
11619            this.name = name;
11620          } else if ((typeof name === "string" || name === null) && daemon === void 0) {
11621            var __args = arguments;
11622            {
11623              var __args_19 = arguments;
11624              var daemon_1 = true;
11625              if (this.name === void 0) {
11626                this.name = null;
11627              }
11628              this.timeouts = new Array();
11629              this.intervals = new Array();
11630              this.name = name;
11631            }
11632          } else if ((typeof name === "boolean" || name === null) && daemon === void 0) {
11633            var __args = arguments;
11634            var daemon_2 = __args[0];
11635            {
11636              var __args_20 = arguments;
11637              {
11638                var __args_21 = arguments;
11639                var name_1 = "Timer-" + ++Timer2.nextSerialNumber;
11640                var daemon_3 = true;
11641                if (this.name === void 0) {
11642                  this.name = null;
11643                }
11644                this.timeouts = new Array();
11645                this.intervals = new Array();
11646                this.name = name_1;
11647              }
11648            }
11649          } else if (name === void 0 && daemon === void 0) {
11650            var __args = arguments;
11651            {
11652              var __args_22 = arguments;
11653              var name_2 = "Timer-" + ++Timer2.nextSerialNumber;
11654              var daemon_4 = true;
11655              if (this.name === void 0) {
11656                this.name = null;
11657              }
11658              this.timeouts = new Array();
11659              this.intervals = new Array();
11660              this.name = name_2;
11661            }
11662          } else
11663            throw new Error("invalid overload");
11664        }
11665        Timer2.prototype.schedule$java_util_TimerTask$long = function(task, delay) {
11666          if (delay < 0) {
11667            throw new java2.lang.IllegalArgumentException("Negative delay.");
11668          } else {
11669            this.schedule$java_util_TimerTask$java_util_Date(task, new util2.Date(java2.lang.System.currentTimeMillis() + delay));
11670          }
11671        };
11672        Timer2.prototype.schedule$java_util_TimerTask$java_util_Date = function(task, time) {
11673          var _this = this;
11674          task.nextExecutionTime = time.getTime();
11675          task.handle = window.setTimeout((function() {
11676            if (task.state !== java2.util.TimerTask.CANCELLED) {
11677              task.run();
11678              task.state = java2.util.TimerTask.EXECUTED;
11679            }
11680            _this.timeouts.splice(_this.timeouts.indexOf(task), 1);
11681          }), time.getTime() - java2.lang.System.currentTimeMillis()) | 0;
11682          this.timeouts.push(task);
11683          task.state = java2.util.TimerTask.SCHEDULED;
11684        };
11685        Timer2.prototype.schedule$java_util_TimerTask$long$long = function(task, delay, period) {
11686          if (delay < 0) {
11687            throw new java2.lang.IllegalArgumentException("Negative delay.");
11688          } else {
11689            this.schedule$java_util_TimerTask$java_util_Date$long(task, new util2.Date(java2.lang.System.currentTimeMillis() + delay), period);
11690          }
11691        };
11692        Timer2.prototype.schedule$java_util_TimerTask$java_util_Date$long = function(task, time, period) {
11693          var _this = this;
11694          if (period <= 0) {
11695            throw new java2.lang.IllegalArgumentException("Non-positive period.");
11696          } else {
11697            task.period = period;
11698            task.nextExecutionTime = time.getTime();
11699            task.handle = window.setTimeout((function() {
11700              if (task.state !== java2.util.TimerTask.CANCELLED) {
11701                task.run();
11702                _this.schedule$java_util_TimerTask$long$long(task, period, period);
11703              } else {
11704                _this.timeouts.splice(_this.timeouts.indexOf(task), 1);
11705              }
11706            }), time.getTime() - java2.lang.System.currentTimeMillis()) | 0;
11707            this.timeouts.push(task);
11708            task.state = java2.util.TimerTask.SCHEDULED;
11709          }
11710        };
11711        Timer2.prototype.schedule = function(task, time, period) {
11712          if ((task != null && task instanceof java2.util.TimerTask || task === null) && (time != null && time instanceof util2.Date || time === null) && (typeof period === "number" || period === null)) {
11713            return this.schedule$java_util_TimerTask$java_util_Date$long(task, time, period);
11714          } else if ((task != null && task instanceof java2.util.TimerTask || task === null) && (typeof time === "number" || time === null) && (typeof period === "number" || period === null)) {
11715            return this.schedule$java_util_TimerTask$long$long(task, time, period);
11716          } else if ((task != null && task instanceof java2.util.TimerTask || task === null) && (time != null && time instanceof util2.Date || time === null) && period === void 0) {
11717            return this.schedule$java_util_TimerTask$java_util_Date(task, time);
11718          } else if ((task != null && task instanceof java2.util.TimerTask || task === null) && (typeof time === "number" || time === null) && period === void 0) {
11719            return this.schedule$java_util_TimerTask$long(task, time);
11720          } else
11721            throw new Error("invalid overload");
11722        };
11723        Timer2.prototype.scheduleAtFixedRate$java_util_TimerTask$long$long = function(task, delay, period) {
11724          if (delay < 0) {
11725            throw new java2.lang.IllegalArgumentException("Negative delay.");
11726          } else {
11727            this.scheduleAtFixedRate$java_util_TimerTask$java_util_Date$long(task, new util2.Date(java2.lang.System.currentTimeMillis() + delay), period);
11728          }
11729        };
11730        Timer2.prototype.scheduleAtFixedRate$java_util_TimerTask$java_util_Date$long = function(task, time, period) {
11731          if (period <= 0) {
11732            throw new java2.lang.IllegalArgumentException("Non-positive period.");
11733          } else {
11734            task.period = period;
11735            task.nextExecutionTime = time.getTime();
11736            var start = new Timer2.Timer$0(this, task);
11737            this.schedule$java_util_TimerTask$java_util_Date(start, time);
11738            task.handle = start.handle;
11739          }
11740        };
11741        Timer2.prototype.scheduleAtFixedRate = function(task, time, period) {
11742          if ((task != null && task instanceof java2.util.TimerTask || task === null) && (time != null && time instanceof util2.Date || time === null) && (typeof period === "number" || period === null)) {
11743            return this.scheduleAtFixedRate$java_util_TimerTask$java_util_Date$long(task, time, period);
11744          } else if ((task != null && task instanceof java2.util.TimerTask || task === null) && (typeof time === "number" || time === null) && (typeof period === "number" || period === null)) {
11745            return this.scheduleAtFixedRate$java_util_TimerTask$long$long(task, time, period);
11746          } else
11747            throw new Error("invalid overload");
11748        };
11749        Timer2.prototype.cancel = function() {
11750          for (var index = 0; index < this.timeouts.length; index++) {
11751            var task = this.timeouts[index];
11752            {
11753              clearTimeout(task.handle);
11754            }
11755          }
11756          for (var index = 0; index < this.intervals.length; index++) {
11757            var task = this.intervals[index];
11758            {
11759              clearInterval(task.handle);
11760            }
11761          }
11762          this.intervals = new Array();
11763          this.timeouts = new Array();
11764        };
11765        Timer2.prototype.purge = function() {
11766          var newTimeouts = this.timeouts.filter(function(timerTask) {
11767            return timerTask.handle !== java2.util.TimerTask.EXECUTED && timerTask.handle !== java2.util.TimerTask.CANCELLED;
11768          });
11769          var newIntervals = this.intervals.filter(function(timerTask) {
11770            return timerTask.handle !== java2.util.TimerTask.EXECUTED && timerTask.handle !== java2.util.TimerTask.CANCELLED;
11771          });
11772          var purged = this.timeouts.length - newTimeouts.length + this.intervals.length - newIntervals.length;
11773          this.timeouts = newTimeouts;
11774          this.intervals = newIntervals;
11775          return purged;
11776        };
11777        Timer2.nextSerialNumber = 0;
11778        return Timer2;
11779      })()
11780    );
11781    util2.Timer = Timer;
11782    Timer["__class"] = "java.util.Timer";
11783    (function(Timer2) {
11784      var Timer$0 = (
11785        /** @class */
11786        (function(_super) {
11787          __extends(Timer$02, _super);
11788          function Timer$02(__parent, task) {
11789            var _this = _super.call(this) || this;
11790            _this.task = task;
11791            _this.__parent = __parent;
11792            return _this;
11793          }
11794          Timer$02.prototype.run = function() {
11795            var _this = this;
11796            if (this.task.state !== java2.util.TimerTask.CANCELLED) {
11797              this.task.nextExecutionTime = java2.lang.System.currentTimeMillis() + this.task.period;
11798              this.task.handle = window.setInterval((function() {
11799                if (_this.task.state !== java2.util.TimerTask.CANCELLED) {
11800                  _this.task.nextExecutionTime = java2.lang.System.currentTimeMillis() + _this.task.period;
11801                  _this.task.run();
11802                } else {
11803                  clearInterval(_this.task.handle);
11804                  _this.__parent.intervals.splice(_this.__parent.intervals.indexOf(_this.task), 1);
11805                }
11806              }), this.task.period) | 0;
11807              this.__parent.intervals.push(this.task);
11808              this.task.run();
11809            }
11810          };
11811          return Timer$02;
11812        })(java2.util.TimerTask)
11813      );
11814      Timer2.Timer$0 = Timer$0;
11815      Timer$0["__interfaces"] = ["java.lang.Runnable"];
11816    })(Timer = util2.Timer || (util2.Timer = {}));
11817  })(util = java2.util || (java2.util = {}));
11818})(java || (java = {}));
11819(function(javaemul13) {
11820  var internal;
11821  (function(internal2) {
11822    var StringHelper = (
11823      /** @class */
11824      (function() {
11825        function StringHelper2() {
11826        }
11827        StringHelper2.CASE_INSENSITIVE_ORDER_$LI$ = function() {
11828          if (StringHelper2.CASE_INSENSITIVE_ORDER == null) {
11829            StringHelper2.CASE_INSENSITIVE_ORDER = function(a, b) {
11830              return (
11831                /* compareToIgnoreCase */
11832                a.toUpperCase().localeCompare(b.toUpperCase())
11833              );
11834            };
11835          }
11836          return StringHelper2.CASE_INSENSITIVE_ORDER;
11837        };
11838        StringHelper2.copyValueOf$char_A = function(v) {
11839          return StringHelper2.valueOf$char_A(v);
11840        };
11841        StringHelper2.copyValueOf$char_A$int$int = function(v, offset, count) {
11842          return StringHelper2.valueOf$char_A$int$int(v, offset, count);
11843        };
11844        StringHelper2.copyValueOf = function(v, offset, count) {
11845          if ((v != null && v instanceof Array && (v.length == 0 || v[0] == null || typeof v[0] === "string") || v === null) && (typeof offset === "number" || offset === null) && (typeof count === "number" || count === null)) {
11846            return javaemul13.internal.StringHelper.copyValueOf$char_A$int$int(v, offset, count);
11847          } else if ((v != null && v instanceof Array && (v.length == 0 || v[0] == null || typeof v[0] === "string") || v === null) && offset === void 0 && count === void 0) {
11848            return javaemul13.internal.StringHelper.copyValueOf$char_A(v);
11849          } else
11850            throw new Error("invalid overload");
11851        };
11852        StringHelper2.valueOf$boolean = function(x) {
11853          return "" + x;
11854        };
11855        StringHelper2.valueOf$char = function(x) {
11856          return "" + x;
11857        };
11858        StringHelper2.valueOf$char_A$int$int = function(x, offset, count) {
11859          var end = offset + count;
11860          javaemul13.internal.InternalPreconditions.checkStringBounds(offset, end, x.length);
11861          var batchSize = javaemul13.internal.ArrayHelper.ARRAY_PROCESS_BATCH_SIZE;
11862          var s = "";
11863          for (var batchStart = offset; batchStart < end; ) {
11864            {
11865              var batchEnd = Math.min(batchStart + batchSize, end);
11866              s += javaemul13.internal.ArrayHelper.unsafeClone(x, batchStart, batchEnd).join("");
11867              batchStart = batchEnd;
11868            }
11869            ;
11870          }
11871          return s;
11872        };
11873        StringHelper2.valueOf = function(x, offset, count) {
11874          if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "string") || x === null) && (typeof offset === "number" || offset === null) && (typeof count === "number" || count === null)) {
11875            return javaemul13.internal.StringHelper.valueOf$char_A$int$int(x, offset, count);
11876          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "string") || x === null) && offset === void 0 && count === void 0) {
11877            return javaemul13.internal.StringHelper.valueOf$char_A(x);
11878          } else if ((typeof x === "boolean" || x === null) && offset === void 0 && count === void 0) {
11879            return javaemul13.internal.StringHelper.valueOf$boolean(x);
11880          } else if ((typeof x === "string" || x === null) && offset === void 0 && count === void 0) {
11881            return javaemul13.internal.StringHelper.valueOf$char(x);
11882          } else if ((typeof x === "number" || x === null) && offset === void 0 && count === void 0) {
11883            return javaemul13.internal.StringHelper.valueOf$int(x);
11884          } else if ((typeof x === "number" || x === null) && offset === void 0 && count === void 0) {
11885            return javaemul13.internal.StringHelper.valueOf$long(x);
11886          } else if ((typeof x === "number" || x === null) && offset === void 0 && count === void 0) {
11887            return javaemul13.internal.StringHelper.valueOf$float(x);
11888          } else if ((typeof x === "number" || x === null) && offset === void 0 && count === void 0) {
11889            return javaemul13.internal.StringHelper.valueOf$double(x);
11890          } else if ((x != null || x === null) && offset === void 0 && count === void 0) {
11891            return javaemul13.internal.StringHelper.valueOf$java_lang_Object(x);
11892          } else
11893            throw new Error("invalid overload");
11894        };
11895        StringHelper2.fromCharCode = function(array) {
11896          return String.fromCharCode(array | 0);
11897        };
11898        StringHelper2.valueOf$char_A = function(x) {
11899          return StringHelper2.valueOf$char_A$int$int(x, 0, x.length);
11900        };
11901        StringHelper2.valueOf$double = function(x) {
11902          return "" + x;
11903        };
11904        StringHelper2.valueOf$float = function(x) {
11905          return "" + x;
11906        };
11907        StringHelper2.valueOf$int = function(x) {
11908          return "" + x;
11909        };
11910        StringHelper2.valueOf$long = function(x) {
11911          return "" + x;
11912        };
11913        StringHelper2.valueOf$java_lang_Object = function(x) {
11914          return x == null ? "null" : x.toString();
11915        };
11916        StringHelper2.translateReplaceString = function(replaceStr) {
11917          var pos = 0;
11918          while (0 <= (pos = replaceStr.indexOf("\\", pos))) {
11919            {
11920              if ((function(c) {
11921                return c.charCodeAt == null ? c : c.charCodeAt(0);
11922              })(replaceStr.charAt(pos + 1)) == "$".charCodeAt(0)) {
11923                replaceStr = replaceStr.substring(0, pos) + "$" + replaceStr.substring(++pos);
11924              } else {
11925                replaceStr = replaceStr.substring(0, pos) + replaceStr.substring(++pos);
11926              }
11927            }
11928          }
11929          ;
11930          return replaceStr;
11931        };
11932        StringHelper2.compareTo = function(thisStr, otherStr) {
11933          if (thisStr == otherStr) {
11934            return 0;
11935          }
11936          ;
11937          return thisStr < otherStr ? -1 : 1;
11938        };
11939        StringHelper2.getCharset = function(charsetName) {
11940          try {
11941            return java.nio.charset.Charset.forName(charsetName);
11942          } catch (e) {
11943            throw new java.io.UnsupportedEncodingException(charsetName);
11944          }
11945        };
11946        StringHelper2.fromCodePoint = function(codePoint) {
11947          if (codePoint >= javaemul13.internal.CharacterHelper.MIN_SUPPLEMENTARY_CODE_POINT) {
11948            var hiSurrogate = javaemul13.internal.CharacterHelper.getHighSurrogate(codePoint);
11949            var loSurrogate = javaemul13.internal.CharacterHelper.getLowSurrogate(codePoint);
11950            return (
11951              /* valueOf */
11952              String(hiSurrogate).toString() + /* valueOf */
11953              String(loSurrogate).toString()
11954            );
11955          } else {
11956            return (
11957              /* valueOf */
11958              String(String.fromCharCode(codePoint)).toString()
11959            );
11960          }
11961        };
11962        StringHelper2.format = function(formatString) {
11963          var args = [];
11964          for (var _i = 1; _i < arguments.length; _i++) {
11965            args[_i - 1] = arguments[_i];
11966          }
11967          return "";
11968        };
11969        StringHelper2.join = function(delimiter) {
11970          var elements = [];
11971          for (var _i = 1; _i < arguments.length; _i++) {
11972            elements[_i - 1] = arguments[_i];
11973          }
11974          java.util.Objects.requireNonNull(delimiter);
11975          java.util.Objects.requireNonNull(elements);
11976          var joiner = new java.util.StringJoiner(delimiter);
11977          for (var index = 0; index < elements.length; index++) {
11978            var cs = elements[index];
11979            {
11980              joiner.add(cs);
11981            }
11982          }
11983          return joiner.toString();
11984        };
11985        return StringHelper2;
11986      })()
11987    );
11988    internal2.StringHelper = StringHelper;
11989    StringHelper["__class"] = "javaemul.internal.StringHelper";
11990  })(internal = javaemul13.internal || (javaemul13.internal = {}));
11991})(javaemul || (javaemul = {}));
11992(function(java2) {
11993  var sql;
11994  (function(sql2) {
11995    var Timestamp = (
11996      /** @class */
11997      (function(_super) {
11998        __extends(Timestamp2, _super);
11999        function Timestamp2(year, month, date, hour, minute, second, nano) {
12000          var _this = this;
12001          if ((typeof year === "number" || year === null) && (typeof month === "number" || month === null) && (typeof date === "number" || date === null) && (typeof hour === "number" || hour === null) && (typeof minute === "number" || minute === null) && (typeof second === "number" || second === null) && (typeof nano === "number" || nano === null)) {
12002            var __args = arguments;
12003            _this = _super.call(this, year, month, date, hour, minute, second) || this;
12004            if (_this.nanos === void 0) {
12005              _this.nanos = 0;
12006            }
12007            _this.setNanos(nano);
12008          } else if ((typeof year === "number" || year === null) && month === void 0 && date === void 0 && hour === void 0 && minute === void 0 && second === void 0 && nano === void 0) {
12009            var __args = arguments;
12010            var time = __args[0];
12011            _this = _super.call(this, time) || this;
12012            if (_this.nanos === void 0) {
12013              _this.nanos = 0;
12014            }
12015            _this.nanos = (time % 1e3 | 0) * 1e6;
12016          } else
12017            throw new Error("invalid overload");
12018          return _this;
12019        }
12020        Timestamp2.valueOf = function(s) {
12021          var components = s.split(" ");
12022          if (components.length !== 2) {
12023            throw new java2.lang.IllegalArgumentException("Invalid escape format: " + s);
12024          }
12025          var timeComponents = components[1].split("\\.");
12026          var hasNanos = true;
12027          var nanos = 0;
12028          if (timeComponents.length === 1) {
12029            hasNanos = false;
12030          } else if (timeComponents.length !== 2) {
12031            throw new java2.lang.IllegalArgumentException("Invalid escape format: " + s);
12032          }
12033          var d = java2.sql.Date.valueOf(components[0]);
12034          var t = java2.sql.Time.valueOf(timeComponents[0]);
12035          if (hasNanos) {
12036            var nanosString = timeComponents[1];
12037            var len = nanosString.length;
12038            if (len > 9) {
12039              throw new java2.lang.IllegalArgumentException("Invalid escape format: " + s);
12040            }
12041            if (len < 9) {
12042              nanosString += "00000000".substring(len - 1);
12043            }
12044            try {
12045              nanos = javaemul.internal.IntegerHelper.valueOf(nanosString);
12046            } catch (e) {
12047              throw new java2.lang.IllegalArgumentException("Invalid escape format: " + s);
12048            }
12049          }
12050          return new Timestamp2(d.getYear(), d.getMonth(), d.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), nanos);
12051        };
12052        Timestamp2.padNine = function(value) {
12053          var toReturn = new java2.lang.StringBuilder("000000000");
12054          var asString = String(value).toString();
12055          toReturn = toReturn.replace(9 - asString.length, 9, asString);
12056          return toReturn.toString();
12057        };
12058        Timestamp2.prototype.after$java_sql_Timestamp = function(ts) {
12059          return this.getTime() > ts.getTime() || this.getTime() === ts.getTime() && this.getNanos() > ts.getNanos();
12060        };
12061        Timestamp2.prototype.after = function(ts) {
12062          if (ts != null && ts instanceof java2.sql.Timestamp || ts === null) {
12063            return this.after$java_sql_Timestamp(ts);
12064          } else if (ts != null && ts instanceof sql2.Date || ts === null) {
12065            return _super.prototype.after.call(this, ts);
12066          } else
12067            throw new Error("invalid overload");
12068        };
12069        Timestamp2.prototype.before$java_sql_Timestamp = function(ts) {
12070          return this.getTime() < ts.getTime() || this.getTime() === ts.getTime() && this.getNanos() < ts.getNanos();
12071        };
12072        Timestamp2.prototype.before = function(ts) {
12073          if (ts != null && ts instanceof java2.sql.Timestamp || ts === null) {
12074            return this.before$java_sql_Timestamp(ts);
12075          } else if (ts != null && ts instanceof sql2.Date || ts === null) {
12076            return _super.prototype.before.call(this, ts);
12077          } else
12078            throw new Error("invalid overload");
12079        };
12080        Timestamp2.prototype.compareTo$java_util_Date = function(o) {
12081          if (o != null && o instanceof java2.sql.Timestamp) {
12082            return this.compareTo$java_sql_Timestamp(o);
12083          } else {
12084            return this.compareTo$java_sql_Timestamp(new Timestamp2(o.getTime()));
12085          }
12086        };
12087        Timestamp2.prototype.compareTo$java_sql_Timestamp = function(o) {
12088          var cmp = this.getTime() - o.getTime();
12089          return cmp === 0 ? (
12090            /* compare */
12091            this.getNanos() - o.getNanos()
12092          ) : cmp;
12093        };
12094        Timestamp2.prototype.compareTo = function(o) {
12095          if (o != null && o instanceof java2.sql.Timestamp || o === null) {
12096            return this.compareTo$java_sql_Timestamp(o);
12097          } else if (o != null && o instanceof sql2.Date || o === null) {
12098            return this.compareTo$java_util_Date(o);
12099          } else
12100            throw new Error("invalid overload");
12101        };
12102        Timestamp2.prototype.equals$java_lang_Object = function(ts) {
12103          return ts != null && ts instanceof java2.sql.Timestamp && this.equals$java_sql_Timestamp(ts);
12104        };
12105        Timestamp2.prototype.equals$java_sql_Timestamp = function(ts) {
12106          return ts != null && this.getTime() === ts.getTime() && this.getNanos() === ts.getNanos();
12107        };
12108        Timestamp2.prototype.equals = function(ts) {
12109          if (ts != null && ts instanceof java2.sql.Timestamp || ts === null) {
12110            return this.equals$java_sql_Timestamp(ts);
12111          } else if (ts != null || ts === null) {
12112            return this.equals$java_lang_Object(ts);
12113          } else
12114            throw new Error("invalid overload");
12115        };
12116        Timestamp2.prototype.getNanos = function() {
12117          return this.nanos;
12118        };
12119        Timestamp2.prototype.getTime = function() {
12120          return _super.prototype.getTime.call(this);
12121        };
12122        Timestamp2.prototype.hashCode = function() {
12123          return (
12124            /* hashCode */
12125            (function(o) {
12126              if (o.hashCode) {
12127                return o.hashCode();
12128              } else {
12129                return o.toString().split("").reduce(function(prevHash, currVal) {
12130                  return (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0;
12131                }, 0);
12132              }
12133            })(this)
12134          );
12135        };
12136        Timestamp2.prototype.setNanos = function(n) {
12137          if (n < 0 || n > 999999999) {
12138            throw new java2.lang.IllegalArgumentException("nanos out of range " + n);
12139          }
12140          this.nanos = n;
12141          _super.prototype.setTime.call(this, (function(n2) {
12142            return n2 < 0 ? Math.ceil(n2) : Math.floor(n2);
12143          })(this.getTime() / 1e3) * 1e3 + (this.nanos / 1e6 | 0));
12144        };
12145        Timestamp2.prototype.setTime = function(time) {
12146          _super.prototype.setTime.call(this, time);
12147          this.nanos = (time % 1e3 | 0) * 1e6;
12148        };
12149        return Timestamp2;
12150      })(java2.util.Date)
12151    );
12152    sql2.Timestamp = Timestamp;
12153    Timestamp["__class"] = "java.sql.Timestamp";
12154    Timestamp["__interfaces"] = ["java.lang.Cloneable", "java.lang.Comparable", "java.io.Serializable"];
12155  })(sql = java2.sql || (java2.sql = {}));
12156})(java || (java = {}));
12157(function(java2) {
12158  var sql;
12159  (function(sql2) {
12160    var Time = (
12161      /** @class */
12162      (function(_super) {
12163        __extends(Time2, _super);
12164        function Time2(hour, minute, second) {
12165          var _this = this;
12166          if ((typeof hour === "number" || hour === null) && (typeof minute === "number" || minute === null) && (typeof second === "number" || second === null)) {
12167            var __args = arguments;
12168            _this = _super.call(this, 70, 0, 1, hour, minute, second) || this;
12169          } else if ((typeof hour === "number" || hour === null) && minute === void 0 && second === void 0) {
12170            var __args = arguments;
12171            var time = __args[0];
12172            _this = _super.call(this, time) || this;
12173          } else
12174            throw new Error("invalid overload");
12175          return _this;
12176        }
12177        Time2.valueOf = function(s) {
12178          var split = s.split(":");
12179          if (split.length !== 3) {
12180            throw new java2.lang.IllegalArgumentException("Invalid escape format: " + s);
12181          }
12182          try {
12183            var hh = javaemul.internal.IntegerHelper.parseInt(split[0]);
12184            var mm = javaemul.internal.IntegerHelper.parseInt(split[1]);
12185            var ss = javaemul.internal.IntegerHelper.parseInt(split[2]);
12186            return new Time2(hh, mm, ss);
12187          } catch (e) {
12188            throw new java2.lang.IllegalArgumentException("Invalid escape format: " + s);
12189          }
12190        };
12191        Time2.prototype.getDate = function() {
12192          throw new java2.lang.IllegalArgumentException();
12193        };
12194        Time2.prototype.getDay = function() {
12195          throw new java2.lang.IllegalArgumentException();
12196        };
12197        Time2.prototype.getMonth = function() {
12198          throw new java2.lang.IllegalArgumentException();
12199        };
12200        Time2.prototype.getYear = function() {
12201          throw new java2.lang.IllegalArgumentException();
12202        };
12203        Time2.prototype.setDate = function(i) {
12204          throw new java2.lang.IllegalArgumentException();
12205        };
12206        Time2.prototype.setMonth = function(i) {
12207          throw new java2.lang.IllegalArgumentException();
12208        };
12209        Time2.prototype.setYear = function(i) {
12210          throw new java2.lang.IllegalArgumentException();
12211        };
12212        return Time2;
12213      })(java2.util.Date)
12214    );
12215    sql2.Time = Time;
12216    Time["__class"] = "java.sql.Time";
12217    Time["__interfaces"] = ["java.lang.Cloneable", "java.lang.Comparable", "j
12217ava.io.Serializable"];
12218  })(sql = java2.sql || (java2.sql = {}));
12219})(java || (java = {}));
12220(function(java2) {
12221  var sql;
12222  (function(sql2) {
12223    var Date2 = (
12224      /** @class */
12225      (function(_super) {
12226        __extends(Date3, _super);
12227        function Date3(year, month, day) {
12228          var _this = this;
12229          if ((typeof year === "number" || year === null) && (typeof month === "number" || month === null) && (typeof day === "number" || day === null)) {
12230            var __args = arguments;
12231            _this = _super.call(this, year, month, day) || this;
12232          } else if ((typeof year === "number" || year === null) && month === void 0 && day === void 0) {
12233            var __args = arguments;
12234            var date = __args[0];
12235            _this = _super.call(this, date) || this;
12236          } else
12237            throw new Error("invalid overload");
12238          return _this;
12239        }
12240        Date3.valueOf = function(s) {
12241          var split = s.split("-");
12242          if (split.length !== 3) {
12243            throw new java2.lang.IllegalArgumentException("Invalid escape format: " + s);
12244          }
12245          try {
12246            var y = javaemul.internal.IntegerHelper.parseInt(split[0]) - 1900;
12247            var m = javaemul.internal.IntegerHelper.parseInt(split[1]) - 1;
12248            var d = javaemul.internal.IntegerHelper.parseInt(split[2]);
12249            return new Date3(y, m, d);
12250          } catch (e) {
12251            throw new java2.lang.IllegalArgumentException("Invalid escape format: " + s);
12252          }
12253        };
12254        Date3.prototype.getHours = function() {
12255          throw new java2.lang.IllegalArgumentException();
12256        };
12257        Date3.prototype.getMinutes = function() {
12258          throw new java2.lang.IllegalArgumentException();
12259        };
12260        Date3.prototype.getSeconds = function() {
12261          throw new java2.lang.IllegalArgumentException();
12262        };
12263        Date3.prototype.setHours = function(i) {
12264          throw new java2.lang.IllegalArgumentException();
12265        };
12266        Date3.prototype.setMinutes = function(i) {
12267          throw new java2.lang.IllegalArgumentException();
12268        };
12269        Date3.prototype.setSeconds = function(i) {
12270          throw new java2.lang.IllegalArgumentException();
12271        };
12272        return Date3;
12273      })(java2.util.Date)
12274    );
12275    sql2.Date = Date2;
12276    Date2["__class"] = "java.sql.Date";
12277    Date2["__interfaces"] = ["java.lang.Cloneable", "java.lang.Comparable", "j
12277ava.io.Serializable"];
12278  })(sql = java2.sql || (java2.sql = {}));
12279})(java || (java = {}));
12280(function(java2) {
12281  var util;
12282  (function(util2) {
12283    var logging;
12284    (function(logging2) {
12285      var SimpleConsoleLogHandler = (
12286        /** @class */
12287        (function(_super) {
12288          __extends(SimpleConsoleLogHandler2, _super);
12289          function SimpleConsoleLogHandler2() {
12290            return _super !== null && _super.apply(this, arguments) || this;
12291          }
12292          SimpleConsoleLogHandler2.prototype.publish = function(record) {
12293            if (!this.isLoggable(record)) {
12294              return;
12295            }
12296            var level = this.toConsoleLogLevel(record.getLevel());
12297            console.log(level, record.getMessage());
12298            if (record.getThrown() != null) {
12299              console.log(level, record.getThrown());
12300            }
12301          };
12302          SimpleConsoleLogHandler2.prototype.toConsoleLogLevel = function(level) {
12303            var val = level.intValue();
12304            if (val >= java2.util.logging.Level.SEVERE_$LI$().intValue()) {
12305              return "error";
12306            } else if (val >= java2.util.logging.Level.WARNING_$LI$().intValue()) {
12307              return "warn";
12308            } else if (val >= java2.util.logging.Level.INFO_$LI$().intValue()) {
12309              return "info";
12310            } else {
12311              return "log";
12312            }
12313          };
12314          SimpleConsoleLogHandler2.prototype.close = function() {
12315          };
12316          SimpleConsoleLogHandler2.prototype.flush = function() {
12317          };
12318          return SimpleConsoleLogHandler2;
12319        })(java2.util.logging.Handler)
12320      );
12321      logging2.SimpleConsoleLogHandler = SimpleConsoleLogHandler;
12322      SimpleConsoleLogHandler["__class"] = "java.util.logging.SimpleConsoleLogHandler";
12323    })(logging = util2.logging || (util2.logging = {}));
12324  })(util = java2.util || (java2.util = {}));
12325})(java || (java = {}));
12326(function(java2) {
12327  var util;
12328  (function(util2) {
12329    var InternalStringMap = (
12330      /** @class */
12331      (function() {
12332        function InternalStringMap2(host) {
12333          this.backingMap = java2.util.InternalJsMapFactory.newJsMap();
12334          if (this.host === void 0) {
12335            this.host = null;
12336          }
12337          if (this.size === void 0) {
12338            this.size = 0;
12339          }
12340          if (this.valueMod === void 0) {
12341            this.valueMod = 0;
12342          }
12343          this.host = host;
12344        }
12345        InternalStringMap2.prototype.forEach = function(action) {
12346          javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
12347            if (funcInst == null || typeof funcInst == "function") {
12348              return funcInst;
12349            }
12350            return function(arg0) {
12351              return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
12352            };
12353          })(action));
12354          var _loop_4 = function(index2) {
12355            var t = index2.next();
12356            {
12357              (function(target) {
12358                return typeof target === "function" ? target(t) : target.accept(t);
12359              })(action);
12360            }
12361          };
12362          for (var index = this.iterator(); index.hasNext(); ) {
12363            _loop_4(index);
12364          }
12365        };
12366        InternalStringMap2.prototype.contains = function(key) {
12367          return !javaemul.internal.JsUtils.isUndefined(this.backingMap.get(key));
12368        };
12369        InternalStringMap2.prototype.get = function(key) {
12370          return this.backingMap.get(key);
12371        };
12372        InternalStringMap2.prototype.put = function(key, value) {
12373          var oldValue = this.backingMap.get(key);
12374          this.backingMap.set(key, InternalStringMap2.toNullIfUndefined(value));
12375          if (javaemul.internal.JsUtils.isUndefined(oldValue)) {
12376            this.size++;
12377            java2.util.ConcurrentModificationDetector.structureChanged(this.host);
12378          } else {
12379            this.valueMod++;
12380          }
12381          return oldValue;
12382        };
12383        InternalStringMap2.prototype.remove = function(key) {
12384          var value = this.backingMap.get(key);
12385          if (!javaemul.internal.JsUtils.isUndefined(value)) {
12386            this.backingMap["delete"](key);
12387            this.size--;
12388            java2.util.ConcurrentModificationDetector.structureChanged(this.host);
12389          } else {
12390            this.valueMod++;
12391          }
12392          return value;
12393        };
12394        InternalStringMap2.prototype.getSize = function() {
12395          return this.size;
12396        };
12397        InternalStringMap2.prototype.iterator = function() {
12398          return new InternalStringMap2.InternalStringMap$0(this);
12399        };
12400        InternalStringMap2.prototype.newMapEntry = function(entry, lastV
12400alueMod) {
12401          return new InternalStringMap2.InternalStringMap$1(this, entry, lastValueMod);
12402        };
12403        InternalStringMap2.toNullIfUndefined = function(value) {
12404          return javaemul.internal.JsUtils.isUndefined(value) ? null : value;
12405        };
12406        return InternalStringMap2;
12407      })()
12408    );
12409    util2.InternalStringMap = InternalStringMap;
12410    InternalStringMap["__class"] = "java.util.InternalStringMap";
12411    InternalStringMap["__interfaces"] = ["java.lang.Iterable"];
12412    (function(InternalStringMap2) {
12413      var InternalStringMap$0 = (
12414        /** @class */
12415        (function() {
12416          function InternalStringMap$02(__parent) {
12417            this.__parent = __parent;
12418            this.entries = this.__parent.backingMap.entries();
12419            this.current = this.entries.next();
12420            if (this.last === void 0) {
12421              this.last = null;
12422            }
12423          }
12424          InternalStringMap$02.prototype.forEachRemaining = function(consumer) {
12425            var _this = this;
12426            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
12427              if (funcInst == null || typeof funcInst == "function") {
12428                return funcInst;
12429              }
12430              return function(arg0) {
12431                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
12432              };
12433            })(consumer));
12434            while (this.hasNext()) {
12435              {
12436                (function(target) {
12437                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
12438                })(consumer);
12439              }
12440            }
12441            ;
12442          };
12443          InternalStringMap$02.prototype.hasNext = function() {
12444            return !this.current.done;
12445          };
12446          InternalStringMap$02.prototype.next = function() {
12447            this.last = this.current;
12448            this.current = this.entries.next();
12449            return this.__parent.newMapEntry(this.last, this.__parent.valueMod);
12450          };
12451          InternalStringMap$02.prototype.remove = function() {
12452            this.__parent.remove(this.last.value[0]);
12453          };
12454          return InternalStringMap$02;
12455        })()
12456      );
12457      InternalStringMap2.InternalStringMap$0 = InternalStringMap$0;
12458      InternalStringMap$0["__interfaces"] = ["java.util.Iterator"];
12459      var InternalStringMap$1 = (
12460        /** @class */
12461        (function(_super) {
12462          __extends(InternalStringMap$12, _super);
12463          function InternalStringMap$12(__parent, entry, lastValueMod) {
12464            var _this = _super.call(this) || this;
12465            _this.entry = entry;
12466            _this.lastValueMod = lastValueMod;
12467            _this.__parent = __parent;
12468            return _this;
12469          }
12470          InternalStringMap$12.prototype.getKey = function() {
12471            return this.entry.value[0];
12472          };
12473          InternalStringMap$12.prototype.getValue = function() {
12474            if (this.__parent.valueMod !== this.lastValueMod) {
12475              return this.__parent.get(this.entry.value[0]);
12476            }
12477            return this.entry.value[1];
12478          };
12479          InternalStringMap$12.prototype.setValue = function(object) {
12480            return this.__parent.put(this.entry.value[0], object);
12481          };
12482          return InternalStringMap$12;
12483        })(java2.util.AbstractMapEntry)
12484      );
12485      InternalStringMap2.InternalStringMap$1 = InternalStringMap$1;
12486      InternalStringMap$1["__interfaces"] = ["java.util.Map.Entry"];
12487    })(InternalStringMap = util2.InternalStringMap || (util2.InternalStringMap = {}));
12488  })(util = java2.util || (java2.util = {}));
12489})(java || (java = {}));
12490(function(java2) {
12491  var security;
12492  (function(security2) {
12493    var MessageDigest = (
12494      /** @class */
12495      (function(_super) {
12496        __extends(MessageDigest2, _super);
12497        function MessageDigest2(algorithm) {
12498          var _this = _super.call(this) || this;
12499          if (_this.algorithm === void 0) {
12500            _this.algorithm = null;
12501          }
12502          _this.algorithm = algorithm;
12503          return _this;
12504        }
12505        MessageDigest2.getInstance = function(algorithm) {
12506          if ("MD5" === algorithm) {
12507            return new MessageDigest2.Md5Digest();
12508          }
12509          throw new java2.security.NoSuchAlgorithmException(algorithm + " not supported");
12510        };
12511        MessageDigest2.isEqual = function(digestA, digestB) {
12512          var n = digestA.length;
12513          if (n !== digestB.length) {
12514            return false;
12515          }
12516          for (var i = 0; i < n; ++i) {
12517            {
12518              if (digestA[i] !== digestB[i]) {
12519                return false;
12520              }
12521            }
12522            ;
12523          }
12524          return true;
12525        };
12526        MessageDigest2.prototype.digest$ = function() {
12527          return this.engineDigest$();
12528        };
12529        MessageDigest2.prototype.digest$byte_A = function(input) {
12530          this.update$byte_A(input);
12531          return this.digest$();
12532        };
12533        MessageDigest2.prototype.digest$byte_A$int$int = function(buf, offset, len) {
12534          return this.engineDigest$byte_A$int$int(buf, offset, len);
12535        };
12536        MessageDigest2.prototype.digest = function(buf, offset, len) {
12537          if ((buf != null && buf instanceof Array && (buf.length == 0 || buf[0] == null || typeof buf[0] === "number") || buf === null) && (typeof offset === "number" || offset === null) && (typeof len === "
12537number" || len === null)) {
12538            return this.digest$byte_A$int$int(buf, offset, len);
12539          } else if ((buf != null && buf instanceof Array && (buf.length == 0 || buf[0] == null || typeof buf[0] === "number") || buf === null) && offset === void 0 && len === void 0) {
12540            return this.digest$byte_A(buf);
12541          } else if (buf === void 0 && offset === void 0 && len === void 0) {
12542            return this.digest$();
12543          } else
12544            throw new Error("invalid overload");
12545        };
12546        MessageDigest2.prototype.getAlgorithm = function() {
12547          return this.algorithm;
12548        };
12549        MessageDigest2.prototype.getDigestLength = function() {
12550          return this.engineGetDigestLength();
12551        };
12552        MessageDigest2.prototype.reset = function() {
12553          this.engineReset();
12554        };
12555        MessageDigest2.prototype.update$byte = function(input) {
12556          this.engineUpdate$byte(input);
12557        };
12558        MessageDigest2.prototype.update$byte_A = function(input) {
12559          this.engineUpdate$byte_A$int$int(input, 0, input.length);
12560        };
12561        MessageDigest2.prototype.update$byte_A$int$int = function(input, offset, len) {
12562          this.engineUpdate$byte_A$int$int(input, offset, len);
12563        };
12564        MessageDigest2.prototype.update = function(input, offset, len) {
12565          if ((input != null && input instanceof Array && (input.length == 0 || input[0] == null || typeof input[0] === "number") || input === null) && (typeof offset === "number" || offset === null) && (typeof len === "
12565number" || len === null)) {
12566            return this.update$byte_A$int$int(input, offset, len);
12567          } else if ((input != null && input instanceof Array && (input.length == 0 || input[0] == null || typeof input[0] === "number") || input === null) && offset === void 0 && len === void 0) {
12568            return this.update$byte_A(input);
12569          } else if ((typeof input === "number" || input === null) && offset === void 0 && len === void 0) {
12570            return this.update$byte(input);
12571          } else
12572            throw new Error("invalid overload");
12573        };
12574        return MessageDigest2;
12575      })(java2.security.MessageDigestSpi)
12576    );
12577    security2.MessageDigest = MessageDigest;
12578    MessageDigest["__class"] = "java.security.MessageDigest";
12579    (function(MessageDigest2) {
12580      var Md5Digest = (
12581        /** @class */
12582        (function(_super) {
12583          __extends(Md5Digest2, _super);
12584          function Md5Digest2() {
12585            var _this = _super.call(this, "MD5") || this;
12586            if (_this.buffer === void 0) {
12587              _this.buffer = null;
12588            }
12589            if (_this.counter === void 0) {
12590              _this.counter = 0;
12591            }
12592            _this.oneByte = [0];
12593            if (_this.remainder === void 0) {
12594              _this.remainder = 0;
12595            }
12596            if (_this.state === void 0) {
12597              _this.state = null;
12598            }
12599            if (_this.x === void 0) {
12600              _this.x = null;
12601            }
12602            _this.engineReset();
12603            return _this;
12604          }
12605          Md5Digest2.padding_$LI$ = function() {
12606            if (Md5Digest2.padding == null) {
12607              Md5Digest2.padding = [128 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
12608            }
12609            return Md5Digest2.padding;
12610          };
12611          Md5Digest2.toBytes = function(n) {
12612            var b = [0, 0, 0, 0, 0, 0, 0, 0];
12613            b[0] = n | 0;
12614            n >>>= 8;
12615            b[1] = n | 0;
12616            n >>>= 8;
12617            b[2] = n | 0;
12618            n >>>= 8;
12619            b[3] = n | 0;
12620            n >>>= 8;
12621            b[4] = n | 0;
12622            n >>>= 8;
12623            b[5] = n | 0;
12624            n >>>= 8;
12625            b[6] = n | 0;
12626            n >>>= 8;
12627            b[7] = n | 0;
12628            return b;
12629          };
12630          Md5Digest2.byte2int = function(__in, out) {
12631            for (var inpos = 0, outpos = 0; outpos < 16; outpos++) {
12632              {
12633                out[outpos] = __in[inpos++] & 255 | (__in[inpos++] & 255) << 8 | (__in[inpos++] & 255) << 16 | (__in[inpos++] & 255) << 24;
12634              }
12635              ;
12636            }
12637          };
12638          Md5Digest2.f = function(x, y, z) {
12639            return z ^ x & (y ^ z);
12640          };
12641          Md5Digest2.ff = function(a, b, c, d, x, s, ac) {
12642            a += x + ac + Md5Digest2.f(b, c, d);
12643            a = a << s | a >>> -s;
12644            return a + b;
12645          };
12646          Md5Digest2.g = function(x, y, z) {
12647            return y ^ z & (x ^ y);
12648          };
12649          Md5Digest2.gg = function(a, b, c, d, x, s, ac) {
12650            a += x + ac + Md5Digest2.g(b, c, d);
12651            a = a << s | a >>> -s;
12652            return a + b;
12653          };
12654          Md5Digest2.h = function(x, y, z) {
12655            return x ^ y ^ z;
12656          };
12657          Md5Digest2.hh = function(a, b, c, d, x, s, ac) {
12658            a += x + ac + Md5Digest2.h(b, c, d);
12659            a = a << s | a >>> -s;
12660            return a + b;
12661          };
12662          Md5Digest2.i = function(x, y, z) {
12663            return y ^ (x | ~z);
12664          };
12665          Md5Digest2.ii = function(a, b, c, d, x, s, ac) {
12666            a += x + ac + Md5Digest2.i(b, c, d);
12667            a = a << s | a >>> -s;
12668            return a + b;
12669          };
12670          Md5Digest2.int2byte = function(__in, out) {
12671            for (var inpos = 0, outpos = 0; inpos < 4; inpos++) {
12672              {
12673                out[outpos++] = __in[inpos] & 255 | 0;
12674                out[outpos++] = __in[inpos] >>> 8 & 255 | 0;
12675                out[outpos++] = __in[inpos] >>> 16 & 255 | 0;
12676                out[outpos++] = __in[inpos] >>> 24 & 255 | 0;
12677              }
12678              ;
12679            }
12680          };
12681          Md5Digest2.prototype.engineDigest = function(buf, offset, len) {
12682            if ((buf != null && buf instanceof Array && (buf.length == 0 || buf[0] == null || typeof buf[0] === "
12682number") || buf === null) && (typeof offset === "number" || offset === null) && (typeof len === "number" || len === null)) {
12683              return _super.prototype.engineDigest.call(this, buf, offset, len);
12684            } else if (buf === void 0 && offset === void 0 && len === void 0) {
12685              return this.engineDigest$();
12686            } else
12687              throw new Error("invalid overload");
12688          };
12689          Md5Digest2.prototype.engineDigest$ = function() {
12690            var bits = Md5Digest2.toBytes(this.counter << 3);
12691            var digest = (function(s) {
12692              var a = [];
12693              while (s-- > 0)
12694                a.push(0);
12695              return a;
12696            })(16);
12697            if (this.remainder > 8) {
12698              this.engineUpdate$byte_A$int$int(Md5Digest2.padding_$LI$(), 0, this.remainder - 8);
12699            } else {
12700              this.engineUpdate$byte_A$int$int(Md5Digest2.padding_$LI$(), 0, 64 + (this.remainder - 8));
12701            }
12702            this.engineUpdate$byte_A$int$int(bits, 0, 8);
12703            Md5Digest2.int2byte(this.state, digest);
12704            this.reset();
12705            return digest;
12706          };
12707          Md5Digest2.prototype.engineGetDigestLength = function() {
12708            return 16;
12709          };
12710          Md5Digest2.prototype.engineReset = function() {
12711            this.buffer = (function(s) {
12712              var a = [];
12713              while (s-- > 0)
12714                a.push(0);
12715              return a;
12716            })(64);
12717            this.state = [0, 0, 0, 0];
12718            this.x = (function(s) {
12719              var a = [];
12720              while (s-- > 0)
12721                a.push(0);
12722              return a;
12723            })(16);
12724            this.state[0] = 1732584193;
12725            this.state[1] = -271733879;
12726            this.state[2] = -1732584194;
12727            this.state[3] = 271733878;
12728            this.counter = 0;
12729            this.remainder = 64;
12730          };
12731          Md5Digest2.prototype.engineUpdate$byte = function(input) {
12732            this.oneByte[0] = input;
12733            this.engineUpdate$byte_A$int$int(this.oneByte, 0, 1);
12734          };
12735          Md5Digest2.prototype.engineUpdate$byte_A$int$int = function(input, offset, len) {
12736            while (true) {
12737              {
12738                if (len >= this.remainder) {
12739                  java2.lang.System.arraycopy(input, offset, this.buffer, this.counter & 63 | 0, this.remainder);
12740                  this.transform(this.buffer);
12741                  this.counter += this.remainder;
12742                  offset += this.remainder;
12743                  len -= this.remainder;
12744                  this.remainder = 64;
12745                } else {
12746                  java2.lang.System.arraycopy(input, offset, this.buffer, this.counter & 63 | 0, len);
12747                  this.counter += len;
12748                  this.remainder -= len;
12749                  break;
12750                }
12751              }
12752            }
12753            ;
12754          };
12755          Md5Digest2.prototype.engineUpdate = function(input, offset, len) {
12756            if ((input != null && input instanceof Array && (input.length == 0 || input[0] == null || typeof input[0] === "number") || input === null) && (typeof offset === "number" || offset === null) && (typeof len === "
12756number" || len === null)) {
12757              return this.engineUpdate$byte_A$int$int(input, offset, len);
12758            } else if ((typeof input === "number" || input === null) && offset === void 0 && len === void 0) {
12759              return this.engineUpdate$byte(input);
12760            } else
12761              throw new Error("invalid overload");
12762          };
12763          Md5Digest2.prototype.transform = function(buffer) {
12764            var a;
12765            var b;
12766            var c;
12767            var d;
12768            Md5Digest2.byte2int(buffer, this.x);
12769            a = this.state[0];
12770            b = this.state[1];
12771            c = this.state[2];
12772            d = this.state[3];
12773            a = Md5Digest2.ff(a, b, c, d, this.x[0], 7, -680876936);
12774            d = Md5Digest2.ff(d, a, b, c, this.x[1], 12, -389564586);
12775            c = Md5Digest2.ff(c, d, a, b, this.x[2], 17, 606105819);
12776            b = Md5Digest2.ff(b, c, d, a, this.x[3], 22, -1044525330);
12777            a = Md5Digest2.ff(a, b, c, d, this.x[4], 7, -176418897);
12778            d = Md5Digest2.ff(d, a, b, c, this.x[5], 12, 1200080426);
12779            c = Md5Digest2.ff(c, d, a, b, this.x[6], 17, -1473231341);
12780            b = Md5Digest2.ff(b, c, d, a, this.x[7], 22, -45705983);
12781            a = Md5Digest2.ff(a, b, c, d, this.x[8], 7, 1770035416);
12782            d = Md5Digest2.ff(d, a, b, c, this.x[9], 12, -1958414417);
12783            c = Md5Digest2.ff(c, d, a, b, this.x[10], 17, -42063);
12784            b = Md5Digest2.ff(b, c, d, a, this.x[11], 22, -1990404162);
12785            a = Md5Digest2.ff(a, b, c, d, this.x[12], 7, 1804603682);
12786            d = Md5Digest2.ff(d, a, b, c, this.x[13], 12, -40341101);
12787            c = Md5Digest2.ff(c, d, a, b, this.x[14], 17, -1502002290);
12788            b = Md5Digest2.ff(b, c, d, a, this.x[15], 22, 1236535329);
12789            a = Md5Digest2.gg(a, b, c, d, this.x[1], 5, -165796510);
12790            d = Md5Digest2.gg(d, a, b, c, this.x[6], 9, -1069501632);
12791            c = Md5Digest2.gg(c, d, a, b, this.x[11], 14, 643717713);
12792            b = Md5Digest2.gg(b, c, d, a, this.x[0], 20, -373897302);
12793            a = Md5Digest2.gg(a, b, c, d, this.x[5], 5, -701558691);
12794            d = Md5Digest2.gg(d, a, b, c, this.x[10], 9, 38016083);
12795            c = Md5Digest2.gg(c, d, a, b, this.x[15], 14, -660478335);
12796            b = Md5Digest2.gg(b, c, d, a, this.x[4], 20, -405537848);
12797            a = Md5Digest2.gg(a, b, c, d, this.x[9], 5, 568446438);
12798            d = Md5Digest2.gg(d, a, b, c, this.x[14], 9, -1019803690);
12799            c = Md5Digest2.gg(c, d, a, b, this.x[3], 14, -187363961);
12800            b = Md5Digest2.gg(b, c, d, a, this.x[8], 20, 1163531501);
12801            a = Md5Digest2.gg(a, b, c, d, this.x[13], 5, -1444681467);
12802            d = Md5Digest2.gg(d, a, b, c, this.x[2], 9, -51403784);
12803            c = Md5Digest2.gg(c, d, a, b, this.x[7], 14, 1735328473);
12804            b = Md5Digest2.gg(b, c, d, a, this.x[12], 20, -1926607734);
12805            a = Md5Digest2.hh(a, b, c, d, this.x[5], 4, -378558);
12806            d = Md5Digest2.hh(d, a, b, c, this.x[8], 11, -2022574463);
12807            c = Md5Digest2.hh(c, d, a, b, this.x[11], 16, 1839030562);
12808            b = Md5Digest2.hh(b, c, d, a, this.x[14], 23, -35309556);
12809            a = Md5Digest2.hh(a, b, c, d, this.x[1], 4, -1530992060);
12810            d = Md5Digest2.hh(d, a, b, c, this.x[4], 11, 1272893353);
12811            c = Md5Digest2.hh(c, d, a, b, this.x[7], 16, -155497632);
12812            b = Md5Digest2.hh(b, c, d, a, this.x[10], 23, -1094730640);
12813            a = Md5Digest2.hh(a, b, c, d, this.x[13], 4, 681279174);
12814            d = Md5Digest2.hh(d, a, b, c, this.x[0], 11, -358537222);
12815            c = Md5Digest2.hh(c, d, a, b, this.x[3], 16, -722521979);
12816            b = Md5Digest2.hh(b, c, d, a, this.x[6], 23, 76029189);
12817            a = Md5Digest2.hh(a, b, c, d, this.x[9], 4, -640364487);
12818            d = Md5Digest2.hh(d, a, b, c, this.x[12], 11, -421815835);
12819            c = Md5Digest2.hh(c, d, a, b, this.x[15], 16, 530742520);
12820            b = Md5Digest2.hh(b, c, d, a, this.x[2], 23, -995338651);
12821            a = Md5Digest2.ii(a, b, c, d, this.x[0], 6, -198630844);
12822            d = Md5Digest2.ii(d, a, b, c, this.x[7], 10, 1126891415);
12823            c = Md5Digest2.ii(c, d, a, b, this.x[14], 15, -1416354905);
12824            b = Md5Digest2.ii(b, c, d, a, this.x[5], 21, -57434055);
12825            a = Md5Digest2.ii(a, b, c, d, this.x[12], 6, 1700485571);
12826            d = Md5Digest2.ii(d, a, b, c, this.x[3], 10, -1894986606);
12827            c = Md5Digest2.ii(c, d, a, b, this.x[10], 15, -1051523);
12828            b = Md5Digest2.ii(b, c, d, a, this.x[1], 21, -2054922799);
12829            a = Md5Digest2.ii(a, b, c, d, this.x[8], 6, 1873313359);
12830            d = Md5Digest2.ii(d, a, b, c, this.x[15], 10, -30611744);
12831            c = Md5Digest2.ii(c, d, a, b, this.x[6], 15, -1560198380);
12832            b = Md5Digest2.ii(b, c, d, a, this.x[13], 21, 1309151649);
12833            a = Md5Digest2.ii(a, b, c, d, this.x[4], 6, -145523070);
12834            d = Md5Digest2.ii(d, a, b, c, this.x[11], 10, -1120210379);
12835            c = Md5Digest2.ii(c, d, a, b, this.x[2], 15, 718787259);
12836            b = Md5Digest2.ii(b, c, d, a, this.x[9], 21, -343485551);
12837            this.state[0] = javaemul.internal.Coercions.ensureInt(this.state[0] + a);
12838            this.state[1] = javaemul.internal.Coercions.ensureInt(this.state[1] + b);
12839            this.state[2] = javaemul.internal.Coercions.ensureInt(this.state[2] + c);
12840            this.state[3] = javaemul.internal.Coercions.ensureInt(this.state[3] + d);
12841          };
12842          return Md5Digest2;
12843        })(java2.security.MessageDigest)
12844      );
12845      MessageDigest2.Md5Digest = Md5Digest;
12846      Md5Digest["__class"] = "java.security.MessageDigest.Md5Digest";
12847    })(MessageDigest = security2.MessageDigest || (security2.MessageDigest = {}));
12848  })(security = java2.security || (java2.security = {}));
12849})(java || (java = {}));
12850(function(java2) {
12851  var io;
12852  (function(io2) {
12853    var OutputStreamWriter = (
12854      /** @class */
12855      (function(_super) {
12856        __extends(OutputStreamWriter2, _super);
12857        function OutputStreamWriter2(out, charsetName) {
12858          var _this = this;
12859          if ((out != null && out instanceof java2.io.OutputStream || out === null) && (typeof charsetName === "string" || charsetName === null)) {
12860            var __args = arguments;
12861            _this = _super.call(this, out) || this;
12862            if (_this.out === void 0) {
12863              _this.out = null;
12864            }
12865            if (charsetName == null)
12866              throw new java2.lang.NullPointerException("charsetName");
12867            _this.out = out;
12868          } else if ((out != null && out instanceof java2.io.OutputStream || out === null) && (charsetName != null && charsetName instanceof java2.nio.charset.Charset || charsetName === null)) {
12869            var __args = arguments;
12870            var cs = __args[1];
12871            _this = _super.call(this, out) || this;
12872            if (_this.out === void 0) {
12873              _this.out = null;
12874            }
12875            if (cs == null)
12876              throw new java2.lang.NullPointerException("charset");
12877            _this.out = out;
12878          } else if ((out != null && out instanceof java2.io.OutputStream || out === null) && charsetName === void 0) {
12879            var __args = arguments;
12880            _this = _super.call(this, out) || this;
12881            if (_this.out === void 0) {
12882              _this.out = null;
12883            }
12884            _this.out = out;
12885          } else
12886            throw new Error("invalid overload");
12887          return _this;
12888        }
12889        OutputStreamWriter2.prototype.flushBuffer = function() {
12890          this.out.flush();
12891        };
12892        OutputStreamWriter2.prototype.write$int = function(c) {
12893          this.out.write$int(c);
12894        };
12895        OutputStreamWriter2.prototype.write$char_A$int$int = function(cbuf, off, len) {
12896          var buf = (function(s) {
12897            var a = [];
12898            while (s-- > 0)
12899              a.push(0);
12900            return a;
12901          })(len);
12902          for (var i = 0; i < len; ++i) {
12903            buf[i] = cbuf[i + off].charCodeAt(0) | 0;
12904          }
12905          this.out.write$byte_A$int$int(buf, 0, len);
12906        };
12907        OutputStreamWriter2.prototype.write = function(cbuf, off, len) {
12908          if ((cbuf != null && cbuf instanceof Array && (cbuf.length == 0 || cbuf[0] == null || typeof cbuf[0] === "string") || cbuf === null) && (typeof off === "number" || off === null) && (typeof len === "
12908number" || len === null)) {
12909            return this.write$char_A$int$int(cbuf, off, len);
12910          } else if ((typeof cbuf === "string" || cbuf === null) && (typeof off === "number" || off === null) && (typeof len === "number" || len === null)) {
12911            return this.write$java_lang_String$int$int(cbuf, off, len);
12912          } else if ((cbuf != null && cbuf instanceof Array && (cbuf.length == 0 || cbuf[0] == null || typeof cbuf[0] === "string") || cbuf === null) && off === void 0 && len === void 0) {
12913            return this.write$char_A(cbuf);
12914          } else if ((typeof cbuf === "string" || cbuf === null) && off === void 0 && len === void 0) {
12915            return this.write$java_lang_String(cbuf);
12916          } else if ((typeof cbuf === "number" || cbuf === null) && off === void 0 && len === void 0) {
12917            return this.write$int(cbuf);
12918          } else
12919            throw new Error("invalid overload");
12920        };
12921        OutputStreamWriter2.prototype.write$java_lang_String$int$int = function(str, off, len) {
12922          this.out.write$byte_A$int$int(
12923            /* getBytes */
12924            str.split("").map(function(s) {
12925              return s.charCodeAt(0);
12926            }),
12927            off,
12928            len
12929          );
12930        };
12931        OutputStreamWriter2.prototype.flush = function() {
12932          this.out.flush();
12933        };
12934        OutputStreamWriter2.prototype.close = function() {
12935          this.out.close();
12936        };
12937        return OutputStreamWriter2;
12938      })(java2.io.Writer)
12939    );
12940    io2.OutputStreamWriter = OutputStreamWriter;
12941    OutputStreamWriter["__class"] = "java.io.OutputStreamWriter";
12942    OutputStreamWriter["__interfaces"] = ["java.lang.Appendable", "java.io.Closeable", "java.lang.AutoCloseable", "java.io.Flushable"];
12943  })(io = java2.io || (java2.io = {}));
12944})(java || (java = {}));
12945(function(java2) {
12946  var io;
12947  (function(io2) {
12948    var FilterInputStream = (
12949      /** @class */
12950      (function(_super) {
12951        __extends(FilterInputStream2, _super);
12952        function FilterInputStream2(__in) {
12953          var _this = _super.call(this) || this;
12954          if (_this["in"] === void 0) {
12955            _this["in"] = null;
12956          }
12957          _this["in"] = __in;
12958          return _this;
12959        }
12960        FilterInputStream2.prototype.available = function() {
12961          return this["in"].available();
12962        };
12963        FilterInputStream2.prototype.close = function() {
12964          this["in"].close();
12965        };
12966        FilterInputStream2.prototype.mark = function(readlimit) {
12967          this["in"].mark(readlimit);
12968        };
12969        FilterInputStream2.prototype.markSupported = function() {
12970          return this["in"].markSupported();
12971        };
12972        FilterInputStream2.prototype.read = function(buffer, byteOffset, byteCount) {
12973          if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && (typeof byteOffset === "number" || byteOffset === null) && (typeof byteCount === "number" || byteCount === null)) {
12974            return _super.prototype.read.call(this, buffer, byteOffset, byteCount);
12975          } else if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && byteOffset === void 0 && byteCount === void 0) {
12976            return this.read$byte_A(buffer);
12977          } else if (buffer === void 0 && byteOffset === void 0 && byteCount === void 0) {
12978            return this.read$();
12979          } else
12980            throw new Error("invalid overload");
12981        };
12982        FilterInputStream2.prototype.read$ = function() {
12983          return this["in"].read$();
12984        };
12985        FilterInputStream2.prototype.reset = function() {
12986          this["in"].reset();
12987        };
12988        FilterInputStream2.prototype.skip = function(byteCount) {
12989          return this["in"].skip(byteCount);
12990        };
12991        return FilterInputStream2;
12992      })(java2.io.InputStream)
12993    );
12994    io2.FilterInputStream = FilterInputStream;
12995    FilterInputStream["__class"] = "java.io.FilterInputStream";
12996    FilterInputStream["__interfaces"] = ["java.io.Closeable", "j
12996ava.lang.AutoCloseable"];
12997  })(io = java2.io || (java2.io = {}));
12998})(java || (java = {}));
12999(function(java2) {
13000  var io;
13001  (function(io2) {
13002    var ByteArrayInputStream = (
13003      /** @class */
13004      (function(_super) {
13005        __extends(ByteArrayInputStream2, _super);
13006        function ByteArrayInputStream2(buf, offset, length) {
13007          var _this = this;
13008          if ((buf != null && buf instanceof Array && (buf.length == 0 || buf[0] == null || typeof buf[0] === "number") || buf === null) && (typeof offset === "number" || offset === null) && (typeof length === "number" || length === null)) {
13009            var __args = arguments;
13010            _this = _super.call(this) || this;
13011            if (_this.buf === void 0) {
13012              _this.buf = null;
13013            }
13014            if (_this.pos === void 0) {
13015              _this.pos = 0;
13016            }
13017            if (_this._mark === void 0) {
13018              _this._mark = 0;
13019            }
13020            if (_this.count === void 0) {
13021              _this.count = 0;
13022            }
13023            if (length === -1) {
13024              length = buf.length;
13025            }
13026            _this.buf = buf;
13027            _this.pos = offset;
13028            _this._mark = offset;
13029            _this.count = offset + length > buf.length ? buf.length : offset + length;
13030          } else if ((buf != null && buf instanceof Array && (buf.length == 0 || buf[0] == null || typeof buf[0] === "number") || buf === null) && offset === void 0 && length === void 0) {
13031            var __args = arguments;
13032            {
13033              var __args_23 = arguments;
13034              var offset_1 = 0;
13035              var length_1 = -1;
13036              _this = _super.call(this) || this;
13037              if (_this.buf === void 0) {
13038                _this.buf = null;
13039              }
13040              if (_this.pos === void 0) {
13041                _this.pos = 0;
13042              }
13043              if (_this._mark === void 0) {
13044                _this._mark = 0;
13045              }
13046              if (_this.count === void 0) {
13047                _this.count = 0;
13048              }
13049              if (length_1 === -1) {
13050                length_1 = buf.length;
13051              }
13052              _this.buf = buf;
13053              _this.pos = offset_1;
13054              _this._mark = offset_1;
13055              _this.count = offset_1 + length_1 > buf.length ? buf.length : offset_1 + length_1;
13056            }
13057          } else
13058            throw new Error("invalid overload");
13059          return _this;
13060        }
13061        ByteArrayInputStream2.prototype.available = function() {
13062          return this.count - this.pos;
13063        };
13064        ByteArrayInputStream2.prototype.close = function() {
13065        };
13066        ByteArrayInputStream2.prototype.mark = function(readlimit) {
13067          this._mark = this.pos;
13068        };
13069        ByteArrayInputStream2.prototype.markSupported = function() {
13070          return true;
13071        };
13072        ByteArrayInputStream2.prototype.read$ = function() {
13073          return this.read$byte_A$int$int(null, 0, 0);
13074        };
13075        ByteArrayInputStream2.prototype.read$byte_A$int$int = function(buffer, byteOffset, byteCount) {
13076          if (buffer == null) {
13077            return this.pos < this.count ? this.buf[this.pos++] & 255 : -1;
13078          }
13079          java2.io.IOUtils.checkOffsetAndCount$byte_A$int$int(buffer, byteOffset, byteCount);
13080          if (this.pos >= this.count) {
13081            return -1;
13082          }
13083          if (byteCount === 0) {
13084            return 0;
13085          }
13086          var copylen = this.count - this.pos < byteCount ? this.count - this.pos : byteCount;
13087          java2.lang.System.arraycopy(this.buf, this.pos, buffer, byteOffset, copylen);
13088          this.pos += copylen;
13089          return copylen;
13090        };
13091        ByteArrayInputStream2.prototype.read = function(buffer, byteOffset, byteCount) {
13092          if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && (typeof byteOffset === "number" || byteOffset === null) && (typeof byteCount === "number" || byteCount === null)) {
13093            return this.read$byte_A$int$int(buffer, byteOffset, byteCount);
13094          } else if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "
13094number") || buffer === null) && byteOffset === void 0 && byteCount === void 0) {
13095            return this.read$byte_A(buffer);
13096          } else if (buffer === void 0 && byteOffset === void 0 && byteCount === void 0) {
13097            return this.read$();
13098          } else
13099            throw new Error("invalid overload");
13100        };
13101        ByteArrayInputStream2.prototype.reset = function() {
13102          this.pos = this._mark;
13103        };
13104        ByteArrayInputStream2.prototype.skip = function(byteCount) {
13105          if (byteCount <= 0) {
13106            return 0;
13107          }
13108          var temp = this.pos;
13109          this.pos = this.count - this.pos < byteCount ? this.count : this.pos + byteCount | 0;
13110          return this.pos - temp;
13111        };
13112        return ByteArrayInputStream2;
13113      })(java2.io.InputStream)
13114    );
13115    io2.ByteArrayInputStream = ByteArrayInputStream;
13116    ByteArrayInputStream["__class"] = "java.io.ByteArrayInputStream";
13117    ByteArrayInputStream["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable"];
13118  })(io = java2.io || (java2.io = {}));
13119})(java || (java = {}));
13120(function(java2) {
13121  var io;
13122  (function(io2) {
13123    var BufferedReader = (
13124      /** @class */
13125      (function(_super) {
13126        __extends(BufferedReader2, _super);
13127        function BufferedReader2(__in, sz) {
13128          var _this = this;
13129          if ((__in != null && __in instanceof java2.io.Reader || __in === null) && (typeof sz === "number" || sz === null)) {
13130            var __args = arguments;
13131            _this = _super.call(this, __in) || this;
13132            if (_this["in"] === void 0) {
13133              _this["in"] = null;
13134            }
13135            if (_this.cb === void 0) {
13136              _this.cb = null;
13137            }
13138            if (_this.nChars === void 0) {
13139              _this.nChars = 0;
13140            }
13141            if (_this.nextChar === void 0) {
13142              _this.nextChar = 0;
13143            }
13144            if (_this.markedChar === void 0) {
13145              _this.markedChar = 0;
13146            }
13147            if (_this.readAheadLimit === void 0) {
13148              _this.readAheadLimit = 0;
13149            }
13150            if (_this.skipLF === void 0) {
13151              _this.skipLF = false;
13152            }
13153            if (_this.markedSkipLF === void 0) {
13154              _this.markedSkipLF = false;
13155            }
13156            _this.markedChar = BufferedReader2.UNMARKED;
13157            _this.readAheadLimit = 0;
13158            _this.skipLF = false;
13159            _this.markedSkipLF = false;
13160            if (sz <= 0)
13161              throw new java2.lang.IllegalArgumentException("Buffer size <= 0");
13162            _this["in"] = __in;
13163            _this.cb = (function(s) {
13164              var a = [];
13165              while (s-- > 0)
13166                a.push(null);
13167              return a;
13168            })(sz);
13169            _this.nextChar = _this.nChars = 0;
13170          } else if ((__in != null && __in instanceof java2.io.Reader || __in === null) && sz === void 0) {
13171            var __args = arguments;
13172            {
13173              var __args_24 = arguments;
13174              var sz_1 = BufferedReader2.defaultCharBufferSize;
13175              _this = _super.call(this, __in) || this;
13176              if (_this["in"] === void 0) {
13177                _this["in"] = null;
13178              }
13179              if (_this.cb === void 0) {
13180                _this.cb = null;
13181              }
13182              if (_this.nChars === void 0) {
13183                _this.nChars = 0;
13184              }
13185              if (_this.nextChar === void 0) {
13186                _this.nextChar = 0;
13187              }
13188              if (_this.markedChar === void 0) {
13189                _this.markedChar = 0;
13190              }
13191              if (_this.readAheadLimit === void 0) {
13192                _this.readAheadLimit = 0;
13193              }
13194              if (_this.skipLF === void 0) {
13195                _this.skipLF = false;
13196              }
13197              if (_this.markedSkipLF === void 0) {
13198                _this.markedSkipLF = false;
13199              }
13200              _this.markedChar = BufferedReader2.UNMARKED;
13201              _this.readAheadLimit = 0;
13202              _this.skipLF = false;
13203              _this.markedSkipLF = false;
13204              if (sz_1 <= 0)
13205                throw new java2.lang.IllegalArgumentException("Buffer size <= 0");
13206              _this["in"] = __in;
13207              _this.cb = (function(s) {
13208                var a = [];
13209                while (s-- > 0)
13210                  a.push(null);
13211                return a;
13212              })(sz_1);
13213              _this.nextChar = _this.nChars = 0;
13214            }
13215          } else
13216            throw new Error("invalid overload");
13217          return _this;
13218        }
13219        BufferedReader2.prototype.ensureOpen = function() {
13220          if (this["in"] == null)
13221            throw new java2.io.IOException("Stream closed");
13222        };
13223        BufferedReader2.prototype.fill = function() {
13224          var dst;
13225          if (this.markedChar <= BufferedReader2.UNMARKED) {
13226            dst = 0;
13227          } else {
13228            var delta = this.nextChar - this.markedChar;
13229            if (delta >= this.readAheadLimit) {
13230              this.markedChar = BufferedReader2.INVALIDATED;
13231              this.readAheadLimit = 0;
13232              dst = 0;
13233            } else {
13234              if (this.readAheadLimit <= this.cb.length) {
13235                java2.lang.System.arraycopy(this.cb, this.markedChar, this.cb, 0, delta);
13236                this.markedChar = 0;
13237                dst = delta;
13238              } else {
13239                var ncb = (function(s) {
13240                  var a = [];
13241                  while (s-- > 0)
13242                    a.push(null);
13243                  return a;
13244                })(this.readAheadLimit);
13245                java2.lang.System.arraycopy(this.cb, this.markedChar, ncb, 0, delta);
13246                this.cb = ncb;
13247                this.markedChar = 0;
13248                dst = delta;
13249              }
13250              this.nextChar = this.nChars = delta;
13251            }
13252          }
13253          var n;
13254          do {
13255            {
13256              n = this["in"].read$char_A$int$int(this.cb, dst, this.cb.length - dst);
13257            }
13258          } while (n === 0);
13259          if (n > 0) {
13260            this.nChars = dst + n;
13261            this.nextChar = dst;
13262          }
13263        };
13264        BufferedReader2.prototype.read$ = function() {
13265          {
13266            this.ensureOpen();
13267            for (; ; ) {
13268              {
13269                if (this.nextChar >= this.nChars) {
13270                  this.fill();
13271                  if (this.nextChar >= this.nChars)
13272                    return -1;
13273                }
13274                if (this.skipLF) {
13275                  this.skipLF = false;
13276                  if ((function(c) {
13277                    return c.charCodeAt == null ? c : c.charCodeAt(0);
13278                  })(this.cb[this.nextChar]) == "\n".charCodeAt(0)) {
13279                    this.nextChar++;
13280                    continue;
13281                  }
13282                }
13283                return this.cb[this.nextChar++].charCodeAt(0);
13284              }
13285              ;
13286            }
13287          }
13288          ;
13289        };
13290        BufferedReader2.prototype.read1 = function(cbuf, off, len) {
13291          if (this.nextChar >= this.nChars) {
13292            if (len >= this.cb.length && this.markedChar <= BufferedReader2.UNMARKED && !this.skipLF) {
13293              return this["in"].read$char_A$int$int(cbuf, off, len);
13294            }
13295            this.fill();
13296          }
13297          if (this.nextChar >= this.nChars)
13298            return -1;
13299          if (this.skipLF) {
13300            this.skipLF = false;
13301            if ((function(c) {
13302              return c.charCodeAt == null ? c : c.charCodeAt(0);
13303            })(this.cb[this.nextChar]) == "\n".charCodeAt(0)) {
13304              this.nextChar++;
13305              if (this.nextChar >= this.nChars)
13306                this.fill();
13307              if (this.nextChar >= this.nChars)
13308                return -1;
13309            }
13310          }
13311          var n = Math.min(len, this.nChars - this.nextChar);
13312          java2.lang.System.arraycopy(this.cb, this.nextChar, cbuf, off, n);
13313          this.nextChar += n;
13314          return n;
13315        };
13316        BufferedReader2.prototype.read$char_A$int$int = function(cbuf, off, len) {
13317          {
13318            this.ensureOpen();
13319            if (off < 0 || off > cbuf.length || len < 0 || off + len > cbuf.length || off + len < 0) {
13320              throw new java2.lang.IndexOutOfBoundsException();
13321            } else if (len === 0) {
13322              return 0;
13323            }
13324            var n = this.read1(cbuf, off, len);
13325            if (n <= 0)
13326              return n;
13327            while (n < len && this["in"].ready()) {
13328              {
13329                var n1 = this.read1(cbuf, off + n, len - n);
13330                if (n1 <= 0)
13331                  break;
13332                n += n1;
13333              }
13334            }
13335            ;
13336            return n;
13337          }
13338          ;
13339        };
13340        BufferedReader2.prototype.read = function(cbuf, off, len) {
13341          if ((cbuf != null && cbuf instanceof Array && (cbuf.length == 0 || cbuf[0] == null || typeof cbuf[0] === "string") || cbuf === null) && (typeof off === "number" || off === null) && (typeof len === "
13341number" || len === null)) {
13342            return this.read$char_A$int$int(cbuf, off, len);
13343          } else if ((cbuf != null && cbuf instanceof Array && (cbuf.length == 0 || cbuf[0] == null || typeof cbuf[0] === "string") || cbuf === null) && off === void 0 && len === void 0) {
13344            return this.read$char_A(cbuf);
13345          } else if (cbuf === void 0 && off === void 0 && len === void 0) {
13346            return this.read$();
13347          } else
13348            throw new Error("invalid overload");
13349        };
13350        BufferedReader2.prototype.readLine$boolean = function(ignoreLF) {
13351          var s = null;
13352          var startChar;
13353          {
13354            this.ensureOpen();
13355            var omitLF = ignoreLF || this.skipLF;
13356            for (; ; ) {
13357              {
13358                if (this.nextChar >= this.nChars)
13359                  this.fill();
13360                if (this.nextChar >= this.nChars) {
13361                  if (s != null && s.length() > 0)
13362                    return s.toString();
13363                  else
13364                    return null;
13365                }
13366                var eol = false;
13367                var c = String.fromCharCode(0);
13368                var i = void 0;
13369                if (omitLF && (function(c2) {
13370                  return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
13371                })(this.cb[this.nextChar]) == "\n".charCodeAt(0))
13372                  this.nextChar++;
13373                this.skipLF = false;
13374                omitLF = false;
13375                charLoop: for (i = this.nextChar; i < this.nChars; i++) {
13376                  {
13377                    c = this.cb[i];
13378                    if ((function(c2) {
13379                      return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
13380                    })(c) == "\n".charCodeAt(0) || (function(c2) {
13381                      return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
13382                    })(c) == "\r".charCodeAt(0)) {
13383                      eol = true;
13384                      break charLoop;
13385                    }
13386                  }
13387                  ;
13388                }
13389                startChar = this.nextChar;
13390                this.nextChar = i;
13391                if (eol) {
13392                  var str = void 0;
13393                  if (s == null) {
13394                    str = (function(str2, index, len) {
13395                      return str2.substring(index, index + len);
13396                    })(this.cb.join(""), startChar, i - startChar);
13397                  } else {
13398                    s.append$char_A$int$int(this.cb, startChar, i - startChar);
13399                    str = s.toString();
13400                  }
13401                  this.nextChar++;
13402                  if ((function(c2) {
13403                    return c2.charCodeAt == null ? c2 : c2.charCodeAt(0);
13404                  })(c) == "\r".charCodeAt(0)) {
13405                    this.skipLF = true;
13406                  }
13407                  return str;
13408                }
13409                if (s == null)
13410                  s = new java2.lang.StringBuffer(BufferedReader2.defaultExpectedLineLength);
13411                s.append$char_A$int$int(this.cb, startChar, i - startChar);
13412              }
13413              ;
13414            }
13415          }
13416          ;
13417        };
13418        BufferedReader2.prototype.readLine = function(ignoreLF) {
13419          if (typeof ignoreLF === "boolean" || ignoreLF === null) {
13420            return this.readLine$boolean(ignoreLF);
13421          } else if (ignoreLF === void 0) {
13422            return this.readLine$();
13423          } else
13424            throw new Error("invalid overload");
13425        };
13426        BufferedReader2.prototype.readLine$ = function() {
13427          return this.readLine$boolean(false);
13428        };
13429        BufferedReader2.prototype.skip = function(n) {
13430          if (n < 0) {
13431            throw new java2.lang.IllegalArgumentException("skip value is negative");
13432          }
13433          {
13434            this.ensureOpen();
13435            var r = n;
13436            while (r > 0) {
13437              {
13438                if (this.nextChar >= this.nChars)
13439                  this.fill();
13440                if (this.nextChar >= this.nChars)
13441                  break;
13442                if (this.skipLF) {
13443                  this.skipLF = false;
13444                  if ((function(c) {
13445                    return c.charCodeAt == null ? c : c.charCodeAt(0);
13446                  })(this.cb[this.nextChar]) == "\n".charCodeAt(0)) {
13447                    this.nextChar++;
13448                  }
13449                }
13450                var d = this.nChars - this.nextChar;
13451                if (r <= d) {
13452                  this.nextChar += r;
13453                  r = 0;
13454                  break;
13455                } else {
13456                  r -= d;
13457                  this.nextChar = this.nChars;
13458                }
13459              }
13460            }
13461            ;
13462            return n - r;
13463          }
13464          ;
13465        };
13466        BufferedReader2.prototype.ready = function() {
13467          this.ensureOpen();
13468          if (this.skipLF) {
13469            if (this.nextChar >= this.nChars && this["in"].ready()) {
13470              this.fill();
13471            }
13472            if (this.nextChar < this.nChars) {
13473              if ((function(c) {
13474                return c.charCodeAt == null ? c : c.charCodeAt(0);
13475              })(this.cb[this.nextChar]) == "\n".charCodeAt(0))
13476                this.nextChar++;
13477              this.skipLF = false;
13478            }
13479          }
13480          return this.nextChar < this.nChars || this["in"].ready();
13481        };
13482        BufferedReader2.prototype.markSupported = function() {
13483          return true;
13484        };
13485        BufferedReader2.prototype.mark = function(readAheadLimit) {
13486          if (readAheadLimit < 0) {
13487            throw new java2.lang.IllegalArgumentException("Read-ahead limit < 0");
13488          }
13489          this.ensureOpen();
13490          this.readAheadLimit = readAheadLimit;
13491          this.markedChar = this.nextChar;
13492          this.markedSkipLF = this.skipLF;
13493        };
13494        BufferedReader2.prototype.reset = function() {
13495          this.ensureOpen();
13496          if (this.markedChar < 0)
13497            throw new java2.io.IOException(this.markedChar === BufferedReader2.INVALIDATED ? "Mark invalid" : "Stream not marked");
13498          this.nextChar = this.markedChar;
13499          this.skipLF = this.markedSkipLF;
13500        };
13501        BufferedReader2.prototype.close = function() {
13502          if (this["in"] == null)
13503            return;
13504          try {
13505            this["in"].close();
13506          } finally {
13507            this["in"] = null;
13508            this.cb = null;
13509          }
13510        };
13511        BufferedReader2.INVALIDATED = -2;
13512        BufferedReader2.UNMARKED = -1;
13513        BufferedReader2.defaultCharBufferSize = 8192;
13514        BufferedReader2.defaultExpectedLineLength = 80;
13515        return BufferedReader2;
13516      })(java2.io.Reader)
13517    );
13518    io2.BufferedReader = BufferedReader;
13519    BufferedReader["__class"] = "java.io.BufferedReader";
13520    BufferedReader["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable"];
13521  })(io = java2.io || (java2.io = {}));
13522})(java || (java = {}));
13523(function(java2) {
13524  var io;
13525  (function(io2) {
13526    var InputStreamReader = (
13527      /** @class */
13528      (function(_super) {
13529        __extends(InputStreamReader2, _super);
13530        function InputStreamReader2(__in, charsetName) {
13531          var _this = this;
13532          if ((__in != null && __in instanceof java2.io.InputStream || __in === null) && (typeof charsetName === "string" || charsetName === null)) {
13533            var __args = arguments;
13534            _this = _super.call(this, __in) || this;
13535            if (_this["in"] === void 0) {
13536              _this["in"] = null;
13537            }
13538            _this["in"] = __in;
13539          } else if ((__in != null && __in instanceof java2.io.InputStream || __in === null) && (charsetName != null && charsetName instanceof java2.nio.charset.Charset || charsetName === null)) {
13540            var __args = arguments;
13541            var cs = __args[1];
13542            _this = _super.call(this, __in) || this;
13543            if (_this["in"] === void 0) {
13544              _this["in"] = null;
13545            }
13546            _this["in"] = __in;
13547            if (cs == null)
13548              throw new java2.lang.NullPointerException("charset");
13549          } else if ((__in != null && __in instanceof java2.io.InputStream || __in === null) && charsetName === void 0) {
13550            var __args = arguments;
13551            _this = _super.call(this, __in) || this;
13552            if (_this["in"] === void 0) {
13553              _this["in"] = null;
13554            }
13555            _this["in"] = __in;
13556          } else
13557            throw new Error("invalid overload");
13558          return _this;
13559        }
13560        InputStreamReader2.prototype.read$char_A$int$int = function(cbuf, offset, length) {
13561          var buf = (function(s) {
13562            var a = [];
13563            while (s-- > 0)
13564              a.push(0);
13565            return a;
13566          })(length - offset);
13567          var success = this["in"].read$byte_A$int$int(buf, 0, length);
13568          if (success > 0) {
13569            for (var i = 0; i < success; ++i) {
13570              {
13571                cbuf[i + offset] = String.fromCharCode(buf[i]).charAt(0);
13572              }
13573              ;
13574            }
13575          }
13576          return success;
13577        };
13578        InputStreamReader2.prototype.read = function(cbuf, offset, length) {
13579          if ((cbuf != null && cbuf instanceof Array && (cbuf.length == 0 || cbuf[0] == null || typeof cbuf[0] === "string") || cbuf === null) && (typeof offset === "number" || offset === null) && (typeof length === "number" || length === null)) {
13580            return this.read$char_A$int$int(cbuf, offset, length);
13581          } else if ((cbuf != null && cbuf instanceof Array && (cbuf.length == 0 || cbuf[0] == null || typeof cbuf[0] === "string") || cbuf === null) && offset === void 0 && length === void 0) {
13582            return this.read$char_A(cbuf);
13583          } else if (cbuf === void 0 && offset === void 0 && length === void 0) {
13584            return this.read$();
13585          } else
13586            throw new Error("invalid overload");
13587        };
13588        InputStreamReader2.prototype.ready = function() {
13589          return this["in"].available() > 0;
13590        };
13591        InputStreamReader2.prototype.close = function() {
13592          this["in"].close();
13593        };
13594        return InputStreamReader2;
13595      })(java2.io.Reader)
13596    );
13597    io2.InputStreamReader = InputStreamReader;
13598    InputStreamReader["__class"] = "java.io.InputStreamReader";
13599    InputStreamReader["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable"];
13600  })(io = java2.io || (java2.io = {}));
13601})(java || (java = {}));
13602(function(java2) {
13603  var io;
13604  (function(io2) {
13605    var StringReader = (
13606      /** @class */
13607      (function(_super) {
13608        __extends(StringReader2, _super);
13609        function StringReader2(start) {
13610          var _this = _super.call(this) || this;
13611          if (_this.charArray === void 0) {
13612            _this.charArray = null;
13613          }
13614          if (_this.where === void 0) {
13615            _this.where = 0;
13616          }
13617          _this.marked = -1;
13618          if (_this.markedLen === void 0) {
13619            _this.markedLen = 0;
13620          }
13621          _this.charArray = /* toCharArray */
13622          start.split("");
13623          return _this;
13624        }
13625        StringReader2.prototype.read$char_A$int$int = function(cbuf, off, len) {
13626          if (off < 0 || off > cbuf.length || len < 0 || off + len > cbuf.length || off + len < 0) {
13627            throw new java2.lang.IndexOutOfBoundsException();
13628          } else if (len === 0) {
13629            return 0;
13630          }
13631          if (this.where === this.charArray.length)
13632            return -1;
13633          var size = Math.min(this.charArray.length - this.where, len);
13634          java2.lang.System.arraycopy(this.charArray, this.where, cbuf, off, size);
13635          this.where += size;
13636          return size;
13637        };
13638        StringReader2.prototype.read = function(cbuf, off, len) {
13639          if ((cbuf != null && cbuf instanceof Array && (cbuf.length == 0 || cbuf[0] == null || typeof cbuf[0] === "string") || cbuf === null) && (typeof off === "number" || off === null) && (typeof len === "
13639number" || len === null)) {
13640            return this.read$char_A$int$int(cbuf, off, len);
13641          } else if ((cbuf != null && cbuf instanceof Array && (cbuf.length == 0 || cbuf[0] == null || typeof cbuf[0] === "string") || cbuf === null) && off === void 0 && len === void 0) {
13642            return this.read$char_A(cbuf);
13643          } else if (cbuf === void 0 && off === void 0 && len === void 0) {
13644            return this.read$();
13645          } else
13646            throw new Error("invalid overload");
13647        };
13648        StringReader2.prototype.close = function() {
13649          this.where = this.charArray.length;
13650        };
13651        StringReader2.prototype.ready = function() {
13652          return this.where < this.charArray.length;
13653        };
13654        StringReader2.prototype.markSupported = function() {
13655          return true;
13656        };
13657        StringReader2.prototype.mark = function(readAheadLimit) {
13658          this.marked = this.where;
13659          this.markedLen = readAheadLimit;
13660        };
13661        StringReader2.prototype.reset = function() {
13662          if (this.marked === -1 || this.where > this.marked + this.markedLen) {
13663            throw new java2.io.IOException("The stream not been marked or mark has been invalidated");
13664          }
13665          this.where = this.marked;
13666        };
13667        return StringReader2;
13668      })(java2.io.Reader)
13669    );
13670    io2.StringReader = StringReader;
13671    StringReader["__class"] = "java.io.StringReader";
13672    StringReader["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable"];
13673  })(io = java2.io || (java2.io = {}));
13674})(java || (java = {}));
13675(function(java2) {
13676  var io;
13677  (function(io2) {
13678    var FilterOutputStream = (
13679      /** @class */
13680      (function(_super) {
13681        __extends(FilterOutputStream2, _super);
13682        function FilterOutputStream2(out) {
13683          var _this = _super.call(this) || this;
13684          if (_this.out === void 0) {
13685            _this.out = null;
13686          }
13687          _this.out = out;
13688          return _this;
13689        }
13690        FilterOutputStream2.prototype.close = function() {
13691          var thrown = null;
13692          try {
13693            this.flush();
13694          } catch (e) {
13695            thrown = e;
13696          }
13697          try {
13698            this.out.close();
13699          } catch (e) {
13700            if (thrown == null) {
13701              thrown = e;
13702            }
13703          }
13704          if (thrown != null) {
13705            throw new java2.io.IOException(thrown);
13706          }
13707        };
13708        FilterOutputStream2.prototype.flush = function() {
13709          this.out.flush();
13710        };
13711        FilterOutputStream2.prototype.write = function(buffer, offset, count) {
13712          if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && (typeof offset === "number" || offset === null) && (typeof count === "number" || count === null)) {
13713            _super.prototype.write.call(this, buffer, offset, count);
13714          } else if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && offset === void 0 && count === void 0) {
13715            return this.write$byte_A(buffer);
13716          } else if ((typeof buffer === "number" || buffer === null) && offset === void 0 && count === void 0) {
13717            return this.write$int(buffer);
13718          } else
13719            throw new Error("invalid overload");
13720        };
13721        FilterOutputStream2.prototype.write$int = function(oneByte) {
13722          this.out.write$int(oneByte);
13723        };
13724        return FilterOutputStream2;
13725      })(java2.io.OutputStream)
13726    );
13727    io2.FilterOutputStream = FilterOutputStream;
13728    FilterOutputStream["__class"] = "java.io.FilterOutputStream";
13729    FilterOutputStream["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable", "java.io.Flushable"];
13730  })(io = java2.io || (java2.io = {}));
13731})(java || (java = {}));
13732(function(java2) {
13733  var io;
13734  (function(io2) {
13735    var ByteArrayOutputStream = (
13736      /** @class */
13737      (function(_super) {
13738        __extends(ByteArrayOutputStream2, _super);
13739        function ByteArrayOutputStream2(size) {
13740          var _this = this;
13741          if (typeof size === "number" || size === null) {
13742            var __args = arguments;
13743            _this = _super.call(this) || this;
13744            if (_this.buf === void 0) {
13745              _this.buf = null;
13746            }
13747            if (_this.count === void 0) {
13748              _this.count = 0;
13749            }
13750            if (size >= 0) {
13751              _this.buf = (function(s) {
13752                var a = [];
13753                while (s-- > 0)
13754                  a.push(0);
13755                return a;
13756              })(size);
13757            } else {
13758              throw new java2.lang.IllegalArgumentException("size < 0");
13759            }
13760          } else if (size === void 0) {
13761            var __args = arguments;
13762            _this = _super.call(this) || this;
13763            if (_this.buf === void 0) {
13764              _this.buf = null;
13765            }
13766            if (_this.count === void 0) {
13767              _this.count = 0;
13768            }
13769            _this.buf = (function(s) {
13770              var a = [];
13771              while (s-- > 0)
13772                a.push(0);
13773              return a;
13774            })(32);
13775          } else
13776            throw new Error("invalid overload");
13777          return _this;
13778        }
13779        ByteArrayOutputStream2.prototype.close = function() {
13780          _super.prototype.close.call(this);
13781        };
13782        ByteArrayOutputStream2.prototype.expand = function(i) {
13783          if (this.count + i <= this.buf.length) {
13784            return;
13785          }
13786          var newbuf = (function(s) {
13787            var a = [];
13788            while (s-- > 0)
13789              a.push(0);
13790            return a;
13791          })((this.count + i) * 2);
13792          java2.lang.System.arraycopy(this.buf, 0, newbuf, 0, this.count);
13793          this.buf = newbuf;
13794        };
13795        ByteArrayOutputStream2.prototype.reset = function() {
13796          this.count = 0;
13797        };
13798        ByteArrayOutputStream2.prototype.size = function() {
13799          return this.count;
13800        };
13801        ByteArrayOutputStream2.prototype.toByteArray = function() {
13802          var newArray = (function(s) {
13803            var a = [];
13804            while (s-- > 0)
13805              a.push(0);
13806            return a;
13807          })(this.count);
13808          java2.lang.System.arraycopy(this.buf, 0, newArray, 0, this.count);
13809          return newArray;
13810        };
13811        ByteArrayOutputStream2.prototype.toString$ = function() {
13812          return (function(str, index, len) {
13813            return str.substring(index, index + len);
13814          })(this.buf.map(function(s) {
13815            return String.fromCharCode(s);
13816          }).join(""), 0, this.count);
13817        };
13818        ByteArrayOutputStream2.prototype.toString$int = function(hibyte) {
13819          var newBuf = (function(s) {
13820            var a = [];
13821            while (s-- > 0)
13822              a.push(null);
13823            return a;
13824          })(this.size());
13825          for (var i = 0; i < newBuf.length; i++) {
13826            {
13827              newBuf[i] = String.fromCharCode((hibyte & 255) << 8 | this.buf[i] & 255);
13828            }
13829            ;
13830          }
13831          return new String(newBuf);
13832        };
13833        ByteArrayOutputStream2.prototype.toString$java_lang_String = function(ch
13833arsetName) {
13834          return (function(str, index, len) {
13835            return str.substring(index, index + len);
13836          })(this.buf.map(function(s) {
13837            return String.fromCharCode(s);
13838          }).join(""), 0, this.count);
13839        };
13840        ByteArrayOutputStream2.prototype.toString = function(charsetName) {
13841          if (typeof charsetName === "string" || charsetName === null) {
13842            return this.toString$java_lang_String(charsetName);
13843          } else if (typeof charsetName === "number" || charsetName === null) {
13844            return this.toString$int(charsetName);
13845          } else if (charsetName === void 0) {
13846            return this.toString$();
13847          } else
13848            throw new Error("invalid overload");
13849        };
13850        ByteArrayOutputStream2.prototype.write$byte_A$int$int = function(buffer, offset, len) {
13851          java2.io.IOUtils.checkOffsetAndCount$byte_A$int$int(buffer, offset, len);
13852          if (len === 0) {
13853            return;
13854          }
13855          this.expand(len);
13856          java2.lang.System.arraycopy(buffer, offset, this.buf, this.count, len);
13857          this.count += len;
13858        };
13859        ByteArrayOutputStream2.prototype.write = function(buffer, offset, len) {
13860          if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && (typeof offset === "number" || offset === null) && (typeof len === "
13860number" || len === null)) {
13861            return this.write$byte_A$int$int(buffer, offset, len);
13862          } else if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && offset === void 0 && len === void 0) {
13863            return this.write$byte_A(buffer);
13864          } else if ((typeof buffer === "number" || buffer === null) && offset === void 0 && len === void 0) {
13865            return this.write$int(buffer);
13866          } else
13867            throw new Error("invalid overload");
13868        };
13869        ByteArrayOutputStream2.prototype.write$int = function(oneByte) {
13870          if (this.count === this.buf.length) {
13871            this.expand(1);
13872          }
13873          this.buf[this.count++] = oneByte | 0;
13874        };
13875        ByteArrayOutputStream2.prototype.writeTo = function(out) {
13876          out.write$byte_A$int$int(this.buf, 0, this.count);
13877        };
13878        return ByteArrayOutputStream2;
13879      })(java2.io.OutputStream)
13880    );
13881    io2.ByteArrayOutputStream = ByteArrayOutputStream;
13882    ByteArrayOutputStream["__class"] = "java.io.ByteArrayOutputStream";
13883    ByteArrayOutputStream["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable", "java.io.Flushable"];
13884  })(io = java2.io || (java2.io = {}));
13885})(java || (java = {}));
13886(function(java2) {
13887  var lang;
13888  (function(lang2) {
13889    var ref;
13890    (function(ref2) {
13891      var WeakReference = (
13892        /** @class */
13893        (function(_super) {
13894          __extends(WeakReference2, _super);
13895          function WeakReference2(referent) {
13896            return _super.call(this, referent) || this;
13897          }
13898          return WeakReference2;
13899        })(java2.lang.ref.Reference)
13900      );
13901      ref2.WeakReference = WeakReference;
13902      WeakReference["__class"] = "java.lang.ref.WeakReference";
13903    })(ref = lang2.ref || (lang2.ref = {}));
13904  })(lang = java2.lang || (java2.lang = {}));
13905})(java || (java = {}));
13906(function(java2) {
13907  var lang;
13908  (function(lang2) {
13909    var InternalError = (
13910      /** @class */
13911      (function(_super) {
13912        __extends(InternalError2, _super);
13913        function InternalError2(message, cause) {
13914          var _this = this;
13915          if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null)) {
13916            var __args = arguments;
13917            _this = _super.call(this, message, cause) || this;
13918          } else if ((typeof message === "string" || message === null) && cause === void 0) {
13919            var __args = arguments;
13920            _this = _super.call(this, message) || this;
13921          } else if ((message != null && message instanceof Error || message === null) && cause === void 0) {
13922            var __args = arguments;
13923            var cause_5 = __args[0];
13924            _this = _super.call(this, cause_5) || this;
13925          } else if (message === void 0 && cause === void 0) {
13926            var __args = arguments;
13927            _this = _super.call(this) || this;
13928          } else
13929            throw new Error("invalid overload");
13930          return _this;
13931        }
13932        InternalError2.__java_lang_InternalError_serialVersionUID = -9062593416125562e3;
13933        return InternalError2;
13934      })(java2.lang.VirtualMachineError)
13935    );
13936    lang2.InternalError = InternalError;
13937    InternalError["__class"] = "java.lang.InternalError";
13938    InternalError["__interfaces"] = ["java.io.Serializable"];
13939  })(lang = java2.lang || (java2.lang = {}));
13940})(java || (java = {}));
13941(function(java2) {
13942  var util;
13943  (function(util2) {
13944    var TooManyListenersException = (
13945      /** @class */
13946      (function(_super) {
13947        __extends(TooManyListenersException2, _super);
13948        function TooManyListenersException2(message) {
13949          var _this = this;
13950          if (typeof message === "string" || message === null) {
13951            var __args = arguments;
13952            _this = _super.call(this, message) || this;
13953            _this.message = message;
13954          } else if (message === void 0) {
13955            var __args = arguments;
13956            _this = _super.call(this) || this;
13957          } else
13958            throw new Error("invalid overload");
13959          return _this;
13960        }
13961        return TooManyListenersException2;
13962      })(Error)
13963    );
13964    util2.TooManyListenersException = TooManyListenersException;
13965    TooManyListenersException["__class"] = "java.util.TooManyListenersException";
13966    TooManyListenersException["__interfaces"] = ["java.io.Serializable"];
13967  })(util = java2.util || (java2.util = {}));
13968})(java || (java = {}));
13969(function(java2) {
13970  var security;
13971  (function(security2) {
13972    var GeneralSecurityException = (
13973      /** @class */
13974      (function(_super) {
13975        __extends(GeneralSecurityException2, _super);
13976        function GeneralSecurityException2(msg) {
13977          var _this = this;
13978          if (typeof msg === "string" || msg === null) {
13979            var __args = arguments;
13980            _this = _super.call(this, msg) || this;
13981            _this.message = msg;
13982          } else if (msg === void 0) {
13983            var __args = arguments;
13984            _this = _super.call(this) || this;
13985          } else
13986            throw new Error("invalid overload");
13987          return _this;
13988        }
13989        return GeneralSecurityException2;
13990      })(Error)
13991    );
13992    security2.GeneralSecurityException = GeneralSecurityException;
13993    GeneralSecurityException["__class"] = "java.security.GeneralSecurityException";
13994    GeneralSecurityException["__interfaces"] = ["java.io.Serializable"];
13995  })(security = java2.security || (java2.security = {}));
13996})(java || (java = {}));
13997(function(java2) {
13998  var io;
13999  (function(io2) {
14000    var IOException = (
14001      /** @class */
14002      (function(_super) {
14003        __extends(IOException2, _super);
14004        function IOException2(message, throwable) {
14005          var _this = this;
14006          if ((typeof message === "string" || message === null) && (throwable != null && throwable instanceof Error || throwable === null)) {
14007            var __args = arguments;
14008            _this = _super.call(this, message) || this;
14009            _this.message = message;
14010          } else if ((typeof message === "string" || message === null) && throwable === void 0) {
14011            var __args = arguments;
14012            _this = _super.call(this, message) || this;
14013            _this.message = message;
14014          } else if ((message != null && message instanceof Error || message === null) && throwable === void 0) {
14015            var __args = arguments;
14016            var throwable_1 = __args[0];
14017            _this = _super.call(this, throwable_1) || this;
14018            _this.message = throwable_1;
14019          } else if (message === void 0 && throwable === void 0) {
14020            var __args = arguments;
14021            _this = _super.call(this) || this;
14022          } else
14023            throw new Error("invalid overload");
14024          return _this;
14025        }
14026        return IOException2;
14027      })(Error)
14028    );
14029    io2.IOException = IOException;
14030    IOException["__class"] = "java.io.IOException";
14031    IOException["__interfaces"] = ["java.io.Serializable"];
14032  })(io = java2.io || (java2.io = {}));
14033})(java || (java = {}));
14034(function(java2) {
14035  var lang;
14036  (function(lang2) {
14037    var RuntimeException = (
14038      /** @class */
14039      (function(_super) {
14040        __extends(RuntimeException2, _super);
14041        function RuntimeException2(message, cause, enableSuppression, writableStackTrace) {
14042          var _this = this;
14043          if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null) && (typeof enableSuppression === "boolean" || enableSuppression === null) && (typeof writableStackTrace === "boolean" || writableStackTrace === null)) {
14044            var __args = arguments;
14045            _this = _super.call(this, message) || this;
14046            _this.message = message;
14047          } else if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null) && enableSuppression === void 0 && writableStackTrace === void 0) {
14048            var __args = arguments;
14049            _this = _super.call(this, message) || this;
14050            _this.message = message;
14051          } else if ((typeof message === "string" || message === null) && cause === void 0 && enableSuppression === void 0 && writableStackTrace === void 0) {
14052            var __args = arguments;
14053            _this = _super.call(this, message) || this;
14054            _this.message = message;
14055          } else if ((message != null && message instanceof Error || message === null) && cause === void 0 && enableSuppression === void 0 && writableStackTrace === void 0) {
14056            var __args = arguments;
14057            var cause_6 = __args[0];
14058            _this = _super.call(this, cause_6) || this;
14059            _this.message = cause_6;
14060          } else if (message === void 0 && cause === void 0 && enableSuppression === void 0 && writableStackTrace === void 0) {
14061            var __args = arguments;
14062            _this = _super.call(this) || this;
14063          } else
14064            throw new Error("invalid overload");
14065          return _this;
14066        }
14067        return RuntimeException2;
14068      })(Error)
14069    );
14070    lang2.RuntimeException = RuntimeException;
14071    RuntimeException["__class"] = "java.lang.RuntimeException";
14072    RuntimeException["__interfaces"] = ["java.io.Serializable"];
14073  })(lang = java2.lang || (java2.lang = {}));
14074})(java || (java = {}));
14075(function(java2) {
14076  var lang;
14077  (function(lang2) {
14078    var CloneNotSupportedException = (
14079      /** @class */
14080      (function(_super) {
14081        __extends(CloneNotSupportedException2, _super);
14082        function CloneNotSupportedException2(msg) {
14083          var _this = this;
14084          if (typeof msg === "string" || msg === null) {
14085            var __args = arguments;
14086            _this = _super.call(this, msg) || this;
14087            _this.message = msg;
14088          } else if (msg === void 0) {
14089            var __args = arguments;
14090            _this = _super.call(this) || this;
14091          } else
14092            throw new Error("invalid overload");
14093          return _this;
14094        }
14095        return CloneNotSupportedException2;
14096      })(Error)
14097    );
14098    lang2.CloneNotSupportedException = CloneNotSupportedException;
14099    CloneNotSupportedException["__class"] = "java.lang.CloneNotSupportedException";
14100    CloneNotSupportedException["__interfaces"] = ["java.io.Serializable"];
14101  })(lang = java2.lang || (java2.lang = {}));
14102})(java || (java = {}));
14103(function(java2) {
14104  var lang;
14105  (function(lang2) {
14106    var InterruptedException = (
14107      /** @class */
14108      (function(_super) {
14109        __extends(InterruptedException2, _super);
14110        function InterruptedException2(s) {
14111          var _this = this;
14112          if (typeof s === "string" || s === null) {
14113            var __args = arguments;
14114            _this = _super.call(this, s) || this;
14115            _this.message = s;
14116          } else if (s === void 0) {
14117            var __args = arguments;
14118            _this = _super.call(this) || this;
14119          } else
14120            throw new Error("invalid overload");
14121          return _this;
14122        }
14123        return InterruptedException2;
14124      })(Error)
14125    );
14126    lang2.InterruptedException = InterruptedException;
14127    InterruptedException["__class"] = "java.lang.InterruptedException";
14128    InterruptedException["__interfaces"] = ["java.io.Serializable"];
14129  })(lang = java2.lang || (java2.lang = {}));
14130})(java || (java = {}));
14131(function(java2) {
14132  var lang;
14133  (function(lang2) {
14134    var ReflectiveOperationException = (
14135      /** @class */
14136      (function(_super) {
14137        __extends(ReflectiveOperationException2, _super);
14138        function ReflectiveOperationException2(s) {
14139          var _this = this;
14140          if (typeof s === "string" || s === null) {
14141            var __args = arguments;
14142            _this = _super.call(this, s) || this;
14143            _this.message = s;
14144          } else if (s === void 0) {
14145            var __args = arguments;
14146            _this = _super.call(this) || this;
14147          } else
14148            throw new Error("invalid overload");
14149          return _this;
14150        }
14151        return ReflectiveOperationException2;
14152      })(Error)
14153    );
14154    lang2.ReflectiveOperationException = ReflectiveOperationException;
14155    ReflectiveOperationException["__class"] = "java.lang.ReflectiveOperationException";
14156    ReflectiveOperationException["__interfaces"] = ["java.io.Serializable"];
14157  })(lang = java2.lang || (java2.lang = {}));
14158})(java || (java = {}));
14159(function(java2) {
14160  var lang;
14161  (function(lang2) {
14162    var NoSuchMethodException = (
14163      /** @class */
14164      (function(_super) {
14165        __extends(NoSuchMethodException2, _super);
14166        function NoSuchMethodException2(message) {
14167          var _this = this;
14168          if (typeof message === "string" || message === null) {
14169            var __args = arguments;
14170            _this = _super.call(this, message) || this;
14171            _this.message = message;
14172          } else if (message === void 0) {
14173            var __args = arguments;
14174            _this = _super.call(this) || this;
14175          } else
14176            throw new Error("invalid overload");
14177          return _this;
14178        }
14179        return NoSuchMethodException2;
14180      })(Error)
14181    );
14182    lang2.NoSuchMethodException = NoSuchMethodException;
14183    NoSuchMethodException["__class"] = "java.lang.NoSuchMethodException";
14184    NoSuchMethodException["__interfaces"] = ["java.io.Serializable"];
14185  })(lang = java2.lang || (java2.lang = {}));
14186})(java || (java = {}));
14187(function(java2) {
14188  var text;
14189  (function(text2) {
14190    var ParseException = (
14191      /** @class */
14192      (function(_super) {
14193        __extends(ParseException2, _super);
14194        function ParseException2(s, errorOffset) {
14195          var _this = _super.call(this, s) || this;
14196          _this.message = s;
14197          Object.setPrototypeOf(_this, ParseException2.prototype);
14198          if (_this.errorOffset === void 0) {
14199            _this.errorOffset = 0;
14200          }
14201          _this.errorOffset = errorOffset;
14202          return _this;
14203        }
14204        ParseException2.prototype.getErrorOffset = function() {
14205          return this.errorOffset;
14206        };
14207        return ParseException2;
14208      })(Error)
14209    );
14210    text2.ParseException = ParseException;
14211    ParseException["__class"] = "java.text.ParseException";
14212    ParseException["__interfaces"] = ["java.io.Serializable"];
14213  })(text = java2.text || (java2.text = {}));
14214})(java || (java = {}));
14215(function(java2) {
14216  var lang;
14217  (function(lang2) {
14218    var InheritableThreadLocal = (
14219      /** @class */
14220      (function(_super) {
14221        __extends(InheritableThreadLocal2, _super);
14222        function InheritableThreadLocal2() {
14223          return _super !== null && _super.apply(this, arguments) || this;
14224        }
14225        InheritableThreadLocal2.prototype.childValue = function(parentValue) {
14226          return parentValue;
14227        };
14228        return InheritableThreadLocal2;
14229      })(java2.lang.ThreadLocal)
14230    );
14231    lang2.InheritableThreadLocal = InheritableThreadLocal;
14232    InheritableThreadLocal["__class"] = "java.lang.InheritableThreadLocal";
14233  })(lang = java2.lang || (java2.lang = {}));
14234})(java || (java = {}));
14235(function(java2) {
14236  var lang;
14237  (function(lang2) {
14238    var StringBuilder = (
14239      /** @class */
14240      (function(_super) {
14241        __extends(StringBuilder2, _super);
14242        function StringBuilder2(s) {
14243          var _this = this;
14244          if (typeof s === "string" || s === null) {
14245            var __args = arguments;
14246            _this = _super.call(this, s) || this;
14247          } else if (s != null && (s.constructor != null && s.constructor["__interfaces"] != null && s.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof s === "string") || s === null) {
14248            var __args = arguments;
14249            _this = _super.call(
14250              this,
14251              /* valueOf */
14252              String(s).toString()
14253            ) || this;
14254          }
14254 else if (typeof s === "number" || s === null) {
14255            var __args = arguments;
14256            var ignoredCapacity = __args[0];
14257            _this = _super.call(this, "") || this;
14258          } else if (s === void 0) {
14259            var __args = arguments;
14260            _this = _super.call(this, "") || this;
14261          } else
14262            throw new Error("invalid overload");
14263          return _this;
14264        }
14265        StringBuilder2.prototype.append$boolean = function(x) {
14266          this.string += x;
14267          return this;
14268        };
14269        StringBuilder2.prototype.append$char = function(x) {
14270          this.string += /* valueOf */
14271          String(x).toString();
14272          return this;
14273        };
14274        StringBuilder2.prototype.append$char_A = function(x) {
14275          this.string += /* valueOf */
14276          String(x).toString();
14277          return this;
14278        };
14279        StringBuilder2.prototype.append$char_A$int$int = function(x, start, len) {
14280          this.string += /* valueOf */
14281          (function(str, index, len2) {
14282            return str.join("").substring(index, index + len2);
14283          })(x, start, len);
14284          return this;
14285        };
14286        StringBuilder2.prototype.append = function(x, start, len) {
14287          if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "string") || x === null) && (typeof start === "number" || start === null) && (typeof len === "
14287number" || len === null)) {
14288            return this.append$char_A$int$int(x, start, len);
14289          } else if ((x != null && (x.constructor != null && x.constructor["__interfaces"] != null && x.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof x === "string") || x === null) && (typeof start === "number" || start === null) && (typeof len === "number" || len === null)) {
14290            return this.append$java_lang_CharSequence$int$int(x, start, len);
14291          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "string") || x === null) && start === void 0 && len === void 0) {
14292            return this.append$char_A(x);
14293          } else if ((typeof x === "string" || x === null) && start === void 0 && len === void 0) {
14294            return this.append$java_lang_String(x);
14295          } else if ((x != null && x instanceof java2.lang.StringBuffer || x === null) && start === void 0 && len === void 0) {
14296            return this.append$java_lang_StringBuffer(x);
14297          } else if ((x != null && (x.constructor != null && x.constructor["__interfaces"] != null && x.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof x === "string") || x === null) && start === void 0 && len === void 0) {
14298            return this.append$java_lang_CharSequence(x);
14299          } else if ((typeof x === "boolean" || x === null) && start === void 0 && len === void 0) {
14300            return this.append$boolean(x);
14301          } else if ((typeof x === "string" || x === null) && start === void 0 && len === void 0) {
14302            return this.append$char(x);
14303          } else if ((typeof x === "number" || x === null) && start === void 0 && len === void 0) {
14304            return this.append$int(x);
14305          } else if ((typeof x === "number" || x === null) && start === void 0 && len === void 0) {
14306            return this.append$long(x);
14307          } else if ((typeof x === "number" || x === null) && start === void 0 && len === void 0) {
14308            return this.append$float(x);
14309          } else if ((typeof x === "number" || x === null) && start === void 0 && len === void 0) {
14310            return this.append$double(x);
14311          } else if ((x != null || x === null) && start === void 0 && len === void 0) {
14312            return this.append$java_lang_Object(x);
14313          } else
14314            throw new Error("invalid overload");
14315        };
14316        StringBuilder2.prototype.append$java_lang_CharSequence = function(x) {
14317          this.string += x;
14318          return this;
14319        };
14320        StringBuilder2.prototype.append$java_lang_CharSequence$int$int = function(x, start, end) {
14321          this.append0(x, start, end);
14322          return this;
14323        };
14324        StringBuilder2.prototype.append$double = function(x) {
14325          this.string += x;
14326          return this;
14327        };
14328        StringBuilder2.prototype.append$float = function(x) {
14329          this.string += x;
14330          return this;
14331        };
14332        StringBuilder2.prototype.append$int = function(x) {
14333          this.string += x;
14334          return this;
14335        };
14336        StringBuilder2.prototype.append$long = function(x) {
14337          this.string += x;
14338          return this;
14339        };
14340        StringBuilder2.prototype.append$java_lang_Object = function(x) {
14341          this.string += x;
14342          return this;
14343        };
14344        StringBuilder2.prototype.append$java_lang_String = function(x) {
14345          this.string += x;
14346          return this;
14347        };
14348        StringBuilder2.prototype.append$java_lang_StringBuffer = function(x) {
14349          this.string += x;
14350          return this;
14351        };
14352        StringBuilder2.prototype.appendCodePoint = function(x) {
14353          this.appendCodePoint0(x);
14354          return this;
14355        };
14356        StringBuilder2.prototype["delete"] = function(start, end) {
14357          this.replace0(start, end, "");
14358          return this;
14359        };
14360        StringBuilder2.prototype.deleteCharAt = function(start) {
14361          this.replace0(start, start + 1, "");
14362          return this;
14363        };
14364        StringBuilder2.prototype.insert$int$boolean = function(index, x) {
14365          return this.insert$int$java_lang_String(
14366            index,
14367            /* valueOf */
14368            String(x).toString()
14369          );
14370        };
14371        StringBuilder2.prototype.insert$int$char = function(index, x) {
14372          this.replace0(
14373            index,
14374            index,
14375            /* valueOf */
14376            String(x).toString()
14377          );
14378          return this;
14379        };
14380        StringBuilder2.prototype.insert$int$char_A = function(index, x) {
14381          return this.insert$int$java_lang_String(
14382            index,
14383            /* valueOf */
14384            String(x).toString()
14385          );
14386        };
14387        StringBuilder2.prototype.insert$int$char_A$int$int = function(index, x, offset, len) {
14388          return this.insert$int$java_lang_String(
14389            index,
14390            /* valueOf */
14391            (function(str, index2, len2) {
14392              return str.join("").substring(index2, index2 + len2);
14393            })(x, offset, len)
14394          );
14395        };
14396        StringBuilder2.prototype.insert = function(index, x, offset, len) {
14397          if ((typeof index === "number" || index === null) && (x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "string") || x === null) && (typeof offset === "number" || offset === null) && (typeof len === "
14397number" || len === null)) {
14398            return this.insert$int$char_A$int$int(index, x, offset, len);
14399          } else if ((typeof index === "number" || index === null) && (x != null && (x.constructor != null && x.constructor["__interfaces"] != null && x.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof x === "string") || x === null) && (typeof offset === "number" || offset === null) && (typeof len === "number" || len === null)) {
14400            return this.insert$int$java_lang_CharSequence$int$int(index, x, offset, len);
14401          } else if ((typeof index === "number" || index === null) && (x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "string") || x === null) && offset === void 0 && len === void 0) {
14402            return this.insert$int$char_A(index, x);
14403          } else if ((typeof index === "number" || index === null) && (typeof x === "string" || x === null) && offset === void 0 && len === void 0) {
14404            return this.insert$int$java_lang_String(index, x);
14405          } else if ((typeof index === "number" || index === null) && (x != null && (x.constructor != null && x.constructor["__interfaces"] != null && x.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof x === "string") || x === null) && offset === void 0 && len === void 0) {
14406            return this.insert$int$java_lang_CharSequence(index, x);
14407          } else if ((typeof index === "number" || index === null) && (typeof x === "boolean" || x === null) && offset === void 0 && len === void 0) {
14408            return this.insert$int$boolean(index, x);
14409          } else if ((typeof index === "number" || index === null) && (typeof x === "string" || x === null) && offset === void 0 && len === void 0) {
14410            return this.insert$int$char(index, x);
14411          } else if ((typeof index === "number" || index === null) && (typeof x === "number" || x === null) && offset === void 0 && len === void 0) {
14412            return this.insert$int$int(index, x);
14413          } else if ((typeof index === "number" || index === null) && (typeof x === "number" || x === null) && offset === void 0 && len === void 0) {
14414            return this.insert$int$long(index, x);
14415          } else if ((typeof index === "number" || index === null) && (typeof x === "number" || x === null) && offset === void 0 && len === void 0) {
14416            return this.insert$int$float(index, x);
14417          } else if ((typeof index === "number" || index === null) && (typeof x === "number" || x === null) && offset === void 0 && len === void 0) {
14418            return this.insert$int$double(index, x);
14419          } else if ((typeof index === "number" || index === null) && (x != null || x === null) && offset === void 0 && len === void 0) {
14420            return this.insert$int$java_lang_Object(index, x);
14421          } else
14422            throw new Error("invalid overload");
14423        };
14424        StringBuilder2.prototype.insert$int$java_lang_CharSequence = function(index, chars) {
14425          return this.insert$int$java_lang_String(index, chars.toString());
14426        };
14427        StringBuilder2.prototype.insert$int$java_lang_CharSequence$int$int = function(index, chars, start, end) {
14428          return this.insert$int$java_lang_String(
14429            index,
14430            /* subSequence */
14431            chars.substring(start, end).toString()
14432          );
14433        };
14434        StringBuilder2.prototype.insert$int$double = function(index, x) {
14435          return this.insert$int$java_lang_String(
14436            index,
14437            /* valueOf */
14438            String(x).toString()
14439          );
14440        };
14441        StringBuilder2.prototype.insert$int$float = function(index, x) {
14442          return this.insert$int$java_lang_String(
14443            index,
14444            /* valueOf */
14445            String(x).toString()
14446          );
14447        };
14448        StringBuilder2.prototype.insert$int$int = function(index, x) {
14449          return this.insert$int$java_lang_String(
14450            index,
14451            /* valueOf */
14452            String(x).toString()
14453          );
14454        };
14455        StringBuilder2.prototype.insert$int$long = function(index, x) {
14456          return this.insert$int$java_lang_String(
14457            index,
14458            /* valueOf */
14459            String(x).toString()
14460          );
14461        };
14462        StringBuilder2.prototype.insert$int$java_lang_Object = function(index, x) {
14463          return this.insert$int$java_lang_String(
14464            index,
14465            /* valueOf */
14466            String(x).toString()
14467          );
14468        };
14469        StringBuilder2.prototype.insert$int$java_lang_String = function(index, x) {
14470          this.replace0(index, index, x);
14471          return this;
14472        };
14473        StringBuilder2.prototype.replace = function(start, end, toInsert) {
14474          this.replace0(start, end, toInsert);
14475          return this;
14476        };
14477        StringBuilder2.prototype.reverse = function() {
14478          this.reverse0();
14479          return this;
14480        };
14481        return StringBuilder2;
14482      })(java2.lang.AbstractStringBuilder)
14483    );
14484    lang2.StringBuilder = StringBuilder;
14485    StringBuilder["__class"] = "java.lang.StringBuilder";
14486    StringBuilder["__interfaces"] = ["java.lang.CharSequence", "java.lang.Appendable"];
14487  })(lang = java2.lang || (java2.lang = {}));
14488})(java || (java = {}));
14489(function(java2) {
14490  var lang;
14491  (function(lang2) {
14492    var StringBuffer = (
14493      /** @class */
14494      (function(_super) {
14495        __extends(StringBuffer2, _super);
14496        function StringBuffer2(s) {
14497          var _this = this;
14498          if (typeof s === "string" || s === null) {
14499            var __args = arguments;
14500            _this = _super.call(this, s) || this;
14501          } else if (s != null && (s.constructor != null && s.constructor["__interfaces"] != null && s.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof s === "string") || s === null) {
14502            var __args = arguments;
14503            _this = _super.call(
14504              this,
14505              /* valueOf */
14506              String(s).toString()
14507            ) || this;
14508          }
14508 else if (typeof s === "number" || s === null) {
14509            var __args = arguments;
14510            var ignoredCapacity = __args[0];
14511            _this = _super.call(this, "") || this;
14512          } else if (s === void 0) {
14513            var __args = arguments;
14514            _this = _super.call(this, "") || this;
14515          } else
14516            throw new Error("invalid overload");
14517          return _this;
14518        }
14519        StringBuffer2.prototype.append$boolean = function(x) {
14520          this.string += x;
14521          return this;
14522        };
14523        StringBuffer2.prototype.append$char = function(x) {
14524          this.string += x;
14525          return this;
14526        };
14527        StringBuffer2.prototype.append$char_A = function(x) {
14528          this.string += /* valueOf */
14529          String(x).toString();
14530          return this;
14531        };
14532        StringBuffer2.prototype.append$char_A$int$int = function(x, start, len) {
14533          this.string += /* valueOf */
14534          (function(str, index, len2) {
14535            return str.join("").substring(index, index + len2);
14536          })(x, start, len);
14537          return this;
14538        };
14539        StringBuffer2.prototype.append = function(x, start, len) {
14540          if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "string") || x === null) && (typeof start === "number" || start === null) && (typeof len === "
14540number" || len === null)) {
14541            return this.append$char_A$int$int(x, start, len);
14542          } else if ((x != null && (x.constructor != null && x.constructor["__interfaces"] != null && x.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof x === "string") || x === null) && (typeof start === "number" || start === null) && (typeof len === "number" || len === null)) {
14543            return this.append$java_lang_CharSequence$int$int(x, start, len);
14544          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "string") || x === null) && start === void 0 && len === void 0) {
14545            return this.append$char_A(x);
14546          } else if ((typeof x === "string" || x === null) && start === void 0 && len === void 0) {
14547            return this.append$java_lang_String(x);
14548          } else if ((x != null && x instanceof java2.lang.StringBuffer || x === null) && start === void 0 && len === void 0) {
14549            return this.append$java_lang_StringBuffer(x);
14550          } else if ((x != null && (x.constructor != null && x.constructor["__interfaces"] != null && x.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof x === "string") || x === null) && start === void 0 && len === void 0) {
14551            return this.append$java_lang_CharSequence(x);
14552          } else if ((typeof x === "boolean" || x === null) && start === void 0 && len === void 0) {
14553            return this.append$boolean(x);
14554          } else if ((typeof x === "string" || x === null) && start === void 0 && len === void 0) {
14555            return this.append$char(x);
14556          } else if ((typeof x === "number" || x === null) && start === void 0 && len === void 0) {
14557            return this.append$int(x);
14558          } else if ((typeof x === "number" || x === null) && start === void 0 && len === void 0) {
14559            return this.append$long(x);
14560          } else if ((typeof x === "number" || x === null) && start === void 0 && len === void 0) {
14561            return this.append$float(x);
14562          } else if ((typeof x === "number" || x === null) && start === void 0 && len === void 0) {
14563            return this.append$double(x);
14564          } else if ((x != null || x === null) && start === void 0 && len === void 0) {
14565            return this.append$java_lang_Object(x);
14566          } else
14567            throw new Error("invalid overload");
14568        };
14569        StringBuffer2.prototype.append$java_lang_CharSequence = function(x) {
14570          this.string += x;
14571          return this;
14572        };
14573        StringBuffer2.prototype.append$java_lang_CharSequence$int$int = function(x, start, end) {
14574          this.append0(x, start, end);
14575          return this;
14576        };
14577        StringBuffer2.prototype.append$double = function(x) {
14578          this.string += x;
14579          return this;
14580        };
14581        StringBuffer2.prototype.append$float = function(x) {
14582          this.string += x;
14583          return this;
14584        };
14585        StringBuffer2.prototype.append$int = function(x) {
14586          this.string += x;
14587          return this;
14588        };
14589        StringBuffer2.prototype.append$long = function(x) {
14590          this.string += x;
14591          return this;
14592        };
14593        StringBuffer2.prototype.append$java_lang_Object = function(x) {
14594          this.string += x;
14595          return this;
14596        };
14597        StringBuffer2.prototype.append$java_lang_String = function(x) {
14598          this.string += x;
14599          return this;
14600        };
14601        StringBuffer2.prototype.append$java_lang_StringBuffer = function(x) {
14602          this.string += x;
14603          return this;
14604        };
14605        StringBuffer2.prototype.appendCodePoint = function(x) {
14606          this.appendCodePoint0(x);
14607          return this;
14608        };
14609        StringBuffer2.prototype["delete"] = function(start, end) {
14610          this.replace0(start, end, "");
14611          return this;
14612        };
14613        StringBuffer2.prototype.deleteCharAt = function(start) {
14614          this.replace0(start, start + 1, "");
14615          return this;
14616        };
14617        StringBuffer2.prototype.insert$int$boolean = function(index, x) {
14618          return this.insert$int$java_lang_String(
14619            index,
14620            /* valueOf */
14621            String(x).toString()
14622          );
14623        };
14624        StringBuffer2.prototype.insert$int$char = function(index, x) {
14625          return this.insert$int$java_lang_String(
14626            index,
14627            /* valueOf */
14628            String(x).toString()
14629          );
14630        };
14631        StringBuffer2.prototype.insert$int$char_A = function(index, x) {
14632          return this.insert$int$java_lang_String(
14633            index,
14634            /* valueOf */
14635            String(x).toString()
14636          );
14637        };
14638        StringBuffer2.prototype.insert$int$char_A$int$int = function(index, x, offset, len) {
14639          return this.insert$int$java_lang_String(
14640            index,
14641            /* valueOf */
14642            (function(str, index2, len2) {
14643              return str.join("").substring(index2, index2 + len2);
14644            })(x, offset, len)
14645          );
14646        };
14647        StringBuffer2.prototype.insert = function(index, x, offset, len) {
14648          if ((typeof index === "number" || index === null) && (x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "string") || x === null) && (typeof offset === "number" || offset === null) && (typeof len === "
14648number" || len === null)) {
14649            return this.insert$int$char_A$int$int(index, x, offset, len);
14650          } else if ((typeof index === "number" || index === null) && (x != null && (x.constructor != null && x.constructor["__interfaces"] != null && x.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof x === "string") || x === null) && (typeof offset === "number" || offset === null) && (typeof len === "number" || len === null)) {
14651            return this.insert$int$java_lang_CharSequence$int$int(index, x, offset, len);
14652          } else if ((typeof index === "number" || index === null) && (x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "string") || x === null) && offset === void 0 && len === void 0) {
14653            return this.insert$int$char_A(index, x);
14654          } else if ((typeof index === "number" || index === null) && (typeof x === "string" || x === null) && offset === void 0 && len === void 0) {
14655            return this.insert$int$java_lang_String(index, x);
14656          } else if ((typeof index === "number" || index === null) && (x != null && (x.constructor != null && x.constructor["__interfaces"] != null && x.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof x === "string") || x === null) && offset === void 0 && len === void 0) {
14657            return this.insert$int$java_lang_CharSequence(index, x);
14658          } else if ((typeof index === "number" || index === null) && (typeof x === "boolean" || x === null) && offset === void 0 && len === void 0) {
14659            return this.insert$int$boolean(index, x);
14660          } else if ((typeof index === "number" || index === null) && (typeof x === "string" || x === null) && offset === void 0 && len === void 0) {
14661            return this.insert$int$char(index, x);
14662          } else if ((typeof index === "number" || index === null) && (typeof x === "number" || x === null) && offset === void 0 && len === void 0) {
14663            return this.insert$int$int(index, x);
14664          } else if ((typeof index === "number" || index === null) && (typeof x === "number" || x === null) && offset === void 0 && len === void 0) {
14665            return this.insert$int$long(index, x);
14666          } else if ((typeof index === "number" || index === null) && (typeof x === "number" || x === null) && offset === void 0 && len === void 0) {
14667            return this.insert$int$float(index, x);
14668          } else if ((typeof index === "number" || index === null) && (typeof x === "number" || x === null) && offset === void 0 && len === void 0) {
14669            return this.insert$int$double(index, x);
14670          } else if ((typeof index === "number" || index === null) && (x != null || x === null) && offset === void 0 && len === void 0) {
14671            return this.insert$int$java_lang_Object(index, x);
14672          } else
14673            throw new Error("invalid overload");
14674        };
14675        StringBuffer2.prototype.insert$int$java_lang_CharSequence = function(index, chars) {
14676          return this.insert$int$java_lang_String(index, chars.toString());
14677        };
14678        StringBuffer2.prototype.insert$int$java_lang_CharSequence$int$int = function(index, chars, start, end) {
14679          return this.insert$int$java_lang_String(
14680            index,
14681            /* subSequence */
14682            chars.substring(start, end).toString()
14683          );
14684        };
14685        StringBuffer2.prototype.insert$int$double = function(index, x) {
14686          return this.insert$int$java_lang_String(
14687            index,
14688            /* valueOf */
14689            String(x).toString()
14690          );
14691        };
14692        StringBuffer2.prototype.insert$int$float = function(index, x) {
14693          return this.insert$int$java_lang_String(
14694            index,
14695            /* valueOf */
14696            String(x).toString()
14697          );
14698        };
14699        StringBuffer2.prototype.insert$int$int = function(index, x) {
14700          return this.insert$int$java_lang_String(
14701            index,
14702            /* valueOf */
14703            String(x).toString()
14704          );
14705        };
14706        StringBuffer2.prototype.insert$int$long = function(index, x) {
14707          return this.insert$int$java_lang_String(
14708            index,
14709            /* valueOf */
14710            String(x).toString()
14711          );
14712        };
14713        StringBuffer2.prototype.insert$int$java_lang_Object = function(index, x) {
14714          return this.insert$int$java_lang_String(
14715            index,
14716            /* valueOf */
14717            String(x).toString()
14718          );
14719        };
14720        StringBuffer2.prototype.insert$int$java_lang_String = function(index, x) {
14721          this.replace0(index, index, x);
14722          return this;
14723        };
14724        StringBuffer2.prototype.replace = function(start, end, toInsert) {
14725          this.replace0(start, end, toInsert);
14726          return this;
14727        };
14728        StringBuffer2.prototype.reverse = function() {
14729          this.reverse0();
14730          return this;
14731        };
14732        return StringBuffer2;
14733      })(java2.lang.AbstractStringBuilder)
14734    );
14735    lang2.StringBuffer = StringBuffer;
14736    StringBuffer["__class"] = "java.lang.StringBuffer";
14737    StringBuffer["__interfaces"] = ["java.lang.CharSequence", "java.lang.Appendable"];
14738  })(lang = java2.lang || (java2.lang = {}));
14739})(java || (java = {}));
14740(function(java2) {
14741  var nio;
14742  (function(nio2) {
14743    var ByteBuffer = (
14744      /** @class */
14745      (function(_super) {
14746        __extends(ByteBuffer2, _super);
14747        function ByteBuffer2(_buffer, readOnly) {
14748          var _this = _super.call(this, _buffer.byteLength | 0, readOnly) || this;
14749          if (_this._buffer === void 0) {
14750            _this._buffer = null;
14751          }
14752          if (_this._array === void 0) {
14753            _this._array = null;
14754          }
14755          if (_this._data === void 0) {
14756            _this._data = null;
14757          }
14758          _this._order = java2.nio.ByteOrder.BIG_ENDIAN_$LI$();
14759          _this._buffer = _buffer;
14760          _this._array = new Int8Array(_buffer);
14761          _this._data = new DataView(_buffer);
14762          return _this;
14763        }
14764        ByteBuffer2.allocate = function(capacity) {
14765          return new ByteBuffer2(new ArrayBuffer(capacity), false);
14766        };
14767        ByteBuffer2.prototype.array = function() {
14768          return this._array;
14769        };
14770        ByteBuffer2.prototype.asReadOnlyBuffer = function() {
14771          var byteBuffer = new ByteBuffer2(this._buffer, true);
14772          byteBuffer.limit$int(this.limit$());
14773          byteBuffer.position$int(this.position$());
14774          byteBuffer._mark = this._mark;
14775          return byteBuffer;
14776        };
14777        ByteBuffer2.prototype.compact = function() {
14778          if (this.isReadOnly())
14779            throw new java2.nio.ReadOnlyBufferException();
14780          var current = this.position$();
14781          for (var i = current; i < this.limit$(); ++i) {
14782            {
14783              this.put$int$byte(i - current, this.get$int(i));
14784            }
14785            ;
14786          }
14787          this.position$int(this.limit$() - this.position$());
14788          this.limit$int(this.capacity());
14789          this._mark = -1;
14790          return this;
14791        };
14792        ByteBuffer2.prototype.compareTo$java_nio_ByteBuffer = function(byteBuffer) {
14793          return (
14794            /* compareTo */
14795            this._array.toString().localeCompare(byteBuffer.toString())
14796          );
14797        };
14798        ByteBuffer2.prototype.compareTo = function(byteBuffer) {
14799          if (byteBuffer != null && byteBuffer instanceof java2.nio.ByteBuffer || byteBuffer === null) {
14800            return this.compareTo$java_nio_ByteBuffer(byteBuffer);
14801          } else
14802            throw new Error("invalid overload");
14803        };
14804        ByteBuffer2.prototype.duplicate = function() {
14805          var byteBuffer = new ByteBuffer2(this._buffer, this.isReadOnly());
14806          byteBuffer.limit$int(this.limit$());
14807          byteBuffer.position$int(this.position$());
14808          byteBuffer._mark = this._mark;
14809          return byteBuffer;
14810        };
14811        ByteBuffer2.prototype.equals = function(o) {
14812          return this === o || o != null && o instanceof java2.nio.ByteBuffer && java2.util.Objects.equals(this._array, o._array);
14813        };
14814        ByteBuffer2.prototype.get$ = function() {
14815          if (this.position$() === this.limit$())
14816            throw new java2.nio.BufferUnderflowException();
14817          var b = this._array[this.position$()];
14818          this.position$int(this.position$() + 1);
14819          return b;
14820        };
14821        ByteBuffer2.prototype.get$byte_A = function(dest) {
14822          return this.get$byte_A$int$int(dest, 0, dest.length);
14823        };
14824        ByteBuffer2.prototype.get$byte_A$int$int = function(dest, offset, length) {
14825          if (this.remaining() < length)
14826            throw new java2.nio.BufferUnderflowException();
14827          for (var i = offset; i < offset + length; i++) {
14828            dest[i] = this.get$();
14829          }
14830          return this;
14831        };
14832        ByteBuffer2.prototype.get = function(dest, offset, length) {
14833          if ((dest != null && dest instanceof Array && (dest.length == 0 || dest[0] == null || typeof dest[0] === "
14833number") || dest === null) && (typeof offset === "number" || offset === null) && (typeof length === "number" || length === null)) {
14834            return this.get$byte_A$int$int(dest, offset, length);
14835          } else if ((dest != null && dest instanceof Array && (dest.length == 0 || dest[0] == null || typeof dest[0] === "number") || dest === null) && offset === void 0 && length === void 0) {
14836            return this.get$byte_A(dest);
14837          } else if ((typeof dest === "number" || dest === null) && offset === void 0 && length === void 0) {
14838            return this.get$int(dest);
14839          } else if (dest === void 0 && offset === void 0 && length === void 0) {
14840            return this.get$();
14841          } else
14842            throw new Error("invalid overload");
14843        };
14844        ByteBuffer2.prototype.get$int = function(from) {
14845          if (from < 0 || from > this.limit$())
14846            throw new java2.lang.IndexOutOfBoundsException();
14847          return this._array[from];
14848        };
14849        ByteBuffer2.prototype.getChar$ = function() {
14850          if (this.remaining() < 2)
14851            throw new java2.nio.BufferUnderflowException();
14852          var res = String.fromCharCode(this._data.getInt16(this.position$(), this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$()) | 0).charAt(0);
14853          this.position$int(this.position$() + 2);
14854          return res;
14855        };
14856        ByteBuffer2.prototype.getChar$int = function(from) {
14857          if (from < 0 || from > this.limit$() - 1)
14858            throw new java2.lang.IndexOutOfBoundsException();
14859          return String.fromCharCode(this._data.getInt16(from, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$()) | 0).charAt(0);
14860        };
14861        ByteBuffer2.prototype.getChar = function(from) {
14862          if (typeof from === "number" || from === null) {
14863            return this.getChar$int(from);
14864          } else if (from === void 0) {
14865            return this.getChar$();
14866          } else
14867            throw new Error("invalid overload");
14868        };
14869        ByteBuffer2.prototype.getDouble$ = function() {
14870          if (this.remaining() < 8)
14871            throw new java2.nio.BufferUnderflowException();
14872          var res = this._data.getFloat64(this.position$(), this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
14873          this.position$int(this.position$() + 8);
14874          return res;
14875        };
14876        ByteBuffer2.prototype.getDouble$int = function(from) {
14877          if (from < 0 || from > this.limit$() - 7)
14878            throw new java2.lang.IndexOutOfBoundsException();
14879          return this._data.getFloat64(from, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
14880        };
14881        ByteBuffer2.prototype.getDouble = function(from) {
14882          if (typeof from === "number" || from === null) {
14883            return this.getDouble$int(from);
14884          } else if (from === void 0) {
14885            return this.getDouble$();
14886          } else
14887            throw new Error("invalid overload");
14888        };
14889        ByteBuffer2.prototype.getFloat$ = function() {
14890          if (this.remaining() < 4)
14891            throw new java2.nio.BufferUnderflowException();
14892          var res = this._data.getFloat32(this.position$(), this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
14893          this.position$int(this.position$() + 4);
14894          return res;
14895        };
14896        ByteBuffer2.prototype.getFloat$int = function(from) {
14897          if (from < 0 || from > this.limit$() - 3)
14898            throw new java2.lang.IndexOutOfBoundsException();
14899          return this._data.getFloat32(from, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
14900        };
14901        ByteBuffer2.prototype.getFloat = function(from) {
14902          if (typeof from === "number" || from === null) {
14903            return this.getFloat$int(from);
14904          } else if (from === void 0) {
14905            return this.getFloat$();
14906          } else
14907            throw new Error("invalid overload");
14908        };
14909        ByteBuffer2.prototype.getInt$ = function() {
14910          if (this.remaining() < 4)
14911            throw new java2.nio.BufferUnderflowException();
14912          var res = this._data.getInt32(this.position$(), this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
14913          this.position$int(this.position$() + 4);
14914          return res;
14915        };
14916        ByteBuffer2.prototype.getInt$int = function(from) {
14917          if (from < 0 || from > this.limit$() - 3)
14918            throw new java2.lang.IndexOutOfBoundsException();
14919          return this._data.getInt32(from, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
14920        };
14921        ByteBuffer2.prototype.getInt = function(from) {
14922          if (typeof from === "number" || from === null) {
14923            return this.getInt$int(from);
14924          } else if (from === void 0) {
14925            return this.getInt$();
14926          } else
14927            throw new Error("invalid overload");
14928        };
14929        ByteBuffer2.prototype.getLong$ = function() {
14930          if (this.remaining() < 8)
14931            throw new java2.nio.BufferUnderflowException();
14932          var res1 = this._data.getInt32(this.position$(), this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
14933          var res2 = this._data.getInt32(this.position$() + 4, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
14934          if (this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$()) {
14935            var tmp = res1;
14936            res1 = res2;
14937            res2 = tmp;
14938          }
14939          this.position$int(this.position$() + 8);
14940          return res1 * 4294967296 + res2;
14941        };
14942        ByteBuffer2.prototype.getLong$int = function(from) {
14943          if (from < 0 || from > this.limit$() - 7)
14944            throw new java2.lang.IndexOutOfBoundsException();
14945          var res1 = this._data.getInt32(from, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
14946          var res2 = this._data.getInt32(from + 4, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
14947          if (this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$()) {
14948            var tmp = res1;
14949            res1 = res2;
14950            res2 = tmp;
14951          }
14952          return res1 * 4294967296 + res2;
14953        };
14954        ByteBuffer2.prototype.getLong = function(from) {
14955          if (typeof from === "number" || from === null) {
14956            return this.getLong$int(from);
14957          } else if (from === void 0) {
14958            return this.getLong$();
14959          } else
14960            throw new Error("invalid overload");
14961        };
14962        ByteBuffer2.prototype.getShort$ = function() {
14963          if (this.remaining() < 2)
14964            throw new java2.nio.BufferUnderflowException();
14965          var res = this._data.getInt16(this.position$(), this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
14966          this.position$int(this.position$() + 2);
14967          return res;
14968        };
14969        ByteBuffer2.prototype.getShort$int = function(from) {
14970          if (from < 0 || from > this.limit$() - 1)
14971            throw new java2.lang.IndexOutOfBoundsException();
14972          return this._data.getInt16(from, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
14973        };
14974        ByteBuffer2.prototype.getShort = function(from) {
14975          if (typeof from === "number" || from === null) {
14976            return this.getShort$int(from);
14977          } else if (from === void 0) {
14978            return this.getShort$();
14979          } else
14980            throw new Error("invalid overload");
14981        };
14982        ByteBuffer2.prototype.order$ = function() {
14983          return this._order;
14984        };
14985        ByteBuffer2.prototype.order$java_nio_ByteOrder = function(newOrder) {
14986          this._order = newOrder;
14987          return this;
14988        };
14989        ByteBuffer2.prototype.order = function(newOrder) {
14990          if (newOrder != null && newOrder instanceof java2.nio.ByteOrder || newOrder === null) {
14991            return this.order$java_nio_ByteOrder(newOrder);
14992          } else if (newOrder === void 0) {
14993            return this.order$();
14994          } else
14995            throw new Error("invalid overload");
14996        };
14997        ByteBuffer2.prototype.put$byte = function(b) {
14998          if (this.isReadOnly())
14999            throw new java2.nio.ReadOnlyBufferException();
15000          if (this.position$() === this.limit$())
15001            throw new java2.nio.BufferOverflowException();
15002          this._array[this.position$()] = b;
15003          this.position$int(this.position$() + 1);
15004          return this;
15005        };
15006        ByteBuffer2.prototype.put$byte_A = function(src) {
15007          return this.put$byte_A$int$int(src, 0, src.length);
15008        };
15009        ByteBuffer2.prototype.put$byte_A$int$int = function(src, offset, length) {
15010          if (this.isReadOnly())
15011            throw new java2.nio.ReadOnlyBufferException();
15012          if (this.remaining() < length)
15013            throw new java2.nio.BufferOverflowException();
15014          for (var i = offset; i < offset + length; i++) {
15015            this.put$byte(src[i]);
15016          }
15017          return this;
15018        };
15019        ByteBuffer2.prototype.put = function(src, offset, length) {
15020          if ((src != null && src instanceof Array && (src.length == 0 || src[0] == null || typeof src[0] === "number") || src === null) && (typeof offset === "number" || offset === null) && (typeof length === "number" || length === null)) {
15021            return this.put$byte_A$int$int(src, offset, length);
15022          } else if ((typeof src === "number" || src === null) && (typeof offset === "number" || offset === null) && length === void 0) {
15023            return this.put$int$byte(src, offset);
15024          } else if ((src != null && src instanceof Array && (src.length == 0 || src[0] == null || typeof src[0] === "number") || src === null) && offset === void 0 && length === void 0) {
15025            return this.put$byte_A(src);
15026          } else if ((typeof src === "number" || src === null) && offset === void 0 && length === void 0) {
15027            return this.put$byte(src);
15028          } else
15029            throw new Error("invalid overload");
15030        };
15031        ByteBuffer2.prototype.put$int$byte = function(to, b) {
15032          if (this.isReadOnly())
15033            throw new java2.nio.ReadOnlyBufferException();
15034          if (to < 0 || to > this.limit$())
15035            throw new java2.lang.IndexOutOfBoundsException();
15036          this._array[to] = b;
15037          return this;
15038        };
15039        ByteBuffer2.prototype.putChar$char = function(value) {
15040          if (this.isReadOnly())
15041            throw new java2.nio.ReadOnlyBufferException();
15042          if (this.remaining() < 2)
15043            throw new java2.nio.BufferOverflowException();
15044          this._data.setInt16(this.position$(), value.charCodeAt(0), this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15045          this.position$int(this.position$() + 2);
15046          return this;
15047        };
15048        ByteBuffer2.prototype.putChar$int$char = function(to, value) {
15049          if (this.isReadOnly())
15050            throw new java2.nio.ReadOnlyBufferException();
15051          if (to < 0 || to > this.limit$() - 1)
15052            throw new java2.lang.IndexOutOfBoundsException();
15053          this._data.setInt16(to, value.charCodeAt(0), this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15054          return this;
15055        };
15056        ByteBuffer2.prototype.putChar = function(to, value) {
15057          if ((typeof to === "number" || to === null) && (typeof value === "string" || value === null)) {
15058            return this.putChar$int$char(to, value);
15059          } else if ((typeof to === "string" || to === null) && value === void 0) {
15060            return this.putChar$char(to);
15061          } else
15062            throw new Error("invalid overload");
15063        };
15064        ByteBuffer2.prototype.putDouble$double = function(value) {
15065          if (this.isReadOnly())
15066            throw new java2.nio.ReadOnlyBufferException();
15067          if (this.remaining() < 8)
15068            throw new java2.nio.BufferOverflowException();
15069          this._data.setFloat64(this.position$(), value, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15070          this.position$int(this.position$() + 8);
15071          return this;
15072        };
15073        ByteBuffer2.prototype.putDouble$int$double = function(to, value) {
15074          if (this.isReadOnly())
15075            throw new java2.nio.ReadOnlyBufferException();
15076          if (to < 0 || to > this.limit$() - 7)
15077            throw new java2.lang.IndexOutOfBoundsException();
15078          this._data.setFloat64(to, value, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15079          return this;
15080        };
15081        ByteBuffer2.prototype.putDouble = function(to, value) {
15082          if ((typeof to === "number" || to === null) && (typeof value === "number" || value === null)) {
15083            return this.putDouble$int$double(to, value);
15084          } else if ((typeof to === "number" || to === null) && value === void 0) {
15085            return this.putDouble$double(to);
15086          } else
15087            throw new Error("invalid overload");
15088        };
15089        ByteBuffer2.prototype.putFloat$float = function(value) {
15090          if (this.isReadOnly())
15091            throw new java2.nio.ReadOnlyBufferException();
15092          if (this.remaining() < 4)
15093            throw new java2.nio.BufferOverflowException();
15094          this._data.setFloat32(this.position$(), value, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15095          this.position$int(this.position$() + 4);
15096          return this;
15097        };
15098        ByteBuffer2.prototype.putFloat$int$float = function(to, value) {
15099          if (this.isReadOnly())
15100            throw new java2.nio.ReadOnlyBufferException();
15101          if (to < 0 || to > this.limit$() - 3)
15102            throw new java2.lang.IndexOutOfBoundsException();
15103          this._data.setFloat32(to, value, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15104          return this;
15105        };
15106        ByteBuffer2.prototype.putFloat = function(to, value) {
15107          if ((typeof to === "number" || to === null) && (typeof value === "number" || value === null)) {
15108            return this.putFloat$int$float(to, value);
15109          } else if ((typeof to === "number" || to === null) && value === void 0) {
15110            return this.putFloat$float(to);
15111          } else
15112            throw new Error("invalid overload");
15113        };
15114        ByteBuffer2.prototype.putInt$int = function(value) {
15115          if (this.isReadOnly())
15116            throw new java2.nio.ReadOnlyBufferException();
15117          if (this.remaining() < 4)
15118            throw new java2.nio.BufferOverflowException();
15119          this._data.setInt32(this.position$(), value, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15120          this.position$int(this.position$() + 4);
15121          return this;
15122        };
15123        ByteBuffer2.prototype.putInt$int$int = function(to, value) {
15124          if (this.isReadOnly())
15125            throw new java2.nio.ReadOnlyBufferException();
15126          if (to < 0 || to > this.limit$() - 3)
15127            throw new java2.lang.IndexOutOfBoundsException();
15128          this._data.setInt32(to, value, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15129          return this;
15130        };
15131        ByteBuffer2.prototype.putInt = function(to, value) {
15132          if ((typeof to === "number" || to === null) && (typeof value === "number" || value === null)) {
15133            return this.putInt$int$int(to, value);
15134          } else if ((typeof to === "number" || to === null) && value === void 0) {
15135            return this.putInt$int(to);
15136          } else
15137            throw new Error("invalid overload");
15138        };
15139        ByteBuffer2.prototype.putLong$long = function(value) {
15140          if (this.isReadOnly())
15141            throw new java2.nio.ReadOnlyBufferException();
15142          if (this.remaining() < 8)
15143            throw new java2.nio.BufferOverflowException();
15144          var big = (function(n) {
15145            return n < 0 ? Math.ceil(n) : Math.floor(n);
15146          })(value / 4294967296) | 0;
15147          var small = value % 4294967296 | 0;
15148          if (this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$()) {
15149            var tmp = big;
15150            big = small;
15151            small = tmp;
15152          }
15153          this._data.setInt32(this.position$(), big, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15154          this._data.setInt32(this.position$() + 4, small, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15155          this.position$int(this.position$() + 8);
15156          return this;
15157        };
15158        ByteBuffer2.prototype.putLong$int$long = function(to, value) {
15159          if (this.isReadOnly())
15160            throw new java2.nio.ReadOnlyBufferException();
15161          if (to < 0 || to > this.limit$() - 7)
15162            throw new java2.lang.IndexOutOfBoundsException();
15163          var big = (function(n) {
15164            return n < 0 ? Math.ceil(n) : Math.floor(n);
15165          })(value / 4294967296) | 0;
15166          var small = value % 4294967296 | 0;
15167          if (this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$()) {
15168            var tmp = big;
15169            big = small;
15170            small = tmp;
15171          }
15172          this._data.setInt32(to, big, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15173          this._data.setInt32(to + 4, small, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15174          return this;
15175        };
15176        ByteBuffer2.prototype.putLong = function(to, value) {
15177          if ((typeof to === "number" || to === null) && (typeof value === "number" || value === null)) {
15178            return this.putLong$int$long(to, value);
15179          } else if ((typeof to === "number" || to === null) && value === void 0) {
15180            return this.putLong$long(to);
15181          } else
15182            throw new Error("invalid overload");
15183        };
15184        ByteBuffer2.prototype.putShort$short = function(value) {
15185          if (this.isReadOnly())
15186            throw new java2.nio.ReadOnlyBufferException();
15187          if (this.remaining() < 2)
15188            throw new java2.nio.BufferOverflowException();
15189          this._data.setInt16(this.position$(), value, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15190          this.position$int(this.position$() + 2);
15191          return this;
15192        };
15193        ByteBuffer2.prototype.putShort$int$short = function(to, value) {
15194          if (this.isReadOnly())
15195            throw new java2.nio.ReadOnlyBufferException();
15196          if (to < 0 || to > this.limit$() - 1)
15197            throw new java2.lang.IndexOutOfBoundsException();
15198          this._data.setInt16(to, value, this._order === java2.nio.ByteOrder.LITTLE_ENDIAN_$LI$());
15199          return this;
15200        };
15201        ByteBuffer2.prototype.putShort = function(to, value) {
15202          if ((typeof to === "number" || to === null) && (typeof value === "number" || value === null)) {
15203            return this.putShort$int$short(to, value);
15204          } else if ((typeof to === "number" || to === null) && value === void 0) {
15205            return this.putShort$short(to);
15206          } else
15207            throw new Error("invalid overload");
15208        };
15209        ByteBuffer2.prototype.slice = function() {
15210          return new ByteBuffer2(this._buffer, this.isReadOnly());
15211        };
15212        ByteBuffer2.prototype.hashCode = function() {
15213          return java2.util.Objects.hash(this._array);
15214        };
15215        ByteBuffer2.wrap$byte_A = function(array) {
15216          return ByteBuffer2.wrap$byte_A$int$int(array, 0, array.length);
15217        };
15218        ByteBuffer2.wrap$byte_A$int$int = function(array, offset, length) {
15219          var buffer = new ArrayBuffer(length);
15220          var bytes = new Int8Array(buffer);
15221          bytes.set(Int8Array.from(array.slice(offset, offset + length)));
15222          return new ByteBuffer2(buffer, true);
15223        };
15224        ByteBuffer2.wrap = function(array, offset, length) {
15225          if ((array != null && array instanceof Array && (array.length == 0 || array[0] == null || typeof array[0] === "
15225number") || array === null) && (typeof offset === "number" || offset === null) && (typeof length === "number" || length === null)) {
15226            return java2.nio.ByteBuffer.wrap$byte_A$int$int(array, offset, length);
15227          } else if ((array != null && array instanceof ArrayBuffer || array === null) && (typeof offset === "number" || offset === null) && (typeof length === "number" || length === null)) {
15228            return java2.nio.ByteBuffer.wrap$def_js_ArrayBuffer$int$double(array, offset, length);
15229          } else if ((array != null && array instanceof Array && (array.length == 0 || array[0] == null || typeof array[0] === "number") || array === null) && offset === void 0 && length === void 0) {
15230            return java2.nio.ByteBuffer.wrap$byte_A(array);
15231          } else if ((array != null && array instanceof ArrayBuffer || array === null) && offset === void 0 && length === void 0) {
15232            return java2.nio.ByteBuffer.wrap$def_js_ArrayBuffer(array);
15233          } else
15234            throw new Error("invalid overload");
15235        };
15236        ByteBuffer2.wrap$def_js_ArrayBuffer = function(array) {
15237          return ByteBuffer2.wrap$def_js_ArrayBuffer$int$double(array, 0, array.byteLength);
15238        };
15239        ByteBuffer2.wrap$def_js_ArrayBuffer$int$double = function(array, offset, length) {
15240          return new ByteBuffer2(array.slice(offset, offset + length), false);
15241        };
15242        return ByteBuffer2;
15243      })(java2.nio.Buffer)
15244    );
15245    nio2.ByteBuffer = ByteBuffer;
15246    ByteBuffer["__class"] = "java.nio.ByteBuffer";
15247    ByteBuffer["__interfaces"] = ["java.lang.Comparable"];
15248  })(nio = java2.nio || (java2.nio = {}));
15249})(java || (java = {}));
15250(function(javaemul13) {
15251  var internal;
15252  (function(internal2) {
15253    var EmulatedCharset = (
15254      /** @class */
15255      (function(_super) {
15256        __extends(EmulatedCharset2, _super);
15257        function EmulatedCharset2(name) {
15258          return _super.call(this, name, null) || this;
15259        }
15260        EmulatedCharset2.UTF_8_$LI$ = function() {
15261          if (EmulatedCharset2.UTF_8 == null) {
15262            EmulatedCharset2.UTF_8 = new EmulatedCharset2.UtfCharset("UTF-8");
15263          }
15264          return EmulatedCharset2.UTF_8;
15265        };
15266        EmulatedCharset2.ISO_LATIN_1_$LI$ = function() {
15267          if (EmulatedCharset2.ISO_LATIN_1 == null) {
15268            EmulatedCharset2.ISO_LATIN_1 = new EmulatedCharset2.LatinCharset("ISO-LATIN-1");
15269          }
15270          return EmulatedCharset2.ISO_LATIN_1;
15271        };
15272        EmulatedCharset2.ISO_8859_1_$LI$ = function() {
15273          if (EmulatedCharset2.ISO_8859_1 == null) {
15274            EmulatedCharset2.ISO_8859_1 = new EmulatedCharset2.LatinCharset("ISO-8859-1");
15275          }
15276          return EmulatedCharset2.ISO_8859_1;
15277        };
15278        return EmulatedCharset2;
15279      })(java.nio.charset.Charset)
15280    );
15281    internal2.EmulatedCharset = EmulatedCharset;
15282    EmulatedCharset["__class"] = "javaemul.internal.EmulatedCharset";
15283    EmulatedCharset["__interfaces"] = ["java.lang.Comparable"];
15284    (function(EmulatedCharset2) {
15285      var LatinCharset = (
15286        /** @class */
15287        (function(_super) {
15288          __extends(LatinCharset2, _super);
15289          function LatinCharset2(name) {
15290            return _super.call(this, name) || this;
15291          }
15292          LatinCharset2.prototype.getBytes = function(str) {
15293            var n = str.length;
15294            var bytes = (function(s) {
15295              var a = [];
15296              while (s-- > 0)
15297                a.push(0);
15298              return a;
15299            })(n);
15300            for (var i = 0; i < n; ++i) {
15301              {
15302                bytes[i] = (function(c) {
15303                  return c.charCodeAt == null ? c : c.charCodeAt(0);
15304                })(str.charAt(i)) & 255 | 0;
15305              }
15306              ;
15307            }
15308            return bytes;
15309          };
15310          LatinCharset2.prototype.decodeString = function(bytes, ofs, len) {
15311            var chars = (function(s) {
15312              var a = [];
15313              while (s-- > 0)
15314                a.push(null);
15315              return a;
15316            })(len);
15317            for (var i = 0; i < len; ++i) {
15318              {
15319                chars[i] = String.fromCharCode(bytes[ofs + i] & 255);
15320              }
15321              ;
15322            }
15323            return chars;
15324          };
15325          return LatinCharset2;
15326        })(javaemul13.internal.EmulatedCharset)
15327      );
15328      EmulatedCharset2.LatinCharset = LatinCharset;
15329      LatinCharset["__class"] = "javaemul.internal.EmulatedCharset.LatinCharset";
15330      LatinCharset["__interfaces"] = ["java.lang.Comparable"];
15331      var UtfCharset = (
15332        /** @class */
15333        (function(_super) {
15334          __extends(UtfCharset2, _super);
15335          function UtfCharset2(name) {
15336            return _super.call(this, name) || this;
15337          }
15338          UtfCharset2.prototype.decodeString = function(bytes, ofs, len) {
15339            var charCount = 0;
15340            for (var i = 0; i < len; ) {
15341              {
15342                ++charCount;
15343                var ch = bytes[ofs + i];
15344                if ((ch & 192) === 128) {
15345                  throw new java.lang.IllegalArgumentException("Invalid UTF8 sequence");
15346                } else if ((ch & 128) === 0) {
15347                  ++i;
15348                } else if ((ch & 224) === 192) {
15349                  i += 2;
15350                } else if ((ch & 240) === 224) {
15351                  i += 3;
15352                } else if ((ch & 248) === 240) {
15353                  i += 4;
15354                } else {
15355                  throw new java.lang.IllegalArgumentException("Invalid UTF8 sequence");
15356                }
15357                if (i > len) {
15358                  throw new java.lang.IndexOutOfBoundsException("Invalid UTF8 sequence");
15359                }
15360              }
15361              ;
15362            }
15363            var chars = (function(s) {
15364              var a = [];
15365              while (s-- > 0)
15366                a.push(null);
15367              return a;
15368            })(charCount);
15369            var outIdx = 0;
15370            var count = 0;
15371            for (var i = 0; i < len; ) {
15372              {
15373                var ch = bytes[ofs + i++];
15374                if ((ch & 128) === 0) {
15375                  count = 1;
15376                  ch &= 127;
15377                } else if ((ch & 224) === 192) {
15378                  count = 2;
15379                  ch &= 31;
15380                } else if ((ch & 240) === 224) {
15381                  count = 3;
15382                  ch &= 15;
15383                } else if ((ch & 248) === 240) {
15384                  count = 4;
15385                  ch &= 7;
15386                } else if ((ch & 252) === 248) {
15387                  count = 5;
15388                  ch &= 3;
15389                }
15390                while (--count > 0) {
15391                  {
15392                    var b = bytes[ofs + i++];
15393                    if ((b & 192) !== 128) {
15394                      throw new java.lang.IllegalArgumentException("Invalid UTF8 sequence at " + (ofs + i - 1) + ", byte=" + javaemul13.internal.IntegerHelper.toHexString(b));
15395                    }
15396                    ch = ch << 6 | b & 63;
15397                  }
15398                }
15399                ;
15400                outIdx += javaemul13.internal.CharacterHelper.toChars$int$char_A$int(ch, chars, outIdx);
15401              }
15402              ;
15403            }
15404            return chars;
15405          };
15406          UtfCharset2.prototype.getBytes = function(str) {
15407            var n = str.length;
15408            var byteCount = 0;
15409            for (var i = 0; i < n; ) {
15410              {
15411                var ch = str.charCodeAt(i);
15412                i += javaemul13.internal.CharacterHelper.charCount(ch);
15413                if (ch < 1 << 7) {
15414                  byteCount++;
15415                } else if (ch < 1 << 11) {
15416                  byteCount += 2;
15417                } else if (ch < 1 << 16) {
15418                  byteCount += 3;
15419                } else if (ch < 1 << 21) {
15420                  byteCount += 4;
15421                } else if (ch < 1 << 26) {
15422                  byteCount += 5;
15423                }
15424              }
15425              ;
15426            }
15427            var bytes = (function(s) {
15428              var a = [];
15429              while (s-- > 0)
15430                a.push(0);
15431              return a;
15432            })(byteCount);
15433            var out = 0;
15434            for (var i = 0; i < n; ) {
15435              {
15436                var ch = str.charCodeAt(i);
15437                i += javaemul13.internal.CharacterHelper.charCount(ch);
15438                out += this.encodeUtf8(bytes, out, ch);
15439              }
15440              ;
15441            }
15442            return bytes;
15443          };
15444          UtfCharset2.prototype.encodeUtf8 = function(bytes, ofs, codePoint) {
15445            if (codePoint < 1 << 7) {
15446              bytes[ofs] = codePoint & 127 | 0;
15447              return 1;
15448            } else if (codePoint < 1 << 11) {
15449              bytes[ofs++] = codePoint >> 6 & 31 | 192 | 0;
15450              bytes[ofs] = codePoint & 63 | 128 | 0;
15451              return 2;
15452            } else if (codePoint < 1 << 16) {
15453              bytes[ofs++] = codePoint >> 12 & 15 | 224 | 0;
15454              bytes[ofs++] = codePoint >> 6 & 63 | 128 | 0;
15455              bytes[ofs] = codePoint & 63 | 128 | 0;
15456              return 3;
15457            } else if (codePoint < 1 << 21) {
15458              bytes[ofs++] = codePoint >> 18 & 7 | 240 | 0;
15459              bytes[ofs++] = codePoint >> 12 & 63 | 128 | 0;
15460              bytes[ofs++] = codePoint >> 6 & 63 | 128 | 0;
15461              bytes[ofs] = codePoint & 63 | 128 | 0;
15462              return 4;
15463            } else if (codePoint < 1 << 26) {
15464              bytes[ofs++] = codePoint >> 24 & 3 | 248 | 0;
15465              bytes[ofs++] = codePoint >> 18 & 63 | 128 | 0;
15466              bytes[ofs++] = codePoint >> 12 & 63 | 128 | 0;
15467              bytes[ofs++] = codePoint >> 6 & 63 | 128 | 0;
15468              bytes[ofs] = codePoint & 63 | 128 | 0;
15469              return 5;
15470            }
15471            throw new java.lang.IllegalArgumentException("Character out of range: " + codePoint);
15472          };
15473          return UtfCharset2;
15474        })(javaemul13.internal.EmulatedCharset)
15475      );
15476      EmulatedCharset2.UtfCharset = UtfCharset;
15477      UtfCharset["__class"] = "javaemul.internal.EmulatedCharset.UtfCharset";
15478      UtfCharset["__interfaces"] = ["java.lang.Comparable"];
15479    })(EmulatedCharset = internal2.EmulatedCharset || (internal2.EmulatedCharset = {}));
15480  })(internal = javaemul13.internal || (javaemul13.internal = {}));
15481})(javaemul || (javaemul = {}));
15482(function(javaemul13) {
15483  var internal;
15484  (function(internal2) {
15485    var stream;
15486    (function(stream2) {
15487      var StreamRowSortingCollector = (
15488        /** @class */
15489        (function(_super) {
15490          __extends(StreamRowSortingCollector2, _super);
15491          function StreamRowSortingCollector2(collection, comparator) {
15492            var _this = _super.call(this, collection) || this;
15493            if (_this.comparator === void 0) {
15494              _this.comparator = null;
15495            }
15496            _this.comparator = (function(funcInst) {
15497              if (funcInst == null || typeof funcInst == "function") {
15498                return funcInst;
15499              }
15500              return function(a, b) {
15501                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
15502              };
15503            })(comparator);
15504            return _this;
15505          }
15506          StreamRowSortingCollector2.prototype.end = function() {
15507            java.util.Collections.sort$java_util_List$java_util_Comparator(this.collection, (function(funcInst) {
15508              if (funcInst == null || typeof funcInst == "function") {
15509                return funcInst;
15510              }
15511              return function(a, b) {
15512                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
15513              };
15514            })(this.comparator));
15515            _super.prototype.end.call(this);
15516          };
15517          return StreamRowSortingCollector2;
15518        })(javaemul13.internal.stream.StreamRowCollector)
15519      );
15520      stream2.StreamRowSortingCollector = StreamRowSortingCollector;
15521      StreamRowSortingCollector["__class"] = "javaemul.internal.stream.StreamRowSortingCollector";
15522      StreamRowSortingCollector["__interfaces"] = ["javaemul.internal.stream.StreamRow"];
15523    })(stream = internal2.stream || (internal2.stream = {}));
15524  })(internal = javaemul13.internal || (javaemul13.internal = {}));
15525})(javaemul || (javaemul = {}));
15526(function(java2) {
15527  var util;
15528  (function(util2) {
15529    var AbstractMap = (
15530      /** @class */
15531      (function() {
15532        function AbstractMap2() {
15533        }
15534        AbstractMap2.prototype.replaceAll = function(__function) {
15535          java2.util.Objects.requireNonNull((function(funcInst) {
15536            if (funcInst == null || typeof funcInst == "function") {
15537              return funcInst;
15538            }
15539            return function(arg0, arg1) {
15540              return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0, arg1);
15541            };
15542          })(__function));
15543          var _loop_5 = function(index2) {
15544            var entry = index2.next();
15545            {
15546              var k_1;
15547              var v_1;
15548              try {
15549                k_1 = entry.getKey();
15550                v_1 = entry.getValue();
15551              } catch (ise) {
15552                throw new java2.lang.RuntimeException(ise);
15553              }
15554              v_1 = (function(target) {
15555                return typeof target === "function" ? target(k_1, v_1) : target.apply(k_1, v_1);
15556              })(__function);
15557              try {
15558                entry.setValue(v_1);
15559              } catch (ise) {
15560                throw new java2.lang.RuntimeException(ise);
15561              }
15562            }
15563          };
15564          for (var index = this.entrySet().iterator(); index.hasNext(); ) {
15565            _loop_5(index);
15566          }
15567        };
15568        AbstractMap2.prototype.getOrDefault = function(key, defaultValue) {
15569          var v;
15570          return (v = this.get(key)) != null || this.containsKey(key) ? v : defaultValue;
15571        };
15572        AbstractMap2.prototype.merge = function(key, value, map) {
15573          var old = this.get(key);
15574          var next = old == null ? value : (function(target) {
15575            return typeof target === "function" ? target(old, value) : target.apply(old, value);
15576          })(map);
15577          if (next == null) {
15578            this.remove(key);
15579          } else {
15580            this.put(key, next);
15581          }
15582          return next;
15583        };
15584        AbstractMap2.prototype.computeIfAbsent = function(key, mappingFunction) {
15585          var result;
15586          if ((result = this.get(key)) == null) {
15587            result = (function(target) {
15588              return typeof target === "function" ? target(key) : target.apply(key);
15589            })(mappingFunction);
15590            if (result != null)
15591              this.put(key, result);
15592          }
15593          return result;
15594        };
15595        AbstractMap2.prototype.putIfAbsent = function(key, value) {
15596          var v = this.get(key);
15597          if (v == null) {
15598            v = this.put(key, value);
15599          }
15600          return v;
15601        };
15602        AbstractMap2.prototype.clear = function() {
15603          this.entrySet().clear();
15604        };
15605        AbstractMap2.prototype.containsKey = function(key) {
15606          return this.implFindEntry(key, false) != null;
15607        };
15608        AbstractMap2.prototype.containsValue = function(value) {
15609          for (var index = this.entrySet().iterator(); index.hasNext(); ) {
15610            var entry = index.next();
15611            {
15612              var v = entry.getValue();
15613              if (java2.util.Objects.equals(value, v)) {
15614                return true;
15615              }
15616            }
15617          }
15618          return false;
15619        };
15620        AbstractMap2.prototype.containsEntry = function(entry) {
15621          var key = entry.getKey();
15622          var value = entry.getValue();
15623          var ourValue = this.get(key);
15624          if (!java2.util.Objects.equals(value, ourValue)) {
15625            return false;
15626          }
15627          if (ourValue == null && !this.containsKey(key)) {
15628            return false;
15629          }
15630          return true;
15631        };
15632        AbstractMap2.prototype.equals = function(obj) {
15633          if (obj === this) {
15634            return true;
15635          }
15636          if (!(obj != null && (obj.constructor != null && obj.constructor["__interfaces"] != null && obj.constructor["__interfaces"].indexOf("java.util.Map") >= 0))) {
15637            return false;
15638          }
15639          var otherMap = obj;
15640          if (this.size() !== otherMap.size()) {
15641            return false;
15642          }
15643          for (var index = otherMap.entrySet().iterator(); index.hasNext(); ) {
15644            var entry = index.next();
15645            {
15646              if (!this.containsEntry(entry)) {
15647                return false;
15648              }
15649            }
15650          }
15651          return true;
15652        };
15653        AbstractMap2.prototype.get = function(key) {
15654          return AbstractMap2.getEntryValueOrNull(this.implFindEntry(key, false));
15655        };
15656        AbstractMap2.prototype.hashCode = function() {
15657          return java2.util.Collections.hashCode$java_lang_Iterable(this.entrySet());
15658        };
15659        AbstractMap2.prototype.isEmpty = function() {
15660          return this.size() === 0;
15661        };
15662        AbstractMap2.prototype.keySet = function() {
15663          return new AbstractMap2.AbstractMap$0(this);
15664        };
15665        AbstractMap2.prototype.put = function(key, value) {
15666          throw new java2.lang.UnsupportedOperationException("Put not supported on this map");
15667        };
15668        AbstractMap2.prototype.putAll = function(map) {
15669          javaemul.internal.InternalPreconditions.checkNotNull(map);
15670          for (var index = map.entrySet().iterator(); index.hasNext(); ) {
15671            var e = index.next();
15672            {
15673              this.put(e.getKey(), e.getValue());
15674            }
15675          }
15676        };
15677        AbstractMap2.prototype.remove = function(key) {
15678          return AbstractMap2.getEntryValueOrNull(this.implFindEntry(key, true));
15679        };
15680        AbstractMap2.prototype.size = function() {
15681          return this.entrySet().size();
15682        };
15683        AbstractMap2.prototype.toString$ = function() {
15684          var joiner = new java2.util.StringJoiner(", ", "{", "}");
15685          for (var index = this.entrySet().iterator(); index.hasNext(); ) {
15686            var entry = index.next();
15687            {
15688              joiner.add(this.toString$java_util_Map_Entry(entry));
15689            }
15690          }
15691          return joiner.toString();
15692        };
15693        AbstractMap2.prototype.toString$java_util_Map_Entry = function(entry) {
15694          return this.toString$java_lang_Object(entry.getKey()) + "=" + this.toString$java_lang_Object(entry.getValue());
15695        };
15696        AbstractMap2.prototype.toString = function(entry) {
15697          if (entry != null && (entry.constructor != null && entry.constructor["__interfaces"] != null && entry.constructor["__interfaces"].indexOf("java.util.Map.Entry") >= 0) || entry === null) {
15698            return this.toString$java_util_Map_Entry(entry);
15699          } else if (entry != null || entry === null) {
15700            return this.toString$java_lang_Object(entry);
15701          } else if (entry === void 0) {
15702            return this.toString$();
15703          } else
15704            throw new Error("invalid overload");
15705        };
15706        AbstractMap2.prototype.toString$java_lang_Object = function(o) {
15707          return o === this ? "(this Map)" : (
15708            /* valueOf */
15709            String(o).toString()
15710          );
15711        };
15712        AbstractMap2.prototype.values = function() {
15713          return new AbstractMap2.AbstractMap$1(this);
15714        };
15715        AbstractMap2.getEntryKeyOrNull = function(entry) {
15716          return entry == null ? null : entry.getKey();
15717        };
15718        AbstractMap2.getEntryValueOrNull = function(entry) {
15719          return entry == null ? null : entry.getValue();
15720        };
15721        AbstractMap2.prototype.implFindEntry = function(key, remove) {
15722          for (var iter = this.entrySet().iterator(); iter.hasNext(); ) {
15723            {
15724              var entry = iter.next();
15725              var k = entry.getKey();
15726              if (java2.util.Objects.equals(key, k)) {
15727                if (remove) {
15728                  entry = new AbstractMap2.SimpleEntry(entry.getKey(), entry.getValue());
15729                  iter.remove();
15730                }
15731                return entry;
15732              }
15733            }
15734            ;
15735          }
15736          return null;
15737        };
15738        return AbstractMap2;
15739      })()
15740    );
15741    util2.AbstractMap = AbstractMap;
15742    AbstractMap["__class"] = "java.util.AbstractMap";
15743    AbstractMap["__interfaces"] = ["java.util.Map"];
15744    (function(AbstractMap2) {
15745      var AbstractEntry = (
15746        /** @class */
15747        (function() {
15748          function AbstractEntry2(key, value) {
15749            if (this.key === void 0) {
15750              this.key = null;
15751            }
15752            if (this.value === void 0) {
15753              this.value = null;
15754            }
15755            this.key = key;
15756            this.value = value;
15757          }
15758          AbstractEntry2.prototype.getKey = function() {
15759            return this.key;
15760          };
15761          AbstractEntry2.prototype.getValue = function() {
15762            return this.value;
15763          };
15764          AbstractEntry2.prototype.setValue = function(value) {
15765            var oldValue = this.value;
15766            this.value = value;
15767            return oldValue;
15768          };
15769          AbstractEntry2.prototype.equals = function(other) {
15770            if (!(other != null && (other.constructor != null && other.constructor["__interfaces"] != null && other.constructor["__interfaces"].indexOf("java.util.Map.Entry") >= 0))) {
15771              return false;
15772            }
15773            var entry = other;
15774            return java2.util.Objects.equals(this.key, entry.getKey()) && java2.util.Objects.equals(this.value, entry.getValue());
15775          };
15776          AbstractEntry2.prototype.hashCode = function() {
15777            return java2.util.Objects.hashCode(this.key) ^ java2.util.Objects.hashCode(this.value);
15778          };
15779          AbstractEntry2.prototype.toString = function() {
15780            return this.key + "=" + this.value;
15781          };
15782          return AbstractEntry2;
15783        })()
15784      );
15785      AbstractMap2.AbstractEntry = AbstractEntry;
15786      AbstractEntry["__class"] = "java.util.AbstractMap.AbstractEntry";
15787      AbstractEntry["__interfaces"] = ["java.util.Map.Entry"];
15788      var SimpleEntry = (
15789        /** @class */
15790        (function(_super) {
15791          __extends(SimpleEntry2, _super);
15792          function SimpleEntry2(key, value) {
15793            var _this = this;
15794            if ((key != null || key === null) && (value != null || value === null)) {
15795              var __args = arguments;
15796              _this = _super.call(this, key, value) || this;
15797            } else if ((key != null && (key.constructor != null && key.constructor["__interfaces"] != null && key.constructor["__interfaces"].indexOf("java.util.Map.Entry") >= 0) || key === null) && value === void 0) {
15798              var __args = arguments;
15799              var entry = __args[0];
15800              _this = _super.call(this, entry.getKey(), entry.getValue()) || this;
15801            } else
15802              throw new Error("invalid overload");
15803            return _this;
15804          }
15805          return SimpleEntry2;
15806        })(AbstractMap2.AbstractEntry)
15807      );
15808      AbstractMap2.SimpleEntry = SimpleEntry;
15809      SimpleEntry["__class"] = "java.util.AbstractMap.SimpleEntry";
15810      SimpleEntry["__interfaces"] = ["java.util.Map.Entry"];
15811      var SimpleImmutableEntry = (
15812        /** @class */
15813        (function(_super) {
15814          __extends(SimpleImmutableEntry2, _super);
15815          function SimpleImmutableEntry2(key, value) {
15816            var _this = this;
15817            if ((key != null || key === null) && (value != null || value === null)) {
15818              var __args = arguments;
15819              _this = _super.call(this, key, value) || this;
15820            } else if ((key != null && (key.constructor != null && key.constructor["__interfaces"] != null && key.constructor["__interfaces"].indexOf("java.util.Map.Entry") >= 0) || key === null) && value === void 0) {
15821              var __args = arguments;
15822              var entry = __args[0];
15823              _this = _super.call(this, entry.getKey(), entry.getValue()) || this;
15824            } else
15825              throw new Error("invalid overload");
15826            return _this;
15827          }
15828          SimpleImmutableEntry2.prototype.setValue = function(value) {
15829            throw new java2.lang.UnsupportedOperationException();
15830          };
15831          return SimpleImmutableEntry2;
15832        })(AbstractMap2.AbstractEntry)
15833      );
15834      AbstractMap2.SimpleImmutableEntry = SimpleImmutableEntry;
15835      SimpleImmutableEntry["__class"] = "java.util.AbstractMap.SimpleImmutableEntry";
15836      SimpleImmutableEntry["__interfaces"] = ["java.util.Map.Entry"];
15837      var AbstractMap$0 = (
15838        /** @class */
15839        (function(_super) {
15840          __extends(AbstractMap$02, _super);
15841          function AbstractMap$02(__parent) {
15842            var _this = _super.call(this) || this;
15843            _this.__parent = __parent;
15844            return _this;
15845          }
15846          AbstractMap$02.prototype.clear = function() {
15847            this.clear();
15848          };
15849          AbstractMap$02.prototype.contains = function(key) {
15850            return this.__parent.containsKey(key);
15851          };
15852          AbstractMap$02.prototype.iterator = function() {
15853            var outerIter = this.__parent.entrySet().iterator();
15854            return new AbstractMap$02.AbstractMap$0$0(this, outerIter);
15855          };
15856          AbstractMap$02.prototype.remove = function(key) {
15857            if (this.__parent.containsKey(key)) {
15858              this.remove(key);
15859              return true;
15860            }
15861            return false;
15862          };
15863          AbstractMap$02.prototype.size = function() {
15864            return this.__parent.size();
15865          };
15866          return AbstractMap$02;
15867        })(java2.util.AbstractSet)
15868      );
15869      AbstractMap2.AbstractMap$0 = AbstractMap$0;
15870      AbstractMap$0["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable"];
15871      (function(AbstractMap$02) {
15872        var AbstractMap$0$0 = (
15873          /** @class */
15874          (function() {
15875            function AbstractMap$0$02(__parent, outerIter) {
15876              this.outerIter = outerIter;
15877              this.__parent = __parent;
15878            }
15879            AbstractMap$0$02.prototype.forEachRemaining = function(consumer) {
15880              var _this = this;
15881              javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
15882                if (funcInst == null || typeof funcInst == "function") {
15883                  return funcInst;
15884                }
15885                return function(arg0) {
15886                  return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
15887                };
15888              })(consumer));
15889              while (this.hasNext()) {
15890                {
15891                  (function(target) {
15892                    return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
15893                  })(consumer);
15894                }
15895              }
15896              ;
15897            };
15898            AbstractMap$0$02.prototype.hasNext = function() {
15899              return this.outerIter.hasNext();
15900            };
15901            AbstractMap$0$02.prototype.next = function() {
15902              var entry = this.outerIter.next();
15903              return entry.getKey();
15904            };
15905            AbstractMap$0$02.prototype.remove = function() {
15906              this.outerIter.remove();
15907            };
15908            return AbstractMap$0$02;
15909          })()
15910        );
15911        AbstractMap$02.AbstractMap$0$0 = AbstractMap$0$0;
15912        AbstractMap$0$0["__interfaces"] = ["java.util.Iterator"];
15913      })(AbstractMap$0 = AbstractMap2.AbstractMap$0 || (AbstractMap2.AbstractMap$0 = {}));
15914      var AbstractMap$1 = (
15915        /** @class */
15916        (function(_super) {
15917          __extends(AbstractMap$12, _super);
15918          function AbstractMap$12(__parent) {
15919            var _this = _super.call(this) || this;
15920            _this.__parent = __parent;
15921            return _this;
15922          }
15923          AbstractMap$12.prototype.clear = function() {
15924            this.clear();
15925          };
15926          AbstractMap$12.prototype.contains = function(value) {
15927            return this.__parent.containsValue(value);
15928          };
15929          AbstractMap$12.prototype.iterator = function() {
15930            var outerIter = this.__parent.entrySet().iterator();
15931            return new AbstractMap$12.AbstractMap$1$0(this, outerIter);
15932          };
15933          AbstractMap$12.prototype.size = function() {
15934            return this.__parent.size();
15935          };
15936          return AbstractMap$12;
15937        })(java2.util.AbstractCollection)
15938      );
15939      AbstractMap2.AbstractMap$1 = AbstractMap$1;
15940      AbstractMap$1["__interfaces"] = ["java.util.Collection", "java.lang.Iterable"];
15941      (function(AbstractMap$12) {
15942        var AbstractMap$1$0 = (
15943          /** @class */
15944          (function() {
15945            function AbstractMap$1$02(__parent, outerIter) {
15946              this.outerIter = outerIter;
15947              this.__parent = __parent;
15948            }
15949            AbstractMap$1$02.prototype.forEachRemaining = function(consumer) {
15950              var _this = this;
15951              javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
15952                if (funcInst == null || typeof funcInst == "function") {
15953                  return funcInst;
15954                }
15955                return function(arg0) {
15956                  return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
15957                };
15958              })(consumer));
15959              while (this.hasNext()) {
15960                {
15961                  (function(target) {
15962                    return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
15963                  })(consumer);
15964                }
15965              }
15966              ;
15967            };
15968            AbstractMap$1$02.prototype.hasNext = function() {
15969              return this.outerIter.hasNext();
15970            };
15971            AbstractMap$1$02.prototype.next = function() {
15972              var entry = this.outerIter.next();
15973              return entry.getValue();
15974            };
15975            AbstractMap$1$02.prototype.remove = function() {
15976              this.outerIter.remove();
15977            };
15978            return AbstractMap$1$02;
15979          })()
15980        );
15981        AbstractMap$12.AbstractMap$1$0 = AbstractMap$1$0;
15982        AbstractMap$1$0["__interfaces"] = ["java.util.Iterator"];
15983      })(AbstractMap$1 = AbstractMap2.AbstractMap$1 || (AbstractMap2.AbstractMap$1 = {}));
15984    })(AbstractMap = util2.AbstractMap || (util2.AbstractMap = {}));
15985  })(util = java2.util || (java2.util = {}));
15986})(java || (java = {}));
15987(function(java2) {
15988  var util;
15989  (function(util2) {
15990    var HashSet = (
15991      /** @class */
15992      (function(_super) {
15993        __extends(HashSet2, _super);
15994        function HashSet2(initialCapacity, loadFactor) {
15995          var _this = this;
15996          if ((typeof initialCapacity === "number" || initialCapacity === null) && (typeof loadFactor === "number" || loadFactor === null)) {
15997            var __args = arguments;
15998            _this = _super.call(this) || this;
15999            if (_this.map === void 0) {
16000              _this.map = null;
16001            }
16002            if (_this.exposeElement === void 0) {
16003              _this.exposeElement = null;
16004            }
16005            _this.map = new java2.util.HashMap(initialCapacity, loadFactor);
16006          } else if ((initialCapacity != null && (initialCapacity.constructor != null && initialCapacity.constructor["__interfaces"] != null && initialCapacity.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || initialCapacity === null) && loadFactor === void 0) {
16007            var __args = arguments;
16008            var c = __args[0];
16009            _this = _super.call(this) || this;
16010            if (_this.map === void 0) {
16011              _this.map = null;
16012            }
16013            if (_this.exposeElement === void 0) {
16014              _this.exposeElement = null;
16015            }
16016            _this.map = new java2.util.HashMap(c.size());
16017            _this.addAll(c);
16018          } else if ((initialCapacity != null && initialCapacity instanceof java2.util.HashMap || initialCapacity === null) && loadFactor === void 0) {
16019            var __args = arguments;
16020            var map = __args[0];
16021            _this = _super.call(this) || this;
16022            if (_this.map === void 0) {
16023              _this.map = null;
16024            }
16025            if (_this.exposeElement === void 0) {
16026              _this.exposeElement = null;
16027            }
16028            _this.map = map;
16029          } else if ((typeof initialCapacity === "number" || initialCapacity === null) && loadFactor === void 0) {
16030            var __args = arguments;
16031            _this = _super.call(this) || this;
16032            if (_this.map === void 0) {
16033              _this.map = null;
16034            }
16035            if (_this.exposeElement === void 0) {
16036              _this.exposeElement = null;
16037            }
16038            _this.map = new java2.util.HashMap(initialCapacity);
16039          } else if (initialCapacity === void 0 && loadFactor === void 0) {
16040            var __args = arguments;
16041            _this = _super.call(this) || this;
16042            if (_this.map === void 0) {
16043              _this.map = null;
16044            }
16045            if (_this.exposeElement === void 0) {
16046              _this.exposeElement = null;
16047            }
16048            _this.map = new java2.util.HashMap();
16049          } else
16050            throw new Error("invalid overload");
16051          return _this;
16052        }
16053        HashSet2.prototype.add = function(o) {
16054          var old = this.map.put(o, this);
16055          return old == null;
16056        };
16057        HashSet2.prototype.clear = function() {
16058          this.map.clear();
16059        };
16060        HashSet2.prototype.clone = function() {
16061          return new HashSet2(this);
16062        };
16063        HashSet2.prototype.contains = function(o) {
16064          return this.map.containsKey(o);
16065        };
16066        HashSet2.prototype.isEmpty = function() {
16067          return this.map.isEmpty();
16068        };
16069        HashSet2.prototype.iterator = function() {
16070          return this.map.keySet().iterator();
16071        };
16072        HashSet2.prototype.remove = function(o) {
16073          return this.map.remove(o) != null;
16074        };
16075        HashSet2.prototype.size = function() {
16076          return this.map.size();
16077        };
16078        HashSet2.prototype.toString = function() {
16079          return this.map.keySet().toString();
16080        };
16081        return HashSet2;
16082      })(java2.util.AbstractSet)
16083    );
16084    util2.HashSet = HashSet;
16085    HashSet["__class"] = "java.util.HashSet";
16086    HashSet["__interfaces"] = ["java.lang.Cloneable", "java.util.Collection", "java.util.Set", "java.lang.Iterable", "java.io.Serializable"];
16087  })(util = java2.util || (java2.util = {}));
16088})(java || (java = {}));
16089(function(java2) {
16090  var util;
16091  (function(util2) {
16092    var EnumSet = (
16093      /** @class */
16094      (function(_super) {
16095        __extends(EnumSet2, _super);
16096        function EnumSet2() {
16097          return _super.call(this) || this;
16098        }
16099        EnumSet2.allOf = function(elementType) {
16100          var all = elementType.getEnumConstants();
16101          var set = javaemul.internal.ArrayHelper.clone(all, 0, all.length);
16102          return new EnumSet2.EnumSetImpl(all, set, all.length);
16103        };
16104        EnumSet2.complementOf = function(other) {
16105          var s = other;
16106          var all = s.all;
16107          var oldSet = s.set;
16108          var newSet = javaemul.internal.ArrayHelper.createFrom(oldSet, oldSet.length);
16109          for (var i = 0, c = oldSet.length; i < c; ++i) {
16110            {
16111              if (oldSet[i] == null) {
16112                newSet[i] = all[i];
16113              }
16114            }
16115            ;
16116          }
16117          return new EnumSet2.EnumSetImpl(all, newSet, all.length - s.__size);
16118        };
16119        EnumSet2.copyOf$java_util_Collection = function(c) {
16120          if (c != null && c instanceof java2.util.EnumSet) {
16121            return EnumSet2.copyOf$java_util_Collection(c);
16122          }
16123          javaemul.internal.InternalPreconditions.checkArgument(!c.isEmpty(), "Collection is empty");
16124          var iterator = c.iterator();
16125          var first = iterator.next();
16126          var set = EnumSet2.of(first);
16127          while (iterator.hasNext()) {
16128            {
16129              var e = iterator.next();
16130              set.add(e);
16131            }
16132          }
16133          ;
16134          return set;
16135        };
16136        EnumSet2.copyOf$java_util_EnumSet = function(s) {
16137          return (
16138            /* clone */
16139            (function(o) {
16140              if (o.clone != void 0) {
16141                return o.clone();
16142              } else {
16143                var clone = Object.create(o);
16144                for (var p in o) {
16145                  if (o.hasOwnProperty(p))
16146                    clone[p] = o[p];
16147                }
16148                return clone;
16149              }
16150            })(s)
16151          );
16152        };
16153        EnumSet2.copyOf = function(s) {
16154          if (s != null && s instanceof java2.util.EnumSet || s === null) {
16155            return java2.util.EnumSet.copyOf$java_util_EnumSet(s);
16156          } else if (s != null && (s.constructor != null && s.constructor["__interfaces"] != null && s.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || s === null) {
16157            return java2.util.EnumSet.copyOf$java_util_Collection(s);
16158          } else
16159            throw new Error("invalid overload");
16160        };
16161        EnumSet2.noneOf = function(elementType) {
16162          var all = elementType.getEnumConstants();
16163          return new EnumSet2.EnumSetImpl(all, javaemul.internal.ArrayHelper.createFrom(all, all.length), 0);
16164        };
16165        EnumSet2.ofOne = function(first) {
16166          var set = EnumSet2.noneOf(first.getDeclaringClass());
16167          set.add(first);
16168          return set;
16169        };
16170        EnumSet2.of = function(first) {
16171          var _a;
16172          var rest = [];
16173          for (var _i = 1; _i < arguments.length; _i++) {
16174            rest[_i - 1] = arguments[_i];
16175          }
16176          var set = EnumSet2.ofOne(first);
16177          (_a = java2.util.Collections).addAll.apply(_a, __spreadArrays([set], rest));
16178          return set;
16179        };
16180        EnumSet2.range = function(from, to) {
16181          javaemul.internal.InternalPreconditions.checkArgument(from.compareTo(to) <= 0, "%s > %s", from, to);
16182          var all = from.getDeclaringClass().getEnumConstants();
16183          var set = javaemul.internal.ArrayHelper.createFrom(all, all.length);
16184          var start = from.ordinal();
16185          var end = to.ordinal() + 1;
16186          for (var i = start; i < end; ++i) {
16187            {
16188              set[i] = all[i];
16189            }
16190            ;
16191          }
16192          return new EnumSet2.EnumSetImpl(all, set, end - start);
16193        };
16194        return EnumSet2;
16195      })(java2.util.AbstractSet)
16196    );
16197    util2.EnumSet = EnumSet;
16198    EnumSet["__class"] = "java.util.EnumSet";
16199    EnumSet["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable"];
16200    (function(EnumSet2) {
16201      var EnumSetImpl = (
16202        /** @class */
16203        (function(_super) {
16204          __extends(EnumSetImpl2, _super);
16205          function EnumSetImpl2(all, set, size) {
16206            var _this = _super.call(this) || this;
16207            if (_this.all === void 0) {
16208              _this.all = null;
16209            }
16210            if (_this.set === void 0) {
16211              _this.set = null;
16212            }
16213            if (_this.__size === void 0) {
16214              _this.__size = 0;
16215            }
16216            _this.all = all;
16217            _this.set = set;
16218            _this.__size = size;
16219            return _this;
16220          }
16221          EnumSetImpl2.prototype.add$java_lang_Enum = function(e) {
16222            javaemul.internal.InternalPreconditions.checkNotNull(e);
16223            var ordinal = e.ordinal();
16224            if (this.set[ordinal] == null) {
16225              this.set[ordinal] = e;
16226              ++this.__size;
16227              return true;
16228            }
16229            return false;
16230          };
16231          EnumSetImpl2.prototype.add = function(e) {
16232            if (e != null || e === null) {
16233              return this.add$java_lang_Enum(e);
16234            } else if (e != null || e === null) {
16235              return _super.prototype.add.call(this, e);
16236            } else
16237              throw new Error("invalid overload");
16238          };
16239          EnumSetImpl2.prototype.clone = function() {
16240            var clonedSet = javaemul.internal.ArrayHelper.clone(this.set, 0, this.set.length);
16241            return new EnumSet2.EnumSetImpl(this.all, clonedSet, this.__size);
16242          };
16243          EnumSetImpl2.prototype.contains = function(o) {
16244            return o != null && o instanceof java2.lang.Enum && this.containsEnum(o);
16245          };
16246          EnumSetImpl2.prototype.containsEnum = function(e) {
16247            return e != null && this.set[e.ordinal()] === e;
16248          };
16249          EnumSetImpl2.prototype.iterator = function() {
16250            return new EnumSetImpl2.IteratorImpl(this);
16251          };
16252          EnumSetImpl2.prototype.remove = function(o) {
16253            return o != null && o instanceof java2.lang.Enum && this.removeEnum(o);
16254          };
16255          EnumSetImpl2.prototype.removeEnum = function(e) {
16256            if (e != null && this.set[e.ordinal()] === e) {
16257              this.set[e.ordinal()] = null;
16258              --this.__size;
16259              return true;
16260            }
16261            return false;
16262          };
16263          EnumSetImpl2.prototype.size = function() {
16264            return this.__size;
16265          };
16266          EnumSetImpl2.prototype.capacity = function() {
16267            return this.all.length;
16268          };
16269          return EnumSetImpl2;
16270        })(java2.util.EnumSet)
16271      );
16272      EnumSet2.EnumSetImpl = EnumSetImpl;
16273      EnumSetImpl["__class"] = "java.util.EnumSet.EnumSetImpl";
16274      EnumSetImpl["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable"];
16275      (function(EnumSetImpl2) {
16276        var IteratorImpl = (
16277          /** @class */
16278          (function() {
16279            function IteratorImpl2(__parent) {
16280              this.__parent = __parent;
16281              this.i = -1;
16282              this.last = -1;
16283              this.findNext();
16284            }
16285            IteratorImpl2.prototype.forEachRemaining = function(consumer) {
16286              var _this = this;
16287              javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
16288                if (funcInst == null || typeof funcInst == "function") {
16289                  return funcInst;
16290                }
16291                return function(arg0) {
16292                  return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
16293                };
16294              })(consumer));
16295              while (this.hasNext()) {
16296                {
16297                  (function(target) {
16298                    return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
16299                  })(consumer);
16300                }
16301              }
16302              ;
16303            };
16304            IteratorImpl2.prototype.hasNext = function() {
16305              return this.i < this.__parent.capacity();
16306            };
16307            IteratorImpl2.prototype.next = function() {
16308              javaemul.internal.InternalPreconditions.checkElement(this.hasNext());
16309              this.last = this.i;
16310              this.findNext();
16311              return this.__parent.set[this.last];
16312            };
16313            IteratorImpl2.prototype.remove = function() {
16314              javaemul.internal.InternalPreconditions.checkState(this.last !== -1);
16315              this.__parent.set[this.last] = null;
16316              --this.__parent.__size;
16317              this.last = -1;
16318            };
16319            IteratorImpl2.prototype.findNext = function() {
16320              ++this.i;
16321              for (var c = this.__parent.capacity(); this.i < c; ++this.i) {
16322                {
16323                  if (this.__parent.set[this.i] != null) {
16324                    return;
16325                  }
16326                }
16327                ;
16328              }
16329            };
16330            return IteratorImpl2;
16331          })()
16332        );
16333        EnumSetImpl2.IteratorImpl = IteratorImpl;
16334        IteratorImpl["__class"] = "java.util.EnumSet.EnumSetImpl.IteratorImpl";
16335        IteratorImpl["__interfaces"] = ["java.util.Iterator"];
16336      })(EnumSetImpl = EnumSet2.EnumSetImpl || (EnumSet2.EnumSetImpl = {}));
16337    })(EnumSet = util2.EnumSet || (util2.EnumSet = {}));
16338  })(util = java2.util || (java2.util = {}));
16339})(java || (java = {}));
16340(function(java2) {
16341  var util;
16342  (function(util2) {
16343    var TreeSet = (
16344      /** @class */
16345      (function(_super) {
16346        __extends(TreeSet2, _super);
16347        function TreeSet2(c) {
16348          var _this = this;
16349          if (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || c === null) {
16350            var __args = arguments;
16351            {
16352              var __args_25 = arguments;
16353              _this = _super.call(this) || this;
16354              if (_this.map === void 0) {
16355                _this.map = null;
16356              }
16357              _this.map = new java2.util.TreeMap();
16358            }
16359            (function() {
16360              _this.addAll(c);
16361            })();
16362          } else if (typeof c === "function" && c.length === 2 || c === null) {
16363            var __args = arguments;
16364            _this = _super.call(this) || this;
16365            if (_this.map === void 0) {
16366              _this.map = null;
16367            }
16368            _this.map = new java2.util.TreeMap((function(funcInst) {
16369              if (funcInst == null || typeof funcInst == "function") {
16370                return funcInst;
16371              }
16372              return function(a, b) {
16373                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
16374              };
16375            })(c));
16376          } else if (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.SortedSet") >= 0) || c === null) {
16377            var __args = arguments;
16378            var s_1 = __args[0];
16379            {
16380              var __args_26 = arguments;
16381              var c_1 = javaemul.internal.InternalPreconditions.checkNotNull(s_1).comparator();
16382              _this = _super.call(this) || this;
16383              if (_this.map === void 0) {
16384                _this.map = null;
16385              }
16386              _this.map = new java2.util.TreeMap((function(funcInst) {
16387                if (funcInst == null || typeof funcInst == "function") {
16388                  return funcInst;
16389                }
16390                return function(a, b) {
16391                  return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
16392                };
16393              })(c_1));
16394            }
16395            (function() {
16396              _this.addAll(s_1);
16397            })();
16398          } else if (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.NavigableMap") >= 0) || c === null) {
16399            var __args = arguments;
16400            var map = __args[0];
16401            _this = _super.call(this) || this;
16402            if (_this.map === void 0) {
16403              _this.map = null;
16404            }
16405            _this.map = map;
16406          } else if (c === void 0) {
16407            var __args = arguments;
16408            _this = _super.call(this) || this;
16409            if (_this.map === void 0) {
16410              _this.map = null;
16411            }
16412            _this.map = new java2.util.TreeMap();
16413          } else
16414            throw new Error("invalid overload");
16415          return _this;
16416        }
16417        TreeSet2.prototype.add = function(o) {
16418          return this.map.put(o, javaemul.internal.BooleanHelper.FALSE) == null;
16419        };
16420        TreeSet2.prototype.ceiling = function(e) {
16421          return this.map.ceilingKey(e);
16422        };
16423        TreeSet2.prototype.clear = function() {
16424          this.map.clear();
16425        };
16426        TreeSet2.prototype.comparator = function() {
16427          return (function(funcInst) {
16428            if (funcInst == null || typeof funcInst == "function") {
16429              return funcInst;
16430            }
16431            return function(a, b) {
16432              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
16433            };
16434          })(this.map.comparator());
16435        };
16436        TreeSet2.prototype.contains = function(o) {
16437          return this.map.containsKey(o);
16438        };
16439        TreeSet2.prototype.descendingIterator = function() {
16440          return this.descendingSet().iterator();
16441        };
16442        TreeSet2.prototype.descendingSet = function() {
16443          return new TreeSet2(this.map.descendingMap());
16444        };
16445        TreeSet2.prototype.first = function() {
16446          return this.map.firstKey();
16447        };
16448        TreeSet2.prototype.floor = function(e) {
16449          return this.map.floorKey(e);
16450        };
16451        TreeSet2.prototype.headSet$java_lang_Object = function(toElement) {
16452          return this.headSet(toElement, false);
16453        };
16454        TreeSet2.prototype.headSet$java_lang_Object$boolean = function(toElement, inclusive) {
16455          return new TreeSet2(this.map.headMap(toElement, inclusive));
16456        };
16457        TreeSet2.prototype.headSet = function(toElement, inclusive) {
16458          if ((toElement != null || toElement === null) && (typeof inclusive === "boolean" || inclusive === null)) {
16459            return this.headSet$java_lang_Object$boolean(toElement, inclusive);
16460          } else if ((toElement != null || toElement === null) && inclusive === void 0) {
16461            return this.headSet$java_lang_Object(toElement);
16462          } else
16463            throw new Error("invalid overload");
16464        };
16465        TreeSet2.prototype.higher = function(e) {
16466          return this.map.higherKey(e);
16467        };
16468        TreeSet2.prototype.iterator = function() {
16469          return this.map.keySet().iterator();
16470        };
16471        TreeSet2.prototype.last = function() {
16472          return this.map.lastKey();
16473        };
16474        TreeSet2.prototype.lower = function(e) {
16475          return this.map.lowerKey(e);
16476        };
16477        TreeSet2.prototype.pollFirst = function() {
16478          return java2.util.AbstractMap.getEntryKeyOrNull(this.map.pollFirstEntry());
16479        };
16480        TreeSet2.prototype.pollLast = function() {
16481          return java2.util.AbstractMap.getEntryKeyOrNull(this.map.pollLastEntry());
16482        };
16483        TreeSet2.prototype.remove = function(o) {
16484          return this.map.remove(o) != null;
16485        };
16486        TreeSet2.prototype.size = function() {
16487          return this.map.size();
16488        };
16489        TreeSet2.prototype.subSet$java_lang_Object$boolean$java_lang_Object$boolean = function(fromElement, fromInclusive, toElement, toInclusive) {
16490          return new TreeSet2(this.map.subMap(fromElement, fromInclusive, toElement, toInclusive));
16491        };
16492        TreeSet2.prototype.subSet = function(fromElement, fromInclusive, toElement, toInclusive) {
16493          if ((fromElement != null || fromElement === null) && (typeof fromInclusive === "boolean" || fromInclusive === null) && (toElement != null || toElement === null) && (typeof toInclusive === "boolean" || toInclusive === null)) {
16494            return this.subSet$java_lang_Object$boolean$java_lang_Object$boolean(fromElement, fromInclusive, toElement, toInclusive);
16495          } else if ((fromElement != null || fromElement === null) && (fromInclusive != null || fromInclusive === null) && toElement === void 0 && toInclusive === void 0) {
16496            return this.subSet$java_lang_Object$java_lang_Object(fromElement, fromInclusive);
16497          } else
16498            throw new Error("invalid overload");
16499        };
16500        TreeSet2.prototype.subSet$java_lang_Object$java_lang_Object = function(fromElement, toElement) {
16501          return this.subSet(fromElement, true, toElement, false);
16502        };
16503        TreeSet2.prototype.tailSet$java_lang_Object = function(fromElement) {
16504          return this.tailSet(fromElement, true);
16505        };
16506        TreeSet2.prototype.tailSet$java_lang_Object$boolean = function(fromElement, inclusive) {
16507          return new TreeSet2(this.map.tailMap(fromElement, inclusive));
16508        };
16509        TreeSet2.prototype.tailSet = function(fromElement, inclusive) {
16510          if ((fromElement != null || fromElement === null) && (typeof inclusive === "boolean" || inclusive === null)) {
16511            return this.tailSet$java_lang_Object$boolean(fromElement, inclusive);
16512          } else if ((fromElement != null || fromElement === null) && inclusive === void 0) {
16513            return this.tailSet$java_lang_Object(fromElement);
16514          } else
16515            throw new Error("invalid overload");
16516        };
16517        return TreeSet2;
16518      })(java2.util.AbstractSet)
16519    );
16520    util2.TreeSet = TreeSet;
16521    TreeSet["__class"] = "java.util.TreeSet";
16522    TreeSet["__interfaces"] = ["java.util.SortedSet", "java.util.Collection", "java.util.Set", "java.util.NavigableSet", "java.lang.Iterable", "java.io.Serializable"];
16523  })(util = java2.util || (java2.util = {}));
16524})(java || (java = {}));
16525(function(java2) {
16526  var util;
16527  (function(util2) {
16528    var Vector = (
16529      /** @class */
16530      (function(_super) {
16531        __extends(Vector2, _super);
16532        function Vector2(initialCapacity, ignoredCapacityIncrement) {
16533          var _this = this;
16534          if ((typeof initialCapacity === "number" || initialCapacity === null) && (typeof ignoredCapacityIncrement === "number" || ignoredCapacityIncrement === null)) {
16535            var __args = arguments;
16536            {
16537              var __args_27 = arguments;
16538              _this = _super.call(this) || this;
16539              if (_this.arrayList === void 0) {
16540                _this.arrayList = null;
16541              }
16542              if (_this.exposeElement === void 0) {
16543                _this.exposeElement = null;
16544              }
16545              _this.arrayList = new java2.util.ArrayList(initialCapacity);
16546            }
16547          }
16547 else if ((initialCapacity != null && (initialCapacity.constructor != null && initialCapacity.constructor["__interfaces"] != null && initialCapacity.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || initialCapacity === null) && ignoredCapacityIncrement === void 0) {
16548            var __args = arguments;
16549            var c = __args[0];
16550            _this = _super.call(this) || this;
16551            if (_this.arrayList === void 0) {
16552              _this.arrayList = null;
16553            }
16554            if (_this.exposeElement === void 0) {
16555              _this.exposeElement = null;
16556            }
16557            _this.arrayList = new java2.util.ArrayList();
16558            _this.addAll$java_util_Collection(c);
16559          } else if ((typeof initialCapacity === "number" || initialCapacity === null) && ignoredCapacityIncrement === void 0) {
16560            var __args = arguments;
16561            _this = _super.call(this) || this;
16562            if (_this.arrayList === void 0) {
16563              _this.arrayList = null;
16564            }
16565            if (_this.exposeElement === void 0) {
16566              _this.exposeElement = null;
16567            }
16568            _this.arrayList = new java2.util.ArrayList(initialCapacity);
16569          } else if (initialCapacity === void 0 && ignoredCapacityIncrement === void 0) {
16570            var __args = arguments;
16571            _this = _super.call(this) || this;
16572            if (_this.arrayList === void 0) {
16573              _this.arrayList = null;
16574            }
16575            if (_this.exposeElement === void 0) {
16576              _this.exposeElement = null;
16577            }
16578            _this.arrayList = new java2.util.ArrayList();
16579          } else
16580            throw new Error("invalid overload");
16581          return _this;
16582        }
16583        Vector2.prototype.add$java_lang_Object = function(o) {
16584          return this.arrayList.add(o);
16585        };
16586        Vector2.prototype.add$int$java_lang_Object = function(index, o) {
16587          Vector2.checkArrayElementIndex(index, this.size() + 1);
16588          this.arrayList.add(index, o);
16589        };
16590        Vector2.prototype.add = function(index, o) {
16591          if ((typeof index === "number" || index === null) && (o != null || o === null)) {
16592            return this.add$int$java_lang_Object(index, o);
16593          } else if ((index != null || index === null) && o === void 0) {
16594            return this.add$java_lang_Object(index);
16595          } else
16596            throw new Error("invalid overload");
16597        };
16598        Vector2.prototype.addAll$java_util_Collection = function(c) {
16599          return this.arrayList.addAll$java_util_Collection(c);
16600        };
16601        Vector2.prototype.addAll$int$java_util_Collection = function(index, c) {
16602          return this.arrayList.addAll$int$java_util_Collection(index, c);
16603        };
16604        Vector2.prototype.addAll = function(index, c) {
16605          if ((typeof index === "number" || index === null) && (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || c === null)) {
16606            return this.addAll$int$java_util_Collection(index, c);
16607          } else if ((index != null && (index.constructor != null && index.constructor["__interfaces"] != null && index.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || index === null) && c === void 0) {
16608            return this.addAll$java_util_Collection(index);
16609          } else
16610            throw new Error("invalid overload");
16611        };
16612        Vector2.prototype.addElement = function(o) {
16613          this.add(o);
16614        };
16615        Vector2.prototype.capacity = function() {
16616          return this.arrayList.size();
16617        };
16618        Vector2.prototype.clear = function() {
16619          this.arrayList.clear();
16620        };
16621        Vector2.prototype.clone = function() {
16622          return new Vector2(this);
16623        };
16624        Vector2.prototype.contains = function(elem) {
16625          return this.arrayList.contains(elem);
16626        };
16627        Vector2.prototype.containsAll = function(c) {
16628          return this.arrayList.containsAll(c);
16629        };
16630        Vector2.prototype.copyInto = function(objs) {
16631          var i = -1;
16632          var n = this.size();
16633          while (++i < n) {
16634            {
16635              objs[i] = this.get(i);
16636            }
16637          }
16638          ;
16639        };
16640        Vector2.prototype.elementAt = function(index) {
16641          return this.get(index);
16642        };
16643        Vector2.prototype.elements = function() {
16644          return java2.util.Collections.enumeration(this.arrayList);
16645        };
16646        Vector2.prototype.ensureCapacity = function(capacity) {
16647          this.arrayList.ensureCapacity(capacity);
16648        };
16649        Vector2.prototype.firstElement = function() {
16650          javaemul.internal.InternalPreconditions.checkElement(!this.isEmpty());
16651          return this.get(0);
16652        };
16653        Vector2.prototype.get = function(index) {
16654          Vector2.checkArrayElementIndex(index, this.size());
16655          return this.arrayList.get(index);
16656        };
16657        Vector2.prototype.indexOf$java_lang_Object = function(elem) {
16658          return this.arrayList.indexOf$java_lang_Object(elem);
16659        };
16660        Vector2.prototype.indexOf$java_lang_Object$int = function(elem, index) {
16661          Vector2.checkArrayIndexOutOfBounds(index >= 0, index);
16662          return this.arrayList.indexOf$java_lang_Object$int(elem, index);
16663        };
16664        Vector2.prototype.indexOf = function(elem, index) {
16665          if ((elem != null || elem === null) && (typeof index === "number" || index === null)) {
16666            return this.indexOf$java_lang_Object$int(elem, index);
16667          } else if ((elem != null || elem === null) && index === void 0) {
16668            return this.indexOf$java_lang_Object(elem);
16669          } else
16670            throw new Error("invalid overload");
16671        };
16672        Vector2.prototype.insertElementAt = function(o, index) {
16673          this.add(index, o);
16674        };
16675        Vector2.prototype.isEmpty = function() {
16676          return this.arrayList.size() === 0;
16677        };
16678        Vector2.prototype.iterator = function() {
16679          return this.arrayList.iterator();
16680        };
16681        Vector2.prototype.lastElement = function() {
16682          javaemul.internal.InternalPreconditions.checkElement(!this.isEmpty());
16683          return this.get(this.size() - 1);
16684        };
16685        Vector2.prototype.lastIndexOf$java_lang_Object = function(o) {
16686          return this.arrayList.lastIndexOf$java_lang_Object(o);
16687        };
16688        Vector2.prototype.lastIndexOf$java_lang_Object$int = function(o, index) {
16689          Vector2.checkArrayIndexOutOfBounds(index < this.size(), index);
16690          return this.arrayList.lastIndexOf$java_lang_Object$int(o, index);
16691        };
16692        Vector2.prototype.lastIndexOf = function(o, index) {
16693          if ((o != null || o === null) && (typeof index === "number" || index === null)) {
16694            return this.lastIndexOf$java_lang_Object$int(o, index);
16695          } else if ((o != null || o === null) && index === void 0) {
16696            return this.lastIndexOf$java_lang_Object(o);
16697          } else
16698            throw new Error("invalid overload");
16699        };
16700        Vector2.prototype.remove$int = function(index) {
16701          Vector2.checkArrayElementIndex(index, this.size());
16702          return this.arrayList.remove$int(index);
16703        };
16704        Vector2.prototype.remove = function(index) {
16705          if (typeof index === "number" || index === null) {
16706            return this.remove$int(index);
16707          } else if (index != null || index === null) {
16708            return _super.prototype.remove.call(this, index);
16709          } else
16710            throw new Error("invalid overload");
16711        };
16712        Vector2.prototype.removeAll = function(c) {
16713          return this.arrayList.removeAll(c);
16714        };
16715        Vector2.prototype.removeAllElements = function() {
16716          this.clear();
16717        };
16718        Vector2.prototype.removeElement = function(o) {
16719          return this.remove(o);
16720        };
16721        Vector2.prototype.removeElementAt = function(index) {
16722          this.remove$int(index);
16723        };
16724        Vector2.prototype.set = function(index, elem) {
16725          Vector2.checkArrayElementIndex(index, this.size());
16726          return this.arrayList.set(index, elem);
16727        };
16728        Vector2.prototype.setElementAt = function(o, index) {
16729          this.set(index, o);
16730        };
16731        Vector2.prototype.setSize = function(size) {
16732          Vector2.checkArrayIndexOutOfBounds(size >= 0, size);
16733          this.arrayList.setSize(size);
16734        };
16735        Vector2.prototype.size = function() {
16736          return this.arrayList.size();
16737        };
16738        Vector2.prototype.subList = function(fromIndex, toIndex) {
16739          return this.arrayList.subList(fromIndex, toIndex);
16740        };
16741        Vector2.prototype.toArray$ = function() {
16742          return this.arrayList.toArray$();
16743        };
16744        Vector2.prototype.toArray$java_lang_Object_A = function(a) {
16745          return this.arrayList.toArray$java_lang_Object_A(a);
16746        };
16747        Vector2.prototype.toArray = function(a) {
16748          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || a[0] != null) || a === null) {
16749            return this.toArray$java_lang_Object_A(a);
16750          } else if (a === void 0) {
16751            return this.toArray$();
16752          } else
16753            throw new Error("invalid overload");
16754        };
16755        Vector2.prototype.toString = function() {
16756          return this.arrayList.toString();
16757        };
16758        Vector2.prototype.trimToSize = function() {
16759          this.arrayList.trimToSize();
16760        };
16761        Vector2.prototype.removeRange = function(fromIndex, endIndex) {
16762          this.arrayList.removeRange(fromIndex, endIndex);
16763        };
16764        Vector2.checkArrayElementIndex = function(index, size) {
16765          if (index < 0 || index >= size) {
16766            throw new java2.lang.ArrayIndexOutOfBoundsException();
16767          }
16768        };
16769        Vector2.checkArrayIndexOutOfBounds = function(expression, index) {
16770          if (!expression) {
16771            throw new java2.lang.ArrayIndexOutOfBoundsException(
16772              /* valueOf */
16773              String(index).toString()
16774            );
16775          }
16776        };
16777        return Vector2;
16778      })(java2.util.AbstractList)
16779    );
16780    util2.Vector = Vector;
16781    Vector["__class"] = "java.util.Vector";
16782    Vector["__interfaces"] = ["java.util.RandomAccess", "java.util.List", "java.lang.Cloneable", "java.util.Collection", "java.lang.Iterable", "java.io.Serializable"];
16783  })(util = java2.util || (java2.util = {}));
16784})(java || (java = {}));
16785(function(java2) {
16786  var util;
16787  (function(util2) {
16788    var AbstractSequentialList = (
16789      /** @class */
16790      (function(_super) {
16791        __extends(AbstractSequentialList2, _super);
16792        function AbstractSequentialList2() {
16793          return _super.call(this) || this;
16794        }
16795        AbstractSequentialList2.prototype.add$int$java_lang_Object = function(index, element) {
16796          var iter = this.listIterator$int(index);
16797          iter.add(element);
16798        };
16799        AbstractSequentialList2.prototype.add = function(index, element) {
16800          if ((typeof index === "number" || index === null) && (element != null || element === null)) {
16801            return this.add$int$java_lang_Object(index, element);
16802          } else if ((index != null || index === null) && element === void 0) {
16803            return this.add$java_lang_Object(index);
16804          } else
16805            throw new Error("invalid overload");
16806        };
16807        AbstractSequentialList2.prototype.addAll$int$java_util_Collection = function(index, c) {
16808          javaemul.internal.InternalPreconditions.checkNotNull(c);
16809          var modified = false;
16810          var iter = this.listIterator$int(index);
16811          for (var index1 = c.iterator(); index1.hasNext(); ) {
16812            var e = index1.next();
16813            {
16814              iter.add(e);
16815              modified = true;
16816            }
16817          }
16818          return modified;
16819        };
16820        AbstractSequentialList2.prototype.addAll = function(index, c) {
16821          if ((typeof index === "number" || index === null) && (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || c === null)) {
16822            return this.addAll$int$java_util_Collection(index, c);
16823          } else if ((index != null && (index.constructor != null && index.constructor["__interfaces"] != null && index.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || index === null) && c === void 0) {
16824            return _super.prototype.addAll.call(this, index);
16825          } else
16826            throw new Error("invalid overload");
16827        };
16828        AbstractSequentialList2.prototype.get = function(index) {
16829          var iter = this.listIterator$int(index);
16830          try {
16831            return iter.next();
16832          } catch (e) {
16833            throw new java2.lang.IndexOutOfBoundsException("Can't get element " + index);
16834          }
16835        };
16836        AbstractSequentialList2.prototype.iterator = function() {
16837          return this.listIterator$();
16838        };
16839        AbstractSequentialList2.prototype.listIterator$int = function(index) {
16840          throw new Error("cannot invoke abstract overloaded method... check your argument(s) type(s)");
16841        };
16842        AbstractSequentialList2.prototype.listIterator = function(index) {
16843          if (typeof index === "number" || index === null) {
16844            return this.listIterator$int(index);
16845          } else if (index === void 0) {
16846            return this.listIterator$();
16847          } else
16848            throw new Error("invalid overload");
16849        };
16850        AbstractSequentialList2.prototype.remove$int = function(index) {
16851          var iter = this.listIterator$int(index);
16852          try {
16853            var old = iter.next();
16854            iter.remove();
16855            return old;
16856          } catch (e) {
16857            throw new java2.lang.IndexOutOfBoundsException("Can't remove element " + index);
16858          }
16859        };
16860        AbstractSequentialList2.prototype.remove = function(index) {
16861          if (typeof index === "number" || index === null) {
16862            return this.remove$int(index);
16863          } else if (index != null || index === null) {
16864            return _super.prototype.remove.call(this, index);
16865          } else
16866            throw new Error("invalid overload");
16867        };
16868        AbstractSequentialList2.prototype.set = function(index, element) {
16869          var iter = this.listIterator$int(index);
16870          try {
16871            var old = iter.next();
16872            iter.set(element);
16873            return old;
16874          } catch (e) {
16875            throw new java2.lang.IndexOutOfBoundsException("Can't set element " + index);
16876          }
16877        };
16878        return AbstractSequentialList2;
16879      })(java2.util.AbstractList)
16880    );
16881    util2.AbstractSequentialList = AbstractSequentialList;
16882    AbstractSequentialList["__class"] = "java.util.AbstractSequentialList";
16883    AbstractSequentialList["__interfaces"] = ["java.util.List", "java.util.Collection", "java.lang.Iterable"];
16884  })(util = java2.util || (java2.util = {}));
16885})(java || (java = {}));
16886(function(java2) {
16887  var util;
16888  (function(util2) {
16889    var ArrayList = (
16890      /** @class */
16891      (function(_super) {
16892        __extends(ArrayList2, _super);
16893        function ArrayList2(c) {
16894          var _this = this;
16895          if (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || c === null) {
16896            var __args = arguments;
16897            _this = _super.call(this) || this;
16898            if (_this.array === void 0) {
16899              _this.array = null;
16900            }
16901            if (_this.exposeElement === void 0) {
16902              _this.exposeElement = null;
16903            }
16904            _this.array = [];
16905            javaemul.internal.ArrayHelper.insertValuesToArray(_this.array, 0, c["toArray$"]());
16906          } else if (typeof c === "number" || c === null) {
16907            var __args = arguments;
16908            var initialCapacity = __args[0];
16909            _this = _super.call(this) || this;
16910            if (_this.array === void 0) {
16911              _this.array = null;
16912            }
16913            if (_this.exposeElement === void 0) {
16914              _this.exposeElement = null;
16915            }
16916            javaemul.internal.InternalPreconditions.checkArgument(initialCapacity >= 0, "Initial capacity must not be negative");
16917            _this.array = [];
16918          } else if (c === void 0) {
16919            var __args = arguments;
16920            _this = _super.call(this) || this;
16921            if (_this.array === void 0) {
16922              _this.array = null;
16923            }
16924            if (_this.exposeElement === void 0) {
16925              _this.exposeElement = null;
16926            }
16927            _this.array = [];
16928          } else
16929            throw new Error("invalid overload");
16930          return _this;
16931        }
16932        ArrayList2.prototype.add$java_lang_Object = function(o) {
16933          this.array[this.array.length] = o;
16934          return true;
16935        };
16936        ArrayList2.prototype.add$int$java_lang_Object = function(index, o) {
16937          javaemul.internal.InternalPreconditions.checkPositionIndex(index, this.array.length);
16938          javaemul.internal.ArrayHelper.insertTo$java_lang_Object$int$java_lang_Object(this.array, index, o);
16939        };
16940        ArrayList2.prototype.add = function(index, o) {
16941          if ((typeof index === "number" || index === null) && (o != null || o === null)) {
16942            return this.add$int$java_lang_Object(index, o);
16943          } else if ((index != null || index === null) && o === void 0) {
16944            return this.add$java_lang_Object(index);
16945          } else
16946            throw new Error("invalid overload");
16947        };
16948        ArrayList2.prototype.addAll$java_util_Collection = function(c) {
16949          var cArray = c["toArray$"]();
16950          var len = cArray.length;
16951          if (len === 0) {
16952            return false;
16953          }
16954          javaemul.internal.ArrayHelper.insertValuesToArray(this.array, this.array.length, cArray);
16955          return true;
16956        };
16957        ArrayList2.prototype.addAll$int$java_util_Collection = function(index, c) {
16958          javaemul.internal.InternalPreconditions.checkPositionIndex(index, this.array.length);
16959          var cArray = c["toArray$"]();
16960          var len = cArray.length;
16961          if (len === 0) {
16962            return false;
16963          }
16964          javaemul.internal.ArrayHelper.insertValuesToArray(this.array, index, cArray);
16965          return true;
16966        };
16967        ArrayList2.prototype.addAll = function(index, c) {
16968          if ((typeof index === "number" || index === null) && (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || c === null)) {
16969            return this.addAll$int$java_util_Collection(index, c);
16970          } else if ((index != null && (index.constructor != null && index.constructor["__interfaces"] != null && index.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || index === null) && c === void 0) {
16971            return this.addAll$java_util_Collection(index);
16972          } else
16973            throw new Error("invalid overload");
16974        };
16975        ArrayList2.prototype.clear = function() {
16976          this.array = [];
16977        };
16978        ArrayList2.prototype.clone = function() {
16979          return new ArrayList2(this);
16980        };
16981        ArrayList2.prototype.contains = function(o) {
16982          return this.indexOf$java_lang_Object(o) !== -1;
16983        };
16984        ArrayList2.prototype.ensureCapacity = function(ignored) {
16985        };
16986        ArrayList2.prototype.get = function(index) {
16987          javaemul.internal.InternalPreconditions.checkElementIndex(index, this.array.length);
16988          return this.array[index];
16989        };
16990        ArrayList2.prototype.indexOf$java_lang_Object = function(o) {
16991          return this.indexOf$java_lang_Object$int(o, 0);
16992        };
16993        ArrayList2.prototype.iterator = function() {
16994          return new ArrayList2.ArrayList$0(this);
16995        };
16996        ArrayList2.prototype.isEmpty = function() {
16997          return this.array.length === 0;
16998        };
16999        ArrayList2.prototype.lastIndexOf$java_lang_Object = function(o) {
17000          return this.lastIndexOf$java_lang_Object$int(o, this.size() - 1);
17001        };
17002        ArrayList2.prototype.remove$int = function(index) {
17003          var previous = this.get(index);
17004          javaemul.internal.ArrayHelper.removeFrom(this.array, index, 1);
17005          return previous;
17006        };
17007        ArrayList2.prototype.remove = function(index) {
17008          if (typeof index === "number" || index === null) {
17009            return this.remove$int(index);
17010          } else if (index != null || index === null) {
17011            return this.remove$java_lang_Object(index);
17012          } else
17013            throw new Error("invalid overload");
17014        };
17015        ArrayList2.prototype.remove$java_lang_Object = function(o) {
17016          var i = this.indexOf$java_lang_Object(o);
17017          if (i === -1) {
17018            return false;
17019          }
17020          this.remove$int(i);
17021          return true;
17022        };
17023        ArrayList2.prototype.set = function(index, o) {
17024          var previous = this.get(index);
17025          this.array[index] = o;
17026          return previous;
17027        };
17028        ArrayList2.prototype.size = function() {
17029          return this.array.length;
17030        };
17031        ArrayList2.prototype.toArray$ = function() {
17032          return javaemul.internal.ArrayHelper.clone(this.array, 0, this.array.length);
17033        };
17034        ArrayList2.prototype.toArray$java_lang_Object_A = function(out) {
17035          var size = this.array.length;
17036          if (out.length < size) {
17037            out = javaemul.internal.ArrayHelper.createFrom(out, size);
17038          }
17039          for (var i = 0; i < size; ++i) {
17040            {
17041              out[i] = this.array[i];
17042            }
17043            ;
17044          }
17045          if (out.length > size) {
17046            out[size] = null;
17047          }
17048          return out;
17049        };
17050        ArrayList2.prototype.toArray = function(out) {
17051          if (out != null && out instanceof Array && (out.length == 0 || out[0] == null || out[0] != null) || out === null) {
17052            return this.toArray$java_lang_Object_A(out);
17053          } else if (out === void 0) {
17054            return this.toArray$();
17055          } else
17056            throw new Error("invalid overload");
17057        };
17058        ArrayList2.prototype.trimToSize = function() {
17059        };
17060        ArrayList2.prototype.removeRange = function(fromIndex, endIndex) {
17061          javaemul.internal.InternalPreconditions.checkPositionIndexes(fromIndex, endIndex, this.array.length);
17062          var count = endIndex - fromIndex;
17063          javaemul.internal.ArrayHelper.removeFrom(this.array, fromIndex, count);
17064        };
17065        ArrayList2.prototype.indexOf$java_lang_Object$int = function(o, index) {
17066          for (; index < this.array.length; ++index) {
17067            {
17068              if (java2.util.Objects.equals(o, this.array[index])) {
17069                return index;
17070              }
17071            }
17072            ;
17073          }
17074          return -1;
17075        };
17076        ArrayList2.prototype.indexOf = function(o, index) {
17077          if ((o != null || o === null) && (typeof index === "number" || index === null)) {
17078            return this.indexOf$java_lang_Object$int(o, index);
17079          } else if ((o != null || o === null) && index === void 0) {
17080            return this.indexOf$java_lang_Object(o);
17081          } else
17082            throw new Error("invalid overload");
17083        };
17084        ArrayList2.prototype.lastIndexOf$java_lang_Object$int = function(o, index) {
17085          for (; index >= 0; --index) {
17086            {
17087              if (java2.util.Objects.equals(o, this.array[index])) {
17088                return index;
17089              }
17090            }
17091            ;
17092          }
17093          return -1;
17094        };
17095        ArrayList2.prototype.lastIndexOf = function(o, index) {
17096          if ((o != null || o === null) && (typeof index === "number" || index === null)) {
17097            return this.lastIndexOf$java_lang_Object$int(o, index);
17098          } else if ((o != null || o === null) && index === void 0) {
17099            return this.lastIndexOf$java_lang_Object(o);
17100          } else
17101            throw new Error("invalid overload");
17102        };
17103        ArrayList2.prototype.setSize = function(newSize) {
17104          javaemul.internal.ArrayHelper.setLength(this.array, newSize);
17105        };
17106        return ArrayList2;
17107      })(java2.util.AbstractList)
17108    );
17109    util2.ArrayList = ArrayList;
17110    ArrayList["__class"] = "java.util.ArrayList";
17111    ArrayList["__interfaces"] = ["java.util.RandomAccess", "java.util.List", "java.lang.Cloneable", "java.util.Collection", "java.lang.Iterable", "java.io.Serializable"];
17112    (function(ArrayList2) {
17113      var ArrayList$0 = (
17114        /** @class */
17115        (function() {
17116          function ArrayList$02(__parent) {
17117            this.__parent = __parent;
17118            this.i = 0;
17119            this.last = -1;
17120          }
17121          ArrayList$02.prototype.forEachRemaining = function(consumer) {
17122            var _this = this;
17123            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
17124              if (funcInst == null || typeof funcInst == "function") {
17125                return funcInst;
17126              }
17127              return function(arg0) {
17128                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
17129              };
17130            })(consumer));
17131            while (this.hasNext()) {
17132              {
17133                (function(target) {
17134                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
17135                })(consumer);
17136              }
17137            }
17138            ;
17139          };
17140          ArrayList$02.prototype.hasNext = function() {
17141            return this.i < this.__parent.array.length;
17142          };
17143          ArrayList$02.prototype.next = function() {
17144            javaemul.internal.InternalPreconditions.checkElement(this.hasNext());
17145            this.last = this.i++;
17146            return this.__parent.array[this.last];
17147          };
17148          ArrayList$02.prototype.remove = function() {
17149            javaemul.internal.InternalPreconditions.checkState(this.last !== -1);
17150            this.__parent.remove$int(this.i = this.last);
17151            this.last = -1;
17152          };
17153          return ArrayList$02;
17154        })()
17155      );
17156      ArrayList2.ArrayList$0 = ArrayList$0;
17157      ArrayList$0["__interfaces"] = ["java.util.Iterator"];
17158    })(ArrayList = util2.ArrayList || (util2.ArrayList = {}));
17159  })(util = java2.util || (java2.util = {}));
17160})(java || (java = {}));
17161(function(java2) {
17162  var util;
17163  (function(util2) {
17164    var Arrays = (
17165      /** @class */
17166      (function() {
17167        function Arrays2() {
17168        }
17169        Arrays2.asList = function() {
17170          var array = [];
17171          for (var _i = 0; _i < arguments.length; _i++) {
17172            array[_i] = arguments[_i];
17173          }
17174          if (array.length === 1 && Array.isArray(array[0])) {
17175            array = array[0];
17176          }
17177          return new Arrays2.ArrayList(array);
17178        };
17179        Arrays2.stream = function() {
17180          var array = [];
17181          for (var _i = 0; _i < arguments.length; _i++) {
17182            array[_i] = arguments[_i];
17183          }
17184          return Arrays2.asList.apply(this, array).stream();
17185        };
17186        Arrays2.binarySearch$byte_A$byte = function(sortedArray, key) {
17187          var low = 0;
17188          var high = sortedArray.length - 1;
17189          while (low <= high) {
17190            {
17191              var mid = low + (high - low >> 1);
17192              var midVal = sortedArray[mid];
17193              if (midVal < key) {
17194                low = mid + 1;
17195              } else if (midVal > key) {
17196                high = mid - 1;
17197              } else {
17198                return mid;
17199              }
17200            }
17201          }
17202          ;
17203          return -low - 1;
17204        };
17205        Arrays2.binarySearch$char_A$char = function(a, key) {
17206          var low = 0;
17207          var high = a.length - 1;
17208          while (low <= high) {
17209            {
17210              var mid = low + (high - low >> 1);
17211              var midVal = a[mid];
17212              if ((function(c) {
17213                return c.charCodeAt == null ? c : c.charCodeAt(0);
17214              })(midVal) < (function(c) {
17215                return c.charCodeAt == null ? c : c.charCodeAt(0);
17216              })(key)) {
17217                low = mid + 1;
17218              } else if ((function(c) {
17219                return c.charCodeAt == null ? c : c.charCodeAt(0);
17220              })(midVal) > (function(c) {
17221                return c.charCodeAt == null ? c : c.charCodeAt(0);
17222              })(key)) {
17223                high = mid - 1;
17224              } else {
17225                return mid;
17226              }
17227            }
17228          }
17229          ;
17230          return -low - 1;
17231        };
17232        Arrays2.binarySearch$double_A$double = function(sortedArray, key) {
17233          var low = 0;
17234          var high = sortedArray.length - 1;
17235          while (low <= high) {
17236            {
17237              var mid = low + (high - low >> 1);
17238              var midVal = sortedArray[mid];
17239              if (midVal < key) {
17240                low = mid + 1;
17241              } else if (midVal > key) {
17242                high = mid - 1;
17243              } else {
17244                return mid;
17245              }
17246            }
17247          }
17248          ;
17249          return -low - 1;
17250        };
17251        Arrays2.binarySearch$float_A$float = function(sortedArray, key) {
17252          var low = 0;
17253          var high = sortedArray.length - 1;
17254          while (low <= high) {
17255            {
17256              var mid = low + (high - low >> 1);
17257              var midVal = sortedArray[mid];
17258              if (midVal < key) {
17259                low = mid + 1;
17260              } else if (midVal > key) {
17261                high = mid - 1;
17262              } else {
17263                return mid;
17264              }
17265            }
17266          }
17267          ;
17268          return -low - 1;
17269        };
17270        Arrays2.binarySearch$int_A$int = function(sortedArray, key) {
17271          var low = 0;
17272          var high = sortedArray.length - 1;
17273          while (low <= high) {
17274            {
17275              var mid = low + (high - low >> 1);
17276              var midVal = sortedArray[mid];
17277              if (midVal < key) {
17278                low = mid + 1;
17279              } else if (midVal > key) {
17280                high = mid - 1;
17281              } else {
17282                return mid;
17283              }
17284            }
17285          }
17286          ;
17287          return -low - 1;
17288        };
17289        Arrays2.binarySearch$long_A$long = function(sortedArray, key) {
17290          var low = 0;
17291          var high = sortedArray.length - 1;
17292          while (low <= high) {
17293            {
17294              var mid = low + (high - low >> 1);
17295              var midVal = sortedArray[mid];
17296              if (midVal < key) {
17297                low = mid + 1;
17298              } else if (midVal > key) {
17299                high = mid - 1;
17300              } else {
17301                return mid;
17302              }
17303            }
17304          }
17305          ;
17306          return -low - 1;
17307        };
17308        Arrays2.binarySearch$java_lang_Object_A$java_lang_Object = function(sortedArray, key) {
17309          return Arrays2.binarySearch(sortedArray, key, (function(funcInst) {
17310            if (funcInst == null || typeof funcInst == "function") {
17311              return funcInst;
17312            }
17313            return function(a, b) {
17314              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
17315            };
17316          })(java2.util.Comparators.natural()));
17317        };
17318        Arrays2.binarySearch$short_A$short = function(sortedArray, key) {
17319          var low = 0;
17320          var high = sortedArray.length - 1;
17321          while (low <= high) {
17322            {
17323              var mid = low + (high - low >> 1);
17324              var midVal = sortedArray[mid];
17325              if (midVal < key) {
17326                low = mid + 1;
17327              } else if (midVal > key) {
17328                high = mid - 1;
17329              } else {
17330                return mid;
17331              }
17332            }
17333          }
17334          ;
17335          return -low - 1;
17336        };
17337        Arrays2.binarySearch$java_lang_Object_A$java_lang_Object$java_util_Comparator = function(sortedArray, key, comparator) {
17338          if (comparator == null) {
17339            comparator = (function(funcInst) {
17340              if (funcInst == null || typeof funcInst == "function") {
17341                return funcInst;
17342              }
17343              return function(a, b) {
17344                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
17345              };
17346            })(java2.util.Comparators.natural());
17347          }
17348          var low = 0;
17349          var high = sortedArray.length - 1;
17350          while (low <= high) {
17351            {
17352              var mid = low + (high - low >> 1);
17353              var midVal = sortedArray[mid];
17354              var compareResult = comparator(midVal, key);
17355              if (compareResult < 0) {
17356                low = mid + 1;
17357              } else if (compareResult > 0) {
17358                high = mid - 1;
17359              } else {
17360                return mid;
17361              }
17362            }
17363          }
17364          ;
17365          return -low - 1;
17366        };
17367        Arrays2.binarySearch = function(sortedArray, key, comparator) {
17368          if ((sortedArray != null && sortedArray instanceof Array && (sortedArray.length == 0 || sortedArray[0] == null || sortedArray[0] != null) || sortedArray === null) && (key != null || 
17368key === null) && (typeof comparator === "function" && comparator.length === 2 || comparator === null)) {
17369            return java2.util.Arrays.binarySearch$java_lang_Object_A$java_lang_Object$java_util_Comparator(sortedArray, key, comparator);
17370          } else if ((sortedArray != null && sortedArray instanceof Array && (sortedArray.length == 0 || sortedArray[0] == null || typeof sortedArray[0] === "number") || sortedArray === null) && (typeof key === "number" || key === null) && comparator === void 0) {
17371            return java2.util.Arrays.binarySearch$byte_A$byte(sortedArray, key);
17372          } else if ((sortedArray != null && sortedArray instanceof Array && (sortedArray.length == 0 || sortedArray[0] == null || typeof sortedArray[0] === "string") || sortedArray === null) && (typeof key === "string" || key === null) && comparator === void 0) {
17373            return java2.util.Arrays.binarySearch$char_A$char(sortedArray, key);
17374          } else if ((sortedArray != null && sortedArray instanceof Array && (sortedArray.length == 0 || sortedArray[0] == null || typeof sortedArray[0] === "number") || sortedArray === null) && (typeof key === "number" || key === null) && comparator === void 0) {
17375            return java2.util.Arrays.binarySearch$short_A$short(sortedArray, key);
17376          } else if ((sortedArray != null && sortedArray instanceof Array && (sortedArray.length == 0 || sortedArray[0] == null || typeof sortedArray[0] === "number") || sortedArray === null) && (typeof key === "number" || key === null) && comparator === void 0) {
17377            return java2.util.Arrays.binarySearch$int_A$int(sortedArray, key);
17378          } else if ((sortedArray != null && sortedArray instanceof Array && (sortedArray.length == 0 || sortedArray[0] == null || typeof sortedArray[0] === "number") || sortedArray === null) && (typeof key === "number" || key === null) && comparator === void 0) {
17379            return java2.util.Arrays.binarySearch$long_A$long(sortedArray, key);
17380          } else if ((sortedArray != null && sortedArray instanceof Array && (sortedArray.length == 0 || sortedArray[0] == null || typeof sortedArray[0] === "number") || sortedArray === null) && (typeof key === "number" || key === null) && comparator === void 0) {
17381            return java2.util.Arrays.binarySearch$float_A$float(sortedArray, key);
17382          } else if ((sortedArray != null && sortedArray instanceof Array && (sortedArray.length == 0 || sortedArray[0] == null || typeof sortedArray[0] === "number") || sortedArray === null) && (typeof key === "number" || key === null) && comparator === void 0) {
17383            return java2.util.Arrays.binarySearch$double_A$double(sortedArray, key);
17384          } else if ((sortedArray != null && sortedArray instanceof Array && (sortedArray.length == 0 || sortedArray[0] == null || sortedArray[0] != null) || sortedArray === null) && (key != null || key === null) && comparator === void 0) {
17385            return java2.util.Arrays.binarySearch$java_lang_Object_A$java_lang_Object(sortedArray, key);
17386          } else
17387            throw new Error("invalid overload");
17388        };
17389        Arrays2.copyOf$boolean_A$int = function(original, newLength) {
17390          javaemul.internal.InternalPreconditions.checkArraySize(newLength);
17391          return Arrays2.copyOfRange$boolean_A$int$int(original, 0, newLength);
17392        };
17393        Arrays2.copyOf = function(original, newLength) {
17394          if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "boolean") || original === null) && (typeof newLength === "number" || newLength === null)) {
17395            return java2.util.Arrays.copyOf$boolean_A$int(original, newLength);
17396          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "number") || original === null) && (typeof newLength === "number" || newLength === null)) {
17397            return java2.util.Arrays.copyOf$byte_A$int(original, newLength);
17398          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "string") || original === null) && (typeof newLength === "number" || newLength === null)) {
17399            return java2.util.Arrays.copyOf$char_A$int(original, newLength);
17400          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "
17400number") || original === null) && (typeof newLength === "number" || newLength === null)) {
17401            return java2.util.Arrays.copyOf$double_A$int(original, newLength);
17402          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "number") || original === null) && (typeof newLength === "number" || newLength === null)) {
17403            return java2.util.Arrays.copyOf$float_A$int(original, newLength);
17404          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "number") || original === null) && (typeof newLength === "number" || newLength === null)) {
17405            return java2.util.Arrays.copyOf$int_A$int(original, newLength);
17406          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "number") || original === null) && (typeof newLength === "number" || newLength === null)) {
17407            return java2.util.Arrays.copyOf$long_A$int(original, newLength);
17408          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "number") || original === null) && (typeof newLength === "number" || newLength === null)) {
17409            return java2.util.Arrays.copyOf$short_A$int(original, newLength);
17410          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || original[0] != null) || original === null) && (typeof newLength === "number" || newLength === null)) {
17411            return java2.util.Arrays.copyOf$java_lang_Object_A$int(original, newLength);
17412          } else
17413            throw new Error("invalid overload");
17414        };
17415        Arrays2.copyOf$byte_A$int = function(original, newLength) {
17416          javaemul.internal.InternalPreconditions.checkArraySize(newLength);
17417          return Arrays2.copyOfRange$byte_A$int$int(original, 0, newLength);
17418        };
17419        Arrays2.copyOf$char_A$int = function(original, newLength) {
17420          javaemul.internal.InternalPreconditions.checkArraySize(newLength);
17421          return Arrays2.copyOfRange$char_A$int$int(original, 0, newLength);
17422        };
17423        Arrays2.copyOf$double_A$int = function(original, newLength) {
17424          javaemul.internal.InternalPreconditions.checkArraySize(newLength);
17425          return Arrays2.copyOfRange$double_A$int$int(original, 0, newLength);
17426        };
17427        Arrays2.copyOf$float_A$int = function(original, newLength) {
17428          javaemul.internal.InternalPreconditions.checkArraySize(newLength);
17429          return Arrays2.copyOfRange$float_A$int$int(original, 0, newLength);
17430        };
17431        Arrays2.copyOf$int_A$int = function(original, newLength) {
17432          javaemul.internal.InternalPreconditions.checkArraySize(newLength);
17433          return Arrays2.copyOfRange$int_A$int$int(original, 0, newLength);
17434        };
17435        Arrays2.copyOf$long_A$int = function(original, newLength) {
17436          javaemul.internal.InternalPreconditions.checkArraySize(newLength);
17437          return Arrays2.copyOfRange$long_A$int$int(original, 0, newLength);
17438        };
17439        Arrays2.copyOf$short_A$int = function(original, newLength) {
17440          javaemul.internal.InternalPreconditions.checkArraySize(newLength);
17441          return Arrays2.copyOfRange$short_A$int$int(original, 0, newLength);
17442        };
17443        Arrays2.copyOf$java_lang_Object_A$int = function(original, newLength) {
17444          javaemul.internal.InternalPreconditions.checkArraySize(newLength);
17445          javaemul.internal.InternalPreconditions.checkNotNull(original, "original");
17446          var clone = javaemul.internal.ArrayHelper.clone(original, 0, newLength);
17447          javaemul.internal.ArrayHelper.setLength(clone, newLength);
17448          return clone;
17449        };
17450        Arrays2.copyOfRange$boolean_A$int$int = function(original, from, to) {
17451          var len = Arrays2.getCopyLength(original, from, to);
17452          var copy = (function(s) {
17453            var a = [];
17454            while (s-- > 0)
17455              a.push(false);
17456            return a;
17457          })(to - from);
17458          javaemul.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(original, from, copy, 0, len);
17459          return copy;
17460        };
17461        Arrays2.copyOfRange = function(original, from, to) {
17462          if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "boolean") || original === null) && (typeof from === "number" || from === null) && (typeof to === "number" || to === null)) {
17463            return java2.util.Arrays.copyOfRange$boolean_A$int$int(original, from, to);
17464          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "
17464number") || original === null) && (typeof from === "number" || from === null) && (typeof to === "number" || to === null)) {
17465            return java2.util.Arrays.copyOfRange$byte_A$int$int(original, from, to);
17466          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "string") || original === null) && (typeof from === "number" || from === null) && (typeof to === "number" || to === null)) {
17467            return java2.util.Arrays.copyOfRange$char_A$int$int(original, from, to);
17468          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "number") || original === null) && (typeof from === "number" || from === null) && (typeof to === "number" || to === null)) {
17469            return java2.util.Arrays.copyOfRange$double_A$int$int(original, from, to);
17470          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "number") || original === null) && (typeof from === "number" || from === null) && (typeof to === "number" || to === null)) {
17471            return java2.util.Arrays.copyOfRange$float_A$int$int(original, from, to);
17472          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "number") || original === null) && (typeof from === "number" || from === null) && (typeof to === "number" || to === null)) {
17473            return java2.util.Arrays.copyOfRange$int_A$int$int(original, from, to);
17474          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "number") || original === null) && (typeof from === "number" || from === null) && (typeof to === "number" || to === null)) {
17475            return java2.util.Arrays.copyOfRange$long_A$int$int(original, from, to);
17476          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || typeof original[0] === "number") || original === null) && (typeof from === "number" || from === null) && (typeof to === "number" || to === null)) {
17477            return java2.util.Arrays.copyOfRange$short_A$int$int(original, from, to);
17478          } else if ((original != null && original instanceof Array && (original.length == 0 || original[0] == null || original[0] != null) || original === null) && (typeof from === "number" || from === null) && (typeof to === "number" || to === null)) {
17479            return java2.util.Arrays.copyOfRange$java_lang_Object_A$int$int(original, from, to);
17480          } else
17481            throw new Error("invalid overload");
17482        };
17483        Arrays2.copyOfRange$byte_A$int$int = function(original, from, to) {
17484          var len = Arrays2.getCopyLength(original, from, to);
17485          var copy = (function(s) {
17486            var a = [];
17487            while (s-- > 0)
17488              a.push(0);
17489            return a;
17490          })(to - from);
17491          javaemul.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(original, from, copy, 0, len);
17492          return copy;
17493        };
17494        Arrays2.copyOfRange$char_A$int$int = function(original, from, to) {
17495          var len = Arrays2.getCopyLength(original, from, to);
17496          var copy = (function(s) {
17497            var a = [];
17498            while (s-- > 0)
17499              a.push(null);
17500            return a;
17501          })(to - from);
17502          javaemul.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(original, from, copy, 0, len);
17503          return copy;
17504        };
17505        Arrays2.copyOfRange$double_A$int$int = function(original, from, to) {
17506          var len = Arrays2.getCopyLength(original, from, to);
17507          var copy = (function(s) {
17508            var a = [];
17509            while (s-- > 0)
17510              a.push(0);
17511            return a;
17512          })(to - from);
17513          javaemul.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(original, from, copy, 0, len);
17514          return copy;
17515        };
17516        Arrays2.copyOfRange$float_A$int$int = function(original, from, to) {
17517          var len = Arrays2.getCopyLength(original, from, to);
17518          var copy = (function(s) {
17519            var a = [];
17520            while (s-- > 0)
17521              a.push(0);
17522            return a;
17523          })(to - from);
17524          javaemul.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(original, from, copy, 0, len);
17525          return copy;
17526        };
17527        Arrays2.copyOfRange$int_A$int$int = function(original, from, to) {
17528          var len = Arrays2.getCopyLength(original, from, to);
17529          var copy = (function(s) {
17530            var a = [];
17531            while (s-- > 0)
17532              a.push(0);
17533            return a;
17534          })(to - from);
17535          javaemul.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(original, from, copy, 0, len);
17536          return copy;
17537        };
17538        Arrays2.copyOfRange$long_A$int$int = function(original, from, to) {
17539          var len = Arrays2.getCopyLength(original, from, to);
17540          var copy = (function(s) {
17541            var a = [];
17542            while (s-- > 0)
17543              a.push(0);
17544            return a;
17545          })(to - from);
17546          javaemul.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(original, from, copy, 0, len);
17547          return copy;
17548        };
17549        Arrays2.copyOfRange$short_A$int$int = function(original, from, to) {
17550          var len = Arrays2.getCopyLength(original, from, to);
17551          var copy = (function(s) {
17552            var a = [];
17553            while (s-- > 0)
17554              a.push(0);
17555            return a;
17556          })(to - from);
17557          javaemul.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(original, from, copy, 0, len);
17558          return copy;
17559        };
17560        Arrays2.copyOfRange$java_lang_Object_A$int$int = function(original, from, to) {
17561          var len = Arrays2.getCopyLength(original, from, to);
17562          var copy = javaemul.internal.ArrayHelper.createFrom(original, to - from);
17563          javaemul.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(original, from, copy, 0, len);
17564          return copy;
17565        };
17566        Arrays2.deepEquals = function(a1, a2) {
17567          if (a1 === a2) {
17568            return true;
17569          }
17570          if (a1 == null || a2 == null) {
17571            return false;
17572          }
17573          if (a1.length !== a2.length) {
17574            return false;
17575          }
17576          for (var i = 0, n = a1.length; i < n; ++i) {
17577            {
17578              if (!java2.util.Objects.deepEquals(a1[i], a2[i])) {
17579                return false;
17580              }
17581            }
17582            ;
17583          }
17584          return true;
17585        };
17586        Arrays2.deepHashCode = function(a) {
17587          if (a == null) {
17588            return 0;
17589          }
17590          var hashCode = 1;
17591          for (var index = 0; index < a.length; index++) {
17592            var obj = a[index];
17593            {
17594              var hash = void 0;
17595              if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || obj[0] != null)) {
17596                hash = Arrays2.deepHashCode(obj);
17597              } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "boolean")) {
17598                hash = Arrays2.hashCode$boolean_A(obj);
17599              } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "number")) {
17600                hash = Arrays2.hashCode$byte_A(obj);
17601              } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "string")) {
17602                hash = Arrays2.hashCode$char_A(obj);
17603              } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "number")) {
17604                hash = Arrays2.hashCode$short_A(obj);
17605              } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "number")) {
17606                hash = Arrays2.hashCode$int_A(obj);
17607              } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "number")) {
17608                hash = Arrays2.hashCode$long_A(obj);
17609              } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "number")) {
17610                hash = Arrays2.hashCode$float_A(obj);
17611              } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "number")) {
17612                hash = Arrays2.hashCode$double_A(obj);
17613              } else {
17614                hash = java2.util.Objects.hashCode(obj);
17615              }
17616              hashCode = 31 * hashCode + hash;
17617              hashCode = javaemul.internal.Coercions.ensureInt(hashCode);
17618            }
17619          }
17620          return hashCode;
17621        };
17622        Arrays2.deepToString$java_lang_Object_A = function(a) {
17623          return Arrays2.deepToString$java_lang_Object_A$java_util_Set(a, new java2.util.HashSet());
17624        };
17625        Arrays2.equals$boolean_A$boolean_A = function(array1, array2) {
17626          if (array1 === array2) {
17627            return true;
17628          }
17629          if (array1 == null || array2 == null) {
17630            return false;
17631          }
17632          if (array1.length !== array2.length) {
17633            return false;
17634          }
17635          for (var i = 0; i < array1.length; ++i) {
17636            {
17637              if (array1[i] !== array2[i]) {
17638                return false;
17639              }
17640            }
17641            ;
17642          }
17643          return true;
17644        };
17645        Arrays2.equals = function(array1, array2) {
17646          if ((array1 != null && array1 instanceof Array && (array1.length == 0 || array1[0] == null || typeof array1[0] === "boolean") || array1 === null) && (array2 != null && array2 instanceof Array && (array2.length == 0 || array2[0] == null || typeof array2[0] === "boolean") || array2 === null)) {
17647            return java2.util.Arrays.equals$boolean_A$boolean_A(array1, array2);
17648          } else if ((array1 != null && array1 instanceof Array && (array1.length == 0 || array1[0] == null || typeof array1[0] === "number") || array1 === null) && (array2 != null && array2 instanceof Array && (array2.length == 0 || array2[0] == null || typeof array2[0] === "
17648number") || array2 === null)) {
17649            return java2.util.Arrays.equals$byte_A$byte_A(array1, array2);
17650          } else if ((array1 != null && array1 instanceof Array && (array1.length == 0 || array1[0] == null || typeof array1[0] === "string") || array1 === null) && (array2 != null && array2 instanceof Array && (array2.length == 0 || array2[0] == null || typeof array2[0] === "string") || array2 === null)) {
17651            return java2.util.Arrays.equals$char_A$char_A(array1, array2);
17652          } else if ((array1 != null && array1 instanceof Array && (array1.length == 0 || array1[0] == null || typeof array1[0] === "number") || array1 === null) && (array2 != null && array2 instanceof Array && (array2.length == 0 || array2[0] == null || typeof array2[0] === "number") || array2 === null)) {
17653            return java2.util.Arrays.equals$double_A$double_A(array1, array2);
17654          } else if ((array1 != null && array1 instanceof Array && (array1.length == 0 || array1[0] == null || typeof array1[0] === "number") || array1 === null) && (array2 != null && array2 instanceof Array && (array2.length == 0 || array2[0] == null || typeof array2[0] === "
17654number") || array2 === null)) {
17655            return java2.util.Arrays.equals$float_A$float_A(array1, array2);
17656          } else if ((array1 != null && array1 instanceof Array && (array1.length == 0 || array1[0] == null || typeof array1[0] === "number") || array1 === null) && (array2 != null && array2 instanceof Array && (array2.length == 0 || array2[0] == null || typeof array2[0] === "number") || array2 === null)) {
17657            return java2.util.Arrays.equals$int_A$int_A(array1, array2);
17658          } else if ((array1 != null && array1 instanceof Array && (array1.length == 0 || array1[0] == null || typeof array1[0] === "number") || array1 === null) && (array2 != null && array2 instanceof Array && (array2.length == 0 || array2[0] == null || typeof array2[0] === "number") || array2 === null)) {
17659            return java2.util.Arrays.equals$long_A$long_A(array1, array2);
17660          } else if ((array1 != null && array1 instanceof Array && (array1.length == 0 || array1[0] == null || array1[0] != null) || array1 === null) && (array2 != null && array2 instanceof Array && (array2.length == 0 || array2[0] == null || array2[0] != null) || array2 === null)) {
17661            return java2.util.Arrays.equals$java_lang_Object_A$java_lang_Object_A(array1, array2);
17662          } else if ((array1 != null && array1 instanceof Array && (array1.length == 0 || array1[0] == null || typeof array1[0] === "number") || array1 === null) && (array2 != null && array2 instanceof Array && (array2.length == 0 || array2[0] == null || typeof array2[0] === "
17662number") || array2 === null)) {
17663            return java2.util.Arrays.equals$short_A$short_A(array1, array2);
17664          } else
17665            throw new Error("invalid overload");
17666        };
17667        Arrays2.equals$byte_A$byte_A = function(array1, array2) {
17668          if (array1 === array2) {
17669            return true;
17670          }
17671          if (array1 == null || array2 == null) {
17672            return false;
17673          }
17674          if (array1.length !== array2.length) {
17675            return false;
17676          }
17677          for (var i = 0; i < array1.length; ++i) {
17678            {
17679              if (array1[i] !== array2[i]) {
17680                return false;
17681              }
17682            }
17683            ;
17684          }
17685          return true;
17686        };
17687        Arrays2.equals$char_A$char_A = function(array1, array2) {
17688          if (array1 === array2) {
17689            return true;
17690          }
17691          if (array1 == null || array2 == null) {
17692            return false;
17693          }
17694          if (array1.length !== array2.length) {
17695            return false;
17696          }
17697          for (var i = 0; i < array1.length; ++i) {
17698            {
17699              if ((function(c) {
17700                return c.charCodeAt == null ? c : c.charCodeAt(0);
17701              })(array1[i]) != (function(c) {
17702                return c.charCodeAt == null ? c : c.charCodeAt(0);
17703              })(array2[i])) {
17704                return false;
17705              }
17706            }
17707            ;
17708          }
17709          return true;
17710        };
17711        Arrays2.equals$double_A$double_A = function(array1, array2) {
17712          if (array1 === array2) {
17713            return true;
17714          }
17715          if (array1 == null || array2 == null) {
17716            return false;
17717          }
17718          if (array1.length !== array2.length) {
17719            return false;
17720          }
17721          for (var i = 0; i < array1.length; ++i) {
17722            {
17723              if (array1[i] !== array2[i]) {
17724                return false;
17725              }
17726            }
17727            ;
17728          }
17729          return true;
17730        };
17731        Arrays2.equals$float_A$float_A = function(array1, array2) {
17732          if (array1 === array2) {
17733            return true;
17734          }
17735          if (array1 == null || array2 == null) {
17736            return false;
17737          }
17738          if (array1.length !== array2.length) {
17739            return false;
17740          }
17741          for (var i = 0; i < array1.length; ++i) {
17742            {
17743              if (array1[i] !== array2[i]) {
17744                return false;
17745              }
17746            }
17747            ;
17748          }
17749          return true;
17750        };
17751        Arrays2.equals$int_A$int_A = function(array1, array2) {
17752          if (array1 === array2) {
17753            return true;
17754          }
17755          if (array1 == null || array2 == null) {
17756            return false;
17757          }
17758          if (array1.length !== array2.length) {
17759            return false;
17760          }
17761          for (var i = 0; i < array1.length; ++i) {
17762            {
17763              if (array1[i] !== array2[i]) {
17764                return false;
17765              }
17766            }
17767            ;
17768          }
17769          return true;
17770        };
17771        Arrays2.equals$long_A$long_A = function(array1, array2) {
17772          if (array1 === array2) {
17773            return true;
17774          }
17775          if (array1 == null || array2 == null) {
17776            return false;
17777          }
17778          if (array1.length !== array2.length) {
17779            return false;
17780          }
17781          for (var i = 0; i < array1.length; ++i) {
17782            {
17783              if (array1[i] !== array2[i]) {
17784                return false;
17785              }
17786            }
17787            ;
17788          }
17789          return true;
17790        };
17791        Arrays2.equals$java_lang_Object_A$java_lang_Object_A = function(array1, array2) {
17792          if (array1 === array2) {
17793            return true;
17794          }
17795          if (array1 == null || array2 == null) {
17796            return false;
17797          }
17798          if (array1.length !== array2.length) {
17799            return false;
17800          }
17801          for (var i = 0; i < array1.length; ++i) {
17802            {
17803              var val1 = array1[i];
17804              var val2 = array2[i];
17805              if (!java2.util.Objects.equals(val1, val2)) {
17806                return false;
17807              }
17808            }
17809            ;
17810          }
17811          return true;
17812        };
17813        Arrays2.equals$short_A$short_A = function(array1, array2) {
17814          if (array1 === array2) {
17815            return true;
17816          }
17817          if (array1 == null || array2 == null) {
17818            return false;
17819          }
17820          if (array1.length !== array2.length) {
17821            return false;
17822          }
17823          for (var i = 0; i < array1.length; ++i) {
17824            {
17825              if (array1[i] !== array2[i]) {
17826                return false;
17827              }
17828            }
17829            ;
17830          }
17831          return true;
17832        };
17833        Arrays2.fill$boolean_A$boolean = function(a, val) {
17834          Arrays2.fill$boolean_A$int$int$boolean(a, 0, a.length, val);
17835        };
17836        Arrays2.fill$boolean_A$int$int$boolean = function(a, fromIndex, toIndex, val) {
17837          for (var i = fromIndex; i < toIndex; ++i) {
17838            {
17839              a[i] = val;
17840            }
17841            ;
17842          }
17843        };
17844        Arrays2.fill = function(a, fromIndex, toIndex, val) {
17845          if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "boolean") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && (typeof val === "boolean" || val === null)) {
17846            return java2.util.Arrays.fill$boolean_A$int$int$boolean(a, fromIndex, toIndex, val);
17847          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && (typeof val === "number" || val === null)) {
17848            return java2.util.Arrays.fill$byte_A$int$int$byte(a, fromIndex, toIndex, val);
17849          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "string") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && (typeof val === "string" || val === null)) {
17850            return java2.util.Arrays.fill$char_A$int$int$char(a, fromIndex, toIndex, val);
17851          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && (typeof val === "number" || val === null)) {
17852            return java2.util.Arrays.fill$short_A$int$int$short(a, fromIndex, toIndex, val);
17853          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && (typeof val === "number" || val === null)) {
17854            return java2.util.Arrays.fill$int_A$int$int$int(a, fromIndex, toIndex, val);
17855          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && (typeof val === "number" || val === null)) {
17856            return java2.util.Arrays.fill$long_A$int$int$long(a, fromIndex, toIndex, val);
17857          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && (typeof val === "number" || val === null)) {
17858            return java2.util.Arrays.fill$float_A$int$int$float(a, fromIndex, toIndex, val);
17859          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && (typeof val === "number" || val === null)) {
17860            return java2.util.Arrays.fill$double_A$int$int$double(a, fromIndex, toIndex, val);
17861          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || a[0] != null) || a === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && (val != null || val === null)) {
17862            return java2.util.Arrays.fill$java_lang_Object_A$int$int$java_lang_Object(a, fromIndex, toIndex, val);
17863          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "boolean") || a === null) && (typeof fromIndex === "boolean" || fromIndex === null) && toIndex === void 0 && val === void 0) {
17864            return java2.util.Arrays.fill$boolean_A$boolean(a, fromIndex);
17865          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "
17865number") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && toIndex === void 0 && val === void 0) {
17866            return java2.util.Arrays.fill$byte_A$byte(a, fromIndex);
17867          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "string") || a === null) && (typeof fromIndex === "string" || fromIndex === null) && toIndex === void 0 && val === void 0) {
17868            return java2.util.Arrays.fill$char_A$char(a, fromIndex);
17869          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && toIndex === void 0 && val === void 0) {
17870            return java2.util.Arrays.fill$short_A$short(a, fromIndex);
17871          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && toIndex === void 0 && val === void 0) {
17872            return java2.util.Arrays.fill$int_A$int(a, fromIndex);
17873          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && toIndex === void 0 && val === void 0) {
17874            return java2.util.Arrays.fill$long_A$long(a, fromIndex);
17875          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && toIndex === void 0 && val === void 0) {
17876            return java2.util.Arrays.fill$float_A$float(a, fromIndex);
17877          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) && (typeof fromIndex === "number" || fromIndex === null) && toIndex === void 0 && val === void 0) {
17878            return java2.util.Arrays.fill$double_A$double(a, fromIndex);
17879          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || a[0] != null) || a === null) && (fromIndex != null || fromIndex === null) && toIndex === void 0 && val === void 0) {
17880            return java2.util.Arrays.fill$java_lang_Object_A$java_lang_Object(a, fromIndex);
17881          } else
17882            throw new Error("invalid overload");
17883        };
17884        Arrays2.fill$byte_A$byte = function(a, val) {
17885          Arrays2.fill$byte_A$int$int$byte(a, 0, a.length, val);
17886        };
17887        Arrays2.fill$byte_A$int$int$byte = function(a, fromIndex, toIndex, val) {
17888          for (var i = fromIndex; i < toIndex; ++i) {
17889            {
17890              a[i] = val;
17891            }
17892            ;
17893          }
17894        };
17895        Arrays2.fill$char_A$char = function(a, val) {
17896          Arrays2.fill$char_A$int$int$char(a, 0, a.length, val);
17897        };
17898        Arrays2.fill$char_A$int$int$char = function(a, fromIndex, toIndex, val) {
17899          for (var i = fromIndex; i < toIndex; ++i) {
17900            {
17901              a[i] = val;
17902            }
17903            ;
17904          }
17905        };
17906        Arrays2.fill$double_A$double = function(a, val) {
17907          Arrays2.fill$double_A$int$int$double(a, 0, a.length, val);
17908        };
17909        Arrays2.fill$double_A$int$int$double = function(a, fromIndex, toIndex, val) {
17910          for (var i = fromIndex; i < toIndex; ++i) {
17911            {
17912              a[i] = val;
17913            }
17914            ;
17915          }
17916        };
17917        Arrays2.fill$float_A$float = function(a, val) {
17918          Arrays2.fill$float_A$int$int$float(a, 0, a.length, val);
17919        };
17920        Arrays2.fill$float_A$int$int$float = function(a, fromIndex, toIndex, val) {
17921          for (var i = fromIndex; i < toIndex; ++i) {
17922            {
17923              a[i] = val;
17924            }
17925            ;
17926          }
17927        };
17928        Arrays2.fill$int_A$int = function(a, val) {
17929          Arrays2.fill$int_A$int$int$int(a, 0, a.length, val);
17930        };
17931        Arrays2.fill$int_A$int$int$int = function(a, fromIndex, toIndex, val) {
17932          for (var i = fromIndex; i < toIndex; ++i) {
17933            {
17934              a[i] = val;
17935            }
17936            ;
17937          }
17938        };
17939        Arrays2.fill$long_A$int$int$long = function(a, fromIndex, toIndex, val) {
17940          for (var i = fromIndex; i < toIndex; ++i) {
17941            {
17942              a[i] = val;
17943            }
17944            ;
17945          }
17946        };
17947        Arrays2.fill$long_A$long = function(a, val) {
17948          Arrays2.fill$long_A$int$int$long(a, 0, a.length, val);
17949        };
17950        Arrays2.fill$java_lang_Object_A$int$int$java_lang_Object = function(a, fromIndex, toIndex, val) {
17951          for (var i = fromIndex; i < toIndex; ++i) {
17952            {
17953              a[i] = val;
17954            }
17955            ;
17956          }
17957        };
17958        Arrays2.fill$java_lang_Object_A$java_lang_Object = function(a, val) {
17959          Arrays2.fill$java_lang_Object_A$int$int$java_lang_Object(a, 0, a.length, val);
17960        };
17961        Arrays2.fill$short_A$int$int$short = function(a, fromIndex, toIndex, val) {
17962          for (var i = fromIndex; i < toIndex; ++i) {
17963            {
17964              a[i] = val;
17965            }
17966            ;
17967          }
17968        };
17969        Arrays2.fill$short_A$short = function(a, val) {
17970          Arrays2.fill$short_A$int$int$short(a, 0, a.length, val);
17971        };
17972        Arrays2.hashCode$boolean_A = function(a) {
17973          if (a == null) {
17974            return 0;
17975          }
17976          var hashCode = 1;
17977          for (var index = 0; index < a.length; index++) {
17978            var e = a[index];
17979            {
17980              hashCode = 31 * hashCode + javaemul.internal.BooleanHelper.hashCode(e);
17981              hashCode = javaemul.internal.Coercions.ensureInt(hashCode);
17982            }
17983          }
17984          return hashCode;
17985        };
17986        Arrays2.hashCode = function(a) {
17987          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "boolean") || a === null) {
17988            return java2.util.Arrays.hashCode$boolean_A(a);
17989          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "
17989number") || a === null) {
17990            return java2.util.Arrays.hashCode$byte_A(a);
17991          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "string") || a === null) {
17992            return java2.util.Arrays.hashCode$char_A(a);
17993          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) {
17994            return java2.util.Arrays.hashCode$double_A(a);
17995          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) {
17996            return java2.util.Arrays.hashCode$float_A(a);
17997          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) {
17998            return java2.util.Arrays.hashCode$int_A(a);
17999          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) {
18000            return java2.util.Arrays.hashCode$long_A(a);
18001          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || a[0] != null) || a === null) {
18002            return java2.util.Arrays.hashCode$java_lang_Object_A(a);
18003          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) {
18004            return java2.util.Arrays.hashCode$short_A(a);
18005          } else
18006            throw new Error("invalid overload");
18007        };
18008        Arrays2.hashCode$byte_A = function(a) {
18009          if (a == null) {
18010            return 0;
18011          }
18012          var hashCode = 1;
18013          for (var index = 0; index < a.length; index++) {
18014            var e = a[index];
18015            {
18016              hashCode = 31 * hashCode + javaemul.internal.ByteHelper.hashCode(e);
18017              hashCode = javaemul.internal.Coercions.ensureInt(hashCode);
18018            }
18019          }
18020          return hashCode;
18021        };
18022        Arrays2.hashCode$char_A = function(a) {
18023          if (a == null) {
18024            return 0;
18025          }
18026          var hashCode = 1;
18027          for (var index = 0; index < a.length; index++) {
18028            var e = a[index];
18029            {
18030              hashCode = 31 * hashCode + javaemul.internal.CharacterHelper.hashCode(e);
18031              hashCode = javaemul.internal.Coercions.ensureInt(hashCode);
18032            }
18033          }
18034          return hashCode;
18035        };
18036        Arrays2.hashCode$double_A = function(a) {
18037          if (a == null) {
18038            return 0;
18039          }
18040          var hashCode = 1;
18041          for (var index = 0; index < a.length; index++) {
18042            var e = a[index];
18043            {
18044              hashCode = 31 * hashCode + javaemul.internal.DoubleHelper.hashCode(e);
18045              hashCode = javaemul.internal.Coercions.ensureInt(hashCode);
18046            }
18047          }
18048          return hashCode;
18049        };
18050        Arrays2.hashCode$float_A = function(a) {
18051          if (a == null) {
18052            return 0;
18053          }
18054          var hashCode = 1;
18055          for (var index = 0; index < a.length; index++) {
18056            var e = a[index];
18057            {
18058              hashCode = 31 * hashCode + javaemul.internal.FloatHelper.hashCode(e);
18059              hashCode = javaemul.internal.Coercions.ensureInt(hashCode);
18060            }
18061          }
18062          return hashCode;
18063        };
18064        Arrays2.hashCode$int_A = function(a) {
18065          if (a == null) {
18066            return 0;
18067          }
18068          var hashCode = 1;
18069          for (var index = 0; index < a.length; index++) {
18070            var e = a[index];
18071            {
18072              hashCode = 31 * hashCode + javaemul.internal.IntegerHelper.hashCode(e);
18073              hashCode = javaemul.internal.Coercions.ensureInt(hashCode);
18074            }
18075          }
18076          return hashCode;
18077        };
18078        Arrays2.hashCode$long_A = function(a) {
18079          if (a == null) {
18080            return 0;
18081          }
18082          var hashCode = 1;
18083          for (var index = 0; index < a.length; index++) {
18084            var e = a[index];
18085            {
18086              hashCode = 31 * hashCode + javaemul.internal.LongHelper.hashCode(e);
18087              hashCode = javaemul.internal.Coercions.ensureInt(hashCode);
18088            }
18089          }
18090          return hashCode;
18091        };
18092        Arrays2.hashCode$java_lang_Object_A = function(a) {
18093          if (a == null) {
18094            return 0;
18095          }
18096          var hashCode = 1;
18097          for (var index = 0; index < a.length; index++) {
18098            var e = a[index];
18099            {
18100              hashCode = 31 * hashCode + java2.util.Objects.hashCode(e);
18101              hashCode = javaemul.internal.Coercions.ensureInt(hashCode);
18102            }
18103          }
18104          return hashCode;
18105        };
18106        Arrays2.hashCode$short_A = function(a) {
18107          if (a == null) {
18108            return 0;
18109          }
18110          var hashCode = 1;
18111          for (var index = 0; index < a.length; index++) {
18112            var e = a[index];
18113            {
18114              hashCode = 31 * hashCode + javaemul.internal.ShortHelper.hashCode(e);
18115              hashCode = javaemul.internal.Coercions.ensureInt(hashCode);
18116            }
18117          }
18118          return hashCode;
18119        };
18120        Arrays2.sort$byte_A = function(array) {
18121          Arrays2.nativeNumberSort$java_lang_Object(array);
18122        };
18123        Arrays2.sort$byte_A$int$int = function(array, fromIndex, toIndex) {
18124          javaemul.internal.InternalPreconditions.checkPositionIndexes(fromIndex, toIndex, array.length);
18125          Arrays2.nativeNumberSort$java_lang_Object$int$int(array, fromIndex, toIndex);
18126        };
18127        Arrays2.sort$char_A = function(array) {
18128          Arrays2.nativeNumberSort$java_lang_Object(array);
18129        };
18130        Arrays2.sort$char_A$int$int = function(array, fromIndex, toIndex) {
18131          javaemul.internal.InternalPreconditions.checkPositionIndexes(fromIndex, toIndex, array.length);
18132          Arrays2.nativeNumberSort$java_lang_Object$int$int(array, fromIndex, toIndex);
18133        };
18134        Arrays2.sort$double_A = function(array) {
18135          Arrays2.nativeNumberSort$java_lang_Object(array);
18136        };
18137        Arrays2.sort$double_A$int$int = function(array, fromIndex, toIndex) {
18138          javaemul.internal.InternalPreconditions.checkPositionIndexes(fromIndex, toIndex, array.length);
18139          Arrays2.nativeNumberSort$java_lang_Object$int$int(array, fromIndex, toIndex);
18140        };
18141        Arrays2.sort$float_A = function(array) {
18142          Arrays2.nativeNumberSort$java_lang_Object(array);
18143        };
18144        Arrays2.sort$float_A$int$int = function(array, fromIndex, toIndex) {
18145          javaemul.internal.InternalPreconditions.checkPositionIndexes(fromIndex, toIndex, array.length);
18146          Arrays2.nativeNumberSort$java_lang_Object$int$int(array, fromIndex, toIndex);
18147        };
18148        Arrays2.sort$int_A = function(array) {
18149          Arrays2.nativeNumberSort$java_lang_Object(array);
18150        };
18151        Arrays2.sort$int_A$int$int = function(array, fromIndex, toIndex) {
18152          javaemul.internal.InternalPreconditions.checkPositionIndexes(fromIndex, toIndex, array.length);
18153          Arrays2.nativeNumberSort$java_lang_Object$int$int(array, fromIndex, toIndex);
18154        };
18155        Arrays2.sort$long_A = function(array) {
18156          Arrays2.nativeLongSort$java_lang_Object$java_lang_Object(array, javaemul.internal.LongCompareHolder.getLongComparator());
18157        };
18158        Arrays2.sort$long_A$int$int = function(array, fromIndex, toIndex) {
18159          javaemul.internal.InternalPreconditions.checkPositionIndexes(fromIndex, toIndex, array.length);
18160          Arrays2.nativeLongSort$java_lang_Object$int$int(array, fromIndex, toIndex);
18161        };
18162        Arrays2.sort$java_lang_Object_A = function(array) {
18163          Arrays2.mergeSort$java_lang_Object_A$int$int$java_util_Comparator(array, 0, array.length, (function(funcInst) {
18164            if (funcInst == null || typeof funcInst == "function") {
18165              return funcInst;
18166            }
18167            return function(a, b) {
18168              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18169            };
18170          })(java2.util.Comparators.natural()));
18171        };
18172        Arrays2.sort$java_lang_Object_A$int$int = function(x, fromIndex, toIndex) {
18173          Arrays2.mergeSort$java_lang_Object_A$int$int$java_util_Comparator(x, fromIndex, toIndex, (function(funcInst) {
18174            if (funcInst == null || typeof funcInst == "function") {
18175              return funcInst;
18176            }
18177            return function(a, b) {
18178              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18179            };
18180          })(java2.util.Comparators.natural()));
18181        };
18182        Arrays2.sort$short_A = function(array) {
18183          Arrays2.nativeNumberSort$java_lang_Object(array);
18184        };
18185        Arrays2.sort$short_A$int$int = function(array, fromIndex, toIndex) {
18186          javaemul.internal.InternalPreconditions.checkPositionIndexes(fromIndex, toIndex, array.length);
18187          Arrays2.nativeNumberSort$java_lang_Object$int$int(array, fromIndex, toIndex);
18188        };
18189        Arrays2.sort$java_lang_Object_A$java_util_Comparator = function(x, c) {
18190          Arrays2.mergeSort$java_lang_Object_A$int$int$java_util_Comparator(x, 0, x.length, (function(funcInst) {
18191            if (funcInst == null || typeof funcInst == "function") {
18192              return funcInst;
18193            }
18194            return function(a, b) {
18195              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18196            };
18197          })(c));
18198        };
18199        Arrays2.sort$java_lang_Object_A$int$int$java_util_Comparator = function(x, fromIndex, toIndex, c) {
18200          javaemul.internal.InternalPreconditions.checkPositionIndexes(fromIndex, toIndex, x.length);
18201          Arrays2.mergeSort$java_lang_Object_A$int$int$java_util_Comparator(x, fromIndex, toIndex, (function(funcInst) {
18202            if (funcInst == null || typeof funcInst == "function") {
18203              return funcInst;
18204            }
18205            return function(a, b) {
18206              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18207            };
18208          })(c));
18209        };
18210        Arrays2.sort = function(x, fromIndex, toIndex, c) {
18211          if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || x[0] != null) || x === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && (typeof c === "function" && c.length === 2 || c === null)) {
18212            return java2.util.Arrays.sort$java_lang_Object_A$int$int$java_util_Comparator(x, fromIndex, toIndex, c);
18213          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "
18213number") || x === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && c === void 0) {
18214            return java2.util.Arrays.sort$byte_A$int$int(x, fromIndex, toIndex);
18215          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "string") || x === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && c === void 0) {
18216            return java2.util.Arrays.sort$char_A$int$int(x, fromIndex, toIndex);
18217          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "number") || x === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && c === void 0) {
18218            return java2.util.Arrays.sort$double_A$int$int(x, fromIndex, toIndex);
18219          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "number") || x === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && c === void 0) {
18220            return java2.util.Arrays.sort$float_A$int$int(x, fromIndex, toIndex);
18221          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "number") || x === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && c === void 0) {
18222            return java2.util.Arrays.sort$int_A$int$int(x, fromIndex, toIndex);
18223          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "number") || x === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && c === void 0) {
18224            return java2.util.Arrays.sort$long_A$int$int(x, fromIndex, toIndex);
18225          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || x[0] != null) || x === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && c === void 0) {
18226            return java2.util.Arrays.sort$java_lang_Object_A$int$int(x, fromIndex, toIndex);
18227          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "number") || x === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null) && c === void 0) {
18228            return java2.util.Arrays.sort$short_A$int$int(x, fromIndex, toIndex);
18229          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || x[0] != null) || x === null) && (typeof fromIndex === "function" && fromIndex.length === 2 || fromIndex === null) && toIndex === void 0 && c === void 0) {
18230            return java2.util.Arrays.sort$java_lang_Object_A$java_util_Comparator(x, fromIndex);
18231          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "number") || x === null) && fromIndex === void 0 && toIndex === void 0 && c === void 0) {
18232            return java2.util.Arrays.sort$byte_A(x);
18233          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "string") || x === null) && fromIndex === void 0 && toIndex === void 0 && c === void 0) {
18234            return java2.util.Arrays.sort$char_A(x);
18235          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "number") || x === null) && fromIndex === void 0 && toIndex === void 0 && c === void 0) {
18236            return java2.util.Arrays.sort$double_A(x);
18237          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "number") || x === null) && fromIndex === void 0 && toIndex === void 0 && c === void 0) {
18238            return java2.util.Arrays.sort$float_A(x);
18239          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "number") || x === null) && fromIndex === void 0 && toIndex === void 0 && c === void 0) {
18240            return java2.util.Arrays.sort$int_A(x);
18241          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "
18241number") || x === null) && fromIndex === void 0 && toIndex === void 0 && c === void 0) {
18242            return java2.util.Arrays.sort$long_A(x);
18243          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || x[0] != null) || x === null) && fromIndex === void 0 && toIndex === void 0 && c === void 0) {
18244            return java2.util.Arrays.sort$java_lang_Object_A(x);
18245          } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || typeof x[0] === "number") || x === null) && fromIndex === void 0 && toIndex === void 0 && c === void 0) {
18246            return java2.util.Arrays.sort$short_A(x);
18247          } else
18248            throw new Error("invalid overload");
18249        };
18250        Arrays2.toString$boolean_A = function(a) {
18251          if (a == null) {
18252            return "null";
18253          }
18254          var joiner = new java2.util.StringJoiner(", ", "[", "]");
18255          for (var index = 0; index < a.length; index++) {
18256            var element = a[index];
18257            {
18258              joiner.add(
18259                /* valueOf */
18260                String(element).toString()
18261              );
18262            }
18263          }
18264          return joiner.toString();
18265        };
18266        Arrays2.toString = function(a) {
18267          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "boolean") || a === null) {
18268            return java2.util.Arrays.toString$boolean_A(a);
18269          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) {
18270            return java2.util.Arrays.toString$byte_A(a);
18271          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "string") || a === null) {
18272            return java2.util.Arrays.toString$char_A(a);
18273          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) {
18274            return java2.util.Arrays.toString$double_A(a);
18275          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) {
18276            return java2.util.Arrays.toString$float_A(a);
18277          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) {
18278            return java2.util.Arrays.toString$int_A(a);
18279          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) {
18280            return java2.util.Arrays.toString$long_A(a);
18281          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || a[0] != null) || a === null) {
18282            return java2.util.Arrays.toString$java_lang_Object_A(a);
18283          } else if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || typeof a[0] === "number") || a === null) {
18284            return java2.util.Arrays.toString$short_A(a);
18285          } else
18286            throw new Error("invalid overload");
18287        };
18288        Arrays2.toString$byte_A = function(a) {
18289          if (a == null) {
18290            return "null";
18291          }
18292          var joiner = new java2.util.StringJoiner(", ", "[", "]");
18293          for (var index = 0; index < a.length; index++) {
18294            var element = a[index];
18295            {
18296              joiner.add(
18297                /* valueOf */
18298                String(element).toString()
18299              );
18300            }
18301          }
18302          return joiner.toString();
18303        };
18304        Arrays2.toString$char_A = function(a) {
18305          if (a == null) {
18306            return "null";
18307          }
18308          var joiner = new java2.util.StringJoiner(", ", "[", "]");
18309          for (var index = 0; index < a.length; index++) {
18310            var element = a[index];
18311            {
18312              joiner.add(
18313                /* valueOf */
18314                String(element).toString()
18315              );
18316            }
18317          }
18318          return joiner.toString();
18319        };
18320        Arrays2.toString$double_A = function(a) {
18321          if (a == null) {
18322            return "null";
18323          }
18324          var joiner = new java2.util.StringJoiner(", ", "[", "]");
18325          for (var index = 0; index < a.length; index++) {
18326            var element = a[index];
18327            {
18328              joiner.add(
18329                /* valueOf */
18330                String(element).toString()
18331              );
18332            }
18333          }
18334          return joiner.toString();
18335        };
18336        Arrays2.toString$float_A = function(a) {
18337          if (a == null) {
18338            return "null";
18339          }
18340          var joiner = new java2.util.StringJoiner(", ", "[", "]");
18341          for (var index = 0; index < a.length; index++) {
18342            var element = a[index];
18343            {
18344              joiner.add(
18345                /* valueOf */
18346                String(element).toString()
18347              );
18348            }
18349          }
18350          return joiner.toString();
18351        };
18352        Arrays2.toString$int_A = function(a) {
18353          if (a == null) {
18354            return "null";
18355          }
18356          var joiner = new java2.util.StringJoiner(", ", "[", "]");
18357          for (var index = 0; index < a.length; index++) {
18358            var element = a[index];
18359            {
18360              joiner.add(
18361                /* valueOf */
18362                String(element).toString()
18363              );
18364            }
18365          }
18366          return joiner.toString();
18367        };
18368        Arrays2.toString$long_A = function(a) {
18369          if (a == null) {
18370            return "null";
18371          }
18372          var joiner = new java2.util.StringJoiner(", ", "[", "]");
18373          for (var index = 0; index < a.length; index++) {
18374            var element = a[index];
18375            {
18376              joiner.add(
18377                /* valueOf */
18378                String(element).toString()
18379              );
18380            }
18381          }
18382          return joiner.toString();
18383        };
18384        Arrays2.toString$java_lang_Object_A = function(x) {
18385          if (x == null) {
18386            return "null";
18387          }
18388          return Arrays2.asList.apply(null, x).toString();
18389        };
18390        Arrays2.toString$short_A = function(a) {
18391          if (a == null) {
18392            return "null";
18393          }
18394          var joiner = new java2.util.StringJoiner(", ", "[", "]");
18395          for (var index = 0; index < a.length; index++) {
18396            var element = a[index];
18397            {
18398              joiner.add(
18399                /* valueOf */
18400                String(element).toString()
18401              );
18402            }
18403          }
18404          return joiner.toString();
18405        };
18406        Arrays2.deepToString$java_lang_Object_A$java_util_Set = function(a, arraysIveSeen) {
18407          if (a == null) {
18408            return "null";
18409          }
18410          if (!arraysIveSeen.add(a)) {
18411            return "[...]";
18412          }
18413          var joiner = new java2.util.StringJoiner(", ", "[", "]");
18414          for (var index = 0; index < a.length; index++) {
18415            var obj = a[index];
18416            {
18417              if (obj != null && obj.constructor.isArray()) {
18418                if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || obj[0] != null)) {
18419                  if (arraysIveSeen.contains(obj)) {
18420                    joiner.add("[...]");
18421                  } else {
18422                    var objArray = obj;
18423                    var tempSet = new java2.util.HashSet(arraysIveSeen);
18424                    joiner.add(Arrays2.deepToString$java_lang_Object_A$java_util_Set(objArray, tempSet));
18425                  }
18426                } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "boolean")) {
18427                  joiner.add(Arrays2.toString$boolean_A(obj));
18428                } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "
18428number")) {
18429                  joiner.add(Arrays2.toString$byte_A(obj));
18430                } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "string")) {
18431                  joiner.add(Arrays2.toString$char_A(obj));
18432                } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "number")) {
18433                  joiner.add(Arrays2.toString$short_A(obj));
18434                } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "number")) {
18435                  joiner.add(Arrays2.toString$int_A(obj));
18436                } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "number")) {
18437                  joiner.add(Arrays2.toString$long_A(obj));
18438                } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "number")) {
18439                  joiner.add(Arrays2.toString$float_A(obj));
18440                } else if (obj != null && obj instanceof Array && (obj.length == 0 || obj[0] == null || typeof obj[0] === "number")) {
18441                  joiner.add(Arrays2.toString$double_A(obj));
18442                } else {
18443                }
18444              } else {
18445                joiner.add(
18446                  /* valueOf */
18447                  String(obj).toString()
18448                );
18449              }
18450            }
18451          }
18452          return joiner.toString();
18453        };
18454        Arrays2.deepToString = function(a, arraysIveSeen) {
18455          if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || a[0] != null) || a === null) && (arraysIveSeen != null && (arraysIveSeen.constructor != null && arraysIveSeen.constructor["__interfaces"] != null && arraysIveSeen.constructor["__interfaces"].indexOf("java.util.Set") >= 0) || arraysIveSeen === null)) {
18456            return java2.util.Arrays.deepToString$java_lang_Object_A$java_util_Set(a, arraysIveSeen);
18457          } else if ((a != null && a instanceof Array && (a.length == 0 || a[0] == null || a[0] != null) || a === null) && arraysIveSeen === void 0) {
18458            return java2.util.Arrays.deepToString$java_lang_Object_A(a);
18459          } else
18460            throw new Error("invalid overload");
18461        };
18462        Arrays2.getCopyLength = function(array, from, to) {
18463          javaemul.internal.InternalPreconditions.checkArgument(from <= to, "%s > %s", from, to);
18464          var len = javaemul.internal.ArrayHelper.getLength(array);
18465          to = Math.min(to, len);
18466          javaemul.internal.InternalPreconditions.checkCriticalPositionIndexes(from, to, len);
18467          return to - from;
18468        };
18469        Arrays2.insertionSort = function(array, low, high, comp) {
18470          for (var i = low + 1; i < high; ++i) {
18471            {
18472              for (var j = i; j > low && comp(array[j - 1], array[j]) > 0; --j) {
18473                {
18474                  var t = array[j];
18475                  array[j] = array[j - 1];
18476                  array[j - 1] = t;
18477                }
18478                ;
18479              }
18480            }
18481            ;
18482          }
18483        };
18484        Arrays2.merge = function(src, srcLow, srcMid, srcHigh, dest, destLow, destHigh, comp) {
18485          var topIdx = srcMid;
18486          while (destLow < destHigh) {
18487            {
18488              if (topIdx >= srcHigh || srcLow < srcMid && comp(src[srcLow], src[topIdx]) <= 0) {
18489                dest[destLow++] = src[srcLow++];
18490              } else {
18491                dest[destLow++] = src[topIdx++];
18492              }
18493            }
18494          }
18495          ;
18496        };
18497        Arrays2.mergeSort$java_lang_Object_A$int$int$java_util_Comparator = function(x, fromIndex, toIndex, comp) {
18498          if (comp == null) {
18499            comp = (function(funcInst) {
18500              if (funcInst == null || typeof funcInst == "function") {
18501                return funcInst;
18502              }
18503              return function(a, b) {
18504                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18505              };
18506            })(java2.util.Comparators.natural());
18507          }
18508          var temp = Arrays2.copyOfRange$java_lang_Object_A$int$int(x, fromIndex, toIndex);
18509          Arrays2.mergeSort$java_lang_Object_A$java_lang_Object_A$int$int$int$java_util_Comparator(temp, x, fromIndex, toIndex, -fromIndex, (function(funcInst) {
18510            if (funcInst == null || typeof funcInst == "function") {
18511              return funcInst;
18512            }
18513            return function(a, b) {
18514              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18515            };
18516          })((function(funcInst) {
18517            if (funcInst == null || typeof funcInst == "function") {
18518              return funcInst;
18519            }
18520            return function(a, b) {
18521              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18522            };
18523          })(comp)));
18524        };
18525        Arrays2.mergeSort$java_lang_Object_A$java_lang_Object_A$int$int$int$java_util_Comparator = function(temp, array, low, high, ofs, comp) {
18526          var length = high - low;
18527          if (length < 7) {
18528            Arrays2.insertionSort(array, low, high, (function(funcInst) {
18529              if (funcInst == null || typeof funcInst == "function") {
18530                return funcInst;
18531              }
18532              return function(a, b) {
18533                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18534              };
18535            })(comp));
18536            return;
18537          }
18538          var tempLow = low + ofs;
18539          var tempHigh = high + ofs;
18540          var tempMid = tempLow + (tempHigh - tempLow >> 1);
18541          Arrays2.mergeSort$java_lang_Object_A$java_lang_Object_A$int$int$int$java_util_Comparator(array, temp, tempLow, tempMid, -ofs, (function(funcInst) {
18542            if (funcInst == null || typeof funcInst == "function") {
18543              return funcInst;
18544            }
18545            return function(a, b) {
18546              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18547            };
18548          })(comp));
18549          Arrays2.mergeSort$java_lang_Object_A$java_lang_Object_A$int$int$int$java_util_Comparator(array, temp, tempMid, tempHigh, -ofs, (function(funcInst) {
18550            if (funcInst == null || typeof funcInst == "function") {
18551              return funcInst;
18552            }
18553            return function(a, b) {
18554              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18555            };
18556          })(comp));
18557          if (comp(temp[tempMid - 1], temp[tempMid]) <= 0) {
18558            while (low < high) {
18559              {
18560                array[low++] = temp[tempLow++];
18561              }
18562            }
18563            ;
18564            return;
18565          }
18566          Arrays2.merge(temp, tempLow, tempMid, tempHigh, array, low, high, (function(funcInst) {
18567            if (funcInst == null || typeof funcInst == "function") {
18568              return funcInst;
18569            }
18570            return function(a, b) {
18571              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18572            };
18573          })(comp));
18574        };
18575        Arrays2.mergeSort = function(temp, array, low, high, ofs, comp) {
18576          if ((temp != null && temp instanceof Array && (temp.length == 0 || temp[0] == null || temp[0] != null) || temp === null) && (array != null && array instanceof Array && (array.length == 0 || array[0] == null || array[0] != null) || array === null) && (typeof low === "number" || low === null) && (typeof high === "number" || high === null) && (typeof ofs === "
18576number" || ofs === null) && (typeof comp === "function" && comp.length === 2 || comp === null)) {
18577            return java2.util.Arrays.mergeSort$java_lang_Object_A$java_lang_Object_A$int$int$int$java_util_Comparator(temp, array, low, high, ofs, comp);
18578          } else if ((temp != null && temp instanceof Array && (temp.length == 0 || temp[0] == null || temp[0] != null) || temp === null) && (typeof array === "number" || array === null) && (typeof low === "number" || low === null) && (typeof high === "function" && high.length === 2 || high === null) && ofs === void 0 && comp === void 0) {
18579            return java2.util.Arrays.mergeSort$java_lang_Object_A$int$int$java_util_Comparator(temp, array, low, high);
18580          } else
18581            throw new Error("invalid overload");
18582        };
18583        Arrays2.nativeLongSort$java_lang_Object$java_lang_Object = function(array, compareFunction) {
18584          array.sort(compareFunction);
18585        };
18586        Arrays2.nativeLongSort$java_lang_Object$int$int = function(array, fromIndex, toIndex) {
18587          var temp = javaemul.internal.ArrayHelper.unsafeClone(array, fromIndex, toIndex);
18588          Arrays2.nativeLongSort$java_lang_Object$java_lang_Object(temp, javaemul.internal.LongCompareHolder.getLongComparator());
18589          javaemul.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(temp, 0, array, fromIndex, toIndex - fromIndex);
18590        };
18591        Arrays2.nativeLongSort = function(array, fromIndex, toIndex) {
18592          if ((array != null || array === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null)) {
18593            return java2.util.Arrays.nativeLongSort$java_lang_Object$int$int(array, fromIndex, toIndex);
18594          } else if ((array != null || array === null) && (fromIndex != null || fromIndex === null) && toIndex === void 0) {
18595            return java2.util.Arrays.nativeLongSort$java_lang_Object$java_lang_Object(array, fromIndex);
18596          } else
18597            throw new Error("invalid overload");
18598        };
18599        Arrays2.nativeNumberSort$java_lang_Object = function(array) {
18600          array.sort(function(a, b) {
18601            return a - b;
18602          });
18603        };
18604        Arrays2.nativeNumberSort$java_lang_Object$int$int = function(array, fromIndex, toIndex) {
18605          var temp = javaemul.internal.ArrayHelper.unsafeClone(array, fromIndex, toIndex);
18606          Arrays2.nativeNumberSort$java_lang_Object(temp);
18607          javaemul.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(temp, 0, array, fromIndex, toIndex - fromIndex);
18608        };
18609        Arrays2.nativeNumberSort = function(array, fromIndex, toIndex) {
18610          if ((array != null || array === null) && (typeof fromIndex === "number" || fromIndex === null) && (typeof toIndex === "number" || toIndex === null)) {
18611            return java2.util.Arrays.nativeNumberSort$java_lang_Object$int$int(array, fromIndex, toIndex);
18612          } else if ((array != null || array === null) && fromIndex === void 0 && toIndex === void 0) {
18613            return java2.util.Arrays.nativeNumberSort$java_lang_Object(array);
18614          } else
18615            throw new Error("invalid overload");
18616        };
18617        return Arrays2;
18618      })()
18619    );
18620    util2.Arrays = Arrays;
18621    Arrays["__class"] = "java.util.Arrays";
18622    (function(Arrays2) {
18623      var ArrayList = (
18624        /** @class */
18625        (function(_super) {
18626          __extends(ArrayList2, _super);
18627          function ArrayList2(array) {
18628            var _this = _super.call(this) || this;
18629            if (_this.array === void 0) {
18630              _this.array = null;
18631            }
18632            _this.array = array;
18633            return _this;
18634          }
18635          ArrayList2.prototype.contains = function(o) {
18636            return this.indexOf(o) !== -1;
18637          };
18638          ArrayList2.prototype.get = function(index) {
18639            javaemul.internal.InternalPreconditions.checkElementIndex(index, this.size());
18640            return this.array[index];
18641          };
18642          ArrayList2.prototype.set = function(index, value) {
18643            var was = this.get(index);
18644            this.array[index] = value;
18645            return was;
18646          };
18647          ArrayList2.prototype.size = function() {
18648            return this.array.length;
18649          };
18650          ArrayList2.prototype.toArray$ = function() {
18651            return this.toArray$java_lang_Object_A((function(s) {
18652              var a = [];
18653              while (s-- > 0)
18654                a.push(null);
18655              return a;
18656            })(this.array.length));
18657          };
18658          ArrayList2.prototype.toArray$java_lang_Object_A = function(out) {
18659            var size = this.size();
18660            if (out.length < size) {
18661              out = javaemul.internal.ArrayHelper.createFrom(out, size);
18662            }
18663            for (var i = 0; i < size; ++i) {
18664              {
18665                out[i] = this.array[i];
18666              }
18667              ;
18668            }
18669            if (out.length > size) {
18670              out[size] = null;
18671            }
18672            return out;
18673          };
18674          ArrayList2.prototype.toArray = function(out) {
18675            if (out != null && out instanceof Array && (out.length == 0 || out[0] == null || out[0] != null) || out === null) {
18676              return this.toArray$java_lang_Object_A(out);
18677            } else if (out === void 0) {
18678              return this.toArray$();
18679            } else
18680              throw new Error("invalid overload");
18681          };
18682          return ArrayList2;
18683        })(java2.util.AbstractList)
18684      );
18685      Arrays2.ArrayList = ArrayList;
18686      ArrayList["__class"] = "java.util.Arrays.ArrayList";
18687      ArrayList["__interfaces"] = ["java.util.RandomAccess", "java.util.List", "java.util.Collection", "java.lang.Iterable", "java.io.Serializable"];
18688    })(Arrays = util2.Arrays || (util2.Arrays = {}));
18689  })(util = java2.util || (java2.util = {}));
18690})(java || (java = {}));
18691(function(java2) {
18692  var util;
18693  (function(util2) {
18694    var PriorityQueue = (
18695      /** @class */
18696      (function(_super) {
18697        __extends(PriorityQueue2, _super);
18698        function PriorityQueue2(initialCapacity, cmp) {
18699          var _this = this;
18700          if ((typeof initialCapacity === "number" || initialCapacity === null) && (typeof cmp === "function" && cmp.length === 2 || cmp === null)) {
18701            var __args = arguments;
18702            _this = _super.call(this) || this;
18703            if (_this.cmp === void 0) {
18704              _this.cmp = null;
18705            }
18706            if (_this.heap === void 0) {
18707              _this.heap = null;
18708            }
18709            _this.heap = new java2.util.ArrayList(initialCapacity);
18710            if (cmp == null) {
18711              cmp = (function(funcInst) {
18712                if (funcInst == null || typeof funcInst == "function") {
18713                  return funcInst;
18714                }
18715                return function(a, b) {
18716                  return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18717                };
18718              })(java2.util.Comparators.natural());
18719            }
18720            _this.cmp = (function(funcInst) {
18721              if (funcInst == null || typeof funcInst == "function") {
18722                return funcInst;
18723              }
18724              return function(a, b) {
18725                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18726              };
18727            })(cmp);
18728          } else if ((typeof initialCapacity === "function" && initialCapacity.length === 2 || initialCapacity === null) && cmp === void 0) {
18729            var __args = arguments;
18730            var cp = __args[0];
18731            {
18732              var __args_28 = arguments;
18733              var initialCapacity_1 = PriorityQueue2.INITIAL_CAPACITY;
18734              var cmp_1 = cp;
18735              _this = _super.call(this) || this;
18736              if (_this.cmp === void 0) {
18737                _this.cmp = null;
18738              }
18739              if (_this.heap === void 0) {
18740                _this.heap = null;
18741              }
18742              _this.heap = new java2.util.ArrayList(initialCapacity_1);
18743              if (cmp_1 == null) {
18744                cmp_1 = (function(funcInst) {
18745                  if (funcInst == null || typeof funcInst == "function") {
18746                    return funcInst;
18747                  }
18748                  return function(a, b) {
18749                    return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18750                  };
18751                })(java2.util.Comparators.natural());
18752              }
18753              _this.cmp = (function(funcInst) {
18754                if (funcInst == null || typeof funcInst == "function") {
18755                  return funcInst;
18756                }
18757                return function(a, b) {
18758                  return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18759                };
18760              })(cmp_1);
18761            }
18762          } else if ((initialCapacity != null && initialCapacity instanceof java2.util.PriorityQueue || initialCapacity === null) && cmp === void 0) {
18763            var __args = arguments;
18764            var c_2 = __args[0];
18765            {
18766              var __args_29 = arguments;
18767              var initialCapacity_2 = c_2.size();
18768              var cmp_2 = (function(funcInst) {
18769                if (funcInst == null || typeof funcInst == "function") {
18770                  return funcInst;
18771                }
18772                return function(a, b) {
18773                  return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18774                };
18775              })(c_2.comparator());
18776              _this = _super.call(this) || this;
18777              if (_this.cmp === void 0) {
18778                _this.cmp = null;
18779              }
18780              if (_this.heap === void 0) {
18781                _this.heap = null;
18782              }
18783              _this.heap = new java2.util.ArrayList(initialCapacity_2);
18784              if (cmp_2 == null) {
18785                cmp_2 = (function(funcInst) {
18786                  if (funcInst == null || typeof funcInst == "function") {
18787                    return funcInst;
18788                  }
18789                  return function(a, b) {
18790                    return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18791                  };
18792                })(java2.util.Comparators.natural());
18793              }
18794              _this.cmp = (function(funcInst) {
18795                if (funcInst == null || typeof funcInst == "function") {
18796                  return funcInst;
18797                }
18798                return function(a, b) {
18799                  return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18800                };
18801              })(cmp_2);
18802            }
18803            (function() {
18804              _this.addAll(c_2);
18805            })();
18806          }
18806 else if ((initialCapacity != null && (initialCapacity.constructor != null && initialCapacity.constructor["__interfaces"] != null && initialCapacity.constructor["__interfaces"].indexOf("java.util.SortedSet") >= 0) || initialCapacity === null) && cmp === void 0) {
18807            var __args = arguments;
18808            var c_3 = __args[0];
18809            {
18810              var __args_30 = arguments;
18811              var initialCapacity_3 = c_3.size();
18812              var cmp_3 = (function(funcInst) {
18813                if (funcInst == null || typeof funcInst == "function") {
18814                  return funcInst;
18815                }
18816                return function(a, b) {
18817                  return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18818                };
18819              })(c_3.comparator());
18820              _this = _super.call(this) || this;
18821              if (_this.cmp === void 0) {
18822                _this.cmp = null;
18823              }
18824              if (_this.heap === void 0) {
18825                _this.heap = null;
18826              }
18827              _this.heap = new java2.util.ArrayList(initialCapacity_3);
18828              if (cmp_3 == null) {
18829                cmp_3 = (function(funcInst) {
18830                  if (funcInst == null || typeof funcInst == "function") {
18831                    return funcInst;
18832                  }
18833                  return function(a, b) {
18834                    return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18835                  };
18836                })(java2.util.Comparators.natural());
18837              }
18838              _this.cmp = (function(funcInst) {
18839                if (funcInst == null || typeof funcInst == "function") {
18840                  return funcInst;
18841                }
18842                return function(a, b) {
18843                  return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18844                };
18845              })(cmp_3);
18846            }
18847            (function() {
18848              _this.addAll(c_3);
18849            })();
18850          } else if ((initialCapacity != null && (initialCapacity.constructor != null && initialCapacity.constructor["__interfaces"] != null && initialCapacity.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || initialCapacity === null) && cmp === void 0) {
18851            var __args = arguments;
18852            var c_4 = __args[0];
18853            {
18854              var __args_31 = arguments;
18855              var initialCapacity_4 = c_4.size();
18856              {
18857                var __args_32 = arguments;
18858                var cmp_4 = null;
18859                _this = _super.call(this) || this;
18860                if (_this.cmp === void 0) {
18861                  _this.cmp = null;
18862                }
18863                if (_this.heap === void 0) {
18864                  _this.heap = null;
18865                }
18866                _this.heap = new java2.util.ArrayList(initialCapacity_4);
18867                if (cmp_4 == null) {
18868                  cmp_4 = (function(funcInst) {
18869                    if (funcInst == null || typeof funcInst == "function") {
18870                      return funcInst;
18871                    }
18872                    return function(a, b) {
18873                      return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18874                    };
18875                  })(java2.util.Comparators.natural());
18876                }
18877                _this.cmp = (function(funcInst) {
18878                  if (funcInst == null || typeof funcInst == "function") {
18879                    return funcInst;
18880                  }
18881                  return function(a, b) {
18882                    return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18883                  };
18884                })(cmp_4);
18885              }
18886            }
18887            (function() {
18888              _this.addAll(c_4);
18889            })();
18890          } else if ((typeof initialCapacity === "number" || initialCapacity === null) && cmp === void 0) {
18891            var __args = arguments;
18892            {
18893              var __args_33 = arguments;
18894              var cmp_5 = null;
18895              _this = _super.call(this) || this;
18896              if (_this.cmp === void 0) {
18897                _this.cmp = null;
18898              }
18899              if (_this.heap === void 0) {
18900                _this.heap = null;
18901              }
18902              _this.heap = new java2.util.ArrayList(initialCapacity);
18903              if (cmp_5 == null) {
18904                cmp_5 = (function(funcInst) {
18905                  if (funcInst == null || typeof funcInst == "function") {
18906                    return funcInst;
18907                  }
18908                  return function(a, b) {
18909                    return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18910                  };
18911                })(java2.util.Comparators.natural());
18912              }
18913              _this.cmp = (function(funcInst) {
18914                if (funcInst == null || typeof funcInst == "function") {
18915                  return funcInst;
18916                }
18917                return function(a, b) {
18918                  return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18919                };
18920              })(cmp_5);
18921            }
18922          } else if (initialCapacity === void 0 && cmp === void 0) {
18923            var __args = arguments;
18924            {
18925              var __args_34 = arguments;
18926              var initialCapacity_5 = PriorityQueue2.INITIAL_CAPACITY;
18927              {
18928                var __args_35 = arguments;
18929                var cmp_6 = null;
18930                _this = _super.call(this) || this;
18931                if (_this.cmp === void 0) {
18932                  _this.cmp = null;
18933                }
18934                if (_this.heap === void 0) {
18935                  _this.heap = null;
18936                }
18937                _this.heap = new java2.util.ArrayList(initialCapacity_5);
18938                if (cmp_6 == null) {
18939                  cmp_6 = (function(funcInst) {
18940                    if (funcInst == null || typeof funcInst == "function") {
18941                      return funcInst;
18942                    }
18943                    return function(a, b) {
18944                      return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18945                    };
18946                  })(java2.util.Comparators.natural());
18947                }
18948                _this.cmp = (function(funcInst) {
18949                  if (funcInst == null || typeof funcInst == "function") {
18950                    return funcInst;
18951                  }
18952                  return function(a, b) {
18953                    return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18954                  };
18955                })(cmp_6);
18956              }
18957            }
18958          } else
18959            throw new Error("invalid overload");
18960          return _this;
18961        }
18962        PriorityQueue2.getLeftChild = function(node) {
18963          return 2 * node + 1;
18964        };
18965        PriorityQueue2.getParent = function(node) {
18966          return (node - 1) / 2 | 0;
18967        };
18968        PriorityQueue2.getRightChild = function(node) {
18969          return 2 * node + 2;
18970        };
18971        PriorityQueue2.isLeaf = function(node, size) {
18972          return node * 2 + 1 >= size;
18973        };
18974        PriorityQueue2.prototype.addAll = function(c) {
18975          if (this.heap.addAll$java_util_Collection(c)) {
18976            this.makeHeap(0);
18977            return true;
18978          }
18979          return false;
18980        };
18981        PriorityQueue2.prototype.clear = function() {
18982          this.heap.clear();
18983        };
18984        PriorityQueue2.prototype.comparator = function() {
18985          return this.cmp === java2.util.Comparators.natural() ? (function(funcInst) {
18986            if (funcInst == null || typeof funcInst == "function") {
18987              return funcInst;
18988            }
18989            return function(a, b) {
18990              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18991            };
18992          })(null) : (function(funcInst) {
18993            if (funcInst == null || typeof funcInst == "function") {
18994              return funcInst;
18995            }
18996            return function(a, b) {
18997              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
18998            };
18999          })(this.cmp);
19000        };
19001        PriorityQueue2.prototype.contains = function(o) {
19002          return this.heap.contains(o);
19003        };
19004        PriorityQueue2.prototype.containsAll = function(c) {
19005          return this.heap.containsAll(c);
19006        };
19007        PriorityQueue2.prototype.isEmpty = function() {
19008          return this.heap.isEmpty();
19009        };
19010        PriorityQueue2.prototype.iterator = function() {
19011          return java2.util.Collections.unmodifiableList(this.heap).iterator();
19012        };
19013        PriorityQueue2.prototype.offer = function(e) {
19014          var node = this.heap.size();
19015          this.heap.add(e);
19016          while (node > 0) {
19017            {
19018              var childNode = node;
19019              node = PriorityQueue2.getParent(node);
19020              if (this.cmp(this.heap.get(node), e) <= 0) {
19021                this.heap.set(childNode, e);
19022                return true;
19023              }
19024              this.heap.set(childNode, this.heap.get(node));
19025            }
19026          }
19027          ;
19028          this.heap.set(node, e);
19029          return true;
19030        };
19031        PriorityQueue2.prototype.peek = function() {
19032          if (this.heap.size() === 0) {
19033            return null;
19034          }
19035          return this.heap.get(0);
19036        };
19037        PriorityQueue2.prototype.poll = function() {
19038          if (this.heap.size() === 0) {
19039            return null;
19040          }
19041          var value = this.heap.get(0);
19042          this.removeAtIndex(0);
19043          return value;
19044        };
19045        PriorityQueue2.prototype.remove$java_lang_Object = function(o) {
19046          var index = this.heap.indexOf$java_lang_Object(o);
19047          if (index < 0) {
19048            return false;
19049          }
19050          this.removeAtIndex(index);
19051          return true;
19052        };
19053        PriorityQueue2.prototype.remove = function(o) {
19054          if (o != null || o === null) {
19055            return this.remove$java_lang_Object(o);
19056          } else if (o === void 0) {
19057            return this.remove$();
19058          } else
19059            throw new Error("invalid overload");
19060        };
19061        PriorityQueue2.prototype.removeAll = function(c) {
19062          if (this.heap.removeAll(c)) {
19063            this.makeHeap(0);
19064            return true;
19065          }
19066          return false;
19067        };
19068        PriorityQueue2.prototype.retainAll = function(c) {
19069          if (this.heap.retainAll(c)) {
19070            this.makeHeap(0);
19071            return true;
19072          }
19073          return false;
19074        };
19075        PriorityQueue2.prototype.size = function() {
19076          return this.heap.size();
19077        };
19078        PriorityQueue2.prototype.toArray$ = function() {
19079          return this.heap.toArray$();
19080        };
19081        PriorityQueue2.prototype.toArray$java_lang_Object_A = function(a) {
19082          return this.heap.toArray$java_lang_Object_A(a);
19083        };
19084        PriorityQueue2.prototype.toArray = function(a) {
19085          if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || a[0] != null) || a === null) {
19086            return this.toArray$java_lang_Object_A(a);
19087          } else if (a === void 0) {
19088            return this.toArray$();
19089          } else
19090            throw new Error("invalid overload");
19091        };
19092        PriorityQueue2.prototype.toString = function() {
19093          return this.heap.toString();
19094        };
19095        PriorityQueue2.prototype.makeHeap = function(node) {
19096          if (this.isLeaf(node)) {
19097            return;
19098          }
19099          this.makeHeap(PriorityQueue2.getLeftChild(node));
19100          var rightChild = PriorityQueue2.getRightChild(node);
19101          if (rightChild < this.heap.size()) {
19102            this.makeHeap(rightChild);
19103          }
19104          this.mergeHeaps(node);
19105        };
19106        PriorityQueue2.prototype.mergeHeaps = function(node) {
19107          var heapSize = this.heap.size();
19108          var value = this.heap.get(node);
19109          while (!PriorityQueue2.isLeaf(node, heapSize)) {
19110            {
19111              var smallestChild = this.getSmallestChild(node, heapSize);
19112              if (this.cmp(value, this.heap.get(smallestChild)) < 0) {
19113                break;
19114              }
19115              this.heap.set(node, this.heap.get(smallestChild));
19116              node = smallestChild;
19117            }
19118          }
19119          ;
19120          this.heap.set(node, value);
19121        };
19122        PriorityQueue2.prototype.getSmallestChild = function(node, heapSize) {
19123          var smallestChild;
19124          var leftChild = PriorityQueue2.getLeftChild(node);
19125          var rightChild = leftChild + 1;
19126          smallestChild = leftChild;
19127          if (rightChild < heapSize && this.cmp(this.heap.get(rightChild), this.heap.get(leftChild)) < 0) {
19128            smallestChild = rightChild;
19129          }
19130          return smallestChild;
19131        };
19132        PriorityQueue2.prototype.isLeaf = function(node) {
19133          return PriorityQueue2.isLeaf(node, this.heap.size());
19134        };
19135        PriorityQueue2.prototype.removeAtIndex = function(index) {
19136          var lastValue = this.heap.remove$int(this.heap.size() - 1);
19137          if (index < this.heap.size()) {
19138            this.heap.set(index, lastValue);
19139            this.mergeHeaps(index);
19140          }
19141        };
19142        PriorityQueue2.INITIAL_CAPACITY = 11;
19143        return PriorityQueue2;
19144      })(java2.util.AbstractQueue)
19145    );
19146    util2.PriorityQueue = PriorityQueue;
19147    PriorityQueue["__class"] = "java.util.PriorityQueue";
19148    PriorityQueue["__interfaces"] = ["java.util.Collection", "java.util.Queue", "java.lang.Iterable"];
19149  })(util = java2.util || (java2.util = {}));
19150})(java || (java = {}));
19151(function(java2) {
19152  var io;
19153  (function(io2) {
19154    var PrintStream = (
19155      /** @class */
19156      (function(_super) {
19157        __extends(PrintStream2, _super);
19158        function PrintStream2(out) {
19159          return _super.call(this, out) || this;
19160        }
19161        PrintStream2.prototype.print$java_lang_String = function(s) {
19162          try {
19163            this.write$byte_A(
19164              /* getBytes */
19165              s.split("").map(function(s2) {
19166                return s2.charCodeAt(0);
19167              })
19168            );
19169          } catch (e) {
19170            console.error(e.message, e);
19171          }
19172        };
19173        PrintStream2.prototype.print = function(s) {
19174          if (typeof s === "string" || s === null) {
19175            return this.print$java_lang_String(s);
19176          } else if (s != null && s instanceof Array && (s.length == 0 || s[0] == null || typeof s[0] === "string") || s === null) {
19177            return this.print$char_A(s);
19178          } else if (typeof s === "boolean" || s === null) {
19179            return this.print$boolean(s);
19180          } else if (typeof s === "string" || s === null) {
19181            return this.print$char(s);
19182          } else if (typeof s === "number" || s === null) {
19183            return this.print$int(s);
19184          } else if (typeof s === "number" || s === null) {
19185            return this.print$long(s);
19186          } else if (typeof s === "number" || s === null) {
19187            return this.print$float(s);
19188          } else if (typeof s === "number" || s === null) {
19189            return this.print$double(s);
19190          } else if (s != null || s === null) {
19191            return this.print$java_lang_Object(s);
19192          } else
19193            throw new Error("invalid overload");
19194        };
19195        PrintStream2.prototype.println$java_lang_String = function(s) {
19196          this.print$java_lang_String(s + java2.lang.System.lineSeparator());
19197        };
19198        PrintStream2.prototype.println = function(s) {
19199          if (typeof s === "string" || s === null) {
19200            return this.println$java_lang_String(s);
19201          } else if (s != null && s instanceof Array && (s.length == 0 || s[0] == null || typeof s[0] === "string") || s === null) {
19202            return this.println$char_A(s);
19203          } else if (typeof s === "boolean" || s === null) {
19204            return this.println$boolean(s);
19205          } else if (typeof s === "string" || s === null) {
19206            return this.println$char(s);
19207          } else if (typeof s === "number" || s === null) {
19208            return this.println$int(s);
19209          }
19209 else if (typeof s === "number" || s === null) {
19210            return this.println$long(s);
19211          } else if (typeof s === "number" || s === null) {
19212            return this.println$float(s);
19213          } else if (typeof s === "number" || s === null) {
19214            return this.println$double(s);
19215          } else if (s != null || s === null) {
19216            return this.println$java_lang_Object(s);
19217          } else if (s === void 0) {
19218            return this.println$();
19219          } else
19220            throw new Error("invalid overload");
19221        };
19222        PrintStream2.prototype.print$boolean = function(x) {
19223          this.print$java_lang_String(
19224            /* valueOf */
19225            String(x).toString()
19226          );
19227        };
19228        PrintStream2.prototype.print$char = function(x) {
19229          this.print$java_lang_String(
19230            /* valueOf */
19231            String(x).toString()
19232          );
19233        };
19234        PrintStream2.prototype.print$char_A = function(x) {
19235          this.println$java_lang_String(
19236            /* valueOf */
19237            String(x).toString()
19238          );
19239        };
19240        PrintStream2.prototype.print$double = function(x) {
19241          this.print$java_lang_String(
19242            /* valueOf */
19243            String(x).toString()
19244          );
19245        };
19246        PrintStream2.prototype.print$float = function(x) {
19247          this.print$java_lang_String(
19248            /* valueOf */
19249            String(x).toString()
19250          );
19251        };
19252        PrintStream2.prototype.print$int = function(x) {
19253          this.print$java_lang_String(
19254            /* valueOf */
19255            String(x).toString()
19256          );
19257        };
19258        PrintStream2.prototype.print$long = function(x) {
19259          this.print$java_lang_String(
19260            /* valueOf */
19261            String(x).toString()
19262          );
19263        };
19264        PrintStream2.prototype.print$java_lang_Object = function(x) {
19265          this.print$java_lang_String(
19266            /* valueOf */
19267            String(x).toString()
19268          );
19269        };
19270        PrintStream2.prototype.println$ = function() {
19271          this.println$java_lang_String("");
19272        };
19273        PrintStream2.prototype.println$boolean = function(x) {
19274          this.println$java_lang_String(
19275            /* valueOf */
19276            String(x).toString()
19277          );
19278        };
19279        PrintStream2.prototype.println$char = function(x) {
19280          this.println$java_lang_String(
19281            /* valueOf */
19282            String(x).toString()
19283          );
19284        };
19285        PrintStream2.prototype.println$char_A = function(x) {
19286          this.println$java_lang_String(
19287            /* valueOf */
19288            String(x).toString()
19289          );
19290        };
19291        PrintStream2.prototype.println$double = function(x) {
19292          this.println$java_lang_String(
19293            /* valueOf */
19294            String(x).toString()
19295          );
19296        };
19297        PrintStream2.prototype.println$float = function(x) {
19298          this.println$java_lang_String(
19299            /* valueOf */
19300            String(x).toString()
19301          );
19302        };
19303        PrintStream2.prototype.println$int = function(x) {
19304          this.println$java_lang_String(
19305            /* valueOf */
19306            String(x).toString()
19307          );
19308        };
19309        PrintStream2.prototype.println$long = function(x) {
19310          this.println$java_lang_String(
19311            /* valueOf */
19312            String(x).toString()
19313          );
19314        };
19315        PrintStream2.prototype.println$java_lang_Object = function(x) {
19316          this.println$java_lang_String(
19317            /* valueOf */
19318            String(x).toString()
19319          );
19320        };
19321        return PrintStream2;
19322      })(java2.io.FilterOutputStream)
19323    );
19324    io2.PrintStream = PrintStream;
19325    PrintStream["__class"] = "java.io.PrintStream";
19326    PrintStream["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable", "java.io.Flushable"];
19327  })(io = java2.io || (java2.io = {}));
19328})(java || (java = {}));
19329(function(java2) {
19330  var security;
19331  (function(security2) {
19332    var DigestException = (
19333      /** @class */
19334      (function(_super) {
19335        __extends(DigestException2, _super);
19336        function DigestException2(msg) {
19337          var _this = this;
19338          if (typeof msg === "string" || msg === null) {
19339            var __args = arguments;
19340            _this = _super.call(this, msg) || this;
19341          } else if (msg === void 0) {
19342            var __args = arguments;
19343            _this = _super.call(this) || this;
19344          } else
19345            throw new Error("invalid overload");
19346          return _this;
19347        }
19348        return DigestException2;
19349      })(java2.security.GeneralSecurityException)
19350    );
19351    security2.DigestException = DigestException;
19352    DigestException["__class"] = "java.security.DigestException";
19353    DigestException["__interfaces"] = ["java.io.Serializable"];
19354  })(security = java2.security || (java2.security = {}));
19355})(java || (java = {}));
19356(function(java2) {
19357  var security;
19358  (function(security2) {
19359    var NoSuchAlgorithmException = (
19360      /** @class */
19361      (function(_super) {
19362        __extends(NoSuchAlgorithmException2, _super);
19363        function NoSuchAlgorithmException2(msg) {
19364          var _this = this;
19365          if (typeof msg === "string" || msg === null) {
19366            var __args = arguments;
19367            _this = _super.call(this, msg) || this;
19368          } else if (msg === void 0) {
19369            var __args = arguments;
19370            _this = _super.call(this) || this;
19371          } else
19372            throw new Error("invalid overload");
19373          return _this;
19374        }
19375        return NoSuchAlgorithmException2;
19376      })(java2.security.GeneralSecurityException)
19377    );
19378    security2.NoSuchAlgorithmException = NoSuchAlgorithmException;
19379    NoSuchAlgorithmException["__class"] = "java.security.NoSuchAlgorithmException";
19380    NoSuchAlgorithmException["__interfaces"] = ["java.io.Serializable"];
19381  })(security = java2.security || (java2.security = {}));
19382})(java || (java = {}));
19383(function(java2) {
19384  var io;
19385  (function(io2) {
19386    var UnsupportedEncodingException = (
19387      /** @class */
19388      (function(_super) {
19389        __extends(UnsupportedEncodingException2, _super);
19390        function UnsupportedEncodingException2(msg) {
19391          var _this = this;
19392          if (typeof msg === "string" || msg === null) {
19393            var __args = arguments;
19394            _this = _super.call(this, msg) || this;
19395          } else if (msg === void 0) {
19396            var __args = arguments;
19397            _this = _super.call(this) || this;
19398          } else
19399            throw new Error("invalid overload");
19400          return _this;
19401        }
19402        return UnsupportedEncodingException2;
19403      })(java2.io.IOException)
19404    );
19405    io2.UnsupportedEncodingException = UnsupportedEncodingException;
19406    UnsupportedEncodingException["__class"] = "java.io.UnsupportedEncodingException";
19407    UnsupportedEncodingException["__interfaces"] = ["java.io.Serializable"];
19408  })(io = java2.io || (java2.io = {}));
19409})(java || (java = {}));
19410(function(javaemul13) {
19411  var internal;
19412  (function(internal2) {
19413    var stream;
19414    (function(stream2) {
19415      var StopException = (
19416        /** @class */
19417        (function(_super) {
19418          __extends(StopException2, _super);
19419          function StopException2() {
19420            var _this = _super.call(this) || this;
19421            Object.setPrototypeOf(_this, StopException2.prototype);
19422            return _this;
19423          }
19424          return StopException2;
19425        })(java.lang.RuntimeException)
19426      );
19427      stream2.StopException = StopException;
19428      StopException["__class"] = "javaemul.internal.stream.StopException";
19429      StopException["__interfaces"] = ["java.io.Serializable"];
19430    })(stream = internal2.stream || (internal2.stream = {}));
19431  })(internal = javaemul13.internal || (javaemul13.internal = {}));
19432})(javaemul || (javaemul = {}));
19433(function(java2) {
19434  var util;
19435  (function(util2) {
19436    var MissingResourceException = (
19437      /** @class */
19438      (function(_super) {
19439        __extends(MissingResourceException2, _super);
19440        function MissingResourceException2(s, className, key) {
19441          var _this = _super.call(this, s) || this;
19442          Object.setPrototypeOf(_this, MissingResourceException2.prototype);
19443          if (_this.className === void 0) {
19444            _this.className = null;
19445          }
19446          if (_this.key === void 0) {
19447            _this.key = null;
19448          }
19449          _this.key = key;
19450          _this.className = className;
19451          return _this;
19452        }
19453        MissingResourceException2.prototype.getClassName = function() {
19454          return this.className;
19455        };
19456        MissingResourceException2.prototype.getKey = function() {
19457          return this.key;
19458        };
19459        return MissingResourceException2;
19460      })(java2.lang.RuntimeException)
19461    );
19462    util2.MissingResourceException = MissingResourceException;
19463    MissingResourceException["__class"] = "java.util.MissingResourceException";
19464    MissingResourceException["__interfaces"] = ["java.io.Serializable"];
19465  })(util = java2.util || (java2.util = {}));
19466})(java || (java = {}));
19467(function(java2) {
19468  var util;
19469  (function(util2) {
19470    var ConcurrentModificationException = (
19471      /** @class */
19472      (function(_super) {
19473        __extends(ConcurrentModificationException2, _super);
19474        function ConcurrentModificationException2(message) {
19475          var _this = this;
19476          if (typeof message === "string" || message === null) {
19477            var __args = arguments;
19478            _this = _super.call(this, message) || this;
19479          } else if (message === void 0) {
19480            var __args = arguments;
19481            _this = _super.call(this) || this;
19482          } else
19483            throw new Error("invalid overload");
19484          return _this;
19485        }
19486        return ConcurrentModificationException2;
19487      })(java2.lang.RuntimeException)
19488    );
19489    util2.ConcurrentModificationException = ConcurrentModificationException;
19490    ConcurrentModificationException["__class"] = "java.util.ConcurrentModificationException";
19491    ConcurrentModificationException["__interfaces"] = ["java.io.Serializable"];
19492  })(util = java2.util || (java2.util = {}));
19493})(java || (java = {}));
19494(function(java2) {
19495  var util;
19496  (function(util2) {
19497    var NoSuchElementException = (
19498      /** @class */
19499      (function(_super) {
19500        __extends(NoSuchElementException2, _super);
19501        function NoSuchElementException2(s) {
19502          var _this = this;
19503          if (typeof s === "string" || s === null) {
19504            var __args = arguments;
19505            _this = _super.call(this, s) || this;
19506          } else if (s === void 0) {
19507            var __args = arguments;
19508            _this = _super.call(this) || this;
19509          } else
19510            throw new Error("invalid overload");
19511          return _this;
19512        }
19513        return NoSuchElementException2;
19514      })(java2.lang.RuntimeException)
19515    );
19516    util2.NoSuchElementException = NoSuchElementException;
19517    NoSuchElementException["__class"] = "java.util.NoSuchElementException";
19518    NoSuchElementException["__interfaces"] = ["java.io.Serializable"];
19519  })(util = java2.util || (java2.util = {}));
19520})(java || (java = {}));
19521(function(java2) {
19522  var util;
19523  (function(util2) {
19524    var EmptyStackException = (
19525      /** @class */
19526      (function(_super) {
19527        __extends(EmptyStackException2, _super);
19528        function EmptyStackException2() {
19529          var _this = _super.call(this) || this;
19530          Object.setPrototypeOf(_this, EmptyStackException2.prototype);
19531          return _this;
19532        }
19533        return EmptyStackException2;
19534      })(java2.lang.RuntimeException)
19535    );
19536    util2.EmptyStackException = EmptyStackException;
19537    EmptyStackException["__class"] = "java.util.EmptyStackException";
19538    EmptyStackException["__interfaces"] = ["java.io.Serializable"];
19539  })(util = java2.util || (java2.util = {}));
19540})(java || (java = {}));
19541(function(java2) {
19542  var io;
19543  (function(io2) {
19544    var UncheckedIOException = (
19545      /** @class */
19546      (function(_super) {
19547        __extends(UncheckedIOException2, _super);
19548        function UncheckedIOException2(message, cause) {
19549          var _this = this;
19550          if ((typeof message === "string" || message === null) && (cause != null && cause instanceof java2.io.IOException || cause === null)) {
19551            var __args = arguments;
19552            _this = _super.call(this, message, javaemul.internal.InternalPreconditions.checkNotNull(cause)) || this;
19553          } else if ((message != null && message instanceof java2.io.IOException || message === null) && cause === void 0) {
19554            var __args = arguments;
19555            var cause_7 = __args[0];
19556            _this = _super.call(this, javaemul.internal.InternalPreconditions.checkNotNull(cause_7)) || this;
19557          } else
19558            throw new Error("invalid overload");
19559          return _this;
19560        }
19561        UncheckedIOException2.prototype.getCause = function() {
19562          return null;
19563        };
19564        return UncheckedIOException2;
19565      })(java2.lang.RuntimeException)
19566    );
19567    io2.UncheckedIOException = UncheckedIOException;
19568    UncheckedIOException["__class"] = "java.io.UncheckedIOException";
19569    UncheckedIOException["__interfaces"] = ["java.io.Serializable"];
19570  })(io = java2.io || (java2.io = {}));
19571})(java || (java = {}));
19572(function(java2) {
19573  var lang;
19574  (function(lang2) {
19575    var IllegalStateException = (
19576      /** @class */
19577      (function(_super) {
19578        __extends(IllegalStateException2, _super);
19579        function IllegalStateException2(message, cause) {
19580          var _this = this;
19581          if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null)) {
19582            var __args = arguments;
19583            _this = _super.call(this, message, cause) || this;
19584          } else if ((typeof message === "string" || message === null) && cause === void 0) {
19585            var __args = arguments;
19586            var s = __args[0];
19587            _this = _super.call(this, s) || this;
19588          } else if ((message != null && message instanceof Error || message === null) && cause === void 0) {
19589            var __args = arguments;
19590            var cause_8 = __args[0];
19591            _this = _super.call(this, cause_8) || this;
19592          } else if (message === void 0 && cause === void 0) {
19593            var __args = arguments;
19594            _this = _super.call(this) || this;
19595          } else
19596            throw new Error("invalid overload");
19597          return _this;
19598        }
19599        return IllegalStateException2;
19600      })(java2.lang.RuntimeException)
19601    );
19602    lang2.IllegalStateException = IllegalStateException;
19603    IllegalStateException["__class"] = "java.lang.IllegalStateException";
19604    IllegalStateException["__interfaces"] = ["java.io.Serializable"];
19605  })(lang = java2.lang || (java2.lang = {}));
19606})(java || (java = {}));
19607(function(java2) {
19608  var lang;
19609  (function(lang2) {
19610    var NullPointerException = (
19611      /** @class */
19612      (function(_super) {
19613        __extends(NullPointerException2, _super);
19614        function NullPointerException2(message) {
19615          var _this = this;
19616          if (typeof message === "string" || message === null) {
19617            var __args = arguments;
19618            _this = _super.call(this, message) || this;
19619          } else if (message === void 0) {
19620            var __args = arguments;
19621            _this = _super.call(this) || this;
19622          } else
19623            throw new Error("invalid overload");
19624          return _this;
19625        }
19626        NullPointerException2.prototype.createError = function(msg) {
19627          return new TypeError(msg);
19628        };
19629        return NullPointerException2;
19630      })(java2.lang.RuntimeException)
19631    );
19632    lang2.NullPointerException = NullPointerException;
19633    NullPointerException["__class"] = "java.lang.NullPointerException";
19634    NullPointerException["__interfaces"] = ["java.io.Serializable"];
19635  })(lang = java2.lang || (java2.lang = {}));
19636})(java || (java = {}));
19637(function(java2) {
19638  var lang;
19639  (function(lang2) {
19640    var IllegalAccessException = (
19641      /** @class */
19642      (function(_super) {
19643        __extends(IllegalAccessException2, _super);
19644        function IllegalAccessException2(message, cause) {
19645          var _this = this;
19646          if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null)) {
19647            var __args = arguments;
19648           
19648 _this = _super.call(this, message, cause) || this;
19649          } else if ((typeof message === "string" || message === null) && cause === void 0) {
19650            var __args = arguments;
19651            var s = __args[0];
19652            _this = _super.call(this, s) || this;
19653          } else if ((message != null && message instanceof Error || message === null) && cause === void 0) {
19654            var __args = arguments;
19655            var cause_9 = __args[0];
19656            _this = _super.call(this, cause_9) || this;
19657          } else if (message === void 0 && cause === void 0) {
19658            var __args = arguments;
19659            _this = _super.call(this) || this;
19660          } else
19661            throw new Error("invalid overload");
19662          return _this;
19663        }
19664        return IllegalAccessException2;
19665      })(java2.lang.RuntimeException)
19666    );
19667    lang2.IllegalAccessException = IllegalAccessException;
19668    IllegalAccessException["__class"] = "java.lang.IllegalAccessException";
19669    IllegalAccessException["__interfaces"] = ["java.io.Serializable"];
19670  })(lang = java2.lang || (java2.lang = {}));
19671})(java || (java = {}));
19672(function(java2) {
19673  var lang;
19674  (function(lang2) {
19675    var IllegalArgumentException = (
19676      /** @class */
19677      (function(_super) {
19678        __extends(IllegalArgumentException2, _super);
19679        function IllegalArgumentException2(message, cause) {
19680          var _this = this;
19681          if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null)) {
19682            var __args = arguments;
19683            _this = _super.call(this, message, cause) || this;
19684          } else if ((typeof message === "string" || message === null) && cause === void 0) {
19685            var __args = arguments;
19686            _this = _super.call(this, message) || this;
19687          } else if ((message != null && message instanceof Error || message === null) && cause === void 0) {
19688            var __args = arguments;
19689            var cause_10 = __args[0];
19690            _this = _super.call(this, cause_10) || this;
19691          } else if (message === void 0 && cause === void 0) {
19692            var __args = arguments;
19693            _this = _super.call(this) || this;
19694          } else
19695            throw new Error("invalid overload");
19696          return _this;
19697        }
19698        return IllegalArgumentException2;
19699      })(java2.lang.RuntimeException)
19700    );
19701    lang2.IllegalArgumentException = IllegalArgumentException;
19702    IllegalArgumentException["__class"] = "java.lang.IllegalArgumentException";
19703    IllegalArgumentException["__interfaces"] = ["java.io.Serializable"];
19704  })(lang = java2.lang || (java2.lang = {}));
19705})(java || (java = {}));
19706(function(java2) {
19707  var lang;
19708  (function(lang2) {
19709    var annotation;
19710    (function(annotation2) {
19711      var AnnotationTypeMismatchException = (
19712        /** @class */
19713        (function(_super) {
19714          __extends(AnnotationTypeMismatchException2, _super);
19715          function AnnotationTypeMismatchException2() {
19716            var _this = _super.call(this) || this;
19717            Object.setPrototypeOf(_this, AnnotationTypeMismatchException2.prototype);
19718            return _this;
19719          }
19720          return AnnotationTypeMismatchException2;
19721        })(java2.lang.RuntimeException)
19722      );
19723      annotation2.AnnotationTypeMismatchException = AnnotationTypeMismatchException;
19724      AnnotationTypeMismatchException["__class"] = "java.lang.annotation.AnnotationTypeMismatchException";
19725      AnnotationTypeMismatchException["__interfaces"] = ["java.io.Serializable"];
19726    })(annotation = lang2.annotation || (lang2.annotation = {}));
19727  })(lang = java2.lang || (java2.lang = {}));
19728})(java || (java = {}));
19729(function(java2) {
19730  var lang;
19731  (function(lang2) {
19732    var annotation;
19733    (function(annotation2) {
19734      var IncompleteAnnotationException = (
19735        /** @class */
19736        (function(_super) {
19737          __extends(IncompleteAnnotationException2, _super);
19738          function IncompleteAnnotationException2(annotationType, elementName) {
19739            var _this = _super.call(this, "Incomplete annotation: trying to access " + elementName + " on " + annotationType) || this;
19740            Object.setPrototypeOf(_this, IncompleteAnnotationException2.prototype);
19741            if (_this.__annotationType === void 0) {
19742              _this.__annotationType = null;
19743            }
19744            if (_this.__elementName === void 0) {
19745              _this.__elementName = null;
19746            }
19747            _this.__annotationType = annotationType;
19748            _this.__elementName = elementName;
19749            return _this;
19750          }
19751          IncompleteAnnotationException2.prototype.annotationType = function() {
19752            return this.__annotationType;
19753          };
19754          IncompleteAnnotationException2.prototype.elementName = function() {
19755            return this.__elementName;
19756          };
19757          return IncompleteAnnotationException2;
19758        })(java2.lang.RuntimeException)
19759      );
19760      annotation2.IncompleteAnnotationException = IncompleteAnnotationException;
19761      IncompleteAnnotationException["__class"] = "java.lang.annotation.IncompleteAnnotationException";
19762      IncompleteAnnotationException["__interfaces"] = ["java.io.Serializable"];
19763    })(annotation = lang2.annotation || (lang2.annotation = {}));
19764  })(lang = java2.lang || (java2.lang = {}));
19765})(java || (java = {}));
19766(function(java2) {
19767  var lang;
19768  (function(lang2) {
19769    var ClassCastException = (
19770      /** @class */
19771      (function(_super) {
19772        __extends(ClassCastException2, _super);
19773        function ClassCastException2(message) {
19774          var _this = this;
19775          if (typeof message === "string" || message === null) {
19776            var __args = arguments;
19777            _this = _super.call(this, message) || this;
19778          } else if (message === void 0) {
19779            var __args = arguments;
19780            _this = _super.call(this) || this;
19781          } else
19782            throw new Error("invalid overload");
19783          return _this;
19784        }
19785        return ClassCastException2;
19786      })(java2.lang.RuntimeException)
19787    );
19788    lang2.ClassCastException = ClassCastException;
19789    ClassCastException["__class"] = "java.lang.ClassCastException";
19790    ClassCastException["__interfaces"] = ["java.io.Serializable"];
19791  })(lang = java2.lang || (java2.lang = {}));
19792})(java || (java = {}));
19793(function(java2) {
19794  var lang;
19795  (function(lang2) {
19796    var NegativeArraySizeException = (
19797      /** @class */
19798      (function(_super) {
19799        __extends(NegativeArraySizeException2, _super);
19800        function NegativeArraySizeException2(message) {
19801          var _this = this;
19802          if (typeof message === "string" || message === null) {
19803            var __args = arguments;
19804            _this = _super.call(this, message) || this;
19805          } else if (message === void 0) {
19806            var __args = arguments;
19807            _this = _super.call(this) || this;
19808          } else
19809            throw new Error("invalid overload");
19810          return _this;
19811        }
19812        return NegativeArraySizeException2;
19813      })(java2.lang.RuntimeException)
19814    );
19815    lang2.NegativeArraySizeException = NegativeArraySizeException;
19816    NegativeArraySizeException["__class"] = "java.lang.NegativeArraySizeException";
19817    NegativeArraySizeException["__interfaces"] = ["java.io.Serializable"];
19818  })(lang = java2.lang || (java2.lang = {}));
19819})(java || (java = {}));
19820(function(java2) {
19821  var lang;
19822  (function(lang2) {
19823    var ArrayStoreException = (
19824      /** @class */
19825      (function(_super) {
19826        __extends(ArrayStoreException2, _super);
19827        function ArrayStoreException2(message) {
19828          var _this = this;
19829          if (typeof message === "string" || message === null) {
19830            var __args = arguments;
19831            _this = _super.call(this, message) || this;
19832          } else if (message === void 0) {
19833            var __args = arguments;
19834            _this = _super.call(this) || this;
19835          } else
19836            throw new Error("invalid overload");
19837          return _this;
19838        }
19839        return ArrayStoreException2;
19840      })(java2.lang.RuntimeException)
19841    );
19842    lang2.ArrayStoreException = ArrayStoreException;
19843    ArrayStoreException["__class"] = "java.lang.ArrayStoreException";
19844    ArrayStoreException["__interfaces"] = ["java.io.Serializable"];
19845  })(lang = java2.lang || (java2.lang = {}));
19846})(java || (java = {}));
19847(function(java2) {
19848  var lang;
19849  (function(lang2) {
19850    var ArithmeticException = (
19851      /** @class */
19852      (function(_super) {
19853        __extends(ArithmeticException2, _super);
19854        function ArithmeticException2(explanation) {
19855          var _this = this;
19856          if (typeof explanation === "string" || explanation === null) {
19857            var __args = arguments;
19858            _this = _super.call(this, explanation) || this;
19859          } else if (explanation === void 0) {
19860            var __args = arguments;
19861            _this = _super.call(this) || this;
19862          } else
19863            throw new Error("invalid overload");
19864          return _this;
19865        }
19866        return ArithmeticException2;
19867      })(java2.lang.RuntimeException)
19868    );
19869    lang2.ArithmeticException = ArithmeticException;
19870    ArithmeticException["__class"] = "java.lang.ArithmeticException";
19871    ArithmeticException["__interfaces"] = ["java.io.Serializable"];
19872  })(lang = java2.lang || (java2.lang = {}));
19873})(java || (java = {}));
19874(function(java2) {
19875  var lang;
19876  (function(lang2) {
19877    var UnsupportedOperationException = (
19878      /** @class */
19879      (function(_super) {
19880        __extends(UnsupportedOperationException2, _super);
19881        function UnsupportedOperationException2(message, cause) {
19882          var _this = this;
19883          if ((typeof message === "string" || message === null) && (cause != null && cause instanceof Error || cause === null)) {
19884            var __args = arguments;
19885            _this = _super.call(this, message, cause) || this;
19886          } else if ((typeof message === "string" || message === null) && cause === void 0) {
19887            var __args = arguments;
19888            _this = _super.call(this, message) || this;
19889          } else if ((message != null && message instanceof Error || message === null) && cause === void 0) {
19890            var __args = arguments;
19891            var cause_11 = __args[0];
19892            _this = _super.call(this, cause_11) || this;
19893          } else if (message === void 0 && cause === void 0) {
19894            var __args = arguments;
19895            _this = _super.call(this) || this;
19896          } else
19897            throw new Error("invalid overload");
19898          return _this;
19899        }
19900        return UnsupportedOperationException2;
19901      })(java2.lang.RuntimeException)
19902    );
19903    lang2.UnsupportedOperationException = UnsupportedOperationException;
19904    UnsupportedOperationException["__class"] = "java.lang.UnsupportedOperationException";
19905    UnsupportedOperationException["__interfaces"] = ["java.io.Serializable"];
19906  })(lang = java2.lang || (java2.lang = {}));
19907})(java || (java = {}));
19908(function(java2) {
19909  var lang;
19910  (function(lang2) {
19911    var IndexOutOfBoundsException = (
19912      /** @class */
19913      (function(_super) {
19914        __extends(IndexOutOfBoundsException2, _super);
19915        function IndexOutOfBoundsException2(message) {
19916          var _this = this;
19917          if (typeof message === "string" || message === null) {
19918            var __args = arguments;
19919            _this = _super.call(this, message) || this;
19920          } else if (message === void 0) {
19921            var __args = arguments;
19922            _this = _super.call(this) || this;
19923          } else
19924            throw new Error("invalid overload");
19925          return _this;
19926        }
19927        return IndexOutOfBoundsException2;
19928      })(java2.lang.RuntimeException)
19929    );
19930    lang2.IndexOutOfBoundsException = IndexOutOfBoundsException;
19931    IndexOutOfBoundsException["__class"] = "java.lang.IndexOutOfBoundsException";
19932    IndexOutOfBoundsException["__interfaces"] = ["java.io.Serializable"];
19933  })(lang = java2.lang || (java2.lang = {}));
19934})(java || (java = {}));
19935(function(java2) {
19936  var nio;
19937  (function(nio2) {
19938    var BufferUnderflowException = (
19939      /** @class */
19940      (function(_super) {
19941        __extends(BufferUnderflowException2, _super);
19942        function BufferUnderflowException2() {
19943          var _this = _super.call(this) || this;
19944          Object.setPrototypeOf(_this, BufferUnderflowException2.prototype);
19945          return _this;
19946        }
19947        return BufferUnderflowException2;
19948      })(java2.lang.RuntimeException)
19949    );
19950    nio2.BufferUnderflowException = BufferUnderflowException;
19951    BufferUnderflowException["__class"] = "java.nio.BufferUnderflowException";
19952    BufferUnderflowException["__interfaces"] = ["java.io.Serializable"];
19953  })(nio = java2.nio || (java2.nio = {}));
19954})(java || (java = {}));
19955(function(java2) {
19956  var nio;
19957  (function(nio2) {
19958    var BufferOverflowException = (
19959      /** @class */
19960      (function(_super) {
19961        __extends(BufferOverflowException2, _super);
19962        function BufferOverflowException2() {
19963          var _this = _super.call(this) || this;
19964          Object.setPrototypeOf(_this, BufferOverflowException2.prototype);
19965          return _this;
19966        }
19967        return BufferOverflowException2;
19968      })(java2.lang.RuntimeException)
19969    );
19970    nio2.BufferOverflowException = BufferOverflowException;
19971    BufferOverflowException["__class"] = "java.nio.BufferOverflowException";
19972    BufferOverflowException["__interfaces"] = ["java.io.Serializable"];
19973  })(nio = java2.nio || (java2.nio = {}));
19974})(java || (java = {}));
19975(function(java2) {
19976  var lang;
19977  (function(lang2) {
19978    var InstantiationException = (
19979      /** @class */
19980      (function(_super) {
19981        __extends(InstantiationException2, _super);
19982        function InstantiationException2(s) {
19983          var _this = this;
19984          if (typeof s === "string" || s === null) {
19985            var __args = arguments;
19986            _this = _super.call(this, s) || this;
19987          } else if (s === void 0) {
19988            var __args = arguments;
19989            _this = _super.call(this) || this;
19990          } else
19991            throw new Error("invalid overload");
19992          return _this;
19993        }
19994        return InstantiationException2;
19995      })(java2.lang.ReflectiveOperationException)
19996    );
19997    lang2.InstantiationException = InstantiationException;
19998    InstantiationException["__class"] = "java.lang.InstantiationException";
19999    InstantiationException["__interfaces"] = ["java.io.Serializable"];
20000  })(lang = java2.lang || (java2.lang = {}));
20001})(java || (java = {}));
20002(function(java2) {
20003  var nio;
20004  (function(nio2) {
20005    var charset;
20006    (function(charset2) {
20007      var StandardCharsets = (
20008        /** @class */
20009        (function() {
20010          function StandardCharsets2() {
20011          }
20012          StandardCharsets2.ISO_8859_1_$LI$ = function() {
20013            if (StandardCharsets2.ISO_8859_1 == null) {
20014              StandardCharsets2.ISO_8859_1 = javaemul.internal.EmulatedCharset.ISO_8859_1_$LI$();
20015            }
20016            return StandardCharsets2.ISO_8859_1;
20017          };
20018          StandardCharsets2.UTF_8_$LI$ = function() {
20019            if (StandardCharsets2.UTF_8 == null) {
20020              StandardCharsets2.UTF_8 = javaemul.internal.EmulatedCharset.UTF_8_$LI$();
20021            }
20022            return StandardCharsets2.UTF_8;
20023          };
20024          return StandardCharsets2;
20025        })()
20026      );
20027      charset2.StandardCharsets = StandardCharsets;
20028      StandardCharsets["__class"] = "java.nio.charset.StandardCharsets";
20029    })(charset = nio2.charset || (nio2.charset = {}));
20030  })(nio = java2.nio || (java2.nio = {}));
20031})(java || (java = {}));
20032(function(java2) {
20033  var util;
20034  (function(util2) {
20035    var AbstractHashMap = (
20036      /** @class */
20037      (function(_super) {
20038        __extends(AbstractHashMap2, _super);
20039        function AbstractHashMap2(ignored, alsoIgnored) {
20040          var _this = this;
20041          if ((typeof ignored === "number" || ignored === null) && (typeof alsoIgnored === "number" || alsoIgnored === null)) {
20042            var __args = arguments;
20043            _this = _super.call(this) || this;
20044            if (_this.hashCodeMap === void 0) {
20045              _this.hashCodeMap = null;
20046            }
20047            if (_this.stringMap === void 0) {
20048              _this.stringMap = null;
20049            }
20050            javaemul.internal.InternalPreconditions.checkArgument(ignored >= 0, "Negative initial capacity");
20051            javaemul.internal.InternalPreconditions.checkArgument(alsoIgnored >= 0, "Non-positive load factor");
20052            _this.reset();
20053          } else if ((ignored != null && (ignored.constructor != null && ignored.constructor["__interfaces"] != null && ignored.constructor["__interfaces"].indexOf("java.util.Map") >= 0) || ignored === null) && alsoIgnored === void 0) {
20054            var __args = arguments;
20055            var toBeCopied = __args[0];
20056            _this = _super.call(this) || this;
20057            if (_this.hashCodeMap === void 0) {
20058              _this.hashCodeMap = null;
20059            }
20060            if (_this.stringMap === void 0) {
20061              _this.stringMap = null;
20062            }
20063            _this.reset();
20064            _this.putAll(toBeCopied);
20065          } else if ((typeof ignored === "number" || ignored === null) && alsoIgnored === void 0) {
20066            var __args = arguments;
20067            {
20068              var __args_36 = arguments;
20069              var alsoIgnored_1 = 0;
20070              _this = _super.call(this) || this;
20071              if (_this.hashCodeMap === void 0) {
20072                _this.hashCodeMap = null;
20073              }
20074              if (_this.stringMap === void 0) {
20075                _this.stringMap = null;
20076              }
20077              javaemul.internal.InternalPreconditions.checkArgument(ignored >= 0, "Negative initial capacity");
20078              javaemul.internal.InternalPreconditions.checkArgument(alsoIgnored_1 >= 0, "Non-positive load factor");
20079              _this.reset();
20080            }
20081          } else if (ignored === void 0 && alsoIgnored === void 0) {
20082            var __args = arguments;
20083            _this = _super.call(this) || this;
20084            if (_this.hashCodeMap === void 0) {
20085              _this.hashCodeMap = null;
20086            }
20087            if (_this.stringMap === void 0) {
20088              _this.stringMap = null;
20089            }
20090            _this.reset();
20091          } else
20092            throw new Error("invalid overload");
20093          return _this;
20094        }
20095        AbstractHashMap2.prototype.clear = function() {
20096          this.reset();
20097        };
20098        AbstractHashMap2.prototype.reset = function() {
20099          this.hashCodeMap = new java2.util.InternalHashCodeMap(this);
20100          this.stringMap = new java2.util.InternalStringMap(this);
20101          java2.util.ConcurrentModificationDetector.structureChanged(this);
20102        };
20103        AbstractHashMap2.prototype.containsKey = function(key) {
20104          return typeof key === "string" ? this.hasStringValue(javaemul.internal.JsUtils.unsafeCastToString(key)) : this.hasHashValue(key);
20105        };
20106        AbstractHashMap2.prototype.containsValue = function(value) {
20107          return this._containsValue(value, this.stringMap) || this._containsValue(value, this.hashCodeMap);
20108        };
20109        AbstractHashMap2.prototype._containsValue = function(value, entries) {
20110          for (var index = entries.iterator(); index.hasNext(); ) {
20111            var entry = index.next();
20112            {
20113              if (this._equals(value, entry.getValue())) {
20114                return true;
20115              }
20116            }
20117          }
20118          return false;
20119        };
20120        AbstractHashMap2.prototype.entrySet = function() {
20121          return new AbstractHashMap2.EntrySet(this);
20122        };
20123        AbstractHashMap2.prototype.get = function(key) {
20124          var v = typeof key === "string" ? this.getStringValue(javaemul.internal.JsUtils.unsafeCastToString(key)) : this.getHashValue(key);
20125          return v === void 0 ? null : v;
20126        };
20127        AbstractHashMap2.prototype.put = function(key, value) {
20128          return typeof key === "string" ? this.putStringValue(javaemul.internal.JsUtils.unsafeCastToString(key), value) : this.putHashValue(key, value);
20129        };
20130        AbstractHashMap2.prototype.remove = function(key) {
20131          return typeof key === "string" ? this.removeStringValue(javaemul.internal.JsUtils.unsafeCastToString(key)) : this.removeHashValue(key);
20132        };
20133        AbstractHashMap2.prototype.size = function() {
20134          return this.hashCodeMap.size() + this.stringMap.getSize();
20135        };
20136        AbstractHashMap2.prototype.getHashValue = function(key) {
20137          return util2.AbstractMap.getEntryValueOrNull(this.hashCodeMap.getEntry(key));
20138        };
20139        AbstractHashMap2.prototype.getStringValue = function(key) {
20140          return key == null ? this.getHashValue(null) : this.stringMap.get(key);
20141        };
20142        AbstractHashMap2.prototype.hasHashValue = function(key) {
20143          return this.hashCodeMap.getEntry(key) != null;
20144        };
20145        AbstractHashMap2.prototype.hasStringValue = function(key) {
20146          return key == null ? this.hasHashValue(null) : this.stringMap.contains(key);
20147        };
20148        AbstractHashMap2.prototype.putHashValue = function(key, value) {
20149          return this.hashCodeMap.put(key, value);
20150        };
20151        AbstractHashMap2.prototype.putStringValue = function(key, value) {
20152          return key == null ? this.putHashValue(null, value) : this.stringMap.put(key, value);
20153        };
20154        AbstractHashMap2.prototype.removeHashValue = function(key) {
20155          return this.hashCodeMap.remove(key);
20156        };
20157        AbstractHashMap2.prototype.removeStringValue = function(key) {
20158          return key == null ? this.removeHashValue(null) : this.stringMap.remove(key);
20159        };
20160        return AbstractHashMap2;
20161      })(java2.util.AbstractMap)
20162    );
20163    util2.AbstractHashMap = AbstractHashMap;
20164    AbstractHashMap["__class"] = "java.util.AbstractHashMap";
20165    AbstractHashMap["__interfaces"] = ["java.util.Map"];
20166    (function(AbstractHashMap2) {
20167      var EntrySet = (
20168        /** @class */
20169        (function(_super) {
20170          __extends(EntrySet2, _super);
20171          function EntrySet2(__parent) {
20172            var _this = _super.call(this) || this;
20173            _this.__parent = __parent;
20174            return _this;
20175          }
20176          EntrySet2.prototype.clear = function() {
20177            this.clear();
20178          };
20179          EntrySet2.prototype.contains = function(o) {
20180            if (o != null && (o.constructor != null && o.constructor["__interfaces"] != null && o.constructor["__interfaces"].indexOf("java.util.Map.Entry") >= 0)) {
20181              return this.__parent.containsEntry(o);
20182            }
20183            return false;
20184          };
20185          EntrySet2.prototype.iterator = function() {
20186            return new AbstractHashMap2.EntrySetIterator(this.__parent);
20187          };
20188          EntrySet2.prototype.remove = function(entry) {
20189            if (this.contains(entry)) {
20190              var key = entry.getKey();
20191              this.remove(key);
20192              return true;
20193            }
20194            return false;
20195          };
20196          EntrySet2.prototype.size = function() {
20197            return this.__parent.size();
20198          };
20199          return EntrySet2;
20200        })(java2.util.AbstractSet)
20201      );
20202      AbstractHashMap2.EntrySet = EntrySet;
20203      EntrySet["__class"] = "java.util.AbstractHashMap.EntrySet";
20204      EntrySet["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable"];
20205      var EntrySetIterator = (
20206        /** @class */
20207        (function() {
20208          function EntrySetIterator2(__parent) {
20209            this.__parent = __parent;
20210            if (this.stringMapEntries === void 0) {
20211              this.stringMapEntries = null;
20212            }
20213            if (this.current === void 0) {
20214              this.current = null;
20215            }
20216            if (this.last === void 0) {
20217              this.last = null;
20218            }
20219            if (this.__hasNext === void 0) {
20220              this.__hasNext = false;
20221            }
20222            this.stringMapEntries = __parent.stringMap.iterator();
20223            this.current = this.stringMapEntries;
20224            this.__hasNext = this.computeHasNext();
20225            java2.util.ConcurrentModificationDetector.recordLastKnownStructure(__parent, this);
20226          }
20227          EntrySetIterator2.prototype.forEachRemaining = function(consumer) {
20228            var _this = this;
20229            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
20230              if (funcInst == null || typeof funcInst == "function") {
20231                return funcInst;
20232              }
20233              return function(arg0) {
20234                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
20235              };
20236            })(consumer));
20237            while (this.hasNext()) {
20238              {
20239                (function(target) {
20240                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
20241                })(consumer);
20242              }
20243            }
20244            ;
20245          };
20246          EntrySetIterator2.prototype.hasNext = function() {
20247            return this.__hasNext;
20248          };
20249          EntrySetIterator2.prototype.computeHasNext = function() {
20250            if (this.current.hasNext()) {
20251              return true;
20252            }
20253            if (this.current !== this.stringMapEntries) {
20254              return false;
20255            }
20256            this.current = this.__parent.hashCodeMap.iterator();
20257            return this.current.hasNext();
20258          };
20259          EntrySetIterator2.prototype.next = function() {
20260            java2.util.ConcurrentModificationDetector.checkStructuralChange(this.__parent, this);
20261            javaemul.internal.InternalPreconditions.checkElement(this.hasNext());
20262            this.last = this.current;
20263            var rv = this.current.next();
20264            this.__hasNext = this.computeHasNext();
20265            return rv;
20266          };
20267          EntrySetIterator2.prototype.remove = function() {
20268            javaemul.internal.InternalPreconditions.checkState(this.last != null);
20269            java2.util.ConcurrentModificationDetector.checkStructuralChange(this.__parent, this);
20270            this.last.remove();
20271            this.last = null;
20272            this.__hasNext = this.computeHasNext();
20273            java2.util.ConcurrentModificationDetector.recordLastKnownStructure(this.__parent, this);
20274          };
20275          return EntrySetIterator2;
20276        })()
20277      );
20278      AbstractHashMap2.EntrySetIterator = EntrySetIterator;
20279      EntrySetIterator["__class"] = "java.util.AbstractHashMap.EntrySetIterator";
20280      EntrySetIterator["__interfaces"] = ["java.util.Iterator"];
20281    })(AbstractHashMap = util2.AbstractHashMap || (util2.AbstractHashMap = {}));
20282  })(util = java2.util || (java2.util = {}));
20283})(java || (java = {}));
20284(function(java2) {
20285  var util;
20286  (function(util2) {
20287    var EnumMap = (
20288      /** @class */
20289      (function(_super) {
20290        __extends(EnumMap2, _super);
20291        function EnumMap2(type) {
20292          var _this = this;
20293          if (type != null && (type["__class"] != null || (function(t) {
20294            try {
20295              new t();
20296              return true;
20297            } catch (_a) {
20298              return false;
20299            }
20300          })(type)) || type === null) {
20301            var __args = arguments;
20302            _this = _super.call(this) || this;
20303            if (_this.__keySet === void 0) {
20304              _this.__keySet = null;
20305            }
20306            if (_this.__values === void 0) {
20307              _this.__values = null;
20308            }
20309            _this.init$java_lang_Class(type);
20310          } else if (type != null && type instanceof java2.util.EnumMap || type === null) {
20311            var __args = arguments;
20312            var m = __args[0];
20313            _this = _super.call(this) || this;
20314            if (_this.__keySet === void 0) {
20315              _this.__keySet = null;
20316            }
20317            if (_this.__values === void 0) {
20318              _this.__values = null;
20319            }
20320            _this.init$java_util_EnumMap(m);
20321          } else if (type != null && (type.constructor != null && type.constructor["__interfaces"] != null && type.constructor["__interfaces"].indexOf("java.util.Map") >= 0) || type === null) {
20322            var __args = arguments;
20323            var m = __args[0];
20324            _this = _super.call(this) || this;
20325            if (_this.__keySet === void 0) {
20326              _this.__keySet = null;
20327            }
20328            if (_this.__values === void 0) {
20329              _this.__values = null;
20330            }
20331            if (m != null && m instanceof java2.util.EnumMap) {
20332              _this.init$java_util_EnumMap(m);
20333            } else {
20334              javaemul.internal.InternalPreconditions.checkArgument(!m.isEmpty(), "Specified map is empty");
20335              _this.init$java_lang_Class(m.keySet().iterator().next().getDeclaringClass());
20336              _this.putAll(m);
20337            }
20338          } else
20339            throw new Error("invalid overload");
20340          return _this;
20341        }
20342        EnumMap2.prototype.clear = function() {
20343          this.__keySet.clear();
20344          this.__values = (function(s) {
20345            var a = [];
20346            while (s-- > 0)
20347              a.push(null);
20348            return a;
20349          })(this.__values.length);
20350        };
20351        EnumMap2.prototype.clone = function() {
20352          return new EnumMap2(this);
20353        };
20354        EnumMap2.prototype.containsKey = function(key) {
20355          return this.__keySet.contains(key);
20356        };
20357        EnumMap2.prototype.containsValue = function(value) {
20358          for (var index = this.__keySet.iterator(); index.hasNext(); ) {
20359            var key = index.next();
20360            {
20361              if (java2.util.Objects.equals(value, this.__values[key.ordinal()])) {
20362                return true;
20363              }
20364            }
20365          }
20366          return false;
20367        };
20368        EnumMap2.prototype.entrySet = function() {
20369          return new EnumMap2.EntrySet(this);
20370        };
20371        EnumMap2.prototype.get = function(k) {
20372          return this.__keySet.contains(k) ? this.__values[this.asOrdinal(k)] : null;
20373        };
20374        EnumMap2.prototype.put$java_lang_Enum$java_lang_Object = function(key, value) {
20375          this.__keySet.add(key);
20376          return this.set(key.ordinal(), value);
20377        };
20378        EnumMap2.prototype.put = function(key, value) {
20379          if ((key != null || key === null) && (value != null || value === null)) {
20380            return this.put$java_lang_Enum$java_lang_Object(key, value);
20381          } else if ((key != null || key === null) && (value != null || value === null)) {
20382            return _super.prototype.put.call(this, key, value);
20383          } else
20384            throw new Error("invalid overload");
20385        };
20386        EnumMap2.prototype.remove = function(key) {
20387          return this.__keySet.remove(key) ? this.set(this.asOrdinal(key), null) : null;
20388        };
20389        EnumMap2.prototype.size = function() {
20390          return this.__keySet.size();
20391        };
20392        EnumMap2.prototype.asKey = function(key) {
20393          return key;
20394        };
20395        EnumMap2.prototype.asOrdinal = function(key) {
20396          return this.asKey(key).ordinal();
20397        };
20398        EnumMap2.prototype.init$java_lang_Class = function(type) {
20399          this.__keySet = java2.util.EnumSet.noneOf(type);
20400          this.__values = (function(s) {
20401            var a = [];
20402            while (s-- > 0)
20403              a.push(null);
20404            return a;
20405          })(this.__keySet.capacity());
20406        };
20407        EnumMap2.prototype.init = function(type) {
20408          if (type != null && (type["__class"] != null || (function(t) {
20409            try {
20410              new t();
20411              return true;
20412            } catch (_a) {
20413              return false;
20414            }
20415          })(type)) || type === null) {
20416            return this.init$java_lang_Class(type);
20417          } else if (type != null && type instanceof java2.util.EnumMap || type === null) {
20418            return this.init$java_util_EnumMap(type);
20419          } else
20420            throw new Error("invalid overload");
20421        };
20422        EnumMap2.prototype.init$java_util_EnumMap = function(m) {
20423          this.__keySet = /* clone */
20424          (function(o) {
20425            if (o.clone != void 0) {
20426              return o.clone();
20427            } else {
20428              var clone = Object.create(o);
20429              for (var p in o) {
20430                if (o.hasOwnProperty(p))
20431                  clone[p] = o[p];
20432              }
20433              return clone;
20434            }
20435          })(m.__keySet);
20436          this.__values = javaemul.internal.ArrayHelper.clone(m.__values, 0, m.__values.length);
20437        };
20438        EnumMap2.prototype.set = function(ordinal, value) {
20439          var was = this.__values[ordinal];
20440          this.__values[ordinal] = value;
20441          return was;
20442        };
20443        return EnumMap2;
20444      })(java2.util.AbstractMap)
20445    );
20446    util2.EnumMap = EnumMap;
20447    EnumMap["__class"] = "java.util.EnumMap";
20448    EnumMap["__interfaces"] = ["java.util.Map"];
20449    (function(EnumMap2) {
20450      var EntrySet = (
20451        /** @class */
20452        (function(_super) {
20453          __extends(EntrySet2, _super);
20454          function EntrySet2(__parent) {
20455            var _this = _super.call(this) || this;
20456            _this.__parent = __parent;
20457            return _this;
20458          }
20459          EntrySet2.prototype.clear = function() {
20460            this.clear();
20461          };
20462          EntrySet2.prototype.contains = function(o) {
20463            if (o != null && (o.constructor != null && o.constructor["__interfaces"] != null && o.constructor["__interfaces"].indexOf("java.util.Map.Entry") >= 0)) {
20464              return this.__parent.containsEntry(o);
20465            }
20466            return false;
20467          };
20468          EntrySet2.prototype.iterator = function() {
20469            return new EnumMap2.EntrySetIterator(this.__parent);
20470          };
20471          EntrySet2.prototype.remove = function(entry) {
20472            if (this.contains(entry)) {
20473              var key = entry.getKey();
20474              this.remove(key);
20475              return true;
20476            }
20477            return false;
20478          };
20479          EntrySet2.prototype.size = function() {
20480            return this.__parent.size();
20481          };
20482          return EntrySet2;
20483        })(java2.util.AbstractSet)
20484      );
20485      EnumMap2.EntrySet = EntrySet;
20486      EntrySet["__class"] = "java.util.EnumMap.EntrySet";
20487      EntrySet["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable"];
20488      var EntrySetIterator = (
20489        /** @class */
20490        (function() {
20491          function EntrySetIterator2(__parent) {
20492            this.__parent = __parent;
20493            this.it = this.__parent.__keySet.iterator();
20494            if (this.key === void 0) {
20495              this.key = null;
20496            }
20497          }
20498          EntrySetIterator2.prototype.forEachRemaining = function(consumer) {
20499            var _this = this;
20500            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
20501              if (funcInst == null || typeof funcInst == "function") {
20502                return funcInst;
20503              }
20504              return function(arg0) {
20505                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
20506              };
20507            })(consumer));
20508            while (this.hasNext()) {
20509              {
20510                (function(target) {
20511                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
20512                })(consumer);
20513              }
20514            }
20515            ;
20516          };
20517          EntrySetIterator2.prototype.hasNext = function() {
20518            return this.it.hasNext();
20519          };
20520          EntrySetIterator2.prototype.next = function() {
20521            this.key = this.it.next();
20522            return new EnumMap2.MapEntry(this.__parent, this.key);
20523          };
20524          EntrySetIterator2.prototype.remove = function() {
20525            javaemul.internal.InternalPreconditions.checkState(this.key != null);
20526            this.__parent.remove(this.key);
20527            this.key = null;
20528          };
20529          return EntrySetIterator2;
20530        })()
20531      );
20532      EnumMap2.EntrySetIterator = EntrySetIterator;
20533      EntrySetIterator["__class"] = "java.util.EnumMap.EntrySetIterator";
20534      EntrySetIterator["__interfaces"] = ["java.util.Iterator"];
20535      var MapEntry = (
20536        /** @class */
20537        (function(_super) {
20538          __extends(MapEntry2, _super);
20539          function MapEntry2(__parent, key) {
20540            var _this = _super.call(this) || this;
20541            _this.__parent = __parent;
20542            if (_this.key === void 0) {
20543              _this.key = null;
20544            }
20545            _this.key = key;
20546            return _this;
20547          }
20548          MapEntry2.prototype.getKey = function() {
20549            return this.key;
20550          };
20551          MapEntry2.prototype.getValue = function() {
20552            return this.__parent.__values[this.key.ordinal()];
20553          };
20554          MapEntry2.prototype.setValue = function(value) {
20555            return this.__parent.set(this.key.ordinal(), value);
20556          };
20557          return MapEntry2;
20558        })(java2.util.AbstractMapEntry)
20559      );
20560      EnumMap2.MapEntry = MapEntry;
20561      MapEntry["__class"] = "java.util.EnumMap.MapEntry";
20562      MapEntry["__interfaces"] = ["java.util.Map.Entry"];
20563    })(EnumMap = util2.EnumMap || (util2.EnumMap = {}));
20564  })(util = java2.util || (java2.util = {}));
20565})(java || (java = {}));
20566(function(java2) {
20567  var util;
20568  (function(util2) {
20569    var AbstractNavigableMap = (
20570      /** @class */
20571      (function(_super) {
20572        __extends(AbstractNavigableMap2, _super);
20573        function AbstractNavigableMap2() {
20574          return _super.call(this) || this;
20575        }
20576        AbstractNavigableMap2.copyOf = function(entry) {
20577          return entry == null ? null : new util2.AbstractMap.SimpleImmutableEntry(entry);
20578        };
20579        AbstractNavigableMap2.getKeyOrNSE = function(entry) {
20580          if (entry == null) {
20581            throw new java2.util.NoSuchElementException();
20582          }
20583          return entry.getKey();
20584        };
20585        AbstractNavigableMap2.prototype.ceilingEntry = function(key) {
20586          return AbstractNavigableMap2.copyOf(this.getCeilingEntry(key));
20587        };
20588        AbstractNavigableMap2.prototype.ceilingKey = function(key) {
20589          return util2.AbstractMap.getEntryKeyOrNull(this.getCeilingEntry(key));
20590        };
20591        AbstractNavigableMap2.prototype.containsKey = function(k) {
20592          var key = k;
20593          return this.getEntry(key) != null;
20594        };
20595        AbstractNavigableMap2.prototype.descendingKeySet = function() {
20596          return this.descendingMap().navigableKeySet();
20597        };
20598        AbstractNavigableMap2.prototype.descendingMap = function() {
20599          return new AbstractNavigableMap2.DescendingMap(this);
20600        };
20601        AbstractNavigableMap2.prototype.entrySet = function() {
20602          return new AbstractNavigableMap2.EntrySet(this);
20603        };
20604        AbstractNavigableMap2.prototype.firstEntry = function() {
20605          return AbstractNavigableMap2.copyOf(this.getFirstEntry());
20606        };
20607        AbstractNavigableMap2.prototype.firstKey = function() {
20608          return AbstractNavigableMap2.getKeyOrNSE(this.getFirstEntry());
20609        };
20610        AbstractNavigableMap2.prototype.floorEntry = function(key) {
20611          return AbstractNavigableMap2.copyOf(this.getFloorEntry(key));
20612        };
20613        AbstractNavigableMap2.prototype.floorKey = function(key) {
20614          return util2.AbstractMap.getEntryKeyOrNull(this.getFloorEntry(key));
20615        };
20616        AbstractNavigableMap2.prototype.get = function(k) {
20617          var key = k;
20618          return util2.AbstractMap.getEntryValueOrNull(this.getEntry(key));
20619        };
20620        AbstractNavigableMap2.prototype.headMap = function(toKey, inclusive) {
20621          if ((toKey != null || toKey === null) && inclusive === void 0) {
20622            return this.headMap$java_lang_Object(toKey);
20623          } else
20624            throw new Error("invalid overload");
20625        };
20626        AbstractNavigableMap2.prototype.headMap$java_lang_Object = function(toKey) {
20627          return this.headMap(toKey, false);
20628        };
20629        AbstractNavigableMap2.prototype.higherEntry = function(key) {
20630          return AbstractNavigableMap2.copyOf(this.getHigherEntry(key));
20631        };
20632        AbstractNavigableMap2.prototype.higherKey = function(key) {
20633          return util2.AbstractMap.getEntryKeyOrNull(this.getHigherEntry(key));
20634        };
20635        AbstractNavigableMap2.prototype.keySet = function() {
20636          return this.navigableKeySet();
20637        };
20638        AbstractNavigableMap2.prototype.lastEntry = function() {
20639          return AbstractNavigableMap2.copyOf(this.getLastEntry());
20640        };
20641        AbstractNavigableMap2.prototype.lastKey = function() {
20642          return AbstractNavigableMap2.getKeyOrNSE(this.getLastEntry());
20643        };
20644        AbstractNavigableMap2.prototype.lowerEntry = function(key) {
20645          return AbstractNavigableMap2.copyOf(this.getLowerEntry(key));
20646        };
20647        AbstractNavigableMap2.prototype.lowerKey = function(key) {
20648          return util2.AbstractMap.getEntryKeyOrNull(this.getLowerEntry(key));
20649        };
20650        AbstractNavigableMap2.prototype.navigableKeySet = function() {
20651          return new AbstractNavigableMap2.NavigableKeySet(this);
20652        };
20653        AbstractNavigableMap2.prototype.pollFirstEntry = function() {
20654          return this.pollEntry(this.getFirstEntry());
20655        };
20656        AbstractNavigableMap2.prototype.pollLastEntry = function() {
20657          return this.pollEntry(this.getLastEntry());
20658        };
20659        AbstractNavigableMap2.prototype.subMap = function(fromKey, fromInclusive, toKey, toInclusive) {
20660          if ((fromKey != null || fromKey === null) && (fromInclusive != null || fromInclusive === null) && toKey === void 0 && toInclusive === void 0) {
20661            return this.subMap$java_lang_Object$java_lang_Object(fromKey, fromInclusive);
20662          } else
20663            throw new Error("invalid overload");
20664        };
20665        AbstractNavigableMap2.prototype.subMap$java_lang_Object$java_lang_Object = function(fromKey, toKey) {
20666          return this.subMap(fromKey, true, toKey, false);
20667        };
20668        AbstractNavigableMap2.prototype.tailMap = function(fromKey, inclusive) {
20669          if ((fromKey != null || fromKey === null) && inclusive === void 0) {
20670            return this.tailMap$java_lang_Object(fromKey);
20671          } else
20672            throw new Error("invalid overload");
20673        };
20674        AbstractNavigableMap2.prototype.tailMap$java_lang_Object = function(fromKey) {
20675          return this.tailMap(fromKey, true);
20676        };
20677        AbstractNavigableMap2.prototype.containsEntry = function(entry) {
20678          var key = entry.getKey();
20679          var lookupEntry = this.getEntry(key);
20680          return lookupEntry != null && java2.util.Objects.equals(lookupEntry.getValue(), entry.getValue());
20681        };
20682        AbstractNavigableMap2.prototype.pollEntry = function(entry) {
20683          if (entry != null) {
20684            this.removeEntry(entry);
20685          }
20686          return AbstractNavigableMap2.copyOf(entry);
20687        };
20688        return AbstractNavigableMap2;
20689      })(java2.util.AbstractMap)
20690    );
20691    util2.AbstractNavigableMap = AbstractNavigableMap;
20692    AbstractNavigableMap["__class"] = "java.util.AbstractNavigableMap";
20693    AbstractNavigableMap["__interfaces"] = ["java.util.Map", "java.util.NavigableMap", "java.util.SortedMap"];
20694    (function(AbstractNavigableMap2) {
20695      var DescendingMap = (
20696        /** @class */
20697        (function(_super) {
20698          __extends(DescendingMap2, _super);
20699          function DescendingMap2(__parent) {
20700            var _this = _super.call(this) || this;
20701            _this.__parent = __parent;
20702            return _this;
20703          }
20704          DescendingMap2.prototype.clear = function() {
20705            this.ascendingMap().clear();
20706          };
20707          DescendingMap2.prototype.comparator = function() {
20708            return (function(funcInst) {
20709              if (funcInst == null || typeof funcInst == "function") {
20710                return funcInst;
20711              }
20712              return function(a, b) {
20713                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
20714              };
20715            })(java2.util.Collections.reverseOrder$java_util_Comparator((function(funcInst) {
20716              if (funcInst == null || typeof funcInst == "function") {
20717                return funcInst;
20718              }
20719              return function(a, b) {
20720                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
20721              };
20722            })(this.ascendingMap().comparator())));
20723          };
20724          DescendingMap2.prototype.descendingMap = function() {
20725            return this.ascendingMap();
20726          };
20727          DescendingMap2.prototype.headMap$java_lang_Object$boolean = function(toKey, inclusive) {
20728            return this.ascendingMap().tailMap(toKey, inclusive).descendingMap();
20729          };
20730          DescendingMap2.prototype.headMap = function(toKey, inclusive) {
20731            if ((toKey != null || toKey === null) && (typeof inclusive === "boolean" || inclusive === null)) {
20732              return this.headMap$java_lang_Object$boolean(toKey, inclusive);
20733            } else if ((toKey != null || toKey === null) && inclusive === void 0) {
20734              return this.headMap$java_lang_Object(toKey);
20735            } else
20736              throw new Error("invalid overload");
20737          };
20738          DescendingMap2.prototype.put = function(key, value) {
20739            return this.ascendingMap().put(key, value);
20740          };
20741          DescendingMap2.prototype.remove = function(key) {
20742            return this.ascendingMap().remove(key);
20743          };
20744          DescendingMap2.prototype.size = function() {
20745            return this.ascendingMap().size();
20746          };
20747          DescendingMap2.prototype.subMap$java_lang_Object$boolean$java_lang_Object$boolean = function(fromKey, fromInclusive, toKey, toInclusive) {
20748            return this.ascendingMap().subMap(toKey, toInclusive, fromKey, fromInclusive).descendingMap();
20749          };
20750          DescendingMap2.prototype.subMap = function(fromKey, fromInclusive, toKey, toInclusive) {
20751            if ((fromKey != null || fromKey === null) && (typeof fromInclusive === "boolean" || fromInclusive === null) && (toKey != null || toKey === null) && (typeof toInclusive === "boolean" || toInclusive === null)) {
20752              return this.subMap$java_lang_Object$boolean$java_lang_Object$boolean(fromKey, fromInclusive, toKey, toInclusive);
20753            } else if ((fromKey != null || fromKey === null) && (fromInclusive != null || fromInclusive === null) && toKey === void 0 && toInclusive === void 0) {
20754              return this.subMap$java_lang_Object$java_lang_Object(fromKey, fromInclusive);
20755            } else
20756              throw new Error("invalid overload");
20757          };
20758          DescendingMap2.prototype.tailMap$java_lang_Object$boolean = function(fromKey, inclusive) {
20759            return this.ascendingMap().headMap(fromKey, inclusive).descendingMap();
20760          };
20761          DescendingMap2.prototype.tailMap = function(fromKey, inclusive) {
20762            if ((fromKey != null || fromKey === null) && (typeof inclusive === "boolean" || inclusive === null)) {
20763              return this.tailMap$java_lang_Object$boolean(fromKey, inclusive);
20764            } else if ((fromKey != null || fromKey === null) && inclusive === void 0) {
20765              return this.tailMap$java_lang_Object(fromKey);
20766            } else
20767              throw new Error("invalid overload");
20768          };
20769          DescendingMap2.prototype.ascendingMap = function() {
20770            return this.__parent;
20771          };
20772          DescendingMap2.prototype.descendingEntryIterator = function() {
20773            return this.ascendingMap().entryIterator();
20774          };
20775          DescendingMap2.prototype.entryIterator = function() {
20776            return this.ascendingMap().descendingEntryIterator();
20777          };
20778          DescendingMap2.prototype.getEntry = function(key) {
20779            return this.ascendingMap().getEntry(key);
20780          };
20781          DescendingMap2.prototype.getFirstEntry = function() {
20782            return this.ascendingMap().getLastEntry();
20783          };
20784          DescendingMap2.prototype.getLastEntry = function() {
20785            return this.ascendingMap().getFirstEntry();
20786          };
20787          DescendingMap2.prototype.getCeilingEntry = function(key) {
20788            return this.ascendingMap().getFloorEntry(key);
20789          };
20790          DescendingMap2.prototype.getFloorEntry = function(key) {
20791            return this.ascendingMap().getCeilingEntry(key);
20792          };
20793          DescendingMap2.prototype.getHigherEntry = function(key) {
20794            return this.ascendingMap().getLowerEntry(key);
20795          };
20796          DescendingMap2.prototype.getLowerEntry = function(key) {
20797            return this.ascendingMap().getHigherEntry(key);
20798          };
20799          DescendingMap2.prototype.removeEntry = function(entry) {
20800            return this.ascendingMap().removeEntry(entry);
20801          };
20802          return DescendingMap2;
20803        })(java2.util.AbstractNavigableMap)
20804      );
20805      AbstractNavigableMap2.DescendingMap = DescendingMap;
20806      DescendingMap["__class"] = "java.util.AbstractNavigableMap.DescendingMap";
20807      DescendingMap["__interfaces"] = ["java.util.Map", "java.util.NavigableMap", "java.util.SortedMap"];
20808      var EntrySet = (
20809        /** @class */
20810        (function(_super) {
20811          __extends(EntrySet2, _super);
20812          function EntrySet2(__parent) {
20813            var _this = _super.call(this) || this;
20814            _this.__parent = __parent;
20815            return _this;
20816          }
20817          EntrySet2.prototype.contains = function(o) {
20818            return o != null && (o.constructor != null && o.constructor["__interfaces"] != null && o.constructor["__interfaces"].indexOf("java.util.Map.Entry") >= 0) && this.__parent.containsEntry(o);
20819          };
20820          EntrySet2.prototype.iterator = function() {
20821            return this.__parent.entryIterator();
20822          };
20823          EntrySet2.prototype.remove = function(o) {
20824            if (o != null && (o.constructor != null && o.constructor["__interfaces"] != null && o.constructor["__interfaces"].indexOf("java.util.Map.Entry") >= 0)) {
20825              var entry = o;
20826              return this.__parent.removeEntry(entry);
20827            }
20828            return false;
20829          };
20830          EntrySet2.prototype.size = function() {
20831            return this.__parent.size();
20832          };
20833          return EntrySet2;
20834        })(java2.util.AbstractSet)
20835      );
20836      AbstractNavigableMap2.EntrySet = EntrySet;
20837      EntrySet["__class"] = "java.util.AbstractNavigableMap.EntrySet";
20838      EntrySet["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable"];
20839      var NavigableKeySet = (
20840        /** @class */
20841        (function(_super) {
20842          __extends(NavigableKeySet2, _super);
20843          function NavigableKeySet2(map) {
20844            var _this = _super.call(this) || this;
20845            if (_this.map === void 0) {
20846              _this.map = null;
20847            }
20848            _this.map = map;
20849            return _this;
20850          }
20851          NavigableKeySet2.prototype.ceiling = function(k) {
20852            return this.map.ceilingKey(k);
20853          };
20854          NavigableKeySet2.prototype.clear = function() {
20855            this.map.clear();
20856          };
20857          NavigableKeySet2.prototype.comparator = function() {
20858            return (function(funcInst) {
20859              if (funcInst == null || typeof funcInst == "function") {
20860                return funcInst;
20861              }
20862              return function(a, b) {
20863                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
20864              };
20865            })(this.map.comparator());
20866          };
20867          NavigableKeySet2.prototype.contains = function(o) {
20868            return this.map.containsKey(o);
20869          };
20870          NavigableKeySet2.prototype.descendingIterator = function() {
20871            return this.descendingSet().iterator();
20872          };
20873          NavigableKeySet2.prototype.descendingSet = function() {
20874            return this.map.descendingMap().navigableKeySet();
20875          };
20876          NavigableKeySet2.prototype.first = function() {
20877            return this.map.firstKey();
20878          };
20879          NavigableKeySet2.prototype.floor = function(k) {
20880            return this.map.floorKey(k);
20881          };
20882          NavigableKeySet2.prototype.headSet$java_lang_Object = function(toElement) {
20883            return this.headSet(toElement, false);
20884          };
20885          NavigableKeySet2.prototype.headSet$java_lang_Object$boolean = function(toElement, inclusive) {
20886            return this.map.headMap(toElement, inclusive).navigableKeySet();
20887          };
20888          NavigableKeySet2.prototype.headSet = function(toElement, inclusive) {
20889            if ((toElement != null || toElement === null) && (typeof inclusive === "boolean" || inclusive === null)) {
20890              return this.headSet$java_lang_Object$boolean(toElement, inclusive);
20891            } else if ((toElement != null || toElement === null) && inclusive === void 0) {
20892              return this.headSet$java_lang_Object(toElement);
20893            } else
20894              throw new Error("invalid overload");
20895          };
20896          NavigableKeySet2.prototype.higher = function(k) {
20897            return this.map.higherKey(k);
20898          };
20899          NavigableKeySet2.prototype.iterator = function() {
20900            var entryIterator = this.map.entrySet().iterator();
20901            return new NavigableKeySet2.NavigableKeySet$0(this, entryIterator);
20902          };
20903          NavigableKeySet2.prototype.last = function() {
20904            return this.map.lastKey();
20905          };
20906          NavigableKeySet2.prototype.lower = function(k) {
20907            return this.map.lowerKey(k);
20908          };
20909          NavigableKeySet2.prototype.pollFirst = function() {
20910            return util2.AbstractMap.getEntryKeyOrNull(this.map.pollFirstEntry());
20911          };
20912          NavigableKeySet2.prototype.pollLast = function() {
20913            return util2.AbstractMap.getEntryKeyOrNull(this.map.pollLastEntry());
20914          };
20915          NavigableKeySet2.prototype.remove = function(o) {
20916            if (this.map.containsKey(o)) {
20917              this.map.remove(o);
20918              return true;
20919            }
20920            return false;
20921          };
20922          NavigableKeySet2.prototype.size = function() {
20923            return this.map.size();
20924          };
20925          NavigableKeySet2.prototype.subSet$java_lang_Object$boolean$java_lang_Object$boolean = function(fromElement, fromInclusive, toElement, toInclusive) {
20926            return this.map.subMap(fromElement, fromInclusive, toElement, toInclusive).navigableKeySet();
20927          };
20928          NavigableKeySet2.prototype.subSet = function(fromElement, fromInclusive, toElement, toInclusive) {
20929            if ((fromElement != null || fromElement === null) && (typeof fromInclusive === "boolean" || fromInclusive === null) && (toElement != null || toElement === null) && (typeof toInclusive === "boolean" || toInclusive === null)) {
20930              return this.subSet$java_lang_Object$boolean$java_lang_Object$boolean(fromElement, fromInclusive, toElement, toInclusive);
20931            } else if ((fromElement != null || fromElement === null) && (fromInclusive != null || fromInclusive === null) && toElement === void 0 && toInclusive === void 0) {
20932              return this.subSet$java_lang_Object$java_lang_Object(fromElement, fromInclusive);
20933            } else
20934              throw new Error("invalid overload");
20935          };
20936          NavigableKeySet2.prototype.subSet$java_lang_Object$java_lang_Object = function(fromElement, toElement) {
20937            return this.subSet(fromElement, true, toElement, false);
20938          };
20939          NavigableKeySet2.prototype.tailSet$java_lang_Object = function(fromElement) {
20940            return this.tailSet(fromElement, true);
20941          };
20942          NavigableKeySet2.prototype.tailSet$java_lang_Object$boolean = function(fromElement, inclusive) {
20943            return this.map.tailMap(fromElement, inclusive).navigableKeySet();
20944          };
20945          NavigableKeySet2.prototype.tailSet = function(fromElement, inclusive) {
20946            if ((fromElement != null || fromElement === null) && (typeof inclusive === "boolean" || inclusive === null)) {
20947              return this.tailSet$java_lang_Object$boolean(fromElement, inclusive);
20948            } else if ((fromElement != null || fromElement === null) && inclusive === void 0) {
20949              return this.tailSet$java_lang_Object(fromElement);
20950            } else
20951              throw new Error("invalid overload");
20952          };
20953          return NavigableKeySet2;
20954        })(java2.util.AbstractSet)
20955      );
20956      AbstractNavigableMap2.NavigableKeySet = NavigableKeySet;
20957      NavigableKeySet["__class"] = "java.util.AbstractNavigableMap.NavigableKeySet";
20958      NavigableKeySet["__interfaces"] = ["java.util.SortedSet", "java.util.Collection", "java.util.Set", "java.util.NavigableSet", "java.lang.Iterable"];
20959      (function(NavigableKeySet2) {
20960        var NavigableKeySet$0 = (
20961          /** @class */
20962          (function() {
20963            function NavigableKeySet$02(__parent, entryIterator) {
20964              this.entryIterator = entryIterator;
20965              this.__parent = __parent;
20966            }
20967            NavigableKeySet$02.prototype.forEachRemaining = function(consumer) {
20968              var _this = this;
20969              javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
20970                if (funcInst == null || typeof funcInst == "function") {
20971                  return funcInst;
20972                }
20973                return function(arg0) {
20974                  return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
20975                };
20976              })(consumer));
20977              while (this.hasNext()) {
20978                {
20979                  (function(target) {
20980                    return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
20981                  })(consumer);
20982                }
20983              }
20984              ;
20985            };
20986            NavigableKeySet$02.prototype.hasNext = function() {
20987              return this.entryIterator.hasNext();
20988            };
20989            NavigableKeySet$02.prototype.next = function() {
20990              var entry = this.entryIterator.next();
20991              return entry.getKey();
20992            };
20993            NavigableKeySet$02.prototype.remove = function() {
20994              this.entryIterator.remove();
20995            };
20996            return NavigableKeySet$02;
20997          })()
20998        );
20999        NavigableKeySet2.NavigableKeySet$0 = NavigableKeySet$0;
21000        NavigableKeySet$0["__interfaces"] = ["java.util.Iterator"];
21001      })(NavigableKeySet = AbstractNavigableMap2.NavigableKeySet || (AbstractNavigableMap2.NavigableKeySet = {}));
21002    })(AbstractNavigableMap = util2.AbstractNavigableMap || (util2.AbstractNavigableMap = {}));
21003  })(util = java2.util || (java2.util = {}));
21004})(java || (java = {}));
21005(function(java2) {
21006  var util;
21007  (function(util2) {
21008    var Collections = (
21009      /** @class */
21010      (function() {
21011        function Collections2() {
21012        }
21013        Collections2.EMPTY_LIST_$LI$ = function() {
21014          if (Collections2.EMPTY_LIST == null) {
21015            Collections2.EMPTY_LIST = new Collections2.EmptyList();
21016          }
21017          return Collections2.EMPTY_LIST;
21018        };
21019        Collections2.EMPTY_MAP_$LI$ = function() {
21020          if (Collections2.EMPTY_MAP == null) {
21021            Collections2.EMPTY_MAP = new Collections2.EmptyMap();
21022          }
21023          return Collections2.EMPTY_MAP;
21024        };
21025        Collections2.EMPTY_SET_$LI$ = function() {
21026          if (Collections2.EMPTY_SET == null) {
21027            Collections2.EMPTY_SET = new Collections2.EmptySet();
21028          }
21029          return Collections2.EMPTY_SET;
21030        };
21031        Collections2.addAll = function(c) {
21032          var a = [];
21033          for (var _i = 1; _i < arguments.length; _i++) {
21034            a[_i - 1] = arguments[_i];
21035          }
21036          var result = false;
21037          for (var index = 0; index < a.length; index++) {
21038            var e = a[index];
21039            {
21040              result = c.add(e) || result;
21041            }
21042          }
21043          return result;
21044        };
21045        Collections2.asLifoQueue = function(deque) {
21046          return new Collections2.LifoQueue(deque);
21047        };
21048        Collections2.binarySearch$java_util_List$java_lang_Object = function(sortedList, key) {
21049          return Collections2.binarySearch(sortedList, key, (function(funcInst) {
21050            if (funcInst == null || typeof funcInst == "function") {
21051              return funcInst;
21052            }
21053            return function(a, b) {
21054              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
21055            };
21056          })(null));
21057        };
21058        Collections2.binarySearch$java_util_List$java_lang_Object$java_util_Comparator = function(sortedList, key, comparator) {
21059          if (comparator == null) {
21060            comparator = (function(funcInst) {
21061              if (funcInst == null || typeof funcInst == "function") {
21062                return funcInst;
21063              }
21064              return function(a, b) {
21065                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
21066              };
21067            })(java2.util.Comparators.natural());
21068          }
21069          var low = 0;
21070          var high = sortedList.size() - 1;
21071          while (low <= high) {
21072            {
21073              var mid = low + (high - low >> 1);
21074              var midVal = sortedList.get(mid);
21075              var compareResult = comparator(midVal, key);
21076              if (compareResult < 0) {
21077                low = mid + 1;
21078              } else if (compareResult > 0) {
21079                high = mid - 1;
21080              } else {
21081                return mid;
21082              }
21083            }
21084          }
21085          ;
21086          return -low - 1;
21087        };
21088        Collections2.binarySearch = function(sortedList, key, comparator) {
21089          if ((sortedList != null && (sortedList.constructor != null && sortedList.constructor["__interfaces"] != null && sortedList.constructor["__interfaces"].indexOf("java.util.List") >= 0) || sortedList === null) && (key != null || key === null) && (typeof comparator === "function" && comparator.length === 2 || comparator === null)) {
21090            return java2.util.Collections.binarySearch$java_util_List$java_lang_Object$java_util_Comparator(sortedList, key, comparator);
21091          } else if ((sortedList != null && (sortedList.constructor != null && sortedList.constructor["__interfaces"] != null && sortedList.constructor["__interfaces"].indexOf("java.util.List") >= 0) || sortedList === null) && (key != null || key === null) && comparator === void 0) {
21092            return java2.util.Collections.binarySearch$java_util_List$java_lang_Object(sortedList, key);
21093          } else
21094            throw new Error("invalid overload");
21095        };
21096        Collections2.copy = function(dest, src) {
21097          if (src.size() > dest.size()) {
21098            throw new java2.lang.IndexOutOfBoundsException("src does not fit in dest");
21099          }
21100          var destIt = dest["listIterator$"]();
21101          for (var index = src.iterator(); index.hasNext(); ) {
21102            var e = index.next();
21103            {
21104              destIt.next();
21105              destIt.set(e);
21106            }
21107          }
21108        };
21109        Collections2.disjoint = function(c1, c2) {
21110          var iterating = c1;
21111          var testing = c2;
21112          if (c1 != null && (c1.constructor != null && c1.constructor["__interfaces"] != null && c1.constructor["__interfaces"].indexOf("java.util.Set") >= 0) && !(c2 != null && (c2.constructor != null && c2.constructor["__interfaces"] != null && c2.constructor["__interfaces"].indexOf("java.util.Set") >= 0))) {
21113            iterating = c2;
21114            testing = c1;
21115          }
21116          for (var index = iterating.iterator(); index.hasNext(); ) {
21117            var o = index.next();
21118            {
21119              if (testing.contains(o)) {
21120                return false;
21121              }
21122            }
21123          }
21124          return true;
21125        };
21126        Collections2.emptyIterator = function() {
21127          return Collections2.EmptyListIterator.INSTANCE_$LI$();
21128        };
21129        Collections2.emptyList = function() {
21130          return Collections2.EMPTY_LIST_$LI$();
21131        };
21132        Collections2.emptyListIterator = function() {
21133          return Collections2.EmptyListIterator.INSTANCE_$LI$();
21134        };
21135        Collections2.emptyMap = function() {
21136          return Collections2.EMPTY_MAP_$LI$();
21137        };
21138        Collections2.emptySet = function() {
21139          return Collections2.EMPTY_SET_$LI$();
21140        };
21141        Collections2.enumeration = function(c) {
21142          var it = c.iterator();
21143          return new Collections2.Collections$0(it);
21144        };
21145        Collections2.fill = function(list, obj) {
21146          for (var it = list["listIterator$"](); it.hasNext(); ) {
21147            {
21148              it.next();
21149              it.set(obj);
21150            }
21151            ;
21152          }
21153        };
21154        Collections2.frequency = function(c, o) {
21155          var count = 0;
21156          for (var index = c.iterator(); index.hasNext(); ) {
21157            var e = index.next();
21158            {
21159              if (java2.util.Objects.equals(o, e)) {
21160                ++count;
21161              }
21162            }
21163          }
21164          return count;
21165        };
21166        Collections2.list = function(e) {
21167          var arrayList = new java2.util.ArrayList();
21168          while (e.hasMoreElements()) {
21169            {
21170              arrayList.add(e.nextElement());
21171            }
21172          }
21173          ;
21174          return arrayList;
21175        };
21176        Collections2.max$java_util_Collection = function(coll) {
21177          return Collections2.max$java_util_Collection$java_util_Comparator(coll, (function(funcInst) {
21178            if (funcInst == null || typeof funcInst == "function") {
21179              return funcInst;
21180            }
21181            return function(a, b) {
21182              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
21183            };
21184          })(null));
21185        };
21186        Collections2.max$java_util_Collection$java_util_Comparator = function(coll, comp) {
21187          if (comp == null) {
21188            comp = (function(funcInst) {
21189              if (funcInst == null || typeof funcInst == "function") {
21190                return funcInst;
21191              }
21192              return function(a, b) {
21193                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
21194              };
21195            })(java2.util.Comparators.natural());
21196          }
21197          var it = coll.iterator();
21198          var max = it.next();
21199          while (it.hasNext()) {
21200            {
21201              var t = it.next();
21202              if (comp(t, max) > 0) {
21203                max = t;
21204              }
21205            }
21206          }
21207          ;
21208          return max;
21209        };
21210        Collections2.max = function(coll, comp) {
21211          if ((coll != null && (coll.constructor != null && coll.constructor["__interfaces"] != null && coll.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || coll === null) && (typeof comp === "function" && comp.length === 2 || comp === null)) {
21212            return java2.util.Collections.max$java_util_Collection$java_util_Comparator(coll, comp);
21213          } else if ((coll != null && (coll.constructor != null && coll.constructor["__interfaces"] != null && coll.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || coll === null) && comp === void 0) {
21214            return java2.util.Collections.max$java_util_Collection(coll);
21215          } else
21216            throw new Error("invalid overload");
21217        };
21218        Collections2.min = function(coll, comp) {
21219          if (comp === void 0) {
21220            comp = null;
21221          }
21222          return Collections2.max$java_util_Collection$java_util_Comparator(coll, (function(funcInst) {
21223            if (funcInst == null || typeof funcInst == "function") {
21224              return funcInst;
21225            }
21226            return function(a, b) {
21227              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
21228            };
21229          })(Collections2.reverseOrder$java_util_Comparator((function(funcInst) {
21230            if (funcInst == null || typeof funcInst == "function") {
21231              return funcInst;
21232            }
21233            return function(a, b) {
21234              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
21235            };
21236          })(comp))));
21237        };
21238        Collections2.newSetFromMap = function(map) {
21239          javaemul.internal.InternalPreconditions.checkArgument(map.isEmpty(), "map is not empty");
21240          return new Collections2.SetFromMap(map);
21241        };
21242        Collections2.nCopies = function(n, o) {
21243          var list = new java2.util.ArrayList();
21244          for (var i = 0; i < n; ++i) {
21245            {
21246              list.add(o);
21247            }
21248            ;
21249          }
21250          return Collections2.unmodifiableList(list);
21251        };
21252        Collections2.replaceAll = function(list, oldVal, newVal) {
21253          var modified = false;
21254          for (var it = list["listIterator$"](); it.hasNext(); ) {
21255            {
21256              var t = it.next();
21257              if (java2.util.Objects.equals(t, oldVal)) {
21258                it.set(newVal);
21259                modified = true;
21260              }
21261            }
21262            ;
21263          }
21264          return modified;
21265        };
21266        Collections2.reverse = function(l) {
21267          if (l != null && (l.constructor != null && l.constructor["__interfaces"] != null && l.constructor["__interfaces"].indexOf("java.util.RandomAccess") >= 0)) {
21268            for (var iFront = 0, iBack = l.size() - 1; iFront < iBack; ++iFront, --iBack) {
21269              {
21270                Collections2.swap(l, iFront, iBack);
21271              }
21272              ;
21273            }
21274          } else {
21275            var head = l["listIterator$"]();
21276            var tail = l["listIterator$int"](l.size());
21277            while (head.nextIndex() < tail.previousIndex()) {
21278              {
21279                var headElem = head.next();
21280                var tailElem = tail.previous();
21281                head.set(tailElem);
21282                tail.set(headElem);
21283              }
21284            }
21285            ;
21286          }
21287        };
21288        Collections2.reverseOrder$ = function() {
21289          return (function(funcInst) {
21290            if (funcInst == null || typeof funcInst == "function") {
21291              return funcInst;
21292            }
21293            return function(a, b) {
21294              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
21295            };
21296          })((function(funcInst) {
21297            if (funcInst == null || typeof funcInst == "function") {
21298              return funcInst;
21299            }
21300            return function(a, b) {
21301              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
21302            };
21303          })(Collections2.ReverseComparator.INSTANCE_$LI$()));
21304        };
21305        Collections2.reverseOrder$java_util_Comparator = function(cmp) {
21306          if (cmp == null) {
21307            return (function(funcInst) {
21308              if (funcInst == null || typeof funcInst == "function") {
21309                return funcInst;
21310              }
21311              return function(a, b) {
21312                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
21313              };
21314            })(Collections2.reverseOrder$());
21315          }
21316          return function(t1, t2) {
21317            return cmp(t2, t1);
21318          };
21319        };
21320        Collections2.reverseOrder = function(cmp) {
21321          if (typeof cmp === "function" && cmp.length === 2 || cmp === null) {
21322            return java2.util.Collections.reverseOrder$java_util_Comparator(cmp);
21323          } else if (cmp === void 0) {
21324            return java2.util.Collections.reverseOrder$();
21325          } else
21326            throw new Error("invalid overload");
21327        };
21328        Collections2.rotate = function(lst, dist) {
21329          javaemul.internal.InternalPreconditions.checkNotNull(lst);
21330          var size = lst.size();
21331          if (size === 0) {
21332            return;
21333          }
21334          var normdist = dist % size;
21335          if (normdist === 0) {
21336            return;
21337          }
21338          if (normdist < 0) {
21339            normdist += size;
21340          }
21341          if (lst != null && (lst.constructor != null && lst.constructor["__interfaces"] != null && lst.constructor["__interfaces"].indexOf("java.util.RandomAccess") >= 0)) {
21342            var list = lst;
21343            var temp = list.get(0);
21344            var index = 0;
21345            var beginIndex = 0;
21346            for (var i = 0; i < size; i++) {
21347              {
21348                index = (index + normdist) % size;
21349                temp = list.set(index, temp);
21350                if (index === beginIndex) {
21351                  index = ++beginIndex;
21352                  temp = list.get(beginIndex);
21353                }
21354              }
21355              ;
21356            }
21357          } else {
21358            var divideIndex = size - normdist;
21359            var sublist1 = lst.subList(0, divideIndex);
21360            var sublist2 = lst.subList(divideIndex, size);
21361            Collections2.reverse(sublist1);
21362            Collections2.reverse(sublist2);
21363            Collections2.reverse(lst);
21364          }
21365        };
21366        Collections2.shuffle = function(list, rnd) {
21367          if (rnd === void 0) {
21368            rnd = Collections2.RandomHolder.rnd_$LI$();
21369          }
21370          if (list != null && (list.constructor != null && list.constructor["__interfaces"] != null && list.constructor["__interfaces"].indexOf("java.util.RandomAccess") >= 0)) {
21371            for (var i = list.size() - 1; i >= 1; i--) {
21372              {
21373                Collections2.swapImpl$java_util_List$int$int(list, i, rnd.nextInt$int(i + 1));
21374              }
21375              ;
21376            }
21377          } else {
21378            var arr = list["toArray$"]();
21379            for (var i = arr.length - 1; i >= 1; i--) {
21380              {
21381                Collections2.swapImpl$java_lang_Object_A$int$int(arr, i, rnd.nextInt$int(i + 1));
21382              }
21383              ;
21384            }
21385            var it = list["listIterator$"]();
21386            for (var index = 0; index < arr.length; index++) {
21387              var e = arr[index];
21388              {
21389                it.next();
21390                it.set(e);
21391              }
21392            }
21393          }
21394        };
21395        Collections2.singleton = function(o) {
21396          var set = new java2.util.HashSet(1);
21397          set.add(o);
21398          return Collections2.unmodifiableSet(set);
21399        };
21400        Collections2.singletonList = function(o) {
21401          return new Collections2.SingletonList(o);
21402        };
21403        Collections2.singletonMap = function(key, value) {
21404          var map = new java2.util.HashMap(1);
21405          map.put(key, value);
21406          return Collections2.unmodifiableMap(map);
21407        };
21408        Collections2.sort$java_util_List = function(target) {
21409          Collections2.sort$java_util_List$java_util_Comparator(target, (function(funcInst) {
21410            if (funcInst == null || typeof funcInst == "function") {
21411              return funcInst;
21412            }
21413            return function(a, b) {
21414              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
21415            };
21416          })(null));
21417        };
21418        Collections2.sort$java_util_List$java_util_Comparator = function(target, c) {
21419          var x = target["toArray$"]();
21420          java2.util.Arrays.sort$java_lang_Object_A$java_util_Comparator(x, (function(funcInst) {
21421            if (funcInst == null || typeof funcInst == "function") {
21422              return funcInst;
21423            }
21424            return function(a, b) {
21425              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
21426            };
21427          })((function(funcInst) {
21428            if (funcInst == null || typeof funcInst == "function") {
21429              return funcInst;
21430            }
21431            return function(a, b) {
21432              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
21433            };
21434          })(c)));
21435          Collections2.replaceContents(target, x);
21436        };
21437        Collections2.sort = function(target, c) {
21438          if ((target != null && (target.constructor != null && target.constructor["__interfaces"] != null && target.constructor["__interfaces"].indexOf("java.util.List") >= 0) || target === null) && (typeof c === "function" && c.length === 2 || c === null)) {
21439            return java2.util.Collections.sort$java_util_List$java_util_Comparator(target, c);
21440          } else if ((target != null && (target.constructor != null && target.constructor["__interfaces"] != null && target.constructor["__interfaces"].indexOf("java.util.List") >= 0) || target === null) && c === void 0) {
21441            return java2.util.Collections.sort$java_util_List(target);
21442          } else
21443            throw new Error("invalid overload");
21444        };
21445        Collections2.swap = function(list, i, j) {
21446          Collections2.swapImpl$java_util_List$int$int(list, i, j);
21447        };
21448        Collections2.unmodifiableCollection = function(coll) {
21449          return new Collections2.UnmodifiableCollection(coll);
21450        };
21451        Collections2.unmodifiableList = function(list) {
21452          return list != null && (list.constructor != null && list.constructor["__interfaces"] != null && list.constructor["__interfaces"].indexOf("java.util.RandomAccess") >= 0) ? new Collections2.UnmodifiableRandomAccessList(list) : new Collections2.UnmodifiableList(list);
21453        };
21454        Collections2.unmodifiableMap = function(map) {
21455          return new Collections2.UnmodifiableMap(map);
21456        };
21457        Collections2.unmodifiableSet = function(set) {
21458          return new Collections2.UnmodifiableSet(set);
21459        };
21460        Collections2.unmodifiableSortedMap = function(map) {
21461          return new Collections2.UnmodifiableSortedMap(map);
21462        };
21463        Collections2.unmodifiableSortedSet = function(set) {
21464          return new Collections2.UnmodifiableSortedSet(set);
21465        };
21466        Collections2.hashCode$java_lang_Iterable = function(collection) {
21467          var hashCode = 0;
21468          for (var index = collection.iterator(); index.hasNext(); ) {
21469            var e = index.next();
21470            {
21471              hashCode = hashCode + java2.util.Objects.hashCode(e);
21472              hashCode = javaemul.internal.Coercions.ensureInt(hashCode);
21473            }
21474          }
21475          return hashCode;
21476        };
21477        Collections2.hashCode$java_util_List = function(list) {
21478          var hashCode = 1;
21479          for (var index = list.iterator(); index.hasNext(); ) {
21480            var e = index.next();
21481            {
21482              hashCode = 31 * hashCode + java2.util.Objects.hashCode(e);
21483              hashCode = javaemul.internal.Coercions.ensureInt(hashCode);
21484            }
21485          }
21486          return hashCode;
21487        };
21488        Collections2.hashCode = function(list) {
21489          if (list != null && (list.constructor != null && list.constructor["__interfaces"] != null && list.constructor["__interfaces"].indexOf("java.util.List") >= 0) || list === null) {
21490            return java2.util.Collections.hashCode$java_util_List(list);
21491          } else if (list != null && (list.constructor != null && list.constructor["__interfaces"] != null && list.constructor["__interfaces"].indexOf("java.lang.Iterable") >= 0) || list === null) {
21492            return java2.util.Collections.hashCode$java_lang_Iterable(list);
21493          } else
21494            throw new Error("invalid overload");
21495        };
21496        Collections2.replaceContents = function(target, x) {
21497          var size = target.size();
21498          for (var i = 0; i < size; i++) {
21499            {
21500              target.set(i, x[i]);
21501            }
21502            ;
21503          }
21504        };
21505        Collections2.swapImpl$java_util_List$int$int = function(list, i, j) {
21506          var t = list.get(i);
21507          list.set(i, list.get(j));
21508          list.set(j, t);
21509        };
21510        Collections2.swapImpl = function(list, i, j) {
21511          if ((list != null && (list.constructor != null && list.constructor["__interfaces"] != null && list.constructor["__interfaces"].indexOf("java.util.List") >
21511= 0) || list === null) && (typeof i === "number" || i === null) && (typeof j === "number" || j === null)) {
21512            return java2.util.Collections.swapImpl$java_util_List$int$int(list, i, j);
21513          } else if ((list != null && list instanceof Array && (list.length == 0 || list[0] == null || list[0] != null) || list === null) && (typeof i === "number" || i === null) && (typeof j === "number" || j === null)) {
21514            return java2.util.Collections.swapImpl$java_lang_Object_A$int$int(list, i, j);
21515          } else
21516            throw new Error("invalid overload");
21517        };
21518        Collections2.swapImpl$java_lang_Object_A$int$int = function(a, i, j) {
21519          var obj = a[i];
21520          a[i] = a[j];
21521          a[j] = obj;
21522        };
21523        Collections2.synchronizedList = function(list) {
21524          return new java2.util.ArrayList(list);
21525        };
21526        Collections2.synchronizedSet = function(s) {
21527          return new java2.util.HashSet(s);
21528        };
21529        return Collections2;
21530      })()
21531    );
21532    util2.Collections = Collections;
21533    Collections["__class"] = "java.util.Collections";
21534    (function(Collections2) {
21535      var LifoQueue = (
21536        /** @class */
21537        (function(_super) {
21538          __extends(LifoQueue2, _super);
21539          function LifoQueue2(deque) {
21540            var _this = _super.call(this) || this;
21541            if (_this.deque === void 0) {
21542              _this.deque = null;
21543            }
21544            _this.deque = deque;
21545            return _this;
21546          }
21547          LifoQueue2.prototype.iterator = function() {
21548            return this.deque.iterator();
21549          };
21550          LifoQueue2.prototype.offer = function(e) {
21551            return this.deque.offerFirst(e);
21552          };
21553          LifoQueue2.prototype.peek = function() {
21554            return this.deque.peekFirst();
21555          };
21556          LifoQueue2.prototype.poll = function() {
21557            return this.deque.pollFirst();
21558          };
21559          LifoQueue2.prototype.size = function() {
21560            return this.deque.size();
21561          };
21562          return LifoQueue2;
21563        })(java2.util.AbstractQueue)
21564      );
21565      Collections2.LifoQueue = LifoQueue;
21566      LifoQueue["__class"] = "java.util.Collections.LifoQueue";
21567      LifoQueue["__interfaces"] = ["java.util.Collection", "java.util.Queue", "java.lang.Iterable", "java.io.Serializable"];
21568      var EmptyList = (
21569        /** @class */
21570        (function(_super) {
21571          __extends(EmptyList2, _super);
21572          function EmptyList2() {
21573            return _super.call(this) || this;
21574          }
21575          EmptyList2.prototype.contains = function(object) {
21576            return false;
21577          };
21578          EmptyList2.prototype.get = function(location) {
21579            javaemul.internal.InternalPreconditions.checkElementIndex(location, 0);
21580            return null;
21581          };
21582          EmptyList2.prototype.iterator = function() {
21583            return Collections2.emptyIterator();
21584          };
21585          EmptyList2.prototype.listIterator = function(from) {
21586            if (typeof from === "number" || from === null) {
21587              return _super.prototype.listIterator.call(this, from);
21588            } else if (from === void 0) {
21589              return this.listIterator$();
21590            } else
21591              throw new Error("invalid overload");
21592          };
21593          EmptyList2.prototype.listIterator$ = function() {
21594            return Collections2.emptyListIterator();
21595          };
21596          EmptyList2.prototype.size = function() {
21597            return 0;
21598          };
21599          return EmptyList2;
21600        })(java2.util.AbstractList)
21601      );
21602      Collections2.EmptyList = EmptyList;
21603      EmptyList["__class"] = "java.util.Collections.EmptyList";
21604      EmptyList["__interfaces"] = ["java.util.RandomAccess", "java.util.List", "java.util.Collection", "java.lang.Iterable", "java.io.Serializable"];
21605      var EmptyListIterator = (
21606        /** @class */
21607        (function() {
21608          function EmptyListIterator2() {
21609          }
21610          EmptyListIterator2.prototype.forEachRemaining = function(consumer) {
21611            var _this = this;
21612            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
21613              if (funcInst == null || typeof funcInst == "function") {
21614                return funcInst;
21615              }
21616              return function(arg0) {
21617                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
21618              };
21619            })(consumer));
21620            while (this.hasNext()) {
21621              {
21622                (function(target) {
21623                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
21624                })(consumer);
21625              }
21626            }
21627            ;
21628          };
21629          EmptyListIterator2.INSTANCE_$LI$ = function() {
21630            if (EmptyListIterator2.INSTANCE == null) {
21631              EmptyListIterator2.INSTANCE = new Collections2.EmptyListIterator();
21632            }
21633            return EmptyListIterator2.INSTANCE;
21634          };
21635          EmptyListIterator2.prototype.add = function(o) {
21636            throw new java2.lang.UnsupportedOperationException();
21637          };
21638          EmptyListIterator2.prototype.hasNext = function() {
21639            return false;
21640          };
21641          EmptyListIterator2.prototype.hasPrevious = function() {
21642            return false;
21643          };
21644          EmptyListIterator2.prototype.next = function() {
21645            throw new java2.util.NoSuchElementException();
21646          };
21647          EmptyListIterator2.prototype.nextIndex = function() {
21648            return 0;
21649          };
21650          EmptyListIterator2.prototype.previous = function() {
21651            throw new java2.util.NoSuchElementException();
21652          };
21653          EmptyListIterator2.prototype.previousIndex = function() {
21654            return -1;
21655          };
21656          EmptyListIterator2.prototype.remove = function() {
21657            throw new java2.lang.IllegalStateException();
21658          };
21659          EmptyListIterator2.prototype.set = function(o) {
21660            throw new java2.lang.IllegalStateException();
21661          };
21662          return EmptyListIterator2;
21663        })()
21664      );
21665      Collections2.EmptyListIterator = EmptyListIterator;
21666      EmptyListIterator["__class"] = "java.util.Collections.EmptyListIterator";
21667      EmptyListIterator["__interfaces"] = ["java.util.Iterator", "java.util.ListIterator"];
21668      var EmptySet = (
21669        /** @class */
21670        (function(_super) {
21671          __extends(EmptySet2, _super);
21672          function EmptySet2() {
21673            return _super.call(this) || this;
21674          }
21675          EmptySet2.prototype.contains = function(object) {
21676            return false;
21677          };
21678          EmptySet2.prototype.iterator = function() {
21679            return Collections2.emptyIterator();
21680          };
21681          EmptySet2.prototype.size = function() {
21682            return 0;
21683          };
21684          return EmptySet2;
21685        })(java2.util.AbstractSet)
21686      );
21687      Collections2.EmptySet = EmptySet;
21688      EmptySet["__class"] = "java.util.Collections.EmptySet";
21689      EmptySet["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable", "java.io.Serializable"];
21690      var EmptyMap = (
21691        /** @class */
21692        (function(_super) {
21693          __extends(EmptyMap2, _super);
21694          function EmptyMap2() {
21695            return _super.call(this) || this;
21696          }
21697          EmptyMap2.prototype.containsKey = function(key) {
21698            return false;
21699          };
21700          EmptyMap2.prototype.containsValue = function(value) {
21701            return false;
21702          };
21703          EmptyMap2.prototype.entrySet = function() {
21704            return java2.util.Collections.EMPTY_SET_$LI$();
21705          };
21706          EmptyMap2.prototype.get = function(key) {
21707            return null;
21708          };
21709          EmptyMap2.prototype.keySet = function() {
21710            return java2.util.Collections.EMPTY_SET_$LI$();
21711          };
21712          EmptyMap2.prototype.size = function() {
21713            return 0;
21714          };
21715          EmptyMap2.prototype.values = function() {
21716            return java2.util.Collections.EMPTY_LIST_$LI$();
21717          };
21718          return EmptyMap2;
21719        })(java2.util.AbstractMap)
21720      );
21721      Collections2.EmptyMap = EmptyMap;
21722      EmptyMap["__class"] = "java.util.Collections.EmptyMap";
21723      EmptyMap["__interfaces"] = ["java.util.Map", "java.io.Serializable"];
21724      var ReverseComparator = (
21725        /** @class */
21726        (function() {
21727          function ReverseComparator2() {
21728          }
21729          ReverseComparator2.INSTANCE_$LI$ = function() {
21730            if (ReverseComparator2.INSTANCE == null) {
21731              ReverseComparator2.INSTANCE = new Collections2.ReverseComparator();
21732            }
21733            return ReverseComparator2.INSTANCE;
21734          };
21735          ReverseComparator2.prototype.compare$java_lang_Comparable$java_lang_Comparable = function(o1, o2) {
21736            return o2.compareTo(o1);
21737          };
21738          ReverseComparator2.prototype.compare = function(o1, o2) {
21739            if ((o1 != null && (o1.constructor != null && o1.constructor["__interfaces"] != null && o1.constructor["__interfaces"].indexOf("java.lang.Comparable") >= 0) || o1 === null) && (o2 != null && (o2.constructor != null && o2.constructor["__interfaces"] != null && o2.constructor["__interfaces"].indexOf("java.lang.Comparable") >= 0) || o2 === null)) {
21740              return this.compare$java_lang_Comparable$java_lang_Comparable(o1, o2);
21741            } else
21742              throw new Error("invalid overload");
21743          };
21744          return ReverseComparator2;
21745        })()
21746      );
21747      Collections2.ReverseComparator = ReverseComparator;
21748      ReverseComparator["__class"] = "java.util.Collections.ReverseComparator";
21749      ReverseComparator["__interfaces"] = ["java.util.Comparator"];
21750      var SetFromMap = (
21751        /** @class */
21752        (function(_super) {
21753          __extends(SetFromMap2, _super);
21754          function SetFromMap2(map) {
21755            var _this = _super.call(this) || this;
21756            if (_this.backingMap === void 0) {
21757              _this.backingMap = null;
21758            }
21759            if (_this.__keySet === void 0) {
21760              _this.__keySet = null;
21761            }
21762            _this.backingMap = map;
21763            return _this;
21764          }
21765          SetFromMap2.prototype.add = function(e) {
21766            return this.backingMap.put(e, javaemul.internal.BooleanHelper.TRUE) == null;
21767          };
21768          SetFromMap2.prototype.clear = function() {
21769            this.backingMap.clear();
21770          };
21771          SetFromMap2.prototype.contains = function(o) {
21772            return this.backingMap.containsKey(o);
21773          };
21774          SetFromMap2.prototype.equals = function(o) {
21775            return o === this || /* equals */
21776            (function(o1, o2) {
21777              if (o1 && o1.equals) {
21778                return o1.equals(o2);
21779              } else {
21780                return o1 === o2;
21781              }
21782            })(this.keySet(), o);
21783          };
21784          SetFromMap2.prototype.hashCode = function() {
21785            return (
21786              /* hashCode */
21787              (function(o) {
21788                if (o.hashCode) {
21789                  return o.hashCode();
21790                } else {
21791                  return o.toString().split("").reduce(function(prevHash, currVal) {
21792                    return (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0;
21793                  }, 0);
21794                }
21795              })(this.keySet())
21796            );
21797          };
21798          SetFromMap2.prototype.iterator = function() {
21799            return this.keySet().iterator();
21800          };
21801          SetFromMap2.prototype.remove = function(o) {
21802            return this.backingMap.remove(o) != null;
21803          };
21804          SetFromMap2.prototype.size = function() {
21805            return this.keySet().size();
21806          };
21807          SetFromMap2.prototype.toString = function() {
21808            return this.keySet().toString();
21809          };
21810          SetFromMap2.prototype.keySet = function() {
21811            if (this.__keySet == null) {
21812              this.__keySet = this.backingMap.keySet();
21813            }
21814            return this.__keySet;
21815          };
21816          return SetFromMap2;
21817        })(java2.util.AbstractSet)
21818      );
21819      Collections2.SetFromMap = SetFromMap;
21820      SetFromMap["__class"] = "java.util.Collections.SetFromMap";
21821      SetFromMap["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable", "j
21821ava.io.Serializable"];
21822      var SingletonList = (
21823        /** @class */
21824        (function(_super) {
21825          __extends(SingletonList2, _super);
21826          function SingletonList2(element) {
21827            var _this = _super.call(this) || this;
21828            if (_this.element === void 0) {
21829              _this.element = null;
21830            }
21831            _this.element = element;
21832            return _this;
21833          }
21834          SingletonList2.prototype.contains = function(item) {
21835            return java2.util.Objects.equals(this.element, item);
21836          };
21837          SingletonList2.prototype.get = function(index) {
21838            javaemul.internal.InternalPreconditions.checkElementIndex(index, 1);
21839            return this.element;
21840          };
21841          SingletonList2.prototype.size = function() {
21842            return 1;
21843          };
21844          return SingletonList2;
21845        })(java2.util.AbstractList)
21846      );
21847      Collections2.SingletonList = SingletonList;
21848      SingletonList["__class"] = "java.util.Collections.SingletonList";
21849      SingletonList["__interfaces"] = ["java.util.List", "java.util.Collection", "java.lang.Iterable", "java.io.Serializable"];
21850      var UnmodifiableCollection = (
21851        /** @class */
21852        (function() {
21853          function UnmodifiableCollection2(coll) {
21854            if (this.coll === void 0) {
21855              this.coll = null;
21856            }
21857            this.coll = coll;
21858          }
21859          UnmodifiableCollection2.prototype.stream = function() {
21860            return new javaemul.internal.stream.StreamHelper(this);
21861          };
21862          UnmodifiableCollection2.prototype.parallelStream = function() {
21863            return this.stream();
21864          };
21865          UnmodifiableCollection2.prototype.removeIf = function(filter) {
21866            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
21867              if (funcInst == null || typeof funcInst == "function") {
21868                return funcInst;
21869              }
21870              return function(arg0) {
21871                return (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0);
21872              };
21873            })(filter));
21874            var removed = false;
21875            var _loop_6 = function(it2) {
21876              {
21877                if ((function(target) {
21878                  return typeof target === "function" ? target(it2.next()) : target.test(it2.next());
21879                })(filter)) {
21880                  it2.remove();
21881                  removed = true;
21882                }
21883              }
21884              ;
21885            };
21886            for (var it = this.iterator(); it.hasNext(); ) {
21887              _loop_6(it);
21888            }
21889            return removed;
21890          };
21891          UnmodifiableCollection2.prototype.forEach = function(action) {
21892            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
21893              if (funcInst == null || typeof funcInst == "function") {
21894                return funcInst;
21895              }
21896              return function(arg0) {
21897                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
21898              };
21899            })(action));
21900            var _loop_7 = function(index2) {
21901              var t = index2.next();
21902              {
21903                (function(target) {
21904                  return typeof target === "function" ? target(t) : target.accept(t);
21905                })(action);
21906              }
21907            };
21908            for (var index = this.iterator(); index.hasNext(); ) {
21909              _loop_7(index);
21910            }
21911          };
21912          UnmodifiableCollection2.prototype.add = function(o) {
21913            throw new java2.lang.UnsupportedOperationException();
21914          };
21915          UnmodifiableCollection2.prototype.addAll = function(c) {
21916            throw new java2.lang.UnsupportedOperationException();
21917          };
21918          UnmodifiableCollection2.prototype.clear = function() {
21919            throw new java2.lang.UnsupportedOperationException();
21920          };
21921          UnmodifiableCollection2.prototype.contains = function(o) {
21922            return this.coll.contains(o);
21923          };
21924          UnmodifiableCollection2.prototype.containsAll = function(c) {
21925            return this.coll.containsAll(c);
21926          };
21927          UnmodifiableCollection2.prototype.isEmpty = function() {
21928            return this.coll.isEmpty();
21929          };
21930          UnmodifiableCollection2.prototype.iterator = function() {
21931            return new Collections2.UnmodifiableCollectionIterator(this.coll.iterator());
21932          };
21933          UnmodifiableCollection2.prototype.remove = function(o) {
21934            throw new java2.lang.UnsupportedOperationException();
21935          };
21936          UnmodifiableCollection2.prototype.removeAll = function(c) {
21937            throw new java2.lang.UnsupportedOperationException();
21938          };
21939          UnmodifiableCollection2.prototype.retainAll = function(c) {
21940            throw new java2.lang.UnsupportedOperationException();
21941          };
21942          UnmodifiableCollection2.prototype.size = function() {
21943            return this.coll.size();
21944          };
21945          UnmodifiableCollection2.prototype.toArray$ = function() {
21946            return this.coll["toArray$"]();
21947          };
21948          UnmodifiableCollection2.prototype.toArray$java_lang_Object_A = function(a) {
21949            return this.coll["toArray$java_lang_Object_A"](a);
21950          };
21951          UnmodifiableCollection2.prototype.toArray = function(a) {
21952            if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || a[0] != null) || a === null) {
21953              return this.toArray$java_lang_Object_A(a);
21954            } else if (a === void 0) {
21955              return this.toArray$();
21956            } else
21957              throw new Error("invalid overload");
21958          };
21959          UnmodifiableCollection2.prototype.toString = function() {
21960            return this.coll.toString();
21961          };
21962          return UnmodifiableCollection2;
21963        })()
21964      );
21965      Collections2.UnmodifiableCollection = UnmodifiableCollection;
21966      UnmodifiableCollection["__class"] = "java.util.Collections.UnmodifiableCollection";
21967      UnmodifiableCollection["__interfaces"] = ["java.util.Collection", "java.lang.Iterable"];
21968      var UnmodifiableCollectionIterator = (
21969        /** @class */
21970        (function() {
21971          function UnmodifiableCollectionIterator2(it) {
21972            if (this.it === void 0) {
21973              this.it = null;
21974            }
21975            this.it = it;
21976          }
21977          UnmodifiableCollectionIterator2.prototype.forEachRemaining = function(consumer) {
21978            var _this = this;
21979            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
21980              if (funcInst == null || typeof funcInst == "function") {
21981                return funcInst;
21982              }
21983              return function(arg0) {
21984                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
21985              };
21986            })(consumer));
21987            while (this.hasNext()) {
21988              {
21989                (function(target) {
21990                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
21991                })(consumer);
21992              }
21993            }
21994            ;
21995          };
21996          UnmodifiableCollectionIterator2.prototype.hasNext = function() {
21997            return this.it.hasNext();
21998          };
21999          UnmodifiableCollectionIterator2.prototype.next = function() {
22000            return this.it.next();
22001          };
22002          UnmodifiableCollectionIterator2.prototype.remove = function() {
22003            throw new java2.lang.UnsupportedOperationException();
22004          };
22005          return UnmodifiableCollectionIterator2;
22006        })()
22007      );
22008      Collections2.UnmodifiableCollectionIterator = UnmodifiableCollectionIterator;
22009      UnmodifiableCollectionIterator["__class"] = "java.util.Collections.UnmodifiableCollectionIterator";
22010      UnmodifiableCollectionIterator["__interfaces"] = ["java.util.Iterator"];
22011      var RandomHolder = (
22012        /** @class */
22013        (function() {
22014          function RandomHolder2() {
22015          }
22016          RandomHolder2.rnd_$LI$ = function() {
22017            if (RandomHolder2.rnd == null) {
22018              RandomHolder2.rnd = new java2.util.Random();
22019            }
22020            return RandomHolder2.rnd;
22021          };
22022          return RandomHolder2;
22023        })()
22024      );
22025      Collections2.RandomHolder = RandomHolder;
22026      RandomHolder["__class"] = "java.util.Collections.RandomHolder";
22027      var UnmodifiableList = (
22028        /** @class */
22029        (function(_super) {
22030          __extends(UnmodifiableList2, _super);
22031          function UnmodifiableList2(list) {
22032            var _this = _super.call(this, list) || this;
22033            if (_this.list === void 0) {
22034              _this.list = null;
22035            }
22036            _this.list = list;
22037            return _this;
22038          }
22039          UnmodifiableList2.prototype.sort = function(c) {
22040            var a = this.toArray();
22041            java2.util.Arrays.sort(a, (function(funcInst) {
22042              if (funcInst == null || typeof funcInst == "function") {
22043                return funcInst;
22044              }
22045              return function(a2, b) {
22046                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a2, b);
22047              };
22048            })((function(funcInst) {
22049              if (funcInst == null || typeof funcInst == "function") {
22050                return funcInst;
22051              }
22052              return function(a2, b) {
22053                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a2, b);
22054              };
22055            })(c)));
22056            var i = this.listIterator();
22057            for (var index = 0; index < a.length; index++) {
22058              var e = a[index];
22059              {
22060                i.next();
22061                i.set(e);
22062              }
22063            }
22064          };
22065          UnmodifiableList2.prototype.add$int$java_lang_Object = function(index, element) {
22066            throw new java2.lang.UnsupportedOperationException();
22067          };
22068          UnmodifiableList2.prototype.add = function(index, element) {
22069            if ((typeof index === "number" || index === null) && (element != null || element === null)) {
22070              return this.add$int$java_lang_Object(index, element);
22071            } else if ((index != null || index === null) && element === void 0) {
22072              return _super.prototype.add.call(this, index);
22073            } else
22074              throw new Error("invalid overload");
22075          };
22076          UnmodifiableList2.prototype.addAll$int$java_util_Collection = function(index, c) {
22077            throw new java2.lang.UnsupportedOperationException();
22078          };
22079          UnmodifiableList2.prototype.addAll = function(index, c) {
22080            if ((typeof index === "number" || index === null) && (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || c === null)) {
22081              return this.addAll$int$java_util_Collection(index, c);
22082            } else if ((index != null && (index.constructor != null && index.constructor["__interfaces"] != null && index.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || index === null) && c === void 0) {
22083              return _super.prototype.addAll.call(this, index);
22084            } else
22085              throw new Error("invalid overload");
22086          };
22087          UnmodifiableList2.prototype.equals = function(o) {
22088            return (
22089              /* equals */
22090              (function(o1, o2) {
22091                if (o1 && o1.equals) {
22092                  return o1.equals(o2);
22093                } else {
22094                  return o1 === o2;
22095                }
22096              })(this.list, o)
22097            );
22098          };
22099          UnmodifiableList2.prototype.get = function(index) {
22100            return this.list.get(index);
22101          };
22102          UnmodifiableList2.prototype.hashCode = function() {
22103            return (
22104              /* hashCode */
22105              (function(o) {
22106                if (o.hashCode) {
22107                  return o.hashCode();
22108                } else {
22109                  return o.toString().split("").reduce(function(prevHash, currVal) {
22110                    return (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0;
22111                  }, 0);
22112                }
22113              })(this.list)
22114            );
22115          };
22116          UnmodifiableList2.prototype.indexOf = function(o) {
22117            return this.list.indexOf(o);
22118          };
22119          UnmodifiableList2.prototype.isEmpty = function() {
22120            return this.list.isEmpty();
22121          };
22122          UnmodifiableList2.prototype.lastIndexOf = function(o) {
22123            return this.list.lastIndexOf(o);
22124          };
22125          UnmodifiableList2.prototype.listIterator$ = function() {
22126            return this.listIterator$int(0);
22127          };
22128          UnmodifiableList2.prototype.listIterator$int = function(from) {
22129            return new Collections2.UnmodifiableListIterator(this.list["listIterator$int"](from));
22130          };
22131          UnmodifiableList2.prototype.listIterator = function(from) {
22132            if (typeof from === "number" || from === null) {
22133              return this.listIterator$int(from);
22134            } else if (from === void 0) {
22135              return this.listIterator$();
22136            } else
22137              throw new Error("invalid overload");
22138          };
22139          UnmodifiableList2.prototype.remove$int = function(index) {
22140            throw new java2.lang.UnsupportedOperationException();
22141          };
22142          UnmodifiableList2.prototype.remove = function(index) {
22143            if (typeof index === "number" || index === null) {
22144              return this.remove$int(index);
22145            } else if (index != null || index === null) {
22146              return _super.prototype.remove.call(this, index);
22147            } else
22148              throw new Error("invalid overload");
22149          };
22150          UnmodifiableList2.prototype.set = function(index, element) {
22151            throw new java2.lang.UnsupportedOperationException();
22152          };
22153          UnmodifiableList2.prototype.subList = function(fromIndex, toIndex) {
22154            return new Collections2.UnmodifiableList(this.list.subList(fromIndex, toIndex));
22155          };
22156          return UnmodifiableList2;
22157        })(Collections2.UnmodifiableCollection)
22158      );
22159      Collections2.UnmodifiableList = UnmodifiableList;
22160      UnmodifiableList["__class"] = "java.util.Collections.UnmodifiableList";
22161      UnmodifiableList["__interfaces"] = ["java.util.List", "java.util.Collection", "java.lang.Iterable"];
22162      var UnmodifiableSet = (
22163        /** @class */
22164        (function(_super) {
22165          __extends(UnmodifiableSet2, _super);
22166          function UnmodifiableSet2(set) {
22167            return _super.call(this, set) || this;
22168          }
22169          UnmodifiableSet2.prototype.equals = function(o) {
22170            return (
22171              /* equals */
22172              (function(o1, o2) {
22173                if (o1 && o1.equals) {
22174                  return o1.equals(o2);
22175                } else {
22176                  return o1 === o2;
22177                }
22178              })(this.coll, o)
22179            );
22180          };
22181          UnmodifiableSet2.prototype.hashCode = function() {
22182            return (
22183              /* hashCode */
22184              (function(o) {
22185                if (o.hashCode) {
22186                  return o.hashCode();
22187                } else {
22188                  return o.toString().split("").reduce(function(prevHash, currVal) {
22189                    return (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0;
22190                  }, 0);
22191                }
22192              })(this.coll)
22193            );
22194          };
22195          return UnmodifiableSet2;
22196        })(Collections2.UnmodifiableCollection)
22197      );
22198      Collections2.UnmodifiableSet = UnmodifiableSet;
22199      UnmodifiableSet["__class"] = "java.util.Collections.UnmodifiableSet";
22200      UnmodifiableSet["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable"];
22201      var UnmodifiableListIterator = (
22202        /** @class */
22203        (function(_super) {
22204          __extends(UnmodifiableListIterator2, _super);
22205          function UnmodifiableListIterator2(lit) {
22206            var _this = _super.call(this, lit) || this;
22207            if (_this.lit === void 0) {
22208              _this.lit = null;
22209            }
22210            _this.lit = lit;
22211            return _this;
22212          }
22213          UnmodifiableListIterator2.prototype.add = function(o) {
22214            throw new java2.lang.UnsupportedOperationException();
22215          };
22216          UnmodifiableListIterator2.prototype.hasPrevious = function() {
22217            return this.lit.hasPrevious();
22218          };
22219          UnmodifiableListIterator2.prototype.nextIndex = function() {
22220            return this.lit.nextIndex();
22221          };
22222          UnmodifiableListIterator2.prototype.previous = function() {
22223            return this.lit.previous();
22224          };
22225          UnmodifiableListIterator2.prototype.previousIndex = function() {
22226            return this.lit.previousIndex();
22227          };
22228          UnmodifiableListIterator2.prototype.set = function(o) {
22229            throw new java2.lang.UnsupportedOperationException();
22230          };
22231          return UnmodifiableListIterator2;
22232        })(Collections2.UnmodifiableCollectionIterator)
22233      );
22234      Collections2.UnmodifiableListIterator = UnmodifiableListIterator;
22235      UnmodifiableListIterator["__class"] = "java.util.Collections.UnmodifiableListIterator";
22236      UnmodifiableListIterator["__interfaces"] = ["java.util.Iterator", "java.util.ListIterator"];
22237      var UnmodifiableRandomAccessList = (
22238        /** @class */
22239        (function(_super) {
22240          __extends(UnmodifiableRandomAccessList2, _super);
22241          function UnmodifiableRandomAccessList2(list) {
22242            return _super.call(this, list) || this;
22243          }
22244          return UnmodifiableRandomAccessList2;
22245        })(Collections2.UnmodifiableList)
22246      );
22247      Collections2.UnmodifiableRandomAccessList = UnmodifiableRandomAccessList;
22248      UnmodifiableRandomAccessList["__class"] = "java.util.Collections.UnmodifiableRandomAccessList";
22249      UnmodifiableRandomAccessList["__interfaces"] = ["java.util.RandomAccess", "java.util.List", "java.util.Collection", "java.lang.Iterable"];
22250      var UnmodifiableMap = (
22251        /** @class */
22252        (function() {
22253          function UnmodifiableMap2(map) {
22254            if (this.__entrySet === void 0) {
22255              this.__entrySet = null;
22256            }
22257            if (this.__keySet === void 0) {
22258              this.__keySet = null;
22259            }
22260            if (this.map === void 0) {
22261              this.map = null;
22262            }
22263            if (this.__values === void 0) {
22264              this.__values = null;
22265            }
22266            this.map = map;
22267          }
22268          UnmodifiableMap2.prototype.replaceAll = function(__function) {
22269            java2.util.Objects.requireNonNull((function(funcInst) {
22270              if (funcInst == null || typeof funcInst == "function") {
22271                return funcInst;
22272              }
22273              return function(arg0, arg1) {
22274                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0, arg1);
22275              };
22276            })(__function));
22277            var _loop_8 = function(index2) {
22278              var entry = index2.next();
22279              {
22280                var k_2;
22281                var v_2;
22282                try {
22283                  k_2 = entry.getKey();
22284                  v_2 = entry.getValue();
22285                } catch (ise) {
22286                  throw new java2.lang.RuntimeException(ise);
22287                }
22288                v_2 = (function(target) {
22289                  return typeof target === "function" ? target(k_2, v_2) : target.apply(k_2, v_2);
22290                })(__function);
22291                try {
22292                  entry.setValue(v_2);
22293                } catch (ise) {
22294                  throw new java2.lang.RuntimeException(ise);
22295                }
22296              }
22297            };
22298            for (var index = this.entrySet().iterator(); index.hasNext(); ) {
22299              _loop_8(index);
22300            }
22301          };
22302          UnmodifiableMap2.prototype.getOrDefault = function(key, defaultValue) {
22303            var v;
22304            return (v = this.get(key)) != null || this.containsKey(key) ? v : defaultValue;
22305          };
22306          UnmodifiableMap2.prototype.merge = function(key, value, map) {
22307            var old = this.get(key);
22308            var next = old == null ? value : (function(target) {
22309              return typeof target === "function" ? target(old, value) : target.apply(old, value);
22310            })(map);
22311            if (next == null) {
22312              this.remove(key);
22313            } else {
22314              this.put(key, next);
22315            }
22316            return next;
22317          };
22318          UnmodifiableMap2.prototype.computeIfAbsent = function(key, mappingFunction) {
22319            var result;
22320            if ((result = this.get(key)) == null) {
22321              result = (function(target) {
22322                return typeof target === "function" ? target(key) : target.apply(key);
22323              })(mappingFunction);
22324              if (result != null)
22325                this.put(key, result);
22326            }
22327            return result;
22328          };
22329          UnmodifiableMap2.prototype.putIfAbsent = function(key, value) {
22330            var v = this.get(key);
22331            if (v == null) {
22332              v = this.put(key, value);
22333            }
22334            return v;
22335          };
22336          UnmodifiableMap2.prototype.clear = function() {
22337            throw new java2.lang.UnsupportedOperationException();
22338          };
22339          UnmodifiableMap2.prototype.containsKey = function(key) {
22340            return this.map.containsKey(key);
22341          };
22342          UnmodifiableMap2.prototype.containsValue = function(val) {
22343            return this.map.containsValue(val);
22344          };
22345          UnmodifiableMap2.prototype.entrySet = function
22345() {
22346            if (this.__entrySet == null) {
22347              this.__entrySet = new UnmodifiableMap2.UnmodifiableEntrySet(this.map.entrySet());
22348            }
22349            return this.__entrySet;
22350          };
22351          UnmodifiableMap2.prototype.equals = function(o) {
22352            return (
22353              /* equals */
22354              (function(o1, o2) {
22355                if (o1 && o1.equals) {
22356                  return o1.equals(o2);
22357                } else {
22358                  return o1 === o2;
22359                }
22360              })(this.map, o)
22361            );
22362          };
22363          UnmodifiableMap2.prototype.get = function(key) {
22364            return this.map.get(key);
22365          };
22366          UnmodifiableMap2.prototype.hashCode = function() {
22367            return (
22368              /* hashCode */
22369              (function(o) {
22370                if (o.hashCode) {
22371                  return o.hashCode();
22372                } else {
22373                  return o.toString().split("").reduce(function(prevHash, currVal) {
22374                    return (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0;
22375                  }, 0);
22376                }
22377              })(this.map)
22378            );
22379          };
22380          UnmodifiableMap2.prototype.isEmpty = function() {
22381            return this.map.isEmpty();
22382          };
22383          UnmodifiableMap2.prototype.keySet = function() {
22384            if (this.__keySet == null) {
22385              this.__keySet = new Collections2.UnmodifiableSet(this.map.keySet());
22386            }
22387            return this.__keySet;
22388          };
22389          UnmodifiableMap2.prototype.put = function(key, value) {
22390            throw new java2.lang.UnsupportedOperationException();
22391          };
22392          UnmodifiableMap2.prototype.putAll = function(t) {
22393            throw new java2.lang.UnsupportedOperationException();
22394          };
22395          UnmodifiableMap2.prototype.remove = function(key) {
22396            throw new java2.lang.UnsupportedOperationException();
22397          };
22398          UnmodifiableMap2.prototype.size = function() {
22399            return this.map.size();
22400          };
22401          UnmodifiableMap2.prototype.toString = function() {
22402            return this.map.toString();
22403          };
22404          UnmodifiableMap2.prototype.values = function() {
22405            if (this.__values == null) {
22406              this.__values = new Collections2.UnmodifiableCollection(this.map.values());
22407            }
22408            return this.__values;
22409          };
22410          return UnmodifiableMap2;
22411        })()
22412      );
22413      Collections2.UnmodifiableMap = UnmodifiableMap;
22414      UnmodifiableMap["__class"] = "java.util.Collections.UnmodifiableMap";
22415      UnmodifiableMap["__interfaces"] = ["java.util.Map"];
22416      (function(UnmodifiableMap2) {
22417        var UnmodifiableEntrySet = (
22418          /** @class */
22419          (function(_super) {
22420            __extends(UnmodifiableEntrySet2, _super);
22421            function UnmodifiableEntrySet2(s) {
22422              return _super.call(this, s) || this;
22423            }
22424            UnmodifiableEntrySet2.prototype.contains = function(o) {
22425              return this.coll.contains(o);
22426            };
22427            UnmodifiableEntrySet2.prototype.containsAll = function(o) {
22428              return this.coll.containsAll(o);
22429            };
22430            UnmodifiableEntrySet2.prototype.iterator = function() {
22431              var it = this.coll.iterator();
22432              return new UnmodifiableEntrySet2.UnmodifiableEntrySet$0(this, it);
22433            };
22434            UnmodifiableEntrySet2.prototype.toArray$ = function() {
22435              var array = _super.prototype.toArray$.call(this);
22436              this.wrap(array, array.length);
22437              return array;
22438            };
22439            UnmodifiableEntrySet2.prototype.toArray$java_lang_Object_A = function(a) {
22440              var result = _super.prototype.toArray$java_lang_Object_A.call(this, a);
22441              this.wrap(result, this.coll.size());
22442              return result;
22443            };
22444            UnmodifiableEntrySet2.prototype.toArray = function(a) {
22445              if (a != null && a instanceof Array && (a.length == 0 || a[0] == null || a[0] != null) || a === null) {
22446                return this.toArray$java_lang_Object_A(a);
22447              } else if (a === void 0) {
22448                return this.toArray$();
22449              } else
22450                throw new Error("invalid overload");
22451            };
22452            UnmodifiableEntrySet2.prototype.wrap = function(array, size) {
22453              for (var i = 0; i < size; ++i) {
22454                {
22455                  array[i] = new UnmodifiableEntrySet2.UnmodifiableEntry(array[i]);
22456                }
22457                ;
22458              }
22459            };
22460            return UnmodifiableEntrySet2;
22461          })(Collections2.UnmodifiableSet)
22462        );
22463        UnmodifiableMap2.UnmodifiableEntrySet = UnmodifiableEntrySet;
22464        UnmodifiableEntrySet["__class"] = "java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet";
22465        UnmodifiableEntrySet["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable"];
22466        (function(UnmodifiableEntrySet2) {
22467          var UnmodifiableEntry = (
22468            /** @class */
22469            (function() {
22470              function UnmodifiableEntry2(entry) {
22471                if (this.entry === void 0) {
22472                  this.entry = null;
22473                }
22474                this.entry = entry;
22475              }
22476              UnmodifiableEntry2.prototype.equals = function(o) {
22477                return (
22478                  /* equals */
22479                  (function(o1, o2) {
22480                    if (o1 && o1.equals) {
22481                      return o1.equals(o2);
22482                    } else {
22483                      return o1 === o2;
22484                    }
22485                  })(this.entry, o)
22486                );
22487              };
22488              UnmodifiableEntry2.prototype.getKey = function() {
22489                return this.entry.getKey();
22490              };
22491              UnmodifiableEntry2.prototype.getValue = function() {
22492                return this.entry.getValue();
22493              };
22494              UnmodifiableEntry2.prototype.hashCode = function() {
22495                return (
22496                  /* hashCode */
22497                  (function(o) {
22498                    if (o.hashCode) {
22499                      return o.hashCode();
22500                    } else {
22501                      return o.toString().split("").reduce(function(prevHash, currVal) {
22502                        return (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0;
22503                      }, 0);
22504                    }
22505                  })(this.entry)
22506                );
22507              };
22508              UnmodifiableEntry2.prototype.setValue = function(value) {
22509                throw new java2.lang.UnsupportedOperationException();
22510              };
22511              UnmodifiableEntry2.prototype.toString = function() {
22512                return this.entry.toString();
22513              };
22514              return UnmodifiableEntry2;
22515            })()
22516          );
22517          UnmodifiableEntrySet2.UnmodifiableEntry = UnmodifiableEntry;
22518          UnmodifiableEntry["__class"] = "java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry";
22519          UnmodifiableEntry["__interfaces"] = ["java.util.Map.Entry"];
22520          var UnmodifiableEntrySet$0 = (
22521            /** @class */
22522            (function() {
22523              function UnmodifiableEntrySet$02(__parent, it) {
22524                this.it = it;
22525                this.__parent = __parent;
22526              }
22527              UnmodifiableEntrySet$02.prototype.forEachRemaining = function(consumer) {
22528                var _this = this;
22529                javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
22530                  if (funcInst == null || typeof funcInst == "function") {
22531                    return funcInst;
22532                  }
22533                  return function(arg0) {
22534                    return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
22535                  };
22536                })(consumer));
22537                while (this.hasNext()) {
22538                  {
22539                    (function(target) {
22540                      return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
22541                    })(consumer);
22542                  }
22543                }
22544                ;
22545              };
22546              UnmodifiableEntrySet$02.prototype.hasNext = function() {
22547                return this.it.hasNext();
22548              };
22549              UnmodifiableEntrySet$02.prototype.next = function() {
22550                return new UnmodifiableEntrySet2.UnmodifiableEntry(this.it.next());
22551              };
22552              UnmodifiableEntrySet$02.prototype.remove = function() {
22553                throw new java2.lang.UnsupportedOperationException();
22554              };
22555              return UnmodifiableEntrySet$02;
22556            })()
22557          );
22558          UnmodifiableEntrySet2.UnmodifiableEntrySet$0 = UnmodifiableEntrySet$0;
22559          UnmodifiableEntrySet$0["__interfaces"] = ["java.util.Iterator"];
22560        })(UnmodifiableEntrySet = UnmodifiableMap2.UnmodifiableEntrySet || (UnmodifiableMap2.UnmodifiableEntrySet = {}));
22561      })(UnmodifiableMap = Collections2.UnmodifiableMap || (Collections2.UnmodifiableMap = {}));
22562      var UnmodifiableSortedSet = (
22563        /** @class */
22564        (function(_super) {
22565          __extends(UnmodifiableSortedSet2, _super);
22566          function UnmodifiableSortedSet2(sortedSet) {
22567            var _this = _super.call(this, sortedSet) || this;
22568            if (_this.sortedSet === void 0) {
22569              _this.sortedSet = null;
22570            }
22571            _this.sortedSet = sortedSet;
22572            return _this;
22573          }
22574          UnmodifiableSortedSet2.prototype.comparator = function() {
22575            return (function(funcInst) {
22576              if (funcInst == null || typeof funcInst == "function") {
22577                return funcInst;
22578              }
22579              return function(a, b) {
22580                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
22581              };
22582            })(this.sortedSet.comparator());
22583          };
22584          UnmodifiableSortedSet2.prototype.equals = function(o) {
22585            return (
22586              /* equals */
22587              (function(o1, o2) {
22588                if (o1 && o1.equals) {
22589                  return o1.equals(o2);
22590                } else {
22591                  return o1 === o2;
22592                }
22593              })(this.sortedSet, o)
22594            );
22595          };
22596          UnmodifiableSortedSet2.prototype.first = function() {
22597            return this.sortedSet.first();
22598          };
22599          UnmodifiableSortedSet2.prototype.hashCode = function() {
22600            return (
22601              /* hashCode */
22602              (function(o) {
22603                if (o.hashCode) {
22604                  return o.hashCode();
22605                } else {
22606                  return o.toString().split("").reduce(function(prevHash, currVal) {
22607                    return (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0;
22608                  }, 0);
22609                }
22610              })(this.sortedSet)
22611            );
22612          };
22613          UnmodifiableSortedSet2.prototype.headSet = function(toElement) {
22614            return new Collections2.UnmodifiableSortedSet(this.sortedSet.headSet(toElement));
22615          };
22616          UnmodifiableSortedSet2.prototype.last = function() {
22617            return this.sortedSet.last();
22618          };
22619          UnmodifiableSortedSet2.prototype.subSet = function(fromElement, toElement) {
22620            return new Collections2.UnmodifiableSortedSet(this.sortedSet.subSet(fromElement, toElement));
22621          };
22622          UnmodifiableSortedSet2.prototype.tailSet = function(fromElement) {
22623            return new Collections2.UnmodifiableSortedSet(this.sortedSet.tailSet(fromElement));
22624          };
22625          return UnmodifiableSortedSet2;
22626        })(Collections2.UnmodifiableSet)
22627      );
22628      Collections2.UnmodifiableSortedSet = UnmodifiableSortedSet;
22629      UnmodifiableSortedSet["__class"] = "java.util.Collections.UnmodifiableSortedSet";
22630      UnmodifiableSortedSet["__interfaces"] = ["java.util.SortedSet", "java.util.Collection", "java.util.Set", "java.lang.Iterable"];
22631      var UnmodifiableSortedMap = (
22632        /** @class */
22633        (function(_super) {
22634          __extends(UnmodifiableSortedMap2, _super);
22635          function UnmodifiableSortedMap2(sortedMap) {
22636            var _this = _super.call(this, sortedMap) || this;
22637            if (_this.sortedMap === void 0) {
22638              _this.sortedMap = null;
22639            }
22640            _this.sortedMap = sortedMap;
22641            return _this;
22642          }
22643          UnmodifiableSortedMap2.prototype.comparator = function() {
22644            return (function(funcInst) {
22645              if (funcInst == null || typeof funcInst == "function") {
22646                return funcInst;
22647              }
22648              return function(a, b) {
22649                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
22650              };
22651            })(this.sortedMap.comparator());
22652          };
22653          UnmodifiableSortedMap2.prototype.equals = function(o) {
22654            return (
22655              /* equals */
22656              (function(o1, o2) {
22657                if (o1 && o1.equals) {
22658                  return o1.equals(o2);
22659                } else {
22660                  return o1 === o2;
22661                }
22662              })(this.sortedMap, o)
22663            );
22664          };
22665          UnmodifiableSortedMap2.prototype.firstKey = function() {
22666            return this.sortedMap.firstKey();
22667          };
22668          UnmodifiableSortedMap2.prototype.hashCode = function() {
22669            return (
22670              /* hashCode */
22671              (function(o) {
22672                if (o.hashCode) {
22673                  return o.hashCode();
22674                } else {
22675                  return o.toString().split("").reduce(function(prevHash, currVal) {
22676                    return (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0;
22677                  }, 0);
22678                }
22679              })(this.sortedMap)
22680            );
22681          };
22682          UnmodifiableSortedMap2.prototype.headMap = function(toKey) {
22683            return new Collections2.UnmodifiableSortedMap(this.sortedMap.headMap(toKey));
22684          };
22685          UnmodifiableSortedMap2.prototype.lastKey = function() {
22686            return this.sortedMap.lastKey();
22687          };
22688          UnmodifiableSortedMap2.prototype.subMap = function(fromKey, toKey) {
22689            return new Collections2.UnmodifiableSortedMap(this.sortedMap.subMap(fromKey, toKey));
22690          };
22691          UnmodifiableSortedMap2.prototype.tailMap = function(fromKey) {
22692            return new Collections2.UnmodifiableSortedMap(this.sortedMap.tailMap(fromKey));
22693          };
22694          return UnmodifiableSortedMap2;
22695        })(Collections2.UnmodifiableMap)
22696      );
22697      Collections2.UnmodifiableSortedMap = UnmodifiableSortedMap;
22698      UnmodifiableSortedMap["__class"] = "java.util.Collections.UnmodifiableSortedMap";
22699      UnmodifiableSortedMap["__interfaces"] = ["java.util.Map", "java.util.SortedMap"];
22700      var Collections$0 = (
22701        /** @class */
22702        (function() {
22703          function Collections$02(it) {
22704            this.it = it;
22705          }
22706          Collections$02.prototype.hasMoreElements = function() {
22707            return this.it.hasNext();
22708          };
22709          Collections$02.prototype.nextElement = function() {
22710            return this.it.next();
22711          };
22712          return Collections$02;
22713        })()
22714      );
22715      Collections2.Collections$0 = Collections$0;
22716      Collections$0["__interfaces"] = ["java.util.Enumeration"];
22717    })(Collections = util2.Collections || (util2.Collections = {}));
22718  })(util = java2.util || (java2.util = {}));
22719})(java || (java = {}));
22720(function(java2) {
22721  var util;
22722  (function(util2) {
22723    var LinkedHashSet = (
22724      /** @class */
22725      (function(_super) {
22726        __extends(LinkedHashSet2, _super);
22727        function LinkedHashSet2(ignored, alsoIgnored) {
22728          var _this = this;
22729          if ((typeof ignored === "number" || ignored === null) && (typeof alsoIgnored === "number" || alsoIgnored === null)) {
22730            var __args = arguments;
22731            _this = _super.call(this, new java2.util.LinkedHashMap(ignored, alsoIgnored)) || this;
22732          } else if ((ignored != null && (ignored.constructor != null && ignored.constructor["__interfaces"] != null && ignored.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || ignored === null) && alsoIgnored === void 0) {
22733            var __args = arguments;
22734            var c = __args[0];
22735            _this = _super.call(this, new java2.util.LinkedHashMap()) || this;
22736            _this.addAll(c);
22737          } else if ((typeof ignored === "number" || ignored === null) && alsoIgnored === void 0) {
22738            var __args = arguments;
22739            _this = _super.call(this, new java2.util.LinkedHashMap(ignored)) || this;
22740          } else if (ignored === void 0 && alsoIgnored === void 0) {
22741            var __args = arguments;
22742            _this = _super.call(this, new java2.util.LinkedHashMap()) || this;
22743          } else
22744            throw new Error("invalid overload");
22745          return _this;
22746        }
22747        LinkedHashSet2.prototype.clone = function() {
22748          return new LinkedHashSet2(this);
22749        };
22750        return LinkedHashSet2;
22751      })(java2.util.HashSet)
22752    );
22753    util2.LinkedHashSet = LinkedHashSet;
22754    LinkedHashSet["__class"] = "java.util.LinkedHashSet";
22755    LinkedHashSet["__interfaces"] = ["java.lang.Cloneable", "java.util.Collection", "java.util.Set", "java.lang.Iterable", "java.io.Serializable"];
22756  })(util = java2.util || (java2.util = {}));
22757})(java || (java = {}));
22758(function(java2) {
22759  var util;
22760  (function(util2) {
22761    var Stack = (
22762      /** @class */
22763      (function(_super) {
22764        __extends(Stack2, _super);
22765        function Stack2() {
22766          return _super.call(this) || this;
22767        }
22768        Stack2.prototype.clone = function() {
22769          var s = new Stack2();
22770          s.addAll$java_util_Collection(this);
22771          return s;
22772        };
22773        Stack2.prototype.empty = function() {
22774          return this.isEmpty();
22775        };
22776        Stack2.prototype.peek = function() {
22777          var sz = this.size();
22778          if (sz > 0) {
22779            return this.get(sz - 1);
22780          } else {
22781            throw new java2.util.EmptyStackException();
22782          }
22783        };
22784        Stack2.prototype.pop = function() {
22785          var sz = this.size();
22786          if (sz > 0) {
22787            return this.remove$int(sz - 1);
22788          } else {
22789            throw new java2.util.EmptyStackException();
22790          }
22791        };
22792        Stack2.prototype.push = function(o) {
22793          this.add(o);
22794          return o;
22795        };
22796        Stack2.prototype.search = function(o) {
22797          var pos = this.lastIndexOf$java_lang_Object(o);
22798          if (pos >= 0) {
22799            return this.size() - pos;
22800          }
22801          return -1;
22802        };
22803        return Stack2;
22804      })(java2.util.Vector)
22805    );
22806    util2.Stack = Stack;
22807    Stack["__class"] = "java.util.Stack";
22808    Stack["__interfaces"] = ["java.util.RandomAccess", "java.util.List", "java.lang.Cloneable", "java.util.Collection", "java.lang.Iterable", "java.io.Serializable"];
22809  })(util = java2.util || (java2.util = {}));
22810})(java || (java = {}));
22811(function(java2) {
22812  var util;
22813  (function(util2) {
22814    var LinkedList = (
22815      /** @class */
22816      (function(_super) {
22817        __extends(LinkedList2, _super);
22818        function LinkedList2(c) {
22819          var _this = this;
22820          if (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || c === null) {
22821            var __args = arguments;
22822            _this = _super.call(this) || this;
22823            if (_this.exposeElement === void 0) {
22824              _this.exposeElement = null;
22825            }
22826            if (_this.header === void 0) {
22827              _this.header = null;
22828            }
22829            if (_this.tail === void 0) {
22830              _this.tail = null;
22831            }
22832            if (_this.__size === void 0) {
22833              _this.__size = 0;
22834            }
22835            _this.header = new LinkedList2.Node();
22836            _this.tail = new LinkedList2.Node();
22837            _this.reset();
22838            _this.addAll(c);
22839          } else if (c === void 0) {
22840            var __args = arguments;
22841            _this = _super.call(this) || this;
22842            if (_this.exposeElement === void 0) {
22843              _this.exposeElement = null;
22844            }
22845            if (_this.header === void 0) {
22846              _this.header = null;
22847            }
22848            if (_this.tail === void 0) {
22849              _this.tail = null;
22850            }
22851            if (_this.__size === void 0) {
22852              _this.__size = 0;
22853            }
22854            _this.header = new LinkedList2.Node();
22855            _this.tail = new LinkedList2.Node();
22856            _this.reset();
22857          } else
22858            throw new Error("invalid overload");
22859          return _this;
22860        }
22861        LinkedList2.prototype.stream = function() {
22862          return new javaemul.internal.stream.StreamHelper(this);
22863        };
22864        LinkedList2.prototype.parallelStream = function() {
22865          return this.stream();
22866        };
22867        LinkedList2.prototype.removeIf = function(filter) {
22868          javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
22869            if (funcInst == null || typeof funcInst == "function") {
22870              return funcInst;
22871            }
22872            return function(arg0) {
22873              return (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0);
22874            };
22875          })(filter));
22876          var removed = false;
22877          var _loop_9 = function(it2) {
22878            {
22879              if ((function(target) {
22880                return typeof target === "function" ? target(it2.next()) : target.test(it2.next());
22881              })(filter)) {
22882                it2.remove();
22883                removed = true;
22884              }
22885            }
22886            ;
22887          };
22888          for (var it = this.iterator(); it.hasNext(); ) {
22889            _loop_9(it);
22890          }
22891          return removed;
22892        };
22893        LinkedList2.prototype.forEach = function(action) {
22894          javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
22895            if (funcInst == null || typeof funcInst == "function") {
22896              return funcInst;
22897            }
22898            return function(arg0) {
22899              return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
22900            };
22901          })(action));
22902          var _loop_10 = function(index2) {
22903            var t = index2.next();
22904            {
22905              (function(target) {
22906                return typeof target === "function" ? target(t) : target.accept(t);
22907              })(action);
22908            }
22909          };
22910          for (var index = this.iterator(); index.hasNext(); ) {
22911            _loop_10(index);
22912          }
22913        };
22914        LinkedList2.prototype.sort = function(c) {
22915          var a = this.toArray();
22916          java2.util.Arrays.sort(a, (function(funcInst) {
22917            if (funcInst == null || typeof funcInst == "function") {
22918              return funcInst;
22919            }
22920            return function(a2, b) {
22921              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a2, b);
22922            };
22923          })((function(funcInst) {
22924            if (funcInst == null || typeof funcInst == "function") {
22925              return funcInst;
22926            }
22927            return function(a2, b) {
22928              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a2, b);
22929            };
22930          })(c)));
22931          var i = this.listIterator();
22932          for (var index = 0; index < a.length; index++) {
22933            var e = a[index];
22934            {
22935              i.next();
22936              i.set(e);
22937            }
22938          }
22939        };
22940        LinkedList2.prototype.add = function(index, element) {
22941          if ((typeof index === "number" || index === null) && (element != null || element === null)) {
22942            _super.prototype.add.call(this, index, element);
22943          } else if ((index != null || index === null) && element === void 0) {
22944            return this.add$java_lang_Object(index);
22945          } else
22946            throw new Error("invalid overload");
22947        };
22948        LinkedList2.prototype.add$java_lang_Object = function(o) {
22949          this.addLast(o);
22950          return true;
22951        };
22952        LinkedList2.prototype.addFirst = function(o) {
22953          this.addNode(o, this.header, this.header.next);
22954        };
22955        LinkedList2.prototype.addLast = function(o) {
22956          this.addNode(o, this.tail.prev, this.tail);
22957        };
22958        LinkedList2.prototype.clear = function() {
22959          this.reset();
22960        };
22961        LinkedList2.prototype.reset = function() {
22962          this.header.next = this.tail;
22963          this.tail.prev = this.header;
22964          this.header.prev = this.tail.next = null;
22965          this.__size = 0;
22966        };
22967        LinkedList2.prototype.clone = function() {
22968          return new LinkedList2(this);
22969        };
22970        LinkedList2.prototype.descendingIterator = function() {
22971          return new LinkedList2.DescendingIteratorImpl(this);
22972        };
22973        LinkedList2.prototype.element = function() {
22974          return this.getFirst();
22975        };
22976        LinkedList2.prototype.getFirst = function() {
22977          javaemul.internal.InternalPreconditions.checkElement(this.__size !== 0);
22978          return this.header.next.value;
22979        };
22980        LinkedList2.prototype.getLast = function() {
22981          javaemul.internal.InternalPreconditions.checkElement(this.__size !== 0);
22982          return this.tail.prev.value;
22983        };
22984        LinkedList2.prototype.listIterator$int = function(index) {
22985          javaemul.internal.InternalPreconditions.checkPositionIndex(index, this.__size);
22986          var node;
22987          if (index >= this.__size >> 1) {
22988            node = this.tail;
22989            for (var i = this.__size; i > index; --i) {
22990              {
22991                node = node.prev;
22992              }
22993              ;
22994            }
22995          } else {
22996            node = this.header.next;
22997            for (var i = 0; i < index; ++i) {
22998              {
22999                node = node.next;
23000              }
23001              ;
23002            }
23003          }
23004          return new LinkedList2.ListIteratorImpl2(this, index, node);
23005        };
23006        LinkedList2.prototype.listIterator = function(index) {
23007          if (typeof index === "number" || index === null) {
23008            return this.listIterator$int(index);
23009          } else if (index === void 0) {
23010            return this.listIterator$();
23011          } else
23012            throw new Error("invalid overload");
23013        };
23014        LinkedList2.prototype.offer = function(o) {
23015          return this.offerLast(o);
23016        };
23017        LinkedList2.prototype.offerFirst = function(e) {
23018          this.addFirst(e);
23019          return true;
23020        };
23021        LinkedList2.prototype.offerLast = function(e) {
23022          this.addLast(e);
23023          return true;
23024        };
23025        LinkedList2.prototype.peek = function() {
23026          return this.peekFirst();
23027        };
23028        LinkedList2.prototype.peekFirst = function() {
23029          return this.__size === 0 ? null : this.getFirst();
23030        };
23031        LinkedList2.prototype.peekLast = function() {
23032          return this.__size === 0 ? null : this.getLast();
23033        };
23034        LinkedList2.prototype.poll = function() {
23035          return this.pollFirst();
23036        };
23037        LinkedList2.prototype.pollFirst = function() {
23038          return this.__size === 0 ? null : this.removeFirst();
23039        };
23040        LinkedList2.prototype.pollLast = function() {
23041          return this.__size === 0 ? null : this.removeLast();
23042        };
23043        LinkedList2.prototype.pop = function() {
23044          return this.removeFirst();
23045        };
23046        LinkedList2.prototype.push = function(e) {
23047          this.addFirst(e);
23048        };
23049        LinkedList2.prototype.remove = function(index) {
23050          if (typeof index === "number" || index === null) {
23051            return _super.prototype.remove.call(this, index);
23052          } else if (index != null || index === null) {
23053            return _super.prototype.remove.call(this, index);
23054          } else if (index === void 0) {
23055            return this.remove$();
23056          } else
23057            throw new Error("invalid overload");
23058        };
23059        LinkedList2.prototype.remove$ = function() {
23060          return this.removeFirst();
23061        };
23062        LinkedList2.prototype.removeFirst = function() {
23063          javaemul.internal.InternalPreconditions.checkElement(this.__size !== 0);
23064          return this.removeNode(this.header.next);
23065        };
23066        LinkedList2.prototype.removeFirstOccurrence = function(o) {
23067          return this.remove(o);
23068        };
23069        LinkedList2.prototype.removeLast = function() {
23070          javaemul.internal.InternalPreconditions.checkElement(this.__size !== 0);
23071          return this.removeNode(this.tail.prev);
23072        };
23073        LinkedList2.prototype.removeLastOccurrence = function(o) {
23074          for (var e = this.tail.prev; e !== this.header; e = e.prev) {
23075            {
23076              if (java2.util.Objects.equals(e.value, o)) {
23077                this.removeNode(e);
23078                return true;
23079              }
23080            }
23081            ;
23082          }
23083          return false;
23084        };
23085        LinkedList2.prototype.size = function() {
23086          return this.__size;
23087        };
23088        LinkedList2.prototype.addNode = function(o, prev, next) {
23089          var node = new LinkedList2.Node();
23090          node.value = o;
23091          node.prev = prev;
23092          node.next = next;
23093          next.prev = prev.next = node;
23094          ++this.__size;
23095        };
23096        LinkedList2.prototype.removeNode = function(node) {
23097          var oldValue = node.value;
23098          node.next.prev = node.prev;
23099          node.prev.next = node.next;
23100          node.next = node.prev = null;
23101          node.value = null;
23102          --this.__size;
23103          return oldValue;
23104        };
23105        return LinkedList2;
23106      })(java2.util.AbstractSequentialList)
23107    );
23108    util2.LinkedList = LinkedList;
23109    LinkedList["__class"] = "java.util.LinkedList";
23110    LinkedList["__interfaces"] = ["java.lang.Cloneable", "java.util.List", "java.util.Collection", "java.util.Queue", "java.util.Deque", "java.lang.Iterable", "java.io.Serializable"];
23111    (function(LinkedList2) {
23112      var DescendingIteratorImpl = (
23113        /** @class */
23114        (function() {
23115          function DescendingIteratorImpl2(__parent) {
23116            this.__parent = __parent;
23117            this.itr = new LinkedList2.ListIteratorImpl2(this.__parent, this.__parent.__size, this.__parent.tail);
23118          }
23119          DescendingIteratorImpl2.prototype.forEachRemaining = function(consumer) {
23120            var _this = this;
23121            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
23122              if (funcInst == null || typeof funcInst == "function") {
23123                return funcInst;
23124              }
23125              return function(arg0) {
23126                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
23127              };
23128            })(consumer));
23129            while (this.hasNext()) {
23130              {
23131                (function(target) {
23132                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
23133                })(consumer);
23134              }
23135            }
23136            ;
23137          };
23138          DescendingIteratorImpl2.prototype.hasNext = function() {
23139            return this.itr.hasPrevious();
23140          };
23141          DescendingIteratorImpl2.prototype.next = function() {
23142            return this.itr.previous();
23143          };
23144          DescendingIteratorImpl2.prototype.remove = function() {
23145            this.itr.remove();
23146          };
23147          return DescendingIteratorImpl2;
23148        })()
23149      );
23150      LinkedList2.DescendingIteratorImpl = DescendingIteratorImpl;
23151      DescendingIteratorImpl["__class"] = "java.util.LinkedList.DescendingIteratorImpl";
23152      DescendingIteratorImpl["__interfaces"] = ["java.util.Iterator"];
23153      var ListIteratorImpl2 = (
23154        /** @class */
23155        (function() {
23156          function ListIteratorImpl22(__parent, index, startNode) {
23157            this.__parent = __parent;
23158            if (this.currentIndex === void 0) {
23159              this.currentIndex = 0;
23160            }
23161            if (this.currentNode === void 0) {
23162              this.currentNode = null;
23163            }
23164            this.lastNode = null;
23165            this.currentNode = startNode;
23166            this.currentIndex = index;
23167          }
23168          ListIteratorImpl22.prototype.forEachRemaining = function(consumer) {
23169            var _this = this;
23170            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
23171              if (funcInst == null || typeof funcInst == "function") {
23172                return funcInst;
23173              }
23174              return function(arg0) {
23175                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
23176              };
23177            })(consumer));
23178            while (this.hasNext()) {
23179              {
23180                (function(target) {
23181                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
23182                })(consumer);
23183              }
23184            }
23185            ;
23186          };
23187          ListIteratorImpl22.prototype.add = function(o) {
23188            this.__parent.addNode(o, this.currentNode.prev, this.currentNode);
23189            ++this.currentIndex;
23190            this.lastNode = null;
23191          };
23192          ListIteratorImpl22.prototype.hasNext = function() {
23193            return this.currentNode !== this.__parent.tail;
23194          };
23195          ListIteratorImpl22.prototype.hasPrevious = function() {
23196            return this.currentNode.prev !== this.__parent.header;
23197          };
23198          ListIteratorImpl22.prototype.next = function() {
23199            javaemul.internal.InternalPreconditions.checkElement(this.hasNext());
23200            this.lastNode = this.currentNode;
23201            this.currentNode = this.currentNode.next;
23202            ++this.currentIndex;
23203            return this.lastNode.value;
23204          };
23205          ListIteratorImpl22.prototype.nextIndex = function() {
23206            return this.currentIndex;
23207          };
23208          ListIteratorImpl22.prototype.previous = function() {
23209            javaemul.internal.InternalPreconditions.checkElement(this.hasPrevious());
23210            this.lastNode = this.currentNode = this.currentNode.prev;
23211            --this.currentIndex;
23212            return this.lastNode.value;
23213          };
23214          ListIteratorImpl22.prototype.previousIndex = function() {
23215            return this.currentIndex - 1;
23216          };
23217          ListIteratorImpl22.prototype.remove = function() {
23218            javaemul.internal.InternalPreconditions.checkState(this.lastNode != null);
23219            var nextNode = this.lastNode.next;
23220            this.__parent.removeNode(this.lastNode);
23221            if (this.currentNode === this.lastNode) {
23222              this.currentNode = nextNode;
23223            } else {
23224              --this.currentIndex;
23225            }
23226            this.lastNode = null;
23227          };
23228          ListIteratorImpl22.prototype.set = function(o) {
23229            javaemul.internal.InternalPreconditions.checkState(this.lastNode != null);
23230            this.lastNode.value = o;
23231          };
23232          return ListIteratorImpl22;
23233        })()
23234      );
23235      LinkedList2.ListIteratorImpl2 = ListIteratorImpl2;
23236      ListIteratorImpl2["__class"] = "java.util.LinkedList.ListIteratorImpl2";
23237      ListIteratorImpl2["__interfaces"] = ["java.util.Iterator", "java.util.ListIterator"];
23238      var Node = (
23239        /** @class */
23240        /* @__PURE__ */ (function() {
23241          function Node2() {
23242            if (this.next === void 0) {
23243              this.next = null;
23244            }
23245            if (this.prev === void 0) {
23246              this.prev = null;
23247            }
23248            if (this.value === void 0) {
23249              this.value = null;
23250            }
23251          }
23252          return Node2;
23253        })()
23254      );
23255      LinkedList2.Node = Node;
23256      Node["__class"] = "java.util.LinkedList.Node";
23257    })(LinkedList = util2.LinkedList || (util2.LinkedList = {}));
23258  })(util = java2.util || (java2.util = {}));
23259})(java || (java = {}));
23260(function(java2) {
23261  var util;
23262  (function(util2) {
23263    var InputMismatchException = (
23264      /** @class */
23265      (function(_super) {
23266        __extends(InputMismatchException2, _super);
23267        function InputMismatchException2(message) {
23268          var _this = this;
23269          if (typeof message === "string" || message === null) {
23270            var __args = arguments;
23271            _this = _super.call(this, message) || this;
23272          } else if (message === void 0) {
23273            var __args = arguments;
23274            _this = _super.call(this) || this;
23275          } else
23276            throw new Error("invalid overload");
23277          return _this;
23278        }
23279        return InputMismatchException2;
23280      })(java2.util.NoSuchElementException)
23281    );
23282    util2.InputMismatchException = InputMismatchException;
23283    InputMismatchException["__class"] = "java.util.InputMismatchException";
23284    InputMismatchException["__interfaces"] = ["java.io.Serializable"];
23285  })(util = java2.util || (java2.util = {}));
23286})(java || (java = {}));
23287(function(java2) {
23288  var nio;
23289  (function(nio2) {
23290    var InvalidMarkException = (
23291      /** @class */
23292      (function(_super) {
23293        __extends(InvalidMarkException2, _super);
23294        function InvalidMarkException2() {
23295          var _this = _super.call(this) || this;
23296          Object.setPrototypeOf(_this, InvalidMarkException2.prototype);
23297          return _this;
23298        }
23299        return InvalidMarkException2;
23300      })(java2.lang.IllegalStateException)
23301    );
23302    nio2.InvalidMarkException = InvalidMarkException;
23303    InvalidMarkException["__class"] = "java.nio.InvalidMarkException";
23304    InvalidMarkException["__interfaces"] = ["java.io.Serializable"];
23305  })(nio = java2.nio || (java2.nio = {}));
23306})(java || (java = {}));
23307(function(java2) {
23308  var util;
23309  (function(util2) {
23310    var regex;
23311    (function(regex2) {
23312      var PatternSyntaxException = (
23313        /** @class */
23314        (function(_super) {
23315          __extends(PatternSyntaxException2, _super);
23316          function PatternSyntaxException2(desc, pattern, index) {
23317            var _this = this;
23318            if ((typeof desc === "string" || desc === null) && (typeof pattern === "string" || pattern === null) && (typeof index === "number" || index === null)) {
23319              var __args = arguments;
23320              {
23321                var __args_37 = arguments;
23322                var throwable = PatternSyntaxException2.createSyntaxError(desc, index);
23323                _this = _super.call(this, throwable) || this;
23324                if (_this.pattern === void 0) {
23325                  _this.pattern = null;
23326                }
23327                _this.pattern = pattern;
23328              }
23329            } else if ((desc != null && desc instanceof Error || desc === null) && (typeof pattern === "string" || pattern === null) && index === void 0) {
23330              var __args = arguments;
23331              var throwable = __args[0];
23332              _this = _super.call(this, throwable) || this;
23333              if (_this.pattern === void 0) {
23334                _this.pattern = null;
23335              }
23336              _this.pattern = pattern;
23337            } else
23338              throw new Error("invalid overload");
23339            return _this;
23340          }
23341          PatternSyntaxException2.createSyntaxError = function(desc, index) {
23342            var syntaxError = new SyntaxError(desc);
23343            syntaxError["columnNumber"] = index;
23344            return syntaxError;
23345          };
23346          PatternSyntaxException2.prototype.getIndex = function() {
23347            return null["columnNumber"];
23348          };
23349          PatternSyntaxException2.prototype.getDescription = function() {
23350            return this.message;
23351          };
23352          PatternSyntaxException2.prototype.getPattern = function() {
23353            return this.pattern;
23354          };
23355          PatternSyntaxException2.prototype.getMessage = function() {
23356            return this.getDescription() + " Pattern: " + this.pattern;
23357          };
23358          return PatternSyntaxException2;
23359        })(java2.lang.IllegalArgumentException)
23360      );
23361      regex2.PatternSyntaxException = PatternSyntaxException;
23362      PatternSyntaxException["__class"] = "java.util.regex.PatternSyntaxException";
23363      PatternSyntaxException["__interfaces"] = ["java.io.Serializable"];
23364    })(regex = util2.regex || (util2.regex = {}));
23365  })(util = java2.util || (java2.util = {}));
23366})(java || (java = {}));
23367(function(java2) {
23368  var lang;
23369  (function(lang2) {
23370    var NumberFormatException = (
23371      /** @class */
23372      (function(_super) {
23373        __extends(NumberFormatException2, _super);
23374        function NumberFormatException2(message) {
23375          var _this = this;
23376          if (typeof message === "string" || message === null) {
23377            var __args = arguments;
23378            _this = _super.call(this, message) || this;
23379          } else if (message === void 0) {
23380            var __args = arguments;
23381            _this = _super.call(this) || this;
23382          } else
23383            throw new Error("invalid overload");
23384          return _this;
23385        }
23386        NumberFormatException2.forInputString = function(s) {
23387          return new java2.lang.NumberFormatException('For input string: "' + s + '"');
23388        };
23389        NumberFormatException2.forNullInputString = function() {
23390          return new java2.lang.NumberFormatException("null");
23391        };
23392        NumberFormatException2.forRadix = function(radix) {
23393          return new java2.lang.NumberFormatException("radix " + radix + " out of range");
23394        };
23395        return NumberFormatException2;
23396      })(java2.lang.IllegalArgumentException)
23397    );
23398    lang2.NumberFormatException = NumberFormatException;
23399    NumberFormatException["__class"] = "java.lang.NumberFormatException";
23400    NumberFormatException["__interfaces"] = ["java.io.Serializable"];
23401  })(lang = java2.lang || (java2.lang = {}));
23402})(java || (java = {}));
23403(function(java2) {
23404  var nio;
23405  (function(nio2) {
23406    var charset;
23407    (function(charset2) {
23408      var IllegalCharsetNameException = (
23409        /** @class */
23410        (function(_super) {
23411          __extends(IllegalCharsetNameException2, _super);
23412          function IllegalCharsetNameException2(charsetName) {
23413            var _this = _super.call(
23414              this,
23415              /* valueOf */
23416              String(charsetName).toString()
23417            ) || this;
23418            Object.setPrototypeOf(_this, IllegalCharsetNameException2.prototype);
23419            if (_this.charsetName === void 0) {
23420              _this.charsetName = null;
23421            }
23422            _this.charsetName = charsetName;
23423            return _this;
23424          }
23425          IllegalCharsetNameException2.prototype.getCharsetName = function() {
23426            return this.charsetName;
23427          };
23428          return IllegalCharsetNameException2;
23429        })(java2.lang.IllegalArgumentException)
23430      );
23431      charset2.IllegalCharsetNameException = IllegalCharsetNameException;
23432      IllegalCharsetNameException["__class"] = "java.nio.charset.IllegalCharsetNameException";
23433      IllegalCharsetNameException["__interfaces"] = ["java.io.Serializable"];
23434    })(charset = nio2.charset || (nio2.charset = {}));
23435  })(nio = java2.nio || (java2.nio = {}));
23436})(java || (java = {}));
23437(function(java2) {
23438  var nio;
23439  (function(nio2) {
23440    var charset;
23441    (function(charset2) {
23442      var UnsupportedCharsetException = (
23443        /** @class */
23444        (function(_super) {
23445          __extends(UnsupportedCharsetException2, _super);
23446          function UnsupportedCharsetException2(charsetName) {
23447            var _this = _super.call(
23448              this,
23449              /* valueOf */
23450              String(charsetName).toString()
23451            ) || this;
23452            Object.setPrototypeOf(_this, UnsupportedCharsetException2.prototype);
23453            if (_this.charsetName === void 0) {
23454              _this.charsetName = null;
23455            }
23456            _this.charsetName = charsetName;
23457            return _this;
23458          }
23459          UnsupportedCharsetException2.prototype.getCharsetName = function() {
23460            return this.charsetName;
23461          };
23462          return UnsupportedCharsetException2;
23463        })(java2.lang.IllegalArgumentException)
23464      );
23465      charset2.UnsupportedCharsetException = UnsupportedCharsetException;
23466      UnsupportedCharsetException["__class"] = "java.nio.charset.UnsupportedCharsetException";
23467      UnsupportedCharsetException["__interfaces"] = ["java.io.Serializable"];
23468    })(charset = nio2.charset || (nio2.charset = {}));
23469  })(nio = java2.nio || (java2.nio = {}));
23470})(java || (java = {}));
23471(function(java2) {
23472  var nio;
23473  (function(nio2) {
23474    var ReadOnlyBufferException = (
23475      /** @class */
23476      (function(_super) {
23477        __extends(ReadOnlyBufferException2, _super);
23478        function ReadOnlyBufferException2() {
23479          var _this = _super.call(this) || this;
23480          Object.setPrototypeOf(_this, ReadOnlyBufferException2.prototype);
23481          return _this;
23482        }
23483        return ReadOnlyBufferException2;
23484      })(java2.lang.UnsupportedOperationException)
23485    );
23486    nio2.ReadOnlyBufferException = ReadOnlyBufferException;
23487    ReadOnlyBufferException["__class"] = "java.nio.ReadOnlyBufferException";
23488    ReadOnlyBufferException["__interfaces"] = ["java.io.Serializable"];
23489  })(nio = java2.nio || (java2.nio = {}));
23490})(java || (java = {}));
23491(function(java2) {
23492  var lang;
23493  (function(lang2) {
23494    var StringIndexOutOfBoundsException = (
23495      /** @class */
23496      (function(_super) {
23497        __extends(StringIndexOutOfBoundsException2, _super);
23498        function StringIndexOutOfBoundsException2(message) {
23499          var _this = this;
23500          if (typeof message === "string" || message === null) {
23501            var __args = arguments;
23502            _this = _super.call(this, message) || this;
23503          } else if (typeof message === "number" || message === null) {
23504            var __args = arguments;
23505            var index = __args[0];
23506            _this = _super.call(this, "String index out of range: " + index) || this;
23507          } else if (message === void 0) {
23508            var __args = arguments;
23509            _this = _super.call(this) || this;
23510          } else
23511            throw new Error("invalid overload");
23512          return _this;
23513        }
23514        return StringIndexOutOfBoundsException2;
23515      })(java2.lang.IndexOutOfBoundsException)
23516    );
23517    lang2.StringIndexOutOfBoundsException = StringIndexOutOfBoundsException;
23518    StringIndexOutOfBoundsException["__class"] = "java.lang.StringIndexOutOfBoundsException";
23519    StringIndexOutOfBoundsException["__interfaces"] = ["java.io.Serializable"];
23520  })(lang = java2.lang || (java2.lang = {}));
23521})(java || (java = {}));
23522(function(java2) {
23523  var lang;
23524  (function(lang2) {
23525    var ArrayIndexOutOfBoundsException = (
23526      /** @class */
23527      (function(_super) {
23528        __extends(ArrayIndexOutOfBoundsException2, _super);
23529        function ArrayIndexOutOfBoundsException2(msg) {
23530          var _this = this;
23531          if (typeof msg === "string" || msg === null) {
23532            var __args = arguments;
23533            _this = _super.call(this, msg) || this;
23534          } else if (typeof msg === "number" || msg === null) {
23535            var __args = arguments;
23536            var index = __args[0];
23537            _this = _super.call(this, "Array index " + index + " out of range") || this;
23538          } else if (msg === void 0) {
23539            var __args = arguments;
23540            _this = _super.call(this) || this;
23541          } else
23542            throw new Error("invalid overload");
23543          return _this;
23544        }
23545        return ArrayIndexOutOfBoundsException2;
23546      })(java2.lang.IndexOutOfBoundsException)
23547    );
23548    lang2.ArrayIndexOutOfBoundsException = ArrayIndexOutOfBoundsException;
23549    ArrayIndexOutOfBoundsException["__class"] = "java.lang.ArrayIndexOutOfBoundsException";
23550    ArrayIndexOutOfBoundsException["__interfaces"] = ["java.io.Serializable"];
23551  })(lang = java2.lang || (java2.lang = {}));
23552})(java || (java = {}));
23553(function(java2) {
23554  var util;
23555  (function(util2) {
23556    var IdentityHashMap = (
23557      /** @class */
23558      (function(_super) {
23559        __extends(IdentityHashMap2, _super);
23560        function IdentityHashMap2(toBeCopied) {
23561          var _this = this;
23562          if (toBeCopied != null && (toBeCopied.constructor != null && toBeCopied.constructor["__interfaces"] != null && toBeCopied.constructor["__interfaces"].indexOf("java.util.Map") >= 0) || toBeCopied === null) {
23563            var __args = arguments;
23564            _this = _super.call(this, toBeCopied) || this;
23565            if (_this.exposeKey === void 0) {
23566              _this.exposeKey = null;
23567            }
23568            if (_this.exposeValue === void 0) {
23569              _this.exposeValue = null;
23570            }
23571          } else if (typeof toBeCopied === "number" || toBeCopied === null) {
23572            var __args = arguments;
23573            var ignored = __args[0];
23574            _this = _super.call(this, ignored) || this;
23575            if (_this.exposeKey === void 0) {
23576              _this.exposeKey = null;
23577            }
23578            if (_this.exposeValue === void 0) {
23579              _this.exposeValue = null;
23580            }
23581          } else if (toBeCopied === void 0) {
23582            var __args = arguments;
23583            _this = _super.call(this) || this;
23584            if (_this.exposeKey === void 0) {
23585              _this.exposeKey = null;
23586            }
23587            if (_this.exposeValue === void 0) {
23588              _this.exposeValue = null;
23589            }
23590          } else
23591            throw new Error("invalid overload");
23592          return _this;
23593        }
23594        IdentityHashMap2.prototype.replaceAll = function(__function) {
23595          java2.util.Objects.requireNonNull((function(funcInst) {
23596            if (funcInst == null || typeof funcInst == "function") {
23597              return funcInst;
23598            }
23599            return function(arg0, arg1) {
23600              return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0, arg1);
23601            };
23602          })(__function));
23603          var _loop_11 = function(index2) {
23604            var entry = index2.next();
23605            {
23606              var k_3;
23607              var v_3;
23608              try {
23609                k_3 = entry.getKey();
23610                v_3 = entry.getValue();
23611              } catch (ise) {
23612                throw new java2.lang.RuntimeException(ise);
23613              }
23614              v_3 = (function(target) {
23615                return typeof target === "function" ? target(k_3, v_3) : target.apply(k_3, v_3);
23616              })(__function);
23617              try {
23618                entry.setValue(v_3);
23619              } catch (ise) {
23620                throw new java2.lang.RuntimeException(ise);
23621              }
23622            }
23623          };
23624          for (var index = this.entrySet().iterator(); index.hasNext(); ) {
23625            _loop_11(index);
23626          }
23627        };
23628        IdentityHashMap2.prototype.getOrDefault = function(key, defaultValue) {
23629          var v;
23630          return (v = this.get(key)) != null || this.containsKey(key) ? v : defaultValue;
23631        };
23632        IdentityHashMap2.prototype.merge = function(key, value, map) {
23633          var old = this.get(key);
23634          var next = old == null ? value : (function(target) {
23635            return typeof target === "function" ? target(old, value) : target.apply(old, value);
23636          })(map);
23637          if (next == null) {
23638            this.remove(key);
23639          } else {
23640            this.put(key, next);
23641          }
23642          return next;
23643        };
23644        IdentityHashMap2.prototype.computeIfAbsent = function(key, mappingFunction) {
23645          var result;
23646          if ((result = this.get(key)) == null) {
23647            result = (function(target) {
23648              return typeof target === "function" ? target(key) : target.apply(key);
23649            })(mappingFunction);
23650            if (result != null)
23651              this.put(key, result);
23652          }
23653          return result;
23654        };
23655        IdentityHashMap2.prototype.putIfAbsent = function(key, value) {
23656          var v = this.get(key);
23657          if (v == null) {
23658            v = this.put(key, value);
23659          }
23660          return v;
23661        };
23662        IdentityHashMap2.prototype.clone = function() {
23663          return new IdentityHashMap2(this);
23664        };
23665        IdentityHashMap2.prototype.equals = function(obj) {
23666          if (obj === this) {
23667            return true;
23668          }
23669          if (!(obj != null && (obj.constructor != null && obj.constructor["__interfaces"] != null && obj.constructor["__interfaces"].indexOf("java.util.Map") >= 0))) {
23670            return false;
23671          }
23672          var otherMap = obj;
23673          if (this.size() !== otherMap.size()) {
23674            return false;
23675          }
23676          for (var index = otherMap.entrySet().iterator(); index.hasNext(); ) {
23677            var entry = index.next();
23678            {
23679              var otherKey = entry.getKey();
23680              var otherValue = entry.getValue();
23681              if (!this.containsKey(otherKey)) {
23682                return false;
23683              }
23684              if (otherValue !== this.get(otherKey)) {
23685                return false;
23686              }
23687            }
23688          }
23689          return true;
23690        };
23691        IdentityHashMap2.prototype.hashCode = function() {
23692          var hashCode = 0;
23693          for (var index = this.entrySet().iterator(); index.hasNext(); ) {
23694            var entry = index.next();
23695            {
23696              hashCode += java2.lang.System.identityHashCode(entry.getKey());
23697              hashCode += java2.lang.System.identityHashCode(entry.getValue());
23698            }
23699          }
23700          return hashCode;
23701        };
23702        IdentityHashMap2.prototype._equals = function(value1, value2) {
23703          return value1 === value2;
23704        };
23705        IdentityHashMap2.prototype.getHashCode = function(key) {
23706          return javaemul.internal.HashCodes.getObjectIdentityHashCode(key);
23707        };
23708        return IdentityHashMap2;
23709      })(java2.util.AbstractHashMap)
23710    );
23711    util2.IdentityHashMap = IdentityHashMap;
23712    IdentityHashMap["__class"] = "java.util.IdentityHashMap";
23713    IdentityHashMap["__interfaces"] = ["java.lang.Cloneable", "java.util.Map", "java.io.Serializable"];
23714  })(util = java2.util || (java2.util = {}));
23715})(java || (java = {}));
23716(function(java2) {
23717  var util;
23718  (function(util2) {
23719    var HashMap = (
23720      /** @class */
23721      (function(_super) {
23722        __extends(HashMap2, _super);
23723        function HashMap2(ignored, alsoIgnored) {
23724          var _this = this;
23725          if ((typeof ignored === "number" || ignored === null) && (typeof alsoIgnored === "number" || alsoIgnored === null)) {
23726            var __args = arguments;
23727            _this = _super.call(this, ignored, alsoIgnored) || this;
23728            if (_this.exposeKey === void 0) {
23729              _this.exposeKey = null;
23730            }
23731            if (_this.exposeValue === void 0) {
23732              _this.exposeValue = null;
23733            }
23734          } else if ((ignored != null && (ignored.constructor != null && ignored.constructor["__interfaces"] != null && ignored.constructor["__interfaces"].indexOf("java.util.Map") >= 0) || ignored === null) && alsoIgnored === void 0) {
23735            var __args = arguments;
23736            var toBeCopied = __args[0];
23737            _this = _super.call(this, toBeCopied) || this;
23738            if (_this.exposeKey === void 0) {
23739              _this.exposeKey = null;
23740            }
23741            if (_this.exposeValue === void 0) {
23742              _this.exposeValue = null;
23743            }
23744          } else if ((typeof ignored === "number" || ignored === null) && alsoIgnored === void 0) {
23745            var __args = arguments;
23746            _this = _super.call(this, ignored) || this;
23747            if (_this.exposeKey === void 0) {
23748              _this.exposeKey = null;
23749            }
23750            if (_this.exposeValue === void 0) {
23751              _this.exposeValue = null;
23752            }
23753          } else if (ignored === void 0 && alsoIgnored === void 0) {
23754            var __args = arguments;
23755            _this = _super.call(this) || this;
23756            if (_this.exposeKey === void 0) {
23757              _this.exposeKey = null;
23758            }
23759            if (_this.exposeValue === void 0) {
23760              _this.exposeValue = null;
23761            }
23762          } else
23763            throw new Error("invalid overload");
23764          return _this;
23765        }
23766        HashMap2.prototype.clone = function() {
23767          return new HashMap2(this);
23768        };
23769        HashMap2.prototype._equals = function(value1, value2) {
23770          return java2.util.Objects.equals(value1, value2);
23771        };
23772        HashMap2.prototype.getHashCode = function(key) {
23773          var hashCode = (function(o) {
23774            if (o.hashCode) {
23775              return o.hashCode();
23776            } else {
23777              return o.toString().split("").reduce(function(prevHash, currVal) {
23778                return (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0;
23779              }, 0);
23780            }
23781          })(key);
23782          return javaemul.internal.Coercions.ensureInt(hashCode);
23783        };
23784        return HashMap2;
23785      })(java2.util.AbstractHashMap)
23786    );
23787    util2.HashMap = HashMap;
23788    HashMap["__class"] = "java.util.HashMap";
23789    HashMap["__interfaces"] = ["java.lang.Cloneable", "java.util.Map", "java.io.Serializable"];
23790  })(util = java2.util || (java2.util = {}));
23791})(java || (java = {}));
23792(function(java2) {
23793  var util;
23794  (function(util2) {
23795    var TreeMap = (
23796      /** @class */
23797      (function(_super) {
23798        __extends(TreeMap2, _super);
23799        function TreeMap2(c) {
23800          var _this = this;
23801          if (typeof c === "function" && c.length === 2 || c === null) {
23802            var __args = arguments;
23803            _this = _super.call(this) || this;
23804            if (_this.cmp === void 0) {
23805              _this.cmp = null;
23806            }
23807            if (_this.exposeKeyType === void 0) {
23808              _this.exposeKeyType = null;
23809            }
23810            if (_this.exposeValueType === void 0) {
23811              _this.exposeValueType = null;
23812            }
23813            if (_this.root === void 0) {
23814              _this.root = null;
23815            }
23816            if (_this.__size === void 0) {
23817              _this.__size = 0;
23818            }
23819            _this.root = null;
23820            if (c == null) {
23821              c = (function(funcInst) {
23822                if (funcInst == null || typeof funcInst == "function") {
23823                  return funcInst;
23824                }
23825                return function(a, b) {
23826                  return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
23827                };
23828              })(java2.util.Comparators.natural());
23829            }
23830            _this.cmp = (function(funcInst) {
23831              if (funcInst == null || typeof funcInst == "function") {
23832                return funcInst;
23833              }
23834              return function(a, b) {
23835                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
23836              };
23837            })(c);
23838          } else if (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.SortedMap") >= 0) || c === null) {
23839            var __args = arguments;
23840            var map_1 = __args[0];
23841            {
23842              var __args_38 = arguments;
23843              var c_5 = javaemul.internal.InternalPreconditions.checkNotNull(map_1).comparator();
23844              _this = _super.call(this) || this;
23845              if (_this.cmp === void 0) {
23846                _this.cmp = null;
23847              }
23848              if (_this.exposeKeyType === void 0) {
23849                _this.exposeKeyType = null;
23850              }
23851              if (_this.exposeValueType === void 0) {
23852                _this.exposeValueType = null;
23853              }
23854              if (_this.root === void 0) {
23855                _this.root = null;
23856              }
23857              if (_this.__size === void 0) {
23858                _this.__size = 0;
23859              }
23860              _this.root = null;
23861              if (c_5 == null) {
23862                c_5 = (function(funcInst) {
23863                  if (funcInst == null || typeof funcInst == "function") {
23864                    return funcInst;
23865                  }
23866                  return function(a, b) {
23867                    return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
23868                  };
23869                })(java2.util.Comparators.natural());
23870              }
23871              _this.cmp = (function(funcInst) {
23872                if (funcInst == null || typeof funcInst == "function") {
23873                  return funcInst;
23874                }
23875                return function(a, b) {
23876                  return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
23877                };
23878              })(c_5);
23879            }
23880            (function() {
23881              _this.putAll(map_1);
23882            })();
23883          } else if (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("java.util.Map") >= 0) || c === null) {
23884            var __args = arguments;
23885            var map_2 = __args[0];
23886            {
23887              var __args_39 = arguments;
23888              {
23889                var __args_40 = arguments;
23890                var c_6 = (function(funcInst) {
23891                  if (funcInst == null || typeof funcInst == "function") {
23892                    return funcInst;
23893                  }
23894                  return function(a, b) {
23895                    return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
23896                  };
23897                })(null);
23898                _this = _super.call(this) || this;
23899                if (_this.cmp === void 0) {
23900                  _this.cmp = null;
23901                }
23902                if (_this.exposeKeyType === void 0) {
23903                  _this.exposeKeyType = null;
23904                }
23905                if (_this.exposeValueType === void 0) {
23906                  _this.exposeValueType = null;
23907                }
23908                if (_this.root === void 0) {
23909                  _this.root = null;
23910                }
23911                if (_this.__size === void 0) {
23912                  _this.__size = 0;
23913                }
23914                _this.root = null;
23915                if (c_6 == null) {
23916                  c_6 = (function(funcInst) {
23917                    if (funcInst == null || typeof funcInst == "function") {
23918                      return funcInst;
23919                    }
23920                    return function(a, b) {
23921                      return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
23922                    };
23923                  })(java2.util.Comparators.natural());
23924                }
23925                _this.cmp = (function(funcInst) {
23926                  if (funcInst == null || typeof funcInst == "function") {
23927                    return funcInst;
23928                  }
23929                  return function(a, b) {
23930                    return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
23931                  };
23932                })(c_6);
23933              }
23934            }
23935            (function() {
23936              _this.putAll(map_2);
23937            })();
23938          } else if (c === void 0) {
23939            var __args = arguments;
23940            {
23941              var __args_41 = arguments;
23942              var c_7 = (function(funcInst) {
23943                if (funcInst == null || typeof funcInst == "function") {
23944                  return funcInst;
23945                }
23946                return function(a, b) {
23947                  return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
23948                };
23949              })(null);
23950              _this = _super.call(this) || this;
23951              if (_this.cmp === void 0) {
23952                _this.cmp = null;
23953              }
23954              if (_this.exposeKeyType === void 0) {
23955                _this.exposeKeyType = null;
23956              }
23957              if (_this.exposeValueType === void 0) {
23958                _this.exposeValueType = null;
23959              }
23960              if (_this.root === void 0) {
23961                _this.root = null;
23962              }
23963              if (_this.__size === void 0) {
23964                _this.__size = 0;
23965              }
23966              _this.root = null;
23967              if (c_7 == null) {
23968                c_7 = (function(funcInst) {
23969                  if (funcInst == null || typeof funcInst == "function") {
23970                    return funcInst;
23971                  }
23972                  return function(a, b) {
23973                    return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
23974                  };
23975                })(java2.util.Comparators.natural());
23976              }
23977              _this.cmp = (function(funcInst) {
23978                if (funcInst == null || typeof funcInst == "function") {
23979                  return funcInst;
23980                }
23981                return function(a, b) {
23982                  return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
23983                };
23984              })(c_7);
23985            }
23986          } else
23987            throw new Error("invalid overload");
23988          return _this;
23989        }
23990        TreeMap2.SubMapType_All_$LI$ = function() {
23991          if (TreeMap2.SubMapType_All == null) {
23992            TreeMap2.SubMapType_All = new TreeMap2.SubMapType();
23993          }
23994          return TreeMap2.SubMapType_All;
23995        };
23996        TreeMap2.SubMapType_Head_$LI$ = function() {
23997          if (TreeMap2.SubMapType_Head == null) {
23998            TreeMap2.SubMapType_Head = new TreeMap2.SubMapTypeHead();
23999          }
24000          return TreeMap2.SubMapType_Head;
24001        };
24002        TreeMap2.SubMapType_Range_$LI$ = function() {
24003          if (TreeMap2.SubMapType_Range == null) {
24004            TreeMap2.SubMapType_Range = new TreeMap2.SubMapTypeRange();
24005          }
24006          return TreeMap2.SubMapType_Range;
24007        };
24008        TreeMap2.SubMapType_Tail_$LI$ = function() {
24009          if (TreeMap2.SubMapType_Tail == null) {
24010            TreeMap2.SubMapType_Tail = new TreeMap2.SubMapTypeTail();
24011          }
24012          return TreeMap2.SubMapType_Tail;
24013        };
24014        TreeMap2.otherChild = function(child) {
24015          return 1 - child;
24016        };
24017        TreeMap2.prototype.clear = function() {
24018          this.root = null;
24019          this.__size = 0;
24020        };
24021        TreeMap2.prototype.comparator = function() {
24022          if (this.cmp === java2.util.Comparators.natural()) {
24023            return (function(funcInst) {
24024              if (funcInst == null || typeof funcInst == "function") {
24025                return funcInst;
24026              }
24027              return function(a, b) {
24028                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
24029              };
24030            })(null);
24031          }
24032          return (function(funcInst) {
24033            if (funcInst == null || typeof funcInst == "function") {
24034              return funcInst;
24035            }
24036            return function(a, b) {
24037              return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
24038            };
24039          })(this.cmp);
24040        };
24041        TreeMap2.prototype.entrySet = function() {
24042          return new TreeMap2.__java_util_TreeMap_EntrySet(this);
24043        };
24044        TreeMap2.prototype.headMap$java_lang_Object$boolean = function(toKey, inclusive) {
24045          return new TreeMap2.SubMap(this, TreeMap2.SubMapType_Head_$LI$(), null, false, toKey, inclusive);
24046        };
24047        TreeMap2.prototype.headMap = function(toKey, inclusive) {
24048          if ((toKey != null || toKey === null) && (typeof inclusive === "boolean" || inclusive === null)) {
24049            return this.headMap$java_lang_Object$boolean(toKey, inclusive);
24050          } else if ((toKey != null || toKey === null) && inclusive === void 0) {
24051            return this.headMap$java_lang_Object(toKey);
24052          } else
24053            throw new Error("invalid overload");
24054        };
24055        TreeMap2.prototype.put = function(key, value) {
24056          var node = new TreeMap2.Node(key, value);
24057          var state = new TreeMap2.State();
24058          this.root = this.insert(this.root, node, state);
24059          if (!state.found) {
24060            ++this.__size;
24061          }
24062          this.root.isRed = false;
24063          return state.value;
24064        };
24065        TreeMap2.prototype.remove = function(k) {
24066          var key = k;
24067          var state = new TreeMap2.State();
24068          this.removeWithState(key, state);
24069          return state.value;
24070        };
24071        TreeMap2.prototype.size = function() {
24072          return this.__size;
24073        };
24074        TreeMap2.prototype.subMap$java_lang_Object$boolean$java_lang_Object$boolean = function(fromKey, fromInclusive, toKey, toInclusive) {
24075          return new TreeMap2.SubMap(this, TreeMap2.SubMapType_Range_$LI$(), fromKey, fromInclusive, toKey, toInclusive);
24076        };
24077        TreeMap2.prototype.subMap = function(fromKey, fromInclusive, toKey, toInclusive) {
24078          if ((fromKey != null || fromKey === null) && (typeof fromInclusive === "boolean" || fromInclusive === null) && (toKey != null || toKey === null) && (typeof toInclusive === "boolean" || toInclusive === null)) {
24079            return this.subMap$java_lang_Object$boolean$java_lang_Object$boolean(fromKey, fromInclusive, toKey, toInclusive);
24080          } else if ((fromKey != null || fromKey === null) && (fromInclusive != null || fromInclusive === null) && toKey === void 0 && toInclusive === void 0) {
24081            return this.subMap$java_lang_Object$java_lang_Object(fromKey, fromInclusive);
24082          } else
24083            throw new Error("invalid overload");
24084        };
24085        TreeMap2.prototype.tailMap$java_lang_Object$boolean = function(fromKey, inclusive) {
24086          return new TreeMap2.SubMap(this, TreeMap2.SubMapType_Tail_$LI$(), fromKey, inclusive, null, false);
24087        };
24088        TreeMap2.prototype.tailMap = function(fromKey, inclusive) {
24089          if ((fromKey != null || fromKey === null) && (typeof inclusive === "boolean" || inclusive === null)) {
24090            return this.tailMap$java_lang_Object$boolean(fromKey, inclusive);
24091          } else if ((fromKey != null || fromKey === null) && inclusive === void 0) {
24092            return this.tailMap$java_lang_Object(fromKey);
24093          } else
24094            throw new Error("invalid overload");
24095        };
24096        TreeMap2.prototype.getNodeAfter = function(key, inclusive) {
24097          var foundNode = null;
24098          var node = this.root;
24099          while (node != null) {
24100            {
24101              var c = this.cmp(key, node.getKey());
24102              if (inclusive && c === 0) {
24103                return node;
24104              }
24105              if (c >= 0) {
24106                node = node.child[TreeMap2.RIGHT];
24107              } else {
24108                foundNode = node;
24109                node = node.child[TreeMap2.LEFT];
24110              }
24111            }
24112          }
24113          ;
24114          return foundNode;
24115        };
24116        TreeMap2.prototype.getNodeBefore = function(key, inclusive) {
24117          var foundNode = null;
24118          var node = this.root;
24119          while (node != null) {
24120            {
24121              var c = this.cmp(key, node.getKey());
24122              if (inclusive && c === 0) {
24123                return node;
24124              }
24125              if (c <= 0) {
24126                node = node.child[TreeMap2.LEFT];
24127              } else {
24128                foundNode = node;
24129                node = node.child[TreeMap2.RIGHT];
24130              }
24131            }
24132          }
24133          ;
24134          return foundNode;
24135        };
24136        TreeMap2.prototype.assertCorrectness$ = function() {
24137          this.assertCorrectness$java_util_TreeMap_Node$boolean(this.root, true);
24138        };
24139        TreeMap2.prototype.descendingEntryIterator = function() {
24140          return new TreeMap2.DescendingEntryIterator(this);
24141        };
24142        TreeMap2.prototype.entryIterator = function() {
24143          return new TreeMap2.EntryIterator(this);
24144        };
24145        TreeMap2.prototype.assertCorrectness$java_util_TreeMap_Node$boolean = function(tree, isRed) {
24146          if (tree == null) {
24147            return 0;
24148          }
24149          if (isRed && tree.isRed) {
24150            throw new java2.lang.RuntimeException("Two red nodes adjacent");
24151          }
24152          var leftNode = tree.child[TreeMap2.LEFT];
24153          if (leftNode != null && this.cmp(leftNode.getKey(), tree.getKey()) > 0) {
24154            throw new java2.lang.RuntimeException("Left child " + leftNode + " larger than " + tree);
24155          }
24156          var rightNode = tree.child[TreeMap2.RIGHT];
24157          if (rightNode != null && this.cmp(rightNode.getKey(), tree.getKey()) < 0) {
24158            throw new java2.lang.RuntimeException("Right child " + rightNode + " smaller than " + tree);
24159          }
24160          var leftHeight = this.assertCorrectness$java_util_TreeMap_Node$boolean(leftNode, tree.isRed);
24161          var rightHeight = this.assertCorrectness$java_util_TreeMap_Node$boolean(rightNode, tree.isRed);
24162          if (leftHeight !== 0 && rightHeight !== 0 && leftHeight !== rightHeight) {
24163            throw new java2.lang.RuntimeException("Black heights don't match");
24164          }
24165          return tree.isRed ? leftHeight : leftHeight + 1;
24166        };
24167        TreeMap2.prototype.assertCorrectness = function(tree, isRed) {
24168          if ((tree != null && tree instanceof java2.util.TreeMap.Node || tree === null) && (typeof isRed === "boolean" || isRed === null)) {
24169            return this.assertCorrectness$java_util_TreeMap_Node$boolean(tree, isRed);
24170          } else if (tree === void 0 && isRed === void 0) {
24171            return this.assertCorrectness$();
24172          } else
24173            throw new Error("invalid overload");
24174        };
24175        TreeMap2.prototype.getEntry = function(key) {
24176          var tree = this.root;
24177          while (tree != null) {
24178            {
24179              var c = this.cmp(key, tree.getKey());
24180              if (c === 0) {
24181                return tree;
24182              }
24183              var childNum = c < 0 ? TreeMap2.LEFT : TreeMap2.RIGHT;
24184              tree = tree.child[childNum];
24185            }
24186          }
24187          ;
24188          return null;
24189        };
24190        TreeMap2.prototype.getFirstEntry = function() {
24191          if (this.root == null) {
24192            return null;
24193          }
24194          var node = this.root;
24195          var nextNode;
24196          while ((nextNode = node.child[TreeMap2.LEFT]) != null) {
24197            {
24198              node = nextNode;
24199            }
24200          }
24201          ;
24202          return node;
24203        };
24204        TreeMap2.prototype.getLastEntry = function() {
24205          if (this.root == null) {
24206            return null;
24207          }
24208          var node = this.root;
24209          var nextNode;
24210          while ((nextNode = node.child[TreeMap2.RIGHT]) != null) {
24211            {
24212              node = nextNode;
24213            }
24214          }
24215          ;
24216          return node;
24217        };
24218        TreeMap2.prototype.getCeilingEntry = function(key) {
24219          return this.getNodeAfter(key, true);
24220        };
24221        TreeMap2.prototype.getFloorEntry = function(key) {
24222          return this.getNodeBefore(key, true);
24223        };
24224        TreeMap2.prototype.getHigherEntry = function(key) {
24225          return this.getNodeAfter(key, false);
24226        };
24227        TreeMap2.prototype.getLowerEntry = function(key) {
24228          return this.getNodeBefore(key, false);
24229        };
24230        TreeMap2.prototype.removeEntry = function(entry) {
24231          var state = new TreeMap2.State();
24232          state.matchValue = true;
24233          state.value = entry.getValue();
24234          return this.removeWithState(entry.getKey(), state);
24235        };
24236        TreeMap2.prototype.inOrderAdd = function(list, type, current, fromKey, fromInclusive, toKey, toInclusive) {
24237          if (current == null) {
24238            return;
24239          }
24240          var leftNode = current.child[TreeMap2.LEFT];
24241          if (leftNode != null) {
24242            this.inOrderAdd(list, type, leftNode, fromKey, fromInclusive, toKey, toInclusive);
24243          }
24244          if (this.inRange(type, current.getKey(), fromKey, fromInclusive, toKey, toInclusive)) {
24245            list.add(current);
24246          }
24247          var rightNode = current.child[TreeMap2.RIGHT];
24248          if (rightNode != null) {
24249            this.inOrderAdd(list, type, rightNode, fromKey, fromInclusive, toKey, toInclusive);
24250          }
24251        };
24252        TreeMap2.prototype.inRange = function(type, key, fromKey, fromInclusive, toKey, toInclusive) {
24253          if (type.fromKeyValid() && this.smaller(key, fromKey, !fromInclusive)) {
24254            return false;
24255          }
24256          if (type.toKeyValid() && this.larger(key, toKey, !toInclusive)) {
24257            return false;
24258          }
24259          return true;
24260        };
24261        TreeMap2.prototype.insert = function(tree, newNode, state) {
24262          if (tree == null) {
24263            return newNode;
24264          } else {
24265            var c = this.cmp(newNode.getKey(), tree.getKey());
24266            if (c === 0) {
24267              state.value = tree.setValue(newNode.getValue());
24268              state.found = true;
24269              return tree;
24270            }
24271            var childNum = c < 0 ? TreeMap2.LEFT : TreeMap2.RIGHT;
24272            tree.child[childNum] = this.insert(tree.child[childNum], newNode, state);
24273            if (this.isRed(tree.child[childNum])) {
24274              if (this.isRed(tree.child[TreeMap2.otherChild(childNum)])) {
24275                tree.isRed = true;
24276                tree.child[TreeMap2.LEFT].isRed = false;
24277                tree.child[TreeMap2.RIGHT].isRed = false;
24278              } else {
24279                if (this.isRed(tree.child[childNum].child[childNum])) {
24280                  tree = this.rotateSingle(tree, TreeMap2.otherChild(childNum));
24281                } else if (this.isRed(tree.child[childNum].child[TreeMap2.otherChild(childNum)])) {
24282                  tree = this.rotateDouble(tree, TreeMap2.otherChild(childNum));
24283                }
24284              }
24285            }
24286          }
24287          return tree;
24288        };
24289        TreeMap2.prototype.isRed = function(node) {
24290          return node != null && node.isRed;
24291        };
24292        TreeMap2.prototype.larger = function(a, b, orEqual) {
24293          var compare = this.cmp(a, b);
24294          return compare > 0 || orEqual && compare === 0;
24295        };
24296        TreeMap2.prototype.smaller = function(a, b, orEqual) {
24297          var compare = this.cmp(a, b);
24298          return compare < 0 || orEqual && compare === 0;
24299        };
24300        TreeMap2.prototype.removeWithState = function(key, state) {
24301          if (this.root == null) {
24302            return false;
24303          }
24304          var found = null;
24305          var parent = null;
24306          var head = new TreeMap2.Node(null, null);
24307          var dir = TreeMap2.RIGHT;
24308          head.child[TreeMap2.RIGHT] = this.root;
24309          var node = head;
24310          while (node.child[dir] != null) {
24311            {
24312              var last = dir;
24313              var grandparent = parent;
24314              parent = node;
24315              node = node.child[dir];
24316              var c = this.cmp(key, node.getKey());
24317              dir = c < 0 ? TreeMap2.LEFT : TreeMap2.RIGHT;
24318              if (c === 0 && (!state.matchValue || java2.util.Objects.equals(node.getValue(), state.value))) {
24319                found = node;
24320              }
24321              if (!this.isRed(node) && !this.isRed(node.child[dir])) {
24322                if (this.isRed(node.child[TreeMap2.otherChild(dir)])) {
24323                  parent = parent.child[last] = this.rotateSingle(node, dir);
24324                } else if (!this.isRed(node.child[TreeMap2.otherChild(dir)])) {
24325                  var sibling = parent.child[TreeMap2.otherChild(last)];
24326                  if (sibling != null) {
24327                    if (!this.isRed(sibling.child[TreeMap2.otherChild(last)]) && !this.isRed(sibling.child[last])) {
24328                      parent.isRed = false;
24329                      sibling.isRed = true;
24330                      node.isRed = true;
24331                    } else {
24332                      var dir2 = grandparent.child[TreeMap2.RIGHT] === parent ? TreeMap2.RIGHT : TreeMap2.LEFT;
24333                      if (this.isRed(sibling.child[last])) {
24334                        grandparent.child[dir2] = this.rotateDouble(parent, last);
24335                      } else if (this.isRed(sibling.child[TreeMap2.otherChild(last)])) {
24336                        grandparent.child[dir2] = this.rotateSingle(parent, last);
24337                      }
24338                      node.isRed = grandparent.child[dir2].isRed = true;
24339                      grandparent.child[dir2].child[TreeMap2.LEFT].isRed = false;
24340                      grandparent.child[dir2].child[TreeMap2.RIGHT].isRed = false;
24341                    }
24342                  }
24343                }
24344              }
24345            }
24346          }
24347          ;
24348          if (found != null) {
24349            state.found = true;
24350            state.value = found.getValue();
24351            if (node !== found) {
24352              var newNode = new TreeMap2.Node(node.getKey(), node.getValue());
24353              this.replaceNode(head, found, newNode);
24354              if (parent === found) {
24355                parent = newNode;
24356              }
24357            }
24358            parent.child[parent.child[TreeMap2.RIGHT] === node ? TreeMap2.RIGHT : TreeMap2.LEFT] = node.child[node.child[TreeMap2.LEFT] == null ? TreeMap2.RIGHT : TreeMap2.LEFT];
24359            this.__size--;
24360          }
24361          this.root = head.child[TreeMap2.RIGHT];
24362          if (this.root != null) {
24363            this.root.isRed = false;
24364          }
24365          return state.found;
24366        };
24367        TreeMap2.prototype.replaceNode = function(head, node, newNode) {
24368          var parent = head;
24369          var direction = parent.getKey() == null || this.cmp(node.getKey(), parent.getKey()) > 0 ? TreeMap2.RIGHT : TreeMap2.LEFT;
24370          while (parent.child[direction] !== node) {
24371            {
24372              parent = parent.child[direction];
24373              direction = this.cmp(node.getKey(), parent.getKey()) > 0 ? TreeMap2.RIGHT : TreeMap2.LEFT;
24374            }
24375          }
24376          ;
24377          parent.child[direction] = newNode;
24378          newNode.isRed = node.isRed;
24379          newNode.child[TreeMap2.LEFT] = node.child[TreeMap2.LEFT];
24380          newNode.child[TreeMap2.RIGHT] = node.child[TreeMap2.RIGHT];
24381          node.child[TreeMap2.LEFT] = null;
24382          node.child[TreeMap2.RIGHT] = null;
24383        };
24384        TreeMap2.prototype.rotateDouble = function(tree, rotateDirection) {
24385          var otherChildDir = TreeMap2.otherChild(rotateDirection);
24386          tree.child[otherChildDir] = this.rotateSingle(tree.child[otherChildDir], otherChildDir);
24387          return this.rotateSingle(tree, rotateDirection);
24388        };
24389        TreeMap2.prototype.rotateSingle = function(tree, rotateDirection) {
24390          var otherChildDir = TreeMap2.otherChild(rotateDirection);
24391          var save = tree.child[otherChildDir];
24392          tree.child[otherChildDir] = save.child[rotateDirection];
24393          save.child[rotateDirection] = tree;
24394          tree.isRed = true;
24395          save.isRed = false;
24396          return save;
24397        };
24398        TreeMap2.LEFT = 0;
24399        TreeMap2.RIGHT = 1;
24400        return TreeMap2;
24401      })(java2.util.AbstractNavigableMap)
24402    );
24403    util2.TreeMap = TreeMap;
24404    TreeMap["__class"] = "java.util.TreeMap";
24405    TreeMap["__interfaces"] = ["java.util.Map", "java.util.NavigableMap", "java.util.SortedMap", "java.io.Serializable"];
24406    (function(TreeMap2) {
24407      var DescendingEntryIterator = (
24408        /** @class */
24409        (function() {
24410          function DescendingEntryIterator2(__parent, type, fromKey, fromInclusive, toKey, toInclusive) {
24411            if ((type != null && type instanceof java2.util.TreeMap.SubMapType || type === null) && (fromKey != null || fromKey === null) && (typeof fromInclusive === "boolean" || fromInclusive === null) && (toKey != null || toKey === null) && (typeof toInclusive === "boolean" || toInclusive === null)) {
24412              var __args = Array.prototype.slice.call(arguments, [1]);
24413              if (this.iter === void 0) {
24414                this.iter = null;
24415              }
24416              if (this.last === void 0) {
24417                this.last = null;
24418              }
24419              var list = new java2.util.ArrayList();
24420              __parent.inOrderAdd(list, type, __parent.root, fromKey, fromInclusive, toKey, toInclusive);
24421              this.iter = list["listIterator$int"](list.size());
24422            } else if (type === void 0 && fromKey === void 0 && fromInclusive === void 0 && toKey === void 0 && toInclusive === void 0) {
24423              var __args = Array.prototype.slice.call(arguments, [1]);
24424              {
24425                var __args_42 = Array.prototype.slice.call(arguments, [1]);
24426                var type_1 = java2.util.TreeMap.SubMapType_All_$LI$();
24427                var fromKey_1 = null;
24428                var fromInclusive_1 = false;
24429                var toKey_1 = null;
24430                var toInclusive_1 = false;
24431                if (this.iter === void 0) {
24432                  this.iter = null;
24433                }
24434                if (this.last === void 0) {
24435                  this.last = null;
24436                }
24437                var list = new java2.util.ArrayList();
24438                __parent.inOrderAdd(list, type_1, __parent.root, fromKey_1, fromInclusive_1, toKey_1, toInclusive_1);
24439                this.iter = list["listIterator$int"](list.size());
24440              }
24441            } else
24442              throw new Error("invalid overload");
24443          }
24444          DescendingEntryIterator2.prototype.forEachRemaining = function(consumer) {
24445            var _this = this;
24446            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
24447              if (funcInst == null || typeof funcInst == "function") {
24448                return funcInst;
24449              }
24450              return function(arg0) {
24451                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
24452              };
24453            })(consumer));
24454            while (this.hasNext()) {
24455              {
24456                (function(target) {
24457                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
24458                })(consumer);
24459              }
24460            }
24461            ;
24462          };
24463          DescendingEntryIterator2.prototype.hasNext = function() {
24464            return this.iter.hasPrevious();
24465          };
24466          DescendingEntryIterator2.prototype.next = function() {
24467            return this.last = this.iter.previous();
24468          };
24469          DescendingEntryIterator2.prototype.remove = function() {
24470            this.iter.remove();
24471            this.__parent.removeEntry(this.last);
24472            this.last = null;
24473          };
24474          return DescendingEntryIterator2;
24475        })()
24476      );
24477      TreeMap2.DescendingEntryIterator = DescendingEntryIterator;
24478      DescendingEntryIterator["__class"] = "java.util.TreeMap.DescendingEntryIterator";
24479      DescendingEntryIterator["__interfaces"] = ["java.util.Iterator"];
24480      var EntryIterator = (
24481        /** @class */
24482        (function() {
24483          function EntryIterator2(__parent, type, fromKey, fromInclusive, toKey, toInclusive) {
24484            if ((type != null && type instanceof java2.util.TreeMap.SubMapType || type === null) && (fromKey != null || fromKey === null) && (typeof fromInclusive === "boolean" || fromInclusive === null) && (toKey != null || toKey === null) && (typeof toInclusive === "boolean" || toInclusive === null)) {
24485              var __args = Array.prototype.slice.call(arguments, [1]);
24486              if (this.iter === void 0) {
24487                this.iter = null;
24488              }
24489              if (this.last === void 0) {
24490                this.last = null;
24491              }
24492              var list = new java2.util.ArrayList();
24493              __parent.inOrderAdd(list, type, __parent.root, fromKey, fromInclusive, toKey, toInclusive);
24494              this.iter = list["listIterator$"]();
24495            } else if (type === void 0 && fromKey === void 0 && fromInclusive === void 0 && toKey === void 0 && toInclusive === void 0) {
24496              var __args = Array.prototype.slice.call(arguments, [1]);
24497              {
24498                var __args_43 = Array.prototype.slice.call(arguments, [1]);
24499                var type_2 = java2.util.TreeMap.SubMapType_All_$LI$();
24500                var fromKey_2 = null;
24501                var fromInclusive_2 = false;
24502                var toKey_2 = null;
24503                var toInclusive_2 = false;
24504                if (this.iter === void 0) {
24505                  this.iter = null;
24506                }
24507                if (this.last === void 0) {
24508                  this.last = null;
24509                }
24510                var list = new java2.util.ArrayList();
24511                __parent.inOrderAdd(list, type_2, __parent.root, fromKey_2, fromInclusive_2, toKey_2, toInclusive_2);
24512                this.iter = list["listIterator$"]();
24513              }
24514            } else
24515              throw new Error("invalid overload");
24516          }
24517          EntryIterator2.prototype.forEachRemaining = function(consumer) {
24518            var _this = this;
24519            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
24520              if (funcInst == null || typeof funcInst == "function") {
24521                return funcInst;
24522              }
24523              return function(arg0) {
24524                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
24525              };
24526            })(consumer));
24527            while (this.hasNext()) {
24528              {
24529                (function(target) {
24530                  return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
24531                })(consumer);
24532              }
24533            }
24534            ;
24535          };
24536          EntryIterator2.prototype.hasNext = function() {
24537            return this.iter.hasNext();
24538          };
24539          EntryIterator2.prototype.next = function() {
24540            return this.last = this.iter.next();
24541          };
24542          EntryIterator2.prototype.remove = function() {
24543            this.iter.remove();
24544            this.__parent.removeEntry(this.last);
24545            this.last = null;
24546          };
24547          return EntryIterator2;
24548        })()
24549      );
24550      TreeMap2.EntryIterator = EntryIterator;
24551      EntryIterator["__class"] = "java.util.TreeMap.EntryIterator";
24552      EntryIterator["__interfaces"] = ["java.util.Iterator"];
24553      var __java_util_TreeMap_EntrySet = (
24554        /** @class */
24555        (function(_super) {
24556          __extends(__java_util_TreeMap_EntrySet2, _super);
24557          function __java_util_TreeMap_EntrySet2(__parent) {
24558            var _this = _super.call(this, __parent) || this;
24559            _this.__parent = __parent;
24560            return _this;
24561          }
24562          __java_util_TreeMap_EntrySet2.prototype.clear = function() {
24563            this.clear();
24564          };
24565          return __java_util_TreeMap_EntrySet2;
24566        })(java2.util.AbstractNavigableMap.EntrySet)
24567      );
24568      TreeMap2.__java_util_TreeMap_EntrySet = __java_util_TreeMap_EntrySet;
24569      __java_util_TreeMap_EntrySet["__class"] = "java.util.TreeMap.EntrySet";
24570      __java_util_TreeMap_EntrySet["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable"];
24571      var Node = (
24572        /** @class */
24573        (function(_super) {
24574          __extends(Node2, _super);
24575          function Node2(key, value, isRed) {
24576            var _this = this;
24577            if ((key != null || key === null) && (value != null || value === null) && (typeof isRed === "boolean" || isRed === null)) {
24578              var __args = arguments;
24579              _this = _super.call(this, key, value) || this;
24580              if (_this.isRed === void 0) {
24581                _this.isRed = false;
24582              }
24583              _this.child = [null, null];
24584              _this.isRed = isRed;
24585            } else if ((key != null || key === null) && (value != null || value === null) && isRed === void 0) {
24586              var __args = arguments;
24587              {
24588                var __args_44 = arguments;
24589                var isRed_1 = true;
24590                _this = _super.call(this, key, value) || this;
24591                if (_this.isRed === void 0) {
24592                  _this.isRed = false;
24593                }
24594                _this.child = [null, null];
24595                _this.isRed = isRed_1;
24596              }
24597            } else
24598              throw new Error("invalid overload");
24599            return _this;
24600          }
24601          return Node2;
24602        })(util2.AbstractMap.SimpleEntry)
24603      );
24604      TreeMap2.Node = Node;
24605      Node["__class"] = "java.util.TreeMap.Node";
24606      Node["__interfaces"] = ["java.util.Map.Entry"];
24607      var State = (
24608        /** @class */
24609        (function() {
24610          function State2() {
24611            if (this.done === void 0) {
24612              this.done = false;
24613            }
24614            if (this.found === void 0) {
24615              this.found = false;
24616            }
24617            if (this.matchValue === void 0) {
24618              this.matchValue = false;
24619            }
24620            if (this.value === void 0) {
24621              this.value = null;
24622            }
24623          }
24624          State2.prototype.toString = function() {
24625            return "State: mv=" + this.matchValue + " value=" + this.value + " done=" + this.done + " found=" + this.found;
24626          };
24627          return State2;
24628        })()
24629      );
24630      TreeMap2.State = State;
24631      State["__class"] = "java.util.TreeMap.State";
24632      var SubMap = (
24633        /** @class */
24634        (function(_super) {
24635          __extends(SubMap2, _super);
24636          function SubMap2(__parent, type, fromKey, fromInclusive, toKey, toInclusive) {
24637            var _this = _super.call(this) || this;
24638            _this.__parent = __parent;
24639            if (_this.fromInclusive === void 0) {
24640              _this.fromInclusive = false;
24641            }
24642            if (_this.fromKey === void 0) {
24643              _this.fromKey = null;
24644            }
24645            if (_this.toInclusive === void 0) {
24646              _this.toInclusive = false;
24647            }
24648            if (_this.toKey === void 0) {
24649              _this.toKey = null;
24650            }
24651            if (_this.type === void 0) {
24652              _this.type = null;
24653            }
24654            if (type === java2.util.TreeMap.SubMapType_Range_$LI$()) {
24655              if (__parent.cmp(toKey, fromKey) < 0) {
24656                throw new java2.lang.IllegalArgumentException("subMap: " + toKey + " less than " + fromKey);
24657              }
24658            }
24659            if (type === java2.util.TreeMap.SubMapType_Head_$LI$()) {
24660              __parent.cmp(toKey, toKey);
24661            }
24662            if (type === java2.util.TreeMap.SubMapType_Tail_$LI$()) {
24663              __parent.cmp(fromKey, fromKey);
24664            }
24665            if (type === java2.util.TreeMap.SubMapType_All_$LI$()) {
24666            }
24667            _this.type = type;
24668            _this.fromKey = fromKey;
24669            _this.fromInclusive = fromInclusive;
24670            _this.toKey = toKey;
24671            _this.toInclusive = toInclusive;
24672            return _this;
24673          }
24674          SubMap2.prototype.comparator = function() {
24675            return (function(funcInst) {
24676              if (funcInst == null || typeof funcInst == "function") {
24677                return funcInst;
24678              }
24679              return function(a, b) {
24680                return (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, a, b);
24681              };
24682            })(this.comparator());
24683          };
24684          SubMap2.prototype.entrySet = function() {
24685            return new SubMap2.SubMap$0(this);
24686          };
24687          SubMap2.prototype.headMap$java_lang_Object$boolean = function(toKey, toInclusive) {
24688            if (this.type.toKeyValid() && this.__parent.cmp(toKey, this.toKey) > 0) {
24689              throw new java2.lang.IllegalArgumentException("subMap: " + toKey + " greater than " + this.toKey);
24690            }
24691            if (this.type.fromKeyValid()) {
24692              return this.subMap(this.fromKey, this.fromInclusive, toKey, toInclusive);
24693            } else {
24694              return this.headMap(toKey, toInclusive);
24695            }
24696          };
24697          SubMap2.prototype.headMap = function(toKey, toInclusive) {
24698            if ((toKey != null || toKey === null) && (typeof toInclusive === "boolean" || toInclusive === null)) {
24699              return this.headMap$java_lang_Object$boolean(toKey, toInclusive);
24700            } else if ((toKey != null || toKey === null) && toInclusive === void 0) {
24701              return this.headMap$java_lang_Object(toKey);
24702            } else
24703              throw new Error("invalid overload");
24704          };
24705          SubMap2.prototype.isEmpty = function() {
24706            return this.getFirstEntry() == null;
24707          };
24708          SubMap2.prototype.put = function(key, value) {
24709            if (!this.inRange(key)) {
24710              throw new java2.lang.IllegalArgumentException(key + " outside the range " + this.fromKey + " to " + this.toKey);
24711            }
24712            return this.put(key, value);
24713          };
24714          SubMap2.prototype.remove = function(k) {
24715            var key = k;
24716            if (!this.inRange(key)) {
24717              return null;
24718            }
24719            return this.remove(key);
24720          };
24721          SubMap2.prototype.size = function() {
24722            var count = 0;
24723            for (var it = this.entryIterator(); it.hasNext(); it.next()) {
24724              {
24725                count++;
24726              }
24727              ;
24728            }
24729            return count;
24730          };
24731          SubMap2.prototype.subMap$java_lang_Object$boolean$java_lang_Object$boolean = function(newFromKey, newFromInclusive, newToKey, newToInclusive) {
24732            if (this.type.fromKeyValid() && this.__parent.cmp(newFromKey, this.fromKey) < 0) {
24733              throw new java2.lang.IllegalArgumentException("subMap: " + newFromKey + " less than " + this.fromKey);
24734            }
24735            if (this.type.toKeyValid() && this.__parent.cmp(newToKey, this.toKey) > 0) {
24736              throw new java2.lang.IllegalArgumentException("subMap: " + newToKey + " greater than " + this.toKey);
24737            }
24738            return this.subMap(newFromKey, newFromInclusive, newToKey, newToInclusive);
24739          };
24740          SubMap2.prototype.subMap = function(newFromKey, newFromInclusive, newToKey, newToInclusive) {
24741            if ((newFromKey != null || newFromKey === null) && (typeof newFromInclusive === "boolean" || newFromInclusive === null) && (newToKey != null || newToKey === null) && (typeof newToInclusive === "boolean" || newToInclusive === null)) {
24742              return this.subMap$java_lang_Object$boolean$java_lang_Object$boolean(newFromKey, newFromInclusive, newToKey, newToInclusive);
24743            } else if ((newFromKey != null || newFromKey === null) && (newFromInclusive != null || newFromInclusive === null) && newToKey === void 0 && newToInclusive === void 0) {
24744              return this.subMap$java_lang_Object$java_lang_Object(newFromKey, newFromInclusive);
24745            } else
24746              throw new Error("invalid overload");
24747          };
24748          SubMap2.prototype.tailMap$java_lang_Object$boolean = function(fromKey, fromInclusive) {
24749            if (this.type.fromKeyValid() && this.__parent.cmp(fromKey, this.fromKey) < 0) {
24750              throw new java2.lang.IllegalArgumentException("subMap: " + fromKey + " less than " + this.fromKey);
24751            }
24752            if (this.type.toKeyValid()) {
24753              return this.subMap(fromKey, fromInclusive, this.toKey, this.toInclusive);
24754            } else {
24755              return this.tailMap(fromKey, fromInclusive);
24756            }
24757          };
24758          SubMap2.prototype.tailMap = function(fromKey, fromInclusive) {
24759            if ((fromKey != null || fromKey === null) && (typeof fromInclusive === "boolean" || fromInclusive === null)) {
24760              return this.tailMap$java_lang_Object$boolean(fromKey, fromInclusive);
24761            } else if ((fromKey != null || fromKey === null) && fromInclusive === void 0) {
24762              return this.tailMap$java_lang_Object(fromKey);
24763            } else
24764              throw new Error("invalid overload");
24765          };
24766          SubMap2.prototype.descendingEntryIterator = function() {
24767            return new TreeMap2.DescendingEntryIterator(this.__parent, this.type, this.fromKey, this.fromInclusive, this.toKey, this.toInclusive);
24768          };
24769          SubMap2.prototype.entryIterator = function() {
24770            return new TreeMap2.EntryIterator(this.__parent, this.type, this.fromKey, this.fromInclusive, this.toKey, this.toInclusive);
24771          };
24772          SubMap2.prototype.getEntry = function(key) {
24773            return this.guardInRange(this.getEntry(key));
24774          };
24775          SubMap2.prototype.getFirstEntry = function() {
24776            var entry;
24777            if (this.type.fromKeyValid()) {
24778              if (this.fromInclusive) {
24779                entry = this.getCeilingEntry(this.fromKey);
24780              } else {
24781                entry = this.getHigherEntry(this.fromKey);
24782              }
24783            } else {
24784              entry = this.getFirstEntry();
24785            }
24786            return this.guardInRange(entry);
24787          };
24788          SubMap2.prototype.getLastEntry = function() {
24789            var entry;
24790            if (this.type.toKeyValid()) {
24791              if (this.toInclusive) {
24792                entry = this.getFloorEntry(this.toKey);
24793              } else {
24794                entry = this.getLowerEntry(this.toKey);
24795              }
24796            } else {
24797              entry = this.getLastEntry();
24798            }
24799            return this.guardInRange(entry);
24800          };
24801          SubMap2.prototype.getCeilingEntry = function(key) {
24802            return this.guardInRange(this.getCeilingEntry(key));
24803          };
24804          SubMap2.prototype.getFloorEntry = function(key) {
24805            return this.guardInRange(this.getFloorEntry(key));
24806          };
24807          SubMap2.prototype.getHigherEntry = function(key) {
24808            return this.guardInRange(this.getHigherEntry(key));
24809          };
24810          SubMap2.prototype.getLowerEntry = function(key) {
24811            return this.guardInRange(this.getLowerEntry(key));
24812          };
24813          SubMap2.prototype.removeEntry = function(entry) {
24814            return this.inRange(entry.getKey()) && this.removeEntry(entry);
24815          };
24816          SubMap2.prototype.guardInRange = function(entry) {
24817            return entry != null && this.inRange(entry.getKey()) ? entry : null;
24818          };
24819          SubMap2.prototype.inRange = function(key) {
24820            return this.__parent.inRange(this.type, key, this.fromKey, this.fromInclusive, this.toKey, this.toInclusive);
24821          };
24822          return SubMap2;
24823        })(java2.util.AbstractNavigableMap)
24824      );
24825      TreeMap2.SubMap = SubMap;
24826      SubMap["__class"] = "java.util.TreeMap.SubMap";
24827      SubMap["__interfaces"] = ["java.util.Map", "java.util.NavigableMap", "java.util.SortedMap"];
24828      (function(SubMap2) {
24829        var SubMap$0 = (
24830          /** @class */
24831          (function(_super) {
24832            __extends(SubMap$02, _super);
24833            function SubMap$02(__parent) {
24834              var _this = _super.call(this, __parent) || this;
24835              _this.__parent = __parent;
24836              return _this;
24837            }
24838            SubMap$02.prototype.isEmpty = function() {
24839              return this.isEmpty();
24840            };
24841            return SubMap$02;
24842          })(TreeMap2.SubMap.EntrySet)
24843        );
24844        SubMap2.SubMap$0 = SubMap$0;
24845        SubMap$0["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable"];
24846      })(SubMap = TreeMap2.SubMap || (TreeMap2.SubMap = {}));
24847      var SubMapType = (
24848        /** @class */
24849        (function() {
24850          function SubMapType2() {
24851          }
24852          SubMapType2.prototype.fromKeyValid = function() {
24853            return false;
24854          };
24855          SubMapType2.prototype.toKeyValid = function() {
24856            return false;
24857          };
24858          return SubMapType2;
24859        })()
24860      );
24861      TreeMap2.SubMapType = SubMapType;
24862      SubMapType["__class"] = "java.util.TreeMap.SubMapType";
24863      var SubMapTypeHead = (
24864        /** @class */
24865        (function(_super) {
24866          __extends(SubMapTypeHead2, _super);
24867          function SubMapTypeHead2() {
24868            return _super.call(this) || this;
24869          }
24870          SubMapTypeHead2.prototype.toKeyValid = function() {
24871            return true;
24872          };
24873          return SubMapTypeHead2;
24874        })(TreeMap2.SubMapType)
24875      );
24876      TreeMap2.SubMapTypeHead = SubMapTypeHead;
24877      SubMapTypeHead["__class"] = "java.util.TreeMap.SubMapTypeHead";
24878      var SubMapTypeRange = (
24879        /** @class */
24880        (function(_super) {
24881          __extends(SubMapTypeRange2, _super);
24882          function SubMapTypeRange2() {
24883            return _super.call(this) || this;
24884          }
24885          SubMapTypeRange2.prototype.fromKeyValid = function() {
24886            return true;
24887          };
24888          SubMapTypeRange2.prototype.toKeyValid = function() {
24889            return true;
24890          };
24891          return SubMapTypeRange2;
24892        })(TreeMap2.SubMapType)
24893      );
24894      TreeMap2.SubMapTypeRange = SubMapTypeRange;
24895      SubMapTypeRange["__class"] = "java.util.TreeMap.SubMapTypeRange";
24896      var SubMapTypeTail = (
24897        /** @class */
24898        (function(_super) {
24899          __extends(SubMapTypeTail2, _super);
24900          function SubMapTypeTail2() {
24901            return _super.call(this) || this;
24902          }
24903          SubMapTypeTail2.prototype.fromKeyValid = function() {
24904            return true;
24905          };
24906          return SubMapTypeTail2;
24907        })(TreeMap2.SubMapType)
24908      );
24909      TreeMap2.SubMapTypeTail = SubMapTypeTail;
24910      SubMapTypeTail["__class"] = "java.util.TreeMap.SubMapTypeTail";
24911    })(TreeMap = util2.TreeMap || (util2.TreeMap = {}));
24912  })(util = java2.util || (java2.util = {}));
24913})(java || (java = {}));
24914(function(java2) {
24915  var util;
24916  (function(util2) {
24917    var stream;
24918    (function(stream2) {
24919      var Collectors = (
24920        /** @class */
24921        (function() {
24922          function Collectors2() {
24923          }
24924          Collectors2.throwingMerger = function() {
24925            return function(u, v) {
24926              throw new java2.lang.IllegalStateException(javaemul.internal.StringHelper.format("Duplicate key %s", u));
24927            };
24928          };
24929          Collectors2.CH_ID_$LI$ = function() {
24930            if (Collectors2.CH_ID == null) {
24931              Collectors2.CH_ID = java2.util.Collections.unmodifiableSet(java2.util.Collections.singleton(java2.util.stream.Collector.Characteristics.IDENTITY_FINISH));
24932            }
24933            return Collectors2.CH_ID;
24934          };
24935          Collectors2.CH_NOID_$LI$ = function() {
24936            if (Collectors2.CH_NOID == null) {
24937              Collectors2.CH_NOID = java2.util.Collections.emptySet();
24938            }
24939            return Collectors2.CH_NOID;
24940          };
24941          Collectors2.toList = function() {
24942            return new Collectors2.CollectorImpl(function() {
24943              return new java2.util.ArrayList();
24944            }, function(l, i) {
24945              return l.add(i);
24946            }, function(left, right) {
24947              left.addAll$java_util_Collection(right);
24948              return left;
24949            });
24950          };
24951          Collectors2.toSet = function() {
24952            return new Collectors2.CollectorImpl(function() {
24953              return new java2.util.HashSet();
24954            }, function(s, i) {
24955              return s.add(i);
24956            }, function(left, right) {
24957              left.addAll(right);
24958              return left;
24959            });
24960          };
24961          Collectors2.toMap$java_util_function_Function$java_util_function_Function = function(keyMapper, valueMapper) {
24962            return Collectors2.toMap$java_util_function_Function$java_util_function_Function$java_util_function_BinaryOperator$java_util_function_Supplier((function(funcInst) {
24963              if (funcInst == null || typeof funcInst == "function") {
24964                return funcInst;
24965              }
24966              return function(arg0) {
24967                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
24968              };
24969            })(keyMapper), (function(funcInst) {
24970              if (funcInst == null || typeof funcInst == "function") {
24971                return funcInst;
24972              }
24973              return function(arg0) {
24974                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
24975              };
24976            })(valueMapper), (function(funcInst) {
24977              if (funcInst == null || typeof funcInst == "function") {
24978                return funcInst;
24979              }
24980              return function(arg0) {
24981                return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
24982              };
24983            })(Collectors2.throwingMerger()), function() {
24984              return new java2.util.HashMap();
24985            });
24986          };
24987          Collectors2.toMap$java_util_function_Function$java_util_function_Function$java_util_function_BinaryOperator = function(keyMapper, valueMapper, mergeFunction) {
24988            return Collectors2.toMap$java_util_function_Function$java_util_function_Function$java_util_function_BinaryOperator$java_util_function_Supplier((function(funcInst) {
24989              if (funcInst == null || typeof funcInst == "function") {
24990                return funcInst;
24991              }
24992              return function(arg0) {
24993                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
24994              };
24995            })(keyMapper), (function(funcInst) {
24996              if (funcInst == null || typeof funcInst == "function") {
24997                return funcInst;
24998              }
24999              return function(arg0) {
25000                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
25001              };
25002            })(valueMapper), (function(funcInst) {
25003              if (funcInst == null || typeof funcInst == "function") {
25004                return funcInst;
25005              }
25006              return function(arg0) {
25007                return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
25008              };
25009            })(mergeFunction), function() {
25010              return new java2.util.HashMap();
25011            });
25012          };
25013          Collectors2.toMap$java_util_function_Function$java_util_function_Function$java_util_function_BinaryOperator$java_util_function_Supplier = function(keyMapper, valueMapper, mergeFunction, mapSupplier) {
25014            var accumulator = function(map, element) {
25015              return map.merge((function(target) {
25016                return typeof target === "function" ? target(element) : target.apply(element);
25017              })(keyMapper), (function(target) {
25018                return typeof target === "function" ? target(element) : target.apply(element);
25019              })(valueMapper), (function(funcInst) {
25020                if (funcInst == null || typeof funcInst == "function") {
25021                  return funcInst;
25022                }
25023                return function(arg0, arg1) {
25024                  return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0, arg1);
25025                };
25026              })(mergeFunction));
25027            };
25028            return new Collectors2.CollectorImpl((function(funcInst) {
25029              if (funcInst == null || typeof funcInst == "function") {
25030                return funcInst;
25031              }
25032              return function() {
25033                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25034              };
25035            })(mapSupplier), (function(funcInst) {
25036              if (funcInst == null || typeof funcInst == "function") {
25037                return funcInst;
25038              }
25039              return function(arg0, arg1) {
25040                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0, arg1);
25041              };
25042            })(accumulator), (function(funcInst) {
25043              if (funcInst == null || typeof funcInst == "function") {
25044                return funcInst;
25045              }
25046              return function(arg0) {
25047                return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
25048              };
25049            })(Collectors2.mapMerger((function(funcInst) {
25050              if (funcInst == null || typeof funcInst == "function") {
25051                return funcInst;
25052              }
25053              return function(arg0) {
25054                return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
25055              };
25056            })(mergeFunction))));
25057          };
25058          Collectors2.toMap = function(keyMapper, valueMapper, mergeFunction, mapSupplier) {
25059            if ((typeof keyMapper === "function" && keyMapper.length === 1 || keyMapper === null) && (typeof valueMapper === "function" && valueMapper.length === 1 || valueMapper === null) && (typeof mergeFunction === "function" && mergeFunction.length === 2 || mergeFunction === null) && (typeof mapSupplier === "function" && mapSupplier.length === 0 || mapSupplier === null)) {
25060              return java2.util.stream.Collectors.toMap$java_util_function_Function$java_util_function_Function$java_util_function_BinaryOperator$java_util_function_Supplier(keyMapper, valueMapper, mergeFunction, mapSupplier);
25061            } else if ((typeof keyMapper === "function" && keyMapper.length === 1 || keyMapper === null) && (typeof valueMapper === "function" && valueMapper.length === 1 || valueMapper === null) && (typeof mergeFunction === "function" && mergeFunction.length === 2 || mergeFunction === null) && mapSupplier === void 0) {
25062              return java2.util.stream.Collectors.toMap$java_util_function_Function$java_util_function_Function$java_util_function_BinaryOperator(keyMapper, valueMapper, mergeFunction);
25063            } else if ((typeof keyMapper === "function" && keyMapper.length === 1 || keyMapper === null) && (typeof valueMapper === "function" && valueMapper.length === 1 || valueMapper === null) && mergeFunction === void 0 && mapSupplier === void 0) {
25064              return java2.util.stream.Collectors.toMap$java_util_function_Function$java_util_function_Function(keyMapper, valueMapper);
25065            } else
25066              throw new Error("invalid overload");
25067          };
25068          Collectors2.mapMerger = function(mergeFunction) {
25069            return function(m1, m2) {
25070              for (var index = m2.entrySet().iterator(); index.hasNext(); ) {
25071                var e = index.next();
25072                m1.merge(e.getKey(), e.getValue(), (function(funcInst) {
25073                  if (funcInst == null || typeof funcInst == "function") {
25074                    return funcInst;
25075                  }
25076                  return function(arg0, arg1) {
25077                    return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0, arg1);
25078                  };
25079                })(mergeFunction));
25080              }
25081              return m1;
25082            };
25083          };
25084          Collectors2.joining$ = function() {
25085            return new Collectors2.CollectorImpl(function() {
25086              return new java2.lang.StringBuilder();
25087            }, function(instance$StringBuilder, x) {
25088              return instance$StringBuilder.append(x);
25089            }, function(r1, r2) {
25090              r1.append$java_lang_CharSequence(r2);
25091              return r1;
25092            });
25093          };
25094          Collectors2.joining$java_lang_CharSequence = function(delimiter) {
25095            return Collectors2.joining$java_lang_CharSequence$java_lang_CharSequence$java_lang_CharSequence(delimiter, "", "");
25096          };
25097          Collectors2.joining$java_lang_CharSequence$java_lang_CharSequence$java_lang_CharSequence = function(delimiter, prefix, suffix) {
25098            return new Collectors2.CollectorImpl(function() {
25099              return new java2.util.StringJoiner(delimiter, prefix, suffix);
25100            }, function(instance$StringJoiner, newElement) {
25101              return instance$StringJoiner.add(newElement);
25102            }, function(instance$StringJoiner, other) {
25103              return instance$StringJoiner.merge(other);
25104            });
25105          };
25106          Collectors2.joining = function(delimiter, prefix, suffix) {
25107            if ((delimiter != null && (delimiter.constructor != null && delimiter.constructor["__interfaces"] != null && delimiter.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof delimiter === "string") || delimiter === null) && (prefix != null && (prefix.constructor != null && prefix.constructor["__interfaces"] != null && prefix.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof prefix === "string") || prefix === null) && (suffix != null && (suffix.constructor != null && suffix.constructor["__interfaces"] != null && suffix.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof suffix === "string") || suffix === null)) {
25108              return java2.util.stream.Collectors.joining$java_lang_CharSequence$java_lang_CharSequence$java_lang_CharSequence(delimiter, prefix, suffix);
25109            } else if ((delimiter != null && (delimiter.constructor != null && delimiter.constructor["__interfaces"] != null && delimiter.constructor["__interfaces"].indexOf("java.lang.CharSequence") >= 0 || typeof delimiter === "string") || delimiter === null) && prefix === void 0 && suffix === void 0) {
25110              return java2.util.stream.Collectors.joining$java_lang_CharSequence(delimiter);
25111            } else if (delimiter === void 0 && prefix === void 0 && suffix === void 0) {
25112              return java2.util.stream.Collectors.joining$();
25113            } else
25114              throw new Error("invalid overload");
25115          };
25116          Collectors2.groupingBy$java_util_function_Function$java_util_stream_Collector = function(classifier, downstream) {
25117            return Collectors2.groupingBy$java_util_function_Function$java_util_function_Supplier$java_util_stream_Collector((function(funcInst) {
25118              if (funcInst == null || typeof funcInst == "function") {
25119                return funcInst;
25120              }
25121              return function(arg0) {
25122                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
25123              };
25124            })(classifier), function() {
25125              return new java2.util.HashMap();
25126            }, downstream);
25127          };
25128          Collectors2.groupingBy$java_util_function_Function$java_util_function_Supplier$java_util_stream_Collector = function(classifier, mapFactory, downstream) {
25129            var downstreamSupplier = (function(funcInst) {
25130              if (funcInst == null || typeof funcInst == "function") {
25131                return funcInst;
25132              }
25133              return function() {
25134                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25134
25135              };
25136            })(downstream.supplier());
25137            var downstreamAccumulator = (function(funcInst) {
25138              if (funcInst == null || typeof funcInst == "function") {
25139                return funcInst;
25140              }
25141              return function(arg0, arg1) {
25142                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0, arg1);
25143              };
25144            })(downstream.accumulator());
25145            var accumulator = /* @__PURE__ */ (function(downstreamAccumulator2) {
25146              return function(m, t) {
25147                var key = java2.util.Objects.requireNonNull((function(target) {
25148                  return typeof target === "function" ? target(t) : target.apply(t);
25149                })(classifier), "element cannot be mapped to a null key");
25150                var container = m.computeIfAbsent(key, function(k) {
25151                  return (function(target) {
25152                    return typeof target === "function" ? target() : target.get();
25153                  })(downstreamSupplier);
25154                });
25155                (function(target) {
25156                  return typeof target === "function" ? target(container, t) : target.accept(container, t);
25157                })(downstreamAccumulator2);
25158              };
25159            })(downstreamAccumulator);
25160            var merger = (function(funcInst) {
25161              if (funcInst == null || typeof funcInst == "function") {
25162                return funcInst;
25163              }
25164              return function(arg0) {
25165                return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
25166              };
25167            })(Collectors2.mapMerger((function(funcInst) {
25168              if (funcInst == null || typeof funcInst == "function") {
25169                return funcInst;
25170              }
25171              return function(arg0) {
25172                return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
25173              };
25174            })(downstream.combiner())));
25175            var mangledFactory = (function(funcInst) {
25176              if (funcInst == null || typeof funcInst == "function") {
25177                return funcInst;
25178              }
25179              return function() {
25180                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25181              };
25182            })((function(funcInst) {
25183              if (funcInst == null || typeof funcInst == "function") {
25184                return funcInst;
25185              }
25186              return function() {
25187                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25188              };
25189            })(mapFactory));
25190            if (downstream.characteristics().contains(java2.util.stream.Collector.Characteristics.IDENTITY_FINISH)) {
25191              return new Collectors2.CollectorImpl((function(funcInst) {
25192                if (funcInst == null || typeof funcInst == "function") {
25193                  return funcInst;
25194                }
25195                return function() {
25196                  return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25197                };
25198              })(mangledFactory), (function(funcInst) {
25199                if (funcInst == null || typeof funcInst == "function") {
25200                  return funcInst;
25201                }
25202                return function(arg0, arg1) {
25203                  return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0, arg1);
25204                };
25205              })(accumulator), (function(funcInst) {
25206                if (funcInst == null || typeof funcInst == "function") {
25207                  return funcInst;
25208                }
25209                return function(arg0) {
25210                  return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
25211                };
25212              })(merger), Collectors2.CH_ID_$LI$());
25213            } else {
25214              var downstreamFinisher_1 = (function(funcInst) {
25215                if (funcInst == null || typeof funcInst == "function") {
25216                  return funcInst;
25217                }
25218                return function(arg0) {
25219                  return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
25220                };
25221              })((function(funcInst) {
25222                if (funcInst == null || typeof funcInst == "function") {
25223                  return funcInst;
25224                }
25225                return function(arg0) {
25226                  return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
25227                };
25228              })(downstream.finisher()));
25229              var finisher = function(intermediate) {
25230                intermediate.replaceAll(function(k, v) {
25231                  return (function(target) {
25232                    return typeof target === "function" ? target(v) : target.apply(v);
25233                  })(downstreamFinisher_1);
25234                });
25235                var castResult = intermediate;
25236                return castResult;
25237              };
25238              return new Collectors2.CollectorImpl((function(funcInst) {
25239                if (funcInst == null || typeof funcInst == "function") {
25240                  return funcInst;
25241                }
25242                return function() {
25243                  return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25244                };
25245              })(mangledFactory), (function(funcInst) {
25246                if (funcInst == null || typeof funcInst == "function") {
25247                  return funcInst;
25248                }
25249                return function(arg0, arg1) {
25250                  return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0, arg1);
25251                };
25252              })(accumulator), (function(funcInst) {
25253                if (funcInst == null || typeof funcInst == "function") {
25254                  return funcInst;
25255                }
25256                return function(arg0) {
25257                  return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
25258                };
25259              })(merger), (function(funcInst) {
25260                if (funcInst == null || typeof funcInst == "function") {
25261                  return funcInst;
25262                }
25263                return function(arg0) {
25264                  return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
25265                };
25266              })(finisher), Collectors2.CH_NOID_$LI$());
25267            }
25268          };
25269          Collectors2.groupingBy = function(classifier, mapFactory, downstream) {
25270            if ((typeof classifier === "function" && classifier.length === 1 || classifier === null) && (typeof mapFactory === "function" && mapFactory.length === 0 || mapFactory === null) && (downstream != null && (downstream.constructor != null && downstream.constructor["__interfaces"] != null && downstream.constructor["__interfaces"].indexOf("java.util.stream.Collector") >= 0) || downstream === null)) {
25271              return java2.util.stream.Collectors.groupingBy$java_util_function_Function$java_util_function_Supplier$java_util_stream_Collector(classifier, mapFactory, downstream);
25272            } else if ((typeof classifier === "function" && classifier.length === 1 || classifier === null) && (mapFactory != null && (mapFactory.constructor != null && mapFactory.constructor["__interfaces"] != null && mapFactory.constructor["__interfaces"].indexOf("java.util.stream.Collector") >= 0) || mapFactory === null) && downstream === void 0) {
25273              return java2.util.stream.Collectors.groupingBy$java_util_function_Function$java_util_stream_Collector(classifier, mapFactory);
25274            } else
25275              throw new Error("invalid overload");
25276          };
25277          Collectors2.mapping = function(mapper, downstream) {
25278            var downstreamAccumulator = (function(funcInst) {
25279              if (funcInst == null || typeof funcInst == "function") {
25280                return funcInst;
25281              }
25282              return function(arg0, arg1) {
25283                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0, arg1);
25284              };
25285            })(downstream.accumulator());
25286            return new Collectors2.CollectorImpl((function(funcInst) {
25287              if (funcInst == null || typeof funcInst == "function") {
25288                return funcInst;
25289              }
25290              return function() {
25291                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25292              };
25293            })(downstream.supplier()), /* @__PURE__ */ (function(downstreamAccumulator2) {
25294              return function(r, t) {
25295                return (function(target) {
25296                  return typeof target === "function" ? target(r, (function(target2) {
25297                    return typeof target2 === "function" ? target2(t) : target2.apply(t);
25298                  })(mapper)) : target.accept(r, (function(target2) {
25299                    return typeof target2 === "function" ? target2(t) : target2.apply(t);
25300                  })(mapper));
25301                })(downstreamAccumulator2);
25302              };
25303            })(downstreamAccumulator), (function(funcInst) {
25304              if (funcInst == null || typeof funcInst == "function") {
25305                return funcInst;
25306              }
25307              return function(arg0) {
25308                return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
25309              };
25310            })(downstream.combiner()), (function(funcInst) {
25311              if (funcInst == null || typeof funcInst == "function") {
25312                return funcInst;
25313              }
25314              return function(arg0) {
25315                return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
25316              };
25317            })(downstream.finisher()), downstream.characteristics());
25318          };
25319          Collectors2.reducing$java_lang_Object$java_util_function_BinaryOperator = function(identity, op) {
25320            return new Collectors2.CollectorImpl((function(funcInst) {
25321              if (funcInst == null || typeof funcInst == "function") {
25322                return funcInst;
25323              }
25324              return function() {
25325                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25326              };
25327            })(Collectors2.boxSupplier(identity)), function(a, t) {
25328              a[0] = (function(target) {
25329                return typeof target === "function" ? target(a[0], t) : target.apply(a[0], t);
25330              })(op);
25331            }, function(a, b) {
25332              a[0] = (function(target) {
25333                return typeof target === "function" ? target(a[0], b[0]) : target.apply(a[0], b[0]);
25334              })(op);
25335              return a;
25336            }, function(a) {
25337              return a[0];
25338            }, Collectors2.CH_NOID_$LI$());
25339          };
25340          Collectors2.reducing$java_lang_Object$java_util_function_Function$java_util_function_BinaryOperator = function(identity, mapper, op) {
25341            return new Collectors2.CollectorImpl((function(funcInst) {
25342              if (funcInst == null || typeof funcInst == "function") {
25343                return funcInst;
25344              }
25345              return function() {
25346                return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25347              };
25348            })(Collectors2.boxSupplier(identity)), function(a, t) {
25349              a[0] = (function(target) {
25350                return typeof target === "function" ? target(a[0], (function(target2) {
25351                  return typeof target2 === "function" ? target2(t) : target2.apply(t);
25352                })(mapper)) : target.apply(a[0], (function(target2) {
25353                  return typeof target2 === "function" ? target2(t) : target2.apply(t);
25354                })(mapper));
25355              })(op);
25356            }, function(a, b) {
25357              a[0] = (function(target) {
25358                return typeof target === "function" ? target(a[0], b[0]) : target.apply(a[0], b[0]);
25359              })(op);
25360              return a;
25361            }, function(a) {
25362              return a[0];
25363            }, Collectors2.CH_NOID_$LI$());
25364          };
25365          Collectors2.reducing = function(identity, mapper, op) {
25366            if ((identity != null || identity === null) && (typeof mapper === "function" && mapper.length === 1 || mapper === null) && (typeof op === "function" && op.length === 2 || op === null)) {
25367              return java2.util.stream.Collectors.reducing$java_lang_Object$java_util_function_Function$java_util_function_BinaryOperator(identity, mapper, op);
25368            } else if ((identity != null || identity === null) && (typeof mapper === "function" && mapper.length === 2 || mapper === null) && op === void 0) {
25369              return java2.util.stream.Collectors.reducing$java_lang_Object$java_util_function_BinaryOperator(identity, mapper);
25370            } else
25371              throw new Error("invalid overload");
25372          };
25373          Collectors2.boxSupplier = function(identity) {
25374            return function() {
25375              return [identity];
25376            };
25377          };
25378          return Collectors2;
25379        })()
25380      );
25381      stream2.Collectors = Collectors;
25382      Collectors["__class"] = "java.util.stream.Collectors";
25383      (function(Collectors2) {
25384        var CollectorImpl = (
25385          /** @class */
25386          (function() {
25387            function CollectorImpl2(supplier, accumulator, combiner, finisher, characteristics) {
25388              if ((typeof supplier === "function" && supplier.length === 0 || supplier === null) && (typeof accumulator === "function" && accumulator.length === 2 || accumulator === null) && (typeof combiner === "function" && combiner.length === 2 || combiner === null) && (typeof finisher === "function" && finisher.length === 1 || finisher === null) && (characteristics != null && (c
25388haracteristics.constructor != null && characteristics.constructor["__interfaces"] != null && characteristics.constructor["__interfaces"].indexOf("java.util.Set") >= 0) || characteristics === null)) {
25389                var __args = arguments;
25390                if (this.__supplier === void 0) {
25391                  this.__supplier = null;
25392                }
25393                if (this.__accumulator === void 0) {
25394                  this.__accumulator = null;
25395                }
25396                if (this.__combiner === void 0) {
25397                  this.__combiner = null;
25398                }
25399                if (this.__characteristics === void 0) {
25400                  this.__characteristics = null;
25401                }
25402                if (this.__finisher === void 0) {
25403                  this.__finisher = null;
25404                }
25405                this.__supplier = (function(funcInst) {
25406                  if (funcInst == null || typeof funcInst == "function") {
25407                    return funcInst;
25408                  }
25409                  return function() {
25410                    return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25411                  };
25412                })(supplier);
25413                this.__accumulator = (function(funcInst) {
25414                  if (funcInst == null || typeof funcInst == "function") {
25415                    return funcInst;
25416                  }
25417                  return function(arg0, arg1) {
25418                    return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0, arg1);
25419                  };
25420                })(accumulator);
25421                this.__combiner = (function(funcInst) {
25422                  if (funcInst == null || typeof funcInst == "function") {
25423                    return funcInst;
25424                  }
25425                  return function(arg0) {
25426                    return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
25427                  };
25428                })(combiner);
25429                this.__finisher = (function(funcInst) {
25430                  if (funcInst == null || typeof funcInst == "function") {
25431                    return funcInst;
25432                  }
25433                  return function(arg0) {
25434                    return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
25435                  };
25436                })(finisher);
25437                this.__characteristics = characteristics;
25438              } else if ((typeof supplier === "function" && supplier.length === 0 || supplier === null) && (typeof accumulator === "function" && accumulator.length === 2 || accumulator === null) && (typeof combiner === "function" && combiner.length === 2 || combiner === null) && (finisher != null && (finisher.constructor != null && finisher.constructor["__interfaces"] != null && finisher.constructor["__interfaces"].indexOf("java.util.Set") >= 0) || finisher === null) && characteristics === void 0) {
25439                var __args = arguments;
25440                var characteristics_1 = __args[3];
25441                {
25442                  var __args_45 = arguments;
25443                  var finisher_1 = CollectorImpl2.castingIdentity();
25444                  if (this.__supplier === void 0) {
25445                    this.__supplier = null;
25446                  }
25447                  if (this.__accumulator === void 0) {
25448                    this.__accumulator = null;
25449                  }
25450                  if (this.__combiner === void 0) {
25451                    this.__combiner = null;
25452                  }
25453                  if (this.__characteristics === void 0) {
25454                    this.__characteristics = null;
25455                  }
25456                  if (this.__finisher === void 0) {
25457                    this.__finisher = null;
25458                  }
25459                  this.__supplier = (function(funcInst) {
25460                    if (funcInst == null || typeof funcInst == "function") {
25461                      return funcInst;
25462                    }
25463                    return function() {
25464                      return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25465                    };
25466                  })(supplier);
25467                  this.__accumulator = (function(funcInst) {
25468                    if (funcInst == null || typeof funcInst == "function") {
25469                      return funcInst;
25470                    }
25471                    return function(arg0, arg1) {
25472                      return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0, arg1);
25473                    };
25474                  })(accumulator);
25475                  this.__combiner = (function(funcInst) {
25476                    if (funcInst == null || typeof funcInst == "function") {
25477                      return funcInst;
25478                    }
25479                    return function(arg0) {
25480                      return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
25481                    };
25482                  })(combiner);
25483                  this.__finisher = (function(funcInst) {
25484                    if (funcInst == null || typeof funcInst == "function") {
25485                      return funcInst;
25486                    }
25487                    return function(arg0) {
25488                      return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
25489                    };
25490                  })(finisher_1);
25491                  this.__characteristics = characteristics_1;
25492                }
25493              } else if ((typeof supplier === "function" && supplier.length === 0 || supplier === null) && (typeof accumulator === "function" && accumulator.length === 2 || accumulator === null) && (typeof combiner === "function" && combiner.length === 2 || combiner === null) && finisher === void 0 && characteristics === void 0) {
25494                var __args = arguments;
25495                {
25496                  var __args_46 = arguments;
25497                  var finisher_2 = CollectorImpl2.castingIdentity();
25498                  var characteristics_2 = null;
25499                  if (this.__supplier === void 0) {
25500                    this.__supplier = null;
25501                  }
25502                  if (this.__accumulator === void 0) {
25503                    this.__accumulator = null;
25504                  }
25505                  if (this.__combiner === void 0) {
25506                    this.__combiner = null;
25507                  }
25508                  if (this.__characteristics === void 0) {
25509                    this.__characteristics = null;
25510                  }
25511                  if (this.__finisher === void 0) {
25512                    this.__finisher = null;
25513                  }
25514                  this.__supplier = (function(funcInst) {
25515                    if (funcInst == null || typeof funcInst == "function") {
25516                      return funcInst;
25517                    }
25518                    return function() {
25519                      return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25520                    };
25521                  })(supplier);
25522                  this.__accumulator = (function(funcInst) {
25523                    if (funcInst == null || typeof funcInst == "function") {
25524                      return funcInst;
25525                    }
25526                    return function(arg0, arg1) {
25527                      return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0, arg1);
25528                    };
25529                  })(accumulator);
25530                  this.__combiner = (function(funcInst) {
25531                    if (funcInst == null || typeof funcInst == "function") {
25532                      return funcInst;
25533                    }
25534                    return function(arg0) {
25535                      return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
25536                    };
25537                  })(combiner);
25538                  this.__finisher = (function(funcInst) {
25539                    if (funcInst == null || typeof funcInst == "function") {
25540                      return funcInst;
25541                    }
25542                    return function(arg0) {
25543                      return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
25544                    };
25545                  })(finisher_2);
25546                  this.__characteristics = characteristics_2;
25547                }
25548              } else
25549                throw new Error("invalid overload");
25550            }
25551            CollectorImpl2.castingIdentity = function() {
25552              return function(i) {
25553                return i;
25554              };
25555            };
25556            CollectorImpl2.prototype.accumulator = function() {
25557              return (function(funcInst) {
25558                if (funcInst == null || typeof funcInst == "function") {
25559                  return funcInst;
25560                }
25561                return function(arg0, arg1) {
25562                  return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0, arg1);
25563                };
25564              })(this.__accumulator);
25565            };
25566            CollectorImpl2.prototype.supplier = function() {
25567              return (function(funcInst) {
25568                if (funcInst == null || typeof funcInst == "function") {
25569                  return funcInst;
25570                }
25571                return function() {
25572                  return (funcInst["get"] ? funcInst["get"] : funcInst).call(funcInst);
25573                };
25574              })(this.__supplier);
25575            };
25576            CollectorImpl2.prototype.combiner = function() {
25577              return (function(funcInst) {
25578                if (funcInst == null || typeof funcInst == "function") {
25579                  return funcInst;
25580                }
25581                return function(arg0) {
25582                  return (funcInst["minBy"] ? funcInst["minBy"] : funcInst).call(funcInst, arg0);
25583                };
25584              })(this.__combiner);
25585            };
25586            CollectorImpl2.prototype.finisher = function() {
25587              return (function(funcInst) {
25588                if (funcInst == null || typeof funcInst == "function") {
25589                  return funcInst;
25590                }
25591                return function(arg0) {
25592                  return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0);
25593                };
25594              })(this.__finisher);
25595            };
25596            CollectorImpl2.prototype.characteristics = function() {
25597              return this.__characteristics;
25598            };
25599            return CollectorImpl2;
25600          })()
25601        );
25602        Collectors2.CollectorImpl = CollectorImpl;
25603        CollectorImpl["__class"] = "java.util.stream.Collectors.CollectorImpl";
25604        CollectorImpl["__interfaces"] = ["java.util.stream.Collector"];
25605      })(Collectors = stream2.Collectors || (stream2.Collectors = {}));
25606    })(stream = util2.stream || (util2.stream = {}));
25607  })(util = java2.util || (java2.util = {}));
25608})(java || (java = {}));
25609(function(java2) {
25610  var util;
25611  (function(util2) {
25612    var LinkedHashMap = (
25613      /** @class */
25614      (function(_super) {
25615        __extends(LinkedHashMap2, _super);
25616        function LinkedHashMap2(ignored, alsoIgnored, accessOrder) {
25617          var _this = this;
25618          if ((typeof ignored === "number" || ignored === null) && (typeof alsoIgnored === "number" || alsoIgnored === null) && (typeof accessOrder === "boolean" || accessOrder === null)) {
25619            var __args = arguments;
25620            _this = _super.call(this, ignored, alsoIgnored) || this;
25621            if (_this.accessOrder === void 0) {
25622              _this.accessOrder = false;
25623            }
25624            if (_this.head === void 0) {
25625              _this.head = null;
25626            }
25627            if (_this.map === void 0) {
25628              _this.map = null;
25629            }
25630            _this.head = new LinkedHashMap2.ChainEntry(_this);
25631            _this.map = new java2.util.HashMap();
25632            _this.accessOrder = accessOrder;
25633            _this.resetChainEntries();
25634          } else if ((typeof ignored === "number" || ignored === null) && (typeof alsoIgnored === "number" || alsoIgnored === null) && accessOrder === void 0) {
25635            var __args = arguments;
25636            _this = _super.call(this, ignored, alsoIgnored) || this;
25637            if (_this.accessOrder === void 0) {
25638              _this.accessOrder = false;
25639            }
25640            if (_this.head === void 0) {
25641              _this.head = null;
25642            }
25643            if (_this.map === void 0) {
25644              _this.map = null;
25645            }
25646            _this.head = new LinkedHashMap2.ChainEntry(_this);
25647            _this.map = new java2.util.HashMap();
25648            _this.resetChainEntries();
25649          } else if ((ignored != null && (ignored.constructor != null && ignored.constructor["__interfaces"] != null && ignored.constructor["__interfaces"].indexOf("java.util.Map") >= 0) || ignored === null) && alsoIgnored === void 0 && accessOrder === void 0) {
25650            var __args = arguments;
25651            var toBeCopied = __args[0];
25652            _this = _super.call(this) || this;
25653            if (_this.accessOrder === void 0) {
25654              _this.accessOrder = false;
25655            }
25656            if (_this.head === void 0) {
25657              _this.head = null;
25658            }
25659            if (_this.map === void 0) {
25660              _this.map = null;
25661            }
25662            _this.head = new LinkedHashMap2.ChainEntry(_this);
25663            _this.map = new java2.util.HashMap();
25664            _this.resetChainEntries();
25665            _this.putAll(toBeCopied);
25666          } else if ((typeof ignored === "number" || ignored === null) && alsoIgnored === void 0 && accessOrder === void 0) {
25667            var __args = arguments;
25668            {
25669              var __args_47 = arguments;
25670              var alsoIgnored_2 = 0;
25671              _this = _super.call(this, ignored, alsoIgnored_2) || this;
25672              if (_this.accessOrder === void 0) {
25673                _this.accessOrder = false;
25674              }
25675              if (_this.head === void 0) {
25676                _this.head = null;
25677              }
25678              if (_this.map === void 0) {
25679                _this.map = null;
25680              }
25681              _this.head = new LinkedHashMap2.ChainEntry(_this);
25682              _this.map = new java2.util.HashMap();
25683              _this.resetChainEntries();
25684            }
25685          } else if (ignored === void 0 && alsoIgnored === void 0 && accessOrder === void 0) {
25686            var __args = arguments;
25687            _this = _super.call(this) || this;
25688            if (_this.accessOrder === void 0) {
25689              _this.accessOrder = false;
25690            }
25691            if (_this.head === void 0) {
25692              _this.head = null;
25693            }
25694            if (_this.map === void 0) {
25695              _this.map = null;
25696            }
25697            _this.head = new LinkedHashMap2.ChainEntry(_this);
25698            _this.map = new java2.util.HashMap();
25699            _this.resetChainEntries();
25700          } else
25701            throw new Error("invalid overload");
25702          return _this;
25703        }
25704        LinkedHashMap2.prototype.replaceAll = function(__function) {
25705          java2.util.Objects.requireNonNull((function(funcInst) {
25706            if (funcInst == null || typeof funcInst == "function") {
25707              return funcInst;
25708            }
25709            return function(arg0, arg1) {
25710              return (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0, arg1);
25711            };
25712          })(__function));
25713          var _loop_12 = function(index2) {
25714            var entry = index2.next();
25715            {
25716              var k_4;
25717              var v_4;
25718              try {
25719                k_4 = entry.getKey();
25720                v_4 = entry.getValue();
25721              } catch (ise) {
25722                throw new java2.lang.RuntimeException(ise);
25723              }
25724              v_4 = (function(target) {
25725                return typeof target === "function" ? target(k_4, v_4) : target.apply(k_4, v_4);
25726              })(__function);
25727              try {
25728                entry.setValue(v_4);
25729              } catch (ise) {
25730                throw new java2.lang.RuntimeException(ise);
25731              }
25732            }
25733          };
25734          for (var index = this.entrySet().iterator(); index.hasNext(); ) {
25735            _loop_12(index);
25736          }
25737        };
25738        LinkedHashMap2.prototype.getOrDefault = function(key, defaultValue) {
25739          var v;
25740          return (v = this.get(key)) != null || this.containsKey(key) ? v : defaultValue;
25741        };
25742        LinkedHashMap2.prototype.merge = function(key, value, map) {
25743          var old = this.get(key);
25744          var next = old == null ? value : (function(target) {
25745            return typeof target === "function" ? target(old, value) : target.apply(old, value);
25746          })(map);
25747          if (next == null) {
25748            this.remove(key);
25749          } else {
25750            this.put(key, next);
25751          }
25752          return next;
25753        };
25754        LinkedHashMap2.prototype.computeIfAbsent = function(key, mappingFunction) {
25755          var result;
25756          if ((result = this.get(key)) == null) {
25757            result = (function(target) {
25758              return typeof target === "function" ? target(key) : target.apply(key);
25759            })(mappingFunction);
25760            if (result != null)
25761              this.put(key, result);
25762          }
25763          return result;
25764        };
25765        LinkedHashMap2.prototype.putIfAbsent = function(key, value) {
25766          var v = this.get(key);
25767          if (v == null) {
25768            v = this.put(key, value);
25769          }
25770          return v;
25771        };
25772        LinkedHashMap2.prototype.clear = function() {
25773          this.map.clear();
25774          this.resetChainEntries();
25775        };
25776        LinkedHashMap2.prototype.resetChainEntries = function() {
25777          this.head.prev = this.head;
25778          this.head.next = this.head;
25779        };
25780        LinkedHashMap2.prototype.clone = function() {
25781          return new LinkedHashMap2(this);
25782        };
25783        LinkedHashMap2.prototype.containsKey = function(key) {
25784          return this.map.containsKey(key);
25785        };
25786        LinkedHashMap2.prototype.containsValue = function(value) {
25787          var node = this.head.next;
25788          while (node !== this.head) {
25789            {
25790              if (java2.util.Objects.equals(node.getValue(), value)) {
25791                return true;
25792              }
25793              node = node.next;
25794            }
25795          }
25796          ;
25797          return false;
25798        };
25799        LinkedHashMap2.prototype.entrySet = function() {
25800          return new LinkedHashMap2.__java_util_LinkedHashMap_EntrySet(this);
25801        };
25802        LinkedHashMap2.prototype.get = function(key) {
25803          var entry = this.map.get(key);
25804          if (entry != null) {
25805            this.recordAccess(entry);
25806            return entry.getValue();
25807          }
25808          return null;
25809        };
25810        LinkedHashMap2.prototype.put = function(key, value) {
25811          var old = this.map.get(key);
25812          if (old == null) {
25813            var newEntry = new LinkedHashMap2.ChainEntry(this, key, value);
25814            this.map.put(key, newEntry);
25815            newEntry.addToEnd();
25816            var eldest = this.head.next;
25817            if (this.removeEldestEntry(eldest)) {
25818              eldest.remove();
25819              this.map.remove(eldest.getKey());
25820            }
25821            return null;
25822          } else {
25823            var oldValue = old.setValue(value);
25824            this.recordAccess(old);
25825            return oldValue;
25826          }
25827        };
25828        LinkedHashMap2.prototype.remove = function(key) {
25829          var entry = this.map.remove(key);
25830          if (entry != null) {
25831            entry.remove();
25832            return entry.getValue();
25833          }
25834          return null;
25835        };
25836        LinkedHashMap2.prototype.size = function() {
25837          return this.map.size();
25838        };
25839        LinkedHashMap2.prototype.removeEldestEntry = function(eldest) {
25840          return false;
25841        };
25842        LinkedHashMap2.prototype.recordAccess = function(entry) {
25843          if (this.accessOrder) {
25844            entry.remove();
25845            entry.addToEnd();
25846          }
25847        };
25848        return LinkedHashMap2;
25849      })(java2.util.HashMap)
25850    );
25851    util2.LinkedHashMap = LinkedHashMap;
25852    LinkedHashMap["__class"] = "java.util.LinkedHashMap";
25853    LinkedHashMap["__interfaces"] = ["java.lang.Cloneable", "java.util.Map", "java.io.Serializable"];
25854    (function(LinkedHashMap2) {
25855      var ChainEntry = (
25856        /** @class */
25857        (function(_super) {
25858          __extends(ChainEntry2, _super);
25859          function ChainEntry2(__parent, key, value) {
25860            if (key === void 0) {
25861              key = null;
25862            }
25863            if (value === void 0) {
25864              value = null;
25865            }
25866            var _this = _super.call(this, key, value) || this;
25867            _this.__parent = __parent;
25868            if (_this.next === void 0) {
25869              _this.next = null;
25870            }
25871            if (_this.prev === void 0) {
25872              _this.prev = null;
25873            }
25874            return _this;
25875          }
25876          ChainEntry2.prototype.addToEnd = function() {
25877            var tail = this.__parent.head.prev;
25878            this.prev = tail;
25879            this.next = this.__parent.head;
25880            tail.next = this.__parent.head.prev = this;
25881          };
25882          ChainEntry2.prototype.remove = function() {
25883            this.next.prev = this.prev;
25884            this.prev.next = this.next;
25885            this.next = this.prev = null;
25886          };
25887          return ChainEntry2;
25888        })(util2.AbstractMap.SimpleEntry)
25889      );
25890      LinkedHashMap2.ChainEntry = ChainEntry;
25891      ChainEntry["__class"] = "java.util.LinkedHashMap.ChainEntry";
25892      ChainEntry["__interfaces"] = ["java.util.Map.Entry"];
25893      var __java_util_LinkedHashMap_EntrySet = (
25894        /** @class */
25895        (function(_super) {
25896          __extends(__java_util_LinkedHashMap_EntrySet2, _super);
25897          function __java_util_LinkedHashMap_EntrySet2(__parent) {
25898            var _this = _super.call(this) || this;
25899            _this.__parent = __parent;
25900            return _this;
25901          }
25902          __java_util_LinkedHashMap_EntrySet2.prototype.clear = function() {
25903            this.clear();
25904          };
25905          __java_util_LinkedHashMap_EntrySet2.prototype.contains = function(o) {
25906            if (o != null && (o.constructor != null && o.constructor["__interfaces"] != null && o.constructor["__interfaces"].indexOf("java.util.Map.Entry") >= 0)) {
25907              return this.__parent.containsEntry(o);
25908            }
25909            return false;
25910          };
25911          __java_util_LinkedHashMap_EntrySet2.prototype.iterator = function() {
25912            return new __java_util_LinkedHashMap_EntrySet2.EntryIterator(this);
25913          };
25914          __java_util_LinkedHashMap_EntrySet2.prototype.remove = function(entry) {
25915            if (this.contains(entry)) {
25916              var key = entry.getKey();
25917              this.remove(key);
25918              return true;
25919            }
25920            return false;
25921          };
25922          __java_util_LinkedHashMap_EntrySet2.prototype.size = function() {
25923            return this.__parent.size();
25924          };
25925          return __java_util_LinkedHashMap_EntrySet2;
25926        })(java2.util.AbstractSet)
25927      );
25928      LinkedHashMap2.__java_util_LinkedHashMap_EntrySet = __java_util_LinkedHashMap_EntrySet;
25929      __java_util_LinkedHashMap_EntrySet["__class"] = "java.util.LinkedHashMap.EntrySet";
25930      __java_util_LinkedHashMap_EntrySet["__interfaces"] = ["java.util.Collection", "java.util.Set", "java.lang.Iterable"];
25931      (function(__java_util_LinkedHashMap_EntrySet2) {
25932        var EntryIterator = (
25933          /** @class */
25934          (function() {
25935            function EntryIterator2(__parent) {
25936              this.__parent = __parent;
25937              if (this.last === void 0) {
25938                this.last = null;
25939              }
25940              if (this.__next === void 0) {
25941                this.__next = null;
25942              }
25943              this.__next = __parent.__parent.head.next;
25944              java2.util.ConcurrentModificationDetector.recordLastKnownStructure(__parent.__parent.map, this);
25945            }
25946            EntryIterator2.prototype.forEachRemaining = function(consumer) {
25947              var _this = this;
25948              javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
25949                if (funcInst == null || typeof funcInst == "function") {
25950                  return funcInst;
25951                }
25952                return function(arg0) {
25953                  return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
25954                };
25955              })(consumer));
25956              while (this.hasNext()) {
25957                {
25958                  (function(target) {
25959                    return typeof target === "function" ? target(_this.next()) : target.accept(_this.next());
25960                  })(consumer);
25961                }
25962              }
25963              ;
25964            };
25965            EntryIterator2.prototype.hasNext = function() {
25966              return this.__next !== this.__parent.__parent.head;
25967            };
25968            EntryIterator2.prototype.next = function() {
25969              java2.util.ConcurrentModificationDetector.checkStructuralChange(this.__parent.__parent.map, this);
25970              javaemul.internal.InternalPreconditions.checkCriticalElement(this.hasNext());
25971              this.last = this.__next;
25972              this.__next = this.__next.next;
25973              return this.last;
25974            };
25975            EntryIterator2.prototype.remove = function() {
25976              javaemul.internal.InternalPreconditions.checkState(this.last != null);
25977              java2.util.ConcurrentModificationDetector.checkStructuralChange(this.__parent.__parent.map, this);
25978              this.last.remove();
25979              this.__parent.__parent.map.remove(this.last.getKey());
25980              java2.util.ConcurrentModificationDetector.recordLastKnownStructure(this.__parent.__parent.map, this);
25981              this.last = null;
25982            };
25983            return EntryIterator2;
25984          })()
25985        );
25986        __java_util_LinkedHashMap_EntrySet2.EntryIterator = EntryIterator;
25987        EntryIterator["__class"] = "java.util.LinkedHashMap.EntrySet.EntryIterator";
25988        EntryIterator["__interfaces"] = ["java.util.Iterator"];
25989      })(__java_util_LinkedHashMap_EntrySet = LinkedHashMap2.__java_util_LinkedHashMap_EntrySet || (LinkedHashMap2.__java_util_LinkedHashMap_EntrySet = {}));
25990    })(LinkedHashMap = util2.LinkedHashMap || (util2.LinkedHashMap = {}));
25991  })(util = java2.util || (java2.util = {}));
25992})(java || (java = {}));
25993(function(java2) {
25994  var util;
25995  (function(util2) {
25996    var ConcurrentHashMap = (
25997      /** @class */
25998      (function(_super) {
25999        __extends(ConcurrentHashMap2, _super);
26000        function ConcurrentHashMap2() {
26001          return _super.call(this) || this;
26002        }
26003        return ConcurrentHashMap2;
26004      })(java2.util.HashMap)
26005    );
26006    util2.ConcurrentHashMap = ConcurrentHashMap;
26007    ConcurrentHashMap["__class"] = "java.util.ConcurrentHashMap";
26008    ConcurrentHashMap["__interfaces"] = ["java.lang.Cloneable", "j
26008ava.util.Map", "java.io.Serializable"];
26009  })(util = java2.util || (java2.util = {}));
26010})(java || (java = {}));
26011(function(java2) {
26012  var util;
26013  (function(util2) {
26014    var Hashtable = (
26015      /** @class */
26016      (function(_super) {
26017        __extends(Hashtable2, _super);
26018        function Hashtable2(ignored, alsoIgnored) {
26019          var _this = this;
26020          if ((typeof ignored === "number" || ignored === null) && (typeof alsoIgnored === "number" || alsoIgnored === null)) {
26021            var __args = arguments;
26022            _this = _super.call(this, ignored, alsoIgnored) || this;
26023          } else if ((ignored != null && (ignored.constructor != null && ignored.constructor["__interfaces"] != null && ignored.constructor["__interfaces"].indexOf("java.util.Map") >= 0) || ignored === null) && alsoIgnored === void 0) {
26024            var __args = arguments;
26025            var toBeCopied = __args[0];
26026            _this = _super.call(this, toBeCopied) || this;
26027          } else if ((typeof ignored === "number" || ignored === null) && alsoIgnored === void 0) {
26028            var __args = arguments;
26029            _this = _super.call(this, ignored) || this;
26030          } else if (ignored === void 0 && alsoIgnored === void 0) {
26031            var __args = arguments;
26032            _this = _super.call(this) || this;
26033          } else
26034            throw new Error("invalid overload");
26035          return _this;
26036        }
26037        Hashtable2.prototype.keys = function() {
26038          var it = this.keySet().iterator();
26039          return new Hashtable2.Hashtable$0(this, it);
26040        };
26041        Hashtable2.prototype.elements = function() {
26042          var it = this.values().iterator();
26043          return new Hashtable2.Hashtable$1(this, it);
26044        };
26045        Hashtable2.serialVersionUID = 1;
26046        return Hashtable2;
26047      })(java2.util.HashMap)
26048    );
26049    util2.Hashtable = Hashtable;
26050    Hashtable["__class"] = "java.util.Hashtable";
26051    Hashtable["__interfaces"] = ["java.lang.Cloneable", "java.util.Map", "java.util.Dictionary", "java.io.Serializable"];
26052    (function(Hashtable2) {
26053      var Hashtable$0 = (
26054        /** @class */
26055        (function() {
26056          function Hashtable$02(__parent, it) {
26057            this.it = it;
26058            this.__parent = __parent;
26059          }
26060          Hashtable$02.prototype.hasMoreElements = function() {
26061            return this.it.hasNext();
26062          };
26063          Hashtable$02.prototype.nextElement = function() {
26064            return this.it.next();
26065          };
26066          return Hashtable$02;
26067        })()
26068      );
26069      Hashtable2.Hashtable$0 = Hashtable$0;
26070      Hashtable$0["__interfaces"] = ["java.util.Enumeration"];
26071      var Hashtable$1 = (
26072        /** @class */
26073        (function() {
26074          function Hashtable$12(__parent, it) {
26075            this.it = it;
26076            this.__parent = __parent;
26077          }
26078          Hashtable$12.prototype.hasMoreElements = function() {
26079            return this.it.hasNext();
26080          };
26081          Hashtable$12.prototype.nextElement = function() {
26082            return this.it.next();
26083          };
26084          return Hashtable$12;
26085        })()
26086      );
26087      Hashtable2.Hashtable$1 = Hashtable$1;
26088      Hashtable$1["__interfaces"] = ["java.util.Enumeration"];
26089    })(Hashtable = util2.Hashtable || (util2.Hashtable = {}));
26090  })(util = java2.util || (java2.util = {}));
26091})(java || (java = {}));
26092(function(java2) {
26093  var lang;
26094  (function(lang2) {
26095    var System = (
26096      /** @class */
26097      (function() {
26098        function System2() {
26099        }
26100        System2.__static_initialize = function() {
26101          if (!System2.__static_initialized) {
26102            System2.__static_initialized = true;
26103            System2.__static_initializer_0();
26104          }
26105        };
26106        System2.ENVIRONMENT_IS_WEB_$LI$ = function() {
26107          System2.__static_initialize();
26108          if (System2.ENVIRONMENT_IS_WEB == null) {
26109            System2.ENVIRONMENT_IS_WEB = java2.util.Objects.equals(typeof window, "object");
26110          }
26111          return System2.ENVIRONMENT_IS_WEB;
26112        };
26113        System2.ENVIRONMENT_IS_WORKER_$LI$ = function() {
26114          System2.__static_initialize();
26115          if (System2.ENVIRONMENT_IS_WORKER == null) {
26116            System2.ENVIRONMENT_IS_WORKER = java2.util.Objects.equals(typeof importScripts, "function");
26117          }
26118          return System2.ENVIRONMENT_IS_WORKER;
26119        };
26120        System2.ENVIRONMENT_IS_NODE_$LI$ = function() {
26121          System2.__static_initialize();
26122          if (System2.ENVIRONMENT_IS_NODE == null) {
26123            System2.ENVIRONMENT_IS_NODE = !System2.ENVIRONMENT_IS_WEB_$LI$() && !System2.ENVIRONMENT_IS_WORKER_$LI$() && java2.util.Objects.equals((0, eval)("typeof process"), "object") && java2.util.Objects.equals((0, eval)("typeof require"), "function");
26124          }
26125          return System2.ENVIRONMENT_IS_NODE;
26126        };
26127        System2.ENVIRONMENT_IS_SHELL_$LI$ = function() {
26128          System2.__static_initialize();
26129          if (System2.ENVIRONMENT_IS_SHELL == null) {
26130            System2.ENVIRONMENT_IS_SHELL = !System2.ENVIRONMENT_IS_WEB_$LI$() && !System2.ENVIRONMENT_IS_WORKER_$LI$() && !System2.ENVIRONMENT_IS_NODE_$LI$();
26131          }
26132          return System2.ENVIRONMENT_IS_SHELL;
26133        };
26134        System2.propertyMap_$LI$ = function() {
26135          System2.__static_initialize();
26136          return System2.propertyMap;
26137        };
26138        System2.err_$LI$ = function() {
26139          System2.__static_initialize();
26140          return System2.err;
26141        };
26142        System2.out_$LI$ = function() {
26143          System2.__static_initialize();
26144          return System2.out;
26145        };
26146        System2.in_$LI$ = function() {
26147          System2.__static_initialize();
26148          return System2["in"];
26149        };
26150        System2.__static_initializer_0 = function() {
26151          System2.propertyMap = new java2.util.HashMap();
26152          System2.propertyMap_$LI$().put("java.vendor", "JSweet");
26153          System2.propertyMap_$LI$().put("java.vendor.url", "http://www.jsweet.org");
26154          System2.propertyMap_$LI$().put("java.version", "jsweet");
26155          var tmpDir = "";
26156          var lineSeparator = "\n";
26157          var fileSeparator = "/";
26158          var userHome = "";
26159          var userName = "";
26160          var osArch = "";
26161          if (System2.ENVIRONMENT_IS_WEB_$LI$()) {
26162            System2.propertyMap_$LI$().put("os.name", "WEB");
26163            System2.propertyMap_$LI$().put("os.version", navigator.userAgent);
26164            var pathname = document.location.pathname;
26165            System2.propertyMap_$LI$().put("user.dir", pathname.substring(0, pathname.lastIndexOf("/")));
26166          } else if (System2.ENVIRONMENT_IS_WORKER_$LI$()) {
26167            System2.propertyMap_$LI$().put("os.name", "WEB-WORKER");
26168            System2.propertyMap_$LI$().put("os.version", navigator.userAgent);
26169            var pathname = "/";
26170            System2.propertyMap_$LI$().put("user.dir", pathname.substring(0, pathname.lastIndexOf("/")));
26171          } else if (System2.ENVIRONMENT_IS_NODE_$LI$()) {
26172            var os = (0, eval)('global.os || (global.os = require("os"))');
26173            var path = (0, eval)('global.path || (global.path = require("path"))');
26174            System2.propertyMap_$LI$().put("os.name", "NODE");
26175            System2.propertyMap_$LI$().put("os.version", (0, eval)("process.version"));
26176            System2.propertyMap_$LI$().put("user.dir", (0, eval)("process.cwd()"));
26177            tmpDir = os["tmpdir"]();
26178            lineSeparator = os["EOL"];
26179            fileSeparator = path["sep"];
26180            userHome = os["homedir"]();
26181            userName = os["userInfo"]()["username"];
26182            osArch = os["arch"]();
26183          } else {
26184            console = new Object();
26185            console["info"] = print;
26186            console["error"] = java2.util.Objects.equals((0, eval)("typeof printErr"), "undefined") ? print : (0, eval)("printErr");
26187            System2.propertyMap_$LI$().put("os.name", "SHELL");
26188            var runnerName = "UNKNOWN";
26189            var userDir = ".";
26190            if (java2.util.Objects.equals((0, eval)("typeof environment"), "object")) {
26191              runnerName = "RHINO";
26192              userDir = (0, eval)('environment["user.dir"]');
26193              lineSeparator = (0, eval)('environment["line.separator"]');
26194              fileSeparator = (0, eval)('environment["file.separator"]');
26195              userHome = (0, eval)('environment["user.name"]');
26196              userName = (0, eval)('environment["user.home"]');
26197              osArch = (0, eval)('environment["os.arch"]');
26198            } else if (java2.util.Objects.equals((0, eval)("typeof jscOptions"), "function")) {
26199              runnerName = "JSC";
26200            }
26201            System2.propertyMap_$LI$().put("os.version", runnerName);
26202            System2.propertyMap_$LI$().put("user.dir", userDir);
26203          }
26204          System2.propertyMap_$LI$().put("java.io.tmpdir", tmpDir);
26205          System2.propertyMap_$LI$().put("line.separator", lineSeparator);
26206          System2.propertyMap_$LI$().put("file.separator", fileSeparator);
26207          System2.propertyMap_$LI$().put("user.home", userHome);
26208          System2.propertyMap_$LI$().put("user.name", userName);
26209          System2.propertyMap_$LI$().put("os.arch", osArch);
26210          System2.out = new java2.io.PrintStream(new System2.System$0());
26211          System2.err = new java2.io.PrintStream(new System2.System$1());
26212          System2["in"] = new System2.System$2();
26213        };
26214        System2.arraycopy = function(src, srcOfs, dest, destOfs, len) {
26215          javaemul.internal.InternalPreconditions.checkNotNull(src, "src");
26216          javaemul.internal.InternalPreconditions.checkNotNull(dest, "dest");
26217          var srclen = javaemul.internal.ArrayHelper.getLength(src);
26218          var destlen = javaemul.internal.ArrayHelper.getLength(dest);
26219          if (srcOfs < 0 || destOfs < 0 || len < 0 || srcOfs + len > srclen || destOfs + len > destlen) {
26220            throw new java2.lang.IndexOutOfBoundsException();
26221          }
26222          if (len > 0) {
26223            javaemul.internal.ArrayHelper.copy$java_lang_Object$int$java_lang_Object$int$int(src, srcOfs, dest, destOfs, len);
26224          }
26225        };
26226        System2.currentTimeMillis = function() {
26227          return (function(n) {
26228            return n < 0 ? Math.ceil(n) : Math.floor(n);
26229          })(javaemul.internal.DateUtil.now());
26230        };
26231        System2.gc = function() {
26232          (function() {
26233            var gcFun = (0, eval)("this.gc");
26234            if (java2.util.Objects.equals(typeof gcFun, "function")) {
26235              gcFun();
26236            }
26237          }).apply(null);
26238        };
26239        System2.getProperty$java_lang_String = function(key) {
26240          return System2.propertyMap_$LI$() == null ? null : System2.propertyMap_$LI$().get(key);
26241        };
26242        System2.getProperty$java_lang_String$java_lang_String = function(key, def) {
26243          var prop = System2.getProperty$java_lang_String(key);
26244          return prop == null ? def : prop;
26245        };
26246        System2.getProperty = function(key, def) {
26247          if ((typeof key === "string" || key === null) && (typeof def === "string" || def === null)) {
26248            return java2.lang.System.getProperty$java_lang_String$java_lang_String(key, def);
26249          } else if ((typeof key === "string" || key === null) && def === void 0) {
26250            return java2.lang.System.getProperty$java_lang_String(key);
26251          } else
26252            throw new Error("invalid overload");
26253        };
26254        System2.identityHashCode = function(o) {
26255          return javaemul.internal.HashCodes.getIdentityHashCode(o);
26256        };
26257        System2.setErr = function(err) {
26258          java2.lang.System.err = err;
26259        };
26260        System2.setOut = function(out) {
26261          java2.lang.System.out = out;
26262        };
26263        System2.lineSeparator = function() {
26264          return System2.getProperty$java_lang_String("line.separator");
26265        };
26266        System2.exit = function(status) {
26267          if (System2.ENVIRONMENT_IS_NODE_$LI$()) {
26268            (0, eval)("process.exit(" + status + ")");
26269          } else if (System2.ENVIRONMENT_IS_WEB_$LI$()) {
26270            window.close();
26271          } else if (System2.ENVIRONMENT_IS_WORKER_$LI$()) {
26272            self.close();
26273          } else {
26274            if (java2.util.Objects.equals(typeof (0, eval)("quit"), "function")) {
26275              (0, eval)("quit(" + status + ")");
26276            }
26277            if (java2.util.Objects.equals(typeof (0, eval)("exit"), "function")) {
26278              (0, eval)("exit(" + status + ")");
26279            }
26280          }
26281        };
26282        System2.__static_initialized = false;
26283        return System2;
26284      })()
26285    );
26286    lang2.System = System;
26287    System["__class"] = "java.lang.System";
26288    (function(System2) {
26289      var System$0 = (
26290        /** @class */
26291        (function(_super) {
26292          __extends(System$02, _super);
26293          function System$02() {
26294            var _this = _super.call(this) || this;
26295            _this.sep = java2.lang.System.propertyMap_$LI$().get("line.separator");
26296            _this.toOut = "";
26297            return _this;
26298          }
26299          System$02.prototype.write = function(buffer, offset, count) {
26300            if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && (typeof offset === "number" || offset === null) && (typeof count === "number" || count === null)) {
26301              _super.prototype.write.call(this, buffer, offset, count);
26302            } else if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && offset === void 0 && count === void 0) {
26303              return this.write$byte_A(buffer);
26304            } else if ((typeof buffer === "number" || buffer === null) && offset === void 0 && count === void 0) {
26305              return this.write$int(buffer);
26306            } else
26307              throw new Error("invalid overload");
26308          };
26309          System$02.prototype.write$int = function(i) {
26310            this.toOut += String.fromCharCode(i);
26311            if (
26312              /* endsWith */
26313              (function(str, searchString) {
26314                var pos = str.length - searchString.length;
26315                var lastIndex = str.indexOf(searchString, pos);
26316                return lastIndex !== -1 && lastIndex === pos;
26317              })(this.toOut, this.sep)
26318            ) {
26319              this.flush();
26320            }
26321          };
26322          System$02.prototype.flush = function() {
26323            _super.prototype.flush.call(this);
26324            if (!(this.toOut.length === 0)) {
26325              if (
26326                /* endsWith */
26327                (function(str, searchString) {
26328                  var pos = str.length - searchString.length;
26329                  var lastIndex = str.indexOf(searchString, pos);
26330                  return lastIndex !== -1 && lastIndex === pos;
26331                })(this.toOut, this.sep)
26332              ) {
26333                this.toOut = this.toOut.substring(0, this.toOut.length - this.sep.length);
26334              }
26335              console.info(this.toOut);
26336              this.toOut = "";
26337            }
26338          };
26339          return System$02;
26340        })(java2.io.OutputStream)
26341      );
26342      System2.System$0 = System$0;
26343      System$0["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable", "java.io.Flushable"];
26344      var System$1 = (
26345        /** @class */
26346        (function(_super) {
26347          __extends(System$12, _super);
26348          function System$12() {
26349            var _this = _super.call(this) || this;
26350            _this.sep = java2.lang.System.propertyMap_$LI$().get("line.separator");
26351            _this.toOut = "";
26352            return _this;
26353          }
26354          System$12.prototype.write = function(buffer, offset, count) {
26355            if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "
26355number") || buffer === null) && (typeof offset === "number" || offset === null) && (typeof count === "number" || count === null)) {
26356              _super.prototype.write.call(this, buffer, offset, count);
26357            } else if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && offset === void 0 && count === void 0) {
26358              return this.write$byte_A(buffer);
26359            } else if ((typeof buffer === "number" || buffer === null) && offset === void 0 && count === void 0) {
26360              return this.write$int(buffer);
26361            } else
26362              throw new Error("invalid overload");
26363          };
26364          System$12.prototype.write$int = function(i) {
26365            this.toOut += String.fromCharCode(i);
26366            if (
26367              /* endsWith */
26368              (function(str, searchString) {
26369                var pos = str.length - searchString.length;
26370                var lastIndex = str.indexOf(searchString, pos);
26371                return lastIndex !== -1 && lastIndex === pos;
26372              })(this.toOut, this.sep)
26373            ) {
26374              this.flush();
26375            }
26376          };
26377          System$12.prototype.flush = function() {
26378            _super.prototype.flush.call(this);
26379            if (!(this.toOut.length === 0)) {
26380              if (
26381                /* endsWith */
26382                (function(str, searchString) {
26383                  var pos = str.length - searchString.length;
26384                  var lastIndex = str.indexOf(searchString, pos);
26385                  return lastIndex !== -1 && lastIndex === pos;
26386                })(this.toOut, this.sep)
26387              ) {
26388                this.toOut = this.toOut.substring(0, this.toOut.length - this.sep.length);
26389              }
26390              console.error(this.toOut);
26391              this.toOut = "";
26392            }
26393          };
26394          return System$12;
26395        })(java2.io.OutputStream)
26396      );
26397      System2.System$1 = System$1;
26398      System$1["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable", "java.io.Flushable"];
26399      var System$2 = (
26400        /** @class */
26401        (function(_super) {
26402          __extends(System$22, _super);
26403          function System$22() {
26404            var _this = _super.call(this) || this;
26405            if (_this.readData === void 0) {
26406              _this.readData = null;
26407            }
26408            _this.where = 0;
26409            _this.sep = java2.lang.System.propertyMap_$LI$().get("line.separator");
26410            _this.readerFunction = function() {
26411              var result = null;
26412              if (java2.lang.System.ENVIRONMENT_IS_NODE_$LI$()) {
26413                var fs = (0, eval)('global.fs || (global.fs = require("fs"))');
26414                var BUFSIZE = 256;
26415                var buf = new ((0, eval)("Buffer"))(BUFSIZE);
26416                var fd = (0, eval)("process.stdin.fd");
26417                var usingDevice = false;
26418                try {
26419                  fd = fs["openSync"]("/dev/stdin", "r");
26420                  usingDevice = true;
26421                } catch (ignored) {
26422                }
26423                var bytesRead = 0;
26424                try {
26425                  bytesRead = fs["readSync"](fd, buf, 0, BUFSIZE, null);
26426                } catch (e) {
26427                  if (e.toString().indexOf("EOF") === -1)
26428                    throw e;
26429                }
26430                if (usingDevice)
26431                  fs["closeSync"](fd);
26432                if (bytesRead > 0)
26433                  result = buf.slice(0, bytesRead).toString();
26434              } else if (java2.lang.System.ENVIRONMENT_IS_WEB_$LI$() || java2.lang.System.ENVIRONMENT_IS_WORKER_$LI$()) {
26435                if (java2.util.Objects.equals(typeof window["prompt"], "function")) {
26436                  result = window.prompt("Input: ");
26437                  if (result != null) {
26438                    result += _this.sep;
26439                  }
26440                }
26441              } else if (java2.util.Objects.equals(typeof (0, eval)("readline"), "function")) {
26442                result = (0, eval)("readline()");
26443                if (result != null) {
26444                  result += _this.sep;
26445                }
26446              }
26447              return result;
26448            };
26449            return _this;
26450          }
26451          System$22.prototype.read = function(buffer, byteOffset, byteCount) {
26452            if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "
26452number") || buffer === null) && (typeof byteOffset === "number" || byteOffset === null) && (typeof byteCount === "number" || byteCount === null)) {
26453              return _super.prototype.read.call(this, buffer, byteOffset, byteCount);
26454            } else if ((buffer != null && buffer instanceof Array && (buffer.length == 0 || buffer[0] == null || typeof buffer[0] === "number") || buffer === null) && byteOffset === void 0 && byteCount === void 0) {
26455              return this.read$byte_A(buffer);
26456            } else if (buffer === void 0 && byteOffset === void 0 && byteCount === void 0) {
26457              return this.read$();
26458            } else
26459              throw new Error("invalid overload");
26460          };
26461          System$22.prototype.read$ = function() {
26462            if (this.readData == null) {
26463              this.readData = /* toCharArray */
26464              (function(target) {
26465                return typeof target === "function" ? target() : target.get();
26466              })(this.readerFunction).split("");
26467              this.where = 0;
26468            } else {
26469              ++this.where;
26470            }
26471            if (this.where === this.readData.length) {
26472              this.readData = null;
26473              this.where = 0;
26474              return -1;
26475            }
26476            return this.readData[this.where].charCodeAt(0);
26477          };
26478          return System$22;
26479        })(java2.io.InputStream)
26480      );
26481      System2.System$2 = System$2;
26482      System$2["__interfaces"] = ["java.io.Closeable", "java.lang.AutoCloseable"];
26483    })(System = lang2.System || (lang2.System = {}));
26484  })(lang = java2.lang || (java2.lang = {}));
26485})(java || (java = {}));
26486(function(javaemul13) {
26487  var internal;
26488  (function(internal2) {
26489    var InternalPreconditions = (
26490      /** @class */
26491      (function() {
26492        function InternalPreconditions2() {
26493        }
26494        InternalPreconditions2.CHECKED_MODE_$LI$ = function() {
26495          if (InternalPreconditions2.CHECKED_MODE == null) {
26496            InternalPreconditions2.CHECKED_MODE = java.lang.System.getProperty("jre.checkedMode", "ENABLED") === "ENABLED";
26497          }
26498          return InternalPreconditions2.CHECKED_MODE;
26499        };
26500        InternalPreconditions2.TYPE_CHECK_$LI$ = function() {
26501          if (InternalPreconditions2.TYPE_CHECK == null) {
26502            InternalPreconditions2.TYPE_CHECK = java.lang.System.getProperty("jre.checks.type", "ENABLED") === "ENABLED";
26503          }
26504          return InternalPreconditions2.TYPE_CHECK;
26505        };
26506        InternalPreconditions2.API_CHECK_$LI$ = function() {
26507          if (InternalPreconditions2.API_CHECK == null) {
26508            InternalPreconditions2.API_CHECK = java.lang.System.getProperty("jre.checks.api", "ENABLED") === "ENABLED";
26509          }
26510          return InternalPreconditions2.API_CHECK;
26511        };
26512        InternalPreconditions2.BOUND_CHECK_$LI$ = function() {
26513          if (InternalPreconditions2.BOUND_CHECK == null) {
26514            InternalPreconditions2.BOUND_CHECK = java.lang.System.getProperty("jre.checks.bounds", "ENABLED") === "ENABLED";
26515          }
26516          return InternalPreconditions2.BOUND_CHECK;
26517        };
26518        InternalPreconditions2.checkType = function(expression) {
26519          if (InternalPreconditions2.TYPE_CHECK_$LI$()) {
26520            InternalPreconditions2.checkCriticalType(expression);
26521          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26522            try {
26523              InternalPreconditions2.checkCriticalType(expression);
26524            } catch (e) {
26525              throw new java.lang.AssertionError(e);
26526            }
26527          }
26528        };
26529        InternalPreconditions2.checkCriticalType = function(expression) {
26530          if (!expression) {
26531            throw new java.lang.ClassCastException();
26532          }
26533        };
26534        InternalPreconditions2.checkArrayType$boolean = function(expression) {
26535          if (InternalPreconditions2.TYPE_CHECK_$LI$()) {
26536            InternalPreconditions2.checkCriticalArrayType$boolean(expression);
26537          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26538            try {
26539              InternalPreconditions2.checkCriticalArrayType$boolean(expression);
26540            } catch (e) {
26541              throw new java.lang.AssertionError(e);
26542            }
26543          }
26544        };
26545        InternalPreconditions2.checkCriticalArrayType$boolean = function(expression) {
26546          if (!expression) {
26547            throw new java.lang.ArrayStoreException();
26548          }
26549        };
26550        InternalPreconditions2.checkArrayType$boolean$java_lang_Object = function(expression, errorMessage) {
26551          if (InternalPreconditions2.TYPE_CHECK_$LI$()) {
26552            InternalPreconditions2.checkCriticalArrayType$boolean$java_lang_Object(expression, errorMessage);
26553          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26554            try {
26555              InternalPreconditions2.checkCriticalArrayType$boolean$java_lang_Object(expression, errorMessage);
26556            } catch (e) {
26557              throw new java.lang.AssertionError(e);
26558            }
26559          }
26560        };
26561        InternalPreconditions2.checkArrayType = function(expression, errorMessage) {
26562          if ((typeof expression === "boolean" || expression === null) && (errorMessage != null || errorMessage === null)) {
26563            return javaemul13.internal.InternalPreconditions.checkArrayType$boolean$java_lang_Object(expression, errorMessage);
26564          } else if ((typeof expression === "boolean" || expression === null) && errorMessage === void 0) {
26565            return javaemul13.internal.InternalPreconditions.checkArrayType$boolean(expression);
26566          } else
26567            throw new Error("invalid overload");
26568        };
26569        InternalPreconditions2.checkCriticalArrayType$boolean$java_lang_Object = function(expression, errorMessage) {
26570          if (!expression) {
26571            throw new java.lang.ArrayStoreException(
26572              /* valueOf */
26573              String(errorMessage).toString()
26574            );
26575          }
26576        };
26577        InternalPreconditions2.checkCriticalArrayType = function(expression, errorMessage) {
26578          if ((typeof expression === "boolean" || expression === null) && (errorMessage != null || errorMessage === null)) {
26579            return javaemul13.internal.InternalPreconditions.checkCriticalArrayType$boolean$java_lang_Object(expression, errorMessage);
26580          } else if ((typeof expression === "boolean" || expression === null) && errorMessage === void 0) {
26581            return javaemul13.internal.InternalPreconditions.checkCriticalArrayType$boolean(expression);
26582          } else
26583            throw new Error("invalid overload");
26584        };
26585        InternalPreconditions2.checkElement$boolean = function(expression) {
26586          if (InternalPreconditions2.API_CHECK_$LI$()) {
26587            InternalPreconditions2.checkCriticalElement$boolean(expression);
26588          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26589            try {
26590              InternalPreconditions2.checkCriticalElement$boolean(expression);
26591            } catch (e) {
26592              throw new java.lang.AssertionError(e);
26593            }
26594          }
26595        };
26596        InternalPreconditions2.checkCriticalElement$boolean = function(expression) {
26597          if (!expression) {
26598            throw new java.util.NoSuchElementException();
26599          }
26600        };
26601        InternalPreconditions2.checkElement$boolean$java_lang_Object = function(expression, errorMessage) {
26602          if (InternalPreconditions2.API_CHECK_$LI$()) {
26603            InternalPreconditions2.checkCriticalElement$boolean$java_lang_Object(expression, errorMessage);
26604          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26605            try {
26606              InternalPreconditions2.checkCriticalElement$boolean$java_lang_Object(expression, errorMessage);
26607            } catch (e) {
26608              throw new java.lang.AssertionError(e);
26609            }
26610          }
26611        };
26612        InternalPreconditions2.checkElement = function(expression, errorMessage) {
26613          if ((typeof expression === "boolean" || expression === null) && (errorMessage != null || errorMessage === null)) {
26614            return javaemul13.internal.InternalPreconditions.checkElement$boolean$java_lang_Object(expression, errorMessage);
26615          } else if ((typeof expression === "boolean" || expression === null) && errorMessage === void 0) {
26616            return javaemul13.internal.InternalPreconditions.checkElement$boolean(expression);
26617          } else
26618            throw new Error("invalid overload");
26619        };
26620        InternalPreconditions2.checkCriticalElement$boolean$java_lang_Object = function(expression, errorMessage) {
26621          if (!expression) {
26622            throw new java.util.NoSuchElementException(
26623              /* valueOf */
26624              String(errorMessage).toString()
26625            );
26626          }
26627        };
26628        InternalPreconditions2.checkCriticalElement = function(expression, errorMessage) {
26629          if ((typeof expression === "boolean" || expression === null) && (errorMessage != null || errorMessage === null)) {
26630            return javaemul13.internal.InternalPreconditions.checkCriticalElement$boolean$java_lang_Object(expression, errorMessage);
26631          } else if ((typeof expression === "boolean" || expression === null) && errorMessage === void 0) {
26632            return javaemul13.internal.InternalPreconditions.checkCriticalElement$boolean(expression);
26633          } else
26634            throw new Error("invalid overload");
26635        };
26636        InternalPreconditions2.checkArgument$boolean = function(expression) {
26637          if (InternalPreconditions2.API_CHECK_$LI$()) {
26638            InternalPreconditions2.checkCriticalArgument$boolean(expression);
26639          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26640            try {
26641              InternalPreconditions2.checkCriticalArgument$boolean(expression);
26642            } catch (e) {
26643              throw new java.lang.AssertionError(e);
26644            }
26645          }
26646        };
26647        InternalPreconditions2.checkCriticalArgument$boolean = function(expression) {
26648          if (!expression) {
26649            throw new java.lang.IllegalArgumentException();
26650          }
26651        };
26652        InternalPreconditions2.checkArgument$boolean$java_lang_Object = function(expression, errorMessage) {
26653          if (InternalPreconditions2.API_CHECK_$LI$()) {
26654            InternalPreconditions2.checkCriticalArgument$boolean$java_lang_Object(expression, errorMessage);
26655          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26656            try {
26657              InternalPreconditions2.checkCriticalArgument$boolean$java_lang_Object(expression, errorMessage);
26658            } catch (e) {
26659              throw new java.lang.AssertionError(e);
26660            }
26661          }
26662        };
26663        InternalPreconditions2.checkCriticalArgument$boolean$java_lang_Object = function(expression, errorMessage) {
26664          if (!expression) {
26665            throw new java.lang.IllegalArgumentException(
26666              /* valueOf */
26667              String(errorMessage).toString()
26668            );
26669          }
26670        };
26671        InternalPreconditions2.checkArgument$boolean$java_lang_String$java_lang_Object_A = function(expression, errorMessageTemplate) {
26672          var errorMessageArgs = [];
26673          for (var _i = 2; _i < arguments.length; _i++) {
26674            errorMessageArgs[_i - 2] = arguments[_i];
26675          }
26676          if (InternalPreconditions2.API_CHECK_$LI$()) {
26677            InternalPreconditions2.checkCriticalArgument$boolean$java_lang_String$java_lang_Object_A.a
26677pply(this, [expression, errorMessageTemplate].concat(errorMessageArgs));
26678          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26679            try {
26680              InternalPreconditions2.checkCriticalArgument$boolean$java_lang_String$java_lang_Object_A.apply(this, [expression, errorMessageTemplate].concat(errorMessageArgs));
26681            } catch (e) {
26682              throw new java.lang.AssertionError(e);
26683            }
26684          }
26685        };
26686        InternalPreconditions2.checkArgument = function(expression, errorMessageTemplate) {
26687          var _a;
26688          var errorMessageArgs = [];
26689          for (var _i = 2; _i < arguments.length; _i++) {
26690            errorMessageArgs[_i - 2] = arguments[_i];
26691          }
26692          if ((typeof expression === "boolean" || expression === null) && (typeof errorMessageTemplate === "string" || errorMessageTemplate === null) && (errorMessageArgs != null && errorMessageArgs instanceof Array && (errorMessageArgs.length == 0 || errorMessageArgs[0] == null || errorMessageArgs[0] != null) || errorMessageArgs === null)) {
26693            return (_a = javaemul13.internal.InternalPreconditions).checkArgument$boolean$java_lang_String$java_lang_Object_A.apply(_a, __spreadArrays([expression, errorMessageTemplate], errorMessageArgs));
26694          } else if ((typeof expression === "boolean" || expression === null) && (errorMessageTemplate != null || errorMessageTemplate === null) && errorMessageArgs === void 0 || errorMessageArgs.length === 0) {
26695            return javaemul13.internal.InternalPreconditions.checkArgument$boolean$java_lang_Object(expression, errorMessageTemplate);
26696          } else if ((typeof expression === "boolean" || expression === null) && errorMessageTemplate === void 0 && errorMessageArgs === void 0 || errorMessageArgs.length === 0) {
26697            return javaemul13.internal.InternalPreconditions.checkArgument$boolean(expression);
26698          } else
26699            throw new Error("invalid overload");
26700        };
26701        InternalPreconditions2.checkCriticalArgument$boolean$java_lang_String$java_lang_Object_A = function(expression, errorMessageTemplate) {
26702          var errorMessageArgs = [];
26703          for (var _i = 2; _i < arguments.length; _i++) {
26704            errorMessageArgs[_i - 2] = arguments[_i];
26705          }
26706          if (!expression) {
26707            throw new java.lang.IllegalArgumentException(InternalPreconditions2.format.apply(this, [errorMessageTemplate].concat(errorMessageArgs)));
26708          }
26709        };
26710        InternalPreconditions2.checkCriticalArgument = function(expression, errorMessageTemplate) {
26711          var _a;
26712          var errorMessageArgs = [];
26713          for (var _i = 2; _i < arguments.length; _i++) {
26714            errorMessageArgs[_i - 2] = arguments[_i];
26715          }
26716          if ((typeof expression === "boolean" || expression === null) && (typeof errorMessageTemplate === "string" || errorMessageTemplate === null) && (errorMessageArgs != null && errorMessageArgs instanceof Array && (errorMessageArgs.length == 0 || errorMessageArgs[0] == null || errorMessageArgs[0] != null) || errorMessageArgs === null)) {
26717            return (_a = javaemul13.internal.InternalPreconditions).checkCriticalArgument$boolean$java_lang_String$java_lang_Object_A.apply(_a, __spreadArrays([expression, errorMessageTemplate], errorMessageArgs));
26718          } else if ((typeof expression === "boolean" || expression === null) && (errorMessageTemplate != null || errorMessageTemplate === null) && errorMessageArgs === void 0 || errorMessageArgs.length === 0) {
26719            return javaemul13.internal.InternalPreconditions.checkCriticalArgument$boolean$java_lang_Object(expression, errorMessageTemplate);
26720          } else if ((typeof expression === "boolean" || expression === null) && errorMessageTemplate === void 0 && errorMessageArgs === void 0 || errorMessageArgs.length === 0) {
26721            return javaemul13.internal.InternalPreconditions.checkCriticalArgument$boolean(expression);
26722          } else
26723            throw new Error("invalid overload");
26724        };
26725        InternalPreconditions2.checkState$boolean = function(expression) {
26726          if (InternalPreconditions2.API_CHECK_$LI$()) {
26727            InternalPreconditions2.checkCritcalState(expression);
26728          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26729            try {
26730              InternalPreconditions2.checkCritcalState(expression);
26731            } catch (e) {
26732              throw new java.lang.AssertionError(e);
26733            }
26734          }
26735        };
26736        InternalPreconditions2.checkCritcalState = function(expression) {
26737          if (!expression) {
26738            throw new java.lang.IllegalStateException();
26739          }
26740        };
26741        InternalPreconditions2.checkState$boolean$java_lang_Object = function(expression, errorMessage) {
26742          if (InternalPreconditions2.API_CHECK_$LI$()) {
26743            InternalPreconditions2.checkCriticalState(expression, errorMessage);
26744          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26745            try {
26746              InternalPreconditions2.checkCriticalState(expression, errorMessage);
26747            } catch (e) {
26748              throw new java.lang.AssertionError(e);
26749            }
26750          }
26751        };
26752        InternalPreconditions2.checkState = function(expression, errorMessage) {
26753          if ((typeof expression === "boolean" || expression === null) && (errorMessage != null || errorMessage === null)) {
26754            return javaemul13.internal.InternalPreconditions.checkState$boolean$java_lang_Object(expression, errorMessage);
26755          } else if ((typeof expression === "boolean" || expression === null) && errorMessage === void 0) {
26756            return javaemul13.internal.InternalPreconditions.checkState$boolean(expression);
26757          } else
26758            throw new Error("invalid overload");
26759        };
26760        InternalPreconditions2.checkCriticalState = function(expression, errorMessage) {
26761          if (!expression) {
26762            throw new java.lang.IllegalStateException(
26763              /* valueOf */
26764              String(errorMessage).toString()
26765            );
26766          }
26767        };
26768        InternalPreconditions2.checkNotNull$java_lang_Object = function(reference) {
26769          if (InternalPreconditions2.API_CHECK_$LI$()) {
26770            InternalPreconditions2.checkCriticalNotNull(reference);
26771          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26772            try {
26773              InternalPreconditions2.checkCriticalNotNull(reference);
26774            } catch (e) {
26775              throw new java.lang.AssertionError(e);
26776            }
26777          }
26778          return reference;
26779        };
26780        InternalPreconditions2.checkCriticalNotNull$java_lang_Object = function(reference) {
26781          if (reference == null) {
26782            throw new java.lang.NullPointerException();
26783          }
26784          return reference;
26785        };
26786        InternalPreconditions2.checkNotNull$java_lang_Object$java_lang_Object = function(reference, errorMessage) {
26787          if (InternalPreconditions2.API_CHECK_$LI$()) {
26788            InternalPreconditions2.checkCriticalNotNull$java_lang_Object$java_lang_Object(reference, errorMessage);
26789          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26790            try {
26791              InternalPreconditions2.checkCriticalNotNull$java_lang_Object$java_lang_Object(reference, errorMessage);
26792            } catch (e) {
26793              throw new java.lang.AssertionError(e);
26794            }
26795          }
26796        };
26797        InternalPreconditions2.checkNotNull = function(reference, errorMessage) {
26798          if ((reference != null || reference === null) && (errorMessage != null || errorMessage === null)) {
26799            return javaemul13.internal.InternalPreconditions.checkNotNull$java_lang_Object$java_lang_Object(reference, errorMessage);
26800          } else if ((reference != null || reference === null) && errorMessage === void 0) {
26801            return javaemul13.internal.InternalPreconditions.checkNotNull$java_lang_Object(reference);
26802          } else
26803            throw new Error("invalid overload");
26804        };
26805        InternalPreconditions2.checkCriticalNotNull$java_lang_Object$java_lang_Object = function(reference, errorMessage) {
26806          if (reference == null) {
26807            throw new java.lang.NullPointerException(
26808              /* valueOf */
26809              String(errorMessage).toString()
26810            );
26811          }
26812        };
26813        InternalPreconditions2.checkCriticalNotNull = function(reference, errorMessage) {
26814          if ((reference != null || reference === null) && (errorMessage != null || errorMessage === null)) {
26815            return javaemul13.internal.InternalPreconditions.checkCriticalNotNull$java_lang_Object$java_lang_Object(reference, errorMessage);
26816          } else if ((reference != null || reference === null) && errorMessage === void 0) {
26817            return javaemul13.internal.InternalPreconditions.checkCriticalNotNull$java_lang_Object(reference);
26818          } else
26819            throw new Error("invalid overload");
26820        };
26821        InternalPreconditions2.checkArraySize = function(size) {
26822          if (InternalPreconditions2.API_CHECK_$LI$()) {
26823            InternalPreconditions2.checkCriticalArraySize(size);
26824          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26825            try {
26826              InternalPreconditions2.checkCriticalArraySize(size);
26827            } catch (e) {
26828              throw new java.lang.AssertionError(e);
26829            }
26830          }
26831        };
26832        InternalPreconditions2.checkCriticalArraySize = function(size) {
26833          if (size < 0) {
26834            throw new java.lang.NegativeArraySizeException("Negative array size: " + size);
26835          }
26836        };
26837        InternalPreconditions2.checkElementIndex = function(index, size) {
26838          if (InternalPreconditions2.BOUND_CHECK_$LI$()) {
26839            InternalPreconditions2.checkCriticalElementIndex(index, size);
26840          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26841            try {
26842              InternalPreconditions2.checkCriticalElementIndex(index, size);
26843            } catch (e) {
26844              throw new java.lang.AssertionError(e);
26845            }
26846          }
26847        };
26848        InternalPreconditions2.checkCriticalElementIndex = function(index, size) {
26849          if (index < 0 || index >= size) {
26850            throw new java.lang.IndexOutOfBoundsException("Index: " + index + ", Size: " + size);
26851          }
26852        };
26853        InternalPreconditions2.checkPositionIndex = function(index, size) {
26854          if (InternalPreconditions2.BOUND_CHECK_$LI$()) {
26855            InternalPreconditions2.checkCriticalPositionIndex(index, size);
26856          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26857            try {
26858              InternalPreconditions2.checkCriticalPositionIndex(index, size);
26859            } catch (e) {
26860              throw new java.lang.AssertionError(e);
26861            }
26862          }
26863        };
26864        InternalPreconditions2.checkCriticalPositionIndex = function(index, size) {
26865          if (index < 0 || index > size) {
26866            throw new java.lang.IndexOutOfBoundsException("Index: " + index + ", Size: " + size);
26867          }
26868        };
26869        InternalPreconditions2.checkPositionIndexes = function(start, end, size) {
26870          if (InternalPreconditions2.BOUND_CHECK_$LI$()) {
26871            InternalPreconditions2.checkCriticalPositionIndexes(start, end, size);
26872          } else if (InternalPreconditions2.CHECKED_MODE_$LI$()) {
26873            try {
26874              InternalPreconditions2.checkCriticalPositionIndexes(start, end, size);
26875            } catch (e) {
26876              throw new java.lang.AssertionError(e);
26877            }
26878          }
26879        };
26880        InternalPreconditions2.checkCriticalPositionIndexes = function(start, end, size) {
26881          if (start < 0) {
26882            throw new java.lang.IndexOutOfBoundsException("fromIndex: " + start + " < 0");
26883          }
26884          if (end > size) {
26885            throw new java.lang.IndexOutOfBoundsException("toIndex: " + end + " > size " + size);
26886          }
26887          if (start > end) {
26888            throw new java.lang.IllegalArgumentException("fromIndex: " + start + " > toIndex: " + end);
26889          }
26890        };
26891        InternalPreconditions2.checkStringBounds = function(start, end, size) {
26892          if (start < 0) {
26893            throw new java.lang.StringIndexOutOfBoundsException("fromIndex: " + start + " < 0");
26894          }
26895          if (end > size) {
26896            throw new java.lang.StringIndexOutOfBoundsException("toIndex: " + end + " > size " + size);
26897          }
26898          if (end < start) {
26899            throw new java.lang.StringIndexOutOfBoundsException("fromIndex: " + start + " > toIndex: " + end);
26900          }
26901        };
26902        InternalPreconditions2.format = function(template) {
26903          var args = [];
26904          for (var _i = 1; _i < arguments.length; _i++) {
26905            args[_i - 1] = arguments[_i];
26906          }
26907          template = /* valueOf */
26908          String(template).toString();
26909          var builder = new java.lang.StringBuilder(template.length + 16 * args.length);
26910          var templateStart = 0;
26911          var i = 0;
26912          while (i < args.length) {
26913            {
26914              var placeholderStart = template.indexOf("%s", templateStart);
26915              if (placeholderStart === -1) {
26916                break;
26917              }
26918              builder.append$java_lang_String(template.substring(templateStart, placeholderStart));
26919              builder.append$java_lang_Object(args[i++]);
26920              templateStart = placeholderStart + 2;
26921            }
26922          }
26923          ;
26924          builder.append$java_lang_String(template.substring(templateStart));
26925          if (i < args.length) {
26926            builder.append$java_lang_String(" [");
26927            builder.append$java_lang_Object(args[i++]);
26928            while (i < args.length) {
26929              {
26930                builder.append$java_lang_String(", ");
26931                builder.append$java_lang_Object(args[i++]);
26932              }
26933            }
26934            ;
26935            builder.append$char("]");
26936          }
26937          return builder.toString();
26938        };
26939        return InternalPreconditions2;
26940      })()
26941    );
26942    internal2.InternalPreconditions = InternalPreconditions;
26943    InternalPreconditions["__class"] = "javaemul.internal.InternalPreconditions";
26944  })(internal = javaemul13.internal || (javaemul13.internal = {}));
26945})(javaemul || (javaemul = {}));
26946(function(java2) {
26947  var util;
26948  (function(util2) {
26949    var ConcurrentModificationDetector = (
26950      /** @class */
26951      (function() {
26952        function ConcurrentModificationDetector2() {
26953        }
26954        ConcurrentModificationDetector2.API_CHECK_$LI$ = function() {
26955          if (ConcurrentModificationDetector2.API_CHECK == null) {
26956            ConcurrentModificationDetector2.API_CHECK = java2.lang.System.getProperty("jre.checks.api", "ENABLED") === "ENABLED";
26957          }
26958          return ConcurrentModificationDetector2.API_CHECK;
26959        };
26960        ConcurrentModificationDetector2.structureChanged = function(map) {
26961          if (!ConcurrentModificationDetector2.API_CHECK_$LI$()) {
26962            return;
26963          }
26964          var modCount = javaemul.internal.JsUtils.getIntProperty(map, ConcurrentModificationDetector2.MOD_COUNT_PROPERTY) | 0;
26965          javaemul.internal.JsUtils.setIntProperty(map, ConcurrentModificationDetector2.MOD_COUNT_PROPERTY, modCount + 1);
26966        };
26967        ConcurrentModificationDetector2.recordLastKnownStructure = function(host, iterator) {
26968          if (!ConcurrentModificationDetector2.API_CHECK_$LI$()) {
26969            return;
26970          }
26971          var modCount = javaemul.internal.JsUtils.getIntProperty(host, ConcurrentModificationDetector2.MOD_COUNT_PROPERTY);
26972          javaemul.internal.JsUtils.setIntProperty(iterator, ConcurrentModificationDetector2.MOD_COUNT_PROPERTY, modCount);
26973        };
26974        ConcurrentModificationDetector2.checkStructuralChange = function(host, iterator) {
26975          if (!ConcurrentModificationDetector2.API_CHECK_$LI$()) {
26976            return;
26977          }
26978          if (javaemul.internal.JsUtils.getIntProperty(iterator, ConcurrentModificationDetector2.MOD_COUNT_PROPERTY) !== javaemul.internal.JsUtils.getIntProperty(host, ConcurrentModificationDetector2.MOD_COUNT_PROPERTY)) {
26979            throw new java2.util.ConcurrentModificationException();
26980          }
26981        };
26982        ConcurrentModificationDetector2.MOD_COUNT_PROPERTY = "_gwt_modCount";
26983        return ConcurrentModificationDetector2;
26984      })()
26985    );
26986    util2.ConcurrentModificationDetector = ConcurrentModificationDetector;
26987    ConcurrentModificationDetector["__class"] = "java.util.ConcurrentModificationDetector";
26988  })(util = java2.util || (java2.util = {}));
26989})(java || (java = {}));
26990(function(java2) {
26991  var util;
26992  (function(util2) {
26993    var logging;
26994    (function(logging2) {
26995      var Logger = (
26996        /** @class */
26997        (function() {
26998          function Logger2(name, resourceName) {
26999            if (this.handlers === void 0) {
27000              this.handlers = null;
27001            }
27002            this.level = null;
27003            if (this.name === void 0) {
27004              this.name = null;
27005            }
27006            if (this.parent === void 0) {
27007              this.parent = null;
27008            }
27009            if (this.useParentHandlers === void 0) {
27010              this.useParentHandlers = false;
27011            }
27012            if (Logger2.LOGGING_FALSE_$LI$()) {
27013              return;
27014            }
27015            this.name = name;
27016            this.useParentHandlers = true;
27017            this.handlers = new java2.util.ArrayList();
27018          }
27019          Logger2.__static_initialize = function() {
27020            if (!Logger2.__static_initialized) {
27021              Logger2.__static_initialized = true;
27022              Logger2.__static_initializer_0();
27023            }
27024          };
27025          Logger2.LOGGING_ENABLED_$LI$ = function() {
27026            Logger2.__static_initialize();
27027            if (Logger2.LOGGING_ENABLED == null) {
27028              Logger2.LOGGING_ENABLED = java2.lang.System.getProperty("gwt.logging.enabled", "TRUE");
27029            }
27030            return Logger2.LOGGING_ENABLED;
27031          };
27032          Logger2.LOGGING_WARNING_$LI$ = function() {
27033            Logger2.__static_initialize();
27034            if (Logger2.LOGGING_WARNING == null) {
27035              Logger2.LOGGING_WARNING = Logger2.LOGGING_ENABLED_$LI$() === "WARNING";
27036            }
27037            return Logger2.LOGGING_WARNING;
27038          };
27039          Logger2.LOGGING_SEVERE_$LI$ = function() {
27040            Logger2.__static_initialize();
27041            if (Logger2.LOGGING_SEVERE == null) {
27042              Logger2.LOGGING_SEVERE = Logger2.LOGGING_ENABLED_$LI$() === "SEVERE";
27043            }
27044            return Logger2.LOGGING_SEVERE;
27045          };
27046          Logger2.LOGGING_FALSE_$LI$ = function() {
27047            Logger2.__static_initialize();
27048            if (Logger2.LOGGING_FALSE == null) {
27049              Logger2.LOGGING_FALSE = Logger2.LOGGING_ENABLED_$LI$() === "FALSE";
27050            }
27051            return Logger2.LOGGING_FALSE;
27052          };
27053          Logger2.__static_initializer_0 = function() {
27054            Logger2.assertLoggingValues();
27055          };
27056          Logger2.getGlobal = function() {
27057            return Logger2.getLogger(Logger2.GLOBAL_LOGGER_NAME);
27058          };
27059          Logger2.getLogger = function(name) {
27060            if (Logger2.LOGGING_FALSE_$LI$()) {
27061              return new Logger2(name, null);
27062            }
27063            return java2.util.logging.LogManager.getLogManager().ensureLogger(name);
27064          };
27065          Logger2.assertLoggingValues = function() {
27066            if (Logger2.LOGGING_ENABLED_$LI$() === "FALSE" || Logger2.LOGGING_ENABLED_$LI$() === "TRUE" || Logger2.LOGGING_ENABLED_$LI$() === "SEVERE" || Logger2.LOGGING_ENABLED_$LI$() === "WARNING") {
27067              return;
27068            }
27069            throw new java2.lang.RuntimeException("Undefined value for gwt.logging.enabled: '" + Logger2.LOGGING_ENABLED_$LI$() + "'. Allowed values are TRUE, FALSE, SEVERE, WARNING");
27070          };
27071          Logger2.prototype.addHandler = function(handler) {
27072            if (Logger2.LOGGING_FALSE_$LI$()) {
27073              return;
27074            }
27075            this.handlers.add(handler);
27076          };
27077          Logger2.prototype.config = function(msg) {
27078            if (Logger2.LOGGING_FALSE_$LI$() || Logger2.LOGGING_SEVERE_$LI$() || Logger2.LOGGING_WARNING_$LI$()) {
27079              return;
27080            }
27081            this.log$java_util_logging_Level$java_lang_String(java2.util.logging.Level.CONFIG_$LI$(), msg);
27082          };
27083          Logger2.prototype.fine = function(msg) {
27084            if (Logger2.LOGGING_FALSE_$LI$() || Logger2.LOGGING_SEVERE_$LI$() || Logger2.LOGGING_WARNING_$LI$()) {
27085              return;
27086            }
27087            this.log$java_util_logging_Level$java_lang_String(java2.util.logging.Level.FINE_$LI$(), msg);
27088          };
27089          Logger2.prototype.finer = function(msg) {
27090            if (Logger2.LOGGING_FALSE_$LI$() || Logger2.LOGGING_SEVERE_$LI$() || Logger2.LOGGING_WARNING_$LI$()) {
27091              return;
27092            }
27093            this.log$java_util_logging_Level$java_lang_String(java2.util.logging.Level.FINER_$LI$(), msg);
27094          };
27095          Logger2.prototype.finest = function(msg) {
27096            if (Logger2.LOGGING_FALSE_$LI$() || Logger2.LOGGING_SEVERE_$LI$() || Logger2.LOGGING_WARNING_$LI$()) {
27097              return;
27098            }
27099            this.log$java_util_logging_Level$java_lang_String(java2.util.logging.Level.FINEST_$LI$(), msg);
27100          };
27101          Logger2.prototype.info = function(msg) {
27102            if (Logger2.LOGGING_FALSE_$LI$() || Logger2.LOGGING_SEVERE_$LI$() || Logger2.LOGGING_WARNING_$LI$()) {
27103              return;
27104            }
27105            this.log$java_util_logging_Level$java_lang_String(java2.util.logging.Level.INFO_$LI$(), msg);
27106          };
27107          Logger2.prototype.warning = function(msg) {
27108            if (Logger2.LOGGING_FALSE_$LI$() || Logger2.LOGGING_SEVERE_$LI$()) {
27109              return;
27110            }
27111            this.log$java_util_logging_Level$java_lang_String(java2.util.logging.Level.WARNING_$LI$(), msg);
27112          };
27113          Logger2.prototype.severe = function(msg) {
27114            if (Logger2.LOGGING_FALSE_$LI$()) {
27115              return;
27116            }
27117            this.log$java_util_logging_Level$java_lang_String(java2.util.logging.Level.SEVERE_$LI$(), msg);
27118          };
27119          Logger2.prototype.getHandlers = function() {
27120            if (Logger2.LOGGING_FALSE_$LI$()) {
27121              return [];
27122            }
27123            return this.handlers["toArray$java_lang_Object_A"]((function(s) {
27124              var a = [];
27125              while (s-- > 0)
27126                a.push(null);
27127              return a;
27128            })(this.handlers.size()));
27129          };
27130          Logger2.prototype.getLevel = function() {
27131            return Logger2.LOGGING_FALSE_$LI$() ? null : this.level;
27132          };
27133          Logger2.prototype.getName = function() {
27134            return Logger2.LOGGING_FALSE_$LI$() ? null : this.name;
27135          };
27136          Logger2.prototype.getParent = function() {
27137            return Logger2.LOGGING_FALSE_$LI$() ? null : this.parent;
27138          };
27139          Logger2.prototype.getUseParentHandlers = function() {
27140            return Logger2.LOGGING_FALSE_$LI$() ? false : this.useParentHandlers;
27141          };
27142          Logger2.prototype.isLoggable = function(messageLevel) {
27143            return Logger2.LOGGING_FALSE_$LI$() ? false : this.getEffectiveLevel().intValue() <= messageLevel.intValue();
27144          };
27145          Logger2.prototype.log$java_util_logging_Level$java_lang_String = function(level, msg) {
27146            this.log$java_util_logging_Level$java_lang_String$java_lang_Throwable(level, msg, null);
27147          };
27148          Logger2.prototype.log$java_util_logging_Level$java_lang_String$java_lang_Throwable = function(level, msg, thrown) {
27149            if (Logger2.LOGGING_FALSE_$LI$()) {
27150              return;
27151            }
27152            if (Logger2.LOGGING_SEVERE_$LI$()) {
27153              if (level.intValue() >= 1e3) {
27154                this.actuallyLog$java_util_logging_Level$java_lang_String$java_lang_Throwable(level, msg, thrown);
27155              }
27156            } else if (Logger2.LOGGING_WARNING_$LI$()) {
27157              if (level.intValue() >= java2.util.logging.Level.WARNING_$LI$().intValue()) {
27158                this.actuallyLog$java_util_logging_Level$java_lang_String$java_lang_Throwable(level, msg, thrown);
27159              }
27160            } else {
27161              this.actuallyLog$java_util_logging_Level$java_lang_String$java_lang_Throwable(level, msg, thrown);
27162            }
27163          };
27164          Logger2.prototype.log = function(level, msg, thrown) {
27165            if ((level != null && level instanceof java2.util.logging.Level || level === null) && (typeof msg === "string" || msg === null) && (thrown != null && thrown instanceof Error || thrown === null)) {
27166              return this.log$java_util_logging_Level$java_lang_String$java_lang_Throwable(level, msg, thrown);
27167            } else if ((level != null && level instanceof java2.util.logging.Level || level === null) && (typeof msg === "string" || msg === null) && thrown === void 0) {
27168              return this.log$java_util_logging_Level$java_lang_String(level, msg);
27169            } else if ((level != null && level instanceof java2.util.logging.LogRecord || level === null) && msg === void 0 && thrown === void 0) {
27170              return this.log$java_util_logging_LogRecord(level);
27171            } else
27172              throw new Error("invalid overload");
27173          };
27174          Logger2.prototype.log$java_util_logging_LogRecord = function(record) {
27175            if (Logger2.LOGGING_FALSE_$LI$()) {
27176              return;
27177            }
27178            if (Logger2.LOGGING_SEVERE_$LI$()) {
27179              if (record.getLevel().intValue() >= 1e3) {
27180                this.actuallyLog$java_util_logging_LogRecord(record);
27181              }
27182            } else if (Logger2.LOGGING_WARNING_$LI$()) {
27183              if (record.getLevel().intValue() >= java2.util.logging.Level.WARNING_$LI$().intValue()) {
27184                this.actuallyLog$java_util_logging_LogRecord(record);
27185              }
27186            } else {
27187              this.actuallyLog$java_util_logging_LogRecord(record);
27188            }
27189          };
27190          Logger2.prototype.removeHandler = function(handler) {
27191            if (Logger2.LOGGING_FALSE_$LI$()) {
27192              return;
27193            }
27194            this.handlers["remove$java_lang_Object"](handler);
27195          };
27196          Logger2.prototype.setLevel = function(newLevel) {
27197            if (Logger2.LOGGING_FALSE_$LI$()) {
27198              return;
27199            }
27200            this.level = newLevel;
27201          };
27202          Logger2.prototype.setParent = function(newParent) {
27203            if (Logger2.LOGGING_FALSE_$LI$()) {
27204              return;
27205            }
27206            if (newParent != null) {
27207              this.parent = newParent;
27208            }
27209          };
27210          Logger2.prototype.setUseParentHandlers = function(newUseParentHandlers) {
27211            if (Logger2.LOGGING_FALSE_$LI$()) {
27212              return;
27213            }
27214            this.useParentHandlers = newUseParentHandlers;
27215          };
27216          Logger2.prototype.getEffectiveLevel = function() {
27217            if (this.level != null) {
27218              return this.level;
27219            }
27220            var logger = this.getParent();
27221            while (logger != null) {
27222              {
27223                var effectiveLevel = logger.getLevel();
27224                if (effectiveLevel != null) {
27225                  return effectiveLevel;
27226                }
27227                logger = logger.getParent();
27228              }
27229            }
27230            ;
27231            return java2.util.logging.Level.INFO_$LI$();
27232          };
27233          Logger2.prototype.actuallyLog$java_util_logging_Level$java_lang_String$java_lang_Throwable = function(level, msg, thrown) {
27234            if (this.isLoggable(level)) {
27235              var record = new java2.util.logging.LogRecord(level, msg);
27236              record.setThrown(thrown);
27237              record.setLoggerName(this.getName());
27238              this.actuallyLog$java_util_logging_LogRecord(record);
27239            }
27240          };
27241          Logger2.prototype.actuallyLog = function(level, msg, thrown) {
27242            if ((level != null && level instanceof java2.util.logging.Level || level === null) && (typeof msg === "string" || msg === null) && (thrown != null && thrown instanceof Error || thrown === null)) {
27243              return this.actuallyLog$java_util_logging_Level$java_lang_String$java_lang_Throwable(level, msg, thrown);
27244            } else if ((level != null && level instanceof java2.util.logging.LogRecord || level === null) && msg === void 0 && thrown === void 0) {
27245              return this.actuallyLog$java_util_logging_LogRecord(level);
27246            } else
27247              throw new Error("invalid overload");
27248          };
27249          Logger2.prototype.actuallyLog$java_util_logging_LogRecord = function(record) {
27250            if (this.isLoggable(record.getLevel())) {
27251              {
27252                var array = this.getHandlers();
27253                for (var index = 0; index < array.length; index++) {
27254                  var handler = array[index];
27255                  {
27256                    handler.publish(record);
27257                  }
27258                }
27259              }
27260              var logger = this.getUseParentHandlers() ? this.getParent() : null;
27261              while (logger != null) {
27262                {
27263                  {
27264                    var array = logger.getHandlers();
27265                    for (var index = 0; index < array.length; index++) {
27266                      var handler = array[index];
27267                      {
27268                        handler.publish(record);
27269                      }
27270                    }
27271                  }
27272                  logger = logger.getUseParentHandlers() ? logger.getParent() : null;
27273                }
27274              }
27275              ;
27276            }
27277          };
27278          Logger2.__static_initialized = false;
27279          Logger2.GLOBAL_LOGGER_NAME = "global";
27280          return Logger2;
27281        })()
27282      );
27283      logging2.Logger = Logger;
27284      Logger["__class"] = "java.util.logging.Logger";
27285    })(logging = util2.logging || (util2.logging = {}));
27286  })(util = java2.util || (java2.util = {}));
27287})(java || (java = {}));
27288(function(java2) {
27289  var nio;
27290  (function(nio2) {
27291    var file;
27292    (function(file2) {
27293      var Path = (
27294        /** @class */
27295        (function() {
27296          function Path2(fullPath) {
27297            if (this.fullPath === void 0) {
27298              this.fullPath = null;
27299            }
27300            this.fullPath = fullPath;
27301          }
27302          Path2.prototype.forEach = function(action) {
27303            javaemul.internal.InternalPreconditions.checkNotNull((function(funcInst) {
27304              if (funcInst == null || typeof funcInst == "function") {
27305                return funcInst;
27306              }
27307              return function(arg0) {
27308                return (funcInst["accept"] ? funcInst["accept"] : funcInst).call(funcInst, arg0);
27309              };
27310            })(action));
27311            var _loop_13 = function(index2) {
27312              var t = index2.next();
27313              {
27314                (function(target) {
27315                  return typeof target === "function" ? target(t) : target.accept(t);
27316                })(action);
27317              }
27318            };
27319            for (var index = this.iterator(); index.hasNext(); ) {
27320              _loop_13(index);
27321            }
27322          };
27323          Path2.PATH_SEPARATOR_$LI$ = function() {
27324            if (Path2.PATH_SEPARATOR == null) {
27325              Path2.PATH_SEPARATOR = java2.lang.System.getProperty("file.separator");
27326            }
27327            return Path2.PATH_SEPARATOR;
27328          };
27329          Path2.prototype.compareTo$java_nio_file_Path = function(path) {
27330            return (
27331              /* compareTo */
27332              this.toString().localeCompare(path.toString())
27333            );
27334          };
27335          Path2.prototype.compareTo = function(path) {
27336            if (path != null && path instanceof java2.nio.file.Path || path === null) {
27337              return this.compareTo$java_nio_file_Path(path);
27338            } else
27339              throw new Error("invalid overload");
27340          };
27341          Path2.prototype.isAbsolute = function() {
27342            return java2.util.Objects.equals(Path2.PATH_SEPARATOR_$LI$(), "/") ? this.fullPath.length > 0 && java2.util.Objects.equals(this.fullPath.substring(0, 1), Path2.PATH_SEPARATOR_$LI$()) : this.fullPath.length >= 3 && java2.util.Objects.equals(this.fullPath.substring(1, 3), ":\\");
27343          };
27344          Path2.prototype.getFileName = function() {
27345            return new Path2(this.fullPath.substring(this.fullPath.lastIndexOf(Path2.PATH_SEPARATOR_$LI$()) + Path2.PATH_SEPARATOR_$LI$().length));
27346          };
27347          Path2.prototype.getParent = function() {
27348            return new Path2(this.fullPath.substring(0, this.fullPath.lastIndexOf(Path2.PATH_SEPARATOR_$LI$())));
27349          };
27350          Path2.prototype.resolve$java_nio_file_Path = function(other) {
27351            if (other.isAbsolute())
27352              return other;
27353            return new Path2(this.fullPath + "/" + other.fullPath);
27354          };
27355          Path2.prototype.resolve = function(other) {
27356            if (other != null && other instanceof java2.nio.file.Path || other === null) {
27357              return this.resolve$java_nio_file_Path(other);
27358            } else if (typeof other === "string" || other === null) {
27359              return this.resolve$java_lang_String(other);
27360            } else
27361              throw new Error("invalid overload");
27362          };
27363          Path2.prototype.resolve$java_lang_String = function(other) {
27364            return this.resolve$java_nio_file_Path(java2.nio.file.Paths.get(other));
27365          };
27366          Path2.prototype.toAbsolutePath = function() {
27367            return java2.nio.file.Paths.get(java2.lang.System.getProperty$java_lang_String("user.dir")).resolve$java_nio_file_Path(this);
27368          };
27369          Path2.prototype.iterator = function() {
27370            var _this = this;
27371            return java2.util.Arrays.asList(this.fullPath.split(Path2.PATH_SEPARATOR_$LI$()).map(function(str, i, arr) {
27372              return _this.isAbsolute() && i === 0 ? new Path2(str + Path2.PATH_SEPARATOR_$LI$()) : new Path2(str);
27373            })).iterator();
27374          };
27375          Path2.prototype.toString = function() {
27376            return this.fullPath;
27377          };
27378          return Path2;
27379        })()
27380      );
27381      file2.Path = Path;
27382      Path["__class"] = "java.nio.file.Path";
27383      Path["__interfaces"] = ["java.lang.Comparable", "java.lang.Iterable"];
27384    })(file = nio2.file || (nio2.file = {}));
27385  })(nio = java2.nio || (java2.nio = {}));
27386})(java || (java = {}));
27387java.nio.file.Path.PATH_SEPARATOR_$LI$();
27388java.util.logging.Logger.LOGGING_FALSE_$LI$();
27389java.util.logging.Logger.LOGGING_SEVERE_$LI$();
27390java.util.logging.Logger.LOGGING_WARNING_$LI$();
27391java.util.logging.Logger.LOGGING_ENABLED_$LI$();
27392java.util.logging.Logger.__static_initialize();
27393java.util.ConcurrentModificationDetector.API_CHECK_$LI$();
27394javaemul.internal.InternalPreconditions.BOUND_CHECK_$LI$();
27395javaemul.internal.InternalPreconditions.API_CHECK_$LI$();
27396javaemul.internal.InternalPreconditions.TYPE_CHECK_$LI$();
27397javaemul.internal.InternalPreconditions.CHECKED_MODE_$LI$();
27398java.lang.System.in_$LI$();
27399java.lang.System.out_$LI$();
27400java.lang.System.err_$LI$();
27401java.lang.System.propertyMap_$LI$();
27402java.lang.System.ENVIRONMENT_IS_SHELL_$LI$();
27403java.lang.System.ENVIRONMENT_IS_NODE_$LI$();
27404java.lang.System.ENVIRONMENT_IS_WORKER_$LI$();
27405java.lang.System.ENVIRONMENT_IS_WEB_$LI$();
27406java.lang.System.__static_initialize();
27407java.util.stream.Collectors.CH_NOID_$LI$();
27408java.util.stream.Collectors.CH_ID_$LI$();
27409java.util.TreeMap.SubMapType_Tail_$LI$();
27410java.util.TreeMap.SubMapType_Range_$LI$();
27411java.util.TreeMap.SubMapType_Head_$LI$();
27412java.util.TreeMap.SubMapType_All_$LI$();
27413java.util.Collections.RandomHolder.rnd_$LI$();
27414java.util.Collections.ReverseComparator.INSTANCE_$LI$();
27415java.util.Collections.EmptyListIterator.INSTANCE_$LI$();
27416java.util.Collections.EMPTY_SET_$LI$();
27417java.util.Collections.EMPTY_MAP_$LI$();
27418java.util.Collections.EMPTY_LIST_$LI$();
27419java.nio.charset.StandardCharsets.UTF_8_$LI$();
27420java.nio.charset.StandardCharsets.ISO_8859_1_$LI$();
27421javaemul.internal.EmulatedCharset.ISO_8859_1_$LI$();
27422javaemul.internal.EmulatedCharset.ISO_LATIN_1_$LI$();
27423javaemul.internal.EmulatedCharset.UTF_8_$LI$();
27424java.security.MessageDigest.Md5Digest.padding_$LI$();
27425javaemul.internal.StringHelper.CASE_INSENSITIVE_ORDER_$LI$();
27426java.util.Scanner.whiteSpacePattern_$LI$();
27427java.util.Scanner.endLinePattern_$LI$();
27428java.util.Scanner.floatPattern_$LI$();
27429java.util.Scanner.integerPattern_$LI$();
27430java.util.Scanner.booleanPattern_$LI$();
27431java.util.Scanner.signedNonNumber_$LI$();
27432java.util.Scanner.decimal_$LI$();
27433java.util.Scanner.exponent_$LI$();
27434java.util.Scanner.decimalNumeral_$LI$();
27435java.util.Scanner.numeral_$LI$();
27436javaemul.internal.LongHelper.BoxedValues.boxedValues_$LI$();
27437javaemul.internal.IntegerHelper.ReverseNibbles.reverseNibbles_$LI$();
27438javaemul.internal.IntegerHelper.BoxedValues.boxedValues_$LI$();
27439javaemul.internal.ByteHelper.BoxedValues.boxedValues_$LI$();
27440javaemul.internal.ByteHelper.TYPE_$LI$();
27441javaemul.internal.ByteHelper.MAX_VALUE_$LI$();
27442javaemul.internal.ByteHelper.MIN_VALUE_$LI$();
27443javaemul.internal.ShortHelper.BoxedValues.boxedValues_$LI$();
27444javaemul.internal.ShortHelper.TYPE_$LI$();
27445javaemul.internal.ShortHelper.MAX_VALUE_$LI$();
27446javaemul.internal.ShortHelper.MIN_VALUE_$LI$();
27447javaemul.internal.DoubleHelper.PowersTable.invPowers_$LI$();
27448javaemul.internal.DoubleHelper.PowersTable.powers_$LI$();
27449java.nio.ByteOrder.LITTLE_ENDIAN_$LI$();
27450java.nio.ByteOrder.BIG_ENDIAN_$LI$();
27451java.lang.Class.classes_$LI$();
27452java.lang.Class.constructors_$LI$();
27453java.util.logging.Level.WARNING_$LI$();
27454java.util.logging.Level.SEVERE_$LI$();
27455java.util.logging.Level.OFF_$LI$();
27456java.util.logging.Level.INFO_$LI$();
27457java.util.logging.Level.FINEST_$LI$();
27458java.util.logging.Level.FINER_$LI$();
27459java.util.logging.Level.FINE_$LI$();
27460java.util.logging.Level.CONFIG_$LI$();
27461java.util.logging.Level.ALL_$LI$();
27462java.util.Date.StringData.MONTHS_$LI$();
27463java.util.Date.StringData.DAYS_$LI$();
27464java.util.Comparators.NATURAL_$LI$();
27465java.util.Locale.defaultLocale_$LI$();
27466java.util.Locale.UK_$LI$();
27467java.util.Locale.FRANCE_$LI$();
27468java.util.Locale.US_$LI$();
27469java.util.Locale.ENGLISH_$LI$();
27470java.util.Locale.ROOT_$LI$();
27471java.util.Random.twoToTheXMinus48_$LI$();
27472java.util.Random.twoToTheXMinus24_$LI$();
27473java.util.Random.__static_initialize();
27474java.util.OptionalLong.EMPTY_$LI$();
27475java.util.OptionalInt.EMPTY_$LI$();
27476java.util.OptionalDouble.EMPTY_$LI$();
27477java.util.Optional.EMPTY_$LI$();
27478java.util.InternalJsMapFactory.jsMapCtor_$LI$();
27479java.net.InternalJsURLFactory.jsURLCtor_$LI$();
27480javaemul.internal.NumberHelper.__ParseLong.maxValueForRadix_$LI$();
27481javaemul.internal.NumberHelper.__ParseLong.maxLengthForRadix_$LI$();
27482javaemul.internal.NumberHelper.__ParseLong.maxDigitsRadixPower_$LI$();
27483javaemul.internal.NumberHelper.__ParseLong.maxDigitsForRadix_$LI$();
27484javaemul.internal.NumberHelper.__ParseLong.__static_initialize();
27485javaemul.internal.MathHelper.PI_UNDER_180_$LI$();
27486javaemul.internal.MathHelper.PI_OVER_180_$LI$();
27487javaemul.internal.MathHelper.MIN_VALUE_$LI$();
27488javaemul.internal.MathHelper.MAX_VALUE_$LI$();
27489javaemul.internal.MathHelper.EPSILON_$LI$();
27490javaemul.internal.CharacterHelper.BoxedValues.boxedValues_$LI$();
27491javaemul.internal.CharacterHelper.TYPE_$LI$();
27492javaemul.internal.stream.VoidRunnable.dryRun_$LI$();
27493javaemul.internal.StringHashCache.front_$LI$();
27494javaemul.internal.StringHashCache.back_$LI$();
27495javaemul.internal.BooleanHelper.TYPE_$LI$();
27496javaemul.internal.JreHelper.LOG10E_$LI$();
27497
27498// src/worker/legacy/from-java/java/text/NumberFormat.ts
27499var NumberFormat = class _NumberFormat {
27500  constructor() {
27501    /*private*/
27502    this.maximumFractionDigits = 3;
27503    // java.text.NumberFormat's default
27504    /*private*/
27505    this.minimumFractionDigits = 0;
27506  }
27507  static getNumberInstance(us) {
27508    return new _NumberFormat();
27509  }
27510  static getInstance() {
27511    return new _NumberFormat();
27512  }
27513  //  Java keeps min <= max by pushing the *other* bound, in both directions.  This
27514  //  matters: OffExporter only calls setMinimumFractionDigits(16), and relies on that
27515  //  raising the maximum from the default 3 to 16.
27516  setMaximumFractionDigits(i) {
27517    this.maximumFractionDigits = Math.max(0, i);
27518    if (this.minimumFractionDigits > this.maximumFractionDigits)
27519      this.minimumFractionDigits = this.maximumFractionDigits;
27520  }
27521  setMinimumFractionDigits(i) {
27522    this.minimumFractionDigits = Math.max(0, i);
27523    if (this.maximumFractionDigits < this.minimumFractionDigits)
27524      this.maximumFractionDigits = this.minimumFractionDigits;
27525  }
27526  format(x) {
27527    const value = Number(x);
27528    if (!isFinite(value))
27529      return "" + x;
27530    const negative = value < 0 || Object.is(value, -0);
27531    const magnitude = Math.abs(value);
27532    let text = String(magnitude);
27533    if (text.indexOf("e") >= 0 || text.indexOf("E") >= 0) {
27534      text = magnitude >= 1e21 ? BigInt(magnitude).toString() : magnitude.toFixed(Math.min(this.maximumFractionDigits, 100));
27535    }
27536    let dot = text.indexOf(".");
27537    let whole = dot < 0 ? text : text.substring(0, dot);
27538    let fraction = dot < 0 ? "" : text.substring(dot + 1);
27539    if (fraction.length > this.maximumFractionDigits) {
27540      const rounded = Number(text).toFixed(Math.min(this.maximumFractionDigits, 100));
27541      dot = rounded.indexOf(".");
27542      whole = dot < 0 ? rounded : rounded.substring(0, dot);
27543      fraction = dot < 0 ? "" : rounded.substring(dot + 1);
27544    }
27545    let end = fraction.length;
27546    while (end > this.minimumFractionDigits && fraction.charAt(end - 1) === "0")
27547      end--;
27548    fraction = fraction.substring(0, end);
27549    while (fraction.length < this.minimumFractionDigits)
27550      fraction += "0";
27551    const body = fraction.length > 0 ? whole + "." + fraction : whole;
27552    return negative ? "-" + body : body;
27553  }
27554  setGroupingUsed(newValue) {
27555  }
27556};
27557NumberFormat["__class"] = "java.text.NumberFormat";
27558
27559// src/worker/legacy/from-java/com/vzome/core/math/RealVector.ts
27560var RealVector = class _RealVector {
27561  static {
27562    this.__static_initialized = false;
27563  }
27564  static __static_initialize() {
27565    if (!_RealVector.__static_initialized) {
27566      _RealVector.__static_initialized = true;
27567      _RealVector.__static_initializer_0();
27568    }
27569  }
27570  static ORIGIN_$LI$() {
27571    _RealVector.__static_initialize();
27572    if (_RealVector.ORIGIN == null) {
27573      _RealVector.ORIGIN = new _RealVector(0, 0, 0);
27574    }
27575    return _RealVector.ORIGIN;
27576  }
27577  static FORMAT_$LI$() {
27578    _RealVector.__static_initialize();
27579    if (_RealVector.FORMAT == null) {
27580      _RealVector.FORMAT = NumberFormat.getNumberInstance(java.util.Locale.US);
27581    }
27582    return _RealVector.FORMAT;
27583  }
27584  static DIRECTION_0_$LI$() {
27585    _RealVector.__static_initialize();
27586    if (_RealVector.DIRECTION_0 == null) {
27587      _RealVector.DIRECTION_0 = new _RealVector(10, 0.1, -0.1);
27588    }
27589    return _RealVector.DIRECTION_0;
27590  }
27591  static __static_initializer_0() {
27592    _RealVector.FORMAT_$LI$().setMaximumFractionDigits(5);
27593    _RealVector.FORMAT_$LI$().setMinimumFractionDigits(1);
27594  }
27595  constructor(x, y, z) {
27596    if ((typeof x === "number" || x === null) && (typeof y === "number" || y === null) && (typeof z === "number" || z === null)) {
27597      let __args = arguments;
27598      if (this.x === void 0) {
27599        this.x = 0;
27600      }
27601      if (this.y === void 0) {
27602        this.y = 0;
27603      }
27604      if (this.z === void 0) {
27605        this.z = 0;
27606      }
27607      this.x = Math.fround(x);
27608      this.y = Math.fround(y);
27609      this.z = Math.fround(z);
27610    } else if ((x != null && x instanceof _RealVector || x === null) && y === void 0 && z === void 0) {
27611      let __args = arguments;
27612      let that = __args[0];
27613      {
27614        let __args2 = arguments;
27615        let x2 = that.x;
27616        let y2 = that.y;
27617        let z2 = that.z;
27618        if (this.x === void 0) {
27619          this.x = 0;
27620        }
27621        if (this.y === void 0) {
27622          this.y = 0;
27623        }
27624        if (this.z === void 0) {
27625          this.z = 0;
27626        }
27627        this.x = Math.fround(x2);
27628        this.y = Math.fround(y2);
27629        this.z = Math.fround(z2);
27630      }
27631    } else if (x === void 0 && y === void 0 && z === void 0) {
27632      let __args = arguments;
27633      {
27634        let __args2 = arguments;
27635        let x2 = 0;
27636        let y2 = 0;
27637        let z2 = 0;
27638        if (this.x === void 0) {
27639          this.x = 0;
27640        }
27641        if (this.y === void 0) {
27642          this.y = 0;
27643        }
27644        if (this.z === void 0) {
27645          this.z = 0;
27646        }
27647        this.x = Math.fround(x2);
27648        this.y = Math.fround(y2);
27649        this.z = Math.fround(z2);
27650      }
27651    } else throw new Error("invalid overload");
27652  }
27653  /**
27654   * 
27655   * @return {*}
27656   */
27657  clone() {
27658    return new _RealVector(this);
27659  }
27660  isZero() {
27661    return this.x === 0 && this.y === 0 && this.z === 0;
27662  }
27663  /**
27664   * Return a string representing this vector as XML attribute values.
27665   * @return {string}
27666   */
27667  toXmlAttributes() {
27668    return 'x="' + _RealVector.FORMAT_$LI$().format(this.x) + '" y="' + _RealVector.FORMAT_$LI$().format(this.y) + '" z="' + _RealVector.FORMAT_$LI$().format(this.z) + '"';
27669  }
27670  toString$java_text_NumberFormat(format) {
27671    return format.format(this.x) + "," + format.format(this.y) + "," + format.format(this.z);
27672  }
27673  /**
27674   * Return a string representing this vector in the form "x,y,z".
27675   * @param {NumberFormat} format
27676   * @return {string}
27677   */
27678  toString(format) {
27679    if (format != null && format instanceof NumberFormat || format === null) {
27680      return this.toString$java_text_NumberFormat(format);
27681    } else if (format === void 0) {
27682      return this.toString$();
27683    } else throw new Error("invalid overload");
27684  }
27685  toString$() {
27686    return _RealVector.FORMAT_$LI$().format(this.x) + "," + _RealVector.FORMAT_$LI$().format(this.y) + "," + _RealVector.FORMAT_$LI$().format(this.z);
27687  }
27688  /**
27689   * Return a string representing this vector in the form "x y z".
27690   * @return {string}
27691   */
27692  spacedString() {
27693    const result = _RealVector.FORMAT_$LI$().format(this.x) + " " + _RealVector.FORMAT_$LI$().format(this.y) + " " + _RealVector.FORMAT_$LI$().format(this.z);
27694    return result;
27695  }
27696  /**
27697   * Return the sum of this vector plus the vector "other",
27698   * as a new Vector3D.
27699   * @param {RealVector} other
27700   * @return {RealVector}
27701   */
27702  plus(other) {
27703    return new _RealVector(Math.fround(this.x + other.x), Math.fround(this.y + other.y), Math.fround(this.z + other.z));
27704  }
27705  /**
27706   * Return the difference of this vector minus the vector "other",
27707   * as a new Vector3D.
27708   * @param {RealVector} other
27709   * @return {RealVector}
27710   */
27711  minus(other) {
27712    return new _RealVector(Math.fround(this.x - other.x), Math.fround(this.y - other.y), Math.fround(this.z - other.z));
27713  }
27714  negate() {
27715    return new _RealVector(-this.x, -this.y, -this.z);
27716  }
27717  /**
27718   * Return a new vector equal to this vector scaled by the given factor.
27719   * @param {number} factor
27720   * @return {RealVector}
27721   */
27722  scale(factor) {
27723    return new _RealVector(this.x * factor, this.y * factor, this.z * factor);
27724  }
27725  /**
27726   * Return the scalar (dot) product with the other vector
27727   * @param {RealVector} other
27728   * @return {number}
27729   */
27730  dot(other) {
27731    return Math.fround(Math.fround(Math.fround(this.x * other.x) + Math.fround(this.y * other.y)) + Math.fround(this.z * other.z));
27732  }
27733  cross(that) {
27734    return new _RealVector(Math.fround(Math.fround(this.y * that.z) - Math.fround(this.z * that.y)), Math.fround(Math.fround(this.z * that.x) - Math.fround(this.x * that.z)), Math.fround(Math.fround(this.x * that.y) - Math.fround(this.y * that.x)));
27735  }
27736  /**
27737   * Return the length of this vector.
27738   * @return {number}
27739   */
27740  length() {
27741    return Math.sqrt(this.dot(this));
27742  }
27743  normalize() {
27744    return this.scale(1 / this.length());
27745  }
27746  write(buf, offset) {
27747    buf.put(offset, this.x);
27748    buf.put(offset + 1, this.y);
27749    buf.put(offset + 2, this.z);
27750  }
27751  /**
27752   * 
27753   * @param {*} other
27754   * @return {boolean}
27755   */
27756  equals(other) {
27757    if (other == null) {
27758      return false;
27759    }
27760    if (other === this) {
27761      return true;
27762    }
27763    if (!(other != null && other instanceof _RealVector)) return false;
27764    const v = other;
27765    return this.x === v.x && this.y === v.y && this.z === v.z;
27766  }
27767  /**
27768   * 
27769   * @return {number}
27770   */
27771  hashCode() {
27772    let hash = 3;
27773    hash = 41 * hash + (javaemul.internal.DoubleHelper.doubleToLongBits(this.x) ^ javaemul.internal.DoubleHelper.doubleToLongBits(this.x) >>> 32 | 0);
27774    hash = 41 * hash + (javaemul.internal.DoubleHelper.doubleToLongBits(this.y) ^ javaemul.internal.DoubleHelper.doubleToLongBits(this.y) >>> 32 | 0);
27775    hash = 41 * hash + (javaemul.internal.DoubleHelper.doubleToLongBits(this.z) ^ javaemul.internal.DoubleHelper.doubleToLongBits(this.z) >>> 32 | 0);
27776    return hash;
27777  }
27778  addTo(addend, sum) {
27779    sum[0] = Math.fround(addend[0] + this.x);
27780    sum[1] = Math.fround(addend[1] + this.y);
27781    sum[2] = Math.fround(addend[2] + this.z);
27782  }
27783  toArray(output) {
27784    output[0] = this.x;
27785    output[1] = this.y;
27786    output[2] = this.z;
27787  }
27788};
27789RealVector["__class"] = "com.vzome.core.math.RealVector";
27790RealVector.__static_initialize();
27791
27792// src/worker/legacy/from-java/com/vzome/core/algebra/AlgebraicField.ts
27793var AlgebraicField;
27794((AlgebraicField2) => {
27795  AlgebraicField2.DEFAULT_FORMAT = 0;
27796  AlgebraicField2.EXPRESSION_FORMAT = 1;
27797  AlgebraicField2.ZOMIC_FORMAT = 2;
27798  AlgebraicField2.VEF_FORMAT = 3;
27799  AlgebraicField2.MATHML_FORMAT = 4;
27800  AlgebraicField2.MATH_FORMAT = 5;
27801  function getIrrationals(field) {
27802    const len = field.getNumIrrationals();
27803    const result = ((s) => {
27804      let a = [];
27805      while (s-- > 0) a.push(null);
27806      return a;
27807    })(len);
27808    for (let i = 0; i < result.length; i++) {
27809      {
27810        result[i] = field["getIrrational$int"](i + 1);
27811      }
27812      ;
27813    }
27814    return result;
27815  }
27816  AlgebraicField2.getIrrationals = getIrrationals;
27817  function getMultipliers(field) {
27818    const len = field.getNumMultipliers();
27819    const result = ((s) => {
27820      let a = [];
27821      while (s-- > 0) a.push(null);
27822      return a;
27823    })(len);
27824    for (let i = 0; i < result.length; i++) {
27825      {
27826        result[i] = field["getIrrational$int"](i + 1);
27827      }
27828      ;
27829    }
27830    return result;
27831  }
27832  AlgebraicField2.getMultipliers = getMultipliers;
27833})(AlgebraicField || (AlgebraicField = {}));
27834
27835// src/worker/legacy/from-java/com/vzome/core/algebra/AlgebraicVector.ts
27836var AlgebraicVector = class _AlgebraicVector {
27837  static {
27838    this.X = 0;
27839  }
27840  static {
27841    this.Y = 1;
27842  }
27843  static {
27844    this.Z = 2;
27845  }
27846  static {
27847    this.W4 = 0;
27848  }
27849  static {
27850    this.X4 = 1;
27851  }
27852  static {
27853    this.Y4 = 2;
27854  }
27855  static {
27856    this.Z4 = 3;
27857  }
27858  constructor(n1, n2, n3, n4, n5) {
27859    if ((n1 != null && (n1.constructor != null && n1.constructor["__interfaces"] != null && n1.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n1 === null) && (n2 != null && (n2.constructor != null && n2.constructor["__interfaces"] != null && n2.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n2 === null) && (n3 != null && (n3.constructor != null && n3.constructor["__interfaces"] != null && n3.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n3 === null) && (n4 != null && (n4.constructor != null && n4.constructor["__interfaces"] != null && n4.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n4 === null) && (n5 != null && (n5.constructor != null && n5.constructor["__interfaces"] != null && n5.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n5 === null)) {
27860      let __args = arguments;
27861      {
27862        let __args2 = arguments;
27863        let field = n1.getField();
27864        let dims = 5;
27865        if (this.coordinates === void 0) {
27866          this.coordinates = null;
27867        }
27868        if (this.field === void 0) {
27869          this.field = null;
27870        }
27871        this.coordinates = ((s) => {
27872          let a = [];
27873          while (s-- > 0) a.push(null);
27874          return a;
27875        })(dims);
27876        for (let i = 0; i < dims; i++) {
27877          {
27878            this.coordinates[i] = field.zero();
27879          }
27880          ;
27881        }
27882        this.field = field;
27883      }
27884      (() => {
27885        this.coordinates[0] = n1;
27886        this.coordinates[1] = n2;
27887        this.coordinates[2] = n3;
27888        this.coordinates[3] = n4;
27889        this.coordinates[4] = n5;
27890      })();
27891    } else if ((n1 != null && (n1.constructor != null && n1.constructor["__interfaces"] != null && n1.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n1 === null) && (n2 != null && (n2.constructor != null && n2.constructor["__interfaces"] != null && n2.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n2 === null) && (n3 != null && (n3.constructor != null && n3.constructor["__interfaces"] != null && n3.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n3 === null) && (n4 != null && (n4.constructor != null && n4.constructor["__interfaces"] != null && n4.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n4 === null) && n5 === void 0) {
27892      let __args = arguments;
27893      {
27894        let __args2 = arguments;
27895        let field = n1.getField();
27896        let dims = 4;
27897        if (this.coordinates === void 0) {
27898          this.coordinates = null;
27899        }
27900        if (this.field === void 0) {
27901          this.field = null;
27902        }
27903        this.coordinates = ((s) => {
27904          let a = [];
27905          while (s-- > 0) a.push(null);
27906          return a;
27907        })(dims);
27908        for (let i = 0; i < dims; i++) {
27909          {
27910            this.coordinates[i] = field.zero();
27911          }
27912          ;
27913        }
27914        this.field = field;
27915      }
27916      (() => {
27917        this.coordinates[0] = n1;
27918        this.coordinates[1] = n2;
27919        this.coordinates[2] = n3;
27920        this.coordinates[3] = n4;
27921      })();
27922    } else if ((n1 != null && (n1.constructor != null && n1.constructor["__interfaces"] != null && n1.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n1 === null) && (n2 != null && (n2.constructor != null && n2.constructor["__interfaces"] != null && n2.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n2 === null) && (n3 != null && (n3.constructor != null && n3.constructor["__interfaces"] != null && n3.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n3 === null) && n4 === void 0 && n5 === void 0) {
27923      let __args = arguments;
27924      {
27925        let __args2 = arguments;
27926        let field = n1.getField();
27927        let dims = 3;
27928        if (this.coordinates === void 0) {
27929          this.coordinates = null;
27930        }
27931        if (this.field === void 0) {
27932          this.field = null;
27933        }
27934        this.coordinates = ((s) => {
27935          let a = [];
27936          while (s-- > 0) a.push(null);
27937          return a;
27938        })(dims);
27939        for (let i = 0; i < dims; i++) {
27940          {
27941            this.coordinates[i] = field.zero();
27942          }
27943          ;
27944        }
27945        this.field = field;
27946      }
27947      (() => {
27948        this.coordinates[0] = n1;
27949        this.coordinates[1] = n2;
27950        this.coordinates[2] = n3;
27951      })();
27952    } else if ((n1 != null && (n1.constructor != null && n1.constructor["__interfaces"] != null && n1.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n1 === null) && (n2 != null && (n2.constructor != null && n2.constructor["__interfaces"] != null && n2.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n2 === null) && n3 === void 0 && n4 === void 0 && n5 === void 0) {
27953      let __args = arguments;
27954      {
27955        let __args2 = arguments;
27956        let field = n1.getField();
27957        let dims = 2;
27958        if (this.coordinates === void 0) {
27959          this.coordinates = null;
27960        }
27961        if (this.field === void 0) {
27962          this.field = null;
27963        }
27964        this.coordinates = ((s) => {
27965          let a = [];
27966          while (s-- > 0) a.push(null);
27967          return a;
27968        })(dims);
27969        for (let i = 0; i < dims; i++) {
27970          {
27971            this.coordinates[i] = field.zero();
27972          }
27973          ;
27974        }
27975        this.field = field;
27976      }
27977      (() => {
27978        this.coordinates[0] = n1;
27979        this.coordinates[1] = n2;
27980      })();
27981    } else if ((n1 != null && (n1.constructor != null && n1.constructor["__interfaces"] != null && n1.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || n1 === null) && (typeof n2 === "number" || n2 === null) && n3 === void 0 && n4 === void 0 && n5 === void 0) {
27982      let __args = arguments;
27983      let field = __args[0];
27984      let dims = __args[1];
27985      if (this.coordinates === void 0) {
27986        this.coordinates = null;
27987      }
27988      if (this.field === void 0) {
27989        this.field = null;
27990      }
27991      this.coordinates = ((s) => {
27992        let a = [];
27993        while (s-- > 0) a.push(null);
27994        return a;
27995      })(dims);
27996      for (let i = 0; i < dims; i++) {
27997        {
27998          this.coordinates[i] = field.zero();
27999        }
28000        ;
28001      }
28002      this.field = field;
28003    } else if ((n1 != null && n1 instanceof Array && (n1.length == 0 || n1[0] == null || n1[0] != null && (n1[0].constructor != null && n1[0].constructor["__interfaces"] != null && n1[0].constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0)) || n1 === null) && n2 === void 0 && n3 === void 0 && n4 === void 0 && n5 === void 0) {
28004      let __args = arguments;
28005      let n = __args[0];
28006      if (this.coordinates === void 0) {
28007        this.coordinates = null;
28008      }
28009      if (this.field === void 0) {
28010        this.field = null;
28011      }
28012      this.coordinates = ((s) => {
28013        let a = [];
28014        while (s-- > 0) a.push(null);
28015        return a;
28016      })(n.length);
28017      java.lang.System.arraycopy(n, 0, this.coordinates, 0, n.length);
28018      this.field = n[0].getField();
28019    } else if ((n1 != null && (n1.constructor != null && n1.constructor["__interfaces"] != null && n1.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || n1 === null) && n2 === void 0 && n3 === void 0 && n4 === void 0 && n5 === void 0) {
28020      let __args = arguments;
28021      {
28022        let __args2 = arguments;
28023        let field = n1.getField();
28024        let dims = 1;
28025        if (this.coordinates === void 0) {
28026          this.coordinates = null;
28027        }
28028        if (this.field === void 0) {
28029          this.field = null;
28030        }
28031        this.coordinates = ((s) => {
28032          let a = [];
28033          while (s-- > 0) a.push(null);
28034          return a;
28035        })(dims);
28036        for (let i = 0; i < dims; i++) {
28037          {
28038            this.coordinates[i] = field.zero();
28039          }
28040          ;
28041        }
28042        this.field = field;
28043      }
28044      (() => {
28045        this.coordinates[0] = n1;
28046      })();
28047    } else throw new Error("invalid overload");
28048  }
28049  /**
28050   * 
28051   * @return {number}
28052   */
28053  hashCode() {
28054    const prime = 31;
28055    let result = 1;
28056    result = prime * result + java.util.Arrays.hashCode(this.coordinates);
28057    return result;
28058  }
28059  /**
28060   * 
28061   * @param {*} obj
28062   * @return {boolean}
28063   */
28064  equals(obj) {
28065    if (this === obj) return true;
28066    if (obj == null) return false;
28067    if (this.constructor !== obj.constructor) return false;
28068    const other = obj;
28069    if (!/* equals */
28070    ((o1, o2) => {
28071      if (o1 && o1.equals) {
28072        return o1.equals(o2);
28073      } else {
28074        return o1 === o2;
28075      }
28076    })(this.field, other.field)) {
28077      const reason = "Invalid comparison of " + /* getSimpleName */
28078      ((c) => typeof c === "string" ? c.substring(c.lastIndexOf(".") + 1) : c["__class"] ? c["__class"].substring(c["__class"].lastIndexOf(".") + 1) : c["name"].substring(c["name"].lastIndexOf(".") + 1))(this.constructor) + "swith different fields: " + this.field.getName() + " and " + other.field.getName();
28079      throw new java.lang.IllegalStateException(reason);
28080    }
28081    return java.util.Arrays.equals(this.coordinates, other.coordinates);
28082  }
28083  /**
28084   * 
28085   * @param {AlgebraicVector} other
28086   * @return {number}
28087   */
28088  compareTo(other) {
28089    if (this === other) {
28090      return 0;
28091    }
28092    if (other.equals(this)) {
28093      return 0;
28094    }
28095    let comparison = (
28096      /* compare */
28097      this.coordinates.length - other.coordinates.length
28098    );
28099    if (comparison !== 0) {
28100      return comparison;
28101    }
28102    for (let i = 0; i < this.coordinates.length; i++) {
28103      {
28104        const n1 = this.coordinates[i];
28105        const n2 = other.coordinates[i];
28106        comparison = n1.compareTo(n2);
28107        if (comparison !== 0) {
28108          return comparison;
28109        }
28110      }
28111      ;
28112    }
28113    return comparison;
28114  }
28115  toRealVector() {
28116    return new RealVector(this.coordinates[0].evaluate(), this.coordinates[1].evaluate(), this.coordinates[2].evaluate());
28117  }
28118  to3dDoubleVector() {
28119    return [this.coordinates[0].evaluate(), this.coordinates[1].evaluate(), this.coordinates[2].evaluate()];
28120  }
28121  /**
28122   * @return {string} A String with no extended characters so it's suitable for writing
28123   * to an 8 bit stream such as System.out or an ASCII text log file in Windows.
28124   * Contrast this with {@link toString()} which contains extended characters (e.g. φ (phi))
28125   */
28126  toASCIIString() {
28127    return this.getVectorExpression$int(AlgebraicField.EXPRESSION_FORMAT);
28128  }
28129  /**
28130   * @return {string} A String representation that can be persisted to XML and parsed by XmlSaveFormat.parseRationalVector().
28131   */
28132  toParsableString() {
28133    return this.getVectorExpression$int(AlgebraicField.ZOMIC_FORMAT);
28134  }
28135  toString(format = AlgebraicField.DEFAULT_FORMAT) {
28136    return this.getVectorExpression$int(format);
28137  }
28138  getComponent(i) {
28139    return this.coordinates[i];
28140  }
28141  getComponents() {
28142    return this.coordinates;
28143  }
28144  setComponent(component, coord) {
28145    this.coordinates[component] = coord;
28146    return this;
28147  }
28148  negate() {
28149    const result = ((s) => {
28150      let a = [];
28151      while (s-- > 0) a.push(null);
28152      return a;
28153    })(this.coordinates.length);
28154    for (let i = 0; i < result.length; i++) {
28155      {
28156        result[i] = this.coordinates[i].negate();
28157      }
28158      ;
28159    }
28160    return new _AlgebraicVector(result);
28161  }
28162  scale(scale) {
28163    const result = ((s) => {
28164      let a = [];
28165      while (s-- > 0) a.push(null);
28166      return a;
28167    })(this.coordinates.length);
28168    for (let i = 0; i < result.length; i++) {
28169      {
28170        result[i] = this.coordinates[i]["times$com_vzome_core_algebra_AlgebraicNumber"](scale);
28171      }
28172      ;
28173    }
28174    return new _AlgebraicVector(result);
28175  }
28176  isOrigin() {
28177    for (let index = 0; index < this.coordinates.length; index++) {
28178      let coordinate = this.coordinates[index];
28179      {
28180        if (!coordinate.isZero()) {
28181          return false;
28182        }
28183      }
28184    }
28185    return true;
28186  }
28187  plus(that) {
28188    const result = ((s) => {
28189      let a = [];
28190      while (s-- > 0) a.push(null);
28191      return a;
28192    })(this.coordinates.length);
28193    for (let i = 0; i < result.length; i++) {
28194      {
28195        result[i] = this.coordinates[i]["plus$com_vzome_core_algebra_AlgebraicNumber"](that.coordinates[i]);
28196      }
28197      ;
28198    }
28199    return new _AlgebraicVector(result);
28200  }
28201  minus(that) {
28202    const result = ((s) => {
28203      let a = [];
28204      while (s-- > 0) a.push(null);
28205      return a;
28206    })(this.coordinates.length);
28207    for (let i = 0; i < result.length; i++) {
28208      {
28209        result[i] = this.coordinates[i]["minus$com_vzome_core_algebra_AlgebraicNumber"](that.coordinates[i]);
28210      }
28211      ;
28212    }
28213    return new _AlgebraicVector(result);
28214  }
28215  dimension() {
28216    return this.coordinates.length;
28217  }
28218  cross(that) {
28219    const result = ((s) => {
28220      let a = [];
28221      while (s-- > 0) a.push(null);
28222      return a;
28223    })(this.coordinates.length);
28224    for (let i = 0; i < result.length; i++) {
28225      {
28226        const j = (i + 1) % 3;
28227        const k = (i + 2) % 3;
28228        result[i] = this.coordinates[j]["times$com_vzome_core_algebra_AlgebraicNumber"](that.coordinates[k])["minus$com_vzome_core_algebra_AlgebraicNumber"](this.coordinates[k]["times$com_vzome_core_algebra_AlgebraicNumber"](that.coordinates[j]));
28229      }
28230      ;
28231    }
28232    return new _AlgebraicVector(result);
28233  }
28234  inflateTo4d$() {
28235    return this.inflateTo4d$boolean(true);
28236  }
28237  inflateTo4d$boolean(wFirst) {
28238    if (this.coordinates.length === 4) {
28239      if (wFirst) return this;
28240      else return new _AlgebraicVector([this.coordinates[1], this.coordinates[2], this.coordinates[3], this.coordinates[0]]);
28241    }
28242    if (wFirst) return new _AlgebraicVector([this.field.zero(), this.coordinates[0], this.coordinates[1], this.coordinates[2]]);
28243    else return new _AlgebraicVector([this.coordinates[0], this.coordinates[1], this.coordinates[2], this.field.zero()]);
28244  }
28245  inflateTo4d(wFirst) {
28246    if (typeof wFirst === "boolean" || wFirst === null) {
28247      return this.inflateTo4d$boolean(wFirst);
28248    } else if (wFirst === void 0) {
28249      return this.inflateTo4d$();
28250    } else throw new Error("invalid overload");
28251  }
28252  projectTo3d(wFirst) {
28253    if (this.dimension() === 3) return this;
28254    if (wFirst) return new _AlgebraicVector([this.coordinates[1], this.coordinates[2], this.coordinates[3]]);
28255    else return new _AlgebraicVector([this.coordinates[0], this.coordinates[1], this.coordinates[2]]);
28256  }
28257  getVectorExpression$java_lang_StringBuffer$int(buf, format) {
28258    if (format === AlgebraicField.DEFAULT_FORMAT) buf.append("(");
28259    for (let i = 0; i < this.coordinates.length; i++) {
28260      {
28261        if (i > 0) if (format === AlgebraicField.VEF_FORMAT || format === AlgebraicField.ZOMIC_FORMAT) buf.append(" ");
28262        else buf.append(", ");
28263        this.coordinates[i].getNumberExpression(buf, format);
28264      }
28265      ;
28266    }
28267    if (format === AlgebraicField.DEFAULT_FORMAT) buf.append(")");
28268  }
28269  /**
28270   * 
28271   * @param {java.lang.StringBuffer} buf a StringBuffer to which the formatted vector will be appended.
28272   * @param {number} format may be any of the following:
28273   * {@code AlgebraicField.DEFAULT_FORMAT = 0;    // 4 + 3φ}
28274   * {@code AlgebraicField.EXPRESSION_FORMAT = 1; // 4 +3*phi}
28275   * {@code AlgebraicField.ZOMIC_FORMAT = 2;      // 4 3}
28276   * {@code AlgebraicField.VEF_FORMAT = 3;        // (3,4)}
28277   * {@code AlgebraicField.MATHML_FORMAT = 4;     // Use getMathML()}
28278   * {@code AlgebraicField.MATH_FORMAT = 5;       // Originally used in JavaScript parts panel, not in Java}
28279   */
28280  getVectorExpression(buf, format) {
28281    if ((buf != null && buf instanceof java.lang.StringBuffer || buf === null) && (typeof format === "number" || format === null)) {
28282      return this.getVectorExpression$java_lang_StringBuffer$int(buf, format);
28283    } else if ((typeof buf === "number" || buf === null) && format === void 0) {
28284      return this.getVectorExpression$int(buf);
28285    } else throw new Error("invalid overload");
28286  }
28287  getVectorExpression$int(format) {
28288    const buf = new java.lang.StringBuffer();
28289    this.getVectorExpression$java_lang_StringBuffer$int(buf, format);
28290    return buf.toString();
28291  }
28292  dot(that) {
28293    let result = this.field.zero();
28294    for (let i = 0; i < that.dimension(); i++) {
28295      {
28296        result = result["plus$com_vzome_core_algebra_AlgebraicNumber"](this.coordinates[i]["times$com_vzome_core_algebra_AlgebraicNumber"](that.coordinates[i]));
28297      }
28298      ;
28299    }
28300    return result;
28301  }
28302  getLength(unit) {
28303    for (let i = 0; i < this.coordinates.length; i++) {
28304      {
28305        if (this.coordinates[i].isZero()) continue;
28306        return this.coordinates[i].dividedBy(unit.coordinates[i]);
28307      }
28308      ;
28309    }
28310    throw new java.lang.IllegalStateException("vector is the origin!");
28311  }
28312  getField() {
28313    return this.field;
28314  }
28315};
28316AlgebraicVector["__class"] = "com.vzome.core.algebra.AlgebraicVector";
28317AlgebraicVector["__interfaces"] = ["java.lang.Comparable"];
28318
28319// src/worker/legacy/from-java/com/vzome/core/algebra/AlgebraicVectors.ts
28320var AlgebraicVectors = class _AlgebraicVectors {
28321  constructor() {
28322  }
28323  static getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v1, v2) {
28324    return v1.cross(v2);
28325  }
28326  static getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v0, v1, v2) {
28327    return _AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v1.minus(v0), v2.minus(v0));
28328  }
28329  /**
28330   * 
28331   * @param {AlgebraicVector} v0
28332   * @param {AlgebraicVector} v1
28333   * @param {AlgebraicVector} v2
28334   * @return {AlgebraicVector} normal to vectors v1 and v2,
28335   * with both v1 and v2 positioned at v0
28336   * using the righthand rule.
28337   */
28338  static getNormal(v0, v1, v2) {
28339    if ((v0 != null && v0 instanceof AlgebraicVector || v0 === null) && (v1 != null && v1 instanceof AlgebraicVector || v1 === null) && (v2 != null && v2 instanceof AlgebraicVector || v2 === null)) {
28340      return _AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v0, v1, v2);
28341    } else if ((v0 != null && v0 instanceof AlgebraicVector || v0 === null) && (v1 != null && v1 instanceof AlgebraicVector || v1 === null) && v2 === void 0) {
28342      return _AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v0, v1);
28343    } else if ((v0 != null && (v0.constructor != null && v0.constructor["__interfaces"] != null && v0.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || v0 === null) && v1 === void 0 && v2 === void 0) {
28344      return _AlgebraicVectors.getNormal$java_util_Collection(v0);
28345    } else throw new Error("invalid overload");
28346  }
28347  /**
28348   * 
28349   * @param {AlgebraicVector} v1
28350   * @param {AlgebraicVector} v2
28351   * @return {boolean} true if vectors v1 and v2 are parallel, otherwise false.
28352   * Considered as position vectors, this is the same as testing if they are collinear with the origin.
28353   */
28354  static areParallel(v1, v2) {
28355    return _AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v1, v2).isOrigin();
28356  }
28357  static getNormal$java_util_Collection(vectors) {
28358    if (vectors.size() < 3) {
28359      throw new java.lang.IllegalArgumentException("Three vertices are required to calculate a normal. Found " + vectors.size());
28360    }
28361    let v0 = null;
28362    let v1 = null;
28363    let normal = null;
28364    for (let index = vectors.iterator(); index.hasNext(); ) {
28365      let vector = index.next();
28366      {
28367        if (v0 == null) {
28368          v0 = vector;
28369        } else if (v1 == null) {
28370          if (vector !== v0) {
28371            v1 = vector;
28372          }
28373        } else {
28374          normal = _AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v0, v1, vector);
28375          if (!normal.isOrigin()) {
28376            return normal;
28377          }
28378        }
28379      }
28380    }
28381    return normal;
28382  }
28383  /**
28384   * 
28385   * @param {AlgebraicVector} vector
28386   * @return {number} index of the vector component having the greatest absolute value.
28387   * If more than one component has the same absolute value,
28388   * the greatest index will be returned.
28389   */
28390  static getMaxComponentIndex(vector) {
28391    let maxIndex = 0;
28392    let maxSq = vector.getField().zero();
28393    for (let i = 0; i < vector.dimension(); i++) {
28394      {
28395        const n = vector.getComponent(i);
28396        const sq = n["times$com_vzome_core_algebra_AlgebraicNumber"](n);
28397        if (!sq.lessThan(maxSq)) {
28398          maxIndex = i;
28399          maxSq = sq;
28400        }
28401      }
28402      ;
28403    }
28404    return maxIndex;
28405  }
28406  static areCoplanar(vectors) {
28407    if (vectors.size() < 4) {
28408      return true;
28409    }
28410    const normal = _AlgebraicVectors.getNormal$java_util_Collection(vectors);
28411    if (normal.isOrigin() || normal.dimension() < 3) {
28412      return true;
28413    }
28414    return _AlgebraicVectors.areOrthogonalTo(normal, vectors);
28415  }
28416  static areOrthogonalTo(normal, vectors) {
28417    if (normal.isOrigin()) {
28418      throw new java.lang.IllegalArgumentException("Normal vector cannot be the origin");
28419    }
28420    let v0 = null;
28421    for (let index = vectors.iterator(); index.hasNext(); ) {
28422      let vector = index.next();
28423      {
28424        if (v0 == null) {
28425          v0 = vector;
28426        } else if (!vector.minus(v0).dot(normal).isZero()) {
28427          return false;
28428        }
28429      }
28430    }
28431    return true;
28432  }
28433  static areCollinear$java_util_Collection(vectors) {
28434    return vectors.size() < 3 ? true : _AlgebraicVectors.getNormal$java_util_Collection(vectors).isOrigin();
28435  }
28436  static areCollinear$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v0, v1, v2) {
28437    return _AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v0, v1, v2).isOrigin();
28438  }
28439  /**
28440   * 
28441   * @param {AlgebraicVector} v0
28442   * @param {AlgebraicVector} v1
28443   * @param {AlgebraicVector} v2
28444   * @return {boolean} true if position vectors v0, v1 and v2 are collinear, otherwise false.
28445   */
28446  static areCollinear(v0, v1, v2) {
28447    if ((v0 != null && v0 instanceof AlgebraicVector || v0 === null) && (v1 != null && v1 instanceof AlgebraicVector || v1 === null) && (v2 != null && v2 instanceof AlgebraicVector || v2 === null)) {
28448      return _AlgebraicVectors.areCollinear$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v0, v1, v2);
28449    } else if ((v0 != null && (v0.constructor != null && v0.constructor["__interfaces"] != null && v0.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || v0 === null) && v1 === void 0 && v2 === void 0) {
28450      return _AlgebraicVectors.areCollinear$java_util_Collection(v0);
28451    } else throw new Error("invalid overload");
28452  }
28453  static getLinePlaneIntersection(lineStart, lineDirection, planeCenter, planeNormal) {
28454    const denom = planeNormal.dot(lineDirection);
28455    if (denom.isZero()) return null;
28456    const p1p3 = planeCenter.minus(lineStart);
28457    const numerator = planeNormal.dot(p1p3);
28458    const u = numerator.dividedBy(denom);
28459    return lineStart.plus(lineDirection.scale(u));
28460  }
28461  static calculateCentroid(vectors) {
28462    return _AlgebraicVectors.getCentroid(vectors.toArray(((s) => {
28463      let a = [];
28464      while (s-- > 0) a.push(null);
28465      return a;
28466    })(vectors.size())));
28467  }
28468  static getCentroid(vectors) {
28469    const field = vectors[0].getField();
28470    let sum = new AlgebraicVector(field, vectors[0].dimension());
28471    for (let index = 0; index < vectors.length; index++) {
28472      let vector = vectors[index];
28473      {
28474        sum = sum.plus(vector);
28475      }
28476    }
28477    return sum.scale(field["createRational$long$long"](1, vectors.length));
28478  }
28479  static getMagnitudeSquared(v) {
28480    return v.dot(v);
28481  }
28482  /**
28483   * @param {AlgebraicVector} vector
28484   * @return {AlgebraicVector} the greater of {@code vector} and its inverse.
28485   * The comparison is based on a canonical (not mathematical) comparison as implemented in {@code AlgebraicVector.compareTo()}.
28486   * There is no reasonable mathematical sense of ordering vectors,
28487   * but this provides a way to map a vector and its inverse to a common vector for such purposes as sorting and color mapping.
28488   */
28489  static getCanonicalOrientation(vector) {
28490    const negate = vector.negate();
28491    return vector.compareTo(negate) > 0 ? vector : negate;
28492  }
28493  /**
28494   * getMostDistantFromOrigin() is is used by a few ColorMapper classes, but I think it can eventually be useful elsewhere as well, for example, a zoom-to-fit command or in deriving a convex hull. I've made it a static method of the AlgebraicVector class to encourage such reuse.
28495   * 
28496   * @param {*} vectors A collection of vectors to be evaluated.
28497   * @return {java.util.TreeSet} A canonically sorted subset (maybe all) of the {@code vectors} collection. All of the returned vectors will be the same distance from the origin. That distance will be the maximum distance from the origin of any of the vectors in the original collection. If the original collection contains only the origin then so will the result.
28498   */
28499  static getMostDistantFromOrigin(vectors) {
28500    const mostDistant = new java.util.TreeSet();
28501    let maxDistanceSquared = 0;
28502    for (let index = vectors.iterator(); index.hasNext(); ) {
28503      let vector = index.next();
28504      {
28505        const magnitudeSquared = _AlgebraicVectors.getMagnitudeSquared(vector).evaluate();
28506        if (magnitudeSquared >= maxDistanceSquared) {
28507          if (magnitudeSquared > maxDistanceSquared) {
28508            mostDistant.clear();
28509          }
28510          maxDistanceSquared = magnitudeSquared;
28511          mostDistant.add(vector);
28512        }
28513      }
28514    }
28515    return mostDistant;
28516  }
28517};
28518AlgebraicVectors["__class"] = "com.vzome.core.algebra.AlgebraicVectors";
28519
28520// src/worker/legacy/from-java/com/vzome/core/algebra/Fields.ts
28521var Fields = class _Fields {
28522  static rows(matrix) {
28523    return matrix.length;
28524  }
28525  static columns(matrix) {
28526    return matrix[0].length;
28527  }
28528  static matrixMultiplication(left, right, product) {
28529    if (_Fields.rows(right) !== _Fields.columns(left)) throw new java.lang.IllegalArgumentException("matrices cannot be multiplied");
28530    if (_Fields.rows(product) !== _Fields.rows(left)) throw new java.lang.IllegalArgumentException("product matrix has wrong number of rows");
28531    if (_Fields.columns(right) !== _Fields.columns(product)) throw new java.lang.IllegalArgumentException("product matrix has wrong number of columns");
28532    for (let i = 0; i < _Fields.rows(product); i++) {
28533      {
28534        for (let j = 0; j < _Fields.columns(product); j++) {
28535          {
28536            let sum = null;
28537            for (let j2 = 0; j2 < _Fields.columns(left); j2++) {
28538              {
28539                const prod = left[i][j2].times(right[j2][j]);
28540                if (sum == null) sum = prod;
28541                else sum = sum.plus(prod);
28542              }
28543              ;
28544            }
28545            product[i][j] = sum;
28546          }
28547          ;
28548        }
28549      }
28550      ;
28551    }
28552  }
28553  static gaussJordanReduction$com_vzome_core_algebra_Fields_Element_A_A(matrix) {
28554    return _Fields.gaussJordanReduction$com_vzome_core_algebra_Fields_Element_A_A$com_vzome_core_algebra_Fields_Element_A_A(matrix, matrix);
28555  }
28556  static gaussJordanReduction$com_vzome_core_algebra_Fields_Element_A_A$com_vzome_core_algebra_Fields_Element_A_A(immutableMatrix, adjoined) {
28557    const nRows = _Fields.rows(immutableMatrix);
28558    const matrix = _Fields.copyOf(immutableMatrix);
28559    let rank = 0;
28560    for (let col = 0; col < _Fields.columns(matrix); col++) {
28561      {
28562        let pivotRow = -1;
28563        for (let row = rank; row < nRows; row++) {
28564          {
28565            const element = matrix[row][col];
28566            if (!element.isZero()) {
28567              pivotRow = row;
28568              break;
28569            }
28570          }
28571          ;
28572        }
28573        if (pivotRow >= 0) {
28574          if (pivotRow !== rank) {
28575            _Fields.swap(matrix, rank, pivotRow);
28576            _Fields.swap(adjoined, rank, pivotRow);
28577            pivotRow = rank;
28578          }
28579          let scalar = matrix[pivotRow][col];
28580          if (!scalar.isOne()) {
28581            scalar = scalar.reciprocal();
28582            _Fields.scale(matrix[pivotRow], scalar);
28583            _Fields.scale(adjoined[pivotRow], scalar);
28584          }
28585          for (let row = 0; row < nRows; row++) {
28586            {
28587              if (row !== pivotRow) {
28588                scalar = matrix[row][col];
28589                if (!scalar.isZero()) {
28590                  scalar = scalar.negate();
28591                  _Fields.pivot(matrix, row, scalar, pivotRow);
28592                  _Fields.pivot(adjoined, row, scalar, pivotRow);
28593                }
28594              }
28595            }
28596            ;
28597          }
28598          rank++;
28599        }
28600      }
28601      ;
28602    }
28603    return rank;
28604  }
28605  static gaussJordanReduction(immutableMatrix, adjoined) {
28606    if ((immutableMatrix != null && immutableMatrix instanceof Array && (immutableMatrix.length == 0 || immutableMatrix[0] == null || immutableMatrix[0] instanceof Array) || immutableMatrix === null) && (adjoined != null && adjoined instanceof Array && (adjoined.length == 0 || adjoined[0] == null || adjoined[0] instanceof Array) || adjoined === null)) {
28607      return _Fields.gaussJordanReduction$com_vzome_core_algebra_Fields_Element_A_A$com_vzome_core_algebra_Fields_Element_A_A(immutableMatrix, adjoined);
28608    } else if ((immutableMatrix != null && immutableMatrix instanceof Array && (immutableMatrix.length == 0 || immutableMatrix[0] == null || immutableMatrix[0] instanceof Array) || immutableMatrix === null) && adjoined === void 0) {
28609      return _Fields.gaussJordanReduction$com_vzome_core_algebra_Fields_Element_A_A(immutableMatrix);
28610    } else throw new Error("invalid overload");
28611  }
28612  static copyOf(matrix) {
28613    const nRows = _Fields.rows(matrix);
28614    const nCols = _Fields.columns(matrix);
28615    const copy = ((s) => {
28616      let a = [];
28617      while (s-- > 0) a.push(null);
28618      return a;
28619    })(nRows);
28620    for (let i = 0; i < nRows; i++) {
28621      {
28622        copy[i] = java.util.Arrays.copyOf(matrix[i], nCols);
28623      }
28624      ;
28625    }
28626    return copy;
28627  }
28628  /**
28629   * 
28630   * @param {java.lang.Object[]} array of elements to be swapped
28631   * @param {number} r index of the first element to be swapped
28632   * @param {number} s index of the second element to be swapped
28633   * <br/>
28634   * Note that since Java implements a multi-dimensional array as an array of arrays,
28635   * the {@code array} parameter can be an {@code Object[][]} in which case
28636   * entire rows are swapped rather than an element at a time.
28637   * Besides being more efficient at run time, this also means
28638   * that rows of multi-dimensional arrays do not necessarily have to be the same length.
28639   * @private
28640   */
28641  static swap(array, r, s) {
28642    const temp = array[r];
28643    array[r] = array[s];
28644    array[s] = temp;
28645  }
28646  static scale(array, scalar) {
28647    for (let col = 0; col < array.length; col++) {
28648      {
28649        array[col] = scalar.times(array[col]);
28650      }
28651      ;
28652    }
28653  }
28654  static pivot(matrix, row, scalar, rank) {
28655    for (let col = 0; col < _Fields.columns(matrix); col++) {
28656      {
28657        matrix[row][col] = matrix[row][col].plus(matrix[rank][col].times(scalar));
28658      }
28659      ;
28660    }
28661  }
28662};
28663Fields["__class"] = "com.vzome.core.algebra.Fields";
28664
28665// src/worker/legacy/from-java/com/vzome/core/algebra/AlgebraicMatrix.ts
28666var AlgebraicMatrix = class _AlgebraicMatrix {
28667  /**
28668   * 
28669   * @return {number}
28670   */
28671  hashCode() {
28672    const prime = 31;
28673    let result = 1;
28674    for (let index = 0; index < this.matrix.length; index++) {
28675      let m = this.matrix[index];
28676      {
28677        result = prime * result + java.util.Arrays.hashCode(m);
28678      }
28679    }
28680    return result;
28681  }
28682  /**
28683   * 
28684   * @param {*} obj
28685   * @return {boolean}
28686   */
28687  equals(obj) {
28688    if (this === obj) return true;
28689    if (obj == null) return false;
28690    if (this.constructor !== obj.constructor) return false;
28691    const other = obj;
28692    return java.util.Arrays.deepEquals(this.matrix, other.matrix);
28693  }
28694  getMatrix() {
28695    return this.matrix;
28696  }
28697  getRowMajorRealElements() {
28698    const result = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
28699    for (let i = 0; i < 3; i++) {
28700      {
28701        for (let j = 0; j < 3; j++) {
28702          {
28703            result[i * 4 + j] = Math.fround(this.getElement(i, j).evaluate());
28704          }
28705          ;
28706        }
28707      }
28708      ;
28709    }
28710    return result;
28711  }
28712  constructor(x, y, z, w) {
28713    if ((x != null && x instanceof AlgebraicVector || x === null) && (y != null && y instanceof AlgebraicVector || y === null) && (z != null && z instanceof AlgebraicVector || z === null) && (w != null && w instanceof AlgebraicVector || w === null)) {
28714      let __args = arguments;
28715      {
28716        let __args2 = arguments;
28717        let columns = [x, y, z, w];
28718        if (this.matrix === void 0) {
28719          this.matrix = null;
28720        }
28721        const rows = columns[0].dimension();
28722        const cols = columns.length;
28723        this.matrix = (function(dims) {
28724          let allocate = function(dims2) {
28725            if (dims2.length === 0) {
28726              return null;
28727            } else {
28728              let array = [];
28729              for (let i = 0; i < dims2[0]; i++) {
28730                array.push(allocate(dims2.slice(1)));
28731              }
28732              return array;
28733            }
28734          };
28735          return allocate(dims);
28736        })([rows, cols]);
28737        for (let i = 0; i < rows; i++) {
28738          {
28739            for (let j = 0; j < cols; j++) {
28740              {
28741                this.matrix[i][j] = columns[j].getComponent(i);
28742              }
28743              ;
28744            }
28745          }
28746          ;
28747        }
28748      }
28749    } else if ((x != null && x instanceof AlgebraicVector || x === null) && (y != null && y instanceof AlgebraicVector || y === null) && (z != null && z instanceof AlgebraicVector || z === null) && w === void 0) {
28750      let __args = arguments;
28751      {
28752        let __args2 = arguments;
28753        let columns = [x, y, z];
28754        if (this.matrix === void 0) {
28755          this.matrix = null;
28756        }
28757        const rows = columns[0].dimension();
28758        const cols = columns.length;
28759        this.matrix = (function(dims) {
28760          let allocate = function(dims2) {
28761            if (dims2.length === 0) {
28762              return null;
28763            } else {
28764              let array = [];
28765              for (let i = 0; i < dims2[0]; i++) {
28766                array.push(allocate(dims2.slice(1)));
28767              }
28768              return array;
28769            }
28770          };
28771          return allocate(dims);
28772        })([rows, cols]);
28773        for (let i = 0; i < rows; i++) {
28774          {
28775            for (let j = 0; j < cols; j++) {
28776              {
28777                this.matrix[i][j] = columns[j].getComponent(i);
28778              }
28779              ;
28780            }
28781          }
28782          ;
28783        }
28784      }
28785    } else if ((x != null && (x.constructor != null && x.constructor["__interfaces"] != null && x.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || x === null) && (typeof y === "number" || y === null) && (typeof z === "number" || z === null) && w === void 0) {
28786      let __args = arguments;
28787      let field = __args[0];
28788      let rows = __args[1];
28789      let cols = __args[2];
28790      if (this.matrix === void 0) {
28791        this.matrix = null;
28792      }
28793      this.matrix = (function(dims) {
28794        let allocate = function(dims2) {
28795          if (dims2.length === 0) {
28796            return null;
28797          } else {
28798            let array = [];
28799            for (let i = 0; i < dims2[0]; i++) {
28800              array.push(allocate(dims2.slice(1)));
28801            }
28802            return array;
28803          }
28804        };
28805        return allocate(dims);
28806      })([rows, cols]);
28807      for (let i = 0; i < rows; i++) {
28808        {
28809          for (let j = 0; j < cols; j++) {
28810            {
28811              this.matrix[i][j] = field.zero();
28812            }
28813            ;
28814          }
28815        }
28816        ;
28817      }
28818    } else if ((x != null && x instanceof AlgebraicVector || x === null) && (y != null && y instanceof AlgebraicVector || y === null) && z === void 0 && w === void 0) {
28819      let __args = arguments;
28820      {
28821        let __args2 = arguments;
28822        let columns = [x, y];
28823        if (this.matrix === void 0) {
28824          this.matrix = null;
28825        }
28826        const rows = columns[0].dimension();
28827        const cols = columns.length;
28828        this.matrix = (function(dims) {
28829          let allocate = function(dims2) {
28830            if (dims2.length === 0) {
28831              return null;
28832            } else {
28833              let array = [];
28834              for (let i = 0; i < dims2[0]; i++) {
28835                array.push(allocate(dims2.slice(1)));
28836              }
28837              return array;
28838            }
28839          };
28840          return allocate(dims);
28841        })([rows, cols]);
28842        for (let i = 0; i < rows; i++) {
28843          {
28844            for (let j = 0; j < cols; j++) {
28845              {
28846                this.matrix[i][j] = columns[j].getComponent(i);
28847              }
28848              ;
28849            }
28850          }
28851          ;
28852        }
28853      }
28854    } else if ((x != null && (x.constructor != null && x.constructor["__interfaces"] != null && x.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >
28854= 0) || x === null) && (typeof y === "number" || y === null) && z === void 0 && w === void 0) {
28855      let __args = arguments;
28856      let field = __args[0];
28857      let dim = __args[1];
28858      if (this.matrix === void 0) {
28859        this.matrix = null;
28860      }
28861      this.matrix = (function(dims) {
28862        let allocate = function(dims2) {
28863          if (dims2.length === 0) {
28864            return null;
28865          } else {
28866            let array = [];
28867            for (let i = 0; i < dims2[0]; i++) {
28868              array.push(allocate(dims2.slice(1)));
28869            }
28870            return array;
28871          }
28872        };
28873        return allocate(dims);
28874      })([dim, dim]);
28875      for (let i = 0; i < dim; i++) {
28876        {
28877          for (let j = 0; j < dim; j++) {
28878            {
28879              if (i === j) this.matrix[i][j] = field.one();
28880              else this.matrix[i][j] = field.zero();
28881            }
28882            ;
28883          }
28884        }
28885        ;
28886      }
28887    } else if ((x != null && x instanceof Array && (x.length == 0 || x[0] == null || x[0] != null && x[0] instanceof AlgebraicVector) || x === null) && y === void 0 && z === void 0 && w === void 0) {
28888      let __args = arguments;
28889      let columns = __args[0];
28890      if (this.matrix === void 0) {
28891        this.matrix = null;
28892      }
28893      const rows = columns[0].dimension();
28894      const cols = columns.length;
28895      this.matrix = (function(dims) {
28896        let allocate = function(dims2) {
28897          if (dims2.length === 0) {
28898            return null;
28899          } else {
28900            let array = [];
28901            for (let i = 0; i < dims2[0]; i++) {
28902              array.push(allocate(dims2.slice(1)));
28903            }
28904            return array;
28905          }
28906        };
28907        return allocate(dims);
28908      })([rows, cols]);
28909      for (let i = 0; i < rows; i++) {
28910        {
28911          for (let j = 0; j < cols; j++) {
28912            {
28913              this.matrix[i][j] = columns[j].getComponent(i);
28914            }
28915            ;
28916          }
28917        }
28918        ;
28919      }
28920    } else throw new Error("invalid overload");
28921  }
28922  /**
28923   * 
28924   * @return {string}
28925   */
28926  toString() {
28927    const buf = new java.lang.StringBuilder();
28928    for (let index = 0; index < this.matrix.length; index++) {
28929      let m = this.matrix[index];
28930      {
28931        buf.append(java.util.Arrays.toString(m));
28932        buf.append(", ");
28933      }
28934    }
28935    return "[ " + buf.toString() + " ]";
28936  }
28937  negate() {
28938    const field = this.matrix[0][0].getField();
28939    const result = new _AlgebraicMatrix(field, this.matrix.length);
28940    for (let i = 0; i < this.matrix.length; i++) {
28941      {
28942        for (let j = 0; j < this.matrix[i].length; j++) {
28943          {
28944            result.matrix[i][j] = this.matrix[i][j].negate();
28945          }
28946          ;
28947        }
28948      }
28949      ;
28950    }
28951    return result;
28952  }
28953  inverse() {
28954    if (!this.isSquare()) {
28955      throw new java.lang.IllegalArgumentException("matrix is not square");
28956    }
28957    const field = this.matrix[0][0].getField();
28958    const result = new _AlgebraicMatrix(field, this.matrix.length);
28959    const rank = Fields.gaussJordanReduction$com_vzome_core_algebra_Fields_Element_A_A$com_vzome_core_algebra_Fields_Element_A_A(this.matrix, result.matrix);
28960    if (rank !== this.matrix.length) {
28961      const message = "AlgebraicMatrix inverse expects matrix rank to be " + this.matrix.length + ", but it is " + rank + ".";
28962      console.error(message);
28963    }
28964    return result;
28965  }
28966  transpose() {
28967    const field = this.matrix[0][0].getField();
28968    const result = new _AlgebraicMatrix(field, this.matrix[0].length, this.matrix.length);
28969    for (let i = 0; i < result.matrix.length; i++) {
28970      {
28971        for (let j = 0; j < this.matrix.length; j++) {
28972          {
28973            result.matrix[i][j] = this.matrix[j][i];
28974          }
28975          ;
28976        }
28977      }
28978      ;
28979    }
28980    return result;
28981  }
28982  times(that) {
28983    const field = this.matrix[0][0].getField();
28984    const result = new _AlgebraicMatrix(field, this.matrix.length, that.matrix[0].length);
28985    Fields.matrixMultiplication(this.matrix, that.matrix, result.matrix);
28986    return result;
28987  }
28988  timesRow(rowVector) {
28989    const colLength = rowVector.dimension();
28990    if (this.matrix.length !== colLength) throw new java.lang.IllegalArgumentException("vector length incorrect for this matrix: " + rowVector);
28991    const rowLength = this.matrix[0].length;
28992    const resultComponents = ((s) => {
28993      let a = [];
28994      while (s-- > 0) a.push(null);
28995      return a;
28996    })(rowLength);
28997    const field = this.matrix[0][0].getField();
28998    for (let j = 0; j < rowLength; j++) {
28999      {
29000        resultComponents[j] = field.zero();
29001        for (let i = 0; i < colLength; i++) {
29002          {
29003            const product = rowVector.getComponent(i)["times$com_vzome_core_algebra_AlgebraicNumber"](this.matrix[i][j]);
29004            resultComponents[j] = resultComponents[j]["plus$com_vzome_core_algebra_AlgebraicNumber"](product);
29005          }
29006          ;
29007        }
29008      }
29009      ;
29010    }
29011    return new AlgebraicVector(resultComponents);
29012  }
29013  timesColumn(columnVector) {
29014    const rowLength = columnVector.dimension();
29015    if (this.matrix[0].length !== rowLength) throw new java.lang.IllegalArgumentException("vector length incorrect for this matrix: " + columnVector);
29016    const colLength = this.matrix.length;
29017    const resultComponents = ((s) => {
29018      let a = [];
29019      while (s-- > 0) a.push(null);
29020      return a;
29021    })(colLength);
29022    const field = this.matrix[0][0].getField();
29023    for (let i = 0; i < colLength; i++) {
29024      {
29025        resultComponents[i] = field.zero();
29026        for (let j = 0; j < rowLength; j++) {
29027          {
29028            const product = columnVector.getComponent(j)["times$com_vzome_core_algebra_AlgebraicNumber"](this.matrix[i][j]);
29029            resultComponents[i] = resultComponents[i]["plus$com_vzome_core_algebra_AlgebraicNumber"](product);
29030          }
29031          ;
29032        }
29033      }
29034      ;
29035    }
29036    return new AlgebraicVector(resultComponents);
29037  }
29038  timesScalar(scalar) {
29039    const result = new _AlgebraicMatrix(scalar.getField(), this.matrix.length);
29040    for (let i = 0; i < this.matrix.length; i++) {
29041      {
29042        for (let j = 0; j < this.matrix[i].length; j++) {
29043          {
29044            result.matrix[i][j] = this.matrix[i][j]["times$com_vzome_core_algebra_AlgebraicNumber"](scalar);
29045          }
29046          ;
29047        }
29048      }
29049      ;
29050    }
29051    return result;
29052  }
29053  isSquare() {
29054    return this.matrix.length === this.matrix[0].length;
29055  }
29056  trace() {
29057    if (!this.isSquare()) {
29058      throw new java.lang.IllegalArgumentException("matrix is not square");
29059    }
29060    let trace = this.matrix[0][0].getField().zero();
29061    for (let i = 0; i < this.matrix.length; i++) {
29062      {
29063        trace = trace["plus$com_vzome_core_algebra_AlgebraicNumber"](this.matrix[i][i]);
29064      }
29065      ;
29066    }
29067    return trace;
29068  }
29069  determinant() {
29070    return _AlgebraicMatrix.laplaceDeterminant(this.matrix);
29071  }
29072  static laplaceDeterminant(matrix) {
29073    if (matrix.length !== matrix[0].length) {
29074      throw new java.lang.IllegalArgumentException("matrix is not square");
29075    }
29076    let determinant = null;
29077    switch (matrix.length) {
29078      case 3:
29079        determinant = matrix[0][0]["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[1][1])["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[2][2])["plus$com_vzome_core_algebra_AlgebraicNumber"](matrix[0][1]["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[1][2])["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[2][0]))["plus$com_vzome_core_algebra_AlgebraicNumber"](matrix[0][2]["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[1][0])["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[2][1]))["minus$com_vzome_core_algebra_AlgebraicNumber"](matrix[0][2]["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[1][1])["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[2][0]))["minus$com_vzome_core_algebra_AlgebraicNumber"](matrix[0][0]["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[1][2])["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[2][1]))["minus$com_vzome_core_algebra_AlgebraicNumber"](matrix[0][1]["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[1][0])["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[2][2]));
29080        break;
29081      case 2:
29082        determinant = matrix[0][0]["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[1][1])["minus$com_vzome_core_algebra_AlgebraicNumber"](matrix[0][1]["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[1][0]));
29083        break;
29084      case 1:
29085        determinant = matrix[0][0];
29086        break;
29087      default:
29088        determinant = matrix[0][0].getField().zero();
29089        const auxLength = matrix.length - 1;
29090        let sign = matrix[0][0].getField().one();
29091        for (let i = 0; i < matrix.length; i++) {
29092          {
29093            if (!matrix[0][i].isZero()) {
29094              const aux = (function(dims) {
29095                let allocate = function(dims2) {
29096                  if (dims2.length === 0) {
29097                    return null;
29098                  } else {
29099                    let array = [];
29100                    for (let i2 = 0; i2 < dims2[0]; i2++) {
29101                      array.push(allocate(dims2.slice(1)));
29102                    }
29103                    return array;
29104                  }
29105                };
29106                return allocate(dims);
29107              })([auxLength, auxLength]);
29108              let iAux = 0;
29109              let jAux = 0;
29110              for (let row = 1; row < matrix.length; row++) {
29111                {
29112                  for (let col = 0; col < matrix.length; col++) {
29113                    {
29114                      if (col !== i) {
29115                        aux[iAux][jAux] = matrix[row][col];
29116                        jAux++;
29117                      }
29118                    }
29119                    ;
29120                  }
29121                  iAux++;
29122                  jAux = 0;
29123                }
29124                ;
29125              }
29126              determinant = determinant["plus$com_vzome_core_algebra_AlgebraicNumber"](sign["times$com_vzome_core_algebra_AlgebraicNumber"](matrix[0][i])["times$com_vzome_core_algebra_AlgebraicNumber"](_AlgebraicMatrix.laplaceDeterminant(aux)));
29127            }
29128            sign = sign.negate();
29129          }
29130          ;
29131        }
29132    }
29133    return determinant;
29134  }
29135  setElement(i, j, value) {
29136    this.matrix[i][j] = value;
29137    return this;
29138  }
29139  getElement(i, j) {
29140    return this.matrix[i][j];
29141  }
29142};
29143AlgebraicMatrix["__class"] = "com.vzome.core.algebra.AlgebraicMatrix";
29144
29145// src/worker/legacy/from-java/java/io/StringWriter.ts
29146var StringWriter = class extends java.io.Writer {
29147  constructor() {
29148    super();
29149    if (this.baos === void 0) {
29150      this.baos = null;
29151    }
29152    if (this.w === void 0) {
29153      this.w = null;
29154    }
29155    this.baos = new java.io.ByteArrayOutputStream();
29156    this.w = new java.io.OutputStreamWriter(this.baos);
29157  }
29158  toString() {
29159    return this.baos.toString();
29160  }
29161  flush() {
29162    try {
29163      this.w.flush();
29164    } catch (e) {
29165      console.error(e.message, e);
29166    }
29167  }
29168  close() {
29169    try {
29170      this.w.close();
29171    } catch (e) {
29172      console.error(e.message, e);
29173    }
29174  }
29175  write(cbuf, off, len) {
29176    try {
29177      this.w.write(cbuf, off, len);
29178    } catch (e) {
29179      console.error(e.message, e);
29180    }
29181  }
29182};
29183StringWriter["__class"] = "java.io.StringWriter";
29184StringWriter["__interfaces"] = ["java.lang.Appendable", "java.io.Closeable", "java.lang.AutoCloseable", "java.io.Flushable"];
29185
29186// src/worker/legacy/from-java/com/vzome/core/construction/Construction.ts
29187var Construction = class {
29188  constructor(field) {
29189    if (this.field === void 0) {
29190      this.field = null;
29191    }
29192    this.mImpossible = false;
29193    this.mIndex = -1;
29194    this.__failed = false;
29195    if (this.color === void 0) {
29196      this.color = null;
29197    }
29198    this.field = field;
29199  }
29200  getField() {
29201    return this.field;
29202  }
29203  setIndex(index) {
29204    this.mIndex = index;
29205  }
29206  getIndex() {
29207    return this.mIndex;
29208  }
29209  isImpossible() {
29210    return this.mImpossible;
29211  }
29212  setImpossible(value) {
29213    this.mImpossible = value;
29214  }
29215  setFailed() {
29216    this.__failed = true;
29217  }
29218  failed() {
29219    return this.__failed;
29220  }
29221  setColor(color) {
29222    this.color = color;
29223  }
29224  getColor() {
29225    return this.color;
29226  }
29227  getSignature() {
29228    return "";
29229  }
29230};
29231Construction["__class"] = "com.vzome.core.construction.Construction";
29232
29233// src/worker/legacy/from-java/com/vzome/core/construction/Point.ts
29234var Point = class extends Construction {
29235  constructor(field) {
29236    super(field);
29237    if (this.mLocation === void 0) {
29238      this.mLocation = null;
29239    }
29240  }
29241  getSignature() {
29242    return this.mLocation.projectTo3d(true).toString();
29243  }
29244  /**
29245   * 
29246   * @return {boolean}
29247   */
29248  is3d() {
29249    return this.mLocation.dimension() === 3;
29250  }
29251  setStateVariable(loc, impossible) {
29252    if (impossible) {
29253      if (this.isImpossible()) return false;
29254      this.setImpossible(true);
29255      return true;
29256    }
29257    if (loc.equals(this.mLocation) && !this.isImpossible()) return false;
29258    this.mLocation = loc;
29259    this.setImpossible(false);
29260    return true;
29261  }
29262  getLocation() {
29263    return this.mLocation;
29264  }
29265  /**
29266   * 
29267   * @param {*} doc
29268   * @return {*}
29269   */
29270  getXml(doc) {
29271    const result = doc.createElement("point");
29272    result.setAttribute("at", this.getLocation().getVectorExpression$int(AlgebraicField.ZOMIC_FORMAT));
29273    return result;
29274  }
29275  /**
29276   * 
29277   * @return {string}
29278   */
29279  toString() {
29280    return "point at " + this.mLocation;
29281  }
29282};
29283Point["__class"] = "com.vzome.core.construction.Point";
29284
29285// src/worker/legacy/from-java/com/vzome/xml/DomUtils.ts
29286var DomUtils = class _DomUtils {
29287  static addAttribute(elem, name, value) {
29288    elem.setAttribute(name, value);
29289  }
29290  static getFirstChildElement$org_w3c_dom_Element$java_lang_String(elem, name) {
29291    const elems = elem.getElementsByTagName(name);
29292    return elems.item(0);
29293  }
29294  static getFirstChildElement(elem, name) {
29295    if ((elem != null && (elem.constructor != null && elem.constructor["__interfaces"] != null && elem.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0) || elem === null) && (typeof name === "string" || name === null)) {
29296      return _DomUtils.getFirstChildElement$org_w3c_dom_Element$java_lang_String(elem, name);
29297    } else if ((elem != null && (elem.constructor != null && elem.constructor["__interfaces"] != null && elem.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0) || elem === null) && name === void 0) {
29298      return _DomUtils.getFirstChildElement$org_w3c_dom_Element(elem);
29299    } else throw new Error("invalid overload");
29300  }
29301  static preserveSpace(contentElem) {
29302    contentElem.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
29303  }
29304  static getFirstChildElement$org_w3c_dom_Element(parent) {
29305    const children = parent.getChildNodes();
29306    if (children.getLength() === 0) return null;
29307    for (let k = 0; k < children.getLength(); k++) {
29308      {
29309        const kid = children.item(k);
29310        if (kid != null && (kid.constructor != null && kid.constructor["__interfaces"] != null && kid.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0)) {
29311          return kid;
29312        }
29313      }
29314      ;
29315    }
29316    return null;
29317  }
29318  static getChild(parent, i) {
29319    const children = parent.getChildNodes();
29320    if (children.getLength() === 0) return null;
29321    let count = 0;
29322    for (let k = 0; k < children.getLength(); k++) {
29323      {
29324        const kid = children.item(k);
29325        if (kid != null && (kid.constructor != null && kid.constructor["__interfaces"] != null && kid.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0)) {
29326          if (count === i) return kid;
29327          else ++count;
29328        }
29329      }
29330      ;
29331    }
29332    return null;
29333  }
29334  /**
29335   * This is required for JSweet, which ignores the radix in Integer.toString( i, 2 )
29336   * @param {number} i
29337   * @return
29338   * @return {string}
29339   */
29340  static byteToBinary(i) {
29341    let result = "";
29342    result += (i / 8 | 0) === 1 ? "1" : "0";
29343    i = i % 8;
29344    result += (i / 4 | 0) === 1 ? "1" : "0";
29345    i = i % 4;
29346    result += (i / 2 | 0) === 1 ? "1" : "0";
29347    i = i % 2;
29348    result += i === 1 ? "1" : "0";
29349    return result;
29350  }
29351};
29352DomUtils["__class"] = "com.vzome.xml.DomUtils";
29353
29354// src/worker/legacy/from-java/com/vzome/core/math/symmetry/Symmetry.ts
29355var Symmetry;
29356((Symmetry2) => {
29357  Symmetry2.PLUS = 0;
29358  Symmetry2.MINUS = 1;
29359  Symmetry2.NO_ROTATION = -1;
29360  Symmetry2.TETRAHEDRAL = "tetrahedral";
29361  Symmetry2.PYRITOHEDRAL = "pyritohedral";
29362})(Symmetry || (Symmetry = {}));
29363
29364// src/worker/legacy/from-java/com/vzome/core/math/symmetry/Direction.ts
29365var Direction = class _Direction {
29366  /**
29367   * 
29368   * @return {number}
29369   */
29370  hashCode() {
29371    const prime = 31;
29372    let result = 1;
29373    result = prime * result + this.index;
29374    result = prime * result + (this.mPrototype == null ? 0 : (
29375      /* hashCode */
29376      ((o) => {
29377        if (o.hashCode) {
29378          return o.hashCode();
29379        } else {
29380          return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0);
29381        }
29382      })(this.mPrototype)
29383    ));
29384    result = prime * result + (this.mSymmetryGroup == null ? 0 : (
29385      /* hashCode */
29386      ((o) => {
29387        if (o.hashCode) {
29388          return o.hashCode();
29389        } else {
29390          return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0);
29391        }
29392      })(this.mSymmetryGroup)
29393    ));
29394    return result;
29395  }
29396  /**
29397   * 
29398   * @param {*} obj
29399   * @return {boolean}
29400   */
29401  equals(obj) {
29402    if (this === obj) {
29403      return true;
29404    }
29405    if (obj == null) {
29406      return false;
29407    }
29408    if (this.constructor !== obj.constructor) {
29409      return false;
29410    }
29411    const other = obj;
29412    if (this.index !== other.index) {
29413      return false;
29414    }
29415    if (this.mPrototype == null) {
29416      if (other.mPrototype != null) {
29417        return false;
29418      }
29419    } else if (!this.mPrototype.equals(other.mPrototype)) {
29420      return false;
29421    }
29422    if (this.mSymmetryGroup == null) {
29423      if (other.mSymmetryGroup != null) {
29424        return false;
29425      }
29426    } else if (!/* equals */
29427    ((o1, o2) => {
29428      if (o1 && o1.equals) {
29429        return o1.equals(o2);
29430      } else {
29431        return o1 === o2;
29432      }
29433    })(this.mSymmetryGroup, other.mSymmetryGroup)) {
29434      return false;
29435    }
29436    return true;
29437  }
29438  static logger_$LI$() {
29439    if (_Direction.logger == null) {
29440      _Direction.logger = java.util.logging.Logger.getLogger("com.vzome.core.math.symmetry.Orbit");
29441    }
29442    return _Direction.logger;
29443  }
29444  setAutomatic(auto) {
29445    this.mAutomatic = auto;
29446  }
29447  isAutomatic() {
29448    return this.mAutomatic;
29449  }
29450  isStandard() {
29451    return this.mStandard;
29452  }
29453  static {
29454    this.globalIndex = 0;
29455  }
29456  constructor(name, group, prototype, rotatedPrototype, vector, isStd) {
29457    if (this.mName === void 0) {
29458      this.mName = null;
29459    }
29460    if (this.canonicalName === void 0) {
29461      this.canonicalName = null;
29462    }
29463    if (this.zoneNames === void 0) {
29464      this.zoneNames = null;
29465    }
29466    this.zoneVectors = new java.util.HashMap();
29467    if (this.mSymmetryGroup === void 0) {
29468      this.mSymmetryGroup = null;
29469    }
29470    if (this.mPrototype === void 0) {
29471      this.mPrototype = null;
29472    }
29473    if (this.mStandard === void 0) {
29474      this.mStandard = false;
29475    }
29476    if (this.mAutomatic === void 0) {
29477      this.mAutomatic = false;
29478    }
29479    if (this.__hasHalfSizes === void 0) {
29480      this.__hasHalfSizes = false;
29481    }
29482    this.scaleNames = ["shorter", "short", "medium", "long"];
29483    this.scales = ((s) => {
29484      let a = [];
29485      while (s-- > 0) a.push(null);
29486      return a;
29487    })(this.scaleNames.length);
29488    if (this.unitLength === void 0) {
29489      this.unitLength = null;
29490    }
29491    if (this.unitLengthReciprocal === void 0) {
29492      this.unitLengthReciprocal = null;
29493    }
29494    this.dotX = -999;
29495    this.dotY = -999;
29496    if (this.index === void 0) {
29497      this.index = 0;
29498    }
29499    if (this.prototype === void 0) {
29500      this.prototype = 0;
29501    }
29502    if (this.rotatedPrototype === void 0) {
29503      this.rotatedPrototype = 0;
29504    }
29505    this.canonicalize = 0;
29506    this.needsCanonicalization = false;
29507    this.prototype = prototype;
29508    this.rotatedPrototype = rotatedPrototype;
29509    this.index = _Direction.globalIndex++;
29510    this.mStandard = isStd;
29511    this.mName = name;
29512    this.canonicalName = null;
29513    this.mSymmetryGroup = group;
29514    for (let i = 0; i < this.scales.length; i++) {
29515      {
29516        this.scales[i] = this.mSymmetryGroup.getField()["createPower$int"](i - 1);
29517      }
29518      ;
29519    }
29520    this.mPrototype = vector;
29521    const order = group.getChiralOrder();
29522    this.zoneNames = (function(dims) {
29523      let allocate = function(dims2) {
29524        if (dims2.length === 0) {
29525          return null;
29526        } else {
29527          let array = [];
29528          for (let i = 0; i < dims2[0]; i++) {
29529            array.push(allocate(dims2.slice(1)));
29530          }
29531          return array;
29532        }
29533      };
29534      return allocate(dims);
29535    })([2, 2, order]);
29536  }
29537  /*private*/
29538  getZoneVectors() {
29539    if (this.zoneVectors.isEmpty()) {
29540      if (_Direction.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _Direction.logger_$LI$().finer("creating zone vectors: " + this.toString());
29541      for (let i = 0; i < this.mSymmetryGroup.getChiralOrder(); i++) {
29542        {
29543          const transform = this.mSymmetryGroup.getMatrix(i);
29544          const perm = this.mSymmetryGroup.getPermutation(i);
29545          const j = perm.mapIndex(this.prototype);
29546          const rotated = perm.mapIndex(this.rotatedPrototype);
29547          const normal = transform.timesColumn(this.mPrototype);
29548          const rot = this.mSymmetryGroup.getMapping(j, rotated);
29549          this.createAxis$int$int$com_vzome_core_algebra_AlgebraicVector(j, rot, normal);
29550        }
29551        ;
29552      }
29553    }
29554    return this.zoneVectors;
29555  }
29556  /**
29557   * 
29558   * @return {string}
29559   */
29560  toString() {
29561    return this.mSymmetryGroup.getName() + " " + this.mName;
29562  }
29563  getPrototype() {
29564    return this.mPrototype;
29565  }
29566  /**
29567   * 
29568   * @return {*}
29569   */
29570  iterator() {
29571    return this.getZoneVectors().values().iterator();
29572  }
29573  getSymmetry() {
29574    return this.mSymmetryGroup;
29575  }
29576  getName() {
29577    return this.mName;
29578  }
29579  getCanonicalName() {
29580    if (this.canonicalName == null) {
29581      const canonicalAxis = this.getCanonicalAxis(0, 0);
29582      const vector = canonicalAxis.normal();
29583      const x = vector.getComponent(0);
29584      let y = vector.getComponent(1);
29585      let z = vector.getComponent(2).negate();
29586      if (x.isZero()) {
29587        this.canonicalName = this.mName;
29588      } else {
29589        y = y.dividedBy(x);
29590        z = z.dividedBy(x);
29591        this.canonicalName = "[" + /* replace */
29592        java.util.Arrays.toString(y.toTrailingDivisor()).split(" ").join("") + "," + /* replace */
29593        java.util.Arrays.toString(z.toTrailingDivisor()).split(" ").join("") + "]";
29594        _Direction.logger_$LI$().finer("Direction.canonicalName: " + this.canonicalName);
29595      }
29596    }
29597    return this.canonicalName;
29598  }
29599  getAxis$com_vzome_core_algebra_AlgebraicVector(vector) {
29600    for (let index = this.getZoneVectors().values().iterator(); index.hasNext(); ) {
29601      let axis = index.next();
29602      {
29603        const normal = axis.normal();
29604        if (AlgebraicVectors.areParallel(normal, vector)) {
29605          const dotProd = normal.dot(vector);
29606          if (dotProd.evaluate() > 0) {
29607            return axis;
29608          } else {
29609            const principalReflection = this.mSymmetryGroup.getPrincipalReflection();
29610            if (principalReflection == null) {
29611              const opp = (axis.getSense() + 1) % 2;
29612              return this.getAxis$int$int(opp, axis.getOrientation());
29613            } else {
29614              return this.getAxis$int$int$boolean(axis.getSense(), axis.getOrientation(), !axis.isOutbound());
29615            }
29616          }
29617        }
29618      }
29619    }
29620    return null;
29621  }
29622  getAxis$com_vzome_core_math_RealVector(vector) {
29623    return this.getSymmetry()["getAxis$com_vzome_core_math_RealVector$java_util_Collection"](vector, java.util.Collections.singleton(this));
29624  }
29625  getChiralAxis(vector) {
29626    if (RealVector.ORIGIN_$LI$().equals(vector)) {
29627      return null;
29628    }
29629    const vectorLength = vector.length();
29630    const checked = new java.util.HashSet();
29631    let closestOrientation = 0;
29632    let closestSense = Symmetry.PLUS;
29633    let closestAxis = this.getCanonicalAxis(Symmetry.PLUS, 0);
29634    checked.add(closestAxis);
29635    let axisV = closestAxis.normal().toRealVector();
29636    let maxCosine = vector.dot(axisV) / (vectorLength * axisV.length());
29637    if (maxCosine < 0) {
29638      closestAxis = this.getCanonicalAxis(Symmetry.MINUS, 0);
29639      closestSense = Symmetry.MINUS;
29640      checked.add(closestAxis);
29641      axisV = closestAxis.normal().toRealVector();
29642      maxCosine = vector.dot(axisV) / (vectorLength * axisV.length());
29643    }
29644    const finished = false;
29645    while (!finished) {
29646      {
29647        const incidentOrientations = this.getSymmetry().getIncidentOrientations(closestOrientation);
29648        if (incidentOrientations == null) {
29649          break;
29650        }
29651        const reverseSense = (closestSense + 1) % 2;
29652        for (let index = 0; index < incidentOrientations.length; index++) {
29653          let i = incidentOrientations[index];
29654          {
29655            const neighbor = this.getCanonicalAxis(reverseSense, i);
29656            if (checked.contains(neighbor)) continue;
29657            checked.add(neighbor);
29658            axisV = neighbor.normal().toRealVector();
29659            const cosine = vector.dot(axisV) / (vectorLength * axisV.length());
29660            if (cosine > maxCosine) {
29661              maxCosine = cosine;
29662              closestAxis = neighbor;
29663              closestOrientation = i;
29664              closestSense = reverseSense;
29665            }
29666          }
29667        }
29668        if (reverseSense !== closestSense) {
29669          return closestAxis;
29670        }
29671      }
29672    }
29673    ;
29674    return this.getAxisBruteForce(vector);
29675  }
29676  getAxisBruteForce(vector) {
29677    let closestAxis = null;
29678    let maxCosine = -1;
29679    for (let index = this.iterator(); index.hasNext(); ) {
29680      let axis = index.next();
29681      {
29682        const axisV = axis.normal().toRealVector();
29683        const cosine = vector.dot(axisV) / (vector.length() * axisV.length());
29684        if (cosine > maxCosine) {
29685          maxCosine = cosine;
29686          closestAxis = axis;
29687        }
29688      }
29689    }
29690    return closestAxis;
29691  }
29692  zoneInitialized(sense, unit) {
29693    return this.zoneNames[1][sense][unit] != null;
29694  }
29695  getAxis$int$int(sense, index) {
29696    return this.getAxis$int$int$boolean(sense, index, true);
29697  }
29698  getAxis$int$int$boolean(sense, index, outbound) {
29699    this.getZoneVectors();
29700    return this.zoneNames[outbound ? 1 : 0][sense][index];
29701  }
29702  getAxis(sense, index, outbound) {
29703    if ((typeof sense === "number" || sense === null) && (typeof index === "number" || index === null) && (typeof outbound === "boolean" || outbound === null)) {
29704      return this.getAxis$int$int$boolean(sense, index, outbound);
29705    } else if ((typeof sense === "number" || sense === null) && (typeof index === "number" || index === null) && outbound === void 0) {
29706      return this.getAxis$int$int(sense, index);
29707    } else if ((sense != null && sense instanceof AlgebraicVector || sense === null) && index === void 0 && outbound === void 0) {
29708      return this.getAxis$com_vzome_core_algebra_AlgebraicVector(sense);
29709    } else if ((sense != null && sense instanceof RealVector || sense === null) && index === void 0 && outbound === void 0) {
29710      return this.getAxis$com_vzome_core_math_RealVector(sense);
29711    } else throw new Error("invalid overload");
29712  }
29713  withCorrection() {
29714    this.needsCanonicalization = true;
29715    return this;
29716  }
29717  /**
29718   * Get the axis that protrudes from the canonical direction on the zome ball.
29719   * Many Directions (orbits) are created without regard to whether "axis 0" actually sticks out
29720   * of the ball in the fundamental domain with index 0.
29721   * @param {number} sense
29722   * @param {number} index
29723   * @return
29724   * @return {Axis}
29725   */
29726  getCanonicalAxis(sense, index) {
29727    if (this.needsCanonicalization) {
29728      const treatedAs0 = this.getAxisBruteForce(RealVector.DIRECTION_0_$LI$());
29729      this.canonicalize = treatedAs0.getOrientation();
29730      if (treatedAs0.getSense() === Symmetry.MINUS) this.canonicalize *= -1;
29731      this.needsCanonicalization = false;
29732    }
29733    if (this.canonicalize !== 0) {
29734      if (this.canonicalize < 0) sense = (sense + 1) % 2;
29735      const target = this.mSymmetryGroup.getPermutation(index);
29736      index = target.mapIndex(Math.abs(this.canonicalize));
29737    }
29738    return this.getAxis$int$int(sense, index);
29739  }
29740  createAxis$int$int$int_A_A(orientation, rotation, norm) {
29741    const aNorm = this.mSymmetryGroup.getField().createVector(norm);
29742    this.createAxis$int$int$com_vzome_core_algebra_AlgebraicVector(orientation, rotation, aNorm);
29743  }
29744  createAxis(orientation, rotation, norm) {
29745    if ((typeof orientation === "number" || orientation === null) && (typeof rotation === "number" || rotation === null) && (norm != null && norm instanceof Array && (norm.length == 0 || norm[0] == null || norm[0] instanceof Array) || norm === null)) {
29746      return this.createAxis$int$int$int_A_A(orientation, rotation, norm);
29747    } else if ((typeof orientation === "number" || orientation === null) && (typeof rotation === "number" || rotation === null) && (norm != null && norm instanceof AlgebraicVector || norm === null)) {
29748      return this.createAxis$int$int$com_vzome_core_algebra_AlgebraicVector(orientation, rotation, norm);
29749    } else throw new Error("invalid overload");
29750  }
29751  createAxis$int$int$com_vzome_core_algebra_AlgebraicVector(orientation, rotation, norm) {
29752    let perm = this.mSymmetryGroup.getPermutation(rotation);
29753    this.recordZone(this, orientation, Symmetry.PLUS, rotation, perm, norm, true);
29754    const inversion = this.mSymmetryGroup.getPrincipalReflection();
29755    if (inversion == null) {
29756      if (perm != null) perm = perm.inverse();
29757      this.recordZone(this, orientation, Symmetry.MINUS, rotation, perm, norm.negate(), true);
29758    } else {
29759      let reverseRotation = rotation;
29760      let reversePerm = perm;
29761      if (perm != null) {
29762        reversePerm = perm.inverse();
29763        reverseRotation = perm.mapIndex(0);
29764      }
29765      this.recordZone(this, orientation, Symmetry.PLUS, reverseRotation, reversePerm, norm.negate(), false);
29766      let reflectedNorm = inversion.timesColumn(norm);
29767      this.recordZone(this, orientation, Symmetry.MINUS, reverseRotation, reversePerm, reflectedNorm, true);
29768      reflectedNorm = reflectedNorm.negate();
29769      this.recordZone(this, orientation, Symmetry.MINUS, rotation, perm, reflectedNorm, false);
29770    }
29771  }
29772  /*private*/
29773  recordZone(dir, orientation, sense, rotation, rotPerm, normal, outbound) {
29774    let zone = this.zoneVectors.get(normal.toString());
29775    if (zone == null) {
29776      zone = new Axis(this, orientation, sense, rotation, rotPerm, normal, outbound);
29777      this.zoneVectors.put(normal.toString(), zone);
29778      if (_Direction.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _Direction.logger_$LI$().finer("creating zone " + zone.toString() + " " + normal.toString());
29779    } else {
29780      if (outbound && !zone.isOutbound()) {
29781        const oldName = zone.toString();
29782        zone.rename(sense, orientation, true);
29783        if (_Direction.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _Direction.logger_$LI$().finer("zone " + oldName + " upgraded to " + zone.toString());
29784      } else if (zone.isOutbound() && !outbound) {
29785        if (_Direction.logger_$LI$().isLoggable(java.util.logging.Level.FINEST)) _Direction.logger_$LI$().finest("zone " + zone.toString() + " aliased as " + (sense === Axis.MINUS ? "-" : "") + orientation + (outbound ? "" : "i"));
29786      } else if (sense === Axis.PLUS && zone.getSense() === Axis.MINUS) {
29787        const oldName = zone.toString();
29788        zone.rename(sense, orientation, outbound);
29789        if (_Direction.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _Direction.logger_$LI$().finer("zone " + oldName + " upgraded to " + zone.toString());
29790      } else {
29791        if (_Direction.logger_$LI$().isLoggable(java.util.logging.Level.FINEST)) _Direction.logger_$LI$().finest("zone " + zone.toString() + " aliased as " + (sense === Axis.MINUS ? "-" : "") + orientation + (outbound ? "" : "i"));
29792      }
29793    }
29794    this.zoneNames[outbound ? 1 : 0][sense][orientation] = zone;
29795  }
29796  /**
29797   * 
29798   * @param {Direction} other
29799   * @return {number}
29800   */
29801  compareTo(other) {
29802    return this.index - other.index;
29803  }
29804  setHalfSizes(value) {
29805    this.__hasHalfSizes = value;
29806  }
29807  hasHalfSizes() {
29808    return this.__hasHalfSizes;
29809  }
29810  setScaleNames(names) {
29811    for (let i = 0; i < names.length; i++) {
29812      {
29813        this.scaleNames[i] = names[i];
29814      }
29815      ;
29816    }
29817  }
29818  getScaleName(scale) {
29819    if (scale < this.scaleNames.length && scale >= 0) return this.scaleNames[scale];
29820    else return "scale " + (scale - 1);
29821  }
29822  setUnitLength(unitLength) {
29823    this.unitLength = unitLength;
29824    this.unitLengthReciprocal = unitLength.reciprocal();
29825  }
29826  getUnitLength() {
29827    if (this.unitLength == null) return this.mSymmetryGroup.getField().one();
29828    else return this.unitLength;
29829  }
29830  static {
29831    this.USER_SCALE = 3;
29832  }
29833  getLengthInUnits(rawLength) {
29834    const field = this.mSymmetryGroup.getField();
29835    const scaledLength = rawLength["times$com_vzome_core_algebra_AlgebraicNumber"](field["createPower$int"](-_Direction.USER_SCALE));
29836    if (this.unitLength == null) return scaledLength;
29837    else return scaledLength["times$com_vzome_core_algebra_AlgebraicNumber"](this.unitLengthReciprocal);
29838  }
29839  getLengthName(length) {
29840    for (let i = 0; i < this.scales.length; i++) {
29841      {
29842        if (
29843          /* equals */
29844          ((o1, o2) => {
29845            if (o1 && o1.equals) {
29846              return o1.equals(o2);
29847            } else {
29848              return o1 === o2;
29849            }
29850          })(this.scales[i], length)
29851        ) {
29852          return this.scaleNames[i];
29853        }
29854      }
29855      ;
29856    }
29857    return "";
29858  }
29859  getLengthExpression(buf, length) {
29860    const bufLen = buf.length();
29861    buf.append(this.getLengthName(length));
29862    if (buf.length() === bufLen) {
29863      buf.append(" ");
29864    }
29865    buf.append(":");
29866    length.getNumberExpression(buf, AlgebraicField.EXPRESSION_FORMAT);
29867  }
29868  getDotX() {
29869    return this.dotX;
29870  }
29871  getDotY() {
29872    return this.dotY;
29873  }
29874  setDotLocation(x, y) {
29875    this.dotX = x;
29876    this.dotY = y;
29877  }
29878};
29879Direction["__class"] = "com.vzome.core.math.symmetry.Direction";
29880Direction["__interfaces"] = ["java.lang.Comparable", "java.lang.Iterable"];
29881
29882// src/worker/legacy/from-java/com/vzome/core/math/symmetry/Permutation.ts
29883var Permutation = class {
29884  constructor(group, map) {
29885    if (this.m_map === void 0) {
29886      this.m_map = null;
29887    }
29888    this.m_order = 1;
29889    if (this.mSymmetryGroup === void 0) {
29890      this.mSymmetryGroup = null;
29891    }
29892    this.mSymmetryGroup = group;
29893    if (map == null) {
29894      const numUnits = group.getChiralOrder();
29895      map = ((s) => {
29896        let a = [];
29897        while (s-- > 0) a.push(0);
29898        return a;
29899      })(numUnits);
29900      for (let unit2 = 0; unit2 < numUnits; unit2++) {
29901        map[unit2] = unit2;
29902      }
29903    }
29904    this.m_map = map;
29905    let unit = 0;
29906    for (let i = 0; i < this.m_map.length; i++) {
29907      {
29908        unit = this.m_map[unit];
29909        if (unit === 0) {
29910          this.m_order = i + 1;
29911          break;
29912        }
29913      }
29914      ;
29915    }
29916  }
29917  getJsonValue() {
29918    return this.m_map;
29919  }
29920  /**
29921   * 
29922   * @return {string}
29923   */
29924  toString() {
29925    return "permutation #" + this.mapIndex(0);
29926  }
29927  getOrder() {
29928    return this.m_order;
29929  }
29930  /**
29931   * Composition, where p1.compose( p2 ) .permute(axis)  == p1.permute( p2.permute( axis ) )
29932   * @param {Permutation} other
29933   * @return {Permutation}
29934   */
29935  compose(other) {
29936    return this.mSymmetryGroup.getPermutation(this.m_map[other.m_map[0]]);
29937  }
29938  inverse() {
29939    for (let i = 0; i < this.m_map.length; i++) {
29940      if (this.mapIndex(i) === 0) return this.mSymmetryGroup.getPermutation(i);
29941      ;
29942    }
29943    return null;
29944  }
29945  power(power) {
29946    if (power === 0) return this.mSymmetryGroup.getPermutation(0);
29947    let base = this;
29948    if (power < 0) {
29949      base = this.inverse();
29950      power *= -1;
29951    }
29952    if (power === 1) return base;
29953    return base.compose(base.power(power - 1));
29954  }
29955  mapIndex(i) {
29956    if (i < 0 || i >= this.m_map.length) return Symmetry.NO_ROTATION;
29957    return this.m_map[i];
29958  }
29959  permute(axis, sense) {
29960    let orn = axis.getOrientation();
29961    orn = this.mapIndex(orn);
29962    return axis.getDirection().getAxis$int$int((sense + axis.getSense()) % 2, orn);
29963  }
29964};
29965Permutation["__class"] = "com.vzome.core.math.symmetry.Permutation";
29966
29967// src/worker/legacy/from-java/com/vzome/core/math/symmetry/Axis.ts
29968var Axis = class {
29969  static {
29970    this.PLUS = 0;
29971  }
29972  static {
29973    this.MINUS = 1;
29974  }
29975  constructor(dir, index, sense, rotation, rotPerm, normal, outbound) {
29976    if ((dir != null && dir instanceof Direction || dir === null) && (typeof index === "number" || index === null) && (typeof sense === "number" || sense === null) && (typeof rotation === "number" || rotation === null) && (rotPerm != null && rotPerm instanceof Permutation || rotPerm === null) && (normal != null && normal instanceof AlgebraicVector || normal === null) && (typeof outbound === "boolean" || outbound === null)) {
29977      let __args = arguments;
29978      if (this.mDirection === void 0) {
29979        this.mDirection = null;
29980      }
29981      if (this.orientation === void 0) {
29982        this.orientation = 0;
29983      }
29984      if (this.mSense === void 0) {
29985        this.mSense = 0;
29986      }
29987      if (this.mRotationPerm === void 0) {
29988        this.mRotationPerm = null;
29989      }
29990      if (this.mRotation === void 0) {
29991        this.mRotation = 0;
29992      }
29993      if (this.__normal === void 0) {
29994        this.__normal = null;
29995      }
29996      this.outbound = true;
29997      this.mDirection = dir;
29998      this.mRotation = rotation;
29999      this.mRotationPerm = rotPerm;
30000      this.orientation = index;
30001      this.__normal = normal;
30002      this.mSense = sense;
30003      this.outbound = outbound;
30004    } else if ((dir != null && dir instanceof Direction || dir === null) && (typeof index === "number" || index === null) && (typeof sense === "number" || sense === null) && (typeof rotation === "number" || rotation === null) && (rotPerm != null && rotPerm instanceof Permutation || rotPerm === null) && (normal 
30004!= null && normal instanceof AlgebraicVector || normal === null) && outbound === void 0) {
30005      let __args = arguments;
30006      {
30007        let __args2 = arguments;
30008        let outbound2 = true;
30009        if (this.mDirection === void 0) {
30010          this.mDirection = null;
30011        }
30012        if (this.orientation === void 0) {
30013          this.orientation = 0;
30014        }
30015        if (this.mSense === void 0) {
30016          this.mSense = 0;
30017        }
30018        if (this.mRotationPerm === void 0) {
30019          this.mRotationPerm = null;
30020        }
30021        if (this.mRotation === void 0) {
30022          this.mRotation = 0;
30023        }
30024        if (this.__normal === void 0) {
30025          this.__normal = null;
30026        }
30027        this.outbound = true;
30028        this.mDirection = dir;
30029        this.mRotation = rotation;
30030        this.mRotationPerm = rotPerm;
30031        this.orientation = index;
30032        this.__normal = normal;
30033        this.mSense = sense;
30034        this.outbound = outbound2;
30035      }
30036    } else throw new Error("invalid overload");
30037  }
30038  /**
30039   * Return the normal vector for this axis.
30040   * Note that this vector may not have length=1.0, but it will have length
30041   * equal to one "unit" for this axis.
30042   * @return {AlgebraicVector} AlgebraicVector
30043   */
30044  normal() {
30045    return this.__normal;
30046  }
30047  isOutbound() {
30048    return this.outbound;
30049  }
30050  getLength(vector) {
30051    return vector.getLength(this.__normal);
30052  }
30053  /**
30054   * 
30055   * @return {number}
30056   */
30057  hashCode() {
30058    const prime = 31;
30059    let result = 1;
30060    result = prime * result + (this.mDirection == null ? 0 : (
30061      /* hashCode */
30062      ((o) => {
30063        if (o.hashCode) {
30064          return o.hashCode();
30065        } else {
30066          return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0);
30067        }
30068      })(this.mDirection)
30069    ));
30070    result = prime * result + this.mSense;
30071    result = prime * result + (this.__normal == null ? 0 : (
30072      /* hashCode */
30073      ((o) => {
30074        if (o.hashCode) {
30075          return o.hashCode();
30076        } else {
30077          return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0);
30078        }
30079      })(this.__normal)
30080    ));
30081    return result;
30082  }
30083  /**
30084   * 
30085   * @param {*} obj
30086   * @return {boolean}
30087   */
30088  equals(obj) {
30089    if (this === obj) return true;
30090    if (obj == null) return false;
30091    if (this.constructor !== obj.constructor) return false;
30092    const other = obj;
30093    if (this.mDirection == null) {
30094      if (other.mDirection != null) return false;
30095    } else if (!this.mDirection.equals(other.mDirection)) return false;
30096    if (this.mSense !== other.mSense) return false;
30097    if (this.__normal == null) {
30098      if (other.__normal != null) return false;
30099    } else if (!this.__normal.equals(other.__normal)) return false;
30100    return true;
30101  }
30102  /**
30103   * 
30104   * @return {string}
30105   */
30106  toString() {
30107    return this.mDirection.toString() + " " + (this.mSense === Symmetry.PLUS ? "+" : "-") + this.orientation + (this.outbound ? "" : "i");
30108  }
30109  getOrbit() {
30110    return this.mDirection;
30111  }
30112  getDirection() {
30113    return this.mDirection;
30114  }
30115  getOrientation() {
30116    return this.orientation;
30117  }
30118  getRotation() {
30119    return this.mRotation;
30120  }
30121  getCorrectRotation() {
30122    return this.mRotationPerm == null ? Symmetry.NO_ROTATION : this.mRotationPerm.mapIndex(0);
30123  }
30124  getRotationPermutation() {
30125    return this.mRotationPerm;
30126  }
30127  getSense() {
30128    return this.mSense;
30129  }
30130  /**
30131   * @param plus
30132   * @param {number} orientation2
30133   * @param {boolean} outbound
30134   * @param {number} sense
30135   */
30136  rename(sense, orientation2, outbound) {
30137    this.mSense = sense;
30138    this.orientation = orientation2;
30139    this.outbound = outbound;
30140  }
30141  getXML(elem) {
30142    DomUtils.addAttribute(elem, "symm", this.mDirection.getSymmetry().getName());
30143    DomUtils.addAttribute(elem, "dir", this.mDirection.getName());
30144    DomUtils.addAttribute(elem, "orbit", this.mDirection.getCanonicalName());
30145    DomUtils.addAttribute(
30146      elem,
30147      "index",
30148      /* toString */
30149      "" + this.orientation
30150    );
30151    if (this.mSense !== Symmetry.PLUS) DomUtils.addAttribute(elem, "sense", "minus");
30152  }
30153};
30154Axis["__class"] = "com.vzome.core.math.symmetry.Axis";
30155
30156// src/worker/legacy/from-java/com/vzome/core/generic/ArrayComparator.ts
30157var ArrayComparator = class _ArrayComparator {
30158  getContentFirstArrayComparator() {
30159    return new _ArrayComparator.ContentFirstArrayComparator();
30160  }
30161  getLengthFirstArrayComparator() {
30162    return new _ArrayComparator.LengthFirstArrayComparator();
30163  }
30164};
30165ArrayComparator["__class"] = "com.vzome.core.generic.ArrayComparator";
30166((ArrayComparator2) => {
30167  class ContentFirstArrayComparator {
30168    /**
30169     * 
30170     * @param {T[]} array1
30171     * @param {T[]} array2
30172     * @return {number}
30173     */
30174    compare(array1, array2) {
30175      const len1 = array1.length;
30176      const len2 = array2.length;
30177      const smaller = len1 < len2 ? len1 : len2;
30178      for (let i = 0; i < smaller; i++) {
30179        {
30180          const element1 = array1[i];
30181          const element2 = array2[i];
30182          const comparison = element1.compareTo(element2);
30183          if (comparison !== 0) {
30184            return comparison;
30185          }
30186        }
30187        ;
30188      }
30189      return (
30190        /* compareTo */
30191        ((o1, o2) => {
30192          if (o1 && o1.compareTo) {
30193            return o1.compareTo(o2);
30194          } else {
30195            return o1 < o2 ? -1 : o2 < o1 ? 1 : 0;
30196          }
30197        })(len1, len2)
30198      );
30199    }
30200    constructor() {
30201    }
30202  }
30203  ArrayComparator2.ContentFirstArrayComparator = ContentFirstArrayComparator;
30204  ContentFirstArrayComparator["__class"] = "com.vzome.core.generic.ArrayComparator.ContentFirstArrayComparator";
30205  ContentFirstArrayComparator["__interfaces"] = ["java.util.Comparator"];
30206  class LengthFirstArrayComparator {
30207    /**
30208     * 
30209     * @param {T[]} array1
30210     * @param {T[]} array2
30211     * @return {number}
30212     */
30213    compare(array1, array2) {
30214      const len1 = array1.length;
30215      const len2 = array2.length;
30216      let comparison = (
30217        /* compareTo */
30218        ((o1, o2) => {
30219          if (o1 && o1.compareTo) {
30220            return o1.compareTo(o2);
30221          } else {
30222            return o1 < o2 ? -1 : o2 < o1 ? 1 : 0;
30223          }
30224        })(len1, len2)
30225      );
30226      if (comparison !== 0) {
30227        return comparison;
30228      }
30229      for (let i = 0; i < len1; i++) {
30230        {
30231          const element1 = array1[i];
30232          const element2 = array2[i];
30233          comparison = element1.compareTo(element2);
30234          if (comparison !== 0) {
30235            return comparison;
30236          }
30237        }
30238        ;
30239      }
30240      return comparison;
30241    }
30242    constructor() {
30243    }
30244  }
30245  ArrayComparator2.LengthFirstArrayComparator = LengthFirstArrayComparator;
30246  LengthFirstArrayComparator["__class"] = "com.vzome.core.generic.ArrayComparator.LengthFirstArrayComparator";
30247  LengthFirstArrayComparator["__interfaces"] = ["java.util.Comparator"];
30248})(ArrayComparator || (ArrayComparator = {}));
30249
30250// src/worker/legacy/from-java/java/io/PrintWriter.ts
30251var PrintWriter = class extends java.io.Writer {
30252  constructor(w) {
30253    super();
30254    if (this.w === void 0) {
30255      this.w = null;
30256    }
30257    this.w = w;
30258  }
30259  flush() {
30260    try {
30261      this.w.flush();
30262    } catch (e) {
30263      console.error(e.message, e);
30264    }
30265  }
30266  close() {
30267    try {
30268      this.w.close();
30269    } catch (e) {
30270      console.error(e.message, e);
30271    }
30272  }
30273  write$char_A$int$int(cbuf, off, len) {
30274    try {
30275      this.w.write(cbuf, off, len);
30276    } catch (e) {
30277      console.error(e.message, e);
30278    }
30279  }
30280  write(cbuf, off, len) {
30281    if ((cbuf != null && cbuf instanceof Array && (cbuf.length == 0 || cbuf[0] == null || typeof cbuf[0] === "string") || cbuf === null) && (typeof off === "number" || off === null) && (typeof len === "number" || len === null)) {
30282      return this.write$char_A$int$int(cbuf, off, len);
30283    } else if ((typeof cbuf === "string" || cbuf === null) && off === void 0 && len === void 0) {
30284      return this.write$java_lang_String(cbuf);
30285    } else throw new Error("invalid overload");
30286  }
30287  write$java_lang_String(str) {
30288    try {
30289      this.w.write(str);
30290    } catch (e) {
30291      console.error(e.message, e);
30292    }
30293  }
30294  println$() {
30295    this.print("\n");
30296  }
30297  print(x) {
30298    if (!(typeof x === "string")) x = x.toString();
30299    const chars = (
30300      /* toCharArray */
30301      x.split("")
30302    );
30303    this.write$char_A$int$int(chars, 0, chars.length);
30304  }
30305  println$java_lang_Object(x) {
30306    this.print(x);
30307    this.println$();
30308  }
30309  println(x) {
30310    if (x != null || x === null) {
30311      return this.println$java_lang_Object(x);
30312    } else if (x === void 0) {
30313      return this.println$();
30314    } else throw new Error("invalid overload");
30315  }
30316};
30317PrintWriter["__class"] = "java.io.PrintWriter";
30318PrintWriter["__interfaces"] = ["java.lang.Appendable", "java.io.Closeable", "java.lang.AutoCloseable", "java.io.Flushable"];
30319
30320// src/worker/legacy/from-java/com/vzome/core/math/VefParser.ts
30321var VefParser = class _VefParser {
30322  static {
30323    this.VERSION_EXPLICIT_OFFSET = 10;
30324  }
30325  static {
30326    this.VERSION_EXPLICIT_DIMENSION = 9;
30327  }
30328  static {
30329    this.VERSION_SCALE_VECTOR = 8;
30330  }
30331  static {
30332    this.VERSION_RATIONAL_ACTUAL_SCALE = 7;
30333  }
30334  static {
30335    this.VERSION_EXPLICIT_BALLS = 6;
30336  }
30337  static {
30338    this.VERSION_ANY_FIELD = 5;
30339  }
30340  static {
30341    this.VERSION_W_FIRST = 4;
30342  }
30343  endVertices() {
30344  }
30345  endEdges() {
30346  }
30347  endFaces() {
30348  }
30349  endBalls() {
30350  }
30351  getVersion() {
30352    return this.mVersion;
30353  }
30354  getField() {
30355    return this.field;
30356  }
30357  isRational() {
30358    return this.__isRational;
30359  }
30360  wFirst() {
30361    return this.mVersion >= _VefParser.VERSION_W_FIRST;
30362  }
30363  parseVEF(vefData, field) {
30364    this.field = field;
30365    const tokens = new java.util.StringTokenizer(vefData);
30366    let token = null;
30367    try {
30368      token = tokens.nextToken();
30369    } catch (e1) {
30370      throw new java.lang.IllegalStateException('VEF format error: no tokens in file data: "' + vefData + '"');
30371    }
30372    this.mVersion = 0;
30373    this.__isRational = false;
30374    if (token === "vZome") {
30375      try {
30376        token = tokens.nextToken();
30377      } catch (e1) {
30378        throw new java.lang.IllegalStateException('VEF format error: no tokens after "vZome"');
30379      }
30380      if (!("VEF" === token)) throw new java.lang.IllegalStateException('VEF format error: token after "vZome" ("' + token + '" should be "VEF"');
30381      try {
30382        token = tokens.nextToken();
30383      } catch (e1) {
30384        throw new java.lang.IllegalStateException('VEF format error: no tokens after "VEF"');
30385      }
30386      try {
30387        this.mVersion = javaemul.internal.IntegerHelper.parseInt(token);
30388      } catch (e) {
30389        throw new java.lang.RuntimeException('VEF format error: VEF version number ("' + token + '") must be an integer', e);
30390      }
30391      token = tokens.nextToken();
30392    }
30393    if (token === "field") {
30394      try {
30395        token = tokens.nextToken();
30396      } catch (e1) {
30397        throw new java.lang.IllegalStateException('VEF format error: no tokens after "field"');
30398      }
30399      if (token === "rational") {
30400        this.__isRational = true;
30401        token = field.getName();
30402      }
30403      if (!field.supportsSubfield(token)) {
30404        throw new java.lang.IllegalStateException('VEF field mismatch error: VEF field name ("' + token + '") does not match current model field name ("' + field.getName() + '").');
30405      }
30406      token = tokens.nextToken();
30407    }
30408    if (token === "actual") {
30409      try {
30410        token = tokens.nextToken();
30411      } catch (e1) {
30412        throw new java.lang.IllegalStateException('VEF format error: no tokens after "actual"');
30413      }
30414    }
30415    if (token === "dimension") {
30416      try {
30417        token = tokens.nextToken();
30418      } catch (e1) {
30419        throw new java.lang.IllegalStateException('VEF format error: no tokens after "dimension"');
30420      }
30421      try {
30422        this.dimension = javaemul.internal.IntegerHelper.parseInt(token);
30423      } catch (e) {
30424        throw new java.lang.RuntimeException('VEF format error: dimension number ("' + token + '") must be an integer', e);
30425      }
30426      try {
30427        token = tokens.nextToken();
30428      } catch (e) {
30429        throw new java.lang.IllegalStateException('VEF format error: no tokens after "dimension"');
30430      }
30431    }
30432    const scaleVector = new AlgebraicVector(field, this.dimension);
30433    if (token === "scale") {
30434      try {
30435        token = tokens.nextToken();
30436        if (token === "vector") {
30437          try {
30438            for (let tokNum = 0; tokNum < this.dimension; tokNum++) {
30439              {
30440                token = tokens.nextToken();
30441                const coord = this.field.parseVefNumber(token, this.__isRational);
30442                scaleVector.setComponent(tokNum, coord);
30443              }
30444              ;
30445            }
30446          } catch (e) {
30447            throw new java.lang.IllegalStateException("VEF format error: scale vector requires " + this.dimension + " coordinates");
30448          }
30449        } else {
30450          const scale = this.field.parseVefNumber(token, this.__isRational);
30451          for (let i = 0; i < this.dimension; i++) {
30452            {
30453              scaleVector.setComponent(i, scale);
30454            }
30455            ;
30456          }
30457        }
30458        token = tokens.nextToken();
30459      } catch (e) {
30460        throw new java.lang.IllegalStateException('VEF format error: no tokens after "scale"');
30461      }
30462    } else {
30463      for (let i = 0; i < this.dimension; i++) {
30464        {
30465          scaleVector.setComponent(i, field.one());
30466        }
30467        ;
30468      }
30469    }
30470    this.parsedOffset = new AlgebraicVector(field, this.dimension);
30471    if (token === "offset") {
30472      try {
30473        for (let tokNum = 0; tokNum < this.dimension; tokNum++) {
30474          {
30475            token = tokens.nextToken();
30476            const coord = this.field.parseVefNumber(token, this.__isRational);
30477            this.parsedOffset.setComponent(tokNum, coord);
30478          }
30479          ;
30480        }
30481      } catch (e) {
30482        throw new java.lang.IllegalStateException("VEF format error: offset vector requires " + this.dimension + " coordinates");
30483      }
30484      try {
30485        token = tokens.nextToken();
30486      } catch (e) {
30487        throw new java.lang.IllegalStateException('VEF format error: no tokens after "offset"');
30488      }
30489    }
30490    let numVertices;
30491    try {
30492      numVertices = javaemul.internal.IntegerHelper.parseInt(token);
30493    } catch (e) {
30494      throw new java.lang.RuntimeException('VEF format error: number of vertices ("' + token + '") must be an integer', e);
30495    }
30496    this.startVertices(numVertices);
30497    const hasOffset = !this.parsedOffset.isOrigin();
30498    for (let i = 0; i < numVertices; i++) {
30499      {
30500        let v = field.origin(this.dimension);
30501        for (let tokNum = 0; tokNum < this.dimension; tokNum++) {
30502          {
30503            try {
30504              token = tokens.nextToken();
30505            } catch (e1) {
30506              throw new java.lang.IllegalStateException("VEF format error: not enough vertices in list");
30507            }
30508            const coord = this.field.parseVefNumber(token, this.__isRational)["times$com_vzome_core_algebra_AlgebraicNumber"](scaleVector.getComponent(tokNum));
30509            v.setComponent(tokNum, coord);
30510          }
30511          ;
30512        }
30513        if (hasOffset) {
30514          v = v.plus(this.parsedOffset);
30515        }
30516        this.addVertex(i, v);
30517      }
30518      ;
30519    }
30520    this.endVertices();
30521    if (tokens.hasMoreTokens()) {
30522      token = tokens.nextToken();
30523      let numEdges;
30524      try {
30525        numEdges = javaemul.internal.IntegerHelper.parseInt(token);
30526      } catch (e) {
30527        throw new java.lang.RuntimeException('VEF format error: number of edges ("' + token + '") must be an integer', e);
30528      }
30529      this.startEdges(numEdges);
30530      for (let i = 0; i < numEdges; i++) {
30531        {
30532          try {
30533            token = tokens.nextToken();
30534          } catch (e1) {
30535            throw new java.lang.IllegalStateException("VEF format error: not enough edges in list");
30536          }
30537          const v1 = javaemul.internal.IntegerHelper.parseInt(token);
30538          try {
30539            token = tokens.nextToken();
30540          } catch (e1) {
30541            throw new java.lang.IllegalStateException("VEF format error: 2nd vertex index of last edge is missing");
30542          }
30543          const v2 = javaemul.internal.IntegerHelper.parseInt(token);
30544          this.addEdge(i, v1, v2);
30545        }
30546        ;
30547      }
30548      this.endEdges();
30549    }
30550    if (tokens.hasMoreTokens()) {
30551      token = tokens.nextToken();
30552      let numFaces;
30553      try {
30554        numFaces = javaemul.internal.IntegerHelper.parseInt(token);
30555      } catch (e) {
30556        throw new java.lang.RuntimeException('VEF format error: number of faces ("' + token + '") must be an integer', e);
30557      }
30558      this.startFaces(numFaces);
30559      for (let i = 0; i < numFaces; i++) {
30560        {
30561          try {
30562            token = tokens.nextToken();
30563          } catch (e1) {
30564            throw new java.lang.IllegalStateException("VEF format error: not enough faces in list");
30565          }
30566          const order = javaemul.internal.IntegerHelper.parseInt(token);
30567          const verts = ((s) => {
30568            let a = [];
30569            while (s-- > 0) a.push(0);
30570            return a;
30571          })(order);
30572          for (let j = 0; j < order; j++) {
30573            {
30574              try {
30575                token = tokens.nextToken();
30576              } catch (e1) {
30577                throw new java.lang.IllegalStateException("VEF format error: not enough vertices in last face");
30578              }
30579              verts[j] = javaemul.internal.IntegerHelper.parseInt(token);
30580            }
30581            ;
30582          }
30583          this.addFace(i, verts);
30584        }
30585        ;
30586      }
30587      this.endFaces();
30588    }
30589    if (tokens.hasMoreTokens()) {
30590      token = tokens.nextToken();
30591      let numBalls;
30592      try {
30593        numBalls = javaemul.internal.IntegerHelper.parseInt(token);
30594      } catch (e) {
30595        throw new java.lang.RuntimeException('VEF format error: number of balls ("' + token + '") must be an integer', e);
30596      }
30597      this.startBalls(numBalls);
30598      for (let i = 0; i < numBalls; i++) {
30599        {
30600          try {
30601            token = tokens.nextToken();
30602          } catch (e1) {
30603            throw new java.lang.IllegalStateException("VEF format error: not enough balls in list");
30604          }
30605          const v1 = javaemul.internal.IntegerHelper.parseInt(token);
30606          this.addBall(i, v1);
30607        }
30608        ;
30609      }
30610      this.endBalls();
30611    }
30612    this.endFile(tokens);
30613  }
30614  endFile(tokens) {
30615  }
30616  constructor() {
30617    this.mVersion = 0;
30618    this.dimension = 4;
30619    this.__isRational = false;
30620    if (this.field === void 0) {
30621      this.field = null;
30622    }
30623    if (this.parsedOffset === void 0) {
30624      this.parsedOffset = null;
30625    }
30626  }
30627};
30628VefParser["__class"] = "com.vzome.core.math.VefParser";
30629
30630// src/worker/legacy/from-java/com/vzome/core/algebra/VefVectorExporter.ts
30631var VefVectorExporter = class _VefVectorExporter {
30632  constructor(writer, field, scale, withOffset) {
30633    if ((writer != null && writer instanceof java.io.Writer || writer === null) && (field != null && (field.constructor != null && field.constructor["__interfaces"] != null && field.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field === null) && (scale != null && (scale.constructor != null && scale.constructor["__interfaces"] != null && scale.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || scale === null) && (typeof withOffset === "boolean" || withOffset === null)) {
30634      let __args = arguments;
30635      if (this.output === void 0) {
30636        this.output = null;
30637      }
30638      if (this.field === void 0) {
30639        this.field = null;
30640      }
30641      if (this.strutEnds === void 0) {
30642        this.strutEnds = null;
30643      }
30644      if (this.panelVertices === void 0) {
30645        this.panelVertices = null;
30646      }
30647      if (this.scale === void 0) {
30648        this.scale = null;
30649      }
30650      if (this.includeOffset === void 0) {
30651        this.includeOffset = false;
30652      }
30653      this.sortedVertexList = null;
30654      this.vertices = new java.util.TreeSet();
30655      this.ballLocations = new java.util.TreeSet();
30656      this.exportedOffset = null;
30657      this.strTip = "tip";
30658      this.strMiddle = "middle";
30659      this.includeOffset = withOffset;
30660      this.scale = scale;
30661      this.output = new PrintWriter(writer);
30662      this.field = field;
30663      const arrayComparator = new ArrayComparator();
30664      this.strutEnds = new java.util.TreeSet(((funcInst) => {
30665        if (funcInst == null || typeof funcInst == "function") {
30666          return funcInst;
30667        }
30668        return (arg0, arg1) => (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, arg0, arg1);
30669      })(arrayComparator.getContentFirstArrayComparator()));
30670      this.panelVertices = new java.util.TreeSet(((funcInst) => {
30671        if (funcInst == null || typeof funcInst == "function") {
30672          return funcInst;
30673        }
30674        return (arg0, arg1) => (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, arg0, arg1);
30675      })(arrayComparator.getLengthFirstArrayComparator()));
30676    } else if ((writer != null && writer instanceof java.io.Writer || writer === null) && (field != null && (field.constructor != null && field.constructor["__interfaces"] != null && field.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field === null) && scale === void 0 && withOffset === void 0) {
30677      let __args = arguments;
30678      {
30679        let __args2 = arguments;
30680        let scale2 = null;
30681        let withOffset2 = false;
30682        if (this.output === void 0) {
30683          this.output = null;
30684        }
30685        if (this.field === void 0) {
30686          this.field = null;
30687        }
30688        if (this.strutEnds === void 0) {
30689          this.strutEnds = null;
30690        }
30691        if (this.panelVertices === void 0) {
30692          this.panelVertices = null;
30693        }
30694        if (this.scale === void 0) {
30695          this.scale = null;
30696        }
30697        if (this.includeOffset === void 0) {
30698          this.includeOffset = false;
30699        }
30700        this.sortedVertexList = null;
30701        this.vertices = new java.util.TreeSet();
30702        this.ballLocations = new java.util.TreeSet();
30703        this.exportedOffset = null;
30704        this.strTip = "tip";
30705        this.strMiddle = "middle";
30706        this.includeOffset = withOffset2;
30707        this.scale = scale2;
30708        this.output = new PrintWriter(writer);
30709        this.field = field;
30710        const arrayComparator = new ArrayComparator();
30711        this.strutEnds = new java.util.TreeSet(((funcInst) => {
30712          if (funcInst == null || typeof funcInst == "function") {
30713            return funcInst;
30714          }
30715          return (arg0, arg1) => (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, arg0, arg1);
30716        })(arrayComparator.getContentFirstArrayComparator()));
30717        this.panelVertices = new java.util.TreeSet(((funcInst) => {
30718          if (funcInst == null || typeof funcInst == "function") {
30719            return funcInst;
30720          }
30721          return (arg0, arg1) => (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, arg0, arg1);
30722        })(arrayComparator.getLengthFirstArrayComparator()));
30723      }
30724    } else throw new Error("invalid overload");
30725  }
30726  exportPoint(pt) {
30727    this.vertices.add(pt);
30728    this.ballLocations.add(pt);
30729    if (this.includeOffset) {
30730      this.exportedOffset = pt;
30731    }
30732  }
30733  exportSegment(start, end) {
30734    const ends = [start, end];
30735    this.vertices.add(ends[0]);
30736    this.vertices.add(ends[1]);
30737    this.strutEnds.add(ends);
30738  }
30739  exportPolygon(corners) {
30740    this.vertices.addAll(corners);
30741    const cornerArray = ((s) => {
30742      let a = [];
30743      while (s-- > 0) a.push(null);
30744      return a;
30745    })(corners.size());
30746    corners.toArray(cornerArray);
30747    this.panelVertices.add(cornerArray);
30748  }
30749  /**
30750   * @param {java.lang.StringBuffer} buffer = Don't assume that buffer starts out empty. Results will be appended.
30751   * @param {AlgebraicVector} vector = Value to be converted to a zero-padded 4D String which will be
30752   * prefixed and/or padded with field specific zeroes
30753   * depending on the number of dimensions in vector as follows:
30754   * 1D : 0 X 0 0
30755   * 2D : 0 X Y 0
30756   * 3D : 0 X Y Z
30757   * 4D : W X Y Z
30758   * @param {*} scale
30759   */
30760  static appendVector(buffer, vector, scale) {
30761    const zeroString = vector.getField().zero().toString(AlgebraicField.VEF_FORMAT);
30762    const dims = vector.dimension();
30763    if (dims < 4) {
30764      buffer.append(zeroString);
30765      buffer.append(" ");
30766    }
30767    if (scale != null) vector = vector.scale(scale);
30768    vector.getVectorExpression$java_lang_StringBuffer$int(buffer, AlgebraicField.VEF_FORMAT);
30769    for (let d = dims + 1; d < 4; d++) {
30770      {
30771        buffer.append(" ");
30772        buffer.append(zeroString);
30773      }
30774      ;
30775    }
30776  }
30777  static exportPolyhedron(polyhedron) {
30778    const out = new StringWriter();
30779    const exporter = new _VefVectorExporter(out, polyhedron.getField());
30780    const vertexList = polyhedron.getVertexList();
30781    for (let index = polyhedron.getFaceSet().iterator(); index.hasNext(); ) {
30782      let face = index.next();
30783      {
30784        const vertices = new java.util.ArrayList(face.size());
30785        for (let i = 0; i < face.size(); i++) {
30786          {
30787            const vertexIndex = face.getVertex(i);
30788            vertices.add(vertexList.get(vertexIndex));
30789          }
30790          ;
30791        }
30792        exporter.exportPolygon(vertices);
30793      }
30794    }
30795    exporter.finishExport();
30796    return out.toString();
30797  }
30798  finishExport() {
30799    this.sortedVertexList = new java.util.ArrayList(this.vertices);
30800    this.vertices = null;
30801    const version = this.exportedOffset == null ? VefParser.VERSION_EXPLICIT_BALLS : VefParser.VERSION_EXPLICIT_OFFSET;
30802    this.output.println$java_lang_Object("vZome VEF " + version + " field " + this.field.getName());
30803    if (this.exportedOffset != null) {
30804      const buf = new java.lang.StringBuffer();
30805      buf.append("\noffset ");
30806      _VefVectorExporter.appendVector(buf, this.exportedOffset.negate(), null);
30807      buf.append("\n");
30808      this.output.println$java_lang_Object(buf.toString());
30809    }
30810    this.output.println$java_lang_Object("\n" + this.sortedVertexList.size());
30811    {
30812      const buf = new java.lang.StringBuffer();
30813      for (let index = this.sortedVertexList.iterator(); index.hasNext(); ) {
30814        let vector = index.next();
30815        {
30816          _VefVectorExporter.appendVector(buf, vector, this.scale);
30817          buf.append("\n");
30818        }
30819      }
30820      buf.append("\n");
30821      this.output.println$java_lang_Object(buf.toString());
30822    }
30823    ;
30824    this.output.println$java_lang_Object("\n" + this.strutEnds.size());
30825    for (let index = this.strutEnds.iterator(); index.hasNext(); ) {
30826      let ends = index.next();
30827      {
30828        this.output.print(this.sortedVertexList.indexOf(ends[0]) + " ");
30829        this.output.println$java_lang_Object(this.sortedVertexList.indexOf(ends[1]));
30830      }
30831    }
30832    this.output.println$java_lang_Object("\n");
30833    this.output.println$java_lang_Object("\n" + this.panelVertices.size());
30834    for (let index = this.panelVertices.iterator(); index.hasNext(); ) {
30835      let corners = index.next();
30836      {
30837        this.output.print(corners.length + "  ");
30838        for (let index2 = 0; index2 < corners.length; index2++) {
30839          let corner = corners[index2];
30840          {
30841            this.output.print(this.sortedVertexList.indexOf(corner) + " ");
30842          }
30843        }
30844        this.output.println$();
30845      }
30846    }
30847    this.output.println$java_lang_Object("\n");
30848    this.output.println$java_lang_Object("\n" + this.ballLocations.size());
30849    let i = 0;
30850    for (let index = this.ballLocations.iterator(); index.hasNext(); ) {
30851      let ball = index.next();
30852      {
30853        this.output.print(this.sortedVertexList.indexOf(ball) + " ");
30854        if (++i % 10 === 0) {
30855          this.output.println$();
30856        }
30857      }
30858    }
30859    this.output.println$java_lang_Object("\n");
30860    this.output.flush();
30861  }
30862};
30863VefVectorExporter["__class"] = "com.vzome.core.algebra.VefVectorExporter";
30864
30865// src/worker/legacy/from-java/com/vzome/core/math/symmetry/OrbitSet.ts
30866var OrbitSet = class {
30867  constructor(symmetry) {
30868    this.contents = new java.util.HashMap();
30869    if (this.symmetry === void 0) {
30870      this.symmetry = null;
30871    }
30872    this.lastAdded = null;
30873    this.symmetry = symmetry;
30874  }
30875  getSymmetry() {
30876    return this.symmetry;
30877  }
30878  getAxis(vector) {
30879    return this.symmetry["getAxis$com_vzome_core_math_RealVector$java_util_Collection"](vector, this.contents.values());
30880  }
30881  getDirection(name) {
30882    for (let index = this.getDirections().iterator(); index.hasNext(); ) {
30883      let dir = index.next();
30884      {
30885        if (dir.getCanonicalName() === name) return dir;
30886        if (dir.getName() === name) return dir;
30887      }
30888    }
30889    return null;
30890  }
30891  getDirections() {
30892    return this.contents.values();
30893  }
30894  remove(orbit) {
30895    const key = orbit.toString();
30896    const hadOne = this.contents.containsKey(key);
30897    this.contents.remove(orbit.toString());
30898    return hadOne;
30899  }
30900  add(orbit) {
30901    const key = orbit.toString();
30902    const hadOne = this.contents.containsKey(key);
30903    this.contents.put(orbit.toString(), orbit);
30904    if (!hadOne) this.lastAdded = orbit;
30905    return !hadOne;
30906  }
30907  contains(orbit) {
30908    return this.contents.containsKey(orbit.toString());
30909  }
30910  size() {
30911    return this.contents.size();
30912  }
30913  clear() {
30914    this.contents.clear();
30915  }
30916  addAll(orbits) {
30917    this.contents.putAll(orbits.contents);
30918  }
30919  retainAll(allOrbits) {
30920    const badKeys = new java.util.ArrayList();
30921    for (let index = this.contents.keySet().iterator(); index.hasNext(); ) {
30922      let key = index.next();
30923      {
30924        if (!allOrbits.contents.containsKey(key)) badKeys.add(key);
30925      }
30926    }
30927    for (let index = badKeys.iterator(); index.hasNext(); ) {
30928      let key = index.next();
30929      {
30930        this.contents.remove(key);
30931      }
30932    }
30933  }
30934  isEmpty() {
30935    return this.contents.isEmpty();
30936  }
30937  last() {
30938    return this.lastAdded;
30939  }
30940};
30941OrbitSet["__class"] = "com.vzome.core.math.symmetry.OrbitSet";
30942((OrbitSet2) => {
30943  class OrbitComparator {
30944    /**
30945     * 
30946     * @param {Direction} dir1
30947     * @param {Direction} dir2
30948     * @return {number}
30949     */
30950    compare(dir1, dir2) {
30951      const name1 = dir1.getName();
30952      const name2 = dir2.getName();
30953      let i1 = -1;
30954      let i2 = -1;
30955      for (let i = 0; i < this.names.length; i++) {
30956        {
30957          if (name1 === this.names[i]) i1 = i;
30958          else if (name2 === this.names[i]) i2 = i;
30959        }
30960        ;
30961      }
30962      return i2 - i1;
30963    }
30964    constructor(__parent) {
30965      this.__parent = __parent;
30966      this.names = this.__parent.getSymmetry().getDirectionNames();
30967    }
30968  }
30969  OrbitSet2.OrbitComparator = OrbitComparator;
30970  OrbitComparator["__class"] = "com.vzome.core.math.symmetry.OrbitSet.OrbitComparator";
30971  OrbitComparator["__interfaces"] = ["java.util.Comparator"];
30972})(OrbitSet || (OrbitSet = {}));
30973
30974// src/worker/legacy/from-java/com/vzome/core/math/symmetry/OrbitDotLocator.ts
30975var OrbitDotLocator = class {
30976  constructor(symmetry, worldTriangle) {
30977    if (this.worldTrianglePoint === void 0) {
30978      this.worldTrianglePoint = null;
30979    }
30980    if (this.worldTriangleNormal === void 0) {
30981      this.worldTriangleNormal = null;
30982    }
30983    if (this.dotTransform === void 0) {
30984      this.dotTransform = null;
30985    }
30986    if (this.orbitProbe === void 0) {
30987      this.orbitProbe = null;
30988    }
30989    if (this.symmetry === void 0) {
30990      this.symmetry = null;
30991    }
30992    if (this.debugger === void 0) {
30993      this.debugger = null;
30994    }
30995    if (this.field === void 0) {
30996      this.field = null;
30997    }
30998    if (this.vefDebugOutput === void 0) {
30999      this.vefDebugOutput = null;
31000    }
31001    this.symmetry = symmetry;
31002    this.field = symmetry.getField();
31003    const oldMatrix = new AlgebraicMatrix(worldTriangle);
31004    const X = this.field.basisVector(3, AlgebraicVector.X);
31005    const Y = this.field.basisVector(3, AlgebraicVector.Y);
31006    const Z = this.field.basisVector(3, AlgebraicVector.Z);
31007    const viewTriangle = [Z, X.plus(Z), Y.plus(Z)];
31008    const newMatrix = new AlgebraicMatrix(viewTriangle);
31009    this.dotTransform = newMatrix.times(oldMatrix.inverse());
31010    const blueVertex = worldTriangle[0];
31011    const redVertex = worldTriangle[1];
31012    const yellowVertex = worldTriangle[2];
31013    this.orbitProbe = redVertex.plus(yellowVertex.plus(blueVertex)).toRealVector();
31014    this.worldTrianglePoint = blueVertex;
31015    this.worldTriangleNormal = AlgebraicVectors.getNormal$java_util_Collection(java.util.Arrays.asList(worldTriangle));
31016    if (this.debugger != null) {
31017      this.debugger.exportSegment(this.field.origin(3), redVertex);
31018      this.debugger.exportPoint(redVertex);
31019      this.debugger.exportSegment(this.field.origin(3), yellowVertex);
31020      this.debugger.exportPoint(yellowVertex);
31021      this.debugger.exportSegment(this.field.origin(3), blueVertex);
31022      this.debugger.exportPoint(blueVertex);
31023      this.debugger.exportPolygon(java.util.Arrays.asList(worldTriangle));
31024      this.debugger.exportPolygon(java.util.Arrays.asList(viewTriangle));
31025      this.debugger.exportSegment(blueVertex, this.worldTriangleNormal);
31026    }
31027  }
31028  enableDebugger() {
31029    this.vefDebugOutput = new StringWriter();
31030    this.debugger = new VefVectorExporter(this.vefDebugOutput, this.field);
31031  }
31032  locateOrbitDot(orbit) {
31033    const dotZone = this.symmetry["getAxis$com_vzome_core_math_RealVector$java_util_Collection"](this.orbitProbe, java.util.Collections.singleton(orbit)).normal();
31034    const lineStart = this.field.origin(3);
31035    const worldDot = AlgebraicVectors.getLinePlaneIntersection(lineStart, dotZone, this.worldTrianglePoint, this.worldTriangleNormal);
31036    const viewDot = this.dotTransform.timesColumn(worldDot);
31037    const dotX = viewDot.getComponent(AlgebraicVector.X).evaluate();
31038    const dotY = viewDot.getComponent(AlgebraicVector.Y).evaluate();
31039    orbit.setDotLocation(dotX, dotY);
31040    if (this.debugger != null) {
31041      this.debugger.exportSegment(this.field.origin(3), dotZone);
31042      this.debugger.exportPoint(worldDot);
31043      this.debugger.exportPoint(viewDot);
31044    }
31045  }
31046  getDebuggerOutput() {
31047    this.debugger.finishExport();
31048    this.debugger = null;
31049    return this.vefDebugOutput.toString();
31050  }
31051};
31052OrbitDotLocator["__class"] = "com.vzome.core.math.symmetry.OrbitDotLocator";
31053
31054// src/worker/legacy/from-java/com/vzome/core/math/symmetry/AbstractSymmetry.ts
31055var AbstractSymmetry = class _AbstractSymmetry {
31056  constructor(order, field, frameColor, principalReflection) {
31057    this.mDirectionMap = new java.util.HashMap();
31058    this.mDirectionList = new java.util.ArrayList();
31059    this.orbitSet = new OrbitSet(this);
31060    if (this.mOrientations === void 0) {
31061      this.mOrientations = null;
31062    }
31063    if (this.mMatrices === void 0) {
31064      this.mMatrices = null;
31065    }
31066    if (this.mField === void 0) {
31067      this.mField = null;
31068    }
31069    this.principalReflection = null;
31070    if (this.dotLocator === void 0) {
31071      this.dotLocator = null;
31072    }
31073    this.mField = field;
31074    this.principalReflection = principalReflection;
31075    this.mOrientations = ((s) => {
31076      let a = [];
31077      while (s-- > 0) a.push(null);
31078      return a;
31079    })(order);
31080    this.mMatrices = ((s) => {
31081      let a = [];
31082      while (s-- > 0) a.push(null);
31083      return a;
31084    })(order);
31085    this.createInitialPermutations();
31086    let done = false;
31087    while (!done) {
31088      {
31089        done = true;
31090        for (let i = 1; i < order; i++) {
31091          {
31092            const p1 = this.mOrientations[i];
31093            if (p1 == null) {
31094              done = false;
31095              continue;
31096            }
31097            done = true;
31098            for (let j = 1; j < order; j++) {
31099              {
31100                const p2 = this.mOrientations[j];
31101                if (p2 == null) {
31102                  done = false;
31103                  continue;
31104                }
31105                const result = p1.mapIndex(p2.mapIndex(0));
31106                if (this.mOrientations[result] != null) continue;
31107                const map = ((s) => {
31108                  let a = [];
31109                  while (s-- > 0) a.push(0);
31110                  return a;
31111                })(order);
31112                for (let k = 0; k < order; k++) {
31113                  map[k] = p1.mapIndex(p2.mapIndex(k));
31114                }
31115                this.mOrientations[result] = new Permutation(this, map);
31116              }
31117              ;
31118            }
31119            if (done) break;
31120          }
31121          ;
31122        }
31123      }
31124    }
31125    ;
31126    this.createFrameOrbit(frameColor);
31127    this.createOtherOrbits();
31128  }
31129  /**
31130   * 
31131   * @return {*}
31132   */
31133  getField() {
31134    return this.mField;
31135  }
31136  /**
31137   * 
31138   * @return {Axis}
31139   */
31140  getPreferredAxis() {
31141    return null;
31142  }
31143  createZoneOrbit$java_lang_String$int$int$int_A_A(name, prototype, rotatedPrototype, norm) {
31144    const aNorm = this.mField.createVector(norm);
31145    return this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean(name, prototype, rotatedPrototype, aNorm, false);
31146  }
31147  createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector(name, prototype, rotatedPrototype, norm) {
31148    return this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean(name, prototype, rotatedPrototype, norm, false);
31149  }
31150  createZoneOrbit$java_lang_String$int$int$int_A_A$boolean(name, prototype, rotatedPrototype, norm, standard) {
31151    const aNorm = this.mField.createVector(norm);
31152    return this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean(name, prototype, rotatedPrototype, aNorm, standard, false);
31153  }
31154  createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean(name, prototype, rotatedPrototype, norm, standard) {
31155    return this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean(name, prototype, rotatedPrototype, norm, standard, false);
31156  }
31157  createZoneOrbit$java_lang_String$int$int$int_A_A$boolean$boolean(name, prototype, rotatedPrototype, norm, standard, halfSizes) {
31158    const aNorm = this.mField.createVector(norm);
31159    return this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber(name, prototype, rotatedPrototype, aNorm, standard, false, null);
31160  }
31161  createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean(name, prototype, rotatedPrototype, norm, standard, halfSizes) {
31162    return this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber(name, prototype, rotatedPrototype, norm, standard, false, this.mField.one());
31163  }
31164  createZoneOrbit$java_lang_String$int$int$int_A_A$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber(name, prototype, rotatedPrototype, norm, standard, halfSizes, unitLength) {
31165    const aNorm = this.mField.createVector(norm);
31166    return this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber(name, prototype, rotatedPrototype, aNorm, standard, halfSizes, unitLength);
31167  }
31168  createZoneOrbit(name, prototype, rotatedPrototype, norm, standard, halfSizes, unitLength) {
31169    if ((typeof name === "string" || name === null) && (typeof prototype === "number" || prototype === null) && (typeof rotatedPrototype === "number" || rotatedPrototype === null) && (norm != null && norm instanceof Array && (norm.length == 0 || norm[0] == null || norm[0] instanceof Array) || norm === null) && (typeof standard === "boolean" || standard === null) && (typeof halfSizes === "boolean" || halfSizes === null) && (unitLength != null && (unitLength.constructor != null && unitLength.constructor["__interfaces"] != null && unitLength.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || unitLength === null)) {
31170      return this.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber(name, prototype, rotatedPrototype, norm, standard, halfSizes, unitLength);
31171    } else if ((typeof name === "string" || name === null) && (typeof prototype === "number" || prototype === null) && (typeof rotatedPrototype === "number" || rotatedPrototype === null) && (norm != null && norm instanceof AlgebraicVector || norm === null) && (typeof standard === "boolean" || standard === null) && (typeof halfSizes === "boolean" || halfSizes === null) && (unitLength != null && (unitLength.constructor != null && unitLength.constructor["__interfaces"] != null && unitLength.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || unitLength === null)) {
31172      return this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber(name, prototype, rotatedPrototype, norm, standard, halfSizes, unitLength);
31173    } else if ((typeof name === "string" || name === null) && (typeof prototype === "number" || prototype === null) && (typeof rotatedPrototype === "number" || rotatedPrototype === null) && (norm != null && norm instanceof Array && (norm.length == 0 || norm[0] == null || norm[0] instanceof Array) || norm === null) && (typeof standard === "boolean" || standard === null) && (typeof halfSizes === "boolean" || halfSizes === null) && unitLength === void 0) {
31174      return this.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean$boolean(name, prototype, rotatedPrototype, norm, standard, halfSizes);
31175    } else if ((typeof name === "string" || name === null) && (typeof prototype === "number" || prototype === null) && (typeof rotatedPrototype === "number" || rotatedPrototype === null) && (norm != null && norm instanceof AlgebraicVector || norm === null) && (typeof standard === "boolean" || standard === null) && (typeof halfSizes === "boolean" || halfSizes === null) && unitLength === void 0) {
31176      return this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean(name, prototype, rotatedPrototype, norm, standard, halfSizes);
31177    } else if ((typeof name === "string" || name === null) && (typeof prototype === "number" || prototype === null) && (typeof rotatedPrototype === "number" || rotatedPrototype === null) && (norm != null && norm instanceof Array && (norm.length == 0 || norm[0] == null || norm[0] instanceof Array) || norm === null) && (typeof standard === "boolean" || standard === null) && halfSizes === void 0 && unitLength === void 0) {
31178      return this.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean(name, prototype, rotatedPrototype, norm, standard);
31179    } else if ((typeof name === "string" || name === null) && (typeof prototype === "number" || prototype === null) && (typeof rotatedPrototype === "number" || rotatedPrototype === null) && (norm != null && norm instanceof AlgebraicVector || norm === null) && (typeof standard === "boolean" || standard === null) && halfSizes === void 0 && unitLength === void 0) {
31180      return this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean(name, prototype, rotatedPrototype, norm, standard);
31181    } else if ((typeof name === "string" || name === null) && (typeof prototype === "number" || prototype === null) && (typeof rotatedPrototype === "number" || rotatedPrototype === null) && (norm != null && norm instanceof Array && (norm.length == 0 || norm[0] == null || norm[0] instanceof Array) || norm === null) && standard === void 0 && halfSizes === void 0 && unitLength === void 0) {
31182      return this.createZoneOrbit$java_lang_String$int$int$int_A_A(name, prototype, rotatedPrototype, norm);
31183    } else if ((typeof name === "string" || name === null) && (typeof prototype === "number" || prototype === null) && (typeof rotatedPrototype === "number" || rotatedPrototype === null) && (norm != null && norm instanceof AlgebraicVector || norm === null) && standard === void 0 && halfSizes === void 0 && unitLength === void 0) {
31184      return this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector(name, prototype, rotatedPrototype, norm);
31185    } else throw new Error("invalid overload");
31186  }
31187  createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber(name, prototype, rotatedPrototype, norm, standard, halfSizes, unitLength) {
31188    const existingDir = this.mDirectionMap.get(name);
31189    if (existingDir != null) {
31190      this.mDirectionMap.remove(name);
31191      this.orbitSet.remove(existingDir);
31192      this.mDirectionList.remove(existingDir);
31193    }
31194    const orbit = new Direction(name, this, prototype, rotatedPrototype, norm, standard);
31195    if (halfSizes) orbit.setHalfSizes(true);
31196    orbit.setUnitLength(unitLength);
31197    this.mDirectionMap.put(orbit.getName(), orbit);
31198    this.mDirectionList.add(orbit);
31199    this.orbitSet.add(orbit);
31200    if (this.dotLocator != null) this.dotLocator.locateOrbitDot(orbit);
31201    return orbit;
31202  }
31203  /**
31204   * 
31205   * @param {string} name
31206   * @param {number} prototype
31207   * @param {number} rotatedPrototype
31208   * @param {AlgebraicVector} norm
31209   * @return {Direction}
31210   */
31211  createNewZoneOrbit(name, prototype, rotatedPrototype, norm) {
31212    const orbit = new Direction(name, this, prototype, rotatedPrototype, norm, false).withCorrection();
31213    if (this.dotLocator == null) this.dotLocator = new OrbitDotLocator(this, this.getOrbitTriangle());
31214    this.dotLocator.locateOrbitDot(orbit);
31215    return orbit;
31216  }
31217  /**
31218   * 
31219   * @return {OrbitSet}
31220   */
31221  getOrbitSet() {
31222    return this.orbitSet;
31223  }
31224  /**
31225   * @param unit
31226   * @param rot
31227   * @return
31228   * @param {number} from
31229   * @param {number} to
31230   * @return {number}
31231   */
31232  getMapping(from, to) {
31233    if (to === Symmetry.NO_ROTATION) return Symmetry.NO_ROTATION;
31234    for (let p = 0; p < this.mOrientations.length; p++) {
31235      if (this.mOrientations[p].mapIndex(from) === to) return p;
31236      ;
31237    }
31238    return Symmetry.NO_ROTATION;
31239  }
31240  mapAxis(from, to) {
31241    return this.mapAxes([from], [to]);
31242  }
31243  mapAxes(from, to) {
31244    if (from.length !== to.length) throw new _AbstractSymmetry.MismatchedAxes("must map to equal number of axes");
31245    if (from.length > 3) throw new _AbstractSymmetry.MismatchedAxes("must map three or fewer axes");
31246    for (let i = 0; i < from.length; i++) {
31247      if (from[i].getDirection().equals(to[i].getDirection())) throw new _AbstractSymmetry.MismatchedAxes("must map between same color axes");
31248      ;
31249    }
31250    const result = [null];
31251    return result[0];
31252  }
31253  /**
31254   * 
31255   * @return {*}
31256   */
31257  getDirections() {
31258    return this.mDirectionList;
31259  }
31260  getAxis$com_vzome_core_algebra_AlgebraicVector(vector) {
31261    return this.getAxis$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_math_symmetry_OrbitSet(vector, this.orbitSet);
31262  }
31263  getAxis$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_math_symmetry_OrbitSet(vector, orbits) {
31264    if (vector.isOrigin()) {
31265      return null;
31266    }
31267    const canonicalOrbit = this.getSpecialOrbit(3 /* BLACK */);
31268    if (canonicalOrbit == null) for (let index = orbits.getDirections().iterator(); index.hasNext(); ) {
31269      let dir = index.next();
31270      {
31271        const candidate = dir.getAxis$com_vzome_core_algebra_AlgebraicVector(vector);
31272        if (candidate != null) {
31273          return candidate;
31274        }
31275      }
31276    }
31277    else {
31278      const zone = canonicalOrbit.getAxis$com_vzome_core_math_RealVector(vector.toRealVector());
31279      const orientation = zone.getOrientation();
31280      const sense = zone.getSense();
31281      for (let index = orbits.getDirections().iterator(); index.hasNext(); ) {
31282        let orbit = index.next();
31283        {
31284          const candidate = orbit.getCanonicalAxis(sense, orientation);
31285          if (AlgebraicVectors.areParallel(candidate.normal(), vector)) {
31286            return candidate;
31287          }
31288        }
31289      }
31290    }
31291    return null;
31292  }
31293  /**
31294   * 
31295   * @param {AlgebraicVector} vector
31296   * @param {OrbitSet} orbits
31297   * @return {Axis}
31298   */
31299  getAxis(vector, orbits) {
31300    if ((vector != null && vector instanceof AlgebraicVector || vector === null) && (orbits != null && orbits instanceof OrbitSet || orbits === null)) {
31301      return this.getAxis$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_math_symmetry_OrbitSet(vector, orbits);
31302    } else if ((vector != null && vector instanceof RealVector || vector === null) && (orbits != null && (orbits.constructor != null && orbits.constructor["__interfaces"] != null && orbits.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || orbits === null)) {
31303      return this.getAxis$com_vzome_core_math_RealVector$java_util_Collection(vector, orbits);
31304    } else if ((vector != null && vector instanceof AlgebraicVector || vector === null) && orbits === void 0) {
31305      return this.getAxis$com_vzome_core_algebra_AlgebraicVector(vector);
31306    } else throw new Error("invalid overload");
31307  }
31308  getAxis$com_vzome_core_math_RealVector$java_util_Collection(vector, dirMask) {
31309    if (RealVector.ORIGIN_$LI$().equals(vector)) {
31310      return null;
31311    }
31312    let maxCosine = -1;
31313    let closest = null;
31314    let orientation = -1;
31315    let sense = -1;
31316    const chiralOrbit = this.getSpecialOrbit(3 /* BLACK */);
31317    if (chiralOrbit != null) {
31318      const closestChiralAxis = chiralOrbit.getChiralAxis(vector);
31319      orientation = closestChiralAxis.getOrientation();
31320      sense = closestChiralAxis.getSense();
31321    }
31322    const dirs = dirMask == null ? this.orbitSet.getDirections() : dirMask;
31323    for (let index = dirs.iterator(); index.hasNext(); ) {
31324      let dir = index.next();
31325      {
31326        const axis = orientation >= 0 ? dir.getCanonicalAxis(sense, orientation) : dir.getAxisBruteForce(vector);
31327        const axisV = axis.normal().toRealVector();
31328        const cosine = vector.dot(axisV) / (vector.length() * axisV.length());
31329        if (cosine > maxCosine) {
31330          maxCosine = cosine;
31331          closest = axis;
31332        }
31333      }
31334    }
31335    return closest;
31336  }
31337  /**
31338   * 
31339   * @return {number}
31340   */
31341  getChiralOrder() {
31342    return this.mOrientations.length;
31343  }
31344  /**
31345   * 
31346   * @param {number} i
31347   * @return {Permutation}
31348   */
31349  getPermutation(i) {
31350    if (i < 0 || i > this.mOrientations.length) return null;
31351    return this.mOrientations[i];
31352  }
31353  getPermutations() {
31354    return this.mOrientations;
31355  }
31356  /**
31357   * 
31358   * @param {number} i
31359   * @return {AlgebraicMatrix}
31360   */
31361  getMatrix(i) {
31362    return this.mMatrices[i];
31363  }
31364  getMatrices() {
31365    return this.mMatrices;
31366  }
31367  /**
31368   * 
31369   * @param {number} orientation
31370   * @return {number}
31371   */
31372  inverse(orientation) {
31373    if (orientation < 0 || orientation > this.mOrientations.length) return Symmetry.NO_ROTATION;
31374    return this.mOrientations[orientation].inverse().mapIndex(0);
31375  }
31376  /**
31377   * 
31378   * @param {string} color
31379   * @return {Direction}
31380   */
31381  getDirection(color) {
31382    return this.mDirectionMap.get(color);
31383  }
31384  /**
31385   * 
31386   * @return {java.lang.String[]}
31387   */
31388  getDirectionNames() {
31389    const list = new java.util.ArrayList();
31390    for (let index = this.mDirectionList.iterator(); index.hasNext(); ) {
31391      let dir = index.next();
31392      {
31393        if (!dir.isAutomatic()) list.add(dir.getName());
31394      }
31395    }
31396    return list.toArray([]);
31397  }
31398  /**
31399   * 
31400   * @param {int[]} perms
31401   * @return {int[]}
31402   */
31403  closure(perms) {
31404    const newPerms = new java.util.ArrayList();
31405    const knownPerms = ((s) => {
31406      let a = [];
31407      while (s-- > 0) a.push(null);
31408      return a;
31409    })(this.mOrientations.length);
31410    let closureSize = 0;
31411    for (let i = 0; i < perms.length; i++) {
31412      {
31413        const perm = this.mOrientations[perms[i]];
31414        knownPerms[perms[i]] = perm;
31415        newPerms.add(perm);
31416        ++closureSize;
31417      }
31418      ;
31419    }
31420    while (!newPerms.isEmpty()) {
31421      {
31422        const perm = newPerms.remove(0);
31423        for (let index = 0; index < knownPerms.length; index++) {
31424          let knownPerm = knownPerms[index];
31425          {
31426            if (knownPerm != null) {
31427              let composition = perm.compose(knownPerm);
31428              let j2 = composition.mapIndex(0);
31429              if (knownPerms[j2] == null) {
31430                newPerms.add(composition);
31431                knownPerms[j2] = composition;
31432                ++closureSize;
31433              }
31434              composition = knownPerm.compose(perm);
31435              j2 = composition.mapIndex(0);
31436              if (knownPerms[j2] == null) {
31437                newPerms.add(composition);
31438                knownPerms[j2] = composition;
31439                ++closureSize;
31440              }
31441            }
31442          }
31443        }
31444      }
31445    }
31446    ;
31447    const result = ((s) => {
31448      let a = [];
31449      while (s-- > 0) a.push(0);
31450      return a;
31451    })(closureSize);
31452    let j = 0;
31453    for (let i = 0; i < knownPerms.length; i++) {
31454      {
31455        if (knownPerms[i] != null) {
31456          result[j++] = i;
31457        }
31458      }
31459      ;
31460    }
31461    return result;
31462  }
31463  /**
31464   * 
31465   * @param {number} orientation
31466   * @return {int[]}
31467   */
31468  getIncidentOrientations(orientation) {
31469    return null;
31470  }
31471  /**
31472   * 
31473   * @param {AlgebraicVector} v
31474   * @return {RealVector}
31475   */
31476  embedInR3(v) {
31477    return v.toRealVector();
31478  }
31479  /**
31480   * 
31481   * @param {AlgebraicVector} v
31482   * @return {double[]}
31483   */
31484  embedInR3Double(v) {
31485    return v.to3dDoubleVector();
31486  }
31487  /**
31488   * 
31489   * @return {boolean}
31490   */
31491  isTrivial() {
31492    return true;
31493  }
31494  /**
31495   * 
31496   * @return {AlgebraicMatrix}
31497   */
31498  getPrincipalReflection() {
31499    return this.principalReflection;
31500  }
31501  /**
31502   * 
31503   * @return {AlgebraicVector[]}
31504   */
31505  getOrbitTriangle() {
31506    const blueVertex = this.getSpecialOrbit(0 /* BLUE */).getPrototype();
31507    const redVertex = this.getSpecialOrbit(1 /* RED */).getPrototype();
31508    const yellowVertex = this.getSpecialOrbit(2 /* YELLOW */).getPrototype();
31509    return [blueVertex, redVertex, yellowVertex];
31510  }
31511  /**
31512   * 
31513   * @return {string}
31514   */
31515  computeOrbitDots() {
31516    if (this.dotLocator == null) this.dotLocator = new OrbitDotLocator(this, this.getOrbitTriangle());
31517    for (let index = this.mDirectionList.iterator(); index.hasNext(); ) {
31518      let orbit = index.next();
31519      {
31520        this.dotLocator.locateOrbitDot(orbit);
31521      }
31522    }
31523    return null;
31524  }
31525  /**
31526   * 
31527   * @return {boolean}
31528   */
31529  reverseOrbitTriangle() {
31530    return false;
31531  }
31532};
31533AbstractSymmetry["__class"] = "com.vzome.core.math.symmetry.AbstractSymmetry";
31534AbstractSymmetry["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetry", "com.vzome.core.math.symmetry.Embedding"];
31535((AbstractSymmetry2) => {
31536  class MismatchedAxes extends java.lang.RuntimeException {
31537    static {
31538      this.serialVersionUID = 2610579323321805e3;
31539    }
31540    constructor(message) {
31541      super(message);
31542      Object.setPrototypeOf(this, MismatchedAxes.prototype);
31543    }
31544  }
31545  AbstractSymmetry2.MismatchedAxes = MismatchedAxes;
31546  MismatchedAxes["__class"] = "com.vzome.core.math.symmetry.AbstractSymmetry.MismatchedAxes";
31547  MismatchedAxes["__interfaces"] = ["java.io.Serializable"];
31548})(AbstractSymmetry || (AbstractSymmetry = {}));
31549
31550export {
31551  javaemul,
31552  java,
31553  AlgebraicField,
31554  Construction,
31555  Point,
31556  NumberFormat,
31557  RealVector,
31558  AlgebraicVector,
31559  AlgebraicVectors,
31560  DomUtils,
31561  Symmetry,
31562  Direction,
31563  Permutation,
31564  Axis,
31565  Fields,
31566  AlgebraicMatrix,
31567  ArrayComparator,
31568  VefParser,
31569  PrintWriter,
31570  StringWriter,
31571  VefVectorExporter,
31572  OrbitSet,
31573  AbstractSymmetry
31574};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.