-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
230 lines (205 loc) · 47.4 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
/****************************************************************************
** MIT License
**
** Author : xiaofeng.zhu
** Support : [email protected], [email protected]
**
****************************************************************************/
var canvas_ids = ["mainChart", "subChart"];
// loading
function canvasLoading() {
// console.log("canvasLoading");
for (var i = 0; i < canvas_ids.length; i++) {
var canvas = document.getElementById(canvas_ids[i]);
var ctx = canvas.getContext("2d");
ctx.font = "48px serif";
ctx.fillText("Loading...", 10, 50);
}
}
canvasLoading();
// init
var stock;
var models = [null, null];
var vms = [null, null];
var views = [null, null];
Module.locateFile = function (path, prefix) {
if (path.endsWith(".wasm")) return "./build/" + path;
return prefix + path;
};
Module.onRuntimeInitialized = function () {
// console.log("onRuntimeInitialized", Module);
_global_init()
// stock(TODO 使用json更优)
const o = ["1886.00", "1909.98", "1911.53", "1915.15", "1927.80", "1890.00", "1889.99", "1880.00", "1890.01", "1895.10", "1921.10", "1942.00", "1952.99", "1949.51", "1949.22", "1943.10", "1958.75", "1945.00", "1952.36", "1945.11", "1960.00", "1945.00", "1965.00", "1990.20", "2005.00", "2005.00", "2032.00", "2025.28", "2020.01", "2055.00", "2000.00", "2006.33", "1998.07", "1998.27", "1948.33", "1921.03", "1933.33", "1927.33", "1928.33", "1856.42", "1872.92", "1848.33", "1812.33", "1868.33", "1823.34", "1850.33", "1803.33", "1762.47", "1768.33", "1766.30", "1780.33", "1753.10", "1744.33", "1738.32", "1739.33", "1743.60", "1764.33", "1778.33", "1738.32", "1723.33", "1751.99", "1748.21", "1775.33", "1758.33", "1731.33", "1733.33", "1698.33", "1758.33", "1793.32", "1808.33", "1814.33", "1771.33", "1745.45", "1681.66", "1728.33", "1741.33", "1768.53", "1780.02", "1778.33", "1759.46", "1780.53", "1766.33", "1745.33", "1707.33", "1748.33", "1746.33", "1736.33", "1731.33", "1708.27", "1698.33", "1676.33", "1639.83", "1603.33", "1690.33", "1716.33", "1683.33", "1702.21", "1702.33", "1696.33", "1698.33", "1612.33", "1628.33", "1708.33", "1744.33", "1786.33", "1742.43", "1738.31", "1738.53", "1750.33", "1824.13", "1818.33", "1780.33", "1765.39", "1753.33", "1786.33", "1789.74", "1838.34", "1878.33", "1855.96", "1878.94", "1878.33", "1847.13", "1818.33", "1835.33", "1878.33", "1817.42", "1847.21", "1879.32", "1933.33", "1979.34", "1920.37", "1921.33", "1933.33", "1938.33", "1894.33", "1897.33", "1840.01", "1846.33", "1855.72", "1943.15", "1926.33", "1926.33", "1906.34", "1953.33", "2000.34", "2023.33", "2033.33", "2048.33", "2019.33", "2128.33", "2111.33", "2146.33", "2127.21", "2031.33", "2018.33", "2023.33", "2029.03", "2078.83", "2093.33", "2120.48", "2096.53", "2132.33", "2038.33", "2033.27", "1943.21", "1959.07", "1961.33", "1910.33", "1918.33", "1928.33", "1963.73", "1938.33", "1943.16", "1931.33", "1878.33", "1830.33", "1827.33", "1772.52", "1759.55", "1783.33", "1746.33", "1752.01", "1756.33", "1731.26", "1768.34", "1798.31", "1798.33", "1782.54", "1756.27", "1778.33", "1775.03", "1758.33", "1803.33", "1803.53", "1830.63", "1842.36", "1858.33", "1833.33", "1819.43", "1811.33", "1778.33", "1866.33", "1868.43", "1907.26", "1848.33", "1844.33", "1817.84", "1800.75", "1796.51", "1787.33", "1826.33", "1728.33", "1606.33", "1616.33", "1637.16", "1598.33", "1581.33", "1628.33", "1637.33", "1643.33", "1612.41", "1604.33", "1638.33", "1639.36", "1627.33", "1588.35", "1611.32", "1537.33", "1568.13", "1583.33", "1567.33", "1643.32", "1625.97", "1553.33", "1516.21", "1533.50", "1600.55", "1602.99", "1678.33", "1674.33", "1668.33", "1710.33", "1758.34", "1678.33", "1629.33", "1667.33", "1671.21", "1712.39", "1708.33", "1642.33", "1703.33", "1788.34", "1681.33", "1781.33", "1857.33", "1916.15", "1938.33", "1967.33", "1953.33", "1934.22", "1958.33", "1933.35", "1952.33", "1946.33", "1953.88", "1942.85", "1978.43", "1988.33", "1973.33", "1978.33", "2053.33", "2038.30", "2043.33", "2086.33", "2078.33", "2028.29", "1999.04", "2039.03", "2051.03", "2044.03", "2106.03", "2114.68", "2151.03", "2154.13", "2198.03", "2154.03", "2151.03", "2219.03", "2224.03", "2174.03", "2179.03", "2209.03", "2181.03", "2174.53", "2200.00", "2170.05", "2167.01", "2044.03", "2010.03", "2014.11", "2033.03", "2018.03", "2024.03", "1984.13", "1941.03", "1924.78", "1908.11", "1835.03", "1859.03", "1924.03", "1959.03", "1985.03", "2006.07", "1969.03", "2046.11", "2091.03", "2015.00", "2048.93", "2035.03", "2030.13", "2014.03", "1984.11", "1989.93", "1994.03", "1979.03", "1970.03", "2001.03", "2006.06", "2063.09", "2120.03", "2015.03", "1980.03", "2004.13", "1999.03", "2002.23", "1944.03", "1929.04", "1940.03", "1957.91", "1959.13", "1994.03", "1994.03", "1959.03", "1933.96", "2009.03", "2029.03", "1934.03", "1936.03", "1914.03", "2033.99", "1959.03", "2054.03", "1999.03", "2139.03", "2138.03", "2059.03", "2168.03", "2267.02", "2224.17", "2414.03", "2410.19", "2547.01", "2444.03", "2327.83", "2296.03", "2284.03", "2150.03", "2109.03", "2071.25", "2089.03", "2060.22", "2039.03", "2100.92", "2144.03", "2042.03", "2028.03", "2007.03", "1967.03", "2032.14", "2020.09", "2074.03", "2115.03", "2123.03", "2047.03", "2049.03", "2101.03", "2056.03", "2023.83", "1949.03", "1959.01", "1900.03", "1829.03", "1832.03", "1785.63", "1762.02", "1777.03", "1857.02", "1809.00", "1799.03", "1810.84", "1804.53", "1789.53", "1792.53", "1786.80", "1793.81", "1799.03", "1824.98", "1774.03", "1761.73", "1711.03", "1697.04", "1705.03", "1685.03", "1694.03", "1691.69", "1685.03", "1720.53", "1729.02", "1730.04", "1679.03", "1643.53", "1674.03", "1699.03", "1670.03", "1683.03", "1689.04", "1704.03", "1711.95", "1660.41", "1689.58", "1676.03", "1659.03", "1644.02", "1634.03", "1637.03", "1613.87", "1585.03", "1602.03", "1578.03", "1699.81", "1689.03", "1693.13", "1659.02", "1684.03", "1684.03", "1680.16", "1699.03", "1709.65", "1659.03", "1651.03", "1619.03", "1628.36", "1594.22", "1589.03", "1595.00", "1594.03", "1609.03", "1651.79", "1624.03", "1659.03", "1719.03", "1729.02", "1704.03", "1647.03", "1662.77", "1658.70", "1691.03", "1719.03", "1725.03", "1754.03", "1784.03", "1751.03", "1729.61", "1690.03", "1691.02", "1693.03", "1663.83", "1659.03", "1632.03", "1633.03", "1659.03", "1656.41", "1633.03", "1598.93", "1589.03", "1592.03", "1587.00", "1603.80", "1629.03", "1621.12", "1634.03", "1645.91", "1644.03", "1630.23", "1649.03", "1589.03", "1575.04", "1613.88", "1631.03", "1617.03"];
const h = ["1907.00", "1918.00", "1918.99", "1932.88", "1935.00", "1923.10", "1904.00", "1887.98", "1908.00", "1918.99", "1938.00", "1948.00", "1964.97", "1952.30", "1962.00", "1955.90", "1970.00", "1951.65", "1959.00", "1999.68", "1976.80", "1972.00", "1972.80", "1994.77", "2014.89", "2009.35", "2039.00", "2054.45", "2024.29", "2067.77", "2077.00", "2020.33", "2019.33", "2028.27", "1998.33", "1943.37", "1936.33", "1945.32", "1948.33", "1930.33", "1885.96", "1883.33", "1853.75", "1870.33", "1885.33", "1866.68", "1860.33", "1803.33", "1773.33", "1774.13", "1793.11", "1793.23", "1768.88", "1758.33", "1739.33", "1750.33", "1765.33", "1782.22", "1779.48", "1735.33", "1752.25", "1753.33", "1775.33", "1776.27", "1756.33", "1766.81", "1763.29", "1758.33", "1797.33", "1848.33", "1827.33", "1823.33", "1788.33", "1727.31", "1754.83", "1766.21", "1784.33", "1798.33", "1811.32", "1776.33", "1796.33", "1814.23", "1773.33", "1766.30", "1748.33", "1767.03", "1763.33", "1767.06", "1771.33", "1716.93", "1708.43", "1669.83", "1643.13", "1712.33", "1718.33", "1748.33", "1702.21", "1703.98", "1723.33", "1733.33", "1662.23", "1663.33", "1728.33", "1755.33", "1799.33", "1783.33", "1764.99", "1746.33", "1771.22", "1828.58", "1829.32", "1841.90", "1775.33", "1786.61", "1792.32", "1812.33", "1839.33", "1885.23", "1886.31", "1889.81", "1885.33", "1889.33", "1855.33", "1879.12", "1884.23", "1886.33", "1851.20", "1891.89", "1946.33", "1989.15", "1947.33", "1944.33", "1962.33", "1971.82", "1958.32", "1897.33", "1887.18", "1856.63", "1871.33", "1946.32", "1957.13", "1943.33", "1955.33", "1967.21", "2014.33", "2043.33", "2047.28", "2051.31", "2067.31", "2132.58", "2133.83", "2146.33", "2195.29", "2098.33", "2041.33", "2047.46", "2063.99", "2086.33", "2122.38", "2143.28", "2146.23", "2158.33", "2074.11", "2095.25", "2023.33", "1966.20", "1968.33", "1966.95", "1920.48", "1938.28", "1968.23", "1968.33", "1945.33", "1964.53", "1944.33", "1895.33", "1887.33", "1827.33", "1785.33", "1798.83", "1796.33", "1762.33", "1763.38", "1747.93", "1773.33", "1806.20", "1809.13", "1823.32", "1794.33", "1788.31", "1822.55", "1804.63", "1826.33", "1822.11", "1836.63", "1857.32", "1863.34", "1899.34", "1838.33", "1828.13", "1817.13", "1866.33", "1908.32", "1920.13", "1928.28", "1855.33", "1868.23", "1856.33", "1828.55", "1823.34", "1838.33", "1841.73", "1698.31", "1634.21", "1666.33", "1683.93", "1622.33", "1638.33", "1661.33", "1662.33", "1647.13", "1623.33", "1649.51", "1662.81", "1686.49", "1638.12", "1621.33", "1613.32", "1594.68", "1591.33", "1603.33", "1643.32", "1659.20", "1620.88", "1577.33", "1575.88", "1621.53", "1621.32", "1678.33", "1691.93", "1691.33", "1727.33", "1763.34", "1781.21", "1687.33", "1672.34", "1723.33", "1738.33", "1747.32", "1734.31", "1703.33", "1801.33", "1766.53", "1788.33", "1857.33", "1916.15", "1952.23", "1984.33", "1967.26", "1964.33", "1974.93", "1991.33", "1952.83", "1983.83", "1977.11", "1964.24", "1982.33", "2007.21", "1992.33", "1998.21", "2053.33", "2088.33", "2052.33", "2093.33", "2096.33", "2087.33", "2039.03", "2042.03", "2057.03", "2058.72", "2115.53", "2147.03", "2154.03", "2167.91", "2203.03", "2210.40", "2173.03", "2239.02", "2238.03", "2247.03", "2219.37", "2223.03", "2207.98", "2177.38", "2209.03", "2279.03", "2200.83", "2159.13", "2039.09", "2038.91", "2033.13", "2033.84", "2036.03", "2044.23", "1989.53", "1944.08", "1958.03", "1925.03", "1868.03", "1927.01", "1965.87", "1995.03", "2008.97", "2006.53", "2054.28", "2094.03", "2078.91", "2058.03", "2056.83", "2088.03", "2057.39", "2027.03", "2005.93", "2007.03", "2008.83", "1989.03", "2013.03", "2038.03", "2076.33", "2121.01", "2124.03", "2005.83", "2005.05", "2045.03", "2055.38", "1981.03", "1947.91", "1972.03", "1967.83", "1985.12", "2002.03", "2045.39", "2009.03", "1979.02", "2028.83", "2036.03", "2039.02", "1958.90", "1959.03", "2044.03", "2054.03", "2055.03", "2108.80", "2139.03", "2138.03", "2138.98", "2183.53", "2277.03", "2303.92", "2414.03", "2455.69", "2586.91", "2560.23", "2415.46", "2337.91", "2323.63", "2289.03", "2157.30", "2109.02", "2119.03", "2108.51", "2068.69", "2100.92", "2146.03", "2138.53", "2059.03", "2049.05", "2014.52", "2055.33", "2050.51", "2093.38", "2122.03", "2132.36", "2119.93", "2109.53", "2109.91", "2099.03", "2084.03", "2018.48", "1964.02", "1958.01", "1892.03", "1845.83", "1847.83", "1806.03", "1817.91", "1865.23", "1858.02", "1810.26", "1828.04", "1827.03", "1804.70", "1796.25", "1789.01", "1796.35", "1808.80", "1825.03", "1834.03", "1799.42", "1759.13", "1714.69", "1708.03", "1698.02", "1697.93", "1699.06", "1699.02", "1727.91", "1741.53", "1768.93", "1695.03", "1684.03", "1679.56", "1701.38", "1689.08", "1687.91", "1709.03", "1736.53", "1723.51", "1709.71", "1690.62", "1691.51", "1663.03", "1664.93", "1654.03", "1655.03", "1667.03", "1636.03", "1603.03", "1621.95", "1706.62", "1704.03", "1701.18", "1694.00", "1693.01", "1693.61", "1694.03", "1706.01", "1709.65", "1709.64", "1665.45", "1650.93", "1628.43", "1627.53", "1609.03", "1617.91", "1625.04", "1646.01", "1651.79", "1654.03", "1659.03", "1723.84", "1729.02", "1728.03", "1695.03", "1679.03", "1670.03", "1696.83", "1737.02", "1736.02", "1771.03", "1787.03", "1761.03", "1775.03", "1723.03", "1693.01", "1704.03", "1705.81", "1667.03", "1657.03", "1638.03", "1676.03", "1679.03", "1663.38", "1624.73", "1597.91", "1600.03", "1603.99", "1608.70", "1633.06", "1632.12", "1642.02", "1655.61", "1664.03", "1659.62", "1649.03", "1639.03", "1588.83", "1625.03", "1650.03", "1669.03"];
const l = ["1878.01", "1864.58", "1905.00", "1907.51", "1904.90", "1880.13", "1877.00", "1858.01", "1881.18", "1878.10", "1892.66", "1917.00", "1947.02", "1931.00", "1935.00", "1934.51", "1945.00", "1926.00", "1922.00", "1944.51", "1941.00", "1940.67", "1930.06", "1950.50", "1996.16", "1985.01", "1986.00", "2010.00", "2001.01", "2015.21", "1999.99", "1989.34", "1979.33", "1978.63", "1943.33", "1918.33", "1910.33", "1906.33", "1908.33", "1856.42", "1853.66", "1841.32", "1810.33", "1826.41", "1813.33", "1827.33", "1803.33", "1748.64", "1736.33", "1758.33", "1757.33", "1745.31", "1744.33", "1731.34", "1708.33", "1725.33", "1733.83", "1750.33", "1730.33", "1717.33", "1721.35", "1733.33", "1721.00", "1744.33", "1728.33", "1730.33", "1683.34", "1716.33", "1759.33", "1807.31", "1789.31", "1764.83", "1745.45", "1678.33", "1680.33", "1738.51", "1748.33", "1747.01", "1753.83", "1746.33", "1774.22", "1758.53", "1729.41", "1686.33", "1684.36", "1744.87", "1728.43", "1731.33", "1700.02", "1687.13", "1673.33", "1639.83", "1582.33", "1663.33", "1695.68", "1675.33", "1664.66", "1673.34", "1670.61", "1689.99", "1571.33", "1581.33", "1678.33", "1696.41", "1769.33", "1699.44", "1710.33", "1682.13", "1733.43", "1772.33", "1803.33", "1780.33", "1745.33", "1753.33", "1726.43", "1778.41", "1778.35", "1847.28", "1843.99", "1859.33", "1866.33", "1837.33", "1815.64", "1819.33", "1835.72", "1805.30", "1768.33", "1828.33", "1858.34", "1930.33", "1897.33", "1909.33", "1909.77", "1929.34", "1894.33", "1867.21", "1830.33", "1813.67", "1841.33", "1843.89", "1926.33", "1909.50", "1895.88", "1917.65", "1916.84", "1996.33", "1992.33", "2006.33", "2006.33", "2019.33", "2094.93", "2090.33", "2127.21", "2003.33", "2018.33", "1991.16", "2019.33", "2014.33", "2064.56", "2103.35", "2078.33", "2096.33", "2034.33", "2023.33", "1928.33", "1925.06", "1928.33", "1909.38", "1897.93", "1897.35", "1905.83", "1929.41", "1903.33", "1924.58", "1875.33", "1830.33", "1826.33", "1766.53", "1748.33", "1768.34", "1743.33", "1728.33", "1744.99", "1719.83", "1713.33", "1760.33", "1780.38", "1782.54", "1747.75", "1739.52", "1766.33", "1738.33", "1791.33", "1780.33", "1778.43", "1822.33", "1836.33", "1832.33", "1807.33", "1784.34", "1778.21", "1765.33", "1868.43", "1874.33", "1840.33", "1820.75", "1809.34", "1785.56", "1781.73", "1764.23", "1773.33", "1728.33", "1606.33", "1603.41", "1613.33", "1598.33", "1563.33", "1588.33", "1631.33", "1618.43", "1611.33", "1602.34", "1606.41", "1629.33", "1604.48", "1560.33", "1579.22", "1509.43", "1533.43", "1524.28", "1562.43", "1573.05", "1621.33", "1544.10", "1515.10", "1503.83", "1578.33", "1578.33", "1607.21", "1663.41", "1657.33", "1664.52", "1728.34", "1653.33", "1628.33", "1624.93", "1654.69", "1696.33", "1667.13", "1599.05", "1636.09", "1712.67", "1660.45", "1681.33", "1758.33", "1873.42", "1917.29", "1940.34", "1939.74", "1919.33", "1928.33", "1928.93", "1923.33", "1943.33", "1918.83", "1923.33", "1946.33", "1977.34", "1938.34", "1963.33", "1989.83", "2009.93", "2024.63", "2029.33", "2051.33", "2020.93", "1980.03", "1993.18", "2012.92", "2009.03", "2024.03", "2103.39", "2107.03", "2107.03", "2137.84", "2149.11", "2119.14", "2120.18", "2199.04", "2173.07", "2169.11", "2167.21", "2165.03", "2131.03", "2164.54", "2160.13", "2152.11", "2044.03", "1990.03", "1996.05", "2004.39", "1999.03", "2004.09", "1984.13", "1935.03", "1912.03", "1908.03", "1832.33", "1825.04", "1860.03", "1912.03", "1962.74", "1973.03", "1962.03", "2024.12", "2032.63", "2011.53", "2010.53", "2024.13", "2029.03", "1992.03", "1971.03", "1949.03", "1975.03", "1968.03", "1950.73", "1964.04", "2003.03", "2009.03", "2061.33", "2015.03", "1960.25", "1959.03", "1994.11", "1985.18", "1917.03", "1905.83", "1940.03", "1929.03", "1914.58", "1951.26", "1994.03", "1935.04", "1924.03", "1910.18", "1961.04", "1920.51", "1926.03", "1859.21", "1919.03", "1947.03", "1969.13", "1992.03", "1992.03", "2079.03", "2026.33", "2080.24", "2119.53", "2224.03", "2237.25", "2340.63", "2424.03", "2444.03", "2309.03", "2272.03", "2250.03", "2150.03", "2099.03", "2061.13", "2054.03", "2049.25", "2019.05", "2044.03", "2084.14", "2042.03", "2019.13", "2000.03", "1941.53", "1965.88", "1999.30", "1988.03", "2075.14", "2094.03", "2044.03", "2017.63", "2022.05", "2034.03", "1995.06", "1941.49", "1942.84", "1898.03", "1829.02", "1814.03", "1785.08", "1759.03", "1754.05", "1780.05", "1801.54", "1796.63", "1800.11", "1799.03", "1779.24", "1764.03", "1774.03", "1763.84", "1787.03", "1798.03", "1772.03", "1759.58", "1711.03", "1691.13", "1690.03", "1679.04", "1672.94", "1677.03", "1684.21", "1683.03", "1710.50", "1730.04", "1671.68", "1639.63", "1642.19", "1660.10", "1656.29", "1650.03", "1681.30", "1690.03", "1695.03", "1659.65", "1649.03", "1671.13", "1644.03", "1634.53", "1631.03", "1624.03", "1606.03", "1584.11", "1575.15", "1559.03", "1673.03", "1674.54", "1682.03", "1654.03", "1650.93", "1662.03", "1680.03", "1685.03", "1694.03", "1659.03", "1647.03", "1619.03", "1611.33", "1594.22", "1584.03", "1585.83", "1580.05", "1609.03", "1625.69", "1594.04", "1617.03", "1678.03", "1706.78", "1689.61", "1647.03", "1659.03", "1639.07", "1636.10", "1663.00", "1705.03", "1738.73", "1729.03", "1734.04", "1729.61", "1680.53", "1664.03", "1674.05", "1657.66", "1650.04", "1630.03", "1615.03", "1642.02", "1650.03", "1629.03", "1590.03", "1568.03", "1564.28", "1567.14", "1557.53", "1589.03", "1602.34", "1619.03", "1619.03", "1605.03", "1629.53", "1592.03", "1589.03", "1559.03", "1544.03", "1609.03", "1617.03"];
const c = ["1906.90", "1876.00", "1910.00", "1911.53", "1923.96", "1916.01", "1885.00", "1879.98", "1890.30", "1898.44", "1898.00", "1919.60", "1950.21", "1944.65", "1947.00", "1939.00", "1950.10", "1943.10", "1951.66", "1949.50", "1953.00", "1958.89", "1948.41", "1963.60", "1999.00", "1990.00", "2002.00", "2033.01", "2018.00", "2029.05", "2045.00", "2008.33", "2014.33", "1988.88", "1987.34", "1935.43", "1914.33", "1924.07", "1920.35", "1929.33", "1855.33", "1853.43", "1849.33", "1834.33", "1878.93", "1831.33", "1843.93", "1796.23", "1766.33", "1764.33", "1766.58", "1782.36", "1756.74", "1733.49", "1721.13", "1733.84", "1738.33", "1759.33", "1778.34", "1734.33", "1739.33", "1746.33", "1736.33", "1756.57", "1741.00", "1746.33", "1744.52", "1730.33", "1771.33", "1815.33", "1806.71", "1813.33", "1773.25", "1710.81", "1686.33", "1751.33", "1758.31", "1775.33", "1768.63", "1769.15", "1784.32", "1787.33", "1747.33", "1760.33", "1698.33", "1762.33", "1743.33", "1743.33", "1758.34", "1697.33", "1708.43", "1645.33", "1639.13", "1668.33", "1699.26", "1730.52", "1673.33", "1682.63", "1686.12", "1698.48", "1653.28", "1581.33", "1678.33", "1747.34", "1772.76", "1757.51", "1731.53", "1685.33", "1758.83", "1778.33", "1823.21", "1836.81", "1768.73", "1777.39", "1742.44", "1805.34", "1786.20", "1855.32", "1885.33", "1865.32", "1870.88", "1868.95", "1847.00", "1828.30", "1851.33", "1874.31", "1817.33", "1846.29", "1865.33", "1943.33", "1933.33", "1921.33", "1928.53", "1963.32", "1947.85", "1890.33", "1870.60", "1839.94", "1845.33", "1855.72", "1945.33", "1918.88", "1944.33", "1920.33", "1960.55", "2002.33", "2029.56", "2028.33", "2053.33", "2019.33", "2116.51", "2110.15", "2172.42", "2098.33", "2026.33", "2016.53", "2037.29", "2029.03", "2097.32", "2113.33", "2128.33", "2096.53", "2068.33", "2064.88", "2021.33", "1934.20", "1945.63", "1950.21", "1912.33", "1911.32", "1909.10", "1963.33", "1919.34", "1934.36", "1919.33", "1874.76", "1832.60", "1806.74", "1770.33", "1773.33", "1786.33", "1739.47", "1752.11", "1747.93", "1732.32", "1768.34", "1798.43", "1798.27", "1782.53", "1743.33", "1782.97", "1781.33", "1804.41", "1803.82", "1797.33", "1839.38", "1851.36", "1879.33", "1822.33", "1819.33", "1790.51", "1778.33", "1895.30", "1889.33", "1908.23", "1849.32", "1845.45", "1817.93", "1808.33", "1798.33", "1800.39", "1833.33", "1672.33", "1613.33", "1616.02", "1664.33", "1616.40", "1594.07", "1635.33", "1632.33", "1640.91", "1612.41", "1611.43", "1647.33", "1649.00", "1636.55", "1597.13", "1600.34", "1536.33", "1564.33", "1574.36", "1573.33", "1643.35", "1603.51", "1548.52", "1526.33", "1598.30", "1598.33", "1613.33", "1677.53", "1678.37", "1668.33", "1728.83", "1777.33", "1672.13", "1649.33", "1677.33", "1702.33", "1727.63", "1733.33", "1657.32", "1728.12", "1747.23", "1691.22", "1782.44", "1878.33", "1918.34", "1947.33", "1958.33", "1953.33", "1934.23", "1976.32", "1940.33", "1961.23", "1939.33", "1950.44", "1963.33", "1982.33", "1991.23", "1972.33", "1991.33", "2083.33", "2035.03", "2040.33", "2081.34", "2070.33", "2027.08", "1997.03", "2034.00", "2040.67", "2049.97", "2115.94", "2117.03", "2152.03", "2137.84", "2197.51", "2158.53", "2150.03", "2230.03", "2210.53", "2181.25", "2181.03", "2199.98", "2177.03", "2189.03", "2204.03", "2179.03", "2153.53", "2030.32", "2001.13", "2017.91", "2008.03", "2018.34", "2016.99", "1968.88", "1930.53", "1943.03", "1918.03", "1838.06", "1862.03", "1918.03", "1965.81", "1985.39", "2001.03", "2053.47", "2036.85", "2067.97", "2014.53", "2039.03", "2053.83", "2047.03", "2014.01", "1974.63", "2006.03", "1980.03", "1967.92", "1979.03", "2029.03", "2020.03", "2085.06", "2121.03", "2003.53", "1968.03", "2015.08", "1993.13", "1972.03", "1930.03", "1948.03", "1955.03", "1949.02", "1969.03", "2028.73", "1989.39", "1969.53", "1934.48", "1985.03", "2007.03", "1929.04", "1896.02", "1919.03", "2019.14", "1992.03", "2099.03", "2017.03", "2117.03", "2081.81", "2109.03", "2148.03", "2266.03", "2247.05", "2419.03", "2430.03", "2560.03", "2415.46", "2327.83", "2272.03", "2279.88", "2148.94", "2104.03", "2068.35", "2075.21", "2047.03", "2048.03", "2100.92", "2134.03", "2038.98", "2029.03", "1999.66", "1968.44", "2022.03", "2041.03", "2093.03", "2123.03", "2119.93", "2058.76", "2049.03", "2099.03", "2059.03", "2018.48", "1956.03", "1957.03", "1892.03", "1826.03", "1832.03", "1789.03", "1789.37", "1800.68", "1840.03", "1801.53", "1804.03", "1824.54", "1799.03", "1775.04", "1788.03", "1779.03", "1791.93", "1799.03", "1809.03", "1771.43", "1752.14", "1708.03", "1697.04", "1696.03", "1672.94", "1696.93", "1693.42", "1685.91", "1722.53", "1749.24", "1678.99", "1679.22", "1652.68", "1674.83", "1689.08", "1664.03", "1693.82", "1690.38", "1704.03", "1701.60", "1659.65", "1680.93", "1658.61", "1654.03", "1633.04", "1629.05", "1635.03", "1623.84", "1584.03", "1602.03", "1674.36", "1701.53", "1692.36", "1693.03", "1658.03", "1671.03", "1684.03", "1688.03", "1698.03", "1709.64", "1655.03", "1627.53", "1611.33", "1620.03", "1594.14", "1588.35", "1609.01", "1624.72", "1625.83", "1654.03", "1629.55", "1684.13", "1719.03", "1725.03", "1692.03", "1664.83", "1647.03", "1670.43", "1682.53", "1729.03", "1752.03", "1754.03", "1761.01", "1745.53", "1716.03", "1690.03", "1686.03", "1686.03", "1655.38", "1635.03", "1623.03", "1646.03", "1664.03", "1649.03", "1620.03", "1594.03", "1585.98", "1593.02", "1590.03", "1596.99", "1627.03", "1629.02", "1627.03", "1637.21", "1639.03", "1631.03", "1629.03", "1581.58", "1554.33", "1635.03", "1637.11"];
const v = ["2606149", "2792662", "1387461", "1679901", "2008584", "3035714", "2459842", "2822088", "2103741", "3703236", "3486986", "2148987", "2068510", "1691244", "2511357", "1406137", "1870461", "2195603", "2422072", "3341623", "2052724", "1985377", "2344686", "2394921", "1564389", "2093177", "3275166", "2632940", "2507589", "2159645", "3898243", "3036012", "2524571", "4011517", "3963465", "2684352", "1964665", "2371702", "3497478", "5054161", "2688670", "3366362", "2941623", "3675518", "4734462", "2632902", "4435381", "3504859", "3674126", "1691473", "2176001", "4075082", "3446569", "2511958", "2805344", "2238869", "2734222", "2215713", "4194960", "1977626", "2485044", "2014474", "2776531", "2073052", "2203823", "3031267", "4011919", "3035182", "2859618", "3366094", "3488527", "4401006", "5740244", "4456396", "5365802", "2789975", "2895261", "2415572", "2420476", "1979315", "2104113", "3764986", "3114766", "4162956", "4386359", "2294132", "2019571", "2781977", "4486191", "2517386", "4243343", "2593498", "5754164", "2970866", "2581532", "5806739", "2105404", "2787716", "3834868", "6835196", "7759281", "8905587", "4900661", "4772677", "3646178", "5643442", "5721546", "4915581", "3104703", "3154693", "2007448", "4737930", "2892303", "3897913", "6535925", "2811161", "5229881", "2081573", "1938549", "1821366", "1458685", "2710586", "2019587", "3374649", "2303183", "3388479", "4171306", "3515042", "4102011", "4266516", "2390513", "2551012", "2398580", "3081258", "3401391", "2637094", "3121577", "2735382", "2932164", "5674735", "2747410", "2227664", "2962670", "2981669", "5179475", "2839551", "3384262", "2966491", "3526136", "5404902", "2765070", "3755590", "5612959", "3909854", "1743079", "2628589", "3225769", "4840318", "3721136", "3007827", "4044941", "6580656", "4314822", "6423918", "6104807", "3697989", "3106388", "3581839", "2042182", "2625440", "3692487", "4239934", "3265557", "3975288", "5451235", "4578220", "4257268", "3115559", "1952089", "2450546", "3352624", "2494735", "1760663", "2265187", "3534877", "2735192", "1770572", "2707723", "3113043", "2782931", "3250024", "4168998", "2877586", "2949093", "3464729", "2113026", "3246133", "3596260", "2301870", "2866339", "4031456", "6965202", "2856078", "2662255", "5014261", "3060642", "3767557", "4745196", "4053929", "4329065", "4922105", "12686892", "6953660", "3034181", "3174300", "5513025", "4596802", "4157005", "3376061", "2772002", "3338811", "1995013", "3306367", "3121122", "5533806", "5283518", "4283679", "7731610", "4367709", "5158770", "3609545", "5402037", "5423890", "7259447", "7159720", "11454454", "4129195", "5997026", "6120077", "2805697", "3790452", "4755097", "3866259", "8328505", "4769775", "4568610", "4805969", "3817549", "5437475", "9740065", "7773589", "6386385", "8536884", "8657699", "9861948", "4758547", "3909047", "2978013", "2347521", "3005234", "3540764", "4219005", "3077069", "2992471", "3901024", "3090790", "3551669", "2812212", "3528251", "3442095", "4627531", "3370124", "2191566", "3303063", "2745242", "3587543", "3147370", "3707901", "3322818", "3548826", "5402821", "2106753", "2759315", "2936130", "3397066", "2556663", "2550235", "4731363", "2546627", "3142219", "2345031", "2286277", "3061634", "3173900", "2580731", "4537338", "3860420", "6775695", "3254808", "2424823", "2185716", "2240972", "1750428", "4452400", "3561129", "2507751", "3269887", "4249412", "4600318", "5249339", "5354614", "3840137", "4128378", "8134295", "2210785", "3404511", "3346277", "2685002", "2614975", "2829037", "3175391", "3029370", "3436621", "2411465", "2899215", "3194307", "2880886", "2854762", "4020097", "3274177", "5202757", "2658763", "3715441", "3262697", "5699220", "5001642", "3157523", "2935739", "2744619", "3691407", "3578077", "3386488", "3137491", "3464850", "6248487", "4032251", "5676897", "5117174", "8226581", "6309959", "6377920", "6508829", "5421546", "7076450", "4491626", "6652506", "5972643", "8211578", "5745460", "7893547", "5938546", "6591232", "6137057", "3329655", "3578573", "3972906", "6385101", "3871415", "3458225", "2934059", "3370133", "3512864", "3712017", "3174746", "5595716", "2924761", "3831017", "4508242", "4634519", "3914404", "5950939", "3615220", "3438993", "4105859", "5107990", "5386164", "3793139", "4741020", "5211605", "4351400", "3886007", "3445210", "2286759", "3008037", "2308805", "3785714", "4770609", "4065060", "3069672", "2707698", "3603064", "3215016", "2960497", "3305200", "3077579", "3265354", "3115212", "6145400", "5833133", "6249119", "2950578", "2357169", "2819620", "3194007", "2156861", "2322830", "2822632", "3246536", "6663724", "2187466", "2781576", "3517895", "2522403", "3061349", "2815548", "2347309", "3485073", "3018944", "4146970", "2305153", "2352414", "1644371", "2349749", "2106643", "2605545", "3937376", "3463653", "4394440", "6601529", "1929169", "2248087", "1890137", "2773493", "1922632", "1737738", "1620436", "2048139", "2294389", "4372904", "3423988", "2708781", "1743078", "2423222", "2258296", "3005078", "3572552", "2326547", "2244407", "4720140", "6367985", "2251598", "2082087", "3105601", "3108800", "2477833", "2596355", "3447238", "3111202", "3085796", "3043735", "3200929", "3163992", "4781036", "4229962", "2263553", "2621573", "4187249", "3093344", "2508241", "2238233", "2691498", "3042281", "4357201", "3765318", "2054134", "2793392", "2362354", "3424205", "3264878", "2552169", "3194051", "3466114", "4068474", "3837304", "5074843", "5491152", "3878817", "7875201", "3432052", "3920121"];
const a = ["4940834195", "5259452686", "2651800008", "3220702892", "3857406327", "5797110733", "4642442196", "5284516568", "3988198590", "7028415881", "6669448409", "4149807166", "4041100077", "3285451347", "4894378605", "2735503093", "3659970961", "4250852886", "4701936868", "6588730699", "4014985518", "3893406034", "4562731381", "4709248310", "3134903462", "4179088240", "6566374982", "5345189852", "5042804258", "4385555299", "7984019438", "6142508408", "5112298787", "8124448900", "7921199792", "5239860443", "3813775294", "4617805127", "6802792459", "9749530916", "5087605391", "6354869100", "5467949348", "6847248995", "8882462598", "4897066622", "8236953846", "6356031009", "6535329352", "3019718032", "3897858999", "7329201058", "6135631304", "4436904896", "4888109192", "3929477102", "4824599922", "3950856594", "7493460272", "3459059182", "4362486907", "3557048801", "4881208653", "3690141231", "3888480084", "5372950033", "7018451097", "5324616273", "5138176680", "6235017580", "6384066537", "8038681950", "10289893014", "7692845226", "9352986852", "4955360846", "5160788004", "4342043328", "4359851980", "3525102977", "3800797635", "6834657201", "5534915753", "7284546261", "7568782591", "4081618543", "3568182341", "4910792426", "7936957252", "4338022922", "7276379091", "4343365464", "9392008017", "5054831352", "4457504430", "10096341448", "3578291198", "4763083283", "6564085394", "11843531813", "12753010156", "14567142622", "8416841920", "8335618341", "6587438866", "10018590069", "10087484369", "8487507372", "5509157654", "5703580558", "3690612341", "8721229267", "5158148387", "6999524161", "11578557075", "5118197820", "9473992638", "3920377358", "3670339742", "3450265032", "2769034316", "5131842112", "3762313349", "6296909575", "4315456868", "6346699784", "7585130459", "6601799703", "7889492895", "8450329058", "4655706528", "4971078498", "4685441775", "6091427695", "6665294954", "5026993463", "5906705861", "5074077665", "5506186026", "10781720544", "5384359628", "4332180604", "5792738145", "5831695311", "10226933847", "5774992117", "6913653122", "6061415344", "7272866657", "11195625154", "5901940633", "8020677686", "12295953400", "8126298013", "3570928372", "5354186590", "6654596508", "9988869785", "7865499278", "6444715086", "8673733691", "14139012290", "8944582265", "13404724467", "12285101988", "7286659622", "6122543819", "7045848180", "3939731543", "5071457098", "7192172533", "8372476083", "6337346211", "7803035266", "10555736753", "8676297616", "7994018410", "5699883800", "3485674964", "4411450908", "6033536262", "4410975373", "3124400972", "3987243285", "6204803250", "4915170028", "3220439334", "4956331383", "5592211731", "4958314535", "5875341369", "7486936394", "5266898950", "5383196101", "6302270905", "3934223714", "6076219948", "6794850056", "4238584294", "5246404615", "7330114082", "12651498607", "5452953879", "5097602232", "9625769127", "5688160837", "7040475327", "8780381118", "7411735790", "7870151768", "8973408813", "23270689702", "11756596091", "4964210091", "5227723003", "9242101552", "7458455126", "6781755393", "5638962654", "4605031711", "5528034093", "3257785762", "5428265636", "5204051657", "9306030671", "8631165696", "6939707277", "12370243405", "6888080927", "8098190333", "5791426192", "8722233201", "9037626406", "11703813764", "11218832883", "17825198286", "6682355678", "9701556273", "10140291982", "4773049794", "6418412544", "8130692626", "6821292779", "14549496463", "8028155490", "7616109615", "8177369851", "6614683378", "9447823227", "16515259089", "13109725032", "11299569857", "14792470948", "15230805685", "17894360803", "9057761876", "7619076855", "5902656221", "4639300956", "5900348210", "6958296859", "8391506229", "6011814880", "5946287259", "7658786228", "6072340993", "7027713780", "5658210730", "7015883091", "6872797768", "9388640194", "6970730878", "4511484217", "6835635172", "5750241214", "7459680452", "6452557073", "7596735684", "6900830616", "7367986471", "11329180836", "4558702643", "5978924528", "6412821567", "7513797036", "5707338424", "5591378817", "10479943156", "5756592694", "7058715115", "5242453019", "5088908384", "6832594466", "6960864260", "5741331986", "10240368980", "8558038174", "14636718750", "6705879397", "4976601458", "4500663211", "4606452358", "3595891742", "9178509985", "7150302044", "4934954969", "6473203286", "8209251914", "8677753608", "10101703446", "10584968907", "7723747038", "8370431228", "16463574637", "4607779002", "7160836874", "7002695288", "5539295656", "5446145952", "5949669953", "6610577917", "6183895054", "6903769490", "4908790023", "5883787293", "6409917318", "5832453812", "5893307514", "8317799925", "6967525037", "10981752658", "5379775870", "7489086233", "6717493350", "11740129413", "9987629444", "6216733244", "5857848160", "5459520703", "7323391311", "7211521835", "6997030294", "6352656523", "6918600717", "12459955712", "8181594631", "11521736384", "10136910284", "16100769579", "12724245990", "13100315985", "13297304316", "11366685429", "14796698646", "9686945529", "14097015494", "12982145755", "18195034445", "13316110795", "18498777223", "14525164525", "16704135269", "15675929714", "7972930045", "8420758625", "9253566205", "14596930188", "8384049314", "7372233582", "6219639111", "7166179277", "7337084455", "7809446387", "6820173362", "12029474558", "6090260364", "7953455967", "9126453277", "9479278513", "8076715790", "12372103227", "7722089684", "7418330854", "8800558288", "10768565415", "11345202869", "7991178754", "9882593867", "10592557370", "8686920261", "7682300728", "6604461376", "4275994834", "5616528738", "4218997634", "6921989374", "8901002262", "7618583444", "5663526809", "5020968993", "6683421886", "5901298275", "5383582284", "6026813428", "5595359665", "6009239911", "5766037609", "11333352154", "10617305104", "11176048847", "5147357781", "4101369306", "4891829153", "5520322173", "3737697985", "4027749313", "4910540741", "5736960168", "11926870595", "3771894859", "4767508753", "5973146815", "4355288047", "5247897161", "4791276459", "4071729792", "6122365404", "5287968173", "7198679683", "3932702367", "4053043271", "2788396253", "3976621208", "3544422245", "4379602068", "6633168613", "5739452181", "7156688307", "10821908227", "3339987454", "3897729793", "3275357440", "4787807536", "3284383415", "2991246892", "2801250556", "3554316589", "3995560518", "7597987786", "5817280605", "4536012540", "2895081366", "4019640150", "3700843486", "4915392273", "5878691069", "3890070212", "3756765108", "7853673241", "10683350187", "3916457762", "3654872009", "5448188995", "5339883408", "4236694402", "4401806095", "5865962724", "5446354619", "5433479408", "5471333880", "5746351923", "5661594315", "8608932570", "7389242302", "3896759446", "4530374186", "7227309774", "5260286523", "4217048420", "3727183935", "4578143762", "5192751797", "7363610867", "6230475427", "3341652186", "4529267493", "3857721122", "5560065753", "5372942645", "4236612469", "5337185768", "5790041422", "6846747330", "6486855475", "8411789967", "9133721867", "6279664444", "12705941887", "5739050333", "6637265372"];
const d = ["2022-08-11", "2022-08-10", "2022-08-09", "2022-08-08", "2022-08-05", "2022-08-04", "2022-08-03", "2022-08-02", "2022-08-01", "2022-07-29", "2022-07-28", "2022-07-27", "2022-07-26", "2022-07-25", "2022-07-22", "2022-07-21", "2022-07-20", "2022-07-19", "2022-07-18", "2022-07-15", "2022-07-14", "2022-07-13", "2022-07-12", "2022-07-11", "2022-07-08", "2022-07-07", "2022-07-06", "2022-07-05", "2022-07-04", "2022-07-01", "2022-06-30", "2022-06-29", "2022-06-28", "2022-06-27", "2022-06-24", "2022-06-23", "2022-06-22", "2022-06-21", "2022-06-20", "2022-06-17", "2022-06-16", "2022-06-15", "2022-06-14", "2022-06-13", "2022-06-10", "2022-06-09", "2022-06-08", "2022-06-07", "2022-06-06", "2022-06-02", "2022-06-01", "2022-05-31", "2022-05-30", "2022-05-27", "2022-05-26", "2022-05-25", "2022-05-24", "2022-05-23", "2022-05-20", "2022-05-19", "2022-05-18", "2022-05-17", "2022-05-16", "2022-05-13", "2022-05-12", "2022-05-11", "2022-05-10", "2022-05-09", "2022-05-06", "2022-05-05", "2022-04-29", "2022-04-28", "2022-04-27", "2022-04-26", "2022-04-25", "2022-04-22", "2022-04-21", "2022-04-20", "2022-04-19", "2022-04-18", "2022-04-15", "2022-04-14", "2022-04-13", "2022-04-12", "2022-04-11", "2022-04-08", "2022-04-07", "2022-04-06", "2022-04-01", "2022-03-31", "2022-03-30", "2022-03-29", "2022-03-28", "2022-03-25", "2022-03-24", "2022-03-23", "2022-03-22", "2022-03-21", "2022-03-18", "2022-03-17", "2022-03-16", "2022-03-15", "2022-03-14", "2022-03-11", "2022-03-10", "2022-03-09", "2022-03-08", "2022-03-07", "2022-03-04", "2022-03-03", "2022-03-02", "2022-03-01", "2022-02-28", "2022-02-25", "2022-02-24", "2022-02-23", "2022-02-22", "2022-02-21", "2022-02-18", "2022-02-17", "2022-02-16", "2022-02-15", "2022-02-14", "2022-02-11", "2022-02-10", "2022-02-09", "2022-02-08", "2022-02-07", "2022-01-28", "2022-01-27", "2022-01-26", "2022-01-25", "2022-01-24", "2022-01-21", "2022-01-20", "2022-01-19", "2022-01-18", "2022-01-17", "2022-01-14", "2022-01-13", "2022-01-12", "2022-01-11", "2022-01-10", "2022-01-07", "2022-01-06", "2022-01-05", "2022-01-04", "2021-12-31", "2021-12-30", "2021-12-29", "2021-12-28", "2021-12-27", "2021-12-24", "2021-12-23", "2021-12-22", "2021-12-21", "2021-12-20", "2021-12-17", "2021-12-16", "2021-12-15", "2021-12-14", "2021-12-13", "2021-12-10", "2021-12-09", "2021-12-08", "2021-12-07", "2021-12-06", "2021-12-03", "2021-12-02", "2021-12-01", "2021-11-30", "2021-11-29", "2021-11-26", "2021-11-25", "2021-11-24", "2021-11-23", "2021-11-22", "2021-11-19", "2021-11-18", "2021-11-17", "2021-11-16", "2021-11-15", "2021-11-12", "2021-11-11", "2021-11-10", "2021-11-09", "2021-11-08", "2021-11-05", "2021-11-04", "2021-11-03", "2021-11-02", "2021-11-01", "2021-10-29", "2021-10-28", "2021-10-27", "2021-10-26", "2021-10-25", "2021-10-22", "2021-10-21", "2021-10-20", "2021-10-19", "2021-10-18", "2021-10-15", "2021-10-14", "2021-10-13", "2021-10-12", "2021-10-11", "2021-10-08", "2021-09-30", "2021-09-29", "2021-09-28", "2021-09-27", "2021-09-24", "2021-09-23", "2021-09-22", "2021-09-17", "2021-09-16", "2021-09-15", "2021-09-14", "2021-09-13", "2021-09-10", "2021-09-09", "2021-09-08", "2021-09-07", "2021-09-06", "2021-09-03", "2021-09-02", "2021-09-01", "2021-08-31", "2021-08-30", "2021-08-27", "2021-08-26", "2021-08-25", "2021-08-24", "2021-08-23", "2021-08-20", "2021-08-19", "2021-08-18", "2021-08-17", "2021-08-16", "2021-08-13", "2021-08-12", "2021-08-11", "2021-08-10", "2021-08-09", "2021-08-06", "2021-08-05", "2021-08-04", "2021-08-03", "2021-08-02", "2021-07-30", "2021-07-29", "2021-07-28", "2021-07-27", "2021-07-26", "2021-07-23", "2021-07-22", "2021-07-21", "2021-07-20", "2021-07-19", "2021-07-16", "2021-07-15", "2021-07-14", "2021-07-13", "2021-07-12", "2021-07-09", "2021-07-08", "2021-07-07", "2021-07-06", "2021-07-05", "2021-07-02", "2021-07-01", "2021-06-30", "2021-06-29", "2021-06-28", "2021-06-25", "2021-06-24", "2021-06-23", "2021-06-22", "2021-06-21", "2021-06-18", "2021-06-17", "2021-06-16", "2021-06-15", "2021-06-11", "2021-06-10", "2021-06-09", "2021-06-08", "2021-06-07", "2021-06-04", "2021-06-03", "2021-06-02", "2021-06-01", "2021-05-31", "2021-05-28", "2021-05-27", "2021-05-26", "2021-05-25", "2021-05-24", "2021-05-21", "2021-05-20", "2021-05-19", "2021-05-18", "2021-05-17", "2021-05-14", "2021-05-13", "2021-05-12", "2021-05-11", "2021-05-10", "2021-05-07", "2021-05-06", "2021-04-30", "2021-04-29", "2021-04-28", "2021-04-27", "2021-04-26", "2021-04-23", "2021-04-22", "2021-04-21", "2021-04-20", "2021-04-19", "2021-04-16", "2021-04-15", "2021-04-14", "2021-04-13", "2021-04-12", "2021-04-09", "2021-04-08", "2021-04-07", "2021-04-06", "2021-04-02", "2021-04-01", "2021-03-31", "2021-03-30", "2021-03-29", "2021-03-26", "2021-03-25", "2021-03-24", "2021-03-23", "2021-03-22", "2021-03-19", "2021-03-18", "2021-03-17", "2021-03-16", "2021-03-15", "2021-03-12", "2021-03-11", "2021-03-10", "2021-03-09", "2021-03-08", "2021-03-05", "2021-03-04", "2021-03-03", "2021-03-02", "2021-03-01", "2021-02-26", "2021-02-25", "2021-02-24", "2021-02-23", "2021-02-22", "2021-02-19", "2021-02-18", "2021-02-10", "2021-02-09", "2021-02-08", "2021-02-05", "2021-02-04", "2021-02-03", "2021-02-02", "2021-02-01", "2021-01-29", "2021-01-28", "2021-01-27", "2021-01-26", "2021-01-25", "2021-01-22", "2021-01-21", "2021-01-20", "2021-01-19", "2021-01-18", "2021-01-15", "2021-01-14", "2021-01-13", "2021-01-12", "2021-01-11", "2021-01-08", "2021-01-07", "2021-01-06", "2021-01-05", "2021-01-04", "2020-12-31", "2020-12-30", "2020-12-29", "2020-12-28", "2020-12-25", "2020-12-24", "2020-12-23", "2020-12-22", "2020-12-21", "2020-12-18", "2020-12-17", "2020-12-16", "2020-12-15", "2020-12-14", "2020-12-11", "2020-12-10", "2020-12-09", "2020-12-08", "2020-12-07", "2020-12-04", "2020-12-03", "2020-12-02", "2020-12-01", "2020-11-30", "2020-11-27", "2020-11-26", "2020-11-25", "2020-11-24", "2020-11-23", "2020-11-20", "2020-11-19", "2020-11-18", "2020-11-17", "2020-11-16", "2020-11-13", "2020-11-12", "2020-11-11", "2020-11-10", "2020-11-09", "2020-11-06", "2020-11-05", "2020-11-04", "2020-11-03", "2020-11-02", "2020-10-30", "2020-10-29", "2020-10-28", "2020-10-27", "2020-10-26", "2020-10-23", "2020-10-22", "2020-10-21", "2020-10-20", "2020-10-19", "2020-10-16", "2020-10-15", "2020-10-14", "2020-10-13", "2020-10-12", "2020-10-09", "2020-09-30", "2020-09-29", "2020-09-28", "2020-09-25", "2020-09-24", "2020-09-23", "2020-09-22", "2020-09-21", "2020-09-18", "2020-09-17", "2020-09-16", "2020-09-15", "2020-09-14", "2020-09-11", "2020-09-10", "2020-09-09", "2020-09-08", "2020-09-07", "2020-09-04", "2020-09-03", "2020-09-02", "2020-09-01", "2020-08-31", "2020-08-28", "2020-08-27", "2020-08-26", "2020-08-25", "2020-08-24", "2020-08-21", "2020-08-20", "2020-08-19", "2020-08-18", "2020-08-17", "2020-08-14", "2020-08-13", "2020-08-12", "2020-08-10", "2020-08-07", "2020-08-06", "2020-08-05", "2020-08-04", "2020-08-03", "2020-07-31", "2020-07-30", "2020-07-29", "2020-07-28", "2020-07-27", "2020-07-24", "2020-07-23", "2020-07-22"];
const stock_data = o.join(',') + '\n' + h.join(',') + '\n' + l.join(',') + '\n' + c.join(',') + '\n' + v.join(',') + '\n' + a.join(',') + '\n' + d.join(',');
stock = _new_stock(stringToNewUTF8(stock_data));
_reverse_stock(stock);
// indicator(TODO 使用json更优)
const formular_name = "MACD";
const formular_expression =
"DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),COLORFF8D1E;\n" +
"DEA:EMA(DIF,M),COLOR0CAEE6;\n" +
"MACD:(DIF-DEA)*2,COLORSTICK,COLORE970DC;";
const formular_params =
"SHORT,12\n" +
"LONG,26\n" +
"M,9";
const chart_w = window.innerWidth * 0.98;
const chart_h = window.innerHeight * 0.4;
for (var i = 0; i < canvas_ids.length; i++) {
// model
models[i] = _new_model(stock);
_add_plugin(models[i], stringToNewUTF8("PluginIndicator"));
if (i == 1) {
_add_indicator(models[i], stringToNewUTF8(formular_name), stringToNewUTF8(formular_expression), stringToNewUTF8(formular_params));
}
// view model
vms[i] = _new_vm(models[i]);
if (i == 0) {
_add_layer(vms[i], stringToNewUTF8("LayerBG"));
_add_layer(vms[i], stringToNewUTF8("LayerStock"));
_add_layer(vms[i], stringToNewUTF8("LayerIndicator"));
_add_layer(vms[i], stringToNewUTF8("LayerCrossLine"));
_add_layer(vms[i], stringToNewUTF8("LayerTitle"));
} else {
_add_layer(vms[i], stringToNewUTF8("LayerBG"));
_add_layer(vms[i], stringToNewUTF8("LayerIndicator"));
_add_layer(vms[i], stringToNewUTF8("LayerCrossLine"));
_add_layer(vms[i], stringToNewUTF8("LayerTitle_Indicator"));
}
for (var j = 0; j < i; j++) {
_set_sync_other(vms[i], vms[j]);
_set_sync_other(vms[j], vms[i]);
}
// view
views[i] = _new_view(vms[i], stringToNewUTF8(canvas_ids[i]));
var canvas = document.getElementById(canvas_ids[i])
canvas.width = chart_w;
canvas.height = chart_h;
_resize(views[i], chart_w, chart_h);
}
};
// quit
window.onbeforeunload = function () {
// console.log("onbeforeunload");
views.map(function (view) {
_del_view(view);
});
vms.map(function (vm) {
_del_vm(vm);
});
models.map(function (model) {
_del_model(model);
});
_del_stock(stock);
_global_cleanup();
};
// window
window.addEventListener("resize", function (event) {
// console.log("resize", event);
const chart_w = window.innerWidth * 0.98;
const chart_h = window.innerHeight * 0.4;
for (var i = 0; i < canvas_ids.length; i++) {
if (views[i]) {
var canvas = document.getElementById(canvas_ids[i])
canvas.width = chart_w;
canvas.height = chart_h;
_resize(views[i], chart_w, chart_h);
}
}
});
window.addEventListener("keypress", function (event) {
// console.log("keypress", event);
if (views[0]) {
_keyPress(views[0], stringToNewUTF8(event.key))
}
});
// canvas
for (var i = 0; i < canvas_ids.length; i++) {
var canvas = document.getElementById(canvas_ids[i])
canvas.addEventListener("mousedown", function (event) {
// console.log("mousedown", event);
for (var i = 0; i < canvas_ids.length; i++) {
if (event.target != document.getElementById(canvas_ids[i]))
continue;
if (views[i]) {
_mouseDown(views[i], event.offsetX, event.offsetY)
}
}
});
canvas.addEventListener("mouseup", function (event) {
// console.log("mouseup", event);
for (var i = 0; i < canvas_ids.length; i++) {
if (event.target != document.getElementById(canvas_ids[i]))
continue;
if (views[i]) {
_mouseUp(views[i], event.offsetX, event.offsetY)
}
}
});
canvas.addEventListener("mousemove", function (event) {
// console.log("mousemove", event);
for (var i = 0; i < canvas_ids.length; i++) {
if (event.target != document.getElementById(canvas_ids[i]))
continue;
if (views[i]) {
_mouseMove(views[i], event.offsetX, event.offsetY)
}
}
});
canvas.addEventListener("touchstart", function (event) {
// console.log("touchstart", event);
for (var i = 0; i < canvas_ids.length; i++) {
if (event.target != document.getElementById(canvas_ids[i]))
continue;
if (views[i]) {
event.preventDefault();
_mouseDown(views[i],
event.changedTouches[0].clientX - event.target.getBoundingClientRect().left,
event.changedTouches[0].clientY - event.target.getBoundingClientRect().top)
}
}
});
canvas.addEventListener("touchend", function (event) {
// console.log("touchend", event);
for (var i = 0; i < canvas_ids.length; i++) {
if (event.target != document.getElementById(canvas_ids[i]))
continue;
if (views[i]) {
event.preventDefault();
_mouseUp(views[i],
event.changedTouches[0].clientX - event.target.getBoundingClientRect().left,
event.changedTouches[0].clientY - event.target.getBoundingClientRect().top)
}
}
});
canvas.addEventListener("touchmove", function (event) {
// console.log("touchmove", event);
for (var i = 0; i < canvas_ids.length; i++) {
if (event.target != document.getElementById(canvas_ids[i]))
continue;
if (views[i]) {
event.preventDefault();
_mouseMove(views[i],
event.changedTouches[0].clientX - event.target.getBoundingClientRect().left,
event.changedTouches[0].clientY - event.target.getBoundingClientRect().top)
}
}
});
canvas.addEventListener("dblclick", function (event) {
// console.log("dblclick", event);
for (var i = 0; i < canvas_ids.length; i++) {
if (event.target != document.getElementById(canvas_ids[i]))
continue;
if (views[i]) {
_mouseDoubleClick(views[i], event.offsetX, event.offsetY)
}
}
});
}