zudoku 0.0.0-fix-downgrade-openapi-parser.aac00796 → 0.0.0-fix-firebase-export.2e421fda
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/dist/app/main.d.ts +91 -1
- package/dist/app/main.js +5 -1
- package/dist/app/main.js.map +1 -1
- package/dist/app/sentry.js +1 -1
- package/dist/config/config.d.ts +15 -46
- package/dist/config/validators/BuildSchema.js +18 -3
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +61 -61
- package/dist/config/validators/NavigationSchema.js +2 -4
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +203 -5
- package/dist/config/validators/validate.js +44 -1
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +43 -0
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/flat-config.d.ts +31 -2
- package/dist/lib/auth/issuer.js +3 -0
- package/dist/lib/auth/issuer.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -1
- package/dist/lib/authentication/providers/auth0.js +6 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/firebase.d.ts +4 -0
- package/dist/lib/authentication/providers/firebase.js +215 -0
- package/dist/lib/authentication/providers/firebase.js.map +1 -0
- package/dist/lib/authentication/providers/supabase.js +1 -6
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +24 -0
- package/dist/lib/authentication/ui/ZudokuAuthUi.js +124 -0
- package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Apple.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Apple.js +4 -0
- package/dist/lib/authentication/ui/icons/Apple.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Facebook.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Facebook.js +4 -0
- package/dist/lib/authentication/ui/icons/Facebook.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Github.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Github.js +4 -0
- package/dist/lib/authentication/ui/icons/Github.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Google.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Google.js +4 -0
- package/dist/lib/authentication/ui/icons/Google.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Microsoft.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Microsoft.js +4 -0
- package/dist/lib/authentication/ui/icons/Microsoft.js.map +1 -0
- package/dist/lib/authentication/ui/icons/X.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/X.js +4 -0
- package/dist/lib/authentication/ui/icons/X.js.map +1 -0
- package/dist/lib/components/Autocomplete.d.ts +3 -1
- package/dist/lib/components/Autocomplete.js +6 -2
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/Layout.js +3 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Mermaid.d.ts +7 -0
- package/dist/lib/components/Mermaid.js +42 -0
- package/dist/lib/components/Mermaid.js.map +1 -0
- package/dist/lib/components/PagefindSearchMeta.d.ts +8 -0
- package/dist/lib/components/PagefindSearchMeta.js +7 -0
- package/dist/lib/components/PagefindSearchMeta.js.map +1 -0
- package/dist/lib/components/Zudoku.js +2 -5
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +2 -2
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +7 -7
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +3 -3
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/RouterError.d.ts +3 -1
- package/dist/lib/errors/RouterError.js +3 -2
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +1 -0
- package/dist/lib/oas/parser/index.js +7 -3
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +4 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +1 -0
- package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
- package/dist/lib/plugins/openapi/DownloadSchemaButton.d.ts +3 -0
- package/dist/lib/plugins/openapi/DownloadSchemaButton.js +47 -0
- package/dist/lib/plugins/openapi/DownloadSchemaButton.js.map +1 -0
- package/dist/lib/plugins/openapi/Endpoint.js +3 -6
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.d.ts +5 -0
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +10 -0
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -0
- package/dist/lib/plugins/openapi/OasProvider.js +22 -13
- package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +16 -6
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +4 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +7 -4
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +17 -6
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +9 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +4 -2
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +26 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +2 -1
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +2 -2
- package/dist/lib/plugins/openapi/Sidecar.js +61 -26
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -2
- package/dist/lib/plugins/openapi/SidecarExamples.js +24 -43
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
- package/dist/lib/plugins/openapi/components/NonHighlightedCode.d.ts +4 -0
- package/dist/lib/plugins/openapi/components/NonHighlightedCode.js +5 -0
- package/dist/lib/plugins/openapi/components/NonHighlightedCode.js.map +1 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js +5 -6
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +11 -5
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +29 -13
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +67 -15
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +2 -2
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +23 -83
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +10 -2
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +8 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +2 -3
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +58 -26
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -2
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +16 -40
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +2 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +17 -8
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +31 -16
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/UnionView.js +2 -5
- package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/union-helpers.js +0 -1
- package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +2 -2
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +9 -11
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.d.ts +6 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +29 -2
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/IndexingDialog.d.ts +3 -0
- package/dist/lib/plugins/search-pagefind/IndexingDialog.js +64 -0
- package/dist/lib/plugins/search-pagefind/IndexingDialog.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +22 -5
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +5 -4
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/shiki.d.ts +1 -1
- package/dist/lib/shiki.js +18 -12
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +3 -3
- package/dist/lib/ui/Badge.js +9 -7
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/Button.js +9 -7
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/ButtonGroup.d.ts +11 -0
- package/dist/lib/ui/ButtonGroup.js +28 -0
- package/dist/lib/ui/ButtonGroup.js.map +1 -0
- package/dist/lib/ui/Checkbox.d.ts +2 -2
- package/dist/lib/ui/Checkbox.js +4 -4
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/CodeBlock.d.ts +0 -1
- package/dist/lib/ui/CodeBlock.js +1 -1
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Collapsible.d.ts +4 -4
- package/dist/lib/ui/Collapsible.js +11 -4
- package/dist/lib/ui/Collapsible.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +3 -3
- package/dist/lib/ui/Command.js +2 -2
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/DropdownMenu.d.ts +21 -23
- package/dist/lib/ui/DropdownMenu.js +47 -32
- package/dist/lib/ui/DropdownMenu.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.d.ts +0 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +3 -2
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Frame.d.ts +8 -0
- package/dist/lib/ui/Frame.js +22 -0
- package/dist/lib/ui/Frame.js.map +1 -0
- package/dist/lib/ui/Item.d.ts +23 -0
- package/dist/lib/ui/Item.js +67 -0
- package/dist/lib/ui/Item.js.map +1 -0
- package/dist/lib/ui/Kbd.d.ts +3 -0
- package/dist/lib/ui/Kbd.js +10 -0
- package/dist/lib/ui/Kbd.js.map +1 -0
- package/dist/lib/ui/NativeSelect.d.ts +5 -0
- package/dist/lib/ui/NativeSelect.js +14 -0
- package/dist/lib/ui/NativeSelect.js.map +1 -0
- package/dist/lib/ui/Select.d.ts +13 -11
- package/dist/lib/ui/Select.js +34 -23
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Separator.d.ts +4 -0
- package/dist/lib/ui/Separator.js +8 -0
- package/dist/lib/ui/Separator.js.map +1 -0
- package/dist/lib/ui/Tooltip.d.ts +7 -7
- package/dist/lib/ui/Tooltip.js +16 -10
- package/dist/lib/ui/Tooltip.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +1 -0
- package/dist/lib/util/MdxComponents.js +2 -0
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +5 -2
- package/dist/lib/util/createVariantComponent.js +5 -2
- package/dist/lib/util/createVariantComponent.js.map +1 -1
- package/dist/lib/util/flattenAllOf.d.ts +4 -0
- package/dist/lib/util/flattenAllOf.js +88 -0
- package/dist/lib/util/flattenAllOf.js.map +1 -0
- package/dist/lib/util/flattenAllOf.test.d.ts +1 -0
- package/dist/lib/util/flattenAllOf.test.js +587 -0
- package/dist/lib/util/flattenAllOf.test.js.map +1 -0
- package/dist/lib/util/readFrontmatter.d.ts +6 -0
- package/dist/lib/util/readFrontmatter.js +12 -0
- package/dist/lib/util/readFrontmatter.js.map +1 -0
- package/dist/vite/api/SchemaManager.d.ts +5 -0
- package/dist/vite/api/SchemaManager.js +30 -18
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +67 -0
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/config.js +8 -2
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +25 -0
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/mdx/remark-last-modified.js +57 -3
- package/dist/vite/mdx/remark-last-modified.js.map +1 -1
- package/dist/vite/pagefind-dev-index.d.ts +16 -0
- package/dist/vite/pagefind-dev-index.js +68 -0
- package/dist/vite/pagefind-dev-index.js.map +1 -0
- package/dist/vite/plugin-api.js +41 -3
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +3 -5
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-markdown-export.js +3 -4
- package/dist/vite/plugin-markdown-export.js.map +1 -1
- package/dist/vite/plugin-theme.js +10 -1
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/prerender/prerender.js +1 -19
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/utils.d.ts +2 -0
- package/dist/vite/prerender/utils.js +24 -0
- package/dist/vite/prerender/utils.js.map +1 -0
- package/lib/ActionButton-DUgvSylL.js +25 -0
- package/lib/ActionButton-DUgvSylL.js.map +1 -0
- package/lib/Button-CynVW1JV.js +53 -0
- package/lib/Button-CynVW1JV.js.map +1 -0
- package/lib/ClaudeLogo-B4Xxt-x_.js +69 -0
- package/lib/ClaudeLogo-B4Xxt-x_.js.map +1 -0
- package/lib/{Command-CUcrW3qs.js → Command-BpT1iBE6.js} +25 -25
- package/lib/Command-BpT1iBE6.js.map +1 -0
- package/lib/Drawer-Ci7XwhqT.js.map +1 -1
- package/lib/DropdownMenu-C8SX_-S_.js +104 -0
- package/lib/DropdownMenu-C8SX_-S_.js.map +1 -0
- package/lib/{ErrorAlert-DE3Sf66a.js → ErrorAlert-DrOR8w3f.js} +475 -456
- package/lib/ErrorAlert-DrOR8w3f.js.map +1 -0
- package/lib/IndexingDialog-B5zCiUKr.js +100 -0
- package/lib/IndexingDialog-B5zCiUKr.js.map +1 -0
- package/lib/MdxPage-BagO2c-n.js +210 -0
- package/lib/MdxPage-BagO2c-n.js.map +1 -0
- package/lib/Mermaid-D_VSX7_Q.js +102 -0
- package/lib/Mermaid-D_VSX7_Q.js.map +1 -0
- package/lib/{OAuthErrorPage-BycMozgn.js → OAuthErrorPage-Fq54RLgt.js} +7 -7
- package/lib/{OAuthErrorPage-BycMozgn.js.map → OAuthErrorPage-Fq54RLgt.js.map} +1 -1
- package/lib/OasProvider-DPH8mwDa.js +40 -0
- package/lib/OasProvider-DPH8mwDa.js.map +1 -0
- package/lib/OperationList-C0jiEaG5.js +5805 -0
- package/lib/OperationList-C0jiEaG5.js.map +1 -0
- package/lib/RouteGuard-9wjejsKm.js +77 -0
- package/lib/RouteGuard-9wjejsKm.js.map +1 -0
- package/lib/RouterError-DSLXagd5.js +42 -0
- package/lib/RouterError-DSLXagd5.js.map +1 -0
- package/lib/{SchemaList-xZSf3IMh.js → SchemaList-BU0zCHn9.js} +28 -27
- package/lib/SchemaList-BU0zCHn9.js.map +1 -0
- package/lib/SchemaView-DVae4RO2.js +597 -0
- package/lib/SchemaView-DVae4RO2.js.map +1 -0
- package/lib/Select-CkxXP5I7.js +243 -0
- package/lib/Select-CkxXP5I7.js.map +1 -0
- package/lib/Separator-CTPSeW1S.js +27 -0
- package/lib/Separator-CTPSeW1S.js.map +1 -0
- package/lib/{SignUp-6SGx9Yyq.js → SignUp-BjS4ozA7.js} +13 -13
- package/lib/{SignUp-6SGx9Yyq.js.map → SignUp-BjS4ozA7.js.map} +1 -1
- package/lib/{SyntaxHighlight-zvlnSnHB.js → SyntaxHighlight-Kdyskw3C.js} +710 -662
- package/lib/{SyntaxHighlight-zvlnSnHB.js.map → SyntaxHighlight-Kdyskw3C.js.map} +1 -1
- package/lib/{Toc-Da9yp7lo.js → Toc-DJxFPfcS.js} +2 -2
- package/lib/{Toc-Da9yp7lo.js.map → Toc-DJxFPfcS.js.map} +1 -1
- package/lib/{ZudokuContext-BUZ5hkWB.js → ZudokuContext-BXldanA8.js} +11 -11
- package/lib/{ZudokuContext-BUZ5hkWB.js.map → ZudokuContext-BXldanA8.js.map} +1 -1
- package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js +9 -0
- package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js.map +1 -0
- package/lib/{chunk-PVWAREVJ-BMhpCH5D.js → chunk-PVWAREVJ-dLIqswPy.js} +5 -5
- package/lib/{chunk-PVWAREVJ-BMhpCH5D.js.map → chunk-PVWAREVJ-dLIqswPy.js.map} +1 -1
- package/lib/{circular-DvuimBGQ.js → circular-CzWF1hj5.js} +6360 -5953
- package/lib/circular-CzWF1hj5.js.map +1 -0
- package/lib/createServer-BIr2_tGn.js +16693 -0
- package/lib/createServer-BIr2_tGn.js.map +1 -0
- package/lib/createVariantComponent-B9_dVBvu.js +35 -0
- package/lib/createVariantComponent-B9_dVBvu.js.map +1 -0
- package/lib/{errors-CuGgh3hf.js → errors-Bs4duWDy.js} +3 -3
- package/lib/{errors-CuGgh3hf.js.map → errors-Bs4duWDy.js.map} +1 -1
- package/lib/firebase-Cax7HPzn.js +7360 -0
- package/lib/firebase-Cax7HPzn.js.map +1 -0
- package/lib/{hook-CMeoxziF.js → hook-BNxidGQq.js} +3 -3
- package/lib/{hook-CMeoxziF.js.map → hook-BNxidGQq.js.map} +1 -1
- package/lib/index-0oT9beQN.js +3676 -0
- package/lib/index-0oT9beQN.js.map +1 -0
- package/lib/{index-rYHsvtTo.js → index-Bh-MffiL.js} +2 -2
- package/lib/{index-rYHsvtTo.js.map → index-Bh-MffiL.js.map} +1 -1
- package/lib/{index-B1rmok4X.js → index-CCmMJp02.js} +10 -10
- package/lib/{index-B1rmok4X.js.map → index-CCmMJp02.js.map} +1 -1
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/index-Css56y3F.js +133 -0
- package/lib/index-Css56y3F.js.map +1 -0
- package/lib/index.esm-DDENMN4y.js +32 -0
- package/lib/index.esm-DDENMN4y.js.map +1 -0
- package/lib/{index.esm-BnYHxCYC.js → index.esm-DtzT_KoE.js} +20 -20
- package/lib/{index.esm-BnYHxCYC.js.map → index.esm-DtzT_KoE.js.map} +1 -1
- package/lib/{invariant-Bm-FVUQE.js → invariant-CGOLuIIz.js} +3 -3
- package/lib/{invariant-Bm-FVUQE.js.map → invariant-CGOLuIIz.js.map} +1 -1
- package/lib/{mutation-BSU0xu4m.js → mutation-BoVlx8yA.js} +2 -2
- package/lib/{mutation-BSU0xu4m.js.map → mutation-BoVlx8yA.js.map} +1 -1
- package/lib/ui/ActionButton.js +1 -1
- package/lib/ui/Badge.js +27 -13
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Button.js +26 -24
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/ButtonGroup.js +77 -0
- package/lib/ui/ButtonGroup.js.map +1 -0
- package/lib/ui/Checkbox.js +29 -26
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +7 -7
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Collapsible.js +32 -5
- package/lib/ui/Collapsible.js.map +1 -1
- package/lib/ui/Command.js +3 -3
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/DropdownMenu.js +227 -140
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +26 -25
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Frame.js +81 -0
- package/lib/ui/Frame.js.map +1 -0
- package/lib/ui/Item.js +188 -0
- package/lib/ui/Item.js.map +1 -0
- package/lib/ui/Kbd.js +32 -0
- package/lib/ui/Kbd.js.map +1 -0
- package/lib/ui/NativeSelect.js +57 -0
- package/lib/ui/NativeSelect.js.map +1 -0
- package/lib/ui/Select.js +166 -116
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Separator.js +27 -0
- package/lib/ui/Separator.js.map +1 -0
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/ui/Tabs.js +10 -10
- package/lib/ui/Tooltip.js +55 -28
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/useMutation-C6RqWmTS.js +97 -0
- package/lib/useMutation-C6RqWmTS.js.map +1 -0
- package/lib/zudoku.__internal.js +349 -349
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +7 -7
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +4 -4
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-firebase.js +9 -0
- package/lib/zudoku.auth-firebase.js.map +1 -0
- package/lib/zudoku.auth-openid.js +5 -5
- package/lib/zudoku.auth-supabase.js +31 -34
- package/lib/zudoku.auth-supabase.js.map +1 -1
- package/lib/zudoku.components.js +7 -7
- package/lib/zudoku.hooks.js +11 -24
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.mermaid.js +10 -0
- package/lib/zudoku.mermaid.js.map +1 -0
- package/lib/zudoku.plugin-api-catalog.js +6 -6
- package/lib/zudoku.plugin-api-keys.js +225 -216
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +184 -226
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/lib/zudoku.router.js +2 -2
- package/package.json +44 -27
- package/src/app/main.css +1 -1
- package/src/app/main.tsx +5 -1
- package/src/app/sentry.ts +1 -1
- package/src/lib/auth/issuer.ts +3 -0
- package/src/lib/authentication/authentication.ts +1 -1
- package/src/lib/authentication/providers/auth0.tsx +6 -1
- package/src/lib/authentication/providers/firebase.tsx +284 -0
- package/src/lib/authentication/providers/supabase.tsx +2 -7
- package/src/lib/authentication/ui/ZudokuAuthUi.tsx +335 -0
- package/src/lib/authentication/ui/icons/Apple.tsx +10 -0
- package/src/lib/authentication/ui/icons/Facebook.tsx +15 -0
- package/src/lib/authentication/ui/icons/Github.tsx +16 -0
- package/src/lib/authentication/ui/icons/Google.tsx +16 -0
- package/src/lib/authentication/ui/icons/Microsoft.tsx +12 -0
- package/src/lib/authentication/ui/icons/X.tsx +10 -0
- package/src/lib/components/Autocomplete.tsx +11 -2
- package/src/lib/components/Layout.tsx +3 -2
- package/src/lib/components/Mermaid.tsx +68 -0
- package/src/lib/components/PagefindSearchMeta.tsx +14 -0
- package/src/lib/components/Zudoku.tsx +4 -7
- package/src/lib/components/navigation/NavigationItem.tsx +7 -20
- package/src/lib/core/RouteGuard.tsx +9 -9
- package/src/lib/core/plugins.ts +2 -2
- package/src/lib/errors/ErrorAlert.tsx +1 -1
- package/src/lib/errors/RouterError.tsx +7 -2
- package/src/lib/oas/parser/index.ts +10 -3
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +11 -7
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +5 -3
- package/src/lib/plugins/openapi/DownloadSchemaButton.tsx +115 -0
- package/src/lib/plugins/openapi/Endpoint.tsx +20 -27
- package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +52 -0
- package/src/lib/plugins/openapi/OasProvider.tsx +30 -17
- package/src/lib/plugins/openapi/OperationList.tsx +46 -21
- package/src/lib/plugins/openapi/OperationListItem.tsx +15 -12
- package/src/lib/plugins/openapi/ParameterList.tsx +37 -23
- package/src/lib/plugins/openapi/ParameterListItem.tsx +105 -54
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +48 -7
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +101 -33
- package/src/lib/plugins/openapi/SchemaList.tsx +4 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +145 -65
- package/src/lib/plugins/openapi/SidecarBox.tsx +26 -4
- package/src/lib/plugins/openapi/SidecarExamples.tsx +91 -79
- package/src/lib/plugins/openapi/components/ConstValue.tsx +1 -1
- package/src/lib/plugins/openapi/components/EnumValues.tsx +2 -2
- package/src/lib/plugins/openapi/components/NonHighlightedCode.tsx +22 -0
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +63 -53
- package/src/lib/plugins/openapi/index.tsx +16 -7
- package/src/lib/plugins/openapi/interfaces.ts +28 -7
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +246 -30
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +10 -6
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -2
- package/src/lib/plugins/openapi/playground/Headers.tsx +103 -219
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +33 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -34
- package/src/lib/plugins/openapi/playground/Playground.tsx +75 -33
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +9 -30
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +82 -136
- package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
- package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +2 -6
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +1 -1
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +89 -55
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +98 -60
- package/src/lib/plugins/openapi/schema/UnionView.tsx +6 -17
- package/src/lib/plugins/openapi/schema/union-helpers.ts +0 -1
- package/src/lib/plugins/openapi/schema/utils.ts +5 -2
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +11 -11
- package/src/lib/plugins/openapi/util/getRoutes.tsx +35 -3
- package/src/lib/plugins/search-pagefind/IndexingDialog.tsx +163 -0
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +61 -22
- package/src/lib/plugins/search-pagefind/ResultList.tsx +8 -3
- package/src/lib/shiki.ts +21 -12
- package/src/lib/ui/Badge.tsx +21 -12
- package/src/lib/ui/Button.tsx +10 -9
- package/src/lib/ui/ButtonGroup.tsx +82 -0
- package/src/lib/ui/Checkbox.tsx +23 -24
- package/src/lib/ui/CodeBlock.tsx +3 -4
- package/src/lib/ui/Collapsible.tsx +26 -4
- package/src/lib/ui/Command.tsx +3 -3
- package/src/lib/ui/DropdownMenu.tsx +226 -170
- package/src/lib/ui/EmbeddedCodeBlock.tsx +21 -19
- package/src/lib/ui/Frame.tsx +81 -0
- package/src/lib/ui/Item.tsx +192 -0
- package/src/lib/ui/Kbd.tsx +28 -0
- package/src/lib/ui/NativeSelect.tsx +47 -0
- package/src/lib/ui/Select.tsx +153 -126
- package/src/lib/ui/Separator.tsx +25 -0
- package/src/lib/ui/Tooltip.tsx +54 -32
- package/src/lib/util/MdxComponents.tsx +2 -0
- package/src/lib/util/createVariantComponent.tsx +31 -5
- package/src/lib/util/flattenAllOf.test.ts +689 -0
- package/src/lib/util/flattenAllOf.ts +122 -0
- package/src/lib/util/readFrontmatter.ts +13 -0
- package/src/shiki/langs/markdown-nix.js +1 -0
- package/src/shiki/langs/openscad.js +1 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.d.ts +0 -5
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js +0 -7
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.d.ts +0 -4
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js +0 -10
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.d.ts +0 -5
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js +0 -16
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js.map +0 -1
- package/dist/vite/create-pagefind-index.d.ts +0 -4
- package/dist/vite/create-pagefind-index.js +0 -12
- package/dist/vite/create-pagefind-index.js.map +0 -1
- package/lib/Button-DmS4u8Lj.js +0 -51
- package/lib/Button-DmS4u8Lj.js.map +0 -1
- package/lib/Command-CUcrW3qs.js.map +0 -1
- package/lib/DropdownMenu-BZ2NKQ3K.js +0 -126
- package/lib/DropdownMenu-BZ2NKQ3K.js.map +0 -1
- package/lib/ErrorAlert-DE3Sf66a.js.map +0 -1
- package/lib/MdxPage-DZfeC0QY.js +0 -240
- package/lib/MdxPage-DZfeC0QY.js.map +0 -1
- package/lib/OasProvider-Bf5zBDBY.js +0 -36
- package/lib/OasProvider-Bf5zBDBY.js.map +0 -1
- package/lib/OperationList-Cmiw1xm2.js +0 -5446
- package/lib/OperationList-Cmiw1xm2.js.map +0 -1
- package/lib/Pagination-CJszmeSA.js +0 -37
- package/lib/Pagination-CJszmeSA.js.map +0 -1
- package/lib/RouteGuard-DhU3LRr1.js +0 -81
- package/lib/RouteGuard-DhU3LRr1.js.map +0 -1
- package/lib/RouterError-VDLnrFqF.js +0 -41
- package/lib/RouterError-VDLnrFqF.js.map +0 -1
- package/lib/SchemaList-xZSf3IMh.js.map +0 -1
- package/lib/SchemaView-tHXTm5oM.js +0 -458
- package/lib/SchemaView-tHXTm5oM.js.map +0 -1
- package/lib/Select-C1DeCqKv.js +0 -372
- package/lib/Select-C1DeCqKv.js.map +0 -1
- package/lib/circular-DvuimBGQ.js.map +0 -1
- package/lib/createServer-D9UvCoDf.js +0 -12559
- package/lib/createServer-D9UvCoDf.js.map +0 -1
- package/lib/index-Cr9_YzOZ.js +0 -3364
- package/lib/index-Cr9_YzOZ.js.map +0 -1
- package/lib/useExposedProps-U3pmsHaG.js +0 -113
- package/lib/useExposedProps-U3pmsHaG.js.map +0 -1
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.tsx +0 -36
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.tsx +0 -25
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.tsx +0 -42
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as at } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { createElement as os, Fragment as ss, memo as as } from "react";
|
|
3
|
-
import { a as is } from "./ZudokuContext-
|
|
3
|
+
import { a as is } from "./ZudokuContext-BXldanA8.js";
|
|
4
4
|
import { c as Ir } from "./cn-dYga0KKN.js";
|
|
5
|
-
import {
|
|
5
|
+
import { a as ls, i as us } from "./invariant-CGOLuIIz.js";
|
|
6
6
|
import { CodeBlock as cs } from "./ui/CodeBlock.js";
|
|
7
7
|
import { EmbeddedCodeBlock as hs } from "./ui/EmbeddedCodeBlock.js";
|
|
8
|
-
function
|
|
8
|
+
function sh() {
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function ah() {
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function ih(t) {
|
|
13
13
|
const e = [], n = String(t || "");
|
|
14
14
|
let r = n.indexOf(","), o = 0, s = !1;
|
|
15
15
|
for (; !s; ) {
|
|
@@ -25,12 +25,12 @@ function Nr(t, e) {
|
|
|
25
25
|
(n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")
|
|
26
26
|
).trim();
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const ps = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, fs = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, ds = {};
|
|
29
29
|
function In(t, e) {
|
|
30
|
-
return (ds.jsx ?
|
|
30
|
+
return (ds.jsx ? fs : ps).test(t);
|
|
31
31
|
}
|
|
32
32
|
const gs = /[ \t\n\f\r]/g;
|
|
33
|
-
function
|
|
33
|
+
function wt(t) {
|
|
34
34
|
return typeof t == "object" ? t.type === "text" ? Nn(t.value) : !1 : Nn(t);
|
|
35
35
|
}
|
|
36
36
|
function Nn(t) {
|
|
@@ -89,7 +89,7 @@ W.prototype.property = "";
|
|
|
89
89
|
W.prototype.spaceSeparated = !1;
|
|
90
90
|
W.prototype.space = void 0;
|
|
91
91
|
let ms = 0;
|
|
92
|
-
const x = ye(), $ = ye(), Pr = ye(),
|
|
92
|
+
const x = ye(), $ = ye(), Pr = ye(), C = ye(), I = ye(), xe = ye(), q = ye();
|
|
93
93
|
function ye() {
|
|
94
94
|
return 2 ** ++ms;
|
|
95
95
|
}
|
|
@@ -99,7 +99,7 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
99
99
|
booleanish: $,
|
|
100
100
|
commaOrSpaceSeparated: q,
|
|
101
101
|
commaSeparated: xe,
|
|
102
|
-
number:
|
|
102
|
+
number: C,
|
|
103
103
|
overloadedBoolean: Pr,
|
|
104
104
|
spaceSeparated: I
|
|
105
105
|
}, Symbol.toStringTag, { value: "Module" })), At = (
|
|
@@ -153,9 +153,9 @@ const $r = Ie({
|
|
|
153
153
|
ariaAutoComplete: null,
|
|
154
154
|
ariaBusy: $,
|
|
155
155
|
ariaChecked: $,
|
|
156
|
-
ariaColCount:
|
|
157
|
-
ariaColIndex:
|
|
158
|
-
ariaColSpan:
|
|
156
|
+
ariaColCount: C,
|
|
157
|
+
ariaColIndex: C,
|
|
158
|
+
ariaColSpan: C,
|
|
159
159
|
ariaControls: I,
|
|
160
160
|
ariaCurrent: null,
|
|
161
161
|
ariaDescribedBy: I,
|
|
@@ -172,7 +172,7 @@ const $r = Ie({
|
|
|
172
172
|
ariaKeyShortcuts: null,
|
|
173
173
|
ariaLabel: null,
|
|
174
174
|
ariaLabelledBy: I,
|
|
175
|
-
ariaLevel:
|
|
175
|
+
ariaLevel: C,
|
|
176
176
|
ariaLive: null,
|
|
177
177
|
ariaModal: $,
|
|
178
178
|
ariaMultiLine: $,
|
|
@@ -180,21 +180,21 @@ const $r = Ie({
|
|
|
180
180
|
ariaOrientation: null,
|
|
181
181
|
ariaOwns: I,
|
|
182
182
|
ariaPlaceholder: null,
|
|
183
|
-
ariaPosInSet:
|
|
183
|
+
ariaPosInSet: C,
|
|
184
184
|
ariaPressed: $,
|
|
185
185
|
ariaReadOnly: $,
|
|
186
186
|
ariaRelevant: null,
|
|
187
187
|
ariaRequired: $,
|
|
188
188
|
ariaRoleDescription: I,
|
|
189
|
-
ariaRowCount:
|
|
190
|
-
ariaRowIndex:
|
|
191
|
-
ariaRowSpan:
|
|
189
|
+
ariaRowCount: C,
|
|
190
|
+
ariaRowIndex: C,
|
|
191
|
+
ariaRowSpan: C,
|
|
192
192
|
ariaSelected: $,
|
|
193
|
-
ariaSetSize:
|
|
193
|
+
ariaSetSize: C,
|
|
194
194
|
ariaSort: null,
|
|
195
|
-
ariaValueMax:
|
|
196
|
-
ariaValueMin:
|
|
197
|
-
ariaValueNow:
|
|
195
|
+
ariaValueMax: C,
|
|
196
|
+
ariaValueMin: C,
|
|
197
|
+
ariaValueNow: C,
|
|
198
198
|
ariaValueText: null,
|
|
199
199
|
role: null
|
|
200
200
|
},
|
|
@@ -240,13 +240,13 @@ const ys = Ie({
|
|
|
240
240
|
checked: x,
|
|
241
241
|
cite: null,
|
|
242
242
|
className: I,
|
|
243
|
-
cols:
|
|
243
|
+
cols: C,
|
|
244
244
|
colSpan: null,
|
|
245
245
|
content: null,
|
|
246
246
|
contentEditable: $,
|
|
247
247
|
controls: x,
|
|
248
248
|
controlsList: I,
|
|
249
|
-
coords:
|
|
249
|
+
coords: C | xe,
|
|
250
250
|
crossOrigin: null,
|
|
251
251
|
data: null,
|
|
252
252
|
dateTime: null,
|
|
@@ -268,9 +268,9 @@ const ys = Ie({
|
|
|
268
268
|
formNoValidate: x,
|
|
269
269
|
formTarget: null,
|
|
270
270
|
headers: I,
|
|
271
|
-
height:
|
|
271
|
+
height: C,
|
|
272
272
|
hidden: x,
|
|
273
|
-
high:
|
|
273
|
+
high: C,
|
|
274
274
|
href: null,
|
|
275
275
|
hrefLang: null,
|
|
276
276
|
htmlFor: I,
|
|
@@ -295,14 +295,14 @@ const ys = Ie({
|
|
|
295
295
|
list: null,
|
|
296
296
|
loading: null,
|
|
297
297
|
loop: x,
|
|
298
|
-
low:
|
|
298
|
+
low: C,
|
|
299
299
|
manifest: null,
|
|
300
300
|
max: null,
|
|
301
|
-
maxLength:
|
|
301
|
+
maxLength: C,
|
|
302
302
|
media: null,
|
|
303
303
|
method: null,
|
|
304
304
|
min: null,
|
|
305
|
-
minLength:
|
|
305
|
+
minLength: C,
|
|
306
306
|
multiple: x,
|
|
307
307
|
muted: x,
|
|
308
308
|
name: null,
|
|
@@ -398,7 +398,7 @@ const ys = Ie({
|
|
|
398
398
|
onWaiting: null,
|
|
399
399
|
onWheel: null,
|
|
400
400
|
open: x,
|
|
401
|
-
optimum:
|
|
401
|
+
optimum: C,
|
|
402
402
|
pattern: null,
|
|
403
403
|
ping: I,
|
|
404
404
|
placeholder: null,
|
|
@@ -413,8 +413,8 @@ const ys = Ie({
|
|
|
413
413
|
rel: I,
|
|
414
414
|
required: x,
|
|
415
415
|
reversed: x,
|
|
416
|
-
rows:
|
|
417
|
-
rowSpan:
|
|
416
|
+
rows: C,
|
|
417
|
+
rowSpan: C,
|
|
418
418
|
sandbox: I,
|
|
419
419
|
scope: null,
|
|
420
420
|
scoped: x,
|
|
@@ -424,19 +424,19 @@ const ys = Ie({
|
|
|
424
424
|
shadowRootDelegatesFocus: x,
|
|
425
425
|
shadowRootMode: null,
|
|
426
426
|
shape: null,
|
|
427
|
-
size:
|
|
427
|
+
size: C,
|
|
428
428
|
sizes: null,
|
|
429
429
|
slot: null,
|
|
430
|
-
span:
|
|
430
|
+
span: C,
|
|
431
431
|
spellCheck: $,
|
|
432
432
|
src: null,
|
|
433
433
|
srcDoc: null,
|
|
434
434
|
srcLang: null,
|
|
435
435
|
srcSet: null,
|
|
436
|
-
start:
|
|
436
|
+
start: C,
|
|
437
437
|
step: null,
|
|
438
438
|
style: null,
|
|
439
|
-
tabIndex:
|
|
439
|
+
tabIndex: C,
|
|
440
440
|
target: null,
|
|
441
441
|
title: null,
|
|
442
442
|
translate: null,
|
|
@@ -444,7 +444,7 @@ const ys = Ie({
|
|
|
444
444
|
typeMustMatch: x,
|
|
445
445
|
useMap: null,
|
|
446
446
|
value: $,
|
|
447
|
-
width:
|
|
447
|
+
width: C,
|
|
448
448
|
wrap: null,
|
|
449
449
|
writingSuggestions: null,
|
|
450
450
|
// Legacy.
|
|
@@ -461,11 +461,11 @@ const ys = Ie({
|
|
|
461
461
|
// `<body>`. Use CSS `background-image` instead
|
|
462
462
|
bgColor: null,
|
|
463
463
|
// `<body>` and table elements. Use CSS `background-color` instead
|
|
464
|
-
border:
|
|
464
|
+
border: C,
|
|
465
465
|
// `<table>`. Use CSS `border-width` instead,
|
|
466
466
|
borderColor: null,
|
|
467
467
|
// `<table>`. Use CSS `border-color` instead,
|
|
468
|
-
bottomMargin:
|
|
468
|
+
bottomMargin: C,
|
|
469
469
|
// `<body>`
|
|
470
470
|
cellPadding: null,
|
|
471
471
|
// `<table>`
|
|
@@ -499,9 +499,9 @@ const ys = Ie({
|
|
|
499
499
|
// `<table>`
|
|
500
500
|
frameBorder: null,
|
|
501
501
|
// `<iframe>`. Use CSS `border` instead
|
|
502
|
-
hSpace:
|
|
502
|
+
hSpace: C,
|
|
503
503
|
// `<img>` and `<object>`
|
|
504
|
-
leftMargin:
|
|
504
|
+
leftMargin: C,
|
|
505
505
|
// `<body>`
|
|
506
506
|
link: null,
|
|
507
507
|
// `<body>`. Use CSS `a:link {color: *}` instead
|
|
@@ -509,9 +509,9 @@ const ys = Ie({
|
|
|
509
509
|
// `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
|
|
510
510
|
lowSrc: null,
|
|
511
511
|
// `<img>`. Use a `<picture>`
|
|
512
|
-
marginHeight:
|
|
512
|
+
marginHeight: C,
|
|
513
513
|
// `<body>`
|
|
514
|
-
marginWidth:
|
|
514
|
+
marginWidth: C,
|
|
515
515
|
// `<body>`
|
|
516
516
|
noResize: x,
|
|
517
517
|
// `<frame>`
|
|
@@ -529,7 +529,7 @@ const ys = Ie({
|
|
|
529
529
|
// `<isindex>`
|
|
530
530
|
rev: null,
|
|
531
531
|
// `<link>`
|
|
532
|
-
rightMargin:
|
|
532
|
+
rightMargin: C,
|
|
533
533
|
// `<body>`
|
|
534
534
|
rules: null,
|
|
535
535
|
// `<table>`
|
|
@@ -543,7 +543,7 @@ const ys = Ie({
|
|
|
543
543
|
// `<table>`
|
|
544
544
|
text: null,
|
|
545
545
|
// `<body>`. Use CSS `color` instead
|
|
546
|
-
topMargin:
|
|
546
|
+
topMargin: C,
|
|
547
547
|
// `<body>`
|
|
548
548
|
valueType: null,
|
|
549
549
|
// `<param>`
|
|
@@ -553,7 +553,7 @@ const ys = Ie({
|
|
|
553
553
|
// Several. Use CSS `vertical-align` instead
|
|
554
554
|
vLink: null,
|
|
555
555
|
// `<body>`. Use CSS `a:visited {color}` instead
|
|
556
|
-
vSpace:
|
|
556
|
+
vSpace: C,
|
|
557
557
|
// `<img>` and `<object>`
|
|
558
558
|
// Non-standard Properties.
|
|
559
559
|
allowTransparency: null,
|
|
@@ -563,7 +563,7 @@ const ys = Ie({
|
|
|
563
563
|
disableRemotePlayback: x,
|
|
564
564
|
prefix: null,
|
|
565
565
|
property: null,
|
|
566
|
-
results:
|
|
566
|
+
results: C,
|
|
567
567
|
security: null,
|
|
568
568
|
unselectable: null
|
|
569
569
|
},
|
|
@@ -747,27 +747,27 @@ const ys = Ie({
|
|
|
747
747
|
},
|
|
748
748
|
properties: {
|
|
749
749
|
about: q,
|
|
750
|
-
accentHeight:
|
|
750
|
+
accentHeight: C,
|
|
751
751
|
accumulate: null,
|
|
752
752
|
additive: null,
|
|
753
753
|
alignmentBaseline: null,
|
|
754
|
-
alphabetic:
|
|
755
|
-
amplitude:
|
|
754
|
+
alphabetic: C,
|
|
755
|
+
amplitude: C,
|
|
756
756
|
arabicForm: null,
|
|
757
|
-
ascent:
|
|
757
|
+
ascent: C,
|
|
758
758
|
attributeName: null,
|
|
759
759
|
attributeType: null,
|
|
760
|
-
azimuth:
|
|
760
|
+
azimuth: C,
|
|
761
761
|
bandwidth: null,
|
|
762
762
|
baselineShift: null,
|
|
763
763
|
baseFrequency: null,
|
|
764
764
|
baseProfile: null,
|
|
765
765
|
bbox: null,
|
|
766
766
|
begin: null,
|
|
767
|
-
bias:
|
|
767
|
+
bias: C,
|
|
768
768
|
by: null,
|
|
769
769
|
calcMode: null,
|
|
770
|
-
capHeight:
|
|
770
|
+
capHeight: C,
|
|
771
771
|
className: I,
|
|
772
772
|
clip: null,
|
|
773
773
|
clipPath: null,
|
|
@@ -788,26 +788,26 @@ const ys = Ie({
|
|
|
788
788
|
d: null,
|
|
789
789
|
dataType: null,
|
|
790
790
|
defaultAction: null,
|
|
791
|
-
descent:
|
|
792
|
-
diffuseConstant:
|
|
791
|
+
descent: C,
|
|
792
|
+
diffuseConstant: C,
|
|
793
793
|
direction: null,
|
|
794
794
|
display: null,
|
|
795
795
|
dur: null,
|
|
796
|
-
divisor:
|
|
796
|
+
divisor: C,
|
|
797
797
|
dominantBaseline: null,
|
|
798
798
|
download: x,
|
|
799
799
|
dx: null,
|
|
800
800
|
dy: null,
|
|
801
801
|
edgeMode: null,
|
|
802
802
|
editable: null,
|
|
803
|
-
elevation:
|
|
803
|
+
elevation: C,
|
|
804
804
|
enableBackground: null,
|
|
805
805
|
end: null,
|
|
806
806
|
event: null,
|
|
807
|
-
exponent:
|
|
807
|
+
exponent: C,
|
|
808
808
|
externalResourcesRequired: null,
|
|
809
809
|
fill: null,
|
|
810
|
-
fillOpacity:
|
|
810
|
+
fillOpacity: C,
|
|
811
811
|
fillRule: null,
|
|
812
812
|
filter: null,
|
|
813
813
|
filterRes: null,
|
|
@@ -837,27 +837,27 @@ const ys = Ie({
|
|
|
837
837
|
gradientTransform: null,
|
|
838
838
|
gradientUnits: null,
|
|
839
839
|
handler: null,
|
|
840
|
-
hanging:
|
|
840
|
+
hanging: C,
|
|
841
841
|
hatchContentUnits: null,
|
|
842
842
|
hatchUnits: null,
|
|
843
843
|
height: null,
|
|
844
844
|
href: null,
|
|
845
845
|
hrefLang: null,
|
|
846
|
-
horizAdvX:
|
|
847
|
-
horizOriginX:
|
|
848
|
-
horizOriginY:
|
|
846
|
+
horizAdvX: C,
|
|
847
|
+
horizOriginX: C,
|
|
848
|
+
horizOriginY: C,
|
|
849
849
|
id: null,
|
|
850
|
-
ideographic:
|
|
850
|
+
ideographic: C,
|
|
851
851
|
imageRendering: null,
|
|
852
852
|
initialVisibility: null,
|
|
853
853
|
in: null,
|
|
854
854
|
in2: null,
|
|
855
|
-
intercept:
|
|
856
|
-
k:
|
|
857
|
-
k1:
|
|
858
|
-
k2:
|
|
859
|
-
k3:
|
|
860
|
-
k4:
|
|
855
|
+
intercept: C,
|
|
856
|
+
k: C,
|
|
857
|
+
k1: C,
|
|
858
|
+
k2: C,
|
|
859
|
+
k3: C,
|
|
860
|
+
k4: C,
|
|
861
861
|
kernelMatrix: q,
|
|
862
862
|
kernelUnitLength: null,
|
|
863
863
|
keyPoints: null,
|
|
@@ -871,7 +871,7 @@ const ys = Ie({
|
|
|
871
871
|
lengthAdjust: null,
|
|
872
872
|
letterSpacing: null,
|
|
873
873
|
lightingColor: null,
|
|
874
|
-
limitingConeAngle:
|
|
874
|
+
limitingConeAngle: C,
|
|
875
875
|
local: null,
|
|
876
876
|
markerEnd: null,
|
|
877
877
|
markerMid: null,
|
|
@@ -887,7 +887,7 @@ const ys = Ie({
|
|
|
887
887
|
media: null,
|
|
888
888
|
mediaCharacterEncoding: null,
|
|
889
889
|
mediaContentEncodings: null,
|
|
890
|
-
mediaSize:
|
|
890
|
+
mediaSize: C,
|
|
891
891
|
mediaTime: null,
|
|
892
892
|
method: null,
|
|
893
893
|
min: null,
|
|
@@ -993,12 +993,12 @@ const ys = Ie({
|
|
|
993
993
|
origin: null,
|
|
994
994
|
overflow: null,
|
|
995
995
|
overlay: null,
|
|
996
|
-
overlinePosition:
|
|
997
|
-
overlineThickness:
|
|
996
|
+
overlinePosition: C,
|
|
997
|
+
overlineThickness: C,
|
|
998
998
|
paintOrder: null,
|
|
999
999
|
panose1: null,
|
|
1000
1000
|
path: null,
|
|
1001
|
-
pathLength:
|
|
1001
|
+
pathLength: C,
|
|
1002
1002
|
patternContentUnits: null,
|
|
1003
1003
|
patternTransform: null,
|
|
1004
1004
|
patternUnits: null,
|
|
@@ -1008,9 +1008,9 @@ const ys = Ie({
|
|
|
1008
1008
|
playbackOrder: null,
|
|
1009
1009
|
pointerEvents: null,
|
|
1010
1010
|
points: null,
|
|
1011
|
-
pointsAtX:
|
|
1012
|
-
pointsAtY:
|
|
1013
|
-
pointsAtZ:
|
|
1011
|
+
pointsAtX: C,
|
|
1012
|
+
pointsAtY: C,
|
|
1013
|
+
pointsAtZ: C,
|
|
1014
1014
|
preserveAlpha: null,
|
|
1015
1015
|
preserveAspectRatio: null,
|
|
1016
1016
|
primitiveUnits: null,
|
|
@@ -1042,8 +1042,8 @@ const ys = Ie({
|
|
|
1042
1042
|
side: null,
|
|
1043
1043
|
slope: null,
|
|
1044
1044
|
snapshotTime: null,
|
|
1045
|
-
specularConstant:
|
|
1046
|
-
specularExponent:
|
|
1045
|
+
specularConstant: C,
|
|
1046
|
+
specularExponent: C,
|
|
1047
1047
|
spreadMethod: null,
|
|
1048
1048
|
spacing: null,
|
|
1049
1049
|
startOffset: null,
|
|
@@ -1053,30 +1053,30 @@ const ys = Ie({
|
|
|
1053
1053
|
stitchTiles: null,
|
|
1054
1054
|
stopColor: null,
|
|
1055
1055
|
stopOpacity: null,
|
|
1056
|
-
strikethroughPosition:
|
|
1057
|
-
strikethroughThickness:
|
|
1056
|
+
strikethroughPosition: C,
|
|
1057
|
+
strikethroughThickness: C,
|
|
1058
1058
|
string: null,
|
|
1059
1059
|
stroke: null,
|
|
1060
1060
|
strokeDashArray: q,
|
|
1061
1061
|
strokeDashOffset: null,
|
|
1062
1062
|
strokeLineCap: null,
|
|
1063
1063
|
strokeLineJoin: null,
|
|
1064
|
-
strokeMiterLimit:
|
|
1065
|
-
strokeOpacity:
|
|
1064
|
+
strokeMiterLimit: C,
|
|
1065
|
+
strokeOpacity: C,
|
|
1066
1066
|
strokeWidth: null,
|
|
1067
1067
|
style: null,
|
|
1068
|
-
surfaceScale:
|
|
1068
|
+
surfaceScale: C,
|
|
1069
1069
|
syncBehavior: null,
|
|
1070
1070
|
syncBehaviorDefault: null,
|
|
1071
1071
|
syncMaster: null,
|
|
1072
1072
|
syncTolerance: null,
|
|
1073
1073
|
syncToleranceDefault: null,
|
|
1074
1074
|
systemLanguage: q,
|
|
1075
|
-
tabIndex:
|
|
1075
|
+
tabIndex: C,
|
|
1076
1076
|
tableValues: null,
|
|
1077
1077
|
target: null,
|
|
1078
|
-
targetX:
|
|
1079
|
-
targetY:
|
|
1078
|
+
targetX: C,
|
|
1079
|
+
targetY: C,
|
|
1080
1080
|
textAnchor: null,
|
|
1081
1081
|
textDecoration: null,
|
|
1082
1082
|
textRendering: null,
|
|
@@ -1091,22 +1091,22 @@ const ys = Ie({
|
|
|
1091
1091
|
transformOrigin: null,
|
|
1092
1092
|
u1: null,
|
|
1093
1093
|
u2: null,
|
|
1094
|
-
underlinePosition:
|
|
1095
|
-
underlineThickness:
|
|
1094
|
+
underlinePosition: C,
|
|
1095
|
+
underlineThickness: C,
|
|
1096
1096
|
unicode: null,
|
|
1097
1097
|
unicodeBidi: null,
|
|
1098
1098
|
unicodeRange: null,
|
|
1099
|
-
unitsPerEm:
|
|
1099
|
+
unitsPerEm: C,
|
|
1100
1100
|
values: null,
|
|
1101
|
-
vAlphabetic:
|
|
1102
|
-
vMathematical:
|
|
1101
|
+
vAlphabetic: C,
|
|
1102
|
+
vMathematical: C,
|
|
1103
1103
|
vectorEffect: null,
|
|
1104
|
-
vHanging:
|
|
1105
|
-
vIdeographic:
|
|
1104
|
+
vHanging: C,
|
|
1105
|
+
vIdeographic: C,
|
|
1106
1106
|
version: null,
|
|
1107
|
-
vertAdvY:
|
|
1108
|
-
vertOriginX:
|
|
1109
|
-
vertOriginY:
|
|
1107
|
+
vertAdvY: C,
|
|
1108
|
+
vertOriginX: C,
|
|
1109
|
+
vertOriginY: C,
|
|
1110
1110
|
viewBox: null,
|
|
1111
1111
|
viewTarget: null,
|
|
1112
1112
|
visibility: null,
|
|
@@ -1118,7 +1118,7 @@ const ys = Ie({
|
|
|
1118
1118
|
x1: null,
|
|
1119
1119
|
x2: null,
|
|
1120
1120
|
xChannelSelector: null,
|
|
1121
|
-
xHeight:
|
|
1121
|
+
xHeight: C,
|
|
1122
1122
|
y: null,
|
|
1123
1123
|
y1: null,
|
|
1124
1124
|
y2: null,
|
|
@@ -1153,7 +1153,7 @@ const ys = Ie({
|
|
|
1153
1153
|
transform(t, e) {
|
|
1154
1154
|
return "xml:" + e.slice(3).toLowerCase();
|
|
1155
1155
|
}
|
|
1156
|
-
}),
|
|
1156
|
+
}), Cs = {
|
|
1157
1157
|
classId: "classID",
|
|
1158
1158
|
dataType: "datatype",
|
|
1159
1159
|
itemId: "itemID",
|
|
@@ -1171,7 +1171,7 @@ const ys = Ie({
|
|
|
1171
1171
|
xLinkTitle: "xlinkTitle",
|
|
1172
1172
|
xLinkType: "xlinkType",
|
|
1173
1173
|
xmlnsXLink: "xmlnsXlink"
|
|
1174
|
-
},
|
|
1174
|
+
}, ws = /[A-Z]/g, Pn = /-[a-z]/g, _s = /^data[-\w.:]+$/i;
|
|
1175
1175
|
function Ss(t, e) {
|
|
1176
1176
|
const n = zt(e);
|
|
1177
1177
|
let r = e, o = W;
|
|
@@ -1184,7 +1184,7 @@ function Ss(t, e) {
|
|
|
1184
1184
|
} else {
|
|
1185
1185
|
const s = e.slice(4);
|
|
1186
1186
|
if (!Pn.test(s)) {
|
|
1187
|
-
let a = s.replace(
|
|
1187
|
+
let a = s.replace(ws, ks);
|
|
1188
1188
|
a.charAt(0) !== "-" && (a = "-" + a), e = "data" + a;
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
@@ -1198,53 +1198,53 @@ function ks(t) {
|
|
|
1198
1198
|
function vs(t) {
|
|
1199
1199
|
return t.charAt(1).toUpperCase();
|
|
1200
1200
|
}
|
|
1201
|
-
const xs = Lr([$r, ys, Or, Dr, Gr], "html"),
|
|
1202
|
-
function
|
|
1201
|
+
const xs = Lr([$r, ys, Or, Dr, Gr], "html"), pn = Lr([$r, bs, Or, Dr, Gr], "svg");
|
|
1202
|
+
function hh(t) {
|
|
1203
1203
|
const e = String(t || "").trim();
|
|
1204
1204
|
return e ? e.split(/[ \t\n\r\f]+/g) : [];
|
|
1205
1205
|
}
|
|
1206
1206
|
function Fr(t) {
|
|
1207
1207
|
return t.join(" ").trim();
|
|
1208
1208
|
}
|
|
1209
|
-
var
|
|
1209
|
+
var Ce = {}, Rt, $n;
|
|
1210
1210
|
function Es() {
|
|
1211
1211
|
if ($n) return Rt;
|
|
1212
1212
|
$n = 1;
|
|
1213
1213
|
var t = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, e = /\n/g, n = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, o = /^:\s*/, s = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, a = /^[;\s]*/, i = /^\s+|\s+$/g, l = `
|
|
1214
1214
|
`, u = "/", c = "*", h = "", p = "comment", d = "declaration";
|
|
1215
|
-
Rt = function(
|
|
1216
|
-
if (typeof
|
|
1215
|
+
Rt = function(m, b) {
|
|
1216
|
+
if (typeof m != "string")
|
|
1217
1217
|
throw new TypeError("First argument must be a string");
|
|
1218
|
-
if (!
|
|
1219
|
-
|
|
1220
|
-
var y = 1,
|
|
1218
|
+
if (!m) return [];
|
|
1219
|
+
b = b || {};
|
|
1220
|
+
var y = 1, g = 1;
|
|
1221
1221
|
function _(R) {
|
|
1222
1222
|
var k = R.match(e);
|
|
1223
1223
|
k && (y += k.length);
|
|
1224
1224
|
var G = R.lastIndexOf(l);
|
|
1225
|
-
|
|
1225
|
+
g = ~G ? R.length - G : g + R.length;
|
|
1226
1226
|
}
|
|
1227
1227
|
function S() {
|
|
1228
|
-
var R = { line: y, column:
|
|
1228
|
+
var R = { line: y, column: g };
|
|
1229
1229
|
return function(k) {
|
|
1230
1230
|
return k.position = new A(R), j(), k;
|
|
1231
1231
|
};
|
|
1232
1232
|
}
|
|
1233
1233
|
function A(R) {
|
|
1234
|
-
this.start = R, this.end = { line: y, column:
|
|
1234
|
+
this.start = R, this.end = { line: y, column: g }, this.source = b.source;
|
|
1235
1235
|
}
|
|
1236
|
-
A.prototype.content =
|
|
1236
|
+
A.prototype.content = m;
|
|
1237
1237
|
function D(R) {
|
|
1238
1238
|
var k = new Error(
|
|
1239
|
-
|
|
1239
|
+
b.source + ":" + y + ":" + g + ": " + R
|
|
1240
1240
|
);
|
|
1241
|
-
if (k.reason = R, k.filename =
|
|
1241
|
+
if (k.reason = R, k.filename = b.source, k.line = y, k.column = g, k.source = m, !b.silent) throw k;
|
|
1242
1242
|
}
|
|
1243
1243
|
function L(R) {
|
|
1244
|
-
var k = R.exec(
|
|
1244
|
+
var k = R.exec(m);
|
|
1245
1245
|
if (k) {
|
|
1246
1246
|
var G = k[0];
|
|
1247
|
-
return _(G),
|
|
1247
|
+
return _(G), m = m.slice(G.length), k;
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
1250
|
function j() {
|
|
@@ -1258,13 +1258,13 @@ function Es() {
|
|
|
1258
1258
|
}
|
|
1259
1259
|
function ee() {
|
|
1260
1260
|
var R = S();
|
|
1261
|
-
if (!(u !=
|
|
1262
|
-
for (var k = 2; h !=
|
|
1261
|
+
if (!(u != m.charAt(0) || c != m.charAt(1))) {
|
|
1262
|
+
for (var k = 2; h != m.charAt(k) && (c != m.charAt(k) || u != m.charAt(k + 1)); )
|
|
1263
1263
|
++k;
|
|
1264
|
-
if (k += 2, h ===
|
|
1264
|
+
if (k += 2, h === m.charAt(k - 1))
|
|
1265
1265
|
return D("End of comment missing");
|
|
1266
|
-
var G =
|
|
1267
|
-
return
|
|
1266
|
+
var G = m.slice(2, k - 2);
|
|
1267
|
+
return g += 2, _(G), m = m.slice(k), g += 2, R({
|
|
1268
1268
|
type: p,
|
|
1269
1269
|
comment: G
|
|
1270
1270
|
});
|
|
@@ -1291,19 +1291,19 @@ function Es() {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
return j(), te();
|
|
1293
1293
|
};
|
|
1294
|
-
function f(
|
|
1295
|
-
return
|
|
1294
|
+
function f(m) {
|
|
1295
|
+
return m ? m.replace(i, h) : h;
|
|
1296
1296
|
}
|
|
1297
1297
|
return Rt;
|
|
1298
1298
|
}
|
|
1299
1299
|
var Tn;
|
|
1300
1300
|
function As() {
|
|
1301
|
-
if (Tn) return
|
|
1301
|
+
if (Tn) return Ce;
|
|
1302
1302
|
Tn = 1;
|
|
1303
|
-
var t =
|
|
1303
|
+
var t = Ce && Ce.__importDefault || function(r) {
|
|
1304
1304
|
return r && r.__esModule ? r : { default: r };
|
|
1305
1305
|
};
|
|
1306
|
-
Object.defineProperty(
|
|
1306
|
+
Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.default = n;
|
|
1307
1307
|
var e = t(Es());
|
|
1308
1308
|
function n(r, o) {
|
|
1309
1309
|
var s = null;
|
|
@@ -1317,7 +1317,7 @@ function As() {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
}), s;
|
|
1319
1319
|
}
|
|
1320
|
-
return
|
|
1320
|
+
return Ce;
|
|
1321
1321
|
}
|
|
1322
1322
|
var Me = {}, Mn;
|
|
1323
1323
|
function Rs() {
|
|
@@ -1363,7 +1363,7 @@ function jr(t) {
|
|
|
1363
1363
|
};
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1366
|
+
function ph(t) {
|
|
1367
1367
|
const e = Br(t), n = Ps(t);
|
|
1368
1368
|
if (e && n)
|
|
1369
1369
|
return { start: e, end: n };
|
|
@@ -1467,7 +1467,7 @@ H.prototype.fatal = void 0;
|
|
|
1467
1467
|
H.prototype.place = void 0;
|
|
1468
1468
|
H.prototype.ruleId = void 0;
|
|
1469
1469
|
H.prototype.source = void 0;
|
|
1470
|
-
const
|
|
1470
|
+
const fn = {}.hasOwnProperty, Ts = /* @__PURE__ */ new Map(), Ms = /[A-Z]/g, Os = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Ds = /* @__PURE__ */ new Set(["td", "th"]), Ur = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
|
|
1471
1471
|
function Gs(t, e) {
|
|
1472
1472
|
if (!e || e.Fragment === void 0)
|
|
1473
1473
|
throw new TypeError("Expected `Fragment` in options");
|
|
@@ -1497,7 +1497,7 @@ function Gs(t, e) {
|
|
|
1497
1497
|
ignoreInvalidStyle: e.ignoreInvalidStyle || !1,
|
|
1498
1498
|
passKeys: e.passKeys !== !1,
|
|
1499
1499
|
passNode: e.passNode || !1,
|
|
1500
|
-
schema: e.space === "svg" ?
|
|
1500
|
+
schema: e.space === "svg" ? pn : xs,
|
|
1501
1501
|
stylePropertyNameCase: e.stylePropertyNameCase || "dom",
|
|
1502
1502
|
tableCellAlignToStyle: e.tableCellAlignToStyle !== !1
|
|
1503
1503
|
}, s = zr(o, t, void 0);
|
|
@@ -1525,11 +1525,11 @@ function zr(t, e, n) {
|
|
|
1525
1525
|
function Fs(t, e, n) {
|
|
1526
1526
|
const r = t.schema;
|
|
1527
1527
|
let o = r;
|
|
1528
|
-
e.tagName.toLowerCase() === "svg" && r.space === "html" && (o =
|
|
1528
|
+
e.tagName.toLowerCase() === "svg" && r.space === "html" && (o = pn, t.schema = o), t.ancestors.push(e);
|
|
1529
1529
|
const s = Wr(t, e.tagName, !1), a = qs(t, e);
|
|
1530
1530
|
let i = gn(t, e);
|
|
1531
1531
|
return Os.has(e.tagName) && (i = i.filter(function(l) {
|
|
1532
|
-
return typeof l == "string" ? !
|
|
1532
|
+
return typeof l == "string" ? !wt(l) : !0;
|
|
1533
1533
|
})), Hr(t, a, s, e), dn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
|
|
1534
1534
|
}
|
|
1535
1535
|
function Bs(t, e) {
|
|
@@ -1551,7 +1551,7 @@ function js(t, e) {
|
|
|
1551
1551
|
function Us(t, e, n) {
|
|
1552
1552
|
const r = t.schema;
|
|
1553
1553
|
let o = r;
|
|
1554
|
-
e.name === "svg" && r.space === "html" && (o =
|
|
1554
|
+
e.name === "svg" && r.space === "html" && (o = pn, t.schema = o), t.ancestors.push(e);
|
|
1555
1555
|
const s = e.name === null ? t.Fragment : Wr(t, e.name, !0), a = Xs(t, e), i = gn(t, e);
|
|
1556
1556
|
return Hr(t, a, s, e), dn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
|
|
1557
1557
|
}
|
|
@@ -1600,7 +1600,7 @@ function qs(t, e) {
|
|
|
1600
1600
|
const n = {};
|
|
1601
1601
|
let r, o;
|
|
1602
1602
|
for (o in e.properties)
|
|
1603
|
-
if (o !== "children" &&
|
|
1603
|
+
if (o !== "children" && fn.call(e.properties, o)) {
|
|
1604
1604
|
const s = Ks(t, o, e.properties[o]);
|
|
1605
1605
|
if (s) {
|
|
1606
1606
|
const [a, i] = s;
|
|
@@ -1675,7 +1675,7 @@ function Ks(t, e, n) {
|
|
|
1675
1675
|
return t.stylePropertyNameCase === "css" && (o = Js(o)), ["style", o];
|
|
1676
1676
|
}
|
|
1677
1677
|
return [
|
|
1678
|
-
t.elementAttributeNameCase === "react" && r.space ?
|
|
1678
|
+
t.elementAttributeNameCase === "react" && r.space ? Cs[r.property] || r.property : r.attribute,
|
|
1679
1679
|
n
|
|
1680
1680
|
];
|
|
1681
1681
|
}
|
|
@@ -1723,7 +1723,7 @@ function Wr(t, e, n) {
|
|
|
1723
1723
|
/** @type {string | number} */
|
|
1724
1724
|
r.value
|
|
1725
1725
|
);
|
|
1726
|
-
return
|
|
1726
|
+
return fn.call(t.components, o) ? t.components[o] : o;
|
|
1727
1727
|
}
|
|
1728
1728
|
if (t.evaluater)
|
|
1729
1729
|
return t.evaluater.evaluateExpression(r);
|
|
@@ -1745,7 +1745,7 @@ function Js(t) {
|
|
|
1745
1745
|
const e = {};
|
|
1746
1746
|
let n;
|
|
1747
1747
|
for (n in t)
|
|
1748
|
-
|
|
1748
|
+
fn.call(t, n) && (e[Zs(n)] = t[n]);
|
|
1749
1749
|
return e;
|
|
1750
1750
|
}
|
|
1751
1751
|
function Zs(t) {
|
|
@@ -1861,7 +1861,7 @@ function ia(t, e, n, r) {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
return p;
|
|
1863
1863
|
function p() {
|
|
1864
|
-
let d = qr, f,
|
|
1864
|
+
let d = qr, f, m, b;
|
|
1865
1865
|
if ((!e || s(l, u, c[c.length - 1] || void 0)) && (d = la(n(l, c)), d[0] === Fn))
|
|
1866
1866
|
return d;
|
|
1867
1867
|
if ("children" in l && l.children) {
|
|
@@ -1870,11 +1870,11 @@ function ia(t, e, n, r) {
|
|
|
1870
1870
|
l
|
|
1871
1871
|
);
|
|
1872
1872
|
if (y.children && d[0] !== aa)
|
|
1873
|
-
for (
|
|
1874
|
-
const
|
|
1875
|
-
if (f = i(
|
|
1873
|
+
for (m = (r ? y.children.length : -1) + a, b = c.concat(y); m > -1 && m < y.children.length; ) {
|
|
1874
|
+
const g = y.children[m];
|
|
1875
|
+
if (f = i(g, m, b)(), f[0] === Fn)
|
|
1876
1876
|
return f;
|
|
1877
|
-
|
|
1877
|
+
m = typeof f[1] == "number" ? f[1] : m + a;
|
|
1878
1878
|
}
|
|
1879
1879
|
}
|
|
1880
1880
|
return d;
|
|
@@ -1947,15 +1947,15 @@ function ha(t) {
|
|
|
1947
1947
|
return mn(t);
|
|
1948
1948
|
}
|
|
1949
1949
|
function mn(t) {
|
|
1950
|
-
return Array.isArray(t) ?
|
|
1950
|
+
return Array.isArray(t) ? pa(t) : t instanceof RegExp ? t : typeof t == "object" ? fa(t) : t;
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1952
|
+
function pa(t) {
|
|
1953
1953
|
let e = [];
|
|
1954
1954
|
for (let n = 0, r = t.length; n < r; n++)
|
|
1955
1955
|
e[n] = mn(t[n]);
|
|
1956
1956
|
return e;
|
|
1957
1957
|
}
|
|
1958
|
-
function
|
|
1958
|
+
function fa(t) {
|
|
1959
1959
|
let e = {};
|
|
1960
1960
|
for (let n in t)
|
|
1961
1961
|
e[n] = mn(t[n]);
|
|
@@ -2172,10 +2172,10 @@ function ma(t) {
|
|
|
2172
2172
|
let c = null;
|
|
2173
2173
|
typeof a.settings.background == "string" && Un(a.settings.background) && (c = a.settings.background);
|
|
2174
2174
|
for (let h = 0, p = i.length; h < p; h++) {
|
|
2175
|
-
let f = i[h].trim().split(" "),
|
|
2176
|
-
f.length > 1 && (
|
|
2177
|
-
|
|
2178
|
-
|
|
2175
|
+
let f = i[h].trim().split(" "), m = f[f.length - 1], b = null;
|
|
2176
|
+
f.length > 1 && (b = f.slice(0, f.length - 1), b.reverse()), n[r++] = new ya(
|
|
2177
|
+
m,
|
|
2178
|
+
b,
|
|
2179
2179
|
o,
|
|
2180
2180
|
l,
|
|
2181
2181
|
u,
|
|
@@ -2200,14 +2200,14 @@ function ba(t, e) {
|
|
|
2200
2200
|
let l = t.shift();
|
|
2201
2201
|
l.fontStyle !== -1 && (n = l.fontStyle), l.foreground !== null && (r = l.foreground), l.background !== null && (o = l.background);
|
|
2202
2202
|
}
|
|
2203
|
-
let s = new
|
|
2203
|
+
let s = new Ca(e), a = new to(n, s.getId(r), s.getId(o)), i = new _a(new Vt(0, null, -1, 0, 0), []);
|
|
2204
2204
|
for (let l = 0, u = t.length; l < u; l++) {
|
|
2205
2205
|
let c = t[l];
|
|
2206
2206
|
i.insert(0, c.scope, c.parentScopes, c.fontStyle, s.getId(c.foreground), s.getId(c.background));
|
|
2207
2207
|
}
|
|
2208
2208
|
return new it(s, a, i);
|
|
2209
2209
|
}
|
|
2210
|
-
var
|
|
2210
|
+
var Ca = class {
|
|
2211
2211
|
_isFrozen;
|
|
2212
2212
|
_lastColorId;
|
|
2213
2213
|
_id2color;
|
|
@@ -2234,14 +2234,14 @@ var wa = class {
|
|
|
2234
2234
|
getColorMap() {
|
|
2235
2235
|
return this._id2color.slice(0);
|
|
2236
2236
|
}
|
|
2237
|
-
},
|
|
2237
|
+
}, wa = Object.freeze([]), Vt = class no {
|
|
2238
2238
|
scopeDepth;
|
|
2239
2239
|
parentScopes;
|
|
2240
2240
|
fontStyle;
|
|
2241
2241
|
foreground;
|
|
2242
2242
|
background;
|
|
2243
2243
|
constructor(e, n, r, o, s) {
|
|
2244
|
-
this.scopeDepth = e, this.parentScopes = n ||
|
|
2244
|
+
this.scopeDepth = e, this.parentScopes = n || wa, this.fontStyle = r, this.foreground = o, this.background = s;
|
|
2245
2245
|
}
|
|
2246
2246
|
clone() {
|
|
2247
2247
|
return new no(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
|
|
@@ -3101,8 +3101,8 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3101
3101
|
s.produce(o, l), u = !0;
|
|
3102
3102
|
return;
|
|
3103
3103
|
}
|
|
3104
|
-
const f = d.captureIndices,
|
|
3105
|
-
if (
|
|
3104
|
+
const f = d.captureIndices, m = d.matchedRuleId, b = f && f.length > 0 ? f[0].end > r : !1;
|
|
3105
|
+
if (m === $a) {
|
|
3106
3106
|
const y = o.getRule(t);
|
|
3107
3107
|
s.produce(o, f[0].start), o = o.withContentNameScopesList(o.nameScopesList), Ge(
|
|
3108
3108
|
t,
|
|
@@ -3113,20 +3113,20 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3113
3113
|
y.endCaptures,
|
|
3114
3114
|
f
|
|
3115
3115
|
), s.produce(o, f[0].end);
|
|
3116
|
-
const
|
|
3117
|
-
if (o = o.parent, c =
|
|
3118
|
-
o =
|
|
3116
|
+
const g = o;
|
|
3117
|
+
if (o = o.parent, c = g.getAnchorPos(), !b && g.getEnterPos() === r) {
|
|
3118
|
+
o = g, s.produce(o, l), u = !0;
|
|
3119
3119
|
return;
|
|
3120
3120
|
}
|
|
3121
3121
|
} else {
|
|
3122
|
-
const y = t.getRule(
|
|
3122
|
+
const y = t.getRule(m);
|
|
3123
3123
|
s.produce(o, f[0].start);
|
|
3124
|
-
const
|
|
3124
|
+
const g = o, _ = y.getName(e.content, f), S = o.contentNameScopesList.pushAttributed(
|
|
3125
3125
|
_,
|
|
3126
3126
|
t
|
|
3127
3127
|
);
|
|
3128
3128
|
if (o = o.push(
|
|
3129
|
-
|
|
3129
|
+
m,
|
|
3130
3130
|
r,
|
|
3131
3131
|
c,
|
|
3132
3132
|
f[0].end === l,
|
|
@@ -3156,7 +3156,7 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3156
3156
|
e.content,
|
|
3157
3157
|
f
|
|
3158
3158
|
)
|
|
3159
|
-
)), !
|
|
3159
|
+
)), !b && g.hasSameRuleAs(o)) {
|
|
3160
3160
|
o = o.pop(), s.produce(o, l), u = !0;
|
|
3161
3161
|
return;
|
|
3162
3162
|
}
|
|
@@ -3183,7 +3183,7 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3183
3183
|
e.content,
|
|
3184
3184
|
f
|
|
3185
3185
|
)
|
|
3186
|
-
)), !
|
|
3186
|
+
)), !b && g.hasSameRuleAs(o)) {
|
|
3187
3187
|
o = o.pop(), s.produce(o, l), u = !0;
|
|
3188
3188
|
return;
|
|
3189
3189
|
}
|
|
@@ -3195,7 +3195,7 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3195
3195
|
s,
|
|
3196
3196
|
y.captures,
|
|
3197
3197
|
f
|
|
3198
|
-
), s.produce(o, f[0].end), o = o.pop(), !
|
|
3198
|
+
), s.produce(o, f[0].end), o = o.pop(), !b) {
|
|
3199
3199
|
o = o.safePop(), s.produce(o, l), u = !0;
|
|
3200
3200
|
return;
|
|
3201
3201
|
}
|
|
@@ -3254,11 +3254,11 @@ function ja(t, e, n, r, o, s, a) {
|
|
|
3254
3254
|
const f = t[p];
|
|
3255
3255
|
if (!f.matcher(h))
|
|
3256
3256
|
continue;
|
|
3257
|
-
const
|
|
3258
|
-
if (!
|
|
3257
|
+
const m = e.getRule(f.ruleId), { ruleScanner: b, findOptions: y } = uo(m, e, null, r, o === a), g = b.findNextMatchSync(n, o, y);
|
|
3258
|
+
if (!g)
|
|
3259
3259
|
continue;
|
|
3260
|
-
const _ =
|
|
3261
|
-
if (!(_ >= i) && (i = _, l =
|
|
3260
|
+
const _ = g.captureIndices[0].start;
|
|
3261
|
+
if (!(_ >= i) && (i = _, l = g.captureIndices, u = g.ruleId, c = f.priority, i === o))
|
|
3262
3262
|
break;
|
|
3263
3263
|
}
|
|
3264
3264
|
return l ? {
|
|
@@ -3297,7 +3297,7 @@ function Ge(t, e, n, r, o, s, a) {
|
|
|
3297
3297
|
for (; u.length > 0 && u[u.length - 1].endPos <= d.start; )
|
|
3298
3298
|
o.produceFromScopes(u[u.length - 1].scopes, u[u.length - 1].endPos), u.pop();
|
|
3299
3299
|
if (u.length > 0 ? o.produceFromScopes(u[u.length - 1].scopes, d.start) : o.produce(r, d.start), p.retokenizeCapturedWithRuleId) {
|
|
3300
|
-
const
|
|
3300
|
+
const m = p.getName(i, a), b = r.contentNameScopesList.pushAttributed(m, t), y = p.getContentName(i, a), g = b.pushAttributed(y, t), _ = r.push(p.retokenizeCapturedWithRuleId, d.start, -1, !1, null, b, g), S = t.createOnigString(i.substring(0, d.end));
|
|
3301
3301
|
lo(
|
|
3302
3302
|
t,
|
|
3303
3303
|
S,
|
|
@@ -3313,8 +3313,8 @@ function Ge(t, e, n, r, o, s, a) {
|
|
|
3313
3313
|
}
|
|
3314
3314
|
const f = p.getName(i, a);
|
|
3315
3315
|
if (f !== null) {
|
|
3316
|
-
const
|
|
3317
|
-
u.push(new za(
|
|
3316
|
+
const b = (u.length > 0 ? u[u.length - 1].scopes : r.contentNameScopesList).pushAttributed(f, t);
|
|
3317
|
+
u.push(new za(b, d.end));
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
3320
|
for (; u.length > 0; )
|
|
@@ -3644,7 +3644,7 @@ var Fe = class ne {
|
|
|
3644
3644
|
}), r = r.parent;
|
|
3645
3645
|
return r === e ? n.reverse() : void 0;
|
|
3646
3646
|
}
|
|
3647
|
-
}, Jt = class
|
|
3647
|
+
}, Jt = class pe {
|
|
3648
3648
|
/**
|
|
3649
3649
|
* Invariant:
|
|
3650
3650
|
* ```
|
|
@@ -3661,7 +3661,7 @@ var Fe = class ne {
|
|
|
3661
3661
|
}
|
|
3662
3662
|
_stackElementBrand = void 0;
|
|
3663
3663
|
// TODO remove me
|
|
3664
|
-
static NULL = new
|
|
3664
|
+
static NULL = new pe(
|
|
3665
3665
|
null,
|
|
3666
3666
|
0,
|
|
3667
3667
|
0,
|
|
@@ -3688,7 +3688,7 @@ var Fe = class ne {
|
|
|
3688
3688
|
*/
|
|
3689
3689
|
depth;
|
|
3690
3690
|
equals(e) {
|
|
3691
|
-
return e === null ? !1 :
|
|
3691
|
+
return e === null ? !1 : pe._equals(this, e);
|
|
3692
3692
|
}
|
|
3693
3693
|
static _equals(e, n) {
|
|
3694
3694
|
return e === n ? !0 : this._structuralEquals(e, n) ? Fe.equals(e.contentNameScopesList, n.contentNameScopesList) : !1;
|
|
@@ -3713,7 +3713,7 @@ var Fe = class ne {
|
|
|
3713
3713
|
e._enterPos = -1, e._anchorPos = -1, e = e.parent;
|
|
3714
3714
|
}
|
|
3715
3715
|
reset() {
|
|
3716
|
-
|
|
3716
|
+
pe._reset(this);
|
|
3717
3717
|
}
|
|
3718
3718
|
pop() {
|
|
3719
3719
|
return this.parent;
|
|
@@ -3722,7 +3722,7 @@ var Fe = class ne {
|
|
|
3722
3722
|
return this.parent ? this.parent : this;
|
|
3723
3723
|
}
|
|
3724
3724
|
push(e, n, r, o, s, a, i) {
|
|
3725
|
-
return new
|
|
3725
|
+
return new pe(
|
|
3726
3726
|
this,
|
|
3727
3727
|
e,
|
|
3728
3728
|
n,
|
|
@@ -3761,7 +3761,7 @@ var Fe = class ne {
|
|
|
3761
3761
|
);
|
|
3762
3762
|
}
|
|
3763
3763
|
withEndRule(e) {
|
|
3764
|
-
return this.endRule === e ? this : new
|
|
3764
|
+
return this.endRule === e ? this : new pe(
|
|
3765
3765
|
this.parent,
|
|
3766
3766
|
this.ruleId,
|
|
3767
3767
|
this._enterPos,
|
|
@@ -3793,7 +3793,7 @@ var Fe = class ne {
|
|
|
3793
3793
|
}
|
|
3794
3794
|
static pushFrame(e, n) {
|
|
3795
3795
|
const r = Fe.fromExtension(e?.nameScopesList ?? null, n.nameScopesList);
|
|
3796
|
-
return new
|
|
3796
|
+
return new pe(
|
|
3797
3797
|
e,
|
|
3798
3798
|
n.ruleId,
|
|
3799
3799
|
n.enterPos ?? -1,
|
|
@@ -4234,11 +4234,11 @@ const ho = Ne({
|
|
|
4234
4234
|
return e === "role" ? e : "aria-" + e.slice(4).toLowerCase();
|
|
4235
4235
|
}
|
|
4236
4236
|
});
|
|
4237
|
-
function
|
|
4237
|
+
function po(t, e) {
|
|
4238
4238
|
return e in t ? t[e] : e;
|
|
4239
4239
|
}
|
|
4240
|
-
function
|
|
4241
|
-
return
|
|
4240
|
+
function fo(t, e) {
|
|
4241
|
+
return po(t, e.toLowerCase());
|
|
4242
4242
|
}
|
|
4243
4243
|
const Za = Ne({
|
|
4244
4244
|
attributes: {
|
|
@@ -4600,7 +4600,7 @@ const Za = Ne({
|
|
|
4600
4600
|
unselectable: null
|
|
4601
4601
|
},
|
|
4602
4602
|
space: "html",
|
|
4603
|
-
transform:
|
|
4603
|
+
transform: fo
|
|
4604
4604
|
}), Qa = Ne({
|
|
4605
4605
|
attributes: {
|
|
4606
4606
|
accentHeight: "accent-height",
|
|
@@ -5159,7 +5159,7 @@ const Za = Ne({
|
|
|
5159
5159
|
zoomAndPan: null
|
|
5160
5160
|
},
|
|
5161
5161
|
space: "svg",
|
|
5162
|
-
transform:
|
|
5162
|
+
transform: po
|
|
5163
5163
|
}), go = Ne({
|
|
5164
5164
|
properties: {
|
|
5165
5165
|
xLinkActuate: null,
|
|
@@ -5178,7 +5178,7 @@ const Za = Ne({
|
|
|
5178
5178
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
5179
5179
|
properties: { xmlnsXLink: null, xmlns: null },
|
|
5180
5180
|
space: "xmlns",
|
|
5181
|
-
transform:
|
|
5181
|
+
transform: fo
|
|
5182
5182
|
}), yo = Ne({
|
|
5183
5183
|
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
5184
5184
|
space: "xml",
|
|
@@ -5240,19 +5240,19 @@ function ci(t, e) {
|
|
|
5240
5240
|
}
|
|
5241
5241
|
function hi(t) {
|
|
5242
5242
|
let e = Zn.get(t);
|
|
5243
|
-
return e || (e =
|
|
5243
|
+
return e || (e = pi(t), Zn.set(t, e)), e;
|
|
5244
5244
|
}
|
|
5245
|
-
function
|
|
5245
|
+
function pi(t) {
|
|
5246
5246
|
const e = [];
|
|
5247
5247
|
let n = -1;
|
|
5248
5248
|
for (; ++n < t.length; )
|
|
5249
5249
|
e.push(t[n].replace(ui, "\\$&"));
|
|
5250
5250
|
return new RegExp("(?:" + e.join("|") + ")", "g");
|
|
5251
5251
|
}
|
|
5252
|
-
const
|
|
5252
|
+
const fi = /[\dA-Fa-f]/;
|
|
5253
5253
|
function di(t, e, n) {
|
|
5254
5254
|
const r = "&#x" + t.toString(16).toUpperCase();
|
|
5255
|
-
return n && e && !
|
|
5255
|
+
return n && e && !fi.test(String.fromCharCode(e)) ? r : r + ";";
|
|
5256
5256
|
}
|
|
5257
5257
|
const gi = /\d/;
|
|
5258
5258
|
function mi(t, e, n) {
|
|
@@ -5628,22 +5628,22 @@ const yi = [
|
|
|
5628
5628
|
"not",
|
|
5629
5629
|
"para",
|
|
5630
5630
|
"times"
|
|
5631
|
-
],
|
|
5631
|
+
], Co = {}.hasOwnProperty, nn = {};
|
|
5632
5632
|
let Ze;
|
|
5633
5633
|
for (Ze in $t)
|
|
5634
|
-
|
|
5635
|
-
const
|
|
5636
|
-
function
|
|
5634
|
+
Co.call($t, Ze) && (nn[$t[Ze]] = Ze);
|
|
5635
|
+
const Ci = /[^\dA-Za-z]/;
|
|
5636
|
+
function wi(t, e, n, r) {
|
|
5637
5637
|
const o = String.fromCharCode(t);
|
|
5638
|
-
if (
|
|
5638
|
+
if (Co.call(nn, o)) {
|
|
5639
5639
|
const s = nn[o], a = "&" + s;
|
|
5640
|
-
return n && yi.includes(s) && !bi.includes(s) && (!r || e && e !== 61 &&
|
|
5640
|
+
return n && yi.includes(s) && !bi.includes(s) && (!r || e && e !== 61 && Ci.test(String.fromCharCode(e))) ? a : a + ";";
|
|
5641
5641
|
}
|
|
5642
5642
|
return "";
|
|
5643
5643
|
}
|
|
5644
5644
|
function _i(t, e, n) {
|
|
5645
5645
|
let r = di(t, e, n.omitOptionalSemicolons), o;
|
|
5646
|
-
if ((n.useNamedReferences || n.useShortestReferences) && (o =
|
|
5646
|
+
if ((n.useNamedReferences || n.useShortestReferences) && (o = wi(
|
|
5647
5647
|
t,
|
|
5648
5648
|
e,
|
|
5649
5649
|
n.omitOptionalSemicolons,
|
|
@@ -5677,14 +5677,14 @@ function xi(t, e, n, r) {
|
|
|
5677
5677
|
function Ei(t, e, n, r) {
|
|
5678
5678
|
return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
|
|
5679
5679
|
}
|
|
5680
|
-
const O = _o(1),
|
|
5680
|
+
const O = _o(1), wo = _o(-1), Ai = [];
|
|
5681
5681
|
function _o(t) {
|
|
5682
5682
|
return e;
|
|
5683
5683
|
function e(n, r, o) {
|
|
5684
5684
|
const s = n ? n.children : Ai;
|
|
5685
5685
|
let a = (r || 0) + t, i = s[a];
|
|
5686
5686
|
if (!o)
|
|
5687
|
-
for (; i &&
|
|
5687
|
+
for (; i && wt(i); )
|
|
5688
5688
|
a += t, i = s[a];
|
|
5689
5689
|
return i;
|
|
5690
5690
|
}
|
|
@@ -5719,7 +5719,7 @@ const bn = So({
|
|
|
5719
5719
|
});
|
|
5720
5720
|
function Tt(t, e, n) {
|
|
5721
5721
|
const r = O(n, e, !0);
|
|
5722
|
-
return !r || r.type !== "comment" && !(r.type === "text" &&
|
|
5722
|
+
return !r || r.type !== "comment" && !(r.type === "text" && wt(r.value.charAt(0)));
|
|
5723
5723
|
}
|
|
5724
5724
|
function Ii(t, e, n) {
|
|
5725
5725
|
const r = O(n, e);
|
|
@@ -5800,14 +5800,14 @@ function zi(t) {
|
|
|
5800
5800
|
}
|
|
5801
5801
|
function Hi(t) {
|
|
5802
5802
|
const e = O(t, -1, !0);
|
|
5803
|
-
return !e || e.type !== "comment" && !(e.type === "text" &&
|
|
5803
|
+
return !e || e.type !== "comment" && !(e.type === "text" && wt(e.value.charAt(0))) && !(e.type === "element" && (e.tagName === "meta" || e.tagName === "link" || e.tagName === "script" || e.tagName === "style" || e.tagName === "template"));
|
|
5804
5804
|
}
|
|
5805
5805
|
function Wi(t, e, n) {
|
|
5806
|
-
const r =
|
|
5806
|
+
const r = wo(n, e), o = O(t, -1, !0);
|
|
5807
5807
|
return n && r && r.type === "element" && r.tagName === "colgroup" && bn(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "col");
|
|
5808
5808
|
}
|
|
5809
5809
|
function Vi(t, e, n) {
|
|
5810
|
-
const r =
|
|
5810
|
+
const r = wo(n, e), o = O(t, -1);
|
|
5811
5811
|
return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && bn(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "tr");
|
|
5812
5812
|
}
|
|
5813
5813
|
const Qe = {
|
|
@@ -5972,7 +5972,7 @@ function il(t) {
|
|
|
5972
5972
|
e[r] = this.one(n[r], r, t);
|
|
5973
5973
|
return e.join("");
|
|
5974
5974
|
}
|
|
5975
|
-
function
|
|
5975
|
+
function pt(t, e) {
|
|
5976
5976
|
const n = typeof t == "string" ? {} : { ...t.colorReplacements }, r = typeof t == "string" ? t : t.name;
|
|
5977
5977
|
for (const [o, s] of Object.entries(e?.colorReplacements || {}))
|
|
5978
5978
|
typeof s == "string" ? n[o] = s : o === r && Object.assign(n, s);
|
|
@@ -5987,17 +5987,17 @@ function ll(t) {
|
|
|
5987
5987
|
async function vo(t) {
|
|
5988
5988
|
return Promise.resolve(typeof t == "function" ? t() : t).then((e) => e.default || e);
|
|
5989
5989
|
}
|
|
5990
|
-
function
|
|
5990
|
+
function Cn(t) {
|
|
5991
5991
|
return !t || ["plaintext", "txt", "text", "plain"].includes(t);
|
|
5992
5992
|
}
|
|
5993
5993
|
function xo(t) {
|
|
5994
|
-
return t === "ansi" ||
|
|
5994
|
+
return t === "ansi" || Cn(t);
|
|
5995
5995
|
}
|
|
5996
|
-
function
|
|
5996
|
+
function wn(t) {
|
|
5997
5997
|
return t === "none";
|
|
5998
5998
|
}
|
|
5999
5999
|
function ul(t) {
|
|
6000
|
-
return
|
|
6000
|
+
return wn(t);
|
|
6001
6001
|
}
|
|
6002
6002
|
function Eo(t, e) {
|
|
6003
6003
|
if (!e)
|
|
@@ -6047,7 +6047,7 @@ function cl(t) {
|
|
|
6047
6047
|
};
|
|
6048
6048
|
}
|
|
6049
6049
|
const _n = "light-dark()", hl = ["color", "background-color"];
|
|
6050
|
-
function
|
|
6050
|
+
function pl(t, e) {
|
|
6051
6051
|
let n = 0;
|
|
6052
6052
|
const r = [];
|
|
6053
6053
|
for (const o of e)
|
|
@@ -6062,11 +6062,11 @@ function fl(t, e) {
|
|
|
6062
6062
|
offset: t.offset + n
|
|
6063
6063
|
}), r;
|
|
6064
6064
|
}
|
|
6065
|
-
function
|
|
6065
|
+
function fl(t, e) {
|
|
6066
6066
|
const n = Array.from(e instanceof Set ? e : new Set(e)).sort((r, o) => r - o);
|
|
6067
6067
|
return n.length ? t.map((r) => r.flatMap((o) => {
|
|
6068
6068
|
const s = n.filter((a) => o.offset < a && a < o.offset + o.content.length).map((a) => a - o.offset).sort((a, i) => a - i);
|
|
6069
|
-
return s.length ?
|
|
6069
|
+
return s.length ? pl(o, s) : o;
|
|
6070
6070
|
})) : t;
|
|
6071
6071
|
}
|
|
6072
6072
|
function dl(t, e, n, r, o = "css-vars") {
|
|
@@ -6074,7 +6074,7 @@ function dl(t, e, n, r, o = "css-vars") {
|
|
|
6074
6074
|
content: t.content,
|
|
6075
6075
|
explanation: t.explanation,
|
|
6076
6076
|
offset: t.offset
|
|
6077
|
-
}, a = e.map((c) =>
|
|
6077
|
+
}, a = e.map((c) => ft(t.variants[c])), i = new Set(a.flatMap((c) => Object.keys(c))), l = {}, u = (c, h) => {
|
|
6078
6078
|
const p = h === "color" ? "" : h === "background-color" ? "-bg" : `-${h}`;
|
|
6079
6079
|
return n + e[c] + (h === "color" ? "" : p);
|
|
6080
6080
|
};
|
|
@@ -6083,11 +6083,11 @@ function dl(t, e, n, r, o = "css-vars") {
|
|
|
6083
6083
|
const d = c[p] || "inherit";
|
|
6084
6084
|
if (h === 0 && r && hl.includes(p))
|
|
6085
6085
|
if (r === _n && a.length > 1) {
|
|
6086
|
-
const f = e.findIndex((
|
|
6087
|
-
if (f === -1 ||
|
|
6086
|
+
const f = e.findIndex((g) => g === "light"), m = e.findIndex((g) => g === "dark");
|
|
6087
|
+
if (f === -1 || m === -1)
|
|
6088
6088
|
throw new F('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');
|
|
6089
|
-
const
|
|
6090
|
-
l[p] = `light-dark(${
|
|
6089
|
+
const b = a[f][p] || "inherit", y = a[m][p] || "inherit";
|
|
6090
|
+
l[p] = `light-dark(${b}, ${y})`, o === "css-vars" && (l[u(h, p)] = d);
|
|
6091
6091
|
} else
|
|
6092
6092
|
l[p] = d;
|
|
6093
6093
|
else
|
|
@@ -6095,7 +6095,7 @@ function dl(t, e, n, r, o = "css-vars") {
|
|
|
6095
6095
|
}
|
|
6096
6096
|
}), s.htmlStyle = l, s;
|
|
6097
6097
|
}
|
|
6098
|
-
function
|
|
6098
|
+
function ft(t) {
|
|
6099
6099
|
const e = {};
|
|
6100
6100
|
if (t.color && (e.color = t.color), t.bgColor && (e["background-color"] = t.bgColor), t.fontStyle) {
|
|
6101
6101
|
t.fontStyle & z.Italic && (e["font-style"] = "italic"), t.fontStyle & z.Bold && (e["font-weight"] = "bold");
|
|
@@ -6227,7 +6227,7 @@ function yl() {
|
|
|
6227
6227
|
if (!this.options.decorations?.length)
|
|
6228
6228
|
return;
|
|
6229
6229
|
const o = e(this).decorations.flatMap((a) => [a.start.offset, a.end.offset]);
|
|
6230
|
-
return
|
|
6230
|
+
return fl(n, o);
|
|
6231
6231
|
},
|
|
6232
6232
|
code(n) {
|
|
6233
6233
|
if (!this.options.decorations?.length)
|
|
@@ -6237,34 +6237,34 @@ function yl() {
|
|
|
6237
6237
|
throw new F(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);
|
|
6238
6238
|
function s(c, h, p, d) {
|
|
6239
6239
|
const f = o[c];
|
|
6240
|
-
let
|
|
6241
|
-
if (h === 0 && (
|
|
6240
|
+
let m = "", b = -1, y = -1;
|
|
6241
|
+
if (h === 0 && (b = 0), p === 0 && (y = 0), p === Number.POSITIVE_INFINITY && (y = f.children.length), b === -1 || y === -1)
|
|
6242
6242
|
for (let _ = 0; _ < f.children.length; _++)
|
|
6243
|
-
|
|
6244
|
-
if (
|
|
6243
|
+
m += Ro(f.children[_]), b === -1 && m.length === h && (b = _ + 1), y === -1 && m.length === p && (y = _ + 1);
|
|
6244
|
+
if (b === -1)
|
|
6245
6245
|
throw new F(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);
|
|
6246
6246
|
if (y === -1)
|
|
6247
6247
|
throw new F(`Failed to find end index for decoration ${JSON.stringify(d.end)}`);
|
|
6248
|
-
const
|
|
6249
|
-
if (!d.alwaysWrap &&
|
|
6248
|
+
const g = f.children.slice(b, y);
|
|
6249
|
+
if (!d.alwaysWrap && g.length === f.children.length)
|
|
6250
6250
|
i(f, d, "line");
|
|
6251
|
-
else if (!d.alwaysWrap &&
|
|
6252
|
-
i(
|
|
6251
|
+
else if (!d.alwaysWrap && g.length === 1 && g[0].type === "element")
|
|
6252
|
+
i(g[0], d, "token");
|
|
6253
6253
|
else {
|
|
6254
6254
|
const _ = {
|
|
6255
6255
|
type: "element",
|
|
6256
6256
|
tagName: "span",
|
|
6257
6257
|
properties: {},
|
|
6258
|
-
children:
|
|
6258
|
+
children: g
|
|
6259
6259
|
};
|
|
6260
|
-
i(_, d, "wrapper"), f.children.splice(
|
|
6260
|
+
i(_, d, "wrapper"), f.children.splice(b, g.length, _);
|
|
6261
6261
|
}
|
|
6262
6262
|
}
|
|
6263
6263
|
function a(c, h) {
|
|
6264
6264
|
o[c] = i(o[c], h, "line");
|
|
6265
6265
|
}
|
|
6266
6266
|
function i(c, h, p) {
|
|
6267
|
-
const d = h.properties || {}, f = h.transform || ((
|
|
6267
|
+
const d = h.properties || {}, f = h.transform || ((m) => m);
|
|
6268
6268
|
return c.tagName = h.tagName || "span", c.properties = {
|
|
6269
6269
|
...c.properties,
|
|
6270
6270
|
...d,
|
|
@@ -6305,19 +6305,19 @@ function bl(t) {
|
|
|
6305
6305
|
function Ro(t) {
|
|
6306
6306
|
return t.type === "text" ? t.value : t.type === "element" ? t.children.map(Ro).join("") : "";
|
|
6307
6307
|
}
|
|
6308
|
-
const
|
|
6308
|
+
const Cl = [
|
|
6309
6309
|
/* @__PURE__ */ yl()
|
|
6310
6310
|
];
|
|
6311
6311
|
function dt(t) {
|
|
6312
|
-
const e =
|
|
6312
|
+
const e = wl(t.transformers || []);
|
|
6313
6313
|
return [
|
|
6314
6314
|
...e.pre,
|
|
6315
6315
|
...e.normal,
|
|
6316
6316
|
...e.post,
|
|
6317
|
-
...
|
|
6317
|
+
...Cl
|
|
6318
6318
|
];
|
|
6319
6319
|
}
|
|
6320
|
-
function
|
|
6320
|
+
function wl(t) {
|
|
6321
6321
|
const e = [], n = [], r = [];
|
|
6322
6322
|
for (const o of t)
|
|
6323
6323
|
switch (o.enforce) {
|
|
@@ -6540,33 +6540,49 @@ function xl(t = vl) {
|
|
|
6540
6540
|
value: a
|
|
6541
6541
|
};
|
|
6542
6542
|
}
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6543
|
+
const El = {
|
|
6544
|
+
black: "#000000",
|
|
6545
|
+
red: "#cd3131",
|
|
6546
|
+
green: "#0DBC79",
|
|
6547
|
+
yellow: "#E5E510",
|
|
6548
|
+
blue: "#2472C8",
|
|
6549
|
+
magenta: "#BC3FBC",
|
|
6550
|
+
cyan: "#11A8CD",
|
|
6551
|
+
white: "#E5E5E5",
|
|
6552
|
+
brightBlack: "#666666",
|
|
6553
|
+
brightRed: "#F14C4C",
|
|
6554
|
+
brightGreen: "#23D18B",
|
|
6555
|
+
brightYellow: "#F5F543",
|
|
6556
|
+
brightBlue: "#3B8EEA",
|
|
6557
|
+
brightMagenta: "#D670D6",
|
|
6558
|
+
brightCyan: "#29B8DB",
|
|
6559
|
+
brightWhite: "#FFFFFF"
|
|
6560
|
+
};
|
|
6561
|
+
function Al(t, e, n) {
|
|
6562
|
+
const r = pt(t, n), o = St(e), s = Object.fromEntries(
|
|
6563
|
+
de.map((l) => {
|
|
6564
|
+
const u = `terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`, c = t.colors?.[u];
|
|
6565
|
+
return [l, c || El[l]];
|
|
6566
|
+
})
|
|
6567
|
+
), a = xl(s), i = kl();
|
|
6552
6568
|
return o.map(
|
|
6553
|
-
(
|
|
6554
|
-
let
|
|
6555
|
-
|
|
6556
|
-
let
|
|
6557
|
-
return
|
|
6558
|
-
content:
|
|
6559
|
-
offset:
|
|
6569
|
+
(l) => i.parse(l[0]).map((u) => {
|
|
6570
|
+
let c, h;
|
|
6571
|
+
u.decorations.has("reverse") ? (c = u.background ? a.value(u.background) : t.bg, h = u.foreground ? a.value(u.foreground) : t.fg) : (c = u.foreground ? a.value(u.foreground) : t.fg, h = u.background ? a.value(u.background) : void 0), c = ue(c, r), h = ue(h, r), u.decorations.has("dim") && (c = Rl(c));
|
|
6572
|
+
let p = z.None;
|
|
6573
|
+
return u.decorations.has("bold") && (p |= z.Bold), u.decorations.has("italic") && (p |= z.Italic), u.decorations.has("underline") && (p |= z.Underline), u.decorations.has("strikethrough") && (p |= z.Strikethrough), {
|
|
6574
|
+
content: u.value,
|
|
6575
|
+
offset: l[1],
|
|
6560
6576
|
// TODO: more accurate offset? might need to fork ansi-sequence-parser
|
|
6561
|
-
color:
|
|
6562
|
-
bgColor:
|
|
6563
|
-
fontStyle:
|
|
6577
|
+
color: c,
|
|
6578
|
+
bgColor: h,
|
|
6579
|
+
fontStyle: p
|
|
6564
6580
|
};
|
|
6565
6581
|
})
|
|
6566
6582
|
);
|
|
6567
6583
|
}
|
|
6568
|
-
function
|
|
6569
|
-
const e = t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);
|
|
6584
|
+
function Rl(t) {
|
|
6585
|
+
const e = t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/i);
|
|
6570
6586
|
if (e)
|
|
6571
6587
|
if (e[3]) {
|
|
6572
6588
|
const r = Math.round(Number.parseInt(e[3], 16) / 2).toString(16).padStart(2, "0");
|
|
@@ -6580,11 +6596,11 @@ function Sn(t, e, n = {}) {
|
|
|
6580
6596
|
lang: r = "text",
|
|
6581
6597
|
theme: o = t.getLoadedThemes()[0]
|
|
6582
6598
|
} = n;
|
|
6583
|
-
if (
|
|
6599
|
+
if (Cn(r) || wn(o))
|
|
6584
6600
|
return St(e).map((l) => [{ content: l[0], offset: l[1] }]);
|
|
6585
6601
|
const { theme: s, colorMap: a } = t.setTheme(o);
|
|
6586
6602
|
if (r === "ansi")
|
|
6587
|
-
return
|
|
6603
|
+
return Al(s, e, n);
|
|
6588
6604
|
const i = t.getLanguage(r);
|
|
6589
6605
|
if (n.grammarState) {
|
|
6590
6606
|
if (n.grammarState.lang !== i.name)
|
|
@@ -6592,16 +6608,16 @@ function Sn(t, e, n = {}) {
|
|
|
6592
6608
|
if (!n.grammarState.themes.includes(s.name))
|
|
6593
6609
|
throw new F(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`);
|
|
6594
6610
|
}
|
|
6595
|
-
return
|
|
6611
|
+
return Nl(e, i, s, a, n);
|
|
6596
6612
|
}
|
|
6597
|
-
function
|
|
6613
|
+
function Il(...t) {
|
|
6598
6614
|
if (t.length === 2)
|
|
6599
6615
|
return We(t[1]);
|
|
6600
6616
|
const [e, n, r = {}] = t, {
|
|
6601
6617
|
lang: o = "text",
|
|
6602
6618
|
theme: s = e.getLoadedThemes()[0]
|
|
6603
6619
|
} = r;
|
|
6604
|
-
if (
|
|
6620
|
+
if (Cn(o) || wn(s))
|
|
6605
6621
|
throw new F("Plain language does not have grammar state");
|
|
6606
6622
|
if (o === "ansi")
|
|
6607
6623
|
throw new F("ANSI language does not have grammar state");
|
|
@@ -6612,7 +6628,7 @@ function Rl(...t) {
|
|
|
6612
6628
|
a.name
|
|
6613
6629
|
);
|
|
6614
6630
|
}
|
|
6615
|
-
function
|
|
6631
|
+
function Nl(t, e, n, r, o) {
|
|
6616
6632
|
const s = gt(t, e, n, r, o), a = new Le(
|
|
6617
6633
|
gt(t, e, n, r, o).stateStack,
|
|
6618
6634
|
e.name,
|
|
@@ -6621,7 +6637,7 @@ function Il(t, e, n, r, o) {
|
|
|
6621
6637
|
return kt(s.tokens, a), s.tokens;
|
|
6622
6638
|
}
|
|
6623
6639
|
function gt(t, e, n, r, o) {
|
|
6624
|
-
const s =
|
|
6640
|
+
const s = pt(n, o), {
|
|
6625
6641
|
tokenizeMaxLineLength: a = 0,
|
|
6626
6642
|
tokenizeTimeLimit: i = 500
|
|
6627
6643
|
} = o, l = St(t);
|
|
@@ -6638,7 +6654,7 @@ function gt(t, e, n, r, o) {
|
|
|
6638
6654
|
).stateStack : Zt, c = [];
|
|
6639
6655
|
const h = [];
|
|
6640
6656
|
for (let p = 0, d = l.length; p < d; p++) {
|
|
6641
|
-
const [f,
|
|
6657
|
+
const [f, m] = l[p];
|
|
6642
6658
|
if (f === "") {
|
|
6643
6659
|
c = [], h.push([]);
|
|
6644
6660
|
continue;
|
|
@@ -6646,14 +6662,14 @@ function gt(t, e, n, r, o) {
|
|
|
6646
6662
|
if (a > 0 && f.length >= a) {
|
|
6647
6663
|
c = [], h.push([{
|
|
6648
6664
|
content: f,
|
|
6649
|
-
offset:
|
|
6665
|
+
offset: m,
|
|
6650
6666
|
color: "",
|
|
6651
6667
|
fontStyle: 0
|
|
6652
6668
|
}]);
|
|
6653
6669
|
continue;
|
|
6654
6670
|
}
|
|
6655
|
-
let
|
|
6656
|
-
o.includeExplanation && (
|
|
6671
|
+
let b, y, g;
|
|
6672
|
+
o.includeExplanation && (b = e.tokenizeLine(f, u, i), y = b.tokens, g = 0);
|
|
6657
6673
|
const _ = e.tokenizeLine2(f, u, i), S = _.tokens.length / 2;
|
|
6658
6674
|
for (let A = 0; A < S; A++) {
|
|
6659
6675
|
const D = _.tokens[2 * A], L = A + 1 < S ? _.tokens[2 * A + 2] : f.length;
|
|
@@ -6664,7 +6680,7 @@ function gt(t, e, n, r, o) {
|
|
|
6664
6680
|
s
|
|
6665
6681
|
), ee = Re.getFontStyle(j), ce = {
|
|
6666
6682
|
content: f.substring(D, L),
|
|
6667
|
-
offset:
|
|
6683
|
+
offset: m + D,
|
|
6668
6684
|
color: Z,
|
|
6669
6685
|
fontStyle: ee
|
|
6670
6686
|
};
|
|
@@ -6691,19 +6707,19 @@ function gt(t, e, n, r, o) {
|
|
|
6691
6707
|
ce.explanation = [];
|
|
6692
6708
|
let R = 0;
|
|
6693
6709
|
for (; D + R < L; ) {
|
|
6694
|
-
const k = y[
|
|
6710
|
+
const k = y[g], G = f.substring(
|
|
6695
6711
|
k.startIndex,
|
|
6696
6712
|
k.endIndex
|
|
6697
6713
|
);
|
|
6698
6714
|
R += G.length, ce.explanation.push({
|
|
6699
6715
|
content: G,
|
|
6700
|
-
scopes: o.includeExplanation === "scopeName" ?
|
|
6716
|
+
scopes: o.includeExplanation === "scopeName" ? Ll(
|
|
6701
6717
|
k.scopes
|
|
6702
|
-
) :
|
|
6718
|
+
) : Pl(
|
|
6703
6719
|
te,
|
|
6704
6720
|
k.scopes
|
|
6705
6721
|
)
|
|
6706
|
-
}),
|
|
6722
|
+
}), g += 1;
|
|
6707
6723
|
}
|
|
6708
6724
|
}
|
|
6709
6725
|
c.push(ce);
|
|
@@ -6715,16 +6731,16 @@ function gt(t, e, n, r, o) {
|
|
|
6715
6731
|
stateStack: u
|
|
6716
6732
|
};
|
|
6717
6733
|
}
|
|
6718
|
-
function
|
|
6734
|
+
function Ll(t) {
|
|
6719
6735
|
return t.map((e) => ({ scopeName: e }));
|
|
6720
6736
|
}
|
|
6721
|
-
function
|
|
6737
|
+
function Pl(t, e) {
|
|
6722
6738
|
const n = [];
|
|
6723
6739
|
for (let r = 0, o = e.length; r < o; r++) {
|
|
6724
6740
|
const s = e[r];
|
|
6725
6741
|
n[r] = {
|
|
6726
6742
|
scopeName: s,
|
|
6727
|
-
themeMatches:
|
|
6743
|
+
themeMatches: Tl(t, s, e.slice(0, r))
|
|
6728
6744
|
};
|
|
6729
6745
|
}
|
|
6730
6746
|
return n;
|
|
@@ -6732,7 +6748,7 @@ function Ll(t, e) {
|
|
|
6732
6748
|
function nr(t, e) {
|
|
6733
6749
|
return t === e || e.substring(0, t.length) === t && e[t.length] === ".";
|
|
6734
6750
|
}
|
|
6735
|
-
function
|
|
6751
|
+
function $l(t, e, n) {
|
|
6736
6752
|
if (!nr(t[t.length - 1], e))
|
|
6737
6753
|
return !1;
|
|
6738
6754
|
let r = t.length - 2, o = n.length - 1;
|
|
@@ -6740,11 +6756,11 @@ function Pl(t, e, n) {
|
|
|
6740
6756
|
nr(t[r], n[o]) && (r -= 1), o -= 1;
|
|
6741
6757
|
return r === -1;
|
|
6742
6758
|
}
|
|
6743
|
-
function
|
|
6759
|
+
function Tl(t, e, n) {
|
|
6744
6760
|
const r = [];
|
|
6745
6761
|
for (const { selectors: o, settings: s } of t)
|
|
6746
6762
|
for (const a of o)
|
|
6747
|
-
if (
|
|
6763
|
+
if ($l(a, e, n)) {
|
|
6748
6764
|
r.push(s);
|
|
6749
6765
|
break;
|
|
6750
6766
|
}
|
|
@@ -6761,7 +6777,7 @@ function Io(t, e, n) {
|
|
|
6761
6777
|
state: c,
|
|
6762
6778
|
theme: h
|
|
6763
6779
|
};
|
|
6764
|
-
}), s =
|
|
6780
|
+
}), s = Ml(
|
|
6765
6781
|
...o.map((l) => l.tokens)
|
|
6766
6782
|
), a = s[0].map(
|
|
6767
6783
|
(l, u) => l.map((c, h) => {
|
|
@@ -6772,12 +6788,12 @@ function Io(t, e, n) {
|
|
|
6772
6788
|
};
|
|
6773
6789
|
return "includeExplanation" in n && n.includeExplanation && (p.explanation = c.explanation), s.forEach((d, f) => {
|
|
6774
6790
|
const {
|
|
6775
|
-
content:
|
|
6776
|
-
explanation:
|
|
6791
|
+
content: m,
|
|
6792
|
+
explanation: b,
|
|
6777
6793
|
offset: y,
|
|
6778
|
-
...
|
|
6794
|
+
...g
|
|
6779
6795
|
} = d[u][h];
|
|
6780
|
-
p.variants[r[f].color] =
|
|
6796
|
+
p.variants[r[f].color] = g;
|
|
6781
6797
|
}), p;
|
|
6782
6798
|
})
|
|
6783
6799
|
), i = o[0].state ? new Le(
|
|
@@ -6786,7 +6802,7 @@ function Io(t, e, n) {
|
|
|
6786
6802
|
) : void 0;
|
|
6787
6803
|
return i && kt(a, i), a;
|
|
6788
6804
|
}
|
|
6789
|
-
function
|
|
6805
|
+
function Ml(...t) {
|
|
6790
6806
|
const e = t.map(() => []), n = t.length;
|
|
6791
6807
|
for (let r = 0; r < t[0].length; r++) {
|
|
6792
6808
|
const o = t.map((l) => l[r]), s = e.map(() => []);
|
|
@@ -6816,7 +6832,7 @@ function mt(t, e, n) {
|
|
|
6816
6832
|
defaultColor: u = "light",
|
|
6817
6833
|
cssVariablePrefix: c = "--shiki-",
|
|
6818
6834
|
colorsRendering: h = "css-vars"
|
|
6819
|
-
} = n, p = Object.entries(n.themes).filter((y) => y[1]).map((y) => ({ color: y[0], theme: y[1] })).sort((y,
|
|
6835
|
+
} = n, p = Object.entries(n.themes).filter((y) => y[1]).map((y) => ({ color: y[0], theme: y[1] })).sort((y, g) => y.color === u ? -1 : g.color === u ? 1 : 0);
|
|
6820
6836
|
if (p.length === 0)
|
|
6821
6837
|
throw new F("`themes` option must not be empty");
|
|
6822
6838
|
const d = Io(
|
|
@@ -6826,12 +6842,12 @@ function mt(t, e, n) {
|
|
|
6826
6842
|
);
|
|
6827
6843
|
if (l = We(d), u && _n !== u && !p.find((y) => y.color === u))
|
|
6828
6844
|
throw new F(`\`themes\` option must contain the defaultColor key \`${u}\``);
|
|
6829
|
-
const f = p.map((y) => t.getTheme(y.theme)),
|
|
6830
|
-
s = d.map((y) => y.map((
|
|
6831
|
-
const
|
|
6832
|
-
o = rr(p, f,
|
|
6845
|
+
const f = p.map((y) => t.getTheme(y.theme)), m = p.map((y) => y.color);
|
|
6846
|
+
s = d.map((y) => y.map((g) => dl(g, m, c, u, h))), l && kt(s, l);
|
|
6847
|
+
const b = p.map((y) => pt(y.theme, n));
|
|
6848
|
+
o = rr(p, f, b, c, u, "fg", h), r = rr(p, f, b, c, u, "bg", h), a = `shiki-themes ${f.map((y) => y.name).join(" ")}`, i = u ? void 0 : [o, r].join(";");
|
|
6833
6849
|
} else if ("theme" in n) {
|
|
6834
|
-
const u =
|
|
6850
|
+
const u = pt(n.theme, n);
|
|
6835
6851
|
s = Sn(
|
|
6836
6852
|
t,
|
|
6837
6853
|
e,
|
|
@@ -6855,7 +6871,7 @@ function rr(t, e, n, r, o, s, a) {
|
|
|
6855
6871
|
const u = ue(e[l][s], n[l]) || "inherit", c = `${r + i.color}${s === "bg" ? "-bg" : ""}:${u}`;
|
|
6856
6872
|
if (l === 0 && o) {
|
|
6857
6873
|
if (o === _n && t.length > 1) {
|
|
6858
|
-
const h = t.findIndex((
|
|
6874
|
+
const h = t.findIndex((m) => m.color === "light"), p = t.findIndex((m) => m.color === "dark");
|
|
6859
6875
|
if (h === -1 || p === -1)
|
|
6860
6876
|
throw new F('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');
|
|
6861
6877
|
const d = ue(e[h][s], n[h]) || "inherit", f = ue(e[p][s], n[p]) || "inherit";
|
|
@@ -6887,7 +6903,7 @@ function yt(t, e, n, r = {
|
|
|
6887
6903
|
mergeWhitespaces: h = !0,
|
|
6888
6904
|
mergeSameStyleTokens: p = !1
|
|
6889
6905
|
} = n;
|
|
6890
|
-
h === !0 ? s =
|
|
6906
|
+
h === !0 ? s = Dl(s) : h === "never" && (s = Gl(s)), p && (s = Fl(s));
|
|
6891
6907
|
const d = {
|
|
6892
6908
|
...r,
|
|
6893
6909
|
get source() {
|
|
@@ -6896,7 +6912,7 @@ function yt(t, e, n, r = {
|
|
|
6896
6912
|
};
|
|
6897
6913
|
for (const f of dt(n))
|
|
6898
6914
|
s = f.tokens?.call(d, s) || s;
|
|
6899
|
-
return
|
|
6915
|
+
return Ol(
|
|
6900
6916
|
s,
|
|
6901
6917
|
{
|
|
6902
6918
|
...n,
|
|
@@ -6909,7 +6925,7 @@ function yt(t, e, n, r = {
|
|
|
6909
6925
|
c
|
|
6910
6926
|
);
|
|
6911
6927
|
}
|
|
6912
|
-
function
|
|
6928
|
+
function Ol(t, e, n, r = We(t)) {
|
|
6913
6929
|
const o = dt(e), s = [], a = {
|
|
6914
6930
|
type: "root",
|
|
6915
6931
|
children: []
|
|
@@ -6965,35 +6981,35 @@ function Ml(t, e, n, r = We(t)) {
|
|
|
6965
6981
|
return h;
|
|
6966
6982
|
}
|
|
6967
6983
|
};
|
|
6968
|
-
if (t.forEach((f,
|
|
6969
|
-
|
|
6984
|
+
if (t.forEach((f, m) => {
|
|
6985
|
+
m && (i === "inline" ? a.children.push({ type: "element", tagName: "br", properties: {}, children: [] }) : i === "classic" && s.push({ type: "text", value: `
|
|
6970
6986
|
` }));
|
|
6971
|
-
let
|
|
6987
|
+
let b = {
|
|
6972
6988
|
type: "element",
|
|
6973
6989
|
tagName: "span",
|
|
6974
6990
|
properties: { class: "line" },
|
|
6975
6991
|
children: []
|
|
6976
6992
|
}, y = 0;
|
|
6977
|
-
for (const
|
|
6993
|
+
for (const g of f) {
|
|
6978
6994
|
let _ = {
|
|
6979
6995
|
type: "element",
|
|
6980
6996
|
tagName: "span",
|
|
6981
6997
|
properties: {
|
|
6982
|
-
...
|
|
6998
|
+
...g.htmlAttrs
|
|
6983
6999
|
},
|
|
6984
|
-
children: [{ type: "text", value:
|
|
7000
|
+
children: [{ type: "text", value: g.content }]
|
|
6985
7001
|
};
|
|
6986
|
-
const S = rn(
|
|
7002
|
+
const S = rn(g.htmlStyle || ft(g));
|
|
6987
7003
|
S && (_.properties.style = S);
|
|
6988
7004
|
for (const A of o)
|
|
6989
|
-
_ = A?.span?.call(p, _,
|
|
6990
|
-
i === "inline" ? a.children.push(_) : i === "classic" &&
|
|
7005
|
+
_ = A?.span?.call(p, _, m + 1, y, b, g) || _;
|
|
7006
|
+
i === "inline" ? a.children.push(_) : i === "classic" && b.children.push(_), y += g.content.length;
|
|
6991
7007
|
}
|
|
6992
7008
|
if (i === "classic") {
|
|
6993
|
-
for (const
|
|
6994
|
-
|
|
6995
|
-
h.push(
|
|
6996
|
-
}
|
|
7009
|
+
for (const g of o)
|
|
7010
|
+
b = g?.line?.call(p, b, m + 1) || b;
|
|
7011
|
+
h.push(b), s.push(b);
|
|
7012
|
+
} else i === "inline" && h.push(b);
|
|
6997
7013
|
}), i === "classic") {
|
|
6998
7014
|
for (const f of o)
|
|
6999
7015
|
c = f?.code?.call(p, c) || c;
|
|
@@ -7001,13 +7017,43 @@ function Ml(t, e, n, r = We(t)) {
|
|
|
7001
7017
|
for (const f of o)
|
|
7002
7018
|
u = f?.pre?.call(p, u) || u;
|
|
7003
7019
|
a.children.push(u);
|
|
7020
|
+
} else if (i === "inline") {
|
|
7021
|
+
const f = [];
|
|
7022
|
+
let m = {
|
|
7023
|
+
type: "element",
|
|
7024
|
+
tagName: "span",
|
|
7025
|
+
properties: { class: "line" },
|
|
7026
|
+
children: []
|
|
7027
|
+
};
|
|
7028
|
+
for (const g of a.children)
|
|
7029
|
+
g.type === "element" && g.tagName === "br" ? (f.push(m), m = {
|
|
7030
|
+
type: "element",
|
|
7031
|
+
tagName: "span",
|
|
7032
|
+
properties: { class: "line" },
|
|
7033
|
+
children: []
|
|
7034
|
+
}) : (g.type === "element" || g.type === "text") && m.children.push(g);
|
|
7035
|
+
f.push(m);
|
|
7036
|
+
let y = {
|
|
7037
|
+
type: "element",
|
|
7038
|
+
tagName: "code",
|
|
7039
|
+
properties: {},
|
|
7040
|
+
children: f
|
|
7041
|
+
};
|
|
7042
|
+
for (const g of o)
|
|
7043
|
+
y = g?.code?.call(p, y) || y;
|
|
7044
|
+
a.children = [];
|
|
7045
|
+
for (let g = 0; g < y.children.length; g++) {
|
|
7046
|
+
g > 0 && a.children.push({ type: "element", tagName: "br", properties: {}, children: [] });
|
|
7047
|
+
const _ = y.children[g];
|
|
7048
|
+
_.type === "element" && a.children.push(..._.children);
|
|
7049
|
+
}
|
|
7004
7050
|
}
|
|
7005
7051
|
let d = a;
|
|
7006
7052
|
for (const f of o)
|
|
7007
7053
|
d = f?.root?.call(p, d) || d;
|
|
7008
7054
|
return r && kt(d, r), d;
|
|
7009
7055
|
}
|
|
7010
|
-
function
|
|
7056
|
+
function Dl(t) {
|
|
7011
7057
|
return t.map((e) => {
|
|
7012
7058
|
const n = [];
|
|
7013
7059
|
let r = "", o = 0;
|
|
@@ -7027,7 +7073,7 @@ function Ol(t) {
|
|
|
7027
7073
|
}), n;
|
|
7028
7074
|
});
|
|
7029
7075
|
}
|
|
7030
|
-
function
|
|
7076
|
+
function Gl(t) {
|
|
7031
7077
|
return t.map((e) => e.flatMap((n) => {
|
|
7032
7078
|
if (n.content.match(/^\s+$/))
|
|
7033
7079
|
return n;
|
|
@@ -7051,7 +7097,7 @@ function Dl(t) {
|
|
|
7051
7097
|
}), i;
|
|
7052
7098
|
}));
|
|
7053
7099
|
}
|
|
7054
|
-
function
|
|
7100
|
+
function Fl(t) {
|
|
7055
7101
|
return t.map((e) => {
|
|
7056
7102
|
const n = [];
|
|
7057
7103
|
for (const r of e) {
|
|
@@ -7059,21 +7105,21 @@ function Gl(t) {
|
|
|
7059
7105
|
n.push({ ...r });
|
|
7060
7106
|
continue;
|
|
7061
7107
|
}
|
|
7062
|
-
const o = n[n.length - 1], s = rn(o.htmlStyle ||
|
|
7108
|
+
const o = n[n.length - 1], s = rn(o.htmlStyle || ft(o)), a = rn(r.htmlStyle || ft(r)), i = o.fontStyle && (o.fontStyle & z.Underline || o.fontStyle & z.Strikethrough), l = r.fontStyle && (r.fontStyle & z.Underline || r.fontStyle & z.Strikethrough);
|
|
7063
7109
|
!i && !l && s === a ? o.content += r.content : n.push({ ...r });
|
|
7064
7110
|
}
|
|
7065
7111
|
return n;
|
|
7066
7112
|
});
|
|
7067
7113
|
}
|
|
7068
|
-
const
|
|
7069
|
-
function
|
|
7114
|
+
const Bl = sl;
|
|
7115
|
+
function jl(t, e, n) {
|
|
7070
7116
|
const r = {
|
|
7071
7117
|
meta: {},
|
|
7072
7118
|
options: n,
|
|
7073
7119
|
codeToHast: (s, a) => yt(t, s, a),
|
|
7074
7120
|
codeToTokens: (s, a) => mt(t, s, a)
|
|
7075
7121
|
};
|
|
7076
|
-
let o =
|
|
7122
|
+
let o = Bl(yt(t, e, n, r));
|
|
7077
7123
|
for (const s of dt(n))
|
|
7078
7124
|
o = s.postprocess?.call(r, o, n) || o;
|
|
7079
7125
|
return o;
|
|
@@ -7149,16 +7195,16 @@ async function Lo(t) {
|
|
|
7149
7195
|
)
|
|
7150
7196
|
)).filter((n) => !!n);
|
|
7151
7197
|
}
|
|
7152
|
-
let
|
|
7153
|
-
function
|
|
7154
|
-
e >
|
|
7198
|
+
let Ul = 3;
|
|
7199
|
+
function zl(t, e = 3) {
|
|
7200
|
+
e > Ul || console.trace(`[SHIKI DEPRECATE]: ${t}`);
|
|
7155
7201
|
}
|
|
7156
7202
|
class ve extends Error {
|
|
7157
7203
|
constructor(e) {
|
|
7158
7204
|
super(e), this.name = "ShikiError";
|
|
7159
7205
|
}
|
|
7160
7206
|
}
|
|
7161
|
-
class
|
|
7207
|
+
class Hl extends Ya {
|
|
7162
7208
|
constructor(e, n, r, o = {}) {
|
|
7163
7209
|
super(e), this._resolver = e, this._themes = n, this._langs = r, this._alias = o, this._themes.map((s) => this.loadTheme(s)), this.loadLanguages(this._langs);
|
|
7164
7210
|
}
|
|
@@ -7240,12 +7286,14 @@ class zl extends Ya {
|
|
|
7240
7286
|
]), this._loadedLanguagesCache;
|
|
7241
7287
|
}
|
|
7242
7288
|
resolveEmbeddedLanguages(e) {
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7289
|
+
this._langMap.set(e.name, e), this._langGraph.set(e.name, e);
|
|
7290
|
+
const n = e.embeddedLanguages ?? e.embeddedLangs;
|
|
7291
|
+
if (n)
|
|
7292
|
+
for (const r of n)
|
|
7293
|
+
this._langGraph.set(r, this._langMap.get(r));
|
|
7246
7294
|
}
|
|
7247
7295
|
}
|
|
7248
|
-
class
|
|
7296
|
+
class Wl {
|
|
7249
7297
|
_langs = /* @__PURE__ */ new Map();
|
|
7250
7298
|
_scopeToLang = /* @__PURE__ */ new Map();
|
|
7251
7299
|
_injections = /* @__PURE__ */ new Map();
|
|
@@ -7283,33 +7331,33 @@ class Hl {
|
|
|
7283
7331
|
}
|
|
7284
7332
|
}
|
|
7285
7333
|
let De = 0;
|
|
7286
|
-
function
|
|
7334
|
+
function Vl(t) {
|
|
7287
7335
|
De += 1, t.warnings !== !1 && De >= 10 && De % 10 === 0 && console.warn(`[Shiki] ${De} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);
|
|
7288
7336
|
let e = !1;
|
|
7289
7337
|
if (!t.engine)
|
|
7290
7338
|
throw new ve("`engine` option is required for synchronous mode");
|
|
7291
|
-
const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(kn), o = new
|
|
7339
|
+
const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(kn), o = new Wl(t.engine, n), s = new Hl(o, r, n, t.langAlias);
|
|
7292
7340
|
let a;
|
|
7293
|
-
function i(
|
|
7294
|
-
|
|
7295
|
-
const _ = s.getGrammar(typeof
|
|
7341
|
+
function i(g) {
|
|
7342
|
+
b();
|
|
7343
|
+
const _ = s.getGrammar(typeof g == "string" ? g : g.name);
|
|
7296
7344
|
if (!_)
|
|
7297
|
-
throw new ve(`Language \`${
|
|
7345
|
+
throw new ve(`Language \`${g}\` not found, you may need to load it first`);
|
|
7298
7346
|
return _;
|
|
7299
7347
|
}
|
|
7300
|
-
function l(
|
|
7301
|
-
if (
|
|
7348
|
+
function l(g) {
|
|
7349
|
+
if (g === "none")
|
|
7302
7350
|
return { bg: "", fg: "", name: "none", settings: [], type: "dark" };
|
|
7303
|
-
|
|
7304
|
-
const _ = s.getTheme(
|
|
7351
|
+
b();
|
|
7352
|
+
const _ = s.getTheme(g);
|
|
7305
7353
|
if (!_)
|
|
7306
|
-
throw new ve(`Theme \`${
|
|
7354
|
+
throw new ve(`Theme \`${g}\` not found, you may need to load it first`);
|
|
7307
7355
|
return _;
|
|
7308
7356
|
}
|
|
7309
|
-
function u(
|
|
7310
|
-
|
|
7311
|
-
const _ = l(
|
|
7312
|
-
a !==
|
|
7357
|
+
function u(g) {
|
|
7358
|
+
b();
|
|
7359
|
+
const _ = l(g);
|
|
7360
|
+
a !== g && (s.setTheme(_), a = g);
|
|
7313
7361
|
const S = s.getColorMap();
|
|
7314
7362
|
return {
|
|
7315
7363
|
theme: _,
|
|
@@ -7317,26 +7365,26 @@ function Wl(t) {
|
|
|
7317
7365
|
};
|
|
7318
7366
|
}
|
|
7319
7367
|
function c() {
|
|
7320
|
-
return
|
|
7368
|
+
return b(), s.getLoadedThemes();
|
|
7321
7369
|
}
|
|
7322
7370
|
function h() {
|
|
7323
|
-
return
|
|
7371
|
+
return b(), s.getLoadedLanguages();
|
|
7324
7372
|
}
|
|
7325
|
-
function p(...
|
|
7326
|
-
|
|
7373
|
+
function p(...g) {
|
|
7374
|
+
b(), s.loadLanguages(g.flat(1));
|
|
7327
7375
|
}
|
|
7328
|
-
async function d(...
|
|
7329
|
-
return p(await No(
|
|
7376
|
+
async function d(...g) {
|
|
7377
|
+
return p(await No(g));
|
|
7330
7378
|
}
|
|
7331
|
-
function f(...
|
|
7332
|
-
|
|
7333
|
-
for (const _ of
|
|
7379
|
+
function f(...g) {
|
|
7380
|
+
b();
|
|
7381
|
+
for (const _ of g.flat(1))
|
|
7334
7382
|
s.loadTheme(_);
|
|
7335
7383
|
}
|
|
7336
|
-
async function
|
|
7337
|
-
return
|
|
7384
|
+
async function m(...g) {
|
|
7385
|
+
return b(), f(await Lo(g));
|
|
7338
7386
|
}
|
|
7339
|
-
function
|
|
7387
|
+
function b() {
|
|
7340
7388
|
if (e)
|
|
7341
7389
|
throw new ve("Shiki instance has been disposed");
|
|
7342
7390
|
}
|
|
@@ -7351,14 +7399,14 @@ function Wl(t) {
|
|
|
7351
7399
|
getLoadedLanguages: h,
|
|
7352
7400
|
loadLanguage: d,
|
|
7353
7401
|
loadLanguageSync: p,
|
|
7354
|
-
loadTheme:
|
|
7402
|
+
loadTheme: m,
|
|
7355
7403
|
loadThemeSync: f,
|
|
7356
7404
|
dispose: y,
|
|
7357
7405
|
[Symbol.dispose]: y
|
|
7358
7406
|
};
|
|
7359
7407
|
}
|
|
7360
|
-
async function
|
|
7361
|
-
t.engine ||
|
|
7408
|
+
async function ql(t) {
|
|
7409
|
+
t.engine || zl("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
|
|
7362
7410
|
const [
|
|
7363
7411
|
e,
|
|
7364
7412
|
n,
|
|
@@ -7368,22 +7416,22 @@ async function Vl(t) {
|
|
|
7368
7416
|
No(t.langs || []),
|
|
7369
7417
|
t.engine
|
|
7370
7418
|
]);
|
|
7371
|
-
return
|
|
7419
|
+
return Vl({
|
|
7372
7420
|
...t,
|
|
7373
7421
|
themes: e,
|
|
7374
7422
|
langs: n,
|
|
7375
7423
|
engine: r
|
|
7376
7424
|
});
|
|
7377
7425
|
}
|
|
7378
|
-
async function
|
|
7379
|
-
const e = await
|
|
7426
|
+
async function Xl(t) {
|
|
7427
|
+
const e = await ql(t);
|
|
7380
7428
|
return {
|
|
7381
|
-
getLastGrammarState: (...n) =>
|
|
7429
|
+
getLastGrammarState: (...n) => Il(e, ...n),
|
|
7382
7430
|
codeToTokensBase: (n, r) => Sn(e, n, r),
|
|
7383
7431
|
codeToTokensWithThemes: (n, r) => Io(e, n, r),
|
|
7384
7432
|
codeToTokens: (n, r) => mt(e, n, r),
|
|
7385
7433
|
codeToHast: (n, r) => yt(e, n, r),
|
|
7386
|
-
codeToHtml: (n, r) =>
|
|
7434
|
+
codeToHtml: (n, r) => jl(e, n, r),
|
|
7387
7435
|
getBundledLanguages: () => ({}),
|
|
7388
7436
|
getBundledThemes: () => ({}),
|
|
7389
7437
|
...e,
|
|
@@ -7393,17 +7441,17 @@ async function ql(t) {
|
|
|
7393
7441
|
function Po(t) {
|
|
7394
7442
|
return "children" in t ? $o(t) : "value" in t ? t.value : "";
|
|
7395
7443
|
}
|
|
7396
|
-
function
|
|
7444
|
+
function Kl(t) {
|
|
7397
7445
|
return t.type === "text" ? t.value : "children" in t ? $o(t) : "";
|
|
7398
7446
|
}
|
|
7399
7447
|
function $o(t) {
|
|
7400
7448
|
let e = -1;
|
|
7401
7449
|
const n = [];
|
|
7402
7450
|
for (; ++e < t.children.length; )
|
|
7403
|
-
n[e] =
|
|
7451
|
+
n[e] = Kl(t.children[e]);
|
|
7404
7452
|
return n.join("");
|
|
7405
7453
|
}
|
|
7406
|
-
const
|
|
7454
|
+
const Yl = {
|
|
7407
7455
|
"tailing-curly-colon": (t, e) => {
|
|
7408
7456
|
const n = Po(e), r = n.match(/(.+)\{:([\w-]+)\}$/);
|
|
7409
7457
|
if (r)
|
|
@@ -7413,7 +7461,7 @@ const Kl = {
|
|
|
7413
7461
|
lang: r.at(2)
|
|
7414
7462
|
};
|
|
7415
7463
|
}
|
|
7416
|
-
}, ir = "language-",
|
|
7464
|
+
}, ir = "language-", Jl = (t, e) => {
|
|
7417
7465
|
const n = e.children[0];
|
|
7418
7466
|
if (!n || n.type !== "element" || n.tagName !== "code" || !n.properties)
|
|
7419
7467
|
return;
|
|
@@ -7426,8 +7474,8 @@ const Kl = {
|
|
|
7426
7474
|
code: Po(n),
|
|
7427
7475
|
meta: n.data?.meta ?? n.properties.metastring?.toString() ?? ""
|
|
7428
7476
|
};
|
|
7429
|
-
},
|
|
7430
|
-
function
|
|
7477
|
+
}, Zl = "language-";
|
|
7478
|
+
function Ql(t, e) {
|
|
7431
7479
|
const {
|
|
7432
7480
|
addLanguageClass: n = !1,
|
|
7433
7481
|
parseMetaString: r,
|
|
@@ -7440,17 +7488,17 @@ function Zl(t, e) {
|
|
|
7440
7488
|
lazy: c = !1,
|
|
7441
7489
|
...h
|
|
7442
7490
|
} = e;
|
|
7443
|
-
function p(d, f,
|
|
7444
|
-
const y = `${d}:${
|
|
7445
|
-
if (
|
|
7446
|
-
return
|
|
7491
|
+
function p(d, f, m = "", b = {}) {
|
|
7492
|
+
const y = `${d}:${m}:${f}`, g = o?.get(y);
|
|
7493
|
+
if (g)
|
|
7494
|
+
return g;
|
|
7447
7495
|
const _ = {
|
|
7448
7496
|
...h,
|
|
7449
7497
|
lang: d,
|
|
7450
7498
|
meta: {
|
|
7451
7499
|
...h.meta,
|
|
7452
|
-
...
|
|
7453
|
-
__raw:
|
|
7500
|
+
...b,
|
|
7501
|
+
__raw: m
|
|
7454
7502
|
}
|
|
7455
7503
|
};
|
|
7456
7504
|
n && (_.transformers = [
|
|
@@ -7458,7 +7506,7 @@ function Zl(t, e) {
|
|
|
7458
7506
|
{
|
|
7459
7507
|
name: "rehype-shiki:code-language-class",
|
|
7460
7508
|
code(S) {
|
|
7461
|
-
return this.addClassToHast(S, `${
|
|
7509
|
+
return this.addClassToHast(S, `${Zl}${d}`), S;
|
|
7462
7510
|
}
|
|
7463
7511
|
}
|
|
7464
7512
|
]), l && f.endsWith(`
|
|
@@ -7475,30 +7523,30 @@ function Zl(t, e) {
|
|
|
7475
7523
|
}
|
|
7476
7524
|
return (d) => {
|
|
7477
7525
|
const f = [];
|
|
7478
|
-
if (Xr(d, "element", (
|
|
7479
|
-
let
|
|
7480
|
-
if (!y ||
|
|
7526
|
+
if (Xr(d, "element", (m, b, y) => {
|
|
7527
|
+
let g;
|
|
7528
|
+
if (!y || b == null)
|
|
7481
7529
|
return;
|
|
7482
|
-
if (
|
|
7483
|
-
|
|
7484
|
-
else if (
|
|
7485
|
-
|
|
7530
|
+
if (m.tagName === "pre")
|
|
7531
|
+
g = Jl;
|
|
7532
|
+
else if (m.tagName === "code" && u)
|
|
7533
|
+
g = Yl[u];
|
|
7486
7534
|
else
|
|
7487
7535
|
return;
|
|
7488
|
-
const _ =
|
|
7536
|
+
const _ = g(d, m);
|
|
7489
7537
|
if (!_)
|
|
7490
7538
|
return;
|
|
7491
7539
|
let S, A = !1;
|
|
7492
7540
|
if (_.lang ? t.getLoadedLanguages().includes(_.lang) || xo(_.lang) ? S = _.lang : c ? (A = !0, S = _.lang) : a && (S = a) : S = s, !S)
|
|
7493
7541
|
return;
|
|
7494
|
-
const D = _.meta ? r?.(_.meta,
|
|
7542
|
+
const D = _.meta ? r?.(_.meta, m, d) : void 0, L = (j) => {
|
|
7495
7543
|
const Z = p(j, _.code, _.meta, D ?? {});
|
|
7496
7544
|
if (Z) {
|
|
7497
7545
|
if (_.type === "inline") {
|
|
7498
7546
|
const ee = Z.children[0];
|
|
7499
7547
|
ee.type === "element" && ee.tagName === "pre" && (ee.tagName = "span");
|
|
7500
7548
|
}
|
|
7501
|
-
y.children[
|
|
7549
|
+
y.children[b] = Z;
|
|
7502
7550
|
}
|
|
7503
7551
|
};
|
|
7504
7552
|
if (A)
|
|
@@ -7515,14 +7563,14 @@ function Zl(t, e) {
|
|
|
7515
7563
|
L(S);
|
|
7516
7564
|
return "skip";
|
|
7517
7565
|
}), f.length > 0) {
|
|
7518
|
-
async function
|
|
7566
|
+
async function m() {
|
|
7519
7567
|
await Promise.all(f);
|
|
7520
7568
|
}
|
|
7521
|
-
return
|
|
7569
|
+
return m();
|
|
7522
7570
|
}
|
|
7523
7571
|
};
|
|
7524
7572
|
}
|
|
7525
|
-
function
|
|
7573
|
+
function eu(t) {
|
|
7526
7574
|
if (!t)
|
|
7527
7575
|
return null;
|
|
7528
7576
|
const e = t.match(/\{([\d,-]+)\}/);
|
|
@@ -7532,7 +7580,7 @@ function Ql(t) {
|
|
|
7532
7580
|
}) : null;
|
|
7533
7581
|
}
|
|
7534
7582
|
const lr = Symbol("highlighted-lines");
|
|
7535
|
-
function
|
|
7583
|
+
function tu(t = {}) {
|
|
7536
7584
|
const {
|
|
7537
7585
|
className: e = "highlighted"
|
|
7538
7586
|
} = t;
|
|
@@ -7542,14 +7590,14 @@ function eu(t = {}) {
|
|
|
7542
7590
|
if (!this.options.meta?.__raw)
|
|
7543
7591
|
return;
|
|
7544
7592
|
const o = this.meta;
|
|
7545
|
-
return o[lr] ??=
|
|
7593
|
+
return o[lr] ??= eu(this.options.meta.__raw), (o[lr] ?? []).includes(r) && this.addClassToHast(n, e), n;
|
|
7546
7594
|
}
|
|
7547
7595
|
};
|
|
7548
7596
|
}
|
|
7549
|
-
function
|
|
7597
|
+
function nu(t) {
|
|
7550
7598
|
return t ? Array.from(t.matchAll(/\/((?:\\.|[^/])+)\//g)).map((n) => n[1].replace(/\\(.)/g, "$1")) : [];
|
|
7551
7599
|
}
|
|
7552
|
-
function
|
|
7600
|
+
function ru(t = {}) {
|
|
7553
7601
|
const {
|
|
7554
7602
|
className: e = "highlighted-word"
|
|
7555
7603
|
} = t;
|
|
@@ -7558,10 +7606,10 @@ function nu(t = {}) {
|
|
|
7558
7606
|
preprocess(n, r) {
|
|
7559
7607
|
if (!this.options.meta?.__raw)
|
|
7560
7608
|
return;
|
|
7561
|
-
const o =
|
|
7609
|
+
const o = nu(this.options.meta.__raw);
|
|
7562
7610
|
r.decorations ||= [];
|
|
7563
7611
|
for (const s of o) {
|
|
7564
|
-
const a =
|
|
7612
|
+
const a = ou(n, s);
|
|
7565
7613
|
for (const i of a)
|
|
7566
7614
|
r.decorations.push({
|
|
7567
7615
|
start: i,
|
|
@@ -7574,7 +7622,7 @@ function nu(t = {}) {
|
|
|
7574
7622
|
}
|
|
7575
7623
|
};
|
|
7576
7624
|
}
|
|
7577
|
-
function
|
|
7625
|
+
function ou(t, e) {
|
|
7578
7626
|
const n = [];
|
|
7579
7627
|
let r = 0;
|
|
7580
7628
|
for (; ; ) {
|
|
@@ -7589,7 +7637,7 @@ function Pe(t) {
|
|
|
7589
7637
|
if ([...t].length !== 1) throw new Error(`Expected "${t}" to be a single code point`);
|
|
7590
7638
|
return t.codePointAt(0);
|
|
7591
7639
|
}
|
|
7592
|
-
function
|
|
7640
|
+
function su(t, e, n) {
|
|
7593
7641
|
return t.has(e) || t.set(e, n), t.get(e);
|
|
7594
7642
|
}
|
|
7595
7643
|
const vn = /* @__PURE__ */ new Set(["alnum", "alpha", "ascii", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"]), B = String.raw;
|
|
@@ -7629,10 +7677,10 @@ const To = B`\[\^?`, Mo = `c.? | C(?:-.?)?|${B`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x
|
|
|
7629
7677
|
| &&
|
|
7630
7678
|
| .
|
|
7631
7679
|
`.replace(/\s+/g, ""), "gsu");
|
|
7632
|
-
function
|
|
7680
|
+
function au(t, e = {}) {
|
|
7633
7681
|
const n = { flags: "", ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } };
|
|
7634
7682
|
if (typeof t != "string") throw new Error("String expected as pattern");
|
|
7635
|
-
const r =
|
|
7683
|
+
const r = xu(n.flags), o = [r.extended], s = { captureGroup: n.rules.captureGroup, getCurrentModX() {
|
|
7636
7684
|
return o.at(-1);
|
|
7637
7685
|
}, numOpenGroups: 0, popModX() {
|
|
7638
7686
|
o.pop();
|
|
@@ -7643,7 +7691,7 @@ function su(t, e = {}) {
|
|
|
7643
7691
|
}, singleline: n.rules.singleline };
|
|
7644
7692
|
let a = [], i;
|
|
7645
7693
|
for (et.lastIndex = 0; i = et.exec(t); ) {
|
|
7646
|
-
const h =
|
|
7694
|
+
const h = iu(s, t, i[0], et.lastIndex);
|
|
7647
7695
|
h.tokens ? a.push(...h.tokens) : h.token && a.push(h.token), h.lastIndex !== void 0 && (et.lastIndex = h.lastIndex);
|
|
7648
7696
|
}
|
|
7649
7697
|
const l = [];
|
|
@@ -7654,19 +7702,19 @@ function su(t, e = {}) {
|
|
|
7654
7702
|
h.kind = "capturing", h.number = p + 1;
|
|
7655
7703
|
});
|
|
7656
7704
|
const c = u || l.length;
|
|
7657
|
-
return { tokens: a.map((h) => h.type === "EscapedNumber" ?
|
|
7705
|
+
return { tokens: a.map((h) => h.type === "EscapedNumber" ? Au(h, c) : h).flat(), flags: r };
|
|
7658
7706
|
}
|
|
7659
|
-
function
|
|
7707
|
+
function iu(t, e, n, r) {
|
|
7660
7708
|
const [o, s] = n;
|
|
7661
7709
|
if (n === "[" || n === "[^") {
|
|
7662
|
-
const a =
|
|
7710
|
+
const a = lu(e, n, r);
|
|
7663
7711
|
return { tokens: a.tokens, lastIndex: a.lastIndex };
|
|
7664
7712
|
}
|
|
7665
7713
|
if (o === "\\") {
|
|
7666
7714
|
if ("AbBGyYzZ".includes(s)) return { token: ur(n, n) };
|
|
7667
7715
|
if (/^\\g[<']/.test(n)) {
|
|
7668
7716
|
if (!/^\\g(?:<[^>]+>|'[^']+')$/.test(n)) throw new Error(`Invalid group name "${n}"`);
|
|
7669
|
-
return { token:
|
|
7717
|
+
return { token: bu(n) };
|
|
7670
7718
|
}
|
|
7671
7719
|
if (/^\\k[<']/.test(n)) {
|
|
7672
7720
|
if (!/^\\k(?:<[^>]+>|'[^']+')$/.test(n)) throw new Error(`Invalid group name "${n}"`);
|
|
@@ -7680,13 +7728,13 @@ function au(t, e, n, r) {
|
|
|
7680
7728
|
return Array.isArray(a) ? { tokens: a } : { token: a };
|
|
7681
7729
|
}
|
|
7682
7730
|
if (o === "(") {
|
|
7683
|
-
if (s === "*") return { token:
|
|
7731
|
+
if (s === "*") return { token: Su(n) };
|
|
7684
7732
|
if (n === "(?{") throw new Error(`Unsupported callout "${n}"`);
|
|
7685
7733
|
if (n.startsWith("(?#")) {
|
|
7686
7734
|
if (e[r] !== ")") throw new Error('Unclosed comment group "(?#"');
|
|
7687
7735
|
return { lastIndex: r + 1 };
|
|
7688
7736
|
}
|
|
7689
|
-
if (/^\(\?[-imx]+[:)]$/.test(n)) return { token:
|
|
7737
|
+
if (/^\(\?[-imx]+[:)]$/.test(n)) return { token: _u(n, t) };
|
|
7690
7738
|
if (t.pushModX(t.getCurrentModX()), t.numOpenGroups++, n === "(" && !t.captureGroup || n === "(?:") return { token: Se("group", n) };
|
|
7691
7739
|
if (n === "(?>") return { token: Se("atomic", n) };
|
|
7692
7740
|
if (n === "(?=" || n === "(?!" || n === "(?<=" || n === "(?<!") return { token: Se(n[2] === "<" ? "lookbehind" : "lookahead", n, { negate: n.endsWith("!") }) };
|
|
@@ -7699,7 +7747,7 @@ function au(t, e, n, r) {
|
|
|
7699
7747
|
}
|
|
7700
7748
|
if (n === ")") {
|
|
7701
7749
|
if (t.popModX(), t.numOpenGroups--, t.numOpenGroups < 0) throw new Error('Unmatched ")"');
|
|
7702
|
-
return { token:
|
|
7750
|
+
return { token: gu(n) };
|
|
7703
7751
|
}
|
|
7704
7752
|
if (t.getCurrentModX()) {
|
|
7705
7753
|
if (n === "#") {
|
|
@@ -7717,9 +7765,9 @@ function au(t, e, n, r) {
|
|
|
7717
7765
|
const a = t.singleline ? { "^": B`\A`, $: B`\Z` }[n] : n;
|
|
7718
7766
|
return { token: ur(a, n) };
|
|
7719
7767
|
}
|
|
7720
|
-
return n === "|" ? { token:
|
|
7768
|
+
return n === "|" ? { token: cu(n) } : xn.test(n) ? { tokens: Ru(n) } : { token: se(Pe(n), n) };
|
|
7721
7769
|
}
|
|
7722
|
-
function
|
|
7770
|
+
function lu(t, e, n) {
|
|
7723
7771
|
const r = [cr(e[1] === "^", e)];
|
|
7724
7772
|
let o = 1, s;
|
|
7725
7773
|
for (Ot.lastIndex = n; s = Ot.exec(t); ) {
|
|
@@ -7727,31 +7775,31 @@ function iu(t, e, n) {
|
|
|
7727
7775
|
if (a[0] === "[" && a[1] !== ":") o++, r.push(cr(a[1] === "^", a));
|
|
7728
7776
|
else if (a === "]") {
|
|
7729
7777
|
if (r.at(-1).type === "CharacterClassOpen") r.push(se(93, a));
|
|
7730
|
-
else if (o--, r.push(
|
|
7778
|
+
else if (o--, r.push(hu(a)), !o) break;
|
|
7731
7779
|
} else {
|
|
7732
|
-
const i =
|
|
7780
|
+
const i = uu(a);
|
|
7733
7781
|
Array.isArray(i) ? r.push(...i) : r.push(i);
|
|
7734
7782
|
}
|
|
7735
7783
|
}
|
|
7736
7784
|
return { tokens: r, lastIndex: Ot.lastIndex || t.length };
|
|
7737
7785
|
}
|
|
7738
|
-
function
|
|
7786
|
+
function uu(t) {
|
|
7739
7787
|
if (t[0] === "\\") return Oo(t, { inCharClass: !0 });
|
|
7740
7788
|
if (t[0] === "[") {
|
|
7741
7789
|
const e = /\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);
|
|
7742
7790
|
if (!e || !vn.has(e.groups.name)) throw new Error(`Invalid POSIX class "${t}"`);
|
|
7743
7791
|
return ge("posix", t, { value: e.groups.name, negate: !!e.groups.negate });
|
|
7744
7792
|
}
|
|
7745
|
-
return t === "-" ?
|
|
7793
|
+
return t === "-" ? pu(t) : t === "&&" ? fu(t) : se(Pe(t), t);
|
|
7746
7794
|
}
|
|
7747
7795
|
function Oo(t, { inCharClass: e }) {
|
|
7748
7796
|
const n = t[1];
|
|
7749
7797
|
if (n === "c" || n === "C") return wu(t);
|
|
7750
|
-
if ("dDhHsSwW".includes(n)) return
|
|
7798
|
+
if ("dDhHsSwW".includes(n)) return ku(t);
|
|
7751
7799
|
if (t.startsWith(B`\o{`)) throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);
|
|
7752
7800
|
if (/^\\[pP]\{/.test(t)) {
|
|
7753
7801
|
if (t.length === 3) throw new Error(`Incomplete or invalid Unicode property "${t}"`);
|
|
7754
|
-
return
|
|
7802
|
+
return vu(t);
|
|
7755
7803
|
}
|
|
7756
7804
|
if (/^\\x[89A-Fa-f]\p{AHex}/u.test(t)) try {
|
|
7757
7805
|
const r = t.split(/\\x/).slice(1).map((a) => parseInt(a, 16)), o = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }).decode(new Uint8Array(r)), s = new TextEncoder();
|
|
@@ -7762,15 +7810,15 @@ function Oo(t, { inCharClass: e }) {
|
|
|
7762
7810
|
} catch {
|
|
7763
7811
|
throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`);
|
|
7764
7812
|
}
|
|
7765
|
-
if (n === "u" || n === "x") return se(
|
|
7813
|
+
if (n === "u" || n === "x") return se(Eu(t), t);
|
|
7766
7814
|
if (hr.has(n)) return se(hr.get(n), t);
|
|
7767
|
-
if (/\d/.test(n)) return
|
|
7815
|
+
if (/\d/.test(n)) return du(e, t);
|
|
7768
7816
|
if (t === "\\") throw new Error(B`Incomplete escape "\"`);
|
|
7769
7817
|
if (n === "M") throw new Error(`Unsupported meta "${t}"`);
|
|
7770
7818
|
if ([...t].length === 2) return se(t.codePointAt(1), t);
|
|
7771
7819
|
throw new Error(`Unexpected escape "${t}"`);
|
|
7772
7820
|
}
|
|
7773
|
-
function
|
|
7821
|
+
function cu(t) {
|
|
7774
7822
|
return { type: "Alternator", raw: t };
|
|
7775
7823
|
}
|
|
7776
7824
|
function ur(t, e) {
|
|
@@ -7782,10 +7830,10 @@ function Do(t) {
|
|
|
7782
7830
|
function se(t, e) {
|
|
7783
7831
|
return { type: "Character", value: t, raw: e };
|
|
7784
7832
|
}
|
|
7785
|
-
function
|
|
7833
|
+
function hu(t) {
|
|
7786
7834
|
return { type: "CharacterClassClose", raw: t };
|
|
7787
7835
|
}
|
|
7788
|
-
function
|
|
7836
|
+
function pu(t) {
|
|
7789
7837
|
return { type: "CharacterClassHyphen", raw: t };
|
|
7790
7838
|
}
|
|
7791
7839
|
function fu(t) {
|
|
@@ -7800,45 +7848,45 @@ function ge(t, e, n = {}) {
|
|
|
7800
7848
|
function Go(t, e, n = {}) {
|
|
7801
7849
|
return t === "keep" ? { type: "Directive", kind: t, raw: e } : { type: "Directive", kind: t, flags: $e(n.flags), raw: e };
|
|
7802
7850
|
}
|
|
7803
|
-
function
|
|
7851
|
+
function du(t, e) {
|
|
7804
7852
|
return { type: "EscapedNumber", inCharClass: t, raw: e };
|
|
7805
7853
|
}
|
|
7806
|
-
function
|
|
7854
|
+
function gu(t) {
|
|
7807
7855
|
return { type: "GroupClose", raw: t };
|
|
7808
7856
|
}
|
|
7809
7857
|
function Se(t, e, n = {}) {
|
|
7810
7858
|
return { type: "GroupOpen", kind: t, ...n, raw: e };
|
|
7811
7859
|
}
|
|
7812
|
-
function
|
|
7860
|
+
function mu(t, e, n, r) {
|
|
7813
7861
|
return { type: "NamedCallout", kind: t, tag: e, arguments: n, raw: r };
|
|
7814
7862
|
}
|
|
7815
|
-
function
|
|
7863
|
+
function yu(t, e, n, r) {
|
|
7816
7864
|
return { type: "Quantifier", kind: t, min: e, max: n, raw: r };
|
|
7817
7865
|
}
|
|
7818
|
-
function
|
|
7866
|
+
function bu(t) {
|
|
7819
7867
|
return { type: "Subroutine", raw: t };
|
|
7820
7868
|
}
|
|
7821
|
-
const
|
|
7869
|
+
const Cu = /* @__PURE__ */ new Set(["COUNT", "CMP", "ERROR", "FAIL", "MAX", "MISMATCH", "SKIP", "TOTAL_COUNT"]), hr = /* @__PURE__ */ new Map([["a", 7], ["b", 8], ["e", 27], ["f", 12], ["n", 10], ["r", 13], ["t", 9], ["v", 11]]);
|
|
7822
7870
|
function wu(t) {
|
|
7823
7871
|
const e = t[1] === "c" ? t[2] : t[3];
|
|
7824
7872
|
if (!e || !/[A-Za-z]/.test(e)) throw new Error(`Unsupported control character "${t}"`);
|
|
7825
7873
|
return se(Pe(e.toUpperCase()) - 64, t);
|
|
7826
7874
|
}
|
|
7827
|
-
function
|
|
7875
|
+
function _u(t, e) {
|
|
7828
7876
|
let { on: n, off: r } = /^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;
|
|
7829
7877
|
r ??= "";
|
|
7830
|
-
const o = (e.getCurrentModX() || n.includes("x")) && !r.includes("x"), s =
|
|
7878
|
+
const o = (e.getCurrentModX() || n.includes("x")) && !r.includes("x"), s = fr(n), a = fr(r), i = {};
|
|
7831
7879
|
if (s && (i.enable = s), a && (i.disable = a), t.endsWith(")")) return e.replaceCurrentModX(o), Go("flags", t, { flags: i });
|
|
7832
7880
|
if (t.endsWith(":")) return e.pushModX(o), e.numOpenGroups++, Se("group", t, { ...(s || a) && { flags: i } });
|
|
7833
7881
|
throw new Error(`Unexpected flag modifier "${t}"`);
|
|
7834
7882
|
}
|
|
7835
|
-
function
|
|
7883
|
+
function Su(t) {
|
|
7836
7884
|
const e = /\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);
|
|
7837
7885
|
if (!e) throw new Error(`Incomplete or invalid named callout "${t}"`);
|
|
7838
7886
|
const { name: n, tag: r, args: o } = e.groups;
|
|
7839
7887
|
if (!n) throw new Error(`Invalid named callout "${t}"`);
|
|
7840
7888
|
if (r === "") throw new Error(`Named callout tag with empty value not allowed "${t}"`);
|
|
7841
|
-
const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u =
|
|
7889
|
+
const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u = Cu.has(n) ? n.toLowerCase() : "custom";
|
|
7842
7890
|
switch (u) {
|
|
7843
7891
|
case "fail":
|
|
7844
7892
|
case "mismatch":
|
|
@@ -7870,9 +7918,9 @@ function _u(t) {
|
|
|
7870
7918
|
default:
|
|
7871
7919
|
throw new Error(`Unexpected named callout kind "${u}"`);
|
|
7872
7920
|
}
|
|
7873
|
-
return
|
|
7921
|
+
return mu(u, r ?? null, o?.split(",") ?? null, t);
|
|
7874
7922
|
}
|
|
7875
|
-
function
|
|
7923
|
+
function pr(t) {
|
|
7876
7924
|
let e = null, n, r;
|
|
7877
7925
|
if (t[0] === "{") {
|
|
7878
7926
|
const { minStr: o, maxStr: s } = /^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups, a = 1e5;
|
|
@@ -7882,21 +7930,21 @@ function fr(t) {
|
|
|
7882
7930
|
e = "lazy";
|
|
7883
7931
|
} else e || (e = "greedy");
|
|
7884
7932
|
} else n = t[0] === "+" ? 1 : 0, r = t[0] === "?" ? 1 : 1 / 0, e = t[1] === "+" ? "possessive" : t[1] === "?" ? "lazy" : "greedy";
|
|
7885
|
-
return
|
|
7933
|
+
return yu(e, n, r, t);
|
|
7886
7934
|
}
|
|
7887
|
-
function
|
|
7935
|
+
function ku(t) {
|
|
7888
7936
|
const e = t[1].toLowerCase();
|
|
7889
7937
|
return ge({ d: "digit", h: "hex", s: "space", w: "word" }[e], t, { negate: t[1] !== e });
|
|
7890
7938
|
}
|
|
7891
|
-
function
|
|
7939
|
+
function vu(t) {
|
|
7892
7940
|
const { p: e, neg: n, value: r } = /^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;
|
|
7893
7941
|
return ge("property", t, { value: r, negate: e === "P" && !n || e === "p" && !!n });
|
|
7894
7942
|
}
|
|
7895
|
-
function
|
|
7943
|
+
function fr(t) {
|
|
7896
7944
|
const e = {};
|
|
7897
7945
|
return t.includes("i") && (e.ignoreCase = !0), t.includes("m") && (e.dotAll = !0), t.includes("x") && (e.extended = !0), Object.keys(e).length ? e : null;
|
|
7898
7946
|
}
|
|
7899
|
-
function
|
|
7947
|
+
function xu(t) {
|
|
7900
7948
|
const e = { ignoreCase: !1, dotAll: !1, extended: !1, digitIsAscii: !1, posixIsAscii: !1, spaceIsAscii: !1, wordIsAscii: !1, textSegmentMode: null };
|
|
7901
7949
|
for (let n = 0; n < t.length; n++) {
|
|
7902
7950
|
const r = t[n];
|
|
@@ -7910,12 +7958,12 @@ function vu(t) {
|
|
|
7910
7958
|
}
|
|
7911
7959
|
return e;
|
|
7912
7960
|
}
|
|
7913
|
-
function
|
|
7961
|
+
function Eu(t) {
|
|
7914
7962
|
if (/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(t)) throw new Error(`Incomplete or invalid escape "${t}"`);
|
|
7915
7963
|
const e = t[2] === "{" ? /^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(t).groups.hex : t.slice(2);
|
|
7916
7964
|
return parseInt(e, 16);
|
|
7917
7965
|
}
|
|
7918
|
-
function
|
|
7966
|
+
function Au(t, e) {
|
|
7919
7967
|
const { raw: n, inCharClass: r } = t, o = n.slice(1);
|
|
7920
7968
|
if (!r && (o !== "0" && o.length === 1 || o[0] !== "0" && +o <= e)) return [Do(n)];
|
|
7921
7969
|
const s = [], a = o.match(/^[0-7]+|\d/g);
|
|
@@ -7929,7 +7977,7 @@ function Eu(t, e) {
|
|
|
7929
7977
|
}
|
|
7930
7978
|
return s;
|
|
7931
7979
|
}
|
|
7932
|
-
function
|
|
7980
|
+
function Ru(t) {
|
|
7933
7981
|
const e = [], n = new RegExp(xn, "gy");
|
|
7934
7982
|
let r;
|
|
7935
7983
|
for (; r = n.exec(t); ) {
|
|
@@ -7939,12 +7987,12 @@ function Au(t) {
|
|
|
7939
7987
|
if (s) {
|
|
7940
7988
|
const { min: a, max: i } = s.groups;
|
|
7941
7989
|
if (+a > +i && o.endsWith("?")) {
|
|
7942
|
-
n.lastIndex--, e.push(
|
|
7990
|
+
n.lastIndex--, e.push(pr(o.slice(0, -1)));
|
|
7943
7991
|
continue;
|
|
7944
7992
|
}
|
|
7945
7993
|
}
|
|
7946
7994
|
}
|
|
7947
|
-
e.push(
|
|
7995
|
+
e.push(pr(o));
|
|
7948
7996
|
}
|
|
7949
7997
|
return e;
|
|
7950
7998
|
}
|
|
@@ -7954,42 +8002,42 @@ function Fo(t, e) {
|
|
|
7954
8002
|
const n = t.body[0];
|
|
7955
8003
|
return !e || Object.keys(e).every((r) => e[r] === n[r]);
|
|
7956
8004
|
}
|
|
7957
|
-
function
|
|
7958
|
-
return
|
|
8005
|
+
function Iu(t) {
|
|
8006
|
+
return Nu.has(t.type);
|
|
7959
8007
|
}
|
|
7960
|
-
const
|
|
8008
|
+
const Nu = /* @__PURE__ */ new Set(["AbsenceFunction", "Backreference", "CapturingGroup", "Character", "CharacterClass", "CharacterSet", "Group", "Quantifier", "Subroutine"]);
|
|
7961
8009
|
function Bo(t, e = {}) {
|
|
7962
|
-
const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r =
|
|
8010
|
+
const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r = au(t, { flags: n.flags, rules: { captureGroup: n.rules.captureGroup, singleline: n.rules.singleline } }), o = (p, d) => {
|
|
7963
8011
|
const f = r.tokens[s.nextIndex];
|
|
7964
8012
|
switch (s.parent = p, s.nextIndex++, f.type) {
|
|
7965
8013
|
case "Alternator":
|
|
7966
8014
|
return me();
|
|
7967
8015
|
case "Assertion":
|
|
7968
|
-
return
|
|
8016
|
+
return Lu(f);
|
|
7969
8017
|
case "Backreference":
|
|
7970
|
-
return
|
|
8018
|
+
return Pu(f, s);
|
|
7971
8019
|
case "Character":
|
|
7972
8020
|
return vt(f.value, { useLastValid: !!d.isCheckingRangeEnd });
|
|
7973
8021
|
case "CharacterClassHyphen":
|
|
7974
|
-
return Pu(f, s, d);
|
|
7975
|
-
case "CharacterClassOpen":
|
|
7976
8022
|
return $u(f, s, d);
|
|
8023
|
+
case "CharacterClassOpen":
|
|
8024
|
+
return Tu(f, s, d);
|
|
7977
8025
|
case "CharacterSet":
|
|
7978
|
-
return
|
|
8026
|
+
return Mu(f, s);
|
|
7979
8027
|
case "Directive":
|
|
7980
|
-
return
|
|
8028
|
+
return ju(f.kind, { flags: f.flags });
|
|
7981
8029
|
case "GroupOpen":
|
|
7982
|
-
return
|
|
8030
|
+
return Ou(f, s, d);
|
|
7983
8031
|
case "NamedCallout":
|
|
7984
|
-
return
|
|
8032
|
+
return zu(f.kind, f.tag, f.arguments);
|
|
7985
8033
|
case "Quantifier":
|
|
7986
|
-
return Ou(f, s);
|
|
7987
|
-
case "Subroutine":
|
|
7988
8034
|
return Du(f, s);
|
|
8035
|
+
case "Subroutine":
|
|
8036
|
+
return Gu(f, s);
|
|
7989
8037
|
default:
|
|
7990
8038
|
throw new Error(`Unexpected token type "${f.type}"`);
|
|
7991
8039
|
}
|
|
7992
|
-
}, s = { capturingGroups: [], hasNumberedRef: !1, namedGroupsByName: /* @__PURE__ */ new Map(), nextIndex: 0, normalizeUnknownPropertyNames: n.normalizeUnknownPropertyNames, parent: null, skipBackrefValidation: n.skipBackrefValidation, skipLookbehindValidation: n.skipLookbehindValidation, skipPropertyNameValidation: n.skipPropertyNameValidation, subroutines: [], tokens: r.tokens, unicodePropertyMap: n.unicodePropertyMap, walk: o }, a =
|
|
8040
|
+
}, s = { capturingGroups: [], hasNumberedRef: !1, namedGroupsByName: /* @__PURE__ */ new Map(), nextIndex: 0, normalizeUnknownPropertyNames: n.normalizeUnknownPropertyNames, parent: null, skipBackrefValidation: n.skipBackrefValidation, skipLookbehindValidation: n.skipLookbehindValidation, skipPropertyNameValidation: n.skipPropertyNameValidation, subroutines: [], tokens: r.tokens, unicodePropertyMap: n.unicodePropertyMap, walk: o }, a = Wu(Uu(r.flags));
|
|
7993
8041
|
let i = a.body[0];
|
|
7994
8042
|
for (; s.nextIndex < r.tokens.length; ) {
|
|
7995
8043
|
const p = o(i, {});
|
|
@@ -8006,10 +8054,10 @@ function Bo(t, e = {}) {
|
|
|
8006
8054
|
} else throw new Error(B`Subroutine uses a group name that's not defined "\g<${p}>"`);
|
|
8007
8055
|
return a;
|
|
8008
8056
|
}
|
|
8009
|
-
function
|
|
8057
|
+
function Lu({ kind: t }) {
|
|
8010
8058
|
return on($e({ "^": "line_start", $: "line_end", "\\A": "string_start", "\\b": "word_boundary", "\\B": "word_boundary", "\\G": "search_start", "\\y": "text_segment_boundary", "\\Y": "text_segment_boundary", "\\z": "string_end", "\\Z": "string_end_newline" }[t], `Unexpected assertion kind "${t}"`), { negate: t === B`\B` || t === B`\Y` });
|
|
8011
8059
|
}
|
|
8012
|
-
function
|
|
8060
|
+
function Pu({ raw: t }, e) {
|
|
8013
8061
|
const n = /^\\k[<']/.test(t), r = n ? t.slice(3, -1) : t.slice(1), o = (s, a = !1) => {
|
|
8014
8062
|
const i = e.capturingGroups.length;
|
|
8015
8063
|
let l = !1;
|
|
@@ -8026,16 +8074,16 @@ function Lu({ raw: t }, e) {
|
|
|
8026
8074
|
}
|
|
8027
8075
|
return o(+r);
|
|
8028
8076
|
}
|
|
8029
|
-
function
|
|
8077
|
+
function $u(t, e, n) {
|
|
8030
8078
|
const { tokens: r, walk: o } = e, s = e.parent, a = s.body.at(-1), i = r[e.nextIndex];
|
|
8031
8079
|
if (!n.isCheckingRangeEnd && a && a.type !== "CharacterClass" && a.type !== "CharacterClassRange" && i && i.type !== "CharacterClassOpen" && i.type !== "CharacterClassClose" && i.type !== "CharacterClassIntersector") {
|
|
8032
8080
|
const l = o(s, { ...n, isCheckingRangeEnd: !0 });
|
|
8033
|
-
if (a.type === "Character" && l.type === "Character") return s.body.pop(),
|
|
8081
|
+
if (a.type === "Character" && l.type === "Character") return s.body.pop(), Bu(a, l);
|
|
8034
8082
|
throw new Error("Invalid character class range");
|
|
8035
8083
|
}
|
|
8036
8084
|
return vt(Pe("-"));
|
|
8037
8085
|
}
|
|
8038
|
-
function
|
|
8086
|
+
function Tu({ negate: t }, e, n) {
|
|
8039
8087
|
const { tokens: r, walk: o } = e, s = r[e.nextIndex], a = [st()];
|
|
8040
8088
|
let i = mr(s);
|
|
8041
8089
|
for (; i.type !== "CharacterClassClose"; ) {
|
|
@@ -8049,41 +8097,41 @@ function $u({ negate: t }, e, n) {
|
|
|
8049
8097
|
const l = st({ negate: t });
|
|
8050
8098
|
return a.length === 1 ? l.body = a[0].body : (l.kind = "intersection", l.body = a.map((u) => u.body.length === 1 ? u.body[0] : u)), e.nextIndex++, l;
|
|
8051
8099
|
}
|
|
8052
|
-
function
|
|
8100
|
+
function Mu({ kind: t, negate: e, value: n }, r) {
|
|
8053
8101
|
const { normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a } = r;
|
|
8054
8102
|
if (t === "property") {
|
|
8055
8103
|
const i = xt(n);
|
|
8056
8104
|
if (vn.has(i) && !a?.has(i)) t = "posix", n = i;
|
|
8057
8105
|
else return ke(n, { negate: e, normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a });
|
|
8058
8106
|
}
|
|
8059
|
-
return t === "posix" ?
|
|
8107
|
+
return t === "posix" ? Hu(n, { negate: e }) : an(t, { negate: e });
|
|
8060
8108
|
}
|
|
8061
|
-
function
|
|
8062
|
-
const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l =
|
|
8063
|
-
if (l.type === "CapturingGroup" && (o.push(l), l.name &&
|
|
8109
|
+
function Ou(t, e, n) {
|
|
8110
|
+
const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l = Vu(t), u = l.type === "AbsenceFunction", c = gr(l), h = c && l.negate;
|
|
8111
|
+
if (l.type === "CapturingGroup" && (o.push(l), l.name && su(s, l.name, []).push(l)), u && n.isInAbsenceFunction) throw new Error("Nested absence function not supported by Oniguruma");
|
|
8064
8112
|
let p = yr(r[e.nextIndex]);
|
|
8065
8113
|
for (; p.type !== "GroupClose"; ) {
|
|
8066
8114
|
if (p.type === "Alternator") l.body.push(me()), e.nextIndex++;
|
|
8067
8115
|
else {
|
|
8068
8116
|
const d = l.body.at(-1), f = i(d, { ...n, isInAbsenceFunction: n.isInAbsenceFunction || u, isInLookbehind: n.isInLookbehind || c, isInNegLookbehind: n.isInNegLookbehind || h });
|
|
8069
8117
|
if (d.body.push(f), (c || n.isInLookbehind) && !a) {
|
|
8070
|
-
const
|
|
8118
|
+
const m = "Lookbehind includes a pattern not allowed by Oniguruma";
|
|
8071
8119
|
if (h || n.isInNegLookbehind) {
|
|
8072
|
-
if (dr(f) || f.type === "CapturingGroup") throw new Error(
|
|
8073
|
-
} else if (dr(f) || gr(f) && f.negate) throw new Error(
|
|
8120
|
+
if (dr(f) || f.type === "CapturingGroup") throw new Error(m);
|
|
8121
|
+
} else if (dr(f) || gr(f) && f.negate) throw new Error(m);
|
|
8074
8122
|
}
|
|
8075
8123
|
}
|
|
8076
8124
|
p = yr(r[e.nextIndex]);
|
|
8077
8125
|
}
|
|
8078
8126
|
return e.nextIndex++, l;
|
|
8079
8127
|
}
|
|
8080
|
-
function
|
|
8128
|
+
function Du({ kind: t, min: e, max: n }, r) {
|
|
8081
8129
|
const o = r.parent, s = o.body.at(-1);
|
|
8082
|
-
if (!s || !
|
|
8130
|
+
if (!s || !Iu(s)) throw new Error("Quantifier requires a repeatable token");
|
|
8083
8131
|
const a = Uo(t, e, n, s);
|
|
8084
8132
|
return o.body.pop(), a;
|
|
8085
8133
|
}
|
|
8086
|
-
function
|
|
8134
|
+
function Gu({ raw: t }, e) {
|
|
8087
8135
|
const { capturingGroups: n, subroutines: r } = e;
|
|
8088
8136
|
let o = t.slice(3, -1);
|
|
8089
8137
|
const s = /^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);
|
|
@@ -8094,7 +8142,7 @@ function Du({ raw: t }, e) {
|
|
|
8094
8142
|
const a = zo(o);
|
|
8095
8143
|
return r.push(a), a;
|
|
8096
8144
|
}
|
|
8097
|
-
function
|
|
8145
|
+
function Fu(t, e) {
|
|
8098
8146
|
return { type: "AbsenceFunction", kind: t, body: Ye(e?.body) };
|
|
8099
8147
|
}
|
|
8100
8148
|
function me(t) {
|
|
@@ -8110,7 +8158,7 @@ function sn(t, e) {
|
|
|
8110
8158
|
}
|
|
8111
8159
|
function jo(t, e) {
|
|
8112
8160
|
const n = { name: void 0, isSubroutined: !1, ...e };
|
|
8113
|
-
if (n.name !== void 0 && !
|
|
8161
|
+
if (n.name !== void 0 && !qu(n.name)) throw new Error(`Group name "${n.name}" invalid in Oniguruma`);
|
|
8114
8162
|
return { type: "CapturingGroup", number: t, ...n.name && { name: n.name }, ...n.isSubroutined && { isSubroutined: n.isSubroutined }, body: Ye(e?.body) };
|
|
8115
8163
|
}
|
|
8116
8164
|
function vt(t, e) {
|
|
@@ -8126,7 +8174,7 @@ function st(t) {
|
|
|
8126
8174
|
const e = { kind: "union", negate: !1, ...t };
|
|
8127
8175
|
return { type: "CharacterClass", kind: e.kind, negate: e.negate, body: Ho(t?.body) };
|
|
8128
8176
|
}
|
|
8129
|
-
function
|
|
8177
|
+
function Bu(t, e) {
|
|
8130
8178
|
if (e.value < t.value) throw new Error("Character class range out of order");
|
|
8131
8179
|
return { type: "CharacterClassRange", min: t, max: e };
|
|
8132
8180
|
}
|
|
@@ -8134,12 +8182,12 @@ function an(t, e) {
|
|
|
8134
8182
|
const n = !!e?.negate, r = { type: "CharacterSet", kind: t };
|
|
8135
8183
|
return (t === "digit" || t === "hex" || t === "newline" || t === "space" || t === "word") && (r.negate = n), (t === "text_segment" || t === "newline" && !n) && (r.variableLength = !0), r;
|
|
8136
8184
|
}
|
|
8137
|
-
function
|
|
8185
|
+
function ju(t, e = {}) {
|
|
8138
8186
|
if (t === "keep") return { type: "Directive", kind: t };
|
|
8139
8187
|
if (t === "flags") return { type: "Directive", kind: t, flags: $e(e.flags) };
|
|
8140
8188
|
throw new Error(`Unexpected directive kind "${t}"`);
|
|
8141
8189
|
}
|
|
8142
|
-
function
|
|
8190
|
+
function Uu(t) {
|
|
8143
8191
|
return { type: "Flags", ...t };
|
|
8144
8192
|
}
|
|
8145
8193
|
function Q(t) {
|
|
@@ -8147,14 +8195,14 @@ function Q(t) {
|
|
|
8147
8195
|
if (e && n) throw new Error("Atomic group cannot have flags");
|
|
8148
8196
|
return { type: "Group", ...e && { atomic: e }, ...n && { flags: n }, body: Ye(t?.body) };
|
|
8149
8197
|
}
|
|
8150
|
-
function
|
|
8198
|
+
function fe(t) {
|
|
8151
8199
|
const e = { behind: !1, negate: !1, ...t };
|
|
8152
8200
|
return { type: "LookaroundAssertion", kind: e.behind ? "lookbehind" : "lookahead", negate: e.negate, body: Ye(t?.body) };
|
|
8153
8201
|
}
|
|
8154
|
-
function
|
|
8202
|
+
function zu(t, e, n) {
|
|
8155
8203
|
return { type: "NamedCallout", kind: t, tag: e, arguments: n };
|
|
8156
8204
|
}
|
|
8157
|
-
function
|
|
8205
|
+
function Hu(t, e) {
|
|
8158
8206
|
const n = !!e?.negate;
|
|
8159
8207
|
if (!vn.has(t)) throw new Error(`Invalid POSIX class "${t}"`);
|
|
8160
8208
|
return { type: "CharacterSet", kind: "posix", value: t, negate: n };
|
|
@@ -8163,7 +8211,7 @@ function Uo(t, e, n, r) {
|
|
|
8163
8211
|
if (e > n) throw new Error("Invalid reversed quantifier range");
|
|
8164
8212
|
return { type: "Quantifier", kind: t, min: e, max: n, body: r };
|
|
8165
8213
|
}
|
|
8166
|
-
function
|
|
8214
|
+
function Wu(t, e) {
|
|
8167
8215
|
return { type: "Regex", body: Ye(e?.body), flags: t };
|
|
8168
8216
|
}
|
|
8169
8217
|
function zo(t) {
|
|
@@ -8173,15 +8221,15 @@ function ke(t, e) {
|
|
|
8173
8221
|
const n = { negate: !1, normalizeUnknownPropertyNames: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e };
|
|
8174
8222
|
let r = n.unicodePropertyMap?.get(xt(t));
|
|
8175
8223
|
if (!r) {
|
|
8176
|
-
if (n.normalizeUnknownPropertyNames) r =
|
|
8224
|
+
if (n.normalizeUnknownPropertyNames) r = Xu(t);
|
|
8177
8225
|
else if (n.unicodePropertyMap && !n.skipPropertyNameValidation) throw new Error(B`Invalid Unicode property "\p{${t}}"`);
|
|
8178
8226
|
}
|
|
8179
8227
|
return { type: "CharacterSet", kind: "property", value: r ?? t, negate: n.negate };
|
|
8180
8228
|
}
|
|
8181
|
-
function
|
|
8229
|
+
function Vu({ flags: t, kind: e, name: n, negate: r, number: o }) {
|
|
8182
8230
|
switch (e) {
|
|
8183
8231
|
case "absence_repeater":
|
|
8184
|
-
return
|
|
8232
|
+
return Fu("repeater");
|
|
8185
8233
|
case "atomic":
|
|
8186
8234
|
return Q({ atomic: !0 });
|
|
8187
8235
|
case "capturing":
|
|
@@ -8190,7 +8238,7 @@ function Wu({ flags: t, kind: e, name: n, negate: r, number: o }) {
|
|
|
8190
8238
|
return Q({ flags: t });
|
|
8191
8239
|
case "lookahead":
|
|
8192
8240
|
case "lookbehind":
|
|
8193
|
-
return
|
|
8241
|
+
return fe({ behind: e === "lookbehind", negate: r });
|
|
8194
8242
|
default:
|
|
8195
8243
|
throw new Error(`Unexpected group kind "${e}"`);
|
|
8196
8244
|
}
|
|
@@ -8211,10 +8259,10 @@ function dr(t) {
|
|
|
8211
8259
|
function gr(t) {
|
|
8212
8260
|
return t.type === "LookaroundAssertion" && t.kind === "lookbehind";
|
|
8213
8261
|
}
|
|
8214
|
-
function
|
|
8262
|
+
function qu(t) {
|
|
8215
8263
|
return /^[\p{Alpha}\p{Pc}][^)]*$/u.test(t);
|
|
8216
8264
|
}
|
|
8217
|
-
function
|
|
8265
|
+
function Xu(t) {
|
|
8218
8266
|
return t.trim().replace(/[- _]+/g, "_").replace(/[A-Z][a-z]+(?=[A-Z])/g, "$&_").replace(/[A-Za-z]+/g, (e) => e[0].toUpperCase() + e.slice(1).toLowerCase());
|
|
8219
8267
|
}
|
|
8220
8268
|
function xt(t) {
|
|
@@ -8236,26 +8284,26 @@ function Be(t, e, n = null) {
|
|
|
8236
8284
|
function o(s, a = null, i = null, l = null) {
|
|
8237
8285
|
let u = 0, c = !1;
|
|
8238
8286
|
const h = { node: s, parent: a, key: i, container: l, root: t, remove() {
|
|
8239
|
-
tt(l).splice(Math.max(0,
|
|
8287
|
+
tt(l).splice(Math.max(0, we(i) + u), 1), u--, c = !0;
|
|
8240
8288
|
}, removeAllNextSiblings() {
|
|
8241
|
-
return tt(l).splice(
|
|
8289
|
+
return tt(l).splice(we(i) + 1);
|
|
8242
8290
|
}, removeAllPrevSiblings() {
|
|
8243
|
-
const y =
|
|
8291
|
+
const y = we(i) + u;
|
|
8244
8292
|
return u -= y, tt(l).splice(0, Math.max(0, y));
|
|
8245
|
-
}, replaceWith(y,
|
|
8246
|
-
const _ = !!
|
|
8247
|
-
l ? l[Math.max(0,
|
|
8248
|
-
}, replaceWithMultiple(y,
|
|
8249
|
-
const _ = !!
|
|
8250
|
-
if (tt(l).splice(Math.max(0,
|
|
8293
|
+
}, replaceWith(y, g = {}) {
|
|
8294
|
+
const _ = !!g.traverse;
|
|
8295
|
+
l ? l[Math.max(0, we(i) + u)] = y : $e(a, "Can't replace root node")[i] = y, _ && o(y, a, i, l), c = !0;
|
|
8296
|
+
}, replaceWithMultiple(y, g = {}) {
|
|
8297
|
+
const _ = !!g.traverse;
|
|
8298
|
+
if (tt(l).splice(Math.max(0, we(i) + u), 1, ...y), u += y.length - 1, _) {
|
|
8251
8299
|
let S = 0;
|
|
8252
|
-
for (let A = 0; A < y.length; A++) S += o(y[A], a,
|
|
8300
|
+
for (let A = 0; A < y.length; A++) S += o(y[A], a, we(i) + A + S, l);
|
|
8253
8301
|
}
|
|
8254
8302
|
c = !0;
|
|
8255
8303
|
}, skip() {
|
|
8256
8304
|
c = !0;
|
|
8257
|
-
} }, { type: p } = s, d = e["*"], f = e[p],
|
|
8258
|
-
if (
|
|
8305
|
+
} }, { type: p } = s, d = e["*"], f = e[p], m = typeof d == "function" ? d : d?.enter, b = typeof f == "function" ? f : f?.enter;
|
|
8306
|
+
if (m?.(h, n), b?.(h, n), !c) switch (p) {
|
|
8259
8307
|
case "AbsenceFunction":
|
|
8260
8308
|
case "CapturingGroup":
|
|
8261
8309
|
case "Group":
|
|
@@ -8297,16 +8345,16 @@ function tt(t) {
|
|
|
8297
8345
|
if (!Array.isArray(t)) throw new Error("Container expected");
|
|
8298
8346
|
return t;
|
|
8299
8347
|
}
|
|
8300
|
-
function
|
|
8348
|
+
function we(t) {
|
|
8301
8349
|
if (typeof t != "number") throw new Error("Numeric key expected");
|
|
8302
8350
|
return t;
|
|
8303
8351
|
}
|
|
8304
|
-
const
|
|
8305
|
-
function
|
|
8352
|
+
const Ku = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
|
|
8353
|
+
function Yu(t, e) {
|
|
8306
8354
|
for (let n = 0; n < t.length; n++)
|
|
8307
8355
|
t[n] >= e && t[n]++;
|
|
8308
8356
|
}
|
|
8309
|
-
function
|
|
8357
|
+
function Ju(t, e, n, r) {
|
|
8310
8358
|
return t.slice(0, e) + r + t.slice(e + n.length);
|
|
8311
8359
|
}
|
|
8312
8360
|
const J = Object.freeze({
|
|
@@ -8332,7 +8380,7 @@ function En(t, e, n, r) {
|
|
|
8332
8380
|
function Wo(t, e, n, r) {
|
|
8333
8381
|
En(t, e, n, r);
|
|
8334
8382
|
}
|
|
8335
|
-
function
|
|
8383
|
+
function Zu(t, e, n = 0, r) {
|
|
8336
8384
|
if (!new RegExp(e, "su").test(t))
|
|
8337
8385
|
return null;
|
|
8338
8386
|
const o = new RegExp(`${e}|(?<$skip>\\\\?.)`, "gsu");
|
|
@@ -8347,9 +8395,9 @@ function Ju(t, e, n = 0, r) {
|
|
|
8347
8395
|
return null;
|
|
8348
8396
|
}
|
|
8349
8397
|
function nt(t, e, n) {
|
|
8350
|
-
return !!
|
|
8398
|
+
return !!Zu(t, e, 0, n);
|
|
8351
8399
|
}
|
|
8352
|
-
function
|
|
8400
|
+
function Qu(t, e) {
|
|
8353
8401
|
const n = /\\?./gsu;
|
|
8354
8402
|
n.lastIndex = e;
|
|
8355
8403
|
let r = t.length, o = 0, s = 1, a;
|
|
@@ -8368,8 +8416,8 @@ function Zu(t, e) {
|
|
|
8368
8416
|
}
|
|
8369
8417
|
return t.slice(e, r);
|
|
8370
8418
|
}
|
|
8371
|
-
const br = new RegExp(String.raw`(?<noncapturingStart>${
|
|
8372
|
-
function
|
|
8419
|
+
const br = new RegExp(String.raw`(?<noncapturingStart>${Ku})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`, "gsu");
|
|
8420
|
+
function ec(t, e) {
|
|
8373
8421
|
const n = e?.hiddenCaptures ?? [];
|
|
8374
8422
|
let r = e?.captureTransfers ?? /* @__PURE__ */ new Map();
|
|
8375
8423
|
if (!/\(\?>/.test(t))
|
|
@@ -8382,24 +8430,24 @@ function Qu(t, e) {
|
|
|
8382
8430
|
let l = 0, u = 0, c = NaN, h;
|
|
8383
8431
|
do {
|
|
8384
8432
|
h = !1;
|
|
8385
|
-
let p = 0, d = 0, f = !1,
|
|
8386
|
-
for (br.lastIndex = Number.isNaN(c) ? 0 : c + s.length;
|
|
8387
|
-
const { 0:
|
|
8388
|
-
if (
|
|
8433
|
+
let p = 0, d = 0, f = !1, m;
|
|
8434
|
+
for (br.lastIndex = Number.isNaN(c) ? 0 : c + s.length; m = br.exec(t); ) {
|
|
8435
|
+
const { 0: b, index: y, groups: { capturingStart: g, noncapturingStart: _ } } = m;
|
|
8436
|
+
if (b === "[")
|
|
8389
8437
|
p++;
|
|
8390
8438
|
else if (p)
|
|
8391
|
-
|
|
8392
|
-
else if (
|
|
8439
|
+
b === "]" && p--;
|
|
8440
|
+
else if (b === o && !f)
|
|
8393
8441
|
c = y, f = !0;
|
|
8394
8442
|
else if (f && _)
|
|
8395
8443
|
d++;
|
|
8396
|
-
else if (
|
|
8444
|
+
else if (g)
|
|
8397
8445
|
f ? d++ : (l++, a.push(l + u));
|
|
8398
|
-
else if (
|
|
8446
|
+
else if (b === ")" && f) {
|
|
8399
8447
|
if (!d) {
|
|
8400
8448
|
u++;
|
|
8401
8449
|
const S = l + u;
|
|
8402
|
-
if (t = `${t.slice(0, c)}${s}${t.slice(c + o.length, y)}))<$$${S}>)${t.slice(y + 1)}`, h = !0, i.push(S),
|
|
8450
|
+
if (t = `${t.slice(0, c)}${s}${t.slice(c + o.length, y)}))<$$${S}>)${t.slice(y + 1)}`, h = !0, i.push(S), Yu(n, S), r.size) {
|
|
8403
8451
|
const A = /* @__PURE__ */ new Map();
|
|
8404
8452
|
r.forEach((D, L) => {
|
|
8405
8453
|
A.set(
|
|
@@ -8419,10 +8467,10 @@ function Qu(t, e) {
|
|
|
8419
8467
|
String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,
|
|
8420
8468
|
({ 0: p, groups: { backrefNum: d, wrappedBackrefNum: f } }) => {
|
|
8421
8469
|
if (d) {
|
|
8422
|
-
const
|
|
8423
|
-
if (
|
|
8470
|
+
const m = +d;
|
|
8471
|
+
if (m > a.length - 1)
|
|
8424
8472
|
throw new Error(`Backref "${p}" greater than number of captures`);
|
|
8425
|
-
return `\\${a[
|
|
8473
|
+
return `\\${a[m]}`;
|
|
8426
8474
|
}
|
|
8427
8475
|
return `\\${f}`;
|
|
8428
8476
|
},
|
|
@@ -8449,7 +8497,7 @@ const Vo = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`, Dt = new RegExp(String.raw`
|
|
|
8449
8497
|
| (?<qBase>${Vo})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
8450
8498
|
| \\?.
|
|
8451
8499
|
`.replace(/\s+/g, ""), "gsu");
|
|
8452
|
-
function
|
|
8500
|
+
function tc(t) {
|
|
8453
8501
|
if (!new RegExp(`${Vo}\\+`).test(t))
|
|
8454
8502
|
return {
|
|
8455
8503
|
pattern: t
|
|
@@ -8468,7 +8516,7 @@ function ec(t) {
|
|
|
8468
8516
|
throw new Error(`Invalid quantifier "${i}"`);
|
|
8469
8517
|
let p = -1;
|
|
8470
8518
|
if (/^\{\d+\}$/.test(u))
|
|
8471
|
-
t =
|
|
8519
|
+
t = Ju(t, l + u.length, c, "");
|
|
8472
8520
|
else {
|
|
8473
8521
|
if (o === ")" || o === "]") {
|
|
8474
8522
|
const d = o === ")" ? n : r;
|
|
@@ -8487,8 +8535,8 @@ function ec(t) {
|
|
|
8487
8535
|
pattern: t
|
|
8488
8536
|
};
|
|
8489
8537
|
}
|
|
8490
|
-
const Y = String.raw,
|
|
8491
|
-
function
|
|
8538
|
+
const Y = String.raw, nc = Y`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`, ln = Y`\(\?R=(?<rDepth>[^\)]+)\)|${nc}`, Et = Y`\(\?<(?![=!])(?<captureName>[^>]+)>`, qo = Y`${Et}|(?<unnamed>\()(?!\?)`, he = new RegExp(Y`${Et}|${ln}|\(\?|\\?.`, "gsu"), Gt = "Cannot use multiple overlapping recursions";
|
|
8539
|
+
function rc(t, e) {
|
|
8492
8540
|
const { hiddenCaptures: n, mode: r } = {
|
|
8493
8541
|
hiddenCaptures: [],
|
|
8494
8542
|
mode: "plugin",
|
|
@@ -8506,13 +8554,13 @@ function nc(t, e) {
|
|
|
8506
8554
|
const s = [], a = nt(t, Y`\\[1-9]`, J.DEFAULT), i = /* @__PURE__ */ new Map(), l = [];
|
|
8507
8555
|
let u = !1, c = 0, h = 0, p;
|
|
8508
8556
|
for (he.lastIndex = 0; p = he.exec(t); ) {
|
|
8509
|
-
const { 0: d, groups: { captureName: f, rDepth:
|
|
8557
|
+
const { 0: d, groups: { captureName: f, rDepth: m, gRNameOrNum: b, gRDepth: y } } = p;
|
|
8510
8558
|
if (d === "[")
|
|
8511
8559
|
c++;
|
|
8512
8560
|
else if (c)
|
|
8513
8561
|
d === "]" && c--;
|
|
8514
|
-
else if (
|
|
8515
|
-
if (
|
|
8562
|
+
else if (m) {
|
|
8563
|
+
if (Cr(m), u)
|
|
8516
8564
|
throw new Error(Gt);
|
|
8517
8565
|
if (a)
|
|
8518
8566
|
throw new Error(
|
|
@@ -8520,12 +8568,12 @@ function nc(t, e) {
|
|
|
8520
8568
|
// gone through conversion from named to numbered, so avoid a misleading error
|
|
8521
8569
|
`${r === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with global recursion`
|
|
8522
8570
|
);
|
|
8523
|
-
const
|
|
8571
|
+
const g = t.slice(0, p.index), _ = t.slice(he.lastIndex);
|
|
8524
8572
|
if (nt(_, ln, J.DEFAULT))
|
|
8525
8573
|
throw new Error(Gt);
|
|
8526
|
-
const S = +
|
|
8527
|
-
t =
|
|
8528
|
-
|
|
8574
|
+
const S = +m - 1;
|
|
8575
|
+
t = wr(
|
|
8576
|
+
g,
|
|
8529
8577
|
_,
|
|
8530
8578
|
S,
|
|
8531
8579
|
!1,
|
|
@@ -8534,32 +8582,32 @@ function nc(t, e) {
|
|
|
8534
8582
|
h
|
|
8535
8583
|
), o = Sr(
|
|
8536
8584
|
o,
|
|
8537
|
-
|
|
8585
|
+
g,
|
|
8538
8586
|
S,
|
|
8539
8587
|
s.length,
|
|
8540
8588
|
0,
|
|
8541
8589
|
h
|
|
8542
8590
|
);
|
|
8543
8591
|
break;
|
|
8544
|
-
} else if (
|
|
8545
|
-
|
|
8546
|
-
let
|
|
8592
|
+
} else if (b) {
|
|
8593
|
+
Cr(y);
|
|
8594
|
+
let g = !1;
|
|
8547
8595
|
for (const te of l)
|
|
8548
|
-
if (te.name ===
|
|
8549
|
-
if (
|
|
8596
|
+
if (te.name === b || te.num === +b) {
|
|
8597
|
+
if (g = !0, te.hasRecursedWithin)
|
|
8550
8598
|
throw new Error(Gt);
|
|
8551
8599
|
break;
|
|
8552
8600
|
}
|
|
8553
|
-
if (!
|
|
8554
|
-
throw new Error(Y`Recursive \g cannot be used outside the referenced group "${r === "external" ?
|
|
8555
|
-
const _ = i.get(
|
|
8601
|
+
if (!g)
|
|
8602
|
+
throw new Error(Y`Recursive \g cannot be used outside the referenced group "${r === "external" ? b : Y`\g<${b}&R=${y}>`}"`);
|
|
8603
|
+
const _ = i.get(b), S = Qu(t, _);
|
|
8556
8604
|
if (a && nt(S, Y`${Et}|\((?!\?)`, J.DEFAULT))
|
|
8557
8605
|
throw new Error(
|
|
8558
8606
|
// When used in `external` mode by transpilers other than Regex+, backrefs might have
|
|
8559
8607
|
// gone through conversion from named to numbered, so avoid a misleading error
|
|
8560
8608
|
`${r === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with recursion of capturing groups`
|
|
8561
8609
|
);
|
|
8562
|
-
const A = t.slice(_, p.index), D = S.slice(A.length + d.length), L = s.length, j = +y - 1, Z =
|
|
8610
|
+
const A = t.slice(_, p.index), D = S.slice(A.length + d.length), L = s.length, j = +y - 1, Z = wr(
|
|
8563
8611
|
A,
|
|
8564
8612
|
D,
|
|
8565
8613
|
j,
|
|
@@ -8584,8 +8632,8 @@ function nc(t, e) {
|
|
|
8584
8632
|
name: f
|
|
8585
8633
|
});
|
|
8586
8634
|
else if (d[0] === "(") {
|
|
8587
|
-
const
|
|
8588
|
-
|
|
8635
|
+
const g = d === "(";
|
|
8636
|
+
g && (h++, i.set(String(h), he.lastIndex)), l.push(g ? { num: h } : {});
|
|
8589
8637
|
} else d === ")" && l.pop();
|
|
8590
8638
|
}
|
|
8591
8639
|
return n.push(...s), {
|
|
@@ -8594,14 +8642,14 @@ function nc(t, e) {
|
|
|
8594
8642
|
hiddenCaptures: n
|
|
8595
8643
|
};
|
|
8596
8644
|
}
|
|
8597
|
-
function
|
|
8645
|
+
function Cr(t) {
|
|
8598
8646
|
const e = `Max depth must be integer between 2 and 100; used ${t}`;
|
|
8599
8647
|
if (!/^[1-9]\d*$/.test(t))
|
|
8600
8648
|
throw new Error(e);
|
|
8601
8649
|
if (t = +t, t < 2 || t > 100)
|
|
8602
8650
|
throw new Error(e);
|
|
8603
8651
|
}
|
|
8604
|
-
function
|
|
8652
|
+
function wr(t, e, n, r, o, s, a) {
|
|
8605
8653
|
const i = /* @__PURE__ */ new Set();
|
|
8606
8654
|
r && Wo(t + e, Et, ({ groups: { captureName: u } }) => {
|
|
8607
8655
|
i.add(u);
|
|
@@ -8623,22 +8671,22 @@ function _r(t, e, n, r, o, s, a) {
|
|
|
8623
8671
|
u += En(
|
|
8624
8672
|
t,
|
|
8625
8673
|
Y`${qo}|\\k<(?<backref>[^>]+)>`,
|
|
8626
|
-
({ 0: p, groups: { captureName: d, unnamed: f, backref:
|
|
8627
|
-
if (
|
|
8674
|
+
({ 0: p, groups: { captureName: d, unnamed: f, backref: m } }) => {
|
|
8675
|
+
if (m && r && !r.has(m))
|
|
8628
8676
|
return p;
|
|
8629
|
-
const
|
|
8677
|
+
const b = `_$${h}`;
|
|
8630
8678
|
if (f || d) {
|
|
8631
8679
|
const y = a + s.length + 1;
|
|
8632
|
-
return s.push(y),
|
|
8680
|
+
return s.push(y), oc(o, y), f ? p : `(?<${d}${b}>`;
|
|
8633
8681
|
}
|
|
8634
|
-
return Y`\k<${
|
|
8682
|
+
return Y`\k<${m}${b}>`;
|
|
8635
8683
|
},
|
|
8636
8684
|
J.DEFAULT
|
|
8637
8685
|
);
|
|
8638
8686
|
}
|
|
8639
8687
|
return u;
|
|
8640
8688
|
}
|
|
8641
|
-
function
|
|
8689
|
+
function oc(t, e) {
|
|
8642
8690
|
for (let n = 0; n < t.length; n++)
|
|
8643
8691
|
t[n] >= e && t[n]++;
|
|
8644
8692
|
}
|
|
@@ -8649,17 +8697,17 @@ function Sr(t, e, n, r, o, s) {
|
|
|
8649
8697
|
const i = s - a + o, l = /* @__PURE__ */ new Map();
|
|
8650
8698
|
return t.forEach((u, c) => {
|
|
8651
8699
|
const h = (r - a * n) / n, p = a * n, d = c > i + a ? c + r : c, f = [];
|
|
8652
|
-
for (const
|
|
8653
|
-
if (
|
|
8654
|
-
f.push(
|
|
8655
|
-
else if (
|
|
8656
|
-
f.push(
|
|
8657
|
-
else if (
|
|
8658
|
-
for (let
|
|
8659
|
-
f.push(
|
|
8700
|
+
for (const m of u)
|
|
8701
|
+
if (m <= i)
|
|
8702
|
+
f.push(m);
|
|
8703
|
+
else if (m > i + a + h)
|
|
8704
|
+
f.push(m + r);
|
|
8705
|
+
else if (m <= i + a)
|
|
8706
|
+
for (let b = 0; b <= n; b++)
|
|
8707
|
+
f.push(m + a * b);
|
|
8660
8708
|
else
|
|
8661
|
-
for (let
|
|
8662
|
-
f.push(
|
|
8709
|
+
for (let b = 0; b <= n; b++)
|
|
8710
|
+
f.push(m + p + h * b);
|
|
8663
8711
|
l.set(d, f);
|
|
8664
8712
|
}), l;
|
|
8665
8713
|
}
|
|
@@ -8676,7 +8724,7 @@ var M = String.fromCodePoint, v = String.raw, ae = {
|
|
|
8676
8724
|
})(),
|
|
8677
8725
|
unicodeSets: (() => {
|
|
8678
8726
|
try {
|
|
8679
|
-
new RegExp("", "v");
|
|
8727
|
+
new RegExp("[[]]", "v");
|
|
8680
8728
|
} catch {
|
|
8681
8729
|
return !1;
|
|
8682
8730
|
}
|
|
@@ -8704,7 +8752,7 @@ function Ve(t, e, n) {
|
|
|
8704
8752
|
function un(t, e) {
|
|
8705
8753
|
return kr[t] >= kr[e];
|
|
8706
8754
|
}
|
|
8707
|
-
function
|
|
8755
|
+
function sc(t, e) {
|
|
8708
8756
|
if (t == null)
|
|
8709
8757
|
throw new Error(e ?? "Value expected");
|
|
8710
8758
|
return t;
|
|
@@ -8713,7 +8761,7 @@ var kr = {
|
|
|
8713
8761
|
ES2025: 2025,
|
|
8714
8762
|
ES2024: 2024,
|
|
8715
8763
|
ES2018: 2018
|
|
8716
|
-
},
|
|
8764
|
+
}, ac = (
|
|
8717
8765
|
/** @type {const} */
|
|
8718
8766
|
{
|
|
8719
8767
|
auto: "auto",
|
|
@@ -8725,7 +8773,7 @@ var kr = {
|
|
|
8725
8773
|
function Xo(t = {}) {
|
|
8726
8774
|
if ({}.toString.call(t) !== "[object Object]")
|
|
8727
8775
|
throw new Error("Unexpected options");
|
|
8728
|
-
if (t.target !== void 0 && !
|
|
8776
|
+
if (t.target !== void 0 && !ac[t.target])
|
|
8729
8777
|
throw new Error(`Unexpected target "${t.target}"`);
|
|
8730
8778
|
const e = {
|
|
8731
8779
|
// Sets the level of emulation rigor/strictness.
|
|
@@ -8769,16 +8817,16 @@ function Xo(t = {}) {
|
|
|
8769
8817
|
};
|
|
8770
8818
|
return e.target === "auto" && (e.target = ae.flagGroups ? "ES2025" : ae.unicodeSets ? "ES2024" : "ES2018"), e;
|
|
8771
8819
|
}
|
|
8772
|
-
var
|
|
8820
|
+
var ic = "[ -\r ]", lc = /* @__PURE__ */ new Set([
|
|
8773
8821
|
M(304),
|
|
8774
8822
|
// İ
|
|
8775
8823
|
M(305)
|
|
8776
8824
|
// ı
|
|
8777
8825
|
]), re = v`[\p{L}\p{M}\p{N}\p{Pc}]`;
|
|
8778
8826
|
function Ko(t) {
|
|
8779
|
-
if (
|
|
8827
|
+
if (lc.has(t))
|
|
8780
8828
|
return [t];
|
|
8781
|
-
const e = /* @__PURE__ */ new Set(), n = t.toLowerCase(), r = n.toUpperCase(), o =
|
|
8829
|
+
const e = /* @__PURE__ */ new Set(), n = t.toLowerCase(), r = n.toUpperCase(), o = hc.get(n), s = uc.get(n), a = cc.get(n);
|
|
8782
8830
|
return [...r].length === 1 && e.add(r), a && e.add(a), o && e.add(o), e.add(n), s && e.add(s), [...e];
|
|
8783
8831
|
}
|
|
8784
8832
|
var An = /* @__PURE__ */ new Map(
|
|
@@ -8873,12 +8921,12 @@ Variation_Selector VS
|
|
|
8873
8921
|
White_Space space
|
|
8874
8922
|
XID_Continue XIDC
|
|
8875
8923
|
XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
8876
|
-
),
|
|
8924
|
+
), uc = /* @__PURE__ */ new Map([
|
|
8877
8925
|
["s", M(383)],
|
|
8878
8926
|
// s, ſ
|
|
8879
8927
|
[M(383), "s"]
|
|
8880
8928
|
// ſ, s
|
|
8881
|
-
]),
|
|
8929
|
+
]), cc = /* @__PURE__ */ new Map([
|
|
8882
8930
|
[M(223), M(7838)],
|
|
8883
8931
|
// ß, ẞ
|
|
8884
8932
|
[M(107), M(8490)],
|
|
@@ -8887,7 +8935,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8887
8935
|
// å, Å (Angstrom)
|
|
8888
8936
|
[M(969), M(8486)]
|
|
8889
8937
|
// ω, Ω (Ohm)
|
|
8890
|
-
]),
|
|
8938
|
+
]), hc = new Map([
|
|
8891
8939
|
ie(453),
|
|
8892
8940
|
ie(456),
|
|
8893
8941
|
ie(459),
|
|
@@ -8898,7 +8946,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
|
|
|
8898
8946
|
ie(8124),
|
|
8899
8947
|
ie(8140),
|
|
8900
8948
|
ie(8188)
|
|
8901
|
-
]),
|
|
8949
|
+
]), pc = /* @__PURE__ */ new Map([
|
|
8902
8950
|
["alnum", v`[\p{Alpha}\p{Nd}]`],
|
|
8903
8951
|
["alpha", v`\p{Alpha}`],
|
|
8904
8952
|
["ascii", v`\p{ASCII}`],
|
|
@@ -8944,7 +8992,7 @@ var Yo = /* @__PURE__ */ new Set([
|
|
|
8944
8992
|
// generally extreme edge cases and using such properties case insensitively generally produces
|
|
8945
8993
|
// undesired behavior anyway
|
|
8946
8994
|
]);
|
|
8947
|
-
function
|
|
8995
|
+
function dc(t, e) {
|
|
8948
8996
|
const n = {
|
|
8949
8997
|
// A couple edge cases exist where options `accuracy` and `bestEffortTarget` are used:
|
|
8950
8998
|
// - `CharacterSet` kind `text_segment` (`\X`): An exact representation would require heavy
|
|
@@ -8975,7 +9023,7 @@ function pc(t, e) {
|
|
|
8975
9023
|
spaceIsAscii: t.flags.spaceIsAscii,
|
|
8976
9024
|
wordIsAscii: t.flags.wordIsAscii
|
|
8977
9025
|
};
|
|
8978
|
-
Be(t,
|
|
9026
|
+
Be(t, gc, r);
|
|
8979
9027
|
const o = {
|
|
8980
9028
|
dotAll: t.flags.dotAll,
|
|
8981
9029
|
ignoreCase: t.flags.ignoreCase
|
|
@@ -8990,23 +9038,23 @@ function pc(t, e) {
|
|
|
8990
9038
|
reffedNodesByReferencer: /* @__PURE__ */ new Map(),
|
|
8991
9039
|
subroutineRefMap: r.subroutineRefMap
|
|
8992
9040
|
};
|
|
8993
|
-
Be(t,
|
|
9041
|
+
Be(t, mc, s);
|
|
8994
9042
|
const a = {
|
|
8995
9043
|
groupsByName: s.groupsByName,
|
|
8996
9044
|
highestOrphanBackref: 0,
|
|
8997
9045
|
numCapturesToLeft: 0,
|
|
8998
9046
|
reffedNodesByReferencer: s.reffedNodesByReferencer
|
|
8999
9047
|
};
|
|
9000
|
-
return Be(t,
|
|
9048
|
+
return Be(t, yc, a), t._originMap = s.groupOriginByCopy, t._strategy = r.strategy, t;
|
|
9001
9049
|
}
|
|
9002
|
-
var
|
|
9050
|
+
var gc = {
|
|
9003
9051
|
AbsenceFunction({ node: t, parent: e, replaceWith: n }) {
|
|
9004
9052
|
const { body: r, kind: o } = t;
|
|
9005
9053
|
if (o === "repeater") {
|
|
9006
9054
|
const s = Q();
|
|
9007
9055
|
s.body[0].body.push(
|
|
9008
9056
|
// Insert own alts as `body`
|
|
9009
|
-
|
|
9057
|
+
fe({ negate: !0, body: r }),
|
|
9010
9058
|
ke("Any")
|
|
9011
9059
|
);
|
|
9012
9060
|
const a = Q();
|
|
@@ -9039,7 +9087,7 @@ var dc = {
|
|
|
9039
9087
|
if (l === "text_segment_boundary")
|
|
9040
9088
|
throw new Error(`Unsupported text segment boundary "\\${u ? "Y" : "y"}"`);
|
|
9041
9089
|
if (l === "line_end")
|
|
9042
|
-
a(P(
|
|
9090
|
+
a(P(fe({ body: [
|
|
9043
9091
|
me({ body: [on("string_end")] }),
|
|
9044
9092
|
me({ body: [vt(10)] })
|
|
9045
9093
|
// `\n`
|
|
@@ -9051,8 +9099,8 @@ var dc = {
|
|
|
9051
9099
|
o.flags.sticky = !0, s();
|
|
9052
9100
|
else {
|
|
9053
9101
|
const f = r[n - 1];
|
|
9054
|
-
if (f &&
|
|
9055
|
-
a(P(
|
|
9102
|
+
if (f && kc(f))
|
|
9103
|
+
a(P(fe({ negate: !0 }), e));
|
|
9056
9104
|
else {
|
|
9057
9105
|
if (h)
|
|
9058
9106
|
throw new Error(v`Uses "\G" in a way that requires a subclass`);
|
|
@@ -9063,8 +9111,8 @@ var dc = {
|
|
|
9063
9111
|
a(P(oe(v`(?=\n?\z)`), e));
|
|
9064
9112
|
else if (l === "word_boundary") {
|
|
9065
9113
|
if (!d && !c) {
|
|
9066
|
-
const f = `(?:(?<=${re})(?!${re})|(?<!${re})(?=${re}))`,
|
|
9067
|
-
a(P(oe(u ?
|
|
9114
|
+
const f = `(?:(?<=${re})(?!${re})|(?<!${re})(?=${re}))`, m = `(?:(?<=${re})(?=${re})|(?<!${re})(?!${re}))`;
|
|
9115
|
+
a(P(oe(u ? m : f), e));
|
|
9068
9116
|
}
|
|
9069
9117
|
} else
|
|
9070
9118
|
throw new Error(`Unexpected assertion kind "${l}"`);
|
|
@@ -9090,7 +9138,7 @@ var dc = {
|
|
|
9090
9138
|
return;
|
|
9091
9139
|
}
|
|
9092
9140
|
if (a && (l === "space" || c === "space")) {
|
|
9093
|
-
n(P(Ut(oe(
|
|
9141
|
+
n(P(Ut(oe(ic), u), e));
|
|
9094
9142
|
return;
|
|
9095
9143
|
}
|
|
9096
9144
|
if (i && (l === "word" || c === "word")) {
|
|
@@ -9106,7 +9154,7 @@ var dc = {
|
|
|
9106
9154
|
throw new Error(v`Use of "\X" requires non-strict accuracy`);
|
|
9107
9155
|
const h = "\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?", p = v`\p{RI}{2}|${h}(?:\u200D${h})*`;
|
|
9108
9156
|
n(P(oe(
|
|
9109
|
-
// Close approximation of an extended grapheme cluster; see
|
|
9157
|
+
// Close approximation of an extended grapheme cluster; see <unicode.org/reports/tr29/>
|
|
9110
9158
|
v`(?>\r\n|${o ? v`\p{RGI_Emoji}` : p}|\P{M}\p{M}*)`,
|
|
9111
9159
|
// Allow JS property `RGI_Emoji` through
|
|
9112
9160
|
{ skipPropertyNameValidation: !0 }
|
|
@@ -9128,7 +9176,7 @@ var dc = {
|
|
|
9128
9176
|
}[c];
|
|
9129
9177
|
u && (h = `\0-${M(h.codePointAt(0) - 1)}${M(h.codePointAt(2) + 1)}-`), n(P(oe(`[${h}]`), e));
|
|
9130
9178
|
} else
|
|
9131
|
-
n(P(Ut(oe(
|
|
9179
|
+
n(P(Ut(oe(pc.get(c)), u), e));
|
|
9132
9180
|
else if (l === "property")
|
|
9133
9181
|
An.has(xt(c)) || (t.key = "sc");
|
|
9134
9182
|
else if (l === "space")
|
|
@@ -9152,7 +9200,7 @@ var dc = {
|
|
|
9152
9200
|
Fo(u, { type: "Group" }) && u.body[0].body.length === 1 ? u.body[0] : n;
|
|
9153
9201
|
if (e.parent !== h || h.body.length > 1)
|
|
9154
9202
|
throw new Error(v`Uses "\K" in a way that's unsupported`);
|
|
9155
|
-
const p =
|
|
9203
|
+
const p = fe({ behind: !0 });
|
|
9156
9204
|
p.body[0].body = s(), o(P(p, e));
|
|
9157
9205
|
} else
|
|
9158
9206
|
throw new Error(`Unexpected directive kind "${i}"`);
|
|
@@ -9218,7 +9266,7 @@ var dc = {
|
|
|
9218
9266
|
NamedCallout({ node: t, parent: e, replaceWith: n }) {
|
|
9219
9267
|
const { kind: r } = t;
|
|
9220
9268
|
if (r === "fail")
|
|
9221
|
-
n(P(
|
|
9269
|
+
n(P(fe({ negate: !0 }), e));
|
|
9222
9270
|
else
|
|
9223
9271
|
throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`);
|
|
9224
9272
|
},
|
|
@@ -9250,7 +9298,7 @@ var dc = {
|
|
|
9250
9298
|
let { ref: n } = t;
|
|
9251
9299
|
typeof n == "string" && !jt(n) && (n = Bt(n, e), t.ref = n);
|
|
9252
9300
|
}
|
|
9253
|
-
},
|
|
9301
|
+
}, mc = {
|
|
9254
9302
|
Backreference({ node: t }, { multiplexCapturesToLeftByRef: e, reffedNodesByReferencer: n }) {
|
|
9255
9303
|
const { orphan: r, ref: o } = t;
|
|
9256
9304
|
r || n.set(t, [...e.get(o).map(({ node: s }) => s)]);
|
|
@@ -9334,21 +9382,21 @@ var dc = {
|
|
|
9334
9382
|
a,
|
|
9335
9383
|
(p) => p.type === "Group" && !!p.flags
|
|
9336
9384
|
)), h = c ? bt(r.globalFlags, c) : r.globalFlags;
|
|
9337
|
-
|
|
9338
|
-
flags:
|
|
9385
|
+
bc(h, r.currentFlags) || (u = Q({
|
|
9386
|
+
flags: _c(h)
|
|
9339
9387
|
}), u.body[0].body.push(l));
|
|
9340
9388
|
}
|
|
9341
9389
|
n(P(u, e), { traverse: !i });
|
|
9342
9390
|
}
|
|
9343
|
-
},
|
|
9391
|
+
}, yc = {
|
|
9344
9392
|
Backreference({ node: t, parent: e, replaceWith: n }, r) {
|
|
9345
9393
|
if (t.orphan) {
|
|
9346
9394
|
r.highestOrphanBackref = Math.max(r.highestOrphanBackref, t.ref);
|
|
9347
9395
|
return;
|
|
9348
9396
|
}
|
|
9349
|
-
const s = r.reffedNodesByReferencer.get(t).filter((a) =>
|
|
9397
|
+
const s = r.reffedNodesByReferencer.get(t).filter((a) => Cc(a, t));
|
|
9350
9398
|
if (!s.length)
|
|
9351
|
-
n(P(
|
|
9399
|
+
n(P(fe({ negate: !0 }), e));
|
|
9352
9400
|
else if (s.length > 1) {
|
|
9353
9401
|
const a = Q({
|
|
9354
9402
|
atomic: !0,
|
|
@@ -9383,10 +9431,10 @@ function Jo(t) {
|
|
|
9383
9431
|
}
|
|
9384
9432
|
});
|
|
9385
9433
|
}
|
|
9386
|
-
function
|
|
9434
|
+
function bc(t, e) {
|
|
9387
9435
|
return t.dotAll === e.dotAll && t.ignoreCase === e.ignoreCase;
|
|
9388
9436
|
}
|
|
9389
|
-
function
|
|
9437
|
+
function Cc(t, e) {
|
|
9390
9438
|
let n = e;
|
|
9391
9439
|
do {
|
|
9392
9440
|
if (n.type === "Regex")
|
|
@@ -9435,7 +9483,7 @@ function Qo(t) {
|
|
|
9435
9483
|
});
|
|
9436
9484
|
}), Object.keys(n.enable).length || delete n.enable, Object.keys(n.disable).length || delete n.disable, n.enable || n.disable ? n : null;
|
|
9437
9485
|
}
|
|
9438
|
-
function
|
|
9486
|
+
function _c({ dotAll: t, ignoreCase: e }) {
|
|
9439
9487
|
const n = {};
|
|
9440
9488
|
return (t || e) && (n.enable = {}, t && (n.enable.dotAll = !0), e && (n.enable.ignoreCase = !0)), (!t || !e) && (n.disable = {}, !t && (n.disable.dotAll = !0), !e && (n.disable.ignoreCase = !0)), n;
|
|
9441
9489
|
}
|
|
@@ -9446,7 +9494,7 @@ function es(t) {
|
|
|
9446
9494
|
return Array.isArray(e) ? e : e ? [e] : null;
|
|
9447
9495
|
}
|
|
9448
9496
|
function ts(t) {
|
|
9449
|
-
const e = t.find((n) => n.kind === "search_start" ||
|
|
9497
|
+
const e = t.find((n) => n.kind === "search_start" || vc(n, { negate: !1 }) || !Sc(n));
|
|
9450
9498
|
if (!e)
|
|
9451
9499
|
return null;
|
|
9452
9500
|
if (e.kind === "search_start")
|
|
@@ -9472,10 +9520,10 @@ function ns(t, e) {
|
|
|
9472
9520
|
return !0;
|
|
9473
9521
|
return !1;
|
|
9474
9522
|
}
|
|
9475
|
-
function
|
|
9523
|
+
function Sc({ type: t }) {
|
|
9476
9524
|
return t === "Assertion" || t === "Directive" || t === "LookaroundAssertion";
|
|
9477
9525
|
}
|
|
9478
|
-
function
|
|
9526
|
+
function kc(t) {
|
|
9479
9527
|
const e = [
|
|
9480
9528
|
"Character",
|
|
9481
9529
|
"CharacterClass",
|
|
@@ -9483,7 +9531,7 @@ function Sc(t) {
|
|
|
9483
9531
|
];
|
|
9484
9532
|
return e.includes(t.type) || t.type === "Quantifier" && t.min && e.includes(t.body.type);
|
|
9485
9533
|
}
|
|
9486
|
-
function
|
|
9534
|
+
function vc(t, e) {
|
|
9487
9535
|
const n = {
|
|
9488
9536
|
negate: null,
|
|
9489
9537
|
...e
|
|
@@ -9514,14 +9562,14 @@ function le(t, e) {
|
|
|
9514
9562
|
function P(t, e) {
|
|
9515
9563
|
return Jo(t), t.parent = e, t;
|
|
9516
9564
|
}
|
|
9517
|
-
function
|
|
9565
|
+
function xc(t, e) {
|
|
9518
9566
|
const n = Xo(e), r = un(n.target, "ES2024"), o = un(n.target, "ES2025"), s = n.rules.recursionLimit;
|
|
9519
9567
|
if (!Number.isInteger(s) || s < 2 || s > 20)
|
|
9520
9568
|
throw new Error("Invalid recursionLimit; use 2-20");
|
|
9521
9569
|
let a = null, i = null;
|
|
9522
9570
|
if (!o) {
|
|
9523
9571
|
const d = [t.flags.ignoreCase];
|
|
9524
|
-
Be(t,
|
|
9572
|
+
Be(t, Ec, {
|
|
9525
9573
|
getCurrentModI: () => d.at(-1),
|
|
9526
9574
|
popModI() {
|
|
9527
9575
|
d.pop();
|
|
@@ -9561,7 +9609,7 @@ function vc(t, e) {
|
|
|
9561
9609
|
verbose: n.verbose
|
|
9562
9610
|
};
|
|
9563
9611
|
function h(d) {
|
|
9564
|
-
return c.lastNode = u, u = d,
|
|
9612
|
+
return c.lastNode = u, u = d, sc(Ac[d.type], `Unexpected node type "${d.type}"`)(d, c, h);
|
|
9565
9613
|
}
|
|
9566
9614
|
const p = {
|
|
9567
9615
|
pattern: t.body.map(h).join("|"),
|
|
@@ -9573,7 +9621,7 @@ function vc(t, e) {
|
|
|
9573
9621
|
d.hidden && p._hiddenCaptures.push(f), d.transferTo && Ve(p._captureTransfers, d.transferTo, []).push(f);
|
|
9574
9622
|
}), p;
|
|
9575
9623
|
}
|
|
9576
|
-
var
|
|
9624
|
+
var Ec = {
|
|
9577
9625
|
"*": {
|
|
9578
9626
|
enter({ node: t }, e) {
|
|
9579
9627
|
if (Er(t)) {
|
|
@@ -9599,7 +9647,7 @@ var xc = {
|
|
|
9599
9647
|
CharacterSet({ node: t }, e) {
|
|
9600
9648
|
t.kind === "property" && Yo.has(t.value) && e.setHasCasedChar();
|
|
9601
9649
|
}
|
|
9602
|
-
},
|
|
9650
|
+
}, Ac = {
|
|
9603
9651
|
/**
|
|
9604
9652
|
@param {AlternativeNode} node
|
|
9605
9653
|
*/
|
|
@@ -9659,7 +9707,7 @@ var xc = {
|
|
|
9659
9707
|
const { kind: r, negate: o, parent: s } = t;
|
|
9660
9708
|
let { body: a } = t;
|
|
9661
9709
|
if (r === "intersection" && !e.useFlagV)
|
|
9662
|
-
throw new Error("Use of class intersection requires min target ES2024");
|
|
9710
|
+
throw new Error("Use of character class intersection requires min target ES2024");
|
|
9663
9711
|
ae.bugFlagVLiteralHyphenIsRange && e.useFlagV && a.some(Ar) && (a = [vt(45), ...a.filter((u) => !Ar(u))]);
|
|
9664
9712
|
const i = () => `[${o ? "^" : ""}${a.map(n).join(r === "intersection" ? "&&" : "")}]`;
|
|
9665
9713
|
if (!e.inCharClass) {
|
|
@@ -9691,7 +9739,7 @@ var xc = {
|
|
|
9691
9739
|
)
|
|
9692
9740
|
return a.map(n).join("");
|
|
9693
9741
|
if (!e.useFlagV && s.type === "CharacterClass")
|
|
9694
|
-
throw new Error("
|
|
9742
|
+
throw new Error("Uses nested character class in a way that requires min target ES2024");
|
|
9695
9743
|
return i();
|
|
9696
9744
|
},
|
|
9697
9745
|
/**
|
|
@@ -9705,7 +9753,7 @@ var xc = {
|
|
|
9705
9753
|
}, s = _e(n, o), a = _e(r, o), i = /* @__PURE__ */ new Set();
|
|
9706
9754
|
if (e.useAppliedIgnoreCase && e.currentFlags.ignoreCase) {
|
|
9707
9755
|
const l = rs(t);
|
|
9708
|
-
|
|
9756
|
+
Pc(l).forEach((c) => {
|
|
9709
9757
|
i.add(
|
|
9710
9758
|
Array.isArray(c) ? `${_e(c[0], o)}-${_e(c[1], o)}` : _e(c, o)
|
|
9711
9759
|
);
|
|
@@ -9753,7 +9801,7 @@ var xc = {
|
|
|
9753
9801
|
const a = o.currentFlags;
|
|
9754
9802
|
n && (o.currentFlags = bt(a, n));
|
|
9755
9803
|
const i = e.map(s).join("|"), l = !o.verbose && e.length === 1 && // Single alt
|
|
9756
|
-
r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${
|
|
9804
|
+
r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${$c(t, n, o.useFlagMods)}${i})`;
|
|
9757
9805
|
return o.currentFlags = a, l;
|
|
9758
9806
|
},
|
|
9759
9807
|
/**
|
|
@@ -9766,7 +9814,7 @@ var xc = {
|
|
|
9766
9814
|
@param {QuantifierNode} node
|
|
9767
9815
|
*/
|
|
9768
9816
|
Quantifier(t, e, n) {
|
|
9769
|
-
return n(t.body) +
|
|
9817
|
+
return n(t.body) + Tc(t);
|
|
9770
9818
|
},
|
|
9771
9819
|
/**
|
|
9772
9820
|
@param {SubroutineNode & {isRecursive: true}} node
|
|
@@ -9777,7 +9825,7 @@ var xc = {
|
|
|
9777
9825
|
const r = n.recursionLimit;
|
|
9778
9826
|
return e === 0 ? `(?R=${r})` : v`\g<${e}&R=${r}>`;
|
|
9779
9827
|
}
|
|
9780
|
-
},
|
|
9828
|
+
}, Rc = /* @__PURE__ */ new Set([
|
|
9781
9829
|
"$",
|
|
9782
9830
|
"(",
|
|
9783
9831
|
")",
|
|
@@ -9792,7 +9840,7 @@ var xc = {
|
|
|
9792
9840
|
"{",
|
|
9793
9841
|
"|",
|
|
9794
9842
|
"}"
|
|
9795
|
-
]),
|
|
9843
|
+
]), Ic = /* @__PURE__ */ new Set([
|
|
9796
9844
|
"-",
|
|
9797
9845
|
"\\",
|
|
9798
9846
|
"]",
|
|
@@ -9800,7 +9848,7 @@ var xc = {
|
|
|
9800
9848
|
// Literal `[` doesn't require escaping with flag u, but this can help work around regex source
|
|
9801
9849
|
// linters and regex syntax processors that expect unescaped `[` to create a nested class
|
|
9802
9850
|
"["
|
|
9803
|
-
]),
|
|
9851
|
+
]), Nc = /* @__PURE__ */ new Set([
|
|
9804
9852
|
"(",
|
|
9805
9853
|
")",
|
|
9806
9854
|
"-",
|
|
@@ -9848,9 +9896,9 @@ var xc = {
|
|
|
9848
9896
|
// paragraph separator
|
|
9849
9897
|
[65279, v`\uFEFF`]
|
|
9850
9898
|
// ZWNBSP/BOM
|
|
9851
|
-
]),
|
|
9899
|
+
]), Lc = /^\p{Cased}$/u;
|
|
9852
9900
|
function Rn(t) {
|
|
9853
|
-
return
|
|
9901
|
+
return Lc.test(t);
|
|
9854
9902
|
}
|
|
9855
9903
|
function rs(t, e) {
|
|
9856
9904
|
const n = !!e?.firstOnly, r = t.min.value, o = t.max.value, s = [];
|
|
@@ -9876,20 +9924,20 @@ function _e(t, { escDigit: e, inCharClass: n, useFlagV: r }) {
|
|
|
9876
9924
|
// Control chars, etc.; condition modeled on the Chrome developer console's display for strings
|
|
9877
9925
|
t < 32 || t > 126 && t < 160 || // Unicode planes 4-16; unassigned, special purpose, and private use area
|
|
9878
9926
|
t > 262143 || // Avoid corrupting a preceding backref by immediately following it with a literal digit
|
|
9879
|
-
e &&
|
|
9927
|
+
e && Mc(t)
|
|
9880
9928
|
)
|
|
9881
9929
|
return t > 255 ? `\\u{${t.toString(16).toUpperCase()}}` : `\\x${t.toString(16).toUpperCase().padStart(2, "0")}`;
|
|
9882
|
-
const o = n ? r ?
|
|
9930
|
+
const o = n ? r ? Nc : Ic : Rc, s = M(t);
|
|
9883
9931
|
return (o.has(s) ? "\\" : "") + s;
|
|
9884
9932
|
}
|
|
9885
|
-
function
|
|
9933
|
+
function Pc(t) {
|
|
9886
9934
|
const e = t.map((o) => o.codePointAt(0)).sort((o, s) => o - s), n = [];
|
|
9887
9935
|
let r = null;
|
|
9888
9936
|
for (let o = 0; o < e.length; o++)
|
|
9889
9937
|
e[o + 1] === e[o] + 1 ? r ??= e[o] : r === null ? n.push(e[o]) : (n.push([r, e[o]]), r = null);
|
|
9890
9938
|
return n;
|
|
9891
9939
|
}
|
|
9892
|
-
function
|
|
9940
|
+
function $c(t, e, n) {
|
|
9893
9941
|
if (t)
|
|
9894
9942
|
return ">";
|
|
9895
9943
|
let r = "";
|
|
@@ -9899,7 +9947,7 @@ function Pc(t, e, n) {
|
|
|
9899
9947
|
}
|
|
9900
9948
|
return `${r}:`;
|
|
9901
9949
|
}
|
|
9902
|
-
function
|
|
9950
|
+
function Tc({ kind: t, max: e, min: n }) {
|
|
9903
9951
|
let r;
|
|
9904
9952
|
return !n && e === 1 ? r = "?" : !n && e === 1 / 0 ? r = "*" : n === 1 && e === 1 / 0 ? r = "+" : n === e ? r = `{${n}}` : r = `{${n},${e === 1 / 0 ? "" : e}}`, r + {
|
|
9905
9953
|
greedy: "",
|
|
@@ -9910,13 +9958,13 @@ function $c({ kind: t, max: e, min: n }) {
|
|
|
9910
9958
|
function Er({ type: t }) {
|
|
9911
9959
|
return t === "CapturingGroup" || t === "Group" || t === "LookaroundAssertion";
|
|
9912
9960
|
}
|
|
9913
|
-
function
|
|
9961
|
+
function Mc(t) {
|
|
9914
9962
|
return t > 47 && t < 58;
|
|
9915
9963
|
}
|
|
9916
9964
|
function Ar({ type: t, value: e }) {
|
|
9917
9965
|
return t === "Character" && e === 45;
|
|
9918
9966
|
}
|
|
9919
|
-
var
|
|
9967
|
+
var Oc = class cn extends RegExp {
|
|
9920
9968
|
/**
|
|
9921
9969
|
@type {Map<number, {
|
|
9922
9970
|
hidden?: true;
|
|
@@ -9974,7 +10022,7 @@ var Mc = class cn extends RegExp {
|
|
|
9974
10022
|
transfers: [],
|
|
9975
10023
|
...r
|
|
9976
10024
|
};
|
|
9977
|
-
super(o ? "" : e, n), this.#r = e, this.#t =
|
|
10025
|
+
super(o ? "" : e, n), this.#r = e, this.#t = Gc(s.hiddenCaptures, s.transfers), this.#o = s.strategy, this.rawOptions = r ?? {};
|
|
9978
10026
|
}
|
|
9979
10027
|
o || (this.#e = this);
|
|
9980
10028
|
}
|
|
@@ -9993,7 +10041,7 @@ var Mc = class cn extends RegExp {
|
|
|
9993
10041
|
if (this.#o === "clip_search" && n && r) {
|
|
9994
10042
|
this.lastIndex = 0;
|
|
9995
10043
|
const o = this.#s(e.slice(r));
|
|
9996
|
-
return o && (
|
|
10044
|
+
return o && (Dc(o, r, e, this.hasIndices), this.lastIndex += r), o;
|
|
9997
10045
|
}
|
|
9998
10046
|
return this.#s(e);
|
|
9999
10047
|
}
|
|
@@ -10019,7 +10067,7 @@ var Mc = class cn extends RegExp {
|
|
|
10019
10067
|
if (!u)
|
|
10020
10068
|
throw new Error(`Invalid capture transfer to "${u}"`);
|
|
10021
10069
|
if (n[u] = r[a], this.hasIndices && (n.indices[u] = o[a]), n.groups) {
|
|
10022
|
-
this.#n || (this.#n =
|
|
10070
|
+
this.#n || (this.#n = Fc(this.source));
|
|
10023
10071
|
const c = this.#n.get(l);
|
|
10024
10072
|
c && (n.groups[c] = r[a], this.hasIndices && (n.indices.groups[c] = o[a]));
|
|
10025
10073
|
}
|
|
@@ -10028,7 +10076,7 @@ var Mc = class cn extends RegExp {
|
|
|
10028
10076
|
return n;
|
|
10029
10077
|
}
|
|
10030
10078
|
};
|
|
10031
|
-
function
|
|
10079
|
+
function Dc(t, e, n, r) {
|
|
10032
10080
|
if (t.index += e, t.input = n, r) {
|
|
10033
10081
|
const o = t.indices;
|
|
10034
10082
|
for (let a = 0; a < o.length; a++) {
|
|
@@ -10042,7 +10090,7 @@ function Oc(t, e, n, r) {
|
|
|
10042
10090
|
});
|
|
10043
10091
|
}
|
|
10044
10092
|
}
|
|
10045
|
-
function
|
|
10093
|
+
function Gc(t, e) {
|
|
10046
10094
|
const n = /* @__PURE__ */ new Map();
|
|
10047
10095
|
for (const r of t)
|
|
10048
10096
|
n.set(r, {
|
|
@@ -10053,7 +10101,7 @@ function Dc(t, e) {
|
|
|
10053
10101
|
Ve(n, s, {}).transferTo = r;
|
|
10054
10102
|
return n;
|
|
10055
10103
|
}
|
|
10056
|
-
function
|
|
10104
|
+
function Fc(t) {
|
|
10057
10105
|
const e = /(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu, n = /* @__PURE__ */ new Map();
|
|
10058
10106
|
let r = 0, o = 0, s;
|
|
10059
10107
|
for (; s = e.exec(t); ) {
|
|
@@ -10062,11 +10110,11 @@ function Gc(t) {
|
|
|
10062
10110
|
}
|
|
10063
10111
|
return n;
|
|
10064
10112
|
}
|
|
10065
|
-
function Fc(t, e) {
|
|
10066
|
-
const n = Bc(t, e);
|
|
10067
|
-
return n.options ? new Mc(n.pattern, n.flags, n.options) : new RegExp(n.pattern, n.flags);
|
|
10068
|
-
}
|
|
10069
10113
|
function Bc(t, e) {
|
|
10114
|
+
const n = jc(t, e);
|
|
10115
|
+
return n.options ? new Oc(n.pattern, n.flags, n.options) : new RegExp(n.pattern, n.flags);
|
|
10116
|
+
}
|
|
10117
|
+
function jc(t, e) {
|
|
10070
10118
|
const n = Xo(e), r = Bo(t, {
|
|
10071
10119
|
flags: n.flags,
|
|
10072
10120
|
normalizeUnknownPropertyNames: !0,
|
|
@@ -10076,16 +10124,16 @@ function Bc(t, e) {
|
|
|
10076
10124
|
},
|
|
10077
10125
|
skipBackrefValidation: n.rules.allowOrphanBackrefs,
|
|
10078
10126
|
unicodePropertyMap: An
|
|
10079
|
-
}), o =
|
|
10127
|
+
}), o = dc(r, {
|
|
10080
10128
|
accuracy: n.accuracy,
|
|
10081
10129
|
asciiWordBoundaries: n.rules.asciiWordBoundaries,
|
|
10082
10130
|
avoidSubclass: n.avoidSubclass,
|
|
10083
10131
|
bestEffortTarget: n.target
|
|
10084
|
-
}), s =
|
|
10132
|
+
}), s = xc(o, n), a = rc(s.pattern, {
|
|
10085
10133
|
captureTransfers: s._captureTransfers,
|
|
10086
10134
|
hiddenCaptures: s._hiddenCaptures,
|
|
10087
10135
|
mode: "external"
|
|
10088
|
-
}), i =
|
|
10136
|
+
}), i = tc(a.pattern), l = ec(i.pattern, {
|
|
10089
10137
|
captureTransfers: a.captureTransfers,
|
|
10090
10138
|
hiddenCaptures: a.hiddenCaptures
|
|
10091
10139
|
}), u = {
|
|
@@ -10096,7 +10144,7 @@ function Bc(t, e) {
|
|
|
10096
10144
|
if (n.lazyCompileLength !== 1 / 0)
|
|
10097
10145
|
throw new Error("Lazy compilation requires subclass");
|
|
10098
10146
|
} else {
|
|
10099
|
-
const c = l.hiddenCaptures.sort((f,
|
|
10147
|
+
const c = l.hiddenCaptures.sort((f, m) => f - m), h = Array.from(l.captureTransfers), p = o._strategy, d = u.pattern.length >= n.lazyCompileLength;
|
|
10100
10148
|
(c.length || h.length || p || d) && (u.options = {
|
|
10101
10149
|
...c.length && { hiddenCaptures: c },
|
|
10102
10150
|
...h.length && { transfers: h },
|
|
@@ -10107,7 +10155,7 @@ function Bc(t, e) {
|
|
|
10107
10155
|
return u;
|
|
10108
10156
|
}
|
|
10109
10157
|
const Rr = 4294967295;
|
|
10110
|
-
class
|
|
10158
|
+
class Uc {
|
|
10111
10159
|
constructor(e, n = {}) {
|
|
10112
10160
|
this.patterns = e, this.options = n;
|
|
10113
10161
|
const {
|
|
@@ -10181,8 +10229,8 @@ class jc {
|
|
|
10181
10229
|
return null;
|
|
10182
10230
|
}
|
|
10183
10231
|
}
|
|
10184
|
-
function
|
|
10185
|
-
return
|
|
10232
|
+
function zc(t, e) {
|
|
10233
|
+
return Bc(
|
|
10186
10234
|
t,
|
|
10187
10235
|
{
|
|
10188
10236
|
global: !0,
|
|
@@ -10208,7 +10256,7 @@ function Uc(t, e) {
|
|
|
10208
10256
|
}
|
|
10209
10257
|
);
|
|
10210
10258
|
}
|
|
10211
|
-
function
|
|
10259
|
+
function Hc(t = {}) {
|
|
10212
10260
|
const e = Object.assign(
|
|
10213
10261
|
{
|
|
10214
10262
|
target: "auto",
|
|
@@ -10216,9 +10264,9 @@ function zc(t = {}) {
|
|
|
10216
10264
|
},
|
|
10217
10265
|
t
|
|
10218
10266
|
);
|
|
10219
|
-
return e.regexConstructor ||= (n) =>
|
|
10267
|
+
return e.regexConstructor ||= (n) => zc(n, { target: e.target }), {
|
|
10220
10268
|
createScanner(n) {
|
|
10221
|
-
return new
|
|
10269
|
+
return new Uc(n, e);
|
|
10222
10270
|
},
|
|
10223
10271
|
createString(n) {
|
|
10224
10272
|
return {
|
|
@@ -10227,8 +10275,8 @@ function zc(t = {}) {
|
|
|
10227
10275
|
}
|
|
10228
10276
|
};
|
|
10229
10277
|
}
|
|
10230
|
-
const
|
|
10231
|
-
engine:
|
|
10278
|
+
const Wc = "overflow-x-auto scrollbar not-inline", Vc = Hc({ forgiving: !0 }), qc = Xl({
|
|
10279
|
+
engine: Vc,
|
|
10232
10280
|
langAlias: {
|
|
10233
10281
|
markup: "html",
|
|
10234
10282
|
svg: "xml",
|
|
@@ -10238,7 +10286,7 @@ const Hc = "overflow-x-auto scrollbar not-inline", Wc = zc({ forgiving: !0 }), V
|
|
|
10238
10286
|
rss: "xml",
|
|
10239
10287
|
webmanifest: "json"
|
|
10240
10288
|
}
|
|
10241
|
-
}),
|
|
10289
|
+
}), Xc = await qc, Ct = {
|
|
10242
10290
|
themes: {
|
|
10243
10291
|
light: "github-light",
|
|
10244
10292
|
dark: "github-dark"
|
|
@@ -10248,7 +10296,7 @@ const Hc = "overflow-x-auto scrollbar not-inline", Wc = zc({ forgiving: !0 }), V
|
|
|
10248
10296
|
fallbackLanguage: "text",
|
|
10249
10297
|
inline: "tailing-curly-colon",
|
|
10250
10298
|
addLanguageClass: !0,
|
|
10251
|
-
transformers: [
|
|
10299
|
+
transformers: [tu(), ru()],
|
|
10252
10300
|
parseMetaString: (t) => {
|
|
10253
10301
|
const e = t.matchAll(
|
|
10254
10302
|
/([a-z0-9]+)(?:=(["'])(.*?)\2|=(.*?)(?:\s|$)|(?:\s|$))/gi
|
|
@@ -10260,7 +10308,7 @@ const Hc = "overflow-x-auto scrollbar not-inline", Wc = zc({ forgiving: !0 }), V
|
|
|
10260
10308
|
})
|
|
10261
10309
|
);
|
|
10262
10310
|
}
|
|
10263
|
-
},
|
|
10311
|
+
}, Kc = () => (t) => {
|
|
10264
10312
|
Xr(t, "element", (e, n, r) => {
|
|
10265
10313
|
if (e.tagName !== "code") return;
|
|
10266
10314
|
const o = r?.type === "element" && r.tagName === "pre";
|
|
@@ -10270,17 +10318,17 @@ const Hc = "overflow-x-auto scrollbar not-inline", Wc = zc({ forgiving: !0 }), V
|
|
|
10270
10318
|
class: Ir(e.properties.class, r.properties.class)
|
|
10271
10319
|
}, r.properties = {});
|
|
10272
10320
|
});
|
|
10273
|
-
},
|
|
10321
|
+
}, gh = (t = Ct.themes, e = Xc) => [
|
|
10274
10322
|
[
|
|
10275
|
-
|
|
10323
|
+
Ql,
|
|
10276
10324
|
e,
|
|
10277
|
-
{ ...
|
|
10325
|
+
{ ...Ct, themes: t }
|
|
10278
10326
|
],
|
|
10279
|
-
|
|
10280
|
-
],
|
|
10327
|
+
Kc
|
|
10328
|
+
], Yc = (t, e, n = "text", r = Ct.themes) => {
|
|
10281
10329
|
const o = t.codeToHast(e, {
|
|
10282
10330
|
lang: n,
|
|
10283
|
-
...
|
|
10331
|
+
...Ct,
|
|
10284
10332
|
themes: r
|
|
10285
10333
|
});
|
|
10286
10334
|
return Gs(o, {
|
|
@@ -10290,15 +10338,15 @@ const Hc = "overflow-x-auto scrollbar not-inline", Wc = zc({ forgiving: !0 }), V
|
|
|
10290
10338
|
components: {
|
|
10291
10339
|
code: (s) => os("code", {
|
|
10292
10340
|
...s,
|
|
10293
|
-
className: Ir(s.className,
|
|
10341
|
+
className: Ir(s.className, Wc)
|
|
10294
10342
|
})
|
|
10295
10343
|
}
|
|
10296
10344
|
});
|
|
10297
|
-
},
|
|
10345
|
+
}, Jc = as(
|
|
10298
10346
|
({ code: t, children: e, embedded: n, ...r }) => {
|
|
10299
10347
|
const { syntaxHighlighting: o } = is().options;
|
|
10300
10348
|
us(o?.highlighter, "Highlighter not found");
|
|
10301
|
-
const s =
|
|
10349
|
+
const s = Yc(
|
|
10302
10350
|
o.highlighter,
|
|
10303
10351
|
t ?? e,
|
|
10304
10352
|
r.language,
|
|
@@ -10307,30 +10355,30 @@ const Hc = "overflow-x-auto scrollbar not-inline", Wc = zc({ forgiving: !0 }), V
|
|
|
10307
10355
|
return n ? /* @__PURE__ */ at.jsx(hs, { ...r, children: s }) : /* @__PURE__ */ at.jsx(cs, { ...r, children: s });
|
|
10308
10356
|
}
|
|
10309
10357
|
);
|
|
10310
|
-
|
|
10358
|
+
Jc.displayName = "SyntaxHighlight";
|
|
10311
10359
|
export {
|
|
10312
10360
|
Fn as E,
|
|
10313
|
-
|
|
10314
|
-
|
|
10361
|
+
Wc as H,
|
|
10362
|
+
Jc as S,
|
|
10315
10363
|
H as V,
|
|
10316
10364
|
Ps as a,
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10365
|
+
ph as b,
|
|
10366
|
+
hh as c,
|
|
10367
|
+
ih as d,
|
|
10320
10368
|
Nr as e,
|
|
10321
10369
|
Fr as f,
|
|
10322
10370
|
Vr as g,
|
|
10323
10371
|
ca as h,
|
|
10324
10372
|
ia as i,
|
|
10325
10373
|
jn as j,
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10374
|
+
gh as k,
|
|
10375
|
+
Yc as l,
|
|
10376
|
+
sh as o,
|
|
10329
10377
|
Br as p,
|
|
10330
10378
|
$s as s,
|
|
10331
10379
|
Gs as t,
|
|
10332
|
-
|
|
10380
|
+
ah as u,
|
|
10333
10381
|
Xr as v,
|
|
10334
10382
|
ua as z
|
|
10335
10383
|
};
|
|
10336
|
-
//# sourceMappingURL=SyntaxHighlight-
|
|
10384
|
+
//# sourceMappingURL=SyntaxHighlight-Kdyskw3C.js.map
|