ranger-compiler 2.1.69 → 3.0.3

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.
Files changed (363) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/README.md +991 -96
  3. package/{compiler/Lang.clj → dist/Lang.rgr} +2345 -75
  4. package/dist/README.md +116 -0
  5. package/dist/{bin/api.d.ts → api.d.ts} +430 -154
  6. package/dist/api.js +34345 -0
  7. package/{lib/Ajax.clj → dist/lib/Ajax.rgr} +1 -1
  8. package/{lib/CmdParams.clj → dist/lib/CmdParams.rgr} +72 -72
  9. package/{lib/Crypto.clj → dist/lib/Crypto.rgr} +1 -1
  10. package/{lib/DOMLib.clj → dist/lib/DOMLib.rgr} +2 -2
  11. package/{lib/Engine3D.clj → dist/lib/Engine3D.rgr} +1 -1
  12. package/{lib/ImmutableVector.clj → dist/lib/ImmutableVector.rgr} +364 -364
  13. package/{lib/IndexedDB.clj → dist/lib/IndexedDB.rgr} +1 -1
  14. package/{lib/JSON.clj → dist/lib/JSON.rgr} +105 -2
  15. package/{lib/JinxProcess.clj → dist/lib/JinxProcess.rgr} +3 -3
  16. package/{lib/Storage.clj → dist/lib/Storage.rgr} +1 -1
  17. package/{lib/Timers.clj → dist/lib/Timers.rgr} +176 -170
  18. package/{lib/ViewLib.clj → dist/lib/ViewLib.rgr} +1 -1
  19. package/dist/lib/lib/ACEEditor.rgr +5 -0
  20. package/dist/lib/lib/Ajax.rgr +196 -0
  21. package/dist/lib/lib/CmdParams.rgr +72 -0
  22. package/dist/lib/lib/Crypto.rgr +90 -0
  23. package/dist/lib/lib/DOMLib.rgr +307 -0
  24. package/{examples/3D/Engine3D.clj → dist/lib/lib/Engine3D.rgr} +870 -857
  25. package/dist/lib/lib/ImmutableVector.rgr +364 -0
  26. package/dist/lib/lib/IndexedDB.rgr +32 -0
  27. package/{compiler/JSON.clj → dist/lib/lib/JSON.rgr} +106 -3
  28. package/dist/lib/lib/JinxProcess.rgr +838 -0
  29. package/dist/lib/lib/SQL.rgr +44 -0
  30. package/dist/lib/lib/ServiceLib.rgr +9 -0
  31. package/dist/lib/lib/Storage.rgr +89 -0
  32. package/dist/lib/lib/Time.rgr +75 -0
  33. package/dist/lib/lib/Timers.rgr +176 -0
  34. package/dist/lib/lib/TypedArrays.rgr +14 -0
  35. package/dist/lib/lib/ViewLib.rgr +851 -0
  36. package/dist/lib/lib/WebLib.rgr +47 -0
  37. package/dist/lib/lib/WebServerLib.rgr +137 -0
  38. package/{lib/ranger-dir.clj → dist/lib/lib/ranger-dir.rgr} +1 -1
  39. package/{compiler/stdlib.clj → dist/lib/lib/stdlib.rgr} +42 -19
  40. package/{lib/stdops.clj → dist/lib/lib/stdops.rgr} +1 -1
  41. package/dist/lib/ranger-dir.rgr +175 -0
  42. package/{lib/stdlib.clj → dist/lib/stdlib.rgr} +2 -2
  43. package/dist/lib/stdops.rgr +168 -0
  44. package/dist/package.json +47 -0
  45. package/{bin/output.js → dist/rgrc.js} +15377 -7935
  46. package/dist/stdops.rgr +168 -0
  47. package/package.json +196 -38
  48. package/adventofcode/day1/bin/LambdaSignature1.java +0 -3
  49. package/adventofcode/day1/bin/LambdaSignature2.java +0 -3
  50. package/adventofcode/day1/bin/LambdaSignature3.java +0 -3
  51. package/adventofcode/day1/bin/day1.cpp +0 -124
  52. package/adventofcode/day1/bin/day1.go +0 -75
  53. package/adventofcode/day1/bin/day1.js +0 -45
  54. package/adventofcode/day1/bin/day1.php +0 -46
  55. package/adventofcode/day1/bin/day1.scala +0 -48
  56. package/adventofcode/day1/bin/day1.swift +0 -48
  57. package/adventofcode/day1/bin/day1_part2.cpp +0 -180
  58. package/adventofcode/day1/bin/day1_part2.go +0 -123
  59. package/adventofcode/day1/bin/day1_part2.js +0 -76
  60. package/adventofcode/day1/bin/day1_part2.php +0 -88
  61. package/adventofcode/day1/bin/day1_part2.scala +0 -81
  62. package/adventofcode/day1/bin/day1_part2.swift +0 -91
  63. package/adventofcode/day1/bin/day_one.java +0 -38
  64. package/adventofcode/day1/bin/day_one_part_two.java +0 -57
  65. package/adventofcode/day1/bin/operatorsOf.java +0 -37
  66. package/adventofcode/day1/bin/operatorsOf_5.java +0 -10
  67. package/adventofcode/day1/bin/operatorsOfboolean_5.java +0 -10
  68. package/adventofcode/day1/bin/variant.hpp +0 -2416
  69. package/adventofcode/day1/compile.bat +0 -7
  70. package/adventofcode/day1/compile2.bat +0 -7
  71. package/adventofcode/day1/day1.clj +0 -19
  72. package/adventofcode/day1/day1_part2.clj +0 -43
  73. package/adventofcode/day1/input1.txt +0 -1
  74. package/adventofcode/day2/bin/LambdaSignature1.class +0 -0
  75. package/adventofcode/day2/bin/LambdaSignature1.java +0 -3
  76. package/adventofcode/day2/bin/LambdaSignature2.class +0 -0
  77. package/adventofcode/day2/bin/LambdaSignature2.java +0 -3
  78. package/adventofcode/day2/bin/day2.cpp +0 -133
  79. package/adventofcode/day2/bin/day2.go +0 -85
  80. package/adventofcode/day2/bin/day2.js +0 -45
  81. package/adventofcode/day2/bin/day2.php +0 -59
  82. package/adventofcode/day2/bin/day2.scala +0 -54
  83. package/adventofcode/day2/bin/day2.swift +0 -62
  84. package/adventofcode/day2/bin/day2_part2.cpp +0 -150
  85. package/adventofcode/day2/bin/day2_part2.go +0 -101
  86. package/adventofcode/day2/bin/day2_part2.js +0 -54
  87. package/adventofcode/day2/bin/day2_part2.php +0 -80
  88. package/adventofcode/day2/bin/day2_part2.scala +0 -68
  89. package/adventofcode/day2/bin/day2_part2.swift +0 -82
  90. package/adventofcode/day2/bin/day_two.java +0 -61
  91. package/adventofcode/day2/bin/day_two_part_two$1$1$1.class +0 -0
  92. package/adventofcode/day2/bin/day_two_part_two$1$1.class +0 -0
  93. package/adventofcode/day2/bin/day_two_part_two$1.class +0 -0
  94. package/adventofcode/day2/bin/day_two_part_two.class +0 -0
  95. package/adventofcode/day2/bin/day_two_part_two.java +0 -80
  96. package/adventofcode/day2/bin/operatorsOf.class +0 -0
  97. package/adventofcode/day2/bin/operatorsOf.java +0 -18
  98. package/adventofcode/day2/bin/variant.hpp +0 -2416
  99. package/adventofcode/day2/compile.bat +0 -7
  100. package/adventofcode/day2/compile2.bat +0 -7
  101. package/adventofcode/day2/day2.clj +0 -60
  102. package/adventofcode/day2/day2_part2.clj +0 -69
  103. package/adventofcode/day2/input1.txt +0 -1
  104. package/adventofcode/day3/bin/Grid.java +0 -92
  105. package/adventofcode/day3/bin/GridRow.java +0 -5
  106. package/adventofcode/day3/bin/LambdaSignature1.java +0 -3
  107. package/adventofcode/day3/bin/LambdaSignature2.java +0 -3
  108. package/adventofcode/day3/bin/LambdaSignature3.java +0 -3
  109. package/adventofcode/day3/bin/day3.cpp +0 -64
  110. package/adventofcode/day3/bin/day3.go +0 -55
  111. package/adventofcode/day3/bin/day3.js +0 -42
  112. package/adventofcode/day3/bin/day3.php +0 -41
  113. package/adventofcode/day3/bin/day3.scala +0 -52
  114. package/adventofcode/day3/bin/day3.swift +0 -43
  115. package/adventofcode/day3/bin/day3_part2.cpp +0 -216
  116. package/adventofcode/day3/bin/day3_part2.go +0 -188
  117. package/adventofcode/day3/bin/day3_part2.js +0 -123
  118. package/adventofcode/day3/bin/day3_part2.php +0 -135
  119. package/adventofcode/day3/bin/day3_part2.swift +0 -131
  120. package/adventofcode/day3/bin/day_three_part_two.java +0 -43
  121. package/adventofcode/day3/bin/day_two.java +0 -42
  122. package/adventofcode/day3/bin/operatorsOf.java +0 -14
  123. package/adventofcode/day3/bin/variant.hpp +0 -2416
  124. package/adventofcode/day3/compile.bat +0 -7
  125. package/adventofcode/day3/compile2.bat +0 -7
  126. package/adventofcode/day3/day3.clj +0 -42
  127. package/adventofcode/day3/day3_part2.clj +0 -112
  128. package/adventofcode/day4/bin/LambdaSignature1.java +0 -3
  129. package/adventofcode/day4/bin/day4.cpp +0 -118
  130. package/adventofcode/day4/bin/day4.go +0 -75
  131. package/adventofcode/day4/bin/day4.js +0 -40
  132. package/adventofcode/day4/bin/day4.php +0 -52
  133. package/adventofcode/day4/bin/day4.scala +0 -47
  134. package/adventofcode/day4/bin/day4.swift +0 -56
  135. package/adventofcode/day4/bin/day4_part2.go +0 -129
  136. package/adventofcode/day4/bin/day4_part2.js +0 -72
  137. package/adventofcode/day4/bin/day_four.java +0 -41
  138. package/adventofcode/day4/bin/inputData.java +0 -7
  139. package/adventofcode/day4/bin/operatorsOf.java +0 -11
  140. package/adventofcode/day4/bin/variant.hpp +0 -2416
  141. package/adventofcode/day4/compile.bat +0 -7
  142. package/adventofcode/day4/compile2.bat +0 -7
  143. package/adventofcode/day4/day4.clj +0 -32
  144. package/adventofcode/day4/day4_part2.clj +0 -44
  145. package/adventofcode/day4/input.clj +0 -519
  146. package/adventofcode/day4/input.txt +0 -512
  147. package/bin/api.ts +0 -24471
  148. package/bin/compiler.ts +0 -24482
  149. package/compiler/ColorConsole.clj +0 -22
  150. package/compiler/ContextOperators.clj +0 -75
  151. package/compiler/FlowEnterVarDef.clj +0 -223
  152. package/compiler/InputFileSystem.clj +0 -276
  153. package/compiler/RangerDocs.clj +0 -7
  154. package/compiler/TFactory.clj +0 -146
  155. package/compiler/TFiles.clj +0 -23
  156. package/compiler/TFlow.clj +0 -39
  157. package/compiler/TNodeFactory.clj +0 -84
  158. package/compiler/TTypes.clj +0 -188
  159. package/compiler/VirtualCompiler.clj +0 -800
  160. package/compiler/bin/ng_Compiler.js +0 -23779
  161. package/compiler/commonmark_plugin.clj +0 -359
  162. package/compiler/feat2.bat +0 -2
  163. package/compiler/feats.bat +0 -9
  164. package/compiler/feature_tests.clj +0 -192
  165. package/compiler/index.js +0 -2
  166. package/compiler/issue_57.clj +0 -25
  167. package/compiler/makefile_plugin.clj +0 -135
  168. package/compiler/markdown_plugin.clj +0 -386
  169. package/compiler/maven_plugin.clj +0 -162
  170. package/compiler/ng_AndroidPageWriter.clj +0 -299
  171. package/compiler/ng_CodeNode.clj +0 -756
  172. package/compiler/ng_CodeNodeCompilerExtensions.clj +0 -839
  173. package/compiler/ng_Compiler.clj +0 -49
  174. package/compiler/ng_CompilerGeneric.clj +0 -260
  175. package/compiler/ng_CompilerOrig.clj +0 -854
  176. package/compiler/ng_DictNode.clj +0 -346
  177. package/compiler/ng_DictNode2.clj +0 -316
  178. package/compiler/ng_Execute.clj +0 -138
  179. package/compiler/ng_Execute1.clj +0 -129
  180. package/compiler/ng_FlowWork.clj +0 -3951
  181. package/compiler/ng_LiveCompiler.clj +0 -1109
  182. package/compiler/ng_RagnerJavaScriptClassWriter.clj +0 -402
  183. package/compiler/ng_RangerActiveOperators.clj +0 -86
  184. package/compiler/ng_RangerAppClassDesc.clj +0 -400
  185. package/compiler/ng_RangerAppEnums.clj +0 -86
  186. package/compiler/ng_RangerAppFunctionDesc.clj +0 -127
  187. package/compiler/ng_RangerAppMessages.clj +0 -15
  188. package/compiler/ng_RangerAppOperatorDesc.clj +0 -20
  189. package/compiler/ng_RangerAppParamDesc.clj +0 -388
  190. package/compiler/ng_RangerAppWriterContext.clj +0 -1793
  191. package/compiler/ng_RangerArgMatch.clj +0 -638
  192. package/compiler/ng_RangerCSharpClassWriter.clj +0 -484
  193. package/compiler/ng_RangerCppClassWriter.clj +0 -1023
  194. package/compiler/ng_RangerDocGenerator.clj +0 -305
  195. package/compiler/ng_RangerFlowParser.clj +0 -4992
  196. package/compiler/ng_RangerFlowParserOrig.clj +0 -4002
  197. package/compiler/ng_RangerGenericClassWriter.clj +0 -573
  198. package/compiler/ng_RangerGolangClassWriter.clj +0 -1766
  199. package/compiler/ng_RangerImmutableExtension.clj +0 -77
  200. package/compiler/ng_RangerJava7ClassWriter.clj +0 -961
  201. package/compiler/ng_RangerJavaScriptClassWriter.clj +0 -1042
  202. package/compiler/ng_RangerKotlinClassWriter.clj +0 -372
  203. package/compiler/ng_RangerLanguageWriters.clj +0 -14
  204. package/compiler/ng_RangerLispParser.clj +0 -873
  205. package/compiler/ng_RangerPHPClassWriter.clj +0 -643
  206. package/compiler/ng_RangerPlugin.clj +0 -41
  207. package/compiler/ng_RangerRangerClassWriter.clj +0 -357
  208. package/compiler/ng_RangerRustClassWriter.clj +0 -420
  209. package/compiler/ng_RangerScalaClassWriter.clj +0 -818
  210. package/compiler/ng_RangerSerializeClass.clj +0 -502
  211. package/compiler/ng_RangerServiceBuilder.clj +0 -63
  212. package/compiler/ng_RangerSwift3ClassWriter.clj +0 -809
  213. package/compiler/ng_RangerSwiftClassWriter.clj +0 -0
  214. package/compiler/ng_RangerTypeClass.clj +0 -45
  215. package/compiler/ng_SourceParser.clj +0 -241
  216. package/compiler/ng_SourceParser2.clj +0 -214
  217. package/compiler/ng_WebPageWriter.clj +0 -39
  218. package/compiler/ng_jsonParser.clj +0 -340
  219. package/compiler/ng_p_test.clj +0 -1711
  220. package/compiler/ng_parser.clj +0 -911
  221. package/compiler/ng_parser2.clj +0 -735
  222. package/compiler/ng_parser2_backup.clj +0 -1679
  223. package/compiler/ng_parser_backup.clj +0 -886
  224. package/compiler/ng_parser_ok.clj +0 -1718
  225. package/compiler/ng_parser_ok2.clj +0 -1717
  226. package/compiler/ng_parser_std_match.clj +0 -687
  227. package/compiler/ng_parser_std_match2.clj +0 -1012
  228. package/compiler/ng_parser_v2.clj +0 -1251
  229. package/compiler/ng_ui.clj +0 -403
  230. package/compiler/ng_ui_test.clj +0 -18
  231. package/compiler/ng_writer.clj +0 -338
  232. package/compiler/ng_xmlParser.clj +0 -472
  233. package/compiler/ng_xmlParser2.clj +0 -317
  234. package/compiler/ng_xmlParser3.clj +0 -251
  235. package/compiler/opdoc.bat +0 -4
  236. package/compiler/operators.md +0 -290
  237. package/compiler/p.bat +0 -4
  238. package/compiler/package.json +0 -10
  239. package/compiler/pcmd.bat +0 -4
  240. package/compiler/pcmd2.bat +0 -3
  241. package/compiler/plaintext_plugin.clj +0 -69
  242. package/compiler/plugin.bat +0 -19
  243. package/compiler/plugin2.bat +0 -4
  244. package/compiler/plugin_app.bat +0 -3
  245. package/compiler/plugin_apps.clj +0 -27
  246. package/compiler/plugins.bat +0 -10
  247. package/compiler/reveal_plugin.clj +0 -409
  248. package/compiler/simplePlugin.clj +0 -780
  249. package/compiler/t.bat +0 -3
  250. package/compiler/test_any.clj +0 -43
  251. package/compiler/test_call.clj +0 -141
  252. package/compiler/test_chain.clj +0 -79
  253. package/compiler/test_json.clj +0 -10
  254. package/compiler/test_lambda.clj +0 -153
  255. package/compiler/test_pcmd.clj +0 -32
  256. package/compiler/test_pcmd2.clj +0 -29
  257. package/compiler/test_plugin.clj +0 -237
  258. package/compiler/test_readfile.clj +0 -13
  259. package/compiler/test_reveal.clj +0 -19
  260. package/compiler/test_slides.clj +0 -312
  261. package/compiler/test_types.clj +0 -143
  262. package/compiler/test_types2.clj +0 -49
  263. package/compiler/test_types3.clj +0 -53
  264. package/compiler/test_var.clj +0 -40
  265. package/compiler/tonpm.bat +0 -14
  266. package/compiler/tonpm2.bat +0 -12
  267. package/compiler/ui_plugin.clj +0 -507
  268. package/compiler/ui_plugin2.clj +0 -427
  269. package/compiler/update-git.bat +0 -3
  270. package/compiler/vcomp.bat +0 -4
  271. package/compiler/viewbuilder_Android.clj +0 -176
  272. package/compiler/viewbuilder_Web.clj +0 -105
  273. package/dist/bin/api.js +0 -32422
  274. package/dist/bin/api.js.map +0 -1
  275. package/dist/bin/compiler.d.ts +0 -1638
  276. package/dist/bin/compiler.js +0 -32444
  277. package/dist/bin/compiler.js.map +0 -1
  278. package/examples/3D/bin/test_3d.js +0 -329
  279. package/examples/3D/test_3d.clj +0 -385
  280. package/examples/EVGColor/EVGColor.clj +0 -310
  281. package/examples/EVGColor/EVGColorContext.clj +0 -176
  282. package/examples/EVGColor/bin/EVGColor.js +0 -286
  283. package/examples/EVGColor/bin/minimized.js +0 -286
  284. package/examples/SVGPath/SVGPath.clj +0 -625
  285. package/examples/SVGPath/Vec2.clj +0 -103
  286. package/examples/SVGPath/bin/SVGPath.cpp +0 -887
  287. package/examples/SVGPath/bin/SVGPath.js +0 -682
  288. package/examples/SVGPath/bin/minimized.js +0 -578
  289. package/examples/SVGPath/bin/variant.hpp +0 -2416
  290. package/examples/minification/Vec2.clj +0 -103
  291. package/examples/minification/bin/minified.js +0 -44
  292. package/examples/minification/bin/test.js +0 -117
  293. package/examples/minification/test.clj +0 -13
  294. package/fiddle/VirtualCompiler.js +0 -23495
  295. package/fiddle/browser_editor.js +0 -13240
  296. package/fiddle/compileEnv.js +0 -1
  297. package/fiddle/compileEnv.json +0 -1
  298. package/fiddle/lang_data.js +0 -1
  299. package/index.html +0 -18
  300. package/native/httpd/HttpTester.clj +0 -33
  301. package/native/httpd/RangerWebService.clj +0 -81
  302. package/operators.md +0 -290
  303. package/tsconfig.json +0 -29
  304. package/versions/cpp/compiler.cpp +0 -15032
  305. package/versions/es6/compiler.js +0 -12860
  306. package/versions/go/compiler.go +0 -21338
  307. package/versions/java/AfterCodeNode.java +0 -4
  308. package/versions/java/ClassJoinPoint.java +0 -6
  309. package/versions/java/CodeFile.java +0 -42
  310. package/versions/java/CodeFileSystem.java +0 -72
  311. package/versions/java/CodeNode.java +0 -807
  312. package/versions/java/CodeSlice.java +0 -13
  313. package/versions/java/CodeWriter.java +0 -185
  314. package/versions/java/ColorConsole.java +0 -8
  315. package/versions/java/CompilerInterface.java +0 -213
  316. package/versions/java/DictNode.java +0 -353
  317. package/versions/java/LiveCompiler.java +0 -772
  318. package/versions/java/NodeEvalState.java +0 -24
  319. package/versions/java/OpFindResult.java +0 -6
  320. package/versions/java/RangerAppArrayValue.java +0 -7
  321. package/versions/java/RangerAppClassDesc.java +0 -217
  322. package/versions/java/RangerAppEnum.java +0 -14
  323. package/versions/java/RangerAppFunctionDesc.java +0 -20
  324. package/versions/java/RangerAppHashValue.java +0 -11
  325. package/versions/java/RangerAppInterfaceImpl.java +0 -6
  326. package/versions/java/RangerAppMethodVariants.java +0 -6
  327. package/versions/java/RangerAppParamDesc.java +0 -321
  328. package/versions/java/RangerAppTodo.java +0 -6
  329. package/versions/java/RangerAppValue.java +0 -10
  330. package/versions/java/RangerAppWriterContext.java +0 -800
  331. package/versions/java/RangerArgMatch.java +0 -317
  332. package/versions/java/RangerBackReference.java +0 -7
  333. package/versions/java/RangerCSharpClassWriter.java +0 -287
  334. package/versions/java/RangerCompilerMessage.java +0 -9
  335. package/versions/java/RangerCppClassWriter.java +0 -725
  336. package/versions/java/RangerFlowParser.java +0 -2142
  337. package/versions/java/RangerGenericClassWriter.java +0 -367
  338. package/versions/java/RangerGolangClassWriter.java +0 -1379
  339. package/versions/java/RangerJava7ClassWriter.java +0 -652
  340. package/versions/java/RangerJavaScriptClassWriter.java +0 -305
  341. package/versions/java/RangerKotlinClassWriter.java +0 -380
  342. package/versions/java/RangerLispParser.java +0 -845
  343. package/versions/java/RangerNodeValue.java +0 -9
  344. package/versions/java/RangerPHPClassWriter.java +0 -527
  345. package/versions/java/RangerParamEventHandler.java +0 -6
  346. package/versions/java/RangerParamEventList.java +0 -5
  347. package/versions/java/RangerParamEventMap.java +0 -27
  348. package/versions/java/RangerRangerClassWriter.java +0 -268
  349. package/versions/java/RangerRefForce.java +0 -7
  350. package/versions/java/RangerScalaClassWriter.java +0 -365
  351. package/versions/java/RangerSerializeClass.java +0 -148
  352. package/versions/java/RangerSwift3ClassWriter.java +0 -548
  353. package/versions/java/RangerTypeClass.java +0 -17
  354. package/versions/java/SourceCode.java +0 -65
  355. package/versions/php/compiler.php +0 -13830
  356. package/versions/swift3/compiler.swift +0 -12542
  357. /package/{lib/ACEEditor.clj → dist/lib/ACEEditor.rgr} +0 -0
  358. /package/{lib/SQL.clj → dist/lib/SQL.rgr} +0 -0
  359. /package/{lib/ServiceLib.clj → dist/lib/ServiceLib.rgr} +0 -0
  360. /package/{lib/Time.clj → dist/lib/Time.rgr} +0 -0
  361. /package/{lib/TypedArrays.clj → dist/lib/TypedArrays.rgr} +0 -0
  362. /package/{lib/WebLib.clj → dist/lib/WebLib.rgr} +0 -0
  363. /package/{lib/WebServerLib.clj → dist/lib/WebServerLib.rgr} +0 -0
@@ -1,578 +0,0 @@
1
- class Vec2 {
2
- constructor() {
3
- this.x = 0.0;
4
- this.y = 0.0;
5
- }
6
- }
7
- Vec2.CreateNew = function(i, j) {
8
- const v = new Vec2();
9
- v.x = i;
10
- v.y = j;
11
- return v;
12
- };
13
- class PathExecutor {
14
- constructor() {
15
- }
16
- Move (x, y) {
17
- console.log((("Move called with " + x) + ", ") + y);
18
- };
19
- Line (x, y) {
20
- console.log((("Line called with " + x) + ", ") + y);
21
- };
22
- Curve (x0, y0, x1, y1, x2, y2) {
23
- console.log(((((((((((("Cubic bezier curve called with " + x0) + ", ") + y0) + " ") + x1) + ", ") + y1) + " ") + x2) + ", ") + y2) + " ");
24
- };
25
- }
26
- class PathCollector extends PathExecutor {
27
- constructor() {
28
- super()
29
- this.pathParts = [];
30
- }
31
- Move (x, y) {
32
- this.pathParts.push(((("M " + x) + " ") + y) + " ");
33
- };
34
- Line (x, y) {
35
- this.pathParts.push(((("L " + x) + " ") + y) + " ");
36
- };
37
- Curve (x0, y0, x1, y1, x2, y2) {
38
- this.pathParts.push(((((((((((("C " + x0) + " ") + y0) + " ") + x1) + " ") + y1) + " ") + x2) + " ") + y2) + " ");
39
- };
40
- getString () {
41
- return this.pathParts.join(" ");
42
- };
43
- }
44
- class PathSegment {
45
- constructor() {
46
- this.t0 = 0.0;
47
- this.t1 = 0.0;
48
- this.t2 = 0.0;
49
- this.t3 = 0.0;
50
- this.t4 = 0.0;
51
- this.t5 = 0.0;
52
- this.t6 = 0.0;
53
- }
54
- }
55
- class EVGBezierPath {
56
- constructor() {
57
- this.points = []; /** note: unused */
58
- this.pointCnt = 0; /** note: unused */
59
- this.closed = false;
60
- this.bounds = Vec2.CreateNew(0.0, 0.0); /** note: unused */
61
- this.cp1 = Vec2.CreateNew(0.0, 0.0); /** note: unused */
62
- this.cp2 = Vec2.CreateNew(0.0, 0.0); /** note: unused */
63
- this.controlPoint = Vec2.CreateNew(0.0, 0.0);
64
- }
65
- }
66
- class EVGPathParser {
67
- constructor() {
68
- this.i = 0;
69
- this.__len = 0;
70
- this.last_number = 0.0;
71
- }
72
- __xformPoint (point, seg) {
73
- const res = Vec2.CreateNew((((point.x * seg.t0) + (point.y * seg.t2)) + seg.t4), (((point.x * seg.t1) + (point.y * seg.t3)) + seg.t5));
74
- return res;
75
- };
76
- __xformVec (point, seg) {
77
- return Vec2.CreateNew(((point.x * seg.t0) + (point.y * seg.t2)), ((point.x * seg.t1) + (point.y * seg.t3)));
78
- };
79
- __vmag (point) {
80
- return Math.sqrt(((point.x * point.x) + (point.y * point.y)));
81
- };
82
- __vecrat (u, v) {
83
- return ((u.x * v.x) + (u.y * v.y)) / (this.__vmag(u) * this.__vmag(v));
84
- };
85
- __vecang (u, v) {
86
- let r = this.__vecrat(u, v);
87
- if ( r < -1.0 ) {
88
- r = -1.0;
89
- }
90
- if ( r > 1.0 ) {
91
- r = 1.0;
92
- }
93
- let res = 1.0;
94
- if ( (u.x * v.y) < (u.y * v.x) ) {
95
- res = -1.0;
96
- }
97
- return res * (Math.acos(r));
98
- };
99
- scanNumber () {
100
- const s = this.buff;
101
- let fc = s.charCodeAt(this.i );
102
- let c = fc;
103
- let sp = 0;
104
- let ep = 0;
105
- fc = s.charCodeAt(this.i );
106
- if ( (((fc == 45) && ((s.charCodeAt((this.i + 1) )) >= 46)) && ((s.charCodeAt((this.i + 1) )) <= 57)) || ((fc >= 48) && (fc <= 57)) ) {
107
- sp = this.i;
108
- this.i = 1 + this.i;
109
- c = s.charCodeAt(this.i );
110
- while ((this.i < this.__len) && ((((c >= 48) && (c <= 57)) || (c == (46))) || ((this.i == sp) && ((c == (43)) || (c == (45)))))) {
111
- this.i = 1 + this.i;
112
- if ( this.i >= this.__len ) {
113
- break;
114
- }
115
- c = s.charCodeAt(this.i );
116
- };
117
- ep = this.i;
118
- this.last_number = (isNaN( parseFloat((s.substring(sp, ep ))) ) ? undefined : parseFloat((s.substring(sp, ep ))));
119
- return true;
120
- }
121
- return false;
122
- };
123
- pathArcTo (callback, cp, args, rel) {
124
- let rx = 0.0;
125
- let ry = 0.0;
126
- let rotx = 0.0;
127
- let x1 = 0.0;
128
- let y1 = 0.0;
129
- let x2 = 0.0;
130
- let y2 = 0.0;
131
- let cx = 0.0;
132
- let cy = 0.0;
133
- let dx = 0.0;
134
- let dy = 0.0;
135
- let d = 0.0;
136
- let x1p = 0.0;
137
- let y1p = 0.0;
138
- let cxp = 0.0;
139
- let cyp = 0.0;
140
- let s = 0.0;
141
- let sa = 0.0;
142
- let sb = 0.0;
143
- /** unused: const ux = 0.0 **/
144
- /** unused: const uy = 0.0 **/
145
- /** unused: const vx = 0.0 **/
146
- /** unused: const vy = 0.0 **/
147
- let a1 = 0.0;
148
- let da = 0.0;
149
- let x = 0.0;
150
- let y = 0.0;
151
- let tanx = 0.0;
152
- let tany = 0.0;
153
- let a = 0.0;
154
- let px = 0.0;
155
- let py = 0.0;
156
- let ptanx = 0.0;
157
- let ptany = 0.0;
158
- const t = new PathSegment();
159
- let sinrx = 0.0;
160
- let cosrx = 0.0;
161
- let fa = 0.0;
162
- let fs = 0.0;
163
- let i_1 = 0;
164
- let ndivs = 0;
165
- let hda = 0.0;
166
- let kappa = 0.0;
167
- const PI_VALUE = Math.PI;
168
- const cpx = cp.x;
169
- const cpy = cp.y;
170
- rx = Math.abs(args.t0);
171
- ry = Math.abs(args.t1);
172
- rotx = (args.t2 / 180.0) * PI_VALUE;
173
- fa = ((Math.abs(args.t3)) > 0.00001) ? 1.0 : 0.0;
174
- fs = ((Math.abs(args.t4)) > 0.00001) ? 1.0 : 0.0;
175
- x1 = cpx;
176
- y1 = cpy;
177
- if ( rel ) {
178
- x2 = cpx + args.t5;
179
- y2 = cpy + args.t6;
180
- } else {
181
- x2 = args.t5;
182
- y2 = args.t6;
183
- }
184
- dx = x1 - x2;
185
- dy = y1 - y2;
186
- d = Math.sqrt(((dx * dx) + (dy * dy)));
187
- if ( ((d < 0.00001) || (rx < 0.00001)) || (ry < 0.00001) ) {
188
- callback.Line(x2, y2);
189
- return Vec2.CreateNew(x2, y2);
190
- }
191
- sinrx = Math.sin(rotx);
192
- cosrx = Math.cos(rotx);
193
- x1p = ((cosrx * dx) / 2.0) + ((sinrx * dy) / 2.0);
194
- y1p = (((-1.0 * sinrx) * dx) / 2.0) + ((cosrx * dy) / 2.0);
195
- d = ((x1p * x1p) / (rx * rx)) + ((y1p * y1p) / (ry * ry));
196
- if ( d > 1.0 ) {
197
- d = Math.sqrt(d);
198
- rx = rx * d;
199
- ry = ry * d;
200
- }
201
- s = 0.0;
202
- sa = (((rx * rx) * (ry * ry)) - ((rx * rx) * (y1p * y1p))) - ((ry * ry) * (x1p * x1p));
203
- sb = ((rx * rx) * (y1p * y1p)) + ((ry * ry) * (x1p * x1p));
204
- if ( sa < 0.0 ) {
205
- sa = 0.0;
206
- }
207
- if ( sb > 0.0 ) {
208
- s = Math.sqrt((sa / sb));
209
- }
210
- if ( fa == fs ) {
211
- s = -1.0 * s;
212
- }
213
- cxp = ((s * rx) * y1p) / ry;
214
- cyp = ((s * (-1.0 * ry)) * x1p) / rx;
215
- cx = ((x1 + x2) / 2.0) + ((cosrx * cxp) - (sinrx * cyp));
216
- cy = ((y1 + y2) / 2.0) + ((sinrx * cxp) + (cosrx * cyp));
217
- const u = Vec2.CreateNew(((x1p - cxp) / rx), ((y1p - cyp) / ry));
218
- const v = Vec2.CreateNew((((-1.0 * x1p) - cxp) / rx), (((-1.0 * y1p) - cyp) / ry));
219
- const unitV = Vec2.CreateNew(1.0, 0.0);
220
- a1 = this.__vecang(unitV, u);
221
- da = this.__vecang(u, v);
222
- if ( (fs == 0.0) && (da > 0.0) ) {
223
- da = da - (2.0 * PI_VALUE);
224
- } else {
225
- if ( (fs == 1.0) && (da < 0.0) ) {
226
- da = (2.0 * PI_VALUE) + da;
227
- }
228
- }
229
- t.t0 = cosrx;
230
- t.t1 = sinrx;
231
- t.t2 = -1.0 * sinrx;
232
- t.t3 = cosrx;
233
- t.t4 = cx;
234
- t.t5 = cy;
235
- ndivs = Math.floor( (((Math.abs(da)) / (PI_VALUE * 0.5)) + 1.0));
236
- hda = (da / (ndivs)) / 2.0;
237
- kappa = Math.abs((((4.0 / 3.0) * (1.0 - (Math.cos(hda)))) / (Math.sin(hda))));
238
- if ( da < 0.0 ) {
239
- kappa = -1.0 * kappa;
240
- }
241
- i_1 = 0;
242
- while (i_1 <= ndivs) {
243
- a = a1 + ((da * (i_1)) / (ndivs));
244
- dx = Math.cos(a);
245
- dy = Math.sin(a);
246
- const trans = this.__xformPoint(Vec2.CreateNew((dx * rx), (dy * ry)), t);
247
- x = trans.x;
248
- y = trans.y;
249
- const v_trans = this.__xformVec(Vec2.CreateNew((((-1.0 * dy) * rx) * kappa), ((dx * ry) * kappa)), t);
250
- tanx = v_trans.x;
251
- tany = v_trans.y;
252
- if ( i_1 > 0 ) {
253
- callback.Curve(px + ptanx, py + ptany, x - tanx, y - tany, x, y);
254
- }
255
- px = x;
256
- py = y;
257
- ptanx = tanx;
258
- ptany = tany;
259
- i_1 = i_1 + 1;
260
- };
261
- const rv = Vec2.CreateNew(x2, y2);
262
- return rv;
263
- };
264
- parsePath (path, callback) {
265
- this.i = 0;
266
- this.buff = path;
267
- const s = this.buff;
268
- this.__len = s.length;
269
- /** unused: const buff_1 = path **/
270
- let cmd = 76;
271
- /** unused: const path_1 = new EVGBezierPath() **/
272
- const args = new PathSegment();
273
- let require_args = 2;
274
- let arg_cnt = 0;
275
- const QPx = new PathSegment();
276
- const QPy = new PathSegment();
277
- const CPx = new PathSegment();
278
- const CPy = new PathSegment();
279
- let cx = 0.0;
280
- let cy = 0.0;
281
- let cx2 = 0.0;
282
- let cy2 = 0.0;
283
- let last_i = -1;
284
- while (this.i < this.__len) {
285
- if ( last_i == this.i ) {
286
- this.i = this.i + 1;
287
- }
288
- last_i = this.i;
289
- const c = s.charCodeAt(this.i );
290
- if ( (((c == (86)) || (c == (118))) || (c == (72))) || (c == (104)) ) {
291
- cmd = c;
292
- require_args = 1;
293
- arg_cnt = 0;
294
- continue;
295
- }
296
- if ( (((((c == (109)) || (c == (77))) || (c == (76))) || (c == (108))) || (c == (116))) || (c == (84)) ) {
297
- cmd = c;
298
- require_args = 2;
299
- arg_cnt = 0;
300
- continue;
301
- }
302
- if ( (((c == (113)) || (c == (81))) || (c == (83))) || (c == (115)) ) {
303
- cmd = c;
304
- require_args = 4;
305
- arg_cnt = 0;
306
- continue;
307
- }
308
- if ( (c == (99)) || (c == (67)) ) {
309
- cmd = c;
310
- require_args = 6;
311
- arg_cnt = 0;
312
- continue;
313
- }
314
- if ( (c == (97)) || (c == (65)) ) {
315
- cmd = c;
316
- require_args = 7;
317
- arg_cnt = 0;
318
- continue;
319
- }
320
- if ( this.scanNumber() ) {
321
- switch (arg_cnt ) {
322
- case 0 :
323
- args.t0 = this.last_number;
324
- break;
325
- case 1 :
326
- args.t1 = this.last_number;
327
- break;
328
- case 2 :
329
- args.t2 = this.last_number;
330
- break;
331
- case 3 :
332
- args.t3 = this.last_number;
333
- break;
334
- case 4 :
335
- args.t4 = this.last_number;
336
- break;
337
- case 5 :
338
- args.t5 = this.last_number;
339
- break;
340
- case 6 :
341
- args.t6 = this.last_number;
342
- break;
343
- default:
344
- break;
345
- };
346
- arg_cnt = arg_cnt + 1;
347
- if ( arg_cnt >= require_args ) {
348
- switch (cmd ) {
349
- case 109 :
350
- callback.Move(cx + args.t0, cy + args.t1);
351
- cx = args.t0;
352
- cy = args.t1;
353
- cmd = 76;
354
- require_args = 2;
355
- cx2 = cx;
356
- cy2 = cy;
357
- break;
358
- case 77 :
359
- callback.Move(args.t0, args.t1);
360
- cx = args.t0;
361
- cy = args.t1;
362
- cmd = 76;
363
- require_args = 2;
364
- cx2 = cx;
365
- cy2 = cy;
366
- break;
367
- case 108 :
368
- callback.Line(cx + args.t0, cy + args.t1);
369
- cx = cx + args.t0;
370
- cy = cy + args.t1;
371
- cx2 = cx;
372
- cy2 = cy;
373
- break;
374
- case 76 :
375
- callback.Line(args.t0, args.t1);
376
- cx = args.t0;
377
- cy = args.t1;
378
- cx2 = cx;
379
- cy2 = cy;
380
- break;
381
- case 104 :
382
- callback.Line(cx + args.t0, cy);
383
- cx = cx + args.t0;
384
- cx2 = cx;
385
- break;
386
- case 72 :
387
- callback.Line(args.t0, cy);
388
- cx = args.t0;
389
- cx2 = cx;
390
- break;
391
- case 118 :
392
- callback.Line(cx, cy + args.t0);
393
- cy = cy + args.t0;
394
- cy2 = cy;
395
- break;
396
- case 86 :
397
- callback.Line(cx, args.t0);
398
- cy = args.t0;
399
- cy2 = cy;
400
- break;
401
- case 99 :
402
- callback.Curve(cx + args.t0, cy + args.t1, cx + args.t2, cy + args.t3, cx + args.t4, cy + args.t5);
403
- cx2 = cx + args.t2;
404
- cy2 = cy + args.t3;
405
- cx = cx + args.t4;
406
- cy = cy + args.t5;
407
- break;
408
- case 67 :
409
- callback.Curve(args.t0, args.t1, args.t2, args.t3, args.t4, args.t5);
410
- cx2 = args.t2;
411
- cy2 = args.t3;
412
- cx = args.t4;
413
- cy = args.t5;
414
- break;
415
- case 115 :
416
- callback.Curve((cx + cx) - cx2, (cy + cy) - cy2, cx + args.t0, cy + args.t1, cx + args.t2, cy + args.t3);
417
- cx2 = cx + args.t0;
418
- cy2 = cy + args.t1;
419
- cx = cx + args.t2;
420
- cy = cy + args.t3;
421
- break;
422
- case 83 :
423
- callback.Curve((cx + cx) - cx2, (cy + cy) - cy2, args.t0, args.t1, args.t2, args.t3);
424
- cx2 = args.t0;
425
- cy2 = args.t1;
426
- cx = args.t2;
427
- cy = args.t3;
428
- break;
429
- case 113 :
430
- QPx.t0 = cx;
431
- QPy.t0 = cy;
432
- QPx.t1 = cx + args.t0;
433
- QPy.t1 = cy + args.t1;
434
- QPx.t2 = cx + args.t2;
435
- QPy.t2 = cy + args.t3;
436
- CPx.t0 = QPx.t0;
437
- CPy.t0 = QPy.t0;
438
- CPx.t1 = QPx.t0 + ((2.0 / 3.0) * (QPx.t1 - QPx.t0));
439
- CPy.t1 = QPy.t0 + ((2.0 / 3.0) * (QPy.t1 - QPy.t0));
440
- CPx.t2 = QPx.t2 + ((2.0 / 3.0) * (QPx.t1 - QPx.t2));
441
- CPy.t2 = QPy.t2 + ((2.0 / 3.0) * (QPy.t1 - QPy.t2));
442
- CPx.t3 = QPx.t2;
443
- CPy.t3 = QPy.t2;
444
- callback.Curve(CPx.t1, CPy.t1, CPx.t2, CPy.t2, CPx.t3, CPy.t3);
445
- cx2 = CPx.t2;
446
- cy2 = CPy.t2;
447
- cx = CPx.t3;
448
- cy = CPy.t3;
449
- break;
450
- case 81 :
451
- QPx.t0 = cx;
452
- QPy.t0 = cy;
453
- QPx.t1 = args.t0;
454
- QPy.t1 = args.t1;
455
- QPx.t2 = args.t2;
456
- QPy.t2 = args.t3;
457
- CPx.t0 = QPx.t0;
458
- CPy.t0 = QPy.t0;
459
- CPx.t1 = QPx.t0 + ((2.0 / 3.0) * (QPx.t1 - QPx.t0));
460
- CPy.t1 = QPy.t0 + ((2.0 / 3.0) * (QPy.t1 - QPy.t0));
461
- CPx.t2 = QPx.t2 + ((2.0 / 3.0) * (QPx.t1 - QPx.t2));
462
- CPy.t2 = QPy.t2 + ((2.0 / 3.0) * (QPy.t1 - QPy.t2));
463
- CPx.t3 = QPx.t2;
464
- CPy.t3 = QPy.t2;
465
- callback.Curve(CPx.t1, CPy.t1, CPx.t2, CPy.t2, CPx.t3, CPy.t3);
466
- cx2 = CPx.t1;
467
- cy2 = CPy.t1;
468
- cx = CPx.t2;
469
- cy = CPy.t3;
470
- break;
471
- case 84 :
472
- QPx.t0 = cx;
473
- QPy.t0 = cy;
474
- QPx.t1 = (2.0 * cx) - cx2;
475
- QPy.t1 = (2.0 * cy) - cy2;
476
- QPx.t2 = args.t0;
477
- QPy.t2 = args.t1;
478
- CPx.t0 = QPx.t0;
479
- CPy.t0 = QPy.t0;
480
- CPx.t1 = QPx.t0 + ((2.0 / 3.0) * (QPx.t1 - QPx.t0));
481
- CPy.t1 = QPy.t0 + ((2.0 / 3.0) * (QPy.t1 - QPy.t0));
482
- CPx.t2 = QPx.t2;
483
- CPy.t2 = QPy.t2;
484
- callback.Curve(CPx.t0, CPy.t0, CPx.t1, CPy.t1, CPx.t2, CPy.t2);
485
- cx2 = CPx.t1;
486
- cy2 = CPy.t1;
487
- cx = CPx.t2;
488
- cy = CPy.t3;
489
- break;
490
- case 116 :
491
- QPx.t0 = cx;
492
- QPy.t0 = cy;
493
- QPx.t1 = (2.0 * cx) - cx2;
494
- QPy.t1 = (2.0 * cy) - cy2;
495
- QPx.t2 = cx + args.t0;
496
- QPy.t2 = cy + args.t1;
497
- CPx.t0 = QPx.t0;
498
- CPy.t0 = QPy.t0;
499
- CPx.t1 = QPx.t0 + ((2.0 / 3.0) * (QPx.t1 - QPx.t0));
500
- CPy.t1 = QPy.t0 + ((2.0 / 3.0) * (QPy.t1 - QPy.t0));
501
- CPx.t2 = QPx.t2;
502
- CPy.t2 = QPy.t2;
503
- callback.Curve(CPx.t0, CPy.t0, CPx.t1, CPy.t1, CPx.t2, CPy.t2);
504
- cx2 = CPx.t1;
505
- cy2 = CPy.t1;
506
- cx = CPx.t2;
507
- cy = CPy.t3;
508
- break;
509
- case 97 :
510
- const res = this.pathArcTo(callback, Vec2.CreateNew(cx, cy), args, true);
511
- cx = res.x;
512
- cy = res.y;
513
- cx2 = cx;
514
- cy2 = cy;
515
- break;
516
- case 65 :
517
- const res_1 = this.pathArcTo(callback, Vec2.CreateNew(cx, cy), args, false);
518
- cx = res_1.x;
519
- cy = res_1.y;
520
- cx2 = cx;
521
- cy2 = cy;
522
- break;
523
- default:
524
- if ( arg_cnt >= 2 ) {
525
- cx = args.t0;
526
- cy = args.t1;
527
- cx2 = cx;
528
- cy2 = cy;
529
- }
530
- break;
531
- };
532
- arg_cnt = 0;
533
- }
534
- }
535
- };
536
- };
537
- }
538
- /* static JavaSript main routine at the end of the JS file */
539
- function __js_main() {
540
- const path1 = "M130 110 C 120 140, 180 140, 170 110";
541
- const path2 = "M10 80 C 40 10, 65 10, 95 80 S 150 150, 180 80";
542
- const path3 = "M10 80 Q 95 10 180 80";
543
- const path4 = "M10 80 Q 52.5 10, 95 80 T 180 80";
544
- const path5 = "M-130 -110 C 120 140, 180 140, 170 110";
545
- const path6 = "M10 315\r\n L 110 215\r\n A 30 50 0 0 1 162.55 162.45\r\n L 172.55 152.45\r\n A 30 50 -45 0 1 215.1 109.9\r\n L 315 10";
546
- const path7 = "M 14.781 14.347 h 1.738 c 0.24 0 0.436 -0.194 0.436 -0.435 v -1.739 c 0 -0.239 -0.195 -0.435 -0.436 -0.435 h -1.738 c -0.239 0 -0.435 0.195 -0.435 0.435 v 1.739 C 14.347 14.152 14.542 14.347 14.781 14.347 M 18.693 3.045 H 1.307 c -0.48 0 -0.869 0.39 -0.869 0.869 v 12.17 c 0 0.479 0.389 0.869 0.869 0.869 h 17.387 c 0.479 0 0.869 -0.39 0.869 -0.869 V 3.915 C 19.562 3.435 19.173 3.045 18.693 3.045 M 18.693 16.085 H 1.307 V 9.13 h 17.387 V 16.085 Z M 18.693 5.653 H 1.307 V 3.915 h 17.387 V 5.653 Z M 3.48 12.608 h 7.824 c 0.24 0 0.435 -0.195 0.435 -0.436 c 0 -0.239 -0.194 -0.435 -0.435 -0.435 H 3.48 c -0.24 0 -0.435 0.195 -0.435 0.435 C 3.045 12.413 3.24 12.608 3.48 12.608 M 3.48 14.347 h 6.085 c 0.24 0 0.435 -0.194 0.435 -0.435 s -0.195 -0.435 -0.435 -0.435 H 3.48 c -0.24 0 -0.435 0.194 -0.435 0.435 S 3.24 14.347 3.48 14.347";
547
- const path8 = "M 4.423 9.141 H 3.565 c -0.237 0 -0.429 0.192 -0.429 0.429 s 0.192 0.429 0.429 0.429 h 0.858 c 0.237 0 0.429 -0.192 0.429 -0.429 S 4.66 9.141 4.423 9.141 M 6.997 16.861 H 6.139 c -0.237 0 -0.429 0.192 -0.429 0.43 s 0.192 0.429 0.429 0.429 h 0.858 c 0.237 0 0.429 -0.191 0.429 -0.429 S 7.234 16.861 6.997 16.861 M 4.423 16.861 H 3.565 c -0.237 0 -0.429 0.192 -0.429 0.43 s 0.192 0.429 0.429 0.429 h 0.858 c 0.237 0 0.429 -0.191 0.429 -0.429 S 4.66 16.861 4.423 16.861 M 13.861 9.998 h 0.857 c 0.236 0 0.429 -0.192 0.429 -0.429 s -0.192 -0.429 -0.429 -0.429 h -0.857 c -0.237 0 -0.43 0.192 -0.43 0.429 S 13.624 9.998 13.861 9.998 M 14.719 16.861 h -0.857 c -0.237 0 -0.43 0.192 -0.43 0.43 s 0.192 0.429 0.43 0.429 h 0.857 c 0.236 0 0.429 -0.191 0.429 -0.429 S 14.955 16.861 14.719 16.861 M 15.576 13.001 c -0.236 0 -0.429 0.192 -0.429 0.43 c 0 0.236 0.192 0.429 0.429 0.429 c 0.237 0 0.43 -0.192 0.43 -0.429 C 16.006 13.193 15.813 13.001 15.576 13.001 M 6.997 9.141 H 6.139 c -0.237 0 -0.429 0.192 -0.429 0.429 s 0.192 0.429 0.429 0.429 h 0.858 c 0.237 0 0.429 -0.192 0.429 -0.429 S 7.234 9.141 6.997 9.141 M 12.145 9.141 h -0.857 c -0.236 0 -0.429 0.192 -0.429 0.429 s 0.193 0.429 0.429 0.429 h 0.857 c 0.237 0 0.43 -0.192 0.43 -0.429 S 12.382 9.141 12.145 9.141 M 17.722 10.856 V 7.424 c 0 -0.948 -0.769 -1.716 -1.716 -1.716 h -0.617 l -1.038 -3.873 c -0.245 -0.916 -1.186 -1.458 -2.101 -1.213 L 3.592 2.912 C 2.676 3.157 2.133 4.098 2.378 5.014 l 0.186 0.695 H 2.278 c -0.947 0 -1.716 0.768 -1.716 1.716 V 17.72 c 0 0.947 0.769 1.716 1.716 1.716 h 13.728 c 0.947 0 1.716 -0.769 1.716 -1.716 v -1.716 c 0.947 0 1.716 -0.769 1.716 -1.716 v -1.716 C 19.438 11.624 18.669 10.856 17.722 10.856 M 16.006 6.566 c 0.473 0 0.857 0.384 0.857 0.858 v 0.238 c -0.253 -0.146 -0.544 -0.238 -0.857 -0.238 h -0.157 l -0.229 -0.858 H 16.006 Z M 14.41 5.372 l 0.55 2.053 H 6.67 L 14.41 5.372 Z M 3.814 3.741 l 8.657 -2.29 c 0.458 -0.123 0.928 0.149 1.051 0.607 l 0.222 0.828 L 3.43 5.621 l -0.223 -0.83 C 3.084 4.333 3.356 3.863 3.814 3.741 M 1.42 7.424 c 0 -0.474 0.384 -0.858 0.858 -0.858 h 0.517 l 0.229 0.858 H 2.278 c -0.314 0 -0.605 0.091 -0.858 0.238 V 7.424 Z M 16.863 17.72 c 0 0.474 -0.385 0.858 -0.857 0.858 H 2.278 c -0.474 0 -0.858 -0.385 -0.858 -0.858 V 9.141 c 0 -0.474 0.384 -0.858 0.858 -0.858 h 13.728 c 0.473 0 0.857 0.384 0.857 0.858 v 1.715 h -1.716 c -0.947 0 -1.716 0.768 -1.716 1.716 v 1.716 c 0 0.947 0.769 1.716 1.716 1.716 h 1.716 V 17.72 Z M 18.58 14.288 c 0 0.474 -0.385 0.857 -0.858 0.857 h -2.574 c -0.474 0 -0.857 -0.384 -0.857 -0.857 v -1.716 c 0 -0.474 0.384 -0.858 0.857 -0.858 h 2.574 c 0.474 0 0.858 0.385 0.858 0.858 V 14.288 Z M 9.571 16.861 H 8.713 c -0.237 0 -0.429 0.192 -0.429 0.43 s 0.192 0.429 0.429 0.429 h 0.858 c 0.236 0 0.429 -0.191 0.429 -0.429 S 9.808 16.861 9.571 16.861 M 12.145 16.861 h -0.857 c -0.236 0 -0.429 0.192 -0.429 0.43 s 0.193 0.429 0.429 0.429 h 0.857 c 0.237 0 0.43 -0.191 0.43 -0.429 S 12.382 16.861 12.145 16.861 M 9.571 9.141 H 8.713 c -0.237 0 -0.429 0.192 -0.429 0.429 s 0.192 0.429 0.429 0.429 h 0.858 C 9.808 9.998 10 9.806 10 9.569 S 9.808 9.141 9.571 9.141";
548
- const path9 = "M 4.423 9.141 H 3.565 c -0.237 0 -0.429 0.192 -0.429 0.429 s 0.192 0.429 0.429 0.429 h 0.858 c 0.237 0 0.429 -0.192 0.429 -0.429 S 4.66 9.141 4.423 9.141 M 6.997 16.861 H 6.139 c -0.237 0 -0.429 0.192 -0.429 0.43 s 0.192 0.429 0.429 0.429 h 0.858 c 0.237 0 0.429 -0.191 0.429 -0.429 S 7.234 16.861 6.997 16.861 M 4.423 16.861 H 3.565 c -0.237 0 -0.429 0.192 -0.429 0.43 s 0.192 0.429 0.429 0.429 h 0.858 c 0.237 0 0.429 -0.191 0.429 -0.429 S 4.66 16.861 4.423 16.861 M 13.861 9.998 h 0.857 c 0.236 0 0.429 -0.192 0.429 -0.429 s -0.192 -0.429 -0.429 -0.429 h -0.857 c -0.237 0 -0.43 0.192 -0.43 0.429 S 13.624 9.998 13.861 9.998 M 14.719 16.861 h -0.857 c -0.237 0 -0.43 0.192 -0.43 0.43 s 0.192 0.429 0.43 0.429 h 0.857 c 0.236 0 0.429 -0.191 0.429 -0.429 S 14.955 16.861 14.719 16.861 M 15.576 13.001 c -0.236 0 -0.429 0.192 -0.429 0.43 c 0 0.236 0.192 0.429 0.429 0.429 c 0.237 0 0.43 -0.192 0.43 -0.429 C 16.006 13.193 15.813 13.001 15.576 13.001 M 6.997 9.141 H 6.139 c -0.237 0 -0.429 0.192 -0.429 0.429 s 0.192 0.429 0.429 0.429 h 0.858 c 0.237 0 0.429 -0.192 0.429 -0.429 S 7.234 9.141 6.997 9.141 M 12.145 9.141 h -0.857 c -0.236 0 -0.429 0.192 -0.429 0.429 s 0.193 0.429 0.429 0.429 h 0.857 c 0.237 0 0.43 -0.192 0.43 -0.429 S 12.382 9.141 12.145 9.141 M 17.722 10.856 V 7.424 c 0 -0.948 -0.769 -1.716 -1.716 -1.716 h -0.617 l -1.038 -3.873 -3 -4";
549
- const path10 = "M 16.853 8.355 V 5.888 c 0 -3.015 -2.467 -5.482 -5.482 -5.482 H 8.629 c -3.015 0 -5.482 2.467 -5.482 5.482 v 2.467 l -2.741 7.127 c 0 1.371 4.295 4.112 9.594 4.112 s 9.594 -2.741 9.594 -4.112 L 16.853 8.355 Z M 5.888 17.367 c -0.284 0 -0.514 -0.23 -0.514 -0.514 c 0 -0.284 0.23 -0.514 0.514 -0.514 c 0.284 0 0.514 0.23 0.514 0.514 C 6.402 17.137 6.173 17.367 5.888 17.367 Z M 5.203 10 c 0 -0.377 0.19 -0.928 0.423 -1.225 c 0 0 0.651 -0.831 1.976 -0.831 c 0.672 0 1.141 0.309 1.141 0.309 C 9.057 8.46 9.315 8.938 9.315 9.315 v 1.028 c 0 0.188 -0.308 0.343 -0.685 0.343 H 5.888 C 5.511 10.685 5.203 10.377 5.203 10 Z M 7.944 16.853 H 7.259 v -1.371 l 0.685 -0.685 V 16.853 Z M 9.657 16.853 H 8.629 v -2.741 h 1.028 V 16.853 Z M 8.972 13.426 v -1.028 c 0 -0.568 0.46 -1.028 1.028 -1.028 c 0.568 0 1.028 0.46 1.028 1.028 v 1.028 H 8.972 Z M 11.371 16.853 h -1.028 v -2.741 h 1.028 V 16.853 Z M 12.741 16.853 h -0.685 v -2.056 l 0.685 0.685 V 16.853 Z M 14.112 17.367 c -0.284 0 -0.514 -0.23 -0.514 -0.514 c 0 -0.284 0.23 -0.514 0.514 -0.514 c 0.284 0 0.514 0.23 0.514 0.514 C 14.626 17.137 14.396 17.367 14.112 17.367 Z M 14.112 10.685 h -2.741 c -0.377 0 -0.685 -0.154 -0.685 -0.343 V 9.315 c 0 -0.377 0.258 -0.855 0.572 -1.062 c 0 0 0.469 -0.309 1.141 -0.309 c 1.325 0 1.976 0.831 1.976 0.831 c 0.232 0.297 0.423 0.848 0.423 1.225 S 14.489 10.685 14.112 10.685 Z M 18.347 15.801 c -0.041 0.016 -0.083 0.023 -0.124 0.023 c -0.137 0 -0.267 -0.083 -0.319 -0.218 l -2.492 -6.401 c -0.659 -1.647 -1.474 -2.289 -2.905 -2.289 c -0.95 0 -1.746 0.589 -1.754 0.595 c -0.422 0.317 -1.084 0.316 -1.507 0 C 9.239 7.505 8.435 6.916 7.492 6.916 c -1.431 0 -2.246 0.642 -2.906 2.292 l -2.491 6.398 c -0.069 0.176 -0.268 0.264 -0.443 0.195 c -0.176 -0.068 -0.264 -0.267 -0.195 -0.444 l 2.492 -6.401 c 0.765 -1.911 1.824 -2.726 3.543 -2.726 c 1.176 0 2.125 0.702 2.165 0.731 c 0.179 0.135 0.506 0.135 0.685 0 c 0.04 -0.029 0.99 -0.731 2.165 -0.731 c 1.719 0 2.779 0.814 3.542 2.723 l 2.493 6.404 C 18.611 15.534 18.524 15.733 18.347 15.801 Z";
550
- /** unused: const path11 = "M10,6.536c-2.263,0-4.099,1.836-4.099,4.098S7.737,14.732,10,14.732s4.099-1.836,4.099-4.098S12.263,6.536,10,6.536M10,13.871c-1.784,0-3.235-1.453-3.235-3.237S8.216,7.399,10,7.399c1.784,0,3.235,1.452,3.235,3.235S11.784,13.871,10,13.871M17.118,5.672l-3.237,0.014L12.52,3.697c-0.082-0.105-0.209-0.168-0.343-0.168H7.824c-0.134,0-0.261,0.062-0.343,0.168L6.12,5.686H2.882c-0.951,0-1.726,0.748-1.726,1.699v7.362c0,0.951,0.774,1.725,1.726,1.725h14.236c0.951,0,1.726-0.773,1.726-1.725V7.195C18.844,6.244,18.069,5.672,17.118,5.672 M17.98,14.746c0,0.477-0.386,0.861-0.862,0.861H2.882c-0.477,0-0.863-0.385-0.863-0.861V7.384c0-0.477,0.386-0.85,0.863-0.85l3.451,0.014c0.134,0,0.261-0.062,0.343-0.168l1.361-1.989h3.926l1.361,1.989c0.082,0.105,0.209,0.168,0.343,0.168l3.451-0.014c0.477,0,0.862,0.184,0.862,0.661V14.746z" **/
551
- const ex = new PathExecutor();
552
- const parser = new EVGPathParser();
553
- parser.parsePath(path1, ex);
554
- parser.parsePath(path2, ex);
555
- parser.parsePath(path3, ex);
556
- parser.parsePath(path4, ex);
557
- parser.parsePath(path5, ex);
558
- parser.parsePath(path6, ex);
559
- const coll = new PathCollector();
560
- parser.parsePath(path6, coll);
561
- console.log(coll.getString());
562
- const coll_2 = new PathCollector();
563
- parser.parsePath(path7, coll_2);
564
- console.log(coll_2.getString());
565
- console.log(" ----- ");
566
- const coll_3 = new PathCollector();
567
- parser.parsePath(path8, coll_3);
568
- console.log(coll_3.getString());
569
- console.log(" ----- ");
570
- const coll_4 = new PathCollector();
571
- parser.parsePath(path9, coll_4);
572
- console.log(coll_4.getString());
573
- console.log(" ----- ");
574
- const coll_5 = new PathCollector();
575
- parser.parsePath(path10, coll_5);
576
- console.log(coll_5.getString());
577
- }
578
- __js_main();