@glandais/vcyclist-engine 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -25
- package/kotlin-kotlin-stdlib.js +248 -202
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +9 -9
- package/kotlinx-coroutines-core.js +58 -58
- package/kotlinx-serialization-kotlinx-serialization-core.js +1 -1
- package/package.json +1 -1
- package/vcyclist-elevation.js +581 -518
- package/vcyclist-elevation.js.map +1 -1
- package/vcyclist-engine.d.ts +8 -3
- package/vcyclist-engine.js +763 -627
- package/vcyclist-engine.js.map +1 -1
- package/vcyclist-fit.js +440 -285
- package/vcyclist-fit.js.map +1 -1
- package/vcyclist-gpx.js +995 -760
- package/vcyclist-gpx.js.map +1 -1
- package/xmlutil-core.js +2449 -2449
package/vcyclist-elevation.js
CHANGED
|
@@ -18,43 +18,43 @@
|
|
|
18
18
|
var imul = Math.imul;
|
|
19
19
|
var hypot = Math.hypot;
|
|
20
20
|
var VOID = kotlin_kotlin.$_$.a;
|
|
21
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
22
|
-
var getNumberHashCode = kotlin_kotlin.$_$.
|
|
23
|
-
var getBooleanHashCode = kotlin_kotlin.$_$.
|
|
24
|
-
var equals = kotlin_kotlin.$_$.
|
|
25
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
26
|
-
var numberToLong = kotlin_kotlin.$_$.
|
|
27
|
-
var toNumber = kotlin_kotlin.$_$.
|
|
28
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
21
|
+
var protoOf = kotlin_kotlin.$_$.a6;
|
|
22
|
+
var getNumberHashCode = kotlin_kotlin.$_$.h5;
|
|
23
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.g5;
|
|
24
|
+
var equals = kotlin_kotlin.$_$.f5;
|
|
25
|
+
var initMetadataForClass = kotlin_kotlin.$_$.l5;
|
|
26
|
+
var numberToLong = kotlin_kotlin.$_$.s4;
|
|
27
|
+
var toNumber = kotlin_kotlin.$_$.u4;
|
|
28
|
+
var CoroutineImpl = kotlin_kotlin.$_$.f4;
|
|
29
29
|
var Unit_instance = kotlin_kotlin.$_$.t;
|
|
30
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
30
|
+
var THROW_CCE = kotlin_kotlin.$_$.i8;
|
|
31
31
|
var MutableEntry = kotlin_kotlin.$_$.d2;
|
|
32
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
33
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
34
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.
|
|
35
|
-
var constructCallableReference = kotlin_kotlin.$_$.
|
|
32
|
+
var isInterface = kotlin_kotlin.$_$.t5;
|
|
33
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.q3;
|
|
34
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.q5;
|
|
35
|
+
var constructCallableReference = kotlin_kotlin.$_$.d5;
|
|
36
36
|
var emptyList = kotlin_kotlin.$_$.p2;
|
|
37
37
|
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.b1;
|
|
38
38
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.x;
|
|
39
|
-
var toList = kotlin_kotlin.$_$.
|
|
39
|
+
var toList = kotlin_kotlin.$_$.l3;
|
|
40
40
|
var KtList = kotlin_kotlin.$_$.a2;
|
|
41
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
42
|
-
var toString = kotlin_kotlin.$_$.
|
|
41
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.n5;
|
|
42
|
+
var toString = kotlin_kotlin.$_$.c6;
|
|
43
43
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.m1;
|
|
44
44
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.w;
|
|
45
45
|
var listOf = kotlin_kotlin.$_$.a3;
|
|
46
|
-
var numberToInt = kotlin_kotlin.$_$.
|
|
47
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
48
|
-
var toList_0 = kotlin_kotlin.$_$.
|
|
46
|
+
var numberToInt = kotlin_kotlin.$_$.y5;
|
|
47
|
+
var initMetadataForObject = kotlin_kotlin.$_$.r5;
|
|
48
|
+
var toList_0 = kotlin_kotlin.$_$.k3;
|
|
49
49
|
var collectionSizeOrDefault = kotlin_kotlin.$_$.j2;
|
|
50
50
|
var get_indices = kotlin_kotlin.$_$.u2;
|
|
51
51
|
var get_lastIndex = kotlin_kotlin.$_$.w2;
|
|
52
52
|
var checkBuilderCapacity = kotlin_kotlin.$_$.h2;
|
|
53
53
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
54
|
-
var coerceIn = kotlin_kotlin.$_$.
|
|
55
|
-
var KFunctionImpl = kotlin_kotlin.$_$.
|
|
56
|
-
var initMetadataForFunctionReference = kotlin_kotlin.$_$.
|
|
57
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
54
|
+
var coerceIn = kotlin_kotlin.$_$.k6;
|
|
55
|
+
var KFunctionImpl = kotlin_kotlin.$_$.o6;
|
|
56
|
+
var initMetadataForFunctionReference = kotlin_kotlin.$_$.o5;
|
|
57
|
+
var getStringHashCode = kotlin_kotlin.$_$.j5;
|
|
58
58
|
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
|
|
59
59
|
var Semaphore = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
|
|
60
60
|
var async = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i;
|
|
@@ -65,20 +65,21 @@
|
|
|
65
65
|
var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
|
|
66
66
|
var contentEquals = kotlin_kotlin.$_$.k2;
|
|
67
67
|
var contentHashCode = kotlin_kotlin.$_$.l2;
|
|
68
|
-
var objectCreate = kotlin_kotlin.$_$.
|
|
69
|
-
var round = kotlin_kotlin.$_$.
|
|
70
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
71
|
-
var isNaN_0 = kotlin_kotlin.$_$.
|
|
72
|
-
var replace = kotlin_kotlin.$_$.
|
|
73
|
-
var coerceIn_0 = kotlin_kotlin.$_$.
|
|
68
|
+
var objectCreate = kotlin_kotlin.$_$.z5;
|
|
69
|
+
var round = kotlin_kotlin.$_$.f6;
|
|
70
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.m5;
|
|
71
|
+
var isNaN_0 = kotlin_kotlin.$_$.p8;
|
|
72
|
+
var replace = kotlin_kotlin.$_$.k7;
|
|
73
|
+
var coerceIn_0 = kotlin_kotlin.$_$.j6;
|
|
74
74
|
var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
|
|
75
75
|
var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
|
|
76
|
-
var KProperty0 = kotlin_kotlin.$_$.
|
|
77
|
-
var getPropertyCallableRef = kotlin_kotlin.$_$.
|
|
76
|
+
var KProperty0 = kotlin_kotlin.$_$.q6;
|
|
77
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.i5;
|
|
78
|
+
var isNumber = kotlin_kotlin.$_$.u5;
|
|
78
79
|
var await_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
|
|
79
80
|
var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.o1;
|
|
80
|
-
var
|
|
81
|
-
var lazy = kotlin_kotlin.$_$.
|
|
81
|
+
var charSequenceLength = kotlin_kotlin.$_$.b5;
|
|
82
|
+
var lazy = kotlin_kotlin.$_$.q8;
|
|
82
83
|
//endregion
|
|
83
84
|
//region block: pre-declaration
|
|
84
85
|
initMetadataForClass(SmoothingOptions, 'SmoothingOptions', SmoothingOptions);
|
|
@@ -87,7 +88,6 @@
|
|
|
87
88
|
initMetadataForCoroutine($setElevationsCOROUTINE$, CoroutineImpl);
|
|
88
89
|
initMetadataForCoroutine($getElevationsAlongCOROUTINE$, CoroutineImpl);
|
|
89
90
|
initMetadataForClass(BatchCalculator, 'BatchCalculator', VOID, VOID, VOID, [4, 7]);
|
|
90
|
-
initMetadataForObject(MathConstants, 'MathConstants');
|
|
91
91
|
initMetadataForClass(LatLon, 'LatLon');
|
|
92
92
|
initMetadataForClass(LatLonElevation, 'LatLonElevation');
|
|
93
93
|
initMetadataForObject(Distance, 'Distance');
|
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
initMetadataForCoroutine($decodeNodeCOROUTINE$, CoroutineImpl);
|
|
128
128
|
initMetadataForCoroutine($decodeBrowserCOROUTINE$, CoroutineImpl);
|
|
129
129
|
initMetadataForCoroutine($decodeWebpNodeCOROUTINE$, CoroutineImpl);
|
|
130
|
+
initMetadataForCoroutine($decodeBlobCOROUTINE$, CoroutineImpl);
|
|
130
131
|
//endregion
|
|
131
132
|
function SmoothingOptions(windowSize, enabled) {
|
|
132
133
|
windowSize = windowSize === VOID ? 50.0 : windowSize;
|
|
@@ -494,39 +495,28 @@
|
|
|
494
495
|
out.h(b);
|
|
495
496
|
return out;
|
|
496
497
|
};
|
|
497
|
-
function MathConstants() {
|
|
498
|
-
MathConstants_instance = this;
|
|
499
|
-
this.tw_1 = 3.141592653589793 / 180.0;
|
|
500
|
-
this.uw_1 = 180.0 / 3.141592653589793;
|
|
501
|
-
}
|
|
502
|
-
var MathConstants_instance;
|
|
503
|
-
function MathConstants_getInstance() {
|
|
504
|
-
if (MathConstants_instance == null)
|
|
505
|
-
new MathConstants();
|
|
506
|
-
return MathConstants_instance;
|
|
507
|
-
}
|
|
508
498
|
function LatLon(latitude, longitude, elevation) {
|
|
509
499
|
elevation = elevation === VOID ? null : elevation;
|
|
510
|
-
this.
|
|
511
|
-
this.
|
|
512
|
-
this.
|
|
500
|
+
this.tw_1 = latitude;
|
|
501
|
+
this.uw_1 = longitude;
|
|
502
|
+
this.vw_1 = elevation;
|
|
513
503
|
}
|
|
514
504
|
protoOf(LatLon).av = function () {
|
|
515
|
-
return this.
|
|
505
|
+
return this.tw_1;
|
|
516
506
|
};
|
|
517
507
|
protoOf(LatLon).bv = function () {
|
|
518
|
-
return this.
|
|
508
|
+
return this.uw_1;
|
|
519
509
|
};
|
|
520
|
-
protoOf(LatLon).
|
|
521
|
-
return this.
|
|
510
|
+
protoOf(LatLon).ww = function () {
|
|
511
|
+
return this.vw_1;
|
|
522
512
|
};
|
|
523
513
|
protoOf(LatLon).toString = function () {
|
|
524
|
-
return 'LatLon(latitude=' + this.
|
|
514
|
+
return 'LatLon(latitude=' + this.tw_1 + ', longitude=' + this.uw_1 + ', elevation=' + this.vw_1 + ')';
|
|
525
515
|
};
|
|
526
516
|
protoOf(LatLon).hashCode = function () {
|
|
527
|
-
var result = getNumberHashCode(this.
|
|
528
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
529
|
-
result = imul(result, 31) + (this.
|
|
517
|
+
var result = getNumberHashCode(this.tw_1);
|
|
518
|
+
result = imul(result, 31) + getNumberHashCode(this.uw_1) | 0;
|
|
519
|
+
result = imul(result, 31) + (this.vw_1 == null ? 0 : getNumberHashCode(this.vw_1)) | 0;
|
|
530
520
|
return result;
|
|
531
521
|
};
|
|
532
522
|
protoOf(LatLon).equals = function (other) {
|
|
@@ -534,35 +524,35 @@
|
|
|
534
524
|
return true;
|
|
535
525
|
if (!(other instanceof LatLon))
|
|
536
526
|
return false;
|
|
537
|
-
if (!equals(this.
|
|
527
|
+
if (!equals(this.tw_1, other.tw_1))
|
|
538
528
|
return false;
|
|
539
|
-
if (!equals(this.
|
|
529
|
+
if (!equals(this.uw_1, other.uw_1))
|
|
540
530
|
return false;
|
|
541
|
-
if (!equals(this.
|
|
531
|
+
if (!equals(this.vw_1, other.vw_1))
|
|
542
532
|
return false;
|
|
543
533
|
return true;
|
|
544
534
|
};
|
|
545
535
|
function LatLonElevation(latitude, longitude, elevation) {
|
|
546
|
-
this.
|
|
547
|
-
this.
|
|
548
|
-
this.
|
|
536
|
+
this.xw_1 = latitude;
|
|
537
|
+
this.yw_1 = longitude;
|
|
538
|
+
this.zw_1 = elevation;
|
|
549
539
|
}
|
|
550
540
|
protoOf(LatLonElevation).av = function () {
|
|
551
|
-
return this.
|
|
541
|
+
return this.xw_1;
|
|
552
542
|
};
|
|
553
543
|
protoOf(LatLonElevation).bv = function () {
|
|
554
|
-
return this.
|
|
544
|
+
return this.yw_1;
|
|
555
545
|
};
|
|
556
|
-
protoOf(LatLonElevation).
|
|
557
|
-
return this.
|
|
546
|
+
protoOf(LatLonElevation).ww = function () {
|
|
547
|
+
return this.zw_1;
|
|
558
548
|
};
|
|
559
549
|
protoOf(LatLonElevation).toString = function () {
|
|
560
|
-
return 'LatLonElevation(latitude=' + this.
|
|
550
|
+
return 'LatLonElevation(latitude=' + this.xw_1 + ', longitude=' + this.yw_1 + ', elevation=' + this.zw_1 + ')';
|
|
561
551
|
};
|
|
562
552
|
protoOf(LatLonElevation).hashCode = function () {
|
|
563
|
-
var result = getNumberHashCode(this.
|
|
564
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
565
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
553
|
+
var result = getNumberHashCode(this.xw_1);
|
|
554
|
+
result = imul(result, 31) + getNumberHashCode(this.yw_1) | 0;
|
|
555
|
+
result = imul(result, 31) + getNumberHashCode(this.zw_1) | 0;
|
|
566
556
|
return result;
|
|
567
557
|
};
|
|
568
558
|
protoOf(LatLonElevation).equals = function (other) {
|
|
@@ -570,21 +560,21 @@
|
|
|
570
560
|
return true;
|
|
571
561
|
if (!(other instanceof LatLonElevation))
|
|
572
562
|
return false;
|
|
573
|
-
if (!equals(this.
|
|
563
|
+
if (!equals(this.xw_1, other.xw_1))
|
|
574
564
|
return false;
|
|
575
|
-
if (!equals(this.
|
|
565
|
+
if (!equals(this.yw_1, other.yw_1))
|
|
576
566
|
return false;
|
|
577
|
-
if (!equals(this.
|
|
567
|
+
if (!equals(this.zw_1, other.zw_1))
|
|
578
568
|
return false;
|
|
579
569
|
return true;
|
|
580
570
|
};
|
|
581
571
|
function Distance() {
|
|
582
572
|
}
|
|
583
573
|
protoOf(Distance).rw = function (coord1, coord2) {
|
|
584
|
-
var lat1Rad = coord1.av() *
|
|
585
|
-
var lat2Rad = coord2.av() *
|
|
586
|
-
var deltaLat = (coord2.av() - coord1.av()) *
|
|
587
|
-
var deltaLon = (coord2.bv() - coord1.bv()) *
|
|
574
|
+
var lat1Rad = coord1.av() * 0.017453292519943295;
|
|
575
|
+
var lat2Rad = coord2.av() * 0.017453292519943295;
|
|
576
|
+
var deltaLat = (coord2.av() - coord1.av()) * 0.017453292519943295;
|
|
577
|
+
var deltaLon = (coord2.bv() - coord1.bv()) * 0.017453292519943295;
|
|
588
578
|
// Inline function 'kotlin.math.sin' call
|
|
589
579
|
var x = deltaLat / 2.0;
|
|
590
580
|
var sinHalfLat = Math.sin(x);
|
|
@@ -605,7 +595,7 @@
|
|
|
605
595
|
var c = 2.0 * Math.atan2(tmp0, x_2);
|
|
606
596
|
return 6371000.0 * c;
|
|
607
597
|
};
|
|
608
|
-
protoOf(Distance).
|
|
598
|
+
protoOf(Distance).ax = function (points) {
|
|
609
599
|
if (points.n()) {
|
|
610
600
|
// Inline function 'kotlin.doubleArrayOf' call
|
|
611
601
|
return new Float64Array([0.0]);
|
|
@@ -636,7 +626,7 @@
|
|
|
636
626
|
do {
|
|
637
627
|
var i = inductionVariable;
|
|
638
628
|
inductionVariable = inductionVariable + 1 | 0;
|
|
639
|
-
var d = points.m(i).
|
|
629
|
+
var d = points.m(i).ex(first, last);
|
|
640
630
|
if (d > maxDistance) {
|
|
641
631
|
maxDistance = d;
|
|
642
632
|
maxIndex = i;
|
|
@@ -664,12 +654,12 @@
|
|
|
664
654
|
var _iterator__ex2g4s = points.i();
|
|
665
655
|
while (_iterator__ex2g4s.j()) {
|
|
666
656
|
var item = _iterator__ex2g4s.k();
|
|
667
|
-
var tmp$ret$2 = EcefConverter_instance.
|
|
657
|
+
var tmp$ret$2 = EcefConverter_instance.fx(item, zExaggeration);
|
|
668
658
|
destination.h(tmp$ret$2);
|
|
669
659
|
}
|
|
670
660
|
var ecef = destination;
|
|
671
661
|
// Inline function 'kotlin.collections.map' call
|
|
672
|
-
var this_0 = this.
|
|
662
|
+
var this_0 = this.gx(ecef, tolerance);
|
|
673
663
|
// Inline function 'kotlin.collections.mapTo' call
|
|
674
664
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
675
665
|
var _iterator__ex2g4s_0 = this_0.i();
|
|
@@ -680,7 +670,7 @@
|
|
|
680
670
|
}
|
|
681
671
|
return destination_0;
|
|
682
672
|
};
|
|
683
|
-
protoOf(DouglasPeucker).
|
|
673
|
+
protoOf(DouglasPeucker).gx = function (points, tolerance) {
|
|
684
674
|
if (points.l() <= 2)
|
|
685
675
|
return toList_0(get_indices(points));
|
|
686
676
|
var lastIndex = get_lastIndex(points);
|
|
@@ -701,10 +691,10 @@
|
|
|
701
691
|
}
|
|
702
692
|
function EcefConverter() {
|
|
703
693
|
}
|
|
704
|
-
protoOf(EcefConverter).
|
|
705
|
-
var latRad = coordinates.av() *
|
|
706
|
-
var lonRad = coordinates.bv() *
|
|
707
|
-
var tmp0_elvis_lhs = coordinates.
|
|
694
|
+
protoOf(EcefConverter).fx = function (coordinates, zExaggeration) {
|
|
695
|
+
var latRad = coordinates.av() * 0.017453292519943295;
|
|
696
|
+
var lonRad = coordinates.bv() * 0.017453292519943295;
|
|
697
|
+
var tmp0_elvis_lhs = coordinates.ww();
|
|
708
698
|
var elevationExaggerated = zExaggeration * (tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs);
|
|
709
699
|
// Inline function 'kotlin.math.sin' call
|
|
710
700
|
var sinLat = Math.sin(latRad);
|
|
@@ -740,10 +730,10 @@
|
|
|
740
730
|
}
|
|
741
731
|
function $getElevationCOROUTINE$(_this__u8e3s4, coords, zoomLevel, interpolation, resultContinuation) {
|
|
742
732
|
CoroutineImpl.call(this, resultContinuation);
|
|
743
|
-
this.
|
|
744
|
-
this.
|
|
745
|
-
this.
|
|
746
|
-
this.
|
|
733
|
+
this.uy_1 = _this__u8e3s4;
|
|
734
|
+
this.vy_1 = coords;
|
|
735
|
+
this.wy_1 = zoomLevel;
|
|
736
|
+
this.xy_1 = interpolation;
|
|
747
737
|
}
|
|
748
738
|
protoOf($getElevationCOROUTINE$).p6 = function () {
|
|
749
739
|
var suspendResult = this.j6_1;
|
|
@@ -754,17 +744,17 @@
|
|
|
754
744
|
case 0:
|
|
755
745
|
this.i6_1 = 5;
|
|
756
746
|
this.i6_1 = 4;
|
|
757
|
-
if (this.
|
|
747
|
+
if (this.xy_1) {
|
|
758
748
|
this.h6_1 = 2;
|
|
759
|
-
suspendResult = getInterpolatedElevation(this.
|
|
749
|
+
suspendResult = getInterpolatedElevation(this.uy_1, this.vy_1, this.wy_1, this);
|
|
760
750
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
761
751
|
return suspendResult;
|
|
762
752
|
}
|
|
763
753
|
continue $sm;
|
|
764
754
|
} else {
|
|
765
|
-
var pixel = ElevationFunctions_instance.
|
|
755
|
+
var pixel = ElevationFunctions_instance.az(this.vy_1, this.wy_1, this.uy_1.yu_1);
|
|
766
756
|
this.h6_1 = 1;
|
|
767
|
-
suspendResult = elevationFromPixel(this.
|
|
757
|
+
suspendResult = elevationFromPixel(this.uy_1, pixel, this);
|
|
768
758
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
769
759
|
return suspendResult;
|
|
770
760
|
}
|
|
@@ -772,15 +762,15 @@
|
|
|
772
762
|
}
|
|
773
763
|
|
|
774
764
|
case 1:
|
|
775
|
-
this.
|
|
765
|
+
this.zy_1 = suspendResult;
|
|
776
766
|
this.h6_1 = 3;
|
|
777
767
|
continue $sm;
|
|
778
768
|
case 2:
|
|
779
|
-
this.
|
|
769
|
+
this.zy_1 = suspendResult;
|
|
780
770
|
this.h6_1 = 3;
|
|
781
771
|
continue $sm;
|
|
782
772
|
case 3:
|
|
783
|
-
this.
|
|
773
|
+
this.yy_1 = this.zy_1;
|
|
784
774
|
this.i6_1 = 5;
|
|
785
775
|
this.h6_1 = 6;
|
|
786
776
|
continue $sm;
|
|
@@ -799,7 +789,7 @@
|
|
|
799
789
|
throw this.k6_1;
|
|
800
790
|
case 6:
|
|
801
791
|
this.i6_1 = 5;
|
|
802
|
-
return this.
|
|
792
|
+
return this.yy_1;
|
|
803
793
|
}
|
|
804
794
|
} catch ($p) {
|
|
805
795
|
var e = $p;
|
|
@@ -814,9 +804,9 @@
|
|
|
814
804
|
};
|
|
815
805
|
function $getInterpolatedElevationCOROUTINE$(_this__u8e3s4, coords, zoomLevel, resultContinuation) {
|
|
816
806
|
CoroutineImpl.call(this, resultContinuation);
|
|
817
|
-
this.
|
|
818
|
-
this.
|
|
819
|
-
this.
|
|
807
|
+
this.px_1 = _this__u8e3s4;
|
|
808
|
+
this.qx_1 = coords;
|
|
809
|
+
this.rx_1 = zoomLevel;
|
|
820
810
|
}
|
|
821
811
|
protoOf($getInterpolatedElevationCOROUTINE$).p6 = function () {
|
|
822
812
|
var suspendResult = this.j6_1;
|
|
@@ -826,46 +816,46 @@
|
|
|
826
816
|
switch (tmp) {
|
|
827
817
|
case 0:
|
|
828
818
|
this.i6_1 = 5;
|
|
829
|
-
this.
|
|
819
|
+
this.zx_1 = ElevationFunctions_instance.bz(this.qx_1, this.rx_1, this.px_1.yu_1);
|
|
830
820
|
var tmp_0 = this;
|
|
831
|
-
var x = this.
|
|
832
|
-
tmp_0.
|
|
821
|
+
var x = this.zx_1.dz_1;
|
|
822
|
+
tmp_0.ay_1 = numberToInt(Math.floor(x));
|
|
833
823
|
var tmp_1 = this;
|
|
834
|
-
var x_0 = this.
|
|
835
|
-
tmp_1.
|
|
836
|
-
this.
|
|
837
|
-
this.
|
|
838
|
-
this.
|
|
839
|
-
this.
|
|
824
|
+
var x_0 = this.zx_1.ez_1;
|
|
825
|
+
tmp_1.by_1 = numberToInt(Math.floor(x_0));
|
|
826
|
+
this.yx_1 = this.ay_1 + 1 | 0;
|
|
827
|
+
this.xx_1 = this.by_1 + 1 | 0;
|
|
828
|
+
this.tx_1 = this.zx_1.dz_1 - this.ay_1;
|
|
829
|
+
this.sx_1 = this.zx_1.ez_1 - this.by_1;
|
|
840
830
|
this.h6_1 = 1;
|
|
841
|
-
suspendResult = elevationFromPixel(this.
|
|
831
|
+
suspendResult = elevationFromPixel(this.px_1, ElevationFunctions_instance.fz(new Pixel(this.zx_1.cz_1, this.ay_1, this.by_1), this.px_1.yu_1), this);
|
|
842
832
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
843
833
|
return suspendResult;
|
|
844
834
|
}
|
|
845
835
|
|
|
846
836
|
continue $sm;
|
|
847
837
|
case 1:
|
|
848
|
-
this.
|
|
838
|
+
this.wx_1 = suspendResult;
|
|
849
839
|
this.h6_1 = 2;
|
|
850
|
-
suspendResult = elevationFromPixel(this.
|
|
840
|
+
suspendResult = elevationFromPixel(this.px_1, ElevationFunctions_instance.fz(new Pixel(this.zx_1.cz_1, this.yx_1, this.by_1), this.px_1.yu_1), this);
|
|
851
841
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
852
842
|
return suspendResult;
|
|
853
843
|
}
|
|
854
844
|
|
|
855
845
|
continue $sm;
|
|
856
846
|
case 2:
|
|
857
|
-
this.
|
|
847
|
+
this.vx_1 = suspendResult;
|
|
858
848
|
this.h6_1 = 3;
|
|
859
|
-
suspendResult = elevationFromPixel(this.
|
|
849
|
+
suspendResult = elevationFromPixel(this.px_1, ElevationFunctions_instance.fz(new Pixel(this.zx_1.cz_1, this.ay_1, this.xx_1), this.px_1.yu_1), this);
|
|
860
850
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
861
851
|
return suspendResult;
|
|
862
852
|
}
|
|
863
853
|
|
|
864
854
|
continue $sm;
|
|
865
855
|
case 3:
|
|
866
|
-
this.
|
|
856
|
+
this.ux_1 = suspendResult;
|
|
867
857
|
this.h6_1 = 4;
|
|
868
|
-
suspendResult = elevationFromPixel(this.
|
|
858
|
+
suspendResult = elevationFromPixel(this.px_1, ElevationFunctions_instance.fz(new Pixel(this.zx_1.cz_1, this.yx_1, this.xx_1), this.px_1.yu_1), this);
|
|
869
859
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
870
860
|
return suspendResult;
|
|
871
861
|
}
|
|
@@ -873,9 +863,9 @@
|
|
|
873
863
|
continue $sm;
|
|
874
864
|
case 4:
|
|
875
865
|
var p11 = suspendResult;
|
|
876
|
-
var top = this.
|
|
877
|
-
var bottom = this.
|
|
878
|
-
return top * (1.0 - this.
|
|
866
|
+
var top = this.wx_1 * (1.0 - this.tx_1) + this.vx_1 * this.tx_1;
|
|
867
|
+
var bottom = this.ux_1 * (1.0 - this.tx_1) + p11 * this.tx_1;
|
|
868
|
+
return top * (1.0 - this.sx_1) + bottom * this.sx_1;
|
|
879
869
|
case 5:
|
|
880
870
|
throw this.k6_1;
|
|
881
871
|
}
|
|
@@ -892,8 +882,8 @@
|
|
|
892
882
|
};
|
|
893
883
|
function $elevationFromPixelCOROUTINE$(_this__u8e3s4, pixel, resultContinuation) {
|
|
894
884
|
CoroutineImpl.call(this, resultContinuation);
|
|
895
|
-
this.
|
|
896
|
-
this.
|
|
885
|
+
this.ky_1 = _this__u8e3s4;
|
|
886
|
+
this.ly_1 = pixel;
|
|
897
887
|
}
|
|
898
888
|
protoOf($elevationFromPixelCOROUTINE$).p6 = function () {
|
|
899
889
|
var suspendResult = this.j6_1;
|
|
@@ -904,14 +894,14 @@
|
|
|
904
894
|
case 0:
|
|
905
895
|
this.i6_1 = 2;
|
|
906
896
|
this.h6_1 = 1;
|
|
907
|
-
suspendResult = this.
|
|
897
|
+
suspendResult = this.ky_1.xu_1.mz(this.ly_1.gz_1, this);
|
|
908
898
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
909
899
|
return suspendResult;
|
|
910
900
|
}
|
|
911
901
|
|
|
912
902
|
continue $sm;
|
|
913
903
|
case 1:
|
|
914
|
-
return suspendResult.
|
|
904
|
+
return suspendResult.sz(this.ly_1);
|
|
915
905
|
case 2:
|
|
916
906
|
throw this.k6_1;
|
|
917
907
|
}
|
|
@@ -943,24 +933,24 @@
|
|
|
943
933
|
}
|
|
944
934
|
function ElevationFunctions() {
|
|
945
935
|
}
|
|
946
|
-
protoOf(ElevationFunctions).
|
|
947
|
-
return degrees *
|
|
936
|
+
protoOf(ElevationFunctions).tz = function (degrees) {
|
|
937
|
+
return degrees * 0.017453292519943295;
|
|
948
938
|
};
|
|
949
|
-
protoOf(ElevationFunctions).
|
|
939
|
+
protoOf(ElevationFunctions).uz = function (lat) {
|
|
950
940
|
return lat >= -85.0511 && lat <= 85.0511;
|
|
951
941
|
};
|
|
952
|
-
protoOf(ElevationFunctions).
|
|
942
|
+
protoOf(ElevationFunctions).vz = function (lon) {
|
|
953
943
|
return -180.0 <= lon ? lon <= 180.0 : false;
|
|
954
944
|
};
|
|
955
|
-
protoOf(ElevationFunctions).
|
|
945
|
+
protoOf(ElevationFunctions).wz = function (zoom) {
|
|
956
946
|
return 0 <= zoom ? zoom <= 15 : false;
|
|
957
947
|
};
|
|
958
|
-
protoOf(ElevationFunctions).
|
|
959
|
-
var x = pixel.
|
|
960
|
-
var y = pixel.
|
|
961
|
-
var tileX = pixel.
|
|
962
|
-
var tileY = pixel.
|
|
963
|
-
var z = pixel.
|
|
948
|
+
protoOf(ElevationFunctions).fz = function (pixel, tileSize) {
|
|
949
|
+
var x = pixel.hz_1;
|
|
950
|
+
var y = pixel.iz_1;
|
|
951
|
+
var tileX = pixel.gz_1.rv_1;
|
|
952
|
+
var tileY = pixel.gz_1.sv_1;
|
|
953
|
+
var z = pixel.gz_1.tv_1;
|
|
964
954
|
if (x < 0) {
|
|
965
955
|
x = x + tileSize | 0;
|
|
966
956
|
tileX = tileX - 1 | 0;
|
|
@@ -982,23 +972,23 @@
|
|
|
982
972
|
tileY = coerceIn(tileY, 0, maxTile);
|
|
983
973
|
return new Pixel(new TileCoordinates(tileX, tileY, z), x, y);
|
|
984
974
|
};
|
|
985
|
-
protoOf(ElevationFunctions).
|
|
975
|
+
protoOf(ElevationFunctions).xz = function (coords, z) {
|
|
986
976
|
// Inline function 'kotlin.require' call
|
|
987
|
-
if (!this.
|
|
977
|
+
if (!this.uz(coords.av())) {
|
|
988
978
|
var message = 'Invalid latitude: ' + formatNumber_0(ElevationFunctions_instance, coords.av()) + '. Must be between -85.0511 and 85.0511';
|
|
989
979
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
990
980
|
}
|
|
991
981
|
// Inline function 'kotlin.require' call
|
|
992
|
-
if (!this.
|
|
982
|
+
if (!this.vz(coords.bv())) {
|
|
993
983
|
var message_0 = 'Invalid longitude: ' + formatNumber_0(ElevationFunctions_instance, coords.bv()) + '. Must be between -180 and 180';
|
|
994
984
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
995
985
|
}
|
|
996
986
|
// Inline function 'kotlin.require' call
|
|
997
|
-
if (!this.
|
|
987
|
+
if (!this.wz(z)) {
|
|
998
988
|
var message_1 = 'Invalid zoom level: ' + z + '. Must be between 0 and 15';
|
|
999
989
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
1000
990
|
}
|
|
1001
|
-
var lat = this.
|
|
991
|
+
var lat = this.tz(coords.av());
|
|
1002
992
|
var n = 1 << z;
|
|
1003
993
|
var xFloat = (coords.bv() + 180.0) / 360.0 * n;
|
|
1004
994
|
// Inline function 'kotlin.math.tan' call
|
|
@@ -1017,26 +1007,26 @@
|
|
|
1017
1007
|
return new TileCoordinatesFloat(x_0, y, xFloat, yFloat, z);
|
|
1018
1008
|
};
|
|
1019
1009
|
protoOf(ElevationFunctions).qv = function (coords, z) {
|
|
1020
|
-
var tile = this.
|
|
1021
|
-
return new TileCoordinates(tile.
|
|
1010
|
+
var tile = this.xz(coords, z);
|
|
1011
|
+
return new TileCoordinates(tile.yz_1, tile.zz_1, tile.c10_1);
|
|
1022
1012
|
};
|
|
1023
|
-
protoOf(ElevationFunctions).
|
|
1024
|
-
var tile = this.
|
|
1013
|
+
protoOf(ElevationFunctions).az = function (coords, z, tileSize) {
|
|
1014
|
+
var tile = this.xz(coords, z);
|
|
1025
1015
|
// Inline function 'kotlin.math.floor' call
|
|
1026
|
-
var x = (tile.
|
|
1016
|
+
var x = (tile.a10_1 - tile.yz_1) * tileSize;
|
|
1027
1017
|
var tmp$ret$0 = Math.floor(x);
|
|
1028
1018
|
var px = coerceIn(numberToInt(tmp$ret$0), 0, tileSize - 1 | 0);
|
|
1029
1019
|
// Inline function 'kotlin.math.floor' call
|
|
1030
|
-
var x_0 = (tile.
|
|
1020
|
+
var x_0 = (tile.b10_1 - tile.zz_1) * tileSize;
|
|
1031
1021
|
var tmp$ret$1 = Math.floor(x_0);
|
|
1032
1022
|
var py = coerceIn(numberToInt(tmp$ret$1), 0, tileSize - 1 | 0);
|
|
1033
|
-
return new Pixel(new TileCoordinates(tile.
|
|
1023
|
+
return new Pixel(new TileCoordinates(tile.yz_1, tile.zz_1, z), px, py);
|
|
1034
1024
|
};
|
|
1035
|
-
protoOf(ElevationFunctions).
|
|
1036
|
-
var tile = this.
|
|
1037
|
-
var px = (tile.
|
|
1038
|
-
var py = (tile.
|
|
1039
|
-
return new PixelFloat(new TileCoordinates(tile.
|
|
1025
|
+
protoOf(ElevationFunctions).bz = function (coords, z, tileSize) {
|
|
1026
|
+
var tile = this.xz(coords, z);
|
|
1027
|
+
var px = (tile.a10_1 - tile.yz_1) * tileSize;
|
|
1028
|
+
var py = (tile.b10_1 - tile.zz_1) * tileSize;
|
|
1029
|
+
return new PixelFloat(new TileCoordinates(tile.yz_1, tile.zz_1, z), px, py);
|
|
1040
1030
|
};
|
|
1041
1031
|
var ElevationFunctions_instance;
|
|
1042
1032
|
function ElevationFunctions_getInstance() {
|
|
@@ -1045,11 +1035,11 @@
|
|
|
1045
1035
|
function fetchAndDecodeTile$ref() {
|
|
1046
1036
|
KFunctionImpl.call(this, 1, 2, 2);
|
|
1047
1037
|
}
|
|
1048
|
-
protoOf(fetchAndDecodeTile$ref).
|
|
1038
|
+
protoOf(fetchAndDecodeTile$ref).g10 = function (p0, $completion) {
|
|
1049
1039
|
return fetchAndDecodeTile(p0, $completion);
|
|
1050
1040
|
};
|
|
1051
1041
|
protoOf(fetchAndDecodeTile$ref).x6 = function (p1, $completion) {
|
|
1052
|
-
return this.
|
|
1042
|
+
return this.g10((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
|
|
1053
1043
|
};
|
|
1054
1044
|
function ElevationProvider(config, fetcher) {
|
|
1055
1045
|
config = config === VOID ? new ElevationProviderConfig() : config;
|
|
@@ -1060,39 +1050,39 @@
|
|
|
1060
1050
|
tmp = fetcher;
|
|
1061
1051
|
}
|
|
1062
1052
|
fetcher = tmp;
|
|
1063
|
-
this.
|
|
1064
|
-
var containsArg = this.
|
|
1053
|
+
this.h10_1 = config;
|
|
1054
|
+
var containsArg = this.h10_1.l10_1;
|
|
1065
1055
|
// Inline function 'kotlin.require' call
|
|
1066
1056
|
if (!(0 <= containsArg ? containsArg <= 15 : false)) {
|
|
1067
|
-
var message = 'Invalid zoom level: ' + this.
|
|
1057
|
+
var message = 'Invalid zoom level: ' + this.h10_1.l10_1 + '. Must be an integer between 0 and 15';
|
|
1068
1058
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1069
1059
|
}
|
|
1070
1060
|
// Inline function 'kotlin.require' call
|
|
1071
|
-
if (!(this.
|
|
1072
|
-
var message_0 = 'Invalid cache size: ' + this.
|
|
1061
|
+
if (!(this.h10_1.m10_1 > 0)) {
|
|
1062
|
+
var message_0 = 'Invalid cache size: ' + this.h10_1.m10_1 + '. Must be a positive integer';
|
|
1073
1063
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1074
1064
|
}
|
|
1075
1065
|
// Inline function 'kotlin.require' call
|
|
1076
|
-
if (!(this.
|
|
1077
|
-
var message_1 = 'Invalid tile size: ' + this.
|
|
1066
|
+
if (!(this.h10_1.o10_1 > 0 && (this.h10_1.o10_1 & (this.h10_1.o10_1 - 1 | 0)) === 0)) {
|
|
1067
|
+
var message_1 = 'Invalid tile size: ' + this.h10_1.o10_1 + '. Must be a positive power of 2';
|
|
1078
1068
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
1079
1069
|
}
|
|
1080
|
-
this.
|
|
1081
|
-
this.
|
|
1082
|
-
this.
|
|
1070
|
+
this.i10_1 = new TileManager(this.h10_1.n10_1, this.h10_1.m10_1, fetcher);
|
|
1071
|
+
this.j10_1 = new ElevationCalculator(this.i10_1, this.h10_1.o10_1);
|
|
1072
|
+
this.k10_1 = new BatchCalculator(this.j10_1);
|
|
1083
1073
|
}
|
|
1084
|
-
protoOf(ElevationProvider).
|
|
1085
|
-
return this.
|
|
1074
|
+
protoOf(ElevationProvider).q10 = function (latitude, longitude, interpolation, $completion) {
|
|
1075
|
+
return this.j10_1.zu(new LatLon(latitude, longitude), this.h10_1.l10_1, interpolation, $completion);
|
|
1086
1076
|
};
|
|
1087
|
-
protoOf(ElevationProvider).
|
|
1088
|
-
return this.
|
|
1077
|
+
protoOf(ElevationProvider).r10 = function (coordinates, interpolation, $completion) {
|
|
1078
|
+
return this.k10_1.mw(coordinates, this.h10_1.l10_1, interpolation, VOID, $completion);
|
|
1089
1079
|
};
|
|
1090
|
-
protoOf(ElevationProvider).
|
|
1080
|
+
protoOf(ElevationProvider).s10 = function (coordinates, interpolation, $completion, $super) {
|
|
1091
1081
|
interpolation = interpolation === VOID ? true : interpolation;
|
|
1092
|
-
return $super === VOID ? this.
|
|
1082
|
+
return $super === VOID ? this.r10(coordinates, interpolation, $completion) : $super.r10.call(this, coordinates, interpolation, $completion);
|
|
1093
1083
|
};
|
|
1094
|
-
protoOf(ElevationProvider).
|
|
1095
|
-
return this.
|
|
1084
|
+
protoOf(ElevationProvider).t10 = function (path, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion) {
|
|
1085
|
+
return this.k10_1.qw(path, this.h10_1.l10_1, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion);
|
|
1096
1086
|
};
|
|
1097
1087
|
function ElevationProviderConfig(zoomLevel, cacheSize, tileUrlTemplate, tileSize, attribution) {
|
|
1098
1088
|
zoomLevel = zoomLevel === VOID ? 12 : zoomLevel;
|
|
@@ -1100,21 +1090,21 @@
|
|
|
1100
1090
|
tileUrlTemplate = tileUrlTemplate === VOID ? 'https://tiles.mapterhorn.com/{z}/{x}/{y}.webp' : tileUrlTemplate;
|
|
1101
1091
|
tileSize = tileSize === VOID ? 512 : tileSize;
|
|
1102
1092
|
attribution = attribution === VOID ? new Attribution('Mapterhorn elevation data. See mapterhorn.com/attribution/ for details.', 'https://mapterhorn.com/attribution/') : attribution;
|
|
1103
|
-
this.
|
|
1104
|
-
this.
|
|
1105
|
-
this.
|
|
1106
|
-
this.
|
|
1107
|
-
this.
|
|
1093
|
+
this.l10_1 = zoomLevel;
|
|
1094
|
+
this.m10_1 = cacheSize;
|
|
1095
|
+
this.n10_1 = tileUrlTemplate;
|
|
1096
|
+
this.o10_1 = tileSize;
|
|
1097
|
+
this.p10_1 = attribution;
|
|
1108
1098
|
}
|
|
1109
1099
|
protoOf(ElevationProviderConfig).toString = function () {
|
|
1110
|
-
return 'ElevationProviderConfig(zoomLevel=' + this.
|
|
1100
|
+
return 'ElevationProviderConfig(zoomLevel=' + this.l10_1 + ', cacheSize=' + this.m10_1 + ', tileUrlTemplate=' + this.n10_1 + ', tileSize=' + this.o10_1 + ', attribution=' + this.p10_1.toString() + ')';
|
|
1111
1101
|
};
|
|
1112
1102
|
protoOf(ElevationProviderConfig).hashCode = function () {
|
|
1113
|
-
var result = this.
|
|
1103
|
+
var result = this.l10_1;
|
|
1104
|
+
result = imul(result, 31) + this.m10_1 | 0;
|
|
1105
|
+
result = imul(result, 31) + getStringHashCode(this.n10_1) | 0;
|
|
1114
1106
|
result = imul(result, 31) + this.o10_1 | 0;
|
|
1115
|
-
result = imul(result, 31) +
|
|
1116
|
-
result = imul(result, 31) + this.q10_1 | 0;
|
|
1117
|
-
result = imul(result, 31) + this.r10_1.hashCode() | 0;
|
|
1107
|
+
result = imul(result, 31) + this.p10_1.hashCode() | 0;
|
|
1118
1108
|
return result;
|
|
1119
1109
|
};
|
|
1120
1110
|
protoOf(ElevationProviderConfig).equals = function (other) {
|
|
@@ -1122,29 +1112,29 @@
|
|
|
1122
1112
|
return true;
|
|
1123
1113
|
if (!(other instanceof ElevationProviderConfig))
|
|
1124
1114
|
return false;
|
|
1125
|
-
if (!(this.
|
|
1115
|
+
if (!(this.l10_1 === other.l10_1))
|
|
1126
1116
|
return false;
|
|
1127
|
-
if (!(this.
|
|
1117
|
+
if (!(this.m10_1 === other.m10_1))
|
|
1128
1118
|
return false;
|
|
1129
|
-
if (!(this.
|
|
1119
|
+
if (!(this.n10_1 === other.n10_1))
|
|
1130
1120
|
return false;
|
|
1131
|
-
if (!(this.
|
|
1121
|
+
if (!(this.o10_1 === other.o10_1))
|
|
1132
1122
|
return false;
|
|
1133
|
-
if (!this.
|
|
1123
|
+
if (!this.p10_1.equals(other.p10_1))
|
|
1134
1124
|
return false;
|
|
1135
1125
|
return true;
|
|
1136
1126
|
};
|
|
1137
1127
|
function Attribution(text, url) {
|
|
1138
1128
|
url = url === VOID ? null : url;
|
|
1139
|
-
this.
|
|
1140
|
-
this.
|
|
1129
|
+
this.u10_1 = text;
|
|
1130
|
+
this.v10_1 = url;
|
|
1141
1131
|
}
|
|
1142
1132
|
protoOf(Attribution).toString = function () {
|
|
1143
|
-
return 'Attribution(text=' + this.
|
|
1133
|
+
return 'Attribution(text=' + this.u10_1 + ', url=' + this.v10_1 + ')';
|
|
1144
1134
|
};
|
|
1145
1135
|
protoOf(Attribution).hashCode = function () {
|
|
1146
|
-
var result = getStringHashCode(this.
|
|
1147
|
-
result = imul(result, 31) + (this.
|
|
1136
|
+
var result = getStringHashCode(this.u10_1);
|
|
1137
|
+
result = imul(result, 31) + (this.v10_1 == null ? 0 : getStringHashCode(this.v10_1)) | 0;
|
|
1148
1138
|
return result;
|
|
1149
1139
|
};
|
|
1150
1140
|
protoOf(Attribution).equals = function (other) {
|
|
@@ -1152,9 +1142,9 @@
|
|
|
1152
1142
|
return true;
|
|
1153
1143
|
if (!(other instanceof Attribution))
|
|
1154
1144
|
return false;
|
|
1155
|
-
if (!(this.
|
|
1145
|
+
if (!(this.u10_1 === other.u10_1))
|
|
1156
1146
|
return false;
|
|
1157
|
-
if (!(this.
|
|
1147
|
+
if (!(this.v10_1 == other.v10_1))
|
|
1158
1148
|
return false;
|
|
1159
1149
|
return true;
|
|
1160
1150
|
};
|
|
@@ -1181,10 +1171,10 @@
|
|
|
1181
1171
|
var d = Math.abs(this_0);
|
|
1182
1172
|
var weight = 1.0 - d / windowSize;
|
|
1183
1173
|
totalWeight = totalWeight + weight;
|
|
1184
|
-
weightedSum = weightedSum + points.m(j).
|
|
1174
|
+
weightedSum = weightedSum + points.m(j).ww() * weight;
|
|
1185
1175
|
}
|
|
1186
1176
|
while (!(j === last));
|
|
1187
|
-
return totalWeight > 0.0 ? weightedSum / totalWeight : points.m(index).
|
|
1177
|
+
return totalWeight > 0.0 ? weightedSum / totalWeight : points.m(index).ww();
|
|
1188
1178
|
}
|
|
1189
1179
|
function formatWindow($this, w) {
|
|
1190
1180
|
var asLong = numberToLong(w);
|
|
@@ -1200,7 +1190,7 @@
|
|
|
1200
1190
|
var message = 'Invalid window size: ' + formatWindow(ElevationSmoother_instance, windowSize) + '. Must be positive';
|
|
1201
1191
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1202
1192
|
}
|
|
1203
|
-
var distances = Distance_instance.
|
|
1193
|
+
var distances = Distance_instance.ax(points);
|
|
1204
1194
|
// Inline function 'kotlin.collections.List' call
|
|
1205
1195
|
// Inline function 'kotlin.collections.MutableList' call
|
|
1206
1196
|
var size = points.l();
|
|
@@ -1223,19 +1213,19 @@
|
|
|
1223
1213
|
return ElevationSmoother_instance;
|
|
1224
1214
|
}
|
|
1225
1215
|
function Flux$forEachParallel$slambda$slambda($semaphore, $action, $item, resultContinuation) {
|
|
1226
|
-
this.
|
|
1227
|
-
this.
|
|
1228
|
-
this.
|
|
1216
|
+
this.e11_1 = $semaphore;
|
|
1217
|
+
this.f11_1 = $action;
|
|
1218
|
+
this.g11_1 = $item;
|
|
1229
1219
|
CoroutineImpl.call(this, resultContinuation);
|
|
1230
1220
|
}
|
|
1231
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1232
|
-
var tmp = this.
|
|
1221
|
+
protoOf(Flux$forEachParallel$slambda$slambda).k11 = function ($this$async, $completion) {
|
|
1222
|
+
var tmp = this.l11($this$async, $completion);
|
|
1233
1223
|
tmp.j6_1 = Unit_instance;
|
|
1234
1224
|
tmp.k6_1 = null;
|
|
1235
1225
|
return tmp.p6();
|
|
1236
1226
|
};
|
|
1237
1227
|
protoOf(Flux$forEachParallel$slambda$slambda).x6 = function (p1, $completion) {
|
|
1238
|
-
return this.
|
|
1228
|
+
return this.k11((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1239
1229
|
};
|
|
1240
1230
|
protoOf(Flux$forEachParallel$slambda$slambda).p6 = function () {
|
|
1241
1231
|
var suspendResult = this.j6_1;
|
|
@@ -1245,41 +1235,41 @@
|
|
|
1245
1235
|
switch (tmp) {
|
|
1246
1236
|
case 0:
|
|
1247
1237
|
this.i6_1 = 6;
|
|
1248
|
-
this.
|
|
1238
|
+
this.i11_1 = this.e11_1;
|
|
1249
1239
|
this.h6_1 = 1;
|
|
1250
|
-
suspendResult = this.
|
|
1240
|
+
suspendResult = this.i11_1.bs(this);
|
|
1251
1241
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1252
1242
|
return suspendResult;
|
|
1253
1243
|
}
|
|
1254
1244
|
|
|
1255
1245
|
continue $sm;
|
|
1256
1246
|
case 1:
|
|
1257
|
-
this.
|
|
1247
|
+
this.j11_1 = Unit_instance;
|
|
1258
1248
|
this.h6_1 = 2;
|
|
1259
1249
|
continue $sm;
|
|
1260
1250
|
case 2:
|
|
1261
1251
|
this.i6_1 = 5;
|
|
1262
1252
|
this.h6_1 = 3;
|
|
1263
|
-
suspendResult = this.
|
|
1253
|
+
suspendResult = this.f11_1(this.g11_1, this);
|
|
1264
1254
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1265
1255
|
return suspendResult;
|
|
1266
1256
|
}
|
|
1267
1257
|
|
|
1268
1258
|
continue $sm;
|
|
1269
1259
|
case 3:
|
|
1270
|
-
this.
|
|
1260
|
+
this.j11_1 = Unit_instance;
|
|
1271
1261
|
this.i6_1 = 6;
|
|
1272
1262
|
this.h6_1 = 4;
|
|
1273
1263
|
continue $sm;
|
|
1274
1264
|
case 4:
|
|
1275
|
-
this.
|
|
1265
|
+
this.j11_1;
|
|
1276
1266
|
this.i6_1 = 6;
|
|
1277
|
-
this.
|
|
1267
|
+
this.i11_1.vr();
|
|
1278
1268
|
return Unit_instance;
|
|
1279
1269
|
case 5:
|
|
1280
1270
|
this.i6_1 = 6;
|
|
1281
1271
|
var t = this.k6_1;
|
|
1282
|
-
this.
|
|
1272
|
+
this.i11_1.vr();
|
|
1283
1273
|
throw t;
|
|
1284
1274
|
case 6:
|
|
1285
1275
|
throw this.k6_1;
|
|
@@ -1295,31 +1285,31 @@
|
|
|
1295
1285
|
}
|
|
1296
1286
|
while (true);
|
|
1297
1287
|
};
|
|
1298
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1299
|
-
var i = new Flux$forEachParallel$slambda$slambda(this.
|
|
1300
|
-
i.
|
|
1288
|
+
protoOf(Flux$forEachParallel$slambda$slambda).l11 = function ($this$async, completion) {
|
|
1289
|
+
var i = new Flux$forEachParallel$slambda$slambda(this.e11_1, this.f11_1, this.g11_1, completion);
|
|
1290
|
+
i.h11_1 = $this$async;
|
|
1301
1291
|
return i;
|
|
1302
1292
|
};
|
|
1303
1293
|
function Flux$forEachParallel$slambda$slambda_0($semaphore, $action, $item, resultContinuation) {
|
|
1304
1294
|
var i = new Flux$forEachParallel$slambda$slambda($semaphore, $action, $item, resultContinuation);
|
|
1305
1295
|
return constructCallableReference(function ($this$async, $completion) {
|
|
1306
|
-
return i.
|
|
1296
|
+
return i.k11($this$async, $completion);
|
|
1307
1297
|
}, 1);
|
|
1308
1298
|
}
|
|
1309
1299
|
function Flux$forEachParallel$slambda($maxParallel, $items, $action, resultContinuation) {
|
|
1310
|
-
this.
|
|
1311
|
-
this.
|
|
1312
|
-
this.
|
|
1300
|
+
this.u11_1 = $maxParallel;
|
|
1301
|
+
this.v11_1 = $items;
|
|
1302
|
+
this.w11_1 = $action;
|
|
1313
1303
|
CoroutineImpl.call(this, resultContinuation);
|
|
1314
1304
|
}
|
|
1315
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1316
|
-
var tmp = this.
|
|
1305
|
+
protoOf(Flux$forEachParallel$slambda).y11 = function ($this$coroutineScope, $completion) {
|
|
1306
|
+
var tmp = this.l11($this$coroutineScope, $completion);
|
|
1317
1307
|
tmp.j6_1 = Unit_instance;
|
|
1318
1308
|
tmp.k6_1 = null;
|
|
1319
1309
|
return tmp.p6();
|
|
1320
1310
|
};
|
|
1321
1311
|
protoOf(Flux$forEachParallel$slambda).x6 = function (p1, $completion) {
|
|
1322
|
-
return this.
|
|
1312
|
+
return this.y11((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1323
1313
|
};
|
|
1324
1314
|
protoOf(Flux$forEachParallel$slambda).p6 = function () {
|
|
1325
1315
|
var suspendResult = this.j6_1;
|
|
@@ -1329,14 +1319,14 @@
|
|
|
1329
1319
|
switch (tmp) {
|
|
1330
1320
|
case 0:
|
|
1331
1321
|
this.i6_1 = 2;
|
|
1332
|
-
var semaphore = Semaphore(this.
|
|
1322
|
+
var semaphore = Semaphore(this.u11_1);
|
|
1333
1323
|
this.h6_1 = 1;
|
|
1334
|
-
var this_0 = this.
|
|
1324
|
+
var this_0 = this.v11_1;
|
|
1335
1325
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1336
1326
|
var _iterator__ex2g4s = this_0.i();
|
|
1337
1327
|
while (_iterator__ex2g4s.j()) {
|
|
1338
1328
|
var item = _iterator__ex2g4s.k();
|
|
1339
|
-
destination.h(async(this.
|
|
1329
|
+
destination.h(async(this.x11_1, VOID, VOID, Flux$forEachParallel$slambda$slambda_0(semaphore, this.w11_1, item, null)));
|
|
1340
1330
|
}
|
|
1341
1331
|
|
|
1342
1332
|
suspendResult = awaitAll(destination, this);
|
|
@@ -1361,23 +1351,23 @@
|
|
|
1361
1351
|
}
|
|
1362
1352
|
while (true);
|
|
1363
1353
|
};
|
|
1364
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1365
|
-
var i = new Flux$forEachParallel$slambda(this.
|
|
1366
|
-
i.
|
|
1354
|
+
protoOf(Flux$forEachParallel$slambda).l11 = function ($this$coroutineScope, completion) {
|
|
1355
|
+
var i = new Flux$forEachParallel$slambda(this.u11_1, this.v11_1, this.w11_1, completion);
|
|
1356
|
+
i.x11_1 = $this$coroutineScope;
|
|
1367
1357
|
return i;
|
|
1368
1358
|
};
|
|
1369
1359
|
function Flux$forEachParallel$slambda_0($maxParallel, $items, $action, resultContinuation) {
|
|
1370
1360
|
var i = new Flux$forEachParallel$slambda($maxParallel, $items, $action, resultContinuation);
|
|
1371
1361
|
return constructCallableReference(function ($this$coroutineScope, $completion) {
|
|
1372
|
-
return i.
|
|
1362
|
+
return i.y11($this$coroutineScope, $completion);
|
|
1373
1363
|
}, 1);
|
|
1374
1364
|
}
|
|
1375
1365
|
function $forEachParallelCOROUTINE$(_this__u8e3s4, items, maxParallel, action, resultContinuation) {
|
|
1376
1366
|
CoroutineImpl.call(this, resultContinuation);
|
|
1377
|
-
this.
|
|
1378
|
-
this.
|
|
1379
|
-
this.
|
|
1380
|
-
this.
|
|
1367
|
+
this.h12_1 = _this__u8e3s4;
|
|
1368
|
+
this.i12_1 = items;
|
|
1369
|
+
this.j12_1 = maxParallel;
|
|
1370
|
+
this.k12_1 = action;
|
|
1381
1371
|
}
|
|
1382
1372
|
protoOf($forEachParallelCOROUTINE$).p6 = function () {
|
|
1383
1373
|
var suspendResult = this.j6_1;
|
|
@@ -1387,13 +1377,13 @@
|
|
|
1387
1377
|
switch (tmp) {
|
|
1388
1378
|
case 0:
|
|
1389
1379
|
this.i6_1 = 2;
|
|
1390
|
-
if (!(this.
|
|
1391
|
-
var message = 'maxParallel must be >= 1, got ' + this.
|
|
1380
|
+
if (!(this.j12_1 >= 1)) {
|
|
1381
|
+
var message = 'maxParallel must be >= 1, got ' + this.j12_1;
|
|
1392
1382
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1393
1383
|
}
|
|
1394
1384
|
|
|
1395
1385
|
this.h6_1 = 1;
|
|
1396
|
-
suspendResult = coroutineScope(Flux$forEachParallel$slambda_0(this.
|
|
1386
|
+
suspendResult = coroutineScope(Flux$forEachParallel$slambda_0(this.j12_1, this.i12_1, this.k12_1, null), this);
|
|
1397
1387
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1398
1388
|
return suspendResult;
|
|
1399
1389
|
}
|
|
@@ -1429,8 +1419,8 @@
|
|
|
1429
1419
|
}
|
|
1430
1420
|
function $getCOROUTINE$(_this__u8e3s4, key, resultContinuation) {
|
|
1431
1421
|
CoroutineImpl.call(this, resultContinuation);
|
|
1432
|
-
this.
|
|
1433
|
-
this.
|
|
1422
|
+
this.t12_1 = _this__u8e3s4;
|
|
1423
|
+
this.u12_1 = key;
|
|
1434
1424
|
}
|
|
1435
1425
|
protoOf($getCOROUTINE$).p6 = function () {
|
|
1436
1426
|
var suspendResult = this.j6_1;
|
|
@@ -1440,10 +1430,10 @@
|
|
|
1440
1430
|
switch (tmp) {
|
|
1441
1431
|
case 0:
|
|
1442
1432
|
this.i6_1 = 12;
|
|
1443
|
-
this.
|
|
1444
|
-
this.
|
|
1433
|
+
this.g13_1 = this.t12_1.k13_1;
|
|
1434
|
+
this.f13_1 = null;
|
|
1445
1435
|
this.h6_1 = 1;
|
|
1446
|
-
suspendResult = this.
|
|
1436
|
+
suspendResult = this.g13_1.tr(this.f13_1, this);
|
|
1447
1437
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1448
1438
|
return suspendResult;
|
|
1449
1439
|
}
|
|
@@ -1456,33 +1446,33 @@
|
|
|
1456
1446
|
l$ret$1: do {
|
|
1457
1447
|
var tmp_0;
|
|
1458
1448
|
try {
|
|
1459
|
-
var tmp0_safe_receiver = this.
|
|
1449
|
+
var tmp0_safe_receiver = this.t12_1.l13_1.d3(this.u12_1);
|
|
1460
1450
|
if (tmp0_safe_receiver == null)
|
|
1461
1451
|
null;
|
|
1462
1452
|
else {
|
|
1463
|
-
var tmp0 = this.
|
|
1464
|
-
var key = this.
|
|
1453
|
+
var tmp0 = this.t12_1.l13_1;
|
|
1454
|
+
var key = this.u12_1;
|
|
1465
1455
|
tmp0.c3(key, tmp0_safe_receiver);
|
|
1466
1456
|
tmp$ret$0 = tmp0_safe_receiver;
|
|
1467
1457
|
break l$ret$1;
|
|
1468
1458
|
}
|
|
1469
|
-
tmp$ret$2 = this.
|
|
1459
|
+
tmp$ret$2 = this.t12_1.m13_1.k1(this.u12_1);
|
|
1470
1460
|
break l$ret$3;
|
|
1471
1461
|
} catch ($p) {
|
|
1472
1462
|
var tmp_1;
|
|
1473
1463
|
var t = $p;
|
|
1474
|
-
this.
|
|
1464
|
+
this.g13_1.fr(this.f13_1);
|
|
1475
1465
|
throw t;
|
|
1476
1466
|
}
|
|
1477
1467
|
}
|
|
1478
1468
|
while (false);
|
|
1479
1469
|
var tmp_2 = tmp$ret$0;
|
|
1480
|
-
this.
|
|
1470
|
+
this.g13_1.fr(this.f13_1);
|
|
1481
1471
|
return tmp_2;
|
|
1482
1472
|
}
|
|
1483
1473
|
while (false);
|
|
1484
1474
|
var tmp_3 = tmp$ret$2;
|
|
1485
|
-
this.
|
|
1475
|
+
this.g13_1.fr(this.f13_1);
|
|
1486
1476
|
var existing = tmp_3;
|
|
1487
1477
|
if (!(existing == null)) {
|
|
1488
1478
|
this.h6_1 = 11;
|
|
@@ -1497,11 +1487,11 @@
|
|
|
1497
1487
|
}
|
|
1498
1488
|
|
|
1499
1489
|
case 2:
|
|
1500
|
-
this.
|
|
1501
|
-
this.
|
|
1502
|
-
this.
|
|
1490
|
+
this.w12_1 = CompletableDeferred();
|
|
1491
|
+
this.e13_1 = this.t12_1.k13_1;
|
|
1492
|
+
this.d13_1 = null;
|
|
1503
1493
|
this.h6_1 = 3;
|
|
1504
|
-
suspendResult = this.
|
|
1494
|
+
suspendResult = this.e13_1.tr(this.d13_1, this);
|
|
1505
1495
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1506
1496
|
return suspendResult;
|
|
1507
1497
|
}
|
|
@@ -1514,24 +1504,24 @@
|
|
|
1514
1504
|
l$ret$5: do {
|
|
1515
1505
|
var tmp_4;
|
|
1516
1506
|
try {
|
|
1517
|
-
var tmp0_safe_receiver_0 = this.
|
|
1507
|
+
var tmp0_safe_receiver_0 = this.t12_1.l13_1.d3(this.u12_1);
|
|
1518
1508
|
if (tmp0_safe_receiver_0 == null)
|
|
1519
1509
|
null;
|
|
1520
1510
|
else {
|
|
1521
|
-
var tmp0_0 = this.
|
|
1522
|
-
var key_0 = this.
|
|
1511
|
+
var tmp0_0 = this.t12_1.l13_1;
|
|
1512
|
+
var key_0 = this.u12_1;
|
|
1523
1513
|
tmp0_0.c3(key_0, tmp0_safe_receiver_0);
|
|
1524
1514
|
tmp$ret$4 = tmp0_safe_receiver_0;
|
|
1525
1515
|
break l$ret$5;
|
|
1526
1516
|
}
|
|
1527
|
-
var raced = this.
|
|
1517
|
+
var raced = this.t12_1.m13_1.k1(this.u12_1);
|
|
1528
1518
|
var tmp_5;
|
|
1529
1519
|
if (!(raced == null)) {
|
|
1530
1520
|
tmp_5 = raced;
|
|
1531
1521
|
} else {
|
|
1532
|
-
var tmp0_1 = this.
|
|
1533
|
-
var tmp2 = this.
|
|
1534
|
-
var value = this.
|
|
1522
|
+
var tmp0_1 = this.t12_1.m13_1;
|
|
1523
|
+
var tmp2 = this.u12_1;
|
|
1524
|
+
var value = this.w12_1;
|
|
1535
1525
|
tmp0_1.c3(tmp2, value);
|
|
1536
1526
|
tmp_5 = null;
|
|
1537
1527
|
}
|
|
@@ -1540,18 +1530,18 @@
|
|
|
1540
1530
|
} catch ($p_0) {
|
|
1541
1531
|
var tmp_6;
|
|
1542
1532
|
var t_0 = $p_0;
|
|
1543
|
-
this.
|
|
1533
|
+
this.e13_1.fr(this.d13_1);
|
|
1544
1534
|
throw t_0;
|
|
1545
1535
|
}
|
|
1546
1536
|
}
|
|
1547
1537
|
while (false);
|
|
1548
1538
|
var tmp_7 = tmp$ret$4;
|
|
1549
|
-
this.
|
|
1539
|
+
this.e13_1.fr(this.d13_1);
|
|
1550
1540
|
return tmp_7;
|
|
1551
1541
|
}
|
|
1552
1542
|
while (false);
|
|
1553
1543
|
var tmp_8 = tmp$ret$6;
|
|
1554
|
-
this.
|
|
1544
|
+
this.e13_1.fr(this.d13_1);
|
|
1555
1545
|
var awaitInstead = tmp_8;
|
|
1556
1546
|
if (!(awaitInstead == null)) {
|
|
1557
1547
|
this.h6_1 = 10;
|
|
@@ -1568,14 +1558,14 @@
|
|
|
1568
1558
|
case 4:
|
|
1569
1559
|
this.i6_1 = 6;
|
|
1570
1560
|
this.h6_1 = 5;
|
|
1571
|
-
suspendResult = this.
|
|
1561
|
+
suspendResult = this.t12_1.i13_1(this.u12_1, this);
|
|
1572
1562
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1573
1563
|
return suspendResult;
|
|
1574
1564
|
}
|
|
1575
1565
|
|
|
1576
1566
|
continue $sm;
|
|
1577
1567
|
case 5:
|
|
1578
|
-
this.
|
|
1568
|
+
this.z12_1 = suspendResult;
|
|
1579
1569
|
this.i6_1 = 12;
|
|
1580
1570
|
this.h6_1 = 8;
|
|
1581
1571
|
continue $sm;
|
|
@@ -1583,11 +1573,11 @@
|
|
|
1583
1573
|
this.i6_1 = 12;
|
|
1584
1574
|
var tmp_9 = this.k6_1;
|
|
1585
1575
|
if (tmp_9 instanceof Error) {
|
|
1586
|
-
this.
|
|
1587
|
-
this.
|
|
1588
|
-
this.
|
|
1576
|
+
this.a13_1 = this.k6_1;
|
|
1577
|
+
this.c13_1 = this.t12_1.k13_1;
|
|
1578
|
+
this.b13_1 = null;
|
|
1589
1579
|
this.h6_1 = 7;
|
|
1590
|
-
suspendResult = this.
|
|
1580
|
+
suspendResult = this.c13_1.tr(this.b13_1, this);
|
|
1591
1581
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1592
1582
|
return suspendResult;
|
|
1593
1583
|
}
|
|
@@ -1600,27 +1590,27 @@
|
|
|
1600
1590
|
l$ret$9: do {
|
|
1601
1591
|
var tmp_10;
|
|
1602
1592
|
try {
|
|
1603
|
-
this.
|
|
1593
|
+
this.t12_1.m13_1.d3(this.u12_1);
|
|
1604
1594
|
break l$ret$9;
|
|
1605
1595
|
} catch ($p_1) {
|
|
1606
1596
|
var tmp_11;
|
|
1607
1597
|
var t_1 = $p_1;
|
|
1608
|
-
this.
|
|
1598
|
+
this.c13_1.fr(this.b13_1);
|
|
1609
1599
|
throw t_1;
|
|
1610
1600
|
}
|
|
1611
1601
|
}
|
|
1612
1602
|
while (false);
|
|
1613
|
-
this.
|
|
1614
|
-
this.
|
|
1603
|
+
this.c13_1.fr(this.b13_1);
|
|
1604
|
+
this.w12_1.lm(this.a13_1);
|
|
1615
1605
|
var tmp_12 = this;
|
|
1616
|
-
throw this.
|
|
1606
|
+
throw this.a13_1;
|
|
1617
1607
|
case 8:
|
|
1618
1608
|
this.i6_1 = 12;
|
|
1619
|
-
this.
|
|
1620
|
-
this.
|
|
1621
|
-
this.
|
|
1609
|
+
this.v12_1 = this.z12_1;
|
|
1610
|
+
this.y12_1 = this.t12_1.k13_1;
|
|
1611
|
+
this.x12_1 = null;
|
|
1622
1612
|
this.h6_1 = 9;
|
|
1623
|
-
suspendResult = this.
|
|
1613
|
+
suspendResult = this.y12_1.tr(this.x12_1, this);
|
|
1624
1614
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1625
1615
|
return suspendResult;
|
|
1626
1616
|
}
|
|
@@ -1630,42 +1620,42 @@
|
|
|
1630
1620
|
l$ret$11: do {
|
|
1631
1621
|
var tmp_13;
|
|
1632
1622
|
try {
|
|
1633
|
-
this.
|
|
1623
|
+
this.t12_1.m13_1.d3(this.u12_1);
|
|
1634
1624
|
var tmp_14;
|
|
1635
|
-
if (this.
|
|
1636
|
-
var tmp0_2 = this.
|
|
1637
|
-
var key_1 = this.
|
|
1625
|
+
if (this.t12_1.l13_1.l() >= this.t12_1.h13_1) {
|
|
1626
|
+
var tmp0_2 = this.t12_1.l13_1;
|
|
1627
|
+
var key_1 = this.u12_1;
|
|
1638
1628
|
tmp_14 = !(isInterface(tmp0_2, KtMap) ? tmp0_2 : THROW_CCE()).j1(key_1);
|
|
1639
1629
|
} else {
|
|
1640
1630
|
tmp_14 = false;
|
|
1641
1631
|
}
|
|
1642
1632
|
if (tmp_14) {
|
|
1643
|
-
var iter = this.
|
|
1633
|
+
var iter = this.t12_1.l13_1.m1().i();
|
|
1644
1634
|
var oldest = iter.k();
|
|
1645
1635
|
var oldestValue = oldest.i1();
|
|
1646
1636
|
iter.e2();
|
|
1647
|
-
var tmp0_safe_receiver_1 = this.
|
|
1637
|
+
var tmp0_safe_receiver_1 = this.t12_1.j13_1;
|
|
1648
1638
|
if (tmp0_safe_receiver_1 == null)
|
|
1649
1639
|
null;
|
|
1650
1640
|
else
|
|
1651
1641
|
tmp0_safe_receiver_1(oldestValue);
|
|
1652
1642
|
}
|
|
1653
|
-
var tmp0_3 = this.
|
|
1654
|
-
var tmp2_0 = this.
|
|
1655
|
-
var value_0 = this.
|
|
1643
|
+
var tmp0_3 = this.t12_1.l13_1;
|
|
1644
|
+
var tmp2_0 = this.u12_1;
|
|
1645
|
+
var value_0 = this.v12_1;
|
|
1656
1646
|
tmp0_3.c3(tmp2_0, value_0);
|
|
1657
1647
|
break l$ret$11;
|
|
1658
1648
|
} catch ($p_2) {
|
|
1659
1649
|
var tmp_15;
|
|
1660
1650
|
var t_2 = $p_2;
|
|
1661
|
-
this.
|
|
1651
|
+
this.y12_1.fr(this.x12_1);
|
|
1662
1652
|
throw t_2;
|
|
1663
1653
|
}
|
|
1664
1654
|
}
|
|
1665
1655
|
while (false);
|
|
1666
|
-
this.
|
|
1667
|
-
this.
|
|
1668
|
-
return this.
|
|
1656
|
+
this.y12_1.fr(this.x12_1);
|
|
1657
|
+
this.w12_1.km(this.v12_1);
|
|
1658
|
+
return this.v12_1;
|
|
1669
1659
|
case 10:
|
|
1670
1660
|
return suspendResult;
|
|
1671
1661
|
case 11:
|
|
@@ -1686,33 +1676,33 @@
|
|
|
1686
1676
|
};
|
|
1687
1677
|
function LruCache(maxSize, loader, onEvict) {
|
|
1688
1678
|
onEvict = onEvict === VOID ? null : onEvict;
|
|
1689
|
-
this.
|
|
1690
|
-
this.
|
|
1691
|
-
this.
|
|
1679
|
+
this.h13_1 = maxSize;
|
|
1680
|
+
this.i13_1 = loader;
|
|
1681
|
+
this.j13_1 = onEvict;
|
|
1692
1682
|
// Inline function 'kotlin.require' call
|
|
1693
|
-
if (!(this.
|
|
1683
|
+
if (!(this.h13_1 > 0)) {
|
|
1694
1684
|
var message = 'Cache size must be greater than 0';
|
|
1695
1685
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1696
1686
|
}
|
|
1697
|
-
this.
|
|
1698
|
-
this.
|
|
1687
|
+
this.k13_1 = Mutex();
|
|
1688
|
+
this.l13_1 = LinkedHashMap_init_$Create$();
|
|
1699
1689
|
var tmp = this;
|
|
1700
1690
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1701
|
-
tmp.
|
|
1691
|
+
tmp.m13_1 = LinkedHashMap_init_$Create$();
|
|
1702
1692
|
}
|
|
1703
|
-
protoOf(LruCache).
|
|
1693
|
+
protoOf(LruCache).n13 = function (key, $completion) {
|
|
1704
1694
|
var tmp = new $getCOROUTINE$(this, key, $completion);
|
|
1705
1695
|
tmp.j6_1 = Unit_instance;
|
|
1706
1696
|
tmp.k6_1 = null;
|
|
1707
1697
|
return tmp.p6();
|
|
1708
1698
|
};
|
|
1709
1699
|
function RawTile(width, height, rgba) {
|
|
1710
|
-
this.
|
|
1711
|
-
this.
|
|
1712
|
-
this.
|
|
1700
|
+
this.o13_1 = width;
|
|
1701
|
+
this.p13_1 = height;
|
|
1702
|
+
this.q13_1 = rgba;
|
|
1713
1703
|
// Inline function 'kotlin.require' call
|
|
1714
|
-
if (!(this.
|
|
1715
|
-
var message = 'rgba size ' + this.
|
|
1704
|
+
if (!(this.q13_1.length === imul(imul(this.o13_1, this.p13_1), 4))) {
|
|
1705
|
+
var message = 'rgba size ' + this.q13_1.length + ' does not match width*height*4 (' + imul(imul(this.o13_1, this.p13_1), 4) + ')';
|
|
1716
1706
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1717
1707
|
}
|
|
1718
1708
|
}
|
|
@@ -1721,16 +1711,16 @@
|
|
|
1721
1711
|
return true;
|
|
1722
1712
|
if (!(other instanceof RawTile))
|
|
1723
1713
|
return false;
|
|
1724
|
-
return this.
|
|
1714
|
+
return this.o13_1 === other.o13_1 && this.p13_1 === other.p13_1 && contentEquals(this.q13_1, other.q13_1);
|
|
1725
1715
|
};
|
|
1726
1716
|
protoOf(RawTile).hashCode = function () {
|
|
1727
|
-
var result = this.
|
|
1728
|
-
result = imul(31, result) + this.
|
|
1729
|
-
result = imul(31, result) + contentHashCode(this.
|
|
1717
|
+
var result = this.o13_1;
|
|
1718
|
+
result = imul(31, result) + this.p13_1 | 0;
|
|
1719
|
+
result = imul(31, result) + contentHashCode(this.q13_1) | 0;
|
|
1730
1720
|
return result;
|
|
1731
1721
|
};
|
|
1732
1722
|
function Tile_init_$Init$(raw, $this) {
|
|
1733
|
-
Tile.call($this, raw.
|
|
1723
|
+
Tile.call($this, raw.o13_1, raw.p13_1, raw.q13_1);
|
|
1734
1724
|
return $this;
|
|
1735
1725
|
}
|
|
1736
1726
|
function Tile_init_$Create$(raw) {
|
|
@@ -1738,7 +1728,7 @@
|
|
|
1738
1728
|
}
|
|
1739
1729
|
function Companion() {
|
|
1740
1730
|
}
|
|
1741
|
-
protoOf(Companion).
|
|
1731
|
+
protoOf(Companion).r13 = function (r, g, b) {
|
|
1742
1732
|
var raw = r * 256.0 + g + b / 256.0 - 32768.0;
|
|
1743
1733
|
return round(raw * 100.0) / 100.0;
|
|
1744
1734
|
};
|
|
@@ -1747,72 +1737,72 @@
|
|
|
1747
1737
|
return Companion_instance;
|
|
1748
1738
|
}
|
|
1749
1739
|
function Tile(width, height, rgba) {
|
|
1750
|
-
this.
|
|
1751
|
-
this.
|
|
1752
|
-
this.
|
|
1740
|
+
this.nz_1 = width;
|
|
1741
|
+
this.oz_1 = height;
|
|
1742
|
+
this.pz_1 = rgba;
|
|
1753
1743
|
var tmp = this;
|
|
1754
1744
|
var tmp_0 = 0;
|
|
1755
|
-
var tmp_1 = imul(this.
|
|
1745
|
+
var tmp_1 = imul(this.nz_1, this.oz_1);
|
|
1756
1746
|
var tmp_2 = new Float64Array(tmp_1);
|
|
1757
1747
|
while (tmp_0 < tmp_1) {
|
|
1758
1748
|
tmp_2[tmp_0] = NaN;
|
|
1759
1749
|
tmp_0 = tmp_0 + 1 | 0;
|
|
1760
1750
|
}
|
|
1761
|
-
tmp.
|
|
1762
|
-
this.
|
|
1751
|
+
tmp.qz_1 = tmp_2;
|
|
1752
|
+
this.rz_1 = 0;
|
|
1763
1753
|
}
|
|
1764
|
-
protoOf(Tile).
|
|
1765
|
-
var containsUpper = this.
|
|
1766
|
-
var containsArg = pixel.
|
|
1754
|
+
protoOf(Tile).sz = function (pixel) {
|
|
1755
|
+
var containsUpper = this.nz_1;
|
|
1756
|
+
var containsArg = pixel.hz_1;
|
|
1767
1757
|
// Inline function 'kotlin.require' call
|
|
1768
1758
|
if (!(0 <= containsArg ? containsArg < containsUpper : false)) {
|
|
1769
|
-
var message = 'Invalid x position: ' + pixel.
|
|
1759
|
+
var message = 'Invalid x position: ' + pixel.hz_1 + '. Must be between 0 and ' + (this.nz_1 - 1 | 0);
|
|
1770
1760
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1771
1761
|
}
|
|
1772
|
-
var containsUpper_0 = this.
|
|
1773
|
-
var containsArg_0 = pixel.
|
|
1762
|
+
var containsUpper_0 = this.oz_1;
|
|
1763
|
+
var containsArg_0 = pixel.iz_1;
|
|
1774
1764
|
// Inline function 'kotlin.require' call
|
|
1775
1765
|
if (!(0 <= containsArg_0 ? containsArg_0 < containsUpper_0 : false)) {
|
|
1776
|
-
var message_0 = 'Invalid y position: ' + pixel.
|
|
1766
|
+
var message_0 = 'Invalid y position: ' + pixel.iz_1 + '. Must be between 0 and ' + (this.oz_1 - 1 | 0);
|
|
1777
1767
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1778
1768
|
}
|
|
1779
|
-
var idx = imul(pixel.
|
|
1780
|
-
var cached = this.
|
|
1769
|
+
var idx = imul(pixel.iz_1, this.nz_1) + pixel.hz_1 | 0;
|
|
1770
|
+
var cached = this.qz_1[idx];
|
|
1781
1771
|
if (!isNaN_0(cached))
|
|
1782
1772
|
return cached;
|
|
1783
1773
|
var byteOffset = imul(idx, 4);
|
|
1784
|
-
var r = this.
|
|
1785
|
-
var g = this.
|
|
1786
|
-
var b = this.
|
|
1787
|
-
var elevation = Companion_instance.
|
|
1788
|
-
this.
|
|
1789
|
-
this.
|
|
1774
|
+
var r = this.pz_1[byteOffset] & 255;
|
|
1775
|
+
var g = this.pz_1[byteOffset + 1 | 0] & 255;
|
|
1776
|
+
var b = this.pz_1[byteOffset + 2 | 0] & 255;
|
|
1777
|
+
var elevation = Companion_instance.r13(r, g, b);
|
|
1778
|
+
this.qz_1[idx] = elevation;
|
|
1779
|
+
this.rz_1 = this.rz_1 + 1 | 0;
|
|
1790
1780
|
return elevation;
|
|
1791
1781
|
};
|
|
1792
1782
|
function buildUrl($this, tc) {
|
|
1793
|
-
return replace(replace(replace($this.
|
|
1783
|
+
return replace(replace(replace($this.jz_1, '{z}', tc.tv_1.toString()), '{x}', tc.rv_1.toString()), '{y}', tc.sv_1.toString());
|
|
1794
1784
|
}
|
|
1795
1785
|
function fetchAndDecodeTile$ref_0() {
|
|
1796
1786
|
KFunctionImpl.call(this, 1, 2, 2);
|
|
1797
1787
|
}
|
|
1798
|
-
protoOf(fetchAndDecodeTile$ref_0).
|
|
1788
|
+
protoOf(fetchAndDecodeTile$ref_0).g10 = function (p0, $completion) {
|
|
1799
1789
|
return fetchAndDecodeTile(p0, $completion);
|
|
1800
1790
|
};
|
|
1801
1791
|
protoOf(fetchAndDecodeTile$ref_0).x6 = function (p1, $completion) {
|
|
1802
|
-
return this.
|
|
1792
|
+
return this.g10((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
|
|
1803
1793
|
};
|
|
1804
1794
|
function TileManager$cache$slambda(this$0, resultContinuation) {
|
|
1805
|
-
this.
|
|
1795
|
+
this.d14_1 = this$0;
|
|
1806
1796
|
CoroutineImpl.call(this, resultContinuation);
|
|
1807
1797
|
}
|
|
1808
|
-
protoOf(TileManager$cache$slambda).
|
|
1809
|
-
var tmp = this.
|
|
1798
|
+
protoOf(TileManager$cache$slambda).f14 = function (tc, $completion) {
|
|
1799
|
+
var tmp = this.g14(tc, $completion);
|
|
1810
1800
|
tmp.j6_1 = Unit_instance;
|
|
1811
1801
|
tmp.k6_1 = null;
|
|
1812
1802
|
return tmp.p6();
|
|
1813
1803
|
};
|
|
1814
1804
|
protoOf(TileManager$cache$slambda).x6 = function (p1, $completion) {
|
|
1815
|
-
return this.
|
|
1805
|
+
return this.f14(p1 instanceof TileCoordinates ? p1 : THROW_CCE(), $completion);
|
|
1816
1806
|
};
|
|
1817
1807
|
protoOf(TileManager$cache$slambda).p6 = function () {
|
|
1818
1808
|
var suspendResult = this.j6_1;
|
|
@@ -1823,7 +1813,7 @@
|
|
|
1823
1813
|
case 0:
|
|
1824
1814
|
this.i6_1 = 2;
|
|
1825
1815
|
this.h6_1 = 1;
|
|
1826
|
-
suspendResult = this.
|
|
1816
|
+
suspendResult = this.d14_1.kz_1(buildUrl(this.d14_1, this.e14_1), this);
|
|
1827
1817
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1828
1818
|
return suspendResult;
|
|
1829
1819
|
}
|
|
@@ -1846,15 +1836,15 @@
|
|
|
1846
1836
|
}
|
|
1847
1837
|
while (true);
|
|
1848
1838
|
};
|
|
1849
|
-
protoOf(TileManager$cache$slambda).
|
|
1850
|
-
var i = new TileManager$cache$slambda(this.
|
|
1851
|
-
i.
|
|
1839
|
+
protoOf(TileManager$cache$slambda).g14 = function (tc, completion) {
|
|
1840
|
+
var i = new TileManager$cache$slambda(this.d14_1, completion);
|
|
1841
|
+
i.e14_1 = tc;
|
|
1852
1842
|
return i;
|
|
1853
1843
|
};
|
|
1854
1844
|
function TileManager$cache$slambda_0(this$0, resultContinuation) {
|
|
1855
1845
|
var i = new TileManager$cache$slambda(this$0, resultContinuation);
|
|
1856
1846
|
return constructCallableReference(function (tc, $completion) {
|
|
1857
|
-
return i.
|
|
1847
|
+
return i.f14(tc, $completion);
|
|
1858
1848
|
}, 1);
|
|
1859
1849
|
}
|
|
1860
1850
|
function TileManager(urlTemplate, cacheSize, fetcher) {
|
|
@@ -1865,13 +1855,13 @@
|
|
|
1865
1855
|
tmp = fetcher;
|
|
1866
1856
|
}
|
|
1867
1857
|
fetcher = tmp;
|
|
1868
|
-
this.
|
|
1869
|
-
this.
|
|
1858
|
+
this.jz_1 = urlTemplate;
|
|
1859
|
+
this.kz_1 = fetcher;
|
|
1870
1860
|
var tmp_0 = this;
|
|
1871
|
-
tmp_0.
|
|
1861
|
+
tmp_0.lz_1 = new LruCache(cacheSize, TileManager$cache$slambda_0(this, null));
|
|
1872
1862
|
}
|
|
1873
|
-
protoOf(TileManager).
|
|
1874
|
-
return this.
|
|
1863
|
+
protoOf(TileManager).mz = function (tileCoords, $completion) {
|
|
1864
|
+
return this.lz_1.n13(tileCoords, $completion);
|
|
1875
1865
|
};
|
|
1876
1866
|
function TileCoordinates(x, y, z) {
|
|
1877
1867
|
this.rv_1 = x;
|
|
@@ -1901,17 +1891,17 @@
|
|
|
1901
1891
|
return true;
|
|
1902
1892
|
};
|
|
1903
1893
|
function Pixel(tile, x, y) {
|
|
1904
|
-
this.
|
|
1905
|
-
this.
|
|
1906
|
-
this.
|
|
1894
|
+
this.gz_1 = tile;
|
|
1895
|
+
this.hz_1 = x;
|
|
1896
|
+
this.iz_1 = y;
|
|
1907
1897
|
}
|
|
1908
1898
|
protoOf(Pixel).toString = function () {
|
|
1909
|
-
return 'Pixel(tile=' + this.
|
|
1899
|
+
return 'Pixel(tile=' + this.gz_1.toString() + ', x=' + this.hz_1 + ', y=' + this.iz_1 + ')';
|
|
1910
1900
|
};
|
|
1911
1901
|
protoOf(Pixel).hashCode = function () {
|
|
1912
|
-
var result = this.
|
|
1913
|
-
result = imul(result, 31) + this.
|
|
1914
|
-
result = imul(result, 31) + this.
|
|
1902
|
+
var result = this.gz_1.hashCode();
|
|
1903
|
+
result = imul(result, 31) + this.hz_1 | 0;
|
|
1904
|
+
result = imul(result, 31) + this.iz_1 | 0;
|
|
1915
1905
|
return result;
|
|
1916
1906
|
};
|
|
1917
1907
|
protoOf(Pixel).equals = function (other) {
|
|
@@ -1919,26 +1909,26 @@
|
|
|
1919
1909
|
return true;
|
|
1920
1910
|
if (!(other instanceof Pixel))
|
|
1921
1911
|
return false;
|
|
1922
|
-
if (!this.
|
|
1912
|
+
if (!this.gz_1.equals(other.gz_1))
|
|
1923
1913
|
return false;
|
|
1924
|
-
if (!(this.
|
|
1914
|
+
if (!(this.hz_1 === other.hz_1))
|
|
1925
1915
|
return false;
|
|
1926
|
-
if (!(this.
|
|
1916
|
+
if (!(this.iz_1 === other.iz_1))
|
|
1927
1917
|
return false;
|
|
1928
1918
|
return true;
|
|
1929
1919
|
};
|
|
1930
1920
|
function PixelFloat(tile, x, y) {
|
|
1931
|
-
this.
|
|
1932
|
-
this.
|
|
1933
|
-
this.
|
|
1921
|
+
this.cz_1 = tile;
|
|
1922
|
+
this.dz_1 = x;
|
|
1923
|
+
this.ez_1 = y;
|
|
1934
1924
|
}
|
|
1935
1925
|
protoOf(PixelFloat).toString = function () {
|
|
1936
|
-
return 'PixelFloat(tile=' + this.
|
|
1926
|
+
return 'PixelFloat(tile=' + this.cz_1.toString() + ', x=' + this.dz_1 + ', y=' + this.ez_1 + ')';
|
|
1937
1927
|
};
|
|
1938
1928
|
protoOf(PixelFloat).hashCode = function () {
|
|
1939
|
-
var result = this.
|
|
1940
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1941
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1929
|
+
var result = this.cz_1.hashCode();
|
|
1930
|
+
result = imul(result, 31) + getNumberHashCode(this.dz_1) | 0;
|
|
1931
|
+
result = imul(result, 31) + getNumberHashCode(this.ez_1) | 0;
|
|
1942
1932
|
return result;
|
|
1943
1933
|
};
|
|
1944
1934
|
protoOf(PixelFloat).equals = function (other) {
|
|
@@ -1946,30 +1936,30 @@
|
|
|
1946
1936
|
return true;
|
|
1947
1937
|
if (!(other instanceof PixelFloat))
|
|
1948
1938
|
return false;
|
|
1949
|
-
if (!this.
|
|
1939
|
+
if (!this.cz_1.equals(other.cz_1))
|
|
1950
1940
|
return false;
|
|
1951
|
-
if (!equals(this.
|
|
1941
|
+
if (!equals(this.dz_1, other.dz_1))
|
|
1952
1942
|
return false;
|
|
1953
|
-
if (!equals(this.
|
|
1943
|
+
if (!equals(this.ez_1, other.ez_1))
|
|
1954
1944
|
return false;
|
|
1955
1945
|
return true;
|
|
1956
1946
|
};
|
|
1957
1947
|
function TileCoordinatesFloat(x, y, xFloat, yFloat, z) {
|
|
1958
|
-
this.
|
|
1959
|
-
this.
|
|
1960
|
-
this.
|
|
1961
|
-
this.
|
|
1962
|
-
this.
|
|
1948
|
+
this.yz_1 = x;
|
|
1949
|
+
this.zz_1 = y;
|
|
1950
|
+
this.a10_1 = xFloat;
|
|
1951
|
+
this.b10_1 = yFloat;
|
|
1952
|
+
this.c10_1 = z;
|
|
1963
1953
|
}
|
|
1964
1954
|
protoOf(TileCoordinatesFloat).toString = function () {
|
|
1965
|
-
return 'TileCoordinatesFloat(x=' + this.
|
|
1955
|
+
return 'TileCoordinatesFloat(x=' + this.yz_1 + ', y=' + this.zz_1 + ', xFloat=' + this.a10_1 + ', yFloat=' + this.b10_1 + ', z=' + this.c10_1 + ')';
|
|
1966
1956
|
};
|
|
1967
1957
|
protoOf(TileCoordinatesFloat).hashCode = function () {
|
|
1968
|
-
var result = this.
|
|
1969
|
-
result = imul(result, 31) + this.
|
|
1970
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1971
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1972
|
-
result = imul(result, 31) + this.
|
|
1958
|
+
var result = this.yz_1;
|
|
1959
|
+
result = imul(result, 31) + this.zz_1 | 0;
|
|
1960
|
+
result = imul(result, 31) + getNumberHashCode(this.a10_1) | 0;
|
|
1961
|
+
result = imul(result, 31) + getNumberHashCode(this.b10_1) | 0;
|
|
1962
|
+
result = imul(result, 31) + this.c10_1 | 0;
|
|
1973
1963
|
return result;
|
|
1974
1964
|
};
|
|
1975
1965
|
protoOf(TileCoordinatesFloat).equals = function (other) {
|
|
@@ -1977,21 +1967,21 @@
|
|
|
1977
1967
|
return true;
|
|
1978
1968
|
if (!(other instanceof TileCoordinatesFloat))
|
|
1979
1969
|
return false;
|
|
1980
|
-
if (!(this.
|
|
1970
|
+
if (!(this.yz_1 === other.yz_1))
|
|
1981
1971
|
return false;
|
|
1982
|
-
if (!(this.
|
|
1972
|
+
if (!(this.zz_1 === other.zz_1))
|
|
1983
1973
|
return false;
|
|
1984
|
-
if (!equals(this.
|
|
1974
|
+
if (!equals(this.a10_1, other.a10_1))
|
|
1985
1975
|
return false;
|
|
1986
|
-
if (!equals(this.
|
|
1976
|
+
if (!equals(this.b10_1, other.b10_1))
|
|
1987
1977
|
return false;
|
|
1988
|
-
if (!(this.
|
|
1978
|
+
if (!(this.c10_1 === other.c10_1))
|
|
1989
1979
|
return false;
|
|
1990
1980
|
return true;
|
|
1991
1981
|
};
|
|
1992
1982
|
function Companion_0() {
|
|
1993
1983
|
Companion_instance_0 = this;
|
|
1994
|
-
this.
|
|
1984
|
+
this.h14_1 = new Vector3D(0.0, 0.0, 0.0);
|
|
1995
1985
|
}
|
|
1996
1986
|
var Companion_instance_0;
|
|
1997
1987
|
function Companion_getInstance_0() {
|
|
@@ -2001,49 +1991,49 @@
|
|
|
2001
1991
|
}
|
|
2002
1992
|
function Vector3D(x, y, z) {
|
|
2003
1993
|
Companion_getInstance_0();
|
|
2004
|
-
this.
|
|
2005
|
-
this.
|
|
2006
|
-
this.
|
|
1994
|
+
this.bx_1 = x;
|
|
1995
|
+
this.cx_1 = y;
|
|
1996
|
+
this.dx_1 = z;
|
|
2007
1997
|
}
|
|
2008
|
-
protoOf(Vector3D).
|
|
2009
|
-
var tmp0 = this.
|
|
1998
|
+
protoOf(Vector3D).i14 = function (other) {
|
|
1999
|
+
var tmp0 = this.bx_1 - other.bx_1;
|
|
2010
2000
|
// Inline function 'kotlin.math.hypot' call
|
|
2011
|
-
var y = this.
|
|
2001
|
+
var y = this.cx_1 - other.cx_1;
|
|
2012
2002
|
var tmp0_0 = hypot(tmp0, y);
|
|
2013
2003
|
// Inline function 'kotlin.math.hypot' call
|
|
2014
|
-
var y_0 = this.
|
|
2004
|
+
var y_0 = this.dx_1 - other.dx_1;
|
|
2015
2005
|
return hypot(tmp0_0, y_0);
|
|
2016
2006
|
};
|
|
2017
|
-
protoOf(Vector3D).
|
|
2018
|
-
return new Vector3D(this.
|
|
2007
|
+
protoOf(Vector3D).j14 = function (other) {
|
|
2008
|
+
return new Vector3D(this.bx_1 - other.bx_1, this.cx_1 - other.cx_1, this.dx_1 - other.dx_1);
|
|
2019
2009
|
};
|
|
2020
|
-
protoOf(Vector3D).
|
|
2021
|
-
return new Vector3D(this.
|
|
2010
|
+
protoOf(Vector3D).k14 = function (other) {
|
|
2011
|
+
return new Vector3D(this.bx_1 + other.bx_1, this.cx_1 + other.cx_1, this.dx_1 + other.dx_1);
|
|
2022
2012
|
};
|
|
2023
|
-
protoOf(Vector3D).
|
|
2024
|
-
return new Vector3D(this.
|
|
2013
|
+
protoOf(Vector3D).l14 = function (scalar) {
|
|
2014
|
+
return new Vector3D(this.bx_1 * scalar, this.cx_1 * scalar, this.dx_1 * scalar);
|
|
2025
2015
|
};
|
|
2026
|
-
protoOf(Vector3D).
|
|
2027
|
-
return this.
|
|
2016
|
+
protoOf(Vector3D).m14 = function (other) {
|
|
2017
|
+
return this.bx_1 * other.bx_1 + this.cx_1 * other.cx_1 + this.dx_1 * other.dx_1;
|
|
2028
2018
|
};
|
|
2029
|
-
protoOf(Vector3D).
|
|
2030
|
-
var segmentVector = segmentEnd.
|
|
2031
|
-
var segmentLengthSq = segmentVector.
|
|
2019
|
+
protoOf(Vector3D).ex = function (segmentStart, segmentEnd) {
|
|
2020
|
+
var segmentVector = segmentEnd.j14(segmentStart);
|
|
2021
|
+
var segmentLengthSq = segmentVector.m14(segmentVector);
|
|
2032
2022
|
if (segmentLengthSq === 0.0)
|
|
2033
|
-
return this.
|
|
2034
|
-
var pointVector = this.
|
|
2035
|
-
var projection = pointVector.
|
|
2023
|
+
return this.i14(segmentStart);
|
|
2024
|
+
var pointVector = this.j14(segmentStart);
|
|
2025
|
+
var projection = pointVector.m14(segmentVector) / segmentLengthSq;
|
|
2036
2026
|
var clamped = coerceIn_0(projection, 0.0, 1.0);
|
|
2037
|
-
var closest = segmentStart.
|
|
2038
|
-
return this.
|
|
2027
|
+
var closest = segmentStart.k14(segmentVector.l14(clamped));
|
|
2028
|
+
return this.i14(closest);
|
|
2039
2029
|
};
|
|
2040
2030
|
protoOf(Vector3D).toString = function () {
|
|
2041
|
-
return 'Vector3D(x=' + this.
|
|
2031
|
+
return 'Vector3D(x=' + this.bx_1 + ', y=' + this.cx_1 + ', z=' + this.dx_1 + ')';
|
|
2042
2032
|
};
|
|
2043
2033
|
protoOf(Vector3D).hashCode = function () {
|
|
2044
|
-
var result = getNumberHashCode(this.
|
|
2045
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2046
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2034
|
+
var result = getNumberHashCode(this.bx_1);
|
|
2035
|
+
result = imul(result, 31) + getNumberHashCode(this.cx_1) | 0;
|
|
2036
|
+
result = imul(result, 31) + getNumberHashCode(this.dx_1) | 0;
|
|
2047
2037
|
return result;
|
|
2048
2038
|
};
|
|
2049
2039
|
protoOf(Vector3D).equals = function (other) {
|
|
@@ -2051,24 +2041,24 @@
|
|
|
2051
2041
|
return true;
|
|
2052
2042
|
if (!(other instanceof Vector3D))
|
|
2053
2043
|
return false;
|
|
2054
|
-
if (!equals(this.
|
|
2044
|
+
if (!equals(this.bx_1, other.bx_1))
|
|
2055
2045
|
return false;
|
|
2056
|
-
if (!equals(this.
|
|
2046
|
+
if (!equals(this.cx_1, other.cx_1))
|
|
2057
2047
|
return false;
|
|
2058
|
-
if (!equals(this.
|
|
2048
|
+
if (!equals(this.dx_1, other.dx_1))
|
|
2059
2049
|
return false;
|
|
2060
2050
|
return true;
|
|
2061
2051
|
};
|
|
2062
2052
|
function newElevationProvider(configDto) {
|
|
2063
2053
|
var defaults = new ElevationProviderConfig();
|
|
2064
2054
|
var tmp1_elvis_lhs = configDto == null ? null : configDto.zoomLevel;
|
|
2065
|
-
var tmp = tmp1_elvis_lhs == null ? defaults.
|
|
2055
|
+
var tmp = tmp1_elvis_lhs == null ? defaults.l10_1 : tmp1_elvis_lhs;
|
|
2066
2056
|
var tmp3_elvis_lhs = configDto == null ? null : configDto.cacheSize;
|
|
2067
|
-
var tmp_0 = tmp3_elvis_lhs == null ? defaults.
|
|
2057
|
+
var tmp_0 = tmp3_elvis_lhs == null ? defaults.m10_1 : tmp3_elvis_lhs;
|
|
2068
2058
|
var tmp5_elvis_lhs = configDto == null ? null : configDto.tileUrlTemplate;
|
|
2069
|
-
var tmp_1 = tmp5_elvis_lhs == null ? defaults.
|
|
2059
|
+
var tmp_1 = tmp5_elvis_lhs == null ? defaults.n10_1 : tmp5_elvis_lhs;
|
|
2070
2060
|
var tmp7_elvis_lhs = configDto == null ? null : configDto.tileSize;
|
|
2071
|
-
var cfg = new ElevationProviderConfig(tmp, tmp_0, tmp_1, tmp7_elvis_lhs == null ? defaults.
|
|
2061
|
+
var cfg = new ElevationProviderConfig(tmp, tmp_0, tmp_1, tmp7_elvis_lhs == null ? defaults.o10_1 : tmp7_elvis_lhs, defaults.p10_1);
|
|
2072
2062
|
return new ElevationProvider(cfg);
|
|
2073
2063
|
}
|
|
2074
2064
|
function getElevation(provider, latitude, longitude, interpolation) {
|
|
@@ -2094,20 +2084,20 @@
|
|
|
2094
2084
|
return o;
|
|
2095
2085
|
}
|
|
2096
2086
|
function getElevation$slambda($provider, $latitude, $longitude, $interpolation, resultContinuation) {
|
|
2097
|
-
this.
|
|
2098
|
-
this.
|
|
2099
|
-
this.
|
|
2100
|
-
this.
|
|
2087
|
+
this.v14_1 = $provider;
|
|
2088
|
+
this.w14_1 = $latitude;
|
|
2089
|
+
this.x14_1 = $longitude;
|
|
2090
|
+
this.y14_1 = $interpolation;
|
|
2101
2091
|
CoroutineImpl.call(this, resultContinuation);
|
|
2102
2092
|
}
|
|
2103
|
-
protoOf(getElevation$slambda).
|
|
2104
|
-
var tmp = this.
|
|
2093
|
+
protoOf(getElevation$slambda).a15 = function ($this$promise, $completion) {
|
|
2094
|
+
var tmp = this.l11($this$promise, $completion);
|
|
2105
2095
|
tmp.j6_1 = Unit_instance;
|
|
2106
2096
|
tmp.k6_1 = null;
|
|
2107
2097
|
return tmp.p6();
|
|
2108
2098
|
};
|
|
2109
2099
|
protoOf(getElevation$slambda).x6 = function (p1, $completion) {
|
|
2110
|
-
return this.
|
|
2100
|
+
return this.a15((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2111
2101
|
};
|
|
2112
2102
|
protoOf(getElevation$slambda).p6 = function () {
|
|
2113
2103
|
var suspendResult = this.j6_1;
|
|
@@ -2118,7 +2108,7 @@
|
|
|
2118
2108
|
case 0:
|
|
2119
2109
|
this.i6_1 = 2;
|
|
2120
2110
|
this.h6_1 = 1;
|
|
2121
|
-
suspendResult = this.
|
|
2111
|
+
suspendResult = this.v14_1.q10(this.w14_1, this.x14_1, this.y14_1, this);
|
|
2122
2112
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2123
2113
|
return suspendResult;
|
|
2124
2114
|
}
|
|
@@ -2140,31 +2130,31 @@
|
|
|
2140
2130
|
}
|
|
2141
2131
|
while (true);
|
|
2142
2132
|
};
|
|
2143
|
-
protoOf(getElevation$slambda).
|
|
2144
|
-
var i = new getElevation$slambda(this.
|
|
2145
|
-
i.
|
|
2133
|
+
protoOf(getElevation$slambda).l11 = function ($this$promise, completion) {
|
|
2134
|
+
var i = new getElevation$slambda(this.v14_1, this.w14_1, this.x14_1, this.y14_1, completion);
|
|
2135
|
+
i.z14_1 = $this$promise;
|
|
2146
2136
|
return i;
|
|
2147
2137
|
};
|
|
2148
2138
|
function getElevation$slambda_0($provider, $latitude, $longitude, $interpolation, resultContinuation) {
|
|
2149
2139
|
var i = new getElevation$slambda($provider, $latitude, $longitude, $interpolation, resultContinuation);
|
|
2150
2140
|
return constructCallableReference(function ($this$promise, $completion) {
|
|
2151
|
-
return i.
|
|
2141
|
+
return i.a15($this$promise, $completion);
|
|
2152
2142
|
}, 1);
|
|
2153
2143
|
}
|
|
2154
2144
|
function getElevationsAlong$slambda($path, $provider, $options, resultContinuation) {
|
|
2155
|
-
this.
|
|
2156
|
-
this.
|
|
2157
|
-
this.
|
|
2145
|
+
this.j15_1 = $path;
|
|
2146
|
+
this.k15_1 = $provider;
|
|
2147
|
+
this.l15_1 = $options;
|
|
2158
2148
|
CoroutineImpl.call(this, resultContinuation);
|
|
2159
2149
|
}
|
|
2160
|
-
protoOf(getElevationsAlong$slambda).
|
|
2161
|
-
var tmp = this.
|
|
2150
|
+
protoOf(getElevationsAlong$slambda).n15 = function ($this$promise, $completion) {
|
|
2151
|
+
var tmp = this.l11($this$promise, $completion);
|
|
2162
2152
|
tmp.j6_1 = Unit_instance;
|
|
2163
2153
|
tmp.k6_1 = null;
|
|
2164
2154
|
return tmp.p6();
|
|
2165
2155
|
};
|
|
2166
2156
|
protoOf(getElevationsAlong$slambda).x6 = function (p1, $completion) {
|
|
2167
|
-
return this.
|
|
2157
|
+
return this.n15((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2168
2158
|
};
|
|
2169
2159
|
protoOf(getElevationsAlong$slambda).p6 = function () {
|
|
2170
2160
|
var suspendResult = this.j6_1;
|
|
@@ -2174,7 +2164,7 @@
|
|
|
2174
2164
|
switch (tmp) {
|
|
2175
2165
|
case 0:
|
|
2176
2166
|
this.i6_1 = 2;
|
|
2177
|
-
var this_0 = this.
|
|
2167
|
+
var this_0 = this.j15_1;
|
|
2178
2168
|
var destination = ArrayList_init_$Create$_0(this_0.length);
|
|
2179
2169
|
var inductionVariable = 0;
|
|
2180
2170
|
var last = this_0.length;
|
|
@@ -2186,21 +2176,21 @@
|
|
|
2186
2176
|
|
|
2187
2177
|
var coords = destination;
|
|
2188
2178
|
this.h6_1 = 1;
|
|
2189
|
-
var tmp0_safe_receiver = this.
|
|
2179
|
+
var tmp0_safe_receiver = this.l15_1;
|
|
2190
2180
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.step;
|
|
2191
2181
|
var tmp_0 = tmp1_elvis_lhs == null ? 10.0 : tmp1_elvis_lhs;
|
|
2192
|
-
var tmp2_safe_receiver = this.
|
|
2182
|
+
var tmp2_safe_receiver = this.l15_1;
|
|
2193
2183
|
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.minDistance;
|
|
2194
2184
|
var tmp_1 = tmp3_elvis_lhs == null ? 1.0 : tmp3_elvis_lhs;
|
|
2195
|
-
var tmp4_safe_receiver = this.
|
|
2185
|
+
var tmp4_safe_receiver = this.l15_1;
|
|
2196
2186
|
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.interpolation;
|
|
2197
2187
|
var tmp_2 = tmp5_elvis_lhs == null ? true : tmp5_elvis_lhs;
|
|
2198
|
-
var tmp6_safe_receiver = this.
|
|
2188
|
+
var tmp6_safe_receiver = this.l15_1;
|
|
2199
2189
|
var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.smoothingOptions;
|
|
2200
2190
|
var tmp_3 = tmp7_safe_receiver == null ? null : toKotlin(tmp7_safe_receiver);
|
|
2201
|
-
var tmp8_safe_receiver = this.
|
|
2191
|
+
var tmp8_safe_receiver = this.l15_1;
|
|
2202
2192
|
var tmp9_safe_receiver = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.filterOptions;
|
|
2203
|
-
suspendResult = this.
|
|
2193
|
+
suspendResult = this.k15_1.t10(coords, tmp_0, tmp_1, tmp_2, tmp_3, tmp9_safe_receiver == null ? null : toKotlin_0(tmp9_safe_receiver), this);
|
|
2204
2194
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2205
2195
|
return suspendResult;
|
|
2206
2196
|
}
|
|
@@ -2214,7 +2204,7 @@
|
|
|
2214
2204
|
while (tmp_4 < tmp_5) {
|
|
2215
2205
|
var tmp_7 = tmp_4;
|
|
2216
2206
|
var c = results.m(tmp_7);
|
|
2217
|
-
tmp_6[tmp_7] = coordsEle(c.av(), c.bv(), c.
|
|
2207
|
+
tmp_6[tmp_7] = coordsEle(c.av(), c.bv(), c.ww());
|
|
2218
2208
|
tmp_4 = tmp_4 + 1 | 0;
|
|
2219
2209
|
}
|
|
2220
2210
|
|
|
@@ -2233,15 +2223,15 @@
|
|
|
2233
2223
|
}
|
|
2234
2224
|
while (true);
|
|
2235
2225
|
};
|
|
2236
|
-
protoOf(getElevationsAlong$slambda).
|
|
2237
|
-
var i = new getElevationsAlong$slambda(this.
|
|
2238
|
-
i.
|
|
2226
|
+
protoOf(getElevationsAlong$slambda).l11 = function ($this$promise, completion) {
|
|
2227
|
+
var i = new getElevationsAlong$slambda(this.j15_1, this.k15_1, this.l15_1, completion);
|
|
2228
|
+
i.m15_1 = $this$promise;
|
|
2239
2229
|
return i;
|
|
2240
2230
|
};
|
|
2241
2231
|
function getElevationsAlong$slambda_0($path, $provider, $options, resultContinuation) {
|
|
2242
2232
|
var i = new getElevationsAlong$slambda($path, $provider, $options, resultContinuation);
|
|
2243
2233
|
return constructCallableReference(function ($this$promise, $completion) {
|
|
2244
|
-
return i.
|
|
2234
|
+
return i.n15($this$promise, $completion);
|
|
2245
2235
|
}, 1);
|
|
2246
2236
|
}
|
|
2247
2237
|
function get_isNode() {
|
|
@@ -2286,6 +2276,23 @@
|
|
|
2286
2276
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
2287
2277
|
return res.arrayBuffer();
|
|
2288
2278
|
}
|
|
2279
|
+
function rawTileFromJsquash(image) {
|
|
2280
|
+
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
2281
|
+
var tmp = image.width;
|
|
2282
|
+
var width = numberToInt(isNumber(tmp) ? tmp : THROW_CCE());
|
|
2283
|
+
var tmp_0 = image.height;
|
|
2284
|
+
var height = numberToInt(isNumber(tmp_0) ? tmp_0 : THROW_CCE());
|
|
2285
|
+
var src = image.data;
|
|
2286
|
+
var tmp_1 = src.buffer;
|
|
2287
|
+
var tmp_2 = src.byteOffset;
|
|
2288
|
+
var tmp_3 = numberToInt(isNumber(tmp_2) ? tmp_2 : THROW_CCE());
|
|
2289
|
+
var tmp_4 = src.byteLength;
|
|
2290
|
+
var int8 = new Int8Array(tmp_1, tmp_3, numberToInt(isNumber(tmp_4) ? tmp_4 : THROW_CCE()));
|
|
2291
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2292
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2293
|
+
var rgba = int8;
|
|
2294
|
+
return new RawTile(width, height, rgba);
|
|
2295
|
+
}
|
|
2289
2296
|
function decodeWebpNode(buffer, $completion) {
|
|
2290
2297
|
var tmp = new $decodeWebpNodeCOROUTINE$(buffer, $completion);
|
|
2291
2298
|
tmp.j6_1 = Unit_instance;
|
|
@@ -2297,6 +2304,12 @@
|
|
|
2297
2304
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
2298
2305
|
return fetch(url);
|
|
2299
2306
|
}
|
|
2307
|
+
function decodeBlob(blob, sourceUrl, $completion) {
|
|
2308
|
+
var tmp = new $decodeBlobCOROUTINE$(blob, sourceUrl, $completion);
|
|
2309
|
+
tmp.j6_1 = Unit_instance;
|
|
2310
|
+
tmp.k6_1 = null;
|
|
2311
|
+
return tmp.p6();
|
|
2312
|
+
}
|
|
2300
2313
|
function nodeWebpDecoderPromise$delegate$lambda() {
|
|
2301
2314
|
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
2302
2315
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2322,7 +2335,7 @@
|
|
|
2322
2335
|
}
|
|
2323
2336
|
function $fetchAndDecodeTileCOROUTINE$(url, resultContinuation) {
|
|
2324
2337
|
CoroutineImpl.call(this, resultContinuation);
|
|
2325
|
-
this.
|
|
2338
|
+
this.w15_1 = url;
|
|
2326
2339
|
}
|
|
2327
2340
|
protoOf($fetchAndDecodeTileCOROUTINE$).p6 = function () {
|
|
2328
2341
|
var suspendResult = this.j6_1;
|
|
@@ -2334,14 +2347,14 @@
|
|
|
2334
2347
|
this.i6_1 = 4;
|
|
2335
2348
|
if (get_isNode()) {
|
|
2336
2349
|
this.h6_1 = 2;
|
|
2337
|
-
suspendResult = decodeNode(this.
|
|
2350
|
+
suspendResult = decodeNode(this.w15_1, this);
|
|
2338
2351
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2339
2352
|
return suspendResult;
|
|
2340
2353
|
}
|
|
2341
2354
|
continue $sm;
|
|
2342
2355
|
} else {
|
|
2343
2356
|
this.h6_1 = 1;
|
|
2344
|
-
suspendResult = decodeBrowser(this.
|
|
2357
|
+
suspendResult = decodeBrowser(this.w15_1, this);
|
|
2345
2358
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2346
2359
|
return suspendResult;
|
|
2347
2360
|
}
|
|
@@ -2349,15 +2362,15 @@
|
|
|
2349
2362
|
}
|
|
2350
2363
|
|
|
2351
2364
|
case 1:
|
|
2352
|
-
this.
|
|
2365
|
+
this.x15_1 = suspendResult;
|
|
2353
2366
|
this.h6_1 = 3;
|
|
2354
2367
|
continue $sm;
|
|
2355
2368
|
case 2:
|
|
2356
|
-
this.
|
|
2369
|
+
this.x15_1 = suspendResult;
|
|
2357
2370
|
this.h6_1 = 3;
|
|
2358
2371
|
continue $sm;
|
|
2359
2372
|
case 3:
|
|
2360
|
-
return this.
|
|
2373
|
+
return this.x15_1;
|
|
2361
2374
|
case 4:
|
|
2362
2375
|
throw this.k6_1;
|
|
2363
2376
|
}
|
|
@@ -2374,7 +2387,7 @@
|
|
|
2374
2387
|
};
|
|
2375
2388
|
function $decodeNodeCOROUTINE$(url, resultContinuation) {
|
|
2376
2389
|
CoroutineImpl.call(this, resultContinuation);
|
|
2377
|
-
this.
|
|
2390
|
+
this.g16_1 = url;
|
|
2378
2391
|
}
|
|
2379
2392
|
protoOf($decodeNodeCOROUTINE$).p6 = function () {
|
|
2380
2393
|
var suspendResult = this.j6_1;
|
|
@@ -2385,7 +2398,7 @@
|
|
|
2385
2398
|
case 0:
|
|
2386
2399
|
this.i6_1 = 4;
|
|
2387
2400
|
this.h6_1 = 1;
|
|
2388
|
-
suspendResult = await_0(fetchUrlNode(this.
|
|
2401
|
+
suspendResult = await_0(fetchUrlNode(this.g16_1), this);
|
|
2389
2402
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2390
2403
|
return suspendResult;
|
|
2391
2404
|
}
|
|
@@ -2394,7 +2407,7 @@
|
|
|
2394
2407
|
case 1:
|
|
2395
2408
|
var res = suspendResult;
|
|
2396
2409
|
if (!res.ok) {
|
|
2397
|
-
var message = 'Tile fetch failed for ' + this.
|
|
2410
|
+
var message = 'Tile fetch failed for ' + this.g16_1 + ': HTTP ' + res.status;
|
|
2398
2411
|
throw IllegalStateException_init_$Create$_0(toString(message));
|
|
2399
2412
|
}
|
|
2400
2413
|
|
|
@@ -2415,19 +2428,8 @@
|
|
|
2415
2428
|
|
|
2416
2429
|
continue $sm;
|
|
2417
2430
|
case 3:
|
|
2418
|
-
var
|
|
2419
|
-
|
|
2420
|
-
var width = numberToInt(isNumber(tmp_0) ? tmp_0 : THROW_CCE());
|
|
2421
|
-
var tmp_1 = image.height;
|
|
2422
|
-
var height = numberToInt(isNumber(tmp_1) ? tmp_1 : THROW_CCE());
|
|
2423
|
-
var src = image.data;
|
|
2424
|
-
var tmp_2 = src.buffer;
|
|
2425
|
-
var tmp_3 = src.byteOffset;
|
|
2426
|
-
var tmp_4 = numberToInt(isNumber(tmp_3) ? tmp_3 : THROW_CCE());
|
|
2427
|
-
var tmp_5 = src.byteLength;
|
|
2428
|
-
var int8 = new Int8Array(tmp_2, tmp_4, numberToInt(isNumber(tmp_5) ? tmp_5 : THROW_CCE()));
|
|
2429
|
-
var rgba = int8;
|
|
2430
|
-
return new RawTile(width, height, rgba);
|
|
2431
|
+
var ARGUMENT = suspendResult;
|
|
2432
|
+
return rawTileFromJsquash(ARGUMENT);
|
|
2431
2433
|
case 4:
|
|
2432
2434
|
throw this.k6_1;
|
|
2433
2435
|
}
|
|
@@ -2444,7 +2446,7 @@
|
|
|
2444
2446
|
};
|
|
2445
2447
|
function $decodeBrowserCOROUTINE$(url, resultContinuation) {
|
|
2446
2448
|
CoroutineImpl.call(this, resultContinuation);
|
|
2447
|
-
this.
|
|
2449
|
+
this.p16_1 = url;
|
|
2448
2450
|
}
|
|
2449
2451
|
protoOf($decodeBrowserCOROUTINE$).p6 = function () {
|
|
2450
2452
|
var suspendResult = this.j6_1;
|
|
@@ -2455,7 +2457,7 @@
|
|
|
2455
2457
|
case 0:
|
|
2456
2458
|
this.i6_1 = 4;
|
|
2457
2459
|
this.h6_1 = 1;
|
|
2458
|
-
suspendResult = await_0(fetchUrlBrowser(this.
|
|
2460
|
+
suspendResult = await_0(fetchUrlBrowser(this.p16_1), this);
|
|
2459
2461
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2460
2462
|
return suspendResult;
|
|
2461
2463
|
}
|
|
@@ -2464,7 +2466,7 @@
|
|
|
2464
2466
|
case 1:
|
|
2465
2467
|
var res = suspendResult;
|
|
2466
2468
|
if (!res.ok) {
|
|
2467
|
-
var message = 'Tile fetch failed for ' + this.
|
|
2469
|
+
var message = 'Tile fetch failed for ' + this.p16_1 + ': HTTP ' + res.status;
|
|
2468
2470
|
throw IllegalStateException_init_$Create$_0(toString(message));
|
|
2469
2471
|
}
|
|
2470
2472
|
|
|
@@ -2476,54 +2478,21 @@
|
|
|
2476
2478
|
|
|
2477
2479
|
continue $sm;
|
|
2478
2480
|
case 2:
|
|
2479
|
-
var
|
|
2481
|
+
var ARGUMENT = suspendResult;
|
|
2480
2482
|
this.h6_1 = 3;
|
|
2481
|
-
suspendResult =
|
|
2483
|
+
suspendResult = decodeBlob(ARGUMENT, this.p16_1, this);
|
|
2482
2484
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2483
2485
|
return suspendResult;
|
|
2484
2486
|
}
|
|
2485
2487
|
|
|
2486
2488
|
continue $sm;
|
|
2487
2489
|
case 3:
|
|
2488
|
-
|
|
2489
|
-
l$ret$3: do {
|
|
2490
|
-
var tmp$ret$0;
|
|
2491
|
-
l$ret$1: do {
|
|
2492
|
-
var tmp_0;
|
|
2493
|
-
try {
|
|
2494
|
-
var tmp_1 = document.createElement('canvas');
|
|
2495
|
-
var canvas = tmp_1 instanceof HTMLCanvasElement ? tmp_1 : THROW_CCE();
|
|
2496
|
-
canvas.width = bitmap.width;
|
|
2497
|
-
canvas.height = bitmap.height;
|
|
2498
|
-
var tmp_2 = canvas.getContext('2d');
|
|
2499
|
-
var ctx = tmp_2 instanceof CanvasRenderingContext2D ? tmp_2 : THROW_CCE();
|
|
2500
|
-
ctx.drawImage(bitmap, 0.0, 0.0);
|
|
2501
|
-
var data = ctx.getImageData(0.0, 0.0, bitmap.width, bitmap.height);
|
|
2502
|
-
var src = data.data;
|
|
2503
|
-
var int8 = new Int8Array(src.buffer, src.byteOffset, src.byteLength);
|
|
2504
|
-
var rgba = int8;
|
|
2505
|
-
tmp$ret$0 = new RawTile(bitmap.width, bitmap.height, rgba);
|
|
2506
|
-
break l$ret$1;
|
|
2507
|
-
} catch ($p) {
|
|
2508
|
-
var tmp_3;
|
|
2509
|
-
var t = $p;
|
|
2510
|
-
bitmap.close();
|
|
2511
|
-
throw t;
|
|
2512
|
-
}
|
|
2513
|
-
}
|
|
2514
|
-
while (false);
|
|
2515
|
-
var tmp_4 = tmp$ret$0;
|
|
2516
|
-
bitmap.close();
|
|
2517
|
-
return tmp_4;
|
|
2518
|
-
}
|
|
2519
|
-
while (false);
|
|
2520
|
-
bitmap.close();
|
|
2521
|
-
return Unit_instance;
|
|
2490
|
+
return suspendResult;
|
|
2522
2491
|
case 4:
|
|
2523
2492
|
throw this.k6_1;
|
|
2524
2493
|
}
|
|
2525
|
-
} catch ($
|
|
2526
|
-
var e = $
|
|
2494
|
+
} catch ($p) {
|
|
2495
|
+
var e = $p;
|
|
2527
2496
|
if (this.i6_1 === 4) {
|
|
2528
2497
|
throw e;
|
|
2529
2498
|
} else {
|
|
@@ -2535,7 +2504,7 @@
|
|
|
2535
2504
|
};
|
|
2536
2505
|
function $decodeWebpNodeCOROUTINE$(buffer, resultContinuation) {
|
|
2537
2506
|
CoroutineImpl.call(this, resultContinuation);
|
|
2538
|
-
this.
|
|
2507
|
+
this.y16_1 = buffer;
|
|
2539
2508
|
}
|
|
2540
2509
|
protoOf($decodeWebpNodeCOROUTINE$).p6 = function () {
|
|
2541
2510
|
var suspendResult = this.j6_1;
|
|
@@ -2554,7 +2523,7 @@
|
|
|
2554
2523
|
continue $sm;
|
|
2555
2524
|
case 1:
|
|
2556
2525
|
var decode = suspendResult;
|
|
2557
|
-
var resultPromise = decode(this.
|
|
2526
|
+
var resultPromise = decode(this.y16_1);
|
|
2558
2527
|
this.h6_1 = 2;
|
|
2559
2528
|
suspendResult = await_0(resultPromise, this);
|
|
2560
2529
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
@@ -2578,6 +2547,101 @@
|
|
|
2578
2547
|
}
|
|
2579
2548
|
while (true);
|
|
2580
2549
|
};
|
|
2550
|
+
function $decodeBlobCOROUTINE$(blob, sourceUrl, resultContinuation) {
|
|
2551
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2552
|
+
this.h17_1 = blob;
|
|
2553
|
+
this.i17_1 = sourceUrl;
|
|
2554
|
+
}
|
|
2555
|
+
protoOf($decodeBlobCOROUTINE$).p6 = function () {
|
|
2556
|
+
var suspendResult = this.j6_1;
|
|
2557
|
+
$sm: do
|
|
2558
|
+
try {
|
|
2559
|
+
var tmp = this.h6_1;
|
|
2560
|
+
switch (tmp) {
|
|
2561
|
+
case 0:
|
|
2562
|
+
this.i6_1 = 3;
|
|
2563
|
+
this.i6_1 = 2;
|
|
2564
|
+
this.h6_1 = 1;
|
|
2565
|
+
suspendResult = await_0(window.createImageBitmap(this.h17_1), this);
|
|
2566
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2567
|
+
return suspendResult;
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
continue $sm;
|
|
2571
|
+
case 1:
|
|
2572
|
+
this.j17_1 = suspendResult;
|
|
2573
|
+
this.i6_1 = 3;
|
|
2574
|
+
this.h6_1 = 4;
|
|
2575
|
+
continue $sm;
|
|
2576
|
+
case 2:
|
|
2577
|
+
this.i6_1 = 3;
|
|
2578
|
+
var tmp_0 = this.k6_1;
|
|
2579
|
+
if (tmp_0 instanceof Error) {
|
|
2580
|
+
var e = this.k6_1;
|
|
2581
|
+
var tmp_1 = this;
|
|
2582
|
+
var this_0 = this.i17_1;
|
|
2583
|
+
var tmp_2;
|
|
2584
|
+
if (charSequenceLength(this_0) === 0) {
|
|
2585
|
+
tmp_2 = '<unnamed bytes>';
|
|
2586
|
+
} else {
|
|
2587
|
+
tmp_2 = this_0;
|
|
2588
|
+
}
|
|
2589
|
+
var message = 'Cannot decode tile at ' + tmp_2 + ': ' + e.message;
|
|
2590
|
+
throw IllegalStateException_init_$Create$_0(toString(message));
|
|
2591
|
+
} else {
|
|
2592
|
+
throw this.k6_1;
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
case 3:
|
|
2596
|
+
throw this.k6_1;
|
|
2597
|
+
case 4:
|
|
2598
|
+
this.i6_1 = 3;
|
|
2599
|
+
var bitmap = this.j17_1;
|
|
2600
|
+
l$ret$3: do {
|
|
2601
|
+
var tmp$ret$0;
|
|
2602
|
+
l$ret$1: do {
|
|
2603
|
+
var tmp_3;
|
|
2604
|
+
try {
|
|
2605
|
+
var tmp_4 = document.createElement('canvas');
|
|
2606
|
+
var canvas = tmp_4 instanceof HTMLCanvasElement ? tmp_4 : THROW_CCE();
|
|
2607
|
+
canvas.width = bitmap.width;
|
|
2608
|
+
canvas.height = bitmap.height;
|
|
2609
|
+
var tmp_5 = canvas.getContext('2d');
|
|
2610
|
+
var ctx = tmp_5 instanceof CanvasRenderingContext2D ? tmp_5 : THROW_CCE();
|
|
2611
|
+
ctx.drawImage(bitmap, 0.0, 0.0);
|
|
2612
|
+
var data = ctx.getImageData(0.0, 0.0, bitmap.width, bitmap.height);
|
|
2613
|
+
var src = data.data;
|
|
2614
|
+
var int8 = new Int8Array(src.buffer, src.byteOffset, src.byteLength);
|
|
2615
|
+
var rgba = int8;
|
|
2616
|
+
tmp$ret$0 = new RawTile(bitmap.width, bitmap.height, rgba);
|
|
2617
|
+
break l$ret$1;
|
|
2618
|
+
} catch ($p) {
|
|
2619
|
+
var tmp_6;
|
|
2620
|
+
var t = $p;
|
|
2621
|
+
bitmap.close();
|
|
2622
|
+
throw t;
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
while (false);
|
|
2626
|
+
var tmp_7 = tmp$ret$0;
|
|
2627
|
+
bitmap.close();
|
|
2628
|
+
return tmp_7;
|
|
2629
|
+
}
|
|
2630
|
+
while (false);
|
|
2631
|
+
bitmap.close();
|
|
2632
|
+
return Unit_instance;
|
|
2633
|
+
}
|
|
2634
|
+
} catch ($p_0) {
|
|
2635
|
+
var e_0 = $p_0;
|
|
2636
|
+
if (this.i6_1 === 3) {
|
|
2637
|
+
throw e_0;
|
|
2638
|
+
} else {
|
|
2639
|
+
this.h6_1 = this.i6_1;
|
|
2640
|
+
this.k6_1 = e_0;
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
while (true);
|
|
2644
|
+
};
|
|
2581
2645
|
var properties_initialized_TileFetcher_js_kt_apmrwg;
|
|
2582
2646
|
function _init_properties_TileFetcher_js_kt__7a2f1e() {
|
|
2583
2647
|
if (!properties_initialized_TileFetcher_js_kt_apmrwg) {
|
|
@@ -2590,7 +2654,7 @@
|
|
|
2590
2654
|
function fetchAndDecodeTile$ref_1() {
|
|
2591
2655
|
var i = new fetchAndDecodeTile$ref();
|
|
2592
2656
|
return constructCallableReference(function (p0, $completion) {
|
|
2593
|
-
return i.
|
|
2657
|
+
return i.g10(p0, $completion);
|
|
2594
2658
|
}, 1, 1, 2, 'fetchAndDecodeTile');
|
|
2595
2659
|
}
|
|
2596
2660
|
//region block: init
|
|
@@ -2618,11 +2682,10 @@
|
|
|
2618
2682
|
_.$_$.a = Distance_instance;
|
|
2619
2683
|
_.$_$.b = DouglasPeucker_instance;
|
|
2620
2684
|
_.$_$.c = ElevationSmoother_instance;
|
|
2621
|
-
_.$_$.d =
|
|
2622
|
-
_.$_$.e =
|
|
2623
|
-
_.$_$.f =
|
|
2624
|
-
_.$_$.g =
|
|
2625
|
-
_.$_$.h = Vector3D;
|
|
2685
|
+
_.$_$.d = ElevationProvider;
|
|
2686
|
+
_.$_$.e = LatLonElevation;
|
|
2687
|
+
_.$_$.f = LatLon;
|
|
2688
|
+
_.$_$.g = Vector3D;
|
|
2626
2689
|
//endregion
|
|
2627
2690
|
return _;
|
|
2628
2691
|
}));
|