@glandais/vcyclist-engine 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/kotlin-kotlin-stdlib.js +74 -74
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/package.json +1 -2
- package/vcyclist-engine.d.ts +5 -0
- package/vcyclist-engine.js +441 -235
- package/vcyclist-engine.js.map +1 -1
- package/xmlutil-core.js +5 -5
- package/Kotlin-DateTime-library-kotlinx-datetime.js +0 -15
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +0 -1
package/README.md
CHANGED
|
@@ -148,6 +148,19 @@ On Node.js / Bun, tile decoding uses [`@jsquash/webp`](https://www.npmjs.com/pac
|
|
|
148
148
|
Node ≥ 18 (`globalThis.fetch` is built-in since Node 18 / Bun) ; Node 22+ recommended for
|
|
149
149
|
ESM `require()` support.
|
|
150
150
|
|
|
151
|
+
## Try the interactive demo
|
|
152
|
+
|
|
153
|
+
The [`demo/`](demo/) module is a Vue 3 + Vite frontend that exercises the
|
|
154
|
+
Kotlin/JS engine end-to-end in a browser (GPX upload, configurable cyclist /
|
|
155
|
+
bike / wind / power, chart + map, hover sync).
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
./gradlew :demo:assemble
|
|
159
|
+
python -m http.server -d demo/dist 8000 # or any static file server
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
See [`demo/README.md`](demo/README.md) for the dev workflow and architecture.
|
|
163
|
+
|
|
151
164
|
## Build & test
|
|
152
165
|
|
|
153
166
|
```bash
|
package/kotlin-kotlin-stdlib.js
CHANGED
|
@@ -115,16 +115,16 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
115
115
|
initMetadataForClass(AbstractMutableList, 'AbstractMutableList', VOID, AbstractMutableCollection, [Collection, KtList]);
|
|
116
116
|
initMetadataForClass(AbstractMap, 'AbstractMap', VOID, VOID, [KtMap]);
|
|
117
117
|
initMetadataForClass(AbstractMutableMap, 'AbstractMutableMap', VOID, AbstractMap, [KtMap]);
|
|
118
|
-
initMetadataForClass(AbstractMutableSet, 'AbstractMutableSet', VOID, AbstractMutableCollection, [
|
|
118
|
+
initMetadataForClass(AbstractMutableSet, 'AbstractMutableSet', VOID, AbstractMutableCollection, [Collection, KtSet]);
|
|
119
119
|
initMetadataForCompanion(Companion_2);
|
|
120
120
|
initMetadataForClass(ArrayList, 'ArrayList', ArrayList_init_$Create$, AbstractMutableList, [Collection, KtList]);
|
|
121
121
|
initMetadataForClass(HashMap, 'HashMap', HashMap_init_$Create$, AbstractMutableMap, [KtMap]);
|
|
122
|
-
initMetadataForClass(HashMapKeys, 'HashMapKeys', VOID, AbstractMutableSet, [
|
|
123
|
-
initMetadataForClass(HashMapEntrySetBase, 'HashMapEntrySetBase', VOID, AbstractMutableSet, [
|
|
122
|
+
initMetadataForClass(HashMapKeys, 'HashMapKeys', VOID, AbstractMutableSet, [Collection, KtSet]);
|
|
123
|
+
initMetadataForClass(HashMapEntrySetBase, 'HashMapEntrySetBase', VOID, AbstractMutableSet, [Collection, KtSet]);
|
|
124
124
|
initMetadataForClass(HashMapEntrySet, 'HashMapEntrySet', VOID, HashMapEntrySetBase);
|
|
125
125
|
initMetadataForClass(HashMapKeysDefault$iterator$1);
|
|
126
126
|
initMetadataForClass(HashMapKeysDefault, 'HashMapKeysDefault', VOID, AbstractMutableSet);
|
|
127
|
-
initMetadataForClass(HashSet, 'HashSet', HashSet_init_$Create$, AbstractMutableSet, [
|
|
127
|
+
initMetadataForClass(HashSet, 'HashSet', HashSet_init_$Create$, AbstractMutableSet, [Collection, KtSet]);
|
|
128
128
|
initMetadataForCompanion(Companion_3);
|
|
129
129
|
initMetadataForClass(Itr, 'Itr');
|
|
130
130
|
initMetadataForClass(KeysItr, 'KeysItr', VOID, Itr);
|
|
@@ -168,7 +168,7 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
168
168
|
initMetadataForInterface(InternalMap, 'InternalMap');
|
|
169
169
|
initMetadataForClass(InternalHashMap, 'InternalHashMap', InternalHashMap_init_$Create$, VOID, [InternalMap]);
|
|
170
170
|
initMetadataForClass(LinkedHashMap, 'LinkedHashMap', LinkedHashMap_init_$Create$, HashMap, [KtMap]);
|
|
171
|
-
initMetadataForClass(LinkedHashSet, 'LinkedHashSet', LinkedHashSet_init_$Create$, HashSet, [
|
|
171
|
+
initMetadataForClass(LinkedHashSet, 'LinkedHashSet', LinkedHashSet_init_$Create$, HashSet, [Collection, KtSet]);
|
|
172
172
|
initMetadataForInterface(Continuation, 'Continuation');
|
|
173
173
|
initMetadataForClass(InterceptedCoroutine, 'InterceptedCoroutine', VOID, VOID, [Continuation]);
|
|
174
174
|
initMetadataForClass(CoroutineImpl, 'CoroutineImpl', VOID, InterceptedCoroutine, [Continuation]);
|
|
@@ -180,8 +180,8 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
180
180
|
initMetadataForClass(NoSuchElementException, 'NoSuchElementException', NoSuchElementException_init_$Create$, RuntimeException);
|
|
181
181
|
initMetadataForClass(IndexOutOfBoundsException, 'IndexOutOfBoundsException', IndexOutOfBoundsException_init_$Create$, RuntimeException);
|
|
182
182
|
initMetadataForClass(Error_0, 'Error', Error_init_$Create$, Error);
|
|
183
|
-
initMetadataForClass(ArithmeticException, 'ArithmeticException', ArithmeticException_init_$Create$, RuntimeException);
|
|
184
183
|
initMetadataForClass(ConcurrentModificationException, 'ConcurrentModificationException', ConcurrentModificationException_init_$Create$, RuntimeException);
|
|
184
|
+
initMetadataForClass(ArithmeticException, 'ArithmeticException', ArithmeticException_init_$Create$, RuntimeException);
|
|
185
185
|
initMetadataForClass(NumberFormatException, 'NumberFormatException', NumberFormatException_init_$Create$, IllegalArgumentException);
|
|
186
186
|
initMetadataForClass(UninitializedPropertyAccessException, 'UninitializedPropertyAccessException', UninitializedPropertyAccessException_init_$Create$, RuntimeException);
|
|
187
187
|
initMetadataForClass(NoWhenBranchMatchedException, 'NoWhenBranchMatchedException', NoWhenBranchMatchedException_init_$Create$, RuntimeException);
|
|
@@ -436,16 +436,6 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
436
436
|
}
|
|
437
437
|
return -1;
|
|
438
438
|
}
|
|
439
|
-
function toCollection(_this__u8e3s4, destination) {
|
|
440
|
-
var inductionVariable = 0;
|
|
441
|
-
var last = _this__u8e3s4.length;
|
|
442
|
-
while (inductionVariable < last) {
|
|
443
|
-
var item = _this__u8e3s4[inductionVariable];
|
|
444
|
-
inductionVariable = inductionVariable + 1 | 0;
|
|
445
|
-
destination.h(item);
|
|
446
|
-
}
|
|
447
|
-
return destination;
|
|
448
|
-
}
|
|
449
439
|
function single(_this__u8e3s4) {
|
|
450
440
|
var tmp;
|
|
451
441
|
switch (_this__u8e3s4.length) {
|
|
@@ -459,6 +449,16 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
459
449
|
}
|
|
460
450
|
return tmp;
|
|
461
451
|
}
|
|
452
|
+
function toCollection(_this__u8e3s4, destination) {
|
|
453
|
+
var inductionVariable = 0;
|
|
454
|
+
var last = _this__u8e3s4.length;
|
|
455
|
+
while (inductionVariable < last) {
|
|
456
|
+
var item = _this__u8e3s4[inductionVariable];
|
|
457
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
458
|
+
destination.h(item);
|
|
459
|
+
}
|
|
460
|
+
return destination;
|
|
461
|
+
}
|
|
462
462
|
function getOrNull(_this__u8e3s4, index) {
|
|
463
463
|
return (0 <= index ? index <= (_this__u8e3s4.length - 1 | 0) : false) ? _this__u8e3s4[index] : null;
|
|
464
464
|
}
|
|
@@ -526,9 +526,6 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
526
526
|
function firstOrNull(_this__u8e3s4) {
|
|
527
527
|
return _this__u8e3s4.n() ? null : _this__u8e3s4.m(0);
|
|
528
528
|
}
|
|
529
|
-
function toMutableList(_this__u8e3s4) {
|
|
530
|
-
return ArrayList_init_$Create$_1(_this__u8e3s4);
|
|
531
|
-
}
|
|
532
529
|
function sorted(_this__u8e3s4) {
|
|
533
530
|
if (isInterface(_this__u8e3s4, Collection)) {
|
|
534
531
|
if (_this__u8e3s4.l() <= 1)
|
|
@@ -545,6 +542,9 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
545
542
|
sort_0(this_1);
|
|
546
543
|
return this_1;
|
|
547
544
|
}
|
|
545
|
+
function toMutableList(_this__u8e3s4) {
|
|
546
|
+
return ArrayList_init_$Create$_1(_this__u8e3s4);
|
|
547
|
+
}
|
|
548
548
|
function toMutableList_0(_this__u8e3s4) {
|
|
549
549
|
if (isInterface(_this__u8e3s4, Collection))
|
|
550
550
|
return toMutableList(_this__u8e3s4);
|
|
@@ -3675,29 +3675,6 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
3675
3675
|
function Error_0() {
|
|
3676
3676
|
captureStack(this, Error_0);
|
|
3677
3677
|
}
|
|
3678
|
-
function ArithmeticException_init_$Init$($this) {
|
|
3679
|
-
RuntimeException_init_$Init$($this);
|
|
3680
|
-
ArithmeticException.call($this);
|
|
3681
|
-
return $this;
|
|
3682
|
-
}
|
|
3683
|
-
function ArithmeticException_init_$Create$() {
|
|
3684
|
-
var tmp = ArithmeticException_init_$Init$(objectCreate(protoOf(ArithmeticException)));
|
|
3685
|
-
captureStack(tmp, ArithmeticException_init_$Create$);
|
|
3686
|
-
return tmp;
|
|
3687
|
-
}
|
|
3688
|
-
function ArithmeticException_init_$Init$_0(message, $this) {
|
|
3689
|
-
RuntimeException_init_$Init$_0(message, $this);
|
|
3690
|
-
ArithmeticException.call($this);
|
|
3691
|
-
return $this;
|
|
3692
|
-
}
|
|
3693
|
-
function ArithmeticException_init_$Create$_0(message) {
|
|
3694
|
-
var tmp = ArithmeticException_init_$Init$_0(message, objectCreate(protoOf(ArithmeticException)));
|
|
3695
|
-
captureStack(tmp, ArithmeticException_init_$Create$_0);
|
|
3696
|
-
return tmp;
|
|
3697
|
-
}
|
|
3698
|
-
function ArithmeticException() {
|
|
3699
|
-
captureStack(this, ArithmeticException);
|
|
3700
|
-
}
|
|
3701
3678
|
function ConcurrentModificationException_init_$Init$($this) {
|
|
3702
3679
|
RuntimeException_init_$Init$($this);
|
|
3703
3680
|
ConcurrentModificationException.call($this);
|
|
@@ -3721,6 +3698,29 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
3721
3698
|
function ConcurrentModificationException() {
|
|
3722
3699
|
captureStack(this, ConcurrentModificationException);
|
|
3723
3700
|
}
|
|
3701
|
+
function ArithmeticException_init_$Init$($this) {
|
|
3702
|
+
RuntimeException_init_$Init$($this);
|
|
3703
|
+
ArithmeticException.call($this);
|
|
3704
|
+
return $this;
|
|
3705
|
+
}
|
|
3706
|
+
function ArithmeticException_init_$Create$() {
|
|
3707
|
+
var tmp = ArithmeticException_init_$Init$(objectCreate(protoOf(ArithmeticException)));
|
|
3708
|
+
captureStack(tmp, ArithmeticException_init_$Create$);
|
|
3709
|
+
return tmp;
|
|
3710
|
+
}
|
|
3711
|
+
function ArithmeticException_init_$Init$_0(message, $this) {
|
|
3712
|
+
RuntimeException_init_$Init$_0(message, $this);
|
|
3713
|
+
ArithmeticException.call($this);
|
|
3714
|
+
return $this;
|
|
3715
|
+
}
|
|
3716
|
+
function ArithmeticException_init_$Create$_0(message) {
|
|
3717
|
+
var tmp = ArithmeticException_init_$Init$_0(message, objectCreate(protoOf(ArithmeticException)));
|
|
3718
|
+
captureStack(tmp, ArithmeticException_init_$Create$_0);
|
|
3719
|
+
return tmp;
|
|
3720
|
+
}
|
|
3721
|
+
function ArithmeticException() {
|
|
3722
|
+
captureStack(this, ArithmeticException);
|
|
3723
|
+
}
|
|
3724
3724
|
function NumberFormatException_init_$Init$($this) {
|
|
3725
3725
|
IllegalArgumentException_init_$Init$($this);
|
|
3726
3726
|
NumberFormatException.call($this);
|
|
@@ -3857,9 +3857,6 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
3857
3857
|
}
|
|
3858
3858
|
return tmp;
|
|
3859
3859
|
}
|
|
3860
|
-
function abs_0(n) {
|
|
3861
|
-
return n < 0 ? -n | 0 | 0 : n;
|
|
3862
|
-
}
|
|
3863
3860
|
function roundToInt(_this__u8e3s4) {
|
|
3864
3861
|
var tmp;
|
|
3865
3862
|
if (isNaN_0(_this__u8e3s4)) {
|
|
@@ -3873,6 +3870,9 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
3873
3870
|
}
|
|
3874
3871
|
return tmp;
|
|
3875
3872
|
}
|
|
3873
|
+
function abs_0(n) {
|
|
3874
|
+
return n < 0 ? -n | 0 | 0 : n;
|
|
3875
|
+
}
|
|
3876
3876
|
function get_INV_2_26() {
|
|
3877
3877
|
_init_properties_PlatformRandom_kt__6kjv62();
|
|
3878
3878
|
return INV_2_26;
|
|
@@ -5556,18 +5556,6 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
5556
5556
|
function get_lastIndex_0(_this__u8e3s4) {
|
|
5557
5557
|
return _this__u8e3s4.l() - 1 | 0;
|
|
5558
5558
|
}
|
|
5559
|
-
function mutableListOf(elements) {
|
|
5560
|
-
var tmp;
|
|
5561
|
-
if (elements.length === 0) {
|
|
5562
|
-
tmp = ArrayList_init_$Create$();
|
|
5563
|
-
} else {
|
|
5564
|
-
// Inline function 'kotlin.collections.asArrayList' call
|
|
5565
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
5566
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
5567
|
-
tmp = new ArrayList(elements);
|
|
5568
|
-
}
|
|
5569
|
-
return tmp;
|
|
5570
|
-
}
|
|
5571
5559
|
function EmptyList() {
|
|
5572
5560
|
EmptyList_instance = this;
|
|
5573
5561
|
this.n9_1 = new Long(-1478467534, -1720727600);
|
|
@@ -5630,6 +5618,18 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
5630
5618
|
function throwIndexOverflow() {
|
|
5631
5619
|
throw ArithmeticException_init_$Create$_0('Index overflow has happened.');
|
|
5632
5620
|
}
|
|
5621
|
+
function mutableListOf(elements) {
|
|
5622
|
+
var tmp;
|
|
5623
|
+
if (elements.length === 0) {
|
|
5624
|
+
tmp = ArrayList_init_$Create$();
|
|
5625
|
+
} else {
|
|
5626
|
+
// Inline function 'kotlin.collections.asArrayList' call
|
|
5627
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
5628
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
5629
|
+
tmp = new ArrayList(elements);
|
|
5630
|
+
}
|
|
5631
|
+
return tmp;
|
|
5632
|
+
}
|
|
5633
5633
|
function collectionSizeOrDefault(_this__u8e3s4, default_0) {
|
|
5634
5634
|
var tmp;
|
|
5635
5635
|
if (isInterface(_this__u8e3s4, Collection)) {
|
|
@@ -6280,9 +6280,6 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
6280
6280
|
function numberFormatError(input) {
|
|
6281
6281
|
throw NumberFormatException_init_$Create$_0("Invalid number format: '" + input + "'");
|
|
6282
6282
|
}
|
|
6283
|
-
function get_lastIndex_1(_this__u8e3s4) {
|
|
6284
|
-
return charSequenceLength(_this__u8e3s4) - 1 | 0;
|
|
6285
|
-
}
|
|
6286
6283
|
function indexOf_0(_this__u8e3s4, char, startIndex, ignoreCase) {
|
|
6287
6284
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
6288
6285
|
ignoreCase = ignoreCase === VOID ? false : ignoreCase;
|
|
@@ -6346,20 +6343,8 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
6346
6343
|
// Inline function 'kotlin.sequences.Sequence' call
|
|
6347
6344
|
return new lineSequence$$inlined$Sequence$1(_this__u8e3s4);
|
|
6348
6345
|
}
|
|
6349
|
-
function
|
|
6350
|
-
|
|
6351
|
-
return false;
|
|
6352
|
-
}
|
|
6353
|
-
var inductionVariable = 0;
|
|
6354
|
-
if (inductionVariable < length)
|
|
6355
|
-
do {
|
|
6356
|
-
var index = inductionVariable;
|
|
6357
|
-
inductionVariable = inductionVariable + 1 | 0;
|
|
6358
|
-
if (!equals_0(charSequenceGet(_this__u8e3s4, thisOffset + index | 0), charSequenceGet(other, otherOffset + index | 0), ignoreCase))
|
|
6359
|
-
return false;
|
|
6360
|
-
}
|
|
6361
|
-
while (inductionVariable < length);
|
|
6362
|
-
return true;
|
|
6346
|
+
function get_lastIndex_1(_this__u8e3s4) {
|
|
6347
|
+
return charSequenceLength(_this__u8e3s4) - 1 | 0;
|
|
6363
6348
|
}
|
|
6364
6349
|
function trim(_this__u8e3s4) {
|
|
6365
6350
|
// Inline function 'kotlin.text.trim' call
|
|
@@ -6522,6 +6507,21 @@ if (typeof Math.hypot === 'undefined') {
|
|
|
6522
6507
|
var this_0 = this.ab_1;
|
|
6523
6508
|
return toString_1(charSequenceSubSequence(this_0, firstIndex, lastIndex));
|
|
6524
6509
|
};
|
|
6510
|
+
function regionMatchesImpl(_this__u8e3s4, thisOffset, other, otherOffset, length, ignoreCase) {
|
|
6511
|
+
if (otherOffset < 0 || thisOffset < 0 || thisOffset > (charSequenceLength(_this__u8e3s4) - length | 0) || otherOffset > (charSequenceLength(other) - length | 0)) {
|
|
6512
|
+
return false;
|
|
6513
|
+
}
|
|
6514
|
+
var inductionVariable = 0;
|
|
6515
|
+
if (inductionVariable < length)
|
|
6516
|
+
do {
|
|
6517
|
+
var index = inductionVariable;
|
|
6518
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
6519
|
+
if (!equals_0(charSequenceGet(_this__u8e3s4, thisOffset + index | 0), charSequenceGet(other, otherOffset + index | 0), ignoreCase))
|
|
6520
|
+
return false;
|
|
6521
|
+
}
|
|
6522
|
+
while (inductionVariable < length);
|
|
6523
|
+
return true;
|
|
6524
|
+
}
|
|
6525
6525
|
function lineSequence$$inlined$Sequence$1($this_lineSequence) {
|
|
6526
6526
|
this.fb_1 = $this_lineSequence;
|
|
6527
6527
|
}
|