dmart 1.4.41.post34__py3-none-any.whl → 1.4.41.post36__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.
- dmart/config.env.sample +22 -5
- dmart/cxb/assets/@codemirror-Rn7_6DkE.js +10 -0
- dmart/cxb/assets/@edraj-CS4NwVbD.js +1 -0
- dmart/cxb/assets/@jsonquerylang-laKNoFFq.js +12 -0
- dmart/cxb/assets/@lezer-za4Q-8Ew.js +1 -0
- dmart/cxb/assets/{@replit-27NbNvJz.js → @replit--ERk53eB.js} +1 -1
- dmart/cxb/assets/{@roxi-Bw7qXphd.js → @roxi-CGMFK4i8.js} +1 -1
- dmart/cxb/assets/{@zerodevx-z992vLW9.js → @zerodevx-BlBZjKxu.js} +1 -1
- dmart/cxb/assets/{BreadCrumbLite-28-Sst8b.js → BreadCrumbLite-ClLCZ5eT.js} +1 -1
- dmart/cxb/assets/{EntryRenderer-gOGY0M8V.js → EntryRenderer-cjUJdYfu.js} +1 -1
- dmart/cxb/assets/{ListView-Ctq2bVYW.js → ListView-dXTYjhLu.js} +4 -4
- dmart/cxb/assets/{Prism-DbpuKlij.js → Prism--hMplq-p.js} +1 -1
- dmart/cxb/assets/Table2Cols-BsbwicQm.js +1 -0
- dmart/cxb/assets/{_...404_-lSd1jtj4.js → _...404_-fuLH_rX9.js} +1 -1
- dmart/cxb/assets/_...fallback_-Ba_NLmAE.js +1 -0
- dmart/cxb/assets/{_module-ziANIEpM.js → _module-BGlhRcxL.js} +1 -1
- dmart/cxb/assets/{_module-CPGJEbyo.js → _module-NBNtg-cx.js} +1 -1
- dmart/cxb/assets/{_module-CRNnKJ_Y.js → _module-qB4OB11N.js} +3 -3
- dmart/cxb/assets/{codemirror-wrapped-line-indent-CCR8a-tt.js → codemirror-wrapped-line-indent-DPhKvljI.js} +1 -1
- dmart/cxb/assets/{compare-C3mJz3fJ.js → compare-C3AjiGFR.js} +1 -1
- dmart/cxb/assets/dmart_services-BN8RAjGS.js +1 -0
- dmart/cxb/assets/export-CA8vNv-Q.js +1 -0
- dmart/cxb/assets/flowbite-svelte-BLvjb-sa.js +1 -0
- dmart/cxb/assets/{flowbite-svelte-icons-DXemwXNH.js → flowbite-svelte-icons-D8uFOOjS.js} +1 -1
- dmart/cxb/assets/{global-CF7LWRdS.js → global-igKv-1g9.js} +1 -1
- dmart/cxb/assets/import-BiJTp7Zs.js +1 -0
- dmart/cxb/assets/{index-DVbd0rhr.js → index-BDmMag0G.js} +1 -1
- dmart/cxb/assets/index-BPA7gxzC.js +1 -0
- dmart/cxb/assets/{index-BUIZc0eo.js → index-BcNgjLcu.js} +1 -1
- dmart/cxb/assets/{index-C_qmKy7R.js → index-BdeNM69f.js} +1 -1
- dmart/cxb/assets/{index-C2qX9HoV.js → index-Be7t7GWv.js} +1 -1
- dmart/cxb/assets/{index-Ba1QyM6b.js → index-BejgdGl7.js} +1 -1
- dmart/cxb/assets/{index-BhRFcH0w.js → index-Bll8i6-y.js} +1 -1
- dmart/cxb/assets/{index-BBCAZYiv.js → index-CC-A1ipE.js} +1 -1
- dmart/cxb/assets/{index-BJ8k452_.js → index-CIe9TrOS.js} +4 -4
- dmart/cxb/assets/{index-CsFEfUT6.js → index-CcwoDlcb.js} +1 -1
- dmart/cxb/assets/{index-Eaqb7YHm.js → index-DQmwVe-X.js} +1 -1
- dmart/cxb/assets/{index-CDaVHY1H.js → index-DTfhnhwd.js} +1 -1
- dmart/cxb/assets/{index-BAsZYsRz.js → index-DtiCmB4o.js} +1 -1
- dmart/cxb/assets/index-NBrXBlLA.css +2 -0
- dmart/cxb/assets/{info-B3CPbnSo.js → info-Dd-l-jS9.js} +1 -1
- dmart/cxb/assets/{jsonrepair-DJT3kRBj.js → jsonrepair-B30Dx381.js} +6 -6
- dmart/cxb/assets/{pagination-svelte-D8AVMXcz.js → pagination-svelte-D5CyoiE_.js} +1 -1
- dmart/cxb/assets/{profile-uY5zsYbu.js → profile-BmzTjjNg.js} +1 -1
- dmart/cxb/assets/{query-Ck7rjPsV.js → query-DXMjDhll.js} +1 -1
- dmart/cxb/assets/spaces-0oyGvpii.js +1 -0
- dmart/cxb/assets/svelte-B2XmcTi_.js +4 -0
- dmart/cxb/assets/{svelte-awesome-DpV9QpGy.js → svelte-awesome-DhnMA6Q_.js} +1 -1
- dmart/cxb/assets/{svelte-datatables-net-PrmrsOQE.js → svelte-datatables-net-CY7LBj6I.js} +1 -1
- dmart/cxb/assets/{svelte-floating-ui-BWukrOq5.js → svelte-floating-ui-BlS3sOAQ.js} +1 -1
- dmart/cxb/assets/{svelte-i18n-CZ4cFDVx.js → svelte-i18n-CT2KkQaN.js} +1 -1
- dmart/cxb/assets/{svelte-jsoneditor-6jH6h6zi.css → svelte-jsoneditor-BzfX6Usi.css} +1 -1
- dmart/cxb/assets/{svelte-jsoneditor-BdDDhQGI.js → svelte-jsoneditor-CUGSvWId.js} +1 -1
- dmart/cxb/assets/{svelte-select-BDtNxMKN.js → svelte-select-CjHAt_85.js} +2 -2
- dmart/cxb/assets/toast-B9WDyfyI.js +1 -0
- dmart/cxb/assets/{typewriter-editor-Do-KAaNp.js → typewriter-editor-DkTVIJdm.js} +1 -1
- dmart/cxb/assets/{user-BQpJ6b6h.js → user-DeK_NB5v.js} +1 -1
- dmart/cxb/config.json +2 -1
- dmart/cxb/index.html +6 -6
- dmart/dmart.py +9 -2
- dmart/info.json +1 -1
- dmart/sample/spaces/applications/.dm/meta.space.json +29 -24
- dmart/sample/spaces/applications/api/.dm/meta.folder.json +1 -18
- dmart/sample/spaces/applications/api/.dm/query_all_applications/meta.content.json +1 -17
- dmart/sample/spaces/applications/api/.dm/test_by_saad/attachments.media/meta.warframe.json +1 -16
- dmart/sample/spaces/applications/api/.dm/test_by_saad/meta.content.json +1 -16
- dmart/sample/spaces/applications/api/.dm/user_profile/meta.content.json +1 -17
- dmart/sample/spaces/applications/api/applications/.dm/create_log/meta.content.json +1 -15
- dmart/sample/spaces/applications/api/applications/.dm/create_public_logs/meta.content.json +1 -15
- dmart/sample/spaces/applications/api/applications/.dm/meta.folder.json +1 -15
- dmart/sample/spaces/applications/api/applications/.dm/query_all_translated_data/meta.content.json +1 -15
- dmart/sample/spaces/applications/api/applications/.dm/query_logs/meta.content.json +1 -15
- dmart/sample/spaces/applications/api/applications/.dm/query_translated_enums/meta.content.json +1 -15
- dmart/sample/spaces/applications/api/applications/.dm/query_translated_others/meta.content.json +1 -15
- dmart/sample/spaces/applications/api/applications/.dm/query_translated_resolution/meta.content.json +1 -15
- dmart/sample/spaces/applications/api/applications/create_log.json +1 -46
- dmart/sample/spaces/applications/api/applications/create_public_logs.json +1 -22
- dmart/sample/spaces/applications/api/applications/query_all_translated_data.json +1 -14
- dmart/sample/spaces/applications/api/applications/query_logs.json +1 -11
- dmart/sample/spaces/applications/api/applications/query_translated_enums.json +1 -14
- dmart/sample/spaces/applications/api/applications/query_translated_others.json +1 -14
- dmart/sample/spaces/applications/api/applications/query_translated_resolution.json +1 -13
- dmart/sample/spaces/applications/api/applications.json +1 -16
- dmart/sample/spaces/applications/api/management/.dm/create_subaccount/meta.content.json +1 -15
- dmart/sample/spaces/applications/api/management/.dm/meta.folder.json +1 -15
- dmart/sample/spaces/applications/api/management/.dm/update_password/meta.content.json +1 -15
- dmart/sample/spaces/applications/api/management/create_subaccount.json +29 -29
- dmart/sample/spaces/applications/api/management/update_password.json +1 -19
- dmart/sample/spaces/applications/api/management.json +1 -16
- dmart/sample/spaces/applications/api/query_all_applications.json +6 -5
- dmart/sample/spaces/applications/api/test_by_saad.json +1 -4
- dmart/sample/spaces/applications/api/user/.dm/meta.folder.json +1 -9
- dmart/sample/spaces/applications/api/user/.dm/test_by_saad/meta.content.json +1 -16
- dmart/sample/spaces/applications/api/user/.dm/user_profile/meta.content.json +1 -17
- dmart/sample/spaces/applications/api/user/test_by_saad.json +1 -4
- dmart/sample/spaces/applications/api/user/user_profile.json +1 -4
- dmart/sample/spaces/applications/api/user_profile.json +1 -4
- dmart/sample/spaces/applications/api.json +1 -33
- dmart/sample/spaces/applications/collections/.dm/meta.folder.json +10 -11
- dmart/sample/spaces/applications/collections.json +1 -20
- dmart/sample/spaces/applications/configurations/.dm/meta.folder.json +1 -17
- dmart/sample/spaces/applications/configurations.json +8 -8
- dmart/sample/spaces/applications/logs/.dm/meta.folder.json +1 -12
- dmart/sample/spaces/applications/queries/.dm/meta.folder.json +1 -15
- dmart/sample/spaces/applications/queries/.dm/order/meta.content.json +1 -17
- dmart/sample/spaces/applications/queries/order.json +1 -15
- dmart/sample/spaces/applications/queries.json +1 -16
- dmart/sample/spaces/applications/schema/.dm/api/meta.schema.json +1 -17
- dmart/sample/spaces/applications/schema/.dm/configuration/meta.schema.json +1 -14
- dmart/sample/spaces/applications/schema/.dm/error/meta.schema.json +1 -14
- dmart/sample/spaces/applications/schema/.dm/log/meta.schema.json +1 -15
- dmart/sample/spaces/applications/schema/.dm/meta.folder.json +1 -15
- dmart/sample/spaces/applications/schema/.dm/query/meta.schema.json +14 -15
- dmart/sample/spaces/applications/schema/.dm/translation/meta.schema.json +1 -14
- dmart/sample/spaces/applications/schema/api.json +18 -24
- dmart/sample/spaces/applications/schema/configuration.json +1 -26
- dmart/sample/spaces/applications/schema/error.json +22 -22
- dmart/sample/spaces/applications/schema/log.json +1 -57
- dmart/sample/spaces/applications/schema/query.json +58 -56
- dmart/sample/spaces/applications/schema/translation.json +4 -4
- dmart/sample/spaces/applications/schema.json +1 -16
- dmart/sample/spaces/applications/translations/.dm/meta.folder.json +1 -15
- dmart/sample/spaces/applications/translations.json +1 -22
- dmart/sample/spaces/archive/.dm/meta.space.json +26 -19
- dmart/sample/spaces/custom_plugins/dummy/__pycache__/plugin.cpython-314.pyc +0 -0
- dmart/sample/spaces/custom_plugins/own_changed_notification/__pycache__/plugin.cpython-314.pyc +0 -0
- dmart/sample/spaces/management/.dm/events.jsonl +32 -0
- dmart/sample/spaces/management/.dm/meta.space.json +27 -24
- dmart/sample/spaces/management/.dm/notifications/attachments.view.json/admin.json +32 -31
- dmart/sample/spaces/management/.dm/notifications/attachments.view.json/meta.admin.json +1 -15
- dmart/sample/spaces/management/.dm/notifications/attachments.view.json/meta.system.json +1 -15
- dmart/sample/spaces/management/.dm/notifications/attachments.view.json/system.json +28 -27
- dmart/sample/spaces/management/collections/.dm/meta.folder.json +1 -15
- dmart/sample/spaces/management/collections.json +1 -26
- dmart/sample/spaces/management/groups/.dm/meta.folder.json +1 -15
- dmart/sample/spaces/management/groups.json +1 -14
- dmart/sample/spaces/management/health_check/.dm/meta.folder.json +1 -15
- dmart/sample/spaces/management/health_check.json +1 -13
- dmart/sample/spaces/management/notifications/.dm/meta.folder.json +1 -15
- dmart/sample/spaces/management/notifications/admin/.dm/meta.folder.json +6 -6
- dmart/sample/spaces/management/notifications/system/.dm/meta.folder.json +6 -6
- dmart/sample/spaces/management/notifications.json +1 -46
- dmart/sample/spaces/management/permissions/.dm/access_applications/meta.permission.json +5 -4
- dmart/sample/spaces/management/permissions/.dm/access_applications_world/meta.permission.json +24 -23
- dmart/sample/spaces/management/permissions/.dm/access_messages/meta.permission.json +8 -14
- dmart/sample/spaces/management/permissions/.dm/access_personal/meta.permission.json +7 -12
- dmart/sample/spaces/management/permissions/.dm/access_protected/meta.permission.json +8 -12
- dmart/sample/spaces/management/permissions/.dm/access_public/meta.permission.json +8 -12
- dmart/sample/spaces/management/permissions/.dm/browse_all_folders/meta.permission.json +6 -5
- dmart/sample/spaces/management/permissions/.dm/create_log/meta.permission.json +8 -9
- dmart/sample/spaces/management/permissions/.dm/interviewer/meta.permission.json +1 -34
- dmart/sample/spaces/management/permissions/.dm/manage_applications/meta.permission.json +1 -35
- dmart/sample/spaces/management/permissions/.dm/manage_debug/meta.permission.json +7 -9
- dmart/sample/spaces/management/permissions/.dm/manage_spaces/meta.permission.json +6 -5
- dmart/sample/spaces/management/permissions/.dm/meta.folder.json +1 -15
- dmart/sample/spaces/management/permissions/.dm/rules_management_default/meta.permission.json +7 -10
- dmart/sample/spaces/management/permissions/.dm/super_manager/meta.permission.json +7 -4
- dmart/sample/spaces/management/permissions/.dm/view_activity_log/meta.permission.json +7 -10
- dmart/sample/spaces/management/permissions/.dm/view_collections/meta.permission.json +6 -6
- dmart/sample/spaces/management/permissions/.dm/view_logs/meta.permission.json +8 -9
- dmart/sample/spaces/management/permissions/.dm/view_roles/meta.permission.json +11 -10
- dmart/sample/spaces/management/permissions/.dm/view_users/meta.permission.json +7 -10
- dmart/sample/spaces/management/permissions/.dm/view_world/meta.permission.json +12 -10
- dmart/sample/spaces/management/permissions/.dm/world/meta.permission.json +10 -15
- dmart/sample/spaces/management/permissions.json +1 -10
- dmart/sample/spaces/management/roles/.dm/dummy/meta.role.json +6 -6
- dmart/sample/spaces/management/roles/.dm/logged_in/meta.role.json +7 -7
- dmart/sample/spaces/management/roles/.dm/manager/meta.role.json +7 -7
- dmart/sample/spaces/management/roles/.dm/meta.folder.json +1 -15
- dmart/sample/spaces/management/roles/.dm/moderator/meta.role.json +7 -7
- dmart/sample/spaces/management/roles/.dm/super_admin/meta.role.json +7 -7
- dmart/sample/spaces/management/roles/.dm/test_role/meta.role.json +7 -7
- dmart/sample/spaces/management/roles/.dm/world/meta.role.json +7 -7
- dmart/sample/spaces/management/roles.json +1 -11
- dmart/sample/spaces/management/schema/.dm/admin_notification_request/attachments.media/meta.ui_schema.json +9 -15
- dmart/sample/spaces/management/schema/.dm/admin_notification_request/attachments.media/ui_schema.json +4 -4
- dmart/sample/spaces/management/schema/.dm/admin_notification_request/meta.schema.json +1 -17
- dmart/sample/spaces/management/schema/.dm/api/meta.schema.json +1 -15
- dmart/sample/spaces/management/schema/.dm/folder_rendering/meta.schema.json +1 -17
- dmart/sample/spaces/management/schema/.dm/health_check/meta.schema.json +8 -8
- dmart/sample/spaces/management/schema/.dm/meta.folder.json +1 -15
- dmart/sample/spaces/management/schema/.dm/meta_schema/meta.schema.json +1 -14
- dmart/sample/spaces/management/schema/.dm/metafile/meta.schema.json +13 -14
- dmart/sample/spaces/management/schema/.dm/notification/meta.schema.json +1 -17
- dmart/sample/spaces/management/schema/.dm/system_notification_request/attachments.media/meta.ui_schema.json +9 -15
- dmart/sample/spaces/management/schema/.dm/system_notification_request/attachments.media/ui_schema.json +1 -1
- dmart/sample/spaces/management/schema/.dm/system_notification_request/meta.schema.json +1 -17
- dmart/sample/spaces/management/schema/.dm/view/meta.schema.json +1 -17
- dmart/sample/spaces/management/schema/.dm/workflow/meta.schema.json +1 -17
- dmart/sample/spaces/management/schema/admin_notification_request.json +88 -85
- dmart/sample/spaces/management/schema/api.json +1 -35
- dmart/sample/spaces/management/schema/folder_rendering.json +174 -166
- dmart/sample/spaces/management/schema/health_check.json +4 -1
- dmart/sample/spaces/management/schema/meta_schema.json +48 -48
- dmart/sample/spaces/management/schema/metafile.json +76 -73
- dmart/sample/spaces/management/schema/notification.json +10 -15
- dmart/sample/spaces/management/schema/system_notification_request.json +38 -49
- dmart/sample/spaces/management/schema/view.json +11 -11
- dmart/sample/spaces/management/schema/workflow.json +53 -51
- dmart/sample/spaces/management/schema.json +1 -16
- dmart/sample/spaces/management/users/.dm/alibaba/meta.user.json +15 -14
- dmart/sample/spaces/management/users/.dm/anonymous/meta.user.json +17 -17
- dmart/sample/spaces/management/users/.dm/dmart/meta.user.json +18 -30
- dmart/sample/spaces/management/users/.dm/meta.folder.json +7 -7
- dmart/sample/spaces/management/workflows/.dm/channel/meta.content.json +1 -16
- dmart/sample/spaces/management/workflows/.dm/meta.folder.json +1 -17
- dmart/sample/spaces/management/workflows/channel.json +40 -40
- dmart/sample/spaces/management/workflows.json +1 -13
- dmart/sample/spaces/maqola/.dm/meta.space.json +23 -19
- dmart/sample/spaces/personal/.dm/meta.space.json +18 -24
- dmart/sample/spaces/personal/people/.dm/meta.folder.json +1 -9
- dmart/sample/spaces/personal/people/dmart/.dm/meta.folder.json +1 -9
- dmart/sample/spaces/personal/people/dmart/messages/.dm/0b5f7e7f/meta.content.json +1 -14
- dmart/sample/spaces/personal/people/dmart/messages/.dm/meta.folder.json +1 -9
- dmart/sample/spaces/personal/people/dmart/messages/.dm/mytest/meta.content.json +1 -14
- dmart/sample/spaces/personal/people/dmart/messages/0b5f7e7f.json +1 -3
- dmart/sample/spaces/personal/people/dmart/messages/mytest.json +1 -4
- dmart/sample/spaces/personal/people/dmart/notifications/.dm/meta.folder.json +1 -9
- dmart/sample/spaces/personal/people/dmart/private/.dm/inner/meta.content.json +1 -14
- dmart/sample/spaces/personal/people/dmart/private/.dm/meta.folder.json +1 -9
- dmart/sample/spaces/personal/people/dmart/private/inner.json +1 -3
- dmart/sample/spaces/personal/people/dmart/protected/.dm/avatar/meta.content.json +1 -14
- dmart/sample/spaces/personal/people/dmart/protected/.dm/meta.folder.json +1 -9
- dmart/sample/spaces/personal/people/dmart/public/.dm/meta.folder.json +1 -9
- dmart/sample/test/.gitignore +1 -0
- {dmart-1.4.41.post34.dist-info → dmart-1.4.41.post36.dist-info}/METADATA +1 -1
- {dmart-1.4.41.post34.dist-info → dmart-1.4.41.post36.dist-info}/RECORD +230 -271
- dmart/alembic/__pycache__/__init__.cpython-314.pyc +0 -0
- dmart/alembic/__pycache__/env.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/0f3d2b1a7c21_add_authz_materialized_views.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/10d2041b94d4_last_checksum_history.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/1cf4e1ee3cb8_ext_permission_with_filter_fields_values.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/26bfe19b49d4_rm_failedloginattempts.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/3c8bca2219cc_add_otp_table.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/6675fd9dfe42_remove_unique_from_sessions_table.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/71bc1df82e6a_adding_user_last_login_at.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/74288ccbd3b5_initial.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/7520a89a8467_rm_activesession_table.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/848b623755a4_make_created_nd_updated_at_required.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/8640dcbebf85_add_notes_to_users.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/91c94250232a_adding_fk_on_owner_shortname.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/98ecd6f56f9a_ext_meta_with_owner_group_shortname.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/9aae9138c4ef_indexing_created_at_updated_at.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/b53f916b3f6d_json_to_jsonb.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/eb5f1ec65156_adding_user_locked_to_device.cpython-314.pyc +0 -0
- dmart/alembic/versions/__pycache__/f7a4949eed19_adding_query_policies_to_meta.cpython-314.pyc +0 -0
- dmart/cxb/assets/@codemirror-prKQ1WbH.js +0 -10
- dmart/cxb/assets/@edraj-D-9hi9vU.js +0 -1
- dmart/cxb/assets/@jsonquerylang-CFfSvstT.js +0 -12
- dmart/cxb/assets/@lezer-Bz8YN7GE.js +0 -1
- dmart/cxb/assets/Table2Cols-IRZ18UvF.js +0 -1
- dmart/cxb/assets/_...fallback_-De94gS6U.js +0 -1
- dmart/cxb/assets/dmart_services-BTWOtb9Z.js +0 -1
- dmart/cxb/assets/export-C-4WE2nV.js +0 -1
- dmart/cxb/assets/flowbite-svelte-Caf58qKG.js +0 -1
- dmart/cxb/assets/import-BMOPDoXp.js +0 -1
- dmart/cxb/assets/index-CbbMUQaM.css +0 -2
- dmart/cxb/assets/index-DtR8jRRM.js +0 -1
- dmart/cxb/assets/spaces-5QYuv6aM.js +0 -1
- dmart/cxb/assets/svelte-B9Ye91X-.js +0 -4
- dmart/cxb/assets/toast-nP_bUL2P.js +0 -1
- dmart/fast.py +0 -6
- dmart/my.py +0 -11
- dmart/sample/spaces/dummy/.dm/myfolder/history.jsonl +0 -3
- dmart/sample/spaces/dummy/.dm/posts/history.jsonl +0 -3
- dmart/sample/spaces/dummy/.dm/workflows/history.jsonl +0 -3
- dmart/sample/spaces/dummy/myfolder/.dm/an_example/history.jsonl +0 -4
- dmart/sample/spaces/dummy/myfolder/.dm/buyer_123/history.jsonl +0 -2
- dmart/sample/spaces/dummy/posts/.dm/97326c47/history.jsonl +0 -3
- dmart/sample/spaces/dummymyfolder/.dm/an_example/history.jsonl +0 -2
- dmart/sample/spaces/dummymyfolder/.dm/buyer_123/history.jsonl +0 -2
- dmart/sample/spaces/dummymyfolder/buyer_123/.dm/receipt/history.jsonl +0 -2
- dmart/sample/spaces/dummyschema/.dm/test_schema/history.jsonl +0 -2
- dmart/sample/spaces/dummyschema/.dm/ticket_workflows/history.jsonl +0 -2
- dmart/sample/spaces/dummyworkflows/.dm/myworkflow/history.jsonl +0 -2
- dmart/sample/spaces/management/users/.dm/distributor/history.jsonl +0 -6
- dmart/sample/spaces/managementusers/.dm/distributor/history.jsonl +0 -3
- dmart/sample/spaces/managementusers/.dm/dmart/history.jsonl +0 -11
- dmart/sample/spaces/personal/people/distributor/.dm/meta.folder.json +0 -9
- dmart/sample/spaces/personal/people/distributor/inbox/.dm/meta.folder.json +0 -9
- dmart/sample/spaces/personal/people/distributor/notifications/.dm/meta.folder.json +0 -9
- dmart/sample/spaces/personal/people/distributor/private/.dm/meta.folder.json +0 -9
- dmart/sample/spaces/personal/people/distributor/protected/.dm/meta.folder.json +0 -9
- dmart/sample/spaces/personal/people/distributor/public/.dm/meta.folder.json +0 -9
- {dmart-1.4.41.post34.dist-info → dmart-1.4.41.post36.dist-info}/WHEEL +0 -0
- {dmart-1.4.41.post34.dist-info → dmart-1.4.41.post36.dist-info}/entry_points.txt +0 -0
- {dmart-1.4.41.post34.dist-info → dmart-1.4.41.post36.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=(t=>(t.success="success",t.failed="failed",t))(p||{}),i=(t=>(t.managed="managed",t.public="public",t))(i||{});let e={"Content-type":"application/json",Authorization:""};var h=(t=>(t.aggregation="aggregation",t.search="search",t.subpath="subpath",t.events="events",t.history="history",t.tags="tags",t.spaces="spaces",t.counters="counters",t.reports="reports",t.attachments="attachments",t.attachments_aggregation="attachments_aggregation",t))(h||{}),m=(t=>(t.ascending="ascending",t.descending="descending",t))(m||{}),g=(t=>(t.create="create",t.update="update",t.replace="replace",t.delete="delete",t.move="move",t.updateACL="update_acl",t.assign="assign",t))(g||{}),f=(t=>(t.json="json",t.comment="comment",t.media="media",t.relationship="relationship",t.alteration="alteration",t.csv="csv",t.parquet="parquet",t.jsonl="jsonl",t.sqlite="sqlite",t))(f||{}),w=(t=>(t.user="user",t.group="group",t.folder="folder",t.schema="schema",t.content="content",t.acl="acl",t.comment="comment",t.reaction="reaction",t.media="media",t.locator="locator",t.relationship="relationship",t.alteration="alteration",t.history="history",t.space="space",t.branch="branch",t.permission="permission",t.role="role",t.ticket="ticket",t.json="json",t.post="post",t.plugin_wrapper="plugin_wrapper",t.notification="notification",t.jsonl="jsonl",t.csv="csv",t.sqlite="sqlite",t.parquet="parquet",t))(w||{}),u=(t=>(t.text="text",t.html="html",t.markdown="markdown",t.json="json",t.image="image",t.python="python",t.pdf="pdf",t.audio="audio",t.video="video",t.jsonl="jsonl",t.apk="apk",t.csv="csv",t.sqlite="sqlite",t.parquet="parquet",t))(u||{});class n{static setAxiosInstance(a){n.axiosDmartInstance=a}static getAxiosInstance(){if(!n.axiosDmartInstance)throw new Error("Axios instance is not set. Please set it using setAxiosInstance method.");return n.axiosDmartInstance}static getHeaders(){return e}static setHeaders(a){Object.assign(e,a)}static getBaseURL(){return n.axiosDmartInstance.defaults.baseURL}static set setBaseURL(a){n.axiosDmartInstance.defaults.baseURL=a}static getToken(){return e.Authorization?e.Authorization.replace("Bearer ",""):null}static setToken(a){e.Authorization=`Bearer ${a}`}static async login(a,s){var c;const o=(await n.axiosDmartInstance.post("user/login",{shortname:a,password:s},{headers:e})).data;return o.status==p.success&&o.records.length>0&&(e.Authorization="Bearer "+((c=o.records[0])==null?void 0:c.attributes.access_token)),o}static async loginBy(a,s){var r;try{const c=(await n.axiosDmartInstance.post("user/login",{...a,password:s},{headers:e})).data;return c.status==p.success&&c.records.length>0&&(e.Authorization="Bearer "+((r=c.records[0])==null?void 0:r.attributes.access_token)),c}catch(o){throw o}}static async logout(){try{const{data:a}=await n.axiosDmartInstance.post("user/logout",{},{headers:e});return a}catch(a){throw a}}static async createUser(a){try{const{data:s}=await n.axiosDmartInstance.post("user/create",a,{headers:e});return s}catch(s){throw s}}static async updateUser(a){try{const{data:s}=await n.axiosDmartInstance.post("user/profile",a,{headers:e});return s}catch(s){throw s}}static async checkExisting(a,s){try{const{data:r}=await n.axiosDmartInstance.get(`user/check-existing?${a}=${s}`,{headers:e});return r}catch(r){throw r}}static async getProfile(){var a,s,r;try{const{data:o}=await n.axiosDmartInstance.get("user/profile",{headers:e});return typeof localStorage<"u"&&o.status==="success"&&(localStorage.setItem("permissions",JSON.stringify((a=((o==null?void 0:o.records)??[{}])[0])==null?void 0:a.attributes.permissions)),localStorage.setItem("roles",JSON.stringify((r=(s=((o==null?void 0:o.records)??[{}])[0])==null?void 0:s.attributes)==null?void 0:r.roles))),o}catch(o){throw o}}static async query(a,s=i.managed){try{a.type!=h.spaces&&(a.sort_type=a.sort_type||m.ascending,a.sort_by=a.sort_by||"created_at"),a.subpath=a.subpath.replace(/\/+/g,"/");const{data:r}=await n.axiosDmartInstance.post(`${s}/query`,a,{headers:e});return r}catch(r){throw r}}static async csv(a){try{a.sort_type=a.sort_type||m.ascending,a.sort_by="created_at",a.subpath=a.subpath.replace(/\/+/g,"/");const{data:s}=await n.axiosDmartInstance.post("managed/csv",a,{headers:e});return s}catch(s){throw s}}static async resourcesFromCsv(a){try{let s=`/managed/resources_from_csv/${a.resourceType}/${a.space_name}/${a.subpath}`;const r={};a.schema&&(s+=`/${a.schema}`);let o=new FormData;o.append("resources_file",a.payload),a.isUpdate&&(r.is_update=a.isUpdate);const c={"Content-Type":"multipart/form-data"},{data:l}=await n.axiosDmartInstance.post(s,o,{headers:c,params:r});return l}catch(s){return s}}static async request(a){const s=await n.axiosDmartInstance.post("managed/request",a,{headers:e});return s==null?void 0:s.data}static async retrieveEntry(a,s=i.managed){try{a.validate_schema===null&&(a.validate_schema=!0),(!a.subpath||a.subpath=="/")&&(a.subpath="__root__");const r=`${s}/entry/${a.resource_type}/${a.space_name}/${a.subpath}/${a.shortname}?retrieve_json_payload=${a.retrieve_json_payload}&retrieve_attachments=${a.retrieve_attachments}&validate_schema=${a.validate_schema}`,{data:o}=await n.axiosDmartInstance.get(`${r.replace(/\/+/g,"/")}`,{headers:e});return o}catch(r){throw r}}static async uploadWithPayload(a,s=i.managed){const r={resource_type:a.resource_type,subpath:a.subpath,shortname:a.shortname,attributes:a.attributes};a.attributes!==null&&Object.keys(a.attributes).length===0?r.attributes={is_active:!0,payload:{body:{}}}:Object.keys(a.attributes).includes("is_active")||(r.attributes.is_active=!0);const o=new Blob([JSON.stringify(r)],{type:"application/json"}),c=new FormData;c.append("space_name",a.space_name),c.append("request_record",o),c.append("payload_file",a.payload_file);const l={"Content-Type":"multipart/form-data"};try{const{data:d}=await n.axiosDmartInstance.post(`${s}/resource_with_payload`,c,{headers:l});return d}catch(d){throw d}}static async fetchDataAsset(a){try{const{data:s}=await n.axiosDmartInstance.post("managed/data-asset",{space_name:a.spaceName,resource_type:a.resourceType,data_asset_type:a.dataAssetType,subpath:a.subpath,shortname:a.shortname,query_string:a.query_string??"SELECT * FROM file",filter_data_assets:a.filter_data_assets},{headers:e});return s}catch(s){throw s}}static async getSpaces(){return await this.query({type:h.spaces,space_name:"management",subpath:"/",search:"",limit:100})}static async getChildren(a){return a.limit===null&&(a.limit=20),a.offset===null&&(a.offset=0),a.restrict_types===null&&(a.restrict_types=[]),await this.query({type:h.search,space_name:a.space_name,subpath:a.subpath,filter_types:a.restrict_types,exact_subpath:!0,search:a.search,limit:a.limit,offset:a.offset})}static getAttachmentUrl(a,s=i.managed){const r=a.subpath.replace(/\/+$/,"");return`${n.axiosDmartInstance.defaults.baseURL}`+`/${s}/payload/${a.resource_type}/${a.space_name}/${r}/${a.parent_shortname}/${a.shortname}${a.ext===null?"":`.${a.ext}`}`.replaceAll("//","/")}static async getSpaceHealth(a){try{const{data:s}=await n.axiosDmartInstance.get(`managed/health/${a}`,{headers:e});return s}catch(s){throw s}}static async getPayload(a,s=i.managed){try{let r=`${s}/payload/${a.resource_type}/${a.space_name}/${a.subpath}/${a.shortname}`;a.schemaShortname&&(r+=`.${a.schemaShortname}`),r+=`.${a.ext}`;const{data:o}=await n.axiosDmartInstance.get(r,{headers:e});return o}catch(r){throw r}}static async progressTicket(a){try{const s={};a.resolution&&(s.resolution=a.resolution),a.comment&&(s.comment=a.comment);const{data:r}=await n.axiosDmartInstance.put(`managed/progress-ticket/${a.space_name}/${a.subpath}/${a.shortname}/${a.action}`,s,{headers:e});return r}catch(s){throw s}}static async submit(a){try{var s=`public/submit/${a.spaceName}`;a.resourceType&&(s+=`/${a.resourceType}`),a.workflowShortname&&(s+=`/${a.workflowShortname}`),s+=`/${a.schemaShortname}/${a.subpath}`;const{data:r}=await n.axiosDmartInstance.post(s,a.record,{headers:e});return r}catch(r){throw r}}static async getManifest(){try{const{data:a}=await n.axiosDmartInstance.get("info/manifest",{headers:e});return a}catch(a){throw a}}static async getSettings(){try{const{data:a}=await n.axiosDmartInstance.get("info/settings",{headers:e});return a}catch(a){throw a}}static async otpRequest(a,s=null){try{const r={...e};s&&(r["Accept-Language"]=s);const{data:o}=await n.axiosDmartInstance.post("user/otp-request",a,{headers:r});return o}catch(r){throw r}}static async otpRequestLogin(a,s=null){try{const r={...e};s&&(r["Accept-Language"]=s);const{data:o}=await n.axiosDmartInstance.post("user/otp-request-login",a,{headers:r});return o}catch(r){throw r}}static async passwordResetRequest(a){try{const{data:s}=await n.axiosDmartInstance.post("user/password-reset-request",a,{headers:e});return s}catch(s){throw s}}static async confirmOtp(a){try{const{data:s}=await n.axiosDmartInstance.post("user/otp-confirm",a,{headers:e});return s}catch(s){throw s}}static async userReset(a){try{const{data:s}=await n.axiosDmartInstance.post("user/reset",{shortname:a},{headers:e});return s}catch(s){throw s}}static async validatePassword(a){try{const{data:s}=await n.axiosDmartInstance.post("user/validate_password",{password:a},{headers:e});return s}catch(s){throw s}}}export{u as C,n as D,h as Q,w as R,m as S,g as a,f as b,e as h};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const w=e=>Array.isArray(e),X=e=>e!==null&&typeof e=="object"&&!w(e),Y=e=>typeof e=="string",A=(e,n)=>e===n?!0:e!==null&&n!==null&&typeof e=="object"&&typeof n=="object"&&Object.keys(e).length===Object.keys(n).length&&Object.entries(e).every(([t,r])=>A(r,n[t]));function p(e){return(...n)=>{const t=n.map(s=>g(s)),r=t[0],o=t[1];return t.length===1?s=>e(r(s)):t.length===2?s=>e(r(s),o(s)):s=>e(...t.map(h=>h(s)))}}const B={boolean:0,number:1,string:2},F=3,T=(e,n)=>typeof e==typeof n&&typeof e in B?e>n:!1,ee=(e,n)=>A(e,n)||T(e,n),D=(e,n)=>typeof e==typeof n&&typeof e in B?e<n:!1,ne=(e,n)=>A(e,n)||D(e,n),_={pipe:(...e)=>{const n=e.map(t=>g(t));return t=>n.reduce((r,o)=>o(r),t)},object:e=>{const n=Object.keys(e).map(t=>[t,g(e[t])]);return t=>{const r={};for(const[o,s]of n)r[o]=s(t);return r}},array:(...e)=>{const n=e.map(t=>g(t));return t=>n.map(r=>r(t))},get:(...e)=>{if(e.length===0)return n=>n??null;if(e.length===1){const n=e[0];return t=>(t==null?void 0:t[n])??null}return n=>{let t=n;for(const r of e)t=t==null?void 0:t[r];return t??null}},map:e=>{const n=g(e);return t=>t.map(n)},mapObject:e=>{const n=g(e);return t=>{const r={};for(const o of Object.keys(t)){const s=n({key:o,value:t[o]});r[s.key]=s.value}return r}},mapKeys:e=>{const n=g(e);return t=>{const r={};for(const o of Object.keys(t)){const s=n(o);r[s]=t[o]}return r}},mapValues:e=>{const n=g(e);return t=>{const r={};for(const o of Object.keys(t))r[o]=n(t[o]);return r}},filter:e=>{const n=g(e);return t=>t.filter(r=>L(n(r)))},sort:(e=["get"],n)=>{const t=g(e),r=n==="desc"?-1:1;function o(s,h){const i=t(s),j=t(h);if(typeof i!=typeof j){const I=B[typeof i]??F,q=B[typeof j]??F;return I>q?r:I<q?-r:0}return typeof i in B?i>j?r:i<j?-r:0:0}return s=>s.slice().sort(o)},reverse:()=>e=>e.toReversed(),pick:(...e)=>{const n=e.map(([r,...o])=>[o[o.length-1],_.get(...o)]),t=(r,o)=>{const s={};for(const[h,i]of o)s[h]=i(r);return s};return r=>w(r)?r.map(o=>t(o,n)):t(r,n)},groupBy:e=>{const n=g(e);return t=>{const r={};for(const o of t){const s=n(o);r[s]?r[s].push(o):r[s]=[o]}return r}},keyBy:e=>{const n=g(e);return t=>{const r={};for(const o of t){const s=n(o);s in r||(r[s]=o)}return r}},flatten:()=>e=>e.flat(),join:(e="")=>n=>n.join(e),split:p((e,n)=>n!==void 0?e.split(n):e.trim().split(/\s+/)),substring:p((e,n,t)=>e.slice(Math.max(n,0),t)),uniq:()=>e=>{const n=[];for(const t of e)n.findIndex(r=>A(r,t))===-1&&n.push(t);return n},uniqBy:e=>n=>Object.values(_.keyBy(e)(n)),limit:e=>n=>n.slice(0,Math.max(e,0)),size:()=>e=>e.length,keys:()=>Object.keys,values:()=>Object.values,prod:()=>e=>z(e,(n,t)=>n*t),sum:()=>e=>w(e)?e.reduce((n,t)=>n+t,0):R(),average:()=>e=>w(e)?e.length>0?e.reduce((n,t)=>n+t)/e.length:null:R(),min:()=>e=>z(e,(n,t)=>Math.min(n,t)),max:()=>e=>z(e,(n,t)=>Math.max(n,t)),and:p((...e)=>z(e,(n,t)=>!!(n&&t))),or:p((...e)=>z(e,(n,t)=>!!(n||t))),not:p(e=>!e),exists:e=>{const n=e.slice(1),t=n.pop(),r=_.get(...n);return o=>{const s=r(o);return!!s&&Object.hasOwnProperty.call(s,t)}},if:(e,n,t)=>{const r=g(e),o=g(n),s=g(t);return h=>L(r(h))?o(h):s(h)},in:(e,n)=>{const t=g(e),r=g(n);return o=>{const s=t(o);return r(o).findIndex(h=>A(h,s))!==-1}},"not in":(e,n)=>{const t=_.in(e,n);return r=>!t(r)},regex:(e,n,t)=>{const r=new RegExp(n,t),o=g(e);return s=>r.test(o(s))},eq:p(A),gt:p(T),gte:p(ee),lt:p(D),lte:p(ne),ne:p((e,n)=>!A(e,n)),add:p((e,n)=>e+n),subtract:p((e,n)=>e-n),multiply:p((e,n)=>e*n),divide:p((e,n)=>e/n),mod:p((e,n)=>e%n),pow:p((e,n)=>e**n),abs:p(Math.abs),round:p((e,n=0)=>+`${Math.round(+`${e}e${n}`)}e${-n}`),number:p(e=>{const n=Number(e);return Number.isNaN(Number(e))?null:n}),string:p(String)},L=e=>e!==null&&e!==0&&e!==!1,z=(e,n)=>(w(e)||R(),e.length===0?null:e.reduce(n)),R=()=>{U("Array expected")},U=e=>{throw new TypeError(e)},K=[];function g(e,n){K.unshift({..._,...K[0]});try{const t=w(e)?te(e,K[0]):X(e)?U(`Function notation ["object", {...}] expected but got ${JSON.stringify(e)}`):()=>e;return r=>{try{return t(r)}catch(o){throw o.jsonquery=[{data:r,query:e},...o.jsonquery??[]],o}}}finally{K.shift()}}function te(e,n){const[t,...r]=e,o=n[t];return o||U(`Unknown function '${t}'`),o(...r)}const G=[{pow:"^"},{multiply:"*",divide:"/",mod:"%"},{add:"+",subtract:"-"},{gt:">",gte:">=",lt:"<",lte:"<=",in:"in","not in":"not in"},{eq:"==",ne:"!="},{and:"and"},{or:"or"},{pipe:"|"}],re=["|","and","or"],H=["|","and","or","*","/","%","+","-"];function Q(e,n){if(!w(n))throw new Error("Invalid custom operators");return n.reduce(oe,e)}function oe(e,{name:n,op:t,at:r,after:o,before:s}){if(r)return e.map(j=>Object.values(j).includes(r)?{...j,[n]:t}:j);const h=o??s,i=e.findIndex(j=>Object.values(j).includes(h));if(i!==-1)return e.toSpliced(i+(o?1:0),0,{[n]:t});throw new Error("Invalid custom operator")}const se=/^[a-zA-Z_$][a-zA-Z\d_$]*$/,ce=/^[a-zA-Z_$][a-zA-Z\d_$]*/,ue=/^"(?:[^"\\]|\\.)*"/,ie=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,ae=/^(0|[1-9][0-9]*)/,le=/^(true|false|null)/,fe=/^[ \n\t\r]+/;function pe(e,n){const t=[],r=Q(G,t),o=Object.assign({},...r),s=re.concat(t.filter(c=>c.vararg).map(c=>c.op)),h=H.concat(t.filter(c=>c.leftAssociative).map(c=>c.op)),i=(c=r.length-1)=>{const d=r[c];if(!d)return I();const y=e[u]==="(";let v=i(c-1);for(;;){f();const J=u,M=j(d);if(!M)break;const V=i(c-1),W=v[0],C=M===W&&!y;if(C&&!h.includes(o[M])){u=J;break}v=C&&s.includes(o[M])?[...v,V]:[M,v,V]}return v},j=c=>{const d=Object.keys(c).sort((y,v)=>v.length-y.length);for(const y of d){const v=c[y];if(e.substring(u,u+v.length)===v)return u+=v.length,f(),y}},I=()=>{if(f(),e[u]==="("){u++;const c=i();return O(")"),c}return q()},q=()=>{if(e[u]==="."){const c=[];for(;e[u]===".";)u++,c.push(a()??m()??$()??S("Property expected"));return["get",...c]}return Z()},Z=()=>{const c=u,d=m();if(f(),!d||e[u]!=="(")return u=c,E();u++,f();const y=e[u]!==")"?[i()]:[];for(;u<e.length&&e[u]!==")";)f(),O(","),y.push(i());return O(")"),[d,...y]},E=()=>{if(e[u]==="{"){u++,f();const c={};let d=!0;for(;u<e.length&&e[u]!=="}";){d?d=!1:(O(","),f());const y=a()??m()??$()??S("Key expected");f(),O(":"),c[y]=i()}return O("}"),["object",c]}return l()},l=()=>{if(e[u]==="["){u++,f();const c=[];let d=!0;for(;u<e.length&&e[u]!=="]";)d?d=!1:(O(","),f()),c.push(i());return O("]"),["array",...c]}return a()??b()??x()},a=()=>k(ue,JSON.parse),m=()=>k(ce,c=>c),b=()=>k(ie,JSON.parse),$=()=>k(ae,JSON.parse),x=()=>{const c=k(le,JSON.parse);if(c!==void 0)return c;S("Value expected")},N=()=>{f(),u<e.length&&S(`Unexpected part '${e.substring(u)}'`)},k=(c,d)=>{const y=e.substring(u).match(c);if(y)return u+=y[0].length,d(y[0])},f=()=>k(fe,c=>c),O=c=>{e[u]!==c&&S(`Character '${c}' expected`),u++},S=(c,d=u)=>{throw new SyntaxError(`${c} (pos: ${d})`)};let u=0;const P=i();return N(),P}const de=40,ge=" ",ye=(e,n)=>{const t=ge,r=[],o=Q(G,r),s=Object.assign({},...o),h=H.concat(r.filter(l=>l.leftAssociative).map(l=>l.op)),i=(l,a,m=!1)=>w(l)?j(l,a,m):JSON.stringify(l),j=(l,a,m)=>{const[b,...$]=l;if(b==="get"&&$.length>0)return q($);if(b==="object")return I($[0],a);if(b==="array"){const f=$.map(O=>i(O,a));return E(f,["[",", ","]"],[`[
|
|
2
|
-
${a+t}`,`,
|
|
3
|
-
${a+t}`,`
|
|
4
|
-
${a}]`])}const x=s[b];if(x){const f=m?"(":"",O=m?")":"",S=$.map((u,P)=>{const c=u==null?void 0:u[0],d=o.findIndex(J=>b in J),y=o.findIndex(J=>c in J),v=d<y||d===y&&P>0||b===c&&!h.includes(x);return i(u,a+t,v)});return E(S,[f,` ${x} `,O],[f,`
|
|
5
|
-
${a+t}${x} `,O])}const N=$.length===1?a:a+t,k=$.map(f=>i(f,N));return E(k,[`${b}(`,", ",")"],$.length===1?[`${b}(`,`,
|
|
6
|
-
${a}`,")"]:[`${b}(
|
|
7
|
-
${N}`,`,
|
|
8
|
-
${N}`,`
|
|
9
|
-
${a})`])},I=(l,a)=>{const m=a+t,b=Object.entries(l).map(([$,x])=>`${Z($)}: ${i(x,m)}`);return E(b,["{ ",", "," }"],[`{
|
|
10
|
-
${m}`,`,
|
|
11
|
-
${m}`,`
|
|
12
|
-
${a}}`])},q=l=>l.map(a=>`.${Z(a)}`).join(""),Z=l=>se.test(l)?l:JSON.stringify(l),E=(l,[a,m,b],[$,x,N])=>a.length+l.reduce((k,f)=>k+f.length+m.length,0)-m.length+b.length<=de?a+l.join(m)+b:$+l.join(x)+N;return i(e,"")};function he(e,n,t){return g(Y(n)?pe(n):n)(e)}export{he as d,ye as m,pe as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let Ht=0;class Ot{constructor(t,e){this.from=t,this.to=e}}class O{constructor(t={}){this.id=Ht++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=t.combine||null}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof t!="function"&&(t=$.match(t)),e=>{let i=t(e);return i===void 0?null:[this,i]}}}O.closedBy=new O({deserialize:l=>l.split(" ")});O.openedBy=new O({deserialize:l=>l.split(" ")});O.group=new O({deserialize:l=>l.split(" ")});O.isolate=new O({deserialize:l=>{if(l&&l!="rtl"&&l!="ltr"&&l!="auto")throw new RangeError("Invalid value for isolate: "+l);return l||"auto"}});O.contextHash=new O({perNode:!0});O.lookAhead=new O({perNode:!0});O.mounted=new O({perNode:!0});class kt{constructor(t,e,i){this.tree=t,this.overlay=e,this.parser=i}static get(t){return t&&t.props&&t.props[O.mounted.id]}}const Jt=Object.create(null);class ${constructor(t,e,i,s=0){this.name=t,this.props=e,this.id=i,this.flags=s}static define(t){let e=t.props&&t.props.length?Object.create(null):Jt,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),s=new $(t.name||"",e,t.id,i);if(t.props){for(let n of t.props)if(Array.isArray(n)||(n=n(s)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[n[0].id]=n[1]}}return s}prop(t){return this.props[t.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(t){if(typeof t=="string"){if(this.name==t)return!0;let e=this.prop(O.group);return e?e.indexOf(t)>-1:!1}return this.id==t}static match(t){let e=Object.create(null);for(let i in t)for(let s of i.split(" "))e[s]=t[i];return i=>{for(let s=i.prop(O.group),n=-1;n<(s?s.length:0);n++){let r=e[n<0?i.name:s[n]];if(r)return r}}}}$.none=new $("",Object.create(null),0,8);class Tt{constructor(t){this.types=t;for(let e=0;e<t.length;e++)if(t[e].id!=e)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let e=[];for(let i of this.types){let s=null;for(let n of t){let r=n(i);if(r){s||(s=Object.assign({},i.props));let h=r[1],o=r[0];o.combine&&o.id in s&&(h=o.combine(s[o.id],h)),s[o.id]=h}}e.push(s?new $(i.name,s,i.id,i.flags):i)}return new Tt(e)}}const ft=new WeakMap,_t=new WeakMap;var R;(function(l){l[l.ExcludeBuffers=1]="ExcludeBuffers",l[l.IncludeAnonymous=2]="IncludeAnonymous",l[l.IgnoreMounts=4]="IgnoreMounts",l[l.IgnoreOverlays=8]="IgnoreOverlays"})(R||(R={}));class I{constructor(t,e,i,s,n){if(this.type=t,this.children=e,this.positions=i,this.length=s,this.props=null,n&&n.length){this.props=Object.create(null);for(let[r,h]of n)this.props[typeof r=="number"?r:r.id]=h}}toString(){let t=kt.get(this);if(t&&!t.overlay)return t.tree.toString();let e="";for(let i of this.children){let s=i.toString();s&&(e&&(e+=","),e+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(e.length?"("+e+")":""):e}cursor(t=0){return new Ct(this.topNode,t)}cursorAt(t,e=0,i=0){let s=ft.get(this)||this.topNode,n=new Ct(s);return n.moveTo(t,e),ft.set(this,n._tree),n}get topNode(){return new E(this,0,0,null)}resolve(t,e=0){let i=ht(ft.get(this)||this.topNode,t,e,!1);return ft.set(this,i),i}resolveInner(t,e=0){let i=ht(_t.get(this)||this.topNode,t,e,!0);return _t.set(this,i),i}resolveStack(t,e=0){return ee(this,t,e)}iterate(t){let{enter:e,leave:i,from:s=0,to:n=this.length}=t,r=t.mode||0,h=(r&R.IncludeAnonymous)>0;for(let o=this.cursor(r|R.IncludeAnonymous);;){let a=!1;if(o.from<=n&&o.to>=s&&(!h&&o.type.isAnonymous||e(o)!==!1)){if(o.firstChild())continue;a=!0}for(;a&&i&&(h||!o.type.isAnonymous)&&i(o),!o.nextSibling();){if(!o.parent())return;a=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:It($.none,this.children,this.positions,0,this.children.length,0,this.length,(e,i,s)=>new I(this.type,e,i,s,this.propValues),t.makeTree||((e,i,s)=>new I($.none,e,i,s)))}static build(t){return ie(t)}}I.empty=new I($.none,[],[],0);class Rt{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Rt(this.buffer,this.index)}}class J{constructor(t,e,i){this.buffer=t,this.length=e,this.set=i}get type(){return $.none}toString(){let t=[];for(let e=0;e<this.buffer.length;)t.push(this.childString(e)),e=this.buffer[e+3];return t.join(",")}childString(t){let e=this.buffer[t],i=this.buffer[t+3],s=this.set.types[e],n=s.name;if(/\W/.test(n)&&!s.isError&&(n=JSON.stringify(n)),t+=4,i==t)return n;let r=[];for(;t<i;)r.push(this.childString(t)),t=this.buffer[t+3];return n+"("+r.join(",")+")"}findChild(t,e,i,s,n){let{buffer:r}=this,h=-1;for(let o=t;o!=e&&!(Xt(n,s,r[o+1],r[o+2])&&(h=o,i>0));o=r[o+3]);return h}slice(t,e,i){let s=this.buffer,n=new Uint16Array(e-t),r=0;for(let h=t,o=0;h<e;){n[o++]=s[h++],n[o++]=s[h++]-i;let a=n[o++]=s[h++]-i;n[o++]=s[h++]-t,r=Math.max(r,a)}return new J(n,r,this.set)}}function Xt(l,t,e,i){switch(l){case-2:return e<t;case-1:return i>=t&&e<t;case 0:return e<t&&i>t;case 1:return e<=t&&i>t;case 2:return i>t;case 4:return!0}}function ht(l,t,e,i){for(var s;l.from==l.to||(e<1?l.from>=t:l.from>t)||(e>-1?l.to<=t:l.to<t);){let r=!i&&l instanceof E&&l.index<0?null:l.parent;if(!r)return l;l=r}let n=i?0:R.IgnoreOverlays;if(i)for(let r=l,h=r.parent;h;r=h,h=r.parent)r instanceof E&&r.index<0&&((s=h.enter(t,e,n))===null||s===void 0?void 0:s.from)!=r.from&&(l=h);for(;;){let r=l.enter(t,e,n);if(!r)return l;l=r}}class Yt{cursor(t=0){return new Ct(this,t)}getChild(t,e=null,i=null){let s=Dt(this,t,e,i);return s.length?s[0]:null}getChildren(t,e=null,i=null){return Dt(this,t,e,i)}resolve(t,e=0){return ht(this,t,e,!1)}resolveInner(t,e=0){return ht(this,t,e,!0)}matchContext(t){return vt(this.parent,t)}enterUnfinishedNodesBefore(t){let e=this.childBefore(t),i=this;for(;e;){let s=e.lastChild;if(!s||s.to!=e.to)break;s.type.isError&&s.from==s.to?(i=e,e=s.prevSibling):e=s}return i}get node(){return this}get next(){return this.parent}}class E extends Yt{constructor(t,e,i,s){super(),this._tree=t,this.from=e,this.index=i,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,e,i,s,n=0){for(let r=this;;){for(let{children:h,positions:o}=r._tree,a=e>0?h.length:-1;t!=a;t+=e){let c=h[t],f=o[t]+r.from;if(Xt(s,i,f,f+c.length)){if(c instanceof J){if(n&R.ExcludeBuffers)continue;let p=c.findChild(0,c.buffer.length,e,i-f,s);if(p>-1)return new H(new Kt(r,c,t,f),null,p)}else if(n&R.IncludeAnonymous||!c.type.isAnonymous||zt(c)){let p;if(!(n&R.IgnoreMounts)&&(p=kt.get(c))&&!p.overlay)return new E(p.tree,f,t,r);let m=new E(c,f,t,r);return n&R.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(e<0?c.children.length-1:0,e,i,s)}}}if(n&R.IncludeAnonymous||!r.type.isAnonymous||(r.index>=0?t=r.index+e:t=e<0?-1:r._parent._tree.children.length,r=r._parent,!r))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}prop(t){return this._tree.prop(t)}enter(t,e,i=0){let s;if(!(i&R.IgnoreOverlays)&&(s=kt.get(this._tree))&&s.overlay){let n=t-this.from;for(let{from:r,to:h}of s.overlay)if((e>0?r<=n:r<n)&&(e<0?h>=n:h>n))return new E(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,i)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Dt(l,t,e,i){let s=l.cursor(),n=[];if(!s.firstChild())return n;if(e!=null){for(let r=!1;!r;)if(r=s.type.is(e),!s.nextSibling())return n}for(;;){if(i!=null&&s.type.is(i))return n;if(s.type.is(t)&&n.push(s.node),!s.nextSibling())return i==null?n:[]}}function vt(l,t,e=t.length-1){for(let i=l;e>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(t[e]&&t[e]!=i.name)return!1;e--}}return!0}class Kt{constructor(t,e,i,s){this.parent=t,this.buffer=e,this.index=i,this.start=s}}class H extends Yt{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,e,i){super(),this.context=t,this._parent=e,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}child(t,e,i){let{buffer:s}=this.context,n=s.findChild(this.index+4,s.buffer[this.index+3],t,e-this.context.start,i);return n<0?null:new H(this.context,this,n)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}prop(t){return this.type.prop(t)}enter(t,e,i=0){if(i&R.ExcludeBuffers)return null;let{buffer:s}=this.context,n=s.findChild(this.index+4,s.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return n<0?null:new H(this.context,this,n)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new H(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new H(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:i}=this.context,s=this.index+4,n=i.buffer[this.index+3];if(n>s){let r=i.buffer[this.index+1];t.push(i.slice(s,n,r)),e.push(0)}return new I(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Ut(l){if(!l.length)return null;let t=0,e=l[0];for(let n=1;n<l.length;n++){let r=l[n];(r.from>e.from||r.to<e.to)&&(e=r,t=n)}let i=e instanceof E&&e.index<0?null:e.parent,s=l.slice();return i?s[t]=i:s.splice(t,1),new te(s,e)}class te{constructor(t,e){this.heads=t,this.node=e}get next(){return Ut(this.heads)}}function ee(l,t,e){let i=l.resolveInner(t,e),s=null;for(let n=i instanceof E?i:i.context.parent;n;n=n.parent)if(n.index<0){let r=n.parent;(s||(s=[i])).push(r.resolve(t,e)),n=r}else{let r=kt.get(n.tree);if(r&&r.overlay&&r.overlay[0].from<=t&&r.overlay[r.overlay.length-1].to>=t){let h=new E(r.tree,r.overlay[0].from+n.from,-1,n);(s||(s=[i])).push(ht(h,t,e,!1))}}return s?Ut(s):i}class Ct{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof E)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let i=t._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return t?(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0):!1}yieldBuf(t,e){this.index=t;let{start:i,buffer:s}=this.buffer;return this.type=e||s.set.types[s.buffer[t]],this.from=i+s.buffer[t+1],this.to=i+s.buffer[t+2],!0}yield(t){return t?t instanceof E?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,i,this.mode));let{buffer:s}=this.buffer,n=s.findChild(this.index+4,s.buffer[this.index+3],t,e-this.buffer.start,i);return n<0?!1:(this.stack.push(this.index),this.yieldBuf(n))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,i=this.mode){return this.buffer?i&R.ExcludeBuffers?!1:this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&R.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&R.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode)):!1;let{buffer:e}=this.buffer,i=this.stack.length-1;if(t<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(e.findChild(s,this.index,-1,0,4))}else{let s=e.buffer[this.index+3];if(s<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,i,{buffer:s}=this;if(s){if(t>0){if(this.index<s.buffer.buffer.length)return!1}else for(let n=0;n<this.index;n++)if(s.buffer.buffer[n+3]<this.index)return!1;({index:e,parent:i}=s)}else({index:e,_parent:i}=this._tree);for(;i;{index:e,_parent:i}=i)if(e>-1)for(let n=e+t,r=t<0?-1:i._tree.children.length;n!=r;n+=t){let h=i._tree.children[n];if(this.mode&R.IncludeAnonymous||h instanceof J||!h.type.isAnonymous||zt(h))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,e););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,e=null,i=0;if(t&&t.context==this.buffer)t:for(let s=this.index,n=this.stack.length;n>=0;){for(let r=t;r;r=r._parent)if(r.index==s){if(s==this.index)return r;e=r,i=n+1;break t}s=this.stack[--n]}for(let s=i;s<this.stack.length;s++)e=new H(this.buffer,e,this.stack[s]);return this.bufferNode=new H(this.buffer,e,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,e){for(let i=0;;){let s=!1;if(this.type.isAnonymous||t(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&e&&e(this),s=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,s=!0}}}matchContext(t){if(!this.buffer)return vt(this.node.parent,t);let{buffer:e}=this.buffer,{types:i}=e.set;for(let s=t.length-1,n=this.stack.length-1;s>=0;n--){if(n<0)return vt(this._tree,t,s);let r=i[e.buffer[this.stack[n]]];if(!r.isAnonymous){if(t[s]&&t[s]!=r.name)return!1;s--}}return!0}}function zt(l){return l.children.some(t=>t instanceof J||!t.type.isAnonymous||zt(t))}function ie(l){var t;let{buffer:e,nodeSet:i,maxBufferLength:s=1024,reused:n=[],minRepeatType:r=i.types.length}=l,h=Array.isArray(e)?new Rt(e,e.length):e,o=i.types,a=0,c=0;function f(y,P,d,C,w,A){let{id:b,start:k,end:S,size:v}=h,T=c,Y=a;if(v<0)if(h.next(),v==-1){let Z=n[b];d.push(Z),C.push(k-y);return}else if(v==-3){a=b;return}else if(v==-4){c=b;return}else throw new RangeError(`Unrecognized record size: ${v}`);let rt=o[b],ot,K,Bt=k-y;if(S-k<=s&&(K=_(h.pos-P,w))){let Z=new Uint16Array(K.size-K.skip),D=h.pos-K.size,L=Z.length;for(;h.pos>D;)L=j(K.start,Z,L);ot=new J(Z,S-K.start,i),Bt=K.start-y}else{let Z=h.pos-v;h.next();let D=[],L=[],tt=b>=r?b:-1,it=0,at=S;for(;h.pos>Z;)tt>=0&&h.id==tt&&h.size>=0?(h.end<=at-s&&(x(D,L,k,it,h.end,at,tt,T,Y),it=D.length,at=h.end),h.next()):A>2500?p(k,Z,D,L):f(k,Z,D,L,tt,A+1);if(tt>=0&&it>0&&it<D.length&&x(D,L,k,it,k,at,tt,T,Y),D.reverse(),L.reverse(),tt>-1&&it>0){let Qt=m(rt,Y);ot=It(rt,D,L,0,D.length,0,S-k,Qt,Qt)}else ot=z(rt,D,L,S-k,T-S,Y)}d.push(ot),C.push(Bt)}function p(y,P,d,C){let w=[],A=0,b=-1;for(;h.pos>P;){let{id:k,start:S,end:v,size:T}=h;if(T>4)h.next();else{if(b>-1&&S<b)break;b<0&&(b=v-s),w.push(k,S,v),A++,h.next()}}if(A){let k=new Uint16Array(A*4),S=w[w.length-2];for(let v=w.length-3,T=0;v>=0;v-=3)k[T++]=w[v],k[T++]=w[v+1]-S,k[T++]=w[v+2]-S,k[T++]=T;d.push(new J(k,w[2]-S,i)),C.push(S-y)}}function m(y,P){return(d,C,w)=>{let A=0,b=d.length-1,k,S;if(b>=0&&(k=d[b])instanceof I){if(!b&&k.type==y&&k.length==w)return k;(S=k.prop(O.lookAhead))&&(A=C[b]+k.length+S)}return z(y,d,C,w,A,P)}}function x(y,P,d,C,w,A,b,k,S){let v=[],T=[];for(;y.length>C;)v.push(y.pop()),T.push(P.pop()+d-w);y.push(z(i.types[b],v,T,A-w,k-A,S)),P.push(w-d)}function z(y,P,d,C,w,A,b){if(A){let k=[O.contextHash,A];b=b?[k].concat(b):[k]}if(w>25){let k=[O.lookAhead,w];b=b?[k].concat(b):[k]}return new I(y,P,d,C,b)}function _(y,P){let d=h.fork(),C=0,w=0,A=0,b=d.end-s,k={size:0,start:0,skip:0};t:for(let S=d.pos-y;d.pos>S;){let v=d.size;if(d.id==P&&v>=0){k.size=C,k.start=w,k.skip=A,A+=4,C+=4,d.next();continue}let T=d.pos-v;if(v<0||T<S||d.start<b)break;let Y=d.id>=r?4:0,rt=d.start;for(d.next();d.pos>T;){if(d.size<0)if(d.size==-3||d.size==-4)Y+=4;else break t;else d.id>=r&&(Y+=4);d.next()}w=rt,C+=v,A+=Y}return(P<0||C==y)&&(k.size=C,k.start=w,k.skip=A),k.size>4?k:void 0}function j(y,P,d){let{id:C,start:w,end:A,size:b}=h;if(h.next(),b>=0&&C<r){let k=d;if(b>4){let S=h.pos-(b-4);for(;h.pos>S;)d=j(y,P,d)}P[--d]=k,P[--d]=A-y,P[--d]=w-y,P[--d]=C}else b==-3?a=C:b==-4&&(c=C);return d}let B=[],N=[];for(;h.pos>0;)f(l.start||0,l.bufferStart||0,B,N,-1,0);let F=(t=l.length)!==null&&t!==void 0?t:B.length?N[0]+B[0].length:0;return new I(o[l.topID],B.reverse(),N.reverse(),F)}const Mt=new WeakMap;function gt(l,t){if(!l.isAnonymous||t instanceof J||t.type!=l)return 1;let e=Mt.get(t);if(e==null){e=1;for(let i of t.children){if(i.type!=l||!(i instanceof I)){e=1;break}e+=gt(l,i)}Mt.set(t,e)}return e}function It(l,t,e,i,s,n,r,h,o){let a=0;for(let x=i;x<s;x++)a+=gt(l,t[x]);let c=Math.ceil(a*1.5/8),f=[],p=[];function m(x,z,_,j,B){for(let N=_;N<j;){let F=N,y=z[N],P=gt(l,x[N]);for(N++;N<j;N++){let d=gt(l,x[N]);if(P+d>=c)break;P+=d}if(N==F+1){if(P>c){let d=x[F];m(d.children,d.positions,0,d.children.length,z[F]+B);continue}f.push(x[F])}else{let d=z[N-1]+x[N-1].length-y;f.push(It(l,x,z,F,N,y,d,null,o))}p.push(y+B-n)}}return m(t,e,i,s,0),(h||o)(f,p,r)}class At{constructor(t,e,i,s,n=!1,r=!1){this.from=t,this.to=e,this.tree=i,this.offset=s,this.open=(n?1:0)|(r?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,e=[],i=!1){let s=[new At(0,t.length,t,0,!1,i)];for(let n of e)n.to>t.length&&s.push(n);return s}static applyChanges(t,e,i=128){if(!e.length)return t;let s=[],n=1,r=t.length?t[0]:null;for(let h=0,o=0,a=0;;h++){let c=h<e.length?e[h]:null,f=c?c.fromA:1e9;if(f-o>=i)for(;r&&r.from<f;){let p=r;if(o>=p.from||f<=p.to||a){let m=Math.max(p.from,o)-a,x=Math.min(p.to,f)-a;p=m>=x?null:new At(m,x,p.tree,p.offset+a,h>0,!!c)}if(p&&s.push(p),r.to>f)break;r=n<t.length?t[n++]:null}if(!c)break;o=c.toA,a=c.toA-c.toB}return s}}class se{startParse(t,e,i){return typeof t=="string"&&(t=new re(t)),i=i?i.length?i.map(s=>new Ot(s.from,s.to)):[new Ot(0,0)]:[new Ot(0,t.length)],this.createParse(t,e||[],i)}parse(t,e,i){let s=this.startParse(t,e,i);for(;;){let n=s.advance();if(n)return n}}}class re{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}new O({perNode:!0});let ne=0;class M{constructor(t,e,i,s){this.name=t,this.set=e,this.base=i,this.modified=s,this.id=ne++}toString(){let{name:t}=this;for(let e of this.modified)e.name&&(t=`${e.name}(${t})`);return t}static define(t,e){let i=typeof t=="string"?t:"?";if(t instanceof M&&(e=t),e!=null&&e.base)throw new Error("Can not derive from a modified tag");let s=new M(i,[],null,[]);if(s.set.push(s),e)for(let n of e.set)s.set.push(n);return s}static defineModifier(t){let e=new xt(t);return i=>i.modified.indexOf(e)>-1?i:xt.get(i.base||i,i.modified.concat(e).sort((s,n)=>s.id-n.id))}}let he=0;class xt{constructor(t){this.name=t,this.instances=[],this.id=he++}static get(t,e){if(!e.length)return t;let i=e[0].instances.find(h=>h.base==t&&le(e,h.modified));if(i)return i;let s=[],n=new M(t.name,s,t,e);for(let h of e)h.instances.push(n);let r=oe(e);for(let h of t.set)if(!h.modified.length)for(let o of r)s.push(xt.get(h,o));return n}}function le(l,t){return l.length==t.length&&l.every((e,i)=>e==t[i])}function oe(l){let t=[[]];for(let e=0;e<l.length;e++)for(let i=0,s=t.length;i<s;i++)t.push(t[i].concat(l[e]));return t.sort((e,i)=>i.length-e.length)}function ae(l){let t=Object.create(null);for(let e in l){let i=l[e];Array.isArray(i)||(i=[i]);for(let s of e.split(" "))if(s){let n=[],r=2,h=s;for(let f=0;;){if(h=="..."&&f>0&&f+3==s.length){r=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(h);if(!p)throw new RangeError("Invalid path: "+s);if(n.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),f+=p[0].length,f==s.length)break;let m=s[f++];if(f==s.length&&m=="!"){r=0;break}if(m!="/")throw new RangeError("Invalid path: "+s);h=s.slice(f)}let o=n.length-1,a=n[o];if(!a)throw new RangeError("Invalid path: "+s);let c=new lt(i,r,o>0?n.slice(0,o):null);t[a]=c.sort(t[a])}}return qt.add(t)}const qt=new O({combine(l,t){let e,i,s;for(;l||t;){if(!l||t&&l.depth>=t.depth?(s=t,t=t.next):(s=l,l=l.next),e&&e.mode==s.mode&&!s.context&&!e.context)continue;let n=new lt(s.tags,s.mode,s.context);e?e.next=n:i=n,e=n}return i}});class lt{constructor(t,e,i,s){this.tags=t,this.mode=e,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}lt.empty=new lt([],2,null);function fe(l,t){let e=Object.create(null);for(let n of l)if(!Array.isArray(n.tag))e[n.tag.id]=n.class;else for(let r of n.tag)e[r.id]=n.class;let{scope:i,all:s=null}=t||{};return{style:n=>{let r=s;for(let h of n)for(let o of h.set){let a=e[o.id];if(a){r=r?r+" "+a:a;break}}return r},scope:i}}function ue(l,t){let e=null;for(let i of l){let s=i.style(t);s&&(e=e?e+" "+s:s)}return e}function Pe(l,t,e,i=0,s=l.length){let n=new ce(i,Array.isArray(t)?t:[t],e);n.highlightRange(l.cursor(),i,s,"",n.highlighters),n.flush(s)}class ce{constructor(t,e,i){this.at=t,this.highlighters=e,this.span=i,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,i,s,n){let{type:r,from:h,to:o}=t;if(h>=i||o<=e)return;r.isTop&&(n=this.highlighters.filter(m=>!m.scope||m.scope(r)));let a=s,c=pe(t)||lt.empty,f=ue(n,c.tags);if(f&&(a&&(a+=" "),a+=f,c.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(e,h),a),c.opaque)return;let p=t.tree&&t.tree.prop(O.mounted);if(p&&p.overlay){let m=t.node.enter(p.overlay[0].from+h,1),x=this.highlighters.filter(_=>!_.scope||_.scope(p.tree.type)),z=t.firstChild();for(let _=0,j=h;;_++){let B=_<p.overlay.length?p.overlay[_]:null,N=B?B.from+h:o,F=Math.max(e,j),y=Math.min(i,N);if(F<y&&z)for(;t.from<y&&(this.highlightRange(t,F,y,s,n),this.startSpan(Math.min(y,t.to),a),!(t.to>=N||!t.nextSibling())););if(!B||N>i)break;j=B.to+h,j>e&&(this.highlightRange(m.cursor(),Math.max(e,B.from+h),Math.min(i,j),"",x),this.startSpan(Math.min(i,j),a))}z&&t.parent()}else if(t.firstChild()){p&&(s="");do if(!(t.to<=e)){if(t.from>=i)break;this.highlightRange(t,e,i,s,n),this.startSpan(Math.min(i,t.to),a)}while(t.nextSibling());t.parent()}}}function pe(l){let t=l.type.prop(qt);for(;t&&t.context&&!l.matchContext(t.context);)t=t.next;return t||null}const u=M.define,ut=u(),U=u(),Et=u(U),jt=u(U),q=u(),ct=u(q),St=u(q),G=u(),et=u(G),W=u(),V=u(),Nt=u(),nt=u(Nt),pt=u(),g={comment:ut,lineComment:u(ut),blockComment:u(ut),docComment:u(ut),name:U,variableName:u(U),typeName:Et,tagName:u(Et),propertyName:jt,attributeName:u(jt),className:u(U),labelName:u(U),namespace:u(U),macroName:u(U),literal:q,string:ct,docString:u(ct),character:u(ct),attributeValue:u(ct),number:St,integer:u(St),float:u(St),bool:u(q),regexp:u(q),escape:u(q),color:u(q),url:u(q),keyword:W,self:u(W),null:u(W),atom:u(W),unit:u(W),modifier:u(W),operatorKeyword:u(W),controlKeyword:u(W),definitionKeyword:u(W),moduleKeyword:u(W),operator:V,derefOperator:u(V),arithmeticOperator:u(V),logicOperator:u(V),bitwiseOperator:u(V),compareOperator:u(V),updateOperator:u(V),definitionOperator:u(V),typeOperator:u(V),controlOperator:u(V),punctuation:Nt,separator:u(Nt),bracket:nt,angleBracket:u(nt),squareBracket:u(nt),paren:u(nt),brace:u(nt),content:G,heading:et,heading1:u(et),heading2:u(et),heading3:u(et),heading4:u(et),heading5:u(et),heading6:u(et),contentSeparator:u(G),list:u(G),quote:u(G),emphasis:u(G),strong:u(G),link:u(G),monospace:u(G),strikethrough:u(G),inserted:u(),deleted:u(),changed:u(),invalid:u(),meta:pt,documentMeta:u(pt),annotation:u(pt),processingInstruction:u(pt),definition:M.defineModifier("definition"),constant:M.defineModifier("constant"),function:M.defineModifier("function"),standard:M.defineModifier("standard"),local:M.defineModifier("local"),special:M.defineModifier("special")};for(let l in g){let t=g[l];t instanceof M&&(t.name=l)}fe([{tag:g.link,class:"tok-link"},{tag:g.heading,class:"tok-heading"},{tag:g.emphasis,class:"tok-emphasis"},{tag:g.strong,class:"tok-strong"},{tag:g.keyword,class:"tok-keyword"},{tag:g.atom,class:"tok-atom"},{tag:g.bool,class:"tok-bool"},{tag:g.url,class:"tok-url"},{tag:g.labelName,class:"tok-labelName"},{tag:g.inserted,class:"tok-inserted"},{tag:g.deleted,class:"tok-deleted"},{tag:g.literal,class:"tok-literal"},{tag:g.string,class:"tok-string"},{tag:g.number,class:"tok-number"},{tag:[g.regexp,g.escape,g.special(g.string)],class:"tok-string2"},{tag:g.variableName,class:"tok-variableName"},{tag:g.local(g.variableName),class:"tok-variableName tok-local"},{tag:g.definition(g.variableName),class:"tok-variableName tok-definition"},{tag:g.special(g.variableName),class:"tok-variableName2"},{tag:g.definition(g.propertyName),class:"tok-propertyName tok-definition"},{tag:g.typeName,class:"tok-typeName"},{tag:g.namespace,class:"tok-namespace"},{tag:g.className,class:"tok-className"},{tag:g.macroName,class:"tok-macroName"},{tag:g.propertyName,class:"tok-propertyName"},{tag:g.operator,class:"tok-operator"},{tag:g.comment,class:"tok-comment"},{tag:g.meta,class:"tok-meta"},{tag:g.invalid,class:"tok-invalid"},{tag:g.punctuation,class:"tok-punctuation"}]);var $t={};class bt{constructor(t,e,i,s,n,r,h,o,a,c=0,f){this.p=t,this.stack=e,this.state=i,this.reducePos=s,this.pos=n,this.score=r,this.buffer=h,this.bufferBase=o,this.curContext=a,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,i=0){let s=t.parser.context;return new bt(t,[],e,i,i,0,[],0,s?new Ft(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let i=t>>19,s=t&65535,{parser:n}=this.p,r=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),h=n.dynamicPrecedence(s);if(h&&(this.score+=h),i==0){this.pushState(n.getGoto(this.state,s,!0),this.reducePos),s<n.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,r?8:4,!0),this.reduceContext(s,this.reducePos);return}let o=this.stack.length-(i-1)*3-(t&262144?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from,c=this.reducePos-a;c>=2e3&&!(!((e=this.p.parser.nodeSet.types[s])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=c));let f=o?this.stack[o-1]:0,p=this.bufferBase+this.buffer.length-f;if(s<n.minRepeatTerm||t&131072){let m=n.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,a,m,p+4,!0)}if(t&262144)this.state=this.stack[o];else{let m=this.stack[o-3];this.state=n.getGoto(m,s,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(s,a)}storeNode(t,e,i,s=4,n=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this,h=this.buffer.length;if(h==0&&r.parent&&(h=r.bufferBase-r.parent.bufferBase,r=r.parent),h>0&&r.buffer[h-4]==0&&r.buffer[h-1]>-1){if(e==i)return;if(r.buffer[h-2]>=e){r.buffer[h-2]=i;return}}}if(!n||this.pos==i)this.buffer.push(t,e,i,s);else{let r=this.buffer.length;if(r>0&&(this.buffer[r-4]!=0||this.buffer[r-1]<0)){let h=!1;for(let o=r;o>0&&this.buffer[o-2]>i;o-=4)if(this.buffer[o-1]>=0){h=!0;break}if(h)for(;r>0&&this.buffer[r-2]>i;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,s>4&&(s-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=i,this.buffer[r+3]=s}}shift(t,e,i,s){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let n=t,{parser:r}=this.p;(s>this.pos||e<=r.maxNode)&&(this.pos=s,r.stateFlag(n,1)||(this.reducePos=s)),this.pushState(n,i),this.shiftContext(e,i),e<=r.maxNode&&this.buffer.push(e,i,s,4)}else this.pos=s,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,s,4)}apply(t,e,i,s){t&65536?this.reduce(t):this.shift(t,e,i,s)}useNode(t,e){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=t)&&(this.p.reused.push(t),i++);let s=this.pos;this.reducePos=this.pos=s+t.length,this.pushState(e,s),this.buffer.push(i,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let i=t.buffer.slice(e),s=t.bufferBase+e;for(;t&&s==t.bufferBase;)t=t.parent;return new bt(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,s,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let i=t<=this.p.parser.maxNode;i&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new de(this);;){let i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(i==0)return!1;if((i&65536)==0)return!0;e.reduce(i)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let s=[];for(let n=0,r;n<e.length;n+=2)(r=e[n+1])!=this.state&&this.p.parser.hasAction(r,t)&&s.push(e[n],r);if(this.stack.length<120)for(let n=0;s.length<8&&n<e.length;n+=2){let r=e[n+1];s.some((h,o)=>o&1&&h==r)||s.push(e[n],r)}e=s}let i=[];for(let s=0;s<e.length&&i.length<4;s+=2){let n=e[s+1];if(n==this.state)continue;let r=this.split();r.pushState(n,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[s],this.pos),r.reducePos=this.pos,r.score-=200,i.push(r)}return i}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if((e&65536)==0)return!1;if(!t.validAction(this.state,e)){let i=e>>19,s=e&65535,n=this.stack.length-i*3;if(n<0||t.getGoto(this.stack[n],s,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;e=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],i=(s,n)=>{if(!e.includes(s))return e.push(s),t.allActions(s,r=>{if(!(r&393216))if(r&65536){let h=(r>>19)-n;if(h>1){let o=r&65535,a=this.stack.length-h*3;if(a>=0&&t.getGoto(this.stack[a],o,!1)>=0)return h<<19|65536|o}}else{let h=i(r,n+1);if(h!=null)return h}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new Ft(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ft{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class de{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=t&65535,i=t>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=s}}class yt{constructor(t,e,i){this.stack=t,this.pos=e,this.index=i,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new yt(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new yt(this.stack,this.pos,this.index)}}function dt(l,t=Uint16Array){if(typeof l!="string")return l;let e=null;for(let i=0,s=0;i<l.length;){let n=0;for(;;){let r=l.charCodeAt(i++),h=!1;if(r==126){n=65535;break}r>=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,h=!0),n+=o,h)break;n*=46}e?e[s++]=n:e=new t(n)}return e}class mt{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Lt=new mt;class ge{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Lt,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let i=this.range,s=this.rangeIndex,n=this.pos+t;for(;n<i.from;){if(!s)return null;let r=this.ranges[--s];n-=i.from-r.to,i=r}for(;e<0?n>i.to:n>=i.to;){if(s==this.ranges.length-1)return null;let r=this.ranges[++s];n+=r.from-i.to,i=r}return n}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e=this.chunkOff+t,i,s;if(e>=0&&e<this.chunk.length)i=this.pos+t,s=this.chunk.charCodeAt(e);else{let n=this.resolveOffset(t,1);if(n==null)return-1;if(i=n,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let r=this.rangeIndex,h=this.range;for(;h.to<=i;)h=this.ranges[++r];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>h.to&&(this.chunk2=this.chunk2.slice(0,h.to-i)),s=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),s}acceptToken(t,e=0){let i=e?this.resolveOffset(e,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=i}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=Lt,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let i="";for(let s of this.ranges){if(s.from>=e)break;s.to>t&&(i+=this.input.read(Math.max(s.from,t),Math.min(s.to,e)))}return i}}class st{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:i}=e.p;me(this.data,t,e,this.id,i.data,i.tokenPrecTable)}}st.prototype.contextual=st.prototype.fallback=st.prototype.extend=!1;st.prototype.fallback=st.prototype.extend=!1;function me(l,t,e,i,s,n){let r=0,h=1<<i,{dialect:o}=e.p.parser;t:for(;(h&l[r])!=0;){let a=l[r+1];for(let m=r+3;m<a;m+=2)if((l[m+1]&h)>0){let x=l[m];if(o.allows(x)&&(t.token.value==-1||t.token.value==x||ke(x,t.token.value,s,n))){t.acceptToken(x);break}}let c=t.next,f=0,p=l[r+2];if(t.next<0&&p>f&&l[a+p*3-3]==65535){r=l[a+p*3-1];continue t}for(;f<p;){let m=f+p>>1,x=a+m+(m<<1),z=l[x],_=l[x+1]||65536;if(c<z)p=m;else if(c>=_)f=m+1;else{r=l[x+2],t.advance();continue t}}break}}function Wt(l,t,e){for(let i=t,s;(s=l[i])!=65535;i++)if(s==e)return i-t;return-1}function ke(l,t,e,i){let s=Wt(e,i,t);return s<0||Wt(e,i,l)<s}const Q=typeof process<"u"&&$t&&/\bparse\b/.test($t.LOG);let Pt=null;function Vt(l,t,e){let i=l.cursor(R.IncludeAnonymous);for(i.moveTo(t);;)if(!(e<0?i.childBefore(t):i.childAfter(t)))for(;;){if((e<0?i.to<t:i.from>t)&&!i.type.isError)return e<0?Math.max(0,Math.min(i.to-1,t-25)):Math.min(l.length,Math.max(i.from+1,t+25));if(e<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return e<0?0:l.length}}class xe{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?Vt(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?Vt(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let i=this.trees[e],s=this.index[e];if(s==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let n=i.children[s],r=this.start[e]+i.positions[s];if(r>t)return this.nextStart=r,null;if(n instanceof I){if(r==t){if(r<this.safeFrom)return null;let h=r+n.length;if(h<=this.safeTo){let o=n.prop(O.lookAhead);if(!o||h+o<this.fragment.to)return n}}this.index[e]++,r+n.length>=Math.max(this.safeFrom,t)&&(this.trees.push(n),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+n.length}}}class be{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(i=>new mt)}getActions(t){let e=0,i=null,{parser:s}=t.p,{tokenizers:n}=s,r=s.stateSlot(t.state,3),h=t.curContext?t.curContext.hash:0,o=0;for(let a=0;a<n.length;a++){if((1<<a&r)==0)continue;let c=n[a],f=this.tokens[a];if(!(i&&!c.fallback)&&((c.contextual||f.start!=t.pos||f.mask!=r||f.context!=h)&&(this.updateCachedToken(f,c,t),f.mask=r,f.context=h),f.lookAhead>f.end+25&&(o=Math.max(f.lookAhead,o)),f.value!=0)){let p=e;if(f.extended>-1&&(e=this.addActions(t,f.extended,f.end,e)),e=this.addActions(t,f.value,f.end,e),!c.extend&&(i=f,e>p))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),!i&&t.pos==this.stream.end&&(i=new mt,i.value=t.p.parser.eofTerm,i.start=i.end=t.pos,e=this.addActions(t,i.value,i.end,e)),this.mainToken=i,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new mt,{pos:i,p:s}=t;return e.start=i,e.end=Math.min(i+1,s.stream.end),e.value=i==s.stream.end?s.parser.eofTerm:0,e}updateCachedToken(t,e,i){let s=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(s,t),i),t.value>-1){let{parser:n}=i.p;for(let r=0;r<n.specialized.length;r++)if(n.specialized[r]==t.value){let h=n.specializers[r](this.stream.read(t.start,t.end),i);if(h>=0&&i.p.parser.dialect.allows(h>>1)){(h&1)==0?t.value=h>>1:t.extended=h>>1;break}}}else t.value=0,t.end=this.stream.clipPos(s+1)}putAction(t,e,i,s){for(let n=0;n<s;n+=3)if(this.actions[n]==t)return s;return this.actions[s++]=t,this.actions[s++]=e,this.actions[s++]=i,s}addActions(t,e,i,s){let{state:n}=t,{parser:r}=t.p,{data:h}=r;for(let o=0;o<2;o++)for(let a=r.stateSlot(n,o?2:1);;a+=3){if(h[a]==65535)if(h[a+1]==1)a=X(h,a+2);else{s==0&&h[a+1]==2&&(s=this.putAction(X(h,a+2),e,i,s));break}h[a]==e&&(s=this.putAction(X(h,a+1),e,i,s))}return s}}class ye{constructor(t,e,i,s){this.parser=t,this.input=e,this.ranges=s,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new ge(e,s),this.tokens=new be(t,this.stream),this.topTerm=t.top[1];let{from:n}=s[0];this.stacks=[bt.start(this,t.top[0],n)],this.fragments=i.length&&this.stream.end-n>t.bufferLength*4?new xe(i,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,e=this.minStackPos,i=this.stacks=[],s,n;if(this.bigReductionCount>300&&t.length==1){let[r]=t;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;r<t.length;r++){let h=t[r];for(;;){if(this.tokens.mainToken=null,h.pos>e)i.push(h);else{if(this.advanceStack(h,i,t))continue;{s||(s=[],n=[]),s.push(h);let o=this.tokens.getMainToken(h);n.push(o.value,o.end)}}break}}if(!i.length){let r=s&&Oe(s);if(r)return Q&&console.log("Finish with "+this.stackID(r)),this.stackToTree(r);if(this.parser.strict)throw Q&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&s){let r=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,n,i);if(r)return Q&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(i.length>r)for(i.sort((h,o)=>o.score-h.score);i.length>r;)i.pop();i.some(h=>h.reducePos>e)&&this.recovering--}else if(i.length>1){t:for(let r=0;r<i.length-1;r++){let h=i[r];for(let o=r+1;o<i.length;o++){let a=i[o];if(h.sameState(a)||h.buffer.length>500&&a.buffer.length>500)if((h.score-a.score||h.buffer.length-a.buffer.length)>0)i.splice(o--,1);else{i.splice(r--,1);continue t}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let r=1;r<i.length;r++)i[r].pos<this.minStackPos&&(this.minStackPos=i[r].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,i){let s=t.pos,{parser:n}=this,r=Q?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let a=t.curContext&&t.curContext.tracker.strict,c=a?t.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let p=this.parser.nodeSet.types[f.type.id]==f.type?n.getGoto(t.state,f.type.id):-1;if(p>-1&&f.length&&(!a||(f.prop(O.contextHash)||0)==c))return t.useNode(f,p),Q&&console.log(r+this.stackID(t)+` (via reuse of ${n.getName(f.type.id)})`),!0;if(!(f instanceof I)||f.children.length==0||f.positions[0]>0)break;let m=f.children[0];if(m instanceof I&&f.positions[0]==0)f=m;else break}}let h=n.stateSlot(t.state,4);if(h>0)return t.reduce(h),Q&&console.log(r+this.stackID(t)+` (via always-reduce ${n.getName(h&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let o=this.tokens.getActions(t);for(let a=0;a<o.length;){let c=o[a++],f=o[a++],p=o[a++],m=a==o.length||!i,x=m?t:t.split(),z=this.tokens.mainToken;if(x.apply(c,f,z?z.start:x.pos,p),Q&&console.log(r+this.stackID(x)+` (via ${(c&65536)==0?"shift":`reduce of ${n.getName(c&65535)}`} for ${n.getName(f)} @ ${s}${x==t?"":", split"})`),m)return!0;x.pos>s?e.push(x):i.push(x)}return!1}advanceFully(t,e){let i=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>i)return Gt(t,e),!0}}runRecovery(t,e,i){let s=null,n=!1;for(let r=0;r<t.length;r++){let h=t[r],o=e[r<<1],a=e[(r<<1)+1],c=Q?this.stackID(h)+" -> ":"";if(h.deadEnd&&(n||(n=!0,h.restart(),Q&&console.log(c+this.stackID(h)+" (restarted)"),this.advanceFully(h,i))))continue;let f=h.split(),p=c;for(let m=0;m<10&&f.forceReduce()&&(Q&&console.log(p+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));m++)Q&&(p=this.stackID(f)+" -> ");for(let m of h.recoverByInsert(o))Q&&console.log(c+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,i);this.stream.end>h.pos?(a==h.pos&&(a++,o=0),h.recoverByDelete(o,a),Q&&console.log(c+this.stackID(h)+` (via recover-delete ${this.parser.getName(o)})`),Gt(h,i)):(!s||s.score<h.score)&&(s=h)}return s}stackToTree(t){return t.close(),I.build({buffer:yt.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(Pt||(Pt=new WeakMap)).get(t);return e||Pt.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function Gt(l,t){for(let e=0;e<t.length;e++){let i=t[e];if(i.pos==l.pos&&i.sameState(l)){t[e].score<l.score&&(t[e]=l);return}}t.push(l)}class we{constructor(t,e,i){this.source=t,this.flags=e,this.disabled=i}allows(t){return!this.disabled||this.disabled[t]==0}}class wt extends se{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let h=0;h<t.repeatNodeCount;h++)e.push("");let i=Object.keys(t.topRules).map(h=>t.topRules[h][1]),s=[];for(let h=0;h<e.length;h++)s.push([]);function n(h,o,a){s[h].push([o,o.deserialize(String(a))])}if(t.nodeProps)for(let h of t.nodeProps){let o=h[0];typeof o=="string"&&(o=O[o]);for(let a=1;a<h.length;){let c=h[a++];if(c>=0)n(c,o,h[a++]);else{let f=h[a+-c];for(let p=-c;p>0;p--)n(h[a++],o,f);a++}}}this.nodeSet=new Tt(e.map((h,o)=>$.define({name:o>=this.minRepeatTerm?void 0:h,id:o,props:s[o],top:i.indexOf(o)>-1,error:o==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(o)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=1024;let r=dt(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let h=0;h<this.specializerSpecs.length;h++)this.specialized[h]=this.specializerSpecs[h].term;this.specializers=this.specializerSpecs.map(Zt),this.states=dt(t.states,Uint32Array),this.data=dt(t.stateData),this.goto=dt(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(h=>typeof h=="number"?new st(r,h):h),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,i){let s=new ye(this,t,e,i);for(let n of this.wrappers)s=n(s,t,e,i);return s}getGoto(t,e,i=!1){let s=this.goto;if(e>=s[0])return-1;for(let n=s[e+1];;){let r=s[n++],h=r&1,o=s[n++];if(h&&i)return o;for(let a=n+(r>>1);n<a;n++)if(s[n]==t)return o;if(h)return-1}}hasAction(t,e){let i=this.data;for(let s=0;s<2;s++)for(let n=this.stateSlot(t,s?2:1),r;;n+=3){if((r=i[n])==65535)if(i[n+1]==1)r=i[n=X(i,n+2)];else{if(i[n+1]==2)return X(i,n+2);break}if(r==e||r==0)return X(i,n+1)}return 0}stateSlot(t,e){return this.states[t*6+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,i=>i==e?!0:null)}allActions(t,e){let i=this.stateSlot(t,4),s=i?e(i):void 0;for(let n=this.stateSlot(t,1);s==null;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=X(this.data,n+2);else break;s=e(X(this.data,n+1))}return s}nextStates(t){let e=[];for(let i=this.stateSlot(t,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=X(this.data,i+2);else break;if((this.data[i+2]&1)==0){let s=this.data[i+1];e.some((n,r)=>r&1&&n==s)||e.push(this.data[i],s)}}return e}configure(t){let e=Object.assign(Object.create(wt.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let i=this.topRules[t.top];if(!i)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=i}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(i=>{let s=t.tokenizers.find(n=>n.from==i);return s?s.to:i})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((i,s)=>{let n=t.specializers.find(h=>h.from==i.external);if(!n)return i;let r=Object.assign(Object.assign({},i),{external:n.to});return e.specializers[s]=Zt(r),r})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),t.bufferLength!=null&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return e==null?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),i=e.map(()=>!1);if(t)for(let n of t.split(" ")){let r=e.indexOf(n);r>=0&&(i[r]=!0)}let s=null;for(let n=0;n<e.length;n++)if(!i[n])for(let r=this.dialects[e[n]],h;(h=this.data[r++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[h]=1;return new we(t,i,s)}static deserialize(t){return new wt(t)}}function X(l,t){return l[t]|l[t+1]<<16}function Oe(l){let t=null;for(let e of l){let i=e.p.stoppedAt;(e.pos==e.p.stream.end||i!=null&&e.pos>i)&&e.p.parser.stateFlag(e.state,2)&&(!t||t.score<e.score)&&(t=e)}return t}function Zt(l){if(l.external){let t=l.extend?1:0;return(e,i)=>l.external(e,i)<<1|t}return l.get}const Se=ae({String:g.string,Number:g.number,"True False":g.bool,PropertyName:g.propertyName,Null:g.null,", :":g.separator,"[ ]":g.squareBracket,"{ }":g.brace}),ve=wt.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[Se],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});export{R as I,O as N,se as P,I as T,g as a,At as b,$ as c,Pe as h,ve as p,ae as s,fe as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as F,b as G,i as J,B as f,h as o,ai as h,k as e,F as m,f as j,O as W,R as q,W as z,ak as D,y as B,t as O,E as I,l as L,a6 as M,c as b}from"./svelte-B9Ye91X-.js";import{o as Q,E as S,G as C,J as U,K as X,N}from"./flowbite-svelte-Caf58qKG.js";var Y=f("<!> <!>",1),Z=f("<!> <!>",1),ee=f("<!> <!>",1),te=f('<div class="h-full" style="overflow-y: auto;"><!></div>');function se(k,y){F(y,!1);let n=G(y,"entry",24,()=>({}));function w(t){let a="<ul class='mx-5'>";return Object.entries(t).map(([d,u])=>{a+="<li>",a+=`<b>${d}: </b>`,a+=x(u),a+="</li>"}),a+="</ul>"}function x(t){return t===null?"N/A":typeof t=="object"?w(t):t}J();var P=te(),E=I(P);Q(E,{class:"h-full",striped:!0,children:(t,a)=>{var d=ee(),u=o(d);S(u,{children:(v,K)=>{var s=Y(),i=o(s);C(i,{children:(r,_)=>{var $=h("Key");e(r,$)},$$slots:{default:!0}});var c=m(i,2);C(c,{children:(r,_)=>{var $=h("Value");e(r,$)},$$slots:{default:!0}}),e(v,s)},$$slots:{default:!0}});var H=m(u,2);U(H,{children:(v,K)=>{var s=j(),i=o(s);W(i,1,()=>(O(n()),B(()=>Object.keys(n()))),D,(c,r)=>{X(c,{children:(_,$)=>{var T=Z(),g=o(T);N(g,{children:(p,V)=>{var l=h();q(()=>M(l,b(r))),e(p,l)},$$slots:{default:!0}});var R=m(g,2);N(R,{children:(p,V)=>{var l=j(),A=o(l);z(A,()=>(O(n()),b(r),B(()=>x(n()[b(r)])))),e(p,l)},$$slots:{default:!0}}),e(_,T)},$$slots:{default:!0}})}),e(v,s)},$$slots:{default:!0}}),e(t,d)},$$slots:{default:!0}}),e(k,P),L()}export{se as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./svelte-B9Ye91X-.js";import"./clsx-B-dksMZM.js";import"./esm-env-rsSWfq8L.js";function _(o){}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as n,Q as i,S as h,R as f}from"./@edraj-D-9hi9vU.js";import{s as m}from"./spaces-5QYuv6aM.js";import{s as y,L as w}from"./toast-nP_bUL2P.js";async function $(e){const r={filter_shortnames:[],type:i.attachments,space_name:"personal",subpath:`people/${e}/protected/avatar`,limit:1,sort_by:"shortname",sort_type:h.ascending,offset:0,search:"@resource_type:media",retrieve_json_payload:!1},t=await n.query(r);return t.records.length===0?null:n.getAttachmentUrl({resource_type:f.media,space_name:"personal",subpath:`people/${e}/protected/`,parent_shortname:"avatar",shortname:t.records[0].attributes.payload.body,ext:""})}async function q(){const e=await n.query({type:i.spaces,space_name:"management",subpath:"/",search:"",limit:100});return e.records=e.records.map(r=>(r.attributes.ordinal===null&&(r.attributes.ordinal=9999),r)),e.records.sort((r,t)=>r.attributes.ordinal-t.attributes.ordinal),m.set(e.records),e}async function _(e,r,t=20,l=0,s=[],c=null,d=!1){const a=await n.query({type:i.search,space_name:e,subpath:r,filter_types:s,exact_subpath:!0,search:"",limit:t,offset:l});if(d==!1&&c!==null){const o=c.records.find(p=>p.shortname===e).attributes.hide_folders;o&&(a.records=a.records.filter(p=>o.includes(p.shortname)===!1))}return a.records=a.records.sort((u,o)=>u.shortname.toLowerCase()<o.shortname.toLowerCase()?-1:u.shortname.toLowerCase()>o.shortname.toLowerCase()?1:0),a}async function b(e,r,t,l){for(const s of l.records)if(s.resource_type==="folder"){const c=await _(r,s.shortname);await b(e,r,`${t}/${s.shortname}`,c),e.push(`${t}/${s.shortname}`)}}async function v(e){try{return(await n.query({search:"",type:i.search,space_name:e,subpath:"/workflows"})).records||[]}catch{y(w.warn,"Failed to fetch workflows")}}export{q as a,_ as b,b as c,v as f,$ as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as mt,a8 as d,a9 as B,A as vt,e as l,a7 as _t,c as t,B as $,h as D,ai as k,R as f,L as ft,a6 as h,k as i,E as u,F as m,f as ht,O as M,ak as N,j as $t,l as bt,H as yt}from"./svelte-B9Ye91X-.js";import{b as xt}from"./svelte-i18n-CZ4cFDVx.js";import{d as gt}from"./downloadFile-D08i0YDh.js";import{s as O,L as G}from"./toast-nP_bUL2P.js";import{D as q,Q as J,h as wt}from"./@edraj-D-9hi9vU.js";import{b as K}from"./dmart_services-BTWOtb9Z.js";import{C as Pt,L as U,k as V,B as W}from"./flowbite-svelte-Caf58qKG.js";import{P as kt}from"./Prism-DbpuKlij.js";import{c as X}from"./queryHelpers-C9iBWwqe.js";import"./clsx-B-dksMZM.js";import"./esm-env-rsSWfq8L.js";import"./deepmerge-rn4rBaHU.js";import"./ajv-Cpj98o6Y.js";import"./intl-messageformat-Dc5UU-HB.js";import"./tslib-pJfR_DrR.js";import"./@formatjs-yKEsAtjs.js";import"./@zerodevx-z992vLW9.js";import"./spaces-5QYuv6aM.js";import"./@floating-ui-BwwcF-xh.js";import"./tailwind-variants-Cj20BoQ3.js";import"./tailwind-merge-CJvxXMcu.js";import"./prismjs-DTUiLGJu.js";var St=$("<option> </option>"),Lt=$("<option> </option>"),jt=$("<option>/</option> <!>",1),Bt=$('<div class="space-y-4"><div class="grid grid-cols-1 md:grid-cols-12 gap-4 mb-4"><div class="md:col-span-4"><!> <!></div> <div class="md:col-span-4"><!> <!></div></div> <div class="md:col-span-4 mx-auto flex items-end justify-end"><!> <!></div></div>'),Dt=$('<p class="text-gray-500 text-center">No response yet.</p>'),qt=$('<div class="min-w-11/12 m-6"><!></div> <!>',1);function te(Y,Z){mt(Z,!0);const x=()=>ft(xt,"$_",tt),[tt,et]=yt();let z=d(B([])),o=d(""),v=d("/"),g=d(null),C=d(null),S=d(B([])),L=d(B([]));vt(()=>{async function e(){l(z,(await q.getSpaces()).records,!0)}e()});async function Q(e,n){for(const c of n.records)if(c.resource_type==="folder"){const w=await K(t(o),c.shortname);await Q(`${e}/${c.shortname}`,w),t(S).push(`${e}/${c.shortname}`)}}async function at(){if(!t(o)||!t(v))return;const e={type:J.search,exact_subpath:!1,...X({space_name:t(o),subpath:t(v),search:"",offset:0,limit:1e6,retrieve_json_payload:!0,retrieve_attachments:!0})};l(g,await q.query(e),!0)}async function st(){const e={type:J.search,exact_subpath:!1,...X({space_name:t(o),subpath:t(v),search:"",offset:0,limit:1e6,retrieve_json_payload:!0,retrieve_attachments:!0})};try{const n=await q.axiosDmartInstance.post("managed/export",e,{headers:wt,responseType:"arraybuffer"});n.status!==200?O(G.warn):gt(n.data,`${t(o)}/${t(v)}.zip`,"application/zip")}catch{O(G.warn)}}_t(()=>{t(o)&&t(C)!==t(o)&&(async()=>{l(L,[],!0),l(S,[],!0);const e=await K(t(o),"/");await Q("",e),l(L,[...t(S).reverse()],!0),l(C,`${t(o)}`)})()});var T=qt(),E=D(T),rt=u(E);Pt(rt,{class:"min-w-full p-4",children:(e,n)=>{var c=Bt(),w=u(c),F=u(w),R=u(F);U(R,{for:"space_name",class:"mb-2",children:(s,b)=>{var a=k();f(r=>h(a,r),[()=>x()("space_name")]),i(s,a)},$$slots:{default:!0}});var lt=m(R,2);V(lt,{id:"space_name",get value(){return t(o)},set value(s){l(o,s,!0)},children:(s,b)=>{var a=ht(),r=D(a);M(r,17,()=>t(z),N,(j,y)=>{var p=St(),_=u(p),P={};f(()=>{h(_,t(y).shortname),P!==(P=t(y).shortname)&&(p.value=(p.__value=t(y).shortname)??"")}),i(j,p)}),i(s,a)},$$slots:{default:!0}});var pt=m(F,2),A=u(pt);U(A,{for:"subpath",class:"mb-2",children:(s,b)=>{var a=k();f(r=>h(a,r),[()=>x()("subpath")]),i(s,a)},$$slots:{default:!0}});var ut=m(A,2);V(ut,{id:"subpath",get value(){return t(v)},set value(s){l(v,s,!0)},children:(s,b)=>{var a=jt(),r=D(a);r.value=r.__value="/";var j=m(r,2);M(j,17,()=>t(L),N,(y,p)=>{var _=Lt(),P=u(_),I={};f(()=>{h(P,t(p)),I!==(I=t(p))&&(_.value=(_.__value=t(p))??"")}),i(y,_)}),i(s,a)},$$slots:{default:!0}});var ct=m(w,2),H=u(ct);W(H,{onclick:at,color:"blue",children:(s,b)=>{var a=k();f(r=>h(a,r),[()=>x()("submit")]),i(s,a)},$$slots:{default:!0}});var dt=m(H,2);W(dt,{class:"mx-5",color:"blue",outline:!0,onclick:st,children:(s,b)=>{var a=k();f(r=>h(a,r),[()=>x()("download_zip")]),i(s,a)},$$slots:{default:!0}}),i(e,c)},$$slots:{default:!0}});var ot=m(E,2);{var it=e=>{var n=Dt();i(e,n)},nt=e=>{kt(e,{get code(){return t(g)},set code(n){l(g,n,!0)}})};$t(ot,e=>{t(g)===null?e(it):e(nt,!1)})}i(Y,T),bt(),et()}export{te as default};
|