@glandais/vcyclist-engine 6.0.1 → 6.2.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 +6 -3
- package/fit-kotlin-sdk.js +7926 -6939
- package/fit-kotlin-sdk.js.map +1 -1
- package/index.d.ts +15 -3
- package/kotlin-kotlin-stdlib.js +3058 -2352
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +22 -22
- package/kotlinx-atomicfu.js.map +1 -1
- package/kotlinx-coroutines-core.js +1361 -1255
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +1 -1
- package/package.json +1 -1
- package/vcyclist-elevation.js +2300 -1104
- package/vcyclist-elevation.js.map +1 -1
- package/vcyclist-engine.d.ts +1 -0
- package/vcyclist-engine.js +2474 -1792
- package/vcyclist-engine.js.map +1 -1
- package/vcyclist-fit.js +296 -296
- package/vcyclist-fit.js.map +1 -1
- package/vcyclist-gpx.js +4084 -1506
- package/vcyclist-gpx.js.map +1 -1
- package/xmlutil-core.js +2748 -2748
- package/xmlutil-core.js.map +1 -1
package/vcyclist-elevation.js
CHANGED
|
@@ -16,80 +16,106 @@
|
|
|
16
16
|
'use strict';
|
|
17
17
|
//region block: imports
|
|
18
18
|
var imul = Math.imul;
|
|
19
|
+
var sinh = Math.sinh;
|
|
19
20
|
var hypot = Math.hypot;
|
|
20
21
|
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.$_$.
|
|
29
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
30
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
31
|
-
var MutableEntry = kotlin_kotlin.$_$.
|
|
32
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
33
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
34
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.
|
|
35
|
-
var constructCallableReference = kotlin_kotlin.$_$.
|
|
36
|
-
var emptyList = kotlin_kotlin.$_$.
|
|
37
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.
|
|
38
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
39
|
-
var toList = kotlin_kotlin.$_$.
|
|
40
|
-
var KtList = kotlin_kotlin.$_$.
|
|
41
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
42
|
-
var toString = kotlin_kotlin.$_$.
|
|
43
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.
|
|
44
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
45
|
-
var listOf = kotlin_kotlin.$_$.
|
|
46
|
-
var numberToInt = kotlin_kotlin.$_$.
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
22
|
+
var protoOf = kotlin_kotlin.$_$.g8;
|
|
23
|
+
var getNumberHashCode = kotlin_kotlin.$_$.n7;
|
|
24
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.m7;
|
|
25
|
+
var equals = kotlin_kotlin.$_$.k7;
|
|
26
|
+
var initMetadataForClass = kotlin_kotlin.$_$.r7;
|
|
27
|
+
var numberToLong = kotlin_kotlin.$_$.s6;
|
|
28
|
+
var toNumber = kotlin_kotlin.$_$.x6;
|
|
29
|
+
var CoroutineImpl = kotlin_kotlin.$_$.z5;
|
|
30
|
+
var Unit_instance = kotlin_kotlin.$_$.k1;
|
|
31
|
+
var THROW_CCE = kotlin_kotlin.$_$.mb;
|
|
32
|
+
var MutableEntry = kotlin_kotlin.$_$.w2;
|
|
33
|
+
var isInterface = kotlin_kotlin.$_$.z7;
|
|
34
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.k5;
|
|
35
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.w7;
|
|
36
|
+
var constructCallableReference = kotlin_kotlin.$_$.h7;
|
|
37
|
+
var emptyList = kotlin_kotlin.$_$.p3;
|
|
38
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.t1;
|
|
39
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.n1;
|
|
40
|
+
var toList = kotlin_kotlin.$_$.e5;
|
|
41
|
+
var KtList = kotlin_kotlin.$_$.t2;
|
|
42
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.t7;
|
|
43
|
+
var toString = kotlin_kotlin.$_$.j8;
|
|
44
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.e2;
|
|
45
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.m1;
|
|
46
|
+
var listOf = kotlin_kotlin.$_$.g4;
|
|
47
|
+
var numberToInt = kotlin_kotlin.$_$.e8;
|
|
48
|
+
var Enum = kotlin_kotlin.$_$.cb;
|
|
49
|
+
var charSequenceLength = kotlin_kotlin.$_$.f7;
|
|
50
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.d;
|
|
51
|
+
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.i;
|
|
52
|
+
var toByte = kotlin_kotlin.$_$.h8;
|
|
53
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.h2;
|
|
54
|
+
var FloatCompanionObject_instance = kotlin_kotlin.$_$.d1;
|
|
55
|
+
var floatFromBits = kotlin_kotlin.$_$.l7;
|
|
56
|
+
var isNaN_0 = kotlin_kotlin.$_$.zb;
|
|
57
|
+
var roundToLong = kotlin_kotlin.$_$.m8;
|
|
58
|
+
var Long = kotlin_kotlin.$_$.hb;
|
|
59
|
+
var coerceIn = kotlin_kotlin.$_$.u8;
|
|
60
|
+
var convertToInt = kotlin_kotlin.$_$.k6;
|
|
61
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.v7;
|
|
62
|
+
var coerceIn_0 = kotlin_kotlin.$_$.s8;
|
|
63
|
+
var initMetadataForObject = kotlin_kotlin.$_$.x7;
|
|
64
|
+
var toList_0 = kotlin_kotlin.$_$.d5;
|
|
65
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.e3;
|
|
66
|
+
var get_indices = kotlin_kotlin.$_$.x3;
|
|
67
|
+
var get_lastIndex = kotlin_kotlin.$_$.a4;
|
|
68
|
+
var checkBuilderCapacity = kotlin_kotlin.$_$.b3;
|
|
69
|
+
var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.i2;
|
|
70
|
+
var coerceIn_1 = kotlin_kotlin.$_$.t8;
|
|
71
|
+
var objectCreate = kotlin_kotlin.$_$.f8;
|
|
72
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.bc;
|
|
73
|
+
var KFunctionImpl = kotlin_kotlin.$_$.z8;
|
|
74
|
+
var initMetadataForFunctionReference = kotlin_kotlin.$_$.u7;
|
|
75
|
+
var getStringHashCode = kotlin_kotlin.$_$.p7;
|
|
76
|
+
var Companion_instance = kotlin_kotlin.$_$.i1;
|
|
77
|
+
var joinToString = kotlin_kotlin.$_$.y3;
|
|
78
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.s7;
|
|
79
|
+
var enumEntries = kotlin_kotlin.$_$.b6;
|
|
80
|
+
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k;
|
|
81
|
+
var Semaphore = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i;
|
|
82
|
+
var async = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l;
|
|
62
83
|
var awaitAll = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
|
|
63
84
|
var coroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
|
|
64
|
-
var Exception = kotlin_kotlin.$_$.
|
|
65
|
-
var Exception_init_$Init$ = kotlin_kotlin.$_$.
|
|
66
|
-
var captureStack = kotlin_kotlin.$_$.
|
|
67
|
-
var KtMap = kotlin_kotlin.$_$.
|
|
68
|
-
var
|
|
69
|
-
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i;
|
|
85
|
+
var Exception = kotlin_kotlin.$_$.eb;
|
|
86
|
+
var Exception_init_$Init$ = kotlin_kotlin.$_$.b2;
|
|
87
|
+
var captureStack = kotlin_kotlin.$_$.b7;
|
|
88
|
+
var KtMap = kotlin_kotlin.$_$.u2;
|
|
89
|
+
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
|
|
70
90
|
var NonCancellable_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b;
|
|
71
|
-
var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
72
|
-
var CancellationException = kotlin_kotlin.$_$.
|
|
73
|
-
var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
74
|
-
var contentEquals = kotlin_kotlin.$_$.
|
|
75
|
-
var contentHashCode = kotlin_kotlin.$_$.
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
var
|
|
80
|
-
var
|
|
91
|
+
var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g;
|
|
92
|
+
var CancellationException = kotlin_kotlin.$_$.j5;
|
|
93
|
+
var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
|
|
94
|
+
var contentEquals = kotlin_kotlin.$_$.f3;
|
|
95
|
+
var contentHashCode = kotlin_kotlin.$_$.g3;
|
|
96
|
+
var round = kotlin_kotlin.$_$.n8;
|
|
97
|
+
var replace = kotlin_kotlin.$_$.ea;
|
|
98
|
+
var contains = kotlin_kotlin.$_$.m9;
|
|
99
|
+
var IllegalStateException = kotlin_kotlin.$_$.gb;
|
|
100
|
+
var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.g2;
|
|
101
|
+
var Monotonic_instance = kotlin_kotlin.$_$.h1;
|
|
102
|
+
var delay = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
|
|
103
|
+
var shiftLeft = kotlin_kotlin.$_$.t6;
|
|
104
|
+
var multiply = kotlin_kotlin.$_$.q6;
|
|
105
|
+
var ValueTimeMark__elapsedNow_impl_eonqvs = kotlin_kotlin.$_$.c;
|
|
106
|
+
var _Duration___get_inWholeMilliseconds__impl__msfiry = kotlin_kotlin.$_$.b;
|
|
81
107
|
var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
|
|
82
|
-
var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
83
|
-
var
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
var
|
|
87
|
-
var
|
|
88
|
-
var
|
|
89
|
-
var
|
|
108
|
+
var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n;
|
|
109
|
+
var sorted = kotlin_kotlin.$_$.x4;
|
|
110
|
+
var setOf = kotlin_kotlin.$_$.t4;
|
|
111
|
+
var KProperty0 = kotlin_kotlin.$_$.b9;
|
|
112
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.o7;
|
|
113
|
+
var isCharSequence = kotlin_kotlin.$_$.y7;
|
|
114
|
+
var trim = kotlin_kotlin.$_$.xa;
|
|
115
|
+
var toLongOrNull = kotlin_kotlin.$_$.sa;
|
|
116
|
+
var isNumber = kotlin_kotlin.$_$.a8;
|
|
90
117
|
var await_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d;
|
|
91
|
-
var
|
|
92
|
-
var lazy = kotlin_kotlin.$_$.db;
|
|
118
|
+
var lazy = kotlin_kotlin.$_$.ac;
|
|
93
119
|
//endregion
|
|
94
120
|
//region block: pre-declaration
|
|
95
121
|
initMetadataForClass(SmoothingOptions, 'SmoothingOptions', SmoothingOptions);
|
|
@@ -98,8 +124,10 @@
|
|
|
98
124
|
initMetadataForCoroutine($setElevationsCOROUTINE$, CoroutineImpl);
|
|
99
125
|
initMetadataForCoroutine($getElevationsAlongCOROUTINE$, CoroutineImpl);
|
|
100
126
|
initMetadataForClass(BatchCalculator, 'BatchCalculator', VOID, VOID, VOID, [4, 7]);
|
|
101
|
-
initMetadataForClass(
|
|
102
|
-
|
|
127
|
+
initMetadataForClass(TileEncoding, 'TileEncoding', VOID, Enum);
|
|
128
|
+
initMetadataForInterface(Coordinates, 'Coordinates');
|
|
129
|
+
initMetadataForClass(LatLon, 'LatLon', VOID, VOID, [Coordinates]);
|
|
130
|
+
initMetadataForClass(LatLonElevation, 'LatLonElevation', VOID, VOID, [Coordinates]);
|
|
103
131
|
initMetadataForObject(Distance, 'Distance');
|
|
104
132
|
initMetadataForObject(DouglasPeucker, 'DouglasPeucker');
|
|
105
133
|
initMetadataForObject(EcefConverter, 'EcefConverter');
|
|
@@ -108,15 +136,22 @@
|
|
|
108
136
|
initMetadataForCoroutine($elevationFromPixelCOROUTINE$, CoroutineImpl);
|
|
109
137
|
initMetadataForClass(ElevationCalculator, 'ElevationCalculator', VOID, VOID, VOID, [3, 2, 1]);
|
|
110
138
|
initMetadataForObject(ElevationFunctions, 'ElevationFunctions');
|
|
139
|
+
initMetadataForLambda(ElevationProvider$calculator$slambda, CoroutineImpl, VOID, [2]);
|
|
140
|
+
initMetadataForLambda(ElevationProvider$calculator$slambda_1, CoroutineImpl, VOID, [2]);
|
|
141
|
+
initMetadataForClass(ElevationProvider, 'ElevationProvider', ElevationProvider_init_$Create$, VOID, VOID, [3, 2, 6]);
|
|
111
142
|
initMetadataForFunctionReference(fetchAndDecodeTile$ref, KFunctionImpl, VOID, [1]);
|
|
112
|
-
|
|
143
|
+
initMetadataForLambda(defaultTileFetcher$slambda, CoroutineImpl, VOID, [1]);
|
|
144
|
+
initMetadataForLambda(defaultTileFetcher$slambda_1, CoroutineImpl, VOID, [1]);
|
|
113
145
|
initMetadataForClass(ElevationProviderConfig, 'ElevationProviderConfig', ElevationProviderConfig);
|
|
114
146
|
initMetadataForClass(Attribution, 'Attribution');
|
|
115
147
|
initMetadataForObject(ElevationSmoother, 'ElevationSmoother');
|
|
148
|
+
initMetadataForCompanion(Companion);
|
|
149
|
+
initMetadataForClass(ElevationSource, 'ElevationSource', VOID, Enum);
|
|
116
150
|
initMetadataForLambda(Flux$forEachParallel$slambda$slambda, CoroutineImpl, VOID, [1]);
|
|
117
151
|
initMetadataForLambda(Flux$forEachParallel$slambda, CoroutineImpl, VOID, [1]);
|
|
118
152
|
initMetadataForCoroutine($forEachParallelCOROUTINE$, CoroutineImpl);
|
|
119
153
|
initMetadataForObject(Flux, 'Flux', VOID, VOID, VOID, [3]);
|
|
154
|
+
initMetadataForClass(IgnLidarHdLayer, 'IgnLidarHdLayer', VOID, Enum);
|
|
120
155
|
initMetadataForClass(Hit, 'Hit');
|
|
121
156
|
initMetadataForClass(Await, 'Await');
|
|
122
157
|
initMetadataForClass(Owner, 'Owner');
|
|
@@ -128,37 +163,45 @@
|
|
|
128
163
|
initMetadataForCoroutine($loadCOROUTINE$, CoroutineImpl);
|
|
129
164
|
initMetadataForClass(LruCache, 'LruCache', VOID, VOID, VOID, [1, 2, 0]);
|
|
130
165
|
initMetadataForClass(RawTile, 'RawTile');
|
|
131
|
-
initMetadataForCompanion(
|
|
166
|
+
initMetadataForCompanion(Companion_0);
|
|
132
167
|
initMetadataForClass(Tile, 'Tile');
|
|
133
168
|
initMetadataForFunctionReference(fetchAndDecodeTile$ref_0, KFunctionImpl, VOID, [1]);
|
|
134
169
|
initMetadataForLambda(TileManager$cache$slambda, CoroutineImpl, VOID, [1]);
|
|
135
170
|
initMetadataForClass(TileManager, 'TileManager', VOID, VOID, VOID, [1, 0]);
|
|
171
|
+
initMetadataForClass(TileFetchException, 'TileFetchException', VOID, IllegalStateException);
|
|
172
|
+
initMetadataForCoroutine($awaitTurnCOROUTINE$, CoroutineImpl);
|
|
173
|
+
initMetadataForClass(RequestPacer, 'RequestPacer', VOID, VOID, VOID, [0]);
|
|
174
|
+
initMetadataForFunctionReference(fetchTileBytes$ref, KFunctionImpl, VOID, [1]);
|
|
175
|
+
initMetadataForLambda(pacedTileBytesFetcher$slambda, CoroutineImpl, VOID, [1]);
|
|
136
176
|
initMetadataForClass(TileCoordinates, 'TileCoordinates');
|
|
137
177
|
initMetadataForClass(Pixel, 'Pixel');
|
|
138
178
|
initMetadataForClass(PixelFloat, 'PixelFloat');
|
|
139
179
|
initMetadataForClass(TileCoordinatesFloat, 'TileCoordinatesFloat');
|
|
140
|
-
initMetadataForCompanion(
|
|
180
|
+
initMetadataForCompanion(Companion_1);
|
|
141
181
|
initMetadataForClass(Vector3D, 'Vector3D');
|
|
142
182
|
initMetadataForLambda(getElevation$slambda, CoroutineImpl, VOID, [1]);
|
|
143
183
|
initMetadataForLambda(getElevationsAlong$slambda, CoroutineImpl, VOID, [1]);
|
|
144
184
|
initMetadataForCoroutine($fetchAndDecodeTileCOROUTINE$, CoroutineImpl);
|
|
185
|
+
initMetadataForCoroutine($decodeTileBytesCOROUTINE$, CoroutineImpl);
|
|
145
186
|
initMetadataForCoroutine($decodeNodeCOROUTINE$, CoroutineImpl);
|
|
146
187
|
initMetadataForCoroutine($decodeBrowserCOROUTINE$, CoroutineImpl);
|
|
147
|
-
initMetadataForCoroutine($
|
|
188
|
+
initMetadataForCoroutine($decodeBytesNodeCOROUTINE$, CoroutineImpl);
|
|
148
189
|
initMetadataForCoroutine($decodeBlobCOROUTINE$, CoroutineImpl);
|
|
190
|
+
initMetadataForCoroutine($decodeWebpNodeCOROUTINE$, CoroutineImpl);
|
|
191
|
+
initMetadataForCoroutine($fetchTileBytesCOROUTINE$, CoroutineImpl);
|
|
149
192
|
//endregion
|
|
150
193
|
function SmoothingOptions(windowSize, enabled) {
|
|
151
194
|
windowSize = windowSize === VOID ? 50.0 : windowSize;
|
|
152
195
|
enabled = enabled === VOID ? false : enabled;
|
|
153
|
-
this.
|
|
154
|
-
this.
|
|
196
|
+
this.dy_1 = windowSize;
|
|
197
|
+
this.ey_1 = enabled;
|
|
155
198
|
}
|
|
156
199
|
protoOf(SmoothingOptions).toString = function () {
|
|
157
|
-
return 'SmoothingOptions(windowSize=' + this.
|
|
200
|
+
return 'SmoothingOptions(windowSize=' + this.dy_1 + ', enabled=' + this.ey_1 + ')';
|
|
158
201
|
};
|
|
159
202
|
protoOf(SmoothingOptions).hashCode = function () {
|
|
160
|
-
var result = this.
|
|
161
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
203
|
+
var result = this.dy_1 == null ? 0 : getNumberHashCode(this.dy_1);
|
|
204
|
+
result = imul(result, 31) + getBooleanHashCode(this.ey_1) | 0;
|
|
162
205
|
return result;
|
|
163
206
|
};
|
|
164
207
|
protoOf(SmoothingOptions).equals = function (other) {
|
|
@@ -166,9 +209,9 @@
|
|
|
166
209
|
return true;
|
|
167
210
|
if (!(other instanceof SmoothingOptions))
|
|
168
211
|
return false;
|
|
169
|
-
if (!equals(this.
|
|
212
|
+
if (!equals(this.dy_1, other.dy_1))
|
|
170
213
|
return false;
|
|
171
|
-
if (!(this.
|
|
214
|
+
if (!(this.ey_1 === other.ey_1))
|
|
172
215
|
return false;
|
|
173
216
|
return true;
|
|
174
217
|
};
|
|
@@ -176,17 +219,17 @@
|
|
|
176
219
|
tolerance = tolerance === VOID ? 10.0 : tolerance;
|
|
177
220
|
zExaggeration = zExaggeration === VOID ? 3.0 : zExaggeration;
|
|
178
221
|
enabled = enabled === VOID ? false : enabled;
|
|
179
|
-
this.
|
|
180
|
-
this.
|
|
181
|
-
this.
|
|
222
|
+
this.fy_1 = tolerance;
|
|
223
|
+
this.gy_1 = zExaggeration;
|
|
224
|
+
this.hy_1 = enabled;
|
|
182
225
|
}
|
|
183
226
|
protoOf(FilterOptions).toString = function () {
|
|
184
|
-
return 'FilterOptions(tolerance=' + this.
|
|
227
|
+
return 'FilterOptions(tolerance=' + this.fy_1 + ', zExaggeration=' + this.gy_1 + ', enabled=' + this.hy_1 + ')';
|
|
185
228
|
};
|
|
186
229
|
protoOf(FilterOptions).hashCode = function () {
|
|
187
|
-
var result = this.
|
|
188
|
-
result = imul(result, 31) + (this.
|
|
189
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
230
|
+
var result = this.fy_1 == null ? 0 : getNumberHashCode(this.fy_1);
|
|
231
|
+
result = imul(result, 31) + (this.gy_1 == null ? 0 : getNumberHashCode(this.gy_1)) | 0;
|
|
232
|
+
result = imul(result, 31) + getBooleanHashCode(this.hy_1) | 0;
|
|
190
233
|
return result;
|
|
191
234
|
};
|
|
192
235
|
protoOf(FilterOptions).equals = function (other) {
|
|
@@ -194,11 +237,11 @@
|
|
|
194
237
|
return true;
|
|
195
238
|
if (!(other instanceof FilterOptions))
|
|
196
239
|
return false;
|
|
197
|
-
if (!equals(this.
|
|
240
|
+
if (!equals(this.fy_1, other.fy_1))
|
|
198
241
|
return false;
|
|
199
|
-
if (!equals(this.
|
|
242
|
+
if (!equals(this.gy_1, other.gy_1))
|
|
200
243
|
return false;
|
|
201
|
-
if (!(this.
|
|
244
|
+
if (!(this.hy_1 === other.hy_1))
|
|
202
245
|
return false;
|
|
203
246
|
return true;
|
|
204
247
|
};
|
|
@@ -207,44 +250,44 @@
|
|
|
207
250
|
return toNumber(asLong) === d ? asLong.toString() : d.toString();
|
|
208
251
|
}
|
|
209
252
|
function BatchCalculator$setElevations$slambda($coordinates, this$0, $zoomLevel, $interpolation, $results, resultContinuation) {
|
|
210
|
-
this
|
|
211
|
-
this.
|
|
212
|
-
this
|
|
213
|
-
this
|
|
214
|
-
this
|
|
253
|
+
this.qy_1 = $coordinates;
|
|
254
|
+
this.ry_1 = this$0;
|
|
255
|
+
this.sy_1 = $zoomLevel;
|
|
256
|
+
this.ty_1 = $interpolation;
|
|
257
|
+
this.uy_1 = $results;
|
|
215
258
|
CoroutineImpl.call(this, resultContinuation);
|
|
216
259
|
}
|
|
217
|
-
protoOf(BatchCalculator$setElevations$slambda).
|
|
218
|
-
var tmp = this.
|
|
219
|
-
tmp.
|
|
220
|
-
tmp.
|
|
221
|
-
return tmp.
|
|
260
|
+
protoOf(BatchCalculator$setElevations$slambda).zy = function (_destruct__k2r9zo, $completion) {
|
|
261
|
+
var tmp = this.az(_destruct__k2r9zo, $completion);
|
|
262
|
+
tmp.i7_1 = Unit_instance;
|
|
263
|
+
tmp.j7_1 = null;
|
|
264
|
+
return tmp.o7();
|
|
222
265
|
};
|
|
223
|
-
protoOf(BatchCalculator$setElevations$slambda).
|
|
224
|
-
return this.
|
|
266
|
+
protoOf(BatchCalculator$setElevations$slambda).w7 = function (p1, $completion) {
|
|
267
|
+
return this.zy((!(p1 == null) ? isInterface(p1, MutableEntry) : false) ? p1 : THROW_CCE(), $completion);
|
|
225
268
|
};
|
|
226
|
-
protoOf(BatchCalculator$setElevations$slambda).
|
|
227
|
-
var suspendResult = this.
|
|
269
|
+
protoOf(BatchCalculator$setElevations$slambda).o7 = function () {
|
|
270
|
+
var suspendResult = this.i7_1;
|
|
228
271
|
$sm: do
|
|
229
272
|
try {
|
|
230
|
-
var tmp = this.
|
|
273
|
+
var tmp = this.g7_1;
|
|
231
274
|
switch (tmp) {
|
|
232
275
|
case 0:
|
|
233
|
-
this.
|
|
234
|
-
var indices = this.
|
|
235
|
-
this.
|
|
236
|
-
this.
|
|
276
|
+
this.h7_1 = 4;
|
|
277
|
+
var indices = this.vy_1.n1();
|
|
278
|
+
this.yy_1 = indices.l();
|
|
279
|
+
this.g7_1 = 1;
|
|
237
280
|
continue $sm;
|
|
238
281
|
case 1:
|
|
239
|
-
if (!this.
|
|
240
|
-
this.
|
|
282
|
+
if (!this.yy_1.m()) {
|
|
283
|
+
this.g7_1 = 3;
|
|
241
284
|
continue $sm;
|
|
242
285
|
}
|
|
243
286
|
|
|
244
|
-
this.
|
|
245
|
-
this.
|
|
246
|
-
this.
|
|
247
|
-
suspendResult = this.
|
|
287
|
+
this.xy_1 = this.yy_1.n();
|
|
288
|
+
this.wy_1 = this.qy_1.p(this.xy_1);
|
|
289
|
+
this.g7_1 = 2;
|
|
290
|
+
suspendResult = this.ry_1.bz_1.fz(this.wy_1, this.sy_1, this.ty_1, this);
|
|
248
291
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
249
292
|
return suspendResult;
|
|
250
293
|
}
|
|
@@ -252,136 +295,136 @@
|
|
|
252
295
|
continue $sm;
|
|
253
296
|
case 2:
|
|
254
297
|
var ele = suspendResult;
|
|
255
|
-
this
|
|
256
|
-
this.
|
|
298
|
+
this.uy_1[this.xy_1] = new LatLonElevation(this.wy_1.gz(), this.wy_1.hz(), ele);
|
|
299
|
+
this.g7_1 = 1;
|
|
257
300
|
continue $sm;
|
|
258
301
|
case 3:
|
|
259
302
|
return Unit_instance;
|
|
260
303
|
case 4:
|
|
261
|
-
throw this.
|
|
304
|
+
throw this.j7_1;
|
|
262
305
|
}
|
|
263
306
|
} catch ($p) {
|
|
264
307
|
var e = $p;
|
|
265
|
-
if (this.
|
|
308
|
+
if (this.h7_1 === 4) {
|
|
266
309
|
throw e;
|
|
267
310
|
} else {
|
|
268
|
-
this.
|
|
269
|
-
this.
|
|
311
|
+
this.g7_1 = this.h7_1;
|
|
312
|
+
this.j7_1 = e;
|
|
270
313
|
}
|
|
271
314
|
}
|
|
272
315
|
while (true);
|
|
273
316
|
};
|
|
274
|
-
protoOf(BatchCalculator$setElevations$slambda).
|
|
275
|
-
var i = new BatchCalculator$setElevations$slambda(this
|
|
276
|
-
i.
|
|
317
|
+
protoOf(BatchCalculator$setElevations$slambda).az = function (_destruct__k2r9zo, completion) {
|
|
318
|
+
var i = new BatchCalculator$setElevations$slambda(this.qy_1, this.ry_1, this.sy_1, this.ty_1, this.uy_1, completion);
|
|
319
|
+
i.vy_1 = _destruct__k2r9zo;
|
|
277
320
|
return i;
|
|
278
321
|
};
|
|
279
322
|
function BatchCalculator$setElevations$slambda_0($coordinates, this$0, $zoomLevel, $interpolation, $results, resultContinuation) {
|
|
280
323
|
var i = new BatchCalculator$setElevations$slambda($coordinates, this$0, $zoomLevel, $interpolation, $results, resultContinuation);
|
|
281
324
|
return constructCallableReference(function (_destruct__k2r9zo, $completion) {
|
|
282
|
-
return i.
|
|
325
|
+
return i.zy(_destruct__k2r9zo, $completion);
|
|
283
326
|
}, 1);
|
|
284
327
|
}
|
|
285
328
|
function $setElevationsCOROUTINE$(_this__u8e3s4, coordinates, zoomLevel, interpolation, maxParallelTiles, resultContinuation) {
|
|
286
329
|
CoroutineImpl.call(this, resultContinuation);
|
|
287
|
-
this.
|
|
288
|
-
this.
|
|
289
|
-
this.
|
|
290
|
-
this.
|
|
291
|
-
this.
|
|
292
|
-
}
|
|
293
|
-
protoOf($setElevationsCOROUTINE$).
|
|
294
|
-
var suspendResult = this.
|
|
330
|
+
this.qz_1 = _this__u8e3s4;
|
|
331
|
+
this.rz_1 = coordinates;
|
|
332
|
+
this.sz_1 = zoomLevel;
|
|
333
|
+
this.tz_1 = interpolation;
|
|
334
|
+
this.uz_1 = maxParallelTiles;
|
|
335
|
+
}
|
|
336
|
+
protoOf($setElevationsCOROUTINE$).o7 = function () {
|
|
337
|
+
var suspendResult = this.i7_1;
|
|
295
338
|
$sm: do
|
|
296
339
|
try {
|
|
297
|
-
var tmp = this.
|
|
340
|
+
var tmp = this.g7_1;
|
|
298
341
|
switch (tmp) {
|
|
299
342
|
case 0:
|
|
300
|
-
this.
|
|
301
|
-
if (this.
|
|
343
|
+
this.h7_1 = 2;
|
|
344
|
+
if (this.rz_1.q())
|
|
302
345
|
return emptyList();
|
|
303
346
|
var tmp_0 = this;
|
|
304
|
-
var size = this.
|
|
305
|
-
tmp_0.
|
|
347
|
+
var size = this.rz_1.o();
|
|
348
|
+
tmp_0.vz_1 = Array(size);
|
|
306
349
|
var byTile = LinkedHashMap_init_$Create$();
|
|
307
|
-
var iterator = this.
|
|
350
|
+
var iterator = this.rz_1.l();
|
|
308
351
|
var index = 0;
|
|
309
|
-
while (iterator.
|
|
352
|
+
while (iterator.m()) {
|
|
310
353
|
var i = index;
|
|
311
354
|
index = index + 1 | 0;
|
|
312
|
-
var p = iterator.
|
|
313
|
-
var tile = ElevationFunctions_instance.
|
|
314
|
-
var key = '' + tile.
|
|
315
|
-
var value = byTile.
|
|
355
|
+
var p = iterator.n();
|
|
356
|
+
var tile = ElevationFunctions_instance.wz(p, this.sz_1);
|
|
357
|
+
var key = '' + tile.zz_1 + '/' + tile.xz_1 + '/' + tile.yz_1;
|
|
358
|
+
var value = byTile.q1(key);
|
|
316
359
|
var tmp_1;
|
|
317
360
|
if (value == null) {
|
|
318
361
|
var answer = ArrayList_init_$Create$();
|
|
319
|
-
byTile.
|
|
362
|
+
byTile.s3(key, answer);
|
|
320
363
|
tmp_1 = answer;
|
|
321
364
|
} else {
|
|
322
365
|
tmp_1 = value;
|
|
323
366
|
}
|
|
324
|
-
tmp_1.
|
|
367
|
+
tmp_1.k(i);
|
|
325
368
|
}
|
|
326
369
|
|
|
327
|
-
this.
|
|
370
|
+
this.g7_1 = 1;
|
|
328
371
|
var tmp_2 = Flux_instance;
|
|
329
|
-
var tmp_3 = byTile.
|
|
330
|
-
suspendResult = tmp_2.
|
|
372
|
+
var tmp_3 = byTile.t1();
|
|
373
|
+
suspendResult = tmp_2.a10(tmp_3, this.uz_1, BatchCalculator$setElevations$slambda_0(this.rz_1, this.qz_1, this.sz_1, this.tz_1, this.vz_1, null), this);
|
|
331
374
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
332
375
|
return suspendResult;
|
|
333
376
|
}
|
|
334
377
|
|
|
335
378
|
continue $sm;
|
|
336
379
|
case 1:
|
|
337
|
-
var tmp_4 = toList(this.
|
|
380
|
+
var tmp_4 = toList(this.vz_1);
|
|
338
381
|
return isInterface(tmp_4, KtList) ? tmp_4 : THROW_CCE();
|
|
339
382
|
case 2:
|
|
340
|
-
throw this.
|
|
383
|
+
throw this.j7_1;
|
|
341
384
|
}
|
|
342
385
|
} catch ($p) {
|
|
343
386
|
var e = $p;
|
|
344
|
-
if (this.
|
|
387
|
+
if (this.h7_1 === 2) {
|
|
345
388
|
throw e;
|
|
346
389
|
} else {
|
|
347
|
-
this.
|
|
348
|
-
this.
|
|
390
|
+
this.g7_1 = this.h7_1;
|
|
391
|
+
this.j7_1 = e;
|
|
349
392
|
}
|
|
350
393
|
}
|
|
351
394
|
while (true);
|
|
352
395
|
};
|
|
353
396
|
function $getElevationsAlongCOROUTINE$(_this__u8e3s4, path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, resultContinuation) {
|
|
354
397
|
CoroutineImpl.call(this, resultContinuation);
|
|
355
|
-
this.
|
|
356
|
-
this.
|
|
357
|
-
this.
|
|
358
|
-
this.
|
|
359
|
-
this.
|
|
360
|
-
this.
|
|
361
|
-
this.
|
|
362
|
-
this.
|
|
363
|
-
}
|
|
364
|
-
protoOf($getElevationsAlongCOROUTINE$).
|
|
365
|
-
var suspendResult = this.
|
|
398
|
+
this.j10_1 = _this__u8e3s4;
|
|
399
|
+
this.k10_1 = path;
|
|
400
|
+
this.l10_1 = zoomLevel;
|
|
401
|
+
this.m10_1 = step;
|
|
402
|
+
this.n10_1 = minDistance;
|
|
403
|
+
this.o10_1 = interpolation;
|
|
404
|
+
this.p10_1 = smoothingOptions;
|
|
405
|
+
this.q10_1 = filterOptions;
|
|
406
|
+
}
|
|
407
|
+
protoOf($getElevationsAlongCOROUTINE$).o7 = function () {
|
|
408
|
+
var suspendResult = this.i7_1;
|
|
366
409
|
$sm: do
|
|
367
410
|
try {
|
|
368
|
-
var tmp = this.
|
|
411
|
+
var tmp = this.g7_1;
|
|
369
412
|
switch (tmp) {
|
|
370
413
|
case 0:
|
|
371
|
-
this.
|
|
372
|
-
if (!(this.
|
|
414
|
+
this.h7_1 = 2;
|
|
415
|
+
if (!(this.k10_1.o() >= 2)) {
|
|
373
416
|
var message = 'Path must contain at least 2 coordinates';
|
|
374
417
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
375
418
|
}
|
|
376
419
|
|
|
377
|
-
if (!(this.
|
|
378
|
-
var message_0 = 'Step is too small: ' + formatNumber(this.
|
|
420
|
+
if (!(this.m10_1 > 1.0)) {
|
|
421
|
+
var message_0 = 'Step is too small: ' + formatNumber(this.j10_1, this.m10_1) + ' meters';
|
|
379
422
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
380
423
|
}
|
|
381
424
|
|
|
382
|
-
var densified = this.
|
|
383
|
-
this.
|
|
384
|
-
suspendResult = this.
|
|
425
|
+
var densified = this.j10_1.r10(this.k10_1, this.m10_1, this.n10_1);
|
|
426
|
+
this.g7_1 = 1;
|
|
427
|
+
suspendResult = this.j10_1.s10(densified, this.l10_1, this.o10_1, VOID, this);
|
|
385
428
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
386
429
|
return suspendResult;
|
|
387
430
|
}
|
|
@@ -390,9 +433,9 @@
|
|
|
390
433
|
case 1:
|
|
391
434
|
var withElevation = suspendResult;
|
|
392
435
|
var tmp_0;
|
|
393
|
-
var tmp1_safe_receiver = this.
|
|
394
|
-
if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
395
|
-
tmp_0 = withElevation.
|
|
436
|
+
var tmp1_safe_receiver = this.p10_1;
|
|
437
|
+
if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ey_1) === true) {
|
|
438
|
+
tmp_0 = withElevation.o() >= 3;
|
|
396
439
|
} else {
|
|
397
440
|
tmp_0 = false;
|
|
398
441
|
}
|
|
@@ -400,14 +443,14 @@
|
|
|
400
443
|
if (tmp_0) {
|
|
401
444
|
var tmp_1 = ElevationSmoother_instance;
|
|
402
445
|
var tmp_2 = withElevation;
|
|
403
|
-
var tmp0_elvis_lhs = this.
|
|
404
|
-
withElevation = tmp_1.
|
|
446
|
+
var tmp0_elvis_lhs = this.p10_1.dy_1;
|
|
447
|
+
withElevation = tmp_1.t10(tmp_2, tmp0_elvis_lhs == null ? 50.0 : tmp0_elvis_lhs);
|
|
405
448
|
}
|
|
406
449
|
|
|
407
450
|
var tmp_3;
|
|
408
|
-
var tmp4_safe_receiver = this.
|
|
409
|
-
if ((tmp4_safe_receiver == null ? null : tmp4_safe_receiver.
|
|
410
|
-
tmp_3 = withElevation.
|
|
451
|
+
var tmp4_safe_receiver = this.q10_1;
|
|
452
|
+
if ((tmp4_safe_receiver == null ? null : tmp4_safe_receiver.hy_1) === true) {
|
|
453
|
+
tmp_3 = withElevation.o() > 2;
|
|
411
454
|
} else {
|
|
412
455
|
tmp_3 = false;
|
|
413
456
|
}
|
|
@@ -415,74 +458,74 @@
|
|
|
415
458
|
if (tmp_3) {
|
|
416
459
|
var tmp_4 = DouglasPeucker_instance;
|
|
417
460
|
var tmp_5 = withElevation;
|
|
418
|
-
var tmp2_elvis_lhs = this.
|
|
461
|
+
var tmp2_elvis_lhs = this.q10_1.fy_1;
|
|
419
462
|
var tmp_6 = tmp2_elvis_lhs == null ? 10.0 : tmp2_elvis_lhs;
|
|
420
|
-
var tmp3_elvis_lhs = this.
|
|
421
|
-
withElevation = tmp_4.
|
|
463
|
+
var tmp3_elvis_lhs = this.q10_1.gy_1;
|
|
464
|
+
withElevation = tmp_4.u10(tmp_5, tmp_6, tmp3_elvis_lhs == null ? 3.0 : tmp3_elvis_lhs);
|
|
422
465
|
}
|
|
423
466
|
|
|
424
467
|
return withElevation;
|
|
425
468
|
case 2:
|
|
426
|
-
throw this.
|
|
469
|
+
throw this.j7_1;
|
|
427
470
|
}
|
|
428
471
|
} catch ($p) {
|
|
429
472
|
var e = $p;
|
|
430
|
-
if (this.
|
|
473
|
+
if (this.h7_1 === 2) {
|
|
431
474
|
throw e;
|
|
432
475
|
} else {
|
|
433
|
-
this.
|
|
434
|
-
this.
|
|
476
|
+
this.g7_1 = this.h7_1;
|
|
477
|
+
this.j7_1 = e;
|
|
435
478
|
}
|
|
436
479
|
}
|
|
437
480
|
while (true);
|
|
438
481
|
};
|
|
439
482
|
function BatchCalculator(calculator) {
|
|
440
|
-
this.
|
|
483
|
+
this.bz_1 = calculator;
|
|
441
484
|
}
|
|
442
|
-
protoOf(BatchCalculator).
|
|
485
|
+
protoOf(BatchCalculator).v10 = function (coordinates, zoomLevel, interpolation, maxParallelTiles, $completion) {
|
|
443
486
|
var tmp = new $setElevationsCOROUTINE$(this, coordinates, zoomLevel, interpolation, maxParallelTiles, $completion);
|
|
444
|
-
tmp.
|
|
445
|
-
tmp.
|
|
446
|
-
return tmp.
|
|
487
|
+
tmp.i7_1 = Unit_instance;
|
|
488
|
+
tmp.j7_1 = null;
|
|
489
|
+
return tmp.o7();
|
|
447
490
|
};
|
|
448
|
-
protoOf(BatchCalculator).
|
|
491
|
+
protoOf(BatchCalculator).s10 = function (coordinates, zoomLevel, interpolation, maxParallelTiles, $completion, $super) {
|
|
449
492
|
maxParallelTiles = maxParallelTiles === VOID ? 10 : maxParallelTiles;
|
|
450
|
-
return $super === VOID ? this.
|
|
493
|
+
return $super === VOID ? this.v10(coordinates, zoomLevel, interpolation, maxParallelTiles, $completion) : $super.v10.call(this, coordinates, zoomLevel, interpolation, maxParallelTiles, $completion);
|
|
451
494
|
};
|
|
452
|
-
protoOf(BatchCalculator).
|
|
495
|
+
protoOf(BatchCalculator).w10 = function (path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion) {
|
|
453
496
|
var tmp = new $getElevationsAlongCOROUTINE$(this, path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion);
|
|
454
|
-
tmp.
|
|
455
|
-
tmp.
|
|
456
|
-
return tmp.
|
|
497
|
+
tmp.i7_1 = Unit_instance;
|
|
498
|
+
tmp.j7_1 = null;
|
|
499
|
+
return tmp.o7();
|
|
457
500
|
};
|
|
458
|
-
protoOf(BatchCalculator).
|
|
459
|
-
if (path.
|
|
501
|
+
protoOf(BatchCalculator).r10 = function (path, step, minDistance) {
|
|
502
|
+
if (path.q())
|
|
460
503
|
return emptyList();
|
|
461
|
-
var out = ArrayList_init_$Create$_0(imul(path.
|
|
462
|
-
var anchor = path.
|
|
504
|
+
var out = ArrayList_init_$Create$_0(imul(path.o(), 2));
|
|
505
|
+
var anchor = path.p(0);
|
|
463
506
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
464
507
|
var element = anchor;
|
|
465
|
-
out.
|
|
508
|
+
out.k(element);
|
|
466
509
|
var inductionVariable = 1;
|
|
467
|
-
var last = path.
|
|
510
|
+
var last = path.o();
|
|
468
511
|
if (inductionVariable < last)
|
|
469
512
|
$l$loop: do {
|
|
470
513
|
var i = inductionVariable;
|
|
471
514
|
inductionVariable = inductionVariable + 1 | 0;
|
|
472
|
-
var b = path.
|
|
473
|
-
var d = Distance_instance.
|
|
515
|
+
var b = path.p(i);
|
|
516
|
+
var d = Distance_instance.x10(anchor, b);
|
|
474
517
|
if (d < minDistance)
|
|
475
518
|
continue $l$loop;
|
|
476
|
-
var between = this.
|
|
519
|
+
var between = this.y10(anchor, b, step, d);
|
|
477
520
|
var inductionVariable_0 = 1;
|
|
478
|
-
var last_0 = between.
|
|
521
|
+
var last_0 = between.o();
|
|
479
522
|
if (inductionVariable_0 < last_0)
|
|
480
523
|
do {
|
|
481
524
|
var j = inductionVariable_0;
|
|
482
525
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
483
526
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
484
|
-
var element_0 = between.
|
|
485
|
-
out.
|
|
527
|
+
var element_0 = between.p(j);
|
|
528
|
+
out.k(element_0);
|
|
486
529
|
}
|
|
487
530
|
while (inductionVariable_0 < last_0);
|
|
488
531
|
anchor = b;
|
|
@@ -490,15 +533,15 @@
|
|
|
490
533
|
while (inductionVariable < last);
|
|
491
534
|
return out;
|
|
492
535
|
};
|
|
493
|
-
protoOf(BatchCalculator).
|
|
536
|
+
protoOf(BatchCalculator).y10 = function (a, b, step, distance) {
|
|
494
537
|
if (distance <= step)
|
|
495
538
|
return listOf([a, b]);
|
|
496
539
|
var numSteps = numberToInt(distance / step);
|
|
497
540
|
var out = ArrayList_init_$Create$_0(numSteps + 2 | 0);
|
|
498
541
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
499
|
-
out.
|
|
500
|
-
var latDiff = b.
|
|
501
|
-
var lonDiff = b.
|
|
542
|
+
out.k(a);
|
|
543
|
+
var latDiff = b.gz() - a.gz();
|
|
544
|
+
var lonDiff = b.hz() - a.hz();
|
|
502
545
|
var inductionVariable = 1;
|
|
503
546
|
if (inductionVariable <= numSteps)
|
|
504
547
|
do {
|
|
@@ -506,36 +549,118 @@
|
|
|
506
549
|
inductionVariable = inductionVariable + 1 | 0;
|
|
507
550
|
var f = i * step / distance;
|
|
508
551
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
509
|
-
var element = new LatLon(a.
|
|
510
|
-
out.
|
|
552
|
+
var element = new LatLon(a.gz() + latDiff * f, a.hz() + lonDiff * f);
|
|
553
|
+
out.k(element);
|
|
511
554
|
}
|
|
512
555
|
while (!(i === numSteps));
|
|
513
556
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
514
|
-
out.
|
|
557
|
+
out.k(b);
|
|
515
558
|
return out;
|
|
516
559
|
};
|
|
560
|
+
var static_init_called;
|
|
561
|
+
function static_init() {
|
|
562
|
+
if (static_init_called)
|
|
563
|
+
return Unit_instance;
|
|
564
|
+
static_init_called = true;
|
|
565
|
+
TileEncoding_TERRARIUM_instance = new TileEncoding('TERRARIUM', 0);
|
|
566
|
+
TileEncoding_BIL32_instance = new TileEncoding('BIL32', 1);
|
|
567
|
+
}
|
|
568
|
+
var TileEncoding_TERRARIUM_instance;
|
|
569
|
+
var TileEncoding_BIL32_instance;
|
|
570
|
+
function TileEncoding(name, ordinal) {
|
|
571
|
+
Enum.call(this, name, ordinal);
|
|
572
|
+
}
|
|
573
|
+
function decodeBil32Tile(bytes, tileSize, sourceUrl) {
|
|
574
|
+
sourceUrl = sourceUrl === VOID ? '' : sourceUrl;
|
|
575
|
+
var samples = imul(tileSize, tileSize);
|
|
576
|
+
// Inline function 'kotlin.check' call
|
|
577
|
+
if (!(bytes.length === imul(samples, 4))) {
|
|
578
|
+
// Inline function 'kotlin.text.ifEmpty' call
|
|
579
|
+
var tmp;
|
|
580
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
581
|
+
if (charSequenceLength(sourceUrl) === 0) {
|
|
582
|
+
tmp = '(no url)';
|
|
583
|
+
} else {
|
|
584
|
+
tmp = sourceUrl;
|
|
585
|
+
}
|
|
586
|
+
var tmp_0 = 'BIL32 tile ' + tmp + ' is ' + bytes.length + ' bytes, expected ' + ('' + imul(samples, 4) + ' for ' + tileSize + ' \xD7 ' + tileSize + ' float32 samples');
|
|
587
|
+
var tmp_1;
|
|
588
|
+
var tmp_2;
|
|
589
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
590
|
+
// Inline function 'kotlin.collections.isEmpty' call
|
|
591
|
+
if (!(bytes.length === 0)) {
|
|
592
|
+
var tmp_3 = bytes[0];
|
|
593
|
+
// Inline function 'kotlin.code' call
|
|
594
|
+
var this_0 = _Char___init__impl__6a9atx(60);
|
|
595
|
+
var tmp$ret$7 = Char__toInt_impl_vasixd(this_0);
|
|
596
|
+
tmp_2 = tmp_3 === toByte(tmp$ret$7);
|
|
597
|
+
} else {
|
|
598
|
+
tmp_2 = false;
|
|
599
|
+
}
|
|
600
|
+
if (tmp_2) {
|
|
601
|
+
tmp_1 = ' \u2014 the body looks like an XML error page';
|
|
602
|
+
} else {
|
|
603
|
+
tmp_1 = '';
|
|
604
|
+
}
|
|
605
|
+
var message = tmp_0 + tmp_1;
|
|
606
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
607
|
+
}
|
|
608
|
+
var rgba = new Int8Array(imul(samples, 4));
|
|
609
|
+
var inductionVariable = 0;
|
|
610
|
+
if (inductionVariable < samples)
|
|
611
|
+
$l$loop: do {
|
|
612
|
+
var i = inductionVariable;
|
|
613
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
614
|
+
var o = imul(i, 4);
|
|
615
|
+
var bits = bytes[o] & 255 | (bytes[o + 1 | 0] & 255) << 8 | (bytes[o + 2 | 0] & 255) << 16 | (bytes[o + 3 | 0] & 255) << 24;
|
|
616
|
+
// Inline function 'kotlin.fromBits' call
|
|
617
|
+
var value = floatFromBits(bits);
|
|
618
|
+
if (isNaN_0(value) || value <= -9000.0) {
|
|
619
|
+
rgba[o + 3 | 0] = -1;
|
|
620
|
+
continue $l$loop;
|
|
621
|
+
}
|
|
622
|
+
var packed = encodeTerrarium(value);
|
|
623
|
+
rgba[o] = toByte(packed >> 16);
|
|
624
|
+
rgba[o + 1 | 0] = toByte(packed >> 8);
|
|
625
|
+
rgba[o + 2 | 0] = toByte(packed);
|
|
626
|
+
rgba[o + 3 | 0] = -1;
|
|
627
|
+
}
|
|
628
|
+
while (inductionVariable < samples);
|
|
629
|
+
return new RawTile(tileSize, tileSize, rgba);
|
|
630
|
+
}
|
|
631
|
+
function encodeTerrarium(metres) {
|
|
632
|
+
return convertToInt(coerceIn(roundToLong((metres + 32768.0) * 256.0), new Long(1, 0), new Long(16777215, 0)));
|
|
633
|
+
}
|
|
634
|
+
function TileEncoding_TERRARIUM_getInstance() {
|
|
635
|
+
static_init();
|
|
636
|
+
return TileEncoding_TERRARIUM_instance;
|
|
637
|
+
}
|
|
638
|
+
function TileEncoding_BIL32_getInstance() {
|
|
639
|
+
static_init();
|
|
640
|
+
return TileEncoding_BIL32_instance;
|
|
641
|
+
}
|
|
517
642
|
function LatLon(latitude, longitude, elevation) {
|
|
518
643
|
elevation = elevation === VOID ? null : elevation;
|
|
519
|
-
this.
|
|
520
|
-
this.
|
|
521
|
-
this.
|
|
644
|
+
this.z10_1 = latitude;
|
|
645
|
+
this.a11_1 = longitude;
|
|
646
|
+
this.b11_1 = elevation;
|
|
522
647
|
}
|
|
523
|
-
protoOf(LatLon).
|
|
524
|
-
return this.
|
|
648
|
+
protoOf(LatLon).gz = function () {
|
|
649
|
+
return this.z10_1;
|
|
525
650
|
};
|
|
526
|
-
protoOf(LatLon).
|
|
527
|
-
return this.
|
|
651
|
+
protoOf(LatLon).hz = function () {
|
|
652
|
+
return this.a11_1;
|
|
528
653
|
};
|
|
529
|
-
protoOf(LatLon).
|
|
530
|
-
return this.
|
|
654
|
+
protoOf(LatLon).c11 = function () {
|
|
655
|
+
return this.b11_1;
|
|
531
656
|
};
|
|
532
657
|
protoOf(LatLon).toString = function () {
|
|
533
|
-
return 'LatLon(latitude=' + this.
|
|
658
|
+
return 'LatLon(latitude=' + this.z10_1 + ', longitude=' + this.a11_1 + ', elevation=' + this.b11_1 + ')';
|
|
534
659
|
};
|
|
535
660
|
protoOf(LatLon).hashCode = function () {
|
|
536
|
-
var result = getNumberHashCode(this.
|
|
537
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
538
|
-
result = imul(result, 31) + (this.
|
|
661
|
+
var result = getNumberHashCode(this.z10_1);
|
|
662
|
+
result = imul(result, 31) + getNumberHashCode(this.a11_1) | 0;
|
|
663
|
+
result = imul(result, 31) + (this.b11_1 == null ? 0 : getNumberHashCode(this.b11_1)) | 0;
|
|
539
664
|
return result;
|
|
540
665
|
};
|
|
541
666
|
protoOf(LatLon).equals = function (other) {
|
|
@@ -543,35 +668,37 @@
|
|
|
543
668
|
return true;
|
|
544
669
|
if (!(other instanceof LatLon))
|
|
545
670
|
return false;
|
|
546
|
-
if (!equals(this.
|
|
671
|
+
if (!equals(this.z10_1, other.z10_1))
|
|
547
672
|
return false;
|
|
548
|
-
if (!equals(this.
|
|
673
|
+
if (!equals(this.a11_1, other.a11_1))
|
|
549
674
|
return false;
|
|
550
|
-
if (!equals(this.
|
|
675
|
+
if (!equals(this.b11_1, other.b11_1))
|
|
551
676
|
return false;
|
|
552
677
|
return true;
|
|
553
678
|
};
|
|
679
|
+
function Coordinates() {
|
|
680
|
+
}
|
|
554
681
|
function LatLonElevation(latitude, longitude, elevation) {
|
|
555
|
-
this.
|
|
556
|
-
this.
|
|
557
|
-
this.
|
|
682
|
+
this.d11_1 = latitude;
|
|
683
|
+
this.e11_1 = longitude;
|
|
684
|
+
this.f11_1 = elevation;
|
|
558
685
|
}
|
|
559
|
-
protoOf(LatLonElevation).
|
|
560
|
-
return this.
|
|
686
|
+
protoOf(LatLonElevation).gz = function () {
|
|
687
|
+
return this.d11_1;
|
|
561
688
|
};
|
|
562
|
-
protoOf(LatLonElevation).
|
|
563
|
-
return this.
|
|
689
|
+
protoOf(LatLonElevation).hz = function () {
|
|
690
|
+
return this.e11_1;
|
|
564
691
|
};
|
|
565
|
-
protoOf(LatLonElevation).
|
|
566
|
-
return this.
|
|
692
|
+
protoOf(LatLonElevation).c11 = function () {
|
|
693
|
+
return this.f11_1;
|
|
567
694
|
};
|
|
568
695
|
protoOf(LatLonElevation).toString = function () {
|
|
569
|
-
return 'LatLonElevation(latitude=' + this.
|
|
696
|
+
return 'LatLonElevation(latitude=' + this.d11_1 + ', longitude=' + this.e11_1 + ', elevation=' + this.f11_1 + ')';
|
|
570
697
|
};
|
|
571
698
|
protoOf(LatLonElevation).hashCode = function () {
|
|
572
|
-
var result = getNumberHashCode(this.
|
|
573
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
574
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
699
|
+
var result = getNumberHashCode(this.d11_1);
|
|
700
|
+
result = imul(result, 31) + getNumberHashCode(this.e11_1) | 0;
|
|
701
|
+
result = imul(result, 31) + getNumberHashCode(this.f11_1) | 0;
|
|
575
702
|
return result;
|
|
576
703
|
};
|
|
577
704
|
protoOf(LatLonElevation).equals = function (other) {
|
|
@@ -579,21 +706,21 @@
|
|
|
579
706
|
return true;
|
|
580
707
|
if (!(other instanceof LatLonElevation))
|
|
581
708
|
return false;
|
|
582
|
-
if (!equals(this.
|
|
709
|
+
if (!equals(this.d11_1, other.d11_1))
|
|
583
710
|
return false;
|
|
584
|
-
if (!equals(this.
|
|
711
|
+
if (!equals(this.e11_1, other.e11_1))
|
|
585
712
|
return false;
|
|
586
|
-
if (!equals(this.
|
|
713
|
+
if (!equals(this.f11_1, other.f11_1))
|
|
587
714
|
return false;
|
|
588
715
|
return true;
|
|
589
716
|
};
|
|
590
717
|
function Distance() {
|
|
591
718
|
}
|
|
592
|
-
protoOf(Distance).
|
|
593
|
-
var lat1Rad = coord1.
|
|
594
|
-
var lat2Rad = coord2.
|
|
595
|
-
var deltaLat = (coord2.
|
|
596
|
-
var deltaLon = (coord2.
|
|
719
|
+
protoOf(Distance).x10 = function (coord1, coord2) {
|
|
720
|
+
var lat1Rad = coord1.gz() * 0.017453292519943295;
|
|
721
|
+
var lat2Rad = coord2.gz() * 0.017453292519943295;
|
|
722
|
+
var deltaLat = (coord2.gz() - coord1.gz()) * 0.017453292519943295;
|
|
723
|
+
var deltaLon = (coord2.hz() - coord1.hz()) * 0.017453292519943295;
|
|
597
724
|
// Inline function 'kotlin.math.sin' call
|
|
598
725
|
var x = deltaLat / 2.0;
|
|
599
726
|
var sinHalfLat = Math.sin(x);
|
|
@@ -605,7 +732,7 @@
|
|
|
605
732
|
var tmp_0 = Math.cos(lat1Rad);
|
|
606
733
|
// Inline function 'kotlin.math.cos' call
|
|
607
734
|
var a = tmp + tmp_0 * Math.cos(lat2Rad) * sinHalfLon * sinHalfLon;
|
|
608
|
-
var ac =
|
|
735
|
+
var ac = coerceIn_0(a, 0.0, 1.0);
|
|
609
736
|
// Inline function 'kotlin.math.sqrt' call
|
|
610
737
|
var tmp0 = Math.sqrt(ac);
|
|
611
738
|
// Inline function 'kotlin.math.sqrt' call
|
|
@@ -615,19 +742,19 @@
|
|
|
615
742
|
var c = 2.0 * Math.atan2(tmp0, x_2);
|
|
616
743
|
return 6371000.0 * c;
|
|
617
744
|
};
|
|
618
|
-
protoOf(Distance).
|
|
619
|
-
if (points.
|
|
745
|
+
protoOf(Distance).g11 = function (points) {
|
|
746
|
+
if (points.q()) {
|
|
620
747
|
// Inline function 'kotlin.doubleArrayOf' call
|
|
621
748
|
return new Float64Array([0.0]);
|
|
622
749
|
}
|
|
623
|
-
var out = new Float64Array(points.
|
|
750
|
+
var out = new Float64Array(points.o());
|
|
624
751
|
var inductionVariable = 1;
|
|
625
|
-
var last = points.
|
|
752
|
+
var last = points.o();
|
|
626
753
|
if (inductionVariable < last)
|
|
627
754
|
do {
|
|
628
755
|
var i = inductionVariable;
|
|
629
756
|
inductionVariable = inductionVariable + 1 | 0;
|
|
630
|
-
out[i] = out[i - 1 | 0] + this.
|
|
757
|
+
out[i] = out[i - 1 | 0] + this.x10(points.p(i - 1 | 0), points.p(i));
|
|
631
758
|
}
|
|
632
759
|
while (inductionVariable < last);
|
|
633
760
|
return out;
|
|
@@ -637,8 +764,8 @@
|
|
|
637
764
|
return Distance_instance;
|
|
638
765
|
}
|
|
639
766
|
function simplifyRecursive($this, points, firstIndex, lastIndex, tolerance, out) {
|
|
640
|
-
var first = points.
|
|
641
|
-
var last = points.
|
|
767
|
+
var first = points.p(firstIndex);
|
|
768
|
+
var last = points.p(lastIndex);
|
|
642
769
|
var maxDistance = 0.0;
|
|
643
770
|
var maxIndex = -1;
|
|
644
771
|
var inductionVariable = firstIndex + 1 | 0;
|
|
@@ -646,7 +773,7 @@
|
|
|
646
773
|
do {
|
|
647
774
|
var i = inductionVariable;
|
|
648
775
|
inductionVariable = inductionVariable + 1 | 0;
|
|
649
|
-
var d = points.
|
|
776
|
+
var d = points.p(i).k11(first, last);
|
|
650
777
|
if (d > maxDistance) {
|
|
651
778
|
maxDistance = d;
|
|
652
779
|
maxIndex = i;
|
|
@@ -657,7 +784,7 @@
|
|
|
657
784
|
if ((maxIndex - firstIndex | 0) > 1) {
|
|
658
785
|
simplifyRecursive($this, points, firstIndex, maxIndex, tolerance, out);
|
|
659
786
|
}
|
|
660
|
-
out.
|
|
787
|
+
out.k(maxIndex);
|
|
661
788
|
if ((lastIndex - maxIndex | 0) > 1) {
|
|
662
789
|
simplifyRecursive($this, points, maxIndex, lastIndex, tolerance, out);
|
|
663
790
|
}
|
|
@@ -665,45 +792,45 @@
|
|
|
665
792
|
}
|
|
666
793
|
function DouglasPeucker() {
|
|
667
794
|
}
|
|
668
|
-
protoOf(DouglasPeucker).
|
|
669
|
-
if (points.
|
|
795
|
+
protoOf(DouglasPeucker).u10 = function (points, tolerance, zExaggeration) {
|
|
796
|
+
if (points.o() <= 2)
|
|
670
797
|
return toList_0(points);
|
|
671
798
|
// Inline function 'kotlin.collections.map' call
|
|
672
799
|
// Inline function 'kotlin.collections.mapTo' call
|
|
673
800
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(points, 10));
|
|
674
|
-
var _iterator__ex2g4s = points.
|
|
675
|
-
while (_iterator__ex2g4s.
|
|
676
|
-
var item = _iterator__ex2g4s.
|
|
677
|
-
var tmp$ret$2 = EcefConverter_instance.
|
|
678
|
-
destination.
|
|
801
|
+
var _iterator__ex2g4s = points.l();
|
|
802
|
+
while (_iterator__ex2g4s.m()) {
|
|
803
|
+
var item = _iterator__ex2g4s.n();
|
|
804
|
+
var tmp$ret$2 = EcefConverter_instance.l11(item, zExaggeration);
|
|
805
|
+
destination.k(tmp$ret$2);
|
|
679
806
|
}
|
|
680
807
|
var ecef = destination;
|
|
681
808
|
// Inline function 'kotlin.collections.map' call
|
|
682
|
-
var this_0 = this.
|
|
809
|
+
var this_0 = this.m11(ecef, tolerance);
|
|
683
810
|
// Inline function 'kotlin.collections.mapTo' call
|
|
684
811
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
685
|
-
var _iterator__ex2g4s_0 = this_0.
|
|
686
|
-
while (_iterator__ex2g4s_0.
|
|
687
|
-
var item_0 = _iterator__ex2g4s_0.
|
|
688
|
-
var tmp$ret$5 = points.
|
|
689
|
-
destination_0.
|
|
812
|
+
var _iterator__ex2g4s_0 = this_0.l();
|
|
813
|
+
while (_iterator__ex2g4s_0.m()) {
|
|
814
|
+
var item_0 = _iterator__ex2g4s_0.n();
|
|
815
|
+
var tmp$ret$5 = points.p(item_0);
|
|
816
|
+
destination_0.k(tmp$ret$5);
|
|
690
817
|
}
|
|
691
818
|
return destination_0;
|
|
692
819
|
};
|
|
693
|
-
protoOf(DouglasPeucker).
|
|
694
|
-
if (points.
|
|
820
|
+
protoOf(DouglasPeucker).m11 = function (points, tolerance) {
|
|
821
|
+
if (points.o() <= 2)
|
|
695
822
|
return toList_0(get_indices(points));
|
|
696
823
|
var lastIndex = get_lastIndex(points);
|
|
697
824
|
// Inline function 'kotlin.collections.buildList' call
|
|
698
825
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
699
|
-
var capacity = points.
|
|
826
|
+
var capacity = points.o();
|
|
700
827
|
checkBuilderCapacity(capacity);
|
|
701
828
|
// Inline function 'kotlin.apply' call
|
|
702
829
|
var this_0 = ArrayList_init_$Create$_0(capacity);
|
|
703
|
-
this_0.
|
|
830
|
+
this_0.k(0);
|
|
704
831
|
simplifyRecursive(DouglasPeucker_instance, points, 0, lastIndex, tolerance, this_0);
|
|
705
|
-
this_0.
|
|
706
|
-
return this_0.
|
|
832
|
+
this_0.k(lastIndex);
|
|
833
|
+
return this_0.b4();
|
|
707
834
|
};
|
|
708
835
|
var DouglasPeucker_instance;
|
|
709
836
|
function DouglasPeucker_getInstance() {
|
|
@@ -711,10 +838,10 @@
|
|
|
711
838
|
}
|
|
712
839
|
function EcefConverter() {
|
|
713
840
|
}
|
|
714
|
-
protoOf(EcefConverter).
|
|
715
|
-
var latRad = coordinates.
|
|
716
|
-
var lonRad = coordinates.
|
|
717
|
-
var tmp0_elvis_lhs = coordinates.
|
|
841
|
+
protoOf(EcefConverter).l11 = function (coordinates, zExaggeration) {
|
|
842
|
+
var latRad = coordinates.gz() * 0.017453292519943295;
|
|
843
|
+
var lonRad = coordinates.hz() * 0.017453292519943295;
|
|
844
|
+
var tmp0_elvis_lhs = coordinates.c11();
|
|
718
845
|
var elevationExaggerated = zExaggeration * (tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs);
|
|
719
846
|
// Inline function 'kotlin.math.sin' call
|
|
720
847
|
var sinLat = Math.sin(latRad);
|
|
@@ -738,43 +865,43 @@
|
|
|
738
865
|
}
|
|
739
866
|
function getInterpolatedElevation($this, coords, zoomLevel, $completion) {
|
|
740
867
|
var tmp = new $getInterpolatedElevationCOROUTINE$($this, coords, zoomLevel, $completion);
|
|
741
|
-
tmp.
|
|
742
|
-
tmp.
|
|
743
|
-
return tmp.
|
|
868
|
+
tmp.i7_1 = Unit_instance;
|
|
869
|
+
tmp.j7_1 = null;
|
|
870
|
+
return tmp.o7();
|
|
744
871
|
}
|
|
745
872
|
function elevationFromPixel($this, pixel, $completion) {
|
|
746
873
|
var tmp = new $elevationFromPixelCOROUTINE$($this, pixel, $completion);
|
|
747
|
-
tmp.
|
|
748
|
-
tmp.
|
|
749
|
-
return tmp.
|
|
874
|
+
tmp.i7_1 = Unit_instance;
|
|
875
|
+
tmp.j7_1 = null;
|
|
876
|
+
return tmp.o7();
|
|
750
877
|
}
|
|
751
878
|
function $getElevationCOROUTINE$(_this__u8e3s4, coords, zoomLevel, interpolation, resultContinuation) {
|
|
752
879
|
CoroutineImpl.call(this, resultContinuation);
|
|
753
|
-
this.
|
|
754
|
-
this.
|
|
755
|
-
this.
|
|
756
|
-
this.
|
|
880
|
+
this.a13_1 = _this__u8e3s4;
|
|
881
|
+
this.b13_1 = coords;
|
|
882
|
+
this.c13_1 = zoomLevel;
|
|
883
|
+
this.d13_1 = interpolation;
|
|
757
884
|
}
|
|
758
|
-
protoOf($getElevationCOROUTINE$).
|
|
759
|
-
var suspendResult = this.
|
|
885
|
+
protoOf($getElevationCOROUTINE$).o7 = function () {
|
|
886
|
+
var suspendResult = this.i7_1;
|
|
760
887
|
$sm: do
|
|
761
888
|
try {
|
|
762
|
-
var tmp = this.
|
|
889
|
+
var tmp = this.g7_1;
|
|
763
890
|
switch (tmp) {
|
|
764
891
|
case 0:
|
|
765
|
-
this.
|
|
766
|
-
this.
|
|
767
|
-
if (this.
|
|
768
|
-
this.
|
|
769
|
-
suspendResult = getInterpolatedElevation(this.
|
|
892
|
+
this.h7_1 = 8;
|
|
893
|
+
this.h7_1 = 4;
|
|
894
|
+
if (this.d13_1) {
|
|
895
|
+
this.g7_1 = 2;
|
|
896
|
+
suspendResult = getInterpolatedElevation(this.a13_1, this.b13_1, this.c13_1, this);
|
|
770
897
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
771
898
|
return suspendResult;
|
|
772
899
|
}
|
|
773
900
|
continue $sm;
|
|
774
901
|
} else {
|
|
775
|
-
var pixel = ElevationFunctions_instance.
|
|
776
|
-
this.
|
|
777
|
-
suspendResult = elevationFromPixel(this.
|
|
902
|
+
var pixel = ElevationFunctions_instance.h13(this.b13_1, this.c13_1, this.a13_1.dz_1);
|
|
903
|
+
this.g7_1 = 1;
|
|
904
|
+
suspendResult = elevationFromPixel(this.a13_1, pixel, this);
|
|
778
905
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
779
906
|
return suspendResult;
|
|
780
907
|
}
|
|
@@ -782,100 +909,123 @@
|
|
|
782
909
|
}
|
|
783
910
|
|
|
784
911
|
case 1:
|
|
785
|
-
this.
|
|
786
|
-
this.
|
|
912
|
+
this.g13_1 = suspendResult;
|
|
913
|
+
this.g7_1 = 3;
|
|
787
914
|
continue $sm;
|
|
788
915
|
case 2:
|
|
789
|
-
this.
|
|
790
|
-
this.
|
|
916
|
+
this.g13_1 = suspendResult;
|
|
917
|
+
this.g7_1 = 3;
|
|
791
918
|
continue $sm;
|
|
792
919
|
case 3:
|
|
793
|
-
this.
|
|
794
|
-
this.
|
|
795
|
-
this.
|
|
920
|
+
this.f13_1 = this.g13_1;
|
|
921
|
+
this.h7_1 = 8;
|
|
922
|
+
this.g7_1 = 5;
|
|
796
923
|
continue $sm;
|
|
797
924
|
case 4:
|
|
798
|
-
this.
|
|
799
|
-
var tmp_0 = this.
|
|
925
|
+
this.h7_1 = 8;
|
|
926
|
+
var tmp_0 = this.j7_1;
|
|
800
927
|
if (tmp_0 instanceof Error) {
|
|
801
|
-
var t = this.
|
|
928
|
+
var t = this.j7_1;
|
|
802
929
|
var tmp_1 = this;
|
|
803
|
-
throw IllegalStateException_init_$Create$('Failed to get elevation: ' + t.message, t);
|
|
930
|
+
throw IllegalStateException_init_$Create$_0('Failed to get elevation: ' + t.message, t);
|
|
804
931
|
} else {
|
|
805
|
-
throw this.
|
|
932
|
+
throw this.j7_1;
|
|
806
933
|
}
|
|
807
934
|
|
|
808
935
|
case 5:
|
|
809
|
-
|
|
936
|
+
this.h7_1 = 8;
|
|
937
|
+
var own = this.f13_1;
|
|
938
|
+
if (!isNaN_0(own))
|
|
939
|
+
return own;
|
|
940
|
+
var tmp0_safe_receiver = this.a13_1.ez_1;
|
|
941
|
+
if (tmp0_safe_receiver == null) {
|
|
942
|
+
this.e13_1 = null;
|
|
943
|
+
this.g7_1 = 7;
|
|
944
|
+
continue $sm;
|
|
945
|
+
} else {
|
|
946
|
+
this.g7_1 = 6;
|
|
947
|
+
suspendResult = tmp0_safe_receiver(this.b13_1, this.d13_1, this);
|
|
948
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
949
|
+
return suspendResult;
|
|
950
|
+
}
|
|
951
|
+
continue $sm;
|
|
952
|
+
}
|
|
953
|
+
|
|
810
954
|
case 6:
|
|
811
|
-
this.
|
|
812
|
-
|
|
955
|
+
this.e13_1 = suspendResult;
|
|
956
|
+
this.g7_1 = 7;
|
|
957
|
+
continue $sm;
|
|
958
|
+
case 7:
|
|
959
|
+
var tmp1_elvis_lhs = this.e13_1;
|
|
960
|
+
return tmp1_elvis_lhs == null ? 0.0 : tmp1_elvis_lhs;
|
|
961
|
+
case 8:
|
|
962
|
+
throw this.j7_1;
|
|
813
963
|
}
|
|
814
964
|
} catch ($p) {
|
|
815
965
|
var e = $p;
|
|
816
|
-
if (this.
|
|
966
|
+
if (this.h7_1 === 8) {
|
|
817
967
|
throw e;
|
|
818
968
|
} else {
|
|
819
|
-
this.
|
|
820
|
-
this.
|
|
969
|
+
this.g7_1 = this.h7_1;
|
|
970
|
+
this.j7_1 = e;
|
|
821
971
|
}
|
|
822
972
|
}
|
|
823
973
|
while (true);
|
|
824
974
|
};
|
|
825
975
|
function $getInterpolatedElevationCOROUTINE$(_this__u8e3s4, coords, zoomLevel, resultContinuation) {
|
|
826
976
|
CoroutineImpl.call(this, resultContinuation);
|
|
827
|
-
this.
|
|
828
|
-
this.
|
|
829
|
-
this.
|
|
977
|
+
this.v11_1 = _this__u8e3s4;
|
|
978
|
+
this.w11_1 = coords;
|
|
979
|
+
this.x11_1 = zoomLevel;
|
|
830
980
|
}
|
|
831
|
-
protoOf($getInterpolatedElevationCOROUTINE$).
|
|
832
|
-
var suspendResult = this.
|
|
981
|
+
protoOf($getInterpolatedElevationCOROUTINE$).o7 = function () {
|
|
982
|
+
var suspendResult = this.i7_1;
|
|
833
983
|
$sm: do
|
|
834
984
|
try {
|
|
835
|
-
var tmp = this.
|
|
985
|
+
var tmp = this.g7_1;
|
|
836
986
|
switch (tmp) {
|
|
837
987
|
case 0:
|
|
838
|
-
this.
|
|
839
|
-
this.
|
|
988
|
+
this.h7_1 = 5;
|
|
989
|
+
this.f12_1 = ElevationFunctions_instance.i13(this.w11_1, this.x11_1, this.v11_1.dz_1);
|
|
990
|
+
var fx = this.f12_1.k13_1 - 0.5;
|
|
991
|
+
var fy = this.f12_1.l13_1 - 0.5;
|
|
840
992
|
var tmp_0 = this;
|
|
841
|
-
|
|
842
|
-
tmp_0.x0i8__1 = numberToInt(Math.floor(x));
|
|
993
|
+
tmp_0.g12_1 = numberToInt(Math.floor(fx));
|
|
843
994
|
var tmp_1 = this;
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
this.
|
|
847
|
-
this.
|
|
848
|
-
this.
|
|
849
|
-
this.
|
|
850
|
-
this.
|
|
851
|
-
suspendResult = elevationFromPixel(this._this__u8e3s4__1, ElevationFunctions_instance.normalizePixel_364azo_k$(new Pixel(this.pf7__1.tile_1, this.x0i8__1, this.y0i9__1), this._this__u8e3s4__1.tileSize_1), this);
|
|
995
|
+
tmp_1.h12_1 = numberToInt(Math.floor(fy));
|
|
996
|
+
this.e12_1 = this.g12_1 + 1 | 0;
|
|
997
|
+
this.d12_1 = this.h12_1 + 1 | 0;
|
|
998
|
+
this.z11_1 = fx - this.g12_1;
|
|
999
|
+
this.y11_1 = fy - this.h12_1;
|
|
1000
|
+
this.g7_1 = 1;
|
|
1001
|
+
suspendResult = elevationFromPixel(this.v11_1, ElevationFunctions_instance.m13(new Pixel(this.f12_1.j13_1, this.g12_1, this.h12_1), this.v11_1.dz_1), this);
|
|
852
1002
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
853
1003
|
return suspendResult;
|
|
854
1004
|
}
|
|
855
1005
|
|
|
856
1006
|
continue $sm;
|
|
857
1007
|
case 1:
|
|
858
|
-
this.
|
|
859
|
-
this.
|
|
860
|
-
suspendResult = elevationFromPixel(this.
|
|
1008
|
+
this.c12_1 = suspendResult;
|
|
1009
|
+
this.g7_1 = 2;
|
|
1010
|
+
suspendResult = elevationFromPixel(this.v11_1, ElevationFunctions_instance.m13(new Pixel(this.f12_1.j13_1, this.e12_1, this.h12_1), this.v11_1.dz_1), this);
|
|
861
1011
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
862
1012
|
return suspendResult;
|
|
863
1013
|
}
|
|
864
1014
|
|
|
865
1015
|
continue $sm;
|
|
866
1016
|
case 2:
|
|
867
|
-
this.
|
|
868
|
-
this.
|
|
869
|
-
suspendResult = elevationFromPixel(this.
|
|
1017
|
+
this.b12_1 = suspendResult;
|
|
1018
|
+
this.g7_1 = 3;
|
|
1019
|
+
suspendResult = elevationFromPixel(this.v11_1, ElevationFunctions_instance.m13(new Pixel(this.f12_1.j13_1, this.g12_1, this.d12_1), this.v11_1.dz_1), this);
|
|
870
1020
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
871
1021
|
return suspendResult;
|
|
872
1022
|
}
|
|
873
1023
|
|
|
874
1024
|
continue $sm;
|
|
875
1025
|
case 3:
|
|
876
|
-
this.
|
|
877
|
-
this.
|
|
878
|
-
suspendResult = elevationFromPixel(this.
|
|
1026
|
+
this.a12_1 = suspendResult;
|
|
1027
|
+
this.g7_1 = 4;
|
|
1028
|
+
suspendResult = elevationFromPixel(this.v11_1, ElevationFunctions_instance.m13(new Pixel(this.f12_1.j13_1, this.e12_1, this.d12_1), this.v11_1.dz_1), this);
|
|
879
1029
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
880
1030
|
return suspendResult;
|
|
881
1031
|
}
|
|
@@ -883,69 +1033,71 @@
|
|
|
883
1033
|
continue $sm;
|
|
884
1034
|
case 4:
|
|
885
1035
|
var p11 = suspendResult;
|
|
886
|
-
var top = this.
|
|
887
|
-
var bottom = this.
|
|
888
|
-
return top * (1.0 - this.
|
|
1036
|
+
var top = this.c12_1 * (1.0 - this.z11_1) + this.b12_1 * this.z11_1;
|
|
1037
|
+
var bottom = this.a12_1 * (1.0 - this.z11_1) + p11 * this.z11_1;
|
|
1038
|
+
return top * (1.0 - this.y11_1) + bottom * this.y11_1;
|
|
889
1039
|
case 5:
|
|
890
|
-
throw this.
|
|
1040
|
+
throw this.j7_1;
|
|
891
1041
|
}
|
|
892
1042
|
} catch ($p) {
|
|
893
1043
|
var e = $p;
|
|
894
|
-
if (this.
|
|
1044
|
+
if (this.h7_1 === 5) {
|
|
895
1045
|
throw e;
|
|
896
1046
|
} else {
|
|
897
|
-
this.
|
|
898
|
-
this.
|
|
1047
|
+
this.g7_1 = this.h7_1;
|
|
1048
|
+
this.j7_1 = e;
|
|
899
1049
|
}
|
|
900
1050
|
}
|
|
901
1051
|
while (true);
|
|
902
1052
|
};
|
|
903
1053
|
function $elevationFromPixelCOROUTINE$(_this__u8e3s4, pixel, resultContinuation) {
|
|
904
1054
|
CoroutineImpl.call(this, resultContinuation);
|
|
905
|
-
this.
|
|
906
|
-
this.
|
|
1055
|
+
this.q12_1 = _this__u8e3s4;
|
|
1056
|
+
this.r12_1 = pixel;
|
|
907
1057
|
}
|
|
908
|
-
protoOf($elevationFromPixelCOROUTINE$).
|
|
909
|
-
var suspendResult = this.
|
|
1058
|
+
protoOf($elevationFromPixelCOROUTINE$).o7 = function () {
|
|
1059
|
+
var suspendResult = this.i7_1;
|
|
910
1060
|
$sm: do
|
|
911
1061
|
try {
|
|
912
|
-
var tmp = this.
|
|
1062
|
+
var tmp = this.g7_1;
|
|
913
1063
|
switch (tmp) {
|
|
914
1064
|
case 0:
|
|
915
|
-
this.
|
|
916
|
-
this.
|
|
917
|
-
suspendResult = this.
|
|
1065
|
+
this.h7_1 = 2;
|
|
1066
|
+
this.g7_1 = 1;
|
|
1067
|
+
suspendResult = this.q12_1.cz_1.t13(this.r12_1.n13_1, this);
|
|
918
1068
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
919
1069
|
return suspendResult;
|
|
920
1070
|
}
|
|
921
1071
|
|
|
922
1072
|
continue $sm;
|
|
923
1073
|
case 1:
|
|
924
|
-
return suspendResult.
|
|
1074
|
+
return suspendResult.z13(this.r12_1);
|
|
925
1075
|
case 2:
|
|
926
|
-
throw this.
|
|
1076
|
+
throw this.j7_1;
|
|
927
1077
|
}
|
|
928
1078
|
} catch ($p) {
|
|
929
1079
|
var e = $p;
|
|
930
|
-
if (this.
|
|
1080
|
+
if (this.h7_1 === 2) {
|
|
931
1081
|
throw e;
|
|
932
1082
|
} else {
|
|
933
|
-
this.
|
|
934
|
-
this.
|
|
1083
|
+
this.g7_1 = this.h7_1;
|
|
1084
|
+
this.j7_1 = e;
|
|
935
1085
|
}
|
|
936
1086
|
}
|
|
937
1087
|
while (true);
|
|
938
1088
|
};
|
|
939
|
-
function ElevationCalculator(tileManager, tileSize) {
|
|
1089
|
+
function ElevationCalculator(tileManager, tileSize, fallback) {
|
|
940
1090
|
tileSize = tileSize === VOID ? 256 : tileSize;
|
|
941
|
-
|
|
942
|
-
this.
|
|
1091
|
+
fallback = fallback === VOID ? null : fallback;
|
|
1092
|
+
this.cz_1 = tileManager;
|
|
1093
|
+
this.dz_1 = tileSize;
|
|
1094
|
+
this.ez_1 = fallback;
|
|
943
1095
|
}
|
|
944
|
-
protoOf(ElevationCalculator).
|
|
1096
|
+
protoOf(ElevationCalculator).fz = function (coords, zoomLevel, interpolation, $completion) {
|
|
945
1097
|
var tmp = new $getElevationCOROUTINE$(this, coords, zoomLevel, interpolation, $completion);
|
|
946
|
-
tmp.
|
|
947
|
-
tmp.
|
|
948
|
-
return tmp.
|
|
1098
|
+
tmp.i7_1 = Unit_instance;
|
|
1099
|
+
tmp.j7_1 = null;
|
|
1100
|
+
return tmp.o7();
|
|
949
1101
|
};
|
|
950
1102
|
function formatNumber_0($this, d) {
|
|
951
1103
|
var asLong = numberToLong(d);
|
|
@@ -953,24 +1105,24 @@
|
|
|
953
1105
|
}
|
|
954
1106
|
function ElevationFunctions() {
|
|
955
1107
|
}
|
|
956
|
-
protoOf(ElevationFunctions).
|
|
1108
|
+
protoOf(ElevationFunctions).a14 = function (degrees) {
|
|
957
1109
|
return degrees * 0.017453292519943295;
|
|
958
1110
|
};
|
|
959
|
-
protoOf(ElevationFunctions).
|
|
1111
|
+
protoOf(ElevationFunctions).b14 = function (lat) {
|
|
960
1112
|
return lat >= -85.0511 && lat <= 85.0511;
|
|
961
1113
|
};
|
|
962
|
-
protoOf(ElevationFunctions).
|
|
1114
|
+
protoOf(ElevationFunctions).c14 = function (lon) {
|
|
963
1115
|
return -180.0 <= lon ? lon <= 180.0 : false;
|
|
964
1116
|
};
|
|
965
|
-
protoOf(ElevationFunctions).
|
|
1117
|
+
protoOf(ElevationFunctions).d14 = function (zoom) {
|
|
966
1118
|
return 0 <= zoom ? zoom <= 15 : false;
|
|
967
1119
|
};
|
|
968
|
-
protoOf(ElevationFunctions).
|
|
969
|
-
var x = pixel.
|
|
970
|
-
var y = pixel.
|
|
971
|
-
var tileX = pixel.
|
|
972
|
-
var tileY = pixel.
|
|
973
|
-
var z = pixel.
|
|
1120
|
+
protoOf(ElevationFunctions).m13 = function (pixel, tileSize) {
|
|
1121
|
+
var x = pixel.o13_1;
|
|
1122
|
+
var y = pixel.p13_1;
|
|
1123
|
+
var tileX = pixel.n13_1.xz_1;
|
|
1124
|
+
var tileY = pixel.n13_1.yz_1;
|
|
1125
|
+
var z = pixel.n13_1.zz_1;
|
|
974
1126
|
if (x < 0) {
|
|
975
1127
|
x = x + tileSize | 0;
|
|
976
1128
|
tileX = tileX - 1 | 0;
|
|
@@ -1004,25 +1156,25 @@
|
|
|
1004
1156
|
}
|
|
1005
1157
|
return new Pixel(new TileCoordinates(tileX, tileY, z), x, y);
|
|
1006
1158
|
};
|
|
1007
|
-
protoOf(ElevationFunctions).
|
|
1159
|
+
protoOf(ElevationFunctions).e14 = function (coords, z) {
|
|
1008
1160
|
// Inline function 'kotlin.require' call
|
|
1009
|
-
if (!this.
|
|
1010
|
-
var message = 'Invalid latitude: ' + formatNumber_0(ElevationFunctions_instance, coords.
|
|
1161
|
+
if (!this.b14(coords.gz())) {
|
|
1162
|
+
var message = 'Invalid latitude: ' + formatNumber_0(ElevationFunctions_instance, coords.gz()) + '. Must be between -85.0511 and 85.0511';
|
|
1011
1163
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1012
1164
|
}
|
|
1013
1165
|
// Inline function 'kotlin.require' call
|
|
1014
|
-
if (!this.
|
|
1015
|
-
var message_0 = 'Invalid longitude: ' + formatNumber_0(ElevationFunctions_instance, coords.
|
|
1166
|
+
if (!this.c14(coords.hz())) {
|
|
1167
|
+
var message_0 = 'Invalid longitude: ' + formatNumber_0(ElevationFunctions_instance, coords.hz()) + '. Must be between -180 and 180';
|
|
1016
1168
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1017
1169
|
}
|
|
1018
1170
|
// Inline function 'kotlin.require' call
|
|
1019
|
-
if (!this.
|
|
1171
|
+
if (!this.d14(z)) {
|
|
1020
1172
|
var message_1 = 'Invalid zoom level: ' + z + '. Must be between 0 and 15';
|
|
1021
1173
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
1022
1174
|
}
|
|
1023
|
-
var lat = this.
|
|
1175
|
+
var lat = this.a14(coords.gz());
|
|
1024
1176
|
var n = 1 << z;
|
|
1025
|
-
var xFloat = (coords.
|
|
1177
|
+
var xFloat = (coords.hz() + 180.0) / 360.0 * n;
|
|
1026
1178
|
// Inline function 'kotlin.math.tan' call
|
|
1027
1179
|
var tmp = Math.tan(lat);
|
|
1028
1180
|
// Inline function 'kotlin.math.cos' call
|
|
@@ -1032,111 +1184,424 @@
|
|
|
1032
1184
|
var maxTile = (1 << z) - 1 | 0;
|
|
1033
1185
|
// Inline function 'kotlin.math.floor' call
|
|
1034
1186
|
var tmp$ret$9 = Math.floor(xFloat);
|
|
1035
|
-
var x_0 =
|
|
1187
|
+
var x_0 = coerceIn_1(numberToInt(tmp$ret$9), 0, maxTile);
|
|
1036
1188
|
// Inline function 'kotlin.math.floor' call
|
|
1037
1189
|
var tmp$ret$10 = Math.floor(yFloat);
|
|
1038
|
-
var y =
|
|
1190
|
+
var y = coerceIn_1(numberToInt(tmp$ret$10), 0, maxTile);
|
|
1039
1191
|
return new TileCoordinatesFloat(x_0, y, xFloat, yFloat, z);
|
|
1040
1192
|
};
|
|
1041
|
-
protoOf(ElevationFunctions).
|
|
1042
|
-
var tile = this.
|
|
1043
|
-
return new TileCoordinates(tile.
|
|
1193
|
+
protoOf(ElevationFunctions).wz = function (coords, z) {
|
|
1194
|
+
var tile = this.e14(coords, z);
|
|
1195
|
+
return new TileCoordinates(tile.f14_1, tile.g14_1, tile.j14_1);
|
|
1044
1196
|
};
|
|
1045
|
-
protoOf(ElevationFunctions).
|
|
1046
|
-
var tile = this.
|
|
1197
|
+
protoOf(ElevationFunctions).h13 = function (coords, z, tileSize) {
|
|
1198
|
+
var tile = this.e14(coords, z);
|
|
1047
1199
|
// Inline function 'kotlin.math.floor' call
|
|
1048
|
-
var x = (tile.
|
|
1200
|
+
var x = (tile.h14_1 - tile.f14_1) * tileSize;
|
|
1049
1201
|
var tmp$ret$0 = Math.floor(x);
|
|
1050
|
-
var px =
|
|
1202
|
+
var px = coerceIn_1(numberToInt(tmp$ret$0), 0, tileSize - 1 | 0);
|
|
1051
1203
|
// Inline function 'kotlin.math.floor' call
|
|
1052
|
-
var x_0 = (tile.
|
|
1204
|
+
var x_0 = (tile.i14_1 - tile.g14_1) * tileSize;
|
|
1053
1205
|
var tmp$ret$1 = Math.floor(x_0);
|
|
1054
|
-
var py =
|
|
1055
|
-
return new Pixel(new TileCoordinates(tile.
|
|
1206
|
+
var py = coerceIn_1(numberToInt(tmp$ret$1), 0, tileSize - 1 | 0);
|
|
1207
|
+
return new Pixel(new TileCoordinates(tile.f14_1, tile.g14_1, z), px, py);
|
|
1056
1208
|
};
|
|
1057
|
-
protoOf(ElevationFunctions).
|
|
1058
|
-
var tile = this.
|
|
1059
|
-
var px = (tile.
|
|
1060
|
-
var py = (tile.
|
|
1061
|
-
return new PixelFloat(new TileCoordinates(tile.
|
|
1209
|
+
protoOf(ElevationFunctions).i13 = function (coords, z, tileSize) {
|
|
1210
|
+
var tile = this.e14(coords, z);
|
|
1211
|
+
var px = (tile.h14_1 - tile.f14_1) * tileSize;
|
|
1212
|
+
var py = (tile.i14_1 - tile.g14_1) * tileSize;
|
|
1213
|
+
return new PixelFloat(new TileCoordinates(tile.f14_1, tile.g14_1, z), px, py);
|
|
1062
1214
|
};
|
|
1063
1215
|
var ElevationFunctions_instance;
|
|
1064
1216
|
function ElevationFunctions_getInstance() {
|
|
1065
1217
|
return ElevationFunctions_instance;
|
|
1066
1218
|
}
|
|
1067
|
-
function
|
|
1068
|
-
|
|
1219
|
+
function ElevationProvider_init_$Init$(config, fetcher, $this) {
|
|
1220
|
+
config = config === VOID ? new ElevationProviderConfig() : config;
|
|
1221
|
+
fetcher = fetcher === VOID ? defaultTileFetcher(config) : fetcher;
|
|
1222
|
+
ElevationProvider.call($this, config, fetcher, null, false, null);
|
|
1223
|
+
return $this;
|
|
1069
1224
|
}
|
|
1070
|
-
|
|
1071
|
-
return
|
|
1225
|
+
function ElevationProvider_init_$Create$(config, fetcher) {
|
|
1226
|
+
return ElevationProvider_init_$Init$(config, fetcher, objectCreate(protoOf(ElevationProvider)));
|
|
1227
|
+
}
|
|
1228
|
+
function ElevationProvider_init_$Init$_0(config, fetcher, keepNoData, $this) {
|
|
1229
|
+
ElevationProvider.call($this, config, fetcher, null, keepNoData, null);
|
|
1230
|
+
return $this;
|
|
1231
|
+
}
|
|
1232
|
+
function ElevationProvider_init_$Create$_0(config, fetcher, keepNoData) {
|
|
1233
|
+
return ElevationProvider_init_$Init$_0(config, fetcher, keepNoData, objectCreate(protoOf(ElevationProvider)));
|
|
1234
|
+
}
|
|
1235
|
+
function ElevationProvider$calculator$slambda(this$0, resultContinuation) {
|
|
1236
|
+
this.s14_1 = this$0;
|
|
1237
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1238
|
+
}
|
|
1239
|
+
protoOf(ElevationProvider$calculator$slambda).v14 = function (coords, interpolation, $completion) {
|
|
1240
|
+
var tmp = this.w14(coords, interpolation, $completion);
|
|
1241
|
+
tmp.i7_1 = Unit_instance;
|
|
1242
|
+
tmp.j7_1 = null;
|
|
1243
|
+
return tmp.o7();
|
|
1244
|
+
};
|
|
1245
|
+
protoOf(ElevationProvider$calculator$slambda).x14 = function (p1, p2, $completion) {
|
|
1246
|
+
var tmp = (!(p1 == null) ? isInterface(p1, Coordinates) : false) ? p1 : THROW_CCE();
|
|
1247
|
+
return this.v14(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
|
|
1248
|
+
};
|
|
1249
|
+
protoOf(ElevationProvider$calculator$slambda).o7 = function () {
|
|
1250
|
+
var suspendResult = this.i7_1;
|
|
1251
|
+
$sm: do
|
|
1252
|
+
try {
|
|
1253
|
+
var tmp = this.g7_1;
|
|
1254
|
+
switch (tmp) {
|
|
1255
|
+
case 0:
|
|
1256
|
+
this.h7_1 = 2;
|
|
1257
|
+
this.g7_1 = 1;
|
|
1258
|
+
suspendResult = this.s14_1.a15_1.g15(this.t14_1.gz(), this.t14_1.hz(), this.u14_1, this);
|
|
1259
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1260
|
+
return suspendResult;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
continue $sm;
|
|
1264
|
+
case 1:
|
|
1265
|
+
return suspendResult;
|
|
1266
|
+
case 2:
|
|
1267
|
+
throw this.j7_1;
|
|
1268
|
+
}
|
|
1269
|
+
} catch ($p) {
|
|
1270
|
+
var e = $p;
|
|
1271
|
+
if (this.h7_1 === 2) {
|
|
1272
|
+
throw e;
|
|
1273
|
+
} else {
|
|
1274
|
+
this.g7_1 = this.h7_1;
|
|
1275
|
+
this.j7_1 = e;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
while (true);
|
|
1072
1279
|
};
|
|
1073
|
-
protoOf(
|
|
1074
|
-
|
|
1280
|
+
protoOf(ElevationProvider$calculator$slambda).w14 = function (coords, interpolation, completion) {
|
|
1281
|
+
var i = new ElevationProvider$calculator$slambda(this.s14_1, completion);
|
|
1282
|
+
i.t14_1 = coords;
|
|
1283
|
+
i.u14_1 = interpolation;
|
|
1284
|
+
return i;
|
|
1075
1285
|
};
|
|
1076
|
-
function ElevationProvider(
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
var
|
|
1286
|
+
function ElevationProvider$calculator$slambda_0(this$0, resultContinuation) {
|
|
1287
|
+
var i = new ElevationProvider$calculator$slambda(this$0, resultContinuation);
|
|
1288
|
+
return constructCallableReference(function (coords, interpolation, $completion) {
|
|
1289
|
+
return i.v14(coords, interpolation, $completion);
|
|
1290
|
+
}, 2);
|
|
1291
|
+
}
|
|
1292
|
+
function ElevationProvider$calculator$slambda_1(resultContinuation) {
|
|
1293
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1294
|
+
}
|
|
1295
|
+
protoOf(ElevationProvider$calculator$slambda_1).v14 = function (_unused_var__etf5q3, _unused_var__etf5q3_0, $completion) {
|
|
1296
|
+
var tmp = this.w14(_unused_var__etf5q3, _unused_var__etf5q3_0, $completion);
|
|
1297
|
+
tmp.i7_1 = Unit_instance;
|
|
1298
|
+
tmp.j7_1 = null;
|
|
1299
|
+
return tmp.o7();
|
|
1300
|
+
};
|
|
1301
|
+
protoOf(ElevationProvider$calculator$slambda_1).x14 = function (p1, p2, $completion) {
|
|
1302
|
+
var tmp = (!(p1 == null) ? isInterface(p1, Coordinates) : false) ? p1 : THROW_CCE();
|
|
1303
|
+
return this.v14(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
|
|
1304
|
+
};
|
|
1305
|
+
protoOf(ElevationProvider$calculator$slambda_1).o7 = function () {
|
|
1306
|
+
var suspendResult = this.i7_1;
|
|
1307
|
+
$sm: do
|
|
1308
|
+
try {
|
|
1309
|
+
var tmp = this.g7_1;
|
|
1310
|
+
if (tmp === 0) {
|
|
1311
|
+
this.h7_1 = 1;
|
|
1312
|
+
return NaN;
|
|
1313
|
+
} else if (tmp === 1) {
|
|
1314
|
+
throw this.j7_1;
|
|
1315
|
+
}
|
|
1316
|
+
} catch ($p) {
|
|
1317
|
+
var e = $p;
|
|
1318
|
+
throw e;
|
|
1319
|
+
}
|
|
1320
|
+
while (true);
|
|
1321
|
+
};
|
|
1322
|
+
protoOf(ElevationProvider$calculator$slambda_1).w14 = function (_unused_var__etf5q3, _unused_var__etf5q3_0, completion) {
|
|
1323
|
+
var i = new ElevationProvider$calculator$slambda_1(completion);
|
|
1324
|
+
i.p15_1 = _unused_var__etf5q3;
|
|
1325
|
+
i.q15_1 = _unused_var__etf5q3_0;
|
|
1326
|
+
return i;
|
|
1327
|
+
};
|
|
1328
|
+
function ElevationProvider$calculator$slambda_2(resultContinuation) {
|
|
1329
|
+
var i = new ElevationProvider$calculator$slambda_1(resultContinuation);
|
|
1330
|
+
return constructCallableReference(function (_unused_var__etf5q3, _unused_var__etf5q3_0, $completion) {
|
|
1331
|
+
return i.v14(_unused_var__etf5q3, _unused_var__etf5q3_0, $completion);
|
|
1332
|
+
}, 2);
|
|
1333
|
+
}
|
|
1334
|
+
function ElevationProvider(config, fetcher, fallback, keepNoData, surfaceModel) {
|
|
1335
|
+
this.y14_1 = config;
|
|
1336
|
+
this.z14_1 = fetcher;
|
|
1337
|
+
this.a15_1 = fallback;
|
|
1338
|
+
this.b15_1 = keepNoData;
|
|
1339
|
+
this.c15_1 = surfaceModel;
|
|
1340
|
+
var containsArg = this.y14_1.r15_1;
|
|
1087
1341
|
// Inline function 'kotlin.require' call
|
|
1088
1342
|
if (!(0 <= containsArg ? containsArg <= 15 : false)) {
|
|
1089
|
-
var message = 'Invalid zoom level: ' + this.
|
|
1343
|
+
var message = 'Invalid zoom level: ' + this.y14_1.r15_1 + '. Must be an integer between 0 and 15';
|
|
1090
1344
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1091
1345
|
}
|
|
1092
1346
|
// Inline function 'kotlin.require' call
|
|
1093
|
-
if (!(this.
|
|
1094
|
-
var message_0 = 'Invalid cache size: ' + this.
|
|
1347
|
+
if (!(this.y14_1.s15_1 > 0)) {
|
|
1348
|
+
var message_0 = 'Invalid cache size: ' + this.y14_1.s15_1 + '. Must be a positive integer';
|
|
1095
1349
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1096
1350
|
}
|
|
1097
1351
|
// Inline function 'kotlin.require' call
|
|
1098
|
-
if (!(this.
|
|
1099
|
-
var message_1 = 'Invalid tile size: ' + this.
|
|
1352
|
+
if (!(this.y14_1.u15_1 > 0 && (this.y14_1.u15_1 & (this.y14_1.u15_1 - 1 | 0)) === 0)) {
|
|
1353
|
+
var message_1 = 'Invalid tile size: ' + this.y14_1.u15_1 + '. Must be a positive power of 2';
|
|
1100
1354
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
1101
1355
|
}
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1356
|
+
// Inline function 'kotlin.require' call
|
|
1357
|
+
if (!(this.y14_1.x15_1 >= 0)) {
|
|
1358
|
+
var message_2 = 'Invalid maxRequestsPerSecond: ' + this.y14_1.x15_1 + '. Must be 0 (no limit) or positive';
|
|
1359
|
+
throw IllegalArgumentException_init_$Create$(toString(message_2));
|
|
1360
|
+
}
|
|
1361
|
+
this.d15_1 = new TileManager(this.y14_1.t15_1, this.y14_1.s15_1, this.z14_1);
|
|
1362
|
+
var tmp = this;
|
|
1363
|
+
var tmp_0;
|
|
1364
|
+
if (!(this.a15_1 == null)) {
|
|
1365
|
+
tmp_0 = ElevationProvider$calculator$slambda_0(this, null);
|
|
1366
|
+
} else if (this.b15_1) {
|
|
1367
|
+
tmp_0 = ElevationProvider$calculator$slambda_2(null);
|
|
1368
|
+
} else {
|
|
1369
|
+
tmp_0 = null;
|
|
1370
|
+
}
|
|
1371
|
+
tmp.e15_1 = new ElevationCalculator(this.d15_1, this.y14_1.u15_1, tmp_0);
|
|
1372
|
+
this.f15_1 = new BatchCalculator(this.e15_1);
|
|
1105
1373
|
}
|
|
1106
|
-
protoOf(ElevationProvider).
|
|
1107
|
-
|
|
1374
|
+
protoOf(ElevationProvider).y15 = function (other) {
|
|
1375
|
+
// Inline function 'kotlin.require' call
|
|
1376
|
+
if (!!this.b15_1) {
|
|
1377
|
+
var message = 'a raw IGN LiDAR HD layer takes no fallback: its no-data must stay NaN';
|
|
1378
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1379
|
+
}
|
|
1380
|
+
return new ElevationProvider(this.y14_1, this.z14_1, other, false, this.c15_1);
|
|
1381
|
+
};
|
|
1382
|
+
protoOf(ElevationProvider).z15 = function (surface) {
|
|
1383
|
+
// Inline function 'kotlin.require' call
|
|
1384
|
+
if (!(surface == null || surface.b15_1)) {
|
|
1385
|
+
var message = 'a surface model must keep its no-data as NaN';
|
|
1386
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1387
|
+
}
|
|
1388
|
+
// Inline function 'kotlin.require' call
|
|
1389
|
+
if (!!this.b15_1) {
|
|
1390
|
+
var message_0 = 'a raw IGN LiDAR HD layer carries no surface model';
|
|
1391
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1392
|
+
}
|
|
1393
|
+
return new ElevationProvider(this.y14_1, this.z14_1, this.a15_1, false, surface);
|
|
1394
|
+
};
|
|
1395
|
+
protoOf(ElevationProvider).a16 = function () {
|
|
1396
|
+
return this.y14_1.v15_1;
|
|
1397
|
+
};
|
|
1398
|
+
protoOf(ElevationProvider).g15 = function (latitude, longitude, interpolation, $completion) {
|
|
1399
|
+
return this.e15_1.fz(new LatLon(latitude, longitude), this.y14_1.r15_1, interpolation, $completion);
|
|
1108
1400
|
};
|
|
1109
|
-
protoOf(ElevationProvider).
|
|
1110
|
-
return this.
|
|
1401
|
+
protoOf(ElevationProvider).b16 = function (coordinates, interpolation, $completion) {
|
|
1402
|
+
return this.f15_1.s10(coordinates, this.y14_1.r15_1, interpolation, VOID, $completion);
|
|
1111
1403
|
};
|
|
1112
|
-
protoOf(ElevationProvider).
|
|
1404
|
+
protoOf(ElevationProvider).c16 = function (coordinates, interpolation, $completion, $super) {
|
|
1113
1405
|
interpolation = interpolation === VOID ? true : interpolation;
|
|
1114
|
-
return $super === VOID ? this.
|
|
1406
|
+
return $super === VOID ? this.b16(coordinates, interpolation, $completion) : $super.b16.call(this, coordinates, interpolation, $completion);
|
|
1407
|
+
};
|
|
1408
|
+
protoOf(ElevationProvider).d16 = function (path, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion) {
|
|
1409
|
+
return this.f15_1.w10(path, this.y14_1.r15_1, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion);
|
|
1410
|
+
};
|
|
1411
|
+
function defaultTileFetcher(config) {
|
|
1412
|
+
if (config.w15_1.equals(TileEncoding_TERRARIUM_getInstance()) && config.x15_1 === 0) {
|
|
1413
|
+
return fetchAndDecodeTile$ref_1();
|
|
1414
|
+
}
|
|
1415
|
+
var bytes = pacedTileBytesFetcher(config.x15_1);
|
|
1416
|
+
var tmp;
|
|
1417
|
+
switch (config.w15_1.v1_1) {
|
|
1418
|
+
case 0:
|
|
1419
|
+
tmp = defaultTileFetcher$slambda_0(bytes, null);
|
|
1420
|
+
break;
|
|
1421
|
+
case 1:
|
|
1422
|
+
tmp = defaultTileFetcher$slambda_2(bytes, config, null);
|
|
1423
|
+
break;
|
|
1424
|
+
default:
|
|
1425
|
+
noWhenBranchMatchedException();
|
|
1426
|
+
break;
|
|
1427
|
+
}
|
|
1428
|
+
return tmp;
|
|
1429
|
+
}
|
|
1430
|
+
function fetchAndDecodeTile$ref() {
|
|
1431
|
+
KFunctionImpl.call(this, 1, 2, 2);
|
|
1432
|
+
}
|
|
1433
|
+
protoOf(fetchAndDecodeTile$ref).h16 = function (p0, $completion) {
|
|
1434
|
+
return fetchAndDecodeTile(p0, $completion);
|
|
1435
|
+
};
|
|
1436
|
+
protoOf(fetchAndDecodeTile$ref).w7 = function (p1, $completion) {
|
|
1437
|
+
return this.h16((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
|
|
1438
|
+
};
|
|
1439
|
+
function defaultTileFetcher$slambda($bytes, resultContinuation) {
|
|
1440
|
+
this.q16_1 = $bytes;
|
|
1441
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1442
|
+
}
|
|
1443
|
+
protoOf(defaultTileFetcher$slambda).h16 = function (url, $completion) {
|
|
1444
|
+
var tmp = this.s16(url, $completion);
|
|
1445
|
+
tmp.i7_1 = Unit_instance;
|
|
1446
|
+
tmp.j7_1 = null;
|
|
1447
|
+
return tmp.o7();
|
|
1448
|
+
};
|
|
1449
|
+
protoOf(defaultTileFetcher$slambda).w7 = function (p1, $completion) {
|
|
1450
|
+
return this.h16((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
|
|
1451
|
+
};
|
|
1452
|
+
protoOf(defaultTileFetcher$slambda).o7 = function () {
|
|
1453
|
+
var suspendResult = this.i7_1;
|
|
1454
|
+
$sm: do
|
|
1455
|
+
try {
|
|
1456
|
+
var tmp = this.g7_1;
|
|
1457
|
+
switch (tmp) {
|
|
1458
|
+
case 0:
|
|
1459
|
+
this.h7_1 = 3;
|
|
1460
|
+
this.g7_1 = 1;
|
|
1461
|
+
suspendResult = this.q16_1(this.r16_1, this);
|
|
1462
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1463
|
+
return suspendResult;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
continue $sm;
|
|
1467
|
+
case 1:
|
|
1468
|
+
var ARGUMENT = suspendResult;
|
|
1469
|
+
this.g7_1 = 2;
|
|
1470
|
+
suspendResult = decodeTileBytes(ARGUMENT, this.r16_1, this);
|
|
1471
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1472
|
+
return suspendResult;
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
continue $sm;
|
|
1476
|
+
case 2:
|
|
1477
|
+
return suspendResult;
|
|
1478
|
+
case 3:
|
|
1479
|
+
throw this.j7_1;
|
|
1480
|
+
}
|
|
1481
|
+
} catch ($p) {
|
|
1482
|
+
var e = $p;
|
|
1483
|
+
if (this.h7_1 === 3) {
|
|
1484
|
+
throw e;
|
|
1485
|
+
} else {
|
|
1486
|
+
this.g7_1 = this.h7_1;
|
|
1487
|
+
this.j7_1 = e;
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
while (true);
|
|
1491
|
+
};
|
|
1492
|
+
protoOf(defaultTileFetcher$slambda).s16 = function (url, completion) {
|
|
1493
|
+
var i = new defaultTileFetcher$slambda(this.q16_1, completion);
|
|
1494
|
+
i.r16_1 = url;
|
|
1495
|
+
return i;
|
|
1496
|
+
};
|
|
1497
|
+
function defaultTileFetcher$slambda_0($bytes, resultContinuation) {
|
|
1498
|
+
var i = new defaultTileFetcher$slambda($bytes, resultContinuation);
|
|
1499
|
+
return constructCallableReference(function (url, $completion) {
|
|
1500
|
+
return i.h16(url, $completion);
|
|
1501
|
+
}, 1);
|
|
1502
|
+
}
|
|
1503
|
+
function defaultTileFetcher$slambda_1($bytes, $config, resultContinuation) {
|
|
1504
|
+
this.b17_1 = $bytes;
|
|
1505
|
+
this.c17_1 = $config;
|
|
1506
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1507
|
+
}
|
|
1508
|
+
protoOf(defaultTileFetcher$slambda_1).h16 = function (url, $completion) {
|
|
1509
|
+
var tmp = this.s16(url, $completion);
|
|
1510
|
+
tmp.i7_1 = Unit_instance;
|
|
1511
|
+
tmp.j7_1 = null;
|
|
1512
|
+
return tmp.o7();
|
|
1513
|
+
};
|
|
1514
|
+
protoOf(defaultTileFetcher$slambda_1).w7 = function (p1, $completion) {
|
|
1515
|
+
return this.h16((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
|
|
1516
|
+
};
|
|
1517
|
+
protoOf(defaultTileFetcher$slambda_1).o7 = function () {
|
|
1518
|
+
var suspendResult = this.i7_1;
|
|
1519
|
+
$sm: do
|
|
1520
|
+
try {
|
|
1521
|
+
var tmp = this.g7_1;
|
|
1522
|
+
switch (tmp) {
|
|
1523
|
+
case 0:
|
|
1524
|
+
this.h7_1 = 2;
|
|
1525
|
+
this.g7_1 = 1;
|
|
1526
|
+
suspendResult = this.b17_1(this.d17_1, this);
|
|
1527
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1528
|
+
return suspendResult;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
continue $sm;
|
|
1532
|
+
case 1:
|
|
1533
|
+
var ARGUMENT = suspendResult;
|
|
1534
|
+
return decodeBil32Tile(ARGUMENT, this.c17_1.u15_1, this.d17_1);
|
|
1535
|
+
case 2:
|
|
1536
|
+
throw this.j7_1;
|
|
1537
|
+
}
|
|
1538
|
+
} catch ($p) {
|
|
1539
|
+
var e = $p;
|
|
1540
|
+
if (this.h7_1 === 2) {
|
|
1541
|
+
throw e;
|
|
1542
|
+
} else {
|
|
1543
|
+
this.g7_1 = this.h7_1;
|
|
1544
|
+
this.j7_1 = e;
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
while (true);
|
|
1115
1548
|
};
|
|
1116
|
-
protoOf(
|
|
1117
|
-
|
|
1549
|
+
protoOf(defaultTileFetcher$slambda_1).s16 = function (url, completion) {
|
|
1550
|
+
var i = new defaultTileFetcher$slambda_1(this.b17_1, this.c17_1, completion);
|
|
1551
|
+
i.d17_1 = url;
|
|
1552
|
+
return i;
|
|
1118
1553
|
};
|
|
1119
|
-
function
|
|
1554
|
+
function defaultTileFetcher$slambda_2($bytes, $config, resultContinuation) {
|
|
1555
|
+
var i = new defaultTileFetcher$slambda_1($bytes, $config, resultContinuation);
|
|
1556
|
+
return constructCallableReference(function (url, $completion) {
|
|
1557
|
+
return i.h16(url, $completion);
|
|
1558
|
+
}, 1);
|
|
1559
|
+
}
|
|
1560
|
+
function defaultTileFetcher$ref() {
|
|
1561
|
+
return constructCallableReference(function (p0) {
|
|
1562
|
+
return defaultTileFetcher(p0);
|
|
1563
|
+
}, 1, 0, 3, 'defaultTileFetcher');
|
|
1564
|
+
}
|
|
1565
|
+
function ElevationProviderConfig(zoomLevel, cacheSize, tileUrlTemplate, tileSize, attribution, encoding, maxRequestsPerSecond) {
|
|
1120
1566
|
zoomLevel = zoomLevel === VOID ? 12 : zoomLevel;
|
|
1121
1567
|
cacheSize = cacheSize === VOID ? 100 : cacheSize;
|
|
1122
1568
|
tileUrlTemplate = tileUrlTemplate === VOID ? 'https://tiles.mapterhorn.com/{z}/{x}/{y}.webp' : tileUrlTemplate;
|
|
1123
1569
|
tileSize = tileSize === VOID ? 512 : tileSize;
|
|
1124
1570
|
attribution = attribution === VOID ? new Attribution('Mapterhorn elevation data. See mapterhorn.com/attribution/ for details.', 'https://mapterhorn.com/attribution/') : attribution;
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
this.
|
|
1128
|
-
this.
|
|
1129
|
-
this.
|
|
1571
|
+
encoding = encoding === VOID ? TileEncoding_TERRARIUM_getInstance() : encoding;
|
|
1572
|
+
maxRequestsPerSecond = maxRequestsPerSecond === VOID ? 0 : maxRequestsPerSecond;
|
|
1573
|
+
this.r15_1 = zoomLevel;
|
|
1574
|
+
this.s15_1 = cacheSize;
|
|
1575
|
+
this.t15_1 = tileUrlTemplate;
|
|
1576
|
+
this.u15_1 = tileSize;
|
|
1577
|
+
this.v15_1 = attribution;
|
|
1578
|
+
this.w15_1 = encoding;
|
|
1579
|
+
this.x15_1 = maxRequestsPerSecond;
|
|
1130
1580
|
}
|
|
1581
|
+
protoOf(ElevationProviderConfig).e17 = function (zoomLevel, cacheSize, tileUrlTemplate, tileSize, attribution, encoding, maxRequestsPerSecond) {
|
|
1582
|
+
return new ElevationProviderConfig(zoomLevel, cacheSize, tileUrlTemplate, tileSize, attribution, encoding, maxRequestsPerSecond);
|
|
1583
|
+
};
|
|
1584
|
+
protoOf(ElevationProviderConfig).f17 = function (zoomLevel, cacheSize, tileUrlTemplate, tileSize, attribution, encoding, maxRequestsPerSecond, $super) {
|
|
1585
|
+
zoomLevel = zoomLevel === VOID ? this.r15_1 : zoomLevel;
|
|
1586
|
+
cacheSize = cacheSize === VOID ? this.s15_1 : cacheSize;
|
|
1587
|
+
tileUrlTemplate = tileUrlTemplate === VOID ? this.t15_1 : tileUrlTemplate;
|
|
1588
|
+
tileSize = tileSize === VOID ? this.u15_1 : tileSize;
|
|
1589
|
+
attribution = attribution === VOID ? this.v15_1 : attribution;
|
|
1590
|
+
encoding = encoding === VOID ? this.w15_1 : encoding;
|
|
1591
|
+
maxRequestsPerSecond = maxRequestsPerSecond === VOID ? this.x15_1 : maxRequestsPerSecond;
|
|
1592
|
+
return $super === VOID ? this.e17(zoomLevel, cacheSize, tileUrlTemplate, tileSize, attribution, encoding, maxRequestsPerSecond) : $super.e17.call(this, zoomLevel, cacheSize, tileUrlTemplate, tileSize, attribution, encoding, maxRequestsPerSecond);
|
|
1593
|
+
};
|
|
1131
1594
|
protoOf(ElevationProviderConfig).toString = function () {
|
|
1132
|
-
return 'ElevationProviderConfig(zoomLevel=' + this.
|
|
1595
|
+
return 'ElevationProviderConfig(zoomLevel=' + this.r15_1 + ', cacheSize=' + this.s15_1 + ', tileUrlTemplate=' + this.t15_1 + ', tileSize=' + this.u15_1 + ', attribution=' + this.v15_1.toString() + ', encoding=' + this.w15_1.toString() + ', maxRequestsPerSecond=' + this.x15_1 + ')';
|
|
1133
1596
|
};
|
|
1134
1597
|
protoOf(ElevationProviderConfig).hashCode = function () {
|
|
1135
|
-
var result = this.
|
|
1136
|
-
result = imul(result, 31) + this.
|
|
1137
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
1138
|
-
result = imul(result, 31) + this.
|
|
1139
|
-
result = imul(result, 31) + this.
|
|
1598
|
+
var result = this.r15_1;
|
|
1599
|
+
result = imul(result, 31) + this.s15_1 | 0;
|
|
1600
|
+
result = imul(result, 31) + getStringHashCode(this.t15_1) | 0;
|
|
1601
|
+
result = imul(result, 31) + this.u15_1 | 0;
|
|
1602
|
+
result = imul(result, 31) + this.v15_1.hashCode() | 0;
|
|
1603
|
+
result = imul(result, 31) + this.w15_1.hashCode() | 0;
|
|
1604
|
+
result = imul(result, 31) + this.x15_1 | 0;
|
|
1140
1605
|
return result;
|
|
1141
1606
|
};
|
|
1142
1607
|
protoOf(ElevationProviderConfig).equals = function (other) {
|
|
@@ -1144,29 +1609,33 @@
|
|
|
1144
1609
|
return true;
|
|
1145
1610
|
if (!(other instanceof ElevationProviderConfig))
|
|
1146
1611
|
return false;
|
|
1147
|
-
if (!(this.
|
|
1612
|
+
if (!(this.r15_1 === other.r15_1))
|
|
1613
|
+
return false;
|
|
1614
|
+
if (!(this.s15_1 === other.s15_1))
|
|
1148
1615
|
return false;
|
|
1149
|
-
if (!(this.
|
|
1616
|
+
if (!(this.t15_1 === other.t15_1))
|
|
1150
1617
|
return false;
|
|
1151
|
-
if (!(this.
|
|
1618
|
+
if (!(this.u15_1 === other.u15_1))
|
|
1152
1619
|
return false;
|
|
1153
|
-
if (!
|
|
1620
|
+
if (!this.v15_1.equals(other.v15_1))
|
|
1154
1621
|
return false;
|
|
1155
|
-
if (!this.
|
|
1622
|
+
if (!this.w15_1.equals(other.w15_1))
|
|
1623
|
+
return false;
|
|
1624
|
+
if (!(this.x15_1 === other.x15_1))
|
|
1156
1625
|
return false;
|
|
1157
1626
|
return true;
|
|
1158
1627
|
};
|
|
1159
1628
|
function Attribution(text, url) {
|
|
1160
1629
|
url = url === VOID ? null : url;
|
|
1161
|
-
this.
|
|
1162
|
-
this.
|
|
1630
|
+
this.g17_1 = text;
|
|
1631
|
+
this.h17_1 = url;
|
|
1163
1632
|
}
|
|
1164
1633
|
protoOf(Attribution).toString = function () {
|
|
1165
|
-
return 'Attribution(text=' + this.
|
|
1634
|
+
return 'Attribution(text=' + this.g17_1 + ', url=' + this.h17_1 + ')';
|
|
1166
1635
|
};
|
|
1167
1636
|
protoOf(Attribution).hashCode = function () {
|
|
1168
|
-
var result = getStringHashCode(this.
|
|
1169
|
-
result = imul(result, 31) + (this.
|
|
1637
|
+
var result = getStringHashCode(this.g17_1);
|
|
1638
|
+
result = imul(result, 31) + (this.h17_1 == null ? 0 : getStringHashCode(this.h17_1)) | 0;
|
|
1170
1639
|
return result;
|
|
1171
1640
|
};
|
|
1172
1641
|
protoOf(Attribution).equals = function (other) {
|
|
@@ -1174,9 +1643,9 @@
|
|
|
1174
1643
|
return true;
|
|
1175
1644
|
if (!(other instanceof Attribution))
|
|
1176
1645
|
return false;
|
|
1177
|
-
if (!(this.
|
|
1646
|
+
if (!(this.g17_1 === other.g17_1))
|
|
1178
1647
|
return false;
|
|
1179
|
-
if (!(this.
|
|
1648
|
+
if (!(this.h17_1 == other.h17_1))
|
|
1180
1649
|
return false;
|
|
1181
1650
|
return true;
|
|
1182
1651
|
};
|
|
@@ -1186,28 +1655,28 @@
|
|
|
1186
1655
|
}
|
|
1187
1656
|
function ElevationSmoother() {
|
|
1188
1657
|
}
|
|
1189
|
-
protoOf(ElevationSmoother).
|
|
1190
|
-
if (points.
|
|
1658
|
+
protoOf(ElevationSmoother).t10 = function (points, windowSize) {
|
|
1659
|
+
if (points.o() < 3)
|
|
1191
1660
|
return points;
|
|
1192
1661
|
// Inline function 'kotlin.require' call
|
|
1193
1662
|
if (!(windowSize > 0.0)) {
|
|
1194
1663
|
var message = 'Invalid window size: ' + formatWindow(ElevationSmoother_instance, windowSize) + '. Must be positive';
|
|
1195
1664
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1196
1665
|
}
|
|
1197
|
-
var distances = Distance_instance.
|
|
1666
|
+
var distances = Distance_instance.g11(points);
|
|
1198
1667
|
var tmp = 0;
|
|
1199
|
-
var tmp_0 = points.
|
|
1668
|
+
var tmp_0 = points.o();
|
|
1200
1669
|
var tmp_1 = new Float64Array(tmp_0);
|
|
1201
1670
|
while (tmp < tmp_0) {
|
|
1202
1671
|
var tmp_2 = tmp;
|
|
1203
|
-
tmp_1[tmp_2] = points.
|
|
1672
|
+
tmp_1[tmp_2] = points.p(tmp_2).c11();
|
|
1204
1673
|
tmp = tmp + 1 | 0;
|
|
1205
1674
|
}
|
|
1206
1675
|
var elevations = tmp_1;
|
|
1207
|
-
var smoothed = this.
|
|
1676
|
+
var smoothed = this.i17(distances, elevations, windowSize);
|
|
1208
1677
|
// Inline function 'kotlin.collections.List' call
|
|
1209
1678
|
// Inline function 'kotlin.collections.MutableList' call
|
|
1210
|
-
var size = points.
|
|
1679
|
+
var size = points.o();
|
|
1211
1680
|
var list = ArrayList_init_$Create$_0(size);
|
|
1212
1681
|
// Inline function 'kotlin.repeat' call
|
|
1213
1682
|
var inductionVariable = 0;
|
|
@@ -1215,13 +1684,13 @@
|
|
|
1215
1684
|
do {
|
|
1216
1685
|
var index = inductionVariable;
|
|
1217
1686
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1218
|
-
var tmp$ret$7 = new LatLonElevation(points.
|
|
1219
|
-
list.
|
|
1687
|
+
var tmp$ret$7 = new LatLonElevation(points.p(index).gz(), points.p(index).hz(), smoothed[index]);
|
|
1688
|
+
list.k(tmp$ret$7);
|
|
1220
1689
|
}
|
|
1221
1690
|
while (inductionVariable < size);
|
|
1222
1691
|
return list;
|
|
1223
1692
|
};
|
|
1224
|
-
protoOf(ElevationSmoother).
|
|
1693
|
+
protoOf(ElevationSmoother).i17 = function (distanceM, elevationM, windowSize) {
|
|
1225
1694
|
// Inline function 'kotlin.require' call
|
|
1226
1695
|
if (!(distanceM.length === elevationM.length)) {
|
|
1227
1696
|
var message = 'distanceM (' + distanceM.length + ') and elevationM (' + elevationM.length + ') must have the same length';
|
|
@@ -1304,121 +1773,292 @@
|
|
|
1304
1773
|
function ElevationSmoother_getInstance() {
|
|
1305
1774
|
return ElevationSmoother_instance;
|
|
1306
1775
|
}
|
|
1776
|
+
var static_init_called_0;
|
|
1777
|
+
function static_init_0() {
|
|
1778
|
+
if (static_init_called_0)
|
|
1779
|
+
return Unit_instance;
|
|
1780
|
+
static_init_called_0 = true;
|
|
1781
|
+
ElevationSource_MAPTERHORN_instance = new ElevationSource('MAPTERHORN', 0, 'mapterhorn');
|
|
1782
|
+
ElevationSource_IGN_LIDAR_HD_instance = new ElevationSource('IGN_LIDAR_HD', 1, 'ign-lidar-hd');
|
|
1783
|
+
if (Companion_instance_0 == null) {
|
|
1784
|
+
Companion_instance;
|
|
1785
|
+
new Companion();
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
var ElevationSource_MAPTERHORN_instance;
|
|
1789
|
+
var ElevationSource_IGN_LIDAR_HD_instance;
|
|
1790
|
+
function Companion() {
|
|
1791
|
+
Companion_instance_0 = this;
|
|
1792
|
+
this.j17_1 = ElevationSource_MAPTERHORN_getInstance();
|
|
1793
|
+
}
|
|
1794
|
+
protoOf(Companion).k17 = function () {
|
|
1795
|
+
// Inline function 'kotlin.collections.map' call
|
|
1796
|
+
var this_0 = get_entries();
|
|
1797
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1798
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1799
|
+
var _iterator__ex2g4s = this_0.l();
|
|
1800
|
+
while (_iterator__ex2g4s.m()) {
|
|
1801
|
+
var item = _iterator__ex2g4s.n();
|
|
1802
|
+
var tmp$ret$2 = item.n17_1;
|
|
1803
|
+
destination.k(tmp$ret$2);
|
|
1804
|
+
}
|
|
1805
|
+
return destination;
|
|
1806
|
+
};
|
|
1807
|
+
protoOf(Companion).o17 = function (id) {
|
|
1808
|
+
var tmp0 = get_entries();
|
|
1809
|
+
var tmp$ret$0;
|
|
1810
|
+
$l$block: {
|
|
1811
|
+
// Inline function 'kotlin.collections.firstOrNull' call
|
|
1812
|
+
var _iterator__ex2g4s = tmp0.l();
|
|
1813
|
+
while (_iterator__ex2g4s.m()) {
|
|
1814
|
+
var element = _iterator__ex2g4s.n();
|
|
1815
|
+
if (element.n17_1 === id) {
|
|
1816
|
+
tmp$ret$0 = element;
|
|
1817
|
+
break $l$block;
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
tmp$ret$0 = null;
|
|
1821
|
+
}
|
|
1822
|
+
var tmp0_elvis_lhs = tmp$ret$0;
|
|
1823
|
+
var tmp;
|
|
1824
|
+
if (tmp0_elvis_lhs == null) {
|
|
1825
|
+
throw IllegalArgumentException_init_$Create$("Unknown DEM source '" + id + "' \u2014 expected one of " + joinToString(this.k17()));
|
|
1826
|
+
} else {
|
|
1827
|
+
tmp = tmp0_elvis_lhs;
|
|
1828
|
+
}
|
|
1829
|
+
return tmp;
|
|
1830
|
+
};
|
|
1831
|
+
var Companion_instance_0;
|
|
1832
|
+
function Companion_getInstance() {
|
|
1833
|
+
static_init_0();
|
|
1834
|
+
return Companion_instance_0;
|
|
1835
|
+
}
|
|
1836
|
+
function values() {
|
|
1837
|
+
static_init_0();
|
|
1838
|
+
return [ElevationSource_MAPTERHORN_getInstance(), ElevationSource_IGN_LIDAR_HD_getInstance()];
|
|
1839
|
+
}
|
|
1840
|
+
function get_entries() {
|
|
1841
|
+
static_init_0();
|
|
1842
|
+
if ($ENTRIES == null)
|
|
1843
|
+
$ENTRIES = enumEntries(values());
|
|
1844
|
+
return $ENTRIES;
|
|
1845
|
+
}
|
|
1846
|
+
var $ENTRIES;
|
|
1847
|
+
function ElevationSource(name, ordinal, id) {
|
|
1848
|
+
Enum.call(this, name, ordinal);
|
|
1849
|
+
this.n17_1 = id;
|
|
1850
|
+
}
|
|
1851
|
+
protoOf(ElevationSource).p17 = function () {
|
|
1852
|
+
var tmp;
|
|
1853
|
+
switch (this.v1_1) {
|
|
1854
|
+
case 0:
|
|
1855
|
+
tmp = null;
|
|
1856
|
+
break;
|
|
1857
|
+
case 1:
|
|
1858
|
+
tmp = ElevationSource_MAPTERHORN_getInstance();
|
|
1859
|
+
break;
|
|
1860
|
+
default:
|
|
1861
|
+
noWhenBranchMatchedException();
|
|
1862
|
+
break;
|
|
1863
|
+
}
|
|
1864
|
+
return tmp;
|
|
1865
|
+
};
|
|
1866
|
+
protoOf(ElevationSource).q17 = function () {
|
|
1867
|
+
var tmp;
|
|
1868
|
+
switch (this.v1_1) {
|
|
1869
|
+
case 0:
|
|
1870
|
+
tmp = (new ElevationProviderConfig()).r15_1;
|
|
1871
|
+
break;
|
|
1872
|
+
case 1:
|
|
1873
|
+
tmp = IgnLidarHdLayer_MNT_getInstance().q17();
|
|
1874
|
+
break;
|
|
1875
|
+
default:
|
|
1876
|
+
noWhenBranchMatchedException();
|
|
1877
|
+
break;
|
|
1878
|
+
}
|
|
1879
|
+
return tmp;
|
|
1880
|
+
};
|
|
1881
|
+
protoOf(ElevationSource).u17 = function (zoomLevel) {
|
|
1882
|
+
var tmp;
|
|
1883
|
+
switch (this.v1_1) {
|
|
1884
|
+
case 0:
|
|
1885
|
+
tmp = new ElevationProviderConfig(zoomLevel == null ? this.q17() : zoomLevel);
|
|
1886
|
+
break;
|
|
1887
|
+
case 1:
|
|
1888
|
+
var tmp_0 = IgnLidarHdLayer_MNT_getInstance();
|
|
1889
|
+
tmp = tmp_0.u17(zoomLevel == null ? this.q17() : zoomLevel);
|
|
1890
|
+
break;
|
|
1891
|
+
default:
|
|
1892
|
+
noWhenBranchMatchedException();
|
|
1893
|
+
break;
|
|
1894
|
+
}
|
|
1895
|
+
return tmp;
|
|
1896
|
+
};
|
|
1897
|
+
function provider(_this__u8e3s4, zoomLevel, fetcherFor) {
|
|
1898
|
+
zoomLevel = zoomLevel === VOID ? null : zoomLevel;
|
|
1899
|
+
var tmp;
|
|
1900
|
+
if (fetcherFor === VOID) {
|
|
1901
|
+
tmp = defaultTileFetcher$ref();
|
|
1902
|
+
} else {
|
|
1903
|
+
tmp = fetcherFor;
|
|
1904
|
+
}
|
|
1905
|
+
fetcherFor = tmp;
|
|
1906
|
+
var config = _this__u8e3s4.u17(zoomLevel);
|
|
1907
|
+
var primary = ElevationProvider_init_$Create$(config, fetcherFor(config));
|
|
1908
|
+
var tmp0_safe_receiver = _this__u8e3s4.p17();
|
|
1909
|
+
var tmp_0;
|
|
1910
|
+
if (tmp0_safe_receiver == null) {
|
|
1911
|
+
tmp_0 = null;
|
|
1912
|
+
} else {
|
|
1913
|
+
// Inline function 'kotlin.let' call
|
|
1914
|
+
tmp_0 = primary.y15(provider(tmp0_safe_receiver, null, fetcherFor));
|
|
1915
|
+
}
|
|
1916
|
+
var tmp1_elvis_lhs = tmp_0;
|
|
1917
|
+
var withFallback = tmp1_elvis_lhs == null ? primary : tmp1_elvis_lhs;
|
|
1918
|
+
var tmp_1;
|
|
1919
|
+
if (_this__u8e3s4.equals(ElevationSource_IGN_LIDAR_HD_getInstance()) && config.r15_1 === IgnLidarHdLayer_MNS_getInstance().q17()) {
|
|
1920
|
+
tmp_1 = withFallback.z15(provider_0(IgnLidarHdLayer_MNS_getInstance(), null, fetcherFor));
|
|
1921
|
+
} else {
|
|
1922
|
+
tmp_1 = withFallback;
|
|
1923
|
+
}
|
|
1924
|
+
return tmp_1;
|
|
1925
|
+
}
|
|
1926
|
+
function wmsBbox4326(tc) {
|
|
1927
|
+
var tiles = 1 << tc.zz_1;
|
|
1928
|
+
var west = tc.xz_1 / tiles * 360.0 - 180.0;
|
|
1929
|
+
var east = (tc.xz_1 + 1 | 0) / tiles * 360.0 - 180.0;
|
|
1930
|
+
return '' + tileNorthLatitude(tc.yz_1 + 1 | 0, tiles) + ',' + west + ',' + tileNorthLatitude(tc.yz_1, tiles) + ',' + east;
|
|
1931
|
+
}
|
|
1932
|
+
function tileNorthLatitude(y, tiles) {
|
|
1933
|
+
// Inline function 'kotlin.math.sinh' call
|
|
1934
|
+
var x = 3.141592653589793 - 2.0 * 3.141592653589793 * y / tiles;
|
|
1935
|
+
// Inline function 'kotlin.math.atan' call
|
|
1936
|
+
var x_0 = sinh(x);
|
|
1937
|
+
return Math.atan(x_0) * 57.29577951308232;
|
|
1938
|
+
}
|
|
1939
|
+
function ElevationSource_MAPTERHORN_getInstance() {
|
|
1940
|
+
static_init_0();
|
|
1941
|
+
return ElevationSource_MAPTERHORN_instance;
|
|
1942
|
+
}
|
|
1943
|
+
function ElevationSource_IGN_LIDAR_HD_getInstance() {
|
|
1944
|
+
static_init_0();
|
|
1945
|
+
return ElevationSource_IGN_LIDAR_HD_instance;
|
|
1946
|
+
}
|
|
1307
1947
|
function Flux$forEachParallel$slambda$slambda($semaphore, $action, $item, resultContinuation) {
|
|
1308
|
-
this
|
|
1309
|
-
this
|
|
1310
|
-
this
|
|
1948
|
+
this.d18_1 = $semaphore;
|
|
1949
|
+
this.e18_1 = $action;
|
|
1950
|
+
this.f18_1 = $item;
|
|
1311
1951
|
CoroutineImpl.call(this, resultContinuation);
|
|
1312
1952
|
}
|
|
1313
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1314
|
-
var tmp = this.
|
|
1315
|
-
tmp.
|
|
1316
|
-
tmp.
|
|
1317
|
-
return tmp.
|
|
1953
|
+
protoOf(Flux$forEachParallel$slambda$slambda).j18 = function ($this$async, $completion) {
|
|
1954
|
+
var tmp = this.k18($this$async, $completion);
|
|
1955
|
+
tmp.i7_1 = Unit_instance;
|
|
1956
|
+
tmp.j7_1 = null;
|
|
1957
|
+
return tmp.o7();
|
|
1318
1958
|
};
|
|
1319
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1320
|
-
return this.
|
|
1959
|
+
protoOf(Flux$forEachParallel$slambda$slambda).w7 = function (p1, $completion) {
|
|
1960
|
+
return this.j18((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1321
1961
|
};
|
|
1322
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1323
|
-
var suspendResult = this.
|
|
1962
|
+
protoOf(Flux$forEachParallel$slambda$slambda).o7 = function () {
|
|
1963
|
+
var suspendResult = this.i7_1;
|
|
1324
1964
|
$sm: do
|
|
1325
1965
|
try {
|
|
1326
|
-
var tmp = this.
|
|
1966
|
+
var tmp = this.g7_1;
|
|
1327
1967
|
switch (tmp) {
|
|
1328
1968
|
case 0:
|
|
1329
|
-
this.
|
|
1330
|
-
this.
|
|
1331
|
-
this.
|
|
1332
|
-
suspendResult = this.
|
|
1969
|
+
this.h7_1 = 6;
|
|
1970
|
+
this.h18_1 = this.d18_1;
|
|
1971
|
+
this.g7_1 = 1;
|
|
1972
|
+
suspendResult = this.h18_1.zv(this);
|
|
1333
1973
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1334
1974
|
return suspendResult;
|
|
1335
1975
|
}
|
|
1336
1976
|
|
|
1337
1977
|
continue $sm;
|
|
1338
1978
|
case 1:
|
|
1339
|
-
this.
|
|
1340
|
-
this.
|
|
1979
|
+
this.i18_1 = Unit_instance;
|
|
1980
|
+
this.g7_1 = 2;
|
|
1341
1981
|
continue $sm;
|
|
1342
1982
|
case 2:
|
|
1343
|
-
this.
|
|
1344
|
-
this.
|
|
1345
|
-
suspendResult = this
|
|
1983
|
+
this.h7_1 = 5;
|
|
1984
|
+
this.g7_1 = 3;
|
|
1985
|
+
suspendResult = this.e18_1(this.f18_1, this);
|
|
1346
1986
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1347
1987
|
return suspendResult;
|
|
1348
1988
|
}
|
|
1349
1989
|
|
|
1350
1990
|
continue $sm;
|
|
1351
1991
|
case 3:
|
|
1352
|
-
this.
|
|
1353
|
-
this.
|
|
1354
|
-
this.
|
|
1992
|
+
this.i18_1 = Unit_instance;
|
|
1993
|
+
this.h7_1 = 6;
|
|
1994
|
+
this.g7_1 = 4;
|
|
1355
1995
|
continue $sm;
|
|
1356
1996
|
case 4:
|
|
1357
|
-
this.
|
|
1358
|
-
this.
|
|
1359
|
-
this.
|
|
1997
|
+
this.i18_1;
|
|
1998
|
+
this.h7_1 = 6;
|
|
1999
|
+
this.h18_1.tv();
|
|
1360
2000
|
return Unit_instance;
|
|
1361
2001
|
case 5:
|
|
1362
|
-
this.
|
|
1363
|
-
var t = this.
|
|
1364
|
-
this.
|
|
2002
|
+
this.h7_1 = 6;
|
|
2003
|
+
var t = this.j7_1;
|
|
2004
|
+
this.h18_1.tv();
|
|
1365
2005
|
throw t;
|
|
1366
2006
|
case 6:
|
|
1367
|
-
throw this.
|
|
2007
|
+
throw this.j7_1;
|
|
1368
2008
|
}
|
|
1369
2009
|
} catch ($p) {
|
|
1370
2010
|
var e = $p;
|
|
1371
|
-
if (this.
|
|
2011
|
+
if (this.h7_1 === 6) {
|
|
1372
2012
|
throw e;
|
|
1373
2013
|
} else {
|
|
1374
|
-
this.
|
|
1375
|
-
this.
|
|
2014
|
+
this.g7_1 = this.h7_1;
|
|
2015
|
+
this.j7_1 = e;
|
|
1376
2016
|
}
|
|
1377
2017
|
}
|
|
1378
2018
|
while (true);
|
|
1379
2019
|
};
|
|
1380
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1381
|
-
var i = new Flux$forEachParallel$slambda$slambda(this
|
|
1382
|
-
i
|
|
2020
|
+
protoOf(Flux$forEachParallel$slambda$slambda).k18 = function ($this$async, completion) {
|
|
2021
|
+
var i = new Flux$forEachParallel$slambda$slambda(this.d18_1, this.e18_1, this.f18_1, completion);
|
|
2022
|
+
i.g18_1 = $this$async;
|
|
1383
2023
|
return i;
|
|
1384
2024
|
};
|
|
1385
2025
|
function Flux$forEachParallel$slambda$slambda_0($semaphore, $action, $item, resultContinuation) {
|
|
1386
2026
|
var i = new Flux$forEachParallel$slambda$slambda($semaphore, $action, $item, resultContinuation);
|
|
1387
2027
|
return constructCallableReference(function ($this$async, $completion) {
|
|
1388
|
-
return i.
|
|
2028
|
+
return i.j18($this$async, $completion);
|
|
1389
2029
|
}, 1);
|
|
1390
2030
|
}
|
|
1391
2031
|
function Flux$forEachParallel$slambda($maxParallel, $items, $action, resultContinuation) {
|
|
1392
|
-
this
|
|
1393
|
-
this
|
|
1394
|
-
this
|
|
2032
|
+
this.t18_1 = $maxParallel;
|
|
2033
|
+
this.u18_1 = $items;
|
|
2034
|
+
this.v18_1 = $action;
|
|
1395
2035
|
CoroutineImpl.call(this, resultContinuation);
|
|
1396
2036
|
}
|
|
1397
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1398
|
-
var tmp = this.
|
|
1399
|
-
tmp.
|
|
1400
|
-
tmp.
|
|
1401
|
-
return tmp.
|
|
2037
|
+
protoOf(Flux$forEachParallel$slambda).x18 = function ($this$coroutineScope, $completion) {
|
|
2038
|
+
var tmp = this.k18($this$coroutineScope, $completion);
|
|
2039
|
+
tmp.i7_1 = Unit_instance;
|
|
2040
|
+
tmp.j7_1 = null;
|
|
2041
|
+
return tmp.o7();
|
|
1402
2042
|
};
|
|
1403
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1404
|
-
return this.
|
|
2043
|
+
protoOf(Flux$forEachParallel$slambda).w7 = function (p1, $completion) {
|
|
2044
|
+
return this.x18((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1405
2045
|
};
|
|
1406
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1407
|
-
var suspendResult = this.
|
|
2046
|
+
protoOf(Flux$forEachParallel$slambda).o7 = function () {
|
|
2047
|
+
var suspendResult = this.i7_1;
|
|
1408
2048
|
$sm: do
|
|
1409
2049
|
try {
|
|
1410
|
-
var tmp = this.
|
|
2050
|
+
var tmp = this.g7_1;
|
|
1411
2051
|
switch (tmp) {
|
|
1412
2052
|
case 0:
|
|
1413
|
-
this.
|
|
1414
|
-
var semaphore = Semaphore(this
|
|
1415
|
-
this.
|
|
1416
|
-
var this_0 = this
|
|
2053
|
+
this.h7_1 = 2;
|
|
2054
|
+
var semaphore = Semaphore(this.t18_1);
|
|
2055
|
+
this.g7_1 = 1;
|
|
2056
|
+
var this_0 = this.u18_1;
|
|
1417
2057
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1418
|
-
var _iterator__ex2g4s = this_0.
|
|
1419
|
-
while (_iterator__ex2g4s.
|
|
1420
|
-
var item = _iterator__ex2g4s.
|
|
1421
|
-
destination.
|
|
2058
|
+
var _iterator__ex2g4s = this_0.l();
|
|
2059
|
+
while (_iterator__ex2g4s.m()) {
|
|
2060
|
+
var item = _iterator__ex2g4s.n();
|
|
2061
|
+
destination.k(async(this.w18_1, VOID, VOID, Flux$forEachParallel$slambda$slambda_0(semaphore, this.v18_1, item, null)));
|
|
1422
2062
|
}
|
|
1423
2063
|
|
|
1424
2064
|
suspendResult = awaitAll(destination, this);
|
|
@@ -1430,52 +2070,52 @@
|
|
|
1430
2070
|
case 1:
|
|
1431
2071
|
return suspendResult;
|
|
1432
2072
|
case 2:
|
|
1433
|
-
throw this.
|
|
2073
|
+
throw this.j7_1;
|
|
1434
2074
|
}
|
|
1435
2075
|
} catch ($p) {
|
|
1436
2076
|
var e = $p;
|
|
1437
|
-
if (this.
|
|
2077
|
+
if (this.h7_1 === 2) {
|
|
1438
2078
|
throw e;
|
|
1439
2079
|
} else {
|
|
1440
|
-
this.
|
|
1441
|
-
this.
|
|
2080
|
+
this.g7_1 = this.h7_1;
|
|
2081
|
+
this.j7_1 = e;
|
|
1442
2082
|
}
|
|
1443
2083
|
}
|
|
1444
2084
|
while (true);
|
|
1445
2085
|
};
|
|
1446
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1447
|
-
var i = new Flux$forEachParallel$slambda(this
|
|
1448
|
-
i
|
|
2086
|
+
protoOf(Flux$forEachParallel$slambda).k18 = function ($this$coroutineScope, completion) {
|
|
2087
|
+
var i = new Flux$forEachParallel$slambda(this.t18_1, this.u18_1, this.v18_1, completion);
|
|
2088
|
+
i.w18_1 = $this$coroutineScope;
|
|
1449
2089
|
return i;
|
|
1450
2090
|
};
|
|
1451
2091
|
function Flux$forEachParallel$slambda_0($maxParallel, $items, $action, resultContinuation) {
|
|
1452
2092
|
var i = new Flux$forEachParallel$slambda($maxParallel, $items, $action, resultContinuation);
|
|
1453
2093
|
return constructCallableReference(function ($this$coroutineScope, $completion) {
|
|
1454
|
-
return i.
|
|
2094
|
+
return i.x18($this$coroutineScope, $completion);
|
|
1455
2095
|
}, 1);
|
|
1456
2096
|
}
|
|
1457
2097
|
function $forEachParallelCOROUTINE$(_this__u8e3s4, items, maxParallel, action, resultContinuation) {
|
|
1458
2098
|
CoroutineImpl.call(this, resultContinuation);
|
|
1459
|
-
this.
|
|
1460
|
-
this.
|
|
1461
|
-
this.
|
|
1462
|
-
this.
|
|
2099
|
+
this.g19_1 = _this__u8e3s4;
|
|
2100
|
+
this.h19_1 = items;
|
|
2101
|
+
this.i19_1 = maxParallel;
|
|
2102
|
+
this.j19_1 = action;
|
|
1463
2103
|
}
|
|
1464
|
-
protoOf($forEachParallelCOROUTINE$).
|
|
1465
|
-
var suspendResult = this.
|
|
2104
|
+
protoOf($forEachParallelCOROUTINE$).o7 = function () {
|
|
2105
|
+
var suspendResult = this.i7_1;
|
|
1466
2106
|
$sm: do
|
|
1467
2107
|
try {
|
|
1468
|
-
var tmp = this.
|
|
2108
|
+
var tmp = this.g7_1;
|
|
1469
2109
|
switch (tmp) {
|
|
1470
2110
|
case 0:
|
|
1471
|
-
this.
|
|
1472
|
-
if (!(this.
|
|
1473
|
-
var message = 'maxParallel must be >= 1, got ' + this.
|
|
2111
|
+
this.h7_1 = 2;
|
|
2112
|
+
if (!(this.i19_1 >= 1)) {
|
|
2113
|
+
var message = 'maxParallel must be >= 1, got ' + this.i19_1;
|
|
1474
2114
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1475
2115
|
}
|
|
1476
2116
|
|
|
1477
|
-
this.
|
|
1478
|
-
suspendResult = coroutineScope(Flux$forEachParallel$slambda_0(this.
|
|
2117
|
+
this.g7_1 = 1;
|
|
2118
|
+
suspendResult = coroutineScope(Flux$forEachParallel$slambda_0(this.i19_1, this.h19_1, this.j19_1, null), this);
|
|
1479
2119
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1480
2120
|
return suspendResult;
|
|
1481
2121
|
}
|
|
@@ -1484,39 +2124,88 @@
|
|
|
1484
2124
|
case 1:
|
|
1485
2125
|
return Unit_instance;
|
|
1486
2126
|
case 2:
|
|
1487
|
-
throw this.
|
|
2127
|
+
throw this.j7_1;
|
|
1488
2128
|
}
|
|
1489
2129
|
} catch ($p) {
|
|
1490
2130
|
var e = $p;
|
|
1491
|
-
if (this.
|
|
2131
|
+
if (this.h7_1 === 2) {
|
|
1492
2132
|
throw e;
|
|
1493
2133
|
} else {
|
|
1494
|
-
this.
|
|
1495
|
-
this.
|
|
2134
|
+
this.g7_1 = this.h7_1;
|
|
2135
|
+
this.j7_1 = e;
|
|
1496
2136
|
}
|
|
1497
2137
|
}
|
|
1498
2138
|
while (true);
|
|
1499
2139
|
};
|
|
1500
2140
|
function Flux() {
|
|
1501
2141
|
}
|
|
1502
|
-
protoOf(Flux).
|
|
2142
|
+
protoOf(Flux).a10 = function (items, maxParallel, action, $completion) {
|
|
1503
2143
|
var tmp = new $forEachParallelCOROUTINE$(this, items, maxParallel, action, $completion);
|
|
1504
|
-
tmp.
|
|
1505
|
-
tmp.
|
|
1506
|
-
return tmp.
|
|
2144
|
+
tmp.i7_1 = Unit_instance;
|
|
2145
|
+
tmp.j7_1 = null;
|
|
2146
|
+
return tmp.o7();
|
|
1507
2147
|
};
|
|
1508
2148
|
var Flux_instance;
|
|
1509
2149
|
function Flux_getInstance() {
|
|
1510
2150
|
return Flux_instance;
|
|
1511
2151
|
}
|
|
2152
|
+
var static_init_called_1;
|
|
2153
|
+
function static_init_1() {
|
|
2154
|
+
if (static_init_called_1)
|
|
2155
|
+
return Unit_instance;
|
|
2156
|
+
static_init_called_1 = true;
|
|
2157
|
+
IgnLidarHdLayer_MNT_instance = new IgnLidarHdLayer('MNT', 0, 'IGNF_LIDAR-HD_MNT_ELEVATION.ELEVATIONGRIDCOVERAGE.WGS84G');
|
|
2158
|
+
IgnLidarHdLayer_MNS_instance = new IgnLidarHdLayer('MNS', 1, 'IGNF_LIDAR-HD_MNS_ELEVATION.ELEVATIONGRIDCOVERAGE.WGS84G');
|
|
2159
|
+
IgnLidarHdLayer_MNH_instance = new IgnLidarHdLayer('MNH', 2, 'IGNF_LIDAR-HD_MNH_ELEVATION.ELEVATIONGRIDCOVERAGE.WGS84G');
|
|
2160
|
+
}
|
|
2161
|
+
var IgnLidarHdLayer_MNT_instance;
|
|
2162
|
+
var IgnLidarHdLayer_MNS_instance;
|
|
2163
|
+
var IgnLidarHdLayer_MNH_instance;
|
|
2164
|
+
function IgnLidarHdLayer(name, ordinal, wmsLayer) {
|
|
2165
|
+
Enum.call(this, name, ordinal);
|
|
2166
|
+
this.t17_1 = wmsLayer;
|
|
2167
|
+
}
|
|
2168
|
+
protoOf(IgnLidarHdLayer).q17 = function () {
|
|
2169
|
+
return 15;
|
|
2170
|
+
};
|
|
2171
|
+
protoOf(IgnLidarHdLayer).u17 = function (zoomLevel) {
|
|
2172
|
+
var tmp1_zoomLevel = zoomLevel == null ? this.q17() : zoomLevel;
|
|
2173
|
+
var tmp3_tileUrlTemplate = ignWmsTemplate(this.t17_1, 256);
|
|
2174
|
+
var tmp4_encoding = TileEncoding_BIL32_getInstance();
|
|
2175
|
+
var tmp5_attribution = new Attribution('\xA9 IGN \u2014 LiDAR HD ' + this.u1_1 + ', Licence Ouverte Etalab 2.0', 'https://geoservices.ign.fr/lidarhd');
|
|
2176
|
+
return new ElevationProviderConfig(tmp1_zoomLevel, VOID, tmp3_tileUrlTemplate, 256, tmp5_attribution, tmp4_encoding, 20);
|
|
2177
|
+
};
|
|
2178
|
+
function provider_0(_this__u8e3s4, zoomLevel, fetcherFor) {
|
|
2179
|
+
zoomLevel = zoomLevel === VOID ? null : zoomLevel;
|
|
2180
|
+
var tmp;
|
|
2181
|
+
if (fetcherFor === VOID) {
|
|
2182
|
+
tmp = defaultTileFetcher$ref();
|
|
2183
|
+
} else {
|
|
2184
|
+
tmp = fetcherFor;
|
|
2185
|
+
}
|
|
2186
|
+
fetcherFor = tmp;
|
|
2187
|
+
var config = _this__u8e3s4.u17(zoomLevel);
|
|
2188
|
+
return ElevationProvider_init_$Create$_0(config, fetcherFor(config), true);
|
|
2189
|
+
}
|
|
2190
|
+
function ignWmsTemplate(layer, tileSize) {
|
|
2191
|
+
return 'https://data.geopf.fr/wms-r/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=' + layer + '&STYLES=normal' + ('&CRS=EPSG:4326&BBOX={bbox}&WIDTH=' + tileSize + '&HEIGHT=' + tileSize + '&FORMAT=image%2Fx-bil%3Bbits%3D32');
|
|
2192
|
+
}
|
|
2193
|
+
function IgnLidarHdLayer_MNT_getInstance() {
|
|
2194
|
+
static_init_1();
|
|
2195
|
+
return IgnLidarHdLayer_MNT_instance;
|
|
2196
|
+
}
|
|
2197
|
+
function IgnLidarHdLayer_MNS_getInstance() {
|
|
2198
|
+
static_init_1();
|
|
2199
|
+
return IgnLidarHdLayer_MNS_instance;
|
|
2200
|
+
}
|
|
1512
2201
|
function Hit(value) {
|
|
1513
|
-
this.
|
|
2202
|
+
this.k19_1 = value;
|
|
1514
2203
|
}
|
|
1515
2204
|
function Await(deferred) {
|
|
1516
|
-
this.
|
|
2205
|
+
this.l19_1 = deferred;
|
|
1517
2206
|
}
|
|
1518
2207
|
function Owner(deferred) {
|
|
1519
|
-
this.
|
|
2208
|
+
this.m19_1 = deferred;
|
|
1520
2209
|
}
|
|
1521
2210
|
function LoadAbandoned() {
|
|
1522
2211
|
Exception_init_$Init$('load abandoned by its cancelled owner', this);
|
|
@@ -1524,42 +2213,42 @@
|
|
|
1524
2213
|
}
|
|
1525
2214
|
function lookupOrClaim($this, key, $completion) {
|
|
1526
2215
|
var tmp = new $lookupOrClaimCOROUTINE$($this, key, $completion);
|
|
1527
|
-
tmp.
|
|
1528
|
-
tmp.
|
|
1529
|
-
return tmp.
|
|
2216
|
+
tmp.i7_1 = Unit_instance;
|
|
2217
|
+
tmp.j7_1 = null;
|
|
2218
|
+
return tmp.o7();
|
|
1530
2219
|
}
|
|
1531
2220
|
function load($this, key, ours, $completion) {
|
|
1532
2221
|
var tmp = new $loadCOROUTINE$($this, key, ours, $completion);
|
|
1533
|
-
tmp.
|
|
1534
|
-
tmp.
|
|
1535
|
-
return tmp.
|
|
2222
|
+
tmp.i7_1 = Unit_instance;
|
|
2223
|
+
tmp.j7_1 = null;
|
|
2224
|
+
return tmp.o7();
|
|
1536
2225
|
}
|
|
1537
2226
|
function LruCache$load$slambda(this$0, $key, resultContinuation) {
|
|
1538
|
-
this.
|
|
1539
|
-
this
|
|
2227
|
+
this.v1a_1 = this$0;
|
|
2228
|
+
this.w1a_1 = $key;
|
|
1540
2229
|
CoroutineImpl.call(this, resultContinuation);
|
|
1541
2230
|
}
|
|
1542
|
-
protoOf(LruCache$load$slambda).
|
|
1543
|
-
var tmp = this.
|
|
1544
|
-
tmp.
|
|
1545
|
-
tmp.
|
|
1546
|
-
return tmp.
|
|
2231
|
+
protoOf(LruCache$load$slambda).a1b = function ($this$withContext, $completion) {
|
|
2232
|
+
var tmp = this.k18($this$withContext, $completion);
|
|
2233
|
+
tmp.i7_1 = Unit_instance;
|
|
2234
|
+
tmp.j7_1 = null;
|
|
2235
|
+
return tmp.o7();
|
|
1547
2236
|
};
|
|
1548
|
-
protoOf(LruCache$load$slambda).
|
|
1549
|
-
return this.
|
|
2237
|
+
protoOf(LruCache$load$slambda).w7 = function (p1, $completion) {
|
|
2238
|
+
return this.a1b((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1550
2239
|
};
|
|
1551
|
-
protoOf(LruCache$load$slambda).
|
|
1552
|
-
var suspendResult = this.
|
|
2240
|
+
protoOf(LruCache$load$slambda).o7 = function () {
|
|
2241
|
+
var suspendResult = this.i7_1;
|
|
1553
2242
|
$sm: do
|
|
1554
2243
|
try {
|
|
1555
|
-
var tmp = this.
|
|
2244
|
+
var tmp = this.g7_1;
|
|
1556
2245
|
switch (tmp) {
|
|
1557
2246
|
case 0:
|
|
1558
|
-
this.
|
|
1559
|
-
this.
|
|
1560
|
-
this.
|
|
1561
|
-
this.
|
|
1562
|
-
suspendResult = this.
|
|
2247
|
+
this.h7_1 = 2;
|
|
2248
|
+
this.z1a_1 = this.v1a_1.e1b_1;
|
|
2249
|
+
this.y1a_1 = null;
|
|
2250
|
+
this.g7_1 = 1;
|
|
2251
|
+
suspendResult = this.z1a_1.rv(this.y1a_1, this);
|
|
1563
2252
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1564
2253
|
return suspendResult;
|
|
1565
2254
|
}
|
|
@@ -1570,71 +2259,71 @@
|
|
|
1570
2259
|
l$ret$1: do {
|
|
1571
2260
|
var tmp_0;
|
|
1572
2261
|
try {
|
|
1573
|
-
tmp$ret$0 = this.
|
|
2262
|
+
tmp$ret$0 = this.v1a_1.g1b_1.t3(this.w1a_1);
|
|
1574
2263
|
break l$ret$1;
|
|
1575
2264
|
} catch ($p) {
|
|
1576
2265
|
var tmp_1;
|
|
1577
2266
|
var t = $p;
|
|
1578
|
-
this.
|
|
2267
|
+
this.z1a_1.cv(this.y1a_1);
|
|
1579
2268
|
throw t;
|
|
1580
2269
|
}
|
|
1581
2270
|
}
|
|
1582
2271
|
while (false);
|
|
1583
2272
|
var tmp_2 = tmp$ret$0;
|
|
1584
|
-
this.
|
|
2273
|
+
this.z1a_1.cv(this.y1a_1);
|
|
1585
2274
|
return tmp_2;
|
|
1586
2275
|
case 2:
|
|
1587
|
-
throw this.
|
|
2276
|
+
throw this.j7_1;
|
|
1588
2277
|
}
|
|
1589
2278
|
} catch ($p_0) {
|
|
1590
2279
|
var e = $p_0;
|
|
1591
|
-
if (this.
|
|
2280
|
+
if (this.h7_1 === 2) {
|
|
1592
2281
|
throw e;
|
|
1593
2282
|
} else {
|
|
1594
|
-
this.
|
|
1595
|
-
this.
|
|
2283
|
+
this.g7_1 = this.h7_1;
|
|
2284
|
+
this.j7_1 = e;
|
|
1596
2285
|
}
|
|
1597
2286
|
}
|
|
1598
2287
|
while (true);
|
|
1599
2288
|
};
|
|
1600
|
-
protoOf(LruCache$load$slambda).
|
|
1601
|
-
var i = new LruCache$load$slambda(this.
|
|
1602
|
-
i
|
|
2289
|
+
protoOf(LruCache$load$slambda).k18 = function ($this$withContext, completion) {
|
|
2290
|
+
var i = new LruCache$load$slambda(this.v1a_1, this.w1a_1, completion);
|
|
2291
|
+
i.x1a_1 = $this$withContext;
|
|
1603
2292
|
return i;
|
|
1604
2293
|
};
|
|
1605
2294
|
function LruCache$load$slambda_0(this$0, $key, resultContinuation) {
|
|
1606
2295
|
var i = new LruCache$load$slambda(this$0, $key, resultContinuation);
|
|
1607
2296
|
return constructCallableReference(function ($this$withContext, $completion) {
|
|
1608
|
-
return i.
|
|
2297
|
+
return i.a1b($this$withContext, $completion);
|
|
1609
2298
|
}, 1);
|
|
1610
2299
|
}
|
|
1611
2300
|
function LruCache$load$slambda_1(this$0, $key, $value, resultContinuation) {
|
|
1612
|
-
this.
|
|
1613
|
-
this
|
|
1614
|
-
this
|
|
2301
|
+
this.p1b_1 = this$0;
|
|
2302
|
+
this.q1b_1 = $key;
|
|
2303
|
+
this.r1b_1 = $value;
|
|
1615
2304
|
CoroutineImpl.call(this, resultContinuation);
|
|
1616
2305
|
}
|
|
1617
|
-
protoOf(LruCache$load$slambda_1).
|
|
1618
|
-
var tmp = this.
|
|
1619
|
-
tmp.
|
|
1620
|
-
tmp.
|
|
1621
|
-
return tmp.
|
|
2306
|
+
protoOf(LruCache$load$slambda_1).v1b = function ($this$withContext, $completion) {
|
|
2307
|
+
var tmp = this.k18($this$withContext, $completion);
|
|
2308
|
+
tmp.i7_1 = Unit_instance;
|
|
2309
|
+
tmp.j7_1 = null;
|
|
2310
|
+
return tmp.o7();
|
|
1622
2311
|
};
|
|
1623
|
-
protoOf(LruCache$load$slambda_1).
|
|
1624
|
-
return this.
|
|
2312
|
+
protoOf(LruCache$load$slambda_1).w7 = function (p1, $completion) {
|
|
2313
|
+
return this.v1b((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1625
2314
|
};
|
|
1626
|
-
protoOf(LruCache$load$slambda_1).
|
|
1627
|
-
var suspendResult = this.
|
|
2315
|
+
protoOf(LruCache$load$slambda_1).o7 = function () {
|
|
2316
|
+
var suspendResult = this.i7_1;
|
|
1628
2317
|
$sm: do
|
|
1629
2318
|
try {
|
|
1630
|
-
var tmp = this.
|
|
2319
|
+
var tmp = this.g7_1;
|
|
1631
2320
|
switch (tmp) {
|
|
1632
2321
|
case 0:
|
|
1633
|
-
this.
|
|
1634
|
-
this.
|
|
1635
|
-
this.
|
|
1636
|
-
this.
|
|
1637
|
-
suspendResult = this.
|
|
2322
|
+
this.h7_1 = 2;
|
|
2323
|
+
this.u1b_1 = this.p1b_1.e1b_1;
|
|
2324
|
+
this.t1b_1 = null;
|
|
2325
|
+
this.g7_1 = 1;
|
|
2326
|
+
suspendResult = this.u1b_1.rv(this.t1b_1, this);
|
|
1638
2327
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1639
2328
|
return suspendResult;
|
|
1640
2329
|
}
|
|
@@ -1645,86 +2334,86 @@
|
|
|
1645
2334
|
l$ret$1: do {
|
|
1646
2335
|
var tmp_0;
|
|
1647
2336
|
try {
|
|
1648
|
-
this.
|
|
2337
|
+
this.p1b_1.g1b_1.t3(this.q1b_1);
|
|
1649
2338
|
var oldest = null;
|
|
1650
2339
|
var tmp_1;
|
|
1651
|
-
if (this.
|
|
1652
|
-
var tmp0 = this.
|
|
1653
|
-
var key = this
|
|
1654
|
-
tmp_1 = !(isInterface(tmp0, KtMap) ? tmp0 : THROW_CCE()).
|
|
2340
|
+
if (this.p1b_1.f1b_1.o() >= this.p1b_1.b1b_1) {
|
|
2341
|
+
var tmp0 = this.p1b_1.f1b_1;
|
|
2342
|
+
var key = this.q1b_1;
|
|
2343
|
+
tmp_1 = !(isInterface(tmp0, KtMap) ? tmp0 : THROW_CCE()).o1(key);
|
|
1655
2344
|
} else {
|
|
1656
2345
|
tmp_1 = false;
|
|
1657
2346
|
}
|
|
1658
2347
|
if (tmp_1) {
|
|
1659
|
-
var iter = this.
|
|
1660
|
-
oldest = iter.
|
|
1661
|
-
iter.
|
|
2348
|
+
var iter = this.p1b_1.f1b_1.t1().l();
|
|
2349
|
+
oldest = iter.n().n1();
|
|
2350
|
+
iter.s2();
|
|
1662
2351
|
}
|
|
1663
|
-
var tmp0_0 = this.
|
|
1664
|
-
var tmp2 = this
|
|
1665
|
-
var value = this
|
|
1666
|
-
tmp0_0.
|
|
2352
|
+
var tmp0_0 = this.p1b_1.f1b_1;
|
|
2353
|
+
var tmp2 = this.q1b_1;
|
|
2354
|
+
var value = this.r1b_1;
|
|
2355
|
+
tmp0_0.s3(tmp2, value);
|
|
1667
2356
|
tmp$ret$0 = oldest;
|
|
1668
2357
|
break l$ret$1;
|
|
1669
2358
|
} catch ($p) {
|
|
1670
2359
|
var tmp_2;
|
|
1671
2360
|
var t = $p;
|
|
1672
|
-
this.
|
|
2361
|
+
this.u1b_1.cv(this.t1b_1);
|
|
1673
2362
|
throw t;
|
|
1674
2363
|
}
|
|
1675
2364
|
}
|
|
1676
2365
|
while (false);
|
|
1677
2366
|
var tmp_3 = tmp$ret$0;
|
|
1678
|
-
this.
|
|
2367
|
+
this.u1b_1.cv(this.t1b_1);
|
|
1679
2368
|
return tmp_3;
|
|
1680
2369
|
case 2:
|
|
1681
|
-
throw this.
|
|
2370
|
+
throw this.j7_1;
|
|
1682
2371
|
}
|
|
1683
2372
|
} catch ($p_0) {
|
|
1684
2373
|
var e = $p_0;
|
|
1685
|
-
if (this.
|
|
2374
|
+
if (this.h7_1 === 2) {
|
|
1686
2375
|
throw e;
|
|
1687
2376
|
} else {
|
|
1688
|
-
this.
|
|
1689
|
-
this.
|
|
2377
|
+
this.g7_1 = this.h7_1;
|
|
2378
|
+
this.j7_1 = e;
|
|
1690
2379
|
}
|
|
1691
2380
|
}
|
|
1692
2381
|
while (true);
|
|
1693
2382
|
};
|
|
1694
|
-
protoOf(LruCache$load$slambda_1).
|
|
1695
|
-
var i = new LruCache$load$slambda_1(this.
|
|
1696
|
-
i
|
|
2383
|
+
protoOf(LruCache$load$slambda_1).k18 = function ($this$withContext, completion) {
|
|
2384
|
+
var i = new LruCache$load$slambda_1(this.p1b_1, this.q1b_1, this.r1b_1, completion);
|
|
2385
|
+
i.s1b_1 = $this$withContext;
|
|
1697
2386
|
return i;
|
|
1698
2387
|
};
|
|
1699
2388
|
function LruCache$load$slambda_2(this$0, $key, $value, resultContinuation) {
|
|
1700
2389
|
var i = new LruCache$load$slambda_1(this$0, $key, $value, resultContinuation);
|
|
1701
2390
|
return constructCallableReference(function ($this$withContext, $completion) {
|
|
1702
|
-
return i.
|
|
2391
|
+
return i.v1b($this$withContext, $completion);
|
|
1703
2392
|
}, 1);
|
|
1704
2393
|
}
|
|
1705
2394
|
function $getCOROUTINE$(_this__u8e3s4, key, resultContinuation) {
|
|
1706
2395
|
CoroutineImpl.call(this, resultContinuation);
|
|
1707
|
-
this.
|
|
1708
|
-
this.
|
|
2396
|
+
this.e1c_1 = _this__u8e3s4;
|
|
2397
|
+
this.f1c_1 = key;
|
|
1709
2398
|
}
|
|
1710
|
-
protoOf($getCOROUTINE$).
|
|
1711
|
-
var suspendResult = this.
|
|
2399
|
+
protoOf($getCOROUTINE$).o7 = function () {
|
|
2400
|
+
var suspendResult = this.i7_1;
|
|
1712
2401
|
$sm: do
|
|
1713
2402
|
try {
|
|
1714
|
-
var tmp = this.
|
|
2403
|
+
var tmp = this.g7_1;
|
|
1715
2404
|
switch (tmp) {
|
|
1716
2405
|
case 0:
|
|
1717
|
-
this.
|
|
1718
|
-
this.
|
|
2406
|
+
this.h7_1 = 8;
|
|
2407
|
+
this.g7_1 = 1;
|
|
1719
2408
|
continue $sm;
|
|
1720
2409
|
case 1:
|
|
1721
2410
|
if (!true) {
|
|
1722
|
-
this.
|
|
2411
|
+
this.g7_1 = 9;
|
|
1723
2412
|
continue $sm;
|
|
1724
2413
|
}
|
|
1725
2414
|
|
|
1726
|
-
this.
|
|
1727
|
-
suspendResult = lookupOrClaim(this.
|
|
2415
|
+
this.g7_1 = 2;
|
|
2416
|
+
suspendResult = lookupOrClaim(this.e1c_1, this.f1c_1, this);
|
|
1728
2417
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1729
2418
|
return suspendResult;
|
|
1730
2419
|
}
|
|
@@ -1733,20 +2422,20 @@
|
|
|
1733
2422
|
case 2:
|
|
1734
2423
|
var lookup = suspendResult;
|
|
1735
2424
|
if (lookup instanceof Hit) {
|
|
1736
|
-
return lookup.
|
|
2425
|
+
return lookup.k19_1;
|
|
1737
2426
|
} else {
|
|
1738
2427
|
if (lookup instanceof Owner) {
|
|
1739
|
-
this.
|
|
1740
|
-
suspendResult = load(this.
|
|
2428
|
+
this.g7_1 = 7;
|
|
2429
|
+
suspendResult = load(this.e1c_1, this.f1c_1, lookup.m19_1, this);
|
|
1741
2430
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1742
2431
|
return suspendResult;
|
|
1743
2432
|
}
|
|
1744
2433
|
continue $sm;
|
|
1745
2434
|
} else {
|
|
1746
2435
|
if (lookup instanceof Await) {
|
|
1747
|
-
this.
|
|
1748
|
-
this.
|
|
1749
|
-
suspendResult = lookup.
|
|
2436
|
+
this.h7_1 = 4;
|
|
2437
|
+
this.g7_1 = 3;
|
|
2438
|
+
suspendResult = lookup.l19_1.gn(this);
|
|
1750
2439
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1751
2440
|
return suspendResult;
|
|
1752
2441
|
}
|
|
@@ -1761,58 +2450,58 @@
|
|
|
1761
2450
|
case 3:
|
|
1762
2451
|
return suspendResult;
|
|
1763
2452
|
case 4:
|
|
1764
|
-
this.
|
|
1765
|
-
var tmp_0 = this.
|
|
2453
|
+
this.h7_1 = 8;
|
|
2454
|
+
var tmp_0 = this.j7_1;
|
|
1766
2455
|
if (tmp_0 instanceof LoadAbandoned) {
|
|
1767
|
-
var _unused_var__etf5q3 = this.
|
|
1768
|
-
this.
|
|
2456
|
+
var _unused_var__etf5q3 = this.j7_1;
|
|
2457
|
+
this.g7_1 = 5;
|
|
1769
2458
|
continue $sm;
|
|
1770
2459
|
} else {
|
|
1771
|
-
throw this.
|
|
2460
|
+
throw this.j7_1;
|
|
1772
2461
|
}
|
|
1773
2462
|
|
|
1774
2463
|
case 5:
|
|
1775
|
-
this.
|
|
1776
|
-
this.
|
|
2464
|
+
this.h7_1 = 8;
|
|
2465
|
+
this.g7_1 = 6;
|
|
1777
2466
|
continue $sm;
|
|
1778
2467
|
case 6:
|
|
1779
|
-
this.
|
|
2468
|
+
this.g7_1 = 1;
|
|
1780
2469
|
continue $sm;
|
|
1781
2470
|
case 7:
|
|
1782
2471
|
return suspendResult;
|
|
1783
2472
|
case 8:
|
|
1784
|
-
throw this.
|
|
2473
|
+
throw this.j7_1;
|
|
1785
2474
|
case 9:
|
|
1786
2475
|
return Unit_instance;
|
|
1787
2476
|
}
|
|
1788
2477
|
} catch ($p) {
|
|
1789
2478
|
var e = $p;
|
|
1790
|
-
if (this.
|
|
2479
|
+
if (this.h7_1 === 8) {
|
|
1791
2480
|
throw e;
|
|
1792
2481
|
} else {
|
|
1793
|
-
this.
|
|
1794
|
-
this.
|
|
2482
|
+
this.g7_1 = this.h7_1;
|
|
2483
|
+
this.j7_1 = e;
|
|
1795
2484
|
}
|
|
1796
2485
|
}
|
|
1797
2486
|
while (true);
|
|
1798
2487
|
};
|
|
1799
2488
|
function $lookupOrClaimCOROUTINE$(_this__u8e3s4, key, resultContinuation) {
|
|
1800
2489
|
CoroutineImpl.call(this, resultContinuation);
|
|
1801
|
-
this.
|
|
1802
|
-
this.
|
|
2490
|
+
this.v19_1 = _this__u8e3s4;
|
|
2491
|
+
this.w19_1 = key;
|
|
1803
2492
|
}
|
|
1804
|
-
protoOf($lookupOrClaimCOROUTINE$).
|
|
1805
|
-
var suspendResult = this.
|
|
2493
|
+
protoOf($lookupOrClaimCOROUTINE$).o7 = function () {
|
|
2494
|
+
var suspendResult = this.i7_1;
|
|
1806
2495
|
$sm: do
|
|
1807
2496
|
try {
|
|
1808
|
-
var tmp = this.
|
|
2497
|
+
var tmp = this.g7_1;
|
|
1809
2498
|
switch (tmp) {
|
|
1810
2499
|
case 0:
|
|
1811
|
-
this.
|
|
1812
|
-
this.
|
|
1813
|
-
this.
|
|
1814
|
-
this.
|
|
1815
|
-
suspendResult = this.
|
|
2500
|
+
this.h7_1 = 2;
|
|
2501
|
+
this.y19_1 = this.v19_1.e1b_1;
|
|
2502
|
+
this.x19_1 = null;
|
|
2503
|
+
this.g7_1 = 1;
|
|
2504
|
+
suspendResult = this.y19_1.rv(this.x19_1, this);
|
|
1816
2505
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1817
2506
|
return suspendResult;
|
|
1818
2507
|
}
|
|
@@ -1825,23 +2514,23 @@
|
|
|
1825
2514
|
try {
|
|
1826
2515
|
var tmp$ret$0 = Unit_instance;
|
|
1827
2516
|
l$ret$1: do {
|
|
1828
|
-
var hit = this.
|
|
2517
|
+
var hit = this.v19_1.f1b_1.t3(this.w19_1);
|
|
1829
2518
|
if (!(hit == null)) {
|
|
1830
|
-
var tmp0 = this.
|
|
1831
|
-
var key = this.
|
|
1832
|
-
tmp0.
|
|
2519
|
+
var tmp0 = this.v19_1.f1b_1;
|
|
2520
|
+
var key = this.w19_1;
|
|
2521
|
+
tmp0.s3(key, hit);
|
|
1833
2522
|
tmp$ret$0 = new Hit(hit);
|
|
1834
2523
|
break l$ret$1;
|
|
1835
2524
|
}
|
|
1836
|
-
var raced = this.
|
|
2525
|
+
var raced = this.v19_1.g1b_1.q1(this.w19_1);
|
|
1837
2526
|
var tmp_1;
|
|
1838
2527
|
if (!(raced == null)) {
|
|
1839
2528
|
tmp_1 = new Await(raced);
|
|
1840
2529
|
} else {
|
|
1841
2530
|
var ours = CompletableDeferred();
|
|
1842
|
-
var tmp0_0 = this.
|
|
1843
|
-
var key_0 = this.
|
|
1844
|
-
tmp0_0.
|
|
2531
|
+
var tmp0_0 = this.v19_1.g1b_1;
|
|
2532
|
+
var key_0 = this.w19_1;
|
|
2533
|
+
tmp0_0.s3(key_0, ours);
|
|
1845
2534
|
tmp_1 = new Owner(ours);
|
|
1846
2535
|
}
|
|
1847
2536
|
tmp$ret$0 = tmp_1;
|
|
@@ -1852,89 +2541,89 @@
|
|
|
1852
2541
|
} catch ($p) {
|
|
1853
2542
|
var tmp_2;
|
|
1854
2543
|
var t = $p;
|
|
1855
|
-
this.
|
|
2544
|
+
this.y19_1.cv(this.x19_1);
|
|
1856
2545
|
throw t;
|
|
1857
2546
|
}
|
|
1858
2547
|
}
|
|
1859
2548
|
while (false);
|
|
1860
2549
|
var tmp_3 = tmp$ret$2;
|
|
1861
|
-
this.
|
|
2550
|
+
this.y19_1.cv(this.x19_1);
|
|
1862
2551
|
return tmp_3;
|
|
1863
2552
|
case 2:
|
|
1864
|
-
throw this.
|
|
2553
|
+
throw this.j7_1;
|
|
1865
2554
|
}
|
|
1866
2555
|
} catch ($p_0) {
|
|
1867
2556
|
var e = $p_0;
|
|
1868
|
-
if (this.
|
|
2557
|
+
if (this.h7_1 === 2) {
|
|
1869
2558
|
throw e;
|
|
1870
2559
|
} else {
|
|
1871
|
-
this.
|
|
1872
|
-
this.
|
|
2560
|
+
this.g7_1 = this.h7_1;
|
|
2561
|
+
this.j7_1 = e;
|
|
1873
2562
|
}
|
|
1874
2563
|
}
|
|
1875
2564
|
while (true);
|
|
1876
2565
|
};
|
|
1877
2566
|
function $loadCOROUTINE$(_this__u8e3s4, key, ours, resultContinuation) {
|
|
1878
2567
|
CoroutineImpl.call(this, resultContinuation);
|
|
1879
|
-
this.
|
|
1880
|
-
this.
|
|
1881
|
-
this.
|
|
2568
|
+
this.h1a_1 = _this__u8e3s4;
|
|
2569
|
+
this.i1a_1 = key;
|
|
2570
|
+
this.j1a_1 = ours;
|
|
1882
2571
|
}
|
|
1883
|
-
protoOf($loadCOROUTINE$).
|
|
1884
|
-
var suspendResult = this.
|
|
2572
|
+
protoOf($loadCOROUTINE$).o7 = function () {
|
|
2573
|
+
var suspendResult = this.i7_1;
|
|
1885
2574
|
$sm: do
|
|
1886
2575
|
try {
|
|
1887
|
-
var tmp = this.
|
|
2576
|
+
var tmp = this.g7_1;
|
|
1888
2577
|
switch (tmp) {
|
|
1889
2578
|
case 0:
|
|
1890
|
-
this.
|
|
1891
|
-
this.
|
|
1892
|
-
this.
|
|
1893
|
-
suspendResult = this.
|
|
2579
|
+
this.h7_1 = 6;
|
|
2580
|
+
this.h7_1 = 2;
|
|
2581
|
+
this.g7_1 = 1;
|
|
2582
|
+
suspendResult = this.h1a_1.c1b_1(this.i1a_1, this);
|
|
1894
2583
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1895
2584
|
return suspendResult;
|
|
1896
2585
|
}
|
|
1897
2586
|
|
|
1898
2587
|
continue $sm;
|
|
1899
2588
|
case 1:
|
|
1900
|
-
this.
|
|
1901
|
-
this.
|
|
1902
|
-
this.
|
|
2589
|
+
this.l1a_1 = suspendResult;
|
|
2590
|
+
this.h7_1 = 6;
|
|
2591
|
+
this.g7_1 = 4;
|
|
1903
2592
|
continue $sm;
|
|
1904
2593
|
case 2:
|
|
1905
|
-
this.
|
|
1906
|
-
var tmp_0 = this.
|
|
2594
|
+
this.h7_1 = 6;
|
|
2595
|
+
var tmp_0 = this.j7_1;
|
|
1907
2596
|
if (tmp_0 instanceof Error) {
|
|
1908
|
-
this.
|
|
1909
|
-
this.
|
|
2597
|
+
this.m1a_1 = this.j7_1;
|
|
2598
|
+
this.g7_1 = 3;
|
|
1910
2599
|
var tmp_1 = NonCancellable_getInstance();
|
|
1911
|
-
suspendResult = withContext(tmp_1, LruCache$load$slambda_0(this.
|
|
2600
|
+
suspendResult = withContext(tmp_1, LruCache$load$slambda_0(this.h1a_1, this.i1a_1, null), this);
|
|
1912
2601
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1913
2602
|
return suspendResult;
|
|
1914
2603
|
}
|
|
1915
2604
|
continue $sm;
|
|
1916
2605
|
} else {
|
|
1917
|
-
throw this.
|
|
2606
|
+
throw this.j7_1;
|
|
1918
2607
|
}
|
|
1919
2608
|
|
|
1920
2609
|
case 3:
|
|
1921
2610
|
var tmp_2;
|
|
1922
|
-
var tmp_3 = this.
|
|
2611
|
+
var tmp_3 = this.m1a_1;
|
|
1923
2612
|
if (tmp_3 instanceof CancellationException) {
|
|
1924
2613
|
tmp_2 = new LoadAbandoned();
|
|
1925
2614
|
} else {
|
|
1926
|
-
tmp_2 = this.
|
|
2615
|
+
tmp_2 = this.m1a_1;
|
|
1927
2616
|
}
|
|
1928
2617
|
|
|
1929
|
-
this.
|
|
2618
|
+
this.j1a_1.kq(tmp_2);
|
|
1930
2619
|
var tmp_4 = this;
|
|
1931
|
-
throw this.
|
|
2620
|
+
throw this.m1a_1;
|
|
1932
2621
|
case 4:
|
|
1933
|
-
this.
|
|
1934
|
-
this.
|
|
1935
|
-
this.
|
|
2622
|
+
this.h7_1 = 6;
|
|
2623
|
+
this.k1a_1 = this.l1a_1;
|
|
2624
|
+
this.g7_1 = 5;
|
|
1936
2625
|
var tmp_5 = NonCancellable_getInstance();
|
|
1937
|
-
suspendResult = withContext(tmp_5, LruCache$load$slambda_2(this.
|
|
2626
|
+
suspendResult = withContext(tmp_5, LruCache$load$slambda_2(this.h1a_1, this.i1a_1, this.k1a_1, null), this);
|
|
1938
2627
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1939
2628
|
return suspendResult;
|
|
1940
2629
|
}
|
|
@@ -1942,59 +2631,59 @@
|
|
|
1942
2631
|
continue $sm;
|
|
1943
2632
|
case 5:
|
|
1944
2633
|
var evicted = suspendResult;
|
|
1945
|
-
this.
|
|
2634
|
+
this.j1a_1.jq(this.k1a_1);
|
|
1946
2635
|
if (!(evicted == null)) {
|
|
1947
|
-
var tmp0_safe_receiver = this.
|
|
2636
|
+
var tmp0_safe_receiver = this.h1a_1.d1b_1;
|
|
1948
2637
|
if (tmp0_safe_receiver == null)
|
|
1949
2638
|
null;
|
|
1950
2639
|
else
|
|
1951
2640
|
tmp0_safe_receiver(evicted);
|
|
1952
2641
|
}
|
|
1953
2642
|
|
|
1954
|
-
return this.
|
|
2643
|
+
return this.k1a_1;
|
|
1955
2644
|
case 6:
|
|
1956
|
-
throw this.
|
|
2645
|
+
throw this.j7_1;
|
|
1957
2646
|
}
|
|
1958
2647
|
} catch ($p) {
|
|
1959
2648
|
var e = $p;
|
|
1960
|
-
if (this.
|
|
2649
|
+
if (this.h7_1 === 6) {
|
|
1961
2650
|
throw e;
|
|
1962
2651
|
} else {
|
|
1963
|
-
this.
|
|
1964
|
-
this.
|
|
2652
|
+
this.g7_1 = this.h7_1;
|
|
2653
|
+
this.j7_1 = e;
|
|
1965
2654
|
}
|
|
1966
2655
|
}
|
|
1967
2656
|
while (true);
|
|
1968
2657
|
};
|
|
1969
2658
|
function LruCache(maxSize, loader, onEvict) {
|
|
1970
2659
|
onEvict = onEvict === VOID ? null : onEvict;
|
|
1971
|
-
this.
|
|
1972
|
-
this.
|
|
1973
|
-
this.
|
|
2660
|
+
this.b1b_1 = maxSize;
|
|
2661
|
+
this.c1b_1 = loader;
|
|
2662
|
+
this.d1b_1 = onEvict;
|
|
1974
2663
|
// Inline function 'kotlin.require' call
|
|
1975
|
-
if (!(this.
|
|
2664
|
+
if (!(this.b1b_1 > 0)) {
|
|
1976
2665
|
var message = 'Cache size must be greater than 0';
|
|
1977
2666
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1978
2667
|
}
|
|
1979
|
-
this.
|
|
1980
|
-
this.
|
|
2668
|
+
this.e1b_1 = Mutex();
|
|
2669
|
+
this.f1b_1 = LinkedHashMap_init_$Create$();
|
|
1981
2670
|
var tmp = this;
|
|
1982
2671
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1983
|
-
tmp.
|
|
2672
|
+
tmp.g1b_1 = LinkedHashMap_init_$Create$();
|
|
1984
2673
|
}
|
|
1985
|
-
protoOf(LruCache).
|
|
2674
|
+
protoOf(LruCache).g1c = function (key, $completion) {
|
|
1986
2675
|
var tmp = new $getCOROUTINE$(this, key, $completion);
|
|
1987
|
-
tmp.
|
|
1988
|
-
tmp.
|
|
1989
|
-
return tmp.
|
|
2676
|
+
tmp.i7_1 = Unit_instance;
|
|
2677
|
+
tmp.j7_1 = null;
|
|
2678
|
+
return tmp.o7();
|
|
1990
2679
|
};
|
|
1991
2680
|
function RawTile(width, height, rgba) {
|
|
1992
|
-
this.
|
|
1993
|
-
this.
|
|
1994
|
-
this.
|
|
2681
|
+
this.h1c_1 = width;
|
|
2682
|
+
this.i1c_1 = height;
|
|
2683
|
+
this.j1c_1 = rgba;
|
|
1995
2684
|
// Inline function 'kotlin.require' call
|
|
1996
|
-
if (!(this.
|
|
1997
|
-
var message = 'rgba size ' + this.
|
|
2685
|
+
if (!(this.j1c_1.length === imul(imul(this.h1c_1, this.i1c_1), 4))) {
|
|
2686
|
+
var message = 'rgba size ' + this.j1c_1.length + ' does not match width*height*4 (' + imul(imul(this.h1c_1, this.i1c_1), 4) + ')';
|
|
1998
2687
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1999
2688
|
}
|
|
2000
2689
|
}
|
|
@@ -2003,109 +2692,111 @@
|
|
|
2003
2692
|
return true;
|
|
2004
2693
|
if (!(other instanceof RawTile))
|
|
2005
2694
|
return false;
|
|
2006
|
-
return this.
|
|
2695
|
+
return this.h1c_1 === other.h1c_1 && this.i1c_1 === other.i1c_1 && contentEquals(this.j1c_1, other.j1c_1);
|
|
2007
2696
|
};
|
|
2008
2697
|
protoOf(RawTile).hashCode = function () {
|
|
2009
|
-
var result = this.
|
|
2010
|
-
result = imul(31, result) + this.
|
|
2011
|
-
result = imul(31, result) + contentHashCode(this.
|
|
2698
|
+
var result = this.h1c_1;
|
|
2699
|
+
result = imul(31, result) + this.i1c_1 | 0;
|
|
2700
|
+
result = imul(31, result) + contentHashCode(this.j1c_1) | 0;
|
|
2012
2701
|
return result;
|
|
2013
2702
|
};
|
|
2014
2703
|
function Tile_init_$Init$(raw, $this) {
|
|
2015
|
-
Tile.call($this, raw.
|
|
2704
|
+
Tile.call($this, raw.h1c_1, raw.i1c_1, raw.j1c_1);
|
|
2016
2705
|
return $this;
|
|
2017
2706
|
}
|
|
2018
2707
|
function Tile_init_$Create$(raw) {
|
|
2019
2708
|
return Tile_init_$Init$(raw, objectCreate(protoOf(Tile)));
|
|
2020
2709
|
}
|
|
2021
|
-
function
|
|
2710
|
+
function Companion_0() {
|
|
2022
2711
|
}
|
|
2023
|
-
protoOf(
|
|
2712
|
+
protoOf(Companion_0).k1c = function (r, g, b) {
|
|
2024
2713
|
var raw = r * 256.0 + g + b / 256.0 - 32768.0;
|
|
2025
2714
|
return round(raw * 100.0) / 100.0;
|
|
2026
2715
|
};
|
|
2027
|
-
var
|
|
2028
|
-
function
|
|
2029
|
-
return
|
|
2716
|
+
var Companion_instance_1;
|
|
2717
|
+
function Companion_getInstance_0() {
|
|
2718
|
+
return Companion_instance_1;
|
|
2030
2719
|
}
|
|
2031
2720
|
function Tile(width, height, rgba) {
|
|
2032
|
-
this.
|
|
2033
|
-
this.
|
|
2034
|
-
this.
|
|
2721
|
+
this.u13_1 = width;
|
|
2722
|
+
this.v13_1 = height;
|
|
2723
|
+
this.w13_1 = rgba;
|
|
2035
2724
|
var tmp = this;
|
|
2036
2725
|
var tmp_0 = 0;
|
|
2037
|
-
var tmp_1 = imul(this.
|
|
2726
|
+
var tmp_1 = imul(this.u13_1, this.v13_1);
|
|
2038
2727
|
var tmp_2 = new Float64Array(tmp_1);
|
|
2039
2728
|
while (tmp_0 < tmp_1) {
|
|
2040
2729
|
tmp_2[tmp_0] = NaN;
|
|
2041
2730
|
tmp_0 = tmp_0 + 1 | 0;
|
|
2042
2731
|
}
|
|
2043
|
-
tmp.
|
|
2044
|
-
this.
|
|
2732
|
+
tmp.x13_1 = tmp_2;
|
|
2733
|
+
this.y13_1 = 0;
|
|
2045
2734
|
}
|
|
2046
|
-
protoOf(Tile).
|
|
2047
|
-
var containsUpper = this.
|
|
2048
|
-
var containsArg = pixel.
|
|
2735
|
+
protoOf(Tile).z13 = function (pixel) {
|
|
2736
|
+
var containsUpper = this.u13_1;
|
|
2737
|
+
var containsArg = pixel.o13_1;
|
|
2049
2738
|
// Inline function 'kotlin.require' call
|
|
2050
2739
|
if (!(0 <= containsArg ? containsArg < containsUpper : false)) {
|
|
2051
|
-
var message = 'Invalid x position: ' + pixel.
|
|
2740
|
+
var message = 'Invalid x position: ' + pixel.o13_1 + '. Must be between 0 and ' + (this.u13_1 - 1 | 0);
|
|
2052
2741
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2053
2742
|
}
|
|
2054
|
-
var containsUpper_0 = this.
|
|
2055
|
-
var containsArg_0 = pixel.
|
|
2743
|
+
var containsUpper_0 = this.v13_1;
|
|
2744
|
+
var containsArg_0 = pixel.p13_1;
|
|
2056
2745
|
// Inline function 'kotlin.require' call
|
|
2057
2746
|
if (!(0 <= containsArg_0 ? containsArg_0 < containsUpper_0 : false)) {
|
|
2058
|
-
var message_0 = 'Invalid y position: ' + pixel.
|
|
2747
|
+
var message_0 = 'Invalid y position: ' + pixel.p13_1 + '. Must be between 0 and ' + (this.v13_1 - 1 | 0);
|
|
2059
2748
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
2060
2749
|
}
|
|
2061
|
-
var idx = imul(pixel.
|
|
2062
|
-
var cached = this.
|
|
2750
|
+
var idx = imul(pixel.p13_1, this.u13_1) + pixel.o13_1 | 0;
|
|
2751
|
+
var cached = this.x13_1[idx];
|
|
2063
2752
|
if (!isNaN_0(cached))
|
|
2064
2753
|
return cached;
|
|
2065
2754
|
var byteOffset = imul(idx, 4);
|
|
2066
|
-
var r = this.
|
|
2067
|
-
var g = this.
|
|
2068
|
-
var b = this.
|
|
2069
|
-
var elevation =
|
|
2070
|
-
this.
|
|
2071
|
-
this.
|
|
2755
|
+
var r = this.w13_1[byteOffset] & 255;
|
|
2756
|
+
var g = this.w13_1[byteOffset + 1 | 0] & 255;
|
|
2757
|
+
var b = this.w13_1[byteOffset + 2 | 0] & 255;
|
|
2758
|
+
var elevation = r === 0 && g === 0 && b === 0 ? NaN : Companion_instance_1.k1c(r, g, b);
|
|
2759
|
+
this.x13_1[idx] = elevation;
|
|
2760
|
+
this.y13_1 = this.y13_1 + 1 | 0;
|
|
2072
2761
|
return elevation;
|
|
2073
2762
|
};
|
|
2074
2763
|
function buildUrl($this, tc) {
|
|
2075
|
-
|
|
2764
|
+
// Inline function 'kotlin.let' call
|
|
2765
|
+
var it = replace(replace(replace($this.q13_1, '{z}', tc.zz_1.toString()), '{x}', tc.xz_1.toString()), '{y}', tc.yz_1.toString());
|
|
2766
|
+
return contains(it, '{bbox}') ? replace(it, '{bbox}', wmsBbox4326(tc)) : it;
|
|
2076
2767
|
}
|
|
2077
2768
|
function fetchAndDecodeTile$ref_0() {
|
|
2078
2769
|
KFunctionImpl.call(this, 1, 2, 2);
|
|
2079
2770
|
}
|
|
2080
|
-
protoOf(fetchAndDecodeTile$ref_0).
|
|
2771
|
+
protoOf(fetchAndDecodeTile$ref_0).h16 = function (p0, $completion) {
|
|
2081
2772
|
return fetchAndDecodeTile(p0, $completion);
|
|
2082
2773
|
};
|
|
2083
|
-
protoOf(fetchAndDecodeTile$ref_0).
|
|
2084
|
-
return this.
|
|
2774
|
+
protoOf(fetchAndDecodeTile$ref_0).w7 = function (p1, $completion) {
|
|
2775
|
+
return this.h16((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
|
|
2085
2776
|
};
|
|
2086
2777
|
function TileManager$cache$slambda(this$0, resultContinuation) {
|
|
2087
|
-
this.
|
|
2778
|
+
this.w1c_1 = this$0;
|
|
2088
2779
|
CoroutineImpl.call(this, resultContinuation);
|
|
2089
2780
|
}
|
|
2090
|
-
protoOf(TileManager$cache$slambda).
|
|
2091
|
-
var tmp = this.
|
|
2092
|
-
tmp.
|
|
2093
|
-
tmp.
|
|
2094
|
-
return tmp.
|
|
2781
|
+
protoOf(TileManager$cache$slambda).y1c = function (tc, $completion) {
|
|
2782
|
+
var tmp = this.z1c(tc, $completion);
|
|
2783
|
+
tmp.i7_1 = Unit_instance;
|
|
2784
|
+
tmp.j7_1 = null;
|
|
2785
|
+
return tmp.o7();
|
|
2095
2786
|
};
|
|
2096
|
-
protoOf(TileManager$cache$slambda).
|
|
2097
|
-
return this.
|
|
2787
|
+
protoOf(TileManager$cache$slambda).w7 = function (p1, $completion) {
|
|
2788
|
+
return this.y1c(p1 instanceof TileCoordinates ? p1 : THROW_CCE(), $completion);
|
|
2098
2789
|
};
|
|
2099
|
-
protoOf(TileManager$cache$slambda).
|
|
2100
|
-
var suspendResult = this.
|
|
2790
|
+
protoOf(TileManager$cache$slambda).o7 = function () {
|
|
2791
|
+
var suspendResult = this.i7_1;
|
|
2101
2792
|
$sm: do
|
|
2102
2793
|
try {
|
|
2103
|
-
var tmp = this.
|
|
2794
|
+
var tmp = this.g7_1;
|
|
2104
2795
|
switch (tmp) {
|
|
2105
2796
|
case 0:
|
|
2106
|
-
this.
|
|
2107
|
-
this.
|
|
2108
|
-
suspendResult = this.
|
|
2797
|
+
this.h7_1 = 2;
|
|
2798
|
+
this.g7_1 = 1;
|
|
2799
|
+
suspendResult = this.w1c_1.r13_1(buildUrl(this.w1c_1, this.x1c_1), this);
|
|
2109
2800
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2110
2801
|
return suspendResult;
|
|
2111
2802
|
}
|
|
@@ -2115,28 +2806,28 @@
|
|
|
2115
2806
|
var ARGUMENT = suspendResult;
|
|
2116
2807
|
return Tile_init_$Create$(ARGUMENT);
|
|
2117
2808
|
case 2:
|
|
2118
|
-
throw this.
|
|
2809
|
+
throw this.j7_1;
|
|
2119
2810
|
}
|
|
2120
2811
|
} catch ($p) {
|
|
2121
2812
|
var e = $p;
|
|
2122
|
-
if (this.
|
|
2813
|
+
if (this.h7_1 === 2) {
|
|
2123
2814
|
throw e;
|
|
2124
2815
|
} else {
|
|
2125
|
-
this.
|
|
2126
|
-
this.
|
|
2816
|
+
this.g7_1 = this.h7_1;
|
|
2817
|
+
this.j7_1 = e;
|
|
2127
2818
|
}
|
|
2128
2819
|
}
|
|
2129
2820
|
while (true);
|
|
2130
2821
|
};
|
|
2131
|
-
protoOf(TileManager$cache$slambda).
|
|
2132
|
-
var i = new TileManager$cache$slambda(this.
|
|
2133
|
-
i.
|
|
2822
|
+
protoOf(TileManager$cache$slambda).z1c = function (tc, completion) {
|
|
2823
|
+
var i = new TileManager$cache$slambda(this.w1c_1, completion);
|
|
2824
|
+
i.x1c_1 = tc;
|
|
2134
2825
|
return i;
|
|
2135
2826
|
};
|
|
2136
2827
|
function TileManager$cache$slambda_0(this$0, resultContinuation) {
|
|
2137
2828
|
var i = new TileManager$cache$slambda(this$0, resultContinuation);
|
|
2138
2829
|
return constructCallableReference(function (tc, $completion) {
|
|
2139
|
-
return i.
|
|
2830
|
+
return i.y1c(tc, $completion);
|
|
2140
2831
|
}, 1);
|
|
2141
2832
|
}
|
|
2142
2833
|
function TileManager(urlTemplate, cacheSize, fetcher) {
|
|
@@ -2147,26 +2838,285 @@
|
|
|
2147
2838
|
tmp = fetcher;
|
|
2148
2839
|
}
|
|
2149
2840
|
fetcher = tmp;
|
|
2150
|
-
this.
|
|
2151
|
-
this.
|
|
2841
|
+
this.q13_1 = urlTemplate;
|
|
2842
|
+
this.r13_1 = fetcher;
|
|
2152
2843
|
var tmp_0 = this;
|
|
2153
|
-
tmp_0.
|
|
2844
|
+
tmp_0.s13_1 = new LruCache(cacheSize, TileManager$cache$slambda_0(this, null));
|
|
2154
2845
|
}
|
|
2155
|
-
protoOf(TileManager).
|
|
2156
|
-
return this.
|
|
2846
|
+
protoOf(TileManager).t13 = function (tileCoords, $completion) {
|
|
2847
|
+
return this.s13_1.g1c(tileCoords, $completion);
|
|
2157
2848
|
};
|
|
2158
|
-
function
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2849
|
+
function pacedTileBytesFetcher(maxRequestsPerSecond, fetch, maxAttempts, now) {
|
|
2850
|
+
var tmp;
|
|
2851
|
+
if (fetch === VOID) {
|
|
2852
|
+
tmp = fetchTileBytes$ref_0();
|
|
2853
|
+
} else {
|
|
2854
|
+
tmp = fetch;
|
|
2855
|
+
}
|
|
2856
|
+
fetch = tmp;
|
|
2857
|
+
maxAttempts = maxAttempts === VOID ? 6 : maxAttempts;
|
|
2858
|
+
now = now === VOID ? monotonicMillis() : now;
|
|
2859
|
+
// Inline function 'kotlin.require' call
|
|
2860
|
+
if (!(maxRequestsPerSecond >= 0)) {
|
|
2861
|
+
var message = 'maxRequestsPerSecond must be >= 0, was ' + maxRequestsPerSecond;
|
|
2862
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2863
|
+
}
|
|
2864
|
+
// Inline function 'kotlin.require' call
|
|
2865
|
+
if (!(maxAttempts >= 1)) {
|
|
2866
|
+
var message_0 = 'maxAttempts must be >= 1, was ' + maxAttempts;
|
|
2867
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
2868
|
+
}
|
|
2869
|
+
var pacer = maxRequestsPerSecond > 0 ? new RequestPacer(maxRequestsPerSecond, now) : null;
|
|
2870
|
+
return pacedTileBytesFetcher$slambda_0(pacer, fetch, maxAttempts, null);
|
|
2162
2871
|
}
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2872
|
+
function TileFetchException(url, status, retryAfterSeconds) {
|
|
2873
|
+
retryAfterSeconds = retryAfterSeconds === VOID ? null : retryAfterSeconds;
|
|
2874
|
+
IllegalStateException_init_$Init$('Tile fetch failed for ' + url + ': HTTP ' + status, this);
|
|
2875
|
+
captureStack(this, TileFetchException);
|
|
2876
|
+
this.a1d_1 = url;
|
|
2877
|
+
this.b1d_1 = status;
|
|
2878
|
+
this.c1d_1 = retryAfterSeconds;
|
|
2879
|
+
}
|
|
2880
|
+
function monotonicMillis() {
|
|
2881
|
+
var origin = Monotonic_instance.va();
|
|
2882
|
+
return monotonicMillis$lambda(origin);
|
|
2883
|
+
}
|
|
2884
|
+
function $awaitTurnCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
2885
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2886
|
+
this.l1d_1 = _this__u8e3s4;
|
|
2887
|
+
}
|
|
2888
|
+
protoOf($awaitTurnCOROUTINE$).o7 = function () {
|
|
2889
|
+
var suspendResult = this.i7_1;
|
|
2890
|
+
$sm: do
|
|
2891
|
+
try {
|
|
2892
|
+
var tmp = this.g7_1;
|
|
2893
|
+
switch (tmp) {
|
|
2894
|
+
case 0:
|
|
2895
|
+
this.h7_1 = 4;
|
|
2896
|
+
this.n1d_1 = this.l1d_1.q1d_1;
|
|
2897
|
+
this.m1d_1 = null;
|
|
2898
|
+
this.g7_1 = 1;
|
|
2899
|
+
suspendResult = this.n1d_1.rv(this.m1d_1, this);
|
|
2900
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2901
|
+
return suspendResult;
|
|
2902
|
+
}
|
|
2903
|
+
|
|
2904
|
+
continue $sm;
|
|
2905
|
+
case 1:
|
|
2906
|
+
var tmp$ret$0 = Unit_instance;
|
|
2907
|
+
l$ret$1: do {
|
|
2908
|
+
var tmp_0;
|
|
2909
|
+
try {
|
|
2910
|
+
var t = toNumber(this.l1d_1.o1d_1());
|
|
2911
|
+
var b = this.l1d_1.r1d_1;
|
|
2912
|
+
var slot = Math.max(t, b);
|
|
2913
|
+
this.l1d_1.r1d_1 = slot + this.l1d_1.p1d_1;
|
|
2914
|
+
tmp$ret$0 = slot - t;
|
|
2915
|
+
break l$ret$1;
|
|
2916
|
+
} catch ($p) {
|
|
2917
|
+
var tmp_1;
|
|
2918
|
+
var t_0 = $p;
|
|
2919
|
+
this.n1d_1.cv(this.m1d_1);
|
|
2920
|
+
throw t_0;
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
while (false);
|
|
2924
|
+
var tmp_2 = tmp$ret$0;
|
|
2925
|
+
this.n1d_1.cv(this.m1d_1);
|
|
2926
|
+
var waitMs = tmp_2;
|
|
2927
|
+
if (waitMs > 0) {
|
|
2928
|
+
this.g7_1 = 2;
|
|
2929
|
+
suspendResult = delay(numberToLong(Math.ceil(waitMs)), this);
|
|
2930
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2931
|
+
return suspendResult;
|
|
2932
|
+
}
|
|
2933
|
+
continue $sm;
|
|
2934
|
+
} else {
|
|
2935
|
+
this.g7_1 = 3;
|
|
2936
|
+
continue $sm;
|
|
2937
|
+
}
|
|
2938
|
+
|
|
2939
|
+
case 2:
|
|
2940
|
+
this.g7_1 = 3;
|
|
2941
|
+
continue $sm;
|
|
2942
|
+
case 3:
|
|
2943
|
+
return Unit_instance;
|
|
2944
|
+
case 4:
|
|
2945
|
+
throw this.j7_1;
|
|
2946
|
+
}
|
|
2947
|
+
} catch ($p_0) {
|
|
2948
|
+
var e = $p_0;
|
|
2949
|
+
if (this.h7_1 === 4) {
|
|
2950
|
+
throw e;
|
|
2951
|
+
} else {
|
|
2952
|
+
this.g7_1 = this.h7_1;
|
|
2953
|
+
this.j7_1 = e;
|
|
2954
|
+
}
|
|
2955
|
+
}
|
|
2956
|
+
while (true);
|
|
2957
|
+
};
|
|
2958
|
+
function RequestPacer(perSecond, now) {
|
|
2959
|
+
this.o1d_1 = now;
|
|
2960
|
+
this.p1d_1 = 1000.0 / perSecond;
|
|
2961
|
+
this.q1d_1 = Mutex();
|
|
2962
|
+
this.r1d_1 = -Infinity;
|
|
2963
|
+
}
|
|
2964
|
+
protoOf(RequestPacer).s1d = function ($completion) {
|
|
2965
|
+
var tmp = new $awaitTurnCOROUTINE$(this, $completion);
|
|
2966
|
+
tmp.i7_1 = Unit_instance;
|
|
2967
|
+
tmp.j7_1 = null;
|
|
2968
|
+
return tmp.o7();
|
|
2969
|
+
};
|
|
2970
|
+
function fetchTileBytes$ref() {
|
|
2971
|
+
KFunctionImpl.call(this, 1, 2, 4);
|
|
2972
|
+
}
|
|
2973
|
+
protoOf(fetchTileBytes$ref).w1d = function (p0, $completion) {
|
|
2974
|
+
return fetchTileBytes(p0, $completion);
|
|
2975
|
+
};
|
|
2976
|
+
protoOf(fetchTileBytes$ref).w7 = function (p1, $completion) {
|
|
2977
|
+
return this.w1d((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
|
|
2978
|
+
};
|
|
2979
|
+
function pacedTileBytesFetcher$slambda($pacer, $fetch, $maxAttempts, resultContinuation) {
|
|
2980
|
+
this.f1e_1 = $pacer;
|
|
2981
|
+
this.g1e_1 = $fetch;
|
|
2982
|
+
this.h1e_1 = $maxAttempts;
|
|
2983
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2984
|
+
}
|
|
2985
|
+
protoOf(pacedTileBytesFetcher$slambda).w1d = function (url, $completion) {
|
|
2986
|
+
var tmp = this.s16(url, $completion);
|
|
2987
|
+
tmp.i7_1 = Unit_instance;
|
|
2988
|
+
tmp.j7_1 = null;
|
|
2989
|
+
return tmp.o7();
|
|
2990
|
+
};
|
|
2991
|
+
protoOf(pacedTileBytesFetcher$slambda).w7 = function (p1, $completion) {
|
|
2992
|
+
return this.w1d((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
|
|
2993
|
+
};
|
|
2994
|
+
protoOf(pacedTileBytesFetcher$slambda).o7 = function () {
|
|
2995
|
+
var suspendResult = this.i7_1;
|
|
2996
|
+
$sm: do
|
|
2997
|
+
try {
|
|
2998
|
+
var tmp = this.g7_1;
|
|
2999
|
+
switch (tmp) {
|
|
3000
|
+
case 0:
|
|
3001
|
+
this.h7_1 = 9;
|
|
3002
|
+
this.l1e_1 = 1;
|
|
3003
|
+
this.j1e_1 = null;
|
|
3004
|
+
this.g7_1 = 1;
|
|
3005
|
+
continue $sm;
|
|
3006
|
+
case 1:
|
|
3007
|
+
if (!(this.j1e_1 == null)) {
|
|
3008
|
+
this.g7_1 = 8;
|
|
3009
|
+
continue $sm;
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
var tmp0_safe_receiver = this.f1e_1;
|
|
3013
|
+
if (tmp0_safe_receiver == null) {
|
|
3014
|
+
this.m1e_1 = null;
|
|
3015
|
+
this.g7_1 = 3;
|
|
3016
|
+
continue $sm;
|
|
3017
|
+
} else {
|
|
3018
|
+
this.g7_1 = 2;
|
|
3019
|
+
suspendResult = tmp0_safe_receiver.s1d(this);
|
|
3020
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3021
|
+
return suspendResult;
|
|
3022
|
+
}
|
|
3023
|
+
continue $sm;
|
|
3024
|
+
}
|
|
3025
|
+
|
|
3026
|
+
case 2:
|
|
3027
|
+
var tmp_0 = this;
|
|
3028
|
+
tmp_0.m1e_1 = Unit_instance;
|
|
3029
|
+
this.g7_1 = 3;
|
|
3030
|
+
continue $sm;
|
|
3031
|
+
case 3:
|
|
3032
|
+
this.h7_1 = 5;
|
|
3033
|
+
this.g7_1 = 4;
|
|
3034
|
+
suspendResult = this.g1e_1(this.i1e_1, this);
|
|
3035
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3036
|
+
return suspendResult;
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
continue $sm;
|
|
3040
|
+
case 4:
|
|
3041
|
+
var tmp_1 = this;
|
|
3042
|
+
this.j1e_1 = suspendResult;
|
|
3043
|
+
tmp_1.k1e_1 = Unit_instance;
|
|
3044
|
+
this.h7_1 = 9;
|
|
3045
|
+
this.g7_1 = 7;
|
|
3046
|
+
continue $sm;
|
|
3047
|
+
case 5:
|
|
3048
|
+
this.h7_1 = 9;
|
|
3049
|
+
var tmp_2 = this.j7_1;
|
|
3050
|
+
if (tmp_2 instanceof TileFetchException) {
|
|
3051
|
+
var e = this.j7_1;
|
|
3052
|
+
if (!(e.b1d_1 === 429) && !(e.b1d_1 === 503) || this.l1e_1 >= this.h1e_1)
|
|
3053
|
+
throw e;
|
|
3054
|
+
this.g7_1 = 6;
|
|
3055
|
+
var tmp1_elvis_lhs = e.c1d_1;
|
|
3056
|
+
suspendResult = delay(multiply(tmp1_elvis_lhs == null ? shiftLeft(new Long(1, 0), this.l1e_1 - 1 | 0) : tmp1_elvis_lhs, new Long(1000, 0)), this);
|
|
3057
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3058
|
+
return suspendResult;
|
|
3059
|
+
}
|
|
3060
|
+
continue $sm;
|
|
3061
|
+
} else {
|
|
3062
|
+
throw this.j7_1;
|
|
3063
|
+
}
|
|
3064
|
+
|
|
3065
|
+
case 6:
|
|
3066
|
+
var tmp_3 = this;
|
|
3067
|
+
var _unary__edvuaz = this.l1e_1;
|
|
3068
|
+
this.l1e_1 = _unary__edvuaz + 1 | 0;
|
|
3069
|
+
tmp_3.k1e_1 = _unary__edvuaz;
|
|
3070
|
+
this.g7_1 = 7;
|
|
3071
|
+
continue $sm;
|
|
3072
|
+
case 7:
|
|
3073
|
+
this.h7_1 = 9;
|
|
3074
|
+
this.g7_1 = 1;
|
|
3075
|
+
continue $sm;
|
|
3076
|
+
case 8:
|
|
3077
|
+
return this.j1e_1;
|
|
3078
|
+
case 9:
|
|
3079
|
+
throw this.j7_1;
|
|
3080
|
+
}
|
|
3081
|
+
} catch ($p) {
|
|
3082
|
+
var e_0 = $p;
|
|
3083
|
+
if (this.h7_1 === 9) {
|
|
3084
|
+
throw e_0;
|
|
3085
|
+
} else {
|
|
3086
|
+
this.g7_1 = this.h7_1;
|
|
3087
|
+
this.j7_1 = e_0;
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
while (true);
|
|
3091
|
+
};
|
|
3092
|
+
protoOf(pacedTileBytesFetcher$slambda).s16 = function (url, completion) {
|
|
3093
|
+
var i = new pacedTileBytesFetcher$slambda(this.f1e_1, this.g1e_1, this.h1e_1, completion);
|
|
3094
|
+
i.i1e_1 = url;
|
|
3095
|
+
return i;
|
|
3096
|
+
};
|
|
3097
|
+
function pacedTileBytesFetcher$slambda_0($pacer, $fetch, $maxAttempts, resultContinuation) {
|
|
3098
|
+
var i = new pacedTileBytesFetcher$slambda($pacer, $fetch, $maxAttempts, resultContinuation);
|
|
3099
|
+
return constructCallableReference(function (url, $completion) {
|
|
3100
|
+
return i.w1d(url, $completion);
|
|
3101
|
+
}, 1);
|
|
3102
|
+
}
|
|
3103
|
+
function monotonicMillis$lambda($origin) {
|
|
3104
|
+
return function () {
|
|
3105
|
+
return _Duration___get_inWholeMilliseconds__impl__msfiry(ValueTimeMark__elapsedNow_impl_eonqvs($origin));
|
|
3106
|
+
};
|
|
3107
|
+
}
|
|
3108
|
+
function TileCoordinates(x, y, z) {
|
|
3109
|
+
this.xz_1 = x;
|
|
3110
|
+
this.yz_1 = y;
|
|
3111
|
+
this.zz_1 = z;
|
|
3112
|
+
}
|
|
3113
|
+
protoOf(TileCoordinates).toString = function () {
|
|
3114
|
+
return 'TileCoordinates(x=' + this.xz_1 + ', y=' + this.yz_1 + ', z=' + this.zz_1 + ')';
|
|
3115
|
+
};
|
|
3116
|
+
protoOf(TileCoordinates).hashCode = function () {
|
|
3117
|
+
var result = this.xz_1;
|
|
3118
|
+
result = imul(result, 31) + this.yz_1 | 0;
|
|
3119
|
+
result = imul(result, 31) + this.zz_1 | 0;
|
|
2170
3120
|
return result;
|
|
2171
3121
|
};
|
|
2172
3122
|
protoOf(TileCoordinates).equals = function (other) {
|
|
@@ -2174,26 +3124,26 @@
|
|
|
2174
3124
|
return true;
|
|
2175
3125
|
if (!(other instanceof TileCoordinates))
|
|
2176
3126
|
return false;
|
|
2177
|
-
if (!(this.
|
|
3127
|
+
if (!(this.xz_1 === other.xz_1))
|
|
2178
3128
|
return false;
|
|
2179
|
-
if (!(this.
|
|
3129
|
+
if (!(this.yz_1 === other.yz_1))
|
|
2180
3130
|
return false;
|
|
2181
|
-
if (!(this.
|
|
3131
|
+
if (!(this.zz_1 === other.zz_1))
|
|
2182
3132
|
return false;
|
|
2183
3133
|
return true;
|
|
2184
3134
|
};
|
|
2185
3135
|
function Pixel(tile, x, y) {
|
|
2186
|
-
this.
|
|
2187
|
-
this.
|
|
2188
|
-
this.
|
|
3136
|
+
this.n13_1 = tile;
|
|
3137
|
+
this.o13_1 = x;
|
|
3138
|
+
this.p13_1 = y;
|
|
2189
3139
|
}
|
|
2190
3140
|
protoOf(Pixel).toString = function () {
|
|
2191
|
-
return 'Pixel(tile=' + this.
|
|
3141
|
+
return 'Pixel(tile=' + this.n13_1.toString() + ', x=' + this.o13_1 + ', y=' + this.p13_1 + ')';
|
|
2192
3142
|
};
|
|
2193
3143
|
protoOf(Pixel).hashCode = function () {
|
|
2194
|
-
var result = this.
|
|
2195
|
-
result = imul(result, 31) + this.
|
|
2196
|
-
result = imul(result, 31) + this.
|
|
3144
|
+
var result = this.n13_1.hashCode();
|
|
3145
|
+
result = imul(result, 31) + this.o13_1 | 0;
|
|
3146
|
+
result = imul(result, 31) + this.p13_1 | 0;
|
|
2197
3147
|
return result;
|
|
2198
3148
|
};
|
|
2199
3149
|
protoOf(Pixel).equals = function (other) {
|
|
@@ -2201,26 +3151,26 @@
|
|
|
2201
3151
|
return true;
|
|
2202
3152
|
if (!(other instanceof Pixel))
|
|
2203
3153
|
return false;
|
|
2204
|
-
if (!this.
|
|
3154
|
+
if (!this.n13_1.equals(other.n13_1))
|
|
2205
3155
|
return false;
|
|
2206
|
-
if (!(this.
|
|
3156
|
+
if (!(this.o13_1 === other.o13_1))
|
|
2207
3157
|
return false;
|
|
2208
|
-
if (!(this.
|
|
3158
|
+
if (!(this.p13_1 === other.p13_1))
|
|
2209
3159
|
return false;
|
|
2210
3160
|
return true;
|
|
2211
3161
|
};
|
|
2212
3162
|
function PixelFloat(tile, x, y) {
|
|
2213
|
-
this.
|
|
2214
|
-
this.
|
|
2215
|
-
this.
|
|
3163
|
+
this.j13_1 = tile;
|
|
3164
|
+
this.k13_1 = x;
|
|
3165
|
+
this.l13_1 = y;
|
|
2216
3166
|
}
|
|
2217
3167
|
protoOf(PixelFloat).toString = function () {
|
|
2218
|
-
return 'PixelFloat(tile=' + this.
|
|
3168
|
+
return 'PixelFloat(tile=' + this.j13_1.toString() + ', x=' + this.k13_1 + ', y=' + this.l13_1 + ')';
|
|
2219
3169
|
};
|
|
2220
3170
|
protoOf(PixelFloat).hashCode = function () {
|
|
2221
|
-
var result = this.
|
|
2222
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2223
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3171
|
+
var result = this.j13_1.hashCode();
|
|
3172
|
+
result = imul(result, 31) + getNumberHashCode(this.k13_1) | 0;
|
|
3173
|
+
result = imul(result, 31) + getNumberHashCode(this.l13_1) | 0;
|
|
2224
3174
|
return result;
|
|
2225
3175
|
};
|
|
2226
3176
|
protoOf(PixelFloat).equals = function (other) {
|
|
@@ -2228,30 +3178,30 @@
|
|
|
2228
3178
|
return true;
|
|
2229
3179
|
if (!(other instanceof PixelFloat))
|
|
2230
3180
|
return false;
|
|
2231
|
-
if (!this.
|
|
3181
|
+
if (!this.j13_1.equals(other.j13_1))
|
|
2232
3182
|
return false;
|
|
2233
|
-
if (!equals(this.
|
|
3183
|
+
if (!equals(this.k13_1, other.k13_1))
|
|
2234
3184
|
return false;
|
|
2235
|
-
if (!equals(this.
|
|
3185
|
+
if (!equals(this.l13_1, other.l13_1))
|
|
2236
3186
|
return false;
|
|
2237
3187
|
return true;
|
|
2238
3188
|
};
|
|
2239
3189
|
function TileCoordinatesFloat(x, y, xFloat, yFloat, z) {
|
|
2240
|
-
this.
|
|
2241
|
-
this.
|
|
2242
|
-
this.
|
|
2243
|
-
this.
|
|
2244
|
-
this.
|
|
3190
|
+
this.f14_1 = x;
|
|
3191
|
+
this.g14_1 = y;
|
|
3192
|
+
this.h14_1 = xFloat;
|
|
3193
|
+
this.i14_1 = yFloat;
|
|
3194
|
+
this.j14_1 = z;
|
|
2245
3195
|
}
|
|
2246
3196
|
protoOf(TileCoordinatesFloat).toString = function () {
|
|
2247
|
-
return 'TileCoordinatesFloat(x=' + this.
|
|
3197
|
+
return 'TileCoordinatesFloat(x=' + this.f14_1 + ', y=' + this.g14_1 + ', xFloat=' + this.h14_1 + ', yFloat=' + this.i14_1 + ', z=' + this.j14_1 + ')';
|
|
2248
3198
|
};
|
|
2249
3199
|
protoOf(TileCoordinatesFloat).hashCode = function () {
|
|
2250
|
-
var result = this.
|
|
2251
|
-
result = imul(result, 31) + this.
|
|
2252
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2253
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2254
|
-
result = imul(result, 31) + this.
|
|
3200
|
+
var result = this.f14_1;
|
|
3201
|
+
result = imul(result, 31) + this.g14_1 | 0;
|
|
3202
|
+
result = imul(result, 31) + getNumberHashCode(this.h14_1) | 0;
|
|
3203
|
+
result = imul(result, 31) + getNumberHashCode(this.i14_1) | 0;
|
|
3204
|
+
result = imul(result, 31) + this.j14_1 | 0;
|
|
2255
3205
|
return result;
|
|
2256
3206
|
};
|
|
2257
3207
|
protoOf(TileCoordinatesFloat).equals = function (other) {
|
|
@@ -2259,73 +3209,73 @@
|
|
|
2259
3209
|
return true;
|
|
2260
3210
|
if (!(other instanceof TileCoordinatesFloat))
|
|
2261
3211
|
return false;
|
|
2262
|
-
if (!(this.
|
|
3212
|
+
if (!(this.f14_1 === other.f14_1))
|
|
2263
3213
|
return false;
|
|
2264
|
-
if (!(this.
|
|
3214
|
+
if (!(this.g14_1 === other.g14_1))
|
|
2265
3215
|
return false;
|
|
2266
|
-
if (!equals(this.
|
|
3216
|
+
if (!equals(this.h14_1, other.h14_1))
|
|
2267
3217
|
return false;
|
|
2268
|
-
if (!equals(this.
|
|
3218
|
+
if (!equals(this.i14_1, other.i14_1))
|
|
2269
3219
|
return false;
|
|
2270
|
-
if (!(this.
|
|
3220
|
+
if (!(this.j14_1 === other.j14_1))
|
|
2271
3221
|
return false;
|
|
2272
3222
|
return true;
|
|
2273
3223
|
};
|
|
2274
|
-
function
|
|
2275
|
-
|
|
2276
|
-
this.
|
|
3224
|
+
function Companion_1() {
|
|
3225
|
+
Companion_instance_2 = this;
|
|
3226
|
+
this.n1e_1 = new Vector3D(0.0, 0.0, 0.0);
|
|
2277
3227
|
}
|
|
2278
|
-
var
|
|
2279
|
-
function
|
|
2280
|
-
if (
|
|
2281
|
-
new
|
|
2282
|
-
return
|
|
3228
|
+
var Companion_instance_2;
|
|
3229
|
+
function Companion_getInstance_1() {
|
|
3230
|
+
if (Companion_instance_2 == null)
|
|
3231
|
+
new Companion_1();
|
|
3232
|
+
return Companion_instance_2;
|
|
2283
3233
|
}
|
|
2284
3234
|
function Vector3D(x, y, z) {
|
|
2285
|
-
|
|
2286
|
-
this.
|
|
2287
|
-
this.
|
|
2288
|
-
this.
|
|
3235
|
+
Companion_getInstance_1();
|
|
3236
|
+
this.h11_1 = x;
|
|
3237
|
+
this.i11_1 = y;
|
|
3238
|
+
this.j11_1 = z;
|
|
2289
3239
|
}
|
|
2290
|
-
protoOf(Vector3D).
|
|
2291
|
-
var tmp0 = this.
|
|
3240
|
+
protoOf(Vector3D).o1e = function (other) {
|
|
3241
|
+
var tmp0 = this.h11_1 - other.h11_1;
|
|
2292
3242
|
// Inline function 'kotlin.math.hypot' call
|
|
2293
|
-
var y = this.
|
|
3243
|
+
var y = this.i11_1 - other.i11_1;
|
|
2294
3244
|
var tmp0_0 = hypot(tmp0, y);
|
|
2295
3245
|
// Inline function 'kotlin.math.hypot' call
|
|
2296
|
-
var y_0 = this.
|
|
3246
|
+
var y_0 = this.j11_1 - other.j11_1;
|
|
2297
3247
|
return hypot(tmp0_0, y_0);
|
|
2298
3248
|
};
|
|
2299
|
-
protoOf(Vector3D).
|
|
2300
|
-
return new Vector3D(this.
|
|
3249
|
+
protoOf(Vector3D).p1e = function (other) {
|
|
3250
|
+
return new Vector3D(this.h11_1 - other.h11_1, this.i11_1 - other.i11_1, this.j11_1 - other.j11_1);
|
|
2301
3251
|
};
|
|
2302
|
-
protoOf(Vector3D).
|
|
2303
|
-
return new Vector3D(this.
|
|
3252
|
+
protoOf(Vector3D).q1e = function (other) {
|
|
3253
|
+
return new Vector3D(this.h11_1 + other.h11_1, this.i11_1 + other.i11_1, this.j11_1 + other.j11_1);
|
|
2304
3254
|
};
|
|
2305
|
-
protoOf(Vector3D).
|
|
2306
|
-
return new Vector3D(this.
|
|
3255
|
+
protoOf(Vector3D).r1e = function (scalar) {
|
|
3256
|
+
return new Vector3D(this.h11_1 * scalar, this.i11_1 * scalar, this.j11_1 * scalar);
|
|
2307
3257
|
};
|
|
2308
|
-
protoOf(Vector3D).
|
|
2309
|
-
return this.
|
|
3258
|
+
protoOf(Vector3D).s1e = function (other) {
|
|
3259
|
+
return this.h11_1 * other.h11_1 + this.i11_1 * other.i11_1 + this.j11_1 * other.j11_1;
|
|
2310
3260
|
};
|
|
2311
|
-
protoOf(Vector3D).
|
|
2312
|
-
var segmentVector = segmentEnd.
|
|
2313
|
-
var segmentLengthSq = segmentVector.
|
|
3261
|
+
protoOf(Vector3D).k11 = function (segmentStart, segmentEnd) {
|
|
3262
|
+
var segmentVector = segmentEnd.p1e(segmentStart);
|
|
3263
|
+
var segmentLengthSq = segmentVector.s1e(segmentVector);
|
|
2314
3264
|
if (segmentLengthSq === 0.0)
|
|
2315
|
-
return this.
|
|
2316
|
-
var pointVector = this.
|
|
2317
|
-
var projection = pointVector.
|
|
2318
|
-
var clamped =
|
|
2319
|
-
var closest = segmentStart.
|
|
2320
|
-
return this.
|
|
3265
|
+
return this.o1e(segmentStart);
|
|
3266
|
+
var pointVector = this.p1e(segmentStart);
|
|
3267
|
+
var projection = pointVector.s1e(segmentVector) / segmentLengthSq;
|
|
3268
|
+
var clamped = coerceIn_0(projection, 0.0, 1.0);
|
|
3269
|
+
var closest = segmentStart.q1e(segmentVector.r1e(clamped));
|
|
3270
|
+
return this.o1e(closest);
|
|
2321
3271
|
};
|
|
2322
3272
|
protoOf(Vector3D).toString = function () {
|
|
2323
|
-
return 'Vector3D(x=' + this.
|
|
3273
|
+
return 'Vector3D(x=' + this.h11_1 + ', y=' + this.i11_1 + ', z=' + this.j11_1 + ')';
|
|
2324
3274
|
};
|
|
2325
3275
|
protoOf(Vector3D).hashCode = function () {
|
|
2326
|
-
var result = getNumberHashCode(this.
|
|
2327
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2328
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3276
|
+
var result = getNumberHashCode(this.h11_1);
|
|
3277
|
+
result = imul(result, 31) + getNumberHashCode(this.i11_1) | 0;
|
|
3278
|
+
result = imul(result, 31) + getNumberHashCode(this.j11_1) | 0;
|
|
2329
3279
|
return result;
|
|
2330
3280
|
};
|
|
2331
3281
|
protoOf(Vector3D).equals = function (other) {
|
|
@@ -2333,11 +3283,11 @@
|
|
|
2333
3283
|
return true;
|
|
2334
3284
|
if (!(other instanceof Vector3D))
|
|
2335
3285
|
return false;
|
|
2336
|
-
if (!equals(this.
|
|
3286
|
+
if (!equals(this.h11_1, other.h11_1))
|
|
2337
3287
|
return false;
|
|
2338
|
-
if (!equals(this.
|
|
3288
|
+
if (!equals(this.i11_1, other.i11_1))
|
|
2339
3289
|
return false;
|
|
2340
|
-
if (!equals(this.
|
|
3290
|
+
if (!equals(this.j11_1, other.j11_1))
|
|
2341
3291
|
return false;
|
|
2342
3292
|
return true;
|
|
2343
3293
|
};
|
|
@@ -2368,16 +3318,42 @@
|
|
|
2368
3318
|
else {
|
|
2369
3319
|
requireOnlyKeys(configDto, 'ElevationProviderConfigDto', get_CONFIG_KEYS());
|
|
2370
3320
|
}
|
|
2371
|
-
var
|
|
2372
|
-
var
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
var
|
|
2380
|
-
|
|
3321
|
+
var tmp2_safe_receiver = configDto == null ? null : configDto.source;
|
|
3322
|
+
var tmp;
|
|
3323
|
+
if (tmp2_safe_receiver == null) {
|
|
3324
|
+
tmp = null;
|
|
3325
|
+
} else {
|
|
3326
|
+
// Inline function 'kotlin.let' call
|
|
3327
|
+
tmp = Companion_getInstance().o17(tmp2_safe_receiver);
|
|
3328
|
+
}
|
|
3329
|
+
var tmp3_elvis_lhs = tmp;
|
|
3330
|
+
var source = tmp3_elvis_lhs == null ? Companion_getInstance().j17_1 : tmp3_elvis_lhs;
|
|
3331
|
+
var base = source.u17(configDto == null ? null : configDto.zoomLevel);
|
|
3332
|
+
var tmp6_elvis_lhs = configDto == null ? null : configDto.cacheSize;
|
|
3333
|
+
var tmp_0 = tmp6_elvis_lhs == null ? base.s15_1 : tmp6_elvis_lhs;
|
|
3334
|
+
var tmp8_elvis_lhs = configDto == null ? null : configDto.tileUrlTemplate;
|
|
3335
|
+
var tmp_1 = tmp8_elvis_lhs == null ? base.t15_1 : tmp8_elvis_lhs;
|
|
3336
|
+
var tmp10_elvis_lhs = configDto == null ? null : configDto.tileSize;
|
|
3337
|
+
var cfg = base.f17(VOID, tmp_0, tmp_1, tmp10_elvis_lhs == null ? base.u15_1 : tmp10_elvis_lhs);
|
|
3338
|
+
var primary = ElevationProvider_init_$Create$(cfg);
|
|
3339
|
+
var tmp11_safe_receiver = source.p17();
|
|
3340
|
+
var tmp_2;
|
|
3341
|
+
if (tmp11_safe_receiver == null) {
|
|
3342
|
+
tmp_2 = null;
|
|
3343
|
+
} else {
|
|
3344
|
+
// Inline function 'kotlin.let' call
|
|
3345
|
+
tmp_2 = primary.y15(provider(tmp11_safe_receiver));
|
|
3346
|
+
}
|
|
3347
|
+
var tmp12_elvis_lhs = tmp_2;
|
|
3348
|
+
return tmp12_elvis_lhs == null ? primary : tmp12_elvis_lhs;
|
|
3349
|
+
}
|
|
3350
|
+
function elevationAttribution(provider) {
|
|
3351
|
+
_init_properties_ElevationJsApi_kt__1yyas4();
|
|
3352
|
+
var o = {};
|
|
3353
|
+
o.text = provider.a16().g17_1;
|
|
3354
|
+
o.url = provider.a16().h17_1;
|
|
3355
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
3356
|
+
return o;
|
|
2381
3357
|
}
|
|
2382
3358
|
function getElevation(provider, latitude, longitude, interpolation) {
|
|
2383
3359
|
_init_properties_ElevationJsApi_kt__1yyas4();
|
|
@@ -2418,16 +3394,16 @@
|
|
|
2418
3394
|
while (inductionVariable < last) {
|
|
2419
3395
|
var element = keys[inductionVariable];
|
|
2420
3396
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2421
|
-
if (!allowed.
|
|
2422
|
-
destination.
|
|
3397
|
+
if (!allowed.i1(element)) {
|
|
3398
|
+
destination.k(element);
|
|
2423
3399
|
}
|
|
2424
3400
|
}
|
|
2425
3401
|
var unknown = destination;
|
|
2426
3402
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2427
|
-
if (!unknown.
|
|
3403
|
+
if (!unknown.q()) {
|
|
2428
3404
|
// Inline function 'kotlin.error' call
|
|
2429
3405
|
var message = 'Unknown ' + dtoName + ' key(s): ' + joinToString(unknown) + ' \u2014 expected one of ' + joinToString(sorted(allowed));
|
|
2430
|
-
throw IllegalStateException_init_$Create$
|
|
3406
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
2431
3407
|
}
|
|
2432
3408
|
}
|
|
2433
3409
|
function toKotlin(_this__u8e3s4) {
|
|
@@ -2448,31 +3424,31 @@
|
|
|
2448
3424
|
return o;
|
|
2449
3425
|
}
|
|
2450
3426
|
function getElevation$slambda($provider, $latitude, $longitude, $interpolation, resultContinuation) {
|
|
2451
|
-
this
|
|
2452
|
-
this
|
|
2453
|
-
this
|
|
2454
|
-
this
|
|
3427
|
+
this.b1f_1 = $provider;
|
|
3428
|
+
this.c1f_1 = $latitude;
|
|
3429
|
+
this.d1f_1 = $longitude;
|
|
3430
|
+
this.e1f_1 = $interpolation;
|
|
2455
3431
|
CoroutineImpl.call(this, resultContinuation);
|
|
2456
3432
|
}
|
|
2457
|
-
protoOf(getElevation$slambda).
|
|
2458
|
-
var tmp = this.
|
|
2459
|
-
tmp.
|
|
2460
|
-
tmp.
|
|
2461
|
-
return tmp.
|
|
3433
|
+
protoOf(getElevation$slambda).g1f = function ($this$promise, $completion) {
|
|
3434
|
+
var tmp = this.k18($this$promise, $completion);
|
|
3435
|
+
tmp.i7_1 = Unit_instance;
|
|
3436
|
+
tmp.j7_1 = null;
|
|
3437
|
+
return tmp.o7();
|
|
2462
3438
|
};
|
|
2463
|
-
protoOf(getElevation$slambda).
|
|
2464
|
-
return this.
|
|
3439
|
+
protoOf(getElevation$slambda).w7 = function (p1, $completion) {
|
|
3440
|
+
return this.g1f((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2465
3441
|
};
|
|
2466
|
-
protoOf(getElevation$slambda).
|
|
2467
|
-
var suspendResult = this.
|
|
3442
|
+
protoOf(getElevation$slambda).o7 = function () {
|
|
3443
|
+
var suspendResult = this.i7_1;
|
|
2468
3444
|
$sm: do
|
|
2469
3445
|
try {
|
|
2470
|
-
var tmp = this.
|
|
3446
|
+
var tmp = this.g7_1;
|
|
2471
3447
|
switch (tmp) {
|
|
2472
3448
|
case 0:
|
|
2473
|
-
this.
|
|
2474
|
-
this.
|
|
2475
|
-
suspendResult = this
|
|
3449
|
+
this.h7_1 = 2;
|
|
3450
|
+
this.g7_1 = 1;
|
|
3451
|
+
suspendResult = this.b1f_1.g15(this.c1f_1, this.d1f_1, this.e1f_1, this);
|
|
2476
3452
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2477
3453
|
return suspendResult;
|
|
2478
3454
|
}
|
|
@@ -2481,80 +3457,80 @@
|
|
|
2481
3457
|
case 1:
|
|
2482
3458
|
return suspendResult;
|
|
2483
3459
|
case 2:
|
|
2484
|
-
throw this.
|
|
3460
|
+
throw this.j7_1;
|
|
2485
3461
|
}
|
|
2486
3462
|
} catch ($p) {
|
|
2487
3463
|
var e = $p;
|
|
2488
|
-
if (this.
|
|
3464
|
+
if (this.h7_1 === 2) {
|
|
2489
3465
|
throw e;
|
|
2490
3466
|
} else {
|
|
2491
|
-
this.
|
|
2492
|
-
this.
|
|
3467
|
+
this.g7_1 = this.h7_1;
|
|
3468
|
+
this.j7_1 = e;
|
|
2493
3469
|
}
|
|
2494
3470
|
}
|
|
2495
3471
|
while (true);
|
|
2496
3472
|
};
|
|
2497
|
-
protoOf(getElevation$slambda).
|
|
2498
|
-
var i = new getElevation$slambda(this
|
|
2499
|
-
i
|
|
3473
|
+
protoOf(getElevation$slambda).k18 = function ($this$promise, completion) {
|
|
3474
|
+
var i = new getElevation$slambda(this.b1f_1, this.c1f_1, this.d1f_1, this.e1f_1, completion);
|
|
3475
|
+
i.f1f_1 = $this$promise;
|
|
2500
3476
|
return i;
|
|
2501
3477
|
};
|
|
2502
3478
|
function getElevation$slambda_0($provider, $latitude, $longitude, $interpolation, resultContinuation) {
|
|
2503
3479
|
var i = new getElevation$slambda($provider, $latitude, $longitude, $interpolation, resultContinuation);
|
|
2504
3480
|
return constructCallableReference(function ($this$promise, $completion) {
|
|
2505
|
-
return i.
|
|
3481
|
+
return i.g1f($this$promise, $completion);
|
|
2506
3482
|
}, 1);
|
|
2507
3483
|
}
|
|
2508
3484
|
function getElevationsAlong$slambda($path, $provider, $options, resultContinuation) {
|
|
2509
|
-
this
|
|
2510
|
-
this
|
|
2511
|
-
this
|
|
3485
|
+
this.p1f_1 = $path;
|
|
3486
|
+
this.q1f_1 = $provider;
|
|
3487
|
+
this.r1f_1 = $options;
|
|
2512
3488
|
CoroutineImpl.call(this, resultContinuation);
|
|
2513
3489
|
}
|
|
2514
|
-
protoOf(getElevationsAlong$slambda).
|
|
2515
|
-
var tmp = this.
|
|
2516
|
-
tmp.
|
|
2517
|
-
tmp.
|
|
2518
|
-
return tmp.
|
|
3490
|
+
protoOf(getElevationsAlong$slambda).t1f = function ($this$promise, $completion) {
|
|
3491
|
+
var tmp = this.k18($this$promise, $completion);
|
|
3492
|
+
tmp.i7_1 = Unit_instance;
|
|
3493
|
+
tmp.j7_1 = null;
|
|
3494
|
+
return tmp.o7();
|
|
2519
3495
|
};
|
|
2520
|
-
protoOf(getElevationsAlong$slambda).
|
|
2521
|
-
return this.
|
|
3496
|
+
protoOf(getElevationsAlong$slambda).w7 = function (p1, $completion) {
|
|
3497
|
+
return this.t1f((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2522
3498
|
};
|
|
2523
|
-
protoOf(getElevationsAlong$slambda).
|
|
2524
|
-
var suspendResult = this.
|
|
3499
|
+
protoOf(getElevationsAlong$slambda).o7 = function () {
|
|
3500
|
+
var suspendResult = this.i7_1;
|
|
2525
3501
|
$sm: do
|
|
2526
3502
|
try {
|
|
2527
|
-
var tmp = this.
|
|
3503
|
+
var tmp = this.g7_1;
|
|
2528
3504
|
switch (tmp) {
|
|
2529
3505
|
case 0:
|
|
2530
|
-
this.
|
|
2531
|
-
var this_0 = this
|
|
3506
|
+
this.h7_1 = 2;
|
|
3507
|
+
var this_0 = this.p1f_1;
|
|
2532
3508
|
var destination = ArrayList_init_$Create$_0(this_0.length);
|
|
2533
3509
|
var inductionVariable = 0;
|
|
2534
3510
|
var last = this_0.length;
|
|
2535
3511
|
while (inductionVariable < last) {
|
|
2536
3512
|
var item = this_0[inductionVariable];
|
|
2537
3513
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2538
|
-
destination.
|
|
3514
|
+
destination.k(new LatLon(item.latitude, item.longitude));
|
|
2539
3515
|
}
|
|
2540
3516
|
|
|
2541
3517
|
var coords = destination;
|
|
2542
|
-
this.
|
|
2543
|
-
var tmp0_safe_receiver = this
|
|
3518
|
+
this.g7_1 = 1;
|
|
3519
|
+
var tmp0_safe_receiver = this.r1f_1;
|
|
2544
3520
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.step;
|
|
2545
3521
|
var tmp_0 = tmp1_elvis_lhs == null ? 10.0 : tmp1_elvis_lhs;
|
|
2546
|
-
var tmp2_safe_receiver = this
|
|
3522
|
+
var tmp2_safe_receiver = this.r1f_1;
|
|
2547
3523
|
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.minDistance;
|
|
2548
3524
|
var tmp_1 = tmp3_elvis_lhs == null ? 1.0 : tmp3_elvis_lhs;
|
|
2549
|
-
var tmp4_safe_receiver = this
|
|
3525
|
+
var tmp4_safe_receiver = this.r1f_1;
|
|
2550
3526
|
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.interpolation;
|
|
2551
3527
|
var tmp_2 = tmp5_elvis_lhs == null ? true : tmp5_elvis_lhs;
|
|
2552
|
-
var tmp6_safe_receiver = this
|
|
3528
|
+
var tmp6_safe_receiver = this.r1f_1;
|
|
2553
3529
|
var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.smoothingOptions;
|
|
2554
3530
|
var tmp_3 = tmp7_safe_receiver == null ? null : toKotlin(tmp7_safe_receiver);
|
|
2555
|
-
var tmp8_safe_receiver = this
|
|
3531
|
+
var tmp8_safe_receiver = this.r1f_1;
|
|
2556
3532
|
var tmp9_safe_receiver = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.filterOptions;
|
|
2557
|
-
suspendResult = this
|
|
3533
|
+
suspendResult = this.q1f_1.d16(coords, tmp_0, tmp_1, tmp_2, tmp_3, tmp9_safe_receiver == null ? null : toKotlin_0(tmp9_safe_receiver), this);
|
|
2558
3534
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2559
3535
|
return suspendResult;
|
|
2560
3536
|
}
|
|
@@ -2563,46 +3539,46 @@
|
|
|
2563
3539
|
case 1:
|
|
2564
3540
|
var results = suspendResult;
|
|
2565
3541
|
var tmp_4 = 0;
|
|
2566
|
-
var tmp_5 = results.
|
|
3542
|
+
var tmp_5 = results.o();
|
|
2567
3543
|
var tmp_6 = Array(tmp_5);
|
|
2568
3544
|
while (tmp_4 < tmp_5) {
|
|
2569
3545
|
var tmp_7 = tmp_4;
|
|
2570
|
-
var c = results.
|
|
2571
|
-
tmp_6[tmp_7] = coordsEle(c.
|
|
3546
|
+
var c = results.p(tmp_7);
|
|
3547
|
+
tmp_6[tmp_7] = coordsEle(c.gz(), c.hz(), c.c11());
|
|
2572
3548
|
tmp_4 = tmp_4 + 1 | 0;
|
|
2573
3549
|
}
|
|
2574
3550
|
|
|
2575
3551
|
return tmp_6;
|
|
2576
3552
|
case 2:
|
|
2577
|
-
throw this.
|
|
3553
|
+
throw this.j7_1;
|
|
2578
3554
|
}
|
|
2579
3555
|
} catch ($p) {
|
|
2580
3556
|
var e = $p;
|
|
2581
|
-
if (this.
|
|
3557
|
+
if (this.h7_1 === 2) {
|
|
2582
3558
|
throw e;
|
|
2583
3559
|
} else {
|
|
2584
|
-
this.
|
|
2585
|
-
this.
|
|
3560
|
+
this.g7_1 = this.h7_1;
|
|
3561
|
+
this.j7_1 = e;
|
|
2586
3562
|
}
|
|
2587
3563
|
}
|
|
2588
3564
|
while (true);
|
|
2589
3565
|
};
|
|
2590
|
-
protoOf(getElevationsAlong$slambda).
|
|
2591
|
-
var i = new getElevationsAlong$slambda(this
|
|
2592
|
-
i
|
|
3566
|
+
protoOf(getElevationsAlong$slambda).k18 = function ($this$promise, completion) {
|
|
3567
|
+
var i = new getElevationsAlong$slambda(this.p1f_1, this.q1f_1, this.r1f_1, completion);
|
|
3568
|
+
i.s1f_1 = $this$promise;
|
|
2593
3569
|
return i;
|
|
2594
3570
|
};
|
|
2595
3571
|
function getElevationsAlong$slambda_0($path, $provider, $options, resultContinuation) {
|
|
2596
3572
|
var i = new getElevationsAlong$slambda($path, $provider, $options, resultContinuation);
|
|
2597
3573
|
return constructCallableReference(function ($this$promise, $completion) {
|
|
2598
|
-
return i.
|
|
3574
|
+
return i.t1f($this$promise, $completion);
|
|
2599
3575
|
}, 1);
|
|
2600
3576
|
}
|
|
2601
3577
|
var properties_initialized_ElevationJsApi_kt_8pvyh6;
|
|
2602
3578
|
function _init_properties_ElevationJsApi_kt__1yyas4() {
|
|
2603
3579
|
if (!properties_initialized_ElevationJsApi_kt_8pvyh6) {
|
|
2604
3580
|
properties_initialized_ElevationJsApi_kt_8pvyh6 = true;
|
|
2605
|
-
CONFIG_KEYS = setOf(['zoomLevel', 'cacheSize', 'tileUrlTemplate', 'tileSize']);
|
|
3581
|
+
CONFIG_KEYS = setOf(['zoomLevel', 'cacheSize', 'tileUrlTemplate', 'tileSize', 'source']);
|
|
2606
3582
|
ALONG_KEYS = setOf(['step', 'minDistance', 'interpolation', 'smoothingOptions', 'filterOptions']);
|
|
2607
3583
|
SMOOTHING_KEYS = setOf(['enabled', 'windowSize']);
|
|
2608
3584
|
FILTER_KEYS = setOf(['enabled', 'tolerance', 'zExaggeration']);
|
|
@@ -2619,32 +3595,72 @@
|
|
|
2619
3595
|
var tmp = KProperty0;
|
|
2620
3596
|
// Inline function 'kotlin.getValue' call
|
|
2621
3597
|
getPropertyCallableRef('nodeWebpDecoderPromise', 0, tmp, _get_nodeWebpDecoderPromise_$ref_s562t(), null);
|
|
2622
|
-
return tmp0.
|
|
3598
|
+
return tmp0.n1();
|
|
2623
3599
|
}
|
|
2624
3600
|
var nodeWebpDecoderPromise$delegate;
|
|
2625
3601
|
function fetchAndDecodeTile(url, $completion) {
|
|
2626
3602
|
var tmp = new $fetchAndDecodeTileCOROUTINE$(url, $completion);
|
|
2627
|
-
tmp.
|
|
2628
|
-
tmp.
|
|
2629
|
-
return tmp.
|
|
3603
|
+
tmp.i7_1 = Unit_instance;
|
|
3604
|
+
tmp.j7_1 = null;
|
|
3605
|
+
return tmp.o7();
|
|
3606
|
+
}
|
|
3607
|
+
function decodeTileBytes(bytes, sourceUrl, $completion) {
|
|
3608
|
+
sourceUrl = sourceUrl === VOID ? '' : sourceUrl;
|
|
3609
|
+
var tmp = new $decodeTileBytesCOROUTINE$(bytes, sourceUrl, $completion);
|
|
3610
|
+
tmp.i7_1 = Unit_instance;
|
|
3611
|
+
tmp.j7_1 = null;
|
|
3612
|
+
return tmp.o7();
|
|
2630
3613
|
}
|
|
2631
3614
|
function decodeNode(url, $completion) {
|
|
2632
3615
|
var tmp = new $decodeNodeCOROUTINE$(url, $completion);
|
|
2633
|
-
tmp.
|
|
2634
|
-
tmp.
|
|
2635
|
-
return tmp.
|
|
3616
|
+
tmp.i7_1 = Unit_instance;
|
|
3617
|
+
tmp.j7_1 = null;
|
|
3618
|
+
return tmp.o7();
|
|
2636
3619
|
}
|
|
2637
3620
|
function decodeBrowser(url, $completion) {
|
|
2638
3621
|
var tmp = new $decodeBrowserCOROUTINE$(url, $completion);
|
|
2639
|
-
tmp.
|
|
2640
|
-
tmp.
|
|
2641
|
-
return tmp.
|
|
3622
|
+
tmp.i7_1 = Unit_instance;
|
|
3623
|
+
tmp.j7_1 = null;
|
|
3624
|
+
return tmp.o7();
|
|
3625
|
+
}
|
|
3626
|
+
function decodeBytesNode(bytes, sourceUrl, $completion) {
|
|
3627
|
+
var tmp = new $decodeBytesNodeCOROUTINE$(bytes, sourceUrl, $completion);
|
|
3628
|
+
tmp.i7_1 = Unit_instance;
|
|
3629
|
+
tmp.j7_1 = null;
|
|
3630
|
+
return tmp.o7();
|
|
3631
|
+
}
|
|
3632
|
+
function decodeBlob(blob, sourceUrl, $completion) {
|
|
3633
|
+
var tmp = new $decodeBlobCOROUTINE$(blob, sourceUrl, $completion);
|
|
3634
|
+
tmp.i7_1 = Unit_instance;
|
|
3635
|
+
tmp.j7_1 = null;
|
|
3636
|
+
return tmp.o7();
|
|
3637
|
+
}
|
|
3638
|
+
function blobOf(bytes) {
|
|
3639
|
+
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
3640
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
3641
|
+
return new Blob([bytes]);
|
|
2642
3642
|
}
|
|
2643
3643
|
function fetchUrlNode(url) {
|
|
2644
3644
|
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
2645
3645
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
2646
3646
|
return globalThis.fetch(url);
|
|
2647
3647
|
}
|
|
3648
|
+
function requireOk(_this__u8e3s4, url) {
|
|
3649
|
+
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
3650
|
+
if (_this__u8e3s4.ok)
|
|
3651
|
+
return Unit_instance;
|
|
3652
|
+
var tmp0_safe_receiver = _this__u8e3s4.headers.get('Retry-After');
|
|
3653
|
+
var tmp;
|
|
3654
|
+
if (tmp0_safe_receiver == null) {
|
|
3655
|
+
tmp = null;
|
|
3656
|
+
} else {
|
|
3657
|
+
// Inline function 'kotlin.text.trim' call
|
|
3658
|
+
tmp = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
|
|
3659
|
+
}
|
|
3660
|
+
var tmp1_safe_receiver = tmp;
|
|
3661
|
+
var retryAfter = tmp1_safe_receiver == null ? null : toLongOrNull(tmp1_safe_receiver);
|
|
3662
|
+
throw new TileFetchException(url, _this__u8e3s4.status, retryAfter);
|
|
3663
|
+
}
|
|
2648
3664
|
function responseArrayBuffer(res) {
|
|
2649
3665
|
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
2650
3666
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2669,20 +3685,20 @@
|
|
|
2669
3685
|
}
|
|
2670
3686
|
function decodeWebpNode(buffer, $completion) {
|
|
2671
3687
|
var tmp = new $decodeWebpNodeCOROUTINE$(buffer, $completion);
|
|
2672
|
-
tmp.
|
|
2673
|
-
tmp.
|
|
2674
|
-
return tmp.
|
|
3688
|
+
tmp.i7_1 = Unit_instance;
|
|
3689
|
+
tmp.j7_1 = null;
|
|
3690
|
+
return tmp.o7();
|
|
2675
3691
|
}
|
|
2676
3692
|
function fetchUrlBrowser(url) {
|
|
2677
3693
|
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
2678
3694
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
2679
3695
|
return fetch(url);
|
|
2680
3696
|
}
|
|
2681
|
-
function
|
|
2682
|
-
var tmp = new $
|
|
2683
|
-
tmp.
|
|
2684
|
-
tmp.
|
|
2685
|
-
return tmp.
|
|
3697
|
+
function fetchTileBytes(url, $completion) {
|
|
3698
|
+
var tmp = new $fetchTileBytesCOROUTINE$(url, $completion);
|
|
3699
|
+
tmp.i7_1 = Unit_instance;
|
|
3700
|
+
tmp.j7_1 = null;
|
|
3701
|
+
return tmp.o7();
|
|
2686
3702
|
}
|
|
2687
3703
|
function nodeWebpDecoderPromise$delegate$lambda() {
|
|
2688
3704
|
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
@@ -2705,30 +3721,30 @@
|
|
|
2705
3721
|
function _get_nodeWebpDecoderPromise_$ref_s562t() {
|
|
2706
3722
|
return constructCallableReference(function () {
|
|
2707
3723
|
return get_nodeWebpDecoderPromise();
|
|
2708
|
-
}, 0, 0,
|
|
3724
|
+
}, 0, 0, 5);
|
|
2709
3725
|
}
|
|
2710
3726
|
function $fetchAndDecodeTileCOROUTINE$(url, resultContinuation) {
|
|
2711
3727
|
CoroutineImpl.call(this, resultContinuation);
|
|
2712
|
-
this.
|
|
3728
|
+
this.c1g_1 = url;
|
|
2713
3729
|
}
|
|
2714
|
-
protoOf($fetchAndDecodeTileCOROUTINE$).
|
|
2715
|
-
var suspendResult = this.
|
|
3730
|
+
protoOf($fetchAndDecodeTileCOROUTINE$).o7 = function () {
|
|
3731
|
+
var suspendResult = this.i7_1;
|
|
2716
3732
|
$sm: do
|
|
2717
3733
|
try {
|
|
2718
|
-
var tmp = this.
|
|
3734
|
+
var tmp = this.g7_1;
|
|
2719
3735
|
switch (tmp) {
|
|
2720
3736
|
case 0:
|
|
2721
|
-
this.
|
|
3737
|
+
this.h7_1 = 4;
|
|
2722
3738
|
if (get_isNode()) {
|
|
2723
|
-
this.
|
|
2724
|
-
suspendResult = decodeNode(this.
|
|
3739
|
+
this.g7_1 = 2;
|
|
3740
|
+
suspendResult = decodeNode(this.c1g_1, this);
|
|
2725
3741
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2726
3742
|
return suspendResult;
|
|
2727
3743
|
}
|
|
2728
3744
|
continue $sm;
|
|
2729
3745
|
} else {
|
|
2730
|
-
this.
|
|
2731
|
-
suspendResult = decodeBrowser(this.
|
|
3746
|
+
this.g7_1 = 1;
|
|
3747
|
+
suspendResult = decodeBrowser(this.c1g_1, this);
|
|
2732
3748
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2733
3749
|
return suspendResult;
|
|
2734
3750
|
}
|
|
@@ -2736,43 +3752,96 @@
|
|
|
2736
3752
|
}
|
|
2737
3753
|
|
|
2738
3754
|
case 1:
|
|
2739
|
-
this.
|
|
2740
|
-
this.
|
|
3755
|
+
this.d1g_1 = suspendResult;
|
|
3756
|
+
this.g7_1 = 3;
|
|
2741
3757
|
continue $sm;
|
|
2742
3758
|
case 2:
|
|
2743
|
-
this.
|
|
2744
|
-
this.
|
|
3759
|
+
this.d1g_1 = suspendResult;
|
|
3760
|
+
this.g7_1 = 3;
|
|
2745
3761
|
continue $sm;
|
|
2746
3762
|
case 3:
|
|
2747
|
-
return this.
|
|
3763
|
+
return this.d1g_1;
|
|
2748
3764
|
case 4:
|
|
2749
|
-
throw this.
|
|
3765
|
+
throw this.j7_1;
|
|
2750
3766
|
}
|
|
2751
3767
|
} catch ($p) {
|
|
2752
3768
|
var e = $p;
|
|
2753
|
-
if (this.
|
|
3769
|
+
if (this.h7_1 === 4) {
|
|
2754
3770
|
throw e;
|
|
2755
3771
|
} else {
|
|
2756
|
-
this.
|
|
2757
|
-
this.
|
|
3772
|
+
this.g7_1 = this.h7_1;
|
|
3773
|
+
this.j7_1 = e;
|
|
3774
|
+
}
|
|
3775
|
+
}
|
|
3776
|
+
while (true);
|
|
3777
|
+
};
|
|
3778
|
+
function $decodeTileBytesCOROUTINE$(bytes, sourceUrl, resultContinuation) {
|
|
3779
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
3780
|
+
this.m1g_1 = bytes;
|
|
3781
|
+
this.n1g_1 = sourceUrl;
|
|
3782
|
+
}
|
|
3783
|
+
protoOf($decodeTileBytesCOROUTINE$).o7 = function () {
|
|
3784
|
+
var suspendResult = this.i7_1;
|
|
3785
|
+
$sm: do
|
|
3786
|
+
try {
|
|
3787
|
+
var tmp = this.g7_1;
|
|
3788
|
+
switch (tmp) {
|
|
3789
|
+
case 0:
|
|
3790
|
+
this.h7_1 = 4;
|
|
3791
|
+
if (get_isNode()) {
|
|
3792
|
+
this.g7_1 = 2;
|
|
3793
|
+
suspendResult = decodeBytesNode(this.m1g_1, this.n1g_1, this);
|
|
3794
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3795
|
+
return suspendResult;
|
|
3796
|
+
}
|
|
3797
|
+
continue $sm;
|
|
3798
|
+
} else {
|
|
3799
|
+
this.g7_1 = 1;
|
|
3800
|
+
suspendResult = decodeBlob(blobOf(this.m1g_1), this.n1g_1, this);
|
|
3801
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3802
|
+
return suspendResult;
|
|
3803
|
+
}
|
|
3804
|
+
continue $sm;
|
|
3805
|
+
}
|
|
3806
|
+
|
|
3807
|
+
case 1:
|
|
3808
|
+
this.o1g_1 = suspendResult;
|
|
3809
|
+
this.g7_1 = 3;
|
|
3810
|
+
continue $sm;
|
|
3811
|
+
case 2:
|
|
3812
|
+
this.o1g_1 = suspendResult;
|
|
3813
|
+
this.g7_1 = 3;
|
|
3814
|
+
continue $sm;
|
|
3815
|
+
case 3:
|
|
3816
|
+
return this.o1g_1;
|
|
3817
|
+
case 4:
|
|
3818
|
+
throw this.j7_1;
|
|
3819
|
+
}
|
|
3820
|
+
} catch ($p) {
|
|
3821
|
+
var e = $p;
|
|
3822
|
+
if (this.h7_1 === 4) {
|
|
3823
|
+
throw e;
|
|
3824
|
+
} else {
|
|
3825
|
+
this.g7_1 = this.h7_1;
|
|
3826
|
+
this.j7_1 = e;
|
|
2758
3827
|
}
|
|
2759
3828
|
}
|
|
2760
3829
|
while (true);
|
|
2761
3830
|
};
|
|
2762
3831
|
function $decodeNodeCOROUTINE$(url, resultContinuation) {
|
|
2763
3832
|
CoroutineImpl.call(this, resultContinuation);
|
|
2764
|
-
this.
|
|
3833
|
+
this.x1g_1 = url;
|
|
2765
3834
|
}
|
|
2766
|
-
protoOf($decodeNodeCOROUTINE$).
|
|
2767
|
-
var suspendResult = this.
|
|
3835
|
+
protoOf($decodeNodeCOROUTINE$).o7 = function () {
|
|
3836
|
+
var suspendResult = this.i7_1;
|
|
2768
3837
|
$sm: do
|
|
2769
3838
|
try {
|
|
2770
|
-
var tmp = this.
|
|
3839
|
+
var tmp = this.g7_1;
|
|
2771
3840
|
switch (tmp) {
|
|
2772
3841
|
case 0:
|
|
2773
|
-
this.
|
|
2774
|
-
this.
|
|
2775
|
-
suspendResult = await_0(fetchUrlNode(this.
|
|
3842
|
+
this.h7_1 = 4;
|
|
3843
|
+
this.g7_1 = 1;
|
|
3844
|
+
suspendResult = await_0(fetchUrlNode(this.x1g_1), this);
|
|
2776
3845
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2777
3846
|
return suspendResult;
|
|
2778
3847
|
}
|
|
@@ -2780,12 +3849,8 @@
|
|
|
2780
3849
|
continue $sm;
|
|
2781
3850
|
case 1:
|
|
2782
3851
|
var res = suspendResult;
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
throw IllegalStateException_init_$Create$_0(toString(message));
|
|
2786
|
-
}
|
|
2787
|
-
|
|
2788
|
-
this.state_1 = 2;
|
|
3852
|
+
requireOk(res, this.x1g_1);
|
|
3853
|
+
this.g7_1 = 2;
|
|
2789
3854
|
suspendResult = await_0(responseArrayBuffer(res), this);
|
|
2790
3855
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2791
3856
|
return suspendResult;
|
|
@@ -2794,7 +3859,7 @@
|
|
|
2794
3859
|
continue $sm;
|
|
2795
3860
|
case 2:
|
|
2796
3861
|
var ab = suspendResult;
|
|
2797
|
-
this.
|
|
3862
|
+
this.g7_1 = 3;
|
|
2798
3863
|
suspendResult = decodeWebpNode(ab, this);
|
|
2799
3864
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2800
3865
|
return suspendResult;
|
|
@@ -2805,33 +3870,33 @@
|
|
|
2805
3870
|
var ARGUMENT = suspendResult;
|
|
2806
3871
|
return rawTileFromJsquash(ARGUMENT);
|
|
2807
3872
|
case 4:
|
|
2808
|
-
throw this.
|
|
3873
|
+
throw this.j7_1;
|
|
2809
3874
|
}
|
|
2810
3875
|
} catch ($p) {
|
|
2811
3876
|
var e = $p;
|
|
2812
|
-
if (this.
|
|
3877
|
+
if (this.h7_1 === 4) {
|
|
2813
3878
|
throw e;
|
|
2814
3879
|
} else {
|
|
2815
|
-
this.
|
|
2816
|
-
this.
|
|
3880
|
+
this.g7_1 = this.h7_1;
|
|
3881
|
+
this.j7_1 = e;
|
|
2817
3882
|
}
|
|
2818
3883
|
}
|
|
2819
3884
|
while (true);
|
|
2820
3885
|
};
|
|
2821
3886
|
function $decodeBrowserCOROUTINE$(url, resultContinuation) {
|
|
2822
3887
|
CoroutineImpl.call(this, resultContinuation);
|
|
2823
|
-
this.
|
|
3888
|
+
this.g1h_1 = url;
|
|
2824
3889
|
}
|
|
2825
|
-
protoOf($decodeBrowserCOROUTINE$).
|
|
2826
|
-
var suspendResult = this.
|
|
3890
|
+
protoOf($decodeBrowserCOROUTINE$).o7 = function () {
|
|
3891
|
+
var suspendResult = this.i7_1;
|
|
2827
3892
|
$sm: do
|
|
2828
3893
|
try {
|
|
2829
|
-
var tmp = this.
|
|
3894
|
+
var tmp = this.g7_1;
|
|
2830
3895
|
switch (tmp) {
|
|
2831
3896
|
case 0:
|
|
2832
|
-
this.
|
|
2833
|
-
this.
|
|
2834
|
-
suspendResult = await_0(fetchUrlBrowser(this.
|
|
3897
|
+
this.h7_1 = 4;
|
|
3898
|
+
this.g7_1 = 1;
|
|
3899
|
+
suspendResult = await_0(fetchUrlBrowser(this.g1h_1), this);
|
|
2835
3900
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2836
3901
|
return suspendResult;
|
|
2837
3902
|
}
|
|
@@ -2839,12 +3904,8 @@
|
|
|
2839
3904
|
continue $sm;
|
|
2840
3905
|
case 1:
|
|
2841
3906
|
var res = suspendResult;
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
throw IllegalStateException_init_$Create$_0(toString(message));
|
|
2845
|
-
}
|
|
2846
|
-
|
|
2847
|
-
this.state_1 = 2;
|
|
3907
|
+
requireOk(res, this.g1h_1);
|
|
3908
|
+
this.g7_1 = 2;
|
|
2848
3909
|
suspendResult = await_0(res.blob(), this);
|
|
2849
3910
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2850
3911
|
return suspendResult;
|
|
@@ -2853,8 +3914,8 @@
|
|
|
2853
3914
|
continue $sm;
|
|
2854
3915
|
case 2:
|
|
2855
3916
|
var ARGUMENT = suspendResult;
|
|
2856
|
-
this.
|
|
2857
|
-
suspendResult = decodeBlob(ARGUMENT, this.
|
|
3917
|
+
this.g7_1 = 3;
|
|
3918
|
+
suspendResult = decodeBlob(ARGUMENT, this.g1h_1, this);
|
|
2858
3919
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2859
3920
|
return suspendResult;
|
|
2860
3921
|
}
|
|
@@ -2863,97 +3924,117 @@
|
|
|
2863
3924
|
case 3:
|
|
2864
3925
|
return suspendResult;
|
|
2865
3926
|
case 4:
|
|
2866
|
-
throw this.
|
|
3927
|
+
throw this.j7_1;
|
|
2867
3928
|
}
|
|
2868
3929
|
} catch ($p) {
|
|
2869
3930
|
var e = $p;
|
|
2870
|
-
if (this.
|
|
3931
|
+
if (this.h7_1 === 4) {
|
|
2871
3932
|
throw e;
|
|
2872
3933
|
} else {
|
|
2873
|
-
this.
|
|
2874
|
-
this.
|
|
3934
|
+
this.g7_1 = this.h7_1;
|
|
3935
|
+
this.j7_1 = e;
|
|
2875
3936
|
}
|
|
2876
3937
|
}
|
|
2877
3938
|
while (true);
|
|
2878
3939
|
};
|
|
2879
|
-
function $
|
|
3940
|
+
function $decodeBytesNodeCOROUTINE$(bytes, sourceUrl, resultContinuation) {
|
|
2880
3941
|
CoroutineImpl.call(this, resultContinuation);
|
|
2881
|
-
this.
|
|
3942
|
+
this.p1h_1 = bytes;
|
|
3943
|
+
this.q1h_1 = sourceUrl;
|
|
2882
3944
|
}
|
|
2883
|
-
protoOf($
|
|
2884
|
-
var suspendResult = this.
|
|
3945
|
+
protoOf($decodeBytesNodeCOROUTINE$).o7 = function () {
|
|
3946
|
+
var suspendResult = this.i7_1;
|
|
2885
3947
|
$sm: do
|
|
2886
3948
|
try {
|
|
2887
|
-
var tmp = this.
|
|
3949
|
+
var tmp = this.g7_1;
|
|
2888
3950
|
switch (tmp) {
|
|
2889
3951
|
case 0:
|
|
2890
|
-
this.
|
|
2891
|
-
|
|
2892
|
-
|
|
3952
|
+
this.h7_1 = 4;
|
|
3953
|
+
var view = this.p1h_1;
|
|
3954
|
+
var buffer = view.buffer.slice(view.byteOffset, view.byteOffset + view.byteLength);
|
|
3955
|
+
this.h7_1 = 2;
|
|
3956
|
+
this.g7_1 = 1;
|
|
3957
|
+
suspendResult = decodeWebpNode(buffer, this);
|
|
2893
3958
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2894
3959
|
return suspendResult;
|
|
2895
3960
|
}
|
|
2896
3961
|
|
|
2897
3962
|
continue $sm;
|
|
2898
3963
|
case 1:
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
this.
|
|
2902
|
-
suspendResult = await_0(resultPromise, this);
|
|
2903
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2904
|
-
return suspendResult;
|
|
2905
|
-
}
|
|
2906
|
-
|
|
3964
|
+
this.r1h_1 = suspendResult;
|
|
3965
|
+
this.h7_1 = 4;
|
|
3966
|
+
this.g7_1 = 3;
|
|
2907
3967
|
continue $sm;
|
|
2908
3968
|
case 2:
|
|
2909
|
-
|
|
3969
|
+
this.h7_1 = 4;
|
|
3970
|
+
var tmp_0 = this.j7_1;
|
|
3971
|
+
if (tmp_0 instanceof Error) {
|
|
3972
|
+
var e = this.j7_1;
|
|
3973
|
+
var tmp_1 = this;
|
|
3974
|
+
var this_0 = this.q1h_1;
|
|
3975
|
+
var tmp_2;
|
|
3976
|
+
if (charSequenceLength(this_0) === 0) {
|
|
3977
|
+
tmp_2 = '<unnamed bytes>';
|
|
3978
|
+
} else {
|
|
3979
|
+
tmp_2 = this_0;
|
|
3980
|
+
}
|
|
3981
|
+
var message = 'Cannot decode tile at ' + tmp_2 + ': ' + e.message;
|
|
3982
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
3983
|
+
} else {
|
|
3984
|
+
throw this.j7_1;
|
|
3985
|
+
}
|
|
3986
|
+
|
|
2910
3987
|
case 3:
|
|
2911
|
-
|
|
3988
|
+
this.h7_1 = 4;
|
|
3989
|
+
var image = this.r1h_1;
|
|
3990
|
+
return rawTileFromJsquash(image);
|
|
3991
|
+
case 4:
|
|
3992
|
+
throw this.j7_1;
|
|
2912
3993
|
}
|
|
2913
3994
|
} catch ($p) {
|
|
2914
|
-
var
|
|
2915
|
-
if (this.
|
|
2916
|
-
throw
|
|
3995
|
+
var e_0 = $p;
|
|
3996
|
+
if (this.h7_1 === 4) {
|
|
3997
|
+
throw e_0;
|
|
2917
3998
|
} else {
|
|
2918
|
-
this.
|
|
2919
|
-
this.
|
|
3999
|
+
this.g7_1 = this.h7_1;
|
|
4000
|
+
this.j7_1 = e_0;
|
|
2920
4001
|
}
|
|
2921
4002
|
}
|
|
2922
4003
|
while (true);
|
|
2923
4004
|
};
|
|
2924
4005
|
function $decodeBlobCOROUTINE$(blob, sourceUrl, resultContinuation) {
|
|
2925
4006
|
CoroutineImpl.call(this, resultContinuation);
|
|
2926
|
-
this.
|
|
2927
|
-
this.
|
|
4007
|
+
this.a1i_1 = blob;
|
|
4008
|
+
this.b1i_1 = sourceUrl;
|
|
2928
4009
|
}
|
|
2929
|
-
protoOf($decodeBlobCOROUTINE$).
|
|
2930
|
-
var suspendResult = this.
|
|
4010
|
+
protoOf($decodeBlobCOROUTINE$).o7 = function () {
|
|
4011
|
+
var suspendResult = this.i7_1;
|
|
2931
4012
|
$sm: do
|
|
2932
4013
|
try {
|
|
2933
|
-
var tmp = this.
|
|
4014
|
+
var tmp = this.g7_1;
|
|
2934
4015
|
switch (tmp) {
|
|
2935
4016
|
case 0:
|
|
2936
|
-
this.
|
|
2937
|
-
this.
|
|
2938
|
-
this.
|
|
2939
|
-
suspendResult = await_0(window.createImageBitmap(this.
|
|
4017
|
+
this.h7_1 = 3;
|
|
4018
|
+
this.h7_1 = 2;
|
|
4019
|
+
this.g7_1 = 1;
|
|
4020
|
+
suspendResult = await_0(window.createImageBitmap(this.a1i_1), this);
|
|
2940
4021
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2941
4022
|
return suspendResult;
|
|
2942
4023
|
}
|
|
2943
4024
|
|
|
2944
4025
|
continue $sm;
|
|
2945
4026
|
case 1:
|
|
2946
|
-
this.
|
|
2947
|
-
this.
|
|
2948
|
-
this.
|
|
4027
|
+
this.c1i_1 = suspendResult;
|
|
4028
|
+
this.h7_1 = 3;
|
|
4029
|
+
this.g7_1 = 4;
|
|
2949
4030
|
continue $sm;
|
|
2950
4031
|
case 2:
|
|
2951
|
-
this.
|
|
2952
|
-
var tmp_0 = this.
|
|
4032
|
+
this.h7_1 = 3;
|
|
4033
|
+
var tmp_0 = this.j7_1;
|
|
2953
4034
|
if (tmp_0 instanceof Error) {
|
|
2954
|
-
var e = this.
|
|
4035
|
+
var e = this.j7_1;
|
|
2955
4036
|
var tmp_1 = this;
|
|
2956
|
-
var this_0 = this.
|
|
4037
|
+
var this_0 = this.b1i_1;
|
|
2957
4038
|
var tmp_2;
|
|
2958
4039
|
if (charSequenceLength(this_0) === 0) {
|
|
2959
4040
|
tmp_2 = '<unnamed bytes>';
|
|
@@ -2961,16 +4042,16 @@
|
|
|
2961
4042
|
tmp_2 = this_0;
|
|
2962
4043
|
}
|
|
2963
4044
|
var message = 'Cannot decode tile at ' + tmp_2 + ': ' + e.message;
|
|
2964
|
-
throw IllegalStateException_init_$Create$
|
|
4045
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
2965
4046
|
} else {
|
|
2966
|
-
throw this.
|
|
4047
|
+
throw this.j7_1;
|
|
2967
4048
|
}
|
|
2968
4049
|
|
|
2969
4050
|
case 3:
|
|
2970
|
-
throw this.
|
|
4051
|
+
throw this.j7_1;
|
|
2971
4052
|
case 4:
|
|
2972
|
-
this.
|
|
2973
|
-
var bitmap = this.
|
|
4053
|
+
this.h7_1 = 3;
|
|
4054
|
+
var bitmap = this.c1i_1;
|
|
2974
4055
|
l$ret$3: do {
|
|
2975
4056
|
var tmp$ret$0;
|
|
2976
4057
|
l$ret$1: do {
|
|
@@ -3007,11 +4088,119 @@
|
|
|
3007
4088
|
}
|
|
3008
4089
|
} catch ($p_0) {
|
|
3009
4090
|
var e_0 = $p_0;
|
|
3010
|
-
if (this.
|
|
4091
|
+
if (this.h7_1 === 3) {
|
|
3011
4092
|
throw e_0;
|
|
3012
4093
|
} else {
|
|
3013
|
-
this.
|
|
3014
|
-
this.
|
|
4094
|
+
this.g7_1 = this.h7_1;
|
|
4095
|
+
this.j7_1 = e_0;
|
|
4096
|
+
}
|
|
4097
|
+
}
|
|
4098
|
+
while (true);
|
|
4099
|
+
};
|
|
4100
|
+
function $decodeWebpNodeCOROUTINE$(buffer, resultContinuation) {
|
|
4101
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
4102
|
+
this.l1i_1 = buffer;
|
|
4103
|
+
}
|
|
4104
|
+
protoOf($decodeWebpNodeCOROUTINE$).o7 = function () {
|
|
4105
|
+
var suspendResult = this.i7_1;
|
|
4106
|
+
$sm: do
|
|
4107
|
+
try {
|
|
4108
|
+
var tmp = this.g7_1;
|
|
4109
|
+
switch (tmp) {
|
|
4110
|
+
case 0:
|
|
4111
|
+
this.h7_1 = 3;
|
|
4112
|
+
this.g7_1 = 1;
|
|
4113
|
+
suspendResult = await_0(get_nodeWebpDecoderPromise(), this);
|
|
4114
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4115
|
+
return suspendResult;
|
|
4116
|
+
}
|
|
4117
|
+
|
|
4118
|
+
continue $sm;
|
|
4119
|
+
case 1:
|
|
4120
|
+
var decode = suspendResult;
|
|
4121
|
+
var resultPromise = decode(this.l1i_1);
|
|
4122
|
+
this.g7_1 = 2;
|
|
4123
|
+
suspendResult = await_0(resultPromise, this);
|
|
4124
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4125
|
+
return suspendResult;
|
|
4126
|
+
}
|
|
4127
|
+
|
|
4128
|
+
continue $sm;
|
|
4129
|
+
case 2:
|
|
4130
|
+
return suspendResult;
|
|
4131
|
+
case 3:
|
|
4132
|
+
throw this.j7_1;
|
|
4133
|
+
}
|
|
4134
|
+
} catch ($p) {
|
|
4135
|
+
var e = $p;
|
|
4136
|
+
if (this.h7_1 === 3) {
|
|
4137
|
+
throw e;
|
|
4138
|
+
} else {
|
|
4139
|
+
this.g7_1 = this.h7_1;
|
|
4140
|
+
this.j7_1 = e;
|
|
4141
|
+
}
|
|
4142
|
+
}
|
|
4143
|
+
while (true);
|
|
4144
|
+
};
|
|
4145
|
+
function $fetchTileBytesCOROUTINE$(url, resultContinuation) {
|
|
4146
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
4147
|
+
this.u1i_1 = url;
|
|
4148
|
+
}
|
|
4149
|
+
protoOf($fetchTileBytesCOROUTINE$).o7 = function () {
|
|
4150
|
+
var suspendResult = this.i7_1;
|
|
4151
|
+
$sm: do
|
|
4152
|
+
try {
|
|
4153
|
+
var tmp = this.g7_1;
|
|
4154
|
+
switch (tmp) {
|
|
4155
|
+
case 0:
|
|
4156
|
+
this.h7_1 = 5;
|
|
4157
|
+
if (get_isNode()) {
|
|
4158
|
+
this.g7_1 = 2;
|
|
4159
|
+
suspendResult = await_0(fetchUrlNode(this.u1i_1), this);
|
|
4160
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4161
|
+
return suspendResult;
|
|
4162
|
+
}
|
|
4163
|
+
continue $sm;
|
|
4164
|
+
} else {
|
|
4165
|
+
this.g7_1 = 1;
|
|
4166
|
+
suspendResult = await_0(fetchUrlBrowser(this.u1i_1), this);
|
|
4167
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4168
|
+
return suspendResult;
|
|
4169
|
+
}
|
|
4170
|
+
continue $sm;
|
|
4171
|
+
}
|
|
4172
|
+
|
|
4173
|
+
case 1:
|
|
4174
|
+
this.v1i_1 = suspendResult;
|
|
4175
|
+
this.g7_1 = 3;
|
|
4176
|
+
continue $sm;
|
|
4177
|
+
case 2:
|
|
4178
|
+
this.v1i_1 = suspendResult;
|
|
4179
|
+
this.g7_1 = 3;
|
|
4180
|
+
continue $sm;
|
|
4181
|
+
case 3:
|
|
4182
|
+
var res = this.v1i_1;
|
|
4183
|
+
requireOk(res, this.u1i_1);
|
|
4184
|
+
this.g7_1 = 4;
|
|
4185
|
+
suspendResult = await_0(responseArrayBuffer(res), this);
|
|
4186
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4187
|
+
return suspendResult;
|
|
4188
|
+
}
|
|
4189
|
+
|
|
4190
|
+
continue $sm;
|
|
4191
|
+
case 4:
|
|
4192
|
+
var ab = suspendResult;
|
|
4193
|
+
return new Int8Array(ab);
|
|
4194
|
+
case 5:
|
|
4195
|
+
throw this.j7_1;
|
|
4196
|
+
}
|
|
4197
|
+
} catch ($p) {
|
|
4198
|
+
var e = $p;
|
|
4199
|
+
if (this.h7_1 === 5) {
|
|
4200
|
+
throw e;
|
|
4201
|
+
} else {
|
|
4202
|
+
this.g7_1 = this.h7_1;
|
|
4203
|
+
this.j7_1 = e;
|
|
3015
4204
|
}
|
|
3016
4205
|
}
|
|
3017
4206
|
while (true);
|
|
@@ -3028,9 +4217,15 @@
|
|
|
3028
4217
|
function fetchAndDecodeTile$ref_1() {
|
|
3029
4218
|
var i = new fetchAndDecodeTile$ref();
|
|
3030
4219
|
return constructCallableReference(function (p0, $completion) {
|
|
3031
|
-
return i.
|
|
4220
|
+
return i.h16(p0, $completion);
|
|
3032
4221
|
}, 1, 1, 2, 'fetchAndDecodeTile');
|
|
3033
4222
|
}
|
|
4223
|
+
function fetchTileBytes$ref_0() {
|
|
4224
|
+
var i = new fetchTileBytes$ref();
|
|
4225
|
+
return constructCallableReference(function (p0, $completion) {
|
|
4226
|
+
return i.w1d(p0, $completion);
|
|
4227
|
+
}, 1, 1, 4, 'fetchTileBytes');
|
|
4228
|
+
}
|
|
3034
4229
|
//region block: init
|
|
3035
4230
|
Distance_instance = new Distance();
|
|
3036
4231
|
DouglasPeucker_instance = new DouglasPeucker();
|
|
@@ -3038,7 +4233,7 @@
|
|
|
3038
4233
|
ElevationFunctions_instance = new ElevationFunctions();
|
|
3039
4234
|
ElevationSmoother_instance = new ElevationSmoother();
|
|
3040
4235
|
Flux_instance = new Flux();
|
|
3041
|
-
|
|
4236
|
+
Companion_instance_1 = new Companion_0();
|
|
3042
4237
|
//endregion
|
|
3043
4238
|
//region block: exports
|
|
3044
4239
|
function $jsExportAll$(_) {
|
|
@@ -3047,6 +4242,7 @@
|
|
|
3047
4242
|
var glandais = github.glandais || (github.glandais = {});
|
|
3048
4243
|
var elevation = glandais.elevation || (glandais.elevation = {});
|
|
3049
4244
|
elevation.newElevationProvider = newElevationProvider;
|
|
4245
|
+
elevation.elevationAttribution = elevationAttribution;
|
|
3050
4246
|
elevation.getElevation = getElevation;
|
|
3051
4247
|
elevation.getElevationsAlong = getElevationsAlong;
|
|
3052
4248
|
}
|
|
@@ -3056,11 +4252,11 @@
|
|
|
3056
4252
|
_.$_$.a = Distance_instance;
|
|
3057
4253
|
_.$_$.b = DouglasPeucker_instance;
|
|
3058
4254
|
_.$_$.c = ElevationSmoother_instance;
|
|
3059
|
-
_.$_$.d =
|
|
3060
|
-
_.$_$.e =
|
|
3061
|
-
_.$_$.f =
|
|
3062
|
-
_.$_$.g =
|
|
3063
|
-
_.$_$.h =
|
|
4255
|
+
_.$_$.d = Companion_getInstance;
|
|
4256
|
+
_.$_$.e = LatLonElevation;
|
|
4257
|
+
_.$_$.f = LatLon;
|
|
4258
|
+
_.$_$.g = Vector3D;
|
|
4259
|
+
_.$_$.h = provider;
|
|
3064
4260
|
//endregion
|
|
3065
4261
|
return _;
|
|
3066
4262
|
}));
|