@glandais/vcyclist-engine 3.0.0 → 3.1.1

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.
@@ -18,68 +18,68 @@
18
18
  var imul = Math.imul;
19
19
  var hypot = Math.hypot;
20
20
  var VOID = kotlin_kotlin.$_$.a;
21
- var protoOf = kotlin_kotlin.$_$.a6;
22
- var getNumberHashCode = kotlin_kotlin.$_$.h5;
23
- var getBooleanHashCode = kotlin_kotlin.$_$.g5;
24
- var equals = kotlin_kotlin.$_$.f5;
25
- var initMetadataForClass = kotlin_kotlin.$_$.l5;
26
- var numberToLong = kotlin_kotlin.$_$.s4;
27
- var toNumber = kotlin_kotlin.$_$.u4;
28
- var CoroutineImpl = kotlin_kotlin.$_$.f4;
29
- var Unit_instance = kotlin_kotlin.$_$.t;
30
- var THROW_CCE = kotlin_kotlin.$_$.i8;
31
- var MutableEntry = kotlin_kotlin.$_$.d2;
32
- var isInterface = kotlin_kotlin.$_$.t5;
33
- var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.q3;
34
- var initMetadataForLambda = kotlin_kotlin.$_$.q5;
35
- var constructCallableReference = kotlin_kotlin.$_$.d5;
36
- 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.$_$.l3;
40
- var KtList = kotlin_kotlin.$_$.a2;
41
- var initMetadataForCoroutine = kotlin_kotlin.$_$.n5;
42
- var toString = kotlin_kotlin.$_$.c6;
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.$_$.y5;
47
- var initMetadataForObject = kotlin_kotlin.$_$.r5;
48
- var toList_0 = kotlin_kotlin.$_$.k3;
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.$_$.k6;
55
- var KFunctionImpl = kotlin_kotlin.$_$.o6;
56
- var initMetadataForFunctionReference = kotlin_kotlin.$_$.o5;
57
- var getStringHashCode = kotlin_kotlin.$_$.j5;
21
+ var protoOf = kotlin_kotlin.$_$.c7;
22
+ var getNumberHashCode = kotlin_kotlin.$_$.j6;
23
+ var getBooleanHashCode = kotlin_kotlin.$_$.i6;
24
+ var equals = kotlin_kotlin.$_$.g6;
25
+ var initMetadataForClass = kotlin_kotlin.$_$.n6;
26
+ var numberToLong = kotlin_kotlin.$_$.o5;
27
+ var toNumber = kotlin_kotlin.$_$.t5;
28
+ var CoroutineImpl = kotlin_kotlin.$_$.x4;
29
+ var Unit_instance = kotlin_kotlin.$_$.g1;
30
+ var THROW_CCE = kotlin_kotlin.$_$.s9;
31
+ var MutableEntry = kotlin_kotlin.$_$.r2;
32
+ var isInterface = kotlin_kotlin.$_$.v6;
33
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.i4;
34
+ var initMetadataForLambda = kotlin_kotlin.$_$.s6;
35
+ var constructCallableReference = kotlin_kotlin.$_$.d6;
36
+ var emptyList = kotlin_kotlin.$_$.f3;
37
+ var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.p1;
38
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.j1;
39
+ var toList = kotlin_kotlin.$_$.d4;
40
+ var KtList = kotlin_kotlin.$_$.o2;
41
+ var initMetadataForCoroutine = kotlin_kotlin.$_$.p6;
42
+ var toString = kotlin_kotlin.$_$.f7;
43
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.a2;
44
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.i1;
45
+ var listOf = kotlin_kotlin.$_$.q3;
46
+ var numberToInt = kotlin_kotlin.$_$.a7;
47
+ var initMetadataForObject = kotlin_kotlin.$_$.t6;
48
+ var toList_0 = kotlin_kotlin.$_$.c4;
49
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.x2;
50
+ var get_indices = kotlin_kotlin.$_$.k3;
51
+ var get_lastIndex = kotlin_kotlin.$_$.m3;
52
+ var checkBuilderCapacity = kotlin_kotlin.$_$.v2;
53
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.d2;
54
+ var coerceIn = kotlin_kotlin.$_$.n7;
55
+ var KFunctionImpl = kotlin_kotlin.$_$.r7;
56
+ var initMetadataForFunctionReference = kotlin_kotlin.$_$.q6;
57
+ var getStringHashCode = kotlin_kotlin.$_$.l6;
58
58
  var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
59
59
  var Semaphore = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
60
60
  var async = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i;
61
61
  var awaitAll = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b;
62
62
  var coroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d;
63
63
  var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g;
64
- var KtMap = kotlin_kotlin.$_$.b2;
64
+ var KtMap = kotlin_kotlin.$_$.p2;
65
65
  var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
66
- var contentEquals = kotlin_kotlin.$_$.k2;
67
- var contentHashCode = kotlin_kotlin.$_$.l2;
68
- var objectCreate = kotlin_kotlin.$_$.z5;
69
- var round = kotlin_kotlin.$_$.f6;
70
- var initMetadataForCompanion = kotlin_kotlin.$_$.m5;
71
- var isNaN_0 = kotlin_kotlin.$_$.p8;
72
- var replace = kotlin_kotlin.$_$.k7;
73
- var coerceIn_0 = kotlin_kotlin.$_$.j6;
66
+ var contentEquals = kotlin_kotlin.$_$.y2;
67
+ var contentHashCode = kotlin_kotlin.$_$.z2;
68
+ var objectCreate = kotlin_kotlin.$_$.b7;
69
+ var round = kotlin_kotlin.$_$.i7;
70
+ var initMetadataForCompanion = kotlin_kotlin.$_$.o6;
71
+ var isNaN_0 = kotlin_kotlin.$_$.da;
72
+ var replace = kotlin_kotlin.$_$.p8;
73
+ var coerceIn_0 = kotlin_kotlin.$_$.m7;
74
74
  var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
75
75
  var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
76
- var KProperty0 = kotlin_kotlin.$_$.q6;
77
- var getPropertyCallableRef = kotlin_kotlin.$_$.i5;
78
- var isNumber = kotlin_kotlin.$_$.u5;
76
+ var KProperty0 = kotlin_kotlin.$_$.t7;
77
+ var getPropertyCallableRef = kotlin_kotlin.$_$.k6;
78
+ var isNumber = kotlin_kotlin.$_$.w6;
79
79
  var await_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
80
- var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.o1;
81
- var charSequenceLength = kotlin_kotlin.$_$.b5;
82
- var lazy = kotlin_kotlin.$_$.q8;
80
+ var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.c2;
81
+ var charSequenceLength = kotlin_kotlin.$_$.b6;
82
+ var lazy = kotlin_kotlin.$_$.ea;
83
83
  //endregion
84
84
  //region block: pre-declaration
85
85
  initMetadataForClass(SmoothingOptions, 'SmoothingOptions', SmoothingOptions);
@@ -132,15 +132,15 @@
132
132
  function SmoothingOptions(windowSize, enabled) {
133
133
  windowSize = windowSize === VOID ? 50.0 : windowSize;
134
134
  enabled = enabled === VOID ? false : enabled;
135
- this.yt_1 = windowSize;
136
- this.zt_1 = enabled;
135
+ this.windowSize_1 = windowSize;
136
+ this.enabled_1 = enabled;
137
137
  }
138
138
  protoOf(SmoothingOptions).toString = function () {
139
- return 'SmoothingOptions(windowSize=' + this.yt_1 + ', enabled=' + this.zt_1 + ')';
139
+ return 'SmoothingOptions(windowSize=' + this.windowSize_1 + ', enabled=' + this.enabled_1 + ')';
140
140
  };
141
141
  protoOf(SmoothingOptions).hashCode = function () {
142
- var result = this.yt_1 == null ? 0 : getNumberHashCode(this.yt_1);
143
- result = imul(result, 31) + getBooleanHashCode(this.zt_1) | 0;
142
+ var result = this.windowSize_1 == null ? 0 : getNumberHashCode(this.windowSize_1);
143
+ result = imul(result, 31) + getBooleanHashCode(this.enabled_1) | 0;
144
144
  return result;
145
145
  };
146
146
  protoOf(SmoothingOptions).equals = function (other) {
@@ -148,9 +148,9 @@
148
148
  return true;
149
149
  if (!(other instanceof SmoothingOptions))
150
150
  return false;
151
- if (!equals(this.yt_1, other.yt_1))
151
+ if (!equals(this.windowSize_1, other.windowSize_1))
152
152
  return false;
153
- if (!(this.zt_1 === other.zt_1))
153
+ if (!(this.enabled_1 === other.enabled_1))
154
154
  return false;
155
155
  return true;
156
156
  };
@@ -158,17 +158,17 @@
158
158
  tolerance = tolerance === VOID ? 10.0 : tolerance;
159
159
  zExaggeration = zExaggeration === VOID ? 3.0 : zExaggeration;
160
160
  enabled = enabled === VOID ? false : enabled;
161
- this.au_1 = tolerance;
162
- this.bu_1 = zExaggeration;
163
- this.cu_1 = enabled;
161
+ this.tolerance_1 = tolerance;
162
+ this.zExaggeration_1 = zExaggeration;
163
+ this.enabled_1 = enabled;
164
164
  }
165
165
  protoOf(FilterOptions).toString = function () {
166
- return 'FilterOptions(tolerance=' + this.au_1 + ', zExaggeration=' + this.bu_1 + ', enabled=' + this.cu_1 + ')';
166
+ return 'FilterOptions(tolerance=' + this.tolerance_1 + ', zExaggeration=' + this.zExaggeration_1 + ', enabled=' + this.enabled_1 + ')';
167
167
  };
168
168
  protoOf(FilterOptions).hashCode = function () {
169
- var result = this.au_1 == null ? 0 : getNumberHashCode(this.au_1);
170
- result = imul(result, 31) + (this.bu_1 == null ? 0 : getNumberHashCode(this.bu_1)) | 0;
171
- result = imul(result, 31) + getBooleanHashCode(this.cu_1) | 0;
169
+ var result = this.tolerance_1 == null ? 0 : getNumberHashCode(this.tolerance_1);
170
+ result = imul(result, 31) + (this.zExaggeration_1 == null ? 0 : getNumberHashCode(this.zExaggeration_1)) | 0;
171
+ result = imul(result, 31) + getBooleanHashCode(this.enabled_1) | 0;
172
172
  return result;
173
173
  };
174
174
  protoOf(FilterOptions).equals = function (other) {
@@ -176,11 +176,11 @@
176
176
  return true;
177
177
  if (!(other instanceof FilterOptions))
178
178
  return false;
179
- if (!equals(this.au_1, other.au_1))
179
+ if (!equals(this.tolerance_1, other.tolerance_1))
180
180
  return false;
181
- if (!equals(this.bu_1, other.bu_1))
181
+ if (!equals(this.zExaggeration_1, other.zExaggeration_1))
182
182
  return false;
183
- if (!(this.cu_1 === other.cu_1))
183
+ if (!(this.enabled_1 === other.enabled_1))
184
184
  return false;
185
185
  return true;
186
186
  };
@@ -189,44 +189,44 @@
189
189
  return toNumber(asLong) === d ? asLong.toString() : d.toString();
190
190
  }
191
191
  function BatchCalculator$setElevations$slambda($coordinates, this$0, $zoomLevel, $interpolation, $results, resultContinuation) {
192
- this.lu_1 = $coordinates;
193
- this.mu_1 = this$0;
194
- this.nu_1 = $zoomLevel;
195
- this.ou_1 = $interpolation;
196
- this.pu_1 = $results;
192
+ this.$coordinates_1 = $coordinates;
193
+ this.this$0__1 = this$0;
194
+ this.$zoomLevel_1 = $zoomLevel;
195
+ this.$interpolation_1 = $interpolation;
196
+ this.$results_1 = $results;
197
197
  CoroutineImpl.call(this, resultContinuation);
198
198
  }
199
- protoOf(BatchCalculator$setElevations$slambda).uu = function (_destruct__k2r9zo, $completion) {
200
- var tmp = this.vu(_destruct__k2r9zo, $completion);
201
- tmp.j6_1 = Unit_instance;
202
- tmp.k6_1 = null;
203
- return tmp.p6();
199
+ protoOf(BatchCalculator$setElevations$slambda).invoke_adz50t_k$ = function (_destruct__k2r9zo, $completion) {
200
+ var tmp = this.create_83s1ov_k$(_destruct__k2r9zo, $completion);
201
+ tmp.result_1 = Unit_instance;
202
+ tmp.exception_1 = null;
203
+ return tmp.doResume_5yljmg_k$();
204
204
  };
205
- protoOf(BatchCalculator$setElevations$slambda).x6 = function (p1, $completion) {
206
- return this.uu((!(p1 == null) ? isInterface(p1, MutableEntry) : false) ? p1 : THROW_CCE(), $completion);
205
+ protoOf(BatchCalculator$setElevations$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
206
+ return this.invoke_adz50t_k$((!(p1 == null) ? isInterface(p1, MutableEntry) : false) ? p1 : THROW_CCE(), $completion);
207
207
  };
208
- protoOf(BatchCalculator$setElevations$slambda).p6 = function () {
209
- var suspendResult = this.j6_1;
208
+ protoOf(BatchCalculator$setElevations$slambda).doResume_5yljmg_k$ = function () {
209
+ var suspendResult = this.result_1;
210
210
  $sm: do
211
211
  try {
212
- var tmp = this.h6_1;
212
+ var tmp = this.state_1;
213
213
  switch (tmp) {
214
214
  case 0:
215
- this.i6_1 = 4;
216
- var indices = this.qu_1.i1();
217
- this.tu_1 = indices.i();
218
- this.h6_1 = 1;
215
+ this.exceptionState_1 = 4;
216
+ var indices = this._destruct__k2r9zo_1.get_value_j01efc_k$();
217
+ this._iterator_2_yqohr2__1 = indices.iterator_jk1svi_k$();
218
+ this.state_1 = 1;
219
219
  continue $sm;
220
220
  case 1:
221
- if (!this.tu_1.j()) {
222
- this.h6_1 = 3;
221
+ if (!this._iterator_2_yqohr2__1.hasNext_bitz1p_k$()) {
222
+ this.state_1 = 3;
223
223
  continue $sm;
224
224
  }
225
225
 
226
- this.su_1 = this.tu_1.k();
227
- this.ru_1 = this.lu_1.m(this.su_1);
228
- this.h6_1 = 2;
229
- suspendResult = this.mu_1.wu_1.zu(this.ru_1, this.nu_1, this.ou_1, this);
226
+ this.i1__1 = this._iterator_2_yqohr2__1.next_20eer_k$();
227
+ this.coord0__1 = this.$coordinates_1.get_c1px32_k$(this.i1__1);
228
+ this.state_1 = 2;
229
+ suspendResult = this.this$0__1.calculator_1.getElevation_e117b3_k$(this.coord0__1, this.$zoomLevel_1, this.$interpolation_1, this);
230
230
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
231
231
  return suspendResult;
232
232
  }
@@ -234,136 +234,136 @@
234
234
  continue $sm;
235
235
  case 2:
236
236
  var ele = suspendResult;
237
- this.pu_1[this.su_1] = new LatLonElevation(this.ru_1.av(), this.ru_1.bv(), ele);
238
- this.h6_1 = 1;
237
+ this.$results_1[this.i1__1] = new LatLonElevation(this.coord0__1.get_latitude_feukvp_k$(), this.coord0__1.get_longitude_asb1fq_k$(), ele);
238
+ this.state_1 = 1;
239
239
  continue $sm;
240
240
  case 3:
241
241
  return Unit_instance;
242
242
  case 4:
243
- throw this.k6_1;
243
+ throw this.exception_1;
244
244
  }
245
245
  } catch ($p) {
246
246
  var e = $p;
247
- if (this.i6_1 === 4) {
247
+ if (this.exceptionState_1 === 4) {
248
248
  throw e;
249
249
  } else {
250
- this.h6_1 = this.i6_1;
251
- this.k6_1 = e;
250
+ this.state_1 = this.exceptionState_1;
251
+ this.exception_1 = e;
252
252
  }
253
253
  }
254
254
  while (true);
255
255
  };
256
- protoOf(BatchCalculator$setElevations$slambda).vu = function (_destruct__k2r9zo, completion) {
257
- var i = new BatchCalculator$setElevations$slambda(this.lu_1, this.mu_1, this.nu_1, this.ou_1, this.pu_1, completion);
258
- i.qu_1 = _destruct__k2r9zo;
256
+ protoOf(BatchCalculator$setElevations$slambda).create_83s1ov_k$ = function (_destruct__k2r9zo, completion) {
257
+ var i = new BatchCalculator$setElevations$slambda(this.$coordinates_1, this.this$0__1, this.$zoomLevel_1, this.$interpolation_1, this.$results_1, completion);
258
+ i._destruct__k2r9zo_1 = _destruct__k2r9zo;
259
259
  return i;
260
260
  };
261
261
  function BatchCalculator$setElevations$slambda_0($coordinates, this$0, $zoomLevel, $interpolation, $results, resultContinuation) {
262
262
  var i = new BatchCalculator$setElevations$slambda($coordinates, this$0, $zoomLevel, $interpolation, $results, resultContinuation);
263
263
  return constructCallableReference(function (_destruct__k2r9zo, $completion) {
264
- return i.uu(_destruct__k2r9zo, $completion);
264
+ return i.invoke_adz50t_k$(_destruct__k2r9zo, $completion);
265
265
  }, 1);
266
266
  }
267
267
  function $setElevationsCOROUTINE$(_this__u8e3s4, coordinates, zoomLevel, interpolation, maxParallelTiles, resultContinuation) {
268
268
  CoroutineImpl.call(this, resultContinuation);
269
- this.kv_1 = _this__u8e3s4;
270
- this.lv_1 = coordinates;
271
- this.mv_1 = zoomLevel;
272
- this.nv_1 = interpolation;
273
- this.ov_1 = maxParallelTiles;
274
- }
275
- protoOf($setElevationsCOROUTINE$).p6 = function () {
276
- var suspendResult = this.j6_1;
269
+ this._this__u8e3s4__1 = _this__u8e3s4;
270
+ this.coordinates_1 = coordinates;
271
+ this.zoomLevel_1 = zoomLevel;
272
+ this.interpolation_1 = interpolation;
273
+ this.maxParallelTiles_1 = maxParallelTiles;
274
+ }
275
+ protoOf($setElevationsCOROUTINE$).doResume_5yljmg_k$ = function () {
276
+ var suspendResult = this.result_1;
277
277
  $sm: do
278
278
  try {
279
- var tmp = this.h6_1;
279
+ var tmp = this.state_1;
280
280
  switch (tmp) {
281
281
  case 0:
282
- this.i6_1 = 2;
283
- if (this.lv_1.n())
282
+ this.exceptionState_1 = 2;
283
+ if (this.coordinates_1.isEmpty_y1axqb_k$())
284
284
  return emptyList();
285
285
  var tmp_0 = this;
286
- var size = this.lv_1.l();
287
- tmp_0.pv_1 = Array(size);
286
+ var size = this.coordinates_1.get_size_woubt6_k$();
287
+ tmp_0.results0__1 = Array(size);
288
288
  var byTile = LinkedHashMap_init_$Create$();
289
- var iterator = this.lv_1.i();
289
+ var iterator = this.coordinates_1.iterator_jk1svi_k$();
290
290
  var index = 0;
291
- while (iterator.j()) {
291
+ while (iterator.hasNext_bitz1p_k$()) {
292
292
  var i = index;
293
293
  index = index + 1 | 0;
294
- var p = iterator.k();
295
- var tile = ElevationFunctions_instance.qv(p, this.mv_1);
296
- var key = '' + tile.tv_1 + '/' + tile.rv_1 + '/' + tile.sv_1;
297
- var value = byTile.k1(key);
294
+ var p = iterator.next_20eer_k$();
295
+ var tile = ElevationFunctions_instance.toTileCoordinates_jamtrs_k$(p, this.zoomLevel_1);
296
+ var key = '' + tile.z_1 + '/' + tile.x_1 + '/' + tile.y_1;
297
+ var value = byTile.get_wei43m_k$(key);
298
298
  var tmp_1;
299
299
  if (value == null) {
300
300
  var answer = ArrayList_init_$Create$();
301
- byTile.c3(key, answer);
301
+ byTile.put_4fpzoq_k$(key, answer);
302
302
  tmp_1 = answer;
303
303
  } else {
304
304
  tmp_1 = value;
305
305
  }
306
- tmp_1.h(i);
306
+ tmp_1.add_utx5q5_k$(i);
307
307
  }
308
308
 
309
- this.h6_1 = 1;
309
+ this.state_1 = 1;
310
310
  var tmp_2 = Flux_instance;
311
- var tmp_3 = byTile.m1();
312
- 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
+ var tmp_3 = byTile.get_entries_p20ztl_k$();
312
+ suspendResult = tmp_2.forEachParallel_gstfa7_k$(tmp_3, this.maxParallelTiles_1, BatchCalculator$setElevations$slambda_0(this.coordinates_1, this._this__u8e3s4__1, this.zoomLevel_1, this.interpolation_1, this.results0__1, null), this);
313
313
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
314
314
  return suspendResult;
315
315
  }
316
316
 
317
317
  continue $sm;
318
318
  case 1:
319
- var tmp_4 = toList(this.pv_1);
319
+ var tmp_4 = toList(this.results0__1);
320
320
  return isInterface(tmp_4, KtList) ? tmp_4 : THROW_CCE();
321
321
  case 2:
322
- throw this.k6_1;
322
+ throw this.exception_1;
323
323
  }
324
324
  } catch ($p) {
325
325
  var e = $p;
326
- if (this.i6_1 === 2) {
326
+ if (this.exceptionState_1 === 2) {
327
327
  throw e;
328
328
  } else {
329
- this.h6_1 = this.i6_1;
330
- this.k6_1 = e;
329
+ this.state_1 = this.exceptionState_1;
330
+ this.exception_1 = e;
331
331
  }
332
332
  }
333
333
  while (true);
334
334
  };
335
335
  function $getElevationsAlongCOROUTINE$(_this__u8e3s4, path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, resultContinuation) {
336
336
  CoroutineImpl.call(this, resultContinuation);
337
- this.dw_1 = _this__u8e3s4;
338
- this.ew_1 = path;
339
- this.fw_1 = zoomLevel;
340
- this.gw_1 = step;
341
- this.hw_1 = minDistance;
342
- this.iw_1 = interpolation;
343
- this.jw_1 = smoothingOptions;
344
- this.kw_1 = filterOptions;
345
- }
346
- protoOf($getElevationsAlongCOROUTINE$).p6 = function () {
347
- var suspendResult = this.j6_1;
337
+ this._this__u8e3s4__1 = _this__u8e3s4;
338
+ this.path_1 = path;
339
+ this.zoomLevel_1 = zoomLevel;
340
+ this.step_1 = step;
341
+ this.minDistance_1 = minDistance;
342
+ this.interpolation_1 = interpolation;
343
+ this.smoothingOptions_1 = smoothingOptions;
344
+ this.filterOptions_1 = filterOptions;
345
+ }
346
+ protoOf($getElevationsAlongCOROUTINE$).doResume_5yljmg_k$ = function () {
347
+ var suspendResult = this.result_1;
348
348
  $sm: do
349
349
  try {
350
- var tmp = this.h6_1;
350
+ var tmp = this.state_1;
351
351
  switch (tmp) {
352
352
  case 0:
353
- this.i6_1 = 2;
354
- if (!(this.ew_1.l() >= 2)) {
353
+ this.exceptionState_1 = 2;
354
+ if (!(this.path_1.get_size_woubt6_k$() >= 2)) {
355
355
  var message = 'Path must contain at least 2 coordinates';
356
356
  throw IllegalArgumentException_init_$Create$(toString(message));
357
357
  }
358
358
 
359
- if (!(this.gw_1 > 1.0)) {
360
- var message_0 = 'Step is too small: ' + formatNumber(this.dw_1, this.gw_1) + ' meters';
359
+ if (!(this.step_1 > 1.0)) {
360
+ var message_0 = 'Step is too small: ' + formatNumber(this._this__u8e3s4__1, this.step_1) + ' meters';
361
361
  throw IllegalArgumentException_init_$Create$(toString(message_0));
362
362
  }
363
363
 
364
- var densified = this.dw_1.lw(this.ew_1, this.gw_1, this.hw_1);
365
- this.h6_1 = 1;
366
- suspendResult = this.dw_1.mw(densified, this.fw_1, this.iw_1, VOID, this);
364
+ var densified = this._this__u8e3s4__1.generateCoordinatesAlong_8q0lbj_k$(this.path_1, this.step_1, this.minDistance_1);
365
+ this.state_1 = 1;
366
+ suspendResult = this._this__u8e3s4__1.setElevations$default_qzn313_k$(densified, this.zoomLevel_1, this.interpolation_1, VOID, this);
367
367
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
368
368
  return suspendResult;
369
369
  }
@@ -372,9 +372,9 @@
372
372
  case 1:
373
373
  var withElevation = suspendResult;
374
374
  var tmp_0;
375
- var tmp1_safe_receiver = this.jw_1;
376
- if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zt_1) === true) {
377
- tmp_0 = withElevation.l() >= 3;
375
+ var tmp1_safe_receiver = this.smoothingOptions_1;
376
+ if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.enabled_1) === true) {
377
+ tmp_0 = withElevation.get_size_woubt6_k$() >= 3;
378
378
  } else {
379
379
  tmp_0 = false;
380
380
  }
@@ -382,14 +382,14 @@
382
382
  if (tmp_0) {
383
383
  var tmp_1 = ElevationSmoother_instance;
384
384
  var tmp_2 = withElevation;
385
- var tmp0_elvis_lhs = this.jw_1.yt_1;
386
- withElevation = tmp_1.nw(tmp_2, tmp0_elvis_lhs == null ? 50.0 : tmp0_elvis_lhs);
385
+ var tmp0_elvis_lhs = this.smoothingOptions_1.windowSize_1;
386
+ withElevation = tmp_1.smooth_j2mgq7_k$(tmp_2, tmp0_elvis_lhs == null ? 50.0 : tmp0_elvis_lhs);
387
387
  }
388
388
 
389
389
  var tmp_3;
390
- var tmp4_safe_receiver = this.kw_1;
391
- if ((tmp4_safe_receiver == null ? null : tmp4_safe_receiver.cu_1) === true) {
392
- tmp_3 = withElevation.l() > 2;
390
+ var tmp4_safe_receiver = this.filterOptions_1;
391
+ if ((tmp4_safe_receiver == null ? null : tmp4_safe_receiver.enabled_1) === true) {
392
+ tmp_3 = withElevation.get_size_woubt6_k$() > 2;
393
393
  } else {
394
394
  tmp_3 = false;
395
395
  }
@@ -397,89 +397,89 @@
397
397
  if (tmp_3) {
398
398
  var tmp_4 = DouglasPeucker_instance;
399
399
  var tmp_5 = withElevation;
400
- var tmp2_elvis_lhs = this.kw_1.au_1;
400
+ var tmp2_elvis_lhs = this.filterOptions_1.tolerance_1;
401
401
  var tmp_6 = tmp2_elvis_lhs == null ? 10.0 : tmp2_elvis_lhs;
402
- var tmp3_elvis_lhs = this.kw_1.bu_1;
403
- withElevation = tmp_4.ow(tmp_5, tmp_6, tmp3_elvis_lhs == null ? 3.0 : tmp3_elvis_lhs);
402
+ var tmp3_elvis_lhs = this.filterOptions_1.zExaggeration_1;
403
+ withElevation = tmp_4.simplify_o1pnyo_k$(tmp_5, tmp_6, tmp3_elvis_lhs == null ? 3.0 : tmp3_elvis_lhs);
404
404
  }
405
405
 
406
406
  return withElevation;
407
407
  case 2:
408
- throw this.k6_1;
408
+ throw this.exception_1;
409
409
  }
410
410
  } catch ($p) {
411
411
  var e = $p;
412
- if (this.i6_1 === 2) {
412
+ if (this.exceptionState_1 === 2) {
413
413
  throw e;
414
414
  } else {
415
- this.h6_1 = this.i6_1;
416
- this.k6_1 = e;
415
+ this.state_1 = this.exceptionState_1;
416
+ this.exception_1 = e;
417
417
  }
418
418
  }
419
419
  while (true);
420
420
  };
421
421
  function BatchCalculator(calculator) {
422
- this.wu_1 = calculator;
422
+ this.calculator_1 = calculator;
423
423
  }
424
- protoOf(BatchCalculator).pw = function (coordinates, zoomLevel, interpolation, maxParallelTiles, $completion) {
424
+ protoOf(BatchCalculator).setElevations_anil9n_k$ = function (coordinates, zoomLevel, interpolation, maxParallelTiles, $completion) {
425
425
  var tmp = new $setElevationsCOROUTINE$(this, coordinates, zoomLevel, interpolation, maxParallelTiles, $completion);
426
- tmp.j6_1 = Unit_instance;
427
- tmp.k6_1 = null;
428
- return tmp.p6();
426
+ tmp.result_1 = Unit_instance;
427
+ tmp.exception_1 = null;
428
+ return tmp.doResume_5yljmg_k$();
429
429
  };
430
- protoOf(BatchCalculator).mw = function (coordinates, zoomLevel, interpolation, maxParallelTiles, $completion, $super) {
430
+ protoOf(BatchCalculator).setElevations$default_qzn313_k$ = function (coordinates, zoomLevel, interpolation, maxParallelTiles, $completion, $super) {
431
431
  maxParallelTiles = maxParallelTiles === VOID ? 10 : maxParallelTiles;
432
- return $super === VOID ? this.pw(coordinates, zoomLevel, interpolation, maxParallelTiles, $completion) : $super.pw.call(this, coordinates, zoomLevel, interpolation, maxParallelTiles, $completion);
432
+ return $super === VOID ? this.setElevations_anil9n_k$(coordinates, zoomLevel, interpolation, maxParallelTiles, $completion) : $super.setElevations_anil9n_k$.call(this, coordinates, zoomLevel, interpolation, maxParallelTiles, $completion);
433
433
  };
434
- protoOf(BatchCalculator).qw = function (path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion) {
434
+ protoOf(BatchCalculator).getElevationsAlong_4qke12_k$ = function (path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion) {
435
435
  var tmp = new $getElevationsAlongCOROUTINE$(this, path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion);
436
- tmp.j6_1 = Unit_instance;
437
- tmp.k6_1 = null;
438
- return tmp.p6();
436
+ tmp.result_1 = Unit_instance;
437
+ tmp.exception_1 = null;
438
+ return tmp.doResume_5yljmg_k$();
439
439
  };
440
- protoOf(BatchCalculator).lw = function (path, step, minDistance) {
441
- if (path.n())
440
+ protoOf(BatchCalculator).generateCoordinatesAlong_8q0lbj_k$ = function (path, step, minDistance) {
441
+ if (path.isEmpty_y1axqb_k$())
442
442
  return emptyList();
443
- var out = ArrayList_init_$Create$_0(imul(path.l(), 2));
443
+ var out = ArrayList_init_$Create$_0(imul(path.get_size_woubt6_k$(), 2));
444
444
  // Inline function 'kotlin.collections.plusAssign' call
445
- var element = path.m(0);
446
- out.h(element);
445
+ var element = path.get_c1px32_k$(0);
446
+ out.add_utx5q5_k$(element);
447
447
  var inductionVariable = 0;
448
- var last = path.l() - 1 | 0;
448
+ var last = path.get_size_woubt6_k$() - 1 | 0;
449
449
  if (inductionVariable < last)
450
450
  $l$loop: do {
451
451
  var i = inductionVariable;
452
452
  inductionVariable = inductionVariable + 1 | 0;
453
- var a = path.m(i);
454
- var b = path.m(i + 1 | 0);
455
- var d = Distance_instance.rw(a, b);
453
+ var a = path.get_c1px32_k$(i);
454
+ var b = path.get_c1px32_k$(i + 1 | 0);
455
+ var d = Distance_instance.haversine_mrx4ab_k$(a, b);
456
456
  if (d < minDistance)
457
457
  continue $l$loop;
458
- var between = this.sw(a, b, step, d);
458
+ var between = this.generateCoordinatesBetween_nqn6s8_k$(a, b, step, d);
459
459
  var inductionVariable_0 = 1;
460
- var last_0 = between.l();
460
+ var last_0 = between.get_size_woubt6_k$();
461
461
  if (inductionVariable_0 < last_0)
462
462
  do {
463
463
  var j = inductionVariable_0;
464
464
  inductionVariable_0 = inductionVariable_0 + 1 | 0;
465
465
  // Inline function 'kotlin.collections.plusAssign' call
466
- var element_0 = between.m(j);
467
- out.h(element_0);
466
+ var element_0 = between.get_c1px32_k$(j);
467
+ out.add_utx5q5_k$(element_0);
468
468
  }
469
469
  while (inductionVariable_0 < last_0);
470
470
  }
471
471
  while (inductionVariable < last);
472
472
  return out;
473
473
  };
474
- protoOf(BatchCalculator).sw = function (a, b, step, distance) {
474
+ protoOf(BatchCalculator).generateCoordinatesBetween_nqn6s8_k$ = function (a, b, step, distance) {
475
475
  if (distance <= step)
476
476
  return listOf([a, b]);
477
477
  var numSteps = numberToInt(distance / step);
478
478
  var out = ArrayList_init_$Create$_0(numSteps + 2 | 0);
479
479
  // Inline function 'kotlin.collections.plusAssign' call
480
- out.h(a);
481
- var latDiff = b.av() - a.av();
482
- var lonDiff = b.bv() - a.bv();
480
+ out.add_utx5q5_k$(a);
481
+ var latDiff = b.get_latitude_feukvp_k$() - a.get_latitude_feukvp_k$();
482
+ var lonDiff = b.get_longitude_asb1fq_k$() - a.get_longitude_asb1fq_k$();
483
483
  var inductionVariable = 1;
484
484
  if (inductionVariable <= numSteps)
485
485
  do {
@@ -487,36 +487,36 @@
487
487
  inductionVariable = inductionVariable + 1 | 0;
488
488
  var f = i * step / distance;
489
489
  // Inline function 'kotlin.collections.plusAssign' call
490
- var element = new LatLon(a.av() + latDiff * f, a.bv() + lonDiff * f);
491
- out.h(element);
490
+ var element = new LatLon(a.get_latitude_feukvp_k$() + latDiff * f, a.get_longitude_asb1fq_k$() + lonDiff * f);
491
+ out.add_utx5q5_k$(element);
492
492
  }
493
493
  while (!(i === numSteps));
494
494
  // Inline function 'kotlin.collections.plusAssign' call
495
- out.h(b);
495
+ out.add_utx5q5_k$(b);
496
496
  return out;
497
497
  };
498
498
  function LatLon(latitude, longitude, elevation) {
499
499
  elevation = elevation === VOID ? null : elevation;
500
- this.tw_1 = latitude;
501
- this.uw_1 = longitude;
502
- this.vw_1 = elevation;
500
+ this.latitude_1 = latitude;
501
+ this.longitude_1 = longitude;
502
+ this.elevation_1 = elevation;
503
503
  }
504
- protoOf(LatLon).av = function () {
505
- return this.tw_1;
504
+ protoOf(LatLon).get_latitude_feukvp_k$ = function () {
505
+ return this.latitude_1;
506
506
  };
507
- protoOf(LatLon).bv = function () {
508
- return this.uw_1;
507
+ protoOf(LatLon).get_longitude_asb1fq_k$ = function () {
508
+ return this.longitude_1;
509
509
  };
510
- protoOf(LatLon).ww = function () {
511
- return this.vw_1;
510
+ protoOf(LatLon).get_elevation_8fwyb8_k$ = function () {
511
+ return this.elevation_1;
512
512
  };
513
513
  protoOf(LatLon).toString = function () {
514
- return 'LatLon(latitude=' + this.tw_1 + ', longitude=' + this.uw_1 + ', elevation=' + this.vw_1 + ')';
514
+ return 'LatLon(latitude=' + this.latitude_1 + ', longitude=' + this.longitude_1 + ', elevation=' + this.elevation_1 + ')';
515
515
  };
516
516
  protoOf(LatLon).hashCode = function () {
517
- var result = getNumberHashCode(this.tw_1);
518
- result = imul(result, 31) + getNumberHashCode(this.uw_1) | 0;
519
- result = imul(result, 31) + (this.vw_1 == null ? 0 : getNumberHashCode(this.vw_1)) | 0;
517
+ var result = getNumberHashCode(this.latitude_1);
518
+ result = imul(result, 31) + getNumberHashCode(this.longitude_1) | 0;
519
+ result = imul(result, 31) + (this.elevation_1 == null ? 0 : getNumberHashCode(this.elevation_1)) | 0;
520
520
  return result;
521
521
  };
522
522
  protoOf(LatLon).equals = function (other) {
@@ -524,35 +524,35 @@
524
524
  return true;
525
525
  if (!(other instanceof LatLon))
526
526
  return false;
527
- if (!equals(this.tw_1, other.tw_1))
527
+ if (!equals(this.latitude_1, other.latitude_1))
528
528
  return false;
529
- if (!equals(this.uw_1, other.uw_1))
529
+ if (!equals(this.longitude_1, other.longitude_1))
530
530
  return false;
531
- if (!equals(this.vw_1, other.vw_1))
531
+ if (!equals(this.elevation_1, other.elevation_1))
532
532
  return false;
533
533
  return true;
534
534
  };
535
535
  function LatLonElevation(latitude, longitude, elevation) {
536
- this.xw_1 = latitude;
537
- this.yw_1 = longitude;
538
- this.zw_1 = elevation;
536
+ this.latitude_1 = latitude;
537
+ this.longitude_1 = longitude;
538
+ this.elevation_1 = elevation;
539
539
  }
540
- protoOf(LatLonElevation).av = function () {
541
- return this.xw_1;
540
+ protoOf(LatLonElevation).get_latitude_feukvp_k$ = function () {
541
+ return this.latitude_1;
542
542
  };
543
- protoOf(LatLonElevation).bv = function () {
544
- return this.yw_1;
543
+ protoOf(LatLonElevation).get_longitude_asb1fq_k$ = function () {
544
+ return this.longitude_1;
545
545
  };
546
- protoOf(LatLonElevation).ww = function () {
547
- return this.zw_1;
546
+ protoOf(LatLonElevation).get_elevation_8fwyb8_k$ = function () {
547
+ return this.elevation_1;
548
548
  };
549
549
  protoOf(LatLonElevation).toString = function () {
550
- return 'LatLonElevation(latitude=' + this.xw_1 + ', longitude=' + this.yw_1 + ', elevation=' + this.zw_1 + ')';
550
+ return 'LatLonElevation(latitude=' + this.latitude_1 + ', longitude=' + this.longitude_1 + ', elevation=' + this.elevation_1 + ')';
551
551
  };
552
552
  protoOf(LatLonElevation).hashCode = function () {
553
- var result = getNumberHashCode(this.xw_1);
554
- result = imul(result, 31) + getNumberHashCode(this.yw_1) | 0;
555
- result = imul(result, 31) + getNumberHashCode(this.zw_1) | 0;
553
+ var result = getNumberHashCode(this.latitude_1);
554
+ result = imul(result, 31) + getNumberHashCode(this.longitude_1) | 0;
555
+ result = imul(result, 31) + getNumberHashCode(this.elevation_1) | 0;
556
556
  return result;
557
557
  };
558
558
  protoOf(LatLonElevation).equals = function (other) {
@@ -560,21 +560,21 @@
560
560
  return true;
561
561
  if (!(other instanceof LatLonElevation))
562
562
  return false;
563
- if (!equals(this.xw_1, other.xw_1))
563
+ if (!equals(this.latitude_1, other.latitude_1))
564
564
  return false;
565
- if (!equals(this.yw_1, other.yw_1))
565
+ if (!equals(this.longitude_1, other.longitude_1))
566
566
  return false;
567
- if (!equals(this.zw_1, other.zw_1))
567
+ if (!equals(this.elevation_1, other.elevation_1))
568
568
  return false;
569
569
  return true;
570
570
  };
571
571
  function Distance() {
572
572
  }
573
- protoOf(Distance).rw = function (coord1, coord2) {
574
- var lat1Rad = coord1.av() * 0.017453292519943295;
575
- var lat2Rad = coord2.av() * 0.017453292519943295;
576
- var deltaLat = (coord2.av() - coord1.av()) * 0.017453292519943295;
577
- var deltaLon = (coord2.bv() - coord1.bv()) * 0.017453292519943295;
573
+ protoOf(Distance).haversine_mrx4ab_k$ = function (coord1, coord2) {
574
+ var lat1Rad = coord1.get_latitude_feukvp_k$() * 0.017453292519943295;
575
+ var lat2Rad = coord2.get_latitude_feukvp_k$() * 0.017453292519943295;
576
+ var deltaLat = (coord2.get_latitude_feukvp_k$() - coord1.get_latitude_feukvp_k$()) * 0.017453292519943295;
577
+ var deltaLon = (coord2.get_longitude_asb1fq_k$() - coord1.get_longitude_asb1fq_k$()) * 0.017453292519943295;
578
578
  // Inline function 'kotlin.math.sin' call
579
579
  var x = deltaLat / 2.0;
580
580
  var sinHalfLat = Math.sin(x);
@@ -595,19 +595,19 @@
595
595
  var c = 2.0 * Math.atan2(tmp0, x_2);
596
596
  return 6371000.0 * c;
597
597
  };
598
- protoOf(Distance).ax = function (points) {
599
- if (points.n()) {
598
+ protoOf(Distance).cumulativeDistances_92iok5_k$ = function (points) {
599
+ if (points.isEmpty_y1axqb_k$()) {
600
600
  // Inline function 'kotlin.doubleArrayOf' call
601
601
  return new Float64Array([0.0]);
602
602
  }
603
- var out = new Float64Array(points.l());
603
+ var out = new Float64Array(points.get_size_woubt6_k$());
604
604
  var inductionVariable = 1;
605
- var last = points.l();
605
+ var last = points.get_size_woubt6_k$();
606
606
  if (inductionVariable < last)
607
607
  do {
608
608
  var i = inductionVariable;
609
609
  inductionVariable = inductionVariable + 1 | 0;
610
- out[i] = out[i - 1 | 0] + this.rw(points.m(i - 1 | 0), points.m(i));
610
+ out[i] = out[i - 1 | 0] + this.haversine_mrx4ab_k$(points.get_c1px32_k$(i - 1 | 0), points.get_c1px32_k$(i));
611
611
  }
612
612
  while (inductionVariable < last);
613
613
  return out;
@@ -617,8 +617,8 @@
617
617
  return Distance_instance;
618
618
  }
619
619
  function simplifyRecursive($this, points, firstIndex, lastIndex, tolerance, out) {
620
- var first = points.m(firstIndex);
621
- var last = points.m(lastIndex);
620
+ var first = points.get_c1px32_k$(firstIndex);
621
+ var last = points.get_c1px32_k$(lastIndex);
622
622
  var maxDistance = 0.0;
623
623
  var maxIndex = -1;
624
624
  var inductionVariable = firstIndex + 1 | 0;
@@ -626,7 +626,7 @@
626
626
  do {
627
627
  var i = inductionVariable;
628
628
  inductionVariable = inductionVariable + 1 | 0;
629
- var d = points.m(i).ex(first, last);
629
+ var d = points.get_c1px32_k$(i).distanceToSegment_bfq4v7_k$(first, last);
630
630
  if (d > maxDistance) {
631
631
  maxDistance = d;
632
632
  maxIndex = i;
@@ -637,7 +637,7 @@
637
637
  if ((maxIndex - firstIndex | 0) > 1) {
638
638
  simplifyRecursive($this, points, firstIndex, maxIndex, tolerance, out);
639
639
  }
640
- out.h(maxIndex);
640
+ out.add_utx5q5_k$(maxIndex);
641
641
  if ((lastIndex - maxIndex | 0) > 1) {
642
642
  simplifyRecursive($this, points, maxIndex, lastIndex, tolerance, out);
643
643
  }
@@ -645,45 +645,45 @@
645
645
  }
646
646
  function DouglasPeucker() {
647
647
  }
648
- protoOf(DouglasPeucker).ow = function (points, tolerance, zExaggeration) {
649
- if (points.l() <= 2)
648
+ protoOf(DouglasPeucker).simplify_o1pnyo_k$ = function (points, tolerance, zExaggeration) {
649
+ if (points.get_size_woubt6_k$() <= 2)
650
650
  return toList_0(points);
651
651
  // Inline function 'kotlin.collections.map' call
652
652
  // Inline function 'kotlin.collections.mapTo' call
653
653
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(points, 10));
654
- var _iterator__ex2g4s = points.i();
655
- while (_iterator__ex2g4s.j()) {
656
- var item = _iterator__ex2g4s.k();
657
- var tmp$ret$2 = EcefConverter_instance.fx(item, zExaggeration);
658
- destination.h(tmp$ret$2);
654
+ var _iterator__ex2g4s = points.iterator_jk1svi_k$();
655
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
656
+ var item = _iterator__ex2g4s.next_20eer_k$();
657
+ var tmp$ret$2 = EcefConverter_instance.toEcef_pue96q_k$(item, zExaggeration);
658
+ destination.add_utx5q5_k$(tmp$ret$2);
659
659
  }
660
660
  var ecef = destination;
661
661
  // Inline function 'kotlin.collections.map' call
662
- var this_0 = this.gx(ecef, tolerance);
662
+ var this_0 = this.simplifyIndices_1yk9dd_k$(ecef, tolerance);
663
663
  // Inline function 'kotlin.collections.mapTo' call
664
664
  var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
665
- var _iterator__ex2g4s_0 = this_0.i();
666
- while (_iterator__ex2g4s_0.j()) {
667
- var item_0 = _iterator__ex2g4s_0.k();
668
- var tmp$ret$5 = points.m(item_0);
669
- destination_0.h(tmp$ret$5);
665
+ var _iterator__ex2g4s_0 = this_0.iterator_jk1svi_k$();
666
+ while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
667
+ var item_0 = _iterator__ex2g4s_0.next_20eer_k$();
668
+ var tmp$ret$5 = points.get_c1px32_k$(item_0);
669
+ destination_0.add_utx5q5_k$(tmp$ret$5);
670
670
  }
671
671
  return destination_0;
672
672
  };
673
- protoOf(DouglasPeucker).gx = function (points, tolerance) {
674
- if (points.l() <= 2)
673
+ protoOf(DouglasPeucker).simplifyIndices_1yk9dd_k$ = function (points, tolerance) {
674
+ if (points.get_size_woubt6_k$() <= 2)
675
675
  return toList_0(get_indices(points));
676
676
  var lastIndex = get_lastIndex(points);
677
677
  // Inline function 'kotlin.collections.buildList' call
678
678
  // Inline function 'kotlin.collections.buildListInternal' call
679
- var capacity = points.l();
679
+ var capacity = points.get_size_woubt6_k$();
680
680
  checkBuilderCapacity(capacity);
681
681
  // Inline function 'kotlin.apply' call
682
682
  var this_0 = ArrayList_init_$Create$_0(capacity);
683
- this_0.h(0);
683
+ this_0.add_utx5q5_k$(0);
684
684
  simplifyRecursive(DouglasPeucker_instance, points, 0, lastIndex, tolerance, this_0);
685
- this_0.h(lastIndex);
686
- return this_0.o3();
685
+ this_0.add_utx5q5_k$(lastIndex);
686
+ return this_0.build_nmwvly_k$();
687
687
  };
688
688
  var DouglasPeucker_instance;
689
689
  function DouglasPeucker_getInstance() {
@@ -691,10 +691,10 @@
691
691
  }
692
692
  function EcefConverter() {
693
693
  }
694
- protoOf(EcefConverter).fx = function (coordinates, zExaggeration) {
695
- var latRad = coordinates.av() * 0.017453292519943295;
696
- var lonRad = coordinates.bv() * 0.017453292519943295;
697
- var tmp0_elvis_lhs = coordinates.ww();
694
+ protoOf(EcefConverter).toEcef_pue96q_k$ = function (coordinates, zExaggeration) {
695
+ var latRad = coordinates.get_latitude_feukvp_k$() * 0.017453292519943295;
696
+ var lonRad = coordinates.get_longitude_asb1fq_k$() * 0.017453292519943295;
697
+ var tmp0_elvis_lhs = coordinates.get_elevation_8fwyb8_k$();
698
698
  var elevationExaggerated = zExaggeration * (tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs);
699
699
  // Inline function 'kotlin.math.sin' call
700
700
  var sinLat = Math.sin(latRad);
@@ -718,43 +718,43 @@
718
718
  }
719
719
  function getInterpolatedElevation($this, coords, zoomLevel, $completion) {
720
720
  var tmp = new $getInterpolatedElevationCOROUTINE$($this, coords, zoomLevel, $completion);
721
- tmp.j6_1 = Unit_instance;
722
- tmp.k6_1 = null;
723
- return tmp.p6();
721
+ tmp.result_1 = Unit_instance;
722
+ tmp.exception_1 = null;
723
+ return tmp.doResume_5yljmg_k$();
724
724
  }
725
725
  function elevationFromPixel($this, pixel, $completion) {
726
726
  var tmp = new $elevationFromPixelCOROUTINE$($this, pixel, $completion);
727
- tmp.j6_1 = Unit_instance;
728
- tmp.k6_1 = null;
729
- return tmp.p6();
727
+ tmp.result_1 = Unit_instance;
728
+ tmp.exception_1 = null;
729
+ return tmp.doResume_5yljmg_k$();
730
730
  }
731
731
  function $getElevationCOROUTINE$(_this__u8e3s4, coords, zoomLevel, interpolation, resultContinuation) {
732
732
  CoroutineImpl.call(this, resultContinuation);
733
- this.uy_1 = _this__u8e3s4;
734
- this.vy_1 = coords;
735
- this.wy_1 = zoomLevel;
736
- this.xy_1 = interpolation;
733
+ this._this__u8e3s4__1 = _this__u8e3s4;
734
+ this.coords_1 = coords;
735
+ this.zoomLevel_1 = zoomLevel;
736
+ this.interpolation_1 = interpolation;
737
737
  }
738
- protoOf($getElevationCOROUTINE$).p6 = function () {
739
- var suspendResult = this.j6_1;
738
+ protoOf($getElevationCOROUTINE$).doResume_5yljmg_k$ = function () {
739
+ var suspendResult = this.result_1;
740
740
  $sm: do
741
741
  try {
742
- var tmp = this.h6_1;
742
+ var tmp = this.state_1;
743
743
  switch (tmp) {
744
744
  case 0:
745
- this.i6_1 = 5;
746
- this.i6_1 = 4;
747
- if (this.xy_1) {
748
- this.h6_1 = 2;
749
- suspendResult = getInterpolatedElevation(this.uy_1, this.vy_1, this.wy_1, this);
745
+ this.exceptionState_1 = 5;
746
+ this.exceptionState_1 = 4;
747
+ if (this.interpolation_1) {
748
+ this.state_1 = 2;
749
+ suspendResult = getInterpolatedElevation(this._this__u8e3s4__1, this.coords_1, this.zoomLevel_1, this);
750
750
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
751
751
  return suspendResult;
752
752
  }
753
753
  continue $sm;
754
754
  } else {
755
- var pixel = ElevationFunctions_instance.az(this.vy_1, this.wy_1, this.uy_1.yu_1);
756
- this.h6_1 = 1;
757
- suspendResult = elevationFromPixel(this.uy_1, pixel, this);
755
+ var pixel = ElevationFunctions_instance.toPixel_iyzwlj_k$(this.coords_1, this.zoomLevel_1, this._this__u8e3s4__1.tileSize_1);
756
+ this.state_1 = 1;
757
+ suspendResult = elevationFromPixel(this._this__u8e3s4__1, pixel, this);
758
758
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
759
759
  return suspendResult;
760
760
  }
@@ -762,100 +762,100 @@
762
762
  }
763
763
 
764
764
  case 1:
765
- this.zy_1 = suspendResult;
766
- this.h6_1 = 3;
765
+ this.WHEN_RESULT1__1 = suspendResult;
766
+ this.state_1 = 3;
767
767
  continue $sm;
768
768
  case 2:
769
- this.zy_1 = suspendResult;
770
- this.h6_1 = 3;
769
+ this.WHEN_RESULT1__1 = suspendResult;
770
+ this.state_1 = 3;
771
771
  continue $sm;
772
772
  case 3:
773
- this.yy_1 = this.zy_1;
774
- this.i6_1 = 5;
775
- this.h6_1 = 6;
773
+ this.TRY_RESULT0__1 = this.WHEN_RESULT1__1;
774
+ this.exceptionState_1 = 5;
775
+ this.state_1 = 6;
776
776
  continue $sm;
777
777
  case 4:
778
- this.i6_1 = 5;
779
- var tmp_0 = this.k6_1;
778
+ this.exceptionState_1 = 5;
779
+ var tmp_0 = this.exception_1;
780
780
  if (tmp_0 instanceof Error) {
781
- var t = this.k6_1;
781
+ var t = this.exception_1;
782
782
  var tmp_1 = this;
783
783
  throw IllegalStateException_init_$Create$('Failed to get elevation: ' + t.message, t);
784
784
  } else {
785
- throw this.k6_1;
785
+ throw this.exception_1;
786
786
  }
787
787
 
788
788
  case 5:
789
- throw this.k6_1;
789
+ throw this.exception_1;
790
790
  case 6:
791
- this.i6_1 = 5;
792
- return this.yy_1;
791
+ this.exceptionState_1 = 5;
792
+ return this.TRY_RESULT0__1;
793
793
  }
794
794
  } catch ($p) {
795
795
  var e = $p;
796
- if (this.i6_1 === 5) {
796
+ if (this.exceptionState_1 === 5) {
797
797
  throw e;
798
798
  } else {
799
- this.h6_1 = this.i6_1;
800
- this.k6_1 = e;
799
+ this.state_1 = this.exceptionState_1;
800
+ this.exception_1 = e;
801
801
  }
802
802
  }
803
803
  while (true);
804
804
  };
805
805
  function $getInterpolatedElevationCOROUTINE$(_this__u8e3s4, coords, zoomLevel, resultContinuation) {
806
806
  CoroutineImpl.call(this, resultContinuation);
807
- this.px_1 = _this__u8e3s4;
808
- this.qx_1 = coords;
809
- this.rx_1 = zoomLevel;
807
+ this._this__u8e3s4__1 = _this__u8e3s4;
808
+ this.coords_1 = coords;
809
+ this.zoomLevel_1 = zoomLevel;
810
810
  }
811
- protoOf($getInterpolatedElevationCOROUTINE$).p6 = function () {
812
- var suspendResult = this.j6_1;
811
+ protoOf($getInterpolatedElevationCOROUTINE$).doResume_5yljmg_k$ = function () {
812
+ var suspendResult = this.result_1;
813
813
  $sm: do
814
814
  try {
815
- var tmp = this.h6_1;
815
+ var tmp = this.state_1;
816
816
  switch (tmp) {
817
817
  case 0:
818
- this.i6_1 = 5;
819
- this.zx_1 = ElevationFunctions_instance.bz(this.qx_1, this.rx_1, this.px_1.yu_1);
818
+ this.exceptionState_1 = 5;
819
+ this.pf7__1 = ElevationFunctions_instance.toPixelFloat_ler4xt_k$(this.coords_1, this.zoomLevel_1, this._this__u8e3s4__1.tileSize_1);
820
820
  var tmp_0 = this;
821
- var x = this.zx_1.dz_1;
822
- tmp_0.ay_1 = numberToInt(Math.floor(x));
821
+ var x = this.pf7__1.x_1;
822
+ tmp_0.x0i8__1 = numberToInt(Math.floor(x));
823
823
  var tmp_1 = this;
824
- var x_0 = this.zx_1.ez_1;
825
- tmp_1.by_1 = numberToInt(Math.floor(x_0));
826
- this.yx_1 = this.ay_1 + 1 | 0;
827
- this.xx_1 = this.by_1 + 1 | 0;
828
- this.tx_1 = this.zx_1.dz_1 - this.ay_1;
829
- this.sx_1 = this.zx_1.ez_1 - this.by_1;
830
- this.h6_1 = 1;
831
- suspendResult = elevationFromPixel(this.px_1, ElevationFunctions_instance.fz(new Pixel(this.zx_1.cz_1, this.ay_1, this.by_1), this.px_1.yu_1), this);
824
+ var x_0 = this.pf7__1.y_1;
825
+ tmp_1.y0i9__1 = numberToInt(Math.floor(x_0));
826
+ this.x1i6__1 = this.x0i8__1 + 1 | 0;
827
+ this.y1i5__1 = this.y0i9__1 + 1 | 0;
828
+ this.dx1__1 = this.pf7__1.x_1 - this.x0i8__1;
829
+ this.dy0__1 = this.pf7__1.y_1 - this.y0i9__1;
830
+ this.state_1 = 1;
831
+ suspendResult = elevationFromPixel(this._this__u8e3s4__1, ElevationFunctions_instance.normalizePixel_364azo_k$(new Pixel(this.pf7__1.tile_1, this.x0i8__1, this.y0i9__1), this._this__u8e3s4__1.tileSize_1), this);
832
832
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
833
833
  return suspendResult;
834
834
  }
835
835
 
836
836
  continue $sm;
837
837
  case 1:
838
- this.wx_1 = suspendResult;
839
- this.h6_1 = 2;
840
- suspendResult = elevationFromPixel(this.px_1, ElevationFunctions_instance.fz(new Pixel(this.zx_1.cz_1, this.yx_1, this.by_1), this.px_1.yu_1), this);
838
+ this.p004__1 = suspendResult;
839
+ this.state_1 = 2;
840
+ suspendResult = elevationFromPixel(this._this__u8e3s4__1, ElevationFunctions_instance.normalizePixel_364azo_k$(new Pixel(this.pf7__1.tile_1, this.x1i6__1, this.y0i9__1), this._this__u8e3s4__1.tileSize_1), this);
841
841
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
842
842
  return suspendResult;
843
843
  }
844
844
 
845
845
  continue $sm;
846
846
  case 2:
847
- this.vx_1 = suspendResult;
848
- this.h6_1 = 3;
849
- suspendResult = elevationFromPixel(this.px_1, ElevationFunctions_instance.fz(new Pixel(this.zx_1.cz_1, this.ay_1, this.xx_1), this.px_1.yu_1), this);
847
+ this.p103__1 = suspendResult;
848
+ this.state_1 = 3;
849
+ suspendResult = elevationFromPixel(this._this__u8e3s4__1, ElevationFunctions_instance.normalizePixel_364azo_k$(new Pixel(this.pf7__1.tile_1, this.x0i8__1, this.y1i5__1), this._this__u8e3s4__1.tileSize_1), this);
850
850
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
851
851
  return suspendResult;
852
852
  }
853
853
 
854
854
  continue $sm;
855
855
  case 3:
856
- this.ux_1 = suspendResult;
857
- this.h6_1 = 4;
858
- suspendResult = elevationFromPixel(this.px_1, ElevationFunctions_instance.fz(new Pixel(this.zx_1.cz_1, this.yx_1, this.xx_1), this.px_1.yu_1), this);
856
+ this.p012__1 = suspendResult;
857
+ this.state_1 = 4;
858
+ suspendResult = elevationFromPixel(this._this__u8e3s4__1, ElevationFunctions_instance.normalizePixel_364azo_k$(new Pixel(this.pf7__1.tile_1, this.x1i6__1, this.y1i5__1), this._this__u8e3s4__1.tileSize_1), this);
859
859
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
860
860
  return suspendResult;
861
861
  }
@@ -863,69 +863,69 @@
863
863
  continue $sm;
864
864
  case 4:
865
865
  var p11 = suspendResult;
866
- var top = this.wx_1 * (1.0 - this.tx_1) + this.vx_1 * this.tx_1;
867
- var bottom = this.ux_1 * (1.0 - this.tx_1) + p11 * this.tx_1;
868
- return top * (1.0 - this.sx_1) + bottom * this.sx_1;
866
+ var top = this.p004__1 * (1.0 - this.dx1__1) + this.p103__1 * this.dx1__1;
867
+ var bottom = this.p012__1 * (1.0 - this.dx1__1) + p11 * this.dx1__1;
868
+ return top * (1.0 - this.dy0__1) + bottom * this.dy0__1;
869
869
  case 5:
870
- throw this.k6_1;
870
+ throw this.exception_1;
871
871
  }
872
872
  } catch ($p) {
873
873
  var e = $p;
874
- if (this.i6_1 === 5) {
874
+ if (this.exceptionState_1 === 5) {
875
875
  throw e;
876
876
  } else {
877
- this.h6_1 = this.i6_1;
878
- this.k6_1 = e;
877
+ this.state_1 = this.exceptionState_1;
878
+ this.exception_1 = e;
879
879
  }
880
880
  }
881
881
  while (true);
882
882
  };
883
883
  function $elevationFromPixelCOROUTINE$(_this__u8e3s4, pixel, resultContinuation) {
884
884
  CoroutineImpl.call(this, resultContinuation);
885
- this.ky_1 = _this__u8e3s4;
886
- this.ly_1 = pixel;
885
+ this._this__u8e3s4__1 = _this__u8e3s4;
886
+ this.pixel_1 = pixel;
887
887
  }
888
- protoOf($elevationFromPixelCOROUTINE$).p6 = function () {
889
- var suspendResult = this.j6_1;
888
+ protoOf($elevationFromPixelCOROUTINE$).doResume_5yljmg_k$ = function () {
889
+ var suspendResult = this.result_1;
890
890
  $sm: do
891
891
  try {
892
- var tmp = this.h6_1;
892
+ var tmp = this.state_1;
893
893
  switch (tmp) {
894
894
  case 0:
895
- this.i6_1 = 2;
896
- this.h6_1 = 1;
897
- suspendResult = this.ky_1.xu_1.mz(this.ly_1.gz_1, this);
895
+ this.exceptionState_1 = 2;
896
+ this.state_1 = 1;
897
+ suspendResult = this._this__u8e3s4__1.tileManager_1.getTile_c22khk_k$(this.pixel_1.tile_1, this);
898
898
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
899
899
  return suspendResult;
900
900
  }
901
901
 
902
902
  continue $sm;
903
903
  case 1:
904
- return suspendResult.sz(this.ly_1);
904
+ return suspendResult.getElevation_exacdm_k$(this.pixel_1);
905
905
  case 2:
906
- throw this.k6_1;
906
+ throw this.exception_1;
907
907
  }
908
908
  } catch ($p) {
909
909
  var e = $p;
910
- if (this.i6_1 === 2) {
910
+ if (this.exceptionState_1 === 2) {
911
911
  throw e;
912
912
  } else {
913
- this.h6_1 = this.i6_1;
914
- this.k6_1 = e;
913
+ this.state_1 = this.exceptionState_1;
914
+ this.exception_1 = e;
915
915
  }
916
916
  }
917
917
  while (true);
918
918
  };
919
919
  function ElevationCalculator(tileManager, tileSize) {
920
920
  tileSize = tileSize === VOID ? 256 : tileSize;
921
- this.xu_1 = tileManager;
922
- this.yu_1 = tileSize;
921
+ this.tileManager_1 = tileManager;
922
+ this.tileSize_1 = tileSize;
923
923
  }
924
- protoOf(ElevationCalculator).zu = function (coords, zoomLevel, interpolation, $completion) {
924
+ protoOf(ElevationCalculator).getElevation_e117b3_k$ = function (coords, zoomLevel, interpolation, $completion) {
925
925
  var tmp = new $getElevationCOROUTINE$(this, coords, zoomLevel, interpolation, $completion);
926
- tmp.j6_1 = Unit_instance;
927
- tmp.k6_1 = null;
928
- return tmp.p6();
926
+ tmp.result_1 = Unit_instance;
927
+ tmp.exception_1 = null;
928
+ return tmp.doResume_5yljmg_k$();
929
929
  };
930
930
  function formatNumber_0($this, d) {
931
931
  var asLong = numberToLong(d);
@@ -933,24 +933,24 @@
933
933
  }
934
934
  function ElevationFunctions() {
935
935
  }
936
- protoOf(ElevationFunctions).tz = function (degrees) {
936
+ protoOf(ElevationFunctions).degToRad_hya2pa_k$ = function (degrees) {
937
937
  return degrees * 0.017453292519943295;
938
938
  };
939
- protoOf(ElevationFunctions).uz = function (lat) {
939
+ protoOf(ElevationFunctions).isValidLatitude_gohohk_k$ = function (lat) {
940
940
  return lat >= -85.0511 && lat <= 85.0511;
941
941
  };
942
- protoOf(ElevationFunctions).vz = function (lon) {
942
+ protoOf(ElevationFunctions).isValidLongitude_hbos7_k$ = function (lon) {
943
943
  return -180.0 <= lon ? lon <= 180.0 : false;
944
944
  };
945
- protoOf(ElevationFunctions).wz = function (zoom) {
945
+ protoOf(ElevationFunctions).isValidZoomLevel_bzars7_k$ = function (zoom) {
946
946
  return 0 <= zoom ? zoom <= 15 : false;
947
947
  };
948
- protoOf(ElevationFunctions).fz = function (pixel, tileSize) {
949
- var x = pixel.hz_1;
950
- var y = pixel.iz_1;
951
- var tileX = pixel.gz_1.rv_1;
952
- var tileY = pixel.gz_1.sv_1;
953
- var z = pixel.gz_1.tv_1;
948
+ protoOf(ElevationFunctions).normalizePixel_364azo_k$ = function (pixel, tileSize) {
949
+ var x = pixel.x_1;
950
+ var y = pixel.y_1;
951
+ var tileX = pixel.tile_1.x_1;
952
+ var tileY = pixel.tile_1.y_1;
953
+ var z = pixel.tile_1.z_1;
954
954
  if (x < 0) {
955
955
  x = x + tileSize | 0;
956
956
  tileX = tileX - 1 | 0;
@@ -972,25 +972,25 @@
972
972
  tileY = coerceIn(tileY, 0, maxTile);
973
973
  return new Pixel(new TileCoordinates(tileX, tileY, z), x, y);
974
974
  };
975
- protoOf(ElevationFunctions).xz = function (coords, z) {
975
+ protoOf(ElevationFunctions).toTileCoordinatesFloat_fctdpc_k$ = function (coords, z) {
976
976
  // Inline function 'kotlin.require' call
977
- if (!this.uz(coords.av())) {
978
- var message = 'Invalid latitude: ' + formatNumber_0(ElevationFunctions_instance, coords.av()) + '. Must be between -85.0511 and 85.0511';
977
+ if (!this.isValidLatitude_gohohk_k$(coords.get_latitude_feukvp_k$())) {
978
+ var message = 'Invalid latitude: ' + formatNumber_0(ElevationFunctions_instance, coords.get_latitude_feukvp_k$()) + '. Must be between -85.0511 and 85.0511';
979
979
  throw IllegalArgumentException_init_$Create$(toString(message));
980
980
  }
981
981
  // Inline function 'kotlin.require' call
982
- if (!this.vz(coords.bv())) {
983
- var message_0 = 'Invalid longitude: ' + formatNumber_0(ElevationFunctions_instance, coords.bv()) + '. Must be between -180 and 180';
982
+ if (!this.isValidLongitude_hbos7_k$(coords.get_longitude_asb1fq_k$())) {
983
+ var message_0 = 'Invalid longitude: ' + formatNumber_0(ElevationFunctions_instance, coords.get_longitude_asb1fq_k$()) + '. Must be between -180 and 180';
984
984
  throw IllegalArgumentException_init_$Create$(toString(message_0));
985
985
  }
986
986
  // Inline function 'kotlin.require' call
987
- if (!this.wz(z)) {
987
+ if (!this.isValidZoomLevel_bzars7_k$(z)) {
988
988
  var message_1 = 'Invalid zoom level: ' + z + '. Must be between 0 and 15';
989
989
  throw IllegalArgumentException_init_$Create$(toString(message_1));
990
990
  }
991
- var lat = this.tz(coords.av());
991
+ var lat = this.degToRad_hya2pa_k$(coords.get_latitude_feukvp_k$());
992
992
  var n = 1 << z;
993
- var xFloat = (coords.bv() + 180.0) / 360.0 * n;
993
+ var xFloat = (coords.get_longitude_asb1fq_k$() + 180.0) / 360.0 * n;
994
994
  // Inline function 'kotlin.math.tan' call
995
995
  var tmp = Math.tan(lat);
996
996
  // Inline function 'kotlin.math.cos' call
@@ -1006,27 +1006,27 @@
1006
1006
  var y = coerceIn(numberToInt(tmp$ret$10), 0, maxTile);
1007
1007
  return new TileCoordinatesFloat(x_0, y, xFloat, yFloat, z);
1008
1008
  };
1009
- protoOf(ElevationFunctions).qv = function (coords, z) {
1010
- var tile = this.xz(coords, z);
1011
- return new TileCoordinates(tile.yz_1, tile.zz_1, tile.c10_1);
1009
+ protoOf(ElevationFunctions).toTileCoordinates_jamtrs_k$ = function (coords, z) {
1010
+ var tile = this.toTileCoordinatesFloat_fctdpc_k$(coords, z);
1011
+ return new TileCoordinates(tile.x_1, tile.y_1, tile.z_1);
1012
1012
  };
1013
- protoOf(ElevationFunctions).az = function (coords, z, tileSize) {
1014
- var tile = this.xz(coords, z);
1013
+ protoOf(ElevationFunctions).toPixel_iyzwlj_k$ = function (coords, z, tileSize) {
1014
+ var tile = this.toTileCoordinatesFloat_fctdpc_k$(coords, z);
1015
1015
  // Inline function 'kotlin.math.floor' call
1016
- var x = (tile.a10_1 - tile.yz_1) * tileSize;
1016
+ var x = (tile.xFloat_1 - tile.x_1) * tileSize;
1017
1017
  var tmp$ret$0 = Math.floor(x);
1018
1018
  var px = coerceIn(numberToInt(tmp$ret$0), 0, tileSize - 1 | 0);
1019
1019
  // Inline function 'kotlin.math.floor' call
1020
- var x_0 = (tile.b10_1 - tile.zz_1) * tileSize;
1020
+ var x_0 = (tile.yFloat_1 - tile.y_1) * tileSize;
1021
1021
  var tmp$ret$1 = Math.floor(x_0);
1022
1022
  var py = coerceIn(numberToInt(tmp$ret$1), 0, tileSize - 1 | 0);
1023
- return new Pixel(new TileCoordinates(tile.yz_1, tile.zz_1, z), px, py);
1023
+ return new Pixel(new TileCoordinates(tile.x_1, tile.y_1, z), px, py);
1024
1024
  };
1025
- protoOf(ElevationFunctions).bz = function (coords, z, tileSize) {
1026
- var tile = this.xz(coords, z);
1027
- var px = (tile.a10_1 - tile.yz_1) * tileSize;
1028
- var py = (tile.b10_1 - tile.zz_1) * tileSize;
1029
- return new PixelFloat(new TileCoordinates(tile.yz_1, tile.zz_1, z), px, py);
1025
+ protoOf(ElevationFunctions).toPixelFloat_ler4xt_k$ = function (coords, z, tileSize) {
1026
+ var tile = this.toTileCoordinatesFloat_fctdpc_k$(coords, z);
1027
+ var px = (tile.xFloat_1 - tile.x_1) * tileSize;
1028
+ var py = (tile.yFloat_1 - tile.y_1) * tileSize;
1029
+ return new PixelFloat(new TileCoordinates(tile.x_1, tile.y_1, z), px, py);
1030
1030
  };
1031
1031
  var ElevationFunctions_instance;
1032
1032
  function ElevationFunctions_getInstance() {
@@ -1035,11 +1035,11 @@
1035
1035
  function fetchAndDecodeTile$ref() {
1036
1036
  KFunctionImpl.call(this, 1, 2, 2);
1037
1037
  }
1038
- protoOf(fetchAndDecodeTile$ref).g10 = function (p0, $completion) {
1038
+ protoOf(fetchAndDecodeTile$ref).invoke_fa3hvc_k$ = function (p0, $completion) {
1039
1039
  return fetchAndDecodeTile(p0, $completion);
1040
1040
  };
1041
- protoOf(fetchAndDecodeTile$ref).x6 = function (p1, $completion) {
1042
- return this.g10((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
1041
+ protoOf(fetchAndDecodeTile$ref).invoke_qns8j1_k$ = function (p1, $completion) {
1042
+ return this.invoke_fa3hvc_k$((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
1043
1043
  };
1044
1044
  function ElevationProvider(config, fetcher) {
1045
1045
  config = config === VOID ? new ElevationProviderConfig() : config;
@@ -1050,39 +1050,39 @@
1050
1050
  tmp = fetcher;
1051
1051
  }
1052
1052
  fetcher = tmp;
1053
- this.h10_1 = config;
1054
- var containsArg = this.h10_1.l10_1;
1053
+ this.config_1 = config;
1054
+ var containsArg = this.config_1.zoomLevel_1;
1055
1055
  // Inline function 'kotlin.require' call
1056
1056
  if (!(0 <= containsArg ? containsArg <= 15 : false)) {
1057
- var message = 'Invalid zoom level: ' + this.h10_1.l10_1 + '. Must be an integer between 0 and 15';
1057
+ var message = 'Invalid zoom level: ' + this.config_1.zoomLevel_1 + '. Must be an integer between 0 and 15';
1058
1058
  throw IllegalArgumentException_init_$Create$(toString(message));
1059
1059
  }
1060
1060
  // Inline function 'kotlin.require' call
1061
- if (!(this.h10_1.m10_1 > 0)) {
1062
- var message_0 = 'Invalid cache size: ' + this.h10_1.m10_1 + '. Must be a positive integer';
1061
+ if (!(this.config_1.cacheSize_1 > 0)) {
1062
+ var message_0 = 'Invalid cache size: ' + this.config_1.cacheSize_1 + '. Must be a positive integer';
1063
1063
  throw IllegalArgumentException_init_$Create$(toString(message_0));
1064
1064
  }
1065
1065
  // Inline function 'kotlin.require' call
1066
- if (!(this.h10_1.o10_1 > 0 && (this.h10_1.o10_1 & (this.h10_1.o10_1 - 1 | 0)) === 0)) {
1067
- var message_1 = 'Invalid tile size: ' + this.h10_1.o10_1 + '. Must be a positive power of 2';
1066
+ if (!(this.config_1.tileSize_1 > 0 && (this.config_1.tileSize_1 & (this.config_1.tileSize_1 - 1 | 0)) === 0)) {
1067
+ var message_1 = 'Invalid tile size: ' + this.config_1.tileSize_1 + '. Must be a positive power of 2';
1068
1068
  throw IllegalArgumentException_init_$Create$(toString(message_1));
1069
1069
  }
1070
- this.i10_1 = new TileManager(this.h10_1.n10_1, this.h10_1.m10_1, fetcher);
1071
- this.j10_1 = new ElevationCalculator(this.i10_1, this.h10_1.o10_1);
1072
- this.k10_1 = new BatchCalculator(this.j10_1);
1070
+ this.tileManager_1 = new TileManager(this.config_1.tileUrlTemplate_1, this.config_1.cacheSize_1, fetcher);
1071
+ this.calculator_1 = new ElevationCalculator(this.tileManager_1, this.config_1.tileSize_1);
1072
+ this.batchCalculator_1 = new BatchCalculator(this.calculator_1);
1073
1073
  }
1074
- protoOf(ElevationProvider).q10 = function (latitude, longitude, interpolation, $completion) {
1075
- return this.j10_1.zu(new LatLon(latitude, longitude), this.h10_1.l10_1, interpolation, $completion);
1074
+ protoOf(ElevationProvider).getElevation_vb6cmz_k$ = function (latitude, longitude, interpolation, $completion) {
1075
+ return this.calculator_1.getElevation_e117b3_k$(new LatLon(latitude, longitude), this.config_1.zoomLevel_1, interpolation, $completion);
1076
1076
  };
1077
- protoOf(ElevationProvider).r10 = function (coordinates, interpolation, $completion) {
1078
- return this.k10_1.mw(coordinates, this.h10_1.l10_1, interpolation, VOID, $completion);
1077
+ protoOf(ElevationProvider).setElevations_opglu7_k$ = function (coordinates, interpolation, $completion) {
1078
+ return this.batchCalculator_1.setElevations$default_qzn313_k$(coordinates, this.config_1.zoomLevel_1, interpolation, VOID, $completion);
1079
1079
  };
1080
- protoOf(ElevationProvider).s10 = function (coordinates, interpolation, $completion, $super) {
1080
+ protoOf(ElevationProvider).setElevations$default_vdh3yj_k$ = function (coordinates, interpolation, $completion, $super) {
1081
1081
  interpolation = interpolation === VOID ? true : interpolation;
1082
- return $super === VOID ? this.r10(coordinates, interpolation, $completion) : $super.r10.call(this, coordinates, interpolation, $completion);
1082
+ return $super === VOID ? this.setElevations_opglu7_k$(coordinates, interpolation, $completion) : $super.setElevations_opglu7_k$.call(this, coordinates, interpolation, $completion);
1083
1083
  };
1084
- protoOf(ElevationProvider).t10 = function (path, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion) {
1085
- return this.k10_1.qw(path, this.h10_1.l10_1, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion);
1084
+ protoOf(ElevationProvider).getElevationsAlong_o6hmac_k$ = function (path, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion) {
1085
+ return this.batchCalculator_1.getElevationsAlong_4qke12_k$(path, this.config_1.zoomLevel_1, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion);
1086
1086
  };
1087
1087
  function ElevationProviderConfig(zoomLevel, cacheSize, tileUrlTemplate, tileSize, attribution) {
1088
1088
  zoomLevel = zoomLevel === VOID ? 12 : zoomLevel;
@@ -1090,21 +1090,21 @@
1090
1090
  tileUrlTemplate = tileUrlTemplate === VOID ? 'https://tiles.mapterhorn.com/{z}/{x}/{y}.webp' : tileUrlTemplate;
1091
1091
  tileSize = tileSize === VOID ? 512 : tileSize;
1092
1092
  attribution = attribution === VOID ? new Attribution('Mapterhorn elevation data. See mapterhorn.com/attribution/ for details.', 'https://mapterhorn.com/attribution/') : attribution;
1093
- this.l10_1 = zoomLevel;
1094
- this.m10_1 = cacheSize;
1095
- this.n10_1 = tileUrlTemplate;
1096
- this.o10_1 = tileSize;
1097
- this.p10_1 = attribution;
1093
+ this.zoomLevel_1 = zoomLevel;
1094
+ this.cacheSize_1 = cacheSize;
1095
+ this.tileUrlTemplate_1 = tileUrlTemplate;
1096
+ this.tileSize_1 = tileSize;
1097
+ this.attribution_1 = attribution;
1098
1098
  }
1099
1099
  protoOf(ElevationProviderConfig).toString = function () {
1100
- return 'ElevationProviderConfig(zoomLevel=' + this.l10_1 + ', cacheSize=' + this.m10_1 + ', tileUrlTemplate=' + this.n10_1 + ', tileSize=' + this.o10_1 + ', attribution=' + this.p10_1.toString() + ')';
1100
+ return 'ElevationProviderConfig(zoomLevel=' + this.zoomLevel_1 + ', cacheSize=' + this.cacheSize_1 + ', tileUrlTemplate=' + this.tileUrlTemplate_1 + ', tileSize=' + this.tileSize_1 + ', attribution=' + this.attribution_1.toString() + ')';
1101
1101
  };
1102
1102
  protoOf(ElevationProviderConfig).hashCode = function () {
1103
- var result = this.l10_1;
1104
- result = imul(result, 31) + this.m10_1 | 0;
1105
- result = imul(result, 31) + getStringHashCode(this.n10_1) | 0;
1106
- result = imul(result, 31) + this.o10_1 | 0;
1107
- result = imul(result, 31) + this.p10_1.hashCode() | 0;
1103
+ var result = this.zoomLevel_1;
1104
+ result = imul(result, 31) + this.cacheSize_1 | 0;
1105
+ result = imul(result, 31) + getStringHashCode(this.tileUrlTemplate_1) | 0;
1106
+ result = imul(result, 31) + this.tileSize_1 | 0;
1107
+ result = imul(result, 31) + this.attribution_1.hashCode() | 0;
1108
1108
  return result;
1109
1109
  };
1110
1110
  protoOf(ElevationProviderConfig).equals = function (other) {
@@ -1112,29 +1112,29 @@
1112
1112
  return true;
1113
1113
  if (!(other instanceof ElevationProviderConfig))
1114
1114
  return false;
1115
- if (!(this.l10_1 === other.l10_1))
1115
+ if (!(this.zoomLevel_1 === other.zoomLevel_1))
1116
1116
  return false;
1117
- if (!(this.m10_1 === other.m10_1))
1117
+ if (!(this.cacheSize_1 === other.cacheSize_1))
1118
1118
  return false;
1119
- if (!(this.n10_1 === other.n10_1))
1119
+ if (!(this.tileUrlTemplate_1 === other.tileUrlTemplate_1))
1120
1120
  return false;
1121
- if (!(this.o10_1 === other.o10_1))
1121
+ if (!(this.tileSize_1 === other.tileSize_1))
1122
1122
  return false;
1123
- if (!this.p10_1.equals(other.p10_1))
1123
+ if (!this.attribution_1.equals(other.attribution_1))
1124
1124
  return false;
1125
1125
  return true;
1126
1126
  };
1127
1127
  function Attribution(text, url) {
1128
1128
  url = url === VOID ? null : url;
1129
- this.u10_1 = text;
1130
- this.v10_1 = url;
1129
+ this.text_1 = text;
1130
+ this.url_1 = url;
1131
1131
  }
1132
1132
  protoOf(Attribution).toString = function () {
1133
- return 'Attribution(text=' + this.u10_1 + ', url=' + this.v10_1 + ')';
1133
+ return 'Attribution(text=' + this.text_1 + ', url=' + this.url_1 + ')';
1134
1134
  };
1135
1135
  protoOf(Attribution).hashCode = function () {
1136
- var result = getStringHashCode(this.u10_1);
1137
- result = imul(result, 31) + (this.v10_1 == null ? 0 : getStringHashCode(this.v10_1)) | 0;
1136
+ var result = getStringHashCode(this.text_1);
1137
+ result = imul(result, 31) + (this.url_1 == null ? 0 : getStringHashCode(this.url_1)) | 0;
1138
1138
  return result;
1139
1139
  };
1140
1140
  protoOf(Attribution).equals = function (other) {
@@ -1142,9 +1142,9 @@
1142
1142
  return true;
1143
1143
  if (!(other instanceof Attribution))
1144
1144
  return false;
1145
- if (!(this.u10_1 === other.u10_1))
1145
+ if (!(this.text_1 === other.text_1))
1146
1146
  return false;
1147
- if (!(this.v10_1 == other.v10_1))
1147
+ if (!(this.url_1 == other.url_1))
1148
1148
  return false;
1149
1149
  return true;
1150
1150
  };
@@ -1155,7 +1155,7 @@
1155
1155
  startIndex = startIndex - 1 | 0;
1156
1156
  }
1157
1157
  var endIndex = index;
1158
- while (endIndex < (points.l() - 1 | 0) && distances[endIndex + 1 | 0] - current <= windowSize) {
1158
+ while (endIndex < (points.get_size_woubt6_k$() - 1 | 0) && distances[endIndex + 1 | 0] - current <= windowSize) {
1159
1159
  endIndex = endIndex + 1 | 0;
1160
1160
  }
1161
1161
  var totalWeight = 0.0;
@@ -1171,10 +1171,10 @@
1171
1171
  var d = Math.abs(this_0);
1172
1172
  var weight = 1.0 - d / windowSize;
1173
1173
  totalWeight = totalWeight + weight;
1174
- weightedSum = weightedSum + points.m(j).ww() * weight;
1174
+ weightedSum = weightedSum + points.get_c1px32_k$(j).get_elevation_8fwyb8_k$() * weight;
1175
1175
  }
1176
1176
  while (!(j === last));
1177
- return totalWeight > 0.0 ? weightedSum / totalWeight : points.m(index).ww();
1177
+ return totalWeight > 0.0 ? weightedSum / totalWeight : points.get_c1px32_k$(index).get_elevation_8fwyb8_k$();
1178
1178
  }
1179
1179
  function formatWindow($this, w) {
1180
1180
  var asLong = numberToLong(w);
@@ -1182,18 +1182,18 @@
1182
1182
  }
1183
1183
  function ElevationSmoother() {
1184
1184
  }
1185
- protoOf(ElevationSmoother).nw = function (points, windowSize) {
1186
- if (points.l() < 3)
1185
+ protoOf(ElevationSmoother).smooth_j2mgq7_k$ = function (points, windowSize) {
1186
+ if (points.get_size_woubt6_k$() < 3)
1187
1187
  return points;
1188
1188
  // Inline function 'kotlin.require' call
1189
1189
  if (!(windowSize > 0.0)) {
1190
1190
  var message = 'Invalid window size: ' + formatWindow(ElevationSmoother_instance, windowSize) + '. Must be positive';
1191
1191
  throw IllegalArgumentException_init_$Create$(toString(message));
1192
1192
  }
1193
- var distances = Distance_instance.ax(points);
1193
+ var distances = Distance_instance.cumulativeDistances_92iok5_k$(points);
1194
1194
  // Inline function 'kotlin.collections.List' call
1195
1195
  // Inline function 'kotlin.collections.MutableList' call
1196
- var size = points.l();
1196
+ var size = points.get_size_woubt6_k$();
1197
1197
  var list = ArrayList_init_$Create$_0(size);
1198
1198
  // Inline function 'kotlin.repeat' call
1199
1199
  var inductionVariable = 0;
@@ -1202,8 +1202,8 @@
1202
1202
  var index = inductionVariable;
1203
1203
  inductionVariable = inductionVariable + 1 | 0;
1204
1204
  var smoothed = computeSmoothedValue(ElevationSmoother_instance, index, points, distances, windowSize);
1205
- var tmp$ret$6 = new LatLonElevation(points.m(index).av(), points.m(index).bv(), smoothed);
1206
- list.h(tmp$ret$6);
1205
+ var tmp$ret$6 = new LatLonElevation(points.get_c1px32_k$(index).get_latitude_feukvp_k$(), points.get_c1px32_k$(index).get_longitude_asb1fq_k$(), smoothed);
1206
+ list.add_utx5q5_k$(tmp$ret$6);
1207
1207
  }
1208
1208
  while (inductionVariable < size);
1209
1209
  return list;
@@ -1213,120 +1213,120 @@
1213
1213
  return ElevationSmoother_instance;
1214
1214
  }
1215
1215
  function Flux$forEachParallel$slambda$slambda($semaphore, $action, $item, resultContinuation) {
1216
- this.e11_1 = $semaphore;
1217
- this.f11_1 = $action;
1218
- this.g11_1 = $item;
1216
+ this.$semaphore_1 = $semaphore;
1217
+ this.$action_1 = $action;
1218
+ this.$item_1 = $item;
1219
1219
  CoroutineImpl.call(this, resultContinuation);
1220
1220
  }
1221
- protoOf(Flux$forEachParallel$slambda$slambda).k11 = function ($this$async, $completion) {
1222
- var tmp = this.l11($this$async, $completion);
1223
- tmp.j6_1 = Unit_instance;
1224
- tmp.k6_1 = null;
1225
- return tmp.p6();
1221
+ protoOf(Flux$forEachParallel$slambda$slambda).invoke_d9fzmj_k$ = function ($this$async, $completion) {
1222
+ var tmp = this.create_rcuf4x_k$($this$async, $completion);
1223
+ tmp.result_1 = Unit_instance;
1224
+ tmp.exception_1 = null;
1225
+ return tmp.doResume_5yljmg_k$();
1226
1226
  };
1227
- protoOf(Flux$forEachParallel$slambda$slambda).x6 = function (p1, $completion) {
1228
- return this.k11((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1227
+ protoOf(Flux$forEachParallel$slambda$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
1228
+ return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1229
1229
  };
1230
- protoOf(Flux$forEachParallel$slambda$slambda).p6 = function () {
1231
- var suspendResult = this.j6_1;
1230
+ protoOf(Flux$forEachParallel$slambda$slambda).doResume_5yljmg_k$ = function () {
1231
+ var suspendResult = this.result_1;
1232
1232
  $sm: do
1233
1233
  try {
1234
- var tmp = this.h6_1;
1234
+ var tmp = this.state_1;
1235
1235
  switch (tmp) {
1236
1236
  case 0:
1237
- this.i6_1 = 6;
1238
- this.i11_1 = this.e11_1;
1239
- this.h6_1 = 1;
1240
- suspendResult = this.i11_1.bs(this);
1237
+ this.exceptionState_1 = 6;
1238
+ this.this0__1 = this.$semaphore_1;
1239
+ this.state_1 = 1;
1240
+ suspendResult = this.this0__1.acquire_kfvtdt_k$(this);
1241
1241
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1242
1242
  return suspendResult;
1243
1243
  }
1244
1244
 
1245
1245
  continue $sm;
1246
1246
  case 1:
1247
- this.j11_1 = Unit_instance;
1248
- this.h6_1 = 2;
1247
+ this.tmp$ret$01__1 = Unit_instance;
1248
+ this.state_1 = 2;
1249
1249
  continue $sm;
1250
1250
  case 2:
1251
- this.i6_1 = 5;
1252
- this.h6_1 = 3;
1253
- suspendResult = this.f11_1(this.g11_1, this);
1251
+ this.exceptionState_1 = 5;
1252
+ this.state_1 = 3;
1253
+ suspendResult = this.$action_1(this.$item_1, this);
1254
1254
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1255
1255
  return suspendResult;
1256
1256
  }
1257
1257
 
1258
1258
  continue $sm;
1259
1259
  case 3:
1260
- this.j11_1 = Unit_instance;
1261
- this.i6_1 = 6;
1262
- this.h6_1 = 4;
1260
+ this.tmp$ret$01__1 = Unit_instance;
1261
+ this.exceptionState_1 = 6;
1262
+ this.state_1 = 4;
1263
1263
  continue $sm;
1264
1264
  case 4:
1265
- this.j11_1;
1266
- this.i6_1 = 6;
1267
- this.i11_1.vr();
1265
+ this.tmp$ret$01__1;
1266
+ this.exceptionState_1 = 6;
1267
+ this.this0__1.release_wu5yyf_k$();
1268
1268
  return Unit_instance;
1269
1269
  case 5:
1270
- this.i6_1 = 6;
1271
- var t = this.k6_1;
1272
- this.i11_1.vr();
1270
+ this.exceptionState_1 = 6;
1271
+ var t = this.exception_1;
1272
+ this.this0__1.release_wu5yyf_k$();
1273
1273
  throw t;
1274
1274
  case 6:
1275
- throw this.k6_1;
1275
+ throw this.exception_1;
1276
1276
  }
1277
1277
  } catch ($p) {
1278
1278
  var e = $p;
1279
- if (this.i6_1 === 6) {
1279
+ if (this.exceptionState_1 === 6) {
1280
1280
  throw e;
1281
1281
  } else {
1282
- this.h6_1 = this.i6_1;
1283
- this.k6_1 = e;
1282
+ this.state_1 = this.exceptionState_1;
1283
+ this.exception_1 = e;
1284
1284
  }
1285
1285
  }
1286
1286
  while (true);
1287
1287
  };
1288
- protoOf(Flux$forEachParallel$slambda$slambda).l11 = function ($this$async, completion) {
1289
- var i = new Flux$forEachParallel$slambda$slambda(this.e11_1, this.f11_1, this.g11_1, completion);
1290
- i.h11_1 = $this$async;
1288
+ protoOf(Flux$forEachParallel$slambda$slambda).create_rcuf4x_k$ = function ($this$async, completion) {
1289
+ var i = new Flux$forEachParallel$slambda$slambda(this.$semaphore_1, this.$action_1, this.$item_1, completion);
1290
+ i.$this$async_1 = $this$async;
1291
1291
  return i;
1292
1292
  };
1293
1293
  function Flux$forEachParallel$slambda$slambda_0($semaphore, $action, $item, resultContinuation) {
1294
1294
  var i = new Flux$forEachParallel$slambda$slambda($semaphore, $action, $item, resultContinuation);
1295
1295
  return constructCallableReference(function ($this$async, $completion) {
1296
- return i.k11($this$async, $completion);
1296
+ return i.invoke_d9fzmj_k$($this$async, $completion);
1297
1297
  }, 1);
1298
1298
  }
1299
1299
  function Flux$forEachParallel$slambda($maxParallel, $items, $action, resultContinuation) {
1300
- this.u11_1 = $maxParallel;
1301
- this.v11_1 = $items;
1302
- this.w11_1 = $action;
1300
+ this.$maxParallel_1 = $maxParallel;
1301
+ this.$items_1 = $items;
1302
+ this.$action_1 = $action;
1303
1303
  CoroutineImpl.call(this, resultContinuation);
1304
1304
  }
1305
- protoOf(Flux$forEachParallel$slambda).y11 = function ($this$coroutineScope, $completion) {
1306
- var tmp = this.l11($this$coroutineScope, $completion);
1307
- tmp.j6_1 = Unit_instance;
1308
- tmp.k6_1 = null;
1309
- return tmp.p6();
1305
+ protoOf(Flux$forEachParallel$slambda).invoke_pvnt3t_k$ = function ($this$coroutineScope, $completion) {
1306
+ var tmp = this.create_rcuf4x_k$($this$coroutineScope, $completion);
1307
+ tmp.result_1 = Unit_instance;
1308
+ tmp.exception_1 = null;
1309
+ return tmp.doResume_5yljmg_k$();
1310
1310
  };
1311
- protoOf(Flux$forEachParallel$slambda).x6 = function (p1, $completion) {
1312
- return this.y11((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1311
+ protoOf(Flux$forEachParallel$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
1312
+ return this.invoke_pvnt3t_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1313
1313
  };
1314
- protoOf(Flux$forEachParallel$slambda).p6 = function () {
1315
- var suspendResult = this.j6_1;
1314
+ protoOf(Flux$forEachParallel$slambda).doResume_5yljmg_k$ = function () {
1315
+ var suspendResult = this.result_1;
1316
1316
  $sm: do
1317
1317
  try {
1318
- var tmp = this.h6_1;
1318
+ var tmp = this.state_1;
1319
1319
  switch (tmp) {
1320
1320
  case 0:
1321
- this.i6_1 = 2;
1322
- var semaphore = Semaphore(this.u11_1);
1323
- this.h6_1 = 1;
1324
- var this_0 = this.v11_1;
1321
+ this.exceptionState_1 = 2;
1322
+ var semaphore = Semaphore(this.$maxParallel_1);
1323
+ this.state_1 = 1;
1324
+ var this_0 = this.$items_1;
1325
1325
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
1326
- var _iterator__ex2g4s = this_0.i();
1327
- while (_iterator__ex2g4s.j()) {
1328
- var item = _iterator__ex2g4s.k();
1329
- destination.h(async(this.x11_1, VOID, VOID, Flux$forEachParallel$slambda$slambda_0(semaphore, this.w11_1, item, null)));
1326
+ var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
1327
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
1328
+ var item = _iterator__ex2g4s.next_20eer_k$();
1329
+ destination.add_utx5q5_k$(async(this.$this$coroutineScope_1, VOID, VOID, Flux$forEachParallel$slambda$slambda_0(semaphore, this.$action_1, item, null)));
1330
1330
  }
1331
1331
 
1332
1332
  suspendResult = awaitAll(destination, this);
@@ -1338,52 +1338,52 @@
1338
1338
  case 1:
1339
1339
  return suspendResult;
1340
1340
  case 2:
1341
- throw this.k6_1;
1341
+ throw this.exception_1;
1342
1342
  }
1343
1343
  } catch ($p) {
1344
1344
  var e = $p;
1345
- if (this.i6_1 === 2) {
1345
+ if (this.exceptionState_1 === 2) {
1346
1346
  throw e;
1347
1347
  } else {
1348
- this.h6_1 = this.i6_1;
1349
- this.k6_1 = e;
1348
+ this.state_1 = this.exceptionState_1;
1349
+ this.exception_1 = e;
1350
1350
  }
1351
1351
  }
1352
1352
  while (true);
1353
1353
  };
1354
- protoOf(Flux$forEachParallel$slambda).l11 = function ($this$coroutineScope, completion) {
1355
- var i = new Flux$forEachParallel$slambda(this.u11_1, this.v11_1, this.w11_1, completion);
1356
- i.x11_1 = $this$coroutineScope;
1354
+ protoOf(Flux$forEachParallel$slambda).create_rcuf4x_k$ = function ($this$coroutineScope, completion) {
1355
+ var i = new Flux$forEachParallel$slambda(this.$maxParallel_1, this.$items_1, this.$action_1, completion);
1356
+ i.$this$coroutineScope_1 = $this$coroutineScope;
1357
1357
  return i;
1358
1358
  };
1359
1359
  function Flux$forEachParallel$slambda_0($maxParallel, $items, $action, resultContinuation) {
1360
1360
  var i = new Flux$forEachParallel$slambda($maxParallel, $items, $action, resultContinuation);
1361
1361
  return constructCallableReference(function ($this$coroutineScope, $completion) {
1362
- return i.y11($this$coroutineScope, $completion);
1362
+ return i.invoke_pvnt3t_k$($this$coroutineScope, $completion);
1363
1363
  }, 1);
1364
1364
  }
1365
1365
  function $forEachParallelCOROUTINE$(_this__u8e3s4, items, maxParallel, action, resultContinuation) {
1366
1366
  CoroutineImpl.call(this, resultContinuation);
1367
- this.h12_1 = _this__u8e3s4;
1368
- this.i12_1 = items;
1369
- this.j12_1 = maxParallel;
1370
- this.k12_1 = action;
1367
+ this._this__u8e3s4__1 = _this__u8e3s4;
1368
+ this.items_1 = items;
1369
+ this.maxParallel_1 = maxParallel;
1370
+ this.action_1 = action;
1371
1371
  }
1372
- protoOf($forEachParallelCOROUTINE$).p6 = function () {
1373
- var suspendResult = this.j6_1;
1372
+ protoOf($forEachParallelCOROUTINE$).doResume_5yljmg_k$ = function () {
1373
+ var suspendResult = this.result_1;
1374
1374
  $sm: do
1375
1375
  try {
1376
- var tmp = this.h6_1;
1376
+ var tmp = this.state_1;
1377
1377
  switch (tmp) {
1378
1378
  case 0:
1379
- this.i6_1 = 2;
1380
- if (!(this.j12_1 >= 1)) {
1381
- var message = 'maxParallel must be >= 1, got ' + this.j12_1;
1379
+ this.exceptionState_1 = 2;
1380
+ if (!(this.maxParallel_1 >= 1)) {
1381
+ var message = 'maxParallel must be >= 1, got ' + this.maxParallel_1;
1382
1382
  throw IllegalArgumentException_init_$Create$(toString(message));
1383
1383
  }
1384
1384
 
1385
- this.h6_1 = 1;
1386
- suspendResult = coroutineScope(Flux$forEachParallel$slambda_0(this.j12_1, this.i12_1, this.k12_1, null), this);
1385
+ this.state_1 = 1;
1386
+ suspendResult = coroutineScope(Flux$forEachParallel$slambda_0(this.maxParallel_1, this.items_1, this.action_1, null), this);
1387
1387
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1388
1388
  return suspendResult;
1389
1389
  }
@@ -1392,26 +1392,26 @@
1392
1392
  case 1:
1393
1393
  return Unit_instance;
1394
1394
  case 2:
1395
- throw this.k6_1;
1395
+ throw this.exception_1;
1396
1396
  }
1397
1397
  } catch ($p) {
1398
1398
  var e = $p;
1399
- if (this.i6_1 === 2) {
1399
+ if (this.exceptionState_1 === 2) {
1400
1400
  throw e;
1401
1401
  } else {
1402
- this.h6_1 = this.i6_1;
1403
- this.k6_1 = e;
1402
+ this.state_1 = this.exceptionState_1;
1403
+ this.exception_1 = e;
1404
1404
  }
1405
1405
  }
1406
1406
  while (true);
1407
1407
  };
1408
1408
  function Flux() {
1409
1409
  }
1410
- protoOf(Flux).uv = function (items, maxParallel, action, $completion) {
1410
+ protoOf(Flux).forEachParallel_gstfa7_k$ = function (items, maxParallel, action, $completion) {
1411
1411
  var tmp = new $forEachParallelCOROUTINE$(this, items, maxParallel, action, $completion);
1412
- tmp.j6_1 = Unit_instance;
1413
- tmp.k6_1 = null;
1414
- return tmp.p6();
1412
+ tmp.result_1 = Unit_instance;
1413
+ tmp.exception_1 = null;
1414
+ return tmp.doResume_5yljmg_k$();
1415
1415
  };
1416
1416
  var Flux_instance;
1417
1417
  function Flux_getInstance() {
@@ -1419,21 +1419,21 @@
1419
1419
  }
1420
1420
  function $getCOROUTINE$(_this__u8e3s4, key, resultContinuation) {
1421
1421
  CoroutineImpl.call(this, resultContinuation);
1422
- this.t12_1 = _this__u8e3s4;
1423
- this.u12_1 = key;
1422
+ this._this__u8e3s4__1 = _this__u8e3s4;
1423
+ this.key_1 = key;
1424
1424
  }
1425
- protoOf($getCOROUTINE$).p6 = function () {
1426
- var suspendResult = this.j6_1;
1425
+ protoOf($getCOROUTINE$).doResume_5yljmg_k$ = function () {
1426
+ var suspendResult = this.result_1;
1427
1427
  $sm: do
1428
1428
  try {
1429
- var tmp = this.h6_1;
1429
+ var tmp = this.state_1;
1430
1430
  switch (tmp) {
1431
1431
  case 0:
1432
- this.i6_1 = 12;
1433
- this.g13_1 = this.t12_1.k13_1;
1434
- this.f13_1 = null;
1435
- this.h6_1 = 1;
1436
- suspendResult = this.g13_1.tr(this.f13_1, this);
1432
+ this.exceptionState_1 = 12;
1433
+ this.this11__1 = this._this__u8e3s4__1.mutex_1;
1434
+ this.owner10__1 = null;
1435
+ this.state_1 = 1;
1436
+ suspendResult = this.this11__1.lock_ugrcvf_k$(this.owner10__1, this);
1437
1437
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1438
1438
  return suspendResult;
1439
1439
  }
@@ -1446,52 +1446,52 @@
1446
1446
  l$ret$1: do {
1447
1447
  var tmp_0;
1448
1448
  try {
1449
- var tmp0_safe_receiver = this.t12_1.l13_1.d3(this.u12_1);
1449
+ var tmp0_safe_receiver = this._this__u8e3s4__1.entries_1.remove_gppy8k_k$(this.key_1);
1450
1450
  if (tmp0_safe_receiver == null)
1451
1451
  null;
1452
1452
  else {
1453
- var tmp0 = this.t12_1.l13_1;
1454
- var key = this.u12_1;
1455
- tmp0.c3(key, tmp0_safe_receiver);
1453
+ var tmp0 = this._this__u8e3s4__1.entries_1;
1454
+ var key = this.key_1;
1455
+ tmp0.put_4fpzoq_k$(key, tmp0_safe_receiver);
1456
1456
  tmp$ret$0 = tmp0_safe_receiver;
1457
1457
  break l$ret$1;
1458
1458
  }
1459
- tmp$ret$2 = this.t12_1.m13_1.k1(this.u12_1);
1459
+ tmp$ret$2 = this._this__u8e3s4__1.inFlight_1.get_wei43m_k$(this.key_1);
1460
1460
  break l$ret$3;
1461
1461
  } catch ($p) {
1462
1462
  var tmp_1;
1463
1463
  var t = $p;
1464
- this.g13_1.fr(this.f13_1);
1464
+ this.this11__1.unlock_ulcrcl_k$(this.owner10__1);
1465
1465
  throw t;
1466
1466
  }
1467
1467
  }
1468
1468
  while (false);
1469
1469
  var tmp_2 = tmp$ret$0;
1470
- this.g13_1.fr(this.f13_1);
1470
+ this.this11__1.unlock_ulcrcl_k$(this.owner10__1);
1471
1471
  return tmp_2;
1472
1472
  }
1473
1473
  while (false);
1474
1474
  var tmp_3 = tmp$ret$2;
1475
- this.g13_1.fr(this.f13_1);
1475
+ this.this11__1.unlock_ulcrcl_k$(this.owner10__1);
1476
1476
  var existing = tmp_3;
1477
1477
  if (!(existing == null)) {
1478
- this.h6_1 = 11;
1479
- suspendResult = existing.nj(this);
1478
+ this.state_1 = 11;
1479
+ suspendResult = existing.await_4rdzbx_k$(this);
1480
1480
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1481
1481
  return suspendResult;
1482
1482
  }
1483
1483
  continue $sm;
1484
1484
  } else {
1485
- this.h6_1 = 2;
1485
+ this.state_1 = 2;
1486
1486
  continue $sm;
1487
1487
  }
1488
1488
 
1489
1489
  case 2:
1490
- this.w12_1 = CompletableDeferred();
1491
- this.e13_1 = this.t12_1.k13_1;
1492
- this.d13_1 = null;
1493
- this.h6_1 = 3;
1494
- suspendResult = this.e13_1.tr(this.d13_1, this);
1490
+ this.ours1__1 = CompletableDeferred();
1491
+ this.this9__1 = this._this__u8e3s4__1.mutex_1;
1492
+ this.owner8__1 = null;
1493
+ this.state_1 = 3;
1494
+ suspendResult = this.this9__1.lock_ugrcvf_k$(this.owner8__1, this);
1495
1495
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1496
1496
  return suspendResult;
1497
1497
  }
@@ -1504,25 +1504,25 @@
1504
1504
  l$ret$5: do {
1505
1505
  var tmp_4;
1506
1506
  try {
1507
- var tmp0_safe_receiver_0 = this.t12_1.l13_1.d3(this.u12_1);
1507
+ var tmp0_safe_receiver_0 = this._this__u8e3s4__1.entries_1.remove_gppy8k_k$(this.key_1);
1508
1508
  if (tmp0_safe_receiver_0 == null)
1509
1509
  null;
1510
1510
  else {
1511
- var tmp0_0 = this.t12_1.l13_1;
1512
- var key_0 = this.u12_1;
1513
- tmp0_0.c3(key_0, tmp0_safe_receiver_0);
1511
+ var tmp0_0 = this._this__u8e3s4__1.entries_1;
1512
+ var key_0 = this.key_1;
1513
+ tmp0_0.put_4fpzoq_k$(key_0, tmp0_safe_receiver_0);
1514
1514
  tmp$ret$4 = tmp0_safe_receiver_0;
1515
1515
  break l$ret$5;
1516
1516
  }
1517
- var raced = this.t12_1.m13_1.k1(this.u12_1);
1517
+ var raced = this._this__u8e3s4__1.inFlight_1.get_wei43m_k$(this.key_1);
1518
1518
  var tmp_5;
1519
1519
  if (!(raced == null)) {
1520
1520
  tmp_5 = raced;
1521
1521
  } else {
1522
- var tmp0_1 = this.t12_1.m13_1;
1523
- var tmp2 = this.u12_1;
1524
- var value = this.w12_1;
1525
- tmp0_1.c3(tmp2, value);
1522
+ var tmp0_1 = this._this__u8e3s4__1.inFlight_1;
1523
+ var tmp2 = this.key_1;
1524
+ var value = this.ours1__1;
1525
+ tmp0_1.put_4fpzoq_k$(tmp2, value);
1526
1526
  tmp_5 = null;
1527
1527
  }
1528
1528
  tmp$ret$6 = tmp_5;
@@ -1530,87 +1530,87 @@
1530
1530
  } catch ($p_0) {
1531
1531
  var tmp_6;
1532
1532
  var t_0 = $p_0;
1533
- this.e13_1.fr(this.d13_1);
1533
+ this.this9__1.unlock_ulcrcl_k$(this.owner8__1);
1534
1534
  throw t_0;
1535
1535
  }
1536
1536
  }
1537
1537
  while (false);
1538
1538
  var tmp_7 = tmp$ret$4;
1539
- this.e13_1.fr(this.d13_1);
1539
+ this.this9__1.unlock_ulcrcl_k$(this.owner8__1);
1540
1540
  return tmp_7;
1541
1541
  }
1542
1542
  while (false);
1543
1543
  var tmp_8 = tmp$ret$6;
1544
- this.e13_1.fr(this.d13_1);
1544
+ this.this9__1.unlock_ulcrcl_k$(this.owner8__1);
1545
1545
  var awaitInstead = tmp_8;
1546
1546
  if (!(awaitInstead == null)) {
1547
- this.h6_1 = 10;
1548
- suspendResult = awaitInstead.nj(this);
1547
+ this.state_1 = 10;
1548
+ suspendResult = awaitInstead.await_4rdzbx_k$(this);
1549
1549
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1550
1550
  return suspendResult;
1551
1551
  }
1552
1552
  continue $sm;
1553
1553
  } else {
1554
- this.h6_1 = 4;
1554
+ this.state_1 = 4;
1555
1555
  continue $sm;
1556
1556
  }
1557
1557
 
1558
1558
  case 4:
1559
- this.i6_1 = 6;
1560
- this.h6_1 = 5;
1561
- suspendResult = this.t12_1.i13_1(this.u12_1, this);
1559
+ this.exceptionState_1 = 6;
1560
+ this.state_1 = 5;
1561
+ suspendResult = this._this__u8e3s4__1.loader_1(this.key_1, this);
1562
1562
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1563
1563
  return suspendResult;
1564
1564
  }
1565
1565
 
1566
1566
  continue $sm;
1567
1567
  case 5:
1568
- this.z12_1 = suspendResult;
1569
- this.i6_1 = 12;
1570
- this.h6_1 = 8;
1568
+ this.TRY_RESULT4__1 = suspendResult;
1569
+ this.exceptionState_1 = 12;
1570
+ this.state_1 = 8;
1571
1571
  continue $sm;
1572
1572
  case 6:
1573
- this.i6_1 = 12;
1574
- var tmp_9 = this.k6_1;
1573
+ this.exceptionState_1 = 12;
1574
+ var tmp_9 = this.exception_1;
1575
1575
  if (tmp_9 instanceof Error) {
1576
- this.a13_1 = this.k6_1;
1577
- this.c13_1 = this.t12_1.k13_1;
1578
- this.b13_1 = null;
1579
- this.h6_1 = 7;
1580
- suspendResult = this.c13_1.tr(this.b13_1, this);
1576
+ this.t5__1 = this.exception_1;
1577
+ this.this7__1 = this._this__u8e3s4__1.mutex_1;
1578
+ this.owner6__1 = null;
1579
+ this.state_1 = 7;
1580
+ suspendResult = this.this7__1.lock_ugrcvf_k$(this.owner6__1, this);
1581
1581
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1582
1582
  return suspendResult;
1583
1583
  }
1584
1584
  continue $sm;
1585
1585
  } else {
1586
- throw this.k6_1;
1586
+ throw this.exception_1;
1587
1587
  }
1588
1588
 
1589
1589
  case 7:
1590
1590
  l$ret$9: do {
1591
1591
  var tmp_10;
1592
1592
  try {
1593
- this.t12_1.m13_1.d3(this.u12_1);
1593
+ this._this__u8e3s4__1.inFlight_1.remove_gppy8k_k$(this.key_1);
1594
1594
  break l$ret$9;
1595
1595
  } catch ($p_1) {
1596
1596
  var tmp_11;
1597
1597
  var t_1 = $p_1;
1598
- this.c13_1.fr(this.b13_1);
1598
+ this.this7__1.unlock_ulcrcl_k$(this.owner6__1);
1599
1599
  throw t_1;
1600
1600
  }
1601
1601
  }
1602
1602
  while (false);
1603
- this.c13_1.fr(this.b13_1);
1604
- this.w12_1.lm(this.a13_1);
1603
+ this.this7__1.unlock_ulcrcl_k$(this.owner6__1);
1604
+ this.ours1__1.completeExceptionally_xyzekf_k$(this.t5__1);
1605
1605
  var tmp_12 = this;
1606
- throw this.a13_1;
1606
+ throw this.t5__1;
1607
1607
  case 8:
1608
- this.i6_1 = 12;
1609
- this.v12_1 = this.z12_1;
1610
- this.y12_1 = this.t12_1.k13_1;
1611
- this.x12_1 = null;
1612
- this.h6_1 = 9;
1613
- suspendResult = this.y12_1.tr(this.x12_1, this);
1608
+ this.exceptionState_1 = 12;
1609
+ this.value0__1 = this.TRY_RESULT4__1;
1610
+ this.this3__1 = this._this__u8e3s4__1.mutex_1;
1611
+ this.owner2__1 = null;
1612
+ this.state_1 = 9;
1613
+ suspendResult = this.this3__1.lock_ugrcvf_k$(this.owner2__1, this);
1614
1614
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1615
1615
  return suspendResult;
1616
1616
  }
@@ -1620,89 +1620,89 @@
1620
1620
  l$ret$11: do {
1621
1621
  var tmp_13;
1622
1622
  try {
1623
- this.t12_1.m13_1.d3(this.u12_1);
1623
+ this._this__u8e3s4__1.inFlight_1.remove_gppy8k_k$(this.key_1);
1624
1624
  var tmp_14;
1625
- if (this.t12_1.l13_1.l() >= this.t12_1.h13_1) {
1626
- var tmp0_2 = this.t12_1.l13_1;
1627
- var key_1 = this.u12_1;
1628
- tmp_14 = !(isInterface(tmp0_2, KtMap) ? tmp0_2 : THROW_CCE()).j1(key_1);
1625
+ if (this._this__u8e3s4__1.entries_1.get_size_woubt6_k$() >= this._this__u8e3s4__1.maxSize_1) {
1626
+ var tmp0_2 = this._this__u8e3s4__1.entries_1;
1627
+ var key_1 = this.key_1;
1628
+ tmp_14 = !(isInterface(tmp0_2, KtMap) ? tmp0_2 : THROW_CCE()).containsKey_aw81wo_k$(key_1);
1629
1629
  } else {
1630
1630
  tmp_14 = false;
1631
1631
  }
1632
1632
  if (tmp_14) {
1633
- var iter = this.t12_1.l13_1.m1().i();
1634
- var oldest = iter.k();
1635
- var oldestValue = oldest.i1();
1636
- iter.e2();
1637
- var tmp0_safe_receiver_1 = this.t12_1.j13_1;
1633
+ var iter = this._this__u8e3s4__1.entries_1.get_entries_p20ztl_k$().iterator_jk1svi_k$();
1634
+ var oldest = iter.next_20eer_k$();
1635
+ var oldestValue = oldest.get_value_j01efc_k$();
1636
+ iter.remove_ldkf9o_k$();
1637
+ var tmp0_safe_receiver_1 = this._this__u8e3s4__1.onEvict_1;
1638
1638
  if (tmp0_safe_receiver_1 == null)
1639
1639
  null;
1640
1640
  else
1641
1641
  tmp0_safe_receiver_1(oldestValue);
1642
1642
  }
1643
- var tmp0_3 = this.t12_1.l13_1;
1644
- var tmp2_0 = this.u12_1;
1645
- var value_0 = this.v12_1;
1646
- tmp0_3.c3(tmp2_0, value_0);
1643
+ var tmp0_3 = this._this__u8e3s4__1.entries_1;
1644
+ var tmp2_0 = this.key_1;
1645
+ var value_0 = this.value0__1;
1646
+ tmp0_3.put_4fpzoq_k$(tmp2_0, value_0);
1647
1647
  break l$ret$11;
1648
1648
  } catch ($p_2) {
1649
1649
  var tmp_15;
1650
1650
  var t_2 = $p_2;
1651
- this.y12_1.fr(this.x12_1);
1651
+ this.this3__1.unlock_ulcrcl_k$(this.owner2__1);
1652
1652
  throw t_2;
1653
1653
  }
1654
1654
  }
1655
1655
  while (false);
1656
- this.y12_1.fr(this.x12_1);
1657
- this.w12_1.km(this.v12_1);
1658
- return this.v12_1;
1656
+ this.this3__1.unlock_ulcrcl_k$(this.owner2__1);
1657
+ this.ours1__1.complete_ixf84q_k$(this.value0__1);
1658
+ return this.value0__1;
1659
1659
  case 10:
1660
1660
  return suspendResult;
1661
1661
  case 11:
1662
1662
  return suspendResult;
1663
1663
  case 12:
1664
- throw this.k6_1;
1664
+ throw this.exception_1;
1665
1665
  }
1666
1666
  } catch ($p_3) {
1667
1667
  var e = $p_3;
1668
- if (this.i6_1 === 12) {
1668
+ if (this.exceptionState_1 === 12) {
1669
1669
  throw e;
1670
1670
  } else {
1671
- this.h6_1 = this.i6_1;
1672
- this.k6_1 = e;
1671
+ this.state_1 = this.exceptionState_1;
1672
+ this.exception_1 = e;
1673
1673
  }
1674
1674
  }
1675
1675
  while (true);
1676
1676
  };
1677
1677
  function LruCache(maxSize, loader, onEvict) {
1678
1678
  onEvict = onEvict === VOID ? null : onEvict;
1679
- this.h13_1 = maxSize;
1680
- this.i13_1 = loader;
1681
- this.j13_1 = onEvict;
1679
+ this.maxSize_1 = maxSize;
1680
+ this.loader_1 = loader;
1681
+ this.onEvict_1 = onEvict;
1682
1682
  // Inline function 'kotlin.require' call
1683
- if (!(this.h13_1 > 0)) {
1683
+ if (!(this.maxSize_1 > 0)) {
1684
1684
  var message = 'Cache size must be greater than 0';
1685
1685
  throw IllegalArgumentException_init_$Create$(toString(message));
1686
1686
  }
1687
- this.k13_1 = Mutex();
1688
- this.l13_1 = LinkedHashMap_init_$Create$();
1687
+ this.mutex_1 = Mutex();
1688
+ this.entries_1 = LinkedHashMap_init_$Create$();
1689
1689
  var tmp = this;
1690
1690
  // Inline function 'kotlin.collections.mutableMapOf' call
1691
- tmp.m13_1 = LinkedHashMap_init_$Create$();
1691
+ tmp.inFlight_1 = LinkedHashMap_init_$Create$();
1692
1692
  }
1693
- protoOf(LruCache).n13 = function (key, $completion) {
1693
+ protoOf(LruCache).get_27lcp2_k$ = function (key, $completion) {
1694
1694
  var tmp = new $getCOROUTINE$(this, key, $completion);
1695
- tmp.j6_1 = Unit_instance;
1696
- tmp.k6_1 = null;
1697
- return tmp.p6();
1695
+ tmp.result_1 = Unit_instance;
1696
+ tmp.exception_1 = null;
1697
+ return tmp.doResume_5yljmg_k$();
1698
1698
  };
1699
1699
  function RawTile(width, height, rgba) {
1700
- this.o13_1 = width;
1701
- this.p13_1 = height;
1702
- this.q13_1 = rgba;
1700
+ this.width_1 = width;
1701
+ this.height_1 = height;
1702
+ this.rgba_1 = rgba;
1703
1703
  // Inline function 'kotlin.require' call
1704
- if (!(this.q13_1.length === imul(imul(this.o13_1, this.p13_1), 4))) {
1705
- var message = 'rgba size ' + this.q13_1.length + ' does not match width*height*4 (' + imul(imul(this.o13_1, this.p13_1), 4) + ')';
1704
+ if (!(this.rgba_1.length === imul(imul(this.width_1, this.height_1), 4))) {
1705
+ var message = 'rgba size ' + this.rgba_1.length + ' does not match width*height*4 (' + imul(imul(this.width_1, this.height_1), 4) + ')';
1706
1706
  throw IllegalArgumentException_init_$Create$(toString(message));
1707
1707
  }
1708
1708
  }
@@ -1711,16 +1711,16 @@
1711
1711
  return true;
1712
1712
  if (!(other instanceof RawTile))
1713
1713
  return false;
1714
- return this.o13_1 === other.o13_1 && this.p13_1 === other.p13_1 && contentEquals(this.q13_1, other.q13_1);
1714
+ return this.width_1 === other.width_1 && this.height_1 === other.height_1 && contentEquals(this.rgba_1, other.rgba_1);
1715
1715
  };
1716
1716
  protoOf(RawTile).hashCode = function () {
1717
- var result = this.o13_1;
1718
- result = imul(31, result) + this.p13_1 | 0;
1719
- result = imul(31, result) + contentHashCode(this.q13_1) | 0;
1717
+ var result = this.width_1;
1718
+ result = imul(31, result) + this.height_1 | 0;
1719
+ result = imul(31, result) + contentHashCode(this.rgba_1) | 0;
1720
1720
  return result;
1721
1721
  };
1722
1722
  function Tile_init_$Init$(raw, $this) {
1723
- Tile.call($this, raw.o13_1, raw.p13_1, raw.q13_1);
1723
+ Tile.call($this, raw.width_1, raw.height_1, raw.rgba_1);
1724
1724
  return $this;
1725
1725
  }
1726
1726
  function Tile_init_$Create$(raw) {
@@ -1728,7 +1728,7 @@
1728
1728
  }
1729
1729
  function Companion() {
1730
1730
  }
1731
- protoOf(Companion).r13 = function (r, g, b) {
1731
+ protoOf(Companion).decodeTerrariumElevation_vmx8i4_k$ = function (r, g, b) {
1732
1732
  var raw = r * 256.0 + g + b / 256.0 - 32768.0;
1733
1733
  return round(raw * 100.0) / 100.0;
1734
1734
  };
@@ -1737,83 +1737,83 @@
1737
1737
  return Companion_instance;
1738
1738
  }
1739
1739
  function Tile(width, height, rgba) {
1740
- this.nz_1 = width;
1741
- this.oz_1 = height;
1742
- this.pz_1 = rgba;
1740
+ this.width_1 = width;
1741
+ this.height_1 = height;
1742
+ this.rgba_1 = rgba;
1743
1743
  var tmp = this;
1744
1744
  var tmp_0 = 0;
1745
- var tmp_1 = imul(this.nz_1, this.oz_1);
1745
+ var tmp_1 = imul(this.width_1, this.height_1);
1746
1746
  var tmp_2 = new Float64Array(tmp_1);
1747
1747
  while (tmp_0 < tmp_1) {
1748
1748
  tmp_2[tmp_0] = NaN;
1749
1749
  tmp_0 = tmp_0 + 1 | 0;
1750
1750
  }
1751
- tmp.qz_1 = tmp_2;
1752
- this.rz_1 = 0;
1751
+ tmp.cache_1 = tmp_2;
1752
+ this.decodeCount_1 = 0;
1753
1753
  }
1754
- protoOf(Tile).sz = function (pixel) {
1755
- var containsUpper = this.nz_1;
1756
- var containsArg = pixel.hz_1;
1754
+ protoOf(Tile).getElevation_exacdm_k$ = function (pixel) {
1755
+ var containsUpper = this.width_1;
1756
+ var containsArg = pixel.x_1;
1757
1757
  // Inline function 'kotlin.require' call
1758
1758
  if (!(0 <= containsArg ? containsArg < containsUpper : false)) {
1759
- var message = 'Invalid x position: ' + pixel.hz_1 + '. Must be between 0 and ' + (this.nz_1 - 1 | 0);
1759
+ var message = 'Invalid x position: ' + pixel.x_1 + '. Must be between 0 and ' + (this.width_1 - 1 | 0);
1760
1760
  throw IllegalArgumentException_init_$Create$(toString(message));
1761
1761
  }
1762
- var containsUpper_0 = this.oz_1;
1763
- var containsArg_0 = pixel.iz_1;
1762
+ var containsUpper_0 = this.height_1;
1763
+ var containsArg_0 = pixel.y_1;
1764
1764
  // Inline function 'kotlin.require' call
1765
1765
  if (!(0 <= containsArg_0 ? containsArg_0 < containsUpper_0 : false)) {
1766
- var message_0 = 'Invalid y position: ' + pixel.iz_1 + '. Must be between 0 and ' + (this.oz_1 - 1 | 0);
1766
+ var message_0 = 'Invalid y position: ' + pixel.y_1 + '. Must be between 0 and ' + (this.height_1 - 1 | 0);
1767
1767
  throw IllegalArgumentException_init_$Create$(toString(message_0));
1768
1768
  }
1769
- var idx = imul(pixel.iz_1, this.nz_1) + pixel.hz_1 | 0;
1770
- var cached = this.qz_1[idx];
1769
+ var idx = imul(pixel.y_1, this.width_1) + pixel.x_1 | 0;
1770
+ var cached = this.cache_1[idx];
1771
1771
  if (!isNaN_0(cached))
1772
1772
  return cached;
1773
1773
  var byteOffset = imul(idx, 4);
1774
- var r = this.pz_1[byteOffset] & 255;
1775
- var g = this.pz_1[byteOffset + 1 | 0] & 255;
1776
- var b = this.pz_1[byteOffset + 2 | 0] & 255;
1777
- var elevation = Companion_instance.r13(r, g, b);
1778
- this.qz_1[idx] = elevation;
1779
- this.rz_1 = this.rz_1 + 1 | 0;
1774
+ var r = this.rgba_1[byteOffset] & 255;
1775
+ var g = this.rgba_1[byteOffset + 1 | 0] & 255;
1776
+ var b = this.rgba_1[byteOffset + 2 | 0] & 255;
1777
+ var elevation = Companion_instance.decodeTerrariumElevation_vmx8i4_k$(r, g, b);
1778
+ this.cache_1[idx] = elevation;
1779
+ this.decodeCount_1 = this.decodeCount_1 + 1 | 0;
1780
1780
  return elevation;
1781
1781
  };
1782
1782
  function buildUrl($this, tc) {
1783
- return replace(replace(replace($this.jz_1, '{z}', tc.tv_1.toString()), '{x}', tc.rv_1.toString()), '{y}', tc.sv_1.toString());
1783
+ return replace(replace(replace($this.urlTemplate_1, '{z}', tc.z_1.toString()), '{x}', tc.x_1.toString()), '{y}', tc.y_1.toString());
1784
1784
  }
1785
1785
  function fetchAndDecodeTile$ref_0() {
1786
1786
  KFunctionImpl.call(this, 1, 2, 2);
1787
1787
  }
1788
- protoOf(fetchAndDecodeTile$ref_0).g10 = function (p0, $completion) {
1788
+ protoOf(fetchAndDecodeTile$ref_0).invoke_fa3hvc_k$ = function (p0, $completion) {
1789
1789
  return fetchAndDecodeTile(p0, $completion);
1790
1790
  };
1791
- protoOf(fetchAndDecodeTile$ref_0).x6 = function (p1, $completion) {
1792
- return this.g10((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
1791
+ protoOf(fetchAndDecodeTile$ref_0).invoke_qns8j1_k$ = function (p1, $completion) {
1792
+ return this.invoke_fa3hvc_k$((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
1793
1793
  };
1794
1794
  function TileManager$cache$slambda(this$0, resultContinuation) {
1795
- this.d14_1 = this$0;
1795
+ this.this$0__1 = this$0;
1796
1796
  CoroutineImpl.call(this, resultContinuation);
1797
1797
  }
1798
- protoOf(TileManager$cache$slambda).f14 = function (tc, $completion) {
1799
- var tmp = this.g14(tc, $completion);
1800
- tmp.j6_1 = Unit_instance;
1801
- tmp.k6_1 = null;
1802
- return tmp.p6();
1798
+ protoOf(TileManager$cache$slambda).invoke_m1epgk_k$ = function (tc, $completion) {
1799
+ var tmp = this.create_w0r0yx_k$(tc, $completion);
1800
+ tmp.result_1 = Unit_instance;
1801
+ tmp.exception_1 = null;
1802
+ return tmp.doResume_5yljmg_k$();
1803
1803
  };
1804
- protoOf(TileManager$cache$slambda).x6 = function (p1, $completion) {
1805
- return this.f14(p1 instanceof TileCoordinates ? p1 : THROW_CCE(), $completion);
1804
+ protoOf(TileManager$cache$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
1805
+ return this.invoke_m1epgk_k$(p1 instanceof TileCoordinates ? p1 : THROW_CCE(), $completion);
1806
1806
  };
1807
- protoOf(TileManager$cache$slambda).p6 = function () {
1808
- var suspendResult = this.j6_1;
1807
+ protoOf(TileManager$cache$slambda).doResume_5yljmg_k$ = function () {
1808
+ var suspendResult = this.result_1;
1809
1809
  $sm: do
1810
1810
  try {
1811
- var tmp = this.h6_1;
1811
+ var tmp = this.state_1;
1812
1812
  switch (tmp) {
1813
1813
  case 0:
1814
- this.i6_1 = 2;
1815
- this.h6_1 = 1;
1816
- suspendResult = this.d14_1.kz_1(buildUrl(this.d14_1, this.e14_1), this);
1814
+ this.exceptionState_1 = 2;
1815
+ this.state_1 = 1;
1816
+ suspendResult = this.this$0__1.fetcher_1(buildUrl(this.this$0__1, this.tc_1), this);
1817
1817
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1818
1818
  return suspendResult;
1819
1819
  }
@@ -1823,28 +1823,28 @@
1823
1823
  var ARGUMENT = suspendResult;
1824
1824
  return Tile_init_$Create$(ARGUMENT);
1825
1825
  case 2:
1826
- throw this.k6_1;
1826
+ throw this.exception_1;
1827
1827
  }
1828
1828
  } catch ($p) {
1829
1829
  var e = $p;
1830
- if (this.i6_1 === 2) {
1830
+ if (this.exceptionState_1 === 2) {
1831
1831
  throw e;
1832
1832
  } else {
1833
- this.h6_1 = this.i6_1;
1834
- this.k6_1 = e;
1833
+ this.state_1 = this.exceptionState_1;
1834
+ this.exception_1 = e;
1835
1835
  }
1836
1836
  }
1837
1837
  while (true);
1838
1838
  };
1839
- protoOf(TileManager$cache$slambda).g14 = function (tc, completion) {
1840
- var i = new TileManager$cache$slambda(this.d14_1, completion);
1841
- i.e14_1 = tc;
1839
+ protoOf(TileManager$cache$slambda).create_w0r0yx_k$ = function (tc, completion) {
1840
+ var i = new TileManager$cache$slambda(this.this$0__1, completion);
1841
+ i.tc_1 = tc;
1842
1842
  return i;
1843
1843
  };
1844
1844
  function TileManager$cache$slambda_0(this$0, resultContinuation) {
1845
1845
  var i = new TileManager$cache$slambda(this$0, resultContinuation);
1846
1846
  return constructCallableReference(function (tc, $completion) {
1847
- return i.f14(tc, $completion);
1847
+ return i.invoke_m1epgk_k$(tc, $completion);
1848
1848
  }, 1);
1849
1849
  }
1850
1850
  function TileManager(urlTemplate, cacheSize, fetcher) {
@@ -1855,26 +1855,26 @@
1855
1855
  tmp = fetcher;
1856
1856
  }
1857
1857
  fetcher = tmp;
1858
- this.jz_1 = urlTemplate;
1859
- this.kz_1 = fetcher;
1858
+ this.urlTemplate_1 = urlTemplate;
1859
+ this.fetcher_1 = fetcher;
1860
1860
  var tmp_0 = this;
1861
- tmp_0.lz_1 = new LruCache(cacheSize, TileManager$cache$slambda_0(this, null));
1861
+ tmp_0.cache_1 = new LruCache(cacheSize, TileManager$cache$slambda_0(this, null));
1862
1862
  }
1863
- protoOf(TileManager).mz = function (tileCoords, $completion) {
1864
- return this.lz_1.n13(tileCoords, $completion);
1863
+ protoOf(TileManager).getTile_c22khk_k$ = function (tileCoords, $completion) {
1864
+ return this.cache_1.get_27lcp2_k$(tileCoords, $completion);
1865
1865
  };
1866
1866
  function TileCoordinates(x, y, z) {
1867
- this.rv_1 = x;
1868
- this.sv_1 = y;
1869
- this.tv_1 = z;
1867
+ this.x_1 = x;
1868
+ this.y_1 = y;
1869
+ this.z_1 = z;
1870
1870
  }
1871
1871
  protoOf(TileCoordinates).toString = function () {
1872
- return 'TileCoordinates(x=' + this.rv_1 + ', y=' + this.sv_1 + ', z=' + this.tv_1 + ')';
1872
+ return 'TileCoordinates(x=' + this.x_1 + ', y=' + this.y_1 + ', z=' + this.z_1 + ')';
1873
1873
  };
1874
1874
  protoOf(TileCoordinates).hashCode = function () {
1875
- var result = this.rv_1;
1876
- result = imul(result, 31) + this.sv_1 | 0;
1877
- result = imul(result, 31) + this.tv_1 | 0;
1875
+ var result = this.x_1;
1876
+ result = imul(result, 31) + this.y_1 | 0;
1877
+ result = imul(result, 31) + this.z_1 | 0;
1878
1878
  return result;
1879
1879
  };
1880
1880
  protoOf(TileCoordinates).equals = function (other) {
@@ -1882,26 +1882,26 @@
1882
1882
  return true;
1883
1883
  if (!(other instanceof TileCoordinates))
1884
1884
  return false;
1885
- if (!(this.rv_1 === other.rv_1))
1885
+ if (!(this.x_1 === other.x_1))
1886
1886
  return false;
1887
- if (!(this.sv_1 === other.sv_1))
1887
+ if (!(this.y_1 === other.y_1))
1888
1888
  return false;
1889
- if (!(this.tv_1 === other.tv_1))
1889
+ if (!(this.z_1 === other.z_1))
1890
1890
  return false;
1891
1891
  return true;
1892
1892
  };
1893
1893
  function Pixel(tile, x, y) {
1894
- this.gz_1 = tile;
1895
- this.hz_1 = x;
1896
- this.iz_1 = y;
1894
+ this.tile_1 = tile;
1895
+ this.x_1 = x;
1896
+ this.y_1 = y;
1897
1897
  }
1898
1898
  protoOf(Pixel).toString = function () {
1899
- return 'Pixel(tile=' + this.gz_1.toString() + ', x=' + this.hz_1 + ', y=' + this.iz_1 + ')';
1899
+ return 'Pixel(tile=' + this.tile_1.toString() + ', x=' + this.x_1 + ', y=' + this.y_1 + ')';
1900
1900
  };
1901
1901
  protoOf(Pixel).hashCode = function () {
1902
- var result = this.gz_1.hashCode();
1903
- result = imul(result, 31) + this.hz_1 | 0;
1904
- result = imul(result, 31) + this.iz_1 | 0;
1902
+ var result = this.tile_1.hashCode();
1903
+ result = imul(result, 31) + this.x_1 | 0;
1904
+ result = imul(result, 31) + this.y_1 | 0;
1905
1905
  return result;
1906
1906
  };
1907
1907
  protoOf(Pixel).equals = function (other) {
@@ -1909,26 +1909,26 @@
1909
1909
  return true;
1910
1910
  if (!(other instanceof Pixel))
1911
1911
  return false;
1912
- if (!this.gz_1.equals(other.gz_1))
1912
+ if (!this.tile_1.equals(other.tile_1))
1913
1913
  return false;
1914
- if (!(this.hz_1 === other.hz_1))
1914
+ if (!(this.x_1 === other.x_1))
1915
1915
  return false;
1916
- if (!(this.iz_1 === other.iz_1))
1916
+ if (!(this.y_1 === other.y_1))
1917
1917
  return false;
1918
1918
  return true;
1919
1919
  };
1920
1920
  function PixelFloat(tile, x, y) {
1921
- this.cz_1 = tile;
1922
- this.dz_1 = x;
1923
- this.ez_1 = y;
1921
+ this.tile_1 = tile;
1922
+ this.x_1 = x;
1923
+ this.y_1 = y;
1924
1924
  }
1925
1925
  protoOf(PixelFloat).toString = function () {
1926
- return 'PixelFloat(tile=' + this.cz_1.toString() + ', x=' + this.dz_1 + ', y=' + this.ez_1 + ')';
1926
+ return 'PixelFloat(tile=' + this.tile_1.toString() + ', x=' + this.x_1 + ', y=' + this.y_1 + ')';
1927
1927
  };
1928
1928
  protoOf(PixelFloat).hashCode = function () {
1929
- var result = this.cz_1.hashCode();
1930
- result = imul(result, 31) + getNumberHashCode(this.dz_1) | 0;
1931
- result = imul(result, 31) + getNumberHashCode(this.ez_1) | 0;
1929
+ var result = this.tile_1.hashCode();
1930
+ result = imul(result, 31) + getNumberHashCode(this.x_1) | 0;
1931
+ result = imul(result, 31) + getNumberHashCode(this.y_1) | 0;
1932
1932
  return result;
1933
1933
  };
1934
1934
  protoOf(PixelFloat).equals = function (other) {
@@ -1936,30 +1936,30 @@
1936
1936
  return true;
1937
1937
  if (!(other instanceof PixelFloat))
1938
1938
  return false;
1939
- if (!this.cz_1.equals(other.cz_1))
1939
+ if (!this.tile_1.equals(other.tile_1))
1940
1940
  return false;
1941
- if (!equals(this.dz_1, other.dz_1))
1941
+ if (!equals(this.x_1, other.x_1))
1942
1942
  return false;
1943
- if (!equals(this.ez_1, other.ez_1))
1943
+ if (!equals(this.y_1, other.y_1))
1944
1944
  return false;
1945
1945
  return true;
1946
1946
  };
1947
1947
  function TileCoordinatesFloat(x, y, xFloat, yFloat, z) {
1948
- this.yz_1 = x;
1949
- this.zz_1 = y;
1950
- this.a10_1 = xFloat;
1951
- this.b10_1 = yFloat;
1952
- this.c10_1 = z;
1948
+ this.x_1 = x;
1949
+ this.y_1 = y;
1950
+ this.xFloat_1 = xFloat;
1951
+ this.yFloat_1 = yFloat;
1952
+ this.z_1 = z;
1953
1953
  }
1954
1954
  protoOf(TileCoordinatesFloat).toString = function () {
1955
- return 'TileCoordinatesFloat(x=' + this.yz_1 + ', y=' + this.zz_1 + ', xFloat=' + this.a10_1 + ', yFloat=' + this.b10_1 + ', z=' + this.c10_1 + ')';
1955
+ return 'TileCoordinatesFloat(x=' + this.x_1 + ', y=' + this.y_1 + ', xFloat=' + this.xFloat_1 + ', yFloat=' + this.yFloat_1 + ', z=' + this.z_1 + ')';
1956
1956
  };
1957
1957
  protoOf(TileCoordinatesFloat).hashCode = function () {
1958
- var result = this.yz_1;
1959
- result = imul(result, 31) + this.zz_1 | 0;
1960
- result = imul(result, 31) + getNumberHashCode(this.a10_1) | 0;
1961
- result = imul(result, 31) + getNumberHashCode(this.b10_1) | 0;
1962
- result = imul(result, 31) + this.c10_1 | 0;
1958
+ var result = this.x_1;
1959
+ result = imul(result, 31) + this.y_1 | 0;
1960
+ result = imul(result, 31) + getNumberHashCode(this.xFloat_1) | 0;
1961
+ result = imul(result, 31) + getNumberHashCode(this.yFloat_1) | 0;
1962
+ result = imul(result, 31) + this.z_1 | 0;
1963
1963
  return result;
1964
1964
  };
1965
1965
  protoOf(TileCoordinatesFloat).equals = function (other) {
@@ -1967,21 +1967,21 @@
1967
1967
  return true;
1968
1968
  if (!(other instanceof TileCoordinatesFloat))
1969
1969
  return false;
1970
- if (!(this.yz_1 === other.yz_1))
1970
+ if (!(this.x_1 === other.x_1))
1971
1971
  return false;
1972
- if (!(this.zz_1 === other.zz_1))
1972
+ if (!(this.y_1 === other.y_1))
1973
1973
  return false;
1974
- if (!equals(this.a10_1, other.a10_1))
1974
+ if (!equals(this.xFloat_1, other.xFloat_1))
1975
1975
  return false;
1976
- if (!equals(this.b10_1, other.b10_1))
1976
+ if (!equals(this.yFloat_1, other.yFloat_1))
1977
1977
  return false;
1978
- if (!(this.c10_1 === other.c10_1))
1978
+ if (!(this.z_1 === other.z_1))
1979
1979
  return false;
1980
1980
  return true;
1981
1981
  };
1982
1982
  function Companion_0() {
1983
1983
  Companion_instance_0 = this;
1984
- this.h14_1 = new Vector3D(0.0, 0.0, 0.0);
1984
+ this.ZERO_1 = new Vector3D(0.0, 0.0, 0.0);
1985
1985
  }
1986
1986
  var Companion_instance_0;
1987
1987
  function Companion_getInstance_0() {
@@ -1991,49 +1991,49 @@
1991
1991
  }
1992
1992
  function Vector3D(x, y, z) {
1993
1993
  Companion_getInstance_0();
1994
- this.bx_1 = x;
1995
- this.cx_1 = y;
1996
- this.dx_1 = z;
1994
+ this.x_1 = x;
1995
+ this.y_1 = y;
1996
+ this.z_1 = z;
1997
1997
  }
1998
- protoOf(Vector3D).i14 = function (other) {
1999
- var tmp0 = this.bx_1 - other.bx_1;
1998
+ protoOf(Vector3D).distanceTo_53ug7b_k$ = function (other) {
1999
+ var tmp0 = this.x_1 - other.x_1;
2000
2000
  // Inline function 'kotlin.math.hypot' call
2001
- var y = this.cx_1 - other.cx_1;
2001
+ var y = this.y_1 - other.y_1;
2002
2002
  var tmp0_0 = hypot(tmp0, y);
2003
2003
  // Inline function 'kotlin.math.hypot' call
2004
- var y_0 = this.dx_1 - other.dx_1;
2004
+ var y_0 = this.z_1 - other.z_1;
2005
2005
  return hypot(tmp0_0, y_0);
2006
2006
  };
2007
- protoOf(Vector3D).j14 = function (other) {
2008
- return new Vector3D(this.bx_1 - other.bx_1, this.cx_1 - other.cx_1, this.dx_1 - other.dx_1);
2007
+ protoOf(Vector3D).minus_de4vqf_k$ = function (other) {
2008
+ return new Vector3D(this.x_1 - other.x_1, this.y_1 - other.y_1, this.z_1 - other.z_1);
2009
2009
  };
2010
- protoOf(Vector3D).k14 = function (other) {
2011
- return new Vector3D(this.bx_1 + other.bx_1, this.cx_1 + other.cx_1, this.dx_1 + other.dx_1);
2010
+ protoOf(Vector3D).plus_e4szu7_k$ = function (other) {
2011
+ return new Vector3D(this.x_1 + other.x_1, this.y_1 + other.y_1, this.z_1 + other.z_1);
2012
2012
  };
2013
- protoOf(Vector3D).l14 = function (scalar) {
2014
- return new Vector3D(this.bx_1 * scalar, this.cx_1 * scalar, this.dx_1 * scalar);
2013
+ protoOf(Vector3D).times_qz1dds_k$ = function (scalar) {
2014
+ return new Vector3D(this.x_1 * scalar, this.y_1 * scalar, this.z_1 * scalar);
2015
2015
  };
2016
- protoOf(Vector3D).m14 = function (other) {
2017
- return this.bx_1 * other.bx_1 + this.cx_1 * other.cx_1 + this.dx_1 * other.dx_1;
2016
+ protoOf(Vector3D).dot_o3y6jk_k$ = function (other) {
2017
+ return this.x_1 * other.x_1 + this.y_1 * other.y_1 + this.z_1 * other.z_1;
2018
2018
  };
2019
- protoOf(Vector3D).ex = function (segmentStart, segmentEnd) {
2020
- var segmentVector = segmentEnd.j14(segmentStart);
2021
- var segmentLengthSq = segmentVector.m14(segmentVector);
2019
+ protoOf(Vector3D).distanceToSegment_bfq4v7_k$ = function (segmentStart, segmentEnd) {
2020
+ var segmentVector = segmentEnd.minus_de4vqf_k$(segmentStart);
2021
+ var segmentLengthSq = segmentVector.dot_o3y6jk_k$(segmentVector);
2022
2022
  if (segmentLengthSq === 0.0)
2023
- return this.i14(segmentStart);
2024
- var pointVector = this.j14(segmentStart);
2025
- var projection = pointVector.m14(segmentVector) / segmentLengthSq;
2023
+ return this.distanceTo_53ug7b_k$(segmentStart);
2024
+ var pointVector = this.minus_de4vqf_k$(segmentStart);
2025
+ var projection = pointVector.dot_o3y6jk_k$(segmentVector) / segmentLengthSq;
2026
2026
  var clamped = coerceIn_0(projection, 0.0, 1.0);
2027
- var closest = segmentStart.k14(segmentVector.l14(clamped));
2028
- return this.i14(closest);
2027
+ var closest = segmentStart.plus_e4szu7_k$(segmentVector.times_qz1dds_k$(clamped));
2028
+ return this.distanceTo_53ug7b_k$(closest);
2029
2029
  };
2030
2030
  protoOf(Vector3D).toString = function () {
2031
- return 'Vector3D(x=' + this.bx_1 + ', y=' + this.cx_1 + ', z=' + this.dx_1 + ')';
2031
+ return 'Vector3D(x=' + this.x_1 + ', y=' + this.y_1 + ', z=' + this.z_1 + ')';
2032
2032
  };
2033
2033
  protoOf(Vector3D).hashCode = function () {
2034
- var result = getNumberHashCode(this.bx_1);
2035
- result = imul(result, 31) + getNumberHashCode(this.cx_1) | 0;
2036
- result = imul(result, 31) + getNumberHashCode(this.dx_1) | 0;
2034
+ var result = getNumberHashCode(this.x_1);
2035
+ result = imul(result, 31) + getNumberHashCode(this.y_1) | 0;
2036
+ result = imul(result, 31) + getNumberHashCode(this.z_1) | 0;
2037
2037
  return result;
2038
2038
  };
2039
2039
  protoOf(Vector3D).equals = function (other) {
@@ -2041,24 +2041,24 @@
2041
2041
  return true;
2042
2042
  if (!(other instanceof Vector3D))
2043
2043
  return false;
2044
- if (!equals(this.bx_1, other.bx_1))
2044
+ if (!equals(this.x_1, other.x_1))
2045
2045
  return false;
2046
- if (!equals(this.cx_1, other.cx_1))
2046
+ if (!equals(this.y_1, other.y_1))
2047
2047
  return false;
2048
- if (!equals(this.dx_1, other.dx_1))
2048
+ if (!equals(this.z_1, other.z_1))
2049
2049
  return false;
2050
2050
  return true;
2051
2051
  };
2052
2052
  function newElevationProvider(configDto) {
2053
2053
  var defaults = new ElevationProviderConfig();
2054
2054
  var tmp1_elvis_lhs = configDto == null ? null : configDto.zoomLevel;
2055
- var tmp = tmp1_elvis_lhs == null ? defaults.l10_1 : tmp1_elvis_lhs;
2055
+ var tmp = tmp1_elvis_lhs == null ? defaults.zoomLevel_1 : tmp1_elvis_lhs;
2056
2056
  var tmp3_elvis_lhs = configDto == null ? null : configDto.cacheSize;
2057
- var tmp_0 = tmp3_elvis_lhs == null ? defaults.m10_1 : tmp3_elvis_lhs;
2057
+ var tmp_0 = tmp3_elvis_lhs == null ? defaults.cacheSize_1 : tmp3_elvis_lhs;
2058
2058
  var tmp5_elvis_lhs = configDto == null ? null : configDto.tileUrlTemplate;
2059
- var tmp_1 = tmp5_elvis_lhs == null ? defaults.n10_1 : tmp5_elvis_lhs;
2059
+ var tmp_1 = tmp5_elvis_lhs == null ? defaults.tileUrlTemplate_1 : tmp5_elvis_lhs;
2060
2060
  var tmp7_elvis_lhs = configDto == null ? null : configDto.tileSize;
2061
- var cfg = new ElevationProviderConfig(tmp, tmp_0, tmp_1, tmp7_elvis_lhs == null ? defaults.o10_1 : tmp7_elvis_lhs, defaults.p10_1);
2061
+ var cfg = new ElevationProviderConfig(tmp, tmp_0, tmp_1, tmp7_elvis_lhs == null ? defaults.tileSize_1 : tmp7_elvis_lhs, defaults.attribution_1);
2062
2062
  return new ElevationProvider(cfg);
2063
2063
  }
2064
2064
  function getElevation(provider, latitude, longitude, interpolation) {
@@ -2084,31 +2084,31 @@
2084
2084
  return o;
2085
2085
  }
2086
2086
  function getElevation$slambda($provider, $latitude, $longitude, $interpolation, resultContinuation) {
2087
- this.v14_1 = $provider;
2088
- this.w14_1 = $latitude;
2089
- this.x14_1 = $longitude;
2090
- this.y14_1 = $interpolation;
2087
+ this.$provider_1 = $provider;
2088
+ this.$latitude_1 = $latitude;
2089
+ this.$longitude_1 = $longitude;
2090
+ this.$interpolation_1 = $interpolation;
2091
2091
  CoroutineImpl.call(this, resultContinuation);
2092
2092
  }
2093
- protoOf(getElevation$slambda).a15 = function ($this$promise, $completion) {
2094
- var tmp = this.l11($this$promise, $completion);
2095
- tmp.j6_1 = Unit_instance;
2096
- tmp.k6_1 = null;
2097
- return tmp.p6();
2093
+ protoOf(getElevation$slambda).invoke_41ewvl_k$ = function ($this$promise, $completion) {
2094
+ var tmp = this.create_rcuf4x_k$($this$promise, $completion);
2095
+ tmp.result_1 = Unit_instance;
2096
+ tmp.exception_1 = null;
2097
+ return tmp.doResume_5yljmg_k$();
2098
2098
  };
2099
- protoOf(getElevation$slambda).x6 = function (p1, $completion) {
2100
- return this.a15((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2099
+ protoOf(getElevation$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
2100
+ return this.invoke_41ewvl_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2101
2101
  };
2102
- protoOf(getElevation$slambda).p6 = function () {
2103
- var suspendResult = this.j6_1;
2102
+ protoOf(getElevation$slambda).doResume_5yljmg_k$ = function () {
2103
+ var suspendResult = this.result_1;
2104
2104
  $sm: do
2105
2105
  try {
2106
- var tmp = this.h6_1;
2106
+ var tmp = this.state_1;
2107
2107
  switch (tmp) {
2108
2108
  case 0:
2109
- this.i6_1 = 2;
2110
- this.h6_1 = 1;
2111
- suspendResult = this.v14_1.q10(this.w14_1, this.x14_1, this.y14_1, this);
2109
+ this.exceptionState_1 = 2;
2110
+ this.state_1 = 1;
2111
+ suspendResult = this.$provider_1.getElevation_vb6cmz_k$(this.$latitude_1, this.$longitude_1, this.$interpolation_1, this);
2112
2112
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2113
2113
  return suspendResult;
2114
2114
  }
@@ -2117,80 +2117,80 @@
2117
2117
  case 1:
2118
2118
  return suspendResult;
2119
2119
  case 2:
2120
- throw this.k6_1;
2120
+ throw this.exception_1;
2121
2121
  }
2122
2122
  } catch ($p) {
2123
2123
  var e = $p;
2124
- if (this.i6_1 === 2) {
2124
+ if (this.exceptionState_1 === 2) {
2125
2125
  throw e;
2126
2126
  } else {
2127
- this.h6_1 = this.i6_1;
2128
- this.k6_1 = e;
2127
+ this.state_1 = this.exceptionState_1;
2128
+ this.exception_1 = e;
2129
2129
  }
2130
2130
  }
2131
2131
  while (true);
2132
2132
  };
2133
- protoOf(getElevation$slambda).l11 = function ($this$promise, completion) {
2134
- var i = new getElevation$slambda(this.v14_1, this.w14_1, this.x14_1, this.y14_1, completion);
2135
- i.z14_1 = $this$promise;
2133
+ protoOf(getElevation$slambda).create_rcuf4x_k$ = function ($this$promise, completion) {
2134
+ var i = new getElevation$slambda(this.$provider_1, this.$latitude_1, this.$longitude_1, this.$interpolation_1, completion);
2135
+ i.$this$promise_1 = $this$promise;
2136
2136
  return i;
2137
2137
  };
2138
2138
  function getElevation$slambda_0($provider, $latitude, $longitude, $interpolation, resultContinuation) {
2139
2139
  var i = new getElevation$slambda($provider, $latitude, $longitude, $interpolation, resultContinuation);
2140
2140
  return constructCallableReference(function ($this$promise, $completion) {
2141
- return i.a15($this$promise, $completion);
2141
+ return i.invoke_41ewvl_k$($this$promise, $completion);
2142
2142
  }, 1);
2143
2143
  }
2144
2144
  function getElevationsAlong$slambda($path, $provider, $options, resultContinuation) {
2145
- this.j15_1 = $path;
2146
- this.k15_1 = $provider;
2147
- this.l15_1 = $options;
2145
+ this.$path_1 = $path;
2146
+ this.$provider_1 = $provider;
2147
+ this.$options_1 = $options;
2148
2148
  CoroutineImpl.call(this, resultContinuation);
2149
2149
  }
2150
- protoOf(getElevationsAlong$slambda).n15 = function ($this$promise, $completion) {
2151
- var tmp = this.l11($this$promise, $completion);
2152
- tmp.j6_1 = Unit_instance;
2153
- tmp.k6_1 = null;
2154
- return tmp.p6();
2150
+ protoOf(getElevationsAlong$slambda).invoke_k3oqbv_k$ = function ($this$promise, $completion) {
2151
+ var tmp = this.create_rcuf4x_k$($this$promise, $completion);
2152
+ tmp.result_1 = Unit_instance;
2153
+ tmp.exception_1 = null;
2154
+ return tmp.doResume_5yljmg_k$();
2155
2155
  };
2156
- protoOf(getElevationsAlong$slambda).x6 = function (p1, $completion) {
2157
- return this.n15((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2156
+ protoOf(getElevationsAlong$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
2157
+ return this.invoke_k3oqbv_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2158
2158
  };
2159
- protoOf(getElevationsAlong$slambda).p6 = function () {
2160
- var suspendResult = this.j6_1;
2159
+ protoOf(getElevationsAlong$slambda).doResume_5yljmg_k$ = function () {
2160
+ var suspendResult = this.result_1;
2161
2161
  $sm: do
2162
2162
  try {
2163
- var tmp = this.h6_1;
2163
+ var tmp = this.state_1;
2164
2164
  switch (tmp) {
2165
2165
  case 0:
2166
- this.i6_1 = 2;
2167
- var this_0 = this.j15_1;
2166
+ this.exceptionState_1 = 2;
2167
+ var this_0 = this.$path_1;
2168
2168
  var destination = ArrayList_init_$Create$_0(this_0.length);
2169
2169
  var inductionVariable = 0;
2170
2170
  var last = this_0.length;
2171
2171
  while (inductionVariable < last) {
2172
2172
  var item = this_0[inductionVariable];
2173
2173
  inductionVariable = inductionVariable + 1 | 0;
2174
- destination.h(new LatLon(item.latitude, item.longitude));
2174
+ destination.add_utx5q5_k$(new LatLon(item.latitude, item.longitude));
2175
2175
  }
2176
2176
 
2177
2177
  var coords = destination;
2178
- this.h6_1 = 1;
2179
- var tmp0_safe_receiver = this.l15_1;
2178
+ this.state_1 = 1;
2179
+ var tmp0_safe_receiver = this.$options_1;
2180
2180
  var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.step;
2181
2181
  var tmp_0 = tmp1_elvis_lhs == null ? 10.0 : tmp1_elvis_lhs;
2182
- var tmp2_safe_receiver = this.l15_1;
2182
+ var tmp2_safe_receiver = this.$options_1;
2183
2183
  var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.minDistance;
2184
2184
  var tmp_1 = tmp3_elvis_lhs == null ? 1.0 : tmp3_elvis_lhs;
2185
- var tmp4_safe_receiver = this.l15_1;
2185
+ var tmp4_safe_receiver = this.$options_1;
2186
2186
  var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.interpolation;
2187
2187
  var tmp_2 = tmp5_elvis_lhs == null ? true : tmp5_elvis_lhs;
2188
- var tmp6_safe_receiver = this.l15_1;
2188
+ var tmp6_safe_receiver = this.$options_1;
2189
2189
  var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.smoothingOptions;
2190
2190
  var tmp_3 = tmp7_safe_receiver == null ? null : toKotlin(tmp7_safe_receiver);
2191
- var tmp8_safe_receiver = this.l15_1;
2191
+ var tmp8_safe_receiver = this.$options_1;
2192
2192
  var tmp9_safe_receiver = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.filterOptions;
2193
- suspendResult = this.k15_1.t10(coords, tmp_0, tmp_1, tmp_2, tmp_3, tmp9_safe_receiver == null ? null : toKotlin_0(tmp9_safe_receiver), this);
2193
+ suspendResult = this.$provider_1.getElevationsAlong_o6hmac_k$(coords, tmp_0, tmp_1, tmp_2, tmp_3, tmp9_safe_receiver == null ? null : toKotlin_0(tmp9_safe_receiver), this);
2194
2194
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2195
2195
  return suspendResult;
2196
2196
  }
@@ -2199,39 +2199,39 @@
2199
2199
  case 1:
2200
2200
  var results = suspendResult;
2201
2201
  var tmp_4 = 0;
2202
- var tmp_5 = results.l();
2202
+ var tmp_5 = results.get_size_woubt6_k$();
2203
2203
  var tmp_6 = Array(tmp_5);
2204
2204
  while (tmp_4 < tmp_5) {
2205
2205
  var tmp_7 = tmp_4;
2206
- var c = results.m(tmp_7);
2207
- tmp_6[tmp_7] = coordsEle(c.av(), c.bv(), c.ww());
2206
+ var c = results.get_c1px32_k$(tmp_7);
2207
+ tmp_6[tmp_7] = coordsEle(c.get_latitude_feukvp_k$(), c.get_longitude_asb1fq_k$(), c.get_elevation_8fwyb8_k$());
2208
2208
  tmp_4 = tmp_4 + 1 | 0;
2209
2209
  }
2210
2210
 
2211
2211
  return tmp_6;
2212
2212
  case 2:
2213
- throw this.k6_1;
2213
+ throw this.exception_1;
2214
2214
  }
2215
2215
  } catch ($p) {
2216
2216
  var e = $p;
2217
- if (this.i6_1 === 2) {
2217
+ if (this.exceptionState_1 === 2) {
2218
2218
  throw e;
2219
2219
  } else {
2220
- this.h6_1 = this.i6_1;
2221
- this.k6_1 = e;
2220
+ this.state_1 = this.exceptionState_1;
2221
+ this.exception_1 = e;
2222
2222
  }
2223
2223
  }
2224
2224
  while (true);
2225
2225
  };
2226
- protoOf(getElevationsAlong$slambda).l11 = function ($this$promise, completion) {
2227
- var i = new getElevationsAlong$slambda(this.j15_1, this.k15_1, this.l15_1, completion);
2228
- i.m15_1 = $this$promise;
2226
+ protoOf(getElevationsAlong$slambda).create_rcuf4x_k$ = function ($this$promise, completion) {
2227
+ var i = new getElevationsAlong$slambda(this.$path_1, this.$provider_1, this.$options_1, completion);
2228
+ i.$this$promise_1 = $this$promise;
2229
2229
  return i;
2230
2230
  };
2231
2231
  function getElevationsAlong$slambda_0($path, $provider, $options, resultContinuation) {
2232
2232
  var i = new getElevationsAlong$slambda($path, $provider, $options, resultContinuation);
2233
2233
  return constructCallableReference(function ($this$promise, $completion) {
2234
- return i.n15($this$promise, $completion);
2234
+ return i.invoke_k3oqbv_k$($this$promise, $completion);
2235
2235
  }, 1);
2236
2236
  }
2237
2237
  function get_isNode() {
@@ -2245,26 +2245,26 @@
2245
2245
  var tmp = KProperty0;
2246
2246
  // Inline function 'kotlin.getValue' call
2247
2247
  getPropertyCallableRef('nodeWebpDecoderPromise', 0, tmp, _get_nodeWebpDecoderPromise_$ref_s562t(), null);
2248
- return tmp0.i1();
2248
+ return tmp0.get_value_j01efc_k$();
2249
2249
  }
2250
2250
  var nodeWebpDecoderPromise$delegate;
2251
2251
  function fetchAndDecodeTile(url, $completion) {
2252
2252
  var tmp = new $fetchAndDecodeTileCOROUTINE$(url, $completion);
2253
- tmp.j6_1 = Unit_instance;
2254
- tmp.k6_1 = null;
2255
- return tmp.p6();
2253
+ tmp.result_1 = Unit_instance;
2254
+ tmp.exception_1 = null;
2255
+ return tmp.doResume_5yljmg_k$();
2256
2256
  }
2257
2257
  function decodeNode(url, $completion) {
2258
2258
  var tmp = new $decodeNodeCOROUTINE$(url, $completion);
2259
- tmp.j6_1 = Unit_instance;
2260
- tmp.k6_1 = null;
2261
- return tmp.p6();
2259
+ tmp.result_1 = Unit_instance;
2260
+ tmp.exception_1 = null;
2261
+ return tmp.doResume_5yljmg_k$();
2262
2262
  }
2263
2263
  function decodeBrowser(url, $completion) {
2264
2264
  var tmp = new $decodeBrowserCOROUTINE$(url, $completion);
2265
- tmp.j6_1 = Unit_instance;
2266
- tmp.k6_1 = null;
2267
- return tmp.p6();
2265
+ tmp.result_1 = Unit_instance;
2266
+ tmp.exception_1 = null;
2267
+ return tmp.doResume_5yljmg_k$();
2268
2268
  }
2269
2269
  function fetchUrlNode(url) {
2270
2270
  _init_properties_TileFetcher_js_kt__7a2f1e();
@@ -2295,9 +2295,9 @@
2295
2295
  }
2296
2296
  function decodeWebpNode(buffer, $completion) {
2297
2297
  var tmp = new $decodeWebpNodeCOROUTINE$(buffer, $completion);
2298
- tmp.j6_1 = Unit_instance;
2299
- tmp.k6_1 = null;
2300
- return tmp.p6();
2298
+ tmp.result_1 = Unit_instance;
2299
+ tmp.exception_1 = null;
2300
+ return tmp.doResume_5yljmg_k$();
2301
2301
  }
2302
2302
  function fetchUrlBrowser(url) {
2303
2303
  _init_properties_TileFetcher_js_kt__7a2f1e();
@@ -2306,9 +2306,9 @@
2306
2306
  }
2307
2307
  function decodeBlob(blob, sourceUrl, $completion) {
2308
2308
  var tmp = new $decodeBlobCOROUTINE$(blob, sourceUrl, $completion);
2309
- tmp.j6_1 = Unit_instance;
2310
- tmp.k6_1 = null;
2311
- return tmp.p6();
2309
+ tmp.result_1 = Unit_instance;
2310
+ tmp.exception_1 = null;
2311
+ return tmp.doResume_5yljmg_k$();
2312
2312
  }
2313
2313
  function nodeWebpDecoderPromise$delegate$lambda() {
2314
2314
  _init_properties_TileFetcher_js_kt__7a2f1e();
@@ -2335,26 +2335,26 @@
2335
2335
  }
2336
2336
  function $fetchAndDecodeTileCOROUTINE$(url, resultContinuation) {
2337
2337
  CoroutineImpl.call(this, resultContinuation);
2338
- this.w15_1 = url;
2338
+ this.url_1 = url;
2339
2339
  }
2340
- protoOf($fetchAndDecodeTileCOROUTINE$).p6 = function () {
2341
- var suspendResult = this.j6_1;
2340
+ protoOf($fetchAndDecodeTileCOROUTINE$).doResume_5yljmg_k$ = function () {
2341
+ var suspendResult = this.result_1;
2342
2342
  $sm: do
2343
2343
  try {
2344
- var tmp = this.h6_1;
2344
+ var tmp = this.state_1;
2345
2345
  switch (tmp) {
2346
2346
  case 0:
2347
- this.i6_1 = 4;
2347
+ this.exceptionState_1 = 4;
2348
2348
  if (get_isNode()) {
2349
- this.h6_1 = 2;
2350
- suspendResult = decodeNode(this.w15_1, this);
2349
+ this.state_1 = 2;
2350
+ suspendResult = decodeNode(this.url_1, this);
2351
2351
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2352
2352
  return suspendResult;
2353
2353
  }
2354
2354
  continue $sm;
2355
2355
  } else {
2356
- this.h6_1 = 1;
2357
- suspendResult = decodeBrowser(this.w15_1, this);
2356
+ this.state_1 = 1;
2357
+ suspendResult = decodeBrowser(this.url_1, this);
2358
2358
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2359
2359
  return suspendResult;
2360
2360
  }
@@ -2362,43 +2362,43 @@
2362
2362
  }
2363
2363
 
2364
2364
  case 1:
2365
- this.x15_1 = suspendResult;
2366
- this.h6_1 = 3;
2365
+ this.WHEN_RESULT0__1 = suspendResult;
2366
+ this.state_1 = 3;
2367
2367
  continue $sm;
2368
2368
  case 2:
2369
- this.x15_1 = suspendResult;
2370
- this.h6_1 = 3;
2369
+ this.WHEN_RESULT0__1 = suspendResult;
2370
+ this.state_1 = 3;
2371
2371
  continue $sm;
2372
2372
  case 3:
2373
- return this.x15_1;
2373
+ return this.WHEN_RESULT0__1;
2374
2374
  case 4:
2375
- throw this.k6_1;
2375
+ throw this.exception_1;
2376
2376
  }
2377
2377
  } catch ($p) {
2378
2378
  var e = $p;
2379
- if (this.i6_1 === 4) {
2379
+ if (this.exceptionState_1 === 4) {
2380
2380
  throw e;
2381
2381
  } else {
2382
- this.h6_1 = this.i6_1;
2383
- this.k6_1 = e;
2382
+ this.state_1 = this.exceptionState_1;
2383
+ this.exception_1 = e;
2384
2384
  }
2385
2385
  }
2386
2386
  while (true);
2387
2387
  };
2388
2388
  function $decodeNodeCOROUTINE$(url, resultContinuation) {
2389
2389
  CoroutineImpl.call(this, resultContinuation);
2390
- this.g16_1 = url;
2390
+ this.url_1 = url;
2391
2391
  }
2392
- protoOf($decodeNodeCOROUTINE$).p6 = function () {
2393
- var suspendResult = this.j6_1;
2392
+ protoOf($decodeNodeCOROUTINE$).doResume_5yljmg_k$ = function () {
2393
+ var suspendResult = this.result_1;
2394
2394
  $sm: do
2395
2395
  try {
2396
- var tmp = this.h6_1;
2396
+ var tmp = this.state_1;
2397
2397
  switch (tmp) {
2398
2398
  case 0:
2399
- this.i6_1 = 4;
2400
- this.h6_1 = 1;
2401
- suspendResult = await_0(fetchUrlNode(this.g16_1), this);
2399
+ this.exceptionState_1 = 4;
2400
+ this.state_1 = 1;
2401
+ suspendResult = await_0(fetchUrlNode(this.url_1), this);
2402
2402
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2403
2403
  return suspendResult;
2404
2404
  }
@@ -2407,11 +2407,11 @@
2407
2407
  case 1:
2408
2408
  var res = suspendResult;
2409
2409
  if (!res.ok) {
2410
- var message = 'Tile fetch failed for ' + this.g16_1 + ': HTTP ' + res.status;
2410
+ var message = 'Tile fetch failed for ' + this.url_1 + ': HTTP ' + res.status;
2411
2411
  throw IllegalStateException_init_$Create$_0(toString(message));
2412
2412
  }
2413
2413
 
2414
- this.h6_1 = 2;
2414
+ this.state_1 = 2;
2415
2415
  suspendResult = await_0(responseArrayBuffer(res), this);
2416
2416
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2417
2417
  return suspendResult;
@@ -2420,7 +2420,7 @@
2420
2420
  continue $sm;
2421
2421
  case 2:
2422
2422
  var ab = suspendResult;
2423
- this.h6_1 = 3;
2423
+ this.state_1 = 3;
2424
2424
  suspendResult = decodeWebpNode(ab, this);
2425
2425
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2426
2426
  return suspendResult;
@@ -2431,33 +2431,33 @@
2431
2431
  var ARGUMENT = suspendResult;
2432
2432
  return rawTileFromJsquash(ARGUMENT);
2433
2433
  case 4:
2434
- throw this.k6_1;
2434
+ throw this.exception_1;
2435
2435
  }
2436
2436
  } catch ($p) {
2437
2437
  var e = $p;
2438
- if (this.i6_1 === 4) {
2438
+ if (this.exceptionState_1 === 4) {
2439
2439
  throw e;
2440
2440
  } else {
2441
- this.h6_1 = this.i6_1;
2442
- this.k6_1 = e;
2441
+ this.state_1 = this.exceptionState_1;
2442
+ this.exception_1 = e;
2443
2443
  }
2444
2444
  }
2445
2445
  while (true);
2446
2446
  };
2447
2447
  function $decodeBrowserCOROUTINE$(url, resultContinuation) {
2448
2448
  CoroutineImpl.call(this, resultContinuation);
2449
- this.p16_1 = url;
2449
+ this.url_1 = url;
2450
2450
  }
2451
- protoOf($decodeBrowserCOROUTINE$).p6 = function () {
2452
- var suspendResult = this.j6_1;
2451
+ protoOf($decodeBrowserCOROUTINE$).doResume_5yljmg_k$ = function () {
2452
+ var suspendResult = this.result_1;
2453
2453
  $sm: do
2454
2454
  try {
2455
- var tmp = this.h6_1;
2455
+ var tmp = this.state_1;
2456
2456
  switch (tmp) {
2457
2457
  case 0:
2458
- this.i6_1 = 4;
2459
- this.h6_1 = 1;
2460
- suspendResult = await_0(fetchUrlBrowser(this.p16_1), this);
2458
+ this.exceptionState_1 = 4;
2459
+ this.state_1 = 1;
2460
+ suspendResult = await_0(fetchUrlBrowser(this.url_1), this);
2461
2461
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2462
2462
  return suspendResult;
2463
2463
  }
@@ -2466,11 +2466,11 @@
2466
2466
  case 1:
2467
2467
  var res = suspendResult;
2468
2468
  if (!res.ok) {
2469
- var message = 'Tile fetch failed for ' + this.p16_1 + ': HTTP ' + res.status;
2469
+ var message = 'Tile fetch failed for ' + this.url_1 + ': HTTP ' + res.status;
2470
2470
  throw IllegalStateException_init_$Create$_0(toString(message));
2471
2471
  }
2472
2472
 
2473
- this.h6_1 = 2;
2473
+ this.state_1 = 2;
2474
2474
  suspendResult = await_0(res.blob(), this);
2475
2475
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2476
2476
  return suspendResult;
@@ -2479,8 +2479,8 @@
2479
2479
  continue $sm;
2480
2480
  case 2:
2481
2481
  var ARGUMENT = suspendResult;
2482
- this.h6_1 = 3;
2483
- suspendResult = decodeBlob(ARGUMENT, this.p16_1, this);
2482
+ this.state_1 = 3;
2483
+ suspendResult = decodeBlob(ARGUMENT, this.url_1, this);
2484
2484
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2485
2485
  return suspendResult;
2486
2486
  }
@@ -2489,32 +2489,32 @@
2489
2489
  case 3:
2490
2490
  return suspendResult;
2491
2491
  case 4:
2492
- throw this.k6_1;
2492
+ throw this.exception_1;
2493
2493
  }
2494
2494
  } catch ($p) {
2495
2495
  var e = $p;
2496
- if (this.i6_1 === 4) {
2496
+ if (this.exceptionState_1 === 4) {
2497
2497
  throw e;
2498
2498
  } else {
2499
- this.h6_1 = this.i6_1;
2500
- this.k6_1 = e;
2499
+ this.state_1 = this.exceptionState_1;
2500
+ this.exception_1 = e;
2501
2501
  }
2502
2502
  }
2503
2503
  while (true);
2504
2504
  };
2505
2505
  function $decodeWebpNodeCOROUTINE$(buffer, resultContinuation) {
2506
2506
  CoroutineImpl.call(this, resultContinuation);
2507
- this.y16_1 = buffer;
2507
+ this.buffer_1 = buffer;
2508
2508
  }
2509
- protoOf($decodeWebpNodeCOROUTINE$).p6 = function () {
2510
- var suspendResult = this.j6_1;
2509
+ protoOf($decodeWebpNodeCOROUTINE$).doResume_5yljmg_k$ = function () {
2510
+ var suspendResult = this.result_1;
2511
2511
  $sm: do
2512
2512
  try {
2513
- var tmp = this.h6_1;
2513
+ var tmp = this.state_1;
2514
2514
  switch (tmp) {
2515
2515
  case 0:
2516
- this.i6_1 = 3;
2517
- this.h6_1 = 1;
2516
+ this.exceptionState_1 = 3;
2517
+ this.state_1 = 1;
2518
2518
  suspendResult = await_0(get_nodeWebpDecoderPromise(), this);
2519
2519
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2520
2520
  return suspendResult;
@@ -2523,8 +2523,8 @@
2523
2523
  continue $sm;
2524
2524
  case 1:
2525
2525
  var decode = suspendResult;
2526
- var resultPromise = decode(this.y16_1);
2527
- this.h6_1 = 2;
2526
+ var resultPromise = decode(this.buffer_1);
2527
+ this.state_1 = 2;
2528
2528
  suspendResult = await_0(resultPromise, this);
2529
2529
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2530
2530
  return suspendResult;
@@ -2534,52 +2534,52 @@
2534
2534
  case 2:
2535
2535
  return suspendResult;
2536
2536
  case 3:
2537
- throw this.k6_1;
2537
+ throw this.exception_1;
2538
2538
  }
2539
2539
  } catch ($p) {
2540
2540
  var e = $p;
2541
- if (this.i6_1 === 3) {
2541
+ if (this.exceptionState_1 === 3) {
2542
2542
  throw e;
2543
2543
  } else {
2544
- this.h6_1 = this.i6_1;
2545
- this.k6_1 = e;
2544
+ this.state_1 = this.exceptionState_1;
2545
+ this.exception_1 = e;
2546
2546
  }
2547
2547
  }
2548
2548
  while (true);
2549
2549
  };
2550
2550
  function $decodeBlobCOROUTINE$(blob, sourceUrl, resultContinuation) {
2551
2551
  CoroutineImpl.call(this, resultContinuation);
2552
- this.h17_1 = blob;
2553
- this.i17_1 = sourceUrl;
2552
+ this.blob_1 = blob;
2553
+ this.sourceUrl_1 = sourceUrl;
2554
2554
  }
2555
- protoOf($decodeBlobCOROUTINE$).p6 = function () {
2556
- var suspendResult = this.j6_1;
2555
+ protoOf($decodeBlobCOROUTINE$).doResume_5yljmg_k$ = function () {
2556
+ var suspendResult = this.result_1;
2557
2557
  $sm: do
2558
2558
  try {
2559
- var tmp = this.h6_1;
2559
+ var tmp = this.state_1;
2560
2560
  switch (tmp) {
2561
2561
  case 0:
2562
- this.i6_1 = 3;
2563
- this.i6_1 = 2;
2564
- this.h6_1 = 1;
2565
- suspendResult = await_0(window.createImageBitmap(this.h17_1), this);
2562
+ this.exceptionState_1 = 3;
2563
+ this.exceptionState_1 = 2;
2564
+ this.state_1 = 1;
2565
+ suspendResult = await_0(window.createImageBitmap(this.blob_1), this);
2566
2566
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2567
2567
  return suspendResult;
2568
2568
  }
2569
2569
 
2570
2570
  continue $sm;
2571
2571
  case 1:
2572
- this.j17_1 = suspendResult;
2573
- this.i6_1 = 3;
2574
- this.h6_1 = 4;
2572
+ this.TRY_RESULT0__1 = suspendResult;
2573
+ this.exceptionState_1 = 3;
2574
+ this.state_1 = 4;
2575
2575
  continue $sm;
2576
2576
  case 2:
2577
- this.i6_1 = 3;
2578
- var tmp_0 = this.k6_1;
2577
+ this.exceptionState_1 = 3;
2578
+ var tmp_0 = this.exception_1;
2579
2579
  if (tmp_0 instanceof Error) {
2580
- var e = this.k6_1;
2580
+ var e = this.exception_1;
2581
2581
  var tmp_1 = this;
2582
- var this_0 = this.i17_1;
2582
+ var this_0 = this.sourceUrl_1;
2583
2583
  var tmp_2;
2584
2584
  if (charSequenceLength(this_0) === 0) {
2585
2585
  tmp_2 = '<unnamed bytes>';
@@ -2589,14 +2589,14 @@
2589
2589
  var message = 'Cannot decode tile at ' + tmp_2 + ': ' + e.message;
2590
2590
  throw IllegalStateException_init_$Create$_0(toString(message));
2591
2591
  } else {
2592
- throw this.k6_1;
2592
+ throw this.exception_1;
2593
2593
  }
2594
2594
 
2595
2595
  case 3:
2596
- throw this.k6_1;
2596
+ throw this.exception_1;
2597
2597
  case 4:
2598
- this.i6_1 = 3;
2599
- var bitmap = this.j17_1;
2598
+ this.exceptionState_1 = 3;
2599
+ var bitmap = this.TRY_RESULT0__1;
2600
2600
  l$ret$3: do {
2601
2601
  var tmp$ret$0;
2602
2602
  l$ret$1: do {
@@ -2633,11 +2633,11 @@
2633
2633
  }
2634
2634
  } catch ($p_0) {
2635
2635
  var e_0 = $p_0;
2636
- if (this.i6_1 === 3) {
2636
+ if (this.exceptionState_1 === 3) {
2637
2637
  throw e_0;
2638
2638
  } else {
2639
- this.h6_1 = this.i6_1;
2640
- this.k6_1 = e_0;
2639
+ this.state_1 = this.exceptionState_1;
2640
+ this.exception_1 = e_0;
2641
2641
  }
2642
2642
  }
2643
2643
  while (true);
@@ -2654,7 +2654,7 @@
2654
2654
  function fetchAndDecodeTile$ref_1() {
2655
2655
  var i = new fetchAndDecodeTile$ref();
2656
2656
  return constructCallableReference(function (p0, $completion) {
2657
- return i.g10(p0, $completion);
2657
+ return i.invoke_fa3hvc_k$(p0, $completion);
2658
2658
  }, 1, 1, 2, 'fetchAndDecodeTile');
2659
2659
  }
2660
2660
  //region block: init