jww-parser 2025.12.12 → 2026.1.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/dist/index.cjs +426 -281
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +426 -281
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1002,8 +1002,8 @@ const moonbitlang$core$builtin$$wasm_helper_cache = {
|
|
|
1002
1002
|
};
|
|
1003
1003
|
const moonbitlang$core$builtin$$output$46$42$bind$124$8198 = "/";
|
|
1004
1004
|
const moonbitlang$core$builtin$$output$46$42$bind$124$8192 = "/";
|
|
1005
|
-
const moonbitlang$core$builtin$$boyer_moore_horspool_find$46$constr$47$
|
|
1006
|
-
const moonbitlang$core$builtin$$brute_force_find$46$constr$47$
|
|
1005
|
+
const moonbitlang$core$builtin$$boyer_moore_horspool_find$46$constr$47$65 = 0;
|
|
1006
|
+
const moonbitlang$core$builtin$$brute_force_find$46$constr$47$79 = 0;
|
|
1007
1007
|
const moonbitlang$core$double$internal$ryu$$gDOUBLE_POW5_INV_SPLIT2 = [
|
|
1008
1008
|
$1L,
|
|
1009
1009
|
$2305843009213693952L,
|
|
@@ -1136,7 +1136,7 @@ const moonbitlang$core$double$internal$ryu$$gDOUBLE_POW5_TABLE = [
|
|
|
1136
1136
|
$59604644775390625L,
|
|
1137
1137
|
$298023223876953125L
|
|
1138
1138
|
];
|
|
1139
|
-
const moonbitlang$core$double$internal$ryu$$ryu_to_string$46$record$47$
|
|
1139
|
+
const moonbitlang$core$double$internal$ryu$$ryu_to_string$46$record$47$864 = {
|
|
1140
1140
|
mantissa: $0L,
|
|
1141
1141
|
exponent: 0
|
|
1142
1142
|
};
|
|
@@ -1473,71 +1473,91 @@ const moonbitlang$core$strconv$$table = [
|
|
|
1473
1473
|
];
|
|
1474
1474
|
const moonbitlang$core$strconv$$max_exponent_disguised_fast_path = $37L;
|
|
1475
1475
|
const moonbitlang$core$strconv$$min_exponent_fast_path = $_22L;
|
|
1476
|
-
const moonbitlang$core$strconv$$checked_mul$46$constr$47$
|
|
1477
|
-
const f4ah6o$jww_parser$core$$
|
|
1478
|
-
const f4ah6o$jww_parser$core$$
|
|
1476
|
+
const moonbitlang$core$strconv$$checked_mul$46$constr$47$1337 = $0L;
|
|
1477
|
+
const f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$940 = "Printer_";
|
|
1478
|
+
const f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$941 = "Draw_";
|
|
1479
|
+
const f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$942 = "View_";
|
|
1480
|
+
const f4ah6o$jww_parser$core$$normalize_image_path$46$42$bind$124$945 = "%temp%";
|
|
1481
|
+
const f4ah6o$jww_parser$core$$default$46$record$47$1387 = {
|
|
1479
1482
|
state: 2,
|
|
1480
1483
|
protect: 0,
|
|
1481
1484
|
name: ""
|
|
1482
1485
|
};
|
|
1483
|
-
const f4ah6o$jww_parser$core$$default$46$record$47$
|
|
1486
|
+
const f4ah6o$jww_parser$core$$default$46$record$47$1391 = {
|
|
1487
|
+
printer_paper_size: "",
|
|
1488
|
+
draw_bmp_touka: "",
|
|
1489
|
+
view_direct2d: "",
|
|
1490
|
+
printer_bmp_zentai: "",
|
|
1491
|
+
printer_orientation: "",
|
|
1492
|
+
printer_d2d_bmp: ""
|
|
1493
|
+
};
|
|
1494
|
+
const f4ah6o$jww_parser$core$$default$46$record$47$1392 = {
|
|
1495
|
+
sunpou1: 0,
|
|
1496
|
+
sunpou2: 0,
|
|
1497
|
+
sunpou3: 0,
|
|
1498
|
+
sunpou4: 0,
|
|
1499
|
+
sunpou5: 0,
|
|
1500
|
+
dummy: 0,
|
|
1501
|
+
max_line_width: 0
|
|
1502
|
+
};
|
|
1503
|
+
const f4ah6o$jww_parser$core$$default$46$record$47$1393 = {
|
|
1484
1504
|
origin_x: 0,
|
|
1485
1505
|
origin_y: 0,
|
|
1486
1506
|
scale: 1,
|
|
1487
1507
|
rotation_setting: 0
|
|
1488
1508
|
};
|
|
1489
|
-
const f4ah6o$jww_parser$core$$parse$46$constr$47$
|
|
1490
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1509
|
+
const f4ah6o$jww_parser$core$$parse$46$constr$47$1778 = 8;
|
|
1510
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1820 = {
|
|
1491
1511
|
_0: "CONTINUOUS",
|
|
1492
1512
|
_1: "Solid line",
|
|
1493
1513
|
_2: ""
|
|
1494
1514
|
};
|
|
1495
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1515
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1821 = {
|
|
1496
1516
|
_0: "DASHED",
|
|
1497
1517
|
_1: "Dashed",
|
|
1498
1518
|
_2: ""
|
|
1499
1519
|
};
|
|
1500
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1520
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1822 = {
|
|
1501
1521
|
_0: "DOTTED",
|
|
1502
1522
|
_1: "Dotted",
|
|
1503
1523
|
_2: ""
|
|
1504
1524
|
};
|
|
1505
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1525
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1823 = {
|
|
1506
1526
|
_0: "DASHDOT",
|
|
1507
1527
|
_1: "Dash dot",
|
|
1508
1528
|
_2: ""
|
|
1509
1529
|
};
|
|
1510
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1530
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1824 = {
|
|
1511
1531
|
_0: "DOT2",
|
|
1512
1532
|
_1: "Dot (small)",
|
|
1513
1533
|
_2: ""
|
|
1514
1534
|
};
|
|
1515
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1535
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1825 = {
|
|
1516
1536
|
_0: "DASHDOT2",
|
|
1517
1537
|
_1: "Dash dot (small)",
|
|
1518
1538
|
_2: ""
|
|
1519
1539
|
};
|
|
1520
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1540
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1826 = {
|
|
1521
1541
|
_0: "DASHDOTDOT",
|
|
1522
1542
|
_1: "Dash dot dot",
|
|
1523
1543
|
_2: ""
|
|
1524
1544
|
};
|
|
1525
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1545
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1827 = {
|
|
1526
1546
|
_0: "DIVIDE",
|
|
1527
1547
|
_1: "Divide",
|
|
1528
1548
|
_2: ""
|
|
1529
1549
|
};
|
|
1530
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1550
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1828 = {
|
|
1531
1551
|
_0: "CENTER",
|
|
1532
1552
|
_1: "Center",
|
|
1533
1553
|
_2: ""
|
|
1534
1554
|
};
|
|
1535
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1555
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1829 = {
|
|
1536
1556
|
_0: "BORDER",
|
|
1537
1557
|
_1: "Border",
|
|
1538
1558
|
_2: ""
|
|
1539
1559
|
};
|
|
1540
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1560
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1830 = {
|
|
1541
1561
|
_0: "HIDDEN",
|
|
1542
1562
|
_1: "Hidden",
|
|
1543
1563
|
_2: ""
|
|
@@ -1625,21 +1645,28 @@ function moonbitlang$core$array$$Array$at$13$(self, index) {
|
|
|
1625
1645
|
return self[index];
|
|
1626
1646
|
} else return $panic();
|
|
1627
1647
|
}
|
|
1628
|
-
function moonbitlang$core$array$$Array$at$
|
|
1648
|
+
function moonbitlang$core$array$$Array$at$14$(self, index) {
|
|
1629
1649
|
const len = self.length;
|
|
1630
1650
|
if (index >= 0 && index < len) {
|
|
1631
1651
|
$bound_check(self, index);
|
|
1632
1652
|
return self[index];
|
|
1633
1653
|
} else return $panic();
|
|
1634
1654
|
}
|
|
1635
|
-
function moonbitlang$core$array$$Array$at$
|
|
1655
|
+
function moonbitlang$core$array$$Array$at$15$(self, index) {
|
|
1636
1656
|
const len = self.length;
|
|
1637
1657
|
if (index >= 0 && index < len) {
|
|
1638
1658
|
$bound_check(self, index);
|
|
1639
1659
|
return self[index];
|
|
1640
1660
|
} else return $panic();
|
|
1641
1661
|
}
|
|
1642
|
-
function moonbitlang$core$array$$Array$at$
|
|
1662
|
+
function moonbitlang$core$array$$Array$at$4$(self, index) {
|
|
1663
|
+
const len = self.length;
|
|
1664
|
+
if (index >= 0 && index < len) {
|
|
1665
|
+
$bound_check(self, index);
|
|
1666
|
+
return self[index];
|
|
1667
|
+
} else return $panic();
|
|
1668
|
+
}
|
|
1669
|
+
function moonbitlang$core$array$$Array$at$16$(self, index) {
|
|
1643
1670
|
const len = self.length;
|
|
1644
1671
|
if (index >= 0 && index < len) {
|
|
1645
1672
|
$bound_check(self, index);
|
|
@@ -1696,7 +1723,7 @@ function moonbitlang$core$builtin$$boyer_moore_horspool_find(haystack, needle) {
|
|
|
1696
1723
|
}
|
|
1697
1724
|
return;
|
|
1698
1725
|
} else return;
|
|
1699
|
-
else return moonbitlang$core$builtin$$boyer_moore_horspool_find$46$constr$47$
|
|
1726
|
+
else return moonbitlang$core$builtin$$boyer_moore_horspool_find$46$constr$47$65;
|
|
1700
1727
|
}
|
|
1701
1728
|
function moonbitlang$core$builtin$$brute_force_find(haystack, needle) {
|
|
1702
1729
|
const haystack_len = haystack.end - haystack.start | 0;
|
|
@@ -1744,7 +1771,7 @@ function moonbitlang$core$builtin$$brute_force_find(haystack, needle) {
|
|
|
1744
1771
|
} else break;
|
|
1745
1772
|
return;
|
|
1746
1773
|
} else return;
|
|
1747
|
-
else return moonbitlang$core$builtin$$brute_force_find$46$constr$47$
|
|
1774
|
+
else return moonbitlang$core$builtin$$brute_force_find$46$constr$47$79;
|
|
1748
1775
|
}
|
|
1749
1776
|
function moonbitlang$core$string$$StringView$find(self, str) {
|
|
1750
1777
|
return (str.end - str.start | 0) <= 4 ? moonbitlang$core$builtin$$brute_force_find(self, str) : moonbitlang$core$builtin$$boyer_moore_horspool_find(self, str);
|
|
@@ -1968,31 +1995,31 @@ function moonbitlang$core$builtin$$MyInt64$from_int(value) {
|
|
|
1968
1995
|
function moonbitlang$core$int$$Int$to_int64(self) {
|
|
1969
1996
|
return moonbitlang$core$builtin$$MyInt64$from_int(self);
|
|
1970
1997
|
}
|
|
1971
|
-
function moonbitlang$core$builtin$$Compare$op_lt$
|
|
1998
|
+
function moonbitlang$core$builtin$$Compare$op_lt$17$(x, y) {
|
|
1972
1999
|
return $compare_int(x, y) < 0;
|
|
1973
2000
|
}
|
|
1974
|
-
function moonbitlang$core$builtin$$Compare$op_lt$
|
|
2001
|
+
function moonbitlang$core$builtin$$Compare$op_lt$18$(x, y) {
|
|
1975
2002
|
return moonbitlang$core$builtin$$Compare$compare$2$(x, y) < 0;
|
|
1976
2003
|
}
|
|
1977
|
-
function moonbitlang$core$builtin$$Compare$op_lt$
|
|
1978
|
-
return moonbitlang$core$builtin$$Compare$compare$
|
|
2004
|
+
function moonbitlang$core$builtin$$Compare$op_lt$19$(x, y) {
|
|
2005
|
+
return moonbitlang$core$builtin$$Compare$compare$20$(x, y) < 0;
|
|
1979
2006
|
}
|
|
1980
|
-
function moonbitlang$core$builtin$$Compare$op_gt$
|
|
2007
|
+
function moonbitlang$core$builtin$$Compare$op_gt$18$(x, y) {
|
|
1981
2008
|
return moonbitlang$core$builtin$$Compare$compare$2$(x, y) > 0;
|
|
1982
2009
|
}
|
|
1983
|
-
function moonbitlang$core$builtin$$Compare$op_gt$
|
|
1984
|
-
return moonbitlang$core$builtin$$Compare$compare$
|
|
2010
|
+
function moonbitlang$core$builtin$$Compare$op_gt$19$(x, y) {
|
|
2011
|
+
return moonbitlang$core$builtin$$Compare$compare$20$(x, y) > 0;
|
|
1985
2012
|
}
|
|
1986
|
-
function moonbitlang$core$builtin$$Compare$op_le$
|
|
2013
|
+
function moonbitlang$core$builtin$$Compare$op_le$18$(x, y) {
|
|
1987
2014
|
return moonbitlang$core$builtin$$Compare$compare$2$(x, y) <= 0;
|
|
1988
2015
|
}
|
|
1989
|
-
function moonbitlang$core$builtin$$Compare$op_le$
|
|
1990
|
-
return moonbitlang$core$builtin$$Compare$compare$
|
|
2016
|
+
function moonbitlang$core$builtin$$Compare$op_le$19$(x, y) {
|
|
2017
|
+
return moonbitlang$core$builtin$$Compare$compare$20$(x, y) <= 0;
|
|
1991
2018
|
}
|
|
1992
|
-
function moonbitlang$core$builtin$$Compare$op_ge$
|
|
2019
|
+
function moonbitlang$core$builtin$$Compare$op_ge$17$(x, y) {
|
|
1993
2020
|
return $compare_int(x, y) >= 0;
|
|
1994
2021
|
}
|
|
1995
|
-
function moonbitlang$core$builtin$$Compare$op_ge$
|
|
2022
|
+
function moonbitlang$core$builtin$$Compare$op_ge$18$(x, y) {
|
|
1996
2023
|
return moonbitlang$core$builtin$$Compare$compare$2$(x, y) >= 0;
|
|
1997
2024
|
}
|
|
1998
2025
|
function moonbitlang$core$string$$String$sub$46$inner(self, start, end) {
|
|
@@ -2040,7 +2067,7 @@ function moonbitlang$core$builtin$$Logger$write_substring$1$(self, value, start,
|
|
|
2040
2067
|
}
|
|
2041
2068
|
moonbitlang$core$builtin$$Logger$write_view$0$(self, _tmp);
|
|
2042
2069
|
}
|
|
2043
|
-
function moonbitlang$core$builtin$$Show$to_string$
|
|
2070
|
+
function moonbitlang$core$builtin$$Show$to_string$21$(self) {
|
|
2044
2071
|
const logger = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
|
|
2045
2072
|
moonbitlang$core$builtin$$Show$output$8$(self, {
|
|
2046
2073
|
self: logger,
|
|
@@ -2050,13 +2077,13 @@ function moonbitlang$core$builtin$$Show$to_string$20$(self) {
|
|
|
2050
2077
|
}
|
|
2051
2078
|
function moonbitlang$core$builtin$$Show$to_string$10$(self) {
|
|
2052
2079
|
const logger = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
|
|
2053
|
-
moonbitlang$core$builtin$$Show$output$
|
|
2080
|
+
moonbitlang$core$builtin$$Show$output$22$(self, {
|
|
2054
2081
|
self: logger,
|
|
2055
2082
|
method_table: $$$64$moonbitlang$47$core$47$builtin$46$StringBuilder$36$as$36$64$moonbitlang$47$core$47$builtin$46$Logger
|
|
2056
2083
|
});
|
|
2057
2084
|
return logger.val;
|
|
2058
2085
|
}
|
|
2059
|
-
function moonbitlang$core$builtin$$Show$to_string$
|
|
2086
|
+
function moonbitlang$core$builtin$$Show$to_string$18$(self) {
|
|
2060
2087
|
const logger = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
|
|
2061
2088
|
moonbitlang$core$builtin$$Show$output$2$(self, {
|
|
2062
2089
|
self: logger,
|
|
@@ -2079,13 +2106,13 @@ function moonbitlang$core$uint16$$UInt16$to_string$46$inner(self, radix) {
|
|
|
2079
2106
|
function moonbitlang$core$builtin$$Show$to_string$6$(self) {
|
|
2080
2107
|
return self.str.substring(self.start, self.end);
|
|
2081
2108
|
}
|
|
2082
|
-
function moonbitlang$core$builtin$$Iterator$next$
|
|
2109
|
+
function moonbitlang$core$builtin$$Iterator$next$16$(self) {
|
|
2083
2110
|
return self();
|
|
2084
2111
|
}
|
|
2085
|
-
function moonbitlang$core$builtin$$Iterator$iter$
|
|
2112
|
+
function moonbitlang$core$builtin$$Iterator$iter$16$(self) {
|
|
2086
2113
|
return (yield_) => {
|
|
2087
2114
|
while (true) {
|
|
2088
|
-
const _bind = moonbitlang$core$builtin$$Iterator$next$
|
|
2115
|
+
const _bind = moonbitlang$core$builtin$$Iterator$next$16$(self);
|
|
2089
2116
|
if (_bind === -1) return 1;
|
|
2090
2117
|
else {
|
|
2091
2118
|
if (yield_(_bind) === 1) {} else return 0;
|
|
@@ -2214,10 +2241,7 @@ function moonbitlang$core$string$$String$has_prefix(self, str) {
|
|
|
2214
2241
|
function moonbitlang$core$array$$Array$new$46$inner$12$(capacity) {
|
|
2215
2242
|
return [];
|
|
2216
2243
|
}
|
|
2217
|
-
function moonbitlang$core$array$$Array$new$46$inner$
|
|
2218
|
-
return [];
|
|
2219
|
-
}
|
|
2220
|
-
function moonbitlang$core$array$$Array$new$46$inner$22$(capacity) {
|
|
2244
|
+
function moonbitlang$core$array$$Array$new$46$inner$14$(capacity) {
|
|
2221
2245
|
return [];
|
|
2222
2246
|
}
|
|
2223
2247
|
function moonbitlang$core$array$$Array$new$46$inner$23$(capacity) {
|
|
@@ -2226,10 +2250,13 @@ function moonbitlang$core$array$$Array$new$46$inner$23$(capacity) {
|
|
|
2226
2250
|
function moonbitlang$core$array$$Array$new$46$inner$24$(capacity) {
|
|
2227
2251
|
return [];
|
|
2228
2252
|
}
|
|
2229
|
-
function moonbitlang$core$array$$Array$new$46$inner$
|
|
2253
|
+
function moonbitlang$core$array$$Array$new$46$inner$25$(capacity) {
|
|
2230
2254
|
return [];
|
|
2231
2255
|
}
|
|
2232
|
-
function moonbitlang$core$array$$Array$new$46$inner$
|
|
2256
|
+
function moonbitlang$core$array$$Array$new$46$inner$15$(capacity) {
|
|
2257
|
+
return [];
|
|
2258
|
+
}
|
|
2259
|
+
function moonbitlang$core$array$$Array$new$46$inner$13$(capacity) {
|
|
2233
2260
|
return [];
|
|
2234
2261
|
}
|
|
2235
2262
|
function moonbitlang$core$array$$Array$new$46$inner$26$(capacity) {
|
|
@@ -2238,19 +2265,22 @@ function moonbitlang$core$array$$Array$new$46$inner$26$(capacity) {
|
|
|
2238
2265
|
function moonbitlang$core$array$$Array$new$46$inner$27$(capacity) {
|
|
2239
2266
|
return [];
|
|
2240
2267
|
}
|
|
2241
|
-
function moonbitlang$core$array$$Array$new$46$inner$
|
|
2268
|
+
function moonbitlang$core$array$$Array$new$46$inner$28$(capacity) {
|
|
2242
2269
|
return [];
|
|
2243
2270
|
}
|
|
2244
|
-
function moonbitlang$core$array$$Array$
|
|
2271
|
+
function moonbitlang$core$array$$Array$new$46$inner$16$(capacity) {
|
|
2272
|
+
return [];
|
|
2273
|
+
}
|
|
2274
|
+
function moonbitlang$core$array$$Array$push$14$(self, value) {
|
|
2245
2275
|
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2246
2276
|
}
|
|
2247
2277
|
function moonbitlang$core$array$$Array$push$12$(self, value) {
|
|
2248
2278
|
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2249
2279
|
}
|
|
2250
|
-
function moonbitlang$core$array$$Array$push$
|
|
2280
|
+
function moonbitlang$core$array$$Array$push$13$(self, value) {
|
|
2251
2281
|
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2252
2282
|
}
|
|
2253
|
-
function moonbitlang$core$array$$Array$push$
|
|
2283
|
+
function moonbitlang$core$array$$Array$push$15$(self, value) {
|
|
2254
2284
|
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2255
2285
|
}
|
|
2256
2286
|
function moonbitlang$core$array$$Array$push$23$(self, value) {
|
|
@@ -2268,7 +2298,10 @@ function moonbitlang$core$array$$Array$push$26$(self, value) {
|
|
|
2268
2298
|
function moonbitlang$core$array$$Array$push$27$(self, value) {
|
|
2269
2299
|
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2270
2300
|
}
|
|
2271
|
-
function moonbitlang$core$array$$Array$push$
|
|
2301
|
+
function moonbitlang$core$array$$Array$push$28$(self, value) {
|
|
2302
|
+
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2303
|
+
}
|
|
2304
|
+
function moonbitlang$core$array$$Array$push$16$(self, value) {
|
|
2272
2305
|
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2273
2306
|
}
|
|
2274
2307
|
function moonbitlang$core$string$$StringView$is_empty(self) {
|
|
@@ -2297,12 +2330,12 @@ function moonbitlang$core$string$$String$iterator(self) {
|
|
|
2297
2330
|
return _p;
|
|
2298
2331
|
}
|
|
2299
2332
|
function moonbitlang$core$string$$String$iter(self) {
|
|
2300
|
-
return moonbitlang$core$builtin$$Iterator$iter$
|
|
2333
|
+
return moonbitlang$core$builtin$$Iterator$iter$16$(moonbitlang$core$string$$String$iterator(self));
|
|
2301
2334
|
}
|
|
2302
|
-
function moonbitlang$core$builtin$$Show$to_string$
|
|
2335
|
+
function moonbitlang$core$builtin$$Show$to_string$16$(self) {
|
|
2303
2336
|
return String.fromCodePoint(self);
|
|
2304
2337
|
}
|
|
2305
|
-
function moonbitlang$core$builtin$$Iter$each$
|
|
2338
|
+
function moonbitlang$core$builtin$$Iter$each$29$(self, f) {
|
|
2306
2339
|
const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$2$ };
|
|
2307
2340
|
self((a) => {
|
|
2308
2341
|
f(a);
|
|
@@ -2323,20 +2356,20 @@ function moonbitlang$core$builtin$$Iter$each$28$(self, f) {
|
|
|
2323
2356
|
return;
|
|
2324
2357
|
}
|
|
2325
2358
|
}
|
|
2326
|
-
function moonbitlang$core$builtin$$Iter$collect$
|
|
2359
|
+
function moonbitlang$core$builtin$$Iter$collect$16$(self) {
|
|
2327
2360
|
const result = [];
|
|
2328
|
-
moonbitlang$core$builtin$$Iter$each$
|
|
2329
|
-
moonbitlang$core$array$$Array$push$
|
|
2361
|
+
moonbitlang$core$builtin$$Iter$each$29$(self, (e) => {
|
|
2362
|
+
moonbitlang$core$array$$Array$push$16$(result, e);
|
|
2330
2363
|
});
|
|
2331
2364
|
return result;
|
|
2332
2365
|
}
|
|
2333
2366
|
function moonbitlang$core$string$$String$to_array(self) {
|
|
2334
2367
|
const _p = moonbitlang$core$string$$String$iter(self);
|
|
2335
|
-
const _p$3 = { val: moonbitlang$core$array$$Array$new$46$inner$
|
|
2368
|
+
const _p$3 = { val: moonbitlang$core$array$$Array$new$46$inner$16$(self.length) };
|
|
2336
2369
|
const _p$4 = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$1$ };
|
|
2337
2370
|
_p((_p$5) => {
|
|
2338
2371
|
const _p$6 = _p$3.val;
|
|
2339
|
-
moonbitlang$core$array$$Array$push$
|
|
2372
|
+
moonbitlang$core$array$$Array$push$16$(_p$6, _p$5);
|
|
2340
2373
|
_p$3.val = _p$6;
|
|
2341
2374
|
return 1;
|
|
2342
2375
|
});
|
|
@@ -2360,7 +2393,7 @@ function moonbitlang$core$builtin$$Show$output$8$(self, logger) {
|
|
|
2360
2393
|
function moonbitlang$core$builtin$$Show$output$2$(self, logger) {
|
|
2361
2394
|
logger.method_table.method_0(logger.self, moonbitlang$core$uint64$$UInt64$to_string$46$inner(self, 10));
|
|
2362
2395
|
}
|
|
2363
|
-
function moonbitlang$core$array$$ArrayView$iterator$
|
|
2396
|
+
function moonbitlang$core$array$$ArrayView$iterator$16$(self) {
|
|
2364
2397
|
const i = { val: 0 };
|
|
2365
2398
|
const _p = () => {
|
|
2366
2399
|
if (i.val < (self.end - self.start | 0)) {
|
|
@@ -2371,8 +2404,8 @@ function moonbitlang$core$array$$ArrayView$iterator$15$(self) {
|
|
|
2371
2404
|
};
|
|
2372
2405
|
return _p;
|
|
2373
2406
|
}
|
|
2374
|
-
function moonbitlang$core$array$$ArrayView$iter$
|
|
2375
|
-
return moonbitlang$core$builtin$$Iterator$iter$
|
|
2407
|
+
function moonbitlang$core$array$$ArrayView$iter$16$(self) {
|
|
2408
|
+
return moonbitlang$core$builtin$$Iterator$iter$16$(moonbitlang$core$array$$ArrayView$iterator$16$(self));
|
|
2376
2409
|
}
|
|
2377
2410
|
function moonbitlang$core$array$$ArrayView$at$4$(self, index) {
|
|
2378
2411
|
if (index >= 0 && index < (self.end - self.start | 0)) {
|
|
@@ -2380,7 +2413,7 @@ function moonbitlang$core$array$$ArrayView$at$4$(self, index) {
|
|
|
2380
2413
|
const _tmp$2 = self.start + index | 0;
|
|
2381
2414
|
$bound_check(_tmp, _tmp$2);
|
|
2382
2415
|
return _tmp[_tmp$2];
|
|
2383
|
-
} else return moonbitlang$core$builtin$$abort$4$(`index out of bounds: the len is from 0 to ${moonbitlang$core$builtin$$Show$to_string$
|
|
2416
|
+
} else return moonbitlang$core$builtin$$abort$4$(`index out of bounds: the len is from 0 to ${moonbitlang$core$builtin$$Show$to_string$21$(self.end - self.start | 0)} but the index is ${moonbitlang$core$builtin$$Show$to_string$21$(index)}`, "@moonbitlang/core/builtin:arrayview.mbt:101:5-103:6");
|
|
2384
2417
|
}
|
|
2385
2418
|
function moonbitlang$core$builtin$$MyInt64$extend_i32_u(value) {
|
|
2386
2419
|
return {
|
|
@@ -2409,7 +2442,7 @@ function moonbitlang$core$uint64$$UInt64$to_byte(self) {
|
|
|
2409
2442
|
function moonbitlang$core$byte$$Byte$to_int64(self) {
|
|
2410
2443
|
return moonbitlang$core$int$$Int$to_int64(self);
|
|
2411
2444
|
}
|
|
2412
|
-
function moonbitlang$core$builtin$$Neg$neg$
|
|
2445
|
+
function moonbitlang$core$builtin$$Neg$neg$30$(self) {
|
|
2413
2446
|
return self.lo === 0 ? {
|
|
2414
2447
|
hi: ~self.hi + 1 | 0,
|
|
2415
2448
|
lo: 0
|
|
@@ -2431,16 +2464,16 @@ function moonbitlang$core$builtin$$MyInt64$add_hi_lo(self, bhi, blo) {
|
|
|
2431
2464
|
lo
|
|
2432
2465
|
};
|
|
2433
2466
|
}
|
|
2434
|
-
function moonbitlang$core$builtin$$Add$add$
|
|
2467
|
+
function moonbitlang$core$builtin$$Add$add$30$(self, other) {
|
|
2435
2468
|
return moonbitlang$core$builtin$$MyInt64$add_hi_lo(self, other.hi, other.lo);
|
|
2436
2469
|
}
|
|
2437
|
-
function moonbitlang$core$builtin$$Sub$sub$
|
|
2470
|
+
function moonbitlang$core$builtin$$Sub$sub$30$(self, other) {
|
|
2438
2471
|
return other.lo === 0 ? {
|
|
2439
2472
|
hi: self.hi - other.hi | 0,
|
|
2440
2473
|
lo: self.lo
|
|
2441
2474
|
} : moonbitlang$core$builtin$$MyInt64$add_hi_lo(self, ~other.hi, ~other.lo + 1 | 0);
|
|
2442
2475
|
}
|
|
2443
|
-
function moonbitlang$core$builtin$$Mul$mul$
|
|
2476
|
+
function moonbitlang$core$builtin$$Mul$mul$30$(self, other) {
|
|
2444
2477
|
const _ahi = self.hi;
|
|
2445
2478
|
const _alo = self.lo;
|
|
2446
2479
|
const _bhi = other.hi;
|
|
@@ -2483,7 +2516,7 @@ function moonbitlang$core$builtin$$try_get_int64_wasm_helper() {
|
|
|
2483
2516
|
moonbitlang$core$builtin$$wasm_helper_cache.exports = moonbitlang$core$builtin$$try_init_wasm_helper();
|
|
2484
2517
|
return !(moonbitlang$core$builtin$$wasm_helper_cache.exports === void 0);
|
|
2485
2518
|
}
|
|
2486
|
-
function moonbitlang$core$builtin$$Div$div$
|
|
2519
|
+
function moonbitlang$core$builtin$$Div$div$30$(self, other) {
|
|
2487
2520
|
if (!(other.hi === 0 && other.lo === 0)) {
|
|
2488
2521
|
if (!moonbitlang$core$builtin$$try_get_int64_wasm_helper()) return moonbitlang$core$builtin$$MyInt64$div_bigint(self, other);
|
|
2489
2522
|
const _bind = moonbitlang$core$builtin$$wasm_helper_cache.exports;
|
|
@@ -2595,39 +2628,39 @@ function moonbitlang$core$builtin$$MyInt64$asr(self, shift) {
|
|
|
2595
2628
|
lo: self.hi >> (shift$2 - 32 | 0)
|
|
2596
2629
|
};
|
|
2597
2630
|
}
|
|
2598
|
-
function moonbitlang$core$builtin$$Neg$neg$
|
|
2599
|
-
return moonbitlang$core$builtin$$Neg$neg$
|
|
2631
|
+
function moonbitlang$core$builtin$$Neg$neg$20$(self) {
|
|
2632
|
+
return moonbitlang$core$builtin$$Neg$neg$30$(self);
|
|
2600
2633
|
}
|
|
2601
|
-
function moonbitlang$core$builtin$$Add$add$
|
|
2602
|
-
return moonbitlang$core$builtin$$Add$add$
|
|
2634
|
+
function moonbitlang$core$builtin$$Add$add$20$(self, other) {
|
|
2635
|
+
return moonbitlang$core$builtin$$Add$add$30$(self, other);
|
|
2603
2636
|
}
|
|
2604
|
-
function moonbitlang$core$builtin$$Sub$sub$
|
|
2605
|
-
return moonbitlang$core$builtin$$Sub$sub$
|
|
2637
|
+
function moonbitlang$core$builtin$$Sub$sub$20$(self, other) {
|
|
2638
|
+
return moonbitlang$core$builtin$$Sub$sub$30$(self, other);
|
|
2606
2639
|
}
|
|
2607
|
-
function moonbitlang$core$builtin$$Mul$mul$
|
|
2608
|
-
return moonbitlang$core$builtin$$Mul$mul$
|
|
2640
|
+
function moonbitlang$core$builtin$$Mul$mul$20$(self, other) {
|
|
2641
|
+
return moonbitlang$core$builtin$$Mul$mul$30$(self, other);
|
|
2609
2642
|
}
|
|
2610
|
-
function moonbitlang$core$builtin$$Div$div$
|
|
2611
|
-
return moonbitlang$core$builtin$$Div$div$
|
|
2643
|
+
function moonbitlang$core$builtin$$Div$div$20$(self, other) {
|
|
2644
|
+
return moonbitlang$core$builtin$$Div$div$30$(self, other);
|
|
2612
2645
|
}
|
|
2613
|
-
function moonbitlang$core$builtin$$BitAnd$land$
|
|
2646
|
+
function moonbitlang$core$builtin$$BitAnd$land$20$(self, other) {
|
|
2614
2647
|
return moonbitlang$core$builtin$$MyInt64$land(self, other);
|
|
2615
2648
|
}
|
|
2616
|
-
function moonbitlang$core$builtin$$BitOr$lor$
|
|
2649
|
+
function moonbitlang$core$builtin$$BitOr$lor$20$(self, other) {
|
|
2617
2650
|
return moonbitlang$core$builtin$$MyInt64$lor(self, other);
|
|
2618
2651
|
}
|
|
2619
|
-
function moonbitlang$core$builtin$$Shr$shr$
|
|
2652
|
+
function moonbitlang$core$builtin$$Shr$shr$20$(self, other) {
|
|
2620
2653
|
return moonbitlang$core$builtin$$MyInt64$asr(self, other);
|
|
2621
2654
|
}
|
|
2622
|
-
function moonbitlang$core$builtin$$Shl$shl$
|
|
2655
|
+
function moonbitlang$core$builtin$$Shl$shl$20$(self, other) {
|
|
2623
2656
|
return moonbitlang$core$builtin$$MyInt64$lsl(self, other);
|
|
2624
2657
|
}
|
|
2625
|
-
function moonbitlang$core$builtin$$Eq$equal$
|
|
2658
|
+
function moonbitlang$core$builtin$$Eq$equal$20$(self, other) {
|
|
2626
2659
|
const _p = self;
|
|
2627
2660
|
const _p$2 = other;
|
|
2628
2661
|
return _p.hi === _p$2.hi && _p.lo === _p$2.lo;
|
|
2629
2662
|
}
|
|
2630
|
-
function moonbitlang$core$builtin$$Compare$compare$
|
|
2663
|
+
function moonbitlang$core$builtin$$Compare$compare$20$(self, other) {
|
|
2631
2664
|
return moonbitlang$core$builtin$$MyInt64$compare(self, other);
|
|
2632
2665
|
}
|
|
2633
2666
|
function moonbitlang$core$int64$$Int64$to_int(self) {
|
|
@@ -2637,13 +2670,13 @@ function moonbitlang$core$double$$Double$reinterpret_as_uint64(self) {
|
|
|
2637
2670
|
return moonbitlang$core$builtin$$MyInt64$reinterpret_double(self);
|
|
2638
2671
|
}
|
|
2639
2672
|
function moonbitlang$core$builtin$$Add$add$2$(self, other) {
|
|
2640
|
-
return moonbitlang$core$builtin$$Add$add$
|
|
2673
|
+
return moonbitlang$core$builtin$$Add$add$30$(self, other);
|
|
2641
2674
|
}
|
|
2642
2675
|
function moonbitlang$core$builtin$$Sub$sub$2$(self, other) {
|
|
2643
|
-
return moonbitlang$core$builtin$$Sub$sub$
|
|
2676
|
+
return moonbitlang$core$builtin$$Sub$sub$30$(self, other);
|
|
2644
2677
|
}
|
|
2645
2678
|
function moonbitlang$core$builtin$$Mul$mul$2$(self, other) {
|
|
2646
|
-
return moonbitlang$core$builtin$$Mul$mul$
|
|
2679
|
+
return moonbitlang$core$builtin$$Mul$mul$30$(self, other);
|
|
2647
2680
|
}
|
|
2648
2681
|
function moonbitlang$core$builtin$$Div$div$2$(self, other) {
|
|
2649
2682
|
return moonbitlang$core$builtin$$MyInt64$div_u(self, other);
|
|
@@ -2675,7 +2708,7 @@ function moonbitlang$core$uint64$$UInt64$clz(self) {
|
|
|
2675
2708
|
const _p = self;
|
|
2676
2709
|
return _p.hi !== 0 ? Math.clz32(_p.hi) : 32 + Math.clz32(_p.lo) | 0;
|
|
2677
2710
|
}
|
|
2678
|
-
function moonbitlang$core$bytes$$Bytes$makei$
|
|
2711
|
+
function moonbitlang$core$bytes$$Bytes$makei$31$(length, value) {
|
|
2679
2712
|
if (length <= 0) return $bytes_literal$0;
|
|
2680
2713
|
const arr = $makebytes(length, value(0));
|
|
2681
2714
|
let _tmp = 1;
|
|
@@ -2709,7 +2742,7 @@ function moonbitlang$core$builtin$$Eq$equal$11$(self, other) {
|
|
|
2709
2742
|
}
|
|
2710
2743
|
}
|
|
2711
2744
|
function moonbitlang$core$bytes$$Bytes$from_array(arr) {
|
|
2712
|
-
return moonbitlang$core$bytes$$Bytes$makei$
|
|
2745
|
+
return moonbitlang$core$bytes$$Bytes$makei$31$(arr.end - arr.start | 0, (i) => moonbitlang$core$array$$ArrayView$at$4$(arr, i));
|
|
2713
2746
|
}
|
|
2714
2747
|
function moonbitlang$core$array$$Array$make$4$(len, elem) {
|
|
2715
2748
|
const arr = new Array(len);
|
|
@@ -2735,7 +2768,7 @@ function moonbitlang$core$array$$Array$set$4$(self, index, value) {
|
|
|
2735
2768
|
return;
|
|
2736
2769
|
}
|
|
2737
2770
|
}
|
|
2738
|
-
function moonbitlang$core$array$$Array$set$
|
|
2771
|
+
function moonbitlang$core$array$$Array$set$13$(self, index, value) {
|
|
2739
2772
|
const len = self.length;
|
|
2740
2773
|
if (index >= 0 && index < len) {
|
|
2741
2774
|
$bound_check(self, index);
|
|
@@ -2761,7 +2794,7 @@ function moonbitlang$core$bytes$$Bytes$to_array(self) {
|
|
|
2761
2794
|
}
|
|
2762
2795
|
return rv;
|
|
2763
2796
|
}
|
|
2764
|
-
function moonbitlang$core$builtin$$Show$output$
|
|
2797
|
+
function moonbitlang$core$builtin$$Show$output$32$(self, logger) {
|
|
2765
2798
|
const pkg = self.pkg;
|
|
2766
2799
|
const _bind = moonbitlang$core$string$$StringView$find(pkg, {
|
|
2767
2800
|
str: moonbitlang$core$builtin$$output$46$42$bind$124$8198,
|
|
@@ -2812,8 +2845,8 @@ function moonbitlang$core$builtin$$Show$output$31$(self, logger) {
|
|
|
2812
2845
|
logger.method_table.method_3(logger.self, 64);
|
|
2813
2846
|
logger.method_table.method_2(logger.self, _module_name);
|
|
2814
2847
|
}
|
|
2815
|
-
function moonbitlang$core$builtin$$Show$output$
|
|
2816
|
-
moonbitlang$core$builtin$$Show$output$
|
|
2848
|
+
function moonbitlang$core$builtin$$Show$output$22$(self, logger) {
|
|
2849
|
+
moonbitlang$core$builtin$$Show$output$32$(moonbitlang$core$builtin$$SourceLocRepr$parse(self), logger);
|
|
2817
2850
|
}
|
|
2818
2851
|
function moonbitlang$core$array$$Array$sub$46$inner$4$(self, start, end) {
|
|
2819
2852
|
const len = self.length;
|
|
@@ -2830,7 +2863,7 @@ function moonbitlang$core$array$$Array$sub$46$inner$4$(self, start, end) {
|
|
|
2830
2863
|
end: end$2
|
|
2831
2864
|
} : moonbitlang$core$builtin$$abort$3$("View index out of bounds", "@moonbitlang/core/builtin:arrayview.mbt:200:5-200:38");
|
|
2832
2865
|
}
|
|
2833
|
-
function moonbitlang$core$array$$Array$sub$46$inner$
|
|
2866
|
+
function moonbitlang$core$array$$Array$sub$46$inner$16$(self, start, end) {
|
|
2834
2867
|
const len = self.length;
|
|
2835
2868
|
let end$2;
|
|
2836
2869
|
if (end === void 0) end$2 = len;
|
|
@@ -2845,8 +2878,8 @@ function moonbitlang$core$array$$Array$sub$46$inner$15$(self, start, end) {
|
|
|
2845
2878
|
end: end$2
|
|
2846
2879
|
} : moonbitlang$core$builtin$$abort$5$("View index out of bounds", "@moonbitlang/core/builtin:arrayview.mbt:200:5-200:38");
|
|
2847
2880
|
}
|
|
2848
|
-
function moonbitlang$core$array$$Array$from_iter$
|
|
2849
|
-
return moonbitlang$core$builtin$$Iter$collect$
|
|
2881
|
+
function moonbitlang$core$array$$Array$from_iter$16$(iter) {
|
|
2882
|
+
return moonbitlang$core$builtin$$Iter$collect$16$(iter);
|
|
2850
2883
|
}
|
|
2851
2884
|
function moonbitlang$core$double$internal$ryu$$copy_special_str(sign, exponent, mantissa) {
|
|
2852
2885
|
if (mantissa) return "NaN";
|
|
@@ -2893,13 +2926,13 @@ function moonbitlang$core$double$internal$ryu$$pow5Factor(value) {
|
|
|
2893
2926
|
if (moonbitlang$core$builtin$$op_notequal$2$(moonbitlang$core$builtin$$Mod$mod$2$(value, $625L), $0L)) return 3;
|
|
2894
2927
|
let count = 4;
|
|
2895
2928
|
let value$2 = moonbitlang$core$builtin$$Div$div$2$(value, $625L);
|
|
2896
|
-
while (true) if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
2929
|
+
while (true) if (moonbitlang$core$builtin$$Compare$op_gt$18$(value$2, $0L)) {
|
|
2897
2930
|
if (moonbitlang$core$builtin$$op_notequal$2$(moonbitlang$core$builtin$$Mod$mod$2$(value$2, $5L), $0L)) return count;
|
|
2898
2931
|
value$2 = moonbitlang$core$builtin$$Div$div$2$(value$2, $5L);
|
|
2899
2932
|
count = count + 1 | 0;
|
|
2900
2933
|
continue;
|
|
2901
2934
|
} else break;
|
|
2902
|
-
return moonbitlang$core$builtin$$abort$8$(`IllegalArgumentException ${moonbitlang$core$builtin$$Show$to_string$
|
|
2935
|
+
return moonbitlang$core$builtin$$abort$8$(`IllegalArgumentException ${moonbitlang$core$builtin$$Show$to_string$18$(value$2)}`, "@moonbitlang/core/double/internal/ryu:ryu.mbt:116:3-116:45");
|
|
2903
2936
|
}
|
|
2904
2937
|
function moonbitlang$core$double$internal$ryu$$multipleOfPowerOf5(value, p) {
|
|
2905
2938
|
return moonbitlang$core$double$internal$ryu$$pow5Factor(value) >= p;
|
|
@@ -2918,22 +2951,22 @@ function moonbitlang$core$double$internal$ryu$$mulShiftAll64(m, mul, j, mmShift)
|
|
|
2918
2951
|
const _lo2 = _bind$2._0;
|
|
2919
2952
|
const _hi2 = _bind$2._1;
|
|
2920
2953
|
const mid = moonbitlang$core$builtin$$Add$add$2$(_tmp, _lo2);
|
|
2921
|
-
const hi = moonbitlang$core$builtin$$Add$add$2$(_hi2, moonbitlang$core$builtin$$Compare$op_lt$
|
|
2954
|
+
const hi = moonbitlang$core$builtin$$Add$add$2$(_hi2, moonbitlang$core$builtin$$Compare$op_lt$18$(mid, _tmp) ? $1L : $0L);
|
|
2922
2955
|
const lo2 = moonbitlang$core$builtin$$Add$add$2$(_lo, _mul0);
|
|
2923
|
-
const mid2 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Add$add$2$(mid, _mul1), moonbitlang$core$builtin$$Compare$op_lt$
|
|
2924
|
-
const vp = moonbitlang$core$double$internal$ryu$$shiftright128(mid2, moonbitlang$core$builtin$$Add$add$2$(hi, moonbitlang$core$builtin$$Compare$op_lt$
|
|
2956
|
+
const mid2 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Add$add$2$(mid, _mul1), moonbitlang$core$builtin$$Compare$op_lt$18$(lo2, _lo) ? $1L : $0L);
|
|
2957
|
+
const vp = moonbitlang$core$double$internal$ryu$$shiftright128(mid2, moonbitlang$core$builtin$$Add$add$2$(hi, moonbitlang$core$builtin$$Compare$op_lt$18$(mid2, mid) ? $1L : $0L), (j - 64 | 0) - 1 | 0);
|
|
2925
2958
|
let vm = $0L;
|
|
2926
2959
|
if (mmShift) {
|
|
2927
2960
|
const lo3 = moonbitlang$core$builtin$$Sub$sub$2$(_lo, _mul0);
|
|
2928
|
-
const mid3 = moonbitlang$core$builtin$$Sub$sub$2$(moonbitlang$core$builtin$$Sub$sub$2$(mid, _mul1), moonbitlang$core$builtin$$Compare$op_lt$
|
|
2929
|
-
vm = moonbitlang$core$double$internal$ryu$$shiftright128(mid3, moonbitlang$core$builtin$$Sub$sub$2$(hi, moonbitlang$core$builtin$$Compare$op_lt$
|
|
2961
|
+
const mid3 = moonbitlang$core$builtin$$Sub$sub$2$(moonbitlang$core$builtin$$Sub$sub$2$(mid, _mul1), moonbitlang$core$builtin$$Compare$op_lt$18$(_lo, lo3) ? $1L : $0L);
|
|
2962
|
+
vm = moonbitlang$core$double$internal$ryu$$shiftright128(mid3, moonbitlang$core$builtin$$Sub$sub$2$(hi, moonbitlang$core$builtin$$Compare$op_lt$18$(mid, mid3) ? $1L : $0L), (j - 64 | 0) - 1 | 0);
|
|
2930
2963
|
} else {
|
|
2931
2964
|
const lo3 = moonbitlang$core$builtin$$Add$add$2$(_lo, _lo);
|
|
2932
|
-
const mid3 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Add$add$2$(mid, mid), moonbitlang$core$builtin$$Compare$op_lt$
|
|
2933
|
-
const hi3 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Add$add$2$(hi, hi), moonbitlang$core$builtin$$Compare$op_lt$
|
|
2965
|
+
const mid3 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Add$add$2$(mid, mid), moonbitlang$core$builtin$$Compare$op_lt$18$(lo3, _lo) ? $1L : $0L);
|
|
2966
|
+
const hi3 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Add$add$2$(hi, hi), moonbitlang$core$builtin$$Compare$op_lt$18$(mid3, mid) ? $1L : $0L);
|
|
2934
2967
|
const lo4 = moonbitlang$core$builtin$$Sub$sub$2$(lo3, _mul0);
|
|
2935
|
-
const mid4 = moonbitlang$core$builtin$$Sub$sub$2$(moonbitlang$core$builtin$$Sub$sub$2$(mid3, _mul1), moonbitlang$core$builtin$$Compare$op_lt$
|
|
2936
|
-
vm = moonbitlang$core$double$internal$ryu$$shiftright128(mid4, moonbitlang$core$builtin$$Sub$sub$2$(hi3, moonbitlang$core$builtin$$Compare$op_lt$
|
|
2968
|
+
const mid4 = moonbitlang$core$builtin$$Sub$sub$2$(moonbitlang$core$builtin$$Sub$sub$2$(mid3, _mul1), moonbitlang$core$builtin$$Compare$op_lt$18$(lo3, lo4) ? $1L : $0L);
|
|
2969
|
+
vm = moonbitlang$core$double$internal$ryu$$shiftright128(mid4, moonbitlang$core$builtin$$Sub$sub$2$(hi3, moonbitlang$core$builtin$$Compare$op_lt$18$(mid3, mid4) ? $1L : $0L), j - 64 | 0);
|
|
2937
2970
|
}
|
|
2938
2971
|
return {
|
|
2939
2972
|
_0: moonbitlang$core$double$internal$ryu$$shiftright128(mid, hi, (j - 64 | 0) - 1 | 0),
|
|
@@ -2965,7 +2998,7 @@ function moonbitlang$core$double$internal$ryu$$double_computePow5(i) {
|
|
|
2965
2998
|
const _high0 = _bind$2._1;
|
|
2966
2999
|
const sum = moonbitlang$core$builtin$$Add$add$2$(_high0, _low1);
|
|
2967
3000
|
let high1 = _high1;
|
|
2968
|
-
if (moonbitlang$core$builtin$$Compare$op_lt$
|
|
3001
|
+
if (moonbitlang$core$builtin$$Compare$op_lt$18$(sum, _high0)) high1 = moonbitlang$core$builtin$$Add$add$2$(high1, $1L);
|
|
2969
3002
|
const delta = (((Math.imul(i, 1217359) | 0) >>> 19 | 0) + 1 | 0) - (((Math.imul(base2, 1217359) | 0) >>> 19 | 0) + 1 | 0) | 0;
|
|
2970
3003
|
const _tmp = moonbitlang$core$double$internal$ryu$$shiftright128(_low0, sum, delta);
|
|
2971
3004
|
const _p$3 = i / 16 | 0;
|
|
@@ -2999,7 +3032,7 @@ function moonbitlang$core$double$internal$ryu$$double_computeInvPow5(i) {
|
|
|
2999
3032
|
const _high0 = _bind$2._1;
|
|
3000
3033
|
const sum = moonbitlang$core$builtin$$Add$add$2$(_high0, _low1);
|
|
3001
3034
|
let high1 = _high1;
|
|
3002
|
-
if (moonbitlang$core$builtin$$Compare$op_lt$
|
|
3035
|
+
if (moonbitlang$core$builtin$$Compare$op_lt$18$(sum, _high0)) high1 = moonbitlang$core$builtin$$Add$add$2$(high1, $1L);
|
|
3003
3036
|
const delta = (((Math.imul(base2, 1217359) | 0) >>> 19 | 0) + 1 | 0) - (((Math.imul(i, 1217359) | 0) >>> 19 | 0) + 1 | 0) | 0;
|
|
3004
3037
|
const _tmp = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$double$internal$ryu$$shiftright128(_low0, sum, delta), $1L);
|
|
3005
3038
|
const _p$3 = i / 16 | 0;
|
|
@@ -3010,22 +3043,22 @@ function moonbitlang$core$double$internal$ryu$$double_computeInvPow5(i) {
|
|
|
3010
3043
|
};
|
|
3011
3044
|
}
|
|
3012
3045
|
function moonbitlang$core$double$internal$ryu$$decimal_length17(v) {
|
|
3013
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3014
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3015
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3016
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3017
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3018
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3019
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3020
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3021
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3022
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3023
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3024
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3025
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3026
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3027
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3028
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3046
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $10000000000000000L)) return 17;
|
|
3047
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $1000000000000000L)) return 16;
|
|
3048
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $100000000000000L)) return 15;
|
|
3049
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $10000000000000L)) return 14;
|
|
3050
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $1000000000000L)) return 13;
|
|
3051
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $100000000000L)) return 12;
|
|
3052
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $10000000000L)) return 11;
|
|
3053
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $1000000000L)) return 10;
|
|
3054
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $100000000L)) return 9;
|
|
3055
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $10000000L)) return 8;
|
|
3056
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $1000000L)) return 7;
|
|
3057
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $100000L)) return 6;
|
|
3058
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $10000L)) return 5;
|
|
3059
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $1000L)) return 4;
|
|
3060
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $100L)) return 3;
|
|
3061
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $10L)) return 2;
|
|
3029
3062
|
return 1;
|
|
3030
3063
|
}
|
|
3031
3064
|
function moonbitlang$core$double$internal$ryu$$d2d(ieeeMantissa, ieeeExponent) {
|
|
@@ -3091,7 +3124,7 @@ function moonbitlang$core$double$internal$ryu$$d2d(ieeeMantissa, ieeeExponent) {
|
|
|
3091
3124
|
while (true) {
|
|
3092
3125
|
const vpDiv10 = moonbitlang$core$builtin$$Div$div$2$(vp, $10L);
|
|
3093
3126
|
const vmDiv10 = moonbitlang$core$builtin$$Div$div$2$(vm, $10L);
|
|
3094
|
-
if (moonbitlang$core$builtin$$Compare$op_le$
|
|
3127
|
+
if (moonbitlang$core$builtin$$Compare$op_le$18$(vpDiv10, vmDiv10)) break;
|
|
3095
3128
|
const vmMod10 = moonbitlang$core$uint64$$UInt64$to_int(vm) - (Math.imul(10, moonbitlang$core$uint64$$UInt64$to_int(vmDiv10)) | 0) | 0;
|
|
3096
3129
|
const vrDiv10 = moonbitlang$core$builtin$$Div$div$2$(vr, $10L);
|
|
3097
3130
|
const vrMod10 = moonbitlang$core$uint64$$UInt64$to_int(vr) - (Math.imul(10, moonbitlang$core$uint64$$UInt64$to_int(vrDiv10)) | 0) | 0;
|
|
@@ -3124,7 +3157,7 @@ function moonbitlang$core$double$internal$ryu$$d2d(ieeeMantissa, ieeeExponent) {
|
|
|
3124
3157
|
let roundUp = false;
|
|
3125
3158
|
const vpDiv100 = moonbitlang$core$builtin$$Div$div$2$(vp, $100L);
|
|
3126
3159
|
const vmDiv100 = moonbitlang$core$builtin$$Div$div$2$(vm, $100L);
|
|
3127
|
-
if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
3160
|
+
if (moonbitlang$core$builtin$$Compare$op_gt$18$(vpDiv100, vmDiv100)) {
|
|
3128
3161
|
const vrDiv100 = moonbitlang$core$builtin$$Div$div$2$(vr, $100L);
|
|
3129
3162
|
roundUp = (moonbitlang$core$uint64$$UInt64$to_int(vr) - (Math.imul(100, moonbitlang$core$uint64$$UInt64$to_int(vrDiv100)) | 0) | 0) >= 50;
|
|
3130
3163
|
vr = vrDiv100;
|
|
@@ -3135,7 +3168,7 @@ function moonbitlang$core$double$internal$ryu$$d2d(ieeeMantissa, ieeeExponent) {
|
|
|
3135
3168
|
while (true) {
|
|
3136
3169
|
const vpDiv10 = moonbitlang$core$builtin$$Div$div$2$(vp, $10L);
|
|
3137
3170
|
const vmDiv10 = moonbitlang$core$builtin$$Div$div$2$(vm, $10L);
|
|
3138
|
-
if (moonbitlang$core$builtin$$Compare$op_le$
|
|
3171
|
+
if (moonbitlang$core$builtin$$Compare$op_le$18$(vpDiv10, vmDiv10)) break;
|
|
3139
3172
|
const vrDiv10 = moonbitlang$core$builtin$$Div$div$2$(vr, $10L);
|
|
3140
3173
|
roundUp = (moonbitlang$core$uint64$$UInt64$to_int(vr) - (Math.imul(10, moonbitlang$core$uint64$$UInt64$to_int(vrDiv10)) | 0) | 0) >= 5;
|
|
3141
3174
|
vr = vrDiv10;
|
|
@@ -3341,7 +3374,7 @@ function moonbitlang$core$double$internal$ryu$$ryu_to_string(val) {
|
|
|
3341
3374
|
const ieeeMantissa = moonbitlang$core$builtin$$BitAnd$land$2$(bits, moonbitlang$core$builtin$$Sub$sub$2$(moonbitlang$core$builtin$$Shl$shl$2$($1L, 52), $1L));
|
|
3342
3375
|
const ieeeExponent = moonbitlang$core$uint64$$UInt64$to_int(moonbitlang$core$builtin$$BitAnd$land$2$(moonbitlang$core$builtin$$Shr$shr$2$(bits, 52), moonbitlang$core$builtin$$Sub$sub$2$(moonbitlang$core$builtin$$Shl$shl$2$($1L, 11), $1L)));
|
|
3343
3376
|
if (ieeeExponent === 2047 || ieeeExponent === 0 && moonbitlang$core$builtin$$Eq$equal$2$(ieeeMantissa, $0L)) return moonbitlang$core$double$internal$ryu$$copy_special_str(ieeeSign, ieeeExponent !== 0, moonbitlang$core$builtin$$op_notequal$2$(ieeeMantissa, $0L));
|
|
3344
|
-
let v = moonbitlang$core$double$internal$ryu$$ryu_to_string$46$record$47$
|
|
3377
|
+
let v = moonbitlang$core$double$internal$ryu$$ryu_to_string$46$record$47$864;
|
|
3345
3378
|
const small = moonbitlang$core$double$internal$ryu$$d2d_small_int(ieeeMantissa, ieeeExponent);
|
|
3346
3379
|
if (small === void 0) v = moonbitlang$core$double$internal$ryu$$d2d(ieeeMantissa, ieeeExponent);
|
|
3347
3380
|
else {
|
|
@@ -3365,16 +3398,16 @@ function moonbitlang$core$double$$Double$to_string(self) {
|
|
|
3365
3398
|
function moonbitlang$core$strconv$$range_err$7$() {
|
|
3366
3399
|
return new Result$Err$3$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$range_err_str));
|
|
3367
3400
|
}
|
|
3368
|
-
function moonbitlang$core$strconv$$syntax_err$
|
|
3401
|
+
function moonbitlang$core$strconv$$syntax_err$33$() {
|
|
3369
3402
|
return new Result$Err$4$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
|
|
3370
3403
|
}
|
|
3371
|
-
function moonbitlang$core$strconv$$syntax_err$
|
|
3404
|
+
function moonbitlang$core$strconv$$syntax_err$34$() {
|
|
3372
3405
|
return new Result$Err$5$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
|
|
3373
3406
|
}
|
|
3374
3407
|
function moonbitlang$core$strconv$$syntax_err$6$() {
|
|
3375
3408
|
return new Result$Err$6$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
|
|
3376
3409
|
}
|
|
3377
|
-
function moonbitlang$core$strconv$$syntax_err$
|
|
3410
|
+
function moonbitlang$core$strconv$$syntax_err$35$() {
|
|
3378
3411
|
return new Result$Err$7$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
|
|
3379
3412
|
}
|
|
3380
3413
|
function moonbitlang$core$strconv$$check_underscore(str) {
|
|
@@ -3900,8 +3933,8 @@ function moonbitlang$core$strconv$$parse_decimal_from_view(str) {
|
|
|
3900
3933
|
if (moonbitlang$core$string$$String$char_length_eq$46$inner(rest$3.str, 0, rest$3.start, rest$3.end)) {
|
|
3901
3934
|
moonbitlang$core$strconv$$Decimal$trim(d);
|
|
3902
3935
|
return new Result$Ok$7$(d);
|
|
3903
|
-
} else return moonbitlang$core$strconv$$syntax_err$
|
|
3904
|
-
} else return moonbitlang$core$strconv$$syntax_err$
|
|
3936
|
+
} else return moonbitlang$core$strconv$$syntax_err$35$();
|
|
3937
|
+
} else return moonbitlang$core$strconv$$syntax_err$35$();
|
|
3905
3938
|
}
|
|
3906
3939
|
function moonbitlang$core$strconv$$parse_decimal_priv(str) {
|
|
3907
3940
|
return moonbitlang$core$strconv$$parse_decimal_from_view(str);
|
|
@@ -4370,9 +4403,9 @@ function moonbitlang$core$strconv$$parse_inf_nan(rest) {
|
|
|
4370
4403
|
else break _L$4;
|
|
4371
4404
|
return _pos ? new Result$Ok$4$(moonbitlang$core$double$$infinity) : new Result$Ok$4$(moonbitlang$core$double$$neg_infinity);
|
|
4372
4405
|
}
|
|
4373
|
-
return moonbitlang$core$strconv$$syntax_err$
|
|
4406
|
+
return moonbitlang$core$strconv$$syntax_err$33$();
|
|
4374
4407
|
}
|
|
4375
|
-
return moonbitlang$core$strconv$$syntax_err$
|
|
4408
|
+
return moonbitlang$core$strconv$$syntax_err$33$();
|
|
4376
4409
|
}
|
|
4377
4410
|
function $moonbitlang$core$strconv$$moonbitlang$core$string$$StringView$fold_digits$2$(self, init, f) {
|
|
4378
4411
|
let ret = init;
|
|
@@ -4406,7 +4439,7 @@ function $moonbitlang$core$strconv$$moonbitlang$core$string$$StringView$fold_dig
|
|
|
4406
4439
|
_2: len
|
|
4407
4440
|
};
|
|
4408
4441
|
}
|
|
4409
|
-
function $moonbitlang$core$strconv$$moonbitlang$core$string$$StringView$fold_digits$
|
|
4442
|
+
function $moonbitlang$core$strconv$$moonbitlang$core$string$$StringView$fold_digits$20$(self, init, f) {
|
|
4410
4443
|
let ret = init;
|
|
4411
4444
|
let len = 0;
|
|
4412
4445
|
let str = self;
|
|
@@ -4492,12 +4525,12 @@ function moonbitlang$core$strconv$$parse_scientific(s) {
|
|
|
4492
4525
|
if (moonbitlang$core$string$$String$char_length_ge$46$inner(_bind.str, 1, _bind.start, _bind.end)) {
|
|
4493
4526
|
const _x = moonbitlang$core$string$$String$unsafe_char_at(_bind.str, moonbitlang$core$string$$String$offset_of_nth_char$46$inner(_bind.str, 0, _bind.start, _bind.end));
|
|
4494
4527
|
if (_x >= 48 && _x <= 57) {
|
|
4495
|
-
const _bind$2 = $moonbitlang$core$strconv$$moonbitlang$core$string$$StringView$fold_digits$
|
|
4528
|
+
const _bind$2 = $moonbitlang$core$strconv$$moonbitlang$core$string$$StringView$fold_digits$20$(s$2, moonbitlang$core$strconv$$parse_scientific$46$exp_num$124$306, (digit, exp_num) => moonbitlang$core$builtin$$Compare$op_lt$19$(exp_num, $65536L) ? moonbitlang$core$builtin$$Add$add$20$(moonbitlang$core$builtin$$Mul$mul$20$($10L, exp_num), moonbitlang$core$int$$Int$to_int64(digit)) : exp_num);
|
|
4496
4529
|
const _s = _bind$2._0;
|
|
4497
4530
|
const _exp_num = _bind$2._1;
|
|
4498
4531
|
return neg_exp ? {
|
|
4499
4532
|
_0: _s,
|
|
4500
|
-
_1: moonbitlang$core$builtin$$Neg$neg$
|
|
4533
|
+
_1: moonbitlang$core$builtin$$Neg$neg$20$(_exp_num)
|
|
4501
4534
|
} : {
|
|
4502
4535
|
_0: _s,
|
|
4503
4536
|
_1: _exp_num
|
|
@@ -4526,7 +4559,7 @@ function moonbitlang$core$strconv$$try_parse_19digits(s, x) {
|
|
|
4526
4559
|
start: _tmp$3,
|
|
4527
4560
|
end: _param.end
|
|
4528
4561
|
};
|
|
4529
|
-
if (moonbitlang$core$builtin$$Compare$op_lt$
|
|
4562
|
+
if (moonbitlang$core$builtin$$Compare$op_lt$18$(x$2, moonbitlang$core$strconv$$min_19digit_int)) {
|
|
4530
4563
|
len = len + 1 | 0;
|
|
4531
4564
|
x$2 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Mul$mul$2$(x$2, $10L), moonbitlang$core$uint64$$UInt64$extend_uint(_x - 48 | 0));
|
|
4532
4565
|
_tmp = _x$2;
|
|
@@ -4644,7 +4677,7 @@ function moonbitlang$core$strconv$$parse_number(s) {
|
|
|
4644
4677
|
s$2 = _new_s;
|
|
4645
4678
|
mantissa = _new_mantissa;
|
|
4646
4679
|
n_after_dot = _consumed_digit;
|
|
4647
|
-
exponent = moonbitlang$core$builtin$$Neg$neg$
|
|
4680
|
+
exponent = moonbitlang$core$builtin$$Neg$neg$20$(moonbitlang$core$int$$Int$to_int64(n_after_dot));
|
|
4648
4681
|
}
|
|
4649
4682
|
}
|
|
4650
4683
|
n_digits = n_digits + n_after_dot | 0;
|
|
@@ -4690,7 +4723,7 @@ function moonbitlang$core$strconv$$parse_number(s) {
|
|
|
4690
4723
|
const _new_s = _bind$5._0;
|
|
4691
4724
|
const _exp_number = _bind$5._1;
|
|
4692
4725
|
s$2 = _new_s;
|
|
4693
|
-
exponent = moonbitlang$core$builtin$$Add$add$
|
|
4726
|
+
exponent = moonbitlang$core$builtin$$Add$add$20$(exponent, _exp_number);
|
|
4694
4727
|
}
|
|
4695
4728
|
const _bind$4 = s$2;
|
|
4696
4729
|
if (moonbitlang$core$string$$String$char_length_eq$46$inner(_bind$4.str, 0, _bind$4.start, _bind$4.end)) {
|
|
@@ -4759,7 +4792,7 @@ function moonbitlang$core$strconv$$parse_number(s) {
|
|
|
4759
4792
|
const _consumed_digit = _bind$5._2;
|
|
4760
4793
|
mantissa$2 = _new_mantissa;
|
|
4761
4794
|
let _tmp$4;
|
|
4762
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
4795
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(mantissa$2, moonbitlang$core$strconv$$min_19digit_int)) _tmp$4 = _consumed_digit;
|
|
4763
4796
|
else if (moonbitlang$core$string$$String$char_length_ge$46$inner(_s$3.str, 1, _s$3.start, _s$3.end)) {
|
|
4764
4797
|
const _tmp$5 = _s$3.str;
|
|
4765
4798
|
const _bind$6 = moonbitlang$core$string$$String$offset_of_nth_char$46$inner(_s$3.str, 1, _s$3.start, _s$3.end);
|
|
@@ -4777,7 +4810,7 @@ function moonbitlang$core$strconv$$parse_number(s) {
|
|
|
4777
4810
|
_tmp$4 = _consumed_digit$2;
|
|
4778
4811
|
} else return new Result$Ok$5$(void 0);
|
|
4779
4812
|
exponent = moonbitlang$core$int$$Int$to_int64(_tmp$4);
|
|
4780
|
-
exponent = moonbitlang$core$builtin$$Add$add$
|
|
4813
|
+
exponent = moonbitlang$core$builtin$$Add$add$20$(exponent, moonbitlang$core$strconv$$parse_number$46$exp_number$124$287);
|
|
4781
4814
|
}
|
|
4782
4815
|
return new Result$Ok$5$({
|
|
4783
4816
|
exponent,
|
|
@@ -4785,14 +4818,14 @@ function moonbitlang$core$strconv$$parse_number(s) {
|
|
|
4785
4818
|
negative: _negative,
|
|
4786
4819
|
many_digits
|
|
4787
4820
|
});
|
|
4788
|
-
} else return moonbitlang$core$strconv$$syntax_err$
|
|
4821
|
+
} else return moonbitlang$core$strconv$$syntax_err$34$();
|
|
4789
4822
|
}
|
|
4790
4823
|
function moonbitlang$core$strconv$$assemble_bits(mantissa, exponent, negative) {
|
|
4791
4824
|
const biased_exp = exponent - moonbitlang$core$strconv$$double_info.bias | 0;
|
|
4792
|
-
let bits = moonbitlang$core$builtin$$BitAnd$land$
|
|
4825
|
+
let bits = moonbitlang$core$builtin$$BitAnd$land$20$(mantissa, moonbitlang$core$builtin$$Sub$sub$20$(moonbitlang$core$builtin$$Shl$shl$20$($1L, moonbitlang$core$strconv$$double_info.mantissa_bits), $1L));
|
|
4793
4826
|
const exp_bits = moonbitlang$core$int$$Int$to_int64(biased_exp & ((1 << moonbitlang$core$strconv$$double_info.exponent_bits) - 1 | 0));
|
|
4794
|
-
bits = moonbitlang$core$builtin$$BitOr$lor$
|
|
4795
|
-
if (negative) bits = moonbitlang$core$builtin$$BitOr$lor$
|
|
4827
|
+
bits = moonbitlang$core$builtin$$BitOr$lor$20$(bits, moonbitlang$core$builtin$$Shl$shl$20$(exp_bits, moonbitlang$core$strconv$$double_info.mantissa_bits));
|
|
4828
|
+
if (negative) bits = moonbitlang$core$builtin$$BitOr$lor$20$(bits, moonbitlang$core$builtin$$Shl$shl$20$(moonbitlang$core$builtin$$Shl$shl$20$($1L, moonbitlang$core$strconv$$double_info.mantissa_bits), moonbitlang$core$strconv$$double_info.exponent_bits));
|
|
4796
4829
|
return bits;
|
|
4797
4830
|
}
|
|
4798
4831
|
function moonbitlang$core$strconv$$Decimal$should_round_up(self, d) {
|
|
@@ -4822,20 +4855,20 @@ function moonbitlang$core$strconv$$Decimal$rounded_integer(self) {
|
|
|
4822
4855
|
let n = $0L;
|
|
4823
4856
|
let i = 0;
|
|
4824
4857
|
while (true) if (i < self.decimal_point && i < self.digits_num) {
|
|
4825
|
-
const _tmp = moonbitlang$core$builtin$$Mul$mul$
|
|
4858
|
+
const _tmp = moonbitlang$core$builtin$$Mul$mul$20$(n, $10L);
|
|
4826
4859
|
const _tmp$2 = self.digits;
|
|
4827
4860
|
const _tmp$3 = i;
|
|
4828
4861
|
$bound_check(_tmp$2, _tmp$3);
|
|
4829
|
-
n = moonbitlang$core$builtin$$Add$add$
|
|
4862
|
+
n = moonbitlang$core$builtin$$Add$add$20$(_tmp, moonbitlang$core$byte$$Byte$to_int64(_tmp$2[_tmp$3]));
|
|
4830
4863
|
i = i + 1 | 0;
|
|
4831
4864
|
continue;
|
|
4832
4865
|
} else break;
|
|
4833
4866
|
while (true) if (i < self.decimal_point) {
|
|
4834
|
-
n = moonbitlang$core$builtin$$Mul$mul$
|
|
4867
|
+
n = moonbitlang$core$builtin$$Mul$mul$20$(n, $10L);
|
|
4835
4868
|
i = i + 1 | 0;
|
|
4836
4869
|
continue;
|
|
4837
4870
|
} else break;
|
|
4838
|
-
if (moonbitlang$core$strconv$$Decimal$should_round_up(self, self.decimal_point)) n = moonbitlang$core$builtin$$Add$add$
|
|
4871
|
+
if (moonbitlang$core$strconv$$Decimal$should_round_up(self, self.decimal_point)) n = moonbitlang$core$builtin$$Add$add$20$(n, $1L);
|
|
4839
4872
|
return n;
|
|
4840
4873
|
}
|
|
4841
4874
|
function moonbitlang$core$strconv$$Decimal$new_digits(self, s) {
|
|
@@ -4879,9 +4912,9 @@ function moonbitlang$core$strconv$$Decimal$left_shift(self, s) {
|
|
|
4879
4912
|
const _tmp$2 = read_index;
|
|
4880
4913
|
$bound_check(_tmp, _tmp$2);
|
|
4881
4914
|
const d = moonbitlang$core$byte$$Byte$to_int64(_tmp[_tmp$2]);
|
|
4882
|
-
acc = moonbitlang$core$builtin$$Add$add$
|
|
4883
|
-
const quo = moonbitlang$core$builtin$$Div$div$
|
|
4884
|
-
const rem = moonbitlang$core$int64$$Int64$to_int(moonbitlang$core$builtin$$Sub$sub$
|
|
4915
|
+
acc = moonbitlang$core$builtin$$Add$add$20$(acc, moonbitlang$core$builtin$$Shl$shl$20$(d, s));
|
|
4916
|
+
const quo = moonbitlang$core$builtin$$Div$div$20$(acc, $10L);
|
|
4917
|
+
const rem = moonbitlang$core$int64$$Int64$to_int(moonbitlang$core$builtin$$Sub$sub$20$(acc, moonbitlang$core$builtin$$Mul$mul$20$(quo, $10L)));
|
|
4885
4918
|
write_index = write_index - 1 | 0;
|
|
4886
4919
|
if (write_index < self.digits.length) {
|
|
4887
4920
|
const _tmp$3 = self.digits;
|
|
@@ -4893,9 +4926,9 @@ function moonbitlang$core$strconv$$Decimal$left_shift(self, s) {
|
|
|
4893
4926
|
read_index = read_index - 1 | 0;
|
|
4894
4927
|
continue;
|
|
4895
4928
|
} else break;
|
|
4896
|
-
while (true) if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
4897
|
-
const quo = moonbitlang$core$builtin$$Div$div$
|
|
4898
|
-
const rem = moonbitlang$core$int64$$Int64$to_int(moonbitlang$core$builtin$$Sub$sub$
|
|
4929
|
+
while (true) if (moonbitlang$core$builtin$$Compare$op_gt$19$(acc, $0L)) {
|
|
4930
|
+
const quo = moonbitlang$core$builtin$$Div$div$20$(acc, $10L);
|
|
4931
|
+
const rem = moonbitlang$core$int64$$Int64$to_int(moonbitlang$core$builtin$$Sub$sub$20$(acc, moonbitlang$core$builtin$$Mul$mul$20$($10L, quo)));
|
|
4899
4932
|
write_index = write_index - 1 | 0;
|
|
4900
4933
|
if (write_index < self.digits.length) {
|
|
4901
4934
|
const _tmp = self.digits;
|
|
@@ -4950,7 +4983,7 @@ function moonbitlang$core$strconv$$Decimal$right_shift(self, s) {
|
|
|
4950
4983
|
read_index = read_index + 1 | 0;
|
|
4951
4984
|
continue;
|
|
4952
4985
|
} else break;
|
|
4953
|
-
while (true) if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
4986
|
+
while (true) if (moonbitlang$core$builtin$$Compare$op_gt$18$(acc, $0L)) {
|
|
4954
4987
|
const out = moonbitlang$core$builtin$$Shr$shr$2$(acc, s);
|
|
4955
4988
|
if (write_index < self.digits.length) {
|
|
4956
4989
|
const _tmp = self.digits;
|
|
@@ -4958,7 +4991,7 @@ function moonbitlang$core$strconv$$Decimal$right_shift(self, s) {
|
|
|
4958
4991
|
$bound_check(_tmp, _tmp$2);
|
|
4959
4992
|
_tmp[_tmp$2] = moonbitlang$core$uint64$$UInt64$to_byte(out);
|
|
4960
4993
|
write_index = write_index + 1 | 0;
|
|
4961
|
-
} else if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
4994
|
+
} else if (moonbitlang$core$builtin$$Compare$op_gt$18$(out, $0L)) self.truncated = true;
|
|
4962
4995
|
acc = moonbitlang$core$builtin$$BitAnd$land$2$(acc, mask);
|
|
4963
4996
|
acc = moonbitlang$core$builtin$$Mul$mul$2$(acc, $10L);
|
|
4964
4997
|
continue;
|
|
@@ -5050,8 +5083,8 @@ function moonbitlang$core$strconv$$Decimal$to_double_priv(self) {
|
|
|
5050
5083
|
}
|
|
5051
5084
|
moonbitlang$core$strconv$$Decimal$shift_priv(self, moonbitlang$core$strconv$$double_info.mantissa_bits + 1 | 0);
|
|
5052
5085
|
mantissa = moonbitlang$core$strconv$$Decimal$rounded_integer(self);
|
|
5053
|
-
if (moonbitlang$core$builtin$$Eq$equal$
|
|
5054
|
-
mantissa = moonbitlang$core$builtin$$Shr$shr$
|
|
5086
|
+
if (moonbitlang$core$builtin$$Eq$equal$20$(mantissa, moonbitlang$core$builtin$$Shl$shl$20$($2L, moonbitlang$core$strconv$$double_info.mantissa_bits))) {
|
|
5087
|
+
mantissa = moonbitlang$core$builtin$$Shr$shr$20$(mantissa, 1);
|
|
5055
5088
|
exponent = exponent + 1 | 0;
|
|
5056
5089
|
if ((exponent - moonbitlang$core$strconv$$double_info.bias | 0) >= ((1 << moonbitlang$core$strconv$$double_info.exponent_bits) - 1 | 0)) {
|
|
5057
5090
|
const _bind = moonbitlang$core$strconv$$range_err$7$();
|
|
@@ -5059,15 +5092,15 @@ function moonbitlang$core$strconv$$Decimal$to_double_priv(self) {
|
|
|
5059
5092
|
else return _bind;
|
|
5060
5093
|
}
|
|
5061
5094
|
}
|
|
5062
|
-
if (moonbitlang$core$builtin$$Eq$equal$
|
|
5095
|
+
if (moonbitlang$core$builtin$$Eq$equal$20$(moonbitlang$core$builtin$$BitAnd$land$20$(mantissa, moonbitlang$core$builtin$$Shl$shl$20$($1L, moonbitlang$core$strconv$$double_info.mantissa_bits)), $0L)) exponent = moonbitlang$core$strconv$$double_info.bias;
|
|
5063
5096
|
return new Result$Ok$4$(moonbitlang$core$int64$$Int64$reinterpret_as_double(moonbitlang$core$strconv$$assemble_bits(mantissa, exponent, self.negative)));
|
|
5064
5097
|
}
|
|
5065
5098
|
function moonbitlang$core$strconv$$checked_mul(a, b) {
|
|
5066
|
-
if (moonbitlang$core$builtin$$Eq$equal$2$(a, $0L) || moonbitlang$core$builtin$$Eq$equal$2$(b, $0L)) return moonbitlang$core$strconv$$checked_mul$46$constr$47$
|
|
5099
|
+
if (moonbitlang$core$builtin$$Eq$equal$2$(a, $0L) || moonbitlang$core$builtin$$Eq$equal$2$(b, $0L)) return moonbitlang$core$strconv$$checked_mul$46$constr$47$1337;
|
|
5067
5100
|
if (moonbitlang$core$builtin$$Eq$equal$2$(a, $1L)) return b;
|
|
5068
5101
|
if (moonbitlang$core$builtin$$Eq$equal$2$(b, $1L)) return a;
|
|
5069
5102
|
if (moonbitlang$core$uint64$$UInt64$clz(b) === 0 || moonbitlang$core$uint64$$UInt64$clz(a) === 0) return;
|
|
5070
|
-
if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
5103
|
+
if (moonbitlang$core$builtin$$Compare$op_gt$18$(a, moonbitlang$core$builtin$$Div$div$2$(moonbitlang$core$uint64$$max_value, b))) return;
|
|
5071
5104
|
return moonbitlang$core$builtin$$Mul$mul$2$(a, b);
|
|
5072
5105
|
}
|
|
5073
5106
|
function moonbitlang$core$strconv$$pow10_fast_path(exponent) {
|
|
@@ -5076,16 +5109,16 @@ function moonbitlang$core$strconv$$pow10_fast_path(exponent) {
|
|
|
5076
5109
|
return moonbitlang$core$strconv$$table[_p];
|
|
5077
5110
|
}
|
|
5078
5111
|
function moonbitlang$core$strconv$$Number$is_fast_path(self) {
|
|
5079
|
-
return moonbitlang$core$builtin$$Compare$op_le$
|
|
5112
|
+
return moonbitlang$core$builtin$$Compare$op_le$19$(moonbitlang$core$strconv$$min_exponent_fast_path, self.exponent) && moonbitlang$core$builtin$$Compare$op_le$19$(self.exponent, moonbitlang$core$strconv$$max_exponent_disguised_fast_path) && moonbitlang$core$builtin$$Compare$op_le$18$(self.mantissa, moonbitlang$core$strconv$$max_mantissa_fast_path) && !self.many_digits;
|
|
5080
5113
|
}
|
|
5081
5114
|
function moonbitlang$core$strconv$$Number$try_fast_path(self) {
|
|
5082
5115
|
if (moonbitlang$core$strconv$$Number$is_fast_path(self)) {
|
|
5083
5116
|
let value;
|
|
5084
|
-
if (moonbitlang$core$builtin$$Compare$op_le$
|
|
5117
|
+
if (moonbitlang$core$builtin$$Compare$op_le$19$(self.exponent, moonbitlang$core$strconv$$max_exponent_fast_path)) {
|
|
5085
5118
|
const value$2 = moonbitlang$core$double$$Double$convert_uint64(self.mantissa);
|
|
5086
|
-
value = moonbitlang$core$builtin$$Compare$op_lt$
|
|
5119
|
+
value = moonbitlang$core$builtin$$Compare$op_lt$19$(self.exponent, $0L) ? value$2 / moonbitlang$core$strconv$$pow10_fast_path(-moonbitlang$core$int64$$Int64$to_int(self.exponent) | 0) : value$2 * moonbitlang$core$strconv$$pow10_fast_path(moonbitlang$core$int64$$Int64$to_int(self.exponent));
|
|
5087
5120
|
} else {
|
|
5088
|
-
const shift = moonbitlang$core$builtin$$Sub$sub$
|
|
5121
|
+
const shift = moonbitlang$core$builtin$$Sub$sub$20$(self.exponent, moonbitlang$core$strconv$$max_exponent_fast_path);
|
|
5089
5122
|
const _tmp = self.mantissa;
|
|
5090
5123
|
const _p = moonbitlang$core$int64$$Int64$to_int(shift);
|
|
5091
5124
|
$bound_check(moonbitlang$core$strconv$$int_pow10, _p);
|
|
@@ -5093,7 +5126,7 @@ function moonbitlang$core$strconv$$Number$try_fast_path(self) {
|
|
|
5093
5126
|
let mantissa;
|
|
5094
5127
|
if (_bind === void 0) return Option$None$8$;
|
|
5095
5128
|
else mantissa = _bind;
|
|
5096
|
-
if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
5129
|
+
if (moonbitlang$core$builtin$$Compare$op_gt$18$(mantissa, moonbitlang$core$strconv$$max_mantissa_fast_path)) return Option$None$8$;
|
|
5097
5130
|
value = moonbitlang$core$double$$Double$convert_uint64(mantissa) * moonbitlang$core$strconv$$pow10_fast_path(moonbitlang$core$int64$$Int64$to_int(moonbitlang$core$strconv$$max_exponent_fast_path));
|
|
5098
5131
|
}
|
|
5099
5132
|
if (self.negative) value = -value;
|
|
@@ -5120,8 +5153,8 @@ function moonbitlang$core$strconv$$parse_double(str) {
|
|
|
5120
5153
|
return moonbitlang$core$strconv$$Decimal$to_double_priv(_tmp);
|
|
5121
5154
|
}
|
|
5122
5155
|
}
|
|
5123
|
-
} else return moonbitlang$core$strconv$$syntax_err$
|
|
5124
|
-
else return moonbitlang$core$strconv$$syntax_err$
|
|
5156
|
+
} else return moonbitlang$core$strconv$$syntax_err$33$();
|
|
5157
|
+
else return moonbitlang$core$strconv$$syntax_err$33$();
|
|
5125
5158
|
}
|
|
5126
5159
|
function f4ah6o$encoding_sjis$$decode_jis_x_0208(code) {
|
|
5127
5160
|
switch (code) {
|
|
@@ -12022,7 +12055,7 @@ function f4ah6o$encoding_sjis$$Decoder$decode_to_string(self, src, last) {
|
|
|
12022
12055
|
const len = src.length;
|
|
12023
12056
|
if (self.pending_first_byte !== 0) if (len === 0) {
|
|
12024
12057
|
if (last) {
|
|
12025
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12058
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12026
12059
|
self.had_replacements = true;
|
|
12027
12060
|
self.pending_first_byte = 0;
|
|
12028
12061
|
}
|
|
@@ -12033,12 +12066,12 @@ function f4ah6o$encoding_sjis$$Decoder$decode_to_string(self, src, last) {
|
|
|
12033
12066
|
if (b2 >= 64 && b2 <= 252 && b2 !== 127) {
|
|
12034
12067
|
const _bind = f4ah6o$encoding_sjis$$decode_jis_x_0208(b1 << 8 | b2);
|
|
12035
12068
|
if (_bind === -1) {
|
|
12036
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12069
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12037
12070
|
self.had_replacements = true;
|
|
12038
|
-
} else result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12071
|
+
} else result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(_bind)}`;
|
|
12039
12072
|
i = 1;
|
|
12040
12073
|
} else {
|
|
12041
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12074
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12042
12075
|
self.had_replacements = true;
|
|
12043
12076
|
i = 0;
|
|
12044
12077
|
}
|
|
@@ -12049,11 +12082,11 @@ function f4ah6o$encoding_sjis$$Decoder$decode_to_string(self, src, last) {
|
|
|
12049
12082
|
$bound_check(src, _tmp);
|
|
12050
12083
|
const b1 = src[_tmp];
|
|
12051
12084
|
if (b1 < 128) {
|
|
12052
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12085
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(b1)}`;
|
|
12053
12086
|
i = i + 1 | 0;
|
|
12054
12087
|
} else if (b1 >= 161 && b1 <= 223) {
|
|
12055
12088
|
const ch = 65377 + (b1 - 161 | 0) | 0;
|
|
12056
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12089
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(ch)}`;
|
|
12057
12090
|
i = i + 1 | 0;
|
|
12058
12091
|
} else if (b1 >= 129 && b1 <= 159 || b1 >= 224 && b1 <= 239) if ((i + 1 | 0) < len) {
|
|
12059
12092
|
const _tmp$2 = i + 1 | 0;
|
|
@@ -12062,17 +12095,17 @@ function f4ah6o$encoding_sjis$$Decoder$decode_to_string(self, src, last) {
|
|
|
12062
12095
|
if (b2 >= 64 && b2 <= 252 && b2 !== 127) {
|
|
12063
12096
|
const _bind = f4ah6o$encoding_sjis$$decode_jis_x_0208(b1 << 8 | b2);
|
|
12064
12097
|
if (_bind === -1) {
|
|
12065
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12098
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12066
12099
|
self.had_replacements = true;
|
|
12067
|
-
} else result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12100
|
+
} else result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(_bind)}`;
|
|
12068
12101
|
i = i + 2 | 0;
|
|
12069
12102
|
} else {
|
|
12070
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12103
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12071
12104
|
self.had_replacements = true;
|
|
12072
12105
|
i = i + 1 | 0;
|
|
12073
12106
|
}
|
|
12074
12107
|
} else if (last) {
|
|
12075
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12108
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12076
12109
|
self.had_replacements = true;
|
|
12077
12110
|
i = i + 1 | 0;
|
|
12078
12111
|
} else {
|
|
@@ -12080,7 +12113,7 @@ function f4ah6o$encoding_sjis$$Decoder$decode_to_string(self, src, last) {
|
|
|
12080
12113
|
i = i + 1 | 0;
|
|
12081
12114
|
}
|
|
12082
12115
|
else {
|
|
12083
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12116
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12084
12117
|
self.had_replacements = true;
|
|
12085
12118
|
i = i + 1 | 0;
|
|
12086
12119
|
}
|
|
@@ -12099,12 +12132,12 @@ function f4ah6o$encoding_sjis$$shift_jis_to_utf8(data) {
|
|
|
12099
12132
|
return f4ah6o$encoding_sjis$$decode(data)._0;
|
|
12100
12133
|
}
|
|
12101
12134
|
function f4ah6o$jww_parser$core$$LayerGroup$default() {
|
|
12102
|
-
const layers = moonbitlang$core$array$$Array$new$46$inner$
|
|
12135
|
+
const layers = moonbitlang$core$array$$Array$new$46$inner$14$(0);
|
|
12103
12136
|
let _tmp = 0;
|
|
12104
12137
|
while (true) {
|
|
12105
12138
|
const _ = _tmp;
|
|
12106
12139
|
if (_ < 16) {
|
|
12107
|
-
moonbitlang$core$array$$Array$push$
|
|
12140
|
+
moonbitlang$core$array$$Array$push$14$(layers, f4ah6o$jww_parser$core$$default$46$record$47$1387);
|
|
12108
12141
|
_tmp = _ + 1 | 0;
|
|
12109
12142
|
continue;
|
|
12110
12143
|
} else break;
|
|
@@ -12135,10 +12168,12 @@ function f4ah6o$jww_parser$core$$Document$default() {
|
|
|
12135
12168
|
paper_size: 0,
|
|
12136
12169
|
write_layer_group: 0,
|
|
12137
12170
|
layer_groups,
|
|
12138
|
-
entities: moonbitlang$core$array$$Array$new$46$inner$
|
|
12139
|
-
block_defs: moonbitlang$core$array$$Array$new$46$inner$
|
|
12140
|
-
embedded_images: moonbitlang$core$array$$Array$new$46$inner$
|
|
12141
|
-
print_settings: f4ah6o$jww_parser$core$$default$46$record$47$
|
|
12171
|
+
entities: moonbitlang$core$array$$Array$new$46$inner$23$(0),
|
|
12172
|
+
block_defs: moonbitlang$core$array$$Array$new$46$inner$24$(0),
|
|
12173
|
+
embedded_images: moonbitlang$core$array$$Array$new$46$inner$25$(0),
|
|
12174
|
+
print_settings: f4ah6o$jww_parser$core$$default$46$record$47$1393,
|
|
12175
|
+
sunpou_settings: f4ah6o$jww_parser$core$$default$46$record$47$1392,
|
|
12176
|
+
metadata_settings: f4ah6o$jww_parser$core$$default$46$record$47$1391
|
|
12142
12177
|
};
|
|
12143
12178
|
}
|
|
12144
12179
|
function f4ah6o$jww_parser$core$$Entity$base(self) {
|
|
@@ -12198,6 +12233,111 @@ function f4ah6o$jww_parser$core$$parse_print_settings(reader) {
|
|
|
12198
12233
|
rotation_setting: f4ah6o$jww_parser$core$$Reader$read_dword(reader)
|
|
12199
12234
|
};
|
|
12200
12235
|
}
|
|
12236
|
+
function f4ah6o$jww_parser$core$$parse_sunpou_settings(reader) {
|
|
12237
|
+
let _tmp = 0;
|
|
12238
|
+
while (true) {
|
|
12239
|
+
const _ = _tmp;
|
|
12240
|
+
if (_ < 14) {
|
|
12241
|
+
f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12242
|
+
_tmp = _ + 1 | 0;
|
|
12243
|
+
continue;
|
|
12244
|
+
} else break;
|
|
12245
|
+
}
|
|
12246
|
+
return {
|
|
12247
|
+
sunpou1: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12248
|
+
sunpou2: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12249
|
+
sunpou3: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12250
|
+
sunpou4: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12251
|
+
sunpou5: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12252
|
+
dummy: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12253
|
+
max_line_width: f4ah6o$jww_parser$core$$Reader$read_dword(reader)
|
|
12254
|
+
};
|
|
12255
|
+
}
|
|
12256
|
+
function f4ah6o$jww_parser$core$$read_cstring(reader) {
|
|
12257
|
+
const len_byte = f4ah6o$jww_parser$core$$Reader$read_byte(reader);
|
|
12258
|
+
let length;
|
|
12259
|
+
if (len_byte < 255) length = len_byte;
|
|
12260
|
+
else {
|
|
12261
|
+
const len_word = f4ah6o$jww_parser$core$$Reader$read_word(reader);
|
|
12262
|
+
if (len_word < 65535) length = len_word;
|
|
12263
|
+
else {
|
|
12264
|
+
const len_dword = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12265
|
+
length = len_dword < 0 || len_dword > 1e6 ? 0 : len_dword;
|
|
12266
|
+
}
|
|
12267
|
+
}
|
|
12268
|
+
if (length <= 0 || length > 1e6) return "";
|
|
12269
|
+
return f4ah6o$encoding_sjis$$shift_jis_to_utf8(f4ah6o$jww_parser$core$$Reader$read_bytes(reader, (reader.data.length - reader.pos | 0) < length ? reader.data.length - reader.pos | 0 : length));
|
|
12270
|
+
}
|
|
12271
|
+
function f4ah6o$jww_parser$core$$parse_layer_names(reader, layer_groups) {
|
|
12272
|
+
const layer_names = moonbitlang$core$array$$Array$new$46$inner$15$(0);
|
|
12273
|
+
let _tmp = 0;
|
|
12274
|
+
while (true) {
|
|
12275
|
+
const _g_idx = _tmp;
|
|
12276
|
+
if (_g_idx < 16) {
|
|
12277
|
+
const group_layer_names = moonbitlang$core$array$$Array$new$46$inner$13$(0);
|
|
12278
|
+
let _tmp$2$1 = 0;
|
|
12279
|
+
while (true) {
|
|
12280
|
+
const _l_idx = _tmp$2$1;
|
|
12281
|
+
if (_l_idx < 16) {
|
|
12282
|
+
moonbitlang$core$array$$Array$push$13$(group_layer_names, f4ah6o$jww_parser$core$$read_cstring(reader));
|
|
12283
|
+
_tmp$2$1 = _l_idx + 1 | 0;
|
|
12284
|
+
continue;
|
|
12285
|
+
} else break;
|
|
12286
|
+
}
|
|
12287
|
+
moonbitlang$core$array$$Array$push$15$(layer_names, group_layer_names);
|
|
12288
|
+
_tmp = _g_idx + 1 | 0;
|
|
12289
|
+
continue;
|
|
12290
|
+
} else break;
|
|
12291
|
+
}
|
|
12292
|
+
const group_names = moonbitlang$core$array$$Array$new$46$inner$13$(0);
|
|
12293
|
+
let _tmp$2 = 0;
|
|
12294
|
+
while (true) {
|
|
12295
|
+
const _g_idx = _tmp$2;
|
|
12296
|
+
if (_g_idx < 16) {
|
|
12297
|
+
moonbitlang$core$array$$Array$push$13$(group_names, f4ah6o$jww_parser$core$$read_cstring(reader));
|
|
12298
|
+
_tmp$2 = _g_idx + 1 | 0;
|
|
12299
|
+
continue;
|
|
12300
|
+
} else break;
|
|
12301
|
+
}
|
|
12302
|
+
const result = moonbitlang$core$array$$Array$new$46$inner$12$(0);
|
|
12303
|
+
const _end375 = layer_groups.length;
|
|
12304
|
+
let _tmp$3 = 0;
|
|
12305
|
+
while (true) {
|
|
12306
|
+
const g_idx = _tmp$3;
|
|
12307
|
+
if (g_idx < _end375) {
|
|
12308
|
+
const lg = moonbitlang$core$array$$Array$at$12$(layer_groups, g_idx);
|
|
12309
|
+
const group_name = moonbitlang$core$array$$Array$at$13$(group_names, g_idx);
|
|
12310
|
+
const layers = moonbitlang$core$array$$Array$new$46$inner$14$(0);
|
|
12311
|
+
const _end383 = lg.layers.length;
|
|
12312
|
+
let _tmp$4 = 0;
|
|
12313
|
+
while (true) {
|
|
12314
|
+
const l_idx = _tmp$4;
|
|
12315
|
+
if (l_idx < _end383) {
|
|
12316
|
+
const l = moonbitlang$core$array$$Array$at$14$(lg.layers, l_idx);
|
|
12317
|
+
const layer_name = moonbitlang$core$array$$Array$at$13$(moonbitlang$core$array$$Array$at$15$(layer_names, g_idx), l_idx);
|
|
12318
|
+
moonbitlang$core$array$$Array$push$14$(layers, {
|
|
12319
|
+
state: l.state,
|
|
12320
|
+
protect: l.protect,
|
|
12321
|
+
name: layer_name
|
|
12322
|
+
});
|
|
12323
|
+
_tmp$4 = l_idx + 1 | 0;
|
|
12324
|
+
continue;
|
|
12325
|
+
} else break;
|
|
12326
|
+
}
|
|
12327
|
+
moonbitlang$core$array$$Array$push$12$(result, {
|
|
12328
|
+
state: lg.state,
|
|
12329
|
+
write_layer: lg.write_layer,
|
|
12330
|
+
scale: lg.scale,
|
|
12331
|
+
protect: lg.protect,
|
|
12332
|
+
layers,
|
|
12333
|
+
name: group_name
|
|
12334
|
+
});
|
|
12335
|
+
_tmp$3 = g_idx + 1 | 0;
|
|
12336
|
+
continue;
|
|
12337
|
+
} else break;
|
|
12338
|
+
}
|
|
12339
|
+
return result;
|
|
12340
|
+
}
|
|
12201
12341
|
function f4ah6o$jww_parser$core$$find_entity_list_offset(data, version) {
|
|
12202
12342
|
const schema_low = version & 255;
|
|
12203
12343
|
const schema_high = version >>> 8 & 255;
|
|
@@ -12265,18 +12405,33 @@ function f4ah6o$jww_parser$core$$find_bm_marker(content) {
|
|
|
12265
12405
|
if (len < 4) return;
|
|
12266
12406
|
let i = 0;
|
|
12267
12407
|
while (true) if (i < (len - 3 | 0)) {
|
|
12268
|
-
if (moonbitlang$core$array$$Array$at$
|
|
12408
|
+
if (moonbitlang$core$array$$Array$at$16$(chars, i) === 94 && moonbitlang$core$array$$Array$at$16$(chars, i + 1 | 0) === 64 && moonbitlang$core$array$$Array$at$16$(chars, i + 2 | 0) === 66 && moonbitlang$core$array$$Array$at$16$(chars, i + 3 | 0) === 77) return i;
|
|
12269
12409
|
i = i + 1 | 0;
|
|
12270
12410
|
continue;
|
|
12271
12411
|
} else break;
|
|
12272
12412
|
}
|
|
12413
|
+
function f4ah6o$jww_parser$core$$is_metadata_text(content) {
|
|
12414
|
+
return moonbitlang$core$string$$String$has_prefix(content, {
|
|
12415
|
+
str: f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$940,
|
|
12416
|
+
start: 0,
|
|
12417
|
+
end: 8
|
|
12418
|
+
}) || moonbitlang$core$string$$String$has_prefix(content, {
|
|
12419
|
+
str: f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$941,
|
|
12420
|
+
start: 0,
|
|
12421
|
+
end: 5
|
|
12422
|
+
}) || moonbitlang$core$string$$String$has_prefix(content, {
|
|
12423
|
+
str: f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$942,
|
|
12424
|
+
start: 0,
|
|
12425
|
+
end: 5
|
|
12426
|
+
});
|
|
12427
|
+
}
|
|
12273
12428
|
function f4ah6o$jww_parser$core$$normalize_image_path(raw_path) {
|
|
12274
12429
|
const all_chars = moonbitlang$core$string$$String$to_array(raw_path);
|
|
12275
12430
|
const chars = moonbitlang$core$string$$String$has_prefix(raw_path, {
|
|
12276
|
-
str: f4ah6o$jww_parser$core$$normalize_image_path$46$42$bind$124$
|
|
12431
|
+
str: f4ah6o$jww_parser$core$$normalize_image_path$46$42$bind$124$945,
|
|
12277
12432
|
start: 0,
|
|
12278
12433
|
end: 6
|
|
12279
|
-
}) && all_chars.length > 6 ? moonbitlang$core$array$$Array$from_iter$
|
|
12434
|
+
}) && all_chars.length > 6 ? moonbitlang$core$array$$Array$from_iter$16$(moonbitlang$core$array$$ArrayView$iter$16$(moonbitlang$core$array$$Array$sub$46$inner$16$(all_chars, 6, void 0))) : all_chars;
|
|
12280
12435
|
let normalized = "";
|
|
12281
12436
|
let prev_was_letter = false;
|
|
12282
12437
|
const _len = chars.length;
|
|
@@ -12289,7 +12444,7 @@ function f4ah6o$jww_parser$core$$normalize_image_path(raw_path) {
|
|
|
12289
12444
|
normalized = `${normalized}/`;
|
|
12290
12445
|
prev_was_letter = false;
|
|
12291
12446
|
} else {
|
|
12292
|
-
normalized = `${normalized}${moonbitlang$core$builtin$$Show$to_string$
|
|
12447
|
+
normalized = `${normalized}${moonbitlang$core$builtin$$Show$to_string$16$(c)}`;
|
|
12293
12448
|
prev_was_letter = c >= 65 && c <= 90 || c >= 97 && c <= 122;
|
|
12294
12449
|
}
|
|
12295
12450
|
_tmp = _i + 1 | 0;
|
|
@@ -12314,22 +12469,22 @@ function f4ah6o$jww_parser$core$$parse_double_or_default(s, default_) {
|
|
|
12314
12469
|
return default_;
|
|
12315
12470
|
}
|
|
12316
12471
|
function f4ah6o$jww_parser$core$$split_by_comma(path_and_params) {
|
|
12317
|
-
const result = moonbitlang$core$array$$Array$new$46$inner$
|
|
12472
|
+
const result = moonbitlang$core$array$$Array$new$46$inner$13$(0);
|
|
12318
12473
|
let current = "";
|
|
12319
12474
|
const _it = moonbitlang$core$string$$String$iterator(path_and_params);
|
|
12320
12475
|
while (true) {
|
|
12321
|
-
const _bind = moonbitlang$core$builtin$$Iterator$next$
|
|
12476
|
+
const _bind = moonbitlang$core$builtin$$Iterator$next$16$(_it);
|
|
12322
12477
|
if (_bind === -1) break;
|
|
12323
12478
|
else {
|
|
12324
12479
|
const _c = _bind;
|
|
12325
12480
|
if (_c === 44) {
|
|
12326
|
-
moonbitlang$core$array$$Array$push$
|
|
12481
|
+
moonbitlang$core$array$$Array$push$13$(result, current);
|
|
12327
12482
|
current = "";
|
|
12328
|
-
} else current = `${current}${moonbitlang$core$builtin$$Show$to_string$
|
|
12483
|
+
} else current = `${current}${moonbitlang$core$builtin$$Show$to_string$16$(_c)}`;
|
|
12329
12484
|
continue;
|
|
12330
12485
|
}
|
|
12331
12486
|
}
|
|
12332
|
-
if (!(current === "")) moonbitlang$core$array$$Array$push$
|
|
12487
|
+
if (!(current === "")) moonbitlang$core$array$$Array$push$13$(result, current);
|
|
12333
12488
|
return result;
|
|
12334
12489
|
}
|
|
12335
12490
|
function f4ah6o$jww_parser$core$$parse_image_from_bm_string(content, base, start_x, start_y, angle, size_x, size_y) {
|
|
@@ -12339,33 +12494,18 @@ function f4ah6o$jww_parser$core$$parse_image_from_bm_string(content, base, start
|
|
|
12339
12494
|
else bm_offset = _bind;
|
|
12340
12495
|
const chars = moonbitlang$core$string$$String$to_array(content);
|
|
12341
12496
|
if (chars.length <= (bm_offset + 4 | 0)) return;
|
|
12342
|
-
const parts = f4ah6o$jww_parser$core$$split_by_comma(moonbitlang$core$string$$String$from_array(moonbitlang$core$array$$Array$sub$46$inner$
|
|
12497
|
+
const parts = f4ah6o$jww_parser$core$$split_by_comma(moonbitlang$core$string$$String$from_array(moonbitlang$core$array$$Array$sub$46$inner$16$(chars, bm_offset + 4 | 0, void 0)));
|
|
12343
12498
|
if (parts.length < 1) return;
|
|
12344
12499
|
return {
|
|
12345
12500
|
base,
|
|
12346
|
-
image_path: f4ah6o$jww_parser$core$$normalize_image_path(moonbitlang$core$array$$Array$at$
|
|
12501
|
+
image_path: f4ah6o$jww_parser$core$$normalize_image_path(moonbitlang$core$array$$Array$at$13$(parts, 0)),
|
|
12347
12502
|
x: start_x,
|
|
12348
12503
|
y: start_y,
|
|
12349
|
-
width: parts.length >= 2 ? f4ah6o$jww_parser$core$$parse_double_or_default(moonbitlang$core$array$$Array$at$
|
|
12350
|
-
height: parts.length >= 3 ? f4ah6o$jww_parser$core$$parse_double_or_default(moonbitlang$core$array$$Array$at$
|
|
12504
|
+
width: parts.length >= 2 ? f4ah6o$jww_parser$core$$parse_double_or_default(moonbitlang$core$array$$Array$at$13$(parts, 1), size_x) : size_x,
|
|
12505
|
+
height: parts.length >= 3 ? f4ah6o$jww_parser$core$$parse_double_or_default(moonbitlang$core$array$$Array$at$13$(parts, 2), size_y) : size_y,
|
|
12351
12506
|
rotation: angle
|
|
12352
12507
|
};
|
|
12353
12508
|
}
|
|
12354
|
-
function f4ah6o$jww_parser$core$$read_cstring(reader) {
|
|
12355
|
-
const len_byte = f4ah6o$jww_parser$core$$Reader$read_byte(reader);
|
|
12356
|
-
let length;
|
|
12357
|
-
if (len_byte < 255) length = len_byte;
|
|
12358
|
-
else {
|
|
12359
|
-
const len_word = f4ah6o$jww_parser$core$$Reader$read_word(reader);
|
|
12360
|
-
if (len_word < 65535) length = len_word;
|
|
12361
|
-
else {
|
|
12362
|
-
const len_dword = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12363
|
-
length = len_dword < 0 || len_dword > 1e6 ? 0 : len_dword;
|
|
12364
|
-
}
|
|
12365
|
-
}
|
|
12366
|
-
if (length <= 0 || length > 1e6) return "";
|
|
12367
|
-
return f4ah6o$encoding_sjis$$shift_jis_to_utf8(f4ah6o$jww_parser$core$$Reader$read_bytes(reader, (reader.data.length - reader.pos | 0) < length ? reader.data.length - reader.pos | 0 : length));
|
|
12368
|
-
}
|
|
12369
12509
|
function f4ah6o$jww_parser$core$$parse_entity_by_class(class_name, reader, version) {
|
|
12370
12510
|
if (class_name === "CDataSen") return new $64$f4ah6o$47$jww_parser$47$core$46$Entity$Line({
|
|
12371
12511
|
base: f4ah6o$jww_parser$core$$parse_entity_base(reader, version),
|
|
@@ -12420,7 +12560,8 @@ function f4ah6o$jww_parser$core$$parse_entity_by_class(class_name, reader, versi
|
|
|
12420
12560
|
const angle = f4ah6o$jww_parser$core$Reader$read_double(reader);
|
|
12421
12561
|
const font_name = f4ah6o$jww_parser$core$$read_cstring(reader);
|
|
12422
12562
|
const content = f4ah6o$jww_parser$core$$read_cstring(reader);
|
|
12423
|
-
if (f4ah6o$jww_parser$core$$
|
|
12563
|
+
if (f4ah6o$jww_parser$core$$is_metadata_text(content)) return;
|
|
12564
|
+
else if (f4ah6o$jww_parser$core$$find_bm_marker(content) === void 0) return new $64$f4ah6o$47$jww_parser$47$core$46$Entity$Text({
|
|
12424
12565
|
base,
|
|
12425
12566
|
start_x,
|
|
12426
12567
|
start_y,
|
|
@@ -12557,14 +12698,14 @@ function f4ah6o$jww_parser$core$$parse_entity_with_pid_tracking(reader, version,
|
|
|
12557
12698
|
const _tmp$2 = name_chars;
|
|
12558
12699
|
$bound_check(name_bytes, i);
|
|
12559
12700
|
const _p = name_bytes[i];
|
|
12560
|
-
name_chars = `${_tmp$2}${moonbitlang$core$builtin$$Show$to_string$
|
|
12701
|
+
name_chars = `${_tmp$2}${moonbitlang$core$builtin$$Show$to_string$16$(_p)}`;
|
|
12561
12702
|
_tmp = i + 1 | 0;
|
|
12562
12703
|
continue;
|
|
12563
12704
|
} else break;
|
|
12564
12705
|
}
|
|
12565
12706
|
class_name = name_chars;
|
|
12566
12707
|
const pid = updated_next_pid;
|
|
12567
|
-
if (pid < 65536) moonbitlang$core$array$$Array$set$
|
|
12708
|
+
if (pid < 65536) moonbitlang$core$array$$Array$set$13$(pid_to_class, pid, class_name);
|
|
12568
12709
|
updated_next_pid = (pid >>> 0) + 1 | 0;
|
|
12569
12710
|
} else if (class_id === 32768) return {
|
|
12570
12711
|
entity: void 0,
|
|
@@ -12574,7 +12715,7 @@ function f4ah6o$jww_parser$core$$parse_entity_with_pid_tracking(reader, version,
|
|
|
12574
12715
|
else {
|
|
12575
12716
|
const class_pid = class_id & 32767;
|
|
12576
12717
|
if (class_pid < 65536) {
|
|
12577
|
-
const name = moonbitlang$core$array$$Array$at$
|
|
12718
|
+
const name = moonbitlang$core$array$$Array$at$13$(pid_to_class, class_pid);
|
|
12578
12719
|
if (name === "") {
|
|
12579
12720
|
f4ah6o$jww_parser$core$$parse_entity_base(reader, version);
|
|
12580
12721
|
f4ah6o$jww_parser$core$Reader$read_double(reader);
|
|
@@ -12611,13 +12752,13 @@ function f4ah6o$jww_parser$core$$parse_entity_list(data, offset, version) {
|
|
|
12611
12752
|
const reader = f4ah6o$jww_parser$core$$Reader$new(moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$Array$sub$46$inner$4$(moonbitlang$core$bytes$$Bytes$to_array(data), offset, data.length)));
|
|
12612
12753
|
const start_pos = reader.pos;
|
|
12613
12754
|
const count = f4ah6o$jww_parser$core$$Reader$read_word(reader);
|
|
12614
|
-
const entities = moonbitlang$core$array$$Array$new$46$inner$
|
|
12615
|
-
let pid_to_class = moonbitlang$core$array$$Array$new$46$inner$
|
|
12755
|
+
const entities = moonbitlang$core$array$$Array$new$46$inner$23$(0);
|
|
12756
|
+
let pid_to_class = moonbitlang$core$array$$Array$new$46$inner$13$(0);
|
|
12616
12757
|
let _tmp = 0;
|
|
12617
12758
|
while (true) {
|
|
12618
12759
|
const _ = _tmp;
|
|
12619
12760
|
if (_ < 65536) {
|
|
12620
|
-
moonbitlang$core$array$$Array$push$
|
|
12761
|
+
moonbitlang$core$array$$Array$push$13$(pid_to_class, "");
|
|
12621
12762
|
_tmp = _ + 1 | 0;
|
|
12622
12763
|
continue;
|
|
12623
12764
|
} else break;
|
|
@@ -12639,7 +12780,7 @@ function f4ah6o$jww_parser$core$$parse_entity_list(data, offset, version) {
|
|
|
12639
12780
|
const _ent = _x;
|
|
12640
12781
|
const _p2c = result.pid_to_class;
|
|
12641
12782
|
const _npid = result.next_pid;
|
|
12642
|
-
moonbitlang$core$array$$Array$push$
|
|
12783
|
+
moonbitlang$core$array$$Array$push$23$(entities, _ent);
|
|
12643
12784
|
pid_to_class = _p2c;
|
|
12644
12785
|
next_pid = _npid;
|
|
12645
12786
|
}
|
|
@@ -12667,14 +12808,14 @@ function f4ah6o$jww_parser$core$$parse_block_def_with_tracking(reader, version,
|
|
|
12667
12808
|
const _tmp$2 = name_chars;
|
|
12668
12809
|
$bound_check(name_bytes, i);
|
|
12669
12810
|
const _p = name_bytes[i];
|
|
12670
|
-
name_chars = `${_tmp$2}${moonbitlang$core$builtin$$Show$to_string$
|
|
12811
|
+
name_chars = `${_tmp$2}${moonbitlang$core$builtin$$Show$to_string$16$(_p)}`;
|
|
12671
12812
|
_tmp = i + 1 | 0;
|
|
12672
12813
|
continue;
|
|
12673
12814
|
} else break;
|
|
12674
12815
|
}
|
|
12675
12816
|
const class_name = name_chars;
|
|
12676
12817
|
const id_int = next_id;
|
|
12677
|
-
if (id_int < 256) moonbitlang$core$array$$Array$set$
|
|
12818
|
+
if (id_int < 256) moonbitlang$core$array$$Array$set$13$(class_map, id_int, class_name);
|
|
12678
12819
|
_bind = {
|
|
12679
12820
|
_0: class_map,
|
|
12680
12821
|
_1: (next_id + 1 | 0) & 65535
|
|
@@ -12687,7 +12828,7 @@ function f4ah6o$jww_parser$core$$parse_block_def_with_tracking(reader, version,
|
|
|
12687
12828
|
else {
|
|
12688
12829
|
const class_pid = class_id & 32767;
|
|
12689
12830
|
if (class_pid < 256) {
|
|
12690
|
-
moonbitlang$core$array$$Array$at$
|
|
12831
|
+
moonbitlang$core$array$$Array$at$13$(class_map, class_pid);
|
|
12691
12832
|
_bind = {
|
|
12692
12833
|
_0: class_map,
|
|
12693
12834
|
_1: next_id
|
|
@@ -12725,27 +12866,27 @@ function f4ah6o$jww_parser$core$$parse_block_def_with_tracking(reader, version,
|
|
|
12725
12866
|
}
|
|
12726
12867
|
function f4ah6o$jww_parser$core$$parse_block_def_list(data, offset, version) {
|
|
12727
12868
|
if (offset >= data.length) return {
|
|
12728
|
-
block_defs: moonbitlang$core$array$$Array$new$46$inner$
|
|
12869
|
+
block_defs: moonbitlang$core$array$$Array$new$46$inner$24$(0),
|
|
12729
12870
|
end_offset: offset
|
|
12730
12871
|
};
|
|
12731
12872
|
const reader = f4ah6o$jww_parser$core$$Reader$new(moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$Array$sub$46$inner$4$(moonbitlang$core$bytes$$Bytes$to_array(data), offset, data.length)));
|
|
12732
12873
|
const start_pos = reader.pos;
|
|
12733
12874
|
if ((reader.data.length - reader.pos | 0) < 4) return {
|
|
12734
|
-
block_defs: moonbitlang$core$array$$Array$new$46$inner$
|
|
12875
|
+
block_defs: moonbitlang$core$array$$Array$new$46$inner$24$(0),
|
|
12735
12876
|
end_offset: offset
|
|
12736
12877
|
};
|
|
12737
12878
|
const count = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12738
12879
|
if (count >>> 0 > 1e4) return {
|
|
12739
|
-
block_defs: moonbitlang$core$array$$Array$new$46$inner$
|
|
12880
|
+
block_defs: moonbitlang$core$array$$Array$new$46$inner$24$(0),
|
|
12740
12881
|
end_offset: offset
|
|
12741
12882
|
};
|
|
12742
|
-
const block_defs = moonbitlang$core$array$$Array$new$46$inner$
|
|
12743
|
-
let class_map = moonbitlang$core$array$$Array$new$46$inner$
|
|
12883
|
+
const block_defs = moonbitlang$core$array$$Array$new$46$inner$24$(0);
|
|
12884
|
+
let class_map = moonbitlang$core$array$$Array$new$46$inner$13$(0);
|
|
12744
12885
|
let _tmp = 0;
|
|
12745
12886
|
while (true) {
|
|
12746
12887
|
const _ = _tmp;
|
|
12747
12888
|
if (_ < 256) {
|
|
12748
|
-
moonbitlang$core$array$$Array$push$
|
|
12889
|
+
moonbitlang$core$array$$Array$push$13$(class_map, "");
|
|
12749
12890
|
_tmp = _ + 1 | 0;
|
|
12750
12891
|
continue;
|
|
12751
12892
|
} else break;
|
|
@@ -12759,7 +12900,7 @@ function f4ah6o$jww_parser$core$$parse_block_def_list(data, offset, version) {
|
|
|
12759
12900
|
if ((reader.data.length - reader.pos | 0) < 8) break;
|
|
12760
12901
|
const result = f4ah6o$jww_parser$core$$parse_block_def_with_tracking(reader, version, class_map, next_id);
|
|
12761
12902
|
const _bind = result.block_def;
|
|
12762
|
-
if (_bind === void 0) {} else moonbitlang$core$array$$Array$push$
|
|
12903
|
+
if (_bind === void 0) {} else moonbitlang$core$array$$Array$push$24$(block_defs, _bind);
|
|
12763
12904
|
class_map = result.class_map;
|
|
12764
12905
|
next_id = result.next_id;
|
|
12765
12906
|
_tmp$2 = _ + 1 | 0;
|
|
@@ -12803,20 +12944,20 @@ function f4ah6o$jww_parser$core$$parse_single_embedded_image(reader, index) {
|
|
|
12803
12944
|
};
|
|
12804
12945
|
}
|
|
12805
12946
|
function f4ah6o$jww_parser$core$$parse_embedded_images(data, offset, version) {
|
|
12806
|
-
if (version >>> 0 < 700) return moonbitlang$core$array$$Array$new$46$inner$
|
|
12807
|
-
if (offset >= data.length) return moonbitlang$core$array$$Array$new$46$inner$
|
|
12947
|
+
if (version >>> 0 < 700) return moonbitlang$core$array$$Array$new$46$inner$25$(0);
|
|
12948
|
+
if (offset >= data.length) return moonbitlang$core$array$$Array$new$46$inner$25$(0);
|
|
12808
12949
|
const reader = f4ah6o$jww_parser$core$$Reader$new(moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$Array$sub$46$inner$4$(moonbitlang$core$bytes$$Bytes$to_array(data), offset, data.length)));
|
|
12809
|
-
if ((reader.data.length - reader.pos | 0) < 4) return moonbitlang$core$array$$Array$new$46$inner$
|
|
12950
|
+
if ((reader.data.length - reader.pos | 0) < 4) return moonbitlang$core$array$$Array$new$46$inner$25$(0);
|
|
12810
12951
|
const count = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12811
|
-
if (count >>> 0 > 1e3) return moonbitlang$core$array$$Array$new$46$inner$
|
|
12812
|
-
const embedded_images = moonbitlang$core$array$$Array$new$46$inner$
|
|
12952
|
+
if (count >>> 0 > 1e3) return moonbitlang$core$array$$Array$new$46$inner$25$(0);
|
|
12953
|
+
const embedded_images = moonbitlang$core$array$$Array$new$46$inner$25$(0);
|
|
12813
12954
|
const _end15 = count;
|
|
12814
12955
|
let _tmp = 0;
|
|
12815
12956
|
while (true) {
|
|
12816
12957
|
const i = _tmp;
|
|
12817
12958
|
if (i < _end15) {
|
|
12818
12959
|
const result = f4ah6o$jww_parser$core$$parse_single_embedded_image(reader, i);
|
|
12819
|
-
if (result === void 0) {} else moonbitlang$core$array$$Array$push$
|
|
12960
|
+
if (result === void 0) {} else moonbitlang$core$array$$Array$push$25$(embedded_images, result);
|
|
12820
12961
|
_tmp = i + 1 | 0;
|
|
12821
12962
|
continue;
|
|
12822
12963
|
} else break;
|
|
@@ -12825,22 +12966,22 @@ function f4ah6o$jww_parser$core$$parse_embedded_images(data, offset, version) {
|
|
|
12825
12966
|
}
|
|
12826
12967
|
function f4ah6o$jww_parser$core$$set_layer_names(layer_groups) {
|
|
12827
12968
|
const result = moonbitlang$core$array$$Array$new$46$inner$12$(0);
|
|
12828
|
-
const
|
|
12969
|
+
const _end290 = layer_groups.length;
|
|
12829
12970
|
let _tmp = 0;
|
|
12830
12971
|
while (true) {
|
|
12831
12972
|
const g_idx = _tmp;
|
|
12832
|
-
if (g_idx <
|
|
12973
|
+
if (g_idx < _end290) {
|
|
12833
12974
|
const lg = moonbitlang$core$array$$Array$at$12$(layer_groups, g_idx);
|
|
12834
12975
|
const group_name = lg.name === "" ? `Group${moonbitlang$core$int$$Int$to_string$46$inner(g_idx, 10)}` : lg.name;
|
|
12835
|
-
const layers = moonbitlang$core$array$$Array$new$46$inner$
|
|
12836
|
-
const
|
|
12976
|
+
const layers = moonbitlang$core$array$$Array$new$46$inner$14$(0);
|
|
12977
|
+
const _end298 = lg.layers.length;
|
|
12837
12978
|
let _tmp$2 = 0;
|
|
12838
12979
|
while (true) {
|
|
12839
12980
|
const l_idx = _tmp$2;
|
|
12840
|
-
if (l_idx <
|
|
12841
|
-
const l = moonbitlang$core$array$$Array$at$
|
|
12981
|
+
if (l_idx < _end298) {
|
|
12982
|
+
const l = moonbitlang$core$array$$Array$at$14$(lg.layers, l_idx);
|
|
12842
12983
|
const layer_name = l.name === "" ? `${moonbitlang$core$int$$Int$to_string$46$inner(g_idx, 10)}-${moonbitlang$core$int$$Int$to_string$46$inner(l_idx, 10)}` : l.name;
|
|
12843
|
-
moonbitlang$core$array$$Array$push$
|
|
12984
|
+
moonbitlang$core$array$$Array$push$14$(layers, {
|
|
12844
12985
|
state: l.state,
|
|
12845
12986
|
protect: l.protect,
|
|
12846
12987
|
name: layer_name
|
|
@@ -12865,7 +13006,7 @@ function f4ah6o$jww_parser$core$$set_layer_names(layer_groups) {
|
|
|
12865
13006
|
}
|
|
12866
13007
|
function f4ah6o$jww_parser$core$$parse(data) {
|
|
12867
13008
|
if (data.length < 8) return f4ah6o$jww_parser$core$$Document$default();
|
|
12868
|
-
if (moonbitlang$core$builtin$$op_notequal$11$(moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$Array$sub$46$inner$4$(moonbitlang$core$bytes$$Bytes$to_array(data), 0, f4ah6o$jww_parser$core$$parse$46$constr$47$
|
|
13009
|
+
if (moonbitlang$core$builtin$$op_notequal$11$(moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$Array$sub$46$inner$4$(moonbitlang$core$bytes$$Bytes$to_array(data), 0, f4ah6o$jww_parser$core$$parse$46$constr$47$1778)), $bytes_literal$1)) return f4ah6o$jww_parser$core$$Document$default();
|
|
12869
13010
|
const reader = f4ah6o$jww_parser$core$$Reader$new(moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$Array$sub$46$inner$4$(moonbitlang$core$bytes$$Bytes$to_array(data), 8, data.length)));
|
|
12870
13011
|
const version = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12871
13012
|
const memo = f4ah6o$jww_parser$core$$read_cstring(reader);
|
|
@@ -12880,12 +13021,12 @@ function f4ah6o$jww_parser$core$$parse(data) {
|
|
|
12880
13021
|
const write_layer = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12881
13022
|
const scale = f4ah6o$jww_parser$core$Reader$read_double(reader);
|
|
12882
13023
|
const protect = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12883
|
-
const layers = moonbitlang$core$array$$Array$new$46$inner$
|
|
13024
|
+
const layers = moonbitlang$core$array$$Array$new$46$inner$14$(0);
|
|
12884
13025
|
let _tmp$2 = 0;
|
|
12885
13026
|
while (true) {
|
|
12886
13027
|
const _l_idx = _tmp$2;
|
|
12887
13028
|
if (_l_idx < 16) {
|
|
12888
|
-
moonbitlang$core$array$$Array$push$
|
|
13029
|
+
moonbitlang$core$array$$Array$push$14$(layers, {
|
|
12889
13030
|
state: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12890
13031
|
protect: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12891
13032
|
name: ""
|
|
@@ -12907,11 +13048,13 @@ function f4ah6o$jww_parser$core$$parse(data) {
|
|
|
12907
13048
|
} else break;
|
|
12908
13049
|
}
|
|
12909
13050
|
const print_settings = f4ah6o$jww_parser$core$$parse_print_settings(reader);
|
|
13051
|
+
const sunpou_settings = f4ah6o$jww_parser$core$$parse_sunpou_settings(reader);
|
|
13052
|
+
const layer_groups$2 = f4ah6o$jww_parser$core$$parse_layer_names(reader, layer_groups);
|
|
12910
13053
|
const entity_offset = f4ah6o$jww_parser$core$$find_entity_list_offset(data, version);
|
|
12911
13054
|
let _bind;
|
|
12912
13055
|
if (entity_offset === void 0) _bind = {
|
|
12913
|
-
_0: moonbitlang$core$array$$Array$new$46$inner$
|
|
12914
|
-
_1: moonbitlang$core$array$$Array$new$46$inner$
|
|
13056
|
+
_0: moonbitlang$core$array$$Array$new$46$inner$23$(0),
|
|
13057
|
+
_1: moonbitlang$core$array$$Array$new$46$inner$24$(0),
|
|
12915
13058
|
_2: 0
|
|
12916
13059
|
};
|
|
12917
13060
|
else {
|
|
@@ -12927,17 +13070,19 @@ function f4ah6o$jww_parser$core$$parse(data) {
|
|
|
12927
13070
|
const _entities = _bind._0;
|
|
12928
13071
|
const _block_defs = _bind._1;
|
|
12929
13072
|
const _block_end_offset = _bind._2;
|
|
12930
|
-
const embedded_images = version >>> 0 >= 700 ? f4ah6o$jww_parser$core$$parse_embedded_images(data, _block_end_offset, version) : moonbitlang$core$array$$Array$new$46$inner$
|
|
13073
|
+
const embedded_images = version >>> 0 >= 700 ? f4ah6o$jww_parser$core$$parse_embedded_images(data, _block_end_offset, version) : moonbitlang$core$array$$Array$new$46$inner$25$(0);
|
|
12931
13074
|
return {
|
|
12932
13075
|
version,
|
|
12933
13076
|
memo,
|
|
12934
13077
|
paper_size,
|
|
12935
13078
|
write_layer_group,
|
|
12936
|
-
layer_groups: f4ah6o$jww_parser$core$$set_layer_names(layer_groups),
|
|
13079
|
+
layer_groups: f4ah6o$jww_parser$core$$set_layer_names(layer_groups$2),
|
|
12937
13080
|
entities: _entities,
|
|
12938
13081
|
block_defs: _block_defs,
|
|
12939
13082
|
embedded_images,
|
|
12940
|
-
print_settings
|
|
13083
|
+
print_settings,
|
|
13084
|
+
sunpou_settings,
|
|
13085
|
+
metadata_settings: f4ah6o$jww_parser$core$$default$46$record$47$1391
|
|
12941
13086
|
};
|
|
12942
13087
|
}
|
|
12943
13088
|
function f4ah6o$jww_parser$dxf$$layer_table(doc) {
|
|
@@ -12975,17 +13120,17 @@ function f4ah6o$jww_parser$dxf$$ltype_table() {
|
|
|
12975
13120
|
output = `${output}2\nLTYPE\n`;
|
|
12976
13121
|
output = `${output}70\n11\n`;
|
|
12977
13122
|
const ltypes = [
|
|
12978
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
12979
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
12980
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
12981
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
12982
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
12983
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
12984
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
12985
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
12986
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
12987
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
12988
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
13123
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1820,
|
|
13124
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1821,
|
|
13125
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1822,
|
|
13126
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1823,
|
|
13127
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1824,
|
|
13128
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1825,
|
|
13129
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1826,
|
|
13130
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1827,
|
|
13131
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1828,
|
|
13132
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1829,
|
|
13133
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1830
|
|
12989
13134
|
];
|
|
12990
13135
|
const _len = ltypes.length;
|
|
12991
13136
|
let _tmp = 0;
|
|
@@ -13298,8 +13443,8 @@ function f4ah6o$jww_parser$dxf$$get_block_name(jww_doc, def_number) {
|
|
|
13298
13443
|
return `BLOCK_${moonbitlang$core$uint$$UInt$to_string$46$inner(def_number, 10)}`;
|
|
13299
13444
|
}
|
|
13300
13445
|
function f4ah6o$jww_parser$dxf$$get_layer_name(jww_doc, layer_group, layer) {
|
|
13301
|
-
if (moonbitlang$core$builtin$$Compare$op_lt$
|
|
13302
|
-
const layer_data = moonbitlang$core$array$$Array$at$
|
|
13446
|
+
if (moonbitlang$core$builtin$$Compare$op_lt$17$(layer_group, 16) && moonbitlang$core$builtin$$Compare$op_lt$17$(layer, 16)) {
|
|
13447
|
+
const layer_data = moonbitlang$core$array$$Array$at$14$(moonbitlang$core$array$$Array$at$12$(jww_doc.layer_groups, layer_group).layers, layer);
|
|
13303
13448
|
if (!(layer_data.name === "")) return layer_data.name;
|
|
13304
13449
|
}
|
|
13305
13450
|
return `${moonbitlang$core$uint16$$UInt16$to_string$46$inner(layer_group, 10)}-${moonbitlang$core$uint16$$UInt16$to_string$46$inner(layer, 10)}`;
|
|
@@ -13316,7 +13461,7 @@ function f4ah6o$jww_parser$dxf$$map_color(jww_color) {
|
|
|
13316
13461
|
case 7: return 7;
|
|
13317
13462
|
case 8: return 1;
|
|
13318
13463
|
case 9: return 8;
|
|
13319
|
-
default: return moonbitlang$core$builtin$$Compare$op_ge$
|
|
13464
|
+
default: return moonbitlang$core$builtin$$Compare$op_ge$17$(jww_color, 100) ? (jww_color - 100 | 0) + 10 | 0 : jww_color;
|
|
13320
13465
|
}
|
|
13321
13466
|
}
|
|
13322
13467
|
function f4ah6o$jww_parser$dxf$$map_line_type(pen_style) {
|
|
@@ -13492,7 +13637,7 @@ function f4ah6o$jww_parser$dxf$$convert_entity(entity, jww_doc) {
|
|
|
13492
13637
|
}
|
|
13493
13638
|
}
|
|
13494
13639
|
function f4ah6o$jww_parser$dxf$$convert_blocks(jww_doc) {
|
|
13495
|
-
const blocks = moonbitlang$core$array$$Array$new$46$inner$
|
|
13640
|
+
const blocks = moonbitlang$core$array$$Array$new$46$inner$28$(0);
|
|
13496
13641
|
const _arr = jww_doc.block_defs;
|
|
13497
13642
|
const _len = _arr.length;
|
|
13498
13643
|
let _tmp = 0;
|
|
@@ -13500,7 +13645,7 @@ function f4ah6o$jww_parser$dxf$$convert_blocks(jww_doc) {
|
|
|
13500
13645
|
const _i = _tmp;
|
|
13501
13646
|
if (_i < _len) {
|
|
13502
13647
|
const bd = _arr[_i];
|
|
13503
|
-
const block_entities = moonbitlang$core$array$$Array$new$46$inner$
|
|
13648
|
+
const block_entities = moonbitlang$core$array$$Array$new$46$inner$27$(0);
|
|
13504
13649
|
const _arr$2 = bd.entities;
|
|
13505
13650
|
const _len$2 = _arr$2.length;
|
|
13506
13651
|
let _tmp$2 = 0;
|
|
@@ -13509,12 +13654,12 @@ function f4ah6o$jww_parser$dxf$$convert_blocks(jww_doc) {
|
|
|
13509
13654
|
if (_i$2 < _len$2) {
|
|
13510
13655
|
const e = _arr$2[_i$2];
|
|
13511
13656
|
const _bind = f4ah6o$jww_parser$dxf$$convert_entity(e, jww_doc);
|
|
13512
|
-
if (_bind === void 0) {} else moonbitlang$core$array$$Array$push$
|
|
13657
|
+
if (_bind === void 0) {} else moonbitlang$core$array$$Array$push$27$(block_entities, _bind);
|
|
13513
13658
|
_tmp$2 = _i$2 + 1 | 0;
|
|
13514
13659
|
continue;
|
|
13515
13660
|
} else break;
|
|
13516
13661
|
}
|
|
13517
|
-
moonbitlang$core$array$$Array$push$
|
|
13662
|
+
moonbitlang$core$array$$Array$push$28$(blocks, {
|
|
13518
13663
|
name: bd.name,
|
|
13519
13664
|
base_x: 0,
|
|
13520
13665
|
base_y: 0,
|
|
@@ -13527,7 +13672,7 @@ function f4ah6o$jww_parser$dxf$$convert_blocks(jww_doc) {
|
|
|
13527
13672
|
return blocks;
|
|
13528
13673
|
}
|
|
13529
13674
|
function f4ah6o$jww_parser$dxf$$convert_entities(jww_doc) {
|
|
13530
|
-
const entities = moonbitlang$core$array$$Array$new$46$inner$
|
|
13675
|
+
const entities = moonbitlang$core$array$$Array$new$46$inner$27$(0);
|
|
13531
13676
|
const _arr = jww_doc.entities;
|
|
13532
13677
|
const _len = _arr.length;
|
|
13533
13678
|
let _tmp = 0;
|
|
@@ -13536,7 +13681,7 @@ function f4ah6o$jww_parser$dxf$$convert_entities(jww_doc) {
|
|
|
13536
13681
|
if (_i < _len) {
|
|
13537
13682
|
const jww_entity = _arr[_i];
|
|
13538
13683
|
const _bind = f4ah6o$jww_parser$dxf$$convert_entity(jww_entity, jww_doc);
|
|
13539
|
-
if (_bind === void 0) {} else moonbitlang$core$array$$Array$push$
|
|
13684
|
+
if (_bind === void 0) {} else moonbitlang$core$array$$Array$push$27$(entities, _bind);
|
|
13540
13685
|
_tmp = _i + 1 | 0;
|
|
13541
13686
|
continue;
|
|
13542
13687
|
} else break;
|
|
@@ -13544,7 +13689,7 @@ function f4ah6o$jww_parser$dxf$$convert_entities(jww_doc) {
|
|
|
13544
13689
|
return entities;
|
|
13545
13690
|
}
|
|
13546
13691
|
function f4ah6o$jww_parser$dxf$$convert_layers(jww_doc) {
|
|
13547
|
-
const layers = moonbitlang$core$array$$Array$new$46$inner$
|
|
13692
|
+
const layers = moonbitlang$core$array$$Array$new$46$inner$26$(0);
|
|
13548
13693
|
let _tmp = 0;
|
|
13549
13694
|
while (true) {
|
|
13550
13695
|
const g_idx = _tmp;
|
|
@@ -13554,8 +13699,8 @@ function f4ah6o$jww_parser$dxf$$convert_layers(jww_doc) {
|
|
|
13554
13699
|
while (true) {
|
|
13555
13700
|
const l_idx = _tmp$2;
|
|
13556
13701
|
if (l_idx < 16) {
|
|
13557
|
-
const l = moonbitlang$core$array$$Array$at$
|
|
13558
|
-
moonbitlang$core$array$$Array$push$
|
|
13702
|
+
const l = moonbitlang$core$array$$Array$at$14$(lg.layers, l_idx);
|
|
13703
|
+
moonbitlang$core$array$$Array$push$26$(layers, {
|
|
13559
13704
|
name: l.name === "" ? `${moonbitlang$core$int$$Int$to_string$46$inner(g_idx, 10)}-${moonbitlang$core$int$$Int$to_string$46$inner(l_idx, 10)}` : l.name,
|
|
13560
13705
|
color: (((Math.imul(g_idx, 16) | 0) + l_idx | 0) % 255 | 0) + 1 | 0,
|
|
13561
13706
|
line_type: "CONTINUOUS",
|