@glandais/vcyclist-engine 1.2.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -8
- package/kotlin-kotlin-stdlib.js +2681 -1710
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +22 -22
- package/kotlinx-coroutines-core.js +1218 -1211
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +1 -1
- package/package.json +3 -2
- package/vcyclist-elevation.js +923 -896
- package/vcyclist-elevation.js.map +1 -1
- package/vcyclist-engine.d.ts +10 -0
- package/vcyclist-engine.js +1174 -2542
- package/vcyclist-engine.js.map +1 -1
- package/vcyclist-fit.js +656 -0
- package/vcyclist-fit.js.map +1 -0
- package/vcyclist-gpx.js +3401 -0
- package/vcyclist-gpx.js.map +1 -0
- package/xmlutil-core.js +2717 -2718
- package/xmlutil-core.js.map +1 -1
package/vcyclist-elevation.js
CHANGED
|
@@ -18,66 +18,67 @@
|
|
|
18
18
|
var imul = Math.imul;
|
|
19
19
|
var hypot = Math.hypot;
|
|
20
20
|
var VOID = kotlin_kotlin.$_$.a;
|
|
21
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
22
|
-
var getNumberHashCode = kotlin_kotlin.$_$.
|
|
23
|
-
var getBooleanHashCode = kotlin_kotlin.$_$.
|
|
24
|
-
var equals = kotlin_kotlin.$_$.
|
|
25
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
26
|
-
var numberToLong = kotlin_kotlin.$_$.
|
|
27
|
-
var toNumber = kotlin_kotlin.$_$.
|
|
28
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
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 initMetadataForObject = kotlin_kotlin.$_$.
|
|
48
|
-
var toList_0 = kotlin_kotlin.$_$.
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
21
|
+
var protoOf = kotlin_kotlin.$_$.y5;
|
|
22
|
+
var getNumberHashCode = kotlin_kotlin.$_$.f5;
|
|
23
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.e5;
|
|
24
|
+
var equals = kotlin_kotlin.$_$.d5;
|
|
25
|
+
var initMetadataForClass = kotlin_kotlin.$_$.j5;
|
|
26
|
+
var numberToLong = kotlin_kotlin.$_$.q4;
|
|
27
|
+
var toNumber = kotlin_kotlin.$_$.s4;
|
|
28
|
+
var CoroutineImpl = kotlin_kotlin.$_$.d4;
|
|
29
|
+
var Unit_instance = kotlin_kotlin.$_$.t;
|
|
30
|
+
var THROW_CCE = kotlin_kotlin.$_$.g8;
|
|
31
|
+
var MutableEntry = kotlin_kotlin.$_$.d2;
|
|
32
|
+
var isInterface = kotlin_kotlin.$_$.r5;
|
|
33
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.o3;
|
|
34
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.o5;
|
|
35
|
+
var constructCallableReference = kotlin_kotlin.$_$.b5;
|
|
36
|
+
var emptyList = kotlin_kotlin.$_$.p2;
|
|
37
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.b1;
|
|
38
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.x;
|
|
39
|
+
var toList = kotlin_kotlin.$_$.k3;
|
|
40
|
+
var KtList = kotlin_kotlin.$_$.a2;
|
|
41
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.l5;
|
|
42
|
+
var toString = kotlin_kotlin.$_$.a6;
|
|
43
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.m1;
|
|
44
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.w;
|
|
45
|
+
var listOf = kotlin_kotlin.$_$.a3;
|
|
46
|
+
var numberToInt = kotlin_kotlin.$_$.w5;
|
|
47
|
+
var initMetadataForObject = kotlin_kotlin.$_$.p5;
|
|
48
|
+
var toList_0 = kotlin_kotlin.$_$.j3;
|
|
49
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.j2;
|
|
50
|
+
var get_indices = kotlin_kotlin.$_$.u2;
|
|
51
|
+
var get_lastIndex = kotlin_kotlin.$_$.w2;
|
|
52
|
+
var checkBuilderCapacity = kotlin_kotlin.$_$.h2;
|
|
53
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
54
|
+
var coerceIn = kotlin_kotlin.$_$.i6;
|
|
55
|
+
var KFunctionImpl = kotlin_kotlin.$_$.m6;
|
|
56
|
+
var initMetadataForFunctionReference = kotlin_kotlin.$_$.m5;
|
|
57
|
+
var getStringHashCode = kotlin_kotlin.$_$.h5;
|
|
56
58
|
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
|
|
57
59
|
var Semaphore = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
|
|
58
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.e2;
|
|
59
60
|
var async = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i;
|
|
60
61
|
var awaitAll = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b;
|
|
61
62
|
var coroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d;
|
|
62
63
|
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g;
|
|
63
|
-
var KtMap = kotlin_kotlin.$_$.
|
|
64
|
+
var KtMap = kotlin_kotlin.$_$.b2;
|
|
64
65
|
var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
|
|
65
|
-
var contentEquals = kotlin_kotlin.$_$.
|
|
66
|
-
var contentHashCode = kotlin_kotlin.$_$.
|
|
67
|
-
var objectCreate = kotlin_kotlin.$_$.
|
|
68
|
-
var round = kotlin_kotlin.$_$.
|
|
69
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
70
|
-
var isNaN_0 = kotlin_kotlin.$_$.
|
|
71
|
-
var replace = kotlin_kotlin.$_$.
|
|
72
|
-
var coerceIn_0 = kotlin_kotlin.$_$.
|
|
66
|
+
var contentEquals = kotlin_kotlin.$_$.k2;
|
|
67
|
+
var contentHashCode = kotlin_kotlin.$_$.l2;
|
|
68
|
+
var objectCreate = kotlin_kotlin.$_$.x5;
|
|
69
|
+
var round = kotlin_kotlin.$_$.d6;
|
|
70
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.k5;
|
|
71
|
+
var isNaN_0 = kotlin_kotlin.$_$.n8;
|
|
72
|
+
var replace = kotlin_kotlin.$_$.i7;
|
|
73
|
+
var coerceIn_0 = kotlin_kotlin.$_$.h6;
|
|
73
74
|
var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
|
|
74
75
|
var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
|
|
75
|
-
var KProperty0 = kotlin_kotlin.$_$.
|
|
76
|
-
var getPropertyCallableRef = kotlin_kotlin.$_$.
|
|
76
|
+
var KProperty0 = kotlin_kotlin.$_$.o6;
|
|
77
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.g5;
|
|
77
78
|
var await_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
|
|
78
|
-
var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
79
|
-
var isNumber = kotlin_kotlin.$_$.
|
|
80
|
-
var lazy = kotlin_kotlin.$_$.
|
|
79
|
+
var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.o1;
|
|
80
|
+
var isNumber = kotlin_kotlin.$_$.s5;
|
|
81
|
+
var lazy = kotlin_kotlin.$_$.o8;
|
|
81
82
|
//endregion
|
|
82
83
|
//region block: pre-declaration
|
|
83
84
|
initMetadataForClass(SmoothingOptions, 'SmoothingOptions', SmoothingOptions);
|
|
@@ -130,15 +131,15 @@
|
|
|
130
131
|
function SmoothingOptions(windowSize, enabled) {
|
|
131
132
|
windowSize = windowSize === VOID ? 50.0 : windowSize;
|
|
132
133
|
enabled = enabled === VOID ? false : enabled;
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
134
|
+
this.yt_1 = windowSize;
|
|
135
|
+
this.zt_1 = enabled;
|
|
135
136
|
}
|
|
136
137
|
protoOf(SmoothingOptions).toString = function () {
|
|
137
|
-
return 'SmoothingOptions(windowSize=' + this.
|
|
138
|
+
return 'SmoothingOptions(windowSize=' + this.yt_1 + ', enabled=' + this.zt_1 + ')';
|
|
138
139
|
};
|
|
139
140
|
protoOf(SmoothingOptions).hashCode = function () {
|
|
140
|
-
var result = this.
|
|
141
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
141
|
+
var result = this.yt_1 == null ? 0 : getNumberHashCode(this.yt_1);
|
|
142
|
+
result = imul(result, 31) + getBooleanHashCode(this.zt_1) | 0;
|
|
142
143
|
return result;
|
|
143
144
|
};
|
|
144
145
|
protoOf(SmoothingOptions).equals = function (other) {
|
|
@@ -146,9 +147,9 @@
|
|
|
146
147
|
return true;
|
|
147
148
|
if (!(other instanceof SmoothingOptions))
|
|
148
149
|
return false;
|
|
149
|
-
if (!equals(this.
|
|
150
|
+
if (!equals(this.yt_1, other.yt_1))
|
|
150
151
|
return false;
|
|
151
|
-
if (!(this.
|
|
152
|
+
if (!(this.zt_1 === other.zt_1))
|
|
152
153
|
return false;
|
|
153
154
|
return true;
|
|
154
155
|
};
|
|
@@ -156,17 +157,17 @@
|
|
|
156
157
|
tolerance = tolerance === VOID ? 10.0 : tolerance;
|
|
157
158
|
zExaggeration = zExaggeration === VOID ? 3.0 : zExaggeration;
|
|
158
159
|
enabled = enabled === VOID ? false : enabled;
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
160
|
+
this.au_1 = tolerance;
|
|
161
|
+
this.bu_1 = zExaggeration;
|
|
162
|
+
this.cu_1 = enabled;
|
|
162
163
|
}
|
|
163
164
|
protoOf(FilterOptions).toString = function () {
|
|
164
|
-
return 'FilterOptions(tolerance=' + this.
|
|
165
|
+
return 'FilterOptions(tolerance=' + this.au_1 + ', zExaggeration=' + this.bu_1 + ', enabled=' + this.cu_1 + ')';
|
|
165
166
|
};
|
|
166
167
|
protoOf(FilterOptions).hashCode = function () {
|
|
167
|
-
var result = this.
|
|
168
|
-
result = imul(result, 31) + (this.
|
|
169
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
168
|
+
var result = this.au_1 == null ? 0 : getNumberHashCode(this.au_1);
|
|
169
|
+
result = imul(result, 31) + (this.bu_1 == null ? 0 : getNumberHashCode(this.bu_1)) | 0;
|
|
170
|
+
result = imul(result, 31) + getBooleanHashCode(this.cu_1) | 0;
|
|
170
171
|
return result;
|
|
171
172
|
};
|
|
172
173
|
protoOf(FilterOptions).equals = function (other) {
|
|
@@ -174,11 +175,11 @@
|
|
|
174
175
|
return true;
|
|
175
176
|
if (!(other instanceof FilterOptions))
|
|
176
177
|
return false;
|
|
177
|
-
if (!equals(this.
|
|
178
|
+
if (!equals(this.au_1, other.au_1))
|
|
178
179
|
return false;
|
|
179
|
-
if (!equals(this.
|
|
180
|
+
if (!equals(this.bu_1, other.bu_1))
|
|
180
181
|
return false;
|
|
181
|
-
if (!(this.
|
|
182
|
+
if (!(this.cu_1 === other.cu_1))
|
|
182
183
|
return false;
|
|
183
184
|
return true;
|
|
184
185
|
};
|
|
@@ -187,44 +188,44 @@
|
|
|
187
188
|
return toNumber(asLong) === d ? asLong.toString() : d.toString();
|
|
188
189
|
}
|
|
189
190
|
function BatchCalculator$setElevations$slambda($coordinates, this$0, $zoomLevel, $interpolation, $results, resultContinuation) {
|
|
190
|
-
this.
|
|
191
|
-
this.
|
|
192
|
-
this.
|
|
193
|
-
this.
|
|
194
|
-
this.
|
|
191
|
+
this.lu_1 = $coordinates;
|
|
192
|
+
this.mu_1 = this$0;
|
|
193
|
+
this.nu_1 = $zoomLevel;
|
|
194
|
+
this.ou_1 = $interpolation;
|
|
195
|
+
this.pu_1 = $results;
|
|
195
196
|
CoroutineImpl.call(this, resultContinuation);
|
|
196
197
|
}
|
|
197
|
-
protoOf(BatchCalculator$setElevations$slambda).
|
|
198
|
-
var tmp = this.
|
|
199
|
-
tmp.
|
|
200
|
-
tmp.
|
|
201
|
-
return tmp.
|
|
198
|
+
protoOf(BatchCalculator$setElevations$slambda).uu = function (_destruct__k2r9zo, $completion) {
|
|
199
|
+
var tmp = this.vu(_destruct__k2r9zo, $completion);
|
|
200
|
+
tmp.j6_1 = Unit_instance;
|
|
201
|
+
tmp.k6_1 = null;
|
|
202
|
+
return tmp.p6();
|
|
202
203
|
};
|
|
203
|
-
protoOf(BatchCalculator$setElevations$slambda).
|
|
204
|
-
return this.
|
|
204
|
+
protoOf(BatchCalculator$setElevations$slambda).x6 = function (p1, $completion) {
|
|
205
|
+
return this.uu((!(p1 == null) ? isInterface(p1, MutableEntry) : false) ? p1 : THROW_CCE(), $completion);
|
|
205
206
|
};
|
|
206
|
-
protoOf(BatchCalculator$setElevations$slambda).
|
|
207
|
-
var suspendResult = this.
|
|
207
|
+
protoOf(BatchCalculator$setElevations$slambda).p6 = function () {
|
|
208
|
+
var suspendResult = this.j6_1;
|
|
208
209
|
$sm: do
|
|
209
210
|
try {
|
|
210
|
-
var tmp = this.
|
|
211
|
+
var tmp = this.h6_1;
|
|
211
212
|
switch (tmp) {
|
|
212
213
|
case 0:
|
|
213
|
-
this.
|
|
214
|
-
var indices = this.
|
|
215
|
-
this.
|
|
216
|
-
this.
|
|
214
|
+
this.i6_1 = 4;
|
|
215
|
+
var indices = this.qu_1.i1();
|
|
216
|
+
this.tu_1 = indices.i();
|
|
217
|
+
this.h6_1 = 1;
|
|
217
218
|
continue $sm;
|
|
218
219
|
case 1:
|
|
219
|
-
if (!this.
|
|
220
|
-
this.
|
|
220
|
+
if (!this.tu_1.j()) {
|
|
221
|
+
this.h6_1 = 3;
|
|
221
222
|
continue $sm;
|
|
222
223
|
}
|
|
223
224
|
|
|
224
|
-
this.
|
|
225
|
-
this.
|
|
226
|
-
this.
|
|
227
|
-
suspendResult = this.
|
|
225
|
+
this.su_1 = this.tu_1.k();
|
|
226
|
+
this.ru_1 = this.lu_1.m(this.su_1);
|
|
227
|
+
this.h6_1 = 2;
|
|
228
|
+
suspendResult = this.mu_1.wu_1.zu(this.ru_1, this.nu_1, this.ou_1, this);
|
|
228
229
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
229
230
|
return suspendResult;
|
|
230
231
|
}
|
|
@@ -232,136 +233,136 @@
|
|
|
232
233
|
continue $sm;
|
|
233
234
|
case 2:
|
|
234
235
|
var ele = suspendResult;
|
|
235
|
-
this.
|
|
236
|
-
this.
|
|
236
|
+
this.pu_1[this.su_1] = new LatLonElevation(this.ru_1.av(), this.ru_1.bv(), ele);
|
|
237
|
+
this.h6_1 = 1;
|
|
237
238
|
continue $sm;
|
|
238
239
|
case 3:
|
|
239
240
|
return Unit_instance;
|
|
240
241
|
case 4:
|
|
241
|
-
throw this.
|
|
242
|
+
throw this.k6_1;
|
|
242
243
|
}
|
|
243
244
|
} catch ($p) {
|
|
244
245
|
var e = $p;
|
|
245
|
-
if (this.
|
|
246
|
+
if (this.i6_1 === 4) {
|
|
246
247
|
throw e;
|
|
247
248
|
} else {
|
|
248
|
-
this.
|
|
249
|
-
this.
|
|
249
|
+
this.h6_1 = this.i6_1;
|
|
250
|
+
this.k6_1 = e;
|
|
250
251
|
}
|
|
251
252
|
}
|
|
252
253
|
while (true);
|
|
253
254
|
};
|
|
254
|
-
protoOf(BatchCalculator$setElevations$slambda).
|
|
255
|
-
var i = new BatchCalculator$setElevations$slambda(this.
|
|
256
|
-
i.
|
|
255
|
+
protoOf(BatchCalculator$setElevations$slambda).vu = function (_destruct__k2r9zo, completion) {
|
|
256
|
+
var i = new BatchCalculator$setElevations$slambda(this.lu_1, this.mu_1, this.nu_1, this.ou_1, this.pu_1, completion);
|
|
257
|
+
i.qu_1 = _destruct__k2r9zo;
|
|
257
258
|
return i;
|
|
258
259
|
};
|
|
259
260
|
function BatchCalculator$setElevations$slambda_0($coordinates, this$0, $zoomLevel, $interpolation, $results, resultContinuation) {
|
|
260
261
|
var i = new BatchCalculator$setElevations$slambda($coordinates, this$0, $zoomLevel, $interpolation, $results, resultContinuation);
|
|
261
262
|
return constructCallableReference(function (_destruct__k2r9zo, $completion) {
|
|
262
|
-
return i.
|
|
263
|
+
return i.uu(_destruct__k2r9zo, $completion);
|
|
263
264
|
}, 1);
|
|
264
265
|
}
|
|
265
266
|
function $setElevationsCOROUTINE$(_this__u8e3s4, coordinates, zoomLevel, interpolation, maxParallelTiles, resultContinuation) {
|
|
266
267
|
CoroutineImpl.call(this, resultContinuation);
|
|
267
|
-
this.
|
|
268
|
-
this.
|
|
269
|
-
this.
|
|
270
|
-
this.
|
|
271
|
-
this.
|
|
272
|
-
}
|
|
273
|
-
protoOf($setElevationsCOROUTINE$).
|
|
274
|
-
var suspendResult = this.
|
|
268
|
+
this.kv_1 = _this__u8e3s4;
|
|
269
|
+
this.lv_1 = coordinates;
|
|
270
|
+
this.mv_1 = zoomLevel;
|
|
271
|
+
this.nv_1 = interpolation;
|
|
272
|
+
this.ov_1 = maxParallelTiles;
|
|
273
|
+
}
|
|
274
|
+
protoOf($setElevationsCOROUTINE$).p6 = function () {
|
|
275
|
+
var suspendResult = this.j6_1;
|
|
275
276
|
$sm: do
|
|
276
277
|
try {
|
|
277
|
-
var tmp = this.
|
|
278
|
+
var tmp = this.h6_1;
|
|
278
279
|
switch (tmp) {
|
|
279
280
|
case 0:
|
|
280
|
-
this.
|
|
281
|
-
if (this.
|
|
281
|
+
this.i6_1 = 2;
|
|
282
|
+
if (this.lv_1.n())
|
|
282
283
|
return emptyList();
|
|
283
284
|
var tmp_0 = this;
|
|
284
|
-
var size = this.
|
|
285
|
-
tmp_0.
|
|
285
|
+
var size = this.lv_1.l();
|
|
286
|
+
tmp_0.pv_1 = Array(size);
|
|
286
287
|
var byTile = LinkedHashMap_init_$Create$();
|
|
287
|
-
var iterator = this.
|
|
288
|
+
var iterator = this.lv_1.i();
|
|
288
289
|
var index = 0;
|
|
289
|
-
while (iterator.
|
|
290
|
+
while (iterator.j()) {
|
|
290
291
|
var i = index;
|
|
291
292
|
index = index + 1 | 0;
|
|
292
|
-
var p = iterator.
|
|
293
|
-
var tile = ElevationFunctions_instance.
|
|
294
|
-
var key = '' + tile.
|
|
295
|
-
var value = byTile.
|
|
293
|
+
var p = iterator.k();
|
|
294
|
+
var tile = ElevationFunctions_instance.qv(p, this.mv_1);
|
|
295
|
+
var key = '' + tile.tv_1 + '/' + tile.rv_1 + '/' + tile.sv_1;
|
|
296
|
+
var value = byTile.k1(key);
|
|
296
297
|
var tmp_1;
|
|
297
298
|
if (value == null) {
|
|
298
299
|
var answer = ArrayList_init_$Create$();
|
|
299
|
-
byTile.
|
|
300
|
+
byTile.c3(key, answer);
|
|
300
301
|
tmp_1 = answer;
|
|
301
302
|
} else {
|
|
302
303
|
tmp_1 = value;
|
|
303
304
|
}
|
|
304
|
-
tmp_1.
|
|
305
|
+
tmp_1.h(i);
|
|
305
306
|
}
|
|
306
307
|
|
|
307
|
-
this.
|
|
308
|
+
this.h6_1 = 1;
|
|
308
309
|
var tmp_2 = Flux_instance;
|
|
309
|
-
var tmp_3 = byTile.
|
|
310
|
-
suspendResult = tmp_2.
|
|
310
|
+
var tmp_3 = byTile.m1();
|
|
311
|
+
suspendResult = tmp_2.uv(tmp_3, this.ov_1, BatchCalculator$setElevations$slambda_0(this.lv_1, this.kv_1, this.mv_1, this.nv_1, this.pv_1, null), this);
|
|
311
312
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
312
313
|
return suspendResult;
|
|
313
314
|
}
|
|
314
315
|
|
|
315
316
|
continue $sm;
|
|
316
317
|
case 1:
|
|
317
|
-
var tmp_4 = toList(this.
|
|
318
|
+
var tmp_4 = toList(this.pv_1);
|
|
318
319
|
return isInterface(tmp_4, KtList) ? tmp_4 : THROW_CCE();
|
|
319
320
|
case 2:
|
|
320
|
-
throw this.
|
|
321
|
+
throw this.k6_1;
|
|
321
322
|
}
|
|
322
323
|
} catch ($p) {
|
|
323
324
|
var e = $p;
|
|
324
|
-
if (this.
|
|
325
|
+
if (this.i6_1 === 2) {
|
|
325
326
|
throw e;
|
|
326
327
|
} else {
|
|
327
|
-
this.
|
|
328
|
-
this.
|
|
328
|
+
this.h6_1 = this.i6_1;
|
|
329
|
+
this.k6_1 = e;
|
|
329
330
|
}
|
|
330
331
|
}
|
|
331
332
|
while (true);
|
|
332
333
|
};
|
|
333
334
|
function $getElevationsAlongCOROUTINE$(_this__u8e3s4, path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, resultContinuation) {
|
|
334
335
|
CoroutineImpl.call(this, resultContinuation);
|
|
335
|
-
this.
|
|
336
|
-
this.
|
|
337
|
-
this.
|
|
338
|
-
this.
|
|
339
|
-
this.
|
|
340
|
-
this.
|
|
341
|
-
this.
|
|
342
|
-
this.
|
|
343
|
-
}
|
|
344
|
-
protoOf($getElevationsAlongCOROUTINE$).
|
|
345
|
-
var suspendResult = this.
|
|
336
|
+
this.dw_1 = _this__u8e3s4;
|
|
337
|
+
this.ew_1 = path;
|
|
338
|
+
this.fw_1 = zoomLevel;
|
|
339
|
+
this.gw_1 = step;
|
|
340
|
+
this.hw_1 = minDistance;
|
|
341
|
+
this.iw_1 = interpolation;
|
|
342
|
+
this.jw_1 = smoothingOptions;
|
|
343
|
+
this.kw_1 = filterOptions;
|
|
344
|
+
}
|
|
345
|
+
protoOf($getElevationsAlongCOROUTINE$).p6 = function () {
|
|
346
|
+
var suspendResult = this.j6_1;
|
|
346
347
|
$sm: do
|
|
347
348
|
try {
|
|
348
|
-
var tmp = this.
|
|
349
|
+
var tmp = this.h6_1;
|
|
349
350
|
switch (tmp) {
|
|
350
351
|
case 0:
|
|
351
|
-
this.
|
|
352
|
-
if (!(this.
|
|
352
|
+
this.i6_1 = 2;
|
|
353
|
+
if (!(this.ew_1.l() >= 2)) {
|
|
353
354
|
var message = 'Path must contain at least 2 coordinates';
|
|
354
355
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
355
356
|
}
|
|
356
357
|
|
|
357
|
-
if (!(this.
|
|
358
|
-
var message_0 = 'Step is too small: ' + formatNumber(this.
|
|
358
|
+
if (!(this.gw_1 > 1.0)) {
|
|
359
|
+
var message_0 = 'Step is too small: ' + formatNumber(this.dw_1, this.gw_1) + ' meters';
|
|
359
360
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
360
361
|
}
|
|
361
362
|
|
|
362
|
-
var densified = this.
|
|
363
|
-
this.
|
|
364
|
-
suspendResult = this.
|
|
363
|
+
var densified = this.dw_1.lw(this.ew_1, this.gw_1, this.hw_1);
|
|
364
|
+
this.h6_1 = 1;
|
|
365
|
+
suspendResult = this.dw_1.mw(densified, this.fw_1, this.iw_1, VOID, this);
|
|
365
366
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
366
367
|
return suspendResult;
|
|
367
368
|
}
|
|
@@ -370,9 +371,9 @@
|
|
|
370
371
|
case 1:
|
|
371
372
|
var withElevation = suspendResult;
|
|
372
373
|
var tmp_0;
|
|
373
|
-
var tmp1_safe_receiver = this.
|
|
374
|
-
if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
375
|
-
tmp_0 = withElevation.
|
|
374
|
+
var tmp1_safe_receiver = this.jw_1;
|
|
375
|
+
if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zt_1) === true) {
|
|
376
|
+
tmp_0 = withElevation.l() >= 3;
|
|
376
377
|
} else {
|
|
377
378
|
tmp_0 = false;
|
|
378
379
|
}
|
|
@@ -380,14 +381,14 @@
|
|
|
380
381
|
if (tmp_0) {
|
|
381
382
|
var tmp_1 = ElevationSmoother_instance;
|
|
382
383
|
var tmp_2 = withElevation;
|
|
383
|
-
var tmp0_elvis_lhs = this.
|
|
384
|
-
withElevation = tmp_1.
|
|
384
|
+
var tmp0_elvis_lhs = this.jw_1.yt_1;
|
|
385
|
+
withElevation = tmp_1.nw(tmp_2, tmp0_elvis_lhs == null ? 50.0 : tmp0_elvis_lhs);
|
|
385
386
|
}
|
|
386
387
|
|
|
387
388
|
var tmp_3;
|
|
388
|
-
var tmp4_safe_receiver = this.
|
|
389
|
-
if ((tmp4_safe_receiver == null ? null : tmp4_safe_receiver.
|
|
390
|
-
tmp_3 = withElevation.
|
|
389
|
+
var tmp4_safe_receiver = this.kw_1;
|
|
390
|
+
if ((tmp4_safe_receiver == null ? null : tmp4_safe_receiver.cu_1) === true) {
|
|
391
|
+
tmp_3 = withElevation.l() > 2;
|
|
391
392
|
} else {
|
|
392
393
|
tmp_3 = false;
|
|
393
394
|
}
|
|
@@ -395,89 +396,89 @@
|
|
|
395
396
|
if (tmp_3) {
|
|
396
397
|
var tmp_4 = DouglasPeucker_instance;
|
|
397
398
|
var tmp_5 = withElevation;
|
|
398
|
-
var tmp2_elvis_lhs = this.
|
|
399
|
+
var tmp2_elvis_lhs = this.kw_1.au_1;
|
|
399
400
|
var tmp_6 = tmp2_elvis_lhs == null ? 10.0 : tmp2_elvis_lhs;
|
|
400
|
-
var tmp3_elvis_lhs = this.
|
|
401
|
-
withElevation = tmp_4.
|
|
401
|
+
var tmp3_elvis_lhs = this.kw_1.bu_1;
|
|
402
|
+
withElevation = tmp_4.ow(tmp_5, tmp_6, tmp3_elvis_lhs == null ? 3.0 : tmp3_elvis_lhs);
|
|
402
403
|
}
|
|
403
404
|
|
|
404
405
|
return withElevation;
|
|
405
406
|
case 2:
|
|
406
|
-
throw this.
|
|
407
|
+
throw this.k6_1;
|
|
407
408
|
}
|
|
408
409
|
} catch ($p) {
|
|
409
410
|
var e = $p;
|
|
410
|
-
if (this.
|
|
411
|
+
if (this.i6_1 === 2) {
|
|
411
412
|
throw e;
|
|
412
413
|
} else {
|
|
413
|
-
this.
|
|
414
|
-
this.
|
|
414
|
+
this.h6_1 = this.i6_1;
|
|
415
|
+
this.k6_1 = e;
|
|
415
416
|
}
|
|
416
417
|
}
|
|
417
418
|
while (true);
|
|
418
419
|
};
|
|
419
420
|
function BatchCalculator(calculator) {
|
|
420
|
-
this.
|
|
421
|
+
this.wu_1 = calculator;
|
|
421
422
|
}
|
|
422
|
-
protoOf(BatchCalculator).
|
|
423
|
+
protoOf(BatchCalculator).pw = function (coordinates, zoomLevel, interpolation, maxParallelTiles, $completion) {
|
|
423
424
|
var tmp = new $setElevationsCOROUTINE$(this, coordinates, zoomLevel, interpolation, maxParallelTiles, $completion);
|
|
424
|
-
tmp.
|
|
425
|
-
tmp.
|
|
426
|
-
return tmp.
|
|
425
|
+
tmp.j6_1 = Unit_instance;
|
|
426
|
+
tmp.k6_1 = null;
|
|
427
|
+
return tmp.p6();
|
|
427
428
|
};
|
|
428
|
-
protoOf(BatchCalculator).
|
|
429
|
+
protoOf(BatchCalculator).mw = function (coordinates, zoomLevel, interpolation, maxParallelTiles, $completion, $super) {
|
|
429
430
|
maxParallelTiles = maxParallelTiles === VOID ? 10 : maxParallelTiles;
|
|
430
|
-
return $super === VOID ? this.
|
|
431
|
+
return $super === VOID ? this.pw(coordinates, zoomLevel, interpolation, maxParallelTiles, $completion) : $super.pw.call(this, coordinates, zoomLevel, interpolation, maxParallelTiles, $completion);
|
|
431
432
|
};
|
|
432
|
-
protoOf(BatchCalculator).
|
|
433
|
+
protoOf(BatchCalculator).qw = function (path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion) {
|
|
433
434
|
var tmp = new $getElevationsAlongCOROUTINE$(this, path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion);
|
|
434
|
-
tmp.
|
|
435
|
-
tmp.
|
|
436
|
-
return tmp.
|
|
435
|
+
tmp.j6_1 = Unit_instance;
|
|
436
|
+
tmp.k6_1 = null;
|
|
437
|
+
return tmp.p6();
|
|
437
438
|
};
|
|
438
|
-
protoOf(BatchCalculator).
|
|
439
|
-
if (path.
|
|
439
|
+
protoOf(BatchCalculator).lw = function (path, step, minDistance) {
|
|
440
|
+
if (path.n())
|
|
440
441
|
return emptyList();
|
|
441
|
-
var out = ArrayList_init_$Create$_0(imul(path.
|
|
442
|
+
var out = ArrayList_init_$Create$_0(imul(path.l(), 2));
|
|
442
443
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
443
|
-
var element = path.
|
|
444
|
-
out.
|
|
444
|
+
var element = path.m(0);
|
|
445
|
+
out.h(element);
|
|
445
446
|
var inductionVariable = 0;
|
|
446
|
-
var last = path.
|
|
447
|
+
var last = path.l() - 1 | 0;
|
|
447
448
|
if (inductionVariable < last)
|
|
448
449
|
$l$loop: do {
|
|
449
450
|
var i = inductionVariable;
|
|
450
451
|
inductionVariable = inductionVariable + 1 | 0;
|
|
451
|
-
var a = path.
|
|
452
|
-
var b = path.
|
|
453
|
-
var d = Distance_instance.
|
|
452
|
+
var a = path.m(i);
|
|
453
|
+
var b = path.m(i + 1 | 0);
|
|
454
|
+
var d = Distance_instance.rw(a, b);
|
|
454
455
|
if (d < minDistance)
|
|
455
456
|
continue $l$loop;
|
|
456
|
-
var between = this.
|
|
457
|
+
var between = this.sw(a, b, step, d);
|
|
457
458
|
var inductionVariable_0 = 1;
|
|
458
|
-
var last_0 = between.
|
|
459
|
+
var last_0 = between.l();
|
|
459
460
|
if (inductionVariable_0 < last_0)
|
|
460
461
|
do {
|
|
461
462
|
var j = inductionVariable_0;
|
|
462
463
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
463
464
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
464
|
-
var element_0 = between.
|
|
465
|
-
out.
|
|
465
|
+
var element_0 = between.m(j);
|
|
466
|
+
out.h(element_0);
|
|
466
467
|
}
|
|
467
468
|
while (inductionVariable_0 < last_0);
|
|
468
469
|
}
|
|
469
470
|
while (inductionVariable < last);
|
|
470
471
|
return out;
|
|
471
472
|
};
|
|
472
|
-
protoOf(BatchCalculator).
|
|
473
|
+
protoOf(BatchCalculator).sw = function (a, b, step, distance) {
|
|
473
474
|
if (distance <= step)
|
|
474
475
|
return listOf([a, b]);
|
|
475
476
|
var numSteps = numberToInt(distance / step);
|
|
476
477
|
var out = ArrayList_init_$Create$_0(numSteps + 2 | 0);
|
|
477
478
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
478
|
-
out.
|
|
479
|
-
var latDiff = b.
|
|
480
|
-
var lonDiff = b.
|
|
479
|
+
out.h(a);
|
|
480
|
+
var latDiff = b.av() - a.av();
|
|
481
|
+
var lonDiff = b.bv() - a.bv();
|
|
481
482
|
var inductionVariable = 1;
|
|
482
483
|
if (inductionVariable <= numSteps)
|
|
483
484
|
do {
|
|
@@ -485,18 +486,18 @@
|
|
|
485
486
|
inductionVariable = inductionVariable + 1 | 0;
|
|
486
487
|
var f = i * step / distance;
|
|
487
488
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
488
|
-
var element = new LatLon(a.
|
|
489
|
-
out.
|
|
489
|
+
var element = new LatLon(a.av() + latDiff * f, a.bv() + lonDiff * f);
|
|
490
|
+
out.h(element);
|
|
490
491
|
}
|
|
491
492
|
while (!(i === numSteps));
|
|
492
493
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
493
|
-
out.
|
|
494
|
+
out.h(b);
|
|
494
495
|
return out;
|
|
495
496
|
};
|
|
496
497
|
function MathConstants() {
|
|
497
498
|
MathConstants_instance = this;
|
|
498
|
-
this.
|
|
499
|
-
this.
|
|
499
|
+
this.tw_1 = 3.141592653589793 / 180.0;
|
|
500
|
+
this.uw_1 = 180.0 / 3.141592653589793;
|
|
500
501
|
}
|
|
501
502
|
var MathConstants_instance;
|
|
502
503
|
function MathConstants_getInstance() {
|
|
@@ -506,26 +507,26 @@
|
|
|
506
507
|
}
|
|
507
508
|
function LatLon(latitude, longitude, elevation) {
|
|
508
509
|
elevation = elevation === VOID ? null : elevation;
|
|
509
|
-
this.
|
|
510
|
-
this.
|
|
511
|
-
this.
|
|
510
|
+
this.vw_1 = latitude;
|
|
511
|
+
this.ww_1 = longitude;
|
|
512
|
+
this.xw_1 = elevation;
|
|
512
513
|
}
|
|
513
|
-
protoOf(LatLon).
|
|
514
|
-
return this.
|
|
514
|
+
protoOf(LatLon).av = function () {
|
|
515
|
+
return this.vw_1;
|
|
515
516
|
};
|
|
516
|
-
protoOf(LatLon).
|
|
517
|
-
return this.
|
|
517
|
+
protoOf(LatLon).bv = function () {
|
|
518
|
+
return this.ww_1;
|
|
518
519
|
};
|
|
519
|
-
protoOf(LatLon).
|
|
520
|
-
return this.
|
|
520
|
+
protoOf(LatLon).yw = function () {
|
|
521
|
+
return this.xw_1;
|
|
521
522
|
};
|
|
522
523
|
protoOf(LatLon).toString = function () {
|
|
523
|
-
return 'LatLon(latitude=' + this.
|
|
524
|
+
return 'LatLon(latitude=' + this.vw_1 + ', longitude=' + this.ww_1 + ', elevation=' + this.xw_1 + ')';
|
|
524
525
|
};
|
|
525
526
|
protoOf(LatLon).hashCode = function () {
|
|
526
|
-
var result = getNumberHashCode(this.
|
|
527
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
528
|
-
result = imul(result, 31) + (this.
|
|
527
|
+
var result = getNumberHashCode(this.vw_1);
|
|
528
|
+
result = imul(result, 31) + getNumberHashCode(this.ww_1) | 0;
|
|
529
|
+
result = imul(result, 31) + (this.xw_1 == null ? 0 : getNumberHashCode(this.xw_1)) | 0;
|
|
529
530
|
return result;
|
|
530
531
|
};
|
|
531
532
|
protoOf(LatLon).equals = function (other) {
|
|
@@ -533,35 +534,35 @@
|
|
|
533
534
|
return true;
|
|
534
535
|
if (!(other instanceof LatLon))
|
|
535
536
|
return false;
|
|
536
|
-
if (!equals(this.
|
|
537
|
+
if (!equals(this.vw_1, other.vw_1))
|
|
537
538
|
return false;
|
|
538
|
-
if (!equals(this.
|
|
539
|
+
if (!equals(this.ww_1, other.ww_1))
|
|
539
540
|
return false;
|
|
540
|
-
if (!equals(this.
|
|
541
|
+
if (!equals(this.xw_1, other.xw_1))
|
|
541
542
|
return false;
|
|
542
543
|
return true;
|
|
543
544
|
};
|
|
544
545
|
function LatLonElevation(latitude, longitude, elevation) {
|
|
545
|
-
this.
|
|
546
|
-
this.
|
|
547
|
-
this.
|
|
546
|
+
this.zw_1 = latitude;
|
|
547
|
+
this.ax_1 = longitude;
|
|
548
|
+
this.bx_1 = elevation;
|
|
548
549
|
}
|
|
549
|
-
protoOf(LatLonElevation).
|
|
550
|
-
return this.
|
|
550
|
+
protoOf(LatLonElevation).av = function () {
|
|
551
|
+
return this.zw_1;
|
|
551
552
|
};
|
|
552
|
-
protoOf(LatLonElevation).
|
|
553
|
-
return this.
|
|
553
|
+
protoOf(LatLonElevation).bv = function () {
|
|
554
|
+
return this.ax_1;
|
|
554
555
|
};
|
|
555
|
-
protoOf(LatLonElevation).
|
|
556
|
-
return this.
|
|
556
|
+
protoOf(LatLonElevation).yw = function () {
|
|
557
|
+
return this.bx_1;
|
|
557
558
|
};
|
|
558
559
|
protoOf(LatLonElevation).toString = function () {
|
|
559
|
-
return 'LatLonElevation(latitude=' + this.
|
|
560
|
+
return 'LatLonElevation(latitude=' + this.zw_1 + ', longitude=' + this.ax_1 + ', elevation=' + this.bx_1 + ')';
|
|
560
561
|
};
|
|
561
562
|
protoOf(LatLonElevation).hashCode = function () {
|
|
562
|
-
var result = getNumberHashCode(this.
|
|
563
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
564
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
563
|
+
var result = getNumberHashCode(this.zw_1);
|
|
564
|
+
result = imul(result, 31) + getNumberHashCode(this.ax_1) | 0;
|
|
565
|
+
result = imul(result, 31) + getNumberHashCode(this.bx_1) | 0;
|
|
565
566
|
return result;
|
|
566
567
|
};
|
|
567
568
|
protoOf(LatLonElevation).equals = function (other) {
|
|
@@ -569,21 +570,21 @@
|
|
|
569
570
|
return true;
|
|
570
571
|
if (!(other instanceof LatLonElevation))
|
|
571
572
|
return false;
|
|
572
|
-
if (!equals(this.
|
|
573
|
+
if (!equals(this.zw_1, other.zw_1))
|
|
573
574
|
return false;
|
|
574
|
-
if (!equals(this.
|
|
575
|
+
if (!equals(this.ax_1, other.ax_1))
|
|
575
576
|
return false;
|
|
576
|
-
if (!equals(this.
|
|
577
|
+
if (!equals(this.bx_1, other.bx_1))
|
|
577
578
|
return false;
|
|
578
579
|
return true;
|
|
579
580
|
};
|
|
580
581
|
function Distance() {
|
|
581
582
|
}
|
|
582
|
-
protoOf(Distance).
|
|
583
|
-
var lat1Rad = coord1.
|
|
584
|
-
var lat2Rad = coord2.
|
|
585
|
-
var deltaLat = (coord2.
|
|
586
|
-
var deltaLon = (coord2.
|
|
583
|
+
protoOf(Distance).rw = function (coord1, coord2) {
|
|
584
|
+
var lat1Rad = coord1.av() * MathConstants_getInstance().tw_1;
|
|
585
|
+
var lat2Rad = coord2.av() * MathConstants_getInstance().tw_1;
|
|
586
|
+
var deltaLat = (coord2.av() - coord1.av()) * MathConstants_getInstance().tw_1;
|
|
587
|
+
var deltaLon = (coord2.bv() - coord1.bv()) * MathConstants_getInstance().tw_1;
|
|
587
588
|
// Inline function 'kotlin.math.sin' call
|
|
588
589
|
var x = deltaLat / 2.0;
|
|
589
590
|
var sinHalfLat = Math.sin(x);
|
|
@@ -604,19 +605,19 @@
|
|
|
604
605
|
var c = 2.0 * Math.atan2(tmp0, x_2);
|
|
605
606
|
return 6371000.0 * c;
|
|
606
607
|
};
|
|
607
|
-
protoOf(Distance).
|
|
608
|
-
if (points.
|
|
608
|
+
protoOf(Distance).cx = function (points) {
|
|
609
|
+
if (points.n()) {
|
|
609
610
|
// Inline function 'kotlin.doubleArrayOf' call
|
|
610
611
|
return new Float64Array([0.0]);
|
|
611
612
|
}
|
|
612
|
-
var out = new Float64Array(points.
|
|
613
|
+
var out = new Float64Array(points.l());
|
|
613
614
|
var inductionVariable = 1;
|
|
614
|
-
var last = points.
|
|
615
|
+
var last = points.l();
|
|
615
616
|
if (inductionVariable < last)
|
|
616
617
|
do {
|
|
617
618
|
var i = inductionVariable;
|
|
618
619
|
inductionVariable = inductionVariable + 1 | 0;
|
|
619
|
-
out[i] = out[i - 1 | 0] + this.
|
|
620
|
+
out[i] = out[i - 1 | 0] + this.rw(points.m(i - 1 | 0), points.m(i));
|
|
620
621
|
}
|
|
621
622
|
while (inductionVariable < last);
|
|
622
623
|
return out;
|
|
@@ -625,9 +626,9 @@
|
|
|
625
626
|
function Distance_getInstance() {
|
|
626
627
|
return Distance_instance;
|
|
627
628
|
}
|
|
628
|
-
function simplifyRecursive($this, points, firstIndex, lastIndex, tolerance,
|
|
629
|
-
var
|
|
630
|
-
var
|
|
629
|
+
function simplifyRecursive($this, points, firstIndex, lastIndex, tolerance, out) {
|
|
630
|
+
var first = points.m(firstIndex);
|
|
631
|
+
var last = points.m(lastIndex);
|
|
631
632
|
var maxDistance = 0.0;
|
|
632
633
|
var maxIndex = -1;
|
|
633
634
|
var inductionVariable = firstIndex + 1 | 0;
|
|
@@ -635,7 +636,7 @@
|
|
|
635
636
|
do {
|
|
636
637
|
var i = inductionVariable;
|
|
637
638
|
inductionVariable = inductionVariable + 1 | 0;
|
|
638
|
-
var d =
|
|
639
|
+
var d = points.m(i).gx(first, last);
|
|
639
640
|
if (d > maxDistance) {
|
|
640
641
|
maxDistance = d;
|
|
641
642
|
maxIndex = i;
|
|
@@ -644,30 +645,55 @@
|
|
|
644
645
|
while (inductionVariable < lastIndex);
|
|
645
646
|
if (maxDistance > tolerance && !(maxIndex === -1)) {
|
|
646
647
|
if ((maxIndex - firstIndex | 0) > 1) {
|
|
647
|
-
simplifyRecursive($this, points, firstIndex, maxIndex, tolerance,
|
|
648
|
+
simplifyRecursive($this, points, firstIndex, maxIndex, tolerance, out);
|
|
648
649
|
}
|
|
649
|
-
out.
|
|
650
|
+
out.h(maxIndex);
|
|
650
651
|
if ((lastIndex - maxIndex | 0) > 1) {
|
|
651
|
-
simplifyRecursive($this, points, maxIndex, lastIndex, tolerance,
|
|
652
|
+
simplifyRecursive($this, points, maxIndex, lastIndex, tolerance, out);
|
|
652
653
|
}
|
|
653
654
|
}
|
|
654
655
|
}
|
|
655
656
|
function DouglasPeucker() {
|
|
656
657
|
}
|
|
657
|
-
protoOf(DouglasPeucker).
|
|
658
|
-
if (points.
|
|
658
|
+
protoOf(DouglasPeucker).ow = function (points, tolerance, zExaggeration) {
|
|
659
|
+
if (points.l() <= 2)
|
|
659
660
|
return toList_0(points);
|
|
661
|
+
// Inline function 'kotlin.collections.map' call
|
|
662
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
663
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(points, 10));
|
|
664
|
+
var _iterator__ex2g4s = points.i();
|
|
665
|
+
while (_iterator__ex2g4s.j()) {
|
|
666
|
+
var item = _iterator__ex2g4s.k();
|
|
667
|
+
var tmp$ret$2 = EcefConverter_instance.hx(item, zExaggeration);
|
|
668
|
+
destination.h(tmp$ret$2);
|
|
669
|
+
}
|
|
670
|
+
var ecef = destination;
|
|
671
|
+
// Inline function 'kotlin.collections.map' call
|
|
672
|
+
var this_0 = this.ix(ecef, tolerance);
|
|
673
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
674
|
+
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
675
|
+
var _iterator__ex2g4s_0 = this_0.i();
|
|
676
|
+
while (_iterator__ex2g4s_0.j()) {
|
|
677
|
+
var item_0 = _iterator__ex2g4s_0.k();
|
|
678
|
+
var tmp$ret$5 = points.m(item_0);
|
|
679
|
+
destination_0.h(tmp$ret$5);
|
|
680
|
+
}
|
|
681
|
+
return destination_0;
|
|
682
|
+
};
|
|
683
|
+
protoOf(DouglasPeucker).ix = function (points, tolerance) {
|
|
684
|
+
if (points.l() <= 2)
|
|
685
|
+
return toList_0(get_indices(points));
|
|
660
686
|
var lastIndex = get_lastIndex(points);
|
|
661
687
|
// Inline function 'kotlin.collections.buildList' call
|
|
662
688
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
663
|
-
var capacity = points.
|
|
689
|
+
var capacity = points.l();
|
|
664
690
|
checkBuilderCapacity(capacity);
|
|
665
691
|
// Inline function 'kotlin.apply' call
|
|
666
692
|
var this_0 = ArrayList_init_$Create$_0(capacity);
|
|
667
|
-
this_0.
|
|
668
|
-
simplifyRecursive(DouglasPeucker_instance, points, 0, lastIndex, tolerance,
|
|
669
|
-
this_0.
|
|
670
|
-
return this_0.
|
|
693
|
+
this_0.h(0);
|
|
694
|
+
simplifyRecursive(DouglasPeucker_instance, points, 0, lastIndex, tolerance, this_0);
|
|
695
|
+
this_0.h(lastIndex);
|
|
696
|
+
return this_0.o3();
|
|
671
697
|
};
|
|
672
698
|
var DouglasPeucker_instance;
|
|
673
699
|
function DouglasPeucker_getInstance() {
|
|
@@ -675,10 +701,10 @@
|
|
|
675
701
|
}
|
|
676
702
|
function EcefConverter() {
|
|
677
703
|
}
|
|
678
|
-
protoOf(EcefConverter).
|
|
679
|
-
var latRad = coordinates.
|
|
680
|
-
var lonRad = coordinates.
|
|
681
|
-
var tmp0_elvis_lhs = coordinates.
|
|
704
|
+
protoOf(EcefConverter).hx = function (coordinates, zExaggeration) {
|
|
705
|
+
var latRad = coordinates.av() * MathConstants_getInstance().tw_1;
|
|
706
|
+
var lonRad = coordinates.bv() * MathConstants_getInstance().tw_1;
|
|
707
|
+
var tmp0_elvis_lhs = coordinates.yw();
|
|
682
708
|
var elevationExaggerated = zExaggeration * (tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs);
|
|
683
709
|
// Inline function 'kotlin.math.sin' call
|
|
684
710
|
var sinLat = Math.sin(latRad);
|
|
@@ -702,43 +728,43 @@
|
|
|
702
728
|
}
|
|
703
729
|
function getInterpolatedElevation($this, coords, zoomLevel, $completion) {
|
|
704
730
|
var tmp = new $getInterpolatedElevationCOROUTINE$($this, coords, zoomLevel, $completion);
|
|
705
|
-
tmp.
|
|
706
|
-
tmp.
|
|
707
|
-
return tmp.
|
|
731
|
+
tmp.j6_1 = Unit_instance;
|
|
732
|
+
tmp.k6_1 = null;
|
|
733
|
+
return tmp.p6();
|
|
708
734
|
}
|
|
709
735
|
function elevationFromPixel($this, pixel, $completion) {
|
|
710
736
|
var tmp = new $elevationFromPixelCOROUTINE$($this, pixel, $completion);
|
|
711
|
-
tmp.
|
|
712
|
-
tmp.
|
|
713
|
-
return tmp.
|
|
737
|
+
tmp.j6_1 = Unit_instance;
|
|
738
|
+
tmp.k6_1 = null;
|
|
739
|
+
return tmp.p6();
|
|
714
740
|
}
|
|
715
741
|
function $getElevationCOROUTINE$(_this__u8e3s4, coords, zoomLevel, interpolation, resultContinuation) {
|
|
716
742
|
CoroutineImpl.call(this, resultContinuation);
|
|
717
|
-
this.
|
|
718
|
-
this.
|
|
719
|
-
this.
|
|
720
|
-
this.
|
|
743
|
+
this.wy_1 = _this__u8e3s4;
|
|
744
|
+
this.xy_1 = coords;
|
|
745
|
+
this.yy_1 = zoomLevel;
|
|
746
|
+
this.zy_1 = interpolation;
|
|
721
747
|
}
|
|
722
|
-
protoOf($getElevationCOROUTINE$).
|
|
723
|
-
var suspendResult = this.
|
|
748
|
+
protoOf($getElevationCOROUTINE$).p6 = function () {
|
|
749
|
+
var suspendResult = this.j6_1;
|
|
724
750
|
$sm: do
|
|
725
751
|
try {
|
|
726
|
-
var tmp = this.
|
|
752
|
+
var tmp = this.h6_1;
|
|
727
753
|
switch (tmp) {
|
|
728
754
|
case 0:
|
|
729
|
-
this.
|
|
730
|
-
this.
|
|
731
|
-
if (this.
|
|
732
|
-
this.
|
|
733
|
-
suspendResult = getInterpolatedElevation(this.
|
|
755
|
+
this.i6_1 = 5;
|
|
756
|
+
this.i6_1 = 4;
|
|
757
|
+
if (this.zy_1) {
|
|
758
|
+
this.h6_1 = 2;
|
|
759
|
+
suspendResult = getInterpolatedElevation(this.wy_1, this.xy_1, this.yy_1, this);
|
|
734
760
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
735
761
|
return suspendResult;
|
|
736
762
|
}
|
|
737
763
|
continue $sm;
|
|
738
764
|
} else {
|
|
739
|
-
var pixel = ElevationFunctions_instance.
|
|
740
|
-
this.
|
|
741
|
-
suspendResult = elevationFromPixel(this.
|
|
765
|
+
var pixel = ElevationFunctions_instance.cz(this.xy_1, this.yy_1, this.wy_1.yu_1);
|
|
766
|
+
this.h6_1 = 1;
|
|
767
|
+
suspendResult = elevationFromPixel(this.wy_1, pixel, this);
|
|
742
768
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
743
769
|
return suspendResult;
|
|
744
770
|
}
|
|
@@ -746,100 +772,100 @@
|
|
|
746
772
|
}
|
|
747
773
|
|
|
748
774
|
case 1:
|
|
749
|
-
this.
|
|
750
|
-
this.
|
|
775
|
+
this.bz_1 = suspendResult;
|
|
776
|
+
this.h6_1 = 3;
|
|
751
777
|
continue $sm;
|
|
752
778
|
case 2:
|
|
753
|
-
this.
|
|
754
|
-
this.
|
|
779
|
+
this.bz_1 = suspendResult;
|
|
780
|
+
this.h6_1 = 3;
|
|
755
781
|
continue $sm;
|
|
756
782
|
case 3:
|
|
757
|
-
this.
|
|
758
|
-
this.
|
|
759
|
-
this.
|
|
783
|
+
this.az_1 = this.bz_1;
|
|
784
|
+
this.i6_1 = 5;
|
|
785
|
+
this.h6_1 = 6;
|
|
760
786
|
continue $sm;
|
|
761
787
|
case 4:
|
|
762
|
-
this.
|
|
763
|
-
var tmp_0 = this.
|
|
788
|
+
this.i6_1 = 5;
|
|
789
|
+
var tmp_0 = this.k6_1;
|
|
764
790
|
if (tmp_0 instanceof Error) {
|
|
765
|
-
var t = this.
|
|
791
|
+
var t = this.k6_1;
|
|
766
792
|
var tmp_1 = this;
|
|
767
793
|
throw IllegalStateException_init_$Create$('Failed to get elevation: ' + t.message, t);
|
|
768
794
|
} else {
|
|
769
|
-
throw this.
|
|
795
|
+
throw this.k6_1;
|
|
770
796
|
}
|
|
771
797
|
|
|
772
798
|
case 5:
|
|
773
|
-
throw this.
|
|
799
|
+
throw this.k6_1;
|
|
774
800
|
case 6:
|
|
775
|
-
this.
|
|
776
|
-
return this.
|
|
801
|
+
this.i6_1 = 5;
|
|
802
|
+
return this.az_1;
|
|
777
803
|
}
|
|
778
804
|
} catch ($p) {
|
|
779
805
|
var e = $p;
|
|
780
|
-
if (this.
|
|
806
|
+
if (this.i6_1 === 5) {
|
|
781
807
|
throw e;
|
|
782
808
|
} else {
|
|
783
|
-
this.
|
|
784
|
-
this.
|
|
809
|
+
this.h6_1 = this.i6_1;
|
|
810
|
+
this.k6_1 = e;
|
|
785
811
|
}
|
|
786
812
|
}
|
|
787
813
|
while (true);
|
|
788
814
|
};
|
|
789
815
|
function $getInterpolatedElevationCOROUTINE$(_this__u8e3s4, coords, zoomLevel, resultContinuation) {
|
|
790
816
|
CoroutineImpl.call(this, resultContinuation);
|
|
791
|
-
this.
|
|
792
|
-
this.
|
|
793
|
-
this.
|
|
817
|
+
this.rx_1 = _this__u8e3s4;
|
|
818
|
+
this.sx_1 = coords;
|
|
819
|
+
this.tx_1 = zoomLevel;
|
|
794
820
|
}
|
|
795
|
-
protoOf($getInterpolatedElevationCOROUTINE$).
|
|
796
|
-
var suspendResult = this.
|
|
821
|
+
protoOf($getInterpolatedElevationCOROUTINE$).p6 = function () {
|
|
822
|
+
var suspendResult = this.j6_1;
|
|
797
823
|
$sm: do
|
|
798
824
|
try {
|
|
799
|
-
var tmp = this.
|
|
825
|
+
var tmp = this.h6_1;
|
|
800
826
|
switch (tmp) {
|
|
801
827
|
case 0:
|
|
802
|
-
this.
|
|
803
|
-
this.
|
|
828
|
+
this.i6_1 = 5;
|
|
829
|
+
this.by_1 = ElevationFunctions_instance.dz(this.sx_1, this.tx_1, this.rx_1.yu_1);
|
|
804
830
|
var tmp_0 = this;
|
|
805
|
-
var x = this.
|
|
806
|
-
tmp_0.
|
|
831
|
+
var x = this.by_1.fz_1;
|
|
832
|
+
tmp_0.cy_1 = numberToInt(Math.floor(x));
|
|
807
833
|
var tmp_1 = this;
|
|
808
|
-
var x_0 = this.
|
|
809
|
-
tmp_1.
|
|
810
|
-
this.
|
|
811
|
-
this.
|
|
812
|
-
this.
|
|
813
|
-
this.
|
|
814
|
-
this.
|
|
815
|
-
suspendResult = elevationFromPixel(this.
|
|
834
|
+
var x_0 = this.by_1.gz_1;
|
|
835
|
+
tmp_1.dy_1 = numberToInt(Math.floor(x_0));
|
|
836
|
+
this.ay_1 = this.cy_1 + 1 | 0;
|
|
837
|
+
this.zx_1 = this.dy_1 + 1 | 0;
|
|
838
|
+
this.vx_1 = this.by_1.fz_1 - this.cy_1;
|
|
839
|
+
this.ux_1 = this.by_1.gz_1 - this.dy_1;
|
|
840
|
+
this.h6_1 = 1;
|
|
841
|
+
suspendResult = elevationFromPixel(this.rx_1, ElevationFunctions_instance.hz(new Pixel(this.by_1.ez_1, this.cy_1, this.dy_1), this.rx_1.yu_1), this);
|
|
816
842
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
817
843
|
return suspendResult;
|
|
818
844
|
}
|
|
819
845
|
|
|
820
846
|
continue $sm;
|
|
821
847
|
case 1:
|
|
822
|
-
this.
|
|
823
|
-
this.
|
|
824
|
-
suspendResult = elevationFromPixel(this.
|
|
848
|
+
this.yx_1 = suspendResult;
|
|
849
|
+
this.h6_1 = 2;
|
|
850
|
+
suspendResult = elevationFromPixel(this.rx_1, ElevationFunctions_instance.hz(new Pixel(this.by_1.ez_1, this.ay_1, this.dy_1), this.rx_1.yu_1), this);
|
|
825
851
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
826
852
|
return suspendResult;
|
|
827
853
|
}
|
|
828
854
|
|
|
829
855
|
continue $sm;
|
|
830
856
|
case 2:
|
|
831
|
-
this.
|
|
832
|
-
this.
|
|
833
|
-
suspendResult = elevationFromPixel(this.
|
|
857
|
+
this.xx_1 = suspendResult;
|
|
858
|
+
this.h6_1 = 3;
|
|
859
|
+
suspendResult = elevationFromPixel(this.rx_1, ElevationFunctions_instance.hz(new Pixel(this.by_1.ez_1, this.cy_1, this.zx_1), this.rx_1.yu_1), this);
|
|
834
860
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
835
861
|
return suspendResult;
|
|
836
862
|
}
|
|
837
863
|
|
|
838
864
|
continue $sm;
|
|
839
865
|
case 3:
|
|
840
|
-
this.
|
|
841
|
-
this.
|
|
842
|
-
suspendResult = elevationFromPixel(this.
|
|
866
|
+
this.wx_1 = suspendResult;
|
|
867
|
+
this.h6_1 = 4;
|
|
868
|
+
suspendResult = elevationFromPixel(this.rx_1, ElevationFunctions_instance.hz(new Pixel(this.by_1.ez_1, this.ay_1, this.zx_1), this.rx_1.yu_1), this);
|
|
843
869
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
844
870
|
return suspendResult;
|
|
845
871
|
}
|
|
@@ -847,69 +873,69 @@
|
|
|
847
873
|
continue $sm;
|
|
848
874
|
case 4:
|
|
849
875
|
var p11 = suspendResult;
|
|
850
|
-
var top = this.
|
|
851
|
-
var bottom = this.
|
|
852
|
-
return top * (1.0 - this.
|
|
876
|
+
var top = this.yx_1 * (1.0 - this.vx_1) + this.xx_1 * this.vx_1;
|
|
877
|
+
var bottom = this.wx_1 * (1.0 - this.vx_1) + p11 * this.vx_1;
|
|
878
|
+
return top * (1.0 - this.ux_1) + bottom * this.ux_1;
|
|
853
879
|
case 5:
|
|
854
|
-
throw this.
|
|
880
|
+
throw this.k6_1;
|
|
855
881
|
}
|
|
856
882
|
} catch ($p) {
|
|
857
883
|
var e = $p;
|
|
858
|
-
if (this.
|
|
884
|
+
if (this.i6_1 === 5) {
|
|
859
885
|
throw e;
|
|
860
886
|
} else {
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
887
|
+
this.h6_1 = this.i6_1;
|
|
888
|
+
this.k6_1 = e;
|
|
863
889
|
}
|
|
864
890
|
}
|
|
865
891
|
while (true);
|
|
866
892
|
};
|
|
867
893
|
function $elevationFromPixelCOROUTINE$(_this__u8e3s4, pixel, resultContinuation) {
|
|
868
894
|
CoroutineImpl.call(this, resultContinuation);
|
|
869
|
-
this.
|
|
870
|
-
this.
|
|
895
|
+
this.my_1 = _this__u8e3s4;
|
|
896
|
+
this.ny_1 = pixel;
|
|
871
897
|
}
|
|
872
|
-
protoOf($elevationFromPixelCOROUTINE$).
|
|
873
|
-
var suspendResult = this.
|
|
898
|
+
protoOf($elevationFromPixelCOROUTINE$).p6 = function () {
|
|
899
|
+
var suspendResult = this.j6_1;
|
|
874
900
|
$sm: do
|
|
875
901
|
try {
|
|
876
|
-
var tmp = this.
|
|
902
|
+
var tmp = this.h6_1;
|
|
877
903
|
switch (tmp) {
|
|
878
904
|
case 0:
|
|
879
|
-
this.
|
|
880
|
-
this.
|
|
881
|
-
suspendResult = this.
|
|
905
|
+
this.i6_1 = 2;
|
|
906
|
+
this.h6_1 = 1;
|
|
907
|
+
suspendResult = this.my_1.xu_1.oz(this.ny_1.iz_1, this);
|
|
882
908
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
883
909
|
return suspendResult;
|
|
884
910
|
}
|
|
885
911
|
|
|
886
912
|
continue $sm;
|
|
887
913
|
case 1:
|
|
888
|
-
return suspendResult.
|
|
914
|
+
return suspendResult.uz(this.ny_1);
|
|
889
915
|
case 2:
|
|
890
|
-
throw this.
|
|
916
|
+
throw this.k6_1;
|
|
891
917
|
}
|
|
892
918
|
} catch ($p) {
|
|
893
919
|
var e = $p;
|
|
894
|
-
if (this.
|
|
920
|
+
if (this.i6_1 === 2) {
|
|
895
921
|
throw e;
|
|
896
922
|
} else {
|
|
897
|
-
this.
|
|
898
|
-
this.
|
|
923
|
+
this.h6_1 = this.i6_1;
|
|
924
|
+
this.k6_1 = e;
|
|
899
925
|
}
|
|
900
926
|
}
|
|
901
927
|
while (true);
|
|
902
928
|
};
|
|
903
929
|
function ElevationCalculator(tileManager, tileSize) {
|
|
904
930
|
tileSize = tileSize === VOID ? 256 : tileSize;
|
|
905
|
-
this.
|
|
906
|
-
this.
|
|
931
|
+
this.xu_1 = tileManager;
|
|
932
|
+
this.yu_1 = tileSize;
|
|
907
933
|
}
|
|
908
|
-
protoOf(ElevationCalculator).
|
|
934
|
+
protoOf(ElevationCalculator).zu = function (coords, zoomLevel, interpolation, $completion) {
|
|
909
935
|
var tmp = new $getElevationCOROUTINE$(this, coords, zoomLevel, interpolation, $completion);
|
|
910
|
-
tmp.
|
|
911
|
-
tmp.
|
|
912
|
-
return tmp.
|
|
936
|
+
tmp.j6_1 = Unit_instance;
|
|
937
|
+
tmp.k6_1 = null;
|
|
938
|
+
return tmp.p6();
|
|
913
939
|
};
|
|
914
940
|
function formatNumber_0($this, d) {
|
|
915
941
|
var asLong = numberToLong(d);
|
|
@@ -917,24 +943,24 @@
|
|
|
917
943
|
}
|
|
918
944
|
function ElevationFunctions() {
|
|
919
945
|
}
|
|
920
|
-
protoOf(ElevationFunctions).
|
|
921
|
-
return degrees * MathConstants_getInstance().
|
|
946
|
+
protoOf(ElevationFunctions).vz = function (degrees) {
|
|
947
|
+
return degrees * MathConstants_getInstance().tw_1;
|
|
922
948
|
};
|
|
923
|
-
protoOf(ElevationFunctions).
|
|
949
|
+
protoOf(ElevationFunctions).wz = function (lat) {
|
|
924
950
|
return lat >= -85.0511 && lat <= 85.0511;
|
|
925
951
|
};
|
|
926
|
-
protoOf(ElevationFunctions).
|
|
952
|
+
protoOf(ElevationFunctions).xz = function (lon) {
|
|
927
953
|
return -180.0 <= lon ? lon <= 180.0 : false;
|
|
928
954
|
};
|
|
929
|
-
protoOf(ElevationFunctions).
|
|
955
|
+
protoOf(ElevationFunctions).yz = function (zoom) {
|
|
930
956
|
return 0 <= zoom ? zoom <= 15 : false;
|
|
931
957
|
};
|
|
932
|
-
protoOf(ElevationFunctions).
|
|
933
|
-
var x = pixel.
|
|
934
|
-
var y = pixel.
|
|
935
|
-
var tileX = pixel.
|
|
936
|
-
var tileY = pixel.
|
|
937
|
-
var z = pixel.
|
|
958
|
+
protoOf(ElevationFunctions).hz = function (pixel, tileSize) {
|
|
959
|
+
var x = pixel.jz_1;
|
|
960
|
+
var y = pixel.kz_1;
|
|
961
|
+
var tileX = pixel.iz_1.rv_1;
|
|
962
|
+
var tileY = pixel.iz_1.sv_1;
|
|
963
|
+
var z = pixel.iz_1.tv_1;
|
|
938
964
|
if (x < 0) {
|
|
939
965
|
x = x + tileSize | 0;
|
|
940
966
|
tileX = tileX - 1 | 0;
|
|
@@ -956,25 +982,25 @@
|
|
|
956
982
|
tileY = coerceIn(tileY, 0, maxTile);
|
|
957
983
|
return new Pixel(new TileCoordinates(tileX, tileY, z), x, y);
|
|
958
984
|
};
|
|
959
|
-
protoOf(ElevationFunctions).
|
|
985
|
+
protoOf(ElevationFunctions).zz = function (coords, z) {
|
|
960
986
|
// Inline function 'kotlin.require' call
|
|
961
|
-
if (!this.
|
|
962
|
-
var message = 'Invalid latitude: ' + formatNumber_0(ElevationFunctions_instance, coords.
|
|
987
|
+
if (!this.wz(coords.av())) {
|
|
988
|
+
var message = 'Invalid latitude: ' + formatNumber_0(ElevationFunctions_instance, coords.av()) + '. Must be between -85.0511 and 85.0511';
|
|
963
989
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
964
990
|
}
|
|
965
991
|
// Inline function 'kotlin.require' call
|
|
966
|
-
if (!this.
|
|
967
|
-
var message_0 = 'Invalid longitude: ' + formatNumber_0(ElevationFunctions_instance, coords.
|
|
992
|
+
if (!this.xz(coords.bv())) {
|
|
993
|
+
var message_0 = 'Invalid longitude: ' + formatNumber_0(ElevationFunctions_instance, coords.bv()) + '. Must be between -180 and 180';
|
|
968
994
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
969
995
|
}
|
|
970
996
|
// Inline function 'kotlin.require' call
|
|
971
|
-
if (!this.
|
|
997
|
+
if (!this.yz(z)) {
|
|
972
998
|
var message_1 = 'Invalid zoom level: ' + z + '. Must be between 0 and 15';
|
|
973
999
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
974
1000
|
}
|
|
975
|
-
var lat = this.
|
|
1001
|
+
var lat = this.vz(coords.av());
|
|
976
1002
|
var n = 1 << z;
|
|
977
|
-
var xFloat = (coords.
|
|
1003
|
+
var xFloat = (coords.bv() + 180.0) / 360.0 * n;
|
|
978
1004
|
// Inline function 'kotlin.math.tan' call
|
|
979
1005
|
var tmp = Math.tan(lat);
|
|
980
1006
|
// Inline function 'kotlin.math.cos' call
|
|
@@ -990,27 +1016,27 @@
|
|
|
990
1016
|
var y = coerceIn(numberToInt(tmp$ret$10), 0, maxTile);
|
|
991
1017
|
return new TileCoordinatesFloat(x_0, y, xFloat, yFloat, z);
|
|
992
1018
|
};
|
|
993
|
-
protoOf(ElevationFunctions).
|
|
994
|
-
var tile = this.
|
|
995
|
-
return new TileCoordinates(tile.
|
|
1019
|
+
protoOf(ElevationFunctions).qv = function (coords, z) {
|
|
1020
|
+
var tile = this.zz(coords, z);
|
|
1021
|
+
return new TileCoordinates(tile.a10_1, tile.b10_1, tile.e10_1);
|
|
996
1022
|
};
|
|
997
|
-
protoOf(ElevationFunctions).
|
|
998
|
-
var tile = this.
|
|
1023
|
+
protoOf(ElevationFunctions).cz = function (coords, z, tileSize) {
|
|
1024
|
+
var tile = this.zz(coords, z);
|
|
999
1025
|
// Inline function 'kotlin.math.floor' call
|
|
1000
|
-
var x = (tile.
|
|
1026
|
+
var x = (tile.c10_1 - tile.a10_1) * tileSize;
|
|
1001
1027
|
var tmp$ret$0 = Math.floor(x);
|
|
1002
1028
|
var px = coerceIn(numberToInt(tmp$ret$0), 0, tileSize - 1 | 0);
|
|
1003
1029
|
// Inline function 'kotlin.math.floor' call
|
|
1004
|
-
var x_0 = (tile.
|
|
1030
|
+
var x_0 = (tile.d10_1 - tile.b10_1) * tileSize;
|
|
1005
1031
|
var tmp$ret$1 = Math.floor(x_0);
|
|
1006
1032
|
var py = coerceIn(numberToInt(tmp$ret$1), 0, tileSize - 1 | 0);
|
|
1007
|
-
return new Pixel(new TileCoordinates(tile.
|
|
1033
|
+
return new Pixel(new TileCoordinates(tile.a10_1, tile.b10_1, z), px, py);
|
|
1008
1034
|
};
|
|
1009
|
-
protoOf(ElevationFunctions).
|
|
1010
|
-
var tile = this.
|
|
1011
|
-
var px = (tile.
|
|
1012
|
-
var py = (tile.
|
|
1013
|
-
return new PixelFloat(new TileCoordinates(tile.
|
|
1035
|
+
protoOf(ElevationFunctions).dz = function (coords, z, tileSize) {
|
|
1036
|
+
var tile = this.zz(coords, z);
|
|
1037
|
+
var px = (tile.c10_1 - tile.a10_1) * tileSize;
|
|
1038
|
+
var py = (tile.d10_1 - tile.b10_1) * tileSize;
|
|
1039
|
+
return new PixelFloat(new TileCoordinates(tile.a10_1, tile.b10_1, z), px, py);
|
|
1014
1040
|
};
|
|
1015
1041
|
var ElevationFunctions_instance;
|
|
1016
1042
|
function ElevationFunctions_getInstance() {
|
|
@@ -1019,11 +1045,11 @@
|
|
|
1019
1045
|
function fetchAndDecodeTile$ref() {
|
|
1020
1046
|
KFunctionImpl.call(this, 1, 2, 2);
|
|
1021
1047
|
}
|
|
1022
|
-
protoOf(fetchAndDecodeTile$ref).
|
|
1048
|
+
protoOf(fetchAndDecodeTile$ref).i10 = function (p0, $completion) {
|
|
1023
1049
|
return fetchAndDecodeTile(p0, $completion);
|
|
1024
1050
|
};
|
|
1025
|
-
protoOf(fetchAndDecodeTile$ref).
|
|
1026
|
-
return this.
|
|
1051
|
+
protoOf(fetchAndDecodeTile$ref).x6 = function (p1, $completion) {
|
|
1052
|
+
return this.i10((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
|
|
1027
1053
|
};
|
|
1028
1054
|
function ElevationProvider(config, fetcher) {
|
|
1029
1055
|
config = config === VOID ? new ElevationProviderConfig() : config;
|
|
@@ -1034,39 +1060,39 @@
|
|
|
1034
1060
|
tmp = fetcher;
|
|
1035
1061
|
}
|
|
1036
1062
|
fetcher = tmp;
|
|
1037
|
-
this.
|
|
1038
|
-
var containsArg = this.
|
|
1063
|
+
this.j10_1 = config;
|
|
1064
|
+
var containsArg = this.j10_1.n10_1;
|
|
1039
1065
|
// Inline function 'kotlin.require' call
|
|
1040
1066
|
if (!(0 <= containsArg ? containsArg <= 15 : false)) {
|
|
1041
|
-
var message = 'Invalid zoom level: ' + this.
|
|
1067
|
+
var message = 'Invalid zoom level: ' + this.j10_1.n10_1 + '. Must be an integer between 0 and 15';
|
|
1042
1068
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1043
1069
|
}
|
|
1044
1070
|
// Inline function 'kotlin.require' call
|
|
1045
|
-
if (!(this.
|
|
1046
|
-
var message_0 = 'Invalid cache size: ' + this.
|
|
1071
|
+
if (!(this.j10_1.o10_1 > 0)) {
|
|
1072
|
+
var message_0 = 'Invalid cache size: ' + this.j10_1.o10_1 + '. Must be a positive integer';
|
|
1047
1073
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1048
1074
|
}
|
|
1049
1075
|
// Inline function 'kotlin.require' call
|
|
1050
|
-
if (!(this.
|
|
1051
|
-
var message_1 = 'Invalid tile size: ' + this.
|
|
1076
|
+
if (!(this.j10_1.q10_1 > 0 && (this.j10_1.q10_1 & (this.j10_1.q10_1 - 1 | 0)) === 0)) {
|
|
1077
|
+
var message_1 = 'Invalid tile size: ' + this.j10_1.q10_1 + '. Must be a positive power of 2';
|
|
1052
1078
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
1053
1079
|
}
|
|
1054
|
-
this.
|
|
1055
|
-
this.
|
|
1056
|
-
this.
|
|
1080
|
+
this.k10_1 = new TileManager(this.j10_1.p10_1, this.j10_1.o10_1, fetcher);
|
|
1081
|
+
this.l10_1 = new ElevationCalculator(this.k10_1, this.j10_1.q10_1);
|
|
1082
|
+
this.m10_1 = new BatchCalculator(this.l10_1);
|
|
1057
1083
|
}
|
|
1058
|
-
protoOf(ElevationProvider).
|
|
1059
|
-
return this.
|
|
1084
|
+
protoOf(ElevationProvider).s10 = function (latitude, longitude, interpolation, $completion) {
|
|
1085
|
+
return this.l10_1.zu(new LatLon(latitude, longitude), this.j10_1.n10_1, interpolation, $completion);
|
|
1060
1086
|
};
|
|
1061
|
-
protoOf(ElevationProvider).
|
|
1062
|
-
return this.
|
|
1087
|
+
protoOf(ElevationProvider).t10 = function (coordinates, interpolation, $completion) {
|
|
1088
|
+
return this.m10_1.mw(coordinates, this.j10_1.n10_1, interpolation, VOID, $completion);
|
|
1063
1089
|
};
|
|
1064
|
-
protoOf(ElevationProvider).
|
|
1090
|
+
protoOf(ElevationProvider).u10 = function (coordinates, interpolation, $completion, $super) {
|
|
1065
1091
|
interpolation = interpolation === VOID ? true : interpolation;
|
|
1066
|
-
return $super === VOID ? this.
|
|
1092
|
+
return $super === VOID ? this.t10(coordinates, interpolation, $completion) : $super.t10.call(this, coordinates, interpolation, $completion);
|
|
1067
1093
|
};
|
|
1068
|
-
protoOf(ElevationProvider).
|
|
1069
|
-
return this.
|
|
1094
|
+
protoOf(ElevationProvider).v10 = function (path, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion) {
|
|
1095
|
+
return this.m10_1.qw(path, this.j10_1.n10_1, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion);
|
|
1070
1096
|
};
|
|
1071
1097
|
function ElevationProviderConfig(zoomLevel, cacheSize, tileUrlTemplate, tileSize, attribution) {
|
|
1072
1098
|
zoomLevel = zoomLevel === VOID ? 12 : zoomLevel;
|
|
@@ -1074,21 +1100,21 @@
|
|
|
1074
1100
|
tileUrlTemplate = tileUrlTemplate === VOID ? 'https://tiles.mapterhorn.com/{z}/{x}/{y}.webp' : tileUrlTemplate;
|
|
1075
1101
|
tileSize = tileSize === VOID ? 512 : tileSize;
|
|
1076
1102
|
attribution = attribution === VOID ? new Attribution('Mapterhorn elevation data. See mapterhorn.com/attribution/ for details.', 'https://mapterhorn.com/attribution/') : attribution;
|
|
1077
|
-
this.
|
|
1078
|
-
this.
|
|
1079
|
-
this.
|
|
1080
|
-
this.
|
|
1081
|
-
this.
|
|
1103
|
+
this.n10_1 = zoomLevel;
|
|
1104
|
+
this.o10_1 = cacheSize;
|
|
1105
|
+
this.p10_1 = tileUrlTemplate;
|
|
1106
|
+
this.q10_1 = tileSize;
|
|
1107
|
+
this.r10_1 = attribution;
|
|
1082
1108
|
}
|
|
1083
1109
|
protoOf(ElevationProviderConfig).toString = function () {
|
|
1084
|
-
return 'ElevationProviderConfig(zoomLevel=' + this.
|
|
1110
|
+
return 'ElevationProviderConfig(zoomLevel=' + this.n10_1 + ', cacheSize=' + this.o10_1 + ', tileUrlTemplate=' + this.p10_1 + ', tileSize=' + this.q10_1 + ', attribution=' + this.r10_1.toString() + ')';
|
|
1085
1111
|
};
|
|
1086
1112
|
protoOf(ElevationProviderConfig).hashCode = function () {
|
|
1087
|
-
var result = this.
|
|
1088
|
-
result = imul(result, 31) + this.
|
|
1089
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
1090
|
-
result = imul(result, 31) + this.
|
|
1091
|
-
result = imul(result, 31) + this.
|
|
1113
|
+
var result = this.n10_1;
|
|
1114
|
+
result = imul(result, 31) + this.o10_1 | 0;
|
|
1115
|
+
result = imul(result, 31) + getStringHashCode(this.p10_1) | 0;
|
|
1116
|
+
result = imul(result, 31) + this.q10_1 | 0;
|
|
1117
|
+
result = imul(result, 31) + this.r10_1.hashCode() | 0;
|
|
1092
1118
|
return result;
|
|
1093
1119
|
};
|
|
1094
1120
|
protoOf(ElevationProviderConfig).equals = function (other) {
|
|
@@ -1096,29 +1122,29 @@
|
|
|
1096
1122
|
return true;
|
|
1097
1123
|
if (!(other instanceof ElevationProviderConfig))
|
|
1098
1124
|
return false;
|
|
1099
|
-
if (!(this.
|
|
1125
|
+
if (!(this.n10_1 === other.n10_1))
|
|
1100
1126
|
return false;
|
|
1101
|
-
if (!(this.
|
|
1127
|
+
if (!(this.o10_1 === other.o10_1))
|
|
1102
1128
|
return false;
|
|
1103
|
-
if (!(this.
|
|
1129
|
+
if (!(this.p10_1 === other.p10_1))
|
|
1104
1130
|
return false;
|
|
1105
|
-
if (!(this.
|
|
1131
|
+
if (!(this.q10_1 === other.q10_1))
|
|
1106
1132
|
return false;
|
|
1107
|
-
if (!this.
|
|
1133
|
+
if (!this.r10_1.equals(other.r10_1))
|
|
1108
1134
|
return false;
|
|
1109
1135
|
return true;
|
|
1110
1136
|
};
|
|
1111
1137
|
function Attribution(text, url) {
|
|
1112
1138
|
url = url === VOID ? null : url;
|
|
1113
|
-
this.
|
|
1114
|
-
this.
|
|
1139
|
+
this.w10_1 = text;
|
|
1140
|
+
this.x10_1 = url;
|
|
1115
1141
|
}
|
|
1116
1142
|
protoOf(Attribution).toString = function () {
|
|
1117
|
-
return 'Attribution(text=' + this.
|
|
1143
|
+
return 'Attribution(text=' + this.w10_1 + ', url=' + this.x10_1 + ')';
|
|
1118
1144
|
};
|
|
1119
1145
|
protoOf(Attribution).hashCode = function () {
|
|
1120
|
-
var result = getStringHashCode(this.
|
|
1121
|
-
result = imul(result, 31) + (this.
|
|
1146
|
+
var result = getStringHashCode(this.w10_1);
|
|
1147
|
+
result = imul(result, 31) + (this.x10_1 == null ? 0 : getStringHashCode(this.x10_1)) | 0;
|
|
1122
1148
|
return result;
|
|
1123
1149
|
};
|
|
1124
1150
|
protoOf(Attribution).equals = function (other) {
|
|
@@ -1126,9 +1152,9 @@
|
|
|
1126
1152
|
return true;
|
|
1127
1153
|
if (!(other instanceof Attribution))
|
|
1128
1154
|
return false;
|
|
1129
|
-
if (!(this.
|
|
1155
|
+
if (!(this.w10_1 === other.w10_1))
|
|
1130
1156
|
return false;
|
|
1131
|
-
if (!(this.
|
|
1157
|
+
if (!(this.x10_1 == other.x10_1))
|
|
1132
1158
|
return false;
|
|
1133
1159
|
return true;
|
|
1134
1160
|
};
|
|
@@ -1139,7 +1165,7 @@
|
|
|
1139
1165
|
startIndex = startIndex - 1 | 0;
|
|
1140
1166
|
}
|
|
1141
1167
|
var endIndex = index;
|
|
1142
|
-
while (endIndex < (points.
|
|
1168
|
+
while (endIndex < (points.l() - 1 | 0) && distances[endIndex + 1 | 0] - current <= windowSize) {
|
|
1143
1169
|
endIndex = endIndex + 1 | 0;
|
|
1144
1170
|
}
|
|
1145
1171
|
var totalWeight = 0.0;
|
|
@@ -1155,10 +1181,10 @@
|
|
|
1155
1181
|
var d = Math.abs(this_0);
|
|
1156
1182
|
var weight = 1.0 - d / windowSize;
|
|
1157
1183
|
totalWeight = totalWeight + weight;
|
|
1158
|
-
weightedSum = weightedSum + points.
|
|
1184
|
+
weightedSum = weightedSum + points.m(j).yw() * weight;
|
|
1159
1185
|
}
|
|
1160
1186
|
while (!(j === last));
|
|
1161
|
-
return totalWeight > 0.0 ? weightedSum / totalWeight : points.
|
|
1187
|
+
return totalWeight > 0.0 ? weightedSum / totalWeight : points.m(index).yw();
|
|
1162
1188
|
}
|
|
1163
1189
|
function formatWindow($this, w) {
|
|
1164
1190
|
var asLong = numberToLong(w);
|
|
@@ -1166,18 +1192,18 @@
|
|
|
1166
1192
|
}
|
|
1167
1193
|
function ElevationSmoother() {
|
|
1168
1194
|
}
|
|
1169
|
-
protoOf(ElevationSmoother).
|
|
1170
|
-
if (points.
|
|
1195
|
+
protoOf(ElevationSmoother).nw = function (points, windowSize) {
|
|
1196
|
+
if (points.l() < 3)
|
|
1171
1197
|
return points;
|
|
1172
1198
|
// Inline function 'kotlin.require' call
|
|
1173
1199
|
if (!(windowSize > 0.0)) {
|
|
1174
1200
|
var message = 'Invalid window size: ' + formatWindow(ElevationSmoother_instance, windowSize) + '. Must be positive';
|
|
1175
1201
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1176
1202
|
}
|
|
1177
|
-
var distances = Distance_instance.
|
|
1203
|
+
var distances = Distance_instance.cx(points);
|
|
1178
1204
|
// Inline function 'kotlin.collections.List' call
|
|
1179
1205
|
// Inline function 'kotlin.collections.MutableList' call
|
|
1180
|
-
var size = points.
|
|
1206
|
+
var size = points.l();
|
|
1181
1207
|
var list = ArrayList_init_$Create$_0(size);
|
|
1182
1208
|
// Inline function 'kotlin.repeat' call
|
|
1183
1209
|
var inductionVariable = 0;
|
|
@@ -1186,8 +1212,8 @@
|
|
|
1186
1212
|
var index = inductionVariable;
|
|
1187
1213
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1188
1214
|
var smoothed = computeSmoothedValue(ElevationSmoother_instance, index, points, distances, windowSize);
|
|
1189
|
-
var tmp$ret$6 = new LatLonElevation(points.
|
|
1190
|
-
list.
|
|
1215
|
+
var tmp$ret$6 = new LatLonElevation(points.m(index).av(), points.m(index).bv(), smoothed);
|
|
1216
|
+
list.h(tmp$ret$6);
|
|
1191
1217
|
}
|
|
1192
1218
|
while (inductionVariable < size);
|
|
1193
1219
|
return list;
|
|
@@ -1197,120 +1223,120 @@
|
|
|
1197
1223
|
return ElevationSmoother_instance;
|
|
1198
1224
|
}
|
|
1199
1225
|
function Flux$forEachParallel$slambda$slambda($semaphore, $action, $item, resultContinuation) {
|
|
1200
|
-
this.
|
|
1201
|
-
this.
|
|
1202
|
-
this.
|
|
1226
|
+
this.g11_1 = $semaphore;
|
|
1227
|
+
this.h11_1 = $action;
|
|
1228
|
+
this.i11_1 = $item;
|
|
1203
1229
|
CoroutineImpl.call(this, resultContinuation);
|
|
1204
1230
|
}
|
|
1205
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1206
|
-
var tmp = this.
|
|
1207
|
-
tmp.
|
|
1208
|
-
tmp.
|
|
1209
|
-
return tmp.
|
|
1231
|
+
protoOf(Flux$forEachParallel$slambda$slambda).m11 = function ($this$async, $completion) {
|
|
1232
|
+
var tmp = this.n11($this$async, $completion);
|
|
1233
|
+
tmp.j6_1 = Unit_instance;
|
|
1234
|
+
tmp.k6_1 = null;
|
|
1235
|
+
return tmp.p6();
|
|
1210
1236
|
};
|
|
1211
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1212
|
-
return this.
|
|
1237
|
+
protoOf(Flux$forEachParallel$slambda$slambda).x6 = function (p1, $completion) {
|
|
1238
|
+
return this.m11((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1213
1239
|
};
|
|
1214
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1215
|
-
var suspendResult = this.
|
|
1240
|
+
protoOf(Flux$forEachParallel$slambda$slambda).p6 = function () {
|
|
1241
|
+
var suspendResult = this.j6_1;
|
|
1216
1242
|
$sm: do
|
|
1217
1243
|
try {
|
|
1218
|
-
var tmp = this.
|
|
1244
|
+
var tmp = this.h6_1;
|
|
1219
1245
|
switch (tmp) {
|
|
1220
1246
|
case 0:
|
|
1221
|
-
this.
|
|
1222
|
-
this.
|
|
1223
|
-
this.
|
|
1224
|
-
suspendResult = this.
|
|
1247
|
+
this.i6_1 = 6;
|
|
1248
|
+
this.k11_1 = this.g11_1;
|
|
1249
|
+
this.h6_1 = 1;
|
|
1250
|
+
suspendResult = this.k11_1.bs(this);
|
|
1225
1251
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1226
1252
|
return suspendResult;
|
|
1227
1253
|
}
|
|
1228
1254
|
|
|
1229
1255
|
continue $sm;
|
|
1230
1256
|
case 1:
|
|
1231
|
-
this.
|
|
1232
|
-
this.
|
|
1257
|
+
this.l11_1 = Unit_instance;
|
|
1258
|
+
this.h6_1 = 2;
|
|
1233
1259
|
continue $sm;
|
|
1234
1260
|
case 2:
|
|
1235
|
-
this.
|
|
1236
|
-
this.
|
|
1237
|
-
suspendResult = this.
|
|
1261
|
+
this.i6_1 = 5;
|
|
1262
|
+
this.h6_1 = 3;
|
|
1263
|
+
suspendResult = this.h11_1(this.i11_1, this);
|
|
1238
1264
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1239
1265
|
return suspendResult;
|
|
1240
1266
|
}
|
|
1241
1267
|
|
|
1242
1268
|
continue $sm;
|
|
1243
1269
|
case 3:
|
|
1244
|
-
this.
|
|
1245
|
-
this.
|
|
1246
|
-
this.
|
|
1270
|
+
this.l11_1 = Unit_instance;
|
|
1271
|
+
this.i6_1 = 6;
|
|
1272
|
+
this.h6_1 = 4;
|
|
1247
1273
|
continue $sm;
|
|
1248
1274
|
case 4:
|
|
1249
|
-
this.
|
|
1250
|
-
this.
|
|
1251
|
-
this.
|
|
1275
|
+
this.l11_1;
|
|
1276
|
+
this.i6_1 = 6;
|
|
1277
|
+
this.k11_1.vr();
|
|
1252
1278
|
return Unit_instance;
|
|
1253
1279
|
case 5:
|
|
1254
|
-
this.
|
|
1255
|
-
var t = this.
|
|
1256
|
-
this.
|
|
1280
|
+
this.i6_1 = 6;
|
|
1281
|
+
var t = this.k6_1;
|
|
1282
|
+
this.k11_1.vr();
|
|
1257
1283
|
throw t;
|
|
1258
1284
|
case 6:
|
|
1259
|
-
throw this.
|
|
1285
|
+
throw this.k6_1;
|
|
1260
1286
|
}
|
|
1261
1287
|
} catch ($p) {
|
|
1262
1288
|
var e = $p;
|
|
1263
|
-
if (this.
|
|
1289
|
+
if (this.i6_1 === 6) {
|
|
1264
1290
|
throw e;
|
|
1265
1291
|
} else {
|
|
1266
|
-
this.
|
|
1267
|
-
this.
|
|
1292
|
+
this.h6_1 = this.i6_1;
|
|
1293
|
+
this.k6_1 = e;
|
|
1268
1294
|
}
|
|
1269
1295
|
}
|
|
1270
1296
|
while (true);
|
|
1271
1297
|
};
|
|
1272
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1273
|
-
var i = new Flux$forEachParallel$slambda$slambda(this.
|
|
1274
|
-
i.
|
|
1298
|
+
protoOf(Flux$forEachParallel$slambda$slambda).n11 = function ($this$async, completion) {
|
|
1299
|
+
var i = new Flux$forEachParallel$slambda$slambda(this.g11_1, this.h11_1, this.i11_1, completion);
|
|
1300
|
+
i.j11_1 = $this$async;
|
|
1275
1301
|
return i;
|
|
1276
1302
|
};
|
|
1277
1303
|
function Flux$forEachParallel$slambda$slambda_0($semaphore, $action, $item, resultContinuation) {
|
|
1278
1304
|
var i = new Flux$forEachParallel$slambda$slambda($semaphore, $action, $item, resultContinuation);
|
|
1279
1305
|
return constructCallableReference(function ($this$async, $completion) {
|
|
1280
|
-
return i.
|
|
1306
|
+
return i.m11($this$async, $completion);
|
|
1281
1307
|
}, 1);
|
|
1282
1308
|
}
|
|
1283
1309
|
function Flux$forEachParallel$slambda($maxParallel, $items, $action, resultContinuation) {
|
|
1284
|
-
this.
|
|
1285
|
-
this.
|
|
1286
|
-
this.
|
|
1310
|
+
this.w11_1 = $maxParallel;
|
|
1311
|
+
this.x11_1 = $items;
|
|
1312
|
+
this.y11_1 = $action;
|
|
1287
1313
|
CoroutineImpl.call(this, resultContinuation);
|
|
1288
1314
|
}
|
|
1289
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1290
|
-
var tmp = this.
|
|
1291
|
-
tmp.
|
|
1292
|
-
tmp.
|
|
1293
|
-
return tmp.
|
|
1315
|
+
protoOf(Flux$forEachParallel$slambda).a12 = function ($this$coroutineScope, $completion) {
|
|
1316
|
+
var tmp = this.n11($this$coroutineScope, $completion);
|
|
1317
|
+
tmp.j6_1 = Unit_instance;
|
|
1318
|
+
tmp.k6_1 = null;
|
|
1319
|
+
return tmp.p6();
|
|
1294
1320
|
};
|
|
1295
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1296
|
-
return this.
|
|
1321
|
+
protoOf(Flux$forEachParallel$slambda).x6 = function (p1, $completion) {
|
|
1322
|
+
return this.a12((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1297
1323
|
};
|
|
1298
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1299
|
-
var suspendResult = this.
|
|
1324
|
+
protoOf(Flux$forEachParallel$slambda).p6 = function () {
|
|
1325
|
+
var suspendResult = this.j6_1;
|
|
1300
1326
|
$sm: do
|
|
1301
1327
|
try {
|
|
1302
|
-
var tmp = this.
|
|
1328
|
+
var tmp = this.h6_1;
|
|
1303
1329
|
switch (tmp) {
|
|
1304
1330
|
case 0:
|
|
1305
|
-
this.
|
|
1306
|
-
var semaphore = Semaphore(this.
|
|
1307
|
-
this.
|
|
1308
|
-
var this_0 = this.
|
|
1331
|
+
this.i6_1 = 2;
|
|
1332
|
+
var semaphore = Semaphore(this.w11_1);
|
|
1333
|
+
this.h6_1 = 1;
|
|
1334
|
+
var this_0 = this.x11_1;
|
|
1309
1335
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1310
|
-
var _iterator__ex2g4s = this_0.
|
|
1311
|
-
while (_iterator__ex2g4s.
|
|
1312
|
-
var item = _iterator__ex2g4s.
|
|
1313
|
-
destination.
|
|
1336
|
+
var _iterator__ex2g4s = this_0.i();
|
|
1337
|
+
while (_iterator__ex2g4s.j()) {
|
|
1338
|
+
var item = _iterator__ex2g4s.k();
|
|
1339
|
+
destination.h(async(this.z11_1, VOID, VOID, Flux$forEachParallel$slambda$slambda_0(semaphore, this.y11_1, item, null)));
|
|
1314
1340
|
}
|
|
1315
1341
|
|
|
1316
1342
|
suspendResult = awaitAll(destination, this);
|
|
@@ -1322,52 +1348,52 @@
|
|
|
1322
1348
|
case 1:
|
|
1323
1349
|
return suspendResult;
|
|
1324
1350
|
case 2:
|
|
1325
|
-
throw this.
|
|
1351
|
+
throw this.k6_1;
|
|
1326
1352
|
}
|
|
1327
1353
|
} catch ($p) {
|
|
1328
1354
|
var e = $p;
|
|
1329
|
-
if (this.
|
|
1355
|
+
if (this.i6_1 === 2) {
|
|
1330
1356
|
throw e;
|
|
1331
1357
|
} else {
|
|
1332
|
-
this.
|
|
1333
|
-
this.
|
|
1358
|
+
this.h6_1 = this.i6_1;
|
|
1359
|
+
this.k6_1 = e;
|
|
1334
1360
|
}
|
|
1335
1361
|
}
|
|
1336
1362
|
while (true);
|
|
1337
1363
|
};
|
|
1338
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1339
|
-
var i = new Flux$forEachParallel$slambda(this.
|
|
1340
|
-
i.
|
|
1364
|
+
protoOf(Flux$forEachParallel$slambda).n11 = function ($this$coroutineScope, completion) {
|
|
1365
|
+
var i = new Flux$forEachParallel$slambda(this.w11_1, this.x11_1, this.y11_1, completion);
|
|
1366
|
+
i.z11_1 = $this$coroutineScope;
|
|
1341
1367
|
return i;
|
|
1342
1368
|
};
|
|
1343
1369
|
function Flux$forEachParallel$slambda_0($maxParallel, $items, $action, resultContinuation) {
|
|
1344
1370
|
var i = new Flux$forEachParallel$slambda($maxParallel, $items, $action, resultContinuation);
|
|
1345
1371
|
return constructCallableReference(function ($this$coroutineScope, $completion) {
|
|
1346
|
-
return i.
|
|
1372
|
+
return i.a12($this$coroutineScope, $completion);
|
|
1347
1373
|
}, 1);
|
|
1348
1374
|
}
|
|
1349
1375
|
function $forEachParallelCOROUTINE$(_this__u8e3s4, items, maxParallel, action, resultContinuation) {
|
|
1350
1376
|
CoroutineImpl.call(this, resultContinuation);
|
|
1351
|
-
this.
|
|
1352
|
-
this.
|
|
1353
|
-
this.
|
|
1354
|
-
this.
|
|
1377
|
+
this.j12_1 = _this__u8e3s4;
|
|
1378
|
+
this.k12_1 = items;
|
|
1379
|
+
this.l12_1 = maxParallel;
|
|
1380
|
+
this.m12_1 = action;
|
|
1355
1381
|
}
|
|
1356
|
-
protoOf($forEachParallelCOROUTINE$).
|
|
1357
|
-
var suspendResult = this.
|
|
1382
|
+
protoOf($forEachParallelCOROUTINE$).p6 = function () {
|
|
1383
|
+
var suspendResult = this.j6_1;
|
|
1358
1384
|
$sm: do
|
|
1359
1385
|
try {
|
|
1360
|
-
var tmp = this.
|
|
1386
|
+
var tmp = this.h6_1;
|
|
1361
1387
|
switch (tmp) {
|
|
1362
1388
|
case 0:
|
|
1363
|
-
this.
|
|
1364
|
-
if (!(this.
|
|
1365
|
-
var message = 'maxParallel must be >= 1, got ' + this.
|
|
1389
|
+
this.i6_1 = 2;
|
|
1390
|
+
if (!(this.l12_1 >= 1)) {
|
|
1391
|
+
var message = 'maxParallel must be >= 1, got ' + this.l12_1;
|
|
1366
1392
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1367
1393
|
}
|
|
1368
1394
|
|
|
1369
|
-
this.
|
|
1370
|
-
suspendResult = coroutineScope(Flux$forEachParallel$slambda_0(this.
|
|
1395
|
+
this.h6_1 = 1;
|
|
1396
|
+
suspendResult = coroutineScope(Flux$forEachParallel$slambda_0(this.l12_1, this.k12_1, this.m12_1, null), this);
|
|
1371
1397
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1372
1398
|
return suspendResult;
|
|
1373
1399
|
}
|
|
@@ -1376,26 +1402,26 @@
|
|
|
1376
1402
|
case 1:
|
|
1377
1403
|
return Unit_instance;
|
|
1378
1404
|
case 2:
|
|
1379
|
-
throw this.
|
|
1405
|
+
throw this.k6_1;
|
|
1380
1406
|
}
|
|
1381
1407
|
} catch ($p) {
|
|
1382
1408
|
var e = $p;
|
|
1383
|
-
if (this.
|
|
1409
|
+
if (this.i6_1 === 2) {
|
|
1384
1410
|
throw e;
|
|
1385
1411
|
} else {
|
|
1386
|
-
this.
|
|
1387
|
-
this.
|
|
1412
|
+
this.h6_1 = this.i6_1;
|
|
1413
|
+
this.k6_1 = e;
|
|
1388
1414
|
}
|
|
1389
1415
|
}
|
|
1390
1416
|
while (true);
|
|
1391
1417
|
};
|
|
1392
1418
|
function Flux() {
|
|
1393
1419
|
}
|
|
1394
|
-
protoOf(Flux).
|
|
1420
|
+
protoOf(Flux).uv = function (items, maxParallel, action, $completion) {
|
|
1395
1421
|
var tmp = new $forEachParallelCOROUTINE$(this, items, maxParallel, action, $completion);
|
|
1396
|
-
tmp.
|
|
1397
|
-
tmp.
|
|
1398
|
-
return tmp.
|
|
1422
|
+
tmp.j6_1 = Unit_instance;
|
|
1423
|
+
tmp.k6_1 = null;
|
|
1424
|
+
return tmp.p6();
|
|
1399
1425
|
};
|
|
1400
1426
|
var Flux_instance;
|
|
1401
1427
|
function Flux_getInstance() {
|
|
@@ -1403,21 +1429,21 @@
|
|
|
1403
1429
|
}
|
|
1404
1430
|
function $getCOROUTINE$(_this__u8e3s4, key, resultContinuation) {
|
|
1405
1431
|
CoroutineImpl.call(this, resultContinuation);
|
|
1406
|
-
this.
|
|
1407
|
-
this.
|
|
1432
|
+
this.v12_1 = _this__u8e3s4;
|
|
1433
|
+
this.w12_1 = key;
|
|
1408
1434
|
}
|
|
1409
|
-
protoOf($getCOROUTINE$).
|
|
1410
|
-
var suspendResult = this.
|
|
1435
|
+
protoOf($getCOROUTINE$).p6 = function () {
|
|
1436
|
+
var suspendResult = this.j6_1;
|
|
1411
1437
|
$sm: do
|
|
1412
1438
|
try {
|
|
1413
|
-
var tmp = this.
|
|
1439
|
+
var tmp = this.h6_1;
|
|
1414
1440
|
switch (tmp) {
|
|
1415
1441
|
case 0:
|
|
1416
|
-
this.
|
|
1417
|
-
this.
|
|
1418
|
-
this.
|
|
1419
|
-
this.
|
|
1420
|
-
suspendResult = this.
|
|
1442
|
+
this.i6_1 = 12;
|
|
1443
|
+
this.i13_1 = this.v12_1.m13_1;
|
|
1444
|
+
this.h13_1 = null;
|
|
1445
|
+
this.h6_1 = 1;
|
|
1446
|
+
suspendResult = this.i13_1.tr(this.h13_1, this);
|
|
1421
1447
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1422
1448
|
return suspendResult;
|
|
1423
1449
|
}
|
|
@@ -1430,52 +1456,52 @@
|
|
|
1430
1456
|
l$ret$1: do {
|
|
1431
1457
|
var tmp_0;
|
|
1432
1458
|
try {
|
|
1433
|
-
var tmp0_safe_receiver = this.
|
|
1459
|
+
var tmp0_safe_receiver = this.v12_1.n13_1.d3(this.w12_1);
|
|
1434
1460
|
if (tmp0_safe_receiver == null)
|
|
1435
1461
|
null;
|
|
1436
1462
|
else {
|
|
1437
|
-
var tmp0 = this.
|
|
1438
|
-
var key = this.
|
|
1439
|
-
tmp0.
|
|
1463
|
+
var tmp0 = this.v12_1.n13_1;
|
|
1464
|
+
var key = this.w12_1;
|
|
1465
|
+
tmp0.c3(key, tmp0_safe_receiver);
|
|
1440
1466
|
tmp$ret$0 = tmp0_safe_receiver;
|
|
1441
1467
|
break l$ret$1;
|
|
1442
1468
|
}
|
|
1443
|
-
tmp$ret$2 = this.
|
|
1469
|
+
tmp$ret$2 = this.v12_1.o13_1.k1(this.w12_1);
|
|
1444
1470
|
break l$ret$3;
|
|
1445
1471
|
} catch ($p) {
|
|
1446
1472
|
var tmp_1;
|
|
1447
1473
|
var t = $p;
|
|
1448
|
-
this.
|
|
1474
|
+
this.i13_1.fr(this.h13_1);
|
|
1449
1475
|
throw t;
|
|
1450
1476
|
}
|
|
1451
1477
|
}
|
|
1452
1478
|
while (false);
|
|
1453
1479
|
var tmp_2 = tmp$ret$0;
|
|
1454
|
-
this.
|
|
1480
|
+
this.i13_1.fr(this.h13_1);
|
|
1455
1481
|
return tmp_2;
|
|
1456
1482
|
}
|
|
1457
1483
|
while (false);
|
|
1458
1484
|
var tmp_3 = tmp$ret$2;
|
|
1459
|
-
this.
|
|
1485
|
+
this.i13_1.fr(this.h13_1);
|
|
1460
1486
|
var existing = tmp_3;
|
|
1461
1487
|
if (!(existing == null)) {
|
|
1462
|
-
this.
|
|
1463
|
-
suspendResult = existing.
|
|
1488
|
+
this.h6_1 = 11;
|
|
1489
|
+
suspendResult = existing.nj(this);
|
|
1464
1490
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1465
1491
|
return suspendResult;
|
|
1466
1492
|
}
|
|
1467
1493
|
continue $sm;
|
|
1468
1494
|
} else {
|
|
1469
|
-
this.
|
|
1495
|
+
this.h6_1 = 2;
|
|
1470
1496
|
continue $sm;
|
|
1471
1497
|
}
|
|
1472
1498
|
|
|
1473
1499
|
case 2:
|
|
1474
|
-
this.
|
|
1475
|
-
this.
|
|
1476
|
-
this.
|
|
1477
|
-
this.
|
|
1478
|
-
suspendResult = this.
|
|
1500
|
+
this.y12_1 = CompletableDeferred();
|
|
1501
|
+
this.g13_1 = this.v12_1.m13_1;
|
|
1502
|
+
this.f13_1 = null;
|
|
1503
|
+
this.h6_1 = 3;
|
|
1504
|
+
suspendResult = this.g13_1.tr(this.f13_1, this);
|
|
1479
1505
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1480
1506
|
return suspendResult;
|
|
1481
1507
|
}
|
|
@@ -1488,25 +1514,25 @@
|
|
|
1488
1514
|
l$ret$5: do {
|
|
1489
1515
|
var tmp_4;
|
|
1490
1516
|
try {
|
|
1491
|
-
var tmp0_safe_receiver_0 = this.
|
|
1517
|
+
var tmp0_safe_receiver_0 = this.v12_1.n13_1.d3(this.w12_1);
|
|
1492
1518
|
if (tmp0_safe_receiver_0 == null)
|
|
1493
1519
|
null;
|
|
1494
1520
|
else {
|
|
1495
|
-
var tmp0_0 = this.
|
|
1496
|
-
var key_0 = this.
|
|
1497
|
-
tmp0_0.
|
|
1521
|
+
var tmp0_0 = this.v12_1.n13_1;
|
|
1522
|
+
var key_0 = this.w12_1;
|
|
1523
|
+
tmp0_0.c3(key_0, tmp0_safe_receiver_0);
|
|
1498
1524
|
tmp$ret$4 = tmp0_safe_receiver_0;
|
|
1499
1525
|
break l$ret$5;
|
|
1500
1526
|
}
|
|
1501
|
-
var raced = this.
|
|
1527
|
+
var raced = this.v12_1.o13_1.k1(this.w12_1);
|
|
1502
1528
|
var tmp_5;
|
|
1503
1529
|
if (!(raced == null)) {
|
|
1504
1530
|
tmp_5 = raced;
|
|
1505
1531
|
} else {
|
|
1506
|
-
var tmp0_1 = this.
|
|
1507
|
-
var tmp2 = this.
|
|
1508
|
-
var value = this.
|
|
1509
|
-
tmp0_1.
|
|
1532
|
+
var tmp0_1 = this.v12_1.o13_1;
|
|
1533
|
+
var tmp2 = this.w12_1;
|
|
1534
|
+
var value = this.y12_1;
|
|
1535
|
+
tmp0_1.c3(tmp2, value);
|
|
1510
1536
|
tmp_5 = null;
|
|
1511
1537
|
}
|
|
1512
1538
|
tmp$ret$6 = tmp_5;
|
|
@@ -1514,87 +1540,87 @@
|
|
|
1514
1540
|
} catch ($p_0) {
|
|
1515
1541
|
var tmp_6;
|
|
1516
1542
|
var t_0 = $p_0;
|
|
1517
|
-
this.
|
|
1543
|
+
this.g13_1.fr(this.f13_1);
|
|
1518
1544
|
throw t_0;
|
|
1519
1545
|
}
|
|
1520
1546
|
}
|
|
1521
1547
|
while (false);
|
|
1522
1548
|
var tmp_7 = tmp$ret$4;
|
|
1523
|
-
this.
|
|
1549
|
+
this.g13_1.fr(this.f13_1);
|
|
1524
1550
|
return tmp_7;
|
|
1525
1551
|
}
|
|
1526
1552
|
while (false);
|
|
1527
1553
|
var tmp_8 = tmp$ret$6;
|
|
1528
|
-
this.
|
|
1554
|
+
this.g13_1.fr(this.f13_1);
|
|
1529
1555
|
var awaitInstead = tmp_8;
|
|
1530
1556
|
if (!(awaitInstead == null)) {
|
|
1531
|
-
this.
|
|
1532
|
-
suspendResult = awaitInstead.
|
|
1557
|
+
this.h6_1 = 10;
|
|
1558
|
+
suspendResult = awaitInstead.nj(this);
|
|
1533
1559
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1534
1560
|
return suspendResult;
|
|
1535
1561
|
}
|
|
1536
1562
|
continue $sm;
|
|
1537
1563
|
} else {
|
|
1538
|
-
this.
|
|
1564
|
+
this.h6_1 = 4;
|
|
1539
1565
|
continue $sm;
|
|
1540
1566
|
}
|
|
1541
1567
|
|
|
1542
1568
|
case 4:
|
|
1543
|
-
this.
|
|
1544
|
-
this.
|
|
1545
|
-
suspendResult = this.
|
|
1569
|
+
this.i6_1 = 6;
|
|
1570
|
+
this.h6_1 = 5;
|
|
1571
|
+
suspendResult = this.v12_1.k13_1(this.w12_1, this);
|
|
1546
1572
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1547
1573
|
return suspendResult;
|
|
1548
1574
|
}
|
|
1549
1575
|
|
|
1550
1576
|
continue $sm;
|
|
1551
1577
|
case 5:
|
|
1552
|
-
this.
|
|
1553
|
-
this.
|
|
1554
|
-
this.
|
|
1578
|
+
this.b13_1 = suspendResult;
|
|
1579
|
+
this.i6_1 = 12;
|
|
1580
|
+
this.h6_1 = 8;
|
|
1555
1581
|
continue $sm;
|
|
1556
1582
|
case 6:
|
|
1557
|
-
this.
|
|
1558
|
-
var tmp_9 = this.
|
|
1583
|
+
this.i6_1 = 12;
|
|
1584
|
+
var tmp_9 = this.k6_1;
|
|
1559
1585
|
if (tmp_9 instanceof Error) {
|
|
1560
|
-
this.
|
|
1561
|
-
this.
|
|
1562
|
-
this.
|
|
1563
|
-
this.
|
|
1564
|
-
suspendResult = this.
|
|
1586
|
+
this.c13_1 = this.k6_1;
|
|
1587
|
+
this.e13_1 = this.v12_1.m13_1;
|
|
1588
|
+
this.d13_1 = null;
|
|
1589
|
+
this.h6_1 = 7;
|
|
1590
|
+
suspendResult = this.e13_1.tr(this.d13_1, this);
|
|
1565
1591
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1566
1592
|
return suspendResult;
|
|
1567
1593
|
}
|
|
1568
1594
|
continue $sm;
|
|
1569
1595
|
} else {
|
|
1570
|
-
throw this.
|
|
1596
|
+
throw this.k6_1;
|
|
1571
1597
|
}
|
|
1572
1598
|
|
|
1573
1599
|
case 7:
|
|
1574
1600
|
l$ret$9: do {
|
|
1575
1601
|
var tmp_10;
|
|
1576
1602
|
try {
|
|
1577
|
-
this.
|
|
1603
|
+
this.v12_1.o13_1.d3(this.w12_1);
|
|
1578
1604
|
break l$ret$9;
|
|
1579
1605
|
} catch ($p_1) {
|
|
1580
1606
|
var tmp_11;
|
|
1581
1607
|
var t_1 = $p_1;
|
|
1582
|
-
this.
|
|
1608
|
+
this.e13_1.fr(this.d13_1);
|
|
1583
1609
|
throw t_1;
|
|
1584
1610
|
}
|
|
1585
1611
|
}
|
|
1586
1612
|
while (false);
|
|
1587
|
-
this.
|
|
1588
|
-
this.
|
|
1613
|
+
this.e13_1.fr(this.d13_1);
|
|
1614
|
+
this.y12_1.lm(this.c13_1);
|
|
1589
1615
|
var tmp_12 = this;
|
|
1590
|
-
throw this.
|
|
1616
|
+
throw this.c13_1;
|
|
1591
1617
|
case 8:
|
|
1592
|
-
this.
|
|
1593
|
-
this.
|
|
1594
|
-
this.
|
|
1595
|
-
this.
|
|
1596
|
-
this.
|
|
1597
|
-
suspendResult = this.
|
|
1618
|
+
this.i6_1 = 12;
|
|
1619
|
+
this.x12_1 = this.b13_1;
|
|
1620
|
+
this.a13_1 = this.v12_1.m13_1;
|
|
1621
|
+
this.z12_1 = null;
|
|
1622
|
+
this.h6_1 = 9;
|
|
1623
|
+
suspendResult = this.a13_1.tr(this.z12_1, this);
|
|
1598
1624
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1599
1625
|
return suspendResult;
|
|
1600
1626
|
}
|
|
@@ -1604,89 +1630,89 @@
|
|
|
1604
1630
|
l$ret$11: do {
|
|
1605
1631
|
var tmp_13;
|
|
1606
1632
|
try {
|
|
1607
|
-
this.
|
|
1633
|
+
this.v12_1.o13_1.d3(this.w12_1);
|
|
1608
1634
|
var tmp_14;
|
|
1609
|
-
if (this.
|
|
1610
|
-
var tmp0_2 = this.
|
|
1611
|
-
var key_1 = this.
|
|
1612
|
-
tmp_14 = !(isInterface(tmp0_2, KtMap) ? tmp0_2 : THROW_CCE()).
|
|
1635
|
+
if (this.v12_1.n13_1.l() >= this.v12_1.j13_1) {
|
|
1636
|
+
var tmp0_2 = this.v12_1.n13_1;
|
|
1637
|
+
var key_1 = this.w12_1;
|
|
1638
|
+
tmp_14 = !(isInterface(tmp0_2, KtMap) ? tmp0_2 : THROW_CCE()).j1(key_1);
|
|
1613
1639
|
} else {
|
|
1614
1640
|
tmp_14 = false;
|
|
1615
1641
|
}
|
|
1616
1642
|
if (tmp_14) {
|
|
1617
|
-
var iter = this.
|
|
1618
|
-
var oldest = iter.
|
|
1619
|
-
var oldestValue = oldest.
|
|
1620
|
-
iter.
|
|
1621
|
-
var tmp0_safe_receiver_1 = this.
|
|
1643
|
+
var iter = this.v12_1.n13_1.m1().i();
|
|
1644
|
+
var oldest = iter.k();
|
|
1645
|
+
var oldestValue = oldest.i1();
|
|
1646
|
+
iter.e2();
|
|
1647
|
+
var tmp0_safe_receiver_1 = this.v12_1.l13_1;
|
|
1622
1648
|
if (tmp0_safe_receiver_1 == null)
|
|
1623
1649
|
null;
|
|
1624
1650
|
else
|
|
1625
1651
|
tmp0_safe_receiver_1(oldestValue);
|
|
1626
1652
|
}
|
|
1627
|
-
var tmp0_3 = this.
|
|
1628
|
-
var tmp2_0 = this.
|
|
1629
|
-
var value_0 = this.
|
|
1630
|
-
tmp0_3.
|
|
1653
|
+
var tmp0_3 = this.v12_1.n13_1;
|
|
1654
|
+
var tmp2_0 = this.w12_1;
|
|
1655
|
+
var value_0 = this.x12_1;
|
|
1656
|
+
tmp0_3.c3(tmp2_0, value_0);
|
|
1631
1657
|
break l$ret$11;
|
|
1632
1658
|
} catch ($p_2) {
|
|
1633
1659
|
var tmp_15;
|
|
1634
1660
|
var t_2 = $p_2;
|
|
1635
|
-
this.
|
|
1661
|
+
this.a13_1.fr(this.z12_1);
|
|
1636
1662
|
throw t_2;
|
|
1637
1663
|
}
|
|
1638
1664
|
}
|
|
1639
1665
|
while (false);
|
|
1640
|
-
this.
|
|
1641
|
-
this.
|
|
1642
|
-
return this.
|
|
1666
|
+
this.a13_1.fr(this.z12_1);
|
|
1667
|
+
this.y12_1.km(this.x12_1);
|
|
1668
|
+
return this.x12_1;
|
|
1643
1669
|
case 10:
|
|
1644
1670
|
return suspendResult;
|
|
1645
1671
|
case 11:
|
|
1646
1672
|
return suspendResult;
|
|
1647
1673
|
case 12:
|
|
1648
|
-
throw this.
|
|
1674
|
+
throw this.k6_1;
|
|
1649
1675
|
}
|
|
1650
1676
|
} catch ($p_3) {
|
|
1651
1677
|
var e = $p_3;
|
|
1652
|
-
if (this.
|
|
1678
|
+
if (this.i6_1 === 12) {
|
|
1653
1679
|
throw e;
|
|
1654
1680
|
} else {
|
|
1655
|
-
this.
|
|
1656
|
-
this.
|
|
1681
|
+
this.h6_1 = this.i6_1;
|
|
1682
|
+
this.k6_1 = e;
|
|
1657
1683
|
}
|
|
1658
1684
|
}
|
|
1659
1685
|
while (true);
|
|
1660
1686
|
};
|
|
1661
1687
|
function LruCache(maxSize, loader, onEvict) {
|
|
1662
1688
|
onEvict = onEvict === VOID ? null : onEvict;
|
|
1663
|
-
this.
|
|
1664
|
-
this.
|
|
1665
|
-
this.
|
|
1689
|
+
this.j13_1 = maxSize;
|
|
1690
|
+
this.k13_1 = loader;
|
|
1691
|
+
this.l13_1 = onEvict;
|
|
1666
1692
|
// Inline function 'kotlin.require' call
|
|
1667
|
-
if (!(this.
|
|
1693
|
+
if (!(this.j13_1 > 0)) {
|
|
1668
1694
|
var message = 'Cache size must be greater than 0';
|
|
1669
1695
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1670
1696
|
}
|
|
1671
|
-
this.
|
|
1672
|
-
this.
|
|
1697
|
+
this.m13_1 = Mutex();
|
|
1698
|
+
this.n13_1 = LinkedHashMap_init_$Create$();
|
|
1673
1699
|
var tmp = this;
|
|
1674
1700
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1675
|
-
tmp.
|
|
1701
|
+
tmp.o13_1 = LinkedHashMap_init_$Create$();
|
|
1676
1702
|
}
|
|
1677
|
-
protoOf(LruCache).
|
|
1703
|
+
protoOf(LruCache).p13 = function (key, $completion) {
|
|
1678
1704
|
var tmp = new $getCOROUTINE$(this, key, $completion);
|
|
1679
|
-
tmp.
|
|
1680
|
-
tmp.
|
|
1681
|
-
return tmp.
|
|
1705
|
+
tmp.j6_1 = Unit_instance;
|
|
1706
|
+
tmp.k6_1 = null;
|
|
1707
|
+
return tmp.p6();
|
|
1682
1708
|
};
|
|
1683
1709
|
function RawTile(width, height, rgba) {
|
|
1684
|
-
this.
|
|
1685
|
-
this.
|
|
1686
|
-
this.
|
|
1710
|
+
this.q13_1 = width;
|
|
1711
|
+
this.r13_1 = height;
|
|
1712
|
+
this.s13_1 = rgba;
|
|
1687
1713
|
// Inline function 'kotlin.require' call
|
|
1688
|
-
if (!(this.
|
|
1689
|
-
var message = 'rgba size ' + this.
|
|
1714
|
+
if (!(this.s13_1.length === imul(imul(this.q13_1, this.r13_1), 4))) {
|
|
1715
|
+
var message = 'rgba size ' + this.s13_1.length + ' does not match width*height*4 (' + imul(imul(this.q13_1, this.r13_1), 4) + ')';
|
|
1690
1716
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1691
1717
|
}
|
|
1692
1718
|
}
|
|
@@ -1695,16 +1721,16 @@
|
|
|
1695
1721
|
return true;
|
|
1696
1722
|
if (!(other instanceof RawTile))
|
|
1697
1723
|
return false;
|
|
1698
|
-
return this.
|
|
1724
|
+
return this.q13_1 === other.q13_1 && this.r13_1 === other.r13_1 && contentEquals(this.s13_1, other.s13_1);
|
|
1699
1725
|
};
|
|
1700
1726
|
protoOf(RawTile).hashCode = function () {
|
|
1701
|
-
var result = this.
|
|
1702
|
-
result = imul(31, result) + this.
|
|
1703
|
-
result = imul(31, result) + contentHashCode(this.
|
|
1727
|
+
var result = this.q13_1;
|
|
1728
|
+
result = imul(31, result) + this.r13_1 | 0;
|
|
1729
|
+
result = imul(31, result) + contentHashCode(this.s13_1) | 0;
|
|
1704
1730
|
return result;
|
|
1705
1731
|
};
|
|
1706
1732
|
function Tile_init_$Init$(raw, $this) {
|
|
1707
|
-
Tile.call($this, raw.
|
|
1733
|
+
Tile.call($this, raw.q13_1, raw.r13_1, raw.s13_1);
|
|
1708
1734
|
return $this;
|
|
1709
1735
|
}
|
|
1710
1736
|
function Tile_init_$Create$(raw) {
|
|
@@ -1712,7 +1738,7 @@
|
|
|
1712
1738
|
}
|
|
1713
1739
|
function Companion() {
|
|
1714
1740
|
}
|
|
1715
|
-
protoOf(Companion).
|
|
1741
|
+
protoOf(Companion).t13 = function (r, g, b) {
|
|
1716
1742
|
var raw = r * 256.0 + g + b / 256.0 - 32768.0;
|
|
1717
1743
|
return round(raw * 100.0) / 100.0;
|
|
1718
1744
|
};
|
|
@@ -1721,83 +1747,83 @@
|
|
|
1721
1747
|
return Companion_instance;
|
|
1722
1748
|
}
|
|
1723
1749
|
function Tile(width, height, rgba) {
|
|
1724
|
-
this.
|
|
1725
|
-
this.
|
|
1726
|
-
this.
|
|
1750
|
+
this.pz_1 = width;
|
|
1751
|
+
this.qz_1 = height;
|
|
1752
|
+
this.rz_1 = rgba;
|
|
1727
1753
|
var tmp = this;
|
|
1728
1754
|
var tmp_0 = 0;
|
|
1729
|
-
var tmp_1 = imul(this.
|
|
1755
|
+
var tmp_1 = imul(this.pz_1, this.qz_1);
|
|
1730
1756
|
var tmp_2 = new Float64Array(tmp_1);
|
|
1731
1757
|
while (tmp_0 < tmp_1) {
|
|
1732
1758
|
tmp_2[tmp_0] = NaN;
|
|
1733
1759
|
tmp_0 = tmp_0 + 1 | 0;
|
|
1734
1760
|
}
|
|
1735
|
-
tmp.
|
|
1736
|
-
this.
|
|
1761
|
+
tmp.sz_1 = tmp_2;
|
|
1762
|
+
this.tz_1 = 0;
|
|
1737
1763
|
}
|
|
1738
|
-
protoOf(Tile).
|
|
1739
|
-
var containsUpper = this.
|
|
1740
|
-
var containsArg = pixel.
|
|
1764
|
+
protoOf(Tile).uz = function (pixel) {
|
|
1765
|
+
var containsUpper = this.pz_1;
|
|
1766
|
+
var containsArg = pixel.jz_1;
|
|
1741
1767
|
// Inline function 'kotlin.require' call
|
|
1742
1768
|
if (!(0 <= containsArg ? containsArg < containsUpper : false)) {
|
|
1743
|
-
var message = 'Invalid x position: ' + pixel.
|
|
1769
|
+
var message = 'Invalid x position: ' + pixel.jz_1 + '. Must be between 0 and ' + (this.pz_1 - 1 | 0);
|
|
1744
1770
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1745
1771
|
}
|
|
1746
|
-
var containsUpper_0 = this.
|
|
1747
|
-
var containsArg_0 = pixel.
|
|
1772
|
+
var containsUpper_0 = this.qz_1;
|
|
1773
|
+
var containsArg_0 = pixel.kz_1;
|
|
1748
1774
|
// Inline function 'kotlin.require' call
|
|
1749
1775
|
if (!(0 <= containsArg_0 ? containsArg_0 < containsUpper_0 : false)) {
|
|
1750
|
-
var message_0 = 'Invalid y position: ' + pixel.
|
|
1776
|
+
var message_0 = 'Invalid y position: ' + pixel.kz_1 + '. Must be between 0 and ' + (this.qz_1 - 1 | 0);
|
|
1751
1777
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1752
1778
|
}
|
|
1753
|
-
var idx = imul(pixel.
|
|
1754
|
-
var cached = this.
|
|
1779
|
+
var idx = imul(pixel.kz_1, this.pz_1) + pixel.jz_1 | 0;
|
|
1780
|
+
var cached = this.sz_1[idx];
|
|
1755
1781
|
if (!isNaN_0(cached))
|
|
1756
1782
|
return cached;
|
|
1757
1783
|
var byteOffset = imul(idx, 4);
|
|
1758
|
-
var r = this.
|
|
1759
|
-
var g = this.
|
|
1760
|
-
var b = this.
|
|
1761
|
-
var elevation = Companion_instance.
|
|
1762
|
-
this.
|
|
1763
|
-
this.
|
|
1784
|
+
var r = this.rz_1[byteOffset] & 255;
|
|
1785
|
+
var g = this.rz_1[byteOffset + 1 | 0] & 255;
|
|
1786
|
+
var b = this.rz_1[byteOffset + 2 | 0] & 255;
|
|
1787
|
+
var elevation = Companion_instance.t13(r, g, b);
|
|
1788
|
+
this.sz_1[idx] = elevation;
|
|
1789
|
+
this.tz_1 = this.tz_1 + 1 | 0;
|
|
1764
1790
|
return elevation;
|
|
1765
1791
|
};
|
|
1766
1792
|
function buildUrl($this, tc) {
|
|
1767
|
-
return replace(replace(replace($this.
|
|
1793
|
+
return replace(replace(replace($this.lz_1, '{z}', tc.tv_1.toString()), '{x}', tc.rv_1.toString()), '{y}', tc.sv_1.toString());
|
|
1768
1794
|
}
|
|
1769
1795
|
function fetchAndDecodeTile$ref_0() {
|
|
1770
1796
|
KFunctionImpl.call(this, 1, 2, 2);
|
|
1771
1797
|
}
|
|
1772
|
-
protoOf(fetchAndDecodeTile$ref_0).
|
|
1798
|
+
protoOf(fetchAndDecodeTile$ref_0).i10 = function (p0, $completion) {
|
|
1773
1799
|
return fetchAndDecodeTile(p0, $completion);
|
|
1774
1800
|
};
|
|
1775
|
-
protoOf(fetchAndDecodeTile$ref_0).
|
|
1776
|
-
return this.
|
|
1801
|
+
protoOf(fetchAndDecodeTile$ref_0).x6 = function (p1, $completion) {
|
|
1802
|
+
return this.i10((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
|
|
1777
1803
|
};
|
|
1778
1804
|
function TileManager$cache$slambda(this$0, resultContinuation) {
|
|
1779
|
-
this.
|
|
1805
|
+
this.f14_1 = this$0;
|
|
1780
1806
|
CoroutineImpl.call(this, resultContinuation);
|
|
1781
1807
|
}
|
|
1782
|
-
protoOf(TileManager$cache$slambda).
|
|
1783
|
-
var tmp = this.
|
|
1784
|
-
tmp.
|
|
1785
|
-
tmp.
|
|
1786
|
-
return tmp.
|
|
1808
|
+
protoOf(TileManager$cache$slambda).h14 = function (tc, $completion) {
|
|
1809
|
+
var tmp = this.i14(tc, $completion);
|
|
1810
|
+
tmp.j6_1 = Unit_instance;
|
|
1811
|
+
tmp.k6_1 = null;
|
|
1812
|
+
return tmp.p6();
|
|
1787
1813
|
};
|
|
1788
|
-
protoOf(TileManager$cache$slambda).
|
|
1789
|
-
return this.
|
|
1814
|
+
protoOf(TileManager$cache$slambda).x6 = function (p1, $completion) {
|
|
1815
|
+
return this.h14(p1 instanceof TileCoordinates ? p1 : THROW_CCE(), $completion);
|
|
1790
1816
|
};
|
|
1791
|
-
protoOf(TileManager$cache$slambda).
|
|
1792
|
-
var suspendResult = this.
|
|
1817
|
+
protoOf(TileManager$cache$slambda).p6 = function () {
|
|
1818
|
+
var suspendResult = this.j6_1;
|
|
1793
1819
|
$sm: do
|
|
1794
1820
|
try {
|
|
1795
|
-
var tmp = this.
|
|
1821
|
+
var tmp = this.h6_1;
|
|
1796
1822
|
switch (tmp) {
|
|
1797
1823
|
case 0:
|
|
1798
|
-
this.
|
|
1799
|
-
this.
|
|
1800
|
-
suspendResult = this.
|
|
1824
|
+
this.i6_1 = 2;
|
|
1825
|
+
this.h6_1 = 1;
|
|
1826
|
+
suspendResult = this.f14_1.mz_1(buildUrl(this.f14_1, this.g14_1), this);
|
|
1801
1827
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1802
1828
|
return suspendResult;
|
|
1803
1829
|
}
|
|
@@ -1807,28 +1833,28 @@
|
|
|
1807
1833
|
var ARGUMENT = suspendResult;
|
|
1808
1834
|
return Tile_init_$Create$(ARGUMENT);
|
|
1809
1835
|
case 2:
|
|
1810
|
-
throw this.
|
|
1836
|
+
throw this.k6_1;
|
|
1811
1837
|
}
|
|
1812
1838
|
} catch ($p) {
|
|
1813
1839
|
var e = $p;
|
|
1814
|
-
if (this.
|
|
1840
|
+
if (this.i6_1 === 2) {
|
|
1815
1841
|
throw e;
|
|
1816
1842
|
} else {
|
|
1817
|
-
this.
|
|
1818
|
-
this.
|
|
1843
|
+
this.h6_1 = this.i6_1;
|
|
1844
|
+
this.k6_1 = e;
|
|
1819
1845
|
}
|
|
1820
1846
|
}
|
|
1821
1847
|
while (true);
|
|
1822
1848
|
};
|
|
1823
|
-
protoOf(TileManager$cache$slambda).
|
|
1824
|
-
var i = new TileManager$cache$slambda(this.
|
|
1825
|
-
i.
|
|
1849
|
+
protoOf(TileManager$cache$slambda).i14 = function (tc, completion) {
|
|
1850
|
+
var i = new TileManager$cache$slambda(this.f14_1, completion);
|
|
1851
|
+
i.g14_1 = tc;
|
|
1826
1852
|
return i;
|
|
1827
1853
|
};
|
|
1828
1854
|
function TileManager$cache$slambda_0(this$0, resultContinuation) {
|
|
1829
1855
|
var i = new TileManager$cache$slambda(this$0, resultContinuation);
|
|
1830
1856
|
return constructCallableReference(function (tc, $completion) {
|
|
1831
|
-
return i.
|
|
1857
|
+
return i.h14(tc, $completion);
|
|
1832
1858
|
}, 1);
|
|
1833
1859
|
}
|
|
1834
1860
|
function TileManager(urlTemplate, cacheSize, fetcher) {
|
|
@@ -1839,26 +1865,26 @@
|
|
|
1839
1865
|
tmp = fetcher;
|
|
1840
1866
|
}
|
|
1841
1867
|
fetcher = tmp;
|
|
1842
|
-
this.
|
|
1843
|
-
this.
|
|
1868
|
+
this.lz_1 = urlTemplate;
|
|
1869
|
+
this.mz_1 = fetcher;
|
|
1844
1870
|
var tmp_0 = this;
|
|
1845
|
-
tmp_0.
|
|
1871
|
+
tmp_0.nz_1 = new LruCache(cacheSize, TileManager$cache$slambda_0(this, null));
|
|
1846
1872
|
}
|
|
1847
|
-
protoOf(TileManager).
|
|
1848
|
-
return this.
|
|
1873
|
+
protoOf(TileManager).oz = function (tileCoords, $completion) {
|
|
1874
|
+
return this.nz_1.p13(tileCoords, $completion);
|
|
1849
1875
|
};
|
|
1850
1876
|
function TileCoordinates(x, y, z) {
|
|
1851
|
-
this.
|
|
1852
|
-
this.
|
|
1853
|
-
this.
|
|
1877
|
+
this.rv_1 = x;
|
|
1878
|
+
this.sv_1 = y;
|
|
1879
|
+
this.tv_1 = z;
|
|
1854
1880
|
}
|
|
1855
1881
|
protoOf(TileCoordinates).toString = function () {
|
|
1856
|
-
return 'TileCoordinates(x=' + this.
|
|
1882
|
+
return 'TileCoordinates(x=' + this.rv_1 + ', y=' + this.sv_1 + ', z=' + this.tv_1 + ')';
|
|
1857
1883
|
};
|
|
1858
1884
|
protoOf(TileCoordinates).hashCode = function () {
|
|
1859
|
-
var result = this.
|
|
1860
|
-
result = imul(result, 31) + this.
|
|
1861
|
-
result = imul(result, 31) + this.
|
|
1885
|
+
var result = this.rv_1;
|
|
1886
|
+
result = imul(result, 31) + this.sv_1 | 0;
|
|
1887
|
+
result = imul(result, 31) + this.tv_1 | 0;
|
|
1862
1888
|
return result;
|
|
1863
1889
|
};
|
|
1864
1890
|
protoOf(TileCoordinates).equals = function (other) {
|
|
@@ -1866,26 +1892,26 @@
|
|
|
1866
1892
|
return true;
|
|
1867
1893
|
if (!(other instanceof TileCoordinates))
|
|
1868
1894
|
return false;
|
|
1869
|
-
if (!(this.
|
|
1895
|
+
if (!(this.rv_1 === other.rv_1))
|
|
1870
1896
|
return false;
|
|
1871
|
-
if (!(this.
|
|
1897
|
+
if (!(this.sv_1 === other.sv_1))
|
|
1872
1898
|
return false;
|
|
1873
|
-
if (!(this.
|
|
1899
|
+
if (!(this.tv_1 === other.tv_1))
|
|
1874
1900
|
return false;
|
|
1875
1901
|
return true;
|
|
1876
1902
|
};
|
|
1877
1903
|
function Pixel(tile, x, y) {
|
|
1878
|
-
this.
|
|
1879
|
-
this.
|
|
1880
|
-
this.
|
|
1904
|
+
this.iz_1 = tile;
|
|
1905
|
+
this.jz_1 = x;
|
|
1906
|
+
this.kz_1 = y;
|
|
1881
1907
|
}
|
|
1882
1908
|
protoOf(Pixel).toString = function () {
|
|
1883
|
-
return 'Pixel(tile=' + this.
|
|
1909
|
+
return 'Pixel(tile=' + this.iz_1.toString() + ', x=' + this.jz_1 + ', y=' + this.kz_1 + ')';
|
|
1884
1910
|
};
|
|
1885
1911
|
protoOf(Pixel).hashCode = function () {
|
|
1886
|
-
var result = this.
|
|
1887
|
-
result = imul(result, 31) + this.
|
|
1888
|
-
result = imul(result, 31) + this.
|
|
1912
|
+
var result = this.iz_1.hashCode();
|
|
1913
|
+
result = imul(result, 31) + this.jz_1 | 0;
|
|
1914
|
+
result = imul(result, 31) + this.kz_1 | 0;
|
|
1889
1915
|
return result;
|
|
1890
1916
|
};
|
|
1891
1917
|
protoOf(Pixel).equals = function (other) {
|
|
@@ -1893,26 +1919,26 @@
|
|
|
1893
1919
|
return true;
|
|
1894
1920
|
if (!(other instanceof Pixel))
|
|
1895
1921
|
return false;
|
|
1896
|
-
if (!this.
|
|
1922
|
+
if (!this.iz_1.equals(other.iz_1))
|
|
1897
1923
|
return false;
|
|
1898
|
-
if (!(this.
|
|
1924
|
+
if (!(this.jz_1 === other.jz_1))
|
|
1899
1925
|
return false;
|
|
1900
|
-
if (!(this.
|
|
1926
|
+
if (!(this.kz_1 === other.kz_1))
|
|
1901
1927
|
return false;
|
|
1902
1928
|
return true;
|
|
1903
1929
|
};
|
|
1904
1930
|
function PixelFloat(tile, x, y) {
|
|
1905
|
-
this.
|
|
1906
|
-
this.
|
|
1907
|
-
this.
|
|
1931
|
+
this.ez_1 = tile;
|
|
1932
|
+
this.fz_1 = x;
|
|
1933
|
+
this.gz_1 = y;
|
|
1908
1934
|
}
|
|
1909
1935
|
protoOf(PixelFloat).toString = function () {
|
|
1910
|
-
return 'PixelFloat(tile=' + this.
|
|
1936
|
+
return 'PixelFloat(tile=' + this.ez_1.toString() + ', x=' + this.fz_1 + ', y=' + this.gz_1 + ')';
|
|
1911
1937
|
};
|
|
1912
1938
|
protoOf(PixelFloat).hashCode = function () {
|
|
1913
|
-
var result = this.
|
|
1914
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1915
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1939
|
+
var result = this.ez_1.hashCode();
|
|
1940
|
+
result = imul(result, 31) + getNumberHashCode(this.fz_1) | 0;
|
|
1941
|
+
result = imul(result, 31) + getNumberHashCode(this.gz_1) | 0;
|
|
1916
1942
|
return result;
|
|
1917
1943
|
};
|
|
1918
1944
|
protoOf(PixelFloat).equals = function (other) {
|
|
@@ -1920,30 +1946,30 @@
|
|
|
1920
1946
|
return true;
|
|
1921
1947
|
if (!(other instanceof PixelFloat))
|
|
1922
1948
|
return false;
|
|
1923
|
-
if (!this.
|
|
1949
|
+
if (!this.ez_1.equals(other.ez_1))
|
|
1924
1950
|
return false;
|
|
1925
|
-
if (!equals(this.
|
|
1951
|
+
if (!equals(this.fz_1, other.fz_1))
|
|
1926
1952
|
return false;
|
|
1927
|
-
if (!equals(this.
|
|
1953
|
+
if (!equals(this.gz_1, other.gz_1))
|
|
1928
1954
|
return false;
|
|
1929
1955
|
return true;
|
|
1930
1956
|
};
|
|
1931
1957
|
function TileCoordinatesFloat(x, y, xFloat, yFloat, z) {
|
|
1932
|
-
this.
|
|
1933
|
-
this.
|
|
1934
|
-
this.
|
|
1935
|
-
this.
|
|
1936
|
-
this.
|
|
1958
|
+
this.a10_1 = x;
|
|
1959
|
+
this.b10_1 = y;
|
|
1960
|
+
this.c10_1 = xFloat;
|
|
1961
|
+
this.d10_1 = yFloat;
|
|
1962
|
+
this.e10_1 = z;
|
|
1937
1963
|
}
|
|
1938
1964
|
protoOf(TileCoordinatesFloat).toString = function () {
|
|
1939
|
-
return 'TileCoordinatesFloat(x=' + this.
|
|
1965
|
+
return 'TileCoordinatesFloat(x=' + this.a10_1 + ', y=' + this.b10_1 + ', xFloat=' + this.c10_1 + ', yFloat=' + this.d10_1 + ', z=' + this.e10_1 + ')';
|
|
1940
1966
|
};
|
|
1941
1967
|
protoOf(TileCoordinatesFloat).hashCode = function () {
|
|
1942
|
-
var result = this.
|
|
1943
|
-
result = imul(result, 31) + this.
|
|
1944
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1945
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1946
|
-
result = imul(result, 31) + this.
|
|
1968
|
+
var result = this.a10_1;
|
|
1969
|
+
result = imul(result, 31) + this.b10_1 | 0;
|
|
1970
|
+
result = imul(result, 31) + getNumberHashCode(this.c10_1) | 0;
|
|
1971
|
+
result = imul(result, 31) + getNumberHashCode(this.d10_1) | 0;
|
|
1972
|
+
result = imul(result, 31) + this.e10_1 | 0;
|
|
1947
1973
|
return result;
|
|
1948
1974
|
};
|
|
1949
1975
|
protoOf(TileCoordinatesFloat).equals = function (other) {
|
|
@@ -1951,21 +1977,21 @@
|
|
|
1951
1977
|
return true;
|
|
1952
1978
|
if (!(other instanceof TileCoordinatesFloat))
|
|
1953
1979
|
return false;
|
|
1954
|
-
if (!(this.
|
|
1980
|
+
if (!(this.a10_1 === other.a10_1))
|
|
1955
1981
|
return false;
|
|
1956
|
-
if (!(this.
|
|
1982
|
+
if (!(this.b10_1 === other.b10_1))
|
|
1957
1983
|
return false;
|
|
1958
|
-
if (!equals(this.
|
|
1984
|
+
if (!equals(this.c10_1, other.c10_1))
|
|
1959
1985
|
return false;
|
|
1960
|
-
if (!equals(this.
|
|
1986
|
+
if (!equals(this.d10_1, other.d10_1))
|
|
1961
1987
|
return false;
|
|
1962
|
-
if (!(this.
|
|
1988
|
+
if (!(this.e10_1 === other.e10_1))
|
|
1963
1989
|
return false;
|
|
1964
1990
|
return true;
|
|
1965
1991
|
};
|
|
1966
1992
|
function Companion_0() {
|
|
1967
1993
|
Companion_instance_0 = this;
|
|
1968
|
-
this.
|
|
1994
|
+
this.j14_1 = new Vector3D(0.0, 0.0, 0.0);
|
|
1969
1995
|
}
|
|
1970
1996
|
var Companion_instance_0;
|
|
1971
1997
|
function Companion_getInstance_0() {
|
|
@@ -1975,49 +2001,49 @@
|
|
|
1975
2001
|
}
|
|
1976
2002
|
function Vector3D(x, y, z) {
|
|
1977
2003
|
Companion_getInstance_0();
|
|
1978
|
-
this.
|
|
1979
|
-
this.
|
|
1980
|
-
this.
|
|
2004
|
+
this.dx_1 = x;
|
|
2005
|
+
this.ex_1 = y;
|
|
2006
|
+
this.fx_1 = z;
|
|
1981
2007
|
}
|
|
1982
|
-
protoOf(Vector3D).
|
|
1983
|
-
var tmp0 = this.
|
|
2008
|
+
protoOf(Vector3D).k14 = function (other) {
|
|
2009
|
+
var tmp0 = this.dx_1 - other.dx_1;
|
|
1984
2010
|
// Inline function 'kotlin.math.hypot' call
|
|
1985
|
-
var y = this.
|
|
2011
|
+
var y = this.ex_1 - other.ex_1;
|
|
1986
2012
|
var tmp0_0 = hypot(tmp0, y);
|
|
1987
2013
|
// Inline function 'kotlin.math.hypot' call
|
|
1988
|
-
var y_0 = this.
|
|
2014
|
+
var y_0 = this.fx_1 - other.fx_1;
|
|
1989
2015
|
return hypot(tmp0_0, y_0);
|
|
1990
2016
|
};
|
|
1991
|
-
protoOf(Vector3D).
|
|
1992
|
-
return new Vector3D(this.
|
|
2017
|
+
protoOf(Vector3D).l14 = function (other) {
|
|
2018
|
+
return new Vector3D(this.dx_1 - other.dx_1, this.ex_1 - other.ex_1, this.fx_1 - other.fx_1);
|
|
1993
2019
|
};
|
|
1994
|
-
protoOf(Vector3D).
|
|
1995
|
-
return new Vector3D(this.
|
|
2020
|
+
protoOf(Vector3D).m14 = function (other) {
|
|
2021
|
+
return new Vector3D(this.dx_1 + other.dx_1, this.ex_1 + other.ex_1, this.fx_1 + other.fx_1);
|
|
1996
2022
|
};
|
|
1997
|
-
protoOf(Vector3D).
|
|
1998
|
-
return new Vector3D(this.
|
|
2023
|
+
protoOf(Vector3D).n14 = function (scalar) {
|
|
2024
|
+
return new Vector3D(this.dx_1 * scalar, this.ex_1 * scalar, this.fx_1 * scalar);
|
|
1999
2025
|
};
|
|
2000
|
-
protoOf(Vector3D).
|
|
2001
|
-
return this.
|
|
2026
|
+
protoOf(Vector3D).o14 = function (other) {
|
|
2027
|
+
return this.dx_1 * other.dx_1 + this.ex_1 * other.ex_1 + this.fx_1 * other.fx_1;
|
|
2002
2028
|
};
|
|
2003
|
-
protoOf(Vector3D).
|
|
2004
|
-
var segmentVector = segmentEnd.
|
|
2005
|
-
var segmentLengthSq = segmentVector.
|
|
2029
|
+
protoOf(Vector3D).gx = function (segmentStart, segmentEnd) {
|
|
2030
|
+
var segmentVector = segmentEnd.l14(segmentStart);
|
|
2031
|
+
var segmentLengthSq = segmentVector.o14(segmentVector);
|
|
2006
2032
|
if (segmentLengthSq === 0.0)
|
|
2007
|
-
return this.
|
|
2008
|
-
var pointVector = this.
|
|
2009
|
-
var projection = pointVector.
|
|
2033
|
+
return this.k14(segmentStart);
|
|
2034
|
+
var pointVector = this.l14(segmentStart);
|
|
2035
|
+
var projection = pointVector.o14(segmentVector) / segmentLengthSq;
|
|
2010
2036
|
var clamped = coerceIn_0(projection, 0.0, 1.0);
|
|
2011
|
-
var closest = segmentStart.
|
|
2012
|
-
return this.
|
|
2037
|
+
var closest = segmentStart.m14(segmentVector.n14(clamped));
|
|
2038
|
+
return this.k14(closest);
|
|
2013
2039
|
};
|
|
2014
2040
|
protoOf(Vector3D).toString = function () {
|
|
2015
|
-
return 'Vector3D(x=' + this.
|
|
2041
|
+
return 'Vector3D(x=' + this.dx_1 + ', y=' + this.ex_1 + ', z=' + this.fx_1 + ')';
|
|
2016
2042
|
};
|
|
2017
2043
|
protoOf(Vector3D).hashCode = function () {
|
|
2018
|
-
var result = getNumberHashCode(this.
|
|
2019
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2020
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2044
|
+
var result = getNumberHashCode(this.dx_1);
|
|
2045
|
+
result = imul(result, 31) + getNumberHashCode(this.ex_1) | 0;
|
|
2046
|
+
result = imul(result, 31) + getNumberHashCode(this.fx_1) | 0;
|
|
2021
2047
|
return result;
|
|
2022
2048
|
};
|
|
2023
2049
|
protoOf(Vector3D).equals = function (other) {
|
|
@@ -2025,24 +2051,24 @@
|
|
|
2025
2051
|
return true;
|
|
2026
2052
|
if (!(other instanceof Vector3D))
|
|
2027
2053
|
return false;
|
|
2028
|
-
if (!equals(this.
|
|
2054
|
+
if (!equals(this.dx_1, other.dx_1))
|
|
2029
2055
|
return false;
|
|
2030
|
-
if (!equals(this.
|
|
2056
|
+
if (!equals(this.ex_1, other.ex_1))
|
|
2031
2057
|
return false;
|
|
2032
|
-
if (!equals(this.
|
|
2058
|
+
if (!equals(this.fx_1, other.fx_1))
|
|
2033
2059
|
return false;
|
|
2034
2060
|
return true;
|
|
2035
2061
|
};
|
|
2036
2062
|
function newElevationProvider(configDto) {
|
|
2037
2063
|
var defaults = new ElevationProviderConfig();
|
|
2038
2064
|
var tmp1_elvis_lhs = configDto == null ? null : configDto.zoomLevel;
|
|
2039
|
-
var tmp = tmp1_elvis_lhs == null ? defaults.
|
|
2065
|
+
var tmp = tmp1_elvis_lhs == null ? defaults.n10_1 : tmp1_elvis_lhs;
|
|
2040
2066
|
var tmp3_elvis_lhs = configDto == null ? null : configDto.cacheSize;
|
|
2041
|
-
var tmp_0 = tmp3_elvis_lhs == null ? defaults.
|
|
2067
|
+
var tmp_0 = tmp3_elvis_lhs == null ? defaults.o10_1 : tmp3_elvis_lhs;
|
|
2042
2068
|
var tmp5_elvis_lhs = configDto == null ? null : configDto.tileUrlTemplate;
|
|
2043
|
-
var tmp_1 = tmp5_elvis_lhs == null ? defaults.
|
|
2069
|
+
var tmp_1 = tmp5_elvis_lhs == null ? defaults.p10_1 : tmp5_elvis_lhs;
|
|
2044
2070
|
var tmp7_elvis_lhs = configDto == null ? null : configDto.tileSize;
|
|
2045
|
-
var cfg = new ElevationProviderConfig(tmp, tmp_0, tmp_1, tmp7_elvis_lhs == null ? defaults.
|
|
2071
|
+
var cfg = new ElevationProviderConfig(tmp, tmp_0, tmp_1, tmp7_elvis_lhs == null ? defaults.q10_1 : tmp7_elvis_lhs, defaults.r10_1);
|
|
2046
2072
|
return new ElevationProvider(cfg);
|
|
2047
2073
|
}
|
|
2048
2074
|
function getElevation(provider, latitude, longitude, interpolation) {
|
|
@@ -2068,31 +2094,31 @@
|
|
|
2068
2094
|
return o;
|
|
2069
2095
|
}
|
|
2070
2096
|
function getElevation$slambda($provider, $latitude, $longitude, $interpolation, resultContinuation) {
|
|
2071
|
-
this.
|
|
2072
|
-
this.
|
|
2073
|
-
this.
|
|
2074
|
-
this.
|
|
2097
|
+
this.x14_1 = $provider;
|
|
2098
|
+
this.y14_1 = $latitude;
|
|
2099
|
+
this.z14_1 = $longitude;
|
|
2100
|
+
this.a15_1 = $interpolation;
|
|
2075
2101
|
CoroutineImpl.call(this, resultContinuation);
|
|
2076
2102
|
}
|
|
2077
|
-
protoOf(getElevation$slambda).
|
|
2078
|
-
var tmp = this.
|
|
2079
|
-
tmp.
|
|
2080
|
-
tmp.
|
|
2081
|
-
return tmp.
|
|
2103
|
+
protoOf(getElevation$slambda).c15 = function ($this$promise, $completion) {
|
|
2104
|
+
var tmp = this.n11($this$promise, $completion);
|
|
2105
|
+
tmp.j6_1 = Unit_instance;
|
|
2106
|
+
tmp.k6_1 = null;
|
|
2107
|
+
return tmp.p6();
|
|
2082
2108
|
};
|
|
2083
|
-
protoOf(getElevation$slambda).
|
|
2084
|
-
return this.
|
|
2109
|
+
protoOf(getElevation$slambda).x6 = function (p1, $completion) {
|
|
2110
|
+
return this.c15((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2085
2111
|
};
|
|
2086
|
-
protoOf(getElevation$slambda).
|
|
2087
|
-
var suspendResult = this.
|
|
2112
|
+
protoOf(getElevation$slambda).p6 = function () {
|
|
2113
|
+
var suspendResult = this.j6_1;
|
|
2088
2114
|
$sm: do
|
|
2089
2115
|
try {
|
|
2090
|
-
var tmp = this.
|
|
2116
|
+
var tmp = this.h6_1;
|
|
2091
2117
|
switch (tmp) {
|
|
2092
2118
|
case 0:
|
|
2093
|
-
this.
|
|
2094
|
-
this.
|
|
2095
|
-
suspendResult = this.
|
|
2119
|
+
this.i6_1 = 2;
|
|
2120
|
+
this.h6_1 = 1;
|
|
2121
|
+
suspendResult = this.x14_1.s10(this.y14_1, this.z14_1, this.a15_1, this);
|
|
2096
2122
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2097
2123
|
return suspendResult;
|
|
2098
2124
|
}
|
|
@@ -2101,80 +2127,80 @@
|
|
|
2101
2127
|
case 1:
|
|
2102
2128
|
return suspendResult;
|
|
2103
2129
|
case 2:
|
|
2104
|
-
throw this.
|
|
2130
|
+
throw this.k6_1;
|
|
2105
2131
|
}
|
|
2106
2132
|
} catch ($p) {
|
|
2107
2133
|
var e = $p;
|
|
2108
|
-
if (this.
|
|
2134
|
+
if (this.i6_1 === 2) {
|
|
2109
2135
|
throw e;
|
|
2110
2136
|
} else {
|
|
2111
|
-
this.
|
|
2112
|
-
this.
|
|
2137
|
+
this.h6_1 = this.i6_1;
|
|
2138
|
+
this.k6_1 = e;
|
|
2113
2139
|
}
|
|
2114
2140
|
}
|
|
2115
2141
|
while (true);
|
|
2116
2142
|
};
|
|
2117
|
-
protoOf(getElevation$slambda).
|
|
2118
|
-
var i = new getElevation$slambda(this.
|
|
2119
|
-
i.
|
|
2143
|
+
protoOf(getElevation$slambda).n11 = function ($this$promise, completion) {
|
|
2144
|
+
var i = new getElevation$slambda(this.x14_1, this.y14_1, this.z14_1, this.a15_1, completion);
|
|
2145
|
+
i.b15_1 = $this$promise;
|
|
2120
2146
|
return i;
|
|
2121
2147
|
};
|
|
2122
2148
|
function getElevation$slambda_0($provider, $latitude, $longitude, $interpolation, resultContinuation) {
|
|
2123
2149
|
var i = new getElevation$slambda($provider, $latitude, $longitude, $interpolation, resultContinuation);
|
|
2124
2150
|
return constructCallableReference(function ($this$promise, $completion) {
|
|
2125
|
-
return i.
|
|
2151
|
+
return i.c15($this$promise, $completion);
|
|
2126
2152
|
}, 1);
|
|
2127
2153
|
}
|
|
2128
2154
|
function getElevationsAlong$slambda($path, $provider, $options, resultContinuation) {
|
|
2129
|
-
this.
|
|
2130
|
-
this.
|
|
2131
|
-
this.
|
|
2155
|
+
this.l15_1 = $path;
|
|
2156
|
+
this.m15_1 = $provider;
|
|
2157
|
+
this.n15_1 = $options;
|
|
2132
2158
|
CoroutineImpl.call(this, resultContinuation);
|
|
2133
2159
|
}
|
|
2134
|
-
protoOf(getElevationsAlong$slambda).
|
|
2135
|
-
var tmp = this.
|
|
2136
|
-
tmp.
|
|
2137
|
-
tmp.
|
|
2138
|
-
return tmp.
|
|
2160
|
+
protoOf(getElevationsAlong$slambda).p15 = function ($this$promise, $completion) {
|
|
2161
|
+
var tmp = this.n11($this$promise, $completion);
|
|
2162
|
+
tmp.j6_1 = Unit_instance;
|
|
2163
|
+
tmp.k6_1 = null;
|
|
2164
|
+
return tmp.p6();
|
|
2139
2165
|
};
|
|
2140
|
-
protoOf(getElevationsAlong$slambda).
|
|
2141
|
-
return this.
|
|
2166
|
+
protoOf(getElevationsAlong$slambda).x6 = function (p1, $completion) {
|
|
2167
|
+
return this.p15((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2142
2168
|
};
|
|
2143
|
-
protoOf(getElevationsAlong$slambda).
|
|
2144
|
-
var suspendResult = this.
|
|
2169
|
+
protoOf(getElevationsAlong$slambda).p6 = function () {
|
|
2170
|
+
var suspendResult = this.j6_1;
|
|
2145
2171
|
$sm: do
|
|
2146
2172
|
try {
|
|
2147
|
-
var tmp = this.
|
|
2173
|
+
var tmp = this.h6_1;
|
|
2148
2174
|
switch (tmp) {
|
|
2149
2175
|
case 0:
|
|
2150
|
-
this.
|
|
2151
|
-
var this_0 = this.
|
|
2176
|
+
this.i6_1 = 2;
|
|
2177
|
+
var this_0 = this.l15_1;
|
|
2152
2178
|
var destination = ArrayList_init_$Create$_0(this_0.length);
|
|
2153
2179
|
var inductionVariable = 0;
|
|
2154
2180
|
var last = this_0.length;
|
|
2155
2181
|
while (inductionVariable < last) {
|
|
2156
2182
|
var item = this_0[inductionVariable];
|
|
2157
2183
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2158
|
-
destination.
|
|
2184
|
+
destination.h(new LatLon(item.latitude, item.longitude));
|
|
2159
2185
|
}
|
|
2160
2186
|
|
|
2161
2187
|
var coords = destination;
|
|
2162
|
-
this.
|
|
2163
|
-
var tmp0_safe_receiver = this.
|
|
2188
|
+
this.h6_1 = 1;
|
|
2189
|
+
var tmp0_safe_receiver = this.n15_1;
|
|
2164
2190
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.step;
|
|
2165
2191
|
var tmp_0 = tmp1_elvis_lhs == null ? 10.0 : tmp1_elvis_lhs;
|
|
2166
|
-
var tmp2_safe_receiver = this.
|
|
2192
|
+
var tmp2_safe_receiver = this.n15_1;
|
|
2167
2193
|
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.minDistance;
|
|
2168
2194
|
var tmp_1 = tmp3_elvis_lhs == null ? 1.0 : tmp3_elvis_lhs;
|
|
2169
|
-
var tmp4_safe_receiver = this.
|
|
2195
|
+
var tmp4_safe_receiver = this.n15_1;
|
|
2170
2196
|
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.interpolation;
|
|
2171
2197
|
var tmp_2 = tmp5_elvis_lhs == null ? true : tmp5_elvis_lhs;
|
|
2172
|
-
var tmp6_safe_receiver = this.
|
|
2198
|
+
var tmp6_safe_receiver = this.n15_1;
|
|
2173
2199
|
var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.smoothingOptions;
|
|
2174
2200
|
var tmp_3 = tmp7_safe_receiver == null ? null : toKotlin(tmp7_safe_receiver);
|
|
2175
|
-
var tmp8_safe_receiver = this.
|
|
2201
|
+
var tmp8_safe_receiver = this.n15_1;
|
|
2176
2202
|
var tmp9_safe_receiver = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.filterOptions;
|
|
2177
|
-
suspendResult = this.
|
|
2203
|
+
suspendResult = this.m15_1.v10(coords, tmp_0, tmp_1, tmp_2, tmp_3, tmp9_safe_receiver == null ? null : toKotlin_0(tmp9_safe_receiver), this);
|
|
2178
2204
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2179
2205
|
return suspendResult;
|
|
2180
2206
|
}
|
|
@@ -2183,39 +2209,39 @@
|
|
|
2183
2209
|
case 1:
|
|
2184
2210
|
var results = suspendResult;
|
|
2185
2211
|
var tmp_4 = 0;
|
|
2186
|
-
var tmp_5 = results.
|
|
2212
|
+
var tmp_5 = results.l();
|
|
2187
2213
|
var tmp_6 = Array(tmp_5);
|
|
2188
2214
|
while (tmp_4 < tmp_5) {
|
|
2189
2215
|
var tmp_7 = tmp_4;
|
|
2190
|
-
var c = results.
|
|
2191
|
-
tmp_6[tmp_7] = coordsEle(c.
|
|
2216
|
+
var c = results.m(tmp_7);
|
|
2217
|
+
tmp_6[tmp_7] = coordsEle(c.av(), c.bv(), c.yw());
|
|
2192
2218
|
tmp_4 = tmp_4 + 1 | 0;
|
|
2193
2219
|
}
|
|
2194
2220
|
|
|
2195
2221
|
return tmp_6;
|
|
2196
2222
|
case 2:
|
|
2197
|
-
throw this.
|
|
2223
|
+
throw this.k6_1;
|
|
2198
2224
|
}
|
|
2199
2225
|
} catch ($p) {
|
|
2200
2226
|
var e = $p;
|
|
2201
|
-
if (this.
|
|
2227
|
+
if (this.i6_1 === 2) {
|
|
2202
2228
|
throw e;
|
|
2203
2229
|
} else {
|
|
2204
|
-
this.
|
|
2205
|
-
this.
|
|
2230
|
+
this.h6_1 = this.i6_1;
|
|
2231
|
+
this.k6_1 = e;
|
|
2206
2232
|
}
|
|
2207
2233
|
}
|
|
2208
2234
|
while (true);
|
|
2209
2235
|
};
|
|
2210
|
-
protoOf(getElevationsAlong$slambda).
|
|
2211
|
-
var i = new getElevationsAlong$slambda(this.
|
|
2212
|
-
i.
|
|
2236
|
+
protoOf(getElevationsAlong$slambda).n11 = function ($this$promise, completion) {
|
|
2237
|
+
var i = new getElevationsAlong$slambda(this.l15_1, this.m15_1, this.n15_1, completion);
|
|
2238
|
+
i.o15_1 = $this$promise;
|
|
2213
2239
|
return i;
|
|
2214
2240
|
};
|
|
2215
2241
|
function getElevationsAlong$slambda_0($path, $provider, $options, resultContinuation) {
|
|
2216
2242
|
var i = new getElevationsAlong$slambda($path, $provider, $options, resultContinuation);
|
|
2217
2243
|
return constructCallableReference(function ($this$promise, $completion) {
|
|
2218
|
-
return i.
|
|
2244
|
+
return i.p15($this$promise, $completion);
|
|
2219
2245
|
}, 1);
|
|
2220
2246
|
}
|
|
2221
2247
|
function get_isNode() {
|
|
@@ -2229,26 +2255,26 @@
|
|
|
2229
2255
|
var tmp = KProperty0;
|
|
2230
2256
|
// Inline function 'kotlin.getValue' call
|
|
2231
2257
|
getPropertyCallableRef('nodeWebpDecoderPromise', 0, tmp, _get_nodeWebpDecoderPromise_$ref_s562t(), null);
|
|
2232
|
-
return tmp0.
|
|
2258
|
+
return tmp0.i1();
|
|
2233
2259
|
}
|
|
2234
2260
|
var nodeWebpDecoderPromise$delegate;
|
|
2235
2261
|
function fetchAndDecodeTile(url, $completion) {
|
|
2236
2262
|
var tmp = new $fetchAndDecodeTileCOROUTINE$(url, $completion);
|
|
2237
|
-
tmp.
|
|
2238
|
-
tmp.
|
|
2239
|
-
return tmp.
|
|
2263
|
+
tmp.j6_1 = Unit_instance;
|
|
2264
|
+
tmp.k6_1 = null;
|
|
2265
|
+
return tmp.p6();
|
|
2240
2266
|
}
|
|
2241
2267
|
function decodeNode(url, $completion) {
|
|
2242
2268
|
var tmp = new $decodeNodeCOROUTINE$(url, $completion);
|
|
2243
|
-
tmp.
|
|
2244
|
-
tmp.
|
|
2245
|
-
return tmp.
|
|
2269
|
+
tmp.j6_1 = Unit_instance;
|
|
2270
|
+
tmp.k6_1 = null;
|
|
2271
|
+
return tmp.p6();
|
|
2246
2272
|
}
|
|
2247
2273
|
function decodeBrowser(url, $completion) {
|
|
2248
2274
|
var tmp = new $decodeBrowserCOROUTINE$(url, $completion);
|
|
2249
|
-
tmp.
|
|
2250
|
-
tmp.
|
|
2251
|
-
return tmp.
|
|
2275
|
+
tmp.j6_1 = Unit_instance;
|
|
2276
|
+
tmp.k6_1 = null;
|
|
2277
|
+
return tmp.p6();
|
|
2252
2278
|
}
|
|
2253
2279
|
function fetchUrlNode(url) {
|
|
2254
2280
|
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
@@ -2262,9 +2288,9 @@
|
|
|
2262
2288
|
}
|
|
2263
2289
|
function decodeWebpNode(buffer, $completion) {
|
|
2264
2290
|
var tmp = new $decodeWebpNodeCOROUTINE$(buffer, $completion);
|
|
2265
|
-
tmp.
|
|
2266
|
-
tmp.
|
|
2267
|
-
return tmp.
|
|
2291
|
+
tmp.j6_1 = Unit_instance;
|
|
2292
|
+
tmp.k6_1 = null;
|
|
2293
|
+
return tmp.p6();
|
|
2268
2294
|
}
|
|
2269
2295
|
function fetchUrlBrowser(url) {
|
|
2270
2296
|
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
@@ -2296,26 +2322,26 @@
|
|
|
2296
2322
|
}
|
|
2297
2323
|
function $fetchAndDecodeTileCOROUTINE$(url, resultContinuation) {
|
|
2298
2324
|
CoroutineImpl.call(this, resultContinuation);
|
|
2299
|
-
this.
|
|
2325
|
+
this.y15_1 = url;
|
|
2300
2326
|
}
|
|
2301
|
-
protoOf($fetchAndDecodeTileCOROUTINE$).
|
|
2302
|
-
var suspendResult = this.
|
|
2327
|
+
protoOf($fetchAndDecodeTileCOROUTINE$).p6 = function () {
|
|
2328
|
+
var suspendResult = this.j6_1;
|
|
2303
2329
|
$sm: do
|
|
2304
2330
|
try {
|
|
2305
|
-
var tmp = this.
|
|
2331
|
+
var tmp = this.h6_1;
|
|
2306
2332
|
switch (tmp) {
|
|
2307
2333
|
case 0:
|
|
2308
|
-
this.
|
|
2334
|
+
this.i6_1 = 4;
|
|
2309
2335
|
if (get_isNode()) {
|
|
2310
|
-
this.
|
|
2311
|
-
suspendResult = decodeNode(this.
|
|
2336
|
+
this.h6_1 = 2;
|
|
2337
|
+
suspendResult = decodeNode(this.y15_1, this);
|
|
2312
2338
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2313
2339
|
return suspendResult;
|
|
2314
2340
|
}
|
|
2315
2341
|
continue $sm;
|
|
2316
2342
|
} else {
|
|
2317
|
-
this.
|
|
2318
|
-
suspendResult = decodeBrowser(this.
|
|
2343
|
+
this.h6_1 = 1;
|
|
2344
|
+
suspendResult = decodeBrowser(this.y15_1, this);
|
|
2319
2345
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2320
2346
|
return suspendResult;
|
|
2321
2347
|
}
|
|
@@ -2323,43 +2349,43 @@
|
|
|
2323
2349
|
}
|
|
2324
2350
|
|
|
2325
2351
|
case 1:
|
|
2326
|
-
this.
|
|
2327
|
-
this.
|
|
2352
|
+
this.z15_1 = suspendResult;
|
|
2353
|
+
this.h6_1 = 3;
|
|
2328
2354
|
continue $sm;
|
|
2329
2355
|
case 2:
|
|
2330
|
-
this.
|
|
2331
|
-
this.
|
|
2356
|
+
this.z15_1 = suspendResult;
|
|
2357
|
+
this.h6_1 = 3;
|
|
2332
2358
|
continue $sm;
|
|
2333
2359
|
case 3:
|
|
2334
|
-
return this.
|
|
2360
|
+
return this.z15_1;
|
|
2335
2361
|
case 4:
|
|
2336
|
-
throw this.
|
|
2362
|
+
throw this.k6_1;
|
|
2337
2363
|
}
|
|
2338
2364
|
} catch ($p) {
|
|
2339
2365
|
var e = $p;
|
|
2340
|
-
if (this.
|
|
2366
|
+
if (this.i6_1 === 4) {
|
|
2341
2367
|
throw e;
|
|
2342
2368
|
} else {
|
|
2343
|
-
this.
|
|
2344
|
-
this.
|
|
2369
|
+
this.h6_1 = this.i6_1;
|
|
2370
|
+
this.k6_1 = e;
|
|
2345
2371
|
}
|
|
2346
2372
|
}
|
|
2347
2373
|
while (true);
|
|
2348
2374
|
};
|
|
2349
2375
|
function $decodeNodeCOROUTINE$(url, resultContinuation) {
|
|
2350
2376
|
CoroutineImpl.call(this, resultContinuation);
|
|
2351
|
-
this.
|
|
2377
|
+
this.i16_1 = url;
|
|
2352
2378
|
}
|
|
2353
|
-
protoOf($decodeNodeCOROUTINE$).
|
|
2354
|
-
var suspendResult = this.
|
|
2379
|
+
protoOf($decodeNodeCOROUTINE$).p6 = function () {
|
|
2380
|
+
var suspendResult = this.j6_1;
|
|
2355
2381
|
$sm: do
|
|
2356
2382
|
try {
|
|
2357
|
-
var tmp = this.
|
|
2383
|
+
var tmp = this.h6_1;
|
|
2358
2384
|
switch (tmp) {
|
|
2359
2385
|
case 0:
|
|
2360
|
-
this.
|
|
2361
|
-
this.
|
|
2362
|
-
suspendResult = await_0(fetchUrlNode(this.
|
|
2386
|
+
this.i6_1 = 4;
|
|
2387
|
+
this.h6_1 = 1;
|
|
2388
|
+
suspendResult = await_0(fetchUrlNode(this.i16_1), this);
|
|
2363
2389
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2364
2390
|
return suspendResult;
|
|
2365
2391
|
}
|
|
@@ -2368,11 +2394,11 @@
|
|
|
2368
2394
|
case 1:
|
|
2369
2395
|
var res = suspendResult;
|
|
2370
2396
|
if (!res.ok) {
|
|
2371
|
-
var message = 'Tile fetch failed for ' + this.
|
|
2397
|
+
var message = 'Tile fetch failed for ' + this.i16_1 + ': HTTP ' + res.status;
|
|
2372
2398
|
throw IllegalStateException_init_$Create$_0(toString(message));
|
|
2373
2399
|
}
|
|
2374
2400
|
|
|
2375
|
-
this.
|
|
2401
|
+
this.h6_1 = 2;
|
|
2376
2402
|
suspendResult = await_0(responseArrayBuffer(res), this);
|
|
2377
2403
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2378
2404
|
return suspendResult;
|
|
@@ -2381,7 +2407,7 @@
|
|
|
2381
2407
|
continue $sm;
|
|
2382
2408
|
case 2:
|
|
2383
2409
|
var ab = suspendResult;
|
|
2384
|
-
this.
|
|
2410
|
+
this.h6_1 = 3;
|
|
2385
2411
|
suspendResult = decodeWebpNode(ab, this);
|
|
2386
2412
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2387
2413
|
return suspendResult;
|
|
@@ -2403,33 +2429,33 @@
|
|
|
2403
2429
|
var rgba = int8;
|
|
2404
2430
|
return new RawTile(width, height, rgba);
|
|
2405
2431
|
case 4:
|
|
2406
|
-
throw this.
|
|
2432
|
+
throw this.k6_1;
|
|
2407
2433
|
}
|
|
2408
2434
|
} catch ($p) {
|
|
2409
2435
|
var e = $p;
|
|
2410
|
-
if (this.
|
|
2436
|
+
if (this.i6_1 === 4) {
|
|
2411
2437
|
throw e;
|
|
2412
2438
|
} else {
|
|
2413
|
-
this.
|
|
2414
|
-
this.
|
|
2439
|
+
this.h6_1 = this.i6_1;
|
|
2440
|
+
this.k6_1 = e;
|
|
2415
2441
|
}
|
|
2416
2442
|
}
|
|
2417
2443
|
while (true);
|
|
2418
2444
|
};
|
|
2419
2445
|
function $decodeBrowserCOROUTINE$(url, resultContinuation) {
|
|
2420
2446
|
CoroutineImpl.call(this, resultContinuation);
|
|
2421
|
-
this.
|
|
2447
|
+
this.r16_1 = url;
|
|
2422
2448
|
}
|
|
2423
|
-
protoOf($decodeBrowserCOROUTINE$).
|
|
2424
|
-
var suspendResult = this.
|
|
2449
|
+
protoOf($decodeBrowserCOROUTINE$).p6 = function () {
|
|
2450
|
+
var suspendResult = this.j6_1;
|
|
2425
2451
|
$sm: do
|
|
2426
2452
|
try {
|
|
2427
|
-
var tmp = this.
|
|
2453
|
+
var tmp = this.h6_1;
|
|
2428
2454
|
switch (tmp) {
|
|
2429
2455
|
case 0:
|
|
2430
|
-
this.
|
|
2431
|
-
this.
|
|
2432
|
-
suspendResult = await_0(fetchUrlBrowser(this.
|
|
2456
|
+
this.i6_1 = 4;
|
|
2457
|
+
this.h6_1 = 1;
|
|
2458
|
+
suspendResult = await_0(fetchUrlBrowser(this.r16_1), this);
|
|
2433
2459
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2434
2460
|
return suspendResult;
|
|
2435
2461
|
}
|
|
@@ -2438,11 +2464,11 @@
|
|
|
2438
2464
|
case 1:
|
|
2439
2465
|
var res = suspendResult;
|
|
2440
2466
|
if (!res.ok) {
|
|
2441
|
-
var message = 'Tile fetch failed for ' + this.
|
|
2467
|
+
var message = 'Tile fetch failed for ' + this.r16_1 + ': HTTP ' + res.status;
|
|
2442
2468
|
throw IllegalStateException_init_$Create$_0(toString(message));
|
|
2443
2469
|
}
|
|
2444
2470
|
|
|
2445
|
-
this.
|
|
2471
|
+
this.h6_1 = 2;
|
|
2446
2472
|
suspendResult = await_0(res.blob(), this);
|
|
2447
2473
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2448
2474
|
return suspendResult;
|
|
@@ -2451,7 +2477,7 @@
|
|
|
2451
2477
|
continue $sm;
|
|
2452
2478
|
case 2:
|
|
2453
2479
|
var blob = suspendResult;
|
|
2454
|
-
this.
|
|
2480
|
+
this.h6_1 = 3;
|
|
2455
2481
|
suspendResult = await_0(window.createImageBitmap(blob), this);
|
|
2456
2482
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2457
2483
|
return suspendResult;
|
|
@@ -2494,32 +2520,32 @@
|
|
|
2494
2520
|
bitmap.close();
|
|
2495
2521
|
return Unit_instance;
|
|
2496
2522
|
case 4:
|
|
2497
|
-
throw this.
|
|
2523
|
+
throw this.k6_1;
|
|
2498
2524
|
}
|
|
2499
2525
|
} catch ($p_0) {
|
|
2500
2526
|
var e = $p_0;
|
|
2501
|
-
if (this.
|
|
2527
|
+
if (this.i6_1 === 4) {
|
|
2502
2528
|
throw e;
|
|
2503
2529
|
} else {
|
|
2504
|
-
this.
|
|
2505
|
-
this.
|
|
2530
|
+
this.h6_1 = this.i6_1;
|
|
2531
|
+
this.k6_1 = e;
|
|
2506
2532
|
}
|
|
2507
2533
|
}
|
|
2508
2534
|
while (true);
|
|
2509
2535
|
};
|
|
2510
2536
|
function $decodeWebpNodeCOROUTINE$(buffer, resultContinuation) {
|
|
2511
2537
|
CoroutineImpl.call(this, resultContinuation);
|
|
2512
|
-
this.
|
|
2538
|
+
this.a17_1 = buffer;
|
|
2513
2539
|
}
|
|
2514
|
-
protoOf($decodeWebpNodeCOROUTINE$).
|
|
2515
|
-
var suspendResult = this.
|
|
2540
|
+
protoOf($decodeWebpNodeCOROUTINE$).p6 = function () {
|
|
2541
|
+
var suspendResult = this.j6_1;
|
|
2516
2542
|
$sm: do
|
|
2517
2543
|
try {
|
|
2518
|
-
var tmp = this.
|
|
2544
|
+
var tmp = this.h6_1;
|
|
2519
2545
|
switch (tmp) {
|
|
2520
2546
|
case 0:
|
|
2521
|
-
this.
|
|
2522
|
-
this.
|
|
2547
|
+
this.i6_1 = 3;
|
|
2548
|
+
this.h6_1 = 1;
|
|
2523
2549
|
suspendResult = await_0(get_nodeWebpDecoderPromise(), this);
|
|
2524
2550
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2525
2551
|
return suspendResult;
|
|
@@ -2528,8 +2554,8 @@
|
|
|
2528
2554
|
continue $sm;
|
|
2529
2555
|
case 1:
|
|
2530
2556
|
var decode = suspendResult;
|
|
2531
|
-
var resultPromise = decode(this.
|
|
2532
|
-
this.
|
|
2557
|
+
var resultPromise = decode(this.a17_1);
|
|
2558
|
+
this.h6_1 = 2;
|
|
2533
2559
|
suspendResult = await_0(resultPromise, this);
|
|
2534
2560
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2535
2561
|
return suspendResult;
|
|
@@ -2539,15 +2565,15 @@
|
|
|
2539
2565
|
case 2:
|
|
2540
2566
|
return suspendResult;
|
|
2541
2567
|
case 3:
|
|
2542
|
-
throw this.
|
|
2568
|
+
throw this.k6_1;
|
|
2543
2569
|
}
|
|
2544
2570
|
} catch ($p) {
|
|
2545
2571
|
var e = $p;
|
|
2546
|
-
if (this.
|
|
2572
|
+
if (this.i6_1 === 3) {
|
|
2547
2573
|
throw e;
|
|
2548
2574
|
} else {
|
|
2549
|
-
this.
|
|
2550
|
-
this.
|
|
2575
|
+
this.h6_1 = this.i6_1;
|
|
2576
|
+
this.k6_1 = e;
|
|
2551
2577
|
}
|
|
2552
2578
|
}
|
|
2553
2579
|
while (true);
|
|
@@ -2564,7 +2590,7 @@
|
|
|
2564
2590
|
function fetchAndDecodeTile$ref_1() {
|
|
2565
2591
|
var i = new fetchAndDecodeTile$ref();
|
|
2566
2592
|
return constructCallableReference(function (p0, $completion) {
|
|
2567
|
-
return i.
|
|
2593
|
+
return i.i10(p0, $completion);
|
|
2568
2594
|
}, 1, 1, 2, 'fetchAndDecodeTile');
|
|
2569
2595
|
}
|
|
2570
2596
|
//region block: init
|
|
@@ -2596,6 +2622,7 @@
|
|
|
2596
2622
|
_.$_$.e = ElevationProvider;
|
|
2597
2623
|
_.$_$.f = LatLonElevation;
|
|
2598
2624
|
_.$_$.g = LatLon;
|
|
2625
|
+
_.$_$.h = Vector3D;
|
|
2599
2626
|
//endregion
|
|
2600
2627
|
return _;
|
|
2601
2628
|
}));
|