@apify/docusaurus-plugin-typedoc-api 4.2.11-0 → 4.2.11-1
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/lib/components/AnchorLink.js.map +1 -0
- package/lib/components/ApiChangelog.js.map +1 -0
- package/lib/components/ApiDataContext.js.map +1 -0
- package/lib/components/ApiIndex.js.map +1 -0
- package/lib/components/ApiItem.js.map +1 -0
- package/lib/components/ApiItemLayout.js.map +1 -0
- package/lib/components/ApiOptionsLayout.js.map +1 -0
- package/lib/components/ApiPage.js.map +1 -0
- package/lib/components/Breadcrumb.js.map +1 -0
- package/lib/components/Comment.js.map +1 -0
- package/lib/components/CommentBadges.js.map +1 -0
- package/lib/components/DefaultValue.js.map +1 -0
- package/lib/components/Flags.js.map +1 -0
- package/lib/components/Footer.js.map +1 -0
- package/lib/components/Hierarchy.js.map +1 -0
- package/lib/components/Icon.js.map +1 -0
- package/lib/components/Index.js.map +1 -0
- package/lib/components/Markdown.js.map +1 -0
- package/lib/components/Member.js.map +1 -0
- package/lib/components/MemberDeclaration.js.map +1 -0
- package/lib/components/MemberGetterSetter.js.map +1 -0
- package/lib/components/MemberReference.js.map +1 -0
- package/lib/components/MemberSignatureBody.js.map +1 -0
- package/lib/components/MemberSignatureTitle.js.map +1 -0
- package/lib/components/MemberSignatures.js.map +1 -0
- package/lib/components/MemberSources.js.map +1 -0
- package/lib/components/Members.js.map +1 -0
- package/lib/components/MembersGroup.js.map +1 -0
- package/lib/components/Parameter.js.map +1 -0
- package/lib/components/Reflection.js.map +1 -0
- package/lib/components/SourceLink.js.map +1 -0
- package/lib/components/Type.js.map +1 -0
- package/lib/components/TypeAndParent.js.map +1 -0
- package/lib/components/TypeParameters.js.map +1 -0
- package/lib/components/TypeParametersGeneric.js.map +1 -0
- package/lib/components/VersionBanner.js.map +1 -0
- package/lib/hooks/useBreadcrumbs.js.map +1 -0
- package/lib/hooks/useGitRefName.js.map +1 -0
- package/lib/hooks/useMinimalLayout.js.map +1 -0
- package/lib/hooks/useReflection.js.map +1 -0
- package/lib/hooks/useReflectionMap.js.map +1 -0
- package/lib/index.js.map +1 -0
- package/lib/markdownLoader.js.map +1 -0
- package/lib/plugin/data.js.map +1 -0
- package/lib/plugin/python/consts.js.map +1 -0
- package/lib/plugin/python/index.js.map +1 -0
- package/lib/plugin/python/inheritance.js.map +1 -0
- package/lib/plugin/python/packageVersions.js.map +1 -0
- package/lib/plugin/python/transformation.js.map +1 -0
- package/lib/plugin/python/type-parsing/index.js.map +1 -0
- package/lib/plugin/python/utils.js.map +1 -0
- package/lib/plugin/sidebar.js.map +1 -0
- package/lib/plugin/structure/0.23.js.map +1 -0
- package/lib/plugin/url.js.map +1 -0
- package/lib/plugin/version.js.map +1 -0
- package/lib/utils/helpers.js.map +1 -0
- package/lib/utils/hierarchy.js.map +1 -0
- package/lib/utils/icons.js.map +1 -0
- package/lib/utils/links.js.map +1 -0
- package/lib/utils/markdown.js.map +1 -0
- package/lib/{packages/plugin/src/utils → utils}/reexports.js +2 -2
- package/lib/utils/reexports.js.map +1 -0
- package/lib/utils/visibility.js.map +1 -0
- package/package.json +3 -2
- package/lib/_virtual/_commonjsHelpers.js +0 -44
- package/lib/_virtual/_commonjsHelpers.js.map +0 -1
- package/lib/node_modules/boolbase/index.js +0 -18
- package/lib/node_modules/boolbase/index.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/api/attributes.js +0 -568
- package/lib/node_modules/cheerio/lib/esm/api/attributes.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/api/css.js +0 -113
- package/lib/node_modules/cheerio/lib/esm/api/css.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/api/forms.js +0 -92
- package/lib/node_modules/cheerio/lib/esm/api/forms.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/api/manipulation.js +0 -807
- package/lib/node_modules/cheerio/lib/esm/api/manipulation.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/api/traversing.js +0 -842
- package/lib/node_modules/cheerio/lib/esm/api/traversing.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/cheerio.js +0 -41
- package/lib/node_modules/cheerio/lib/esm/cheerio.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/index.js +0 -112
- package/lib/node_modules/cheerio/lib/esm/index.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/load.js +0 -110
- package/lib/node_modules/cheerio/lib/esm/load.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/options.js +0 -32
- package/lib/node_modules/cheerio/lib/esm/options.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/parse.js +0 -78
- package/lib/node_modules/cheerio/lib/esm/parse.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/parsers/parse5-adapter.js +0 -57
- package/lib/node_modules/cheerio/lib/esm/parsers/parse5-adapter.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/static.js +0 -191
- package/lib/node_modules/cheerio/lib/esm/static.js.map +0 -1
- package/lib/node_modules/cheerio/lib/esm/utils.js +0 -105
- package/lib/node_modules/cheerio/lib/esm/utils.js.map +0 -1
- package/lib/node_modules/cheerio/node_modules/htmlparser2/lib/esm/Parser.js +0 -381
- package/lib/node_modules/cheerio/node_modules/htmlparser2/lib/esm/Parser.js.map +0 -1
- package/lib/node_modules/cheerio/node_modules/htmlparser2/lib/esm/Tokenizer.js +0 -888
- package/lib/node_modules/cheerio/node_modules/htmlparser2/lib/esm/Tokenizer.js.map +0 -1
- package/lib/node_modules/cheerio/node_modules/htmlparser2/lib/esm/index.js +0 -69
- package/lib/node_modules/cheerio/node_modules/htmlparser2/lib/esm/index.js.map +0 -1
- package/lib/node_modules/cheerio-select/lib/esm/helpers.js +0 -22
- package/lib/node_modules/cheerio-select/lib/esm/helpers.js.map +0 -1
- package/lib/node_modules/cheerio-select/lib/esm/index.js +0 -252
- package/lib/node_modules/cheerio-select/lib/esm/index.js.map +0 -1
- package/lib/node_modules/cheerio-select/lib/esm/positionals.js +0 -37
- package/lib/node_modules/cheerio-select/lib/esm/positionals.js.map +0 -1
- package/lib/node_modules/css-select/lib/esm/attributes.js +0 -155
- package/lib/node_modules/css-select/lib/esm/attributes.js.map +0 -1
- package/lib/node_modules/css-select/lib/esm/compile.js +0 -118
- package/lib/node_modules/css-select/lib/esm/compile.js.map +0 -1
- package/lib/node_modules/css-select/lib/esm/general.js +0 -155
- package/lib/node_modules/css-select/lib/esm/general.js.map +0 -1
- package/lib/node_modules/css-select/lib/esm/index.js +0 -115
- package/lib/node_modules/css-select/lib/esm/index.js.map +0 -1
- package/lib/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js +0 -38
- package/lib/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js.map +0 -1
- package/lib/node_modules/css-select/lib/esm/pseudo-selectors/filters.js +0 -151
- package/lib/node_modules/css-select/lib/esm/pseudo-selectors/filters.js.map +0 -1
- package/lib/node_modules/css-select/lib/esm/pseudo-selectors/index.js +0 -47
- package/lib/node_modules/css-select/lib/esm/pseudo-selectors/index.js.map +0 -1
- package/lib/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js +0 -88
- package/lib/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js.map +0 -1
- package/lib/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js +0 -85
- package/lib/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js.map +0 -1
- package/lib/node_modules/css-select/lib/esm/sort.js +0 -70
- package/lib/node_modules/css-select/lib/esm/sort.js.map +0 -1
- package/lib/node_modules/css-what/lib/es/index.js +0 -18
- package/lib/node_modules/css-what/lib/es/index.js.map +0 -1
- package/lib/node_modules/css-what/lib/es/parse.js +0 -397
- package/lib/node_modules/css-what/lib/es/parse.js.map +0 -1
- package/lib/node_modules/css-what/lib/es/stringify.js +0 -95
- package/lib/node_modules/css-what/lib/es/stringify.js.map +0 -1
- package/lib/node_modules/css-what/lib/es/types.js +0 -43
- package/lib/node_modules/css-what/lib/es/types.js.map +0 -1
- package/lib/node_modules/dom-serializer/lib/esm/foreignNames.js +0 -7
- package/lib/node_modules/dom-serializer/lib/esm/foreignNames.js.map +0 -1
- package/lib/node_modules/dom-serializer/lib/esm/index.js +0 -146
- package/lib/node_modules/dom-serializer/lib/esm/index.js.map +0 -1
- package/lib/node_modules/domelementtype/lib/esm/index.js +0 -62
- package/lib/node_modules/domelementtype/lib/esm/index.js.map +0 -1
- package/lib/node_modules/domhandler/lib/esm/index.js +0 -166
- package/lib/node_modules/domhandler/lib/esm/index.js.map +0 -1
- package/lib/node_modules/domhandler/lib/esm/node.js +0 -352
- package/lib/node_modules/domhandler/lib/esm/node.js.map +0 -1
- package/lib/node_modules/domutils/lib/esm/feeds.js +0 -176
- package/lib/node_modules/domutils/lib/esm/feeds.js.map +0 -1
- package/lib/node_modules/domutils/lib/esm/helpers.js +0 -142
- package/lib/node_modules/domutils/lib/esm/helpers.js.map +0 -1
- package/lib/node_modules/domutils/lib/esm/index.js +0 -56
- package/lib/node_modules/domutils/lib/esm/index.js.map +0 -1
- package/lib/node_modules/domutils/lib/esm/legacy.js +0 -144
- package/lib/node_modules/domutils/lib/esm/legacy.js.map +0 -1
- package/lib/node_modules/domutils/lib/esm/manipulation.js +0 -137
- package/lib/node_modules/domutils/lib/esm/manipulation.js.map +0 -1
- package/lib/node_modules/domutils/lib/esm/querying.js +0 -149
- package/lib/node_modules/domutils/lib/esm/querying.js.map +0 -1
- package/lib/node_modules/domutils/lib/esm/stringify.js +0 -80
- package/lib/node_modules/domutils/lib/esm/stringify.js.map +0 -1
- package/lib/node_modules/domutils/lib/esm/traversal.js +0 -128
- package/lib/node_modules/domutils/lib/esm/traversal.js.map +0 -1
- package/lib/node_modules/entities/lib/esm/decode.js +0 -495
- package/lib/node_modules/entities/lib/esm/decode.js.map +0 -1
- package/lib/node_modules/entities/lib/esm/decode_codepoint.js +0 -52
- package/lib/node_modules/entities/lib/esm/decode_codepoint.js.map +0 -1
- package/lib/node_modules/entities/lib/esm/encode.js +0 -68
- package/lib/node_modules/entities/lib/esm/encode.js.map +0 -1
- package/lib/node_modules/entities/lib/esm/escape.js +0 -103
- package/lib/node_modules/entities/lib/esm/escape.js.map +0 -1
- package/lib/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -8
- package/lib/node_modules/entities/lib/esm/generated/decode-data-html.js.map +0 -1
- package/lib/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -8
- package/lib/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +0 -1
- package/lib/node_modules/entities/lib/esm/generated/encode-html.js +0 -264
- package/lib/node_modules/entities/lib/esm/generated/encode-html.js.map +0 -1
- package/lib/node_modules/entities/lib/esm/index.js +0 -122
- package/lib/node_modules/entities/lib/esm/index.js.map +0 -1
- package/lib/node_modules/nth-check/lib/esm/compile.js +0 -111
- package/lib/node_modules/nth-check/lib/esm/compile.js.map +0 -1
- package/lib/node_modules/nth-check/lib/esm/index.js +0 -73
- package/lib/node_modules/nth-check/lib/esm/index.js.map +0 -1
- package/lib/node_modules/nth-check/lib/esm/parse.js +0 -71
- package/lib/node_modules/nth-check/lib/esm/parse.js.map +0 -1
- package/lib/node_modules/parse5/dist/common/doctype.js +0 -49
- package/lib/node_modules/parse5/dist/common/doctype.js.map +0 -1
- package/lib/node_modules/parse5/dist/common/error-codes.js +0 -66
- package/lib/node_modules/parse5/dist/common/error-codes.js.map +0 -1
- package/lib/node_modules/parse5/dist/common/foreign-content.js +0 -134
- package/lib/node_modules/parse5/dist/common/foreign-content.js.map +0 -1
- package/lib/node_modules/parse5/dist/common/html.js +0 -316
- package/lib/node_modules/parse5/dist/common/html.js.map +0 -1
- package/lib/node_modules/parse5/dist/common/token.js +0 -24
- package/lib/node_modules/parse5/dist/common/token.js.map +0 -1
- package/lib/node_modules/parse5/dist/common/unicode.js +0 -72
- package/lib/node_modules/parse5/dist/common/unicode.js.map +0 -1
- package/lib/node_modules/parse5/dist/index.js +0 -58
- package/lib/node_modules/parse5/dist/index.js.map +0 -1
- package/lib/node_modules/parse5/dist/parser/formatting-element-list.js +0 -115
- package/lib/node_modules/parse5/dist/parser/formatting-element-list.js.map +0 -1
- package/lib/node_modules/parse5/dist/parser/index.js +0 -3387
- package/lib/node_modules/parse5/dist/parser/index.js.map +0 -1
- package/lib/node_modules/parse5/dist/parser/open-element-stack.js +0 -286
- package/lib/node_modules/parse5/dist/parser/open-element-stack.js.map +0 -1
- package/lib/node_modules/parse5/dist/serializer/index.js +0 -160
- package/lib/node_modules/parse5/dist/serializer/index.js.map +0 -1
- package/lib/node_modules/parse5/dist/tokenizer/index.js +0 -3142
- package/lib/node_modules/parse5/dist/tokenizer/index.js.map +0 -1
- package/lib/node_modules/parse5/dist/tokenizer/preprocessor.js +0 -195
- package/lib/node_modules/parse5/dist/tokenizer/preprocessor.js.map +0 -1
- package/lib/node_modules/parse5/dist/tree-adapters/default.js +0 -180
- package/lib/node_modules/parse5/dist/tree-adapters/default.js.map +0 -1
- package/lib/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js +0 -218
- package/lib/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js.map +0 -1
- package/lib/packages/plugin/src/components/AnchorLink.js.map +0 -1
- package/lib/packages/plugin/src/components/ApiChangelog.js.map +0 -1
- package/lib/packages/plugin/src/components/ApiDataContext.js.map +0 -1
- package/lib/packages/plugin/src/components/ApiIndex.js.map +0 -1
- package/lib/packages/plugin/src/components/ApiItem.js.map +0 -1
- package/lib/packages/plugin/src/components/ApiItemLayout.js.map +0 -1
- package/lib/packages/plugin/src/components/ApiOptionsLayout.js.map +0 -1
- package/lib/packages/plugin/src/components/ApiPage.js.map +0 -1
- package/lib/packages/plugin/src/components/Breadcrumb.js.map +0 -1
- package/lib/packages/plugin/src/components/Comment.js.map +0 -1
- package/lib/packages/plugin/src/components/CommentBadges.js.map +0 -1
- package/lib/packages/plugin/src/components/DefaultValue.js.map +0 -1
- package/lib/packages/plugin/src/components/Flags.js.map +0 -1
- package/lib/packages/plugin/src/components/Footer.js.map +0 -1
- package/lib/packages/plugin/src/components/Hierarchy.js.map +0 -1
- package/lib/packages/plugin/src/components/Icon.js.map +0 -1
- package/lib/packages/plugin/src/components/Index.js.map +0 -1
- package/lib/packages/plugin/src/components/Markdown.js.map +0 -1
- package/lib/packages/plugin/src/components/Member.js.map +0 -1
- package/lib/packages/plugin/src/components/MemberDeclaration.js.map +0 -1
- package/lib/packages/plugin/src/components/MemberGetterSetter.js.map +0 -1
- package/lib/packages/plugin/src/components/MemberReference.js.map +0 -1
- package/lib/packages/plugin/src/components/MemberSignatureBody.js.map +0 -1
- package/lib/packages/plugin/src/components/MemberSignatureTitle.js.map +0 -1
- package/lib/packages/plugin/src/components/MemberSignatures.js.map +0 -1
- package/lib/packages/plugin/src/components/MemberSources.js.map +0 -1
- package/lib/packages/plugin/src/components/Members.js.map +0 -1
- package/lib/packages/plugin/src/components/MembersGroup.js.map +0 -1
- package/lib/packages/plugin/src/components/Parameter.js.map +0 -1
- package/lib/packages/plugin/src/components/Reflection.js.map +0 -1
- package/lib/packages/plugin/src/components/SourceLink.js.map +0 -1
- package/lib/packages/plugin/src/components/Type.js.map +0 -1
- package/lib/packages/plugin/src/components/TypeAndParent.js.map +0 -1
- package/lib/packages/plugin/src/components/TypeParameters.js.map +0 -1
- package/lib/packages/plugin/src/components/TypeParametersGeneric.js.map +0 -1
- package/lib/packages/plugin/src/components/VersionBanner.js.map +0 -1
- package/lib/packages/plugin/src/hooks/useBreadcrumbs.js.map +0 -1
- package/lib/packages/plugin/src/hooks/useGitRefName.js.map +0 -1
- package/lib/packages/plugin/src/hooks/useMinimalLayout.js.map +0 -1
- package/lib/packages/plugin/src/hooks/useReflection.js.map +0 -1
- package/lib/packages/plugin/src/hooks/useReflectionMap.js.map +0 -1
- package/lib/packages/plugin/src/index.js.map +0 -1
- package/lib/packages/plugin/src/markdownLoader.js.map +0 -1
- package/lib/packages/plugin/src/plugin/data.js.map +0 -1
- package/lib/packages/plugin/src/plugin/python/consts.js.map +0 -1
- package/lib/packages/plugin/src/plugin/python/index.js.map +0 -1
- package/lib/packages/plugin/src/plugin/python/inheritance.js.map +0 -1
- package/lib/packages/plugin/src/plugin/python/packageVersions.js.map +0 -1
- package/lib/packages/plugin/src/plugin/python/transformation.js.map +0 -1
- package/lib/packages/plugin/src/plugin/python/type-parsing/index.js.map +0 -1
- package/lib/packages/plugin/src/plugin/python/utils.js.map +0 -1
- package/lib/packages/plugin/src/plugin/sidebar.js.map +0 -1
- package/lib/packages/plugin/src/plugin/structure/0.23.js.map +0 -1
- package/lib/packages/plugin/src/plugin/url.js.map +0 -1
- package/lib/packages/plugin/src/plugin/version.js.map +0 -1
- package/lib/packages/plugin/src/types.js +0 -2
- package/lib/packages/plugin/src/types.js.map +0 -1
- package/lib/packages/plugin/src/utils/helpers.js.map +0 -1
- package/lib/packages/plugin/src/utils/hierarchy.js.map +0 -1
- package/lib/packages/plugin/src/utils/icons.js.map +0 -1
- package/lib/packages/plugin/src/utils/links.js.map +0 -1
- package/lib/packages/plugin/src/utils/markdown.js.map +0 -1
- package/lib/packages/plugin/src/utils/reexports.js.map +0 -1
- package/lib/packages/plugin/src/utils/visibility.js.map +0 -1
- /package/lib/{packages/plugin/src/components → components}/AnchorLink.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/ApiChangelog.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/ApiDataContext.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/ApiIndex.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/ApiItem.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/ApiItemLayout.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/ApiOptionsLayout.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/ApiPage.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Breadcrumb.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Comment.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/CommentBadges.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/DefaultValue.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Flags.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Footer.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Hierarchy.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Icon.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Index.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Markdown.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Member.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/MemberDeclaration.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/MemberGetterSetter.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/MemberReference.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/MemberSignatureBody.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/MemberSignatureTitle.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/MemberSignatures.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/MemberSources.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Members.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/MembersGroup.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Parameter.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Reflection.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/SourceLink.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/Type.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/TypeAndParent.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/TypeParameters.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/TypeParametersGeneric.js +0 -0
- /package/lib/{packages/plugin/src/components → components}/VersionBanner.js +0 -0
- /package/lib/{packages/plugin/src/hooks → hooks}/useBreadcrumbs.js +0 -0
- /package/lib/{packages/plugin/src/hooks → hooks}/useGitRefName.js +0 -0
- /package/lib/{packages/plugin/src/hooks → hooks}/useMinimalLayout.js +0 -0
- /package/lib/{packages/plugin/src/hooks → hooks}/useReflection.js +0 -0
- /package/lib/{packages/plugin/src/hooks → hooks}/useReflectionMap.js +0 -0
- /package/lib/{packages/plugin/src/index.js → index.js} +0 -0
- /package/lib/{packages/plugin/src/markdownLoader.js → markdownLoader.js} +0 -0
- /package/lib/{packages/plugin/src/plugin → plugin}/data.js +0 -0
- /package/lib/{packages/plugin/src/plugin → plugin}/python/consts.js +0 -0
- /package/lib/{packages/plugin/src/plugin → plugin}/python/index.js +0 -0
- /package/lib/{packages/plugin/src/plugin → plugin}/python/inheritance.js +0 -0
- /package/lib/{packages/plugin/src/plugin → plugin}/python/packageVersions.js +0 -0
- /package/lib/{packages/plugin/src/plugin → plugin}/python/transformation.js +0 -0
- /package/lib/{packages/plugin/src/plugin → plugin}/python/type-parsing/index.js +0 -0
- /package/lib/{node_modules/cheerio/lib/esm → plugin/python}/types.js +0 -0
- /package/lib/{node_modules/cheerio/lib/esm → plugin/python}/types.js.map +0 -0
- /package/lib/{packages/plugin/src/plugin → plugin}/python/utils.js +0 -0
- /package/lib/{packages/plugin/src/plugin → plugin}/sidebar.js +0 -0
- /package/lib/{packages/plugin/src/plugin → plugin}/structure/0.23.js +0 -0
- /package/lib/{packages/plugin/src/plugin → plugin}/url.js +0 -0
- /package/lib/{packages/plugin/src/plugin → plugin}/version.js +0 -0
- /package/lib/{packages/plugin/src/plugin/python/types.js → types.js} +0 -0
- /package/lib/{packages/plugin/src/plugin/python/types.js.map → types.js.map} +0 -0
- /package/lib/{packages/plugin/src/utils → utils}/helpers.js +0 -0
- /package/lib/{packages/plugin/src/utils → utils}/hierarchy.js +0 -0
- /package/lib/{packages/plugin/src/utils → utils}/icons.js +0 -0
- /package/lib/{packages/plugin/src/utils → utils}/links.js +0 -0
- /package/lib/{packages/plugin/src/utils → utils}/markdown.js +0 -0
- /package/lib/{packages/plugin/src/utils → utils}/visibility.js +0 -0
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('../../../domhandler/lib/esm/index.js');
|
|
4
|
-
const node = require('../../../domhandler/lib/esm/node.js');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Given an array of nodes, remove any member that is contained by another
|
|
8
|
-
* member.
|
|
9
|
-
*
|
|
10
|
-
* @category Helpers
|
|
11
|
-
* @param nodes Nodes to filter.
|
|
12
|
-
* @returns Remaining nodes that aren't contained by other nodes.
|
|
13
|
-
*/
|
|
14
|
-
function removeSubsets(nodes) {
|
|
15
|
-
let idx = nodes.length;
|
|
16
|
-
/*
|
|
17
|
-
* Check if each node (or one of its ancestors) is already contained in the
|
|
18
|
-
* array.
|
|
19
|
-
*/
|
|
20
|
-
while (--idx >= 0) {
|
|
21
|
-
const node = nodes[idx];
|
|
22
|
-
/*
|
|
23
|
-
* Remove the node if it is not unique.
|
|
24
|
-
* We are going through the array from the end, so we only
|
|
25
|
-
* have to check nodes that preceed the node under consideration in the array.
|
|
26
|
-
*/
|
|
27
|
-
if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) {
|
|
28
|
-
nodes.splice(idx, 1);
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) {
|
|
32
|
-
if (nodes.includes(ancestor)) {
|
|
33
|
-
nodes.splice(idx, 1);
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return nodes;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @category Helpers
|
|
42
|
-
* @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition}
|
|
43
|
-
*/
|
|
44
|
-
exports.DocumentPosition = void 0;
|
|
45
|
-
(function (DocumentPosition) {
|
|
46
|
-
DocumentPosition[DocumentPosition["DISCONNECTED"] = 1] = "DISCONNECTED";
|
|
47
|
-
DocumentPosition[DocumentPosition["PRECEDING"] = 2] = "PRECEDING";
|
|
48
|
-
DocumentPosition[DocumentPosition["FOLLOWING"] = 4] = "FOLLOWING";
|
|
49
|
-
DocumentPosition[DocumentPosition["CONTAINS"] = 8] = "CONTAINS";
|
|
50
|
-
DocumentPosition[DocumentPosition["CONTAINED_BY"] = 16] = "CONTAINED_BY";
|
|
51
|
-
})(exports.DocumentPosition || (exports.DocumentPosition = {}));
|
|
52
|
-
/**
|
|
53
|
-
* Compare the position of one node against another node in any other document,
|
|
54
|
-
* returning a bitmask with the values from {@link DocumentPosition}.
|
|
55
|
-
*
|
|
56
|
-
* Document order:
|
|
57
|
-
* > There is an ordering, document order, defined on all the nodes in the
|
|
58
|
-
* > document corresponding to the order in which the first character of the
|
|
59
|
-
* > XML representation of each node occurs in the XML representation of the
|
|
60
|
-
* > document after expansion of general entities. Thus, the document element
|
|
61
|
-
* > node will be the first node. Element nodes occur before their children.
|
|
62
|
-
* > Thus, document order orders element nodes in order of the occurrence of
|
|
63
|
-
* > their start-tag in the XML (after expansion of entities). The attribute
|
|
64
|
-
* > nodes of an element occur after the element and before its children. The
|
|
65
|
-
* > relative order of attribute nodes is implementation-dependent.
|
|
66
|
-
*
|
|
67
|
-
* Source:
|
|
68
|
-
* http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order
|
|
69
|
-
*
|
|
70
|
-
* @category Helpers
|
|
71
|
-
* @param nodeA The first node to use in the comparison
|
|
72
|
-
* @param nodeB The second node to use in the comparison
|
|
73
|
-
* @returns A bitmask describing the input nodes' relative position.
|
|
74
|
-
*
|
|
75
|
-
* See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for
|
|
76
|
-
* a description of these values.
|
|
77
|
-
*/
|
|
78
|
-
function compareDocumentPosition(nodeA, nodeB) {
|
|
79
|
-
const aParents = [];
|
|
80
|
-
const bParents = [];
|
|
81
|
-
if (nodeA === nodeB) {
|
|
82
|
-
return 0;
|
|
83
|
-
}
|
|
84
|
-
let current = node.hasChildren(nodeA) ? nodeA : nodeA.parent;
|
|
85
|
-
while (current) {
|
|
86
|
-
aParents.unshift(current);
|
|
87
|
-
current = current.parent;
|
|
88
|
-
}
|
|
89
|
-
current = node.hasChildren(nodeB) ? nodeB : nodeB.parent;
|
|
90
|
-
while (current) {
|
|
91
|
-
bParents.unshift(current);
|
|
92
|
-
current = current.parent;
|
|
93
|
-
}
|
|
94
|
-
const maxIdx = Math.min(aParents.length, bParents.length);
|
|
95
|
-
let idx = 0;
|
|
96
|
-
while (idx < maxIdx && aParents[idx] === bParents[idx]) {
|
|
97
|
-
idx++;
|
|
98
|
-
}
|
|
99
|
-
if (idx === 0) {
|
|
100
|
-
return exports.DocumentPosition.DISCONNECTED;
|
|
101
|
-
}
|
|
102
|
-
const sharedParent = aParents[idx - 1];
|
|
103
|
-
const siblings = sharedParent.children;
|
|
104
|
-
const aSibling = aParents[idx];
|
|
105
|
-
const bSibling = bParents[idx];
|
|
106
|
-
if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {
|
|
107
|
-
if (sharedParent === nodeB) {
|
|
108
|
-
return exports.DocumentPosition.FOLLOWING | exports.DocumentPosition.CONTAINED_BY;
|
|
109
|
-
}
|
|
110
|
-
return exports.DocumentPosition.FOLLOWING;
|
|
111
|
-
}
|
|
112
|
-
if (sharedParent === nodeA) {
|
|
113
|
-
return exports.DocumentPosition.PRECEDING | exports.DocumentPosition.CONTAINS;
|
|
114
|
-
}
|
|
115
|
-
return exports.DocumentPosition.PRECEDING;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Sort an array of nodes based on their relative position in the document,
|
|
119
|
-
* removing any duplicate nodes. If the array contains nodes that do not belong
|
|
120
|
-
* to the same document, sort order is unspecified.
|
|
121
|
-
*
|
|
122
|
-
* @category Helpers
|
|
123
|
-
* @param nodes Array of DOM nodes.
|
|
124
|
-
* @returns Collection of unique nodes, sorted in document order.
|
|
125
|
-
*/
|
|
126
|
-
function uniqueSort(nodes) {
|
|
127
|
-
nodes = nodes.filter((node, i, arr) => !arr.includes(node, i + 1));
|
|
128
|
-
nodes.sort((a, b) => {
|
|
129
|
-
const relative = compareDocumentPosition(a, b);
|
|
130
|
-
if (relative & exports.DocumentPosition.PRECEDING) {
|
|
131
|
-
return -1;
|
|
132
|
-
} else if (relative & exports.DocumentPosition.FOLLOWING) {
|
|
133
|
-
return 1;
|
|
134
|
-
}
|
|
135
|
-
return 0;
|
|
136
|
-
});
|
|
137
|
-
return nodes;
|
|
138
|
-
}
|
|
139
|
-
exports.compareDocumentPosition = compareDocumentPosition;
|
|
140
|
-
exports.removeSubsets = removeSubsets;
|
|
141
|
-
exports.uniqueSort = uniqueSort;
|
|
142
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../../../../../../node_modules/domutils/lib/esm/helpers.js"],"sourcesContent":null,"names":["DocumentPosition","hasChildren"],"mappings":";;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,aAAa,CAAC,KAAK,EAAE;AACrC,IAAI,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;AAC3B;AACA;AACA;AACA;AACA,IAAI,OAAO,EAAE,GAAG,IAAI,CAAC,EAAE;AACvB,QAAQ,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAChC;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAI,GAAG,GAAG,CAAC,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE;AAC9D,YAAY,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACjC,YAAY,SAAS;AACrB,SAAS;AACT,QAAQ,KAAK,IAAI,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC,MAAM,EAAE;AAC/E,YAAY,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;AAC1C,gBAAgB,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,CAA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AS,CAAC;AAC1C,KAAK;AACL,IAAI,IAAI,YAAY,KAAK,KAAK,EAAE;AAChC,QAAQ,OAAOA,wBAAgB,CAAC,SAAS,GAAGA,wBAAgB,CAAC,QAAQ,CAAC;AACtE,KAAK;AACL,IAAI,OAAOA,wBAAgB,CAAC,SAAS,CAAC;AACtC,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,KAAK,EAAE;AAClC,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACvE,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK;AACzB,QAAQ,MAAM,QAAQ,GAAG,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvD,QAAQ,IAAI,QAAQ,GAAGA,wBAAgB,CAAC,SAAS,EAAE;AACnD,YAAY,OAAO,CAAC,CAAC,CAAC;AACtB,SAAS;AACT,aAAa,IAAI,QAAQ,GAAGA,wBAAgB,CAAC,SAAS,EAAE;AACxD,YAAY,OAAO,CAAC,CAAC;AACrB,SAAS;AACT,QAAQ,OAAO,CAAC,CAAC;AACjB,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,KAAK,CAAC;AACjB;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const stringify = require('./stringify.js');
|
|
4
|
-
const traversal = require('./traversal.js');
|
|
5
|
-
const manipulation = require('./manipulation.js');
|
|
6
|
-
const querying = require('./querying.js');
|
|
7
|
-
const legacy = require('./legacy.js');
|
|
8
|
-
const helpers = require('./helpers.js');
|
|
9
|
-
const feeds = require('./feeds.js');
|
|
10
|
-
require('../../../domhandler/lib/esm/index.js');
|
|
11
|
-
const node = require('../../../domhandler/lib/esm/node.js');
|
|
12
|
-
exports.getInnerHTML = stringify.getInnerHTML;
|
|
13
|
-
exports.getOuterHTML = stringify.getOuterHTML;
|
|
14
|
-
exports.getText = stringify.getText;
|
|
15
|
-
exports.innerText = stringify.innerText;
|
|
16
|
-
exports.textContent = stringify.textContent;
|
|
17
|
-
exports.getAttributeValue = traversal.getAttributeValue;
|
|
18
|
-
exports.getChildren = traversal.getChildren;
|
|
19
|
-
exports.getName = traversal.getName;
|
|
20
|
-
exports.getParent = traversal.getParent;
|
|
21
|
-
exports.getSiblings = traversal.getSiblings;
|
|
22
|
-
exports.hasAttrib = traversal.hasAttrib;
|
|
23
|
-
exports.nextElementSibling = traversal.nextElementSibling;
|
|
24
|
-
exports.prevElementSibling = traversal.prevElementSibling;
|
|
25
|
-
exports.append = manipulation.append;
|
|
26
|
-
exports.appendChild = manipulation.appendChild;
|
|
27
|
-
exports.prepend = manipulation.prepend;
|
|
28
|
-
exports.prependChild = manipulation.prependChild;
|
|
29
|
-
exports.removeElement = manipulation.removeElement;
|
|
30
|
-
exports.replaceElement = manipulation.replaceElement;
|
|
31
|
-
exports.existsOne = querying.existsOne;
|
|
32
|
-
exports.filter = querying.filter;
|
|
33
|
-
exports.find = querying.find;
|
|
34
|
-
exports.findAll = querying.findAll;
|
|
35
|
-
exports.findOne = querying.findOne;
|
|
36
|
-
exports.findOneChild = querying.findOneChild;
|
|
37
|
-
exports.getElementById = legacy.getElementById;
|
|
38
|
-
exports.getElements = legacy.getElements;
|
|
39
|
-
exports.getElementsByTagName = legacy.getElementsByTagName;
|
|
40
|
-
exports.getElementsByTagType = legacy.getElementsByTagType;
|
|
41
|
-
exports.testElement = legacy.testElement;
|
|
42
|
-
Object.defineProperty(exports, "DocumentPosition", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: () => helpers.DocumentPosition
|
|
45
|
-
});
|
|
46
|
-
exports.compareDocumentPosition = helpers.compareDocumentPosition;
|
|
47
|
-
exports.removeSubsets = helpers.removeSubsets;
|
|
48
|
-
exports.uniqueSort = helpers.uniqueSort;
|
|
49
|
-
exports.getFeed = feeds.getFeed;
|
|
50
|
-
exports.hasChildren = node.hasChildren;
|
|
51
|
-
exports.isCDATA = node.isCDATA;
|
|
52
|
-
exports.isComment = node.isComment;
|
|
53
|
-
exports.isDocument = node.isDocument;
|
|
54
|
-
exports.isTag = node.isTag;
|
|
55
|
-
exports.isText = node.isText;
|
|
56
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":null,"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('../../../domhandler/lib/esm/index.js');
|
|
4
|
-
const querying = require('./querying.js');
|
|
5
|
-
const node = require('../../../domhandler/lib/esm/node.js');
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* A map of functions to check nodes against.
|
|
9
|
-
*/
|
|
10
|
-
const Checks = {
|
|
11
|
-
tag_name(name) {
|
|
12
|
-
if (typeof name === "function") {
|
|
13
|
-
return elem => node.isTag(elem) && name(elem.name);
|
|
14
|
-
} else if (name === "*") {
|
|
15
|
-
return node.isTag;
|
|
16
|
-
}
|
|
17
|
-
return elem => node.isTag(elem) && elem.name === name;
|
|
18
|
-
},
|
|
19
|
-
tag_type(type) {
|
|
20
|
-
if (typeof type === "function") {
|
|
21
|
-
return elem => type(elem.type);
|
|
22
|
-
}
|
|
23
|
-
return elem => elem.type === type;
|
|
24
|
-
},
|
|
25
|
-
tag_contains(data) {
|
|
26
|
-
if (typeof data === "function") {
|
|
27
|
-
return elem => node.isText(elem) && data(elem.data);
|
|
28
|
-
}
|
|
29
|
-
return elem => node.isText(elem) && elem.data === data;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Returns a function to check whether a node has an attribute with a particular
|
|
34
|
-
* value.
|
|
35
|
-
*
|
|
36
|
-
* @param attrib Attribute to check.
|
|
37
|
-
* @param value Attribute value to look for.
|
|
38
|
-
* @returns A function to check whether the a node has an attribute with a
|
|
39
|
-
* particular value.
|
|
40
|
-
*/
|
|
41
|
-
function getAttribCheck(attrib, value) {
|
|
42
|
-
if (typeof value === "function") {
|
|
43
|
-
return elem => node.isTag(elem) && value(elem.attribs[attrib]);
|
|
44
|
-
}
|
|
45
|
-
return elem => node.isTag(elem) && elem.attribs[attrib] === value;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Returns a function that returns `true` if either of the input functions
|
|
49
|
-
* returns `true` for a node.
|
|
50
|
-
*
|
|
51
|
-
* @param a First function to combine.
|
|
52
|
-
* @param b Second function to combine.
|
|
53
|
-
* @returns A function taking a node and returning `true` if either of the input
|
|
54
|
-
* functions returns `true` for the node.
|
|
55
|
-
*/
|
|
56
|
-
function combineFuncs(a, b) {
|
|
57
|
-
return elem => a(elem) || b(elem);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Returns a function that executes all checks in `options` and returns `true`
|
|
61
|
-
* if any of them match a node.
|
|
62
|
-
*
|
|
63
|
-
* @param options An object describing nodes to look for.
|
|
64
|
-
* @returns A function that executes all checks in `options` and returns `true`
|
|
65
|
-
* if any of them match a node.
|
|
66
|
-
*/
|
|
67
|
-
function compileTest(options) {
|
|
68
|
-
const funcs = Object.keys(options).map(key => {
|
|
69
|
-
const value = options[key];
|
|
70
|
-
return Object.prototype.hasOwnProperty.call(Checks, key) ? Checks[key](value) : getAttribCheck(key, value);
|
|
71
|
-
});
|
|
72
|
-
return funcs.length === 0 ? null : funcs.reduce(combineFuncs);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Checks whether a node matches the description in `options`.
|
|
76
|
-
*
|
|
77
|
-
* @category Legacy Query Functions
|
|
78
|
-
* @param options An object describing nodes to look for.
|
|
79
|
-
* @param node The element to test.
|
|
80
|
-
* @returns Whether the element matches the description in `options`.
|
|
81
|
-
*/
|
|
82
|
-
function testElement(options, node) {
|
|
83
|
-
const test = compileTest(options);
|
|
84
|
-
return test ? test(node) : true;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Returns all nodes that match `options`.
|
|
88
|
-
*
|
|
89
|
-
* @category Legacy Query Functions
|
|
90
|
-
* @param options An object describing nodes to look for.
|
|
91
|
-
* @param nodes Nodes to search through.
|
|
92
|
-
* @param recurse Also consider child nodes.
|
|
93
|
-
* @param limit Maximum number of nodes to return.
|
|
94
|
-
* @returns All nodes that match `options`.
|
|
95
|
-
*/
|
|
96
|
-
function getElements(options, nodes, recurse, limit = Infinity) {
|
|
97
|
-
const test = compileTest(options);
|
|
98
|
-
return test ? querying.filter(test, nodes, recurse, limit) : [];
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Returns the node with the supplied ID.
|
|
102
|
-
*
|
|
103
|
-
* @category Legacy Query Functions
|
|
104
|
-
* @param id The unique ID attribute value to look for.
|
|
105
|
-
* @param nodes Nodes to search through.
|
|
106
|
-
* @param recurse Also consider child nodes.
|
|
107
|
-
* @returns The node with the supplied ID.
|
|
108
|
-
*/
|
|
109
|
-
function getElementById(id, nodes, recurse = true) {
|
|
110
|
-
if (!Array.isArray(nodes)) nodes = [nodes];
|
|
111
|
-
return querying.findOne(getAttribCheck("id", id), nodes, recurse);
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Returns all nodes with the supplied `tagName`.
|
|
115
|
-
*
|
|
116
|
-
* @category Legacy Query Functions
|
|
117
|
-
* @param tagName Tag name to search for.
|
|
118
|
-
* @param nodes Nodes to search through.
|
|
119
|
-
* @param recurse Also consider child nodes.
|
|
120
|
-
* @param limit Maximum number of nodes to return.
|
|
121
|
-
* @returns All nodes with the supplied `tagName`.
|
|
122
|
-
*/
|
|
123
|
-
function getElementsByTagName(tagName, nodes, recurse = true, limit = Infinity) {
|
|
124
|
-
return querying.filter(Checks["tag_name"](tagName), nodes, recurse, limit);
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Returns all nodes with the supplied `type`.
|
|
128
|
-
*
|
|
129
|
-
* @category Legacy Query Functions
|
|
130
|
-
* @param type Element type to look for.
|
|
131
|
-
* @param nodes Nodes to search through.
|
|
132
|
-
* @param recurse Also consider child nodes.
|
|
133
|
-
* @param limit Maximum number of nodes to return.
|
|
134
|
-
* @returns All nodes with the supplied `type`.
|
|
135
|
-
*/
|
|
136
|
-
function getElementsByTagType(type, nodes, recurse = true, limit = Infinity) {
|
|
137
|
-
return querying.filter(Checks["tag_type"](type), nodes, recurse, limit);
|
|
138
|
-
}
|
|
139
|
-
exports.getElementById = getElementById;
|
|
140
|
-
exports.getElements = getElements;
|
|
141
|
-
exports.getElementsByTagName = getElementsByTagName;
|
|
142
|
-
exports.getElementsByTagType = getElementsByTagType;
|
|
143
|
-
exports.testElement = testElement;
|
|
144
|
-
//# sourceMappingURL=legacy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"legacy.js","sources":["../../../../../../../node_modules/domutils/lib/esm/legacy.js"],"sourcesContent":null,"names":["isTag","isText","filter","findOne"],"mappings":";;;;;;AAEA;AACA;AACA;AACA,MAAM,MAAM,GAAG;AACf,IAAI,QAAQ,CAAC,IAAI,EAAE;AACnB,QAAQ,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE;AACxC,YAAY,OAAO,CAAC,IAAI,KAAKA,UAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5D,SAAS;AACT,aAAa,IAAI,IAAI,KAAK,GAAG,EAAE;AAC/B,YAAY,OAAOA,UAAK,CAAC;AACzB,SAAS;AACT,QAAQ,OAAO,CAAC,IAAI,KAAKA,UAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,KAAK,IA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G,IAAI,EAAE;AAC1D,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AAC7B,QAAQ,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;AACxB,IAAI,OAAOC,gBAAO,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC7D,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,oBAAoB,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE;AACvF,IAAI,OAAOD,eAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACtE,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE;AACpF,IAAI,OAAOA,eAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACnE;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Remove an element from the dom
|
|
5
|
-
*
|
|
6
|
-
* @category Manipulation
|
|
7
|
-
* @param elem The element to be removed
|
|
8
|
-
*/
|
|
9
|
-
function removeElement(elem) {
|
|
10
|
-
if (elem.prev) elem.prev.next = elem.next;
|
|
11
|
-
if (elem.next) elem.next.prev = elem.prev;
|
|
12
|
-
if (elem.parent) {
|
|
13
|
-
const childs = elem.parent.children;
|
|
14
|
-
const childsIndex = childs.lastIndexOf(elem);
|
|
15
|
-
if (childsIndex >= 0) {
|
|
16
|
-
childs.splice(childsIndex, 1);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
elem.next = null;
|
|
20
|
-
elem.prev = null;
|
|
21
|
-
elem.parent = null;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Replace an element in the dom
|
|
25
|
-
*
|
|
26
|
-
* @category Manipulation
|
|
27
|
-
* @param elem The element to be replaced
|
|
28
|
-
* @param replacement The element to be added
|
|
29
|
-
*/
|
|
30
|
-
function replaceElement(elem, replacement) {
|
|
31
|
-
const prev = replacement.prev = elem.prev;
|
|
32
|
-
if (prev) {
|
|
33
|
-
prev.next = replacement;
|
|
34
|
-
}
|
|
35
|
-
const next = replacement.next = elem.next;
|
|
36
|
-
if (next) {
|
|
37
|
-
next.prev = replacement;
|
|
38
|
-
}
|
|
39
|
-
const parent = replacement.parent = elem.parent;
|
|
40
|
-
if (parent) {
|
|
41
|
-
const childs = parent.children;
|
|
42
|
-
childs[childs.lastIndexOf(elem)] = replacement;
|
|
43
|
-
elem.parent = null;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Append a child to an element.
|
|
48
|
-
*
|
|
49
|
-
* @category Manipulation
|
|
50
|
-
* @param parent The element to append to.
|
|
51
|
-
* @param child The element to be added as a child.
|
|
52
|
-
*/
|
|
53
|
-
function appendChild(parent, child) {
|
|
54
|
-
removeElement(child);
|
|
55
|
-
child.next = null;
|
|
56
|
-
child.parent = parent;
|
|
57
|
-
if (parent.children.push(child) > 1) {
|
|
58
|
-
const sibling = parent.children[parent.children.length - 2];
|
|
59
|
-
sibling.next = child;
|
|
60
|
-
child.prev = sibling;
|
|
61
|
-
} else {
|
|
62
|
-
child.prev = null;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Append an element after another.
|
|
67
|
-
*
|
|
68
|
-
* @category Manipulation
|
|
69
|
-
* @param elem The element to append after.
|
|
70
|
-
* @param next The element be added.
|
|
71
|
-
*/
|
|
72
|
-
function append(elem, next) {
|
|
73
|
-
removeElement(next);
|
|
74
|
-
const parent = elem.parent;
|
|
75
|
-
const currNext = elem.next;
|
|
76
|
-
next.next = currNext;
|
|
77
|
-
next.prev = elem;
|
|
78
|
-
elem.next = next;
|
|
79
|
-
next.parent = parent;
|
|
80
|
-
if (currNext) {
|
|
81
|
-
currNext.prev = next;
|
|
82
|
-
if (parent) {
|
|
83
|
-
const childs = parent.children;
|
|
84
|
-
childs.splice(childs.lastIndexOf(currNext), 0, next);
|
|
85
|
-
}
|
|
86
|
-
} else if (parent) {
|
|
87
|
-
parent.children.push(next);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Prepend a child to an element.
|
|
92
|
-
*
|
|
93
|
-
* @category Manipulation
|
|
94
|
-
* @param parent The element to prepend before.
|
|
95
|
-
* @param child The element to be added as a child.
|
|
96
|
-
*/
|
|
97
|
-
function prependChild(parent, child) {
|
|
98
|
-
removeElement(child);
|
|
99
|
-
child.parent = parent;
|
|
100
|
-
child.prev = null;
|
|
101
|
-
if (parent.children.unshift(child) !== 1) {
|
|
102
|
-
const sibling = parent.children[1];
|
|
103
|
-
sibling.prev = child;
|
|
104
|
-
child.next = sibling;
|
|
105
|
-
} else {
|
|
106
|
-
child.next = null;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Prepend an element before another.
|
|
111
|
-
*
|
|
112
|
-
* @category Manipulation
|
|
113
|
-
* @param elem The element to prepend before.
|
|
114
|
-
* @param prev The element be added.
|
|
115
|
-
*/
|
|
116
|
-
function prepend(elem, prev) {
|
|
117
|
-
removeElement(prev);
|
|
118
|
-
const parent = elem.parent;
|
|
119
|
-
if (parent) {
|
|
120
|
-
const childs = parent.children;
|
|
121
|
-
childs.splice(childs.indexOf(elem), 0, prev);
|
|
122
|
-
}
|
|
123
|
-
if (elem.prev) {
|
|
124
|
-
elem.prev.next = prev;
|
|
125
|
-
}
|
|
126
|
-
prev.parent = parent;
|
|
127
|
-
prev.prev = elem.prev;
|
|
128
|
-
prev.next = elem;
|
|
129
|
-
elem.prev = prev;
|
|
130
|
-
}
|
|
131
|
-
exports.append = append;
|
|
132
|
-
exports.appendChild = appendChild;
|
|
133
|
-
exports.prepend = prepend;
|
|
134
|
-
exports.prependChild = prependChild;
|
|
135
|
-
exports.removeElement = removeElement;
|
|
136
|
-
exports.replaceElement = replaceElement;
|
|
137
|
-
//# sourceMappingURL=manipulation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manipulation.js","sources":["../../../../../../../node_modules/domutils/lib/esm/manipulation.js"],"sourcesContent":null,"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,aAAa,CAAC,IAAI,EAAE;AACpC,IAAI,IAAI,IAAI,CAAC,IAAI;AACjB,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;AACnC,IAAI,IAAI,IAAI,CAAC,IAAI;AACjB,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;AACnC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;AACrB,QAAQ,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC5C,QAAQ,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACrD,QAAQ,IAAI,WAAW,IAAI,CAAC,EAAE;AAC9B,YAAY,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AAC1C,SAAS;AACT,KAAK;AACL,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;AACvB,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SA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,CAAC,KAAK,CAAC,EAAE;AAC9C,QAAQ,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC3C,QAAQ,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;AAC7B,QAAQ,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC;AAC7B,KAAK;AACL,SAAS;AACT,QAAQ,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;AAC1B,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE;AACpC,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;AACxB,IAAI,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;AAC5B,IAAI,IAAI,MAAM,EAAE;AAChB,QAAQ,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;AACvC,QAAQ,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;AACrD,KAAK;AACL,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;AACnB,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AAC9B,KAAK;AACL,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;AAC1B,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('../../../domhandler/lib/esm/index.js');
|
|
4
|
-
const node = require('../../../domhandler/lib/esm/node.js');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Search a node and its children for nodes passing a test function. If `node` is not an array, it will be wrapped in one.
|
|
8
|
-
*
|
|
9
|
-
* @category Querying
|
|
10
|
-
* @param test Function to test nodes on.
|
|
11
|
-
* @param node Node to search. Will be included in the result set if it matches.
|
|
12
|
-
* @param recurse Also consider child nodes.
|
|
13
|
-
* @param limit Maximum number of nodes to return.
|
|
14
|
-
* @returns All nodes passing `test`.
|
|
15
|
-
*/
|
|
16
|
-
function filter(test, node, recurse = true, limit = Infinity) {
|
|
17
|
-
return find(test, Array.isArray(node) ? node : [node], recurse, limit);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Search an array of nodes and their children for nodes passing a test function.
|
|
21
|
-
*
|
|
22
|
-
* @category Querying
|
|
23
|
-
* @param test Function to test nodes on.
|
|
24
|
-
* @param nodes Array of nodes to search.
|
|
25
|
-
* @param recurse Also consider child nodes.
|
|
26
|
-
* @param limit Maximum number of nodes to return.
|
|
27
|
-
* @returns All nodes passing `test`.
|
|
28
|
-
*/
|
|
29
|
-
function find(test, nodes, recurse, limit) {
|
|
30
|
-
const result = [];
|
|
31
|
-
/** Stack of the arrays we are looking at. */
|
|
32
|
-
const nodeStack = [nodes];
|
|
33
|
-
/** Stack of the indices within the arrays. */
|
|
34
|
-
const indexStack = [0];
|
|
35
|
-
for (;;) {
|
|
36
|
-
// First, check if the current array has any more elements to look at.
|
|
37
|
-
if (indexStack[0] >= nodeStack[0].length) {
|
|
38
|
-
// If we have no more arrays to look at, we are done.
|
|
39
|
-
if (indexStack.length === 1) {
|
|
40
|
-
return result;
|
|
41
|
-
}
|
|
42
|
-
// Otherwise, remove the current array from the stack.
|
|
43
|
-
nodeStack.shift();
|
|
44
|
-
indexStack.shift();
|
|
45
|
-
// Loop back to the start to continue with the next array.
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
const elem = nodeStack[0][indexStack[0]++];
|
|
49
|
-
if (test(elem)) {
|
|
50
|
-
result.push(elem);
|
|
51
|
-
if (--limit <= 0) return result;
|
|
52
|
-
}
|
|
53
|
-
if (recurse && node.hasChildren(elem) && elem.children.length > 0) {
|
|
54
|
-
/*
|
|
55
|
-
* Add the children to the stack. We are depth-first, so this is
|
|
56
|
-
* the next array we look at.
|
|
57
|
-
*/
|
|
58
|
-
indexStack.unshift(0);
|
|
59
|
-
nodeStack.unshift(elem.children);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Finds the first element inside of an array that matches a test function. This is an alias for `Array.prototype.find`.
|
|
65
|
-
*
|
|
66
|
-
* @category Querying
|
|
67
|
-
* @param test Function to test nodes on.
|
|
68
|
-
* @param nodes Array of nodes to search.
|
|
69
|
-
* @returns The first node in the array that passes `test`.
|
|
70
|
-
* @deprecated Use `Array.prototype.find` directly.
|
|
71
|
-
*/
|
|
72
|
-
function findOneChild(test, nodes) {
|
|
73
|
-
return nodes.find(test);
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Finds one element in a tree that passes a test.
|
|
77
|
-
*
|
|
78
|
-
* @category Querying
|
|
79
|
-
* @param test Function to test nodes on.
|
|
80
|
-
* @param nodes Node or array of nodes to search.
|
|
81
|
-
* @param recurse Also consider child nodes.
|
|
82
|
-
* @returns The first node that passes `test`.
|
|
83
|
-
*/
|
|
84
|
-
function findOne(test, nodes, recurse = true) {
|
|
85
|
-
let elem = null;
|
|
86
|
-
for (let i = 0; i < nodes.length && !elem; i++) {
|
|
87
|
-
const node$1 = nodes[i];
|
|
88
|
-
if (!node.isTag(node$1)) {
|
|
89
|
-
continue;
|
|
90
|
-
} else if (test(node$1)) {
|
|
91
|
-
elem = node$1;
|
|
92
|
-
} else if (recurse && node$1.children.length > 0) {
|
|
93
|
-
elem = findOne(test, node$1.children, true);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return elem;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Checks if a tree of nodes contains at least one node passing a test.
|
|
100
|
-
*
|
|
101
|
-
* @category Querying
|
|
102
|
-
* @param test Function to test nodes on.
|
|
103
|
-
* @param nodes Array of nodes to search.
|
|
104
|
-
* @returns Whether a tree of nodes contains at least one node passing the test.
|
|
105
|
-
*/
|
|
106
|
-
function existsOne(test, nodes) {
|
|
107
|
-
return nodes.some(checked => node.isTag(checked) && (test(checked) || existsOne(test, checked.children)));
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Search an array of nodes and their children for elements passing a test function.
|
|
111
|
-
*
|
|
112
|
-
* Same as `find`, but limited to elements and with less options, leading to reduced complexity.
|
|
113
|
-
*
|
|
114
|
-
* @category Querying
|
|
115
|
-
* @param test Function to test nodes on.
|
|
116
|
-
* @param nodes Array of nodes to search.
|
|
117
|
-
* @returns All nodes passing `test`.
|
|
118
|
-
*/
|
|
119
|
-
function findAll(test, nodes) {
|
|
120
|
-
const result = [];
|
|
121
|
-
const nodeStack = [nodes];
|
|
122
|
-
const indexStack = [0];
|
|
123
|
-
for (;;) {
|
|
124
|
-
if (indexStack[0] >= nodeStack[0].length) {
|
|
125
|
-
if (nodeStack.length === 1) {
|
|
126
|
-
return result;
|
|
127
|
-
}
|
|
128
|
-
// Otherwise, remove the current array from the stack.
|
|
129
|
-
nodeStack.shift();
|
|
130
|
-
indexStack.shift();
|
|
131
|
-
// Loop back to the start to continue with the next array.
|
|
132
|
-
continue;
|
|
133
|
-
}
|
|
134
|
-
const elem = nodeStack[0][indexStack[0]++];
|
|
135
|
-
if (!node.isTag(elem)) continue;
|
|
136
|
-
if (test(elem)) result.push(elem);
|
|
137
|
-
if (elem.children.length > 0) {
|
|
138
|
-
indexStack.unshift(0);
|
|
139
|
-
nodeStack.unshift(elem.children);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
exports.existsOne = existsOne;
|
|
144
|
-
exports.filter = filter;
|
|
145
|
-
exports.find = find;
|
|
146
|
-
exports.findAll = findAll;
|
|
147
|
-
exports.findOne = findOne;
|
|
148
|
-
exports.findOneChild = findOneChild;
|
|
149
|
-
//# sourceMappingURL=querying.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"querying.js","sources":["../../../../../../../node_modules/domutils/lib/esm/querying.js"],"sourcesContent":null,"names":["hasChildren","node","isTag"],"mappings":";;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE;AACrE,IAAI,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC3E,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;AAClD,IAAI,MAAM,MAAM,GAAG,EAAE,CAAC;AACtB;AACA,IAAI,MAAM,SAAS,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B;AACA,IAAI,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC;AAC3B,IAAI,SAAS;AACb;AACA,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE;AAClD;AACA,YAAY,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;AACzC,gBAAgB,OAAO,MAAM,CAAC;AAC9B,aAAa;AACb;AACA,YAAY,SAAS,CAAC,KAAK,EAAE,CAAC;AAC9B,YAAY,UAAU,CAAC,KAAK,EAAE,CAAC;AAC/B;AACA,YAAY,SAAS;AACrB,SAAS;AACT,QAAQ,MAAM,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACnD,QAAQ,IA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