dl-common-util 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dl-common-util.js CHANGED
@@ -1,116 +1,116 @@
1
1
  (function (root, factory) {
2
2
  if (typeof define === 'function' && define.amd)
3
- define(['exports', 'pinyin-pro', './kotlin-kotlin-stdlib-js-ir.js', './buffer-kt.js'], factory);
3
+ define(['exports', 'pinyin-pro', './kotlin-kotlin-stdlib.js', './buffer-kt.js'], factory);
4
4
  else if (typeof exports === 'object')
5
- factory(module.exports, require('pinyin-pro'), require('./kotlin-kotlin-stdlib-js-ir.js'), require('./buffer-kt.js'));
5
+ factory(module.exports, require('pinyin-pro'), require('./kotlin-kotlin-stdlib.js'), require('./buffer-kt.js'));
6
6
  else {
7
7
  if (typeof PinyinPro === 'undefined') {
8
- throw new Error("Error loading module 'dl-common-util'. Its dependency 'pinyin-pro' was not found. Please, check whether 'pinyin-pro' is loaded prior to 'dl-common-util'.");
8
+ throw new Error("Error loading module 'com.github.D10NGYANG:DLCommonUtil'. Its dependency 'pinyin-pro' was not found. Please, check whether 'pinyin-pro' is loaded prior to 'com.github.D10NGYANG:DLCommonUtil'.");
9
9
  }
10
- if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
11
- throw new Error("Error loading module 'dl-common-util'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'dl-common-util'.");
10
+ if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
11
+ throw new Error("Error loading module 'com.github.D10NGYANG:DLCommonUtil'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'com.github.D10NGYANG:DLCommonUtil'.");
12
12
  }
13
13
  if (typeof this['buffer-kt'] === 'undefined') {
14
- throw new Error("Error loading module 'dl-common-util'. Its dependency 'buffer-kt' was not found. Please, check whether 'buffer-kt' is loaded prior to 'dl-common-util'.");
14
+ throw new Error("Error loading module 'com.github.D10NGYANG:DLCommonUtil'. Its dependency 'buffer-kt' was not found. Please, check whether 'buffer-kt' is loaded prior to 'com.github.D10NGYANG:DLCommonUtil'.");
15
15
  }
16
- root['dl-common-util'] = factory(typeof this['dl-common-util'] === 'undefined' ? {} : this['dl-common-util'], PinyinPro, this['kotlin-kotlin-stdlib-js-ir'], this['buffer-kt']);
16
+ root['com.github.D10NGYANG:DLCommonUtil'] = factory(typeof this['com.github.D10NGYANG:DLCommonUtil'] === 'undefined' ? {} : this['com.github.D10NGYANG:DLCommonUtil'], PinyinPro, this['kotlin-kotlin-stdlib'], this['buffer-kt']);
17
17
  }
18
18
  }(this, function (_, PinyinPro, kotlin_kotlin, kotlin_com_ditchoom_buffer) {
19
19
  'use strict';
20
20
  //region block: imports
21
21
  var imul = Math.imul;
22
- var VOID = kotlin_kotlin.$_$.g3;
23
- var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.e;
24
- var THROW_CCE = kotlin_kotlin.$_$.c3;
25
- var isCharSequence = kotlin_kotlin.$_$.m1;
26
- var trim = kotlin_kotlin.$_$.z2;
27
- var toString = kotlin_kotlin.$_$.v1;
28
- var Long = kotlin_kotlin.$_$.b3;
29
- var Companion_getInstance = kotlin_com_ditchoom_buffer.$_$.c;
22
+ var VOID = kotlin_kotlin.$_$.b;
23
+ var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.f;
24
+ var Unit_instance = kotlin_kotlin.$_$.s;
25
+ var THROW_CCE = kotlin_kotlin.$_$.e3;
26
+ var isCharSequence = kotlin_kotlin.$_$.o1;
27
+ var trim = kotlin_kotlin.$_$.b3;
28
+ var toString = kotlin_kotlin.$_$.x1;
29
+ var Long = kotlin_kotlin.$_$.d3;
30
+ var Companion_instance = kotlin_com_ditchoom_buffer.$_$.c;
30
31
  var wrap = kotlin_com_ditchoom_buffer.$_$.b;
31
- var toLong = kotlin_kotlin.$_$.t1;
32
- var indexOf = kotlin_kotlin.$_$.x;
33
- var copyOfRange = kotlin_kotlin.$_$.v;
32
+ var toLong = kotlin_kotlin.$_$.v1;
33
+ var indexOf = kotlin_kotlin.$_$.y;
34
+ var copyOfRange = kotlin_kotlin.$_$.w;
34
35
  var allocate = kotlin_com_ditchoom_buffer.$_$.a;
35
- var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.m;
36
- var toString_0 = kotlin_kotlin.$_$.x2;
37
- var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.j;
38
- var padStart = kotlin_kotlin.$_$.l2;
39
- var _UByte___get_data__impl__jof9qr = kotlin_kotlin.$_$.n;
40
- var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.g;
41
- var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.f;
42
- var indexOf_0 = kotlin_kotlin.$_$.i2;
43
- var numberToInt = kotlin_kotlin.$_$.o1;
44
- var toByte = kotlin_kotlin.$_$.s1;
45
- var toInt = kotlin_kotlin.$_$.v2;
46
- var charSequenceLength = kotlin_kotlin.$_$.e1;
47
- var hexToByte = kotlin_kotlin.$_$.h2;
48
- var hexToByteArray = kotlin_kotlin.$_$.g2;
49
- var iterator = kotlin_kotlin.$_$.j2;
50
- var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.k;
51
- var charSequenceGet = kotlin_kotlin.$_$.d1;
52
- var toString_1 = kotlin_kotlin.$_$.l;
53
- var THROW_ISE = kotlin_kotlin.$_$.d3;
54
- var Unit_getInstance = kotlin_kotlin.$_$.r;
55
- var Enum = kotlin_kotlin.$_$.a3;
56
- var protoOf = kotlin_kotlin.$_$.q1;
57
- var defineProp = kotlin_kotlin.$_$.h1;
58
- var classMeta = kotlin_kotlin.$_$.f1;
59
- var setMetadataFor = kotlin_kotlin.$_$.r1;
60
- var noWhenBranchMatchedException = kotlin_kotlin.$_$.e3;
36
+ var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.n;
37
+ var toString_0 = kotlin_kotlin.$_$.z2;
38
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.k;
39
+ var padStart = kotlin_kotlin.$_$.n2;
40
+ var _UByte___get_data__impl__jof9qr = kotlin_kotlin.$_$.o;
41
+ var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.h;
42
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.g;
43
+ var indexOf_0 = kotlin_kotlin.$_$.k2;
44
+ var numberToInt = kotlin_kotlin.$_$.q1;
45
+ var toByte = kotlin_kotlin.$_$.u1;
46
+ var toInt = kotlin_kotlin.$_$.x2;
47
+ var charSequenceLength = kotlin_kotlin.$_$.f1;
48
+ var hexToByte = kotlin_kotlin.$_$.j2;
49
+ var hexToByteArray = kotlin_kotlin.$_$.i2;
50
+ var iterator = kotlin_kotlin.$_$.l2;
51
+ var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.l;
52
+ var charSequenceGet = kotlin_kotlin.$_$.e1;
53
+ var toString_1 = kotlin_kotlin.$_$.m;
54
+ var numberToChar = kotlin_kotlin.$_$.p1;
55
+ var THROW_IAE = kotlin_kotlin.$_$.f3;
56
+ var Enum = kotlin_kotlin.$_$.c3;
57
+ var protoOf = kotlin_kotlin.$_$.s1;
58
+ var defineProp = kotlin_kotlin.$_$.i1;
59
+ var classMeta = kotlin_kotlin.$_$.g1;
60
+ var setMetadataFor = kotlin_kotlin.$_$.t1;
61
+ var noWhenBranchMatchedException = kotlin_kotlin.$_$.g3;
61
62
  var primitiveArrayConcat = kotlin_kotlin.$_$.a;
62
- var roundToInt = kotlin_kotlin.$_$.x1;
63
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.c;
64
- var until = kotlin_kotlin.$_$.z1;
65
- var step = kotlin_kotlin.$_$.y1;
66
- var slice = kotlin_kotlin.$_$.p2;
67
- var toUInt = kotlin_kotlin.$_$.y2;
68
- var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.o;
69
- var copyToArray = kotlin_kotlin.$_$.w;
70
- var toString_2 = kotlin_kotlin.$_$.w2;
71
- var Regex_init_$Create$ = kotlin_kotlin.$_$.d;
72
- var map = kotlin_kotlin.$_$.b2;
73
- var joinToString = kotlin_kotlin.$_$.a2;
74
- var getNumberHashCode = kotlin_kotlin.$_$.j1;
75
- var equals = kotlin_kotlin.$_$.i1;
76
- var get_PI = kotlin_kotlin.$_$.w1;
77
- var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.i;
78
- var removeLast = kotlin_kotlin.$_$.z;
79
- var Default_getInstance = kotlin_kotlin.$_$.q;
80
- var to = kotlin_kotlin.$_$.f3;
81
- var collectionSizeOrDefault = kotlin_kotlin.$_$.s;
82
- var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.b;
83
- var copyOfRange_0 = kotlin_kotlin.$_$.u;
84
- var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.h;
85
- var compareTo = kotlin_kotlin.$_$.g1;
86
- var objectMeta = kotlin_kotlin.$_$.p1;
87
- var toList = kotlin_kotlin.$_$.c2;
88
- var replaceRange = kotlin_kotlin.$_$.m2;
89
- var contains = kotlin_kotlin.$_$.d2;
90
- var println = kotlin_kotlin.$_$.c1;
91
- var toCharArray = kotlin_kotlin.$_$.r2;
92
- var replaceRange_0 = kotlin_kotlin.$_$.n2;
93
- var substring = kotlin_kotlin.$_$.q2;
94
- var toDouble = kotlin_kotlin.$_$.s2;
95
- var toInt_0 = kotlin_kotlin.$_$.u2;
96
- var encodeToByteArray = kotlin_kotlin.$_$.f2;
97
- var decodeToString = kotlin_kotlin.$_$.e2;
98
- var replace = kotlin_kotlin.$_$.o2;
99
- var padEnd = kotlin_kotlin.$_$.k2;
100
- var getProgressionLastElement = kotlin_kotlin.$_$.b1;
101
- var toIntOrNull = kotlin_kotlin.$_$.t2;
102
- var numberToChar = kotlin_kotlin.$_$.n1;
103
- var toShort = kotlin_kotlin.$_$.u1;
104
- var toTypedArray = kotlin_kotlin.$_$.a1;
105
- var joinToString_0 = kotlin_kotlin.$_$.y;
63
+ var roundToInt = kotlin_kotlin.$_$.z1;
64
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.d;
65
+ var until = kotlin_kotlin.$_$.b2;
66
+ var step = kotlin_kotlin.$_$.a2;
67
+ var slice = kotlin_kotlin.$_$.r2;
68
+ var toUInt = kotlin_kotlin.$_$.a3;
69
+ var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.p;
70
+ var copyToArray = kotlin_kotlin.$_$.x;
71
+ var toString_2 = kotlin_kotlin.$_$.y2;
72
+ var Regex_init_$Create$ = kotlin_kotlin.$_$.e;
73
+ var map = kotlin_kotlin.$_$.d2;
74
+ var joinToString = kotlin_kotlin.$_$.c2;
75
+ var getNumberHashCode = kotlin_kotlin.$_$.l1;
76
+ var equals = kotlin_kotlin.$_$.j1;
77
+ var get_PI = kotlin_kotlin.$_$.y1;
78
+ var objectMeta = kotlin_kotlin.$_$.r1;
79
+ var toList = kotlin_kotlin.$_$.e2;
80
+ var replaceRange = kotlin_kotlin.$_$.o2;
81
+ var contains = kotlin_kotlin.$_$.f2;
82
+ var println = kotlin_kotlin.$_$.d1;
83
+ var toCharArray = kotlin_kotlin.$_$.t2;
84
+ var replaceRange_0 = kotlin_kotlin.$_$.p2;
85
+ var substring = kotlin_kotlin.$_$.s2;
86
+ var toDouble = kotlin_kotlin.$_$.u2;
87
+ var toInt_0 = kotlin_kotlin.$_$.w2;
88
+ var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.j;
89
+ var removeLast = kotlin_kotlin.$_$.a1;
90
+ var Default_getInstance = kotlin_kotlin.$_$.r;
91
+ var to = kotlin_kotlin.$_$.h3;
92
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.t;
93
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.c;
94
+ var copyOfRange_0 = kotlin_kotlin.$_$.v;
95
+ var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.i;
96
+ var compareTo = kotlin_kotlin.$_$.h1;
97
+ var encodeToByteArray = kotlin_kotlin.$_$.h2;
98
+ var decodeToString = kotlin_kotlin.$_$.g2;
99
+ var replace = kotlin_kotlin.$_$.q2;
100
+ var padEnd = kotlin_kotlin.$_$.m2;
101
+ var getProgressionLastElement = kotlin_kotlin.$_$.c1;
102
+ var toIntOrNull = kotlin_kotlin.$_$.v2;
103
+ var toShort = kotlin_kotlin.$_$.w1;
104
+ var toTypedArray = kotlin_kotlin.$_$.b1;
105
+ var joinToString_0 = kotlin_kotlin.$_$.z;
106
106
  //endregion
107
107
  //region block: pre-declaration
108
108
  setMetadataFor(ChecksumType, 'ChecksumType', classMeta, Enum);
109
- setMetadataFor(Coordinate, 'Coordinate', classMeta);
109
+ setMetadataFor(Coordinate, 'Coordinate', classMeta, VOID, VOID, Coordinate);
110
110
  setMetadataFor(CoordinateConvert, 'CoordinateConvert', objectMeta);
111
111
  setMetadataFor(CoordinateSystemType, 'CoordinateSystemType', classMeta, Enum);
112
- setMetadataFor(DMS, 'DMS', classMeta);
113
- setMetadataFor(DistanceAndBearing, 'DistanceAndBearing', classMeta);
112
+ setMetadataFor(DMS, 'DMS', classMeta, VOID, VOID, DMS);
113
+ setMetadataFor(DistanceAndBearing, 'DistanceAndBearing', classMeta, VOID, VOID, DistanceAndBearing);
114
114
  setMetadataFor(GBKHelper, 'GBKHelper', objectMeta);
115
115
  //endregion
116
116
  function byteArrayToBinString(_this__u8e3s4, space) {
@@ -121,14 +121,14 @@
121
121
  while (inductionVariable < last) {
122
122
  var byte = _this__u8e3s4[inductionVariable];
123
123
  inductionVariable = inductionVariable + 1 | 0;
124
- builder.g4(byteToBinString(byte));
124
+ builder.f3(byteToBinString(byte));
125
125
  if (space) {
126
- builder.g4(' ');
126
+ builder.f3(' ');
127
127
  }
128
128
  }
129
129
  // Inline function 'kotlin.text.trim' call
130
- var tmp0_trim = builder.toString();
131
- return toString(trim(isCharSequence(tmp0_trim) ? tmp0_trim : THROW_CCE()));
130
+ var this_0 = builder.toString();
131
+ return toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
132
132
  }
133
133
  function byteArrayToHexString(_this__u8e3s4, space, uppercase) {
134
134
  space = space === VOID ? false : space;
@@ -139,14 +139,14 @@
139
139
  while (inductionVariable < last) {
140
140
  var byte = _this__u8e3s4[inductionVariable];
141
141
  inductionVariable = inductionVariable + 1 | 0;
142
- builder.g4(byteToHexString(byte));
142
+ builder.f3(byteToHexString(byte));
143
143
  if (space) {
144
- builder.g4(' ');
144
+ builder.f3(' ');
145
145
  }
146
146
  }
147
147
  // Inline function 'kotlin.text.trim' call
148
- var tmp0_trim = builder.toString();
149
- var result = toString(trim(isCharSequence(tmp0_trim) ? tmp0_trim : THROW_CCE()));
148
+ var this_0 = builder.toString();
149
+ var result = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
150
150
  var tmp;
151
151
  if (uppercase) {
152
152
  // Inline function 'kotlin.text.uppercase' call
@@ -160,21 +160,21 @@
160
160
  return tmp;
161
161
  }
162
162
  function byteArrayToUnsignedInt(_this__u8e3s4) {
163
- return byteArrayToUnsignedLong(_this__u8e3s4).b4();
163
+ return byteArrayToUnsignedLong(_this__u8e3s4).j7();
164
164
  }
165
165
  function byteArrayToUnsignedLong(_this__u8e3s4) {
166
166
  // Inline function 'kotlin.collections.isEmpty' call
167
167
  if (_this__u8e3s4.length === 0)
168
168
  return new Long(0, 0);
169
- var buffer = wrap(Companion_getInstance(), _this__u8e3s4);
170
- var temp = toLong(byteToUnsignedInt(buffer.g(0)));
169
+ var buffer = wrap(Companion_instance, _this__u8e3s4);
170
+ var temp = toLong(byteToUnsignedInt(buffer.t(0)));
171
171
  var inductionVariable = 1;
172
- var last = buffer.lb();
172
+ var last = buffer.la();
173
173
  if (inductionVariable < last)
174
174
  do {
175
175
  var i = inductionVariable;
176
176
  inductionVariable = inductionVariable + 1 | 0;
177
- temp = temp.v3(8).w3(toLong(byteToUnsignedInt(buffer.g(i))));
177
+ temp = temp.f7(8).h7(toLong(byteToUnsignedInt(buffer.t(i))));
178
178
  }
179
179
  while (inductionVariable < last);
180
180
  return temp;
@@ -187,17 +187,17 @@
187
187
  return -1;
188
188
  if (bs.length === 1)
189
189
  return indexOf(_this__u8e3s4, bs[0]);
190
- var buffer = wrap(Companion_getInstance(), _this__u8e3s4);
191
- while (buffer.ab()) {
192
- if (buffer.za() < bs.length)
190
+ var buffer = wrap(Companion_instance, _this__u8e3s4);
191
+ while (buffer.z9()) {
192
+ if (buffer.y9() < bs.length)
193
193
  return -1;
194
194
  var idx = 0;
195
- $l$loop: while (idx < bs.length && buffer.mb() === bs[idx]) {
195
+ $l$loop: while (idx < bs.length && buffer.ma() === bs[idx]) {
196
196
  idx = idx + 1 | 0;
197
197
  }
198
198
  if (idx === bs.length)
199
- return buffer.ya() - idx | 0;
200
- buffer.pb((buffer.ya() - idx | 0) + 1 | 0);
199
+ return buffer.w9() - idx | 0;
200
+ buffer.x9((buffer.w9() - idx | 0) + 1 | 0);
201
201
  }
202
202
  return -1;
203
203
  }
@@ -205,54 +205,52 @@
205
205
  padByte = padByte === VOID ? 0 : padByte;
206
206
  if (_this__u8e3s4.length >= length)
207
207
  return copyOfRange(_this__u8e3s4, _this__u8e3s4.length - length | 0, _this__u8e3s4.length);
208
- var buf = allocate(Companion_getInstance(), length);
208
+ var buf = allocate(Companion_instance, length);
209
209
  var inductionVariable = 0;
210
210
  var last = length - _this__u8e3s4.length | 0;
211
211
  if (inductionVariable < last)
212
212
  do {
213
213
  var i = inductionVariable;
214
214
  inductionVariable = inductionVariable + 1 | 0;
215
- buf.ob(i, padByte);
215
+ buf.aa(i, padByte);
216
216
  }
217
217
  while (inductionVariable < last);
218
- buf.pb(length - _this__u8e3s4.length | 0);
219
- buf.bb(_this__u8e3s4);
220
- buf.pb(0);
221
- return buf.nb(length);
218
+ buf.x9(length - _this__u8e3s4.length | 0);
219
+ buf.ba(_this__u8e3s4);
220
+ buf.x9(0);
221
+ return buf.na(length);
222
222
  }
223
223
  function byteArrayPadEnd(_this__u8e3s4, length, padByte) {
224
224
  padByte = padByte === VOID ? 0 : padByte;
225
225
  if (_this__u8e3s4.length >= length)
226
226
  return copyOfRange(_this__u8e3s4, 0, length);
227
- var buf = allocate(Companion_getInstance(), length);
228
- buf.bb(_this__u8e3s4);
227
+ var buf = allocate(Companion_instance, length);
228
+ buf.ba(_this__u8e3s4);
229
229
  var inductionVariable = 0;
230
230
  var last = length - _this__u8e3s4.length | 0;
231
231
  if (inductionVariable < last)
232
232
  do {
233
233
  var i = inductionVariable;
234
234
  inductionVariable = inductionVariable + 1 | 0;
235
- buf.ob(i + _this__u8e3s4.length | 0, padByte);
235
+ buf.aa(i + _this__u8e3s4.length | 0, padByte);
236
236
  }
237
237
  while (inductionVariable < last);
238
- buf.pb(0);
239
- return buf.nb(length);
238
+ buf.x9(0);
239
+ return buf.na(length);
240
240
  }
241
241
  function byteArrayGetBitRange(_this__u8e3s4, start, length) {
242
- var buf = wrap(Companion_getInstance(), _this__u8e3s4);
242
+ var buf = wrap(Companion_instance, _this__u8e3s4);
243
243
  return getBitRange(buf, start, length);
244
244
  }
245
245
  function byteToBinString(_this__u8e3s4) {
246
- var tmp$ret$0;
247
246
  // Inline function 'kotlin.toUByte' call
248
- tmp$ret$0 = _UByte___init__impl__g9hnc4(_this__u8e3s4);
247
+ var tmp$ret$0 = _UByte___init__impl__g9hnc4(_this__u8e3s4);
249
248
  return padStart(toString_0(tmp$ret$0, 2), 8, _Char___init__impl__6a9atx(48));
250
249
  }
251
250
  function byteToHexString(_this__u8e3s4, uppercase) {
252
251
  uppercase = uppercase === VOID ? true : uppercase;
253
- var tmp$ret$0;
254
252
  // Inline function 'kotlin.toUByte' call
255
- tmp$ret$0 = _UByte___init__impl__g9hnc4(_this__u8e3s4);
253
+ var tmp$ret$0 = _UByte___init__impl__g9hnc4(_this__u8e3s4);
256
254
  var result = padStart(toString_0(tmp$ret$0, 16), 2, _Char___init__impl__6a9atx(48));
257
255
  var tmp;
258
256
  if (uppercase) {
@@ -269,8 +267,8 @@
269
267
  function byteToUnsignedInt(_this__u8e3s4) {
270
268
  // Inline function 'kotlin.UByte.toInt' call
271
269
  // Inline function 'kotlin.toUByte' call
272
- var tmp0_toInt = _UByte___init__impl__g9hnc4(_this__u8e3s4);
273
- return _UByte___get_data__impl__jof9qr(tmp0_toInt) & 255;
270
+ var this_0 = _UByte___init__impl__g9hnc4(_this__u8e3s4);
271
+ return _UByte___get_data__impl__jof9qr(this_0) & 255;
274
272
  }
275
273
  function byteGetBit(_this__u8e3s4, bitIndex) {
276
274
  if (!(0 <= bitIndex ? bitIndex <= 7 : false))
@@ -293,9 +291,9 @@
293
291
  var tmp_0;
294
292
  if (decimalCount > maxDecimalCount) {
295
293
  // Inline function 'kotlin.text.substring' call
296
- var tmp0_substring = (pointIndex + maxDecimalCount | 0) + 1 | 0;
294
+ var endIndex = (pointIndex + maxDecimalCount | 0) + 1 | 0;
297
295
  // Inline function 'kotlin.js.asDynamic' call
298
- tmp_0 = _this__u8e3s4.substring(0, tmp0_substring);
296
+ tmp_0 = _this__u8e3s4.substring(0, endIndex);
299
297
  } else {
300
298
  tmp_0 = _this__u8e3s4;
301
299
  }
@@ -310,10 +308,9 @@
310
308
  var hex = numberToString(_this__u8e3s4, 16);
311
309
  var tmp;
312
310
  if (size <= 0) {
313
- var tmp$ret$0;
314
311
  // Inline function 'kotlin.math.ceil' call
315
- var tmp0_ceil = hex.length / 2.0;
316
- tmp$ret$0 = Math.ceil(tmp0_ceil);
312
+ var x = hex.length / 2.0;
313
+ var tmp$ret$0 = Math.ceil(x);
317
314
  tmp = numberToInt(tmp$ret$0);
318
315
  } else {
319
316
  tmp = size;
@@ -323,15 +320,14 @@
323
320
  }
324
321
  function toByteArray_0(_this__u8e3s4, size) {
325
322
  size = size === VOID ? 0 : size;
326
- if (_this__u8e3s4.a4(new Long(0, 0)) < 0)
323
+ if (_this__u8e3s4.y6(new Long(0, 0)) < 0)
327
324
  throw IllegalArgumentException_init_$Create$('Long must be unsigned');
328
325
  var hex = numberToString(_this__u8e3s4, 16);
329
326
  var tmp;
330
327
  if (size <= 0) {
331
- var tmp$ret$0;
332
328
  // Inline function 'kotlin.math.ceil' call
333
- var tmp0_ceil = hex.length / 2.0;
334
- tmp$ret$0 = Math.ceil(tmp0_ceil);
329
+ var x = hex.length / 2.0;
330
+ var tmp$ret$0 = Math.ceil(x);
335
331
  tmp = numberToInt(tmp$ret$0);
336
332
  } else {
337
333
  tmp = size;
@@ -346,29 +342,27 @@
346
342
  }
347
343
  if (start < 0)
348
344
  throw IllegalArgumentException_init_$Create$('start must be greater than 0');
349
- if ((start + length | 0) > imul(_this__u8e3s4.lb(), 8))
345
+ if ((start + length | 0) > imul(_this__u8e3s4.la(), 8))
350
346
  throw IllegalArgumentException_init_$Create$('start + offset must be less than capacity * 8');
351
347
  var right = (8 - ((start + length | 0) % 8 | 0) | 0) % 8 | 0;
352
348
  var left = (8 - (length % 8 | 0) | 0) % 8 | 0;
353
- var tmp$ret$1;
354
349
  // Inline function 'kotlin.math.ceil' call
355
- var tmp0_ceil = length / 8.0;
356
- tmp$ret$1 = Math.ceil(tmp0_ceil);
350
+ var x = length / 8.0;
351
+ var tmp$ret$1 = Math.ceil(x);
357
352
  var resSize = numberToInt(tmp$ret$1);
358
353
  var result = new Int8Array(resSize);
359
354
  var startByteIdx = start / 8 | 0;
360
- var tmp$ret$2;
361
355
  // Inline function 'kotlin.math.ceil' call
362
- var tmp1_ceil = (start + length | 0) / 8.0;
363
- tmp$ret$2 = Math.ceil(tmp1_ceil);
356
+ var x_0 = (start + length | 0) / 8.0;
357
+ var tmp$ret$2 = Math.ceil(x_0);
364
358
  var endByteIdx = numberToInt(tmp$ret$2);
365
359
  var buf = _this__u8e3s4;
366
360
  var originSize = endByteIdx - startByteIdx | 0;
367
361
  var idx = originSize - 1 | 0;
368
362
  while ((resSize - (originSize - idx | 0) | 0) >= 0) {
369
- var temp = byteToUnsignedInt(buf.g(idx + startByteIdx | 0)) >> right;
363
+ var temp = byteToUnsignedInt(buf.t(idx + startByteIdx | 0)) >> right;
370
364
  if (idx > 0)
371
- temp = temp | byteToUnsignedInt(buf.g((idx + startByteIdx | 0) - 1 | 0)) << (8 - right | 0);
365
+ temp = temp | byteToUnsignedInt(buf.t((idx + startByteIdx | 0) - 1 | 0)) << (8 - right | 0);
372
366
  result[resSize - (originSize - idx | 0) | 0] = toByte(temp);
373
367
  idx = idx - 1 | 0;
374
368
  }
@@ -383,15 +377,14 @@
383
377
  function binStringToByteArray(_this__u8e3s4) {
384
378
  var value = keepByRegexStr(_this__u8e3s4, '[01]+');
385
379
  // Inline function 'kotlin.text.isEmpty' call
386
- var tmp0_isEmpty = value;
387
- if (charSequenceLength(tmp0_isEmpty) === 0) {
380
+ var this_0 = value;
381
+ if (charSequenceLength(this_0) === 0) {
388
382
  // Inline function 'kotlin.byteArrayOf' call
389
383
  return new Int8Array([]);
390
384
  }
391
- var tmp$ret$2;
392
385
  // Inline function 'kotlin.math.ceil' call
393
- var tmp1_ceil = value.length / 8.0;
394
- tmp$ret$2 = Math.ceil(tmp1_ceil);
386
+ var x = value.length / 8.0;
387
+ var tmp$ret$2 = Math.ceil(x);
395
388
  var length = numberToInt(tmp$ret$2);
396
389
  value = padStart(value, imul(length, 8), _Char___init__impl__6a9atx(48));
397
390
  var result = new Int8Array(length);
@@ -400,13 +393,12 @@
400
393
  do {
401
394
  var i = inductionVariable;
402
395
  inductionVariable = inductionVariable + 1 | 0;
403
- var tmp$ret$4;
404
396
  // Inline function 'kotlin.text.substring' call
405
- var tmp2_substring = value;
406
- var tmp3_substring = imul(i, 8);
407
- var tmp4_substring = imul(i, 8) + 8 | 0;
397
+ var this_1 = value;
398
+ var startIndex = imul(i, 8);
399
+ var endIndex = imul(i, 8) + 8 | 0;
408
400
  // Inline function 'kotlin.js.asDynamic' call
409
- tmp$ret$4 = tmp2_substring.substring(tmp3_substring, tmp4_substring);
401
+ var tmp$ret$4 = this_1.substring(startIndex, endIndex);
410
402
  result[i] = binStringToByte(tmp$ret$4);
411
403
  }
412
404
  while (inductionVariable < length);
@@ -420,15 +412,14 @@
420
412
  function hexStringToByteArray(_this__u8e3s4) {
421
413
  var value = keepByRegexStr(_this__u8e3s4, '[A-Fa-f0-9]+');
422
414
  // Inline function 'kotlin.text.isEmpty' call
423
- var tmp0_isEmpty = value;
424
- if (charSequenceLength(tmp0_isEmpty) === 0) {
415
+ var this_0 = value;
416
+ if (charSequenceLength(this_0) === 0) {
425
417
  // Inline function 'kotlin.byteArrayOf' call
426
418
  return new Int8Array([]);
427
419
  }
428
- var tmp$ret$2;
429
420
  // Inline function 'kotlin.math.ceil' call
430
- var tmp1_ceil = value.length / 2.0;
431
- tmp$ret$2 = Math.ceil(tmp1_ceil);
421
+ var x = value.length / 2.0;
422
+ var tmp$ret$2 = Math.ceil(x);
432
423
  var length = numberToInt(tmp$ret$2);
433
424
  value = padStart(value, imul(length, 2), _Char___init__impl__6a9atx(48));
434
425
  return hexToByteArray(value);
@@ -437,8 +428,8 @@
437
428
  var length = 0;
438
429
  // Inline function 'kotlin.collections.iterator' call
439
430
  var tmp0_iterator = iterator(_this__u8e3s4);
440
- while (tmp0_iterator.d()) {
441
- var i = tmp0_iterator.e().c3_1;
431
+ while (tmp0_iterator.r()) {
432
+ var i = tmp0_iterator.s().x5_1;
442
433
  // Inline function 'kotlin.code' call
443
434
  var ascii = Char__toInt_impl_vasixd(i);
444
435
  if (0 <= ascii ? ascii <= 255 : false) {
@@ -455,13 +446,34 @@
455
446
  tmp = '';
456
447
  } else {
457
448
  // Inline function 'kotlin.text.uppercase' call
458
- var tmp0_uppercase = charSequenceGet(_this__u8e3s4, 0);
449
+ var this_0 = charSequenceGet(_this__u8e3s4, 0);
459
450
  // Inline function 'kotlin.js.unsafeCast' call
460
451
  // Inline function 'kotlin.js.asDynamic' call
461
- tmp = toString_1(tmp0_uppercase).toUpperCase();
452
+ tmp = toString_1(this_0).toUpperCase();
462
453
  }
463
454
  return tmp;
464
455
  }
456
+ function stringToFullWidthString(_this__u8e3s4) {
457
+ var sb = StringBuilder_init_$Create$();
458
+ var inductionVariable = 0;
459
+ var last = _this__u8e3s4.length;
460
+ while (inductionVariable < last) {
461
+ var c = charSequenceGet(_this__u8e3s4, inductionVariable);
462
+ inductionVariable = inductionVariable + 1 | 0;
463
+ // Inline function 'kotlin.code' call
464
+ var tmp1_subject = Char__toInt_impl_vasixd(c);
465
+ if (33 <= tmp1_subject ? tmp1_subject <= 126 : false) {
466
+ // Inline function 'kotlin.code' call
467
+ var tmp$ret$1 = Char__toInt_impl_vasixd(c);
468
+ sb.g3(numberToChar(tmp$ret$1 + 65248 | 0));
469
+ } else if (tmp1_subject === 32) {
470
+ sb.f3('\u3000');
471
+ } else {
472
+ sb.g3(c);
473
+ }
474
+ }
475
+ return sb.toString();
476
+ }
465
477
  var ChecksumType_AND_instance;
466
478
  var ChecksumType_OR_instance;
467
479
  var ChecksumType_XOR_instance;
@@ -478,14 +490,14 @@
478
490
  return ChecksumType_XOR_getInstance();
479
491
  default:
480
492
  ChecksumType_initEntries();
481
- THROW_ISE();
493
+ THROW_IAE('No enum constant value.');
482
494
  break;
483
495
  }
484
496
  }
485
497
  var ChecksumType_entriesInitialized;
486
498
  function ChecksumType_initEntries() {
487
499
  if (ChecksumType_entriesInitialized)
488
- return Unit_getInstance();
500
+ return Unit_instance;
489
501
  ChecksumType_entriesInitialized = true;
490
502
  ChecksumType_AND_instance = new ChecksumType('AND', 0);
491
503
  ChecksumType_OR_instance = new ChecksumType('OR', 1);
@@ -508,32 +520,32 @@
508
520
  length = length === VOID ? _this__u8e3s4.length - start | 0 : length;
509
521
  var num = 0;
510
522
  // Inline function 'kotlin.math.min' call
511
- var tmp0_min = start + length | 0;
512
- var tmp1_min = _this__u8e3s4.length;
513
- var end = Math.min(tmp0_min, tmp1_min);
523
+ var a = start + length | 0;
524
+ var b = _this__u8e3s4.length;
525
+ var end = Math.min(a, b);
514
526
  var inductionVariable = start;
515
527
  if (inductionVariable < end)
516
528
  do {
517
529
  var i = inductionVariable;
518
530
  inductionVariable = inductionVariable + 1 | 0;
519
531
  var tmp;
520
- switch (type.ja_1) {
532
+ switch (type.l6_1) {
521
533
  case 0:
522
534
  tmp = toByte(num + _this__u8e3s4[i]);
523
535
  break;
524
536
  case 1:
525
537
  // Inline function 'kotlin.experimental.or' call
526
538
 
527
- var tmp2_or = num;
528
- var tmp3_or = _this__u8e3s4[i];
529
- tmp = toByte(tmp2_or | tmp3_or);
539
+ var this_0 = num;
540
+ var other = _this__u8e3s4[i];
541
+ tmp = toByte(this_0 | other);
530
542
  break;
531
543
  case 2:
532
544
  // Inline function 'kotlin.experimental.xor' call
533
545
 
534
- var tmp4_xor = num;
535
- var tmp5_xor = _this__u8e3s4[i];
536
- tmp = toByte(tmp4_xor ^ tmp5_xor);
546
+ var this_1 = num;
547
+ var other_0 = _this__u8e3s4[i];
548
+ tmp = toByte(this_1 ^ other_0);
537
549
  break;
538
550
  default:
539
551
  noWhenBranchMatchedException();
@@ -547,11 +559,11 @@
547
559
  function addChecksum(_this__u8e3s4, type) {
548
560
  type = type === VOID ? ChecksumType_XOR_getInstance() : type;
549
561
  // Inline function 'kotlin.collections.plus' call
550
- var tmp0_plus = getChecksum(_this__u8e3s4, type);
562
+ var element = getChecksum(_this__u8e3s4, type);
551
563
  // Inline function 'kotlin.collections.plus' call
552
564
  // Inline function 'kotlin.byteArrayOf' call
553
- var tmp0_plus_0 = new Int8Array([tmp0_plus]);
554
- return primitiveArrayConcat([_this__u8e3s4, tmp0_plus_0]);
565
+ var elements = new Int8Array([element]);
566
+ return primitiveArrayConcat([_this__u8e3s4, elements]);
555
567
  }
556
568
  function ChecksumType_AND_getInstance() {
557
569
  ChecksumType_initEntries();
@@ -571,9 +583,8 @@
571
583
  }
572
584
  function getNextLevelColor(color, level) {
573
585
  var target = level > 0.0 ? '#FFFFFF' : '#000000';
574
- var tmp$ret$0;
575
586
  // Inline function 'kotlin.math.abs' call
576
- tmp$ret$0 = Math.abs(level);
587
+ var tmp$ret$0 = Math.abs(level);
577
588
  return getMiddleColor(color, target, tmp$ret$0);
578
589
  }
579
590
  function getMiddleColor(color1, color2, present) {
@@ -583,23 +594,22 @@
583
594
  var greenRange = endColorNumbers[1] - startColorNumbers[1] | 0;
584
595
  var blueRange = endColorNumbers[2] - startColorNumbers[2] | 0;
585
596
  // Inline function 'kotlin.math.roundToInt' call
586
- var tmp0_roundToInt = redRange * present;
587
- var red = roundToInt(tmp0_roundToInt) + startColorNumbers[0] | 0;
597
+ var this_0 = redRange * present;
598
+ var red = roundToInt(this_0) + startColorNumbers[0] | 0;
588
599
  // Inline function 'kotlin.math.roundToInt' call
589
- var tmp1_roundToInt = greenRange * present;
590
- var green = roundToInt(tmp1_roundToInt) + startColorNumbers[1] | 0;
600
+ var this_1 = greenRange * present;
601
+ var green = roundToInt(this_1) + startColorNumbers[1] | 0;
591
602
  // Inline function 'kotlin.math.roundToInt' call
592
- var tmp2_roundToInt = blueRange * present;
593
- var blue = roundToInt(tmp2_roundToInt) + startColorNumbers[2] | 0;
594
- var tmp$ret$5;
603
+ var this_2 = blueRange * present;
604
+ var blue = roundToInt(this_2) + startColorNumbers[2] | 0;
595
605
  // Inline function 'kotlin.arrayOf' call
596
606
  // Inline function 'kotlin.js.unsafeCast' call
597
607
  // Inline function 'kotlin.js.asDynamic' call
598
- tmp$ret$5 = [red, green, blue];
608
+ var tmp$ret$5 = [red, green, blue];
599
609
  return getHexColorStringFromRgbValueArray(tmp$ret$5);
600
610
  }
601
611
  function getRgbValueArrayFromHexColorString(str) {
602
- if (!get_colorRegex().a9(str)) {
612
+ if (!get_colorRegex().o4(str)) {
603
613
  // Inline function 'kotlin.arrayOf' call
604
614
  // Inline function 'kotlin.js.unsafeCast' call
605
615
  // Inline function 'kotlin.js.asDynamic' call
@@ -624,19 +634,18 @@
624
634
  // Inline function 'kotlin.collections.mutableListOf' call
625
635
  var arr = ArrayList_init_$Create$();
626
636
  var progression = step(until(1, hexColor.length), 2);
627
- var inductionVariable_0 = progression.k_1;
628
- var last_0 = progression.l_1;
629
- var step_0 = progression.m_1;
637
+ var inductionVariable_0 = progression.u5_1;
638
+ var last_0 = progression.v5_1;
639
+ var step_0 = progression.w5_1;
630
640
  if ((step_0 > 0 ? inductionVariable_0 <= last_0 : false) ? true : step_0 < 0 ? last_0 <= inductionVariable_0 : false)
631
641
  do {
632
642
  var i_0 = inductionVariable_0;
633
643
  inductionVariable_0 = inductionVariable_0 + step_0 | 0;
634
644
  var s = slice(hexColor, until(i_0, i_0 + 2 | 0));
635
- var tmp$ret$6;
636
645
  // Inline function 'kotlin.UInt.toInt' call
637
- var tmp0_toInt = toUInt(s, 16);
638
- tmp$ret$6 = _UInt___get_data__impl__f0vqqw(tmp0_toInt);
639
- arr.b(tmp$ret$6);
646
+ var this_0 = toUInt(s, 16);
647
+ var tmp$ret$6 = _UInt___get_data__impl__f0vqqw(this_0);
648
+ arr.h(tmp$ret$6);
640
649
  }
641
650
  while (!(i_0 === last_0));
642
651
  // Inline function 'kotlin.collections.toTypedArray' call
@@ -708,74 +717,72 @@
708
717
  var colorRegex;
709
718
  function keepByRegexStr(_this__u8e3s4, regStr) {
710
719
  _init_properties_RegexUtils_kt__b9v9ti();
711
- var tmp$ret$0;
712
720
  // Inline function 'kotlin.text.toRegex' call
713
- tmp$ret$0 = Regex_init_$Create$(regStr);
721
+ var tmp$ret$0 = Regex_init_$Create$(regStr);
714
722
  return keep_0(_this__u8e3s4, tmp$ret$0);
715
723
  }
716
724
  function filterByRegexStr(_this__u8e3s4, regStr) {
717
725
  _init_properties_RegexUtils_kt__b9v9ti();
718
- var tmp$ret$0;
719
726
  // Inline function 'kotlin.text.toRegex' call
720
- tmp$ret$0 = Regex_init_$Create$(regStr);
727
+ var tmp$ret$0 = Regex_init_$Create$(regStr);
721
728
  return filter(_this__u8e3s4, tmp$ret$0);
722
729
  }
723
730
  function isIdCard(_this__u8e3s4) {
724
731
  _init_properties_RegexUtils_kt__b9v9ti();
725
- return get_idCardRegex().a9(_this__u8e3s4);
732
+ return get_idCardRegex().o4(_this__u8e3s4);
726
733
  }
727
734
  function isMobileNumber(_this__u8e3s4) {
728
735
  _init_properties_RegexUtils_kt__b9v9ti();
729
- return get_mobileNumberRegex().a9(_this__u8e3s4);
736
+ return get_mobileNumberRegex().o4(_this__u8e3s4);
730
737
  }
731
738
  function isEmail(_this__u8e3s4) {
732
739
  _init_properties_RegexUtils_kt__b9v9ti();
733
- return get_emailRegex().a9(_this__u8e3s4);
740
+ return get_emailRegex().o4(_this__u8e3s4);
734
741
  }
735
742
  function isOnlyChEnNum(_this__u8e3s4) {
736
743
  _init_properties_RegexUtils_kt__b9v9ti();
737
- return get_chEnNumRegex().a9(_this__u8e3s4);
744
+ return get_chEnNumRegex().o4(_this__u8e3s4);
738
745
  }
739
746
  function isOnlyEnNum(_this__u8e3s4) {
740
747
  _init_properties_RegexUtils_kt__b9v9ti();
741
- return get_numEnRegex().a9(_this__u8e3s4);
748
+ return get_numEnRegex().o4(_this__u8e3s4);
742
749
  }
743
750
  function isOnlyChinese(_this__u8e3s4) {
744
751
  _init_properties_RegexUtils_kt__b9v9ti();
745
- return get_chineseRegex().a9(_this__u8e3s4);
752
+ return get_chineseRegex().o4(_this__u8e3s4);
746
753
  }
747
754
  function isOnlyLetter(_this__u8e3s4) {
748
755
  _init_properties_RegexUtils_kt__b9v9ti();
749
- return get_letterRegex().a9(_this__u8e3s4);
756
+ return get_letterRegex().o4(_this__u8e3s4);
750
757
  }
751
758
  function isOnlyNumber(_this__u8e3s4) {
752
759
  _init_properties_RegexUtils_kt__b9v9ti();
753
- return get_numberRegex().a9(_this__u8e3s4);
760
+ return get_numberRegex().o4(_this__u8e3s4);
754
761
  }
755
762
  function isOnlyCode(_this__u8e3s4) {
756
763
  _init_properties_RegexUtils_kt__b9v9ti();
757
- return get_codeRegex().a9(_this__u8e3s4);
764
+ return get_codeRegex().o4(_this__u8e3s4);
758
765
  }
759
766
  function isOnlyChSymbol(_this__u8e3s4) {
760
767
  _init_properties_RegexUtils_kt__b9v9ti();
761
- return get_chSymbolRegex().a9(_this__u8e3s4);
768
+ return get_chSymbolRegex().o4(_this__u8e3s4);
762
769
  }
763
770
  function isColor(_this__u8e3s4) {
764
771
  _init_properties_RegexUtils_kt__b9v9ti();
765
- return get_colorRegex().a9(_this__u8e3s4);
772
+ return get_colorRegex().o4(_this__u8e3s4);
766
773
  }
767
774
  function keep_0(_this__u8e3s4, reg) {
768
775
  _init_properties_RegexUtils_kt__b9v9ti();
769
- var tmp = reg.d9(_this__u8e3s4);
776
+ var tmp = reg.r4(_this__u8e3s4);
770
777
  return joinToString(map(tmp, keep$lambda), '');
771
778
  }
772
779
  function filter(_this__u8e3s4, reg) {
773
780
  _init_properties_RegexUtils_kt__b9v9ti();
774
- return reg.e9(_this__u8e3s4, '');
781
+ return reg.s4(_this__u8e3s4, '');
775
782
  }
776
783
  function keep$lambda(it) {
777
784
  _init_properties_RegexUtils_kt__b9v9ti();
778
- return it.f1();
785
+ return it.k3();
779
786
  }
780
787
  var properties_initialized_RegexUtils_kt_8e1sdo;
781
788
  function _init_properties_RegexUtils_kt__b9v9ti() {
@@ -784,25 +791,35 @@
784
791
  // Inline function 'kotlin.text.toRegex' call
785
792
  numberRegex = Regex_init_$Create$('[0-9]+');
786
793
  // Inline function 'kotlin.text.toRegex' call
787
- letterRegex = Regex_init_$Create$('[a-zA-Z]+');
794
+ var this_0 = '[a-zA-Z]+';
795
+ letterRegex = Regex_init_$Create$(this_0);
788
796
  // Inline function 'kotlin.text.toRegex' call
789
- numEnRegex = Regex_init_$Create$('[a-zA-Z0-9]+');
797
+ var this_1 = '[a-zA-Z0-9]+';
798
+ numEnRegex = Regex_init_$Create$(this_1);
790
799
  // Inline function 'kotlin.text.toRegex' call
791
- codeRegex = Regex_init_$Create$('[a-fA-F0-9]+');
800
+ var this_2 = '[a-fA-F0-9]+';
801
+ codeRegex = Regex_init_$Create$(this_2);
792
802
  // Inline function 'kotlin.text.toRegex' call
793
- chineseRegex = Regex_init_$Create$('[\u4E00-\u9FA5]+');
803
+ var this_3 = '[\u4E00-\u9FA5]+';
804
+ chineseRegex = Regex_init_$Create$(this_3);
794
805
  // Inline function 'kotlin.text.toRegex' call
795
- chEnNumRegex = Regex_init_$Create$('[a-zA-Z0-9\u4E00-\u9FA5]+');
806
+ var this_4 = '[a-zA-Z0-9\u4E00-\u9FA5]+';
807
+ chEnNumRegex = Regex_init_$Create$(this_4);
796
808
  // Inline function 'kotlin.text.toRegex' call
797
- chSymbolRegex = Regex_init_$Create$('[\xA4\xA7-\xA8\xB0-\xB1\xB7\xD7\xE0-\xE1\xE8-\xEA\xEC-\xED\xF2-\xF3\xF7\xF9-\xFA\xFC\u0101\u0113\u011B\u012B\u0144\u0148\u014D\u016B\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u0251\u0261\u02C7\u02C9\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C1\u03C3-\u03C9\u0401\u0410-\u044F\u0451\u2014\u2016\u2018-\u2019\u201C-\u201D\u2026\u2030\u2032-\u2033\u203B\u20AC\u2103\u2116\u2160-\u216B\u2170-\u2179\u2190-\u2193\u2208\u220F\u2211\u221A\u221D-\u221E\u2220\u2225\u2227-\u222B\u222E\u2234-\u2237\u223D\u2248\u224C\u2260-\u2261\u2264-\u2265\u226E-\u226F\u2299\u22A5\u2312\u2460-\u2469\u2474-\u249B\u2500-\u254B\u25A0-\u25A1\u25B2-\u25B3\u25C6-\u25C7\u25CB\u25CE-\u25CF\u2605-\u2606\u2640\u2642\u3000-\u3003\u3005\u3008-\u3011\u3013-\u3017\u3041-\u3093\u30A1-\u30F6\u3105-\u3129\u3220-\u3229\uE766-\uE76B\uE76D-\uE7BB\uE7C7-\uE7E1\uE7FE-\uE80F\uFE31\uFE33-\uFE44\uFF01-\uFF5E\uFFE0-\uFFE1\uFFE3\uFFE5\uFF00-\uFFFF\u4E00-\u9FA5]+');
809
+ var this_5 = '[\xA4\xA7-\xA8\xB0-\xB1\xB7\xD7\xE0-\xE1\xE8-\xEA\xEC-\xED\xF2-\xF3\xF7\xF9-\xFA\xFC\u0101\u0113\u011B\u012B\u0144\u0148\u014D\u016B\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u0251\u0261\u02C7\u02C9\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C1\u03C3-\u03C9\u0401\u0410-\u044F\u0451\u2014\u2016\u2018-\u2019\u201C-\u201D\u2026\u2030\u2032-\u2033\u203B\u20AC\u2103\u2116\u2160-\u216B\u2170-\u2179\u2190-\u2193\u2208\u220F\u2211\u221A\u221D-\u221E\u2220\u2225\u2227-\u222B\u222E\u2234-\u2237\u223D\u2248\u224C\u2260-\u2261\u2264-\u2265\u226E-\u226F\u2299\u22A5\u2312\u2460-\u2469\u2474-\u249B\u2500-\u254B\u25A0-\u25A1\u25B2-\u25B3\u25C6-\u25C7\u25CB\u25CE-\u25CF\u2605-\u2606\u2640\u2642\u3000-\u3003\u3005\u3008-\u3011\u3013-\u3017\u3041-\u3093\u30A1-\u30F6\u3105-\u3129\u3220-\u3229\uE766-\uE76B\uE76D-\uE7BB\uE7C7-\uE7E1\uE7FE-\uE80F\uFE31\uFE33-\uFE44\uFF01-\uFF5E\uFFE0-\uFFE1\uFFE3\uFFE5\uFF00-\uFFFF\u4E00-\u9FA5]+';
810
+ chSymbolRegex = Regex_init_$Create$(this_5);
798
811
  // Inline function 'kotlin.text.toRegex' call
799
- idCardRegex = Regex_init_$Create$('^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\\d|30|31)\\d{3}[0-9Xx]$');
812
+ var this_6 = '^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\\d|30|31)\\d{3}[0-9Xx]$';
813
+ idCardRegex = Regex_init_$Create$(this_6);
800
814
  // Inline function 'kotlin.text.toRegex' call
801
- mobileNumberRegex = Regex_init_$Create$('^1[1-9]\\d{9}$');
815
+ var this_7 = '^1[1-9]\\d{9}$';
816
+ mobileNumberRegex = Regex_init_$Create$(this_7);
802
817
  // Inline function 'kotlin.text.toRegex' call
803
- emailRegex = Regex_init_$Create$('^[A-Za-z0-9\\u4e00-\\u9fa5]+@[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(?:\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$');
818
+ var this_8 = '^[A-Za-z0-9\\u4e00-\\u9fa5]+@[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(?:\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$';
819
+ emailRegex = Regex_init_$Create$(this_8);
804
820
  // Inline function 'kotlin.text.toRegex' call
805
- colorRegex = Regex_init_$Create$('^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$');
821
+ var this_9 = '^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$';
822
+ colorRegex = Regex_init_$Create$(this_9);
806
823
  }
807
824
  }
808
825
  function Coordinate(lat, lng) {
@@ -811,31 +828,31 @@
811
828
  this.lat = lat;
812
829
  this.lng = lng;
813
830
  }
814
- protoOf(Coordinate).sb = function (_set____db54di) {
831
+ protoOf(Coordinate).qa = function (_set____db54di) {
815
832
  this.lat = _set____db54di;
816
833
  };
817
- protoOf(Coordinate).tb = function () {
834
+ protoOf(Coordinate).ra = function () {
818
835
  return this.lat;
819
836
  };
820
- protoOf(Coordinate).ub = function (_set____db54di) {
837
+ protoOf(Coordinate).sa = function (_set____db54di) {
821
838
  this.lng = _set____db54di;
822
839
  };
823
- protoOf(Coordinate).vb = function () {
840
+ protoOf(Coordinate).ta = function () {
824
841
  return this.lng;
825
842
  };
826
- protoOf(Coordinate).wb = function () {
843
+ protoOf(Coordinate).ua = function () {
827
844
  return this.lat;
828
845
  };
829
- protoOf(Coordinate).xb = function () {
846
+ protoOf(Coordinate).va = function () {
830
847
  return this.lng;
831
848
  };
832
- protoOf(Coordinate).yb = function (lat, lng) {
849
+ protoOf(Coordinate).wa = function (lat, lng) {
833
850
  return new Coordinate(lat, lng);
834
851
  };
835
852
  protoOf(Coordinate).copy = function (lat, lng, $super) {
836
853
  lat = lat === VOID ? this.lat : lat;
837
854
  lng = lng === VOID ? this.lng : lng;
838
- return this.yb(lat, lng);
855
+ return this.wa(lat, lng);
839
856
  };
840
857
  protoOf(Coordinate).toString = function () {
841
858
  return 'Coordinate(lat=' + this.lat + ', lng=' + this.lng + ')';
@@ -857,1452 +874,1426 @@
857
874
  return false;
858
875
  return true;
859
876
  };
860
- function getDistanceAndBearing(point1, point2) {
861
- var radLon1 = toRadians(point1.lng);
862
- var radLat1 = toRadians(point1.lat);
863
- var radLon2 = toRadians(point2.lng);
864
- var radLat2 = toRadians(point2.lat);
865
- var L = radLon2 - radLon1;
866
- // Inline function 'kotlin.math.tan' call
867
- var tanU1 = 0.9966471893352525 * Math.tan(radLat1);
868
- // Inline function 'kotlin.math.sqrt' call
869
- var tmp0_sqrt = 1 + tanU1 * tanU1;
870
- var cosU1 = 1 / Math.sqrt(tmp0_sqrt);
871
- var sinU1 = tanU1 * cosU1;
872
- // Inline function 'kotlin.math.tan' call
873
- var tanU2 = 0.9966471893352525 * Math.tan(radLat2);
877
+ function transformLat($this, lng, lat) {
878
+ var tmp = -100 + 2 * lng + 3 * lat + 0.2 * lat * lat + 0.1 * lng * lat;
874
879
  // Inline function 'kotlin.math.sqrt' call
875
- var tmp1_sqrt = 1 + tanU2 * tanU2;
876
- var cosU2 = 1 / Math.sqrt(tmp1_sqrt);
877
- var sinU2 = tanU2 * cosU2;
878
- var tmp;
879
- // Inline function 'kotlin.math.abs' call
880
- if (Math.abs(L) > get_PI() / 2) {
881
- tmp = true;
882
- } else {
883
- // Inline function 'kotlin.math.abs' call
884
- var tmp2_abs = radLat2 - radLat1;
885
- tmp = Math.abs(tmp2_abs) > get_PI() / 2;
886
- }
887
- var antipodal = tmp;
888
- var f9 = L;
889
- var sinF9;
890
- var cosF9;
891
- var fq = antipodal ? get_PI() : 0.0;
892
- var sinFq = 0.0;
893
- var cosFq = antipodal ? -1.0 : 1.0;
894
- var sinSFqFa;
895
- var cos2Fqm = 1.0;
896
- var cosSFqFa = 1.0;
897
- var iterations = 0;
898
- var f91;
899
- $l$1: do {
900
- $l$0: do {
901
- // Inline function 'kotlin.math.sin' call
902
- var tmp3_sin = f9;
903
- sinF9 = Math.sin(tmp3_sin);
904
- // Inline function 'kotlin.math.cos' call
905
- var tmp4_cos = f9;
906
- cosF9 = Math.cos(tmp4_cos);
907
- sinSFqFa = cosU2 * sinF9 * (cosU2 * sinF9) + (cosU1 * sinU2 - sinU1 * cosU2 * cosF9) * (cosU1 * sinU2 - sinU1 * cosU2 * cosF9);
908
- // Inline function 'kotlin.math.abs' call
909
- var tmp5_abs = sinSFqFa;
910
- if (Math.abs(tmp5_abs) < 1.0E-24)
911
- break $l$1;
912
- // Inline function 'kotlin.math.sqrt' call
913
- var tmp6_sqrt = sinSFqFa;
914
- sinFq = Math.sqrt(tmp6_sqrt);
915
- cosFq = sinU1 * sinU2 + cosU1 * cosU2 * cosF9;
916
- // Inline function 'kotlin.math.atan2' call
917
- var tmp7_atan2 = sinFq;
918
- var tmp8_atan2 = cosFq;
919
- fq = Math.atan2(tmp7_atan2, tmp8_atan2);
920
- var sinFa = cosU1 * cosU2 * sinF9 / sinFq;
921
- cosSFqFa = 1 - sinFa * sinFa;
922
- cos2Fqm = !(cosSFqFa === 0.0) ? cosFq - 2 * sinU1 * sinU2 / cosSFqFa : 0.0;
923
- var C = 2.0955066654671756E-4 * cosSFqFa * (4 + 0.003352810664747481 * (4 - 3 * cosSFqFa));
924
- f91 = f9;
925
- f9 = L + (1 - C) * 0.003352810664747481 * sinFa * (fq + C * sinFq * (cos2Fqm + C * cosFq * (-1 + 2 * cos2Fqm * cos2Fqm)));
926
- var tmp_0;
927
- if (antipodal) {
928
- // Inline function 'kotlin.math.abs' call
929
- var tmp9_abs = f9;
930
- tmp_0 = Math.abs(tmp9_abs) - get_PI();
931
- } else {
932
- // Inline function 'kotlin.math.abs' call
933
- var tmp10_abs = f9;
934
- tmp_0 = Math.abs(tmp10_abs);
935
- }
936
- var iterationCheck = tmp_0;
937
- if (iterationCheck > get_PI())
938
- throw RuntimeException_init_$Create$('\u03BB > \u03C0');
939
- }
940
- while (false);
941
- var tmp_1;
942
- // Inline function 'kotlin.math.abs' call
943
- var tmp11_abs = f9 - f91;
944
- if (Math.abs(tmp11_abs) > 1.0E-12) {
945
- iterations = iterations + 1 | 0;
946
- tmp_1 = iterations < 100;
947
- } else {
948
- tmp_1 = false;
949
- }
950
- }
951
- while (tmp_1);
952
- var uSq = cosSFqFa * 2.7233160610984375E11 / 4.040829998465916E13;
953
- var A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));
954
- var B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));
955
- var deltaFq = B * sinFq * (cos2Fqm + B / 4 * (cosFq * (-1 + 2 * cos2Fqm * cos2Fqm) - B / 6 * cos2Fqm * (-3 + 4 * sinFq * sinFq) * (-3 + 4 * cos2Fqm * cos2Fqm)));
956
- var s = 6356752.314245 * A * (fq - deltaFq);
957
- var tmp_2;
958
- // Inline function 'kotlin.math.abs' call
959
- var tmp12_abs = sinSFqFa;
960
- if (Math.abs(tmp12_abs) < 1.0E-12) {
961
- tmp_2 = 0.0;
962
- } else {
963
- // Inline function 'kotlin.math.atan2' call
964
- var tmp13_atan2 = cosU2 * sinF9;
965
- var tmp14_atan2 = cosU1 * sinU2 - sinU1 * cosU2 * cosF9;
966
- tmp_2 = Math.atan2(tmp13_atan2, tmp14_atan2);
967
- }
968
- var alpha1 = tmp_2;
969
- var tmp_3;
970
880
  // Inline function 'kotlin.math.abs' call
971
- var tmp15_abs = sinSFqFa;
972
- if (Math.abs(tmp15_abs) < 1.0E-12) {
973
- tmp_3 = get_PI();
974
- } else {
975
- // Inline function 'kotlin.math.atan2' call
976
- var tmp16_atan2 = cosU1 * sinF9;
977
- var tmp17_atan2 = -sinU1 * cosU2 + cosU1 * sinU2 * cosF9;
978
- tmp_3 = Math.atan2(tmp16_atan2, tmp17_atan2);
979
- }
980
- var alpha2 = tmp_3;
981
- return new DistanceAndBearing(s, toDegrees(alpha1), toDegrees(alpha2));
982
- }
983
- function getDistanceOn2Points(point1, point2, highPrecision) {
984
- highPrecision = highPrecision === VOID ? false : highPrecision;
985
- if (highPrecision)
986
- return getDistanceAndBearing(point1, point2).distance;
987
- var lat1Rad = toRadians(point1.lat);
988
- var lat2Rad = toRadians(point2.lat);
989
- var a = lat1Rad - lat2Rad;
990
- var b = toRadians(point1.lng) - toRadians(point2.lng);
881
+ var x = Math.abs(lng);
882
+ var ret = tmp + 0.2 * Math.sqrt(x);
883
+ var tmp_0 = ret;
991
884
  // Inline function 'kotlin.math.sin' call
992
- var tmp0_sin = a / 2;
993
- var sa2 = Math.sin(tmp0_sin);
885
+ var x_0 = 6 * lng * get_PI();
886
+ var tmp_1 = 20 * Math.sin(x_0);
994
887
  // Inline function 'kotlin.math.sin' call
995
- var tmp1_sin = b / 2;
996
- var sb2 = Math.sin(tmp1_sin);
997
- // Inline function 'kotlin.math.asin' call
998
- // Inline function 'kotlin.math.sqrt' call
999
- var tmp = sa2 * sa2;
1000
- // Inline function 'kotlin.math.cos' call
1001
- var tmp_0 = Math.cos(lat1Rad);
1002
- // Inline function 'kotlin.math.cos' call
1003
- var tmp2_sqrt = tmp + tmp_0 * Math.cos(lat2Rad) * sb2 * sb2;
1004
- var tmp3_asin = Math.sqrt(tmp2_sqrt);
1005
- return 1.2756274E7 * Math.asin(tmp3_asin);
888
+ var x_1 = 2 * lng * get_PI();
889
+ ret = tmp_0 + (tmp_1 + 20 * Math.sin(x_1)) * 2 / 3;
890
+ var tmp_2 = ret;
891
+ // Inline function 'kotlin.math.sin' call
892
+ var x_2 = lat * get_PI();
893
+ var tmp_3 = 20 * Math.sin(x_2);
894
+ // Inline function 'kotlin.math.sin' call
895
+ var x_3 = lat / 3.0 * get_PI();
896
+ ret = tmp_2 + (tmp_3 + 40 * Math.sin(x_3)) * 2 / 3;
897
+ var tmp_4 = ret;
898
+ // Inline function 'kotlin.math.sin' call
899
+ var x_4 = lat / 12 * get_PI();
900
+ var tmp_5 = 160 * Math.sin(x_4);
901
+ // Inline function 'kotlin.math.sin' call
902
+ var x_5 = lat * get_PI() / 30;
903
+ ret = tmp_4 + (tmp_5 + 320 * Math.sin(x_5)) * 2 / 3;
904
+ return ret;
1006
905
  }
1007
- function toRadians(degree) {
1008
- return degree * get_PI() / 180;
906
+ function transformLng($this, lng, lat) {
907
+ var tmp = 300 + lng + 2 * lat + 0.1 * lng * lng + 0.1 * lng * lat;
908
+ // Inline function 'kotlin.math.sqrt' call
909
+ // Inline function 'kotlin.math.abs' call
910
+ var x = Math.abs(lng);
911
+ var ret = tmp + 0.1 * Math.sqrt(x);
912
+ var tmp_0 = ret;
913
+ // Inline function 'kotlin.math.sin' call
914
+ var x_0 = 6 * lng * get_PI();
915
+ var tmp_1 = 20 * Math.sin(x_0);
916
+ // Inline function 'kotlin.math.sin' call
917
+ var x_1 = 2 * lng * get_PI();
918
+ ret = tmp_0 + (tmp_1 + 20 * Math.sin(x_1)) * 2 / 3;
919
+ var tmp_2 = ret;
920
+ // Inline function 'kotlin.math.sin' call
921
+ var x_2 = lng * get_PI();
922
+ var tmp_3 = 20 * Math.sin(x_2);
923
+ // Inline function 'kotlin.math.sin' call
924
+ var x_3 = lng / 3 * get_PI();
925
+ ret = tmp_2 + (tmp_3 + 40 * Math.sin(x_3)) * 2 / 3;
926
+ var tmp_4 = ret;
927
+ // Inline function 'kotlin.math.sin' call
928
+ var x_4 = lng / 12 * get_PI();
929
+ var tmp_5 = 150 * Math.sin(x_4);
930
+ // Inline function 'kotlin.math.sin' call
931
+ var x_5 = lng / 30 * get_PI();
932
+ ret = tmp_4 + (tmp_5 + 300 * Math.sin(x_5)) * 2 / 3;
933
+ return ret;
1009
934
  }
1010
- function toDegrees(radian) {
1011
- return radian * 180 / get_PI();
935
+ function outOfChina($this, lng, lat) {
936
+ return ((lng < 72.004 ? true : lng > 137.8347) ? true : lat < 0.8293) ? true : lat > 55.8271;
1012
937
  }
1013
- function isPointInCircle(point, center, radius) {
1014
- return getDistanceOn2Points(point, center) <= radius;
938
+ function CoordinateConvert() {
939
+ this.xa_1 = 52.35987755982988;
940
+ this.ya_1 = 6378245;
941
+ this.za_1 = 0.006693421622965943;
1015
942
  }
1016
- function getAngleOn2Points(point1, point2, highPrecision) {
1017
- highPrecision = highPrecision === VOID ? false : highPrecision;
1018
- if (highPrecision) {
1019
- var bearing = getDistanceAndBearing(point1, point2).finalBearing;
1020
- return bearing < 0.0 ? bearing + 360 : bearing === 180.0 ? 0.0 : bearing;
1021
- }
1022
- var lat1 = toRadians(point1.lat);
1023
- var lon1 = toRadians(point1.lng);
1024
- var lat2 = toRadians(point2.lat);
1025
- var lon2 = toRadians(point2.lng);
1026
- var dLon = lon2 - lon1;
943
+ protoOf(CoordinateConvert).ab = function (lng, lat) {
944
+ var x = lng - 0.0065;
945
+ var y = lat - 0.006;
946
+ // Inline function 'kotlin.math.sqrt' call
947
+ var x_0 = x * x + y * y;
948
+ var tmp = Math.sqrt(x_0);
1027
949
  // Inline function 'kotlin.math.sin' call
1028
- var tmp = Math.sin(dLon);
950
+ var x_1 = y * 52.35987755982988;
951
+ var z = tmp - 2.0E-5 * Math.sin(x_1);
952
+ // Inline function 'kotlin.math.atan2' call
953
+ var tmp_0 = Math.atan2(y, x);
1029
954
  // Inline function 'kotlin.math.cos' call
1030
- var y = tmp * Math.cos(lat2);
955
+ var x_2 = x * 52.35987755982988;
956
+ var theta = tmp_0 - 3.0E-6 * Math.cos(x_2);
1031
957
  // Inline function 'kotlin.math.cos' call
1032
- var tmp_0 = Math.cos(lat1);
958
+ var gcjLng = z * Math.cos(theta);
1033
959
  // Inline function 'kotlin.math.sin' call
1034
- var tmp_1 = tmp_0 * Math.sin(lat2);
960
+ var gcjLat = z * Math.sin(theta);
961
+ // Inline function 'kotlin.doubleArrayOf' call
962
+ return new Float64Array([gcjLng, gcjLat]);
963
+ };
964
+ protoOf(CoordinateConvert).bb = function (lng, lat) {
965
+ // Inline function 'kotlin.math.sqrt' call
966
+ var x = lng * lng + lat * lat;
967
+ var tmp = Math.sqrt(x);
1035
968
  // Inline function 'kotlin.math.sin' call
1036
- var tmp_2 = Math.sin(lat1);
969
+ var x_0 = lat * 52.35987755982988;
970
+ var z = tmp + 2.0E-5 * Math.sin(x_0);
971
+ // Inline function 'kotlin.math.atan2' call
972
+ var tmp_0 = Math.atan2(lat, lng);
1037
973
  // Inline function 'kotlin.math.cos' call
1038
- var tmp_3 = tmp_2 * Math.cos(lat2);
974
+ var x_1 = lng * 52.35987755982988;
975
+ var theta = tmp_0 + 3.0E-6 * Math.cos(x_1);
1039
976
  // Inline function 'kotlin.math.cos' call
1040
- var x = tmp_1 - tmp_3 * Math.cos(dLon);
1041
- var tmp$ret$7;
1042
- // Inline function 'kotlin.math.atan2' call
1043
- tmp$ret$7 = Math.atan2(y, x);
1044
- var angle = toDegrees(tmp$ret$7);
1045
- angle = (angle + 360) % 360;
1046
- return angle;
977
+ var bdLng = z * Math.cos(theta) + 0.0065;
978
+ // Inline function 'kotlin.math.sin' call
979
+ var bdLat = z * Math.sin(theta) + 0.006;
980
+ // Inline function 'kotlin.doubleArrayOf' call
981
+ return new Float64Array([bdLng, bdLat]);
982
+ };
983
+ protoOf(CoordinateConvert).cb = function (lng, lat) {
984
+ var tmp;
985
+ if (outOfChina(this, lng, lat)) {
986
+ // Inline function 'kotlin.doubleArrayOf' call
987
+ tmp = new Float64Array([lng, lat]);
988
+ } else {
989
+ var dLat = transformLat(this, lng - 105, lat - 35);
990
+ var dLng = transformLng(this, lng - 105, lat - 35);
991
+ var radLat = lat / 180 * get_PI();
992
+ // Inline function 'kotlin.math.sin' call
993
+ var magic = Math.sin(radLat);
994
+ magic = 1 - 0.006693421622965943 * magic * magic;
995
+ // Inline function 'kotlin.math.sqrt' call
996
+ var x = magic;
997
+ var sqrtMagic = Math.sqrt(x);
998
+ dLat = dLat * 180 / (6335552.717000426 / (magic * sqrtMagic) * get_PI());
999
+ var tmp_0 = dLng * 180;
1000
+ var tmp_1 = 6378245 / sqrtMagic;
1001
+ // Inline function 'kotlin.math.cos' call
1002
+ dLng = tmp_0 / (tmp_1 * Math.cos(radLat) * get_PI());
1003
+ var mgLat = lat + dLat;
1004
+ var mgLng = lng + dLng;
1005
+ // Inline function 'kotlin.doubleArrayOf' call
1006
+ tmp = new Float64Array([lng * 2 - mgLng, lat * 2 - mgLat]);
1007
+ }
1008
+ return tmp;
1009
+ };
1010
+ protoOf(CoordinateConvert).db = function (lng, lat) {
1011
+ var tmp;
1012
+ if (outOfChina(this, lng, lat)) {
1013
+ // Inline function 'kotlin.doubleArrayOf' call
1014
+ tmp = new Float64Array([lng, lat]);
1015
+ } else {
1016
+ var dLat = transformLat(this, lng - 105, lat - 35);
1017
+ var dLng = transformLng(this, lng - 105, lat - 35);
1018
+ var redLat = lat / 180 * get_PI();
1019
+ // Inline function 'kotlin.math.sin' call
1020
+ var magic = Math.sin(redLat);
1021
+ magic = 1 - 0.006693421622965943 * magic * magic;
1022
+ // Inline function 'kotlin.math.sqrt' call
1023
+ var x = magic;
1024
+ var sqrtMagic = Math.sqrt(x);
1025
+ dLat = dLat * 180 / (6335552.717000426 / (magic * sqrtMagic) * get_PI());
1026
+ var tmp_0 = dLng * 180;
1027
+ var tmp_1 = 6378245 / sqrtMagic;
1028
+ // Inline function 'kotlin.math.cos' call
1029
+ dLng = tmp_0 / (tmp_1 * Math.cos(redLat) * get_PI());
1030
+ var mgLat = lat + dLat;
1031
+ var mgLng = lng + dLng;
1032
+ // Inline function 'kotlin.doubleArrayOf' call
1033
+ tmp = new Float64Array([mgLng, mgLat]);
1034
+ }
1035
+ return tmp;
1036
+ };
1037
+ protoOf(CoordinateConvert).eb = function (lng, lat) {
1038
+ var lngLat = this.ab(lng, lat);
1039
+ return this.cb(lngLat[0], lngLat[1]);
1040
+ };
1041
+ protoOf(CoordinateConvert).fb = function (lng, lat) {
1042
+ var lngLat = this.db(lng, lat);
1043
+ return this.bb(lngLat[0], lngLat[1]);
1044
+ };
1045
+ var CoordinateConvert_instance;
1046
+ function CoordinateConvert_getInstance() {
1047
+ return CoordinateConvert_instance;
1047
1048
  }
1048
- function getPointOn2Points(point1, point2, present) {
1049
- if (present <= 0)
1050
- return point1.copy();
1051
- if (present >= 1)
1052
- return point2.copy();
1053
- var distanceAndBearing = getDistanceAndBearing(point1, point2);
1054
- var newDistance = distanceAndBearing.distance * present;
1055
- return getPointByBasePoint(point1, newDistance, distanceAndBearing.finalBearing);
1049
+ var CoordinateSystemType_WGS84_instance;
1050
+ var CoordinateSystemType_GCJ02_instance;
1051
+ var CoordinateSystemType_BD09_instance;
1052
+ function values_0() {
1053
+ return [CoordinateSystemType_WGS84_getInstance(), CoordinateSystemType_GCJ02_getInstance(), CoordinateSystemType_BD09_getInstance()];
1056
1054
  }
1057
- function getTotalDistance(points) {
1058
- var total = 0.0;
1059
- var inductionVariable = 0;
1060
- var last = points.length - 1 | 0;
1061
- if (inductionVariable < last)
1062
- do {
1063
- var i = inductionVariable;
1064
- inductionVariable = inductionVariable + 1 | 0;
1065
- total = total + getDistanceOn2Points(points[i], points[i + 1 | 0]);
1066
- }
1067
- while (inductionVariable < last);
1068
- return total;
1055
+ function valueOf_0(value) {
1056
+ switch (value) {
1057
+ case 'WGS84':
1058
+ return CoordinateSystemType_WGS84_getInstance();
1059
+ case 'GCJ02':
1060
+ return CoordinateSystemType_GCJ02_getInstance();
1061
+ case 'BD09':
1062
+ return CoordinateSystemType_BD09_getInstance();
1063
+ default:
1064
+ CoordinateSystemType_initEntries();
1065
+ THROW_IAE('No enum constant value.');
1066
+ break;
1067
+ }
1069
1068
  }
1070
- function getPointsOnDistance(points, distance) {
1071
- // Inline function 'kotlin.collections.mutableListOf' call
1072
- var result = ArrayList_init_$Create$();
1073
- var totalDistance = 0.0;
1074
- // Inline function 'kotlin.collections.forEachIndexed' call
1075
- var index = 0;
1076
- var inductionVariable = 0;
1077
- var last = points.length;
1078
- while (inductionVariable < last) {
1079
- var item = points[inductionVariable];
1080
- inductionVariable = inductionVariable + 1 | 0;
1081
- // Inline function 'com.d10ng.common.coordinate.getPointsOnDistance.<anonymous>' call
1082
- var tmp1 = index;
1083
- index = tmp1 + 1 | 0;
1084
- if (tmp1 === 0) {
1085
- totalDistance = 0.0;
1086
- } else {
1087
- var lastPoint = points[tmp1 - 1 | 0];
1088
- var lastDistance = totalDistance;
1089
- var curDistance = getDistanceOn2Points(lastPoint, item);
1090
- var newDistance = lastDistance + curDistance;
1091
- var tmp$ret$1;
1092
- // Inline function 'kotlin.math.floor' call
1093
- var tmp0_floor = newDistance / distance;
1094
- tmp$ret$1 = Math.floor(tmp0_floor);
1095
- var totalCount = numberToInt(tmp$ret$1);
1096
- if (totalCount > result.f()) {
1097
- var count = totalCount - result.f() | 0;
1098
- var hasHandleDistance = lastDistance;
1099
- var noHandleDistance = curDistance;
1100
- var p0 = lastPoint;
1101
- var inductionVariable_0 = 0;
1102
- if (inductionVariable_0 < count)
1103
- do {
1104
- var i = inductionVariable_0;
1105
- inductionVariable_0 = inductionVariable_0 + 1 | 0;
1106
- var lessDistance = distance - hasHandleDistance % distance;
1107
- var present = lessDistance / noHandleDistance;
1108
- p0 = getPointOn2Points(p0, item, present);
1109
- result.b(p0);
1110
- hasHandleDistance = hasHandleDistance + lessDistance;
1111
- noHandleDistance = noHandleDistance - lessDistance;
1112
- }
1113
- while (inductionVariable_0 < count);
1069
+ var CoordinateSystemType_entriesInitialized;
1070
+ function CoordinateSystemType_initEntries() {
1071
+ if (CoordinateSystemType_entriesInitialized)
1072
+ return Unit_instance;
1073
+ CoordinateSystemType_entriesInitialized = true;
1074
+ CoordinateSystemType_WGS84_instance = new CoordinateSystemType('WGS84', 0);
1075
+ CoordinateSystemType_GCJ02_instance = new CoordinateSystemType('GCJ02', 1);
1076
+ CoordinateSystemType_BD09_instance = new CoordinateSystemType('BD09', 2);
1077
+ }
1078
+ function CoordinateSystemType(name, ordinal) {
1079
+ Enum.call(this, name, ordinal);
1080
+ }
1081
+ function CoordinateSystemType_WGS84_getInstance() {
1082
+ CoordinateSystemType_initEntries();
1083
+ return CoordinateSystemType_WGS84_instance;
1084
+ }
1085
+ function CoordinateSystemType_GCJ02_getInstance() {
1086
+ CoordinateSystemType_initEntries();
1087
+ return CoordinateSystemType_GCJ02_instance;
1088
+ }
1089
+ function CoordinateSystemType_BD09_getInstance() {
1090
+ CoordinateSystemType_initEntries();
1091
+ return CoordinateSystemType_BD09_instance;
1092
+ }
1093
+ function convert(_this__u8e3s4, from, to) {
1094
+ var tmp;
1095
+ switch (from.l6_1) {
1096
+ case 0:
1097
+ var tmp_0;
1098
+ switch (to.l6_1) {
1099
+ case 1:
1100
+ // Inline function 'kotlin.let' call
1101
+
1102
+ // Inline function 'kotlin.contracts.contract' call
1103
+
1104
+ // Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
1105
+
1106
+ var it = CoordinateConvert_instance.db(_this__u8e3s4.lng, _this__u8e3s4.lat);
1107
+ tmp_0 = new Coordinate(it[1], it[0]);
1108
+ break;
1109
+ case 2:
1110
+ // Inline function 'kotlin.let' call
1111
+
1112
+ // Inline function 'kotlin.contracts.contract' call
1113
+
1114
+ // Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
1115
+
1116
+ var it_0 = CoordinateConvert_instance.fb(_this__u8e3s4.lng, _this__u8e3s4.lat);
1117
+ tmp_0 = new Coordinate(it_0[1], it_0[0]);
1118
+ break;
1119
+ default:
1120
+ tmp_0 = _this__u8e3s4.copy();
1121
+ break;
1114
1122
  }
1115
- totalDistance = newDistance;
1116
- }
1123
+
1124
+ tmp = tmp_0;
1125
+ break;
1126
+ case 1:
1127
+ var tmp_1;
1128
+ switch (to.l6_1) {
1129
+ case 0:
1130
+ // Inline function 'kotlin.let' call
1131
+
1132
+ // Inline function 'kotlin.contracts.contract' call
1133
+
1134
+ // Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
1135
+
1136
+ var it_1 = CoordinateConvert_instance.cb(_this__u8e3s4.lng, _this__u8e3s4.lat);
1137
+ tmp_1 = new Coordinate(it_1[1], it_1[0]);
1138
+ break;
1139
+ case 2:
1140
+ // Inline function 'kotlin.let' call
1141
+
1142
+ // Inline function 'kotlin.contracts.contract' call
1143
+
1144
+ // Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
1145
+
1146
+ var it_2 = CoordinateConvert_instance.bb(_this__u8e3s4.lng, _this__u8e3s4.lat);
1147
+ tmp_1 = new Coordinate(it_2[1], it_2[0]);
1148
+ break;
1149
+ default:
1150
+ tmp_1 = _this__u8e3s4.copy();
1151
+ break;
1152
+ }
1153
+
1154
+ tmp = tmp_1;
1155
+ break;
1156
+ case 2:
1157
+ var tmp_2;
1158
+ switch (to.l6_1) {
1159
+ case 0:
1160
+ // Inline function 'kotlin.let' call
1161
+
1162
+ // Inline function 'kotlin.contracts.contract' call
1163
+
1164
+ // Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
1165
+
1166
+ var it_3 = CoordinateConvert_instance.eb(_this__u8e3s4.lng, _this__u8e3s4.lat);
1167
+ tmp_2 = new Coordinate(it_3[1], it_3[0]);
1168
+ break;
1169
+ case 1:
1170
+ // Inline function 'kotlin.let' call
1171
+
1172
+ // Inline function 'kotlin.contracts.contract' call
1173
+
1174
+ // Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
1175
+
1176
+ var it_4 = CoordinateConvert_instance.ab(_this__u8e3s4.lng, _this__u8e3s4.lat);
1177
+ tmp_2 = new Coordinate(it_4[1], it_4[0]);
1178
+ break;
1179
+ default:
1180
+ tmp_2 = _this__u8e3s4.copy();
1181
+ break;
1182
+ }
1183
+
1184
+ tmp = tmp_2;
1185
+ break;
1186
+ default:
1187
+ noWhenBranchMatchedException();
1188
+ break;
1117
1189
  }
1118
- result.p5(0, points[0]);
1119
- result.b(points[points.length - 1 | 0]);
1120
- // Inline function 'kotlin.collections.toTypedArray' call
1121
- return copyToArray(result);
1190
+ return tmp;
1122
1191
  }
1123
- function compressTrack(points) {
1124
- if (points.length <= 10) {
1125
- // Inline function 'kotlin.collections.copyOf' call
1126
- // Inline function 'kotlin.js.asDynamic' call
1127
- return points.slice();
1192
+ function isEastLongitude(_this__u8e3s4) {
1193
+ return 0.0 <= _this__u8e3s4 ? _this__u8e3s4 <= 180.0 : false;
1194
+ }
1195
+ function isNorthLatitude(_this__u8e3s4) {
1196
+ return 0.0 <= _this__u8e3s4 ? _this__u8e3s4 <= 90.0 : false;
1197
+ }
1198
+ function toLongitudeNoPre(_this__u8e3s4) {
1199
+ var tmp;
1200
+ if (_this__u8e3s4 > 180.0) {
1201
+ tmp = 360;
1202
+ } else if (_this__u8e3s4 < 0.0) {
1203
+ tmp = 0;
1204
+ } else {
1205
+ return _this__u8e3s4;
1128
1206
  }
1129
- // Inline function 'kotlin.collections.mutableListOf' call
1130
- var result = ArrayList_init_$Create$();
1131
- var a = points[0];
1132
- var b = points[1];
1133
- var inductionVariable = 0;
1134
- var last = points.length - 1 | 0;
1135
- if (inductionVariable <= last)
1136
- $l$loop: do {
1137
- var i = inductionVariable;
1138
- inductionVariable = inductionVariable + 1 | 0;
1139
- if (i < 2) {
1140
- result.b(points[i]);
1141
- continue $l$loop;
1142
- }
1143
- var c = points[i];
1144
- var distance = getDistanceOn2Points(a, b) + getDistanceOn2Points(b, c);
1207
+ var base = tmp;
1208
+ return base - _this__u8e3s4;
1209
+ }
1210
+ function toLatitudeNoPre(_this__u8e3s4) {
1211
+ var tmp;
1212
+ if (_this__u8e3s4 > 90.0) {
1213
+ tmp = 180;
1214
+ } else if (_this__u8e3s4 < 0.0) {
1215
+ tmp = 0;
1216
+ } else {
1217
+ return _this__u8e3s4;
1218
+ }
1219
+ var base = tmp;
1220
+ return base - _this__u8e3s4;
1221
+ }
1222
+ function toFullLongitude(_this__u8e3s4, isEast, isPositive) {
1223
+ isPositive = isPositive === VOID ? true : isPositive;
1224
+ if (!isEastLongitude(_this__u8e3s4)) {
1225
+ if (isPositive) {
1145
1226
  var tmp;
1146
- if (distance <= 10.0) {
1147
- tmp = 90;
1148
- } else if (distance > 50.0) {
1149
- tmp = 5;
1227
+ if (_this__u8e3s4 > 0.0) {
1228
+ tmp = _this__u8e3s4;
1150
1229
  } else {
1151
- // Inline function 'kotlin.math.max' call
1152
- var tmp0_max = numberToInt((1 - distance / 50) * 90);
1153
- tmp = Math.max(tmp0_max, 5);
1230
+ tmp = 360 + _this__u8e3s4;
1154
1231
  }
1155
- var x = tmp;
1156
- var j1 = getAngleOn2Points(a, b);
1157
- var j2 = getAngleOn2Points(b, c);
1158
- // Inline function 'kotlin.math.abs' call
1159
- var tmp1_abs = j1 - j2;
1160
- if (Math.abs(tmp1_abs) < x) {
1161
- removeLast(result);
1232
+ return tmp;
1233
+ } else {
1234
+ var tmp_0;
1235
+ if (_this__u8e3s4 > 0.0) {
1236
+ tmp_0 = _this__u8e3s4 - 360;
1162
1237
  } else {
1163
- a = b;
1238
+ tmp_0 = _this__u8e3s4;
1164
1239
  }
1165
- result.b(c);
1166
- b = c;
1240
+ return tmp_0;
1167
1241
  }
1168
- while (inductionVariable <= last);
1169
- // Inline function 'kotlin.collections.toTypedArray' call
1170
- return copyToArray(result);
1242
+ } else if (isEast) {
1243
+ return _this__u8e3s4;
1244
+ } else {
1245
+ var tmp_1;
1246
+ if (isPositive) {
1247
+ tmp_1 = 360 - _this__u8e3s4;
1248
+ } else {
1249
+ tmp_1 = -_this__u8e3s4;
1250
+ }
1251
+ return tmp_1;
1252
+ }
1171
1253
  }
1172
- function getPointByBasePoint(point, distance, angle) {
1173
- if (distance === 0.0)
1174
- return point.copy();
1175
- var radLat = toRadians(point.lat);
1176
- var radLng = toRadians(point.lng);
1177
- var radAngle = toRadians(angle);
1178
- // Inline function 'kotlin.math.sin' call
1179
- var sinRadAngle = Math.sin(radAngle);
1180
- // Inline function 'kotlin.math.cos' call
1181
- var cosRadAngle = Math.cos(radAngle);
1182
- // Inline function 'kotlin.math.tan' call
1183
- var tanU1 = 0.9966471893352525 * Math.tan(radLat);
1184
- // Inline function 'kotlin.math.sqrt' call
1185
- var tmp0_sqrt = 1 + tanU1 * tanU1;
1186
- var cosU1 = 1 / Math.sqrt(tmp0_sqrt);
1187
- var sinU1 = tanU1 * cosU1;
1188
- // Inline function 'kotlin.math.atan2' call
1189
- var sigma1 = Math.atan2(tanU1, cosRadAngle);
1190
- var sinAlpha = cosU1 * sinRadAngle;
1191
- var cosSqAlpha = 1 - sinAlpha * sinAlpha;
1192
- var uSq = cosSqAlpha * 2.7233160610984375E11 / 4.040829998465916E13;
1193
- var A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));
1194
- var B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));
1195
- var sigma = distance / (6356752.314245 * A);
1196
- var sinSigma;
1197
- var cosSigma;
1198
- var cos2SigmaM;
1199
- var sigmaP;
1200
- var iterations = 0.0;
1201
- $l$1: do {
1202
- $l$0: do {
1203
- // Inline function 'kotlin.math.cos' call
1204
- var tmp1_cos = 2 * sigma1 + sigma;
1205
- cos2SigmaM = Math.cos(tmp1_cos);
1206
- // Inline function 'kotlin.math.sin' call
1207
- var tmp2_sin = sigma;
1208
- sinSigma = Math.sin(tmp2_sin);
1209
- // Inline function 'kotlin.math.cos' call
1210
- var tmp3_cos = sigma;
1211
- cosSigma = Math.cos(tmp3_cos);
1212
- var deltaSigma = B * sinSigma * (cos2SigmaM + B / 4 * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) - B / 6 * cos2SigmaM * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));
1213
- sigmaP = sigma;
1214
- sigma = distance / (6356752.314245 * A) + deltaSigma;
1254
+ function toFullLatitude(_this__u8e3s4, isNorth, isPositive) {
1255
+ isPositive = isPositive === VOID ? true : isPositive;
1256
+ if (!isNorthLatitude(_this__u8e3s4)) {
1257
+ if (isPositive) {
1258
+ var tmp;
1259
+ if (_this__u8e3s4 > 0.0) {
1260
+ tmp = _this__u8e3s4;
1261
+ } else {
1262
+ tmp = 90 + _this__u8e3s4;
1263
+ }
1264
+ return tmp;
1265
+ } else {
1266
+ var tmp_0;
1267
+ if (_this__u8e3s4 > 0.0) {
1268
+ tmp_0 = _this__u8e3s4 - 90;
1269
+ } else {
1270
+ tmp_0 = _this__u8e3s4;
1271
+ }
1272
+ return tmp_0;
1215
1273
  }
1216
- while (false);
1217
- var tmp;
1218
- // Inline function 'kotlin.math.abs' call
1219
- var tmp4_abs = sigma - sigmaP;
1220
- if (Math.abs(tmp4_abs) > 1.0E-12) {
1221
- iterations = iterations + 1;
1222
- tmp = iterations < 100.0;
1274
+ } else if (isNorth) {
1275
+ return _this__u8e3s4;
1276
+ } else {
1277
+ var tmp_1;
1278
+ if (isPositive) {
1279
+ tmp_1 = 90 - _this__u8e3s4;
1223
1280
  } else {
1224
- tmp = false;
1281
+ tmp_1 = -_this__u8e3s4;
1225
1282
  }
1283
+ return tmp_1;
1226
1284
  }
1227
- while (tmp);
1228
- if (iterations >= 100.0)
1229
- throw RuntimeException_init_$Create$('Vincenty formula failed to converge');
1230
- var x = sinU1 * sinSigma - cosU1 * cosSigma * cosRadAngle;
1231
- // Inline function 'kotlin.math.atan2' call
1232
- var tmp6_atan2 = sinU1 * cosSigma + cosU1 * sinSigma * cosRadAngle;
1233
- // Inline function 'kotlin.math.sqrt' call
1234
- var tmp5_sqrt = sinAlpha * sinAlpha + x * x;
1235
- var tmp7_atan2 = 0.9966471893352525 * Math.sqrt(tmp5_sqrt);
1236
- var lat2 = Math.atan2(tmp6_atan2, tmp7_atan2);
1237
- // Inline function 'kotlin.math.atan2' call
1238
- var tmp8_atan2 = sinSigma * sinRadAngle;
1239
- var tmp9_atan2 = cosU1 * cosSigma - sinU1 * sinSigma * cosRadAngle;
1240
- var lambda = Math.atan2(tmp8_atan2, tmp9_atan2);
1241
- var C = 2.0955066654671756E-4 * cosSqAlpha * (4 + 0.003352810664747481 * (4 - 3 * cosSqAlpha));
1242
- var L = lambda - (1 - C) * 0.003352810664747481 * sinAlpha * (sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));
1243
- var lng2 = radLng + L;
1244
- return new Coordinate(toDegrees(lat2), toDegrees(lng2));
1245
1285
  }
1246
- function getRandomPoint(point, radius) {
1247
- var randomAngle = Default_getInstance().o2() * get_PI() * 2;
1248
- var randomDistance = Default_getInstance().o2() * radius;
1249
- return getPointByBasePoint(point, randomDistance, randomAngle);
1286
+ function toDMS(_this__u8e3s4, isLongitude) {
1287
+ var value = isLongitude ? toLongitudeNoPre(_this__u8e3s4) : toLatitudeNoPre(_this__u8e3s4);
1288
+ var dValue = numberToInt(value);
1289
+ var m = (value - dValue) * 60.0;
1290
+ var mValue = numberToInt(m);
1291
+ var s = (m - mValue) * 60.0;
1292
+ return new DMS(dValue, mValue, s);
1250
1293
  }
1251
- function getNearPartsOnLine(point, line, offset) {
1252
- offset = offset === VOID ? 10.0 : offset;
1253
- if (line.length < 2)
1254
- throw RuntimeException_init_$Create$('\u8F68\u8FF9\u81F3\u5C11\u9700\u8981\u4E24\u4E2A\u70B9');
1255
- // Inline function 'kotlin.collections.mutableListOf' call
1256
- var ls = ArrayList_init_$Create$();
1257
- var inductionVariable = 0;
1258
- var last = line.length - 1 | 0;
1259
- if (inductionVariable < last)
1260
- $l$loop: do {
1261
- var i = inductionVariable;
1262
- inductionVariable = inductionVariable + 1 | 0;
1263
- var distance = getDistanceOn2Points(point, line[i]) + getDistanceOn2Points(point, line[i + 1 | 0]);
1264
- if (ls.t()) {
1265
- ls.b(to(i, distance));
1266
- } else if (distance > ls.g(0).p4_1 + offset)
1267
- continue $l$loop;
1268
- else if (distance < ls.g(0).p4_1 - offset) {
1269
- ls.q5();
1270
- ls.b(to(i, distance));
1271
- } else {
1272
- var inductionVariable_0 = 0;
1273
- var last_0 = ls.f();
1274
- if (inductionVariable_0 < last_0)
1275
- $l$loop_0: do {
1276
- var j = inductionVariable_0;
1277
- inductionVariable_0 = inductionVariable_0 + 1 | 0;
1278
- if (distance < ls.g(j).p4_1) {
1279
- ls.p5(j, to(i, distance));
1280
- break $l$loop_0;
1281
- }
1282
- }
1283
- while (inductionVariable_0 < last_0);
1284
- if (ls.f() > 3) {
1285
- ls.y1(3);
1286
- }
1287
- }
1294
+ function toLatLng(_this__u8e3s4) {
1295
+ return (_this__u8e3s4.seconds / 60 + _this__u8e3s4.minutes) / 60.0 + _this__u8e3s4.degrees;
1296
+ }
1297
+ function toLatLngString(_this__u8e3s4, isLongitude, pattern) {
1298
+ pattern = pattern === VOID ? 'CHFd\xB0m\u2032S.ss\u2033' : pattern;
1299
+ var value = isLongitude ? toLongitudeNoPre(_this__u8e3s4) : toLatitudeNoPre(_this__u8e3s4);
1300
+ var string = pattern;
1301
+ // Inline function 'kotlin.text.toRegex' call
1302
+ var tmp$ret$0 = Regex_init_$Create$('CH');
1303
+ var reg = toList(tmp$ret$0.r4(string));
1304
+ var tmp;
1305
+ if (isLongitude) {
1306
+ tmp = isEastLongitude(_this__u8e3s4) ? '\u4E1C\u7ECF' : '\u897F\u7ECF';
1307
+ } else {
1308
+ tmp = isNorthLatitude(_this__u8e3s4) ? '\u5317\u7EAC' : '\u5357\u7EAC';
1309
+ }
1310
+ var faxiang = tmp;
1311
+ var tmp0_iterator = reg.k();
1312
+ while (tmp0_iterator.r()) {
1313
+ var item = tmp0_iterator.s();
1314
+ // Inline function 'kotlin.text.replaceRange' call
1315
+ var this_0 = string;
1316
+ var range = item.u4();
1317
+ var replacement = faxiang;
1318
+ string = toString(replaceRange(isCharSequence(this_0) ? this_0 : THROW_CCE(), range, replacement));
1319
+ }
1320
+ // Inline function 'kotlin.text.toRegex' call
1321
+ var tmp$ret$2 = Regex_init_$Create$('F');
1322
+ reg = toList(tmp$ret$2.r4(string));
1323
+ var tmp_0;
1324
+ if (isLongitude) {
1325
+ tmp_0 = isEastLongitude(_this__u8e3s4) ? 'E' : 'W';
1326
+ } else {
1327
+ tmp_0 = isNorthLatitude(_this__u8e3s4) ? 'N' : 'S';
1328
+ }
1329
+ faxiang = tmp_0;
1330
+ var tmp1_iterator = reg.k();
1331
+ while (tmp1_iterator.r()) {
1332
+ var item_0 = tmp1_iterator.s();
1333
+ // Inline function 'kotlin.text.replaceRange' call
1334
+ var this_1 = string;
1335
+ var range_0 = item_0.u4();
1336
+ var replacement_0 = faxiang;
1337
+ string = toString(replaceRange(isCharSequence(this_1) ? this_1 : THROW_CCE(), range_0, replacement_0));
1338
+ }
1339
+ // Inline function 'kotlin.text.toRegex' call
1340
+ var tmp$ret$4 = Regex_init_$Create$('d+');
1341
+ reg = toList(tmp$ret$4.r4(string));
1342
+ var dValue = numberToInt(value);
1343
+ var tmp2_iterator = reg.k();
1344
+ while (tmp2_iterator.r()) {
1345
+ var item_1 = tmp2_iterator.s();
1346
+ var tmp_1;
1347
+ if (item_1.k3().length === 1) {
1348
+ // Inline function 'kotlin.text.replaceRange' call
1349
+ var this_2 = string;
1350
+ var range_1 = item_1.u4();
1351
+ var replacement_1 = dValue.toString();
1352
+ tmp_1 = toString(replaceRange(isCharSequence(this_2) ? this_2 : THROW_CCE(), range_1, replacement_1));
1353
+ } else {
1354
+ // Inline function 'kotlin.text.replaceRange' call
1355
+ var this_3 = string;
1356
+ var range_2 = item_1.u4();
1357
+ var replacement_2 = padStart(dValue.toString(), item_1.k3().length, _Char___init__impl__6a9atx(48));
1358
+ tmp_1 = toString(replaceRange(isCharSequence(this_3) ? this_3 : THROW_CCE(), range_2, replacement_2));
1288
1359
  }
1289
- while (inductionVariable < last);
1290
- // Inline function 'kotlin.collections.toTypedArray' call
1291
- // Inline function 'kotlin.collections.map' call
1292
- // Inline function 'kotlin.collections.mapTo' call
1293
- var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(ls, 10));
1294
- var tmp0_iterator = ls.c();
1295
- while (tmp0_iterator.d()) {
1296
- var item = tmp0_iterator.e();
1297
- var tmp$ret$1;
1298
- // Inline function 'com.d10ng.common.coordinate.getNearPartsOnLine.<anonymous>' call
1299
- tmp$ret$1 = item.o4_1;
1300
- tmp0_mapTo.b(tmp$ret$1);
1360
+ string = tmp_1;
1301
1361
  }
1302
- return copyToArray(tmp0_mapTo);
1303
- }
1304
- function getProjectionPointOnLinePart(point, part) {
1305
- if (!(part.length === 2))
1306
- throw RuntimeException_init_$Create$('\u7EBF\u6BB5\u5FC5\u987B\u662F\u4E24\u4E2A\u70B9');
1307
- var start = part[0];
1308
- var end = part[1];
1309
- var p2s = getDistanceOn2Points(point, start);
1310
- var p2e = getDistanceOn2Points(point, end);
1311
- var s2e = getDistanceOn2Points(start, end);
1312
- return p2s - p2e > s2e ? end : p2e - p2s > s2e ? start : getPointOn2Points(start, end, p2s / (p2s + p2e));
1362
+ // Inline function 'kotlin.text.toRegex' call
1363
+ var tmp$ret$7 = Regex_init_$Create$('m+');
1364
+ reg = toList(tmp$ret$7.r4(string));
1365
+ var m = (value - dValue) * 60.0;
1366
+ var mValue = numberToInt(m);
1367
+ var tmp3_iterator = reg.k();
1368
+ while (tmp3_iterator.r()) {
1369
+ var item_2 = tmp3_iterator.s();
1370
+ var tmp_2;
1371
+ if (item_2.k3().length === 1) {
1372
+ // Inline function 'kotlin.text.replaceRange' call
1373
+ var this_4 = string;
1374
+ var range_3 = item_2.u4();
1375
+ var replacement_3 = mValue.toString();
1376
+ tmp_2 = toString(replaceRange(isCharSequence(this_4) ? this_4 : THROW_CCE(), range_3, replacement_3));
1377
+ } else {
1378
+ // Inline function 'kotlin.text.replaceRange' call
1379
+ var this_5 = string;
1380
+ var range_4 = item_2.u4();
1381
+ var replacement_4 = padStart(mValue.toString(), item_2.k3().length, _Char___init__impl__6a9atx(48));
1382
+ tmp_2 = toString(replaceRange(isCharSequence(this_5) ? this_5 : THROW_CCE(), range_4, replacement_4));
1383
+ }
1384
+ string = tmp_2;
1385
+ }
1386
+ // Inline function 'kotlin.text.toRegex' call
1387
+ var tmp$ret$10 = Regex_init_$Create$('S+');
1388
+ reg = toList(tmp$ret$10.r4(string));
1389
+ var S = (m - mValue) * 60.0;
1390
+ var SValue = numberToInt(S);
1391
+ var tmp4_iterator = reg.k();
1392
+ while (tmp4_iterator.r()) {
1393
+ var item_3 = tmp4_iterator.s();
1394
+ var tmp_3;
1395
+ if (item_3.k3().length === 1) {
1396
+ // Inline function 'kotlin.text.replaceRange' call
1397
+ var this_6 = string;
1398
+ var range_5 = item_3.u4();
1399
+ var replacement_5 = SValue.toString();
1400
+ tmp_3 = toString(replaceRange(isCharSequence(this_6) ? this_6 : THROW_CCE(), range_5, replacement_5));
1401
+ } else {
1402
+ // Inline function 'kotlin.text.replaceRange' call
1403
+ var this_7 = string;
1404
+ var range_6 = item_3.u4();
1405
+ var replacement_6 = padStart(SValue.toString(), item_3.k3().length, _Char___init__impl__6a9atx(48));
1406
+ tmp_3 = toString(replaceRange(isCharSequence(this_7) ? this_7 : THROW_CCE(), range_6, replacement_6));
1407
+ }
1408
+ string = tmp_3;
1409
+ }
1410
+ // Inline function 'kotlin.text.toRegex' call
1411
+ var tmp$ret$13 = Regex_init_$Create$('s+');
1412
+ reg = toList(tmp$ret$13.r4(string));
1413
+ var tmp5_iterator = reg.k();
1414
+ while (tmp5_iterator.r()) {
1415
+ var item_4 = tmp5_iterator.s();
1416
+ var tmp_4 = S - SValue;
1417
+ // Inline function 'kotlin.math.pow' call
1418
+ var n = item_4.k3().length;
1419
+ var tmp$ret$14 = Math.pow(10.0, n);
1420
+ var sValue = roundToInt(tmp_4 * tmp$ret$14);
1421
+ // Inline function 'kotlin.text.replaceRange' call
1422
+ var this_8 = string;
1423
+ var range_7 = item_4.u4();
1424
+ var replacement_7 = padStart(sValue.toString(), item_4.k3().length, _Char___init__impl__6a9atx(48));
1425
+ string = toString(replaceRange(isCharSequence(this_8) ? this_8 : THROW_CCE(), range_7, replacement_7));
1426
+ }
1427
+ return string;
1313
1428
  }
1314
- function getProjectionPointOnLine(point, line) {
1315
- if (line.length < 2)
1316
- throw RuntimeException_init_$Create$('\u8F68\u8FF9\u81F3\u5C11\u9700\u8981\u4E24\u4E2A\u70B9');
1317
- var nearParts = getNearPartsOnLine(point, line);
1318
- var tmp$ret$2;
1319
- // Inline function 'kotlin.arrayOf' call
1320
- // Inline function 'kotlin.js.unsafeCast' call
1321
- // Inline function 'kotlin.js.asDynamic' call
1322
- tmp$ret$2 = [line[nearParts[0]], line[nearParts[0] + 1 | 0]];
1323
- return getProjectionPointOnLinePart(point, tmp$ret$2);
1429
+ function toLongitudeString(_this__u8e3s4, pattern) {
1430
+ pattern = pattern === VOID ? 'CHFd\xB0m\u2032S.ss\u2033' : pattern;
1431
+ return toLatLngString(_this__u8e3s4, true, pattern);
1324
1432
  }
1325
- function getProjectionLineOnLineWithPoint(point, targetLine) {
1326
- var nearParts = getNearPartsOnLine(point, targetLine);
1327
- var nearIndex = nearParts[0];
1328
- var tmp$ret$2;
1329
- // Inline function 'kotlin.arrayOf' call
1330
- // Inline function 'kotlin.js.unsafeCast' call
1331
- // Inline function 'kotlin.js.asDynamic' call
1332
- tmp$ret$2 = [targetLine[nearIndex], targetLine[nearIndex + 1 | 0]];
1333
- var projectionPoint = getProjectionPointOnLinePart(point, tmp$ret$2);
1334
- // Inline function 'kotlin.collections.plus' call
1335
- var tmp$ret$3;
1336
- // Inline function 'kotlin.js.asDynamic' call
1337
- tmp$ret$3 = copyOfRange_0(targetLine, 0, nearIndex + 1 | 0);
1338
- var tmp$ret$6;
1339
- // Inline function 'kotlin.arrayOf' call
1340
- // Inline function 'kotlin.js.unsafeCast' call
1341
- // Inline function 'kotlin.js.asDynamic' call
1342
- tmp$ret$6 = [projectionPoint];
1343
- return tmp$ret$3.concat(tmp$ret$6);
1433
+ function toLatitudeString(_this__u8e3s4, pattern) {
1434
+ pattern = pattern === VOID ? 'CHFd\xB0m\u2032S.ss\u2033' : pattern;
1435
+ return toLatLngString(_this__u8e3s4, false, pattern);
1344
1436
  }
1345
- function getProjectionLineOnLineWithLine(line, targetLine, offset) {
1346
- offset = offset === VOID ? 10.0 : offset;
1347
- // Inline function 'kotlin.collections.isEmpty' call
1348
- if (line.length === 0) {
1349
- // Inline function 'kotlin.arrayOf' call
1350
- // Inline function 'kotlin.js.unsafeCast' call
1351
- // Inline function 'kotlin.js.asDynamic' call
1352
- return [targetLine[0]];
1437
+ function toLatLngByString(_this__u8e3s4, pattern) {
1438
+ var string = _this__u8e3s4 + '*';
1439
+ var index = 0;
1440
+ var tempPattern = pattern + '*';
1441
+ while (index < (string.length - 1 | 0)) {
1442
+ // Inline function 'kotlin.text.toRegex' call
1443
+ var this_0 = '[^dmSs]+';
1444
+ var tmp$ret$0 = Regex_init_$Create$(this_0);
1445
+ var list = toList(tmp$ret$0.r4(tempPattern));
1446
+ var tmp0_iterator = list.k();
1447
+ $l$loop_2: while (tmp0_iterator.r()) {
1448
+ var item = tmp0_iterator.s();
1449
+ if (item.u4().u5_1 < index)
1450
+ continue $l$loop_2;
1451
+ if (contains(item.k3(), 'CH') ? true : contains(item.k3(), 'F')) {
1452
+ index = item.u4().v5_1;
1453
+ continue $l$loop_2;
1454
+ }
1455
+ var pos = indexOf_0(string, item.k3());
1456
+ if (pos < item.u4().u5_1) {
1457
+ println('ERROR, pos=' + pos + ', range.first=' + item.u4().u5_1);
1458
+ return 0.0;
1459
+ }
1460
+ if (pos === item.u4().u5_1) {
1461
+ index = item.u4().v5_1;
1462
+ continue $l$loop_2;
1463
+ } else {
1464
+ // Inline function 'kotlin.text.substring' call
1465
+ var this_1 = tempPattern;
1466
+ var startIndex = item.u4().u5_1 - 1 | 0;
1467
+ var endIndex = item.u4().u5_1;
1468
+ // Inline function 'kotlin.js.asDynamic' call
1469
+ var lastStr = this_1.substring(startIndex, endIndex);
1470
+ // Inline function 'kotlin.text.replaceRange' call
1471
+ var this_2 = tempPattern;
1472
+ var startIndex_0 = item.u4().u5_1 - 1 | 0;
1473
+ var endIndex_0 = item.u4().u5_1;
1474
+ var replacement = padStart(lastStr, (pos - item.u4().u5_1 | 0) + 1 | 0, toCharArray(lastStr)[0]);
1475
+ tempPattern = toString(replaceRange_0(isCharSequence(this_2) ? this_2 : THROW_CCE(), startIndex_0, endIndex_0, replacement));
1476
+ index = pos + item.k3().length | 0;
1477
+ break $l$loop_2;
1478
+ }
1479
+ }
1353
1480
  }
1354
- var compressLine = compressTrack(line);
1355
- var newPoint = compressLine[compressLine.length - 1 | 0];
1356
- var nearParts = getNearPartsOnLine(newPoint, targetLine, offset);
1481
+ // Inline function 'kotlin.text.toRegex' call
1482
+ var tmp$ret$4 = Regex_init_$Create$('CH');
1483
+ var reg = toList(tmp$ret$4.r4(tempPattern));
1357
1484
  var tmp;
1358
- if (compressLine.length === 1 ? true : nearParts.length === 1) {
1359
- tmp = 0;
1485
+ // Inline function 'kotlin.collections.isNotEmpty' call
1486
+ if (!reg.n()) {
1487
+ tmp = substring(string, reg.t(0).u4());
1360
1488
  } else {
1361
- var lastPoint = compressLine[compressLine.length - 2 | 0];
1362
- var newAngle = getAngleOn2Points(lastPoint, newPoint);
1363
- // Inline function 'kotlin.collections.map' call
1364
- // Inline function 'kotlin.collections.mapTo' call
1365
- var tmp0_mapTo = ArrayList_init_$Create$_0(nearParts.length);
1366
- var inductionVariable = 0;
1367
- var last = nearParts.length;
1368
- while (inductionVariable < last) {
1369
- var item = nearParts[inductionVariable];
1370
- inductionVariable = inductionVariable + 1 | 0;
1371
- var tmp$ret$4;
1372
- // Inline function 'com.d10ng.common.coordinate.getProjectionLineOnLineWithLine.<anonymous>' call
1373
- tmp$ret$4 = getAngleOn2Points(targetLine[item], targetLine[item + 1 | 0]);
1374
- tmp0_mapTo.b(tmp$ret$4);
1489
+ tmp = null;
1490
+ }
1491
+ var faxiang = tmp;
1492
+ // Inline function 'kotlin.text.toRegex' call
1493
+ var tmp$ret$6 = Regex_init_$Create$('F');
1494
+ reg = toList(tmp$ret$6.r4(tempPattern));
1495
+ var tmp_0;
1496
+ // Inline function 'kotlin.collections.isNotEmpty' call
1497
+ if (!reg.n()) {
1498
+ tmp_0 = substring(string, reg.t(0).u4());
1499
+ } else {
1500
+ tmp_0 = faxiang;
1501
+ }
1502
+ faxiang = tmp_0;
1503
+ var isLongitude;
1504
+ switch (faxiang) {
1505
+ case '\u4E1C\u7ECF':
1506
+ case '\u897F\u7ECF':
1507
+ case 'E':
1508
+ case 'W':
1509
+ isLongitude = true;
1510
+ break;
1511
+ default:
1512
+ isLongitude = false;
1513
+ break;
1514
+ }
1515
+ // Inline function 'kotlin.text.toRegex' call
1516
+ var tmp$ret$8 = Regex_init_$Create$('[d]+');
1517
+ reg = toList(tmp$ret$8.r4(tempPattern));
1518
+ var dStr = '';
1519
+ var tmp2_iterator = reg.k();
1520
+ while (tmp2_iterator.r()) {
1521
+ var item_0 = tmp2_iterator.s();
1522
+ dStr = dStr + substring(string, item_0.u4());
1523
+ }
1524
+ // Inline function 'kotlin.text.toRegex' call
1525
+ var tmp$ret$9 = Regex_init_$Create$('[m]+');
1526
+ reg = toList(tmp$ret$9.r4(tempPattern));
1527
+ var mStr = '';
1528
+ var tmp3_iterator = reg.k();
1529
+ while (tmp3_iterator.r()) {
1530
+ var item_1 = tmp3_iterator.s();
1531
+ mStr = mStr + substring(string, item_1.u4());
1532
+ }
1533
+ // Inline function 'kotlin.text.toRegex' call
1534
+ var tmp$ret$10 = Regex_init_$Create$('[S]+');
1535
+ reg = toList(tmp$ret$10.r4(tempPattern));
1536
+ var SStr = '';
1537
+ var tmp4_iterator = reg.k();
1538
+ while (tmp4_iterator.r()) {
1539
+ var item_2 = tmp4_iterator.s();
1540
+ SStr = SStr + substring(string, item_2.u4());
1541
+ }
1542
+ // Inline function 'kotlin.text.isEmpty' call
1543
+ var this_3 = SStr;
1544
+ if (charSequenceLength(this_3) === 0)
1545
+ SStr = '0';
1546
+ // Inline function 'kotlin.text.toRegex' call
1547
+ var tmp$ret$12 = Regex_init_$Create$('[s]+');
1548
+ reg = toList(tmp$ret$12.r4(tempPattern));
1549
+ var sStr = '';
1550
+ var tmp5_iterator = reg.k();
1551
+ while (tmp5_iterator.r()) {
1552
+ var item_3 = tmp5_iterator.s();
1553
+ sStr = sStr + substring(string, item_3.u4());
1554
+ }
1555
+ // Inline function 'kotlin.text.isEmpty' call
1556
+ var this_4 = sStr;
1557
+ if (charSequenceLength(this_4) === 0)
1558
+ sStr = '0';
1559
+ var s = toDouble(SStr + '.' + sStr) / 60.0;
1560
+ var m = (toInt_0(mStr) + s) / 60.0;
1561
+ var d = toInt_0(dStr) + m;
1562
+ var tmp_1;
1563
+ if (isLongitude) {
1564
+ var isEast;
1565
+ switch (faxiang) {
1566
+ case '\u4E1C\u7ECF':
1567
+ case 'E':
1568
+ isEast = true;
1569
+ break;
1570
+ default:
1571
+ isEast = false;
1572
+ break;
1375
1573
  }
1376
- var nearAngles = tmp0_mapTo;
1377
- var tmp$ret$7;
1378
- $l$block: {
1379
- // Inline function 'kotlin.collections.minBy' call
1380
- var iterator = nearAngles.c();
1381
- if (!iterator.d())
1382
- throw NoSuchElementException_init_$Create$();
1383
- var minElem = iterator.e();
1384
- if (!iterator.d()) {
1385
- tmp$ret$7 = minElem;
1386
- break $l$block;
1387
- }
1388
- // Inline function 'com.d10ng.common.coordinate.getProjectionLineOnLineWithLine.<anonymous>' call
1389
- // Inline function 'kotlin.math.abs' call
1390
- var tmp0_abs = minElem - newAngle;
1391
- var minValue = Math.abs(tmp0_abs);
1392
- do {
1393
- var e = iterator.e();
1394
- // Inline function 'com.d10ng.common.coordinate.getProjectionLineOnLineWithLine.<anonymous>' call
1395
- // Inline function 'kotlin.math.abs' call
1396
- var tmp0_abs_0 = e - newAngle;
1397
- var v = Math.abs(tmp0_abs_0);
1398
- if (compareTo(minValue, v) > 0) {
1399
- minElem = e;
1400
- minValue = v;
1401
- }
1402
- }
1403
- while (iterator.d());
1404
- tmp$ret$7 = minElem;
1574
+ tmp_1 = toFullLongitude(d, isEast, false);
1575
+ } else {
1576
+ var isNorth;
1577
+ switch (faxiang) {
1578
+ case '\u5317\u7EAC':
1579
+ case 'N':
1580
+ isNorth = true;
1581
+ break;
1582
+ default:
1583
+ isNorth = false;
1584
+ break;
1405
1585
  }
1406
- var nearAngle = tmp$ret$7;
1407
- tmp = nearAngles.x1(nearAngle);
1586
+ tmp_1 = toFullLatitude(d, isNorth, false);
1408
1587
  }
1409
- var nearIndex = tmp;
1410
- // Inline function 'kotlin.arrayOf' call
1411
- // Inline function 'kotlin.js.unsafeCast' call
1412
- // Inline function 'kotlin.js.asDynamic' call
1413
- var part = [targetLine[nearParts[nearIndex]], targetLine[nearParts[nearIndex] + 1 | 0]];
1414
- var projectionPoint = getProjectionPointOnLinePart(newPoint, part);
1415
- // Inline function 'kotlin.collections.plus' call
1416
- var tmp$ret$15;
1417
- // Inline function 'kotlin.js.asDynamic' call
1418
- tmp$ret$15 = copyOfRange_0(targetLine, 0, nearParts[nearIndex] + 1 | 0);
1419
- var tmp$ret$18;
1420
- // Inline function 'kotlin.arrayOf' call
1421
- // Inline function 'kotlin.js.unsafeCast' call
1422
- // Inline function 'kotlin.js.asDynamic' call
1423
- tmp$ret$18 = [projectionPoint];
1424
- return tmp$ret$15.concat(tmp$ret$18);
1588
+ return tmp_1;
1425
1589
  }
1426
- function transformLat($this, lng, lat) {
1427
- var tmp = -100 + 2 * lng + 3 * lat + 0.2 * lat * lat + 0.1 * lng * lat;
1428
- // Inline function 'kotlin.math.sqrt' call
1429
- // Inline function 'kotlin.math.abs' call
1430
- var tmp0_sqrt = Math.abs(lng);
1431
- var ret = tmp + 0.2 * Math.sqrt(tmp0_sqrt);
1432
- var tmp_0 = ret;
1433
- // Inline function 'kotlin.math.sin' call
1434
- var tmp1_sin = 6 * lng * get_PI();
1435
- var tmp_1 = 20 * Math.sin(tmp1_sin);
1436
- // Inline function 'kotlin.math.sin' call
1437
- var tmp2_sin = 2 * lng * get_PI();
1438
- ret = tmp_0 + (tmp_1 + 20 * Math.sin(tmp2_sin)) * 2 / 3;
1439
- var tmp_2 = ret;
1440
- // Inline function 'kotlin.math.sin' call
1441
- var tmp3_sin = lat * get_PI();
1442
- var tmp_3 = 20 * Math.sin(tmp3_sin);
1443
- // Inline function 'kotlin.math.sin' call
1444
- var tmp4_sin = lat / 3.0 * get_PI();
1445
- ret = tmp_2 + (tmp_3 + 40 * Math.sin(tmp4_sin)) * 2 / 3;
1446
- var tmp_4 = ret;
1447
- // Inline function 'kotlin.math.sin' call
1448
- var tmp5_sin = lat / 12 * get_PI();
1449
- var tmp_5 = 160 * Math.sin(tmp5_sin);
1450
- // Inline function 'kotlin.math.sin' call
1451
- var tmp6_sin = lat * get_PI() / 30;
1452
- ret = tmp_4 + (tmp_5 + 320 * Math.sin(tmp6_sin)) * 2 / 3;
1453
- return ret;
1590
+ function toLongitude(_this__u8e3s4, pattern) {
1591
+ return toLatLngByString('E' + _this__u8e3s4, 'F' + pattern);
1454
1592
  }
1455
- function transformLng($this, lng, lat) {
1456
- var tmp = 300 + lng + 2 * lat + 0.1 * lng * lng + 0.1 * lng * lat;
1457
- // Inline function 'kotlin.math.sqrt' call
1458
- // Inline function 'kotlin.math.abs' call
1459
- var tmp0_sqrt = Math.abs(lng);
1460
- var ret = tmp + 0.1 * Math.sqrt(tmp0_sqrt);
1461
- var tmp_0 = ret;
1462
- // Inline function 'kotlin.math.sin' call
1463
- var tmp1_sin = 6 * lng * get_PI();
1464
- var tmp_1 = 20 * Math.sin(tmp1_sin);
1465
- // Inline function 'kotlin.math.sin' call
1466
- var tmp2_sin = 2 * lng * get_PI();
1467
- ret = tmp_0 + (tmp_1 + 20 * Math.sin(tmp2_sin)) * 2 / 3;
1468
- var tmp_2 = ret;
1469
- // Inline function 'kotlin.math.sin' call
1470
- var tmp3_sin = lng * get_PI();
1471
- var tmp_3 = 20 * Math.sin(tmp3_sin);
1472
- // Inline function 'kotlin.math.sin' call
1473
- var tmp4_sin = lng / 3 * get_PI();
1474
- ret = tmp_2 + (tmp_3 + 40 * Math.sin(tmp4_sin)) * 2 / 3;
1475
- var tmp_4 = ret;
1476
- // Inline function 'kotlin.math.sin' call
1477
- var tmp5_sin = lng / 12 * get_PI();
1478
- var tmp_5 = 150 * Math.sin(tmp5_sin);
1479
- // Inline function 'kotlin.math.sin' call
1480
- var tmp6_sin = lng / 30 * get_PI();
1481
- ret = tmp_4 + (tmp_5 + 300 * Math.sin(tmp6_sin)) * 2 / 3;
1482
- return ret;
1593
+ function toLatitude(_this__u8e3s4, pattern) {
1594
+ return toLatLngByString('N' + _this__u8e3s4, 'F' + pattern);
1483
1595
  }
1484
- function outOfChina($this, lng, lat) {
1485
- return ((lng < 72.004 ? true : lng > 137.8347) ? true : lat < 0.8293) ? true : lat > 55.8271;
1596
+ function ddmmpmmmm2LatLng(_this__u8e3s4) {
1597
+ var temp = _this__u8e3s4 / 100;
1598
+ var z = numberToInt(temp);
1599
+ var end = (temp - z) * 100.0 / 60;
1600
+ return z + end;
1486
1601
  }
1487
- function CoordinateConvert() {
1488
- CoordinateConvert_instance = this;
1489
- this.zb_1 = 52.35987755982988;
1490
- this.ac_1 = 6378245;
1491
- this.bc_1 = 0.006693421622965943;
1602
+ function latLng2ddmmpmmmm(_this__u8e3s4) {
1603
+ var z = numberToInt(_this__u8e3s4);
1604
+ var end = (_this__u8e3s4 - z) * 60.0 / 100.0;
1605
+ return (z + end) * 100;
1492
1606
  }
1493
- protoOf(CoordinateConvert).cc = function (lng, lat) {
1494
- var x = lng - 0.0065;
1495
- var y = lat - 0.006;
1496
- // Inline function 'kotlin.math.sqrt' call
1497
- var tmp0_sqrt = x * x + y * y;
1498
- var tmp = Math.sqrt(tmp0_sqrt);
1499
- // Inline function 'kotlin.math.sin' call
1500
- var tmp1_sin = y * 52.35987755982988;
1501
- var z = tmp - 2.0E-5 * Math.sin(tmp1_sin);
1502
- // Inline function 'kotlin.math.atan2' call
1503
- var tmp_0 = Math.atan2(y, x);
1504
- // Inline function 'kotlin.math.cos' call
1505
- var tmp2_cos = x * 52.35987755982988;
1506
- var theta = tmp_0 - 3.0E-6 * Math.cos(tmp2_cos);
1507
- // Inline function 'kotlin.math.cos' call
1508
- var gcjLng = z * Math.cos(theta);
1509
- // Inline function 'kotlin.math.sin' call
1510
- var gcjLat = z * Math.sin(theta);
1511
- // Inline function 'kotlin.doubleArrayOf' call
1512
- return new Float64Array([gcjLng, gcjLat]);
1607
+ function DMS(degrees, minutes, seconds) {
1608
+ degrees = degrees === VOID ? 0 : degrees;
1609
+ minutes = minutes === VOID ? 0 : minutes;
1610
+ seconds = seconds === VOID ? 0.0 : seconds;
1611
+ this.degrees = degrees;
1612
+ this.minutes = minutes;
1613
+ this.seconds = seconds;
1614
+ }
1615
+ protoOf(DMS).ib = function (_set____db54di) {
1616
+ this.degrees = _set____db54di;
1513
1617
  };
1514
- protoOf(CoordinateConvert).dc = function (lng, lat) {
1515
- // Inline function 'kotlin.math.sqrt' call
1516
- var tmp0_sqrt = lng * lng + lat * lat;
1517
- var tmp = Math.sqrt(tmp0_sqrt);
1518
- // Inline function 'kotlin.math.sin' call
1519
- var tmp1_sin = lat * 52.35987755982988;
1520
- var z = tmp + 2.0E-5 * Math.sin(tmp1_sin);
1521
- // Inline function 'kotlin.math.atan2' call
1522
- var tmp_0 = Math.atan2(lat, lng);
1523
- // Inline function 'kotlin.math.cos' call
1524
- var tmp2_cos = lng * 52.35987755982988;
1525
- var theta = tmp_0 + 3.0E-6 * Math.cos(tmp2_cos);
1526
- // Inline function 'kotlin.math.cos' call
1527
- var bdLng = z * Math.cos(theta) + 0.0065;
1528
- // Inline function 'kotlin.math.sin' call
1529
- var bdLat = z * Math.sin(theta) + 0.006;
1530
- // Inline function 'kotlin.doubleArrayOf' call
1531
- return new Float64Array([bdLng, bdLat]);
1618
+ protoOf(DMS).jb = function () {
1619
+ return this.degrees;
1532
1620
  };
1533
- protoOf(CoordinateConvert).ec = function (lng, lat) {
1534
- var tmp;
1535
- if (outOfChina(this, lng, lat)) {
1536
- // Inline function 'kotlin.doubleArrayOf' call
1537
- tmp = new Float64Array([lng, lat]);
1538
- } else {
1539
- var dLat = transformLat(this, lng - 105, lat - 35);
1540
- var dLng = transformLng(this, lng - 105, lat - 35);
1541
- var radLat = lat / 180 * get_PI();
1542
- // Inline function 'kotlin.math.sin' call
1543
- var magic = Math.sin(radLat);
1544
- magic = 1 - 0.006693421622965943 * magic * magic;
1545
- // Inline function 'kotlin.math.sqrt' call
1546
- var tmp0_sqrt = magic;
1547
- var sqrtMagic = Math.sqrt(tmp0_sqrt);
1548
- dLat = dLat * 180 / (6335552.717000426 / (magic * sqrtMagic) * get_PI());
1549
- var tmp_0 = dLng * 180;
1550
- var tmp_1 = 6378245 / sqrtMagic;
1551
- // Inline function 'kotlin.math.cos' call
1552
- dLng = tmp_0 / (tmp_1 * Math.cos(radLat) * get_PI());
1553
- var mgLat = lat + dLat;
1554
- var mgLng = lng + dLng;
1555
- // Inline function 'kotlin.doubleArrayOf' call
1556
- tmp = new Float64Array([lng * 2 - mgLng, lat * 2 - mgLat]);
1557
- }
1558
- return tmp;
1621
+ protoOf(DMS).kb = function (_set____db54di) {
1622
+ this.minutes = _set____db54di;
1559
1623
  };
1560
- protoOf(CoordinateConvert).fc = function (lng, lat) {
1561
- var tmp;
1562
- if (outOfChina(this, lng, lat)) {
1563
- // Inline function 'kotlin.doubleArrayOf' call
1564
- tmp = new Float64Array([lng, lat]);
1565
- } else {
1566
- var dLat = transformLat(this, lng - 105, lat - 35);
1567
- var dLng = transformLng(this, lng - 105, lat - 35);
1568
- var redLat = lat / 180 * get_PI();
1569
- // Inline function 'kotlin.math.sin' call
1570
- var magic = Math.sin(redLat);
1571
- magic = 1 - 0.006693421622965943 * magic * magic;
1572
- // Inline function 'kotlin.math.sqrt' call
1573
- var tmp0_sqrt = magic;
1574
- var sqrtMagic = Math.sqrt(tmp0_sqrt);
1575
- dLat = dLat * 180 / (6335552.717000426 / (magic * sqrtMagic) * get_PI());
1576
- var tmp_0 = dLng * 180;
1577
- var tmp_1 = 6378245 / sqrtMagic;
1578
- // Inline function 'kotlin.math.cos' call
1579
- dLng = tmp_0 / (tmp_1 * Math.cos(redLat) * get_PI());
1580
- var mgLat = lat + dLat;
1581
- var mgLng = lng + dLng;
1582
- // Inline function 'kotlin.doubleArrayOf' call
1583
- tmp = new Float64Array([mgLng, mgLat]);
1584
- }
1585
- return tmp;
1624
+ protoOf(DMS).lb = function () {
1625
+ return this.minutes;
1586
1626
  };
1587
- protoOf(CoordinateConvert).gc = function (lng, lat) {
1588
- var lngLat = this.cc(lng, lat);
1589
- return this.ec(lngLat[0], lngLat[1]);
1627
+ protoOf(DMS).mb = function (_set____db54di) {
1628
+ this.seconds = _set____db54di;
1590
1629
  };
1591
- protoOf(CoordinateConvert).hc = function (lng, lat) {
1592
- var lngLat = this.fc(lng, lat);
1593
- return this.dc(lngLat[0], lngLat[1]);
1630
+ protoOf(DMS).nb = function () {
1631
+ return this.seconds;
1594
1632
  };
1595
- var CoordinateConvert_instance;
1596
- function CoordinateConvert_getInstance() {
1597
- if (CoordinateConvert_instance == null)
1598
- new CoordinateConvert();
1599
- return CoordinateConvert_instance;
1600
- }
1601
- var CoordinateSystemType_WGS84_instance;
1602
- var CoordinateSystemType_GCJ02_instance;
1603
- var CoordinateSystemType_BD09_instance;
1604
- function values_0() {
1605
- return [CoordinateSystemType_WGS84_getInstance(), CoordinateSystemType_GCJ02_getInstance(), CoordinateSystemType_BD09_getInstance()];
1606
- }
1607
- function valueOf_0(value) {
1608
- switch (value) {
1609
- case 'WGS84':
1610
- return CoordinateSystemType_WGS84_getInstance();
1611
- case 'GCJ02':
1612
- return CoordinateSystemType_GCJ02_getInstance();
1613
- case 'BD09':
1614
- return CoordinateSystemType_BD09_getInstance();
1615
- default:
1616
- CoordinateSystemType_initEntries();
1617
- THROW_ISE();
1618
- break;
1619
- }
1620
- }
1621
- var CoordinateSystemType_entriesInitialized;
1622
- function CoordinateSystemType_initEntries() {
1623
- if (CoordinateSystemType_entriesInitialized)
1624
- return Unit_getInstance();
1625
- CoordinateSystemType_entriesInitialized = true;
1626
- CoordinateSystemType_WGS84_instance = new CoordinateSystemType('WGS84', 0);
1627
- CoordinateSystemType_GCJ02_instance = new CoordinateSystemType('GCJ02', 1);
1628
- CoordinateSystemType_BD09_instance = new CoordinateSystemType('BD09', 2);
1629
- }
1630
- function CoordinateSystemType(name, ordinal) {
1631
- Enum.call(this, name, ordinal);
1632
- }
1633
- function CoordinateSystemType_WGS84_getInstance() {
1634
- CoordinateSystemType_initEntries();
1635
- return CoordinateSystemType_WGS84_instance;
1636
- }
1637
- function CoordinateSystemType_GCJ02_getInstance() {
1638
- CoordinateSystemType_initEntries();
1639
- return CoordinateSystemType_GCJ02_instance;
1640
- }
1641
- function CoordinateSystemType_BD09_getInstance() {
1642
- CoordinateSystemType_initEntries();
1643
- return CoordinateSystemType_BD09_instance;
1644
- }
1645
- function convert(_this__u8e3s4, from, to) {
1646
- var tmp;
1647
- switch (from.ja_1) {
1648
- case 0:
1649
- var tmp_0;
1650
- switch (to.ja_1) {
1651
- case 1:
1652
- // Inline function 'kotlin.let' call
1653
-
1654
- var tmp0_let = CoordinateConvert_getInstance().fc(_this__u8e3s4.lng, _this__u8e3s4.lat);
1655
- // Inline function 'kotlin.contracts.contract' call
1656
-
1657
- // Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
1658
-
1659
- tmp_0 = new Coordinate(tmp0_let[1], tmp0_let[0]);
1660
- break;
1661
- case 2:
1662
- // Inline function 'kotlin.let' call
1663
-
1664
- var tmp1_let = CoordinateConvert_getInstance().hc(_this__u8e3s4.lng, _this__u8e3s4.lat);
1665
- // Inline function 'kotlin.contracts.contract' call
1666
-
1667
- // Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
1668
-
1669
- tmp_0 = new Coordinate(tmp1_let[1], tmp1_let[0]);
1670
- break;
1671
- default:
1672
- tmp_0 = _this__u8e3s4.copy();
1673
- break;
1674
- }
1675
-
1676
- tmp = tmp_0;
1677
- break;
1678
- case 1:
1679
- var tmp_1;
1680
- switch (to.ja_1) {
1681
- case 0:
1682
- // Inline function 'kotlin.let' call
1683
-
1684
- var tmp2_let = CoordinateConvert_getInstance().ec(_this__u8e3s4.lng, _this__u8e3s4.lat);
1685
- // Inline function 'kotlin.contracts.contract' call
1686
-
1687
- // Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
1688
-
1689
- tmp_1 = new Coordinate(tmp2_let[1], tmp2_let[0]);
1690
- break;
1691
- case 2:
1692
- // Inline function 'kotlin.let' call
1693
-
1694
- var tmp3_let = CoordinateConvert_getInstance().dc(_this__u8e3s4.lng, _this__u8e3s4.lat);
1695
- // Inline function 'kotlin.contracts.contract' call
1696
-
1697
- // Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
1698
-
1699
- tmp_1 = new Coordinate(tmp3_let[1], tmp3_let[0]);
1700
- break;
1701
- default:
1702
- tmp_1 = _this__u8e3s4.copy();
1703
- break;
1704
- }
1705
-
1706
- tmp = tmp_1;
1707
- break;
1708
- case 2:
1709
- var tmp_2;
1710
- switch (to.ja_1) {
1711
- case 0:
1712
- // Inline function 'kotlin.let' call
1713
-
1714
- var tmp4_let = CoordinateConvert_getInstance().gc(_this__u8e3s4.lng, _this__u8e3s4.lat);
1715
- // Inline function 'kotlin.contracts.contract' call
1716
-
1717
- // Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
1718
-
1719
- tmp_2 = new Coordinate(tmp4_let[1], tmp4_let[0]);
1720
- break;
1721
- case 1:
1722
- // Inline function 'kotlin.let' call
1723
-
1724
- var tmp5_let = CoordinateConvert_getInstance().cc(_this__u8e3s4.lng, _this__u8e3s4.lat);
1725
- // Inline function 'kotlin.contracts.contract' call
1726
-
1727
- // Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
1728
-
1729
- tmp_2 = new Coordinate(tmp5_let[1], tmp5_let[0]);
1730
- break;
1731
- default:
1732
- tmp_2 = _this__u8e3s4.copy();
1733
- break;
1734
- }
1735
-
1736
- tmp = tmp_2;
1737
- break;
1738
- default:
1739
- noWhenBranchMatchedException();
1740
- break;
1741
- }
1742
- return tmp;
1743
- }
1744
- function isEastLongitude(_this__u8e3s4) {
1745
- return 0.0 <= _this__u8e3s4 ? _this__u8e3s4 <= 180.0 : false;
1746
- }
1747
- function isNorthLatitude(_this__u8e3s4) {
1748
- return 0.0 <= _this__u8e3s4 ? _this__u8e3s4 <= 90.0 : false;
1749
- }
1750
- function toLongitudeNoPre(_this__u8e3s4) {
1751
- var tmp;
1752
- if (_this__u8e3s4 > 180.0) {
1753
- tmp = 360;
1754
- } else if (_this__u8e3s4 < 0.0) {
1755
- tmp = 0;
1756
- } else {
1757
- return _this__u8e3s4;
1758
- }
1759
- var base = tmp;
1760
- return base - _this__u8e3s4;
1761
- }
1762
- function toLatitudeNoPre(_this__u8e3s4) {
1763
- var tmp;
1764
- if (_this__u8e3s4 > 90.0) {
1765
- tmp = 180;
1766
- } else if (_this__u8e3s4 < 0.0) {
1767
- tmp = 0;
1768
- } else {
1769
- return _this__u8e3s4;
1770
- }
1771
- var base = tmp;
1772
- return base - _this__u8e3s4;
1633
+ protoOf(DMS).toString = function () {
1634
+ return '' + this.degrees + '\xB0' + this.minutes + '\u2032' + this.seconds + '\u2033';
1635
+ };
1636
+ protoOf(DMS).ua = function () {
1637
+ return this.degrees;
1638
+ };
1639
+ protoOf(DMS).va = function () {
1640
+ return this.minutes;
1641
+ };
1642
+ protoOf(DMS).ob = function () {
1643
+ return this.seconds;
1644
+ };
1645
+ protoOf(DMS).pb = function (degrees, minutes, seconds) {
1646
+ return new DMS(degrees, minutes, seconds);
1647
+ };
1648
+ protoOf(DMS).copy = function (degrees, minutes, seconds, $super) {
1649
+ degrees = degrees === VOID ? this.degrees : degrees;
1650
+ minutes = minutes === VOID ? this.minutes : minutes;
1651
+ seconds = seconds === VOID ? this.seconds : seconds;
1652
+ return this.pb(degrees, minutes, seconds);
1653
+ };
1654
+ protoOf(DMS).hashCode = function () {
1655
+ var result = this.degrees;
1656
+ result = imul(result, 31) + this.minutes | 0;
1657
+ result = imul(result, 31) + getNumberHashCode(this.seconds) | 0;
1658
+ return result;
1659
+ };
1660
+ protoOf(DMS).equals = function (other) {
1661
+ if (this === other)
1662
+ return true;
1663
+ if (!(other instanceof DMS))
1664
+ return false;
1665
+ var tmp0_other_with_cast = other instanceof DMS ? other : THROW_CCE();
1666
+ if (!(this.degrees === tmp0_other_with_cast.degrees))
1667
+ return false;
1668
+ if (!(this.minutes === tmp0_other_with_cast.minutes))
1669
+ return false;
1670
+ if (!equals(this.seconds, tmp0_other_with_cast.seconds))
1671
+ return false;
1672
+ return true;
1673
+ };
1674
+ function DistanceAndBearing(distance, initialBearing, finalBearing) {
1675
+ distance = distance === VOID ? 0.0 : distance;
1676
+ initialBearing = initialBearing === VOID ? 0.0 : initialBearing;
1677
+ finalBearing = finalBearing === VOID ? 0.0 : finalBearing;
1678
+ this.distance = distance;
1679
+ this.initialBearing = initialBearing;
1680
+ this.finalBearing = finalBearing;
1773
1681
  }
1774
- function toFullLongitude(_this__u8e3s4, isEast, isPositive) {
1775
- isPositive = isPositive === VOID ? true : isPositive;
1776
- if (!isEastLongitude(_this__u8e3s4)) {
1777
- if (isPositive) {
1778
- var tmp;
1779
- if (_this__u8e3s4 > 0.0) {
1780
- tmp = _this__u8e3s4;
1781
- } else {
1782
- tmp = 360 + _this__u8e3s4;
1783
- }
1784
- return tmp;
1785
- } else {
1786
- var tmp_0;
1787
- if (_this__u8e3s4 > 0.0) {
1788
- tmp_0 = _this__u8e3s4 - 360;
1789
- } else {
1790
- tmp_0 = _this__u8e3s4;
1791
- }
1792
- return tmp_0;
1793
- }
1794
- } else if (isEast) {
1795
- return _this__u8e3s4;
1682
+ protoOf(DistanceAndBearing).qb = function (_set____db54di) {
1683
+ this.distance = _set____db54di;
1684
+ };
1685
+ protoOf(DistanceAndBearing).rb = function () {
1686
+ return this.distance;
1687
+ };
1688
+ protoOf(DistanceAndBearing).sb = function (_set____db54di) {
1689
+ this.initialBearing = _set____db54di;
1690
+ };
1691
+ protoOf(DistanceAndBearing).tb = function () {
1692
+ return this.initialBearing;
1693
+ };
1694
+ protoOf(DistanceAndBearing).ub = function (_set____db54di) {
1695
+ this.finalBearing = _set____db54di;
1696
+ };
1697
+ protoOf(DistanceAndBearing).vb = function () {
1698
+ return this.finalBearing;
1699
+ };
1700
+ protoOf(DistanceAndBearing).ua = function () {
1701
+ return this.distance;
1702
+ };
1703
+ protoOf(DistanceAndBearing).va = function () {
1704
+ return this.initialBearing;
1705
+ };
1706
+ protoOf(DistanceAndBearing).ob = function () {
1707
+ return this.finalBearing;
1708
+ };
1709
+ protoOf(DistanceAndBearing).wb = function (distance, initialBearing, finalBearing) {
1710
+ return new DistanceAndBearing(distance, initialBearing, finalBearing);
1711
+ };
1712
+ protoOf(DistanceAndBearing).copy = function (distance, initialBearing, finalBearing, $super) {
1713
+ distance = distance === VOID ? this.distance : distance;
1714
+ initialBearing = initialBearing === VOID ? this.initialBearing : initialBearing;
1715
+ finalBearing = finalBearing === VOID ? this.finalBearing : finalBearing;
1716
+ return this.wb(distance, initialBearing, finalBearing);
1717
+ };
1718
+ protoOf(DistanceAndBearing).toString = function () {
1719
+ return 'DistanceAndBearing(distance=' + this.distance + ', initialBearing=' + this.initialBearing + ', finalBearing=' + this.finalBearing + ')';
1720
+ };
1721
+ protoOf(DistanceAndBearing).hashCode = function () {
1722
+ var result = getNumberHashCode(this.distance);
1723
+ result = imul(result, 31) + getNumberHashCode(this.initialBearing) | 0;
1724
+ result = imul(result, 31) + getNumberHashCode(this.finalBearing) | 0;
1725
+ return result;
1726
+ };
1727
+ protoOf(DistanceAndBearing).equals = function (other) {
1728
+ if (this === other)
1729
+ return true;
1730
+ if (!(other instanceof DistanceAndBearing))
1731
+ return false;
1732
+ var tmp0_other_with_cast = other instanceof DistanceAndBearing ? other : THROW_CCE();
1733
+ if (!equals(this.distance, tmp0_other_with_cast.distance))
1734
+ return false;
1735
+ if (!equals(this.initialBearing, tmp0_other_with_cast.initialBearing))
1736
+ return false;
1737
+ if (!equals(this.finalBearing, tmp0_other_with_cast.finalBearing))
1738
+ return false;
1739
+ return true;
1740
+ };
1741
+ function getDistanceAndBearing(point1, point2) {
1742
+ var radLon1 = toRadians(point1.lng);
1743
+ var radLat1 = toRadians(point1.lat);
1744
+ var radLon2 = toRadians(point2.lng);
1745
+ var radLat2 = toRadians(point2.lat);
1746
+ var L = radLon2 - radLon1;
1747
+ // Inline function 'kotlin.math.tan' call
1748
+ var tanU1 = 0.9966471893352525 * Math.tan(radLat1);
1749
+ // Inline function 'kotlin.math.sqrt' call
1750
+ var x = 1 + tanU1 * tanU1;
1751
+ var cosU1 = 1 / Math.sqrt(x);
1752
+ var sinU1 = tanU1 * cosU1;
1753
+ // Inline function 'kotlin.math.tan' call
1754
+ var tanU2 = 0.9966471893352525 * Math.tan(radLat2);
1755
+ // Inline function 'kotlin.math.sqrt' call
1756
+ var x_0 = 1 + tanU2 * tanU2;
1757
+ var cosU2 = 1 / Math.sqrt(x_0);
1758
+ var sinU2 = tanU2 * cosU2;
1759
+ var tmp;
1760
+ // Inline function 'kotlin.math.abs' call
1761
+ if (Math.abs(L) > get_PI() / 2) {
1762
+ tmp = true;
1796
1763
  } else {
1797
- var tmp_1;
1798
- if (isPositive) {
1799
- tmp_1 = 360 - _this__u8e3s4;
1800
- } else {
1801
- tmp_1 = -_this__u8e3s4;
1802
- }
1803
- return tmp_1;
1764
+ // Inline function 'kotlin.math.abs' call
1765
+ var x_1 = radLat2 - radLat1;
1766
+ tmp = Math.abs(x_1) > get_PI() / 2;
1804
1767
  }
1805
- }
1806
- function toFullLatitude(_this__u8e3s4, isNorth, isPositive) {
1807
- isPositive = isPositive === VOID ? true : isPositive;
1808
- if (!isNorthLatitude(_this__u8e3s4)) {
1809
- if (isPositive) {
1810
- var tmp;
1811
- if (_this__u8e3s4 > 0.0) {
1812
- tmp = _this__u8e3s4;
1813
- } else {
1814
- tmp = 90 + _this__u8e3s4;
1815
- }
1816
- return tmp;
1817
- } else {
1768
+ var antipodal = tmp;
1769
+ var f9 = L;
1770
+ var sinF9;
1771
+ var cosF9;
1772
+ var fq = antipodal ? get_PI() : 0.0;
1773
+ var sinFq = 0.0;
1774
+ var cosFq = antipodal ? -1.0 : 1.0;
1775
+ var sinSFqFa;
1776
+ var cos2Fqm = 1.0;
1777
+ var cosSFqFa = 1.0;
1778
+ var iterations = 0;
1779
+ var f91;
1780
+ $l$1: do {
1781
+ $l$0: do {
1782
+ // Inline function 'kotlin.math.sin' call
1783
+ var x_2 = f9;
1784
+ sinF9 = Math.sin(x_2);
1785
+ // Inline function 'kotlin.math.cos' call
1786
+ var x_3 = f9;
1787
+ cosF9 = Math.cos(x_3);
1788
+ sinSFqFa = cosU2 * sinF9 * (cosU2 * sinF9) + (cosU1 * sinU2 - sinU1 * cosU2 * cosF9) * (cosU1 * sinU2 - sinU1 * cosU2 * cosF9);
1789
+ // Inline function 'kotlin.math.abs' call
1790
+ var x_4 = sinSFqFa;
1791
+ if (Math.abs(x_4) < 1.0E-24)
1792
+ break $l$1;
1793
+ // Inline function 'kotlin.math.sqrt' call
1794
+ var x_5 = sinSFqFa;
1795
+ sinFq = Math.sqrt(x_5);
1796
+ cosFq = sinU1 * sinU2 + cosU1 * cosU2 * cosF9;
1797
+ // Inline function 'kotlin.math.atan2' call
1798
+ var y = sinFq;
1799
+ var x_6 = cosFq;
1800
+ fq = Math.atan2(y, x_6);
1801
+ var sinFa = cosU1 * cosU2 * sinF9 / sinFq;
1802
+ cosSFqFa = 1 - sinFa * sinFa;
1803
+ cos2Fqm = !(cosSFqFa === 0.0) ? cosFq - 2 * sinU1 * sinU2 / cosSFqFa : 0.0;
1804
+ var C = 2.0955066654671756E-4 * cosSFqFa * (4 + 0.003352810664747481 * (4 - 3 * cosSFqFa));
1805
+ f91 = f9;
1806
+ f9 = L + (1 - C) * 0.003352810664747481 * sinFa * (fq + C * sinFq * (cos2Fqm + C * cosFq * (-1 + 2 * cos2Fqm * cos2Fqm)));
1818
1807
  var tmp_0;
1819
- if (_this__u8e3s4 > 0.0) {
1820
- tmp_0 = _this__u8e3s4 - 90;
1808
+ if (antipodal) {
1809
+ // Inline function 'kotlin.math.abs' call
1810
+ var x_7 = f9;
1811
+ tmp_0 = Math.abs(x_7) - get_PI();
1821
1812
  } else {
1822
- tmp_0 = _this__u8e3s4;
1813
+ // Inline function 'kotlin.math.abs' call
1814
+ var x_8 = f9;
1815
+ tmp_0 = Math.abs(x_8);
1823
1816
  }
1824
- return tmp_0;
1817
+ var iterationCheck = tmp_0;
1818
+ if (iterationCheck > get_PI())
1819
+ throw RuntimeException_init_$Create$('\u03BB > \u03C0');
1825
1820
  }
1826
- } else if (isNorth) {
1827
- return _this__u8e3s4;
1828
- } else {
1821
+ while (false);
1829
1822
  var tmp_1;
1830
- if (isPositive) {
1831
- tmp_1 = 90 - _this__u8e3s4;
1823
+ // Inline function 'kotlin.math.abs' call
1824
+ var x_9 = f9 - f91;
1825
+ if (Math.abs(x_9) > 1.0E-12) {
1826
+ iterations = iterations + 1 | 0;
1827
+ tmp_1 = iterations < 100;
1832
1828
  } else {
1833
- tmp_1 = -_this__u8e3s4;
1829
+ tmp_1 = false;
1834
1830
  }
1835
- return tmp_1;
1836
1831
  }
1837
- }
1838
- function toDMS(_this__u8e3s4, isLongitude) {
1839
- var value = isLongitude ? toLongitudeNoPre(_this__u8e3s4) : toLatitudeNoPre(_this__u8e3s4);
1840
- var dValue = numberToInt(value);
1841
- var m = (value - dValue) * 60.0;
1842
- var mValue = numberToInt(m);
1843
- var s = (m - mValue) * 60.0;
1844
- return new DMS(dValue, mValue, s);
1845
- }
1846
- function toLatLng(_this__u8e3s4) {
1847
- return (_this__u8e3s4.seconds / 60 + _this__u8e3s4.minutes) / 60.0 + _this__u8e3s4.degrees;
1848
- }
1849
- function toLatLngString(_this__u8e3s4, isLongitude, pattern) {
1850
- pattern = pattern === VOID ? 'CHFd\xB0m\u2032S.ss\u2033' : pattern;
1851
- var value = isLongitude ? toLongitudeNoPre(_this__u8e3s4) : toLatitudeNoPre(_this__u8e3s4);
1852
- var string = pattern;
1853
- var tmp$ret$0;
1854
- // Inline function 'kotlin.text.toRegex' call
1855
- tmp$ret$0 = Regex_init_$Create$('CH');
1856
- var reg = toList(tmp$ret$0.d9(string));
1857
- var tmp;
1858
- if (isLongitude) {
1859
- tmp = isEastLongitude(_this__u8e3s4) ? '\u4E1C\u7ECF' : '\u897F\u7ECF';
1832
+ while (tmp_1);
1833
+ var uSq = cosSFqFa * 2.7233160610984375E11 / 4.040829998465916E13;
1834
+ var A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));
1835
+ var B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));
1836
+ var deltaFq = B * sinFq * (cos2Fqm + B / 4 * (cosFq * (-1 + 2 * cos2Fqm * cos2Fqm) - B / 6 * cos2Fqm * (-3 + 4 * sinFq * sinFq) * (-3 + 4 * cos2Fqm * cos2Fqm)));
1837
+ var s = 6356752.314245 * A * (fq - deltaFq);
1838
+ var tmp_2;
1839
+ // Inline function 'kotlin.math.abs' call
1840
+ var x_10 = sinSFqFa;
1841
+ if (Math.abs(x_10) < 1.0E-12) {
1842
+ tmp_2 = 0.0;
1860
1843
  } else {
1861
- tmp = isNorthLatitude(_this__u8e3s4) ? '\u5317\u7EAC' : '\u5357\u7EAC';
1862
- }
1863
- var faxiang = tmp;
1864
- var tmp0_iterator = reg.c();
1865
- while (tmp0_iterator.d()) {
1866
- var item = tmp0_iterator.e();
1867
- // Inline function 'kotlin.text.replaceRange' call
1868
- var tmp0_replaceRange = string;
1869
- var tmp1_replaceRange = item.g9();
1870
- var tmp2_replaceRange = faxiang;
1871
- string = toString(replaceRange(isCharSequence(tmp0_replaceRange) ? tmp0_replaceRange : THROW_CCE(), tmp1_replaceRange, tmp2_replaceRange));
1844
+ // Inline function 'kotlin.math.atan2' call
1845
+ var y_0 = cosU2 * sinF9;
1846
+ var x_11 = cosU1 * sinU2 - sinU1 * cosU2 * cosF9;
1847
+ tmp_2 = Math.atan2(y_0, x_11);
1872
1848
  }
1873
- var tmp$ret$2;
1874
- // Inline function 'kotlin.text.toRegex' call
1875
- tmp$ret$2 = Regex_init_$Create$('F');
1876
- reg = toList(tmp$ret$2.d9(string));
1877
- var tmp_0;
1878
- if (isLongitude) {
1879
- tmp_0 = isEastLongitude(_this__u8e3s4) ? 'E' : 'W';
1849
+ var alpha1 = tmp_2;
1850
+ var tmp_3;
1851
+ // Inline function 'kotlin.math.abs' call
1852
+ var x_12 = sinSFqFa;
1853
+ if (Math.abs(x_12) < 1.0E-12) {
1854
+ tmp_3 = get_PI();
1880
1855
  } else {
1881
- tmp_0 = isNorthLatitude(_this__u8e3s4) ? 'N' : 'S';
1882
- }
1883
- faxiang = tmp_0;
1884
- var tmp1_iterator = reg.c();
1885
- while (tmp1_iterator.d()) {
1886
- var item_0 = tmp1_iterator.e();
1887
- // Inline function 'kotlin.text.replaceRange' call
1888
- var tmp3_replaceRange = string;
1889
- var tmp4_replaceRange = item_0.g9();
1890
- var tmp5_replaceRange = faxiang;
1891
- string = toString(replaceRange(isCharSequence(tmp3_replaceRange) ? tmp3_replaceRange : THROW_CCE(), tmp4_replaceRange, tmp5_replaceRange));
1856
+ // Inline function 'kotlin.math.atan2' call
1857
+ var y_1 = cosU1 * sinF9;
1858
+ var x_13 = -sinU1 * cosU2 + cosU1 * sinU2 * cosF9;
1859
+ tmp_3 = Math.atan2(y_1, x_13);
1892
1860
  }
1893
- var tmp$ret$4;
1894
- // Inline function 'kotlin.text.toRegex' call
1895
- tmp$ret$4 = Regex_init_$Create$('d+');
1896
- reg = toList(tmp$ret$4.d9(string));
1897
- var dValue = numberToInt(value);
1898
- var tmp2_iterator = reg.c();
1899
- while (tmp2_iterator.d()) {
1900
- var item_1 = tmp2_iterator.e();
1901
- var tmp_1;
1902
- if (item_1.f1().length === 1) {
1903
- // Inline function 'kotlin.text.replaceRange' call
1904
- var tmp6_replaceRange = string;
1905
- var tmp7_replaceRange = item_1.g9();
1906
- var tmp8_replaceRange = dValue.toString();
1907
- tmp_1 = toString(replaceRange(isCharSequence(tmp6_replaceRange) ? tmp6_replaceRange : THROW_CCE(), tmp7_replaceRange, tmp8_replaceRange));
1908
- } else {
1909
- // Inline function 'kotlin.text.replaceRange' call
1910
- var tmp9_replaceRange = string;
1911
- var tmp10_replaceRange = item_1.g9();
1912
- var tmp11_replaceRange = padStart(dValue.toString(), item_1.f1().length, _Char___init__impl__6a9atx(48));
1913
- tmp_1 = toString(replaceRange(isCharSequence(tmp9_replaceRange) ? tmp9_replaceRange : THROW_CCE(), tmp10_replaceRange, tmp11_replaceRange));
1914
- }
1915
- string = tmp_1;
1861
+ var alpha2 = tmp_3;
1862
+ return new DistanceAndBearing(s, toDegrees(alpha1), toDegrees(alpha2));
1863
+ }
1864
+ function getDistanceOn2Points(point1, point2, highPrecision) {
1865
+ highPrecision = highPrecision === VOID ? false : highPrecision;
1866
+ if (highPrecision)
1867
+ return getDistanceAndBearing(point1, point2).distance;
1868
+ var lat1Rad = toRadians(point1.lat);
1869
+ var lat2Rad = toRadians(point2.lat);
1870
+ var a = lat1Rad - lat2Rad;
1871
+ var b = toRadians(point1.lng) - toRadians(point2.lng);
1872
+ // Inline function 'kotlin.math.sin' call
1873
+ var x = a / 2;
1874
+ var sa2 = Math.sin(x);
1875
+ // Inline function 'kotlin.math.sin' call
1876
+ var x_0 = b / 2;
1877
+ var sb2 = Math.sin(x_0);
1878
+ // Inline function 'kotlin.math.asin' call
1879
+ // Inline function 'kotlin.math.sqrt' call
1880
+ var tmp = sa2 * sa2;
1881
+ // Inline function 'kotlin.math.cos' call
1882
+ var tmp_0 = Math.cos(lat1Rad);
1883
+ // Inline function 'kotlin.math.cos' call
1884
+ var x_1 = tmp + tmp_0 * Math.cos(lat2Rad) * sb2 * sb2;
1885
+ var x_2 = Math.sqrt(x_1);
1886
+ return 1.2756274E7 * Math.asin(x_2);
1887
+ }
1888
+ function toRadians(degree) {
1889
+ return degree * get_PI() / 180;
1890
+ }
1891
+ function toDegrees(radian) {
1892
+ return radian * 180 / get_PI();
1893
+ }
1894
+ function isPointInCircle(point, center, radius) {
1895
+ return getDistanceOn2Points(point, center) <= radius;
1896
+ }
1897
+ function getAngleOn2Points(point1, point2, highPrecision) {
1898
+ highPrecision = highPrecision === VOID ? false : highPrecision;
1899
+ if (highPrecision) {
1900
+ var bearing = getDistanceAndBearing(point1, point2).finalBearing;
1901
+ return bearing < 0.0 ? bearing + 360 : bearing === 180.0 ? 0.0 : bearing;
1916
1902
  }
1917
- var tmp$ret$7;
1918
- // Inline function 'kotlin.text.toRegex' call
1919
- tmp$ret$7 = Regex_init_$Create$('m+');
1920
- reg = toList(tmp$ret$7.d9(string));
1921
- var m = (value - dValue) * 60.0;
1922
- var mValue = numberToInt(m);
1923
- var tmp3_iterator = reg.c();
1924
- while (tmp3_iterator.d()) {
1925
- var item_2 = tmp3_iterator.e();
1926
- var tmp_2;
1927
- if (item_2.f1().length === 1) {
1928
- // Inline function 'kotlin.text.replaceRange' call
1929
- var tmp12_replaceRange = string;
1930
- var tmp13_replaceRange = item_2.g9();
1931
- var tmp14_replaceRange = mValue.toString();
1932
- tmp_2 = toString(replaceRange(isCharSequence(tmp12_replaceRange) ? tmp12_replaceRange : THROW_CCE(), tmp13_replaceRange, tmp14_replaceRange));
1933
- } else {
1934
- // Inline function 'kotlin.text.replaceRange' call
1935
- var tmp15_replaceRange = string;
1936
- var tmp16_replaceRange = item_2.g9();
1937
- var tmp17_replaceRange = padStart(mValue.toString(), item_2.f1().length, _Char___init__impl__6a9atx(48));
1938
- tmp_2 = toString(replaceRange(isCharSequence(tmp15_replaceRange) ? tmp15_replaceRange : THROW_CCE(), tmp16_replaceRange, tmp17_replaceRange));
1903
+ var lat1 = toRadians(point1.lat);
1904
+ var lon1 = toRadians(point1.lng);
1905
+ var lat2 = toRadians(point2.lat);
1906
+ var lon2 = toRadians(point2.lng);
1907
+ var dLon = lon2 - lon1;
1908
+ // Inline function 'kotlin.math.sin' call
1909
+ var tmp = Math.sin(dLon);
1910
+ // Inline function 'kotlin.math.cos' call
1911
+ var y = tmp * Math.cos(lat2);
1912
+ // Inline function 'kotlin.math.cos' call
1913
+ var tmp_0 = Math.cos(lat1);
1914
+ // Inline function 'kotlin.math.sin' call
1915
+ var tmp_1 = tmp_0 * Math.sin(lat2);
1916
+ // Inline function 'kotlin.math.sin' call
1917
+ var tmp_2 = Math.sin(lat1);
1918
+ // Inline function 'kotlin.math.cos' call
1919
+ var tmp_3 = tmp_2 * Math.cos(lat2);
1920
+ // Inline function 'kotlin.math.cos' call
1921
+ var x = tmp_1 - tmp_3 * Math.cos(dLon);
1922
+ // Inline function 'kotlin.math.atan2' call
1923
+ var tmp$ret$7 = Math.atan2(y, x);
1924
+ var angle = toDegrees(tmp$ret$7);
1925
+ angle = (angle + 360) % 360;
1926
+ return angle;
1927
+ }
1928
+ function getPointOn2Points(point1, point2, present) {
1929
+ if (present <= 0.0)
1930
+ return point1.copy();
1931
+ if (present >= 1.0)
1932
+ return point2.copy();
1933
+ var distanceAndBearing = getDistanceAndBearing(point1, point2);
1934
+ var newDistance = distanceAndBearing.distance * present;
1935
+ return getPointByBasePoint(point1, newDistance, distanceAndBearing.finalBearing);
1936
+ }
1937
+ function getTotalDistance(points) {
1938
+ var total = 0.0;
1939
+ var inductionVariable = 0;
1940
+ var last = points.length - 1 | 0;
1941
+ if (inductionVariable < last)
1942
+ do {
1943
+ var i = inductionVariable;
1944
+ inductionVariable = inductionVariable + 1 | 0;
1945
+ total = total + getDistanceOn2Points(points[i], points[i + 1 | 0]);
1939
1946
  }
1940
- string = tmp_2;
1941
- }
1942
- var tmp$ret$10;
1943
- // Inline function 'kotlin.text.toRegex' call
1944
- tmp$ret$10 = Regex_init_$Create$('S+');
1945
- reg = toList(tmp$ret$10.d9(string));
1946
- var S = (m - mValue) * 60.0;
1947
- var SValue = numberToInt(S);
1948
- var tmp4_iterator = reg.c();
1949
- while (tmp4_iterator.d()) {
1950
- var item_3 = tmp4_iterator.e();
1951
- var tmp_3;
1952
- if (item_3.f1().length === 1) {
1953
- // Inline function 'kotlin.text.replaceRange' call
1954
- var tmp18_replaceRange = string;
1955
- var tmp19_replaceRange = item_3.g9();
1956
- var tmp20_replaceRange = SValue.toString();
1957
- tmp_3 = toString(replaceRange(isCharSequence(tmp18_replaceRange) ? tmp18_replaceRange : THROW_CCE(), tmp19_replaceRange, tmp20_replaceRange));
1947
+ while (inductionVariable < last);
1948
+ return total;
1949
+ }
1950
+ function getPointsOnDistance(points, distance) {
1951
+ // Inline function 'kotlin.collections.mutableListOf' call
1952
+ var result = ArrayList_init_$Create$();
1953
+ var totalDistance = 0.0;
1954
+ // Inline function 'kotlin.collections.forEachIndexed' call
1955
+ var index = 0;
1956
+ var inductionVariable = 0;
1957
+ var last = points.length;
1958
+ while (inductionVariable < last) {
1959
+ var item = points[inductionVariable];
1960
+ inductionVariable = inductionVariable + 1 | 0;
1961
+ // Inline function 'com.d10ng.common.coordinate.getPointsOnDistance.<anonymous>' call
1962
+ var tmp1 = index;
1963
+ index = tmp1 + 1 | 0;
1964
+ if (tmp1 === 0) {
1965
+ totalDistance = 0.0;
1958
1966
  } else {
1959
- // Inline function 'kotlin.text.replaceRange' call
1960
- var tmp21_replaceRange = string;
1961
- var tmp22_replaceRange = item_3.g9();
1962
- var tmp23_replaceRange = padStart(SValue.toString(), item_3.f1().length, _Char___init__impl__6a9atx(48));
1963
- tmp_3 = toString(replaceRange(isCharSequence(tmp21_replaceRange) ? tmp21_replaceRange : THROW_CCE(), tmp22_replaceRange, tmp23_replaceRange));
1967
+ var lastPoint = points[tmp1 - 1 | 0];
1968
+ var lastDistance = totalDistance;
1969
+ var curDistance = getDistanceOn2Points(lastPoint, item);
1970
+ var newDistance = lastDistance + curDistance;
1971
+ // Inline function 'kotlin.math.floor' call
1972
+ var x = newDistance / distance;
1973
+ var tmp$ret$1 = Math.floor(x);
1974
+ var totalCount = numberToInt(tmp$ret$1);
1975
+ if (totalCount > result.j()) {
1976
+ var count = totalCount - result.j() | 0;
1977
+ var hasHandleDistance = lastDistance;
1978
+ var noHandleDistance = curDistance;
1979
+ var p0 = lastPoint;
1980
+ var inductionVariable_0 = 0;
1981
+ if (inductionVariable_0 < count)
1982
+ do {
1983
+ var i = inductionVariable_0;
1984
+ inductionVariable_0 = inductionVariable_0 + 1 | 0;
1985
+ var lessDistance = distance - hasHandleDistance % distance;
1986
+ var present = lessDistance / noHandleDistance;
1987
+ p0 = getPointOn2Points(p0, item, present);
1988
+ result.h(p0);
1989
+ hasHandleDistance = hasHandleDistance + lessDistance;
1990
+ noHandleDistance = noHandleDistance - lessDistance;
1991
+ }
1992
+ while (inductionVariable_0 < count);
1993
+ }
1994
+ totalDistance = newDistance;
1964
1995
  }
1965
- string = tmp_3;
1966
- }
1967
- var tmp$ret$13;
1968
- // Inline function 'kotlin.text.toRegex' call
1969
- tmp$ret$13 = Regex_init_$Create$('s+');
1970
- reg = toList(tmp$ret$13.d9(string));
1971
- var tmp5_iterator = reg.c();
1972
- while (tmp5_iterator.d()) {
1973
- var item_4 = tmp5_iterator.e();
1974
- var tmp_4 = S - SValue;
1975
- var tmp$ret$14;
1976
- // Inline function 'kotlin.math.pow' call
1977
- var tmp24_pow = item_4.f1().length;
1978
- tmp$ret$14 = Math.pow(10.0, tmp24_pow);
1979
- var sValue = roundToInt(tmp_4 * tmp$ret$14);
1980
- // Inline function 'kotlin.text.replaceRange' call
1981
- var tmp25_replaceRange = string;
1982
- var tmp26_replaceRange = item_4.g9();
1983
- var tmp27_replaceRange = padStart(sValue.toString(), item_4.f1().length, _Char___init__impl__6a9atx(48));
1984
- string = toString(replaceRange(isCharSequence(tmp25_replaceRange) ? tmp25_replaceRange : THROW_CCE(), tmp26_replaceRange, tmp27_replaceRange));
1985
1996
  }
1986
- return string;
1987
- }
1988
- function toLongitudeString(_this__u8e3s4, pattern) {
1989
- pattern = pattern === VOID ? 'CHFd\xB0m\u2032S.ss\u2033' : pattern;
1990
- return toLatLngString(_this__u8e3s4, true, pattern);
1991
- }
1992
- function toLatitudeString(_this__u8e3s4, pattern) {
1993
- pattern = pattern === VOID ? 'CHFd\xB0m\u2032S.ss\u2033' : pattern;
1994
- return toLatLngString(_this__u8e3s4, false, pattern);
1997
+ result.d1(0, points[0]);
1998
+ result.h(points[points.length - 1 | 0]);
1999
+ // Inline function 'kotlin.collections.toTypedArray' call
2000
+ return copyToArray(result);
1995
2001
  }
1996
- function toLatLngByString(_this__u8e3s4, pattern) {
1997
- var string = _this__u8e3s4 + '*';
1998
- var index = 0;
1999
- var tempPattern = pattern + '*';
2000
- while (index < (string.length - 1 | 0)) {
2001
- var tmp$ret$0;
2002
- // Inline function 'kotlin.text.toRegex' call
2003
- tmp$ret$0 = Regex_init_$Create$('[^dmSs]+');
2004
- var list = toList(tmp$ret$0.d9(tempPattern));
2005
- var tmp0_iterator = list.c();
2006
- $l$loop_2: while (tmp0_iterator.d()) {
2007
- var item = tmp0_iterator.e();
2008
- if (item.g9().k_1 < index)
2009
- continue $l$loop_2;
2010
- if (contains(item.f1(), 'CH') ? true : contains(item.f1(), 'F')) {
2011
- index = item.g9().l_1;
2012
- continue $l$loop_2;
2002
+ function compressTrack(points) {
2003
+ if (points.length <= 10) {
2004
+ // Inline function 'kotlin.collections.copyOf' call
2005
+ // Inline function 'kotlin.js.asDynamic' call
2006
+ return points.slice();
2007
+ }
2008
+ // Inline function 'kotlin.collections.mutableListOf' call
2009
+ var result = ArrayList_init_$Create$();
2010
+ var a = points[0];
2011
+ var b = points[1];
2012
+ var inductionVariable = 0;
2013
+ var last = points.length - 1 | 0;
2014
+ if (inductionVariable <= last)
2015
+ $l$loop: do {
2016
+ var i = inductionVariable;
2017
+ inductionVariable = inductionVariable + 1 | 0;
2018
+ if (i < 2) {
2019
+ result.h(points[i]);
2020
+ continue $l$loop;
2013
2021
  }
2014
- var pos = indexOf_0(string, item.f1());
2015
- if (pos < item.g9().k_1) {
2016
- println('ERROR, pos=' + pos + ', range.first=' + item.g9().k_1);
2017
- return 0.0;
2022
+ var c = points[i];
2023
+ var distance = getDistanceOn2Points(a, b) + getDistanceOn2Points(b, c);
2024
+ var tmp;
2025
+ if (distance <= 10.0) {
2026
+ tmp = 90;
2027
+ } else if (distance > 50.0) {
2028
+ tmp = 5;
2029
+ } else {
2030
+ // Inline function 'kotlin.math.max' call
2031
+ var a_0 = numberToInt((1 - distance / 50) * 90);
2032
+ tmp = Math.max(a_0, 5);
2018
2033
  }
2019
- if (pos === item.g9().k_1) {
2020
- index = item.g9().l_1;
2021
- continue $l$loop_2;
2034
+ var x = tmp;
2035
+ var j1 = getAngleOn2Points(a, b);
2036
+ var j2 = getAngleOn2Points(b, c);
2037
+ // Inline function 'kotlin.math.abs' call
2038
+ var x_0 = j1 - j2;
2039
+ if (Math.abs(x_0) < x) {
2040
+ removeLast(result);
2022
2041
  } else {
2023
- // Inline function 'kotlin.text.substring' call
2024
- var tmp0_substring = tempPattern;
2025
- var tmp1_substring = item.g9().k_1 - 1 | 0;
2026
- var tmp2_substring = item.g9().k_1;
2027
- // Inline function 'kotlin.js.asDynamic' call
2028
- var lastStr = tmp0_substring.substring(tmp1_substring, tmp2_substring);
2029
- // Inline function 'kotlin.text.replaceRange' call
2030
- var tmp3_replaceRange = tempPattern;
2031
- var tmp4_replaceRange = item.g9().k_1 - 1 | 0;
2032
- var tmp5_replaceRange = item.g9().k_1;
2033
- var tmp6_replaceRange = padStart(lastStr, (pos - item.g9().k_1 | 0) + 1 | 0, toCharArray(lastStr)[0]);
2034
- tempPattern = toString(replaceRange_0(isCharSequence(tmp3_replaceRange) ? tmp3_replaceRange : THROW_CCE(), tmp4_replaceRange, tmp5_replaceRange, tmp6_replaceRange));
2035
- index = pos + item.f1().length | 0;
2036
- break $l$loop_2;
2042
+ a = b;
2037
2043
  }
2044
+ result.h(c);
2045
+ b = c;
2038
2046
  }
2039
- }
2040
- var tmp$ret$4;
2041
- // Inline function 'kotlin.text.toRegex' call
2042
- tmp$ret$4 = Regex_init_$Create$('CH');
2043
- var reg = toList(tmp$ret$4.d9(tempPattern));
2044
- var tmp;
2045
- // Inline function 'kotlin.collections.isNotEmpty' call
2046
- if (!reg.t()) {
2047
- tmp = substring(string, reg.g(0).g9());
2048
- } else {
2049
- tmp = null;
2050
- }
2051
- var faxiang = tmp;
2052
- var tmp$ret$6;
2053
- // Inline function 'kotlin.text.toRegex' call
2054
- tmp$ret$6 = Regex_init_$Create$('F');
2055
- reg = toList(tmp$ret$6.d9(tempPattern));
2056
- var tmp_0;
2057
- // Inline function 'kotlin.collections.isNotEmpty' call
2058
- if (!reg.t()) {
2059
- tmp_0 = substring(string, reg.g(0).g9());
2060
- } else {
2061
- tmp_0 = faxiang;
2062
- }
2063
- faxiang = tmp_0;
2064
- var isLongitude;
2065
- switch (faxiang) {
2066
- case '\u4E1C\u7ECF':
2067
- case '\u897F\u7ECF':
2068
- case 'E':
2069
- case 'W':
2070
- isLongitude = true;
2071
- break;
2072
- default:
2073
- isLongitude = false;
2074
- break;
2075
- }
2076
- var tmp$ret$8;
2077
- // Inline function 'kotlin.text.toRegex' call
2078
- tmp$ret$8 = Regex_init_$Create$('[d]+');
2079
- reg = toList(tmp$ret$8.d9(tempPattern));
2080
- var dStr = '';
2081
- var tmp2_iterator = reg.c();
2082
- while (tmp2_iterator.d()) {
2083
- var item_0 = tmp2_iterator.e();
2084
- dStr = dStr + substring(string, item_0.g9());
2085
- }
2086
- var tmp$ret$9;
2087
- // Inline function 'kotlin.text.toRegex' call
2088
- tmp$ret$9 = Regex_init_$Create$('[m]+');
2089
- reg = toList(tmp$ret$9.d9(tempPattern));
2090
- var mStr = '';
2091
- var tmp3_iterator = reg.c();
2092
- while (tmp3_iterator.d()) {
2093
- var item_1 = tmp3_iterator.e();
2094
- mStr = mStr + substring(string, item_1.g9());
2095
- }
2096
- var tmp$ret$10;
2097
- // Inline function 'kotlin.text.toRegex' call
2098
- tmp$ret$10 = Regex_init_$Create$('[S]+');
2099
- reg = toList(tmp$ret$10.d9(tempPattern));
2100
- var SStr = '';
2101
- var tmp4_iterator = reg.c();
2102
- while (tmp4_iterator.d()) {
2103
- var item_2 = tmp4_iterator.e();
2104
- SStr = SStr + substring(string, item_2.g9());
2105
- }
2106
- // Inline function 'kotlin.text.isEmpty' call
2107
- var tmp9_isEmpty = SStr;
2108
- if (charSequenceLength(tmp9_isEmpty) === 0)
2109
- SStr = '0';
2110
- var tmp$ret$12;
2111
- // Inline function 'kotlin.text.toRegex' call
2112
- tmp$ret$12 = Regex_init_$Create$('[s]+');
2113
- reg = toList(tmp$ret$12.d9(tempPattern));
2114
- var sStr = '';
2115
- var tmp5_iterator = reg.c();
2116
- while (tmp5_iterator.d()) {
2117
- var item_3 = tmp5_iterator.e();
2118
- sStr = sStr + substring(string, item_3.g9());
2119
- }
2120
- // Inline function 'kotlin.text.isEmpty' call
2121
- var tmp10_isEmpty = sStr;
2122
- if (charSequenceLength(tmp10_isEmpty) === 0)
2123
- sStr = '0';
2124
- var s = toDouble(SStr + '.' + sStr) / 60.0;
2125
- var m = (toInt_0(mStr) + s) / 60.0;
2126
- var d = toInt_0(dStr) + m;
2127
- var tmp_1;
2128
- if (isLongitude) {
2129
- var isEast;
2130
- switch (faxiang) {
2131
- case '\u4E1C\u7ECF':
2132
- case 'E':
2133
- isEast = true;
2134
- break;
2135
- default:
2136
- isEast = false;
2137
- break;
2047
+ while (inductionVariable <= last);
2048
+ // Inline function 'kotlin.collections.toTypedArray' call
2049
+ return copyToArray(result);
2050
+ }
2051
+ function getPointByBasePoint(point, distance, angle) {
2052
+ if (distance === 0.0)
2053
+ return point.copy();
2054
+ var radLat = toRadians(point.lat);
2055
+ var radLng = toRadians(point.lng);
2056
+ var radAngle = toRadians(angle);
2057
+ // Inline function 'kotlin.math.sin' call
2058
+ var sinRadAngle = Math.sin(radAngle);
2059
+ // Inline function 'kotlin.math.cos' call
2060
+ var cosRadAngle = Math.cos(radAngle);
2061
+ // Inline function 'kotlin.math.tan' call
2062
+ var tanU1 = 0.9966471893352525 * Math.tan(radLat);
2063
+ // Inline function 'kotlin.math.sqrt' call
2064
+ var x = 1 + tanU1 * tanU1;
2065
+ var cosU1 = 1 / Math.sqrt(x);
2066
+ var sinU1 = tanU1 * cosU1;
2067
+ // Inline function 'kotlin.math.atan2' call
2068
+ var sigma1 = Math.atan2(tanU1, cosRadAngle);
2069
+ var sinAlpha = cosU1 * sinRadAngle;
2070
+ var cosSqAlpha = 1 - sinAlpha * sinAlpha;
2071
+ var uSq = cosSqAlpha * 2.7233160610984375E11 / 4.040829998465916E13;
2072
+ var A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));
2073
+ var B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));
2074
+ var sigma = distance / (6356752.314245 * A);
2075
+ var sinSigma;
2076
+ var cosSigma;
2077
+ var cos2SigmaM;
2078
+ var sigmaP;
2079
+ var iterations = 0.0;
2080
+ $l$1: do {
2081
+ $l$0: do {
2082
+ // Inline function 'kotlin.math.cos' call
2083
+ var x_0 = 2 * sigma1 + sigma;
2084
+ cos2SigmaM = Math.cos(x_0);
2085
+ // Inline function 'kotlin.math.sin' call
2086
+ var x_1 = sigma;
2087
+ sinSigma = Math.sin(x_1);
2088
+ // Inline function 'kotlin.math.cos' call
2089
+ var x_2 = sigma;
2090
+ cosSigma = Math.cos(x_2);
2091
+ var deltaSigma = B * sinSigma * (cos2SigmaM + B / 4 * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) - B / 6 * cos2SigmaM * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));
2092
+ sigmaP = sigma;
2093
+ sigma = distance / (6356752.314245 * A) + deltaSigma;
2138
2094
  }
2139
- tmp_1 = toFullLongitude(d, isEast, false);
2140
- } else {
2141
- var isNorth;
2142
- switch (faxiang) {
2143
- case '\u5317\u7EAC':
2144
- case 'N':
2145
- isNorth = true;
2146
- break;
2147
- default:
2148
- isNorth = false;
2149
- break;
2095
+ while (false);
2096
+ var tmp;
2097
+ // Inline function 'kotlin.math.abs' call
2098
+ var x_3 = sigma - sigmaP;
2099
+ if (Math.abs(x_3) > 1.0E-12) {
2100
+ iterations = iterations + 1;
2101
+ tmp = iterations < 100.0;
2102
+ } else {
2103
+ tmp = false;
2150
2104
  }
2151
- tmp_1 = toFullLatitude(d, isNorth, false);
2152
2105
  }
2153
- return tmp_1;
2154
- }
2155
- function toLongitude(_this__u8e3s4, pattern) {
2156
- return toLatLngByString('E' + _this__u8e3s4, 'F' + pattern);
2106
+ while (tmp);
2107
+ if (iterations >= 100.0)
2108
+ throw RuntimeException_init_$Create$('Vincenty formula failed to converge');
2109
+ var x_4 = sinU1 * sinSigma - cosU1 * cosSigma * cosRadAngle;
2110
+ // Inline function 'kotlin.math.atan2' call
2111
+ var y = sinU1 * cosSigma + cosU1 * sinSigma * cosRadAngle;
2112
+ // Inline function 'kotlin.math.sqrt' call
2113
+ var x_5 = sinAlpha * sinAlpha + x_4 * x_4;
2114
+ var x_6 = 0.9966471893352525 * Math.sqrt(x_5);
2115
+ var lat2 = Math.atan2(y, x_6);
2116
+ // Inline function 'kotlin.math.atan2' call
2117
+ var y_0 = sinSigma * sinRadAngle;
2118
+ var x_7 = cosU1 * cosSigma - sinU1 * sinSigma * cosRadAngle;
2119
+ var lambda = Math.atan2(y_0, x_7);
2120
+ var C = 2.0955066654671756E-4 * cosSqAlpha * (4 + 0.003352810664747481 * (4 - 3 * cosSqAlpha));
2121
+ var L = lambda - (1 - C) * 0.003352810664747481 * sinAlpha * (sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));
2122
+ var lng2 = radLng + L;
2123
+ return new Coordinate(toDegrees(lat2), toDegrees(lng2));
2157
2124
  }
2158
- function toLatitude(_this__u8e3s4, pattern) {
2159
- return toLatLngByString('N' + _this__u8e3s4, 'F' + pattern);
2125
+ function getRandomPoint(point, radius) {
2126
+ var randomAngle = Default_getInstance().i8() * get_PI() * 2;
2127
+ var randomDistance = Default_getInstance().i8() * radius;
2128
+ return getPointByBasePoint(point, randomDistance, randomAngle);
2160
2129
  }
2161
- function ddmmpmmmm2LatLng(_this__u8e3s4) {
2162
- var temp = _this__u8e3s4 / 100;
2163
- var z = numberToInt(temp);
2164
- var end = (temp - z) * 100.0 / 60;
2165
- return z + end;
2130
+ function getNearPartsOnLine(point, line, offset) {
2131
+ offset = offset === VOID ? 10.0 : offset;
2132
+ if (line.length < 2)
2133
+ throw RuntimeException_init_$Create$('\u8F68\u8FF9\u81F3\u5C11\u9700\u8981\u4E24\u4E2A\u70B9');
2134
+ // Inline function 'kotlin.collections.mutableListOf' call
2135
+ var ls = ArrayList_init_$Create$();
2136
+ var inductionVariable = 0;
2137
+ var last = line.length - 1 | 0;
2138
+ if (inductionVariable < last)
2139
+ $l$loop: do {
2140
+ var i = inductionVariable;
2141
+ inductionVariable = inductionVariable + 1 | 0;
2142
+ var distance = getDistanceOn2Points(point, line[i]) + getDistanceOn2Points(point, line[i + 1 | 0]);
2143
+ if (ls.n()) {
2144
+ ls.h(to(i, distance));
2145
+ } else if (distance > ls.t(0).o9_1 + offset)
2146
+ continue $l$loop;
2147
+ else if (distance < ls.t(0).o9_1 - offset) {
2148
+ ls.e1();
2149
+ ls.h(to(i, distance));
2150
+ } else {
2151
+ var inductionVariable_0 = 0;
2152
+ var last_0 = ls.j();
2153
+ if (inductionVariable_0 < last_0)
2154
+ $l$loop_0: do {
2155
+ var j = inductionVariable_0;
2156
+ inductionVariable_0 = inductionVariable_0 + 1 | 0;
2157
+ if (distance < ls.t(j).o9_1) {
2158
+ ls.d1(j, to(i, distance));
2159
+ break $l$loop_0;
2160
+ }
2161
+ }
2162
+ while (inductionVariable_0 < last_0);
2163
+ if (ls.j() > 3) {
2164
+ ls.w(3);
2165
+ }
2166
+ }
2167
+ }
2168
+ while (inductionVariable < last);
2169
+ // Inline function 'kotlin.collections.toTypedArray' call
2170
+ // Inline function 'kotlin.collections.map' call
2171
+ // Inline function 'kotlin.collections.mapTo' call
2172
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(ls, 10));
2173
+ var tmp0_iterator = ls.k();
2174
+ while (tmp0_iterator.r()) {
2175
+ var item = tmp0_iterator.s();
2176
+ // Inline function 'com.d10ng.common.coordinate.getNearPartsOnLine.<anonymous>' call
2177
+ var tmp$ret$1 = item.n9_1;
2178
+ destination.h(tmp$ret$1);
2179
+ }
2180
+ return copyToArray(destination);
2166
2181
  }
2167
- function latLng2ddmmpmmmm(_this__u8e3s4) {
2168
- var z = numberToInt(_this__u8e3s4);
2169
- var end = (_this__u8e3s4 - z) * 60.0 / 100.0;
2170
- return (z + end) * 100;
2182
+ function getProjectionPointOnLinePart(point, part) {
2183
+ if (!(part.length === 2))
2184
+ throw RuntimeException_init_$Create$('\u7EBF\u6BB5\u5FC5\u987B\u662F\u4E24\u4E2A\u70B9');
2185
+ var start = part[0];
2186
+ var end = part[1];
2187
+ var p2s = getDistanceOn2Points(point, start);
2188
+ var p2e = getDistanceOn2Points(point, end);
2189
+ var s2e = getDistanceOn2Points(start, end);
2190
+ return p2s - p2e > s2e ? end : p2e - p2s > s2e ? start : getPointOn2Points(start, end, p2s / (p2s + p2e));
2171
2191
  }
2172
- function DMS(degrees, minutes, seconds) {
2173
- degrees = degrees === VOID ? 0 : degrees;
2174
- minutes = minutes === VOID ? 0 : minutes;
2175
- seconds = seconds === VOID ? 0.0 : seconds;
2176
- this.degrees = degrees;
2177
- this.minutes = minutes;
2178
- this.seconds = seconds;
2192
+ function getProjectionPointOnLine(point, line) {
2193
+ if (line.length < 2)
2194
+ throw RuntimeException_init_$Create$('\u8F68\u8FF9\u81F3\u5C11\u9700\u8981\u4E24\u4E2A\u70B9');
2195
+ var nearParts = getNearPartsOnLine(point, line);
2196
+ // Inline function 'kotlin.arrayOf' call
2197
+ // Inline function 'kotlin.js.unsafeCast' call
2198
+ // Inline function 'kotlin.js.asDynamic' call
2199
+ var tmp$ret$2 = [line[nearParts[0]], line[nearParts[0] + 1 | 0]];
2200
+ return getProjectionPointOnLinePart(point, tmp$ret$2);
2179
2201
  }
2180
- protoOf(DMS).kc = function (_set____db54di) {
2181
- this.degrees = _set____db54di;
2182
- };
2183
- protoOf(DMS).lc = function () {
2184
- return this.degrees;
2185
- };
2186
- protoOf(DMS).mc = function (_set____db54di) {
2187
- this.minutes = _set____db54di;
2188
- };
2189
- protoOf(DMS).nc = function () {
2190
- return this.minutes;
2191
- };
2192
- protoOf(DMS).oc = function (_set____db54di) {
2193
- this.seconds = _set____db54di;
2194
- };
2195
- protoOf(DMS).pc = function () {
2196
- return this.seconds;
2197
- };
2198
- protoOf(DMS).toString = function () {
2199
- return '' + this.degrees + '\xB0' + this.minutes + '\u2032' + this.seconds + '\u2033';
2200
- };
2201
- protoOf(DMS).wb = function () {
2202
- return this.degrees;
2203
- };
2204
- protoOf(DMS).xb = function () {
2205
- return this.minutes;
2206
- };
2207
- protoOf(DMS).qc = function () {
2208
- return this.seconds;
2209
- };
2210
- protoOf(DMS).rc = function (degrees, minutes, seconds) {
2211
- return new DMS(degrees, minutes, seconds);
2212
- };
2213
- protoOf(DMS).copy = function (degrees, minutes, seconds, $super) {
2214
- degrees = degrees === VOID ? this.degrees : degrees;
2215
- minutes = minutes === VOID ? this.minutes : minutes;
2216
- seconds = seconds === VOID ? this.seconds : seconds;
2217
- return this.rc(degrees, minutes, seconds);
2218
- };
2219
- protoOf(DMS).hashCode = function () {
2220
- var result = this.degrees;
2221
- result = imul(result, 31) + this.minutes | 0;
2222
- result = imul(result, 31) + getNumberHashCode(this.seconds) | 0;
2223
- return result;
2224
- };
2225
- protoOf(DMS).equals = function (other) {
2226
- if (this === other)
2227
- return true;
2228
- if (!(other instanceof DMS))
2229
- return false;
2230
- var tmp0_other_with_cast = other instanceof DMS ? other : THROW_CCE();
2231
- if (!(this.degrees === tmp0_other_with_cast.degrees))
2232
- return false;
2233
- if (!(this.minutes === tmp0_other_with_cast.minutes))
2234
- return false;
2235
- if (!equals(this.seconds, tmp0_other_with_cast.seconds))
2236
- return false;
2237
- return true;
2238
- };
2239
- function DistanceAndBearing(distance, initialBearing, finalBearing) {
2240
- distance = distance === VOID ? 0.0 : distance;
2241
- initialBearing = initialBearing === VOID ? 0.0 : initialBearing;
2242
- finalBearing = finalBearing === VOID ? 0.0 : finalBearing;
2243
- this.distance = distance;
2244
- this.initialBearing = initialBearing;
2245
- this.finalBearing = finalBearing;
2202
+ function getProjectionLineOnLineWithPoint(point, targetLine) {
2203
+ var nearParts = getNearPartsOnLine(point, targetLine);
2204
+ var nearIndex = nearParts[0];
2205
+ // Inline function 'kotlin.arrayOf' call
2206
+ // Inline function 'kotlin.js.unsafeCast' call
2207
+ // Inline function 'kotlin.js.asDynamic' call
2208
+ var tmp$ret$2 = [targetLine[nearIndex], targetLine[nearIndex + 1 | 0]];
2209
+ var projectionPoint = getProjectionPointOnLinePart(point, tmp$ret$2);
2210
+ // Inline function 'kotlin.collections.plus' call
2211
+ // Inline function 'kotlin.js.asDynamic' call
2212
+ var tmp$ret$3 = copyOfRange_0(targetLine, 0, nearIndex + 1 | 0);
2213
+ // Inline function 'kotlin.arrayOf' call
2214
+ // Inline function 'kotlin.js.unsafeCast' call
2215
+ // Inline function 'kotlin.js.asDynamic' call
2216
+ var tmp$ret$6 = [projectionPoint];
2217
+ return tmp$ret$3.concat(tmp$ret$6);
2218
+ }
2219
+ function getProjectionLineOnLineWithLine(line, targetLine, offset) {
2220
+ offset = offset === VOID ? 10.0 : offset;
2221
+ // Inline function 'kotlin.collections.isEmpty' call
2222
+ if (line.length === 0) {
2223
+ // Inline function 'kotlin.arrayOf' call
2224
+ // Inline function 'kotlin.js.unsafeCast' call
2225
+ // Inline function 'kotlin.js.asDynamic' call
2226
+ return [targetLine[0]];
2227
+ }
2228
+ var compressLine = compressTrack(line);
2229
+ var newPoint = compressLine[compressLine.length - 1 | 0];
2230
+ var nearParts = getNearPartsOnLine(newPoint, targetLine, offset);
2231
+ var tmp;
2232
+ if (compressLine.length === 1 ? true : nearParts.length === 1) {
2233
+ tmp = 0;
2234
+ } else {
2235
+ var lastPoint = compressLine[compressLine.length - 2 | 0];
2236
+ var newAngle = getAngleOn2Points(lastPoint, newPoint);
2237
+ // Inline function 'kotlin.collections.map' call
2238
+ // Inline function 'kotlin.collections.mapTo' call
2239
+ var destination = ArrayList_init_$Create$_0(nearParts.length);
2240
+ var inductionVariable = 0;
2241
+ var last = nearParts.length;
2242
+ while (inductionVariable < last) {
2243
+ var item = nearParts[inductionVariable];
2244
+ inductionVariable = inductionVariable + 1 | 0;
2245
+ // Inline function 'com.d10ng.common.coordinate.getProjectionLineOnLineWithLine.<anonymous>' call
2246
+ var tmp$ret$4 = getAngleOn2Points(targetLine[item], targetLine[item + 1 | 0]);
2247
+ destination.h(tmp$ret$4);
2248
+ }
2249
+ var nearAngles = destination;
2250
+ var tmp$ret$7;
2251
+ $l$block: {
2252
+ // Inline function 'kotlin.collections.minBy' call
2253
+ var iterator = nearAngles.k();
2254
+ if (!iterator.r())
2255
+ throw NoSuchElementException_init_$Create$();
2256
+ var minElem = iterator.s();
2257
+ if (!iterator.r()) {
2258
+ tmp$ret$7 = minElem;
2259
+ break $l$block;
2260
+ }
2261
+ // Inline function 'com.d10ng.common.coordinate.getProjectionLineOnLineWithLine.<anonymous>' call
2262
+ // Inline function 'kotlin.math.abs' call
2263
+ var x = minElem - newAngle;
2264
+ var minValue = Math.abs(x);
2265
+ do {
2266
+ var e = iterator.s();
2267
+ // Inline function 'com.d10ng.common.coordinate.getProjectionLineOnLineWithLine.<anonymous>' call
2268
+ // Inline function 'kotlin.math.abs' call
2269
+ var x_0 = e - newAngle;
2270
+ var v = Math.abs(x_0);
2271
+ if (compareTo(minValue, v) > 0) {
2272
+ minElem = e;
2273
+ minValue = v;
2274
+ }
2275
+ }
2276
+ while (iterator.r());
2277
+ tmp$ret$7 = minElem;
2278
+ }
2279
+ var nearAngle = tmp$ret$7;
2280
+ tmp = nearAngles.g1(nearAngle);
2281
+ }
2282
+ var nearIndex = tmp;
2283
+ // Inline function 'kotlin.arrayOf' call
2284
+ // Inline function 'kotlin.js.unsafeCast' call
2285
+ // Inline function 'kotlin.js.asDynamic' call
2286
+ var part = [targetLine[nearParts[nearIndex]], targetLine[nearParts[nearIndex] + 1 | 0]];
2287
+ var projectionPoint = getProjectionPointOnLinePart(newPoint, part);
2288
+ // Inline function 'kotlin.collections.plus' call
2289
+ // Inline function 'kotlin.js.asDynamic' call
2290
+ var tmp$ret$15 = copyOfRange_0(targetLine, 0, nearParts[nearIndex] + 1 | 0);
2291
+ // Inline function 'kotlin.arrayOf' call
2292
+ // Inline function 'kotlin.js.unsafeCast' call
2293
+ // Inline function 'kotlin.js.asDynamic' call
2294
+ var tmp$ret$18 = [projectionPoint];
2295
+ return tmp$ret$15.concat(tmp$ret$18);
2246
2296
  }
2247
- protoOf(DistanceAndBearing).sc = function (_set____db54di) {
2248
- this.distance = _set____db54di;
2249
- };
2250
- protoOf(DistanceAndBearing).tc = function () {
2251
- return this.distance;
2252
- };
2253
- protoOf(DistanceAndBearing).uc = function (_set____db54di) {
2254
- this.initialBearing = _set____db54di;
2255
- };
2256
- protoOf(DistanceAndBearing).vc = function () {
2257
- return this.initialBearing;
2258
- };
2259
- protoOf(DistanceAndBearing).wc = function (_set____db54di) {
2260
- this.finalBearing = _set____db54di;
2261
- };
2262
- protoOf(DistanceAndBearing).xc = function () {
2263
- return this.finalBearing;
2264
- };
2265
- protoOf(DistanceAndBearing).wb = function () {
2266
- return this.distance;
2267
- };
2268
- protoOf(DistanceAndBearing).xb = function () {
2269
- return this.initialBearing;
2270
- };
2271
- protoOf(DistanceAndBearing).qc = function () {
2272
- return this.finalBearing;
2273
- };
2274
- protoOf(DistanceAndBearing).yc = function (distance, initialBearing, finalBearing) {
2275
- return new DistanceAndBearing(distance, initialBearing, finalBearing);
2276
- };
2277
- protoOf(DistanceAndBearing).copy = function (distance, initialBearing, finalBearing, $super) {
2278
- distance = distance === VOID ? this.distance : distance;
2279
- initialBearing = initialBearing === VOID ? this.initialBearing : initialBearing;
2280
- finalBearing = finalBearing === VOID ? this.finalBearing : finalBearing;
2281
- return this.yc(distance, initialBearing, finalBearing);
2282
- };
2283
- protoOf(DistanceAndBearing).toString = function () {
2284
- return 'DistanceAndBearing(distance=' + this.distance + ', initialBearing=' + this.initialBearing + ', finalBearing=' + this.finalBearing + ')';
2285
- };
2286
- protoOf(DistanceAndBearing).hashCode = function () {
2287
- var result = getNumberHashCode(this.distance);
2288
- result = imul(result, 31) + getNumberHashCode(this.initialBearing) | 0;
2289
- result = imul(result, 31) + getNumberHashCode(this.finalBearing) | 0;
2290
- return result;
2291
- };
2292
- protoOf(DistanceAndBearing).equals = function (other) {
2293
- if (this === other)
2294
- return true;
2295
- if (!(other instanceof DistanceAndBearing))
2296
- return false;
2297
- var tmp0_other_with_cast = other instanceof DistanceAndBearing ? other : THROW_CCE();
2298
- if (!equals(this.distance, tmp0_other_with_cast.distance))
2299
- return false;
2300
- if (!equals(this.initialBearing, tmp0_other_with_cast.initialBearing))
2301
- return false;
2302
- if (!equals(this.finalBearing, tmp0_other_with_cast.finalBearing))
2303
- return false;
2304
- return true;
2305
- };
2306
2297
  function encodeGBK(_this__u8e3s4) {
2307
2298
  return encodeGBKDo(_this__u8e3s4);
2308
2299
  }
@@ -2320,19 +2311,19 @@
2320
2311
  return hexStringToByteArray(hex);
2321
2312
  }
2322
2313
  function encodeUnicodeString(_this__u8e3s4, isNeedU) {
2314
+ isNeedU = isNeedU === VOID ? true : isNeedU;
2323
2315
  var builder = StringBuilder_init_$Create$();
2324
2316
  // Inline function 'kotlin.collections.iterator' call
2325
2317
  var tmp0_iterator = iterator(_this__u8e3s4);
2326
- while (tmp0_iterator.d()) {
2327
- var c = tmp0_iterator.e().c3_1;
2328
- var tmp$ret$1;
2318
+ while (tmp0_iterator.r()) {
2319
+ var c = tmp0_iterator.s().x5_1;
2329
2320
  // Inline function 'kotlin.code' call
2330
- tmp$ret$1 = Char__toInt_impl_vasixd(c);
2321
+ var tmp$ret$1 = Char__toInt_impl_vasixd(c);
2331
2322
  var item = toString_2(tmp$ret$1, 16);
2332
2323
  if (isNeedU) {
2333
- builder.g4('\\u');
2324
+ builder.f3('\\u');
2334
2325
  }
2335
- builder.g4(padStart(item, 4, _Char___init__impl__6a9atx(48)));
2326
+ builder.f3(padStart(item, 4, _Char___init__impl__6a9atx(48)));
2336
2327
  }
2337
2328
  return builder.toString();
2338
2329
  }
@@ -2342,8 +2333,9 @@
2342
2333
  function decodeUnicodeString(_this__u8e3s4) {
2343
2334
  var value = replace(replace(_this__u8e3s4, '\\u', ''), ' ', '');
2344
2335
  // Inline function 'kotlin.text.toRegex' call
2345
- var regex = Regex_init_$Create$('[A-Fa-f0-9]+');
2346
- var isMatch = regex.a9(value);
2336
+ var this_0 = '[A-Fa-f0-9]+';
2337
+ var regex = Regex_init_$Create$(this_0);
2338
+ var isMatch = regex.o4(value);
2347
2339
  if (!isMatch)
2348
2340
  return '';
2349
2341
  var builder = StringBuilder_init_$Create$();
@@ -2361,12 +2353,14 @@
2361
2353
  var end = i + 4 | 0;
2362
2354
  if (str.length >= end) {
2363
2355
  // Inline function 'kotlin.text.substring' call
2356
+ var this_1 = str;
2357
+ var startIndex = i;
2364
2358
  // Inline function 'kotlin.js.asDynamic' call
2365
- var item = str.substring(i, end);
2359
+ var item = this_1.substring(startIndex, end);
2366
2360
  var tmp1_elvis_lhs = toIntOrNull(item, 16);
2367
2361
  var data = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
2368
2362
  if (!(data === 0)) {
2369
- builder.d3(numberToChar(data));
2363
+ builder.g3(numberToChar(data));
2370
2364
  }
2371
2365
  }
2372
2366
  }
@@ -2378,28 +2372,32 @@
2378
2372
  }
2379
2373
  function encodeASCIIString(_this__u8e3s4) {
2380
2374
  // Inline function 'kotlin.text.toRegex' call
2381
- var regex = Regex_init_$Create$('[\\u0020-\\u007e]+');
2382
- var isMatch = regex.a9(_this__u8e3s4);
2375
+ var this_0 = '[\\u0020-\\u007e]+';
2376
+ var regex = Regex_init_$Create$(this_0);
2377
+ var isMatch = regex.o4(_this__u8e3s4);
2383
2378
  if (!isMatch)
2384
2379
  return '';
2385
2380
  var builder = StringBuilder_init_$Create$();
2386
2381
  // Inline function 'kotlin.collections.iterator' call
2387
2382
  var tmp0_iterator = iterator(_this__u8e3s4);
2388
- while (tmp0_iterator.d()) {
2389
- var c = tmp0_iterator.e().c3_1;
2390
- var tmp$ret$2;
2383
+ while (tmp0_iterator.r()) {
2384
+ var c = tmp0_iterator.s().x5_1;
2391
2385
  // Inline function 'kotlin.code' call
2392
- tmp$ret$2 = Char__toInt_impl_vasixd(c);
2386
+ var tmp$ret$2 = Char__toInt_impl_vasixd(c);
2393
2387
  var item = toString_2(tmp$ret$2, 16);
2394
- builder.g4(padStart(item, 2, _Char___init__impl__6a9atx(48)));
2388
+ builder.f3(padStart(item, 2, _Char___init__impl__6a9atx(48)));
2395
2389
  }
2396
2390
  return builder.toString();
2397
2391
  }
2392
+ function decodeASCII(_this__u8e3s4) {
2393
+ return decodeASCIIString(byteArrayToHexString(_this__u8e3s4));
2394
+ }
2398
2395
  function decodeASCIIString(_this__u8e3s4) {
2399
2396
  var value = replace(_this__u8e3s4, ' ', '');
2400
2397
  // Inline function 'kotlin.text.toRegex' call
2401
- var regex = Regex_init_$Create$('[A-Fa-f0-9]+');
2402
- var isMatch = regex.a9(value);
2398
+ var this_0 = '[A-Fa-f0-9]+';
2399
+ var regex = Regex_init_$Create$(this_0);
2400
+ var isMatch = regex.o4(value);
2403
2401
  if (!isMatch)
2404
2402
  return '';
2405
2403
  var builder = StringBuilder_init_$Create$();
@@ -2415,18 +2413,16 @@
2415
2413
  var i = inductionVariable;
2416
2414
  inductionVariable = inductionVariable + 2 | 0;
2417
2415
  // Inline function 'kotlin.text.substring' call
2418
- var tmp0_substring = str;
2419
- var tmp1_substring = i + 2 | 0;
2416
+ var this_1 = str;
2417
+ var startIndex = i;
2418
+ var endIndex = i + 2 | 0;
2420
2419
  // Inline function 'kotlin.js.asDynamic' call
2421
- var temp = tmp0_substring.substring(i, tmp1_substring);
2422
- builder.d3(numberToChar(toInt(temp, 16)));
2420
+ var temp = this_1.substring(startIndex, endIndex);
2421
+ builder.g3(numberToChar(toInt(temp, 16)));
2423
2422
  }
2424
2423
  while (!(i === last));
2425
2424
  return builder.toString();
2426
2425
  }
2427
- function decodeASCII(_this__u8e3s4) {
2428
- return decodeASCIIString(byteArrayToHexString(_this__u8e3s4));
2429
- }
2430
2426
  function toPinYin(_this__u8e3s4, separator) {
2431
2427
  separator = separator === VOID ? '' : separator;
2432
2428
  return toPinYinDo(_this__u8e3s4, separator);
@@ -2449,10 +2445,10 @@
2449
2445
  return tmp;
2450
2446
  }
2451
2447
  function encodeGBKDo(_this__u8e3s4) {
2452
- return GBKHelper_getInstance().ad(_this__u8e3s4);
2448
+ return GBKHelper_getInstance().yb(_this__u8e3s4);
2453
2449
  }
2454
2450
  function decodeGBKDo(_this__u8e3s4) {
2455
- return GBKHelper_getInstance().bd(_this__u8e3s4);
2451
+ return GBKHelper_getInstance().zb(_this__u8e3s4);
2456
2452
  }
2457
2453
  function getCharGBKByteArray($this, char) {
2458
2454
  // Inline function 'kotlin.code' call
@@ -2464,7 +2460,7 @@
2464
2460
  } else {
2465
2461
  // Inline function 'org.khronos.webgl.get' call
2466
2462
  // Inline function 'kotlin.js.asDynamic' call
2467
- var gbk = $this.zc_1[code];
2463
+ var gbk = $this.xb_1[code];
2468
2464
  // Inline function 'kotlin.byteArrayOf' call
2469
2465
  tmp = new Int8Array([toByte(gbk & 255), toByte(gbk >> 8)]);
2470
2466
  }
@@ -2472,7 +2468,7 @@
2472
2468
  }
2473
2469
  function GBKHelper() {
2474
2470
  GBKHelper_instance = this;
2475
- this.zc_1 = new Uint16Array(65536);
2471
+ this.xb_1 = new Uint16Array(65536);
2476
2472
  // Inline function 'kotlin.arrayOf' call
2477
2473
  // Inline function 'kotlin.arrayOf' call
2478
2474
  // Inline function 'kotlin.js.unsafeCast' call
@@ -2549,17 +2545,17 @@
2549
2545
  var j = inductionVariable_2;
2550
2546
  inductionVariable_2 = inductionVariable_2 + 1 | 0;
2551
2547
  // Inline function 'org.khronos.webgl.set' call
2552
- var tmp4_set = this.zc_1;
2548
+ var this_0 = this.xb_1;
2553
2549
  // Inline function 'kotlin.code' call
2554
- var tmp3_get_code_qbni8p = charSequenceGet(str, j);
2550
+ var this_1 = charSequenceGet(str, j);
2555
2551
  // Inline function 'org.khronos.webgl.get' call
2556
2552
  // Inline function 'kotlin.js.asDynamic' call
2557
2553
  // Inline function 'kotlin.js.asDynamic' call
2558
- tmp4_set[Char__toInt_impl_vasixd(tmp3_get_code_qbni8p)] = codes[j];
2554
+ this_0[Char__toInt_impl_vasixd(this_1)] = codes[j];
2559
2555
  }
2560
2556
  while (inductionVariable_2 <= last_2);
2561
2557
  }
2562
- protoOf(GBKHelper).ad = function (str) {
2558
+ protoOf(GBKHelper).yb = function (str) {
2563
2559
  // Inline function 'kotlin.byteArrayOf' call
2564
2560
  var bytes = new Int8Array([]);
2565
2561
  var indexedObject = toCharArray(str);
@@ -2569,13 +2565,13 @@
2569
2565
  var char = indexedObject[inductionVariable];
2570
2566
  inductionVariable = inductionVariable + 1 | 0;
2571
2567
  // Inline function 'kotlin.collections.plus' call
2572
- var tmp0_plus = bytes;
2573
- var tmp1_plus = getCharGBKByteArray(this, char);
2574
- bytes = primitiveArrayConcat([tmp0_plus, tmp1_plus]);
2568
+ var this_0 = bytes;
2569
+ var elements = getCharGBKByteArray(this, char);
2570
+ bytes = primitiveArrayConcat([this_0, elements]);
2575
2571
  }
2576
2572
  return bytes;
2577
2573
  };
2578
- protoOf(GBKHelper).bd = function (byteArray) {
2574
+ protoOf(GBKHelper).zb = function (byteArray) {
2579
2575
  var decoder = new TextDecoder('gbk');
2580
2576
  var tmp = decoder.decode(new Uint8Array(toTypedArray(byteArray)));
2581
2577
  return (!(tmp == null) ? typeof tmp === 'string' : false) ? tmp : THROW_CCE();
@@ -2592,10 +2588,13 @@
2592
2588
  return joinToString_0(PinyinPro.pinyin(_this__u8e3s4, {type: 'array', toneType: 'none'}), separator).toUpperCase();
2593
2589
  }
2594
2590
  //region block: post-declaration
2595
- defineProp(protoOf(ChecksumType), 'name', protoOf(ChecksumType).ka, VOID);
2596
- defineProp(protoOf(ChecksumType), 'ordinal', protoOf(ChecksumType).la, VOID);
2597
- defineProp(protoOf(CoordinateSystemType), 'name', protoOf(CoordinateSystemType).ka, VOID);
2598
- defineProp(protoOf(CoordinateSystemType), 'ordinal', protoOf(CoordinateSystemType).la, VOID);
2591
+ defineProp(protoOf(ChecksumType), 'name', protoOf(ChecksumType).m6);
2592
+ defineProp(protoOf(ChecksumType), 'ordinal', protoOf(ChecksumType).n6);
2593
+ defineProp(protoOf(CoordinateSystemType), 'name', protoOf(CoordinateSystemType).m6);
2594
+ defineProp(protoOf(CoordinateSystemType), 'ordinal', protoOf(CoordinateSystemType).n6);
2595
+ //endregion
2596
+ //region block: init
2597
+ CoordinateConvert_instance = new CoordinateConvert();
2599
2598
  //endregion
2600
2599
  //region block: exports
2601
2600
  function $jsExportAll$(_) {
@@ -2629,6 +2628,7 @@
2629
2628
  $com$d10ng$common$base.hexStringToByteArray = hexStringToByteArray;
2630
2629
  $com$d10ng$common$base.getStringByteLength = getStringByteLength;
2631
2630
  $com$d10ng$common$base.getStringFirstUpperCase = getStringFirstUpperCase;
2631
+ $com$d10ng$common$base.stringToFullWidthString = stringToFullWidthString;
2632
2632
  var $com = _.com || (_.com = {});
2633
2633
  var $com$d10ng = $com.d10ng || ($com.d10ng = {});
2634
2634
  var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
@@ -2636,9 +2636,9 @@
2636
2636
  $com$d10ng$common$calculate.ChecksumType = ChecksumType;
2637
2637
  $com$d10ng$common$calculate.ChecksumType.values = values;
2638
2638
  $com$d10ng$common$calculate.ChecksumType.valueOf = valueOf;
2639
- defineProp($com$d10ng$common$calculate.ChecksumType, 'AND', ChecksumType_AND_getInstance, VOID);
2640
- defineProp($com$d10ng$common$calculate.ChecksumType, 'OR', ChecksumType_OR_getInstance, VOID);
2641
- defineProp($com$d10ng$common$calculate.ChecksumType, 'XOR', ChecksumType_XOR_getInstance, VOID);
2639
+ defineProp($com$d10ng$common$calculate.ChecksumType, 'AND', ChecksumType_AND_getInstance);
2640
+ defineProp($com$d10ng$common$calculate.ChecksumType, 'OR', ChecksumType_OR_getInstance);
2641
+ defineProp($com$d10ng$common$calculate.ChecksumType, 'XOR', ChecksumType_XOR_getInstance);
2642
2642
  $com$d10ng$common$calculate.assertChecksum = assertChecksum;
2643
2643
  $com$d10ng$common$calculate.getChecksum = getChecksum;
2644
2644
  $com$d10ng$common$calculate.addChecksum = addChecksum;
@@ -2677,33 +2677,12 @@
2677
2677
  var $com$d10ng = $com.d10ng || ($com.d10ng = {});
2678
2678
  var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
2679
2679
  var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
2680
- $com$d10ng$common$coordinate.getDistanceAndBearing = getDistanceAndBearing;
2681
- $com$d10ng$common$coordinate.getDistanceOn2Points = getDistanceOn2Points;
2682
- $com$d10ng$common$coordinate.toRadians = toRadians;
2683
- $com$d10ng$common$coordinate.toDegrees = toDegrees;
2684
- $com$d10ng$common$coordinate.isPointInCircle = isPointInCircle;
2685
- $com$d10ng$common$coordinate.getAngleOn2Points = getAngleOn2Points;
2686
- $com$d10ng$common$coordinate.getPointOn2Points = getPointOn2Points;
2687
- $com$d10ng$common$coordinate.getTotalDistance = getTotalDistance;
2688
- $com$d10ng$common$coordinate.getPointsOnDistance = getPointsOnDistance;
2689
- $com$d10ng$common$coordinate.compressTrack = compressTrack;
2690
- $com$d10ng$common$coordinate.getPointByBasePoint = getPointByBasePoint;
2691
- $com$d10ng$common$coordinate.getRandomPoint = getRandomPoint;
2692
- $com$d10ng$common$coordinate.getNearPartsOnLine = getNearPartsOnLine;
2693
- $com$d10ng$common$coordinate.getProjectionPointOnLinePart = getProjectionPointOnLinePart;
2694
- $com$d10ng$common$coordinate.getProjectionPointOnLine = getProjectionPointOnLine;
2695
- $com$d10ng$common$coordinate.getProjectionLineOnLineWithPoint = getProjectionLineOnLineWithPoint;
2696
- $com$d10ng$common$coordinate.getProjectionLineOnLineWithLine = getProjectionLineOnLineWithLine;
2697
- var $com = _.com || (_.com = {});
2698
- var $com$d10ng = $com.d10ng || ($com.d10ng = {});
2699
- var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
2700
- var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
2701
2680
  $com$d10ng$common$coordinate.CoordinateSystemType = CoordinateSystemType;
2702
2681
  $com$d10ng$common$coordinate.CoordinateSystemType.values = values_0;
2703
2682
  $com$d10ng$common$coordinate.CoordinateSystemType.valueOf = valueOf_0;
2704
- defineProp($com$d10ng$common$coordinate.CoordinateSystemType, 'WGS84', CoordinateSystemType_WGS84_getInstance, VOID);
2705
- defineProp($com$d10ng$common$coordinate.CoordinateSystemType, 'GCJ02', CoordinateSystemType_GCJ02_getInstance, VOID);
2706
- defineProp($com$d10ng$common$coordinate.CoordinateSystemType, 'BD09', CoordinateSystemType_BD09_getInstance, VOID);
2683
+ defineProp($com$d10ng$common$coordinate.CoordinateSystemType, 'WGS84', CoordinateSystemType_WGS84_getInstance);
2684
+ defineProp($com$d10ng$common$coordinate.CoordinateSystemType, 'GCJ02', CoordinateSystemType_GCJ02_getInstance);
2685
+ defineProp($com$d10ng$common$coordinate.CoordinateSystemType, 'BD09', CoordinateSystemType_BD09_getInstance);
2707
2686
  var $com = _.com || (_.com = {});
2708
2687
  var $com$d10ng = $com.d10ng || ($com.d10ng = {});
2709
2688
  var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
@@ -2738,6 +2717,27 @@
2738
2717
  var $com = _.com || (_.com = {});
2739
2718
  var $com$d10ng = $com.d10ng || ($com.d10ng = {});
2740
2719
  var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
2720
+ var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
2721
+ $com$d10ng$common$coordinate.getDistanceAndBearing = getDistanceAndBearing;
2722
+ $com$d10ng$common$coordinate.getDistanceOn2Points = getDistanceOn2Points;
2723
+ $com$d10ng$common$coordinate.toRadians = toRadians;
2724
+ $com$d10ng$common$coordinate.toDegrees = toDegrees;
2725
+ $com$d10ng$common$coordinate.isPointInCircle = isPointInCircle;
2726
+ $com$d10ng$common$coordinate.getAngleOn2Points = getAngleOn2Points;
2727
+ $com$d10ng$common$coordinate.getPointOn2Points = getPointOn2Points;
2728
+ $com$d10ng$common$coordinate.getTotalDistance = getTotalDistance;
2729
+ $com$d10ng$common$coordinate.getPointsOnDistance = getPointsOnDistance;
2730
+ $com$d10ng$common$coordinate.compressTrack = compressTrack;
2731
+ $com$d10ng$common$coordinate.getPointByBasePoint = getPointByBasePoint;
2732
+ $com$d10ng$common$coordinate.getRandomPoint = getRandomPoint;
2733
+ $com$d10ng$common$coordinate.getNearPartsOnLine = getNearPartsOnLine;
2734
+ $com$d10ng$common$coordinate.getProjectionPointOnLinePart = getProjectionPointOnLinePart;
2735
+ $com$d10ng$common$coordinate.getProjectionPointOnLine = getProjectionPointOnLine;
2736
+ $com$d10ng$common$coordinate.getProjectionLineOnLineWithPoint = getProjectionLineOnLineWithPoint;
2737
+ $com$d10ng$common$coordinate.getProjectionLineOnLineWithLine = getProjectionLineOnLineWithLine;
2738
+ var $com = _.com || (_.com = {});
2739
+ var $com$d10ng = $com.d10ng || ($com.d10ng = {});
2740
+ var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
2741
2741
  var $com$d10ng$common$transform = $com$d10ng$common.transform || ($com$d10ng$common.transform = {});
2742
2742
  $com$d10ng$common$transform.encodeGBK = encodeGBK;
2743
2743
  $com$d10ng$common$transform.decodeGBK = decodeGBK;
@@ -2749,8 +2749,8 @@
2749
2749
  $com$d10ng$common$transform.decodeUnicodeString = decodeUnicodeString;
2750
2750
  $com$d10ng$common$transform.encodeASCII = encodeASCII;
2751
2751
  $com$d10ng$common$transform.encodeASCIIString = encodeASCIIString;
2752
- $com$d10ng$common$transform.decodeASCIIString = decodeASCIIString;
2753
2752
  $com$d10ng$common$transform.decodeASCII = decodeASCII;
2753
+ $com$d10ng$common$transform.decodeASCIIString = decodeASCIIString;
2754
2754
  var $com = _.com || (_.com = {});
2755
2755
  var $com$d10ng = $com.d10ng || ($com.d10ng = {});
2756
2756
  var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});