@ynput/ayon-frontend-shared 0.3.1 → 0.3.2
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/_virtual/index.cjs10.js +1 -1
- package/dist/_virtual/index.cjs11.js +1 -1
- package/dist/_virtual/index.cjs12.js +1 -1
- package/dist/_virtual/index.es10.js +3 -3
- package/dist/_virtual/index.es11.js +5 -5
- package/dist/_virtual/index.es12.js +5 -5
- package/dist/node_modules/rehype/node_modules/unified/lib/index.cjs.js +1 -1
- package/dist/node_modules/rehype/node_modules/unified/lib/index.es.js +2 -2
- package/dist/node_modules/rehype/node_modules/vfile/lib/index.cjs.js +1 -1
- package/dist/node_modules/rehype/node_modules/vfile/lib/index.es.js +1 -1
- package/dist/node_modules/rehype-parse/lib/index.cjs.js +1 -1
- package/dist/node_modules/rehype-parse/lib/index.es.js +1 -1
- package/dist/node_modules/web-namespaces/index.cjs.js +1 -1
- package/dist/node_modules/web-namespaces/index.cjs.js.map +1 -1
- package/dist/node_modules/web-namespaces/index.es.js +3 -8
- package/dist/node_modules/web-namespaces/index.es.js.map +1 -1
- package/dist/shared/src/api/generated/graphql.cjs.js +12 -8
- package/dist/shared/src/api/generated/graphql.cjs.js.map +1 -1
- package/dist/shared/src/api/generated/graphql.es.js +11 -7
- package/dist/shared/src/api/generated/graphql.es.js.map +1 -1
- package/dist/shared/src/api/generated/graphqlLinks.cjs.js.map +1 -1
- package/dist/shared/src/api/generated/graphqlLinks.es.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.cjs.js +2 -2
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.cjs.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.es.js +66 -61
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/hooks/useTransformActivities.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/hooks/useTransformActivities.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/hooks/useTransformActivities.es.js +6 -6
- package/dist/shared/src/containers/Feed/hooks/useTransformActivities.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidget.cjs.js +2 -2
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextWidget.es.js +10 -10
- package/dist/shared/src/hooks/useLoadModules.cjs.js +1 -1
- package/dist/shared/src/hooks/useLoadModules.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useLoadModules.es.js +86 -80
- package/dist/shared/src/hooks/useLoadModules.es.js.map +1 -1
- package/dist/types/api/generated/graphql.d.ts +2 -1
- package/dist/types/api/generated/graphqlLinks.d.ts +1 -0
- package/package.json +2 -1
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.cjs.js +0 -2
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.cjs.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.es.js +0 -63
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.es.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/index.cjs.js +0 -2
- package/dist/node_modules/@ungap/structured-clone/esm/index.cjs.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/index.es.js +0 -12
- package/dist/node_modules/@ungap/structured-clone/esm/index.es.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.cjs.js +0 -2
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.cjs.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.es.js +0 -107
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.es.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/types.cjs.js +0 -2
- package/dist/node_modules/@ungap/structured-clone/esm/types.cjs.js.map +0 -1
- package/dist/node_modules/@ungap/structured-clone/esm/types.es.js +0 -14
- package/dist/node_modules/@ungap/structured-clone/esm/types.es.js.map +0 -1
- package/dist/node_modules/devlop/lib/default.cjs.js +0 -2
- package/dist/node_modules/devlop/lib/default.cjs.js.map +0 -1
- package/dist/node_modules/devlop/lib/default.es.js +0 -6
- package/dist/node_modules/devlop/lib/default.es.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/decode-codepoint.cjs.js +0 -2
- package/dist/node_modules/entities/dist/esm/decode-codepoint.cjs.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/decode-codepoint.es.js +0 -39
- package/dist/node_modules/entities/dist/esm/decode-codepoint.es.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/decode.cjs.js +0 -2
- package/dist/node_modules/entities/dist/esm/decode.cjs.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/decode.es.js +0 -246
- package/dist/node_modules/entities/dist/esm/decode.es.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.cjs.js +0 -2
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.cjs.js.map +0 -1
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.es.js +0 -8
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/lib/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/lib/index.es.js +0 -218
- package/dist/node_modules/hast-util-raw/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.es.js +0 -146
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.es.js +0 -21
- package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.es.js +0 -113
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/index.es.js +0 -9
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.es.js +0 -45
- package/dist/node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/html-void-elements/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/html-void-elements/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/html-void-elements/index.es.js +0 -26
- package/dist/node_modules/hast-util-raw/node_modules/html-void-elements/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.es.js +0 -99
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.es.js +0 -8
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.es.js +0 -211
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.es.js +0 -251
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.es.js +0 -15
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.es.js +0 -74
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.es.js +0 -85
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.es.js +0 -2272
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.es.js +0 -241
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.es.js +0 -3
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.es.js +0 -1941
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.es.js +0 -89
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.es.js +0 -163
- package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/index.es.js +0 -13
- package/dist/node_modules/hast-util-raw/node_modules/property-information/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/aria.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/aria.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/aria.es.js +0 -62
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/aria.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/find.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/find.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/find.es.js +0 -34
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/find.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/html.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/html.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/html.es.js +0 -369
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/html.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/normalize.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/normalize.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/normalize.es.js +0 -7
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/normalize.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/svg.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/svg.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/svg.es.js +0 -567
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/svg.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-insensitive-transform.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-insensitive-transform.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-insensitive-transform.es.js +0 -8
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-insensitive-transform.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-sensitive-transform.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-sensitive-transform.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-sensitive-transform.es.js +0 -7
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/case-sensitive-transform.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/create.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/create.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/create.es.js +0 -20
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/create.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/defined-info.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/defined-info.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/defined-info.es.js +0 -37
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/defined-info.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/info.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/info.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/info.es.js +0 -29
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/info.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/merge.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/merge.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/merge.es.js +0 -11
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/merge.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/schema.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/schema.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/schema.es.js +0 -22
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/schema.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/types.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/types.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/types.es.js +0 -15
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/util/types.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xlink.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xlink.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xlink.es.js +0 -20
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xlink.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xml.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xml.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xml.es.js +0 -12
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xml.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xmlns.cjs.js +0 -2
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xmlns.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xmlns.es.js +0 -12
- package/dist/node_modules/hast-util-raw/node_modules/property-information/lib/xmlns.es.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/vfile-location/lib/index.cjs.js +0 -3
- package/dist/node_modules/hast-util-raw/node_modules/vfile-location/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-raw/node_modules/vfile-location/lib/index.es.js +0 -43
- package/dist/node_modules/hast-util-raw/node_modules/vfile-location/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/lib/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/lib/index.es.js +0 -119
- package/dist/node_modules/hast-util-to-parse5/lib/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.es.js +0 -13
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.es.js +0 -62
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.es.js +0 -34
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.es.js +0 -369
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.es.js +0 -7
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.es.js +0 -567
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.es.js +0 -8
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.es.js +0 -7
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.es.js +0 -20
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.es.js +0 -37
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.es.js +0 -29
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.es.js +0 -11
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.es.js +0 -22
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.es.js +0 -15
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.es.js +0 -20
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.es.js +0 -12
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.es.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.cjs.js +0 -2
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.cjs.js.map +0 -1
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.es.js +0 -12
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.es.js.map +0 -1
- package/dist/node_modules/rehype-raw/lib/index.cjs.js +0 -2
- package/dist/node_modules/rehype-raw/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/rehype-raw/lib/index.es.js +0 -13
- package/dist/node_modules/rehype-raw/lib/index.es.js.map +0 -1
- package/dist/node_modules/unist-util-is/lib/index.cjs.js +0 -2
- package/dist/node_modules/unist-util-is/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/unist-util-is/lib/index.es.js +0 -92
- package/dist/node_modules/unist-util-is/lib/index.es.js.map +0 -1
- package/dist/node_modules/unist-util-position/lib/index.cjs.js +0 -2
- package/dist/node_modules/unist-util-position/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/unist-util-position/lib/index.es.js +0 -18
- package/dist/node_modules/unist-util-position/lib/index.es.js.map +0 -1
- package/dist/node_modules/unist-util-visit/lib/index.cjs.js +0 -2
- package/dist/node_modules/unist-util-visit/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/unist-util-visit/lib/index.es.js +0 -17
- package/dist/node_modules/unist-util-visit/lib/index.es.js.map +0 -1
- package/dist/node_modules/unist-util-visit-parents/lib/color.cjs.js +0 -2
- package/dist/node_modules/unist-util-visit-parents/lib/color.cjs.js.map +0 -1
- package/dist/node_modules/unist-util-visit-parents/lib/color.es.js +0 -7
- package/dist/node_modules/unist-util-visit-parents/lib/color.es.js.map +0 -1
- package/dist/node_modules/unist-util-visit-parents/lib/index.cjs.js +0 -2
- package/dist/node_modules/unist-util-visit-parents/lib/index.cjs.js.map +0 -1
- package/dist/node_modules/unist-util-visit-parents/lib/index.es.js +0 -57
- package/dist/node_modules/unist-util-visit-parents/lib/index.es.js.map +0 -1
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { ok as x } from "../../../../devlop/lib/default.es.js";
|
|
2
|
-
import { svg as h, html as T } from "../../property-information/index.es.js";
|
|
3
|
-
import { webNamespaces as b } from "../../../../web-namespaces/index.es.js";
|
|
4
|
-
import { s as L, h as w } from "../../hastscript/lib/index.es.js";
|
|
5
|
-
import { find as C } from "../../property-information/lib/find.es.js";
|
|
6
|
-
import { location as N } from "../../vfile-location/lib/index.es.js";
|
|
7
|
-
const v = {}.hasOwnProperty, k = Object.prototype;
|
|
8
|
-
function U(t, n) {
|
|
9
|
-
const e = n || {};
|
|
10
|
-
return m(
|
|
11
|
-
{
|
|
12
|
-
file: e.file || void 0,
|
|
13
|
-
location: !1,
|
|
14
|
-
schema: e.space === "svg" ? h : T,
|
|
15
|
-
verbose: e.verbose || !1
|
|
16
|
-
},
|
|
17
|
-
t
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
function m(t, n) {
|
|
21
|
-
let e;
|
|
22
|
-
switch (n.nodeName) {
|
|
23
|
-
case "#comment": {
|
|
24
|
-
const o = (
|
|
25
|
-
/** @type {DefaultTreeAdapterMap['commentNode']} */
|
|
26
|
-
n
|
|
27
|
-
);
|
|
28
|
-
return e = { type: "comment", value: o.data }, l(t, o, e), e;
|
|
29
|
-
}
|
|
30
|
-
case "#document":
|
|
31
|
-
case "#document-fragment": {
|
|
32
|
-
const o = (
|
|
33
|
-
/** @type {DefaultTreeAdapterMap['document'] | DefaultTreeAdapterMap['documentFragment']} */
|
|
34
|
-
n
|
|
35
|
-
), c = "mode" in o ? o.mode === "quirks" || o.mode === "limited-quirks" : !1;
|
|
36
|
-
if (e = {
|
|
37
|
-
type: "root",
|
|
38
|
-
children: y(t, n.childNodes),
|
|
39
|
-
data: { quirksMode: c }
|
|
40
|
-
}, t.file && t.location) {
|
|
41
|
-
const a = String(t.file), s = N(a), i = s.toPoint(0), r = s.toPoint(a.length);
|
|
42
|
-
e.position = { start: i, end: r };
|
|
43
|
-
}
|
|
44
|
-
return e;
|
|
45
|
-
}
|
|
46
|
-
case "#documentType": {
|
|
47
|
-
const o = (
|
|
48
|
-
/** @type {DefaultTreeAdapterMap['documentType']} */
|
|
49
|
-
n
|
|
50
|
-
);
|
|
51
|
-
return e = { type: "doctype" }, l(t, o, e), e;
|
|
52
|
-
}
|
|
53
|
-
case "#text": {
|
|
54
|
-
const o = (
|
|
55
|
-
/** @type {DefaultTreeAdapterMap['textNode']} */
|
|
56
|
-
n
|
|
57
|
-
);
|
|
58
|
-
return e = { type: "text", value: o.value }, l(t, o, e), e;
|
|
59
|
-
}
|
|
60
|
-
// Element.
|
|
61
|
-
default:
|
|
62
|
-
return e = O(
|
|
63
|
-
t,
|
|
64
|
-
/** @type {DefaultTreeAdapterMap['element']} */
|
|
65
|
-
n
|
|
66
|
-
), e;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function y(t, n) {
|
|
70
|
-
let e = -1;
|
|
71
|
-
const o = [];
|
|
72
|
-
for (; ++e < n.length; ) {
|
|
73
|
-
const c = (
|
|
74
|
-
/** @type {RootContent} */
|
|
75
|
-
m(t, n[e])
|
|
76
|
-
);
|
|
77
|
-
o.push(c);
|
|
78
|
-
}
|
|
79
|
-
return o;
|
|
80
|
-
}
|
|
81
|
-
function O(t, n) {
|
|
82
|
-
const e = t.schema;
|
|
83
|
-
t.schema = n.namespaceURI === b.svg ? h : T;
|
|
84
|
-
let o = -1;
|
|
85
|
-
const c = {};
|
|
86
|
-
for (; ++o < n.attrs.length; ) {
|
|
87
|
-
const i = n.attrs[o], r = (i.prefix ? i.prefix + ":" : "") + i.name;
|
|
88
|
-
v.call(k, r) || (c[r] = i.value);
|
|
89
|
-
}
|
|
90
|
-
const s = (t.schema.space === "svg" ? L : w)(n.tagName, c, y(t, n.childNodes));
|
|
91
|
-
if (l(t, n, s), s.tagName === "template") {
|
|
92
|
-
const i = (
|
|
93
|
-
/** @type {DefaultTreeAdapterMap['template']} */
|
|
94
|
-
n
|
|
95
|
-
), r = i.sourceCodeLocation, f = r && r.startTag && u(r.startTag), p = r && r.endTag && u(r.endTag), d = (
|
|
96
|
-
/** @type {Root} */
|
|
97
|
-
m(t, i.content)
|
|
98
|
-
);
|
|
99
|
-
f && p && t.file && (d.position = { start: f.end, end: p.start }), s.content = d;
|
|
100
|
-
}
|
|
101
|
-
return t.schema = e, s;
|
|
102
|
-
}
|
|
103
|
-
function l(t, n, e) {
|
|
104
|
-
if ("sourceCodeLocation" in n && n.sourceCodeLocation && t.file) {
|
|
105
|
-
const o = P(t, e, n.sourceCodeLocation);
|
|
106
|
-
o && (t.location = !0, e.position = o);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
function P(t, n, e) {
|
|
110
|
-
const o = u(e);
|
|
111
|
-
if (n.type === "element") {
|
|
112
|
-
const c = n.children[n.children.length - 1];
|
|
113
|
-
if (o && !e.endTag && c && c.position && c.position.end && (o.end = Object.assign({}, c.position.end)), t.verbose) {
|
|
114
|
-
const a = {};
|
|
115
|
-
let s;
|
|
116
|
-
if (e.attrs)
|
|
117
|
-
for (s in e.attrs)
|
|
118
|
-
v.call(e.attrs, s) && (a[C(t.schema, s).property] = u(
|
|
119
|
-
e.attrs[s]
|
|
120
|
-
));
|
|
121
|
-
x(e.startTag);
|
|
122
|
-
const i = u(e.startTag), r = e.endTag ? u(e.endTag) : void 0, f = { opening: i };
|
|
123
|
-
r && (f.closing = r), f.properties = a, n.data = { position: f };
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return o;
|
|
127
|
-
}
|
|
128
|
-
function u(t) {
|
|
129
|
-
const n = g({
|
|
130
|
-
line: t.startLine,
|
|
131
|
-
column: t.startCol,
|
|
132
|
-
offset: t.startOffset
|
|
133
|
-
}), e = g({
|
|
134
|
-
line: t.endLine,
|
|
135
|
-
column: t.endCol,
|
|
136
|
-
offset: t.endOffset
|
|
137
|
-
});
|
|
138
|
-
return n || e ? { start: n, end: e } : void 0;
|
|
139
|
-
}
|
|
140
|
-
function g(t) {
|
|
141
|
-
return t.line && t.column ? t : void 0;
|
|
142
|
-
}
|
|
143
|
-
export {
|
|
144
|
-
U as fromParse5
|
|
145
|
-
};
|
|
146
|
-
//# sourceMappingURL=index.es.js.map
|
package/dist/node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.es.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../../../../../node_modules/hast-util-raw/node_modules/hast-util-from-parse5/lib/index.js"],"sourcesContent":["/**\n * @import {ElementData, Element, Nodes, RootContent, Root} from 'hast'\n * @import {DefaultTreeAdapterMap, Token} from 'parse5'\n * @import {Schema} from 'property-information'\n * @import {Point, Position} from 'unist'\n * @import {VFile} from 'vfile'\n * @import {Options} from 'hast-util-from-parse5'\n */\n\n/**\n * @typedef State\n * Info passed around about the current state.\n * @property {VFile | undefined} file\n * Corresponding file.\n * @property {boolean} location\n * Whether location info was found.\n * @property {Schema} schema\n * Current schema.\n * @property {boolean | undefined} verbose\n * Add extra positional info.\n */\n\nimport {ok as assert} from 'devlop'\nimport {h, s} from 'hastscript'\nimport {find, html, svg} from 'property-information'\nimport {location} from 'vfile-location'\nimport {webNamespaces} from 'web-namespaces'\n\nconst own = {}.hasOwnProperty\n/** @type {unknown} */\n// type-coverage:ignore-next-line\nconst proto = Object.prototype\n\n/**\n * Transform a `parse5` AST to hast.\n *\n * @param {DefaultTreeAdapterMap['node']} tree\n * `parse5` tree to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {Nodes}\n * hast tree.\n */\nexport function fromParse5(tree, options) {\n const settings = options || {}\n\n return one(\n {\n file: settings.file || undefined,\n location: false,\n schema: settings.space === 'svg' ? svg : html,\n verbose: settings.verbose || false\n },\n tree\n )\n}\n\n/**\n * Transform a node.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {DefaultTreeAdapterMap['node']} node\n * p5 node.\n * @returns {Nodes}\n * hast node.\n */\nfunction one(state, node) {\n /** @type {Nodes} */\n let result\n\n switch (node.nodeName) {\n case '#comment': {\n const reference = /** @type {DefaultTreeAdapterMap['commentNode']} */ (\n node\n )\n result = {type: 'comment', value: reference.data}\n patch(state, reference, result)\n return result\n }\n\n case '#document':\n case '#document-fragment': {\n const reference =\n /** @type {DefaultTreeAdapterMap['document'] | DefaultTreeAdapterMap['documentFragment']} */ (\n node\n )\n const quirksMode =\n 'mode' in reference\n ? reference.mode === 'quirks' || reference.mode === 'limited-quirks'\n : false\n\n result = {\n type: 'root',\n children: all(state, node.childNodes),\n data: {quirksMode}\n }\n\n if (state.file && state.location) {\n const document = String(state.file)\n const loc = location(document)\n const start = loc.toPoint(0)\n const end = loc.toPoint(document.length)\n // Always defined as we give valid input.\n assert(start, 'expected `start`')\n assert(end, 'expected `end`')\n result.position = {start, end}\n }\n\n return result\n }\n\n case '#documentType': {\n const reference = /** @type {DefaultTreeAdapterMap['documentType']} */ (\n node\n )\n result = {type: 'doctype'}\n patch(state, reference, result)\n return result\n }\n\n case '#text': {\n const reference = /** @type {DefaultTreeAdapterMap['textNode']} */ (node)\n result = {type: 'text', value: reference.value}\n patch(state, reference, result)\n return result\n }\n\n // Element.\n default: {\n const reference = /** @type {DefaultTreeAdapterMap['element']} */ (node)\n result = element(state, reference)\n return result\n }\n }\n}\n\n/**\n * Transform children.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Array<DefaultTreeAdapterMap['node']>} nodes\n * Nodes.\n * @returns {Array<RootContent>}\n * hast nodes.\n */\nfunction all(state, nodes) {\n let index = -1\n /** @type {Array<RootContent>} */\n const results = []\n\n while (++index < nodes.length) {\n // Assume no roots in `nodes`.\n const result = /** @type {RootContent} */ (one(state, nodes[index]))\n results.push(result)\n }\n\n return results\n}\n\n/**\n * Transform an element.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {DefaultTreeAdapterMap['element']} node\n * `parse5` node to transform.\n * @returns {Element}\n * hast node.\n */\nfunction element(state, node) {\n const schema = state.schema\n\n state.schema = node.namespaceURI === webNamespaces.svg ? svg : html\n\n // Props.\n let index = -1\n /** @type {Record<string, string>} */\n const properties = {}\n\n while (++index < node.attrs.length) {\n const attribute = node.attrs[index]\n const name =\n (attribute.prefix ? attribute.prefix + ':' : '') + attribute.name\n if (!own.call(proto, name)) {\n properties[name] = attribute.value\n }\n }\n\n // Build.\n const x = state.schema.space === 'svg' ? s : h\n const result = x(node.tagName, properties, all(state, node.childNodes))\n patch(state, node, result)\n\n // Switch content.\n if (result.tagName === 'template') {\n const reference = /** @type {DefaultTreeAdapterMap['template']} */ (node)\n const pos = reference.sourceCodeLocation\n const startTag = pos && pos.startTag && position(pos.startTag)\n const endTag = pos && pos.endTag && position(pos.endTag)\n\n // Root in, root out.\n const content = /** @type {Root} */ (one(state, reference.content))\n\n if (startTag && endTag && state.file) {\n content.position = {start: startTag.end, end: endTag.start}\n }\n\n result.content = content\n }\n\n state.schema = schema\n\n return result\n}\n\n/**\n * Patch positional info from `from` onto `to`.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {DefaultTreeAdapterMap['node']} from\n * p5 node.\n * @param {Nodes} to\n * hast node.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(state, from, to) {\n if ('sourceCodeLocation' in from && from.sourceCodeLocation && state.file) {\n const position = createLocation(state, to, from.sourceCodeLocation)\n\n if (position) {\n state.location = true\n to.position = position\n }\n }\n}\n\n/**\n * Create clean positional information.\n *\n * @param {State} state\n * Info passed around about the current state.\n * @param {Nodes} node\n * hast node.\n * @param {Token.ElementLocation} location\n * p5 location info.\n * @returns {Position | undefined}\n * Position, or nothing.\n */\nfunction createLocation(state, node, location) {\n const result = position(location)\n\n if (node.type === 'element') {\n const tail = node.children[node.children.length - 1]\n\n // Bug for unclosed with children.\n // See: <https://github.com/inikulin/parse5/issues/109>.\n if (\n result &&\n !location.endTag &&\n tail &&\n tail.position &&\n tail.position.end\n ) {\n result.end = Object.assign({}, tail.position.end)\n }\n\n if (state.verbose) {\n /** @type {Record<string, Position | undefined>} */\n const properties = {}\n /** @type {string} */\n let key\n\n if (location.attrs) {\n for (key in location.attrs) {\n if (own.call(location.attrs, key)) {\n properties[find(state.schema, key).property] = position(\n location.attrs[key]\n )\n }\n }\n }\n\n assert(location.startTag, 'a start tag should exist')\n const opening = position(location.startTag)\n const closing = location.endTag ? position(location.endTag) : undefined\n /** @type {ElementData['position']} */\n const data = {opening}\n if (closing) data.closing = closing\n data.properties = properties\n\n node.data = {position: data}\n }\n }\n\n return result\n}\n\n/**\n * Turn a p5 location into a position.\n *\n * @param {Token.Location} loc\n * Location.\n * @returns {Position | undefined}\n * Position or nothing.\n */\nfunction position(loc) {\n const start = point({\n line: loc.startLine,\n column: loc.startCol,\n offset: loc.startOffset\n })\n const end = point({\n line: loc.endLine,\n column: loc.endCol,\n offset: loc.endOffset\n })\n\n // @ts-expect-error: we do use `undefined` for points if one or the other\n // exists.\n return start || end ? {start, end} : undefined\n}\n\n/**\n * Filter out invalid points.\n *\n * @param {Point} point\n * Point with potentially `undefined` values.\n * @returns {Point | undefined}\n * Point or nothing.\n */\nfunction point(point) {\n return point.line && point.column ? point : undefined\n}\n"],"names":["own","proto","fromParse5","tree","options","settings","one","svg","html","state","node","result","reference","patch","quirksMode","all","document","loc","location","start","end","element","nodes","index","results","schema","webNamespaces","properties","attribute","name","s","h","pos","startTag","position","endTag","content","from","to","createLocation","tail","key","find","assert","opening","closing","data","point"],"mappings":";;;;;;AA4BA,MAAMA,IAAM,CAAA,EAAG,gBAGTC,IAAQ,OAAO;AAYd,SAASC,EAAWC,GAAMC,GAAS;AACxC,QAAMC,IAAWD,KAAW,CAAA;AAE5B,SAAOE;AAAA,IACL;AAAA,MACE,MAAMD,EAAS,QAAQ;AAAA,MACvB,UAAU;AAAA,MACV,QAAQA,EAAS,UAAU,QAAQE,IAAMC;AAAA,MACzC,SAASH,EAAS,WAAW;AAAA,IACnC;AAAA,IACIF;AAAA,EACJ;AACA;AAYA,SAASG,EAAIG,GAAOC,GAAM;AAExB,MAAIC;AAEJ,UAAQD,EAAK,UAAQ;AAAA,IACn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AAM;AAAA,IAChB,MAAM9B,EAAI;AAAA,IACV,QAAQA,EAAI;AAAA,IACZ,QAAQA,EAAI;AAAA,EAChB,CAAG;AAID,SAAOE,KAASC,IAAM,EAAC,OAAAD,GAAO,KAAAC,EAAG,IAAI;AACvC;AAUA,SAAS2B,EAAMA,GAAO;AACpB,SAAOA,EAAM,QAAQA,EAAM,SAASA,IAAQ;AAC9C;","x_google_ignoreList":[0]}
|
package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.cjs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=/[#.]/g;function p(n,o){const l=n||"",t={};let s=0,r,c;for(;s<l.length;){i.lastIndex=s;const a=i.exec(l),e=l.slice(s,a?a.index:l.length);e&&(r?r==="#"?t.id=e:Array.isArray(t.className)?t.className.push(e):t.className=[e]:c=e,s+=e.length),a&&(r=a[0],s++)}return{type:"element",tagName:c||o||"div",properties:t,children:[]}}exports.parseSelector=p;
|
|
2
|
-
//# sourceMappingURL=index.cjs.js.map
|
package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.cjs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../../../../../node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n */\n\n/**\n * @template {string} SimpleSelector\n * Selector type.\n * @template {string} DefaultTagName\n * Default tag name.\n * @typedef {(\n * SimpleSelector extends ''\n * ? DefaultTagName\n * : SimpleSelector extends `${infer TagName}.${infer Rest}`\n * ? ExtractTagName<TagName, DefaultTagName>\n * : SimpleSelector extends `${infer TagName}#${infer Rest}`\n * ? ExtractTagName<TagName, DefaultTagName>\n * : SimpleSelector extends string\n * ? SimpleSelector\n * : DefaultTagName\n * )} ExtractTagName\n * Extract tag name from a simple selector.\n */\n\nconst search = /[#.]/g\n\n/**\n * Create a hast element from a simple CSS selector.\n *\n * @template {string} Selector\n * Type of selector.\n * @template {string} [DefaultTagName='div']\n * Type of default tag name (default: `'div'`).\n * @param {Selector | null | undefined} [selector]\n * Simple CSS selector (optional).\n *\n * Can contain a tag name (`foo`), classes (`.bar`), and an ID (`#baz`).\n * Multiple classes are allowed.\n * Uses the last ID if multiple IDs are found.\n * @param {DefaultTagName | null | undefined} [defaultTagName='div']\n * Tag name to use if `selector` does not specify one (default: `'div'`).\n * @returns {Element & {tagName: ExtractTagName<Selector, DefaultTagName>}}\n * Built element.\n */\nexport function parseSelector(selector, defaultTagName) {\n const value = selector || ''\n /** @type {Properties} */\n const props = {}\n let start = 0\n /** @type {string | undefined} */\n let previous\n /** @type {string | undefined} */\n let tagName\n\n while (start < value.length) {\n search.lastIndex = start\n const match = search.exec(value)\n const subvalue = value.slice(start, match ? match.index : value.length)\n\n if (subvalue) {\n if (!previous) {\n tagName = subvalue\n } else if (previous === '#') {\n props.id = subvalue\n } else if (Array.isArray(props.className)) {\n props.className.push(subvalue)\n } else {\n props.className = [subvalue]\n }\n\n start += subvalue.length\n }\n\n if (match) {\n previous = match[0]\n start++\n }\n }\n\n return {\n type: 'element',\n // @ts-expect-error: tag name is parsed.\n tagName: tagName || defaultTagName || 'div',\n properties: props,\n children: []\n }\n}\n"],"names":["search","parseSelector","selector","defaultTagName","value","props","start","previous","tagName","match","subvalue"],"mappings":"gFAwBA,MAAMA,EAAS,QAoBR,SAASC,EAAcC,EAAUC,EAAgB,CACtD,MAAMC,EAAQF,GAAY,GAEpBG,EAAQ,CAAA,EACd,IAAIC,EAAQ,EAERC,EAEAC,EAEJ,KAAOF,EAAQF,EAAM,QAAQ,CAC3BJ,EAAO,UAAYM,EACnB,MAAMG,EAAQT,EAAO,KAAKI,CAAK,EACzBM,EAAWN,EAAM,MAAME,EAAOG,EAAQA,EAAM,MAAQL,EAAM,MAAM,EAElEM,IACGH,EAEMA,IAAa,IACtBF,EAAM,GAAKK,EACF,MAAM,QAAQL,EAAM,SAAS,EACtCA,EAAM,UAAU,KAAKK,CAAQ,EAE7BL,EAAM,UAAY,CAACK,CAAQ,EAN3BF,EAAUE,EASZJ,GAASI,EAAS,QAGhBD,IACFF,EAAWE,EAAM,CAAC,EAClBH,IAEJ,CAEA,MAAO,CACL,KAAM,UAEN,QAASE,GAAWL,GAAkB,MACtC,WAAYE,EACZ,SAAU,CAAA,CACd,CACA","x_google_ignoreList":[0]}
|
package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.es.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const i = /[#.]/g;
|
|
2
|
-
function p(n, o) {
|
|
3
|
-
const l = n || "", s = {};
|
|
4
|
-
let t = 0, r, c;
|
|
5
|
-
for (; t < l.length; ) {
|
|
6
|
-
i.lastIndex = t;
|
|
7
|
-
const a = i.exec(l), e = l.slice(t, a ? a.index : l.length);
|
|
8
|
-
e && (r ? r === "#" ? s.id = e : Array.isArray(s.className) ? s.className.push(e) : s.className = [e] : c = e, t += e.length), a && (r = a[0], t++);
|
|
9
|
-
}
|
|
10
|
-
return {
|
|
11
|
-
type: "element",
|
|
12
|
-
// @ts-expect-error: tag name is parsed.
|
|
13
|
-
tagName: c || o || "div",
|
|
14
|
-
properties: s,
|
|
15
|
-
children: []
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
p as parseSelector
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=index.es.js.map
|
package/dist/node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.es.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../../../../../node_modules/hast-util-raw/node_modules/hast-util-parse-selector/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Properties} Properties\n */\n\n/**\n * @template {string} SimpleSelector\n * Selector type.\n * @template {string} DefaultTagName\n * Default tag name.\n * @typedef {(\n * SimpleSelector extends ''\n * ? DefaultTagName\n * : SimpleSelector extends `${infer TagName}.${infer Rest}`\n * ? ExtractTagName<TagName, DefaultTagName>\n * : SimpleSelector extends `${infer TagName}#${infer Rest}`\n * ? ExtractTagName<TagName, DefaultTagName>\n * : SimpleSelector extends string\n * ? SimpleSelector\n * : DefaultTagName\n * )} ExtractTagName\n * Extract tag name from a simple selector.\n */\n\nconst search = /[#.]/g\n\n/**\n * Create a hast element from a simple CSS selector.\n *\n * @template {string} Selector\n * Type of selector.\n * @template {string} [DefaultTagName='div']\n * Type of default tag name (default: `'div'`).\n * @param {Selector | null | undefined} [selector]\n * Simple CSS selector (optional).\n *\n * Can contain a tag name (`foo`), classes (`.bar`), and an ID (`#baz`).\n * Multiple classes are allowed.\n * Uses the last ID if multiple IDs are found.\n * @param {DefaultTagName | null | undefined} [defaultTagName='div']\n * Tag name to use if `selector` does not specify one (default: `'div'`).\n * @returns {Element & {tagName: ExtractTagName<Selector, DefaultTagName>}}\n * Built element.\n */\nexport function parseSelector(selector, defaultTagName) {\n const value = selector || ''\n /** @type {Properties} */\n const props = {}\n let start = 0\n /** @type {string | undefined} */\n let previous\n /** @type {string | undefined} */\n let tagName\n\n while (start < value.length) {\n search.lastIndex = start\n const match = search.exec(value)\n const subvalue = value.slice(start, match ? match.index : value.length)\n\n if (subvalue) {\n if (!previous) {\n tagName = subvalue\n } else if (previous === '#') {\n props.id = subvalue\n } else if (Array.isArray(props.className)) {\n props.className.push(subvalue)\n } else {\n props.className = [subvalue]\n }\n\n start += subvalue.length\n }\n\n if (match) {\n previous = match[0]\n start++\n }\n }\n\n return {\n type: 'element',\n // @ts-expect-error: tag name is parsed.\n tagName: tagName || defaultTagName || 'div',\n properties: props,\n children: []\n }\n}\n"],"names":["search","parseSelector","selector","defaultTagName","value","props","start","previous","tagName","match","subvalue"],"mappings":"AAwBA,MAAMA,IAAS;AAoBR,SAASC,EAAcC,GAAUC,GAAgB;AACtD,QAAMC,IAAQF,KAAY,IAEpBG,IAAQ,CAAA;AACd,MAAIC,IAAQ,GAERC,GAEAC;AAEJ,SAAOF,IAAQF,EAAM,UAAQ;AAC3B,IAAAJ,EAAO,YAAYM;AACnB,UAAMG,IAAQT,EAAO,KAAKI,CAAK,GACzBM,IAAWN,EAAM,MAAME,GAAOG,IAAQA,EAAM,QAAQL,EAAM,MAAM;AAEtE,IAAIM,MACGH,IAEMA,MAAa,MACtBF,EAAM,KAAKK,IACF,MAAM,QAAQL,EAAM,SAAS,IACtCA,EAAM,UAAU,KAAKK,CAAQ,IAE7BL,EAAM,YAAY,CAACK,CAAQ,IAN3BF,IAAUE,GASZJ,KAASI,EAAS,SAGhBD,MACFF,IAAWE,EAAM,CAAC,GAClBH;AAAA,EAEJ;AAEA,SAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,SAASE,KAAWL,KAAkB;AAAA,IACtC,YAAYE;AAAA,IACZ,UAAU,CAAA;AAAA,EACd;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../../../comma-separated-tokens/index.cjs.js"),a=require("../../../../space-separated-tokens/index.cjs.js"),g=require("../../hast-util-parse-selector/lib/index.cjs.js"),A=require("../../property-information/lib/find.cjs.js"),u=require("../../property-information/lib/normalize.cjs.js");function N(r,e,n){const t=n?k(n):void 0;function i(o,f,...y){let s;if(o==null){s={type:"root",children:[]};const c=f;y.unshift(c)}else{s=g.parseSelector(o,e);const c=s.tagName.toLowerCase(),l=t?t.get(c):void 0;if(s.tagName=l||c,j(f))y.unshift(f);else for(const[h,b]of Object.entries(f))S(r,s.properties,h,b)}for(const c of y)d(s.children,c);return s.type==="element"&&s.tagName==="template"&&(s.content={type:"root",children:s.children},s.children=[]),s}return i}function j(r){if(r===null||typeof r!="object"||Array.isArray(r))return!0;if(typeof r.type!="string")return!1;const e=r,n=Object.keys(r);for(const t of n){const i=e[t];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const o=i;for(const f of o)if(typeof f!="number"&&typeof f!="string")return!0}}return!!("children"in r&&Array.isArray(r.children))}function S(r,e,n,t){const i=A.find(r,n);let o;if(t!=null){if(typeof t=="number"){if(Number.isNaN(t))return;o=t}else typeof t=="boolean"?o=t:typeof t=="string"?i.spaceSeparated?o=a.parse(t):i.commaSeparated?o=p.parse(t):i.commaOrSpaceSeparated?o=a.parse(p.parse(t).join(" ")):o=m(i,i.property,t):Array.isArray(t)?o=[...t]:o=i.property==="style"?w(t):String(t);if(Array.isArray(o)){const f=[];for(const y of o)f.push(m(i,i.property,y));o=f}i.property==="className"&&Array.isArray(e.className)&&(o=e.className.concat(o)),e[i.property]=o}}function d(r,e){if(e!=null)if(typeof e=="number"||typeof e=="string")r.push({type:"text",value:String(e)});else if(Array.isArray(e))for(const n of e)d(r,n);else if(typeof e=="object"&&"type"in e)e.type==="root"?d(r,e.children):r.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function m(r,e,n){if(typeof n=="string"){if(r.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((r.boolean||r.overloadedBoolean)&&(n===""||u.normalize(n)===u.normalize(e)))return!0}return n}function w(r){const e=[];for(const[n,t]of Object.entries(r))e.push([n,t].join(": "));return e.join("; ")}function k(r){const e=new Map;for(const n of r)e.set(n.toLowerCase(),n);return e}exports.createH=N;
|
|
2
|
-
//# sourceMappingURL=create-h.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-h.cjs.js","sources":["../../../../../../../node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.js"],"sourcesContent":["/**\n * @import {Element, Nodes, RootContent, Root} from 'hast'\n * @import {Info, Schema} from 'property-information'\n */\n\n/**\n * @typedef {Array<Nodes | PrimitiveChild>} ArrayChildNested\n * List of children (deep).\n */\n\n/**\n * @typedef {Array<ArrayChildNested | Nodes | PrimitiveChild>} ArrayChild\n * List of children.\n */\n\n/**\n * @typedef {Array<number | string>} ArrayValue\n * List of property values for space- or comma separated values (such as `className`).\n */\n\n/**\n * @typedef {ArrayChild | Nodes | PrimitiveChild} Child\n * Acceptable child value.\n */\n\n/**\n * @typedef {number | string | null | undefined} PrimitiveChild\n * Primitive children, either ignored (nullish), or turned into text nodes.\n */\n\n/**\n * @typedef {boolean | number | string | null | undefined} PrimitiveValue\n * Primitive property value.\n */\n\n/**\n * @typedef {Record<string, PropertyValue | Style>} Properties\n * Acceptable value for element properties.\n */\n\n/**\n * @typedef {ArrayValue | PrimitiveValue} PropertyValue\n * Primitive value or list value.\n */\n\n/**\n * @typedef {Element | Root} Result\n * Result from a `h` (or `s`) call.\n */\n\n/**\n * @typedef {number | string} StyleValue\n * Value for a CSS style field.\n */\n\n/**\n * @typedef {Record<string, StyleValue>} Style\n * Supported value of a `style` prop.\n */\n\nimport {parse as parseCommas} from 'comma-separated-tokens'\nimport {parseSelector} from 'hast-util-parse-selector'\nimport {find, normalize} from 'property-information'\nimport {parse as parseSpaces} from 'space-separated-tokens'\n\n/**\n * @param {Schema} schema\n * Schema to use.\n * @param {string} defaultTagName\n * Default tag name.\n * @param {ReadonlyArray<string> | undefined} [caseSensitive]\n * Case-sensitive tag names (default: `undefined`).\n * @returns\n * `h`.\n */\nexport function createH(schema, defaultTagName, caseSensitive) {\n const adjust = caseSensitive ? createAdjustMap(caseSensitive) : undefined\n\n /**\n * Hyperscript compatible DSL for creating virtual hast trees.\n *\n * @overload\n * @param {null | undefined} [selector]\n * @param {...Child} children\n * @returns {Root}\n *\n * @overload\n * @param {string} selector\n * @param {Properties} properties\n * @param {...Child} children\n * @returns {Element}\n *\n * @overload\n * @param {string} selector\n * @param {...Child} children\n * @returns {Element}\n *\n * @param {string | null | undefined} [selector]\n * Selector.\n * @param {Child | Properties | null | undefined} [properties]\n * Properties (or first child) (default: `undefined`).\n * @param {...Child} children\n * Children.\n * @returns {Result}\n * Result.\n */\n function h(selector, properties, ...children) {\n /** @type {Result} */\n let node\n\n if (selector === null || selector === undefined) {\n node = {type: 'root', children: []}\n // Properties are not supported for roots.\n const child = /** @type {Child} */ (properties)\n children.unshift(child)\n } else {\n node = parseSelector(selector, defaultTagName)\n // Normalize the name.\n const lower = node.tagName.toLowerCase()\n const adjusted = adjust ? adjust.get(lower) : undefined\n node.tagName = adjusted || lower\n\n // Handle properties.\n if (isChild(properties)) {\n children.unshift(properties)\n } else {\n for (const [key, value] of Object.entries(properties)) {\n addProperty(schema, node.properties, key, value)\n }\n }\n }\n\n // Handle children.\n for (const child of children) {\n addChild(node.children, child)\n }\n\n if (node.type === 'element' && node.tagName === 'template') {\n node.content = {type: 'root', children: node.children}\n node.children = []\n }\n\n return node\n }\n\n return h\n}\n\n/**\n * Check if something is properties or a child.\n *\n * @param {Child | Properties} value\n * Value to check.\n * @returns {value is Child}\n * Whether `value` is definitely a child.\n */\nfunction isChild(value) {\n // Never properties if not an object.\n if (value === null || typeof value !== 'object' || Array.isArray(value)) {\n return true\n }\n\n // Never node without `type`; that’s the main discriminator.\n if (typeof value.type !== 'string') return false\n\n // Slower check: never property value if object or array with\n // non-number/strings.\n const record = /** @type {Record<string, unknown>} */ (value)\n const keys = Object.keys(value)\n\n for (const key of keys) {\n const value = record[key]\n\n if (value && typeof value === 'object') {\n if (!Array.isArray(value)) return true\n\n const list = /** @type {ReadonlyArray<unknown>} */ (value)\n\n for (const item of list) {\n if (typeof item !== 'number' && typeof item !== 'string') {\n return true\n }\n }\n }\n }\n\n // Also see empty `children` as a node.\n if ('children' in value && Array.isArray(value.children)) {\n return true\n }\n\n // Default to properties, someone can always pass an empty object,\n // put `data: {}` in a node,\n // or wrap it in an array.\n return false\n}\n\n/**\n * @param {Schema} schema\n * Schema.\n * @param {Properties} properties\n * Properties object.\n * @param {string} key\n * Property name.\n * @param {PropertyValue | Style} value\n * Property value.\n * @returns {undefined}\n * Nothing.\n */\nfunction addProperty(schema, properties, key, value) {\n const info = find(schema, key)\n /** @type {PropertyValue} */\n let result\n\n // Ignore nullish and NaN values.\n if (value === null || value === undefined) return\n\n if (typeof value === 'number') {\n // Ignore NaN.\n if (Number.isNaN(value)) return\n\n result = value\n }\n // Booleans.\n else if (typeof value === 'boolean') {\n result = value\n }\n // Handle list values.\n else if (typeof value === 'string') {\n if (info.spaceSeparated) {\n result = parseSpaces(value)\n } else if (info.commaSeparated) {\n result = parseCommas(value)\n } else if (info.commaOrSpaceSeparated) {\n result = parseSpaces(parseCommas(value).join(' '))\n } else {\n result = parsePrimitive(info, info.property, value)\n }\n } else if (Array.isArray(value)) {\n result = [...value]\n } else {\n result = info.property === 'style' ? style(value) : String(value)\n }\n\n if (Array.isArray(result)) {\n /** @type {Array<number | string>} */\n const finalResult = []\n\n for (const item of result) {\n // Assume no booleans in array.\n finalResult.push(\n /** @type {number | string} */ (\n parsePrimitive(info, info.property, item)\n )\n )\n }\n\n result = finalResult\n }\n\n // Class names (which can be added both on the `selector` and here).\n if (info.property === 'className' && Array.isArray(properties.className)) {\n // Assume no booleans in `className`.\n result = properties.className.concat(\n /** @type {Array<number | string> | number | string} */ (result)\n )\n }\n\n properties[info.property] = result\n}\n\n/**\n * @param {Array<RootContent>} nodes\n * Children.\n * @param {Child} value\n * Child.\n * @returns {undefined}\n * Nothing.\n */\nfunction addChild(nodes, value) {\n if (value === null || value === undefined) {\n // Empty.\n } else if (typeof value === 'number' || typeof value === 'string') {\n nodes.push({type: 'text', value: String(value)})\n } else if (Array.isArray(value)) {\n for (const child of value) {\n addChild(nodes, child)\n }\n } else if (typeof value === 'object' && 'type' in value) {\n if (value.type === 'root') {\n addChild(nodes, value.children)\n } else {\n nodes.push(value)\n }\n } else {\n throw new Error('Expected node, nodes, or string, got `' + value + '`')\n }\n}\n\n/**\n * Parse a single primitives.\n *\n * @param {Info} info\n * Property information.\n * @param {string} name\n * Property name.\n * @param {PrimitiveValue} value\n * Property value.\n * @returns {PrimitiveValue}\n * Property value.\n */\nfunction parsePrimitive(info, name, value) {\n if (typeof value === 'string') {\n if (info.number && value && !Number.isNaN(Number(value))) {\n return Number(value)\n }\n\n if (\n (info.boolean || info.overloadedBoolean) &&\n (value === '' || normalize(value) === normalize(name))\n ) {\n return true\n }\n }\n\n return value\n}\n\n/**\n * Serialize a `style` object as a string.\n *\n * @param {Style} styles\n * Style object.\n * @returns {string}\n * CSS string.\n */\nfunction style(styles) {\n /** @type {Array<string>} */\n const result = []\n\n for (const [key, value] of Object.entries(styles)) {\n result.push([key, value].join(': '))\n }\n\n return result.join('; ')\n}\n\n/**\n * Create a map to adjust casing.\n *\n * @param {ReadonlyArray<string>} values\n * List of properly cased keys.\n * @returns {Map<string, string>}\n * Map of lowercase keys to uppercase keys.\n */\nfunction createAdjustMap(values) {\n /** @type {Map<string, string>} */\n const result = new Map()\n\n for (const value of values) {\n result.set(value.toLowerCase(), value)\n }\n\n return result\n}\n"],"names":["createH","schema","defaultTagName","caseSensitive","adjust","createAdjustMap","h","selector","properties","children","node","child","parseSelector","lower","adjusted","isChild","key","value","addProperty","addChild","record","keys","list","item","info","find","result","parseSpaces","parseCommas","parsePrimitive","style","finalResult","nodes","name","normalize","styles","values"],"mappings":"kYA2EO,SAASA,EAAQC,EAAQC,EAAgBC,EAAe,CAC7D,MAAMC,EAASD,EAAgBE,EAAgBF,CAAa,EAAI,OA8BhE,SAASG,EAAEC,EAAUC,KAAeC,EAAU,CAE5C,IAAIC,EAEJ,GAAIH,GAAa,KAAgC,CAC/CG,EAAO,CAAC,KAAM,OAAQ,SAAU,CAAA,CAAE,EAElC,MAAMC,EAA8BH,EACpCC,EAAS,QAAQE,CAAK,CACxB,KAAO,CACLD,EAAOE,EAAAA,cAAcL,EAAUL,CAAc,EAE7C,MAAMW,EAAQH,EAAK,QAAQ,YAAW,EAChCI,EAAWV,EAASA,EAAO,IAAIS,CAAK,EAAI,OAI9C,GAHAH,EAAK,QAAUI,GAAYD,EAGvBE,EAAQP,CAAU,EACpBC,EAAS,QAAQD,CAAU,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D,MAAO,EAEX,CAEA,OAAOhB,CACT,CAUA,SAASa,EAAMK,EAAQ,CAErB,MAAMT,EAAS,CAAA,EAEf,SAAW,CAACV,EAAKC,CAAK,IAAK,OAAO,QAAQkB,CAAM,EAC9CT,EAAO,KAAK,CAACV,EAAKC,CAAK,EAAE,KAAK,IAAI,CAAC,EAGrC,OAAOS,EAAO,KAAK,IAAI,CACzB,CAUA,SAASrB,EAAgB+B,EAAQ,CAE/B,MAAMV,EAAS,IAAI,IAEnB,UAAWT,KAASmB,EAClBV,EAAO,IAAIT,EAAM,YAAW,EAAIA,CAAK,EAGvC,OAAOS,CACT","x_google_ignoreList":[0]}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { parse as d } from "../../../../comma-separated-tokens/index.es.js";
|
|
2
|
-
import { parse as m } from "../../../../space-separated-tokens/index.es.js";
|
|
3
|
-
import { parseSelector as A } from "../../hast-util-parse-selector/lib/index.es.js";
|
|
4
|
-
import { find as N } from "../../property-information/lib/find.es.js";
|
|
5
|
-
import { normalize as a } from "../../property-information/lib/normalize.es.js";
|
|
6
|
-
function L(t, r, n) {
|
|
7
|
-
const e = n ? S(n) : void 0;
|
|
8
|
-
function i(o, s, ...p) {
|
|
9
|
-
let f;
|
|
10
|
-
if (o == null) {
|
|
11
|
-
f = { type: "root", children: [] };
|
|
12
|
-
const c = (
|
|
13
|
-
/** @type {Child} */
|
|
14
|
-
s
|
|
15
|
-
);
|
|
16
|
-
p.unshift(c);
|
|
17
|
-
} else {
|
|
18
|
-
f = A(o, r);
|
|
19
|
-
const c = f.tagName.toLowerCase(), l = e ? e.get(c) : void 0;
|
|
20
|
-
if (f.tagName = l || c, g(s))
|
|
21
|
-
p.unshift(s);
|
|
22
|
-
else
|
|
23
|
-
for (const [h, b] of Object.entries(s))
|
|
24
|
-
j(t, f.properties, h, b);
|
|
25
|
-
}
|
|
26
|
-
for (const c of p)
|
|
27
|
-
y(f.children, c);
|
|
28
|
-
return f.type === "element" && f.tagName === "template" && (f.content = { type: "root", children: f.children }, f.children = []), f;
|
|
29
|
-
}
|
|
30
|
-
return i;
|
|
31
|
-
}
|
|
32
|
-
function g(t) {
|
|
33
|
-
if (t === null || typeof t != "object" || Array.isArray(t))
|
|
34
|
-
return !0;
|
|
35
|
-
if (typeof t.type != "string") return !1;
|
|
36
|
-
const r = (
|
|
37
|
-
/** @type {Record<string, unknown>} */
|
|
38
|
-
t
|
|
39
|
-
), n = Object.keys(t);
|
|
40
|
-
for (const e of n) {
|
|
41
|
-
const i = r[e];
|
|
42
|
-
if (i && typeof i == "object") {
|
|
43
|
-
if (!Array.isArray(i)) return !0;
|
|
44
|
-
const o = (
|
|
45
|
-
/** @type {ReadonlyArray<unknown>} */
|
|
46
|
-
i
|
|
47
|
-
);
|
|
48
|
-
for (const s of o)
|
|
49
|
-
if (typeof s != "number" && typeof s != "string")
|
|
50
|
-
return !0;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return !!("children" in t && Array.isArray(t.children));
|
|
54
|
-
}
|
|
55
|
-
function j(t, r, n, e) {
|
|
56
|
-
const i = N(t, n);
|
|
57
|
-
let o;
|
|
58
|
-
if (e != null) {
|
|
59
|
-
if (typeof e == "number") {
|
|
60
|
-
if (Number.isNaN(e)) return;
|
|
61
|
-
o = e;
|
|
62
|
-
} else typeof e == "boolean" ? o = e : typeof e == "string" ? i.spaceSeparated ? o = m(e) : i.commaSeparated ? o = d(e) : i.commaOrSpaceSeparated ? o = m(d(e).join(" ")) : o = u(i, i.property, e) : Array.isArray(e) ? o = [...e] : o = i.property === "style" ? w(e) : String(e);
|
|
63
|
-
if (Array.isArray(o)) {
|
|
64
|
-
const s = [];
|
|
65
|
-
for (const p of o)
|
|
66
|
-
s.push(
|
|
67
|
-
/** @type {number | string} */
|
|
68
|
-
u(i, i.property, p)
|
|
69
|
-
);
|
|
70
|
-
o = s;
|
|
71
|
-
}
|
|
72
|
-
i.property === "className" && Array.isArray(r.className) && (o = r.className.concat(
|
|
73
|
-
/** @type {Array<number | string> | number | string} */
|
|
74
|
-
o
|
|
75
|
-
)), r[i.property] = o;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
function y(t, r) {
|
|
79
|
-
if (r != null) if (typeof r == "number" || typeof r == "string")
|
|
80
|
-
t.push({ type: "text", value: String(r) });
|
|
81
|
-
else if (Array.isArray(r))
|
|
82
|
-
for (const n of r)
|
|
83
|
-
y(t, n);
|
|
84
|
-
else if (typeof r == "object" && "type" in r)
|
|
85
|
-
r.type === "root" ? y(t, r.children) : t.push(r);
|
|
86
|
-
else
|
|
87
|
-
throw new Error("Expected node, nodes, or string, got `" + r + "`");
|
|
88
|
-
}
|
|
89
|
-
function u(t, r, n) {
|
|
90
|
-
if (typeof n == "string") {
|
|
91
|
-
if (t.number && n && !Number.isNaN(Number(n)))
|
|
92
|
-
return Number(n);
|
|
93
|
-
if ((t.boolean || t.overloadedBoolean) && (n === "" || a(n) === a(r)))
|
|
94
|
-
return !0;
|
|
95
|
-
}
|
|
96
|
-
return n;
|
|
97
|
-
}
|
|
98
|
-
function w(t) {
|
|
99
|
-
const r = [];
|
|
100
|
-
for (const [n, e] of Object.entries(t))
|
|
101
|
-
r.push([n, e].join(": "));
|
|
102
|
-
return r.join("; ");
|
|
103
|
-
}
|
|
104
|
-
function S(t) {
|
|
105
|
-
const r = /* @__PURE__ */ new Map();
|
|
106
|
-
for (const n of t)
|
|
107
|
-
r.set(n.toLowerCase(), n);
|
|
108
|
-
return r;
|
|
109
|
-
}
|
|
110
|
-
export {
|
|
111
|
-
L as createH
|
|
112
|
-
};
|
|
113
|
-
//# sourceMappingURL=create-h.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-h.es.js","sources":["../../../../../../../node_modules/hast-util-raw/node_modules/hastscript/lib/create-h.js"],"sourcesContent":["/**\n * @import {Element, Nodes, RootContent, Root} from 'hast'\n * @import {Info, Schema} from 'property-information'\n */\n\n/**\n * @typedef {Array<Nodes | PrimitiveChild>} ArrayChildNested\n * List of children (deep).\n */\n\n/**\n * @typedef {Array<ArrayChildNested | Nodes | PrimitiveChild>} ArrayChild\n * List of children.\n */\n\n/**\n * @typedef {Array<number | string>} ArrayValue\n * List of property values for space- or comma separated values (such as `className`).\n */\n\n/**\n * @typedef {ArrayChild | Nodes | PrimitiveChild} Child\n * Acceptable child value.\n */\n\n/**\n * @typedef {number | string | null | undefined} PrimitiveChild\n * Primitive children, either ignored (nullish), or turned into text nodes.\n */\n\n/**\n * @typedef {boolean | number | string | null | undefined} PrimitiveValue\n * Primitive property value.\n */\n\n/**\n * @typedef {Record<string, PropertyValue | Style>} Properties\n * Acceptable value for element properties.\n */\n\n/**\n * @typedef {ArrayValue | PrimitiveValue} PropertyValue\n * Primitive value or list value.\n */\n\n/**\n * @typedef {Element | Root} Result\n * Result from a `h` (or `s`) call.\n */\n\n/**\n * @typedef {number | string} StyleValue\n * Value for a CSS style field.\n */\n\n/**\n * @typedef {Record<string, StyleValue>} Style\n * Supported value of a `style` prop.\n */\n\nimport {parse as parseCommas} from 'comma-separated-tokens'\nimport {parseSelector} from 'hast-util-parse-selector'\nimport {find, normalize} from 'property-information'\nimport {parse as parseSpaces} from 'space-separated-tokens'\n\n/**\n * @param {Schema} schema\n * Schema to use.\n * @param {string} defaultTagName\n * Default tag name.\n * @param {ReadonlyArray<string> | undefined} [caseSensitive]\n * Case-sensitive tag names (default: `undefined`).\n * @returns\n * `h`.\n */\nexport function createH(schema, defaultTagName, caseSensitive) {\n const adjust = caseSensitive ? createAdjustMap(caseSensitive) : undefined\n\n /**\n * Hyperscript compatible DSL for creating virtual hast trees.\n *\n * @overload\n * @param {null | undefined} [selector]\n * @param {...Child} children\n * @returns {Root}\n *\n * @overload\n * @param {string} selector\n * @param {Properties} properties\n * @param {...Child} children\n * @returns {Element}\n *\n * @overload\n * @param {string} selector\n * @param {...Child} children\n * @returns {Element}\n *\n * @param {string | null | undefined} [selector]\n * Selector.\n * @param {Child | Properties | null | undefined} [properties]\n * Properties (or first child) (default: `undefined`).\n * @param {...Child} children\n * Children.\n * @returns {Result}\n * Result.\n */\n function h(selector, properties, ...children) {\n /** @type {Result} */\n let node\n\n if (selector === null || selector === undefined) {\n node = {type: 'root', children: []}\n // Properties are not supported for roots.\n const child = /** @type {Child} */ (properties)\n children.unshift(child)\n } else {\n node = parseSelector(selector, defaultTagName)\n // Normalize the name.\n const lower = node.tagName.toLowerCase()\n const adjusted = adjust ? adjust.get(lower) : undefined\n node.tagName = adjusted || lower\n\n // Handle properties.\n if (isChild(properties)) {\n children.unshift(properties)\n } else {\n for (const [key, value] of Object.entries(properties)) {\n addProperty(schema, node.properties, key, value)\n }\n }\n }\n\n // Handle children.\n for (const child of children) {\n addChild(node.children, child)\n }\n\n if (node.type === 'element' && node.tagName === 'template') {\n node.content = {type: 'root', children: node.children}\n node.children = []\n }\n\n return node\n }\n\n return h\n}\n\n/**\n * Check if something is properties or a child.\n *\n * @param {Child | Properties} value\n * Value to check.\n * @returns {value is Child}\n * Whether `value` is definitely a child.\n */\nfunction isChild(value) {\n // Never properties if not an object.\n if (value === null || typeof value !== 'object' || Array.isArray(value)) {\n return true\n }\n\n // Never node without `type`; that’s the main discriminator.\n if (typeof value.type !== 'string') return false\n\n // Slower check: never property value if object or array with\n // non-number/strings.\n const record = /** @type {Record<string, unknown>} */ (value)\n const keys = Object.keys(value)\n\n for (const key of keys) {\n const value = record[key]\n\n if (value && typeof value === 'object') {\n if (!Array.isArray(value)) return true\n\n const list = /** @type {ReadonlyArray<unknown>} */ (value)\n\n for (const item of list) {\n if (typeof item !== 'number' && typeof item !== 'string') {\n return true\n }\n }\n }\n }\n\n // Also see empty `children` as a node.\n if ('children' in value && Array.isArray(value.children)) {\n return true\n }\n\n // Default to properties, someone can always pass an empty object,\n // put `data: {}` in a node,\n // or wrap it in an array.\n return false\n}\n\n/**\n * @param {Schema} schema\n * Schema.\n * @param {Properties} properties\n * Properties object.\n * @param {string} key\n * Property name.\n * @param {PropertyValue | Style} value\n * Property value.\n * @returns {undefined}\n * Nothing.\n */\nfunction addProperty(schema, properties, key, value) {\n const info = find(schema, key)\n /** @type {PropertyValue} */\n let result\n\n // Ignore nullish and NaN values.\n if (value === null || value === undefined) return\n\n if (typeof value === 'number') {\n // Ignore NaN.\n if (Number.isNaN(value)) return\n\n result = value\n }\n // Booleans.\n else if (typeof value === 'boolean') {\n result = value\n }\n // Handle list values.\n else if (typeof value === 'string') {\n if (info.spaceSeparated) {\n result = parseSpaces(value)\n } else if (info.commaSeparated) {\n result = parseCommas(value)\n } else if (info.commaOrSpaceSeparated) {\n result = parseSpaces(parseCommas(value).join(' '))\n } else {\n result = parsePrimitive(info, info.property, value)\n }\n } else if (Array.isArray(value)) {\n result = [...value]\n } else {\n result = info.property === 'style' ? style(value) : String(value)\n }\n\n if (Array.isArray(result)) {\n /** @type {Array<number | string>} */\n const finalResult = []\n\n for (const item of result) {\n // Assume no booleans in array.\n finalResult.push(\n /** @type {number | string} */ (\n parsePrimitive(info, info.property, item)\n )\n )\n }\n\n result = finalResult\n }\n\n // Class names (which can be added both on the `selector` and here).\n if (info.property === 'className' && Array.isArray(properties.className)) {\n // Assume no booleans in `className`.\n result = properties.className.concat(\n /** @type {Array<number | string> | number | string} */ (result)\n )\n }\n\n properties[info.property] = result\n}\n\n/**\n * @param {Array<RootContent>} nodes\n * Children.\n * @param {Child} value\n * Child.\n * @returns {undefined}\n * Nothing.\n */\nfunction addChild(nodes, value) {\n if (value === null || value === undefined) {\n // Empty.\n } else if (typeof value === 'number' || typeof value === 'string') {\n nodes.push({type: 'text', value: String(value)})\n } else if (Array.isArray(value)) {\n for (const child of value) {\n addChild(nodes, child)\n }\n } else if (typeof value === 'object' && 'type' in value) {\n if (value.type === 'root') {\n addChild(nodes, value.children)\n } else {\n nodes.push(value)\n }\n } else {\n throw new Error('Expected node, nodes, or string, got `' + value + '`')\n }\n}\n\n/**\n * Parse a single primitives.\n *\n * @param {Info} info\n * Property information.\n * @param {string} name\n * Property name.\n * @param {PrimitiveValue} value\n * Property value.\n * @returns {PrimitiveValue}\n * Property value.\n */\nfunction parsePrimitive(info, name, value) {\n if (typeof value === 'string') {\n if (info.number && value && !Number.isNaN(Number(value))) {\n return Number(value)\n }\n\n if (\n (info.boolean || info.overloadedBoolean) &&\n (value === '' || normalize(value) === normalize(name))\n ) {\n return true\n }\n }\n\n return value\n}\n\n/**\n * Serialize a `style` object as a string.\n *\n * @param {Style} styles\n * Style object.\n * @returns {string}\n * CSS string.\n */\nfunction style(styles) {\n /** @type {Array<string>} */\n const result = []\n\n for (const [key, value] of Object.entries(styles)) {\n result.push([key, value].join(': '))\n }\n\n return result.join('; ')\n}\n\n/**\n * Create a map to adjust casing.\n *\n * @param {ReadonlyArray<string>} values\n * List of properly cased keys.\n * @returns {Map<string, string>}\n * Map of lowercase keys to uppercase keys.\n */\nfunction createAdjustMap(values) {\n /** @type {Map<string, string>} */\n const result = new Map()\n\n for (const value of values) {\n result.set(value.toLowerCase(), value)\n }\n\n return result\n}\n"],"names":["createH","schema","defaultTagName","caseSensitive","adjust","createAdjustMap","h","selector","properties","children","node","child","parseSelector","lower","adjusted","isChild","key","value","addProperty","addChild","record","keys","list","item","info","find","result","parseSpaces","parseCommas","parsePrimitive","style","finalResult","nodes","name","normalize","styles","values"],"mappings":";;;;;AA2EO,SAASA,EAAQC,GAAQC,GAAgBC,GAAe;AAC7D,QAAMC,IAASD,IAAgBE,EAAgBF,CAAa,IAAI;AA8BhE,WAASG,EAAEC,GAAUC,MAAeC,GAAU;AAE5C,QAAIC;AAEJ,QAAIH,KAAa,MAAgC;AAC/C,MAAAG,IAAO,EAAC,MAAM,QAAQ,UAAU,CAAA,EAAE;AAElC,YAAMC;AAAA;AAAA,QAA8BH;AAAA;AACpC,MAAAC,EAAS,QAAQE,CAAK;AAAA,IACxB,OAAO;AACL,MAAAD,IAAOE,EAAcL,GAAUL,CAAc;AAE7C,YAAMW,IAAQH,EAAK,QAAQ,YAAW,GAChCI,IAAWV,IAASA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AAQ,GAAG;AAE1E;AAcA,SAASY,EAAeL,GAAMS,GAAMhB,GAAO;AACzC,MAAI,OAAOA,KAAU,UAAU;AAC7B,QAAIO,EAAK,UAAUP,KAAS,CAAC,OAAO,MAAM,OAAOA,CAAK,CAAC;AACrD,aAAO,OAAOA,CAAK;AAGrB,SACGO,EAAK,WAAWA,EAAK,uBACrBP,MAAU,MAAMiB,EAAUjB,CAAK,MAAMiB,EAAUD,CAAI;AAEpD,aAAO;AAAA,EAEX;AAEA,SAAOhB;AACT;AAUA,SAASa,EAAMK,GAAQ;AAErB,QAAMT,IAAS,CAAA;AAEf,aAAW,CAACV,GAAKC,CAAK,KAAK,OAAO,QAAQkB,CAAM;AAC9C,IAAAT,EAAO,KAAK,CAACV,GAAKC,CAAK,EAAE,KAAK,IAAI,CAAC;AAGrC,SAAOS,EAAO,KAAK,IAAI;AACzB;AAUA,SAASrB,EAAgB+B,GAAQ;AAE/B,QAAMV,IAAS,oBAAI,IAAG;AAEtB,aAAWT,KAASmB;AAClB,IAAAV,EAAO,IAAIT,EAAM,YAAW,GAAIA,CAAK;AAGvC,SAAOS;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../property-information/index.cjs.js"),s=require("./create-h.cjs.js"),t=require("./svg-case-sensitive-tag-names.cjs.js"),r=s.createH(e.html,"div"),i=s.createH(e.svg,"g",t.svgCaseSensitiveTagNames);exports.h=r;exports.s=i;
|
|
2
|
-
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../../../../../node_modules/hast-util-raw/node_modules/hastscript/lib/index.js"],"sourcesContent":["// Register the JSX namespace on `h`.\n/**\n * @typedef {import('./jsx-classic.js').Element} h.JSX.Element\n * @typedef {import('./jsx-classic.js').ElementChildrenAttribute} h.JSX.ElementChildrenAttribute\n * @typedef {import('./jsx-classic.js').IntrinsicAttributes} h.JSX.IntrinsicAttributes\n * @typedef {import('./jsx-classic.js').IntrinsicElements} h.JSX.IntrinsicElements\n */\n\n// Register the JSX namespace on `s`.\n/**\n * @typedef {import('./jsx-classic.js').Element} s.JSX.Element\n * @typedef {import('./jsx-classic.js').ElementChildrenAttribute} s.JSX.ElementChildrenAttribute\n * @typedef {import('./jsx-classic.js').IntrinsicAttributes} s.JSX.IntrinsicAttributes\n * @typedef {import('./jsx-classic.js').IntrinsicElements} s.JSX.IntrinsicElements\n */\n\nimport {html, svg} from 'property-information'\nimport {createH} from './create-h.js'\nimport {svgCaseSensitiveTagNames} from './svg-case-sensitive-tag-names.js'\n\n// Note: this explicit type is needed, otherwise TS creates broken types.\n/** @type {ReturnType<createH>} */\nexport const h = createH(html, 'div')\n\n// Note: this explicit type is needed, otherwise TS creates broken types.\n/** @type {ReturnType<createH>} */\nexport const s = createH(svg, 'g', svgCaseSensitiveTagNames)\n"],"names":["h","createH","html","s","svg","svgCaseSensitiveTagNames"],"mappings":"6NAsBaA,EAAIC,EAAAA,QAAQC,EAAAA,KAAM,KAAK,EAIvBC,EAAIF,EAAAA,QAAQG,MAAK,IAAKC,EAAAA,wBAAwB","x_google_ignoreList":[0]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { html as t, svg as m } from "../../property-information/index.es.js";
|
|
2
|
-
import { createH as o } from "./create-h.es.js";
|
|
3
|
-
import { svgCaseSensitiveTagNames as r } from "./svg-case-sensitive-tag-names.es.js";
|
|
4
|
-
const a = o(t, "div"), g = o(m, "g", r);
|
|
5
|
-
export {
|
|
6
|
-
a as h,
|
|
7
|
-
g as s
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=index.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../../../../../node_modules/hast-util-raw/node_modules/hastscript/lib/index.js"],"sourcesContent":["// Register the JSX namespace on `h`.\n/**\n * @typedef {import('./jsx-classic.js').Element} h.JSX.Element\n * @typedef {import('./jsx-classic.js').ElementChildrenAttribute} h.JSX.ElementChildrenAttribute\n * @typedef {import('./jsx-classic.js').IntrinsicAttributes} h.JSX.IntrinsicAttributes\n * @typedef {import('./jsx-classic.js').IntrinsicElements} h.JSX.IntrinsicElements\n */\n\n// Register the JSX namespace on `s`.\n/**\n * @typedef {import('./jsx-classic.js').Element} s.JSX.Element\n * @typedef {import('./jsx-classic.js').ElementChildrenAttribute} s.JSX.ElementChildrenAttribute\n * @typedef {import('./jsx-classic.js').IntrinsicAttributes} s.JSX.IntrinsicAttributes\n * @typedef {import('./jsx-classic.js').IntrinsicElements} s.JSX.IntrinsicElements\n */\n\nimport {html, svg} from 'property-information'\nimport {createH} from './create-h.js'\nimport {svgCaseSensitiveTagNames} from './svg-case-sensitive-tag-names.js'\n\n// Note: this explicit type is needed, otherwise TS creates broken types.\n/** @type {ReturnType<createH>} */\nexport const h = createH(html, 'div')\n\n// Note: this explicit type is needed, otherwise TS creates broken types.\n/** @type {ReturnType<createH>} */\nexport const s = createH(svg, 'g', svgCaseSensitiveTagNames)\n"],"names":["h","createH","html","s","svg","svgCaseSensitiveTagNames"],"mappings":";;;AAsBY,MAACA,IAAIC,EAAQC,GAAM,KAAK,GAIvBC,IAAIF,EAAQG,GAAK,KAAKC,CAAwB;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"];exports.svgCaseSensitiveTagNames=e;
|
|
2
|
-
//# sourceMappingURL=svg-case-sensitive-tag-names.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"svg-case-sensitive-tag-names.cjs.js","sources":["../../../../../../../node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js"],"sourcesContent":["/**\n * List of case-sensitive SVG tag names.\n *\n * @type {ReadonlyArray<string>}\n */\nexport const svgCaseSensitiveTagNames = [\n 'altGlyph',\n 'altGlyphDef',\n 'altGlyphItem',\n 'animateColor',\n 'animateMotion',\n 'animateTransform',\n 'clipPath',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'foreignObject',\n 'glyphRef',\n 'linearGradient',\n 'radialGradient',\n 'solidColor',\n 'textArea',\n 'textPath'\n]\n"],"names":["svgCaseSensitiveTagNames"],"mappings":"gFAKY,MAACA,EAA2B,CACtC,WACA,cACA,eACA,eACA,gBACA,mBACA,WACA,UACA,gBACA,sBACA,cACA,mBACA,oBACA,oBACA,iBACA,eACA,UACA,UACA,UACA,UACA,UACA,iBACA,UACA,UACA,cACA,eACA,WACA,eACA,qBACA,cACA,SACA,eACA,gBACA,WACA,iBACA,iBACA,aACA,WACA,UACF","x_google_ignoreList":[0]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const e = [
|
|
2
|
-
"altGlyph",
|
|
3
|
-
"altGlyphDef",
|
|
4
|
-
"altGlyphItem",
|
|
5
|
-
"animateColor",
|
|
6
|
-
"animateMotion",
|
|
7
|
-
"animateTransform",
|
|
8
|
-
"clipPath",
|
|
9
|
-
"feBlend",
|
|
10
|
-
"feColorMatrix",
|
|
11
|
-
"feComponentTransfer",
|
|
12
|
-
"feComposite",
|
|
13
|
-
"feConvolveMatrix",
|
|
14
|
-
"feDiffuseLighting",
|
|
15
|
-
"feDisplacementMap",
|
|
16
|
-
"feDistantLight",
|
|
17
|
-
"feDropShadow",
|
|
18
|
-
"feFlood",
|
|
19
|
-
"feFuncA",
|
|
20
|
-
"feFuncB",
|
|
21
|
-
"feFuncG",
|
|
22
|
-
"feFuncR",
|
|
23
|
-
"feGaussianBlur",
|
|
24
|
-
"feImage",
|
|
25
|
-
"feMerge",
|
|
26
|
-
"feMergeNode",
|
|
27
|
-
"feMorphology",
|
|
28
|
-
"feOffset",
|
|
29
|
-
"fePointLight",
|
|
30
|
-
"feSpecularLighting",
|
|
31
|
-
"feSpotLight",
|
|
32
|
-
"feTile",
|
|
33
|
-
"feTurbulence",
|
|
34
|
-
"foreignObject",
|
|
35
|
-
"glyphRef",
|
|
36
|
-
"linearGradient",
|
|
37
|
-
"radialGradient",
|
|
38
|
-
"solidColor",
|
|
39
|
-
"textArea",
|
|
40
|
-
"textPath"
|
|
41
|
-
];
|
|
42
|
-
export {
|
|
43
|
-
e as svgCaseSensitiveTagNames
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=svg-case-sensitive-tag-names.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"svg-case-sensitive-tag-names.es.js","sources":["../../../../../../../node_modules/hast-util-raw/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js"],"sourcesContent":["/**\n * List of case-sensitive SVG tag names.\n *\n * @type {ReadonlyArray<string>}\n */\nexport const svgCaseSensitiveTagNames = [\n 'altGlyph',\n 'altGlyphDef',\n 'altGlyphItem',\n 'animateColor',\n 'animateMotion',\n 'animateTransform',\n 'clipPath',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n 'foreignObject',\n 'glyphRef',\n 'linearGradient',\n 'radialGradient',\n 'solidColor',\n 'textArea',\n 'textPath'\n]\n"],"names":["svgCaseSensitiveTagNames"],"mappings":"AAKY,MAACA,IAA2B;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];exports.htmlVoidElements=e;
|
|
2
|
-
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../../../../node_modules/hast-util-raw/node_modules/html-void-elements/index.js"],"sourcesContent":["/**\n * List of HTML void tag names.\n *\n * @type {Array<string>}\n */\nexport const htmlVoidElements = [\n 'area',\n 'base',\n 'basefont',\n 'bgsound',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'frame',\n 'hr',\n 'image',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n]\n"],"names":["htmlVoidElements"],"mappings":"gFAKY,MAACA,EAAmB,CAC9B,OACA,OACA,WACA,UACA,KACA,MACA,UACA,QACA,QACA,KACA,QACA,MACA,QACA,SACA,OACA,OACA,QACA,SACA,QACA,KACF","x_google_ignoreList":[0]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const e = [
|
|
2
|
-
"area",
|
|
3
|
-
"base",
|
|
4
|
-
"basefont",
|
|
5
|
-
"bgsound",
|
|
6
|
-
"br",
|
|
7
|
-
"col",
|
|
8
|
-
"command",
|
|
9
|
-
"embed",
|
|
10
|
-
"frame",
|
|
11
|
-
"hr",
|
|
12
|
-
"image",
|
|
13
|
-
"img",
|
|
14
|
-
"input",
|
|
15
|
-
"keygen",
|
|
16
|
-
"link",
|
|
17
|
-
"meta",
|
|
18
|
-
"param",
|
|
19
|
-
"source",
|
|
20
|
-
"track",
|
|
21
|
-
"wbr"
|
|
22
|
-
];
|
|
23
|
-
export {
|
|
24
|
-
e as htmlVoidElements
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=index.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../../../../node_modules/hast-util-raw/node_modules/html-void-elements/index.js"],"sourcesContent":["/**\n * List of HTML void tag names.\n *\n * @type {Array<string>}\n */\nexport const htmlVoidElements = [\n 'area',\n 'base',\n 'basefont',\n 'bgsound',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'frame',\n 'hr',\n 'image',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n]\n"],"names":["htmlVoidElements"],"mappings":"AAKY,MAACA,IAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./html.cjs.js"),s="html",n="about:legacy-compat",h="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",r=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],c=[...r,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],a=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),o=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],f=[...o,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function m(t,d){return d.some(e=>t.startsWith(e))}function I(t){return t.name===s&&t.publicId===null&&(t.systemId===null||t.systemId===n)}function _(t){if(t.name!==s)return l.DOCUMENT_MODE.QUIRKS;const{systemId:d}=t;if(d&&d.toLowerCase()===h)return l.DOCUMENT_MODE.QUIRKS;let{publicId:e}=t;if(e!==null){if(e=e.toLowerCase(),a.has(e))return l.DOCUMENT_MODE.QUIRKS;let i=d===null?c:r;if(m(e,i))return l.DOCUMENT_MODE.QUIRKS;if(i=d===null?o:f,m(e,i))return l.DOCUMENT_MODE.LIMITED_QUIRKS}return l.DOCUMENT_MODE.NO_QUIRKS}exports.getDocumentMode=_;exports.isConforming=I;
|
|
2
|
-
//# sourceMappingURL=doctype.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"doctype.cjs.js","sources":["../../../../../../../../node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.js"],"sourcesContent":["import { DOCUMENT_MODE } from './html.js';\n//Const\nconst VALID_DOCTYPE_NAME = 'html';\nconst VALID_SYSTEM_ID = 'about:legacy-compat';\nconst QUIRKS_MODE_SYSTEM_ID = 'http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd';\nconst QUIRKS_MODE_PUBLIC_ID_PREFIXES = [\n '+//silmaril//dtd html pro v0r11 19970101//',\n '-//as//dtd html 3.0 aswedit + extensions//',\n '-//advasoft ltd//dtd html 3.0 aswedit + extensions//',\n '-//ietf//dtd html 2.0 level 1//',\n '-//ietf//dtd html 2.0 level 2//',\n '-//ietf//dtd html 2.0 strict level 1//',\n '-//ietf//dtd html 2.0 strict level 2//',\n '-//ietf//dtd html 2.0 strict//',\n '-//ietf//dtd html 2.0//',\n '-//ietf//dtd html 2.1e//',\n '-//ietf//dtd html 3.0//',\n '-//ietf//dtd html 3.2 final//',\n '-//ietf//dtd html 3.2//',\n '-//ietf//dtd html 3//',\n '-//ietf//dtd html level 0//',\n '-//ietf//dtd html level 1//',\n '-//ietf//dtd html level 2//',\n '-//ietf//dtd html level 3//',\n '-//ietf//dtd html strict level 0//',\n '-//ietf//dtd html strict level 1//',\n '-//ietf//dtd html strict level 2//',\n '-//ietf//dtd html strict level 3//',\n '-//ietf//dtd html strict//',\n '-//ietf//dtd html//',\n '-//metrius//dtd metrius presentational//',\n '-//microsoft//dtd internet explorer 2.0 html strict//',\n '-//microsoft//dtd internet explorer 2.0 html//',\n '-//microsoft//dtd internet explorer 2.0 tables//',\n '-//microsoft//dtd internet explorer 3.0 html strict//',\n '-//microsoft//dtd internet explorer 3.0 html//',\n '-//microsoft//dtd internet explorer 3.0 tables//',\n '-//netscape comm. corp.//dtd html//',\n '-//netscape comm. corp.//dtd strict html//',\n \"-//o'reilly and associates//dtd html 2.0//\",\n \"-//o'reilly and associates//dtd html extended 1.0//\",\n \"-//o'reilly and associates//dtd html extended relaxed 1.0//\",\n '-//sq//dtd html 2.0 hotmetal + extensions//',\n '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//',\n '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//',\n '-//spyglass//dtd html 2.0 extended//',\n '-//sun microsystems corp.//dtd hotjava html//',\n '-//sun microsystems corp.//dtd hotjava strict html//',\n '-//w3c//dtd html 3 1995-03-24//',\n '-//w3c//dtd html 3.2 draft//',\n '-//w3c//dtd html 3.2 final//',\n '-//w3c//dtd html 3.2//',\n '-//w3c//dtd html 3.2s draft//',\n '-//w3c//dtd html 4.0 frameset//',\n '-//w3c//dtd html 4.0 transitional//',\n '-//w3c//dtd html experimental 19960712//',\n '-//w3c//dtd html experimental 970421//',\n '-//w3c//dtd w3 html//',\n '-//w3o//dtd w3 html 3.0//',\n '-//webtechs//dtd mozilla html 2.0//',\n '-//webtechs//dtd mozilla html//',\n];\nconst QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = [\n ...QUIRKS_MODE_PUBLIC_ID_PREFIXES,\n '-//w3c//dtd html 4.01 frameset//',\n '-//w3c//dtd html 4.01 transitional//',\n];\nconst QUIRKS_MODE_PUBLIC_IDS = new Set([\n '-//w3o//dtd w3 html strict 3.0//en//',\n '-/w3c/dtd html 4.0 transitional/en',\n 'html',\n]);\nconst LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = ['-//w3c//dtd xhtml 1.0 frameset//', '-//w3c//dtd xhtml 1.0 transitional//'];\nconst LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = [\n ...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES,\n '-//w3c//dtd html 4.01 frameset//',\n '-//w3c//dtd html 4.01 transitional//',\n];\n//Utils\nfunction hasPrefix(publicId, prefixes) {\n return prefixes.some((prefix) => publicId.startsWith(prefix));\n}\n//API\nexport function isConforming(token) {\n return (token.name === VALID_DOCTYPE_NAME &&\n token.publicId === null &&\n (token.systemId === null || token.systemId === VALID_SYSTEM_ID));\n}\nexport function getDocumentMode(token) {\n if (token.name !== VALID_DOCTYPE_NAME) {\n return DOCUMENT_MODE.QUIRKS;\n }\n const { systemId } = token;\n if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) {\n return DOCUMENT_MODE.QUIRKS;\n }\n let { publicId } = token;\n if (publicId !== null) {\n publicId = publicId.toLowerCase();\n if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) {\n return DOCUMENT_MODE.QUIRKS;\n }\n let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES;\n if (hasPrefix(publicId, prefixes)) {\n return DOCUMENT_MODE.QUIRKS;\n }\n prefixes =\n systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES;\n if (hasPrefix(publicId, prefixes)) {\n return DOCUMENT_MODE.LIMITED_QUIRKS;\n }\n }\n return DOCUMENT_MODE.NO_QUIRKS;\n}\n"],"names":["VALID_DOCTYPE_NAME","VALID_SYSTEM_ID","QUIRKS_MODE_SYSTEM_ID","QUIRKS_MODE_PUBLIC_ID_PREFIXES","QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES","QUIRKS_MODE_PUBLIC_IDS","LIMITED_QUIRKS_PUBLIC_ID_PREFIXES","LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES","hasPrefix","publicId","prefixes","prefix","isConforming","token","getDocumentMode","DOCUMENT_MODE","systemId"],"mappings":"iHAEMA,EAAqB,OACrBC,EAAkB,sBAClBC,EAAwB,6DACxBC,EAAiC,CACnC,6CACA,6CACA,uDACA,kCACA,kCACA,yCACA,yCACA,iCACA,0BACA,2BACA,0BACA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