Flowfile 0.5.1__py3-none-any.whl → 0.5.3__py3-none-any.whl
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.
- build_backends/main.py +25 -22
- build_backends/main_prd.py +10 -19
- flowfile/__init__.py +178 -74
- flowfile/__main__.py +10 -7
- flowfile/api.py +51 -57
- flowfile/web/__init__.py +14 -9
- flowfile/web/static/assets/AdminView-49392a9a.js +713 -0
- flowfile/web/static/assets/AdminView-f53bad23.css +129 -0
- flowfile/web/static/assets/CloudConnectionView-36bcd6df.css +72 -0
- flowfile/web/static/assets/{CloudConnectionManager-0dfba9f2.js → CloudConnectionView-f13f202b.js} +11 -11
- flowfile/web/static/assets/{CloudStorageReader-d5b1b6c9.js → CloudStorageReader-0023d4a5.js} +10 -8
- flowfile/web/static/assets/{CloudStorageReader-29d14fcc.css → CloudStorageReader-24c54524.css} +27 -27
- flowfile/web/static/assets/{CloudStorageWriter-b0ee067f.css → CloudStorageWriter-60547855.css} +26 -26
- flowfile/web/static/assets/{CloudStorageWriter-00d87aad.js → CloudStorageWriter-8e781e11.js} +10 -8
- flowfile/web/static/assets/{ColumnSelector-47996a16.css → ColumnSelector-371637fb.css} +2 -2
- flowfile/web/static/assets/{ColumnSelector-4685e75d.js → ColumnSelector-8ad68ea9.js} +3 -5
- flowfile/web/static/assets/{ContextMenu-c13f91d0.css → ContextMenu-26d4dd27.css} +6 -6
- flowfile/web/static/assets/{ContextMenu-23e909da.js → ContextMenu-31ee57f0.js} +3 -3
- flowfile/web/static/assets/{ContextMenu-70ae0c79.js → ContextMenu-69a74055.js} +3 -3
- flowfile/web/static/assets/{ContextMenu-f149cf7c.js → ContextMenu-8e2051c6.js} +3 -3
- flowfile/web/static/assets/{ContextMenu-4c74eef1.css → ContextMenu-8ec1729e.css} +6 -6
- flowfile/web/static/assets/{ContextMenu-63cfa99b.css → ContextMenu-9b310c60.css} +6 -6
- flowfile/web/static/assets/{CrossJoin-702a3edd.js → CrossJoin-03df6938.js} +12 -10
- flowfile/web/static/assets/{CrossJoin-1119d18e.css → CrossJoin-71b4cc10.css} +20 -20
- flowfile/web/static/assets/CustomNode-59e99a86.css +32 -0
- flowfile/web/static/assets/{CustomNode-b1519993.js → CustomNode-8479239b.js} +36 -24
- flowfile/web/static/assets/{DatabaseConnectionSettings-6f3e4ea5.js → DatabaseConnectionSettings-869e3efd.js} +5 -4
- flowfile/web/static/assets/{DatabaseConnectionSettings-0c04b2e5.css → DatabaseConnectionSettings-e91df89a.css} +13 -13
- flowfile/web/static/assets/{DatabaseReader-ae61773c.css → DatabaseReader-36898a00.css} +24 -24
- flowfile/web/static/assets/{DatabaseReader-d38c7295.js → DatabaseReader-c58b9552.js} +25 -15
- flowfile/web/static/assets/DatabaseView-6655afd6.css +57 -0
- flowfile/web/static/assets/{DatabaseManager-cf5ef661.js → DatabaseView-d26a9140.js} +11 -11
- flowfile/web/static/assets/{DatabaseWriter-2f570e53.css → DatabaseWriter-217a99f1.css} +19 -19
- flowfile/web/static/assets/{DatabaseWriter-b04ef46a.js → DatabaseWriter-4d05ddc7.js} +17 -10
- flowfile/web/static/assets/{designer-8da3ba3a.css → DesignerView-a6d0ee84.css} +614 -546
- flowfile/web/static/assets/{designer-9633482a.js → DesignerView-e6f5c0e8.js} +1107 -3170
- flowfile/web/static/assets/{documentation-ca400224.js → DocumentationView-2e78ef1b.js} +5 -5
- flowfile/web/static/assets/{documentation-12216a74.css → DocumentationView-fd46c656.css} +7 -7
- flowfile/web/static/assets/{ExploreData-2d0cf4db.css → ExploreData-10c5acc8.css} +13 -12
- flowfile/web/static/assets/{ExploreData-5fa10ed8.js → ExploreData-7b54caca.js} +18 -9
- flowfile/web/static/assets/{ExternalSource-d39af878.js → ExternalSource-3fa399b2.js} +9 -7
- flowfile/web/static/assets/{ExternalSource-e37b6275.css → ExternalSource-47ab05a3.css} +17 -17
- flowfile/web/static/assets/Filter-7494ea97.css +48 -0
- flowfile/web/static/assets/Filter-8cbbdbf3.js +287 -0
- flowfile/web/static/assets/{Formula-bb96803d.css → Formula-53d58c43.css} +7 -7
- flowfile/web/static/assets/{Formula-6b04fb1d.js → Formula-aac42b1e.js} +13 -11
- flowfile/web/static/assets/{FuzzyMatch-1010f966.css → FuzzyMatch-ad6361d6.css} +68 -69
- flowfile/web/static/assets/{FuzzyMatch-999521f4.js → FuzzyMatch-cd9bbfca.js} +12 -10
- flowfile/web/static/assets/{Pivot-cf333e3d.css → GraphSolver-c24dec17.css} +5 -5
- flowfile/web/static/assets/{GraphSolver-17dd2198.js → GraphSolver-c7e6780e.js} +13 -11
- flowfile/web/static/assets/{GroupBy-6b039e18.js → GroupBy-93c5d22b.js} +9 -7
- flowfile/web/static/assets/{GroupBy-b9505323.css → GroupBy-be7ac0bf.css} +10 -10
- flowfile/web/static/assets/{Join-fd79b451.css → Join-28b5e18f.css} +22 -22
- flowfile/web/static/assets/{Join-24d0f113.js → Join-a19b2de2.js} +13 -11
- flowfile/web/static/assets/LoginView-0df4ed0a.js +134 -0
- flowfile/web/static/assets/LoginView-d325d632.css +172 -0
- flowfile/web/static/assets/ManualInput-3702e677.css +293 -0
- flowfile/web/static/assets/{ManualInput-34639209.js → ManualInput-8d3374b2.js} +170 -116
- flowfile/web/static/assets/{MultiSelect-0e8724a3.js → MultiSelect-ad1b6243.js} +2 -2
- flowfile/web/static/assets/{MultiSelect.vue_vue_type_script_setup_true_lang-b0e538c2.js → MultiSelect.vue_vue_type_script_setup_true_lang-e278950d.js} +1 -1
- flowfile/web/static/assets/NodeDesigner-40b647c9.js +2610 -0
- flowfile/web/static/assets/NodeDesigner-5f53be3f.css +1429 -0
- flowfile/web/static/assets/{NumericInput-3d63a470.js → NumericInput-7100234c.js} +2 -2
- flowfile/web/static/assets/{NumericInput.vue_vue_type_script_setup_true_lang-e0edeccc.js → NumericInput.vue_vue_type_script_setup_true_lang-5130219f.js} +5 -2
- flowfile/web/static/assets/{Output-283fe388.css → Output-35e97000.css} +6 -6
- flowfile/web/static/assets/{Output-edea9802.js → Output-f5efd2aa.js} +12 -9
- flowfile/web/static/assets/{GraphSolver-f0cb7bfb.css → Pivot-0eda81b4.css} +5 -5
- flowfile/web/static/assets/{Pivot-61d19301.js → Pivot-d981d23c.js} +11 -9
- flowfile/web/static/assets/PivotValidation-0e905b1a.css +13 -0
- flowfile/web/static/assets/{PivotValidation-f97fec5b.js → PivotValidation-39386e95.js} +3 -3
- flowfile/web/static/assets/PivotValidation-41b57ad6.css +13 -0
- flowfile/web/static/assets/{PivotValidation-de9f43fe.js → PivotValidation-63de1f73.js} +3 -3
- flowfile/web/static/assets/{PolarsCode-650322d1.css → PolarsCode-2b1f1f23.css} +4 -4
- flowfile/web/static/assets/{PolarsCode-bc3c9984.js → PolarsCode-f9d69217.js} +18 -9
- flowfile/web/static/assets/PopOver-b22f049e.js +939 -0
- flowfile/web/static/assets/PopOver-d96599db.css +33 -0
- flowfile/web/static/assets/{Read-e808b239.css → Read-36e7bd51.css} +12 -12
- flowfile/web/static/assets/{Read-64a3f259.js → Read-aec2e377.js} +14 -11
- flowfile/web/static/assets/{RecordCount-3d5039be.js → RecordCount-78ed6845.js} +6 -4
- flowfile/web/static/assets/{RecordId-597510e0.js → RecordId-2156e890.js} +8 -6
- flowfile/web/static/assets/{SQLQueryComponent-36cef432.css → SQLQueryComponent-1c2f26b4.css} +5 -5
- flowfile/web/static/assets/{SQLQueryComponent-df51adbe.js → SQLQueryComponent-48c72f5b.js} +3 -3
- flowfile/web/static/assets/{Sample-4be0a507.js → Sample-1352ca74.js} +6 -4
- flowfile/web/static/assets/SecretSelector-22b5ff89.js +113 -0
- flowfile/web/static/assets/SecretSelector-6329f743.css +43 -0
- flowfile/web/static/assets/{SecretManager-4839be57.js → SecretsView-17df66ee.js} +35 -36
- flowfile/web/static/assets/SecretsView-aa291340.css +38 -0
- flowfile/web/static/assets/{Select-9b72f201.js → Select-0aee4c54.js} +9 -7
- flowfile/web/static/assets/{SettingsSection-f0f75a42.js → SettingsSection-0784e157.js} +3 -3
- flowfile/web/static/assets/{SettingsSection-71e6b7e3.css → SettingsSection-07fbbc39.css} +4 -4
- flowfile/web/static/assets/{SettingsSection-5c696bee.css → SettingsSection-26fe48d4.css} +4 -4
- flowfile/web/static/assets/{SettingsSection-2e4d03c4.css → SettingsSection-8f980839.css} +4 -4
- flowfile/web/static/assets/{SettingsSection-e1e9c953.js → SettingsSection-cd341bb6.js} +3 -3
- flowfile/web/static/assets/{SettingsSection-7ded385d.js → SettingsSection-f2002a6d.js} +3 -3
- flowfile/web/static/assets/{SingleSelect-6c777aac.js → SingleSelect-460cc0ea.js} +2 -2
- flowfile/web/static/assets/{SingleSelect.vue_vue_type_script_setup_true_lang-33e3ff9b.js → SingleSelect.vue_vue_type_script_setup_true_lang-30741bb2.js} +1 -1
- flowfile/web/static/assets/{SliderInput-7cb93e62.js → SliderInput-5d926864.js} +7 -4
- flowfile/web/static/assets/SliderInput-f2e4f23c.css +4 -0
- flowfile/web/static/assets/{Sort-6cbde21a.js → Sort-3cdc971b.js} +9 -7
- flowfile/web/static/assets/{Unique-f9fb0809.css → Sort-8a871341.css} +10 -10
- flowfile/web/static/assets/{TextInput-d9a40c11.js → TextInput-a2d0bfbd.js} +2 -2
- flowfile/web/static/assets/{TextInput.vue_vue_type_script_setup_true_lang-5896c375.js → TextInput.vue_vue_type_script_setup_true_lang-abad1ca2.js} +5 -2
- flowfile/web/static/assets/{TextToRows-5d2c1190.css → TextToRows-12afb4f4.css} +10 -10
- flowfile/web/static/assets/{TextToRows-c4fcbf4d.js → TextToRows-918945f7.js} +11 -10
- flowfile/web/static/assets/{ToggleSwitch-4ef91d19.js → ToggleSwitch-f0ef5196.js} +2 -2
- flowfile/web/static/assets/{ToggleSwitch.vue_vue_type_script_setup_true_lang-38478c20.js → ToggleSwitch.vue_vue_type_script_setup_true_lang-5605c793.js} +1 -1
- flowfile/web/static/assets/{UnavailableFields-5edd5322.css → UnavailableFields-54d2f518.css} +6 -6
- flowfile/web/static/assets/{UnavailableFields-a03f512c.js → UnavailableFields-bdad6144.js} +4 -4
- flowfile/web/static/assets/{Union-af6c3d9b.css → Union-d6a8d7d5.css} +7 -7
- flowfile/web/static/assets/{Union-bfe9b996.js → Union-e8ab8c86.js} +8 -6
- flowfile/web/static/assets/{Unique-5d023a27.js → Unique-8cd4f976.js} +13 -10
- flowfile/web/static/assets/{Sort-3643d625.css → Unique-9fb2f567.css} +10 -10
- flowfile/web/static/assets/{Unpivot-1e422df3.css → Unpivot-710a2948.css} +7 -7
- flowfile/web/static/assets/{Unpivot-91cc5354.js → Unpivot-8da14095.js} +10 -8
- flowfile/web/static/assets/{UnpivotValidation-7ee2de44.js → UnpivotValidation-6f7d89ff.js} +3 -3
- flowfile/web/static/assets/UnpivotValidation-d5ca3b7b.css +13 -0
- flowfile/web/static/assets/{VueGraphicWalker-e51b9924.js → VueGraphicWalker-3fb312e1.js} +4 -4
- flowfile/web/static/assets/{VueGraphicWalker-ed5ab88b.css → VueGraphicWalker-430f0b86.css} +1 -1
- flowfile/web/static/assets/{api-cf1221f0.js → api-24483f0d.js} +1 -1
- flowfile/web/static/assets/{api-c1bad5ca.js → api-8b81fa73.js} +1 -1
- flowfile/web/static/assets/{dropDown-35135ba8.css → dropDown-3d8dc5fa.css} +40 -40
- flowfile/web/static/assets/{dropDown-614b998d.js → dropDown-ac0fda9d.js} +3 -3
- flowfile/web/static/assets/{fullEditor-f7971590.js → fullEditor-5497a84a.js} +11 -10
- flowfile/web/static/assets/{fullEditor-178376bb.css → fullEditor-a0be62b3.css} +74 -62
- flowfile/web/static/assets/{genericNodeSettings-924759c7.css → genericNodeSettings-3b2507ea.css} +10 -10
- flowfile/web/static/assets/{genericNodeSettings-4fe5f36b.js → genericNodeSettings-99014e1d.js} +5 -5
- flowfile/web/static/assets/index-07dda503.js +38 -0
- flowfile/web/static/assets/index-3ba44389.js +2696 -0
- flowfile/web/static/assets/{index-50508d4d.css → index-e6289dd0.css} +1945 -569
- flowfile/web/static/assets/{index-5429bbf8.js → index-fb6493ae.js} +41626 -40867
- flowfile/web/static/assets/node.types-2c15bb7e.js +82 -0
- flowfile/web/static/assets/nodeInput-0eb13f1a.js +2 -0
- flowfile/web/static/assets/{outputCsv-076b85ab.js → outputCsv-8f8ba42d.js} +3 -3
- flowfile/web/static/assets/outputCsv-b9a072af.css +2499 -0
- flowfile/web/static/assets/{outputExcel-0fd17dbe.js → outputExcel-393f4fef.js} +3 -3
- flowfile/web/static/assets/{outputExcel-b41305c0.css → outputExcel-f5d272b2.css} +26 -26
- flowfile/web/static/assets/{outputParquet-b61e0847.js → outputParquet-07c81f65.js} +4 -4
- flowfile/web/static/assets/outputParquet-54597c3c.css +4 -0
- flowfile/web/static/assets/{readCsv-a8bb8b61.js → readCsv-07f6d9ad.js} +3 -3
- flowfile/web/static/assets/{readCsv-c767cb37.css → readCsv-3bfac4c3.css} +15 -15
- flowfile/web/static/assets/{readExcel-806d2826.css → readExcel-3db6b763.css} +13 -13
- flowfile/web/static/assets/{readExcel-67b4aee0.js → readExcel-ed69bc8f.js} +5 -5
- flowfile/web/static/assets/{readParquet-48c81530.css → readParquet-c5244ad5.css} +4 -4
- flowfile/web/static/assets/{readParquet-92ce1dbc.js → readParquet-e3ed4528.js} +3 -3
- flowfile/web/static/assets/secrets.api-002e7d7e.js +65 -0
- flowfile/web/static/assets/{selectDynamic-92e25ee3.js → selectDynamic-80b92899.js} +5 -5
- flowfile/web/static/assets/{selectDynamic-aa913ff4.css → selectDynamic-f2fb394f.css} +21 -20
- flowfile/web/static/assets/{vue-codemirror.esm-41b0e0d7.js → vue-codemirror.esm-0965f39f.js} +31 -640
- flowfile/web/static/assets/{vue-content-loader.es-2c8e608f.js → vue-content-loader.es-c506ad97.js} +1 -1
- flowfile/web/static/index.html +2 -2
- {flowfile-0.5.1.dist-info → flowfile-0.5.3.dist-info}/METADATA +2 -3
- flowfile-0.5.3.dist-info/RECORD +402 -0
- flowfile_core/__init__.py +13 -6
- flowfile_core/auth/jwt.py +51 -16
- flowfile_core/auth/models.py +32 -7
- flowfile_core/auth/password.py +89 -0
- flowfile_core/auth/secrets.py +8 -6
- flowfile_core/configs/__init__.py +9 -7
- flowfile_core/configs/flow_logger.py +15 -14
- flowfile_core/configs/node_store/__init__.py +72 -4
- flowfile_core/configs/node_store/nodes.py +155 -172
- flowfile_core/configs/node_store/user_defined_node_registry.py +108 -27
- flowfile_core/configs/settings.py +28 -15
- flowfile_core/database/connection.py +7 -6
- flowfile_core/database/init_db.py +96 -2
- flowfile_core/database/models.py +3 -1
- flowfile_core/fileExplorer/__init__.py +17 -0
- flowfile_core/fileExplorer/funcs.py +123 -57
- flowfile_core/fileExplorer/utils.py +10 -11
- flowfile_core/flowfile/_extensions/real_time_interface.py +10 -8
- flowfile_core/flowfile/analytics/analytics_processor.py +26 -24
- flowfile_core/flowfile/analytics/graphic_walker.py +11 -12
- flowfile_core/flowfile/analytics/utils.py +1 -1
- flowfile_core/flowfile/code_generator/code_generator.py +358 -244
- flowfile_core/flowfile/connection_manager/_connection_manager.py +6 -5
- flowfile_core/flowfile/connection_manager/models.py +1 -1
- flowfile_core/flowfile/database_connection_manager/db_connections.py +60 -44
- flowfile_core/flowfile/database_connection_manager/models.py +1 -1
- flowfile_core/flowfile/extensions.py +17 -12
- flowfile_core/flowfile/flow_data_engine/cloud_storage_reader.py +34 -32
- flowfile_core/flowfile/flow_data_engine/create/funcs.py +115 -83
- flowfile_core/flowfile/flow_data_engine/flow_data_engine.py +481 -423
- flowfile_core/flowfile/flow_data_engine/flow_file_column/interface.py +2 -2
- flowfile_core/flowfile/flow_data_engine/flow_file_column/main.py +92 -52
- flowfile_core/flowfile/flow_data_engine/flow_file_column/polars_type.py +12 -11
- flowfile_core/flowfile/flow_data_engine/flow_file_column/type_registry.py +6 -6
- flowfile_core/flowfile/flow_data_engine/flow_file_column/utils.py +26 -30
- flowfile_core/flowfile/flow_data_engine/fuzzy_matching/prepare_for_fuzzy_match.py +31 -20
- flowfile_core/flowfile/flow_data_engine/join/__init__.py +1 -1
- flowfile_core/flowfile/flow_data_engine/join/utils.py +11 -9
- flowfile_core/flowfile/flow_data_engine/join/verify_integrity.py +14 -15
- flowfile_core/flowfile/flow_data_engine/pivot_table.py +5 -7
- flowfile_core/flowfile/flow_data_engine/polars_code_parser.py +95 -82
- flowfile_core/flowfile/flow_data_engine/read_excel_tables.py +66 -65
- flowfile_core/flowfile/flow_data_engine/sample_data.py +27 -21
- flowfile_core/flowfile/flow_data_engine/subprocess_operations/__init__.py +1 -1
- flowfile_core/flowfile/flow_data_engine/subprocess_operations/models.py +13 -11
- flowfile_core/flowfile/flow_data_engine/subprocess_operations/subprocess_operations.py +190 -127
- flowfile_core/flowfile/flow_data_engine/threaded_processes.py +8 -8
- flowfile_core/flowfile/flow_data_engine/utils.py +99 -67
- flowfile_core/flowfile/flow_graph.py +918 -571
- flowfile_core/flowfile/flow_graph_utils.py +31 -49
- flowfile_core/flowfile/flow_node/flow_node.py +330 -233
- flowfile_core/flowfile/flow_node/models.py +53 -41
- flowfile_core/flowfile/flow_node/schema_callback.py +14 -19
- flowfile_core/flowfile/graph_tree/graph_tree.py +41 -41
- flowfile_core/flowfile/handler.py +80 -30
- flowfile_core/flowfile/manage/compatibility_enhancements.py +209 -126
- flowfile_core/flowfile/manage/io_flowfile.py +54 -57
- flowfile_core/flowfile/node_designer/__init__.py +15 -13
- flowfile_core/flowfile/node_designer/_type_registry.py +34 -37
- flowfile_core/flowfile/node_designer/custom_node.py +162 -36
- flowfile_core/flowfile/node_designer/ui_components.py +135 -34
- flowfile_core/flowfile/schema_callbacks.py +71 -51
- flowfile_core/flowfile/setting_generator/__init__.py +0 -1
- flowfile_core/flowfile/setting_generator/setting_generator.py +6 -5
- flowfile_core/flowfile/setting_generator/settings.py +64 -53
- flowfile_core/flowfile/sources/external_sources/base_class.py +12 -10
- flowfile_core/flowfile/sources/external_sources/custom_external_sources/external_source.py +27 -17
- flowfile_core/flowfile/sources/external_sources/custom_external_sources/sample_users.py +9 -9
- flowfile_core/flowfile/sources/external_sources/factory.py +0 -1
- flowfile_core/flowfile/sources/external_sources/sql_source/models.py +45 -31
- flowfile_core/flowfile/sources/external_sources/sql_source/sql_source.py +198 -73
- flowfile_core/flowfile/sources/external_sources/sql_source/utils.py +250 -196
- flowfile_core/flowfile/util/calculate_layout.py +9 -13
- flowfile_core/flowfile/util/execution_orderer.py +25 -17
- flowfile_core/flowfile/util/node_skipper.py +4 -4
- flowfile_core/flowfile/utils.py +19 -21
- flowfile_core/main.py +26 -19
- flowfile_core/routes/auth.py +284 -11
- flowfile_core/routes/cloud_connections.py +25 -25
- flowfile_core/routes/logs.py +21 -29
- flowfile_core/routes/public.py +3 -3
- flowfile_core/routes/routes.py +70 -34
- flowfile_core/routes/secrets.py +25 -27
- flowfile_core/routes/user_defined_components.py +483 -4
- flowfile_core/run_lock.py +0 -1
- flowfile_core/schemas/__init__.py +4 -6
- flowfile_core/schemas/analysis_schemas/graphic_walker_schemas.py +55 -55
- flowfile_core/schemas/cloud_storage_schemas.py +59 -53
- flowfile_core/schemas/input_schema.py +231 -144
- flowfile_core/schemas/output_model.py +49 -34
- flowfile_core/schemas/schemas.py +116 -89
- flowfile_core/schemas/transform_schema.py +518 -263
- flowfile_core/schemas/yaml_types.py +21 -7
- flowfile_core/secret_manager/secret_manager.py +17 -13
- flowfile_core/types.py +29 -9
- flowfile_core/utils/arrow_reader.py +7 -6
- flowfile_core/utils/excel_file_manager.py +3 -3
- flowfile_core/utils/fileManager.py +7 -7
- flowfile_core/utils/fl_executor.py +8 -10
- flowfile_core/utils/utils.py +4 -4
- flowfile_core/utils/validate_setup.py +5 -4
- flowfile_frame/__init__.py +106 -51
- flowfile_frame/adapters.py +2 -9
- flowfile_frame/adding_expr.py +73 -32
- flowfile_frame/cloud_storage/frame_helpers.py +27 -23
- flowfile_frame/cloud_storage/secret_manager.py +12 -26
- flowfile_frame/config.py +2 -5
- flowfile_frame/expr.py +311 -218
- flowfile_frame/expr.pyi +160 -159
- flowfile_frame/expr_name.py +23 -23
- flowfile_frame/flow_frame.py +571 -476
- flowfile_frame/flow_frame.pyi +123 -104
- flowfile_frame/flow_frame_methods.py +227 -246
- flowfile_frame/group_frame.py +50 -20
- flowfile_frame/join.py +2 -2
- flowfile_frame/lazy.py +129 -87
- flowfile_frame/lazy_methods.py +83 -30
- flowfile_frame/list_name_space.py +55 -50
- flowfile_frame/selectors.py +148 -68
- flowfile_frame/series.py +9 -7
- flowfile_frame/utils.py +19 -21
- flowfile_worker/__init__.py +12 -7
- flowfile_worker/configs.py +11 -19
- flowfile_worker/create/__init__.py +14 -9
- flowfile_worker/create/funcs.py +114 -77
- flowfile_worker/create/models.py +46 -43
- flowfile_worker/create/pl_types.py +14 -15
- flowfile_worker/create/read_excel_tables.py +34 -41
- flowfile_worker/create/utils.py +22 -19
- flowfile_worker/external_sources/s3_source/main.py +18 -51
- flowfile_worker/external_sources/s3_source/models.py +34 -27
- flowfile_worker/external_sources/sql_source/main.py +8 -5
- flowfile_worker/external_sources/sql_source/models.py +13 -9
- flowfile_worker/flow_logger.py +10 -8
- flowfile_worker/funcs.py +214 -155
- flowfile_worker/main.py +11 -17
- flowfile_worker/models.py +35 -28
- flowfile_worker/process_manager.py +2 -3
- flowfile_worker/routes.py +121 -90
- flowfile_worker/secrets.py +9 -6
- flowfile_worker/spawner.py +80 -49
- flowfile_worker/utils.py +3 -2
- shared/__init__.py +2 -7
- shared/storage_config.py +25 -13
- test_utils/postgres/commands.py +3 -2
- test_utils/postgres/fixtures.py +9 -9
- test_utils/s3/commands.py +1 -1
- test_utils/s3/data_generator.py +3 -4
- test_utils/s3/demo_data_generator.py +4 -7
- test_utils/s3/fixtures.py +7 -5
- tools/migrate/__init__.py +1 -1
- tools/migrate/__main__.py +16 -29
- tools/migrate/legacy_schemas.py +251 -190
- tools/migrate/migrate.py +193 -181
- tools/migrate/tests/conftest.py +1 -3
- tools/migrate/tests/test_migrate.py +36 -41
- tools/migrate/tests/test_migration_e2e.py +28 -29
- tools/migrate/tests/test_node_migrations.py +50 -20
- flowfile/web/static/assets/CloudConnectionManager-2dfdce2f.css +0 -86
- flowfile/web/static/assets/CustomNode-74a37f74.css +0 -32
- flowfile/web/static/assets/DatabaseManager-30fa27e5.css +0 -64
- flowfile/web/static/assets/Filter-9b6d08db.js +0 -164
- flowfile/web/static/assets/Filter-f62091b3.css +0 -20
- flowfile/web/static/assets/ManualInput-3246a08d.css +0 -96
- flowfile/web/static/assets/PivotValidation-891ddfb0.css +0 -13
- flowfile/web/static/assets/PivotValidation-c46cd420.css +0 -13
- flowfile/web/static/assets/SliderInput-b8fb6a8c.css +0 -4
- flowfile/web/static/assets/UnpivotValidation-0d240eeb.css +0 -13
- flowfile/web/static/assets/nodeInput-5d0d6b79.js +0 -41
- flowfile/web/static/assets/outputCsv-9cc59e0b.css +0 -2499
- flowfile/web/static/assets/outputParquet-cf8cf3f2.css +0 -4
- flowfile/web/static/assets/secretApi-68435402.js +0 -46
- flowfile/web/static/assets/vue-codemirror-bccfde04.css +0 -32
- flowfile-0.5.1.dist-info/RECORD +0 -388
- {flowfile-0.5.1.dist-info → flowfile-0.5.3.dist-info}/WHEEL +0 -0
- {flowfile-0.5.1.dist-info → flowfile-0.5.3.dist-info}/entry_points.txt +0 -0
- {flowfile-0.5.1.dist-info → flowfile-0.5.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,2696 @@
|
|
|
1
|
+
import { ak as flowfileCorebaseURL, j as axios } from "./index-fb6493ae.js";
|
|
2
|
+
import { e as Parser, N as NodeSet, f as NodeType, D as DefaultBufferLength, g as NodeProp, h as Tree, I as IterMode, s as styleTags, t as tags, L as LanguageSupport, j as syntaxTree, l as ifNotIn, m as LRLanguage, n as indentNodeProp, o as delimitedIndent, p as foldNodeProp, q as foldInside, r as completeFromList, u as NodeWeakMap, v as snippetCompletion, H as HighlightStyle, w as syntaxHighlighting, E as EditorView } from "./vue-codemirror.esm-0965f39f.js";
|
|
3
|
+
const __vite_glob_0_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAYAAACoYAD2AAACO0lEQVR4nN2Yz0vbYBjHv29NbZUy0B43QUG9zNPEHUT05NCTiu6o0NbDLk5a/RMERaonkSrO8zw4alFQtBsMBG96kJ5EUTcRh78QRGvsu4O8MSk1fdMmaeLnlL7p++ST53kfkjeADSCKX5GI4Ci+XQCl3uwzKXUkyYD4ZWjXKDnpUuxA+BbeBEij9hD0SgwMl+kplY5McoLmHEVMNYi06E/eNs4iEQf/zjEyonDRR9IAxMCQ5OYopIgawlz4gR1bVhKECJgPvwOsLAlAoIgAFpdMgXgAQFD704M/ZI4NAOf85IvnLJ1Jhi0kVcvNUCtFvvAsKVtk0haSXOU2s8sz8XoyqWfjsKpMJ3bQUVmNt6WerHNMzSQT/ByPYXDrJyq/z+Li/i7rPK5M6gET7NqIYvloXxovd7mzzjW1cdrXFrHx91BzXNPKnS6Y1HDjhjYOy1TnelQp6Aum7QDVMSyTTLAnHsPK8fMaTPqCIESLokGScsGlwz1pPBdBgLPciR4fd8CaN0+72871qDKD/pCmEsvhkmQX5qVtdRHxE2WT5CoI6Ng4/to6zDR9wlRiWymosUkyoduaHG1oBgAEt35JY7muwXR0eeJ4BCfKXW78Pn36iDH+sQXBuno9QgPglIy1dqme97pLAAA752eGvNZxSbZXVHEF+/r+Q14yL2GL90lbSKqW28hdohYsnUkCeglYXPKx2NkHyCQpJT8Kp5MJmkTv4A0gk3zsD3WnQMYKJyWHXouBYVehLV4f/wHit6c8llKODwAAAABJRU5ErkJggg==";
|
|
4
|
+
const __vite_glob_0_1 = "/assets/airbyte-292aa232.png";
|
|
5
|
+
const __vite_glob_0_2 = "/assets/cloud_storage_reader-aa1415d6.png";
|
|
6
|
+
const __vite_glob_0_3 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAeFBMVEVHcEz////////////////////L8/D////////W6un////1+/rk9PPD6OWe1dJ108xqv7o90sc9ubATx7oTxLcTwbQ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WqpwX8/HWd/xZzPR8YAWP++V18n/6t07fRILsFn8dfz1+UPXny5MmTJ0+e/Gn8D1jTqp1bBNAQAAAAAElFTkSuQmCC";
|
|
7
|
+
const __vite_glob_0_4 = "/assets/cross_join-d30c0290.png";
|
|
8
|
+
const __vite_glob_0_5 = "/assets/database_reader-ce1e55f3.svg";
|
|
9
|
+
const __vite_glob_0_6 = "/assets/database_writer-b4ad0753.svg";
|
|
10
|
+
const __vite_glob_0_7 = "/assets/explore_data-8a0a2861.png";
|
|
11
|
+
const __vite_glob_0_8 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABZCAYAAADIBoEnAAAKM0lEQVR4nO2cf2xV1R3AP+fe+15HWoRRYIGH7dRYVnEDlAZKHNgwW5xiRWsn29BuAWEII2YmjEUtnZgt/GonJhVDpgkSt9csaCRWCKG04iKhdP4hzgQZWJpO0zqElkLLvffsj3sP7/Gk0L629Dy9n+SE19J3e+75vHPO95ye74XUQQCG/3oy8GfgQ6BTCGGPGjXKnjp1aufq1as/fPfddze0tbX9AEBKaUgpxfBU+ZtLfIP+HvgSkFcqlmXJmTNnym3btn3Z1NS0FkAIkXiNgAGgeoYJ/JVY49uAG/e1FEJI/3t2RkaGfPnll+UHH3zwKmAGPWXwUMNUBV7DXyRBRGIxTVMCbnp6es+uXbtkfX19BUB5ebmRePGA/qEacCrQzRV6RW9FSZkzZ47d0NDQXVNT8yPw5pTrewv9Q+vKERv3lwBhvMbu07DjOA5CCHHw4EF56tSp8Pjx45cA1NTUaD1s6S7EAULA3XgyzP68WQiB67rG4cOHZTgcvvvOO+8MlZaWOkNQz0FDZyHqkzwOyCKJKElFVydOnBDd3d1ZZWVl4wB0ntx1FqIYgTdcJc2FCxcA0kaOHDliUGo0hKSCEDlYFwqFQoN2raEiFYR8qwiEaEYgRDMCIZoRCNGMQIhmBEI0IxCiGYEQzQiEaEYgRDMCIZoRCNGMQIhmBEI0IxCiGYEQzQiEaEYgRDMCIZoRCNGMQIhmBE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pKoMSF0h4EkxgE0dHR3k5+cD3uG9VJUBqS0EYtv2gPe381QJb3sj1YVAXDibcMAuJUm1KOsbTyBEMwIhmhEI0YxAiGYkHWVJKXFdVwDGvn37DFJk824IUW0woFAvaSFpaWlkZGTYgLt9+/aUjv0HCdUGFwdykWSFiJaWFs6fP/9dIDczMzPc1dX1rZYipTRM07zQ2dk5VqVBJHOdZIWYzz77LFLKB4Cftre3p/6KbHBwpZQh/3VSJ/mTHrJs2wZv3AyrvJGAgTMYWyeBjcsZnkl9sCoQcDnBOkQzVE54gCYYwHeGuxIBMdQRmYBhJhwOA/QYwAliTxcIuM74SwaZnZ0tQ6HQSQMvX1wQ9JTrjn+wj3A47N5xxx2iu7v7LQPvdLk6dJayhwNSEdM0kVI6Dz74oDlhwoQvTp48uVX938PEhi2bfj7kJSj9K/4T5VzAvv322+XevXvlnj17Si6JipNycrgr+20poVBIFhYWyt27d3/W0NBQAhCNRk21ylbRVgTv2H8xcKsQIpyWloYQwnX8Z1MEJIfjOKbjOMbIkSO55ZZbLsyfP/9YcXHx25mZmdU5OTkt6oly/wc3vQgr7Up0TAAAAABJRU5ErkJggg==";
|
|
12
|
+
const __vite_glob_0_9 = "/assets/filter-d7708bda.png";
|
|
13
|
+
const __vite_glob_0_10 = "/assets/formula-eeeb1611.png";
|
|
14
|
+
const __vite_glob_0_11 = "/assets/fuzzy_match-40c161b2.png";
|
|
15
|
+
const __vite_glob_0_12 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAIAklEQVR4nO2dS4wcRxmAv7+qZ8a7tuN1jMkD24hIIQjERjxixYTISRQUcMgJFg4cOCCCECAhccjRuzd8QByMAgHlBOJgRxyQYsMlxEJcbKQolgyCQxCK7UgkaxOvd3dmerp+Dj0zO+t9Tbdnq8tMfavRSrvd1T31db3+qaoRyqIIggJw5uhXcXybdnYYxxRSOtXtxlGzhnfmL3H1+heZu3KZGSynyaq+sR7lsq4n49SjdzNZ+wViZ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m6ZSTMjsufwixl0hdflGbJHVKIbUgZUrwEqeDUmxDO1tH5K0L+D0Mg2j5NNzIzmOhlGcXkZafwWG3XKlT9EnXDk1Yzl2/gZWXmQyMbh1FmmMK04zJhODlRc5dv4Gp2aKrGIFysyOUoTZ48In/tiglrzKXbUnudZ2CASzx5FvVPMFvHvrhsXOn2ilz3LpmRazc1q0hJSdcp6vBDv16N3srP0czNdwCql62f05KESgJvl3IyqnmV/6Lt+8ME/Bb/jsJ1f6RgYv+OoTX0H1edrZYRxTd8SsxFGggNH/UrfnMfIrjp17pfv3UjIA/gfTxH0PcLL3jAAAAABJRU5ErkJggg==";
|
|
16
|
+
const __vite_glob_0_13 = "/assets/graph_solver-8b7888b8.png";
|
|
17
|
+
const __vite_glob_0_14 = "/assets/group_by-80561fc3.png";
|
|
18
|
+
const __vite_glob_0_15 = "/assets/input_data-ab2eb678.png";
|
|
19
|
+
const __vite_glob_0_16 = "/assets/join-349043ae.png";
|
|
20
|
+
const __vite_glob_0_17 = "/assets/manual_input-ae98f31d.png";
|
|
21
|
+
const __vite_glob_0_18 = "/assets/old_join-5d0eb604.png";
|
|
22
|
+
const __vite_glob_0_19 = "/assets/output-06ec0371.png";
|
|
23
|
+
const __vite_glob_0_20 = "/assets/pivot-9660df51.png";
|
|
24
|
+
const __vite_glob_0_21 = "/assets/polars_code-05ce5dc6.png";
|
|
25
|
+
const __vite_glob_0_22 = "/assets/record_count-dab44eb5.png";
|
|
26
|
+
const __vite_glob_0_23 = "/assets/record_id-0b15856b.png";
|
|
27
|
+
const __vite_glob_0_24 = "/assets/sample-693a88b5.png";
|
|
28
|
+
const __vite_glob_0_25 = "/assets/select-b0d0437a.png";
|
|
29
|
+
const __vite_glob_0_26 = "/assets/sort-2aa579f0.png";
|
|
30
|
+
const __vite_glob_0_27 = "/assets/summarize-2a099231.png";
|
|
31
|
+
const __vite_glob_0_28 = "/assets/text_to_rows-859b29ea.png";
|
|
32
|
+
const __vite_glob_0_29 = "/assets/union-2d8609f4.png";
|
|
33
|
+
const __vite_glob_0_30 = "/assets/unique-1958b98a.png";
|
|
34
|
+
const __vite_glob_0_31 = "/assets/unpivot-d3cb4b5b.png";
|
|
35
|
+
const __vite_glob_0_32 = "/assets/user-defined-icon-0ae16c90.png";
|
|
36
|
+
const __vite_glob_0_33 = "/assets/view-7a0f0be1.png";
|
|
37
|
+
const BUILTIN_ICONS = /* @__PURE__ */ new Set([
|
|
38
|
+
"Output2.png",
|
|
39
|
+
"airbyte.png",
|
|
40
|
+
"cloud_storage_reader.png",
|
|
41
|
+
"cloud_storage_writer.png",
|
|
42
|
+
"cross_join.png",
|
|
43
|
+
"database_reader.svg",
|
|
44
|
+
"database_writer.svg",
|
|
45
|
+
"explore_data.png",
|
|
46
|
+
"external_source.png",
|
|
47
|
+
"filter.png",
|
|
48
|
+
"formula.png",
|
|
49
|
+
"fuzzy_match.png",
|
|
50
|
+
"google_sheet.png",
|
|
51
|
+
"graph_solver.png",
|
|
52
|
+
"group_by.png",
|
|
53
|
+
"input_data.png",
|
|
54
|
+
"join.png",
|
|
55
|
+
"manual_input.png",
|
|
56
|
+
"old_join.png",
|
|
57
|
+
"output.png",
|
|
58
|
+
"pivot.png",
|
|
59
|
+
"polars_code.png",
|
|
60
|
+
"record_count.png",
|
|
61
|
+
"record_id.png",
|
|
62
|
+
"sample.png",
|
|
63
|
+
"select.png",
|
|
64
|
+
"sort.png",
|
|
65
|
+
"summarize.png",
|
|
66
|
+
"text_to_rows.png",
|
|
67
|
+
"union.png",
|
|
68
|
+
"unique.png",
|
|
69
|
+
"unpivot.png",
|
|
70
|
+
"user-defined-icon.png",
|
|
71
|
+
"view.png"
|
|
72
|
+
]);
|
|
73
|
+
const DEFAULT_ICON = "user-defined-icon.png";
|
|
74
|
+
const isBuiltinIcon = (name) => {
|
|
75
|
+
return BUILTIN_ICONS.has(name);
|
|
76
|
+
};
|
|
77
|
+
const getImageUrl = (name) => {
|
|
78
|
+
if (!name) {
|
|
79
|
+
return new URL((/* @__PURE__ */ Object.assign({ "./assets/icons/Output2.png": __vite_glob_0_0, "./assets/icons/airbyte.png": __vite_glob_0_1, "./assets/icons/cloud_storage_reader.png": __vite_glob_0_2, "./assets/icons/cloud_storage_writer.png": __vite_glob_0_3, "./assets/icons/cross_join.png": __vite_glob_0_4, "./assets/icons/database_reader.svg": __vite_glob_0_5, "./assets/icons/database_writer.svg": __vite_glob_0_6, "./assets/icons/explore_data.png": __vite_glob_0_7, "./assets/icons/external_source.png": __vite_glob_0_8, "./assets/icons/filter.png": __vite_glob_0_9, "./assets/icons/formula.png": __vite_glob_0_10, "./assets/icons/fuzzy_match.png": __vite_glob_0_11, "./assets/icons/google_sheet.png": __vite_glob_0_12, "./assets/icons/graph_solver.png": __vite_glob_0_13, "./assets/icons/group_by.png": __vite_glob_0_14, "./assets/icons/input_data.png": __vite_glob_0_15, "./assets/icons/join.png": __vite_glob_0_16, "./assets/icons/manual_input.png": __vite_glob_0_17, "./assets/icons/old_join.png": __vite_glob_0_18, "./assets/icons/output.png": __vite_glob_0_19, "./assets/icons/pivot.png": __vite_glob_0_20, "./assets/icons/polars_code.png": __vite_glob_0_21, "./assets/icons/record_count.png": __vite_glob_0_22, "./assets/icons/record_id.png": __vite_glob_0_23, "./assets/icons/sample.png": __vite_glob_0_24, "./assets/icons/select.png": __vite_glob_0_25, "./assets/icons/sort.png": __vite_glob_0_26, "./assets/icons/summarize.png": __vite_glob_0_27, "./assets/icons/text_to_rows.png": __vite_glob_0_28, "./assets/icons/union.png": __vite_glob_0_29, "./assets/icons/unique.png": __vite_glob_0_30, "./assets/icons/unpivot.png": __vite_glob_0_31, "./assets/icons/user-defined-icon.png": __vite_glob_0_32, "./assets/icons/view.png": __vite_glob_0_33 }))[`./assets/icons/${DEFAULT_ICON}`], self.location).href;
|
|
80
|
+
}
|
|
81
|
+
if (isBuiltinIcon(name)) {
|
|
82
|
+
return new URL((/* @__PURE__ */ Object.assign({ "./assets/icons/Output2.png": __vite_glob_0_0, "./assets/icons/airbyte.png": __vite_glob_0_1, "./assets/icons/cloud_storage_reader.png": __vite_glob_0_2, "./assets/icons/cloud_storage_writer.png": __vite_glob_0_3, "./assets/icons/cross_join.png": __vite_glob_0_4, "./assets/icons/database_reader.svg": __vite_glob_0_5, "./assets/icons/database_writer.svg": __vite_glob_0_6, "./assets/icons/explore_data.png": __vite_glob_0_7, "./assets/icons/external_source.png": __vite_glob_0_8, "./assets/icons/filter.png": __vite_glob_0_9, "./assets/icons/formula.png": __vite_glob_0_10, "./assets/icons/fuzzy_match.png": __vite_glob_0_11, "./assets/icons/google_sheet.png": __vite_glob_0_12, "./assets/icons/graph_solver.png": __vite_glob_0_13, "./assets/icons/group_by.png": __vite_glob_0_14, "./assets/icons/input_data.png": __vite_glob_0_15, "./assets/icons/join.png": __vite_glob_0_16, "./assets/icons/manual_input.png": __vite_glob_0_17, "./assets/icons/old_join.png": __vite_glob_0_18, "./assets/icons/output.png": __vite_glob_0_19, "./assets/icons/pivot.png": __vite_glob_0_20, "./assets/icons/polars_code.png": __vite_glob_0_21, "./assets/icons/record_count.png": __vite_glob_0_22, "./assets/icons/record_id.png": __vite_glob_0_23, "./assets/icons/sample.png": __vite_glob_0_24, "./assets/icons/select.png": __vite_glob_0_25, "./assets/icons/sort.png": __vite_glob_0_26, "./assets/icons/summarize.png": __vite_glob_0_27, "./assets/icons/text_to_rows.png": __vite_glob_0_28, "./assets/icons/union.png": __vite_glob_0_29, "./assets/icons/unique.png": __vite_glob_0_30, "./assets/icons/unpivot.png": __vite_glob_0_31, "./assets/icons/user-defined-icon.png": __vite_glob_0_32, "./assets/icons/view.png": __vite_glob_0_33 }))[`./assets/icons/${name}`], self.location).href;
|
|
83
|
+
}
|
|
84
|
+
return `${flowfileCorebaseURL}user_defined_components/icon/${name}`;
|
|
85
|
+
};
|
|
86
|
+
const getDefaultIconUrl = () => {
|
|
87
|
+
return new URL((/* @__PURE__ */ Object.assign({ "./assets/icons/Output2.png": __vite_glob_0_0, "./assets/icons/airbyte.png": __vite_glob_0_1, "./assets/icons/cloud_storage_reader.png": __vite_glob_0_2, "./assets/icons/cloud_storage_writer.png": __vite_glob_0_3, "./assets/icons/cross_join.png": __vite_glob_0_4, "./assets/icons/database_reader.svg": __vite_glob_0_5, "./assets/icons/database_writer.svg": __vite_glob_0_6, "./assets/icons/explore_data.png": __vite_glob_0_7, "./assets/icons/external_source.png": __vite_glob_0_8, "./assets/icons/filter.png": __vite_glob_0_9, "./assets/icons/formula.png": __vite_glob_0_10, "./assets/icons/fuzzy_match.png": __vite_glob_0_11, "./assets/icons/google_sheet.png": __vite_glob_0_12, "./assets/icons/graph_solver.png": __vite_glob_0_13, "./assets/icons/group_by.png": __vite_glob_0_14, "./assets/icons/input_data.png": __vite_glob_0_15, "./assets/icons/join.png": __vite_glob_0_16, "./assets/icons/manual_input.png": __vite_glob_0_17, "./assets/icons/old_join.png": __vite_glob_0_18, "./assets/icons/output.png": __vite_glob_0_19, "./assets/icons/pivot.png": __vite_glob_0_20, "./assets/icons/polars_code.png": __vite_glob_0_21, "./assets/icons/record_count.png": __vite_glob_0_22, "./assets/icons/record_id.png": __vite_glob_0_23, "./assets/icons/sample.png": __vite_glob_0_24, "./assets/icons/select.png": __vite_glob_0_25, "./assets/icons/sort.png": __vite_glob_0_26, "./assets/icons/summarize.png": __vite_glob_0_27, "./assets/icons/text_to_rows.png": __vite_glob_0_28, "./assets/icons/union.png": __vite_glob_0_29, "./assets/icons/unique.png": __vite_glob_0_30, "./assets/icons/unpivot.png": __vite_glob_0_31, "./assets/icons/user-defined-icon.png": __vite_glob_0_32, "./assets/icons/view.png": __vite_glob_0_33 }))[`./assets/icons/${DEFAULT_ICON}`], self.location).href;
|
|
88
|
+
};
|
|
89
|
+
const getCustomIconUrl = (name) => {
|
|
90
|
+
return `${flowfileCorebaseURL}user_defined_components/icon/${name}`;
|
|
91
|
+
};
|
|
92
|
+
const fetchNodes = async () => {
|
|
93
|
+
const response = await axios.get("/node_list");
|
|
94
|
+
const listNodes = response.data;
|
|
95
|
+
return listNodes;
|
|
96
|
+
};
|
|
97
|
+
class Stack {
|
|
98
|
+
/**
|
|
99
|
+
@internal
|
|
100
|
+
*/
|
|
101
|
+
constructor(p, stack, state, reducePos, pos, score, buffer, bufferBase, curContext, lookAhead = 0, parent) {
|
|
102
|
+
this.p = p;
|
|
103
|
+
this.stack = stack;
|
|
104
|
+
this.state = state;
|
|
105
|
+
this.reducePos = reducePos;
|
|
106
|
+
this.pos = pos;
|
|
107
|
+
this.score = score;
|
|
108
|
+
this.buffer = buffer;
|
|
109
|
+
this.bufferBase = bufferBase;
|
|
110
|
+
this.curContext = curContext;
|
|
111
|
+
this.lookAhead = lookAhead;
|
|
112
|
+
this.parent = parent;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
@internal
|
|
116
|
+
*/
|
|
117
|
+
toString() {
|
|
118
|
+
return `[${this.stack.filter((_, i) => i % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
|
|
119
|
+
}
|
|
120
|
+
// Start an empty stack
|
|
121
|
+
/**
|
|
122
|
+
@internal
|
|
123
|
+
*/
|
|
124
|
+
static start(p, state, pos = 0) {
|
|
125
|
+
let cx = p.parser.context;
|
|
126
|
+
return new Stack(p, [], state, pos, pos, 0, [], 0, cx ? new StackContext(cx, cx.start) : null, 0, null);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
The stack's current [context](#lr.ContextTracker) value, if
|
|
130
|
+
any. Its type will depend on the context tracker's type
|
|
131
|
+
parameter, or it will be `null` if there is no context
|
|
132
|
+
tracker.
|
|
133
|
+
*/
|
|
134
|
+
get context() {
|
|
135
|
+
return this.curContext ? this.curContext.context : null;
|
|
136
|
+
}
|
|
137
|
+
// Push a state onto the stack, tracking its start position as well
|
|
138
|
+
// as the buffer base at that point.
|
|
139
|
+
/**
|
|
140
|
+
@internal
|
|
141
|
+
*/
|
|
142
|
+
pushState(state, start) {
|
|
143
|
+
this.stack.push(this.state, start, this.bufferBase + this.buffer.length);
|
|
144
|
+
this.state = state;
|
|
145
|
+
}
|
|
146
|
+
// Apply a reduce action
|
|
147
|
+
/**
|
|
148
|
+
@internal
|
|
149
|
+
*/
|
|
150
|
+
reduce(action) {
|
|
151
|
+
var _a;
|
|
152
|
+
let depth = action >> 19, type = action & 65535;
|
|
153
|
+
let { parser: parser2 } = this.p;
|
|
154
|
+
let lookaheadRecord = this.reducePos < this.pos - 25;
|
|
155
|
+
if (lookaheadRecord)
|
|
156
|
+
this.setLookAhead(this.pos);
|
|
157
|
+
let dPrec = parser2.dynamicPrecedence(type);
|
|
158
|
+
if (dPrec)
|
|
159
|
+
this.score += dPrec;
|
|
160
|
+
if (depth == 0) {
|
|
161
|
+
this.pushState(parser2.getGoto(this.state, type, true), this.reducePos);
|
|
162
|
+
if (type < parser2.minRepeatTerm)
|
|
163
|
+
this.storeNode(type, this.reducePos, this.reducePos, lookaheadRecord ? 8 : 4, true);
|
|
164
|
+
this.reduceContext(type, this.reducePos);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
let base = this.stack.length - (depth - 1) * 3 - (action & 262144 ? 6 : 0);
|
|
168
|
+
let start = base ? this.stack[base - 2] : this.p.ranges[0].from, size = this.reducePos - start;
|
|
169
|
+
if (size >= 2e3 && !((_a = this.p.parser.nodeSet.types[type]) === null || _a === void 0 ? void 0 : _a.isAnonymous)) {
|
|
170
|
+
if (start == this.p.lastBigReductionStart) {
|
|
171
|
+
this.p.bigReductionCount++;
|
|
172
|
+
this.p.lastBigReductionSize = size;
|
|
173
|
+
} else if (this.p.lastBigReductionSize < size) {
|
|
174
|
+
this.p.bigReductionCount = 1;
|
|
175
|
+
this.p.lastBigReductionStart = start;
|
|
176
|
+
this.p.lastBigReductionSize = size;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
let bufferBase = base ? this.stack[base - 1] : 0, count = this.bufferBase + this.buffer.length - bufferBase;
|
|
180
|
+
if (type < parser2.minRepeatTerm || action & 131072) {
|
|
181
|
+
let pos = parser2.stateFlag(
|
|
182
|
+
this.state,
|
|
183
|
+
1
|
|
184
|
+
/* StateFlag.Skipped */
|
|
185
|
+
) ? this.pos : this.reducePos;
|
|
186
|
+
this.storeNode(type, start, pos, count + 4, true);
|
|
187
|
+
}
|
|
188
|
+
if (action & 262144) {
|
|
189
|
+
this.state = this.stack[base];
|
|
190
|
+
} else {
|
|
191
|
+
let baseStateID = this.stack[base - 3];
|
|
192
|
+
this.state = parser2.getGoto(baseStateID, type, true);
|
|
193
|
+
}
|
|
194
|
+
while (this.stack.length > base)
|
|
195
|
+
this.stack.pop();
|
|
196
|
+
this.reduceContext(type, start);
|
|
197
|
+
}
|
|
198
|
+
// Shift a value into the buffer
|
|
199
|
+
/**
|
|
200
|
+
@internal
|
|
201
|
+
*/
|
|
202
|
+
storeNode(term, start, end, size = 4, mustSink = false) {
|
|
203
|
+
if (term == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
|
|
204
|
+
let cur = this, top = this.buffer.length;
|
|
205
|
+
if (top == 0 && cur.parent) {
|
|
206
|
+
top = cur.bufferBase - cur.parent.bufferBase;
|
|
207
|
+
cur = cur.parent;
|
|
208
|
+
}
|
|
209
|
+
if (top > 0 && cur.buffer[top - 4] == 0 && cur.buffer[top - 1] > -1) {
|
|
210
|
+
if (start == end)
|
|
211
|
+
return;
|
|
212
|
+
if (cur.buffer[top - 2] >= start) {
|
|
213
|
+
cur.buffer[top - 2] = end;
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
if (!mustSink || this.pos == end) {
|
|
219
|
+
this.buffer.push(term, start, end, size);
|
|
220
|
+
} else {
|
|
221
|
+
let index = this.buffer.length;
|
|
222
|
+
if (index > 0 && this.buffer[index - 4] != 0) {
|
|
223
|
+
let mustMove = false;
|
|
224
|
+
for (let scan = index; scan > 0 && this.buffer[scan - 2] > end; scan -= 4) {
|
|
225
|
+
if (this.buffer[scan - 1] >= 0) {
|
|
226
|
+
mustMove = true;
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
if (mustMove)
|
|
231
|
+
while (index > 0 && this.buffer[index - 2] > end) {
|
|
232
|
+
this.buffer[index] = this.buffer[index - 4];
|
|
233
|
+
this.buffer[index + 1] = this.buffer[index - 3];
|
|
234
|
+
this.buffer[index + 2] = this.buffer[index - 2];
|
|
235
|
+
this.buffer[index + 3] = this.buffer[index - 1];
|
|
236
|
+
index -= 4;
|
|
237
|
+
if (size > 4)
|
|
238
|
+
size -= 4;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
this.buffer[index] = term;
|
|
242
|
+
this.buffer[index + 1] = start;
|
|
243
|
+
this.buffer[index + 2] = end;
|
|
244
|
+
this.buffer[index + 3] = size;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
// Apply a shift action
|
|
248
|
+
/**
|
|
249
|
+
@internal
|
|
250
|
+
*/
|
|
251
|
+
shift(action, type, start, end) {
|
|
252
|
+
if (action & 131072) {
|
|
253
|
+
this.pushState(action & 65535, this.pos);
|
|
254
|
+
} else if ((action & 262144) == 0) {
|
|
255
|
+
let nextState = action, { parser: parser2 } = this.p;
|
|
256
|
+
if (end > this.pos || type <= parser2.maxNode) {
|
|
257
|
+
this.pos = end;
|
|
258
|
+
if (!parser2.stateFlag(
|
|
259
|
+
nextState,
|
|
260
|
+
1
|
|
261
|
+
/* StateFlag.Skipped */
|
|
262
|
+
))
|
|
263
|
+
this.reducePos = end;
|
|
264
|
+
}
|
|
265
|
+
this.pushState(nextState, start);
|
|
266
|
+
this.shiftContext(type, start);
|
|
267
|
+
if (type <= parser2.maxNode)
|
|
268
|
+
this.buffer.push(type, start, end, 4);
|
|
269
|
+
} else {
|
|
270
|
+
this.pos = end;
|
|
271
|
+
this.shiftContext(type, start);
|
|
272
|
+
if (type <= this.p.parser.maxNode)
|
|
273
|
+
this.buffer.push(type, start, end, 4);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
// Apply an action
|
|
277
|
+
/**
|
|
278
|
+
@internal
|
|
279
|
+
*/
|
|
280
|
+
apply(action, next, nextStart, nextEnd) {
|
|
281
|
+
if (action & 65536)
|
|
282
|
+
this.reduce(action);
|
|
283
|
+
else
|
|
284
|
+
this.shift(action, next, nextStart, nextEnd);
|
|
285
|
+
}
|
|
286
|
+
// Add a prebuilt (reused) node into the buffer.
|
|
287
|
+
/**
|
|
288
|
+
@internal
|
|
289
|
+
*/
|
|
290
|
+
useNode(value, next) {
|
|
291
|
+
let index = this.p.reused.length - 1;
|
|
292
|
+
if (index < 0 || this.p.reused[index] != value) {
|
|
293
|
+
this.p.reused.push(value);
|
|
294
|
+
index++;
|
|
295
|
+
}
|
|
296
|
+
let start = this.pos;
|
|
297
|
+
this.reducePos = this.pos = start + value.length;
|
|
298
|
+
this.pushState(next, start);
|
|
299
|
+
this.buffer.push(
|
|
300
|
+
index,
|
|
301
|
+
start,
|
|
302
|
+
this.reducePos,
|
|
303
|
+
-1
|
|
304
|
+
/* size == -1 means this is a reused value */
|
|
305
|
+
);
|
|
306
|
+
if (this.curContext)
|
|
307
|
+
this.updateContext(this.curContext.tracker.reuse(this.curContext.context, value, this, this.p.stream.reset(this.pos - value.length)));
|
|
308
|
+
}
|
|
309
|
+
// Split the stack. Due to the buffer sharing and the fact
|
|
310
|
+
// that `this.stack` tends to stay quite shallow, this isn't very
|
|
311
|
+
// expensive.
|
|
312
|
+
/**
|
|
313
|
+
@internal
|
|
314
|
+
*/
|
|
315
|
+
split() {
|
|
316
|
+
let parent = this;
|
|
317
|
+
let off = parent.buffer.length;
|
|
318
|
+
while (off > 0 && parent.buffer[off - 2] > parent.reducePos)
|
|
319
|
+
off -= 4;
|
|
320
|
+
let buffer = parent.buffer.slice(off), base = parent.bufferBase + off;
|
|
321
|
+
while (parent && base == parent.bufferBase)
|
|
322
|
+
parent = parent.parent;
|
|
323
|
+
return new Stack(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, buffer, base, this.curContext, this.lookAhead, parent);
|
|
324
|
+
}
|
|
325
|
+
// Try to recover from an error by 'deleting' (ignoring) one token.
|
|
326
|
+
/**
|
|
327
|
+
@internal
|
|
328
|
+
*/
|
|
329
|
+
recoverByDelete(next, nextEnd) {
|
|
330
|
+
let isNode = next <= this.p.parser.maxNode;
|
|
331
|
+
if (isNode)
|
|
332
|
+
this.storeNode(next, this.pos, nextEnd, 4);
|
|
333
|
+
this.storeNode(0, this.pos, nextEnd, isNode ? 8 : 4);
|
|
334
|
+
this.pos = this.reducePos = nextEnd;
|
|
335
|
+
this.score -= 190;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
Check if the given term would be able to be shifted (optionally
|
|
339
|
+
after some reductions) on this stack. This can be useful for
|
|
340
|
+
external tokenizers that want to make sure they only provide a
|
|
341
|
+
given token when it applies.
|
|
342
|
+
*/
|
|
343
|
+
canShift(term) {
|
|
344
|
+
for (let sim = new SimulatedStack(this); ; ) {
|
|
345
|
+
let action = this.p.parser.stateSlot(
|
|
346
|
+
sim.state,
|
|
347
|
+
4
|
|
348
|
+
/* ParseState.DefaultReduce */
|
|
349
|
+
) || this.p.parser.hasAction(sim.state, term);
|
|
350
|
+
if (action == 0)
|
|
351
|
+
return false;
|
|
352
|
+
if ((action & 65536) == 0)
|
|
353
|
+
return true;
|
|
354
|
+
sim.reduce(action);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
// Apply up to Recover.MaxNext recovery actions that conceptually
|
|
358
|
+
// inserts some missing token or rule.
|
|
359
|
+
/**
|
|
360
|
+
@internal
|
|
361
|
+
*/
|
|
362
|
+
recoverByInsert(next) {
|
|
363
|
+
if (this.stack.length >= 300)
|
|
364
|
+
return [];
|
|
365
|
+
let nextStates = this.p.parser.nextStates(this.state);
|
|
366
|
+
if (nextStates.length > 4 << 1 || this.stack.length >= 120) {
|
|
367
|
+
let best = [];
|
|
368
|
+
for (let i = 0, s; i < nextStates.length; i += 2) {
|
|
369
|
+
if ((s = nextStates[i + 1]) != this.state && this.p.parser.hasAction(s, next))
|
|
370
|
+
best.push(nextStates[i], s);
|
|
371
|
+
}
|
|
372
|
+
if (this.stack.length < 120)
|
|
373
|
+
for (let i = 0; best.length < 4 << 1 && i < nextStates.length; i += 2) {
|
|
374
|
+
let s = nextStates[i + 1];
|
|
375
|
+
if (!best.some((v, i2) => i2 & 1 && v == s))
|
|
376
|
+
best.push(nextStates[i], s);
|
|
377
|
+
}
|
|
378
|
+
nextStates = best;
|
|
379
|
+
}
|
|
380
|
+
let result = [];
|
|
381
|
+
for (let i = 0; i < nextStates.length && result.length < 4; i += 2) {
|
|
382
|
+
let s = nextStates[i + 1];
|
|
383
|
+
if (s == this.state)
|
|
384
|
+
continue;
|
|
385
|
+
let stack = this.split();
|
|
386
|
+
stack.pushState(s, this.pos);
|
|
387
|
+
stack.storeNode(0, stack.pos, stack.pos, 4, true);
|
|
388
|
+
stack.shiftContext(nextStates[i], this.pos);
|
|
389
|
+
stack.reducePos = this.pos;
|
|
390
|
+
stack.score -= 200;
|
|
391
|
+
result.push(stack);
|
|
392
|
+
}
|
|
393
|
+
return result;
|
|
394
|
+
}
|
|
395
|
+
// Force a reduce, if possible. Return false if that can't
|
|
396
|
+
// be done.
|
|
397
|
+
/**
|
|
398
|
+
@internal
|
|
399
|
+
*/
|
|
400
|
+
forceReduce() {
|
|
401
|
+
let { parser: parser2 } = this.p;
|
|
402
|
+
let reduce = parser2.stateSlot(
|
|
403
|
+
this.state,
|
|
404
|
+
5
|
|
405
|
+
/* ParseState.ForcedReduce */
|
|
406
|
+
);
|
|
407
|
+
if ((reduce & 65536) == 0)
|
|
408
|
+
return false;
|
|
409
|
+
if (!parser2.validAction(this.state, reduce)) {
|
|
410
|
+
let depth = reduce >> 19, term = reduce & 65535;
|
|
411
|
+
let target = this.stack.length - depth * 3;
|
|
412
|
+
if (target < 0 || parser2.getGoto(this.stack[target], term, false) < 0) {
|
|
413
|
+
let backup = this.findForcedReduction();
|
|
414
|
+
if (backup == null)
|
|
415
|
+
return false;
|
|
416
|
+
reduce = backup;
|
|
417
|
+
}
|
|
418
|
+
this.storeNode(0, this.pos, this.pos, 4, true);
|
|
419
|
+
this.score -= 100;
|
|
420
|
+
}
|
|
421
|
+
this.reducePos = this.pos;
|
|
422
|
+
this.reduce(reduce);
|
|
423
|
+
return true;
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
Try to scan through the automaton to find some kind of reduction
|
|
427
|
+
that can be applied. Used when the regular ForcedReduce field
|
|
428
|
+
isn't a valid action. @internal
|
|
429
|
+
*/
|
|
430
|
+
findForcedReduction() {
|
|
431
|
+
let { parser: parser2 } = this.p, seen = [];
|
|
432
|
+
let explore = (state, depth) => {
|
|
433
|
+
if (seen.includes(state))
|
|
434
|
+
return;
|
|
435
|
+
seen.push(state);
|
|
436
|
+
return parser2.allActions(state, (action) => {
|
|
437
|
+
if (action & (262144 | 131072))
|
|
438
|
+
;
|
|
439
|
+
else if (action & 65536) {
|
|
440
|
+
let rDepth = (action >> 19) - depth;
|
|
441
|
+
if (rDepth > 1) {
|
|
442
|
+
let term = action & 65535, target = this.stack.length - rDepth * 3;
|
|
443
|
+
if (target >= 0 && parser2.getGoto(this.stack[target], term, false) >= 0)
|
|
444
|
+
return rDepth << 19 | 65536 | term;
|
|
445
|
+
}
|
|
446
|
+
} else {
|
|
447
|
+
let found = explore(action, depth + 1);
|
|
448
|
+
if (found != null)
|
|
449
|
+
return found;
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
};
|
|
453
|
+
return explore(this.state, 0);
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
@internal
|
|
457
|
+
*/
|
|
458
|
+
forceAll() {
|
|
459
|
+
while (!this.p.parser.stateFlag(
|
|
460
|
+
this.state,
|
|
461
|
+
2
|
|
462
|
+
/* StateFlag.Accepting */
|
|
463
|
+
)) {
|
|
464
|
+
if (!this.forceReduce()) {
|
|
465
|
+
this.storeNode(0, this.pos, this.pos, 4, true);
|
|
466
|
+
break;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
return this;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
Check whether this state has no further actions (assumed to be a direct descendant of the
|
|
473
|
+
top state, since any other states must be able to continue
|
|
474
|
+
somehow). @internal
|
|
475
|
+
*/
|
|
476
|
+
get deadEnd() {
|
|
477
|
+
if (this.stack.length != 3)
|
|
478
|
+
return false;
|
|
479
|
+
let { parser: parser2 } = this.p;
|
|
480
|
+
return parser2.data[parser2.stateSlot(
|
|
481
|
+
this.state,
|
|
482
|
+
1
|
|
483
|
+
/* ParseState.Actions */
|
|
484
|
+
)] == 65535 && !parser2.stateSlot(
|
|
485
|
+
this.state,
|
|
486
|
+
4
|
|
487
|
+
/* ParseState.DefaultReduce */
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
Restart the stack (put it back in its start state). Only safe
|
|
492
|
+
when this.stack.length == 3 (state is directly below the top
|
|
493
|
+
state). @internal
|
|
494
|
+
*/
|
|
495
|
+
restart() {
|
|
496
|
+
this.storeNode(0, this.pos, this.pos, 4, true);
|
|
497
|
+
this.state = this.stack[0];
|
|
498
|
+
this.stack.length = 0;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
@internal
|
|
502
|
+
*/
|
|
503
|
+
sameState(other) {
|
|
504
|
+
if (this.state != other.state || this.stack.length != other.stack.length)
|
|
505
|
+
return false;
|
|
506
|
+
for (let i = 0; i < this.stack.length; i += 3)
|
|
507
|
+
if (this.stack[i] != other.stack[i])
|
|
508
|
+
return false;
|
|
509
|
+
return true;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
Get the parser used by this stack.
|
|
513
|
+
*/
|
|
514
|
+
get parser() {
|
|
515
|
+
return this.p.parser;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
Test whether a given dialect (by numeric ID, as exported from
|
|
519
|
+
the terms file) is enabled.
|
|
520
|
+
*/
|
|
521
|
+
dialectEnabled(dialectID) {
|
|
522
|
+
return this.p.parser.dialect.flags[dialectID];
|
|
523
|
+
}
|
|
524
|
+
shiftContext(term, start) {
|
|
525
|
+
if (this.curContext)
|
|
526
|
+
this.updateContext(this.curContext.tracker.shift(this.curContext.context, term, this, this.p.stream.reset(start)));
|
|
527
|
+
}
|
|
528
|
+
reduceContext(term, start) {
|
|
529
|
+
if (this.curContext)
|
|
530
|
+
this.updateContext(this.curContext.tracker.reduce(this.curContext.context, term, this, this.p.stream.reset(start)));
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
@internal
|
|
534
|
+
*/
|
|
535
|
+
emitContext() {
|
|
536
|
+
let last = this.buffer.length - 1;
|
|
537
|
+
if (last < 0 || this.buffer[last] != -3)
|
|
538
|
+
this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
@internal
|
|
542
|
+
*/
|
|
543
|
+
emitLookAhead() {
|
|
544
|
+
let last = this.buffer.length - 1;
|
|
545
|
+
if (last < 0 || this.buffer[last] != -4)
|
|
546
|
+
this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
|
|
547
|
+
}
|
|
548
|
+
updateContext(context) {
|
|
549
|
+
if (context != this.curContext.context) {
|
|
550
|
+
let newCx = new StackContext(this.curContext.tracker, context);
|
|
551
|
+
if (newCx.hash != this.curContext.hash)
|
|
552
|
+
this.emitContext();
|
|
553
|
+
this.curContext = newCx;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
@internal
|
|
558
|
+
*/
|
|
559
|
+
setLookAhead(lookAhead) {
|
|
560
|
+
if (lookAhead > this.lookAhead) {
|
|
561
|
+
this.emitLookAhead();
|
|
562
|
+
this.lookAhead = lookAhead;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
@internal
|
|
567
|
+
*/
|
|
568
|
+
close() {
|
|
569
|
+
if (this.curContext && this.curContext.tracker.strict)
|
|
570
|
+
this.emitContext();
|
|
571
|
+
if (this.lookAhead > 0)
|
|
572
|
+
this.emitLookAhead();
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
class StackContext {
|
|
576
|
+
constructor(tracker, context) {
|
|
577
|
+
this.tracker = tracker;
|
|
578
|
+
this.context = context;
|
|
579
|
+
this.hash = tracker.strict ? tracker.hash(context) : 0;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
class SimulatedStack {
|
|
583
|
+
constructor(start) {
|
|
584
|
+
this.start = start;
|
|
585
|
+
this.state = start.state;
|
|
586
|
+
this.stack = start.stack;
|
|
587
|
+
this.base = this.stack.length;
|
|
588
|
+
}
|
|
589
|
+
reduce(action) {
|
|
590
|
+
let term = action & 65535, depth = action >> 19;
|
|
591
|
+
if (depth == 0) {
|
|
592
|
+
if (this.stack == this.start.stack)
|
|
593
|
+
this.stack = this.stack.slice();
|
|
594
|
+
this.stack.push(this.state, 0, 0);
|
|
595
|
+
this.base += 3;
|
|
596
|
+
} else {
|
|
597
|
+
this.base -= (depth - 1) * 3;
|
|
598
|
+
}
|
|
599
|
+
let goto = this.start.p.parser.getGoto(this.stack[this.base - 3], term, true);
|
|
600
|
+
this.state = goto;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
class StackBufferCursor {
|
|
604
|
+
constructor(stack, pos, index) {
|
|
605
|
+
this.stack = stack;
|
|
606
|
+
this.pos = pos;
|
|
607
|
+
this.index = index;
|
|
608
|
+
this.buffer = stack.buffer;
|
|
609
|
+
if (this.index == 0)
|
|
610
|
+
this.maybeNext();
|
|
611
|
+
}
|
|
612
|
+
static create(stack, pos = stack.bufferBase + stack.buffer.length) {
|
|
613
|
+
return new StackBufferCursor(stack, pos, pos - stack.bufferBase);
|
|
614
|
+
}
|
|
615
|
+
maybeNext() {
|
|
616
|
+
let next = this.stack.parent;
|
|
617
|
+
if (next != null) {
|
|
618
|
+
this.index = this.stack.bufferBase - next.bufferBase;
|
|
619
|
+
this.stack = next;
|
|
620
|
+
this.buffer = next.buffer;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
get id() {
|
|
624
|
+
return this.buffer[this.index - 4];
|
|
625
|
+
}
|
|
626
|
+
get start() {
|
|
627
|
+
return this.buffer[this.index - 3];
|
|
628
|
+
}
|
|
629
|
+
get end() {
|
|
630
|
+
return this.buffer[this.index - 2];
|
|
631
|
+
}
|
|
632
|
+
get size() {
|
|
633
|
+
return this.buffer[this.index - 1];
|
|
634
|
+
}
|
|
635
|
+
next() {
|
|
636
|
+
this.index -= 4;
|
|
637
|
+
this.pos -= 4;
|
|
638
|
+
if (this.index == 0)
|
|
639
|
+
this.maybeNext();
|
|
640
|
+
}
|
|
641
|
+
fork() {
|
|
642
|
+
return new StackBufferCursor(this.stack, this.pos, this.index);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
function decodeArray(input, Type = Uint16Array) {
|
|
646
|
+
if (typeof input != "string")
|
|
647
|
+
return input;
|
|
648
|
+
let array = null;
|
|
649
|
+
for (let pos = 0, out = 0; pos < input.length; ) {
|
|
650
|
+
let value = 0;
|
|
651
|
+
for (; ; ) {
|
|
652
|
+
let next = input.charCodeAt(pos++), stop = false;
|
|
653
|
+
if (next == 126) {
|
|
654
|
+
value = 65535;
|
|
655
|
+
break;
|
|
656
|
+
}
|
|
657
|
+
if (next >= 92)
|
|
658
|
+
next--;
|
|
659
|
+
if (next >= 34)
|
|
660
|
+
next--;
|
|
661
|
+
let digit = next - 32;
|
|
662
|
+
if (digit >= 46) {
|
|
663
|
+
digit -= 46;
|
|
664
|
+
stop = true;
|
|
665
|
+
}
|
|
666
|
+
value += digit;
|
|
667
|
+
if (stop)
|
|
668
|
+
break;
|
|
669
|
+
value *= 46;
|
|
670
|
+
}
|
|
671
|
+
if (array)
|
|
672
|
+
array[out++] = value;
|
|
673
|
+
else
|
|
674
|
+
array = new Type(value);
|
|
675
|
+
}
|
|
676
|
+
return array;
|
|
677
|
+
}
|
|
678
|
+
class CachedToken {
|
|
679
|
+
constructor() {
|
|
680
|
+
this.start = -1;
|
|
681
|
+
this.value = -1;
|
|
682
|
+
this.end = -1;
|
|
683
|
+
this.extended = -1;
|
|
684
|
+
this.lookAhead = 0;
|
|
685
|
+
this.mask = 0;
|
|
686
|
+
this.context = 0;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
const nullToken = new CachedToken();
|
|
690
|
+
class InputStream {
|
|
691
|
+
/**
|
|
692
|
+
@internal
|
|
693
|
+
*/
|
|
694
|
+
constructor(input, ranges) {
|
|
695
|
+
this.input = input;
|
|
696
|
+
this.ranges = ranges;
|
|
697
|
+
this.chunk = "";
|
|
698
|
+
this.chunkOff = 0;
|
|
699
|
+
this.chunk2 = "";
|
|
700
|
+
this.chunk2Pos = 0;
|
|
701
|
+
this.next = -1;
|
|
702
|
+
this.token = nullToken;
|
|
703
|
+
this.rangeIndex = 0;
|
|
704
|
+
this.pos = this.chunkPos = ranges[0].from;
|
|
705
|
+
this.range = ranges[0];
|
|
706
|
+
this.end = ranges[ranges.length - 1].to;
|
|
707
|
+
this.readNext();
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
@internal
|
|
711
|
+
*/
|
|
712
|
+
resolveOffset(offset, assoc) {
|
|
713
|
+
let range = this.range, index = this.rangeIndex;
|
|
714
|
+
let pos = this.pos + offset;
|
|
715
|
+
while (pos < range.from) {
|
|
716
|
+
if (!index)
|
|
717
|
+
return null;
|
|
718
|
+
let next = this.ranges[--index];
|
|
719
|
+
pos -= range.from - next.to;
|
|
720
|
+
range = next;
|
|
721
|
+
}
|
|
722
|
+
while (assoc < 0 ? pos > range.to : pos >= range.to) {
|
|
723
|
+
if (index == this.ranges.length - 1)
|
|
724
|
+
return null;
|
|
725
|
+
let next = this.ranges[++index];
|
|
726
|
+
pos += next.from - range.to;
|
|
727
|
+
range = next;
|
|
728
|
+
}
|
|
729
|
+
return pos;
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
@internal
|
|
733
|
+
*/
|
|
734
|
+
clipPos(pos) {
|
|
735
|
+
if (pos >= this.range.from && pos < this.range.to)
|
|
736
|
+
return pos;
|
|
737
|
+
for (let range of this.ranges)
|
|
738
|
+
if (range.to > pos)
|
|
739
|
+
return Math.max(pos, range.from);
|
|
740
|
+
return this.end;
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
Look at a code unit near the stream position. `.peek(0)` equals
|
|
744
|
+
`.next`, `.peek(-1)` gives you the previous character, and so
|
|
745
|
+
on.
|
|
746
|
+
|
|
747
|
+
Note that looking around during tokenizing creates dependencies
|
|
748
|
+
on potentially far-away content, which may reduce the
|
|
749
|
+
effectiveness incremental parsing—when looking forward—or even
|
|
750
|
+
cause invalid reparses when looking backward more than 25 code
|
|
751
|
+
units, since the library does not track lookbehind.
|
|
752
|
+
*/
|
|
753
|
+
peek(offset) {
|
|
754
|
+
let idx = this.chunkOff + offset, pos, result;
|
|
755
|
+
if (idx >= 0 && idx < this.chunk.length) {
|
|
756
|
+
pos = this.pos + offset;
|
|
757
|
+
result = this.chunk.charCodeAt(idx);
|
|
758
|
+
} else {
|
|
759
|
+
let resolved = this.resolveOffset(offset, 1);
|
|
760
|
+
if (resolved == null)
|
|
761
|
+
return -1;
|
|
762
|
+
pos = resolved;
|
|
763
|
+
if (pos >= this.chunk2Pos && pos < this.chunk2Pos + this.chunk2.length) {
|
|
764
|
+
result = this.chunk2.charCodeAt(pos - this.chunk2Pos);
|
|
765
|
+
} else {
|
|
766
|
+
let i = this.rangeIndex, range = this.range;
|
|
767
|
+
while (range.to <= pos)
|
|
768
|
+
range = this.ranges[++i];
|
|
769
|
+
this.chunk2 = this.input.chunk(this.chunk2Pos = pos);
|
|
770
|
+
if (pos + this.chunk2.length > range.to)
|
|
771
|
+
this.chunk2 = this.chunk2.slice(0, range.to - pos);
|
|
772
|
+
result = this.chunk2.charCodeAt(0);
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
if (pos >= this.token.lookAhead)
|
|
776
|
+
this.token.lookAhead = pos + 1;
|
|
777
|
+
return result;
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
Accept a token. By default, the end of the token is set to the
|
|
781
|
+
current stream position, but you can pass an offset (relative to
|
|
782
|
+
the stream position) to change that.
|
|
783
|
+
*/
|
|
784
|
+
acceptToken(token, endOffset = 0) {
|
|
785
|
+
let end = endOffset ? this.resolveOffset(endOffset, -1) : this.pos;
|
|
786
|
+
if (end == null || end < this.token.start)
|
|
787
|
+
throw new RangeError("Token end out of bounds");
|
|
788
|
+
this.token.value = token;
|
|
789
|
+
this.token.end = end;
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
Accept a token ending at a specific given position.
|
|
793
|
+
*/
|
|
794
|
+
acceptTokenTo(token, endPos) {
|
|
795
|
+
this.token.value = token;
|
|
796
|
+
this.token.end = endPos;
|
|
797
|
+
}
|
|
798
|
+
getChunk() {
|
|
799
|
+
if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
|
|
800
|
+
let { chunk, chunkPos } = this;
|
|
801
|
+
this.chunk = this.chunk2;
|
|
802
|
+
this.chunkPos = this.chunk2Pos;
|
|
803
|
+
this.chunk2 = chunk;
|
|
804
|
+
this.chunk2Pos = chunkPos;
|
|
805
|
+
this.chunkOff = this.pos - this.chunkPos;
|
|
806
|
+
} else {
|
|
807
|
+
this.chunk2 = this.chunk;
|
|
808
|
+
this.chunk2Pos = this.chunkPos;
|
|
809
|
+
let nextChunk = this.input.chunk(this.pos);
|
|
810
|
+
let end = this.pos + nextChunk.length;
|
|
811
|
+
this.chunk = end > this.range.to ? nextChunk.slice(0, this.range.to - this.pos) : nextChunk;
|
|
812
|
+
this.chunkPos = this.pos;
|
|
813
|
+
this.chunkOff = 0;
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
readNext() {
|
|
817
|
+
if (this.chunkOff >= this.chunk.length) {
|
|
818
|
+
this.getChunk();
|
|
819
|
+
if (this.chunkOff == this.chunk.length)
|
|
820
|
+
return this.next = -1;
|
|
821
|
+
}
|
|
822
|
+
return this.next = this.chunk.charCodeAt(this.chunkOff);
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
Move the stream forward N (defaults to 1) code units. Returns
|
|
826
|
+
the new value of [`next`](#lr.InputStream.next).
|
|
827
|
+
*/
|
|
828
|
+
advance(n = 1) {
|
|
829
|
+
this.chunkOff += n;
|
|
830
|
+
while (this.pos + n >= this.range.to) {
|
|
831
|
+
if (this.rangeIndex == this.ranges.length - 1)
|
|
832
|
+
return this.setDone();
|
|
833
|
+
n -= this.range.to - this.pos;
|
|
834
|
+
this.range = this.ranges[++this.rangeIndex];
|
|
835
|
+
this.pos = this.range.from;
|
|
836
|
+
}
|
|
837
|
+
this.pos += n;
|
|
838
|
+
if (this.pos >= this.token.lookAhead)
|
|
839
|
+
this.token.lookAhead = this.pos + 1;
|
|
840
|
+
return this.readNext();
|
|
841
|
+
}
|
|
842
|
+
setDone() {
|
|
843
|
+
this.pos = this.chunkPos = this.end;
|
|
844
|
+
this.range = this.ranges[this.rangeIndex = this.ranges.length - 1];
|
|
845
|
+
this.chunk = "";
|
|
846
|
+
return this.next = -1;
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
@internal
|
|
850
|
+
*/
|
|
851
|
+
reset(pos, token) {
|
|
852
|
+
if (token) {
|
|
853
|
+
this.token = token;
|
|
854
|
+
token.start = pos;
|
|
855
|
+
token.lookAhead = pos + 1;
|
|
856
|
+
token.value = token.extended = -1;
|
|
857
|
+
} else {
|
|
858
|
+
this.token = nullToken;
|
|
859
|
+
}
|
|
860
|
+
if (this.pos != pos) {
|
|
861
|
+
this.pos = pos;
|
|
862
|
+
if (pos == this.end) {
|
|
863
|
+
this.setDone();
|
|
864
|
+
return this;
|
|
865
|
+
}
|
|
866
|
+
while (pos < this.range.from)
|
|
867
|
+
this.range = this.ranges[--this.rangeIndex];
|
|
868
|
+
while (pos >= this.range.to)
|
|
869
|
+
this.range = this.ranges[++this.rangeIndex];
|
|
870
|
+
if (pos >= this.chunkPos && pos < this.chunkPos + this.chunk.length) {
|
|
871
|
+
this.chunkOff = pos - this.chunkPos;
|
|
872
|
+
} else {
|
|
873
|
+
this.chunk = "";
|
|
874
|
+
this.chunkOff = 0;
|
|
875
|
+
}
|
|
876
|
+
this.readNext();
|
|
877
|
+
}
|
|
878
|
+
return this;
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
@internal
|
|
882
|
+
*/
|
|
883
|
+
read(from, to) {
|
|
884
|
+
if (from >= this.chunkPos && to <= this.chunkPos + this.chunk.length)
|
|
885
|
+
return this.chunk.slice(from - this.chunkPos, to - this.chunkPos);
|
|
886
|
+
if (from >= this.chunk2Pos && to <= this.chunk2Pos + this.chunk2.length)
|
|
887
|
+
return this.chunk2.slice(from - this.chunk2Pos, to - this.chunk2Pos);
|
|
888
|
+
if (from >= this.range.from && to <= this.range.to)
|
|
889
|
+
return this.input.read(from, to);
|
|
890
|
+
let result = "";
|
|
891
|
+
for (let r of this.ranges) {
|
|
892
|
+
if (r.from >= to)
|
|
893
|
+
break;
|
|
894
|
+
if (r.to > from)
|
|
895
|
+
result += this.input.read(Math.max(r.from, from), Math.min(r.to, to));
|
|
896
|
+
}
|
|
897
|
+
return result;
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
class TokenGroup {
|
|
901
|
+
constructor(data, id2) {
|
|
902
|
+
this.data = data;
|
|
903
|
+
this.id = id2;
|
|
904
|
+
}
|
|
905
|
+
token(input, stack) {
|
|
906
|
+
let { parser: parser2 } = stack.p;
|
|
907
|
+
readToken(this.data, input, stack, this.id, parser2.data, parser2.tokenPrecTable);
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
TokenGroup.prototype.contextual = TokenGroup.prototype.fallback = TokenGroup.prototype.extend = false;
|
|
911
|
+
TokenGroup.prototype.fallback = TokenGroup.prototype.extend = false;
|
|
912
|
+
class ExternalTokenizer {
|
|
913
|
+
/**
|
|
914
|
+
Create a tokenizer. The first argument is the function that,
|
|
915
|
+
given an input stream, scans for the types of tokens it
|
|
916
|
+
recognizes at the stream's position, and calls
|
|
917
|
+
[`acceptToken`](#lr.InputStream.acceptToken) when it finds
|
|
918
|
+
one.
|
|
919
|
+
*/
|
|
920
|
+
constructor(token, options = {}) {
|
|
921
|
+
this.token = token;
|
|
922
|
+
this.contextual = !!options.contextual;
|
|
923
|
+
this.fallback = !!options.fallback;
|
|
924
|
+
this.extend = !!options.extend;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
function readToken(data, input, stack, group, precTable, precOffset) {
|
|
928
|
+
let state = 0, groupMask = 1 << group, { dialect } = stack.p.parser;
|
|
929
|
+
scan:
|
|
930
|
+
for (; ; ) {
|
|
931
|
+
if ((groupMask & data[state]) == 0)
|
|
932
|
+
break;
|
|
933
|
+
let accEnd = data[state + 1];
|
|
934
|
+
for (let i = state + 3; i < accEnd; i += 2)
|
|
935
|
+
if ((data[i + 1] & groupMask) > 0) {
|
|
936
|
+
let term = data[i];
|
|
937
|
+
if (dialect.allows(term) && (input.token.value == -1 || input.token.value == term || overrides(term, input.token.value, precTable, precOffset))) {
|
|
938
|
+
input.acceptToken(term);
|
|
939
|
+
break;
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
let next = input.next, low = 0, high = data[state + 2];
|
|
943
|
+
if (input.next < 0 && high > low && data[accEnd + high * 3 - 3] == 65535) {
|
|
944
|
+
state = data[accEnd + high * 3 - 1];
|
|
945
|
+
continue scan;
|
|
946
|
+
}
|
|
947
|
+
for (; low < high; ) {
|
|
948
|
+
let mid = low + high >> 1;
|
|
949
|
+
let index = accEnd + mid + (mid << 1);
|
|
950
|
+
let from = data[index], to = data[index + 1] || 65536;
|
|
951
|
+
if (next < from)
|
|
952
|
+
high = mid;
|
|
953
|
+
else if (next >= to)
|
|
954
|
+
low = mid + 1;
|
|
955
|
+
else {
|
|
956
|
+
state = data[index + 2];
|
|
957
|
+
input.advance();
|
|
958
|
+
continue scan;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
break;
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
function findOffset(data, start, term) {
|
|
965
|
+
for (let i = start, next; (next = data[i]) != 65535; i++)
|
|
966
|
+
if (next == term)
|
|
967
|
+
return i - start;
|
|
968
|
+
return -1;
|
|
969
|
+
}
|
|
970
|
+
function overrides(token, prev, tableData, tableOffset) {
|
|
971
|
+
let iPrev = findOffset(tableData, tableOffset, prev);
|
|
972
|
+
return iPrev < 0 || findOffset(tableData, tableOffset, token) < iPrev;
|
|
973
|
+
}
|
|
974
|
+
const verbose = typeof process != "undefined" && process.env && /\bparse\b/.test({}.LOG);
|
|
975
|
+
let stackIDs = null;
|
|
976
|
+
function cutAt(tree, pos, side) {
|
|
977
|
+
let cursor2 = tree.cursor(IterMode.IncludeAnonymous);
|
|
978
|
+
cursor2.moveTo(pos);
|
|
979
|
+
for (; ; ) {
|
|
980
|
+
if (!(side < 0 ? cursor2.childBefore(pos) : cursor2.childAfter(pos)))
|
|
981
|
+
for (; ; ) {
|
|
982
|
+
if ((side < 0 ? cursor2.to < pos : cursor2.from > pos) && !cursor2.type.isError)
|
|
983
|
+
return side < 0 ? Math.max(0, Math.min(
|
|
984
|
+
cursor2.to - 1,
|
|
985
|
+
pos - 25
|
|
986
|
+
/* Lookahead.Margin */
|
|
987
|
+
)) : Math.min(tree.length, Math.max(
|
|
988
|
+
cursor2.from + 1,
|
|
989
|
+
pos + 25
|
|
990
|
+
/* Lookahead.Margin */
|
|
991
|
+
));
|
|
992
|
+
if (side < 0 ? cursor2.prevSibling() : cursor2.nextSibling())
|
|
993
|
+
break;
|
|
994
|
+
if (!cursor2.parent())
|
|
995
|
+
return side < 0 ? 0 : tree.length;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
class FragmentCursor {
|
|
1000
|
+
constructor(fragments, nodeSet) {
|
|
1001
|
+
this.fragments = fragments;
|
|
1002
|
+
this.nodeSet = nodeSet;
|
|
1003
|
+
this.i = 0;
|
|
1004
|
+
this.fragment = null;
|
|
1005
|
+
this.safeFrom = -1;
|
|
1006
|
+
this.safeTo = -1;
|
|
1007
|
+
this.trees = [];
|
|
1008
|
+
this.start = [];
|
|
1009
|
+
this.index = [];
|
|
1010
|
+
this.nextFragment();
|
|
1011
|
+
}
|
|
1012
|
+
nextFragment() {
|
|
1013
|
+
let fr = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
|
|
1014
|
+
if (fr) {
|
|
1015
|
+
this.safeFrom = fr.openStart ? cutAt(fr.tree, fr.from + fr.offset, 1) - fr.offset : fr.from;
|
|
1016
|
+
this.safeTo = fr.openEnd ? cutAt(fr.tree, fr.to + fr.offset, -1) - fr.offset : fr.to;
|
|
1017
|
+
while (this.trees.length) {
|
|
1018
|
+
this.trees.pop();
|
|
1019
|
+
this.start.pop();
|
|
1020
|
+
this.index.pop();
|
|
1021
|
+
}
|
|
1022
|
+
this.trees.push(fr.tree);
|
|
1023
|
+
this.start.push(-fr.offset);
|
|
1024
|
+
this.index.push(0);
|
|
1025
|
+
this.nextStart = this.safeFrom;
|
|
1026
|
+
} else {
|
|
1027
|
+
this.nextStart = 1e9;
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
// `pos` must be >= any previously given `pos` for this cursor
|
|
1031
|
+
nodeAt(pos) {
|
|
1032
|
+
if (pos < this.nextStart)
|
|
1033
|
+
return null;
|
|
1034
|
+
while (this.fragment && this.safeTo <= pos)
|
|
1035
|
+
this.nextFragment();
|
|
1036
|
+
if (!this.fragment)
|
|
1037
|
+
return null;
|
|
1038
|
+
for (; ; ) {
|
|
1039
|
+
let last = this.trees.length - 1;
|
|
1040
|
+
if (last < 0) {
|
|
1041
|
+
this.nextFragment();
|
|
1042
|
+
return null;
|
|
1043
|
+
}
|
|
1044
|
+
let top = this.trees[last], index = this.index[last];
|
|
1045
|
+
if (index == top.children.length) {
|
|
1046
|
+
this.trees.pop();
|
|
1047
|
+
this.start.pop();
|
|
1048
|
+
this.index.pop();
|
|
1049
|
+
continue;
|
|
1050
|
+
}
|
|
1051
|
+
let next = top.children[index];
|
|
1052
|
+
let start = this.start[last] + top.positions[index];
|
|
1053
|
+
if (start > pos) {
|
|
1054
|
+
this.nextStart = start;
|
|
1055
|
+
return null;
|
|
1056
|
+
}
|
|
1057
|
+
if (next instanceof Tree) {
|
|
1058
|
+
if (start == pos) {
|
|
1059
|
+
if (start < this.safeFrom)
|
|
1060
|
+
return null;
|
|
1061
|
+
let end = start + next.length;
|
|
1062
|
+
if (end <= this.safeTo) {
|
|
1063
|
+
let lookAhead = next.prop(NodeProp.lookAhead);
|
|
1064
|
+
if (!lookAhead || end + lookAhead < this.fragment.to)
|
|
1065
|
+
return next;
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
this.index[last]++;
|
|
1069
|
+
if (start + next.length >= Math.max(this.safeFrom, pos)) {
|
|
1070
|
+
this.trees.push(next);
|
|
1071
|
+
this.start.push(start);
|
|
1072
|
+
this.index.push(0);
|
|
1073
|
+
}
|
|
1074
|
+
} else {
|
|
1075
|
+
this.index[last]++;
|
|
1076
|
+
this.nextStart = start + next.length;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
class TokenCache {
|
|
1082
|
+
constructor(parser2, stream) {
|
|
1083
|
+
this.stream = stream;
|
|
1084
|
+
this.tokens = [];
|
|
1085
|
+
this.mainToken = null;
|
|
1086
|
+
this.actions = [];
|
|
1087
|
+
this.tokens = parser2.tokenizers.map((_) => new CachedToken());
|
|
1088
|
+
}
|
|
1089
|
+
getActions(stack) {
|
|
1090
|
+
let actionIndex = 0;
|
|
1091
|
+
let main = null;
|
|
1092
|
+
let { parser: parser2 } = stack.p, { tokenizers } = parser2;
|
|
1093
|
+
let mask = parser2.stateSlot(
|
|
1094
|
+
stack.state,
|
|
1095
|
+
3
|
|
1096
|
+
/* ParseState.TokenizerMask */
|
|
1097
|
+
);
|
|
1098
|
+
let context = stack.curContext ? stack.curContext.hash : 0;
|
|
1099
|
+
let lookAhead = 0;
|
|
1100
|
+
for (let i = 0; i < tokenizers.length; i++) {
|
|
1101
|
+
if ((1 << i & mask) == 0)
|
|
1102
|
+
continue;
|
|
1103
|
+
let tokenizer = tokenizers[i], token = this.tokens[i];
|
|
1104
|
+
if (main && !tokenizer.fallback)
|
|
1105
|
+
continue;
|
|
1106
|
+
if (tokenizer.contextual || token.start != stack.pos || token.mask != mask || token.context != context) {
|
|
1107
|
+
this.updateCachedToken(token, tokenizer, stack);
|
|
1108
|
+
token.mask = mask;
|
|
1109
|
+
token.context = context;
|
|
1110
|
+
}
|
|
1111
|
+
if (token.lookAhead > token.end + 25)
|
|
1112
|
+
lookAhead = Math.max(token.lookAhead, lookAhead);
|
|
1113
|
+
if (token.value != 0) {
|
|
1114
|
+
let startIndex = actionIndex;
|
|
1115
|
+
if (token.extended > -1)
|
|
1116
|
+
actionIndex = this.addActions(stack, token.extended, token.end, actionIndex);
|
|
1117
|
+
actionIndex = this.addActions(stack, token.value, token.end, actionIndex);
|
|
1118
|
+
if (!tokenizer.extend) {
|
|
1119
|
+
main = token;
|
|
1120
|
+
if (actionIndex > startIndex)
|
|
1121
|
+
break;
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
while (this.actions.length > actionIndex)
|
|
1126
|
+
this.actions.pop();
|
|
1127
|
+
if (lookAhead)
|
|
1128
|
+
stack.setLookAhead(lookAhead);
|
|
1129
|
+
if (!main && stack.pos == this.stream.end) {
|
|
1130
|
+
main = new CachedToken();
|
|
1131
|
+
main.value = stack.p.parser.eofTerm;
|
|
1132
|
+
main.start = main.end = stack.pos;
|
|
1133
|
+
actionIndex = this.addActions(stack, main.value, main.end, actionIndex);
|
|
1134
|
+
}
|
|
1135
|
+
this.mainToken = main;
|
|
1136
|
+
return this.actions;
|
|
1137
|
+
}
|
|
1138
|
+
getMainToken(stack) {
|
|
1139
|
+
if (this.mainToken)
|
|
1140
|
+
return this.mainToken;
|
|
1141
|
+
let main = new CachedToken(), { pos, p } = stack;
|
|
1142
|
+
main.start = pos;
|
|
1143
|
+
main.end = Math.min(pos + 1, p.stream.end);
|
|
1144
|
+
main.value = pos == p.stream.end ? p.parser.eofTerm : 0;
|
|
1145
|
+
return main;
|
|
1146
|
+
}
|
|
1147
|
+
updateCachedToken(token, tokenizer, stack) {
|
|
1148
|
+
let start = this.stream.clipPos(stack.pos);
|
|
1149
|
+
tokenizer.token(this.stream.reset(start, token), stack);
|
|
1150
|
+
if (token.value > -1) {
|
|
1151
|
+
let { parser: parser2 } = stack.p;
|
|
1152
|
+
for (let i = 0; i < parser2.specialized.length; i++)
|
|
1153
|
+
if (parser2.specialized[i] == token.value) {
|
|
1154
|
+
let result = parser2.specializers[i](this.stream.read(token.start, token.end), stack);
|
|
1155
|
+
if (result >= 0 && stack.p.parser.dialect.allows(result >> 1)) {
|
|
1156
|
+
if ((result & 1) == 0)
|
|
1157
|
+
token.value = result >> 1;
|
|
1158
|
+
else
|
|
1159
|
+
token.extended = result >> 1;
|
|
1160
|
+
break;
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
} else {
|
|
1164
|
+
token.value = 0;
|
|
1165
|
+
token.end = this.stream.clipPos(start + 1);
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
putAction(action, token, end, index) {
|
|
1169
|
+
for (let i = 0; i < index; i += 3)
|
|
1170
|
+
if (this.actions[i] == action)
|
|
1171
|
+
return index;
|
|
1172
|
+
this.actions[index++] = action;
|
|
1173
|
+
this.actions[index++] = token;
|
|
1174
|
+
this.actions[index++] = end;
|
|
1175
|
+
return index;
|
|
1176
|
+
}
|
|
1177
|
+
addActions(stack, token, end, index) {
|
|
1178
|
+
let { state } = stack, { parser: parser2 } = stack.p, { data } = parser2;
|
|
1179
|
+
for (let set = 0; set < 2; set++) {
|
|
1180
|
+
for (let i = parser2.stateSlot(
|
|
1181
|
+
state,
|
|
1182
|
+
set ? 2 : 1
|
|
1183
|
+
/* ParseState.Actions */
|
|
1184
|
+
); ; i += 3) {
|
|
1185
|
+
if (data[i] == 65535) {
|
|
1186
|
+
if (data[i + 1] == 1) {
|
|
1187
|
+
i = pair(data, i + 2);
|
|
1188
|
+
} else {
|
|
1189
|
+
if (index == 0 && data[i + 1] == 2)
|
|
1190
|
+
index = this.putAction(pair(data, i + 2), token, end, index);
|
|
1191
|
+
break;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
if (data[i] == token)
|
|
1195
|
+
index = this.putAction(pair(data, i + 1), token, end, index);
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
return index;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
class Parse {
|
|
1202
|
+
constructor(parser2, input, fragments, ranges) {
|
|
1203
|
+
this.parser = parser2;
|
|
1204
|
+
this.input = input;
|
|
1205
|
+
this.ranges = ranges;
|
|
1206
|
+
this.recovering = 0;
|
|
1207
|
+
this.nextStackID = 9812;
|
|
1208
|
+
this.minStackPos = 0;
|
|
1209
|
+
this.reused = [];
|
|
1210
|
+
this.stoppedAt = null;
|
|
1211
|
+
this.lastBigReductionStart = -1;
|
|
1212
|
+
this.lastBigReductionSize = 0;
|
|
1213
|
+
this.bigReductionCount = 0;
|
|
1214
|
+
this.stream = new InputStream(input, ranges);
|
|
1215
|
+
this.tokens = new TokenCache(parser2, this.stream);
|
|
1216
|
+
this.topTerm = parser2.top[1];
|
|
1217
|
+
let { from } = ranges[0];
|
|
1218
|
+
this.stacks = [Stack.start(this, parser2.top[0], from)];
|
|
1219
|
+
this.fragments = fragments.length && this.stream.end - from > parser2.bufferLength * 4 ? new FragmentCursor(fragments, parser2.nodeSet) : null;
|
|
1220
|
+
}
|
|
1221
|
+
get parsedPos() {
|
|
1222
|
+
return this.minStackPos;
|
|
1223
|
+
}
|
|
1224
|
+
// Move the parser forward. This will process all parse stacks at
|
|
1225
|
+
// `this.pos` and try to advance them to a further position. If no
|
|
1226
|
+
// stack for such a position is found, it'll start error-recovery.
|
|
1227
|
+
//
|
|
1228
|
+
// When the parse is finished, this will return a syntax tree. When
|
|
1229
|
+
// not, it returns `null`.
|
|
1230
|
+
advance() {
|
|
1231
|
+
let stacks = this.stacks, pos = this.minStackPos;
|
|
1232
|
+
let newStacks = this.stacks = [];
|
|
1233
|
+
let stopped, stoppedTokens;
|
|
1234
|
+
if (this.bigReductionCount > 300 && stacks.length == 1) {
|
|
1235
|
+
let [s] = stacks;
|
|
1236
|
+
while (s.forceReduce() && s.stack.length && s.stack[s.stack.length - 2] >= this.lastBigReductionStart) {
|
|
1237
|
+
}
|
|
1238
|
+
this.bigReductionCount = this.lastBigReductionSize = 0;
|
|
1239
|
+
}
|
|
1240
|
+
for (let i = 0; i < stacks.length; i++) {
|
|
1241
|
+
let stack = stacks[i];
|
|
1242
|
+
for (; ; ) {
|
|
1243
|
+
this.tokens.mainToken = null;
|
|
1244
|
+
if (stack.pos > pos) {
|
|
1245
|
+
newStacks.push(stack);
|
|
1246
|
+
} else if (this.advanceStack(stack, newStacks, stacks)) {
|
|
1247
|
+
continue;
|
|
1248
|
+
} else {
|
|
1249
|
+
if (!stopped) {
|
|
1250
|
+
stopped = [];
|
|
1251
|
+
stoppedTokens = [];
|
|
1252
|
+
}
|
|
1253
|
+
stopped.push(stack);
|
|
1254
|
+
let tok = this.tokens.getMainToken(stack);
|
|
1255
|
+
stoppedTokens.push(tok.value, tok.end);
|
|
1256
|
+
}
|
|
1257
|
+
break;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
if (!newStacks.length) {
|
|
1261
|
+
let finished = stopped && findFinished(stopped);
|
|
1262
|
+
if (finished) {
|
|
1263
|
+
if (verbose)
|
|
1264
|
+
console.log("Finish with " + this.stackID(finished));
|
|
1265
|
+
return this.stackToTree(finished);
|
|
1266
|
+
}
|
|
1267
|
+
if (this.parser.strict) {
|
|
1268
|
+
if (verbose && stopped)
|
|
1269
|
+
console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none"));
|
|
1270
|
+
throw new SyntaxError("No parse at " + pos);
|
|
1271
|
+
}
|
|
1272
|
+
if (!this.recovering)
|
|
1273
|
+
this.recovering = 5;
|
|
1274
|
+
}
|
|
1275
|
+
if (this.recovering && stopped) {
|
|
1276
|
+
let finished = this.stoppedAt != null && stopped[0].pos > this.stoppedAt ? stopped[0] : this.runRecovery(stopped, stoppedTokens, newStacks);
|
|
1277
|
+
if (finished) {
|
|
1278
|
+
if (verbose)
|
|
1279
|
+
console.log("Force-finish " + this.stackID(finished));
|
|
1280
|
+
return this.stackToTree(finished.forceAll());
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
if (this.recovering) {
|
|
1284
|
+
let maxRemaining = this.recovering == 1 ? 1 : this.recovering * 3;
|
|
1285
|
+
if (newStacks.length > maxRemaining) {
|
|
1286
|
+
newStacks.sort((a, b) => b.score - a.score);
|
|
1287
|
+
while (newStacks.length > maxRemaining)
|
|
1288
|
+
newStacks.pop();
|
|
1289
|
+
}
|
|
1290
|
+
if (newStacks.some((s) => s.reducePos > pos))
|
|
1291
|
+
this.recovering--;
|
|
1292
|
+
} else if (newStacks.length > 1) {
|
|
1293
|
+
outer:
|
|
1294
|
+
for (let i = 0; i < newStacks.length - 1; i++) {
|
|
1295
|
+
let stack = newStacks[i];
|
|
1296
|
+
for (let j = i + 1; j < newStacks.length; j++) {
|
|
1297
|
+
let other = newStacks[j];
|
|
1298
|
+
if (stack.sameState(other) || stack.buffer.length > 500 && other.buffer.length > 500) {
|
|
1299
|
+
if ((stack.score - other.score || stack.buffer.length - other.buffer.length) > 0) {
|
|
1300
|
+
newStacks.splice(j--, 1);
|
|
1301
|
+
} else {
|
|
1302
|
+
newStacks.splice(i--, 1);
|
|
1303
|
+
continue outer;
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
if (newStacks.length > 12)
|
|
1309
|
+
newStacks.splice(
|
|
1310
|
+
12,
|
|
1311
|
+
newStacks.length - 12
|
|
1312
|
+
/* Rec.MaxStackCount */
|
|
1313
|
+
);
|
|
1314
|
+
}
|
|
1315
|
+
this.minStackPos = newStacks[0].pos;
|
|
1316
|
+
for (let i = 1; i < newStacks.length; i++)
|
|
1317
|
+
if (newStacks[i].pos < this.minStackPos)
|
|
1318
|
+
this.minStackPos = newStacks[i].pos;
|
|
1319
|
+
return null;
|
|
1320
|
+
}
|
|
1321
|
+
stopAt(pos) {
|
|
1322
|
+
if (this.stoppedAt != null && this.stoppedAt < pos)
|
|
1323
|
+
throw new RangeError("Can't move stoppedAt forward");
|
|
1324
|
+
this.stoppedAt = pos;
|
|
1325
|
+
}
|
|
1326
|
+
// Returns an updated version of the given stack, or null if the
|
|
1327
|
+
// stack can't advance normally. When `split` and `stacks` are
|
|
1328
|
+
// given, stacks split off by ambiguous operations will be pushed to
|
|
1329
|
+
// `split`, or added to `stacks` if they move `pos` forward.
|
|
1330
|
+
advanceStack(stack, stacks, split) {
|
|
1331
|
+
let start = stack.pos, { parser: parser2 } = this;
|
|
1332
|
+
let base = verbose ? this.stackID(stack) + " -> " : "";
|
|
1333
|
+
if (this.stoppedAt != null && start > this.stoppedAt)
|
|
1334
|
+
return stack.forceReduce() ? stack : null;
|
|
1335
|
+
if (this.fragments) {
|
|
1336
|
+
let strictCx = stack.curContext && stack.curContext.tracker.strict, cxHash = strictCx ? stack.curContext.hash : 0;
|
|
1337
|
+
for (let cached = this.fragments.nodeAt(start); cached; ) {
|
|
1338
|
+
let match = this.parser.nodeSet.types[cached.type.id] == cached.type ? parser2.getGoto(stack.state, cached.type.id) : -1;
|
|
1339
|
+
if (match > -1 && cached.length && (!strictCx || (cached.prop(NodeProp.contextHash) || 0) == cxHash)) {
|
|
1340
|
+
stack.useNode(cached, match);
|
|
1341
|
+
if (verbose)
|
|
1342
|
+
console.log(base + this.stackID(stack) + ` (via reuse of ${parser2.getName(cached.type.id)})`);
|
|
1343
|
+
return true;
|
|
1344
|
+
}
|
|
1345
|
+
if (!(cached instanceof Tree) || cached.children.length == 0 || cached.positions[0] > 0)
|
|
1346
|
+
break;
|
|
1347
|
+
let inner = cached.children[0];
|
|
1348
|
+
if (inner instanceof Tree && cached.positions[0] == 0)
|
|
1349
|
+
cached = inner;
|
|
1350
|
+
else
|
|
1351
|
+
break;
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
let defaultReduce = parser2.stateSlot(
|
|
1355
|
+
stack.state,
|
|
1356
|
+
4
|
|
1357
|
+
/* ParseState.DefaultReduce */
|
|
1358
|
+
);
|
|
1359
|
+
if (defaultReduce > 0) {
|
|
1360
|
+
stack.reduce(defaultReduce);
|
|
1361
|
+
if (verbose)
|
|
1362
|
+
console.log(base + this.stackID(stack) + ` (via always-reduce ${parser2.getName(
|
|
1363
|
+
defaultReduce & 65535
|
|
1364
|
+
/* Action.ValueMask */
|
|
1365
|
+
)})`);
|
|
1366
|
+
return true;
|
|
1367
|
+
}
|
|
1368
|
+
if (stack.stack.length >= 8400) {
|
|
1369
|
+
while (stack.stack.length > 6e3 && stack.forceReduce()) {
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
let actions = this.tokens.getActions(stack);
|
|
1373
|
+
for (let i = 0; i < actions.length; ) {
|
|
1374
|
+
let action = actions[i++], term = actions[i++], end = actions[i++];
|
|
1375
|
+
let last = i == actions.length || !split;
|
|
1376
|
+
let localStack = last ? stack : stack.split();
|
|
1377
|
+
let main = this.tokens.mainToken;
|
|
1378
|
+
localStack.apply(action, term, main ? main.start : localStack.pos, end);
|
|
1379
|
+
if (verbose)
|
|
1380
|
+
console.log(base + this.stackID(localStack) + ` (via ${(action & 65536) == 0 ? "shift" : `reduce of ${parser2.getName(
|
|
1381
|
+
action & 65535
|
|
1382
|
+
/* Action.ValueMask */
|
|
1383
|
+
)}`} for ${parser2.getName(term)} @ ${start}${localStack == stack ? "" : ", split"})`);
|
|
1384
|
+
if (last)
|
|
1385
|
+
return true;
|
|
1386
|
+
else if (localStack.pos > start)
|
|
1387
|
+
stacks.push(localStack);
|
|
1388
|
+
else
|
|
1389
|
+
split.push(localStack);
|
|
1390
|
+
}
|
|
1391
|
+
return false;
|
|
1392
|
+
}
|
|
1393
|
+
// Advance a given stack forward as far as it will go. Returns the
|
|
1394
|
+
// (possibly updated) stack if it got stuck, or null if it moved
|
|
1395
|
+
// forward and was given to `pushStackDedup`.
|
|
1396
|
+
advanceFully(stack, newStacks) {
|
|
1397
|
+
let pos = stack.pos;
|
|
1398
|
+
for (; ; ) {
|
|
1399
|
+
if (!this.advanceStack(stack, null, null))
|
|
1400
|
+
return false;
|
|
1401
|
+
if (stack.pos > pos) {
|
|
1402
|
+
pushStackDedup(stack, newStacks);
|
|
1403
|
+
return true;
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
runRecovery(stacks, tokens, newStacks) {
|
|
1408
|
+
let finished = null, restarted = false;
|
|
1409
|
+
for (let i = 0; i < stacks.length; i++) {
|
|
1410
|
+
let stack = stacks[i], token = tokens[i << 1], tokenEnd = tokens[(i << 1) + 1];
|
|
1411
|
+
let base = verbose ? this.stackID(stack) + " -> " : "";
|
|
1412
|
+
if (stack.deadEnd) {
|
|
1413
|
+
if (restarted)
|
|
1414
|
+
continue;
|
|
1415
|
+
restarted = true;
|
|
1416
|
+
stack.restart();
|
|
1417
|
+
if (verbose)
|
|
1418
|
+
console.log(base + this.stackID(stack) + " (restarted)");
|
|
1419
|
+
let done = this.advanceFully(stack, newStacks);
|
|
1420
|
+
if (done)
|
|
1421
|
+
continue;
|
|
1422
|
+
}
|
|
1423
|
+
let force = stack.split(), forceBase = base;
|
|
1424
|
+
for (let j = 0; force.forceReduce() && j < 10; j++) {
|
|
1425
|
+
if (verbose)
|
|
1426
|
+
console.log(forceBase + this.stackID(force) + " (via force-reduce)");
|
|
1427
|
+
let done = this.advanceFully(force, newStacks);
|
|
1428
|
+
if (done)
|
|
1429
|
+
break;
|
|
1430
|
+
if (verbose)
|
|
1431
|
+
forceBase = this.stackID(force) + " -> ";
|
|
1432
|
+
}
|
|
1433
|
+
for (let insert of stack.recoverByInsert(token)) {
|
|
1434
|
+
if (verbose)
|
|
1435
|
+
console.log(base + this.stackID(insert) + " (via recover-insert)");
|
|
1436
|
+
this.advanceFully(insert, newStacks);
|
|
1437
|
+
}
|
|
1438
|
+
if (this.stream.end > stack.pos) {
|
|
1439
|
+
if (tokenEnd == stack.pos) {
|
|
1440
|
+
tokenEnd++;
|
|
1441
|
+
token = 0;
|
|
1442
|
+
}
|
|
1443
|
+
stack.recoverByDelete(token, tokenEnd);
|
|
1444
|
+
if (verbose)
|
|
1445
|
+
console.log(base + this.stackID(stack) + ` (via recover-delete ${this.parser.getName(token)})`);
|
|
1446
|
+
pushStackDedup(stack, newStacks);
|
|
1447
|
+
} else if (!finished || finished.score < stack.score) {
|
|
1448
|
+
finished = stack;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
return finished;
|
|
1452
|
+
}
|
|
1453
|
+
// Convert the stack's buffer to a syntax tree.
|
|
1454
|
+
stackToTree(stack) {
|
|
1455
|
+
stack.close();
|
|
1456
|
+
return Tree.build({
|
|
1457
|
+
buffer: StackBufferCursor.create(stack),
|
|
1458
|
+
nodeSet: this.parser.nodeSet,
|
|
1459
|
+
topID: this.topTerm,
|
|
1460
|
+
maxBufferLength: this.parser.bufferLength,
|
|
1461
|
+
reused: this.reused,
|
|
1462
|
+
start: this.ranges[0].from,
|
|
1463
|
+
length: stack.pos - this.ranges[0].from,
|
|
1464
|
+
minRepeatType: this.parser.minRepeatTerm
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
stackID(stack) {
|
|
1468
|
+
let id2 = (stackIDs || (stackIDs = /* @__PURE__ */ new WeakMap())).get(stack);
|
|
1469
|
+
if (!id2)
|
|
1470
|
+
stackIDs.set(stack, id2 = String.fromCodePoint(this.nextStackID++));
|
|
1471
|
+
return id2 + stack;
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
function pushStackDedup(stack, newStacks) {
|
|
1475
|
+
for (let i = 0; i < newStacks.length; i++) {
|
|
1476
|
+
let other = newStacks[i];
|
|
1477
|
+
if (other.pos == stack.pos && other.sameState(stack)) {
|
|
1478
|
+
if (newStacks[i].score < stack.score)
|
|
1479
|
+
newStacks[i] = stack;
|
|
1480
|
+
return;
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
newStacks.push(stack);
|
|
1484
|
+
}
|
|
1485
|
+
class Dialect {
|
|
1486
|
+
constructor(source, flags, disabled) {
|
|
1487
|
+
this.source = source;
|
|
1488
|
+
this.flags = flags;
|
|
1489
|
+
this.disabled = disabled;
|
|
1490
|
+
}
|
|
1491
|
+
allows(term) {
|
|
1492
|
+
return !this.disabled || this.disabled[term] == 0;
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
const id = (x) => x;
|
|
1496
|
+
class ContextTracker {
|
|
1497
|
+
/**
|
|
1498
|
+
Define a context tracker.
|
|
1499
|
+
*/
|
|
1500
|
+
constructor(spec) {
|
|
1501
|
+
this.start = spec.start;
|
|
1502
|
+
this.shift = spec.shift || id;
|
|
1503
|
+
this.reduce = spec.reduce || id;
|
|
1504
|
+
this.reuse = spec.reuse || id;
|
|
1505
|
+
this.hash = spec.hash || (() => 0);
|
|
1506
|
+
this.strict = spec.strict !== false;
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
class LRParser extends Parser {
|
|
1510
|
+
/**
|
|
1511
|
+
@internal
|
|
1512
|
+
*/
|
|
1513
|
+
constructor(spec) {
|
|
1514
|
+
super();
|
|
1515
|
+
this.wrappers = [];
|
|
1516
|
+
if (spec.version != 14)
|
|
1517
|
+
throw new RangeError(`Parser version (${spec.version}) doesn't match runtime version (${14})`);
|
|
1518
|
+
let nodeNames = spec.nodeNames.split(" ");
|
|
1519
|
+
this.minRepeatTerm = nodeNames.length;
|
|
1520
|
+
for (let i = 0; i < spec.repeatNodeCount; i++)
|
|
1521
|
+
nodeNames.push("");
|
|
1522
|
+
let topTerms = Object.keys(spec.topRules).map((r) => spec.topRules[r][1]);
|
|
1523
|
+
let nodeProps = [];
|
|
1524
|
+
for (let i = 0; i < nodeNames.length; i++)
|
|
1525
|
+
nodeProps.push([]);
|
|
1526
|
+
function setProp(nodeID, prop, value) {
|
|
1527
|
+
nodeProps[nodeID].push([prop, prop.deserialize(String(value))]);
|
|
1528
|
+
}
|
|
1529
|
+
if (spec.nodeProps)
|
|
1530
|
+
for (let propSpec of spec.nodeProps) {
|
|
1531
|
+
let prop = propSpec[0];
|
|
1532
|
+
if (typeof prop == "string")
|
|
1533
|
+
prop = NodeProp[prop];
|
|
1534
|
+
for (let i = 1; i < propSpec.length; ) {
|
|
1535
|
+
let next = propSpec[i++];
|
|
1536
|
+
if (next >= 0) {
|
|
1537
|
+
setProp(next, prop, propSpec[i++]);
|
|
1538
|
+
} else {
|
|
1539
|
+
let value = propSpec[i + -next];
|
|
1540
|
+
for (let j = -next; j > 0; j--)
|
|
1541
|
+
setProp(propSpec[i++], prop, value);
|
|
1542
|
+
i++;
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
this.nodeSet = new NodeSet(nodeNames.map((name, i) => NodeType.define({
|
|
1547
|
+
name: i >= this.minRepeatTerm ? void 0 : name,
|
|
1548
|
+
id: i,
|
|
1549
|
+
props: nodeProps[i],
|
|
1550
|
+
top: topTerms.indexOf(i) > -1,
|
|
1551
|
+
error: i == 0,
|
|
1552
|
+
skipped: spec.skippedNodes && spec.skippedNodes.indexOf(i) > -1
|
|
1553
|
+
})));
|
|
1554
|
+
if (spec.propSources)
|
|
1555
|
+
this.nodeSet = this.nodeSet.extend(...spec.propSources);
|
|
1556
|
+
this.strict = false;
|
|
1557
|
+
this.bufferLength = DefaultBufferLength;
|
|
1558
|
+
let tokenArray = decodeArray(spec.tokenData);
|
|
1559
|
+
this.context = spec.context;
|
|
1560
|
+
this.specializerSpecs = spec.specialized || [];
|
|
1561
|
+
this.specialized = new Uint16Array(this.specializerSpecs.length);
|
|
1562
|
+
for (let i = 0; i < this.specializerSpecs.length; i++)
|
|
1563
|
+
this.specialized[i] = this.specializerSpecs[i].term;
|
|
1564
|
+
this.specializers = this.specializerSpecs.map(getSpecializer);
|
|
1565
|
+
this.states = decodeArray(spec.states, Uint32Array);
|
|
1566
|
+
this.data = decodeArray(spec.stateData);
|
|
1567
|
+
this.goto = decodeArray(spec.goto);
|
|
1568
|
+
this.maxTerm = spec.maxTerm;
|
|
1569
|
+
this.tokenizers = spec.tokenizers.map((value) => typeof value == "number" ? new TokenGroup(tokenArray, value) : value);
|
|
1570
|
+
this.topRules = spec.topRules;
|
|
1571
|
+
this.dialects = spec.dialects || {};
|
|
1572
|
+
this.dynamicPrecedences = spec.dynamicPrecedences || null;
|
|
1573
|
+
this.tokenPrecTable = spec.tokenPrec;
|
|
1574
|
+
this.termNames = spec.termNames || null;
|
|
1575
|
+
this.maxNode = this.nodeSet.types.length - 1;
|
|
1576
|
+
this.dialect = this.parseDialect();
|
|
1577
|
+
this.top = this.topRules[Object.keys(this.topRules)[0]];
|
|
1578
|
+
}
|
|
1579
|
+
createParse(input, fragments, ranges) {
|
|
1580
|
+
let parse = new Parse(this, input, fragments, ranges);
|
|
1581
|
+
for (let w of this.wrappers)
|
|
1582
|
+
parse = w(parse, input, fragments, ranges);
|
|
1583
|
+
return parse;
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
Get a goto table entry @internal
|
|
1587
|
+
*/
|
|
1588
|
+
getGoto(state, term, loose = false) {
|
|
1589
|
+
let table = this.goto;
|
|
1590
|
+
if (term >= table[0])
|
|
1591
|
+
return -1;
|
|
1592
|
+
for (let pos = table[term + 1]; ; ) {
|
|
1593
|
+
let groupTag = table[pos++], last = groupTag & 1;
|
|
1594
|
+
let target = table[pos++];
|
|
1595
|
+
if (last && loose)
|
|
1596
|
+
return target;
|
|
1597
|
+
for (let end = pos + (groupTag >> 1); pos < end; pos++)
|
|
1598
|
+
if (table[pos] == state)
|
|
1599
|
+
return target;
|
|
1600
|
+
if (last)
|
|
1601
|
+
return -1;
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
/**
|
|
1605
|
+
Check if this state has an action for a given terminal @internal
|
|
1606
|
+
*/
|
|
1607
|
+
hasAction(state, terminal) {
|
|
1608
|
+
let data = this.data;
|
|
1609
|
+
for (let set = 0; set < 2; set++) {
|
|
1610
|
+
for (let i = this.stateSlot(
|
|
1611
|
+
state,
|
|
1612
|
+
set ? 2 : 1
|
|
1613
|
+
/* ParseState.Actions */
|
|
1614
|
+
), next; ; i += 3) {
|
|
1615
|
+
if ((next = data[i]) == 65535) {
|
|
1616
|
+
if (data[i + 1] == 1)
|
|
1617
|
+
next = data[i = pair(data, i + 2)];
|
|
1618
|
+
else if (data[i + 1] == 2)
|
|
1619
|
+
return pair(data, i + 2);
|
|
1620
|
+
else
|
|
1621
|
+
break;
|
|
1622
|
+
}
|
|
1623
|
+
if (next == terminal || next == 0)
|
|
1624
|
+
return pair(data, i + 1);
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
return 0;
|
|
1628
|
+
}
|
|
1629
|
+
/**
|
|
1630
|
+
@internal
|
|
1631
|
+
*/
|
|
1632
|
+
stateSlot(state, slot) {
|
|
1633
|
+
return this.states[state * 6 + slot];
|
|
1634
|
+
}
|
|
1635
|
+
/**
|
|
1636
|
+
@internal
|
|
1637
|
+
*/
|
|
1638
|
+
stateFlag(state, flag) {
|
|
1639
|
+
return (this.stateSlot(
|
|
1640
|
+
state,
|
|
1641
|
+
0
|
|
1642
|
+
/* ParseState.Flags */
|
|
1643
|
+
) & flag) > 0;
|
|
1644
|
+
}
|
|
1645
|
+
/**
|
|
1646
|
+
@internal
|
|
1647
|
+
*/
|
|
1648
|
+
validAction(state, action) {
|
|
1649
|
+
return !!this.allActions(state, (a) => a == action ? true : null);
|
|
1650
|
+
}
|
|
1651
|
+
/**
|
|
1652
|
+
@internal
|
|
1653
|
+
*/
|
|
1654
|
+
allActions(state, action) {
|
|
1655
|
+
let deflt = this.stateSlot(
|
|
1656
|
+
state,
|
|
1657
|
+
4
|
|
1658
|
+
/* ParseState.DefaultReduce */
|
|
1659
|
+
);
|
|
1660
|
+
let result = deflt ? action(deflt) : void 0;
|
|
1661
|
+
for (let i = this.stateSlot(
|
|
1662
|
+
state,
|
|
1663
|
+
1
|
|
1664
|
+
/* ParseState.Actions */
|
|
1665
|
+
); result == null; i += 3) {
|
|
1666
|
+
if (this.data[i] == 65535) {
|
|
1667
|
+
if (this.data[i + 1] == 1)
|
|
1668
|
+
i = pair(this.data, i + 2);
|
|
1669
|
+
else
|
|
1670
|
+
break;
|
|
1671
|
+
}
|
|
1672
|
+
result = action(pair(this.data, i + 1));
|
|
1673
|
+
}
|
|
1674
|
+
return result;
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
Get the states that can follow this one through shift actions or
|
|
1678
|
+
goto jumps. @internal
|
|
1679
|
+
*/
|
|
1680
|
+
nextStates(state) {
|
|
1681
|
+
let result = [];
|
|
1682
|
+
for (let i = this.stateSlot(
|
|
1683
|
+
state,
|
|
1684
|
+
1
|
|
1685
|
+
/* ParseState.Actions */
|
|
1686
|
+
); ; i += 3) {
|
|
1687
|
+
if (this.data[i] == 65535) {
|
|
1688
|
+
if (this.data[i + 1] == 1)
|
|
1689
|
+
i = pair(this.data, i + 2);
|
|
1690
|
+
else
|
|
1691
|
+
break;
|
|
1692
|
+
}
|
|
1693
|
+
if ((this.data[i + 2] & 65536 >> 16) == 0) {
|
|
1694
|
+
let value = this.data[i + 1];
|
|
1695
|
+
if (!result.some((v, i2) => i2 & 1 && v == value))
|
|
1696
|
+
result.push(this.data[i], value);
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
return result;
|
|
1700
|
+
}
|
|
1701
|
+
/**
|
|
1702
|
+
Configure the parser. Returns a new parser instance that has the
|
|
1703
|
+
given settings modified. Settings not provided in `config` are
|
|
1704
|
+
kept from the original parser.
|
|
1705
|
+
*/
|
|
1706
|
+
configure(config) {
|
|
1707
|
+
let copy = Object.assign(Object.create(LRParser.prototype), this);
|
|
1708
|
+
if (config.props)
|
|
1709
|
+
copy.nodeSet = this.nodeSet.extend(...config.props);
|
|
1710
|
+
if (config.top) {
|
|
1711
|
+
let info = this.topRules[config.top];
|
|
1712
|
+
if (!info)
|
|
1713
|
+
throw new RangeError(`Invalid top rule name ${config.top}`);
|
|
1714
|
+
copy.top = info;
|
|
1715
|
+
}
|
|
1716
|
+
if (config.tokenizers)
|
|
1717
|
+
copy.tokenizers = this.tokenizers.map((t) => {
|
|
1718
|
+
let found = config.tokenizers.find((r) => r.from == t);
|
|
1719
|
+
return found ? found.to : t;
|
|
1720
|
+
});
|
|
1721
|
+
if (config.specializers) {
|
|
1722
|
+
copy.specializers = this.specializers.slice();
|
|
1723
|
+
copy.specializerSpecs = this.specializerSpecs.map((s, i) => {
|
|
1724
|
+
let found = config.specializers.find((r) => r.from == s.external);
|
|
1725
|
+
if (!found)
|
|
1726
|
+
return s;
|
|
1727
|
+
let spec = Object.assign(Object.assign({}, s), { external: found.to });
|
|
1728
|
+
copy.specializers[i] = getSpecializer(spec);
|
|
1729
|
+
return spec;
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
if (config.contextTracker)
|
|
1733
|
+
copy.context = config.contextTracker;
|
|
1734
|
+
if (config.dialect)
|
|
1735
|
+
copy.dialect = this.parseDialect(config.dialect);
|
|
1736
|
+
if (config.strict != null)
|
|
1737
|
+
copy.strict = config.strict;
|
|
1738
|
+
if (config.wrap)
|
|
1739
|
+
copy.wrappers = copy.wrappers.concat(config.wrap);
|
|
1740
|
+
if (config.bufferLength != null)
|
|
1741
|
+
copy.bufferLength = config.bufferLength;
|
|
1742
|
+
return copy;
|
|
1743
|
+
}
|
|
1744
|
+
/**
|
|
1745
|
+
Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
|
|
1746
|
+
are registered for this parser.
|
|
1747
|
+
*/
|
|
1748
|
+
hasWrappers() {
|
|
1749
|
+
return this.wrappers.length > 0;
|
|
1750
|
+
}
|
|
1751
|
+
/**
|
|
1752
|
+
Returns the name associated with a given term. This will only
|
|
1753
|
+
work for all terms when the parser was generated with the
|
|
1754
|
+
`--names` option. By default, only the names of tagged terms are
|
|
1755
|
+
stored.
|
|
1756
|
+
*/
|
|
1757
|
+
getName(term) {
|
|
1758
|
+
return this.termNames ? this.termNames[term] : String(term <= this.maxNode && this.nodeSet.types[term].name || term);
|
|
1759
|
+
}
|
|
1760
|
+
/**
|
|
1761
|
+
The eof term id is always allocated directly after the node
|
|
1762
|
+
types. @internal
|
|
1763
|
+
*/
|
|
1764
|
+
get eofTerm() {
|
|
1765
|
+
return this.maxNode + 1;
|
|
1766
|
+
}
|
|
1767
|
+
/**
|
|
1768
|
+
The type of top node produced by the parser.
|
|
1769
|
+
*/
|
|
1770
|
+
get topNode() {
|
|
1771
|
+
return this.nodeSet.types[this.top[1]];
|
|
1772
|
+
}
|
|
1773
|
+
/**
|
|
1774
|
+
@internal
|
|
1775
|
+
*/
|
|
1776
|
+
dynamicPrecedence(term) {
|
|
1777
|
+
let prec = this.dynamicPrecedences;
|
|
1778
|
+
return prec == null ? 0 : prec[term] || 0;
|
|
1779
|
+
}
|
|
1780
|
+
/**
|
|
1781
|
+
@internal
|
|
1782
|
+
*/
|
|
1783
|
+
parseDialect(dialect) {
|
|
1784
|
+
let values = Object.keys(this.dialects), flags = values.map(() => false);
|
|
1785
|
+
if (dialect)
|
|
1786
|
+
for (let part of dialect.split(" ")) {
|
|
1787
|
+
let id2 = values.indexOf(part);
|
|
1788
|
+
if (id2 >= 0)
|
|
1789
|
+
flags[id2] = true;
|
|
1790
|
+
}
|
|
1791
|
+
let disabled = null;
|
|
1792
|
+
for (let i = 0; i < values.length; i++)
|
|
1793
|
+
if (!flags[i]) {
|
|
1794
|
+
for (let j = this.dialects[values[i]], id2; (id2 = this.data[j++]) != 65535; )
|
|
1795
|
+
(disabled || (disabled = new Uint8Array(this.maxTerm + 1)))[id2] = 1;
|
|
1796
|
+
}
|
|
1797
|
+
return new Dialect(dialect, flags, disabled);
|
|
1798
|
+
}
|
|
1799
|
+
/**
|
|
1800
|
+
Used by the output of the parser generator. Not available to
|
|
1801
|
+
user code. @hide
|
|
1802
|
+
*/
|
|
1803
|
+
static deserialize(spec) {
|
|
1804
|
+
return new LRParser(spec);
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
function pair(data, off) {
|
|
1808
|
+
return data[off] | data[off + 1] << 16;
|
|
1809
|
+
}
|
|
1810
|
+
function findFinished(stacks) {
|
|
1811
|
+
let best = null;
|
|
1812
|
+
for (let stack of stacks) {
|
|
1813
|
+
let stopped = stack.p.stoppedAt;
|
|
1814
|
+
if ((stack.pos == stack.p.stream.end || stopped != null && stack.pos > stopped) && stack.p.parser.stateFlag(
|
|
1815
|
+
stack.state,
|
|
1816
|
+
2
|
|
1817
|
+
/* StateFlag.Accepting */
|
|
1818
|
+
) && (!best || best.score < stack.score))
|
|
1819
|
+
best = stack;
|
|
1820
|
+
}
|
|
1821
|
+
return best;
|
|
1822
|
+
}
|
|
1823
|
+
function getSpecializer(spec) {
|
|
1824
|
+
if (spec.external) {
|
|
1825
|
+
let mask = spec.extend ? 1 : 0;
|
|
1826
|
+
return (value, stack) => spec.external(value, stack) << 1 | mask;
|
|
1827
|
+
}
|
|
1828
|
+
return spec.get;
|
|
1829
|
+
}
|
|
1830
|
+
const printKeyword = 1, indent = 194, dedent = 195, newline$1 = 196, blankLineStart = 197, newlineBracketed = 198, eof = 199, stringContent = 200, Escape = 2, replacementStart = 3, stringEnd = 201, ParenL = 24, ParenthesizedExpression = 25, TupleExpression = 49, ComprehensionExpression = 50, BracketL = 55, ArrayExpression = 56, ArrayComprehensionExpression = 57, BraceL = 59, DictionaryExpression = 60, DictionaryComprehensionExpression = 61, SetExpression = 62, SetComprehensionExpression = 63, ArgList = 65, subscript = 238, String$1 = 71, stringStart = 241, stringStartD = 242, stringStartL = 243, stringStartLD = 244, stringStartR = 245, stringStartRD = 246, stringStartRL = 247, stringStartRLD = 248, FormatString = 72, stringStartF = 249, stringStartFD = 250, stringStartFL = 251, stringStartFLD = 252, stringStartFR = 253, stringStartFRD = 254, stringStartFRL = 255, stringStartFRLD = 256, FormatReplacement = 73, nestedFormatReplacement = 77, importList = 263, TypeParamList = 112, ParamList = 130, SequencePattern = 151, MappingPattern = 152, PatternArgList = 155;
|
|
1831
|
+
const newline = 10, carriageReturn = 13, space = 32, tab = 9, hash = 35, parenOpen = 40, dot = 46, braceOpen = 123, braceClose = 125, singleQuote = 39, doubleQuote = 34, backslash = 92, letter_o = 111, letter_x = 120, letter_N = 78, letter_u = 117, letter_U = 85;
|
|
1832
|
+
const bracketed = /* @__PURE__ */ new Set([
|
|
1833
|
+
ParenthesizedExpression,
|
|
1834
|
+
TupleExpression,
|
|
1835
|
+
ComprehensionExpression,
|
|
1836
|
+
importList,
|
|
1837
|
+
ArgList,
|
|
1838
|
+
ParamList,
|
|
1839
|
+
ArrayExpression,
|
|
1840
|
+
ArrayComprehensionExpression,
|
|
1841
|
+
subscript,
|
|
1842
|
+
SetExpression,
|
|
1843
|
+
SetComprehensionExpression,
|
|
1844
|
+
FormatString,
|
|
1845
|
+
FormatReplacement,
|
|
1846
|
+
nestedFormatReplacement,
|
|
1847
|
+
DictionaryExpression,
|
|
1848
|
+
DictionaryComprehensionExpression,
|
|
1849
|
+
SequencePattern,
|
|
1850
|
+
MappingPattern,
|
|
1851
|
+
PatternArgList,
|
|
1852
|
+
TypeParamList
|
|
1853
|
+
]);
|
|
1854
|
+
function isLineBreak(ch) {
|
|
1855
|
+
return ch == newline || ch == carriageReturn;
|
|
1856
|
+
}
|
|
1857
|
+
function isHex(ch) {
|
|
1858
|
+
return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
|
|
1859
|
+
}
|
|
1860
|
+
const newlines = new ExternalTokenizer((input, stack) => {
|
|
1861
|
+
let prev;
|
|
1862
|
+
if (input.next < 0) {
|
|
1863
|
+
input.acceptToken(eof);
|
|
1864
|
+
} else if (stack.context.flags & cx_Bracketed) {
|
|
1865
|
+
if (isLineBreak(input.next))
|
|
1866
|
+
input.acceptToken(newlineBracketed, 1);
|
|
1867
|
+
} else if (((prev = input.peek(-1)) < 0 || isLineBreak(prev)) && stack.canShift(blankLineStart)) {
|
|
1868
|
+
let spaces = 0;
|
|
1869
|
+
while (input.next == space || input.next == tab) {
|
|
1870
|
+
input.advance();
|
|
1871
|
+
spaces++;
|
|
1872
|
+
}
|
|
1873
|
+
if (input.next == newline || input.next == carriageReturn || input.next == hash)
|
|
1874
|
+
input.acceptToken(blankLineStart, -spaces);
|
|
1875
|
+
} else if (isLineBreak(input.next)) {
|
|
1876
|
+
input.acceptToken(newline$1, 1);
|
|
1877
|
+
}
|
|
1878
|
+
}, { contextual: true });
|
|
1879
|
+
const indentation = new ExternalTokenizer((input, stack) => {
|
|
1880
|
+
let context = stack.context;
|
|
1881
|
+
if (context.flags)
|
|
1882
|
+
return;
|
|
1883
|
+
let prev = input.peek(-1);
|
|
1884
|
+
if (prev == newline || prev == carriageReturn) {
|
|
1885
|
+
let depth = 0, chars = 0;
|
|
1886
|
+
for (; ; ) {
|
|
1887
|
+
if (input.next == space)
|
|
1888
|
+
depth++;
|
|
1889
|
+
else if (input.next == tab)
|
|
1890
|
+
depth += 8 - depth % 8;
|
|
1891
|
+
else
|
|
1892
|
+
break;
|
|
1893
|
+
input.advance();
|
|
1894
|
+
chars++;
|
|
1895
|
+
}
|
|
1896
|
+
if (depth != context.indent && input.next != newline && input.next != carriageReturn && input.next != hash) {
|
|
1897
|
+
if (depth < context.indent)
|
|
1898
|
+
input.acceptToken(dedent, -chars);
|
|
1899
|
+
else
|
|
1900
|
+
input.acceptToken(indent);
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
});
|
|
1904
|
+
const cx_Bracketed = 1, cx_String = 2, cx_DoubleQuote = 4, cx_Long = 8, cx_Raw = 16, cx_Format = 32;
|
|
1905
|
+
function Context(parent, indent2, flags) {
|
|
1906
|
+
this.parent = parent;
|
|
1907
|
+
this.indent = indent2;
|
|
1908
|
+
this.flags = flags;
|
|
1909
|
+
this.hash = (parent ? parent.hash + parent.hash << 8 : 0) + indent2 + (indent2 << 4) + flags + (flags << 6);
|
|
1910
|
+
}
|
|
1911
|
+
const topIndent = new Context(null, 0, 0);
|
|
1912
|
+
function countIndent(space2) {
|
|
1913
|
+
let depth = 0;
|
|
1914
|
+
for (let i = 0; i < space2.length; i++)
|
|
1915
|
+
depth += space2.charCodeAt(i) == tab ? 8 - depth % 8 : 1;
|
|
1916
|
+
return depth;
|
|
1917
|
+
}
|
|
1918
|
+
const stringFlags = new Map([
|
|
1919
|
+
[stringStart, 0],
|
|
1920
|
+
[stringStartD, cx_DoubleQuote],
|
|
1921
|
+
[stringStartL, cx_Long],
|
|
1922
|
+
[stringStartLD, cx_Long | cx_DoubleQuote],
|
|
1923
|
+
[stringStartR, cx_Raw],
|
|
1924
|
+
[stringStartRD, cx_Raw | cx_DoubleQuote],
|
|
1925
|
+
[stringStartRL, cx_Raw | cx_Long],
|
|
1926
|
+
[stringStartRLD, cx_Raw | cx_Long | cx_DoubleQuote],
|
|
1927
|
+
[stringStartF, cx_Format],
|
|
1928
|
+
[stringStartFD, cx_Format | cx_DoubleQuote],
|
|
1929
|
+
[stringStartFL, cx_Format | cx_Long],
|
|
1930
|
+
[stringStartFLD, cx_Format | cx_Long | cx_DoubleQuote],
|
|
1931
|
+
[stringStartFR, cx_Format | cx_Raw],
|
|
1932
|
+
[stringStartFRD, cx_Format | cx_Raw | cx_DoubleQuote],
|
|
1933
|
+
[stringStartFRL, cx_Format | cx_Raw | cx_Long],
|
|
1934
|
+
[stringStartFRLD, cx_Format | cx_Raw | cx_Long | cx_DoubleQuote]
|
|
1935
|
+
].map(([term, flags]) => [term, flags | cx_String]));
|
|
1936
|
+
const trackIndent = new ContextTracker({
|
|
1937
|
+
start: topIndent,
|
|
1938
|
+
reduce(context, term, _, input) {
|
|
1939
|
+
if (context.flags & cx_Bracketed && bracketed.has(term) || (term == String$1 || term == FormatString) && context.flags & cx_String)
|
|
1940
|
+
return context.parent;
|
|
1941
|
+
return context;
|
|
1942
|
+
},
|
|
1943
|
+
shift(context, term, stack, input) {
|
|
1944
|
+
if (term == indent)
|
|
1945
|
+
return new Context(context, countIndent(input.read(input.pos, stack.pos)), 0);
|
|
1946
|
+
if (term == dedent)
|
|
1947
|
+
return context.parent;
|
|
1948
|
+
if (term == ParenL || term == BracketL || term == BraceL || term == replacementStart)
|
|
1949
|
+
return new Context(context, 0, cx_Bracketed);
|
|
1950
|
+
if (stringFlags.has(term))
|
|
1951
|
+
return new Context(context, 0, stringFlags.get(term) | context.flags & cx_Bracketed);
|
|
1952
|
+
return context;
|
|
1953
|
+
},
|
|
1954
|
+
hash(context) {
|
|
1955
|
+
return context.hash;
|
|
1956
|
+
}
|
|
1957
|
+
});
|
|
1958
|
+
const legacyPrint = new ExternalTokenizer((input) => {
|
|
1959
|
+
for (let i = 0; i < 5; i++) {
|
|
1960
|
+
if (input.next != "print".charCodeAt(i))
|
|
1961
|
+
return;
|
|
1962
|
+
input.advance();
|
|
1963
|
+
}
|
|
1964
|
+
if (/\w/.test(String.fromCharCode(input.next)))
|
|
1965
|
+
return;
|
|
1966
|
+
for (let off = 0; ; off++) {
|
|
1967
|
+
let next = input.peek(off);
|
|
1968
|
+
if (next == space || next == tab)
|
|
1969
|
+
continue;
|
|
1970
|
+
if (next != parenOpen && next != dot && next != newline && next != carriageReturn && next != hash)
|
|
1971
|
+
input.acceptToken(printKeyword);
|
|
1972
|
+
return;
|
|
1973
|
+
}
|
|
1974
|
+
});
|
|
1975
|
+
const strings = new ExternalTokenizer((input, stack) => {
|
|
1976
|
+
let { flags } = stack.context;
|
|
1977
|
+
let quote = flags & cx_DoubleQuote ? doubleQuote : singleQuote;
|
|
1978
|
+
let long = (flags & cx_Long) > 0;
|
|
1979
|
+
let escapes = !(flags & cx_Raw);
|
|
1980
|
+
let format = (flags & cx_Format) > 0;
|
|
1981
|
+
let start = input.pos;
|
|
1982
|
+
for (; ; ) {
|
|
1983
|
+
if (input.next < 0) {
|
|
1984
|
+
break;
|
|
1985
|
+
} else if (format && input.next == braceOpen) {
|
|
1986
|
+
if (input.peek(1) == braceOpen) {
|
|
1987
|
+
input.advance(2);
|
|
1988
|
+
} else {
|
|
1989
|
+
if (input.pos == start) {
|
|
1990
|
+
input.acceptToken(replacementStart, 1);
|
|
1991
|
+
return;
|
|
1992
|
+
}
|
|
1993
|
+
break;
|
|
1994
|
+
}
|
|
1995
|
+
} else if (escapes && input.next == backslash) {
|
|
1996
|
+
if (input.pos == start) {
|
|
1997
|
+
input.advance();
|
|
1998
|
+
let escaped = input.next;
|
|
1999
|
+
if (escaped >= 0) {
|
|
2000
|
+
input.advance();
|
|
2001
|
+
skipEscape(input, escaped);
|
|
2002
|
+
}
|
|
2003
|
+
input.acceptToken(Escape);
|
|
2004
|
+
return;
|
|
2005
|
+
}
|
|
2006
|
+
break;
|
|
2007
|
+
} else if (input.next == backslash && !escapes && input.peek(1) > -1) {
|
|
2008
|
+
input.advance(2);
|
|
2009
|
+
} else if (input.next == quote && (!long || input.peek(1) == quote && input.peek(2) == quote)) {
|
|
2010
|
+
if (input.pos == start) {
|
|
2011
|
+
input.acceptToken(stringEnd, long ? 3 : 1);
|
|
2012
|
+
return;
|
|
2013
|
+
}
|
|
2014
|
+
break;
|
|
2015
|
+
} else if (input.next == newline) {
|
|
2016
|
+
if (long) {
|
|
2017
|
+
input.advance();
|
|
2018
|
+
} else if (input.pos == start) {
|
|
2019
|
+
input.acceptToken(stringEnd);
|
|
2020
|
+
return;
|
|
2021
|
+
}
|
|
2022
|
+
break;
|
|
2023
|
+
} else {
|
|
2024
|
+
input.advance();
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
if (input.pos > start)
|
|
2028
|
+
input.acceptToken(stringContent);
|
|
2029
|
+
});
|
|
2030
|
+
function skipEscape(input, ch) {
|
|
2031
|
+
if (ch == letter_o) {
|
|
2032
|
+
for (let i = 0; i < 2 && input.next >= 48 && input.next <= 55; i++)
|
|
2033
|
+
input.advance();
|
|
2034
|
+
} else if (ch == letter_x) {
|
|
2035
|
+
for (let i = 0; i < 2 && isHex(input.next); i++)
|
|
2036
|
+
input.advance();
|
|
2037
|
+
} else if (ch == letter_u) {
|
|
2038
|
+
for (let i = 0; i < 4 && isHex(input.next); i++)
|
|
2039
|
+
input.advance();
|
|
2040
|
+
} else if (ch == letter_U) {
|
|
2041
|
+
for (let i = 0; i < 8 && isHex(input.next); i++)
|
|
2042
|
+
input.advance();
|
|
2043
|
+
} else if (ch == letter_N) {
|
|
2044
|
+
if (input.next == braceOpen) {
|
|
2045
|
+
input.advance();
|
|
2046
|
+
while (input.next >= 0 && input.next != braceClose && input.next != singleQuote && input.next != doubleQuote && input.next != newline)
|
|
2047
|
+
input.advance();
|
|
2048
|
+
if (input.next == braceClose)
|
|
2049
|
+
input.advance();
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
const pythonHighlighting = styleTags({
|
|
2054
|
+
'async "*" "**" FormatConversion FormatSpec': tags.modifier,
|
|
2055
|
+
"for while if elif else try except finally return raise break continue with pass assert await yield match case": tags.controlKeyword,
|
|
2056
|
+
"in not and or is del": tags.operatorKeyword,
|
|
2057
|
+
"from def class global nonlocal lambda": tags.definitionKeyword,
|
|
2058
|
+
import: tags.moduleKeyword,
|
|
2059
|
+
"with as print": tags.keyword,
|
|
2060
|
+
Boolean: tags.bool,
|
|
2061
|
+
None: tags.null,
|
|
2062
|
+
VariableName: tags.variableName,
|
|
2063
|
+
"CallExpression/VariableName": tags.function(tags.variableName),
|
|
2064
|
+
"FunctionDefinition/VariableName": tags.function(tags.definition(tags.variableName)),
|
|
2065
|
+
"ClassDefinition/VariableName": tags.definition(tags.className),
|
|
2066
|
+
PropertyName: tags.propertyName,
|
|
2067
|
+
"CallExpression/MemberExpression/PropertyName": tags.function(tags.propertyName),
|
|
2068
|
+
Comment: tags.lineComment,
|
|
2069
|
+
Number: tags.number,
|
|
2070
|
+
String: tags.string,
|
|
2071
|
+
FormatString: tags.special(tags.string),
|
|
2072
|
+
Escape: tags.escape,
|
|
2073
|
+
UpdateOp: tags.updateOperator,
|
|
2074
|
+
"ArithOp!": tags.arithmeticOperator,
|
|
2075
|
+
BitOp: tags.bitwiseOperator,
|
|
2076
|
+
CompareOp: tags.compareOperator,
|
|
2077
|
+
AssignOp: tags.definitionOperator,
|
|
2078
|
+
Ellipsis: tags.punctuation,
|
|
2079
|
+
At: tags.meta,
|
|
2080
|
+
"( )": tags.paren,
|
|
2081
|
+
"[ ]": tags.squareBracket,
|
|
2082
|
+
"{ }": tags.brace,
|
|
2083
|
+
".": tags.derefOperator,
|
|
2084
|
+
", ;": tags.separator
|
|
2085
|
+
});
|
|
2086
|
+
const spec_identifier = { __proto__: null, await: 44, or: 54, and: 56, in: 60, not: 62, is: 64, if: 70, else: 72, lambda: 76, yield: 94, from: 96, async: 102, for: 104, None: 162, True: 164, False: 164, del: 178, pass: 182, break: 186, continue: 190, return: 194, raise: 202, import: 206, as: 208, global: 212, nonlocal: 214, assert: 218, type: 223, elif: 236, while: 240, try: 246, except: 248, finally: 250, with: 254, def: 258, class: 268, match: 279, case: 285 };
|
|
2087
|
+
const parser = LRParser.deserialize({
|
|
2088
|
+
version: 14,
|
|
2089
|
+
states: "##jO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO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Names: "⚠ print Escape { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatSelfDoc FormatConversion FormatSpec FormatReplacement FormatSelfDoc ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",
|
|
2093
|
+
maxTerm: 277,
|
|
2094
|
+
context: trackIndent,
|
|
2095
|
+
nodeProps: [
|
|
2096
|
+
["isolate", -5, 4, 71, 72, 73, 77, ""],
|
|
2097
|
+
["group", -15, 6, 85, 87, 88, 90, 92, 94, 96, 98, 99, 100, 102, 105, 108, 110, "Statement Statement", -22, 8, 18, 21, 25, 40, 49, 50, 56, 57, 60, 61, 62, 63, 64, 67, 70, 71, 72, 79, 80, 81, 82, "Expression", -10, 114, 116, 119, 121, 122, 126, 128, 133, 135, 138, "Statement", -9, 143, 144, 147, 148, 150, 151, 152, 153, 154, "Pattern"],
|
|
2098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vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",
|
|
2105
|
+
tokenizers: [legacyPrint, indentation, newlines, strings, 0, 1, 2, 3, 4],
|
|
2106
|
+
topRules: { "Script": [0, 5] },
|
|
2107
|
+
specialized: [{ term: 221, get: (value) => spec_identifier[value] || -1 }],
|
|
2108
|
+
tokenPrec: 7668
|
|
2109
|
+
});
|
|
2110
|
+
const cache = /* @__PURE__ */ new NodeWeakMap();
|
|
2111
|
+
const ScopeNodes = /* @__PURE__ */ new Set([
|
|
2112
|
+
"Script",
|
|
2113
|
+
"Body",
|
|
2114
|
+
"FunctionDefinition",
|
|
2115
|
+
"ClassDefinition",
|
|
2116
|
+
"LambdaExpression",
|
|
2117
|
+
"ForStatement",
|
|
2118
|
+
"MatchClause"
|
|
2119
|
+
]);
|
|
2120
|
+
function defID(type) {
|
|
2121
|
+
return (node, def, outer) => {
|
|
2122
|
+
if (outer)
|
|
2123
|
+
return false;
|
|
2124
|
+
let id2 = node.node.getChild("VariableName");
|
|
2125
|
+
if (id2)
|
|
2126
|
+
def(id2, type);
|
|
2127
|
+
return true;
|
|
2128
|
+
};
|
|
2129
|
+
}
|
|
2130
|
+
const gatherCompletions = {
|
|
2131
|
+
FunctionDefinition: /* @__PURE__ */ defID("function"),
|
|
2132
|
+
ClassDefinition: /* @__PURE__ */ defID("class"),
|
|
2133
|
+
ForStatement(node, def, outer) {
|
|
2134
|
+
if (outer)
|
|
2135
|
+
for (let child = node.node.firstChild; child; child = child.nextSibling) {
|
|
2136
|
+
if (child.name == "VariableName")
|
|
2137
|
+
def(child, "variable");
|
|
2138
|
+
else if (child.name == "in")
|
|
2139
|
+
break;
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
ImportStatement(_node, def) {
|
|
2143
|
+
var _a, _b;
|
|
2144
|
+
let { node } = _node;
|
|
2145
|
+
let isFrom = ((_a = node.firstChild) === null || _a === void 0 ? void 0 : _a.name) == "from";
|
|
2146
|
+
for (let ch = node.getChild("import"); ch; ch = ch.nextSibling) {
|
|
2147
|
+
if (ch.name == "VariableName" && ((_b = ch.nextSibling) === null || _b === void 0 ? void 0 : _b.name) != "as")
|
|
2148
|
+
def(ch, isFrom ? "variable" : "namespace");
|
|
2149
|
+
}
|
|
2150
|
+
},
|
|
2151
|
+
AssignStatement(node, def) {
|
|
2152
|
+
for (let child = node.node.firstChild; child; child = child.nextSibling) {
|
|
2153
|
+
if (child.name == "VariableName")
|
|
2154
|
+
def(child, "variable");
|
|
2155
|
+
else if (child.name == ":" || child.name == "AssignOp")
|
|
2156
|
+
break;
|
|
2157
|
+
}
|
|
2158
|
+
},
|
|
2159
|
+
ParamList(node, def) {
|
|
2160
|
+
for (let prev = null, child = node.node.firstChild; child; child = child.nextSibling) {
|
|
2161
|
+
if (child.name == "VariableName" && (!prev || !/\*|AssignOp/.test(prev.name)))
|
|
2162
|
+
def(child, "variable");
|
|
2163
|
+
prev = child;
|
|
2164
|
+
}
|
|
2165
|
+
},
|
|
2166
|
+
CapturePattern: /* @__PURE__ */ defID("variable"),
|
|
2167
|
+
AsPattern: /* @__PURE__ */ defID("variable"),
|
|
2168
|
+
__proto__: null
|
|
2169
|
+
};
|
|
2170
|
+
function getScope(doc, node) {
|
|
2171
|
+
let cached = cache.get(node);
|
|
2172
|
+
if (cached)
|
|
2173
|
+
return cached;
|
|
2174
|
+
let completions = [], top = true;
|
|
2175
|
+
function def(node2, type) {
|
|
2176
|
+
let name = doc.sliceString(node2.from, node2.to);
|
|
2177
|
+
completions.push({ label: name, type });
|
|
2178
|
+
}
|
|
2179
|
+
node.cursor(IterMode.IncludeAnonymous).iterate((node2) => {
|
|
2180
|
+
if (node2.name) {
|
|
2181
|
+
let gather = gatherCompletions[node2.name];
|
|
2182
|
+
if (gather && gather(node2, def, top) || !top && ScopeNodes.has(node2.name))
|
|
2183
|
+
return false;
|
|
2184
|
+
top = false;
|
|
2185
|
+
} else if (node2.to - node2.from > 8192) {
|
|
2186
|
+
for (let c of getScope(doc, node2.node))
|
|
2187
|
+
completions.push(c);
|
|
2188
|
+
return false;
|
|
2189
|
+
}
|
|
2190
|
+
});
|
|
2191
|
+
cache.set(node, completions);
|
|
2192
|
+
return completions;
|
|
2193
|
+
}
|
|
2194
|
+
const Identifier = /^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/;
|
|
2195
|
+
const dontComplete = ["String", "FormatString", "Comment", "PropertyName"];
|
|
2196
|
+
function localCompletionSource(context) {
|
|
2197
|
+
let inner = syntaxTree(context.state).resolveInner(context.pos, -1);
|
|
2198
|
+
if (dontComplete.indexOf(inner.name) > -1)
|
|
2199
|
+
return null;
|
|
2200
|
+
let isWord = inner.name == "VariableName" || inner.to - inner.from < 20 && Identifier.test(context.state.sliceDoc(inner.from, inner.to));
|
|
2201
|
+
if (!isWord && !context.explicit)
|
|
2202
|
+
return null;
|
|
2203
|
+
let options = [];
|
|
2204
|
+
for (let pos = inner; pos; pos = pos.parent) {
|
|
2205
|
+
if (ScopeNodes.has(pos.name))
|
|
2206
|
+
options = options.concat(getScope(context.state.doc, pos));
|
|
2207
|
+
}
|
|
2208
|
+
return {
|
|
2209
|
+
options,
|
|
2210
|
+
from: isWord ? inner.from : context.pos,
|
|
2211
|
+
validFor: Identifier
|
|
2212
|
+
};
|
|
2213
|
+
}
|
|
2214
|
+
const globals = /* @__PURE__ */ [
|
|
2215
|
+
"__annotations__",
|
|
2216
|
+
"__builtins__",
|
|
2217
|
+
"__debug__",
|
|
2218
|
+
"__doc__",
|
|
2219
|
+
"__import__",
|
|
2220
|
+
"__name__",
|
|
2221
|
+
"__loader__",
|
|
2222
|
+
"__package__",
|
|
2223
|
+
"__spec__",
|
|
2224
|
+
"False",
|
|
2225
|
+
"None",
|
|
2226
|
+
"True"
|
|
2227
|
+
].map((n) => ({ label: n, type: "constant" })).concat(/* @__PURE__ */ [
|
|
2228
|
+
"ArithmeticError",
|
|
2229
|
+
"AssertionError",
|
|
2230
|
+
"AttributeError",
|
|
2231
|
+
"BaseException",
|
|
2232
|
+
"BlockingIOError",
|
|
2233
|
+
"BrokenPipeError",
|
|
2234
|
+
"BufferError",
|
|
2235
|
+
"BytesWarning",
|
|
2236
|
+
"ChildProcessError",
|
|
2237
|
+
"ConnectionAbortedError",
|
|
2238
|
+
"ConnectionError",
|
|
2239
|
+
"ConnectionRefusedError",
|
|
2240
|
+
"ConnectionResetError",
|
|
2241
|
+
"DeprecationWarning",
|
|
2242
|
+
"EOFError",
|
|
2243
|
+
"Ellipsis",
|
|
2244
|
+
"EncodingWarning",
|
|
2245
|
+
"EnvironmentError",
|
|
2246
|
+
"Exception",
|
|
2247
|
+
"FileExistsError",
|
|
2248
|
+
"FileNotFoundError",
|
|
2249
|
+
"FloatingPointError",
|
|
2250
|
+
"FutureWarning",
|
|
2251
|
+
"GeneratorExit",
|
|
2252
|
+
"IOError",
|
|
2253
|
+
"ImportError",
|
|
2254
|
+
"ImportWarning",
|
|
2255
|
+
"IndentationError",
|
|
2256
|
+
"IndexError",
|
|
2257
|
+
"InterruptedError",
|
|
2258
|
+
"IsADirectoryError",
|
|
2259
|
+
"KeyError",
|
|
2260
|
+
"KeyboardInterrupt",
|
|
2261
|
+
"LookupError",
|
|
2262
|
+
"MemoryError",
|
|
2263
|
+
"ModuleNotFoundError",
|
|
2264
|
+
"NameError",
|
|
2265
|
+
"NotADirectoryError",
|
|
2266
|
+
"NotImplemented",
|
|
2267
|
+
"NotImplementedError",
|
|
2268
|
+
"OSError",
|
|
2269
|
+
"OverflowError",
|
|
2270
|
+
"PendingDeprecationWarning",
|
|
2271
|
+
"PermissionError",
|
|
2272
|
+
"ProcessLookupError",
|
|
2273
|
+
"RecursionError",
|
|
2274
|
+
"ReferenceError",
|
|
2275
|
+
"ResourceWarning",
|
|
2276
|
+
"RuntimeError",
|
|
2277
|
+
"RuntimeWarning",
|
|
2278
|
+
"StopAsyncIteration",
|
|
2279
|
+
"StopIteration",
|
|
2280
|
+
"SyntaxError",
|
|
2281
|
+
"SyntaxWarning",
|
|
2282
|
+
"SystemError",
|
|
2283
|
+
"SystemExit",
|
|
2284
|
+
"TabError",
|
|
2285
|
+
"TimeoutError",
|
|
2286
|
+
"TypeError",
|
|
2287
|
+
"UnboundLocalError",
|
|
2288
|
+
"UnicodeDecodeError",
|
|
2289
|
+
"UnicodeEncodeError",
|
|
2290
|
+
"UnicodeError",
|
|
2291
|
+
"UnicodeTranslateError",
|
|
2292
|
+
"UnicodeWarning",
|
|
2293
|
+
"UserWarning",
|
|
2294
|
+
"ValueError",
|
|
2295
|
+
"Warning",
|
|
2296
|
+
"ZeroDivisionError"
|
|
2297
|
+
].map((n) => ({ label: n, type: "type" }))).concat(/* @__PURE__ */ [
|
|
2298
|
+
"bool",
|
|
2299
|
+
"bytearray",
|
|
2300
|
+
"bytes",
|
|
2301
|
+
"classmethod",
|
|
2302
|
+
"complex",
|
|
2303
|
+
"float",
|
|
2304
|
+
"frozenset",
|
|
2305
|
+
"int",
|
|
2306
|
+
"list",
|
|
2307
|
+
"map",
|
|
2308
|
+
"memoryview",
|
|
2309
|
+
"object",
|
|
2310
|
+
"range",
|
|
2311
|
+
"set",
|
|
2312
|
+
"staticmethod",
|
|
2313
|
+
"str",
|
|
2314
|
+
"super",
|
|
2315
|
+
"tuple",
|
|
2316
|
+
"type"
|
|
2317
|
+
].map((n) => ({ label: n, type: "class" }))).concat(/* @__PURE__ */ [
|
|
2318
|
+
"abs",
|
|
2319
|
+
"aiter",
|
|
2320
|
+
"all",
|
|
2321
|
+
"anext",
|
|
2322
|
+
"any",
|
|
2323
|
+
"ascii",
|
|
2324
|
+
"bin",
|
|
2325
|
+
"breakpoint",
|
|
2326
|
+
"callable",
|
|
2327
|
+
"chr",
|
|
2328
|
+
"compile",
|
|
2329
|
+
"delattr",
|
|
2330
|
+
"dict",
|
|
2331
|
+
"dir",
|
|
2332
|
+
"divmod",
|
|
2333
|
+
"enumerate",
|
|
2334
|
+
"eval",
|
|
2335
|
+
"exec",
|
|
2336
|
+
"exit",
|
|
2337
|
+
"filter",
|
|
2338
|
+
"format",
|
|
2339
|
+
"getattr",
|
|
2340
|
+
"globals",
|
|
2341
|
+
"hasattr",
|
|
2342
|
+
"hash",
|
|
2343
|
+
"help",
|
|
2344
|
+
"hex",
|
|
2345
|
+
"id",
|
|
2346
|
+
"input",
|
|
2347
|
+
"isinstance",
|
|
2348
|
+
"issubclass",
|
|
2349
|
+
"iter",
|
|
2350
|
+
"len",
|
|
2351
|
+
"license",
|
|
2352
|
+
"locals",
|
|
2353
|
+
"max",
|
|
2354
|
+
"min",
|
|
2355
|
+
"next",
|
|
2356
|
+
"oct",
|
|
2357
|
+
"open",
|
|
2358
|
+
"ord",
|
|
2359
|
+
"pow",
|
|
2360
|
+
"print",
|
|
2361
|
+
"property",
|
|
2362
|
+
"quit",
|
|
2363
|
+
"repr",
|
|
2364
|
+
"reversed",
|
|
2365
|
+
"round",
|
|
2366
|
+
"setattr",
|
|
2367
|
+
"slice",
|
|
2368
|
+
"sorted",
|
|
2369
|
+
"sum",
|
|
2370
|
+
"vars",
|
|
2371
|
+
"zip"
|
|
2372
|
+
].map((n) => ({ label: n, type: "function" })));
|
|
2373
|
+
const snippets = [
|
|
2374
|
+
/* @__PURE__ */ snippetCompletion("def ${name}(${params}):\n ${}", {
|
|
2375
|
+
label: "def",
|
|
2376
|
+
detail: "function",
|
|
2377
|
+
type: "keyword"
|
|
2378
|
+
}),
|
|
2379
|
+
/* @__PURE__ */ snippetCompletion("for ${name} in ${collection}:\n ${}", {
|
|
2380
|
+
label: "for",
|
|
2381
|
+
detail: "loop",
|
|
2382
|
+
type: "keyword"
|
|
2383
|
+
}),
|
|
2384
|
+
/* @__PURE__ */ snippetCompletion("while ${}:\n ${}", {
|
|
2385
|
+
label: "while",
|
|
2386
|
+
detail: "loop",
|
|
2387
|
+
type: "keyword"
|
|
2388
|
+
}),
|
|
2389
|
+
/* @__PURE__ */ snippetCompletion("try:\n ${}\nexcept ${error}:\n ${}", {
|
|
2390
|
+
label: "try",
|
|
2391
|
+
detail: "/ except block",
|
|
2392
|
+
type: "keyword"
|
|
2393
|
+
}),
|
|
2394
|
+
/* @__PURE__ */ snippetCompletion("if ${}:\n \n", {
|
|
2395
|
+
label: "if",
|
|
2396
|
+
detail: "block",
|
|
2397
|
+
type: "keyword"
|
|
2398
|
+
}),
|
|
2399
|
+
/* @__PURE__ */ snippetCompletion("if ${}:\n ${}\nelse:\n ${}", {
|
|
2400
|
+
label: "if",
|
|
2401
|
+
detail: "/ else block",
|
|
2402
|
+
type: "keyword"
|
|
2403
|
+
}),
|
|
2404
|
+
/* @__PURE__ */ snippetCompletion("class ${name}:\n def __init__(self, ${params}):\n ${}", {
|
|
2405
|
+
label: "class",
|
|
2406
|
+
detail: "definition",
|
|
2407
|
+
type: "keyword"
|
|
2408
|
+
}),
|
|
2409
|
+
/* @__PURE__ */ snippetCompletion("import ${module}", {
|
|
2410
|
+
label: "import",
|
|
2411
|
+
detail: "statement",
|
|
2412
|
+
type: "keyword"
|
|
2413
|
+
}),
|
|
2414
|
+
/* @__PURE__ */ snippetCompletion("from ${module} import ${names}", {
|
|
2415
|
+
label: "from",
|
|
2416
|
+
detail: "import",
|
|
2417
|
+
type: "keyword"
|
|
2418
|
+
})
|
|
2419
|
+
];
|
|
2420
|
+
const globalCompletion = /* @__PURE__ */ ifNotIn(dontComplete, /* @__PURE__ */ completeFromList(/* @__PURE__ */ globals.concat(snippets)));
|
|
2421
|
+
function innerBody(context) {
|
|
2422
|
+
let { node, pos } = context;
|
|
2423
|
+
let lineIndent = context.lineIndent(pos, -1);
|
|
2424
|
+
let found = null;
|
|
2425
|
+
for (; ; ) {
|
|
2426
|
+
let before = node.childBefore(pos);
|
|
2427
|
+
if (!before) {
|
|
2428
|
+
break;
|
|
2429
|
+
} else if (before.name == "Comment") {
|
|
2430
|
+
pos = before.from;
|
|
2431
|
+
} else if (before.name == "Body" || before.name == "MatchBody") {
|
|
2432
|
+
if (context.baseIndentFor(before) + context.unit <= lineIndent)
|
|
2433
|
+
found = before;
|
|
2434
|
+
node = before;
|
|
2435
|
+
} else if (before.name == "MatchClause") {
|
|
2436
|
+
node = before;
|
|
2437
|
+
} else if (before.type.is("Statement")) {
|
|
2438
|
+
node = before;
|
|
2439
|
+
} else {
|
|
2440
|
+
break;
|
|
2441
|
+
}
|
|
2442
|
+
}
|
|
2443
|
+
return found;
|
|
2444
|
+
}
|
|
2445
|
+
function indentBody(context, node) {
|
|
2446
|
+
let base = context.baseIndentFor(node);
|
|
2447
|
+
let line = context.lineAt(context.pos, -1), to = line.from + line.text.length;
|
|
2448
|
+
if (/^\s*($|#)/.test(line.text) && context.node.to < to + 100 && !/\S/.test(context.state.sliceDoc(to, context.node.to)) && context.lineIndent(context.pos, -1) <= base)
|
|
2449
|
+
return null;
|
|
2450
|
+
if (/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(context.textAfter) && context.lineIndent(context.pos, -1) > base)
|
|
2451
|
+
return null;
|
|
2452
|
+
return base + context.unit;
|
|
2453
|
+
}
|
|
2454
|
+
const pythonLanguage = /* @__PURE__ */ LRLanguage.define({
|
|
2455
|
+
name: "python",
|
|
2456
|
+
parser: /* @__PURE__ */ parser.configure({
|
|
2457
|
+
props: [
|
|
2458
|
+
/* @__PURE__ */ indentNodeProp.add({
|
|
2459
|
+
Body: (context) => {
|
|
2460
|
+
var _a;
|
|
2461
|
+
let body = /^\s*(#|$)/.test(context.textAfter) && innerBody(context) || context.node;
|
|
2462
|
+
return (_a = indentBody(context, body)) !== null && _a !== void 0 ? _a : context.continue();
|
|
2463
|
+
},
|
|
2464
|
+
MatchBody: (context) => {
|
|
2465
|
+
var _a;
|
|
2466
|
+
let inner = innerBody(context);
|
|
2467
|
+
return (_a = indentBody(context, inner || context.node)) !== null && _a !== void 0 ? _a : context.continue();
|
|
2468
|
+
},
|
|
2469
|
+
IfStatement: (cx) => /^\s*(else:|elif )/.test(cx.textAfter) ? cx.baseIndent : cx.continue(),
|
|
2470
|
+
"ForStatement WhileStatement": (cx) => /^\s*else:/.test(cx.textAfter) ? cx.baseIndent : cx.continue(),
|
|
2471
|
+
TryStatement: (cx) => /^\s*(except[ :]|finally:|else:)/.test(cx.textAfter) ? cx.baseIndent : cx.continue(),
|
|
2472
|
+
MatchStatement: (cx) => {
|
|
2473
|
+
if (/^\s*case /.test(cx.textAfter))
|
|
2474
|
+
return cx.baseIndent + cx.unit;
|
|
2475
|
+
return cx.continue();
|
|
2476
|
+
},
|
|
2477
|
+
"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression": /* @__PURE__ */ delimitedIndent({ closing: ")" }),
|
|
2478
|
+
"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression": /* @__PURE__ */ delimitedIndent({ closing: "}" }),
|
|
2479
|
+
"ArrayExpression ArrayComprehensionExpression": /* @__PURE__ */ delimitedIndent({ closing: "]" }),
|
|
2480
|
+
MemberExpression: (cx) => cx.baseIndent + cx.unit,
|
|
2481
|
+
"String FormatString": () => null,
|
|
2482
|
+
Script: (context) => {
|
|
2483
|
+
var _a;
|
|
2484
|
+
let inner = innerBody(context);
|
|
2485
|
+
return (_a = inner && indentBody(context, inner)) !== null && _a !== void 0 ? _a : context.continue();
|
|
2486
|
+
}
|
|
2487
|
+
}),
|
|
2488
|
+
/* @__PURE__ */ foldNodeProp.add({
|
|
2489
|
+
"ArrayExpression DictionaryExpression SetExpression TupleExpression": foldInside,
|
|
2490
|
+
Body: (node, state) => ({ from: node.from + 1, to: node.to - (node.to == state.doc.length ? 0 : 1) }),
|
|
2491
|
+
"String FormatString": (node, state) => ({ from: state.doc.lineAt(node.from).to, to: node.to })
|
|
2492
|
+
})
|
|
2493
|
+
]
|
|
2494
|
+
}),
|
|
2495
|
+
languageData: {
|
|
2496
|
+
closeBrackets: {
|
|
2497
|
+
brackets: ["(", "[", "{", "'", '"', "'''", '"""'],
|
|
2498
|
+
stringPrefixes: [
|
|
2499
|
+
"f",
|
|
2500
|
+
"fr",
|
|
2501
|
+
"rf",
|
|
2502
|
+
"r",
|
|
2503
|
+
"u",
|
|
2504
|
+
"b",
|
|
2505
|
+
"br",
|
|
2506
|
+
"rb",
|
|
2507
|
+
"F",
|
|
2508
|
+
"FR",
|
|
2509
|
+
"RF",
|
|
2510
|
+
"R",
|
|
2511
|
+
"U",
|
|
2512
|
+
"B",
|
|
2513
|
+
"BR",
|
|
2514
|
+
"RB"
|
|
2515
|
+
]
|
|
2516
|
+
},
|
|
2517
|
+
commentTokens: { line: "#" },
|
|
2518
|
+
// Indent logic logic are triggered upon below input patterns
|
|
2519
|
+
indentOnInput: /^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/
|
|
2520
|
+
}
|
|
2521
|
+
});
|
|
2522
|
+
function python() {
|
|
2523
|
+
return new LanguageSupport(pythonLanguage, [
|
|
2524
|
+
pythonLanguage.data.of({ autocomplete: localCompletionSource }),
|
|
2525
|
+
pythonLanguage.data.of({ autocomplete: globalCompletion })
|
|
2526
|
+
]);
|
|
2527
|
+
}
|
|
2528
|
+
const chalky = "#e5c07b", coral = "#e06c75", cyan = "#56b6c2", invalid = "#ffffff", ivory = "#abb2bf", stone = "#7d8799", malibu = "#61afef", sage = "#98c379", whiskey = "#d19a66", violet = "#c678dd", darkBackground = "#21252b", highlightBackground = "#2c313a", background = "#282c34", tooltipBackground = "#353a42", selection = "#3E4451", cursor = "#528bff";
|
|
2529
|
+
const oneDarkTheme = /* @__PURE__ */ EditorView.theme({
|
|
2530
|
+
"&": {
|
|
2531
|
+
color: ivory,
|
|
2532
|
+
backgroundColor: background
|
|
2533
|
+
},
|
|
2534
|
+
".cm-content": {
|
|
2535
|
+
caretColor: cursor
|
|
2536
|
+
},
|
|
2537
|
+
".cm-cursor, .cm-dropCursor": { borderLeftColor: cursor },
|
|
2538
|
+
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: selection },
|
|
2539
|
+
".cm-panels": { backgroundColor: darkBackground, color: ivory },
|
|
2540
|
+
".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
|
|
2541
|
+
".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
|
|
2542
|
+
".cm-searchMatch": {
|
|
2543
|
+
backgroundColor: "#72a1ff59",
|
|
2544
|
+
outline: "1px solid #457dff"
|
|
2545
|
+
},
|
|
2546
|
+
".cm-searchMatch.cm-searchMatch-selected": {
|
|
2547
|
+
backgroundColor: "#6199ff2f"
|
|
2548
|
+
},
|
|
2549
|
+
".cm-activeLine": { backgroundColor: "#6699ff0b" },
|
|
2550
|
+
".cm-selectionMatch": { backgroundColor: "#aafe661a" },
|
|
2551
|
+
"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": {
|
|
2552
|
+
backgroundColor: "#bad0f847"
|
|
2553
|
+
},
|
|
2554
|
+
".cm-gutters": {
|
|
2555
|
+
backgroundColor: background,
|
|
2556
|
+
color: stone,
|
|
2557
|
+
border: "none"
|
|
2558
|
+
},
|
|
2559
|
+
".cm-activeLineGutter": {
|
|
2560
|
+
backgroundColor: highlightBackground
|
|
2561
|
+
},
|
|
2562
|
+
".cm-foldPlaceholder": {
|
|
2563
|
+
backgroundColor: "transparent",
|
|
2564
|
+
border: "none",
|
|
2565
|
+
color: "#ddd"
|
|
2566
|
+
},
|
|
2567
|
+
".cm-tooltip": {
|
|
2568
|
+
border: "none",
|
|
2569
|
+
backgroundColor: tooltipBackground
|
|
2570
|
+
},
|
|
2571
|
+
".cm-tooltip .cm-tooltip-arrow:before": {
|
|
2572
|
+
borderTopColor: "transparent",
|
|
2573
|
+
borderBottomColor: "transparent"
|
|
2574
|
+
},
|
|
2575
|
+
".cm-tooltip .cm-tooltip-arrow:after": {
|
|
2576
|
+
borderTopColor: tooltipBackground,
|
|
2577
|
+
borderBottomColor: tooltipBackground
|
|
2578
|
+
},
|
|
2579
|
+
".cm-tooltip-autocomplete": {
|
|
2580
|
+
"& > ul > li[aria-selected]": {
|
|
2581
|
+
backgroundColor: highlightBackground,
|
|
2582
|
+
color: ivory
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
}, { dark: true });
|
|
2586
|
+
const oneDarkHighlightStyle = /* @__PURE__ */ HighlightStyle.define([
|
|
2587
|
+
{
|
|
2588
|
+
tag: tags.keyword,
|
|
2589
|
+
color: violet
|
|
2590
|
+
},
|
|
2591
|
+
{
|
|
2592
|
+
tag: [tags.name, tags.deleted, tags.character, tags.propertyName, tags.macroName],
|
|
2593
|
+
color: coral
|
|
2594
|
+
},
|
|
2595
|
+
{
|
|
2596
|
+
tag: [/* @__PURE__ */ tags.function(tags.variableName), tags.labelName],
|
|
2597
|
+
color: malibu
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
tag: [tags.color, /* @__PURE__ */ tags.constant(tags.name), /* @__PURE__ */ tags.standard(tags.name)],
|
|
2601
|
+
color: whiskey
|
|
2602
|
+
},
|
|
2603
|
+
{
|
|
2604
|
+
tag: [/* @__PURE__ */ tags.definition(tags.name), tags.separator],
|
|
2605
|
+
color: ivory
|
|
2606
|
+
},
|
|
2607
|
+
{
|
|
2608
|
+
tag: [tags.typeName, tags.className, tags.number, tags.changed, tags.annotation, tags.modifier, tags.self, tags.namespace],
|
|
2609
|
+
color: chalky
|
|
2610
|
+
},
|
|
2611
|
+
{
|
|
2612
|
+
tag: [tags.operator, tags.operatorKeyword, tags.url, tags.escape, tags.regexp, tags.link, /* @__PURE__ */ tags.special(tags.string)],
|
|
2613
|
+
color: cyan
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
tag: [tags.meta, tags.comment],
|
|
2617
|
+
color: stone
|
|
2618
|
+
},
|
|
2619
|
+
{
|
|
2620
|
+
tag: tags.strong,
|
|
2621
|
+
fontWeight: "bold"
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
tag: tags.emphasis,
|
|
2625
|
+
fontStyle: "italic"
|
|
2626
|
+
},
|
|
2627
|
+
{
|
|
2628
|
+
tag: tags.strikethrough,
|
|
2629
|
+
textDecoration: "line-through"
|
|
2630
|
+
},
|
|
2631
|
+
{
|
|
2632
|
+
tag: tags.link,
|
|
2633
|
+
color: stone,
|
|
2634
|
+
textDecoration: "underline"
|
|
2635
|
+
},
|
|
2636
|
+
{
|
|
2637
|
+
tag: tags.heading,
|
|
2638
|
+
fontWeight: "bold",
|
|
2639
|
+
color: coral
|
|
2640
|
+
},
|
|
2641
|
+
{
|
|
2642
|
+
tag: [tags.atom, tags.bool, /* @__PURE__ */ tags.special(tags.variableName)],
|
|
2643
|
+
color: whiskey
|
|
2644
|
+
},
|
|
2645
|
+
{
|
|
2646
|
+
tag: [tags.processingInstruction, tags.string, tags.inserted],
|
|
2647
|
+
color: sage
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
tag: tags.invalid,
|
|
2651
|
+
color: invalid
|
|
2652
|
+
}
|
|
2653
|
+
]);
|
|
2654
|
+
const oneDark = [oneDarkTheme, /* @__PURE__ */ syntaxHighlighting(oneDarkHighlightStyle)];
|
|
2655
|
+
export {
|
|
2656
|
+
__vite_glob_0_23 as A,
|
|
2657
|
+
__vite_glob_0_24 as B,
|
|
2658
|
+
__vite_glob_0_25 as C,
|
|
2659
|
+
__vite_glob_0_26 as D,
|
|
2660
|
+
__vite_glob_0_27 as E,
|
|
2661
|
+
__vite_glob_0_28 as F,
|
|
2662
|
+
__vite_glob_0_29 as G,
|
|
2663
|
+
__vite_glob_0_30 as H,
|
|
2664
|
+
__vite_glob_0_31 as I,
|
|
2665
|
+
__vite_glob_0_32 as J,
|
|
2666
|
+
__vite_glob_0_33 as K,
|
|
2667
|
+
getDefaultIconUrl as L,
|
|
2668
|
+
getCustomIconUrl as M,
|
|
2669
|
+
__vite_glob_0_0 as _,
|
|
2670
|
+
__vite_glob_0_1 as a,
|
|
2671
|
+
__vite_glob_0_2 as b,
|
|
2672
|
+
__vite_glob_0_3 as c,
|
|
2673
|
+
__vite_glob_0_4 as d,
|
|
2674
|
+
__vite_glob_0_5 as e,
|
|
2675
|
+
fetchNodes as f,
|
|
2676
|
+
getImageUrl as g,
|
|
2677
|
+
__vite_glob_0_6 as h,
|
|
2678
|
+
__vite_glob_0_7 as i,
|
|
2679
|
+
__vite_glob_0_8 as j,
|
|
2680
|
+
__vite_glob_0_9 as k,
|
|
2681
|
+
__vite_glob_0_10 as l,
|
|
2682
|
+
__vite_glob_0_11 as m,
|
|
2683
|
+
__vite_glob_0_12 as n,
|
|
2684
|
+
oneDark as o,
|
|
2685
|
+
python as p,
|
|
2686
|
+
__vite_glob_0_13 as q,
|
|
2687
|
+
__vite_glob_0_14 as r,
|
|
2688
|
+
__vite_glob_0_15 as s,
|
|
2689
|
+
__vite_glob_0_16 as t,
|
|
2690
|
+
__vite_glob_0_17 as u,
|
|
2691
|
+
__vite_glob_0_18 as v,
|
|
2692
|
+
__vite_glob_0_19 as w,
|
|
2693
|
+
__vite_glob_0_20 as x,
|
|
2694
|
+
__vite_glob_0_21 as y,
|
|
2695
|
+
__vite_glob_0_22 as z
|
|
2696
|
+
};
|