@vc-shell/framework 1.1.99-alpha.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/api/platform.ts +9883 -9883
- package/core/composables/useDynamicProperties/index.ts +16 -10
- package/core/composables/useNotifications/index.ts +1 -32
- package/core/composables/useSettings/index.ts +3 -8
- package/core/composables/useUser/index.ts +171 -74
- package/core/composables/useUserManagement/index.ts +25 -67
- package/core/interceptors/index.ts +56 -19
- package/core/plugins/signalR/index.ts +1 -27
- package/core/types/index.ts +0 -2
- package/dist/core/api/platform.d.ts +1 -1
- package/dist/core/api/platform.d.ts.map +1 -1
- package/dist/core/composables/useDynamicProperties/index.d.ts.map +1 -1
- package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/core/composables/useSettings/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +9 -18
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/composables/useUserManagement/index.d.ts +7 -7
- package/dist/core/composables/useUserManagement/index.d.ts.map +1 -1
- package/dist/core/interceptors/index.d.ts +1 -2
- package/dist/core/interceptors/index.d.ts.map +1 -1
- package/dist/core/plugins/signalR/index.d.ts +0 -2
- package/dist/core/plugins/signalR/index.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/injection-keys.d.ts +1 -2
- package/dist/injection-keys.d.ts.map +1 -1
- package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
- package/dist/shared/components/multilanguage-selector/multilanguage-selector.vue.d.ts +1 -1
- package/dist/shared/components/notifications/components/notification-container/index.d.ts +10 -10
- package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
- package/dist/shared/components/sign-in/useExternalProvider.d.ts +1 -1
- package/dist/shared/components/sign-in/useExternalProvider.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +2 -2
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -2
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +2 -2
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +1 -1
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts +2 -2
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/index.d.ts +1 -0
- package/dist/ui/components/molecules/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue.d.ts +34 -0
- package/dist/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-accordion/index.d.ts +7 -0
- package/dist/ui/components/molecules/vc-accordion/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-accordion/vc-accordion.vue.d.ts +42 -0
- package/dist/ui/components/molecules/vc-accordion/vc-accordion.vue.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-base-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.backupsb.d.ts +3 -3
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +5 -5
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-body/vc-table-body.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-row/vc-table-row.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/vc-table-desktop-view.vue.d.ts +3 -3
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +1 -1
- package/package.json +5 -7
- package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +2 -2
- package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +1 -15
- package/shared/components/sign-in/useExternalProvider.ts +1 -11
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +3 -11
- package/ui/components/atoms/vc-badge/vc-badge.stories.ts +1 -1
- package/ui/components/atoms/vc-button/vc-button.stories.ts +1 -1
- package/ui/components/atoms/vc-card/vc-card.stories.ts +1 -1
- package/ui/components/atoms/vc-col/vc-col.stories.ts +1 -1
- package/ui/components/atoms/vc-container/vc-container.stories.ts +1 -1
- package/ui/components/atoms/vc-hint/vc-hint.stories.ts +1 -1
- package/ui/components/atoms/vc-icon/vc-icon.stories.ts +1 -1
- package/ui/components/atoms/vc-image/vc-image.stories.ts +1 -1
- package/ui/components/atoms/vc-label/vc-label.stories.ts +1 -1
- package/ui/components/atoms/vc-link/vc-link.stories.ts +1 -1
- package/ui/components/atoms/vc-progress/vc-progress.stories.ts +1 -1
- package/ui/components/atoms/vc-row/vc-row.stories.ts +1 -1
- package/ui/components/atoms/vc-skeleton/vc-skeleton.stories.ts +1 -1
- package/ui/components/atoms/vc-status/vc-status.stories.ts +1 -1
- package/ui/components/atoms/vc-status-icon/vc-status-icon.stories.ts +1 -1
- package/ui/components/atoms/vc-tooltip/vc-tooltip.stories.ts +1 -1
- package/ui/components/atoms/vc-video/vc-video.stories.ts +1 -1
- package/ui/components/atoms/vc-widget/vc-widget.stories.ts +1 -1
- package/ui/components/molecules/index.ts +1 -0
- package/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue +251 -0
- package/ui/components/molecules/vc-accordion/index.ts +11 -0
- package/ui/components/molecules/vc-accordion/vc-accordion.stories.ts +526 -0
- package/ui/components/molecules/vc-accordion/vc-accordion.vue +176 -0
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.ts +1 -1
- package/ui/components/molecules/vc-checkbox/vc-checkbox.stories.ts +1 -1
- package/ui/components/molecules/vc-editor/vc-editor.stories.ts +1 -1
- package/ui/components/molecules/vc-field/vc-field.stories.ts +1 -1
- package/ui/components/molecules/vc-file-upload/vc-file-upload.stories.ts +1 -1
- package/ui/components/molecules/vc-form/vc-form.stories.ts +1 -1
- package/ui/components/molecules/vc-input/vc-input.stories.ts +1 -1
- package/ui/components/molecules/vc-input-currency/vc-input-currency.stories.ts +1 -1
- package/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.stories.ts +1 -1
- package/ui/components/molecules/vc-multivalue/vc-multivalue.stories.ts +1 -1
- package/ui/components/molecules/vc-pagination/vc-pagination.stories.ts +1 -1
- package/ui/components/molecules/vc-radio-button/vc-radio-button.stories.ts +1 -1
- package/ui/components/molecules/vc-rating/vc-rating.stories.ts +1 -1
- package/ui/components/molecules/vc-select/vc-select.stories.ts +1 -1
- package/ui/components/molecules/vc-slider/vc-slider.stories.ts +1 -1
- package/ui/components/molecules/vc-switch/vc-switch.stories.ts +1 -1
- package/ui/components/molecules/vc-textarea/vc-textarea.stories.ts +1 -1
- package/ui/components/molecules/vc-toast/vc-toast.stories.ts +1 -1
- package/ui/components/organisms/vc-app/vc-app.vue +2 -20
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +4 -0
- package/ui/components/organisms/vc-gallery/vc-gallery.stories.ts +1 -1
- package/ui/components/organisms/vc-popup/vc-popup.stories.ts +1 -1
- package/core/providers/README.md +0 -176
- package/core/providers/auth-provider-manager.ts +0 -74
- package/core/providers/auth-provider-utils.ts +0 -26
- package/core/providers/example-custom-auth-provider.ts +0 -162
- package/core/providers/index.ts +0 -3
- package/core/providers/platform-auth-provider.ts +0 -207
- package/core/types/auth-provider.ts +0 -40
- package/dist/assets/042c75b764bc78a7.svg +0 -1
- package/dist/assets/0ba156439a339f2a.svg +0 -1
- package/dist/assets/0be560bfb22d0e72.woff2 +0 -0
- package/dist/assets/0f590f8a94577092.svg +0 -1
- package/dist/assets/0fc5820f8be53a1b.svg +0 -1
- package/dist/assets/105efd028edc1dfe.woff +0 -0
- package/dist/assets/10768e2cc79fc60b.svg +0 -1
- package/dist/assets/11b3d25a56fd9a21.woff2 +0 -0
- package/dist/assets/154365acf3010d96.woff2 +0 -0
- package/dist/assets/157b8721e0600ea8.svg +0 -1
- package/dist/assets/15e91cdd649cde9a.svg +0 -1
- package/dist/assets/19275e398ae57130.woff2 +0 -0
- package/dist/assets/1a3e84b2457f709a.woff +0 -0
- package/dist/assets/1de63eb118636cce.svg +0 -1
- package/dist/assets/1ea01de36eb5491b.svg +0 -1
- package/dist/assets/204eaf512fde2023.svg +0 -1
- package/dist/assets/2088983edf42e153.svg +0 -1
- package/dist/assets/208f810a9321a327.svg +0 -1
- package/dist/assets/21220a9d10e6c558.svg +0 -1
- package/dist/assets/220db345a102045d.woff2 +0 -0
- package/dist/assets/225da11d23968333.svg +0 -1
- package/dist/assets/226f862dd81bdc13.woff2 +0 -0
- package/dist/assets/23a2d53395ddb14f.woff +0 -0
- package/dist/assets/259e6ad461a52ad7.svg +0 -1
- package/dist/assets/261e6dec4d53b9ac.woff +0 -0
- package/dist/assets/262f46a0b6d94bb6.svg +0 -1
- package/dist/assets/2857c513073467da.svg +0 -1
- package/dist/assets/2b3be7889467d98f.woff +0 -0
- package/dist/assets/2d4e6190eec72737.svg +0 -1
- package/dist/assets/2eba973185078bc8.woff +0 -0
- package/dist/assets/334d3f6bc766c516.woff +0 -0
- package/dist/assets/34ff7dd0c2285956.svg +0 -1
- package/dist/assets/3d26b7c1ab78bbe2.woff +0 -0
- package/dist/assets/3d892965ab4f1cbb.woff2 +0 -0
- package/dist/assets/3f8c4cc8099e34b6.woff2 +0 -0
- package/dist/assets/40a0e53b79ce63c6.woff2 +0 -0
- package/dist/assets/41275bcb979cb650.svg +0 -1
- package/dist/assets/434f7982590e462f.woff +0 -0
- package/dist/assets/475937116ee3314a.woff2 +0 -0
- package/dist/assets/489710fb710e73f0.woff +0 -0
- package/dist/assets/49791943b3872376.woff2 +0 -0
- package/dist/assets/4ae5f23e0ca888e7.woff2 +0 -0
- package/dist/assets/4d7a77b0e5373992.svg +0 -1
- package/dist/assets/4e43c74354534fb3.svg +0 -1
- package/dist/assets/4fe75f5117100705.svg +0 -1
- package/dist/assets/52e261a005074e1b.woff +0 -0
- package/dist/assets/5304c3d05a5f9789.woff2 +0 -0
- package/dist/assets/54cda5482c6c9218.woff +0 -0
- package/dist/assets/550f52072e8ccafe.woff2 +0 -0
- package/dist/assets/572bb1bb4156a9c1.svg +0 -1
- package/dist/assets/6075995d7e74da46.woff2 +0 -0
- package/dist/assets/617c4736236e199e.woff +0 -0
- package/dist/assets/67230f05dc94a265.svg +0 -1
- package/dist/assets/6798e4dd4add9b48.svg +0 -1
- package/dist/assets/686d4077c1e26876.woff2 +0 -0
- package/dist/assets/698ec6c722d4cb05.woff2 +0 -0
- package/dist/assets/6a3e73faf406cf33.svg +0 -1
- package/dist/assets/72de3a63bc0b70dd.svg +0 -1
- package/dist/assets/74c6a6ab81bb6340.woff2 +0 -0
- package/dist/assets/74ed5f8a78e71106.svg +0 -1
- package/dist/assets/7a5aa5abd625137f.ttf +0 -0
- package/dist/assets/7ce0c166fd6a1204.woff +0 -0
- package/dist/assets/7d55399c2a7bc985.svg +0 -1
- package/dist/assets/7d970675c69fca1d.woff +0 -0
- package/dist/assets/7eda727273fd98d3.svg +0 -1
- package/dist/assets/7f6ebfd707b76ca2.woff +0 -0
- package/dist/assets/7fa898d213fcc7bc.woff2 +0 -0
- package/dist/assets/861e6b7192b3b6c7.woff +0 -0
- package/dist/assets/8bbcde81ba21ecb2.woff2 +0 -0
- package/dist/assets/8f6657e5e0b8d3e4.woff +0 -0
- package/dist/assets/910b0d99b9e26568.svg +0 -1
- package/dist/assets/91fe94e424323d61.woff +0 -0
- package/dist/assets/92508f8707159b51.svg +0 -1
- package/dist/assets/9392bf1d591e1abb.svg +0 -1
- package/dist/assets/97e8d4984ba0713a.woff2 +0 -0
- package/dist/assets/9cb83236f6bb7ab1.svg +0 -1
- package/dist/assets/9d37314695c0b68d.woff +0 -0
- package/dist/assets/a03cdcd8da5bb987.woff +0 -0
- package/dist/assets/a18404194e3f9047.svg +0 -1
- package/dist/assets/a2017fe7f0a26510.svg +0 -1
- package/dist/assets/ab6e7190bb1492d5.woff2 +0 -0
- package/dist/assets/abf88f301a0730f4.svg +0 -1
- package/dist/assets/ac1a99b3d05d8232.woff +0 -0
- package/dist/assets/aed17cb6fdad2ada.woff2 +0 -0
- package/dist/assets/b1a596e31ad1185a.svg +0 -1
- package/dist/assets/b27767411c8427be.woff +0 -0
- package/dist/assets/b325adcae33bbe7a.svg +0 -1
- package/dist/assets/b372390551ca2fa1.svg +0 -1
- package/dist/assets/b5bb1e8fc975decd.svg +0 -1
- package/dist/assets/b645a4a2181b9dc1.svg +0 -1
- package/dist/assets/b6499ddce0a4ef7d.svg +0 -1
- package/dist/assets/b94421fadd23b0f2.svg +0 -1
- package/dist/assets/bb28fb0f27f1c11b.svg +0 -1
- package/dist/assets/c9191b638a10f67b.woff2 +0 -0
- package/dist/assets/ca791c5ca5848a03.svg +0 -1
- package/dist/assets/cb32840ce330103f.woff +0 -0
- package/dist/assets/ccc878931d74181b.woff2 +0 -0
- package/dist/assets/d084bda16abe8a56.svg +0 -1
- package/dist/assets/d32b129cae2fffd6.svg +0 -1
- package/dist/assets/d35a4c7113315758.woff2 +0 -0
- package/dist/assets/d3f792f54ae4c307.svg +0 -1
- package/dist/assets/d5a5b8630120073d.svg +0 -1
- package/dist/assets/d5f9664ebbfb104b.svg +0 -1
- package/dist/assets/d84247b59449dd88.woff2 +0 -0
- package/dist/assets/dceaf3b39091e6a4.woff +0 -0
- package/dist/assets/dd05d43ff0df2fc7.svg +0 -1
- package/dist/assets/e2ad5b3428289141.woff +0 -0
- package/dist/assets/e38acaa1757232e0.svg +0 -1
- package/dist/assets/e4a8550f1c7ffe36.svg +0 -1
- package/dist/assets/e5adb5ae3a3698f6.svg +0 -1
- package/dist/assets/e61a1889bac955f4.woff2 +0 -0
- package/dist/assets/e72bb11356af94c7.svg +0 -1
- package/dist/assets/e98196a9f8dcb2f0.svg +0 -1
- package/dist/assets/ebec912a42ad49ff.woff +0 -0
- package/dist/assets/ee6983981ffcbb41.woff2 +0 -0
- package/dist/assets/f09d89268e4c0317.svg +0 -1
- package/dist/assets/f239394367fcf005.woff2 +0 -0
- package/dist/assets/f5722262b6e7214e.woff2 +0 -0
- package/dist/assets/f7fc8bf46089d8b2.svg +0 -1
- package/dist/assets/fc829e3f399b70e0.woff2 +0 -0
- package/dist/assets/fe141d99763f5d2b.woff +0 -0
- package/dist/assets/fed13b0d59903483.svg +0 -1
- package/dist/assets/fed757d2c2344ead.woff2 +0 -0
- package/dist/assets/ffc438f20e79ce73.woff +0 -0
- package/dist/core/providers/auth-provider-manager.d.ts +0 -34
- package/dist/core/providers/auth-provider-manager.d.ts.map +0 -1
- package/dist/core/providers/auth-provider-utils.d.ts +0 -17
- package/dist/core/providers/auth-provider-utils.d.ts.map +0 -1
- package/dist/core/providers/example-custom-auth-provider.d.ts +0 -45
- package/dist/core/providers/example-custom-auth-provider.d.ts.map +0 -1
- package/dist/core/providers/index.d.ts +0 -3
- package/dist/core/providers/index.d.ts.map +0 -1
- package/dist/core/providers/platform-auth-provider.d.ts +0 -34
- package/dist/core/providers/platform-auth-provider.d.ts.map +0 -1
- package/dist/core/types/auth-provider.d.ts +0 -27
- package/dist/core/types/auth-provider.d.ts.map +0 -1
- package/dist/framework.js +0 -25048
- package/dist/index.css +0 -9
- package/dist/vendor-boolbase-A_-Pp38P.js +0 -23
- package/dist/vendor-cheerio-C46iBpCu.js +0 -1053
- package/dist/vendor-cheerio-select-C8emRZsx.js +0 -191
- package/dist/vendor-core-js-DDuR6YMQ.js +0 -1206
- package/dist/vendor-css-select-DR9bp36p.js +0 -622
- package/dist/vendor-css-what-CZZaquJM.js +0 -267
- package/dist/vendor-cypress-signalr-mock-DjBxJHA6.js +0 -769
- package/dist/vendor-date-fns-sZ1zMzTH.js +0 -3008
- package/dist/vendor-dom-serializer-Sk3xHhQk.js +0 -213
- package/dist/vendor-domelementtype-B3sFIGaC.js +0 -21
- package/dist/vendor-domhandler-CL40eeX9.js +0 -311
- package/dist/vendor-dompurify-BuxjWxA2.js +0 -553
- package/dist/vendor-domutils-BiVCXO8c.js +0 -386
- package/dist/vendor-entities-CCReaWqU.js +0 -364
- package/dist/vendor-floating-ui-core-Cl9nBI4j.js +0 -349
- package/dist/vendor-floating-ui-dom-3z44E4mf.js +0 -395
- package/dist/vendor-floating-ui-utils-D2sT7feD.js +0 -259
- package/dist/vendor-floating-ui-vue-ClrgkeO5.js +0 -107
- package/dist/vendor-headlessui-vue-D7tzx4PC.js +0 -961
- package/dist/vendor-htmlparser2-CpQu33io.js +0 -735
- package/dist/vendor-intlify-core-base-Da62SG4M.js +0 -1130
- package/dist/vendor-intlify-message-compiler-CHvGSH2u.js +0 -952
- package/dist/vendor-intlify-shared-jWBPd9WB.js +0 -144
- package/dist/vendor-iso-639-1-BJO6WZAt.js +0 -781
- package/dist/vendor-linkify-it-LzoUhj6C.js +0 -199
- package/dist/vendor-linkifyjs-dCH9UYes.js +0 -701
- package/dist/vendor-lodash-es-BqkGj3Jl.js +0 -4816
- package/dist/vendor-lucide-vue-next-m0L4DzUL.js +0 -29780
- package/dist/vendor-markdown-it-Czg9qJTh.js +0 -2263
- package/dist/vendor-markdown-it-task-lists-BxLwscWK.js +0 -69
- package/dist/vendor-mdurl-DZFDNdqC.js +0 -192
- package/dist/vendor-microsoft-applicationinsights-analytics-js-C1Yxuzwg.js +0 -1207
- package/dist/vendor-microsoft-applicationinsights-cfgsync-js-DArHD4Dn.js +0 -261
- package/dist/vendor-microsoft-applicationinsights-channel-js-Dbs0XRes.js +0 -1822
- package/dist/vendor-microsoft-applicationinsights-common-OjU3Zs6r.js +0 -1921
- package/dist/vendor-microsoft-applicationinsights-core-js-DWRvqBek.js +0 -4276
- package/dist/vendor-microsoft-applicationinsights-dependencies-js-BxTNw-Sk.js +0 -1407
- package/dist/vendor-microsoft-applicationinsights-properties-js-Gfhpu-At.js +0 -572
- package/dist/vendor-microsoft-applicationinsights-shims-CxtPYiwp.js +0 -43
- package/dist/vendor-microsoft-applicationinsights-web-9yeJ0EZv.js +0 -487
- package/dist/vendor-microsoft-dynamicproto-js-DSkQkH3T.js +0 -147
- package/dist/vendor-microsoft-signalr-Bgpbb4fW.js +0 -1761
- package/dist/vendor-moment-DMLRxgRE.js +0 -2589
- package/dist/vendor-nevware21-ts-async-CdMc_sGt.js +0 -261
- package/dist/vendor-nevware21-ts-utils-Dy41wRhA.js +0 -853
- package/dist/vendor-nth-check-CS1D-zr5.js +0 -45
- package/dist/vendor-orderedmap-B3SOk52B.js +0 -103
- package/dist/vendor-parse5-htmlparser2-tree-adapter-BWywtwol.js +0 -143
- package/dist/vendor-parse5-zq5Hn0y9.js +0 -5749
- package/dist/vendor-prettier-cZc5sCiS.js +0 -4875
- package/dist/vendor-prosemirror-commands-Cu1q5ZDk.js +0 -385
- package/dist/vendor-prosemirror-dropcursor-BuGmFgFS.js +0 -86
- package/dist/vendor-prosemirror-gapcursor-CyYcCWVK.js +0 -203
- package/dist/vendor-prosemirror-history-DzRcbrCw.js +0 -248
- package/dist/vendor-prosemirror-keymap-KfbdOEJw.js +0 -62
- package/dist/vendor-prosemirror-markdown-OyxRuawK.js +0 -650
- package/dist/vendor-prosemirror-model-DFp4ML7B.js +0 -2730
- package/dist/vendor-prosemirror-schema-list-CwCUArvx.js +0 -87
- package/dist/vendor-prosemirror-state-DHaVEu5h.js +0 -821
- package/dist/vendor-prosemirror-tables-mYok4vGT.js +0 -1711
- package/dist/vendor-prosemirror-transform-CAHmg-qG.js +0 -1508
- package/dist/vendor-prosemirror-view-CspJa44O.js +0 -3751
- package/dist/vendor-punycode-js-CgGegfA_.js +0 -133
- package/dist/vendor-rope-sequence-BWC2FSrq.js +0 -100
- package/dist/vendor-semver-Dar8oU3V.js +0 -1023
- package/dist/vendor-swiper-1bp0oJwt.js +0 -3387
- package/dist/vendor-tanstack-virtual-core-l0sNRNKZ.js +0 -1
- package/dist/vendor-tanstack-vue-virtual-CD9yLWd7.js +0 -1
- package/dist/vendor-tiptap-core-ClsTgaMv.js +0 -3699
- package/dist/vendor-tiptap-extension-blockquote-r1MBx4hD.js +0 -54
- package/dist/vendor-tiptap-extension-bold-BjLI4i8b.js +0 -74
- package/dist/vendor-tiptap-extension-code-D5-kDnMW.js +0 -52
- package/dist/vendor-tiptap-extension-code-block-RjEb0zPA.js +0 -215
- package/dist/vendor-tiptap-extension-document--PLOxIdq.js +0 -12
- package/dist/vendor-tiptap-extension-hard-break-9cxC2YOS.js +0 -59
- package/dist/vendor-tiptap-extension-heading-2w0TutHn.js +0 -63
- package/dist/vendor-tiptap-extension-horizontal-rule-CFowa_lc.js +0 -56
- package/dist/vendor-tiptap-extension-image-aWn-na6j.js +0 -127
- package/dist/vendor-tiptap-extension-italic-Bn-6saY0.js +0 -73
- package/dist/vendor-tiptap-extension-link-BmcG1_k-.js +0 -298
- package/dist/vendor-tiptap-extension-list-BrNBJ45n.js +0 -707
- package/dist/vendor-tiptap-extension-paragraph-DAiYhwUB.js +0 -41
- package/dist/vendor-tiptap-extension-placeholder-9tURDKy-.js +0 -1
- package/dist/vendor-tiptap-extension-strike-DqbXPfos.js +0 -64
- package/dist/vendor-tiptap-extension-table-DQwPaR7v.js +0 -374
- package/dist/vendor-tiptap-extension-table-cell-C0tEP_0i.js +0 -1
- package/dist/vendor-tiptap-extension-table-header-C0tEP_0i.js +0 -1
- package/dist/vendor-tiptap-extension-table-row-C0tEP_0i.js +0 -1
- package/dist/vendor-tiptap-extension-text-BFnfj70b.js +0 -13
- package/dist/vendor-tiptap-extension-text-style-Darua3qr.js +0 -235
- package/dist/vendor-tiptap-extension-underline-QyVnBqQZ.js +0 -65
- package/dist/vendor-tiptap-extensions-CU-D7bfm.js +0 -290
- package/dist/vendor-tiptap-markdown-BwATYN5A.js +0 -826
- package/dist/vendor-tiptap-pm-d91nGny8.js +0 -1
- package/dist/vendor-tiptap-starter-kit-5luf7zzS.js +0 -28
- package/dist/vendor-tiptap-vue-3-CFBErZGb.js +0 -157
- package/dist/vendor-truncate-html-DYC0Lj9o.js +0 -145
- package/dist/vendor-uc-micro-4lbSaZOs.js +0 -17
- package/dist/vendor-vee-validate-i18n-zT8NxX3R.js +0 -93
- package/dist/vendor-vee-validate-rules-4oWUZPpG.js +0 -316
- package/dist/vendor-vue-currency-input-BqaYAdhD.js +0 -317
- package/dist/vendor-vue-demi-CD9yLWd7.js +0 -1
- package/dist/vendor-vue-devtools-api-aVYGocXp.js +0 -93
- package/dist/vendor-vue-i18n-CO5LWKE0.js +0 -1370
- package/dist/vendor-vue3-application-insights-BKiiWnf2.js +0 -69
- package/dist/vendor-vue3-touch-events-DqysuuWh.js +0 -169
- package/dist/vendor-vuepic-vue-datepicker-CaY_xSnG.js +0 -4998
- package/dist/vendor-vueuse-components-sgKpNzof.js +0 -542
- package/dist/vendor-vueuse-core-D0cN7FqY.js +0 -5130
- package/dist/vendor-vueuse-shared-Pt0UEStA.js +0 -1169
- package/dist/vendor-w3c-keyname-CLxH8j-f.js +0 -92
|
@@ -1,2263 +0,0 @@
|
|
|
1
|
-
import { m as ve, u as ke, e as Pe, f as de, d as ie } from "./vendor-mdurl-DZFDNdqC.js";
|
|
2
|
-
import { u as Re, P as ze, r as Oe } from "./vendor-uc-micro-4lbSaZOs.js";
|
|
3
|
-
import { c as me } from "./vendor-entities-CCReaWqU.js";
|
|
4
|
-
import { L as De } from "./vendor-linkify-it-LzoUhj6C.js";
|
|
5
|
-
import { p as xe } from "./vendor-punycode-js-CgGegfA_.js";
|
|
6
|
-
function Fe(e) {
|
|
7
|
-
return Object.prototype.toString.call(e);
|
|
8
|
-
}
|
|
9
|
-
function ee(e) {
|
|
10
|
-
return Fe(e) === "[object String]";
|
|
11
|
-
}
|
|
12
|
-
const Le = Object.prototype.hasOwnProperty;
|
|
13
|
-
function $e(e, n) {
|
|
14
|
-
return Le.call(e, n);
|
|
15
|
-
}
|
|
16
|
-
function G(e) {
|
|
17
|
-
return Array.prototype.slice.call(arguments, 1).forEach(function(r) {
|
|
18
|
-
if (r) {
|
|
19
|
-
if (typeof r != "object")
|
|
20
|
-
throw new TypeError(r + "must be object");
|
|
21
|
-
Object.keys(r).forEach(function(i) {
|
|
22
|
-
e[i] = r[i];
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}), e;
|
|
26
|
-
}
|
|
27
|
-
function ge(e, n, r) {
|
|
28
|
-
return [].concat(e.slice(0, n), r, e.slice(n + 1));
|
|
29
|
-
}
|
|
30
|
-
function ne(e) {
|
|
31
|
-
return !(e >= 55296 && e <= 57343 || e >= 64976 && e <= 65007 || (e & 65535) === 65535 || (e & 65535) === 65534 || e >= 0 && e <= 8 || e === 11 || e >= 14 && e <= 31 || e >= 127 && e <= 159 || e > 1114111);
|
|
32
|
-
}
|
|
33
|
-
function H(e) {
|
|
34
|
-
if (e > 65535) {
|
|
35
|
-
e -= 65536;
|
|
36
|
-
const n = 55296 + (e >> 10), r = 56320 + (e & 1023);
|
|
37
|
-
return String.fromCharCode(n, r);
|
|
38
|
-
}
|
|
39
|
-
return String.fromCharCode(e);
|
|
40
|
-
}
|
|
41
|
-
const _e = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, Be = /&([a-z#][a-z0-9]{1,31});/gi, je = new RegExp(_e.source + "|" + Be.source, "gi"), qe = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;
|
|
42
|
-
function Ne(e, n) {
|
|
43
|
-
if (n.charCodeAt(0) === 35 && qe.test(n)) {
|
|
44
|
-
const i = n[1].toLowerCase() === "x" ? parseInt(n.slice(2), 16) : parseInt(n.slice(1), 10);
|
|
45
|
-
return ne(i) ? H(i) : e;
|
|
46
|
-
}
|
|
47
|
-
const r = me(e);
|
|
48
|
-
return r !== e ? r : e;
|
|
49
|
-
}
|
|
50
|
-
function Ze(e) {
|
|
51
|
-
return e.indexOf("\\") < 0 ? e : e.replace(_e, "$1");
|
|
52
|
-
}
|
|
53
|
-
function D(e) {
|
|
54
|
-
return e.indexOf("\\") < 0 && e.indexOf("&") < 0 ? e : e.replace(je, function(n, r, i) {
|
|
55
|
-
return r || Ne(n, i);
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
const Ue = /[&<>"]/, He = /[&<>"]/g, Ge = {
|
|
59
|
-
"&": "&",
|
|
60
|
-
"<": "<",
|
|
61
|
-
">": ">",
|
|
62
|
-
'"': """
|
|
63
|
-
};
|
|
64
|
-
function We(e) {
|
|
65
|
-
return Ge[e];
|
|
66
|
-
}
|
|
67
|
-
function R(e) {
|
|
68
|
-
return Ue.test(e) ? e.replace(He, We) : e;
|
|
69
|
-
}
|
|
70
|
-
const Qe = /[.?*+^$[\]\\(){}|-]/g;
|
|
71
|
-
function Je(e) {
|
|
72
|
-
return e.replace(Qe, "\\$&");
|
|
73
|
-
}
|
|
74
|
-
function A(e) {
|
|
75
|
-
switch (e) {
|
|
76
|
-
case 9:
|
|
77
|
-
case 32:
|
|
78
|
-
return !0;
|
|
79
|
-
}
|
|
80
|
-
return !1;
|
|
81
|
-
}
|
|
82
|
-
function $(e) {
|
|
83
|
-
if (e >= 8192 && e <= 8202)
|
|
84
|
-
return !0;
|
|
85
|
-
switch (e) {
|
|
86
|
-
case 9:
|
|
87
|
-
// \t
|
|
88
|
-
case 10:
|
|
89
|
-
// \n
|
|
90
|
-
case 11:
|
|
91
|
-
// \v
|
|
92
|
-
case 12:
|
|
93
|
-
// \f
|
|
94
|
-
case 13:
|
|
95
|
-
// \r
|
|
96
|
-
case 32:
|
|
97
|
-
case 160:
|
|
98
|
-
case 5760:
|
|
99
|
-
case 8239:
|
|
100
|
-
case 8287:
|
|
101
|
-
case 12288:
|
|
102
|
-
return !0;
|
|
103
|
-
}
|
|
104
|
-
return !1;
|
|
105
|
-
}
|
|
106
|
-
function B(e) {
|
|
107
|
-
return ze.test(e) || Oe.test(e);
|
|
108
|
-
}
|
|
109
|
-
function j(e) {
|
|
110
|
-
switch (e) {
|
|
111
|
-
case 33:
|
|
112
|
-
case 34:
|
|
113
|
-
case 35:
|
|
114
|
-
case 36:
|
|
115
|
-
case 37:
|
|
116
|
-
case 38:
|
|
117
|
-
case 39:
|
|
118
|
-
case 40:
|
|
119
|
-
case 41:
|
|
120
|
-
case 42:
|
|
121
|
-
case 43:
|
|
122
|
-
case 44:
|
|
123
|
-
case 45:
|
|
124
|
-
case 46:
|
|
125
|
-
case 47:
|
|
126
|
-
case 58:
|
|
127
|
-
case 59:
|
|
128
|
-
case 60:
|
|
129
|
-
case 61:
|
|
130
|
-
case 62:
|
|
131
|
-
case 63:
|
|
132
|
-
case 64:
|
|
133
|
-
case 91:
|
|
134
|
-
case 92:
|
|
135
|
-
case 93:
|
|
136
|
-
case 94:
|
|
137
|
-
case 95:
|
|
138
|
-
case 96:
|
|
139
|
-
case 123:
|
|
140
|
-
case 124:
|
|
141
|
-
case 125:
|
|
142
|
-
case 126:
|
|
143
|
-
return !0;
|
|
144
|
-
default:
|
|
145
|
-
return !1;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
function W(e) {
|
|
149
|
-
return e = e.trim().replace(/\s+/g, " "), "ẞ".toLowerCase() === "Ṿ" && (e = e.replace(/ẞ/g, "ß")), e.toLowerCase().toUpperCase();
|
|
150
|
-
}
|
|
151
|
-
const Ve = { mdurl: ve, ucmicro: Re }, Xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
152
|
-
__proto__: null,
|
|
153
|
-
arrayReplaceAt: ge,
|
|
154
|
-
assign: G,
|
|
155
|
-
escapeHtml: R,
|
|
156
|
-
escapeRE: Je,
|
|
157
|
-
fromCodePoint: H,
|
|
158
|
-
has: $e,
|
|
159
|
-
isMdAsciiPunct: j,
|
|
160
|
-
isPunctChar: B,
|
|
161
|
-
isSpace: A,
|
|
162
|
-
isString: ee,
|
|
163
|
-
isValidEntityCode: ne,
|
|
164
|
-
isWhiteSpace: $,
|
|
165
|
-
lib: Ve,
|
|
166
|
-
normalizeReference: W,
|
|
167
|
-
unescapeAll: D,
|
|
168
|
-
unescapeMd: Ze
|
|
169
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
170
|
-
function Ye(e, n, r) {
|
|
171
|
-
let i, o, t, l;
|
|
172
|
-
const c = e.posMax, s = e.pos;
|
|
173
|
-
for (e.pos = n + 1, i = 1; e.pos < c; ) {
|
|
174
|
-
if (t = e.src.charCodeAt(e.pos), t === 93 && (i--, i === 0)) {
|
|
175
|
-
o = !0;
|
|
176
|
-
break;
|
|
177
|
-
}
|
|
178
|
-
if (l = e.pos, e.md.inline.skipToken(e), t === 91) {
|
|
179
|
-
if (l === e.pos - 1)
|
|
180
|
-
i++;
|
|
181
|
-
else if (r)
|
|
182
|
-
return e.pos = s, -1;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
let f = -1;
|
|
186
|
-
return o && (f = e.pos), e.pos = s, f;
|
|
187
|
-
}
|
|
188
|
-
function Ke(e, n, r) {
|
|
189
|
-
let i, o = n;
|
|
190
|
-
const t = {
|
|
191
|
-
ok: !1,
|
|
192
|
-
pos: 0,
|
|
193
|
-
str: ""
|
|
194
|
-
};
|
|
195
|
-
if (e.charCodeAt(o) === 60) {
|
|
196
|
-
for (o++; o < r; ) {
|
|
197
|
-
if (i = e.charCodeAt(o), i === 10 || i === 60)
|
|
198
|
-
return t;
|
|
199
|
-
if (i === 62)
|
|
200
|
-
return t.pos = o + 1, t.str = D(e.slice(n + 1, o)), t.ok = !0, t;
|
|
201
|
-
if (i === 92 && o + 1 < r) {
|
|
202
|
-
o += 2;
|
|
203
|
-
continue;
|
|
204
|
-
}
|
|
205
|
-
o++;
|
|
206
|
-
}
|
|
207
|
-
return t;
|
|
208
|
-
}
|
|
209
|
-
let l = 0;
|
|
210
|
-
for (; o < r && (i = e.charCodeAt(o), !(i === 32 || i < 32 || i === 127)); ) {
|
|
211
|
-
if (i === 92 && o + 1 < r) {
|
|
212
|
-
if (e.charCodeAt(o + 1) === 32)
|
|
213
|
-
break;
|
|
214
|
-
o += 2;
|
|
215
|
-
continue;
|
|
216
|
-
}
|
|
217
|
-
if (i === 40 && (l++, l > 32))
|
|
218
|
-
return t;
|
|
219
|
-
if (i === 41) {
|
|
220
|
-
if (l === 0)
|
|
221
|
-
break;
|
|
222
|
-
l--;
|
|
223
|
-
}
|
|
224
|
-
o++;
|
|
225
|
-
}
|
|
226
|
-
return n === o || l !== 0 || (t.str = D(e.slice(n, o)), t.pos = o, t.ok = !0), t;
|
|
227
|
-
}
|
|
228
|
-
function en(e, n, r, i) {
|
|
229
|
-
let o, t = n;
|
|
230
|
-
const l = {
|
|
231
|
-
// if `true`, this is a valid link title
|
|
232
|
-
ok: !1,
|
|
233
|
-
// if `true`, this link can be continued on the next line
|
|
234
|
-
can_continue: !1,
|
|
235
|
-
// if `ok`, it's the position of the first character after the closing marker
|
|
236
|
-
pos: 0,
|
|
237
|
-
// if `ok`, it's the unescaped title
|
|
238
|
-
str: "",
|
|
239
|
-
// expected closing marker character code
|
|
240
|
-
marker: 0
|
|
241
|
-
};
|
|
242
|
-
if (i)
|
|
243
|
-
l.str = i.str, l.marker = i.marker;
|
|
244
|
-
else {
|
|
245
|
-
if (t >= r)
|
|
246
|
-
return l;
|
|
247
|
-
let c = e.charCodeAt(t);
|
|
248
|
-
if (c !== 34 && c !== 39 && c !== 40)
|
|
249
|
-
return l;
|
|
250
|
-
n++, t++, c === 40 && (c = 41), l.marker = c;
|
|
251
|
-
}
|
|
252
|
-
for (; t < r; ) {
|
|
253
|
-
if (o = e.charCodeAt(t), o === l.marker)
|
|
254
|
-
return l.pos = t + 1, l.str += D(e.slice(n, t)), l.ok = !0, l;
|
|
255
|
-
if (o === 40 && l.marker === 41)
|
|
256
|
-
return l;
|
|
257
|
-
o === 92 && t + 1 < r && t++, t++;
|
|
258
|
-
}
|
|
259
|
-
return l.can_continue = !0, l.str += D(e.slice(n, t)), l;
|
|
260
|
-
}
|
|
261
|
-
const nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
262
|
-
__proto__: null,
|
|
263
|
-
parseLinkDestination: Ke,
|
|
264
|
-
parseLinkLabel: Ye,
|
|
265
|
-
parseLinkTitle: en
|
|
266
|
-
}, Symbol.toStringTag, { value: "Module" })), I = {};
|
|
267
|
-
I.code_inline = function(e, n, r, i, o) {
|
|
268
|
-
const t = e[n];
|
|
269
|
-
return "<code" + o.renderAttrs(t) + ">" + R(t.content) + "</code>";
|
|
270
|
-
};
|
|
271
|
-
I.code_block = function(e, n, r, i, o) {
|
|
272
|
-
const t = e[n];
|
|
273
|
-
return "<pre" + o.renderAttrs(t) + "><code>" + R(e[n].content) + `</code></pre>
|
|
274
|
-
`;
|
|
275
|
-
};
|
|
276
|
-
I.fence = function(e, n, r, i, o) {
|
|
277
|
-
const t = e[n], l = t.info ? D(t.info).trim() : "";
|
|
278
|
-
let c = "", s = "";
|
|
279
|
-
if (l) {
|
|
280
|
-
const h = l.split(/(\s+)/g);
|
|
281
|
-
c = h[0], s = h.slice(2).join("");
|
|
282
|
-
}
|
|
283
|
-
let f;
|
|
284
|
-
if (r.highlight ? f = r.highlight(t.content, c, s) || R(t.content) : f = R(t.content), f.indexOf("<pre") === 0)
|
|
285
|
-
return f + `
|
|
286
|
-
`;
|
|
287
|
-
if (l) {
|
|
288
|
-
const h = t.attrIndex("class"), p = t.attrs ? t.attrs.slice() : [];
|
|
289
|
-
h < 0 ? p.push(["class", r.langPrefix + c]) : (p[h] = p[h].slice(), p[h][1] += " " + r.langPrefix + c);
|
|
290
|
-
const k = {
|
|
291
|
-
attrs: p
|
|
292
|
-
};
|
|
293
|
-
return `<pre><code${o.renderAttrs(k)}>${f}</code></pre>
|
|
294
|
-
`;
|
|
295
|
-
}
|
|
296
|
-
return `<pre><code${o.renderAttrs(t)}>${f}</code></pre>
|
|
297
|
-
`;
|
|
298
|
-
};
|
|
299
|
-
I.image = function(e, n, r, i, o) {
|
|
300
|
-
const t = e[n];
|
|
301
|
-
return t.attrs[t.attrIndex("alt")][1] = o.renderInlineAsText(t.children, r, i), o.renderToken(e, n, r);
|
|
302
|
-
};
|
|
303
|
-
I.hardbreak = function(e, n, r) {
|
|
304
|
-
return r.xhtmlOut ? `<br />
|
|
305
|
-
` : `<br>
|
|
306
|
-
`;
|
|
307
|
-
};
|
|
308
|
-
I.softbreak = function(e, n, r) {
|
|
309
|
-
return r.breaks ? r.xhtmlOut ? `<br />
|
|
310
|
-
` : `<br>
|
|
311
|
-
` : `
|
|
312
|
-
`;
|
|
313
|
-
};
|
|
314
|
-
I.text = function(e, n) {
|
|
315
|
-
return R(e[n].content);
|
|
316
|
-
};
|
|
317
|
-
I.html_block = function(e, n) {
|
|
318
|
-
return e[n].content;
|
|
319
|
-
};
|
|
320
|
-
I.html_inline = function(e, n) {
|
|
321
|
-
return e[n].content;
|
|
322
|
-
};
|
|
323
|
-
function F() {
|
|
324
|
-
this.rules = G({}, I);
|
|
325
|
-
}
|
|
326
|
-
F.prototype.renderAttrs = function(n) {
|
|
327
|
-
let r, i, o;
|
|
328
|
-
if (!n.attrs)
|
|
329
|
-
return "";
|
|
330
|
-
for (o = "", r = 0, i = n.attrs.length; r < i; r++)
|
|
331
|
-
o += " " + R(n.attrs[r][0]) + '="' + R(n.attrs[r][1]) + '"';
|
|
332
|
-
return o;
|
|
333
|
-
};
|
|
334
|
-
F.prototype.renderToken = function(n, r, i) {
|
|
335
|
-
const o = n[r];
|
|
336
|
-
let t = "";
|
|
337
|
-
if (o.hidden)
|
|
338
|
-
return "";
|
|
339
|
-
o.block && o.nesting !== -1 && r && n[r - 1].hidden && (t += `
|
|
340
|
-
`), t += (o.nesting === -1 ? "</" : "<") + o.tag, t += this.renderAttrs(o), o.nesting === 0 && i.xhtmlOut && (t += " /");
|
|
341
|
-
let l = !1;
|
|
342
|
-
if (o.block && (l = !0, o.nesting === 1 && r + 1 < n.length)) {
|
|
343
|
-
const c = n[r + 1];
|
|
344
|
-
(c.type === "inline" || c.hidden || c.nesting === -1 && c.tag === o.tag) && (l = !1);
|
|
345
|
-
}
|
|
346
|
-
return t += l ? `>
|
|
347
|
-
` : ">", t;
|
|
348
|
-
};
|
|
349
|
-
F.prototype.renderInline = function(e, n, r) {
|
|
350
|
-
let i = "";
|
|
351
|
-
const o = this.rules;
|
|
352
|
-
for (let t = 0, l = e.length; t < l; t++) {
|
|
353
|
-
const c = e[t].type;
|
|
354
|
-
typeof o[c] < "u" ? i += o[c](e, t, n, r, this) : i += this.renderToken(e, t, n);
|
|
355
|
-
}
|
|
356
|
-
return i;
|
|
357
|
-
};
|
|
358
|
-
F.prototype.renderInlineAsText = function(e, n, r) {
|
|
359
|
-
let i = "";
|
|
360
|
-
for (let o = 0, t = e.length; o < t; o++)
|
|
361
|
-
switch (e[o].type) {
|
|
362
|
-
case "text":
|
|
363
|
-
i += e[o].content;
|
|
364
|
-
break;
|
|
365
|
-
case "image":
|
|
366
|
-
i += this.renderInlineAsText(e[o].children, n, r);
|
|
367
|
-
break;
|
|
368
|
-
case "html_inline":
|
|
369
|
-
case "html_block":
|
|
370
|
-
i += e[o].content;
|
|
371
|
-
break;
|
|
372
|
-
case "softbreak":
|
|
373
|
-
case "hardbreak":
|
|
374
|
-
i += `
|
|
375
|
-
`;
|
|
376
|
-
break;
|
|
377
|
-
}
|
|
378
|
-
return i;
|
|
379
|
-
};
|
|
380
|
-
F.prototype.render = function(e, n, r) {
|
|
381
|
-
let i = "";
|
|
382
|
-
const o = this.rules;
|
|
383
|
-
for (let t = 0, l = e.length; t < l; t++) {
|
|
384
|
-
const c = e[t].type;
|
|
385
|
-
c === "inline" ? i += this.renderInline(e[t].children, n, r) : typeof o[c] < "u" ? i += o[c](e, t, n, r, this) : i += this.renderToken(e, t, n, r);
|
|
386
|
-
}
|
|
387
|
-
return i;
|
|
388
|
-
};
|
|
389
|
-
function S() {
|
|
390
|
-
this.__rules__ = [], this.__cache__ = null;
|
|
391
|
-
}
|
|
392
|
-
S.prototype.__find__ = function(e) {
|
|
393
|
-
for (let n = 0; n < this.__rules__.length; n++)
|
|
394
|
-
if (this.__rules__[n].name === e)
|
|
395
|
-
return n;
|
|
396
|
-
return -1;
|
|
397
|
-
};
|
|
398
|
-
S.prototype.__compile__ = function() {
|
|
399
|
-
const e = this, n = [""];
|
|
400
|
-
e.__rules__.forEach(function(r) {
|
|
401
|
-
r.enabled && r.alt.forEach(function(i) {
|
|
402
|
-
n.indexOf(i) < 0 && n.push(i);
|
|
403
|
-
});
|
|
404
|
-
}), e.__cache__ = {}, n.forEach(function(r) {
|
|
405
|
-
e.__cache__[r] = [], e.__rules__.forEach(function(i) {
|
|
406
|
-
i.enabled && (r && i.alt.indexOf(r) < 0 || e.__cache__[r].push(i.fn));
|
|
407
|
-
});
|
|
408
|
-
});
|
|
409
|
-
};
|
|
410
|
-
S.prototype.at = function(e, n, r) {
|
|
411
|
-
const i = this.__find__(e), o = r || {};
|
|
412
|
-
if (i === -1)
|
|
413
|
-
throw new Error("Parser rule not found: " + e);
|
|
414
|
-
this.__rules__[i].fn = n, this.__rules__[i].alt = o.alt || [], this.__cache__ = null;
|
|
415
|
-
};
|
|
416
|
-
S.prototype.before = function(e, n, r, i) {
|
|
417
|
-
const o = this.__find__(e), t = i || {};
|
|
418
|
-
if (o === -1)
|
|
419
|
-
throw new Error("Parser rule not found: " + e);
|
|
420
|
-
this.__rules__.splice(o, 0, {
|
|
421
|
-
name: n,
|
|
422
|
-
enabled: !0,
|
|
423
|
-
fn: r,
|
|
424
|
-
alt: t.alt || []
|
|
425
|
-
}), this.__cache__ = null;
|
|
426
|
-
};
|
|
427
|
-
S.prototype.after = function(e, n, r, i) {
|
|
428
|
-
const o = this.__find__(e), t = i || {};
|
|
429
|
-
if (o === -1)
|
|
430
|
-
throw new Error("Parser rule not found: " + e);
|
|
431
|
-
this.__rules__.splice(o + 1, 0, {
|
|
432
|
-
name: n,
|
|
433
|
-
enabled: !0,
|
|
434
|
-
fn: r,
|
|
435
|
-
alt: t.alt || []
|
|
436
|
-
}), this.__cache__ = null;
|
|
437
|
-
};
|
|
438
|
-
S.prototype.push = function(e, n, r) {
|
|
439
|
-
const i = r || {};
|
|
440
|
-
this.__rules__.push({
|
|
441
|
-
name: e,
|
|
442
|
-
enabled: !0,
|
|
443
|
-
fn: n,
|
|
444
|
-
alt: i.alt || []
|
|
445
|
-
}), this.__cache__ = null;
|
|
446
|
-
};
|
|
447
|
-
S.prototype.enable = function(e, n) {
|
|
448
|
-
Array.isArray(e) || (e = [e]);
|
|
449
|
-
const r = [];
|
|
450
|
-
return e.forEach(function(i) {
|
|
451
|
-
const o = this.__find__(i);
|
|
452
|
-
if (o < 0) {
|
|
453
|
-
if (n)
|
|
454
|
-
return;
|
|
455
|
-
throw new Error("Rules manager: invalid rule name " + i);
|
|
456
|
-
}
|
|
457
|
-
this.__rules__[o].enabled = !0, r.push(i);
|
|
458
|
-
}, this), this.__cache__ = null, r;
|
|
459
|
-
};
|
|
460
|
-
S.prototype.enableOnly = function(e, n) {
|
|
461
|
-
Array.isArray(e) || (e = [e]), this.__rules__.forEach(function(r) {
|
|
462
|
-
r.enabled = !1;
|
|
463
|
-
}), this.enable(e, n);
|
|
464
|
-
};
|
|
465
|
-
S.prototype.disable = function(e, n) {
|
|
466
|
-
Array.isArray(e) || (e = [e]);
|
|
467
|
-
const r = [];
|
|
468
|
-
return e.forEach(function(i) {
|
|
469
|
-
const o = this.__find__(i);
|
|
470
|
-
if (o < 0) {
|
|
471
|
-
if (n)
|
|
472
|
-
return;
|
|
473
|
-
throw new Error("Rules manager: invalid rule name " + i);
|
|
474
|
-
}
|
|
475
|
-
this.__rules__[o].enabled = !1, r.push(i);
|
|
476
|
-
}, this), this.__cache__ = null, r;
|
|
477
|
-
};
|
|
478
|
-
S.prototype.getRules = function(e) {
|
|
479
|
-
return this.__cache__ === null && this.__compile__(), this.__cache__[e] || [];
|
|
480
|
-
};
|
|
481
|
-
function T(e, n, r) {
|
|
482
|
-
this.type = e, this.tag = n, this.attrs = null, this.map = null, this.nesting = r, this.level = 0, this.children = null, this.content = "", this.markup = "", this.info = "", this.meta = null, this.block = !1, this.hidden = !1;
|
|
483
|
-
}
|
|
484
|
-
T.prototype.attrIndex = function(n) {
|
|
485
|
-
if (!this.attrs)
|
|
486
|
-
return -1;
|
|
487
|
-
const r = this.attrs;
|
|
488
|
-
for (let i = 0, o = r.length; i < o; i++)
|
|
489
|
-
if (r[i][0] === n)
|
|
490
|
-
return i;
|
|
491
|
-
return -1;
|
|
492
|
-
};
|
|
493
|
-
T.prototype.attrPush = function(n) {
|
|
494
|
-
this.attrs ? this.attrs.push(n) : this.attrs = [n];
|
|
495
|
-
};
|
|
496
|
-
T.prototype.attrSet = function(n, r) {
|
|
497
|
-
const i = this.attrIndex(n), o = [n, r];
|
|
498
|
-
i < 0 ? this.attrPush(o) : this.attrs[i] = o;
|
|
499
|
-
};
|
|
500
|
-
T.prototype.attrGet = function(n) {
|
|
501
|
-
const r = this.attrIndex(n);
|
|
502
|
-
let i = null;
|
|
503
|
-
return r >= 0 && (i = this.attrs[r][1]), i;
|
|
504
|
-
};
|
|
505
|
-
T.prototype.attrJoin = function(n, r) {
|
|
506
|
-
const i = this.attrIndex(n);
|
|
507
|
-
i < 0 ? this.attrPush([n, r]) : this.attrs[i][1] = this.attrs[i][1] + " " + r;
|
|
508
|
-
};
|
|
509
|
-
function be(e, n, r) {
|
|
510
|
-
this.src = e, this.env = r, this.tokens = [], this.inlineMode = !1, this.md = n;
|
|
511
|
-
}
|
|
512
|
-
be.prototype.Token = T;
|
|
513
|
-
const rn = /\r\n?|\n/g, on = /\0/g;
|
|
514
|
-
function tn(e) {
|
|
515
|
-
let n;
|
|
516
|
-
n = e.src.replace(rn, `
|
|
517
|
-
`), n = n.replace(on, "�"), e.src = n;
|
|
518
|
-
}
|
|
519
|
-
function ln(e) {
|
|
520
|
-
let n;
|
|
521
|
-
e.inlineMode ? (n = new e.Token("inline", "", 0), n.content = e.src, n.map = [0, 1], n.children = [], e.tokens.push(n)) : e.md.block.parse(e.src, e.md, e.env, e.tokens);
|
|
522
|
-
}
|
|
523
|
-
function cn(e) {
|
|
524
|
-
const n = e.tokens;
|
|
525
|
-
for (let r = 0, i = n.length; r < i; r++) {
|
|
526
|
-
const o = n[r];
|
|
527
|
-
o.type === "inline" && e.md.inline.parse(o.content, e.md, e.env, o.children);
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
function sn(e) {
|
|
531
|
-
return /^<a[>\s]/i.test(e);
|
|
532
|
-
}
|
|
533
|
-
function fn(e) {
|
|
534
|
-
return /^<\/a\s*>/i.test(e);
|
|
535
|
-
}
|
|
536
|
-
function un(e) {
|
|
537
|
-
const n = e.tokens;
|
|
538
|
-
if (e.md.options.linkify)
|
|
539
|
-
for (let r = 0, i = n.length; r < i; r++) {
|
|
540
|
-
if (n[r].type !== "inline" || !e.md.linkify.pretest(n[r].content))
|
|
541
|
-
continue;
|
|
542
|
-
let o = n[r].children, t = 0;
|
|
543
|
-
for (let l = o.length - 1; l >= 0; l--) {
|
|
544
|
-
const c = o[l];
|
|
545
|
-
if (c.type === "link_close") {
|
|
546
|
-
for (l--; o[l].level !== c.level && o[l].type !== "link_open"; )
|
|
547
|
-
l--;
|
|
548
|
-
continue;
|
|
549
|
-
}
|
|
550
|
-
if (c.type === "html_inline" && (sn(c.content) && t > 0 && t--, fn(c.content) && t++), !(t > 0) && c.type === "text" && e.md.linkify.test(c.content)) {
|
|
551
|
-
const s = c.content;
|
|
552
|
-
let f = e.md.linkify.match(s);
|
|
553
|
-
const h = [];
|
|
554
|
-
let p = c.level, k = 0;
|
|
555
|
-
f.length > 0 && f[0].index === 0 && l > 0 && o[l - 1].type === "text_special" && (f = f.slice(1));
|
|
556
|
-
for (let a = 0; a < f.length; a++) {
|
|
557
|
-
const u = f[a].url, C = e.md.normalizeLink(u);
|
|
558
|
-
if (!e.md.validateLink(C))
|
|
559
|
-
continue;
|
|
560
|
-
let _ = f[a].text;
|
|
561
|
-
f[a].schema ? f[a].schema === "mailto:" && !/^mailto:/i.test(_) ? _ = e.md.normalizeLinkText("mailto:" + _).replace(/^mailto:/, "") : _ = e.md.normalizeLinkText(_) : _ = e.md.normalizeLinkText("http://" + _).replace(/^http:\/\//, "");
|
|
562
|
-
const y = f[a].index;
|
|
563
|
-
if (y > k) {
|
|
564
|
-
const g = new e.Token("text", "", 0);
|
|
565
|
-
g.content = s.slice(k, y), g.level = p, h.push(g);
|
|
566
|
-
}
|
|
567
|
-
const d = new e.Token("link_open", "a", 1);
|
|
568
|
-
d.attrs = [["href", C]], d.level = p++, d.markup = "linkify", d.info = "auto", h.push(d);
|
|
569
|
-
const x = new e.Token("text", "", 0);
|
|
570
|
-
x.content = _, x.level = p, h.push(x);
|
|
571
|
-
const m = new e.Token("link_close", "a", -1);
|
|
572
|
-
m.level = --p, m.markup = "linkify", m.info = "auto", h.push(m), k = f[a].lastIndex;
|
|
573
|
-
}
|
|
574
|
-
if (k < s.length) {
|
|
575
|
-
const a = new e.Token("text", "", 0);
|
|
576
|
-
a.content = s.slice(k), a.level = p, h.push(a);
|
|
577
|
-
}
|
|
578
|
-
n[r].children = o = ge(o, l, h);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
const Ce = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, hn = /\((c|tm|r)\)/i, pn = /\((c|tm|r)\)/ig, an = {
|
|
584
|
-
c: "©",
|
|
585
|
-
r: "®",
|
|
586
|
-
tm: "™"
|
|
587
|
-
};
|
|
588
|
-
function kn(e, n) {
|
|
589
|
-
return an[n.toLowerCase()];
|
|
590
|
-
}
|
|
591
|
-
function dn(e) {
|
|
592
|
-
let n = 0;
|
|
593
|
-
for (let r = e.length - 1; r >= 0; r--) {
|
|
594
|
-
const i = e[r];
|
|
595
|
-
i.type === "text" && !n && (i.content = i.content.replace(pn, kn)), i.type === "link_open" && i.info === "auto" && n--, i.type === "link_close" && i.info === "auto" && n++;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
function mn(e) {
|
|
599
|
-
let n = 0;
|
|
600
|
-
for (let r = e.length - 1; r >= 0; r--) {
|
|
601
|
-
const i = e[r];
|
|
602
|
-
i.type === "text" && !n && Ce.test(i.content) && (i.content = i.content.replace(/\+-/g, "±").replace(/\.{2,}/g, "…").replace(/([?!])…/g, "$1..").replace(/([?!]){4,}/g, "$1$1$1").replace(/,{2,}/g, ",").replace(/(^|[^-])---(?=[^-]|$)/mg, "$1—").replace(/(^|\s)--(?=\s|$)/mg, "$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg, "$1–")), i.type === "link_open" && i.info === "auto" && n--, i.type === "link_close" && i.info === "auto" && n++;
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
function xn(e) {
|
|
606
|
-
let n;
|
|
607
|
-
if (e.md.options.typographer)
|
|
608
|
-
for (n = e.tokens.length - 1; n >= 0; n--)
|
|
609
|
-
e.tokens[n].type === "inline" && (hn.test(e.tokens[n].content) && dn(e.tokens[n].children), Ce.test(e.tokens[n].content) && mn(e.tokens[n].children));
|
|
610
|
-
}
|
|
611
|
-
const gn = /['"]/, le = /['"]/g, ce = "’";
|
|
612
|
-
function Z(e, n, r) {
|
|
613
|
-
return e.slice(0, n) + r + e.slice(n + 1);
|
|
614
|
-
}
|
|
615
|
-
function _n(e, n) {
|
|
616
|
-
let r;
|
|
617
|
-
const i = [];
|
|
618
|
-
for (let o = 0; o < e.length; o++) {
|
|
619
|
-
const t = e[o], l = e[o].level;
|
|
620
|
-
for (r = i.length - 1; r >= 0 && !(i[r].level <= l); r--)
|
|
621
|
-
;
|
|
622
|
-
if (i.length = r + 1, t.type !== "text")
|
|
623
|
-
continue;
|
|
624
|
-
let c = t.content, s = 0, f = c.length;
|
|
625
|
-
e:
|
|
626
|
-
for (; s < f; ) {
|
|
627
|
-
le.lastIndex = s;
|
|
628
|
-
const h = le.exec(c);
|
|
629
|
-
if (!h)
|
|
630
|
-
break;
|
|
631
|
-
let p = !0, k = !0;
|
|
632
|
-
s = h.index + 1;
|
|
633
|
-
const a = h[0] === "'";
|
|
634
|
-
let u = 32;
|
|
635
|
-
if (h.index - 1 >= 0)
|
|
636
|
-
u = c.charCodeAt(h.index - 1);
|
|
637
|
-
else
|
|
638
|
-
for (r = o - 1; r >= 0 && !(e[r].type === "softbreak" || e[r].type === "hardbreak"); r--)
|
|
639
|
-
if (e[r].content) {
|
|
640
|
-
u = e[r].content.charCodeAt(e[r].content.length - 1);
|
|
641
|
-
break;
|
|
642
|
-
}
|
|
643
|
-
let C = 32;
|
|
644
|
-
if (s < f)
|
|
645
|
-
C = c.charCodeAt(s);
|
|
646
|
-
else
|
|
647
|
-
for (r = o + 1; r < e.length && !(e[r].type === "softbreak" || e[r].type === "hardbreak"); r++)
|
|
648
|
-
if (e[r].content) {
|
|
649
|
-
C = e[r].content.charCodeAt(0);
|
|
650
|
-
break;
|
|
651
|
-
}
|
|
652
|
-
const _ = j(u) || B(String.fromCharCode(u)), y = j(C) || B(String.fromCharCode(C)), d = $(u), x = $(C);
|
|
653
|
-
if (x ? p = !1 : y && (d || _ || (p = !1)), d ? k = !1 : _ && (x || y || (k = !1)), C === 34 && h[0] === '"' && u >= 48 && u <= 57 && (k = p = !1), p && k && (p = _, k = y), !p && !k) {
|
|
654
|
-
a && (t.content = Z(t.content, h.index, ce));
|
|
655
|
-
continue;
|
|
656
|
-
}
|
|
657
|
-
if (k)
|
|
658
|
-
for (r = i.length - 1; r >= 0; r--) {
|
|
659
|
-
let m = i[r];
|
|
660
|
-
if (i[r].level < l)
|
|
661
|
-
break;
|
|
662
|
-
if (m.single === a && i[r].level === l) {
|
|
663
|
-
m = i[r];
|
|
664
|
-
let g, b;
|
|
665
|
-
a ? (g = n.md.options.quotes[2], b = n.md.options.quotes[3]) : (g = n.md.options.quotes[0], b = n.md.options.quotes[1]), t.content = Z(t.content, h.index, b), e[m.token].content = Z(
|
|
666
|
-
e[m.token].content,
|
|
667
|
-
m.pos,
|
|
668
|
-
g
|
|
669
|
-
), s += b.length - 1, m.token === o && (s += g.length - 1), c = t.content, f = c.length, i.length = r;
|
|
670
|
-
continue e;
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
p ? i.push({
|
|
674
|
-
token: o,
|
|
675
|
-
pos: h.index,
|
|
676
|
-
single: a,
|
|
677
|
-
level: l
|
|
678
|
-
}) : k && a && (t.content = Z(t.content, h.index, ce));
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
function bn(e) {
|
|
683
|
-
if (e.md.options.typographer)
|
|
684
|
-
for (let n = e.tokens.length - 1; n >= 0; n--)
|
|
685
|
-
e.tokens[n].type !== "inline" || !gn.test(e.tokens[n].content) || _n(e.tokens[n].children, e);
|
|
686
|
-
}
|
|
687
|
-
function Cn(e) {
|
|
688
|
-
let n, r;
|
|
689
|
-
const i = e.tokens, o = i.length;
|
|
690
|
-
for (let t = 0; t < o; t++) {
|
|
691
|
-
if (i[t].type !== "inline") continue;
|
|
692
|
-
const l = i[t].children, c = l.length;
|
|
693
|
-
for (n = 0; n < c; n++)
|
|
694
|
-
l[n].type === "text_special" && (l[n].type = "text");
|
|
695
|
-
for (n = r = 0; n < c; n++)
|
|
696
|
-
l[n].type === "text" && n + 1 < c && l[n + 1].type === "text" ? l[n + 1].content = l[n].content + l[n + 1].content : (n !== r && (l[r] = l[n]), r++);
|
|
697
|
-
n !== r && (l.length = r);
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
const V = [
|
|
701
|
-
["normalize", tn],
|
|
702
|
-
["block", ln],
|
|
703
|
-
["inline", cn],
|
|
704
|
-
["linkify", un],
|
|
705
|
-
["replacements", xn],
|
|
706
|
-
["smartquotes", bn],
|
|
707
|
-
// `text_join` finds `text_special` tokens (for escape sequences)
|
|
708
|
-
// and joins them with the rest of the text
|
|
709
|
-
["text_join", Cn]
|
|
710
|
-
];
|
|
711
|
-
function re() {
|
|
712
|
-
this.ruler = new S();
|
|
713
|
-
for (let e = 0; e < V.length; e++)
|
|
714
|
-
this.ruler.push(V[e][0], V[e][1]);
|
|
715
|
-
}
|
|
716
|
-
re.prototype.process = function(e) {
|
|
717
|
-
const n = this.ruler.getRules("");
|
|
718
|
-
for (let r = 0, i = n.length; r < i; r++)
|
|
719
|
-
n[r](e);
|
|
720
|
-
};
|
|
721
|
-
re.prototype.State = be;
|
|
722
|
-
function v(e, n, r, i) {
|
|
723
|
-
this.src = e, this.md = n, this.env = r, this.tokens = i, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0;
|
|
724
|
-
const o = this.src;
|
|
725
|
-
for (let t = 0, l = 0, c = 0, s = 0, f = o.length, h = !1; l < f; l++) {
|
|
726
|
-
const p = o.charCodeAt(l);
|
|
727
|
-
if (!h)
|
|
728
|
-
if (A(p)) {
|
|
729
|
-
c++, p === 9 ? s += 4 - s % 4 : s++;
|
|
730
|
-
continue;
|
|
731
|
-
} else
|
|
732
|
-
h = !0;
|
|
733
|
-
(p === 10 || l === f - 1) && (p !== 10 && l++, this.bMarks.push(t), this.eMarks.push(l), this.tShift.push(c), this.sCount.push(s), this.bsCount.push(0), h = !1, c = 0, s = 0, t = l + 1);
|
|
734
|
-
}
|
|
735
|
-
this.bMarks.push(o.length), this.eMarks.push(o.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
|
|
736
|
-
}
|
|
737
|
-
v.prototype.push = function(e, n, r) {
|
|
738
|
-
const i = new T(e, n, r);
|
|
739
|
-
return i.block = !0, r < 0 && this.level--, i.level = this.level, r > 0 && this.level++, this.tokens.push(i), i;
|
|
740
|
-
};
|
|
741
|
-
v.prototype.isEmpty = function(n) {
|
|
742
|
-
return this.bMarks[n] + this.tShift[n] >= this.eMarks[n];
|
|
743
|
-
};
|
|
744
|
-
v.prototype.skipEmptyLines = function(n) {
|
|
745
|
-
for (let r = this.lineMax; n < r && !(this.bMarks[n] + this.tShift[n] < this.eMarks[n]); n++)
|
|
746
|
-
;
|
|
747
|
-
return n;
|
|
748
|
-
};
|
|
749
|
-
v.prototype.skipSpaces = function(n) {
|
|
750
|
-
for (let r = this.src.length; n < r; n++) {
|
|
751
|
-
const i = this.src.charCodeAt(n);
|
|
752
|
-
if (!A(i))
|
|
753
|
-
break;
|
|
754
|
-
}
|
|
755
|
-
return n;
|
|
756
|
-
};
|
|
757
|
-
v.prototype.skipSpacesBack = function(n, r) {
|
|
758
|
-
if (n <= r)
|
|
759
|
-
return n;
|
|
760
|
-
for (; n > r; )
|
|
761
|
-
if (!A(this.src.charCodeAt(--n)))
|
|
762
|
-
return n + 1;
|
|
763
|
-
return n;
|
|
764
|
-
};
|
|
765
|
-
v.prototype.skipChars = function(n, r) {
|
|
766
|
-
for (let i = this.src.length; n < i && this.src.charCodeAt(n) === r; n++)
|
|
767
|
-
;
|
|
768
|
-
return n;
|
|
769
|
-
};
|
|
770
|
-
v.prototype.skipCharsBack = function(n, r, i) {
|
|
771
|
-
if (n <= i)
|
|
772
|
-
return n;
|
|
773
|
-
for (; n > i; )
|
|
774
|
-
if (r !== this.src.charCodeAt(--n))
|
|
775
|
-
return n + 1;
|
|
776
|
-
return n;
|
|
777
|
-
};
|
|
778
|
-
v.prototype.getLines = function(n, r, i, o) {
|
|
779
|
-
if (n >= r)
|
|
780
|
-
return "";
|
|
781
|
-
const t = new Array(r - n);
|
|
782
|
-
for (let l = 0, c = n; c < r; c++, l++) {
|
|
783
|
-
let s = 0;
|
|
784
|
-
const f = this.bMarks[c];
|
|
785
|
-
let h = f, p;
|
|
786
|
-
for (c + 1 < r || o ? p = this.eMarks[c] + 1 : p = this.eMarks[c]; h < p && s < i; ) {
|
|
787
|
-
const k = this.src.charCodeAt(h);
|
|
788
|
-
if (A(k))
|
|
789
|
-
k === 9 ? s += 4 - (s + this.bsCount[c]) % 4 : s++;
|
|
790
|
-
else if (h - f < this.tShift[c])
|
|
791
|
-
s++;
|
|
792
|
-
else
|
|
793
|
-
break;
|
|
794
|
-
h++;
|
|
795
|
-
}
|
|
796
|
-
s > i ? t[l] = new Array(s - i + 1).join(" ") + this.src.slice(h, p) : t[l] = this.src.slice(h, p);
|
|
797
|
-
}
|
|
798
|
-
return t.join("");
|
|
799
|
-
};
|
|
800
|
-
v.prototype.Token = T;
|
|
801
|
-
const An = 65536;
|
|
802
|
-
function X(e, n) {
|
|
803
|
-
const r = e.bMarks[n] + e.tShift[n], i = e.eMarks[n];
|
|
804
|
-
return e.src.slice(r, i);
|
|
805
|
-
}
|
|
806
|
-
function se(e) {
|
|
807
|
-
const n = [], r = e.length;
|
|
808
|
-
let i = 0, o = e.charCodeAt(i), t = !1, l = 0, c = "";
|
|
809
|
-
for (; i < r; )
|
|
810
|
-
o === 124 && (t ? (c += e.substring(l, i - 1), l = i) : (n.push(c + e.substring(l, i)), c = "", l = i + 1)), t = o === 92, i++, o = e.charCodeAt(i);
|
|
811
|
-
return n.push(c + e.substring(l)), n;
|
|
812
|
-
}
|
|
813
|
-
function yn(e, n, r, i) {
|
|
814
|
-
if (n + 2 > r)
|
|
815
|
-
return !1;
|
|
816
|
-
let o = n + 1;
|
|
817
|
-
if (e.sCount[o] < e.blkIndent || e.sCount[o] - e.blkIndent >= 4)
|
|
818
|
-
return !1;
|
|
819
|
-
let t = e.bMarks[o] + e.tShift[o];
|
|
820
|
-
if (t >= e.eMarks[o])
|
|
821
|
-
return !1;
|
|
822
|
-
const l = e.src.charCodeAt(t++);
|
|
823
|
-
if (l !== 124 && l !== 45 && l !== 58 || t >= e.eMarks[o])
|
|
824
|
-
return !1;
|
|
825
|
-
const c = e.src.charCodeAt(t++);
|
|
826
|
-
if (c !== 124 && c !== 45 && c !== 58 && !A(c) || l === 45 && A(c))
|
|
827
|
-
return !1;
|
|
828
|
-
for (; t < e.eMarks[o]; ) {
|
|
829
|
-
const m = e.src.charCodeAt(t);
|
|
830
|
-
if (m !== 124 && m !== 45 && m !== 58 && !A(m))
|
|
831
|
-
return !1;
|
|
832
|
-
t++;
|
|
833
|
-
}
|
|
834
|
-
let s = X(e, n + 1), f = s.split("|");
|
|
835
|
-
const h = [];
|
|
836
|
-
for (let m = 0; m < f.length; m++) {
|
|
837
|
-
const g = f[m].trim();
|
|
838
|
-
if (!g) {
|
|
839
|
-
if (m === 0 || m === f.length - 1)
|
|
840
|
-
continue;
|
|
841
|
-
return !1;
|
|
842
|
-
}
|
|
843
|
-
if (!/^:?-+:?$/.test(g))
|
|
844
|
-
return !1;
|
|
845
|
-
g.charCodeAt(g.length - 1) === 58 ? h.push(g.charCodeAt(0) === 58 ? "center" : "right") : g.charCodeAt(0) === 58 ? h.push("left") : h.push("");
|
|
846
|
-
}
|
|
847
|
-
if (s = X(e, n).trim(), s.indexOf("|") === -1 || e.sCount[n] - e.blkIndent >= 4)
|
|
848
|
-
return !1;
|
|
849
|
-
f = se(s), f.length && f[0] === "" && f.shift(), f.length && f[f.length - 1] === "" && f.pop();
|
|
850
|
-
const p = f.length;
|
|
851
|
-
if (p === 0 || p !== h.length)
|
|
852
|
-
return !1;
|
|
853
|
-
if (i)
|
|
854
|
-
return !0;
|
|
855
|
-
const k = e.parentType;
|
|
856
|
-
e.parentType = "table";
|
|
857
|
-
const a = e.md.block.ruler.getRules("blockquote"), u = e.push("table_open", "table", 1), C = [n, 0];
|
|
858
|
-
u.map = C;
|
|
859
|
-
const _ = e.push("thead_open", "thead", 1);
|
|
860
|
-
_.map = [n, n + 1];
|
|
861
|
-
const y = e.push("tr_open", "tr", 1);
|
|
862
|
-
y.map = [n, n + 1];
|
|
863
|
-
for (let m = 0; m < f.length; m++) {
|
|
864
|
-
const g = e.push("th_open", "th", 1);
|
|
865
|
-
h[m] && (g.attrs = [["style", "text-align:" + h[m]]]);
|
|
866
|
-
const b = e.push("inline", "", 0);
|
|
867
|
-
b.content = f[m].trim(), b.children = [], e.push("th_close", "th", -1);
|
|
868
|
-
}
|
|
869
|
-
e.push("tr_close", "tr", -1), e.push("thead_close", "thead", -1);
|
|
870
|
-
let d, x = 0;
|
|
871
|
-
for (o = n + 2; o < r && !(e.sCount[o] < e.blkIndent); o++) {
|
|
872
|
-
let m = !1;
|
|
873
|
-
for (let b = 0, E = a.length; b < E; b++)
|
|
874
|
-
if (a[b](e, o, r, !0)) {
|
|
875
|
-
m = !0;
|
|
876
|
-
break;
|
|
877
|
-
}
|
|
878
|
-
if (m || (s = X(e, o).trim(), !s) || e.sCount[o] - e.blkIndent >= 4 || (f = se(s), f.length && f[0] === "" && f.shift(), f.length && f[f.length - 1] === "" && f.pop(), x += p - f.length, x > An))
|
|
879
|
-
break;
|
|
880
|
-
if (o === n + 2) {
|
|
881
|
-
const b = e.push("tbody_open", "tbody", 1);
|
|
882
|
-
b.map = d = [n + 2, 0];
|
|
883
|
-
}
|
|
884
|
-
const g = e.push("tr_open", "tr", 1);
|
|
885
|
-
g.map = [o, o + 1];
|
|
886
|
-
for (let b = 0; b < p; b++) {
|
|
887
|
-
const E = e.push("td_open", "td", 1);
|
|
888
|
-
h[b] && (E.attrs = [["style", "text-align:" + h[b]]]);
|
|
889
|
-
const M = e.push("inline", "", 0);
|
|
890
|
-
M.content = f[b] ? f[b].trim() : "", M.children = [], e.push("td_close", "td", -1);
|
|
891
|
-
}
|
|
892
|
-
e.push("tr_close", "tr", -1);
|
|
893
|
-
}
|
|
894
|
-
return d && (e.push("tbody_close", "tbody", -1), d[1] = o), e.push("table_close", "table", -1), C[1] = o, e.parentType = k, e.line = o, !0;
|
|
895
|
-
}
|
|
896
|
-
function En(e, n, r) {
|
|
897
|
-
if (e.sCount[n] - e.blkIndent < 4)
|
|
898
|
-
return !1;
|
|
899
|
-
let i = n + 1, o = i;
|
|
900
|
-
for (; i < r; ) {
|
|
901
|
-
if (e.isEmpty(i)) {
|
|
902
|
-
i++;
|
|
903
|
-
continue;
|
|
904
|
-
}
|
|
905
|
-
if (e.sCount[i] - e.blkIndent >= 4) {
|
|
906
|
-
i++, o = i;
|
|
907
|
-
continue;
|
|
908
|
-
}
|
|
909
|
-
break;
|
|
910
|
-
}
|
|
911
|
-
e.line = o;
|
|
912
|
-
const t = e.push("code_block", "code", 0);
|
|
913
|
-
return t.content = e.getLines(n, o, 4 + e.blkIndent, !1) + `
|
|
914
|
-
`, t.map = [n, e.line], !0;
|
|
915
|
-
}
|
|
916
|
-
function Sn(e, n, r, i) {
|
|
917
|
-
let o = e.bMarks[n] + e.tShift[n], t = e.eMarks[n];
|
|
918
|
-
if (e.sCount[n] - e.blkIndent >= 4 || o + 3 > t)
|
|
919
|
-
return !1;
|
|
920
|
-
const l = e.src.charCodeAt(o);
|
|
921
|
-
if (l !== 126 && l !== 96)
|
|
922
|
-
return !1;
|
|
923
|
-
let c = o;
|
|
924
|
-
o = e.skipChars(o, l);
|
|
925
|
-
let s = o - c;
|
|
926
|
-
if (s < 3)
|
|
927
|
-
return !1;
|
|
928
|
-
const f = e.src.slice(c, o), h = e.src.slice(o, t);
|
|
929
|
-
if (l === 96 && h.indexOf(String.fromCharCode(l)) >= 0)
|
|
930
|
-
return !1;
|
|
931
|
-
if (i)
|
|
932
|
-
return !0;
|
|
933
|
-
let p = n, k = !1;
|
|
934
|
-
for (; p++, !(p >= r || (o = c = e.bMarks[p] + e.tShift[p], t = e.eMarks[p], o < t && e.sCount[p] < e.blkIndent)); )
|
|
935
|
-
if (e.src.charCodeAt(o) === l && !(e.sCount[p] - e.blkIndent >= 4) && (o = e.skipChars(o, l), !(o - c < s) && (o = e.skipSpaces(o), !(o < t)))) {
|
|
936
|
-
k = !0;
|
|
937
|
-
break;
|
|
938
|
-
}
|
|
939
|
-
s = e.sCount[n], e.line = p + (k ? 1 : 0);
|
|
940
|
-
const a = e.push("fence", "code", 0);
|
|
941
|
-
return a.info = h, a.content = e.getLines(n + 1, p, s, !0), a.markup = f, a.map = [n, e.line], !0;
|
|
942
|
-
}
|
|
943
|
-
function Mn(e, n, r, i) {
|
|
944
|
-
let o = e.bMarks[n] + e.tShift[n], t = e.eMarks[n];
|
|
945
|
-
const l = e.lineMax;
|
|
946
|
-
if (e.sCount[n] - e.blkIndent >= 4 || e.src.charCodeAt(o) !== 62)
|
|
947
|
-
return !1;
|
|
948
|
-
if (i)
|
|
949
|
-
return !0;
|
|
950
|
-
const c = [], s = [], f = [], h = [], p = e.md.block.ruler.getRules("blockquote"), k = e.parentType;
|
|
951
|
-
e.parentType = "blockquote";
|
|
952
|
-
let a = !1, u;
|
|
953
|
-
for (u = n; u < r; u++) {
|
|
954
|
-
const x = e.sCount[u] < e.blkIndent;
|
|
955
|
-
if (o = e.bMarks[u] + e.tShift[u], t = e.eMarks[u], o >= t)
|
|
956
|
-
break;
|
|
957
|
-
if (e.src.charCodeAt(o++) === 62 && !x) {
|
|
958
|
-
let g = e.sCount[u] + 1, b, E;
|
|
959
|
-
e.src.charCodeAt(o) === 32 ? (o++, g++, E = !1, b = !0) : e.src.charCodeAt(o) === 9 ? (b = !0, (e.bsCount[u] + g) % 4 === 3 ? (o++, g++, E = !1) : E = !0) : b = !1;
|
|
960
|
-
let M = g;
|
|
961
|
-
for (c.push(e.bMarks[u]), e.bMarks[u] = o; o < t; ) {
|
|
962
|
-
const P = e.src.charCodeAt(o);
|
|
963
|
-
if (A(P))
|
|
964
|
-
P === 9 ? M += 4 - (M + e.bsCount[u] + (E ? 1 : 0)) % 4 : M++;
|
|
965
|
-
else
|
|
966
|
-
break;
|
|
967
|
-
o++;
|
|
968
|
-
}
|
|
969
|
-
a = o >= t, s.push(e.bsCount[u]), e.bsCount[u] = e.sCount[u] + 1 + (b ? 1 : 0), f.push(e.sCount[u]), e.sCount[u] = M - g, h.push(e.tShift[u]), e.tShift[u] = o - e.bMarks[u];
|
|
970
|
-
continue;
|
|
971
|
-
}
|
|
972
|
-
if (a)
|
|
973
|
-
break;
|
|
974
|
-
let m = !1;
|
|
975
|
-
for (let g = 0, b = p.length; g < b; g++)
|
|
976
|
-
if (p[g](e, u, r, !0)) {
|
|
977
|
-
m = !0;
|
|
978
|
-
break;
|
|
979
|
-
}
|
|
980
|
-
if (m) {
|
|
981
|
-
e.lineMax = u, e.blkIndent !== 0 && (c.push(e.bMarks[u]), s.push(e.bsCount[u]), h.push(e.tShift[u]), f.push(e.sCount[u]), e.sCount[u] -= e.blkIndent);
|
|
982
|
-
break;
|
|
983
|
-
}
|
|
984
|
-
c.push(e.bMarks[u]), s.push(e.bsCount[u]), h.push(e.tShift[u]), f.push(e.sCount[u]), e.sCount[u] = -1;
|
|
985
|
-
}
|
|
986
|
-
const C = e.blkIndent;
|
|
987
|
-
e.blkIndent = 0;
|
|
988
|
-
const _ = e.push("blockquote_open", "blockquote", 1);
|
|
989
|
-
_.markup = ">";
|
|
990
|
-
const y = [n, 0];
|
|
991
|
-
_.map = y, e.md.block.tokenize(e, n, u);
|
|
992
|
-
const d = e.push("blockquote_close", "blockquote", -1);
|
|
993
|
-
d.markup = ">", e.lineMax = l, e.parentType = k, y[1] = e.line;
|
|
994
|
-
for (let x = 0; x < h.length; x++)
|
|
995
|
-
e.bMarks[x + n] = c[x], e.tShift[x + n] = h[x], e.sCount[x + n] = f[x], e.bsCount[x + n] = s[x];
|
|
996
|
-
return e.blkIndent = C, !0;
|
|
997
|
-
}
|
|
998
|
-
function wn(e, n, r, i) {
|
|
999
|
-
const o = e.eMarks[n];
|
|
1000
|
-
if (e.sCount[n] - e.blkIndent >= 4)
|
|
1001
|
-
return !1;
|
|
1002
|
-
let t = e.bMarks[n] + e.tShift[n];
|
|
1003
|
-
const l = e.src.charCodeAt(t++);
|
|
1004
|
-
if (l !== 42 && l !== 45 && l !== 95)
|
|
1005
|
-
return !1;
|
|
1006
|
-
let c = 1;
|
|
1007
|
-
for (; t < o; ) {
|
|
1008
|
-
const f = e.src.charCodeAt(t++);
|
|
1009
|
-
if (f !== l && !A(f))
|
|
1010
|
-
return !1;
|
|
1011
|
-
f === l && c++;
|
|
1012
|
-
}
|
|
1013
|
-
if (c < 3)
|
|
1014
|
-
return !1;
|
|
1015
|
-
if (i)
|
|
1016
|
-
return !0;
|
|
1017
|
-
e.line = n + 1;
|
|
1018
|
-
const s = e.push("hr", "hr", 0);
|
|
1019
|
-
return s.map = [n, e.line], s.markup = Array(c + 1).join(String.fromCharCode(l)), !0;
|
|
1020
|
-
}
|
|
1021
|
-
function fe(e, n) {
|
|
1022
|
-
const r = e.eMarks[n];
|
|
1023
|
-
let i = e.bMarks[n] + e.tShift[n];
|
|
1024
|
-
const o = e.src.charCodeAt(i++);
|
|
1025
|
-
if (o !== 42 && o !== 45 && o !== 43)
|
|
1026
|
-
return -1;
|
|
1027
|
-
if (i < r) {
|
|
1028
|
-
const t = e.src.charCodeAt(i);
|
|
1029
|
-
if (!A(t))
|
|
1030
|
-
return -1;
|
|
1031
|
-
}
|
|
1032
|
-
return i;
|
|
1033
|
-
}
|
|
1034
|
-
function ue(e, n) {
|
|
1035
|
-
const r = e.bMarks[n] + e.tShift[n], i = e.eMarks[n];
|
|
1036
|
-
let o = r;
|
|
1037
|
-
if (o + 1 >= i)
|
|
1038
|
-
return -1;
|
|
1039
|
-
let t = e.src.charCodeAt(o++);
|
|
1040
|
-
if (t < 48 || t > 57)
|
|
1041
|
-
return -1;
|
|
1042
|
-
for (; ; ) {
|
|
1043
|
-
if (o >= i)
|
|
1044
|
-
return -1;
|
|
1045
|
-
if (t = e.src.charCodeAt(o++), t >= 48 && t <= 57) {
|
|
1046
|
-
if (o - r >= 10)
|
|
1047
|
-
return -1;
|
|
1048
|
-
continue;
|
|
1049
|
-
}
|
|
1050
|
-
if (t === 41 || t === 46)
|
|
1051
|
-
break;
|
|
1052
|
-
return -1;
|
|
1053
|
-
}
|
|
1054
|
-
return o < i && (t = e.src.charCodeAt(o), !A(t)) ? -1 : o;
|
|
1055
|
-
}
|
|
1056
|
-
function Tn(e, n) {
|
|
1057
|
-
const r = e.level + 2;
|
|
1058
|
-
for (let i = n + 2, o = e.tokens.length - 2; i < o; i++)
|
|
1059
|
-
e.tokens[i].level === r && e.tokens[i].type === "paragraph_open" && (e.tokens[i + 2].hidden = !0, e.tokens[i].hidden = !0, i += 2);
|
|
1060
|
-
}
|
|
1061
|
-
function In(e, n, r, i) {
|
|
1062
|
-
let o, t, l, c, s = n, f = !0;
|
|
1063
|
-
if (e.sCount[s] - e.blkIndent >= 4 || e.listIndent >= 0 && e.sCount[s] - e.listIndent >= 4 && e.sCount[s] < e.blkIndent)
|
|
1064
|
-
return !1;
|
|
1065
|
-
let h = !1;
|
|
1066
|
-
i && e.parentType === "paragraph" && e.sCount[s] >= e.blkIndent && (h = !0);
|
|
1067
|
-
let p, k, a;
|
|
1068
|
-
if ((a = ue(e, s)) >= 0) {
|
|
1069
|
-
if (p = !0, l = e.bMarks[s] + e.tShift[s], k = Number(e.src.slice(l, a - 1)), h && k !== 1) return !1;
|
|
1070
|
-
} else if ((a = fe(e, s)) >= 0)
|
|
1071
|
-
p = !1;
|
|
1072
|
-
else
|
|
1073
|
-
return !1;
|
|
1074
|
-
if (h && e.skipSpaces(a) >= e.eMarks[s])
|
|
1075
|
-
return !1;
|
|
1076
|
-
if (i)
|
|
1077
|
-
return !0;
|
|
1078
|
-
const u = e.src.charCodeAt(a - 1), C = e.tokens.length;
|
|
1079
|
-
p ? (c = e.push("ordered_list_open", "ol", 1), k !== 1 && (c.attrs = [["start", k]])) : c = e.push("bullet_list_open", "ul", 1);
|
|
1080
|
-
const _ = [s, 0];
|
|
1081
|
-
c.map = _, c.markup = String.fromCharCode(u);
|
|
1082
|
-
let y = !1;
|
|
1083
|
-
const d = e.md.block.ruler.getRules("list"), x = e.parentType;
|
|
1084
|
-
for (e.parentType = "list"; s < r; ) {
|
|
1085
|
-
t = a, o = e.eMarks[s];
|
|
1086
|
-
const m = e.sCount[s] + a - (e.bMarks[s] + e.tShift[s]);
|
|
1087
|
-
let g = m;
|
|
1088
|
-
for (; t < o; ) {
|
|
1089
|
-
const z = e.src.charCodeAt(t);
|
|
1090
|
-
if (z === 9)
|
|
1091
|
-
g += 4 - (g + e.bsCount[s]) % 4;
|
|
1092
|
-
else if (z === 32)
|
|
1093
|
-
g++;
|
|
1094
|
-
else
|
|
1095
|
-
break;
|
|
1096
|
-
t++;
|
|
1097
|
-
}
|
|
1098
|
-
const b = t;
|
|
1099
|
-
let E;
|
|
1100
|
-
b >= o ? E = 1 : E = g - m, E > 4 && (E = 1);
|
|
1101
|
-
const M = m + E;
|
|
1102
|
-
c = e.push("list_item_open", "li", 1), c.markup = String.fromCharCode(u);
|
|
1103
|
-
const P = [s, 0];
|
|
1104
|
-
c.map = P, p && (c.info = e.src.slice(l, a - 1));
|
|
1105
|
-
const L = e.tight, J = e.tShift[s], we = e.sCount[s], Te = e.listIndent;
|
|
1106
|
-
if (e.listIndent = e.blkIndent, e.blkIndent = M, e.tight = !0, e.tShift[s] = b - e.bMarks[s], e.sCount[s] = g, b >= o && e.isEmpty(s + 1) ? e.line = Math.min(e.line + 2, r) : e.md.block.tokenize(e, s, r, !0), (!e.tight || y) && (f = !1), y = e.line - s > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = Te, e.tShift[s] = J, e.sCount[s] = we, e.tight = L, c = e.push("list_item_close", "li", -1), c.markup = String.fromCharCode(u), s = e.line, P[1] = s, s >= r || e.sCount[s] < e.blkIndent || e.sCount[s] - e.blkIndent >= 4)
|
|
1107
|
-
break;
|
|
1108
|
-
let te = !1;
|
|
1109
|
-
for (let z = 0, Ie = d.length; z < Ie; z++)
|
|
1110
|
-
if (d[z](e, s, r, !0)) {
|
|
1111
|
-
te = !0;
|
|
1112
|
-
break;
|
|
1113
|
-
}
|
|
1114
|
-
if (te)
|
|
1115
|
-
break;
|
|
1116
|
-
if (p) {
|
|
1117
|
-
if (a = ue(e, s), a < 0)
|
|
1118
|
-
break;
|
|
1119
|
-
l = e.bMarks[s] + e.tShift[s];
|
|
1120
|
-
} else if (a = fe(e, s), a < 0)
|
|
1121
|
-
break;
|
|
1122
|
-
if (u !== e.src.charCodeAt(a - 1))
|
|
1123
|
-
break;
|
|
1124
|
-
}
|
|
1125
|
-
return p ? c = e.push("ordered_list_close", "ol", -1) : c = e.push("bullet_list_close", "ul", -1), c.markup = String.fromCharCode(u), _[1] = s, e.line = s, e.parentType = x, f && Tn(e, C), !0;
|
|
1126
|
-
}
|
|
1127
|
-
function vn(e, n, r, i) {
|
|
1128
|
-
let o = e.bMarks[n] + e.tShift[n], t = e.eMarks[n], l = n + 1;
|
|
1129
|
-
if (e.sCount[n] - e.blkIndent >= 4 || e.src.charCodeAt(o) !== 91)
|
|
1130
|
-
return !1;
|
|
1131
|
-
function c(d) {
|
|
1132
|
-
const x = e.lineMax;
|
|
1133
|
-
if (d >= x || e.isEmpty(d))
|
|
1134
|
-
return null;
|
|
1135
|
-
let m = !1;
|
|
1136
|
-
if (e.sCount[d] - e.blkIndent > 3 && (m = !0), e.sCount[d] < 0 && (m = !0), !m) {
|
|
1137
|
-
const E = e.md.block.ruler.getRules("reference"), M = e.parentType;
|
|
1138
|
-
e.parentType = "reference";
|
|
1139
|
-
let P = !1;
|
|
1140
|
-
for (let L = 0, J = E.length; L < J; L++)
|
|
1141
|
-
if (E[L](e, d, x, !0)) {
|
|
1142
|
-
P = !0;
|
|
1143
|
-
break;
|
|
1144
|
-
}
|
|
1145
|
-
if (e.parentType = M, P)
|
|
1146
|
-
return null;
|
|
1147
|
-
}
|
|
1148
|
-
const g = e.bMarks[d] + e.tShift[d], b = e.eMarks[d];
|
|
1149
|
-
return e.src.slice(g, b + 1);
|
|
1150
|
-
}
|
|
1151
|
-
let s = e.src.slice(o, t + 1);
|
|
1152
|
-
t = s.length;
|
|
1153
|
-
let f = -1;
|
|
1154
|
-
for (o = 1; o < t; o++) {
|
|
1155
|
-
const d = s.charCodeAt(o);
|
|
1156
|
-
if (d === 91)
|
|
1157
|
-
return !1;
|
|
1158
|
-
if (d === 93) {
|
|
1159
|
-
f = o;
|
|
1160
|
-
break;
|
|
1161
|
-
} else if (d === 10) {
|
|
1162
|
-
const x = c(l);
|
|
1163
|
-
x !== null && (s += x, t = s.length, l++);
|
|
1164
|
-
} else if (d === 92 && (o++, o < t && s.charCodeAt(o) === 10)) {
|
|
1165
|
-
const x = c(l);
|
|
1166
|
-
x !== null && (s += x, t = s.length, l++);
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
if (f < 0 || s.charCodeAt(f + 1) !== 58)
|
|
1170
|
-
return !1;
|
|
1171
|
-
for (o = f + 2; o < t; o++) {
|
|
1172
|
-
const d = s.charCodeAt(o);
|
|
1173
|
-
if (d === 10) {
|
|
1174
|
-
const x = c(l);
|
|
1175
|
-
x !== null && (s += x, t = s.length, l++);
|
|
1176
|
-
} else if (!A(d)) break;
|
|
1177
|
-
}
|
|
1178
|
-
const h = e.md.helpers.parseLinkDestination(s, o, t);
|
|
1179
|
-
if (!h.ok)
|
|
1180
|
-
return !1;
|
|
1181
|
-
const p = e.md.normalizeLink(h.str);
|
|
1182
|
-
if (!e.md.validateLink(p))
|
|
1183
|
-
return !1;
|
|
1184
|
-
o = h.pos;
|
|
1185
|
-
const k = o, a = l, u = o;
|
|
1186
|
-
for (; o < t; o++) {
|
|
1187
|
-
const d = s.charCodeAt(o);
|
|
1188
|
-
if (d === 10) {
|
|
1189
|
-
const x = c(l);
|
|
1190
|
-
x !== null && (s += x, t = s.length, l++);
|
|
1191
|
-
} else if (!A(d)) break;
|
|
1192
|
-
}
|
|
1193
|
-
let C = e.md.helpers.parseLinkTitle(s, o, t);
|
|
1194
|
-
for (; C.can_continue; ) {
|
|
1195
|
-
const d = c(l);
|
|
1196
|
-
if (d === null) break;
|
|
1197
|
-
s += d, o = t, t = s.length, l++, C = e.md.helpers.parseLinkTitle(s, o, t, C);
|
|
1198
|
-
}
|
|
1199
|
-
let _;
|
|
1200
|
-
for (o < t && u !== o && C.ok ? (_ = C.str, o = C.pos) : (_ = "", o = k, l = a); o < t; ) {
|
|
1201
|
-
const d = s.charCodeAt(o);
|
|
1202
|
-
if (!A(d))
|
|
1203
|
-
break;
|
|
1204
|
-
o++;
|
|
1205
|
-
}
|
|
1206
|
-
if (o < t && s.charCodeAt(o) !== 10 && _)
|
|
1207
|
-
for (_ = "", o = k, l = a; o < t; ) {
|
|
1208
|
-
const d = s.charCodeAt(o);
|
|
1209
|
-
if (!A(d))
|
|
1210
|
-
break;
|
|
1211
|
-
o++;
|
|
1212
|
-
}
|
|
1213
|
-
if (o < t && s.charCodeAt(o) !== 10)
|
|
1214
|
-
return !1;
|
|
1215
|
-
const y = W(s.slice(1, f));
|
|
1216
|
-
return y ? (i || (typeof e.env.references > "u" && (e.env.references = {}), typeof e.env.references[y] > "u" && (e.env.references[y] = { title: _, href: p }), e.line = l), !0) : !1;
|
|
1217
|
-
}
|
|
1218
|
-
const Pn = [
|
|
1219
|
-
"address",
|
|
1220
|
-
"article",
|
|
1221
|
-
"aside",
|
|
1222
|
-
"base",
|
|
1223
|
-
"basefont",
|
|
1224
|
-
"blockquote",
|
|
1225
|
-
"body",
|
|
1226
|
-
"caption",
|
|
1227
|
-
"center",
|
|
1228
|
-
"col",
|
|
1229
|
-
"colgroup",
|
|
1230
|
-
"dd",
|
|
1231
|
-
"details",
|
|
1232
|
-
"dialog",
|
|
1233
|
-
"dir",
|
|
1234
|
-
"div",
|
|
1235
|
-
"dl",
|
|
1236
|
-
"dt",
|
|
1237
|
-
"fieldset",
|
|
1238
|
-
"figcaption",
|
|
1239
|
-
"figure",
|
|
1240
|
-
"footer",
|
|
1241
|
-
"form",
|
|
1242
|
-
"frame",
|
|
1243
|
-
"frameset",
|
|
1244
|
-
"h1",
|
|
1245
|
-
"h2",
|
|
1246
|
-
"h3",
|
|
1247
|
-
"h4",
|
|
1248
|
-
"h5",
|
|
1249
|
-
"h6",
|
|
1250
|
-
"head",
|
|
1251
|
-
"header",
|
|
1252
|
-
"hr",
|
|
1253
|
-
"html",
|
|
1254
|
-
"iframe",
|
|
1255
|
-
"legend",
|
|
1256
|
-
"li",
|
|
1257
|
-
"link",
|
|
1258
|
-
"main",
|
|
1259
|
-
"menu",
|
|
1260
|
-
"menuitem",
|
|
1261
|
-
"nav",
|
|
1262
|
-
"noframes",
|
|
1263
|
-
"ol",
|
|
1264
|
-
"optgroup",
|
|
1265
|
-
"option",
|
|
1266
|
-
"p",
|
|
1267
|
-
"param",
|
|
1268
|
-
"search",
|
|
1269
|
-
"section",
|
|
1270
|
-
"summary",
|
|
1271
|
-
"table",
|
|
1272
|
-
"tbody",
|
|
1273
|
-
"td",
|
|
1274
|
-
"tfoot",
|
|
1275
|
-
"th",
|
|
1276
|
-
"thead",
|
|
1277
|
-
"title",
|
|
1278
|
-
"tr",
|
|
1279
|
-
"track",
|
|
1280
|
-
"ul"
|
|
1281
|
-
], Rn = "[a-zA-Z_:][a-zA-Z0-9:._-]*", zn = "[^\"'=<>`\\x00-\\x20]+", On = "'[^']*'", Dn = '"[^"]*"', Fn = "(?:" + zn + "|" + On + "|" + Dn + ")", Ln = "(?:\\s+" + Rn + "(?:\\s*=\\s*" + Fn + ")?)", Ae = "<[A-Za-z][A-Za-z0-9\\-]*" + Ln + "*\\s*\\/?>", ye = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", $n = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", Bn = "<[?][\\s\\S]*?[?]>", jn = "<![A-Za-z][^>]*>", qn = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", Nn = new RegExp("^(?:" + Ae + "|" + ye + "|" + $n + "|" + Bn + "|" + jn + "|" + qn + ")"), Zn = new RegExp("^(?:" + Ae + "|" + ye + ")"), O = [
|
|
1282
|
-
[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0],
|
|
1283
|
-
[/^<!--/, /-->/, !0],
|
|
1284
|
-
[/^<\?/, /\?>/, !0],
|
|
1285
|
-
[/^<![A-Z]/, />/, !0],
|
|
1286
|
-
[/^<!\[CDATA\[/, /\]\]>/, !0],
|
|
1287
|
-
[new RegExp("^</?(" + Pn.join("|") + ")(?=(\\s|/?>|$))", "i"), /^$/, !0],
|
|
1288
|
-
[new RegExp(Zn.source + "\\s*$"), /^$/, !1]
|
|
1289
|
-
];
|
|
1290
|
-
function Un(e, n, r, i) {
|
|
1291
|
-
let o = e.bMarks[n] + e.tShift[n], t = e.eMarks[n];
|
|
1292
|
-
if (e.sCount[n] - e.blkIndent >= 4 || !e.md.options.html || e.src.charCodeAt(o) !== 60)
|
|
1293
|
-
return !1;
|
|
1294
|
-
let l = e.src.slice(o, t), c = 0;
|
|
1295
|
-
for (; c < O.length && !O[c][0].test(l); c++)
|
|
1296
|
-
;
|
|
1297
|
-
if (c === O.length)
|
|
1298
|
-
return !1;
|
|
1299
|
-
if (i)
|
|
1300
|
-
return O[c][2];
|
|
1301
|
-
let s = n + 1;
|
|
1302
|
-
if (!O[c][1].test(l)) {
|
|
1303
|
-
for (; s < r && !(e.sCount[s] < e.blkIndent); s++)
|
|
1304
|
-
if (o = e.bMarks[s] + e.tShift[s], t = e.eMarks[s], l = e.src.slice(o, t), O[c][1].test(l)) {
|
|
1305
|
-
l.length !== 0 && s++;
|
|
1306
|
-
break;
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
e.line = s;
|
|
1310
|
-
const f = e.push("html_block", "", 0);
|
|
1311
|
-
return f.map = [n, s], f.content = e.getLines(n, s, e.blkIndent, !0), !0;
|
|
1312
|
-
}
|
|
1313
|
-
function Hn(e, n, r, i) {
|
|
1314
|
-
let o = e.bMarks[n] + e.tShift[n], t = e.eMarks[n];
|
|
1315
|
-
if (e.sCount[n] - e.blkIndent >= 4)
|
|
1316
|
-
return !1;
|
|
1317
|
-
let l = e.src.charCodeAt(o);
|
|
1318
|
-
if (l !== 35 || o >= t)
|
|
1319
|
-
return !1;
|
|
1320
|
-
let c = 1;
|
|
1321
|
-
for (l = e.src.charCodeAt(++o); l === 35 && o < t && c <= 6; )
|
|
1322
|
-
c++, l = e.src.charCodeAt(++o);
|
|
1323
|
-
if (c > 6 || o < t && !A(l))
|
|
1324
|
-
return !1;
|
|
1325
|
-
if (i)
|
|
1326
|
-
return !0;
|
|
1327
|
-
t = e.skipSpacesBack(t, o);
|
|
1328
|
-
const s = e.skipCharsBack(t, 35, o);
|
|
1329
|
-
s > o && A(e.src.charCodeAt(s - 1)) && (t = s), e.line = n + 1;
|
|
1330
|
-
const f = e.push("heading_open", "h" + String(c), 1);
|
|
1331
|
-
f.markup = "########".slice(0, c), f.map = [n, e.line];
|
|
1332
|
-
const h = e.push("inline", "", 0);
|
|
1333
|
-
h.content = e.src.slice(o, t).trim(), h.map = [n, e.line], h.children = [];
|
|
1334
|
-
const p = e.push("heading_close", "h" + String(c), -1);
|
|
1335
|
-
return p.markup = "########".slice(0, c), !0;
|
|
1336
|
-
}
|
|
1337
|
-
function Gn(e, n, r) {
|
|
1338
|
-
const i = e.md.block.ruler.getRules("paragraph");
|
|
1339
|
-
if (e.sCount[n] - e.blkIndent >= 4)
|
|
1340
|
-
return !1;
|
|
1341
|
-
const o = e.parentType;
|
|
1342
|
-
e.parentType = "paragraph";
|
|
1343
|
-
let t = 0, l, c = n + 1;
|
|
1344
|
-
for (; c < r && !e.isEmpty(c); c++) {
|
|
1345
|
-
if (e.sCount[c] - e.blkIndent > 3)
|
|
1346
|
-
continue;
|
|
1347
|
-
if (e.sCount[c] >= e.blkIndent) {
|
|
1348
|
-
let a = e.bMarks[c] + e.tShift[c];
|
|
1349
|
-
const u = e.eMarks[c];
|
|
1350
|
-
if (a < u && (l = e.src.charCodeAt(a), (l === 45 || l === 61) && (a = e.skipChars(a, l), a = e.skipSpaces(a), a >= u))) {
|
|
1351
|
-
t = l === 61 ? 1 : 2;
|
|
1352
|
-
break;
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
if (e.sCount[c] < 0)
|
|
1356
|
-
continue;
|
|
1357
|
-
let k = !1;
|
|
1358
|
-
for (let a = 0, u = i.length; a < u; a++)
|
|
1359
|
-
if (i[a](e, c, r, !0)) {
|
|
1360
|
-
k = !0;
|
|
1361
|
-
break;
|
|
1362
|
-
}
|
|
1363
|
-
if (k)
|
|
1364
|
-
break;
|
|
1365
|
-
}
|
|
1366
|
-
if (!t)
|
|
1367
|
-
return !1;
|
|
1368
|
-
const s = e.getLines(n, c, e.blkIndent, !1).trim();
|
|
1369
|
-
e.line = c + 1;
|
|
1370
|
-
const f = e.push("heading_open", "h" + String(t), 1);
|
|
1371
|
-
f.markup = String.fromCharCode(l), f.map = [n, e.line];
|
|
1372
|
-
const h = e.push("inline", "", 0);
|
|
1373
|
-
h.content = s, h.map = [n, e.line - 1], h.children = [];
|
|
1374
|
-
const p = e.push("heading_close", "h" + String(t), -1);
|
|
1375
|
-
return p.markup = String.fromCharCode(l), e.parentType = o, !0;
|
|
1376
|
-
}
|
|
1377
|
-
function Wn(e, n, r) {
|
|
1378
|
-
const i = e.md.block.ruler.getRules("paragraph"), o = e.parentType;
|
|
1379
|
-
let t = n + 1;
|
|
1380
|
-
for (e.parentType = "paragraph"; t < r && !e.isEmpty(t); t++) {
|
|
1381
|
-
if (e.sCount[t] - e.blkIndent > 3 || e.sCount[t] < 0)
|
|
1382
|
-
continue;
|
|
1383
|
-
let f = !1;
|
|
1384
|
-
for (let h = 0, p = i.length; h < p; h++)
|
|
1385
|
-
if (i[h](e, t, r, !0)) {
|
|
1386
|
-
f = !0;
|
|
1387
|
-
break;
|
|
1388
|
-
}
|
|
1389
|
-
if (f)
|
|
1390
|
-
break;
|
|
1391
|
-
}
|
|
1392
|
-
const l = e.getLines(n, t, e.blkIndent, !1).trim();
|
|
1393
|
-
e.line = t;
|
|
1394
|
-
const c = e.push("paragraph_open", "p", 1);
|
|
1395
|
-
c.map = [n, e.line];
|
|
1396
|
-
const s = e.push("inline", "", 0);
|
|
1397
|
-
return s.content = l, s.map = [n, e.line], s.children = [], e.push("paragraph_close", "p", -1), e.parentType = o, !0;
|
|
1398
|
-
}
|
|
1399
|
-
const U = [
|
|
1400
|
-
// First 2 params - rule name & source. Secondary array - list of rules,
|
|
1401
|
-
// which can be terminated by this one.
|
|
1402
|
-
["table", yn, ["paragraph", "reference"]],
|
|
1403
|
-
["code", En],
|
|
1404
|
-
["fence", Sn, ["paragraph", "reference", "blockquote", "list"]],
|
|
1405
|
-
["blockquote", Mn, ["paragraph", "reference", "blockquote", "list"]],
|
|
1406
|
-
["hr", wn, ["paragraph", "reference", "blockquote", "list"]],
|
|
1407
|
-
["list", In, ["paragraph", "reference", "blockquote"]],
|
|
1408
|
-
["reference", vn],
|
|
1409
|
-
["html_block", Un, ["paragraph", "reference", "blockquote"]],
|
|
1410
|
-
["heading", Hn, ["paragraph", "reference", "blockquote"]],
|
|
1411
|
-
["lheading", Gn],
|
|
1412
|
-
["paragraph", Wn]
|
|
1413
|
-
];
|
|
1414
|
-
function Q() {
|
|
1415
|
-
this.ruler = new S();
|
|
1416
|
-
for (let e = 0; e < U.length; e++)
|
|
1417
|
-
this.ruler.push(U[e][0], U[e][1], { alt: (U[e][2] || []).slice() });
|
|
1418
|
-
}
|
|
1419
|
-
Q.prototype.tokenize = function(e, n, r) {
|
|
1420
|
-
const i = this.ruler.getRules(""), o = i.length, t = e.md.options.maxNesting;
|
|
1421
|
-
let l = n, c = !1;
|
|
1422
|
-
for (; l < r && (e.line = l = e.skipEmptyLines(l), !(l >= r || e.sCount[l] < e.blkIndent)); ) {
|
|
1423
|
-
if (e.level >= t) {
|
|
1424
|
-
e.line = r;
|
|
1425
|
-
break;
|
|
1426
|
-
}
|
|
1427
|
-
const s = e.line;
|
|
1428
|
-
let f = !1;
|
|
1429
|
-
for (let h = 0; h < o; h++)
|
|
1430
|
-
if (f = i[h](e, l, r, !1), f) {
|
|
1431
|
-
if (s >= e.line)
|
|
1432
|
-
throw new Error("block rule didn't increment state.line");
|
|
1433
|
-
break;
|
|
1434
|
-
}
|
|
1435
|
-
if (!f) throw new Error("none of the block rules matched");
|
|
1436
|
-
e.tight = !c, e.isEmpty(e.line - 1) && (c = !0), l = e.line, l < r && e.isEmpty(l) && (c = !0, l++, e.line = l);
|
|
1437
|
-
}
|
|
1438
|
-
};
|
|
1439
|
-
Q.prototype.parse = function(e, n, r, i) {
|
|
1440
|
-
if (!e)
|
|
1441
|
-
return;
|
|
1442
|
-
const o = new this.State(e, n, r, i);
|
|
1443
|
-
this.tokenize(o, o.line, o.lineMax);
|
|
1444
|
-
};
|
|
1445
|
-
Q.prototype.State = v;
|
|
1446
|
-
function q(e, n, r, i) {
|
|
1447
|
-
this.src = e, this.env = r, this.md = n, this.tokens = i, this.tokens_meta = Array(i.length), this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = [], this._prev_delimiters = [], this.backticks = {}, this.backticksScanned = !1, this.linkLevel = 0;
|
|
1448
|
-
}
|
|
1449
|
-
q.prototype.pushPending = function() {
|
|
1450
|
-
const e = new T("text", "", 0);
|
|
1451
|
-
return e.content = this.pending, e.level = this.pendingLevel, this.tokens.push(e), this.pending = "", e;
|
|
1452
|
-
};
|
|
1453
|
-
q.prototype.push = function(e, n, r) {
|
|
1454
|
-
this.pending && this.pushPending();
|
|
1455
|
-
const i = new T(e, n, r);
|
|
1456
|
-
let o = null;
|
|
1457
|
-
return r < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), i.level = this.level, r > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], o = { delimiters: this.delimiters }), this.pendingLevel = this.level, this.tokens.push(i), this.tokens_meta.push(o), i;
|
|
1458
|
-
};
|
|
1459
|
-
q.prototype.scanDelims = function(e, n) {
|
|
1460
|
-
const r = this.posMax, i = this.src.charCodeAt(e), o = e > 0 ? this.src.charCodeAt(e - 1) : 32;
|
|
1461
|
-
let t = e;
|
|
1462
|
-
for (; t < r && this.src.charCodeAt(t) === i; )
|
|
1463
|
-
t++;
|
|
1464
|
-
const l = t - e, c = t < r ? this.src.charCodeAt(t) : 32, s = j(o) || B(String.fromCharCode(o)), f = j(c) || B(String.fromCharCode(c)), h = $(o), p = $(c), k = !p && (!f || h || s), a = !h && (!s || p || f);
|
|
1465
|
-
return { can_open: k && (n || !a || s), can_close: a && (n || !k || f), length: l };
|
|
1466
|
-
};
|
|
1467
|
-
q.prototype.Token = T;
|
|
1468
|
-
function Qn(e) {
|
|
1469
|
-
switch (e) {
|
|
1470
|
-
case 10:
|
|
1471
|
-
case 33:
|
|
1472
|
-
case 35:
|
|
1473
|
-
case 36:
|
|
1474
|
-
case 37:
|
|
1475
|
-
case 38:
|
|
1476
|
-
case 42:
|
|
1477
|
-
case 43:
|
|
1478
|
-
case 45:
|
|
1479
|
-
case 58:
|
|
1480
|
-
case 60:
|
|
1481
|
-
case 61:
|
|
1482
|
-
case 62:
|
|
1483
|
-
case 64:
|
|
1484
|
-
case 91:
|
|
1485
|
-
case 92:
|
|
1486
|
-
case 93:
|
|
1487
|
-
case 94:
|
|
1488
|
-
case 95:
|
|
1489
|
-
case 96:
|
|
1490
|
-
case 123:
|
|
1491
|
-
case 125:
|
|
1492
|
-
case 126:
|
|
1493
|
-
return !0;
|
|
1494
|
-
default:
|
|
1495
|
-
return !1;
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
function Jn(e, n) {
|
|
1499
|
-
let r = e.pos;
|
|
1500
|
-
for (; r < e.posMax && !Qn(e.src.charCodeAt(r)); )
|
|
1501
|
-
r++;
|
|
1502
|
-
return r === e.pos ? !1 : (n || (e.pending += e.src.slice(e.pos, r)), e.pos = r, !0);
|
|
1503
|
-
}
|
|
1504
|
-
const Vn = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;
|
|
1505
|
-
function Xn(e, n) {
|
|
1506
|
-
if (!e.md.options.linkify || e.linkLevel > 0) return !1;
|
|
1507
|
-
const r = e.pos, i = e.posMax;
|
|
1508
|
-
if (r + 3 > i || e.src.charCodeAt(r) !== 58 || e.src.charCodeAt(r + 1) !== 47 || e.src.charCodeAt(r + 2) !== 47) return !1;
|
|
1509
|
-
const o = e.pending.match(Vn);
|
|
1510
|
-
if (!o) return !1;
|
|
1511
|
-
const t = o[1], l = e.md.linkify.matchAtStart(e.src.slice(r - t.length));
|
|
1512
|
-
if (!l) return !1;
|
|
1513
|
-
let c = l.url;
|
|
1514
|
-
if (c.length <= t.length) return !1;
|
|
1515
|
-
c = c.replace(/\*+$/, "");
|
|
1516
|
-
const s = e.md.normalizeLink(c);
|
|
1517
|
-
if (!e.md.validateLink(s)) return !1;
|
|
1518
|
-
if (!n) {
|
|
1519
|
-
e.pending = e.pending.slice(0, -t.length);
|
|
1520
|
-
const f = e.push("link_open", "a", 1);
|
|
1521
|
-
f.attrs = [["href", s]], f.markup = "linkify", f.info = "auto";
|
|
1522
|
-
const h = e.push("text", "", 0);
|
|
1523
|
-
h.content = e.md.normalizeLinkText(c);
|
|
1524
|
-
const p = e.push("link_close", "a", -1);
|
|
1525
|
-
p.markup = "linkify", p.info = "auto";
|
|
1526
|
-
}
|
|
1527
|
-
return e.pos += c.length - t.length, !0;
|
|
1528
|
-
}
|
|
1529
|
-
function Yn(e, n) {
|
|
1530
|
-
let r = e.pos;
|
|
1531
|
-
if (e.src.charCodeAt(r) !== 10)
|
|
1532
|
-
return !1;
|
|
1533
|
-
const i = e.pending.length - 1, o = e.posMax;
|
|
1534
|
-
if (!n)
|
|
1535
|
-
if (i >= 0 && e.pending.charCodeAt(i) === 32)
|
|
1536
|
-
if (i >= 1 && e.pending.charCodeAt(i - 1) === 32) {
|
|
1537
|
-
let t = i - 1;
|
|
1538
|
-
for (; t >= 1 && e.pending.charCodeAt(t - 1) === 32; ) t--;
|
|
1539
|
-
e.pending = e.pending.slice(0, t), e.push("hardbreak", "br", 0);
|
|
1540
|
-
} else
|
|
1541
|
-
e.pending = e.pending.slice(0, -1), e.push("softbreak", "br", 0);
|
|
1542
|
-
else
|
|
1543
|
-
e.push("softbreak", "br", 0);
|
|
1544
|
-
for (r++; r < o && A(e.src.charCodeAt(r)); )
|
|
1545
|
-
r++;
|
|
1546
|
-
return e.pos = r, !0;
|
|
1547
|
-
}
|
|
1548
|
-
const oe = [];
|
|
1549
|
-
for (let e = 0; e < 256; e++)
|
|
1550
|
-
oe.push(0);
|
|
1551
|
-
"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e) {
|
|
1552
|
-
oe[e.charCodeAt(0)] = 1;
|
|
1553
|
-
});
|
|
1554
|
-
function Kn(e, n) {
|
|
1555
|
-
let r = e.pos;
|
|
1556
|
-
const i = e.posMax;
|
|
1557
|
-
if (e.src.charCodeAt(r) !== 92 || (r++, r >= i)) return !1;
|
|
1558
|
-
let o = e.src.charCodeAt(r);
|
|
1559
|
-
if (o === 10) {
|
|
1560
|
-
for (n || e.push("hardbreak", "br", 0), r++; r < i && (o = e.src.charCodeAt(r), !!A(o)); )
|
|
1561
|
-
r++;
|
|
1562
|
-
return e.pos = r, !0;
|
|
1563
|
-
}
|
|
1564
|
-
let t = e.src[r];
|
|
1565
|
-
if (o >= 55296 && o <= 56319 && r + 1 < i) {
|
|
1566
|
-
const c = e.src.charCodeAt(r + 1);
|
|
1567
|
-
c >= 56320 && c <= 57343 && (t += e.src[r + 1], r++);
|
|
1568
|
-
}
|
|
1569
|
-
const l = "\\" + t;
|
|
1570
|
-
if (!n) {
|
|
1571
|
-
const c = e.push("text_special", "", 0);
|
|
1572
|
-
o < 256 && oe[o] !== 0 ? c.content = t : c.content = l, c.markup = l, c.info = "escape";
|
|
1573
|
-
}
|
|
1574
|
-
return e.pos = r + 1, !0;
|
|
1575
|
-
}
|
|
1576
|
-
function er(e, n) {
|
|
1577
|
-
let r = e.pos;
|
|
1578
|
-
if (e.src.charCodeAt(r) !== 96)
|
|
1579
|
-
return !1;
|
|
1580
|
-
const o = r;
|
|
1581
|
-
r++;
|
|
1582
|
-
const t = e.posMax;
|
|
1583
|
-
for (; r < t && e.src.charCodeAt(r) === 96; )
|
|
1584
|
-
r++;
|
|
1585
|
-
const l = e.src.slice(o, r), c = l.length;
|
|
1586
|
-
if (e.backticksScanned && (e.backticks[c] || 0) <= o)
|
|
1587
|
-
return n || (e.pending += l), e.pos += c, !0;
|
|
1588
|
-
let s = r, f;
|
|
1589
|
-
for (; (f = e.src.indexOf("`", s)) !== -1; ) {
|
|
1590
|
-
for (s = f + 1; s < t && e.src.charCodeAt(s) === 96; )
|
|
1591
|
-
s++;
|
|
1592
|
-
const h = s - f;
|
|
1593
|
-
if (h === c) {
|
|
1594
|
-
if (!n) {
|
|
1595
|
-
const p = e.push("code_inline", "code", 0);
|
|
1596
|
-
p.markup = l, p.content = e.src.slice(r, f).replace(/\n/g, " ").replace(/^ (.+) $/, "$1");
|
|
1597
|
-
}
|
|
1598
|
-
return e.pos = s, !0;
|
|
1599
|
-
}
|
|
1600
|
-
e.backticks[h] = f;
|
|
1601
|
-
}
|
|
1602
|
-
return e.backticksScanned = !0, n || (e.pending += l), e.pos += c, !0;
|
|
1603
|
-
}
|
|
1604
|
-
function nr(e, n) {
|
|
1605
|
-
const r = e.pos, i = e.src.charCodeAt(r);
|
|
1606
|
-
if (n || i !== 126)
|
|
1607
|
-
return !1;
|
|
1608
|
-
const o = e.scanDelims(e.pos, !0);
|
|
1609
|
-
let t = o.length;
|
|
1610
|
-
const l = String.fromCharCode(i);
|
|
1611
|
-
if (t < 2)
|
|
1612
|
-
return !1;
|
|
1613
|
-
let c;
|
|
1614
|
-
t % 2 && (c = e.push("text", "", 0), c.content = l, t--);
|
|
1615
|
-
for (let s = 0; s < t; s += 2)
|
|
1616
|
-
c = e.push("text", "", 0), c.content = l + l, e.delimiters.push({
|
|
1617
|
-
marker: i,
|
|
1618
|
-
length: 0,
|
|
1619
|
-
// disable "rule of 3" length checks meant for emphasis
|
|
1620
|
-
token: e.tokens.length - 1,
|
|
1621
|
-
end: -1,
|
|
1622
|
-
open: o.can_open,
|
|
1623
|
-
close: o.can_close
|
|
1624
|
-
});
|
|
1625
|
-
return e.pos += o.length, !0;
|
|
1626
|
-
}
|
|
1627
|
-
function he(e, n) {
|
|
1628
|
-
let r;
|
|
1629
|
-
const i = [], o = n.length;
|
|
1630
|
-
for (let t = 0; t < o; t++) {
|
|
1631
|
-
const l = n[t];
|
|
1632
|
-
if (l.marker !== 126 || l.end === -1)
|
|
1633
|
-
continue;
|
|
1634
|
-
const c = n[l.end];
|
|
1635
|
-
r = e.tokens[l.token], r.type = "s_open", r.tag = "s", r.nesting = 1, r.markup = "~~", r.content = "", r = e.tokens[c.token], r.type = "s_close", r.tag = "s", r.nesting = -1, r.markup = "~~", r.content = "", e.tokens[c.token - 1].type === "text" && e.tokens[c.token - 1].content === "~" && i.push(c.token - 1);
|
|
1636
|
-
}
|
|
1637
|
-
for (; i.length; ) {
|
|
1638
|
-
const t = i.pop();
|
|
1639
|
-
let l = t + 1;
|
|
1640
|
-
for (; l < e.tokens.length && e.tokens[l].type === "s_close"; )
|
|
1641
|
-
l++;
|
|
1642
|
-
l--, t !== l && (r = e.tokens[l], e.tokens[l] = e.tokens[t], e.tokens[t] = r);
|
|
1643
|
-
}
|
|
1644
|
-
}
|
|
1645
|
-
function rr(e) {
|
|
1646
|
-
const n = e.tokens_meta, r = e.tokens_meta.length;
|
|
1647
|
-
he(e, e.delimiters);
|
|
1648
|
-
for (let i = 0; i < r; i++)
|
|
1649
|
-
n[i] && n[i].delimiters && he(e, n[i].delimiters);
|
|
1650
|
-
}
|
|
1651
|
-
const Ee = {
|
|
1652
|
-
tokenize: nr,
|
|
1653
|
-
postProcess: rr
|
|
1654
|
-
};
|
|
1655
|
-
function or(e, n) {
|
|
1656
|
-
const r = e.pos, i = e.src.charCodeAt(r);
|
|
1657
|
-
if (n || i !== 95 && i !== 42)
|
|
1658
|
-
return !1;
|
|
1659
|
-
const o = e.scanDelims(e.pos, i === 42);
|
|
1660
|
-
for (let t = 0; t < o.length; t++) {
|
|
1661
|
-
const l = e.push("text", "", 0);
|
|
1662
|
-
l.content = String.fromCharCode(i), e.delimiters.push({
|
|
1663
|
-
// Char code of the starting marker (number).
|
|
1664
|
-
//
|
|
1665
|
-
marker: i,
|
|
1666
|
-
// Total length of these series of delimiters.
|
|
1667
|
-
//
|
|
1668
|
-
length: o.length,
|
|
1669
|
-
// A position of the token this delimiter corresponds to.
|
|
1670
|
-
//
|
|
1671
|
-
token: e.tokens.length - 1,
|
|
1672
|
-
// If this delimiter is matched as a valid opener, `end` will be
|
|
1673
|
-
// equal to its position, otherwise it's `-1`.
|
|
1674
|
-
//
|
|
1675
|
-
end: -1,
|
|
1676
|
-
// Boolean flags that determine if this delimiter could open or close
|
|
1677
|
-
// an emphasis.
|
|
1678
|
-
//
|
|
1679
|
-
open: o.can_open,
|
|
1680
|
-
close: o.can_close
|
|
1681
|
-
});
|
|
1682
|
-
}
|
|
1683
|
-
return e.pos += o.length, !0;
|
|
1684
|
-
}
|
|
1685
|
-
function pe(e, n) {
|
|
1686
|
-
const r = n.length;
|
|
1687
|
-
for (let i = r - 1; i >= 0; i--) {
|
|
1688
|
-
const o = n[i];
|
|
1689
|
-
if (o.marker !== 95 && o.marker !== 42 || o.end === -1)
|
|
1690
|
-
continue;
|
|
1691
|
-
const t = n[o.end], l = i > 0 && n[i - 1].end === o.end + 1 && // check that first two markers match and adjacent
|
|
1692
|
-
n[i - 1].marker === o.marker && n[i - 1].token === o.token - 1 && // check that last two markers are adjacent (we can safely assume they match)
|
|
1693
|
-
n[o.end + 1].token === t.token + 1, c = String.fromCharCode(o.marker), s = e.tokens[o.token];
|
|
1694
|
-
s.type = l ? "strong_open" : "em_open", s.tag = l ? "strong" : "em", s.nesting = 1, s.markup = l ? c + c : c, s.content = "";
|
|
1695
|
-
const f = e.tokens[t.token];
|
|
1696
|
-
f.type = l ? "strong_close" : "em_close", f.tag = l ? "strong" : "em", f.nesting = -1, f.markup = l ? c + c : c, f.content = "", l && (e.tokens[n[i - 1].token].content = "", e.tokens[n[o.end + 1].token].content = "", i--);
|
|
1697
|
-
}
|
|
1698
|
-
}
|
|
1699
|
-
function tr(e) {
|
|
1700
|
-
const n = e.tokens_meta, r = e.tokens_meta.length;
|
|
1701
|
-
pe(e, e.delimiters);
|
|
1702
|
-
for (let i = 0; i < r; i++)
|
|
1703
|
-
n[i] && n[i].delimiters && pe(e, n[i].delimiters);
|
|
1704
|
-
}
|
|
1705
|
-
const Se = {
|
|
1706
|
-
tokenize: or,
|
|
1707
|
-
postProcess: tr
|
|
1708
|
-
};
|
|
1709
|
-
function ir(e, n) {
|
|
1710
|
-
let r, i, o, t, l = "", c = "", s = e.pos, f = !0;
|
|
1711
|
-
if (e.src.charCodeAt(e.pos) !== 91)
|
|
1712
|
-
return !1;
|
|
1713
|
-
const h = e.pos, p = e.posMax, k = e.pos + 1, a = e.md.helpers.parseLinkLabel(e, e.pos, !0);
|
|
1714
|
-
if (a < 0)
|
|
1715
|
-
return !1;
|
|
1716
|
-
let u = a + 1;
|
|
1717
|
-
if (u < p && e.src.charCodeAt(u) === 40) {
|
|
1718
|
-
for (f = !1, u++; u < p && (r = e.src.charCodeAt(u), !(!A(r) && r !== 10)); u++)
|
|
1719
|
-
;
|
|
1720
|
-
if (u >= p)
|
|
1721
|
-
return !1;
|
|
1722
|
-
if (s = u, o = e.md.helpers.parseLinkDestination(e.src, u, e.posMax), o.ok) {
|
|
1723
|
-
for (l = e.md.normalizeLink(o.str), e.md.validateLink(l) ? u = o.pos : l = "", s = u; u < p && (r = e.src.charCodeAt(u), !(!A(r) && r !== 10)); u++)
|
|
1724
|
-
;
|
|
1725
|
-
if (o = e.md.helpers.parseLinkTitle(e.src, u, e.posMax), u < p && s !== u && o.ok)
|
|
1726
|
-
for (c = o.str, u = o.pos; u < p && (r = e.src.charCodeAt(u), !(!A(r) && r !== 10)); u++)
|
|
1727
|
-
;
|
|
1728
|
-
}
|
|
1729
|
-
(u >= p || e.src.charCodeAt(u) !== 41) && (f = !0), u++;
|
|
1730
|
-
}
|
|
1731
|
-
if (f) {
|
|
1732
|
-
if (typeof e.env.references > "u")
|
|
1733
|
-
return !1;
|
|
1734
|
-
if (u < p && e.src.charCodeAt(u) === 91 ? (s = u + 1, u = e.md.helpers.parseLinkLabel(e, u), u >= 0 ? i = e.src.slice(s, u++) : u = a + 1) : u = a + 1, i || (i = e.src.slice(k, a)), t = e.env.references[W(i)], !t)
|
|
1735
|
-
return e.pos = h, !1;
|
|
1736
|
-
l = t.href, c = t.title;
|
|
1737
|
-
}
|
|
1738
|
-
if (!n) {
|
|
1739
|
-
e.pos = k, e.posMax = a;
|
|
1740
|
-
const C = e.push("link_open", "a", 1), _ = [["href", l]];
|
|
1741
|
-
C.attrs = _, c && _.push(["title", c]), e.linkLevel++, e.md.inline.tokenize(e), e.linkLevel--, e.push("link_close", "a", -1);
|
|
1742
|
-
}
|
|
1743
|
-
return e.pos = u, e.posMax = p, !0;
|
|
1744
|
-
}
|
|
1745
|
-
function lr(e, n) {
|
|
1746
|
-
let r, i, o, t, l, c, s, f, h = "";
|
|
1747
|
-
const p = e.pos, k = e.posMax;
|
|
1748
|
-
if (e.src.charCodeAt(e.pos) !== 33 || e.src.charCodeAt(e.pos + 1) !== 91)
|
|
1749
|
-
return !1;
|
|
1750
|
-
const a = e.pos + 2, u = e.md.helpers.parseLinkLabel(e, e.pos + 1, !1);
|
|
1751
|
-
if (u < 0)
|
|
1752
|
-
return !1;
|
|
1753
|
-
if (t = u + 1, t < k && e.src.charCodeAt(t) === 40) {
|
|
1754
|
-
for (t++; t < k && (r = e.src.charCodeAt(t), !(!A(r) && r !== 10)); t++)
|
|
1755
|
-
;
|
|
1756
|
-
if (t >= k)
|
|
1757
|
-
return !1;
|
|
1758
|
-
for (f = t, c = e.md.helpers.parseLinkDestination(e.src, t, e.posMax), c.ok && (h = e.md.normalizeLink(c.str), e.md.validateLink(h) ? t = c.pos : h = ""), f = t; t < k && (r = e.src.charCodeAt(t), !(!A(r) && r !== 10)); t++)
|
|
1759
|
-
;
|
|
1760
|
-
if (c = e.md.helpers.parseLinkTitle(e.src, t, e.posMax), t < k && f !== t && c.ok)
|
|
1761
|
-
for (s = c.str, t = c.pos; t < k && (r = e.src.charCodeAt(t), !(!A(r) && r !== 10)); t++)
|
|
1762
|
-
;
|
|
1763
|
-
else
|
|
1764
|
-
s = "";
|
|
1765
|
-
if (t >= k || e.src.charCodeAt(t) !== 41)
|
|
1766
|
-
return e.pos = p, !1;
|
|
1767
|
-
t++;
|
|
1768
|
-
} else {
|
|
1769
|
-
if (typeof e.env.references > "u")
|
|
1770
|
-
return !1;
|
|
1771
|
-
if (t < k && e.src.charCodeAt(t) === 91 ? (f = t + 1, t = e.md.helpers.parseLinkLabel(e, t), t >= 0 ? o = e.src.slice(f, t++) : t = u + 1) : t = u + 1, o || (o = e.src.slice(a, u)), l = e.env.references[W(o)], !l)
|
|
1772
|
-
return e.pos = p, !1;
|
|
1773
|
-
h = l.href, s = l.title;
|
|
1774
|
-
}
|
|
1775
|
-
if (!n) {
|
|
1776
|
-
i = e.src.slice(a, u);
|
|
1777
|
-
const C = [];
|
|
1778
|
-
e.md.inline.parse(
|
|
1779
|
-
i,
|
|
1780
|
-
e.md,
|
|
1781
|
-
e.env,
|
|
1782
|
-
C
|
|
1783
|
-
);
|
|
1784
|
-
const _ = e.push("image", "img", 0), y = [["src", h], ["alt", ""]];
|
|
1785
|
-
_.attrs = y, _.children = C, _.content = i, s && y.push(["title", s]);
|
|
1786
|
-
}
|
|
1787
|
-
return e.pos = t, e.posMax = k, !0;
|
|
1788
|
-
}
|
|
1789
|
-
const cr = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/, sr = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;
|
|
1790
|
-
function fr(e, n) {
|
|
1791
|
-
let r = e.pos;
|
|
1792
|
-
if (e.src.charCodeAt(r) !== 60)
|
|
1793
|
-
return !1;
|
|
1794
|
-
const i = e.pos, o = e.posMax;
|
|
1795
|
-
for (; ; ) {
|
|
1796
|
-
if (++r >= o) return !1;
|
|
1797
|
-
const l = e.src.charCodeAt(r);
|
|
1798
|
-
if (l === 60) return !1;
|
|
1799
|
-
if (l === 62) break;
|
|
1800
|
-
}
|
|
1801
|
-
const t = e.src.slice(i + 1, r);
|
|
1802
|
-
if (sr.test(t)) {
|
|
1803
|
-
const l = e.md.normalizeLink(t);
|
|
1804
|
-
if (!e.md.validateLink(l))
|
|
1805
|
-
return !1;
|
|
1806
|
-
if (!n) {
|
|
1807
|
-
const c = e.push("link_open", "a", 1);
|
|
1808
|
-
c.attrs = [["href", l]], c.markup = "autolink", c.info = "auto";
|
|
1809
|
-
const s = e.push("text", "", 0);
|
|
1810
|
-
s.content = e.md.normalizeLinkText(t);
|
|
1811
|
-
const f = e.push("link_close", "a", -1);
|
|
1812
|
-
f.markup = "autolink", f.info = "auto";
|
|
1813
|
-
}
|
|
1814
|
-
return e.pos += t.length + 2, !0;
|
|
1815
|
-
}
|
|
1816
|
-
if (cr.test(t)) {
|
|
1817
|
-
const l = e.md.normalizeLink("mailto:" + t);
|
|
1818
|
-
if (!e.md.validateLink(l))
|
|
1819
|
-
return !1;
|
|
1820
|
-
if (!n) {
|
|
1821
|
-
const c = e.push("link_open", "a", 1);
|
|
1822
|
-
c.attrs = [["href", l]], c.markup = "autolink", c.info = "auto";
|
|
1823
|
-
const s = e.push("text", "", 0);
|
|
1824
|
-
s.content = e.md.normalizeLinkText(t);
|
|
1825
|
-
const f = e.push("link_close", "a", -1);
|
|
1826
|
-
f.markup = "autolink", f.info = "auto";
|
|
1827
|
-
}
|
|
1828
|
-
return e.pos += t.length + 2, !0;
|
|
1829
|
-
}
|
|
1830
|
-
return !1;
|
|
1831
|
-
}
|
|
1832
|
-
function ur(e) {
|
|
1833
|
-
return /^<a[>\s]/i.test(e);
|
|
1834
|
-
}
|
|
1835
|
-
function hr(e) {
|
|
1836
|
-
return /^<\/a\s*>/i.test(e);
|
|
1837
|
-
}
|
|
1838
|
-
function pr(e) {
|
|
1839
|
-
const n = e | 32;
|
|
1840
|
-
return n >= 97 && n <= 122;
|
|
1841
|
-
}
|
|
1842
|
-
function ar(e, n) {
|
|
1843
|
-
if (!e.md.options.html)
|
|
1844
|
-
return !1;
|
|
1845
|
-
const r = e.posMax, i = e.pos;
|
|
1846
|
-
if (e.src.charCodeAt(i) !== 60 || i + 2 >= r)
|
|
1847
|
-
return !1;
|
|
1848
|
-
const o = e.src.charCodeAt(i + 1);
|
|
1849
|
-
if (o !== 33 && o !== 63 && o !== 47 && !pr(o))
|
|
1850
|
-
return !1;
|
|
1851
|
-
const t = e.src.slice(i).match(Nn);
|
|
1852
|
-
if (!t)
|
|
1853
|
-
return !1;
|
|
1854
|
-
if (!n) {
|
|
1855
|
-
const l = e.push("html_inline", "", 0);
|
|
1856
|
-
l.content = t[0], ur(l.content) && e.linkLevel++, hr(l.content) && e.linkLevel--;
|
|
1857
|
-
}
|
|
1858
|
-
return e.pos += t[0].length, !0;
|
|
1859
|
-
}
|
|
1860
|
-
const kr = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, dr = /^&([a-z][a-z0-9]{1,31});/i;
|
|
1861
|
-
function mr(e, n) {
|
|
1862
|
-
const r = e.pos, i = e.posMax;
|
|
1863
|
-
if (e.src.charCodeAt(r) !== 38 || r + 1 >= i) return !1;
|
|
1864
|
-
if (e.src.charCodeAt(r + 1) === 35) {
|
|
1865
|
-
const t = e.src.slice(r).match(kr);
|
|
1866
|
-
if (t) {
|
|
1867
|
-
if (!n) {
|
|
1868
|
-
const l = t[1][0].toLowerCase() === "x" ? parseInt(t[1].slice(1), 16) : parseInt(t[1], 10), c = e.push("text_special", "", 0);
|
|
1869
|
-
c.content = ne(l) ? H(l) : H(65533), c.markup = t[0], c.info = "entity";
|
|
1870
|
-
}
|
|
1871
|
-
return e.pos += t[0].length, !0;
|
|
1872
|
-
}
|
|
1873
|
-
} else {
|
|
1874
|
-
const t = e.src.slice(r).match(dr);
|
|
1875
|
-
if (t) {
|
|
1876
|
-
const l = me(t[0]);
|
|
1877
|
-
if (l !== t[0]) {
|
|
1878
|
-
if (!n) {
|
|
1879
|
-
const c = e.push("text_special", "", 0);
|
|
1880
|
-
c.content = l, c.markup = t[0], c.info = "entity";
|
|
1881
|
-
}
|
|
1882
|
-
return e.pos += t[0].length, !0;
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
}
|
|
1886
|
-
return !1;
|
|
1887
|
-
}
|
|
1888
|
-
function ae(e) {
|
|
1889
|
-
const n = {}, r = e.length;
|
|
1890
|
-
if (!r) return;
|
|
1891
|
-
let i = 0, o = -2;
|
|
1892
|
-
const t = [];
|
|
1893
|
-
for (let l = 0; l < r; l++) {
|
|
1894
|
-
const c = e[l];
|
|
1895
|
-
if (t.push(0), (e[i].marker !== c.marker || o !== c.token - 1) && (i = l), o = c.token, c.length = c.length || 0, !c.close) continue;
|
|
1896
|
-
n.hasOwnProperty(c.marker) || (n[c.marker] = [-1, -1, -1, -1, -1, -1]);
|
|
1897
|
-
const s = n[c.marker][(c.open ? 3 : 0) + c.length % 3];
|
|
1898
|
-
let f = i - t[i] - 1, h = f;
|
|
1899
|
-
for (; f > s; f -= t[f] + 1) {
|
|
1900
|
-
const p = e[f];
|
|
1901
|
-
if (p.marker === c.marker && p.open && p.end < 0) {
|
|
1902
|
-
let k = !1;
|
|
1903
|
-
if ((p.close || c.open) && (p.length + c.length) % 3 === 0 && (p.length % 3 !== 0 || c.length % 3 !== 0) && (k = !0), !k) {
|
|
1904
|
-
const a = f > 0 && !e[f - 1].open ? t[f - 1] + 1 : 0;
|
|
1905
|
-
t[l] = l - f + a, t[f] = a, c.open = !1, p.end = l, p.close = !1, h = -1, o = -2;
|
|
1906
|
-
break;
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
h !== -1 && (n[c.marker][(c.open ? 3 : 0) + (c.length || 0) % 3] = h);
|
|
1911
|
-
}
|
|
1912
|
-
}
|
|
1913
|
-
function xr(e) {
|
|
1914
|
-
const n = e.tokens_meta, r = e.tokens_meta.length;
|
|
1915
|
-
ae(e.delimiters);
|
|
1916
|
-
for (let i = 0; i < r; i++)
|
|
1917
|
-
n[i] && n[i].delimiters && ae(n[i].delimiters);
|
|
1918
|
-
}
|
|
1919
|
-
function gr(e) {
|
|
1920
|
-
let n, r, i = 0;
|
|
1921
|
-
const o = e.tokens, t = e.tokens.length;
|
|
1922
|
-
for (n = r = 0; n < t; n++)
|
|
1923
|
-
o[n].nesting < 0 && i--, o[n].level = i, o[n].nesting > 0 && i++, o[n].type === "text" && n + 1 < t && o[n + 1].type === "text" ? o[n + 1].content = o[n].content + o[n + 1].content : (n !== r && (o[r] = o[n]), r++);
|
|
1924
|
-
n !== r && (o.length = r);
|
|
1925
|
-
}
|
|
1926
|
-
const Y = [
|
|
1927
|
-
["text", Jn],
|
|
1928
|
-
["linkify", Xn],
|
|
1929
|
-
["newline", Yn],
|
|
1930
|
-
["escape", Kn],
|
|
1931
|
-
["backticks", er],
|
|
1932
|
-
["strikethrough", Ee.tokenize],
|
|
1933
|
-
["emphasis", Se.tokenize],
|
|
1934
|
-
["link", ir],
|
|
1935
|
-
["image", lr],
|
|
1936
|
-
["autolink", fr],
|
|
1937
|
-
["html_inline", ar],
|
|
1938
|
-
["entity", mr]
|
|
1939
|
-
], K = [
|
|
1940
|
-
["balance_pairs", xr],
|
|
1941
|
-
["strikethrough", Ee.postProcess],
|
|
1942
|
-
["emphasis", Se.postProcess],
|
|
1943
|
-
// rules for pairs separate '**' into its own text tokens, which may be left unused,
|
|
1944
|
-
// rule below merges unused segments back with the rest of the text
|
|
1945
|
-
["fragments_join", gr]
|
|
1946
|
-
];
|
|
1947
|
-
function N() {
|
|
1948
|
-
this.ruler = new S();
|
|
1949
|
-
for (let e = 0; e < Y.length; e++)
|
|
1950
|
-
this.ruler.push(Y[e][0], Y[e][1]);
|
|
1951
|
-
this.ruler2 = new S();
|
|
1952
|
-
for (let e = 0; e < K.length; e++)
|
|
1953
|
-
this.ruler2.push(K[e][0], K[e][1]);
|
|
1954
|
-
}
|
|
1955
|
-
N.prototype.skipToken = function(e) {
|
|
1956
|
-
const n = e.pos, r = this.ruler.getRules(""), i = r.length, o = e.md.options.maxNesting, t = e.cache;
|
|
1957
|
-
if (typeof t[n] < "u") {
|
|
1958
|
-
e.pos = t[n];
|
|
1959
|
-
return;
|
|
1960
|
-
}
|
|
1961
|
-
let l = !1;
|
|
1962
|
-
if (e.level < o) {
|
|
1963
|
-
for (let c = 0; c < i; c++)
|
|
1964
|
-
if (e.level++, l = r[c](e, !0), e.level--, l) {
|
|
1965
|
-
if (n >= e.pos)
|
|
1966
|
-
throw new Error("inline rule didn't increment state.pos");
|
|
1967
|
-
break;
|
|
1968
|
-
}
|
|
1969
|
-
} else
|
|
1970
|
-
e.pos = e.posMax;
|
|
1971
|
-
l || e.pos++, t[n] = e.pos;
|
|
1972
|
-
};
|
|
1973
|
-
N.prototype.tokenize = function(e) {
|
|
1974
|
-
const n = this.ruler.getRules(""), r = n.length, i = e.posMax, o = e.md.options.maxNesting;
|
|
1975
|
-
for (; e.pos < i; ) {
|
|
1976
|
-
const t = e.pos;
|
|
1977
|
-
let l = !1;
|
|
1978
|
-
if (e.level < o) {
|
|
1979
|
-
for (let c = 0; c < r; c++)
|
|
1980
|
-
if (l = n[c](e, !1), l) {
|
|
1981
|
-
if (t >= e.pos)
|
|
1982
|
-
throw new Error("inline rule didn't increment state.pos");
|
|
1983
|
-
break;
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
if (l) {
|
|
1987
|
-
if (e.pos >= i)
|
|
1988
|
-
break;
|
|
1989
|
-
continue;
|
|
1990
|
-
}
|
|
1991
|
-
e.pending += e.src[e.pos++];
|
|
1992
|
-
}
|
|
1993
|
-
e.pending && e.pushPending();
|
|
1994
|
-
};
|
|
1995
|
-
N.prototype.parse = function(e, n, r, i) {
|
|
1996
|
-
const o = new this.State(e, n, r, i);
|
|
1997
|
-
this.tokenize(o);
|
|
1998
|
-
const t = this.ruler2.getRules(""), l = t.length;
|
|
1999
|
-
for (let c = 0; c < l; c++)
|
|
2000
|
-
t[c](o);
|
|
2001
|
-
};
|
|
2002
|
-
N.prototype.State = q;
|
|
2003
|
-
const _r = {
|
|
2004
|
-
options: {
|
|
2005
|
-
// Enable HTML tags in source
|
|
2006
|
-
html: !1,
|
|
2007
|
-
// Use '/' to close single tags (<br />)
|
|
2008
|
-
xhtmlOut: !1,
|
|
2009
|
-
// Convert '\n' in paragraphs into <br>
|
|
2010
|
-
breaks: !1,
|
|
2011
|
-
// CSS language prefix for fenced blocks
|
|
2012
|
-
langPrefix: "language-",
|
|
2013
|
-
// autoconvert URL-like texts to links
|
|
2014
|
-
linkify: !1,
|
|
2015
|
-
// Enable some language-neutral replacements + quotes beautification
|
|
2016
|
-
typographer: !1,
|
|
2017
|
-
// Double + single quotes replacement pairs, when typographer enabled,
|
|
2018
|
-
// and smartquotes on. Could be either a String or an Array.
|
|
2019
|
-
//
|
|
2020
|
-
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
|
|
2021
|
-
// and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
|
|
2022
|
-
quotes: "“”‘’",
|
|
2023
|
-
/* “”‘’ */
|
|
2024
|
-
// Highlighter function. Should return escaped HTML,
|
|
2025
|
-
// or '' if the source string is not changed and should be escaped externaly.
|
|
2026
|
-
// If result starts with <pre... internal wrapper is skipped.
|
|
2027
|
-
//
|
|
2028
|
-
// function (/*str, lang*/) { return ''; }
|
|
2029
|
-
//
|
|
2030
|
-
highlight: null,
|
|
2031
|
-
// Internal protection, recursion limit
|
|
2032
|
-
maxNesting: 100
|
|
2033
|
-
},
|
|
2034
|
-
components: {
|
|
2035
|
-
core: {},
|
|
2036
|
-
block: {},
|
|
2037
|
-
inline: {}
|
|
2038
|
-
}
|
|
2039
|
-
}, br = {
|
|
2040
|
-
options: {
|
|
2041
|
-
// Enable HTML tags in source
|
|
2042
|
-
html: !1,
|
|
2043
|
-
// Use '/' to close single tags (<br />)
|
|
2044
|
-
xhtmlOut: !1,
|
|
2045
|
-
// Convert '\n' in paragraphs into <br>
|
|
2046
|
-
breaks: !1,
|
|
2047
|
-
// CSS language prefix for fenced blocks
|
|
2048
|
-
langPrefix: "language-",
|
|
2049
|
-
// autoconvert URL-like texts to links
|
|
2050
|
-
linkify: !1,
|
|
2051
|
-
// Enable some language-neutral replacements + quotes beautification
|
|
2052
|
-
typographer: !1,
|
|
2053
|
-
// Double + single quotes replacement pairs, when typographer enabled,
|
|
2054
|
-
// and smartquotes on. Could be either a String or an Array.
|
|
2055
|
-
//
|
|
2056
|
-
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
|
|
2057
|
-
// and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
|
|
2058
|
-
quotes: "“”‘’",
|
|
2059
|
-
/* “”‘’ */
|
|
2060
|
-
// Highlighter function. Should return escaped HTML,
|
|
2061
|
-
// or '' if the source string is not changed and should be escaped externaly.
|
|
2062
|
-
// If result starts with <pre... internal wrapper is skipped.
|
|
2063
|
-
//
|
|
2064
|
-
// function (/*str, lang*/) { return ''; }
|
|
2065
|
-
//
|
|
2066
|
-
highlight: null,
|
|
2067
|
-
// Internal protection, recursion limit
|
|
2068
|
-
maxNesting: 20
|
|
2069
|
-
},
|
|
2070
|
-
components: {
|
|
2071
|
-
core: {
|
|
2072
|
-
rules: [
|
|
2073
|
-
"normalize",
|
|
2074
|
-
"block",
|
|
2075
|
-
"inline",
|
|
2076
|
-
"text_join"
|
|
2077
|
-
]
|
|
2078
|
-
},
|
|
2079
|
-
block: {
|
|
2080
|
-
rules: [
|
|
2081
|
-
"paragraph"
|
|
2082
|
-
]
|
|
2083
|
-
},
|
|
2084
|
-
inline: {
|
|
2085
|
-
rules: [
|
|
2086
|
-
"text"
|
|
2087
|
-
],
|
|
2088
|
-
rules2: [
|
|
2089
|
-
"balance_pairs",
|
|
2090
|
-
"fragments_join"
|
|
2091
|
-
]
|
|
2092
|
-
}
|
|
2093
|
-
}
|
|
2094
|
-
}, Cr = {
|
|
2095
|
-
options: {
|
|
2096
|
-
// Enable HTML tags in source
|
|
2097
|
-
html: !0,
|
|
2098
|
-
// Use '/' to close single tags (<br />)
|
|
2099
|
-
xhtmlOut: !0,
|
|
2100
|
-
// Convert '\n' in paragraphs into <br>
|
|
2101
|
-
breaks: !1,
|
|
2102
|
-
// CSS language prefix for fenced blocks
|
|
2103
|
-
langPrefix: "language-",
|
|
2104
|
-
// autoconvert URL-like texts to links
|
|
2105
|
-
linkify: !1,
|
|
2106
|
-
// Enable some language-neutral replacements + quotes beautification
|
|
2107
|
-
typographer: !1,
|
|
2108
|
-
// Double + single quotes replacement pairs, when typographer enabled,
|
|
2109
|
-
// and smartquotes on. Could be either a String or an Array.
|
|
2110
|
-
//
|
|
2111
|
-
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
|
|
2112
|
-
// and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
|
|
2113
|
-
quotes: "“”‘’",
|
|
2114
|
-
/* “”‘’ */
|
|
2115
|
-
// Highlighter function. Should return escaped HTML,
|
|
2116
|
-
// or '' if the source string is not changed and should be escaped externaly.
|
|
2117
|
-
// If result starts with <pre... internal wrapper is skipped.
|
|
2118
|
-
//
|
|
2119
|
-
// function (/*str, lang*/) { return ''; }
|
|
2120
|
-
//
|
|
2121
|
-
highlight: null,
|
|
2122
|
-
// Internal protection, recursion limit
|
|
2123
|
-
maxNesting: 20
|
|
2124
|
-
},
|
|
2125
|
-
components: {
|
|
2126
|
-
core: {
|
|
2127
|
-
rules: [
|
|
2128
|
-
"normalize",
|
|
2129
|
-
"block",
|
|
2130
|
-
"inline",
|
|
2131
|
-
"text_join"
|
|
2132
|
-
]
|
|
2133
|
-
},
|
|
2134
|
-
block: {
|
|
2135
|
-
rules: [
|
|
2136
|
-
"blockquote",
|
|
2137
|
-
"code",
|
|
2138
|
-
"fence",
|
|
2139
|
-
"heading",
|
|
2140
|
-
"hr",
|
|
2141
|
-
"html_block",
|
|
2142
|
-
"lheading",
|
|
2143
|
-
"list",
|
|
2144
|
-
"reference",
|
|
2145
|
-
"paragraph"
|
|
2146
|
-
]
|
|
2147
|
-
},
|
|
2148
|
-
inline: {
|
|
2149
|
-
rules: [
|
|
2150
|
-
"autolink",
|
|
2151
|
-
"backticks",
|
|
2152
|
-
"emphasis",
|
|
2153
|
-
"entity",
|
|
2154
|
-
"escape",
|
|
2155
|
-
"html_inline",
|
|
2156
|
-
"image",
|
|
2157
|
-
"link",
|
|
2158
|
-
"newline",
|
|
2159
|
-
"text"
|
|
2160
|
-
],
|
|
2161
|
-
rules2: [
|
|
2162
|
-
"balance_pairs",
|
|
2163
|
-
"emphasis",
|
|
2164
|
-
"fragments_join"
|
|
2165
|
-
]
|
|
2166
|
-
}
|
|
2167
|
-
}
|
|
2168
|
-
}, Ar = {
|
|
2169
|
-
default: _r,
|
|
2170
|
-
zero: br,
|
|
2171
|
-
commonmark: Cr
|
|
2172
|
-
}, yr = /^(vbscript|javascript|file|data):/, Er = /^data:image\/(gif|png|jpeg|webp);/;
|
|
2173
|
-
function Sr(e) {
|
|
2174
|
-
const n = e.trim().toLowerCase();
|
|
2175
|
-
return yr.test(n) ? Er.test(n) : !0;
|
|
2176
|
-
}
|
|
2177
|
-
const Me = ["http:", "https:", "mailto:"];
|
|
2178
|
-
function Mr(e) {
|
|
2179
|
-
const n = ke(e, !0);
|
|
2180
|
-
if (n.hostname && (!n.protocol || Me.indexOf(n.protocol) >= 0))
|
|
2181
|
-
try {
|
|
2182
|
-
n.hostname = xe.toASCII(n.hostname);
|
|
2183
|
-
} catch {
|
|
2184
|
-
}
|
|
2185
|
-
return Pe(de(n));
|
|
2186
|
-
}
|
|
2187
|
-
function wr(e) {
|
|
2188
|
-
const n = ke(e, !0);
|
|
2189
|
-
if (n.hostname && (!n.protocol || Me.indexOf(n.protocol) >= 0))
|
|
2190
|
-
try {
|
|
2191
|
-
n.hostname = xe.toUnicode(n.hostname);
|
|
2192
|
-
} catch {
|
|
2193
|
-
}
|
|
2194
|
-
return ie(de(n), ie.defaultChars + "%");
|
|
2195
|
-
}
|
|
2196
|
-
function w(e, n) {
|
|
2197
|
-
if (!(this instanceof w))
|
|
2198
|
-
return new w(e, n);
|
|
2199
|
-
n || ee(e) || (n = e || {}, e = "default"), this.inline = new N(), this.block = new Q(), this.core = new re(), this.renderer = new F(), this.linkify = new De(), this.validateLink = Sr, this.normalizeLink = Mr, this.normalizeLinkText = wr, this.utils = Xe, this.helpers = G({}, nn), this.options = {}, this.configure(e), n && this.set(n);
|
|
2200
|
-
}
|
|
2201
|
-
w.prototype.set = function(e) {
|
|
2202
|
-
return G(this.options, e), this;
|
|
2203
|
-
};
|
|
2204
|
-
w.prototype.configure = function(e) {
|
|
2205
|
-
const n = this;
|
|
2206
|
-
if (ee(e)) {
|
|
2207
|
-
const r = e;
|
|
2208
|
-
if (e = Ar[r], !e)
|
|
2209
|
-
throw new Error('Wrong `markdown-it` preset "' + r + '", check name');
|
|
2210
|
-
}
|
|
2211
|
-
if (!e)
|
|
2212
|
-
throw new Error("Wrong `markdown-it` preset, can't be empty");
|
|
2213
|
-
return e.options && n.set(e.options), e.components && Object.keys(e.components).forEach(function(r) {
|
|
2214
|
-
e.components[r].rules && n[r].ruler.enableOnly(e.components[r].rules), e.components[r].rules2 && n[r].ruler2.enableOnly(e.components[r].rules2);
|
|
2215
|
-
}), this;
|
|
2216
|
-
};
|
|
2217
|
-
w.prototype.enable = function(e, n) {
|
|
2218
|
-
let r = [];
|
|
2219
|
-
Array.isArray(e) || (e = [e]), ["core", "block", "inline"].forEach(function(o) {
|
|
2220
|
-
r = r.concat(this[o].ruler.enable(e, !0));
|
|
2221
|
-
}, this), r = r.concat(this.inline.ruler2.enable(e, !0));
|
|
2222
|
-
const i = e.filter(function(o) {
|
|
2223
|
-
return r.indexOf(o) < 0;
|
|
2224
|
-
});
|
|
2225
|
-
if (i.length && !n)
|
|
2226
|
-
throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + i);
|
|
2227
|
-
return this;
|
|
2228
|
-
};
|
|
2229
|
-
w.prototype.disable = function(e, n) {
|
|
2230
|
-
let r = [];
|
|
2231
|
-
Array.isArray(e) || (e = [e]), ["core", "block", "inline"].forEach(function(o) {
|
|
2232
|
-
r = r.concat(this[o].ruler.disable(e, !0));
|
|
2233
|
-
}, this), r = r.concat(this.inline.ruler2.disable(e, !0));
|
|
2234
|
-
const i = e.filter(function(o) {
|
|
2235
|
-
return r.indexOf(o) < 0;
|
|
2236
|
-
});
|
|
2237
|
-
if (i.length && !n)
|
|
2238
|
-
throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + i);
|
|
2239
|
-
return this;
|
|
2240
|
-
};
|
|
2241
|
-
w.prototype.use = function(e) {
|
|
2242
|
-
const n = [this].concat(Array.prototype.slice.call(arguments, 1));
|
|
2243
|
-
return e.apply(e, n), this;
|
|
2244
|
-
};
|
|
2245
|
-
w.prototype.parse = function(e, n) {
|
|
2246
|
-
if (typeof e != "string")
|
|
2247
|
-
throw new Error("Input data should be a String");
|
|
2248
|
-
const r = new this.core.State(e, this, n);
|
|
2249
|
-
return this.core.process(r), r.tokens;
|
|
2250
|
-
};
|
|
2251
|
-
w.prototype.render = function(e, n) {
|
|
2252
|
-
return n = n || {}, this.renderer.render(this.parse(e, n), this.options, n);
|
|
2253
|
-
};
|
|
2254
|
-
w.prototype.parseInline = function(e, n) {
|
|
2255
|
-
const r = new this.core.State(e, this, n);
|
|
2256
|
-
return r.inlineMode = !0, this.core.process(r), r.tokens;
|
|
2257
|
-
};
|
|
2258
|
-
w.prototype.renderInline = function(e, n) {
|
|
2259
|
-
return n = n || {}, this.renderer.render(this.parseInline(e, n), this.options, n);
|
|
2260
|
-
};
|
|
2261
|
-
export {
|
|
2262
|
-
w as M
|
|
2263
|
-
};
|