@wexio/messenger-widget-react 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +133 -0
- package/dist/widget-react-AgErOR36.js +325 -0
- package/dist/widget-react-AgErOR36.js.map +1 -0
- package/dist/widget-react-BAOIDvhV.js +4250 -0
- package/dist/widget-react-BAOIDvhV.js.map +1 -0
- package/dist/widget-react-BfPdgAQ-.js +5767 -0
- package/dist/widget-react-BfPdgAQ-.js.map +1 -0
- package/dist/widget-react-BxvW64LH.js +4429 -0
- package/dist/widget-react-BxvW64LH.js.map +1 -0
- package/dist/widget-react-C5COLy3m.js +23847 -0
- package/dist/widget-react-C5COLy3m.js.map +1 -0
- package/dist/widget-react-CAWxn8I0.js +247 -0
- package/dist/widget-react-CAWxn8I0.js.map +1 -0
- package/dist/widget-react-CDPzwV1i.js +11685 -0
- package/dist/widget-react-CDPzwV1i.js.map +1 -0
- package/dist/widget-react-CPYwD6FR.js +498 -0
- package/dist/widget-react-CPYwD6FR.js.map +1 -0
- package/dist/widget-react-CUBFPjaV.js +23 -0
- package/dist/widget-react-CUBFPjaV.js.map +1 -0
- package/dist/widget-react-CUuKGDZN.js +355 -0
- package/dist/widget-react-CUuKGDZN.js.map +1 -0
- package/dist/widget-react-CZs0xRrr.js +1336 -0
- package/dist/widget-react-CZs0xRrr.js.map +1 -0
- package/dist/widget-react-Cj_zbk_F.js +325 -0
- package/dist/widget-react-Cj_zbk_F.js.map +1 -0
- package/dist/widget-react-D-QrEVpv.js +125 -0
- package/dist/widget-react-D-QrEVpv.js.map +1 -0
- package/dist/widget-react-D8TPnM9r.js +26 -0
- package/dist/widget-react-D8TPnM9r.js.map +1 -0
- package/dist/widget-react-DE7AVrCo.js +5737 -0
- package/dist/widget-react-DE7AVrCo.js.map +1 -0
- package/dist/widget-react-DOX6j7_Q.js +30 -0
- package/dist/widget-react-DOX6j7_Q.js.map +1 -0
- package/dist/widget-react-DSw03RG7.js +262 -0
- package/dist/widget-react-DSw03RG7.js.map +1 -0
- package/dist/widget-react-Dew7YaLU.js +16 -0
- package/dist/widget-react-Dew7YaLU.js.map +1 -0
- package/dist/widget-react-DtOeNw5z.js +325 -0
- package/dist/widget-react-DtOeNw5z.js.map +1 -0
- package/dist/widget-react-DwL_rsx_.js +630 -0
- package/dist/widget-react-DwL_rsx_.js.map +1 -0
- package/dist/widget-react.d.ts +301 -0
- package/dist/widget-react.js +22285 -0
- package/dist/widget-react.js.map +1 -0
- package/package.json +41 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-react-CDPzwV1i.js","names":["ok","stringify","emptyOptions","empty","normalize","types","normalize","html","svg","cap","normalize","html","htmlBase","svgBase","point","position","point","own","html","one","root","text","commas","spaces","name","isIdentifierName","emptyOptions","toString","own","content","document","exit","previous","definition","thematicBreak","list","tokenizeIndent","thematicBreak","flow","string","text","document","list","definition","thematicBreak","text","resolveText","defaultConstructs","content","document","flow","string","text","own","toString","blockquote","hardBreak","code","emphasis","footnoteReference","heading","html","imageReference","image","inlineCode","linkReference","link","listItem","list","paragraph","root","strong","text","thematicBreak","hardBreak","serialize","serialize","structuredClone","own","emptyOptions","defaultHandlers","structuredClone","position","wrap","assertPath","isUint8Array","isPlainObj","escape","map","code","toString","toString","text","defaultHandlers","defaultHandlers","react_1","isTag","Text","Comment","CDATA","isTagRaw","Text","Comment","Element","Document","ProcessingInstruction","defaultOptions","Document","Element","Text","Comment","ProcessingInstruction","HTMLReactParser"],"sources":["../node_modules/lucide-react/dist/esm/icons/globe.mjs","../lib/detect-html.ts","../lib/graphql/generated/types.ts","../lib/use-article-title-sink.ts","../lib/use-demo-translator.ts","../node_modules/devlop/lib/default.js","../node_modules/comma-separated-tokens/index.js","../node_modules/estree-util-is-identifier-name/lib/index.js","../node_modules/hast-util-whitespace/lib/index.js","../node_modules/property-information/lib/util/schema.js","../node_modules/property-information/lib/util/merge.js","../node_modules/property-information/lib/normalize.js","../node_modules/property-information/lib/util/info.js","../node_modules/property-information/lib/util/types.js","../node_modules/property-information/lib/util/defined-info.js","../node_modules/property-information/lib/util/create.js","../node_modules/property-information/lib/aria.js","../node_modules/property-information/lib/util/case-sensitive-transform.js","../node_modules/property-information/lib/util/case-insensitive-transform.js","../node_modules/property-information/lib/html.js","../node_modules/property-information/lib/svg.js","../node_modules/property-information/lib/xlink.js","../node_modules/property-information/lib/xmlns.js","../node_modules/property-information/lib/xml.js","../node_modules/property-information/lib/hast-to-react.js","../node_modules/property-information/lib/find.js","../node_modules/property-information/index.js","../node_modules/space-separated-tokens/index.js","../node_modules/inline-style-parser/cjs/index.js","../node_modules/style-to-object/cjs/index.js","../node_modules/style-to-js/cjs/utilities.js","../node_modules/style-to-js/cjs/index.js","../node_modules/unist-util-position/lib/index.js","../node_modules/unist-util-stringify-position/lib/index.js","../node_modules/vfile-message/lib/index.js","../node_modules/hast-util-to-jsx-runtime/lib/index.js","../node_modules/html-url-attributes/lib/index.js","../node_modules/mdast-util-to-string/lib/index.js","../node_modules/character-entities/index.js","../node_modules/decode-named-character-reference/index.js","../node_modules/micromark-util-chunked/index.js","../node_modules/micromark-util-combine-extensions/index.js","../node_modules/micromark-util-decode-numeric-character-reference/index.js","../node_modules/micromark-util-normalize-identifier/index.js","../node_modules/micromark-util-character/index.js","../node_modules/micromark-util-sanitize-uri/index.js","../node_modules/micromark-factory-space/index.js","../node_modules/micromark/lib/initialize/content.js","../node_modules/micromark/lib/initialize/document.js","../node_modules/micromark-util-classify-character/index.js","../node_modules/micromark-util-resolve-all/index.js","../node_modules/micromark-core-commonmark/lib/attention.js","../node_modules/micromark-core-commonmark/lib/autolink.js","../node_modules/micromark-core-commonmark/lib/blank-line.js","../node_modules/micromark-core-commonmark/lib/block-quote.js","../node_modules/micromark-core-commonmark/lib/character-escape.js","../node_modules/micromark-core-commonmark/lib/character-reference.js","../node_modules/micromark-core-commonmark/lib/code-fenced.js","../node_modules/micromark-core-commonmark/lib/code-indented.js","../node_modules/micromark-core-commonmark/lib/code-text.js","../node_modules/micromark-util-subtokenize/lib/splice-buffer.js","../node_modules/micromark-util-subtokenize/index.js","../node_modules/micromark-core-commonmark/lib/content.js","../node_modules/micromark-factory-destination/index.js","../node_modules/micromark-factory-label/index.js","../node_modules/micromark-factory-title/index.js","../node_modules/micromark-factory-whitespace/index.js","../node_modules/micromark-core-commonmark/lib/definition.js","../node_modules/micromark-core-commonmark/lib/hard-break-escape.js","../node_modules/micromark-core-commonmark/lib/heading-atx.js","../node_modules/micromark-util-html-tag-name/index.js","../node_modules/micromark-core-commonmark/lib/html-flow.js","../node_modules/micromark-core-commonmark/lib/html-text.js","../node_modules/micromark-core-commonmark/lib/label-end.js","../node_modules/micromark-core-commonmark/lib/label-start-image.js","../node_modules/micromark-core-commonmark/lib/label-start-link.js","../node_modules/micromark-core-commonmark/lib/line-ending.js","../node_modules/micromark-core-commonmark/lib/thematic-break.js","../node_modules/micromark-core-commonmark/lib/list.js","../node_modules/micromark-core-commonmark/lib/setext-underline.js","../node_modules/micromark/lib/initialize/flow.js","../node_modules/micromark/lib/initialize/text.js","../node_modules/micromark/lib/constructs.js","../node_modules/micromark/lib/create-tokenizer.js","../node_modules/micromark/lib/parse.js","../node_modules/micromark/lib/postprocess.js","../node_modules/micromark/lib/preprocess.js","../node_modules/micromark-util-decode-string/index.js","../node_modules/mdast-util-from-markdown/lib/index.js","../node_modules/remark-parse/lib/index.js","../node_modules/mdast-util-to-hast/lib/handlers/blockquote.js","../node_modules/mdast-util-to-hast/lib/handlers/break.js","../node_modules/mdast-util-to-hast/lib/handlers/code.js","../node_modules/mdast-util-to-hast/lib/handlers/delete.js","../node_modules/mdast-util-to-hast/lib/handlers/emphasis.js","../node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js","../node_modules/mdast-util-to-hast/lib/handlers/heading.js","../node_modules/mdast-util-to-hast/lib/handlers/html.js","../node_modules/mdast-util-to-hast/lib/revert.js","../node_modules/mdast-util-to-hast/lib/handlers/image-reference.js","../node_modules/mdast-util-to-hast/lib/handlers/image.js","../node_modules/mdast-util-to-hast/lib/handlers/inline-code.js","../node_modules/mdast-util-to-hast/lib/handlers/link-reference.js","../node_modules/mdast-util-to-hast/lib/handlers/link.js","../node_modules/mdast-util-to-hast/lib/handlers/list-item.js","../node_modules/mdast-util-to-hast/lib/handlers/list.js","../node_modules/mdast-util-to-hast/lib/handlers/paragraph.js","../node_modules/mdast-util-to-hast/lib/handlers/root.js","../node_modules/mdast-util-to-hast/lib/handlers/strong.js","../node_modules/mdast-util-to-hast/lib/handlers/table.js","../node_modules/mdast-util-to-hast/lib/handlers/table-row.js","../node_modules/mdast-util-to-hast/lib/handlers/table-cell.js","../node_modules/trim-lines/index.js","../node_modules/mdast-util-to-hast/lib/handlers/text.js","../node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js","../node_modules/mdast-util-to-hast/lib/handlers/index.js","../node_modules/@ungap/structured-clone/esm/deserialize.js","../node_modules/@ungap/structured-clone/esm/serialize.js","../node_modules/@ungap/structured-clone/esm/index.js","../node_modules/mdast-util-to-hast/lib/footer.js","../node_modules/unist-util-is/lib/index.js","../node_modules/unist-util-visit-parents/lib/color.js","../node_modules/unist-util-visit-parents/lib/index.js","../node_modules/unist-util-visit/lib/index.js","../node_modules/mdast-util-to-hast/lib/state.js","../node_modules/mdast-util-to-hast/lib/index.js","../node_modules/remark-rehype/lib/index.js","../node_modules/bail/index.js","../node_modules/extend/index.js","../node_modules/is-plain-obj/index.js","../node_modules/trough/lib/index.js","../node_modules/vfile/lib/minpath.browser.js","../node_modules/vfile/lib/minproc.browser.js","../node_modules/vfile/lib/minurl.shared.js","../node_modules/vfile/lib/minurl.browser.js","../node_modules/vfile/lib/index.js","../node_modules/unified/lib/callable-instance.js","../node_modules/unified/lib/index.js","../node_modules/react-markdown/lib/index.js","../node_modules/ccount/index.js","../node_modules/escape-string-regexp/index.js","../node_modules/mdast-util-find-and-replace/lib/index.js","../node_modules/mdast-util-gfm-autolink-literal/lib/index.js","../node_modules/mdast-util-gfm-footnote/lib/index.js","../node_modules/mdast-util-gfm-strikethrough/lib/index.js","../node_modules/markdown-table/index.js","../node_modules/mdast-util-to-markdown/lib/handle/blockquote.js","../node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js","../node_modules/mdast-util-to-markdown/lib/handle/break.js","../node_modules/longest-streak/index.js","../node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js","../node_modules/mdast-util-to-markdown/lib/util/check-fence.js","../node_modules/mdast-util-to-markdown/lib/handle/code.js","../node_modules/mdast-util-to-markdown/lib/util/check-quote.js","../node_modules/mdast-util-to-markdown/lib/handle/definition.js","../node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js","../node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js","../node_modules/mdast-util-to-markdown/lib/util/encode-info.js","../node_modules/mdast-util-to-markdown/lib/handle/emphasis.js","../node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js","../node_modules/mdast-util-to-markdown/lib/handle/heading.js","../node_modules/mdast-util-to-markdown/lib/handle/html.js","../node_modules/mdast-util-to-markdown/lib/handle/image.js","../node_modules/mdast-util-to-markdown/lib/handle/image-reference.js","../node_modules/mdast-util-to-markdown/lib/handle/inline-code.js","../node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js","../node_modules/mdast-util-to-markdown/lib/handle/link.js","../node_modules/mdast-util-to-markdown/lib/handle/link-reference.js","../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js","../node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js","../node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js","../node_modules/mdast-util-to-markdown/lib/util/check-rule.js","../node_modules/mdast-util-to-markdown/lib/handle/list.js","../node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js","../node_modules/mdast-util-to-markdown/lib/handle/list-item.js","../node_modules/mdast-util-to-markdown/lib/handle/paragraph.js","../node_modules/mdast-util-phrasing/lib/index.js","../node_modules/mdast-util-to-markdown/lib/handle/root.js","../node_modules/mdast-util-to-markdown/lib/util/check-strong.js","../node_modules/mdast-util-to-markdown/lib/handle/strong.js","../node_modules/mdast-util-to-markdown/lib/handle/text.js","../node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js","../node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js","../node_modules/mdast-util-to-markdown/lib/handle/index.js","../node_modules/mdast-util-gfm-table/lib/index.js","../node_modules/mdast-util-gfm-task-list-item/lib/index.js","../node_modules/mdast-util-gfm/lib/index.js","../node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js","../node_modules/micromark-extension-gfm-footnote/lib/syntax.js","../node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js","../node_modules/micromark-extension-gfm-table/lib/edit-map.js","../node_modules/micromark-extension-gfm-table/lib/infer.js","../node_modules/micromark-extension-gfm-table/lib/syntax.js","../node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js","../node_modules/micromark-extension-gfm/index.js","../node_modules/remark-gfm/lib/index.js","../lib/article-prose.ts","../node_modules/html-dom-parser/lib/client/html-to-dom.js","../node_modules/react-property/lib/possibleStandardNamesOptimized.js","../node_modules/react-property/lib/index.js","../node_modules/html-react-parser/lib/utilities.js","../node_modules/html-react-parser/lib/attributes-to-props.js","../node_modules/domelementtype/dist/index.js","../node_modules/domhandler/dist/node.js","../node_modules/domhandler/dist/index.js","../node_modules/html-react-parser/lib/dom-to-react.js","../node_modules/html-react-parser/lib/index.js","../node_modules/html-react-parser/esm/index.mjs","../components/widget/article-html/blocks/table-of-contents.tsx","../components/widget/article-html/blocks/accordion-block.tsx","../components/widget/article-html/build-options/accordion.tsx","../components/widget/article-html/build-options/custom-element.tsx","../lib/article-toc.ts","../components/widget/article-html/extract-text.ts","../components/widget/article-html/build-options/heading.ts","../components/widget/article-html/build-options/image.tsx","../components/widget/article-html/build-options/link.tsx","../components/widget/article-html/build-options/table.tsx","../components/widget/article-html/blocks/tabs-block.tsx","../components/widget/article-html/build-options/tabs.tsx","../components/widget/article-html/build-options.ts","../components/widget/article-html/index.tsx","../components/widget/article-body.tsx","../components/widget/language-selector/helpers.ts","../components/widget/language-selector/index.tsx","../lib/graphql/queries/generated/reactions.generated.tsx","../components/widget/reaction-bar.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.14.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\", key: \"13o1zl\" }],\n [\"path\", { d: \"M2 12h20\", key: \"9i4pu4\" }]\n];\nconst Globe = createLucideIcon(\"globe\", __iconNode);\n\nexport { __iconNode, Globe as default };\n//# sourceMappingURL=globe.mjs.map\n","/**\n * Returns `true` when `content` looks like HTML (TipTap-authored,\n * RSS `<content:encoded>`) rather than markdown.\n *\n * The widget's article surfaces don't trust the BE-side `bodyFormat`\n * field exclusively — native posts authored in the operator's\n * TipTap editor always produce HTML, but historically saved as\n * `bodyFormat: 'markdown'` (the default). RSS ingest correctly\n * stamps `'html'` for `<content:encoded>` items but `'markdown'`\n * for `description`-only feeds, even when the description is HTML.\n *\n * Heuristic: a leading `<` followed by a tag-letter opens an\n * element. We tolerate leading whitespace + `<!doctype>` / comments\n * so RSS-cleaned HTML still trips the detector. False negatives\n * (HTML that starts with raw text before any tag) are rare and\n * harmless — ReactMarkdown's `remark-gfm` renders inline tags\n * fine, just no custom `<details>` / `<div data-type=tabs>` magic.\n */\nexport function looksLikeHtml(content: string | null | undefined): boolean {\n if (!content) return false;\n const sample = content.trimStart().slice(0, 200);\n // Tag opener — `<` followed by a tag letter, OR a doctype / comment\n // / cdata that we'd still want to treat as HTML.\n return /^<(?:[a-z!][^>]*|!--)/i.test(sample);\n}\n","export type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n DateTime: { input: unknown; output: unknown; }\n JSON: { input: unknown; output: unknown; }\n Upload: { input: unknown; output: unknown; }\n};\n\nexport type AiAgentCardData = {\n __typename?: 'AIAgentCardData';\n buttons?: Maybe<Array<ButtonOption>>;\n /** System prompt / instructions for the agent */\n input?: Maybe<Scalars['String']['output']>;\n /** Max conversation turns before force-exit (default: 50) */\n maxTurns?: Maybe<Scalars['Float']['output']>;\n /** Memory settings: { type: \"conversation\" | \"none\", lookbackHours?: number } */\n memory?: Maybe<Scalars['JSON']['output']>;\n};\n\nexport type AiAssistant = {\n __typename?: 'AIAssistant';\n _id: Scalars['String']['output'];\n /** Assistant context configuration */\n context?: Maybe<AiAssistantContext>;\n /** Creation timestamp */\n createdAt: Scalars['DateTime']['output'];\n /** User who created this assistant */\n createdBy: Scalars['String']['output'];\n /** Custom model name (required when model is CUSTOM) */\n customModel?: Maybe<Scalars['String']['output']>;\n /** Integration for AI provider */\n integration?: Maybe<Integration>;\n /** Whether this assistant is active and can be used */\n isActive: Scalars['Boolean']['output'];\n /** Whether this is the default assistant for the organization */\n isDefault: Scalars['Boolean']['output'];\n /** Whether this is a system-provided AI assistant (platform-managed, usage-tracked) */\n isSystem: Scalars['Boolean']['output'];\n /** Whether this assistant has valid configuration (integration and model present) */\n isValid: Scalars['Boolean']['output'];\n /** Knowledge base media file for this assistant */\n knowledgeBase?: Maybe<Media>;\n /** AI model configuration */\n model?: Maybe<ModelInfo>;\n /** Per-purpose model configuration (chat, image, audio, vision) */\n modelSlots?: Maybe<ModelSlots>;\n /** Human-readable name for the assistant */\n name: Scalars['String']['output'];\n /** Organization this assistant belongs to */\n organisationId: Scalars['String']['output'];\n /** Advanced AI settings */\n settings?: Maybe<AiAssistantSettings>;\n /** Last update timestamp */\n updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type AiAssistantContext = {\n __typename?: 'AIAssistantContext';\n /** Description of what users can do in this chat service */\n capabilities?: Maybe<Scalars['String']['output']>;\n /** Assistant identity and role description */\n identity?: Maybe<Scalars['String']['output']>;\n /** Additional instructions for the assistant */\n instructions?: Maybe<Scalars['String']['output']>;\n /** Language the assistant should use */\n language?: Maybe<Scalars['String']['output']>;\n /** Main objective for the assistant */\n objective?: Maybe<Scalars['String']['output']>;\n /** Tone of voice for the assistant */\n tone?: Maybe<Scalars['String']['output']>;\n};\n\nexport type AiAssistantContextInput = {\n /** Description of what users can do in this chat service */\n capabilities: Scalars['String']['input'];\n /** Assistant identity and role description */\n identity: Scalars['String']['input'];\n /** Additional instructions for the assistant */\n instructions?: InputMaybe<Scalars['String']['input']>;\n /** Language the assistant should use */\n language: Scalars['String']['input'];\n /** Main objective for the assistant */\n objective: Scalars['String']['input'];\n /** Tone of voice for the assistant */\n tone: Scalars['String']['input'];\n};\n\nexport type AiAssistantHistoryArgs = {\n assistantId: Scalars['String']['input'];\n /** Cursor — return rows strictly older than this createdAt. Pass the previous page's `nextCursor`. */\n before?: InputMaybe<Scalars['DateTime']['input']>;\n /** Page size (default 50, max 200). */\n limit?: InputMaybe<Scalars['Int']['input']>;\n requestType?: InputMaybe<AiRequestType>;\n status?: InputMaybe<AiRequestStatus>;\n};\n\nexport type AiAssistantHistoryPage = {\n __typename?: 'AIAssistantHistoryPage';\n hasMore: Scalars['Boolean']['output'];\n items: Array<AiRequestLog>;\n /** Oldest createdAt in this page. Pass back as `before` to fetch the next older page. */\n nextCursor?: Maybe<Scalars['DateTime']['output']>;\n /** Total rows matching the filter (not capped by the page window). */\n total: Scalars['Int']['output'];\n};\n\nexport type AiAssistantSettings = {\n __typename?: 'AIAssistantSettings';\n /** Frequency penalty (-2.0 to 2.0) */\n frequencyPenalty?: Maybe<Scalars['Float']['output']>;\n /** Maximum tokens for responses */\n maxTokens?: Maybe<Scalars['Float']['output']>;\n /** Presence penalty (-2.0 to 2.0) */\n presencePenalty?: Maybe<Scalars['Float']['output']>;\n /** Temperature setting (0.0 to 2.0) */\n temperature?: Maybe<Scalars['Float']['output']>;\n /** Top-p setting for nucleus sampling */\n topP?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type AiAssistantSettingsInput = {\n /** Frequency penalty (-2.0 to 2.0) */\n frequencyPenalty?: InputMaybe<Scalars['Float']['input']>;\n /** Maximum tokens for responses (1-4000) */\n maxTokens?: InputMaybe<Scalars['Float']['input']>;\n /** Presence penalty (-2.0 to 2.0) */\n presencePenalty?: InputMaybe<Scalars['Float']['input']>;\n /** Temperature setting (0.0 to 2.0) */\n temperature?: InputMaybe<Scalars['Float']['input']>;\n /** Top-p setting for nucleus sampling (0.0 to 1.0) */\n topP?: InputMaybe<Scalars['Float']['input']>;\n};\n\nexport type AiClassificationCardData = {\n __typename?: 'AIClassificationCardData';\n buttons?: Maybe<Array<ButtonOption>>;\n /** Custom prompt to guide classification (auto-generated from button labels if not provided) */\n input?: Maybe<Scalars['String']['output']>;\n /** Input type to classify: auto, text, image, audio, video */\n inputType?: Maybe<Scalars['String']['output']>;\n};\n\nexport type AiOrganisationHistoryArgs = {\n before?: InputMaybe<Scalars['DateTime']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n requestType?: InputMaybe<AiRequestType>;\n status?: InputMaybe<AiRequestStatus>;\n};\n\nexport type AiOrganisationHistoryPage = {\n __typename?: 'AIOrganisationHistoryPage';\n hasMore: Scalars['Boolean']['output'];\n items: Array<AiRequestLog>;\n nextCursor?: Maybe<Scalars['DateTime']['output']>;\n total: Scalars['Int']['output'];\n};\n\n/** Why the executed provider/model differs from the assistant primary */\nexport enum AiProviderSwitchReason {\n FALLBACK_AFTER_FAILURE = 'FALLBACK_AFTER_FAILURE',\n IMAGE_GENERATION = 'IMAGE_GENERATION',\n TEXT_TO_SPEECH = 'TEXT_TO_SPEECH',\n TRANSCRIPTION = 'TRANSCRIPTION',\n VISION_UNSUPPORTED = 'VISION_UNSUPPORTED'\n}\n\nexport type AiRequestLog = {\n __typename?: 'AIRequestLog';\n _id: Scalars['String']['output'];\n aiOps?: Maybe<Scalars['Float']['output']>;\n assistantId: Scalars['String']['output'];\n chatId?: Maybe<Scalars['String']['output']>;\n createdAt: Scalars['DateTime']['output'];\n durationMs: Scalars['Int']['output'];\n errorCode?: Maybe<Scalars['String']['output']>;\n errorMessage?: Maybe<Scalars['String']['output']>;\n executedBySystem: Scalars['Boolean']['output'];\n executedModel: Scalars['String']['output'];\n executedProvider: Scalars['String']['output'];\n messageId?: Maybe<Scalars['String']['output']>;\n organisationId: Scalars['String']['output'];\n peopleId?: Maybe<Scalars['String']['output']>;\n primaryModel: Scalars['String']['output'];\n primaryProvider: Scalars['String']['output'];\n requestType: AiRequestType;\n status: AiRequestStatus;\n switchReason?: Maybe<AiProviderSwitchReason>;\n tokenCost?: Maybe<Scalars['Float']['output']>;\n tokensInput?: Maybe<Scalars['Int']['output']>;\n tokensOutput?: Maybe<Scalars['Int']['output']>;\n tokensTotal?: Maybe<Scalars['Int']['output']>;\n triggeredBy?: Maybe<Scalars['String']['output']>;\n updatedAt: Scalars['DateTime']['output'];\n};\n\n/** Terminal status of an AI request */\nexport enum AiRequestStatus {\n CREDIT_EXHAUSTED = 'CREDIT_EXHAUSTED',\n FAILURE = 'FAILURE',\n INVALID_KEY = 'INVALID_KEY',\n QUOTA_EXCEEDED = 'QUOTA_EXCEEDED',\n RATE_LIMITED = 'RATE_LIMITED',\n SUCCESS = 'SUCCESS'\n}\n\n/** Type of AI work performed in this request */\nexport enum AiRequestType {\n CHAT = 'CHAT',\n EMBEDDING = 'EMBEDDING',\n IMAGE_EDIT = 'IMAGE_EDIT',\n IMAGE_GENERATION = 'IMAGE_GENERATION',\n TEXT_TO_SPEECH = 'TEXT_TO_SPEECH',\n TRANSCRIPTION = 'TRANSCRIPTION',\n TRANSLATION = 'TRANSLATION',\n VISION = 'VISION'\n}\n\nexport type AiTextCardData = {\n __typename?: 'AITextCardData';\n /** AI Assistant ID to use (optional - uses default if not provided) */\n assistantId?: Maybe<Scalars['String']['output']>;\n /** Input template with variables that will be sent to AI assistant */\n input?: Maybe<Scalars['String']['output']>;\n /** Next card ID to navigate to if AI assistant is invalid or returns an error */\n onError?: Maybe<Scalars['String']['output']>;\n};\n\nexport type AiTextToSpeechCardData = {\n __typename?: 'AITextToSpeechCardData';\n /** Text template to convert to speech (supports variables) */\n input?: Maybe<Scalars['String']['output']>;\n /** Style instructions for TTS (for models that support it) */\n instructions?: Maybe<Scalars['String']['output']>;\n /** Speech speed: 0.25 - 4.0 (default: 1.0) */\n speed?: Maybe<Scalars['Float']['output']>;\n /** TTS voice: alloy, echo, fable, onyx, nova, shimmer */\n voice?: Maybe<Scalars['String']['output']>;\n};\n\nexport type AccountDeletionPreCheckResponse = {\n __typename?: 'AccountDeletionPreCheckResponse';\n canDelete: Scalars['Boolean']['output'];\n message: Scalars['String']['output'];\n ownedOrganisations: Array<OwnedOrganisationInfo>;\n};\n\nexport type ActiveFlowExecution = {\n __typename?: 'ActiveFlowExecution';\n /** Execution context ID */\n executionId?: Maybe<Scalars['String']['output']>;\n /** Flow MongoDB ID */\n flowId: Scalars['String']['output'];\n /** Human-readable flow title */\n flowTitle: Scalars['String']['output'];\n /** Who started the flow */\n initiator?: Maybe<FlowInitiator>;\n /** Operator who started the flow (when initiator is OPERATOR) */\n operator?: Maybe<User>;\n /** When the flow execution started */\n startedAt: Scalars['DateTime']['output'];\n};\n\nexport type AddTicketCommentInput = {\n content: Scalars['String']['input'];\n /** Internal note only visible to MASTER org (MASTER org only) */\n isInternal?: InputMaybe<Scalars['Boolean']['input']>;\n /** Pre-uploaded media IDs */\n mediaIds?: InputMaybe<Array<Scalars['String']['input']>>;\n ticketId: Scalars['String']['input'];\n};\n\nexport type Address = {\n __typename?: 'Address';\n city?: Maybe<Scalars['String']['output']>;\n country: Scalars['String']['output'];\n postalCode?: Maybe<Scalars['String']['output']>;\n region?: Maybe<Scalars['String']['output']>;\n streetLine1?: Maybe<Scalars['String']['output']>;\n streetLine2?: Maybe<Scalars['String']['output']>;\n};\n\nexport type AddressInput = {\n city?: InputMaybe<Scalars['String']['input']>;\n country: Scalars['String']['input'];\n postalCode?: InputMaybe<Scalars['String']['input']>;\n region?: InputMaybe<Scalars['String']['input']>;\n streetLine1?: InputMaybe<Scalars['String']['input']>;\n streetLine2?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Web messenger AI auto-reply fallback mode */\nexport enum AiAutoReplyMode {\n /** No AI fallback; unmatched messages queue for a human operator */\n DISABLED = 'DISABLED',\n /** Use the organisation-level default assistant (the common case) */\n ORG_DEFAULT = 'ORG_DEFAULT',\n /** Use a specific assistant just for this widget (per-channel override) */\n SPECIFIC = 'SPECIFIC'\n}\n\n/** Date range for analytics queries */\nexport enum AnalyticsDateRange {\n ALL_TIME = 'ALL_TIME',\n LAST_7_DAYS = 'LAST_7_DAYS',\n LAST_30_DAYS = 'LAST_30_DAYS',\n LAST_90_DAYS = 'LAST_90_DAYS',\n THIS_YEAR = 'THIS_YEAR'\n}\n\n/** Shared analytics filter: date range + plan tier */\nexport type AnalyticsFilterInput = {\n /** Start of date range (ISO 8601) */\n from?: InputMaybe<Scalars['String']['input']>;\n /** Filter by plan tier: FREE, BASIC, STANDARD, PRO, ENTERPRISE */\n planTier?: InputMaybe<PlanTier>;\n /** End of date range (ISO 8601) */\n to?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type AppPermissions = {\n __typename?: 'AppPermissions';\n /** Whether the current user is the organisation owner */\n isOwner: Scalars['Boolean']['output'];\n /** Limits and features based on organisation plan */\n plan: PlanLimits;\n /** Permissions based on user role in the organisation */\n role: RolePermissions;\n /** Whether to show upgrade prompts (true if user is owner) */\n shouldShowUpgradeOption: Scalars['Boolean']['output'];\n /** Current usage counts for limit-based features */\n usage: CurrentUsage;\n};\n\nexport type AppliedDiscountDetails = {\n __typename?: 'AppliedDiscountDetails';\n amountOff?: Maybe<Scalars['Float']['output']>;\n currency?: Maybe<Scalars['String']['output']>;\n duration: DiscountDurationType;\n durationInMonths?: Maybe<Scalars['Float']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n percentOff?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type AppliedFilter = {\n __typename?: 'AppliedFilter';\n key: Scalars['String']['output'];\n operator: Scalars['String']['output'];\n value: Scalars['String']['output'];\n};\n\nexport type ApplyDiscountOutput = {\n __typename?: 'ApplyDiscountOutput';\n /** Details of the applied discount */\n discount?: Maybe<AppliedDiscountDetails>;\n message: Scalars['String']['output'];\n success: Scalars['Boolean']['output'];\n};\n\nexport type ApprovalFilterInput = {\n cursor?: InputMaybe<Scalars['String']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n /** Filter by requesting organisation ID */\n requestedById?: InputMaybe<Scalars['String']['input']>;\n status?: InputMaybe<Array<TemplateApprovalStatus>>;\n};\n\nexport type ApprovalHistoryEntry = {\n __typename?: 'ApprovalHistoryEntry';\n by?: Maybe<User>;\n date: Scalars['DateTime']['output'];\n notes?: Maybe<Scalars['String']['output']>;\n status: Scalars['String']['output'];\n};\n\nexport type AssignOperatorCardData = {\n __typename?: 'AssignOperatorCardData';\n /** Roles eligible for auto-assignment, in priority order. The array order defines escalation tiers. Defaults to [AGENT] if not provided. Example: [AGENT, EDITOR, ADMIN, OWNER] — try agents first, then editors, etc. */\n allowedRoles?: Maybe<Array<Role>>;\n /** Max number of active assigned chats before an operator is considered overloaded and the system escalates to the next role tier. Defaults to 10. */\n maxChatsPerOperator?: Maybe<Scalars['Float']['output']>;\n /** Assignment mode: \"auto\" (smart auto-assign) or \"specific\" (specific operator) */\n mode?: Maybe<Scalars['String']['output']>;\n /** Operator (User) ID. In \"specific\" mode — the operator to assign. In \"auto\" mode — fallback operator if no one is available via smart assign. */\n operatorId?: Maybe<Scalars['String']['output']>;\n};\n\n/** Who initiated the chat assignment */\nexport enum AssignmentInitiator {\n OPERATOR = 'OPERATOR',\n SYSTEM = 'SYSTEM'\n}\n\nexport type AsyncCardConfig = {\n __typename?: 'AsyncCardConfig';\n /** Default/fallback card ID when no other conditions match. Can be used by conditional logic or as a safe fallback. */\n defaultNextCardId?: Maybe<Scalars['String']['output']>;\n /** Card ID to navigate to when an error occurs during execution. Only used when runInBackground is false. */\n nextCardIdOnError?: Maybe<Scalars['String']['output']>;\n /** Card ID to navigate to when a user interaction event occurs. Used by WA catalog/product cards for order/interaction branching. */\n nextCardIdOnInteraction?: Maybe<Scalars['String']['output']>;\n /** Card ID to navigate to when operation times out. Used for cards with timeout behavior (e.g., FETCH_CARD). */\n nextCardIdOnTimeout?: Maybe<Scalars['String']['output']>;\n /** If true (default), card executes in background and flow continues immediately. If false, flow waits for operation to complete before continuing. */\n runInBackground?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type AsyncCardConfigInput = {\n /** Default/fallback card ID when no other conditions match. Can be used by conditional logic or as a safe fallback. */\n defaultNextCardId?: InputMaybe<Scalars['String']['input']>;\n /** Card ID to navigate to when an error occurs during execution. Only used when runInBackground is false. */\n nextCardIdOnError?: InputMaybe<Scalars['String']['input']>;\n /** Card ID to navigate to when a user interaction event occurs. Used by WA catalog/product cards for order/interaction branching. */\n nextCardIdOnInteraction?: InputMaybe<Scalars['String']['input']>;\n /** Card ID to navigate to when operation times out. Used for cards with timeout behavior (e.g., FETCH_CARD). */\n nextCardIdOnTimeout?: InputMaybe<Scalars['String']['input']>;\n /** If true (default), card executes in background and flow continues immediately. If false, flow waits for operation to complete before continuing. */\n runInBackground?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type AudienceFilterCondition = {\n __typename?: 'AudienceFilterCondition';\n fieldKey: Scalars['String']['output'];\n operator: RuleOperator;\n value: Scalars['String']['output'];\n};\n\nexport type AudienceFilterConditionInput = {\n fieldKey: Scalars['String']['input'];\n operator: RuleOperator;\n value: Scalars['String']['input'];\n};\n\n/** Authentication provider used for login */\nexport enum AuthProvider {\n APPLE = 'APPLE',\n FACEBOOK = 'FACEBOOK',\n GITHUB = 'GITHUB',\n GOOGLE = 'GOOGLE',\n MICROSOFT = 'MICROSOFT',\n MOCK = 'MOCK',\n PASSKEY = 'PASSKEY',\n SSO = 'SSO'\n}\n\n/** WebAuthn authenticator transport types */\nexport enum AuthenticatorTransport {\n BLE = 'BLE',\n HYBRID = 'HYBRID',\n INTERNAL = 'INTERNAL',\n NFC = 'NFC',\n USB = 'USB'\n}\n\nexport type BigQueryConfigInput = {\n /** Service account JSON credentials (contains project_id) */\n credentials: Scalars['String']['input'];\n datasetId: Scalars['String']['input'];\n tableId: Scalars['String']['input'];\n};\n\nexport type BillingPeriod = {\n __typename?: 'BillingPeriod';\n daysRemaining: Scalars['Float']['output'];\n end: Scalars['DateTime']['output'];\n start: Scalars['DateTime']['output'];\n};\n\nexport type BillingPeriodUsage = {\n __typename?: 'BillingPeriodUsage';\n _id: Scalars['String']['output'];\n aiLimit: Scalars['Int']['output'];\n aiPercentage: Scalars['Float']['output'];\n aiUsed: Scalars['Int']['output'];\n createdAt: Scalars['DateTime']['output'];\n instanceId?: Maybe<Scalars['String']['output']>;\n opsLimit: Scalars['Int']['output'];\n opsPercentage: Scalars['Float']['output'];\n opsUsed: Scalars['Int']['output'];\n /** Resolved organisation (populated at query time) */\n organisation?: Maybe<Organisation>;\n organisationId: Scalars['String']['output'];\n periodEnd: Scalars['DateTime']['output'];\n periodStart: Scalars['DateTime']['output'];\n /** Resolved plan (populated at query time) */\n plan?: Maybe<Plan>;\n resetTrigger: UsageResetTrigger;\n stripeInvoiceId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type BillingState = {\n __typename?: 'BillingState';\n billingPeriod?: Maybe<BillingPeriod>;\n canDowngrade: Scalars['Boolean']['output'];\n canUpgrade: Scalars['Boolean']['output'];\n card?: Maybe<CardInfo>;\n cooldown: PlanSwitchCooldown;\n currentPlan: PlanSummary;\n /** Active discount/coupon applied to subscription */\n discount?: Maybe<DiscountInfo>;\n hasPaymentMethod: Scalars['Boolean']['output'];\n scheduledChange?: Maybe<ScheduledPlanChange>;\n status: BillingStatus;\n stripeCustomerId?: Maybe<Scalars['String']['output']>;\n stripeSubscriptionId?: Maybe<Scalars['String']['output']>;\n trial: TrialInfo;\n};\n\nexport enum BillingStatus {\n ACTIVE = 'ACTIVE',\n CANCELED = 'CANCELED',\n FREE = 'FREE',\n PAST_DUE = 'PAST_DUE',\n SUSPENDED = 'SUSPENDED',\n TRIALING = 'TRIALING'\n}\n\nexport type Bot = {\n __typename?: 'Bot';\n _id?: Maybe<Scalars['String']['output']>;\n botId?: Maybe<Scalars['Float']['output']>;\n canConnectToBusiness?: Maybe<Scalars['Boolean']['output']>;\n canJoinGroups?: Maybe<Scalars['Boolean']['output']>;\n canReadAllGroupMessages?: Maybe<Scalars['Boolean']['output']>;\n createdAt?: Maybe<Scalars['DateTime']['output']>;\n firstName?: Maybe<Scalars['String']['output']>;\n hasMainWebApp?: Maybe<Scalars['Boolean']['output']>;\n /** Integration ID that holds the bot token */\n integration?: Maybe<Scalars['String']['output']>;\n isBot?: Maybe<Scalars['Boolean']['output']>;\n language?: Maybe<Scalars['String']['output']>;\n lastName?: Maybe<Scalars['String']['output']>;\n /** Organisation ID this bot belongs to */\n organisationId?: Maybe<Scalars['String']['output']>;\n supportInlineQueries?: Maybe<Scalars['Boolean']['output']>;\n type?: Maybe<Scalars['String']['output']>;\n updatedAt?: Maybe<Scalars['DateTime']['output']>;\n username?: Maybe<Scalars['String']['output']>;\n};\n\nexport type Broadcast = {\n __typename?: 'Broadcast';\n _id: Scalars['String']['output'];\n audienceFilter: Array<AudienceFilterCondition>;\n audienceSizeActual?: Maybe<Scalars['Int']['output']>;\n audienceSizeEstimate: Scalars['Int']['output'];\n contactIdsOverride?: Maybe<Array<Scalars['String']['output']>>;\n createdAt: Scalars['DateTime']['output'];\n createdBy?: Maybe<Scalars['String']['output']>;\n delivered: Scalars['Int']['output'];\n failed: Scalars['Int']['output'];\n failureReason?: Maybe<BroadcastFailureReason>;\n finishedAt?: Maybe<Scalars['DateTime']['output']>;\n flowId?: Maybe<Scalars['String']['output']>;\n integrationIds?: Maybe<Array<Scalars['String']['output']>>;\n name: Scalars['String']['output'];\n organisationId: Scalars['String']['output'];\n retryOfBroadcastId?: Maybe<Scalars['String']['output']>;\n scheduledAt: Scalars['DateTime']['output'];\n skipped: Scalars['Int']['output'];\n startedAt?: Maybe<Scalars['DateTime']['output']>;\n status: BroadcastStatus;\n templateRoutes?: Maybe<Array<TemplateRoute>>;\n timezone: Scalars['String']['output'];\n updatedAt: Scalars['DateTime']['output'];\n};\n\n/** Per-contact dispatch outcome for a broadcast */\nexport enum BroadcastDispatchStatus {\n DELIVERED = 'DELIVERED',\n FAILED = 'FAILED',\n SKIPPED = 'SKIPPED'\n}\n\n/** Why a broadcast transitioned to FAILED */\nexport enum BroadcastFailureReason {\n ALL_BATCHES_FAILED = 'ALL_BATCHES_FAILED',\n MISSED_WINDOW = 'MISSED_WINDOW',\n WORKER_STALLED = 'WORKER_STALLED'\n}\n\nexport type BroadcastHistoryArgs = {\n before?: InputMaybe<Scalars['DateTime']['input']>;\n broadcastId: Scalars['String']['input'];\n limit?: InputMaybe<Scalars['Int']['input']>;\n status?: InputMaybe<BroadcastDispatchStatus>;\n};\n\nexport type BroadcastHistoryEntry = {\n __typename?: 'BroadcastHistoryEntry';\n _id: Scalars['String']['output'];\n chatId?: Maybe<Scalars['String']['output']>;\n deliveredAt?: Maybe<Scalars['DateTime']['output']>;\n dispatchedAt: Scalars['DateTime']['output'];\n errorReason?: Maybe<Scalars['String']['output']>;\n peopleId: Scalars['String']['output'];\n sentAt?: Maybe<Scalars['DateTime']['output']>;\n status?: Maybe<BroadcastDispatchStatus>;\n};\n\nexport type BroadcastHistoryPage = {\n __typename?: 'BroadcastHistoryPage';\n hasMore: Scalars['Boolean']['output'];\n items: Array<BroadcastHistoryEntry>;\n nextCursor?: Maybe<Scalars['DateTime']['output']>;\n total: Scalars['Int']['output'];\n};\n\nexport type BroadcastListArgs = {\n before?: InputMaybe<Scalars['DateTime']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n status?: InputMaybe<BroadcastStatus>;\n};\n\nexport type BroadcastListPage = {\n __typename?: 'BroadcastListPage';\n hasMore: Scalars['Boolean']['output'];\n items: Array<Broadcast>;\n nextCursor?: Maybe<Scalars['DateTime']['output']>;\n total: Scalars['Int']['output'];\n};\n\n/** Lifecycle status of a broadcast */\nexport enum BroadcastStatus {\n CANCELLED = 'CANCELLED',\n COMPLETED = 'COMPLETED',\n FAILED = 'FAILED',\n SCHEDULED = 'SCHEDULED',\n SENDING = 'SENDING'\n}\n\nexport type ButtonCardData = {\n __typename?: 'ButtonCardData';\n buttons: Array<ButtonOption>;\n input?: Maybe<Scalars['String']['output']>;\n keyboardType?: Maybe<KeyboardButtonType>;\n media?: Maybe<Array<Media>>;\n};\n\nexport type ButtonOption = {\n __typename?: 'ButtonOption';\n _id: Scalars['String']['output'];\n /** Set to true for game buttons */\n callbackGame?: Maybe<Scalars['Boolean']['output']>;\n /** Game short name registered with @BotFather (required for tg_callback_game to actually launch a game) */\n gameShortName?: Maybe<Scalars['String']['output']>;\n /** Game URL to open when user clicks Play. Bot answers callback_query with this URL. */\n gameUrl?: Maybe<Scalars['String']['output']>;\n /** Button display text */\n label: Scalars['String']['output'];\n /** Login URL configuration for Telegram Login */\n loginUrl?: Maybe<FlowLoginUrlConfig>;\n /** Set to true for payment buttons (must be first button) */\n pay?: Maybe<Scalars['Boolean']['output']>;\n /** Payment invoice configuration for tg_pay buttons. Required for Telegram Payments to work. */\n paymentConfig?: Maybe<FlowPaymentConfig>;\n /** Phone number for WA phone call buttons (e.g., +1234567890) */\n phoneNumber?: Maybe<Scalars['String']['output']>;\n /** Poll type for request_poll buttons */\n pollType?: Maybe<PollButtonType>;\n /** Configuration for WA single product message */\n product?: Maybe<FlowWhatsAppProductConfig>;\n /** Configuration for WA multi-product message */\n productList?: Maybe<FlowWhatsAppProductListConfig>;\n /** Configuration for chat selection button */\n requestChat?: Maybe<FlowRequestChatConfig>;\n /** Set to true to request user contact (TG only) */\n requestContact?: Maybe<Scalars['Boolean']['output']>;\n /** Set to true to request user location (TG only) */\n requestLocation?: Maybe<Scalars['Boolean']['output']>;\n /** Configuration for user selection button */\n requestUsers?: Maybe<FlowRequestUsersConfig>;\n /** Inline query text for switch_inline type */\n switchInlineQuery?: Maybe<Scalars['String']['output']>;\n /** Switch inline query with chat picker */\n switchInlineQueryChosenChat?: Maybe<FlowSwitchInlineQueryChosenChatConfig>;\n /** Inline query text for current chat */\n switchInlineQueryCurrentChat?: Maybe<Scalars['String']['output']>;\n /** Button type — cross-platform (callback, url), Telegram-specific (tg_*), or WhatsApp-specific (wa_*) */\n type: Scalars['String']['output'];\n /** URL for url buttons (TG and WA cta_url) */\n url?: Maybe<Scalars['String']['output']>;\n /** Callback data or next card ID */\n value?: Maybe<Scalars['String']['output']>;\n /** Web App configuration for Mini Apps */\n webApp?: Maybe<FlowWebAppConfig>;\n /** Configuration for WA Flows button */\n whatsappFlow?: Maybe<FlowWhatsAppFlowConfig>;\n};\n\nexport type ButtonOptionInput = {\n _id?: InputMaybe<Scalars['String']['input']>;\n callbackGame?: InputMaybe<Scalars['Boolean']['input']>;\n /** Game short name registered with @BotFather via /newgame */\n gameShortName?: InputMaybe<Scalars['String']['input']>;\n /** Game URL to open when user clicks Play */\n gameUrl?: InputMaybe<Scalars['String']['input']>;\n label: Scalars['String']['input'];\n loginUrl?: InputMaybe<FlowLoginUrlConfigInput>;\n pay?: InputMaybe<Scalars['Boolean']['input']>;\n paymentConfig?: InputMaybe<FlowPaymentConfigInput>;\n phoneNumber?: InputMaybe<Scalars['String']['input']>;\n pollType?: InputMaybe<Scalars['String']['input']>;\n product?: InputMaybe<FlowWhatsAppProductConfigInput>;\n productList?: InputMaybe<FlowWhatsAppProductListConfigInput>;\n requestChat?: InputMaybe<FlowRequestChatConfigInput>;\n requestContact?: InputMaybe<Scalars['Boolean']['input']>;\n requestLocation?: InputMaybe<Scalars['Boolean']['input']>;\n requestUsers?: InputMaybe<FlowRequestUsersConfigInput>;\n switchInlineQuery?: InputMaybe<Scalars['String']['input']>;\n switchInlineQueryChosenChat?: InputMaybe<FlowSwitchInlineQueryChosenChatConfigInput>;\n switchInlineQueryCurrentChat?: InputMaybe<Scalars['String']['input']>;\n /** Button type — cross-platform (callback, url), Telegram-specific (tg_*), or WhatsApp-specific (wa_*) */\n type: Scalars['String']['input'];\n url?: InputMaybe<Scalars['String']['input']>;\n value?: InputMaybe<Scalars['String']['input']>;\n webApp?: InputMaybe<FlowWebAppConfigInput>;\n whatsappFlow?: InputMaybe<FlowWhatsAppFlowConfigInput>;\n};\n\nexport type CancelSubscriptionOutput = {\n __typename?: 'CancelSubscriptionOutput';\n effectiveAt?: Maybe<Scalars['DateTime']['output']>;\n isImmediate: Scalars['Boolean']['output'];\n message: Scalars['String']['output'];\n success: Scalars['Boolean']['output'];\n};\n\nexport type Card = {\n __typename?: 'Card';\n _id: Scalars['String']['output'];\n /** AI assistant ID override for this card (for AI_TEXT_CARD type) */\n aiAssistantId?: Maybe<Scalars['String']['output']>;\n /** Async execution configuration for cards that perform external operations. Controls background execution, error handling, and timeouts. */\n async?: Maybe<AsyncCardConfig>;\n createdAt: Scalars['DateTime']['output'];\n createdBy: Scalars['String']['output'];\n data: CardData;\n /** Soft-delete timestamp. Null = live card, Date = deleted. Auto-purged by MongoDB TTL index after 24 hours. */\n deletedAt?: Maybe<Scalars['DateTime']['output']>;\n flowId: Scalars['String']['output'];\n /** Integration ID for this card. Used by WA card types to determine which WhatsApp Business account sends the message and to resolve the catalog ID. */\n integrationId?: Maybe<Scalars['String']['output']>;\n isActive: Scalars['Boolean']['output'];\n nextCardId?: Maybe<Scalars['String']['output']>;\n organisationId: Scalars['String']['output'];\n position: CardPosition;\n size?: Maybe<CardSize>;\n /** Card-specific error message for strict mode input validation. Overrides flow-level strictModeErrorMessage for this card. */\n strictModeErrorMessage?: Maybe<Scalars['String']['output']>;\n title: Scalars['String']['output'];\n type: CardType;\n updatedAt: Scalars['DateTime']['output'];\n /** WhatsApp-specific configuration shared across WA card types. Provides header/footer text and integration selection. */\n wa?: Maybe<WhatsAppCardConfig>;\n};\n\nexport type CardData = AiAgentCardData | AiClassificationCardData | AiTextCardData | AiTextToSpeechCardData | AssignOperatorCardData | ButtonCardData | ConditionalCardData | CrmCardData | FetchCardData | FlowCardData | GhostCardData | MediaCardData | NoteCardData | OutboundWebhookEventCardData | QuestionCardData | TextCardData | UpdateContactCardData | WaCatalogCardData | WaListMessageCardData | WaProductCardData | WaProductsCardData | WaTemplateCardData | WaitCardData | WaitTimeoutCardData;\n\nexport type CardInfo = {\n __typename?: 'CardInfo';\n brand: Scalars['String']['output'];\n expMonth: Scalars['Float']['output'];\n expYear: Scalars['Float']['output'];\n last4: Scalars['String']['output'];\n};\n\nexport type CardPosition = {\n __typename?: 'CardPosition';\n x: Scalars['Float']['output'];\n y: Scalars['Float']['output'];\n};\n\nexport type CardPositionInput = {\n x: Scalars['Float']['input'];\n y: Scalars['Float']['input'];\n};\n\nexport type CardSize = {\n __typename?: 'CardSize';\n height: Scalars['String']['output'];\n width: Scalars['String']['output'];\n};\n\nexport type CardSizeInput = {\n height: Scalars['String']['input'];\n width: Scalars['String']['input'];\n};\n\n/** Types of cards available in a flow */\nexport enum CardType {\n AI_AGENT_CARD = 'AI_AGENT_CARD',\n AI_CLASSIFICATION_CARD = 'AI_CLASSIFICATION_CARD',\n AI_TEXT_CARD = 'AI_TEXT_CARD',\n AI_TEXT_TO_SPEECH_CARD = 'AI_TEXT_TO_SPEECH_CARD',\n ASSIGN_OPERATOR_CARD = 'ASSIGN_OPERATOR_CARD',\n AUDIO_BUTTON_CARD = 'AUDIO_BUTTON_CARD',\n AUDIO_CARD = 'AUDIO_CARD',\n BUTTON_CARD = 'BUTTON_CARD',\n CONDITIONAL_CARD = 'CONDITIONAL_CARD',\n CRM_CARD = 'CRM_CARD',\n DOCUMENT_BUTTON_CARD = 'DOCUMENT_BUTTON_CARD',\n DOCUMENT_CARD = 'DOCUMENT_CARD',\n FETCH_CARD = 'FETCH_CARD',\n FLOW_CARD = 'FLOW_CARD',\n GHOST_CARD = 'GHOST_CARD',\n MEDIA_BUTTON_CARD = 'MEDIA_BUTTON_CARD',\n MEDIA_CARD = 'MEDIA_CARD',\n NOTE_CARD = 'NOTE_CARD',\n OUTBOUND_WEBHOOK_EVENT = 'OUTBOUND_WEBHOOK_EVENT',\n QUESTION_CARD = 'QUESTION_CARD',\n TEXT_CARD = 'TEXT_CARD',\n UPDATE_CONTACT = 'UPDATE_CONTACT',\n WAIT_CARD = 'WAIT_CARD',\n WAIT_TIMEOUT_CARD = 'WAIT_TIMEOUT_CARD',\n WA_CATALOG_CARD = 'WA_CATALOG_CARD',\n WA_LIST_MESSAGE_CARD = 'WA_LIST_MESSAGE_CARD',\n WA_PRODUCTS_CARD = 'WA_PRODUCTS_CARD',\n WA_PRODUCT_CARD = 'WA_PRODUCT_CARD',\n WA_TEMPLATE_CARD = 'WA_TEMPLATE_CARD'\n}\n\nexport type CarouselCardOverride = {\n /** Body variable values for this card in order: {{1}}, {{2}}, etc. */\n bodyVariables?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Card index (0-based) */\n cardIndex: Scalars['Int']['input'];\n /** Media ID for the card header. Must be a valid Media document ID. Overrides the default card media. */\n headerMediaId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CatalogActionInput = {\n /** Product retailer ID for the catalog thumbnail. If omitted, WhatsApp uses the first product from the catalog. */\n thumbnailProductRetailerId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CategorizedVariablesResponse = {\n __typename?: 'CategorizedVariablesResponse';\n /** List of available categories */\n availableCategories: Array<Scalars['String']['output']>;\n /** Chat variables (participants, status) */\n chat?: Maybe<Array<VariableInfo>>;\n /** Flow execution variables (card results) */\n flow?: Maybe<Array<VariableInfo>>;\n /** Last message variables (content, metadata) */\n lastMessage?: Maybe<Array<VariableInfo>>;\n /** Organisation variables (name, settings, etc.) */\n organisation?: Maybe<Array<VariableInfo>>;\n /** System variables (date, time, etc.) */\n system?: Maybe<Array<VariableInfo>>;\n /** Total number of variables across all categories */\n totalCount: Scalars['Float']['output'];\n /** User variables (profile, preferences) */\n user?: Maybe<Array<VariableInfo>>;\n};\n\nexport type Chat = {\n __typename?: 'Chat';\n _id: Scalars['String']['output'];\n /** Currently active flow execution, or null if no flow running */\n activeFlowExecution?: Maybe<ActiveFlowExecution>;\n /** When the operator was assigned */\n assignedAt?: Maybe<Scalars['DateTime']['output']>;\n /** Operator currently assigned to this chat */\n assignedTo?: Maybe<User>;\n category?: Maybe<ChatCategory>;\n chatId: Scalars['Float']['output'];\n collections?: Maybe<Array<Scalars['String']['output']>>;\n contextSnapshot?: Maybe<Scalars['JSON']['output']>;\n /** AI assistant assigned to this chat (overrides org/operator defaults) */\n copilotAssistantId?: Maybe<Scalars['String']['output']>;\n createdAt?: Maybe<Scalars['DateTime']['output']>;\n externalChatId?: Maybe<Scalars['String']['output']>;\n externalUserId?: Maybe<Scalars['String']['output']>;\n firstName?: Maybe<Scalars['String']['output']>;\n integration?: Maybe<Integration>;\n /** Integration ID (use integration field for full details) */\n integrationId?: Maybe<Scalars['String']['output']>;\n isAIActive?: Maybe<Scalars['Boolean']['output']>;\n isBlocked?: Maybe<Scalars['Boolean']['output']>;\n isForum?: Maybe<Scalars['Boolean']['output']>;\n isWithin24hWindow?: Maybe<Scalars['Boolean']['output']>;\n lastMessage?: Maybe<Message>;\n lastName?: Maybe<Scalars['String']['output']>;\n lastUserMessageAt?: Maybe<Scalars['DateTime']['output']>;\n /** Whether outbound is paused by spam protection */\n outboundPaused?: Maybe<Scalars['Boolean']['output']>;\n priority?: Maybe<Priority>;\n profile?: Maybe<People>;\n status?: Maybe<ChatStatus>;\n title?: Maybe<Scalars['String']['output']>;\n type: ChatType;\n unReadCount?: Maybe<Scalars['Float']['output']>;\n updatedAt?: Maybe<Scalars['DateTime']['output']>;\n username?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ChatActivity = {\n __typename?: 'ChatActivity';\n /** Set while an AI is generating; null otherwise. */\n aiTyping?: Maybe<ChatActivityAi>;\n chatId: Scalars['ID']['output'];\n /** Set while the contact is typing; null otherwise. No provider currently emits inbound typing webhooks — populated today only by the dev simulateContactTyping mutation. */\n contactTyping?: Maybe<ChatActivityContact>;\n};\n\nexport type ChatActivityAi = {\n __typename?: 'ChatActivityAi';\n /** When the generation started. */\n since: Scalars['DateTime']['output'];\n /** Which call site started the generation. */\n source: ChatAiSource;\n};\n\nexport type ChatActivityContact = {\n __typename?: 'ChatActivityContact';\n /** The contact (people._id) who started typing. */\n contactId: Scalars['String']['output'];\n /** When the typing indicator started. */\n since: Scalars['DateTime']['output'];\n /** When the typing indicator naturally expires (provider-specific decay; Viber: ~10s). */\n until: Scalars['DateTime']['output'];\n};\n\n/** Where the AI generation running on this chat originated (which card / handler). */\nexport enum ChatAiSource {\n AI_AGENT_CARD = 'AI_AGENT_CARD',\n AI_CLASSIFICATION = 'AI_CLASSIFICATION',\n AI_TEXT_CARD = 'AI_TEXT_CARD',\n AUTO_REPLY = 'AUTO_REPLY'\n}\n\n/** Chat category for classifying conversation types */\nexport enum ChatCategory {\n FEEDBACK = 'FEEDBACK',\n GENERAL = 'GENERAL',\n INQUIRY = 'INQUIRY',\n SALES = 'SALES',\n SUPPORT = 'SUPPORT'\n}\n\nexport type ChatCollection = {\n __typename?: 'ChatCollection';\n _id: Scalars['String']['output'];\n chatCount?: Maybe<Scalars['Float']['output']>;\n color?: Maybe<Scalars['String']['output']>;\n createdAt: Scalars['DateTime']['output'];\n createdBy?: Maybe<Scalars['String']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n icon?: Maybe<Scalars['String']['output']>;\n isLocked: Scalars['Boolean']['output'];\n isSystem: Scalars['Boolean']['output'];\n isVisible: Scalars['Boolean']['output'];\n name: Scalars['String']['output'];\n position: Scalars['Float']['output'];\n rules: Array<CollectionRule>;\n slug: Scalars['String']['output'];\n systemKey?: Maybe<Scalars['String']['output']>;\n updatedAt: Scalars['DateTime']['output'];\n};\n\n/** Available chat field keys that can be updated */\nexport enum ChatFieldKey {\n AI_AVAILABLE = 'AI_AVAILABLE',\n CHAT_CATEGORY = 'CHAT_CATEGORY',\n CHAT_STATUS = 'CHAT_STATUS',\n IS_BLOCKED = 'IS_BLOCKED',\n PRIORITY = 'PRIORITY'\n}\n\nexport type ChatMetrics = {\n __typename?: 'ChatMetrics';\n active: Scalars['Int']['output'];\n newInPeriod?: Maybe<Scalars['Int']['output']>;\n total: Scalars['Int']['output'];\n};\n\n/** Chat status values for tracking conversation state */\nexport enum ChatStatus {\n CLOSED = 'CLOSED',\n IN_PROGRESS = 'IN_PROGRESS',\n ISSUE = 'ISSUE',\n PENDING = 'PENDING',\n RESOLVED = 'RESOLVED'\n}\n\nexport type ChatSubscriptionPayload = {\n __typename?: 'ChatSubscriptionPayload';\n /** Collections the chat was added to by this update */\n addedToCollections: Array<CollectionChangeInfo>;\n data: Chat;\n /** Whether the chat belongs to the collection passed by the client. Always true if no collectionId was provided. */\n isInCollection: Scalars['Boolean']['output'];\n /** Collections the chat was removed from by this update */\n removedFromCollections: Array<CollectionChangeInfo>;\n type: Scalars['String']['output'];\n};\n\n/** \"Type of the chat: \"private\", \"group\", \"supergroup\", or \"channel\" */\nexport enum ChatType {\n CHANNEL = 'CHANNEL',\n GROUP = 'GROUP',\n PRIVATE = 'PRIVATE',\n SUPERGROUP = 'SUPERGROUP'\n}\n\nexport type ChatsCountResponse = {\n __typename?: 'ChatsCountResponse';\n /** Total number of chats in organisation */\n total: Scalars['Int']['output'];\n};\n\nexport type ChatsStats = {\n __typename?: 'ChatsStats';\n /** Delta change: +1 for new chat, -1 for removed chat */\n count: Scalars['Int']['output'];\n};\n\nexport type CheckPasskeyAvailabilityOutput = {\n __typename?: 'CheckPasskeyAvailabilityOutput';\n /** Whether the user has passkeys registered */\n hasPasskeys: Scalars['Boolean']['output'];\n /** Number of passkeys registered */\n passkeyCount: Scalars['Float']['output'];\n};\n\nexport type CleanupDeleteCounts = {\n __typename?: 'CleanupDeleteCounts';\n aiAssistants: Scalars['Int']['output'];\n cards: Scalars['Int']['output'];\n chatCollections: Scalars['Int']['output'];\n chats: Scalars['Int']['output'];\n fieldDefinitions: Scalars['Int']['output'];\n fieldValues: Scalars['Int']['output'];\n flowTemplates: Scalars['Int']['output'];\n flows: Scalars['Int']['output'];\n integrations: Scalars['Int']['output'];\n labels: Scalars['Int']['output'];\n media: Scalars['Int']['output'];\n members: Scalars['Int']['output'];\n messages: Scalars['Int']['output'];\n people: Scalars['Int']['output'];\n triggers: Scalars['Int']['output'];\n};\n\nexport type CleanupDeletedCounts = {\n __typename?: 'CleanupDeletedCounts';\n aiAssistants: Scalars['Int']['output'];\n cards: Scalars['Int']['output'];\n chatCollections: Scalars['Int']['output'];\n chats: Scalars['Int']['output'];\n fieldDefinitions: Scalars['Int']['output'];\n fieldValues: Scalars['Int']['output'];\n flowTemplates: Scalars['Int']['output'];\n flows: Scalars['Int']['output'];\n integrations: Scalars['Int']['output'];\n labels: Scalars['Int']['output'];\n media: Scalars['Int']['output'];\n members: Scalars['Int']['output'];\n messageReactions: Scalars['Int']['output'];\n messages: Scalars['Int']['output'];\n people: Scalars['Int']['output'];\n triggers: Scalars['Int']['output'];\n};\n\nexport type CollectionChangeInfo = {\n __typename?: 'CollectionChangeInfo';\n _id: Scalars['String']['output'];\n name: Scalars['String']['output'];\n newAssignedTo?: Maybe<Scalars['String']['output']>;\n previousAssignedTo?: Maybe<Scalars['String']['output']>;\n slug: Scalars['String']['output'];\n};\n\n/** Available fields for filtering chats in collections */\nexport enum CollectionFilterField {\n ASSIGNED_TO = 'ASSIGNED_TO',\n INTEGRATION_ID = 'INTEGRATION_ID',\n MESSAGE_DIRECTION = 'MESSAGE_DIRECTION',\n MESSAGE_LABEL = 'MESSAGE_LABEL',\n MESSAGE_TEXT = 'MESSAGE_TEXT',\n MESSAGE_TYPE = 'MESSAGE_TYPE',\n PROFILE_FIELD = 'PROFILE_FIELD'\n}\n\nexport type CollectionMembershipPayload = {\n __typename?: 'CollectionMembershipPayload';\n /** Collections the chat was added to */\n addedToCollections: Array<CollectionChangeInfo>;\n /** The chat whose collection membership changed */\n chat: Chat;\n /** Collections the chat was removed from */\n removedFromCollections: Array<CollectionChangeInfo>;\n};\n\nexport type CollectionRule = {\n __typename?: 'CollectionRule';\n field: CollectionFilterField;\n fieldPath?: Maybe<Scalars['String']['output']>;\n operator: FilterOperator;\n /** Value to filter by. Not required for operators like IS_EMPTY, IS_NOT_EMPTY, EXISTS, NOT_EXISTS. */\n value?: Maybe<Scalars['JSON']['output']>;\n};\n\nexport type CollectionRuleInput = {\n field: CollectionFilterField;\n fieldPath?: InputMaybe<Scalars['String']['input']>;\n operator: FilterOperator;\n /** Value to filter by. Not required for operators like IS_EMPTY, IS_NOT_EMPTY, EXISTS, NOT_EXISTS. */\n value?: InputMaybe<Scalars['JSON']['input']>;\n};\n\nexport type CollectionStatus = {\n __typename?: 'CollectionStatus';\n /** Whether the collection is accessible (exists and readable) */\n accessible: Scalars['Boolean']['output'];\n /** Number of documents for this org in the collection */\n documentCount: Scalars['Int']['output'];\n /** Error message if the collection is not accessible */\n error?: Maybe<Scalars['String']['output']>;\n /** Whether this is a system/config collection */\n isSystem: Scalars['Boolean']['output'];\n /** MongoDB collection name */\n name: Scalars['String']['output'];\n};\n\nexport type CollectionUpdatePayload = {\n __typename?: 'CollectionUpdatePayload';\n /** The collection that was created/updated. Null for delete events. */\n collection?: Maybe<ChatCollection>;\n /** Collection ID (always present, especially useful for delete) */\n collectionId?: Maybe<Scalars['String']['output']>;\n /** Collection slug (always present, especially useful for delete) */\n collectionSlug?: Maybe<Scalars['String']['output']>;\n /** Type of change: create, update, or delete */\n type: Scalars['String']['output'];\n};\n\nexport type Condition = {\n __typename?: 'Condition';\n connectorType?: Maybe<ConnectorType>;\n operator?: Maybe<RuleOperator>;\n /** Value to compare against. Supports single string, array of strings (for IN_ARRAY/NOT_IN_ARRAY), numbers, or booleans. Use array for multi-value operators like IN_ARRAY. Not required for IS_EMPTY/IS_NOT_EMPTY operators. */\n value?: Maybe<Scalars['JSON']['output']>;\n variable?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ConditionInput = {\n connectorType?: InputMaybe<ConnectorType>;\n operator?: InputMaybe<RuleOperator>;\n /** Value to compare against. Supports single string, array of strings (for IN_ARRAY/NOT_IN_ARRAY), numbers, or booleans. Use array for multi-value operators like IN_ARRAY. Not required for IS_EMPTY/IS_NOT_EMPTY operators. */\n value?: InputMaybe<Scalars['JSON']['input']>;\n variable?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type ConditionalBranch = {\n __typename?: 'ConditionalBranch';\n _id?: Maybe<Scalars['String']['output']>;\n conditions?: Maybe<Array<Condition>>;\n label?: Maybe<Scalars['String']['output']>;\n nextCardId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ConditionalBranchInput = {\n _id?: InputMaybe<Scalars['String']['input']>;\n conditions?: InputMaybe<Array<ConditionInput>>;\n label?: InputMaybe<Scalars['String']['input']>;\n nextCardId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type ConditionalCardData = {\n __typename?: 'ConditionalCardData';\n branches?: Maybe<Array<ConditionalBranch>>;\n defaultNextCardId?: Maybe<Scalars['String']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ConfigureAiAssistantInput = {\n /** Assistant context configuration */\n context?: InputMaybe<AiAssistantContextInput>;\n /** Custom model name (when using custom provider) */\n customModel?: InputMaybe<Scalars['String']['input']>;\n /** Activate or deactivate the assistant */\n isActive?: InputMaybe<Scalars['Boolean']['input']>;\n /** Set as default assistant for the organization */\n isDefault?: InputMaybe<Scalars['Boolean']['input']>;\n /** Knowledge base media file ID for this assistant */\n knowledgeBase?: InputMaybe<Scalars['String']['input']>;\n /** AI model configuration object */\n model?: InputMaybe<ModelInfoInput>;\n /** Per-purpose model slots (image, tts, transcription, vision) */\n modelSlots?: InputMaybe<ModelSlotsInput>;\n /** Advanced AI settings */\n settings?: InputMaybe<AiAssistantSettingsInput>;\n};\n\nexport type ConfigureSelfTenantInput = {\n /** How to initialise the tenant DB. FRESH = system/config data only; MIGRATE = copy all data. Default: MIGRATE. */\n migrationMode?: InputMaybe<TenantMigrationMode>;\n /** What to do with the org data in the shared DB after setup. KEEP = leave untouched; DELETE = remove from shared. Default: DELETE. */\n sourceDataAction?: InputMaybe<SourceDataAction>;\n /** MongoDB connection URI for the tenant. Set to configure dedicated DB, null/empty to revert to shared DB. */\n tenantDbUri?: InputMaybe<Scalars['String']['input']>;\n /** Redis connection URL for the tenant. Set to configure dedicated Redis, null/empty to revert to shared Redis. */\n tenantRedisUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type ConfigureTenantInput = {\n /** How to initialise the tenant DB. FRESH = system/config data only; MIGRATE = copy all data. Default: MIGRATE. */\n migrationMode?: InputMaybe<TenantMigrationMode>;\n /** What to do with the org data in the shared DB after setup. KEEP = leave untouched; DELETE = remove from shared. Default: DELETE. */\n sourceDataAction?: InputMaybe<SourceDataAction>;\n /** The target organisation ID to configure */\n targetOrgId: Scalars['String']['input'];\n /** MongoDB connection URI for the tenant. Set to configure dedicated DB, null/empty to revert to shared DB. */\n tenantDbUri?: InputMaybe<Scalars['String']['input']>;\n /** Redis connection URL for the tenant. Set to configure dedicated Redis, null/empty to revert to shared Redis. */\n tenantRedisUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type ConfirmSetupIntentInput = {\n setupIntentId: Scalars['String']['input'];\n};\n\nexport type ConnectInstagramInput = {\n /** Instagram User Access Token obtained via Meta Business Login OAuth flow */\n accessToken: Scalars['String']['input'];\n};\n\nexport type ConnectViberBotInput = {\n /** Viber bot auth token from the Viber Admin Panel (https://partners.viber.com/) */\n authToken: Scalars['String']['input'];\n};\n\n/** Logical connectors for combining triggers */\nexport enum ConnectorType {\n AND = 'AND',\n OR = 'OR'\n}\n\nexport type Contact = {\n __typename?: 'Contact';\n /** Addresses */\n addresses?: Maybe<Array<ContactAddress>>;\n /** Birthday (YYYY-MM-DD format) */\n birthday?: Maybe<Scalars['String']['output']>;\n /** Email addresses */\n emails?: Maybe<Array<ContactEmail>>;\n /** Contact first name (required by Telegram) */\n firstName: Scalars['String']['output'];\n /** Formatted display name (WhatsApp: formatted_name) */\n formattedName?: Maybe<Scalars['String']['output']>;\n /** Contact last name */\n lastName?: Maybe<Scalars['String']['output']>;\n /** Middle name */\n middleName?: Maybe<Scalars['String']['output']>;\n /** Organization info */\n org?: Maybe<ContactOrg>;\n /** Contact phone number */\n phoneNumber?: Maybe<Scalars['String']['output']>;\n /** Phone numbers */\n phones?: Maybe<Array<ContactPhone>>;\n /** Name prefix (Mr., Dr., etc.) */\n prefix?: Maybe<Scalars['String']['output']>;\n /** Name suffix (Jr., III, etc.) */\n suffix?: Maybe<Scalars['String']['output']>;\n /** Website URLs */\n urls?: Maybe<Array<ContactUrl>>;\n /** Telegram user ID (if known) */\n userId?: Maybe<Scalars['Int']['output']>;\n /** Additional data in vCard format */\n vcard?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ContactAddress = {\n __typename?: 'ContactAddress';\n city?: Maybe<Scalars['String']['output']>;\n country?: Maybe<Scalars['String']['output']>;\n countryCode?: Maybe<Scalars['String']['output']>;\n state?: Maybe<Scalars['String']['output']>;\n street?: Maybe<Scalars['String']['output']>;\n /** Address type: HOME, WORK */\n type?: Maybe<Scalars['String']['output']>;\n zip?: Maybe<Scalars['String']['output']>;\n};\n\n/** Category of contact request */\nexport enum ContactCategory {\n DEMO = 'DEMO',\n ENTERPRISE = 'ENTERPRISE',\n GENERAL = 'GENERAL',\n SALES = 'SALES',\n SUPPORT = 'SUPPORT'\n}\n\nexport type ContactEmail = {\n __typename?: 'ContactEmail';\n email: Scalars['String']['output'];\n /** Email type: HOME, WORK */\n type?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ContactOrg = {\n __typename?: 'ContactOrg';\n company?: Maybe<Scalars['String']['output']>;\n department?: Maybe<Scalars['String']['output']>;\n title?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ContactPhone = {\n __typename?: 'ContactPhone';\n phone: Scalars['String']['output'];\n /** Phone type: CELL, MAIN, HOME, WORK */\n type?: Maybe<Scalars['String']['output']>;\n /** WhatsApp ID if registered */\n waId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ContactReply = {\n __typename?: 'ContactReply';\n _id: Scalars['ID']['output'];\n message: Scalars['String']['output'];\n sentAt: Scalars['DateTime']['output'];\n sentBy?: Maybe<Scalars['ID']['output']>;\n subject: Scalars['String']['output'];\n};\n\nexport type ContactRequest = {\n __typename?: 'ContactRequest';\n _id: Scalars['ID']['output'];\n assignedTo?: Maybe<Scalars['ID']['output']>;\n category: ContactCategory;\n company?: Maybe<Scalars['String']['output']>;\n country?: Maybe<Scalars['String']['output']>;\n createdAt: Scalars['DateTime']['output'];\n demoOrganisation?: Maybe<Scalars['ID']['output']>;\n email: Scalars['String']['output'];\n intendedUse?: Maybe<Scalars['String']['output']>;\n internalNotes?: Maybe<Scalars['String']['output']>;\n ipAddress?: Maybe<Scalars['String']['output']>;\n message: Scalars['String']['output'];\n metadata?: Maybe<Scalars['String']['output']>;\n name: Scalars['String']['output'];\n phone?: Maybe<Scalars['String']['output']>;\n referrer?: Maybe<Scalars['String']['output']>;\n replies: Array<ContactReply>;\n status: ContactStatus;\n updatedAt: Scalars['DateTime']['output'];\n userAgent?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ContactRequestFiltersInput = {\n category?: InputMaybe<ContactCategory>;\n search?: InputMaybe<Scalars['String']['input']>;\n skip?: Scalars['Int']['input'];\n status?: InputMaybe<ContactStatus>;\n take?: Scalars['Int']['input'];\n};\n\nexport type ContactRequestResponse = {\n __typename?: 'ContactRequestResponse';\n contactRequest?: Maybe<ContactRequest>;\n message?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type ContactRequestStatsResponse = {\n __typename?: 'ContactRequestStatsResponse';\n avgResponseTimeHours?: Maybe<Scalars['Float']['output']>;\n categoryDemo: Scalars['Int']['output'];\n categoryEnterprise: Scalars['Int']['output'];\n categoryGeneral: Scalars['Int']['output'];\n categorySales: Scalars['Int']['output'];\n categorySupport: Scalars['Int']['output'];\n newToday: Scalars['Int']['output'];\n statusArchived: Scalars['Int']['output'];\n statusAwaitingResponse: Scalars['Int']['output'];\n statusInProgress: Scalars['Int']['output'];\n statusNew: Scalars['Int']['output'];\n statusReplied: Scalars['Int']['output'];\n statusResolved: Scalars['Int']['output'];\n statusSpam: Scalars['Int']['output'];\n total: Scalars['Int']['output'];\n};\n\n/** Status of contact request */\nexport enum ContactStatus {\n ARCHIVED = 'ARCHIVED',\n AWAITING_RESPONSE = 'AWAITING_RESPONSE',\n IN_PROGRESS = 'IN_PROGRESS',\n NEW = 'NEW',\n REPLIED = 'REPLIED',\n RESOLVED = 'RESOLVED',\n SPAM = 'SPAM'\n}\n\nexport type ContactUrl = {\n __typename?: 'ContactUrl';\n /** URL type: HOME, WORK */\n type?: Maybe<Scalars['String']['output']>;\n url: Scalars['String']['output'];\n};\n\nexport type CreateAiAssistantInput = {\n /** Integration ID from the AI integrations */\n integrationId: Scalars['String']['input'];\n /** Human-readable name for the assistant */\n name: Scalars['String']['input'];\n};\n\nexport type CreateBroadcastInput = {\n audienceFilter?: Array<AudienceFilterConditionInput>;\n flowId?: InputMaybe<Scalars['String']['input']>;\n integrationIds?: InputMaybe<Array<Scalars['String']['input']>>;\n name: Scalars['String']['input'];\n scheduledAt: Scalars['DateTime']['input'];\n templateRoutes?: InputMaybe<Array<TemplateRouteInput>>;\n timezone?: Scalars['String']['input'];\n};\n\nexport type CreateCardInput = {\n /** Async execution configuration for cards that perform async operations (CRM_CARD, AI_TEXT_CARD, FETCH_CARD, etc.). Controls background execution and error/timeout handling. */\n async?: InputMaybe<AsyncCardConfigInput>;\n data?: InputMaybe<UnifiedCardDataInput>;\n flowId: Scalars['ID']['input'];\n /** Integration ID for this card. Used by WA card types to select the WhatsApp Business account. */\n integrationId?: InputMaybe<Scalars['String']['input']>;\n nextCardId?: InputMaybe<Scalars['String']['input']>;\n position: CardPositionInput;\n title: Scalars['String']['input'];\n type: CardType;\n /** WhatsApp-specific configuration (header/footer text) for WA card types. */\n wa?: InputMaybe<WhatsAppCardConfigInput>;\n};\n\nexport type CreateChatCollectionInput = {\n color?: InputMaybe<Scalars['String']['input']>;\n description?: InputMaybe<Scalars['String']['input']>;\n icon?: InputMaybe<Scalars['String']['input']>;\n name: Scalars['String']['input'];\n position?: InputMaybe<Scalars['Float']['input']>;\n rules?: InputMaybe<Array<CollectionRuleInput>>;\n slug?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CreateChatInput = {\n chatId: Scalars['Float']['input'];\n createdAt?: InputMaybe<Scalars['DateTime']['input']>;\n externalChatId?: InputMaybe<Scalars['String']['input']>;\n firstName?: InputMaybe<Scalars['String']['input']>;\n integrationId?: InputMaybe<Scalars['String']['input']>;\n isForum?: InputMaybe<Scalars['Boolean']['input']>;\n lastMessage?: InputMaybe<Scalars['String']['input']>;\n lastName?: InputMaybe<Scalars['String']['input']>;\n profileId?: InputMaybe<Scalars['String']['input']>;\n title?: InputMaybe<Scalars['String']['input']>;\n type: ChatType;\n username?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CreateCombinedMessageInput = {\n buttons?: InputMaybe<Array<MessageButtonInput>>;\n caption?: InputMaybe<Scalars['String']['input']>;\n createdAt?: InputMaybe<Scalars['DateTime']['input']>;\n /** Delivery status - defaults based on message direction */\n deliveryStatus?: InputMaybe<MessageDeliveryStatus>;\n flowTitle?: InputMaybe<Scalars['String']['input']>;\n hasMediaSpoiler?: InputMaybe<Scalars['Boolean']['input']>;\n isMediaGroup?: InputMaybe<Scalars['Boolean']['input']>;\n keyboardType?: InputMaybe<Scalars['String']['input']>;\n media?: InputMaybe<Array<Scalars['String']['input']>>;\n mediaGroup?: InputMaybe<Array<Scalars['String']['input']>>;\n mediaGroupId?: InputMaybe<Scalars['String']['input']>;\n mentions?: InputMaybe<Array<Scalars['ID']['input']>>;\n replyToButtonId?: InputMaybe<Scalars['String']['input']>;\n replyToMessage?: InputMaybe<Scalars['String']['input']>;\n showCaptionAboveMedia?: InputMaybe<Scalars['Boolean']['input']>;\n text?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CreateContactRequestInput = {\n category: ContactCategory;\n company?: InputMaybe<Scalars['String']['input']>;\n country?: InputMaybe<Scalars['String']['input']>;\n email: Scalars['String']['input'];\n intendedUse?: InputMaybe<Scalars['String']['input']>;\n message: Scalars['String']['input'];\n name: Scalars['String']['input'];\n phone?: InputMaybe<Scalars['String']['input']>;\n recaptchaToken?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CreateFieldDefinitionDto = {\n defaultValue?: InputMaybe<Scalars['JSON']['input']>;\n description?: InputMaybe<Scalars['String']['input']>;\n displayOrder?: InputMaybe<Scalars['Float']['input']>;\n /** Whether this field is read-only. Read-only fields cannot be edited by users. This is typically set by the system for auto-calculated fields. */\n isReadOnly?: InputMaybe<Scalars['Boolean']['input']>;\n isRequired?: InputMaybe<Scalars['Boolean']['input']>;\n isSystemField?: InputMaybe<Scalars['Boolean']['input']>;\n key: Scalars['String']['input'];\n name: Scalars['String']['input'];\n options?: InputMaybe<Array<Scalars['String']['input']>>;\n type: Scalars['String']['input'];\n visibility?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CreateFlowFromTemplateInput = {\n customizations?: InputMaybe<Scalars['String']['input']>;\n name?: InputMaybe<Scalars['String']['input']>;\n organisationId: Scalars['String']['input'];\n skipOptionalCards?: InputMaybe<Array<Scalars['String']['input']>>;\n templateId: Scalars['String']['input'];\n};\n\nexport type CreateFlowInput = {\n description?: InputMaybe<Scalars['String']['input']>;\n title: Scalars['String']['input'];\n};\n\nexport type CreateFlowTemplateInput = {\n category?: InputMaybe<FlowTemplateCategory>;\n description?: InputMaybe<Scalars['String']['input']>;\n flowId: Scalars['String']['input'];\n icon?: InputMaybe<Scalars['String']['input']>;\n slug: Scalars['String']['input'];\n tags?: InputMaybe<Array<Scalars['String']['input']>>;\n thumbnailId?: InputMaybe<Scalars['String']['input']>;\n title: Scalars['String']['input'];\n version?: InputMaybe<Scalars['String']['input']>;\n visibility: FlowTemplateVisibility;\n};\n\nexport type CreateHelpArticleInput = {\n authorIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n canonicalUrl?: InputMaybe<Scalars['String']['input']>;\n content: Scalars['String']['input'];\n contentFormat?: InputMaybe<HelpArticleContentFormat>;\n coverImageUrl?: InputMaybe<Scalars['ID']['input']>;\n excerpt?: InputMaybe<Scalars['String']['input']>;\n folderId?: InputMaybe<Scalars['ID']['input']>;\n integrationId: Scalars['ID']['input'];\n locale?: Scalars['String']['input'];\n order?: InputMaybe<Scalars['Int']['input']>;\n slug: Scalars['String']['input'];\n tagIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n title: Scalars['String']['input'];\n};\n\nexport type CreateHelpFolderInput = {\n description?: InputMaybe<Scalars['String']['input']>;\n integrationId: Scalars['ID']['input'];\n name: Scalars['String']['input'];\n order?: InputMaybe<Scalars['Int']['input']>;\n parentId?: InputMaybe<Scalars['ID']['input']>;\n slug: Scalars['String']['input'];\n};\n\nexport type CreateHelpTagInput = {\n description?: InputMaybe<Scalars['String']['input']>;\n integrationId: Scalars['ID']['input'];\n label: Scalars['String']['input'];\n slug: Scalars['String']['input'];\n};\n\nexport type CreateIntegrationInput = {\n /** API key or token for the integration */\n apiKey: Scalars['String']['input'];\n /** Authorization type */\n authorization?: InputMaybe<IntegrationAuthorization>;\n /** Integration category */\n category?: IntegrationCategory;\n /** CRM-specific configuration (for CRM category integrations) */\n crm?: InputMaybe<CrmConfigInput>;\n /** Custom integration name (required if provider is not specified) */\n name?: InputMaybe<Scalars['String']['input']>;\n /** AI provider (only for AI category) */\n provider?: InputMaybe<IntegrationProvider>;\n /** Custom API URL (for custom integrations) */\n url?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CreateLabelInput = {\n active?: InputMaybe<Scalars['Boolean']['input']>;\n color?: InputMaybe<Scalars['String']['input']>;\n description?: InputMaybe<Scalars['String']['input']>;\n name: Scalars['String']['input'];\n};\n\nexport type CreateMediaInput = {\n caption?: InputMaybe<Scalars['String']['input']>;\n customEmojiId?: InputMaybe<Scalars['String']['input']>;\n disableContentTypeDetection?: InputMaybe<Scalars['Boolean']['input']>;\n duration?: InputMaybe<Scalars['Float']['input']>;\n emoji?: InputMaybe<Scalars['String']['input']>;\n fileId?: InputMaybe<Scalars['String']['input']>;\n fileSize?: InputMaybe<Scalars['Float']['input']>;\n fileUniqueId?: InputMaybe<Scalars['String']['input']>;\n filename?: InputMaybe<Scalars['String']['input']>;\n hasSpoiler?: InputMaybe<Scalars['Boolean']['input']>;\n height?: InputMaybe<Scalars['Float']['input']>;\n isAnimated?: InputMaybe<Scalars['Boolean']['input']>;\n isVideo?: InputMaybe<Scalars['Boolean']['input']>;\n mimeType?: InputMaybe<Scalars['String']['input']>;\n performer?: InputMaybe<Scalars['String']['input']>;\n setName?: InputMaybe<Scalars['String']['input']>;\n stickerType?: InputMaybe<Scalars['String']['input']>;\n supportsStreaming?: InputMaybe<Scalars['Boolean']['input']>;\n thumbnail?: InputMaybe<ThumbnailInput>;\n title?: InputMaybe<Scalars['String']['input']>;\n type: Scalars['String']['input'];\n width?: InputMaybe<Scalars['Float']['input']>;\n};\n\nexport type CreateNewsCategoryInput = {\n description?: InputMaybe<Scalars['String']['input']>;\n integrationId: Scalars['ID']['input'];\n label: Scalars['String']['input'];\n slug: Scalars['String']['input'];\n};\n\nexport type CreateNewsPostInput = {\n audienceMode?: InputMaybe<NewsAudienceMode>;\n authorIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n categoryIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n contentMarkdown: Scalars['String']['input'];\n coverImageUrl?: InputMaybe<Scalars['ID']['input']>;\n excerpt?: InputMaybe<Scalars['String']['input']>;\n integrationId: Scalars['ID']['input'];\n locale?: Scalars['String']['input'];\n slug: Scalars['String']['input'];\n tagIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n title: Scalars['String']['input'];\n};\n\nexport type CreateNewsSourceInput = {\n fieldMap?: InputMaybe<NewsSourceFieldMapInput>;\n integrationId: Scalars['ID']['input'];\n name: Scalars['String']['input'];\n rss?: InputMaybe<NewsSourceRssInput>;\n type: NewsSourceMode;\n webhookConnectionId?: InputMaybe<Scalars['ID']['input']>;\n};\n\nexport type CreateNewsTagInput = {\n description?: InputMaybe<Scalars['String']['input']>;\n integrationId: Scalars['ID']['input'];\n label: Scalars['String']['input'];\n slug: Scalars['String']['input'];\n};\n\nexport type CreateNewsletterSubscriptionInput = {\n email: Scalars['String']['input'];\n name?: InputMaybe<Scalars['String']['input']>;\n recaptchaToken?: InputMaybe<Scalars['String']['input']>;\n source: NewsletterSource;\n};\n\nexport type CreateOrganisationInput = {\n address?: InputMaybe<AddressInput>;\n business: OrganisationBusinessType;\n email?: InputMaybe<Scalars['String']['input']>;\n name: Scalars['String']['input'];\n phone?: InputMaybe<Scalars['String']['input']>;\n slug: Scalars['String']['input'];\n tags?: InputMaybe<Array<Scalars['String']['input']>>;\n type: OrganisationType;\n website?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CreatePeopleInput = {\n firstName?: InputMaybe<Scalars['String']['input']>;\n integrationId?: InputMaybe<Scalars['String']['input']>;\n isBot?: InputMaybe<Scalars['Boolean']['input']>;\n language?: InputMaybe<Scalars['String']['input']>;\n lastName?: InputMaybe<Scalars['String']['input']>;\n organisation?: InputMaybe<Scalars['String']['input']>;\n photo?: InputMaybe<Scalars['String']['input']>;\n telegramId: Scalars['Float']['input'];\n username: Scalars['String']['input'];\n};\n\nexport type CreateSsoConfigInput = {\n /** Display name for this SSO connection */\n displayName: Scalars['String']['input'];\n /** Email domains that trigger SSO (e.g., [\"acme.com\", \"acme.co.uk\"]) */\n emailDomains: Array<Scalars['String']['input']>;\n /** Organisation ID */\n organisationId: Scalars['String']['input'];\n /** SAML configuration */\n samlConfig: SamlConfigInput;\n};\n\nexport type CreateSubscriptionOutput = {\n __typename?: 'CreateSubscriptionOutput';\n clientSecret: Scalars['String']['output'];\n subscriptionId: Scalars['String']['output'];\n};\n\nexport type CreateSupportTicketInput = {\n description: Scalars['String']['input'];\n /** Pre-uploaded media IDs */\n mediaIds?: InputMaybe<Array<Scalars['String']['input']>>;\n metadata?: InputMaybe<SupportTicketMetadataInput>;\n priority?: InputMaybe<SupportTicketPriority>;\n subject: Scalars['String']['input'];\n type: SupportTicketType;\n};\n\nexport type CreateTemplateFromFlowInput = {\n category?: InputMaybe<FlowTemplateCategory>;\n description?: InputMaybe<Scalars['String']['input']>;\n flowId: Scalars['String']['input'];\n slug: Scalars['String']['input'];\n tags?: InputMaybe<Array<Scalars['String']['input']>>;\n title: Scalars['String']['input'];\n visibility?: InputMaybe<FlowTemplateVisibility>;\n};\n\nexport type CreateTriggerInput = {\n attribute?: InputMaybe<Array<Scalars['String']['input']>>;\n connectorType?: InputMaybe<ConnectorType>;\n flowId: Scalars['String']['input'];\n operator?: InputMaybe<RuleOperator>;\n scheduleConfig?: InputMaybe<ScheduleConfigInput>;\n scheduleType?: InputMaybe<ScheduleType>;\n scheduledTimezone?: InputMaybe<Scalars['String']['input']>;\n type: TriggerType;\n value?: InputMaybe<Scalars['String']['input']>;\n /** Top-level webhook connection ID */\n webhookId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CreateWebIntegrationInput = {\n aiAutoReplyAssistantId?: InputMaybe<Scalars['ID']['input']>;\n aiAutoReplyMode?: AiAutoReplyMode;\n allowedOrigins?: Array<Scalars['String']['input']>;\n name: Scalars['String']['input'];\n};\n\nexport type CreateWebhookConnectionInput = {\n contactIdentifierPath?: InputMaybe<Scalars['String']['input']>;\n contactIdentifierType?: InputMaybe<WebhookContactIdentifierType>;\n contactIntegrationId?: InputMaybe<Scalars['String']['input']>;\n direction: WebhookDirection;\n /** Scheme-specific config. For GENERIC_HMAC_SHA256: { headerName, encoding?: \"hex\"|\"base64\", prefix? }. */\n inboundAuthConfig?: InputMaybe<Scalars['JSON']['input']>;\n /** Raw signing secret for STRIPE / GENERIC_HMAC_SHA256 modes. Encrypted before persistence and never returned. */\n inboundAuthCredential?: InputMaybe<Scalars['String']['input']>;\n /** Auth scheme used to verify incoming requests. Defaults to SHARED_SECRET. */\n inboundAuthType?: InputMaybe<WebhookInboundAuthType>;\n name: Scalars['String']['input'];\n outboundAuthCredential?: InputMaybe<Scalars['String']['input']>;\n outboundAuthType?: InputMaybe<WebhookAuthType>;\n outboundSubscribedEvents?: InputMaybe<Array<Scalars['String']['input']>>;\n outboundUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CreateWebhookConnectionResponse = {\n __typename?: 'CreateWebhookConnectionResponse';\n connectionId: Scalars['String']['output'];\n endpointPath: Scalars['String']['output'];\n secret: Scalars['String']['output'];\n};\n\nexport type CreateWhatsAppTemplateInput = {\n /** Template category */\n category: WhatsAppTemplateCategory;\n /** Template components */\n components: Array<WhatsAppTemplateComponentInput>;\n /** Human-readable display name */\n displayName?: InputMaybe<Scalars['String']['input']>;\n /** Integration ID (WhatsApp Business Account) */\n integrationId: Scalars['String']['input'];\n /** Language code (e.g., en, en_US, es, de) */\n language: Scalars['String']['input'];\n /** Template name (lowercase, alphanumeric, underscores only) */\n name: Scalars['String']['input'];\n};\n\nexport type CreateWhatsAppTemplateResult = {\n __typename?: 'CreateWhatsAppTemplateResult';\n error?: Maybe<Scalars['String']['output']>;\n /** External template ID from Meta */\n externalTemplateId?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n template?: Maybe<WhatsAppTemplate>;\n};\n\nexport type CrmCardData = {\n __typename?: 'CrmCardData';\n /** List of field updates to perform */\n fieldUpdates?: Maybe<Array<CrmFieldUpdate>>;\n /** Integration ID of the CRM integration */\n integrationId?: Maybe<Scalars['String']['output']>;\n /** Next card ID to navigate to on error (only used when runInBackground is false) */\n onError?: Maybe<Scalars['String']['output']>;\n /** If true (default), CRM update runs in background and flow continues immediately. If false, flow waits for CRM update to complete and can use onError for failure handling. */\n runInBackground?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type CrmConfigInput = {\n bigQuery?: InputMaybe<BigQueryConfigInput>;\n hubSpot?: InputMaybe<HubSpotConfigInput>;\n salesforce?: InputMaybe<SalesforceConfigInput>;\n};\n\nexport type CrmConfigType = {\n __typename?: 'CrmConfigType';\n /** Field mappings between local and external CRM fields */\n fieldMappings?: Maybe<Array<CrmFieldMapping>>;\n /** Last sync timestamp */\n lastSyncAt?: Maybe<Scalars['DateTime']['output']>;\n /** Last sync job ID */\n lastSyncJobId?: Maybe<Scalars['String']['output']>;\n /** Recent sync history (last 10 entries) */\n syncHistory?: Maybe<Array<CrmSyncHistoryEntry>>;\n};\n\nexport type CrmConnectionTestResult = {\n __typename?: 'CrmConnectionTestResult';\n /** Error message if connection failed */\n message?: Maybe<Scalars['String']['output']>;\n /** Provider name (e.g., BigQuery, HubSpot) */\n provider?: Maybe<Scalars['String']['output']>;\n /** Schema from the external system if available */\n schema?: Maybe<ExternalSchema>;\n /** Whether the connection test succeeded */\n success: Scalars['Boolean']['output'];\n};\n\nexport type CrmExportInput = {\n /** Create new contacts in CRM for people that do not exist there. */\n createNew?: InputMaybe<Scalars['Boolean']['input']>;\n /** People IDs to exclude from export (only used when exportAll=true). */\n excludePeopleIds?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Export all people (subject to filters). If false and no peopleIds provided, nothing is exported. */\n exportAll?: InputMaybe<Scalars['Boolean']['input']>;\n /** Filters to apply (same as peopleList query). Only used when exportAll=true. */\n filters?: InputMaybe<Array<PeopleFilterInput>>;\n /** Maximum number of records to export (for testing/batching). */\n limit?: InputMaybe<Scalars['Int']['input']>;\n /** Specific people IDs to export. If provided, only these people are exported. */\n peopleIds?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Search query to filter people. Only used when exportAll=true. */\n search?: InputMaybe<Scalars['String']['input']>;\n /** Filter by source Telegram bot integration ID. Only exports people from this specific bot. Required when organization has multiple bots to ensure correct audience is exported. When exporting specific peopleIds, this is used for validation only. */\n sourceIntegrationId?: InputMaybe<Scalars['String']['input']>;\n /** Update existing contacts in CRM with new data. */\n updateExisting?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type CrmFieldMapping = {\n __typename?: 'CrmFieldMapping';\n /** Whether this field was auto-created from CRM import */\n autoCreated?: Maybe<Scalars['Boolean']['output']>;\n /** Whether to auto-create this field in CRM if it does not exist */\n createInCrmIfMissing?: Maybe<Scalars['Boolean']['output']>;\n /** Default value for CRM field when auto-creating. Only set if the Wexio field has a defaultValue defined. */\n crmFieldDefaultValue?: Maybe<Scalars['String']['output']>;\n /** Description for CRM field when auto-creating */\n crmFieldDescription?: Maybe<Scalars['String']['output']>;\n /** Group name for CRM field (HubSpot only) */\n crmFieldGroup?: Maybe<Scalars['String']['output']>;\n /** Label for CRM field when auto-creating */\n crmFieldLabel?: Maybe<Scalars['String']['output']>;\n /** Options for enumeration/picklist CRM fields */\n crmFieldOptions?: Maybe<Array<Scalars['String']['output']>>;\n /** Type for CRM field when auto-creating. HubSpot: string, number, date, datetime, enumeration, bool. Salesforce: Text, Number, Date, DateTime, Picklist, Checkbox. BigQuery: STRING, INT64, FLOAT64, BOOL, TIMESTAMP, DATE. */\n crmFieldType?: Maybe<Scalars['String']['output']>;\n /** Sync direction for this field. BIDIRECTIONAL (default): sync both ways. IMPORT_ONLY: only sync CRM → Wexio. EXPORT_ONLY: only sync Wexio → CRM. */\n direction?: Maybe<CrmFieldSyncDirection>;\n /** External CRM field name */\n externalField: Scalars['String']['output'];\n /** Local field key (e.g., firstName, custom_email). This is always present in stored mappings (either provided or auto-created). */\n localField: Scalars['String']['output'];\n /** Transform expression (optional) */\n transform?: Maybe<Scalars['String']['output']>;\n};\n\nexport type CrmFieldMappingInput = {\n /** If true and localField is not provided, automatically create a new custom field based on the external field name. The field key will use the original CRM name (e.g., \"opt_in\" stays as \"opt_in\", \"Marketing Preference\" becomes \"marketing_preference\"). */\n createAsCustomField?: InputMaybe<Scalars['Boolean']['input']>;\n /** [EXPORT] If true and the CRM field does not exist, automatically create it. Requires appropriate CRM permissions (HubSpot: crm.schemas.contacts.write, Salesforce: Modify Metadata). */\n createInCrmIfMissing?: InputMaybe<Scalars['Boolean']['input']>;\n /** [EXPORT] Default value for CRM field when auto-creating. Only relevant for enumeration/picklist fields. If not set, no default is applied. */\n crmFieldDefaultValue?: InputMaybe<Scalars['String']['input']>;\n /** [EXPORT] Description for the CRM field when auto-creating. */\n crmFieldDescription?: InputMaybe<Scalars['String']['input']>;\n /** [EXPORT] Group name for the CRM field (HubSpot only). Default: wexio. Other options: wexio, salesforceinformation, conversion_information, etc. */\n crmFieldGroup?: InputMaybe<Scalars['String']['input']>;\n /** [EXPORT] Label for the CRM field when auto-creating. If not provided, generates from externalField name. */\n crmFieldLabel?: InputMaybe<Scalars['String']['input']>;\n /** [EXPORT] Options for enumeration/picklist CRM fields. Required when crmFieldType is enumeration (HubSpot) or Picklist (Salesforce). */\n crmFieldOptions?: InputMaybe<Array<Scalars['String']['input']>>;\n /** [EXPORT] Type for the CRM field when auto-creating. HubSpot: string, number, date, datetime, enumeration, bool. Salesforce: Text, Number, Date, DateTime, Picklist, Checkbox. BigQuery: STRING, INT64, FLOAT64, BOOL, TIMESTAMP, DATE. If not provided, defaults to string/STRING/Text. */\n crmFieldType?: InputMaybe<Scalars['String']['input']>;\n /** [IMPORT] Custom label for the auto-created Wexio field. If not provided, uses the CRM field label or generates from field name. */\n customFieldLabel?: InputMaybe<Scalars['String']['input']>;\n /** Sync direction for this field. BIDIRECTIONAL (default): sync in both directions. IMPORT_ONLY: only sync from CRM to Wexio (import). EXPORT_ONLY: only sync from Wexio to CRM (export). */\n direction?: InputMaybe<CrmFieldSyncDirection>;\n /** External CRM field name */\n externalField: Scalars['String']['input'];\n /** [IMPORT] Options for enumeration/select fields from CRM. Will be used as options when creating ARRAY type custom fields in Wexio. */\n externalFieldOptions?: InputMaybe<Array<Scalars['String']['input']>>;\n /** [IMPORT] CRM field type (e.g., string, number, enumeration, boolean, date). Used to auto-detect the Wexio field type when creating custom fields. */\n externalFieldType?: InputMaybe<Scalars['String']['input']>;\n /** Local field key (e.g., firstName, custom_email). If not provided and createAsCustomField=true, a new custom field will be auto-created. */\n localField?: InputMaybe<Scalars['String']['input']>;\n /** Transform expression */\n transform?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Direction for syncing individual field mappings */\nexport enum CrmFieldSyncDirection {\n /** Sync in both directions (import and export) */\n BIDIRECTIONAL = 'BIDIRECTIONAL',\n /** Only sync from Wexio to CRM (export only) */\n EXPORT_ONLY = 'EXPORT_ONLY',\n /** Only sync from CRM to Wexio (import only) */\n IMPORT_ONLY = 'IMPORT_ONLY'\n}\n\nexport type CrmFieldUpdate = {\n __typename?: 'CrmFieldUpdate';\n /** CRM field name/key to update */\n crmField: Scalars['String']['output'];\n /** Value configuration */\n value?: Maybe<Scalars['String']['output']>;\n /** Source of the value */\n valueSource: CrmFieldValueSource;\n};\n\nexport type CrmFieldUpdateInput = {\n /** CRM field name/key to update (e.g., \"email\", \"custom_score\") */\n crmField: Scalars['String']['input'];\n /** Value to set. For STATIC: text with {{variables}}. For PROFILE_FIELD: field key. */\n value?: InputMaybe<Scalars['String']['input']>;\n /** Source of the value */\n valueSource?: CrmFieldValueSource;\n};\n\n/** Source type for CRM field value */\nexport enum CrmFieldValueSource {\n PROFILE_FIELD = 'PROFILE_FIELD',\n STATIC = 'STATIC'\n}\n\nexport type CrmImportInput = {\n /** Create new contacts locally for CRM contacts that do not exist. */\n createNew?: InputMaybe<Scalars['Boolean']['input']>;\n /**\n * Additional field for duplicate detection (uses Wexio/local field names).\n *\n * Matching priority (always applied in this order, regardless of this setting):\n * 1. CRM Record ID - native CRM ID if person was previously synced\n * 2. wexio_id - our internal ID stored in CRM\n * 3. duplicateKeyField - if \"telegram_id\" or \"email\" specified\n * 4. Custom field - if other duplicateKeyField specified\n *\n * Use this to specify an additional field for matching:\n * - \"telegram_id\" - match by Telegram ID (requires targetIntegrationId)\n * - \"email\" - match by email address\n * - Custom field key (e.g., \"external_id\", \"member_number\")\n *\n * Note: Use the Wexio field key from your field mappings, not the CRM field name.\n */\n duplicateKeyField?: InputMaybe<Scalars['String']['input']>;\n /**\n * Filters to apply when fetching contacts from CRM.\n * Uses CRM-native property names as the \"key\" (e.g., \"lifecyclestage\", \"hs_lead_status\" for HubSpot).\n * Same format as peopleList filters, but filtering happens in the CRM API.\n * Multiple filters are combined with AND logic.\n */\n filters?: InputMaybe<Array<PeopleFilterInput>>;\n /** Maximum number of records to import. */\n limit?: InputMaybe<Scalars['Int']['input']>;\n /** Only import records modified after this date (incremental sync). */\n modifiedAfter?: InputMaybe<Scalars['DateTime']['input']>;\n /**\n * Search query to filter CRM contacts.\n * Searches across default searchable properties (name, email, phone, etc.).\n * Note: Search behavior varies by CRM provider.\n */\n search?: InputMaybe<Scalars['String']['input']>;\n /** Target Telegram integration (bot) to associate imported people with. This enables matching by telegram_id/username within that bot context. If not provided, people are created without integration association and can only be matched by email/phone (if unique in org) or wexio_id. */\n targetIntegrationId?: InputMaybe<Scalars['String']['input']>;\n /** Update existing local contacts with imported CRM data. */\n updateExisting?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type CrmSyncHistoryEntry = {\n __typename?: 'CrmSyncHistoryEntry';\n completedAt?: Maybe<Scalars['DateTime']['output']>;\n error?: Maybe<Scalars['String']['output']>;\n jobId: Scalars['ID']['output'];\n startedAt: Scalars['DateTime']['output'];\n stats?: Maybe<CrmSyncStats>;\n status: IntegrationStatus;\n};\n\n/** Filters for listing CRM sync jobs */\nexport type CrmSyncJobFilterInput = {\n /** Filter by integration ID */\n integrationId?: InputMaybe<Scalars['String']['input']>;\n /** Filter by job type (EXPORT or IMPORT) */\n jobType?: InputMaybe<CrmSyncJobType>;\n /** Maximum number of jobs to return */\n limit?: InputMaybe<Scalars['Int']['input']>;\n /** Number of jobs to skip (for pagination) */\n offset?: InputMaybe<Scalars['Int']['input']>;\n /** Filter by job status(es) */\n status?: InputMaybe<Array<CrmSyncJobStatus>>;\n};\n\n/** Paginated list of CRM sync jobs */\nexport type CrmSyncJobListOutput = {\n __typename?: 'CrmSyncJobListOutput';\n /** List of jobs */\n jobs: Array<CrmSyncJobTypeOutput>;\n /** Total number of jobs matching criteria */\n total: Scalars['Int']['output'];\n};\n\n/** Status of a CRM sync job */\nexport enum CrmSyncJobStatus {\n CANCELLED = 'CANCELLED',\n COMPLETED = 'COMPLETED',\n FAILED = 'FAILED',\n PENDING = 'PENDING',\n PROCESSING = 'PROCESSING'\n}\n\n/** Type of CRM sync job */\nexport enum CrmSyncJobType {\n EXPORT = 'EXPORT',\n FLOW_CARD_UPDATE = 'FLOW_CARD_UPDATE',\n IMPORT = 'IMPORT'\n}\n\n/** A background CRM sync job (export or import) */\nexport type CrmSyncJobTypeOutput = {\n __typename?: 'CrmSyncJobType_Output';\n /** When the job completed */\n completedAt?: Maybe<Scalars['DateTime']['output']>;\n /** Job configuration (filters, options, etc.) */\n config?: Maybe<Scalars['JSON']['output']>;\n /** When the job was created */\n createdAt: Scalars['DateTime']['output'];\n /** IDs of newly created people (for import jobs) */\n createdPeopleIds?: Maybe<Array<Scalars['String']['output']>>;\n /** Error message if job failed */\n error?: Maybe<Scalars['String']['output']>;\n /** Details about records that failed to sync (limited to first 50 for performance). Includes record ID, identifier, and error message for debugging. */\n failedRecordDetails?: Maybe<Array<FailedRecordDetail>>;\n /** Unique job ID */\n id: Scalars['ID']['output'];\n /** ID of the CRM integration */\n integrationId: Scalars['ID']['output'];\n /** Type of sync operation (EXPORT or IMPORT) */\n jobType: CrmSyncJobType;\n /** Number of records processed so far */\n processedRecords: Scalars['Int']['output'];\n /** Progress percentage (0-100) */\n progress: Scalars['Int']['output'];\n /** New records created */\n recordsCreated: Scalars['Int']['output'];\n /** Records that failed to sync */\n recordsFailed: Scalars['Int']['output'];\n /** Records skipped (e.g., duplicates) */\n recordsSkipped: Scalars['Int']['output'];\n /** Records successfully synced (created + updated) */\n recordsSynced: Scalars['Int']['output'];\n /** Existing records updated */\n recordsUpdated: Scalars['Int']['output'];\n /** ID of the user who requested the job */\n requestedBy: Scalars['String']['output'];\n /** When the job started processing */\n startedAt?: Maybe<Scalars['DateTime']['output']>;\n /** Current status of the job */\n status: CrmSyncJobStatus;\n /** Human-readable status message */\n statusMessage?: Maybe<Scalars['String']['output']>;\n /** Total number of records to process */\n totalRecords?: Maybe<Scalars['Int']['output']>;\n /** IDs of updated people (for import jobs) */\n updatedPeopleIds?: Maybe<Array<Scalars['String']['output']>>;\n};\n\nexport type CrmSyncStats = {\n __typename?: 'CrmSyncStats';\n recordsCreated: Scalars['Int']['output'];\n recordsDeleted?: Maybe<Scalars['Int']['output']>;\n recordsFailed: Scalars['Int']['output'];\n recordsSynced: Scalars['Int']['output'];\n recordsUpdated: Scalars['Int']['output'];\n};\n\nexport type CurrentUsage = {\n __typename?: 'CurrentUsage';\n /** Current number of custom collections */\n customCollections: Scalars['Int']['output'];\n /** Current number of flows */\n flows: Scalars['Int']['output'];\n /** Current active broadcasts + schedule triggers (combined against plan.maxScheduled) */\n scheduled: Scalars['Int']['output'];\n /** Current number of team members */\n teamMembers: Scalars['Int']['output'];\n};\n\nexport type CursorPaginatedChat = {\n __typename?: 'CursorPaginatedChat';\n data: Array<Chat>;\n hasNext: Scalars['Boolean']['output'];\n hasPrevious: Scalars['Boolean']['output'];\n nextCursor?: Maybe<Scalars['String']['output']>;\n previousCursor?: Maybe<Scalars['String']['output']>;\n};\n\nexport type DataRetentionSettings = {\n __typename?: 'DataRetentionSettings';\n /** Delete associated media when a message is deleted. */\n deleteMediaWithMessage?: Maybe<Scalars['Boolean']['output']>;\n /** Last time retention cleanup was executed for this org. */\n lastCleanupAt?: Maybe<Scalars['DateTime']['output']>;\n /** Number of messages deleted in last cleanup. */\n lastCleanupCount?: Maybe<Scalars['Int']['output']>;\n /** Number of days to retain media files. null = follow message retention. If set, media is deleted independently of messages. */\n mediaRetentionDays?: Maybe<Scalars['Int']['output']>;\n /** Number of days to retain messages. null = infinite (plan limit applies). Free: max 7 days, Standard: max 30 days, Pro: max 90 days, Enterprise: unlimited. */\n messageRetentionDays?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type DeleteAccountInput = {\n /** Must be exactly \"DELETE MY ACCOUNT\" to confirm deletion */\n confirmationPhrase: Scalars['String']['input'];\n};\n\nexport type DeleteAccountResponse = {\n __typename?: 'DeleteAccountResponse';\n deletedData?: Maybe<DeletedDataSummary>;\n message: Scalars['String']['output'];\n success: Scalars['Boolean']['output'];\n};\n\nexport type DeletePasskeyInput = {\n /** Passkey ID to delete */\n passkeyId: Scalars['ID']['input'];\n};\n\nexport type DeleteWhatsAppTemplateResult = {\n __typename?: 'DeleteWhatsAppTemplateResult';\n error?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type DeletedDataSummary = {\n __typename?: 'DeletedDataSummary';\n organisationMemberships: Scalars['Int']['output'];\n passkeys: Scalars['Int']['output'];\n sessions: Scalars['Int']['output'];\n twoFactorAuth: Scalars['Boolean']['output'];\n};\n\nexport type DeviceInfo = {\n __typename?: 'DeviceInfo';\n browser: Scalars['String']['output'];\n browserVersion?: Maybe<Scalars['String']['output']>;\n deviceModel?: Maybe<Scalars['String']['output']>;\n deviceType: DeviceType;\n os: Scalars['String']['output'];\n osVersion?: Maybe<Scalars['String']['output']>;\n};\n\n/** Type of device used for the session */\nexport enum DeviceType {\n DESKTOP = 'DESKTOP',\n MOBILE = 'MOBILE',\n TABLET = 'TABLET',\n UNKNOWN = 'UNKNOWN'\n}\n\nexport type DisableTwoFactorInput = {\n code: Scalars['String']['input'];\n};\n\nexport type DisconnectIntegrationInput = {\n /** If true, also delete all People (lead) records. Default: false (keep People for lead data preservation). Applicable to MESSAGING integrations only. */\n deletePeople?: InputMaybe<Scalars['Boolean']['input']>;\n /** If true, performs a dry run and returns what would be affected */\n dryRun?: InputMaybe<Scalars['Boolean']['input']>;\n /** Integration ID to disconnect */\n integrationId: Scalars['String']['input'];\n};\n\nexport enum DiscountDurationType {\n FOREVER = 'FOREVER',\n ONCE = 'ONCE',\n REPEATING = 'REPEATING'\n}\n\nexport type DiscountInfo = {\n __typename?: 'DiscountInfo';\n /** Fixed amount off in cents */\n amountOff?: Maybe<Scalars['Float']['output']>;\n /** Currency for amountOff */\n currency?: Maybe<Scalars['String']['output']>;\n duration: DiscountDurationType;\n /** Number of months for repeating discounts */\n durationInMonths?: Maybe<Scalars['Float']['output']>;\n /** When the discount ends (for limited duration) */\n endsAt?: Maybe<Scalars['DateTime']['output']>;\n id: Scalars['String']['output'];\n name?: Maybe<Scalars['String']['output']>;\n /** Percentage off (e.g., 20 for 20%) */\n percentOff?: Maybe<Scalars['Float']['output']>;\n /** Promotion code used (if applicable) */\n promotionCode?: Maybe<Scalars['String']['output']>;\n};\n\nexport type EditTicketCommentInput = {\n commentId: Scalars['String']['input'];\n content: Scalars['String']['input'];\n /** Updated media IDs - replaces existing media attachments */\n mediaIds?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n/** Supported formats for exporting people data */\nexport enum ExportFormat {\n CSV = 'CSV',\n EXCEL = 'EXCEL',\n JSON = 'JSON'\n}\n\nexport type ExportJob = {\n __typename?: 'ExportJob';\n _id: Scalars['String']['output'];\n completedAt?: Maybe<Scalars['DateTime']['output']>;\n createdAt: Scalars['DateTime']['output'];\n error?: Maybe<Scalars['String']['output']>;\n expiresAt?: Maybe<Scalars['DateTime']['output']>;\n fields?: Maybe<Array<Scalars['String']['output']>>;\n fileSize?: Maybe<Scalars['Int']['output']>;\n fileUrl?: Maybe<Scalars['String']['output']>;\n format: ExportFormat;\n organisationId: Scalars['String']['output'];\n processedRecords?: Maybe<Scalars['Int']['output']>;\n progress?: Maybe<Scalars['Float']['output']>;\n requestedBy: Scalars['String']['output'];\n status: ExportStatus;\n totalRecords?: Maybe<Scalars['Int']['output']>;\n updatedAt: Scalars['DateTime']['output'];\n};\n\n/** Status of a people export job */\nexport enum ExportStatus {\n COMPLETED = 'COMPLETED',\n FAILED = 'FAILED',\n PENDING = 'PENDING',\n PROCESSING = 'PROCESSING'\n}\n\nexport type ExternalFieldInfo = {\n __typename?: 'ExternalFieldInfo';\n description?: Maybe<Scalars['String']['output']>;\n label: Scalars['String']['output'];\n name: Scalars['String']['output'];\n /** Available options for enumeration/select fields */\n options?: Maybe<Array<Scalars['String']['output']>>;\n /** Whether this field is read-only and cannot be written to. For HubSpot: based on modificationMetadata.readOnlyValue. For Salesforce: based on !updateable field property. Read-only fields should not be used in CRM Card field updates. */\n readOnly?: Maybe<Scalars['Boolean']['output']>;\n required: Scalars['Boolean']['output'];\n /** CRM field type (e.g., string, number, enumeration, boolean, date) */\n type: Scalars['String']['output'];\n};\n\nexport type ExternalSchema = {\n __typename?: 'ExternalSchema';\n /** List of external fields */\n fields: Array<ExternalFieldInfo>;\n /** Object/table name in the external system */\n objectType?: Maybe<Scalars['String']['output']>;\n};\n\n/** Details about a record that failed during CRM sync */\nexport type FailedRecordDetail = {\n __typename?: 'FailedRecordDetail';\n /** Error message explaining why the record failed */\n error: Scalars['String']['output'];\n /** Human-readable identifier (email, telegram_id, etc.) */\n identifier: Scalars['String']['output'];\n /** ID of the failed record (CRM ID or Wexio ID) */\n recordId: Scalars['String']['output'];\n};\n\nexport type FeedbackAnalytics = {\n __typename?: 'FeedbackAnalytics';\n /** Average rating (1-5 scale) */\n averageRating?: Maybe<Scalars['Float']['output']>;\n /** Breakdown by category */\n categoryBreakdown: Array<FeedbackCategoryStats>;\n /** Number of feature requests */\n featureRequests: Scalars['Int']['output'];\n /** Recent activity metrics */\n recentActivity: FeedbackRecentActivity;\n /** Percentage of feedback that has been processed */\n responseRate: Scalars['Float']['output'];\n /** Breakdown by sentiment */\n sentiment: SentimentBreakdown;\n /** Total feedback received */\n totalFeedback: Scalars['Int']['output'];\n};\n\n/** Category of platform feedback */\nexport enum FeedbackCategory {\n DOCUMENTATION = 'DOCUMENTATION',\n FEATURE = 'FEATURE',\n OTHER = 'OTHER',\n PERFORMANCE = 'PERFORMANCE',\n PRICING = 'PRICING',\n UI_UX = 'UI_UX'\n}\n\nexport type FeedbackCategoryStats = {\n __typename?: 'FeedbackCategoryStats';\n category: Scalars['String']['output'];\n count: Scalars['Int']['output'];\n percent: Scalars['Float']['output'];\n};\n\nexport type FeedbackFilterInput = {\n category?: InputMaybe<Array<FeedbackCategory>>;\n cursor?: InputMaybe<Scalars['String']['input']>;\n isFeatureRequest?: InputMaybe<Scalars['Boolean']['input']>;\n isProcessed?: InputMaybe<Scalars['Boolean']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n /** Maximum rating */\n maxRating?: InputMaybe<Scalars['Int']['input']>;\n /** Minimum rating */\n minRating?: InputMaybe<Scalars['Int']['input']>;\n /** Filter by organisation ID */\n organisationId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type FeedbackRecentActivity = {\n __typename?: 'FeedbackRecentActivity';\n /** Feedback awaiting processing */\n awaitingProcessing: Scalars['Int']['output'];\n /** New feedback received today */\n newToday: Scalars['Int']['output'];\n /** Feedback processed this week */\n processedThisWeek: Scalars['Int']['output'];\n};\n\nexport type FetchCardData = {\n __typename?: 'FetchCardData';\n errorHandling?: Maybe<FetchErrorHandling>;\n name?: Maybe<Scalars['String']['output']>;\n request?: Maybe<FetchRequest>;\n responseMapping?: Maybe<Array<ResponseMapping>>;\n};\n\nexport type FetchErrorHandling = {\n __typename?: 'FetchErrorHandling';\n fallbackVariables?: Maybe<Array<ResponseMapping>>;\n onError?: Maybe<Scalars['String']['output']>;\n onTimeout?: Maybe<Scalars['String']['output']>;\n};\n\nexport type FetchErrorHandlingInput = {\n fallbackVariables?: InputMaybe<Array<ResponseMappingInput>>;\n onError?: InputMaybe<Scalars['String']['input']>;\n onTimeout?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type FetchHeader = {\n __typename?: 'FetchHeader';\n name?: Maybe<Scalars['String']['output']>;\n value?: Maybe<Scalars['String']['output']>;\n};\n\nexport type FetchHeaderInput = {\n name?: InputMaybe<Scalars['String']['input']>;\n value?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type FetchRequest = {\n __typename?: 'FetchRequest';\n body?: Maybe<Scalars['String']['output']>;\n headers?: Maybe<Array<FetchHeader>>;\n method: HttpMethod;\n timeout?: Maybe<Scalars['Float']['output']>;\n url?: Maybe<Scalars['String']['output']>;\n};\n\nexport type FetchRequestInput = {\n body?: InputMaybe<Scalars['String']['input']>;\n headers?: InputMaybe<Array<FetchHeaderInput>>;\n method: HttpMethod;\n timeout?: InputMaybe<Scalars['Float']['input']>;\n url?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** The supported field types for people fields */\nexport enum FieldType {\n ARRAY = 'ARRAY',\n BOOLEAN = 'BOOLEAN',\n DATE = 'DATE',\n NUMBER = 'NUMBER',\n STRING = 'STRING'\n}\n\n/** The visibility level of a field */\nexport enum FieldVisibility {\n PRIVATE = 'PRIVATE',\n PUBLIC = 'PUBLIC'\n}\n\n/** Available operators for filtering data across the application */\nexport enum FilterOperator {\n BETWEEN = 'BETWEEN',\n CONTAINS = 'CONTAINS',\n CONTAINS_ALL = 'CONTAINS_ALL',\n CONTAINS_ANY = 'CONTAINS_ANY',\n ENDS_WITH = 'ENDS_WITH',\n EQUALS = 'EQUALS',\n EXISTS = 'EXISTS',\n GREATER_THAN = 'GREATER_THAN',\n GREATER_THAN_OR_EQUAL = 'GREATER_THAN_OR_EQUAL',\n IN = 'IN',\n IS_EMPTY = 'IS_EMPTY',\n IS_NOT_EMPTY = 'IS_NOT_EMPTY',\n LESS_THAN = 'LESS_THAN',\n LESS_THAN_OR_EQUAL = 'LESS_THAN_OR_EQUAL',\n NOT_CONTAINS = 'NOT_CONTAINS',\n NOT_EQUALS = 'NOT_EQUALS',\n NOT_EXISTS = 'NOT_EXISTS',\n NOT_IN = 'NOT_IN',\n REGEX = 'REGEX',\n STARTS_WITH = 'STARTS_WITH'\n}\n\nexport type Flow = {\n __typename?: 'Flow';\n _id: Scalars['String']['output'];\n cards?: Maybe<Array<Card>>;\n createdAt: Scalars['DateTime']['output'];\n createdBy: Scalars['String']['output'];\n /** Reference to the template this flow was created from */\n createdFromTemplateId?: Maybe<Scalars['String']['output']>;\n /** Default AI assistant ID for this flow */\n defaultAIAssistantId?: Maybe<Scalars['String']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n /** Flow execution timeout in minutes (0 = no timeout) */\n executeTimeoutMinutes?: Maybe<Scalars['Float']['output']>;\n /** Whether draft has unpublished changes compared to live version */\n hasUnpublishedChanges: Scalars['Boolean']['output'];\n /** Specific integration IDs this flow runs on (when runOnAllIntegrations is false) */\n integrationIds?: Maybe<Array<Scalars['String']['output']>>;\n isActive: Scalars['Boolean']['output'];\n organisationId: Scalars['String']['output'];\n /** Snapshot of the currently published version (null if unpublished) */\n publishedVersion?: Maybe<FlowVersionSnapshot>;\n /** Version number currently live (null if never published) */\n publishedVersionNumber?: Maybe<Scalars['Int']['output']>;\n /** Whether this flow runs on all bots or only specific ones */\n runOnAllIntegrations: Scalars['Boolean']['output'];\n start?: Maybe<Scalars['String']['output']>;\n status: FlowStatus;\n /** Strict mode (true): Validates input types - buttons expect clicks, questions expect text. Prevents navigation after completion. Non-strict (false): Allows any input anytime, enables re-navigation after completion. */\n strictMode: Scalars['Boolean']['output'];\n /** Error message shown when user sends wrong input type in strict mode (e.g., text when buttons expected). If not set, wrong inputs are silently ignored. */\n strictModeErrorMessage?: Maybe<Scalars['String']['output']>;\n title: Scalars['String']['output'];\n triggerPosition?: Maybe<CardPosition>;\n triggers?: Maybe<Array<Trigger>>;\n updatedAt: Scalars['DateTime']['output'];\n version: Scalars['Float']['output'];\n};\n\nexport type FlowActivity = {\n __typename?: 'FlowActivity';\n _id: Scalars['String']['output'];\n action: FlowActivityAction;\n createdAt: Scalars['DateTime']['output'];\n /** Contextual details: cardId, cardTitle, triggerType, field changed, etc. */\n details?: Maybe<Scalars['JSON']['output']>;\n flowId: Scalars['String']['output'];\n /** Actor who performed the action (User or AIAssistant) */\n from?: Maybe<FlowActivityActorUnion>;\n organisationId: Scalars['String']['output'];\n /** Full flow snapshot AFTER this mutation — enables switching to any activity */\n snapshot?: Maybe<FlowVersionSnapshot>;\n updatedAt: Scalars['DateTime']['output'];\n /** null = unpublished draft change; stamped on publish with the version number */\n versionNumber?: Maybe<Scalars['Int']['output']>;\n};\n\n/** Actions tracked in flow activity history */\nexport enum FlowActivityAction {\n CARDS_BULK_DELETED = 'CARDS_BULK_DELETED',\n CARDS_BULK_RESTORED = 'CARDS_BULK_RESTORED',\n CARD_ADDED = 'CARD_ADDED',\n CARD_DELETED = 'CARD_DELETED',\n CARD_RESTORED = 'CARD_RESTORED',\n CARD_UPDATED = 'CARD_UPDATED',\n FLOW_ACTIVITY_SWITCHED = 'FLOW_ACTIVITY_SWITCHED',\n FLOW_PUBLISHED = 'FLOW_PUBLISHED',\n FLOW_SETTINGS_UPDATED = 'FLOW_SETTINGS_UPDATED',\n FLOW_UNPUBLISHED = 'FLOW_UNPUBLISHED',\n FLOW_VERSION_SWITCHED = 'FLOW_VERSION_SWITCHED',\n TRIGGER_ADDED = 'TRIGGER_ADDED',\n TRIGGER_DELETED = 'TRIGGER_DELETED',\n TRIGGER_UPDATED = 'TRIGGER_UPDATED'\n}\n\nexport type FlowActivityActorUnion = AiAssistant | User;\n\nexport type FlowActivityFilterInput = {\n /** If true, return only draft activities (versionNumber = null) */\n draftOnly?: InputMaybe<Scalars['Boolean']['input']>;\n /** Filter by specific version number */\n versionNumber?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type FlowCardData = {\n __typename?: 'FlowCardData';\n /** Flow ID to execute as sub-flow */\n flowId?: Maybe<Scalars['String']['output']>;\n /** Next card ID to navigate to if sub-flow execution fails or errors */\n onError?: Maybe<Scalars['String']['output']>;\n /** Next card ID to navigate to if sub-flow times out (exceeds its configured timeout). If not specified, uses onError. */\n onTimeout?: Maybe<Scalars['String']['output']>;\n};\n\nexport type FlowFilterInput = {\n search?: InputMaybe<Scalars['String']['input']>;\n status?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Who initiated or terminated a flow */\nexport enum FlowInitiator {\n FLOW_COMPLETED = 'FLOW_COMPLETED',\n OPERATOR = 'OPERATOR',\n SYSTEM = 'SYSTEM',\n TIMEOUT = 'TIMEOUT',\n USER_TRIGGER = 'USER_TRIGGER',\n WEBHOOK = 'WEBHOOK'\n}\n\nexport type FlowLabeledPrice = {\n __typename?: 'FlowLabeledPrice';\n /** Price in smallest currency units (e.g., cents). For $1.45 pass 145. */\n amount: Scalars['Float']['output'];\n /** Portion label (e.g., \"Product Price\", \"Tax\") */\n label: Scalars['String']['output'];\n};\n\nexport type FlowLabeledPriceInput = {\n /** Price in smallest currency units (e.g., cents). For $1.45 pass 145. */\n amount: Scalars['Float']['input'];\n /** Portion label (e.g., \"Product Price\", \"Tax\") */\n label: Scalars['String']['input'];\n};\n\nexport type FlowLoginUrlConfig = {\n __typename?: 'FlowLoginUrlConfig';\n /** Username of a bot for authorization */\n botUsername?: Maybe<Scalars['String']['output']>;\n /** New text of the button in forwarded messages */\n forwardText?: Maybe<Scalars['String']['output']>;\n /** Pass true to request write access for the bot */\n requestWriteAccess?: Maybe<Scalars['Boolean']['output']>;\n /** HTTPS URL to be opened with user authorization data */\n url: Scalars['String']['output'];\n};\n\nexport type FlowLoginUrlConfigInput = {\n /** Username of a bot for authorization */\n botUsername?: InputMaybe<Scalars['String']['input']>;\n /** New text of the button in forwarded messages */\n forwardText?: InputMaybe<Scalars['String']['input']>;\n /** Pass true to request write access for the bot */\n requestWriteAccess?: InputMaybe<Scalars['Boolean']['input']>;\n /** HTTPS URL to be opened with user authorization data */\n url: Scalars['String']['input'];\n};\n\nexport type FlowMetrics = {\n __typename?: 'FlowMetrics';\n newInPeriod?: Maybe<Scalars['Int']['output']>;\n published: Scalars['Int']['output'];\n total: Scalars['Int']['output'];\n};\n\nexport type FlowPaymentConfig = {\n __typename?: 'FlowPaymentConfig';\n /** Three-letter ISO 4217 currency code (e.g., \"USD\", \"EUR\") or \"XTR\" for Telegram Stars */\n currency: Scalars['String']['output'];\n /** Product description, 1-255 characters */\n description: Scalars['String']['output'];\n /** Final price depends on shipping method (requires needShippingAddress) */\n isFlexible?: Maybe<Scalars['Boolean']['output']>;\n /** Maximum tip amount in smallest currency units (e.g., 500 = $5.00) */\n maxTipAmount?: Maybe<Scalars['Float']['output']>;\n /** Invoice photo media (autopopulated). Public S3 URL, width, height and fileSize are read from the Media entity. */\n media?: Maybe<Media>;\n /** Require user email to complete the order */\n needEmail?: Maybe<Scalars['Boolean']['output']>;\n /** Require user full name to complete the order */\n needName?: Maybe<Scalars['Boolean']['output']>;\n /** Require user phone number to complete the order */\n needPhoneNumber?: Maybe<Scalars['Boolean']['output']>;\n /** Require user shipping address to complete the order */\n needShippingAddress?: Maybe<Scalars['Boolean']['output']>;\n /** Price breakdown (product price, tax, discount, etc.) */\n prices: Array<FlowLabeledPrice>;\n /** JSON-serialized data about the invoice for the payment provider */\n providerData?: Maybe<Scalars['String']['output']>;\n /** Payment provider token from @BotFather. Use empty string \"\" for Telegram Stars (XTR). */\n providerToken: Scalars['String']['output'];\n /** Send email to payment provider */\n sendEmailToProvider?: Maybe<Scalars['Boolean']['output']>;\n /** Send phone number to payment provider */\n sendPhoneNumberToProvider?: Maybe<Scalars['Boolean']['output']>;\n /** Unique deep-linking parameter. If empty, forwarded copies keep Pay button. */\n startParameter?: Maybe<Scalars['String']['output']>;\n /** Suggested tip amounts in smallest currency units (max 4, must be ascending) */\n suggestedTipAmounts?: Maybe<Array<Scalars['Float']['output']>>;\n /** Product name, 1-32 characters */\n title: Scalars['String']['output'];\n};\n\nexport type FlowPaymentConfigInput = {\n /** Three-letter ISO 4217 currency code (e.g., \"USD\", \"EUR\") or \"XTR\" for Telegram Stars */\n currency: Scalars['String']['input'];\n /** Product description, 1-255 characters */\n description: Scalars['String']['input'];\n isFlexible?: InputMaybe<Scalars['Boolean']['input']>;\n maxTipAmount?: InputMaybe<Scalars['Float']['input']>;\n /** Media ObjectId for the invoice photo. Backend resolves url, width, height and fileSize from the Media entity. */\n media?: InputMaybe<Scalars['String']['input']>;\n needEmail?: InputMaybe<Scalars['Boolean']['input']>;\n needName?: InputMaybe<Scalars['Boolean']['input']>;\n needPhoneNumber?: InputMaybe<Scalars['Boolean']['input']>;\n needShippingAddress?: InputMaybe<Scalars['Boolean']['input']>;\n /** Price breakdown (product price, tax, discount, etc.) */\n prices: Array<FlowLabeledPriceInput>;\n providerData?: InputMaybe<Scalars['String']['input']>;\n /** Payment provider token from @BotFather. Use empty string \"\" for Telegram Stars (XTR). */\n providerToken: Scalars['String']['input'];\n sendEmailToProvider?: InputMaybe<Scalars['Boolean']['input']>;\n sendPhoneNumberToProvider?: InputMaybe<Scalars['Boolean']['input']>;\n startParameter?: InputMaybe<Scalars['String']['input']>;\n suggestedTipAmounts?: InputMaybe<Array<Scalars['Float']['input']>>;\n /** Product name, 1-32 characters */\n title: Scalars['String']['input'];\n};\n\nexport type FlowRequestChatConfig = {\n __typename?: 'FlowRequestChatConfig';\n /** Bot membership requirement */\n botIsMember?: Maybe<Scalars['Boolean']['output']>;\n /** Chat must have a username */\n chatHasUsername?: Maybe<Scalars['Boolean']['output']>;\n /** Request a channel (true) or group/supergroup (false) */\n chatIsChannel: Scalars['Boolean']['output'];\n /** Chat must be created by user */\n chatIsCreated?: Maybe<Scalars['Boolean']['output']>;\n /** Request forum topics */\n chatIsForum?: Maybe<Scalars['Boolean']['output']>;\n /** Unique identifier for the request */\n requestId: Scalars['Float']['output'];\n /** Whether to request chat photo */\n requestPhoto?: Maybe<Scalars['Boolean']['output']>;\n /** Whether to request chat title */\n requestTitle?: Maybe<Scalars['Boolean']['output']>;\n /** Whether to request chat username */\n requestUsername?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type FlowRequestChatConfigInput = {\n /** Bot membership requirement */\n botIsMember?: InputMaybe<Scalars['Boolean']['input']>;\n /** Chat must have a username */\n chatHasUsername?: InputMaybe<Scalars['Boolean']['input']>;\n /** Request a channel (true) or group/supergroup (false) */\n chatIsChannel: Scalars['Boolean']['input'];\n /** Chat must be created by user */\n chatIsCreated?: InputMaybe<Scalars['Boolean']['input']>;\n /** Request forum topics */\n chatIsForum?: InputMaybe<Scalars['Boolean']['input']>;\n /** Unique identifier for the request */\n requestId: Scalars['Float']['input'];\n /** Whether to request chat photo */\n requestPhoto?: InputMaybe<Scalars['Boolean']['input']>;\n /** Whether to request chat title */\n requestTitle?: InputMaybe<Scalars['Boolean']['input']>;\n /** Whether to request chat username */\n requestUsername?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type FlowRequestUsersConfig = {\n __typename?: 'FlowRequestUsersConfig';\n /** Maximum number of users to select */\n maxQuantity?: Maybe<Scalars['Float']['output']>;\n /** Unique identifier for the request */\n requestId: Scalars['Float']['output'];\n /** Whether to request user names */\n requestName?: Maybe<Scalars['Boolean']['output']>;\n /** Whether to request user photos */\n requestPhoto?: Maybe<Scalars['Boolean']['output']>;\n /** Whether to request usernames */\n requestUsername?: Maybe<Scalars['Boolean']['output']>;\n /** Allow bots to be selected */\n userIsBot?: Maybe<Scalars['Boolean']['output']>;\n /** Allow premium users to be selected */\n userIsPremium?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type FlowRequestUsersConfigInput = {\n /** Maximum number of users to select */\n maxQuantity?: InputMaybe<Scalars['Float']['input']>;\n /** Unique identifier for the request */\n requestId: Scalars['Float']['input'];\n /** Whether to request user names */\n requestName?: InputMaybe<Scalars['Boolean']['input']>;\n /** Whether to request user photos */\n requestPhoto?: InputMaybe<Scalars['Boolean']['input']>;\n /** Whether to request usernames */\n requestUsername?: InputMaybe<Scalars['Boolean']['input']>;\n /** Allow bots to be selected */\n userIsBot?: InputMaybe<Scalars['Boolean']['input']>;\n /** Allow premium users to be selected */\n userIsPremium?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type FlowSnapshot = {\n __typename?: 'FlowSnapshot';\n cards: Scalars['JSON']['output'];\n defaultAIAssistantId?: Maybe<Scalars['String']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n executeTimeoutMinutes?: Maybe<Scalars['Float']['output']>;\n start?: Maybe<Scalars['String']['output']>;\n status: Scalars['String']['output'];\n title: Scalars['String']['output'];\n triggerPosition?: Maybe<CardPosition>;\n triggers: Scalars['JSON']['output'];\n version?: Maybe<Scalars['Float']['output']>;\n};\n\n/** Status of a flow */\nexport enum FlowStatus {\n ARCHIVED = 'ARCHIVED',\n DRAFT = 'DRAFT',\n PUBLISHED = 'PUBLISHED'\n}\n\nexport type FlowSwitchInlineQueryChosenChatConfig = {\n __typename?: 'FlowSwitchInlineQueryChosenChatConfig';\n /** Allow choosing bot chats */\n allowBotChats?: Maybe<Scalars['Boolean']['output']>;\n /** Allow choosing channels */\n allowChannelChats?: Maybe<Scalars['Boolean']['output']>;\n /** Allow choosing groups */\n allowGroupChats?: Maybe<Scalars['Boolean']['output']>;\n /** Allow choosing users */\n allowUserChats?: Maybe<Scalars['Boolean']['output']>;\n /** Default inline query */\n query?: Maybe<Scalars['String']['output']>;\n};\n\nexport type FlowSwitchInlineQueryChosenChatConfigInput = {\n /** Allow choosing bot chats */\n allowBotChats?: InputMaybe<Scalars['Boolean']['input']>;\n /** Allow choosing channels */\n allowChannelChats?: InputMaybe<Scalars['Boolean']['input']>;\n /** Allow choosing groups */\n allowGroupChats?: InputMaybe<Scalars['Boolean']['input']>;\n /** Allow choosing users */\n allowUserChats?: InputMaybe<Scalars['Boolean']['input']>;\n /** Default inline query */\n query?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type FlowTemplate = {\n __typename?: 'FlowTemplate';\n _id: Scalars['String']['output'];\n approval?: Maybe<TemplateApprovalInfo>;\n category?: Maybe<FlowTemplateCategory>;\n changelog?: Maybe<Array<Scalars['String']['output']>>;\n createdAt: Scalars['DateTime']['output'];\n createdBy?: Maybe<User>;\n createdFromTemplateId?: Maybe<Scalars['String']['output']>;\n deletedAt?: Maybe<Scalars['DateTime']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n flowSnapshot: FlowSnapshot;\n icon?: Maybe<Scalars['String']['output']>;\n isActive: Scalars['Boolean']['output'];\n isFeatured: Scalars['Boolean']['output'];\n lastUsedAt?: Maybe<Scalars['DateTime']['output']>;\n migrations?: Maybe<TemplateMigrations>;\n organisation?: Maybe<Organisation>;\n previewData?: Maybe<FlowTemplatePreview>;\n requirements?: Maybe<Array<CardType>>;\n slug: Scalars['String']['output'];\n sourceFlowId?: Maybe<Scalars['String']['output']>;\n tags: Array<Scalars['String']['output']>;\n thumbnail?: Maybe<Media>;\n title: Scalars['String']['output'];\n uniqueUsersCount: Scalars['Float']['output'];\n updatedAt: Scalars['DateTime']['output'];\n usageCount: Scalars['Float']['output'];\n version: Scalars['String']['output'];\n visibility: FlowTemplateVisibility;\n};\n\n/** Category of a flow template */\nexport enum FlowTemplateCategory {\n AI_ASSISTANT = 'AI_ASSISTANT',\n APPOINTMENT_BOOKING = 'APPOINTMENT_BOOKING',\n CHATBOT = 'CHATBOT',\n CONSENT_MANAGEMENT = 'CONSENT_MANAGEMENT',\n CUSTOMER_SUPPORT = 'CUSTOMER_SUPPORT',\n DATA_COLLECTION = 'DATA_COLLECTION',\n ECOMMERCE = 'ECOMMERCE',\n EDUCATION = 'EDUCATION',\n EMPLOYEE_ENGAGEMENT = 'EMPLOYEE_ENGAGEMENT',\n FEEDBACK = 'FEEDBACK',\n FINANCE = 'FINANCE',\n GDPR_COMPLIANCE = 'GDPR_COMPLIANCE',\n HEALTHCARE = 'HEALTHCARE',\n HR_RECRUITMENT = 'HR_RECRUITMENT',\n INTERNAL_SUPPORT = 'INTERNAL_SUPPORT',\n LEAD_GENERATION = 'LEAD_GENERATION',\n MARKETING = 'MARKETING',\n NOTIFICATIONS = 'NOTIFICATIONS',\n ONBOARDING = 'ONBOARDING',\n OPT_OUT = 'OPT_OUT',\n ORDER_MANAGEMENT = 'ORDER_MANAGEMENT',\n OTHER = 'OTHER',\n QUIZZES = 'QUIZZES',\n REAL_ESTATE = 'REAL_ESTATE',\n REMINDERS = 'REMINDERS',\n SALES = 'SALES',\n SURVEYS_FORMS = 'SURVEYS_FORMS',\n TRAINING = 'TRAINING',\n TRAVEL_HOSPITALITY = 'TRAVEL_HOSPITALITY'\n}\n\n/** Difficulty level of implementing a flow template */\nexport enum FlowTemplateDifficulty {\n ADVANCED = 'ADVANCED',\n BEGINNER = 'BEGINNER',\n INTERMEDIATE = 'INTERMEDIATE'\n}\n\nexport type FlowTemplateFilterInput = {\n category?: InputMaybe<FlowTemplateCategory>;\n featured?: InputMaybe<Scalars['Boolean']['input']>;\n organisationId?: InputMaybe<Scalars['String']['input']>;\n requirements?: InputMaybe<Array<CardType>>;\n search?: InputMaybe<Scalars['String']['input']>;\n sortBy?: InputMaybe<Scalars['String']['input']>;\n tags?: InputMaybe<Array<Scalars['String']['input']>>;\n visibility?: InputMaybe<FlowTemplateVisibility>;\n};\n\nexport type FlowTemplatePreview = {\n __typename?: 'FlowTemplatePreview';\n cardCount: Scalars['Float']['output'];\n difficulty?: Maybe<FlowTemplateDifficulty>;\n estimatedSetupTime?: Maybe<Scalars['Float']['output']>;\n triggerCount: Scalars['Float']['output'];\n};\n\n/** Visibility level of a flow template */\nexport enum FlowTemplateVisibility {\n PRIVATE = 'PRIVATE',\n PUBLIC = 'PUBLIC',\n SYSTEM = 'SYSTEM'\n}\n\nexport type FlowVersion = {\n __typename?: 'FlowVersion';\n _id: Scalars['String']['output'];\n /** Number of activities recorded for this version */\n activityCount?: Maybe<Scalars['Int']['output']>;\n createdAt: Scalars['DateTime']['output'];\n /** Optional description of changes */\n description?: Maybe<Scalars['String']['output']>;\n flowId: Scalars['String']['output'];\n /** Whether this version is currently live */\n isLive: Scalars['Boolean']['output'];\n /** Optional label like \"Launch version\" */\n label?: Maybe<Scalars['String']['output']>;\n organisationId: Scalars['String']['output'];\n /** User who published this version */\n publishedBy: User;\n /** Immutable snapshot of flow state */\n snapshot: FlowVersionSnapshot;\n updatedAt: Scalars['DateTime']['output'];\n /** Monotonically increasing version number */\n versionNumber: Scalars['Int']['output'];\n};\n\nexport type FlowVersionCardSnapshot = {\n __typename?: 'FlowVersionCardSnapshot';\n /** Original card ID preserved as string */\n _id: Scalars['String']['output'];\n aiAssistantId?: Maybe<Scalars['String']['output']>;\n async?: Maybe<Scalars['JSON']['output']>;\n /** Card data (buttons, media, text, etc.) */\n data?: Maybe<Scalars['JSON']['output']>;\n integrationId?: Maybe<Scalars['String']['output']>;\n isActive?: Maybe<Scalars['Boolean']['output']>;\n nextCardId?: Maybe<Scalars['String']['output']>;\n position: Scalars['JSON']['output'];\n size?: Maybe<Scalars['JSON']['output']>;\n strictModeErrorMessage?: Maybe<Scalars['String']['output']>;\n title: Scalars['String']['output'];\n /** CardType enum value */\n type: Scalars['String']['output'];\n wa?: Maybe<Scalars['JSON']['output']>;\n};\n\nexport type FlowVersionSnapshot = {\n __typename?: 'FlowVersionSnapshot';\n cards: Array<FlowVersionCardSnapshot>;\n defaultAIAssistantId?: Maybe<Scalars['String']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n executeTimeoutMinutes?: Maybe<Scalars['Int']['output']>;\n integrationIds?: Maybe<Array<Scalars['String']['output']>>;\n runOnAllIntegrations?: Maybe<Scalars['Boolean']['output']>;\n /** Entry-point card ID */\n start?: Maybe<Scalars['String']['output']>;\n strictMode?: Maybe<Scalars['Boolean']['output']>;\n strictModeErrorMessage?: Maybe<Scalars['String']['output']>;\n title: Scalars['String']['output'];\n triggerPosition?: Maybe<Scalars['JSON']['output']>;\n triggers: Array<FlowVersionTriggerSnapshot>;\n};\n\nexport type FlowVersionTriggerSnapshot = {\n __typename?: 'FlowVersionTriggerSnapshot';\n /** Original trigger ID preserved as string */\n _id: Scalars['String']['output'];\n attribute?: Maybe<Array<Scalars['String']['output']>>;\n connectorType?: Maybe<Scalars['String']['output']>;\n operator?: Maybe<Scalars['String']['output']>;\n type: Scalars['String']['output'];\n value?: Maybe<Scalars['String']['output']>;\n};\n\nexport type FlowWebAppConfig = {\n __typename?: 'FlowWebAppConfig';\n /** HTTPS URL of the Web App to be opened */\n url: Scalars['String']['output'];\n};\n\nexport type FlowWebAppConfigInput = {\n /** HTTPS URL of the Web App to be opened */\n url: Scalars['String']['input'];\n};\n\nexport type FlowWhatsAppFlowActionPayload = {\n __typename?: 'FlowWhatsAppFlowActionPayload';\n /** Screen to navigate to */\n screen?: Maybe<Scalars['String']['output']>;\n};\n\nexport type FlowWhatsAppFlowActionPayloadInput = {\n /** Screen to navigate to */\n screen?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type FlowWhatsAppFlowConfig = {\n __typename?: 'FlowWhatsAppFlowConfig';\n /** Flow action: navigate or data_exchange */\n flowAction?: Maybe<Scalars['String']['output']>;\n /** Flow action payload */\n flowActionPayload?: Maybe<FlowWhatsAppFlowActionPayload>;\n /** Flow ID from WhatsApp Business Manager */\n flowId: Scalars['String']['output'];\n /** Flow token for identification */\n flowToken?: Maybe<Scalars['String']['output']>;\n};\n\nexport type FlowWhatsAppFlowConfigInput = {\n /** Flow action: navigate or data_exchange */\n flowAction?: InputMaybe<Scalars['String']['input']>;\n /** Flow action payload */\n flowActionPayload?: InputMaybe<FlowWhatsAppFlowActionPayloadInput>;\n /** Flow ID from WhatsApp Business Manager */\n flowId: Scalars['String']['input'];\n /** Flow token for identification */\n flowToken?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type FlowWhatsAppProductConfig = {\n __typename?: 'FlowWhatsAppProductConfig';\n /** Catalog ID from Facebook Business Manager */\n catalogId: Scalars['String']['output'];\n /** Product retailer ID (SKU) */\n productRetailerId: Scalars['String']['output'];\n};\n\nexport type FlowWhatsAppProductConfigInput = {\n /** Catalog ID from Facebook Business Manager */\n catalogId: Scalars['String']['input'];\n /** Product retailer ID (SKU) */\n productRetailerId: Scalars['String']['input'];\n};\n\nexport type FlowWhatsAppProductItem = {\n __typename?: 'FlowWhatsAppProductItem';\n /** Product retailer ID (SKU) */\n productRetailerId: Scalars['String']['output'];\n};\n\nexport type FlowWhatsAppProductItemInput = {\n /** Product retailer ID (SKU) */\n productRetailerId: Scalars['String']['input'];\n};\n\nexport type FlowWhatsAppProductListConfig = {\n __typename?: 'FlowWhatsAppProductListConfig';\n /** Catalog ID from Facebook Business Manager */\n catalogId: Scalars['String']['output'];\n /** List of product sections */\n sections: Array<FlowWhatsAppProductSection>;\n};\n\nexport type FlowWhatsAppProductListConfigInput = {\n /** Catalog ID from Facebook Business Manager */\n catalogId: Scalars['String']['input'];\n /** List of product sections */\n sections: Array<FlowWhatsAppProductSectionInput>;\n};\n\nexport type FlowWhatsAppProductSection = {\n __typename?: 'FlowWhatsAppProductSection';\n /** Products in this section */\n productItems: Array<FlowWhatsAppProductItem>;\n /** Section title */\n title?: Maybe<Scalars['String']['output']>;\n};\n\nexport type FlowWhatsAppProductSectionInput = {\n /** Products in this section */\n productItems: Array<FlowWhatsAppProductItemInput>;\n /** Section title */\n title?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type GameAnimation = {\n __typename?: 'GameAnimation';\n /** Duration in seconds */\n duration?: Maybe<Scalars['Int']['output']>;\n /** Telegram file identifier */\n fileId?: Maybe<Scalars['String']['output']>;\n /** Original animation filename */\n fileName?: Maybe<Scalars['String']['output']>;\n /** File size in bytes */\n fileSize?: Maybe<Scalars['Int']['output']>;\n /** Unique file identifier */\n fileUniqueId?: Maybe<Scalars['String']['output']>;\n /** Video height */\n height?: Maybe<Scalars['Int']['output']>;\n /** MIME type of the file */\n mimeType?: Maybe<Scalars['String']['output']>;\n /** Animation URL (for display) */\n url?: Maybe<Scalars['String']['output']>;\n /** Video width */\n width?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type GamePhoto = {\n __typename?: 'GamePhoto';\n /** Telegram file identifier */\n fileId?: Maybe<Scalars['String']['output']>;\n /** File size in bytes */\n fileSize?: Maybe<Scalars['Int']['output']>;\n /** Unique file identifier */\n fileUniqueId?: Maybe<Scalars['String']['output']>;\n /** Photo height */\n height?: Maybe<Scalars['Int']['output']>;\n /** Photo URL (for display) */\n url?: Maybe<Scalars['String']['output']>;\n /** Photo width */\n width?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type GeneratePasskeyAuthenticationInput = {\n /** Email to limit passkey selection */\n email?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type GetCursorPaginatedInput = {\n before?: InputMaybe<Scalars['Boolean']['input']>;\n cursor?: InputMaybe<Scalars['String']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type GetInvoicesInput = {\n /** Number of items per page (1-100) */\n limit?: InputMaybe<Scalars['Float']['input']>;\n /** Page number (starting from 1) */\n page?: InputMaybe<Scalars['Float']['input']>;\n status?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type GetNotificationsInput = {\n category?: InputMaybe<NotificationCategory>;\n /** Include archived notifications */\n includeArchived?: InputMaybe<Scalars['Boolean']['input']>;\n /** Filter by archived status (true = only archived, false = only non-archived) */\n isArchived?: InputMaybe<Scalars['Boolean']['input']>;\n /** Filter by read status */\n isRead?: InputMaybe<Scalars['Boolean']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n /** Filter by organisation ID */\n organisationId?: InputMaybe<Scalars['String']['input']>;\n skip?: InputMaybe<Scalars['Int']['input']>;\n type?: InputMaybe<UserNotificationType>;\n};\n\nexport type GetSortedInput = {\n sortBy?: Scalars['String']['input'];\n sortOrder?: Scalars['String']['input'];\n};\n\nexport type GetVariablesInput = {\n /** Card ID (optional for card-specific context) */\n cardId?: InputMaybe<Scalars['ID']['input']>;\n /** Case-sensitive search */\n caseSensitive?: InputMaybe<Scalars['Boolean']['input']>;\n /** Filter by specific categories (system, organisation, user, chat, people, flow, lastMessage) */\n categories?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Chat ID (optional for chat-specific variables) */\n chatId?: InputMaybe<Scalars['ID']['input']>;\n /** Flow ID (optional for flow-specific variables) */\n flowId?: InputMaybe<Scalars['ID']['input']>;\n /** Include variable metadata in response */\n includeMetadata?: InputMaybe<Scalars['Boolean']['input']>;\n /** Include system variables */\n includeSystem?: InputMaybe<Scalars['Boolean']['input']>;\n /** Include variable values in response */\n includeValues?: InputMaybe<Scalars['Boolean']['input']>;\n /** Maximum number of variables to return per category */\n limit?: InputMaybe<Scalars['Float']['input']>;\n /** Skip first N variables per category */\n offset?: InputMaybe<Scalars['Float']['input']>;\n /** Include only available variables */\n onlyAvailable?: InputMaybe<Scalars['Boolean']['input']>;\n /** Search variables by name or description */\n search?: InputMaybe<Scalars['String']['input']>;\n /** Sort by field (name, type, scope, createdAt) */\n sortBy?: InputMaybe<Scalars['String']['input']>;\n /** Sort direction (asc, desc) */\n sortDirection?: InputMaybe<Scalars['String']['input']>;\n /** Flow Template ID (optional for template preview) */\n templateId?: InputMaybe<Scalars['ID']['input']>;\n};\n\nexport type GhostCardData = {\n __typename?: 'GhostCardData';\n connectedTo?: Maybe<Scalars['String']['output']>;\n};\n\nexport type HeartbeatResponse = {\n __typename?: 'HeartbeatResponse';\n /** Recommended next heartbeat interval in seconds (jittered 25-35s) */\n nextHeartbeatIn: Scalars['Int']['output'];\n user: User;\n};\n\nexport type HelpArticle = {\n __typename?: 'HelpArticle';\n _id: Scalars['ID']['output'];\n ancestors: Array<Scalars['ID']['output']>;\n authors: Array<User>;\n canonicalUrl?: Maybe<Scalars['String']['output']>;\n content: Scalars['String']['output'];\n contentFormat: HelpArticleContentFormat;\n coverImageUrl?: Maybe<Media>;\n createdAt: Scalars['DateTime']['output'];\n excerpt?: Maybe<Scalars['String']['output']>;\n folder?: Maybe<HelpFolder>;\n integrationId: Scalars['ID']['output'];\n locale: Scalars['String']['output'];\n order: Scalars['Int']['output'];\n organisationId: Scalars['ID']['output'];\n publishedAt?: Maybe<Scalars['DateTime']['output']>;\n publishedBy?: Maybe<Scalars['ID']['output']>;\n /** Per-slot reaction counts keyed by slotIndex (string). FE joins against `reactionSet(HELP)` for emoji + sentiment. */\n reactionCounts: Scalars['JSON']['output'];\n slug: Scalars['String']['output'];\n status: HelpArticleStatus;\n tags: Array<HelpTag>;\n title: Scalars['String']['output'];\n translationGroupId?: Maybe<Scalars['ID']['output']>;\n translations: Array<HelpArticle>;\n updatedAt: Scalars['DateTime']['output'];\n viewCount: Scalars['Int']['output'];\n /** The current visitor's own reaction slotIndex on this item (per translation group), or null if they haven't reacted / aren't identified. */\n viewerReaction?: Maybe<Scalars['Int']['output']>;\n};\n\n/** Body format for HelpArticle.content. MARKDOWN (default) | HTML. */\nexport enum HelpArticleContentFormat {\n HTML = 'HTML',\n MARKDOWN = 'MARKDOWN'\n}\n\n/** Sort axis for the `helpArticles` operator query. */\nexport enum HelpArticleSort {\n CREATED_DESC = 'CREATED_DESC',\n ORDER_ASC = 'ORDER_ASC',\n PUBLISHED_DESC = 'PUBLISHED_DESC',\n TITLE_ASC = 'TITLE_ASC',\n UPDATED_DESC = 'UPDATED_DESC'\n}\n\n/** Help article publish state — DRAFT (operator-only) or PUBLISHED (visitor-visible) */\nexport enum HelpArticleStatus {\n DRAFT = 'DRAFT',\n PUBLISHED = 'PUBLISHED'\n}\n\nexport type HelpFolder = {\n __typename?: 'HelpFolder';\n _id: Scalars['ID']['output'];\n ancestors: Array<Scalars['ID']['output']>;\n /** Total published articles in this folder + all nested subfolders. Computed via a single `countDocuments` against the `ancestors` index. */\n articleCount: Scalars['Int']['output'];\n createdAt: Scalars['DateTime']['output'];\n description?: Maybe<Scalars['String']['output']>;\n descriptionI18n?: Maybe<Scalars['JSON']['output']>;\n integrationId: Scalars['ID']['output'];\n name: Scalars['String']['output'];\n nameI18n?: Maybe<Scalars['JSON']['output']>;\n order: Scalars['Int']['output'];\n organisationId: Scalars['ID']['output'];\n parentId?: Maybe<Scalars['ID']['output']>;\n slug: Scalars['String']['output'];\n updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type HelpFolderCounts = {\n __typename?: 'HelpFolderCounts';\n articles: Scalars['Int']['output'];\n folders: Scalars['Int']['output'];\n};\n\nexport type HelpTag = {\n __typename?: 'HelpTag';\n _id: Scalars['ID']['output'];\n createdAt: Scalars['DateTime']['output'];\n description?: Maybe<Scalars['String']['output']>;\n integrationId: Scalars['ID']['output'];\n label: Scalars['String']['output'];\n labelI18n?: Maybe<Scalars['JSON']['output']>;\n organisationId: Scalars['ID']['output'];\n slug: Scalars['String']['output'];\n updatedAt: Scalars['DateTime']['output'];\n};\n\n/** HTTP methods for fetch card requests */\nexport enum HttpMethod {\n GET = 'GET',\n POST = 'POST'\n}\n\nexport type HubSpotConfigInput = {\n accessToken?: InputMaybe<Scalars['String']['input']>;\n portalId?: InputMaybe<Scalars['String']['input']>;\n refreshToken?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Operator image-gen defaults (per-org) */\nexport type ImagePreferences = {\n __typename?: 'ImagePreferences';\n /** Preferred image model, e.g. dall-e-3, dall-e-2 */\n model?: Maybe<Scalars['String']['output']>;\n};\n\n/** Input for image generation preferences */\nexport type ImagePreferencesInput = {\n model?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type InboxSettings = {\n __typename?: 'InboxSettings';\n /** Default AI assistant for inbox (chats). Auto-resolves to org default if not set. */\n ai?: Maybe<AiAssistant>;\n /** Extract text from inbound documents (PDF, DOCX, etc.) and include in AI context. */\n analyzeDocuments: Scalars['Boolean']['output'];\n /** Include images from inbound messages in AI context (vision). Falls back to system vision model if chat model lacks image-input capability. */\n analyzeImages: Scalars['Boolean']['output'];\n /** Include video thumbnails from inbound messages in AI context (vision). Falls back to system vision model if chat model lacks image-input capability. */\n analyzeVideo: Scalars['Boolean']['output'];\n /** Number of messages to load for AI context. 0 = disabled, max = 100 */\n chatHistoryCount: Scalars['Int']['output'];\n /** Auto-transcribe inbound audio/voice messages using Whisper. Transcript stored on media with timeline segments. */\n transcribeAudio: Scalars['Boolean']['output'];\n /** Include user details (system and custom fields) in AI context */\n useUserContext: Scalars['Boolean']['output'];\n};\n\nexport type InboxSettingsInput = {\n /** AI Assistant ID for inbox (chats) */\n ai?: InputMaybe<Scalars['String']['input']>;\n /** Extract text from inbound documents (PDF, DOCX, etc.) and include in AI context */\n analyzeDocuments?: InputMaybe<Scalars['Boolean']['input']>;\n /** Include images from inbound messages in AI context (vision) */\n analyzeImages?: InputMaybe<Scalars['Boolean']['input']>;\n /** Include video thumbnails from inbound messages in AI context (vision) */\n analyzeVideo?: InputMaybe<Scalars['Boolean']['input']>;\n /** Number of messages to load for AI context. 0 = disabled, max = 100 */\n chatHistoryCount?: InputMaybe<Scalars['Int']['input']>;\n /** Auto-transcribe inbound audio/voice messages using Whisper */\n transcribeAudio?: InputMaybe<Scalars['Boolean']['input']>;\n /** Include user details (system and custom fields) in AI context */\n useUserContext?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type InstanceSummaryOutput = {\n __typename?: 'InstanceSummaryOutput';\n instanceId: Scalars['String']['output'];\n lastReportedAt?: Maybe<Scalars['DateTime']['output']>;\n organisationCount: Scalars['Int']['output'];\n totalChats: Scalars['Int']['output'];\n totalFlows: Scalars['Int']['output'];\n totalMessages: Scalars['Int']['output'];\n totalPeople: Scalars['Int']['output'];\n};\n\nexport type Integration = {\n __typename?: 'Integration';\n _id: Scalars['String']['output'];\n /** Encrypted API key or token. Null for disconnected integrations. */\n apiKey?: Maybe<Scalars['String']['output']>;\n /** Masked preview of API key for display */\n apiKeyPreview?: Maybe<Scalars['String']['output']>;\n /** Authorization type */\n authorization?: Maybe<IntegrationAuthorization>;\n /** Integration category */\n category: IntegrationCategory;\n createdAt: Scalars['DateTime']['output'];\n /** User who created this integration */\n createdBy: Scalars['String']['output'];\n /** CRM configuration including field mappings and sync history (excludes credentials) */\n crm?: Maybe<CrmConfigType>;\n /** When the integration was soft-deleted. Null = active, Date = ghost/hidden. */\n deletedAt?: Maybe<Scalars['DateTime']['output']>;\n /** When the integration was disconnected (token removed) */\n disconnectedAt?: Maybe<Scalars['DateTime']['output']>;\n /** Structured error information if connection failed */\n error?: Maybe<IntegrationError>;\n /** Whether this is a system-managed integration (hidden from users, cannot be modified) */\n isSystem: Scalars['Boolean']['output'];\n /** When the integration was last tested */\n lastTestedAt?: Maybe<Scalars['DateTime']['output']>;\n /** Provider-specific metadata (e.g., WhatsApp phone number info) */\n metadata?: Maybe<Scalars['JSON']['output']>;\n /** Custom integration name (required for CUSTOM provider) */\n name?: Maybe<Scalars['String']['output']>;\n /** Organization this integration belongs to */\n organisationId: Scalars['String']['output'];\n /** Integration provider (AI, Messaging, CRM) */\n provider?: Maybe<IntegrationProvider>;\n /** Integration connection status */\n status: IntegrationStatus;\n updatedAt: Scalars['DateTime']['output'];\n /** Custom API URL (for custom integrations) */\n url?: Maybe<Scalars['String']['output']>;\n};\n\n/** Integration authorization types */\nexport enum IntegrationAuthorization {\n /** API key authorization */\n API_KEY = 'API_KEY',\n /** Basic authentication */\n BASIC = 'BASIC',\n /** Bearer token authorization (Authorization: Bearer <token>) */\n BEARER = 'BEARER',\n /** Token-based authorization */\n TOKEN = 'TOKEN'\n}\n\n/** Integration category types */\nexport enum IntegrationCategory {\n /** AI provider integrations (OpenAI, Anthropic, etc.) */\n AI = 'AI',\n /** CRM integrations (BigQuery, HubSpot, Salesforce) */\n CRM = 'CRM',\n /** Custom integrations */\n CUSTOM = 'CUSTOM',\n /** Inbox and messaging integrations */\n INBOX = 'INBOX',\n /** Messaging platform integrations (Telegram, WhatsApp, etc.) */\n MESSAGING = 'MESSAGING'\n}\n\nexport type IntegrationCleanupResult = {\n __typename?: 'IntegrationCleanupResult';\n /** Number of Chat records deleted (always deleted on disconnect) */\n deletedChats: Scalars['Int']['output'];\n /** Number of ChatCollections deleted (collections with INTEGRATION_ID rules referencing this integration) */\n deletedCollections: Scalars['Int']['output'];\n /** Number of Media files deleted from S3 and database (always deleted on disconnect) */\n deletedMedia: Scalars['Int']['output'];\n /** Number of MessageReaction records deleted (always deleted on disconnect) */\n deletedMessageReactions: Scalars['Int']['output'];\n /** Number of Message records deleted (always deleted on disconnect) */\n deletedMessages: Scalars['Int']['output'];\n /** Number of People (lead) records deleted (only if deletePeople=true) */\n deletedPeople: Scalars['Int']['output'];\n /** Number of PeopleFieldValue records deleted (only if deletePeople=true) */\n deletedPeopleFieldValues: Scalars['Int']['output'];\n /** Number of WhatsApp templates deleted (only for WhatsApp integrations) */\n deletedTemplates: Scalars['Int']['output'];\n /** If true, this was a preview - no data was actually deleted */\n dryRun: Scalars['Boolean']['output'];\n /** Any errors that occurred during cleanup */\n errors: Array<Scalars['String']['output']>;\n integrationId: Scalars['String']['output'];\n organisationId: Scalars['String']['output'];\n /** Number of Flows updated (integration removed from integrationIds array) */\n updatedFlows: Scalars['Int']['output'];\n};\n\nexport type IntegrationDataCounts = {\n __typename?: 'IntegrationDataCounts';\n /** Number of Chat records */\n chatCount: Scalars['Int']['output'];\n /** Number of Message records */\n messageCount: Scalars['Int']['output'];\n /** Number of People (lead) records */\n peopleCount: Scalars['Int']['output'];\n /** Number of WhatsApp template records */\n templateCount: Scalars['Int']['output'];\n};\n\nexport type IntegrationError = {\n __typename?: 'IntegrationError';\n /** Error code (e.g., \"401\", \"TIMEOUT\") */\n code: Scalars['String']['output'];\n /** Provider that generated the error */\n provider?: Maybe<Scalars['String']['output']>;\n /** Error type (e.g., \"authentication_error\", \"network_error\") */\n type: Scalars['String']['output'];\n};\n\nexport type IntegrationMetrics = {\n __typename?: 'IntegrationMetrics';\n total: Scalars['Int']['output'];\n};\n\n/** Integration provider types */\nexport enum IntegrationProvider {\n /** Anthropic Claude API integration */\n ANTHROPIC = 'ANTHROPIC',\n /** Google BigQuery data warehouse integration */\n BIGQUERY = 'BIGQUERY',\n /** Custom OpenAI-compatible API integration */\n CUSTOM = 'CUSTOM',\n /** HubSpot CRM integration */\n HUBSPOT = 'HUBSPOT',\n /** Instagram Messaging API integration */\n INSTAGRAM = 'INSTAGRAM',\n /** OpenAI API integration */\n OPENAI = 'OPENAI',\n /** Salesforce CRM integration */\n SALESFORCE = 'SALESFORCE',\n /** Telegram Bot API integration */\n TELEGRAM = 'TELEGRAM',\n /** Viber Bot API integration */\n VIBER = 'VIBER',\n /** Embeddable web messenger widget served from cdn.wexio.io */\n WEB = 'WEB',\n /** WhatsApp Business API integration */\n WHATSAPP = 'WHATSAPP'\n}\n\n/** Integration connection status */\nexport enum IntegrationStatus {\n /** Integration is connected and working properly */\n CONNECTED = 'CONNECTED',\n /** Integration token removed - bot is permanently stopped. People data may still reference this integration. Does not count toward plan limits. */\n DISCONNECTED = 'DISCONNECTED',\n /** Connection test failed - check configuration */\n FAILED = 'FAILED',\n /** Integration not tested yet or incomplete configuration */\n IDLE = 'IDLE',\n /** Integration is paused by user - bot is stopped but can be resumed */\n PAUSED = 'PAUSED',\n /** Connection test is in progress */\n PENDING = 'PENDING'\n}\n\nexport type InviteMemberInput = {\n email: Scalars['String']['input'];\n role: Role;\n};\n\nexport type InviteValidationResult = {\n __typename?: 'InviteValidationResult';\n email?: Maybe<Scalars['String']['output']>;\n error?: Maybe<Scalars['String']['output']>;\n expiresAt?: Maybe<Scalars['DateTime']['output']>;\n inviterName?: Maybe<Scalars['String']['output']>;\n organisationName?: Maybe<Scalars['String']['output']>;\n organisationSlug?: Maybe<Scalars['String']['output']>;\n role?: Maybe<Scalars['String']['output']>;\n valid: Scalars['Boolean']['output'];\n};\n\nexport type Invoice = {\n __typename?: 'Invoice';\n amount: Scalars['Float']['output'];\n amountDue: Scalars['Float']['output'];\n amountPaid: Scalars['Float']['output'];\n card?: Maybe<StripeCard>;\n created: Scalars['DateTime']['output'];\n currency: Scalars['String']['output'];\n dueDate?: Maybe<Scalars['DateTime']['output']>;\n hostedInvoiceUrl?: Maybe<Scalars['String']['output']>;\n id: Scalars['String']['output'];\n invoicePdf?: Maybe<Scalars['String']['output']>;\n items: Array<InvoiceItem>;\n number: Scalars['String']['output'];\n paid: Scalars['Boolean']['output'];\n paidAt?: Maybe<Scalars['DateTime']['output']>;\n paymentIntentStatus?: Maybe<Scalars['String']['output']>;\n status: Scalars['String']['output'];\n};\n\nexport type InvoiceItem = {\n __typename?: 'InvoiceItem';\n amount: Scalars['Float']['output'];\n description: Scalars['String']['output'];\n id: Scalars['String']['output'];\n planName?: Maybe<Scalars['String']['output']>;\n quantity: Scalars['Float']['output'];\n};\n\nexport type InvoiceList = {\n __typename?: 'InvoiceList';\n /** List of items for current page */\n items: Array<Invoice>;\n /** Pagination metadata */\n meta: PaginationMeta;\n};\n\nexport type InvoiceStats = {\n __typename?: 'InvoiceStats';\n paidInvoices: Scalars['Float']['output'];\n totalAmount: Scalars['Float']['output'];\n totalAmountDue: Scalars['Float']['output'];\n totalAmountPaid: Scalars['Float']['output'];\n totalInvoices: Scalars['Float']['output'];\n unpaidInvoices: Scalars['Float']['output'];\n};\n\nexport type KanbanBoardResponse = {\n __typename?: 'KanbanBoardResponse';\n columns: Array<KanbanColumn>;\n};\n\nexport type KanbanColumn = {\n __typename?: 'KanbanColumn';\n count: Scalars['Int']['output'];\n status: SupportTicketStatus;\n tickets: Array<SupportTicket>;\n};\n\nexport enum KeyboardButtonType {\n INLINE = 'INLINE',\n REPLY = 'REPLY'\n}\n\nexport type Label = {\n __typename?: 'Label';\n _id: Scalars['String']['output'];\n active: Scalars['Boolean']['output'];\n archived: Scalars['Boolean']['output'];\n color: Scalars['String']['output'];\n createdAt: Scalars['DateTime']['output'];\n description?: Maybe<Scalars['String']['output']>;\n isSystem: Scalars['Boolean']['output'];\n name: Scalars['String']['output'];\n organisationId: Scalars['String']['output'];\n updatedAt: Scalars['DateTime']['output'];\n};\n\n/** Anchor corner for the launcher button on the host page */\nexport enum LauncherPosition {\n /** Bottom-left — for sites where the right corner is already taken */\n LEFT_BOTTOM = 'LEFT_BOTTOM',\n /** Default — bottom-right corner (matches Intercom, Drift, etc.) */\n RIGHT_BOTTOM = 'RIGHT_BOTTOM'\n}\n\n/** Supported user interface locales */\nexport enum Locale {\n /** Deutsch */\n DE = 'DE',\n /** English */\n EN = 'EN',\n /** Italiano */\n IT = 'IT',\n /** Polski (Polish) */\n PL = 'PL',\n /** Português (Portuguese) */\n PT = 'PT',\n /** Українська (Ukrainian) */\n UK = 'UK'\n}\n\nexport type LocationInfo = {\n __typename?: 'LocationInfo';\n city?: Maybe<Scalars['String']['output']>;\n country?: Maybe<Scalars['String']['output']>;\n countryCode?: Maybe<Scalars['String']['output']>;\n latitude?: Maybe<Scalars['Float']['output']>;\n longitude?: Maybe<Scalars['Float']['output']>;\n region?: Maybe<Scalars['String']['output']>;\n timezone?: Maybe<Scalars['String']['output']>;\n};\n\nexport type LoginUrlConfig = {\n __typename?: 'LoginUrlConfig';\n /** Bot username for authorization */\n botUsername?: Maybe<Scalars['String']['output']>;\n /** Text of the button in forwarded messages */\n forwardText?: Maybe<Scalars['String']['output']>;\n /** Request permission to send messages to user */\n requestWriteAccess?: Maybe<Scalars['Boolean']['output']>;\n /** HTTPS URL for user authorization */\n url: Scalars['String']['output'];\n};\n\nexport type MpmActionInput = {\n /** Product sections. Max 10 sections, 30 products total across all sections. */\n sections: Array<MpmSectionInput>;\n /** Product SKU for the thumbnail image displayed in the message. */\n thumbnailProductRetailerId: Scalars['String']['input'];\n};\n\nexport type MpmProductItemInput = {\n /** Product SKU/ID from Facebook Commerce Manager. Must exist in the connected catalog. */\n productRetailerId: Scalars['String']['input'];\n};\n\nexport type MpmSectionInput = {\n /** Products in this section. Total across all sections max 30. */\n productItems: Array<MpmProductItemInput>;\n /** Section title displayed above products. Max 24 characters. */\n title: Scalars['String']['input'];\n};\n\nexport type MarkNotificationsResponse = {\n __typename?: 'MarkNotificationsResponse';\n success: Scalars['Boolean']['output'];\n /** Number of notifications updated */\n updatedCount: Scalars['Int']['output'];\n};\n\nexport type MasterMutationResponse = {\n __typename?: 'MasterMutationResponse';\n message?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type Media = {\n __typename?: 'Media';\n _id: Scalars['String']['output'];\n customEmojiId?: Maybe<Scalars['String']['output']>;\n disableContentTypeDetection?: Maybe<Scalars['Boolean']['output']>;\n duration?: Maybe<Scalars['Float']['output']>;\n emoji?: Maybe<Scalars['String']['output']>;\n fileSize?: Maybe<Scalars['Float']['output']>;\n filename?: Maybe<Scalars['String']['output']>;\n height?: Maybe<Scalars['Float']['output']>;\n isAnimated?: Maybe<Scalars['Boolean']['output']>;\n /** Whether file processing is complete for knowledge base */\n isProcessed?: Maybe<Scalars['Boolean']['output']>;\n isVideo?: Maybe<Scalars['Boolean']['output']>;\n mimeType?: Maybe<Scalars['String']['output']>;\n needsRepainting?: Maybe<Scalars['Boolean']['output']>;\n performer?: Maybe<Scalars['String']['output']>;\n /** Processed/extracted text content for knowledge base */\n processedContent?: Maybe<Scalars['String']['output']>;\n /** Malware scan status from AWS GuardDuty S3 Protection */\n scanStatus?: Maybe<ScanStatus>;\n setName?: Maybe<Scalars['String']['output']>;\n stickerType?: Maybe<Scalars['String']['output']>;\n supportsStreaming?: Maybe<Scalars['Boolean']['output']>;\n thumbnail?: Maybe<Thumbnail>;\n title?: Maybe<Scalars['String']['output']>;\n /** Auto-generated audio transcription with timeline */\n transcription?: Maybe<MediaTranscription>;\n type: MediaType;\n url: Scalars['String']['output'];\n width?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type MediaCardData = {\n __typename?: 'MediaCardData';\n input?: Maybe<Scalars['String']['output']>;\n media?: Maybe<Array<Media>>;\n};\n\nexport type MediaGroupMessage = {\n __typename?: 'MediaGroupMessage';\n _id: Scalars['String']['output'];\n caption?: Maybe<Scalars['String']['output']>;\n createdAt?: Maybe<Scalars['DateTime']['output']>;\n hasMediaSpoiler?: Maybe<Scalars['Boolean']['output']>;\n isDeleted?: Maybe<Scalars['Boolean']['output']>;\n isMediaGroup?: Maybe<Scalars['Boolean']['output']>;\n media?: Maybe<Array<Media>>;\n mediaGroupId?: Maybe<Scalars['String']['output']>;\n messageId?: Maybe<Scalars['Float']['output']>;\n showCaptionAboveMedia?: Maybe<Scalars['Boolean']['output']>;\n updatedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type MediaTranscription = {\n __typename?: 'MediaTranscription';\n duration?: Maybe<Scalars['Float']['output']>;\n language?: Maybe<Scalars['String']['output']>;\n segments?: Maybe<Array<TranscriptionSegment>>;\n text: Scalars['String']['output'];\n transcribedAt: Scalars['DateTime']['output'];\n translated?: Maybe<TranslatedTranscription>;\n words?: Maybe<Array<TranscriptionWord>>;\n};\n\nexport enum MediaType {\n ANIMATION = 'ANIMATION',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n PHOTO = 'PHOTO',\n STICKER = 'STICKER',\n VIDEO = 'VIDEO',\n VIDEO_NOTE = 'VIDEO_NOTE',\n VOICE = 'VOICE'\n}\n\n/** Per-operator AI defaults that override the org AI assistant defaults */\nexport type MemberAiPreferences = {\n __typename?: 'MemberAIPreferences';\n /** Default tone for CHANGE_TONE action, e.g. professional, casual, friendly */\n defaultTone?: Maybe<Scalars['String']['output']>;\n image?: Maybe<ImagePreferences>;\n /** Custom message count for SUMMARIZE action (10–100). 0 or null = auto from org settings. */\n summarizeMessageCount?: Maybe<Scalars['Float']['output']>;\n tts?: Maybe<TtsPreferences>;\n};\n\n/** Input for member AI preferences */\nexport type MemberAiPreferencesInput = {\n defaultTone?: InputMaybe<Scalars['String']['input']>;\n image?: InputMaybe<ImagePreferencesInput>;\n /** Custom message count for SUMMARIZE (10–100). 0 or null = auto. */\n summarizeMessageCount?: InputMaybe<Scalars['Float']['input']>;\n tts?: InputMaybe<TtsPreferencesInput>;\n};\n\nexport type MentionEvent = {\n __typename?: 'MentionEvent';\n kind: MentionEventKind;\n message?: Maybe<Message>;\n messageId?: Maybe<Scalars['ID']['output']>;\n receipt?: Maybe<MentionReceipt>;\n unreadCount: Scalars['Int']['output'];\n};\n\n/** Kind of mention event: CREATED (new mention), READ (read-state change), REMOVED (un-mentioned via edit), DELETED (note soft-deleted). */\nexport enum MentionEventKind {\n CREATED = 'CREATED',\n DELETED = 'DELETED',\n READ = 'READ',\n REMOVED = 'REMOVED'\n}\n\n/** Filter for myMentions: ALL (default), UNREAD only, or READ only. */\nexport enum MentionReadState {\n ALL = 'ALL',\n READ = 'READ',\n UNREAD = 'UNREAD'\n}\n\nexport type MentionReadStatus = {\n __typename?: 'MentionReadStatus';\n readCount: Scalars['Int']['output'];\n recipients: Array<MentionRecipientStatus>;\n total: Scalars['Int']['output'];\n};\n\nexport type MentionReceipt = {\n __typename?: 'MentionReceipt';\n _id: Scalars['String']['output'];\n chat: Chat;\n createdAt: Scalars['DateTime']['output'];\n message: Message;\n organisation: Scalars['ID']['output'];\n readAt?: Maybe<Scalars['DateTime']['output']>;\n updatedAt: Scalars['DateTime']['output'];\n user: User;\n};\n\nexport type MentionRecipientStatus = {\n __typename?: 'MentionRecipientStatus';\n readAt?: Maybe<Scalars['DateTime']['output']>;\n user: User;\n};\n\nexport type Message = {\n __typename?: 'Message';\n _id: Scalars['String']['output'];\n buttons?: Maybe<Array<MessageButton>>;\n caption?: Maybe<Scalars['String']['output']>;\n chat: Chat;\n contact?: Maybe<Contact>;\n createdAt?: Maybe<Scalars['DateTime']['output']>;\n deletedBy?: Maybe<MessageSenderUnion>;\n deliveryStatus?: Maybe<MessageDeliveryStatus>;\n deliveryStatusAt?: Maybe<Scalars['DateTime']['output']>;\n dice?: Maybe<MessageDice>;\n direction: MessageDirection;\n errorMessage?: Maybe<Scalars['String']['output']>;\n externalMessageId?: Maybe<Scalars['String']['output']>;\n flowTitle?: Maybe<Scalars['String']['output']>;\n from?: Maybe<MessageSenderUnion>;\n game?: Maybe<MessageGame>;\n hasMediaSpoiler?: Maybe<Scalars['Boolean']['output']>;\n isDeleted?: Maybe<Scalars['Boolean']['output']>;\n keyboardType?: Maybe<Scalars['String']['output']>;\n labels?: Maybe<Array<Label>>;\n location?: Maybe<MessageLocation>;\n media?: Maybe<Array<Media>>;\n mediaGroup?: Maybe<Array<MediaGroupMessage>>;\n /** Per-recipient read aggregate for an INTERNAL_NOTE. Null for non-internal messages or soft-deleted notes. Surface \"Read by Alice ✓ / Bob unread\" inline in the chat thread. */\n mentionReadStatus?: Maybe<MentionReadStatus>;\n mentions?: Maybe<Array<User>>;\n messageId?: Maybe<Scalars['Float']['output']>;\n poll?: Maybe<MessagePoll>;\n reactions: Array<MessageReaction>;\n replyToButtonId?: Maybe<Scalars['String']['output']>;\n replyToMessage?: Maybe<Message>;\n showCaptionAboveMedia?: Maybe<Scalars['Boolean']['output']>;\n system?: Maybe<SystemMessageInfo>;\n template?: Maybe<TemplateInfo>;\n templateId?: Maybe<Scalars['String']['output']>;\n text?: Maybe<Scalars['String']['output']>;\n type: MessageType;\n updatedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type MessageButton = {\n __typename?: 'MessageButton';\n /** Unique button identifier */\n buttonId?: Maybe<Scalars['String']['output']>;\n /** Callback data (for callback buttons) */\n callbackData?: Maybe<Scalars['String']['output']>;\n /** True for game buttons */\n callbackGame?: Maybe<Scalars['Boolean']['output']>;\n /** Button text/label */\n label: Scalars['String']['output'];\n /** Login URL config (for login buttons) */\n loginUrl?: Maybe<LoginUrlConfig>;\n /** True for pay buttons */\n pay?: Maybe<Scalars['Boolean']['output']>;\n /** Phone number (for phone_number buttons) */\n phoneNumber?: Maybe<Scalars['String']['output']>;\n /** Request chat config */\n requestChat?: Maybe<RequestChatConfig>;\n /** True to request user contact */\n requestContact?: Maybe<Scalars['Boolean']['output']>;\n /** True to request user location */\n requestLocation?: Maybe<Scalars['Boolean']['output']>;\n /** Request poll config */\n requestPoll?: Maybe<RequestPollConfig>;\n /** Request users config */\n requestUsers?: Maybe<RequestUsersConfig>;\n /** Inline query for switch_inline buttons */\n switchInlineQuery?: Maybe<Scalars['String']['output']>;\n /** Config for switch_inline_chosen buttons */\n switchInlineQueryChosenChat?: Maybe<SwitchInlineQueryChosenChatConfig>;\n /** Inline query for switch_inline_current buttons */\n switchInlineQueryCurrentChat?: Maybe<Scalars['String']['output']>;\n /** Button type (see ButtonType enum) */\n type: Scalars['String']['output'];\n /** URL to open (for url buttons) */\n url?: Maybe<Scalars['String']['output']>;\n /** Legacy: callback data or value */\n value?: Maybe<Scalars['String']['output']>;\n /** WhatsApp button ID (for quick_reply) */\n waButtonId?: Maybe<Scalars['String']['output']>;\n /** Web App config (for web_app buttons) */\n webApp?: Maybe<WebAppConfig>;\n};\n\nexport type MessageButtonInput = {\n buttonId?: InputMaybe<Scalars['String']['input']>;\n callbackData?: InputMaybe<Scalars['String']['input']>;\n callbackGame?: InputMaybe<Scalars['Boolean']['input']>;\n label: Scalars['String']['input'];\n loginUrlBotUsername?: InputMaybe<Scalars['String']['input']>;\n loginUrlForwardText?: InputMaybe<Scalars['String']['input']>;\n loginUrlRequestWriteAccess?: InputMaybe<Scalars['Boolean']['input']>;\n loginUrlUrl?: InputMaybe<Scalars['String']['input']>;\n pay?: InputMaybe<Scalars['Boolean']['input']>;\n phoneNumber?: InputMaybe<Scalars['String']['input']>;\n requestContact?: InputMaybe<Scalars['Boolean']['input']>;\n requestLocation?: InputMaybe<Scalars['Boolean']['input']>;\n switchInlineQuery?: InputMaybe<Scalars['String']['input']>;\n switchInlineQueryCurrentChat?: InputMaybe<Scalars['String']['input']>;\n type: Scalars['String']['input'];\n url?: InputMaybe<Scalars['String']['input']>;\n value?: InputMaybe<Scalars['String']['input']>;\n waButtonId?: InputMaybe<Scalars['String']['input']>;\n webAppUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Delivery status for outbound messages */\nexport enum MessageDeliveryStatus {\n DELIVERED = 'DELIVERED',\n FAILED = 'FAILED',\n READ = 'READ',\n SENT = 'SENT'\n}\n\nexport type MessageDice = {\n __typename?: 'MessageDice';\n /** Emoji on which the dice throw animation is based */\n emoji: Scalars['String']['output'];\n /** Value of the dice. 1-6 for 🎲🎯🎳, 1-5 for 🏀⚽, 1-64 for 🎰 */\n value: Scalars['Int']['output'];\n};\n\n/** Direction of the message, can be either INBOUND or OUTBOUND */\nexport enum MessageDirection {\n INBOUND = 'INBOUND',\n OUTBOUND = 'OUTBOUND'\n}\n\nexport type MessageGame = {\n __typename?: 'MessageGame';\n /** Animation that will be displayed in the game message */\n animation?: Maybe<GameAnimation>;\n /** Description of the game */\n description: Scalars['String']['output'];\n /** Photo that will be displayed in the game message in chats */\n photo?: Maybe<Array<GamePhoto>>;\n /** Short name of the game used for launching */\n shortName?: Maybe<Scalars['String']['output']>;\n /** Brief description of the game or high scores (0-4096 characters) */\n text?: Maybe<Scalars['String']['output']>;\n /** Title of the game */\n title: Scalars['String']['output'];\n};\n\nexport type MessageLocation = {\n __typename?: 'MessageLocation';\n /** Venue/Location address */\n address?: Maybe<Scalars['String']['output']>;\n /** Foursquare identifier of the venue (Telegram) */\n foursquareId?: Maybe<Scalars['String']['output']>;\n /** Foursquare type of the venue (Telegram) */\n foursquareType?: Maybe<Scalars['String']['output']>;\n /** Google Places identifier (Telegram) */\n googlePlaceId?: Maybe<Scalars['String']['output']>;\n /** Google Places type (Telegram) */\n googlePlaceType?: Maybe<Scalars['String']['output']>;\n /** The direction in which user is moving, in degrees; 1-360 */\n heading?: Maybe<Scalars['Int']['output']>;\n /** The radius of uncertainty for the location, measured in meters; 0-1500 */\n horizontalAccuracy?: Maybe<Scalars['Float']['output']>;\n /** True if this is a venue (has title/address) */\n isVenue?: Maybe<Scalars['Boolean']['output']>;\n /** Latitude coordinate */\n latitude: Scalars['Float']['output'];\n /** Period in seconds for which the location can be updated (live location) */\n livePeriod?: Maybe<Scalars['Int']['output']>;\n /** Longitude coordinate */\n longitude: Scalars['Float']['output'];\n /** Maximum distance in meters for proximity alerts about approaching another chat member */\n proximityAlertRadius?: Maybe<Scalars['Int']['output']>;\n /** Venue title / Location name (WhatsApp: name, Telegram Venue: title) */\n title?: Maybe<Scalars['String']['output']>;\n};\n\nexport type MessageMetrics = {\n __typename?: 'MessageMetrics';\n delivered: Scalars['Int']['output'];\n failed: Scalars['Int']['output'];\n inbound: Scalars['Int']['output'];\n newInPeriod?: Maybe<Scalars['Int']['output']>;\n outbound: Scalars['Int']['output'];\n read: Scalars['Int']['output'];\n sent: Scalars['Int']['output'];\n total: Scalars['Int']['output'];\n};\n\nexport type MessagePoll = {\n __typename?: 'MessagePoll';\n /** True if multiple answers allowed */\n allowsMultipleAnswers?: Maybe<Scalars['Boolean']['output']>;\n /** Poll close time (Unix timestamp) */\n closeDate?: Maybe<Scalars['Int']['output']>;\n /** Index of correct answer (quiz mode) */\n correctOptionId?: Maybe<Scalars['Int']['output']>;\n /** Explanation for correct answer (quiz mode) */\n explanation?: Maybe<Scalars['String']['output']>;\n /** Unique poll identifier */\n id?: Maybe<Scalars['String']['output']>;\n /** True if poll votes are anonymous */\n isAnonymous?: Maybe<Scalars['Boolean']['output']>;\n /** True if the poll is closed */\n isClosed?: Maybe<Scalars['Boolean']['output']>;\n /** Amount of time in seconds the poll will be active after creation */\n openPeriod?: Maybe<Scalars['Int']['output']>;\n /** List of poll options */\n options: Array<PollOption>;\n /** Poll question, 1-300 characters */\n question: Scalars['String']['output'];\n /** Total number of voters */\n totalVoterCount?: Maybe<Scalars['Float']['output']>;\n /** Poll type: \"regular\" or \"quiz\" */\n type?: Maybe<Scalars['String']['output']>;\n};\n\nexport type MessageReaction = {\n __typename?: 'MessageReaction';\n _id: Scalars['String']['output'];\n count: Scalars['Int']['output'];\n createdAt: Scalars['DateTime']['output'];\n customEmojiId?: Maybe<Scalars['String']['output']>;\n emoji?: Maybe<Scalars['String']['output']>;\n messageId: Scalars['String']['output'];\n type: ReactionType;\n updatedAt: Scalars['DateTime']['output'];\n url?: Maybe<Scalars['String']['output']>;\n users?: Maybe<Array<ReactionUser>>;\n};\n\nexport type MessageReactionInput = {\n customEmojiId?: InputMaybe<Scalars['String']['input']>;\n emoji?: InputMaybe<Scalars['String']['input']>;\n from?: InputMaybe<Scalars['String']['input']>;\n fromModel: Scalars['String']['input'];\n type: ReactionType;\n url?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type MessageSenderUnion = AiAssistant | Bot | People | User;\n\nexport type MessageSubscriptionPayload = {\n __typename?: 'MessageSubscriptionPayload';\n data: Message;\n type: Scalars['String']['output'];\n};\n\n/** Type of the message */\nexport enum MessageType {\n BUTTONS = 'BUTTONS',\n CALLBACK = 'CALLBACK',\n CHAT_UPDATE = 'CHAT_UPDATE',\n CONTACT = 'CONTACT',\n CTA_URL = 'CTA_URL',\n DICE = 'DICE',\n GAME = 'GAME',\n INTERNAL_NOTE = 'INTERNAL_NOTE',\n LIST = 'LIST',\n LOCATION = 'LOCATION',\n LOCATION_REQUEST = 'LOCATION_REQUEST',\n MEDIA = 'MEDIA',\n MEDIA_BUTTONS = 'MEDIA_BUTTONS',\n MEDIA_GROUP = 'MEDIA_GROUP',\n PIN = 'PIN',\n POOL = 'POOL',\n STORY = 'STORY',\n SYSTEM = 'SYSTEM',\n TEMPLATE = 'TEMPLATE',\n TEXT = 'TEXT',\n UNKNOWN = 'UNKNOWN'\n}\n\n/** Time granularity for metrics snapshots */\nexport enum MetricsGranularity {\n DAILY = 'DAILY',\n HOURLY = 'HOURLY',\n MONTHLY = 'MONTHLY'\n}\n\nexport type MetricsQueryInput = {\n /** Filter by org deployment type: DEFAULT (shared DB), TENANT (isolated DB), or ALL */\n deploymentType?: InputMaybe<OrgDeploymentType>;\n /** Start of date range (ISO 8601) */\n from?: InputMaybe<Scalars['String']['input']>;\n /** Time granularity: HOURLY, DAILY, or MONTHLY */\n granularity?: InputMaybe<MetricsGranularity>;\n /** Filter by deployment instance (e.g. \"shared\", \"us-client\") */\n instanceId?: InputMaybe<Scalars['String']['input']>;\n /** Filter by a specific organisation ID */\n organisationId?: InputMaybe<Scalars['String']['input']>;\n /** Filter by plan tier: FREE, BASIC, STANDARD, PRO, ENTERPRISE */\n planTier?: InputMaybe<PlanTier>;\n /** End of date range (ISO 8601) */\n to?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type MetricsSnapshotOutput = {\n __typename?: 'MetricsSnapshotOutput';\n chats: ChatMetrics;\n flows: FlowMetrics;\n granularity: MetricsGranularity;\n instanceId: Scalars['String']['output'];\n integrations: IntegrationMetrics;\n messages: MessageMetrics;\n /** Resolved organisation with plan, logo, etc. */\n organisation?: Maybe<Organisation>;\n organisationId: Scalars['String']['output'];\n people: PeopleMetrics;\n period: Scalars['DateTime']['output'];\n};\n\n/** AI model capabilities for filtering and feature detection */\nexport enum ModelCapability {\n AUDIO_GENERATION = 'AUDIO_GENERATION',\n AUDIO_INPUT = 'AUDIO_INPUT',\n CHAT = 'CHAT',\n CODE_GENERATION = 'CODE_GENERATION',\n IMAGE_EDITING = 'IMAGE_EDITING',\n IMAGE_GENERATION = 'IMAGE_GENERATION',\n IMAGE_INPUT = 'IMAGE_INPUT',\n REASONING = 'REASONING',\n SEARCH = 'SEARCH',\n TEXT_GENERATION = 'TEXT_GENERATION',\n TRANSCRIPTION = 'TRANSCRIPTION',\n TTS = 'TTS'\n}\n\nexport type ModelInfo = {\n __typename?: 'ModelInfo';\n /** Model capabilities */\n capabilities?: Maybe<Array<ModelCapability>>;\n /** AI provider/category */\n category: IntegrationProvider;\n /** Context window size */\n contextWindow?: Maybe<Scalars['Float']['output']>;\n /** Cost multiplier for AI operations (1=economy, 2=standard, 3=premium) */\n costMultiplier: Scalars['Int']['output'];\n /** Unix timestamp when model was created */\n created?: Maybe<Scalars['Float']['output']>;\n /** Model description */\n description?: Maybe<Scalars['String']['output']>;\n /** Unique model identifier */\n id: Scalars['String']['output'];\n /** Whether this is a custom model */\n isCustom?: Maybe<Scalars['Boolean']['output']>;\n /** Display name for the model */\n name: Scalars['String']['output'];\n /** Organization that owns the model */\n ownedBy?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ModelInfoInput = {\n /** Model capabilities */\n capabilities?: InputMaybe<Array<ModelCapability>>;\n /** AI provider/category */\n category: IntegrationProvider;\n /** Context window size */\n contextWindow?: InputMaybe<Scalars['Float']['input']>;\n /** Cost multiplier for AI operations (1=economy, 2=standard, 3=premium) */\n costMultiplier?: InputMaybe<Scalars['Int']['input']>;\n /** Unix timestamp when model was created */\n created?: InputMaybe<Scalars['Float']['input']>;\n /** Model description */\n description?: InputMaybe<Scalars['String']['input']>;\n /** Unique model identifier */\n id: Scalars['String']['input'];\n /** Whether this is a custom model */\n isCustom?: InputMaybe<Scalars['Boolean']['input']>;\n /** Display name for the model */\n name: Scalars['String']['input'];\n /** Organization that owns the model */\n ownedBy?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Per-purpose model configuration for an AI assistant */\nexport type ModelSlots = {\n __typename?: 'ModelSlots';\n /** Model for image generation and editing (e.g. dall-e-3, gpt-image-1) */\n image?: Maybe<ModelInfo>;\n /** Model for speech-to-text transcription (e.g. whisper-1) */\n transcription?: Maybe<ModelInfo>;\n /** Model for text-to-speech (e.g. tts-1, gpt-4o-mini-tts) */\n tts?: Maybe<ModelInfo>;\n /** Model for vision/image analysis. Overrides system vision fallback. */\n vision?: Maybe<ModelInfo>;\n};\n\n/** Input for configuring per-purpose model slots */\nexport type ModelSlotsInput = {\n /** Model for image generation and editing (e.g. dall-e-3, gpt-image-1) */\n image?: InputMaybe<ModelInfoInput>;\n /** Model for speech-to-text transcription (e.g. whisper-1) */\n transcription?: InputMaybe<ModelInfoInput>;\n /** Model for text-to-speech (e.g. tts-1, gpt-4o-mini-tts) */\n tts?: InputMaybe<ModelInfoInput>;\n /** Model for vision/image analysis. Overrides system vision fallback. */\n vision?: InputMaybe<ModelInfoInput>;\n};\n\nexport type MoveCollectionInput = {\n /** Collection ID or slug */\n collectionIdOrSlug: Scalars['String']['input'];\n /** Target position value. System collections: 0, 1, 2... User collections: 100, 101, 102... */\n newPosition: Scalars['Float']['input'];\n};\n\nexport type MoveTicketInput = {\n /** kanbanOrder of the ticket AFTER which to insert (null = insert at start) */\n afterTicketOrder?: InputMaybe<Scalars['String']['input']>;\n /** kanbanOrder of the ticket BEFORE which to insert (null = insert at end) */\n beforeTicketOrder?: InputMaybe<Scalars['String']['input']>;\n /** Target status (column) for the ticket */\n status: SupportTicketStatus;\n /** Ticket ID to move */\n ticketId: Scalars['String']['input'];\n};\n\nexport type Mutation = {\n __typename?: 'Mutation';\n /** Accept a pending team invite */\n acceptInvite: OrganisationMember;\n /** Accept an invite using the token from the invite link (no auth required) */\n acceptInviteByToken: OrganisationMember;\n /** Flip a source to `enabled: true` after verifying the fieldMap resolves the required fields against the captured sample. Requires `testNewsSource` to have run at least once (or, for WEBHOOK_PUSH, the CMS to have pushed at least one payload). Throws 400 with a `failingFields` list when externalId / title / body don't resolve so the dashboard can highlight the broken rows. */\n activateNewsSource: NewsSource;\n /** Activate SSO configuration after setup */\n activateSsoConfig: SsoConfig;\n /** Add a comment to a support ticket */\n addTicketComment: SupportTicketComment;\n applyDiscount: ApplyDiscountOutput;\n /** Approve a template (MASTER org only) */\n approveTemplate: TemplateApproval;\n /** Archive all read notifications */\n archiveAllReadNotifications: MarkNotificationsResponse;\n archiveLabel: Label;\n /** Flip to ARCHIVED — hides from the visitor feed but preserves the row. Distinct from delete (hard-delete) and unpublish (back to drafts). Re-publish to undo. */\n archiveNewsPost: NewsPost;\n /** Archive a notification */\n archiveNotification?: Maybe<UserNotification>;\n assignChatToOperator: Chat;\n /** Assign a ticket to a team member (MASTER org only) */\n assignSupportTicket: SupportTicket;\n cancelBroadcast: Broadcast;\n /** Cancel a pending or stalled CRM sync job. PENDING jobs are cancelled immediately. PROCESSING jobs can only be cancelled if they are stalled (no progress). */\n cancelCrmSyncJob: CrmSyncJobTypeOutput;\n cancelDraftSubscription: Scalars['Boolean']['output'];\n cancelScheduledPlanChange: Organisation;\n cancelSubscription: CancelSubscriptionOutput;\n /** Clear all completed, failed, and cancelled CRM sync jobs from history. Returns the number of jobs deleted. */\n clearCrmSyncJobHistory: Scalars['Float']['output'];\n /** Clear status message */\n clearStatusMessage: User;\n /** Close a chat: sets status to CLOSED, auto-unassigns operator, creates CHAT_CLOSED system message */\n closeChat: Chat;\n /** Close a support ticket (MASTER org only) */\n closeSupportTicket: SupportTicket;\n /** Configure an AI assistant with model, context, and settings */\n configureAIAssistant: AiAssistant;\n /** Configure dedicated database/Redis for your own organisation. Pass a URI to set up a tenant DB, or null to revert to shared (with optional data migration). Requires Enterprise or Pro plan. Supports FRESH or MIGRATE modes. */\n configureSelfTenantDatabase: TenantConfigResult;\n /** Configure dedicated database/Redis for an organisation. Pass a URI to set up a tenant DB, or null to revert to shared (with optional data migration). Master org only. Supports FRESH (system data only) or MIGRATE (all data) modes. Validates connections before saving. */\n configureTenantDatabase: TenantConfigResult;\n confirmSetupIntent: Scalars['Boolean']['output'];\n /** Connect an Instagram integration using an access token from Meta Business Login. Verifies the token, creates an Integration and Bot entity, and subscribes to webhooks. */\n connectInstagram: Integration;\n /** Connect a Viber bot using an auth token from the Viber Admin Panel. Verifies the token, creates an Integration and Bot entity, and registers the webhook. */\n connectViberBot: Integration;\n /** Connect a product catalog to the WhatsApp Business Account */\n connectWhatsAppCatalog: WhatsAppConnectCatalogResult;\n /** Create a new AI assistant */\n createAIAssistant: AiAssistant;\n createBroadcast: Broadcast;\n createCard: Card;\n createChat: Chat;\n createChatCollection: ChatCollection;\n createFlow: Flow;\n createFlowFromTemplate: Flow;\n createFlowTemplate: FlowTemplate;\n /** Create a draft help article. Articles always land as DRAFT — use publishHelpArticle to make them visible to visitors. */\n createHelpArticle: HelpArticle;\n /** Create a locale variant linked to an existing article (one logical article, grouped by translationGroupId). Mints the group on the source the first time; rejects a duplicate locale. Lands as DRAFT. */\n createHelpArticleTranslation: HelpArticle;\n /** Create a help folder. Pass `parentId` to nest it under another folder, or omit / send null for a root-level folder. Slug must be unique per parent. */\n createHelpFolder: HelpFolder;\n /** Create a help tag. */\n createHelpTag: HelpTag;\n /** Create a new integration (supports AI, CRM, Custom categories) */\n createIntegration: Integration;\n createLabel: Label;\n createMedia: Media;\n /** Create a news category. Slug must be unique per integration; auto-derive from label on the FE then operator can edit. */\n createNewsCategory: NewsCategory;\n /** Create a draft news post. Always lands as DRAFT — use publishNewsPost to make it visitor-visible. */\n createNewsPost: NewsPost;\n /** Create a locale variant linked to an existing post (one logical article, grouped by translationGroupId). Mints the group on the source the first time; rejects a duplicate locale in the group. Lands as DRAFT. */\n createNewsPostTranslation: NewsPost;\n /** Create an external news source on an integration (RSS / webhook-push). */\n createNewsSource: NewsSource;\n /** Create a news tag. */\n createNewsTag: NewsTag;\n createOrganisation: Organisation;\n createPaymentMethodSetupIntent: SetupIntentOutput;\n createPeople: People;\n createPeopleFieldDefinition: PeopleFieldDefinition;\n /** Create SSO configuration for an organisation */\n createSsoConfig: SsoConfig;\n createSubscription: CreateSubscriptionOutput;\n /** Create a new support ticket */\n createSupportTicket: SupportTicket;\n createTemplateFromFlow: FlowTemplate;\n createTrigger: Trigger;\n /** Create the web messenger integration for the current organisation. Returns the integration row plus the plaintext sharedSecret — the ONLY response that surfaces the secret. Copy it into your backend now; subsequent queries won't expose it. */\n createWebIntegration: WebIntegrationWithSecret;\n createWebhookConnection: CreateWebhookConnectionResponse;\n /** Create a new WhatsApp template and submit to Meta for approval */\n createWhatsAppTemplate: CreateWhatsAppTemplateResult;\n /** Flip a source to `enabled: false`. Unconditional kill switch — the source row + its pulled-in posts stay in place so re-activation is one mutation. */\n deactivateNewsSource: NewsSource;\n /** Decline a pending team invite */\n declineInvite: OrganisationMember;\n /** Decline an invite using the token from the invite link (no auth required) */\n declineInviteByToken: OrganisationMember;\n /** Delete an AI assistant */\n deleteAIAssistant: Scalars['Boolean']['output'];\n /** Delete all archived notifications */\n deleteAllArchivedNotifications: MarkNotificationsResponse;\n deleteCard: Scalars['Boolean']['output'];\n deleteChatCollection: Scalars['Boolean']['output'];\n /** Delete a CRM sync job from history. Only completed, failed, or cancelled jobs can be deleted. */\n deleteCrmSyncJob: Scalars['Boolean']['output'];\n deleteExportJob: Scalars['Boolean']['output'];\n deleteFlow: Scalars['Boolean']['output'];\n deleteFlowTemplate: Scalars['Boolean']['output'];\n /** Hard-delete an article. No soft-delete in v1. */\n deleteHelpArticle: Scalars['Boolean']['output'];\n /** Delete a folder. Refuses when the folder has any direct child (folder OR article) — operator re-parents / deletes the children first. No cascade. */\n deleteHelpFolder: Scalars['Boolean']['output'];\n /** Delete a help tag. Linked articles survive — the tag ref is detached via $pull, no cascade-delete of articles. */\n deleteHelpTag: Scalars['Boolean']['output'];\n deleteMedia: Scalars['Boolean']['output'];\n deleteMessage: Scalars['Boolean']['output'];\n /** Permanently delete your account. You must first transfer or delete any organisations you own. */\n deleteMyAccount: DeleteAccountResponse;\n /** Delete a news category. Posts referencing it survive — the ref is detached via $pull, no cascade-delete of posts. */\n deleteNewsCategory: Scalars['Boolean']['output'];\n /** Hard-delete a news post. */\n deleteNewsPost: Scalars['Boolean']['output'];\n /** Delete a news source. Cascades: posts pulled in by this source are hard-deleted. */\n deleteNewsSource: Scalars['Boolean']['output'];\n /** Delete a news tag. Posts referencing it survive (refs detached). */\n deleteNewsTag: Scalars['Boolean']['output'];\n /** Delete a notification */\n deleteNotification: Scalars['Boolean']['output'];\n /** Delete a passkey */\n deletePasskey: Scalars['Boolean']['output'];\n deletePeopleFieldDefinition: Scalars['Boolean']['output'];\n deletePeopleFieldValue: Scalars['Boolean']['output'];\n /** Delete SSO configuration permanently */\n deleteSsoConfig: SsoConfigResponse;\n /** Delete a support ticket (own organisation only) */\n deleteSupportTicket: Scalars['Boolean']['output'];\n /** Delete all bot commands for the integration. */\n deleteTelegramBotCommands: TelegramBotSettings;\n /** Delete a comment */\n deleteTicketComment: Scalars['Boolean']['output'];\n deleteTrigger: Scalars['Boolean']['output'];\n /** Hard-delete the integration. Active visitor sessions become orphans and clean up via existing People retention sweeps. Visitor-facing endpoints start returning 503 immediately. */\n deleteWebIntegration: Scalars['Boolean']['output'];\n deleteWebhookConnection: Scalars['Boolean']['output'];\n /** Delete a WhatsApp template from Meta and local database */\n deleteWhatsAppTemplate: DeleteWhatsAppTemplateResult;\n /** Temporarily disable SSO configuration */\n disableSsoConfig: SsoConfig;\n /** Disable 2FA. Requires current 2FA code for verification. */\n disableTwoFactor: Scalars['Boolean']['output'];\n /** Disconnect an integration (soft-delete). For MESSAGING: stops the bot, clears token, deletes chats/messages. For CRM: clears OAuth tokens. For AI: removes API key. Keeps the integration record as \"ghost\" for data references. Disconnected integrations do NOT count toward plan limits. */\n disconnectIntegration: IntegrationCleanupResult;\n /** Disconnect a product catalog from the WhatsApp Business Account */\n disconnectWhatsAppCatalog: WhatsAppConnectCatalogResult;\n duplicateFlow: Flow;\n /** Edit a comment (within 15 minutes) */\n editTicketComment: SupportTicketComment;\n exportPeople: PeopleExportResponse;\n /** Force-fail a stuck CRM sync job. Use this when a job is stuck in PENDING or PROCESSING status and cannot be cancelled normally. This is an admin operation. */\n forceFailCrmSyncJob: CrmSyncJobTypeOutput;\n /** Generate options for passkey authentication */\n generatePasskeyAuthenticationOptions: PasskeyAuthenticationOptionsOutput;\n /** Generate options for passkey registration */\n generatePasskeyRegistrationOptions: PasskeyRegistrationOptionsOutput;\n /** Send heartbeat to indicate user is active. Returns user and recommended next interval (25-35s jittered) */\n heartbeat: HeartbeatResponse;\n ingestWebhookSample: Scalars['JSON']['output'];\n /** Initialize kanban orders for all tickets without one (MASTER org only) */\n initializeKanbanOrders: Scalars['Float']['output'];\n /** Start 2FA setup. Returns secret, QR code, and recovery codes. Must verify with a code to enable. */\n initiateTwoFactorSetup: TwoFactorSetupResponse;\n inviteMember: OrganisationMember;\n /** Leave an organisation. If you are the owner, you must transfer ownership to another member. */\n leaveOrganisation: Scalars['String']['output'];\n /** Mark all of the calling user's unread mentions as read in the current organisation. Returns count cleared. */\n markAllMentionsRead: Scalars['Int']['output'];\n /** Mark all notifications as read */\n markAllNotificationsAsRead: MarkNotificationsResponse;\n /** Mark a specific mention as read for the calling user. Returns true if a receipt was flipped. The user is always the JWT user; you cannot mark anyone else's receipt. */\n markMentionRead: Scalars['Boolean']['output'];\n /** Mark a notification as read */\n markNotificationAsRead?: Maybe<UserNotification>;\n /** Mark a notification as unread */\n markNotificationAsUnread?: Maybe<UserNotification>;\n markVisitorChatRead: VisitorReadResult;\n markVisitorMessageRead: WebOkResponse;\n masterArchiveContact: MasterMutationResponse;\n masterDeleteContactRequest: MasterMutationResponse;\n masterDeleteSubscription: MasterMutationResponse;\n masterMarkContactAsSpam: MasterMutationResponse;\n masterReplyToContact: ContactRequestResponse;\n masterSendDemoReady: ContactRequestResponse;\n masterSendNewsletter: SendNewsletterResponse;\n masterUnsubscribeEmail: MasterMutationResponse;\n masterUpdateContactRequest: ContactRequestResponse;\n moveChatCollection: ChatCollection;\n /** Move a folder to a new parent (or to root via `newParentId: null`). Refuses to move a folder into its own subtree (cycle). Recomputes ancestors for the folder + every descendant folder + every article in the moved subtree. */\n moveHelpFolder: HelpFolder;\n /** Move a ticket on the Kanban board (MASTER org only) */\n moveTicket: SupportTicket;\n normalizeChatCollectionPositions: Scalars['Boolean']['output'];\n /** Pause an integration. The integration will stop processing but all data is preserved. Paused integrations still count toward plan limits. For MESSAGING: stops the bot. For CRM: blocks sync operations. For AI: blocks API calls. */\n pauseIntegration: Integration;\n /** Preview what would be affected if a messaging integration is disconnected. Returns counts without actually disconnecting. Only available for MESSAGING category integrations. */\n previewDisconnectMessagingIntegration: IntegrationCleanupResult;\n /** Mark feedback as processed (MASTER org only) */\n processFeedback: PlatformFeedback;\n publishFlow: Flow;\n /** Flip an article to PUBLISHED. Stamps publishedAt (drives visitor sort) + publishedBy. Re-publishing refreshes publishedAt — useful for surfacing tweaks at the top of the list. */\n publishHelpArticle: HelpArticle;\n /** Flip to PUBLISHED. Stamps publishedAt (drives visitor sort) + publishedBy. Re-publishing refreshes publishedAt — useful for surfacing tweaks at the top of the feed. Re-publishing an archived post clears archivedAt. */\n publishNewsPost: NewsPost;\n /** Mark all messages in a chat as read */\n readAllMessages: Scalars['Float']['output'];\n readMessage: Message;\n recordVisitorHelpUnresolved: WebOkResponse;\n recordVisitorHelpView: WebOkResponse;\n recordVisitorNewsView: WebOkResponse;\n /** Generate new recovery codes. Old codes will be invalidated. */\n regenerateRecoveryCodes: RecoveryCodesResponse;\n /** Reject a template (MASTER org only) */\n rejectTemplate: TemplateApproval;\n removeDiscount: RemoveDiscountOutput;\n removeMember: Scalars['String']['output'];\n /** Remove an organisation and all its related data. Returns cleanup results with deleted counts. */\n removeOrganisation: OrganisationCleanupResult;\n removePeople: RemovalResult;\n removeUser: Scalars['Boolean']['output'];\n /** Rename a passkey */\n renamePasskey: PasskeyOutput;\n /** Request approval for a template to be made PUBLIC */\n requestTemplateApproval: TemplateApproval;\n /** Request changes for a template (MASTER org only) */\n requestTemplateChanges: TemplateApproval;\n /** Discard all unpublished draft changes and reset cards/triggers to the last published version */\n resetFlowDraft: Flow;\n /** Resolve a support ticket (MASTER org only) */\n resolveSupportTicket: SupportTicket;\n /** Restore a soft-deleted card. Returns the full card. */\n restoreCard: Card;\n /** Bulk restore multiple soft-deleted cards. */\n restoreCards: Array<Card>;\n restoreLabel: Label;\n /** Resume outbound messages for a paused chat. Tracks repeated resumes — if the same chat keeps getting paused, escalates to org block. */\n resumeChatOutbound: Scalars['Boolean']['output'];\n /** Resume a paused integration. Works for all integration types. */\n resumeIntegration: Integration;\n retryFailedContacts: Broadcast;\n /** Retry sending a failed message. Only messages with deliveryStatus \"failed\" can be retried. */\n retryFailedMessage: Message;\n /** Revalidate all AI assistants configuration (admin use) */\n revalidateAllAIAssistants: Scalars['Boolean']['output'];\n revokeSession: RevokeSessionResponse;\n /** Mint a new sharedSecret for the integration. The old secret stops verifying user_hash IMMEDIATELY — stage the new secret in your backend BEFORE calling this mutation if you need zero-downtime rotation. Returns the plaintext exactly once. */\n rotateWebIntegrationSecret: WebIntegrationWithSecret;\n rotateWebhookSecret: RotateWebhookSecretResponse;\n /** Stage a post for future publish at `scheduledFor`. Status flips to SCHEDULED; the scheduler tick promotes the row to PUBLISHED when scheduledFor <= now. Refuses past-dated timestamps — use publishNewsPost for \"publish now\". Re-scheduling overwrites the timestamp. */\n scheduleNewsPost: NewsPost;\n sendMessage: Message;\n sendVisitorMessage: VisitorMessageAck;\n /** Send a WhatsApp template message to a chat (works anytime, even outside 24h window) */\n sendWhatsAppTemplateMessage: SendWhatsAppTemplateResult;\n /** Set AI preferences (TTS voice/speed, image defaults) for the current operator. Pass null to clear. */\n setAIPreferences: OrganisationMember;\n setChatCopilotAssistant: Chat;\n /** Set the AI copilot assistant for the current user. Pass null to clear. */\n setCopilotAssistant: OrganisationMember;\n setMessageLabels: Message;\n setPeopleFieldValue: PeopleFieldValue;\n /** Set status message (emoji, text, duration) */\n setStatusMessage: User;\n /** Set bot commands (replaces entire list). Max 100 commands. Each command: 1-32 lowercase letters/digits/underscores, description 1-256 chars. */\n setTelegramBotCommands: TelegramBotSettings;\n /** Set the bot description shown on empty chat screen (up to 512 chars). Pass empty string to clear. */\n setTelegramBotDescription: TelegramBotSettings;\n /** Set the bot display name in Telegram (up to 64 chars). Pass empty string to reset to default (bot username). */\n setTelegramBotName: TelegramBotSettings;\n /** Set the bot short description for profile page (up to 120 chars). Pass empty string to clear. */\n setTelegramBotShortDescription: TelegramBotSettings;\n /** Set the chat menu button. Types: DEFAULT (Telegram default), COMMANDS (show command list), WEB_APP (open a Mini App — requires text + HTTPS URL). */\n setTelegramMenuButton: TelegramBotSettings;\n /** Set or clear the voice profile media for personalised TTS. Pass null to clear. */\n setVoiceProfile: User;\n setupFreeTier: Organisation;\n signOutAllOtherSessions: SignOutAllResponse;\n signOutAllSessions: SignOutAllResponse;\n signalVisitorTyping: WebOkResponse;\n /** Dev/QA: trigger a \"Contact is typing\" event for this chat (~10s). No-op in production webhooks today since no provider delivers inbound typing; this lets FE devs test the bubble. */\n simulateContactTyping: Scalars['Boolean']['output'];\n /** Bulk soft-delete multiple cards. */\n softDeleteCards: Scalars['Boolean']['output'];\n startAnonymousVisitor: VisitorAuthResult;\n /** Start an async CRM export job. Returns a job ID that can be used to track progress via crmSyncJobStatus query. Use this for large exports that may take time. Use sourceIntegrationId to export people from a specific Telegram bot. */\n startCrmExport: CrmSyncJobTypeOutput;\n /** Start an async CRM import job. Returns a job ID that can be used to track progress via crmSyncJobStatus query. Use this for large imports that may take time. Optionally specify targetIntegrationId to associate imported people with a Telegram bot. */\n startCrmImport: CrmSyncJobTypeOutput;\n startFlowForChat: Chat;\n startIdentifiedVisitor: VisitorAuthResult;\n startWebhookSchemaCapture: WebhookSchemaCaptureStatus;\n stopFlowForChat: Chat;\n stopWebhookSchemaCapture: WebhookSchemaCaptureStatus;\n submitContactForm: ContactRequestResponse;\n /** Submit platform feedback */\n submitFeedback: PlatformFeedback;\n submitVisitorPrechat: WebOkResponse;\n submitVisitorReaction: WebOkResponse;\n subscribeToNewsletter: NewsletterSubscriptionResponse;\n switchPlan: PlanSwitchOutput;\n /** Restore draft to the state captured at a specific activity — does NOT change published version */\n switchToFlowActivity: Flow;\n /** Switch to a previous version — sets it as live AND resets draft to match */\n switchToFlowVersion: Flow;\n /** Pull all bot settings from Telegram API and cache them. Call this to refresh after external changes (e.g. BotFather). */\n syncTelegramBotSettings: TelegramBotSettings;\n /** Sync templates from Meta for a WhatsApp integration */\n syncWhatsAppTemplates: WhatsAppTemplateSyncResult;\n /** Test an integration connection (supports AI, CRM integrations) */\n testIntegration: CrmConnectionTestResult;\n /** Fetch one upstream item for the schema picker. RSS: HTTP-fetches the feed and returns the first parsed item. WEBHOOK_PUSH: returns the most recently captured payload item (operator must push at least once to seed). Also persists the sample on the source row for subsequent reads. Returns null when no items are available. */\n testNewsSource?: Maybe<Scalars['JSON']['output']>;\n /** Test SSO configuration by validating IdP settings */\n testSsoConnection: TestSsoConnectionResponse;\n toggleReaction?: Maybe<Message>;\n /** Manually trigger an hourly metrics snapshot. Master admin only. */\n triggerMetricsSnapshot: Scalars['Boolean']['output'];\n /** Manually trigger retention cleanup. Owner only. Use with caution - deletions are permanent. */\n triggerRetentionCleanup: RetentionCleanupResult;\n /** Unarchive a notification */\n unarchiveNotification?: Maybe<UserNotification>;\n unassignChat: Chat;\n /** Manually unblock org outbound. Master organisation only. Regular org admins cannot unblock their own org — only master org can. */\n unblockOrgOutbound: Scalars['Boolean']['output'];\n /** Manually unblock a spam-blocked user (inbound) for a specific chat. Clears the Redis block + resets IS_BLOCKED people-field. */\n unblockUserSpam: Scalars['Boolean']['output'];\n unpublishFlow: Flow;\n /** Flip an article back to DRAFT. Visitors stop seeing it; operator-side \"last published\" timestamp is preserved. */\n unpublishHelpArticle: HelpArticle;\n /** Flip back to DRAFT (for further edits). Preserves publishedAt so the operator UI can show \"last published\" history. Distinct from archiveNewsPost (which is a \"final, retired\" state). */\n unpublishNewsPost: NewsPost;\n /** Update an existing AI assistant */\n updateAIAssistant: AiAssistant;\n updateBroadcast: Broadcast;\n updateCard: Card;\n updateChatCollection: ChatCollection;\n /** Generic mutation to update any chat field by key */\n updateChatField: Scalars['Boolean']['output'];\n /** Update data retention settings. Must be within plan limits. */\n updateDataRetention: Organisation;\n updateFlow: Flow;\n updateFlowTemplate: FlowTemplate;\n /** Patch operator-mutable fields on a draft / published article. Pass `folderId` to move the article between folders; the service recomputes ancestors so descendant queries stay accurate. */\n updateHelpArticle: HelpArticle;\n /** Patch operator-mutable fields. `parentId` is NOT here — use moveHelpFolder so the service can recompute ancestors atomically. */\n updateHelpFolder: HelpFolder;\n /** Patch a help tag. */\n updateHelpTag: HelpTag;\n /** Update an existing integration */\n updateIntegration: Integration;\n /** Update field mappings and sync settings for a CRM integration. Use integrationExternalSchema query first to get available external fields. */\n updateIntegrationFieldMappings: Integration;\n updateLabel: Label;\n updateMemberRole: OrganisationMember;\n updateMessage: Message;\n /** Update the delivery status of a message. Used for manual status corrections. */\n updateMessageDeliveryStatus?: Maybe<Message>;\n /** Patch a news category. Slug-collision returns 400. */\n updateNewsCategory: NewsCategory;\n /** Patch operator-mutable fields on a news post. Status flips go via dedicated mutations. */\n updateNewsPost: NewsPost;\n /** Patch a news source. Type is immutable post-create. */\n updateNewsSource: NewsSource;\n /** Patch a news tag. */\n updateNewsTag: NewsTag;\n updateOrganisation: Organisation;\n updatePaymentMethod: PaymentMethodOutput;\n updatePeopleFieldDefinition: PeopleFieldDefinition;\n /** Replace the reaction set for a surface. Full-replacement input — operator sends the complete intended slot list. Pass `slotIndex` per slot to preserve historical reaction counts across emoji / sentiment edits. */\n updateReactionSet: ReactionSet;\n /** Update spam protection settings for the organisation */\n updateSpamProtectionSettings: Organisation;\n /** Update SSO configuration */\n updateSsoConfig: SsoConfig;\n /** Update a support ticket (MASTER org only) */\n updateSupportTicket: SupportTicket;\n updateTrigger: Trigger;\n updateUser: User;\n /** Patch operator-mutable fields on the web integration. publicKey is immutable (would break embedded loader snippets); use rotateWebIntegrationSecret to spin a new sharedSecret. */\n updateWebIntegration: WebIntegration;\n updateWebhookConnection: WebhookConnection;\n updateWebhookSubscription: WebhookConnection;\n /** Update local metadata for a WhatsApp template (variableMappings, defaultMedia) */\n updateWhatsAppTemplate: UpdateWhatsAppTemplateResult;\n uploadMultipleMedia: Array<Media>;\n uploadVisitorMedia: VisitorUploadResult;\n /** Verify and complete passkey registration */\n verifyPasskeyRegistration: PasskeyOutput;\n /** Complete 2FA setup by verifying a code from authenticator app */\n verifyTwoFactorSetup: Scalars['Boolean']['output'];\n verifyVisitorPasskeyAuthentication: VisitorAuthResult;\n verifyVisitorPasskeyRegistration: VisitorAuthResult;\n visitorPasskeyAuthenticationOptions: VisitorPasskeyOptionsType;\n visitorPasskeyRegistrationOptions: VisitorPasskeyOptionsType;\n /** Withdraw a pending approval request */\n withdrawApprovalRequest: Scalars['Boolean']['output'];\n};\n\n\nexport type MutationAcceptInviteArgs = {\n memberId: Scalars['String']['input'];\n};\n\n\nexport type MutationAcceptInviteByTokenArgs = {\n token: Scalars['String']['input'];\n};\n\n\nexport type MutationActivateNewsSourceArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationActivateSsoConfigArgs = {\n organisationId: Scalars['String']['input'];\n};\n\n\nexport type MutationAddTicketCommentArgs = {\n input: AddTicketCommentInput;\n};\n\n\nexport type MutationApplyDiscountArgs = {\n promotionCode: Scalars['String']['input'];\n};\n\n\nexport type MutationApproveTemplateArgs = {\n approvalId: Scalars['ID']['input'];\n notes?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationArchiveAllReadNotificationsArgs = {\n category?: InputMaybe<NotificationCategory>;\n organisationId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationArchiveLabelArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationArchiveNewsPostArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationArchiveNotificationArgs = {\n notificationId: Scalars['String']['input'];\n};\n\n\nexport type MutationAssignChatToOperatorArgs = {\n chatId: Scalars['String']['input'];\n operatorId: Scalars['String']['input'];\n};\n\n\nexport type MutationAssignSupportTicketArgs = {\n id: Scalars['ID']['input'];\n userId?: InputMaybe<Scalars['ID']['input']>;\n};\n\n\nexport type MutationCancelBroadcastArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationCancelCrmSyncJobArgs = {\n jobId: Scalars['String']['input'];\n};\n\n\nexport type MutationCloseChatArgs = {\n chatId: Scalars['String']['input'];\n};\n\n\nexport type MutationCloseSupportTicketArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationConfigureAiAssistantArgs = {\n id: Scalars['String']['input'];\n input: ConfigureAiAssistantInput;\n};\n\n\nexport type MutationConfigureSelfTenantDatabaseArgs = {\n input: ConfigureSelfTenantInput;\n};\n\n\nexport type MutationConfigureTenantDatabaseArgs = {\n input: ConfigureTenantInput;\n};\n\n\nexport type MutationConfirmSetupIntentArgs = {\n input: ConfirmSetupIntentInput;\n};\n\n\nexport type MutationConnectInstagramArgs = {\n input: ConnectInstagramInput;\n};\n\n\nexport type MutationConnectViberBotArgs = {\n input: ConnectViberBotInput;\n};\n\n\nexport type MutationConnectWhatsAppCatalogArgs = {\n catalogId: Scalars['String']['input'];\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type MutationCreateAiAssistantArgs = {\n input: CreateAiAssistantInput;\n};\n\n\nexport type MutationCreateBroadcastArgs = {\n input: CreateBroadcastInput;\n};\n\n\nexport type MutationCreateCardArgs = {\n input: CreateCardInput;\n};\n\n\nexport type MutationCreateChatArgs = {\n createChatInput: CreateChatInput;\n};\n\n\nexport type MutationCreateChatCollectionArgs = {\n input: CreateChatCollectionInput;\n};\n\n\nexport type MutationCreateFlowArgs = {\n input: CreateFlowInput;\n};\n\n\nexport type MutationCreateFlowFromTemplateArgs = {\n input: CreateFlowFromTemplateInput;\n};\n\n\nexport type MutationCreateFlowTemplateArgs = {\n input: CreateFlowTemplateInput;\n};\n\n\nexport type MutationCreateHelpArticleArgs = {\n input: CreateHelpArticleInput;\n};\n\n\nexport type MutationCreateHelpArticleTranslationArgs = {\n input: CreateHelpArticleInput;\n sourceArticleId: Scalars['ID']['input'];\n};\n\n\nexport type MutationCreateHelpFolderArgs = {\n input: CreateHelpFolderInput;\n};\n\n\nexport type MutationCreateHelpTagArgs = {\n input: CreateHelpTagInput;\n};\n\n\nexport type MutationCreateIntegrationArgs = {\n input: CreateIntegrationInput;\n};\n\n\nexport type MutationCreateLabelArgs = {\n input: CreateLabelInput;\n};\n\n\nexport type MutationCreateMediaArgs = {\n createMediaInput: CreateMediaInput;\n file: Scalars['Upload']['input'];\n};\n\n\nexport type MutationCreateNewsCategoryArgs = {\n input: CreateNewsCategoryInput;\n};\n\n\nexport type MutationCreateNewsPostArgs = {\n input: CreateNewsPostInput;\n};\n\n\nexport type MutationCreateNewsPostTranslationArgs = {\n input: CreateNewsPostInput;\n sourcePostId: Scalars['ID']['input'];\n};\n\n\nexport type MutationCreateNewsSourceArgs = {\n input: CreateNewsSourceInput;\n};\n\n\nexport type MutationCreateNewsTagArgs = {\n input: CreateNewsTagInput;\n};\n\n\nexport type MutationCreateOrganisationArgs = {\n createOrganisationInput: CreateOrganisationInput;\n};\n\n\nexport type MutationCreatePeopleArgs = {\n createPeopleInput: CreatePeopleInput;\n};\n\n\nexport type MutationCreatePeopleFieldDefinitionArgs = {\n input: CreateFieldDefinitionDto;\n};\n\n\nexport type MutationCreateSsoConfigArgs = {\n input: CreateSsoConfigInput;\n};\n\n\nexport type MutationCreateSubscriptionArgs = {\n priceId: Scalars['String']['input'];\n promotionCode?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationCreateSupportTicketArgs = {\n input: CreateSupportTicketInput;\n};\n\n\nexport type MutationCreateTemplateFromFlowArgs = {\n input: CreateTemplateFromFlowInput;\n};\n\n\nexport type MutationCreateTriggerArgs = {\n input: CreateTriggerInput;\n};\n\n\nexport type MutationCreateWebIntegrationArgs = {\n input: CreateWebIntegrationInput;\n};\n\n\nexport type MutationCreateWebhookConnectionArgs = {\n input: CreateWebhookConnectionInput;\n};\n\n\nexport type MutationCreateWhatsAppTemplateArgs = {\n input: CreateWhatsAppTemplateInput;\n};\n\n\nexport type MutationDeactivateNewsSourceArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationDeclineInviteArgs = {\n memberId: Scalars['String']['input'];\n};\n\n\nexport type MutationDeclineInviteByTokenArgs = {\n token: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteAiAssistantArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteCardArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteChatCollectionArgs = {\n idOrSlug: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteCrmSyncJobArgs = {\n jobId: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteExportJobArgs = {\n jobId: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteFlowArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteFlowTemplateArgs = {\n templateId: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteHelpArticleArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationDeleteHelpFolderArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationDeleteHelpTagArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationDeleteMediaArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteMessageArgs = {\n messageId: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteMyAccountArgs = {\n input: DeleteAccountInput;\n};\n\n\nexport type MutationDeleteNewsCategoryArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationDeleteNewsPostArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationDeleteNewsSourceArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationDeleteNewsTagArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationDeleteNotificationArgs = {\n notificationId: Scalars['String']['input'];\n};\n\n\nexport type MutationDeletePasskeyArgs = {\n input: DeletePasskeyInput;\n};\n\n\nexport type MutationDeletePeopleFieldDefinitionArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeletePeopleFieldValueArgs = {\n fieldId: Scalars['String']['input'];\n peopleId: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteSsoConfigArgs = {\n organisationId: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteSupportTicketArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationDeleteTelegramBotCommandsArgs = {\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteTicketCommentArgs = {\n commentId: Scalars['ID']['input'];\n};\n\n\nexport type MutationDeleteTriggerArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteWebIntegrationArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationDeleteWebhookConnectionArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteWhatsAppTemplateArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationDisableSsoConfigArgs = {\n organisationId: Scalars['String']['input'];\n};\n\n\nexport type MutationDisableTwoFactorArgs = {\n input: DisableTwoFactorInput;\n};\n\n\nexport type MutationDisconnectIntegrationArgs = {\n input: DisconnectIntegrationInput;\n};\n\n\nexport type MutationDisconnectWhatsAppCatalogArgs = {\n catalogId: Scalars['String']['input'];\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type MutationDuplicateFlowArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationEditTicketCommentArgs = {\n input: EditTicketCommentInput;\n};\n\n\nexport type MutationExportPeopleArgs = {\n input: PeopleExportInput;\n};\n\n\nexport type MutationForceFailCrmSyncJobArgs = {\n jobId: Scalars['String']['input'];\n reason?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationGeneratePasskeyAuthenticationOptionsArgs = {\n input?: InputMaybe<GeneratePasskeyAuthenticationInput>;\n};\n\n\nexport type MutationIngestWebhookSampleArgs = {\n id: Scalars['String']['input'];\n sample: Scalars['JSON']['input'];\n};\n\n\nexport type MutationInviteMemberArgs = {\n inviteMemberInput: InviteMemberInput;\n};\n\n\nexport type MutationLeaveOrganisationArgs = {\n transferOwnershipTo?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationMarkAllNotificationsAsReadArgs = {\n category?: InputMaybe<NotificationCategory>;\n organisationId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationMarkMentionReadArgs = {\n messageId: Scalars['ID']['input'];\n};\n\n\nexport type MutationMarkNotificationAsReadArgs = {\n notificationId: Scalars['String']['input'];\n};\n\n\nexport type MutationMarkNotificationAsUnreadArgs = {\n notificationId: Scalars['String']['input'];\n};\n\n\nexport type MutationMarkVisitorChatReadArgs = {\n chatId: Scalars['String']['input'];\n};\n\n\nexport type MutationMarkVisitorMessageReadArgs = {\n messageId: Scalars['String']['input'];\n};\n\n\nexport type MutationMasterArchiveContactArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationMasterDeleteContactRequestArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationMasterDeleteSubscriptionArgs = {\n email: Scalars['String']['input'];\n};\n\n\nexport type MutationMasterMarkContactAsSpamArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationMasterReplyToContactArgs = {\n input: ReplyContactRequestInput;\n};\n\n\nexport type MutationMasterSendDemoReadyArgs = {\n input: SendDemoReadyInput;\n};\n\n\nexport type MutationMasterSendNewsletterArgs = {\n input: SendNewsletterInput;\n};\n\n\nexport type MutationMasterUnsubscribeEmailArgs = {\n email: Scalars['String']['input'];\n reason?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationMasterUpdateContactRequestArgs = {\n input: UpdateContactRequestInput;\n};\n\n\nexport type MutationMoveChatCollectionArgs = {\n input: MoveCollectionInput;\n};\n\n\nexport type MutationMoveHelpFolderArgs = {\n id: Scalars['ID']['input'];\n newParentId?: InputMaybe<Scalars['ID']['input']>;\n};\n\n\nexport type MutationMoveTicketArgs = {\n input: MoveTicketInput;\n};\n\n\nexport type MutationPauseIntegrationArgs = {\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type MutationPreviewDisconnectMessagingIntegrationArgs = {\n deletePeople?: InputMaybe<Scalars['Boolean']['input']>;\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type MutationProcessFeedbackArgs = {\n input: ProcessFeedbackInput;\n};\n\n\nexport type MutationPublishFlowArgs = {\n id: Scalars['String']['input'];\n input?: InputMaybe<PublishFlowInput>;\n};\n\n\nexport type MutationPublishHelpArticleArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationPublishNewsPostArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationReadAllMessagesArgs = {\n chatId: Scalars['String']['input'];\n};\n\n\nexport type MutationReadMessageArgs = {\n messageId: Scalars['String']['input'];\n};\n\n\nexport type MutationRecordVisitorHelpUnresolvedArgs = {\n articleId: Scalars['String']['input'];\n};\n\n\nexport type MutationRecordVisitorHelpViewArgs = {\n articleId: Scalars['String']['input'];\n};\n\n\nexport type MutationRecordVisitorNewsViewArgs = {\n postId: Scalars['String']['input'];\n};\n\n\nexport type MutationRegenerateRecoveryCodesArgs = {\n input: RegenerateRecoveryCodesInput;\n};\n\n\nexport type MutationRejectTemplateArgs = {\n approvalId: Scalars['ID']['input'];\n reason: Scalars['String']['input'];\n};\n\n\nexport type MutationRemoveMemberArgs = {\n memberId: Scalars['String']['input'];\n};\n\n\nexport type MutationRemovePeopleArgs = {\n input: RemovePeopleInput;\n};\n\n\nexport type MutationRemoveUserArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationRenamePasskeyArgs = {\n input: RenamePasskeyInput;\n};\n\n\nexport type MutationRequestTemplateApprovalArgs = {\n templateId: Scalars['ID']['input'];\n};\n\n\nexport type MutationRequestTemplateChangesArgs = {\n approvalId: Scalars['ID']['input'];\n feedback: Scalars['String']['input'];\n};\n\n\nexport type MutationResetFlowDraftArgs = {\n flowId: Scalars['String']['input'];\n};\n\n\nexport type MutationResolveSupportTicketArgs = {\n id: Scalars['ID']['input'];\n input: ResolveSupportTicketInput;\n};\n\n\nexport type MutationRestoreCardArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationRestoreCardsArgs = {\n ids: Array<Scalars['String']['input']>;\n};\n\n\nexport type MutationRestoreLabelArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationResumeChatOutboundArgs = {\n chatId: Scalars['String']['input'];\n};\n\n\nexport type MutationResumeIntegrationArgs = {\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type MutationRetryFailedContactsArgs = {\n id: Scalars['String']['input'];\n scheduledAt?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\n\nexport type MutationRetryFailedMessageArgs = {\n messageId: Scalars['String']['input'];\n};\n\n\nexport type MutationRevokeSessionArgs = {\n sessionId: Scalars['String']['input'];\n};\n\n\nexport type MutationRotateWebIntegrationSecretArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationRotateWebhookSecretArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationScheduleNewsPostArgs = {\n id: Scalars['ID']['input'];\n scheduledFor: Scalars['DateTime']['input'];\n};\n\n\nexport type MutationSendMessageArgs = {\n chatId: Scalars['String']['input'];\n input: CreateCombinedMessageInput;\n};\n\n\nexport type MutationSendVisitorMessageArgs = {\n input: VisitorSendMessageInput;\n};\n\n\nexport type MutationSendWhatsAppTemplateMessageArgs = {\n input: SendWhatsAppTemplateInput;\n};\n\n\nexport type MutationSetAiPreferencesArgs = {\n preferences?: InputMaybe<MemberAiPreferencesInput>;\n};\n\n\nexport type MutationSetChatCopilotAssistantArgs = {\n assistantId?: InputMaybe<Scalars['String']['input']>;\n chatId: Scalars['String']['input'];\n};\n\n\nexport type MutationSetCopilotAssistantArgs = {\n assistantId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationSetMessageLabelsArgs = {\n input: SetMessageLabelsInput;\n};\n\n\nexport type MutationSetPeopleFieldValueArgs = {\n input: SetFieldValueDto;\n};\n\n\nexport type MutationSetStatusMessageArgs = {\n input: SetStatusMessageInput;\n};\n\n\nexport type MutationSetTelegramBotCommandsArgs = {\n input: SetTelegramBotCommandsInput;\n};\n\n\nexport type MutationSetTelegramBotDescriptionArgs = {\n input: SetTelegramBotDescriptionInput;\n};\n\n\nexport type MutationSetTelegramBotNameArgs = {\n input: SetTelegramBotNameInput;\n};\n\n\nexport type MutationSetTelegramBotShortDescriptionArgs = {\n input: SetTelegramBotShortDescriptionInput;\n};\n\n\nexport type MutationSetTelegramMenuButtonArgs = {\n input: SetTelegramMenuButtonInput;\n};\n\n\nexport type MutationSetVoiceProfileArgs = {\n voiceProfileId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationSetupFreeTierArgs = {\n priceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationSimulateContactTypingArgs = {\n chatId: Scalars['ID']['input'];\n contactId?: InputMaybe<Scalars['ID']['input']>;\n};\n\n\nexport type MutationSoftDeleteCardsArgs = {\n ids: Array<Scalars['String']['input']>;\n};\n\n\nexport type MutationStartAnonymousVisitorArgs = {\n input: VisitorAnonymousAuthInput;\n};\n\n\nexport type MutationStartCrmExportArgs = {\n input: CrmExportInput;\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type MutationStartCrmImportArgs = {\n input: CrmImportInput;\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type MutationStartFlowForChatArgs = {\n chatId: Scalars['String']['input'];\n flowId: Scalars['String']['input'];\n};\n\n\nexport type MutationStartIdentifiedVisitorArgs = {\n input: VisitorIdentifiedAuthInput;\n};\n\n\nexport type MutationStartWebhookSchemaCaptureArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationStopFlowForChatArgs = {\n chatId: Scalars['String']['input'];\n};\n\n\nexport type MutationStopWebhookSchemaCaptureArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationSubmitContactFormArgs = {\n input: CreateContactRequestInput;\n};\n\n\nexport type MutationSubmitFeedbackArgs = {\n input: SubmitFeedbackInput;\n};\n\n\nexport type MutationSubmitVisitorPrechatArgs = {\n input: VisitorPrechatInput;\n};\n\n\nexport type MutationSubmitVisitorReactionArgs = {\n input: VisitorReactionInput;\n};\n\n\nexport type MutationSubscribeToNewsletterArgs = {\n input: CreateNewsletterSubscriptionInput;\n};\n\n\nexport type MutationSwitchPlanArgs = {\n input: SwitchPlanInput;\n};\n\n\nexport type MutationSwitchToFlowActivityArgs = {\n activityId: Scalars['String']['input'];\n};\n\n\nexport type MutationSwitchToFlowVersionArgs = {\n versionId: Scalars['String']['input'];\n};\n\n\nexport type MutationSyncTelegramBotSettingsArgs = {\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type MutationSyncWhatsAppTemplatesArgs = {\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type MutationTestIntegrationArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationTestNewsSourceArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationTestSsoConnectionArgs = {\n organisationId: Scalars['String']['input'];\n};\n\n\nexport type MutationToggleReactionArgs = {\n input: ToggleReactionInput;\n};\n\n\nexport type MutationUnarchiveNotificationArgs = {\n notificationId: Scalars['String']['input'];\n};\n\n\nexport type MutationUnassignChatArgs = {\n chatId: Scalars['String']['input'];\n};\n\n\nexport type MutationUnblockOrgOutboundArgs = {\n organisationId: Scalars['String']['input'];\n};\n\n\nexport type MutationUnblockUserSpamArgs = {\n chatId: Scalars['String']['input'];\n};\n\n\nexport type MutationUnpublishFlowArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationUnpublishHelpArticleArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationUnpublishNewsPostArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type MutationUpdateAiAssistantArgs = {\n id: Scalars['String']['input'];\n input: UpdateAiAssistantInput;\n};\n\n\nexport type MutationUpdateBroadcastArgs = {\n id: Scalars['String']['input'];\n input: UpdateBroadcastInput;\n};\n\n\nexport type MutationUpdateCardArgs = {\n id: Scalars['String']['input'];\n input: UpdateCardInput;\n};\n\n\nexport type MutationUpdateChatCollectionArgs = {\n idOrSlug: Scalars['String']['input'];\n input: UpdateChatCollectionInput;\n};\n\n\nexport type MutationUpdateChatFieldArgs = {\n input: UpdateChatFieldInput;\n};\n\n\nexport type MutationUpdateDataRetentionArgs = {\n input: UpdateDataRetentionInput;\n};\n\n\nexport type MutationUpdateFlowArgs = {\n id: Scalars['String']['input'];\n input: UpdateFlowInput;\n};\n\n\nexport type MutationUpdateFlowTemplateArgs = {\n input: UpdateFlowTemplateInput;\n templateId: Scalars['String']['input'];\n};\n\n\nexport type MutationUpdateHelpArticleArgs = {\n id: Scalars['ID']['input'];\n input: UpdateHelpArticleInput;\n};\n\n\nexport type MutationUpdateHelpFolderArgs = {\n id: Scalars['ID']['input'];\n input: UpdateHelpFolderInput;\n};\n\n\nexport type MutationUpdateHelpTagArgs = {\n id: Scalars['ID']['input'];\n input: UpdateHelpTagInput;\n};\n\n\nexport type MutationUpdateIntegrationArgs = {\n id: Scalars['String']['input'];\n input: UpdateIntegrationInput;\n};\n\n\nexport type MutationUpdateIntegrationFieldMappingsArgs = {\n input: UpdateIntegrationFieldMappingsInput;\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type MutationUpdateLabelArgs = {\n id: Scalars['String']['input'];\n input: UpdateLabelInput;\n};\n\n\nexport type MutationUpdateMemberRoleArgs = {\n updateMemberRoleInput: UpdateMemberRoleInput;\n};\n\n\nexport type MutationUpdateMessageArgs = {\n input: UpdateMessageInput;\n messageId: Scalars['String']['input'];\n};\n\n\nexport type MutationUpdateMessageDeliveryStatusArgs = {\n errorMessage?: InputMaybe<Scalars['String']['input']>;\n messageId: Scalars['String']['input'];\n status: MessageDeliveryStatus;\n};\n\n\nexport type MutationUpdateNewsCategoryArgs = {\n id: Scalars['ID']['input'];\n input: UpdateNewsCategoryInput;\n};\n\n\nexport type MutationUpdateNewsPostArgs = {\n id: Scalars['ID']['input'];\n input: UpdateNewsPostInput;\n};\n\n\nexport type MutationUpdateNewsSourceArgs = {\n id: Scalars['ID']['input'];\n input: UpdateNewsSourceInput;\n};\n\n\nexport type MutationUpdateNewsTagArgs = {\n id: Scalars['ID']['input'];\n input: UpdateNewsTagInput;\n};\n\n\nexport type MutationUpdateOrganisationArgs = {\n updateOrganisationInput: UpdateOrganisationInput;\n};\n\n\nexport type MutationUpdatePaymentMethodArgs = {\n input: UpdatePaymentMethodInput;\n};\n\n\nexport type MutationUpdatePeopleFieldDefinitionArgs = {\n id: Scalars['String']['input'];\n input: UpdateFieldDefinitionDto;\n};\n\n\nexport type MutationUpdateReactionSetArgs = {\n input: UpdateReactionSetInput;\n surface: ReactionSurface;\n};\n\n\nexport type MutationUpdateSpamProtectionSettingsArgs = {\n blockDurationMinutes?: InputMaybe<Scalars['Int']['input']>;\n blockMode?: InputMaybe<SpamBlockMode>;\n enabled?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationUpdateSsoConfigArgs = {\n input: UpdateSsoConfigInput;\n};\n\n\nexport type MutationUpdateSupportTicketArgs = {\n id: Scalars['ID']['input'];\n input: UpdateSupportTicketInput;\n};\n\n\nexport type MutationUpdateTriggerArgs = {\n id: Scalars['String']['input'];\n input: UpdateTriggerInput;\n};\n\n\nexport type MutationUpdateUserArgs = {\n updateUserInput: UpdateUserInput;\n};\n\n\nexport type MutationUpdateWebIntegrationArgs = {\n id: Scalars['ID']['input'];\n input: UpdateWebIntegrationInput;\n};\n\n\nexport type MutationUpdateWebhookConnectionArgs = {\n id: Scalars['String']['input'];\n input: UpdateWebhookConnectionInput;\n};\n\n\nexport type MutationUpdateWebhookSubscriptionArgs = {\n events: Array<Scalars['String']['input']>;\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationUpdateWhatsAppTemplateArgs = {\n input: UpdateWhatsAppTemplateInput;\n};\n\n\nexport type MutationUploadMultipleMediaArgs = {\n createMediaInputs: Array<CreateMediaInput>;\n files: Array<Scalars['Upload']['input']>;\n};\n\n\nexport type MutationUploadVisitorMediaArgs = {\n input: VisitorUploadInputType;\n};\n\n\nexport type MutationVerifyPasskeyRegistrationArgs = {\n input: VerifyPasskeyRegistrationInput;\n};\n\n\nexport type MutationVerifyTwoFactorSetupArgs = {\n input: VerifyTwoFactorInput;\n};\n\n\nexport type MutationVerifyVisitorPasskeyAuthenticationArgs = {\n input: VisitorPasskeyVerifyInput;\n};\n\n\nexport type MutationVerifyVisitorPasskeyRegistrationArgs = {\n input: VisitorPasskeyVerifyInput;\n};\n\n\nexport type MutationVisitorPasskeyAuthenticationOptionsArgs = {\n input: VisitorPasskeyOptionsInput;\n};\n\n\nexport type MutationVisitorPasskeyRegistrationOptionsArgs = {\n input: VisitorPasskeyOptionsInput;\n};\n\n\nexport type MutationWithdrawApprovalRequestArgs = {\n templateId: Scalars['ID']['input'];\n};\n\nexport type MyMentionsInput = {\n before?: InputMaybe<Scalars['String']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n query?: InputMaybe<Scalars['String']['input']>;\n readState?: InputMaybe<MentionReadState>;\n};\n\n/** Who sees a news post — ALL (default) or AUTHED (only host-authenticated visitors). */\nexport enum NewsAudienceMode {\n ALL = 'ALL',\n AUTHED = 'AUTHED'\n}\n\nexport type NewsCategory = {\n __typename?: 'NewsCategory';\n _id: Scalars['ID']['output'];\n createdAt: Scalars['DateTime']['output'];\n description?: Maybe<Scalars['String']['output']>;\n integrationId: Scalars['ID']['output'];\n label: Scalars['String']['output'];\n labelI18n?: Maybe<Scalars['JSON']['output']>;\n organisationId: Scalars['ID']['output'];\n slug: Scalars['String']['output'];\n updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type NewsPost = {\n __typename?: 'NewsPost';\n _id: Scalars['ID']['output'];\n archivedAt?: Maybe<Scalars['DateTime']['output']>;\n audienceMode: NewsAudienceMode;\n authors: Array<User>;\n bodyFormat: Scalars['String']['output'];\n categories: Array<NewsCategory>;\n contentMarkdown: Scalars['String']['output'];\n coverImageUrl?: Maybe<Media>;\n createdAt: Scalars['DateTime']['output'];\n excerpt?: Maybe<Scalars['String']['output']>;\n externalCoverImageUrl?: Maybe<Scalars['String']['output']>;\n externalId?: Maybe<Scalars['String']['output']>;\n integrationId: Scalars['ID']['output'];\n locale: Scalars['String']['output'];\n organisationId: Scalars['ID']['output'];\n publishedAt?: Maybe<Scalars['DateTime']['output']>;\n publishedBy?: Maybe<Scalars['ID']['output']>;\n /** Per-slot reaction counts keyed by slotIndex (string). FE joins against `reactionSet(NEWS)` for emoji + sentiment. */\n reactionCounts: Scalars['JSON']['output'];\n scheduledFor?: Maybe<Scalars['DateTime']['output']>;\n slug?: Maybe<Scalars['String']['output']>;\n source?: Maybe<NewsSource>;\n sourceUrl?: Maybe<Scalars['String']['output']>;\n status: NewsPostStatus;\n tags: Array<NewsTag>;\n title: Scalars['String']['output'];\n translationGroupId?: Maybe<Scalars['ID']['output']>;\n translations: Array<NewsPost>;\n updatedAt: Scalars['DateTime']['output'];\n upstreamUpdatedAt?: Maybe<Scalars['DateTime']['output']>;\n viewCount: Scalars['Int']['output'];\n /** The current visitor's own reaction slotIndex on this item (per translation group), or null if they haven't reacted / aren't identified. */\n viewerReaction?: Maybe<Scalars['Int']['output']>;\n};\n\n/** Sort axis for `newsPosts` operator query. */\nexport enum NewsPostSort {\n CREATED_DESC = 'CREATED_DESC',\n PUBLISHED_DESC = 'PUBLISHED_DESC',\n UPDATED_DESC = 'UPDATED_DESC'\n}\n\n/** News post publish state — DRAFT (operator-only), SCHEDULED (operator-only until scheduledFor <= now), PUBLISHED (visitor-visible), ARCHIVED (was published, now hidden) */\nexport enum NewsPostStatus {\n ARCHIVED = 'ARCHIVED',\n DRAFT = 'DRAFT',\n PUBLISHED = 'PUBLISHED',\n SCHEDULED = 'SCHEDULED'\n}\n\nexport type NewsSource = {\n __typename?: 'NewsSource';\n _id: Scalars['ID']['output'];\n createdAt: Scalars['DateTime']['output'];\n enabled: Scalars['Boolean']['output'];\n fieldMap?: Maybe<NewsSourceFieldMap>;\n integrationId: Scalars['ID']['output'];\n lastSampleAt?: Maybe<Scalars['DateTime']['output']>;\n lastSampleItem?: Maybe<Scalars['JSON']['output']>;\n name: Scalars['String']['output'];\n organisationId: Scalars['ID']['output'];\n rss?: Maybe<RssSourceConfig>;\n type: NewsSourceMode;\n updatedAt: Scalars['DateTime']['output'];\n webhookConnectionId?: Maybe<Scalars['ID']['output']>;\n};\n\nexport type NewsSourceFieldMap = {\n __typename?: 'NewsSourceFieldMap';\n audienceMode?: Maybe<Scalars['String']['output']>;\n body?: Maybe<Scalars['String']['output']>;\n bodyFormat?: Maybe<Scalars['String']['output']>;\n categories?: Maybe<Scalars['String']['output']>;\n coverImageUrl?: Maybe<Scalars['String']['output']>;\n excerpt?: Maybe<Scalars['String']['output']>;\n externalId?: Maybe<Scalars['String']['output']>;\n locale?: Maybe<Scalars['String']['output']>;\n publishedAt?: Maybe<Scalars['String']['output']>;\n slug?: Maybe<Scalars['String']['output']>;\n sourceUrl?: Maybe<Scalars['String']['output']>;\n tags?: Maybe<Scalars['String']['output']>;\n title?: Maybe<Scalars['String']['output']>;\n updatedAt?: Maybe<Scalars['String']['output']>;\n};\n\nexport type NewsSourceFieldMapInput = {\n audienceMode?: InputMaybe<Scalars['String']['input']>;\n body?: InputMaybe<Scalars['String']['input']>;\n bodyFormat?: InputMaybe<Scalars['String']['input']>;\n categories?: InputMaybe<Scalars['String']['input']>;\n coverImageUrl?: InputMaybe<Scalars['String']['input']>;\n excerpt?: InputMaybe<Scalars['String']['input']>;\n externalId?: InputMaybe<Scalars['String']['input']>;\n locale?: InputMaybe<Scalars['String']['input']>;\n publishedAt?: InputMaybe<Scalars['String']['input']>;\n slug?: InputMaybe<Scalars['String']['input']>;\n sourceUrl?: InputMaybe<Scalars['String']['input']>;\n tags?: InputMaybe<Scalars['String']['input']>;\n title?: InputMaybe<Scalars['String']['input']>;\n updatedAt?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type NewsSourceFieldMapping = {\n __typename?: 'NewsSourceFieldMapping';\n field: Scalars['String']['output'];\n isOverride: Scalars['Boolean']['output'];\n path?: Maybe<Scalars['String']['output']>;\n resolved?: Maybe<Scalars['String']['output']>;\n};\n\n/** Where the News tab content comes from — NATIVE (wexio-authored), RSS (polled feed), WEBHOOK_PUSH (CMS-pushed). CUSTOM_API reserved for Phase 2+. */\nexport enum NewsSourceMode {\n NATIVE = 'NATIVE',\n RSS = 'RSS',\n WEBHOOK_PUSH = 'WEBHOOK_PUSH'\n}\n\nexport type NewsSourceRssInput = {\n feedUrl: Scalars['String']['input'];\n pollMinutes?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type NewsSourceVariable = {\n __typename?: 'NewsSourceVariable';\n example?: Maybe<Scalars['String']['output']>;\n path: Scalars['String']['output'];\n type: Scalars['String']['output'];\n};\n\nexport type NewsTag = {\n __typename?: 'NewsTag';\n _id: Scalars['ID']['output'];\n createdAt: Scalars['DateTime']['output'];\n description?: Maybe<Scalars['String']['output']>;\n integrationId: Scalars['ID']['output'];\n label: Scalars['String']['output'];\n labelI18n?: Maybe<Scalars['JSON']['output']>;\n organisationId: Scalars['ID']['output'];\n slug: Scalars['String']['output'];\n updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type NewsletterFiltersInput = {\n isActive?: InputMaybe<Scalars['Boolean']['input']>;\n search?: InputMaybe<Scalars['String']['input']>;\n skip?: Scalars['Int']['input'];\n source?: InputMaybe<NewsletterSource>;\n take?: Scalars['Int']['input'];\n};\n\n/** Source of newsletter subscription */\nexport enum NewsletterSource {\n BLOG = 'BLOG',\n COMING_SOON = 'COMING_SOON',\n FOOTER = 'FOOTER',\n LANDING_PAGE = 'LANDING_PAGE'\n}\n\nexport type NewsletterStatsResponse = {\n __typename?: 'NewsletterStatsResponse';\n active: Scalars['Int']['output'];\n sourceBlog: Scalars['Int']['output'];\n sourceComingSoon: Scalars['Int']['output'];\n sourceFooter: Scalars['Int']['output'];\n sourceLandingPage: Scalars['Int']['output'];\n total: Scalars['Int']['output'];\n unsubscribed: Scalars['Int']['output'];\n};\n\nexport type NewsletterSubscription = {\n __typename?: 'NewsletterSubscription';\n _id: Scalars['ID']['output'];\n createdAt: Scalars['DateTime']['output'];\n email: Scalars['String']['output'];\n ipAddress?: Maybe<Scalars['String']['output']>;\n isActive: Scalars['Boolean']['output'];\n metadata?: Maybe<Scalars['String']['output']>;\n referrer?: Maybe<Scalars['String']['output']>;\n source: NewsletterSource;\n unsubscribeReason?: Maybe<Scalars['String']['output']>;\n unsubscribeToken: Scalars['String']['output'];\n unsubscribedAt?: Maybe<Scalars['DateTime']['output']>;\n updatedAt: Scalars['DateTime']['output'];\n userAgent?: Maybe<Scalars['String']['output']>;\n};\n\nexport type NewsletterSubscriptionResponse = {\n __typename?: 'NewsletterSubscriptionResponse';\n message?: Maybe<Scalars['String']['output']>;\n subscription?: Maybe<NewsletterSubscription>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type NoteCardData = {\n __typename?: 'NoteCardData';\n input?: Maybe<Scalars['String']['output']>;\n};\n\n/** Broad category of notification */\nexport enum NotificationCategory {\n ORGANISATION = 'ORGANISATION',\n SYSTEM = 'SYSTEM'\n}\n\nexport type NotificationCountsResponse = {\n __typename?: 'NotificationCountsResponse';\n /** Total archived notifications */\n archived: Scalars['Int']['output'];\n /** Total notifications (non-archived) */\n total: Scalars['Int']['output'];\n /** Total unread notifications */\n unread: Scalars['Int']['output'];\n /** Unread organisation notifications */\n unreadOrganisation: Scalars['Int']['output'];\n /** Unread system notifications */\n unreadSystem: Scalars['Int']['output'];\n};\n\n/** Kind of notification event: CREATED (new row) or UPDATED (existing row mutated). Drives whether the FE prepends or upserts by _id. */\nexport enum NotificationEventKind {\n CREATED = 'CREATED',\n UPDATED = 'UPDATED'\n}\n\nexport type NotificationsPayload = {\n __typename?: 'NotificationsPayload';\n /** Chat statistics updates */\n chats?: Maybe<ChatsStats>;\n /** User notification (team invites, mentions, etc.) */\n notification?: Maybe<UserNotification>;\n /** CREATED for a new notification, UPDATED when an existing notification mutated (e.g. isRead flipped). Null on non-notification payloads. */\n notificationKind?: Maybe<NotificationEventKind>;\n /** User status change (presence, status message) */\n userStatusChange?: Maybe<User>;\n};\n\nexport type NotificationsResponse = {\n __typename?: 'NotificationsResponse';\n hasMore: Scalars['Boolean']['output'];\n notifications: Array<UserNotification>;\n total: Scalars['Int']['output'];\n unreadCount: Scalars['Int']['output'];\n};\n\nexport type OidcConfig = {\n __typename?: 'OidcConfig';\n clientId: Scalars['String']['output'];\n clientSecret: Scalars['String']['output'];\n discoveryUrl: Scalars['String']['output'];\n scopes?: Maybe<Array<Scalars['String']['output']>>;\n};\n\n/** Filter orgs by deployment type: DEFAULT (shared DB), TENANT (isolated DB), or ALL */\nexport enum OrgDeploymentType {\n ALL = 'ALL',\n DEFAULT = 'DEFAULT',\n REGIONAL = 'REGIONAL',\n TENANT = 'TENANT'\n}\n\nexport type OrgUsageSummaryOutput = {\n __typename?: 'OrgUsageSummaryOutput';\n billingPeriods: Scalars['Int']['output'];\n currentAiLimit: Scalars['Int']['output'];\n currentAiPercentage: Scalars['Float']['output'];\n currentAiUsed: Scalars['Int']['output'];\n currentOpsLimit: Scalars['Int']['output'];\n currentOpsPercentage: Scalars['Float']['output'];\n currentOpsUsed: Scalars['Int']['output'];\n deploymentRegion?: Maybe<Scalars['String']['output']>;\n isTenant: Scalars['Boolean']['output'];\n latestPeriodEnd?: Maybe<Scalars['DateTime']['output']>;\n /** Full organisation with current plan, logo, limits, etc. */\n organisation?: Maybe<Organisation>;\n organisationId: Scalars['String']['output'];\n /** Plan active during last billing period (may differ from current) */\n plan?: Maybe<Plan>;\n totalAiUsed: Scalars['Int']['output'];\n totalOpsUsed: Scalars['Int']['output'];\n};\n\nexport type Organisation = {\n __typename?: 'Organisation';\n _id: Scalars['String']['output'];\n address?: Maybe<Address>;\n business?: Maybe<OrganisationBusinessType>;\n currentPlan?: Maybe<Plan>;\n /** Data retention settings for messages and media. Controls automatic deletion based on age. */\n dataRetention?: Maybe<DataRetentionSettings>;\n description?: Maybe<Scalars['String']['output']>;\n email?: Maybe<Scalars['String']['output']>;\n inboxSettings?: Maybe<InboxSettings>;\n kind: OrganisationKind;\n limits?: Maybe<OrganisationLimits>;\n logo?: Maybe<Media>;\n members?: Maybe<Array<OrganisationMember>>;\n name: Scalars['String']['output'];\n nextPlan?: Maybe<Plan>;\n onboarding: OrganisationRegistrationStep;\n phone?: Maybe<Scalars['String']['output']>;\n slug: Scalars['String']['output'];\n /** Spam protection settings. Controls inbound rate limiting, user blocking, and outbound flood detection. */\n spamProtection?: Maybe<SpamProtectionSettings>;\n status: OrganisationStatus;\n stripe?: Maybe<StripeMetadata>;\n tags?: Maybe<Array<Scalars['String']['output']>>;\n type?: Maybe<OrganisationType>;\n usage?: Maybe<OrganisationUsage>;\n usageResetAt?: Maybe<Scalars['DateTime']['output']>;\n /** @deprecated Use \"members\" field with roles instead. */\n users: Array<User>;\n website?: Maybe<Scalars['String']['output']>;\n};\n\nexport enum OrganisationBusinessType {\n ACCOUNTING = 'ACCOUNTING',\n AGENCY = 'AGENCY',\n AUTOMOTIVE = 'AUTOMOTIVE',\n BEAUTY_AND_WELLNESS = 'BEAUTY_AND_WELLNESS',\n COMMUNITY = 'COMMUNITY',\n CONSTRUCTION = 'CONSTRUCTION',\n CONSULTING = 'CONSULTING',\n CREATOR = 'CREATOR',\n ECOMMERCE = 'ECOMMERCE',\n EDUCATION = 'EDUCATION',\n ENTERTAINMENT = 'ENTERTAINMENT',\n E_LEARNING = 'E_LEARNING',\n FASHION = 'FASHION',\n FINANCE = 'FINANCE',\n FITNESS = 'FITNESS',\n FOOD_AND_GROCERY = 'FOOD_AND_GROCERY',\n FREELANCER = 'FREELANCER',\n GAMING = 'GAMING',\n GOVERNMENT_SERVICES = 'GOVERNMENT_SERVICES',\n HEALTHCARE = 'HEALTHCARE',\n HOSPITALITY = 'HOSPITALITY',\n LEGAL = 'LEGAL',\n LOGISTICS = 'LOGISTICS',\n MANUFACTURING = 'MANUFACTURING',\n MARKETPLACE = 'MARKETPLACE',\n MEDIA = 'MEDIA',\n NON_PROFIT = 'NON_PROFIT',\n OTHER = 'OTHER',\n PROFESSIONAL_SERVICES = 'PROFESSIONAL_SERVICES',\n PUBLIC_SERVICE = 'PUBLIC_SERVICE',\n REAL_ESTATE = 'REAL_ESTATE',\n RELIGIOUS = 'RELIGIOUS',\n RESTAURANT = 'RESTAURANT',\n RETAIL = 'RETAIL',\n SAAS = 'SAAS',\n TECHNOLOGY = 'TECHNOLOGY',\n TRANSPORTATION = 'TRANSPORTATION'\n}\n\nexport type OrganisationCleanupPreview = {\n __typename?: 'OrganisationCleanupPreview';\n hasStripeSubscription: Scalars['Boolean']['output'];\n /** Whether this organisation has a Telegram bot configured */\n hasTelegramBot: Scalars['Boolean']['output'];\n organisationId: Scalars['String']['output'];\n organisationName: Scalars['String']['output'];\n wouldDelete: CleanupDeleteCounts;\n};\n\nexport type OrganisationCleanupResult = {\n __typename?: 'OrganisationCleanupResult';\n deletedCounts: CleanupDeletedCounts;\n /** Duration in milliseconds */\n duration: Scalars['Int']['output'];\n errors: Array<Scalars['String']['output']>;\n organisationId: Scalars['String']['output'];\n success: Scalars['Boolean']['output'];\n};\n\n/** Type of organisation: MASTER (platform admin), SYSTEM (test/demo), DEFAULT (customer) */\nexport enum OrganisationKind {\n DEFAULT = 'DEFAULT',\n MASTER = 'MASTER',\n SYSTEM = 'SYSTEM'\n}\n\nexport type OrganisationLimits = {\n __typename?: 'OrganisationLimits';\n aiLimit: Scalars['Float']['output'];\n bots: Scalars['Float']['output'];\n opsLimit: Scalars['Float']['output'];\n};\n\nexport type OrganisationMember = {\n __typename?: 'OrganisationMember';\n _id: Scalars['String']['output'];\n acceptedAt?: Maybe<Scalars['DateTime']['output']>;\n /** Per-operator AI copilot defaults (TTS, image) */\n aiPreferences?: Maybe<MemberAiPreferences>;\n /** Operator's preferred AI assistant ID for copilot actions */\n copilotAssistantId?: Maybe<Scalars['String']['output']>;\n email?: Maybe<Scalars['String']['output']>;\n inviteTokenExpiresAt?: Maybe<Scalars['DateTime']['output']>;\n invitedAt: Scalars['DateTime']['output'];\n invitedBy?: Maybe<User>;\n organisation: Organisation;\n role: Role;\n status: OrganisationMemberStatus;\n user?: Maybe<User>;\n};\n\nexport enum OrganisationMemberStatus {\n ACCEPTED = 'ACCEPTED',\n DECLINED = 'DECLINED',\n PENDING = 'PENDING',\n REMOVED = 'REMOVED'\n}\n\nexport enum OrganisationRegistrationStep {\n BOT = 'BOT',\n FINISHED = 'FINISHED',\n PAYMENT = 'PAYMENT',\n SIGN_UP = 'SIGN_UP'\n}\n\nexport enum OrganisationStatus {\n ACTIVE = 'ACTIVE',\n PAST_DUE = 'PAST_DUE',\n SUSPENDED = 'SUSPENDED'\n}\n\nexport enum OrganisationType {\n AGENCY = 'AGENCY',\n CHARITY = 'CHARITY',\n COMMUNITY = 'COMMUNITY',\n EDUCATIONAL_INSTITUTION = 'EDUCATIONAL_INSTITUTION',\n ENTERPRISE = 'ENTERPRISE',\n FOR_PROFIT = 'FOR_PROFIT',\n GOVERNMENT = 'GOVERNMENT',\n HOLDING = 'HOLDING',\n INTERNATIONAL_ORGANIZATION = 'INTERNATIONAL_ORGANIZATION',\n NGO = 'NGO',\n NON_PROFIT = 'NON_PROFIT',\n OTHER = 'OTHER',\n RESEARCH_ORGANIZATION = 'RESEARCH_ORGANIZATION',\n SMB = 'SMB',\n SOCIAL_ENTERPRISE = 'SOCIAL_ENTERPRISE',\n SOLE_PROPRIETOR = 'SOLE_PROPRIETOR',\n STARTUP = 'STARTUP',\n UN = 'UN'\n}\n\nexport type OrganisationUpdatePayload = {\n __typename?: 'OrganisationUpdatePayload';\n organisationId: Scalars['String']['output'];\n /** Whether outbound is blocked when type is spam_blocked/spam_unblocked */\n outboundBlocked?: Maybe<Scalars['Boolean']['output']>;\n /** Human-readable reason for the update */\n reason?: Maybe<Scalars['String']['output']>;\n /** New status when type is status_changed */\n status?: Maybe<OrganisationStatus>;\n /** Type of update: status_changed, spam_blocked, spam_unblocked */\n type: Scalars['String']['output'];\n};\n\nexport type OrganisationUsage = {\n __typename?: 'OrganisationUsage';\n aiUsed: Scalars['Float']['output'];\n opsUsed: Scalars['Float']['output'];\n};\n\nexport type OutboundWebhookEventCardData = {\n __typename?: 'OutboundWebhookEventCardData';\n /** Target a specific outbound connection. If omitted, emits to all active connections subscribed to the event. */\n connectionId?: Maybe<Scalars['String']['output']>;\n /** Custom event suffix. The emitted event name is `flow.<eventName>` (e.g. `publish` → `flow.publish`). If omitted or blank, the event is emitted as bare `flow`. Connections subscribed to `flow` receive every `flow.*` event emitted by any flow card in the org. */\n eventName?: Maybe<Scalars['String']['output']>;\n /** Raw JSON string used as the outbound event payload. Supports {{variable}} interpolation before parsing. If parsing fails or the field is empty, an empty object `{}` is sent. Authored in a Monaco JSON editor on the FE. */\n payload?: Maybe<Scalars['String']['output']>;\n};\n\nexport type OwnedOrganisationInfo = {\n __typename?: 'OwnedOrganisationInfo';\n id: Scalars['String']['output'];\n memberCount: Scalars['Int']['output'];\n name: Scalars['String']['output'];\n slug: Scalars['String']['output'];\n};\n\nexport type PaginateMessagesInput = {\n cursor?: InputMaybe<Scalars['String']['input']>;\n isBefore?: InputMaybe<Scalars['Boolean']['input']>;\n limit?: Scalars['Int']['input'];\n};\n\nexport type PaginatedApprovals = {\n __typename?: 'PaginatedApprovals';\n approvals: Array<TemplateApproval>;\n hasMore: Scalars['Boolean']['output'];\n nextCursor?: Maybe<Scalars['String']['output']>;\n total: Scalars['Int']['output'];\n};\n\nexport type PaginatedContactRequests = {\n __typename?: 'PaginatedContactRequests';\n hasMore: Scalars['Boolean']['output'];\n items: Array<ContactRequest>;\n total: Scalars['Int']['output'];\n};\n\nexport type PaginatedFeedback = {\n __typename?: 'PaginatedFeedback';\n feedback: Array<PlatformFeedback>;\n hasMore: Scalars['Boolean']['output'];\n nextCursor?: Maybe<Scalars['String']['output']>;\n total: Scalars['Int']['output'];\n};\n\nexport type PaginatedFlowActivities = {\n __typename?: 'PaginatedFlowActivities';\n /** List of activities for current page */\n items: Array<FlowActivity>;\n /** Pagination metadata */\n meta: PaginationMeta;\n};\n\nexport type PaginatedFlowTemplates = {\n __typename?: 'PaginatedFlowTemplates';\n hasMore: Scalars['Boolean']['output'];\n items: Array<FlowTemplate>;\n limit: Scalars['Int']['output'];\n page: Scalars['Int']['output'];\n total: Scalars['Int']['output'];\n totalPages: Scalars['Int']['output'];\n};\n\nexport type PaginatedFlowVersions = {\n __typename?: 'PaginatedFlowVersions';\n /** List of versions for current page */\n items: Array<FlowVersion>;\n /** Pagination metadata */\n meta: PaginationMeta;\n};\n\nexport type PaginatedFlows = {\n __typename?: 'PaginatedFlows';\n /** List of flows for current page */\n items: Array<Flow>;\n /** Pagination metadata */\n meta: PaginationMeta;\n};\n\nexport type PaginatedHelpArticles = {\n __typename?: 'PaginatedHelpArticles';\n /** List of items for current page */\n items: Array<HelpArticle>;\n /** Pagination metadata */\n meta: PaginationMeta;\n};\n\nexport type PaginatedMentions = {\n __typename?: 'PaginatedMentions';\n data: Array<MentionReceipt>;\n nextCursor?: Maybe<Scalars['String']['output']>;\n unreadCount: Scalars['Int']['output'];\n};\n\nexport type PaginatedMessages = {\n __typename?: 'PaginatedMessages';\n data: Array<Message>;\n hasNext: Scalars['Boolean']['output'];\n hasPrevious: Scalars['Boolean']['output'];\n nextCursor?: Maybe<Scalars['String']['output']>;\n previousCursor?: Maybe<Scalars['String']['output']>;\n /** Total count of chats matching the filters (only for search) */\n totalChats?: Maybe<Scalars['Float']['output']>;\n /** Total count of messages matching the query (only for search) */\n totalMessages?: Maybe<Scalars['Float']['output']>;\n unreadCount?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type PaginatedNewsPosts = {\n __typename?: 'PaginatedNewsPosts';\n /** List of items for current page */\n items: Array<NewsPost>;\n /** Pagination metadata */\n meta: PaginationMeta;\n};\n\nexport type PaginatedNewsletterSubscriptions = {\n __typename?: 'PaginatedNewsletterSubscriptions';\n hasMore: Scalars['Boolean']['output'];\n items: Array<NewsletterSubscription>;\n total: Scalars['Int']['output'];\n};\n\nexport type PaginatedSpamBlockHistoryResponse = {\n __typename?: 'PaginatedSpamBlockHistoryResponse';\n /** List of items for current page */\n items: Array<SpamBlockHistory>;\n /** Pagination metadata */\n meta: PaginationMeta;\n};\n\nexport type PaginatedTickets = {\n __typename?: 'PaginatedTickets';\n hasMore: Scalars['Boolean']['output'];\n nextCursor?: Maybe<Scalars['String']['output']>;\n tickets: Array<SupportTicket>;\n total: Scalars['Int']['output'];\n};\n\nexport type PaginationInput = {\n /** Number of items per page (1-100) */\n limit?: InputMaybe<Scalars['Float']['input']>;\n /** Page number (starting from 1) */\n page?: InputMaybe<Scalars['Float']['input']>;\n};\n\nexport type PaginationMeta = {\n __typename?: 'PaginationMeta';\n /** Current page number */\n currentPage: Scalars['Float']['output'];\n /** Whether there is a next page */\n hasNextPage: Scalars['Boolean']['output'];\n /** Whether there is a previous page */\n hasPreviousPage: Scalars['Boolean']['output'];\n /** Total number of items */\n totalCount: Scalars['Float']['output'];\n /** Total number of pages */\n totalPages: Scalars['Float']['output'];\n};\n\nexport type PasskeyAuthenticationOptionsOutput = {\n __typename?: 'PasskeyAuthenticationOptionsOutput';\n /** Challenge for authentication */\n challenge: Scalars['String']['output'];\n /** Full options JSON for WebAuthn API */\n optionsJson: Scalars['String']['output'];\n /** Relying Party ID */\n rpId: Scalars['String']['output'];\n /** Session ID for this authentication attempt */\n sessionId: Scalars['String']['output'];\n};\n\nexport type PasskeyOutput = {\n __typename?: 'PasskeyOutput';\n /** Browser name */\n browser?: Maybe<Scalars['String']['output']>;\n /** When the passkey was created */\n createdAt: Scalars['DateTime']['output'];\n /** Whether the credential is backed up (synced) */\n credentialBackedUp: Scalars['Boolean']['output'];\n /** Credential device type (singleDevice or multiDevice) */\n credentialDeviceType: Scalars['String']['output'];\n /** Device name for this passkey */\n deviceName: Scalars['String']['output'];\n id: Scalars['ID']['output'];\n /** When the passkey was last used */\n lastUsedAt?: Maybe<Scalars['DateTime']['output']>;\n /** Operating system */\n os?: Maybe<Scalars['String']['output']>;\n /** Transport types supported */\n transports?: Maybe<Array<AuthenticatorTransport>>;\n};\n\nexport type PasskeyRegistrationOptionsOutput = {\n __typename?: 'PasskeyRegistrationOptionsOutput';\n /** Challenge for registration */\n challenge: Scalars['String']['output'];\n /** Full options JSON for WebAuthn API */\n optionsJson: Scalars['String']['output'];\n /** Relying Party ID */\n rpId: Scalars['String']['output'];\n /** Relying Party name */\n rpName: Scalars['String']['output'];\n /** User display name */\n userDisplayName: Scalars['String']['output'];\n /** User ID */\n userId: Scalars['String']['output'];\n /** User name (email) */\n userName: Scalars['String']['output'];\n};\n\nexport type PaymentMethodOutput = {\n __typename?: 'PaymentMethodOutput';\n brand?: Maybe<Scalars['String']['output']>;\n last4?: Maybe<Scalars['String']['output']>;\n message: Scalars['String']['output'];\n success: Scalars['Boolean']['output'];\n};\n\nexport type People = {\n __typename?: 'People';\n _id: Scalars['String']['output'];\n chatId?: Maybe<Scalars['String']['output']>;\n createdAt: Scalars['DateTime']['output'];\n crmImportedAt?: Maybe<Scalars['DateTime']['output']>;\n crmImportedFrom?: Maybe<Scalars['String']['output']>;\n crmRecordIds?: Maybe<Scalars['JSON']['output']>;\n crmSyncHistory?: Maybe<Scalars['JSON']['output']>;\n displayName?: Maybe<Scalars['String']['output']>;\n externalUserId?: Maybe<Scalars['String']['output']>;\n firstName?: Maybe<Scalars['String']['output']>;\n instagramUserId?: Maybe<Scalars['String']['output']>;\n integrationId?: Maybe<Scalars['String']['output']>;\n isAnonymous?: Maybe<Scalars['Boolean']['output']>;\n isBot?: Maybe<Scalars['Boolean']['output']>;\n language?: Maybe<Scalars['String']['output']>;\n lastName?: Maybe<Scalars['String']['output']>;\n organisation?: Maybe<Scalars['String']['output']>;\n phoneNumber?: Maybe<Scalars['String']['output']>;\n photo?: Maybe<Scalars['String']['output']>;\n shortHandle?: Maybe<Scalars['String']['output']>;\n updatedAt: Scalars['DateTime']['output'];\n username?: Maybe<Scalars['String']['output']>;\n viberUserId?: Maybe<Scalars['String']['output']>;\n visitorId?: Maybe<Scalars['String']['output']>;\n whatsappId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PeopleExportInput = {\n /** Specific field keys to include. If empty, exports all fields. */\n fields?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Filters to apply before export (same as peopleList query) */\n filters?: InputMaybe<Array<PeopleFilterInput>>;\n /** Export format (CSV, EXCEL, JSON) */\n format?: ExportFormat;\n /** Include field values (custom/system fields) in export */\n includeFieldValues?: Scalars['Boolean']['input'];\n /** Filter by integration ID (bot) */\n integrationId?: InputMaybe<Scalars['String']['input']>;\n /** Specific people IDs to export. If empty, exports all people (with filters applied). */\n peopleIds?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Search query to filter people */\n search?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type PeopleExportResponse = {\n __typename?: 'PeopleExportResponse';\n /** When the export completed or failed */\n completedAt?: Maybe<Scalars['DateTime']['output']>;\n /** When the export was requested */\n createdAt: Scalars['DateTime']['output'];\n /** Download URL (available when status is COMPLETED) */\n downloadUrl?: Maybe<Scalars['String']['output']>;\n /** Error message if export failed */\n error?: Maybe<Scalars['String']['output']>;\n /** URL expiration time for download */\n expiresAt?: Maybe<Scalars['DateTime']['output']>;\n /** Filename of the exported file */\n filename?: Maybe<Scalars['String']['output']>;\n /** Export format */\n format: ExportFormat;\n /** Unique job ID for tracking */\n jobId: Scalars['String']['output'];\n /** Records processed so far */\n processedRecords?: Maybe<Scalars['Int']['output']>;\n /** Current status of the export */\n status: ExportStatus;\n /** Total records to export */\n totalRecords: Scalars['Int']['output'];\n};\n\nexport type PeopleFieldDefinition = {\n __typename?: 'PeopleFieldDefinition';\n _id: Scalars['String']['output'];\n createdAt: Scalars['DateTime']['output'];\n defaultValue?: Maybe<Scalars['JSON']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n displayOrder: Scalars['Float']['output'];\n /** Whether this field is read-only and cannot be edited by users. Read-only fields are auto-calculated or set by the system. */\n isReadOnly: Scalars['Boolean']['output'];\n isRequired: Scalars['Boolean']['output'];\n isSystemField: Scalars['Boolean']['output'];\n key: Scalars['String']['output'];\n name: Scalars['String']['output'];\n options?: Maybe<Array<Scalars['String']['output']>>;\n organisationId: Scalars['String']['output'];\n type: FieldType;\n updatedAt: Scalars['DateTime']['output'];\n visibility: FieldVisibility;\n};\n\nexport type PeopleFieldValue = {\n __typename?: 'PeopleFieldValue';\n _id: Scalars['String']['output'];\n createdAt: Scalars['DateTime']['output'];\n field: PeopleFieldDefinition;\n organisationId: Scalars['String']['output'];\n peopleId: Scalars['String']['output'];\n updatedAt: Scalars['DateTime']['output'];\n value?: Maybe<Scalars['JSON']['output']>;\n};\n\nexport type PeopleFieldsFilterDto = {\n applyPrivacyMasking?: InputMaybe<Scalars['Boolean']['input']>;\n includeCustomFields?: InputMaybe<Scalars['Boolean']['input']>;\n includeSystemFields?: InputMaybe<Scalars['Boolean']['input']>;\n keys?: InputMaybe<Array<Scalars['String']['input']>>;\n peopleId?: InputMaybe<Scalars['String']['input']>;\n type?: InputMaybe<Scalars['String']['input']>;\n visibility?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type PeopleFilterInput = {\n /** Field key to filter on (system or custom field key) */\n key: Scalars['String']['input'];\n /** Filter operator to apply */\n operator: FilterOperator;\n /** Value to filter by. Type depends on field type and operator. Optional for IS_EMPTY/IS_NOT_EMPTY operators. */\n value?: InputMaybe<Scalars['JSON']['input']>;\n};\n\nexport type PeopleListInput = {\n /** Filter conditions (combined with AND logic) */\n filters?: InputMaybe<Array<PeopleFilterInput>>;\n /** Filter by integration IDs (bots/WhatsApp) */\n integrationId?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Number of items per page (max 100) */\n limit?: Scalars['Int']['input'];\n /** Full-text search across name, email, phone, username, company */\n search?: InputMaybe<Scalars['String']['input']>;\n /** Number of items to skip for pagination */\n skip?: InputMaybe<Scalars['Int']['input']>;\n /** Sort configuration */\n sort?: InputMaybe<PeopleSortInput>;\n};\n\nexport type PeopleListPagination = {\n __typename?: 'PeopleListPagination';\n /** Whether there are more items after current page */\n hasMore: Scalars['Boolean']['output'];\n /** Skip value for next page (use with skip input parameter) */\n nextSkip?: Maybe<Scalars['Int']['output']>;\n /** Total number of matching records */\n total: Scalars['Int']['output'];\n};\n\nexport type PeopleListResponse = {\n __typename?: 'PeopleListResponse';\n /** Filters that were applied */\n appliedFilters?: Maybe<Array<AppliedFilter>>;\n /** List of people */\n items: Array<PeopleWithFields>;\n /** Pagination information */\n pagination: PeopleListPagination;\n};\n\nexport type PeopleMetrics = {\n __typename?: 'PeopleMetrics';\n newInPeriod?: Maybe<Scalars['Int']['output']>;\n total: Scalars['Int']['output'];\n};\n\nexport type PeopleSortInput = {\n /** Sort direction */\n direction?: SortDirection;\n /** Field key to sort by (system or custom field key) */\n key: Scalars['String']['input'];\n};\n\nexport type PeopleWithFields = {\n __typename?: 'PeopleWithFields';\n _id: Scalars['String']['output'];\n chatId?: Maybe<Scalars['String']['output']>;\n createdAt: Scalars['DateTime']['output'];\n crmImportedAt?: Maybe<Scalars['DateTime']['output']>;\n crmImportedFrom?: Maybe<Scalars['String']['output']>;\n crmRecordIds?: Maybe<Scalars['JSON']['output']>;\n crmSyncHistory?: Maybe<Scalars['JSON']['output']>;\n displayName?: Maybe<Scalars['String']['output']>;\n externalUserId?: Maybe<Scalars['String']['output']>;\n /** All field values for this person */\n fieldValues?: Maybe<Array<PeopleFieldValue>>;\n firstName?: Maybe<Scalars['String']['output']>;\n instagramUserId?: Maybe<Scalars['String']['output']>;\n integrationId?: Maybe<Scalars['String']['output']>;\n isAnonymous?: Maybe<Scalars['Boolean']['output']>;\n isBot?: Maybe<Scalars['Boolean']['output']>;\n language?: Maybe<Scalars['String']['output']>;\n lastName?: Maybe<Scalars['String']['output']>;\n organisation?: Maybe<Scalars['String']['output']>;\n phoneNumber?: Maybe<Scalars['String']['output']>;\n photo?: Maybe<Scalars['String']['output']>;\n shortHandle?: Maybe<Scalars['String']['output']>;\n updatedAt: Scalars['DateTime']['output'];\n username?: Maybe<Scalars['String']['output']>;\n viberUserId?: Maybe<Scalars['String']['output']>;\n visitorId?: Maybe<Scalars['String']['output']>;\n whatsappId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type Plan = {\n __typename?: 'Plan';\n _id: Scalars['String']['output'];\n aiLimit: Scalars['Float']['output'];\n bots: Scalars['Float']['output'];\n interval: PlanInterval;\n opsLimit: Scalars['Float']['output'];\n priceId: Scalars['String']['output'];\n tier: PlanTier;\n unitAmount: Scalars['Float']['output'];\n};\n\nexport enum PlanInterval {\n MONTH = 'MONTH',\n YEAR = 'YEAR'\n}\n\nexport type PlanLimits = {\n __typename?: 'PlanLimits';\n /** Can access AI settings page */\n canAccessAISettings: Scalars['Boolean']['output'];\n /** Can access CRM integrations (HubSpot, Salesforce, BigQuery) */\n canAccessCrmIntegrations: Scalars['Boolean']['output'];\n /** Can access inbox settings page */\n canAccessInboxSettings: Scalars['Boolean']['output'];\n /** Can access priority support */\n canAccessSupport: Scalars['Boolean']['output'];\n /** Can configure data retention settings */\n canConfigureDataRetention: Scalars['Boolean']['output'];\n /** Can create custom collections */\n canCreateCustomCollections: Scalars['Boolean']['output'];\n /** Can create new labels */\n canCreateLabels: Scalars['Boolean']['output'];\n /** Can enable AI auto-replies on chats */\n canEnableAIAutoReplies: Scalars['Boolean']['output'];\n /** Can export people to CSV/Excel */\n canExportPeople: Scalars['Boolean']['output'];\n /** Can hide the \"Powered by Wexio\" badge in the embedded web widget. Pro + Enterprise only. */\n canHideWebBranding: Scalars['Boolean']['output'];\n /** Can import people via CRM integrations */\n canImportPeople: Scalars['Boolean']['output'];\n /** Can invite team members */\n canInviteTeam: Scalars['Boolean']['output'];\n /** Can create broadcasts and schedule triggers (Pro+) */\n canManageBroadcasts: Scalars['Boolean']['output'];\n /** Can create inbound/outbound webhooks (Pro+) */\n canManageWebhooks: Scalars['Boolean']['output'];\n /** Can create/update AI integrations (Standard+) */\n canModifyAIIntegrations: Scalars['Boolean']['output'];\n /** Can create/update CRM integrations like HubSpot/Salesforce (Pro+) */\n canModifyCRMIntegrations: Scalars['Boolean']['output'];\n /** Can create/update messaging integrations like Telegram, WhatsApp (all plans) */\n canModifyMessagingIntegrations: Scalars['Boolean']['output'];\n /** Can move chats to system collections */\n canMoveToSystemCollections: Scalars['Boolean']['output'];\n /** Can use real-time collaborative chat draft (Yjs co-edit, live cursors). Pro+ */\n canUseCollaborativeDraft: Scalars['Boolean']['output'];\n /** Can create and configure the embeddable web messenger widget. Standard / Pro / Enterprise. */\n canUseWebMessenger: Scalars['Boolean']['output'];\n /** Can configure dedicated database/Redis (Pro+ / Enterprise) */\n dedicatedDatabase: Scalars['Boolean']['output'];\n /** Default retention days for this plan */\n defaultRetentionDays?: Maybe<Scalars['Int']['output']>;\n /** Max custom collections (-1 = unlimited) */\n maxCustomCollections?: Maybe<Scalars['Int']['output']>;\n /** Max flows (-1 = unlimited) */\n maxFlows?: Maybe<Scalars['Int']['output']>;\n /** Max messaging integrations (bots) allowed. null = unlimited. Free: 1, Standard: 2, Pro: 5, Enterprise: 100 */\n maxMessagingIntegrations?: Maybe<Scalars['Int']['output']>;\n /** Max retention days for messages (null = unlimited) */\n maxRetentionDays?: Maybe<Scalars['Int']['output']>;\n /** Combined cap on active broadcasts + schedule triggers (null = unlimited). Free/Basic/Standard: 0, Pro: 25, Enterprise: unlimited */\n maxScheduled?: Maybe<Scalars['Int']['output']>;\n /** Max team seats (-1 = unlimited) */\n maxTeamSeats?: Maybe<Scalars['Int']['output']>;\n /** Maximum number of WebIntegration documents per organisation. Hard-capped at 1 in v1 regardless of plan; 0 when canUseWebMessenger is false. */\n maxWebIntegrations: Scalars['Int']['output'];\n /** Max webhook connections (-1 = unlimited). Free/Basic/Standard: 0, Pro: 10, Enterprise: unlimited */\n maxWebhookConnections?: Maybe<Scalars['Int']['output']>;\n /** Card types not available on this plan */\n restrictedCardTypes: Array<CardType>;\n /** Trigger types not available on this plan (SCHEDULE_TRIGGERED and WEBHOOK_RECEIVED require Pro+) */\n restrictedTriggerTypes: Array<TriggerType>;\n /** Template creation permission level */\n templateCreation: TemplateCreationLevel;\n tier: PlanTier;\n};\n\nexport type PlanSummary = {\n __typename?: 'PlanSummary';\n aiLimit: Scalars['Float']['output'];\n bots: Scalars['Float']['output'];\n id: Scalars['String']['output'];\n interval: Scalars['String']['output'];\n opsLimit: Scalars['Float']['output'];\n tier: Scalars['String']['output'];\n unitAmount: Scalars['Float']['output'];\n};\n\nexport type PlanSwitchCooldown = {\n __typename?: 'PlanSwitchCooldown';\n cooldownEndsAt?: Maybe<Scalars['DateTime']['output']>;\n daysRemaining: Scalars['Float']['output'];\n isInCooldown: Scalars['Boolean']['output'];\n lastSwitchAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type PlanSwitchOutput = {\n __typename?: 'PlanSwitchOutput';\n checkoutUrl?: Maybe<Scalars['String']['output']>;\n clientSecret?: Maybe<Scalars['String']['output']>;\n effectiveAt?: Maybe<Scalars['DateTime']['output']>;\n message: Scalars['String']['output'];\n success: Scalars['Boolean']['output'];\n switchType: Scalars['String']['output'];\n};\n\nexport type PlanSwitchPreview = {\n __typename?: 'PlanSwitchPreview';\n blockedReason?: Maybe<Scalars['String']['output']>;\n currentPlan: PlanSummary;\n effectiveAt?: Maybe<Scalars['DateTime']['output']>;\n isAllowed: Scalars['Boolean']['output'];\n proratedAmount?: Maybe<Scalars['Float']['output']>;\n requiresPaymentMethod: Scalars['Boolean']['output'];\n switchType: Scalars['String']['output'];\n targetPlan: PlanSummary;\n};\n\nexport enum PlanTier {\n BASIC = 'BASIC',\n ENTERPRISE = 'ENTERPRISE',\n FREE = 'FREE',\n PRO = 'PRO',\n STANDARD = 'STANDARD'\n}\n\nexport type PlatformFeedback = {\n __typename?: 'PlatformFeedback';\n _id: Scalars['String']['output'];\n category: FeedbackCategory;\n content: Scalars['String']['output'];\n createdAt: Scalars['DateTime']['output'];\n internalNotes?: Maybe<Scalars['String']['output']>;\n isFeatureRequest: Scalars['Boolean']['output'];\n isProcessed: Scalars['Boolean']['output'];\n media?: Maybe<Array<Media>>;\n organisation: Organisation;\n processedAt?: Maybe<Scalars['DateTime']['output']>;\n processedBy?: Maybe<User>;\n rating?: Maybe<Scalars['Int']['output']>;\n tags?: Maybe<Array<Scalars['String']['output']>>;\n updatedAt: Scalars['DateTime']['output'];\n user: User;\n};\n\nexport type PlatformSummaryOutput = {\n __typename?: 'PlatformSummaryOutput';\n instances: Array<InstanceSummaryOutput>;\n totalChats: Scalars['Int']['output'];\n totalFlows: Scalars['Int']['output'];\n totalInstances: Scalars['Int']['output'];\n totalMessages: Scalars['Int']['output'];\n totalOrganisations: Scalars['Int']['output'];\n totalPeople: Scalars['Int']['output'];\n};\n\nexport type PlatformUsageSummaryOutput = {\n __typename?: 'PlatformUsageSummaryOutput';\n organisations: Array<OrgUsageSummaryOutput>;\n totalAiUsed: Scalars['Int']['output'];\n totalBillingPeriods: Scalars['Int']['output'];\n totalOpsUsed: Scalars['Int']['output'];\n totalOrganisations: Scalars['Int']['output'];\n};\n\nexport enum PollButtonType {\n QUIZ = 'QUIZ',\n REGULAR = 'REGULAR'\n}\n\nexport type PollOption = {\n __typename?: 'PollOption';\n /** Option text */\n text: Scalars['String']['output'];\n /** Number of voters (if visible) */\n voterCount?: Maybe<Scalars['Int']['output']>;\n};\n\n/** Pre-chat form field kind. Standard fields (NAME/EMAIL/PHONE) map to People slots; CUSTOM_TEXT lives in the custom-field collection. */\nexport enum PrechatFieldKind {\n CUSTOM_TEXT = 'CUSTOM_TEXT',\n EMAIL = 'EMAIL',\n NAME = 'NAME',\n PHONE = 'PHONE'\n}\n\nexport type PrechatFormField = {\n __typename?: 'PrechatFormField';\n key: Scalars['String']['output'];\n kind: PrechatFieldKind;\n label: Scalars['String']['output'];\n required: Scalars['Boolean']['output'];\n};\n\n/** User presence status (online/offline) */\nexport enum PresenceStatus {\n OFFLINE = 'OFFLINE',\n ONLINE = 'ONLINE'\n}\n\n/** Preset status types */\nexport enum PresetStatusType {\n COMMUTING = 'COMMUTING',\n CUSTOM = 'CUSTOM',\n IN_MEETING = 'IN_MEETING',\n OUT_SICK = 'OUT_SICK',\n VACATIONING = 'VACATIONING',\n WORKING_REMOTELY = 'WORKING_REMOTELY'\n}\n\n/** Priority level for chat and task management */\nexport enum Priority {\n HIGH = 'HIGH',\n LOW = 'LOW',\n MEDIUM = 'MEDIUM',\n URGENT = 'URGENT'\n}\n\nexport type ProcessFeedbackInput = {\n feedbackId: Scalars['String']['input'];\n internalNotes?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type ProductCarouselCardOverride = {\n /** Card index (0-based) */\n cardIndex: Scalars['Int']['input'];\n /** Product SKU/ID from Facebook Commerce Manager for this card. */\n productRetailerId: Scalars['String']['input'];\n};\n\nexport type ProductTemplateOverrides = {\n /** For Product Card Carousel: product overrides for each card. */\n carouselCards?: InputMaybe<Array<ProductCarouselCardOverride>>;\n /** For CATALOG templates: optional thumbnail product. Overrides template default. */\n catalogAction?: InputMaybe<CatalogActionInput>;\n /** For MPM templates: action with thumbnail product and sections. */\n mpmAction?: InputMaybe<MpmActionInput>;\n /** For SPM templates: product header with retailer ID and catalog ID. */\n spmHeader?: InputMaybe<SpmHeaderInput>;\n};\n\nexport type PromotionCodeValidationOutput = {\n __typename?: 'PromotionCodeValidationOutput';\n /** Fixed amount off in cents */\n amountOff?: Maybe<Scalars['Float']['output']>;\n /** Currency for amountOff */\n currency?: Maybe<Scalars['String']['output']>;\n duration?: Maybe<DiscountDurationType>;\n /** Number of months for repeating discounts */\n durationInMonths?: Maybe<Scalars['Float']['output']>;\n errorMessage?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n /** Percentage off (e.g., 20 for 20%) */\n percentOff?: Maybe<Scalars['Float']['output']>;\n valid: Scalars['Boolean']['output'];\n};\n\nexport type PublishFlowInput = {\n /** Optional description of what changed */\n description?: InputMaybe<Scalars['String']['input']>;\n /** Optional human-readable label (e.g. \"Launch version\") */\n label?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type Query = {\n __typename?: 'Query';\n account: User;\n /** Check if you can delete your account. You cannot delete while owning organisations. */\n accountDeletionPreCheck: AccountDeletionPreCheckResponse;\n activeLabels: Array<Label>;\n /** Get a specific AI assistant by ID */\n aiAssistant: AiAssistant;\n /** Paginated AI request history for a specific assistant. Includes provider switches (e.g. transcription via System Whisper). */\n aiAssistantHistory: AiAssistantHistoryPage;\n /** Get all AI assistants for the current organization */\n aiAssistants: Array<AiAssistant>;\n /** Paginated AI request history across every assistant in the organisation. */\n aiOrganisationHistory: AiOrganisationHistoryPage;\n /** Get all platform feedback (MASTER org only) */\n allFeedback: PaginatedFeedback;\n allMedia: Array<Media>;\n /** Get all support tickets (MASTER org only) */\n allSupportTickets: PaginatedTickets;\n /** Query metrics snapshots by instance, org, date range, granularity. Master admin only. */\n analyticsMetrics: Array<MetricsSnapshotOutput>;\n /** Billing period usage history for a specific org. Master admin only. */\n analyticsOrgBillingHistory: Array<BillingPeriodUsage>;\n /** Metrics history for a specific org over time. Master admin only. */\n analyticsOrgHistory: Array<MetricsSnapshotOutput>;\n /** Ops/AI usage summary for a specific organisation. Master admin only. */\n analyticsOrgUsage?: Maybe<OrgUsageSummaryOutput>;\n /** Platform-wide summary across all instances. Master admin only. */\n analyticsPlatformSummary: PlatformSummaryOutput;\n /** Platform-wide ops/AI usage across all organisations. Master admin only. */\n analyticsPlatformUsage: PlatformUsageSummaryOutput;\n /** Get all permissions and restrictions for the current user and organisation */\n appPermissions: AppPermissions;\n /** Get all template approvals with filters (MASTER org only) */\n approvalHistory: PaginatedApprovals;\n audienceCount: Scalars['Int']['output'];\n /** Get available models for an integration or AI assistant (for system AI). Optionally filter by capability (e.g. \"image-generation\", \"tts\", \"transcription\"). */\n availableModels: Array<ModelInfo>;\n billingState: BillingState;\n /** Get ops/AI usage snapshot for a specific invoice. Owner/Admin only. */\n billingUsageByInvoice?: Maybe<BillingPeriodUsage>;\n /** Ops/AI usage history per billing period. Owner/Admin only. */\n billingUsageHistory: Array<BillingPeriodUsage>;\n broadcast: Broadcast;\n broadcastAudiencePreview: Scalars['Int']['output'];\n broadcastHistory: BroadcastHistoryPage;\n broadcasts: BroadcastListPage;\n chat?: Maybe<Chat>;\n /** Current activity snapshot for a chat (AI generation, contact typing). Use this on chat-open to paint initial state, then subscribe for transitions. */\n chatActivity: ChatActivity;\n chatCollection?: Maybe<ChatCollection>;\n chatCollections: Array<ChatCollection>;\n /** Unread @-mention count for the calling user inside a specific chat. Excludes soft-deleted notes. Scoped to the JWT user; cannot be used to peek at another operator's mentions. */\n chatUnreadMentionCount: Scalars['Int']['output'];\n /** Check if an email address requires SSO login */\n checkSsoRequired: SsoCheckResponse;\n collectionChatCount: Scalars['Float']['output'];\n collectionChats: CursorPaginatedChat;\n /** Get the count of people that would be exported based on input criteria. Use this to preview how many records will be synced before starting the export. Applies the same filters as startCrmExport. */\n crmExportCount: Scalars['Int']['output'];\n /** Get the count of contacts that would be imported from CRM based on input criteria. Use this to preview how many records will be synced before starting the import. Returns null if the CRM provider does not support counting (e.g., Salesforce). Currently supported: HubSpot. */\n crmImportCount?: Maybe<Scalars['Int']['output']>;\n /** Get the current status of a CRM sync job. Use this to poll for progress updates. */\n crmSyncJobStatus?: Maybe<CrmSyncJobTypeOutput>;\n /** List CRM sync jobs with optional filtering by integration, type, or status. */\n crmSyncJobs: CrmSyncJobListOutput;\n currentMember?: Maybe<OrganisationMember>;\n /** Live ops/AI usage for the current billing period. Owner/Admin only. */\n currentPeriodUsage?: Maybe<BillingPeriodUsage>;\n /** Get retention status including messages at risk for deletion */\n dataRetentionStatus: RetentionStatusResponse;\n /** Get the default AI assistant for the current organization */\n defaultAIAssistant?: Maybe<AiAssistant>;\n /** Check if an email has passkeys registered */\n emailHasPasskeys: Scalars['Boolean']['output'];\n exportJob?: Maybe<ExportJob>;\n exportJobs: Array<ExportJob>;\n /** Get a single feedback item (MASTER org only) */\n feedback?: Maybe<PlatformFeedback>;\n /** Get comprehensive feedback analytics (MASTER org only) */\n feedbackAnalytics: FeedbackAnalytics;\n flow: Flow;\n /** Activity history for a flow — who changed what and when, grouped by version */\n flowActivities: PaginatedFlowActivities;\n /** Get a single activity with full snapshot — use before switchToFlowActivity */\n flowActivity: FlowActivity;\n flowTemplate: FlowTemplate;\n flowTemplateCategories: Array<FlowTemplateCategory>;\n flowTemplateTags: Array<Scalars['String']['output']>;\n flowTemplates: PaginatedFlowTemplates;\n /** Get a single version with full snapshot */\n flowVersion: FlowVersion;\n /** List version history for a flow */\n flowVersions: PaginatedFlowVersions;\n flows: PaginatedFlows;\n /** Get archived notifications for the current user */\n getArchivedNotifications: NotificationsResponse;\n /** Get total count of chats for the organisation */\n getChatsCount: ChatsCountResponse;\n getFlowTriggers: Array<Trigger>;\n getHello: Scalars['String']['output'];\n getMessages: PaginatedMessages;\n /** Get a single notification by ID */\n getNotification?: Maybe<UserNotification>;\n /** Get notification counts (unread, total, archived) for the current user */\n getNotificationCounts: NotificationCountsResponse;\n getPeopleFieldDefinitions: Array<PeopleFieldDefinition>;\n getPeopleFieldValue: PeopleFieldValue;\n getPeopleFieldValues: Array<PeopleFieldValue>;\n /** Get SSO configuration for an organisation */\n getSsoConfig?: Maybe<SsoConfig>;\n /** Get Service Provider metadata for IdP configuration */\n getSsoSpMetadata: SpMetadataResponse;\n /** Get system variables only */\n getSystemVariables: Array<VariableInfo>;\n /** Get paginated notifications for the current user */\n getUserNotifications: NotificationsResponse;\n /** Get all available variables categorized by type */\n getVariables: CategorizedVariablesResponse;\n /** Fetch a single article by id (operator view). */\n helpArticle?: Maybe<HelpArticle>;\n /** List articles for an integration (operator view). Returns `{ items, meta }`. Defaults to all statuses + folders, newest-created first, unbounded. Pass search / status / folderId / recursive / tagIds / sort / limit / offset to scope. `folderId: null` = root-level articles; `folderId` + `recursive: true` walks the entire subtree. */\n helpArticles: PaginatedHelpArticles;\n /** Fetch a folder by id. */\n helpFolder?: Maybe<HelpFolder>;\n /** Recursive subtree counts — `{ folders, articles }` below this folder. Powers the badge on each folder card in the operator UI. */\n helpFolderCounts: HelpFolderCounts;\n /** Every folder for an integration in one call. Sorted by ancestors then order — operator dashboard hydrates the whole tree without per-click round-trips. */\n helpFolderTree: Array<HelpFolder>;\n /** List child folders of `parentId` (or root-level when null/omitted). Use this for the operator dashboard's lazy-load tree view. */\n helpFolders: Array<HelpFolder>;\n /** Fetch a help tag by id. */\n helpTag?: Maybe<HelpTag>;\n /** List help tags for an integration. */\n helpTags: Array<HelpTag>;\n /** Get a specific integration by ID */\n integration: Integration;\n /** Get available fields from external CRM platform for field mapping */\n integrationExternalSchema: Array<ExternalFieldInfo>;\n /** Get all integrations for the current organization */\n integrations: Array<Integration>;\n invoice: Invoice;\n invoiceStats: InvoiceStats;\n invoices: InvoiceList;\n /** Check if WhatsApp ID field is editable for a contact */\n isWhatsAppIdEditable: Scalars['Boolean']['output'];\n /** Get tickets organized for Kanban board display (MASTER org only) */\n kanbanBoard: KanbanBoardResponse;\n label?: Maybe<Label>;\n labels: Array<Label>;\n masterContactEmails: SubscriptionEmailsResponse;\n masterContactRequest: ContactRequest;\n masterContactRequests: PaginatedContactRequests;\n masterContactStats: ContactRequestStatsResponse;\n masterNewsletterStats: NewsletterStatsResponse;\n masterNewsletterSubscriptions: PaginatedNewsletterSubscriptions;\n masterSubscriptionEmails: SubscriptionEmailsResponse;\n media: Media;\n /** Get counts of data associated with a messaging integration (people, chats, messages). Only available for MESSAGING category integrations. */\n messagingIntegrationDataCounts: IntegrationDataCounts;\n /** Get my organisation's approval requests */\n myApprovalRequests: Array<TemplateApproval>;\n /** Paginated list of @-mention receipts for the JWT user, sorted unread-first then newest. Filters out receipts whose underlying note has been soft-deleted. */\n myMentions: PaginatedMentions;\n /** Current unread @-mention count for the JWT user. Excludes soft-deleted notes. */\n myMentionsUnreadCount: Scalars['Int']['output'];\n /** Check if the current user has passkeys */\n myPasskeyStatus: CheckPasskeyAvailabilityOutput;\n /** List all passkeys for the current user */\n myPasskeys: Array<PasskeyOutput>;\n /** Get all pending team invites for the current user */\n myPendingInvites: Array<OrganisationMember>;\n mySessions: Array<SessionResponse>;\n /** Get my organisation's support tickets */\n mySupportTickets: Array<SupportTicket>;\n /** List news categories for an integration. */\n newsCategories: Array<NewsCategory>;\n /** Fetch a news category by id. */\n newsCategory?: Maybe<NewsCategory>;\n /** Fetch a single news post by id (operator view). */\n newsPost?: Maybe<NewsPost>;\n /** List news posts for an integration (operator view). Returns `{ items, meta }`. Defaults to all statuses, updatedAt-desc, unbounded. Pass status / search / categoryIds / tagIds / sort / limit / offset to scope. */\n newsPosts: PaginatedNewsPosts;\n /** Fetch a single news source by id. */\n newsSource?: Maybe<NewsSource>;\n /** Target-side mapping preview — for each `NewsPost` field, the effective path (operator override or source-type default) + the resolved value against `lastSampleItem`. Lets the dashboard render a \"target → path → resolved value\" table so operators can verify their mapping without saving + polling. Returns one entry per fieldMap target field (11 entries). */\n newsSourceFieldMappings: Array<NewsSourceFieldMapping>;\n /** Flat path list against the source's `lastSampleItem` — what the dashboard variable picker renders. Each entry is `{ path, type, example? }`; same shape as `WebhookSchemaField` so the FE can reuse the webhook variable-picker component. Returns `[]` when the source has no sample yet (call `testNewsSource` first). */\n newsSourceVariables: Array<NewsSourceVariable>;\n /** List news sources for an integration (operator view). */\n newsSources: Array<NewsSource>;\n /** Fetch a news tag by id. */\n newsTag?: Maybe<NewsTag>;\n /** List news tags for an integration. */\n newsTags: Array<NewsTag>;\n organisation: Organisation;\n organisationMembers: Array<OrganisationMember>;\n organisationPeople: Array<People>;\n organisations: Array<Organisation>;\n /** Get pending template approvals (MASTER org only) */\n pendingApprovals: Array<TemplateApproval>;\n people: People;\n peopleList: PeopleListResponse;\n plan?: Maybe<Plan>;\n plans: Array<Plan>;\n /** Preview what data would be deleted when removing this organisation */\n previewOrganisationRemoval: OrganisationCleanupPreview;\n previewPlanSwitch: PlanSwitchPreview;\n publicFlowTemplate: FlowTemplate;\n publicFlowTemplates: PaginatedFlowTemplates;\n /** Fetch the org's reaction set for a surface. Lazy-defaulted on first read — returns a sensible starter palette (News → 🎉/❤️/👍 neutral, Help → 👍/👎 sentiment-tagged) the first time the operator opens the settings panel. */\n reactionSet: ReactionSet;\n relatedPeople: Array<People>;\n searchChats: SearchChatsResult;\n searchMessages: PaginatedMessages;\n /** Get tenant database/Redis status for your own organisation. Requires Enterprise or Pro plan. Returns connection health, per-collection document counts. */\n selfTenantStatus: TenantStatusResult;\n similarFlowTemplates: Array<FlowTemplate>;\n /** Get spam block audit history for the organisation */\n spamBlockHistory: PaginatedSpamBlockHistoryResponse;\n /** Get support statistics (MASTER org only) */\n supportStats: SupportStats;\n /** Get a single support ticket by ID */\n supportTicket?: Maybe<SupportTicket>;\n /** Get all organisations that have submitted support tickets (MASTER org only) */\n supportTicketOrganisations: Array<Organisation>;\n /** Get cached Telegram bot settings for an integration. Returns null if never synced. Use syncTelegramBotSettings first. */\n telegramBotSettings?: Maybe<TelegramBotSettings>;\n /** Get tenant database/Redis status for an organisation. Master org only. Returns connection health, per-collection document counts. */\n tenantStatus: TenantStatusResult;\n testTriggers: TriggerEvaluationResult;\n /** Get comments for a ticket */\n ticketComments: TicketCommentsResponse;\n /** Get current 2FA status including remaining recovery codes */\n twoFactorStatus: TwoFactorStatusResponse;\n users: Array<User>;\n /** Validate an invite token and get invite details */\n validateInviteToken: InviteValidationResult;\n validatePromotionCode: PromotionCodeValidationOutput;\n visitorChatHistory: Scalars['JSON']['output'];\n visitorChatRecentInbound?: Maybe<VisitorChatRecentInbound>;\n visitorChatUnread: VisitorChatUnread;\n /** Single help article by `id` XOR `slug`. Throws 400 when both / neither supplied. Locale uses base-language prefix match. */\n visitorHelpArticle?: Maybe<HelpArticle>;\n /** Hand-picked article fetch for the pinned-articles home block. Result order matches the operator's input list; unknown / unpublished / cross-integration ids drop out silently. */\n visitorHelpArticlesByIds: Array<HelpArticle>;\n /** List child folders of `parentId` (or root-level when null). Same shape as the operator surface — the visitor side just doesn't show the empty-folder hint. */\n visitorHelpFolders: Array<HelpFolder>;\n /** Paginated help articles. Pass `args.query` to search; omit for the chronological feed. `folderId` scopes to a subtree (recursive default); `tagSlug` filters to one tag. */\n visitorHelpList: PaginatedHelpArticles;\n /** Articles sharing at least one tag or folder ancestor with the given article. Sorted by overlap (same-folder boost) then publishedAt desc. Empty when the seed has no tags + no folder. */\n visitorHelpRelated: Array<HelpArticle>;\n /** List help tags for the integration (visitor-side). Pass `locale` to localize the `label`. */\n visitorHelpTags: Array<HelpTag>;\n /** List news categories for the integration (visitor-side). Pass `locale` to localize the `label` (base-language prefix; falls back to the base label). */\n visitorNewsCategories: Array<NewsCategory>;\n /** Paginated news posts. Pass `args.query` to search; omit for the chronological feed. `categorySlug` / `tagSlug` filter to one taxonomy slug. */\n visitorNewsList: PaginatedNewsPosts;\n /** Single news post by `id` XOR `slug`. Throws 400 when both / neither supplied. Locale uses base-language prefix match. */\n visitorNewsPost?: Maybe<NewsPost>;\n /** Posts sharing at least one category or tag with the given post id. Sorted by overlap count desc, then publishedAt desc. Empty when the post has no taxonomy refs or when no overlap exists. */\n visitorNewsRelated: Array<NewsPost>;\n /** List news tags for the integration (visitor-side). Pass `locale` to localize the `label`. */\n visitorNewsTags: Array<NewsTag>;\n /** Visitor-readable reaction palette for a surface. Same shape as the operator-side `reactionSet(surface)` query; lazy-defaulted on first read. */\n visitorReactionSet: ReactionSet;\n visitorWebConfig: VisitorWebConfig;\n /** The web messenger integration for the current organisation, or null when none is configured. At most one per org by design. */\n webIntegration?: Maybe<WebIntegration>;\n /** Look up a web integration by _id (scoped to the operator org). */\n webIntegrationById?: Maybe<WebIntegration>;\n webhookConnection: WebhookConnection;\n webhookConnectionSchema: Scalars['JSON']['output'];\n webhookConnections: Array<WebhookConnection>;\n webhookInboundHistory: WebhookInboundHistoryPage;\n webhookOutboundHistory: WebhookOutboundHistoryPage;\n /** List product catalogs available in the Facebook Commerce Manager for this business */\n whatsAppAvailableCatalogs: WhatsAppBusinessCatalogsResult;\n /** Check if a WhatsApp Business Account has a connected product catalog for MPM/SPM/Product templates */\n whatsAppCatalogEligibility: WhatsAppCatalogEligibilityResult;\n /** Fetch products from the connected WhatsApp catalog for SPM/MPM/Product templates */\n whatsAppCatalogProducts: WhatsAppCatalogProductsResult;\n /** Get a specific WhatsApp template by ID */\n whatsAppTemplate?: Maybe<WhatsAppTemplate>;\n /** Get all WhatsApp templates for the organisation with filtering and pagination */\n whatsAppTemplates: WhatsAppTemplateConnection;\n};\n\n\nexport type QueryAiAssistantArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryAiAssistantHistoryArgs = {\n args: AiAssistantHistoryArgs;\n};\n\n\nexport type QueryAiOrganisationHistoryArgs = {\n args: AiOrganisationHistoryArgs;\n};\n\n\nexport type QueryAllFeedbackArgs = {\n filters?: InputMaybe<FeedbackFilterInput>;\n};\n\n\nexport type QueryAllSupportTicketsArgs = {\n filters?: InputMaybe<TicketFilterInput>;\n};\n\n\nexport type QueryAnalyticsMetricsArgs = {\n query?: InputMaybe<MetricsQueryInput>;\n};\n\n\nexport type QueryAnalyticsOrgBillingHistoryArgs = {\n limit?: InputMaybe<Scalars['Int']['input']>;\n organisationId: Scalars['String']['input'];\n skip?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryAnalyticsOrgHistoryArgs = {\n filter?: InputMaybe<AnalyticsFilterInput>;\n granularity?: InputMaybe<MetricsGranularity>;\n organisationId: Scalars['String']['input'];\n};\n\n\nexport type QueryAnalyticsOrgUsageArgs = {\n filter?: InputMaybe<AnalyticsFilterInput>;\n organisationId: Scalars['String']['input'];\n};\n\n\nexport type QueryAnalyticsPlatformSummaryArgs = {\n filter?: InputMaybe<AnalyticsFilterInput>;\n};\n\n\nexport type QueryAnalyticsPlatformUsageArgs = {\n deploymentType?: InputMaybe<OrgDeploymentType>;\n filter?: InputMaybe<AnalyticsFilterInput>;\n};\n\n\nexport type QueryApprovalHistoryArgs = {\n filters?: InputMaybe<ApprovalFilterInput>;\n};\n\n\nexport type QueryAudienceCountArgs = {\n audienceFilter?: InputMaybe<Array<AudienceFilterConditionInput>>;\n integrationIds?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type QueryAvailableModelsArgs = {\n assistantId?: InputMaybe<Scalars['String']['input']>;\n capability?: InputMaybe<ModelCapability>;\n integrationId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryBillingUsageByInvoiceArgs = {\n invoiceId: Scalars['String']['input'];\n};\n\n\nexport type QueryBillingUsageHistoryArgs = {\n limit?: InputMaybe<Scalars['Int']['input']>;\n skip?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryBroadcastArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryBroadcastAudiencePreviewArgs = {\n audienceFilter?: InputMaybe<Array<AudienceFilterConditionInput>>;\n integrationIds?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type QueryBroadcastHistoryArgs = {\n args: BroadcastHistoryArgs;\n};\n\n\nexport type QueryBroadcastsArgs = {\n args?: InputMaybe<BroadcastListArgs>;\n};\n\n\nexport type QueryChatArgs = {\n chatId: Scalars['String']['input'];\n collectionIdOrSlug?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryChatActivityArgs = {\n chatId: Scalars['ID']['input'];\n};\n\n\nexport type QueryChatCollectionArgs = {\n idOrSlug: Scalars['String']['input'];\n};\n\n\nexport type QueryChatCollectionsArgs = {\n includeHidden?: Scalars['Boolean']['input'];\n includeSystem?: Scalars['Boolean']['input'];\n};\n\n\nexport type QueryChatUnreadMentionCountArgs = {\n chatId: Scalars['ID']['input'];\n};\n\n\nexport type QueryCheckSsoRequiredArgs = {\n email: Scalars['String']['input'];\n};\n\n\nexport type QueryCollectionChatCountArgs = {\n collectionIdOrSlug: Scalars['String']['input'];\n};\n\n\nexport type QueryCollectionChatsArgs = {\n collectionIdOrSlug?: InputMaybe<Scalars['String']['input']>;\n pagination?: InputMaybe<GetCursorPaginatedInput>;\n sort?: InputMaybe<GetSortedInput>;\n};\n\n\nexport type QueryCrmExportCountArgs = {\n input: CrmExportInput;\n};\n\n\nexport type QueryCrmImportCountArgs = {\n input: CrmImportInput;\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type QueryCrmSyncJobStatusArgs = {\n jobId: Scalars['String']['input'];\n};\n\n\nexport type QueryCrmSyncJobsArgs = {\n filter?: InputMaybe<CrmSyncJobFilterInput>;\n};\n\n\nexport type QueryEmailHasPasskeysArgs = {\n email: Scalars['String']['input'];\n};\n\n\nexport type QueryExportJobArgs = {\n jobId: Scalars['String']['input'];\n};\n\n\nexport type QueryExportJobsArgs = {\n limit?: InputMaybe<Scalars['Float']['input']>;\n};\n\n\nexport type QueryFeedbackArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryFeedbackAnalyticsArgs = {\n dateRange?: InputMaybe<AnalyticsDateRange>;\n};\n\n\nexport type QueryFlowArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryFlowActivitiesArgs = {\n filter?: InputMaybe<FlowActivityFilterInput>;\n flowId: Scalars['String']['input'];\n pagination?: InputMaybe<PaginationInput>;\n};\n\n\nexport type QueryFlowActivityArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryFlowTemplateArgs = {\n idOrSlug: Scalars['String']['input'];\n};\n\n\nexport type QueryFlowTemplateTagsArgs = {\n visibility?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryFlowTemplatesArgs = {\n filters?: InputMaybe<FlowTemplateFilterInput>;\n limit?: Scalars['Int']['input'];\n page?: Scalars['Int']['input'];\n};\n\n\nexport type QueryFlowVersionArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryFlowVersionsArgs = {\n flowId: Scalars['String']['input'];\n pagination?: InputMaybe<PaginationInput>;\n};\n\n\nexport type QueryFlowsArgs = {\n filters?: InputMaybe<FlowFilterInput>;\n pagination?: InputMaybe<PaginationInput>;\n};\n\n\nexport type QueryGetArchivedNotificationsArgs = {\n limit?: InputMaybe<Scalars['Float']['input']>;\n skip?: InputMaybe<Scalars['Float']['input']>;\n};\n\n\nexport type QueryGetFlowTriggersArgs = {\n flowId: Scalars['String']['input'];\n};\n\n\nexport type QueryGetMessagesArgs = {\n chatId: Scalars['String']['input'];\n messageId?: InputMaybe<Scalars['String']['input']>;\n pagination?: InputMaybe<PaginateMessagesInput>;\n};\n\n\nexport type QueryGetNotificationArgs = {\n notificationId: Scalars['String']['input'];\n};\n\n\nexport type QueryGetPeopleFieldDefinitionsArgs = {\n filter?: InputMaybe<PeopleFieldsFilterDto>;\n};\n\n\nexport type QueryGetPeopleFieldValueArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryGetPeopleFieldValuesArgs = {\n filter?: InputMaybe<PeopleFieldsFilterDto>;\n peopleId: Scalars['String']['input'];\n};\n\n\nexport type QueryGetSsoConfigArgs = {\n organisationId: Scalars['String']['input'];\n};\n\n\nexport type QueryGetSsoSpMetadataArgs = {\n organisationId: Scalars['String']['input'];\n};\n\n\nexport type QueryGetUserNotificationsArgs = {\n input?: InputMaybe<GetNotificationsInput>;\n};\n\n\nexport type QueryGetVariablesArgs = {\n input?: InputMaybe<GetVariablesInput>;\n};\n\n\nexport type QueryHelpArticleArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryHelpArticlesArgs = {\n folderId?: InputMaybe<Scalars['ID']['input']>;\n integrationId: Scalars['ID']['input'];\n limit?: InputMaybe<Scalars['Int']['input']>;\n locale?: InputMaybe<Scalars['String']['input']>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n recursive?: InputMaybe<Scalars['Boolean']['input']>;\n search?: InputMaybe<Scalars['String']['input']>;\n sort?: InputMaybe<HelpArticleSort>;\n status?: InputMaybe<HelpArticleStatus>;\n tagIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n};\n\n\nexport type QueryHelpFolderArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryHelpFolderCountsArgs = {\n id: Scalars['ID']['input'];\n integrationId: Scalars['ID']['input'];\n};\n\n\nexport type QueryHelpFolderTreeArgs = {\n integrationId: Scalars['ID']['input'];\n};\n\n\nexport type QueryHelpFoldersArgs = {\n integrationId: Scalars['ID']['input'];\n parentId?: InputMaybe<Scalars['ID']['input']>;\n};\n\n\nexport type QueryHelpTagArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryHelpTagsArgs = {\n integrationId: Scalars['ID']['input'];\n};\n\n\nexport type QueryIntegrationArgs = {\n id: Scalars['String']['input'];\n includeGhost?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type QueryIntegrationExternalSchemaArgs = {\n integrationId: Scalars['String']['input'];\n withReadOnly?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type QueryIntegrationsArgs = {\n category?: InputMaybe<IntegrationCategory>;\n includeGhost?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type QueryInvoiceArgs = {\n invoiceId: Scalars['String']['input'];\n};\n\n\nexport type QueryInvoicesArgs = {\n input?: InputMaybe<GetInvoicesInput>;\n};\n\n\nexport type QueryIsWhatsAppIdEditableArgs = {\n peopleId: Scalars['String']['input'];\n};\n\n\nexport type QueryLabelArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryLabelsArgs = {\n includeArchived?: Scalars['Boolean']['input'];\n};\n\n\nexport type QueryMasterContactEmailsArgs = {\n category?: InputMaybe<ContactCategory>;\n};\n\n\nexport type QueryMasterContactRequestArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryMasterContactRequestsArgs = {\n filters?: InputMaybe<ContactRequestFiltersInput>;\n};\n\n\nexport type QueryMasterNewsletterSubscriptionsArgs = {\n filters?: InputMaybe<NewsletterFiltersInput>;\n};\n\n\nexport type QueryMasterSubscriptionEmailsArgs = {\n source?: InputMaybe<NewsletterSource>;\n};\n\n\nexport type QueryMediaArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryMessagingIntegrationDataCountsArgs = {\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type QueryMyMentionsArgs = {\n input?: InputMaybe<MyMentionsInput>;\n};\n\n\nexport type QueryMySupportTicketsArgs = {\n status?: InputMaybe<SupportTicketStatus>;\n};\n\n\nexport type QueryNewsCategoriesArgs = {\n integrationId: Scalars['ID']['input'];\n};\n\n\nexport type QueryNewsCategoryArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryNewsPostArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryNewsPostsArgs = {\n categoryIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n integrationId: Scalars['ID']['input'];\n limit?: InputMaybe<Scalars['Int']['input']>;\n locale?: InputMaybe<Scalars['String']['input']>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n search?: InputMaybe<Scalars['String']['input']>;\n sort?: InputMaybe<NewsPostSort>;\n status?: InputMaybe<NewsPostStatus>;\n tagIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n};\n\n\nexport type QueryNewsSourceArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryNewsSourceFieldMappingsArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryNewsSourceVariablesArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryNewsSourcesArgs = {\n integrationId: Scalars['ID']['input'];\n};\n\n\nexport type QueryNewsTagArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryNewsTagsArgs = {\n integrationId: Scalars['ID']['input'];\n};\n\n\nexport type QueryOrganisationArgs = {\n organisationSlug?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryPeopleArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryPeopleListArgs = {\n input: PeopleListInput;\n};\n\n\nexport type QueryPlanArgs = {\n priceId: Scalars['String']['input'];\n};\n\n\nexport type QueryPreviewPlanSwitchArgs = {\n targetPriceId: Scalars['String']['input'];\n};\n\n\nexport type QueryPublicFlowTemplateArgs = {\n idOrSlug: Scalars['String']['input'];\n};\n\n\nexport type QueryPublicFlowTemplatesArgs = {\n filters?: InputMaybe<FlowTemplateFilterInput>;\n limit?: Scalars['Int']['input'];\n page?: Scalars['Int']['input'];\n};\n\n\nexport type QueryReactionSetArgs = {\n surface: ReactionSurface;\n};\n\n\nexport type QueryRelatedPeopleArgs = {\n peopleId: Scalars['String']['input'];\n};\n\n\nexport type QuerySearchChatsArgs = {\n input: SearchChatsInput;\n pagination?: InputMaybe<GetCursorPaginatedInput>;\n sort?: InputMaybe<GetSortedInput>;\n};\n\n\nexport type QuerySearchMessagesArgs = {\n input: SearchMessagesInput;\n messageId?: InputMaybe<Scalars['String']['input']>;\n pagination?: InputMaybe<PaginateMessagesInput>;\n};\n\n\nexport type QuerySimilarFlowTemplatesArgs = {\n limit?: InputMaybe<Scalars['Int']['input']>;\n organisationId?: InputMaybe<Scalars['String']['input']>;\n templateId: Scalars['String']['input'];\n};\n\n\nexport type QuerySpamBlockHistoryArgs = {\n limit?: InputMaybe<Scalars['Int']['input']>;\n page?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QuerySupportTicketArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryTelegramBotSettingsArgs = {\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type QueryTenantStatusArgs = {\n targetOrgId: Scalars['String']['input'];\n};\n\n\nexport type QueryTestTriggersArgs = {\n input: TestTriggerInput;\n};\n\n\nexport type QueryTicketCommentsArgs = {\n cursor?: InputMaybe<Scalars['ID']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n ticketId: Scalars['ID']['input'];\n};\n\n\nexport type QueryValidateInviteTokenArgs = {\n token: Scalars['String']['input'];\n};\n\n\nexport type QueryValidatePromotionCodeArgs = {\n code: Scalars['String']['input'];\n};\n\n\nexport type QueryVisitorChatHistoryArgs = {\n before?: InputMaybe<Scalars['String']['input']>;\n chatId: Scalars['String']['input'];\n limit?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryVisitorChatRecentInboundArgs = {\n chatId: Scalars['String']['input'];\n};\n\n\nexport type QueryVisitorChatUnreadArgs = {\n chatId: Scalars['String']['input'];\n};\n\n\nexport type QueryVisitorHelpArticleArgs = {\n args: VisitorHelpArticleArgs;\n};\n\n\nexport type QueryVisitorHelpArticlesByIdsArgs = {\n ids: Array<Scalars['ID']['input']>;\n locale?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryVisitorHelpFoldersArgs = {\n locale?: InputMaybe<Scalars['String']['input']>;\n parentId?: InputMaybe<Scalars['ID']['input']>;\n};\n\n\nexport type QueryVisitorHelpListArgs = {\n args?: InputMaybe<VisitorHelpListArgs>;\n};\n\n\nexport type QueryVisitorHelpRelatedArgs = {\n articleId: Scalars['ID']['input'];\n limit?: InputMaybe<Scalars['Int']['input']>;\n locale?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryVisitorHelpTagsArgs = {\n locale?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryVisitorNewsCategoriesArgs = {\n locale?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryVisitorNewsListArgs = {\n args?: InputMaybe<VisitorNewsListArgs>;\n};\n\n\nexport type QueryVisitorNewsPostArgs = {\n args: VisitorNewsPostArgs;\n};\n\n\nexport type QueryVisitorNewsRelatedArgs = {\n limit?: InputMaybe<Scalars['Int']['input']>;\n locale?: InputMaybe<Scalars['String']['input']>;\n postId: Scalars['ID']['input'];\n};\n\n\nexport type QueryVisitorNewsTagsArgs = {\n locale?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryVisitorReactionSetArgs = {\n surface: ReactionSurface;\n};\n\n\nexport type QueryWebIntegrationByIdArgs = {\n id: Scalars['ID']['input'];\n};\n\n\nexport type QueryWebhookConnectionArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryWebhookConnectionSchemaArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryWebhookInboundHistoryArgs = {\n args: WebhookInboundHistoryArgs;\n};\n\n\nexport type QueryWebhookOutboundHistoryArgs = {\n args: WebhookOutboundHistoryArgs;\n};\n\n\nexport type QueryWhatsAppAvailableCatalogsArgs = {\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type QueryWhatsAppCatalogEligibilityArgs = {\n integrationId: Scalars['String']['input'];\n};\n\n\nexport type QueryWhatsAppCatalogProductsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n integrationId: Scalars['String']['input'];\n limit?: InputMaybe<Scalars['Int']['input']>;\n search?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryWhatsAppTemplateArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryWhatsAppTemplatesArgs = {\n filter?: InputMaybe<WhatsAppTemplateFilterInput>;\n};\n\nexport type QuestionCardData = {\n __typename?: 'QuestionCardData';\n input?: Maybe<Scalars['String']['output']>;\n inputType?: Maybe<Scalars['String']['output']>;\n question?: Maybe<Scalars['String']['output']>;\n retryLimit?: Maybe<Scalars['Float']['output']>;\n timeout?: Maybe<Scalars['Float']['output']>;\n timeoutMessage?: Maybe<Scalars['String']['output']>;\n variableName?: Maybe<Scalars['String']['output']>;\n};\n\n/** Optional sentiment tag per reaction slot — drives the derived \"% positive\" score. Defaults to NEUTRAL. */\nexport enum ReactionSentiment {\n NEGATIVE = 'NEGATIVE',\n NEUTRAL = 'NEUTRAL',\n POSITIVE = 'POSITIVE'\n}\n\nexport type ReactionSet = {\n __typename?: 'ReactionSet';\n _id: Scalars['ID']['output'];\n createdAt: Scalars['DateTime']['output'];\n enabled: Scalars['Boolean']['output'];\n organisationId: Scalars['ID']['output'];\n slots: Array<ReactionSlot>;\n surface: ReactionSurface;\n updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type ReactionSlot = {\n __typename?: 'ReactionSlot';\n /** Display emoji. Free-text — operators can paste any unicode emoji (1–8 chars to allow ZWJ sequences like 👨👩👧). */\n emoji: Scalars['String']['output'];\n /** Optional sentiment tag — drives the derived \"% positive\" score. Defaults to NEUTRAL. */\n sentiment: ReactionSentiment;\n /** Stable id for this slot — counts on posts/articles are keyed by this. Operators can change emoji + sentiment without losing history; reordering the array does not touch slotIndex. */\n slotIndex: Scalars['Int']['output'];\n};\n\nexport type ReactionSlotInput = {\n emoji: Scalars['String']['input'];\n sentiment?: InputMaybe<ReactionSentiment>;\n slotIndex: Scalars['Int']['input'];\n};\n\n/** Surface a ReactionSet applies to — News posts or Help articles. */\nexport enum ReactionSurface {\n HELP = 'HELP',\n NEWS = 'NEWS'\n}\n\n/** Reaction type */\nexport enum ReactionType {\n CUSTOM_EMOJI = 'CUSTOM_EMOJI',\n EMOJI = 'EMOJI'\n}\n\nexport type ReactionUser = {\n __typename?: 'ReactionUser';\n from?: Maybe<MessageSenderUnion>;\n fromModel: Scalars['String']['output'];\n reactedAt: Scalars['DateTime']['output'];\n};\n\nexport type RecoveryCodesResponse = {\n __typename?: 'RecoveryCodesResponse';\n /** New recovery codes. Store these securely! */\n recoveryCodes: Array<Scalars['String']['output']>;\n};\n\nexport type RegenerateRecoveryCodesInput = {\n code: Scalars['String']['input'];\n};\n\nexport type RemovalResult = {\n __typename?: 'RemovalResult';\n /** IDs of removed chats */\n chats: Array<Scalars['String']['output']>;\n /** IDs of removed people-fields */\n fields: Array<Scalars['String']['output']>;\n /** IDs of removed messages */\n messages: Array<Scalars['String']['output']>;\n /** IDs of the removed people */\n people: Array<Scalars['String']['output']>;\n};\n\nexport type RemoveDiscountOutput = {\n __typename?: 'RemoveDiscountOutput';\n message: Scalars['String']['output'];\n success: Scalars['Boolean']['output'];\n};\n\nexport type RemovePeopleInput = {\n /** IDs of people to remove (at least one required) */\n ids: Array<Scalars['String']['input']>;\n /** Remove chat records */\n removeChats?: InputMaybe<Scalars['Boolean']['input']>;\n /** Remove messages and their media files */\n removeMessages?: InputMaybe<Scalars['Boolean']['input']>;\n /** Remove people and people-fields (if true, also removes chats and messages due to referential integrity) */\n removePeople?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type RenamePasskeyInput = {\n /** New device name */\n newName: Scalars['String']['input'];\n /** Passkey ID to rename */\n passkeyId: Scalars['ID']['input'];\n};\n\nexport type ReplyContactRequestInput = {\n contactRequestId: Scalars['ID']['input'];\n message: Scalars['String']['input'];\n subject: Scalars['String']['input'];\n};\n\nexport type RequestChatConfig = {\n __typename?: 'RequestChatConfig';\n /** True to request chat with bot as member */\n botIsMember?: Maybe<Scalars['Boolean']['output']>;\n /** True to request supergroup/channel with username */\n chatHasUsername?: Maybe<Scalars['Boolean']['output']>;\n /** True to request a channel, false for group/supergroup */\n chatIsChannel: Scalars['Boolean']['output'];\n /** True to request chat owned by user */\n chatIsCreated?: Maybe<Scalars['Boolean']['output']>;\n /** True to request forum supergroup */\n chatIsForum?: Maybe<Scalars['Boolean']['output']>;\n /** Unique request identifier */\n requestId: Scalars['Int']['output'];\n};\n\nexport type RequestPollConfig = {\n __typename?: 'RequestPollConfig';\n /** Poll type: \"quiz\" or \"regular\" */\n type?: Maybe<Scalars['String']['output']>;\n};\n\nexport type RequestUsersConfig = {\n __typename?: 'RequestUsersConfig';\n /** Max number of users to select (1-10) */\n maxQuantity?: Maybe<Scalars['Int']['output']>;\n /** Unique request identifier */\n requestId: Scalars['Int']['output'];\n /** True to request bots, false for regular users */\n userIsBot?: Maybe<Scalars['Boolean']['output']>;\n /** True to request premium users */\n userIsPremium?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type ResolveSupportTicketInput = {\n resolution: Scalars['String']['input'];\n};\n\nexport type ResponseMapping = {\n __typename?: 'ResponseMapping';\n defaultValue?: Maybe<Scalars['String']['output']>;\n jsonPath?: Maybe<Scalars['String']['output']>;\n variableName?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ResponseMappingInput = {\n defaultValue?: InputMaybe<Scalars['String']['input']>;\n jsonPath?: InputMaybe<Scalars['String']['input']>;\n variableName?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type RetentionCleanupResult = {\n __typename?: 'RetentionCleanupResult';\n /** Duration in milliseconds */\n duration: Scalars['Int']['output'];\n error?: Maybe<Scalars['String']['output']>;\n mediaDeleted: Scalars['Int']['output'];\n messagesDeleted: Scalars['Int']['output'];\n organisationId: Scalars['String']['output'];\n organisationName: Scalars['String']['output'];\n planTier: Scalars['String']['output'];\n reactionsDeleted: Scalars['Int']['output'];\n retentionDays?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type RetentionStatusResponse = {\n __typename?: 'RetentionStatusResponse';\n /** Number of messages that will be deleted in next cleanup. */\n messagesAtRisk: Scalars['Int']['output'];\n /** Scheduled time for next cleanup run. */\n nextCleanup: Scalars['DateTime']['output'];\n /** Date of the oldest message in the organisation. */\n oldestMessage?: Maybe<Scalars['DateTime']['output']>;\n organisationId: Scalars['String']['output'];\n /** Maximum retention allowed by current plan. null = unlimited. */\n planLimit?: Maybe<Scalars['Int']['output']>;\n planTier: Scalars['String']['output'];\n /** Effective retention period in days. null = infinite. */\n retentionDays?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type RevokeSessionResponse = {\n __typename?: 'RevokeSessionResponse';\n message: Scalars['String']['output'];\n success: Scalars['Boolean']['output'];\n};\n\n/** Roles within the organisation */\nexport enum Role {\n /** Can manage settings and members, but not delete the organisation */\n ADMIN = 'ADMIN',\n /** Inbox-only access. Can respond to conversations. */\n AGENT = 'AGENT',\n /** Can edit most content but not organisation-level settings */\n EDITOR = 'EDITOR',\n /** Full access to all settings, billing and members */\n OWNER = 'OWNER'\n}\n\nexport type RolePermissions = {\n __typename?: 'RolePermissions';\n /** Can access inbox */\n canAccessInbox: Scalars['Boolean']['output'];\n /** Can assign chats to team members */\n canAssignChats: Scalars['Boolean']['output'];\n /** Can delete the organisation */\n canDeleteOrganisation: Scalars['Boolean']['output'];\n /** Can export people to CSV/CRM */\n canExportPeople: Scalars['Boolean']['output'];\n /** Can import people from CRM */\n canImportPeople: Scalars['Boolean']['output'];\n /** Can manage AI settings */\n canManageAISettings: Scalars['Boolean']['output'];\n /** Can manage billing and subscription */\n canManageBilling: Scalars['Boolean']['output'];\n /** Can create, edit, and cancel broadcasts */\n canManageBroadcasts: Scalars['Boolean']['output'];\n /** Can manage chat collections */\n canManageCollections: Scalars['Boolean']['output'];\n /** Can manage custom fields */\n canManageCustomFields: Scalars['Boolean']['output'];\n /** Can create and edit flows */\n canManageFlows: Scalars['Boolean']['output'];\n /** Can manage integrations */\n canManageIntegrations: Scalars['Boolean']['output'];\n /** Can manage labels */\n canManageLabels: Scalars['Boolean']['output'];\n /** Can access and modify organisation settings */\n canManageOrganisation: Scalars['Boolean']['output'];\n /** Can manage people/contacts */\n canManagePeople: Scalars['Boolean']['output'];\n /** Can invite and manage team members */\n canManageTeam: Scalars['Boolean']['output'];\n /** Can create and edit templates */\n canManageTemplates: Scalars['Boolean']['output'];\n /** Can manage WhatsApp templates */\n canManageWhatsAppTemplates: Scalars['Boolean']['output'];\n /** Can respond to conversations */\n canRespondToChats: Scalars['Boolean']['output'];\n role: Role;\n};\n\nexport type RotateWebhookSecretResponse = {\n __typename?: 'RotateWebhookSecretResponse';\n connectionId: Scalars['String']['output'];\n newSecret: Scalars['String']['output'];\n};\n\nexport type RssSourceConfig = {\n __typename?: 'RssSourceConfig';\n feedUrl: Scalars['String']['output'];\n lastPollStatus?: Maybe<Scalars['String']['output']>;\n lastPolledAt?: Maybe<Scalars['DateTime']['output']>;\n pollMinutes: Scalars['Int']['output'];\n};\n\n/** Comparison operators for trigger rules */\nexport enum RuleOperator {\n CONTAINS = 'CONTAINS',\n ENDS_WITH = 'ENDS_WITH',\n EQUALS = 'EQUALS',\n GREATER_THAN = 'GREATER_THAN',\n GREATER_THAN_OR_EQUAL = 'GREATER_THAN_OR_EQUAL',\n IN_ARRAY = 'IN_ARRAY',\n IS_EMPTY = 'IS_EMPTY',\n IS_NOT_EMPTY = 'IS_NOT_EMPTY',\n LESS_THAN = 'LESS_THAN',\n LESS_THAN_OR_EQUAL = 'LESS_THAN_OR_EQUAL',\n MATCHES_REGEX = 'MATCHES_REGEX',\n NOT_CONTAINS = 'NOT_CONTAINS',\n NOT_EQUALS = 'NOT_EQUALS',\n NOT_IN_ARRAY = 'NOT_IN_ARRAY',\n STARTS_WITH = 'STARTS_WITH'\n}\n\nexport type SpmHeaderInput = {\n /** Product SKU/ID from Facebook Commerce Manager. Product image is used as header. */\n productRetailerId: Scalars['String']['input'];\n};\n\nexport type SalesforceConfigInput = {\n accessToken?: InputMaybe<Scalars['String']['input']>;\n instanceUrl?: InputMaybe<Scalars['String']['input']>;\n objectType?: InputMaybe<Scalars['String']['input']>;\n refreshToken?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type SamlConfig = {\n __typename?: 'SamlConfig';\n /** JSON string of attribute mappings */\n attributeMapping?: Maybe<Scalars['String']['output']>;\n idpCertificate: Scalars['String']['output'];\n idpEntityId: Scalars['String']['output'];\n idpSloUrl?: Maybe<Scalars['String']['output']>;\n idpSsoUrl: Scalars['String']['output'];\n nameIdFormat?: Maybe<Scalars['String']['output']>;\n signAuthnRequests: Scalars['Boolean']['output'];\n wantAssertionsSigned: Scalars['Boolean']['output'];\n};\n\nexport type SamlConfigInput = {\n /** JSON string of attribute mappings (e.g., {\"email\": \"mail\", \"firstName\": \"givenName\"}) */\n attributeMapping?: InputMaybe<Scalars['String']['input']>;\n /** Identity Provider X.509 Certificate (PEM format) */\n idpCertificate: Scalars['String']['input'];\n /** Identity Provider Entity ID (Issuer) */\n idpEntityId: Scalars['String']['input'];\n /** Identity Provider Single Logout URL */\n idpSloUrl?: InputMaybe<Scalars['String']['input']>;\n /** Identity Provider Single Sign-On URL */\n idpSsoUrl: Scalars['String']['input'];\n /** Name ID format for SAML assertions */\n nameIdFormat?: InputMaybe<Scalars['String']['input']>;\n /** Whether to sign SAML authentication requests */\n signAuthnRequests?: InputMaybe<Scalars['Boolean']['input']>;\n /** Whether SAML responses must be signed */\n wantAssertionsSigned?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Malware scan status for uploaded media files */\nexport enum ScanStatus {\n CLEAN = 'CLEAN',\n ERROR = 'ERROR',\n INFECTED = 'INFECTED',\n PENDING = 'PENDING',\n SKIPPED = 'SKIPPED'\n}\n\nexport type ScheduleConfigInput = {\n audienceFilter?: InputMaybe<Scalars['JSON']['input']>;\n cronExpression?: InputMaybe<Scalars['String']['input']>;\n isRecurring?: InputMaybe<Scalars['Boolean']['input']>;\n offsetAmount?: InputMaybe<Scalars['Float']['input']>;\n offsetDirection?: InputMaybe<Scalars['String']['input']>;\n offsetUnit?: InputMaybe<Scalars['String']['input']>;\n referenceField?: InputMaybe<Scalars['String']['input']>;\n scheduledAt?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\n/** Types of schedule triggers */\nexport enum ScheduleType {\n RELATIVE = 'RELATIVE',\n SPECIFIC = 'SPECIFIC'\n}\n\nexport type ScheduledPlanChange = {\n __typename?: 'ScheduledPlanChange';\n canCancel: Scalars['Boolean']['output'];\n effectiveAt: Scalars['DateTime']['output'];\n targetPlan: PlanSummary;\n};\n\nexport type SearchChatsInput = {\n /** Filter by collection ID or slug to search within matching chats */\n collectionIdOrSlug?: InputMaybe<Scalars['String']['input']>;\n /** Filter by rules (for preview before saving a collection). Combined with collection rules if collectionIdOrSlug is also provided. */\n rules?: InputMaybe<Array<CollectionRuleInput>>;\n};\n\nexport type SearchChatsResult = {\n __typename?: 'SearchChatsResult';\n data: Array<Chat>;\n hasNext: Scalars['Boolean']['output'];\n hasPrevious: Scalars['Boolean']['output'];\n nextCursor?: Maybe<Scalars['String']['output']>;\n previousCursor?: Maybe<Scalars['String']['output']>;\n /** Total count of chats matching the filters (only on first page) */\n totalCount?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type SearchMessagesInput = {\n /** Filter by specific chat ID */\n chatId?: InputMaybe<Scalars['String']['input']>;\n /** Filter by collection ID or slug to search within matching chats */\n collectionIdOrSlug?: InputMaybe<Scalars['String']['input']>;\n /** Filter by rules (for preview before saving a collection). Takes precedence over collectionIdOrSlug. */\n rules?: InputMaybe<Array<CollectionRuleInput>>;\n};\n\nexport type SendDemoReadyInput = {\n adminEmail?: InputMaybe<Scalars['String']['input']>;\n adminPassword?: InputMaybe<Scalars['String']['input']>;\n contactRequestId: Scalars['ID']['input'];\n customMessage?: InputMaybe<Scalars['String']['input']>;\n demoUrl: Scalars['String']['input'];\n};\n\nexport type SendNewsletterInput = {\n batchSize?: Scalars['Int']['input'];\n content: Scalars['String']['input'];\n filterBySource?: InputMaybe<NewsletterSource>;\n specificEmails?: InputMaybe<Array<Scalars['String']['input']>>;\n subject: Scalars['String']['input'];\n testMode?: Scalars['Boolean']['input'];\n};\n\nexport type SendNewsletterResponse = {\n __typename?: 'SendNewsletterResponse';\n failedEmails?: Maybe<Array<Scalars['String']['output']>>;\n message: Scalars['String']['output'];\n success: Scalars['Boolean']['output'];\n totalFailed: Scalars['Int']['output'];\n totalSent: Scalars['Int']['output'];\n};\n\nexport type SendWhatsAppTemplateInput = {\n /** Chat ID to send the template to */\n chatId: Scalars['String']['input'];\n /** Product-specific overrides for SPM, MPM, and Product Card Carousel templates. Required for catalog-based templates. */\n productOverrides?: InputMaybe<ProductTemplateOverrides>;\n /** Template ID to send */\n templateId: Scalars['String']['input'];\n /** Manual variable values to override auto-resolved values */\n variableOverrides?: InputMaybe<TemplateVariableOverrides>;\n};\n\nexport type SendWhatsAppTemplateResult = {\n __typename?: 'SendWhatsAppTemplateResult';\n error?: Maybe<Scalars['String']['output']>;\n /** WhatsApp message ID if successful */\n messageId?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type SentimentBreakdown = {\n __typename?: 'SentimentBreakdown';\n /** Negative feedback count (rating 1-2) */\n negative: Scalars['Int']['output'];\n /** Negative percentage */\n negativePercent: Scalars['Float']['output'];\n /** Neutral feedback count (rating 3) */\n neutral: Scalars['Int']['output'];\n /** Neutral percentage */\n neutralPercent: Scalars['Float']['output'];\n /** Positive feedback count (rating 4-5) */\n positive: Scalars['Int']['output'];\n /** Positive percentage */\n positivePercent: Scalars['Float']['output'];\n};\n\nexport type SessionResponse = {\n __typename?: 'SessionResponse';\n authProvider: Scalars['String']['output'];\n browser: Scalars['String']['output'];\n browserVersion?: Maybe<Scalars['String']['output']>;\n city?: Maybe<Scalars['String']['output']>;\n country?: Maybe<Scalars['String']['output']>;\n createdAt: Scalars['DateTime']['output'];\n deviceModel?: Maybe<Scalars['String']['output']>;\n deviceType: Scalars['String']['output'];\n id: Scalars['String']['output'];\n ipAddress: Scalars['String']['output'];\n isCurrent: Scalars['Boolean']['output'];\n isSuspicious: Scalars['Boolean']['output'];\n lastActiveAt: Scalars['DateTime']['output'];\n os: Scalars['String']['output'];\n osVersion?: Maybe<Scalars['String']['output']>;\n sessionId: Scalars['String']['output'];\n suspiciousReason?: Maybe<Scalars['String']['output']>;\n};\n\nexport type SetFieldValueDto = {\n fieldId: Scalars['String']['input'];\n peopleId: Scalars['String']['input'];\n value?: InputMaybe<Scalars['JSON']['input']>;\n};\n\nexport type SetMessageLabelsInput = {\n labelIds: Array<Scalars['String']['input']>;\n messageId: Scalars['String']['input'];\n};\n\nexport type SetStatusMessageInput = {\n duration?: InputMaybe<StatusDuration>;\n emoji?: InputMaybe<Scalars['String']['input']>;\n text?: InputMaybe<Scalars['String']['input']>;\n type?: InputMaybe<PresetStatusType>;\n};\n\n/** Set bot commands (replaces entire list) */\nexport type SetTelegramBotCommandsInput = {\n /** Commands to set (max 100) */\n commands: Array<TelegramBotCommandInput>;\n /** Integration ID */\n integrationId: Scalars['String']['input'];\n};\n\n/** Set the bot description */\nexport type SetTelegramBotDescriptionInput = {\n /** Bot description (up to 512 chars, empty to clear) */\n description: Scalars['String']['input'];\n /** Integration ID */\n integrationId: Scalars['String']['input'];\n};\n\n/** Set the bot name */\nexport type SetTelegramBotNameInput = {\n /** Integration ID */\n integrationId: Scalars['String']['input'];\n /** Bot name (up to 64 chars, empty to reset to username) */\n name: Scalars['String']['input'];\n};\n\n/** Set the bot short description */\nexport type SetTelegramBotShortDescriptionInput = {\n /** Integration ID */\n integrationId: Scalars['String']['input'];\n /** Short description for profile page (up to 120 chars, empty to clear) */\n shortDescription: Scalars['String']['input'];\n};\n\n/** Set the chat menu button */\nexport type SetTelegramMenuButtonInput = {\n /** Integration ID */\n integrationId: Scalars['String']['input'];\n /** Menu button to set */\n menuButton: TelegramMenuButtonInput;\n};\n\nexport type SetupIntentOutput = {\n __typename?: 'SetupIntentOutput';\n clientSecret: Scalars['String']['output'];\n setupIntentId: Scalars['String']['output'];\n};\n\nexport type SignOutAllResponse = {\n __typename?: 'SignOutAllResponse';\n message: Scalars['String']['output'];\n revokedCount: Scalars['Int']['output'];\n success: Scalars['Boolean']['output'];\n};\n\n/** Sort direction for list queries */\nexport enum SortDirection {\n ASC = 'ASC',\n DESC = 'DESC'\n}\n\n/** Sort order direction */\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC'\n}\n\n/** What to do with the source database data after migration/setup */\nexport enum SourceDataAction {\n DELETE = 'DELETE',\n KEEP = 'KEEP'\n}\n\nexport type SpMetadataResponse = {\n __typename?: 'SpMetadataResponse';\n /** Assertion Consumer Service URL */\n acsUrl: Scalars['String']['output'];\n /** Service Provider Entity ID */\n entityId: Scalars['String']['output'];\n /** Metadata URL */\n metadataUrl: Scalars['String']['output'];\n /** Single Logout URL */\n sloUrl?: Maybe<Scalars['String']['output']>;\n};\n\n/** Type of spam block audit event */\nexport enum SpamBlockEventType {\n CHAT_PAUSED = 'CHAT_PAUSED',\n CHAT_RESUMED = 'CHAT_RESUMED',\n ORG_BLOCKED = 'ORG_BLOCKED',\n ORG_UNBLOCKED = 'ORG_UNBLOCKED',\n USER_BLOCKED = 'USER_BLOCKED',\n USER_UNBLOCKED = 'USER_UNBLOCKED'\n}\n\nexport type SpamBlockHistory = {\n __typename?: 'SpamBlockHistory';\n _id: Scalars['String']['output'];\n /** Number of affected chats (for org-level events) */\n affectedChats?: Maybe<Scalars['Int']['output']>;\n /** Whether the block auto-resolved via TTL expiry */\n autoResolved?: Maybe<Scalars['Boolean']['output']>;\n /** Chat (for per-chat events) */\n chat?: Maybe<Chat>;\n createdAt: Scalars['DateTime']['output'];\n /** When the block expires (for timed blocks) */\n expiresAt?: Maybe<Scalars['DateTime']['output']>;\n /** Organisation that triggered the event */\n organisation: Organisation;\n /** Human-readable reason for the event */\n reason: Scalars['String']['output'];\n /** Operator who manually resolved (for UNBLOCKED/RESUMED events) */\n resolvedBy?: Maybe<User>;\n type: SpamBlockEventType;\n updatedAt: Scalars['DateTime']['output'];\n};\n\n/** Who triggered the spam block/unblock action */\nexport enum SpamBlockInitiator {\n OPERATOR = 'OPERATOR',\n SYSTEM = 'SYSTEM'\n}\n\n/** How the organisation handles spam-blocked users */\nexport enum SpamBlockMode {\n BLOCK_FOREVER = 'BLOCK_FOREVER',\n BLOCK_TEMP = 'BLOCK_TEMP',\n THROTTLE_ONLY = 'THROTTLE_ONLY'\n}\n\nexport type SpamProtectionSettings = {\n __typename?: 'SpamProtectionSettings';\n /** Duration in minutes for temporary blocks (1–1440) */\n blockDurationMinutes: Scalars['Int']['output'];\n /** How to handle blocked users: throttle only, temp block, or permanent block */\n blockMode: SpamBlockMode;\n /** Whether spam protection is enabled for this organisation */\n enabled: Scalars['Boolean']['output'];\n /** How many times this org has been blocked by outbound spam protection (progressive escalation) */\n orgBlockCount: Scalars['Int']['output'];\n /** Whether the entire org outbound is currently blocked by spam protection */\n outboundBlocked: Scalars['Boolean']['output'];\n /** When the org outbound block expires (null if not blocked) */\n outboundBlockedUntil?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type SsoCheckResponse = {\n __typename?: 'SsoCheckResponse';\n /** SSO login URL */\n loginUrl?: Maybe<Scalars['String']['output']>;\n /** Organisation name */\n organisationName?: Maybe<Scalars['String']['output']>;\n /** Whether SSO is available for this email domain */\n ssoAvailable: Scalars['Boolean']['output'];\n /** Whether SSO is enforced (required) */\n ssoEnforced: Scalars['Boolean']['output'];\n};\n\nexport type SsoConfig = {\n __typename?: 'SsoConfig';\n _id: Scalars['String']['output'];\n allowAccountLinking: Scalars['Boolean']['output'];\n autoProvision: Scalars['Boolean']['output'];\n createdAt?: Maybe<Scalars['DateTime']['output']>;\n createdBy?: Maybe<Scalars['String']['output']>;\n defaultRole?: Maybe<Scalars['String']['output']>;\n displayName: Scalars['String']['output'];\n emailDomains: Array<Scalars['String']['output']>;\n enforced: Scalars['Boolean']['output'];\n lastUsedAt?: Maybe<Scalars['DateTime']['output']>;\n oidc?: Maybe<OidcConfig>;\n organisationId: Scalars['String']['output'];\n provider: SsoProvider;\n saml?: Maybe<SamlConfig>;\n spAcsUrl?: Maybe<Scalars['String']['output']>;\n spEntityId?: Maybe<Scalars['String']['output']>;\n status: SsoConfigStatus;\n updatedAt?: Maybe<Scalars['DateTime']['output']>;\n verifiedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type SsoConfigResponse = {\n __typename?: 'SsoConfigResponse';\n message?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\n/** Status of the SSO configuration */\nexport enum SsoConfigStatus {\n ACTIVE = 'ACTIVE',\n DISABLED = 'DISABLED',\n PENDING = 'PENDING'\n}\n\n/** Type of SSO provider protocol */\nexport enum SsoProvider {\n OIDC = 'OIDC',\n SAML = 'SAML'\n}\n\n/** How long the status should last */\nexport enum StatusDuration {\n DONT_CLEAR = 'DONT_CLEAR',\n FOUR_HOURS = 'FOUR_HOURS',\n ONE_HOUR = 'ONE_HOUR',\n THIRTY_MINUTES = 'THIRTY_MINUTES',\n THIS_WEEK = 'THIS_WEEK',\n TODAY = 'TODAY'\n}\n\nexport type StatusMessage = {\n __typename?: 'StatusMessage';\n emoji?: Maybe<Scalars['String']['output']>;\n expiresAt?: Maybe<Scalars['DateTime']['output']>;\n text?: Maybe<Scalars['String']['output']>;\n type: PresetStatusType;\n};\n\nexport type StripeCard = {\n __typename?: 'StripeCard';\n brand?: Maybe<Scalars['String']['output']>;\n expMonth?: Maybe<Scalars['Float']['output']>;\n expYear?: Maybe<Scalars['Float']['output']>;\n last4?: Maybe<Scalars['String']['output']>;\n};\n\nexport type StripeMetadata = {\n __typename?: 'StripeMetadata';\n accountDisabledAt?: Maybe<Scalars['DateTime']['output']>;\n billingPeriodEnds?: Maybe<Scalars['DateTime']['output']>;\n billingPeriodStart?: Maybe<Scalars['DateTime']['output']>;\n card?: Maybe<StripeCard>;\n customerId?: Maybe<Scalars['String']['output']>;\n lastPlanSwitchAt?: Maybe<Scalars['DateTime']['output']>;\n lastWarningEmailSentAt?: Maybe<Scalars['DateTime']['output']>;\n lastWarningLevel?: Maybe<Scalars['String']['output']>;\n nextPlanEffectiveAt?: Maybe<Scalars['DateTime']['output']>;\n nextPlanId?: Maybe<Scalars['String']['output']>;\n paymentFailedAt?: Maybe<Scalars['DateTime']['output']>;\n paymentMethodType?: Maybe<Scalars['String']['output']>;\n previousLimits?: Maybe<StripePreviousLimits>;\n previousPlan?: Maybe<Scalars['String']['output']>;\n subscriptionCreatedAt?: Maybe<Scalars['DateTime']['output']>;\n subscriptionId?: Maybe<Scalars['String']['output']>;\n subscriptionStatus?: Maybe<StripeSubscriptionStatus>;\n subscriptionUpdatedAt?: Maybe<Scalars['DateTime']['output']>;\n trialPeriodEnds?: Maybe<Scalars['DateTime']['output']>;\n trialPeriodFirstStartedAt?: Maybe<Scalars['DateTime']['output']>;\n trialPeriodStart?: Maybe<Scalars['DateTime']['output']>;\n trialPeriodTotalDays?: Maybe<Scalars['Float']['output']>;\n trialPeriodUsedDays?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type StripePreviousLimits = {\n __typename?: 'StripePreviousLimits';\n aiLimit: Scalars['Float']['output'];\n bots: Scalars['Float']['output'];\n opsLimit: Scalars['Float']['output'];\n};\n\nexport enum StripeSubscriptionStatus {\n ACTIVE = 'Active',\n CANCELED = 'Canceled',\n INCOMPLETE = 'Incomplete',\n INCOMPLETEEXPIRED = 'IncompleteExpired',\n PASTDUE = 'PastDue',\n PAUSED = 'Paused',\n TRIALING = 'Trialing',\n UNPAID = 'Unpaid'\n}\n\nexport type SubmitFeedbackInput = {\n category: FeedbackCategory;\n content: Scalars['String']['input'];\n isFeatureRequest?: InputMaybe<Scalars['Boolean']['input']>;\n /** Pre-uploaded media IDs */\n mediaIds?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Rating 1-5 stars */\n rating?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type Subscription = {\n __typename?: 'Subscription';\n aiRequestLogged: AiRequestLog;\n /** Per-contact dispatch outcome stream for one broadcast, mirroring the paginated history row shape. */\n broadcastDispatchLogged: BroadcastHistoryEntry;\n /** Broadcast document updates: status transitions + counter rollups. */\n broadcastUpdated: Broadcast;\n chat: ChatSubscriptionPayload;\n /** Server-emitted activity transitions for a chat (AI generation, contact typing). Each event is a full snapshot, not a delta. */\n chatActivitySubscription: ChatActivity;\n collectionMembership: CollectionMembershipPayload;\n collectionUpdate: CollectionUpdatePayload;\n /** Per-user feed of @-mention events: CREATED (new mention), READ (state change), REMOVED (un-mentioned via edit), DELETED (note soft-deleted). */\n mentionReceived: MentionEvent;\n message: MessageSubscriptionPayload;\n /** Subscribe to organisation notifications (chat counts, user status, etc.) */\n notifications: NotificationsPayload;\n organisationUpdated: OrganisationUpdatePayload;\n usageUpdated: UsageUpdatedPayload;\n /** Subscribe to personal user notifications (team invites, role changes, etc.) */\n userNotifications: NotificationsPayload;\n webhookInboundReceived: WebhookInboundLog;\n webhookOutboundDispatched: WebhookDeliveryLog;\n webhookSchemaCapture: WebhookSchemaCaptureStatus;\n};\n\n\nexport type SubscriptionAiRequestLoggedArgs = {\n assistantId: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionBroadcastDispatchLoggedArgs = {\n broadcastId: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionChatArgs = {\n collectionIdOrSlug?: InputMaybe<Scalars['String']['input']>;\n organisationSlug: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionChatActivitySubscriptionArgs = {\n chatId: Scalars['ID']['input'];\n};\n\n\nexport type SubscriptionCollectionMembershipArgs = {\n organisationSlug: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionCollectionUpdateArgs = {\n organisationSlug: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionMentionReceivedArgs = {\n userId: Scalars['ID']['input'];\n};\n\n\nexport type SubscriptionMessageArgs = {\n chatId: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionOrganisationUpdatedArgs = {\n organisationSlug: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionUsageUpdatedArgs = {\n organisationSlug: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionWebhookInboundReceivedArgs = {\n connectionId: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionWebhookOutboundDispatchedArgs = {\n connectionId: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionWebhookSchemaCaptureArgs = {\n connectionId: Scalars['String']['input'];\n};\n\nexport type SubscriptionEmailsResponse = {\n __typename?: 'SubscriptionEmailsResponse';\n emails: Array<Scalars['String']['output']>;\n total: Scalars['Int']['output'];\n};\n\nexport type SupportStats = {\n __typename?: 'SupportStats';\n clarificationNeededTickets: Scalars['Int']['output'];\n closedTickets: Scalars['Int']['output'];\n inProgressTickets: Scalars['Int']['output'];\n openTickets: Scalars['Int']['output'];\n pendingApprovals: Scalars['Int']['output'];\n resolvedTickets: Scalars['Int']['output'];\n totalTickets: Scalars['Int']['output'];\n unassignedTickets: Scalars['Int']['output'];\n unprocessedFeedback: Scalars['Int']['output'];\n};\n\nexport type SupportTicket = {\n __typename?: 'SupportTicket';\n _id: Scalars['String']['output'];\n assignedTo?: Maybe<User>;\n commentCount: Scalars['Float']['output'];\n createdAt: Scalars['DateTime']['output'];\n createdBy: User;\n description: Scalars['String']['output'];\n kanbanOrder?: Maybe<Scalars['String']['output']>;\n lastActivityAt?: Maybe<Scalars['DateTime']['output']>;\n media?: Maybe<Array<Media>>;\n metadata?: Maybe<SupportTicketMetadata>;\n priority: SupportTicketPriority;\n resolution?: Maybe<Scalars['String']['output']>;\n resolvedAt?: Maybe<Scalars['DateTime']['output']>;\n resolvedBy?: Maybe<User>;\n sourceOrganisation?: Maybe<Organisation>;\n status: SupportTicketStatus;\n subject: Scalars['String']['output'];\n tags?: Maybe<Array<Scalars['String']['output']>>;\n type: SupportTicketType;\n updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type SupportTicketComment = {\n __typename?: 'SupportTicketComment';\n _id: Scalars['String']['output'];\n author: User;\n content: Scalars['String']['output'];\n createdAt: Scalars['DateTime']['output'];\n isFromSupport: Scalars['Boolean']['output'];\n isInternal: Scalars['Boolean']['output'];\n media?: Maybe<Array<Media>>;\n ticket: SupportTicket;\n updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type SupportTicketMetadata = {\n __typename?: 'SupportTicketMetadata';\n appVersion?: Maybe<Scalars['String']['output']>;\n screenSize?: Maybe<Scalars['String']['output']>;\n url?: Maybe<Scalars['String']['output']>;\n userAgent?: Maybe<Scalars['String']['output']>;\n};\n\nexport type SupportTicketMetadataInput = {\n appVersion?: InputMaybe<Scalars['String']['input']>;\n screenSize?: InputMaybe<Scalars['String']['input']>;\n url?: InputMaybe<Scalars['String']['input']>;\n userAgent?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Priority level of a support ticket */\nexport enum SupportTicketPriority {\n HIGH = 'HIGH',\n LOW = 'LOW',\n MEDIUM = 'MEDIUM',\n URGENT = 'URGENT'\n}\n\n/** Status of a support ticket */\nexport enum SupportTicketStatus {\n CLARIFICATION_NEEDED = 'CLARIFICATION_NEEDED',\n CLOSED = 'CLOSED',\n IN_PROGRESS = 'IN_PROGRESS',\n OPEN = 'OPEN',\n RESOLVED = 'RESOLVED'\n}\n\n/** Type of support ticket */\nexport enum SupportTicketType {\n BUG_REPORT = 'BUG_REPORT',\n FEATURE_REQUEST = 'FEATURE_REQUEST',\n OTHER = 'OTHER',\n QUESTION = 'QUESTION'\n}\n\nexport type SwitchInlineQueryChosenChatConfig = {\n __typename?: 'SwitchInlineQueryChosenChatConfig';\n /** Allow private chats with bots */\n allowBotChats?: Maybe<Scalars['Boolean']['output']>;\n /** Allow channel chats */\n allowChannelChats?: Maybe<Scalars['Boolean']['output']>;\n /** Allow group and supergroup chats */\n allowGroupChats?: Maybe<Scalars['Boolean']['output']>;\n /** Allow private chats with users */\n allowUserChats?: Maybe<Scalars['Boolean']['output']>;\n /** Default inline query to insert */\n query?: Maybe<Scalars['String']['output']>;\n};\n\nexport type SwitchPlanInput = {\n targetPriceId: Scalars['String']['input'];\n};\n\nexport type SystemAssignInfo = {\n __typename?: 'SystemAssignInfo';\n /** Operator who performed the manual assignment (when initiator is OPERATOR) */\n assignedBy?: Maybe<User>;\n /** Operator the chat was assigned to */\n assignedTo?: Maybe<User>;\n /** Who initiated the assignment */\n initiator: AssignmentInitiator;\n /** Previous operator (for reassignment) */\n previousOperator?: Maybe<User>;\n};\n\nexport type SystemFlowInfo = {\n __typename?: 'SystemFlowInfo';\n /** Execution context ID */\n executionId?: Maybe<Scalars['String']['output']>;\n /** Flow MongoDB ID */\n flowId: Scalars['String']['output'];\n /** Human-readable flow title */\n flowTitle: Scalars['String']['output'];\n /** Who initiated or terminated the flow */\n initiator?: Maybe<FlowInitiator>;\n /** Operator who started/stopped the flow (when initiator is OPERATOR) */\n operator?: Maybe<User>;\n};\n\nexport type SystemLoginInfo = {\n __typename?: 'SystemLoginInfo';\n /** Domain the user logged in from */\n domain?: Maybe<Scalars['String']['output']>;\n /** First name of the user */\n firstName: Scalars['String']['output'];\n lastName?: Maybe<Scalars['String']['output']>;\n /** User photo URL */\n photoUrl?: Maybe<Scalars['String']['output']>;\n /** Telegram user ID */\n userId: Scalars['Float']['output'];\n username?: Maybe<Scalars['String']['output']>;\n};\n\nexport type SystemMessageInfo = {\n __typename?: 'SystemMessageInfo';\n /** Assignment details (for CHAT_ASSIGNED, CHAT_UNASSIGNED types) */\n assign?: Maybe<SystemAssignInfo>;\n /** Shared chat (for CHAT_SHARED type) */\n chat?: Maybe<Chat>;\n /** Shared user chats (for USERS_SHARED type) */\n contacts?: Maybe<Array<Chat>>;\n /** Flow details (for FLOW_STARTED, FLOW_COMPLETED, FLOW_TIMEOUT, FLOW_LOOP_DETECTED types) */\n flow?: Maybe<SystemFlowInfo>;\n /** Login details (for LOGIN type) */\n login?: Maybe<SystemLoginInfo>;\n /** Referenced message (for PIN/UNPIN types) */\n message?: Maybe<Message>;\n /** Spam protection details (for USER_SPAM_BLOCKED, USER_SPAM_UNBLOCKED, OUTBOUND_PAUSED, OUTBOUND_RESUMED) */\n spam?: Maybe<SystemSpamInfo>;\n /** Status change details (for CHAT_CLOSED, CHAT_REOPENED types) */\n statusChange?: Maybe<SystemStatusChangeInfo>;\n /** System event type */\n type: SystemMessageType;\n};\n\n/** Type of system/service message */\nexport enum SystemMessageType {\n CHAT_ASSIGNED = 'CHAT_ASSIGNED',\n CHAT_CLOSED = 'CHAT_CLOSED',\n CHAT_REOPENED = 'CHAT_REOPENED',\n CHAT_SHARED = 'CHAT_SHARED',\n CHAT_UNASSIGNED = 'CHAT_UNASSIGNED',\n CONTACT_CREATED = 'CONTACT_CREATED',\n FLOW_CANCELLED = 'FLOW_CANCELLED',\n FLOW_COMPLETED = 'FLOW_COMPLETED',\n FLOW_LOOP_DETECTED = 'FLOW_LOOP_DETECTED',\n FLOW_STARTED = 'FLOW_STARTED',\n FLOW_TIMEOUT = 'FLOW_TIMEOUT',\n LOGIN = 'LOGIN',\n OUTBOUND_PAUSED = 'OUTBOUND_PAUSED',\n OUTBOUND_RESUMED = 'OUTBOUND_RESUMED',\n PIN = 'PIN',\n SUB_FLOW_CANCELLED = 'SUB_FLOW_CANCELLED',\n SUB_FLOW_COMPLETED = 'SUB_FLOW_COMPLETED',\n SUB_FLOW_STARTED = 'SUB_FLOW_STARTED',\n SUB_FLOW_TIMEOUT = 'SUB_FLOW_TIMEOUT',\n UNPIN = 'UNPIN',\n USERS_SHARED = 'USERS_SHARED',\n USER_SPAM_BLOCKED = 'USER_SPAM_BLOCKED',\n USER_SPAM_UNBLOCKED = 'USER_SPAM_UNBLOCKED'\n}\n\nexport type SystemSpamInfo = {\n __typename?: 'SystemSpamInfo';\n /** Block duration in minutes (for BLOCK_TEMP) */\n blockDurationMinutes?: Maybe<Scalars['Float']['output']>;\n /** Block mode at the time of the event (for blocked events) */\n blockMode?: Maybe<SpamBlockMode>;\n /** When the spam action was triggered */\n blockedAt?: Maybe<Scalars['DateTime']['output']>;\n /** Who triggered the action: SYSTEM (automatic) or OPERATOR (manual) */\n initiator: SpamBlockInitiator;\n /** Operator who manually blocked/unblocked/resumed (when initiator is OPERATOR) */\n operator?: Maybe<User>;\n /** Human-readable reason for the spam event */\n reason: Scalars['String']['output'];\n};\n\nexport type SystemStatusChangeInfo = {\n __typename?: 'SystemStatusChangeInfo';\n /** Operator who changed the status (when initiator is OPERATOR) */\n changedBy?: Maybe<User>;\n /** Who initiated the status change (SYSTEM or OPERATOR) */\n initiator: AssignmentInitiator;\n /** New ChatStatus value */\n newStatus: Scalars['String']['output'];\n /** Previous ChatStatus value */\n previousStatus: Scalars['String']['output'];\n};\n\n/** Operator TTS defaults (per-org) */\nexport type TtsPreferences = {\n __typename?: 'TTSPreferences';\n /** Default speech style instructions for gpt-4o-mini-tts (e.g. \"Speak in a cheerful tone\") */\n instructions?: Maybe<Scalars['String']['output']>;\n /** Preferred TTS model, e.g. tts-1, tts-1-hd */\n model?: Maybe<Scalars['String']['output']>;\n /** Default speed 0.25–4.0 (default 1.0) */\n speed?: Maybe<Scalars['Float']['output']>;\n /** Preferred TTS voice: built-in (alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse, marin, cedar) */\n voice?: Maybe<Scalars['String']['output']>;\n};\n\n/** Input for TTS preferences */\nexport type TtsPreferencesInput = {\n /** Default speech style instructions for gpt-4o-mini-tts */\n instructions?: InputMaybe<Scalars['String']['input']>;\n model?: InputMaybe<Scalars['String']['input']>;\n speed?: InputMaybe<Scalars['Float']['input']>;\n voice?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** A Telegram bot command (slash command) */\nexport type TelegramBotCommand = {\n __typename?: 'TelegramBotCommand';\n /** Command name without the leading slash (e.g. \"start\") */\n command: Scalars['String']['output'];\n /** Command description (1-256 chars) */\n description: Scalars['String']['output'];\n};\n\n/** A bot command to set */\nexport type TelegramBotCommandInput = {\n /** Command name: 1-32 lowercase latin letters, digits or underscores */\n command: Scalars['String']['input'];\n /** Command description: 1-256 characters */\n description: Scalars['String']['input'];\n};\n\n/** Complete Telegram bot settings for an integration */\nexport type TelegramBotSettings = {\n __typename?: 'TelegramBotSettings';\n /** Bot commands list */\n commands: Array<TelegramBotCommand>;\n /** Bot description (shown on empty chat screen, up to 512 chars) */\n description: Scalars['String']['output'];\n /** Chat menu button configuration */\n menuButton: TelegramMenuButton;\n /** Bot display name */\n name: Scalars['String']['output'];\n /** Short description (profile page, up to 120 chars) */\n shortDescription: Scalars['String']['output'];\n /** ISO timestamp of last sync from Telegram API */\n syncedAt: Scalars['String']['output'];\n};\n\n/** Telegram chat menu button configuration */\nexport type TelegramMenuButton = {\n __typename?: 'TelegramMenuButton';\n /** Button text (only for web_app type) */\n text?: Maybe<Scalars['String']['output']>;\n /** Menu button type */\n type: TelegramMenuButtonType;\n /** Mini App URL (only for web_app type) */\n webAppUrl?: Maybe<Scalars['String']['output']>;\n};\n\n/** Set the chat menu button */\nexport type TelegramMenuButtonInput = {\n /** Button text (required for web_app) */\n text?: InputMaybe<Scalars['String']['input']>;\n /** Menu button type */\n type: TelegramMenuButtonType;\n /** Mini App URL (required for web_app, must be HTTPS) */\n webAppUrl?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Telegram chat menu button type */\nexport enum TelegramMenuButtonType {\n /** Shows the bot command list menu */\n COMMANDS = 'COMMANDS',\n /** Default Telegram behaviour */\n DEFAULT = 'DEFAULT',\n /** Opens a Mini App URL */\n WEB_APP = 'WEB_APP'\n}\n\nexport type TemplateApproval = {\n __typename?: 'TemplateApproval';\n _id: Scalars['String']['output'];\n createdAt: Scalars['DateTime']['output'];\n history?: Maybe<Array<ApprovalHistoryEntry>>;\n requestedBy: Organisation;\n reviewNotes?: Maybe<Scalars['String']['output']>;\n reviewedAt?: Maybe<Scalars['DateTime']['output']>;\n reviewedBy?: Maybe<User>;\n status: TemplateApprovalStatus;\n submittedBy: User;\n template: FlowTemplate;\n updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type TemplateApprovalInfo = {\n __typename?: 'TemplateApprovalInfo';\n reason?: Maybe<Scalars['String']['output']>;\n reviewedAt?: Maybe<Scalars['DateTime']['output']>;\n reviewedBy?: Maybe<Scalars['String']['output']>;\n status: TemplateApprovalStatus;\n};\n\n/** Status of a template approval request */\nexport enum TemplateApprovalStatus {\n APPROVED = 'APPROVED',\n CHANGES_REQUESTED = 'CHANGES_REQUESTED',\n PENDING = 'PENDING',\n REJECTED = 'REJECTED'\n}\n\nexport type TemplateCardButton = {\n __typename?: 'TemplateCardButton';\n /** Button text/label */\n label: Scalars['String']['output'];\n /** Button type: url, quick_reply, phone_number, copy_code */\n type: Scalars['String']['output'];\n /** URL or phone number value */\n value?: Maybe<Scalars['String']['output']>;\n};\n\nexport type TemplateCardPreview = {\n __typename?: 'TemplateCardPreview';\n /** Body text with variables resolved */\n bodyText?: Maybe<Scalars['String']['output']>;\n /** Number of buttons on card */\n buttonCount?: Maybe<Scalars['Int']['output']>;\n /** Buttons on this card */\n buttons?: Maybe<Array<TemplateCardButton>>;\n /** Card index (0-9) */\n cardIndex: Scalars['Int']['output'];\n /** Header format: IMAGE, VIDEO, PRODUCT */\n headerFormat?: Maybe<Scalars['String']['output']>;\n /** Header media for this card (IMAGE or VIDEO) */\n media?: Maybe<Media>;\n /**\n * Media URL for card header (if media)\n * @deprecated Use media field instead\n */\n mediaUrl?: Maybe<Scalars['String']['output']>;\n};\n\n/** Template creation permission levels */\nexport enum TemplateCreationLevel {\n ALL = 'ALL',\n NONE = 'NONE',\n PRIVATE_ONLY = 'PRIVATE_ONLY'\n}\n\nexport type TemplateCustomFieldMigration = {\n __typename?: 'TemplateCustomFieldMigration';\n defaultValue?: Maybe<Scalars['JSON']['output']>;\n description?: Maybe<Scalars['String']['output']>;\n isRequired: Scalars['Boolean']['output'];\n isSystemField: Scalars['Boolean']['output'];\n key: Scalars['String']['output'];\n name: Scalars['String']['output'];\n options?: Maybe<Array<Scalars['String']['output']>>;\n type: FieldType;\n visibility: FieldVisibility;\n};\n\nexport type TemplateInfo = {\n __typename?: 'TemplateInfo';\n /** Total number of carousel cards */\n cardCount?: Maybe<Scalars['Int']['output']>;\n /** Carousel cards preview (2-10 cards) */\n cards?: Maybe<Array<TemplateCardPreview>>;\n /** Catalog ID for product */\n catalogId?: Maybe<Scalars['String']['output']>;\n /** Template category: MARKETING, UTILITY, AUTHENTICATION */\n category?: Maybe<Scalars['String']['output']>;\n /** Footer text */\n footerText?: Maybe<Scalars['String']['output']>;\n /** Header format: TEXT, IMAGE, VIDEO, DOCUMENT, LOCATION, PRODUCT */\n headerFormat?: Maybe<Scalars['String']['output']>;\n /** Header text (for TEXT headers) */\n headerText?: Maybe<Scalars['String']['output']>;\n /** Location data for LOCATION header format */\n location?: Maybe<TemplateLocationInfo>;\n /** Limited-Time Offer info (countdown timer) */\n ltoInfo?: Maybe<TemplateLtoInfo>;\n /** Product SKU for PRODUCT header */\n productRetailerId?: Maybe<Scalars['String']['output']>;\n /** Whether this template uses catalog products (MPM/SPM) */\n usesCatalog?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type TemplateLocationInfo = {\n __typename?: 'TemplateLocationInfo';\n /** Street address */\n address?: Maybe<Scalars['String']['output']>;\n /** Latitude coordinate */\n latitude: Scalars['Float']['output'];\n /** Longitude coordinate */\n longitude: Scalars['Float']['output'];\n /** Location name */\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type TemplateLtoInfo = {\n __typename?: 'TemplateLtoInfo';\n /** Formatted expiration date/time */\n expirationText?: Maybe<Scalars['String']['output']>;\n /** Expiration timestamp (ms) when sent */\n expirationTimeMs?: Maybe<Scalars['Float']['output']>;\n /** Whether the LTO component is present */\n hasExpiration: Scalars['Boolean']['output'];\n};\n\nexport type TemplateMigrations = {\n __typename?: 'TemplateMigrations';\n customFields?: Maybe<Array<TemplateCustomFieldMigration>>;\n};\n\nexport type TemplateRoute = {\n __typename?: 'TemplateRoute';\n integrationId: Scalars['String']['output'];\n templateId: Scalars['String']['output'];\n};\n\nexport type TemplateRouteInput = {\n integrationId: Scalars['String']['input'];\n templateId: Scalars['String']['input'];\n};\n\nexport type TemplateVariableOverrides = {\n /** Body variable values in order: {{1}}, {{2}}, {{3}}, etc. */\n body?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Button variable values (e.g., URL suffix for dynamic URL buttons) */\n buttons?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Overrides for carousel template cards. Each card can have its own header media and body variables. */\n carouselCards?: InputMaybe<Array<CarouselCardOverride>>;\n /** Expiration timestamp (Unix ms) for LIMITED_TIME_OFFER templates. Required when the template has a countdown timer (hasExpiration: true). */\n expirationTimeMs?: InputMaybe<Scalars['Float']['input']>;\n /** Header variable values ({{1}} for text headers). For media headers, use headerMediaId instead. */\n header?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Media ID for IMAGE/VIDEO/DOCUMENT headers. Overrides the template defaultMedia. Must be a valid Media document ID. */\n headerMediaId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TenantConfigResult = {\n __typename?: 'TenantConfigResult';\n /** Number of documents deleted from the source DB (null if no cleanup) */\n deletedFromSource?: Maybe<Scalars['Int']['output']>;\n /** Whether this org now has a dedicated MongoDB database */\n hasCustomDatabase: Scalars['Boolean']['output'];\n /** Whether this org now has a dedicated Redis instance */\n hasCustomRedis: Scalars['Boolean']['output'];\n message: Scalars['String']['output'];\n /** Number of documents migrated to the target DB (null if no migration) */\n migratedDocuments?: Maybe<Scalars['Int']['output']>;\n /** Migration duration in milliseconds (null if no migration) */\n migrationDurationMs?: Maybe<Scalars['Int']['output']>;\n orgId: Scalars['String']['output'];\n orgName: Scalars['String']['output'];\n orgSlug: Scalars['String']['output'];\n success: Scalars['Boolean']['output'];\n};\n\n/** Connection status of the tenant database */\nexport enum TenantDatabaseStatus {\n CONNECTED = 'CONNECTED',\n DISCONNECTED = 'DISCONNECTED',\n SHARED = 'SHARED'\n}\n\n/** How to initialise the target database during tenant setup */\nexport enum TenantMigrationMode {\n FRESH = 'FRESH',\n MIGRATE = 'MIGRATE'\n}\n\n/** Connection status of the tenant Redis instance */\nexport enum TenantRedisStatus {\n CONNECTED = 'CONNECTED',\n DISCONNECTED = 'DISCONNECTED',\n SHARED = 'SHARED'\n}\n\nexport type TenantStatusResult = {\n __typename?: 'TenantStatusResult';\n /** Per-collection status and document counts on the active database */\n collections: Array<CollectionStatus>;\n /** Latency of the database PING in ms (null if shared or disconnected) */\n databaseLatencyMs?: Maybe<Scalars['Int']['output']>;\n /** Current database connection status */\n databaseStatus: TenantDatabaseStatus;\n /** Whether a dedicated MongoDB URI is configured */\n hasCustomDatabase: Scalars['Boolean']['output'];\n /** Whether a dedicated Redis URL is configured */\n hasCustomRedis: Scalars['Boolean']['output'];\n orgId: Scalars['String']['output'];\n orgName: Scalars['String']['output'];\n orgSlug: Scalars['String']['output'];\n /** Latency of the Redis PING in ms (null if shared or disconnected) */\n redisLatencyMs?: Maybe<Scalars['Int']['output']>;\n /** Current Redis connection status */\n redisStatus: TenantRedisStatus;\n /** Total documents across all collections for this org */\n totalDocuments: Scalars['Int']['output'];\n};\n\nexport type TestSsoConnectionResponse = {\n __typename?: 'TestSsoConnectionResponse';\n /** Certificate expiration date */\n certificateExpires?: Maybe<Scalars['String']['output']>;\n /** Whether the certificate is valid */\n certificateValid: Scalars['Boolean']['output'];\n /** Error message if test failed */\n error?: Maybe<Scalars['String']['output']>;\n /** IdP metadata URL (if detected) */\n idpMetadataUrl?: Maybe<Scalars['String']['output']>;\n /** Whether the test was successful */\n success: Scalars['Boolean']['output'];\n};\n\nexport type TestTriggerInput = {\n context: Scalars['JSON']['input'];\n flowId: Scalars['String']['input'];\n};\n\nexport type TextCardData = {\n __typename?: 'TextCardData';\n input?: Maybe<Scalars['String']['output']>;\n};\n\nexport type Thumbnail = {\n __typename?: 'Thumbnail';\n fileId?: Maybe<Scalars['String']['output']>;\n fileSize?: Maybe<Scalars['Float']['output']>;\n fileUniqueId?: Maybe<Scalars['String']['output']>;\n height?: Maybe<Scalars['Float']['output']>;\n url?: Maybe<Scalars['String']['output']>;\n width?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type ThumbnailInput = {\n fileId?: InputMaybe<Scalars['String']['input']>;\n fileSize?: InputMaybe<Scalars['Float']['input']>;\n fileUniqueId?: InputMaybe<Scalars['String']['input']>;\n height?: InputMaybe<Scalars['Float']['input']>;\n url?: InputMaybe<Scalars['String']['input']>;\n width?: InputMaybe<Scalars['Float']['input']>;\n};\n\nexport type TicketCommentsResponse = {\n __typename?: 'TicketCommentsResponse';\n comments: Array<SupportTicketComment>;\n hasMore: Scalars['Boolean']['output'];\n nextCursor?: Maybe<Scalars['String']['output']>;\n};\n\nexport type TicketFilterInput = {\n /** Filter by assigned user ID */\n assignedToId?: InputMaybe<Scalars['String']['input']>;\n cursor?: InputMaybe<Scalars['String']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n priority?: InputMaybe<Array<SupportTicketPriority>>;\n /** Search in subject and description */\n search?: InputMaybe<Scalars['String']['input']>;\n /** Filter by source organisation ID */\n sourceOrganisationId?: InputMaybe<Scalars['String']['input']>;\n status?: InputMaybe<Array<SupportTicketStatus>>;\n type?: InputMaybe<Array<SupportTicketType>>;\n /** Filter unassigned tickets */\n unassigned?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type ToggleReactionInput = {\n emoji?: InputMaybe<Scalars['String']['input']>;\n messageId: Scalars['String']['input'];\n reactionId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TranscriptionSegment = {\n __typename?: 'TranscriptionSegment';\n end: Scalars['Float']['output'];\n start: Scalars['Float']['output'];\n text: Scalars['String']['output'];\n};\n\nexport type TranscriptionWord = {\n __typename?: 'TranscriptionWord';\n end: Scalars['Float']['output'];\n start: Scalars['Float']['output'];\n word: Scalars['String']['output'];\n};\n\nexport type TranslatedTranscription = {\n __typename?: 'TranslatedTranscription';\n language?: Maybe<Scalars['String']['output']>;\n segments?: Maybe<Array<TranscriptionSegment>>;\n text: Scalars['String']['output'];\n translatedAt: Scalars['DateTime']['output'];\n words?: Maybe<Array<TranscriptionWord>>;\n};\n\nexport type TrialInfo = {\n __typename?: 'TrialInfo';\n hasUsedTrial: Scalars['Boolean']['output'];\n isInTrial: Scalars['Boolean']['output'];\n remainingDays: Scalars['Float']['output'];\n totalDays: Scalars['Float']['output'];\n trialEndsAt?: Maybe<Scalars['DateTime']['output']>;\n usedDays: Scalars['Float']['output'];\n};\n\nexport type Trigger = {\n __typename?: 'Trigger';\n _id: Scalars['String']['output'];\n attribute?: Maybe<Array<Scalars['String']['output']>>;\n connectorType?: Maybe<ConnectorType>;\n createdAt: Scalars['DateTime']['output'];\n flowId: Scalars['String']['output'];\n hasDraftChanges: Scalars['Boolean']['output'];\n operator?: Maybe<RuleOperator>;\n organisationId: Scalars['String']['output'];\n pendingDeletion: Scalars['Boolean']['output'];\n publishedAt?: Maybe<Scalars['DateTime']['output']>;\n publishedScheduleConfig?: Maybe<Scalars['JSON']['output']>;\n publishedScheduleType?: Maybe<ScheduleType>;\n scheduleConfig?: Maybe<Scalars['JSON']['output']>;\n scheduleType?: Maybe<ScheduleType>;\n scheduledTimezone?: Maybe<Scalars['String']['output']>;\n type: TriggerType;\n updatedAt: Scalars['DateTime']['output'];\n value?: Maybe<Scalars['String']['output']>;\n webhook?: Maybe<WebhookConnection>;\n webhookId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type TriggerEvaluationResult = {\n __typename?: 'TriggerEvaluationResult';\n context?: Maybe<Scalars['JSON']['output']>;\n matchedTriggers: Array<Scalars['String']['output']>;\n triggered: Scalars['Boolean']['output'];\n};\n\n/** Types of triggers that can be used in flows */\nexport enum TriggerType {\n CATCH_ALL = 'CATCH_ALL',\n FIRST_VISIT = 'FIRST_VISIT',\n MESSAGE_RECEIVED = 'MESSAGE_RECEIVED',\n PROFILE_MATCH = 'PROFILE_MATCH',\n RETURNING_USER = 'RETURNING_USER',\n SCHEDULE_TRIGGERED = 'SCHEDULE_TRIGGERED',\n WEBHOOK_RECEIVED = 'WEBHOOK_RECEIVED',\n WEBSITE_LOGIN = 'WEBSITE_LOGIN'\n}\n\nexport type TwoFactorSetupResponse = {\n __typename?: 'TwoFactorSetupResponse';\n /** QR code as data URL (base64 PNG) for scanning */\n qrCodeDataUrl: Scalars['String']['output'];\n /** Recovery codes for account recovery. Store these securely! */\n recoveryCodes: Array<Scalars['String']['output']>;\n /** Base32-encoded secret for manual entry in authenticator app */\n secret: Scalars['String']['output'];\n};\n\nexport type TwoFactorStatusResponse = {\n __typename?: 'TwoFactorStatusResponse';\n /** Whether 2FA is currently enabled */\n enabled: Scalars['Boolean']['output'];\n /** When 2FA was enabled */\n enabledAt?: Maybe<Scalars['DateTime']['output']>;\n /** Number of unused recovery codes remaining */\n remainingRecoveryCodes: Scalars['Float']['output'];\n};\n\nexport type UnifiedCardDataInput = {\n /** Roles eligible for auto-assignment, in priority order. Defaults to [AGENT] if not provided. */\n allowedRoles?: InputMaybe<Array<Role>>;\n assistantId?: InputMaybe<Scalars['String']['input']>;\n branches?: InputMaybe<Array<ConditionalBranchInput>>;\n /** Template quick_reply button routing. Maps button index (0-based) to nextCardId. */\n buttonRouting?: InputMaybe<Scalars['JSON']['input']>;\n buttons?: InputMaybe<Array<ButtonOptionInput>>;\n connectedTo?: InputMaybe<Scalars['String']['input']>;\n /** Target a specific outbound connection. If omitted, emits to all active connections subscribed to the event or to the `flow` namespace. */\n connectionId?: InputMaybe<Scalars['String']['input']>;\n defaultNextCardId?: InputMaybe<Scalars['String']['input']>;\n description?: InputMaybe<Scalars['String']['input']>;\n errorHandling?: InputMaybe<FetchErrorHandlingInput>;\n /** Custom event suffix. The emitted event is `flow.<eventName>` (e.g. `publish` → `flow.publish`). Blank/omitted → bare `flow`. Allowed chars: [a-zA-Z0-9_.-]. */\n eventName?: InputMaybe<Scalars['String']['input']>;\n field?: InputMaybe<Scalars['String']['input']>;\n /** List of field updates to perform in the CRM */\n fieldUpdates?: InputMaybe<Array<CrmFieldUpdateInput>>;\n flowId?: InputMaybe<Scalars['String']['input']>;\n input?: InputMaybe<Scalars['String']['input']>;\n inputType?: InputMaybe<Scalars['String']['input']>;\n /** Style instructions for TTS model (for models that support it) */\n instructions?: InputMaybe<Scalars['String']['input']>;\n /** Integration ID of the CRM integration to use */\n integrationId?: InputMaybe<Scalars['String']['input']>;\n keyboardType?: InputMaybe<KeyboardButtonType>;\n /** Flat list of selectable rows. Max 10 rows. */\n list?: InputMaybe<Array<WaListRowInput>>;\n /** Button label text that opens the list. Max 20 chars. */\n listText?: InputMaybe<Scalars['String']['input']>;\n /** Max number of active assigned chats before an operator is considered overloaded. Defaults to 10. */\n maxChatsPerOperator?: InputMaybe<Scalars['Float']['input']>;\n /** Max conversation turns before force-exit (default: 50) */\n maxTurns?: InputMaybe<Scalars['Float']['input']>;\n media?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Memory settings: { type: \"conversation\" | \"none\", lookbackHours?: number } */\n memory?: InputMaybe<Scalars['JSON']['input']>;\n /** Assignment mode: \"auto\" (smart auto-assign) or \"specific\" (specific operator) */\n mode?: InputMaybe<Scalars['String']['input']>;\n name?: InputMaybe<Scalars['String']['input']>;\n onError?: InputMaybe<Scalars['String']['input']>;\n onSuccess?: InputMaybe<Scalars['String']['input']>;\n /** Operator (User) ID. In \"specific\" mode — the operator to assign. In \"auto\" mode — fallback operator if no one is available via smart assign. */\n operatorId?: InputMaybe<Scalars['String']['input']>;\n /** Raw JSON string used as the outbound event payload. Supports {{variable}} interpolation before parsing. Authored in a Monaco JSON editor. */\n payload?: InputMaybe<Scalars['String']['input']>;\n /** Product-specific overrides for SPM, MPM, and catalog templates. */\n productOverrides?: InputMaybe<WaTemplateProductOverridesInput>;\n /** Product retailer ID (SKU) of the product to display */\n productRetailerId?: InputMaybe<Scalars['String']['input']>;\n /** Flat list of products for MPM. Max 30 items. */\n products?: InputMaybe<Array<WaProductItemInput>>;\n question?: InputMaybe<Scalars['String']['input']>;\n request?: InputMaybe<FetchRequestInput>;\n responseMapping?: InputMaybe<Array<ResponseMappingInput>>;\n /** WAIT_TIMEOUT_CARD: number of re-sends of the preceding card before final timeout. Default 0. Max 10. Not allowed for AI_AGENT / WA_CATALOG / WA_PRODUCT / WA_PRODUCTS cards. */\n retries?: InputMaybe<Scalars['Float']['input']>;\n retryLimit?: InputMaybe<Scalars['Float']['input']>;\n /** WAIT_TIMEOUT_CARD: when true (and `input` is set), the preceding card is re-sent after the nudge text on each retry. Default false. */\n retryResendCard?: InputMaybe<Scalars['Boolean']['input']>;\n /** Speech speed: 0.25 - 4.0 (default: 1.0) */\n speed?: InputMaybe<Scalars['Float']['input']>;\n storeResultsIn?: InputMaybe<Scalars['String']['input']>;\n /** Error message shown when user tries to interact with completed flow in strict mode. If not set, user input is silently ignored. */\n strictModeErrorMessage?: InputMaybe<Scalars['String']['input']>;\n /** Template ID (MongoDB ObjectId of stored WhatsApp template) */\n templateId?: InputMaybe<Scalars['String']['input']>;\n /** Product retailer ID for catalog thumbnail. If omitted, first catalog item is used. */\n thumbnailProductRetailerId?: InputMaybe<Scalars['String']['input']>;\n timeout?: InputMaybe<Scalars['Float']['input']>;\n timeoutMessage?: InputMaybe<Scalars['String']['input']>;\n /** Seconds before the wait fires. Validation bounds depend on the card type: WAIT_TIMEOUT_CARD accepts 60s – 30 days (2_592_000); WAIT_CARD accepts 5s – 1800s (30 min). */\n timeoutSeconds?: InputMaybe<Scalars['Float']['input']>;\n value?: InputMaybe<Scalars['JSON']['input']>;\n variableName?: InputMaybe<Scalars['String']['input']>;\n /** Variable overrides for template components. Values support {{variable}} interpolation. */\n variableOverrides?: InputMaybe<WaTemplateVariableOverridesInput>;\n /** TTS voice: alloy, echo, fable, onyx, nova, shimmer */\n voice?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateAiAssistantInput = {\n /** Assistant context configuration */\n context?: InputMaybe<AiAssistantContextInput>;\n /** Custom model name (required when model is CUSTOM) */\n customModel?: InputMaybe<Scalars['String']['input']>;\n /** Integration ID for AI provider */\n integrationId?: InputMaybe<Scalars['String']['input']>;\n /** Whether this assistant is active */\n isActive?: InputMaybe<Scalars['Boolean']['input']>;\n /** Set as default assistant for the organization */\n isDefault?: InputMaybe<Scalars['Boolean']['input']>;\n /** Knowledge base media file ID for this assistant */\n knowledgeBase?: InputMaybe<Scalars['String']['input']>;\n /** AI model configuration object */\n model?: InputMaybe<ModelInfoInput>;\n /** Per-purpose model slots (image, tts, transcription, vision) */\n modelSlots?: InputMaybe<ModelSlotsInput>;\n /** Human-readable name for the assistant */\n name?: InputMaybe<Scalars['String']['input']>;\n /** Advanced AI settings */\n settings?: InputMaybe<AiAssistantSettingsInput>;\n};\n\nexport type UpdateBroadcastInput = {\n audienceFilter?: InputMaybe<Array<AudienceFilterConditionInput>>;\n flowId?: InputMaybe<Scalars['String']['input']>;\n integrationIds?: InputMaybe<Array<Scalars['String']['input']>>;\n name?: InputMaybe<Scalars['String']['input']>;\n scheduledAt?: InputMaybe<Scalars['DateTime']['input']>;\n templateRoutes?: InputMaybe<Array<TemplateRouteInput>>;\n timezone?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateCardInput = {\n /** Async execution configuration for cards that perform async operations (CRM_CARD, AI_TEXT_CARD, FETCH_CARD, etc.). Controls background execution and error/timeout handling. */\n async?: InputMaybe<AsyncCardConfigInput>;\n data?: InputMaybe<UnifiedCardDataInput>;\n /** Integration ID for this card. Used by WA card types to select the WhatsApp Business account. */\n integrationId?: InputMaybe<Scalars['String']['input']>;\n isActive?: InputMaybe<Scalars['Boolean']['input']>;\n nextCardId?: InputMaybe<Scalars['String']['input']>;\n position?: InputMaybe<CardPositionInput>;\n size?: InputMaybe<CardSizeInput>;\n /** Error message shown when user tries to interact with completed flow in strict mode. If not set, user input is silently ignored. */\n strictModeErrorMessage?: InputMaybe<Scalars['String']['input']>;\n title?: InputMaybe<Scalars['String']['input']>;\n type?: InputMaybe<CardType>;\n /** WhatsApp-specific configuration (header/footer text) for WA card types. */\n wa?: InputMaybe<WhatsAppCardConfigInput>;\n};\n\nexport type UpdateChatCollectionInput = {\n color?: InputMaybe<Scalars['String']['input']>;\n description?: InputMaybe<Scalars['String']['input']>;\n icon?: InputMaybe<Scalars['String']['input']>;\n isVisible?: InputMaybe<Scalars['Boolean']['input']>;\n name?: InputMaybe<Scalars['String']['input']>;\n rules?: InputMaybe<Array<CollectionRuleInput>>;\n slug?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateChatFieldInput = {\n chatId: Scalars['String']['input'];\n field: ChatFieldKey;\n /** Value can be string, number, boolean, or null */\n value?: InputMaybe<Scalars['JSON']['input']>;\n};\n\nexport type UpdateContactCardData = {\n __typename?: 'UpdateContactCardData';\n /** Profile field key to update (e.g., name, email, phone, or custom field key) */\n field?: Maybe<Scalars['String']['output']>;\n /** Value to set for the field (supports variable interpolation like {{flow.cardId}}) */\n value?: Maybe<Scalars['JSON']['output']>;\n};\n\nexport type UpdateContactRequestInput = {\n assignedTo?: InputMaybe<Scalars['ID']['input']>;\n id: Scalars['ID']['input'];\n internalNotes?: InputMaybe<Scalars['String']['input']>;\n status?: InputMaybe<ContactStatus>;\n};\n\nexport type UpdateDataRetentionInput = {\n /** Delete associated media when a message is deleted. */\n deleteMediaWithMessage?: InputMaybe<Scalars['Boolean']['input']>;\n /** Number of days to retain media files. null = follow message retention. */\n mediaRetentionDays?: InputMaybe<Scalars['Int']['input']>;\n /** Number of days to retain messages. -1 for infinite (enterprise only). null to use plan default. Must be within plan limits. */\n messageRetentionDays?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type UpdateFieldDefinitionDto = {\n defaultValue?: InputMaybe<Scalars['JSON']['input']>;\n description?: InputMaybe<Scalars['String']['input']>;\n displayOrder?: InputMaybe<Scalars['Float']['input']>;\n isRequired?: InputMaybe<Scalars['Boolean']['input']>;\n key?: InputMaybe<Scalars['String']['input']>;\n name?: InputMaybe<Scalars['String']['input']>;\n options?: InputMaybe<Array<Scalars['String']['input']>>;\n type?: InputMaybe<Scalars['String']['input']>;\n visibility?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateFlowInput = {\n description?: InputMaybe<Scalars['String']['input']>;\n executeTimeoutMinutes?: InputMaybe<Scalars['Float']['input']>;\n /** Specific integration IDs this flow runs on (when runOnAllIntegrations is false) */\n integrationIds?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Whether this flow runs on all bots or only specific ones */\n runOnAllIntegrations?: InputMaybe<Scalars['Boolean']['input']>;\n start?: InputMaybe<Scalars['String']['input']>;\n status?: InputMaybe<FlowStatus>;\n /** Strict mode (true): Linear flow execution, prevents re-interaction after completion. Non-strict mode (false): Allows navigation and re-interaction even after flow completes. */\n strictMode?: InputMaybe<Scalars['Boolean']['input']>;\n /** Error message shown when user tries to interact with completed flow in strict mode. If not set, user input is silently ignored. */\n strictModeErrorMessage?: InputMaybe<Scalars['String']['input']>;\n title?: InputMaybe<Scalars['String']['input']>;\n triggerPosition?: InputMaybe<CardPositionInput>;\n};\n\nexport type UpdateFlowTemplateInput = {\n category?: InputMaybe<FlowTemplateCategory>;\n changelog?: InputMaybe<Array<Scalars['String']['input']>>;\n description?: InputMaybe<Scalars['String']['input']>;\n icon?: InputMaybe<Scalars['String']['input']>;\n isActive?: InputMaybe<Scalars['Boolean']['input']>;\n tags?: InputMaybe<Array<Scalars['String']['input']>>;\n thumbnailId?: InputMaybe<Scalars['String']['input']>;\n title?: InputMaybe<Scalars['String']['input']>;\n version?: InputMaybe<Scalars['String']['input']>;\n visibility?: InputMaybe<FlowTemplateVisibility>;\n};\n\nexport type UpdateHelpArticleInput = {\n authorIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n canonicalUrl?: InputMaybe<Scalars['String']['input']>;\n content?: InputMaybe<Scalars['String']['input']>;\n contentFormat?: InputMaybe<HelpArticleContentFormat>;\n coverImageUrl?: InputMaybe<Scalars['ID']['input']>;\n excerpt?: InputMaybe<Scalars['String']['input']>;\n folderId?: InputMaybe<Scalars['ID']['input']>;\n locale?: InputMaybe<Scalars['String']['input']>;\n order?: InputMaybe<Scalars['Int']['input']>;\n slug?: InputMaybe<Scalars['String']['input']>;\n tagIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n title?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateHelpFolderInput = {\n description?: InputMaybe<Scalars['String']['input']>;\n descriptionI18n?: InputMaybe<Scalars['JSON']['input']>;\n name?: InputMaybe<Scalars['String']['input']>;\n nameI18n?: InputMaybe<Scalars['JSON']['input']>;\n order?: InputMaybe<Scalars['Int']['input']>;\n slug?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateHelpTagInput = {\n description?: InputMaybe<Scalars['String']['input']>;\n label?: InputMaybe<Scalars['String']['input']>;\n labelI18n?: InputMaybe<Scalars['JSON']['input']>;\n slug?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateIntegrationFieldMappingsInput = {\n /** Field mappings between local fields and external CRM fields. Use integrationExternalSchema query to get available external fields. */\n fieldMappings: Array<CrmFieldMappingInput>;\n};\n\nexport type UpdateIntegrationInput = {\n /** API key or token for the integration */\n apiKey?: InputMaybe<Scalars['String']['input']>;\n /** Authorization type */\n authorization?: InputMaybe<IntegrationAuthorization>;\n /** Integration category */\n category?: InputMaybe<IntegrationCategory>;\n /** CRM-specific configuration (for CRM category integrations) */\n crm?: InputMaybe<CrmConfigInput>;\n /** Custom integration name (required if provider is not specified) */\n name?: InputMaybe<Scalars['String']['input']>;\n /** AI provider (only for AI category) */\n provider?: InputMaybe<IntegrationProvider>;\n /** Custom API URL (for custom integrations) */\n url?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateLabelInput = {\n active?: InputMaybe<Scalars['Boolean']['input']>;\n color?: InputMaybe<Scalars['String']['input']>;\n description?: InputMaybe<Scalars['String']['input']>;\n name?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateMemberRoleInput = {\n memberId: Scalars['String']['input'];\n role: Role;\n};\n\nexport type UpdateMessageInput = {\n /** Caption for media messages */\n caption?: InputMaybe<Scalars['String']['input']>;\n mentions?: InputMaybe<Array<Scalars['ID']['input']>>;\n messageId?: InputMaybe<Scalars['String']['input']>;\n reaction?: InputMaybe<MessageReactionInput>;\n resolved?: InputMaybe<Scalars['Boolean']['input']>;\n text?: InputMaybe<Scalars['String']['input']>;\n updatedAt?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\nexport type UpdateNewsCategoryInput = {\n description?: InputMaybe<Scalars['String']['input']>;\n label?: InputMaybe<Scalars['String']['input']>;\n labelI18n?: InputMaybe<Scalars['JSON']['input']>;\n slug?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateNewsPostInput = {\n audienceMode?: InputMaybe<NewsAudienceMode>;\n authorIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n bodyFormat?: InputMaybe<Scalars['String']['input']>;\n categoryIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n contentMarkdown?: InputMaybe<Scalars['String']['input']>;\n coverImageUrl?: InputMaybe<Scalars['ID']['input']>;\n excerpt?: InputMaybe<Scalars['String']['input']>;\n locale?: InputMaybe<Scalars['String']['input']>;\n slug?: InputMaybe<Scalars['String']['input']>;\n tagIds?: InputMaybe<Array<Scalars['ID']['input']>>;\n title?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateNewsSourceInput = {\n fieldMap?: InputMaybe<NewsSourceFieldMapInput>;\n name?: InputMaybe<Scalars['String']['input']>;\n rss?: InputMaybe<NewsSourceRssInput>;\n webhookConnectionId?: InputMaybe<Scalars['ID']['input']>;\n};\n\nexport type UpdateNewsTagInput = {\n description?: InputMaybe<Scalars['String']['input']>;\n label?: InputMaybe<Scalars['String']['input']>;\n labelI18n?: InputMaybe<Scalars['JSON']['input']>;\n slug?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateOrganisationInput = {\n address?: InputMaybe<AddressInput>;\n bot?: InputMaybe<Scalars['String']['input']>;\n botToken?: InputMaybe<Scalars['String']['input']>;\n business?: InputMaybe<OrganisationBusinessType>;\n dataRetention?: InputMaybe<UpdateDataRetentionInput>;\n description?: InputMaybe<Scalars['String']['input']>;\n email?: InputMaybe<Scalars['String']['input']>;\n inboxSettings?: InputMaybe<InboxSettingsInput>;\n logo?: InputMaybe<Scalars['String']['input']>;\n name?: InputMaybe<Scalars['String']['input']>;\n onboarding?: InputMaybe<OrganisationRegistrationStep>;\n phone?: InputMaybe<Scalars['String']['input']>;\n slug?: InputMaybe<Scalars['String']['input']>;\n tags?: InputMaybe<Array<Scalars['String']['input']>>;\n type?: InputMaybe<OrganisationType>;\n website?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdatePaymentMethodInput = {\n paymentMethodId: Scalars['String']['input'];\n};\n\nexport type UpdateReactionSetInput = {\n enabled?: InputMaybe<Scalars['Boolean']['input']>;\n slots: Array<ReactionSlotInput>;\n};\n\nexport type UpdateSsoConfigInput = {\n /** Allow existing users to link their accounts to SSO */\n allowAccountLinking?: InputMaybe<Scalars['Boolean']['input']>;\n /** Auto-provision users on first SSO login */\n autoProvision?: InputMaybe<Scalars['Boolean']['input']>;\n /** Default role for auto-provisioned users */\n defaultRole?: InputMaybe<Scalars['String']['input']>;\n /** Display name for this SSO connection */\n displayName?: InputMaybe<Scalars['String']['input']>;\n /** Email domains that trigger SSO */\n emailDomains?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Whether SSO is enforced (required) for this org */\n enforced?: InputMaybe<Scalars['Boolean']['input']>;\n /** Organisation ID */\n organisationId: Scalars['String']['input'];\n /** SAML configuration updates */\n samlConfig?: InputMaybe<SamlConfigInput>;\n};\n\nexport type UpdateSupportTicketInput = {\n /** User ID to assign ticket to */\n assignedTo?: InputMaybe<Scalars['String']['input']>;\n priority?: InputMaybe<SupportTicketPriority>;\n status?: InputMaybe<SupportTicketStatus>;\n tags?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type UpdateTriggerInput = {\n attribute?: InputMaybe<Array<Scalars['String']['input']>>;\n connectorType?: InputMaybe<ConnectorType>;\n operator?: InputMaybe<RuleOperator>;\n scheduleConfig?: InputMaybe<ScheduleConfigInput>;\n scheduleType?: InputMaybe<ScheduleType>;\n scheduledTimezone?: InputMaybe<Scalars['String']['input']>;\n type?: InputMaybe<TriggerType>;\n value?: InputMaybe<Scalars['String']['input']>;\n /** Top-level webhook connection ID */\n webhookId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateUserInput = {\n _id: Scalars['String']['input'];\n authProvider?: InputMaybe<AuthProvider>;\n authProviderId?: InputMaybe<Scalars['String']['input']>;\n email?: InputMaybe<Scalars['String']['input']>;\n /** Preferred UI locale */\n locale?: InputMaybe<Locale>;\n name?: InputMaybe<Scalars['String']['input']>;\n photo?: InputMaybe<Scalars['String']['input']>;\n status?: InputMaybe<UserStatus>;\n};\n\nexport type UpdateWebIntegrationInput = {\n aiAutoReplyAssistantId?: InputMaybe<Scalars['ID']['input']>;\n aiAutoReplyMode?: InputMaybe<AiAutoReplyMode>;\n allowedOrigins?: InputMaybe<Array<Scalars['String']['input']>>;\n botProtection?: InputMaybe<WebBotProtectionInput>;\n branding?: InputMaybe<WebBrandingInput>;\n contentLocaleFallback?: InputMaybe<Scalars['Boolean']['input']>;\n defaultLocale?: InputMaybe<Scalars['String']['input']>;\n defaultTab?: InputMaybe<WebDefaultTab>;\n disabled?: InputMaybe<Scalars['Boolean']['input']>;\n features?: InputMaybe<WebFeaturesInput>;\n greeting?: InputMaybe<WebGreetingInput>;\n greetingI18n?: InputMaybe<Scalars['JSON']['input']>;\n homeLayout?: InputMaybe<Scalars['JSON']['input']>;\n homeLayoutI18n?: InputMaybe<Scalars['JSON']['input']>;\n localeStrategy?: InputMaybe<WebLocaleStrategy>;\n logo?: InputMaybe<WebLogoInput>;\n messenger?: InputMaybe<WebMessengerConfigInput>;\n messengerI18n?: InputMaybe<Scalars['JSON']['input']>;\n name?: InputMaybe<Scalars['String']['input']>;\n operatorAvatars?: InputMaybe<Array<WebOperatorAvatarInput>>;\n prechatForm?: InputMaybe<WebPrechatFormInput>;\n prechatFormI18n?: InputMaybe<Scalars['JSON']['input']>;\n security?: InputMaybe<WebSecurityInput>;\n sounds?: InputMaybe<WebSoundsInput>;\n supportedLocales?: InputMaybe<Array<Scalars['String']['input']>>;\n theme?: InputMaybe<WebThemeInput>;\n};\n\nexport type UpdateWebhookConnectionInput = {\n contactIdentifierPath?: InputMaybe<Scalars['String']['input']>;\n contactIdentifierType?: InputMaybe<WebhookContactIdentifierType>;\n contactIntegrationId?: InputMaybe<Scalars['String']['input']>;\n direction?: InputMaybe<WebhookDirection>;\n /** Scheme-specific config. For GENERIC_HMAC_SHA256: { headerName, encoding?: \"hex\"|\"base64\", prefix? }. */\n inboundAuthConfig?: InputMaybe<Scalars['JSON']['input']>;\n /** Raw signing secret for STRIPE / GENERIC_HMAC_SHA256 modes. Encrypted before persistence and never returned. */\n inboundAuthCredential?: InputMaybe<Scalars['String']['input']>;\n /** Auth scheme used to verify incoming requests. Defaults to SHARED_SECRET. */\n inboundAuthType?: InputMaybe<WebhookInboundAuthType>;\n name?: InputMaybe<Scalars['String']['input']>;\n outboundAuthCredential?: InputMaybe<Scalars['String']['input']>;\n outboundAuthType?: InputMaybe<WebhookAuthType>;\n outboundSubscribedEvents?: InputMaybe<Array<Scalars['String']['input']>>;\n outboundUrl?: InputMaybe<Scalars['String']['input']>;\n status?: InputMaybe<WebhookStatus>;\n};\n\nexport type UpdateWhatsAppCarouselCardInput = {\n /** Updated variable mappings for card body text. */\n bodyVariableMappings?: InputMaybe<Array<WhatsAppVariableMappingInput>>;\n /** Card index to update (0-based) */\n cardIndex: Scalars['Int']['input'];\n /** Updated default media ID for card header. */\n defaultMediaId?: InputMaybe<Scalars['String']['input']>;\n /** Updated default product retailer ID for PRODUCT header cards. */\n defaultProductRetailerId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateWhatsAppTemplateButtonDefaultsInput = {\n /** Button index (0-based) within the BUTTONS component */\n buttonIndex: Scalars['Int']['input'];\n /** Updated default MPM configuration */\n defaultMpmConfig?: InputMaybe<WhatsAppMpmDefaultConfigInput>;\n /** Updated default product retailer ID (for CATALOG thumbnail) */\n defaultProductRetailerId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UpdateWhatsAppTemplateComponentInput = {\n /** Updated button defaults (product config for MPM/CATALOG buttons). */\n buttonDefaults?: InputMaybe<Array<UpdateWhatsAppTemplateButtonDefaultsInput>>;\n /** For CAROUSEL: updated card variable mappings and default media. */\n cards?: InputMaybe<Array<UpdateWhatsAppCarouselCardInput>>;\n /** Updated default media ID for HEADER components with IMAGE, VIDEO, DOCUMENT format. */\n defaultMediaId?: InputMaybe<Scalars['String']['input']>;\n /** Updated default product retailer ID for PRODUCT header (SPM templates). */\n defaultProductRetailerId?: InputMaybe<Scalars['String']['input']>;\n /** Updated default expiration timestamp (Unix ms) for LIMITED_TIME_OFFER components. */\n expirationTimeMs?: InputMaybe<Scalars['Float']['input']>;\n /** Component type to update (HEADER, BODY, etc.) */\n type: WhatsAppTemplateComponentType;\n /** Updated variable mappings for this component. Maps WhatsApp positional variables to Wexio variables. */\n variableMappings?: InputMaybe<Array<WhatsAppVariableMappingInput>>;\n};\n\nexport type UpdateWhatsAppTemplateInput = {\n /** Component updates (only variableMappings and defaultMediaId can be updated) */\n components?: InputMaybe<Array<UpdateWhatsAppTemplateComponentInput>>;\n /** Template ID to update */\n templateId: Scalars['String']['input'];\n};\n\nexport type UpdateWhatsAppTemplateResult = {\n __typename?: 'UpdateWhatsAppTemplateResult';\n error?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n template?: Maybe<WhatsAppTemplate>;\n};\n\n/** What triggered the billing period usage reset */\nexport enum UsageResetTrigger {\n CATCH_UP = 'CATCH_UP',\n CUSTOM_PLAN = 'CUSTOM_PLAN',\n INVOICE_PAID = 'INVOICE_PAID',\n MANUAL = 'MANUAL',\n SCHEDULED_MONTHLY = 'SCHEDULED_MONTHLY',\n YEARLY_ANNIVERSARY = 'YEARLY_ANNIVERSARY'\n}\n\nexport type UsageUpdatedPayload = {\n __typename?: 'UsageUpdatedPayload';\n /** AI ops limit for the billing period (-1 = unlimited) */\n aiLimit: Scalars['Float']['output'];\n /** AI usage percentage (0 if unlimited) */\n aiPercentage: Scalars['Float']['output'];\n /** Current AI ops used this billing period */\n aiUsed: Scalars['Float']['output'];\n /** Whether AI limit is unlimited */\n isAiUnlimited: Scalars['Boolean']['output'];\n /** Whether OPS limit is unlimited */\n isOpsUnlimited: Scalars['Boolean']['output'];\n /** OPS limit for the billing period (-1 = unlimited) */\n opsLimit: Scalars['Float']['output'];\n /** OPS usage percentage (0 if unlimited) */\n opsPercentage: Scalars['Float']['output'];\n /** Current OPS used this billing period */\n opsUsed: Scalars['Float']['output'];\n organisationId: Scalars['String']['output'];\n};\n\nexport type User = {\n __typename?: 'User';\n _id: Scalars['String']['output'];\n authProvider?: Maybe<AuthProvider>;\n authProviderId?: Maybe<Scalars['String']['output']>;\n email: Scalars['String']['output'];\n lastSeenAt?: Maybe<Scalars['DateTime']['output']>;\n /** Preferred UI locale */\n locale: Locale;\n name?: Maybe<Scalars['String']['output']>;\n organisations: Array<Organisation>;\n photo?: Maybe<Media>;\n presence: PresenceStatus;\n provider?: Maybe<Scalars['String']['output']>;\n providerId?: Maybe<Scalars['String']['output']>;\n ssoOrganisationId?: Maybe<Scalars['String']['output']>;\n status: UserStatus;\n statusMessage?: Maybe<StatusMessage>;\n twoFactorEnabled: Scalars['Boolean']['output'];\n /** Operator's voice sample media for personalised TTS (cross-org) */\n voiceProfile?: Maybe<Media>;\n};\n\nexport type UserNotification = {\n __typename?: 'UserNotification';\n _id: Scalars['String']['output'];\n archivedAt?: Maybe<Scalars['DateTime']['output']>;\n category: NotificationCategory;\n chat?: Maybe<Chat>;\n createdAt: Scalars['DateTime']['output'];\n description?: Maybe<Scalars['String']['output']>;\n from?: Maybe<User>;\n isArchived: Scalars['Boolean']['output'];\n isRead: Scalars['Boolean']['output'];\n messageId?: Maybe<Scalars['String']['output']>;\n /** Arbitrary key-value metadata for the notification (e.g. blockedUntil, duration) */\n metadata?: Maybe<Scalars['JSON']['output']>;\n organisation?: Maybe<Organisation>;\n organisationId?: Maybe<Scalars['String']['output']>;\n readAt?: Maybe<Scalars['DateTime']['output']>;\n /** Related entity ID for navigation */\n relationId?: Maybe<Scalars['String']['output']>;\n title?: Maybe<Scalars['String']['output']>;\n to: User;\n type: UserNotificationType;\n updatedAt: Scalars['DateTime']['output'];\n};\n\n/** Specific type of notification */\nexport enum UserNotificationType {\n BILLING_ACCOUNT_SUSPENDED = 'BILLING_ACCOUNT_SUSPENDED',\n BILLING_PAYMENT_FAILED = 'BILLING_PAYMENT_FAILED',\n BILLING_PAYMENT_REMINDER = 'BILLING_PAYMENT_REMINDER',\n BILLING_PAYMENT_SUCCESS = 'BILLING_PAYMENT_SUCCESS',\n BILLING_SUBSCRIPTION_CREATED = 'BILLING_SUBSCRIPTION_CREATED',\n CUSTOM = 'CUSTOM',\n FEEDBACK_RECEIVED = 'FEEDBACK_RECEIVED',\n MEMBER_JOINED = 'MEMBER_JOINED',\n MEMBER_LEFT = 'MEMBER_LEFT',\n MEMBER_REMOVED = 'MEMBER_REMOVED',\n MENTION = 'MENTION',\n MESSAGE = 'MESSAGE',\n ORGANISATION_DELETED = 'ORGANISATION_DELETED',\n REPLY = 'REPLY',\n ROLE_CHANGED = 'ROLE_CHANGED',\n SPAM_ORG_OUTBOUND_BLOCKED = 'SPAM_ORG_OUTBOUND_BLOCKED',\n SPAM_ORG_OUTBOUND_UNBLOCKED = 'SPAM_ORG_OUTBOUND_UNBLOCKED',\n SUPPORT_TICKET_ASSIGNED = 'SUPPORT_TICKET_ASSIGNED',\n SUPPORT_TICKET_COMMENT = 'SUPPORT_TICKET_COMMENT',\n SUPPORT_TICKET_CREATED = 'SUPPORT_TICKET_CREATED',\n SUPPORT_TICKET_RESOLVED = 'SUPPORT_TICKET_RESOLVED',\n SUPPORT_TICKET_STATUS_CHANGED = 'SUPPORT_TICKET_STATUS_CHANGED',\n SYSTEM_ANNOUNCEMENT = 'SYSTEM_ANNOUNCEMENT',\n SYSTEM_UPDATE = 'SYSTEM_UPDATE',\n TEAM_INVITE = 'TEAM_INVITE',\n TEAM_INVITE_ACCEPTED = 'TEAM_INVITE_ACCEPTED',\n TEAM_INVITE_DECLINED = 'TEAM_INVITE_DECLINED',\n TEMPLATE_APPROVAL_REQUESTED = 'TEMPLATE_APPROVAL_REQUESTED',\n TEMPLATE_APPROVED = 'TEMPLATE_APPROVED',\n TEMPLATE_CHANGES_REQUESTED = 'TEMPLATE_CHANGES_REQUESTED',\n TEMPLATE_REJECTED = 'TEMPLATE_REJECTED',\n WELCOME = 'WELCOME'\n}\n\nexport enum UserStatus {\n ACTIVE = 'ACTIVE',\n PENDING = 'PENDING'\n}\n\nexport type VariableInfo = {\n __typename?: 'VariableInfo';\n createdAt?: Maybe<Scalars['DateTime']['output']>;\n dataType: Scalars['String']['output'];\n description?: Maybe<Scalars['String']['output']>;\n isAvailable: Scalars['Boolean']['output'];\n metadata?: Maybe<VariableMetadataResponse>;\n name: Scalars['String']['output'];\n scope: VariableScope;\n source?: Maybe<Scalars['String']['output']>;\n type: VariableType;\n value?: Maybe<Scalars['String']['output']>;\n};\n\nexport type VariableMetadataResponse = {\n __typename?: 'VariableMetadataResponse';\n /** Card ID that generated this variable */\n cardId?: Maybe<Scalars['String']['output']>;\n /** Human-readable card name */\n cardName?: Maybe<Scalars['String']['output']>;\n /** Additional context data */\n context?: Maybe<Scalars['String']['output']>;\n /** Timestamp when variable was created */\n createdAt?: Maybe<Scalars['String']['output']>;\n /** Flow execution ID */\n executionId?: Maybe<Scalars['String']['output']>;\n /** Format hint for display */\n format?: Maybe<Scalars['String']['output']>;\n /** Whether this variable is read-only */\n readonly?: Maybe<Scalars['Boolean']['output']>;\n /** Source flow identifier */\n sourceFlow?: Maybe<Scalars['String']['output']>;\n /** Type of variable (userResponse, etc.) */\n variableType?: Maybe<Scalars['String']['output']>;\n};\n\n/** Scope of variable (global, flow, session, etc.) */\nexport enum VariableScope {\n CARD = 'CARD',\n FLOW = 'FLOW',\n GLOBAL = 'GLOBAL',\n SESSION = 'SESSION',\n TEMPORARY = 'TEMPORARY'\n}\n\n/** Type of variable (system, organisation, chat, user, etc.) */\nexport enum VariableType {\n API_RESPONSE = 'API_RESPONSE',\n CHAT = 'CHAT',\n COMPUTED = 'COMPUTED',\n CUSTOM = 'CUSTOM',\n FLOW = 'FLOW',\n GLOBAL = 'GLOBAL',\n LAST_MESSAGE = 'LAST_MESSAGE',\n ORGANISATION = 'ORGANISATION',\n SYSTEM = 'SYSTEM',\n USER = 'USER',\n USER_INPUT = 'USER_INPUT'\n}\n\nexport type VerifyPasskeyRegistrationInput = {\n /** Browser name */\n browser?: InputMaybe<Scalars['String']['input']>;\n /** Device name for this passkey */\n deviceName: Scalars['String']['input'];\n /** Operating system */\n os?: InputMaybe<Scalars['String']['input']>;\n /** Registration response JSON from WebAuthn API */\n responseJson: Scalars['String']['input'];\n};\n\nexport type VerifyTwoFactorInput = {\n code: Scalars['String']['input'];\n};\n\nexport type VisitorAnonymousAuthInput = {\n contextSnapshot?: InputMaybe<Scalars['String']['input']>;\n turnstileToken?: InputMaybe<Scalars['String']['input']>;\n visitorId: Scalars['String']['input'];\n website?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VisitorAuthResult = {\n __typename?: 'VisitorAuthResult';\n chatId: Scalars['String']['output'];\n displayName: Scalars['String']['output'];\n expiresIn: Scalars['Int']['output'];\n kind: Scalars['String']['output'];\n peopleId: Scalars['String']['output'];\n shortHandle: Scalars['String']['output'];\n token: Scalars['String']['output'];\n visitorId: Scalars['String']['output'];\n};\n\nexport type VisitorChatHistoryItem = {\n __typename?: 'VisitorChatHistoryItem';\n createdAt: Scalars['String']['output'];\n direction: Scalars['String']['output'];\n id: Scalars['String']['output'];\n kind: Scalars['String']['output'];\n payload?: Maybe<Scalars['String']['output']>;\n senderJson?: Maybe<Scalars['String']['output']>;\n text?: Maybe<Scalars['String']['output']>;\n};\n\nexport type VisitorChatRecentInbound = {\n __typename?: 'VisitorChatRecentInbound';\n createdAt: Scalars['String']['output'];\n id: Scalars['String']['output'];\n sender: VisitorUnreadSender;\n text?: Maybe<Scalars['String']['output']>;\n};\n\nexport type VisitorChatUnread = {\n __typename?: 'VisitorChatUnread';\n count: Scalars['Int']['output'];\n lastMessage?: Maybe<VisitorUnreadLastMessage>;\n};\n\nexport type VisitorHelpArticleArgs = {\n id?: InputMaybe<Scalars['String']['input']>;\n locale?: InputMaybe<Scalars['String']['input']>;\n slug?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VisitorHelpListArgs = {\n folderId?: InputMaybe<Scalars['String']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n locale?: InputMaybe<Scalars['String']['input']>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n query?: InputMaybe<Scalars['String']['input']>;\n recursive?: InputMaybe<Scalars['Boolean']['input']>;\n tagSlug?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VisitorIdentifiedAuthInput = {\n contextSnapshot?: InputMaybe<Scalars['String']['input']>;\n email?: InputMaybe<Scalars['String']['input']>;\n googleIdToken?: InputMaybe<Scalars['String']['input']>;\n jwt?: InputMaybe<Scalars['String']['input']>;\n name?: InputMaybe<Scalars['String']['input']>;\n phone?: InputMaybe<Scalars['String']['input']>;\n turnstileToken?: InputMaybe<Scalars['String']['input']>;\n userHash?: InputMaybe<Scalars['String']['input']>;\n userId?: InputMaybe<Scalars['String']['input']>;\n visitorId: Scalars['String']['input'];\n website?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VisitorLocationInputType = {\n address?: InputMaybe<Scalars['String']['input']>;\n latitude: Scalars['Float']['input'];\n longitude: Scalars['Float']['input'];\n name?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VisitorMessageAck = {\n __typename?: 'VisitorMessageAck';\n messageId?: Maybe<Scalars['String']['output']>;\n ok: Scalars['Boolean']['output'];\n};\n\nexport type VisitorNewsListArgs = {\n categorySlug?: InputMaybe<Scalars['String']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n locale?: InputMaybe<Scalars['String']['input']>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n query?: InputMaybe<Scalars['String']['input']>;\n tagSlug?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VisitorNewsPostArgs = {\n id?: InputMaybe<Scalars['String']['input']>;\n locale?: InputMaybe<Scalars['String']['input']>;\n slug?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VisitorPasskeyOptionsInput = {\n origin: Scalars['String']['input'];\n visitorId: Scalars['String']['input'];\n};\n\nexport type VisitorPasskeyOptionsType = {\n __typename?: 'VisitorPasskeyOptionsType';\n optionsJson: Scalars['String']['output'];\n sessionId: Scalars['String']['output'];\n};\n\nexport type VisitorPasskeyVerifyInput = {\n contextSnapshot?: InputMaybe<Scalars['String']['input']>;\n responseJson: Scalars['String']['input'];\n sessionId: Scalars['String']['input'];\n turnstileToken?: InputMaybe<Scalars['String']['input']>;\n visitorId: Scalars['String']['input'];\n website?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VisitorPrechatFieldEntryInput = {\n key: Scalars['String']['input'];\n value: Scalars['String']['input'];\n};\n\nexport type VisitorPrechatInput = {\n fields: Array<VisitorPrechatFieldEntryInput>;\n};\n\nexport type VisitorReactionInput = {\n itemId: Scalars['ID']['input'];\n slotIndex: Scalars['Int']['input'];\n surface: ReactionSurface;\n};\n\nexport type VisitorReadResult = {\n __typename?: 'VisitorReadResult';\n count: Scalars['Int']['output'];\n};\n\nexport type VisitorSendMessageInput = {\n location?: InputMaybe<VisitorLocationInputType>;\n mediaIds?: InputMaybe<Array<Scalars['String']['input']>>;\n text?: InputMaybe<Scalars['String']['input']>;\n turnstileToken?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VisitorUnreadLastMessage = {\n __typename?: 'VisitorUnreadLastMessage';\n buttons?: Maybe<Scalars['JSON']['output']>;\n createdAt: Scalars['String']['output'];\n id: Scalars['String']['output'];\n sender: VisitorUnreadSender;\n text?: Maybe<Scalars['String']['output']>;\n};\n\nexport type VisitorUnreadSender = {\n __typename?: 'VisitorUnreadSender';\n avatar?: Maybe<Scalars['String']['output']>;\n kind: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport type VisitorUploadInputType = {\n dataBase64: Scalars['String']['input'];\n filename: Scalars['String']['input'];\n mimetype: Scalars['String']['input'];\n};\n\nexport type VisitorUploadResult = {\n __typename?: 'VisitorUploadResult';\n mediaId: Scalars['String']['output'];\n mimetype: Scalars['String']['output'];\n size: Scalars['Int']['output'];\n url: Scalars['String']['output'];\n};\n\nexport type VisitorWebConfig = {\n __typename?: 'VisitorWebConfig';\n aiAutoReplyMode?: Maybe<Scalars['String']['output']>;\n capabilities?: Maybe<Scalars['JSON']['output']>;\n defaultTab?: Maybe<Scalars['String']['output']>;\n features?: Maybe<Scalars['JSON']['output']>;\n homeLayout?: Maybe<Scalars['JSON']['output']>;\n integrationId: Scalars['String']['output'];\n localeStrategy?: Maybe<Scalars['String']['output']>;\n name: Scalars['String']['output'];\n prechatForm?: Maybe<Scalars['JSON']['output']>;\n publicKey: Scalars['String']['output'];\n security?: Maybe<Scalars['JSON']['output']>;\n status: Scalars['String']['output'];\n theme?: Maybe<Scalars['JSON']['output']>;\n};\n\nexport type WaCatalogCardData = {\n __typename?: 'WaCatalogCardData';\n /** Body text (supports {{variable}} interpolation) */\n input?: Maybe<Scalars['String']['output']>;\n /** Product retailer ID for thumbnail image. If omitted, first catalog item is used. */\n thumbnailProductRetailerId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WaListMessageCardData = {\n __typename?: 'WaListMessageCardData';\n /** Body text (supports {{variable}} interpolation) */\n input?: Maybe<Scalars['String']['output']>;\n /** Flat list of selectable rows. Max 10 rows. */\n list?: Maybe<Array<WaListRow>>;\n /** Button label text that opens the list. Max 20 chars. */\n listText?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WaListRow = {\n __typename?: 'WaListRow';\n /** Unique row ID */\n _id: Scalars['String']['output'];\n /** Row description text. Max 72 chars. */\n description?: Maybe<Scalars['String']['output']>;\n /** Row title text. Max 24 chars. */\n label: Scalars['String']['output'];\n /** Next card ID to route to when this row is selected */\n value?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WaListRowInput = {\n /** Unique row ID */\n _id: Scalars['String']['input'];\n /** Row description text. Max 72 chars. */\n description?: InputMaybe<Scalars['String']['input']>;\n /** Row title text. Max 24 chars. */\n label: Scalars['String']['input'];\n /** Next card ID to route to when this row is selected */\n value?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type WaProductCardData = {\n __typename?: 'WaProductCardData';\n /** Body text (supports {{variable}} interpolation) */\n input?: Maybe<Scalars['String']['output']>;\n /** Product retailer ID (SKU) of the product to display */\n productRetailerId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WaProductItem = {\n __typename?: 'WaProductItem';\n /** Product retailer ID (SKU) */\n productRetailerId: Scalars['String']['output'];\n};\n\nexport type WaProductItemInput = {\n /** Product retailer ID (SKU) */\n productRetailerId: Scalars['String']['input'];\n};\n\nexport type WaProductsCardData = {\n __typename?: 'WaProductsCardData';\n /** Body text (supports {{variable}} interpolation) */\n input?: Maybe<Scalars['String']['output']>;\n /** Flat list of products. Max 30 items. */\n products?: Maybe<Array<WaProductItem>>;\n};\n\nexport type WaTemplateCardData = {\n __typename?: 'WaTemplateCardData';\n /** Template quick_reply button routing. Maps button index (0-based) to nextCardId. Only for templates with QUICK_REPLY buttons. Example: { \"0\": \"card-yes\", \"1\": \"card-no\" } */\n buttonRouting?: Maybe<Scalars['JSON']['output']>;\n /** Product-specific overrides for SPM, MPM, and catalog templates. */\n productOverrides?: Maybe<WaTemplateProductOverrides>;\n /** Template ID (MongoDB ObjectId of stored WhatsApp template) */\n templateId?: Maybe<Scalars['String']['output']>;\n /** Variable overrides for template components. Values support {{variable}} interpolation. */\n variableOverrides?: Maybe<WaTemplateVariableOverrides>;\n};\n\nexport type WaTemplateProductOverrides = {\n __typename?: 'WaTemplateProductOverrides';\n /** Product carousel card overrides as JSON. */\n carouselCards?: Maybe<Scalars['JSON']['output']>;\n /** Catalog action config: { thumbnailProductRetailerId } */\n catalogAction?: Maybe<Scalars['JSON']['output']>;\n /** MPM action config: { thumbnailProductRetailerId, sections: [{ title, productItems }] } */\n mpmAction?: Maybe<Scalars['JSON']['output']>;\n /** SPM header config: { productRetailerId } */\n spmHeader?: Maybe<Scalars['JSON']['output']>;\n};\n\nexport type WaTemplateProductOverridesInput = {\n /** Product carousel card overrides as JSON. */\n carouselCards?: InputMaybe<Scalars['JSON']['input']>;\n /** Catalog action config: { thumbnailProductRetailerId } */\n catalogAction?: InputMaybe<Scalars['JSON']['input']>;\n /** MPM action config: { thumbnailProductRetailerId, sections: [{ title, productItems }] } */\n mpmAction?: InputMaybe<Scalars['JSON']['input']>;\n /** SPM header config: { productRetailerId } */\n spmHeader?: InputMaybe<Scalars['JSON']['input']>;\n};\n\nexport type WaTemplateVariableOverrides = {\n __typename?: 'WaTemplateVariableOverrides';\n /** Body variable values in order: {{1}}, {{2}}, etc. Supports {{variable}} interpolation. */\n body?: Maybe<Array<Scalars['String']['output']>>;\n /** Button variable values (e.g., URL suffix for dynamic URL buttons) */\n buttons?: Maybe<Array<Scalars['String']['output']>>;\n /** Carousel card overrides as JSON. Each entry: { cardIndex, headerMediaId?, bodyVariables? } */\n carouselCards?: Maybe<Scalars['JSON']['output']>;\n /** Expiration timestamp (Unix ms) for LIMITED_TIME_OFFER templates. */\n expirationTimeMs?: Maybe<Scalars['Float']['output']>;\n /** Header variable values ({{1}} for text headers). Supports {{variable}} interpolation. */\n header?: Maybe<Array<Scalars['String']['output']>>;\n /** Media ID for IMAGE/VIDEO/DOCUMENT headers. Overrides template defaultMedia. */\n headerMediaId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WaTemplateVariableOverridesInput = {\n /** Body variable values in order: {{1}}, {{2}}, etc. Supports {{variable}} interpolation. */\n body?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Button variable values (e.g., URL suffix for dynamic URL buttons) */\n buttons?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Carousel card overrides as JSON. Each entry: { cardIndex, headerMediaId?, bodyVariables? } */\n carouselCards?: InputMaybe<Scalars['JSON']['input']>;\n /** Expiration timestamp (Unix ms) for LIMITED_TIME_OFFER templates. */\n expirationTimeMs?: InputMaybe<Scalars['Float']['input']>;\n /** Header variable values ({{1}} for text headers). Supports {{variable}} interpolation. */\n header?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Media ID for IMAGE/VIDEO/DOCUMENT headers. Overrides template defaultMedia. */\n headerMediaId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type WaitCardData = {\n __typename?: 'WaitCardData';\n /** Wall-clock pause before dispatching `nextCardId`. Min 5, max 1800 (30 min). Required at publish time. */\n timeoutSeconds?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type WaitTimeoutCardData = {\n __typename?: 'WaitTimeoutCardData';\n /** Optional nudge text sent on each retry tick. Reuses the standard `input` field shared by TEXT_CARD and friends. Supports {{variable}} interpolation. Behavior depends on `retryResendCard`: (input set, retryResendCard=false/unset) → nudge only; (input set, retryResendCard=true) → nudge then re-send the preceding card; (input unset) → re-send the preceding card (retryResendCard ignored — there is nothing else to send). */\n input?: Maybe<Scalars['String']['output']>;\n /** Number of re-sends of the preceding card before final timeout. Default 0 (no retries — first timeout is final). Max 10. Total sends = 1 + retries. Not allowed for AI_AGENT / WA_CATALOG / WA_PRODUCT / WA_PRODUCTS cards. */\n retries?: Maybe<Scalars['Float']['output']>;\n /** Whether to also re-send the preceding card on each retry tick when `input` is set. False (default) → nudge only; true → nudge then re-send. Ignored when `input` is unset (we always re-send in that case). Not allowed for AI_AGENT / WA_CATALOG / WA_PRODUCT / WA_PRODUCTS cards (same reason as `retries`). */\n retryResendCard?: Maybe<Scalars['Boolean']['output']>;\n /** Seconds before the deadline fires. Min 60, max 30 days (2_592_000). Required at publish time. */\n timeoutSeconds?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type WebAppConfig = {\n __typename?: 'WebAppConfig';\n /** HTTPS URL of the Web App */\n url: Scalars['String']['output'];\n};\n\nexport type WebBotProtectionInput = {\n turnstileEnabled?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type WebBrandingInput = {\n hidden?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n/** Default tab the iframe opens on (HOME / MESSENGER / HELP / NEWS). Falls through to next-priority enabled tab when the chosen default is disabled. */\nexport enum WebDefaultTab {\n HELP = 'HELP',\n HOME = 'HOME',\n MESSENGER = 'MESSENGER',\n NEWS = 'NEWS'\n}\n\nexport type WebFeaturesInput = {\n help?: InputMaybe<Scalars['Boolean']['input']>;\n home?: InputMaybe<Scalars['Boolean']['input']>;\n messenger?: InputMaybe<Scalars['Boolean']['input']>;\n news?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type WebGreetingInput = {\n headline?: InputMaybe<Scalars['String']['input']>;\n subheadline?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type WebIntegration = {\n __typename?: 'WebIntegration';\n _id: Scalars['ID']['output'];\n aiAutoReply: WebIntegrationAiAutoReply;\n allowedOrigins: Array<Scalars['String']['output']>;\n botProtection: WebIntegrationBotProtection;\n branding: WebIntegrationBranding;\n contentLocaleFallback: Scalars['Boolean']['output'];\n createdAt: Scalars['DateTime']['output'];\n defaultLocale: Scalars['String']['output'];\n defaultTab: WebDefaultTab;\n disabled: Scalars['Boolean']['output'];\n features: WebIntegrationFeatures;\n greeting?: Maybe<WebIntegrationGreeting>;\n greetingI18n?: Maybe<Scalars['JSON']['output']>;\n homeLayout?: Maybe<Scalars['JSON']['output']>;\n homeLayoutI18n?: Maybe<Scalars['JSON']['output']>;\n localeStrategy: WebLocaleStrategy;\n logo?: Maybe<WebIntegrationLogo>;\n messenger: WebIntegrationMessengerConfig;\n messengerI18n?: Maybe<Scalars['JSON']['output']>;\n name: Scalars['String']['output'];\n operatorAvatars: Array<WebIntegrationOperatorAvatar>;\n prechatForm: WebIntegrationPrechatForm;\n prechatFormI18n?: Maybe<Scalars['JSON']['output']>;\n publicKey: Scalars['String']['output'];\n security: WebIntegrationSecurity;\n sounds: WebIntegrationSounds;\n supportedLocales: Array<Scalars['String']['output']>;\n theme?: Maybe<WebIntegrationTheme>;\n updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type WebIntegrationAiAutoReply = {\n __typename?: 'WebIntegrationAiAutoReply';\n assistantId?: Maybe<Scalars['ID']['output']>;\n mode: AiAutoReplyMode;\n};\n\nexport type WebIntegrationBotProtection = {\n __typename?: 'WebIntegrationBotProtection';\n turnstileEnabled: Scalars['Boolean']['output'];\n};\n\nexport type WebIntegrationBranding = {\n __typename?: 'WebIntegrationBranding';\n hidden: Scalars['Boolean']['output'];\n};\n\nexport type WebIntegrationFeatures = {\n __typename?: 'WebIntegrationFeatures';\n help: Scalars['Boolean']['output'];\n home: Scalars['Boolean']['output'];\n messenger: Scalars['Boolean']['output'];\n news: Scalars['Boolean']['output'];\n};\n\nexport type WebIntegrationGreeting = {\n __typename?: 'WebIntegrationGreeting';\n headline?: Maybe<Scalars['String']['output']>;\n subheadline?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WebIntegrationLogo = {\n __typename?: 'WebIntegrationLogo';\n dark?: Maybe<Media>;\n light?: Maybe<Media>;\n};\n\nexport type WebIntegrationMessengerConfig = {\n __typename?: 'WebIntegrationMessengerConfig';\n aiAssistantAvatar?: Maybe<Media>;\n commands?: Maybe<Array<Scalars['String']['output']>>;\n description?: Maybe<Scalars['String']['output']>;\n messages?: Maybe<Array<WebIntegrationMessengerMessage>>;\n showReactionCounts: Scalars['Boolean']['output'];\n showRelatedHelpArticles: Scalars['Boolean']['output'];\n showRelatedNews: Scalars['Boolean']['output'];\n title?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WebIntegrationMessengerMessage = {\n __typename?: 'WebIntegrationMessengerMessage';\n id?: Maybe<Scalars['String']['output']>;\n kind: WebMessengerMessageKind;\n text: Scalars['String']['output'];\n};\n\nexport type WebIntegrationOperatorAvatar = {\n __typename?: 'WebIntegrationOperatorAvatar';\n alt: Scalars['String']['output'];\n media: Media;\n};\n\nexport type WebIntegrationPrechatForm = {\n __typename?: 'WebIntegrationPrechatForm';\n enabled: Scalars['Boolean']['output'];\n fields: Array<PrechatFormField>;\n};\n\nexport type WebIntegrationSecurity = {\n __typename?: 'WebIntegrationSecurity';\n google: WebIntegrationSecurityGoogle;\n passkey: WebIntegrationSecurityPasskey;\n requireAuth: Scalars['Boolean']['output'];\n};\n\nexport type WebIntegrationSecurityGoogle = {\n __typename?: 'WebIntegrationSecurityGoogle';\n clientId?: Maybe<Scalars['String']['output']>;\n enabled: Scalars['Boolean']['output'];\n};\n\nexport type WebIntegrationSecurityPasskey = {\n __typename?: 'WebIntegrationSecurityPasskey';\n enabled: Scalars['Boolean']['output'];\n};\n\nexport type WebIntegrationSoundChoice = {\n __typename?: 'WebIntegrationSoundChoice';\n media?: Maybe<Media>;\n presetId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WebIntegrationSounds = {\n __typename?: 'WebIntegrationSounds';\n enabled: Scalars['Boolean']['output'];\n inbound?: Maybe<WebIntegrationSoundChoice>;\n outbound?: Maybe<WebIntegrationSoundChoice>;\n volume: Scalars['Float']['output'];\n};\n\nexport type WebIntegrationTheme = {\n __typename?: 'WebIntegrationTheme';\n dark?: Maybe<WebIntegrationThemePalette>;\n fontFamily?: Maybe<Scalars['String']['output']>;\n launcherPosition?: Maybe<LauncherPosition>;\n light?: Maybe<WebIntegrationThemePalette>;\n radii?: Maybe<WebIntegrationThemeRadii>;\n themeMode?: Maybe<WebThemeMode>;\n};\n\nexport type WebIntegrationThemePalette = {\n __typename?: 'WebIntegrationThemePalette';\n background?: Maybe<Scalars['String']['output']>;\n border?: Maybe<Scalars['String']['output']>;\n borderStrong?: Maybe<Scalars['String']['output']>;\n danger?: Maybe<Scalars['String']['output']>;\n launcherBackground?: Maybe<Scalars['String']['output']>;\n launcherForeground?: Maybe<Scalars['String']['output']>;\n primary?: Maybe<Scalars['String']['output']>;\n primaryForeground?: Maybe<Scalars['String']['output']>;\n primaryHover?: Maybe<Scalars['String']['output']>;\n success?: Maybe<Scalars['String']['output']>;\n surface?: Maybe<Scalars['String']['output']>;\n surfaceElevated?: Maybe<Scalars['String']['output']>;\n text?: Maybe<Scalars['String']['output']>;\n textMuted?: Maybe<Scalars['String']['output']>;\n textSubtle?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WebIntegrationThemeRadii = {\n __typename?: 'WebIntegrationThemeRadii';\n lg?: Maybe<Scalars['Float']['output']>;\n md?: Maybe<Scalars['Float']['output']>;\n sm?: Maybe<Scalars['Float']['output']>;\n xl?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type WebIntegrationWithSecret = {\n __typename?: 'WebIntegrationWithSecret';\n integration: WebIntegration;\n sharedSecret: Scalars['String']['output'];\n};\n\n/** How the widget picks the visitor's UI language: AUTO (browser), WEBSITE (host page <html lang>), or DEFAULT (the integration's defaultLocale). */\nexport enum WebLocaleStrategy {\n AUTO = 'AUTO',\n DEFAULT = 'DEFAULT',\n WEBSITE = 'WEBSITE'\n}\n\nexport type WebLogoInput = {\n dark?: InputMaybe<Scalars['ID']['input']>;\n light?: InputMaybe<Scalars['ID']['input']>;\n};\n\nexport type WebMessengerConfigInput = {\n aiAssistantAvatar?: InputMaybe<Scalars['ID']['input']>;\n commands?: InputMaybe<Array<Scalars['String']['input']>>;\n description?: InputMaybe<Scalars['String']['input']>;\n messages?: InputMaybe<Array<WebMessengerMessageInput>>;\n showReactionCounts?: InputMaybe<Scalars['Boolean']['input']>;\n showRelatedHelpArticles?: InputMaybe<Scalars['Boolean']['input']>;\n showRelatedNews?: InputMaybe<Scalars['Boolean']['input']>;\n title?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type WebMessengerMessageInput = {\n id?: InputMaybe<Scalars['String']['input']>;\n kind: WebMessengerMessageKind;\n text: Scalars['String']['input'];\n};\n\n/** Discriminant for a pre-populated Messenger-tab message: HINT (dim affordance), TEXT (bot bubble), SYSTEM (centred system row). */\nexport enum WebMessengerMessageKind {\n HINT = 'HINT',\n SYSTEM = 'SYSTEM',\n TEXT = 'TEXT'\n}\n\nexport type WebOkResponse = {\n __typename?: 'WebOkResponse';\n ok: Scalars['Boolean']['output'];\n};\n\nexport type WebOperatorAvatarInput = {\n alt: Scalars['String']['input'];\n media: Scalars['ID']['input'];\n};\n\nexport type WebPrechatFieldInput = {\n key: Scalars['String']['input'];\n kind: PrechatFieldKind;\n label: Scalars['String']['input'];\n required?: Scalars['Boolean']['input'];\n};\n\nexport type WebPrechatFormInput = {\n enabled: Scalars['Boolean']['input'];\n fields: Array<WebPrechatFieldInput>;\n};\n\nexport type WebSecurityGoogleInput = {\n clientId?: InputMaybe<Scalars['String']['input']>;\n enabled?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type WebSecurityInput = {\n google?: InputMaybe<WebSecurityGoogleInput>;\n passkey?: InputMaybe<WebSecurityPasskeyInput>;\n requireAuth?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type WebSecurityPasskeyInput = {\n enabled?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type WebSoundChoiceInput = {\n media?: InputMaybe<Scalars['ID']['input']>;\n presetId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type WebSoundsInput = {\n enabled?: InputMaybe<Scalars['Boolean']['input']>;\n inbound?: InputMaybe<WebSoundChoiceInput>;\n outbound?: InputMaybe<WebSoundChoiceInput>;\n volume?: InputMaybe<Scalars['Float']['input']>;\n};\n\nexport type WebThemeInput = {\n dark?: InputMaybe<WebThemePaletteInput>;\n fontFamily?: InputMaybe<Scalars['String']['input']>;\n launcherPosition?: InputMaybe<LauncherPosition>;\n light?: InputMaybe<WebThemePaletteInput>;\n radii?: InputMaybe<WebThemeRadiiInput>;\n themeMode?: InputMaybe<WebThemeMode>;\n};\n\n/** Operator's preferred theme mode for the widget — auto / light / dark */\nexport enum WebThemeMode {\n /** Default — follow visitor's `prefers-color-scheme` (and any visitor-level override) */\n AUTO = 'AUTO',\n /** Force dark mode regardless of visitor OS preference */\n DARK = 'DARK',\n /** Force light mode regardless of visitor OS preference */\n LIGHT = 'LIGHT'\n}\n\nexport type WebThemePaletteInput = {\n background?: InputMaybe<Scalars['String']['input']>;\n border?: InputMaybe<Scalars['String']['input']>;\n borderStrong?: InputMaybe<Scalars['String']['input']>;\n danger?: InputMaybe<Scalars['String']['input']>;\n launcherBackground?: InputMaybe<Scalars['String']['input']>;\n launcherForeground?: InputMaybe<Scalars['String']['input']>;\n primary?: InputMaybe<Scalars['String']['input']>;\n primaryForeground?: InputMaybe<Scalars['String']['input']>;\n primaryHover?: InputMaybe<Scalars['String']['input']>;\n success?: InputMaybe<Scalars['String']['input']>;\n surface?: InputMaybe<Scalars['String']['input']>;\n surfaceElevated?: InputMaybe<Scalars['String']['input']>;\n text?: InputMaybe<Scalars['String']['input']>;\n textMuted?: InputMaybe<Scalars['String']['input']>;\n textSubtle?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type WebThemeRadiiInput = {\n lg?: InputMaybe<Scalars['Int']['input']>;\n md?: InputMaybe<Scalars['Int']['input']>;\n sm?: InputMaybe<Scalars['Int']['input']>;\n xl?: InputMaybe<Scalars['Int']['input']>;\n};\n\n/** Authentication method for outbound webhook delivery */\nexport enum WebhookAuthType {\n BASIC = 'BASIC',\n BEARER = 'BEARER',\n HMAC = 'HMAC',\n NONE = 'NONE'\n}\n\nexport type WebhookConnection = {\n __typename?: 'WebhookConnection';\n _id: Scalars['String']['output'];\n contactIdentifierPath?: Maybe<Scalars['String']['output']>;\n contactIdentifierType?: Maybe<WebhookContactIdentifierType>;\n contactIntegrationId?: Maybe<Scalars['String']['output']>;\n createdAt: Scalars['DateTime']['output'];\n currentSchema?: Maybe<Scalars['JSON']['output']>;\n direction: WebhookDirection;\n endpointPath: Scalars['String']['output'];\n inboundAuthConfig?: Maybe<Scalars['JSON']['output']>;\n inboundAuthType?: Maybe<WebhookInboundAuthType>;\n name: Scalars['String']['output'];\n organisationId: Scalars['String']['output'];\n outboundAuthType?: Maybe<WebhookAuthType>;\n outboundSubscribedEvents?: Maybe<Array<Scalars['String']['output']>>;\n outboundUrl?: Maybe<Scalars['String']['output']>;\n sampleCaptureExpiresAt?: Maybe<Scalars['DateTime']['output']>;\n schemaVersion: Scalars['Int']['output'];\n status: WebhookStatus;\n updatedAt: Scalars['DateTime']['output'];\n uses?: Maybe<WebhookConnectionUses>;\n};\n\nexport type WebhookConnectionUses = {\n __typename?: 'WebhookConnectionUses';\n flows?: Maybe<Array<Flow>>;\n webIntegrations?: Maybe<Array<WebIntegration>>;\n};\n\n/** Contact identifier types for inbound webhook contact resolution */\nexport enum WebhookContactIdentifierType {\n CHANNEL_USER_ID = 'CHANNEL_USER_ID',\n CHAT_ID = 'CHAT_ID',\n EMAIL = 'EMAIL',\n PHONE_NUMBER = 'PHONE_NUMBER'\n}\n\nexport type WebhookDeliveryLog = {\n __typename?: 'WebhookDeliveryLog';\n _id: Scalars['String']['output'];\n attempt: Scalars['Int']['output'];\n connectionId: Scalars['String']['output'];\n createdAt: Scalars['DateTime']['output'];\n destinationUrl?: Maybe<Scalars['String']['output']>;\n durationMs?: Maybe<Scalars['Int']['output']>;\n errorMessage?: Maybe<Scalars['String']['output']>;\n eventId: Scalars['String']['output'];\n eventName: Scalars['String']['output'];\n organisationId: Scalars['String']['output'];\n payload?: Maybe<Scalars['JSON']['output']>;\n responseStatus?: Maybe<Scalars['Int']['output']>;\n status: WebhookDeliveryStatus;\n updatedAt: Scalars['DateTime']['output'];\n};\n\n/** Delivery lifecycle state for an outbound webhook attempt */\nexport enum WebhookDeliveryStatus {\n DEAD_LETTER = 'DEAD_LETTER',\n FAILED = 'FAILED',\n PENDING = 'PENDING',\n RETRYING = 'RETRYING',\n SUCCESS = 'SUCCESS'\n}\n\n/** Direction of a webhook connection */\nexport enum WebhookDirection {\n INBOUND = 'INBOUND',\n OUTBOUND = 'OUTBOUND'\n}\n\n/** Authentication scheme for inbound webhook verification */\nexport enum WebhookInboundAuthType {\n GENERIC_HMAC_SHA256 = 'GENERIC_HMAC_SHA256',\n PADDLE = 'PADDLE',\n REVOLUT = 'REVOLUT',\n SHARED_SECRET = 'SHARED_SECRET',\n SLACK = 'SLACK',\n STRIPE = 'STRIPE',\n SVIX = 'SVIX'\n}\n\nexport type WebhookInboundHistoryArgs = {\n /** Return only rows strictly older than this timestamp. Pass the oldest createdAt of the previous page for keyset pagination. */\n before?: InputMaybe<Scalars['DateTime']['input']>;\n connectionId: Scalars['String']['input'];\n /** Page size (default 50, max 200). Combined with `page` for offset pagination. */\n limit?: InputMaybe<Scalars['Int']['input']>;\n outcome?: InputMaybe<WebhookInboundOutcome>;\n /** 1-based page number. Defaults to 1. */\n page?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type WebhookInboundHistoryPage = {\n __typename?: 'WebhookInboundHistoryPage';\n /** True when more rows exist older than `nextCursor`. */\n hasMore: Scalars['Boolean']['output'];\n items: Array<WebhookInboundLog>;\n /** Oldest createdAt in this page. Pass back as `before` to fetch the next older page. */\n nextCursor?: Maybe<Scalars['DateTime']['output']>;\n /** Total rows matching the filter (not capped by the page window). */\n total: Scalars['Int']['output'];\n};\n\nexport type WebhookInboundLog = {\n __typename?: 'WebhookInboundLog';\n _id: Scalars['String']['output'];\n bodyPreview?: Maybe<Scalars['String']['output']>;\n bodySizeBytes: Scalars['Int']['output'];\n connectionId: Scalars['String']['output'];\n createdAt: Scalars['DateTime']['output'];\n durationMs?: Maybe<Scalars['Int']['output']>;\n flowExecutionsPlanned: Scalars['Int']['output'];\n headers?: Maybe<Scalars['JSON']['output']>;\n idempotencyKey?: Maybe<Scalars['String']['output']>;\n idempotentReplay: Scalars['Boolean']['output'];\n message?: Maybe<Scalars['String']['output']>;\n organisationId: Scalars['String']['output'];\n outcome: WebhookInboundOutcome;\n requestId: Scalars['String']['output'];\n resolvedPeopleId?: Maybe<Scalars['String']['output']>;\n sampleCaptured: Scalars['Boolean']['output'];\n updatedAt: Scalars['DateTime']['output'];\n};\n\n/** Final state recorded for an inbound webhook request */\nexport enum WebhookInboundOutcome {\n ACCEPTED = 'ACCEPTED',\n ERROR = 'ERROR',\n IDENTIFIER_NOT_FOUND = 'IDENTIFIER_NOT_FOUND',\n INVALID_JSON = 'INVALID_JSON',\n NEWS_INGEST_FAILED = 'NEWS_INGEST_FAILED',\n PAYLOAD_TOO_LARGE = 'PAYLOAD_TOO_LARGE',\n SAMPLE_CAPTURED = 'SAMPLE_CAPTURED',\n TRIGGER_NOT_FOUND = 'TRIGGER_NOT_FOUND',\n UNAUTHORIZED = 'UNAUTHORIZED'\n}\n\nexport type WebhookOutboundHistoryArgs = {\n before?: InputMaybe<Scalars['DateTime']['input']>;\n connectionId: Scalars['String']['input'];\n limit?: InputMaybe<Scalars['Int']['input']>;\n page?: InputMaybe<Scalars['Int']['input']>;\n status?: InputMaybe<WebhookDeliveryStatus>;\n};\n\nexport type WebhookOutboundHistoryPage = {\n __typename?: 'WebhookOutboundHistoryPage';\n hasMore: Scalars['Boolean']['output'];\n items: Array<WebhookDeliveryLog>;\n nextCursor?: Maybe<Scalars['DateTime']['output']>;\n total: Scalars['Int']['output'];\n};\n\nexport type WebhookSchemaCaptureStatus = {\n __typename?: 'WebhookSchemaCaptureStatus';\n connectionId: Scalars['String']['output'];\n isSampleMode: Scalars['Boolean']['output'];\n sampleCaptureExpiresAt?: Maybe<Scalars['DateTime']['output']>;\n schema?: Maybe<Scalars['JSON']['output']>;\n schemaVersion: Scalars['Int']['output'];\n};\n\nexport type WebhookSchemaField = {\n __typename?: 'WebhookSchemaField';\n allowedValues?: Maybe<Array<Scalars['String']['output']>>;\n description?: Maybe<Scalars['String']['output']>;\n example?: Maybe<Scalars['String']['output']>;\n path: Scalars['String']['output'];\n required: Scalars['Boolean']['output'];\n type: Scalars['String']['output'];\n};\n\n/** Operational status of a webhook connection */\nexport enum WebhookStatus {\n ACTIVE = 'ACTIVE',\n PAUSED = 'PAUSED'\n}\n\nexport type WhatsAppBusinessCatalog = {\n __typename?: 'WhatsAppBusinessCatalog';\n /** Catalog ID from Meta */\n id: Scalars['String']['output'];\n /** Catalog name as set in Commerce Manager */\n name: Scalars['String']['output'];\n /** Number of products in this catalog */\n productCount?: Maybe<Scalars['Float']['output']>;\n /** Catalog vertical (e.g., commerce, hotels) */\n vertical?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WhatsAppBusinessCatalogsResult = {\n __typename?: 'WhatsAppBusinessCatalogsResult';\n /** Available catalogs from the owning business */\n catalogs: Array<WhatsAppBusinessCatalog>;\n /** Error message if the fetch failed */\n error?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WhatsAppCardConfig = {\n __typename?: 'WhatsAppCardConfig';\n /** Footer text for the WA message. Max 60 chars. */\n footerText?: Maybe<Scalars['String']['output']>;\n /** Header text for the WA message. Max 60 chars. */\n headerText?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WhatsAppCardConfigInput = {\n /** Footer text for the WA message. Max 60 chars. */\n footerText?: InputMaybe<Scalars['String']['input']>;\n /** Header text for the WA message. Max 60 chars. */\n headerText?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type WhatsAppCarouselCard = {\n __typename?: 'WhatsAppCarouselCard';\n /** Example values for body variables */\n bodyExample?: Maybe<Array<Scalars['String']['output']>>;\n /** Body text for this card (supports {{1}}, {{2}}, etc.) */\n bodyText?: Maybe<Scalars['String']['output']>;\n /** Variable mappings for body text */\n bodyVariableMappings?: Maybe<Array<WhatsAppVariableMapping>>;\n /** Buttons for this card (max 2) */\n buttons?: Maybe<Array<WhatsAppTemplateButton>>;\n /** Card index (0-based, max 9 cards) */\n cardIndex: Scalars['Int']['output'];\n /** Default media for card header */\n defaultMedia?: Maybe<Media>;\n /** Default product retailer ID for PRODUCT header cards. Used as fallback at send time. */\n defaultProductRetailerId?: Maybe<Scalars['String']['output']>;\n /** Header format for this card (IMAGE or VIDEO only) */\n headerFormat?: Maybe<WhatsAppHeaderFormat>;\n};\n\nexport type WhatsAppCarouselCardInput = {\n /** Example values for body variables. */\n bodyExample?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Body text for this card. Max 160 characters. Supports {{1}}, {{2}}, etc. */\n bodyText?: InputMaybe<Scalars['String']['input']>;\n /** Variable mappings for body text. */\n bodyVariableMappings?: InputMaybe<Array<WhatsAppVariableMappingInput>>;\n /** Buttons for this card. Max 2 buttons. Only QUICK_REPLY and URL allowed. */\n buttons?: InputMaybe<Array<WhatsAppTemplateButtonInput>>;\n /** Card index (0-based, 0-9). Must be sequential starting from 0. */\n cardIndex: Scalars['Int']['input'];\n /** Default media ID for card header. */\n defaultMediaId?: InputMaybe<Scalars['String']['input']>;\n /** Default product retailer ID for PRODUCT header cards. Used as fallback at send time. */\n defaultProductRetailerId?: InputMaybe<Scalars['String']['input']>;\n /** Header format for this card. IMAGE, VIDEO for Media Cards; PRODUCT for Product Cards. */\n headerFormat?: InputMaybe<WhatsAppHeaderFormat>;\n};\n\nexport type WhatsAppCatalogEligibilityResult = {\n __typename?: 'WhatsAppCatalogEligibilityResult';\n /** The connected catalog ID if one exists */\n catalogId?: Maybe<Scalars['String']['output']>;\n /** Error message if the check failed */\n error?: Maybe<Scalars['String']['output']>;\n /** Whether the business account has a connected, approved catalog */\n isEligible: Scalars['Boolean']['output'];\n /** Commerce eligibility status from Meta (e.g., APPROVED, PENDING, REJECTED) */\n status?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WhatsAppCatalogProduct = {\n __typename?: 'WhatsAppCatalogProduct';\n /** Availability status (in stock, out of stock, etc.) */\n availability?: Maybe<Scalars['String']['output']>;\n /** Product brand */\n brand?: Maybe<Scalars['String']['output']>;\n /** Product description */\n description?: Maybe<Scalars['String']['output']>;\n /** Meta product ID */\n id: Scalars['String']['output'];\n /** Product image URL */\n imageUrl?: Maybe<Scalars['String']['output']>;\n /** Product name/title */\n name?: Maybe<Scalars['String']['output']>;\n /** Product price (e.g. \"9.99 USD\") */\n price?: Maybe<Scalars['String']['output']>;\n /** Product retailer ID (SKU) — used in template send params */\n retailerId: Scalars['String']['output'];\n /** Sale price if on sale */\n salePrice?: Maybe<Scalars['String']['output']>;\n /** Product page URL */\n url?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WhatsAppCatalogProductsResult = {\n __typename?: 'WhatsAppCatalogProductsResult';\n /** Error message if the fetch failed */\n error?: Maybe<Scalars['String']['output']>;\n /** Cursor for fetching the next page of results */\n nextCursor?: Maybe<Scalars['String']['output']>;\n /** List of products */\n products: Array<WhatsAppCatalogProduct>;\n /** Total number of products in the catalog */\n totalCount: Scalars['Float']['output'];\n};\n\nexport type WhatsAppConnectCatalogResult = {\n __typename?: 'WhatsAppConnectCatalogResult';\n /** Error message if the operation failed */\n error?: Maybe<Scalars['String']['output']>;\n /** Whether the operation was successful */\n success: Scalars['Boolean']['output'];\n};\n\n/** Format of template header */\nexport enum WhatsAppHeaderFormat {\n DOCUMENT = 'DOCUMENT',\n IMAGE = 'IMAGE',\n LOCATION = 'LOCATION',\n PRODUCT = 'PRODUCT',\n TEXT = 'TEXT',\n VIDEO = 'VIDEO'\n}\n\nexport type WhatsAppMpmDefaultConfig = {\n __typename?: 'WhatsAppMPMDefaultConfig';\n /** Product sections (max 10 sections, 30 products total) */\n sections: Array<WhatsAppMpmDefaultSection>;\n /** Product retailer ID for the thumbnail image */\n thumbnailProductRetailerId: Scalars['String']['output'];\n};\n\nexport type WhatsAppMpmDefaultConfigInput = {\n /** Product sections (max 10 sections, 30 products total) */\n sections: Array<WhatsAppMpmDefaultSectionInput>;\n /** Product retailer ID for the thumbnail image */\n thumbnailProductRetailerId: Scalars['String']['input'];\n};\n\nexport type WhatsAppMpmDefaultSection = {\n __typename?: 'WhatsAppMPMDefaultSection';\n /** Product retailer IDs (SKUs) in this section */\n productRetailerIds: Array<Scalars['String']['output']>;\n /** Section title (max 24 characters) */\n title: Scalars['String']['output'];\n};\n\nexport type WhatsAppMpmDefaultSectionInput = {\n /** Product retailer IDs (SKUs) in this section */\n productRetailerIds: Array<Scalars['String']['input']>;\n /** Section title (max 24 characters) */\n title: Scalars['String']['input'];\n};\n\nexport type WhatsAppTemplate = {\n __typename?: 'WhatsAppTemplate';\n _id: Scalars['String']['output'];\n category: WhatsAppTemplateCategory;\n components: Array<WhatsAppTemplateComponent>;\n createdAt?: Maybe<Scalars['DateTime']['output']>;\n displayName?: Maybe<Scalars['String']['output']>;\n externalTemplateId?: Maybe<Scalars['String']['output']>;\n integration: Scalars['String']['output'];\n language: Scalars['String']['output'];\n lastSyncedAt?: Maybe<Scalars['DateTime']['output']>;\n name: Scalars['String']['output'];\n organisation: Scalars['String']['output'];\n qualityScore?: Maybe<Scalars['String']['output']>;\n rejectionReason?: Maybe<Scalars['String']['output']>;\n status: WhatsAppTemplateStatus;\n updatedAt?: Maybe<Scalars['DateTime']['output']>;\n variableCount?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type WhatsAppTemplateButton = {\n __typename?: 'WhatsAppTemplateButton';\n /** Default MPM configuration with sections and products. Stored on template, used as fallback when no productOverrides.mpmAction provided at send time. */\n defaultMpmConfig?: Maybe<WhatsAppMpmDefaultConfig>;\n /** Default product retailer ID. For CATALOG: thumbnail product. Stored on template, used as fallback at send time. */\n defaultProductRetailerId?: Maybe<Scalars['String']['output']>;\n /** Example value for COPY_CODE buttons or URL variable */\n example?: Maybe<Scalars['String']['output']>;\n /** Phone number for PHONE_NUMBER buttons */\n phoneNumber?: Maybe<Scalars['String']['output']>;\n /** Button label text (max 25 characters) */\n text: Scalars['String']['output'];\n /** Button type (QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE, MPM, SPM) */\n type: WhatsAppTemplateButtonType;\n /** URL for URL buttons (can contain {{1}} for dynamic part) */\n url?: Maybe<Scalars['String']['output']>;\n /** Variable mapping for dynamic URL/COPY_CODE parameters (when URL contains {{1}} or for coupon codes) */\n variableMapping?: Maybe<WhatsAppVariableMapping>;\n};\n\nexport type WhatsAppTemplateButtonInput = {\n /** Default MPM configuration. Stored on template, used as fallback when no mpmAction provided at send time. */\n defaultMpmConfig?: InputMaybe<WhatsAppMpmDefaultConfigInput>;\n /** Default product retailer ID. For CATALOG: default thumbnail product. Stored on template, used as fallback at send time. */\n defaultProductRetailerId?: InputMaybe<Scalars['String']['input']>;\n /** Example value for COPY_CODE buttons (max 15 characters) or URL variable */\n example?: InputMaybe<Scalars['String']['input']>;\n /** Flow action for FLOW buttons (navigate or data_exchange) */\n flowAction?: InputMaybe<Scalars['String']['input']>;\n /** Flow ID for FLOW buttons */\n flowId?: InputMaybe<Scalars['String']['input']>;\n /** Phone number for PHONE_NUMBER buttons. Must be in international format. */\n phoneNumber?: InputMaybe<Scalars['String']['input']>;\n /** Button label text (max 25 characters) */\n text: Scalars['String']['input'];\n /** Button type: QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE, OTP, FLOW, CATALOG, MPM, SPM, VOICE_CALL */\n type: WhatsAppTemplateButtonType;\n /** URL for URL buttons. Can include one variable appended to the end (e.g., https://example.com/order?id={{1}}) */\n url?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** Type of button in a template */\nexport enum WhatsAppTemplateButtonType {\n CATALOG = 'CATALOG',\n COPY_CODE = 'COPY_CODE',\n MPM = 'MPM',\n PHONE_NUMBER = 'PHONE_NUMBER',\n QUICK_REPLY = 'QUICK_REPLY',\n SPM = 'SPM',\n URL = 'URL'\n}\n\n/** Categories of WhatsApp message templates */\nexport enum WhatsAppTemplateCategory {\n AUTHENTICATION = 'AUTHENTICATION',\n MARKETING = 'MARKETING',\n UTILITY = 'UTILITY'\n}\n\nexport type WhatsAppTemplateComponent = {\n __typename?: 'WhatsAppTemplateComponent';\n buttons?: Maybe<Array<WhatsAppTemplateButton>>;\n /** For CAROUSEL: array of 2-10 cards, each with header, body, and buttons */\n cards?: Maybe<Array<WhatsAppCarouselCard>>;\n /** Default media for IMAGE, VIDEO, DOCUMENT headers. Used as fallback when user does not provide media. */\n defaultMedia?: Maybe<Media>;\n /** Default product retailer ID for PRODUCT header format (SPM templates). Used as fallback at send time. */\n defaultProductRetailerId?: Maybe<Scalars['String']['output']>;\n example?: Maybe<Array<Scalars['String']['output']>>;\n /** Default expiration timestamp (Unix ms) for LIMITED_TIME_OFFER templates. Used as fallback when not provided at send time. */\n expirationTimeMs?: Maybe<Scalars['Float']['output']>;\n format?: Maybe<WhatsAppHeaderFormat>;\n /** For LIMITED_TIME_OFFER: enables countdown timer display. When true, expiration_time_ms must be provided at send time. */\n hasExpiration?: Maybe<Scalars['Boolean']['output']>;\n text?: Maybe<Scalars['String']['output']>;\n type: WhatsAppTemplateComponentType;\n /** Mapping of WhatsApp positions to Wexio variables */\n variableMappings?: Maybe<Array<WhatsAppVariableMapping>>;\n};\n\nexport type WhatsAppTemplateComponentInput = {\n /** Buttons for BUTTONS component. Max 10 total (2 URL, 1 PHONE_NUMBER, 1 COPY_CODE, 10 QUICK_REPLY) */\n buttons?: InputMaybe<Array<WhatsAppTemplateButtonInput>>;\n /** For CAROUSEL: array of 2-10 cards. Each card has header (IMAGE/VIDEO only), body, and buttons (max 2). */\n cards?: InputMaybe<Array<WhatsAppCarouselCardInput>>;\n /** Media ID for IMAGE, VIDEO, DOCUMENT headers. Used as fallback when user does not provide media at send time. */\n defaultMediaId?: InputMaybe<Scalars['String']['input']>;\n /** Default product retailer ID for PRODUCT header (SPM templates). Used as fallback at send time. */\n defaultProductRetailerId?: InputMaybe<Scalars['String']['input']>;\n /** Example values for variables. Required for template approval. */\n example?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Default expiration timestamp (Unix ms) for LIMITED_TIME_OFFER templates. Used as fallback when not provided at send time via variableOverrides. */\n expirationTimeMs?: InputMaybe<Scalars['Float']['input']>;\n /** Format for HEADER component: TEXT, IMAGE, VIDEO, DOCUMENT, LOCATION */\n format?: InputMaybe<WhatsAppHeaderFormat>;\n /** For LIMITED_TIME_OFFER: enables countdown timer display. When true, expiration_time_ms must be provided at send time. */\n hasExpiration?: InputMaybe<Scalars['Boolean']['input']>;\n /** Text content. BODY: max 1024 chars, HEADER/FOOTER: max 60 chars, LIMITED_TIME_OFFER: max 16 chars */\n text?: InputMaybe<Scalars['String']['input']>;\n /** Component type: HEADER, BODY, FOOTER, BUTTONS, LIMITED_TIME_OFFER, CAROUSEL */\n type: WhatsAppTemplateComponentType;\n /** Mapping of WhatsApp variable positions ({{1}}, {{2}}) to Wexio variables for auto-resolution at send time */\n variableMappings?: InputMaybe<Array<WhatsAppVariableMappingInput>>;\n};\n\n/** Type of template component */\nexport enum WhatsAppTemplateComponentType {\n BODY = 'BODY',\n BUTTONS = 'BUTTONS',\n CALL_PERMISSION_REQUEST = 'CALL_PERMISSION_REQUEST',\n CAROUSEL = 'CAROUSEL',\n FOOTER = 'FOOTER',\n HEADER = 'HEADER',\n LIMITED_TIME_OFFER = 'LIMITED_TIME_OFFER'\n}\n\nexport type WhatsAppTemplateConnection = {\n __typename?: 'WhatsAppTemplateConnection';\n hasNextPage: Scalars['Boolean']['output'];\n hasPreviousPage: Scalars['Boolean']['output'];\n items: Array<WhatsAppTemplate>;\n totalCount: Scalars['Int']['output'];\n};\n\nexport type WhatsAppTemplateFilterInput = {\n /** Filter by categories */\n categories?: InputMaybe<Array<WhatsAppTemplateCategory>>;\n /** Filter by integration IDs */\n integrationIds?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Filter by languages */\n languages?: InputMaybe<Array<Scalars['String']['input']>>;\n /** Limit (page size) for pagination */\n limit?: InputMaybe<Scalars['Int']['input']>;\n /** Search by name or content */\n search?: InputMaybe<Scalars['String']['input']>;\n /** Skip (offset) for pagination */\n skip?: InputMaybe<Scalars['Int']['input']>;\n sortBy?: InputMaybe<WhatsAppTemplateSortField>;\n sortOrder?: InputMaybe<SortOrder>;\n /** Filter by statuses */\n statuses?: InputMaybe<Array<WhatsAppTemplateStatus>>;\n};\n\n/** Field to sort templates by */\nexport enum WhatsAppTemplateSortField {\n CATEGORY = 'CATEGORY',\n CREATED_AT = 'CREATED_AT',\n NAME = 'NAME',\n STATUS = 'STATUS',\n UPDATED_AT = 'UPDATED_AT'\n}\n\n/** Approval status of WhatsApp message templates */\nexport enum WhatsAppTemplateStatus {\n APPROVED = 'APPROVED',\n DELETED = 'DELETED',\n DISABLED = 'DISABLED',\n IN_APPEAL = 'IN_APPEAL',\n PAUSED = 'PAUSED',\n PENDING = 'PENDING',\n REJECTED = 'REJECTED'\n}\n\nexport type WhatsAppTemplateSyncResult = {\n __typename?: 'WhatsAppTemplateSyncResult';\n created: Scalars['Int']['output'];\n deleted: Scalars['Int']['output'];\n errors: Array<Scalars['String']['output']>;\n synced: Scalars['Int']['output'];\n updated: Scalars['Int']['output'];\n};\n\nexport type WhatsAppVariableMapping = {\n __typename?: 'WhatsAppVariableMapping';\n /** WhatsApp variable position (1, 2, 3, etc.) */\n position: Scalars['Int']['output'];\n /** Template value: plain text, variable ({{user.first_name}}), or mixed (Hello {{user.first_name}}!) */\n value: Scalars['String']['output'];\n};\n\nexport type WhatsAppVariableMappingInput = {\n /** WhatsApp variable position (1, 2, 3, etc.) */\n position: Scalars['Int']['input'];\n /** Template value: plain text, variable ({{user.first_name}}), or mixed (Hello {{user.first_name}}!) */\n value: Scalars['String']['input'];\n};\n\n\n export interface PossibleTypesResultData {\n possibleTypes: {\n [key: string]: string[]\n }\n }\n const result: PossibleTypesResultData = {\n \"possibleTypes\": {\n \"CardData\": [\n \"AIAgentCardData\",\n \"AIClassificationCardData\",\n \"AITextCardData\",\n \"AITextToSpeechCardData\",\n \"AssignOperatorCardData\",\n \"ButtonCardData\",\n \"ConditionalCardData\",\n \"CrmCardData\",\n \"FetchCardData\",\n \"FlowCardData\",\n \"GhostCardData\",\n \"MediaCardData\",\n \"NoteCardData\",\n \"OutboundWebhookEventCardData\",\n \"QuestionCardData\",\n \"TextCardData\",\n \"UpdateContactCardData\",\n \"WaCatalogCardData\",\n \"WaListMessageCardData\",\n \"WaProductCardData\",\n \"WaProductsCardData\",\n \"WaTemplateCardData\",\n \"WaitCardData\",\n \"WaitTimeoutCardData\"\n ],\n \"FlowActivityActorUnion\": [\n \"AIAssistant\",\n \"User\"\n ],\n \"MessageSenderUnion\": [\n \"AIAssistant\",\n \"Bot\",\n \"People\",\n \"User\"\n ]\n }\n};\n export default result;\n ","\"use client\";\n\nimport { useEffect } from \"react\";\n\n/**\n * Surface the active article's title up to the widget shell's sticky\n * header (it renders the title as a breadcrumb on article routes).\n *\n * Sets the title on mount and clears it (`null`) on unmount. This\n * mount/unmount ownership — rather than the shell clearing on every\n * route change — is what makes both back-navigation AND Apollo\n * cache-hit re-opens reset the header deterministically: each fresh\n * mount sets the current title, and the previous unmount has already\n * wiped the stale one, so React's batch ordering can't drop the title\n * back to the tab name.\n *\n * Shared by the help + news article views, which had identical copies.\n */\nexport function useArticleTitleSink(\n title: string | undefined,\n onTitleResolved?: (title: string | null) => void,\n): void {\n useEffect(() => {\n if (!onTitleResolved) return;\n if (title) onTitleResolved(title);\n return () => onTitleResolved(null);\n }, [title, onTitleResolved]);\n}\n","\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport type { DemoTranslator } from \"@/dummy/translator\";\n\n/**\n * Locales the bundled demo content ships in. Both `demo.<locale>.json`\n * files carry the FULL article set, so every demo article exists in each\n * of these — which is exactly what powers the in-demo, article-scoped\n * language switcher.\n */\nexport const DEMO_LOCALES = [\"en\", \"uk\"] as const;\n\n/** Per-locale dynamic import so each demo bundle is its own chunk,\n * fetched only when the visitor actually switches to that language. */\nasync function loadDemoBundle(locale: string): Promise<Record<string, unknown>> {\n switch (locale) {\n case \"uk\":\n return (await import(\"@/messages/demo.uk.json\")).default;\n default:\n return (await import(\"@/messages/demo.en.json\")).default;\n }\n}\n\n/**\n * Resolve a dot-path into the demo bundle and return the raw value\n * (string, array, or object) — exactly what next-intl's `t.raw()` does\n * for our demo keys, but without going through next-intl (its\n * `createTranslator` expects the app's locale config and throws on a\n * standalone bundle). Keys split on `.` only, so hyphenated ids like\n * `demo-news-1` stay intact.\n */\nexport function rawFromBundle(bundle: Record<string, unknown>): DemoTranslator[\"raw\"] {\n return (key: string): unknown => {\n let cursor: unknown = bundle;\n for (const segment of key.split(\".\")) {\n if (cursor && typeof cursor === \"object\" && segment in (cursor as Record<string, unknown>)) {\n cursor = (cursor as Record<string, unknown>)[segment];\n } else {\n return undefined;\n }\n }\n return cursor;\n };\n}\n\n/**\n * A `DemoTranslator` for an ARBITRARY locale, loaded on demand. Powers\n * the article-scoped language switch in demo mode: the visitor picks a\n * language and we render that one article's content from the matching\n * demo bundle WITHOUT touching the widget's own locale. Returns\n * `fallback` (the widget-locale translator) until the requested bundle\n * lands, so the article never flashes empty.\n */\nexport function useDemoTranslator(locale: string, fallback: DemoTranslator): DemoTranslator {\n const [translator, setTranslator] = useState<DemoTranslator | null>(null);\n\n useEffect(() => {\n let active = true;\n loadDemoBundle(locale).then((messages) => {\n if (!active) return;\n setTranslator({ raw: rawFromBundle(messages) });\n });\n return () => {\n active = false;\n };\n }, [locale]);\n\n return translator ?? fallback;\n}\n","export function deprecate(fn) {\n return fn\n}\n\nexport function equal() {}\n\nexport function ok() {}\n\nexport function unreachable() {}\n","/**\n * @typedef Options\n * Configuration for `stringify`.\n * @property {boolean} [padLeft=true]\n * Whether to pad a space before a token.\n * @property {boolean} [padRight=false]\n * Whether to pad a space after a token.\n */\n\n/**\n * @typedef {Options} StringifyOptions\n * Please use `StringifyOptions` instead.\n */\n\n/**\n * Parse comma-separated tokens to an array.\n *\n * @param {string} value\n * Comma-separated tokens.\n * @returns {Array<string>}\n * List of tokens.\n */\nexport function parse(value) {\n /** @type {Array<string>} */\n const tokens = []\n const input = String(value || '')\n let index = input.indexOf(',')\n let start = 0\n /** @type {boolean} */\n let end = false\n\n while (!end) {\n if (index === -1) {\n index = input.length\n end = true\n }\n\n const token = input.slice(start, index).trim()\n\n if (token || !end) {\n tokens.push(token)\n }\n\n start = index + 1\n index = input.indexOf(',', start)\n }\n\n return tokens\n}\n\n/**\n * Serialize an array of strings or numbers to comma-separated tokens.\n *\n * @param {Array<string|number>} values\n * List of tokens.\n * @param {Options} [options]\n * Configuration for `stringify` (optional).\n * @returns {string}\n * Comma-separated tokens.\n */\nexport function stringify(values, options) {\n const settings = options || {}\n\n // Ensure the last empty entry is seen.\n const input = values[values.length - 1] === '' ? [...values, ''] : values\n\n return input\n .join(\n (settings.padRight ? ' ' : '') +\n ',' +\n (settings.padLeft === false ? '' : ' ')\n )\n .trim()\n}\n","/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [jsx=false]\n * Support JSX identifiers (default: `false`).\n */\n\nconst startRe = /[$_\\p{ID_Start}]/u\nconst contRe = /[$_\\u{200C}\\u{200D}\\p{ID_Continue}]/u\nconst contReJsx = /[-$_\\u{200C}\\u{200D}\\p{ID_Continue}]/u\nconst nameRe = /^[$_\\p{ID_Start}][$_\\u{200C}\\u{200D}\\p{ID_Continue}]*$/u\nconst nameReJsx = /^[$_\\p{ID_Start}][-$_\\u{200C}\\u{200D}\\p{ID_Continue}]*$/u\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Checks if the given code point can start an identifier.\n *\n * @param {number | undefined} code\n * Code point to check.\n * @returns {boolean}\n * Whether `code` can start an identifier.\n */\n// Note: `undefined` is supported so you can pass the result from `''.codePointAt`.\nexport function start(code) {\n return code ? startRe.test(String.fromCodePoint(code)) : false\n}\n\n/**\n * Checks if the given code point can continue an identifier.\n *\n * @param {number | undefined} code\n * Code point to check.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {boolean}\n * Whether `code` can continue an identifier.\n */\n// Note: `undefined` is supported so you can pass the result from `''.codePointAt`.\nexport function cont(code, options) {\n const settings = options || emptyOptions\n const re = settings.jsx ? contReJsx : contRe\n return code ? re.test(String.fromCodePoint(code)) : false\n}\n\n/**\n * Checks if the given value is a valid identifier name.\n *\n * @param {string} name\n * Identifier to check.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {boolean}\n * Whether `name` can be an identifier.\n */\nexport function name(name, options) {\n const settings = options || emptyOptions\n const re = settings.jsx ? nameReJsx : nameRe\n return re.test(name)\n}\n","/**\n * @typedef {import('hast').Nodes} Nodes\n */\n\n// HTML whitespace expression.\n// See <https://infra.spec.whatwg.org/#ascii-whitespace>.\nconst re = /[ \\t\\n\\f\\r]/g\n\n/**\n * Check if the given value is *inter-element whitespace*.\n *\n * @param {Nodes | string} thing\n * Thing to check (`Node` or `string`).\n * @returns {boolean}\n * Whether the `value` is inter-element whitespace (`boolean`): consisting of\n * zero or more of space, tab (`\\t`), line feed (`\\n`), carriage return\n * (`\\r`), or form feed (`\\f`); if a node is passed it must be a `Text` node,\n * whose `value` field is checked.\n */\nexport function whitespace(thing) {\n return typeof thing === 'object'\n ? thing.type === 'text'\n ? empty(thing.value)\n : false\n : empty(thing)\n}\n\n/**\n * @param {string} value\n * @returns {boolean}\n */\nfunction empty(value) {\n return value.replace(re, '') === ''\n}\n","/**\n * @import {Schema as SchemaType, Space} from 'property-information'\n */\n\n/** @type {SchemaType} */\nexport class Schema {\n /**\n * @param {SchemaType['property']} property\n * Property.\n * @param {SchemaType['normal']} normal\n * Normal.\n * @param {Space | undefined} [space]\n * Space.\n * @returns\n * Schema.\n */\n constructor(property, normal, space) {\n this.normal = normal\n this.property = property\n\n if (space) {\n this.space = space\n }\n }\n}\n\nSchema.prototype.normal = {}\nSchema.prototype.property = {}\nSchema.prototype.space = undefined\n","/**\n * @import {Info, Space} from 'property-information'\n */\n\nimport {Schema} from './schema.js'\n\n/**\n * @param {ReadonlyArray<Schema>} definitions\n * Definitions.\n * @param {Space | undefined} [space]\n * Space.\n * @returns {Schema}\n * Schema.\n */\nexport function merge(definitions, space) {\n /** @type {Record<string, Info>} */\n const property = {}\n /** @type {Record<string, string>} */\n const normal = {}\n\n for (const definition of definitions) {\n Object.assign(property, definition.property)\n Object.assign(normal, definition.normal)\n }\n\n return new Schema(property, normal, space)\n}\n","/**\n * Get the cleaned case insensitive form of an attribute or property.\n *\n * @param {string} value\n * An attribute-like or property-like name.\n * @returns {string}\n * Value that can be used to look up the properly cased property on a\n * `Schema`.\n */\nexport function normalize(value) {\n return value.toLowerCase()\n}\n","/**\n * @import {Info as InfoType} from 'property-information'\n */\n\n/** @type {InfoType} */\nexport class Info {\n /**\n * @param {string} property\n * Property.\n * @param {string} attribute\n * Attribute.\n * @returns\n * Info.\n */\n constructor(property, attribute) {\n this.attribute = attribute\n this.property = property\n }\n}\n\nInfo.prototype.attribute = ''\nInfo.prototype.booleanish = false\nInfo.prototype.boolean = false\nInfo.prototype.commaOrSpaceSeparated = false\nInfo.prototype.commaSeparated = false\nInfo.prototype.defined = false\nInfo.prototype.mustUseProperty = false\nInfo.prototype.number = false\nInfo.prototype.overloadedBoolean = false\nInfo.prototype.property = ''\nInfo.prototype.spaceSeparated = false\nInfo.prototype.space = undefined\n","let powers = 0\n\nexport const boolean = increment()\nexport const booleanish = increment()\nexport const overloadedBoolean = increment()\nexport const number = increment()\nexport const spaceSeparated = increment()\nexport const commaSeparated = increment()\nexport const commaOrSpaceSeparated = increment()\n\nfunction increment() {\n return 2 ** ++powers\n}\n","/**\n * @import {Space} from 'property-information'\n */\n\nimport {Info} from './info.js'\nimport * as types from './types.js'\n\nconst checks = /** @type {ReadonlyArray<keyof typeof types>} */ (\n Object.keys(types)\n)\n\nexport class DefinedInfo extends Info {\n /**\n * @constructor\n * @param {string} property\n * Property.\n * @param {string} attribute\n * Attribute.\n * @param {number | null | undefined} [mask]\n * Mask.\n * @param {Space | undefined} [space]\n * Space.\n * @returns\n * Info.\n */\n constructor(property, attribute, mask, space) {\n let index = -1\n\n super(property, attribute)\n\n mark(this, 'space', space)\n\n if (typeof mask === 'number') {\n while (++index < checks.length) {\n const check = checks[index]\n mark(this, checks[index], (mask & types[check]) === types[check])\n }\n }\n }\n}\n\nDefinedInfo.prototype.defined = true\n\n/**\n * @template {keyof DefinedInfo} Key\n * Key type.\n * @param {DefinedInfo} values\n * Info.\n * @param {Key} key\n * Key.\n * @param {DefinedInfo[Key]} value\n * Value.\n * @returns {undefined}\n * Nothing.\n */\nfunction mark(values, key, value) {\n if (value) {\n values[key] = value\n }\n}\n","/**\n * @import {Info, Space} from 'property-information'\n */\n\n/**\n * @typedef Definition\n * Definition of a schema.\n * @property {Record<string, string> | undefined} [attributes]\n * Normalzed names to special attribute case.\n * @property {ReadonlyArray<string> | undefined} [mustUseProperty]\n * Normalized names that must be set as properties.\n * @property {Record<string, number | null>} properties\n * Property names to their types.\n * @property {Space | undefined} [space]\n * Space.\n * @property {Transform} transform\n * Transform a property name.\n */\n\n/**\n * @callback Transform\n * Transform.\n * @param {Record<string, string>} attributes\n * Attributes.\n * @param {string} property\n * Property.\n * @returns {string}\n * Attribute.\n */\n\nimport {normalize} from '../normalize.js'\nimport {DefinedInfo} from './defined-info.js'\nimport {Schema} from './schema.js'\n\n/**\n * @param {Definition} definition\n * Definition.\n * @returns {Schema}\n * Schema.\n */\nexport function create(definition) {\n /** @type {Record<string, Info>} */\n const properties = {}\n /** @type {Record<string, string>} */\n const normals = {}\n\n for (const [property, value] of Object.entries(definition.properties)) {\n const info = new DefinedInfo(\n property,\n definition.transform(definition.attributes || {}, property),\n value,\n definition.space\n )\n\n if (\n definition.mustUseProperty &&\n definition.mustUseProperty.includes(property)\n ) {\n info.mustUseProperty = true\n }\n\n properties[property] = info\n\n normals[normalize(property)] = property\n normals[normalize(info.attribute)] = property\n }\n\n return new Schema(properties, normals, definition.space)\n}\n","import {create} from './util/create.js'\nimport {booleanish, number, spaceSeparated} from './util/types.js'\n\nexport const aria = create({\n properties: {\n ariaActiveDescendant: null,\n ariaAtomic: booleanish,\n ariaAutoComplete: null,\n ariaBusy: booleanish,\n ariaChecked: booleanish,\n ariaColCount: number,\n ariaColIndex: number,\n ariaColSpan: number,\n ariaControls: spaceSeparated,\n ariaCurrent: null,\n ariaDescribedBy: spaceSeparated,\n ariaDetails: null,\n ariaDisabled: booleanish,\n ariaDropEffect: spaceSeparated,\n ariaErrorMessage: null,\n ariaExpanded: booleanish,\n ariaFlowTo: spaceSeparated,\n ariaGrabbed: booleanish,\n ariaHasPopup: null,\n ariaHidden: booleanish,\n ariaInvalid: null,\n ariaKeyShortcuts: null,\n ariaLabel: null,\n ariaLabelledBy: spaceSeparated,\n ariaLevel: number,\n ariaLive: null,\n ariaModal: booleanish,\n ariaMultiLine: booleanish,\n ariaMultiSelectable: booleanish,\n ariaOrientation: null,\n ariaOwns: spaceSeparated,\n ariaPlaceholder: null,\n ariaPosInSet: number,\n ariaPressed: booleanish,\n ariaReadOnly: booleanish,\n ariaRelevant: null,\n ariaRequired: booleanish,\n ariaRoleDescription: spaceSeparated,\n ariaRowCount: number,\n ariaRowIndex: number,\n ariaRowSpan: number,\n ariaSelected: booleanish,\n ariaSetSize: number,\n ariaSort: null,\n ariaValueMax: number,\n ariaValueMin: number,\n ariaValueNow: number,\n ariaValueText: null,\n role: null\n },\n transform(_, property) {\n return property === 'role'\n ? property\n : 'aria-' + property.slice(4).toLowerCase()\n }\n})\n","/**\n * @param {Record<string, string>} attributes\n * Attributes.\n * @param {string} attribute\n * Attribute.\n * @returns {string}\n * Transformed attribute.\n */\nexport function caseSensitiveTransform(attributes, attribute) {\n return attribute in attributes ? attributes[attribute] : attribute\n}\n","import {caseSensitiveTransform} from './case-sensitive-transform.js'\n\n/**\n * @param {Record<string, string>} attributes\n * Attributes.\n * @param {string} property\n * Property.\n * @returns {string}\n * Transformed property.\n */\nexport function caseInsensitiveTransform(attributes, property) {\n return caseSensitiveTransform(attributes, property.toLowerCase())\n}\n","import {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\nimport {create} from './util/create.js'\nimport {\n booleanish,\n boolean,\n commaSeparated,\n number,\n overloadedBoolean,\n spaceSeparated\n} from './util/types.js'\n\nexport const html = create({\n attributes: {\n acceptcharset: 'accept-charset',\n classname: 'class',\n htmlfor: 'for',\n httpequiv: 'http-equiv'\n },\n mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],\n properties: {\n // Standard Properties.\n abbr: null,\n accept: commaSeparated,\n acceptCharset: spaceSeparated,\n accessKey: spaceSeparated,\n action: null,\n allow: null,\n allowFullScreen: boolean,\n allowPaymentRequest: boolean,\n allowUserMedia: boolean,\n alt: null,\n as: null,\n async: boolean,\n autoCapitalize: null,\n autoComplete: spaceSeparated,\n autoFocus: boolean,\n autoPlay: boolean,\n blocking: spaceSeparated,\n capture: null,\n charSet: null,\n checked: boolean,\n cite: null,\n className: spaceSeparated,\n cols: number,\n colSpan: null,\n content: null,\n contentEditable: booleanish,\n controls: boolean,\n controlsList: spaceSeparated,\n coords: number | commaSeparated,\n crossOrigin: null,\n data: null,\n dateTime: null,\n decoding: null,\n default: boolean,\n defer: boolean,\n dir: null,\n dirName: null,\n disabled: boolean,\n download: overloadedBoolean,\n draggable: booleanish,\n encType: null,\n enterKeyHint: null,\n fetchPriority: null,\n form: null,\n formAction: null,\n formEncType: null,\n formMethod: null,\n formNoValidate: boolean,\n formTarget: null,\n headers: spaceSeparated,\n height: number,\n hidden: overloadedBoolean,\n high: number,\n href: null,\n hrefLang: null,\n htmlFor: spaceSeparated,\n httpEquiv: spaceSeparated,\n id: null,\n imageSizes: null,\n imageSrcSet: null,\n inert: boolean,\n inputMode: null,\n integrity: null,\n is: null,\n isMap: boolean,\n itemId: null,\n itemProp: spaceSeparated,\n itemRef: spaceSeparated,\n itemScope: boolean,\n itemType: spaceSeparated,\n kind: null,\n label: null,\n lang: null,\n language: null,\n list: null,\n loading: null,\n loop: boolean,\n low: number,\n manifest: null,\n max: null,\n maxLength: number,\n media: null,\n method: null,\n min: null,\n minLength: number,\n multiple: boolean,\n muted: boolean,\n name: null,\n nonce: null,\n noModule: boolean,\n noValidate: boolean,\n onAbort: null,\n onAfterPrint: null,\n onAuxClick: null,\n onBeforeMatch: null,\n onBeforePrint: null,\n onBeforeToggle: null,\n onBeforeUnload: null,\n onBlur: null,\n onCancel: null,\n onCanPlay: null,\n onCanPlayThrough: null,\n onChange: null,\n onClick: null,\n onClose: null,\n onContextLost: null,\n onContextMenu: null,\n onContextRestored: null,\n onCopy: null,\n onCueChange: null,\n onCut: null,\n onDblClick: null,\n onDrag: null,\n onDragEnd: null,\n onDragEnter: null,\n onDragExit: null,\n onDragLeave: null,\n onDragOver: null,\n onDragStart: null,\n onDrop: null,\n onDurationChange: null,\n onEmptied: null,\n onEnded: null,\n onError: null,\n onFocus: null,\n onFormData: null,\n onHashChange: null,\n onInput: null,\n onInvalid: null,\n onKeyDown: null,\n onKeyPress: null,\n onKeyUp: null,\n onLanguageChange: null,\n onLoad: null,\n onLoadedData: null,\n onLoadedMetadata: null,\n onLoadEnd: null,\n onLoadStart: null,\n onMessage: null,\n onMessageError: null,\n onMouseDown: null,\n onMouseEnter: null,\n onMouseLeave: null,\n onMouseMove: null,\n onMouseOut: null,\n onMouseOver: null,\n onMouseUp: null,\n onOffline: null,\n onOnline: null,\n onPageHide: null,\n onPageShow: null,\n onPaste: null,\n onPause: null,\n onPlay: null,\n onPlaying: null,\n onPopState: null,\n onProgress: null,\n onRateChange: null,\n onRejectionHandled: null,\n onReset: null,\n onResize: null,\n onScroll: null,\n onScrollEnd: null,\n onSecurityPolicyViolation: null,\n onSeeked: null,\n onSeeking: null,\n onSelect: null,\n onSlotChange: null,\n onStalled: null,\n onStorage: null,\n onSubmit: null,\n onSuspend: null,\n onTimeUpdate: null,\n onToggle: null,\n onUnhandledRejection: null,\n onUnload: null,\n onVolumeChange: null,\n onWaiting: null,\n onWheel: null,\n open: boolean,\n optimum: number,\n pattern: null,\n ping: spaceSeparated,\n placeholder: null,\n playsInline: boolean,\n popover: null,\n popoverTarget: null,\n popoverTargetAction: null,\n poster: null,\n preload: null,\n readOnly: boolean,\n referrerPolicy: null,\n rel: spaceSeparated,\n required: boolean,\n reversed: boolean,\n rows: number,\n rowSpan: number,\n sandbox: spaceSeparated,\n scope: null,\n scoped: boolean,\n seamless: boolean,\n selected: boolean,\n shadowRootClonable: boolean,\n shadowRootDelegatesFocus: boolean,\n shadowRootMode: null,\n shape: null,\n size: number,\n sizes: null,\n slot: null,\n span: number,\n spellCheck: booleanish,\n src: null,\n srcDoc: null,\n srcLang: null,\n srcSet: null,\n start: number,\n step: null,\n style: null,\n tabIndex: number,\n target: null,\n title: null,\n translate: null,\n type: null,\n typeMustMatch: boolean,\n useMap: null,\n value: booleanish,\n width: number,\n wrap: null,\n writingSuggestions: null,\n\n // Legacy.\n // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis\n align: null, // Several. Use CSS `text-align` instead,\n aLink: null, // `<body>`. Use CSS `a:active {color}` instead\n archive: spaceSeparated, // `<object>`. List of URIs to archives\n axis: null, // `<td>` and `<th>`. Use `scope` on `<th>`\n background: null, // `<body>`. Use CSS `background-image` instead\n bgColor: null, // `<body>` and table elements. Use CSS `background-color` instead\n border: number, // `<table>`. Use CSS `border-width` instead,\n borderColor: null, // `<table>`. Use CSS `border-color` instead,\n bottomMargin: number, // `<body>`\n cellPadding: null, // `<table>`\n cellSpacing: null, // `<table>`\n char: null, // Several table elements. When `align=char`, sets the character to align on\n charOff: null, // Several table elements. When `char`, offsets the alignment\n classId: null, // `<object>`\n clear: null, // `<br>`. Use CSS `clear` instead\n code: null, // `<object>`\n codeBase: null, // `<object>`\n codeType: null, // `<object>`\n color: null, // `<font>` and `<hr>`. Use CSS instead\n compact: boolean, // Lists. Use CSS to reduce space between items instead\n declare: boolean, // `<object>`\n event: null, // `<script>`\n face: null, // `<font>`. Use CSS instead\n frame: null, // `<table>`\n frameBorder: null, // `<iframe>`. Use CSS `border` instead\n hSpace: number, // `<img>` and `<object>`\n leftMargin: number, // `<body>`\n link: null, // `<body>`. Use CSS `a:link {color: *}` instead\n longDesc: null, // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`\n lowSrc: null, // `<img>`. Use a `<picture>`\n marginHeight: number, // `<body>`\n marginWidth: number, // `<body>`\n noResize: boolean, // `<frame>`\n noHref: boolean, // `<area>`. Use no href instead of an explicit `nohref`\n noShade: boolean, // `<hr>`. Use background-color and height instead of borders\n noWrap: boolean, // `<td>` and `<th>`\n object: null, // `<applet>`\n profile: null, // `<head>`\n prompt: null, // `<isindex>`\n rev: null, // `<link>`\n rightMargin: number, // `<body>`\n rules: null, // `<table>`\n scheme: null, // `<meta>`\n scrolling: booleanish, // `<frame>`. Use overflow in the child context\n standby: null, // `<object>`\n summary: null, // `<table>`\n text: null, // `<body>`. Use CSS `color` instead\n topMargin: number, // `<body>`\n valueType: null, // `<param>`\n version: null, // `<html>`. Use a doctype.\n vAlign: null, // Several. Use CSS `vertical-align` instead\n vLink: null, // `<body>`. Use CSS `a:visited {color}` instead\n vSpace: number, // `<img>` and `<object>`\n\n // Non-standard Properties.\n allowTransparency: null,\n autoCorrect: null,\n autoSave: null,\n disablePictureInPicture: boolean,\n disableRemotePlayback: boolean,\n prefix: null,\n property: null,\n results: number,\n security: null,\n unselectable: null\n },\n space: 'html',\n transform: caseInsensitiveTransform\n})\n","import {caseSensitiveTransform} from './util/case-sensitive-transform.js'\nimport {create} from './util/create.js'\nimport {\n boolean,\n commaOrSpaceSeparated,\n commaSeparated,\n number,\n spaceSeparated\n} from './util/types.js'\n\nexport const svg = create({\n attributes: {\n accentHeight: 'accent-height',\n alignmentBaseline: 'alignment-baseline',\n arabicForm: 'arabic-form',\n baselineShift: 'baseline-shift',\n capHeight: 'cap-height',\n className: 'class',\n clipPath: 'clip-path',\n clipRule: 'clip-rule',\n colorInterpolation: 'color-interpolation',\n colorInterpolationFilters: 'color-interpolation-filters',\n colorProfile: 'color-profile',\n colorRendering: 'color-rendering',\n crossOrigin: 'crossorigin',\n dataType: 'datatype',\n dominantBaseline: 'dominant-baseline',\n enableBackground: 'enable-background',\n fillOpacity: 'fill-opacity',\n fillRule: 'fill-rule',\n floodColor: 'flood-color',\n floodOpacity: 'flood-opacity',\n fontFamily: 'font-family',\n fontSize: 'font-size',\n fontSizeAdjust: 'font-size-adjust',\n fontStretch: 'font-stretch',\n fontStyle: 'font-style',\n fontVariant: 'font-variant',\n fontWeight: 'font-weight',\n glyphName: 'glyph-name',\n glyphOrientationHorizontal: 'glyph-orientation-horizontal',\n glyphOrientationVertical: 'glyph-orientation-vertical',\n hrefLang: 'hreflang',\n horizAdvX: 'horiz-adv-x',\n horizOriginX: 'horiz-origin-x',\n horizOriginY: 'horiz-origin-y',\n imageRendering: 'image-rendering',\n letterSpacing: 'letter-spacing',\n lightingColor: 'lighting-color',\n markerEnd: 'marker-end',\n markerMid: 'marker-mid',\n markerStart: 'marker-start',\n navDown: 'nav-down',\n navDownLeft: 'nav-down-left',\n navDownRight: 'nav-down-right',\n navLeft: 'nav-left',\n navNext: 'nav-next',\n navPrev: 'nav-prev',\n navRight: 'nav-right',\n navUp: 'nav-up',\n navUpLeft: 'nav-up-left',\n navUpRight: 'nav-up-right',\n onAbort: 'onabort',\n onActivate: 'onactivate',\n onAfterPrint: 'onafterprint',\n onBeforePrint: 'onbeforeprint',\n onBegin: 'onbegin',\n onCancel: 'oncancel',\n onCanPlay: 'oncanplay',\n onCanPlayThrough: 'oncanplaythrough',\n onChange: 'onchange',\n onClick: 'onclick',\n onClose: 'onclose',\n onCopy: 'oncopy',\n onCueChange: 'oncuechange',\n onCut: 'oncut',\n onDblClick: 'ondblclick',\n onDrag: 'ondrag',\n onDragEnd: 'ondragend',\n onDragEnter: 'ondragenter',\n onDragExit: 'ondragexit',\n onDragLeave: 'ondragleave',\n onDragOver: 'ondragover',\n onDragStart: 'ondragstart',\n onDrop: 'ondrop',\n onDurationChange: 'ondurationchange',\n onEmptied: 'onemptied',\n onEnd: 'onend',\n onEnded: 'onended',\n onError: 'onerror',\n onFocus: 'onfocus',\n onFocusIn: 'onfocusin',\n onFocusOut: 'onfocusout',\n onHashChange: 'onhashchange',\n onInput: 'oninput',\n onInvalid: 'oninvalid',\n onKeyDown: 'onkeydown',\n onKeyPress: 'onkeypress',\n onKeyUp: 'onkeyup',\n onLoad: 'onload',\n onLoadedData: 'onloadeddata',\n onLoadedMetadata: 'onloadedmetadata',\n onLoadStart: 'onloadstart',\n onMessage: 'onmessage',\n onMouseDown: 'onmousedown',\n onMouseEnter: 'onmouseenter',\n onMouseLeave: 'onmouseleave',\n onMouseMove: 'onmousemove',\n onMouseOut: 'onmouseout',\n onMouseOver: 'onmouseover',\n onMouseUp: 'onmouseup',\n onMouseWheel: 'onmousewheel',\n onOffline: 'onoffline',\n onOnline: 'ononline',\n onPageHide: 'onpagehide',\n onPageShow: 'onpageshow',\n onPaste: 'onpaste',\n onPause: 'onpause',\n onPlay: 'onplay',\n onPlaying: 'onplaying',\n onPopState: 'onpopstate',\n onProgress: 'onprogress',\n onRateChange: 'onratechange',\n onRepeat: 'onrepeat',\n onReset: 'onreset',\n onResize: 'onresize',\n onScroll: 'onscroll',\n onSeeked: 'onseeked',\n onSeeking: 'onseeking',\n onSelect: 'onselect',\n onShow: 'onshow',\n onStalled: 'onstalled',\n onStorage: 'onstorage',\n onSubmit: 'onsubmit',\n onSuspend: 'onsuspend',\n onTimeUpdate: 'ontimeupdate',\n onToggle: 'ontoggle',\n onUnload: 'onunload',\n onVolumeChange: 'onvolumechange',\n onWaiting: 'onwaiting',\n onZoom: 'onzoom',\n overlinePosition: 'overline-position',\n overlineThickness: 'overline-thickness',\n paintOrder: 'paint-order',\n panose1: 'panose-1',\n pointerEvents: 'pointer-events',\n referrerPolicy: 'referrerpolicy',\n renderingIntent: 'rendering-intent',\n shapeRendering: 'shape-rendering',\n stopColor: 'stop-color',\n stopOpacity: 'stop-opacity',\n strikethroughPosition: 'strikethrough-position',\n strikethroughThickness: 'strikethrough-thickness',\n strokeDashArray: 'stroke-dasharray',\n strokeDashOffset: 'stroke-dashoffset',\n strokeLineCap: 'stroke-linecap',\n strokeLineJoin: 'stroke-linejoin',\n strokeMiterLimit: 'stroke-miterlimit',\n strokeOpacity: 'stroke-opacity',\n strokeWidth: 'stroke-width',\n tabIndex: 'tabindex',\n textAnchor: 'text-anchor',\n textDecoration: 'text-decoration',\n textRendering: 'text-rendering',\n transformOrigin: 'transform-origin',\n typeOf: 'typeof',\n underlinePosition: 'underline-position',\n underlineThickness: 'underline-thickness',\n unicodeBidi: 'unicode-bidi',\n unicodeRange: 'unicode-range',\n unitsPerEm: 'units-per-em',\n vAlphabetic: 'v-alphabetic',\n vHanging: 'v-hanging',\n vIdeographic: 'v-ideographic',\n vMathematical: 'v-mathematical',\n vectorEffect: 'vector-effect',\n vertAdvY: 'vert-adv-y',\n vertOriginX: 'vert-origin-x',\n vertOriginY: 'vert-origin-y',\n wordSpacing: 'word-spacing',\n writingMode: 'writing-mode',\n xHeight: 'x-height',\n // These were camelcased in Tiny. Now lowercased in SVG 2\n playbackOrder: 'playbackorder',\n timelineBegin: 'timelinebegin'\n },\n properties: {\n about: commaOrSpaceSeparated,\n accentHeight: number,\n accumulate: null,\n additive: null,\n alignmentBaseline: null,\n alphabetic: number,\n amplitude: number,\n arabicForm: null,\n ascent: number,\n attributeName: null,\n attributeType: null,\n azimuth: number,\n bandwidth: null,\n baselineShift: null,\n baseFrequency: null,\n baseProfile: null,\n bbox: null,\n begin: null,\n bias: number,\n by: null,\n calcMode: null,\n capHeight: number,\n className: spaceSeparated,\n clip: null,\n clipPath: null,\n clipPathUnits: null,\n clipRule: null,\n color: null,\n colorInterpolation: null,\n colorInterpolationFilters: null,\n colorProfile: null,\n colorRendering: null,\n content: null,\n contentScriptType: null,\n contentStyleType: null,\n crossOrigin: null,\n cursor: null,\n cx: null,\n cy: null,\n d: null,\n dataType: null,\n defaultAction: null,\n descent: number,\n diffuseConstant: number,\n direction: null,\n display: null,\n dur: null,\n divisor: number,\n dominantBaseline: null,\n download: boolean,\n dx: null,\n dy: null,\n edgeMode: null,\n editable: null,\n elevation: number,\n enableBackground: null,\n end: null,\n event: null,\n exponent: number,\n externalResourcesRequired: null,\n fill: null,\n fillOpacity: number,\n fillRule: null,\n filter: null,\n filterRes: null,\n filterUnits: null,\n floodColor: null,\n floodOpacity: null,\n focusable: null,\n focusHighlight: null,\n fontFamily: null,\n fontSize: null,\n fontSizeAdjust: null,\n fontStretch: null,\n fontStyle: null,\n fontVariant: null,\n fontWeight: null,\n format: null,\n fr: null,\n from: null,\n fx: null,\n fy: null,\n g1: commaSeparated,\n g2: commaSeparated,\n glyphName: commaSeparated,\n glyphOrientationHorizontal: null,\n glyphOrientationVertical: null,\n glyphRef: null,\n gradientTransform: null,\n gradientUnits: null,\n handler: null,\n hanging: number,\n hatchContentUnits: null,\n hatchUnits: null,\n height: null,\n href: null,\n hrefLang: null,\n horizAdvX: number,\n horizOriginX: number,\n horizOriginY: number,\n id: null,\n ideographic: number,\n imageRendering: null,\n initialVisibility: null,\n in: null,\n in2: null,\n intercept: number,\n k: number,\n k1: number,\n k2: number,\n k3: number,\n k4: number,\n kernelMatrix: commaOrSpaceSeparated,\n kernelUnitLength: null,\n keyPoints: null, // SEMI_COLON_SEPARATED\n keySplines: null, // SEMI_COLON_SEPARATED\n keyTimes: null, // SEMI_COLON_SEPARATED\n kerning: null,\n lang: null,\n lengthAdjust: null,\n letterSpacing: null,\n lightingColor: null,\n limitingConeAngle: number,\n local: null,\n markerEnd: null,\n markerMid: null,\n markerStart: null,\n markerHeight: null,\n markerUnits: null,\n markerWidth: null,\n mask: null,\n maskContentUnits: null,\n maskUnits: null,\n mathematical: null,\n max: null,\n media: null,\n mediaCharacterEncoding: null,\n mediaContentEncodings: null,\n mediaSize: number,\n mediaTime: null,\n method: null,\n min: null,\n mode: null,\n name: null,\n navDown: null,\n navDownLeft: null,\n navDownRight: null,\n navLeft: null,\n navNext: null,\n navPrev: null,\n navRight: null,\n navUp: null,\n navUpLeft: null,\n navUpRight: null,\n numOctaves: null,\n observer: null,\n offset: null,\n onAbort: null,\n onActivate: null,\n onAfterPrint: null,\n onBeforePrint: null,\n onBegin: null,\n onCancel: null,\n onCanPlay: null,\n onCanPlayThrough: null,\n onChange: null,\n onClick: null,\n onClose: null,\n onCopy: null,\n onCueChange: null,\n onCut: null,\n onDblClick: null,\n onDrag: null,\n onDragEnd: null,\n onDragEnter: null,\n onDragExit: null,\n onDragLeave: null,\n onDragOver: null,\n onDragStart: null,\n onDrop: null,\n onDurationChange: null,\n onEmptied: null,\n onEnd: null,\n onEnded: null,\n onError: null,\n onFocus: null,\n onFocusIn: null,\n onFocusOut: null,\n onHashChange: null,\n onInput: null,\n onInvalid: null,\n onKeyDown: null,\n onKeyPress: null,\n onKeyUp: null,\n onLoad: null,\n onLoadedData: null,\n onLoadedMetadata: null,\n onLoadStart: null,\n onMessage: null,\n onMouseDown: null,\n onMouseEnter: null,\n onMouseLeave: null,\n onMouseMove: null,\n onMouseOut: null,\n onMouseOver: null,\n onMouseUp: null,\n onMouseWheel: null,\n onOffline: null,\n onOnline: null,\n onPageHide: null,\n onPageShow: null,\n onPaste: null,\n onPause: null,\n onPlay: null,\n onPlaying: null,\n onPopState: null,\n onProgress: null,\n onRateChange: null,\n onRepeat: null,\n onReset: null,\n onResize: null,\n onScroll: null,\n onSeeked: null,\n onSeeking: null,\n onSelect: null,\n onShow: null,\n onStalled: null,\n onStorage: null,\n onSubmit: null,\n onSuspend: null,\n onTimeUpdate: null,\n onToggle: null,\n onUnload: null,\n onVolumeChange: null,\n onWaiting: null,\n onZoom: null,\n opacity: null,\n operator: null,\n order: null,\n orient: null,\n orientation: null,\n origin: null,\n overflow: null,\n overlay: null,\n overlinePosition: number,\n overlineThickness: number,\n paintOrder: null,\n panose1: null,\n path: null,\n pathLength: number,\n patternContentUnits: null,\n patternTransform: null,\n patternUnits: null,\n phase: null,\n ping: spaceSeparated,\n pitch: null,\n playbackOrder: null,\n pointerEvents: null,\n points: null,\n pointsAtX: number,\n pointsAtY: number,\n pointsAtZ: number,\n preserveAlpha: null,\n preserveAspectRatio: null,\n primitiveUnits: null,\n propagate: null,\n property: commaOrSpaceSeparated,\n r: null,\n radius: null,\n referrerPolicy: null,\n refX: null,\n refY: null,\n rel: commaOrSpaceSeparated,\n rev: commaOrSpaceSeparated,\n renderingIntent: null,\n repeatCount: null,\n repeatDur: null,\n requiredExtensions: commaOrSpaceSeparated,\n requiredFeatures: commaOrSpaceSeparated,\n requiredFonts: commaOrSpaceSeparated,\n requiredFormats: commaOrSpaceSeparated,\n resource: null,\n restart: null,\n result: null,\n rotate: null,\n rx: null,\n ry: null,\n scale: null,\n seed: null,\n shapeRendering: null,\n side: null,\n slope: null,\n snapshotTime: null,\n specularConstant: number,\n specularExponent: number,\n spreadMethod: null,\n spacing: null,\n startOffset: null,\n stdDeviation: null,\n stemh: null,\n stemv: null,\n stitchTiles: null,\n stopColor: null,\n stopOpacity: null,\n strikethroughPosition: number,\n strikethroughThickness: number,\n string: null,\n stroke: null,\n strokeDashArray: commaOrSpaceSeparated,\n strokeDashOffset: null,\n strokeLineCap: null,\n strokeLineJoin: null,\n strokeMiterLimit: number,\n strokeOpacity: number,\n strokeWidth: null,\n style: null,\n surfaceScale: number,\n syncBehavior: null,\n syncBehaviorDefault: null,\n syncMaster: null,\n syncTolerance: null,\n syncToleranceDefault: null,\n systemLanguage: commaOrSpaceSeparated,\n tabIndex: number,\n tableValues: null,\n target: null,\n targetX: number,\n targetY: number,\n textAnchor: null,\n textDecoration: null,\n textRendering: null,\n textLength: null,\n timelineBegin: null,\n title: null,\n transformBehavior: null,\n type: null,\n typeOf: commaOrSpaceSeparated,\n to: null,\n transform: null,\n transformOrigin: null,\n u1: null,\n u2: null,\n underlinePosition: number,\n underlineThickness: number,\n unicode: null,\n unicodeBidi: null,\n unicodeRange: null,\n unitsPerEm: number,\n values: null,\n vAlphabetic: number,\n vMathematical: number,\n vectorEffect: null,\n vHanging: number,\n vIdeographic: number,\n version: null,\n vertAdvY: number,\n vertOriginX: number,\n vertOriginY: number,\n viewBox: null,\n viewTarget: null,\n visibility: null,\n width: null,\n widths: null,\n wordSpacing: null,\n writingMode: null,\n x: null,\n x1: null,\n x2: null,\n xChannelSelector: null,\n xHeight: number,\n y: null,\n y1: null,\n y2: null,\n yChannelSelector: null,\n z: null,\n zoomAndPan: null\n },\n space: 'svg',\n transform: caseSensitiveTransform\n})\n","import {create} from './util/create.js'\n\nexport const xlink = create({\n properties: {\n xLinkActuate: null,\n xLinkArcRole: null,\n xLinkHref: null,\n xLinkRole: null,\n xLinkShow: null,\n xLinkTitle: null,\n xLinkType: null\n },\n space: 'xlink',\n transform(_, property) {\n return 'xlink:' + property.slice(5).toLowerCase()\n }\n})\n","import {create} from './util/create.js'\nimport {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\n\nexport const xmlns = create({\n attributes: {xmlnsxlink: 'xmlns:xlink'},\n properties: {xmlnsXLink: null, xmlns: null},\n space: 'xmlns',\n transform: caseInsensitiveTransform\n})\n","import {create} from './util/create.js'\n\nexport const xml = create({\n properties: {xmlBase: null, xmlLang: null, xmlSpace: null},\n space: 'xml',\n transform(_, property) {\n return 'xml:' + property.slice(3).toLowerCase()\n }\n})\n","/**\n * Special cases for React (`Record<string, string>`).\n *\n * `hast` is close to `React` but differs in a couple of cases.\n * To get a React property from a hast property,\n * check if it is in `hastToReact`.\n * If it is, use the corresponding value;\n * otherwise, use the hast property.\n *\n * @type {Record<string, string>}\n */\nexport const hastToReact = {\n classId: 'classID',\n dataType: 'datatype',\n itemId: 'itemID',\n strokeDashArray: 'strokeDasharray',\n strokeDashOffset: 'strokeDashoffset',\n strokeLineCap: 'strokeLinecap',\n strokeLineJoin: 'strokeLinejoin',\n strokeMiterLimit: 'strokeMiterlimit',\n typeOf: 'typeof',\n xLinkActuate: 'xlinkActuate',\n xLinkArcRole: 'xlinkArcrole',\n xLinkHref: 'xlinkHref',\n xLinkRole: 'xlinkRole',\n xLinkShow: 'xlinkShow',\n xLinkTitle: 'xlinkTitle',\n xLinkType: 'xlinkType',\n xmlnsXLink: 'xmlnsXlink'\n}\n","/**\n * @import {Schema} from 'property-information'\n */\n\nimport {DefinedInfo} from './util/defined-info.js'\nimport {Info} from './util/info.js'\nimport {normalize} from './normalize.js'\n\nconst cap = /[A-Z]/g\nconst dash = /-[a-z]/g\nconst valid = /^data[-\\w.:]+$/i\n\n/**\n * Look up info on a property.\n *\n * In most cases the given `schema` contains info on the property.\n * All standard,\n * most legacy,\n * and some non-standard properties are supported.\n * For these cases,\n * the returned `Info` has hints about the value of the property.\n *\n * `name` can also be a valid data attribute or property,\n * in which case an `Info` object with the correctly cased `attribute` and\n * `property` is returned.\n *\n * `name` can be an unknown attribute,\n * in which case an `Info` object with `attribute` and `property` set to the\n * given name is returned.\n * It is not recommended to provide unsupported legacy or recently specced\n * properties.\n *\n *\n * @param {Schema} schema\n * Schema;\n * either the `html` or `svg` export.\n * @param {string} value\n * An attribute-like or property-like name;\n * it will be passed through `normalize` to hopefully find the correct info.\n * @returns {Info}\n * Info.\n */\nexport function find(schema, value) {\n const normal = normalize(value)\n let property = value\n let Type = Info\n\n if (normal in schema.normal) {\n return schema.property[schema.normal[normal]]\n }\n\n if (normal.length > 4 && normal.slice(0, 4) === 'data' && valid.test(value)) {\n // Attribute or property.\n if (value.charAt(4) === '-') {\n // Turn it into a property.\n const rest = value.slice(5).replace(dash, camelcase)\n property = 'data' + rest.charAt(0).toUpperCase() + rest.slice(1)\n } else {\n // Turn it into an attribute.\n const rest = value.slice(4)\n\n if (!dash.test(rest)) {\n let dashes = rest.replace(cap, kebab)\n\n if (dashes.charAt(0) !== '-') {\n dashes = '-' + dashes\n }\n\n value = 'data' + dashes\n }\n }\n\n Type = DefinedInfo\n }\n\n return new Type(property, value)\n}\n\n/**\n * @param {string} $0\n * Value.\n * @returns {string}\n * Kebab.\n */\nfunction kebab($0) {\n return '-' + $0.toLowerCase()\n}\n\n/**\n * @param {string} $0\n * Value.\n * @returns {string}\n * Camel.\n */\nfunction camelcase($0) {\n return $0.charAt(1).toUpperCase()\n}\n","// Note: types exposed from `index.d.ts`.\nimport {merge} from './lib/util/merge.js'\nimport {aria} from './lib/aria.js'\nimport {html as htmlBase} from './lib/html.js'\nimport {svg as svgBase} from './lib/svg.js'\nimport {xlink} from './lib/xlink.js'\nimport {xmlns} from './lib/xmlns.js'\nimport {xml} from './lib/xml.js'\n\nexport {hastToReact} from './lib/hast-to-react.js'\n\nexport const html = merge([aria, htmlBase, xlink, xmlns, xml], 'html')\n\nexport {find} from './lib/find.js'\nexport {normalize} from './lib/normalize.js'\n\nexport const svg = merge([aria, svgBase, xlink, xmlns, xml], 'svg')\n","/**\n * Parse space-separated tokens to an array of strings.\n *\n * @param {string} value\n * Space-separated tokens.\n * @returns {Array<string>}\n * List of tokens.\n */\nexport function parse(value) {\n const input = String(value || '').trim()\n return input ? input.split(/[ \\t\\n\\r\\f]+/g) : []\n}\n\n/**\n * Serialize an array of strings as space separated-tokens.\n *\n * @param {Array<string|number>} values\n * List of tokens.\n * @returns {string}\n * Space-separated tokens.\n */\nexport function stringify(values) {\n return values.join(' ').trim()\n}\n","'use strict';\n\n// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nfunction index (style, options) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n if (!style) return [];\n\n options = options || {};\n\n /**\n * Positional.\n */\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */\n function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */\n function position() {\n var start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string.\n */\n Position.prototype.content = style;\n\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */\n function error(msg) {\n var err = new Error(\n options.source + ':' + lineno + ':' + column + ': ' + msg\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n\n if (options.silent) ; else {\n throw err;\n }\n }\n\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */\n function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n function whitespace() {\n match(WHITESPACE_REGEX);\n }\n\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */\n function comments(rules) {\n var c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */\n function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n var i = 2;\n while (\n EMPTY_STRING != style.charAt(i) &&\n (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n ) {\n ++i;\n }\n i += 2;\n\n if (EMPTY_STRING === style.charAt(i - 1)) {\n return error('End of comment missing');\n }\n\n var str = style.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n style = style.slice(i);\n column += 2;\n\n return pos({\n type: TYPE_COMMENT,\n comment: str\n });\n }\n\n /**\n * Parse declaration.\n *\n * @return {Object}\n * @throws {Error}\n */\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(PROPERTY_REGEX);\n if (!prop) return;\n comment();\n\n // :\n if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n // val\n var val = match(VALUE_REGEX);\n\n var ret = pos({\n type: TYPE_DECLARATION,\n property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n value: val\n ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n : EMPTY_STRING\n });\n\n // ;\n match(SEMICOLON_REGEX);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n *\n * @return {Object[]}\n */\n function declarations() {\n var decls = [];\n\n comments(decls);\n\n // declarations\n var decl;\n while ((decl = declaration())) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n return decls;\n }\n\n whitespace();\n return declarations();\n}\n\n/**\n * Trim `str`.\n *\n * @param {String} str\n * @return {String}\n */\nfunction trim(str) {\n return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;\n}\n\nmodule.exports = index;\n//# sourceMappingURL=index.js.map\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = StyleToObject;\nconst inline_style_parser_1 = __importDefault(require(\"inline-style-parser\"));\n/**\n * Parses inline style to object.\n *\n * @param style - Inline style.\n * @param iterator - Iterator.\n * @returns - Style object or null.\n *\n * @example Parsing inline style to object:\n *\n * ```js\n * import parse from 'style-to-object';\n * parse('line-height: 42;'); // { 'line-height': '42' }\n * ```\n */\nfunction StyleToObject(style, iterator) {\n let styleObject = null;\n if (!style || typeof style !== 'string') {\n return styleObject;\n }\n const declarations = (0, inline_style_parser_1.default)(style);\n const hasIterator = typeof iterator === 'function';\n declarations.forEach((declaration) => {\n if (declaration.type !== 'declaration') {\n return;\n }\n const { property, value } = declaration;\n if (hasIterator) {\n iterator(property, value, declaration);\n }\n else if (value) {\n styleObject = styleObject || {};\n styleObject[property] = value;\n }\n });\n return styleObject;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.camelCase = void 0;\nvar CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;\nvar HYPHEN_REGEX = /-([a-z])/g;\nvar NO_HYPHEN_REGEX = /^[^-]+$/;\nvar VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;\nvar MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;\n/**\n * Checks whether to skip camelCase.\n */\nvar skipCamelCase = function (property) {\n return !property ||\n NO_HYPHEN_REGEX.test(property) ||\n CUSTOM_PROPERTY_REGEX.test(property);\n};\n/**\n * Replacer that capitalizes first character.\n */\nvar capitalize = function (match, character) {\n return character.toUpperCase();\n};\n/**\n * Replacer that removes beginning hyphen of vendor prefix property.\n */\nvar trimHyphen = function (match, prefix) { return \"\".concat(prefix, \"-\"); };\n/**\n * CamelCases a CSS property.\n */\nvar camelCase = function (property, options) {\n if (options === void 0) { options = {}; }\n if (skipCamelCase(property)) {\n return property;\n }\n property = property.toLowerCase();\n if (options.reactCompat) {\n // `-ms` vendor prefix should not be capitalized\n property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);\n }\n else {\n // for non-React, remove first hyphen so vendor prefix is not capitalized\n property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);\n }\n return property.replace(HYPHEN_REGEX, capitalize);\n};\nexports.camelCase = camelCase;\n//# sourceMappingURL=utilities.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar style_to_object_1 = __importDefault(require(\"style-to-object\"));\nvar utilities_1 = require(\"./utilities\");\n/**\n * Parses CSS inline style to JavaScript object (camelCased).\n */\nfunction StyleToJS(style, options) {\n var output = {};\n if (!style || typeof style !== 'string') {\n return output;\n }\n (0, style_to_object_1.default)(style, function (property, value) {\n // skip CSS comment\n if (property && value) {\n output[(0, utilities_1.camelCase)(property, options)] = value;\n }\n });\n return output;\n}\nStyleToJS.default = StyleToJS;\nmodule.exports = StyleToJS;\n//# sourceMappingURL=index.js.map","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n */\n\n/**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n */\n\n/**\n * Get the ending point of `node`.\n *\n * @param node\n * Node.\n * @returns\n * Point.\n */\nexport const pointEnd = point('end')\n\n/**\n * Get the starting point of `node`.\n *\n * @param node\n * Node.\n * @returns\n * Point.\n */\nexport const pointStart = point('start')\n\n/**\n * Get the positional info of `node`.\n *\n * @param {'end' | 'start'} type\n * Side.\n * @returns\n * Getter.\n */\nfunction point(type) {\n return point\n\n /**\n * Get the point info of `node` at a bound side.\n *\n * @param {Node | NodeLike | null | undefined} [node]\n * @returns {Point | undefined}\n */\n function point(node) {\n const point = (node && node.position && node.position[type]) || {}\n\n if (\n typeof point.line === 'number' &&\n point.line > 0 &&\n typeof point.column === 'number' &&\n point.column > 0\n ) {\n return {\n line: point.line,\n column: point.column,\n offset:\n typeof point.offset === 'number' && point.offset > -1\n ? point.offset\n : undefined\n }\n }\n }\n}\n\n/**\n * Get the positional info of `node`.\n *\n * @param {Node | NodeLike | null | undefined} [node]\n * Node.\n * @returns {Position | undefined}\n * Position.\n */\nexport function position(node) {\n const start = pointStart(node)\n const end = pointEnd(node)\n\n if (start && end) {\n return {start, end}\n }\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n */\n\n/**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n */\n\n/**\n * Serialize the positional info of a point, position (start and end points),\n * or node.\n *\n * @param {Node | NodeLike | Point | PointLike | Position | PositionLike | null | undefined} [value]\n * Node, position, or point.\n * @returns {string}\n * Pretty printed positional info of a node (`string`).\n *\n * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)\n * or a point `l:c` (when given `point`), where `l` stands for line, `c` for\n * column, `s` for `start`, and `e` for end.\n * An empty string (`''`) is returned if the given value is neither `node`,\n * `position`, nor `point`.\n */\nexport function stringifyPosition(value) {\n // Nothing.\n if (!value || typeof value !== 'object') {\n return ''\n }\n\n // Node.\n if ('position' in value || 'type' in value) {\n return position(value.position)\n }\n\n // Position.\n if ('start' in value || 'end' in value) {\n return position(value)\n }\n\n // Point.\n if ('line' in value || 'column' in value) {\n return point(value)\n }\n\n // ?\n return ''\n}\n\n/**\n * @param {Point | PointLike | null | undefined} point\n * @returns {string}\n */\nfunction point(point) {\n return index(point && point.line) + ':' + index(point && point.column)\n}\n\n/**\n * @param {Position | PositionLike | null | undefined} pos\n * @returns {string}\n */\nfunction position(pos) {\n return point(pos && pos.start) + '-' + point(pos && pos.end)\n}\n\n/**\n * @param {number | null | undefined} value\n * @returns {number}\n */\nfunction index(value) {\n return value && typeof value === 'number' ? value : 1\n}\n","/**\n * @import {Node, Point, Position} from 'unist'\n */\n\n/**\n * @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n *\n * @typedef Options\n * Configuration.\n * @property {Array<Node> | null | undefined} [ancestors]\n * Stack of (inclusive) ancestor nodes surrounding the message (optional).\n * @property {Error | null | undefined} [cause]\n * Original error cause of the message (optional).\n * @property {Point | Position | null | undefined} [place]\n * Place of message (optional).\n * @property {string | null | undefined} [ruleId]\n * Category of message (optional, example: `'my-rule'`).\n * @property {string | null | undefined} [source]\n * Namespace of who sent the message (optional, example: `'my-package'`).\n */\n\nimport {stringifyPosition} from 'unist-util-stringify-position'\n\n/**\n * Message.\n */\nexport class VFileMessage extends Error {\n /**\n * Create a message for `reason`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {Options | null | undefined} [options]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns\n * Instance of `VFileMessage`.\n */\n // eslint-disable-next-line complexity\n constructor(causeOrReason, optionsOrParentOrPlace, origin) {\n super()\n\n if (typeof optionsOrParentOrPlace === 'string') {\n origin = optionsOrParentOrPlace\n optionsOrParentOrPlace = undefined\n }\n\n /** @type {string} */\n let reason = ''\n /** @type {Options} */\n let options = {}\n let legacyCause = false\n\n if (optionsOrParentOrPlace) {\n // Point.\n if (\n 'line' in optionsOrParentOrPlace &&\n 'column' in optionsOrParentOrPlace\n ) {\n options = {place: optionsOrParentOrPlace}\n }\n // Position.\n else if (\n 'start' in optionsOrParentOrPlace &&\n 'end' in optionsOrParentOrPlace\n ) {\n options = {place: optionsOrParentOrPlace}\n }\n // Node.\n else if ('type' in optionsOrParentOrPlace) {\n options = {\n ancestors: [optionsOrParentOrPlace],\n place: optionsOrParentOrPlace.position\n }\n }\n // Options.\n else {\n options = {...optionsOrParentOrPlace}\n }\n }\n\n if (typeof causeOrReason === 'string') {\n reason = causeOrReason\n }\n // Error.\n else if (!options.cause && causeOrReason) {\n legacyCause = true\n reason = causeOrReason.message\n options.cause = causeOrReason\n }\n\n if (!options.ruleId && !options.source && typeof origin === 'string') {\n const index = origin.indexOf(':')\n\n if (index === -1) {\n options.ruleId = origin\n } else {\n options.source = origin.slice(0, index)\n options.ruleId = origin.slice(index + 1)\n }\n }\n\n if (!options.place && options.ancestors && options.ancestors) {\n const parent = options.ancestors[options.ancestors.length - 1]\n\n if (parent) {\n options.place = parent.position\n }\n }\n\n const start =\n options.place && 'start' in options.place\n ? options.place.start\n : options.place\n\n /**\n * Stack of ancestor nodes surrounding the message.\n *\n * @type {Array<Node> | undefined}\n */\n this.ancestors = options.ancestors || undefined\n\n /**\n * Original error cause of the message.\n *\n * @type {Error | undefined}\n */\n this.cause = options.cause || undefined\n\n /**\n * Starting column of message.\n *\n * @type {number | undefined}\n */\n this.column = start ? start.column : undefined\n\n /**\n * State of problem.\n *\n * * `true` — error, file not usable\n * * `false` — warning, change may be needed\n * * `undefined` — change likely not needed\n *\n * @type {boolean | null | undefined}\n */\n this.fatal = undefined\n\n /**\n * Path of a file (used throughout the `VFile` ecosystem).\n *\n * @type {string | undefined}\n */\n this.file = ''\n\n // Field from `Error`.\n /**\n * Reason for message.\n *\n * @type {string}\n */\n this.message = reason\n\n /**\n * Starting line of error.\n *\n * @type {number | undefined}\n */\n this.line = start ? start.line : undefined\n\n // Field from `Error`.\n /**\n * Serialized positional info of message.\n *\n * On normal errors, this would be something like `ParseError`, buit in\n * `VFile` messages we use this space to show where an error happened.\n */\n this.name = stringifyPosition(options.place) || '1:1'\n\n /**\n * Place of message.\n *\n * @type {Point | Position | undefined}\n */\n this.place = options.place || undefined\n\n /**\n * Reason for message, should use markdown.\n *\n * @type {string}\n */\n this.reason = this.message\n\n /**\n * Category of message (example: `'my-rule'`).\n *\n * @type {string | undefined}\n */\n this.ruleId = options.ruleId || undefined\n\n /**\n * Namespace of message (example: `'my-package'`).\n *\n * @type {string | undefined}\n */\n this.source = options.source || undefined\n\n // Field from `Error`.\n /**\n * Stack of message.\n *\n * This is used by normal errors to show where something happened in\n * programming code, irrelevant for `VFile` messages,\n *\n * @type {string}\n */\n this.stack =\n legacyCause && options.cause && typeof options.cause.stack === 'string'\n ? options.cause.stack\n : ''\n\n // The following fields are “well known”.\n // Not standard.\n // Feel free to add other non-standard fields to your messages.\n\n /**\n * Specify the source value that’s being reported, which is deemed\n * incorrect.\n *\n * @type {string | undefined}\n */\n this.actual = undefined\n\n /**\n * Suggest acceptable values that can be used instead of `actual`.\n *\n * @type {Array<string> | undefined}\n */\n this.expected = undefined\n\n /**\n * Long form description of the message (you should use markdown).\n *\n * @type {string | undefined}\n */\n this.note = undefined\n\n /**\n * Link to docs for the message.\n *\n * > 👉 **Note**: this must be an absolute URL that can be passed as `x`\n * > to `new URL(x)`.\n *\n * @type {string | undefined}\n */\n this.url = undefined\n }\n}\n\nVFileMessage.prototype.file = ''\nVFileMessage.prototype.name = ''\nVFileMessage.prototype.reason = ''\nVFileMessage.prototype.message = ''\nVFileMessage.prototype.stack = ''\nVFileMessage.prototype.column = undefined\nVFileMessage.prototype.line = undefined\nVFileMessage.prototype.ancestors = undefined\nVFileMessage.prototype.cause = undefined\nVFileMessage.prototype.fatal = undefined\nVFileMessage.prototype.place = undefined\nVFileMessage.prototype.ruleId = undefined\nVFileMessage.prototype.source = undefined\n","/**\n * @import {Identifier, Literal, MemberExpression} from 'estree'\n * @import {Jsx, JsxDev, Options, Props} from 'hast-util-to-jsx-runtime'\n * @import {Element, Nodes, Parents, Root, Text} from 'hast'\n * @import {MdxFlowExpressionHast, MdxTextExpressionHast} from 'mdast-util-mdx-expression'\n * @import {MdxJsxFlowElementHast, MdxJsxTextElementHast} from 'mdast-util-mdx-jsx'\n * @import {MdxjsEsmHast} from 'mdast-util-mdxjs-esm'\n * @import {Position} from 'unist'\n * @import {Child, Create, Field, JsxElement, State, Style} from './types.js'\n */\n\nimport {stringify as commas} from 'comma-separated-tokens'\nimport {ok as assert} from 'devlop'\nimport {name as isIdentifierName} from 'estree-util-is-identifier-name'\nimport {whitespace} from 'hast-util-whitespace'\nimport {find, hastToReact, html, svg} from 'property-information'\nimport {stringify as spaces} from 'space-separated-tokens'\nimport styleToJs from 'style-to-js'\nimport {pointStart} from 'unist-util-position'\nimport {VFileMessage} from 'vfile-message'\n\n// To do: next major: `Object.hasOwn`.\nconst own = {}.hasOwnProperty\n\n/** @type {Map<string, number>} */\nconst emptyMap = new Map()\n\nconst cap = /[A-Z]/g\n\n// `react-dom` triggers a warning for *any* white space in tables.\n// To follow GFM, `mdast-util-to-hast` injects line endings between elements.\n// Other tools might do so too, but they don’t do here, so we remove all of\n// that.\n\n// See: <https://github.com/facebook/react/pull/7081>.\n// See: <https://github.com/facebook/react/pull/7515>.\n// See: <https://github.com/remarkjs/remark-react/issues/64>.\n// See: <https://github.com/rehypejs/rehype-react/pull/29>.\n// See: <https://github.com/rehypejs/rehype-react/pull/32>.\n// See: <https://github.com/rehypejs/rehype-react/pull/45>.\nconst tableElements = new Set(['table', 'tbody', 'thead', 'tfoot', 'tr'])\n\nconst tableCellElement = new Set(['td', 'th'])\n\nconst docs = 'https://github.com/syntax-tree/hast-util-to-jsx-runtime'\n\n/**\n * Transform a hast tree to preact, react, solid, svelte, vue, etc.,\n * with an automatic JSX runtime.\n *\n * @param {Nodes} tree\n * Tree to transform.\n * @param {Options} options\n * Configuration (required).\n * @returns {JsxElement}\n * JSX element.\n */\n\nexport function toJsxRuntime(tree, options) {\n if (!options || options.Fragment === undefined) {\n throw new TypeError('Expected `Fragment` in options')\n }\n\n const filePath = options.filePath || undefined\n /** @type {Create} */\n let create\n\n if (options.development) {\n if (typeof options.jsxDEV !== 'function') {\n throw new TypeError(\n 'Expected `jsxDEV` in options when `development: true`'\n )\n }\n\n create = developmentCreate(filePath, options.jsxDEV)\n } else {\n if (typeof options.jsx !== 'function') {\n throw new TypeError('Expected `jsx` in production options')\n }\n\n if (typeof options.jsxs !== 'function') {\n throw new TypeError('Expected `jsxs` in production options')\n }\n\n create = productionCreate(filePath, options.jsx, options.jsxs)\n }\n\n /** @type {State} */\n const state = {\n Fragment: options.Fragment,\n ancestors: [],\n components: options.components || {},\n create,\n elementAttributeNameCase: options.elementAttributeNameCase || 'react',\n evaluater: options.createEvaluater ? options.createEvaluater() : undefined,\n filePath,\n ignoreInvalidStyle: options.ignoreInvalidStyle || false,\n passKeys: options.passKeys !== false,\n passNode: options.passNode || false,\n schema: options.space === 'svg' ? svg : html,\n stylePropertyNameCase: options.stylePropertyNameCase || 'dom',\n tableCellAlignToStyle: options.tableCellAlignToStyle !== false\n }\n\n const result = one(state, tree, undefined)\n\n // JSX element.\n if (result && typeof result !== 'string') {\n return result\n }\n\n // Text node or something that turned into nothing.\n return state.create(\n tree,\n state.Fragment,\n {children: result || undefined},\n undefined\n )\n}\n\n/**\n * Transform a node.\n *\n * @param {State} state\n * Info passed around.\n * @param {Nodes} node\n * Current node.\n * @param {string | undefined} key\n * Key.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction one(state, node, key) {\n if (node.type === 'element') {\n return element(state, node, key)\n }\n\n if (node.type === 'mdxFlowExpression' || node.type === 'mdxTextExpression') {\n return mdxExpression(state, node)\n }\n\n if (node.type === 'mdxJsxFlowElement' || node.type === 'mdxJsxTextElement') {\n return mdxJsxElement(state, node, key)\n }\n\n if (node.type === 'mdxjsEsm') {\n return mdxEsm(state, node)\n }\n\n if (node.type === 'root') {\n return root(state, node, key)\n }\n\n if (node.type === 'text') {\n return text(state, node)\n }\n}\n\n/**\n * Handle element.\n *\n * @param {State} state\n * Info passed around.\n * @param {Element} node\n * Current node.\n * @param {string | undefined} key\n * Key.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction element(state, node, key) {\n const parentSchema = state.schema\n let schema = parentSchema\n\n if (node.tagName.toLowerCase() === 'svg' && parentSchema.space === 'html') {\n schema = svg\n state.schema = schema\n }\n\n state.ancestors.push(node)\n\n const type = findComponentFromName(state, node.tagName, false)\n const props = createElementProps(state, node)\n let children = createChildren(state, node)\n\n if (tableElements.has(node.tagName)) {\n children = children.filter(function (child) {\n return typeof child === 'string' ? !whitespace(child) : true\n })\n }\n\n addNode(state, props, type, node)\n addChildren(props, children)\n\n // Restore.\n state.ancestors.pop()\n state.schema = parentSchema\n\n return state.create(node, type, props, key)\n}\n\n/**\n * Handle MDX expression.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdxFlowExpressionHast | MdxTextExpressionHast} node\n * Current node.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction mdxExpression(state, node) {\n if (node.data && node.data.estree && state.evaluater) {\n const program = node.data.estree\n const expression = program.body[0]\n assert(expression.type === 'ExpressionStatement')\n\n // Assume result is a child.\n return /** @type {Child | undefined} */ (\n state.evaluater.evaluateExpression(expression.expression)\n )\n }\n\n crashEstree(state, node.position)\n}\n\n/**\n * Handle MDX ESM.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdxjsEsmHast} node\n * Current node.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction mdxEsm(state, node) {\n if (node.data && node.data.estree && state.evaluater) {\n // Assume result is a child.\n return /** @type {Child | undefined} */ (\n state.evaluater.evaluateProgram(node.data.estree)\n )\n }\n\n crashEstree(state, node.position)\n}\n\n/**\n * Handle MDX JSX.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdxJsxFlowElementHast | MdxJsxTextElementHast} node\n * Current node.\n * @param {string | undefined} key\n * Key.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction mdxJsxElement(state, node, key) {\n const parentSchema = state.schema\n let schema = parentSchema\n\n if (node.name === 'svg' && parentSchema.space === 'html') {\n schema = svg\n state.schema = schema\n }\n\n state.ancestors.push(node)\n\n const type =\n node.name === null\n ? state.Fragment\n : findComponentFromName(state, node.name, true)\n const props = createJsxElementProps(state, node)\n const children = createChildren(state, node)\n\n addNode(state, props, type, node)\n addChildren(props, children)\n\n // Restore.\n state.ancestors.pop()\n state.schema = parentSchema\n\n return state.create(node, type, props, key)\n}\n\n/**\n * Handle root.\n *\n * @param {State} state\n * Info passed around.\n * @param {Root} node\n * Current node.\n * @param {string | undefined} key\n * Key.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction root(state, node, key) {\n /** @type {Props} */\n const props = {}\n\n addChildren(props, createChildren(state, node))\n\n return state.create(node, state.Fragment, props, key)\n}\n\n/**\n * Handle text.\n *\n * @param {State} _\n * Info passed around.\n * @param {Text} node\n * Current node.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction text(_, node) {\n return node.value\n}\n\n/**\n * Add `node` to props.\n *\n * @param {State} state\n * Info passed around.\n * @param {Props} props\n * Props.\n * @param {unknown} type\n * Type.\n * @param {Element | MdxJsxFlowElementHast | MdxJsxTextElementHast} node\n * Node.\n * @returns {undefined}\n * Nothing.\n */\nfunction addNode(state, props, type, node) {\n // If this is swapped out for a component:\n if (typeof type !== 'string' && type !== state.Fragment && state.passNode) {\n props.node = node\n }\n}\n\n/**\n * Add children to props.\n *\n * @param {Props} props\n * Props.\n * @param {Array<Child>} children\n * Children.\n * @returns {undefined}\n * Nothing.\n */\nfunction addChildren(props, children) {\n if (children.length > 0) {\n const value = children.length > 1 ? children : children[0]\n\n if (value) {\n props.children = value\n }\n }\n}\n\n/**\n * @param {string | undefined} _\n * Path to file.\n * @param {Jsx} jsx\n * Dynamic.\n * @param {Jsx} jsxs\n * Static.\n * @returns {Create}\n * Create a production element.\n */\nfunction productionCreate(_, jsx, jsxs) {\n return create\n /** @type {Create} */\n function create(_, type, props, key) {\n // Only an array when there are 2 or more children.\n const isStaticChildren = Array.isArray(props.children)\n const fn = isStaticChildren ? jsxs : jsx\n return key ? fn(type, props, key) : fn(type, props)\n }\n}\n\n/**\n * @param {string | undefined} filePath\n * Path to file.\n * @param {JsxDev} jsxDEV\n * Development.\n * @returns {Create}\n * Create a development element.\n */\nfunction developmentCreate(filePath, jsxDEV) {\n return create\n /** @type {Create} */\n function create(node, type, props, key) {\n // Only an array when there are 2 or more children.\n const isStaticChildren = Array.isArray(props.children)\n const point = pointStart(node)\n return jsxDEV(\n type,\n props,\n key,\n isStaticChildren,\n {\n columnNumber: point ? point.column - 1 : undefined,\n fileName: filePath,\n lineNumber: point ? point.line : undefined\n },\n undefined\n )\n }\n}\n\n/**\n * Create props from an element.\n *\n * @param {State} state\n * Info passed around.\n * @param {Element} node\n * Current element.\n * @returns {Props}\n * Props.\n */\nfunction createElementProps(state, node) {\n /** @type {Props} */\n const props = {}\n /** @type {string | undefined} */\n let alignValue\n /** @type {string} */\n let prop\n\n for (prop in node.properties) {\n if (prop !== 'children' && own.call(node.properties, prop)) {\n const result = createProperty(state, prop, node.properties[prop])\n\n if (result) {\n const [key, value] = result\n\n if (\n state.tableCellAlignToStyle &&\n key === 'align' &&\n typeof value === 'string' &&\n tableCellElement.has(node.tagName)\n ) {\n alignValue = value\n } else {\n props[key] = value\n }\n }\n }\n }\n\n if (alignValue) {\n // Assume style is an object.\n const style = /** @type {Style} */ (props.style || (props.style = {}))\n style[state.stylePropertyNameCase === 'css' ? 'text-align' : 'textAlign'] =\n alignValue\n }\n\n return props\n}\n\n/**\n * Create props from a JSX element.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdxJsxFlowElementHast | MdxJsxTextElementHast} node\n * Current JSX element.\n * @returns {Props}\n * Props.\n */\nfunction createJsxElementProps(state, node) {\n /** @type {Props} */\n const props = {}\n\n for (const attribute of node.attributes) {\n if (attribute.type === 'mdxJsxExpressionAttribute') {\n if (attribute.data && attribute.data.estree && state.evaluater) {\n const program = attribute.data.estree\n const expression = program.body[0]\n assert(expression.type === 'ExpressionStatement')\n const objectExpression = expression.expression\n assert(objectExpression.type === 'ObjectExpression')\n const property = objectExpression.properties[0]\n assert(property.type === 'SpreadElement')\n\n Object.assign(\n props,\n state.evaluater.evaluateExpression(property.argument)\n )\n } else {\n crashEstree(state, node.position)\n }\n } else {\n // For JSX, the author is responsible of passing in the correct values.\n const name = attribute.name\n /** @type {unknown} */\n let value\n\n if (attribute.value && typeof attribute.value === 'object') {\n if (\n attribute.value.data &&\n attribute.value.data.estree &&\n state.evaluater\n ) {\n const program = attribute.value.data.estree\n const expression = program.body[0]\n assert(expression.type === 'ExpressionStatement')\n value = state.evaluater.evaluateExpression(expression.expression)\n } else {\n crashEstree(state, node.position)\n }\n } else {\n value = attribute.value === null ? true : attribute.value\n }\n\n // Assume a prop.\n props[name] = /** @type {Props[keyof Props]} */ (value)\n }\n }\n\n return props\n}\n\n/**\n * Create children.\n *\n * @param {State} state\n * Info passed around.\n * @param {Parents} node\n * Current element.\n * @returns {Array<Child>}\n * Children.\n */\nfunction createChildren(state, node) {\n /** @type {Array<Child>} */\n const children = []\n let index = -1\n /** @type {Map<string, number>} */\n // Note: test this when Solid doesn’t want to merge my upcoming PR.\n /* c8 ignore next */\n const countsByName = state.passKeys ? new Map() : emptyMap\n\n while (++index < node.children.length) {\n const child = node.children[index]\n /** @type {string | undefined} */\n let key\n\n if (state.passKeys) {\n const name =\n child.type === 'element'\n ? child.tagName\n : child.type === 'mdxJsxFlowElement' ||\n child.type === 'mdxJsxTextElement'\n ? child.name\n : undefined\n\n if (name) {\n const count = countsByName.get(name) || 0\n key = name + '-' + count\n countsByName.set(name, count + 1)\n }\n }\n\n const result = one(state, child, key)\n if (result !== undefined) children.push(result)\n }\n\n return children\n}\n\n/**\n * Handle a property.\n *\n * @param {State} state\n * Info passed around.\n * @param {string} prop\n * Key.\n * @param {Array<number | string> | boolean | number | string | null | undefined} value\n * hast property value.\n * @returns {Field | undefined}\n * Field for runtime, optional.\n */\nfunction createProperty(state, prop, value) {\n const info = find(state.schema, prop)\n\n // Ignore nullish and `NaN` values.\n if (\n value === null ||\n value === undefined ||\n (typeof value === 'number' && Number.isNaN(value))\n ) {\n return\n }\n\n if (Array.isArray(value)) {\n // Accept `array`.\n // Most props are space-separated.\n value = info.commaSeparated ? commas(value) : spaces(value)\n }\n\n // React only accepts `style` as object.\n if (info.property === 'style') {\n let styleObject =\n typeof value === 'object' ? value : parseStyle(state, String(value))\n\n if (state.stylePropertyNameCase === 'css') {\n styleObject = transformStylesToCssCasing(styleObject)\n }\n\n return ['style', styleObject]\n }\n\n return [\n state.elementAttributeNameCase === 'react' && info.space\n ? hastToReact[info.property] || info.property\n : info.attribute,\n value\n ]\n}\n\n/**\n * Parse a CSS declaration to an object.\n *\n * @param {State} state\n * Info passed around.\n * @param {string} value\n * CSS declarations.\n * @returns {Style}\n * Properties.\n * @throws\n * Throws `VFileMessage` when CSS cannot be parsed.\n */\nfunction parseStyle(state, value) {\n try {\n return styleToJs(value, {reactCompat: true})\n } catch (error) {\n if (state.ignoreInvalidStyle) {\n return {}\n }\n\n const cause = /** @type {Error} */ (error)\n const message = new VFileMessage('Cannot parse `style` attribute', {\n ancestors: state.ancestors,\n cause,\n ruleId: 'style',\n source: 'hast-util-to-jsx-runtime'\n })\n message.file = state.filePath || undefined\n message.url = docs + '#cannot-parse-style-attribute'\n\n throw message\n }\n}\n\n/**\n * Create a JSX name from a string.\n *\n * @param {State} state\n * To do.\n * @param {string} name\n * Name.\n * @param {boolean} allowExpression\n * Allow member expressions and identifiers.\n * @returns {unknown}\n * To do.\n */\nfunction findComponentFromName(state, name, allowExpression) {\n /** @type {Identifier | Literal | MemberExpression} */\n let result\n\n if (!allowExpression) {\n result = {type: 'Literal', value: name}\n } else if (name.includes('.')) {\n const identifiers = name.split('.')\n let index = -1\n /** @type {Identifier | Literal | MemberExpression | undefined} */\n let node\n\n while (++index < identifiers.length) {\n /** @type {Identifier | Literal} */\n const prop = isIdentifierName(identifiers[index])\n ? {type: 'Identifier', name: identifiers[index]}\n : {type: 'Literal', value: identifiers[index]}\n node = node\n ? {\n type: 'MemberExpression',\n object: node,\n property: prop,\n computed: Boolean(index && prop.type === 'Literal'),\n optional: false\n }\n : prop\n }\n\n assert(node, 'always a result')\n result = node\n } else {\n result =\n isIdentifierName(name) && !/^[a-z]/.test(name)\n ? {type: 'Identifier', name}\n : {type: 'Literal', value: name}\n }\n\n // Only literals can be passed in `components` currently.\n // No identifiers / member expressions.\n if (result.type === 'Literal') {\n const name = /** @type {string | number} */ (result.value)\n return own.call(state.components, name) ? state.components[name] : name\n }\n\n // Assume component.\n if (state.evaluater) {\n return state.evaluater.evaluateExpression(result)\n }\n\n crashEstree(state)\n}\n\n/**\n * @param {State} state\n * @param {Position | undefined} [place]\n * @returns {never}\n */\nfunction crashEstree(state, place) {\n const message = new VFileMessage(\n 'Cannot handle MDX estrees without `createEvaluater`',\n {\n ancestors: state.ancestors,\n place,\n ruleId: 'mdx-estree',\n source: 'hast-util-to-jsx-runtime'\n }\n )\n message.file = state.filePath || undefined\n message.url = docs + '#cannot-handle-mdx-estrees-without-createevaluater'\n\n throw message\n}\n\n/**\n * Transform a DOM casing style object to a CSS casing style object.\n *\n * @param {Style} domCasing\n * @returns {Style}\n */\nfunction transformStylesToCssCasing(domCasing) {\n /** @type {Style} */\n const cssCasing = {}\n /** @type {string} */\n let from\n\n for (from in domCasing) {\n if (own.call(domCasing, from)) {\n cssCasing[transformStyleToCssCasing(from)] = domCasing[from]\n }\n }\n\n return cssCasing\n}\n\n/**\n * Transform a DOM casing style field to a CSS casing style field.\n *\n * @param {string} from\n * @returns {string}\n */\nfunction transformStyleToCssCasing(from) {\n let to = from.replace(cap, toDash)\n // Handle `ms-xxx` -> `-ms-xxx`.\n if (to.slice(0, 3) === 'ms-') to = '-' + to\n return to\n}\n\n/**\n * Make `$0` dash cased.\n *\n * @param {string} $0\n * Capitalized ASCII leter.\n * @returns {string}\n * Dash and lower letter.\n */\nfunction toDash($0) {\n return '-' + $0.toLowerCase()\n}\n","/**\n * HTML URL properties.\n *\n * Each key is a property name and each value is a list of tag names it applies\n * to or `null` if it applies to all elements.\n *\n * @type {Record<string, Array<string> | null>}\n */\nexport const urlAttributes = {\n action: ['form'],\n cite: ['blockquote', 'del', 'ins', 'q'],\n data: ['object'],\n formAction: ['button', 'input'],\n href: ['a', 'area', 'base', 'link'],\n icon: ['menuitem'],\n itemId: null,\n manifest: ['html'],\n ping: ['a', 'area'],\n poster: ['video'],\n src: [\n 'audio',\n 'embed',\n 'iframe',\n 'img',\n 'input',\n 'script',\n 'source',\n 'track',\n 'video'\n ]\n}\n","/**\n * @typedef {import('mdast').Nodes} Nodes\n *\n * @typedef Options\n * Configuration (optional).\n * @property {boolean | null | undefined} [includeImageAlt=true]\n * Whether to use `alt` for `image`s (default: `true`).\n * @property {boolean | null | undefined} [includeHtml=true]\n * Whether to use `value` of HTML (default: `true`).\n */\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Get the text content of a node or list of nodes.\n *\n * Prefers the node’s plain-text fields, otherwise serializes its children,\n * and if the given value is an array, serialize the nodes in it.\n *\n * @param {unknown} [value]\n * Thing to serialize, typically `Node`.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {string}\n * Serialized `value`.\n */\nexport function toString(value, options) {\n const settings = options || emptyOptions\n const includeImageAlt =\n typeof settings.includeImageAlt === 'boolean'\n ? settings.includeImageAlt\n : true\n const includeHtml =\n typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true\n\n return one(value, includeImageAlt, includeHtml)\n}\n\n/**\n * One node or several nodes.\n *\n * @param {unknown} value\n * Thing to serialize.\n * @param {boolean} includeImageAlt\n * Include image `alt`s.\n * @param {boolean} includeHtml\n * Include HTML.\n * @returns {string}\n * Serialized node.\n */\nfunction one(value, includeImageAlt, includeHtml) {\n if (node(value)) {\n if ('value' in value) {\n return value.type === 'html' && !includeHtml ? '' : value.value\n }\n\n if (includeImageAlt && 'alt' in value && value.alt) {\n return value.alt\n }\n\n if ('children' in value) {\n return all(value.children, includeImageAlt, includeHtml)\n }\n }\n\n if (Array.isArray(value)) {\n return all(value, includeImageAlt, includeHtml)\n }\n\n return ''\n}\n\n/**\n * Serialize a list of nodes.\n *\n * @param {Array<unknown>} values\n * Thing to serialize.\n * @param {boolean} includeImageAlt\n * Include image `alt`s.\n * @param {boolean} includeHtml\n * Include HTML.\n * @returns {string}\n * Serialized nodes.\n */\nfunction all(values, includeImageAlt, includeHtml) {\n /** @type {Array<string>} */\n const result = []\n let index = -1\n\n while (++index < values.length) {\n result[index] = one(values[index], includeImageAlt, includeHtml)\n }\n\n return result.join('')\n}\n\n/**\n * Check if `value` looks like a node.\n *\n * @param {unknown} value\n * Thing.\n * @returns {value is Nodes}\n * Whether `value` is a node.\n */\nfunction node(value) {\n return Boolean(value && typeof value === 'object')\n}\n","/**\n * Map of named character references.\n *\n * @type {Record<string, string>}\n */\nexport const characterEntities = {\n AElig: 'Æ',\n AMP: '&',\n Aacute: 'Á',\n Abreve: 'Ă',\n Acirc: 'Â',\n Acy: 'А',\n Afr: '𝔄',\n Agrave: 'À',\n Alpha: 'Α',\n Amacr: 'Ā',\n And: '⩓',\n Aogon: 'Ą',\n Aopf: '𝔸',\n ApplyFunction: '',\n Aring: 'Å',\n Ascr: '𝒜',\n Assign: '≔',\n Atilde: 'Ã',\n Auml: 'Ä',\n Backslash: '∖',\n Barv: '⫧',\n Barwed: '⌆',\n Bcy: 'Б',\n Because: '∵',\n Bernoullis: 'ℬ',\n Beta: 'Β',\n Bfr: '𝔅',\n Bopf: '𝔹',\n Breve: '˘',\n Bscr: 'ℬ',\n Bumpeq: '≎',\n CHcy: 'Ч',\n COPY: '©',\n Cacute: 'Ć',\n Cap: '⋒',\n CapitalDifferentialD: 'ⅅ',\n Cayleys: 'ℭ',\n Ccaron: 'Č',\n Ccedil: 'Ç',\n Ccirc: 'Ĉ',\n Cconint: '∰',\n Cdot: 'Ċ',\n Cedilla: '¸',\n CenterDot: '·',\n Cfr: 'ℭ',\n Chi: 'Χ',\n CircleDot: '⊙',\n CircleMinus: '⊖',\n CirclePlus: '⊕',\n CircleTimes: '⊗',\n ClockwiseContourIntegral: '∲',\n CloseCurlyDoubleQuote: '”',\n CloseCurlyQuote: '’',\n Colon: '∷',\n Colone: '⩴',\n Congruent: '≡',\n Conint: '∯',\n ContourIntegral: '∮',\n Copf: 'ℂ',\n Coproduct: '∐',\n CounterClockwiseContourIntegral: '∳',\n Cross: '⨯',\n Cscr: '𝒞',\n Cup: '⋓',\n CupCap: '≍',\n DD: 'ⅅ',\n DDotrahd: '⤑',\n DJcy: 'Ђ',\n DScy: 'Ѕ',\n DZcy: 'Џ',\n Dagger: '‡',\n Darr: '↡',\n Dashv: '⫤',\n Dcaron: 'Ď',\n Dcy: 'Д',\n Del: '∇',\n Delta: 'Δ',\n Dfr: '𝔇',\n DiacriticalAcute: '´',\n DiacriticalDot: '˙',\n DiacriticalDoubleAcute: '˝',\n DiacriticalGrave: '`',\n DiacriticalTilde: '˜',\n Diamond: '⋄',\n DifferentialD: 'ⅆ',\n Dopf: '𝔻',\n Dot: '¨',\n DotDot: '⃜',\n DotEqual: '≐',\n DoubleContourIntegral: '∯',\n DoubleDot: '¨',\n DoubleDownArrow: '⇓',\n DoubleLeftArrow: '⇐',\n DoubleLeftRightArrow: '⇔',\n DoubleLeftTee: '⫤',\n DoubleLongLeftArrow: '⟸',\n DoubleLongLeftRightArrow: '⟺',\n DoubleLongRightArrow: '⟹',\n DoubleRightArrow: '⇒',\n DoubleRightTee: '⊨',\n DoubleUpArrow: '⇑',\n DoubleUpDownArrow: '⇕',\n DoubleVerticalBar: '∥',\n DownArrow: '↓',\n DownArrowBar: '⤓',\n DownArrowUpArrow: '⇵',\n DownBreve: '̑',\n DownLeftRightVector: '⥐',\n DownLeftTeeVector: '⥞',\n DownLeftVector: '↽',\n DownLeftVectorBar: '⥖',\n DownRightTeeVector: '⥟',\n DownRightVector: '⇁',\n DownRightVectorBar: '⥗',\n DownTee: '⊤',\n DownTeeArrow: '↧',\n Downarrow: '⇓',\n Dscr: '𝒟',\n Dstrok: 'Đ',\n ENG: 'Ŋ',\n ETH: 'Ð',\n Eacute: 'É',\n Ecaron: 'Ě',\n Ecirc: 'Ê',\n Ecy: 'Э',\n Edot: 'Ė',\n Efr: '𝔈',\n Egrave: 'È',\n Element: '∈',\n Emacr: 'Ē',\n EmptySmallSquare: '◻',\n EmptyVerySmallSquare: '▫',\n Eogon: 'Ę',\n Eopf: '𝔼',\n Epsilon: 'Ε',\n Equal: '⩵',\n EqualTilde: '≂',\n Equilibrium: '⇌',\n Escr: 'ℰ',\n Esim: '⩳',\n Eta: 'Η',\n Euml: 'Ë',\n Exists: '∃',\n ExponentialE: 'ⅇ',\n Fcy: 'Ф',\n Ffr: '𝔉',\n FilledSmallSquare: '◼',\n FilledVerySmallSquare: '▪',\n Fopf: '𝔽',\n ForAll: '∀',\n Fouriertrf: 'ℱ',\n Fscr: 'ℱ',\n GJcy: 'Ѓ',\n GT: '>',\n Gamma: 'Γ',\n Gammad: 'Ϝ',\n Gbreve: 'Ğ',\n Gcedil: 'Ģ',\n Gcirc: 'Ĝ',\n Gcy: 'Г',\n Gdot: 'Ġ',\n Gfr: '𝔊',\n Gg: '⋙',\n Gopf: '𝔾',\n GreaterEqual: '≥',\n GreaterEqualLess: '⋛',\n GreaterFullEqual: '≧',\n GreaterGreater: '⪢',\n GreaterLess: '≷',\n GreaterSlantEqual: '⩾',\n GreaterTilde: '≳',\n Gscr: '𝒢',\n Gt: '≫',\n HARDcy: 'Ъ',\n Hacek: 'ˇ',\n Hat: '^',\n Hcirc: 'Ĥ',\n Hfr: 'ℌ',\n HilbertSpace: 'ℋ',\n Hopf: 'ℍ',\n HorizontalLine: '─',\n Hscr: 'ℋ',\n Hstrok: 'Ħ',\n HumpDownHump: '≎',\n HumpEqual: '≏',\n IEcy: 'Е',\n IJlig: 'IJ',\n IOcy: 'Ё',\n Iacute: 'Í',\n Icirc: 'Î',\n Icy: 'И',\n Idot: 'İ',\n Ifr: 'ℑ',\n Igrave: 'Ì',\n Im: 'ℑ',\n Imacr: 'Ī',\n ImaginaryI: 'ⅈ',\n Implies: '⇒',\n Int: '∬',\n Integral: '∫',\n Intersection: '⋂',\n InvisibleComma: '',\n InvisibleTimes: '',\n Iogon: 'Į',\n Iopf: '𝕀',\n Iota: 'Ι',\n Iscr: 'ℐ',\n Itilde: 'Ĩ',\n Iukcy: 'І',\n Iuml: 'Ï',\n Jcirc: 'Ĵ',\n Jcy: 'Й',\n Jfr: '𝔍',\n Jopf: '𝕁',\n Jscr: '𝒥',\n Jsercy: 'Ј',\n Jukcy: 'Є',\n KHcy: 'Х',\n KJcy: 'Ќ',\n Kappa: 'Κ',\n Kcedil: 'Ķ',\n Kcy: 'К',\n Kfr: '𝔎',\n Kopf: '𝕂',\n Kscr: '𝒦',\n LJcy: 'Љ',\n LT: '<',\n Lacute: 'Ĺ',\n Lambda: 'Λ',\n Lang: '⟪',\n Laplacetrf: 'ℒ',\n Larr: '↞',\n Lcaron: 'Ľ',\n Lcedil: 'Ļ',\n Lcy: 'Л',\n LeftAngleBracket: '⟨',\n LeftArrow: '←',\n LeftArrowBar: '⇤',\n LeftArrowRightArrow: '⇆',\n LeftCeiling: '⌈',\n LeftDoubleBracket: '⟦',\n LeftDownTeeVector: '⥡',\n LeftDownVector: '⇃',\n LeftDownVectorBar: '⥙',\n LeftFloor: '⌊',\n LeftRightArrow: '↔',\n LeftRightVector: '⥎',\n LeftTee: '⊣',\n LeftTeeArrow: '↤',\n LeftTeeVector: '⥚',\n LeftTriangle: '⊲',\n LeftTriangleBar: '⧏',\n LeftTriangleEqual: '⊴',\n LeftUpDownVector: '⥑',\n LeftUpTeeVector: '⥠',\n LeftUpVector: '↿',\n LeftUpVectorBar: '⥘',\n LeftVector: '↼',\n LeftVectorBar: '⥒',\n Leftarrow: '⇐',\n Leftrightarrow: '⇔',\n LessEqualGreater: '⋚',\n LessFullEqual: '≦',\n LessGreater: '≶',\n LessLess: '⪡',\n LessSlantEqual: '⩽',\n LessTilde: '≲',\n Lfr: '𝔏',\n Ll: '⋘',\n Lleftarrow: '⇚',\n Lmidot: 'Ŀ',\n LongLeftArrow: '⟵',\n LongLeftRightArrow: '⟷',\n LongRightArrow: '⟶',\n Longleftarrow: '⟸',\n Longleftrightarrow: '⟺',\n Longrightarrow: '⟹',\n Lopf: '𝕃',\n LowerLeftArrow: '↙',\n LowerRightArrow: '↘',\n Lscr: 'ℒ',\n Lsh: '↰',\n Lstrok: 'Ł',\n Lt: '≪',\n Map: '⤅',\n Mcy: 'М',\n MediumSpace: ' ',\n Mellintrf: 'ℳ',\n Mfr: '𝔐',\n MinusPlus: '∓',\n Mopf: '𝕄',\n Mscr: 'ℳ',\n Mu: 'Μ',\n NJcy: 'Њ',\n Nacute: 'Ń',\n Ncaron: 'Ň',\n Ncedil: 'Ņ',\n Ncy: 'Н',\n NegativeMediumSpace: '',\n NegativeThickSpace: '',\n NegativeThinSpace: '',\n NegativeVeryThinSpace: '',\n NestedGreaterGreater: '≫',\n NestedLessLess: '≪',\n NewLine: '\\n',\n Nfr: '𝔑',\n NoBreak: '',\n NonBreakingSpace: ' ',\n Nopf: 'ℕ',\n Not: '⫬',\n NotCongruent: '≢',\n NotCupCap: '≭',\n NotDoubleVerticalBar: '∦',\n NotElement: '∉',\n NotEqual: '≠',\n NotEqualTilde: '≂̸',\n NotExists: '∄',\n NotGreater: '≯',\n NotGreaterEqual: '≱',\n NotGreaterFullEqual: '≧̸',\n NotGreaterGreater: '≫̸',\n NotGreaterLess: '≹',\n NotGreaterSlantEqual: '⩾̸',\n NotGreaterTilde: '≵',\n NotHumpDownHump: '≎̸',\n NotHumpEqual: '≏̸',\n NotLeftTriangle: '⋪',\n NotLeftTriangleBar: '⧏̸',\n NotLeftTriangleEqual: '⋬',\n NotLess: '≮',\n NotLessEqual: '≰',\n NotLessGreater: '≸',\n NotLessLess: '≪̸',\n NotLessSlantEqual: '⩽̸',\n NotLessTilde: '≴',\n NotNestedGreaterGreater: '⪢̸',\n NotNestedLessLess: '⪡̸',\n NotPrecedes: '⊀',\n NotPrecedesEqual: '⪯̸',\n NotPrecedesSlantEqual: '⋠',\n NotReverseElement: '∌',\n NotRightTriangle: '⋫',\n NotRightTriangleBar: '⧐̸',\n NotRightTriangleEqual: '⋭',\n NotSquareSubset: '⊏̸',\n NotSquareSubsetEqual: '⋢',\n NotSquareSuperset: '⊐̸',\n NotSquareSupersetEqual: '⋣',\n NotSubset: '⊂⃒',\n NotSubsetEqual: '⊈',\n NotSucceeds: '⊁',\n NotSucceedsEqual: '⪰̸',\n NotSucceedsSlantEqual: '⋡',\n NotSucceedsTilde: '≿̸',\n NotSuperset: '⊃⃒',\n NotSupersetEqual: '⊉',\n NotTilde: '≁',\n NotTildeEqual: '≄',\n NotTildeFullEqual: '≇',\n NotTildeTilde: '≉',\n NotVerticalBar: '∤',\n Nscr: '𝒩',\n Ntilde: 'Ñ',\n Nu: 'Ν',\n OElig: 'Œ',\n Oacute: 'Ó',\n Ocirc: 'Ô',\n Ocy: 'О',\n Odblac: 'Ő',\n Ofr: '𝔒',\n Ograve: 'Ò',\n Omacr: 'Ō',\n Omega: 'Ω',\n Omicron: 'Ο',\n Oopf: '𝕆',\n OpenCurlyDoubleQuote: '“',\n OpenCurlyQuote: '‘',\n Or: '⩔',\n Oscr: '𝒪',\n Oslash: 'Ø',\n Otilde: 'Õ',\n Otimes: '⨷',\n Ouml: 'Ö',\n OverBar: '‾',\n OverBrace: '⏞',\n OverBracket: '⎴',\n OverParenthesis: '⏜',\n PartialD: '∂',\n Pcy: 'П',\n Pfr: '𝔓',\n Phi: 'Φ',\n Pi: 'Π',\n PlusMinus: '±',\n Poincareplane: 'ℌ',\n Popf: 'ℙ',\n Pr: '⪻',\n Precedes: '≺',\n PrecedesEqual: '⪯',\n PrecedesSlantEqual: '≼',\n PrecedesTilde: '≾',\n Prime: '″',\n Product: '∏',\n Proportion: '∷',\n Proportional: '∝',\n Pscr: '𝒫',\n Psi: 'Ψ',\n QUOT: '\"',\n Qfr: '𝔔',\n Qopf: 'ℚ',\n Qscr: '𝒬',\n RBarr: '⤐',\n REG: '®',\n Racute: 'Ŕ',\n Rang: '⟫',\n Rarr: '↠',\n Rarrtl: '⤖',\n Rcaron: 'Ř',\n Rcedil: 'Ŗ',\n Rcy: 'Р',\n Re: 'ℜ',\n ReverseElement: '∋',\n ReverseEquilibrium: '⇋',\n ReverseUpEquilibrium: '⥯',\n Rfr: 'ℜ',\n Rho: 'Ρ',\n RightAngleBracket: '⟩',\n RightArrow: '→',\n RightArrowBar: '⇥',\n RightArrowLeftArrow: '⇄',\n RightCeiling: '⌉',\n RightDoubleBracket: '⟧',\n RightDownTeeVector: '⥝',\n RightDownVector: '⇂',\n RightDownVectorBar: '⥕',\n RightFloor: '⌋',\n RightTee: '⊢',\n RightTeeArrow: '↦',\n RightTeeVector: '⥛',\n RightTriangle: '⊳',\n RightTriangleBar: '⧐',\n RightTriangleEqual: '⊵',\n RightUpDownVector: '⥏',\n RightUpTeeVector: '⥜',\n RightUpVector: '↾',\n RightUpVectorBar: '⥔',\n RightVector: '⇀',\n RightVectorBar: '⥓',\n Rightarrow: '⇒',\n Ropf: 'ℝ',\n RoundImplies: '⥰',\n Rrightarrow: '⇛',\n Rscr: 'ℛ',\n Rsh: '↱',\n RuleDelayed: '⧴',\n SHCHcy: 'Щ',\n SHcy: 'Ш',\n SOFTcy: 'Ь',\n Sacute: 'Ś',\n Sc: '⪼',\n Scaron: 'Š',\n Scedil: 'Ş',\n Scirc: 'Ŝ',\n Scy: 'С',\n Sfr: '𝔖',\n ShortDownArrow: '↓',\n ShortLeftArrow: '←',\n ShortRightArrow: '→',\n ShortUpArrow: '↑',\n Sigma: 'Σ',\n SmallCircle: '∘',\n Sopf: '𝕊',\n Sqrt: '√',\n Square: '□',\n SquareIntersection: '⊓',\n SquareSubset: '⊏',\n SquareSubsetEqual: '⊑',\n SquareSuperset: '⊐',\n SquareSupersetEqual: '⊒',\n SquareUnion: '⊔',\n Sscr: '𝒮',\n Star: '⋆',\n Sub: '⋐',\n Subset: '⋐',\n SubsetEqual: '⊆',\n Succeeds: '≻',\n SucceedsEqual: '⪰',\n SucceedsSlantEqual: '≽',\n SucceedsTilde: '≿',\n SuchThat: '∋',\n Sum: '∑',\n Sup: '⋑',\n Superset: '⊃',\n SupersetEqual: '⊇',\n Supset: '⋑',\n THORN: 'Þ',\n TRADE: '™',\n TSHcy: 'Ћ',\n TScy: 'Ц',\n Tab: '\\t',\n Tau: 'Τ',\n Tcaron: 'Ť',\n Tcedil: 'Ţ',\n Tcy: 'Т',\n Tfr: '𝔗',\n Therefore: '∴',\n Theta: 'Θ',\n ThickSpace: ' ',\n ThinSpace: ' ',\n Tilde: '∼',\n TildeEqual: '≃',\n TildeFullEqual: '≅',\n TildeTilde: '≈',\n Topf: '𝕋',\n TripleDot: '⃛',\n Tscr: '𝒯',\n Tstrok: 'Ŧ',\n Uacute: 'Ú',\n Uarr: '↟',\n Uarrocir: '⥉',\n Ubrcy: 'Ў',\n Ubreve: 'Ŭ',\n Ucirc: 'Û',\n Ucy: 'У',\n Udblac: 'Ű',\n Ufr: '𝔘',\n Ugrave: 'Ù',\n Umacr: 'Ū',\n UnderBar: '_',\n UnderBrace: '⏟',\n UnderBracket: '⎵',\n UnderParenthesis: '⏝',\n Union: '⋃',\n UnionPlus: '⊎',\n Uogon: 'Ų',\n Uopf: '𝕌',\n UpArrow: '↑',\n UpArrowBar: '⤒',\n UpArrowDownArrow: '⇅',\n UpDownArrow: '↕',\n UpEquilibrium: '⥮',\n UpTee: '⊥',\n UpTeeArrow: '↥',\n Uparrow: '⇑',\n Updownarrow: '⇕',\n UpperLeftArrow: '↖',\n UpperRightArrow: '↗',\n Upsi: 'ϒ',\n Upsilon: 'Υ',\n Uring: 'Ů',\n Uscr: '𝒰',\n Utilde: 'Ũ',\n Uuml: 'Ü',\n VDash: '⊫',\n Vbar: '⫫',\n Vcy: 'В',\n Vdash: '⊩',\n Vdashl: '⫦',\n Vee: '⋁',\n Verbar: '‖',\n Vert: '‖',\n VerticalBar: '∣',\n VerticalLine: '|',\n VerticalSeparator: '❘',\n VerticalTilde: '≀',\n VeryThinSpace: ' ',\n Vfr: '𝔙',\n Vopf: '𝕍',\n Vscr: '𝒱',\n Vvdash: '⊪',\n Wcirc: 'Ŵ',\n Wedge: '⋀',\n Wfr: '𝔚',\n Wopf: '𝕎',\n Wscr: '𝒲',\n Xfr: '𝔛',\n Xi: 'Ξ',\n Xopf: '𝕏',\n Xscr: '𝒳',\n YAcy: 'Я',\n YIcy: 'Ї',\n YUcy: 'Ю',\n Yacute: 'Ý',\n Ycirc: 'Ŷ',\n Ycy: 'Ы',\n Yfr: '𝔜',\n Yopf: '𝕐',\n Yscr: '𝒴',\n Yuml: 'Ÿ',\n ZHcy: 'Ж',\n Zacute: 'Ź',\n Zcaron: 'Ž',\n Zcy: 'З',\n Zdot: 'Ż',\n ZeroWidthSpace: '',\n Zeta: 'Ζ',\n Zfr: 'ℨ',\n Zopf: 'ℤ',\n Zscr: '𝒵',\n aacute: 'á',\n abreve: 'ă',\n ac: '∾',\n acE: '∾̳',\n acd: '∿',\n acirc: 'â',\n acute: '´',\n acy: 'а',\n aelig: 'æ',\n af: '',\n afr: '𝔞',\n agrave: 'à',\n alefsym: 'ℵ',\n aleph: 'ℵ',\n alpha: 'α',\n amacr: 'ā',\n amalg: '⨿',\n amp: '&',\n and: '∧',\n andand: '⩕',\n andd: '⩜',\n andslope: '⩘',\n andv: '⩚',\n ang: '∠',\n ange: '⦤',\n angle: '∠',\n angmsd: '∡',\n angmsdaa: '⦨',\n angmsdab: '⦩',\n angmsdac: '⦪',\n angmsdad: '⦫',\n angmsdae: '⦬',\n angmsdaf: '⦭',\n angmsdag: '⦮',\n angmsdah: '⦯',\n angrt: '∟',\n angrtvb: '⊾',\n angrtvbd: '⦝',\n angsph: '∢',\n angst: 'Å',\n angzarr: '⍼',\n aogon: 'ą',\n aopf: '𝕒',\n ap: '≈',\n apE: '⩰',\n apacir: '⩯',\n ape: '≊',\n apid: '≋',\n apos: \"'\",\n approx: '≈',\n approxeq: '≊',\n aring: 'å',\n ascr: '𝒶',\n ast: '*',\n asymp: '≈',\n asympeq: '≍',\n atilde: 'ã',\n auml: 'ä',\n awconint: '∳',\n awint: '⨑',\n bNot: '⫭',\n backcong: '≌',\n backepsilon: '϶',\n backprime: '‵',\n backsim: '∽',\n backsimeq: '⋍',\n barvee: '⊽',\n barwed: '⌅',\n barwedge: '⌅',\n bbrk: '⎵',\n bbrktbrk: '⎶',\n bcong: '≌',\n bcy: 'б',\n bdquo: '„',\n becaus: '∵',\n because: '∵',\n bemptyv: '⦰',\n bepsi: '϶',\n bernou: 'ℬ',\n beta: 'β',\n beth: 'ℶ',\n between: '≬',\n bfr: '𝔟',\n bigcap: '⋂',\n bigcirc: '◯',\n bigcup: '⋃',\n bigodot: '⨀',\n bigoplus: '⨁',\n bigotimes: '⨂',\n bigsqcup: '⨆',\n bigstar: '★',\n bigtriangledown: '▽',\n bigtriangleup: '△',\n biguplus: '⨄',\n bigvee: '⋁',\n bigwedge: '⋀',\n bkarow: '⤍',\n blacklozenge: '⧫',\n blacksquare: '▪',\n blacktriangle: '▴',\n blacktriangledown: '▾',\n blacktriangleleft: '◂',\n blacktriangleright: '▸',\n blank: '␣',\n blk12: '▒',\n blk14: '░',\n blk34: '▓',\n block: '█',\n bne: '=⃥',\n bnequiv: '≡⃥',\n bnot: '⌐',\n bopf: '𝕓',\n bot: '⊥',\n bottom: '⊥',\n bowtie: '⋈',\n boxDL: '╗',\n boxDR: '╔',\n boxDl: '╖',\n boxDr: '╓',\n boxH: '═',\n boxHD: '╦',\n boxHU: '╩',\n boxHd: '╤',\n boxHu: '╧',\n boxUL: '╝',\n boxUR: '╚',\n boxUl: '╜',\n boxUr: '╙',\n boxV: '║',\n boxVH: '╬',\n boxVL: '╣',\n boxVR: '╠',\n boxVh: '╫',\n boxVl: '╢',\n boxVr: '╟',\n boxbox: '⧉',\n boxdL: '╕',\n boxdR: '╒',\n boxdl: '┐',\n boxdr: '┌',\n boxh: '─',\n boxhD: '╥',\n boxhU: '╨',\n boxhd: '┬',\n boxhu: '┴',\n boxminus: '⊟',\n boxplus: '⊞',\n boxtimes: '⊠',\n boxuL: '╛',\n boxuR: '╘',\n boxul: '┘',\n boxur: '└',\n boxv: '│',\n boxvH: '╪',\n boxvL: '╡',\n boxvR: '╞',\n boxvh: '┼',\n boxvl: '┤',\n boxvr: '├',\n bprime: '‵',\n breve: '˘',\n brvbar: '¦',\n bscr: '𝒷',\n bsemi: '⁏',\n bsim: '∽',\n bsime: '⋍',\n bsol: '\\\\',\n bsolb: '⧅',\n bsolhsub: '⟈',\n bull: '•',\n bullet: '•',\n bump: '≎',\n bumpE: '⪮',\n bumpe: '≏',\n bumpeq: '≏',\n cacute: 'ć',\n cap: '∩',\n capand: '⩄',\n capbrcup: '⩉',\n capcap: '⩋',\n capcup: '⩇',\n capdot: '⩀',\n caps: '∩︀',\n caret: '⁁',\n caron: 'ˇ',\n ccaps: '⩍',\n ccaron: 'č',\n ccedil: 'ç',\n ccirc: 'ĉ',\n ccups: '⩌',\n ccupssm: '⩐',\n cdot: 'ċ',\n cedil: '¸',\n cemptyv: '⦲',\n cent: '¢',\n centerdot: '·',\n cfr: '𝔠',\n chcy: 'ч',\n check: '✓',\n checkmark: '✓',\n chi: 'χ',\n cir: '○',\n cirE: '⧃',\n circ: 'ˆ',\n circeq: '≗',\n circlearrowleft: '↺',\n circlearrowright: '↻',\n circledR: '®',\n circledS: 'Ⓢ',\n circledast: '⊛',\n circledcirc: '⊚',\n circleddash: '⊝',\n cire: '≗',\n cirfnint: '⨐',\n cirmid: '⫯',\n cirscir: '⧂',\n clubs: '♣',\n clubsuit: '♣',\n colon: ':',\n colone: '≔',\n coloneq: '≔',\n comma: ',',\n commat: '@',\n comp: '∁',\n compfn: '∘',\n complement: '∁',\n complexes: 'ℂ',\n cong: '≅',\n congdot: '⩭',\n conint: '∮',\n copf: '𝕔',\n coprod: '∐',\n copy: '©',\n copysr: '℗',\n crarr: '↵',\n cross: '✗',\n cscr: '𝒸',\n csub: '⫏',\n csube: '⫑',\n csup: '⫐',\n csupe: '⫒',\n ctdot: '⋯',\n cudarrl: '⤸',\n cudarrr: '⤵',\n cuepr: '⋞',\n cuesc: '⋟',\n cularr: '↶',\n cularrp: '⤽',\n cup: '∪',\n cupbrcap: '⩈',\n cupcap: '⩆',\n cupcup: '⩊',\n cupdot: '⊍',\n cupor: '⩅',\n cups: '∪︀',\n curarr: '↷',\n curarrm: '⤼',\n curlyeqprec: '⋞',\n curlyeqsucc: '⋟',\n curlyvee: '⋎',\n curlywedge: '⋏',\n curren: '¤',\n curvearrowleft: '↶',\n curvearrowright: '↷',\n cuvee: '⋎',\n cuwed: '⋏',\n cwconint: '∲',\n cwint: '∱',\n cylcty: '⌭',\n dArr: '⇓',\n dHar: '⥥',\n dagger: '†',\n daleth: 'ℸ',\n darr: '↓',\n dash: '‐',\n dashv: '⊣',\n dbkarow: '⤏',\n dblac: '˝',\n dcaron: 'ď',\n dcy: 'д',\n dd: 'ⅆ',\n ddagger: '‡',\n ddarr: '⇊',\n ddotseq: '⩷',\n deg: '°',\n delta: 'δ',\n demptyv: '⦱',\n dfisht: '⥿',\n dfr: '𝔡',\n dharl: '⇃',\n dharr: '⇂',\n diam: '⋄',\n diamond: '⋄',\n diamondsuit: '♦',\n diams: '♦',\n die: '¨',\n digamma: 'ϝ',\n disin: '⋲',\n div: '÷',\n divide: '÷',\n divideontimes: '⋇',\n divonx: '⋇',\n djcy: 'ђ',\n dlcorn: '⌞',\n dlcrop: '⌍',\n dollar: '$',\n dopf: '𝕕',\n dot: '˙',\n doteq: '≐',\n doteqdot: '≑',\n dotminus: '∸',\n dotplus: '∔',\n dotsquare: '⊡',\n doublebarwedge: '⌆',\n downarrow: '↓',\n downdownarrows: '⇊',\n downharpoonleft: '⇃',\n downharpoonright: '⇂',\n drbkarow: '⤐',\n drcorn: '⌟',\n drcrop: '⌌',\n dscr: '𝒹',\n dscy: 'ѕ',\n dsol: '⧶',\n dstrok: 'đ',\n dtdot: '⋱',\n dtri: '▿',\n dtrif: '▾',\n duarr: '⇵',\n duhar: '⥯',\n dwangle: '⦦',\n dzcy: 'џ',\n dzigrarr: '⟿',\n eDDot: '⩷',\n eDot: '≑',\n eacute: 'é',\n easter: '⩮',\n ecaron: 'ě',\n ecir: '≖',\n ecirc: 'ê',\n ecolon: '≕',\n ecy: 'э',\n edot: 'ė',\n ee: 'ⅇ',\n efDot: '≒',\n efr: '𝔢',\n eg: '⪚',\n egrave: 'è',\n egs: '⪖',\n egsdot: '⪘',\n el: '⪙',\n elinters: '⏧',\n ell: 'ℓ',\n els: '⪕',\n elsdot: '⪗',\n emacr: 'ē',\n empty: '∅',\n emptyset: '∅',\n emptyv: '∅',\n emsp13: ' ',\n emsp14: ' ',\n emsp: ' ',\n eng: 'ŋ',\n ensp: ' ',\n eogon: 'ę',\n eopf: '𝕖',\n epar: '⋕',\n eparsl: '⧣',\n eplus: '⩱',\n epsi: 'ε',\n epsilon: 'ε',\n epsiv: 'ϵ',\n eqcirc: '≖',\n eqcolon: '≕',\n eqsim: '≂',\n eqslantgtr: '⪖',\n eqslantless: '⪕',\n equals: '=',\n equest: '≟',\n equiv: '≡',\n equivDD: '⩸',\n eqvparsl: '⧥',\n erDot: '≓',\n erarr: '⥱',\n escr: 'ℯ',\n esdot: '≐',\n esim: '≂',\n eta: 'η',\n eth: 'ð',\n euml: 'ë',\n euro: '€',\n excl: '!',\n exist: '∃',\n expectation: 'ℰ',\n exponentiale: 'ⅇ',\n fallingdotseq: '≒',\n fcy: 'ф',\n female: '♀',\n ffilig: 'ffi',\n fflig: 'ff',\n ffllig: 'ffl',\n ffr: '𝔣',\n filig: 'fi',\n fjlig: 'fj',\n flat: '♭',\n fllig: 'fl',\n fltns: '▱',\n fnof: 'ƒ',\n fopf: '𝕗',\n forall: '∀',\n fork: '⋔',\n forkv: '⫙',\n fpartint: '⨍',\n frac12: '½',\n frac13: '⅓',\n frac14: '¼',\n frac15: '⅕',\n frac16: '⅙',\n frac18: '⅛',\n frac23: '⅔',\n frac25: '⅖',\n frac34: '¾',\n frac35: '⅗',\n frac38: '⅜',\n frac45: '⅘',\n frac56: '⅚',\n frac58: '⅝',\n frac78: '⅞',\n frasl: '⁄',\n frown: '⌢',\n fscr: '𝒻',\n gE: '≧',\n gEl: '⪌',\n gacute: 'ǵ',\n gamma: 'γ',\n gammad: 'ϝ',\n gap: '⪆',\n gbreve: 'ğ',\n gcirc: 'ĝ',\n gcy: 'г',\n gdot: 'ġ',\n ge: '≥',\n gel: '⋛',\n geq: '≥',\n geqq: '≧',\n geqslant: '⩾',\n ges: '⩾',\n gescc: '⪩',\n gesdot: '⪀',\n gesdoto: '⪂',\n gesdotol: '⪄',\n gesl: '⋛︀',\n gesles: '⪔',\n gfr: '𝔤',\n gg: '≫',\n ggg: '⋙',\n gimel: 'ℷ',\n gjcy: 'ѓ',\n gl: '≷',\n glE: '⪒',\n gla: '⪥',\n glj: '⪤',\n gnE: '≩',\n gnap: '⪊',\n gnapprox: '⪊',\n gne: '⪈',\n gneq: '⪈',\n gneqq: '≩',\n gnsim: '⋧',\n gopf: '𝕘',\n grave: '`',\n gscr: 'ℊ',\n gsim: '≳',\n gsime: '⪎',\n gsiml: '⪐',\n gt: '>',\n gtcc: '⪧',\n gtcir: '⩺',\n gtdot: '⋗',\n gtlPar: '⦕',\n gtquest: '⩼',\n gtrapprox: '⪆',\n gtrarr: '⥸',\n gtrdot: '⋗',\n gtreqless: '⋛',\n gtreqqless: '⪌',\n gtrless: '≷',\n gtrsim: '≳',\n gvertneqq: '≩︀',\n gvnE: '≩︀',\n hArr: '⇔',\n hairsp: ' ',\n half: '½',\n hamilt: 'ℋ',\n hardcy: 'ъ',\n harr: '↔',\n harrcir: '⥈',\n harrw: '↭',\n hbar: 'ℏ',\n hcirc: 'ĥ',\n hearts: '♥',\n heartsuit: '♥',\n hellip: '…',\n hercon: '⊹',\n hfr: '𝔥',\n hksearow: '⤥',\n hkswarow: '⤦',\n hoarr: '⇿',\n homtht: '∻',\n hookleftarrow: '↩',\n hookrightarrow: '↪',\n hopf: '𝕙',\n horbar: '―',\n hscr: '𝒽',\n hslash: 'ℏ',\n hstrok: 'ħ',\n hybull: '⁃',\n hyphen: '‐',\n iacute: 'í',\n ic: '',\n icirc: 'î',\n icy: 'и',\n iecy: 'е',\n iexcl: '¡',\n iff: '⇔',\n ifr: '𝔦',\n igrave: 'ì',\n ii: 'ⅈ',\n iiiint: '⨌',\n iiint: '∭',\n iinfin: '⧜',\n iiota: '℩',\n ijlig: 'ij',\n imacr: 'ī',\n image: 'ℑ',\n imagline: 'ℐ',\n imagpart: 'ℑ',\n imath: 'ı',\n imof: '⊷',\n imped: 'Ƶ',\n in: '∈',\n incare: '℅',\n infin: '∞',\n infintie: '⧝',\n inodot: 'ı',\n int: '∫',\n intcal: '⊺',\n integers: 'ℤ',\n intercal: '⊺',\n intlarhk: '⨗',\n intprod: '⨼',\n iocy: 'ё',\n iogon: 'į',\n iopf: '𝕚',\n iota: 'ι',\n iprod: '⨼',\n iquest: '¿',\n iscr: '𝒾',\n isin: '∈',\n isinE: '⋹',\n isindot: '⋵',\n isins: '⋴',\n isinsv: '⋳',\n isinv: '∈',\n it: '',\n itilde: 'ĩ',\n iukcy: 'і',\n iuml: 'ï',\n jcirc: 'ĵ',\n jcy: 'й',\n jfr: '𝔧',\n jmath: 'ȷ',\n jopf: '𝕛',\n jscr: '𝒿',\n jsercy: 'ј',\n jukcy: 'є',\n kappa: 'κ',\n kappav: 'ϰ',\n kcedil: 'ķ',\n kcy: 'к',\n kfr: '𝔨',\n kgreen: 'ĸ',\n khcy: 'х',\n kjcy: 'ќ',\n kopf: '𝕜',\n kscr: '𝓀',\n lAarr: '⇚',\n lArr: '⇐',\n lAtail: '⤛',\n lBarr: '⤎',\n lE: '≦',\n lEg: '⪋',\n lHar: '⥢',\n lacute: 'ĺ',\n laemptyv: '⦴',\n lagran: 'ℒ',\n lambda: 'λ',\n lang: '⟨',\n langd: '⦑',\n langle: '⟨',\n lap: '⪅',\n laquo: '«',\n larr: '←',\n larrb: '⇤',\n larrbfs: '⤟',\n larrfs: '⤝',\n larrhk: '↩',\n larrlp: '↫',\n larrpl: '⤹',\n larrsim: '⥳',\n larrtl: '↢',\n lat: '⪫',\n latail: '⤙',\n late: '⪭',\n lates: '⪭︀',\n lbarr: '⤌',\n lbbrk: '❲',\n lbrace: '{',\n lbrack: '[',\n lbrke: '⦋',\n lbrksld: '⦏',\n lbrkslu: '⦍',\n lcaron: 'ľ',\n lcedil: 'ļ',\n lceil: '⌈',\n lcub: '{',\n lcy: 'л',\n ldca: '⤶',\n ldquo: '“',\n ldquor: '„',\n ldrdhar: '⥧',\n ldrushar: '⥋',\n ldsh: '↲',\n le: '≤',\n leftarrow: '←',\n leftarrowtail: '↢',\n leftharpoondown: '↽',\n leftharpoonup: '↼',\n leftleftarrows: '⇇',\n leftrightarrow: '↔',\n leftrightarrows: '⇆',\n leftrightharpoons: '⇋',\n leftrightsquigarrow: '↭',\n leftthreetimes: '⋋',\n leg: '⋚',\n leq: '≤',\n leqq: '≦',\n leqslant: '⩽',\n les: '⩽',\n lescc: '⪨',\n lesdot: '⩿',\n lesdoto: '⪁',\n lesdotor: '⪃',\n lesg: '⋚︀',\n lesges: '⪓',\n lessapprox: '⪅',\n lessdot: '⋖',\n lesseqgtr: '⋚',\n lesseqqgtr: '⪋',\n lessgtr: '≶',\n lesssim: '≲',\n lfisht: '⥼',\n lfloor: '⌊',\n lfr: '𝔩',\n lg: '≶',\n lgE: '⪑',\n lhard: '↽',\n lharu: '↼',\n lharul: '⥪',\n lhblk: '▄',\n ljcy: 'љ',\n ll: '≪',\n llarr: '⇇',\n llcorner: '⌞',\n llhard: '⥫',\n lltri: '◺',\n lmidot: 'ŀ',\n lmoust: '⎰',\n lmoustache: '⎰',\n lnE: '≨',\n lnap: '⪉',\n lnapprox: '⪉',\n lne: '⪇',\n lneq: '⪇',\n lneqq: '≨',\n lnsim: '⋦',\n loang: '⟬',\n loarr: '⇽',\n lobrk: '⟦',\n longleftarrow: '⟵',\n longleftrightarrow: '⟷',\n longmapsto: '⟼',\n longrightarrow: '⟶',\n looparrowleft: '↫',\n looparrowright: '↬',\n lopar: '⦅',\n lopf: '𝕝',\n loplus: '⨭',\n lotimes: '⨴',\n lowast: '∗',\n lowbar: '_',\n loz: '◊',\n lozenge: '◊',\n lozf: '⧫',\n lpar: '(',\n lparlt: '⦓',\n lrarr: '⇆',\n lrcorner: '⌟',\n lrhar: '⇋',\n lrhard: '⥭',\n lrm: '',\n lrtri: '⊿',\n lsaquo: '‹',\n lscr: '𝓁',\n lsh: '↰',\n lsim: '≲',\n lsime: '⪍',\n lsimg: '⪏',\n lsqb: '[',\n lsquo: '‘',\n lsquor: '‚',\n lstrok: 'ł',\n lt: '<',\n ltcc: '⪦',\n ltcir: '⩹',\n ltdot: '⋖',\n lthree: '⋋',\n ltimes: '⋉',\n ltlarr: '⥶',\n ltquest: '⩻',\n ltrPar: '⦖',\n ltri: '◃',\n ltrie: '⊴',\n ltrif: '◂',\n lurdshar: '⥊',\n luruhar: '⥦',\n lvertneqq: '≨︀',\n lvnE: '≨︀',\n mDDot: '∺',\n macr: '¯',\n male: '♂',\n malt: '✠',\n maltese: '✠',\n map: '↦',\n mapsto: '↦',\n mapstodown: '↧',\n mapstoleft: '↤',\n mapstoup: '↥',\n marker: '▮',\n mcomma: '⨩',\n mcy: 'м',\n mdash: '—',\n measuredangle: '∡',\n mfr: '𝔪',\n mho: '℧',\n micro: 'µ',\n mid: '∣',\n midast: '*',\n midcir: '⫰',\n middot: '·',\n minus: '−',\n minusb: '⊟',\n minusd: '∸',\n minusdu: '⨪',\n mlcp: '⫛',\n mldr: '…',\n mnplus: '∓',\n models: '⊧',\n mopf: '𝕞',\n mp: '∓',\n mscr: '𝓂',\n mstpos: '∾',\n mu: 'μ',\n multimap: '⊸',\n mumap: '⊸',\n nGg: '⋙̸',\n nGt: '≫⃒',\n nGtv: '≫̸',\n nLeftarrow: '⇍',\n nLeftrightarrow: '⇎',\n nLl: '⋘̸',\n nLt: '≪⃒',\n nLtv: '≪̸',\n nRightarrow: '⇏',\n nVDash: '⊯',\n nVdash: '⊮',\n nabla: '∇',\n nacute: 'ń',\n nang: '∠⃒',\n nap: '≉',\n napE: '⩰̸',\n napid: '≋̸',\n napos: 'ʼn',\n napprox: '≉',\n natur: '♮',\n natural: '♮',\n naturals: 'ℕ',\n nbsp: ' ',\n nbump: '≎̸',\n nbumpe: '≏̸',\n ncap: '⩃',\n ncaron: 'ň',\n ncedil: 'ņ',\n ncong: '≇',\n ncongdot: '⩭̸',\n ncup: '⩂',\n ncy: 'н',\n ndash: '–',\n ne: '≠',\n neArr: '⇗',\n nearhk: '⤤',\n nearr: '↗',\n nearrow: '↗',\n nedot: '≐̸',\n nequiv: '≢',\n nesear: '⤨',\n nesim: '≂̸',\n nexist: '∄',\n nexists: '∄',\n nfr: '𝔫',\n ngE: '≧̸',\n nge: '≱',\n ngeq: '≱',\n ngeqq: '≧̸',\n ngeqslant: '⩾̸',\n nges: '⩾̸',\n ngsim: '≵',\n ngt: '≯',\n ngtr: '≯',\n nhArr: '⇎',\n nharr: '↮',\n nhpar: '⫲',\n ni: '∋',\n nis: '⋼',\n nisd: '⋺',\n niv: '∋',\n njcy: 'њ',\n nlArr: '⇍',\n nlE: '≦̸',\n nlarr: '↚',\n nldr: '‥',\n nle: '≰',\n nleftarrow: '↚',\n nleftrightarrow: '↮',\n nleq: '≰',\n nleqq: '≦̸',\n nleqslant: '⩽̸',\n nles: '⩽̸',\n nless: '≮',\n nlsim: '≴',\n nlt: '≮',\n nltri: '⋪',\n nltrie: '⋬',\n nmid: '∤',\n nopf: '𝕟',\n not: '¬',\n notin: '∉',\n notinE: '⋹̸',\n notindot: '⋵̸',\n notinva: '∉',\n notinvb: '⋷',\n notinvc: '⋶',\n notni: '∌',\n notniva: '∌',\n notnivb: '⋾',\n notnivc: '⋽',\n npar: '∦',\n nparallel: '∦',\n nparsl: '⫽⃥',\n npart: '∂̸',\n npolint: '⨔',\n npr: '⊀',\n nprcue: '⋠',\n npre: '⪯̸',\n nprec: '⊀',\n npreceq: '⪯̸',\n nrArr: '⇏',\n nrarr: '↛',\n nrarrc: '⤳̸',\n nrarrw: '↝̸',\n nrightarrow: '↛',\n nrtri: '⋫',\n nrtrie: '⋭',\n nsc: '⊁',\n nsccue: '⋡',\n nsce: '⪰̸',\n nscr: '𝓃',\n nshortmid: '∤',\n nshortparallel: '∦',\n nsim: '≁',\n nsime: '≄',\n nsimeq: '≄',\n nsmid: '∤',\n nspar: '∦',\n nsqsube: '⋢',\n nsqsupe: '⋣',\n nsub: '⊄',\n nsubE: '⫅̸',\n nsube: '⊈',\n nsubset: '⊂⃒',\n nsubseteq: '⊈',\n nsubseteqq: '⫅̸',\n nsucc: '⊁',\n nsucceq: '⪰̸',\n nsup: '⊅',\n nsupE: '⫆̸',\n nsupe: '⊉',\n nsupset: '⊃⃒',\n nsupseteq: '⊉',\n nsupseteqq: '⫆̸',\n ntgl: '≹',\n ntilde: 'ñ',\n ntlg: '≸',\n ntriangleleft: '⋪',\n ntrianglelefteq: '⋬',\n ntriangleright: '⋫',\n ntrianglerighteq: '⋭',\n nu: 'ν',\n num: '#',\n numero: '№',\n numsp: ' ',\n nvDash: '⊭',\n nvHarr: '⤄',\n nvap: '≍⃒',\n nvdash: '⊬',\n nvge: '≥⃒',\n nvgt: '>⃒',\n nvinfin: '⧞',\n nvlArr: '⤂',\n nvle: '≤⃒',\n nvlt: '<⃒',\n nvltrie: '⊴⃒',\n nvrArr: '⤃',\n nvrtrie: '⊵⃒',\n nvsim: '∼⃒',\n nwArr: '⇖',\n nwarhk: '⤣',\n nwarr: '↖',\n nwarrow: '↖',\n nwnear: '⤧',\n oS: 'Ⓢ',\n oacute: 'ó',\n oast: '⊛',\n ocir: '⊚',\n ocirc: 'ô',\n ocy: 'о',\n odash: '⊝',\n odblac: 'ő',\n odiv: '⨸',\n odot: '⊙',\n odsold: '⦼',\n oelig: 'œ',\n ofcir: '⦿',\n ofr: '𝔬',\n ogon: '˛',\n ograve: 'ò',\n ogt: '⧁',\n ohbar: '⦵',\n ohm: 'Ω',\n oint: '∮',\n olarr: '↺',\n olcir: '⦾',\n olcross: '⦻',\n oline: '‾',\n olt: '⧀',\n omacr: 'ō',\n omega: 'ω',\n omicron: 'ο',\n omid: '⦶',\n ominus: '⊖',\n oopf: '𝕠',\n opar: '⦷',\n operp: '⦹',\n oplus: '⊕',\n or: '∨',\n orarr: '↻',\n ord: '⩝',\n order: 'ℴ',\n orderof: 'ℴ',\n ordf: 'ª',\n ordm: 'º',\n origof: '⊶',\n oror: '⩖',\n orslope: '⩗',\n orv: '⩛',\n oscr: 'ℴ',\n oslash: 'ø',\n osol: '⊘',\n otilde: 'õ',\n otimes: '⊗',\n otimesas: '⨶',\n ouml: 'ö',\n ovbar: '⌽',\n par: '∥',\n para: '¶',\n parallel: '∥',\n parsim: '⫳',\n parsl: '⫽',\n part: '∂',\n pcy: 'п',\n percnt: '%',\n period: '.',\n permil: '‰',\n perp: '⊥',\n pertenk: '‱',\n pfr: '𝔭',\n phi: 'φ',\n phiv: 'ϕ',\n phmmat: 'ℳ',\n phone: '☎',\n pi: 'π',\n pitchfork: '⋔',\n piv: 'ϖ',\n planck: 'ℏ',\n planckh: 'ℎ',\n plankv: 'ℏ',\n plus: '+',\n plusacir: '⨣',\n plusb: '⊞',\n pluscir: '⨢',\n plusdo: '∔',\n plusdu: '⨥',\n pluse: '⩲',\n plusmn: '±',\n plussim: '⨦',\n plustwo: '⨧',\n pm: '±',\n pointint: '⨕',\n popf: '𝕡',\n pound: '£',\n pr: '≺',\n prE: '⪳',\n prap: '⪷',\n prcue: '≼',\n pre: '⪯',\n prec: '≺',\n precapprox: '⪷',\n preccurlyeq: '≼',\n preceq: '⪯',\n precnapprox: '⪹',\n precneqq: '⪵',\n precnsim: '⋨',\n precsim: '≾',\n prime: '′',\n primes: 'ℙ',\n prnE: '⪵',\n prnap: '⪹',\n prnsim: '⋨',\n prod: '∏',\n profalar: '⌮',\n profline: '⌒',\n profsurf: '⌓',\n prop: '∝',\n propto: '∝',\n prsim: '≾',\n prurel: '⊰',\n pscr: '𝓅',\n psi: 'ψ',\n puncsp: ' ',\n qfr: '𝔮',\n qint: '⨌',\n qopf: '𝕢',\n qprime: '⁗',\n qscr: '𝓆',\n quaternions: 'ℍ',\n quatint: '⨖',\n quest: '?',\n questeq: '≟',\n quot: '\"',\n rAarr: '⇛',\n rArr: '⇒',\n rAtail: '⤜',\n rBarr: '⤏',\n rHar: '⥤',\n race: '∽̱',\n racute: 'ŕ',\n radic: '√',\n raemptyv: '⦳',\n rang: '⟩',\n rangd: '⦒',\n range: '⦥',\n rangle: '⟩',\n raquo: '»',\n rarr: '→',\n rarrap: '⥵',\n rarrb: '⇥',\n rarrbfs: '⤠',\n rarrc: '⤳',\n rarrfs: '⤞',\n rarrhk: '↪',\n rarrlp: '↬',\n rarrpl: '⥅',\n rarrsim: '⥴',\n rarrtl: '↣',\n rarrw: '↝',\n ratail: '⤚',\n ratio: '∶',\n rationals: 'ℚ',\n rbarr: '⤍',\n rbbrk: '❳',\n rbrace: '}',\n rbrack: ']',\n rbrke: '⦌',\n rbrksld: '⦎',\n rbrkslu: '⦐',\n rcaron: 'ř',\n rcedil: 'ŗ',\n rceil: '⌉',\n rcub: '}',\n rcy: 'р',\n rdca: '⤷',\n rdldhar: '⥩',\n rdquo: '”',\n rdquor: '”',\n rdsh: '↳',\n real: 'ℜ',\n realine: 'ℛ',\n realpart: 'ℜ',\n reals: 'ℝ',\n rect: '▭',\n reg: '®',\n rfisht: '⥽',\n rfloor: '⌋',\n rfr: '𝔯',\n rhard: '⇁',\n rharu: '⇀',\n rharul: '⥬',\n rho: 'ρ',\n rhov: 'ϱ',\n rightarrow: '→',\n rightarrowtail: '↣',\n rightharpoondown: '⇁',\n rightharpoonup: '⇀',\n rightleftarrows: '⇄',\n rightleftharpoons: '⇌',\n rightrightarrows: '⇉',\n rightsquigarrow: '↝',\n rightthreetimes: '⋌',\n ring: '˚',\n risingdotseq: '≓',\n rlarr: '⇄',\n rlhar: '⇌',\n rlm: '',\n rmoust: '⎱',\n rmoustache: '⎱',\n rnmid: '⫮',\n roang: '⟭',\n roarr: '⇾',\n robrk: '⟧',\n ropar: '⦆',\n ropf: '𝕣',\n roplus: '⨮',\n rotimes: '⨵',\n rpar: ')',\n rpargt: '⦔',\n rppolint: '⨒',\n rrarr: '⇉',\n rsaquo: '›',\n rscr: '𝓇',\n rsh: '↱',\n rsqb: ']',\n rsquo: '’',\n rsquor: '’',\n rthree: '⋌',\n rtimes: '⋊',\n rtri: '▹',\n rtrie: '⊵',\n rtrif: '▸',\n rtriltri: '⧎',\n ruluhar: '⥨',\n rx: '℞',\n sacute: 'ś',\n sbquo: '‚',\n sc: '≻',\n scE: '⪴',\n scap: '⪸',\n scaron: 'š',\n sccue: '≽',\n sce: '⪰',\n scedil: 'ş',\n scirc: 'ŝ',\n scnE: '⪶',\n scnap: '⪺',\n scnsim: '⋩',\n scpolint: '⨓',\n scsim: '≿',\n scy: 'с',\n sdot: '⋅',\n sdotb: '⊡',\n sdote: '⩦',\n seArr: '⇘',\n searhk: '⤥',\n searr: '↘',\n searrow: '↘',\n sect: '§',\n semi: ';',\n seswar: '⤩',\n setminus: '∖',\n setmn: '∖',\n sext: '✶',\n sfr: '𝔰',\n sfrown: '⌢',\n sharp: '♯',\n shchcy: 'щ',\n shcy: 'ш',\n shortmid: '∣',\n shortparallel: '∥',\n shy: '',\n sigma: 'σ',\n sigmaf: 'ς',\n sigmav: 'ς',\n sim: '∼',\n simdot: '⩪',\n sime: '≃',\n simeq: '≃',\n simg: '⪞',\n simgE: '⪠',\n siml: '⪝',\n simlE: '⪟',\n simne: '≆',\n simplus: '⨤',\n simrarr: '⥲',\n slarr: '←',\n smallsetminus: '∖',\n smashp: '⨳',\n smeparsl: '⧤',\n smid: '∣',\n smile: '⌣',\n smt: '⪪',\n smte: '⪬',\n smtes: '⪬︀',\n softcy: 'ь',\n sol: '/',\n solb: '⧄',\n solbar: '⌿',\n sopf: '𝕤',\n spades: '♠',\n spadesuit: '♠',\n spar: '∥',\n sqcap: '⊓',\n sqcaps: '⊓︀',\n sqcup: '⊔',\n sqcups: '⊔︀',\n sqsub: '⊏',\n sqsube: '⊑',\n sqsubset: '⊏',\n sqsubseteq: '⊑',\n sqsup: '⊐',\n sqsupe: '⊒',\n sqsupset: '⊐',\n sqsupseteq: '⊒',\n squ: '□',\n square: '□',\n squarf: '▪',\n squf: '▪',\n srarr: '→',\n sscr: '𝓈',\n ssetmn: '∖',\n ssmile: '⌣',\n sstarf: '⋆',\n star: '☆',\n starf: '★',\n straightepsilon: 'ϵ',\n straightphi: 'ϕ',\n strns: '¯',\n sub: '⊂',\n subE: '⫅',\n subdot: '⪽',\n sube: '⊆',\n subedot: '⫃',\n submult: '⫁',\n subnE: '⫋',\n subne: '⊊',\n subplus: '⪿',\n subrarr: '⥹',\n subset: '⊂',\n subseteq: '⊆',\n subseteqq: '⫅',\n subsetneq: '⊊',\n subsetneqq: '⫋',\n subsim: '⫇',\n subsub: '⫕',\n subsup: '⫓',\n succ: '≻',\n succapprox: '⪸',\n succcurlyeq: '≽',\n succeq: '⪰',\n succnapprox: '⪺',\n succneqq: '⪶',\n succnsim: '⋩',\n succsim: '≿',\n sum: '∑',\n sung: '♪',\n sup1: '¹',\n sup2: '²',\n sup3: '³',\n sup: '⊃',\n supE: '⫆',\n supdot: '⪾',\n supdsub: '⫘',\n supe: '⊇',\n supedot: '⫄',\n suphsol: '⟉',\n suphsub: '⫗',\n suplarr: '⥻',\n supmult: '⫂',\n supnE: '⫌',\n supne: '⊋',\n supplus: '⫀',\n supset: '⊃',\n supseteq: '⊇',\n supseteqq: '⫆',\n supsetneq: '⊋',\n supsetneqq: '⫌',\n supsim: '⫈',\n supsub: '⫔',\n supsup: '⫖',\n swArr: '⇙',\n swarhk: '⤦',\n swarr: '↙',\n swarrow: '↙',\n swnwar: '⤪',\n szlig: 'ß',\n target: '⌖',\n tau: 'τ',\n tbrk: '⎴',\n tcaron: 'ť',\n tcedil: 'ţ',\n tcy: 'т',\n tdot: '⃛',\n telrec: '⌕',\n tfr: '𝔱',\n there4: '∴',\n therefore: '∴',\n theta: 'θ',\n thetasym: 'ϑ',\n thetav: 'ϑ',\n thickapprox: '≈',\n thicksim: '∼',\n thinsp: ' ',\n thkap: '≈',\n thksim: '∼',\n thorn: 'þ',\n tilde: '˜',\n times: '×',\n timesb: '⊠',\n timesbar: '⨱',\n timesd: '⨰',\n tint: '∭',\n toea: '⤨',\n top: '⊤',\n topbot: '⌶',\n topcir: '⫱',\n topf: '𝕥',\n topfork: '⫚',\n tosa: '⤩',\n tprime: '‴',\n trade: '™',\n triangle: '▵',\n triangledown: '▿',\n triangleleft: '◃',\n trianglelefteq: '⊴',\n triangleq: '≜',\n triangleright: '▹',\n trianglerighteq: '⊵',\n tridot: '◬',\n trie: '≜',\n triminus: '⨺',\n triplus: '⨹',\n trisb: '⧍',\n tritime: '⨻',\n trpezium: '⏢',\n tscr: '𝓉',\n tscy: 'ц',\n tshcy: 'ћ',\n tstrok: 'ŧ',\n twixt: '≬',\n twoheadleftarrow: '↞',\n twoheadrightarrow: '↠',\n uArr: '⇑',\n uHar: '⥣',\n uacute: 'ú',\n uarr: '↑',\n ubrcy: 'ў',\n ubreve: 'ŭ',\n ucirc: 'û',\n ucy: 'у',\n udarr: '⇅',\n udblac: 'ű',\n udhar: '⥮',\n ufisht: '⥾',\n ufr: '𝔲',\n ugrave: 'ù',\n uharl: '↿',\n uharr: '↾',\n uhblk: '▀',\n ulcorn: '⌜',\n ulcorner: '⌜',\n ulcrop: '⌏',\n ultri: '◸',\n umacr: 'ū',\n uml: '¨',\n uogon: 'ų',\n uopf: '𝕦',\n uparrow: '↑',\n updownarrow: '↕',\n upharpoonleft: '↿',\n upharpoonright: '↾',\n uplus: '⊎',\n upsi: 'υ',\n upsih: 'ϒ',\n upsilon: 'υ',\n upuparrows: '⇈',\n urcorn: '⌝',\n urcorner: '⌝',\n urcrop: '⌎',\n uring: 'ů',\n urtri: '◹',\n uscr: '𝓊',\n utdot: '⋰',\n utilde: 'ũ',\n utri: '▵',\n utrif: '▴',\n uuarr: '⇈',\n uuml: 'ü',\n uwangle: '⦧',\n vArr: '⇕',\n vBar: '⫨',\n vBarv: '⫩',\n vDash: '⊨',\n vangrt: '⦜',\n varepsilon: 'ϵ',\n varkappa: 'ϰ',\n varnothing: '∅',\n varphi: 'ϕ',\n varpi: 'ϖ',\n varpropto: '∝',\n varr: '↕',\n varrho: 'ϱ',\n varsigma: 'ς',\n varsubsetneq: '⊊︀',\n varsubsetneqq: '⫋︀',\n varsupsetneq: '⊋︀',\n varsupsetneqq: '⫌︀',\n vartheta: 'ϑ',\n vartriangleleft: '⊲',\n vartriangleright: '⊳',\n vcy: 'в',\n vdash: '⊢',\n vee: '∨',\n veebar: '⊻',\n veeeq: '≚',\n vellip: '⋮',\n verbar: '|',\n vert: '|',\n vfr: '𝔳',\n vltri: '⊲',\n vnsub: '⊂⃒',\n vnsup: '⊃⃒',\n vopf: '𝕧',\n vprop: '∝',\n vrtri: '⊳',\n vscr: '𝓋',\n vsubnE: '⫋︀',\n vsubne: '⊊︀',\n vsupnE: '⫌︀',\n vsupne: '⊋︀',\n vzigzag: '⦚',\n wcirc: 'ŵ',\n wedbar: '⩟',\n wedge: '∧',\n wedgeq: '≙',\n weierp: '℘',\n wfr: '𝔴',\n wopf: '𝕨',\n wp: '℘',\n wr: '≀',\n wreath: '≀',\n wscr: '𝓌',\n xcap: '⋂',\n xcirc: '◯',\n xcup: '⋃',\n xdtri: '▽',\n xfr: '𝔵',\n xhArr: '⟺',\n xharr: '⟷',\n xi: 'ξ',\n xlArr: '⟸',\n xlarr: '⟵',\n xmap: '⟼',\n xnis: '⋻',\n xodot: '⨀',\n xopf: '𝕩',\n xoplus: '⨁',\n xotime: '⨂',\n xrArr: '⟹',\n xrarr: '⟶',\n xscr: '𝓍',\n xsqcup: '⨆',\n xuplus: '⨄',\n xutri: '△',\n xvee: '⋁',\n xwedge: '⋀',\n yacute: 'ý',\n yacy: 'я',\n ycirc: 'ŷ',\n ycy: 'ы',\n yen: '¥',\n yfr: '𝔶',\n yicy: 'ї',\n yopf: '𝕪',\n yscr: '𝓎',\n yucy: 'ю',\n yuml: 'ÿ',\n zacute: 'ź',\n zcaron: 'ž',\n zcy: 'з',\n zdot: 'ż',\n zeetrf: 'ℨ',\n zeta: 'ζ',\n zfr: '𝔷',\n zhcy: 'ж',\n zigrarr: '⇝',\n zopf: '𝕫',\n zscr: '𝓏',\n zwj: '',\n zwnj: ''\n}\n","import {characterEntities} from 'character-entities'\n\n// To do: next major: use `Object.hasOwn`.\nconst own = {}.hasOwnProperty\n\n/**\n * Decode a single character reference (without the `&` or `;`).\n * You probably only need this when you’re building parsers yourself that follow\n * different rules compared to HTML.\n * This is optimized to be tiny in browsers.\n *\n * @param {string} value\n * `notin` (named), `#123` (deci), `#x123` (hexa).\n * @returns {string|false}\n * Decoded reference.\n */\nexport function decodeNamedCharacterReference(value) {\n return own.call(characterEntities, value) ? characterEntities[value] : false\n}\n","/**\n * Like `Array#splice`, but smarter for giant arrays.\n *\n * `Array#splice` takes all items to be inserted as individual argument which\n * causes a stack overflow in V8 when trying to insert 100k items for instance.\n *\n * Otherwise, this does not return the removed items, and takes `items` as an\n * array instead of rest parameters.\n *\n * @template {unknown} T\n * Item type.\n * @param {Array<T>} list\n * List to operate on.\n * @param {number} start\n * Index to remove/insert at (can be negative).\n * @param {number} remove\n * Number of items to remove.\n * @param {Array<T>} items\n * Items to inject into `list`.\n * @returns {undefined}\n * Nothing.\n */\nexport function splice(list, start, remove, items) {\n const end = list.length;\n let chunkStart = 0;\n /** @type {Array<unknown>} */\n let parameters;\n\n // Make start between zero and `end` (included).\n if (start < 0) {\n start = -start > end ? 0 : end + start;\n } else {\n start = start > end ? end : start;\n }\n remove = remove > 0 ? remove : 0;\n\n // No need to chunk the items if there’s only a couple (10k) items.\n if (items.length < 10000) {\n parameters = Array.from(items);\n parameters.unshift(start, remove);\n // @ts-expect-error Hush, it’s fine.\n list.splice(...parameters);\n } else {\n // Delete `remove` items starting from `start`\n if (remove) list.splice(start, remove);\n\n // Insert the items in chunks to not cause stack overflows.\n while (chunkStart < items.length) {\n parameters = items.slice(chunkStart, chunkStart + 10000);\n parameters.unshift(start, 0);\n // @ts-expect-error Hush, it’s fine.\n list.splice(...parameters);\n chunkStart += 10000;\n start += 10000;\n }\n }\n}\n\n/**\n * Append `items` (an array) at the end of `list` (another array).\n * When `list` was empty, returns `items` instead.\n *\n * This prevents a potentially expensive operation when `list` is empty,\n * and adds items in batches to prevent V8 from hanging.\n *\n * @template {unknown} T\n * Item type.\n * @param {Array<T>} list\n * List to operate on.\n * @param {Array<T>} items\n * Items to add to `list`.\n * @returns {Array<T>}\n * Either `list` or `items`.\n */\nexport function push(list, items) {\n if (list.length > 0) {\n splice(list, list.length, 0, items);\n return list;\n }\n return items;\n}","/**\n * @import {\n * Extension,\n * Handles,\n * HtmlExtension,\n * NormalizedExtension\n * } from 'micromark-util-types'\n */\n\nimport {splice} from 'micromark-util-chunked'\n\nconst hasOwnProperty = {}.hasOwnProperty\n\n/**\n * Combine multiple syntax extensions into one.\n *\n * @param {ReadonlyArray<Extension>} extensions\n * List of syntax extensions.\n * @returns {NormalizedExtension}\n * A single combined extension.\n */\nexport function combineExtensions(extensions) {\n /** @type {NormalizedExtension} */\n const all = {}\n let index = -1\n\n while (++index < extensions.length) {\n syntaxExtension(all, extensions[index])\n }\n\n return all\n}\n\n/**\n * Merge `extension` into `all`.\n *\n * @param {NormalizedExtension} all\n * Extension to merge into.\n * @param {Extension} extension\n * Extension to merge.\n * @returns {undefined}\n * Nothing.\n */\nfunction syntaxExtension(all, extension) {\n /** @type {keyof Extension} */\n let hook\n\n for (hook in extension) {\n const maybe = hasOwnProperty.call(all, hook) ? all[hook] : undefined\n /** @type {Record<string, unknown>} */\n const left = maybe || (all[hook] = {})\n /** @type {Record<string, unknown> | undefined} */\n const right = extension[hook]\n /** @type {string} */\n let code\n\n if (right) {\n for (code in right) {\n if (!hasOwnProperty.call(left, code)) left[code] = []\n const value = right[code]\n constructs(\n // @ts-expect-error Looks like a list.\n left[code],\n Array.isArray(value) ? value : value ? [value] : []\n )\n }\n }\n }\n}\n\n/**\n * Merge `list` into `existing` (both lists of constructs).\n * Mutates `existing`.\n *\n * @param {Array<unknown>} existing\n * List of constructs to merge into.\n * @param {Array<unknown>} list\n * List of constructs to merge.\n * @returns {undefined}\n * Nothing.\n */\nfunction constructs(existing, list) {\n let index = -1\n /** @type {Array<unknown>} */\n const before = []\n\n while (++index < list.length) {\n // @ts-expect-error Looks like an object.\n ;(list[index].add === 'after' ? existing : before).push(list[index])\n }\n\n splice(existing, 0, 0, before)\n}\n\n/**\n * Combine multiple HTML extensions into one.\n *\n * @param {ReadonlyArray<HtmlExtension>} htmlExtensions\n * List of HTML extensions.\n * @returns {HtmlExtension}\n * Single combined HTML extension.\n */\nexport function combineHtmlExtensions(htmlExtensions) {\n /** @type {HtmlExtension} */\n const handlers = {}\n let index = -1\n\n while (++index < htmlExtensions.length) {\n htmlExtension(handlers, htmlExtensions[index])\n }\n\n return handlers\n}\n\n/**\n * Merge `extension` into `all`.\n *\n * @param {HtmlExtension} all\n * Extension to merge into.\n * @param {HtmlExtension} extension\n * Extension to merge.\n * @returns {undefined}\n * Nothing.\n */\nfunction htmlExtension(all, extension) {\n /** @type {keyof HtmlExtension} */\n let hook\n\n for (hook in extension) {\n const maybe = hasOwnProperty.call(all, hook) ? all[hook] : undefined\n const left = maybe || (all[hook] = {})\n const right = extension[hook]\n /** @type {keyof Handles} */\n let type\n\n if (right) {\n for (type in right) {\n // @ts-expect-error assume document vs regular handler are managed correctly.\n left[type] = right[type]\n }\n }\n }\n}\n","/**\n * Turn the number (in string form as either hexa- or plain decimal) coming from\n * a numeric character reference into a character.\n *\n * Sort of like `String.fromCodePoint(Number.parseInt(value, base))`, but makes\n * non-characters and control characters safe.\n *\n * @param {string} value\n * Value to decode.\n * @param {number} base\n * Numeric base.\n * @returns {string}\n * Character.\n */\nexport function decodeNumericCharacterReference(value, base) {\n const code = Number.parseInt(value, base);\n if (\n // C0 except for HT, LF, FF, CR, space.\n code < 9 || code === 11 || code > 13 && code < 32 ||\n // Control character (DEL) of C0, and C1 controls.\n code > 126 && code < 160 ||\n // Lone high surrogates and low surrogates.\n code > 55_295 && code < 57_344 ||\n // Noncharacters.\n code > 64_975 && code < 65_008 || /* eslint-disable no-bitwise */\n (code & 65_535) === 65_535 || (code & 65_535) === 65_534 || /* eslint-enable no-bitwise */\n // Out of range\n code > 1_114_111) {\n return \"\\uFFFD\";\n }\n return String.fromCodePoint(code);\n}","/**\n * Normalize an identifier (as found in references, definitions).\n *\n * Collapses markdown whitespace, trim, and then lower- and uppercase.\n *\n * Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their\n * lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different\n * uppercase character (U+0398 (`Θ`)).\n * So, to get a canonical form, we perform both lower- and uppercase.\n *\n * Using uppercase last makes sure keys will never interact with default\n * prototypal values (such as `constructor`): nothing in the prototype of\n * `Object` is uppercase.\n *\n * @param {string} value\n * Identifier to normalize.\n * @returns {string}\n * Normalized identifier.\n */\nexport function normalizeIdentifier(value) {\n return value\n // Collapse markdown whitespace.\n .replace(/[\\t\\n\\r ]+/g, \" \")\n // Trim.\n .replace(/^ | $/g, '')\n // Some characters are considered “uppercase”, but if their lowercase\n // counterpart is uppercased will result in a different uppercase\n // character.\n // Hence, to get that form, we perform both lower- and uppercase.\n // Upper case makes sure keys will not interact with default prototypal\n // methods: no method is uppercase.\n .toLowerCase().toUpperCase();\n}","/**\n * @import {Code} from 'micromark-util-types'\n */\n\n/**\n * Check whether the character code represents an ASCII alpha (`a` through `z`,\n * case insensitive).\n *\n * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha.\n *\n * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`)\n * to U+005A (`Z`).\n *\n * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`)\n * to U+007A (`z`).\n *\n * @param code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport const asciiAlpha = regexCheck(/[A-Za-z]/);\n\n/**\n * Check whether the character code represents an ASCII alphanumeric (`a`\n * through `z`, case insensitive, or `0` through `9`).\n *\n * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha\n * (see `asciiAlpha`).\n *\n * @param code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport const asciiAlphanumeric = regexCheck(/[\\dA-Za-z]/);\n\n/**\n * Check whether the character code represents an ASCII atext.\n *\n * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in\n * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`),\n * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F\n * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E\n * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE\n * (`{`) to U+007E TILDE (`~`).\n *\n * See:\n * **\\[RFC5322]**:\n * [Internet Message Format](https://tools.ietf.org/html/rfc5322).\n * P. Resnick.\n * IETF.\n *\n * @param code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport const asciiAtext = regexCheck(/[#-'*+\\--9=?A-Z^-~]/);\n\n/**\n * Check whether a character code is an ASCII control character.\n *\n * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)\n * to U+001F (US), or U+007F (DEL).\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function asciiControl(code) {\n return (\n // Special whitespace codes (which have negative values), C0 and Control\n // character DEL\n code !== null && (code < 32 || code === 127)\n );\n}\n\n/**\n * Check whether the character code represents an ASCII digit (`0` through `9`).\n *\n * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to\n * U+0039 (`9`).\n *\n * @param code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport const asciiDigit = regexCheck(/\\d/);\n\n/**\n * Check whether the character code represents an ASCII hex digit (`a` through\n * `f`, case insensitive, or `0` through `9`).\n *\n * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex\n * digit, or an ASCII lower hex digit.\n *\n * An **ASCII upper hex digit** is a character in the inclusive range U+0041\n * (`A`) to U+0046 (`F`).\n *\n * An **ASCII lower hex digit** is a character in the inclusive range U+0061\n * (`a`) to U+0066 (`f`).\n *\n * @param code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport const asciiHexDigit = regexCheck(/[\\dA-Fa-f]/);\n\n/**\n * Check whether the character code represents ASCII punctuation.\n *\n * An **ASCII punctuation** is a character in the inclusive ranges U+0021\n * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT\n * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT\n * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`).\n *\n * @param code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/);\n\n/**\n * Check whether a character code is a markdown line ending.\n *\n * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN\n * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).\n *\n * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE\n * RETURN (CR) are replaced by these virtual characters depending on whether\n * they occurred together.\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownLineEnding(code) {\n return code !== null && code < -2;\n}\n\n/**\n * Check whether a character code is a markdown line ending (see\n * `markdownLineEnding`) or markdown space (see `markdownSpace`).\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownLineEndingOrSpace(code) {\n return code !== null && (code < 0 || code === 32);\n}\n\n/**\n * Check whether a character code is a markdown space.\n *\n * A **markdown space** is the concrete character U+0020 SPACE (SP) and the\n * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).\n *\n * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is\n * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL\n * SPACE (VS) characters, depending on the column at which the tab occurred.\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownSpace(code) {\n return code === -2 || code === -1 || code === 32;\n}\n\n// Size note: removing ASCII from the regex and using `asciiPunctuation` here\n// In fact adds to the bundle size.\n/**\n * Check whether the character code represents Unicode punctuation.\n *\n * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,\n * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`\n * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`\n * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII\n * punctuation (see `asciiPunctuation`).\n *\n * See:\n * **\\[UNICODE]**:\n * [The Unicode Standard](https://www.unicode.org/versions/).\n * Unicode Consortium.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const unicodePunctuation = regexCheck(/\\p{P}|\\p{S}/u);\n\n/**\n * Check whether the character code represents Unicode whitespace.\n *\n * Note that this does handle micromark specific markdown whitespace characters.\n * See `markdownLineEndingOrSpace` to check that.\n *\n * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator,\n * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF),\n * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\\[UNICODE]**).\n *\n * See:\n * **\\[UNICODE]**:\n * [The Unicode Standard](https://www.unicode.org/versions/).\n * Unicode Consortium.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const unicodeWhitespace = regexCheck(/\\s/);\n\n/**\n * Create a code check from a regex.\n *\n * @param {RegExp} regex\n * Expression.\n * @returns {(code: Code) => boolean}\n * Check.\n */\nfunction regexCheck(regex) {\n return check;\n\n /**\n * Check whether a code matches the bound regex.\n *\n * @param {Code} code\n * Character code.\n * @returns {boolean}\n * Whether the character code matches the bound regex.\n */\n function check(code) {\n return code !== null && code > -1 && regex.test(String.fromCharCode(code));\n }\n}","import { asciiAlphanumeric } from 'micromark-util-character';\nimport { encode } from 'micromark-util-encode';\n/**\n * Make a value safe for injection as a URL.\n *\n * This encodes unsafe characters with percent-encoding and skips already\n * encoded sequences (see `normalizeUri`).\n * Further unsafe characters are encoded as character references (see\n * `micromark-util-encode`).\n *\n * A regex of allowed protocols can be given, in which case the URL is\n * sanitized.\n * For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or\n * `/^https?$/i` for `img[src]` (this is what `github.com` allows).\n * If the URL includes an unknown protocol (one not matched by `protocol`, such\n * as a dangerous example, `javascript:`), the value is ignored.\n *\n * @param {string | null | undefined} url\n * URI to sanitize.\n * @param {RegExp | null | undefined} [protocol]\n * Allowed protocols.\n * @returns {string}\n * Sanitized URI.\n */\nexport function sanitizeUri(url, protocol) {\n const value = encode(normalizeUri(url || ''));\n if (!protocol) {\n return value;\n }\n const colon = value.indexOf(':');\n const questionMark = value.indexOf('?');\n const numberSign = value.indexOf('#');\n const slash = value.indexOf('/');\n if (\n // If there is no protocol, it’s relative.\n colon < 0 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n slash > -1 && colon > slash || questionMark > -1 && colon > questionMark || numberSign > -1 && colon > numberSign ||\n // It is a protocol, it should be allowed.\n protocol.test(value.slice(0, colon))) {\n return value;\n }\n return '';\n}\n\n/**\n * Normalize a URL.\n *\n * Encode unsafe characters with percent-encoding, skipping already encoded\n * sequences.\n *\n * @param {string} value\n * URI to normalize.\n * @returns {string}\n * Normalized URI.\n */\nexport function normalizeUri(value) {\n /** @type {Array<string>} */\n const result = [];\n let index = -1;\n let start = 0;\n let skip = 0;\n while (++index < value.length) {\n const code = value.charCodeAt(index);\n /** @type {string} */\n let replace = '';\n\n // A correct percent encoded value.\n if (code === 37 && asciiAlphanumeric(value.charCodeAt(index + 1)) && asciiAlphanumeric(value.charCodeAt(index + 2))) {\n skip = 2;\n }\n // ASCII.\n else if (code < 128) {\n if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) {\n replace = String.fromCharCode(code);\n }\n }\n // Astral.\n else if (code > 55_295 && code < 57_344) {\n const next = value.charCodeAt(index + 1);\n\n // A correct surrogate pair.\n if (code < 56_320 && next > 56_319 && next < 57_344) {\n replace = String.fromCharCode(code, next);\n skip = 1;\n }\n // Lone surrogate.\n else {\n replace = \"\\uFFFD\";\n }\n }\n // Unicode.\n else {\n replace = String.fromCharCode(code);\n }\n if (replace) {\n result.push(value.slice(start, index), encodeURIComponent(replace));\n start = index + skip + 1;\n replace = '';\n }\n if (skip) {\n index += skip;\n skip = 0;\n }\n }\n return result.join('') + value.slice(start);\n}","/**\n * @import {Effects, State, TokenType} from 'micromark-util-types'\n */\n\nimport { markdownSpace } from 'micromark-util-character';\n\n// To do: implement `spaceOrTab`, `spaceOrTabMinMax`, `spaceOrTabWithOptions`.\n\n/**\n * Parse spaces and tabs.\n *\n * There is no `nok` parameter:\n *\n * * spaces in markdown are often optional, in which case this factory can be\n * used and `ok` will be switched to whether spaces were found or not\n * * one line ending or space can be detected with `markdownSpace(code)` right\n * before using `factorySpace`\n *\n * ###### Examples\n *\n * Where `␉` represents a tab (plus how much it expands) and `␠` represents a\n * single space.\n *\n * ```markdown\n * ␉\n * ␠␠␠␠\n * ␉␠\n * ```\n *\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @param {TokenType} type\n * Type (`' \\t'`).\n * @param {number | undefined} [max=Infinity]\n * Max (exclusive).\n * @returns {State}\n * Start state.\n */\nexport function factorySpace(effects, ok, type, max) {\n const limit = max ? max - 1 : Number.POSITIVE_INFINITY;\n let size = 0;\n return start;\n\n /** @type {State} */\n function start(code) {\n if (markdownSpace(code)) {\n effects.enter(type);\n return prefix(code);\n }\n return ok(code);\n }\n\n /** @type {State} */\n function prefix(code) {\n if (markdownSpace(code) && size++ < limit) {\n effects.consume(code);\n return prefix;\n }\n effects.exit(type);\n return ok(code);\n }\n}","/**\n * @import {\n * InitialConstruct,\n * Initializer,\n * State,\n * TokenizeContext,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {InitialConstruct} */\nexport const content = {\n tokenize: initializeContent\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Initializer}\n * Content.\n */\nfunction initializeContent(effects) {\n const contentStart = effects.attempt(this.parser.constructs.contentInitial, afterContentStartConstruct, paragraphInitial);\n /** @type {Token} */\n let previous;\n return contentStart;\n\n /** @type {State} */\n function afterContentStartConstruct(code) {\n if (code === null) {\n effects.consume(code);\n return;\n }\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return factorySpace(effects, contentStart, \"linePrefix\");\n }\n\n /** @type {State} */\n function paragraphInitial(code) {\n effects.enter(\"paragraph\");\n return lineStart(code);\n }\n\n /** @type {State} */\n function lineStart(code) {\n const token = effects.enter(\"chunkText\", {\n contentType: \"text\",\n previous\n });\n if (previous) {\n previous.next = token;\n }\n previous = token;\n return data(code);\n }\n\n /** @type {State} */\n function data(code) {\n if (code === null) {\n effects.exit(\"chunkText\");\n effects.exit(\"paragraph\");\n effects.consume(code);\n return;\n }\n if (markdownLineEnding(code)) {\n effects.consume(code);\n effects.exit(\"chunkText\");\n return lineStart;\n }\n\n // Data.\n effects.consume(code);\n return data;\n }\n}","/**\n * @import {\n * Construct,\n * ContainerState,\n * InitialConstruct,\n * Initializer,\n * Point,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\n/**\n * @typedef {[Construct, ContainerState]} StackItem\n * Construct and its state.\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\nimport { splice } from 'micromark-util-chunked';\n/** @type {InitialConstruct} */\nexport const document = {\n tokenize: initializeDocument\n};\n\n/** @type {Construct} */\nconst containerConstruct = {\n tokenize: tokenizeContainer\n};\n\n/**\n * @this {TokenizeContext}\n * Self.\n * @type {Initializer}\n * Initializer.\n */\nfunction initializeDocument(effects) {\n const self = this;\n /** @type {Array<StackItem>} */\n const stack = [];\n let continued = 0;\n /** @type {TokenizeContext | undefined} */\n let childFlow;\n /** @type {Token | undefined} */\n let childToken;\n /** @type {number} */\n let lineStartOffset;\n return start;\n\n /** @type {State} */\n function start(code) {\n // First we iterate through the open blocks, starting with the root\n // document, and descending through last children down to the last open\n // block.\n // Each block imposes a condition that the line must satisfy if the block is\n // to remain open.\n // For example, a block quote requires a `>` character.\n // A paragraph requires a non-blank line.\n // In this phase we may match all or just some of the open blocks.\n // But we cannot close unmatched blocks yet, because we may have a lazy\n // continuation line.\n if (continued < stack.length) {\n const item = stack[continued];\n self.containerState = item[1];\n return effects.attempt(item[0].continuation, documentContinue, checkNewContainers)(code);\n }\n\n // Done.\n return checkNewContainers(code);\n }\n\n /** @type {State} */\n function documentContinue(code) {\n continued++;\n\n // Note: this field is called `_closeFlow` but it also closes containers.\n // Perhaps a good idea to rename it but it’s already used in the wild by\n // extensions.\n if (self.containerState._closeFlow) {\n self.containerState._closeFlow = undefined;\n if (childFlow) {\n closeFlow();\n }\n\n // Note: this algorithm for moving events around is similar to the\n // algorithm when dealing with lazy lines in `writeToChild`.\n const indexBeforeExits = self.events.length;\n let indexBeforeFlow = indexBeforeExits;\n /** @type {Point | undefined} */\n let point;\n\n // Find the flow chunk.\n while (indexBeforeFlow--) {\n if (self.events[indexBeforeFlow][0] === 'exit' && self.events[indexBeforeFlow][1].type === \"chunkFlow\") {\n point = self.events[indexBeforeFlow][1].end;\n break;\n }\n }\n exitContainers(continued);\n\n // Fix positions.\n let index = indexBeforeExits;\n while (index < self.events.length) {\n self.events[index][1].end = {\n ...point\n };\n index++;\n }\n\n // Inject the exits earlier (they’re still also at the end).\n splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));\n\n // Discard the duplicate exits.\n self.events.length = index;\n return checkNewContainers(code);\n }\n return start(code);\n }\n\n /** @type {State} */\n function checkNewContainers(code) {\n // Next, after consuming the continuation markers for existing blocks, we\n // look for new block starts (e.g. `>` for a block quote).\n // If we encounter a new block start, we close any blocks unmatched in\n // step 1 before creating the new block as a child of the last matched\n // block.\n if (continued === stack.length) {\n // No need to `check` whether there’s a container, of `exitContainers`\n // would be moot.\n // We can instead immediately `attempt` to parse one.\n if (!childFlow) {\n return documentContinued(code);\n }\n\n // If we have concrete content, such as block HTML or fenced code,\n // we can’t have containers “pierce” into them, so we can immediately\n // start.\n if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {\n return flowStart(code);\n }\n\n // If we do have flow, it could still be a blank line,\n // but we’d be interrupting it w/ a new container if there’s a current\n // construct.\n // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer\n // needed in micromark-extension-gfm-table@1.0.6).\n self.interrupt = Boolean(childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack);\n }\n\n // Check if there is a new container.\n self.containerState = {};\n return effects.check(containerConstruct, thereIsANewContainer, thereIsNoNewContainer)(code);\n }\n\n /** @type {State} */\n function thereIsANewContainer(code) {\n if (childFlow) closeFlow();\n exitContainers(continued);\n return documentContinued(code);\n }\n\n /** @type {State} */\n function thereIsNoNewContainer(code) {\n self.parser.lazy[self.now().line] = continued !== stack.length;\n lineStartOffset = self.now().offset;\n return flowStart(code);\n }\n\n /** @type {State} */\n function documentContinued(code) {\n // Try new containers.\n self.containerState = {};\n return effects.attempt(containerConstruct, containerContinue, flowStart)(code);\n }\n\n /** @type {State} */\n function containerContinue(code) {\n continued++;\n stack.push([self.currentConstruct, self.containerState]);\n // Try another.\n return documentContinued(code);\n }\n\n /** @type {State} */\n function flowStart(code) {\n if (code === null) {\n if (childFlow) closeFlow();\n exitContainers(0);\n effects.consume(code);\n return;\n }\n childFlow = childFlow || self.parser.flow(self.now());\n effects.enter(\"chunkFlow\", {\n _tokenizer: childFlow,\n contentType: \"flow\",\n previous: childToken\n });\n return flowContinue(code);\n }\n\n /** @type {State} */\n function flowContinue(code) {\n if (code === null) {\n writeToChild(effects.exit(\"chunkFlow\"), true);\n exitContainers(0);\n effects.consume(code);\n return;\n }\n if (markdownLineEnding(code)) {\n effects.consume(code);\n writeToChild(effects.exit(\"chunkFlow\"));\n // Get ready for the next line.\n continued = 0;\n self.interrupt = undefined;\n return start;\n }\n effects.consume(code);\n return flowContinue;\n }\n\n /**\n * @param {Token} token\n * Token.\n * @param {boolean | undefined} [endOfFile]\n * Whether the token is at the end of the file (default: `false`).\n * @returns {undefined}\n * Nothing.\n */\n function writeToChild(token, endOfFile) {\n const stream = self.sliceStream(token);\n if (endOfFile) stream.push(null);\n token.previous = childToken;\n if (childToken) childToken.next = token;\n childToken = token;\n childFlow.defineSkip(token.start);\n childFlow.write(stream);\n\n // Alright, so we just added a lazy line:\n //\n // ```markdown\n // > a\n // b.\n //\n // Or:\n //\n // > ~~~c\n // d\n //\n // Or:\n //\n // > | e |\n // f\n // ```\n //\n // The construct in the second example (fenced code) does not accept lazy\n // lines, so it marked itself as done at the end of its first line, and\n // then the content construct parses `d`.\n // Most constructs in markdown match on the first line: if the first line\n // forms a construct, a non-lazy line can’t “unmake” it.\n //\n // The construct in the third example is potentially a GFM table, and\n // those are *weird*.\n // It *could* be a table, from the first line, if the following line\n // matches a condition.\n // In this case, that second line is lazy, which “unmakes” the first line\n // and turns the whole into one content block.\n //\n // We’ve now parsed the non-lazy and the lazy line, and can figure out\n // whether the lazy line started a new flow block.\n // If it did, we exit the current containers between the two flow blocks.\n if (self.parser.lazy[token.start.line]) {\n let index = childFlow.events.length;\n while (index--) {\n if (\n // The token starts before the line ending…\n childFlow.events[index][1].start.offset < lineStartOffset && (\n // …and either is not ended yet…\n !childFlow.events[index][1].end ||\n // …or ends after it.\n childFlow.events[index][1].end.offset > lineStartOffset)) {\n // Exit: there’s still something open, which means it’s a lazy line\n // part of something.\n return;\n }\n }\n\n // Note: this algorithm for moving events around is similar to the\n // algorithm when closing flow in `documentContinue`.\n const indexBeforeExits = self.events.length;\n let indexBeforeFlow = indexBeforeExits;\n /** @type {boolean | undefined} */\n let seen;\n /** @type {Point | undefined} */\n let point;\n\n // Find the previous chunk (the one before the lazy line).\n while (indexBeforeFlow--) {\n if (self.events[indexBeforeFlow][0] === 'exit' && self.events[indexBeforeFlow][1].type === \"chunkFlow\") {\n if (seen) {\n point = self.events[indexBeforeFlow][1].end;\n break;\n }\n seen = true;\n }\n }\n exitContainers(continued);\n\n // Fix positions.\n index = indexBeforeExits;\n while (index < self.events.length) {\n self.events[index][1].end = {\n ...point\n };\n index++;\n }\n\n // Inject the exits earlier (they’re still also at the end).\n splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));\n\n // Discard the duplicate exits.\n self.events.length = index;\n }\n }\n\n /**\n * @param {number} size\n * Size.\n * @returns {undefined}\n * Nothing.\n */\n function exitContainers(size) {\n let index = stack.length;\n\n // Exit open containers.\n while (index-- > size) {\n const entry = stack[index];\n self.containerState = entry[1];\n entry[0].exit.call(self, effects);\n }\n stack.length = size;\n }\n function closeFlow() {\n childFlow.write([null]);\n childToken = undefined;\n childFlow = undefined;\n self.containerState._closeFlow = undefined;\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n * Tokenizer.\n */\nfunction tokenizeContainer(effects, ok, nok) {\n // Always populated by defaults.\n\n return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok, nok), \"linePrefix\", this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4);\n}","/**\n * @import {Code} from 'micromark-util-types'\n */\n\nimport { markdownLineEndingOrSpace, unicodePunctuation, unicodeWhitespace } from 'micromark-util-character';\n/**\n * Classify whether a code represents whitespace, punctuation, or something\n * else.\n *\n * Used for attention (emphasis, strong), whose sequences can open or close\n * based on the class of surrounding characters.\n *\n * > 👉 **Note**: eof (`null`) is seen as whitespace.\n *\n * @param {Code} code\n * Code.\n * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}\n * Group.\n */\nexport function classifyCharacter(code) {\n if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return 1;\n }\n if (unicodePunctuation(code)) {\n return 2;\n }\n}","/**\n * @import {Event, Resolver, TokenizeContext} from 'micromark-util-types'\n */\n\n/**\n * Call all `resolveAll`s.\n *\n * @param {ReadonlyArray<{resolveAll?: Resolver | undefined}>} constructs\n * List of constructs, optionally with `resolveAll`s.\n * @param {Array<Event>} events\n * List of events.\n * @param {TokenizeContext} context\n * Context used by `tokenize`.\n * @returns {Array<Event>}\n * Changed events.\n */\nexport function resolveAll(constructs, events, context) {\n /** @type {Array<Resolver>} */\n const called = []\n let index = -1\n\n while (++index < constructs.length) {\n const resolve = constructs[index].resolveAll\n\n if (resolve && !called.includes(resolve)) {\n events = resolve(events, context)\n called.push(resolve)\n }\n }\n\n return events\n}\n","/**\n * @import {\n * Code,\n * Construct,\n * Event,\n * Point,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { push, splice } from 'micromark-util-chunked';\nimport { classifyCharacter } from 'micromark-util-classify-character';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/** @type {Construct} */\nexport const attention = {\n name: 'attention',\n resolveAll: resolveAllAttention,\n tokenize: tokenizeAttention\n};\n\n/**\n * Take all events and resolve attention to emphasis or strong.\n *\n * @type {Resolver}\n */\n// eslint-disable-next-line complexity\nfunction resolveAllAttention(events, context) {\n let index = -1;\n /** @type {number} */\n let open;\n /** @type {Token} */\n let group;\n /** @type {Token} */\n let text;\n /** @type {Token} */\n let openingSequence;\n /** @type {Token} */\n let closingSequence;\n /** @type {number} */\n let use;\n /** @type {Array<Event>} */\n let nextEvents;\n /** @type {number} */\n let offset;\n\n // Walk through all events.\n //\n // Note: performance of this is fine on an mb of normal markdown, but it’s\n // a bottleneck for malicious stuff.\n while (++index < events.length) {\n // Find a token that can close.\n if (events[index][0] === 'enter' && events[index][1].type === 'attentionSequence' && events[index][1]._close) {\n open = index;\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (events[open][0] === 'exit' && events[open][1].type === 'attentionSequence' && events[open][1]._open &&\n // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) {\n // If the opening can close or the closing can open,\n // and the close size *is not* a multiple of three,\n // but the sum of the opening and closing size *is* multiple of three,\n // then don’t match.\n if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) {\n continue;\n }\n\n // Number of markers to use from the sequence.\n use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1;\n const start = {\n ...events[open][1].end\n };\n const end = {\n ...events[index][1].start\n };\n movePoint(start, -use);\n movePoint(end, use);\n openingSequence = {\n type: use > 1 ? \"strongSequence\" : \"emphasisSequence\",\n start,\n end: {\n ...events[open][1].end\n }\n };\n closingSequence = {\n type: use > 1 ? \"strongSequence\" : \"emphasisSequence\",\n start: {\n ...events[index][1].start\n },\n end\n };\n text = {\n type: use > 1 ? \"strongText\" : \"emphasisText\",\n start: {\n ...events[open][1].end\n },\n end: {\n ...events[index][1].start\n }\n };\n group = {\n type: use > 1 ? \"strong\" : \"emphasis\",\n start: {\n ...openingSequence.start\n },\n end: {\n ...closingSequence.end\n }\n };\n events[open][1].end = {\n ...openingSequence.start\n };\n events[index][1].start = {\n ...closingSequence.end\n };\n nextEvents = [];\n\n // If there are more markers in the opening, add them before.\n if (events[open][1].end.offset - events[open][1].start.offset) {\n nextEvents = push(nextEvents, [['enter', events[open][1], context], ['exit', events[open][1], context]]);\n }\n\n // Opening.\n nextEvents = push(nextEvents, [['enter', group, context], ['enter', openingSequence, context], ['exit', openingSequence, context], ['enter', text, context]]);\n\n // Always populated by defaults.\n\n // Between.\n nextEvents = push(nextEvents, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + 1, index), context));\n\n // Closing.\n nextEvents = push(nextEvents, [['exit', text, context], ['enter', closingSequence, context], ['exit', closingSequence, context], ['exit', group, context]]);\n\n // If there are more markers in the closing, add them after.\n if (events[index][1].end.offset - events[index][1].start.offset) {\n offset = 2;\n nextEvents = push(nextEvents, [['enter', events[index][1], context], ['exit', events[index][1], context]]);\n } else {\n offset = 0;\n }\n splice(events, open - 1, index - open + 3, nextEvents);\n index = open + nextEvents.length - offset - 2;\n break;\n }\n }\n }\n }\n\n // Remove remaining sequences.\n index = -1;\n while (++index < events.length) {\n if (events[index][1].type === 'attentionSequence') {\n events[index][1].type = 'data';\n }\n }\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeAttention(effects, ok) {\n const attentionMarkers = this.parser.constructs.attentionMarkers.null;\n const previous = this.previous;\n const before = classifyCharacter(previous);\n\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * Before a sequence.\n *\n * ```markdown\n * > | **\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n marker = code;\n effects.enter('attentionSequence');\n return inside(code);\n }\n\n /**\n * In a sequence.\n *\n * ```markdown\n * > | **\n * ^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code);\n return inside;\n }\n const token = effects.exit('attentionSequence');\n\n // To do: next major: move this to resolver, just like `markdown-rs`.\n const after = classifyCharacter(code);\n\n // Always populated by defaults.\n\n const open = !after || after === 2 && before || attentionMarkers.includes(code);\n const close = !before || before === 2 && after || attentionMarkers.includes(previous);\n token._open = Boolean(marker === 42 ? open : open && (before || !close));\n token._close = Boolean(marker === 42 ? close : close && (after || !open));\n return ok(code);\n }\n}\n\n/**\n * Move a point a bit.\n *\n * Note: `move` only works inside lines! It’s not possible to move past other\n * chunks (replacement characters, tabs, or line endings).\n *\n * @param {Point} point\n * Point.\n * @param {number} offset\n * Amount to move.\n * @returns {undefined}\n * Nothing.\n */\nfunction movePoint(point, offset) {\n point.column += offset;\n point.offset += offset;\n point._bufferIndex += offset;\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { asciiAlphanumeric, asciiAlpha, asciiAtext, asciiControl } from 'micromark-util-character';\n/** @type {Construct} */\nexport const autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeAutolink(effects, ok, nok) {\n let size = 0;\n return start;\n\n /**\n * Start of an autolink.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"autolink\");\n effects.enter(\"autolinkMarker\");\n effects.consume(code);\n effects.exit(\"autolinkMarker\");\n effects.enter(\"autolinkProtocol\");\n return open;\n }\n\n /**\n * After `<`, at protocol or atext.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code);\n return schemeOrEmailAtext;\n }\n if (code === 64) {\n return nok(code);\n }\n return emailAtext(code);\n }\n\n /**\n * At second byte of protocol or atext.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeOrEmailAtext(code) {\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {\n // Count the previous alphabetical from `open` too.\n size = 1;\n return schemeInsideOrEmailAtext(code);\n }\n return emailAtext(code);\n }\n\n /**\n * In ambiguous protocol or atext.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeInsideOrEmailAtext(code) {\n if (code === 58) {\n effects.consume(code);\n size = 0;\n return urlInside;\n }\n\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32) {\n effects.consume(code);\n return schemeInsideOrEmailAtext;\n }\n size = 0;\n return emailAtext(code);\n }\n\n /**\n * After protocol, in URL.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function urlInside(code) {\n if (code === 62) {\n effects.exit(\"autolinkProtocol\");\n effects.enter(\"autolinkMarker\");\n effects.consume(code);\n effects.exit(\"autolinkMarker\");\n effects.exit(\"autolink\");\n return ok;\n }\n\n // ASCII control, space, or `<`.\n if (code === null || code === 32 || code === 60 || asciiControl(code)) {\n return nok(code);\n }\n effects.consume(code);\n return urlInside;\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | a<user.name@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailAtext(code) {\n if (code === 64) {\n effects.consume(code);\n return emailAtSignOrDot;\n }\n if (asciiAtext(code)) {\n effects.consume(code);\n return emailAtext;\n }\n return nok(code);\n }\n\n /**\n * In label, after at-sign or dot.\n *\n * ```markdown\n * > | a<user.name@example.com>b\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function emailAtSignOrDot(code) {\n return asciiAlphanumeric(code) ? emailLabel(code) : nok(code);\n }\n\n /**\n * In label, where `.` and `>` are allowed.\n *\n * ```markdown\n * > | a<user.name@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailLabel(code) {\n if (code === 46) {\n effects.consume(code);\n size = 0;\n return emailAtSignOrDot;\n }\n if (code === 62) {\n // Exit, then change the token type.\n effects.exit(\"autolinkProtocol\").type = \"autolinkEmail\";\n effects.enter(\"autolinkMarker\");\n effects.consume(code);\n effects.exit(\"autolinkMarker\");\n effects.exit(\"autolink\");\n return ok;\n }\n return emailValue(code);\n }\n\n /**\n * In label, where `.` and `>` are *not* allowed.\n *\n * Though, this is also used in `emailLabel` to parse other values.\n *\n * ```markdown\n * > | a<user.name@ex-ample.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailValue(code) {\n // ASCII alphanumeric or `-`.\n if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {\n const next = code === 45 ? emailValue : emailLabel;\n effects.consume(code);\n return next;\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const blankLine = {\n partial: true,\n tokenize: tokenizeBlankLine\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLine(effects, ok, nok) {\n return start;\n\n /**\n * Start of blank line.\n *\n * > 👉 **Note**: `␠` represents a space character.\n *\n * ```markdown\n * > | ␠␠␊\n * ^\n * > | ␊\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n return markdownSpace(code) ? factorySpace(effects, after, \"linePrefix\")(code) : after(code);\n }\n\n /**\n * At eof/eol, after optional whitespace.\n *\n * > 👉 **Note**: `␠` represents a space character.\n *\n * ```markdown\n * > | ␠␠␊\n * ^\n * > | ␊\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * Exiter,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const blockQuote = {\n continuation: {\n tokenize: tokenizeBlockQuoteContinuation\n },\n exit,\n name: 'blockQuote',\n tokenize: tokenizeBlockQuoteStart\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlockQuoteStart(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of block quote.\n *\n * ```markdown\n * > | > a\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === 62) {\n const state = self.containerState;\n if (!state.open) {\n effects.enter(\"blockQuote\", {\n _container: true\n });\n state.open = true;\n }\n effects.enter(\"blockQuotePrefix\");\n effects.enter(\"blockQuoteMarker\");\n effects.consume(code);\n effects.exit(\"blockQuoteMarker\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * After `>`, before optional whitespace.\n *\n * ```markdown\n * > | > a\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownSpace(code)) {\n effects.enter(\"blockQuotePrefixWhitespace\");\n effects.consume(code);\n effects.exit(\"blockQuotePrefixWhitespace\");\n effects.exit(\"blockQuotePrefix\");\n return ok;\n }\n effects.exit(\"blockQuotePrefix\");\n return ok(code);\n }\n}\n\n/**\n * Start of block quote continuation.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlockQuoteContinuation(effects, ok, nok) {\n const self = this;\n return contStart;\n\n /**\n * Start of block quote continuation.\n *\n * Also used to parse the first block quote opening.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @type {State}\n */\n function contStart(code) {\n if (markdownSpace(code)) {\n // Always populated by defaults.\n\n return factorySpace(effects, contBefore, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code);\n }\n return contBefore(code);\n }\n\n /**\n * At `>`, after optional whitespace.\n *\n * Also used to parse the first block quote opening.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @type {State}\n */\n function contBefore(code) {\n return effects.attempt(blockQuote, ok, nok)(code);\n }\n}\n\n/** @type {Exiter} */\nfunction exit(effects) {\n effects.exit(\"blockQuote\");\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { asciiPunctuation } from 'micromark-util-character';\n/** @type {Construct} */\nexport const characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterEscape(effects, ok, nok) {\n return start;\n\n /**\n * Start of character escape.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"characterEscape\");\n effects.enter(\"escapeMarker\");\n effects.consume(code);\n effects.exit(\"escapeMarker\");\n return inside;\n }\n\n /**\n * After `\\`, at punctuation.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // ASCII punctuation.\n if (asciiPunctuation(code)) {\n effects.enter(\"characterEscapeValue\");\n effects.consume(code);\n effects.exit(\"characterEscapeValue\");\n effects.exit(\"characterEscape\");\n return ok;\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { decodeNamedCharacterReference } from 'decode-named-character-reference';\nimport { asciiAlphanumeric, asciiDigit, asciiHexDigit } from 'micromark-util-character';\n/** @type {Construct} */\nexport const characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterReference(effects, ok, nok) {\n const self = this;\n let size = 0;\n /** @type {number} */\n let max;\n /** @type {(code: Code) => boolean} */\n let test;\n return start;\n\n /**\n * Start of character reference.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a	b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"characterReference\");\n effects.enter(\"characterReferenceMarker\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarker\");\n return open;\n }\n\n /**\n * After `&`, at `#` for numeric references or alphanumeric for named\n * references.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a	b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 35) {\n effects.enter(\"characterReferenceMarkerNumeric\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarkerNumeric\");\n return numeric;\n }\n effects.enter(\"characterReferenceValue\");\n max = 31;\n test = asciiAlphanumeric;\n return value(code);\n }\n\n /**\n * After `#`, at `x` for hexadecimals or digit for decimals.\n *\n * ```markdown\n * > | a{b\n * ^\n * > | a	b\n * ^\n * ```\n *\n * @type {State}\n */\n function numeric(code) {\n if (code === 88 || code === 120) {\n effects.enter(\"characterReferenceMarkerHexadecimal\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarkerHexadecimal\");\n effects.enter(\"characterReferenceValue\");\n max = 6;\n test = asciiHexDigit;\n return value;\n }\n effects.enter(\"characterReferenceValue\");\n max = 7;\n test = asciiDigit;\n return value(code);\n }\n\n /**\n * After markers (`&#x`, `&#`, or `&`), in value, before `;`.\n *\n * The character reference kind defines what and how many characters are\n * allowed.\n *\n * ```markdown\n * > | a&b\n * ^^^\n * > | a{b\n * ^^^\n * > | a	b\n * ^\n * ```\n *\n * @type {State}\n */\n function value(code) {\n if (code === 59 && size) {\n const token = effects.exit(\"characterReferenceValue\");\n if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self.sliceSerialize(token))) {\n return nok(code);\n }\n\n // To do: `markdown-rs` uses a different name:\n // `CharacterReferenceMarkerSemi`.\n effects.enter(\"characterReferenceMarker\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarker\");\n effects.exit(\"characterReference\");\n return ok;\n }\n if (test(code) && size++ < max) {\n effects.consume(code);\n return value;\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nconst nonLazyContinuation = {\n partial: true,\n tokenize: tokenizeNonLazyContinuation\n};\n\n/** @type {Construct} */\nexport const codeFenced = {\n concrete: true,\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this;\n /** @type {Construct} */\n const closeStart = {\n partial: true,\n tokenize: tokenizeCloseStart\n };\n let initialPrefix = 0;\n let sizeOpen = 0;\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * Start of code.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse whitespace like `markdown-rs`.\n return beforeSequenceOpen(code);\n }\n\n /**\n * In opening fence, after prefix, at sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeSequenceOpen(code) {\n const tail = self.events[self.events.length - 1];\n initialPrefix = tail && tail[1].type === \"linePrefix\" ? tail[2].sliceSerialize(tail[1], true).length : 0;\n marker = code;\n effects.enter(\"codeFenced\");\n effects.enter(\"codeFencedFence\");\n effects.enter(\"codeFencedFenceSequence\");\n return sequenceOpen(code);\n }\n\n /**\n * In opening fence sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === marker) {\n sizeOpen++;\n effects.consume(code);\n return sequenceOpen;\n }\n if (sizeOpen < 3) {\n return nok(code);\n }\n effects.exit(\"codeFencedFenceSequence\");\n return markdownSpace(code) ? factorySpace(effects, infoBefore, \"whitespace\")(code) : infoBefore(code);\n }\n\n /**\n * In opening fence, after the sequence (and optional whitespace), before info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function infoBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFencedFence\");\n return self.interrupt ? ok(code) : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);\n }\n effects.enter(\"codeFencedFenceInfo\");\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return info(code);\n }\n\n /**\n * In info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function info(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"chunkString\");\n effects.exit(\"codeFencedFenceInfo\");\n return infoBefore(code);\n }\n if (markdownSpace(code)) {\n effects.exit(\"chunkString\");\n effects.exit(\"codeFencedFenceInfo\");\n return factorySpace(effects, metaBefore, \"whitespace\")(code);\n }\n if (code === 96 && code === marker) {\n return nok(code);\n }\n effects.consume(code);\n return info;\n }\n\n /**\n * In opening fence, after info and whitespace, before meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function metaBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return infoBefore(code);\n }\n effects.enter(\"codeFencedFenceMeta\");\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return meta(code);\n }\n\n /**\n * In meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function meta(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"chunkString\");\n effects.exit(\"codeFencedFenceMeta\");\n return infoBefore(code);\n }\n if (code === 96 && code === marker) {\n return nok(code);\n }\n effects.consume(code);\n return meta;\n }\n\n /**\n * At eol/eof in code, before a non-lazy closing fence or content.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function atNonLazyBreak(code) {\n return effects.attempt(closeStart, after, contentBefore)(code);\n }\n\n /**\n * Before code content, not a closing fence, at eol.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentBefore(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return contentStart;\n }\n\n /**\n * Before code content, not a closing fence.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentStart(code) {\n return initialPrefix > 0 && markdownSpace(code) ? factorySpace(effects, beforeContentChunk, \"linePrefix\", initialPrefix + 1)(code) : beforeContentChunk(code);\n }\n\n /**\n * Before code content, after optional prefix.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeContentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);\n }\n effects.enter(\"codeFlowValue\");\n return contentChunk(code);\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^^^^^^^^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFlowValue\");\n return beforeContentChunk(code);\n }\n effects.consume(code);\n return contentChunk;\n }\n\n /**\n * After code.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n effects.exit(\"codeFenced\");\n return ok(code);\n }\n\n /**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\n function tokenizeCloseStart(effects, ok, nok) {\n let size = 0;\n return startBefore;\n\n /**\n *\n *\n * @type {State}\n */\n function startBefore(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return start;\n }\n\n /**\n * Before closing fence, at optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Always populated by defaults.\n\n // To do: `enter` here or in next state?\n effects.enter(\"codeFencedFence\");\n return markdownSpace(code) ? factorySpace(effects, beforeSequenceClose, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code) : beforeSequenceClose(code);\n }\n\n /**\n * In closing fence, after optional whitespace, at sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function beforeSequenceClose(code) {\n if (code === marker) {\n effects.enter(\"codeFencedFenceSequence\");\n return sequenceClose(code);\n }\n return nok(code);\n }\n\n /**\n * In closing fence sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n if (code === marker) {\n size++;\n effects.consume(code);\n return sequenceClose;\n }\n if (size >= sizeOpen) {\n effects.exit(\"codeFencedFenceSequence\");\n return markdownSpace(code) ? factorySpace(effects, sequenceCloseAfter, \"whitespace\")(code) : sequenceCloseAfter(code);\n }\n return nok(code);\n }\n\n /**\n * After closing fence sequence, after optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceCloseAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFencedFence\");\n return ok(code);\n }\n return nok(code);\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuation(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n *\n *\n * @type {State}\n */\n function start(code) {\n if (code === null) {\n return nok(code);\n }\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return lineStart;\n }\n\n /**\n *\n *\n * @type {State}\n */\n function lineStart(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const codeIndented = {\n name: 'codeIndented',\n tokenize: tokenizeCodeIndented\n};\n\n/** @type {Construct} */\nconst furtherStart = {\n partial: true,\n tokenize: tokenizeFurtherStart\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCodeIndented(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of code (indented).\n *\n * > **Parsing note**: it is not needed to check if this first line is a\n * > filled line (that it has a non-whitespace character), because blank lines\n * > are parsed already, so we never run into that.\n *\n * ```markdown\n * > | aaa\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: manually check if interrupting like `markdown-rs`.\n\n effects.enter(\"codeIndented\");\n // To do: use an improved `space_or_tab` function like `markdown-rs`,\n // so that we can drop the next state.\n return factorySpace(effects, afterPrefix, \"linePrefix\", 4 + 1)(code);\n }\n\n /**\n * At start, after 1 or 4 spaces.\n *\n * ```markdown\n * > | aaa\n * ^\n * ```\n *\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return tail && tail[1].type === \"linePrefix\" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? atBreak(code) : nok(code);\n }\n\n /**\n * At a break.\n *\n * ```markdown\n * > | aaa\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === null) {\n return after(code);\n }\n if (markdownLineEnding(code)) {\n return effects.attempt(furtherStart, atBreak, after)(code);\n }\n effects.enter(\"codeFlowValue\");\n return inside(code);\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * > | aaa\n * ^^^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFlowValue\");\n return atBreak(code);\n }\n effects.consume(code);\n return inside;\n }\n\n /** @type {State} */\n function after(code) {\n effects.exit(\"codeIndented\");\n // To do: allow interrupting like `markdown-rs`.\n // Feel free to interrupt.\n // tokenizer.interrupt = false\n return ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeFurtherStart(effects, ok, nok) {\n const self = this;\n return furtherStart;\n\n /**\n * At eol, trying to parse another indent.\n *\n * ```markdown\n * > | aaa\n * ^\n * | bbb\n * ```\n *\n * @type {State}\n */\n function furtherStart(code) {\n // To do: improve `lazy` / `pierce` handling.\n // If this is a lazy line, it can’t be code.\n if (self.parser.lazy[self.now().line]) {\n return nok(code);\n }\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return furtherStart;\n }\n\n // To do: the code here in `micromark-js` is a bit different from\n // `markdown-rs` because there it can attempt spaces.\n // We can’t yet.\n //\n // To do: use an improved `space_or_tab` function like `markdown-rs`,\n // so that we can drop the next state.\n return factorySpace(effects, afterPrefix, \"linePrefix\", 4 + 1)(code);\n }\n\n /**\n * At start, after 1 or 4 spaces.\n *\n * ```markdown\n * > | aaa\n * ^\n * ```\n *\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return tail && tail[1].type === \"linePrefix\" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? ok(code) : markdownLineEnding(code) ? furtherStart(code) : nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * Previous,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const codeText = {\n name: 'codeText',\n previous,\n resolve: resolveCodeText,\n tokenize: tokenizeCodeText\n};\n\n// To do: next major: don’t resolve, like `markdown-rs`.\n/** @type {Resolver} */\nfunction resolveCodeText(events) {\n let tailExitIndex = events.length - 4;\n let headEnterIndex = 3;\n /** @type {number} */\n let index;\n /** @type {number | undefined} */\n let enter;\n\n // If we start and end with an EOL or a space.\n if ((events[headEnterIndex][1].type === \"lineEnding\" || events[headEnterIndex][1].type === 'space') && (events[tailExitIndex][1].type === \"lineEnding\" || events[tailExitIndex][1].type === 'space')) {\n index = headEnterIndex;\n\n // And we have data.\n while (++index < tailExitIndex) {\n if (events[index][1].type === \"codeTextData\") {\n // Then we have padding.\n events[headEnterIndex][1].type = \"codeTextPadding\";\n events[tailExitIndex][1].type = \"codeTextPadding\";\n headEnterIndex += 2;\n tailExitIndex -= 2;\n break;\n }\n }\n }\n\n // Merge adjacent spaces and data.\n index = headEnterIndex - 1;\n tailExitIndex++;\n while (++index <= tailExitIndex) {\n if (enter === undefined) {\n if (index !== tailExitIndex && events[index][1].type !== \"lineEnding\") {\n enter = index;\n }\n } else if (index === tailExitIndex || events[index][1].type === \"lineEnding\") {\n events[enter][1].type = \"codeTextData\";\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end;\n events.splice(enter + 2, index - enter - 2);\n tailExitIndex -= index - enter - 2;\n index = enter + 2;\n }\n enter = undefined;\n }\n }\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Previous}\n */\nfunction previous(code) {\n // If there is a previous code, there will always be a tail.\n return code !== 96 || this.events[this.events.length - 1][1].type === \"characterEscape\";\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCodeText(effects, ok, nok) {\n const self = this;\n let sizeOpen = 0;\n /** @type {number} */\n let size;\n /** @type {Token} */\n let token;\n return start;\n\n /**\n * Start of code (text).\n *\n * ```markdown\n * > | `a`\n * ^\n * > | \\`a`\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"codeText\");\n effects.enter(\"codeTextSequence\");\n return sequenceOpen(code);\n }\n\n /**\n * In opening sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === 96) {\n effects.consume(code);\n sizeOpen++;\n return sequenceOpen;\n }\n effects.exit(\"codeTextSequence\");\n return between(code);\n }\n\n /**\n * Between something and something else.\n *\n * ```markdown\n * > | `a`\n * ^^\n * ```\n *\n * @type {State}\n */\n function between(code) {\n // EOF.\n if (code === null) {\n return nok(code);\n }\n\n // To do: next major: don’t do spaces in resolve, but when compiling,\n // like `markdown-rs`.\n // Tabs don’t work, and virtual spaces don’t make sense.\n if (code === 32) {\n effects.enter('space');\n effects.consume(code);\n effects.exit('space');\n return between;\n }\n\n // Closing fence? Could also be data.\n if (code === 96) {\n token = effects.enter(\"codeTextSequence\");\n size = 0;\n return sequenceClose(code);\n }\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return between;\n }\n\n // Data.\n effects.enter(\"codeTextData\");\n return data(code);\n }\n\n /**\n * In data.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function data(code) {\n if (code === null || code === 32 || code === 96 || markdownLineEnding(code)) {\n effects.exit(\"codeTextData\");\n return between(code);\n }\n effects.consume(code);\n return data;\n }\n\n /**\n * In closing sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n // More.\n if (code === 96) {\n effects.consume(code);\n size++;\n return sequenceClose;\n }\n\n // Done!\n if (size === sizeOpen) {\n effects.exit(\"codeTextSequence\");\n effects.exit(\"codeText\");\n return ok(code);\n }\n\n // More or less accents: mark as data.\n token.type = \"codeTextData\";\n return data(code);\n }\n}","/**\n * Some of the internal operations of micromark do lots of editing\n * operations on very large arrays. This runs into problems with two\n * properties of most circa-2020 JavaScript interpreters:\n *\n * - Array-length modifications at the high end of an array (push/pop) are\n * expected to be common and are implemented in (amortized) time\n * proportional to the number of elements added or removed, whereas\n * other operations (shift/unshift and splice) are much less efficient.\n * - Function arguments are passed on the stack, so adding tens of thousands\n * of elements to an array with `arr.push(...newElements)` will frequently\n * cause stack overflows. (see <https://stackoverflow.com/questions/22123769/rangeerror-maximum-call-stack-size-exceeded-why>)\n *\n * SpliceBuffers are an implementation of gap buffers, which are a\n * generalization of the \"queue made of two stacks\" idea. The splice buffer\n * maintains a cursor, and moving the cursor has cost proportional to the\n * distance the cursor moves, but inserting, deleting, or splicing in\n * new information at the cursor is as efficient as the push/pop operation.\n * This allows for an efficient sequence of splices (or pushes, pops, shifts,\n * or unshifts) as long such edits happen at the same part of the array or\n * generally sweep through the array from the beginning to the end.\n *\n * The interface for splice buffers also supports large numbers of inputs by\n * passing a single array argument rather passing multiple arguments on the\n * function call stack.\n *\n * @template T\n * Item type.\n */\nexport class SpliceBuffer {\n /**\n * @param {ReadonlyArray<T> | null | undefined} [initial]\n * Initial items (optional).\n * @returns\n * Splice buffer.\n */\n constructor(initial) {\n /** @type {Array<T>} */\n this.left = initial ? [...initial] : [];\n /** @type {Array<T>} */\n this.right = [];\n }\n\n /**\n * Array access;\n * does not move the cursor.\n *\n * @param {number} index\n * Index.\n * @return {T}\n * Item.\n */\n get(index) {\n if (index < 0 || index >= this.left.length + this.right.length) {\n throw new RangeError('Cannot access index `' + index + '` in a splice buffer of size `' + (this.left.length + this.right.length) + '`');\n }\n if (index < this.left.length) return this.left[index];\n return this.right[this.right.length - index + this.left.length - 1];\n }\n\n /**\n * The length of the splice buffer, one greater than the largest index in the\n * array.\n */\n get length() {\n return this.left.length + this.right.length;\n }\n\n /**\n * Remove and return `list[0]`;\n * moves the cursor to `0`.\n *\n * @returns {T | undefined}\n * Item, optional.\n */\n shift() {\n this.setCursor(0);\n return this.right.pop();\n }\n\n /**\n * Slice the buffer to get an array;\n * does not move the cursor.\n *\n * @param {number} start\n * Start.\n * @param {number | null | undefined} [end]\n * End (optional).\n * @returns {Array<T>}\n * Array of items.\n */\n slice(start, end) {\n /** @type {number} */\n const stop = end === null || end === undefined ? Number.POSITIVE_INFINITY : end;\n if (stop < this.left.length) {\n return this.left.slice(start, stop);\n }\n if (start > this.left.length) {\n return this.right.slice(this.right.length - stop + this.left.length, this.right.length - start + this.left.length).reverse();\n }\n return this.left.slice(start).concat(this.right.slice(this.right.length - stop + this.left.length).reverse());\n }\n\n /**\n * Mimics the behavior of Array.prototype.splice() except for the change of\n * interface necessary to avoid segfaults when patching in very large arrays.\n *\n * This operation moves cursor is moved to `start` and results in the cursor\n * placed after any inserted items.\n *\n * @param {number} start\n * Start;\n * zero-based index at which to start changing the array;\n * negative numbers count backwards from the end of the array and values\n * that are out-of bounds are clamped to the appropriate end of the array.\n * @param {number | null | undefined} [deleteCount=0]\n * Delete count (default: `0`);\n * maximum number of elements to delete, starting from start.\n * @param {Array<T> | null | undefined} [items=[]]\n * Items to include in place of the deleted items (default: `[]`).\n * @return {Array<T>}\n * Any removed items.\n */\n splice(start, deleteCount, items) {\n /** @type {number} */\n const count = deleteCount || 0;\n this.setCursor(Math.trunc(start));\n const removed = this.right.splice(this.right.length - count, Number.POSITIVE_INFINITY);\n if (items) chunkedPush(this.left, items);\n return removed.reverse();\n }\n\n /**\n * Remove and return the highest-numbered item in the array, so\n * `list[list.length - 1]`;\n * Moves the cursor to `length`.\n *\n * @returns {T | undefined}\n * Item, optional.\n */\n pop() {\n this.setCursor(Number.POSITIVE_INFINITY);\n return this.left.pop();\n }\n\n /**\n * Inserts a single item to the high-numbered side of the array;\n * moves the cursor to `length`.\n *\n * @param {T} item\n * Item.\n * @returns {undefined}\n * Nothing.\n */\n push(item) {\n this.setCursor(Number.POSITIVE_INFINITY);\n this.left.push(item);\n }\n\n /**\n * Inserts many items to the high-numbered side of the array.\n * Moves the cursor to `length`.\n *\n * @param {Array<T>} items\n * Items.\n * @returns {undefined}\n * Nothing.\n */\n pushMany(items) {\n this.setCursor(Number.POSITIVE_INFINITY);\n chunkedPush(this.left, items);\n }\n\n /**\n * Inserts a single item to the low-numbered side of the array;\n * Moves the cursor to `0`.\n *\n * @param {T} item\n * Item.\n * @returns {undefined}\n * Nothing.\n */\n unshift(item) {\n this.setCursor(0);\n this.right.push(item);\n }\n\n /**\n * Inserts many items to the low-numbered side of the array;\n * moves the cursor to `0`.\n *\n * @param {Array<T>} items\n * Items.\n * @returns {undefined}\n * Nothing.\n */\n unshiftMany(items) {\n this.setCursor(0);\n chunkedPush(this.right, items.reverse());\n }\n\n /**\n * Move the cursor to a specific position in the array. Requires\n * time proportional to the distance moved.\n *\n * If `n < 0`, the cursor will end up at the beginning.\n * If `n > length`, the cursor will end up at the end.\n *\n * @param {number} n\n * Position.\n * @return {undefined}\n * Nothing.\n */\n setCursor(n) {\n if (n === this.left.length || n > this.left.length && this.right.length === 0 || n < 0 && this.left.length === 0) return;\n if (n < this.left.length) {\n // Move cursor to the this.left\n const removed = this.left.splice(n, Number.POSITIVE_INFINITY);\n chunkedPush(this.right, removed.reverse());\n } else {\n // Move cursor to the this.right\n const removed = this.right.splice(this.left.length + this.right.length - n, Number.POSITIVE_INFINITY);\n chunkedPush(this.left, removed.reverse());\n }\n }\n}\n\n/**\n * Avoid stack overflow by pushing items onto the stack in segments\n *\n * @template T\n * Item type.\n * @param {Array<T>} list\n * List to inject into.\n * @param {ReadonlyArray<T>} right\n * Items to inject.\n * @return {undefined}\n * Nothing.\n */\nfunction chunkedPush(list, right) {\n /** @type {number} */\n let chunkStart = 0;\n if (right.length < 10000) {\n list.push(...right);\n } else {\n while (chunkStart < right.length) {\n list.push(...right.slice(chunkStart, chunkStart + 10000));\n chunkStart += 10000;\n }\n }\n}","/**\n * @import {Chunk, Event, Token} from 'micromark-util-types'\n */\n\nimport { splice } from 'micromark-util-chunked';\nimport { SpliceBuffer } from './lib/splice-buffer.js';\n\n// Hidden API exposed for testing.\nexport { SpliceBuffer } from './lib/splice-buffer.js';\n\n/**\n * Tokenize subcontent.\n *\n * @param {Array<Event>} eventsArray\n * List of events.\n * @returns {boolean}\n * Whether subtokens were found.\n */\n// eslint-disable-next-line complexity\nexport function subtokenize(eventsArray) {\n /** @type {Record<string, number>} */\n const jumps = {};\n let index = -1;\n /** @type {Event} */\n let event;\n /** @type {number | undefined} */\n let lineIndex;\n /** @type {number} */\n let otherIndex;\n /** @type {Event} */\n let otherEvent;\n /** @type {Array<Event>} */\n let parameters;\n /** @type {Array<Event>} */\n let subevents;\n /** @type {boolean | undefined} */\n let more;\n const events = new SpliceBuffer(eventsArray);\n while (++index < events.length) {\n while (index in jumps) {\n index = jumps[index];\n }\n event = events.get(index);\n\n // Add a hook for the GFM tasklist extension, which needs to know if text\n // is in the first content of a list item.\n if (index && event[1].type === \"chunkFlow\" && events.get(index - 1)[1].type === \"listItemPrefix\") {\n subevents = event[1]._tokenizer.events;\n otherIndex = 0;\n if (otherIndex < subevents.length && subevents[otherIndex][1].type === \"lineEndingBlank\") {\n otherIndex += 2;\n }\n if (otherIndex < subevents.length && subevents[otherIndex][1].type === \"content\") {\n while (++otherIndex < subevents.length) {\n if (subevents[otherIndex][1].type === \"content\") {\n break;\n }\n if (subevents[otherIndex][1].type === \"chunkText\") {\n subevents[otherIndex][1]._isInFirstContentOfListItem = true;\n otherIndex++;\n }\n }\n }\n }\n\n // Enter.\n if (event[0] === 'enter') {\n if (event[1].contentType) {\n Object.assign(jumps, subcontent(events, index));\n index = jumps[index];\n more = true;\n }\n }\n // Exit.\n else if (event[1]._container) {\n otherIndex = index;\n lineIndex = undefined;\n while (otherIndex--) {\n otherEvent = events.get(otherIndex);\n if (otherEvent[1].type === \"lineEnding\" || otherEvent[1].type === \"lineEndingBlank\") {\n if (otherEvent[0] === 'enter') {\n if (lineIndex) {\n events.get(lineIndex)[1].type = \"lineEndingBlank\";\n }\n otherEvent[1].type = \"lineEnding\";\n lineIndex = otherIndex;\n }\n } else if (otherEvent[1].type === \"linePrefix\" || otherEvent[1].type === \"listItemIndent\") {\n // Move past.\n } else {\n break;\n }\n }\n if (lineIndex) {\n // Fix position.\n event[1].end = {\n ...events.get(lineIndex)[1].start\n };\n\n // Switch container exit w/ line endings.\n parameters = events.slice(lineIndex, index);\n parameters.unshift(event);\n events.splice(lineIndex, index - lineIndex + 1, parameters);\n }\n }\n }\n\n // The changes to the `events` buffer must be copied back into the eventsArray\n splice(eventsArray, 0, Number.POSITIVE_INFINITY, events.slice(0));\n return !more;\n}\n\n/**\n * Tokenize embedded tokens.\n *\n * @param {SpliceBuffer<Event>} events\n * Events.\n * @param {number} eventIndex\n * Index.\n * @returns {Record<string, number>}\n * Gaps.\n */\nfunction subcontent(events, eventIndex) {\n const token = events.get(eventIndex)[1];\n const context = events.get(eventIndex)[2];\n let startPosition = eventIndex - 1;\n /** @type {Array<number>} */\n const startPositions = [];\n let tokenizer = token._tokenizer;\n if (!tokenizer) {\n tokenizer = context.parser[token.contentType](token.start);\n if (token._contentTypeTextTrailing) {\n tokenizer._contentTypeTextTrailing = true;\n }\n }\n const childEvents = tokenizer.events;\n /** @type {Array<[number, number]>} */\n const jumps = [];\n /** @type {Record<string, number>} */\n const gaps = {};\n /** @type {Array<Chunk>} */\n let stream;\n /** @type {Token | undefined} */\n let previous;\n let index = -1;\n /** @type {Token | undefined} */\n let current = token;\n let adjust = 0;\n let start = 0;\n const breaks = [start];\n\n // Loop forward through the linked tokens to pass them in order to the\n // subtokenizer.\n while (current) {\n // Find the position of the event for this token.\n while (events.get(++startPosition)[1] !== current) {\n // Empty.\n }\n startPositions.push(startPosition);\n if (!current._tokenizer) {\n stream = context.sliceStream(current);\n if (!current.next) {\n stream.push(null);\n }\n if (previous) {\n tokenizer.defineSkip(current.start);\n }\n if (current._isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = true;\n }\n tokenizer.write(stream);\n if (current._isInFirstContentOfListItem) {\n tokenizer._gfmTasklistFirstContentOfListItem = undefined;\n }\n }\n\n // Unravel the next token.\n previous = current;\n current = current.next;\n }\n\n // Now, loop back through all events (and linked tokens), to figure out which\n // parts belong where.\n current = token;\n while (++index < childEvents.length) {\n if (\n // Find a void token that includes a break.\n childEvents[index][0] === 'exit' && childEvents[index - 1][0] === 'enter' && childEvents[index][1].type === childEvents[index - 1][1].type && childEvents[index][1].start.line !== childEvents[index][1].end.line) {\n start = index + 1;\n breaks.push(start);\n // Help GC.\n current._tokenizer = undefined;\n current.previous = undefined;\n current = current.next;\n }\n }\n\n // Help GC.\n tokenizer.events = [];\n\n // If there’s one more token (which is the cases for lines that end in an\n // EOF), that’s perfect: the last point we found starts it.\n // If there isn’t then make sure any remaining content is added to it.\n if (current) {\n // Help GC.\n current._tokenizer = undefined;\n current.previous = undefined;\n } else {\n breaks.pop();\n }\n\n // Now splice the events from the subtokenizer into the current events,\n // moving back to front so that splice indices aren’t affected.\n index = breaks.length;\n while (index--) {\n const slice = childEvents.slice(breaks[index], breaks[index + 1]);\n const start = startPositions.pop();\n jumps.push([start, start + slice.length - 1]);\n events.splice(start, 2, slice);\n }\n jumps.reverse();\n index = -1;\n while (++index < jumps.length) {\n gaps[adjust + jumps[index][0]] = adjust + jumps[index][1];\n adjust += jumps[index][1] - jumps[index][0] - 1;\n }\n return gaps;\n}","/**\n * @import {\n * Construct,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\nimport { subtokenize } from 'micromark-util-subtokenize';\n/**\n * No name because it must not be turned off.\n * @type {Construct}\n */\nexport const content = {\n resolve: resolveContent,\n tokenize: tokenizeContent\n};\n\n/** @type {Construct} */\nconst continuationConstruct = {\n partial: true,\n tokenize: tokenizeContinuation\n};\n\n/**\n * Content is transparent: it’s parsed right now. That way, definitions are also\n * parsed right now: before text in paragraphs (specifically, media) are parsed.\n *\n * @type {Resolver}\n */\nfunction resolveContent(events) {\n subtokenize(events);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeContent(effects, ok) {\n /** @type {Token | undefined} */\n let previous;\n return chunkStart;\n\n /**\n * Before a content chunk.\n *\n * ```markdown\n * > | abc\n * ^\n * ```\n *\n * @type {State}\n */\n function chunkStart(code) {\n effects.enter(\"content\");\n previous = effects.enter(\"chunkContent\", {\n contentType: \"content\"\n });\n return chunkInside(code);\n }\n\n /**\n * In a content chunk.\n *\n * ```markdown\n * > | abc\n * ^^^\n * ```\n *\n * @type {State}\n */\n function chunkInside(code) {\n if (code === null) {\n return contentEnd(code);\n }\n\n // To do: in `markdown-rs`, each line is parsed on its own, and everything\n // is stitched together resolving.\n if (markdownLineEnding(code)) {\n return effects.check(continuationConstruct, contentContinue, contentEnd)(code);\n }\n\n // Data.\n effects.consume(code);\n return chunkInside;\n }\n\n /**\n *\n *\n * @type {State}\n */\n function contentEnd(code) {\n effects.exit(\"chunkContent\");\n effects.exit(\"content\");\n return ok(code);\n }\n\n /**\n *\n *\n * @type {State}\n */\n function contentContinue(code) {\n effects.consume(code);\n effects.exit(\"chunkContent\");\n previous.next = effects.enter(\"chunkContent\", {\n contentType: \"content\",\n previous\n });\n previous = previous.next;\n return chunkInside;\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeContinuation(effects, ok, nok) {\n const self = this;\n return startLookahead;\n\n /**\n *\n *\n * @type {State}\n */\n function startLookahead(code) {\n effects.exit(\"chunkContent\");\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return factorySpace(effects, prefixed, \"linePrefix\");\n }\n\n /**\n *\n *\n * @type {State}\n */\n function prefixed(code) {\n if (code === null || markdownLineEnding(code)) {\n return nok(code);\n }\n\n // Always populated by defaults.\n\n const tail = self.events[self.events.length - 1];\n if (!self.parser.constructs.disable.null.includes('codeIndented') && tail && tail[1].type === \"linePrefix\" && tail[2].sliceSerialize(tail[1], true).length >= 4) {\n return ok(code);\n }\n return effects.interrupt(self.parser.constructs.flow, nok, ok)(code);\n }\n}","/**\n * @import {Effects, State, TokenType} from 'micromark-util-types'\n */\n\nimport { asciiControl, markdownLineEndingOrSpace, markdownLineEnding } from 'micromark-util-character';\n/**\n * Parse destinations.\n *\n * ###### Examples\n *\n * ```markdown\n * <a>\n * <a\\>b>\n * <a b>\n * <a)>\n * a\n * a\\)b\n * a(b)c\n * a(b)\n * ```\n *\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @param {State} nok\n * State switched to when unsuccessful.\n * @param {TokenType} type\n * Type for whole (`<a>` or `b`).\n * @param {TokenType} literalType\n * Type when enclosed (`<a>`).\n * @param {TokenType} literalMarkerType\n * Type for enclosing (`<` and `>`).\n * @param {TokenType} rawType\n * Type when not enclosed (`b`).\n * @param {TokenType} stringType\n * Type for the value (`a` or `b`).\n * @param {number | undefined} [max=Infinity]\n * Depth of nested parens (inclusive).\n * @returns {State}\n * Start state.\n */\nexport function factoryDestination(effects, ok, nok, type, literalType, literalMarkerType, rawType, stringType, max) {\n const limit = max || Number.POSITIVE_INFINITY;\n let balance = 0;\n return start;\n\n /**\n * Start of destination.\n *\n * ```markdown\n * > | <aa>\n * ^\n * > | aa\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === 60) {\n effects.enter(type);\n effects.enter(literalType);\n effects.enter(literalMarkerType);\n effects.consume(code);\n effects.exit(literalMarkerType);\n return enclosedBefore;\n }\n\n // ASCII control, space, closing paren.\n if (code === null || code === 32 || code === 41 || asciiControl(code)) {\n return nok(code);\n }\n effects.enter(type);\n effects.enter(rawType);\n effects.enter(stringType);\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return raw(code);\n }\n\n /**\n * After `<`, at an enclosed destination.\n *\n * ```markdown\n * > | <aa>\n * ^\n * ```\n *\n * @type {State}\n */\n function enclosedBefore(code) {\n if (code === 62) {\n effects.enter(literalMarkerType);\n effects.consume(code);\n effects.exit(literalMarkerType);\n effects.exit(literalType);\n effects.exit(type);\n return ok;\n }\n effects.enter(stringType);\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return enclosed(code);\n }\n\n /**\n * In enclosed destination.\n *\n * ```markdown\n * > | <aa>\n * ^\n * ```\n *\n * @type {State}\n */\n function enclosed(code) {\n if (code === 62) {\n effects.exit(\"chunkString\");\n effects.exit(stringType);\n return enclosedBefore(code);\n }\n if (code === null || code === 60 || markdownLineEnding(code)) {\n return nok(code);\n }\n effects.consume(code);\n return code === 92 ? enclosedEscape : enclosed;\n }\n\n /**\n * After `\\`, at a special character.\n *\n * ```markdown\n * > | <a\\*a>\n * ^\n * ```\n *\n * @type {State}\n */\n function enclosedEscape(code) {\n if (code === 60 || code === 62 || code === 92) {\n effects.consume(code);\n return enclosed;\n }\n return enclosed(code);\n }\n\n /**\n * In raw destination.\n *\n * ```markdown\n * > | aa\n * ^\n * ```\n *\n * @type {State}\n */\n function raw(code) {\n if (!balance && (code === null || code === 41 || markdownLineEndingOrSpace(code))) {\n effects.exit(\"chunkString\");\n effects.exit(stringType);\n effects.exit(rawType);\n effects.exit(type);\n return ok(code);\n }\n if (balance < limit && code === 40) {\n effects.consume(code);\n balance++;\n return raw;\n }\n if (code === 41) {\n effects.consume(code);\n balance--;\n return raw;\n }\n\n // ASCII control (but *not* `\\0`) and space and `(`.\n // Note: in `markdown-rs`, `\\0` exists in codes, in `micromark-js` it\n // doesn’t.\n if (code === null || code === 32 || code === 40 || asciiControl(code)) {\n return nok(code);\n }\n effects.consume(code);\n return code === 92 ? rawEscape : raw;\n }\n\n /**\n * After `\\`, at special character.\n *\n * ```markdown\n * > | a\\*a\n * ^\n * ```\n *\n * @type {State}\n */\n function rawEscape(code) {\n if (code === 40 || code === 41 || code === 92) {\n effects.consume(code);\n return raw;\n }\n return raw(code);\n }\n}","/**\n * @import {\n * Effects,\n * State,\n * TokenizeContext,\n * TokenType\n * } from 'micromark-util-types'\n */\n\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/**\n * Parse labels.\n *\n * > 👉 **Note**: labels in markdown are capped at 999 characters in the string.\n *\n * ###### Examples\n *\n * ```markdown\n * [a]\n * [a\n * b]\n * [a\\]b]\n * ```\n *\n * @this {TokenizeContext}\n * Tokenize context.\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @param {State} nok\n * State switched to when unsuccessful.\n * @param {TokenType} type\n * Type of the whole label (`[a]`).\n * @param {TokenType} markerType\n * Type for the markers (`[` and `]`).\n * @param {TokenType} stringType\n * Type for the identifier (`a`).\n * @returns {State}\n * Start state.\n */\nexport function factoryLabel(effects, ok, nok, type, markerType, stringType) {\n const self = this;\n let size = 0;\n /** @type {boolean} */\n let seen;\n return start;\n\n /**\n * Start of label.\n *\n * ```markdown\n * > | [a]\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(type);\n effects.enter(markerType);\n effects.consume(code);\n effects.exit(markerType);\n effects.enter(stringType);\n return atBreak;\n }\n\n /**\n * In label, at something, before something else.\n *\n * ```markdown\n * > | [a]\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (size > 999 || code === null || code === 91 || code === 93 && !seen ||\n // To do: remove in the future once we’ve switched from\n // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,\n // which doesn’t need this.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n code === 94 && !size && '_hiddenFootnoteSupport' in self.parser.constructs) {\n return nok(code);\n }\n if (code === 93) {\n effects.exit(stringType);\n effects.enter(markerType);\n effects.consume(code);\n effects.exit(markerType);\n effects.exit(type);\n return ok;\n }\n\n // To do: indent? Link chunks and EOLs together?\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return atBreak;\n }\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return labelInside(code);\n }\n\n /**\n * In label, in text.\n *\n * ```markdown\n * > | [a]\n * ^\n * ```\n *\n * @type {State}\n */\n function labelInside(code) {\n if (code === null || code === 91 || code === 93 || markdownLineEnding(code) || size++ > 999) {\n effects.exit(\"chunkString\");\n return atBreak(code);\n }\n effects.consume(code);\n if (!seen) seen = !markdownSpace(code);\n return code === 92 ? labelEscape : labelInside;\n }\n\n /**\n * After `\\`, at a special character.\n *\n * ```markdown\n * > | [a\\*a]\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code);\n size++;\n return labelInside;\n }\n return labelInside(code);\n }\n}","/**\n * @import {\n * Code,\n * Effects,\n * State,\n * TokenType\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\n/**\n * Parse titles.\n *\n * ###### Examples\n *\n * ```markdown\n * \"a\"\n * 'b'\n * (c)\n * \"a\n * b\"\n * 'a\n * b'\n * (a\\)b)\n * ```\n *\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @param {State} nok\n * State switched to when unsuccessful.\n * @param {TokenType} type\n * Type of the whole title (`\"a\"`, `'b'`, `(c)`).\n * @param {TokenType} markerType\n * Type for the markers (`\"`, `'`, `(`, and `)`).\n * @param {TokenType} stringType\n * Type for the value (`a`).\n * @returns {State}\n * Start state.\n */\nexport function factoryTitle(effects, ok, nok, type, markerType, stringType) {\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * Start of title.\n *\n * ```markdown\n * > | \"a\"\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === 34 || code === 39 || code === 40) {\n effects.enter(type);\n effects.enter(markerType);\n effects.consume(code);\n effects.exit(markerType);\n marker = code === 40 ? 41 : code;\n return begin;\n }\n return nok(code);\n }\n\n /**\n * After opening marker.\n *\n * This is also used at the closing marker.\n *\n * ```markdown\n * > | \"a\"\n * ^\n * ```\n *\n * @type {State}\n */\n function begin(code) {\n if (code === marker) {\n effects.enter(markerType);\n effects.consume(code);\n effects.exit(markerType);\n effects.exit(type);\n return ok;\n }\n effects.enter(stringType);\n return atBreak(code);\n }\n\n /**\n * At something, before something else.\n *\n * ```markdown\n * > | \"a\"\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === marker) {\n effects.exit(stringType);\n return begin(marker);\n }\n if (code === null) {\n return nok(code);\n }\n\n // Note: blank lines can’t exist in content.\n if (markdownLineEnding(code)) {\n // To do: use `space_or_tab_eol_with_options`, connect.\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return factorySpace(effects, atBreak, \"linePrefix\");\n }\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return inside(code);\n }\n\n /**\n *\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker || code === null || markdownLineEnding(code)) {\n effects.exit(\"chunkString\");\n return atBreak(code);\n }\n effects.consume(code);\n return code === 92 ? escape : inside;\n }\n\n /**\n * After `\\`, at a special character.\n *\n * ```markdown\n * > | \"a\\*b\"\n * ^\n * ```\n *\n * @type {State}\n */\n function escape(code) {\n if (code === marker || code === 92) {\n effects.consume(code);\n return inside;\n }\n return inside(code);\n }\n}","/**\n * @import {Effects, State} from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/**\n * Parse spaces and tabs.\n *\n * There is no `nok` parameter:\n *\n * * line endings or spaces in markdown are often optional, in which case this\n * factory can be used and `ok` will be switched to whether spaces were found\n * or not\n * * one line ending or space can be detected with\n * `markdownLineEndingOrSpace(code)` right before using `factoryWhitespace`\n *\n * @param {Effects} effects\n * Context.\n * @param {State} ok\n * State switched to when successful.\n * @returns {State}\n * Start state.\n */\nexport function factoryWhitespace(effects, ok) {\n /** @type {boolean} */\n let seen;\n return start;\n\n /** @type {State} */\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n seen = true;\n return start;\n }\n if (markdownSpace(code)) {\n return factorySpace(effects, start, seen ? \"linePrefix\" : \"lineSuffix\")(code);\n }\n return ok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factoryDestination } from 'micromark-factory-destination';\nimport { factoryLabel } from 'micromark-factory-label';\nimport { factorySpace } from 'micromark-factory-space';\nimport { factoryTitle } from 'micromark-factory-title';\nimport { factoryWhitespace } from 'micromark-factory-whitespace';\nimport { markdownLineEndingOrSpace, markdownLineEnding, markdownSpace } from 'micromark-util-character';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\n/** @type {Construct} */\nexport const definition = {\n name: 'definition',\n tokenize: tokenizeDefinition\n};\n\n/** @type {Construct} */\nconst titleBefore = {\n partial: true,\n tokenize: tokenizeTitleBefore\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeDefinition(effects, ok, nok) {\n const self = this;\n /** @type {string} */\n let identifier;\n return start;\n\n /**\n * At start of a definition.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Do not interrupt paragraphs (but do follow definitions).\n // To do: do `interrupt` the way `markdown-rs` does.\n // To do: parse whitespace the way `markdown-rs` does.\n effects.enter(\"definition\");\n return before(code);\n }\n\n /**\n * After optional whitespace, at `[`.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n // To do: parse whitespace the way `markdown-rs` does.\n\n return factoryLabel.call(self, effects, labelAfter,\n // Note: we don’t need to reset the way `markdown-rs` does.\n nok, \"definitionLabel\", \"definitionLabelMarker\", \"definitionLabelString\")(code);\n }\n\n /**\n * After label.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAfter(code) {\n identifier = normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1));\n if (code === 58) {\n effects.enter(\"definitionMarker\");\n effects.consume(code);\n effects.exit(\"definitionMarker\");\n return markerAfter;\n }\n return nok(code);\n }\n\n /**\n * After marker.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function markerAfter(code) {\n // Note: whitespace is optional.\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, destinationBefore)(code) : destinationBefore(code);\n }\n\n /**\n * Before destination.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function destinationBefore(code) {\n return factoryDestination(effects, destinationAfter,\n // Note: we don’t need to reset the way `markdown-rs` does.\n nok, \"definitionDestination\", \"definitionDestinationLiteral\", \"definitionDestinationLiteralMarker\", \"definitionDestinationRaw\", \"definitionDestinationString\")(code);\n }\n\n /**\n * After destination.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function destinationAfter(code) {\n return effects.attempt(titleBefore, after, after)(code);\n }\n\n /**\n * After definition.\n *\n * ```markdown\n * > | [a]: b\n * ^\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return markdownSpace(code) ? factorySpace(effects, afterWhitespace, \"whitespace\")(code) : afterWhitespace(code);\n }\n\n /**\n * After definition, after optional whitespace.\n *\n * ```markdown\n * > | [a]: b\n * ^\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function afterWhitespace(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"definition\");\n\n // Note: we don’t care about uniqueness.\n // It’s likely that that doesn’t happen very frequently.\n // It is more likely that it wastes precious time.\n self.parser.defined.push(identifier);\n\n // To do: `markdown-rs` interrupt.\n // // You’d be interrupting.\n // tokenizer.interrupt = true\n return ok(code);\n }\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeTitleBefore(effects, ok, nok) {\n return titleBefore;\n\n /**\n * After destination, at whitespace.\n *\n * ```markdown\n * > | [a]: b\n * ^\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function titleBefore(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, beforeMarker)(code) : nok(code);\n }\n\n /**\n * At title.\n *\n * ```markdown\n * | [a]: b\n * > | \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function beforeMarker(code) {\n return factoryTitle(effects, titleAfter, nok, \"definitionTitle\", \"definitionTitleMarker\", \"definitionTitleString\")(code);\n }\n\n /**\n * After title.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function titleAfter(code) {\n return markdownSpace(code) ? factorySpace(effects, titleAfterOptionalWhitespace, \"whitespace\")(code) : titleAfterOptionalWhitespace(code);\n }\n\n /**\n * After title, after optional whitespace.\n *\n * ```markdown\n * > | [a]: b \"c\"\n * ^\n * ```\n *\n * @type {State}\n */\n function titleAfterOptionalWhitespace(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const hardBreakEscape = {\n name: 'hardBreakEscape',\n tokenize: tokenizeHardBreakEscape\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeHardBreakEscape(effects, ok, nok) {\n return start;\n\n /**\n * Start of a hard break (escape).\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"hardBreakEscape\");\n effects.consume(code);\n return after;\n }\n\n /**\n * After `\\`, at eol.\n *\n * ```markdown\n * > | a\\\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownLineEnding(code)) {\n effects.exit(\"hardBreakEscape\");\n return ok(code);\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEndingOrSpace, markdownLineEnding, markdownSpace } from 'micromark-util-character';\nimport { splice } from 'micromark-util-chunked';\n/** @type {Construct} */\nexport const headingAtx = {\n name: 'headingAtx',\n resolve: resolveHeadingAtx,\n tokenize: tokenizeHeadingAtx\n};\n\n/** @type {Resolver} */\nfunction resolveHeadingAtx(events, context) {\n let contentEnd = events.length - 2;\n let contentStart = 3;\n /** @type {Token} */\n let content;\n /** @type {Token} */\n let text;\n\n // Prefix whitespace, part of the opening.\n if (events[contentStart][1].type === \"whitespace\") {\n contentStart += 2;\n }\n\n // Suffix whitespace, part of the closing.\n if (contentEnd - 2 > contentStart && events[contentEnd][1].type === \"whitespace\") {\n contentEnd -= 2;\n }\n if (events[contentEnd][1].type === \"atxHeadingSequence\" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === \"whitespace\")) {\n contentEnd -= contentStart + 1 === contentEnd ? 2 : 4;\n }\n if (contentEnd > contentStart) {\n content = {\n type: \"atxHeadingText\",\n start: events[contentStart][1].start,\n end: events[contentEnd][1].end\n };\n text = {\n type: \"chunkText\",\n start: events[contentStart][1].start,\n end: events[contentEnd][1].end,\n contentType: \"text\"\n };\n splice(events, contentStart, contentEnd - contentStart + 1, [['enter', content, context], ['enter', text, context], ['exit', text, context], ['exit', content, context]]);\n }\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeHeadingAtx(effects, ok, nok) {\n let size = 0;\n return start;\n\n /**\n * Start of a heading (atx).\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse indent like `markdown-rs`.\n effects.enter(\"atxHeading\");\n return before(code);\n }\n\n /**\n * After optional whitespace, at `#`.\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n effects.enter(\"atxHeadingSequence\");\n return sequenceOpen(code);\n }\n\n /**\n * In opening sequence.\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === 35 && size++ < 6) {\n effects.consume(code);\n return sequenceOpen;\n }\n\n // Always at least one `#`.\n if (code === null || markdownLineEndingOrSpace(code)) {\n effects.exit(\"atxHeadingSequence\");\n return atBreak(code);\n }\n return nok(code);\n }\n\n /**\n * After something, before something else.\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === 35) {\n effects.enter(\"atxHeadingSequence\");\n return sequenceFurther(code);\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"atxHeading\");\n // To do: interrupt like `markdown-rs`.\n // // Feel free to interrupt.\n // tokenizer.interrupt = false\n return ok(code);\n }\n if (markdownSpace(code)) {\n return factorySpace(effects, atBreak, \"whitespace\")(code);\n }\n\n // To do: generate `data` tokens, add the `text` token later.\n // Needs edit map, see: `markdown.rs`.\n effects.enter(\"atxHeadingText\");\n return data(code);\n }\n\n /**\n * In further sequence (after whitespace).\n *\n * Could be normal “visible” hashes in the heading or a final sequence.\n *\n * ```markdown\n * > | ## aa ##\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceFurther(code) {\n if (code === 35) {\n effects.consume(code);\n return sequenceFurther;\n }\n effects.exit(\"atxHeadingSequence\");\n return atBreak(code);\n }\n\n /**\n * In text.\n *\n * ```markdown\n * > | ## aa\n * ^\n * ```\n *\n * @type {State}\n */\n function data(code) {\n if (code === null || code === 35 || markdownLineEndingOrSpace(code)) {\n effects.exit(\"atxHeadingText\");\n return atBreak(code);\n }\n effects.consume(code);\n return data;\n }\n}","/**\n * List of lowercase HTML “block” tag names.\n *\n * The list, when parsing HTML (flow), results in more relaxed rules (condition\n * 6).\n * Because they are known blocks, the HTML-like syntax doesn’t have to be\n * strictly parsed.\n * For tag names not in this list, a more strict algorithm (condition 7) is used\n * to detect whether the HTML-like syntax is seen as HTML (flow) or not.\n *\n * This is copied from:\n * <https://spec.commonmark.org/0.30/#html-blocks>.\n *\n * > 👉 **Note**: `search` was added in `CommonMark@0.31`.\n */\nexport const htmlBlockNames = [\n 'address',\n 'article',\n 'aside',\n 'base',\n 'basefont',\n 'blockquote',\n 'body',\n 'caption',\n 'center',\n 'col',\n 'colgroup',\n 'dd',\n 'details',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'frame',\n 'frameset',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hr',\n 'html',\n 'iframe',\n 'legend',\n 'li',\n 'link',\n 'main',\n 'menu',\n 'menuitem',\n 'nav',\n 'noframes',\n 'ol',\n 'optgroup',\n 'option',\n 'p',\n 'param',\n 'search',\n 'section',\n 'summary',\n 'table',\n 'tbody',\n 'td',\n 'tfoot',\n 'th',\n 'thead',\n 'title',\n 'tr',\n 'track',\n 'ul'\n]\n\n/**\n * List of lowercase HTML “raw” tag names.\n *\n * The list, when parsing HTML (flow), results in HTML that can include lines\n * without exiting, until a closing tag also in this list is found (condition\n * 1).\n *\n * This module is copied from:\n * <https://spec.commonmark.org/0.30/#html-blocks>.\n *\n * > 👉 **Note**: `textarea` was added in `CommonMark@0.30`.\n */\nexport const htmlRawNames = ['pre', 'script', 'style', 'textarea']\n","/**\n * @import {\n * Code,\n * Construct,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { asciiAlphanumeric, asciiAlpha, markdownLineEndingOrSpace, markdownLineEnding, markdownSpace } from 'micromark-util-character';\nimport { htmlBlockNames, htmlRawNames } from 'micromark-util-html-tag-name';\nimport { blankLine } from './blank-line.js';\n\n/** @type {Construct} */\nexport const htmlFlow = {\n concrete: true,\n name: 'htmlFlow',\n resolveTo: resolveToHtmlFlow,\n tokenize: tokenizeHtmlFlow\n};\n\n/** @type {Construct} */\nconst blankLineBefore = {\n partial: true,\n tokenize: tokenizeBlankLineBefore\n};\nconst nonLazyContinuationStart = {\n partial: true,\n tokenize: tokenizeNonLazyContinuationStart\n};\n\n/** @type {Resolver} */\nfunction resolveToHtmlFlow(events) {\n let index = events.length;\n while (index--) {\n if (events[index][0] === 'enter' && events[index][1].type === \"htmlFlow\") {\n break;\n }\n }\n if (index > 1 && events[index - 2][1].type === \"linePrefix\") {\n // Add the prefix start to the HTML token.\n events[index][1].start = events[index - 2][1].start;\n // Add the prefix start to the HTML line token.\n events[index + 1][1].start = events[index - 2][1].start;\n // Remove the line prefix.\n events.splice(index - 2, 2);\n }\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlFlow(effects, ok, nok) {\n const self = this;\n /** @type {number} */\n let marker;\n /** @type {boolean} */\n let closingTag;\n /** @type {string} */\n let buffer;\n /** @type {number} */\n let index;\n /** @type {Code} */\n let markerB;\n return start;\n\n /**\n * Start of HTML (flow).\n *\n * ```markdown\n * > | <x />\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse indent like `markdown-rs`.\n return before(code);\n }\n\n /**\n * At `<`, after optional whitespace.\n *\n * ```markdown\n * > | <x />\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n effects.enter(\"htmlFlow\");\n effects.enter(\"htmlFlowData\");\n effects.consume(code);\n return open;\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | <x />\n * ^\n * > | <!doctype>\n * ^\n * > | <!--xxx-->\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code);\n return declarationOpen;\n }\n if (code === 47) {\n effects.consume(code);\n closingTag = true;\n return tagCloseStart;\n }\n if (code === 63) {\n effects.consume(code);\n marker = 3;\n // To do:\n // tokenizer.concrete = true\n // To do: use `markdown-rs` style interrupt.\n // While we’re in an instruction instead of a declaration, we’re on a `?`\n // right now, so we do need to search for `>`, similar to declarations.\n return self.interrupt ? ok : continuationDeclarationInside;\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n // Always the case.\n effects.consume(code);\n buffer = String.fromCharCode(code);\n return tagName;\n }\n return nok(code);\n }\n\n /**\n * After `<!`, at declaration, comment, or CDATA.\n *\n * ```markdown\n * > | <!doctype>\n * ^\n * > | <!--xxx-->\n * ^\n * > | <![CDATA[>&<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code);\n marker = 2;\n return commentOpenInside;\n }\n if (code === 91) {\n effects.consume(code);\n marker = 5;\n index = 0;\n return cdataOpenInside;\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code);\n marker = 4;\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuationDeclarationInside;\n }\n return nok(code);\n }\n\n /**\n * After `<!-`, inside a comment, at another `-`.\n *\n * ```markdown\n * > | <!--xxx-->\n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code);\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuationDeclarationInside;\n }\n return nok(code);\n }\n\n /**\n * After `<![`, inside CDATA, expecting `CDATA[`.\n *\n * ```markdown\n * > | <![CDATA[>&<]]>\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = \"CDATA[\";\n if (code === value.charCodeAt(index++)) {\n effects.consume(code);\n if (index === value.length) {\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuation;\n }\n return cdataOpenInside;\n }\n return nok(code);\n }\n\n /**\n * After `</`, in closing tag, at tag name.\n *\n * ```markdown\n * > | </x>\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n if (asciiAlpha(code)) {\n // Always the case.\n effects.consume(code);\n buffer = String.fromCharCode(code);\n return tagName;\n }\n return nok(code);\n }\n\n /**\n * In tag name.\n *\n * ```markdown\n * > | <ab>\n * ^^\n * > | </ab>\n * ^^\n * ```\n *\n * @type {State}\n */\n function tagName(code) {\n if (code === null || code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n const slash = code === 47;\n const name = buffer.toLowerCase();\n if (!slash && !closingTag && htmlRawNames.includes(name)) {\n marker = 1;\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok(code) : continuation(code);\n }\n if (htmlBlockNames.includes(buffer.toLowerCase())) {\n marker = 6;\n if (slash) {\n effects.consume(code);\n return basicSelfClosing;\n }\n\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok(code) : continuation(code);\n }\n marker = 7;\n // Do not support complete HTML when interrupting.\n return self.interrupt && !self.parser.lazy[self.now().line] ? nok(code) : closingTag ? completeClosingTagAfter(code) : completeAttributeNameBefore(code);\n }\n\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code);\n buffer += String.fromCharCode(code);\n return tagName;\n }\n return nok(code);\n }\n\n /**\n * After closing slash of a basic tag name.\n *\n * ```markdown\n * > | <div/>\n * ^\n * ```\n *\n * @type {State}\n */\n function basicSelfClosing(code) {\n if (code === 62) {\n effects.consume(code);\n // // Do not form containers.\n // tokenizer.concrete = true\n return self.interrupt ? ok : continuation;\n }\n return nok(code);\n }\n\n /**\n * After closing slash of a complete tag name.\n *\n * ```markdown\n * > | <x/>\n * ^\n * ```\n *\n * @type {State}\n */\n function completeClosingTagAfter(code) {\n if (markdownSpace(code)) {\n effects.consume(code);\n return completeClosingTagAfter;\n }\n return completeEnd(code);\n }\n\n /**\n * At an attribute name.\n *\n * At first, this state is used after a complete tag name, after whitespace,\n * where it expects optional attributes or the end of the tag.\n * It is also reused after attributes, when expecting more optional\n * attributes.\n *\n * ```markdown\n * > | <a />\n * ^\n * > | <a :b>\n * ^\n * > | <a _b>\n * ^\n * > | <a b>\n * ^\n * > | <a >\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeNameBefore(code) {\n if (code === 47) {\n effects.consume(code);\n return completeEnd;\n }\n\n // ASCII alphanumerical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code);\n return completeAttributeName;\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return completeAttributeNameBefore;\n }\n return completeEnd(code);\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | <a :b>\n * ^\n * > | <a _b>\n * ^\n * > | <a b>\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeName(code) {\n // ASCII alphanumerical and `-`, `.`, `:`, and `_`.\n if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return completeAttributeName;\n }\n return completeAttributeNameAfter(code);\n }\n\n /**\n * After attribute name, at an optional initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | <a b>\n * ^\n * > | <a b=c>\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code);\n return completeAttributeValueBefore;\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return completeAttributeNameAfter;\n }\n return completeAttributeNameBefore(code);\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | <a b=c>\n * ^\n * > | <a b=\"c\">\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueBefore(code) {\n if (code === null || code === 60 || code === 61 || code === 62 || code === 96) {\n return nok(code);\n }\n if (code === 34 || code === 39) {\n effects.consume(code);\n markerB = code;\n return completeAttributeValueQuoted;\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return completeAttributeValueBefore;\n }\n return completeAttributeValueUnquoted(code);\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | <a b=\"c\">\n * ^\n * > | <a b='c'>\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueQuoted(code) {\n if (code === markerB) {\n effects.consume(code);\n markerB = null;\n return completeAttributeValueQuotedAfter;\n }\n if (code === null || markdownLineEnding(code)) {\n return nok(code);\n }\n effects.consume(code);\n return completeAttributeValueQuoted;\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | <a b=c>\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueUnquoted(code) {\n if (code === null || code === 34 || code === 39 || code === 47 || code === 60 || code === 61 || code === 62 || code === 96 || markdownLineEndingOrSpace(code)) {\n return completeAttributeNameAfter(code);\n }\n effects.consume(code);\n return completeAttributeValueUnquoted;\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the\n * end of the tag.\n *\n * ```markdown\n * > | <a b=\"c\">\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownSpace(code)) {\n return completeAttributeNameBefore(code);\n }\n return nok(code);\n }\n\n /**\n * In certain circumstances of a complete tag where only an `>` is allowed.\n *\n * ```markdown\n * > | <a b=\"c\">\n * ^\n * ```\n *\n * @type {State}\n */\n function completeEnd(code) {\n if (code === 62) {\n effects.consume(code);\n return completeAfter;\n }\n return nok(code);\n }\n\n /**\n * After `>` in a complete tag.\n *\n * ```markdown\n * > | <x>\n * ^\n * ```\n *\n * @type {State}\n */\n function completeAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n // // Do not form containers.\n // tokenizer.concrete = true\n return continuation(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return completeAfter;\n }\n return nok(code);\n }\n\n /**\n * In continuation of any HTML kind.\n *\n * ```markdown\n * > | <!--xxx-->\n * ^\n * ```\n *\n * @type {State}\n */\n function continuation(code) {\n if (code === 45 && marker === 2) {\n effects.consume(code);\n return continuationCommentInside;\n }\n if (code === 60 && marker === 1) {\n effects.consume(code);\n return continuationRawTagOpen;\n }\n if (code === 62 && marker === 4) {\n effects.consume(code);\n return continuationClose;\n }\n if (code === 63 && marker === 3) {\n effects.consume(code);\n return continuationDeclarationInside;\n }\n if (code === 93 && marker === 5) {\n effects.consume(code);\n return continuationCdataInside;\n }\n if (markdownLineEnding(code) && (marker === 6 || marker === 7)) {\n effects.exit(\"htmlFlowData\");\n return effects.check(blankLineBefore, continuationAfter, continuationStart)(code);\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"htmlFlowData\");\n return continuationStart(code);\n }\n effects.consume(code);\n return continuation;\n }\n\n /**\n * In continuation, at eol.\n *\n * ```markdown\n * > | <x>\n * ^\n * | asd\n * ```\n *\n * @type {State}\n */\n function continuationStart(code) {\n return effects.check(nonLazyContinuationStart, continuationStartNonLazy, continuationAfter)(code);\n }\n\n /**\n * In continuation, at eol, before non-lazy content.\n *\n * ```markdown\n * > | <x>\n * ^\n * | asd\n * ```\n *\n * @type {State}\n */\n function continuationStartNonLazy(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return continuationBefore;\n }\n\n /**\n * In continuation, before non-lazy content.\n *\n * ```markdown\n * | <x>\n * > | asd\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return continuationStart(code);\n }\n effects.enter(\"htmlFlowData\");\n return continuation(code);\n }\n\n /**\n * In comment continuation, after one `-`, expecting another.\n *\n * ```markdown\n * > | <!--xxx-->\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCommentInside(code) {\n if (code === 45) {\n effects.consume(code);\n return continuationDeclarationInside;\n }\n return continuation(code);\n }\n\n /**\n * In raw continuation, after `<`, at `/`.\n *\n * ```markdown\n * > | <script>console.log(1)</script>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationRawTagOpen(code) {\n if (code === 47) {\n effects.consume(code);\n buffer = '';\n return continuationRawEndTag;\n }\n return continuation(code);\n }\n\n /**\n * In raw continuation, after `</`, in a raw tag name.\n *\n * ```markdown\n * > | <script>console.log(1)</script>\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function continuationRawEndTag(code) {\n if (code === 62) {\n const name = buffer.toLowerCase();\n if (htmlRawNames.includes(name)) {\n effects.consume(code);\n return continuationClose;\n }\n return continuation(code);\n }\n if (asciiAlpha(code) && buffer.length < 8) {\n // Always the case.\n effects.consume(code);\n buffer += String.fromCharCode(code);\n return continuationRawEndTag;\n }\n return continuation(code);\n }\n\n /**\n * In cdata continuation, after `]`, expecting `]>`.\n *\n * ```markdown\n * > | <![CDATA[>&<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationCdataInside(code) {\n if (code === 93) {\n effects.consume(code);\n return continuationDeclarationInside;\n }\n return continuation(code);\n }\n\n /**\n * In declaration or instruction continuation, at `>`.\n *\n * ```markdown\n * > | <!-->\n * ^\n * > | <?>\n * ^\n * > | <!q>\n * ^\n * > | <!--ab-->\n * ^\n * > | <![CDATA[>&<]]>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationDeclarationInside(code) {\n if (code === 62) {\n effects.consume(code);\n return continuationClose;\n }\n\n // More dashes.\n if (code === 45 && marker === 2) {\n effects.consume(code);\n return continuationDeclarationInside;\n }\n return continuation(code);\n }\n\n /**\n * In closed continuation: everything we get until the eol/eof is part of it.\n *\n * ```markdown\n * > | <!doctype>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationClose(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"htmlFlowData\");\n return continuationAfter(code);\n }\n effects.consume(code);\n return continuationClose;\n }\n\n /**\n * Done.\n *\n * ```markdown\n * > | <!doctype>\n * ^\n * ```\n *\n * @type {State}\n */\n function continuationAfter(code) {\n effects.exit(\"htmlFlow\");\n // // Feel free to interrupt.\n // tokenizer.interrupt = false\n // // No longer concrete.\n // tokenizer.concrete = false\n return ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuationStart(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * At eol, before continuation.\n *\n * ```markdown\n * > | * ```js\n * ^\n * | b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * A continuation.\n *\n * ```markdown\n * | * ```js\n * > | b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLineBefore(effects, ok, nok) {\n return start;\n\n /**\n * Before eol, expecting blank line.\n *\n * ```markdown\n * > | <div>\n * ^\n * |\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return effects.attempt(blankLine, ok, nok);\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { asciiAlphanumeric, asciiAlpha, markdownLineEndingOrSpace, markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const htmlText = {\n name: 'htmlText',\n tokenize: tokenizeHtmlText\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeHtmlText(effects, ok, nok) {\n const self = this;\n /** @type {NonNullable<Code> | undefined} */\n let marker;\n /** @type {number} */\n let index;\n /** @type {State} */\n let returnState;\n return start;\n\n /**\n * Start of HTML (text).\n *\n * ```markdown\n * > | a <b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"htmlText\");\n effects.enter(\"htmlTextData\");\n effects.consume(code);\n return open;\n }\n\n /**\n * After `<`, at tag name or other stuff.\n *\n * ```markdown\n * > | a <b> c\n * ^\n * > | a <!doctype> c\n * ^\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 33) {\n effects.consume(code);\n return declarationOpen;\n }\n if (code === 47) {\n effects.consume(code);\n return tagCloseStart;\n }\n if (code === 63) {\n effects.consume(code);\n return instruction;\n }\n\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code);\n return tagOpen;\n }\n return nok(code);\n }\n\n /**\n * After `<!`, at declaration, comment, or CDATA.\n *\n * ```markdown\n * > | a <!doctype> c\n * ^\n * > | a <!--b--> c\n * ^\n * > | a <![CDATA[>&<]]> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declarationOpen(code) {\n if (code === 45) {\n effects.consume(code);\n return commentOpenInside;\n }\n if (code === 91) {\n effects.consume(code);\n index = 0;\n return cdataOpenInside;\n }\n if (asciiAlpha(code)) {\n effects.consume(code);\n return declaration;\n }\n return nok(code);\n }\n\n /**\n * In a comment, after `<!-`, at another `-`.\n *\n * ```markdown\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentOpenInside(code) {\n if (code === 45) {\n effects.consume(code);\n return commentEnd;\n }\n return nok(code);\n }\n\n /**\n * In comment.\n *\n * ```markdown\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function comment(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === 45) {\n effects.consume(code);\n return commentClose;\n }\n if (markdownLineEnding(code)) {\n returnState = comment;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return comment;\n }\n\n /**\n * In comment, after `-`.\n *\n * ```markdown\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentClose(code) {\n if (code === 45) {\n effects.consume(code);\n return commentEnd;\n }\n return comment(code);\n }\n\n /**\n * In comment, after `--`.\n *\n * ```markdown\n * > | a <!--b--> c\n * ^\n * ```\n *\n * @type {State}\n */\n function commentEnd(code) {\n return code === 62 ? end(code) : code === 45 ? commentClose(code) : comment(code);\n }\n\n /**\n * After `<![`, in CDATA, expecting `CDATA[`.\n *\n * ```markdown\n * > | a <![CDATA[>&<]]> b\n * ^^^^^^\n * ```\n *\n * @type {State}\n */\n function cdataOpenInside(code) {\n const value = \"CDATA[\";\n if (code === value.charCodeAt(index++)) {\n effects.consume(code);\n return index === value.length ? cdata : cdataOpenInside;\n }\n return nok(code);\n }\n\n /**\n * In CDATA.\n *\n * ```markdown\n * > | a <![CDATA[>&<]]> b\n * ^^^\n * ```\n *\n * @type {State}\n */\n function cdata(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === 93) {\n effects.consume(code);\n return cdataClose;\n }\n if (markdownLineEnding(code)) {\n returnState = cdata;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return cdata;\n }\n\n /**\n * In CDATA, after `]`, at another `]`.\n *\n * ```markdown\n * > | a <![CDATA[>&<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataClose(code) {\n if (code === 93) {\n effects.consume(code);\n return cdataEnd;\n }\n return cdata(code);\n }\n\n /**\n * In CDATA, after `]]`, at `>`.\n *\n * ```markdown\n * > | a <![CDATA[>&<]]> b\n * ^\n * ```\n *\n * @type {State}\n */\n function cdataEnd(code) {\n if (code === 62) {\n return end(code);\n }\n if (code === 93) {\n effects.consume(code);\n return cdataEnd;\n }\n return cdata(code);\n }\n\n /**\n * In declaration.\n *\n * ```markdown\n * > | a <!b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function declaration(code) {\n if (code === null || code === 62) {\n return end(code);\n }\n if (markdownLineEnding(code)) {\n returnState = declaration;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return declaration;\n }\n\n /**\n * In instruction.\n *\n * ```markdown\n * > | a <?b?> c\n * ^\n * ```\n *\n * @type {State}\n */\n function instruction(code) {\n if (code === null) {\n return nok(code);\n }\n if (code === 63) {\n effects.consume(code);\n return instructionClose;\n }\n if (markdownLineEnding(code)) {\n returnState = instruction;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return instruction;\n }\n\n /**\n * In instruction, after `?`, at `>`.\n *\n * ```markdown\n * > | a <?b?> c\n * ^\n * ```\n *\n * @type {State}\n */\n function instructionClose(code) {\n return code === 62 ? end(code) : instruction(code);\n }\n\n /**\n * After `</`, in closing tag, at tag name.\n *\n * ```markdown\n * > | a </b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseStart(code) {\n // ASCII alphabetical.\n if (asciiAlpha(code)) {\n effects.consume(code);\n return tagClose;\n }\n return nok(code);\n }\n\n /**\n * After `</x`, in a tag name.\n *\n * ```markdown\n * > | a </b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagClose(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return tagClose;\n }\n return tagCloseBetween(code);\n }\n\n /**\n * In closing tag, after tag name.\n *\n * ```markdown\n * > | a </b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagCloseBetween(code) {\n if (markdownLineEnding(code)) {\n returnState = tagCloseBetween;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagCloseBetween;\n }\n return end(code);\n }\n\n /**\n * After `<x`, in opening tag name.\n *\n * ```markdown\n * > | a <b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpen(code) {\n // ASCII alphanumerical and `-`.\n if (code === 45 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return tagOpen;\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code);\n }\n return nok(code);\n }\n\n /**\n * In opening tag, after tag name.\n *\n * ```markdown\n * > | a <b> c\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenBetween(code) {\n if (code === 47) {\n effects.consume(code);\n return end;\n }\n\n // ASCII alphabetical and `:` and `_`.\n if (code === 58 || code === 95 || asciiAlpha(code)) {\n effects.consume(code);\n return tagOpenAttributeName;\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenBetween;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagOpenBetween;\n }\n return end(code);\n }\n\n /**\n * In attribute name.\n *\n * ```markdown\n * > | a <b c> d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeName(code) {\n // ASCII alphabetical and `-`, `.`, `:`, and `_`.\n if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric(code)) {\n effects.consume(code);\n return tagOpenAttributeName;\n }\n return tagOpenAttributeNameAfter(code);\n }\n\n /**\n * After attribute name, before initializer, the end of the tag, or\n * whitespace.\n *\n * ```markdown\n * > | a <b c> d\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeNameAfter(code) {\n if (code === 61) {\n effects.consume(code);\n return tagOpenAttributeValueBefore;\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeNameAfter;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagOpenAttributeNameAfter;\n }\n return tagOpenBetween(code);\n }\n\n /**\n * Before unquoted, double quoted, or single quoted attribute value, allowing\n * whitespace.\n *\n * ```markdown\n * > | a <b c=d> e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueBefore(code) {\n if (code === null || code === 60 || code === 61 || code === 62 || code === 96) {\n return nok(code);\n }\n if (code === 34 || code === 39) {\n effects.consume(code);\n marker = code;\n return tagOpenAttributeValueQuoted;\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueBefore;\n return lineEndingBefore(code);\n }\n if (markdownSpace(code)) {\n effects.consume(code);\n return tagOpenAttributeValueBefore;\n }\n effects.consume(code);\n return tagOpenAttributeValueUnquoted;\n }\n\n /**\n * In double or single quoted attribute value.\n *\n * ```markdown\n * > | a <b c=\"d\"> e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuoted(code) {\n if (code === marker) {\n effects.consume(code);\n marker = undefined;\n return tagOpenAttributeValueQuotedAfter;\n }\n if (code === null) {\n return nok(code);\n }\n if (markdownLineEnding(code)) {\n returnState = tagOpenAttributeValueQuoted;\n return lineEndingBefore(code);\n }\n effects.consume(code);\n return tagOpenAttributeValueQuoted;\n }\n\n /**\n * In unquoted attribute value.\n *\n * ```markdown\n * > | a <b c=d> e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueUnquoted(code) {\n if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 96) {\n return nok(code);\n }\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code);\n }\n effects.consume(code);\n return tagOpenAttributeValueUnquoted;\n }\n\n /**\n * After double or single quoted attribute value, before whitespace or the end\n * of the tag.\n *\n * ```markdown\n * > | a <b c=\"d\"> e\n * ^\n * ```\n *\n * @type {State}\n */\n function tagOpenAttributeValueQuotedAfter(code) {\n if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {\n return tagOpenBetween(code);\n }\n return nok(code);\n }\n\n /**\n * In certain circumstances of a tag where only an `>` is allowed.\n *\n * ```markdown\n * > | a <b c=\"d\"> e\n * ^\n * ```\n *\n * @type {State}\n */\n function end(code) {\n if (code === 62) {\n effects.consume(code);\n effects.exit(\"htmlTextData\");\n effects.exit(\"htmlText\");\n return ok;\n }\n return nok(code);\n }\n\n /**\n * At eol.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * > | a <!--a\n * ^\n * | b-->\n * ```\n *\n * @type {State}\n */\n function lineEndingBefore(code) {\n effects.exit(\"htmlTextData\");\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return lineEndingAfter;\n }\n\n /**\n * After eol, at optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a <!--a\n * > | b-->\n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfter(code) {\n // Always populated by defaults.\n\n return markdownSpace(code) ? factorySpace(effects, lineEndingAfterPrefix, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code) : lineEndingAfterPrefix(code);\n }\n\n /**\n * After eol, after optional whitespace.\n *\n * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about\n * > empty tokens.\n *\n * ```markdown\n * | a <!--a\n * > | b-->\n * ^\n * ```\n *\n * @type {State}\n */\n function lineEndingAfterPrefix(code) {\n effects.enter(\"htmlTextData\");\n return returnState(code);\n }\n}","/**\n * @import {\n * Construct,\n * Event,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { factoryDestination } from 'micromark-factory-destination';\nimport { factoryLabel } from 'micromark-factory-label';\nimport { factoryTitle } from 'micromark-factory-title';\nimport { factoryWhitespace } from 'micromark-factory-whitespace';\nimport { markdownLineEndingOrSpace } from 'micromark-util-character';\nimport { push, splice } from 'micromark-util-chunked';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/** @type {Construct} */\nexport const labelEnd = {\n name: 'labelEnd',\n resolveAll: resolveAllLabelEnd,\n resolveTo: resolveToLabelEnd,\n tokenize: tokenizeLabelEnd\n};\n\n/** @type {Construct} */\nconst resourceConstruct = {\n tokenize: tokenizeResource\n};\n/** @type {Construct} */\nconst referenceFullConstruct = {\n tokenize: tokenizeReferenceFull\n};\n/** @type {Construct} */\nconst referenceCollapsedConstruct = {\n tokenize: tokenizeReferenceCollapsed\n};\n\n/** @type {Resolver} */\nfunction resolveAllLabelEnd(events) {\n let index = -1;\n /** @type {Array<Event>} */\n const newEvents = [];\n while (++index < events.length) {\n const token = events[index][1];\n newEvents.push(events[index]);\n if (token.type === \"labelImage\" || token.type === \"labelLink\" || token.type === \"labelEnd\") {\n // Remove the marker.\n const offset = token.type === \"labelImage\" ? 4 : 2;\n token.type = \"data\";\n index += offset;\n }\n }\n\n // If the events are equal, we don't have to copy newEvents to events\n if (events.length !== newEvents.length) {\n splice(events, 0, events.length, newEvents);\n }\n return events;\n}\n\n/** @type {Resolver} */\nfunction resolveToLabelEnd(events, context) {\n let index = events.length;\n let offset = 0;\n /** @type {Token} */\n let token;\n /** @type {number | undefined} */\n let open;\n /** @type {number | undefined} */\n let close;\n /** @type {Array<Event>} */\n let media;\n\n // Find an opening.\n while (index--) {\n token = events[index][1];\n if (open) {\n // If we see another link, or inactive link label, we’ve been here before.\n if (token.type === \"link\" || token.type === \"labelLink\" && token._inactive) {\n break;\n }\n\n // Mark other link openings as inactive, as we can’t have links in\n // links.\n if (events[index][0] === 'enter' && token.type === \"labelLink\") {\n token._inactive = true;\n }\n } else if (close) {\n if (events[index][0] === 'enter' && (token.type === \"labelImage\" || token.type === \"labelLink\") && !token._balanced) {\n open = index;\n if (token.type !== \"labelLink\") {\n offset = 2;\n break;\n }\n }\n } else if (token.type === \"labelEnd\") {\n close = index;\n }\n }\n const group = {\n type: events[open][1].type === \"labelLink\" ? \"link\" : \"image\",\n start: {\n ...events[open][1].start\n },\n end: {\n ...events[events.length - 1][1].end\n }\n };\n const label = {\n type: \"label\",\n start: {\n ...events[open][1].start\n },\n end: {\n ...events[close][1].end\n }\n };\n const text = {\n type: \"labelText\",\n start: {\n ...events[open + offset + 2][1].end\n },\n end: {\n ...events[close - 2][1].start\n }\n };\n media = [['enter', group, context], ['enter', label, context]];\n\n // Opening marker.\n media = push(media, events.slice(open + 1, open + offset + 3));\n\n // Text open.\n media = push(media, [['enter', text, context]]);\n\n // Always populated by defaults.\n\n // Between.\n media = push(media, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context));\n\n // Text close, marker close, label close.\n media = push(media, [['exit', text, context], events[close - 2], events[close - 1], ['exit', label, context]]);\n\n // Reference, resource, or so.\n media = push(media, events.slice(close + 1));\n\n // Media close.\n media = push(media, [['exit', group, context]]);\n splice(events, open, events.length, media);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelEnd(effects, ok, nok) {\n const self = this;\n let index = self.events.length;\n /** @type {Token} */\n let labelStart;\n /** @type {boolean} */\n let defined;\n\n // Find an opening.\n while (index--) {\n if ((self.events[index][1].type === \"labelImage\" || self.events[index][1].type === \"labelLink\") && !self.events[index][1]._balanced) {\n labelStart = self.events[index][1];\n break;\n }\n }\n return start;\n\n /**\n * Start of label end.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // If there is not an okay opening.\n if (!labelStart) {\n return nok(code);\n }\n\n // If the corresponding label (link) start is marked as inactive,\n // it means we’d be wrapping a link, like this:\n //\n // ```markdown\n // > | a [b [c](d) e](f) g.\n // ^\n // ```\n //\n // We can’t have that, so it’s just balanced brackets.\n if (labelStart._inactive) {\n return labelEndNok(code);\n }\n defined = self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n })));\n effects.enter(\"labelEnd\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelEnd\");\n return after;\n }\n\n /**\n * After `]`.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Note: `markdown-rs` also parses GFM footnotes here, which for us is in\n // an extension.\n\n // Resource (`[asd](fgh)`)?\n if (code === 40) {\n return effects.attempt(resourceConstruct, labelEndOk, defined ? labelEndOk : labelEndNok)(code);\n }\n\n // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?\n if (code === 91) {\n return effects.attempt(referenceFullConstruct, labelEndOk, defined ? referenceNotFull : labelEndNok)(code);\n }\n\n // Shortcut (`[asd]`) reference?\n return defined ? labelEndOk(code) : labelEndNok(code);\n }\n\n /**\n * After `]`, at `[`, but not at a full reference.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceNotFull(code) {\n return effects.attempt(referenceCollapsedConstruct, labelEndOk, labelEndNok)(code);\n }\n\n /**\n * Done, we found something.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * > | [a][b] c\n * ^\n * > | [a][] b\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndOk(code) {\n // Note: `markdown-rs` does a bunch of stuff here.\n return ok(code);\n }\n\n /**\n * Done, it’s nothing.\n *\n * There was an okay opening, but we didn’t match anything.\n *\n * ```markdown\n * > | [a](b c\n * ^\n * > | [a][b c\n * ^\n * > | [a] b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEndNok(code) {\n labelStart._balanced = true;\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeResource(effects, ok, nok) {\n return resourceStart;\n\n /**\n * At a resource.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceStart(code) {\n effects.enter(\"resource\");\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n return resourceBefore;\n }\n\n /**\n * In resource, after `(`, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBefore(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code);\n }\n\n /**\n * In resource, after optional whitespace, at `)` or a destination.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceOpen(code) {\n if (code === 41) {\n return resourceEnd(code);\n }\n return factoryDestination(effects, resourceDestinationAfter, resourceDestinationMissing, \"resourceDestination\", \"resourceDestinationLiteral\", \"resourceDestinationLiteralMarker\", \"resourceDestinationRaw\", \"resourceDestinationString\", 32)(code);\n }\n\n /**\n * In resource, after destination, at optional whitespace.\n *\n * ```markdown\n * > | [a](b) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code);\n }\n\n /**\n * At invalid destination.\n *\n * ```markdown\n * > | [a](<<) b\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceDestinationMissing(code) {\n return nok(code);\n }\n\n /**\n * In resource, after destination and whitespace, at `(` or title.\n *\n * ```markdown\n * > | [a](b ) c\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceBetween(code) {\n if (code === 34 || code === 39 || code === 40) {\n return factoryTitle(effects, resourceTitleAfter, nok, \"resourceTitle\", \"resourceTitleMarker\", \"resourceTitleString\")(code);\n }\n return resourceEnd(code);\n }\n\n /**\n * In resource, after title, at optional whitespace.\n *\n * ```markdown\n * > | [a](b \"c\") d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceTitleAfter(code) {\n return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code);\n }\n\n /**\n * In resource, at `)`.\n *\n * ```markdown\n * > | [a](b) d\n * ^\n * ```\n *\n * @type {State}\n */\n function resourceEnd(code) {\n if (code === 41) {\n effects.enter(\"resourceMarker\");\n effects.consume(code);\n effects.exit(\"resourceMarker\");\n effects.exit(\"resource\");\n return ok;\n }\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceFull(effects, ok, nok) {\n const self = this;\n return referenceFull;\n\n /**\n * In a reference (full), at the `[`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFull(code) {\n return factoryLabel.call(self, effects, referenceFullAfter, referenceFullMissing, \"reference\", \"referenceMarker\", \"referenceString\")(code);\n }\n\n /**\n * In a reference (full), after `]`.\n *\n * ```markdown\n * > | [a][b] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullAfter(code) {\n return self.parser.defined.includes(normalizeIdentifier(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) ? ok(code) : nok(code);\n }\n\n /**\n * In reference (full) that was missing.\n *\n * ```markdown\n * > | [a][b d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceFullMissing(code) {\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeReferenceCollapsed(effects, ok, nok) {\n return referenceCollapsedStart;\n\n /**\n * In reference (collapsed), at `[`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedStart(code) {\n // We only attempt a collapsed label if there’s a `[`.\n\n effects.enter(\"reference\");\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n return referenceCollapsedOpen;\n }\n\n /**\n * In reference (collapsed), at `]`.\n *\n * > 👉 **Note**: we only get here if the label is defined.\n *\n * ```markdown\n * > | [a][] d\n * ^\n * ```\n *\n * @type {State}\n */\n function referenceCollapsedOpen(code) {\n if (code === 93) {\n effects.enter(\"referenceMarker\");\n effects.consume(code);\n effects.exit(\"referenceMarker\");\n effects.exit(\"reference\");\n return ok;\n }\n return nok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartImage = {\n name: 'labelStartImage',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartImage\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartImage(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of label (image) start.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelImage\");\n effects.enter(\"labelImageMarker\");\n effects.consume(code);\n effects.exit(\"labelImageMarker\");\n return open;\n }\n\n /**\n * After `!`, at `[`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 91) {\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelImage\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * After `![`.\n *\n * ```markdown\n * > | a ![b] c\n * ^\n * ```\n *\n * This is needed in because, when GFM footnotes are enabled, images never\n * form when started with a `^`.\n * Instead, links form:\n *\n * ```markdown\n * \n *\n * ![^a][b]\n *\n * [b]: c\n * ```\n *\n * ```html\n * <p>!<a href=\\\"b\\\">^a</a></p>\n * <p>!<a href=\\\"c\\\">^a</a></p>\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // To do: use a new field to do this, this is still needed for\n // `micromark-extension-gfm-footnote`, but the `label-start-link`\n // behavior isn’t.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { labelEnd } from './label-end.js';\n\n/** @type {Construct} */\nexport const labelStartLink = {\n name: 'labelStartLink',\n resolveAll: labelEnd.resolveAll,\n tokenize: tokenizeLabelStartLink\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLabelStartLink(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of label (link) start.\n *\n * ```markdown\n * > | a [b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"labelLink\");\n effects.enter(\"labelMarker\");\n effects.consume(code);\n effects.exit(\"labelMarker\");\n effects.exit(\"labelLink\");\n return after;\n }\n\n /** @type {State} */\n function after(code) {\n // To do: this isn’t needed in `micromark-extension-gfm-footnote`,\n // remove.\n // Hidden footnotes hook.\n /* c8 ignore next 3 */\n return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs ? nok(code) : ok(code);\n }\n}","/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const lineEnding = {\n name: 'lineEnding',\n tokenize: tokenizeLineEnding\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeLineEnding(effects, ok) {\n return start;\n\n /** @type {State} */\n function start(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return factorySpace(effects, ok, \"linePrefix\");\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const thematicBreak = {\n name: 'thematicBreak',\n tokenize: tokenizeThematicBreak\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeThematicBreak(effects, ok, nok) {\n let size = 0;\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * Start of thematic break.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"thematicBreak\");\n // To do: parse indent like `markdown-rs`.\n return before(code);\n }\n\n /**\n * After optional whitespace, at marker.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n marker = code;\n return atBreak(code);\n }\n\n /**\n * After something, before something else.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === marker) {\n effects.enter(\"thematicBreakSequence\");\n return sequence(code);\n }\n if (size >= 3 && (code === null || markdownLineEnding(code))) {\n effects.exit(\"thematicBreak\");\n return ok(code);\n }\n return nok(code);\n }\n\n /**\n * In sequence.\n *\n * ```markdown\n * > | ***\n * ^\n * ```\n *\n * @type {State}\n */\n function sequence(code) {\n if (code === marker) {\n effects.consume(code);\n size++;\n return sequence;\n }\n effects.exit(\"thematicBreakSequence\");\n return markdownSpace(code) ? factorySpace(effects, atBreak, \"whitespace\")(code) : atBreak(code);\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * Exiter,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { asciiDigit, markdownSpace } from 'micromark-util-character';\nimport { blankLine } from './blank-line.js';\nimport { thematicBreak } from './thematic-break.js';\n\n/** @type {Construct} */\nexport const list = {\n continuation: {\n tokenize: tokenizeListContinuation\n },\n exit: tokenizeListEnd,\n name: 'list',\n tokenize: tokenizeListStart\n};\n\n/** @type {Construct} */\nconst listItemPrefixWhitespaceConstruct = {\n partial: true,\n tokenize: tokenizeListItemPrefixWhitespace\n};\n\n/** @type {Construct} */\nconst indentConstruct = {\n partial: true,\n tokenize: tokenizeIndent\n};\n\n// To do: `markdown-rs` parses list items on their own and later stitches them\n// together.\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeListStart(effects, ok, nok) {\n const self = this;\n const tail = self.events[self.events.length - 1];\n let initialSize = tail && tail[1].type === \"linePrefix\" ? tail[2].sliceSerialize(tail[1], true).length : 0;\n let size = 0;\n return start;\n\n /** @type {State} */\n function start(code) {\n const kind = self.containerState.type || (code === 42 || code === 43 || code === 45 ? \"listUnordered\" : \"listOrdered\");\n if (kind === \"listUnordered\" ? !self.containerState.marker || code === self.containerState.marker : asciiDigit(code)) {\n if (!self.containerState.type) {\n self.containerState.type = kind;\n effects.enter(kind, {\n _container: true\n });\n }\n if (kind === \"listUnordered\") {\n effects.enter(\"listItemPrefix\");\n return code === 42 || code === 45 ? effects.check(thematicBreak, nok, atMarker)(code) : atMarker(code);\n }\n if (!self.interrupt || code === 49) {\n effects.enter(\"listItemPrefix\");\n effects.enter(\"listItemValue\");\n return inside(code);\n }\n }\n return nok(code);\n }\n\n /** @type {State} */\n function inside(code) {\n if (asciiDigit(code) && ++size < 10) {\n effects.consume(code);\n return inside;\n }\n if ((!self.interrupt || size < 2) && (self.containerState.marker ? code === self.containerState.marker : code === 41 || code === 46)) {\n effects.exit(\"listItemValue\");\n return atMarker(code);\n }\n return nok(code);\n }\n\n /**\n * @type {State}\n **/\n function atMarker(code) {\n effects.enter(\"listItemMarker\");\n effects.consume(code);\n effects.exit(\"listItemMarker\");\n self.containerState.marker = self.containerState.marker || code;\n return effects.check(blankLine,\n // Can’t be empty when interrupting.\n self.interrupt ? nok : onBlank, effects.attempt(listItemPrefixWhitespaceConstruct, endOfPrefix, otherPrefix));\n }\n\n /** @type {State} */\n function onBlank(code) {\n self.containerState.initialBlankLine = true;\n initialSize++;\n return endOfPrefix(code);\n }\n\n /** @type {State} */\n function otherPrefix(code) {\n if (markdownSpace(code)) {\n effects.enter(\"listItemPrefixWhitespace\");\n effects.consume(code);\n effects.exit(\"listItemPrefixWhitespace\");\n return endOfPrefix;\n }\n return nok(code);\n }\n\n /** @type {State} */\n function endOfPrefix(code) {\n self.containerState.size = initialSize + self.sliceSerialize(effects.exit(\"listItemPrefix\"), true).length;\n return ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeListContinuation(effects, ok, nok) {\n const self = this;\n self.containerState._closeFlow = undefined;\n return effects.check(blankLine, onBlank, notBlank);\n\n /** @type {State} */\n function onBlank(code) {\n self.containerState.furtherBlankLines = self.containerState.furtherBlankLines || self.containerState.initialBlankLine;\n\n // We have a blank line.\n // Still, try to consume at most the items size.\n return factorySpace(effects, ok, \"listItemIndent\", self.containerState.size + 1)(code);\n }\n\n /** @type {State} */\n function notBlank(code) {\n if (self.containerState.furtherBlankLines || !markdownSpace(code)) {\n self.containerState.furtherBlankLines = undefined;\n self.containerState.initialBlankLine = undefined;\n return notInCurrentItem(code);\n }\n self.containerState.furtherBlankLines = undefined;\n self.containerState.initialBlankLine = undefined;\n return effects.attempt(indentConstruct, ok, notInCurrentItem)(code);\n }\n\n /** @type {State} */\n function notInCurrentItem(code) {\n // While we do continue, we signal that the flow should be closed.\n self.containerState._closeFlow = true;\n // As we’re closing flow, we’re no longer interrupting.\n self.interrupt = undefined;\n // Always populated by defaults.\n\n return factorySpace(effects, effects.attempt(list, ok, nok), \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeIndent(effects, ok, nok) {\n const self = this;\n return factorySpace(effects, afterPrefix, \"listItemIndent\", self.containerState.size + 1);\n\n /** @type {State} */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return tail && tail[1].type === \"listItemIndent\" && tail[2].sliceSerialize(tail[1], true).length === self.containerState.size ? ok(code) : nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Exiter}\n */\nfunction tokenizeListEnd(effects) {\n effects.exit(this.containerState.type);\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeListItemPrefixWhitespace(effects, ok, nok) {\n const self = this;\n\n // Always populated by defaults.\n\n return factorySpace(effects, afterPrefix, \"listItemPrefixWhitespace\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4 + 1);\n\n /** @type {State} */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return !markdownSpace(code) && tail && tail[1].type === \"listItemPrefixWhitespace\" ? ok(code) : nok(code);\n }\n}","/**\n * @import {\n * Code,\n * Construct,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const setextUnderline = {\n name: 'setextUnderline',\n resolveTo: resolveToSetextUnderline,\n tokenize: tokenizeSetextUnderline\n};\n\n/** @type {Resolver} */\nfunction resolveToSetextUnderline(events, context) {\n // To do: resolve like `markdown-rs`.\n let index = events.length;\n /** @type {number | undefined} */\n let content;\n /** @type {number | undefined} */\n let text;\n /** @type {number | undefined} */\n let definition;\n\n // Find the opening of the content.\n // It’ll always exist: we don’t tokenize if it isn’t there.\n while (index--) {\n if (events[index][0] === 'enter') {\n if (events[index][1].type === \"content\") {\n content = index;\n break;\n }\n if (events[index][1].type === \"paragraph\") {\n text = index;\n }\n }\n // Exit\n else {\n if (events[index][1].type === \"content\") {\n // Remove the content end (if needed we’ll add it later)\n events.splice(index, 1);\n }\n if (!definition && events[index][1].type === \"definition\") {\n definition = index;\n }\n }\n }\n const heading = {\n type: \"setextHeading\",\n start: {\n ...events[content][1].start\n },\n end: {\n ...events[events.length - 1][1].end\n }\n };\n\n // Change the paragraph to setext heading text.\n events[text][1].type = \"setextHeadingText\";\n\n // If we have definitions in the content, we’ll keep on having content,\n // but we need move it.\n if (definition) {\n events.splice(text, 0, ['enter', heading, context]);\n events.splice(definition + 1, 0, ['exit', events[content][1], context]);\n events[content][1].end = {\n ...events[definition][1].end\n };\n } else {\n events[content][1] = heading;\n }\n\n // Add the heading exit at the end.\n events.push(['exit', heading, context]);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeSetextUnderline(effects, ok, nok) {\n const self = this;\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * At start of heading (setext) underline.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n let index = self.events.length;\n /** @type {boolean | undefined} */\n let paragraph;\n // Find an opening.\n while (index--) {\n // Skip enter/exit of line ending, line prefix, and content.\n // We can now either have a definition or a paragraph.\n if (self.events[index][1].type !== \"lineEnding\" && self.events[index][1].type !== \"linePrefix\" && self.events[index][1].type !== \"content\") {\n paragraph = self.events[index][1].type === \"paragraph\";\n break;\n }\n }\n\n // To do: handle lazy/pierce like `markdown-rs`.\n // To do: parse indent like `markdown-rs`.\n if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {\n effects.enter(\"setextHeadingLine\");\n marker = code;\n return before(code);\n }\n return nok(code);\n }\n\n /**\n * After optional whitespace, at `-` or `=`.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function before(code) {\n effects.enter(\"setextHeadingLineSequence\");\n return inside(code);\n }\n\n /**\n * In sequence.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code);\n return inside;\n }\n effects.exit(\"setextHeadingLineSequence\");\n return markdownSpace(code) ? factorySpace(effects, after, \"lineSuffix\")(code) : after(code);\n }\n\n /**\n * After sequence, after optional whitespace.\n *\n * ```markdown\n * | aa\n * > | ==\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"setextHeadingLine\");\n return ok(code);\n }\n return nok(code);\n }\n}","/**\n * @import {\n * InitialConstruct,\n * Initializer,\n * State,\n * TokenizeContext\n * } from 'micromark-util-types'\n */\n\nimport { blankLine, content } from 'micromark-core-commonmark';\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {InitialConstruct} */\nexport const flow = {\n tokenize: initializeFlow\n};\n\n/**\n * @this {TokenizeContext}\n * Self.\n * @type {Initializer}\n * Initializer.\n */\nfunction initializeFlow(effects) {\n const self = this;\n const initial = effects.attempt(\n // Try to parse a blank line.\n blankLine, atBlankEnding,\n // Try to parse initial flow (essentially, only code).\n effects.attempt(this.parser.constructs.flowInitial, afterConstruct, factorySpace(effects, effects.attempt(this.parser.constructs.flow, afterConstruct, effects.attempt(content, afterConstruct)), \"linePrefix\")));\n return initial;\n\n /** @type {State} */\n function atBlankEnding(code) {\n if (code === null) {\n effects.consume(code);\n return;\n }\n effects.enter(\"lineEndingBlank\");\n effects.consume(code);\n effects.exit(\"lineEndingBlank\");\n self.currentConstruct = undefined;\n return initial;\n }\n\n /** @type {State} */\n function afterConstruct(code) {\n if (code === null) {\n effects.consume(code);\n return;\n }\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n self.currentConstruct = undefined;\n return initial;\n }\n}","/**\n * @import {\n * Code,\n * InitialConstruct,\n * Initializer,\n * Resolver,\n * State,\n * TokenizeContext\n * } from 'micromark-util-types'\n */\n\nexport const resolver = {\n resolveAll: createResolver()\n};\nexport const string = initializeFactory('string');\nexport const text = initializeFactory('text');\n\n/**\n * @param {'string' | 'text'} field\n * Field.\n * @returns {InitialConstruct}\n * Construct.\n */\nfunction initializeFactory(field) {\n return {\n resolveAll: createResolver(field === 'text' ? resolveAllLineSuffixes : undefined),\n tokenize: initializeText\n };\n\n /**\n * @this {TokenizeContext}\n * Context.\n * @type {Initializer}\n */\n function initializeText(effects) {\n const self = this;\n const constructs = this.parser.constructs[field];\n const text = effects.attempt(constructs, start, notText);\n return start;\n\n /** @type {State} */\n function start(code) {\n return atBreak(code) ? text(code) : notText(code);\n }\n\n /** @type {State} */\n function notText(code) {\n if (code === null) {\n effects.consume(code);\n return;\n }\n effects.enter(\"data\");\n effects.consume(code);\n return data;\n }\n\n /** @type {State} */\n function data(code) {\n if (atBreak(code)) {\n effects.exit(\"data\");\n return text(code);\n }\n\n // Data.\n effects.consume(code);\n return data;\n }\n\n /**\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether the code is a break.\n */\n function atBreak(code) {\n if (code === null) {\n return true;\n }\n const list = constructs[code];\n let index = -1;\n if (list) {\n // Always populated by defaults.\n\n while (++index < list.length) {\n const item = list[index];\n if (!item.previous || item.previous.call(self, self.previous)) {\n return true;\n }\n }\n }\n return false;\n }\n }\n}\n\n/**\n * @param {Resolver | undefined} [extraResolver]\n * Resolver.\n * @returns {Resolver}\n * Resolver.\n */\nfunction createResolver(extraResolver) {\n return resolveAllText;\n\n /** @type {Resolver} */\n function resolveAllText(events, context) {\n let index = -1;\n /** @type {number | undefined} */\n let enter;\n\n // A rather boring computation (to merge adjacent `data` events) which\n // improves mm performance by 29%.\n while (++index <= events.length) {\n if (enter === undefined) {\n if (events[index] && events[index][1].type === \"data\") {\n enter = index;\n index++;\n }\n } else if (!events[index] || events[index][1].type !== \"data\") {\n // Don’t do anything if there is one data token.\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end;\n events.splice(enter + 2, index - enter - 2);\n index = enter + 2;\n }\n enter = undefined;\n }\n }\n return extraResolver ? extraResolver(events, context) : events;\n }\n}\n\n/**\n * A rather ugly set of instructions which again looks at chunks in the input\n * stream.\n * The reason to do this here is that it is *much* faster to parse in reverse.\n * And that we can’t hook into `null` to split the line suffix before an EOF.\n * To do: figure out if we can make this into a clean utility, or even in core.\n * As it will be useful for GFMs literal autolink extension (and maybe even\n * tables?)\n *\n * @type {Resolver}\n */\nfunction resolveAllLineSuffixes(events, context) {\n let eventIndex = 0; // Skip first.\n\n while (++eventIndex <= events.length) {\n if ((eventIndex === events.length || events[eventIndex][1].type === \"lineEnding\") && events[eventIndex - 1][1].type === \"data\") {\n const data = events[eventIndex - 1][1];\n const chunks = context.sliceStream(data);\n let index = chunks.length;\n let bufferIndex = -1;\n let size = 0;\n /** @type {boolean | undefined} */\n let tabs;\n while (index--) {\n const chunk = chunks[index];\n if (typeof chunk === 'string') {\n bufferIndex = chunk.length;\n while (chunk.charCodeAt(bufferIndex - 1) === 32) {\n size++;\n bufferIndex--;\n }\n if (bufferIndex) break;\n bufferIndex = -1;\n }\n // Number\n else if (chunk === -2) {\n tabs = true;\n size++;\n } else if (chunk === -1) {\n // Empty\n } else {\n // Replacement character, exit.\n index++;\n break;\n }\n }\n\n // Allow final trailing whitespace.\n if (context._contentTypeTextTrailing && eventIndex === events.length) {\n size = 0;\n }\n if (size) {\n const token = {\n type: eventIndex === events.length || tabs || size < 2 ? \"lineSuffix\" : \"hardBreakTrailing\",\n start: {\n _bufferIndex: index ? bufferIndex : data.start._bufferIndex + bufferIndex,\n _index: data.start._index + index,\n line: data.end.line,\n column: data.end.column - size,\n offset: data.end.offset - size\n },\n end: {\n ...data.end\n }\n };\n data.end = {\n ...token.start\n };\n if (data.start.offset === data.end.offset) {\n Object.assign(data, token);\n } else {\n events.splice(eventIndex, 0, ['enter', token, context], ['exit', token, context]);\n eventIndex += 2;\n }\n }\n eventIndex++;\n }\n }\n return events;\n}","/**\n * @import {Extension} from 'micromark-util-types'\n */\n\nimport { attention, autolink, blockQuote, characterEscape, characterReference, codeFenced, codeIndented, codeText, definition, hardBreakEscape, headingAtx, htmlFlow, htmlText, labelEnd, labelStartImage, labelStartLink, lineEnding, list, setextUnderline, thematicBreak } from 'micromark-core-commonmark';\nimport { resolver as resolveText } from './initialize/text.js';\n\n/** @satisfies {Extension['document']} */\nexport const document = {\n [42]: list,\n [43]: list,\n [45]: list,\n [48]: list,\n [49]: list,\n [50]: list,\n [51]: list,\n [52]: list,\n [53]: list,\n [54]: list,\n [55]: list,\n [56]: list,\n [57]: list,\n [62]: blockQuote\n};\n\n/** @satisfies {Extension['contentInitial']} */\nexport const contentInitial = {\n [91]: definition\n};\n\n/** @satisfies {Extension['flowInitial']} */\nexport const flowInitial = {\n [-2]: codeIndented,\n [-1]: codeIndented,\n [32]: codeIndented\n};\n\n/** @satisfies {Extension['flow']} */\nexport const flow = {\n [35]: headingAtx,\n [42]: thematicBreak,\n [45]: [setextUnderline, thematicBreak],\n [60]: htmlFlow,\n [61]: setextUnderline,\n [95]: thematicBreak,\n [96]: codeFenced,\n [126]: codeFenced\n};\n\n/** @satisfies {Extension['string']} */\nexport const string = {\n [38]: characterReference,\n [92]: characterEscape\n};\n\n/** @satisfies {Extension['text']} */\nexport const text = {\n [-5]: lineEnding,\n [-4]: lineEnding,\n [-3]: lineEnding,\n [33]: labelStartImage,\n [38]: characterReference,\n [42]: attention,\n [60]: [autolink, htmlText],\n [91]: labelStartLink,\n [92]: [hardBreakEscape, characterEscape],\n [93]: labelEnd,\n [95]: attention,\n [96]: codeText\n};\n\n/** @satisfies {Extension['insideSpan']} */\nexport const insideSpan = {\n null: [attention, resolveText]\n};\n\n/** @satisfies {Extension['attentionMarkers']} */\nexport const attentionMarkers = {\n null: [42, 95]\n};\n\n/** @satisfies {Extension['disable']} */\nexport const disable = {\n null: []\n};","/**\n * @import {\n * Chunk,\n * Code,\n * ConstructRecord,\n * Construct,\n * Effects,\n * InitialConstruct,\n * ParseContext,\n * Point,\n * State,\n * TokenizeContext,\n * Token\n * } from 'micromark-util-types'\n */\n\n/**\n * @callback Restore\n * Restore the state.\n * @returns {undefined}\n * Nothing.\n *\n * @typedef Info\n * Info.\n * @property {Restore} restore\n * Restore.\n * @property {number} from\n * From.\n *\n * @callback ReturnHandle\n * Handle a successful run.\n * @param {Construct} construct\n * Construct.\n * @param {Info} info\n * Info.\n * @returns {undefined}\n * Nothing.\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\nimport { push, splice } from 'micromark-util-chunked';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/**\n * Create a tokenizer.\n * Tokenizers deal with one type of data (e.g., containers, flow, text).\n * The parser is the object dealing with it all.\n * `initialize` works like other constructs, except that only its `tokenize`\n * function is used, in which case it doesn’t receive an `ok` or `nok`.\n * `from` can be given to set the point before the first character, although\n * when further lines are indented, they must be set with `defineSkip`.\n *\n * @param {ParseContext} parser\n * Parser.\n * @param {InitialConstruct} initialize\n * Construct.\n * @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from]\n * Point (optional).\n * @returns {TokenizeContext}\n * Context.\n */\nexport function createTokenizer(parser, initialize, from) {\n /** @type {Point} */\n let point = {\n _bufferIndex: -1,\n _index: 0,\n line: from && from.line || 1,\n column: from && from.column || 1,\n offset: from && from.offset || 0\n };\n /** @type {Record<string, number>} */\n const columnStart = {};\n /** @type {Array<Construct>} */\n const resolveAllConstructs = [];\n /** @type {Array<Chunk>} */\n let chunks = [];\n /** @type {Array<Token>} */\n let stack = [];\n /** @type {boolean | undefined} */\n let consumed = true;\n\n /**\n * Tools used for tokenizing.\n *\n * @type {Effects}\n */\n const effects = {\n attempt: constructFactory(onsuccessfulconstruct),\n check: constructFactory(onsuccessfulcheck),\n consume,\n enter,\n exit,\n interrupt: constructFactory(onsuccessfulcheck, {\n interrupt: true\n })\n };\n\n /**\n * State and tools for resolving and serializing.\n *\n * @type {TokenizeContext}\n */\n const context = {\n code: null,\n containerState: {},\n defineSkip,\n events: [],\n now,\n parser,\n previous: null,\n sliceSerialize,\n sliceStream,\n write\n };\n\n /**\n * The state function.\n *\n * @type {State | undefined}\n */\n let state = initialize.tokenize.call(context, effects);\n\n /**\n * Track which character we expect to be consumed, to catch bugs.\n *\n * @type {Code}\n */\n let expectedCode;\n if (initialize.resolveAll) {\n resolveAllConstructs.push(initialize);\n }\n return context;\n\n /** @type {TokenizeContext['write']} */\n function write(slice) {\n chunks = push(chunks, slice);\n main();\n\n // Exit if we’re not done, resolve might change stuff.\n if (chunks[chunks.length - 1] !== null) {\n return [];\n }\n addResult(initialize, 0);\n\n // Otherwise, resolve, and exit.\n context.events = resolveAll(resolveAllConstructs, context.events, context);\n return context.events;\n }\n\n //\n // Tools.\n //\n\n /** @type {TokenizeContext['sliceSerialize']} */\n function sliceSerialize(token, expandTabs) {\n return serializeChunks(sliceStream(token), expandTabs);\n }\n\n /** @type {TokenizeContext['sliceStream']} */\n function sliceStream(token) {\n return sliceChunks(chunks, token);\n }\n\n /** @type {TokenizeContext['now']} */\n function now() {\n // This is a hot path, so we clone manually instead of `Object.assign({}, point)`\n const {\n _bufferIndex,\n _index,\n line,\n column,\n offset\n } = point;\n return {\n _bufferIndex,\n _index,\n line,\n column,\n offset\n };\n }\n\n /** @type {TokenizeContext['defineSkip']} */\n function defineSkip(value) {\n columnStart[value.line] = value.column;\n accountForPotentialSkip();\n }\n\n //\n // State management.\n //\n\n /**\n * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by\n * `consume`).\n * Here is where we walk through the chunks, which either include strings of\n * several characters, or numerical character codes.\n * The reason to do this in a loop instead of a call is so the stack can\n * drain.\n *\n * @returns {undefined}\n * Nothing.\n */\n function main() {\n /** @type {number} */\n let chunkIndex;\n while (point._index < chunks.length) {\n const chunk = chunks[point._index];\n\n // If we’re in a buffer chunk, loop through it.\n if (typeof chunk === 'string') {\n chunkIndex = point._index;\n if (point._bufferIndex < 0) {\n point._bufferIndex = 0;\n }\n while (point._index === chunkIndex && point._bufferIndex < chunk.length) {\n go(chunk.charCodeAt(point._bufferIndex));\n }\n } else {\n go(chunk);\n }\n }\n }\n\n /**\n * Deal with one code.\n *\n * @param {Code} code\n * Code.\n * @returns {undefined}\n * Nothing.\n */\n function go(code) {\n consumed = undefined;\n expectedCode = code;\n state = state(code);\n }\n\n /** @type {Effects['consume']} */\n function consume(code) {\n if (markdownLineEnding(code)) {\n point.line++;\n point.column = 1;\n point.offset += code === -3 ? 2 : 1;\n accountForPotentialSkip();\n } else if (code !== -1) {\n point.column++;\n point.offset++;\n }\n\n // Not in a string chunk.\n if (point._bufferIndex < 0) {\n point._index++;\n } else {\n point._bufferIndex++;\n\n // At end of string chunk.\n if (point._bufferIndex ===\n // Points w/ non-negative `_bufferIndex` reference\n // strings.\n /** @type {string} */\n chunks[point._index].length) {\n point._bufferIndex = -1;\n point._index++;\n }\n }\n\n // Expose the previous character.\n context.previous = code;\n\n // Mark as consumed.\n consumed = true;\n }\n\n /** @type {Effects['enter']} */\n function enter(type, fields) {\n /** @type {Token} */\n // @ts-expect-error Patch instead of assign required fields to help GC.\n const token = fields || {};\n token.type = type;\n token.start = now();\n context.events.push(['enter', token, context]);\n stack.push(token);\n return token;\n }\n\n /** @type {Effects['exit']} */\n function exit(type) {\n const token = stack.pop();\n token.end = now();\n context.events.push(['exit', token, context]);\n return token;\n }\n\n /**\n * Use results.\n *\n * @type {ReturnHandle}\n */\n function onsuccessfulconstruct(construct, info) {\n addResult(construct, info.from);\n }\n\n /**\n * Discard results.\n *\n * @type {ReturnHandle}\n */\n function onsuccessfulcheck(_, info) {\n info.restore();\n }\n\n /**\n * Factory to attempt/check/interrupt.\n *\n * @param {ReturnHandle} onreturn\n * Callback.\n * @param {{interrupt?: boolean | undefined} | undefined} [fields]\n * Fields.\n */\n function constructFactory(onreturn, fields) {\n return hook;\n\n /**\n * Handle either an object mapping codes to constructs, a list of\n * constructs, or a single construct.\n *\n * @param {Array<Construct> | ConstructRecord | Construct} constructs\n * Constructs.\n * @param {State} returnState\n * State.\n * @param {State | undefined} [bogusState]\n * State.\n * @returns {State}\n * State.\n */\n function hook(constructs, returnState, bogusState) {\n /** @type {ReadonlyArray<Construct>} */\n let listOfConstructs;\n /** @type {number} */\n let constructIndex;\n /** @type {Construct} */\n let currentConstruct;\n /** @type {Info} */\n let info;\n return Array.isArray(constructs) ? /* c8 ignore next 1 */\n handleListOfConstructs(constructs) : 'tokenize' in constructs ?\n // Looks like a construct.\n handleListOfConstructs([(/** @type {Construct} */constructs)]) : handleMapOfConstructs(constructs);\n\n /**\n * Handle a list of construct.\n *\n * @param {ConstructRecord} map\n * Constructs.\n * @returns {State}\n * State.\n */\n function handleMapOfConstructs(map) {\n return start;\n\n /** @type {State} */\n function start(code) {\n const left = code !== null && map[code];\n const all = code !== null && map.null;\n const list = [\n // To do: add more extension tests.\n /* c8 ignore next 2 */\n ...(Array.isArray(left) ? left : left ? [left] : []), ...(Array.isArray(all) ? all : all ? [all] : [])];\n return handleListOfConstructs(list)(code);\n }\n }\n\n /**\n * Handle a list of construct.\n *\n * @param {ReadonlyArray<Construct>} list\n * Constructs.\n * @returns {State}\n * State.\n */\n function handleListOfConstructs(list) {\n listOfConstructs = list;\n constructIndex = 0;\n if (list.length === 0) {\n return bogusState;\n }\n return handleConstruct(list[constructIndex]);\n }\n\n /**\n * Handle a single construct.\n *\n * @param {Construct} construct\n * Construct.\n * @returns {State}\n * State.\n */\n function handleConstruct(construct) {\n return start;\n\n /** @type {State} */\n function start(code) {\n // To do: not needed to store if there is no bogus state, probably?\n // Currently doesn’t work because `inspect` in document does a check\n // w/o a bogus, which doesn’t make sense. But it does seem to help perf\n // by not storing.\n info = store();\n currentConstruct = construct;\n if (!construct.partial) {\n context.currentConstruct = construct;\n }\n\n // Always populated by defaults.\n\n if (construct.name && context.parser.constructs.disable.null.includes(construct.name)) {\n return nok(code);\n }\n return construct.tokenize.call(\n // If we do have fields, create an object w/ `context` as its\n // prototype.\n // This allows a “live binding”, which is needed for `interrupt`.\n fields ? Object.assign(Object.create(context), fields) : context, effects, ok, nok)(code);\n }\n }\n\n /** @type {State} */\n function ok(code) {\n consumed = true;\n onreturn(currentConstruct, info);\n return returnState;\n }\n\n /** @type {State} */\n function nok(code) {\n consumed = true;\n info.restore();\n if (++constructIndex < listOfConstructs.length) {\n return handleConstruct(listOfConstructs[constructIndex]);\n }\n return bogusState;\n }\n }\n }\n\n /**\n * @param {Construct} construct\n * Construct.\n * @param {number} from\n * From.\n * @returns {undefined}\n * Nothing.\n */\n function addResult(construct, from) {\n if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {\n resolveAllConstructs.push(construct);\n }\n if (construct.resolve) {\n splice(context.events, from, context.events.length - from, construct.resolve(context.events.slice(from), context));\n }\n if (construct.resolveTo) {\n context.events = construct.resolveTo(context.events, context);\n }\n }\n\n /**\n * Store state.\n *\n * @returns {Info}\n * Info.\n */\n function store() {\n const startPoint = now();\n const startPrevious = context.previous;\n const startCurrentConstruct = context.currentConstruct;\n const startEventsIndex = context.events.length;\n const startStack = Array.from(stack);\n return {\n from: startEventsIndex,\n restore\n };\n\n /**\n * Restore state.\n *\n * @returns {undefined}\n * Nothing.\n */\n function restore() {\n point = startPoint;\n context.previous = startPrevious;\n context.currentConstruct = startCurrentConstruct;\n context.events.length = startEventsIndex;\n stack = startStack;\n accountForPotentialSkip();\n }\n }\n\n /**\n * Move the current point a bit forward in the line when it’s on a column\n * skip.\n *\n * @returns {undefined}\n * Nothing.\n */\n function accountForPotentialSkip() {\n if (point.line in columnStart && point.column < 2) {\n point.column = columnStart[point.line];\n point.offset += columnStart[point.line] - 1;\n }\n }\n}\n\n/**\n * Get the chunks from a slice of chunks in the range of a token.\n *\n * @param {ReadonlyArray<Chunk>} chunks\n * Chunks.\n * @param {Pick<Token, 'end' | 'start'>} token\n * Token.\n * @returns {Array<Chunk>}\n * Chunks.\n */\nfunction sliceChunks(chunks, token) {\n const startIndex = token.start._index;\n const startBufferIndex = token.start._bufferIndex;\n const endIndex = token.end._index;\n const endBufferIndex = token.end._bufferIndex;\n /** @type {Array<Chunk>} */\n let view;\n if (startIndex === endIndex) {\n // @ts-expect-error `_bufferIndex` is used on string chunks.\n view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)];\n } else {\n view = chunks.slice(startIndex, endIndex);\n if (startBufferIndex > -1) {\n const head = view[0];\n if (typeof head === 'string') {\n view[0] = head.slice(startBufferIndex);\n /* c8 ignore next 4 -- used to be used, no longer */\n } else {\n view.shift();\n }\n }\n if (endBufferIndex > 0) {\n // @ts-expect-error `_bufferIndex` is used on string chunks.\n view.push(chunks[endIndex].slice(0, endBufferIndex));\n }\n }\n return view;\n}\n\n/**\n * Get the string value of a slice of chunks.\n *\n * @param {ReadonlyArray<Chunk>} chunks\n * Chunks.\n * @param {boolean | undefined} [expandTabs=false]\n * Whether to expand tabs (default: `false`).\n * @returns {string}\n * Result.\n */\nfunction serializeChunks(chunks, expandTabs) {\n let index = -1;\n /** @type {Array<string>} */\n const result = [];\n /** @type {boolean | undefined} */\n let atTab;\n while (++index < chunks.length) {\n const chunk = chunks[index];\n /** @type {string} */\n let value;\n if (typeof chunk === 'string') {\n value = chunk;\n } else switch (chunk) {\n case -5:\n {\n value = \"\\r\";\n break;\n }\n case -4:\n {\n value = \"\\n\";\n break;\n }\n case -3:\n {\n value = \"\\r\" + \"\\n\";\n break;\n }\n case -2:\n {\n value = expandTabs ? \" \" : \"\\t\";\n break;\n }\n case -1:\n {\n if (!expandTabs && atTab) continue;\n value = \" \";\n break;\n }\n default:\n {\n // Currently only replacement character.\n value = String.fromCharCode(chunk);\n }\n }\n atTab = chunk === -2;\n result.push(value);\n }\n return result.join('');\n}","/**\n * @import {\n * Create,\n * FullNormalizedExtension,\n * InitialConstruct,\n * ParseContext,\n * ParseOptions\n * } from 'micromark-util-types'\n */\n\nimport { combineExtensions } from 'micromark-util-combine-extensions';\nimport { content } from './initialize/content.js';\nimport { document } from './initialize/document.js';\nimport { flow } from './initialize/flow.js';\nimport { string, text } from './initialize/text.js';\nimport * as defaultConstructs from './constructs.js';\nimport { createTokenizer } from './create-tokenizer.js';\n\n/**\n * @param {ParseOptions | null | undefined} [options]\n * Configuration (optional).\n * @returns {ParseContext}\n * Parser.\n */\nexport function parse(options) {\n const settings = options || {};\n const constructs = /** @type {FullNormalizedExtension} */\n combineExtensions([defaultConstructs, ...(settings.extensions || [])]);\n\n /** @type {ParseContext} */\n const parser = {\n constructs,\n content: create(content),\n defined: [],\n document: create(document),\n flow: create(flow),\n lazy: {},\n string: create(string),\n text: create(text)\n };\n return parser;\n\n /**\n * @param {InitialConstruct} initial\n * Construct to start with.\n * @returns {Create}\n * Create a tokenizer.\n */\n function create(initial) {\n return creator;\n /** @type {Create} */\n function creator(from) {\n return createTokenizer(parser, initial, from);\n }\n }\n}","/**\n * @import {Event} from 'micromark-util-types'\n */\n\nimport { subtokenize } from 'micromark-util-subtokenize';\n\n/**\n * @param {Array<Event>} events\n * Events.\n * @returns {Array<Event>}\n * Events.\n */\nexport function postprocess(events) {\n while (!subtokenize(events)) {\n // Empty\n }\n return events;\n}","/**\n * @import {Chunk, Code, Encoding, Value} from 'micromark-util-types'\n */\n\n/**\n * @callback Preprocessor\n * Preprocess a value.\n * @param {Value} value\n * Value.\n * @param {Encoding | null | undefined} [encoding]\n * Encoding when `value` is a typed array (optional).\n * @param {boolean | null | undefined} [end=false]\n * Whether this is the last chunk (default: `false`).\n * @returns {Array<Chunk>}\n * Chunks.\n */\n\nconst search = /[\\0\\t\\n\\r]/g;\n\n/**\n * @returns {Preprocessor}\n * Preprocess a value.\n */\nexport function preprocess() {\n let column = 1;\n let buffer = '';\n /** @type {boolean | undefined} */\n let start = true;\n /** @type {boolean | undefined} */\n let atCarriageReturn;\n return preprocessor;\n\n /** @type {Preprocessor} */\n // eslint-disable-next-line complexity\n function preprocessor(value, encoding, end) {\n /** @type {Array<Chunk>} */\n const chunks = [];\n /** @type {RegExpMatchArray | null} */\n let match;\n /** @type {number} */\n let next;\n /** @type {number} */\n let startPosition;\n /** @type {number} */\n let endPosition;\n /** @type {Code} */\n let code;\n value = buffer + (typeof value === 'string' ? value.toString() : new TextDecoder(encoding || undefined).decode(value));\n startPosition = 0;\n buffer = '';\n if (start) {\n // To do: `markdown-rs` actually parses BOMs (byte order mark).\n if (value.charCodeAt(0) === 65279) {\n startPosition++;\n }\n start = undefined;\n }\n while (startPosition < value.length) {\n search.lastIndex = startPosition;\n match = search.exec(value);\n endPosition = match && match.index !== undefined ? match.index : value.length;\n code = value.charCodeAt(endPosition);\n if (!match) {\n buffer = value.slice(startPosition);\n break;\n }\n if (code === 10 && startPosition === endPosition && atCarriageReturn) {\n chunks.push(-3);\n atCarriageReturn = undefined;\n } else {\n if (atCarriageReturn) {\n chunks.push(-5);\n atCarriageReturn = undefined;\n }\n if (startPosition < endPosition) {\n chunks.push(value.slice(startPosition, endPosition));\n column += endPosition - startPosition;\n }\n switch (code) {\n case 0:\n {\n chunks.push(65533);\n column++;\n break;\n }\n case 9:\n {\n next = Math.ceil(column / 4) * 4;\n chunks.push(-2);\n while (column++ < next) chunks.push(-1);\n break;\n }\n case 10:\n {\n chunks.push(-4);\n column = 1;\n break;\n }\n default:\n {\n atCarriageReturn = true;\n column = 1;\n }\n }\n }\n startPosition = endPosition + 1;\n }\n if (end) {\n if (atCarriageReturn) chunks.push(-5);\n if (buffer) chunks.push(buffer);\n chunks.push(null);\n }\n return chunks;\n }\n}","import { decodeNamedCharacterReference } from 'decode-named-character-reference';\nimport { decodeNumericCharacterReference } from 'micromark-util-decode-numeric-character-reference';\nconst characterEscapeOrReference = /\\\\([!-/:-@[-`{-~])|&(#(?:\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi;\n\n/**\n * Decode markdown strings (which occur in places such as fenced code info\n * strings, destinations, labels, and titles).\n *\n * The “string” content type allows character escapes and -references.\n * This decodes those.\n *\n * @param {string} value\n * Value to decode.\n * @returns {string}\n * Decoded value.\n */\nexport function decodeString(value) {\n return value.replace(characterEscapeOrReference, decode);\n}\n\n/**\n * @param {string} $0\n * Match.\n * @param {string} $1\n * Character escape.\n * @param {string} $2\n * Character reference.\n * @returns {string}\n * Decoded value\n */\nfunction decode($0, $1, $2) {\n if ($1) {\n // Escape.\n return $1;\n }\n\n // Reference.\n const head = $2.charCodeAt(0);\n if (head === 35) {\n const head = $2.charCodeAt(1);\n const hex = head === 120 || head === 88;\n return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10);\n }\n return decodeNamedCharacterReference($2) || $0;\n}","/**\n * @import {\n * Break,\n * Blockquote,\n * Code,\n * Definition,\n * Emphasis,\n * Heading,\n * Html,\n * Image,\n * InlineCode,\n * Link,\n * ListItem,\n * List,\n * Nodes,\n * Paragraph,\n * PhrasingContent,\n * ReferenceType,\n * Root,\n * Strong,\n * Text,\n * ThematicBreak\n * } from 'mdast'\n * @import {\n * Encoding,\n * Event,\n * Token,\n * Value\n * } from 'micromark-util-types'\n * @import {Point} from 'unist'\n * @import {\n * CompileContext,\n * CompileData,\n * Config,\n * Extension,\n * Handle,\n * OnEnterError,\n * Options\n * } from './types.js'\n */\n\nimport { toString } from 'mdast-util-to-string';\nimport { parse, postprocess, preprocess } from 'micromark';\nimport { decodeNumericCharacterReference } from 'micromark-util-decode-numeric-character-reference';\nimport { decodeString } from 'micromark-util-decode-string';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nimport { decodeNamedCharacterReference } from 'decode-named-character-reference';\nimport { stringifyPosition } from 'unist-util-stringify-position';\nconst own = {}.hasOwnProperty;\n\n/**\n * Turn markdown into a syntax tree.\n *\n * @overload\n * @param {Value} value\n * @param {Encoding | null | undefined} [encoding]\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n *\n * @overload\n * @param {Value} value\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n *\n * @param {Value} value\n * Markdown to parse.\n * @param {Encoding | Options | null | undefined} [encoding]\n * Character encoding for when `value` is `Buffer`.\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {Root}\n * mdast tree.\n */\nexport function fromMarkdown(value, encoding, options) {\n if (encoding && typeof encoding === 'object') {\n options = encoding;\n encoding = undefined;\n }\n return compiler(options)(postprocess(parse(options).document().write(preprocess()(value, encoding, true))));\n}\n\n/**\n * Note this compiler only understand complete buffering, not streaming.\n *\n * @param {Options | null | undefined} [options]\n */\nfunction compiler(options) {\n /** @type {Config} */\n const config = {\n transforms: [],\n canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],\n enter: {\n autolink: opener(link),\n autolinkProtocol: onenterdata,\n autolinkEmail: onenterdata,\n atxHeading: opener(heading),\n blockQuote: opener(blockQuote),\n characterEscape: onenterdata,\n characterReference: onenterdata,\n codeFenced: opener(codeFlow),\n codeFencedFenceInfo: buffer,\n codeFencedFenceMeta: buffer,\n codeIndented: opener(codeFlow, buffer),\n codeText: opener(codeText, buffer),\n codeTextData: onenterdata,\n data: onenterdata,\n codeFlowValue: onenterdata,\n definition: opener(definition),\n definitionDestinationString: buffer,\n definitionLabelString: buffer,\n definitionTitleString: buffer,\n emphasis: opener(emphasis),\n hardBreakEscape: opener(hardBreak),\n hardBreakTrailing: opener(hardBreak),\n htmlFlow: opener(html, buffer),\n htmlFlowData: onenterdata,\n htmlText: opener(html, buffer),\n htmlTextData: onenterdata,\n image: opener(image),\n label: buffer,\n link: opener(link),\n listItem: opener(listItem),\n listItemValue: onenterlistitemvalue,\n listOrdered: opener(list, onenterlistordered),\n listUnordered: opener(list),\n paragraph: opener(paragraph),\n reference: onenterreference,\n referenceString: buffer,\n resourceDestinationString: buffer,\n resourceTitleString: buffer,\n setextHeading: opener(heading),\n strong: opener(strong),\n thematicBreak: opener(thematicBreak)\n },\n exit: {\n atxHeading: closer(),\n atxHeadingSequence: onexitatxheadingsequence,\n autolink: closer(),\n autolinkEmail: onexitautolinkemail,\n autolinkProtocol: onexitautolinkprotocol,\n blockQuote: closer(),\n characterEscapeValue: onexitdata,\n characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,\n characterReferenceMarkerNumeric: onexitcharacterreferencemarker,\n characterReferenceValue: onexitcharacterreferencevalue,\n characterReference: onexitcharacterreference,\n codeFenced: closer(onexitcodefenced),\n codeFencedFence: onexitcodefencedfence,\n codeFencedFenceInfo: onexitcodefencedfenceinfo,\n codeFencedFenceMeta: onexitcodefencedfencemeta,\n codeFlowValue: onexitdata,\n codeIndented: closer(onexitcodeindented),\n codeText: closer(onexitcodetext),\n codeTextData: onexitdata,\n data: onexitdata,\n definition: closer(),\n definitionDestinationString: onexitdefinitiondestinationstring,\n definitionLabelString: onexitdefinitionlabelstring,\n definitionTitleString: onexitdefinitiontitlestring,\n emphasis: closer(),\n hardBreakEscape: closer(onexithardbreak),\n hardBreakTrailing: closer(onexithardbreak),\n htmlFlow: closer(onexithtmlflow),\n htmlFlowData: onexitdata,\n htmlText: closer(onexithtmltext),\n htmlTextData: onexitdata,\n image: closer(onexitimage),\n label: onexitlabel,\n labelText: onexitlabeltext,\n lineEnding: onexitlineending,\n link: closer(onexitlink),\n listItem: closer(),\n listOrdered: closer(),\n listUnordered: closer(),\n paragraph: closer(),\n referenceString: onexitreferencestring,\n resourceDestinationString: onexitresourcedestinationstring,\n resourceTitleString: onexitresourcetitlestring,\n resource: onexitresource,\n setextHeading: closer(onexitsetextheading),\n setextHeadingLineSequence: onexitsetextheadinglinesequence,\n setextHeadingText: onexitsetextheadingtext,\n strong: closer(),\n thematicBreak: closer()\n }\n };\n configure(config, (options || {}).mdastExtensions || []);\n\n /** @type {CompileData} */\n const data = {};\n return compile;\n\n /**\n * Turn micromark events into an mdast tree.\n *\n * @param {Array<Event>} events\n * Events.\n * @returns {Root}\n * mdast tree.\n */\n function compile(events) {\n /** @type {Root} */\n let tree = {\n type: 'root',\n children: []\n };\n /** @type {Omit<CompileContext, 'sliceSerialize'>} */\n const context = {\n stack: [tree],\n tokenStack: [],\n config,\n enter,\n exit,\n buffer,\n resume,\n data\n };\n /** @type {Array<number>} */\n const listStack = [];\n let index = -1;\n while (++index < events.length) {\n // We preprocess lists to add `listItem` tokens, and to infer whether\n // items the list itself are spread out.\n if (events[index][1].type === \"listOrdered\" || events[index][1].type === \"listUnordered\") {\n if (events[index][0] === 'enter') {\n listStack.push(index);\n } else {\n const tail = listStack.pop();\n index = prepareList(events, tail, index);\n }\n }\n }\n index = -1;\n while (++index < events.length) {\n const handler = config[events[index][0]];\n if (own.call(handler, events[index][1].type)) {\n handler[events[index][1].type].call(Object.assign({\n sliceSerialize: events[index][2].sliceSerialize\n }, context), events[index][1]);\n }\n }\n\n // Handle tokens still being open.\n if (context.tokenStack.length > 0) {\n const tail = context.tokenStack[context.tokenStack.length - 1];\n const handler = tail[1] || defaultOnError;\n handler.call(context, undefined, tail[0]);\n }\n\n // Figure out `root` position.\n tree.position = {\n start: point(events.length > 0 ? events[0][1].start : {\n line: 1,\n column: 1,\n offset: 0\n }),\n end: point(events.length > 0 ? events[events.length - 2][1].end : {\n line: 1,\n column: 1,\n offset: 0\n })\n };\n\n // Call transforms.\n index = -1;\n while (++index < config.transforms.length) {\n tree = config.transforms[index](tree) || tree;\n }\n return tree;\n }\n\n /**\n * @param {Array<Event>} events\n * @param {number} start\n * @param {number} length\n * @returns {number}\n */\n function prepareList(events, start, length) {\n let index = start - 1;\n let containerBalance = -1;\n let listSpread = false;\n /** @type {Token | undefined} */\n let listItem;\n /** @type {number | undefined} */\n let lineIndex;\n /** @type {number | undefined} */\n let firstBlankLineIndex;\n /** @type {boolean | undefined} */\n let atMarker;\n while (++index <= length) {\n const event = events[index];\n switch (event[1].type) {\n case \"listUnordered\":\n case \"listOrdered\":\n case \"blockQuote\":\n {\n if (event[0] === 'enter') {\n containerBalance++;\n } else {\n containerBalance--;\n }\n atMarker = undefined;\n break;\n }\n case \"lineEndingBlank\":\n {\n if (event[0] === 'enter') {\n if (listItem && !atMarker && !containerBalance && !firstBlankLineIndex) {\n firstBlankLineIndex = index;\n }\n atMarker = undefined;\n }\n break;\n }\n case \"linePrefix\":\n case \"listItemValue\":\n case \"listItemMarker\":\n case \"listItemPrefix\":\n case \"listItemPrefixWhitespace\":\n {\n // Empty.\n\n break;\n }\n default:\n {\n atMarker = undefined;\n }\n }\n if (!containerBalance && event[0] === 'enter' && event[1].type === \"listItemPrefix\" || containerBalance === -1 && event[0] === 'exit' && (event[1].type === \"listUnordered\" || event[1].type === \"listOrdered\")) {\n if (listItem) {\n let tailIndex = index;\n lineIndex = undefined;\n while (tailIndex--) {\n const tailEvent = events[tailIndex];\n if (tailEvent[1].type === \"lineEnding\" || tailEvent[1].type === \"lineEndingBlank\") {\n if (tailEvent[0] === 'exit') continue;\n if (lineIndex) {\n events[lineIndex][1].type = \"lineEndingBlank\";\n listSpread = true;\n }\n tailEvent[1].type = \"lineEnding\";\n lineIndex = tailIndex;\n } else if (tailEvent[1].type === \"linePrefix\" || tailEvent[1].type === \"blockQuotePrefix\" || tailEvent[1].type === \"blockQuotePrefixWhitespace\" || tailEvent[1].type === \"blockQuoteMarker\" || tailEvent[1].type === \"listItemIndent\") {\n // Empty\n } else {\n break;\n }\n }\n if (firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex)) {\n listItem._spread = true;\n }\n\n // Fix position.\n listItem.end = Object.assign({}, lineIndex ? events[lineIndex][1].start : event[1].end);\n events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]);\n index++;\n length++;\n }\n\n // Create a new list item.\n if (event[1].type === \"listItemPrefix\") {\n /** @type {Token} */\n const item = {\n type: 'listItem',\n _spread: false,\n start: Object.assign({}, event[1].start),\n // @ts-expect-error: we’ll add `end` in a second.\n end: undefined\n };\n listItem = item;\n events.splice(index, 0, ['enter', item, event[2]]);\n index++;\n length++;\n firstBlankLineIndex = undefined;\n atMarker = true;\n }\n }\n }\n events[start][1]._spread = listSpread;\n return length;\n }\n\n /**\n * Create an opener handle.\n *\n * @param {(token: Token) => Nodes} create\n * Create a node.\n * @param {Handle | undefined} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function opener(create, and) {\n return open;\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {undefined}\n */\n function open(token) {\n enter.call(this, create(token), token);\n if (and) and.call(this, token);\n }\n }\n\n /**\n * @type {CompileContext['buffer']}\n */\n function buffer() {\n this.stack.push({\n type: 'fragment',\n children: []\n });\n }\n\n /**\n * @type {CompileContext['enter']}\n */\n function enter(node, token, errorHandler) {\n const parent = this.stack[this.stack.length - 1];\n /** @type {Array<Nodes>} */\n const siblings = parent.children;\n siblings.push(node);\n this.stack.push(node);\n this.tokenStack.push([token, errorHandler || undefined]);\n node.position = {\n start: point(token.start),\n // @ts-expect-error: `end` will be patched later.\n end: undefined\n };\n }\n\n /**\n * Create a closer handle.\n *\n * @param {Handle | undefined} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function closer(and) {\n return close;\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {undefined}\n */\n function close(token) {\n if (and) and.call(this, token);\n exit.call(this, token);\n }\n }\n\n /**\n * @type {CompileContext['exit']}\n */\n function exit(token, onExitError) {\n const node = this.stack.pop();\n const open = this.tokenStack.pop();\n if (!open) {\n throw new Error('Cannot close `' + token.type + '` (' + stringifyPosition({\n start: token.start,\n end: token.end\n }) + '): it’s not open');\n } else if (open[0].type !== token.type) {\n if (onExitError) {\n onExitError.call(this, token, open[0]);\n } else {\n const handler = open[1] || defaultOnError;\n handler.call(this, token, open[0]);\n }\n }\n node.position.end = point(token.end);\n }\n\n /**\n * @type {CompileContext['resume']}\n */\n function resume() {\n return toString(this.stack.pop());\n }\n\n //\n // Handlers.\n //\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistordered() {\n this.data.expectingFirstListItemValue = true;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistitemvalue(token) {\n if (this.data.expectingFirstListItemValue) {\n const ancestor = this.stack[this.stack.length - 2];\n ancestor.start = Number.parseInt(this.sliceSerialize(token), 10);\n this.data.expectingFirstListItemValue = undefined;\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfenceinfo() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.lang = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfencemeta() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.meta = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfence() {\n // Exit if this is the closing fence.\n if (this.data.flowCodeInside) return;\n this.buffer();\n this.data.flowCodeInside = true;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefenced() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g, '');\n this.data.flowCodeInside = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodeindented() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data.replace(/(\\r?\\n|\\r)$/g, '');\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitionlabelstring(token) {\n const label = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.label = label;\n node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase();\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiontitlestring() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.title = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiondestinationstring() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.url = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitatxheadingsequence(token) {\n const node = this.stack[this.stack.length - 1];\n if (!node.depth) {\n const depth = this.sliceSerialize(token).length;\n node.depth = depth;\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadingtext() {\n this.data.setextHeadingSlurpLineEnding = true;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadinglinesequence(token) {\n const node = this.stack[this.stack.length - 1];\n node.depth = this.sliceSerialize(token).codePointAt(0) === 61 ? 1 : 2;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheading() {\n this.data.setextHeadingSlurpLineEnding = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterdata(token) {\n const node = this.stack[this.stack.length - 1];\n /** @type {Array<Nodes>} */\n const siblings = node.children;\n let tail = siblings[siblings.length - 1];\n if (!tail || tail.type !== 'text') {\n // Add a new text node.\n tail = text();\n tail.position = {\n start: point(token.start),\n // @ts-expect-error: we’ll add `end` later.\n end: undefined\n };\n siblings.push(tail);\n }\n this.stack.push(tail);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitdata(token) {\n const tail = this.stack.pop();\n tail.value += this.sliceSerialize(token);\n tail.position.end = point(token.end);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlineending(token) {\n const context = this.stack[this.stack.length - 1];\n // If we’re at a hard break, include the line ending in there.\n if (this.data.atHardBreak) {\n const tail = context.children[context.children.length - 1];\n tail.position.end = point(token.end);\n this.data.atHardBreak = undefined;\n return;\n }\n if (!this.data.setextHeadingSlurpLineEnding && config.canContainEols.includes(context.type)) {\n onenterdata.call(this, token);\n onexitdata.call(this, token);\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithardbreak() {\n this.data.atHardBreak = true;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmlflow() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmltext() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcodetext() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.value = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlink() {\n const node = this.stack[this.stack.length - 1];\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n\n // To do: clean.\n if (this.data.inReference) {\n /** @type {ReferenceType} */\n const referenceType = this.data.referenceType || 'shortcut';\n node.type += 'Reference';\n // @ts-expect-error: mutate.\n node.referenceType = referenceType;\n // @ts-expect-error: mutate.\n delete node.url;\n delete node.title;\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier;\n // @ts-expect-error: mutate.\n delete node.label;\n }\n this.data.referenceType = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitimage() {\n const node = this.stack[this.stack.length - 1];\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n\n // To do: clean.\n if (this.data.inReference) {\n /** @type {ReferenceType} */\n const referenceType = this.data.referenceType || 'shortcut';\n node.type += 'Reference';\n // @ts-expect-error: mutate.\n node.referenceType = referenceType;\n // @ts-expect-error: mutate.\n delete node.url;\n delete node.title;\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier;\n // @ts-expect-error: mutate.\n delete node.label;\n }\n this.data.referenceType = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabeltext(token) {\n const string = this.sliceSerialize(token);\n const ancestor = this.stack[this.stack.length - 2];\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n ancestor.label = decodeString(string);\n // @ts-expect-error: same as above.\n ancestor.identifier = normalizeIdentifier(string).toLowerCase();\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabel() {\n const fragment = this.stack[this.stack.length - 1];\n const value = this.resume();\n const node = this.stack[this.stack.length - 1];\n // Assume a reference.\n this.data.inReference = true;\n if (node.type === 'link') {\n /** @type {Array<PhrasingContent>} */\n const children = fragment.children;\n node.children = children;\n } else {\n node.alt = value;\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcedestinationstring() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.url = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcetitlestring() {\n const data = this.resume();\n const node = this.stack[this.stack.length - 1];\n node.title = data;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresource() {\n this.data.inReference = undefined;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterreference() {\n this.data.referenceType = 'collapsed';\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitreferencestring(token) {\n const label = this.resume();\n const node = this.stack[this.stack.length - 1];\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n node.label = label;\n // @ts-expect-error: same as above.\n node.identifier = normalizeIdentifier(this.sliceSerialize(token)).toLowerCase();\n this.data.referenceType = 'full';\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcharacterreferencemarker(token) {\n this.data.characterReferenceType = token.type;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreferencevalue(token) {\n const data = this.sliceSerialize(token);\n const type = this.data.characterReferenceType;\n /** @type {string} */\n let value;\n if (type) {\n value = decodeNumericCharacterReference(data, type === \"characterReferenceMarkerNumeric\" ? 10 : 16);\n this.data.characterReferenceType = undefined;\n } else {\n const result = decodeNamedCharacterReference(data);\n value = result;\n }\n const tail = this.stack[this.stack.length - 1];\n tail.value += value;\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreference(token) {\n const tail = this.stack.pop();\n tail.position.end = point(token.end);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkprotocol(token) {\n onexitdata.call(this, token);\n const node = this.stack[this.stack.length - 1];\n node.url = this.sliceSerialize(token);\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkemail(token) {\n onexitdata.call(this, token);\n const node = this.stack[this.stack.length - 1];\n node.url = 'mailto:' + this.sliceSerialize(token);\n }\n\n //\n // Creaters.\n //\n\n /** @returns {Blockquote} */\n function blockQuote() {\n return {\n type: 'blockquote',\n children: []\n };\n }\n\n /** @returns {Code} */\n function codeFlow() {\n return {\n type: 'code',\n lang: null,\n meta: null,\n value: ''\n };\n }\n\n /** @returns {InlineCode} */\n function codeText() {\n return {\n type: 'inlineCode',\n value: ''\n };\n }\n\n /** @returns {Definition} */\n function definition() {\n return {\n type: 'definition',\n identifier: '',\n label: null,\n title: null,\n url: ''\n };\n }\n\n /** @returns {Emphasis} */\n function emphasis() {\n return {\n type: 'emphasis',\n children: []\n };\n }\n\n /** @returns {Heading} */\n function heading() {\n return {\n type: 'heading',\n // @ts-expect-error `depth` will be set later.\n depth: 0,\n children: []\n };\n }\n\n /** @returns {Break} */\n function hardBreak() {\n return {\n type: 'break'\n };\n }\n\n /** @returns {Html} */\n function html() {\n return {\n type: 'html',\n value: ''\n };\n }\n\n /** @returns {Image} */\n function image() {\n return {\n type: 'image',\n title: null,\n url: '',\n alt: null\n };\n }\n\n /** @returns {Link} */\n function link() {\n return {\n type: 'link',\n title: null,\n url: '',\n children: []\n };\n }\n\n /**\n * @param {Token} token\n * @returns {List}\n */\n function list(token) {\n return {\n type: 'list',\n ordered: token.type === 'listOrdered',\n start: null,\n spread: token._spread,\n children: []\n };\n }\n\n /**\n * @param {Token} token\n * @returns {ListItem}\n */\n function listItem(token) {\n return {\n type: 'listItem',\n spread: token._spread,\n checked: null,\n children: []\n };\n }\n\n /** @returns {Paragraph} */\n function paragraph() {\n return {\n type: 'paragraph',\n children: []\n };\n }\n\n /** @returns {Strong} */\n function strong() {\n return {\n type: 'strong',\n children: []\n };\n }\n\n /** @returns {Text} */\n function text() {\n return {\n type: 'text',\n value: ''\n };\n }\n\n /** @returns {ThematicBreak} */\n function thematicBreak() {\n return {\n type: 'thematicBreak'\n };\n }\n}\n\n/**\n * Copy a point-like value.\n *\n * @param {Point} d\n * Point-like value.\n * @returns {Point}\n * unist point.\n */\nfunction point(d) {\n return {\n line: d.line,\n column: d.column,\n offset: d.offset\n };\n}\n\n/**\n * @param {Config} combined\n * @param {Array<Array<Extension> | Extension>} extensions\n * @returns {undefined}\n */\nfunction configure(combined, extensions) {\n let index = -1;\n while (++index < extensions.length) {\n const value = extensions[index];\n if (Array.isArray(value)) {\n configure(combined, value);\n } else {\n extension(combined, value);\n }\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Extension} extension\n * @returns {undefined}\n */\nfunction extension(combined, extension) {\n /** @type {keyof Extension} */\n let key;\n for (key in extension) {\n if (own.call(extension, key)) {\n switch (key) {\n case 'canContainEols':\n {\n const right = extension[key];\n if (right) {\n combined[key].push(...right);\n }\n break;\n }\n case 'transforms':\n {\n const right = extension[key];\n if (right) {\n combined[key].push(...right);\n }\n break;\n }\n case 'enter':\n case 'exit':\n {\n const right = extension[key];\n if (right) {\n Object.assign(combined[key], right);\n }\n break;\n }\n // No default\n }\n }\n }\n}\n\n/** @type {OnEnterError} */\nfunction defaultOnError(left, right) {\n if (left) {\n throw new Error('Cannot close `' + left.type + '` (' + stringifyPosition({\n start: left.start,\n end: left.end\n }) + '): a different token (`' + right.type + '`, ' + stringifyPosition({\n start: right.start,\n end: right.end\n }) + ') is open');\n } else {\n throw new Error('Cannot close document, a token (`' + right.type + '`, ' + stringifyPosition({\n start: right.start,\n end: right.end\n }) + ') is still open');\n }\n}","/**\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions\n * @typedef {import('unified').Parser<Root>} Parser\n * @typedef {import('unified').Processor<Root>} Processor\n */\n\n/**\n * @typedef {Omit<FromMarkdownOptions, 'extensions' | 'mdastExtensions'>} Options\n */\n\nimport {fromMarkdown} from 'mdast-util-from-markdown'\n\n/**\n * Aadd support for parsing from markdown.\n *\n * @param {Readonly<Options> | null | undefined} [options]\n * Configuration (optional).\n * @returns {undefined}\n * Nothing.\n */\nexport default function remarkParse(options) {\n /** @type {Processor} */\n // @ts-expect-error: TS in JSDoc generates wrong types if `this` is typed regularly.\n const self = this\n\n self.parser = parser\n\n /**\n * @type {Parser}\n */\n function parser(doc) {\n return fromMarkdown(doc, {\n ...self.data('settings'),\n ...options,\n // Note: these options are not in the readme.\n // The goal is for them to be set by plugins on `data` instead of being\n // passed by users.\n extensions: self.data('micromarkExtensions') || [],\n mdastExtensions: self.data('fromMarkdownExtensions') || []\n })\n }\n}\n","/**\n * @import {Element} from 'hast'\n * @import {Blockquote} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `blockquote` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Blockquote} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function blockquote(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'blockquote',\n properties: {},\n children: state.wrap(state.all(node), true)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Element, Text} from 'hast'\n * @import {Break} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `break` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Break} node\n * mdast node.\n * @returns {Array<Element | Text>}\n * hast element content.\n */\nexport function hardBreak(state, node) {\n /** @type {Element} */\n const result = {type: 'element', tagName: 'br', properties: {}, children: []}\n state.patch(node, result)\n return [state.applyData(node, result), {type: 'text', value: '\\n'}]\n}\n","/**\n * @import {Element, Properties} from 'hast'\n * @import {Code} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `code` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Code} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function code(state, node) {\n const value = node.value ? node.value + '\\n' : ''\n /** @type {Properties} */\n const properties = {}\n // Someone can write `js python	ruby`.\n const language = node.lang ? node.lang.split(/\\s+/) : []\n\n // GH/CM still drop the non-first languages.\n if (language.length > 0) {\n properties.className = ['language-' + language[0]]\n }\n\n // Create `<code>`.\n /** @type {Element} */\n let result = {\n type: 'element',\n tagName: 'code',\n properties,\n children: [{type: 'text', value}]\n }\n\n if (node.meta) {\n result.data = {meta: node.meta}\n }\n\n state.patch(node, result)\n result = state.applyData(node, result)\n\n // Create `<pre>`.\n result = {type: 'element', tagName: 'pre', properties: {}, children: [result]}\n state.patch(node, result)\n return result\n}\n","/**\n * @import {Element} from 'hast'\n * @import {Delete} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `delete` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Delete} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function strikethrough(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'del',\n properties: {},\n children: state.all(node)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Element} from 'hast'\n * @import {Emphasis} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `emphasis` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Emphasis} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function emphasis(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'em',\n properties: {},\n children: state.all(node)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Element} from 'hast'\n * @import {FootnoteReference} from 'mdast'\n * @import {State} from '../state.js'\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `footnoteReference` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {FootnoteReference} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function footnoteReference(state, node) {\n const clobberPrefix =\n typeof state.options.clobberPrefix === 'string'\n ? state.options.clobberPrefix\n : 'user-content-'\n const id = String(node.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n const index = state.footnoteOrder.indexOf(id)\n /** @type {number} */\n let counter\n\n let reuseCounter = state.footnoteCounts.get(id)\n\n if (reuseCounter === undefined) {\n reuseCounter = 0\n state.footnoteOrder.push(id)\n counter = state.footnoteOrder.length\n } else {\n counter = index + 1\n }\n\n reuseCounter += 1\n state.footnoteCounts.set(id, reuseCounter)\n\n /** @type {Element} */\n const link = {\n type: 'element',\n tagName: 'a',\n properties: {\n href: '#' + clobberPrefix + 'fn-' + safeId,\n id:\n clobberPrefix +\n 'fnref-' +\n safeId +\n (reuseCounter > 1 ? '-' + reuseCounter : ''),\n dataFootnoteRef: true,\n ariaDescribedBy: ['footnote-label']\n },\n children: [{type: 'text', value: String(counter)}]\n }\n state.patch(node, link)\n\n /** @type {Element} */\n const sup = {\n type: 'element',\n tagName: 'sup',\n properties: {},\n children: [link]\n }\n state.patch(node, sup)\n return state.applyData(node, sup)\n}\n","/**\n * @import {Element} from 'hast'\n * @import {Heading} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `heading` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Heading} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function heading(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'h' + node.depth,\n properties: {},\n children: state.all(node)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Element} from 'hast'\n * @import {Html} from 'mdast'\n * @import {State} from '../state.js'\n * @import {Raw} from '../../index.js'\n */\n\n/**\n * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise\n * nothing).\n *\n * @param {State} state\n * Info passed around.\n * @param {Html} node\n * mdast node.\n * @returns {Element | Raw | undefined}\n * hast node.\n */\nexport function html(state, node) {\n if (state.options.allowDangerousHtml) {\n /** @type {Raw} */\n const result = {type: 'raw', value: node.value}\n state.patch(node, result)\n return state.applyData(node, result)\n }\n\n return undefined\n}\n","/**\n * @import {ElementContent} from 'hast'\n * @import {Reference, Nodes} from 'mdast'\n * @import {State} from './state.js'\n */\n\n/**\n * Return the content of a reference without definition as plain text.\n *\n * @param {State} state\n * Info passed around.\n * @param {Extract<Nodes, Reference>} node\n * Reference node (image, link).\n * @returns {Array<ElementContent>}\n * hast content.\n */\nexport function revert(state, node) {\n const subtype = node.referenceType\n let suffix = ']'\n\n if (subtype === 'collapsed') {\n suffix += '[]'\n } else if (subtype === 'full') {\n suffix += '[' + (node.label || node.identifier) + ']'\n }\n\n if (node.type === 'imageReference') {\n return [{type: 'text', value: '![' + node.alt + suffix}]\n }\n\n const contents = state.all(node)\n const head = contents[0]\n\n if (head && head.type === 'text') {\n head.value = '[' + head.value\n } else {\n contents.unshift({type: 'text', value: '['})\n }\n\n const tail = contents[contents.length - 1]\n\n if (tail && tail.type === 'text') {\n tail.value += suffix\n } else {\n contents.push({type: 'text', value: suffix})\n }\n\n return contents\n}\n","/**\n * @import {ElementContent, Element, Properties} from 'hast'\n * @import {ImageReference} from 'mdast'\n * @import {State} from '../state.js'\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `imageReference` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {ImageReference} node\n * mdast node.\n * @returns {Array<ElementContent> | ElementContent}\n * hast node.\n */\nexport function imageReference(state, node) {\n const id = String(node.identifier).toUpperCase()\n const definition = state.definitionById.get(id)\n\n if (!definition) {\n return revert(state, node)\n }\n\n /** @type {Properties} */\n const properties = {src: normalizeUri(definition.url || ''), alt: node.alt}\n\n if (definition.title !== null && definition.title !== undefined) {\n properties.title = definition.title\n }\n\n /** @type {Element} */\n const result = {type: 'element', tagName: 'img', properties, children: []}\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Element, Properties} from 'hast'\n * @import {Image} from 'mdast'\n * @import {State} from '../state.js'\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `image` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Image} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function image(state, node) {\n /** @type {Properties} */\n const properties = {src: normalizeUri(node.url)}\n\n if (node.alt !== null && node.alt !== undefined) {\n properties.alt = node.alt\n }\n\n if (node.title !== null && node.title !== undefined) {\n properties.title = node.title\n }\n\n /** @type {Element} */\n const result = {type: 'element', tagName: 'img', properties, children: []}\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Element, Text} from 'hast'\n * @import {InlineCode} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `inlineCode` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {InlineCode} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function inlineCode(state, node) {\n /** @type {Text} */\n const text = {type: 'text', value: node.value.replace(/\\r?\\n|\\r/g, ' ')}\n state.patch(node, text)\n\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'code',\n properties: {},\n children: [text]\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {ElementContent, Element, Properties} from 'hast'\n * @import {LinkReference} from 'mdast'\n * @import {State} from '../state.js'\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\nimport {revert} from '../revert.js'\n\n/**\n * Turn an mdast `linkReference` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {LinkReference} node\n * mdast node.\n * @returns {Array<ElementContent> | ElementContent}\n * hast node.\n */\nexport function linkReference(state, node) {\n const id = String(node.identifier).toUpperCase()\n const definition = state.definitionById.get(id)\n\n if (!definition) {\n return revert(state, node)\n }\n\n /** @type {Properties} */\n const properties = {href: normalizeUri(definition.url || '')}\n\n if (definition.title !== null && definition.title !== undefined) {\n properties.title = definition.title\n }\n\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'a',\n properties,\n children: state.all(node)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Element, Properties} from 'hast'\n * @import {Link} from 'mdast'\n * @import {State} from '../state.js'\n */\n\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Turn an mdast `link` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Link} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function link(state, node) {\n /** @type {Properties} */\n const properties = {href: normalizeUri(node.url)}\n\n if (node.title !== null && node.title !== undefined) {\n properties.title = node.title\n }\n\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'a',\n properties,\n children: state.all(node)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {ElementContent, Element, Properties} from 'hast'\n * @import {ListItem, Parents} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `listItem` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {ListItem} node\n * mdast node.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @returns {Element}\n * hast node.\n */\nexport function listItem(state, node, parent) {\n const results = state.all(node)\n const loose = parent ? listLoose(parent) : listItemLoose(node)\n /** @type {Properties} */\n const properties = {}\n /** @type {Array<ElementContent>} */\n const children = []\n\n if (typeof node.checked === 'boolean') {\n const head = results[0]\n /** @type {Element} */\n let paragraph\n\n if (head && head.type === 'element' && head.tagName === 'p') {\n paragraph = head\n } else {\n paragraph = {type: 'element', tagName: 'p', properties: {}, children: []}\n results.unshift(paragraph)\n }\n\n if (paragraph.children.length > 0) {\n paragraph.children.unshift({type: 'text', value: ' '})\n }\n\n paragraph.children.unshift({\n type: 'element',\n tagName: 'input',\n properties: {type: 'checkbox', checked: node.checked, disabled: true},\n children: []\n })\n\n // According to github-markdown-css, this class hides bullet.\n // See: <https://github.com/sindresorhus/github-markdown-css>.\n properties.className = ['task-list-item']\n }\n\n let index = -1\n\n while (++index < results.length) {\n const child = results[index]\n\n // Add eols before nodes, except if this is a loose, first paragraph.\n if (\n loose ||\n index !== 0 ||\n child.type !== 'element' ||\n child.tagName !== 'p'\n ) {\n children.push({type: 'text', value: '\\n'})\n }\n\n if (child.type === 'element' && child.tagName === 'p' && !loose) {\n children.push(...child.children)\n } else {\n children.push(child)\n }\n }\n\n const tail = results[results.length - 1]\n\n // Add a final eol.\n if (tail && (loose || tail.type !== 'element' || tail.tagName !== 'p')) {\n children.push({type: 'text', value: '\\n'})\n }\n\n /** @type {Element} */\n const result = {type: 'element', tagName: 'li', properties, children}\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * @param {Parents} node\n * @return {Boolean}\n */\nfunction listLoose(node) {\n let loose = false\n if (node.type === 'list') {\n loose = node.spread || false\n const children = node.children\n let index = -1\n\n while (!loose && ++index < children.length) {\n loose = listItemLoose(children[index])\n }\n }\n\n return loose\n}\n\n/**\n * @param {ListItem} node\n * @return {Boolean}\n */\nfunction listItemLoose(node) {\n const spread = node.spread\n\n return spread === null || spread === undefined\n ? node.children.length > 1\n : spread\n}\n","/**\n * @import {Element, Properties} from 'hast'\n * @import {List} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `list` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {List} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function list(state, node) {\n /** @type {Properties} */\n const properties = {}\n const results = state.all(node)\n let index = -1\n\n if (typeof node.start === 'number' && node.start !== 1) {\n properties.start = node.start\n }\n\n // Like GitHub, add a class for custom styling.\n while (++index < results.length) {\n const child = results[index]\n\n if (\n child.type === 'element' &&\n child.tagName === 'li' &&\n child.properties &&\n Array.isArray(child.properties.className) &&\n child.properties.className.includes('task-list-item')\n ) {\n properties.className = ['contains-task-list']\n break\n }\n }\n\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: node.ordered ? 'ol' : 'ul',\n properties,\n children: state.wrap(results, true)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Element} from 'hast'\n * @import {Paragraph} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `paragraph` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Paragraph} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function paragraph(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'p',\n properties: {},\n children: state.all(node)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Parents as HastParents, Root as HastRoot} from 'hast'\n * @import {Root as MdastRoot} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `root` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdastRoot} node\n * mdast node.\n * @returns {HastParents}\n * hast node.\n */\nexport function root(state, node) {\n /** @type {HastRoot} */\n const result = {type: 'root', children: state.wrap(state.all(node))}\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Element} from 'hast'\n * @import {Strong} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `strong` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Strong} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function strong(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'strong',\n properties: {},\n children: state.all(node)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Table} from 'mdast'\n * @import {Element} from 'hast'\n * @import {State} from '../state.js'\n */\n\nimport {pointEnd, pointStart} from 'unist-util-position'\n\n/**\n * Turn an mdast `table` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {Table} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function table(state, node) {\n const rows = state.all(node)\n const firstRow = rows.shift()\n /** @type {Array<Element>} */\n const tableContent = []\n\n if (firstRow) {\n /** @type {Element} */\n const head = {\n type: 'element',\n tagName: 'thead',\n properties: {},\n children: state.wrap([firstRow], true)\n }\n state.patch(node.children[0], head)\n tableContent.push(head)\n }\n\n if (rows.length > 0) {\n /** @type {Element} */\n const body = {\n type: 'element',\n tagName: 'tbody',\n properties: {},\n children: state.wrap(rows, true)\n }\n\n const start = pointStart(node.children[1])\n const end = pointEnd(node.children[node.children.length - 1])\n if (start && end) body.position = {start, end}\n tableContent.push(body)\n }\n\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'table',\n properties: {},\n children: state.wrap(tableContent, true)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Element, ElementContent, Properties} from 'hast'\n * @import {Parents, TableRow} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `tableRow` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {TableRow} node\n * mdast node.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @returns {Element}\n * hast node.\n */\nexport function tableRow(state, node, parent) {\n const siblings = parent ? parent.children : undefined\n // Generate a body row when without parent.\n const rowIndex = siblings ? siblings.indexOf(node) : 1\n const tagName = rowIndex === 0 ? 'th' : 'td'\n // To do: option to use `style`?\n const align = parent && parent.type === 'table' ? parent.align : undefined\n const length = align ? align.length : node.children.length\n let cellIndex = -1\n /** @type {Array<ElementContent>} */\n const cells = []\n\n while (++cellIndex < length) {\n // Note: can also be undefined.\n const cell = node.children[cellIndex]\n /** @type {Properties} */\n const properties = {}\n const alignValue = align ? align[cellIndex] : undefined\n\n if (alignValue) {\n properties.align = alignValue\n }\n\n /** @type {Element} */\n let result = {type: 'element', tagName, properties, children: []}\n\n if (cell) {\n result.children = state.all(cell)\n state.patch(cell, result)\n result = state.applyData(cell, result)\n }\n\n cells.push(result)\n }\n\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'tr',\n properties: {},\n children: state.wrap(cells, true)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Element} from 'hast'\n * @import {TableCell} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `tableCell` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {TableCell} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function tableCell(state, node) {\n // Note: this function is normally not called: see `table-row` for how rows\n // and their cells are compiled.\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'td', // Assume body cell.\n properties: {},\n children: state.all(node)\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","const tab = 9 /* `\\t` */\nconst space = 32 /* ` ` */\n\n/**\n * Remove initial and final spaces and tabs at the line breaks in `value`.\n * Does not trim initial and final spaces and tabs of the value itself.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Trimmed value.\n */\nexport function trimLines(value) {\n const source = String(value)\n const search = /\\r?\\n|\\r/g\n let match = search.exec(source)\n let last = 0\n /** @type {Array<string>} */\n const lines = []\n\n while (match) {\n lines.push(\n trimLine(source.slice(last, match.index), last > 0, true),\n match[0]\n )\n\n last = match.index + match[0].length\n match = search.exec(source)\n }\n\n lines.push(trimLine(source.slice(last), last > 0, false))\n\n return lines.join('')\n}\n\n/**\n * @param {string} value\n * Line to trim.\n * @param {boolean} start\n * Whether to trim the start of the line.\n * @param {boolean} end\n * Whether to trim the end of the line.\n * @returns {string}\n * Trimmed line.\n */\nfunction trimLine(value, start, end) {\n let startIndex = 0\n let endIndex = value.length\n\n if (start) {\n let code = value.codePointAt(startIndex)\n\n while (code === tab || code === space) {\n startIndex++\n code = value.codePointAt(startIndex)\n }\n }\n\n if (end) {\n let code = value.codePointAt(endIndex - 1)\n\n while (code === tab || code === space) {\n endIndex--\n code = value.codePointAt(endIndex - 1)\n }\n }\n\n return endIndex > startIndex ? value.slice(startIndex, endIndex) : ''\n}\n","/**\n * @import {Element as HastElement, Text as HastText} from 'hast'\n * @import {Text as MdastText} from 'mdast'\n * @import {State} from '../state.js'\n */\n\nimport {trimLines} from 'trim-lines'\n\n/**\n * Turn an mdast `text` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdastText} node\n * mdast node.\n * @returns {HastElement | HastText}\n * hast node.\n */\nexport function text(state, node) {\n /** @type {HastText} */\n const result = {type: 'text', value: trimLines(String(node.value))}\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Element} from 'hast'\n * @import {ThematicBreak} from 'mdast'\n * @import {State} from '../state.js'\n */\n\n/**\n * Turn an mdast `thematicBreak` node into hast.\n *\n * @param {State} state\n * Info passed around.\n * @param {ThematicBreak} node\n * mdast node.\n * @returns {Element}\n * hast node.\n */\nexport function thematicBreak(state, node) {\n /** @type {Element} */\n const result = {\n type: 'element',\n tagName: 'hr',\n properties: {},\n children: []\n }\n state.patch(node, result)\n return state.applyData(node, result)\n}\n","/**\n * @import {Handlers} from '../state.js'\n */\n\nimport {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {strikethrough} from './delete.js'\nimport {emphasis} from './emphasis.js'\nimport {footnoteReference} from './footnote-reference.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {imageReference} from './image-reference.js'\nimport {image} from './image.js'\nimport {inlineCode} from './inline-code.js'\nimport {linkReference} from './link-reference.js'\nimport {link} from './link.js'\nimport {listItem} from './list-item.js'\nimport {list} from './list.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {table} from './table.js'\nimport {tableRow} from './table-row.js'\nimport {tableCell} from './table-cell.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default handlers for nodes.\n *\n * @satisfies {Handlers}\n */\nexport const handlers = {\n blockquote,\n break: hardBreak,\n code,\n delete: strikethrough,\n emphasis,\n footnoteReference,\n heading,\n html,\n imageReference,\n image,\n inlineCode,\n linkReference,\n link,\n listItem,\n list,\n paragraph,\n // @ts-expect-error: root is different, but hard to type.\n root,\n strong,\n table,\n tableCell,\n tableRow,\n text,\n thematicBreak,\n toml: ignore,\n yaml: ignore,\n definition: ignore,\n footnoteDefinition: ignore\n}\n\n// Return nothing for nodes that are ignored.\nfunction ignore() {\n return undefined\n}\n","import {\n VOID, PRIMITIVE,\n ARRAY, OBJECT,\n DATE, REGEXP, MAP, SET,\n ERROR, BIGINT\n} from './types.js';\n\nconst env = typeof self === 'object' ? self : globalThis;\n\nconst guard = (name, init) => {\n switch (name) {\n case 'Function':\n case 'SharedWorker':\n case 'Worker':\n case 'eval':\n case 'setInterval':\n case 'setTimeout':\n throw new TypeError('unable to deserialize ' + name);\n }\n return new env[name](init);\n};\n\nconst deserializer = ($, _) => {\n const as = (out, index) => {\n $.set(index, out);\n return out;\n };\n\n const unpair = index => {\n if ($.has(index))\n return $.get(index);\n\n const [type, value] = _[index];\n switch (type) {\n case PRIMITIVE:\n case VOID:\n return as(value, index);\n case ARRAY: {\n const arr = as([], index);\n for (const index of value)\n arr.push(unpair(index));\n return arr;\n }\n case OBJECT: {\n const object = as({}, index);\n for (const [key, index] of value)\n object[unpair(key)] = unpair(index);\n return object;\n }\n case DATE:\n return as(new Date(value), index);\n case REGEXP: {\n const {source, flags} = value;\n return as(new RegExp(source, flags), index);\n }\n case MAP: {\n const map = as(new Map, index);\n for (const [key, index] of value)\n map.set(unpair(key), unpair(index));\n return map;\n }\n case SET: {\n const set = as(new Set, index);\n for (const index of value)\n set.add(unpair(index));\n return set;\n }\n case ERROR: {\n const {name, message} = value;\n return as(guard(name, message), index);\n }\n case BIGINT:\n return as(BigInt(value), index);\n case 'BigInt':\n return as(Object(BigInt(value)), index);\n case 'ArrayBuffer':\n return as(new Uint8Array(value).buffer, value);\n case 'DataView': {\n const { buffer } = new Uint8Array(value);\n return as(new DataView(buffer), value);\n }\n }\n return as(guard(type, value), index);\n };\n\n return unpair;\n};\n\n/**\n * @typedef {Array<string,any>} Record a type representation\n */\n\n/**\n * Returns a deserialized value from a serialized array of Records.\n * @param {Record[]} serialized a previously serialized value.\n * @returns {any}\n */\nexport const deserialize = serialized => deserializer(new Map, serialized)(0);\n","import {\n VOID, PRIMITIVE,\n ARRAY, OBJECT,\n DATE, REGEXP, MAP, SET,\n ERROR, BIGINT\n} from './types.js';\n\nconst EMPTY = '';\n\nconst {toString} = {};\nconst {keys} = Object;\n\nconst typeOf = value => {\n const type = typeof value;\n if (type !== 'object' || !value)\n return [PRIMITIVE, type];\n\n const asString = toString.call(value).slice(8, -1);\n switch (asString) {\n case 'Array':\n return [ARRAY, EMPTY];\n case 'Object':\n return [OBJECT, EMPTY];\n case 'Date':\n return [DATE, EMPTY];\n case 'RegExp':\n return [REGEXP, EMPTY];\n case 'Map':\n return [MAP, EMPTY];\n case 'Set':\n return [SET, EMPTY];\n case 'DataView':\n return [ARRAY, asString];\n }\n\n if (asString.includes('Array'))\n return [ARRAY, asString];\n\n if (asString.includes('Error'))\n return [ERROR, asString];\n\n return [OBJECT, asString];\n};\n\nconst shouldSkip = ([TYPE, type]) => (\n TYPE === PRIMITIVE &&\n (type === 'function' || type === 'symbol')\n);\n\nconst serializer = (strict, json, $, _) => {\n\n const as = (out, value) => {\n const index = _.push(out) - 1;\n $.set(value, index);\n return index;\n };\n\n const pair = value => {\n if ($.has(value))\n return $.get(value);\n\n let [TYPE, type] = typeOf(value);\n switch (TYPE) {\n case PRIMITIVE: {\n let entry = value;\n switch (type) {\n case 'bigint':\n TYPE = BIGINT;\n entry = value.toString();\n break;\n case 'function':\n case 'symbol':\n if (strict)\n throw new TypeError('unable to serialize ' + type);\n entry = null;\n break;\n case 'undefined':\n return as([VOID], value);\n }\n return as([TYPE, entry], value);\n }\n case ARRAY: {\n if (type) {\n let spread = value;\n if (type === 'DataView') {\n spread = new Uint8Array(value.buffer);\n }\n else if (type === 'ArrayBuffer') {\n spread = new Uint8Array(value);\n }\n return as([type, [...spread]], value);\n }\n\n const arr = [];\n const index = as([TYPE, arr], value);\n for (const entry of value)\n arr.push(pair(entry));\n return index;\n }\n case OBJECT: {\n if (type) {\n switch (type) {\n case 'BigInt':\n return as([type, value.toString()], value);\n case 'Boolean':\n case 'Number':\n case 'String':\n return as([type, value.valueOf()], value);\n }\n }\n\n if (json && ('toJSON' in value))\n return pair(value.toJSON());\n\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const key of keys(value)) {\n if (strict || !shouldSkip(typeOf(value[key])))\n entries.push([pair(key), pair(value[key])]);\n }\n return index;\n }\n case DATE:\n return as([TYPE, value.toISOString()], value);\n case REGEXP: {\n const {source, flags} = value;\n return as([TYPE, {source, flags}], value);\n }\n case MAP: {\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const [key, entry] of value) {\n if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))\n entries.push([pair(key), pair(entry)]);\n }\n return index;\n }\n case SET: {\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const entry of value) {\n if (strict || !shouldSkip(typeOf(entry)))\n entries.push(pair(entry));\n }\n return index;\n }\n }\n\n const {message} = value;\n return as([TYPE, {name: type, message}], value);\n };\n\n return pair;\n};\n\n/**\n * @typedef {Array<string,any>} Record a type representation\n */\n\n/**\n * Returns an array of serialized Records.\n * @param {any} value a serializable value.\n * @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,\n * if `true`, will not throw errors on incompatible types, and behave more\n * like JSON stringify would behave. Symbol and Function will be discarded.\n * @returns {Record[]}\n */\n export const serialize = (value, {json, lossy} = {}) => {\n const _ = [];\n return serializer(!(json || lossy), !!json, new Map, _)(value), _;\n};\n","import {deserialize} from './deserialize.js';\nimport {serialize} from './serialize.js';\n\n/**\n * @typedef {Array<string,any>} Record a type representation\n */\n\n/**\n * Returns an array of serialized Records.\n * @param {any} any a serializable value.\n * @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with\n * a transfer option (ignored when polyfilled) and/or non standard fields that\n * fallback to the polyfill if present.\n * @returns {Record[]}\n */\nexport default typeof structuredClone === \"function\" ?\n /* c8 ignore start */\n (any, options) => (\n options && ('json' in options || 'lossy' in options) ?\n deserialize(serialize(any, options)) : structuredClone(any)\n ) :\n (any, options) => deserialize(serialize(any, options));\n /* c8 ignore stop */\n\nexport {deserialize, serialize};\n","/**\n * @import {ElementContent, Element} from 'hast'\n * @import {State} from './state.js'\n */\n\n/**\n * @callback FootnoteBackContentTemplate\n * Generate content for the backreference dynamically.\n *\n * For the following markdown:\n *\n * ```markdown\n * Alpha[^micromark], bravo[^micromark], and charlie[^remark].\n *\n * [^remark]: things about remark\n * [^micromark]: things about micromark\n * ```\n *\n * This function will be called with:\n *\n * * `0` and `0` for the backreference from `things about micromark` to\n * `alpha`, as it is the first used definition, and the first call to it\n * * `0` and `1` for the backreference from `things about micromark` to\n * `bravo`, as it is the first used definition, and the second call to it\n * * `1` and `0` for the backreference from `things about remark` to\n * `charlie`, as it is the second used definition\n * @param {number} referenceIndex\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {Array<ElementContent> | ElementContent | string}\n * Content for the backreference when linking back from definitions to their\n * reference.\n *\n * @callback FootnoteBackLabelTemplate\n * Generate a back label dynamically.\n *\n * For the following markdown:\n *\n * ```markdown\n * Alpha[^micromark], bravo[^micromark], and charlie[^remark].\n *\n * [^remark]: things about remark\n * [^micromark]: things about micromark\n * ```\n *\n * This function will be called with:\n *\n * * `0` and `0` for the backreference from `things about micromark` to\n * `alpha`, as it is the first used definition, and the first call to it\n * * `0` and `1` for the backreference from `things about micromark` to\n * `bravo`, as it is the first used definition, and the second call to it\n * * `1` and `0` for the backreference from `things about remark` to\n * `charlie`, as it is the second used definition\n * @param {number} referenceIndex\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {string}\n * Back label to use when linking back from definitions to their reference.\n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {normalizeUri} from 'micromark-util-sanitize-uri'\n\n/**\n * Generate the default content that GitHub uses on backreferences.\n *\n * @param {number} _\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {Array<ElementContent>}\n * Content.\n */\nexport function defaultFootnoteBackContent(_, rereferenceIndex) {\n /** @type {Array<ElementContent>} */\n const result = [{type: 'text', value: '↩'}]\n\n if (rereferenceIndex > 1) {\n result.push({\n type: 'element',\n tagName: 'sup',\n properties: {},\n children: [{type: 'text', value: String(rereferenceIndex)}]\n })\n }\n\n return result\n}\n\n/**\n * Generate the default label that GitHub uses on backreferences.\n *\n * @param {number} referenceIndex\n * Index of the definition in the order that they are first referenced,\n * 0-indexed.\n * @param {number} rereferenceIndex\n * Index of calls to the same definition, 0-indexed.\n * @returns {string}\n * Label.\n */\nexport function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {\n return (\n 'Back to reference ' +\n (referenceIndex + 1) +\n (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')\n )\n}\n\n/**\n * Generate a hast footer for called footnote definitions.\n *\n * @param {State} state\n * Info passed around.\n * @returns {Element | undefined}\n * `section` element or `undefined`.\n */\n// eslint-disable-next-line complexity\nexport function footer(state) {\n const clobberPrefix =\n typeof state.options.clobberPrefix === 'string'\n ? state.options.clobberPrefix\n : 'user-content-'\n const footnoteBackContent =\n state.options.footnoteBackContent || defaultFootnoteBackContent\n const footnoteBackLabel =\n state.options.footnoteBackLabel || defaultFootnoteBackLabel\n const footnoteLabel = state.options.footnoteLabel || 'Footnotes'\n const footnoteLabelTagName = state.options.footnoteLabelTagName || 'h2'\n const footnoteLabelProperties = state.options.footnoteLabelProperties || {\n className: ['sr-only']\n }\n /** @type {Array<ElementContent>} */\n const listItems = []\n let referenceIndex = -1\n\n while (++referenceIndex < state.footnoteOrder.length) {\n const definition = state.footnoteById.get(\n state.footnoteOrder[referenceIndex]\n )\n\n if (!definition) {\n continue\n }\n\n const content = state.all(definition)\n const id = String(definition.identifier).toUpperCase()\n const safeId = normalizeUri(id.toLowerCase())\n let rereferenceIndex = 0\n /** @type {Array<ElementContent>} */\n const backReferences = []\n const counts = state.footnoteCounts.get(id)\n\n // eslint-disable-next-line no-unmodified-loop-condition\n while (counts !== undefined && ++rereferenceIndex <= counts) {\n if (backReferences.length > 0) {\n backReferences.push({type: 'text', value: ' '})\n }\n\n let children =\n typeof footnoteBackContent === 'string'\n ? footnoteBackContent\n : footnoteBackContent(referenceIndex, rereferenceIndex)\n\n if (typeof children === 'string') {\n children = {type: 'text', value: children}\n }\n\n backReferences.push({\n type: 'element',\n tagName: 'a',\n properties: {\n href:\n '#' +\n clobberPrefix +\n 'fnref-' +\n safeId +\n (rereferenceIndex > 1 ? '-' + rereferenceIndex : ''),\n dataFootnoteBackref: '',\n ariaLabel:\n typeof footnoteBackLabel === 'string'\n ? footnoteBackLabel\n : footnoteBackLabel(referenceIndex, rereferenceIndex),\n className: ['data-footnote-backref']\n },\n children: Array.isArray(children) ? children : [children]\n })\n }\n\n const tail = content[content.length - 1]\n\n if (tail && tail.type === 'element' && tail.tagName === 'p') {\n const tailTail = tail.children[tail.children.length - 1]\n if (tailTail && tailTail.type === 'text') {\n tailTail.value += ' '\n } else {\n tail.children.push({type: 'text', value: ' '})\n }\n\n tail.children.push(...backReferences)\n } else {\n content.push(...backReferences)\n }\n\n /** @type {Element} */\n const listItem = {\n type: 'element',\n tagName: 'li',\n properties: {id: clobberPrefix + 'fn-' + safeId},\n children: state.wrap(content, true)\n }\n\n state.patch(definition, listItem)\n\n listItems.push(listItem)\n }\n\n if (listItems.length === 0) {\n return\n }\n\n return {\n type: 'element',\n tagName: 'section',\n properties: {dataFootnotes: true, className: ['footnotes']},\n children: [\n {\n type: 'element',\n tagName: footnoteLabelTagName,\n properties: {\n ...structuredClone(footnoteLabelProperties),\n id: 'footnote-label'\n },\n children: [{type: 'text', value: footnoteLabel}]\n },\n {type: 'text', value: '\\n'},\n {\n type: 'element',\n tagName: 'ol',\n properties: {},\n children: state.wrap(listItems, true)\n },\n {type: 'text', value: '\\n'}\n ]\n }\n}\n","/**\n * @import {Node, Parent} from 'unist'\n */\n\n/**\n * @template Fn\n * @template Fallback\n * @typedef {Fn extends (value: any) => value is infer Thing ? Thing : Fallback} Predicate\n */\n\n/**\n * @callback Check\n * Check that an arbitrary value is a node.\n * @param {unknown} this\n * The given context.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean}\n * Whether this is a node and passes a test.\n *\n * @typedef {Record<string, unknown> | Node} Props\n * Object to check for equivalence.\n *\n * Note: `Node` is included as it is common but is not indexable.\n *\n * @typedef {Array<Props | TestFunction | string> | ReadonlyArray<Props | TestFunction | string> | Props | TestFunction | string | null | undefined} Test\n * Check for an arbitrary node.\n *\n * @callback TestFunction\n * Check if a node passes a test.\n * @param {unknown} this\n * The given context.\n * @param {Node} node\n * A node.\n * @param {number | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | undefined} [parent]\n * The node’s parent.\n * @returns {boolean | undefined | void}\n * Whether this node passes the test.\n *\n * Note: `void` is included until TS sees no return as `undefined`.\n */\n\n/**\n * Check if `node` is a `Node` and whether it passes the given test.\n *\n * @param {unknown} node\n * Thing to check, typically `Node`.\n * @param {Test} test\n * A check for a specific node.\n * @param {number | null | undefined} index\n * The node’s position in its parent.\n * @param {Parent | null | undefined} parent\n * The node’s parent.\n * @param {unknown} context\n * Context object (`this`) to pass to `test` functions.\n * @returns {boolean}\n * Whether `node` is a node and passes a test.\n */\nexport const is =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * (<Condition extends ReadonlyArray<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &\n * (<Condition extends Array<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &\n * (<Condition extends string>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n * (<Condition extends Props>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n * (<Condition extends TestFunction>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &\n * ((node?: null | undefined) => false) &\n * ((node: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n * ((node: unknown, test?: Test, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [node]\n * @param {Test} [test]\n * @param {number | null | undefined} [index]\n * @param {Parent | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function (node, test, index, parent, context) {\n const check = convert(test)\n\n if (\n index !== undefined &&\n index !== null &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite index')\n }\n\n if (\n parent !== undefined &&\n parent !== null &&\n (!is(parent) || !parent.children)\n ) {\n throw new Error('Expected parent node')\n }\n\n if (\n (parent === undefined || parent === null) !==\n (index === undefined || index === null)\n ) {\n throw new Error('Expected both parent and index')\n }\n\n return looksLikeANode(node)\n ? check.call(context, node, index, parent)\n : false\n }\n )\n\n/**\n * Generate an assertion from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * a `node`, `index`, and `parent`.\n *\n * @param {Test} test\n * * when nullish, checks if `node` is a `Node`.\n * * when `string`, works like passing `(node) => node.type === test`.\n * * when `function` checks if function passed the node is true.\n * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.\n * * when `array`, checks if any one of the subtests pass.\n * @returns {Check}\n * An assertion.\n */\nexport const convert =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n * (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n * (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &\n * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n * ((test?: Test) => Check)\n * )}\n */\n (\n /**\n * @param {Test} [test]\n * @returns {Check}\n */\n function (test) {\n if (test === null || test === undefined) {\n return ok\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n if (typeof test === 'object') {\n return Array.isArray(test)\n ? anyFactory(test)\n : // Cast because `ReadonlyArray` goes into the above but `isArray`\n // narrows to `Array`.\n propertiesFactory(/** @type {Props} */ (test))\n }\n\n if (typeof test === 'string') {\n return typeFactory(test)\n }\n\n throw new Error('Expected function, string, or object as test')\n }\n )\n\n/**\n * @param {Array<Props | TestFunction | string>} tests\n * @returns {Check}\n */\nfunction anyFactory(tests) {\n /** @type {Array<Check>} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convert(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @type {TestFunction}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].apply(this, parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn an object into a test for a node with a certain fields.\n *\n * @param {Props} check\n * @returns {Check}\n */\nfunction propertiesFactory(check) {\n const checkAsRecord = /** @type {Record<string, unknown>} */ (check)\n\n return castFactory(all)\n\n /**\n * @param {Node} node\n * @returns {boolean}\n */\n function all(node) {\n const nodeAsRecord = /** @type {Record<string, unknown>} */ (\n /** @type {unknown} */ (node)\n )\n\n /** @type {string} */\n let key\n\n for (key in check) {\n if (nodeAsRecord[key] !== checkAsRecord[key]) return false\n }\n\n return true\n }\n}\n\n/**\n * Turn a string into a test for a node with a certain type.\n *\n * @param {string} check\n * @returns {Check}\n */\nfunction typeFactory(check) {\n return castFactory(type)\n\n /**\n * @param {Node} node\n */\n function type(node) {\n return node && node.type === check\n }\n}\n\n/**\n * Turn a custom test into a test for a node that passes that test.\n *\n * @param {TestFunction} testFunction\n * @returns {Check}\n */\nfunction castFactory(testFunction) {\n return check\n\n /**\n * @this {unknown}\n * @type {Check}\n */\n function check(value, index, parent) {\n return Boolean(\n looksLikeANode(value) &&\n testFunction.call(\n this,\n value,\n typeof index === 'number' ? index : undefined,\n parent || undefined\n )\n )\n }\n}\n\nfunction ok() {\n return true\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Node}\n */\nfunction looksLikeANode(value) {\n return value !== null && typeof value === 'object' && 'type' in value\n}\n","/**\n * @param {string} d\n * @returns {string}\n */\nexport function color(d) {\n return d\n}\n","/**\n * @import {Node as UnistNode, Parent as UnistParent} from 'unist'\n */\n\n/**\n * @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test\n * Test from `unist-util-is`.\n *\n * Note: we have remove and add `undefined`, because otherwise when generating\n * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,\n * which doesn’t work when publishing on npm.\n */\n\n/**\n * @typedef {(\n * Fn extends (value: any) => value is infer Thing\n * ? Thing\n * : Fallback\n * )} Predicate\n * Get the value of a type guard `Fn`.\n * @template Fn\n * Value; typically function that is a type guard (such as `(x): x is Y`).\n * @template Fallback\n * Value to yield if `Fn` is not a type guard.\n */\n\n/**\n * @typedef {(\n * Check extends null | undefined // No test.\n * ? Value\n * : Value extends {type: Check} // String (type) test.\n * ? Value\n * : Value extends Check // Partial test.\n * ? Value\n * : Check extends Function // Function test.\n * ? Predicate<Check, Value> extends Value\n * ? Predicate<Check, Value>\n * : never\n * : never // Some other test?\n * )} MatchesOne\n * Check whether a node matches a primitive check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test, but not arrays.\n */\n\n/**\n * @typedef {(\n * Check extends ReadonlyArray<infer T>\n * ? MatchesOne<Value, T>\n * : Check extends Array<infer T>\n * ? MatchesOne<Value, T>\n * : MatchesOne<Value, Check>\n * )} Matches\n * Check whether a node matches a check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test.\n */\n\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint\n * Number; capped reasonably.\n */\n\n/**\n * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment\n * Increment a number in the type system.\n * @template {Uint} [I=0]\n * Index.\n */\n\n/**\n * @typedef {(\n * Node extends UnistParent\n * ? Node extends {children: Array<infer Children>}\n * ? Child extends Children ? Node : never\n * : never\n * : never\n * )} InternalParent\n * Collect nodes that can be parents of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {InternalParent<InclusiveDescendant<Tree>, Child>} Parent\n * Collect nodes in `Tree` that can be parents of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Depth extends Max\n * ? never\n * :\n * | InternalParent<Node, Child>\n * | InternalAncestor<Node, InternalParent<Node, Child>, Max, Increment<Depth>>\n * )} InternalAncestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {InternalAncestor<InclusiveDescendant<Tree>, Child>} Ancestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Tree extends UnistParent\n * ? Depth extends Max\n * ? Tree\n * : Tree | InclusiveDescendant<Tree['children'][number], Max, Increment<Depth>>\n * : Tree\n * )} InclusiveDescendant\n * Collect all (inclusive) descendants of `Tree`.\n *\n * > 👉 **Note**: for performance reasons, this seems to be the fastest way to\n * > recurse without actually running into an infinite loop, which the\n * > previous version did.\n * >\n * > Practically, a max of `2` is typically enough assuming a `Root` is\n * > passed, but it doesn’t improve performance.\n * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.\n * > Using up to `10` doesn’t hurt or help either.\n * @template {UnistNode} Tree\n * Tree type.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {'skip' | boolean} Action\n * Union of the action types.\n *\n * @typedef {number} Index\n * Move to the sibling at `index` next (after node itself is completely\n * traversed).\n *\n * Useful if mutating the tree, such as removing the node the visitor is\n * currently on, or any of its previous siblings.\n * Results less than 0 or greater than or equal to `children.length` stop\n * traversing the parent.\n *\n * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple\n * List with one or two values, the first an action, the second an index.\n *\n * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult\n * Any value that can be returned from a visitor.\n */\n\n/**\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform the parent of node (the last of `ancestors`).\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of an ancestor still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Array<VisitedParents>} ancestors\n * Ancestors of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n * @template {UnistNode} [Visited=UnistNode]\n * Visited node type.\n * @template {UnistParent} [VisitedParents=UnistParent]\n * Ancestor type.\n */\n\n/**\n * @typedef {Visitor<Matches<InclusiveDescendant<Tree>, Check>, Ancestor<Tree, Matches<InclusiveDescendant<Tree>, Check>>>} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parents`.\n * @template {UnistNode} [Tree=UnistNode]\n * Tree type.\n * @template {Test} [Check=Test]\n * Test type.\n */\n\nimport {convert} from 'unist-util-is'\nimport {color} from 'unist-util-visit-parents/do-not-use-color'\n\n/** @type {Readonly<ActionTuple>} */\nconst empty = []\n\n/**\n * Continue traversing as normal.\n */\nexport const CONTINUE = true\n\n/**\n * Stop traversing immediately.\n */\nexport const EXIT = false\n\n/**\n * Do not traverse this node’s children.\n */\nexport const SKIP = 'skip'\n\n/**\n * Visit nodes, with ancestral information.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @overload\n * @param {Tree} tree\n * @param {Check} check\n * @param {BuildVisitor<Tree, Check>} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @overload\n * @param {Tree} tree\n * @param {BuildVisitor<Tree>} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @param {UnistNode} tree\n * Tree to traverse.\n * @param {Visitor | Test} test\n * `unist-util-is`-compatible test\n * @param {Visitor | boolean | null | undefined} [visitor]\n * Handle each node.\n * @param {boolean | null | undefined} [reverse]\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns {undefined}\n * Nothing.\n *\n * @template {UnistNode} Tree\n * Node type.\n * @template {Test} Check\n * `unist-util-is`-compatible test.\n */\nexport function visitParents(tree, test, visitor, reverse) {\n /** @type {Test} */\n let check\n\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n // @ts-expect-error no visitor given, so `visitor` is test.\n visitor = test\n } else {\n // @ts-expect-error visitor given, so `test` isn’t a visitor.\n check = test\n }\n\n const is = convert(check)\n const step = reverse ? -1 : 1\n\n factory(tree, undefined, [])()\n\n /**\n * @param {UnistNode} node\n * @param {number | undefined} index\n * @param {Array<UnistParent>} parents\n */\n function factory(node, index, parents) {\n const value = /** @type {Record<string, unknown>} */ (\n node && typeof node === 'object' ? node : {}\n )\n\n if (typeof value.type === 'string') {\n const name =\n // `hast`\n typeof value.tagName === 'string'\n ? value.tagName\n : // `xast`\n typeof value.name === 'string'\n ? value.name\n : undefined\n\n Object.defineProperty(visit, 'name', {\n value:\n 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'\n })\n }\n\n return visit\n\n function visit() {\n /** @type {Readonly<ActionTuple>} */\n let result = empty\n /** @type {Readonly<ActionTuple>} */\n let subresult\n /** @type {number} */\n let offset\n /** @type {Array<UnistParent>} */\n let grandparents\n\n if (!test || is(node, index, parents[parents.length - 1] || undefined)) {\n // @ts-expect-error: `visitor` is now a visitor.\n result = toResult(visitor(node, parents))\n\n if (result[0] === EXIT) {\n return result\n }\n }\n\n if ('children' in node && node.children) {\n const nodeAsParent = /** @type {UnistParent} */ (node)\n\n if (nodeAsParent.children && result[0] !== SKIP) {\n offset = (reverse ? nodeAsParent.children.length : -1) + step\n grandparents = parents.concat(nodeAsParent)\n\n while (offset > -1 && offset < nodeAsParent.children.length) {\n const child = nodeAsParent.children[offset]\n\n subresult = factory(child, offset, grandparents)()\n\n if (subresult[0] === EXIT) {\n return subresult\n }\n\n offset =\n typeof subresult[1] === 'number' ? subresult[1] : offset + step\n }\n }\n }\n\n return result\n }\n }\n}\n\n/**\n * Turn a return value into a clean result.\n *\n * @param {VisitorResult} value\n * Valid return values from visitors.\n * @returns {Readonly<ActionTuple>}\n * Clean result.\n */\nfunction toResult(value) {\n if (Array.isArray(value)) {\n return value\n }\n\n if (typeof value === 'number') {\n return [CONTINUE, value]\n }\n\n return value === null || value === undefined ? empty : [value]\n}\n","/**\n * @import {Node as UnistNode, Parent as UnistParent} from 'unist'\n * @import {VisitorResult} from 'unist-util-visit-parents'\n */\n\n/**\n * @typedef {Exclude<import('unist-util-is').Test, undefined> | undefined} Test\n * Test from `unist-util-is`.\n *\n * Note: we have remove and add `undefined`, because otherwise when generating\n * automatic `.d.ts` files, TS tries to flatten paths from a local perspective,\n * which doesn’t work when publishing on npm.\n */\n\n// To do: use types from `unist-util-visit-parents` when it’s released.\n\n/**\n * @typedef {(\n * Fn extends (value: any) => value is infer Thing\n * ? Thing\n * : Fallback\n * )} Predicate\n * Get the value of a type guard `Fn`.\n * @template Fn\n * Value; typically function that is a type guard (such as `(x): x is Y`).\n * @template Fallback\n * Value to yield if `Fn` is not a type guard.\n */\n\n/**\n * @typedef {(\n * Check extends null | undefined // No test.\n * ? Value\n * : Value extends {type: Check} // String (type) test.\n * ? Value\n * : Value extends Check // Partial test.\n * ? Value\n * : Check extends Function // Function test.\n * ? Predicate<Check, Value> extends Value\n * ? Predicate<Check, Value>\n * : never\n * : never // Some other test?\n * )} MatchesOne\n * Check whether a node matches a primitive check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test, but not arrays.\n */\n\n/**\n * @typedef {(\n * Check extends ReadonlyArray<any>\n * ? MatchesOne<Value, Check[number]>\n * : MatchesOne<Value, Check>\n * )} Matches\n * Check whether a node matches a check in the type system.\n * @template Value\n * Value; typically unist `Node`.\n * @template Check\n * Value; typically `unist-util-is`-compatible test.\n */\n\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10} Uint\n * Number; capped reasonably.\n */\n\n/**\n * @typedef {I extends 0 ? 1 : I extends 1 ? 2 : I extends 2 ? 3 : I extends 3 ? 4 : I extends 4 ? 5 : I extends 5 ? 6 : I extends 6 ? 7 : I extends 7 ? 8 : I extends 8 ? 9 : 10} Increment\n * Increment a number in the type system.\n * @template {Uint} [I=0]\n * Index.\n */\n\n/**\n * @typedef {(\n * Node extends UnistParent\n * ? Node extends {children: Array<infer Children>}\n * ? Child extends Children ? Node : never\n * : never\n * : never\n * )} InternalParent\n * Collect nodes that can be parents of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {InternalParent<InclusiveDescendant<Tree>, Child>} Parent\n * Collect nodes in `Tree` that can be parents of `Child`.\n * @template {UnistNode} Tree\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n */\n\n/**\n * @typedef {(\n * Depth extends Max\n * ? never\n * :\n * | InternalParent<Node, Child>\n * | InternalAncestor<Node, InternalParent<Node, Child>, Max, Increment<Depth>>\n * )} InternalAncestor\n * Collect nodes in `Tree` that can be ancestors of `Child`.\n * @template {UnistNode} Node\n * All node types in a tree.\n * @template {UnistNode} Child\n * Node to search for.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @typedef {(\n * Tree extends UnistParent\n * ? Depth extends Max\n * ? Tree\n * : Tree | InclusiveDescendant<Tree['children'][number], Max, Increment<Depth>>\n * : Tree\n * )} InclusiveDescendant\n * Collect all (inclusive) descendants of `Tree`.\n *\n * > 👉 **Note**: for performance reasons, this seems to be the fastest way to\n * > recurse without actually running into an infinite loop, which the\n * > previous version did.\n * >\n * > Practically, a max of `2` is typically enough assuming a `Root` is\n * > passed, but it doesn’t improve performance.\n * > It gets higher with `List > ListItem > Table > TableRow > TableCell`.\n * > Using up to `10` doesn’t hurt or help either.\n * @template {UnistNode} Tree\n * Tree type.\n * @template {Uint} [Max=10]\n * Max; searches up to this depth.\n * @template {Uint} [Depth=0]\n * Current depth.\n */\n\n/**\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform `parent`.\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of `parent` still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Visited extends UnistNode ? number | undefined : never} index\n * Index of `node` in `parent`.\n * @param {Ancestor extends UnistParent ? Ancestor | undefined : never} parent\n * Parent of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n * @template {UnistNode} [Visited=UnistNode]\n * Visited node type.\n * @template {UnistParent} [Ancestor=UnistParent]\n * Ancestor type.\n */\n\n/**\n * @typedef {Visitor<Visited, Parent<Ancestor, Visited>>} BuildVisitorFromMatch\n * Build a typed `Visitor` function from a node and all possible parents.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} Visited\n * Node type.\n * @template {UnistParent} Ancestor\n * Parent type.\n */\n\n/**\n * @typedef {(\n * BuildVisitorFromMatch<\n * Matches<Descendant, Check>,\n * Extract<Descendant, UnistParent>\n * >\n * )} BuildVisitorFromDescendants\n * Build a typed `Visitor` function from a list of descendants and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} Descendant\n * Node type.\n * @template {Test} Check\n * Test type.\n */\n\n/**\n * @typedef {(\n * BuildVisitorFromDescendants<\n * InclusiveDescendant<Tree>,\n * Check\n * >\n * )} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parent`.\n * @template {UnistNode} [Tree=UnistNode]\n * Node type.\n * @template {Test} [Check=Test]\n * Test type.\n */\n\nimport {visitParents} from 'unist-util-visit-parents'\n\nexport {CONTINUE, EXIT, SKIP} from 'unist-util-visit-parents'\n\n/**\n * Visit nodes.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @overload\n * @param {Tree} tree\n * @param {Check} check\n * @param {BuildVisitor<Tree, Check>} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @overload\n * @param {Tree} tree\n * @param {BuildVisitor<Tree>} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {undefined}\n *\n * @param {UnistNode} tree\n * Tree to traverse.\n * @param {Visitor | Test} testOrVisitor\n * `unist-util-is`-compatible test (optional, omit to pass a visitor).\n * @param {Visitor | boolean | null | undefined} [visitorOrReverse]\n * Handle each node (when test is omitted, pass `reverse`).\n * @param {boolean | null | undefined} [maybeReverse=false]\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns {undefined}\n * Nothing.\n *\n * @template {UnistNode} Tree\n * Node type.\n * @template {Test} Check\n * `unist-util-is`-compatible test.\n */\nexport function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {\n /** @type {boolean | null | undefined} */\n let reverse\n /** @type {Test} */\n let test\n /** @type {Visitor} */\n let visitor\n\n if (\n typeof testOrVisitor === 'function' &&\n typeof visitorOrReverse !== 'function'\n ) {\n test = undefined\n visitor = testOrVisitor\n reverse = visitorOrReverse\n } else {\n // @ts-expect-error: assume the overload with test was given.\n test = testOrVisitor\n // @ts-expect-error: assume the overload with test was given.\n visitor = visitorOrReverse\n reverse = maybeReverse\n }\n\n visitParents(tree, test, overload, reverse)\n\n /**\n * @param {UnistNode} node\n * @param {Array<UnistParent>} parents\n */\n function overload(node, parents) {\n const parent = parents[parents.length - 1]\n const index = parent ? parent.children.indexOf(node) : undefined\n return visitor(node, index, parent)\n }\n}\n","/**\n * @import {\n * ElementContent as HastElementContent,\n * Element as HastElement,\n * Nodes as HastNodes,\n * Properties as HastProperties,\n * RootContent as HastRootContent,\n * Text as HastText\n * } from 'hast'\n * @import {\n * Definition as MdastDefinition,\n * FootnoteDefinition as MdastFootnoteDefinition,\n * Nodes as MdastNodes,\n * Parents as MdastParents\n * } from 'mdast'\n * @import {VFile} from 'vfile'\n * @import {\n * FootnoteBackContentTemplate,\n * FootnoteBackLabelTemplate\n * } from './footer.js'\n */\n\n/**\n * @callback Handler\n * Handle a node.\n * @param {State} state\n * Info passed around.\n * @param {any} node\n * mdast node to handle.\n * @param {MdastParents | undefined} parent\n * Parent of `node`.\n * @returns {Array<HastElementContent> | HastElementContent | undefined}\n * hast node.\n *\n * @typedef {Partial<Record<MdastNodes['type'], Handler>>} Handlers\n * Handle nodes.\n *\n * @typedef Options\n * Configuration (optional).\n * @property {boolean | null | undefined} [allowDangerousHtml=false]\n * Whether to persist raw HTML in markdown in the hast tree (default:\n * `false`).\n * @property {string | null | undefined} [clobberPrefix='user-content-']\n * Prefix to use before the `id` property on footnotes to prevent them from\n * *clobbering* (default: `'user-content-'`).\n *\n * Pass `''` for trusted markdown and when you are careful with\n * polyfilling.\n * You could pass a different prefix.\n *\n * DOM clobbering is this:\n *\n * ```html\n * <p id=\"x\"></p>\n * <script>alert(x) // `x` now refers to the `p#x` DOM element</script>\n * ```\n *\n * The above example shows that elements are made available by browsers, by\n * their ID, on the `window` object.\n * This is a security risk because you might be expecting some other variable\n * at that place.\n * It can also break polyfills.\n * Using a prefix solves these problems.\n * @property {VFile | null | undefined} [file]\n * Corresponding virtual file representing the input document (optional).\n * @property {FootnoteBackContentTemplate | string | null | undefined} [footnoteBackContent]\n * Content of the backreference back to references (default: `defaultFootnoteBackContent`).\n *\n * The default value is:\n *\n * ```js\n * function defaultFootnoteBackContent(_, rereferenceIndex) {\n * const result = [{type: 'text', value: '↩'}]\n *\n * if (rereferenceIndex > 1) {\n * result.push({\n * type: 'element',\n * tagName: 'sup',\n * properties: {},\n * children: [{type: 'text', value: String(rereferenceIndex)}]\n * })\n * }\n *\n * return result\n * }\n * ```\n *\n * This content is used in the `a` element of each backreference (the `↩`\n * links).\n * @property {FootnoteBackLabelTemplate | string | null | undefined} [footnoteBackLabel]\n * Label to describe the backreference back to references (default:\n * `defaultFootnoteBackLabel`).\n *\n * The default value is:\n *\n * ```js\n * function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {\n * return (\n * 'Back to reference ' +\n * (referenceIndex + 1) +\n * (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')\n * )\n * }\n * ```\n *\n * Change it when the markdown is not in English.\n *\n * This label is used in the `ariaLabel` property on each backreference\n * (the `↩` links).\n * It affects users of assistive technology.\n * @property {string | null | undefined} [footnoteLabel='Footnotes']\n * Textual label to use for the footnotes section (default: `'Footnotes'`).\n *\n * Change it when the markdown is not in English.\n *\n * This label is typically hidden visually (assuming a `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass different properties with the `footnoteLabelProperties` option.\n * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]\n * Properties to use on the footnote label (default: `{className:\n * ['sr-only']}`).\n *\n * Change it to show the label and add other properties.\n *\n * This label is typically hidden visually (assuming an `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass an empty string.\n * You can also add different properties.\n *\n * > **Note**: `id: 'footnote-label'` is always added, because footnote\n * > calls use it with `aria-describedby` to provide an accessible label.\n * @property {string | null | undefined} [footnoteLabelTagName='h2']\n * HTML tag name to use for the footnote label element (default: `'h2'`).\n *\n * Change it to match your document structure.\n *\n * This label is typically hidden visually (assuming a `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass different properties with the `footnoteLabelProperties` option.\n * @property {Handlers | null | undefined} [handlers]\n * Extra handlers for nodes (optional).\n * @property {Array<MdastNodes['type']> | null | undefined} [passThrough]\n * List of custom mdast node types to pass through (keep) in hast (note that\n * the node itself is passed, but eventual children are transformed)\n * (optional).\n * @property {Handler | null | undefined} [unknownHandler]\n * Handler for all unknown nodes (optional).\n *\n * @typedef State\n * Info passed around.\n * @property {(node: MdastNodes) => Array<HastElementContent>} all\n * Transform the children of an mdast parent to hast.\n * @property {<Type extends HastNodes>(from: MdastNodes, to: Type) => HastElement | Type} applyData\n * Honor the `data` of `from`, and generate an element instead of `node`.\n * @property {Map<string, MdastDefinition>} definitionById\n * Definitions by their identifier.\n * @property {Map<string, MdastFootnoteDefinition>} footnoteById\n * Footnote definitions by their identifier.\n * @property {Map<string, number>} footnoteCounts\n * Counts for how often the same footnote was called.\n * @property {Array<string>} footnoteOrder\n * Identifiers of order when footnote calls first appear in tree order.\n * @property {Handlers} handlers\n * Applied handlers.\n * @property {(node: MdastNodes, parent: MdastParents | undefined) => Array<HastElementContent> | HastElementContent | undefined} one\n * Transform an mdast node to hast.\n * @property {Options} options\n * Configuration.\n * @property {(from: MdastNodes, node: HastNodes) => undefined} patch\n * Copy a node’s positional info.\n * @property {<Type extends HastRootContent>(nodes: Array<Type>, loose?: boolean | undefined) => Array<HastText | Type>} wrap\n * Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.\n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {visit} from 'unist-util-visit'\nimport {position} from 'unist-util-position'\nimport {handlers as defaultHandlers} from './handlers/index.js'\n\nconst own = {}.hasOwnProperty\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Create `state` from an mdast tree.\n *\n * @param {MdastNodes} tree\n * mdast node to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {State}\n * `state` function.\n */\nexport function createState(tree, options) {\n const settings = options || emptyOptions\n /** @type {Map<string, MdastDefinition>} */\n const definitionById = new Map()\n /** @type {Map<string, MdastFootnoteDefinition>} */\n const footnoteById = new Map()\n /** @type {Map<string, number>} */\n const footnoteCounts = new Map()\n /** @type {Handlers} */\n // @ts-expect-error: the root handler returns a root.\n // Hard to type.\n const handlers = {...defaultHandlers, ...settings.handlers}\n\n /** @type {State} */\n const state = {\n all,\n applyData,\n definitionById,\n footnoteById,\n footnoteCounts,\n footnoteOrder: [],\n handlers,\n one,\n options: settings,\n patch,\n wrap\n }\n\n visit(tree, function (node) {\n if (node.type === 'definition' || node.type === 'footnoteDefinition') {\n const map = node.type === 'definition' ? definitionById : footnoteById\n const id = String(node.identifier).toUpperCase()\n\n // Mimick CM behavior of link definitions.\n // See: <https://github.com/syntax-tree/mdast-util-definitions/blob/9032189/lib/index.js#L20-L21>.\n if (!map.has(id)) {\n // @ts-expect-error: node type matches map.\n map.set(id, node)\n }\n }\n })\n\n return state\n\n /**\n * Transform an mdast node into a hast node.\n *\n * @param {MdastNodes} node\n * mdast node.\n * @param {MdastParents | undefined} [parent]\n * Parent of `node`.\n * @returns {Array<HastElementContent> | HastElementContent | undefined}\n * Resulting hast node.\n */\n function one(node, parent) {\n const type = node.type\n const handle = state.handlers[type]\n\n if (own.call(state.handlers, type) && handle) {\n return handle(state, node, parent)\n }\n\n if (state.options.passThrough && state.options.passThrough.includes(type)) {\n if ('children' in node) {\n const {children, ...shallow} = node\n const result = structuredClone(shallow)\n // @ts-expect-error: TS doesn’t understand…\n result.children = state.all(node)\n // @ts-expect-error: TS doesn’t understand…\n return result\n }\n\n // @ts-expect-error: it’s custom.\n return structuredClone(node)\n }\n\n const unknown = state.options.unknownHandler || defaultUnknownHandler\n\n return unknown(state, node, parent)\n }\n\n /**\n * Transform the children of an mdast node into hast nodes.\n *\n * @param {MdastNodes} parent\n * mdast node to compile\n * @returns {Array<HastElementContent>}\n * Resulting hast nodes.\n */\n function all(parent) {\n /** @type {Array<HastElementContent>} */\n const values = []\n\n if ('children' in parent) {\n const nodes = parent.children\n let index = -1\n while (++index < nodes.length) {\n const result = state.one(nodes[index], parent)\n\n // To do: see if we van clean this? Can we merge texts?\n if (result) {\n if (index && nodes[index - 1].type === 'break') {\n if (!Array.isArray(result) && result.type === 'text') {\n result.value = trimMarkdownSpaceStart(result.value)\n }\n\n if (!Array.isArray(result) && result.type === 'element') {\n const head = result.children[0]\n\n if (head && head.type === 'text') {\n head.value = trimMarkdownSpaceStart(head.value)\n }\n }\n }\n\n if (Array.isArray(result)) {\n values.push(...result)\n } else {\n values.push(result)\n }\n }\n }\n }\n\n return values\n }\n}\n\n/**\n * Copy a node’s positional info.\n *\n * @param {MdastNodes} from\n * mdast node to copy from.\n * @param {HastNodes} to\n * hast node to copy into.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(from, to) {\n if (from.position) to.position = position(from)\n}\n\n/**\n * Honor the `data` of `from` and maybe generate an element instead of `to`.\n *\n * @template {HastNodes} Type\n * Node type.\n * @param {MdastNodes} from\n * mdast node to use data from.\n * @param {Type} to\n * hast node to change.\n * @returns {HastElement | Type}\n * Nothing.\n */\nfunction applyData(from, to) {\n /** @type {HastElement | Type} */\n let result = to\n\n // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n if (from && from.data) {\n const hName = from.data.hName\n const hChildren = from.data.hChildren\n const hProperties = from.data.hProperties\n\n if (typeof hName === 'string') {\n // Transforming the node resulted in an element with a different name\n // than wanted:\n if (result.type === 'element') {\n result.tagName = hName\n }\n // Transforming the node resulted in a non-element, which happens for\n // raw, text, and root nodes (unless custom handlers are passed).\n // The intent of `hName` is to create an element, but likely also to keep\n // the content around (otherwise: pass `hChildren`).\n else {\n /** @type {Array<HastElementContent>} */\n // @ts-expect-error: assume no doctypes in `root`.\n const children = 'children' in result ? result.children : [result]\n result = {type: 'element', tagName: hName, properties: {}, children}\n }\n }\n\n if (result.type === 'element' && hProperties) {\n Object.assign(result.properties, structuredClone(hProperties))\n }\n\n if (\n 'children' in result &&\n result.children &&\n hChildren !== null &&\n hChildren !== undefined\n ) {\n result.children = hChildren\n }\n }\n\n return result\n}\n\n/**\n * Transform an unknown node.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdastNodes} node\n * Unknown mdast node.\n * @returns {HastElement | HastText}\n * Resulting hast node.\n */\nfunction defaultUnknownHandler(state, node) {\n const data = node.data || {}\n /** @type {HastElement | HastText} */\n const result =\n 'value' in node &&\n !(own.call(data, 'hProperties') || own.call(data, 'hChildren'))\n ? {type: 'text', value: node.value}\n : {\n type: 'element',\n tagName: 'div',\n properties: {},\n children: state.all(node)\n }\n\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * Wrap `nodes` with line endings between each node.\n *\n * @template {HastRootContent} Type\n * Node type.\n * @param {Array<Type>} nodes\n * List of nodes to wrap.\n * @param {boolean | undefined} [loose=false]\n * Whether to add line endings at start and end (default: `false`).\n * @returns {Array<HastText | Type>}\n * Wrapped nodes.\n */\nexport function wrap(nodes, loose) {\n /** @type {Array<HastText | Type>} */\n const result = []\n let index = -1\n\n if (loose) {\n result.push({type: 'text', value: '\\n'})\n }\n\n while (++index < nodes.length) {\n if (index) result.push({type: 'text', value: '\\n'})\n result.push(nodes[index])\n }\n\n if (loose && nodes.length > 0) {\n result.push({type: 'text', value: '\\n'})\n }\n\n return result\n}\n\n/**\n * Trim spaces and tabs at the start of `value`.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Result.\n */\nfunction trimMarkdownSpaceStart(value) {\n let index = 0\n let code = value.charCodeAt(index)\n\n while (code === 9 || code === 32) {\n index++\n code = value.charCodeAt(index)\n }\n\n return value.slice(index)\n}\n","/**\n * @import {Nodes as HastNodes} from 'hast'\n * @import {Nodes as MdastNodes} from 'mdast'\n * @import {Options} from './state.js'\n */\n\nimport {ok as assert} from 'devlop'\nimport {footer} from './footer.js'\nimport {createState} from './state.js'\n\n/**\n * Transform mdast to hast.\n *\n * ##### Notes\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most utilities ignore `raw` nodes but two notable ones don’t:\n *\n * * `hast-util-to-html` also has an option `allowDangerousHtml` which will\n * output the raw HTML.\n * This is typically discouraged as noted by the option name but is useful\n * if you completely trust authors\n * * `hast-util-raw` can handle the raw embedded HTML strings by parsing them\n * into standard hast nodes (`element`, `text`, etc).\n * This is a heavy task as it needs a full HTML parser, but it is the only\n * way to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark, which we follow by default.\n * They are supported by GitHub, so footnotes can be enabled in markdown with\n * `mdast-util-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes, which is hidden for sighted users but shown to\n * assistive technology.\n * When your page is not in English, you must define translated values.\n *\n * Back references use ARIA attributes, but the section label itself uses a\n * heading that is hidden with an `sr-only` class.\n * To show it to sighted users, define different attributes in\n * `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem, as it links footnote calls to footnote\n * definitions on the page through `id` attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n * <p id=x></p>\n * <script>alert(x) // `x` now refers to the DOM `p#x` element</script>\n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * Example: headings (DOM clobbering) in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value` (and doesn’t have `data.hName`,\n * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`\n * node\n * * otherwise, create a `<div>` element (which could be changed with\n * `data.hName`), with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @param {MdastNodes} tree\n * mdast tree.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {HastNodes}\n * hast tree.\n */\nexport function toHast(tree, options) {\n const state = createState(tree, options)\n const node = state.one(tree, undefined)\n const foot = footer(state)\n /** @type {HastNodes} */\n const result = Array.isArray(node)\n ? {type: 'root', children: node}\n : node || {type: 'root', children: []}\n\n if (foot) {\n // If there’s a footer, there were definitions, meaning block\n // content.\n // So `result` is a parent node.\n assert('children' in result)\n result.children.push({type: 'text', value: '\\n'}, foot)\n }\n\n return result\n}\n","/**\n * @import {Root as HastRoot} from 'hast'\n * @import {Root as MdastRoot} from 'mdast'\n * @import {Options as ToHastOptions} from 'mdast-util-to-hast'\n * @import {Processor} from 'unified'\n * @import {VFile} from 'vfile'\n */\n\n/**\n * @typedef {Omit<ToHastOptions, 'file'>} Options\n *\n * @callback TransformBridge\n * Bridge-mode.\n *\n * Runs the destination with the new hast tree.\n * Discards result.\n * @param {MdastRoot} tree\n * Tree.\n * @param {VFile} file\n * File.\n * @returns {Promise<undefined>}\n * Nothing.\n *\n * @callback TransformMutate\n * Mutate-mode.\n *\n * Further transformers run on the hast tree.\n * @param {MdastRoot} tree\n * Tree.\n * @param {VFile} file\n * File.\n * @returns {HastRoot}\n * Tree (hast).\n */\n\nimport {toHast} from 'mdast-util-to-hast'\n\n/**\n * Turn markdown into HTML.\n *\n * ##### Notes\n *\n * ###### Signature\n *\n * * if a processor is given,\n * runs the (rehype) plugins used on it with a hast tree,\n * then discards the result (*bridge mode*)\n * * otherwise,\n * returns a hast tree,\n * the plugins used after `remarkRehype` are rehype plugins (*mutate mode*)\n *\n * > 👉 **Note**:\n * > It’s highly unlikely that you want to pass a `processor`.\n *\n * ###### HTML\n *\n * Raw HTML is available in mdast as `html` nodes and can be embedded in hast\n * as semistandard `raw` nodes.\n * Most plugins ignore `raw` nodes but two notable ones don’t:\n *\n * * `rehype-stringify` also has an option `allowDangerousHtml` which will\n * output the raw HTML.\n * This is typically discouraged as noted by the option name but is useful if\n * you completely trust authors\n * * `rehype-raw` can handle the raw embedded HTML strings by parsing them\n * into standard hast nodes (`element`, `text`, etc);\n * this is a heavy task as it needs a full HTML parser,\n * but it is the only way to support untrusted content\n *\n * ###### Footnotes\n *\n * Many options supported here relate to footnotes.\n * Footnotes are not specified by CommonMark,\n * which we follow by default.\n * They are supported by GitHub,\n * so footnotes can be enabled in markdown with `remark-gfm`.\n *\n * The options `footnoteBackLabel` and `footnoteLabel` define natural language\n * that explains footnotes,\n * which is hidden for sighted users but shown to assistive technology.\n * When your page is not in English,\n * you must define translated values.\n *\n * Back references use ARIA attributes,\n * but the section label itself uses a heading that is hidden with an\n * `sr-only` class.\n * To show it to sighted users,\n * define different attributes in `footnoteLabelProperties`.\n *\n * ###### Clobbering\n *\n * Footnotes introduces a problem,\n * as it links footnote calls to footnote definitions on the page through `id`\n * attributes generated from user content,\n * which results in DOM clobbering.\n *\n * DOM clobbering is this:\n *\n * ```html\n * <p id=x></p>\n * <script>alert(x) // `x` now refers to the DOM `p#x` element</script>\n * ```\n *\n * Elements by their ID are made available by browsers on the `window` object,\n * which is a security risk.\n * Using a prefix solves this problem.\n *\n * More information on how to handle clobbering and the prefix is explained in\n * *Example: headings (DOM clobbering)* in `rehype-sanitize`.\n *\n * ###### Unknown nodes\n *\n * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.\n * The default behavior for unknown nodes is:\n *\n * * when the node has a `value`\n * (and doesn’t have `data.hName`, `data.hProperties`, or `data.hChildren`,\n * see later),\n * create a hast `text` node\n * * otherwise,\n * create a `<div>` element (which could be changed with `data.hName`),\n * with its children mapped from mdast to hast as well\n *\n * This behavior can be changed by passing an `unknownHandler`.\n *\n * @overload\n * @param {Processor} processor\n * @param {Readonly<Options> | null | undefined} [options]\n * @returns {TransformBridge}\n *\n * @overload\n * @param {Readonly<Options> | null | undefined} [options]\n * @returns {TransformMutate}\n *\n * @overload\n * @param {Readonly<Options> | Processor | null | undefined} [destination]\n * @param {Readonly<Options> | null | undefined} [options]\n * @returns {TransformBridge | TransformMutate}\n *\n * @param {Readonly<Options> | Processor | null | undefined} [destination]\n * Processor or configuration (optional).\n * @param {Readonly<Options> | null | undefined} [options]\n * When a processor was given,\n * configuration (optional).\n * @returns {TransformBridge | TransformMutate}\n * Transform.\n */\nexport default function remarkRehype(destination, options) {\n if (destination && 'run' in destination) {\n /**\n * @type {TransformBridge}\n */\n return async function (tree, file) {\n // Cast because root in -> root out.\n const hastTree = /** @type {HastRoot} */ (\n toHast(tree, {file, ...options})\n )\n await destination.run(hastTree, file)\n }\n }\n\n /**\n * @type {TransformMutate}\n */\n return function (tree, file) {\n // Cast because root in -> root out.\n // To do: in the future, disallow ` || options` fallback.\n // With `unified-engine`, `destination` can be `undefined` but\n // `options` will be the file set.\n // We should not pass that as `options`.\n return /** @type {HastRoot} */ (\n toHast(tree, {file, ...(destination || options)})\n )\n }\n}\n","/**\n * Throw a given error.\n *\n * @param {Error|null|undefined} [error]\n * Maybe error.\n * @returns {asserts error is null|undefined}\n */\nexport function bail(error) {\n if (error) {\n throw error\n }\n}\n","'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar defineProperty = Object.defineProperty;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nvar isArray = function isArray(arr) {\n\tif (typeof Array.isArray === 'function') {\n\t\treturn Array.isArray(arr);\n\t}\n\n\treturn toStr.call(arr) === '[object Array]';\n};\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) { /**/ }\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\n// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target\nvar setProperty = function setProperty(target, options) {\n\tif (defineProperty && options.name === '__proto__') {\n\t\tdefineProperty(target, options.name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tvalue: options.newValue,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\ttarget[options.name] = options.newValue;\n\t}\n};\n\n// Return undefined instead of __proto__ if '__proto__' is not an own property\nvar getProperty = function getProperty(obj, name) {\n\tif (name === '__proto__') {\n\t\tif (!hasOwn.call(obj, name)) {\n\t\t\treturn void 0;\n\t\t} else if (gOPD) {\n\t\t\t// In early versions of node, obj['__proto__'] is buggy when obj has\n\t\t\t// __proto__ as an own property. Object.getOwnPropertyDescriptor() works.\n\t\t\treturn gOPD(obj, name).value;\n\t\t}\n\t}\n\n\treturn obj[name];\n};\n\nmodule.exports = function extend() {\n\tvar options, name, src, copy, copyIsArray, clone;\n\tvar target = arguments[0];\n\tvar i = 1;\n\tvar length = arguments.length;\n\tvar deep = false;\n\n\t// Handle a deep copy situation\n\tif (typeof target === 'boolean') {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\tif (target == null || (typeof target !== 'object' && typeof target !== 'function')) {\n\t\ttarget = {};\n\t}\n\n\tfor (; i < length; ++i) {\n\t\toptions = arguments[i];\n\t\t// Only deal with non-null/undefined values\n\t\tif (options != null) {\n\t\t\t// Extend the base object\n\t\t\tfor (name in options) {\n\t\t\t\tsrc = getProperty(target, name);\n\t\t\t\tcopy = getProperty(options, name);\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif (target !== copy) {\n\t\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\t\tif (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n\t\t\t\t\t\tif (copyIsArray) {\n\t\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\t\tclone = src && isArray(src) ? src : [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tclone = src && isPlainObject(src) ? src : {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: extend(deep, clone, copy) });\n\n\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t} else if (typeof copy !== 'undefined') {\n\t\t\t\t\t\tsetProperty(target, { name: name, newValue: copy });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n","export default function isPlainObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);\n}\n","// To do: remove `void`s\n// To do: remove `null` from output of our APIs, allow it as user APIs.\n\n/**\n * @typedef {(error?: Error | null | undefined, ...output: Array<any>) => void} Callback\n * Callback.\n *\n * @typedef {(...input: Array<any>) => any} Middleware\n * Ware.\n *\n * @typedef Pipeline\n * Pipeline.\n * @property {Run} run\n * Run the pipeline.\n * @property {Use} use\n * Add middleware.\n *\n * @typedef {(...input: Array<any>) => void} Run\n * Call all middleware.\n *\n * Calls `done` on completion with either an error or the output of the\n * last middleware.\n *\n * > 👉 **Note**: as the length of input defines whether async functions get a\n * > `next` function,\n * > it’s recommended to keep `input` at one value normally.\n\n *\n * @typedef {(fn: Middleware) => Pipeline} Use\n * Add middleware.\n */\n\n/**\n * Create new middleware.\n *\n * @returns {Pipeline}\n * Pipeline.\n */\nexport function trough() {\n /** @type {Array<Middleware>} */\n const fns = []\n /** @type {Pipeline} */\n const pipeline = {run, use}\n\n return pipeline\n\n /** @type {Run} */\n function run(...values) {\n let middlewareIndex = -1\n /** @type {Callback} */\n const callback = values.pop()\n\n if (typeof callback !== 'function') {\n throw new TypeError('Expected function as last argument, not ' + callback)\n }\n\n next(null, ...values)\n\n /**\n * Run the next `fn`, or we’re done.\n *\n * @param {Error | null | undefined} error\n * @param {Array<any>} output\n */\n function next(error, ...output) {\n const fn = fns[++middlewareIndex]\n let index = -1\n\n if (error) {\n callback(error)\n return\n }\n\n // Copy non-nullish input into values.\n while (++index < values.length) {\n if (output[index] === null || output[index] === undefined) {\n output[index] = values[index]\n }\n }\n\n // Save the newly created `output` for the next call.\n values = output\n\n // Next or done.\n if (fn) {\n wrap(fn, next)(...output)\n } else {\n callback(null, ...output)\n }\n }\n }\n\n /** @type {Use} */\n function use(middelware) {\n if (typeof middelware !== 'function') {\n throw new TypeError(\n 'Expected `middelware` to be a function, not ' + middelware\n )\n }\n\n fns.push(middelware)\n return pipeline\n }\n}\n\n/**\n * Wrap `middleware` into a uniform interface.\n *\n * You can pass all input to the resulting function.\n * `callback` is then called with the output of `middleware`.\n *\n * If `middleware` accepts more arguments than the later given in input,\n * an extra `done` function is passed to it after that input,\n * which must be called by `middleware`.\n *\n * The first value in `input` is the main input value.\n * All other input values are the rest input values.\n * The values given to `callback` are the input values,\n * merged with every non-nullish output value.\n *\n * * if `middleware` throws an error,\n * returns a promise that is rejected,\n * or calls the given `done` function with an error,\n * `callback` is called with that error\n * * if `middleware` returns a value or returns a promise that is resolved,\n * that value is the main output value\n * * if `middleware` calls `done`,\n * all non-nullish values except for the first one (the error) overwrite the\n * output values\n *\n * @param {Middleware} middleware\n * Function to wrap.\n * @param {Callback} callback\n * Callback called with the output of `middleware`.\n * @returns {Run}\n * Wrapped middleware.\n */\nexport function wrap(middleware, callback) {\n /** @type {boolean} */\n let called\n\n return wrapped\n\n /**\n * Call `middleware`.\n * @this {any}\n * @param {Array<any>} parameters\n * @returns {void}\n */\n function wrapped(...parameters) {\n const fnExpectsCallback = middleware.length > parameters.length\n /** @type {any} */\n let result\n\n if (fnExpectsCallback) {\n parameters.push(done)\n }\n\n try {\n result = middleware.apply(this, parameters)\n } catch (error) {\n const exception = /** @type {Error} */ (error)\n\n // Well, this is quite the pickle.\n // `middleware` received a callback and called it synchronously, but that\n // threw an error.\n // The only thing left to do is to throw the thing instead.\n if (fnExpectsCallback && called) {\n throw exception\n }\n\n return done(exception)\n }\n\n if (!fnExpectsCallback) {\n if (result && result.then && typeof result.then === 'function') {\n result.then(then, done)\n } else if (result instanceof Error) {\n done(result)\n } else {\n then(result)\n }\n }\n }\n\n /**\n * Call `callback`, only once.\n *\n * @type {Callback}\n */\n function done(error, ...output) {\n if (!called) {\n called = true\n callback(error, ...output)\n }\n }\n\n /**\n * Call `done` with one value.\n *\n * @param {any} [value]\n */\n function then(value) {\n done(null, value)\n }\n}\n","// A derivative work based on:\n// <https://github.com/browserify/path-browserify>.\n// Which is licensed:\n//\n// MIT License\n//\n// Copyright (c) 2013 James Halliday\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n// A derivative work based on:\n//\n// Parts of that are extracted from Node’s internal `path` module:\n// <https://github.com/nodejs/node/blob/master/lib/path.js>.\n// Which is licensed:\n//\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nexport const minpath = {basename, dirname, extname, join, sep: '/'}\n\n/* eslint-disable max-depth, complexity */\n\n/**\n * Get the basename from a path.\n *\n * @param {string} path\n * File path.\n * @param {string | null | undefined} [extname]\n * Extension to strip.\n * @returns {string}\n * Stem or basename.\n */\nfunction basename(path, extname) {\n if (extname !== undefined && typeof extname !== 'string') {\n throw new TypeError('\"ext\" argument must be a string')\n }\n\n assertPath(path)\n let start = 0\n let end = -1\n let index = path.length\n /** @type {boolean | undefined} */\n let seenNonSlash\n\n if (\n extname === undefined ||\n extname.length === 0 ||\n extname.length > path.length\n ) {\n while (index--) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1\n break\n }\n } else if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // path component.\n seenNonSlash = true\n end = index + 1\n }\n }\n\n return end < 0 ? '' : path.slice(start, end)\n }\n\n if (extname === path) {\n return ''\n }\n\n let firstNonSlashEnd = -1\n let extnameIndex = extname.length - 1\n\n while (index--) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (seenNonSlash) {\n start = index + 1\n break\n }\n } else {\n if (firstNonSlashEnd < 0) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching.\n seenNonSlash = true\n firstNonSlashEnd = index + 1\n }\n\n if (extnameIndex > -1) {\n // Try to match the explicit extension.\n if (path.codePointAt(index) === extname.codePointAt(extnameIndex--)) {\n if (extnameIndex < 0) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = index\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extnameIndex = -1\n end = firstNonSlashEnd\n }\n }\n }\n }\n\n if (start === end) {\n end = firstNonSlashEnd\n } else if (end < 0) {\n end = path.length\n }\n\n return path.slice(start, end)\n}\n\n/**\n * Get the dirname from a path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * File path.\n */\nfunction dirname(path) {\n assertPath(path)\n\n if (path.length === 0) {\n return '.'\n }\n\n let end = -1\n let index = path.length\n /** @type {boolean | undefined} */\n let unmatchedSlash\n\n // Prefix `--` is important to not run on `0`.\n while (--index) {\n if (path.codePointAt(index) === 47 /* `/` */) {\n if (unmatchedSlash) {\n end = index\n break\n }\n } else if (!unmatchedSlash) {\n // We saw the first non-path separator\n unmatchedSlash = true\n }\n }\n\n return end < 0\n ? path.codePointAt(0) === 47 /* `/` */\n ? '/'\n : '.'\n : end === 1 && path.codePointAt(0) === 47 /* `/` */\n ? '//'\n : path.slice(0, end)\n}\n\n/**\n * Get an extname from a path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * Extname.\n */\nfunction extname(path) {\n assertPath(path)\n\n let index = path.length\n\n let end = -1\n let startPart = 0\n let startDot = -1\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find.\n let preDotState = 0\n /** @type {boolean | undefined} */\n let unmatchedSlash\n\n while (index--) {\n const code = path.codePointAt(index)\n\n if (code === 47 /* `/` */) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now.\n if (unmatchedSlash) {\n startPart = index + 1\n break\n }\n\n continue\n }\n\n if (end < 0) {\n // We saw the first non-path separator, mark this as the end of our\n // extension.\n unmatchedSlash = true\n end = index + 1\n }\n\n if (code === 46 /* `.` */) {\n // If this is our first dot, mark it as the start of our extension.\n if (startDot < 0) {\n startDot = index\n } else if (preDotState !== 1) {\n preDotState = 1\n }\n } else if (startDot > -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension.\n preDotState = -1\n }\n }\n\n if (\n startDot < 0 ||\n end < 0 ||\n // We saw a non-dot character immediately before the dot.\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly `..`.\n (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)\n ) {\n return ''\n }\n\n return path.slice(startDot, end)\n}\n\n/**\n * Join segments from a path.\n *\n * @param {Array<string>} segments\n * Path segments.\n * @returns {string}\n * File path.\n */\nfunction join(...segments) {\n let index = -1\n /** @type {string | undefined} */\n let joined\n\n while (++index < segments.length) {\n assertPath(segments[index])\n\n if (segments[index]) {\n joined =\n joined === undefined ? segments[index] : joined + '/' + segments[index]\n }\n }\n\n return joined === undefined ? '.' : normalize(joined)\n}\n\n/**\n * Normalize a basic file path.\n *\n * @param {string} path\n * File path.\n * @returns {string}\n * File path.\n */\n// Note: `normalize` is not exposed as `path.normalize`, so some code is\n// manually removed from it.\nfunction normalize(path) {\n assertPath(path)\n\n const absolute = path.codePointAt(0) === 47 /* `/` */\n\n // Normalize the path according to POSIX rules.\n let value = normalizeString(path, !absolute)\n\n if (value.length === 0 && !absolute) {\n value = '.'\n }\n\n if (value.length > 0 && path.codePointAt(path.length - 1) === 47 /* / */) {\n value += '/'\n }\n\n return absolute ? '/' + value : value\n}\n\n/**\n * Resolve `.` and `..` elements in a path with directory names.\n *\n * @param {string} path\n * File path.\n * @param {boolean} allowAboveRoot\n * Whether `..` can move above root.\n * @returns {string}\n * File path.\n */\nfunction normalizeString(path, allowAboveRoot) {\n let result = ''\n let lastSegmentLength = 0\n let lastSlash = -1\n let dots = 0\n let index = -1\n /** @type {number | undefined} */\n let code\n /** @type {number} */\n let lastSlashIndex\n\n while (++index <= path.length) {\n if (index < path.length) {\n code = path.codePointAt(index)\n } else if (code === 47 /* `/` */) {\n break\n } else {\n code = 47 /* `/` */\n }\n\n if (code === 47 /* `/` */) {\n if (lastSlash === index - 1 || dots === 1) {\n // Empty.\n } else if (lastSlash !== index - 1 && dots === 2) {\n if (\n result.length < 2 ||\n lastSegmentLength !== 2 ||\n result.codePointAt(result.length - 1) !== 46 /* `.` */ ||\n result.codePointAt(result.length - 2) !== 46 /* `.` */\n ) {\n if (result.length > 2) {\n lastSlashIndex = result.lastIndexOf('/')\n\n if (lastSlashIndex !== result.length - 1) {\n if (lastSlashIndex < 0) {\n result = ''\n lastSegmentLength = 0\n } else {\n result = result.slice(0, lastSlashIndex)\n lastSegmentLength = result.length - 1 - result.lastIndexOf('/')\n }\n\n lastSlash = index\n dots = 0\n continue\n }\n } else if (result.length > 0) {\n result = ''\n lastSegmentLength = 0\n lastSlash = index\n dots = 0\n continue\n }\n }\n\n if (allowAboveRoot) {\n result = result.length > 0 ? result + '/..' : '..'\n lastSegmentLength = 2\n }\n } else {\n if (result.length > 0) {\n result += '/' + path.slice(lastSlash + 1, index)\n } else {\n result = path.slice(lastSlash + 1, index)\n }\n\n lastSegmentLength = index - lastSlash - 1\n }\n\n lastSlash = index\n dots = 0\n } else if (code === 46 /* `.` */ && dots > -1) {\n dots++\n } else {\n dots = -1\n }\n }\n\n return result\n}\n\n/**\n * Make sure `path` is a string.\n *\n * @param {string} path\n * File path.\n * @returns {asserts path is string}\n * Nothing.\n */\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError(\n 'Path must be a string. Received ' + JSON.stringify(path)\n )\n }\n}\n\n/* eslint-enable max-depth, complexity */\n","// Somewhat based on:\n// <https://github.com/defunctzombie/node-process/blob/master/browser.js>.\n// But I don’t think one tiny line of code can be copyrighted. 😅\nexport const minproc = {cwd}\n\nfunction cwd() {\n return '/'\n}\n","/**\n * Checks if a value has the shape of a WHATWG URL object.\n *\n * Using a symbol or instanceof would not be able to recognize URL objects\n * coming from other implementations (e.g. in Electron), so instead we are\n * checking some well known properties for a lack of a better test.\n *\n * We use `href` and `protocol` as they are the only properties that are\n * easy to retrieve and calculate due to the lazy nature of the getters.\n *\n * We check for auth attribute to distinguish legacy url instance with\n * WHATWG URL instance.\n *\n * @param {unknown} fileUrlOrPath\n * File path or URL.\n * @returns {fileUrlOrPath is URL}\n * Whether it’s a URL.\n */\n// From: <https://github.com/nodejs/node/blob/6a3403c/lib/internal/url.js#L720>\nexport function isUrl(fileUrlOrPath) {\n return Boolean(\n fileUrlOrPath !== null &&\n typeof fileUrlOrPath === 'object' &&\n 'href' in fileUrlOrPath &&\n fileUrlOrPath.href &&\n 'protocol' in fileUrlOrPath &&\n fileUrlOrPath.protocol &&\n // @ts-expect-error: indexing is fine.\n fileUrlOrPath.auth === undefined\n )\n}\n","import {isUrl} from './minurl.shared.js'\n\nexport {isUrl} from './minurl.shared.js'\n\n// See: <https://github.com/nodejs/node/blob/6a3403c/lib/internal/url.js>\n\n/**\n * @param {URL | string} path\n * File URL.\n * @returns {string}\n * File URL.\n */\nexport function urlToPath(path) {\n if (typeof path === 'string') {\n path = new URL(path)\n } else if (!isUrl(path)) {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'The \"path\" argument must be of type string or an instance of URL. Received `' +\n path +\n '`'\n )\n error.code = 'ERR_INVALID_ARG_TYPE'\n throw error\n }\n\n if (path.protocol !== 'file:') {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError('The URL must be of scheme file')\n error.code = 'ERR_INVALID_URL_SCHEME'\n throw error\n }\n\n return getPathFromURLPosix(path)\n}\n\n/**\n * Get a path from a POSIX URL.\n *\n * @param {URL} url\n * URL.\n * @returns {string}\n * File path.\n */\nfunction getPathFromURLPosix(url) {\n if (url.hostname !== '') {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'File URL host must be \"localhost\" or empty on darwin'\n )\n error.code = 'ERR_INVALID_FILE_URL_HOST'\n throw error\n }\n\n const pathname = url.pathname\n let index = -1\n\n while (++index < pathname.length) {\n if (\n pathname.codePointAt(index) === 37 /* `%` */ &&\n pathname.codePointAt(index + 1) === 50 /* `2` */\n ) {\n const third = pathname.codePointAt(index + 2)\n if (third === 70 /* `F` */ || third === 102 /* `f` */) {\n /** @type {NodeJS.ErrnoException} */\n const error = new TypeError(\n 'File URL path must not include encoded / characters'\n )\n error.code = 'ERR_INVALID_FILE_URL_PATH'\n throw error\n }\n }\n }\n\n return decodeURIComponent(pathname)\n}\n","/**\n * @import {Node, Point, Position} from 'unist'\n * @import {Options as MessageOptions} from 'vfile-message'\n * @import {Compatible, Data, Map, Options, Value} from 'vfile'\n */\n\n/**\n * @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n */\n\nimport {VFileMessage} from 'vfile-message'\nimport {minpath} from '#minpath'\nimport {minproc} from '#minproc'\nimport {urlToPath, isUrl} from '#minurl'\n\n/**\n * Order of setting (least specific to most), we need this because otherwise\n * `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a\n * stem can be set.\n */\nconst order = /** @type {const} */ ([\n 'history',\n 'path',\n 'basename',\n 'stem',\n 'extname',\n 'dirname'\n])\n\nexport class VFile {\n /**\n * Create a new virtual file.\n *\n * `options` is treated as:\n *\n * * `string` or `Uint8Array` — `{value: options}`\n * * `URL` — `{path: options}`\n * * `VFile` — shallow copies its data over to the new file\n * * `object` — all fields are shallow copied over to the new file\n *\n * Path related fields are set in the following order (least specific to\n * most specific): `history`, `path`, `basename`, `stem`, `extname`,\n * `dirname`.\n *\n * You cannot set `dirname` or `extname` without setting either `history`,\n * `path`, `basename`, or `stem` too.\n *\n * @param {Compatible | null | undefined} [value]\n * File value.\n * @returns\n * New instance.\n */\n constructor(value) {\n /** @type {Options | VFile} */\n let options\n\n if (!value) {\n options = {}\n } else if (isUrl(value)) {\n options = {path: value}\n } else if (typeof value === 'string' || isUint8Array(value)) {\n options = {value}\n } else {\n options = value\n }\n\n /* eslint-disable no-unused-expressions */\n\n /**\n * Base of `path` (default: `process.cwd()` or `'/'` in browsers).\n *\n * @type {string}\n */\n // Prevent calling `cwd` (which could be expensive) if it’s not needed;\n // the empty string will be overridden in the next block.\n this.cwd = 'cwd' in options ? '' : minproc.cwd()\n\n /**\n * Place to store custom info (default: `{}`).\n *\n * It’s OK to store custom data directly on the file but moving it to\n * `data` is recommended.\n *\n * @type {Data}\n */\n this.data = {}\n\n /**\n * List of file paths the file moved between.\n *\n * The first is the original path and the last is the current path.\n *\n * @type {Array<string>}\n */\n this.history = []\n\n /**\n * List of messages associated with the file.\n *\n * @type {Array<VFileMessage>}\n */\n this.messages = []\n\n /**\n * Raw value.\n *\n * @type {Value}\n */\n this.value\n\n // The below are non-standard, they are “well-known”.\n // As in, used in several tools.\n /**\n * Source map.\n *\n * This type is equivalent to the `RawSourceMap` type from the `source-map`\n * module.\n *\n * @type {Map | null | undefined}\n */\n this.map\n\n /**\n * Custom, non-string, compiled, representation.\n *\n * This is used by unified to store non-string results.\n * One example is when turning markdown into React nodes.\n *\n * @type {unknown}\n */\n this.result\n\n /**\n * Whether a file was saved to disk.\n *\n * This is used by vfile reporters.\n *\n * @type {boolean}\n */\n this.stored\n /* eslint-enable no-unused-expressions */\n\n // Set path related properties in the correct order.\n let index = -1\n\n while (++index < order.length) {\n const field = order[index]\n\n // Note: we specifically use `in` instead of `hasOwnProperty` to accept\n // `vfile`s too.\n if (\n field in options &&\n options[field] !== undefined &&\n options[field] !== null\n ) {\n // @ts-expect-error: TS doesn’t understand basic reality.\n this[field] = field === 'history' ? [...options[field]] : options[field]\n }\n }\n\n /** @type {string} */\n let field\n\n // Set non-path related properties.\n for (field in options) {\n // @ts-expect-error: fine to set other things.\n if (!order.includes(field)) {\n // @ts-expect-error: fine to set other things.\n this[field] = options[field]\n }\n }\n }\n\n /**\n * Get the basename (including extname) (example: `'index.min.js'`).\n *\n * @returns {string | undefined}\n * Basename.\n */\n get basename() {\n return typeof this.path === 'string'\n ? minpath.basename(this.path)\n : undefined\n }\n\n /**\n * Set basename (including extname) (`'index.min.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} basename\n * Basename.\n * @returns {undefined}\n * Nothing.\n */\n set basename(basename) {\n assertNonEmpty(basename, 'basename')\n assertPart(basename, 'basename')\n this.path = minpath.join(this.dirname || '', basename)\n }\n\n /**\n * Get the parent path (example: `'~'`).\n *\n * @returns {string | undefined}\n * Dirname.\n */\n get dirname() {\n return typeof this.path === 'string'\n ? minpath.dirname(this.path)\n : undefined\n }\n\n /**\n * Set the parent path (example: `'~'`).\n *\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} dirname\n * Dirname.\n * @returns {undefined}\n * Nothing.\n */\n set dirname(dirname) {\n assertPath(this.basename, 'dirname')\n this.path = minpath.join(dirname || '', this.basename)\n }\n\n /**\n * Get the extname (including dot) (example: `'.js'`).\n *\n * @returns {string | undefined}\n * Extname.\n */\n get extname() {\n return typeof this.path === 'string'\n ? minpath.extname(this.path)\n : undefined\n }\n\n /**\n * Set the extname (including dot) (example: `'.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} extname\n * Extname.\n * @returns {undefined}\n * Nothing.\n */\n set extname(extname) {\n assertPart(extname, 'extname')\n assertPath(this.dirname, 'extname')\n\n if (extname) {\n if (extname.codePointAt(0) !== 46 /* `.` */) {\n throw new Error('`extname` must start with `.`')\n }\n\n if (extname.includes('.', 1)) {\n throw new Error('`extname` cannot contain multiple dots')\n }\n }\n\n this.path = minpath.join(this.dirname, this.stem + (extname || ''))\n }\n\n /**\n * Get the full path (example: `'~/index.min.js'`).\n *\n * @returns {string}\n * Path.\n */\n get path() {\n return this.history[this.history.length - 1]\n }\n\n /**\n * Set the full path (example: `'~/index.min.js'`).\n *\n * Cannot be nullified.\n * You can set a file URL (a `URL` object with a `file:` protocol) which will\n * be turned into a path with `url.fileURLToPath`.\n *\n * @param {URL | string} path\n * Path.\n * @returns {undefined}\n * Nothing.\n */\n set path(path) {\n if (isUrl(path)) {\n path = urlToPath(path)\n }\n\n assertNonEmpty(path, 'path')\n\n if (this.path !== path) {\n this.history.push(path)\n }\n }\n\n /**\n * Get the stem (basename w/o extname) (example: `'index.min'`).\n *\n * @returns {string | undefined}\n * Stem.\n */\n get stem() {\n return typeof this.path === 'string'\n ? minpath.basename(this.path, this.extname)\n : undefined\n }\n\n /**\n * Set the stem (basename w/o extname) (example: `'index.min'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} stem\n * Stem.\n * @returns {undefined}\n * Nothing.\n */\n set stem(stem) {\n assertNonEmpty(stem, 'stem')\n assertPart(stem, 'stem')\n this.path = minpath.join(this.dirname || '', stem + (this.extname || ''))\n }\n\n // Normal prototypal methods.\n /**\n * Create a fatal message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `true` (error; file not usable)\n * and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {never}\n * Never.\n * @throws {VFileMessage}\n * Message.\n */\n fail(causeOrReason, optionsOrParentOrPlace, origin) {\n // @ts-expect-error: the overloads are fine.\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin)\n\n message.fatal = true\n\n throw message\n }\n\n /**\n * Create an info message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `undefined` (info; change\n * likely not needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n info(causeOrReason, optionsOrParentOrPlace, origin) {\n // @ts-expect-error: the overloads are fine.\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin)\n\n message.fatal = undefined\n\n return message\n }\n\n /**\n * Create a message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `false` (warning; change may be\n * needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n message(causeOrReason, optionsOrParentOrPlace, origin) {\n const message = new VFileMessage(\n // @ts-expect-error: the overloads are fine.\n causeOrReason,\n optionsOrParentOrPlace,\n origin\n )\n\n if (this.path) {\n message.name = this.path + ':' + message.name\n message.file = this.path\n }\n\n message.fatal = false\n\n this.messages.push(message)\n\n return message\n }\n\n /**\n * Serialize the file.\n *\n * > **Note**: which encodings are supported depends on the engine.\n * > For info on Node.js, see:\n * > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.\n *\n * @param {string | null | undefined} [encoding='utf8']\n * Character encoding to understand `value` as when it’s a `Uint8Array`\n * (default: `'utf-8'`).\n * @returns {string}\n * Serialized file.\n */\n toString(encoding) {\n if (this.value === undefined) {\n return ''\n }\n\n if (typeof this.value === 'string') {\n return this.value\n }\n\n const decoder = new TextDecoder(encoding || undefined)\n return decoder.decode(this.value)\n }\n}\n\n/**\n * Assert that `part` is not a path (as in, does not contain `path.sep`).\n *\n * @param {string | null | undefined} part\n * File path part.\n * @param {string} name\n * Part name.\n * @returns {undefined}\n * Nothing.\n */\nfunction assertPart(part, name) {\n if (part && part.includes(minpath.sep)) {\n throw new Error(\n '`' + name + '` cannot be a path: did not expect `' + minpath.sep + '`'\n )\n }\n}\n\n/**\n * Assert that `part` is not empty.\n *\n * @param {string | undefined} part\n * Thing.\n * @param {string} name\n * Part name.\n * @returns {asserts part is string}\n * Nothing.\n */\nfunction assertNonEmpty(part, name) {\n if (!part) {\n throw new Error('`' + name + '` cannot be empty')\n }\n}\n\n/**\n * Assert `path` exists.\n *\n * @param {string | undefined} path\n * Path.\n * @param {string} name\n * Dependency name.\n * @returns {asserts path is string}\n * Nothing.\n */\nfunction assertPath(path, name) {\n if (!path) {\n throw new Error('Setting `' + name + '` requires `path` to be set too')\n }\n}\n\n/**\n * Assert `value` is an `Uint8Array`.\n *\n * @param {unknown} value\n * thing.\n * @returns {value is Uint8Array}\n * Whether `value` is an `Uint8Array`.\n */\nfunction isUint8Array(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'byteLength' in value &&\n 'byteOffset' in value\n )\n}\n","export const CallableInstance =\n /**\n * @type {new <Parameters extends Array<unknown>, Result>(property: string | symbol) => (...parameters: Parameters) => Result}\n */\n (\n /** @type {unknown} */\n (\n /**\n * @this {Function}\n * @param {string | symbol} property\n * @returns {(...parameters: Array<unknown>) => unknown}\n */\n function (property) {\n const self = this\n const constr = self.constructor\n const proto = /** @type {Record<string | symbol, Function>} */ (\n // Prototypes do exist.\n // type-coverage:ignore-next-line\n constr.prototype\n )\n const value = proto[property]\n /** @type {(...parameters: Array<unknown>) => unknown} */\n const apply = function () {\n return value.apply(apply, arguments)\n }\n\n Object.setPrototypeOf(apply, proto)\n\n // Not needed for us in `unified`: we only call this on the `copy`\n // function,\n // and we don't need to add its fields (`length`, `name`)\n // over.\n // See also: GH-246.\n // const names = Object.getOwnPropertyNames(value)\n //\n // for (const p of names) {\n // const descriptor = Object.getOwnPropertyDescriptor(value, p)\n // if (descriptor) Object.defineProperty(apply, p, descriptor)\n // }\n\n return apply\n }\n )\n )\n","/**\n * @typedef {import('trough').Pipeline} Pipeline\n *\n * @typedef {import('unist').Node} Node\n *\n * @typedef {import('vfile').Compatible} Compatible\n * @typedef {import('vfile').Value} Value\n *\n * @typedef {import('../index.js').CompileResultMap} CompileResultMap\n * @typedef {import('../index.js').Data} Data\n * @typedef {import('../index.js').Settings} Settings\n */\n\n/**\n * @typedef {CompileResultMap[keyof CompileResultMap]} CompileResults\n * Acceptable results from compilers.\n *\n * To register custom results, add them to\n * {@linkcode CompileResultMap}.\n */\n\n/**\n * @template {Node} [Tree=Node]\n * The node that the compiler receives (default: `Node`).\n * @template {CompileResults} [Result=CompileResults]\n * The thing that the compiler yields (default: `CompileResults`).\n * @callback Compiler\n * A **compiler** handles the compiling of a syntax tree to something else\n * (in most cases, text) (TypeScript type).\n *\n * It is used in the stringify phase and called with a {@linkcode Node}\n * and {@linkcode VFile} representation of the document to compile.\n * It should return the textual representation of the given tree (typically\n * `string`).\n *\n * > **Note**: unified typically compiles by serializing: most compilers\n * > return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n * @param {Tree} tree\n * Tree to compile.\n * @param {VFile} file\n * File associated with `tree`.\n * @returns {Result}\n * New content: compiled text (`string` or `Uint8Array`, for `file.value`) or\n * something else (for `file.result`).\n */\n\n/**\n * @template {Node} [Tree=Node]\n * The node that the parser yields (default: `Node`)\n * @callback Parser\n * A **parser** handles the parsing of text to a syntax tree.\n *\n * It is used in the parse phase and is called with a `string` and\n * {@linkcode VFile} of the document to parse.\n * It must return the syntax tree representation of the given file\n * ({@linkcode Node}).\n * @param {string} document\n * Document to parse.\n * @param {VFile} file\n * File associated with `document`.\n * @returns {Tree}\n * Node representing the given file.\n */\n\n/**\n * @typedef {(\n * Plugin<Array<any>, any, any> |\n * PluginTuple<Array<any>, any, any> |\n * Preset\n * )} Pluggable\n * Union of the different ways to add plugins and settings.\n */\n\n/**\n * @typedef {Array<Pluggable>} PluggableList\n * List of plugins and presets.\n */\n\n// Note: we can’t use `callback` yet as it messes up `this`:\n// <https://github.com/microsoft/TypeScript/issues/55197>.\n/**\n * @template {Array<unknown>} [PluginParameters=[]]\n * Arguments passed to the plugin (default: `[]`, the empty tuple).\n * @template {Node | string | undefined} [Input=Node]\n * Value that is expected as input (default: `Node`).\n *\n * * If the plugin returns a {@linkcode Transformer}, this\n * should be the node it expects.\n * * If the plugin sets a {@linkcode Parser}, this should be\n * `string`.\n * * If the plugin sets a {@linkcode Compiler}, this should be the\n * node it expects.\n * @template [Output=Input]\n * Value that is yielded as output (default: `Input`).\n *\n * * If the plugin returns a {@linkcode Transformer}, this\n * should be the node that that yields.\n * * If the plugin sets a {@linkcode Parser}, this should be the\n * node that it yields.\n * * If the plugin sets a {@linkcode Compiler}, this should be\n * result it yields.\n * @typedef {(\n * (this: Processor, ...parameters: PluginParameters) =>\n * Input extends string ? // Parser.\n * Output extends Node | undefined ? undefined | void : never :\n * Output extends CompileResults ? // Compiler.\n * Input extends Node | undefined ? undefined | void : never :\n * Transformer<\n * Input extends Node ? Input : Node,\n * Output extends Node ? Output : Node\n * > | undefined | void\n * )} Plugin\n * Single plugin.\n *\n * Plugins configure the processors they are applied on in the following\n * ways:\n *\n * * they change the processor, such as the parser, the compiler, or by\n * configuring data\n * * they specify how to handle trees and files\n *\n * In practice, they are functions that can receive options and configure the\n * processor (`this`).\n *\n * > **Note**: plugins are called when the processor is *frozen*, not when\n * > they are applied.\n */\n\n/**\n * Tuple of a plugin and its configuration.\n *\n * The first item is a plugin, the rest are its parameters.\n *\n * @template {Array<unknown>} [TupleParameters=[]]\n * Arguments passed to the plugin (default: `[]`, the empty tuple).\n * @template {Node | string | undefined} [Input=undefined]\n * Value that is expected as input (optional).\n *\n * * If the plugin returns a {@linkcode Transformer}, this\n * should be the node it expects.\n * * If the plugin sets a {@linkcode Parser}, this should be\n * `string`.\n * * If the plugin sets a {@linkcode Compiler}, this should be the\n * node it expects.\n * @template [Output=undefined] (optional).\n * Value that is yielded as output.\n *\n * * If the plugin returns a {@linkcode Transformer}, this\n * should be the node that that yields.\n * * If the plugin sets a {@linkcode Parser}, this should be the\n * node that it yields.\n * * If the plugin sets a {@linkcode Compiler}, this should be\n * result it yields.\n * @typedef {(\n * [\n * plugin: Plugin<TupleParameters, Input, Output>,\n * ...parameters: TupleParameters\n * ]\n * )} PluginTuple\n */\n\n/**\n * @typedef Preset\n * Sharable configuration.\n *\n * They can contain plugins and settings.\n * @property {PluggableList | undefined} [plugins]\n * List of plugins and presets (optional).\n * @property {Settings | undefined} [settings]\n * Shared settings for parsers and compilers (optional).\n */\n\n/**\n * @template {VFile} [File=VFile]\n * The file that the callback receives (default: `VFile`).\n * @callback ProcessCallback\n * Callback called when the process is done.\n *\n * Called with either an error or a result.\n * @param {Error | undefined} [error]\n * Fatal error (optional).\n * @param {File | undefined} [file]\n * Processed file (optional).\n * @returns {undefined}\n * Nothing.\n */\n\n/**\n * @template {Node} [Tree=Node]\n * The tree that the callback receives (default: `Node`).\n * @callback RunCallback\n * Callback called when transformers are done.\n *\n * Called with either an error or results.\n * @param {Error | undefined} [error]\n * Fatal error (optional).\n * @param {Tree | undefined} [tree]\n * Transformed tree (optional).\n * @param {VFile | undefined} [file]\n * File (optional).\n * @returns {undefined}\n * Nothing.\n */\n\n/**\n * @template {Node} [Output=Node]\n * Node type that the transformer yields (default: `Node`).\n * @callback TransformCallback\n * Callback passed to transforms.\n *\n * If the signature of a `transformer` accepts a third argument, the\n * transformer may perform asynchronous operations, and must call it.\n * @param {Error | undefined} [error]\n * Fatal error to stop the process (optional).\n * @param {Output | undefined} [tree]\n * New, changed, tree (optional).\n * @param {VFile | undefined} [file]\n * New, changed, file (optional).\n * @returns {undefined}\n * Nothing.\n */\n\n/**\n * @template {Node} [Input=Node]\n * Node type that the transformer expects (default: `Node`).\n * @template {Node} [Output=Input]\n * Node type that the transformer yields (default: `Input`).\n * @callback Transformer\n * Transformers handle syntax trees and files.\n *\n * They are functions that are called each time a syntax tree and file are\n * passed through the run phase.\n * When an error occurs in them (either because it’s thrown, returned,\n * rejected, or passed to `next`), the process stops.\n *\n * The run phase is handled by [`trough`][trough], see its documentation for\n * the exact semantics of these functions.\n *\n * > **Note**: you should likely ignore `next`: don’t accept it.\n * > it supports callback-style async work.\n * > But promises are likely easier to reason about.\n *\n * [trough]: https://github.com/wooorm/trough#function-fninput-next\n * @param {Input} tree\n * Tree to handle.\n * @param {VFile} file\n * File to handle.\n * @param {TransformCallback<Output>} next\n * Callback.\n * @returns {(\n * Promise<Output | undefined | void> |\n * Promise<never> | // For some reason this is needed separately.\n * Output |\n * Error |\n * undefined |\n * void\n * )}\n * If you accept `next`, nothing.\n * Otherwise:\n *\n * * `Error` — fatal error to stop the process\n * * `Promise<undefined>` or `undefined` — the next transformer keeps using\n * same tree\n * * `Promise<Node>` or `Node` — new, changed, tree\n */\n\n/**\n * @template {Node | undefined} ParseTree\n * Output of `parse`.\n * @template {Node | undefined} HeadTree\n * Input for `run`.\n * @template {Node | undefined} TailTree\n * Output for `run`.\n * @template {Node | undefined} CompileTree\n * Input of `stringify`.\n * @template {CompileResults | undefined} CompileResult\n * Output of `stringify`.\n * @template {Node | string | undefined} Input\n * Input of plugin.\n * @template Output\n * Output of plugin (optional).\n * @typedef {(\n * Input extends string\n * ? Output extends Node | undefined\n * ? // Parser.\n * Processor<\n * Output extends undefined ? ParseTree : Output,\n * HeadTree,\n * TailTree,\n * CompileTree,\n * CompileResult\n * >\n * : // Unknown.\n * Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>\n * : Output extends CompileResults\n * ? Input extends Node | undefined\n * ? // Compiler.\n * Processor<\n * ParseTree,\n * HeadTree,\n * TailTree,\n * Input extends undefined ? CompileTree : Input,\n * Output extends undefined ? CompileResult : Output\n * >\n * : // Unknown.\n * Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>\n * : Input extends Node | undefined\n * ? Output extends Node | undefined\n * ? // Transform.\n * Processor<\n * ParseTree,\n * HeadTree extends undefined ? Input : HeadTree,\n * Output extends undefined ? TailTree : Output,\n * CompileTree,\n * CompileResult\n * >\n * : // Unknown.\n * Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>\n * : // Unknown.\n * Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>\n * )} UsePlugin\n * Create a processor based on the input/output of a {@link Plugin plugin}.\n */\n\n/**\n * @template {CompileResults | undefined} Result\n * Node type that the transformer yields.\n * @typedef {(\n * Result extends Value | undefined ?\n * VFile :\n * VFile & {result: Result}\n * )} VFileWithOutput\n * Type to generate a {@linkcode VFile} corresponding to a compiler result.\n *\n * If a result that is not acceptable on a `VFile` is used, that will\n * be stored on the `result` field of {@linkcode VFile}.\n */\n\nimport {bail} from 'bail'\nimport extend from 'extend'\nimport {ok as assert} from 'devlop'\nimport isPlainObj from 'is-plain-obj'\nimport {trough} from 'trough'\nimport {VFile} from 'vfile'\nimport {CallableInstance} from './callable-instance.js'\n\n// To do: next major: drop `Compiler`, `Parser`: prefer lowercase.\n\n// To do: we could start yielding `never` in TS when a parser is missing and\n// `parse` is called.\n// Currently, we allow directly setting `processor.parser`, which is untyped.\n\nconst own = {}.hasOwnProperty\n\n/**\n * @template {Node | undefined} [ParseTree=undefined]\n * Output of `parse` (optional).\n * @template {Node | undefined} [HeadTree=undefined]\n * Input for `run` (optional).\n * @template {Node | undefined} [TailTree=undefined]\n * Output for `run` (optional).\n * @template {Node | undefined} [CompileTree=undefined]\n * Input of `stringify` (optional).\n * @template {CompileResults | undefined} [CompileResult=undefined]\n * Output of `stringify` (optional).\n * @extends {CallableInstance<[], Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>>}\n */\nexport class Processor extends CallableInstance {\n /**\n * Create a processor.\n */\n constructor() {\n // If `Processor()` is called (w/o new), `copy` is called instead.\n super('copy')\n\n /**\n * Compiler to use (deprecated).\n *\n * @deprecated\n * Use `compiler` instead.\n * @type {(\n * Compiler<\n * CompileTree extends undefined ? Node : CompileTree,\n * CompileResult extends undefined ? CompileResults : CompileResult\n * > |\n * undefined\n * )}\n */\n this.Compiler = undefined\n\n /**\n * Parser to use (deprecated).\n *\n * @deprecated\n * Use `parser` instead.\n * @type {(\n * Parser<ParseTree extends undefined ? Node : ParseTree> |\n * undefined\n * )}\n */\n this.Parser = undefined\n\n // Note: the following fields are considered private.\n // However, they are needed for tests, and TSC generates an untyped\n // `private freezeIndex` field for, which trips `type-coverage` up.\n // Instead, we use `@deprecated` to visualize that they shouldn’t be used.\n /**\n * Internal list of configured plugins.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Array<PluginTuple<Array<unknown>>>}\n */\n this.attachers = []\n\n /**\n * Compiler to use.\n *\n * @type {(\n * Compiler<\n * CompileTree extends undefined ? Node : CompileTree,\n * CompileResult extends undefined ? CompileResults : CompileResult\n * > |\n * undefined\n * )}\n */\n this.compiler = undefined\n\n /**\n * Internal state to track where we are while freezing.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {number}\n */\n this.freezeIndex = -1\n\n /**\n * Internal state to track whether we’re frozen.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {boolean | undefined}\n */\n this.frozen = undefined\n\n /**\n * Internal state.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Data}\n */\n this.namespace = {}\n\n /**\n * Parser to use.\n *\n * @type {(\n * Parser<ParseTree extends undefined ? Node : ParseTree> |\n * undefined\n * )}\n */\n this.parser = undefined\n\n /**\n * Internal list of configured transformers.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Pipeline}\n */\n this.transformers = trough()\n }\n\n /**\n * Copy a processor.\n *\n * @deprecated\n * This is a private internal method and should not be used.\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n * New *unfrozen* processor ({@linkcode Processor}) that is\n * configured to work the same as its ancestor.\n * When the descendant processor is configured in the future it does not\n * affect the ancestral processor.\n */\n copy() {\n // Cast as the type parameters will be the same after attaching.\n const destination =\n /** @type {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>} */ (\n new Processor()\n )\n let index = -1\n\n while (++index < this.attachers.length) {\n const attacher = this.attachers[index]\n destination.use(...attacher)\n }\n\n destination.data(extend(true, {}, this.namespace))\n\n return destination\n }\n\n /**\n * Configure the processor with info available to all plugins.\n * Information is stored in an object.\n *\n * Typically, options can be given to a specific plugin, but sometimes it\n * makes sense to have information shared with several plugins.\n * For example, a list of HTML elements that are self-closing, which is\n * needed during all phases.\n *\n * > **Note**: setting information cannot occur on *frozen* processors.\n * > Call the processor first to create a new unfrozen processor.\n *\n * > **Note**: to register custom data in TypeScript, augment the\n * > {@linkcode Data} interface.\n *\n * @example\n * This example show how to get and set info:\n *\n * ```js\n * import {unified} from 'unified'\n *\n * const processor = unified().data('alpha', 'bravo')\n *\n * processor.data('alpha') // => 'bravo'\n *\n * processor.data() // => {alpha: 'bravo'}\n *\n * processor.data({charlie: 'delta'})\n *\n * processor.data() // => {charlie: 'delta'}\n * ```\n *\n * @template {keyof Data} Key\n *\n * @overload\n * @returns {Data}\n *\n * @overload\n * @param {Data} dataset\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n *\n * @overload\n * @param {Key} key\n * @returns {Data[Key]}\n *\n * @overload\n * @param {Key} key\n * @param {Data[Key]} value\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n *\n * @param {Data | Key} [key]\n * Key to get or set, or entire dataset to set, or nothing to get the\n * entire dataset (optional).\n * @param {Data[Key]} [value]\n * Value to set (optional).\n * @returns {unknown}\n * The current processor when setting, the value at `key` when getting, or\n * the entire dataset when getting without key.\n */\n data(key, value) {\n if (typeof key === 'string') {\n // Set `key`.\n if (arguments.length === 2) {\n assertUnfrozen('data', this.frozen)\n this.namespace[key] = value\n return this\n }\n\n // Get `key`.\n return (own.call(this.namespace, key) && this.namespace[key]) || undefined\n }\n\n // Set space.\n if (key) {\n assertUnfrozen('data', this.frozen)\n this.namespace = key\n return this\n }\n\n // Get space.\n return this.namespace\n }\n\n /**\n * Freeze a processor.\n *\n * Frozen processors are meant to be extended and not to be configured\n * directly.\n *\n * When a processor is frozen it cannot be unfrozen.\n * New processors working the same way can be created by calling the\n * processor.\n *\n * It’s possible to freeze processors explicitly by calling `.freeze()`.\n * Processors freeze automatically when `.parse()`, `.run()`, `.runSync()`,\n * `.stringify()`, `.process()`, or `.processSync()` are called.\n *\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n * The current processor.\n */\n freeze() {\n if (this.frozen) {\n return this\n }\n\n // Cast so that we can type plugins easier.\n // Plugins are supposed to be usable on different processors, not just on\n // this exact processor.\n const self = /** @type {Processor} */ (/** @type {unknown} */ (this))\n\n while (++this.freezeIndex < this.attachers.length) {\n const [attacher, ...options] = this.attachers[this.freezeIndex]\n\n if (options[0] === false) {\n continue\n }\n\n if (options[0] === true) {\n options[0] = undefined\n }\n\n const transformer = attacher.call(self, ...options)\n\n if (typeof transformer === 'function') {\n this.transformers.use(transformer)\n }\n }\n\n this.frozen = true\n this.freezeIndex = Number.POSITIVE_INFINITY\n\n return this\n }\n\n /**\n * Parse text to a syntax tree.\n *\n * > **Note**: `parse` freezes the processor if not already *frozen*.\n *\n * > **Note**: `parse` performs the parse phase, not the run phase or other\n * > phases.\n *\n * @param {Compatible | undefined} [file]\n * file to parse (optional); typically `string` or `VFile`; any value\n * accepted as `x` in `new VFile(x)`.\n * @returns {ParseTree extends undefined ? Node : ParseTree}\n * Syntax tree representing `file`.\n */\n parse(file) {\n this.freeze()\n const realFile = vfile(file)\n const parser = this.parser || this.Parser\n assertParser('parse', parser)\n return parser(String(realFile), realFile)\n }\n\n /**\n * Process the given file as configured on the processor.\n *\n * > **Note**: `process` freezes the processor if not already *frozen*.\n *\n * > **Note**: `process` performs the parse, run, and stringify phases.\n *\n * @overload\n * @param {Compatible | undefined} file\n * @param {ProcessCallback<VFileWithOutput<CompileResult>>} done\n * @returns {undefined}\n *\n * @overload\n * @param {Compatible | undefined} [file]\n * @returns {Promise<VFileWithOutput<CompileResult>>}\n *\n * @param {Compatible | undefined} [file]\n * File (optional); typically `string` or `VFile`]; any value accepted as\n * `x` in `new VFile(x)`.\n * @param {ProcessCallback<VFileWithOutput<CompileResult>> | undefined} [done]\n * Callback (optional).\n * @returns {Promise<VFile> | undefined}\n * Nothing if `done` is given.\n * Otherwise a promise, rejected with a fatal error or resolved with the\n * processed file.\n *\n * The parsed, transformed, and compiled value is available at\n * `file.value` (see note).\n *\n * > **Note**: unified typically compiles by serializing: most\n * > compilers return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n process(file, done) {\n const self = this\n\n this.freeze()\n assertParser('process', this.parser || this.Parser)\n assertCompiler('process', this.compiler || this.Compiler)\n\n return done ? executor(undefined, done) : new Promise(executor)\n\n // Note: `void`s needed for TS.\n /**\n * @param {((file: VFileWithOutput<CompileResult>) => undefined | void) | undefined} resolve\n * @param {(error: Error | undefined) => undefined | void} reject\n * @returns {undefined}\n */\n function executor(resolve, reject) {\n const realFile = vfile(file)\n // Assume `ParseTree` (the result of the parser) matches `HeadTree` (the\n // input of the first transform).\n const parseTree =\n /** @type {HeadTree extends undefined ? Node : HeadTree} */ (\n /** @type {unknown} */ (self.parse(realFile))\n )\n\n self.run(parseTree, realFile, function (error, tree, file) {\n if (error || !tree || !file) {\n return realDone(error)\n }\n\n // Assume `TailTree` (the output of the last transform) matches\n // `CompileTree` (the input of the compiler).\n const compileTree =\n /** @type {CompileTree extends undefined ? Node : CompileTree} */ (\n /** @type {unknown} */ (tree)\n )\n\n const compileResult = self.stringify(compileTree, file)\n\n if (looksLikeAValue(compileResult)) {\n file.value = compileResult\n } else {\n file.result = compileResult\n }\n\n realDone(error, /** @type {VFileWithOutput<CompileResult>} */ (file))\n })\n\n /**\n * @param {Error | undefined} error\n * @param {VFileWithOutput<CompileResult> | undefined} [file]\n * @returns {undefined}\n */\n function realDone(error, file) {\n if (error || !file) {\n reject(error)\n } else if (resolve) {\n resolve(file)\n } else {\n assert(done, '`done` is defined if `resolve` is not')\n done(undefined, file)\n }\n }\n }\n }\n\n /**\n * Process the given file as configured on the processor.\n *\n * An error is thrown if asynchronous transforms are configured.\n *\n * > **Note**: `processSync` freezes the processor if not already *frozen*.\n *\n * > **Note**: `processSync` performs the parse, run, and stringify phases.\n *\n * @param {Compatible | undefined} [file]\n * File (optional); typically `string` or `VFile`; any value accepted as\n * `x` in `new VFile(x)`.\n * @returns {VFileWithOutput<CompileResult>}\n * The processed file.\n *\n * The parsed, transformed, and compiled value is available at\n * `file.value` (see note).\n *\n * > **Note**: unified typically compiles by serializing: most\n * > compilers return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n processSync(file) {\n /** @type {boolean} */\n let complete = false\n /** @type {VFileWithOutput<CompileResult> | undefined} */\n let result\n\n this.freeze()\n assertParser('processSync', this.parser || this.Parser)\n assertCompiler('processSync', this.compiler || this.Compiler)\n\n this.process(file, realDone)\n assertDone('processSync', 'process', complete)\n assert(result, 'we either bailed on an error or have a tree')\n\n return result\n\n /**\n * @type {ProcessCallback<VFileWithOutput<CompileResult>>}\n */\n function realDone(error, file) {\n complete = true\n bail(error)\n result = file\n }\n }\n\n /**\n * Run *transformers* on a syntax tree.\n *\n * > **Note**: `run` freezes the processor if not already *frozen*.\n *\n * > **Note**: `run` performs the run phase, not other phases.\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} file\n * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} [file]\n * @returns {Promise<TailTree extends undefined ? Node : TailTree>}\n *\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * Tree to transform and inspect.\n * @param {(\n * RunCallback<TailTree extends undefined ? Node : TailTree> |\n * Compatible\n * )} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]\n * Callback (optional).\n * @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}\n * Nothing if `done` is given.\n * Otherwise, a promise rejected with a fatal error or resolved with the\n * transformed tree.\n */\n run(tree, file, done) {\n assertNode(tree)\n this.freeze()\n\n const transformers = this.transformers\n\n if (!done && typeof file === 'function') {\n done = file\n file = undefined\n }\n\n return done ? executor(undefined, done) : new Promise(executor)\n\n // Note: `void`s needed for TS.\n /**\n * @param {(\n * ((tree: TailTree extends undefined ? Node : TailTree) => undefined | void) |\n * undefined\n * )} resolve\n * @param {(error: Error) => undefined | void} reject\n * @returns {undefined}\n */\n function executor(resolve, reject) {\n assert(\n typeof file !== 'function',\n '`file` can’t be a `done` anymore, we checked'\n )\n const realFile = vfile(file)\n transformers.run(tree, realFile, realDone)\n\n /**\n * @param {Error | undefined} error\n * @param {Node} outputTree\n * @param {VFile} file\n * @returns {undefined}\n */\n function realDone(error, outputTree, file) {\n const resultingTree =\n /** @type {TailTree extends undefined ? Node : TailTree} */ (\n outputTree || tree\n )\n\n if (error) {\n reject(error)\n } else if (resolve) {\n resolve(resultingTree)\n } else {\n assert(done, '`done` is defined if `resolve` is not')\n done(undefined, resultingTree, file)\n }\n }\n }\n }\n\n /**\n * Run *transformers* on a syntax tree.\n *\n * An error is thrown if asynchronous transforms are configured.\n *\n * > **Note**: `runSync` freezes the processor if not already *frozen*.\n *\n * > **Note**: `runSync` performs the run phase, not other phases.\n *\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * Tree to transform and inspect.\n * @param {Compatible | undefined} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @returns {TailTree extends undefined ? Node : TailTree}\n * Transformed tree.\n */\n runSync(tree, file) {\n /** @type {boolean} */\n let complete = false\n /** @type {(TailTree extends undefined ? Node : TailTree) | undefined} */\n let result\n\n this.run(tree, file, realDone)\n\n assertDone('runSync', 'run', complete)\n assert(result, 'we either bailed on an error or have a tree')\n return result\n\n /**\n * @type {RunCallback<TailTree extends undefined ? Node : TailTree>}\n */\n function realDone(error, tree) {\n bail(error)\n result = tree\n complete = true\n }\n }\n\n /**\n * Compile a syntax tree.\n *\n * > **Note**: `stringify` freezes the processor if not already *frozen*.\n *\n * > **Note**: `stringify` performs the stringify phase, not the run phase\n * > or other phases.\n *\n * @param {CompileTree extends undefined ? Node : CompileTree} tree\n * Tree to compile.\n * @param {Compatible | undefined} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @returns {CompileResult extends undefined ? Value : CompileResult}\n * Textual representation of the tree (see note).\n *\n * > **Note**: unified typically compiles by serializing: most compilers\n * > return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n stringify(tree, file) {\n this.freeze()\n const realFile = vfile(file)\n const compiler = this.compiler || this.Compiler\n assertCompiler('stringify', compiler)\n assertNode(tree)\n\n return compiler(tree, realFile)\n }\n\n /**\n * Configure the processor to use a plugin, a list of usable values, or a\n * preset.\n *\n * If the processor is already using a plugin, the previous plugin\n * configuration is changed based on the options that are passed in.\n * In other words, the plugin is not added a second time.\n *\n * > **Note**: `use` cannot be called on *frozen* processors.\n * > Call the processor first to create a new unfrozen processor.\n *\n * @example\n * There are many ways to pass plugins to `.use()`.\n * This example gives an overview:\n *\n * ```js\n * import {unified} from 'unified'\n *\n * unified()\n * // Plugin with options:\n * .use(pluginA, {x: true, y: true})\n * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):\n * .use(pluginA, {y: false, z: true})\n * // Plugins:\n * .use([pluginB, pluginC])\n * // Two plugins, the second with options:\n * .use([pluginD, [pluginE, {}]])\n * // Preset with plugins and settings:\n * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})\n * // Settings only:\n * .use({settings: {position: false}})\n * ```\n *\n * @template {Array<unknown>} [Parameters=[]]\n * @template {Node | string | undefined} [Input=undefined]\n * @template [Output=Input]\n *\n * @overload\n * @param {Preset | null | undefined} [preset]\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n *\n * @overload\n * @param {PluggableList} list\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n *\n * @overload\n * @param {Plugin<Parameters, Input, Output>} plugin\n * @param {...(Parameters | [boolean])} parameters\n * @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}\n *\n * @param {PluggableList | Plugin | Preset | null | undefined} value\n * Usable value.\n * @param {...unknown} parameters\n * Parameters, when a plugin is given as a usable value.\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n * Current processor.\n */\n use(value, ...parameters) {\n const attachers = this.attachers\n const namespace = this.namespace\n\n assertUnfrozen('use', this.frozen)\n\n if (value === null || value === undefined) {\n // Empty.\n } else if (typeof value === 'function') {\n addPlugin(value, parameters)\n } else if (typeof value === 'object') {\n if (Array.isArray(value)) {\n addList(value)\n } else {\n addPreset(value)\n }\n } else {\n throw new TypeError('Expected usable value, not `' + value + '`')\n }\n\n return this\n\n /**\n * @param {Pluggable} value\n * @returns {undefined}\n */\n function add(value) {\n if (typeof value === 'function') {\n addPlugin(value, [])\n } else if (typeof value === 'object') {\n if (Array.isArray(value)) {\n const [plugin, ...parameters] =\n /** @type {PluginTuple<Array<unknown>>} */ (value)\n addPlugin(plugin, parameters)\n } else {\n addPreset(value)\n }\n } else {\n throw new TypeError('Expected usable value, not `' + value + '`')\n }\n }\n\n /**\n * @param {Preset} result\n * @returns {undefined}\n */\n function addPreset(result) {\n if (!('plugins' in result) && !('settings' in result)) {\n throw new Error(\n 'Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither'\n )\n }\n\n addList(result.plugins)\n\n if (result.settings) {\n namespace.settings = extend(true, namespace.settings, result.settings)\n }\n }\n\n /**\n * @param {PluggableList | null | undefined} plugins\n * @returns {undefined}\n */\n function addList(plugins) {\n let index = -1\n\n if (plugins === null || plugins === undefined) {\n // Empty.\n } else if (Array.isArray(plugins)) {\n while (++index < plugins.length) {\n const thing = plugins[index]\n add(thing)\n }\n } else {\n throw new TypeError('Expected a list of plugins, not `' + plugins + '`')\n }\n }\n\n /**\n * @param {Plugin} plugin\n * @param {Array<unknown>} parameters\n * @returns {undefined}\n */\n function addPlugin(plugin, parameters) {\n let index = -1\n let entryIndex = -1\n\n while (++index < attachers.length) {\n if (attachers[index][0] === plugin) {\n entryIndex = index\n break\n }\n }\n\n if (entryIndex === -1) {\n attachers.push([plugin, ...parameters])\n }\n // Only set if there was at least a `primary` value, otherwise we’d change\n // `arguments.length`.\n else if (parameters.length > 0) {\n let [primary, ...rest] = parameters\n const currentPrimary = attachers[entryIndex][1]\n if (isPlainObj(currentPrimary) && isPlainObj(primary)) {\n primary = extend(true, currentPrimary, primary)\n }\n\n attachers[entryIndex] = [plugin, primary, ...rest]\n }\n }\n }\n}\n\n// Note: this returns a *callable* instance.\n// That’s why it’s documented as a function.\n/**\n * Create a new processor.\n *\n * @example\n * This example shows how a new processor can be created (from `remark`) and linked\n * to **stdin**(4) and **stdout**(4).\n *\n * ```js\n * import process from 'node:process'\n * import concatStream from 'concat-stream'\n * import {remark} from 'remark'\n *\n * process.stdin.pipe(\n * concatStream(function (buf) {\n * process.stdout.write(String(remark().processSync(buf)))\n * })\n * )\n * ```\n *\n * @returns\n * New *unfrozen* processor (`processor`).\n *\n * This processor is configured to work the same as its ancestor.\n * When the descendant processor is configured in the future it does not\n * affect the ancestral processor.\n */\nexport const unified = new Processor().freeze()\n\n/**\n * Assert a parser is available.\n *\n * @param {string} name\n * @param {unknown} value\n * @returns {asserts value is Parser}\n */\nfunction assertParser(name, value) {\n if (typeof value !== 'function') {\n throw new TypeError('Cannot `' + name + '` without `parser`')\n }\n}\n\n/**\n * Assert a compiler is available.\n *\n * @param {string} name\n * @param {unknown} value\n * @returns {asserts value is Compiler}\n */\nfunction assertCompiler(name, value) {\n if (typeof value !== 'function') {\n throw new TypeError('Cannot `' + name + '` without `compiler`')\n }\n}\n\n/**\n * Assert the processor is not frozen.\n *\n * @param {string} name\n * @param {unknown} frozen\n * @returns {asserts frozen is false}\n */\nfunction assertUnfrozen(name, frozen) {\n if (frozen) {\n throw new Error(\n 'Cannot call `' +\n name +\n '` on a frozen processor.\\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.'\n )\n }\n}\n\n/**\n * Assert `node` is a unist node.\n *\n * @param {unknown} node\n * @returns {asserts node is Node}\n */\nfunction assertNode(node) {\n // `isPlainObj` unfortunately uses `any` instead of `unknown`.\n // type-coverage:ignore-next-line\n if (!isPlainObj(node) || typeof node.type !== 'string') {\n throw new TypeError('Expected node, got `' + node + '`')\n // Fine.\n }\n}\n\n/**\n * Assert that `complete` is `true`.\n *\n * @param {string} name\n * @param {string} asyncName\n * @param {unknown} complete\n * @returns {asserts complete is true}\n */\nfunction assertDone(name, asyncName, complete) {\n if (!complete) {\n throw new Error(\n '`' + name + '` finished async. Use `' + asyncName + '` instead'\n )\n }\n}\n\n/**\n * @param {Compatible | undefined} [value]\n * @returns {VFile}\n */\nfunction vfile(value) {\n return looksLikeAVFile(value) ? value : new VFile(value)\n}\n\n/**\n * @param {Compatible | undefined} [value]\n * @returns {value is VFile}\n */\nfunction looksLikeAVFile(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'message' in value &&\n 'messages' in value\n )\n}\n\n/**\n * @param {unknown} [value]\n * @returns {value is Value}\n */\nfunction looksLikeAValue(value) {\n return typeof value === 'string' || isUint8Array(value)\n}\n\n/**\n * Assert `value` is an `Uint8Array`.\n *\n * @param {unknown} value\n * thing.\n * @returns {value is Uint8Array}\n * Whether `value` is an `Uint8Array`.\n */\nfunction isUint8Array(value) {\n return Boolean(\n value &&\n typeof value === 'object' &&\n 'byteLength' in value &&\n 'byteOffset' in value\n )\n}\n","/**\n * @import {Element, Nodes, Parents, Root} from 'hast'\n * @import {Root as MdastRoot} from 'mdast'\n * @import {ComponentType, JSX, ReactElement, ReactNode} from 'react'\n * @import {Options as RemarkRehypeOptions} from 'remark-rehype'\n * @import {BuildVisitor} from 'unist-util-visit'\n * @import {PluggableList, Processor} from 'unified'\n */\n\n/**\n * @callback AllowElement\n * Filter elements.\n * @param {Readonly<Element>} element\n * Element to check.\n * @param {number} index\n * Index of `element` in `parent`.\n * @param {Readonly<Parents> | undefined} parent\n * Parent of `element`.\n * @returns {boolean | null | undefined}\n * Whether to allow `element` (default: `false`).\n */\n\n/**\n * @typedef ExtraProps\n * Extra fields we pass.\n * @property {Element | undefined} [node]\n * passed when `passNode` is on.\n */\n\n/**\n * @typedef {{\n * [Key in keyof JSX.IntrinsicElements]?: ComponentType<JSX.IntrinsicElements[Key] & ExtraProps> | keyof JSX.IntrinsicElements\n * }} Components\n * Map tag names to components.\n */\n\n/**\n * @typedef Deprecation\n * Deprecation.\n * @property {string} from\n * Old field.\n * @property {string} id\n * ID in readme.\n * @property {keyof Options} [to]\n * New field.\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {AllowElement | null | undefined} [allowElement]\n * Filter elements (optional);\n * `allowedElements` / `disallowedElements` is used first.\n * @property {ReadonlyArray<string> | null | undefined} [allowedElements]\n * Tag names to allow (default: all tag names);\n * cannot combine w/ `disallowedElements`.\n * @property {string | null | undefined} [children]\n * Markdown.\n * @property {Components | null | undefined} [components]\n * Map tag names to components.\n * @property {ReadonlyArray<string> | null | undefined} [disallowedElements]\n * Tag names to disallow (default: `[]`);\n * cannot combine w/ `allowedElements`.\n * @property {PluggableList | null | undefined} [rehypePlugins]\n * List of rehype plugins to use.\n * @property {PluggableList | null | undefined} [remarkPlugins]\n * List of remark plugins to use.\n * @property {Readonly<RemarkRehypeOptions> | null | undefined} [remarkRehypeOptions]\n * Options to pass through to `remark-rehype`.\n * @property {boolean | null | undefined} [skipHtml=false]\n * Ignore HTML in markdown completely (default: `false`).\n * @property {boolean | null | undefined} [unwrapDisallowed=false]\n * Extract (unwrap) what’s in disallowed elements (default: `false`);\n * normally when say `strong` is not allowed, it and it’s children are dropped,\n * with `unwrapDisallowed` the element itself is replaced by its children.\n * @property {UrlTransform | null | undefined} [urlTransform]\n * Change URLs (default: `defaultUrlTransform`)\n */\n\n/**\n * @typedef HooksOptionsOnly\n * Configuration specifically for {@linkcode MarkdownHooks}.\n * @property {ReactNode | null | undefined} [fallback]\n * Content to render while the processor processing the markdown (optional).\n */\n\n/**\n * @typedef {Options & HooksOptionsOnly} HooksOptions\n * Configuration for {@linkcode MarkdownHooks};\n * extends the regular {@linkcode Options} with a `fallback` prop.\n */\n\n/**\n * @callback UrlTransform\n * Transform all URLs.\n * @param {string} url\n * URL.\n * @param {string} key\n * Property name (example: `'href'`).\n * @param {Readonly<Element>} node\n * Node.\n * @returns {string | null | undefined}\n * Transformed URL (optional).\n */\n\nimport {unreachable} from 'devlop'\nimport {toJsxRuntime} from 'hast-util-to-jsx-runtime'\nimport {urlAttributes} from 'html-url-attributes'\nimport {Fragment, jsx, jsxs} from 'react/jsx-runtime'\nimport {useEffect, useState} from 'react'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\nimport {visit} from 'unist-util-visit'\nimport {VFile} from 'vfile'\n\nconst changelog =\n 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'\n\n/** @type {PluggableList} */\nconst emptyPlugins = []\n/** @type {Readonly<RemarkRehypeOptions>} */\nconst emptyRemarkRehypeOptions = {allowDangerousHtml: true}\nconst safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i\n\n// Mutable because we `delete` any time it’s used and a message is sent.\n/** @type {ReadonlyArray<Readonly<Deprecation>>} */\nconst deprecations = [\n {from: 'astPlugins', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'allowDangerousHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {\n from: 'allowNode',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowElement'\n },\n {\n from: 'allowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowedElements'\n },\n {from: 'className', id: 'remove-classname'},\n {\n from: 'disallowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'disallowedElements'\n },\n {from: 'escapeHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'includeElementIndex', id: '#remove-includeelementindex'},\n {\n from: 'includeNodeIndex',\n id: 'change-includenodeindex-to-includeelementindex'\n },\n {from: 'linkTarget', id: 'remove-linktarget'},\n {from: 'plugins', id: 'change-plugins-to-remarkplugins', to: 'remarkPlugins'},\n {from: 'rawSourcePos', id: '#remove-rawsourcepos'},\n {from: 'renderers', id: 'change-renderers-to-components', to: 'components'},\n {from: 'source', id: 'change-source-to-children', to: 'children'},\n {from: 'sourcePos', id: '#remove-sourcepos'},\n {from: 'transformImageUri', id: '#add-urltransform', to: 'urlTransform'},\n {from: 'transformLinkUri', id: '#add-urltransform', to: 'urlTransform'}\n]\n\n/**\n * Component to render markdown.\n *\n * This is a synchronous component.\n * When using async plugins,\n * see {@linkcode MarkdownAsync} or {@linkcode MarkdownHooks}.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {ReactElement}\n * React element.\n */\nexport function Markdown(options) {\n const processor = createProcessor(options)\n const file = createFile(options)\n return post(processor.runSync(processor.parse(file), file), options)\n}\n\n/**\n * Component to render markdown with support for async plugins\n * through async/await.\n *\n * Components returning promises are supported on the server.\n * For async support on the client,\n * see {@linkcode MarkdownHooks}.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {Promise<ReactElement>}\n * Promise to a React element.\n */\nexport async function MarkdownAsync(options) {\n const processor = createProcessor(options)\n const file = createFile(options)\n const tree = await processor.run(processor.parse(file), file)\n return post(tree, options)\n}\n\n/**\n * Component to render markdown with support for async plugins through hooks.\n *\n * This uses `useEffect` and `useState` hooks.\n * Hooks run on the client and do not immediately render something.\n * For async support on the server,\n * see {@linkcode MarkdownAsync}.\n *\n * @param {Readonly<HooksOptions>} options\n * Props.\n * @returns {ReactNode}\n * React node.\n */\nexport function MarkdownHooks(options) {\n const processor = createProcessor(options)\n const [error, setError] = useState(\n /** @type {Error | undefined} */ (undefined)\n )\n const [tree, setTree] = useState(/** @type {Root | undefined} */ (undefined))\n\n useEffect(\n function () {\n let cancelled = false\n const file = createFile(options)\n\n processor.run(processor.parse(file), file, function (error, tree) {\n if (!cancelled) {\n setError(error)\n setTree(tree)\n }\n })\n\n /**\n * @returns {undefined}\n * Nothing.\n */\n return function () {\n cancelled = true\n }\n },\n [\n options.children,\n options.rehypePlugins,\n options.remarkPlugins,\n options.remarkRehypeOptions\n ]\n )\n\n if (error) throw error\n\n return tree ? post(tree, options) : options.fallback\n}\n\n/**\n * Set up the `unified` processor.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {Processor<MdastRoot, MdastRoot, Root, undefined, undefined>}\n * Result.\n */\nfunction createProcessor(options) {\n const rehypePlugins = options.rehypePlugins || emptyPlugins\n const remarkPlugins = options.remarkPlugins || emptyPlugins\n const remarkRehypeOptions = options.remarkRehypeOptions\n ? {...options.remarkRehypeOptions, ...emptyRemarkRehypeOptions}\n : emptyRemarkRehypeOptions\n\n const processor = unified()\n .use(remarkParse)\n .use(remarkPlugins)\n .use(remarkRehype, remarkRehypeOptions)\n .use(rehypePlugins)\n\n return processor\n}\n\n/**\n * Set up the virtual file.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {VFile}\n * Result.\n */\nfunction createFile(options) {\n const children = options.children || ''\n const file = new VFile()\n\n if (typeof children === 'string') {\n file.value = children\n } else {\n unreachable(\n 'Unexpected value `' +\n children +\n '` for `children` prop, expected `string`'\n )\n }\n\n return file\n}\n\n/**\n * Process the result from unified some more.\n *\n * @param {Nodes} tree\n * Tree.\n * @param {Readonly<Options>} options\n * Props.\n * @returns {ReactElement}\n * React element.\n */\nfunction post(tree, options) {\n const allowedElements = options.allowedElements\n const allowElement = options.allowElement\n const components = options.components\n const disallowedElements = options.disallowedElements\n const skipHtml = options.skipHtml\n const unwrapDisallowed = options.unwrapDisallowed\n const urlTransform = options.urlTransform || defaultUrlTransform\n\n for (const deprecation of deprecations) {\n if (Object.hasOwn(options, deprecation.from)) {\n unreachable(\n 'Unexpected `' +\n deprecation.from +\n '` prop, ' +\n (deprecation.to\n ? 'use `' + deprecation.to + '` instead'\n : 'remove it') +\n ' (see <' +\n changelog +\n '#' +\n deprecation.id +\n '> for more info)'\n )\n }\n }\n\n if (allowedElements && disallowedElements) {\n unreachable(\n 'Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other'\n )\n }\n\n visit(tree, transform)\n\n return toJsxRuntime(tree, {\n Fragment,\n components,\n ignoreInvalidStyle: true,\n jsx,\n jsxs,\n passKeys: true,\n passNode: true\n })\n\n /** @type {BuildVisitor<Root>} */\n function transform(node, index, parent) {\n if (node.type === 'raw' && parent && typeof index === 'number') {\n if (skipHtml) {\n parent.children.splice(index, 1)\n } else {\n parent.children[index] = {type: 'text', value: node.value}\n }\n\n return index\n }\n\n if (node.type === 'element') {\n /** @type {string} */\n let key\n\n for (key in urlAttributes) {\n if (\n Object.hasOwn(urlAttributes, key) &&\n Object.hasOwn(node.properties, key)\n ) {\n const value = node.properties[key]\n const test = urlAttributes[key]\n if (test === null || test.includes(node.tagName)) {\n node.properties[key] = urlTransform(String(value || ''), key, node)\n }\n }\n }\n }\n\n if (node.type === 'element') {\n let remove = allowedElements\n ? !allowedElements.includes(node.tagName)\n : disallowedElements\n ? disallowedElements.includes(node.tagName)\n : false\n\n if (!remove && allowElement && typeof index === 'number') {\n remove = !allowElement(node, index, parent)\n }\n\n if (remove && parent && typeof index === 'number') {\n if (unwrapDisallowed && node.children) {\n parent.children.splice(index, 1, ...node.children)\n } else {\n parent.children.splice(index, 1)\n }\n\n return index\n }\n }\n }\n}\n\n/**\n * Make a URL safe.\n *\n * @satisfies {UrlTransform}\n * @param {string} value\n * URL.\n * @returns {string}\n * Safe URL.\n */\nexport function defaultUrlTransform(value) {\n // Same as:\n // <https://github.com/micromark/micromark/blob/929275e/packages/micromark-util-sanitize-uri/dev/index.js#L34>\n // But without the `encode` part.\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n\n if (\n // If there is no protocol, it’s relative.\n colon === -1 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n (slash !== -1 && colon > slash) ||\n (questionMark !== -1 && colon > questionMark) ||\n (numberSign !== -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n safeProtocol.test(value.slice(0, colon))\n ) {\n return value\n }\n\n return ''\n}\n","/**\n * Count how often a character (or substring) is used in a string.\n *\n * @param {string} value\n * Value to search in.\n * @param {string} character\n * Character (or substring) to look for.\n * @return {number}\n * Number of times `character` occurred in `value`.\n */\nexport function ccount(value, character) {\n const source = String(value)\n\n if (typeof character !== 'string') {\n throw new TypeError('Expected character')\n }\n\n let count = 0\n let index = source.indexOf(character)\n\n while (index !== -1) {\n count++\n index = source.indexOf(character, index + character.length)\n }\n\n return count\n}\n","export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","/**\n * @import {Nodes, Parents, PhrasingContent, Root, Text} from 'mdast'\n * @import {BuildVisitor, Test, VisitorResult} from 'unist-util-visit-parents'\n */\n\n/**\n * @typedef RegExpMatchObject\n * Info on the match.\n * @property {number} index\n * The index of the search at which the result was found.\n * @property {string} input\n * A copy of the search string in the text node.\n * @property {[...Array<Parents>, Text]} stack\n * All ancestors of the text node, where the last node is the text itself.\n *\n * @typedef {RegExp | string} Find\n * Pattern to find.\n *\n * Strings are escaped and then turned into global expressions.\n *\n * @typedef {Array<FindAndReplaceTuple>} FindAndReplaceList\n * Several find and replaces, in array form.\n *\n * @typedef {[Find, Replace?]} FindAndReplaceTuple\n * Find and replace in tuple form.\n *\n * @typedef {ReplaceFunction | string | null | undefined} Replace\n * Thing to replace with.\n *\n * @callback ReplaceFunction\n * Callback called when a search matches.\n * @param {...any} parameters\n * The parameters are the result of corresponding search expression:\n *\n * * `value` (`string`) — whole match\n * * `...capture` (`Array<string>`) — matches from regex capture groups\n * * `match` (`RegExpMatchObject`) — info on the match\n * @returns {Array<PhrasingContent> | PhrasingContent | string | false | null | undefined}\n * Thing to replace with.\n *\n * * when `null`, `undefined`, `''`, remove the match\n * * …or when `false`, do not replace at all\n * * …or when `string`, replace with a text node of that value\n * * …or when `Node` or `Array<Node>`, replace with those nodes\n *\n * @typedef {[RegExp, ReplaceFunction]} Pair\n * Normalized find and replace.\n *\n * @typedef {Array<Pair>} Pairs\n * All find and replaced.\n *\n * @typedef Options\n * Configuration.\n * @property {Test | null | undefined} [ignore]\n * Test for which nodes to ignore (optional).\n */\n\nimport escape from 'escape-string-regexp'\nimport {visitParents} from 'unist-util-visit-parents'\nimport {convert} from 'unist-util-is'\n\n/**\n * Find patterns in a tree and replace them.\n *\n * The algorithm searches the tree in *preorder* for complete values in `Text`\n * nodes.\n * Partial matches are not supported.\n *\n * @param {Nodes} tree\n * Tree to change.\n * @param {FindAndReplaceList | FindAndReplaceTuple} list\n * Patterns to find.\n * @param {Options | null | undefined} [options]\n * Configuration (when `find` is not `Find`).\n * @returns {undefined}\n * Nothing.\n */\nexport function findAndReplace(tree, list, options) {\n const settings = options || {}\n const ignored = convert(settings.ignore || [])\n const pairs = toPairs(list)\n let pairIndex = -1\n\n while (++pairIndex < pairs.length) {\n visitParents(tree, 'text', visitor)\n }\n\n /** @type {BuildVisitor<Root, 'text'>} */\n function visitor(node, parents) {\n let index = -1\n /** @type {Parents | undefined} */\n let grandparent\n\n while (++index < parents.length) {\n const parent = parents[index]\n /** @type {Array<Nodes> | undefined} */\n const siblings = grandparent ? grandparent.children : undefined\n\n if (\n ignored(\n parent,\n siblings ? siblings.indexOf(parent) : undefined,\n grandparent\n )\n ) {\n return\n }\n\n grandparent = parent\n }\n\n if (grandparent) {\n return handler(node, parents)\n }\n }\n\n /**\n * Handle a text node which is not in an ignored parent.\n *\n * @param {Text} node\n * Text node.\n * @param {Array<Parents>} parents\n * Parents.\n * @returns {VisitorResult}\n * Result.\n */\n function handler(node, parents) {\n const parent = parents[parents.length - 1]\n const find = pairs[pairIndex][0]\n const replace = pairs[pairIndex][1]\n let start = 0\n /** @type {Array<Nodes>} */\n const siblings = parent.children\n const index = siblings.indexOf(node)\n let change = false\n /** @type {Array<PhrasingContent>} */\n let nodes = []\n\n find.lastIndex = 0\n\n let match = find.exec(node.value)\n\n while (match) {\n const position = match.index\n /** @type {RegExpMatchObject} */\n const matchObject = {\n index: match.index,\n input: match.input,\n stack: [...parents, node]\n }\n let value = replace(...match, matchObject)\n\n if (typeof value === 'string') {\n value = value.length > 0 ? {type: 'text', value} : undefined\n }\n\n // It wasn’t a match after all.\n if (value === false) {\n // False acts as if there was no match.\n // So we need to reset `lastIndex`, which currently being at the end of\n // the current match, to the beginning.\n find.lastIndex = position + 1\n } else {\n if (start !== position) {\n nodes.push({\n type: 'text',\n value: node.value.slice(start, position)\n })\n }\n\n if (Array.isArray(value)) {\n nodes.push(...value)\n } else if (value) {\n nodes.push(value)\n }\n\n start = position + match[0].length\n change = true\n }\n\n if (!find.global) {\n break\n }\n\n match = find.exec(node.value)\n }\n\n if (change) {\n if (start < node.value.length) {\n nodes.push({type: 'text', value: node.value.slice(start)})\n }\n\n parent.children.splice(index, 1, ...nodes)\n } else {\n nodes = [node]\n }\n\n return index + nodes.length\n }\n}\n\n/**\n * Turn a tuple or a list of tuples into pairs.\n *\n * @param {FindAndReplaceList | FindAndReplaceTuple} tupleOrList\n * Schema.\n * @returns {Pairs}\n * Clean pairs.\n */\nfunction toPairs(tupleOrList) {\n /** @type {Pairs} */\n const result = []\n\n if (!Array.isArray(tupleOrList)) {\n throw new TypeError('Expected find and replace tuple or list of tuples')\n }\n\n /** @type {FindAndReplaceList} */\n // @ts-expect-error: correct.\n const list =\n !tupleOrList[0] || Array.isArray(tupleOrList[0])\n ? tupleOrList\n : [tupleOrList]\n\n let index = -1\n\n while (++index < list.length) {\n const tuple = list[index]\n result.push([toExpression(tuple[0]), toFunction(tuple[1])])\n }\n\n return result\n}\n\n/**\n * Turn a find into an expression.\n *\n * @param {Find} find\n * Find.\n * @returns {RegExp}\n * Expression.\n */\nfunction toExpression(find) {\n return typeof find === 'string' ? new RegExp(escape(find), 'g') : find\n}\n\n/**\n * Turn a replace into a function.\n *\n * @param {Replace} replace\n * Replace.\n * @returns {ReplaceFunction}\n * Function.\n */\nfunction toFunction(replace) {\n return typeof replace === 'function'\n ? replace\n : function () {\n return replace\n }\n}\n","/**\n * @import {RegExpMatchObject, ReplaceFunction} from 'mdast-util-find-and-replace'\n * @import {CompileContext, Extension as FromMarkdownExtension, Handle as FromMarkdownHandle, Transform as FromMarkdownTransform} from 'mdast-util-from-markdown'\n * @import {ConstructName, Options as ToMarkdownExtension} from 'mdast-util-to-markdown'\n * @import {Link, PhrasingContent} from 'mdast'\n */\n\nimport {ccount} from 'ccount'\nimport {ok as assert} from 'devlop'\nimport {unicodePunctuation, unicodeWhitespace} from 'micromark-util-character'\nimport {findAndReplace} from 'mdast-util-find-and-replace'\n\n/** @type {ConstructName} */\nconst inConstruct = 'phrasing'\n/** @type {Array<ConstructName>} */\nconst notInConstruct = ['autolink', 'link', 'image', 'label']\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM autolink\n * literals in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.\n */\nexport function gfmAutolinkLiteralFromMarkdown() {\n return {\n transforms: [transformGfmAutolinkLiterals],\n enter: {\n literalAutolink: enterLiteralAutolink,\n literalAutolinkEmail: enterLiteralAutolinkValue,\n literalAutolinkHttp: enterLiteralAutolinkValue,\n literalAutolinkWww: enterLiteralAutolinkValue\n },\n exit: {\n literalAutolink: exitLiteralAutolink,\n literalAutolinkEmail: exitLiteralAutolinkEmail,\n literalAutolinkHttp: exitLiteralAutolinkHttp,\n literalAutolinkWww: exitLiteralAutolinkWww\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM autolink\n * literals in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.\n */\nexport function gfmAutolinkLiteralToMarkdown() {\n return {\n unsafe: [\n {\n character: '@',\n before: '[+\\\\-.\\\\w]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: '.',\n before: '[Ww]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: ':',\n before: '[ps]',\n after: '\\\\/',\n inConstruct,\n notInConstruct\n }\n ]\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolink(token) {\n this.enter({type: 'link', title: null, url: '', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolinkValue(token) {\n this.config.enter.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkHttp(token) {\n this.config.exit.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkWww(token) {\n this.config.exit.data.call(this, token)\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'link')\n node.url = 'http://' + this.sliceSerialize(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkEmail(token) {\n this.config.exit.autolinkEmail.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolink(token) {\n this.exit(token)\n}\n\n/** @type {FromMarkdownTransform} */\nfunction transformGfmAutolinkLiterals(tree) {\n findAndReplace(\n tree,\n [\n [/(https?:\\/\\/|www(?=\\.))([-.\\w]+)([^ \\t\\r\\n]*)/gi, findUrl],\n [/(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)/gu, findEmail]\n ],\n {ignore: ['link', 'linkReference']}\n )\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} protocol\n * @param {string} domain\n * @param {string} path\n * @param {RegExpMatchObject} match\n * @returns {Array<PhrasingContent> | Link | false}\n */\n// eslint-disable-next-line max-params\nfunction findUrl(_, protocol, domain, path, match) {\n let prefix = ''\n\n // Not an expected previous character.\n if (!previous(match)) {\n return false\n }\n\n // Treat `www` as part of the domain.\n if (/^w/i.test(protocol)) {\n domain = protocol + domain\n protocol = ''\n prefix = 'http://'\n }\n\n if (!isCorrectDomain(domain)) {\n return false\n }\n\n const parts = splitUrl(domain + path)\n\n if (!parts[0]) return false\n\n /** @type {Link} */\n const result = {\n type: 'link',\n title: null,\n url: prefix + protocol + parts[0],\n children: [{type: 'text', value: protocol + parts[0]}]\n }\n\n if (parts[1]) {\n return [result, {type: 'text', value: parts[1]}]\n }\n\n return result\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} atext\n * @param {string} label\n * @param {RegExpMatchObject} match\n * @returns {Link | false}\n */\nfunction findEmail(_, atext, label, match) {\n if (\n // Not an expected previous character.\n !previous(match, true) ||\n // Label ends in not allowed character.\n /[-\\d_]$/.test(label)\n ) {\n return false\n }\n\n return {\n type: 'link',\n title: null,\n url: 'mailto:' + atext + '@' + label,\n children: [{type: 'text', value: atext + '@' + label}]\n }\n}\n\n/**\n * @param {string} domain\n * @returns {boolean}\n */\nfunction isCorrectDomain(domain) {\n const parts = domain.split('.')\n\n if (\n parts.length < 2 ||\n (parts[parts.length - 1] &&\n (/_/.test(parts[parts.length - 1]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 1]))) ||\n (parts[parts.length - 2] &&\n (/_/.test(parts[parts.length - 2]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 2])))\n ) {\n return false\n }\n\n return true\n}\n\n/**\n * @param {string} url\n * @returns {[string, string | undefined]}\n */\nfunction splitUrl(url) {\n const trailExec = /[!\"&'),.:;<>?\\]}]+$/.exec(url)\n\n if (!trailExec) {\n return [url, undefined]\n }\n\n url = url.slice(0, trailExec.index)\n\n let trail = trailExec[0]\n let closingParenIndex = trail.indexOf(')')\n const openingParens = ccount(url, '(')\n let closingParens = ccount(url, ')')\n\n while (closingParenIndex !== -1 && openingParens > closingParens) {\n url += trail.slice(0, closingParenIndex + 1)\n trail = trail.slice(closingParenIndex + 1)\n closingParenIndex = trail.indexOf(')')\n closingParens++\n }\n\n return [url, trail]\n}\n\n/**\n * @param {RegExpMatchObject} match\n * @param {boolean | null | undefined} [email=false]\n * @returns {boolean}\n */\nfunction previous(match, email) {\n const code = match.input.charCodeAt(match.index - 1)\n\n return (\n (match.index === 0 ||\n unicodeWhitespace(code) ||\n unicodePunctuation(code)) &&\n // If it’s an email, the previous character should not be a slash.\n (!email || code !== 47)\n )\n}\n","/**\n * @import {\n * CompileContext,\n * Extension as FromMarkdownExtension,\n * Handle as FromMarkdownHandle\n * } from 'mdast-util-from-markdown'\n * @import {ToMarkdownOptions} from 'mdast-util-gfm-footnote'\n * @import {\n * Handle as ToMarkdownHandle,\n * Map,\n * Options as ToMarkdownExtension\n * } from 'mdast-util-to-markdown'\n * @import {FootnoteDefinition, FootnoteReference} from 'mdast'\n */\n\nimport {ok as assert} from 'devlop'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\n\nfootnoteReference.peek = footnoteReferencePeek\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteCallString() {\n this.buffer()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteCall(token) {\n this.enter({type: 'footnoteReference', identifier: '', label: ''}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteDefinitionLabelString() {\n this.buffer()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteDefinition(token) {\n this.enter(\n {type: 'footnoteDefinition', identifier: '', label: '', children: []},\n token\n )\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCallString(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'footnoteReference')\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n node.label = label\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCall(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinitionLabelString(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'footnoteDefinition')\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n node.label = label\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinition(token) {\n this.exit(token)\n}\n\n/** @type {ToMarkdownHandle} */\nfunction footnoteReferencePeek() {\n return '['\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {FootnoteReference} node\n */\nfunction footnoteReference(node, _, state, info) {\n const tracker = state.createTracker(info)\n let value = tracker.move('[^')\n const exit = state.enter('footnoteReference')\n const subexit = state.enter('reference')\n value += tracker.move(\n state.safe(state.associationId(node), {after: ']', before: value})\n )\n subexit()\n exit()\n value += tracker.move(']')\n return value\n}\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown`.\n */\nexport function gfmFootnoteFromMarkdown() {\n return {\n enter: {\n gfmFootnoteCallString: enterFootnoteCallString,\n gfmFootnoteCall: enterFootnoteCall,\n gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,\n gfmFootnoteDefinition: enterFootnoteDefinition\n },\n exit: {\n gfmFootnoteCallString: exitFootnoteCallString,\n gfmFootnoteCall: exitFootnoteCall,\n gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,\n gfmFootnoteDefinition: exitFootnoteDefinition\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @param {ToMarkdownOptions | null | undefined} [options]\n * Configuration (optional).\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown`.\n */\nexport function gfmFootnoteToMarkdown(options) {\n // To do: next major: change default.\n let firstLineBlank = false\n\n if (options && options.firstLineBlank) {\n firstLineBlank = true\n }\n\n return {\n handlers: {footnoteDefinition, footnoteReference},\n // This is on by default already.\n unsafe: [{character: '[', inConstruct: ['label', 'phrasing', 'reference']}]\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {FootnoteDefinition} node\n */\n function footnoteDefinition(node, _, state, info) {\n const tracker = state.createTracker(info)\n let value = tracker.move('[^')\n const exit = state.enter('footnoteDefinition')\n const subexit = state.enter('label')\n value += tracker.move(\n state.safe(state.associationId(node), {before: value, after: ']'})\n )\n subexit()\n\n value += tracker.move(']:')\n\n if (node.children && node.children.length > 0) {\n tracker.shift(4)\n\n value += tracker.move(\n (firstLineBlank ? '\\n' : ' ') +\n state.indentLines(\n state.containerFlow(node, tracker.current()),\n firstLineBlank ? mapAll : mapExceptFirst\n )\n )\n }\n\n exit()\n\n return value\n }\n}\n\n/** @type {Map} */\nfunction mapExceptFirst(line, index, blank) {\n return index === 0 ? line : mapAll(line, index, blank)\n}\n\n/** @type {Map} */\nfunction mapAll(line, index, blank) {\n return (blank ? '' : ' ') + line\n}\n","/**\n * @typedef {import('mdast').Delete} Delete\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n */\n\n/**\n * List of constructs that occur in phrasing (paragraphs, headings), but cannot\n * contain strikethrough.\n * So they sort of cancel each other out.\n * Note: could use a better name.\n *\n * Note: keep in sync with: <https://github.com/syntax-tree/mdast-util-to-markdown/blob/8ce8dbf/lib/unsafe.js#L14>\n *\n * @type {Array<ConstructName>}\n */\nconst constructsWithoutStrikethrough = [\n 'autolink',\n 'destinationLiteral',\n 'destinationRaw',\n 'reference',\n 'titleQuote',\n 'titleApostrophe'\n]\n\nhandleDelete.peek = peekDelete\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM\n * strikethrough in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM strikethrough.\n */\nexport function gfmStrikethroughFromMarkdown() {\n return {\n canContainEols: ['delete'],\n enter: {strikethrough: enterStrikethrough},\n exit: {strikethrough: exitStrikethrough}\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM\n * strikethrough in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM strikethrough.\n */\nexport function gfmStrikethroughToMarkdown() {\n return {\n unsafe: [\n {\n character: '~',\n inConstruct: 'phrasing',\n notInConstruct: constructsWithoutStrikethrough\n }\n ],\n handlers: {delete: handleDelete}\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterStrikethrough(token) {\n this.enter({type: 'delete', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitStrikethrough(token) {\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {Delete} node\n */\nfunction handleDelete(node, _, state, info) {\n const tracker = state.createTracker(info)\n const exit = state.enter('strikethrough')\n let value = tracker.move('~~')\n value += state.containerPhrasing(node, {\n ...tracker.current(),\n before: value,\n after: '~'\n })\n value += tracker.move('~~')\n exit()\n return value\n}\n\n/** @type {ToMarkdownHandle} */\nfunction peekDelete() {\n return '~'\n}\n","// To do: next major: remove.\n/**\n * @typedef {Options} MarkdownTableOptions\n * Configuration.\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [alignDelimiters=true]\n * Whether to align the delimiters (default: `true`);\n * they are aligned by default:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * Pass `false` to make them staggered:\n *\n * ```markdown\n * | Alpha | B |\n * | - | - |\n * | C | Delta |\n * ```\n * @property {ReadonlyArray<string | null | undefined> | string | null | undefined} [align]\n * How to align columns (default: `''`);\n * one style for all columns or styles for their respective columns;\n * each style is either `'l'` (left), `'r'` (right), or `'c'` (center);\n * other values are treated as `''`, which doesn’t place the colon in the\n * alignment row but does align left;\n * *only the lowercased first character is used, so `Right` is fine.*\n * @property {boolean | null | undefined} [delimiterEnd=true]\n * Whether to end each row with the delimiter (default: `true`).\n *\n * > 👉 **Note**: please don’t use this: it could create fragile structures\n * > that aren’t understandable to some markdown parsers.\n *\n * When `true`, there are ending delimiters:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there are no ending delimiters:\n *\n * ```markdown\n * | Alpha | B\n * | ----- | -----\n * | C | Delta\n * ```\n * @property {boolean | null | undefined} [delimiterStart=true]\n * Whether to begin each row with the delimiter (default: `true`).\n *\n * > 👉 **Note**: please don’t use this: it could create fragile structures\n * > that aren’t understandable to some markdown parsers.\n *\n * When `true`, there are starting delimiters:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there are no starting delimiters:\n *\n * ```markdown\n * Alpha | B |\n * ----- | ----- |\n * C | Delta |\n * ```\n * @property {boolean | null | undefined} [padding=true]\n * Whether to add a space of padding between delimiters and cells\n * (default: `true`).\n *\n * When `true`, there is padding:\n *\n * ```markdown\n * | Alpha | B |\n * | ----- | ----- |\n * | C | Delta |\n * ```\n *\n * When `false`, there is no padding:\n *\n * ```markdown\n * |Alpha|B |\n * |-----|-----|\n * |C |Delta|\n * ```\n * @property {((value: string) => number) | null | undefined} [stringLength]\n * Function to detect the length of table cell content (optional);\n * this is used when aligning the delimiters (`|`) between table cells;\n * full-width characters and emoji mess up delimiter alignment when viewing\n * the markdown source;\n * to fix this, you can pass this function,\n * which receives the cell content and returns its “visible” size;\n * note that what is and isn’t visible depends on where the text is displayed.\n *\n * Without such a function, the following:\n *\n * ```js\n * markdownTable([\n * ['Alpha', 'Bravo'],\n * ['中文', 'Charlie'],\n * ['👩❤️👩', 'Delta']\n * ])\n * ```\n *\n * Yields:\n *\n * ```markdown\n * | Alpha | Bravo |\n * | - | - |\n * | 中文 | Charlie |\n * | 👩❤️👩 | Delta |\n * ```\n *\n * With [`string-width`](https://github.com/sindresorhus/string-width):\n *\n * ```js\n * import stringWidth from 'string-width'\n *\n * markdownTable(\n * [\n * ['Alpha', 'Bravo'],\n * ['中文', 'Charlie'],\n * ['👩❤️👩', 'Delta']\n * ],\n * {stringLength: stringWidth}\n * )\n * ```\n *\n * Yields:\n *\n * ```markdown\n * | Alpha | Bravo |\n * | ----- | ------- |\n * | 中文 | Charlie |\n * | 👩❤️👩 | Delta |\n * ```\n */\n\n/**\n * @param {string} value\n * Cell value.\n * @returns {number}\n * Cell size.\n */\nfunction defaultStringLength(value) {\n return value.length\n}\n\n/**\n * Generate a markdown\n * ([GFM](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables))\n * table.\n *\n * @param {ReadonlyArray<ReadonlyArray<string | null | undefined>>} table\n * Table data (matrix of strings).\n * @param {Readonly<Options> | null | undefined} [options]\n * Configuration (optional).\n * @returns {string}\n * Result.\n */\nexport function markdownTable(table, options) {\n const settings = options || {}\n // To do: next major: change to spread.\n const align = (settings.align || []).concat()\n const stringLength = settings.stringLength || defaultStringLength\n /** @type {Array<number>} Character codes as symbols for alignment per column. */\n const alignments = []\n /** @type {Array<Array<string>>} Cells per row. */\n const cellMatrix = []\n /** @type {Array<Array<number>>} Sizes of each cell per row. */\n const sizeMatrix = []\n /** @type {Array<number>} */\n const longestCellByColumn = []\n let mostCellsPerRow = 0\n let rowIndex = -1\n\n // This is a superfluous loop if we don’t align delimiters, but otherwise we’d\n // do superfluous work when aligning, so optimize for aligning.\n while (++rowIndex < table.length) {\n /** @type {Array<string>} */\n const row = []\n /** @type {Array<number>} */\n const sizes = []\n let columnIndex = -1\n\n if (table[rowIndex].length > mostCellsPerRow) {\n mostCellsPerRow = table[rowIndex].length\n }\n\n while (++columnIndex < table[rowIndex].length) {\n const cell = serialize(table[rowIndex][columnIndex])\n\n if (settings.alignDelimiters !== false) {\n const size = stringLength(cell)\n sizes[columnIndex] = size\n\n if (\n longestCellByColumn[columnIndex] === undefined ||\n size > longestCellByColumn[columnIndex]\n ) {\n longestCellByColumn[columnIndex] = size\n }\n }\n\n row.push(cell)\n }\n\n cellMatrix[rowIndex] = row\n sizeMatrix[rowIndex] = sizes\n }\n\n // Figure out which alignments to use.\n let columnIndex = -1\n\n if (typeof align === 'object' && 'length' in align) {\n while (++columnIndex < mostCellsPerRow) {\n alignments[columnIndex] = toAlignment(align[columnIndex])\n }\n } else {\n const code = toAlignment(align)\n\n while (++columnIndex < mostCellsPerRow) {\n alignments[columnIndex] = code\n }\n }\n\n // Inject the alignment row.\n columnIndex = -1\n /** @type {Array<string>} */\n const row = []\n /** @type {Array<number>} */\n const sizes = []\n\n while (++columnIndex < mostCellsPerRow) {\n const code = alignments[columnIndex]\n let before = ''\n let after = ''\n\n if (code === 99 /* `c` */) {\n before = ':'\n after = ':'\n } else if (code === 108 /* `l` */) {\n before = ':'\n } else if (code === 114 /* `r` */) {\n after = ':'\n }\n\n // There *must* be at least one hyphen-minus in each alignment cell.\n let size =\n settings.alignDelimiters === false\n ? 1\n : Math.max(\n 1,\n longestCellByColumn[columnIndex] - before.length - after.length\n )\n\n const cell = before + '-'.repeat(size) + after\n\n if (settings.alignDelimiters !== false) {\n size = before.length + size + after.length\n\n if (size > longestCellByColumn[columnIndex]) {\n longestCellByColumn[columnIndex] = size\n }\n\n sizes[columnIndex] = size\n }\n\n row[columnIndex] = cell\n }\n\n // Inject the alignment row.\n cellMatrix.splice(1, 0, row)\n sizeMatrix.splice(1, 0, sizes)\n\n rowIndex = -1\n /** @type {Array<string>} */\n const lines = []\n\n while (++rowIndex < cellMatrix.length) {\n const row = cellMatrix[rowIndex]\n const sizes = sizeMatrix[rowIndex]\n columnIndex = -1\n /** @type {Array<string>} */\n const line = []\n\n while (++columnIndex < mostCellsPerRow) {\n const cell = row[columnIndex] || ''\n let before = ''\n let after = ''\n\n if (settings.alignDelimiters !== false) {\n const size =\n longestCellByColumn[columnIndex] - (sizes[columnIndex] || 0)\n const code = alignments[columnIndex]\n\n if (code === 114 /* `r` */) {\n before = ' '.repeat(size)\n } else if (code === 99 /* `c` */) {\n if (size % 2) {\n before = ' '.repeat(size / 2 + 0.5)\n after = ' '.repeat(size / 2 - 0.5)\n } else {\n before = ' '.repeat(size / 2)\n after = before\n }\n } else {\n after = ' '.repeat(size)\n }\n }\n\n if (settings.delimiterStart !== false && !columnIndex) {\n line.push('|')\n }\n\n if (\n settings.padding !== false &&\n // Don’t add the opening space if we’re not aligning and the cell is\n // empty: there will be a closing space.\n !(settings.alignDelimiters === false && cell === '') &&\n (settings.delimiterStart !== false || columnIndex)\n ) {\n line.push(' ')\n }\n\n if (settings.alignDelimiters !== false) {\n line.push(before)\n }\n\n line.push(cell)\n\n if (settings.alignDelimiters !== false) {\n line.push(after)\n }\n\n if (settings.padding !== false) {\n line.push(' ')\n }\n\n if (\n settings.delimiterEnd !== false ||\n columnIndex !== mostCellsPerRow - 1\n ) {\n line.push('|')\n }\n }\n\n lines.push(\n settings.delimiterEnd === false\n ? line.join('').replace(/ +$/, '')\n : line.join('')\n )\n }\n\n return lines.join('\\n')\n}\n\n/**\n * @param {string | null | undefined} [value]\n * Value to serialize.\n * @returns {string}\n * Result.\n */\nfunction serialize(value) {\n return value === null || value === undefined ? '' : String(value)\n}\n\n/**\n * @param {string | null | undefined} value\n * Value.\n * @returns {number}\n * Alignment.\n */\nfunction toAlignment(value) {\n const code = typeof value === 'string' ? value.codePointAt(0) : 0\n\n return code === 67 /* `C` */ || code === 99 /* `c` */\n ? 99 /* `c` */\n : code === 76 /* `L` */ || code === 108 /* `l` */\n ? 108 /* `l` */\n : code === 82 /* `R` */ || code === 114 /* `r` */\n ? 114 /* `r` */\n : 0\n}\n","/**\n * @import {Blockquote, Parents} from 'mdast'\n * @import {Info, Map, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {Blockquote} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function blockquote(node, _, state, info) {\n const exit = state.enter('blockquote')\n const tracker = state.createTracker(info)\n tracker.move('> ')\n tracker.shift(2)\n const value = state.indentLines(\n state.containerFlow(node, tracker.current()),\n map\n )\n exit()\n return value\n}\n\n/** @type {Map} */\nfunction map(line, _, blank) {\n return '>' + (blank ? '' : ' ') + line\n}\n","/**\n * @import {ConstructName, Unsafe} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {Array<ConstructName>} stack\n * @param {Unsafe} pattern\n * @returns {boolean}\n */\nexport function patternInScope(stack, pattern) {\n return (\n listInScope(stack, pattern.inConstruct, true) &&\n !listInScope(stack, pattern.notInConstruct, false)\n )\n}\n\n/**\n * @param {Array<ConstructName>} stack\n * @param {Unsafe['inConstruct']} list\n * @param {boolean} none\n * @returns {boolean}\n */\nfunction listInScope(stack, list, none) {\n if (typeof list === 'string') {\n list = [list]\n }\n\n if (!list || list.length === 0) {\n return none\n }\n\n let index = -1\n\n while (++index < list.length) {\n if (stack.includes(list[index])) {\n return true\n }\n }\n\n return false\n}\n","/**\n * @import {Break, Parents} from 'mdast'\n * @import {Info, State} from 'mdast-util-to-markdown'\n */\n\nimport {patternInScope} from '../util/pattern-in-scope.js'\n\n/**\n * @param {Break} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function hardBreak(_, _1, state, info) {\n let index = -1\n\n while (++index < state.unsafe.length) {\n // If we can’t put eols in this construct (setext headings, tables), use a\n // space instead.\n if (\n state.unsafe[index].character === '\\n' &&\n patternInScope(state.stack, state.unsafe[index])\n ) {\n return /[ \\t]/.test(info.before) ? '' : ' '\n }\n }\n\n return '\\\\\\n'\n}\n","/**\n * Get the count of the longest repeating streak of `substring` in `value`.\n *\n * @param {string} value\n * Content to search in.\n * @param {string} substring\n * Substring to look for, typically one character.\n * @returns {number}\n * Count of most frequent adjacent `substring`s in `value`.\n */\nexport function longestStreak(value, substring) {\n const source = String(value)\n let index = source.indexOf(substring)\n let expected = index\n let count = 0\n let max = 0\n\n if (typeof substring !== 'string') {\n throw new TypeError('Expected substring')\n }\n\n while (index !== -1) {\n if (index === expected) {\n if (++count > max) {\n max = count\n }\n } else {\n count = 1\n }\n\n expected = index + substring.length\n index = source.indexOf(substring, expected)\n }\n\n return max\n}\n","/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Code} from 'mdast'\n */\n\n/**\n * @param {Code} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatCodeAsIndented(node, state) {\n return Boolean(\n state.options.fences === false &&\n node.value &&\n // If there’s no info…\n !node.lang &&\n // And there’s a non-whitespace character…\n /[^ \\r\\n]/.test(node.value) &&\n // And the value doesn’t start or end in a blank…\n !/^[\\t ]*(?:[\\r\\n]|$)|(?:^|[\\r\\n])[\\t ]*$/.test(node.value)\n )\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['fence'], null | undefined>}\n */\nexport function checkFence(state) {\n const marker = state.options.fence || '`'\n\n if (marker !== '`' && marker !== '~') {\n throw new Error(\n 'Cannot serialize code with `' +\n marker +\n '` for `options.fence`, expected `` ` `` or `~`'\n )\n }\n\n return marker\n}\n","/**\n * @import {Info, Map, State} from 'mdast-util-to-markdown'\n * @import {Code, Parents} from 'mdast'\n */\n\nimport {longestStreak} from 'longest-streak'\nimport {formatCodeAsIndented} from '../util/format-code-as-indented.js'\nimport {checkFence} from '../util/check-fence.js'\n\n/**\n * @param {Code} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function code(node, _, state, info) {\n const marker = checkFence(state)\n const raw = node.value || ''\n const suffix = marker === '`' ? 'GraveAccent' : 'Tilde'\n\n if (formatCodeAsIndented(node, state)) {\n const exit = state.enter('codeIndented')\n const value = state.indentLines(raw, map)\n exit()\n return value\n }\n\n const tracker = state.createTracker(info)\n const sequence = marker.repeat(Math.max(longestStreak(raw, marker) + 1, 3))\n const exit = state.enter('codeFenced')\n let value = tracker.move(sequence)\n\n if (node.lang) {\n const subexit = state.enter(`codeFencedLang${suffix}`)\n value += tracker.move(\n state.safe(node.lang, {\n before: value,\n after: ' ',\n encode: ['`'],\n ...tracker.current()\n })\n )\n subexit()\n }\n\n if (node.lang && node.meta) {\n const subexit = state.enter(`codeFencedMeta${suffix}`)\n value += tracker.move(' ')\n value += tracker.move(\n state.safe(node.meta, {\n before: value,\n after: '\\n',\n encode: ['`'],\n ...tracker.current()\n })\n )\n subexit()\n }\n\n value += tracker.move('\\n')\n\n if (raw) {\n value += tracker.move(raw + '\\n')\n }\n\n value += tracker.move(sequence)\n exit()\n return value\n}\n\n/** @type {Map} */\nfunction map(line, _, blank) {\n return (blank ? '' : ' ') + line\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['quote'], null | undefined>}\n */\nexport function checkQuote(state) {\n const marker = state.options.quote || '\"'\n\n if (marker !== '\"' && marker !== \"'\") {\n throw new Error(\n 'Cannot serialize title with `' +\n marker +\n '` for `options.quote`, expected `\"`, or `\\'`'\n )\n }\n\n return marker\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Definition, Parents} from 'mdast'\n */\n\nimport {checkQuote} from '../util/check-quote.js'\n\n/**\n * @param {Definition} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function definition(node, _, state, info) {\n const quote = checkQuote(state)\n const suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n const exit = state.enter('definition')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('[')\n value += tracker.move(\n state.safe(state.associationId(node), {\n before: value,\n after: ']',\n ...tracker.current()\n })\n )\n value += tracker.move(']: ')\n\n subexit()\n\n if (\n // If there’s no url, or…\n !node.url ||\n // If there are control characters or whitespace.\n /[\\0- \\u007F]/.test(node.url)\n ) {\n subexit = state.enter('destinationLiteral')\n value += tracker.move('<')\n value += tracker.move(\n state.safe(node.url, {before: value, after: '>', ...tracker.current()})\n )\n value += tracker.move('>')\n } else {\n // No whitespace, raw is prettier.\n subexit = state.enter('destinationRaw')\n value += tracker.move(\n state.safe(node.url, {\n before: value,\n after: node.title ? ' ' : '\\n',\n ...tracker.current()\n })\n )\n }\n\n subexit()\n\n if (node.title) {\n subexit = state.enter(`title${suffix}`)\n value += tracker.move(' ' + quote)\n value += tracker.move(\n state.safe(node.title, {\n before: value,\n after: quote,\n ...tracker.current()\n })\n )\n value += tracker.move(quote)\n subexit()\n }\n\n exit()\n\n return value\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['emphasis'], null | undefined>}\n */\nexport function checkEmphasis(state) {\n const marker = state.options.emphasis || '*'\n\n if (marker !== '*' && marker !== '_') {\n throw new Error(\n 'Cannot serialize emphasis with `' +\n marker +\n '` for `options.emphasis`, expected `*`, or `_`'\n )\n }\n\n return marker\n}\n","/**\n * Encode a code point as a character reference.\n *\n * @param {number} code\n * Code point to encode.\n * @returns {string}\n * Encoded character reference.\n */\nexport function encodeCharacterReference(code) {\n return '&#x' + code.toString(16).toUpperCase() + ';'\n}\n","/**\n * @import {EncodeSides} from '../types.js'\n */\n\nimport {classifyCharacter} from 'micromark-util-classify-character'\n\n/**\n * Check whether to encode (as a character reference) the characters\n * surrounding an attention run.\n *\n * Which characters are around an attention run influence whether it works or\n * not.\n *\n * See <https://github.com/orgs/syntax-tree/discussions/60> for more info.\n * See this markdown in a particular renderer to see what works:\n *\n * ```markdown\n * | | A (letter inside) | B (punctuation inside) | C (whitespace inside) | D (nothing inside) |\n * | ----------------------- | ----------------- | ---------------------- | --------------------- | ------------------ |\n * | 1 (letter outside) | x*y*z | x*.*z | x* *z | x**z |\n * | 2 (punctuation outside) | .*y*. | .*.*. | .* *. | .**. |\n * | 3 (whitespace outside) | x *y* z | x *.* z | x * * z | x ** z |\n * | 4 (nothing outside) | *x* | *.* | * * | ** |\n * ```\n *\n * @param {number} outside\n * Code point on the outer side of the run.\n * @param {number} inside\n * Code point on the inner side of the run.\n * @param {'*' | '_'} marker\n * Marker of the run.\n * Underscores are handled more strictly (they form less often) than\n * asterisks.\n * @returns {EncodeSides}\n * Whether to encode characters.\n */\n// Important: punctuation must never be encoded.\n// Punctuation is solely used by markdown constructs.\n// And by encoding itself.\n// Encoding them will break constructs or double encode things.\nexport function encodeInfo(outside, inside, marker) {\n const outsideKind = classifyCharacter(outside)\n const insideKind = classifyCharacter(inside)\n\n // Letter outside:\n if (outsideKind === undefined) {\n return insideKind === undefined\n ? // Letter inside:\n // we have to encode *both* letters for `_` as it is looser.\n // it already forms for `*` (and GFMs `~`).\n marker === '_'\n ? {inside: true, outside: true}\n : {inside: false, outside: false}\n : insideKind === 1\n ? // Whitespace inside: encode both (letter, whitespace).\n {inside: true, outside: true}\n : // Punctuation inside: encode outer (letter)\n {inside: false, outside: true}\n }\n\n // Whitespace outside:\n if (outsideKind === 1) {\n return insideKind === undefined\n ? // Letter inside: already forms.\n {inside: false, outside: false}\n : insideKind === 1\n ? // Whitespace inside: encode both (whitespace).\n {inside: true, outside: true}\n : // Punctuation inside: already forms.\n {inside: false, outside: false}\n }\n\n // Punctuation outside:\n return insideKind === undefined\n ? // Letter inside: already forms.\n {inside: false, outside: false}\n : insideKind === 1\n ? // Whitespace inside: encode inner (whitespace).\n {inside: true, outside: false}\n : // Punctuation inside: already forms.\n {inside: false, outside: false}\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Emphasis, Parents} from 'mdast'\n */\n\nimport {checkEmphasis} from '../util/check-emphasis.js'\nimport {encodeCharacterReference} from '../util/encode-character-reference.js'\nimport {encodeInfo} from '../util/encode-info.js'\n\nemphasis.peek = emphasisPeek\n\n/**\n * @param {Emphasis} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function emphasis(node, _, state, info) {\n const marker = checkEmphasis(state)\n const exit = state.enter('emphasis')\n const tracker = state.createTracker(info)\n const before = tracker.move(marker)\n\n let between = tracker.move(\n state.containerPhrasing(node, {\n after: marker,\n before,\n ...tracker.current()\n })\n )\n const betweenHead = between.charCodeAt(0)\n const open = encodeInfo(\n info.before.charCodeAt(info.before.length - 1),\n betweenHead,\n marker\n )\n\n if (open.inside) {\n between = encodeCharacterReference(betweenHead) + between.slice(1)\n }\n\n const betweenTail = between.charCodeAt(between.length - 1)\n const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker)\n\n if (close.inside) {\n between = between.slice(0, -1) + encodeCharacterReference(betweenTail)\n }\n\n const after = tracker.move(marker)\n\n exit()\n\n state.attentionEncodeSurroundingInfo = {\n after: close.outside,\n before: open.outside\n }\n return before + between + after\n}\n\n/**\n * @param {Emphasis} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @returns {string}\n */\nfunction emphasisPeek(_, _1, state) {\n return state.options.emphasis || '*'\n}\n","/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Heading} from 'mdast'\n */\n\nimport {EXIT, visit} from 'unist-util-visit'\nimport {toString} from 'mdast-util-to-string'\n\n/**\n * @param {Heading} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatHeadingAsSetext(node, state) {\n let literalWithBreak = false\n\n // Look for literals with a line break.\n // Note that this also\n visit(node, function (node) {\n if (\n ('value' in node && /\\r?\\n|\\r/.test(node.value)) ||\n node.type === 'break'\n ) {\n literalWithBreak = true\n return EXIT\n }\n })\n\n return Boolean(\n (!node.depth || node.depth < 3) &&\n toString(node) &&\n (state.options.setext || literalWithBreak)\n )\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Heading, Parents} from 'mdast'\n */\n\nimport {encodeCharacterReference} from '../util/encode-character-reference.js'\nimport {formatHeadingAsSetext} from '../util/format-heading-as-setext.js'\n\n/**\n * @param {Heading} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function heading(node, _, state, info) {\n const rank = Math.max(Math.min(6, node.depth || 1), 1)\n const tracker = state.createTracker(info)\n\n if (formatHeadingAsSetext(node, state)) {\n const exit = state.enter('headingSetext')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, {\n ...tracker.current(),\n before: '\\n',\n after: '\\n'\n })\n subexit()\n exit()\n\n return (\n value +\n '\\n' +\n (rank === 1 ? '=' : '-').repeat(\n // The whole size…\n value.length -\n // Minus the position of the character after the last EOL (or\n // 0 if there is none)…\n (Math.max(value.lastIndexOf('\\r'), value.lastIndexOf('\\n')) + 1)\n )\n )\n }\n\n const sequence = '#'.repeat(rank)\n const exit = state.enter('headingAtx')\n const subexit = state.enter('phrasing')\n\n // Note: for proper tracking, we should reset the output positions when there\n // is no content returned, because then the space is not output.\n // Practically, in that case, there is no content, so it doesn’t matter that\n // we’ve tracked one too many characters.\n tracker.move(sequence + ' ')\n\n let value = state.containerPhrasing(node, {\n before: '# ',\n after: '\\n',\n ...tracker.current()\n })\n\n if (/^[\\t ]/.test(value)) {\n // To do: what effect has the character reference on tracking?\n value = encodeCharacterReference(value.charCodeAt(0)) + value.slice(1)\n }\n\n value = value ? sequence + ' ' + value : sequence\n\n if (state.options.closeAtx) {\n value += ' ' + sequence\n }\n\n subexit()\n exit()\n\n return value\n}\n","/**\n * @import {Html} from 'mdast'\n */\n\nhtml.peek = htmlPeek\n\n/**\n * @param {Html} node\n * @returns {string}\n */\nexport function html(node) {\n return node.value || ''\n}\n\n/**\n * @returns {string}\n */\nfunction htmlPeek() {\n return '<'\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Image, Parents} from 'mdast'\n */\n\nimport {checkQuote} from '../util/check-quote.js'\n\nimage.peek = imagePeek\n\n/**\n * @param {Image} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function image(node, _, state, info) {\n const quote = checkQuote(state)\n const suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n const exit = state.enter('image')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('![')\n value += tracker.move(\n state.safe(node.alt, {before: value, after: ']', ...tracker.current()})\n )\n value += tracker.move('](')\n\n subexit()\n\n if (\n // If there’s no url but there is a title…\n (!node.url && node.title) ||\n // If there are control characters or whitespace.\n /[\\0- \\u007F]/.test(node.url)\n ) {\n subexit = state.enter('destinationLiteral')\n value += tracker.move('<')\n value += tracker.move(\n state.safe(node.url, {before: value, after: '>', ...tracker.current()})\n )\n value += tracker.move('>')\n } else {\n // No whitespace, raw is prettier.\n subexit = state.enter('destinationRaw')\n value += tracker.move(\n state.safe(node.url, {\n before: value,\n after: node.title ? ' ' : ')',\n ...tracker.current()\n })\n )\n }\n\n subexit()\n\n if (node.title) {\n subexit = state.enter(`title${suffix}`)\n value += tracker.move(' ' + quote)\n value += tracker.move(\n state.safe(node.title, {\n before: value,\n after: quote,\n ...tracker.current()\n })\n )\n value += tracker.move(quote)\n subexit()\n }\n\n value += tracker.move(')')\n exit()\n\n return value\n}\n\n/**\n * @returns {string}\n */\nfunction imagePeek() {\n return '!'\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {ImageReference, Parents} from 'mdast'\n */\n\nimageReference.peek = imageReferencePeek\n\n/**\n * @param {ImageReference} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function imageReference(node, _, state, info) {\n const type = node.referenceType\n const exit = state.enter('imageReference')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('![')\n const alt = state.safe(node.alt, {\n before: value,\n after: ']',\n ...tracker.current()\n })\n value += tracker.move(alt + '][')\n\n subexit()\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n const stack = state.stack\n state.stack = []\n subexit = state.enter('reference')\n // Note: for proper tracking, we should reset the output positions when we end\n // up making a `shortcut` reference, because then there is no brace output.\n // Practically, in that case, there is no content, so it doesn’t matter that\n // we’ve tracked one too many characters.\n const reference = state.safe(state.associationId(node), {\n before: value,\n after: ']',\n ...tracker.current()\n })\n subexit()\n state.stack = stack\n exit()\n\n if (type === 'full' || !alt || alt !== reference) {\n value += tracker.move(reference + ']')\n } else if (type === 'shortcut') {\n // Remove the unwanted `[`.\n value = value.slice(0, -1)\n } else {\n value += tracker.move(']')\n }\n\n return value\n}\n\n/**\n * @returns {string}\n */\nfunction imageReferencePeek() {\n return '!'\n}\n","/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {InlineCode, Parents} from 'mdast'\n */\n\ninlineCode.peek = inlineCodePeek\n\n/**\n * @param {InlineCode} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @returns {string}\n */\nexport function inlineCode(node, _, state) {\n let value = node.value || ''\n let sequence = '`'\n let index = -1\n\n // If there is a single grave accent on its own in the code, use a fence of\n // two.\n // If there are two in a row, use one.\n while (new RegExp('(^|[^`])' + sequence + '([^`]|$)').test(value)) {\n sequence += '`'\n }\n\n // If this is not just spaces or eols (tabs don’t count), and either the\n // first or last character are a space, eol, or tick, then pad with spaces.\n if (\n /[^ \\r\\n]/.test(value) &&\n ((/^[ \\r\\n]/.test(value) && /[ \\r\\n]$/.test(value)) || /^`|`$/.test(value))\n ) {\n value = ' ' + value + ' '\n }\n\n // We have a potential problem: certain characters after eols could result in\n // blocks being seen.\n // For example, if someone injected the string `'\\n# b'`, then that would\n // result in an ATX heading.\n // We can’t escape characters in `inlineCode`, but because eols are\n // transformed to spaces when going from markdown to HTML anyway, we can swap\n // them out.\n while (++index < state.unsafe.length) {\n const pattern = state.unsafe[index]\n const expression = state.compilePattern(pattern)\n /** @type {RegExpExecArray | null} */\n let match\n\n // Only look for `atBreak`s.\n // Btw: note that `atBreak` patterns will always start the regex at LF or\n // CR.\n if (!pattern.atBreak) continue\n\n while ((match = expression.exec(value))) {\n let position = match.index\n\n // Support CRLF (patterns only look for one of the characters).\n if (\n value.charCodeAt(position) === 10 /* `\\n` */ &&\n value.charCodeAt(position - 1) === 13 /* `\\r` */\n ) {\n position--\n }\n\n value = value.slice(0, position) + ' ' + value.slice(match.index + 1)\n }\n }\n\n return sequence + value + sequence\n}\n\n/**\n * @returns {string}\n */\nfunction inlineCodePeek() {\n return '`'\n}\n","/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Link} from 'mdast'\n */\n\nimport {toString} from 'mdast-util-to-string'\n\n/**\n * @param {Link} node\n * @param {State} state\n * @returns {boolean}\n */\nexport function formatLinkAsAutolink(node, state) {\n const raw = toString(node)\n\n return Boolean(\n !state.options.resourceLink &&\n // If there’s a url…\n node.url &&\n // And there’s a no title…\n !node.title &&\n // And the content of `node` is a single text node…\n node.children &&\n node.children.length === 1 &&\n node.children[0].type === 'text' &&\n // And if the url is the same as the content…\n (raw === node.url || 'mailto:' + raw === node.url) &&\n // And that starts w/ a protocol…\n /^[a-z][a-z+.-]+:/i.test(node.url) &&\n // And that doesn’t contain ASCII control codes (character escapes and\n // references don’t work), space, or angle brackets…\n !/[\\0- <>\\u007F]/.test(node.url)\n )\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Link, Parents} from 'mdast'\n * @import {Exit} from '../types.js'\n */\n\nimport {checkQuote} from '../util/check-quote.js'\nimport {formatLinkAsAutolink} from '../util/format-link-as-autolink.js'\n\nlink.peek = linkPeek\n\n/**\n * @param {Link} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function link(node, _, state, info) {\n const quote = checkQuote(state)\n const suffix = quote === '\"' ? 'Quote' : 'Apostrophe'\n const tracker = state.createTracker(info)\n /** @type {Exit} */\n let exit\n /** @type {Exit} */\n let subexit\n\n if (formatLinkAsAutolink(node, state)) {\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n const stack = state.stack\n state.stack = []\n exit = state.enter('autolink')\n let value = tracker.move('<')\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: '>',\n ...tracker.current()\n })\n )\n value += tracker.move('>')\n exit()\n state.stack = stack\n return value\n }\n\n exit = state.enter('link')\n subexit = state.enter('label')\n let value = tracker.move('[')\n value += tracker.move(\n state.containerPhrasing(node, {\n before: value,\n after: '](',\n ...tracker.current()\n })\n )\n value += tracker.move('](')\n subexit()\n\n if (\n // If there’s no url but there is a title…\n (!node.url && node.title) ||\n // If there are control characters or whitespace.\n /[\\0- \\u007F]/.test(node.url)\n ) {\n subexit = state.enter('destinationLiteral')\n value += tracker.move('<')\n value += tracker.move(\n state.safe(node.url, {before: value, after: '>', ...tracker.current()})\n )\n value += tracker.move('>')\n } else {\n // No whitespace, raw is prettier.\n subexit = state.enter('destinationRaw')\n value += tracker.move(\n state.safe(node.url, {\n before: value,\n after: node.title ? ' ' : ')',\n ...tracker.current()\n })\n )\n }\n\n subexit()\n\n if (node.title) {\n subexit = state.enter(`title${suffix}`)\n value += tracker.move(' ' + quote)\n value += tracker.move(\n state.safe(node.title, {\n before: value,\n after: quote,\n ...tracker.current()\n })\n )\n value += tracker.move(quote)\n subexit()\n }\n\n value += tracker.move(')')\n\n exit()\n return value\n}\n\n/**\n * @param {Link} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @returns {string}\n */\nfunction linkPeek(node, _, state) {\n return formatLinkAsAutolink(node, state) ? '<' : '['\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {LinkReference, Parents} from 'mdast'\n */\n\nlinkReference.peek = linkReferencePeek\n\n/**\n * @param {LinkReference} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function linkReference(node, _, state, info) {\n const type = node.referenceType\n const exit = state.enter('linkReference')\n let subexit = state.enter('label')\n const tracker = state.createTracker(info)\n let value = tracker.move('[')\n const text = state.containerPhrasing(node, {\n before: value,\n after: ']',\n ...tracker.current()\n })\n value += tracker.move(text + '][')\n\n subexit()\n // Hide the fact that we’re in phrasing, because escapes don’t work.\n const stack = state.stack\n state.stack = []\n subexit = state.enter('reference')\n // Note: for proper tracking, we should reset the output positions when we end\n // up making a `shortcut` reference, because then there is no brace output.\n // Practically, in that case, there is no content, so it doesn’t matter that\n // we’ve tracked one too many characters.\n const reference = state.safe(state.associationId(node), {\n before: value,\n after: ']',\n ...tracker.current()\n })\n subexit()\n state.stack = stack\n exit()\n\n if (type === 'full' || !text || text !== reference) {\n value += tracker.move(reference + ']')\n } else if (type === 'shortcut') {\n // Remove the unwanted `[`.\n value = value.slice(0, -1)\n } else {\n value += tracker.move(']')\n }\n\n return value\n}\n\n/**\n * @returns {string}\n */\nfunction linkReferencePeek() {\n return '['\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['bullet'], null | undefined>}\n */\nexport function checkBullet(state) {\n const marker = state.options.bullet || '*'\n\n if (marker !== '*' && marker !== '+' && marker !== '-') {\n throw new Error(\n 'Cannot serialize items with `' +\n marker +\n '` for `options.bullet`, expected `*`, `+`, or `-`'\n )\n }\n\n return marker\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\nimport {checkBullet} from './check-bullet.js'\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['bullet'], null | undefined>}\n */\nexport function checkBulletOther(state) {\n const bullet = checkBullet(state)\n const bulletOther = state.options.bulletOther\n\n if (!bulletOther) {\n return bullet === '*' ? '-' : '*'\n }\n\n if (bulletOther !== '*' && bulletOther !== '+' && bulletOther !== '-') {\n throw new Error(\n 'Cannot serialize items with `' +\n bulletOther +\n '` for `options.bulletOther`, expected `*`, `+`, or `-`'\n )\n }\n\n if (bulletOther === bullet) {\n throw new Error(\n 'Expected `bullet` (`' +\n bullet +\n '`) and `bulletOther` (`' +\n bulletOther +\n '`) to be different'\n )\n }\n\n return bulletOther\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['bulletOrdered'], null | undefined>}\n */\nexport function checkBulletOrdered(state) {\n const marker = state.options.bulletOrdered || '.'\n\n if (marker !== '.' && marker !== ')') {\n throw new Error(\n 'Cannot serialize items with `' +\n marker +\n '` for `options.bulletOrdered`, expected `.` or `)`'\n )\n }\n\n return marker\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['rule'], null | undefined>}\n */\nexport function checkRule(state) {\n const marker = state.options.rule || '*'\n\n if (marker !== '*' && marker !== '-' && marker !== '_') {\n throw new Error(\n 'Cannot serialize rules with `' +\n marker +\n '` for `options.rule`, expected `*`, `-`, or `_`'\n )\n }\n\n return marker\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {List, Parents} from 'mdast'\n */\n\nimport {checkBullet} from '../util/check-bullet.js'\nimport {checkBulletOther} from '../util/check-bullet-other.js'\nimport {checkBulletOrdered} from '../util/check-bullet-ordered.js'\nimport {checkRule} from '../util/check-rule.js'\n\n/**\n * @param {List} node\n * @param {Parents | undefined} parent\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function list(node, parent, state, info) {\n const exit = state.enter('list')\n const bulletCurrent = state.bulletCurrent\n /** @type {string} */\n let bullet = node.ordered ? checkBulletOrdered(state) : checkBullet(state)\n /** @type {string} */\n const bulletOther = node.ordered\n ? bullet === '.'\n ? ')'\n : '.'\n : checkBulletOther(state)\n let useDifferentMarker =\n parent && state.bulletLastUsed ? bullet === state.bulletLastUsed : false\n\n if (!node.ordered) {\n const firstListItem = node.children ? node.children[0] : undefined\n\n // If there’s an empty first list item directly in two list items,\n // we have to use a different bullet:\n //\n // ```markdown\n // * - *\n // ```\n //\n // …because otherwise it would become one big thematic break.\n if (\n // Bullet could be used as a thematic break marker:\n (bullet === '*' || bullet === '-') &&\n // Empty first list item:\n firstListItem &&\n (!firstListItem.children || !firstListItem.children[0]) &&\n // Directly in two other list items:\n state.stack[state.stack.length - 1] === 'list' &&\n state.stack[state.stack.length - 2] === 'listItem' &&\n state.stack[state.stack.length - 3] === 'list' &&\n state.stack[state.stack.length - 4] === 'listItem' &&\n // That are each the first child.\n state.indexStack[state.indexStack.length - 1] === 0 &&\n state.indexStack[state.indexStack.length - 2] === 0 &&\n state.indexStack[state.indexStack.length - 3] === 0\n ) {\n useDifferentMarker = true\n }\n\n // If there’s a thematic break at the start of the first list item,\n // we have to use a different bullet:\n //\n // ```markdown\n // * ---\n // ```\n //\n // …because otherwise it would become one big thematic break.\n if (checkRule(state) === bullet && firstListItem) {\n let index = -1\n\n while (++index < node.children.length) {\n const item = node.children[index]\n\n if (\n item &&\n item.type === 'listItem' &&\n item.children &&\n item.children[0] &&\n item.children[0].type === 'thematicBreak'\n ) {\n useDifferentMarker = true\n break\n }\n }\n }\n }\n\n if (useDifferentMarker) {\n bullet = bulletOther\n }\n\n state.bulletCurrent = bullet\n const value = state.containerFlow(node, info)\n state.bulletLastUsed = bullet\n state.bulletCurrent = bulletCurrent\n exit()\n return value\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['listItemIndent'], null | undefined>}\n */\nexport function checkListItemIndent(state) {\n const style = state.options.listItemIndent || 'one'\n\n if (style !== 'tab' && style !== 'one' && style !== 'mixed') {\n throw new Error(\n 'Cannot serialize items with `' +\n style +\n '` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`'\n )\n }\n\n return style\n}\n","/**\n * @import {Info, Map, State} from 'mdast-util-to-markdown'\n * @import {ListItem, Parents} from 'mdast'\n */\n\nimport {checkBullet} from '../util/check-bullet.js'\nimport {checkListItemIndent} from '../util/check-list-item-indent.js'\n\n/**\n * @param {ListItem} node\n * @param {Parents | undefined} parent\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function listItem(node, parent, state, info) {\n const listItemIndent = checkListItemIndent(state)\n let bullet = state.bulletCurrent || checkBullet(state)\n\n // Add the marker value for ordered lists.\n if (parent && parent.type === 'list' && parent.ordered) {\n bullet =\n (typeof parent.start === 'number' && parent.start > -1\n ? parent.start\n : 1) +\n (state.options.incrementListMarker === false\n ? 0\n : parent.children.indexOf(node)) +\n bullet\n }\n\n let size = bullet.length + 1\n\n if (\n listItemIndent === 'tab' ||\n (listItemIndent === 'mixed' &&\n ((parent && parent.type === 'list' && parent.spread) || node.spread))\n ) {\n size = Math.ceil(size / 4) * 4\n }\n\n const tracker = state.createTracker(info)\n tracker.move(bullet + ' '.repeat(size - bullet.length))\n tracker.shift(size)\n const exit = state.enter('listItem')\n const value = state.indentLines(\n state.containerFlow(node, tracker.current()),\n map\n )\n exit()\n\n return value\n\n /** @type {Map} */\n function map(line, index, blank) {\n if (index) {\n return (blank ? '' : ' '.repeat(size)) + line\n }\n\n return (blank ? bullet : bullet + ' '.repeat(size - bullet.length)) + line\n }\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Paragraph, Parents} from 'mdast'\n */\n\n/**\n * @param {Paragraph} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function paragraph(node, _, state, info) {\n const exit = state.enter('paragraph')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, info)\n subexit()\n exit()\n return value\n}\n","/**\n * @typedef {import('mdast').Html} Html\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n */\n\nimport {convert} from 'unist-util-is'\n\n/**\n * Check if the given value is *phrasing content*.\n *\n * > 👉 **Note**: Excludes `html`, which can be both phrasing or flow.\n *\n * @param node\n * Thing to check, typically `Node`.\n * @returns\n * Whether `value` is phrasing content.\n */\n\nexport const phrasing =\n /** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */\n (\n convert([\n 'break',\n 'delete',\n 'emphasis',\n // To do: next major: removed since footnotes were added to GFM.\n 'footnote',\n 'footnoteReference',\n 'image',\n 'imageReference',\n 'inlineCode',\n // Enabled by `mdast-util-math`:\n 'inlineMath',\n 'link',\n 'linkReference',\n // Enabled by `mdast-util-mdx`:\n 'mdxJsxTextElement',\n // Enabled by `mdast-util-mdx`:\n 'mdxTextExpression',\n 'strong',\n 'text',\n // Enabled by `mdast-util-directive`:\n 'textDirective'\n ])\n )\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Parents, Root} from 'mdast'\n */\n\nimport {phrasing} from 'mdast-util-phrasing'\n\n/**\n * @param {Root} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function root(node, _, state, info) {\n // Note: `html` nodes are ambiguous.\n const hasPhrasing = node.children.some(function (d) {\n return phrasing(d)\n })\n\n const container = hasPhrasing ? state.containerPhrasing : state.containerFlow\n return container.call(state, node, info)\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['strong'], null | undefined>}\n */\nexport function checkStrong(state) {\n const marker = state.options.strong || '*'\n\n if (marker !== '*' && marker !== '_') {\n throw new Error(\n 'Cannot serialize strong with `' +\n marker +\n '` for `options.strong`, expected `*`, or `_`'\n )\n }\n\n return marker\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Parents, Strong} from 'mdast'\n */\n\nimport {checkStrong} from '../util/check-strong.js'\nimport {encodeCharacterReference} from '../util/encode-character-reference.js'\nimport {encodeInfo} from '../util/encode-info.js'\n\nstrong.peek = strongPeek\n\n/**\n * @param {Strong} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function strong(node, _, state, info) {\n const marker = checkStrong(state)\n const exit = state.enter('strong')\n const tracker = state.createTracker(info)\n const before = tracker.move(marker + marker)\n\n let between = tracker.move(\n state.containerPhrasing(node, {\n after: marker,\n before,\n ...tracker.current()\n })\n )\n const betweenHead = between.charCodeAt(0)\n const open = encodeInfo(\n info.before.charCodeAt(info.before.length - 1),\n betweenHead,\n marker\n )\n\n if (open.inside) {\n between = encodeCharacterReference(betweenHead) + between.slice(1)\n }\n\n const betweenTail = between.charCodeAt(between.length - 1)\n const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker)\n\n if (close.inside) {\n between = between.slice(0, -1) + encodeCharacterReference(betweenTail)\n }\n\n const after = tracker.move(marker + marker)\n\n exit()\n\n state.attentionEncodeSurroundingInfo = {\n after: close.outside,\n before: open.outside\n }\n return before + between + after\n}\n\n/**\n * @param {Strong} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @returns {string}\n */\nfunction strongPeek(_, _1, state) {\n return state.options.strong || '*'\n}\n","/**\n * @import {Info, State} from 'mdast-util-to-markdown'\n * @import {Parents, Text} from 'mdast'\n */\n\n/**\n * @param {Text} node\n * @param {Parents | undefined} _\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function text(node, _, state, info) {\n return state.safe(node.value, info)\n}\n","/**\n * @import {Options, State} from 'mdast-util-to-markdown'\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['ruleRepetition'], null | undefined>}\n */\nexport function checkRuleRepetition(state) {\n const repetition = state.options.ruleRepetition || 3\n\n if (repetition < 3) {\n throw new Error(\n 'Cannot serialize rules with repetition `' +\n repetition +\n '` for `options.ruleRepetition`, expected `3` or more'\n )\n }\n\n return repetition\n}\n","/**\n * @import {State} from 'mdast-util-to-markdown'\n * @import {Parents, ThematicBreak} from 'mdast'\n */\n\nimport {checkRuleRepetition} from '../util/check-rule-repetition.js'\nimport {checkRule} from '../util/check-rule.js'\n\n/**\n * @param {ThematicBreak} _\n * @param {Parents | undefined} _1\n * @param {State} state\n * @returns {string}\n */\nexport function thematicBreak(_, _1, state) {\n const value = (\n checkRule(state) + (state.options.ruleSpaces ? ' ' : '')\n ).repeat(checkRuleRepetition(state))\n\n return state.options.ruleSpaces ? value.slice(0, -1) : value\n}\n","import {blockquote} from './blockquote.js'\nimport {hardBreak} from './break.js'\nimport {code} from './code.js'\nimport {definition} from './definition.js'\nimport {emphasis} from './emphasis.js'\nimport {heading} from './heading.js'\nimport {html} from './html.js'\nimport {image} from './image.js'\nimport {imageReference} from './image-reference.js'\nimport {inlineCode} from './inline-code.js'\nimport {link} from './link.js'\nimport {linkReference} from './link-reference.js'\nimport {list} from './list.js'\nimport {listItem} from './list-item.js'\nimport {paragraph} from './paragraph.js'\nimport {root} from './root.js'\nimport {strong} from './strong.js'\nimport {text} from './text.js'\nimport {thematicBreak} from './thematic-break.js'\n\n/**\n * Default (CommonMark) handlers.\n */\nexport const handle = {\n blockquote,\n break: hardBreak,\n code,\n definition,\n emphasis,\n hardBreak,\n heading,\n html,\n image,\n imageReference,\n inlineCode,\n link,\n linkReference,\n list,\n listItem,\n paragraph,\n root,\n strong,\n text,\n thematicBreak\n}\n","/**\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Table} Table\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('mdast').TableRow} TableRow\n *\n * @typedef {import('markdown-table').Options} MarkdownTableOptions\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').State} State\n * @typedef {import('mdast-util-to-markdown').Info} Info\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [tableCellPadding=true]\n * Whether to add a space of padding between delimiters and cells (default:\n * `true`).\n * @property {boolean | null | undefined} [tablePipeAlign=true]\n * Whether to align the delimiters (default: `true`).\n * @property {MarkdownTableOptions['stringLength'] | null | undefined} [stringLength]\n * Function to detect the length of table cell content, used when aligning\n * the delimiters between cells (optional).\n */\n\nimport {ok as assert} from 'devlop'\nimport {markdownTable} from 'markdown-table'\nimport {defaultHandlers} from 'mdast-util-to-markdown'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM tables in\n * markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM tables.\n */\nexport function gfmTableFromMarkdown() {\n return {\n enter: {\n table: enterTable,\n tableData: enterCell,\n tableHeader: enterCell,\n tableRow: enterRow\n },\n exit: {\n codeText: exitCodeText,\n table: exitTable,\n tableData: exit,\n tableHeader: exit,\n tableRow: exit\n }\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterTable(token) {\n const align = token._align\n assert(align, 'expected `_align` on table')\n this.enter(\n {\n type: 'table',\n align: align.map(function (d) {\n return d === 'none' ? null : d\n }),\n children: []\n },\n token\n )\n this.data.inTable = true\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitTable(token) {\n this.exit(token)\n this.data.inTable = undefined\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterRow(token) {\n this.enter({type: 'tableRow', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exit(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterCell(token) {\n this.enter({type: 'tableCell', children: []}, token)\n}\n\n// Overwrite the default code text data handler to unescape escaped pipes when\n// they are in tables.\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCodeText(token) {\n let value = this.resume()\n\n if (this.data.inTable) {\n value = value.replace(/\\\\([\\\\|])/g, replace)\n }\n\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'inlineCode')\n node.value = value\n this.exit(token)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @returns {string}\n */\nfunction replace($0, $1) {\n // Pipes work, backslashes don’t (but can’t escape pipes).\n return $1 === '|' ? $1 : $0\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM tables in\n * markdown.\n *\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM tables.\n */\nexport function gfmTableToMarkdown(options) {\n const settings = options || {}\n const padding = settings.tableCellPadding\n const alignDelimiters = settings.tablePipeAlign\n const stringLength = settings.stringLength\n const around = padding ? ' ' : '|'\n\n return {\n unsafe: [\n {character: '\\r', inConstruct: 'tableCell'},\n {character: '\\n', inConstruct: 'tableCell'},\n // A pipe, when followed by a tab or space (padding), or a dash or colon\n // (unpadded delimiter row), could result in a table.\n {atBreak: true, character: '|', after: '[\\t :-]'},\n // A pipe in a cell must be encoded.\n {character: '|', inConstruct: 'tableCell'},\n // A colon must be followed by a dash, in which case it could start a\n // delimiter row.\n {atBreak: true, character: ':', after: '-'},\n // A delimiter row can also start with a dash, when followed by more\n // dashes, a colon, or a pipe.\n // This is a stricter version than the built in check for lists, thematic\n // breaks, and setex heading underlines though:\n // <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>\n {atBreak: true, character: '-', after: '[:|-]'}\n ],\n handlers: {\n inlineCode: inlineCodeWithTable,\n table: handleTable,\n tableCell: handleTableCell,\n tableRow: handleTableRow\n }\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {Table} node\n */\n function handleTable(node, _, state, info) {\n return serializeData(handleTableAsData(node, state, info), node.align)\n }\n\n /**\n * This function isn’t really used normally, because we handle rows at the\n * table level.\n * But, if someone passes in a table row, this ensures we make somewhat sense.\n *\n * @type {ToMarkdownHandle}\n * @param {TableRow} node\n */\n function handleTableRow(node, _, state, info) {\n const row = handleTableRowAsData(node, state, info)\n const value = serializeData([row])\n // `markdown-table` will always add an align row\n return value.slice(0, value.indexOf('\\n'))\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {TableCell} node\n */\n function handleTableCell(node, _, state, info) {\n const exit = state.enter('tableCell')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, {\n ...info,\n before: around,\n after: around\n })\n subexit()\n exit()\n return value\n }\n\n /**\n * @param {Array<Array<string>>} matrix\n * @param {Array<string | null | undefined> | null | undefined} [align]\n */\n function serializeData(matrix, align) {\n return markdownTable(matrix, {\n align,\n // @ts-expect-error: `markdown-table` types should support `null`.\n alignDelimiters,\n // @ts-expect-error: `markdown-table` types should support `null`.\n padding,\n // @ts-expect-error: `markdown-table` types should support `null`.\n stringLength\n })\n }\n\n /**\n * @param {Table} node\n * @param {State} state\n * @param {Info} info\n */\n function handleTableAsData(node, state, info) {\n const children = node.children\n let index = -1\n /** @type {Array<Array<string>>} */\n const result = []\n const subexit = state.enter('table')\n\n while (++index < children.length) {\n result[index] = handleTableRowAsData(children[index], state, info)\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @param {TableRow} node\n * @param {State} state\n * @param {Info} info\n */\n function handleTableRowAsData(node, state, info) {\n const children = node.children\n let index = -1\n /** @type {Array<string>} */\n const result = []\n const subexit = state.enter('tableRow')\n\n while (++index < children.length) {\n // Note: the positional info as used here is incorrect.\n // Making it correct would be impossible due to aligning cells?\n // And it would need copy/pasting `markdown-table` into this project.\n result[index] = handleTableCell(children[index], node, state, info)\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {InlineCode} node\n */\n function inlineCodeWithTable(node, parent, state) {\n let value = defaultHandlers.inlineCode(node, parent, state)\n\n if (state.stack.includes('tableCell')) {\n value = value.replace(/\\|/g, '\\\\$&')\n }\n\n return value\n }\n}\n","/**\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n */\n\nimport {ok as assert} from 'devlop'\nimport {defaultHandlers} from 'mdast-util-to-markdown'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM task\n * list items in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM task list items.\n */\nexport function gfmTaskListItemFromMarkdown() {\n return {\n exit: {\n taskListCheckValueChecked: exitCheck,\n taskListCheckValueUnchecked: exitCheck,\n paragraph: exitParagraphWithTaskListItem\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM task list\n * items in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM task list items.\n */\nexport function gfmTaskListItemToMarkdown() {\n return {\n unsafe: [{atBreak: true, character: '-', after: '[:|-]'}],\n handlers: {listItem: listItemWithTaskListItem}\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCheck(token) {\n // We’re always in a paragraph, in a list item.\n const node = this.stack[this.stack.length - 2]\n assert(node.type === 'listItem')\n node.checked = token.type === 'taskListCheckValueChecked'\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitParagraphWithTaskListItem(token) {\n const parent = this.stack[this.stack.length - 2]\n\n if (\n parent &&\n parent.type === 'listItem' &&\n typeof parent.checked === 'boolean'\n ) {\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'paragraph')\n const head = node.children[0]\n\n if (head && head.type === 'text') {\n const siblings = parent.children\n let index = -1\n /** @type {Paragraph | undefined} */\n let firstParaghraph\n\n while (++index < siblings.length) {\n const sibling = siblings[index]\n if (sibling.type === 'paragraph') {\n firstParaghraph = sibling\n break\n }\n }\n\n if (firstParaghraph === node) {\n // Must start with a space or a tab.\n head.value = head.value.slice(1)\n\n if (head.value.length === 0) {\n node.children.shift()\n } else if (\n node.position &&\n head.position &&\n typeof head.position.start.offset === 'number'\n ) {\n head.position.start.column++\n head.position.start.offset++\n node.position.start = Object.assign({}, head.position.start)\n }\n }\n }\n }\n\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {ListItem} node\n */\nfunction listItemWithTaskListItem(node, parent, state, info) {\n const head = node.children[0]\n const checkable =\n typeof node.checked === 'boolean' && head && head.type === 'paragraph'\n const checkbox = '[' + (node.checked ? 'x' : ' ') + '] '\n const tracker = state.createTracker(info)\n\n if (checkable) {\n tracker.move(checkbox)\n }\n\n let value = defaultHandlers.listItem(node, parent, state, {\n ...info,\n ...tracker.current()\n })\n\n if (checkable) {\n value = value.replace(/^(?:[*+-]|\\d+\\.)([\\r\\n]| {1,3})/, check)\n }\n\n return value\n\n /**\n * @param {string} $0\n * @returns {string}\n */\n function check($0) {\n return $0 + checkbox\n }\n}\n","/**\n * @import {Extension as FromMarkdownExtension} from 'mdast-util-from-markdown'\n * @import {Options} from 'mdast-util-gfm'\n * @import {Options as ToMarkdownExtension} from 'mdast-util-to-markdown'\n */\n\nimport {\n gfmAutolinkLiteralFromMarkdown,\n gfmAutolinkLiteralToMarkdown\n} from 'mdast-util-gfm-autolink-literal'\nimport {\n gfmFootnoteFromMarkdown,\n gfmFootnoteToMarkdown\n} from 'mdast-util-gfm-footnote'\nimport {\n gfmStrikethroughFromMarkdown,\n gfmStrikethroughToMarkdown\n} from 'mdast-util-gfm-strikethrough'\nimport {gfmTableFromMarkdown, gfmTableToMarkdown} from 'mdast-util-gfm-table'\nimport {\n gfmTaskListItemFromMarkdown,\n gfmTaskListItemToMarkdown\n} from 'mdast-util-gfm-task-list-item'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM (autolink\n * literals, footnotes, strikethrough, tables, tasklists).\n *\n * @returns {Array<FromMarkdownExtension>}\n * Extension for `mdast-util-from-markdown` to enable GFM (autolink literals,\n * footnotes, strikethrough, tables, tasklists).\n */\nexport function gfmFromMarkdown() {\n return [\n gfmAutolinkLiteralFromMarkdown(),\n gfmFootnoteFromMarkdown(),\n gfmStrikethroughFromMarkdown(),\n gfmTableFromMarkdown(),\n gfmTaskListItemFromMarkdown()\n ]\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM (autolink\n * literals, footnotes, strikethrough, tables, tasklists).\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM (autolink literals,\n * footnotes, strikethrough, tables, tasklists).\n */\nexport function gfmToMarkdown(options) {\n return {\n extensions: [\n gfmAutolinkLiteralToMarkdown(),\n gfmFootnoteToMarkdown(options),\n gfmStrikethroughToMarkdown(),\n gfmTableToMarkdown(options),\n gfmTaskListItemToMarkdown()\n ]\n }\n}\n","/**\n * @import {Code, ConstructRecord, Event, Extension, Previous, State, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\nimport { asciiAlpha, asciiAlphanumeric, asciiControl, markdownLineEndingOrSpace, unicodePunctuation, unicodeWhitespace } from 'micromark-util-character';\nconst wwwPrefix = {\n tokenize: tokenizeWwwPrefix,\n partial: true\n};\nconst domain = {\n tokenize: tokenizeDomain,\n partial: true\n};\nconst path = {\n tokenize: tokenizePath,\n partial: true\n};\nconst trail = {\n tokenize: tokenizeTrail,\n partial: true\n};\nconst emailDomainDotTrail = {\n tokenize: tokenizeEmailDomainDotTrail,\n partial: true\n};\nconst wwwAutolink = {\n name: 'wwwAutolink',\n tokenize: tokenizeWwwAutolink,\n previous: previousWww\n};\nconst protocolAutolink = {\n name: 'protocolAutolink',\n tokenize: tokenizeProtocolAutolink,\n previous: previousProtocol\n};\nconst emailAutolink = {\n name: 'emailAutolink',\n tokenize: tokenizeEmailAutolink,\n previous: previousEmail\n};\n\n/** @type {ConstructRecord} */\nconst text = {};\n\n/**\n * Create an extension for `micromark` to support GitHub autolink literal\n * syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * autolink literal syntax.\n */\nexport function gfmAutolinkLiteral() {\n return {\n text\n };\n}\n\n/** @type {Code} */\nlet code = 48;\n\n// Add alphanumerics.\nwhile (code < 123) {\n text[code] = emailAutolink;\n code++;\n if (code === 58) code = 65;else if (code === 91) code = 97;\n}\ntext[43] = emailAutolink;\ntext[45] = emailAutolink;\ntext[46] = emailAutolink;\ntext[95] = emailAutolink;\ntext[72] = [emailAutolink, protocolAutolink];\ntext[104] = [emailAutolink, protocolAutolink];\ntext[87] = [emailAutolink, wwwAutolink];\ntext[119] = [emailAutolink, wwwAutolink];\n\n// To do: perform email autolink literals on events, afterwards.\n// That’s where `markdown-rs` and `cmark-gfm` perform it.\n// It should look for `@`, then for atext backwards, and then for a label\n// forwards.\n// To do: `mailto:`, `xmpp:` protocol as prefix.\n\n/**\n * Email autolink literal.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^^^^^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeEmailAutolink(effects, ok, nok) {\n const self = this;\n /** @type {boolean | undefined} */\n let dot;\n /** @type {boolean} */\n let data;\n return start;\n\n /**\n * Start of email autolink literal.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (!gfmAtext(code) || !previousEmail.call(self, self.previous) || previousUnbalanced(self.events)) {\n return nok(code);\n }\n effects.enter('literalAutolink');\n effects.enter('literalAutolinkEmail');\n return atext(code);\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function atext(code) {\n if (gfmAtext(code)) {\n effects.consume(code);\n return atext;\n }\n if (code === 64) {\n effects.consume(code);\n return emailDomain;\n }\n return nok(code);\n }\n\n /**\n * In email domain.\n *\n * The reference code is a bit overly complex as it handles the `@`, of which\n * there may be just one.\n * Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L318>\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomain(code) {\n // Dot followed by alphanumerical (not `-` or `_`).\n if (code === 46) {\n return effects.check(emailDomainDotTrail, emailDomainAfter, emailDomainDot)(code);\n }\n\n // Alphanumerical, `-`, and `_`.\n if (code === 45 || code === 95 || asciiAlphanumeric(code)) {\n data = true;\n effects.consume(code);\n return emailDomain;\n }\n\n // To do: `/` if xmpp.\n\n // Note: normally we’d truncate trailing punctuation from the link.\n // However, email autolink literals cannot contain any of those markers,\n // except for `.`, but that can only occur if it isn’t trailing.\n // So we can ignore truncating!\n return emailDomainAfter(code);\n }\n\n /**\n * In email domain, on dot that is not a trail.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomainDot(code) {\n effects.consume(code);\n dot = true;\n return emailDomain;\n }\n\n /**\n * After email domain.\n *\n * ```markdown\n * > | a contact@example.org b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailDomainAfter(code) {\n // Domain must not be empty, must include a dot, and must end in alphabetical.\n // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L332>.\n if (data && dot && asciiAlpha(self.previous)) {\n effects.exit('literalAutolinkEmail');\n effects.exit('literalAutolink');\n return ok(code);\n }\n return nok(code);\n }\n}\n\n/**\n * `www` autolink literal.\n *\n * ```markdown\n * > | a www.example.org b\n * ^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeWwwAutolink(effects, ok, nok) {\n const self = this;\n return wwwStart;\n\n /**\n * Start of www autolink literal.\n *\n * ```markdown\n * > | www.example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwStart(code) {\n if (code !== 87 && code !== 119 || !previousWww.call(self, self.previous) || previousUnbalanced(self.events)) {\n return nok(code);\n }\n effects.enter('literalAutolink');\n effects.enter('literalAutolinkWww');\n // Note: we *check*, so we can discard the `www.` we parsed.\n // If it worked, we consider it as a part of the domain.\n return effects.check(wwwPrefix, effects.attempt(domain, effects.attempt(path, wwwAfter), nok), nok)(code);\n }\n\n /**\n * After a www autolink literal.\n *\n * ```markdown\n * > | www.example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwAfter(code) {\n effects.exit('literalAutolinkWww');\n effects.exit('literalAutolink');\n return ok(code);\n }\n}\n\n/**\n * Protocol autolink literal.\n *\n * ```markdown\n * > | a https://example.org b\n * ^^^^^^^^^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeProtocolAutolink(effects, ok, nok) {\n const self = this;\n let buffer = '';\n let seen = false;\n return protocolStart;\n\n /**\n * Start of protocol autolink literal.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function protocolStart(code) {\n if ((code === 72 || code === 104) && previousProtocol.call(self, self.previous) && !previousUnbalanced(self.events)) {\n effects.enter('literalAutolink');\n effects.enter('literalAutolinkHttp');\n buffer += String.fromCodePoint(code);\n effects.consume(code);\n return protocolPrefixInside;\n }\n return nok(code);\n }\n\n /**\n * In protocol.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^^^^^\n * ```\n *\n * @type {State}\n */\n function protocolPrefixInside(code) {\n // `5` is size of `https`\n if (asciiAlpha(code) && buffer.length < 5) {\n // @ts-expect-error: definitely number.\n buffer += String.fromCodePoint(code);\n effects.consume(code);\n return protocolPrefixInside;\n }\n if (code === 58) {\n const protocol = buffer.toLowerCase();\n if (protocol === 'http' || protocol === 'https') {\n effects.consume(code);\n return protocolSlashesInside;\n }\n }\n return nok(code);\n }\n\n /**\n * In slashes.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^^\n * ```\n *\n * @type {State}\n */\n function protocolSlashesInside(code) {\n if (code === 47) {\n effects.consume(code);\n if (seen) {\n return afterProtocol;\n }\n seen = true;\n return protocolSlashesInside;\n }\n return nok(code);\n }\n\n /**\n * After protocol, before domain.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function afterProtocol(code) {\n // To do: this is different from `markdown-rs`:\n // https://github.com/wooorm/markdown-rs/blob/b3a921c761309ae00a51fe348d8a43adbc54b518/src/construct/gfm_autolink_literal.rs#L172-L182\n return code === null || asciiControl(code) || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || unicodePunctuation(code) ? nok(code) : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code);\n }\n\n /**\n * After a protocol autolink literal.\n *\n * ```markdown\n * > | https://example.com/a?b#c\n * ^\n * ```\n *\n * @type {State}\n */\n function protocolAfter(code) {\n effects.exit('literalAutolinkHttp');\n effects.exit('literalAutolink');\n return ok(code);\n }\n}\n\n/**\n * `www` prefix.\n *\n * ```markdown\n * > | a www.example.org b\n * ^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeWwwPrefix(effects, ok, nok) {\n let size = 0;\n return wwwPrefixInside;\n\n /**\n * In www prefix.\n *\n * ```markdown\n * > | www.example.com\n * ^^^^\n * ```\n *\n * @type {State}\n */\n function wwwPrefixInside(code) {\n if ((code === 87 || code === 119) && size < 3) {\n size++;\n effects.consume(code);\n return wwwPrefixInside;\n }\n if (code === 46 && size === 3) {\n effects.consume(code);\n return wwwPrefixAfter;\n }\n return nok(code);\n }\n\n /**\n * After www prefix.\n *\n * ```markdown\n * > | www.example.com\n * ^\n * ```\n *\n * @type {State}\n */\n function wwwPrefixAfter(code) {\n // If there is *anything*, we can link.\n return code === null ? nok(code) : ok(code);\n }\n}\n\n/**\n * Domain.\n *\n * ```markdown\n * > | a https://example.org b\n * ^^^^^^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDomain(effects, ok, nok) {\n /** @type {boolean | undefined} */\n let underscoreInLastSegment;\n /** @type {boolean | undefined} */\n let underscoreInLastLastSegment;\n /** @type {boolean | undefined} */\n let seen;\n return domainInside;\n\n /**\n * In domain.\n *\n * ```markdown\n * > | https://example.com/a\n * ^^^^^^^^^^^\n * ```\n *\n * @type {State}\n */\n function domainInside(code) {\n // Check whether this marker, which is a trailing punctuation\n // marker, optionally followed by more trailing markers, and then\n // followed by an end.\n if (code === 46 || code === 95) {\n return effects.check(trail, domainAfter, domainAtPunctuation)(code);\n }\n\n // GH documents that only alphanumerics (other than `-`, `.`, and `_`) can\n // occur, which sounds like ASCII only, but they also support `www.點看.com`,\n // so that’s Unicode.\n // Instead of some new production for Unicode alphanumerics, markdown\n // already has that for Unicode punctuation and whitespace, so use those.\n // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L12>.\n if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code) || code !== 45 && unicodePunctuation(code)) {\n return domainAfter(code);\n }\n seen = true;\n effects.consume(code);\n return domainInside;\n }\n\n /**\n * In domain, at potential trailing punctuation, that was not trailing.\n *\n * ```markdown\n * > | https://example.com\n * ^\n * ```\n *\n * @type {State}\n */\n function domainAtPunctuation(code) {\n // There is an underscore in the last segment of the domain\n if (code === 95) {\n underscoreInLastSegment = true;\n }\n // Otherwise, it’s a `.`: save the last segment underscore in the\n // penultimate segment slot.\n else {\n underscoreInLastLastSegment = underscoreInLastSegment;\n underscoreInLastSegment = undefined;\n }\n effects.consume(code);\n return domainInside;\n }\n\n /**\n * After domain.\n *\n * ```markdown\n * > | https://example.com/a\n * ^\n * ```\n *\n * @type {State} */\n function domainAfter(code) {\n // Note: that’s GH says a dot is needed, but it’s not true:\n // <https://github.com/github/cmark-gfm/issues/279>\n if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) {\n return nok(code);\n }\n return ok(code);\n }\n}\n\n/**\n * Path.\n *\n * ```markdown\n * > | a https://example.org/stuff b\n * ^^^^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizePath(effects, ok) {\n let sizeOpen = 0;\n let sizeClose = 0;\n return pathInside;\n\n /**\n * In path.\n *\n * ```markdown\n * > | https://example.com/a\n * ^^\n * ```\n *\n * @type {State}\n */\n function pathInside(code) {\n if (code === 40) {\n sizeOpen++;\n effects.consume(code);\n return pathInside;\n }\n\n // To do: `markdown-rs` also needs this.\n // If this is a paren, and there are less closings than openings,\n // we don’t check for a trail.\n if (code === 41 && sizeClose < sizeOpen) {\n return pathAtPunctuation(code);\n }\n\n // Check whether this trailing punctuation marker is optionally\n // followed by more trailing markers, and then followed\n // by an end.\n if (code === 33 || code === 34 || code === 38 || code === 39 || code === 41 || code === 42 || code === 44 || code === 46 || code === 58 || code === 59 || code === 60 || code === 63 || code === 93 || code === 95 || code === 126) {\n return effects.check(trail, ok, pathAtPunctuation)(code);\n }\n if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return ok(code);\n }\n effects.consume(code);\n return pathInside;\n }\n\n /**\n * In path, at potential trailing punctuation, that was not trailing.\n *\n * ```markdown\n * > | https://example.com/a\"b\n * ^\n * ```\n *\n * @type {State}\n */\n function pathAtPunctuation(code) {\n // Count closing parens.\n if (code === 41) {\n sizeClose++;\n }\n effects.consume(code);\n return pathInside;\n }\n}\n\n/**\n * Trail.\n *\n * This calls `ok` if this *is* the trail, followed by an end, which means\n * the entire trail is not part of the link.\n * It calls `nok` if this *is* part of the link.\n *\n * ```markdown\n * > | https://example.com\").\n * ^^^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTrail(effects, ok, nok) {\n return trail;\n\n /**\n * In trail of domain or path.\n *\n * ```markdown\n * > | https://example.com\").\n * ^\n * ```\n *\n * @type {State}\n */\n function trail(code) {\n // Regular trailing punctuation.\n if (code === 33 || code === 34 || code === 39 || code === 41 || code === 42 || code === 44 || code === 46 || code === 58 || code === 59 || code === 63 || code === 95 || code === 126) {\n effects.consume(code);\n return trail;\n }\n\n // `&` followed by one or more alphabeticals and then a `;`, is\n // as a whole considered as trailing punctuation.\n // In all other cases, it is considered as continuation of the URL.\n if (code === 38) {\n effects.consume(code);\n return trailCharacterReferenceStart;\n }\n\n // Needed because we allow literals after `[`, as we fix:\n // <https://github.com/github/cmark-gfm/issues/278>.\n // Check that it is not followed by `(` or `[`.\n if (code === 93) {\n effects.consume(code);\n return trailBracketAfter;\n }\n if (\n // `<` is an end.\n code === 60 ||\n // So is whitespace.\n code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return ok(code);\n }\n return nok(code);\n }\n\n /**\n * In trail, after `]`.\n *\n * > 👉 **Note**: this deviates from `cmark-gfm` to fix a bug.\n * > See end of <https://github.com/github/cmark-gfm/issues/278> for more.\n *\n * ```markdown\n * > | https://example.com](\n * ^\n * ```\n *\n * @type {State}\n */\n function trailBracketAfter(code) {\n // Whitespace or something that could start a resource or reference is the end.\n // Switch back to trail otherwise.\n if (code === null || code === 40 || code === 91 || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {\n return ok(code);\n }\n return trail(code);\n }\n\n /**\n * In character-reference like trail, after `&`.\n *\n * ```markdown\n * > | https://example.com&).\n * ^\n * ```\n *\n * @type {State}\n */\n function trailCharacterReferenceStart(code) {\n // When non-alpha, it’s not a trail.\n return asciiAlpha(code) ? trailCharacterReferenceInside(code) : nok(code);\n }\n\n /**\n * In character-reference like trail.\n *\n * ```markdown\n * > | https://example.com&).\n * ^\n * ```\n *\n * @type {State}\n */\n function trailCharacterReferenceInside(code) {\n // Switch back to trail if this is well-formed.\n if (code === 59) {\n effects.consume(code);\n return trail;\n }\n if (asciiAlpha(code)) {\n effects.consume(code);\n return trailCharacterReferenceInside;\n }\n\n // It’s not a trail.\n return nok(code);\n }\n}\n\n/**\n * Dot in email domain trail.\n *\n * This calls `ok` if this *is* the trail, followed by an end, which means\n * the trail is not part of the link.\n * It calls `nok` if this *is* part of the link.\n *\n * ```markdown\n * > | contact@example.org.\n * ^\n * ```\n *\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeEmailDomainDotTrail(effects, ok, nok) {\n return start;\n\n /**\n * Dot.\n *\n * ```markdown\n * > | contact@example.org.\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Must be dot.\n effects.consume(code);\n return after;\n }\n\n /**\n * After dot.\n *\n * ```markdown\n * > | contact@example.org.\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // Not a trail if alphanumeric.\n return asciiAlphanumeric(code) ? nok(code) : ok(code);\n }\n}\n\n/**\n * See:\n * <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L156>.\n *\n * @type {Previous}\n */\nfunction previousWww(code) {\n return code === null || code === 40 || code === 42 || code === 95 || code === 91 || code === 93 || code === 126 || markdownLineEndingOrSpace(code);\n}\n\n/**\n * See:\n * <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L214>.\n *\n * @type {Previous}\n */\nfunction previousProtocol(code) {\n return !asciiAlpha(code);\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Previous}\n */\nfunction previousEmail(code) {\n // Do not allow a slash “inside” atext.\n // The reference code is a bit weird, but that’s what it results in.\n // Source: <https://github.com/github/cmark-gfm/blob/ef1cfcb/extensions/autolink.c#L307>.\n // Other than slash, every preceding character is allowed.\n return !(code === 47 || gfmAtext(code));\n}\n\n/**\n * @param {Code} code\n * @returns {boolean}\n */\nfunction gfmAtext(code) {\n return code === 43 || code === 45 || code === 46 || code === 95 || asciiAlphanumeric(code);\n}\n\n/**\n * @param {Array<Event>} events\n * @returns {boolean}\n */\nfunction previousUnbalanced(events) {\n let index = events.length;\n let result = false;\n while (index--) {\n const token = events[index][1];\n if ((token.type === 'labelLink' || token.type === 'labelImage') && !token._balanced) {\n result = true;\n break;\n }\n\n // If we’ve seen this token, and it was marked as not having any unbalanced\n // bracket before it, we can exit.\n if (token._gfmAutolinkLiteralWalkedInto) {\n result = false;\n break;\n }\n }\n if (events.length > 0 && !result) {\n // Mark the last token as “walked into” w/o finding\n // anything.\n events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true;\n }\n return result;\n}","/**\n * @import {Event, Exiter, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\nimport { blankLine } from 'micromark-core-commonmark';\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEndingOrSpace } from 'micromark-util-character';\nimport { normalizeIdentifier } from 'micromark-util-normalize-identifier';\nconst indent = {\n tokenize: tokenizeIndent,\n partial: true\n};\n\n// To do: micromark should support a `_hiddenGfmFootnoteSupport`, which only\n// affects label start (image).\n// That will let us drop `tokenizePotentialGfmFootnote*`.\n// It currently has a `_hiddenFootnoteSupport`, which affects that and more.\n// That can be removed when `micromark-extension-footnote` is archived.\n\n/**\n * Create an extension for `micromark` to enable GFM footnote syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to\n * enable GFM footnote syntax.\n */\nexport function gfmFootnote() {\n /** @type {Extension} */\n return {\n document: {\n [91]: {\n name: 'gfmFootnoteDefinition',\n tokenize: tokenizeDefinitionStart,\n continuation: {\n tokenize: tokenizeDefinitionContinuation\n },\n exit: gfmFootnoteDefinitionEnd\n }\n },\n text: {\n [91]: {\n name: 'gfmFootnoteCall',\n tokenize: tokenizeGfmFootnoteCall\n },\n [93]: {\n name: 'gfmPotentialFootnoteCall',\n add: 'after',\n tokenize: tokenizePotentialGfmFootnoteCall,\n resolveTo: resolveToPotentialGfmFootnoteCall\n }\n }\n };\n}\n\n// To do: remove after micromark update.\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizePotentialGfmFootnoteCall(effects, ok, nok) {\n const self = this;\n let index = self.events.length;\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);\n /** @type {Token} */\n let labelStart;\n\n // Find an opening.\n while (index--) {\n const token = self.events[index][1];\n if (token.type === \"labelImage\") {\n labelStart = token;\n break;\n }\n\n // Exit if we’ve walked far enough.\n if (token.type === 'gfmFootnoteCall' || token.type === \"labelLink\" || token.type === \"label\" || token.type === \"image\" || token.type === \"link\") {\n break;\n }\n }\n return start;\n\n /**\n * @type {State}\n */\n function start(code) {\n if (!labelStart || !labelStart._balanced) {\n return nok(code);\n }\n const id = normalizeIdentifier(self.sliceSerialize({\n start: labelStart.end,\n end: self.now()\n }));\n if (id.codePointAt(0) !== 94 || !defined.includes(id.slice(1))) {\n return nok(code);\n }\n effects.enter('gfmFootnoteCallLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteCallLabelMarker');\n return ok(code);\n }\n}\n\n// To do: remove after micromark update.\n/** @type {Resolver} */\nfunction resolveToPotentialGfmFootnoteCall(events, context) {\n let index = events.length;\n /** @type {Token | undefined} */\n let labelStart;\n\n // Find an opening.\n while (index--) {\n if (events[index][1].type === \"labelImage\" && events[index][0] === 'enter') {\n labelStart = events[index][1];\n break;\n }\n }\n // Change the `labelImageMarker` to a `data`.\n events[index + 1][1].type = \"data\";\n events[index + 3][1].type = 'gfmFootnoteCallLabelMarker';\n\n // The whole (without `!`):\n /** @type {Token} */\n const call = {\n type: 'gfmFootnoteCall',\n start: Object.assign({}, events[index + 3][1].start),\n end: Object.assign({}, events[events.length - 1][1].end)\n };\n // The `^` marker\n /** @type {Token} */\n const marker = {\n type: 'gfmFootnoteCallMarker',\n start: Object.assign({}, events[index + 3][1].end),\n end: Object.assign({}, events[index + 3][1].end)\n };\n // Increment the end 1 character.\n marker.end.column++;\n marker.end.offset++;\n marker.end._bufferIndex++;\n /** @type {Token} */\n const string = {\n type: 'gfmFootnoteCallString',\n start: Object.assign({}, marker.end),\n end: Object.assign({}, events[events.length - 1][1].start)\n };\n /** @type {Token} */\n const chunk = {\n type: \"chunkString\",\n contentType: 'string',\n start: Object.assign({}, string.start),\n end: Object.assign({}, string.end)\n };\n\n /** @type {Array<Event>} */\n const replacement = [\n // Take the `labelImageMarker` (now `data`, the `!`)\n events[index + 1], events[index + 2], ['enter', call, context],\n // The `[`\n events[index + 3], events[index + 4],\n // The `^`.\n ['enter', marker, context], ['exit', marker, context],\n // Everything in between.\n ['enter', string, context], ['enter', chunk, context], ['exit', chunk, context], ['exit', string, context],\n // The ending (`]`, properly parsed and labelled).\n events[events.length - 2], events[events.length - 1], ['exit', call, context]];\n events.splice(index, events.length - index + 1, ...replacement);\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeGfmFootnoteCall(effects, ok, nok) {\n const self = this;\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);\n let size = 0;\n /** @type {boolean} */\n let data;\n\n // Note: the implementation of `markdown-rs` is different, because it houses\n // core *and* extensions in one project.\n // Therefore, it can include footnote logic inside `label-end`.\n // We can’t do that, but luckily, we can parse footnotes in a simpler way than\n // needed for labels.\n return start;\n\n /**\n * Start of footnote label.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('gfmFootnoteCall');\n effects.enter('gfmFootnoteCallLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteCallLabelMarker');\n return callStart;\n }\n\n /**\n * After `[`, at `^`.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function callStart(code) {\n if (code !== 94) return nok(code);\n effects.enter('gfmFootnoteCallMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteCallMarker');\n effects.enter('gfmFootnoteCallString');\n effects.enter('chunkString').contentType = 'string';\n return callData;\n }\n\n /**\n * In label.\n *\n * ```markdown\n * > | a [^b] c\n * ^\n * ```\n *\n * @type {State}\n */\n function callData(code) {\n if (\n // Too long.\n size > 999 ||\n // Closing brace with nothing.\n code === 93 && !data ||\n // Space or tab is not supported by GFM for some reason.\n // `\\n` and `[` not being supported makes sense.\n code === null || code === 91 || markdownLineEndingOrSpace(code)) {\n return nok(code);\n }\n if (code === 93) {\n effects.exit('chunkString');\n const token = effects.exit('gfmFootnoteCallString');\n if (!defined.includes(normalizeIdentifier(self.sliceSerialize(token)))) {\n return nok(code);\n }\n effects.enter('gfmFootnoteCallLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteCallLabelMarker');\n effects.exit('gfmFootnoteCall');\n return ok;\n }\n if (!markdownLineEndingOrSpace(code)) {\n data = true;\n }\n size++;\n effects.consume(code);\n return code === 92 ? callEscape : callData;\n }\n\n /**\n * On character after escape.\n *\n * ```markdown\n * > | a [^b\\c] d\n * ^\n * ```\n *\n * @type {State}\n */\n function callEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code);\n size++;\n return callData;\n }\n return callData(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDefinitionStart(effects, ok, nok) {\n const self = this;\n const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);\n /** @type {string} */\n let identifier;\n let size = 0;\n /** @type {boolean | undefined} */\n let data;\n return start;\n\n /**\n * Start of GFM footnote definition.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter('gfmFootnoteDefinition')._container = true;\n effects.enter('gfmFootnoteDefinitionLabel');\n effects.enter('gfmFootnoteDefinitionLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteDefinitionLabelMarker');\n return labelAtMarker;\n }\n\n /**\n * In label, at caret.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAtMarker(code) {\n if (code === 94) {\n effects.enter('gfmFootnoteDefinitionMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteDefinitionMarker');\n effects.enter('gfmFootnoteDefinitionLabelString');\n effects.enter('chunkString').contentType = 'string';\n return labelInside;\n }\n return nok(code);\n }\n\n /**\n * In label.\n *\n * > 👉 **Note**: `cmark-gfm` prevents whitespace from occurring in footnote\n * > definition labels.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelInside(code) {\n if (\n // Too long.\n size > 999 ||\n // Closing brace with nothing.\n code === 93 && !data ||\n // Space or tab is not supported by GFM for some reason.\n // `\\n` and `[` not being supported makes sense.\n code === null || code === 91 || markdownLineEndingOrSpace(code)) {\n return nok(code);\n }\n if (code === 93) {\n effects.exit('chunkString');\n const token = effects.exit('gfmFootnoteDefinitionLabelString');\n identifier = normalizeIdentifier(self.sliceSerialize(token));\n effects.enter('gfmFootnoteDefinitionLabelMarker');\n effects.consume(code);\n effects.exit('gfmFootnoteDefinitionLabelMarker');\n effects.exit('gfmFootnoteDefinitionLabel');\n return labelAfter;\n }\n if (!markdownLineEndingOrSpace(code)) {\n data = true;\n }\n size++;\n effects.consume(code);\n return code === 92 ? labelEscape : labelInside;\n }\n\n /**\n * After `\\`, at a special character.\n *\n * > 👉 **Note**: `cmark-gfm` currently does not support escaped brackets:\n * > <https://github.com/github/cmark-gfm/issues/240>\n *\n * ```markdown\n * > | [^a\\*b]: c\n * ^\n * ```\n *\n * @type {State}\n */\n function labelEscape(code) {\n if (code === 91 || code === 92 || code === 93) {\n effects.consume(code);\n size++;\n return labelInside;\n }\n return labelInside(code);\n }\n\n /**\n * After definition label.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function labelAfter(code) {\n if (code === 58) {\n effects.enter('definitionMarker');\n effects.consume(code);\n effects.exit('definitionMarker');\n if (!defined.includes(identifier)) {\n defined.push(identifier);\n }\n\n // Any whitespace after the marker is eaten, forming indented code\n // is not possible.\n // No space is also fine, just like a block quote marker.\n return factorySpace(effects, whitespaceAfter, 'gfmFootnoteDefinitionWhitespace');\n }\n return nok(code);\n }\n\n /**\n * After definition prefix.\n *\n * ```markdown\n * > | [^a]: b\n * ^\n * ```\n *\n * @type {State}\n */\n function whitespaceAfter(code) {\n // `markdown-rs` has a wrapping token for the prefix that is closed here.\n return ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeDefinitionContinuation(effects, ok, nok) {\n /// Start of footnote definition continuation.\n ///\n /// ```markdown\n /// | [^a]: b\n /// > | c\n /// ^\n /// ```\n //\n // Either a blank line, which is okay, or an indented thing.\n return effects.check(blankLine, ok, effects.attempt(indent, ok, nok));\n}\n\n/** @type {Exiter} */\nfunction gfmFootnoteDefinitionEnd(effects) {\n effects.exit('gfmFootnoteDefinition');\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeIndent(effects, ok, nok) {\n const self = this;\n return factorySpace(effects, afterPrefix, 'gfmFootnoteDefinitionIndent', 4 + 1);\n\n /**\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return tail && tail[1].type === 'gfmFootnoteDefinitionIndent' && tail[2].sliceSerialize(tail[1], true).length === 4 ? ok(code) : nok(code);\n }\n}","/**\n * @import {Options} from 'micromark-extension-gfm-strikethrough'\n * @import {Event, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\nimport { splice } from 'micromark-util-chunked';\nimport { classifyCharacter } from 'micromark-util-classify-character';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/**\n * Create an extension for `micromark` to enable GFM strikethrough syntax.\n *\n * @param {Options | null | undefined} [options={}]\n * Configuration.\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions`, to\n * enable GFM strikethrough syntax.\n */\nexport function gfmStrikethrough(options) {\n const options_ = options || {};\n let single = options_.singleTilde;\n const tokenizer = {\n name: 'strikethrough',\n tokenize: tokenizeStrikethrough,\n resolveAll: resolveAllStrikethrough\n };\n if (single === null || single === undefined) {\n single = true;\n }\n return {\n text: {\n [126]: tokenizer\n },\n insideSpan: {\n null: [tokenizer]\n },\n attentionMarkers: {\n null: [126]\n }\n };\n\n /**\n * Take events and resolve strikethrough.\n *\n * @type {Resolver}\n */\n function resolveAllStrikethrough(events, context) {\n let index = -1;\n\n // Walk through all events.\n while (++index < events.length) {\n // Find a token that can close.\n if (events[index][0] === 'enter' && events[index][1].type === 'strikethroughSequenceTemporary' && events[index][1]._close) {\n let open = index;\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (events[open][0] === 'exit' && events[open][1].type === 'strikethroughSequenceTemporary' && events[open][1]._open &&\n // If the sizes are the same:\n events[index][1].end.offset - events[index][1].start.offset === events[open][1].end.offset - events[open][1].start.offset) {\n events[index][1].type = 'strikethroughSequence';\n events[open][1].type = 'strikethroughSequence';\n\n /** @type {Token} */\n const strikethrough = {\n type: 'strikethrough',\n start: Object.assign({}, events[open][1].start),\n end: Object.assign({}, events[index][1].end)\n };\n\n /** @type {Token} */\n const text = {\n type: 'strikethroughText',\n start: Object.assign({}, events[open][1].end),\n end: Object.assign({}, events[index][1].start)\n };\n\n // Opening.\n /** @type {Array<Event>} */\n const nextEvents = [['enter', strikethrough, context], ['enter', events[open][1], context], ['exit', events[open][1], context], ['enter', text, context]];\n const insideSpan = context.parser.constructs.insideSpan.null;\n if (insideSpan) {\n // Between.\n splice(nextEvents, nextEvents.length, 0, resolveAll(insideSpan, events.slice(open + 1, index), context));\n }\n\n // Closing.\n splice(nextEvents, nextEvents.length, 0, [['exit', text, context], ['enter', events[index][1], context], ['exit', events[index][1], context], ['exit', strikethrough, context]]);\n splice(events, open - 1, index - open + 3, nextEvents);\n index = open + nextEvents.length - 2;\n break;\n }\n }\n }\n }\n index = -1;\n while (++index < events.length) {\n if (events[index][1].type === 'strikethroughSequenceTemporary') {\n events[index][1].type = \"data\";\n }\n }\n return events;\n }\n\n /**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\n function tokenizeStrikethrough(effects, ok, nok) {\n const previous = this.previous;\n const events = this.events;\n let size = 0;\n return start;\n\n /** @type {State} */\n function start(code) {\n if (previous === 126 && events[events.length - 1][1].type !== \"characterEscape\") {\n return nok(code);\n }\n effects.enter('strikethroughSequenceTemporary');\n return more(code);\n }\n\n /** @type {State} */\n function more(code) {\n const before = classifyCharacter(previous);\n if (code === 126) {\n // If this is the third marker, exit.\n if (size > 1) return nok(code);\n effects.consume(code);\n size++;\n return more;\n }\n if (size < 2 && !single) return nok(code);\n const token = effects.exit('strikethroughSequenceTemporary');\n const after = classifyCharacter(code);\n token._open = !after || after === 2 && Boolean(before);\n token._close = !before || before === 2 && Boolean(after);\n return ok(code);\n }\n }\n}","/**\n * @import {Event} from 'micromark-util-types'\n */\n\n// Port of `edit_map.rs` from `markdown-rs`.\n// This should move to `markdown-js` later.\n\n// Deal with several changes in events, batching them together.\n//\n// Preferably, changes should be kept to a minimum.\n// Sometimes, it’s needed to change the list of events, because parsing can be\n// messy, and it helps to expose a cleaner interface of events to the compiler\n// and other users.\n// It can also help to merge many adjacent similar events.\n// And, in other cases, it’s needed to parse subcontent: pass some events\n// through another tokenizer and inject the result.\n\n/**\n * @typedef {[number, number, Array<Event>]} Change\n * @typedef {[number, number, number]} Jump\n */\n\n/**\n * Tracks a bunch of edits.\n */\nexport class EditMap {\n /**\n * Create a new edit map.\n */\n constructor() {\n /**\n * Record of changes.\n *\n * @type {Array<Change>}\n */\n this.map = [];\n }\n\n /**\n * Create an edit: a remove and/or add at a certain place.\n *\n * @param {number} index\n * @param {number} remove\n * @param {Array<Event>} add\n * @returns {undefined}\n */\n add(index, remove, add) {\n addImplementation(this, index, remove, add);\n }\n\n // To do: add this when moving to `micromark`.\n // /**\n // * Create an edit: but insert `add` before existing additions.\n // *\n // * @param {number} index\n // * @param {number} remove\n // * @param {Array<Event>} add\n // * @returns {undefined}\n // */\n // addBefore(index, remove, add) {\n // addImplementation(this, index, remove, add, true)\n // }\n\n /**\n * Done, change the events.\n *\n * @param {Array<Event>} events\n * @returns {undefined}\n */\n consume(events) {\n this.map.sort(function (a, b) {\n return a[0] - b[0];\n });\n\n /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */\n if (this.map.length === 0) {\n return;\n }\n\n // To do: if links are added in events, like they are in `markdown-rs`,\n // this is needed.\n // // Calculate jumps: where items in the current list move to.\n // /** @type {Array<Jump>} */\n // const jumps = []\n // let index = 0\n // let addAcc = 0\n // let removeAcc = 0\n // while (index < this.map.length) {\n // const [at, remove, add] = this.map[index]\n // removeAcc += remove\n // addAcc += add.length\n // jumps.push([at, removeAcc, addAcc])\n // index += 1\n // }\n //\n // . shiftLinks(events, jumps)\n\n let index = this.map.length;\n /** @type {Array<Array<Event>>} */\n const vecs = [];\n while (index > 0) {\n index -= 1;\n vecs.push(events.slice(this.map[index][0] + this.map[index][1]), this.map[index][2]);\n\n // Truncate rest.\n events.length = this.map[index][0];\n }\n vecs.push(events.slice());\n events.length = 0;\n let slice = vecs.pop();\n while (slice) {\n for (const element of slice) {\n events.push(element);\n }\n slice = vecs.pop();\n }\n\n // Truncate everything.\n this.map.length = 0;\n }\n}\n\n/**\n * Create an edit.\n *\n * @param {EditMap} editMap\n * @param {number} at\n * @param {number} remove\n * @param {Array<Event>} add\n * @returns {undefined}\n */\nfunction addImplementation(editMap, at, remove, add) {\n let index = 0;\n\n /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */\n if (remove === 0 && add.length === 0) {\n return;\n }\n while (index < editMap.map.length) {\n if (editMap.map[index][0] === at) {\n editMap.map[index][1] += remove;\n\n // To do: before not used by tables, use when moving to micromark.\n // if (before) {\n // add.push(...editMap.map[index][2])\n // editMap.map[index][2] = add\n // } else {\n editMap.map[index][2].push(...add);\n // }\n\n return;\n }\n index += 1;\n }\n editMap.map.push([at, remove, add]);\n}\n\n// /**\n// * Shift `previous` and `next` links according to `jumps`.\n// *\n// * This fixes links in case there are events removed or added between them.\n// *\n// * @param {Array<Event>} events\n// * @param {Array<Jump>} jumps\n// */\n// function shiftLinks(events, jumps) {\n// let jumpIndex = 0\n// let index = 0\n// let add = 0\n// let rm = 0\n\n// while (index < events.length) {\n// const rmCurr = rm\n\n// while (jumpIndex < jumps.length && jumps[jumpIndex][0] <= index) {\n// add = jumps[jumpIndex][2]\n// rm = jumps[jumpIndex][1]\n// jumpIndex += 1\n// }\n\n// // Ignore items that will be removed.\n// if (rm > rmCurr) {\n// index += rm - rmCurr\n// } else {\n// // ?\n// // if let Some(link) = &events[index].link {\n// // if let Some(next) = link.next {\n// // events[next].link.as_mut().unwrap().previous = Some(index + add - rm);\n// // while jumpIndex < jumps.len() && jumps[jumpIndex].0 <= next {\n// // add = jumps[jumpIndex].2;\n// // rm = jumps[jumpIndex].1;\n// // jumpIndex += 1;\n// // }\n// // events[index].link.as_mut().unwrap().next = Some(next + add - rm);\n// // index = next;\n// // continue;\n// // }\n// // }\n// index += 1\n// }\n// }\n// }","/**\n * @import {Event} from 'micromark-util-types'\n */\n\n/**\n * @typedef {'center' | 'left' | 'none' | 'right'} Align\n */\n\n/**\n * Figure out the alignment of a GFM table.\n *\n * @param {Readonly<Array<Event>>} events\n * List of events.\n * @param {number} index\n * Table enter event.\n * @returns {Array<Align>}\n * List of aligns.\n */\nexport function gfmTableAlign(events, index) {\n let inDelimiterRow = false;\n /** @type {Array<Align>} */\n const align = [];\n while (index < events.length) {\n const event = events[index];\n if (inDelimiterRow) {\n if (event[0] === 'enter') {\n // Start of alignment value: set a new column.\n // To do: `markdown-rs` uses `tableDelimiterCellValue`.\n if (event[1].type === 'tableContent') {\n align.push(events[index + 1][1].type === 'tableDelimiterMarker' ? 'left' : 'none');\n }\n }\n // Exits:\n // End of alignment value: change the column.\n // To do: `markdown-rs` uses `tableDelimiterCellValue`.\n else if (event[1].type === 'tableContent') {\n if (events[index - 1][1].type === 'tableDelimiterMarker') {\n const alignIndex = align.length - 1;\n align[alignIndex] = align[alignIndex] === 'left' ? 'center' : 'right';\n }\n }\n // Done!\n else if (event[1].type === 'tableDelimiterRow') {\n break;\n }\n } else if (event[0] === 'enter' && event[1].type === 'tableDelimiterRow') {\n inDelimiterRow = true;\n }\n index += 1;\n }\n return align;\n}","/**\n * @import {Event, Extension, Point, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\n/**\n * @typedef {[number, number, number, number]} Range\n * Cell info.\n *\n * @typedef {0 | 1 | 2 | 3} RowKind\n * Where we are: `1` for head row, `2` for delimiter row, `3` for body row.\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownLineEndingOrSpace, markdownSpace } from 'micromark-util-character';\nimport { EditMap } from './edit-map.js';\nimport { gfmTableAlign } from './infer.js';\n\n/**\n * Create an HTML extension for `micromark` to support GitHub tables syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * table syntax.\n */\nexport function gfmTable() {\n return {\n flow: {\n null: {\n name: 'table',\n tokenize: tokenizeTable,\n resolveAll: resolveTable\n }\n }\n };\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTable(effects, ok, nok) {\n const self = this;\n let size = 0;\n let sizeB = 0;\n /** @type {boolean | undefined} */\n let seen;\n return start;\n\n /**\n * Start of a GFM table.\n *\n * If there is a valid table row or table head before, then we try to parse\n * another row.\n * Otherwise, we try to parse a head.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * > | | b |\n * ^\n * ```\n * @type {State}\n */\n function start(code) {\n let index = self.events.length - 1;\n while (index > -1) {\n const type = self.events[index][1].type;\n if (type === \"lineEnding\" ||\n // Note: markdown-rs uses `whitespace` instead of `linePrefix`\n type === \"linePrefix\") index--;else break;\n }\n const tail = index > -1 ? self.events[index][1].type : null;\n const next = tail === 'tableHead' || tail === 'tableRow' ? bodyRowStart : headRowBefore;\n\n // Don’t allow lazy body rows.\n if (next === bodyRowStart && self.parser.lazy[self.now().line]) {\n return nok(code);\n }\n return next(code);\n }\n\n /**\n * Before table head row.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowBefore(code) {\n effects.enter('tableHead');\n effects.enter('tableRow');\n return headRowStart(code);\n }\n\n /**\n * Before table head row, after whitespace.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowStart(code) {\n if (code === 124) {\n return headRowBreak(code);\n }\n\n // To do: micromark-js should let us parse our own whitespace in extensions,\n // like `markdown-rs`:\n //\n // ```js\n // // 4+ spaces.\n // if (markdownSpace(code)) {\n // return nok(code)\n // }\n // ```\n\n seen = true;\n // Count the first character, that isn’t a pipe, double.\n sizeB += 1;\n return headRowBreak(code);\n }\n\n /**\n * At break in table head row.\n *\n * ```markdown\n * > | | a |\n * ^\n * ^\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowBreak(code) {\n if (code === null) {\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code);\n }\n if (markdownLineEnding(code)) {\n // If anything other than one pipe (ignoring whitespace) was used, it’s fine.\n if (sizeB > 1) {\n sizeB = 0;\n // To do: check if this works.\n // Feel free to interrupt:\n self.interrupt = true;\n effects.exit('tableRow');\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return headDelimiterStart;\n }\n\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code);\n }\n if (markdownSpace(code)) {\n // To do: check if this is fine.\n // effects.attempt(State::Next(StateName::GfmTableHeadRowBreak), State::Nok)\n // State::Retry(space_or_tab(tokenizer))\n return factorySpace(effects, headRowBreak, \"whitespace\")(code);\n }\n sizeB += 1;\n if (seen) {\n seen = false;\n // Header cell count.\n size += 1;\n }\n if (code === 124) {\n effects.enter('tableCellDivider');\n effects.consume(code);\n effects.exit('tableCellDivider');\n // Whether a delimiter was seen.\n seen = true;\n return headRowBreak;\n }\n\n // Anything else is cell data.\n effects.enter(\"data\");\n return headRowData(code);\n }\n\n /**\n * In table head row data.\n *\n * ```markdown\n * > | | a |\n * ^\n * | | - |\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headRowData(code) {\n if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {\n effects.exit(\"data\");\n return headRowBreak(code);\n }\n effects.consume(code);\n return code === 92 ? headRowEscape : headRowData;\n }\n\n /**\n * In table head row escape.\n *\n * ```markdown\n * > | | a\\-b |\n * ^\n * | | ---- |\n * | | c |\n * ```\n *\n * @type {State}\n */\n function headRowEscape(code) {\n if (code === 92 || code === 124) {\n effects.consume(code);\n return headRowData;\n }\n return headRowData(code);\n }\n\n /**\n * Before delimiter row.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headDelimiterStart(code) {\n // Reset `interrupt`.\n self.interrupt = false;\n\n // Note: in `markdown-rs`, we need to handle piercing here too.\n if (self.parser.lazy[self.now().line]) {\n return nok(code);\n }\n effects.enter('tableDelimiterRow');\n // Track if we’ve seen a `:` or `|`.\n seen = false;\n if (markdownSpace(code)) {\n return factorySpace(effects, headDelimiterBefore, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code);\n }\n return headDelimiterBefore(code);\n }\n\n /**\n * Before delimiter row, after optional whitespace.\n *\n * Reused when a `|` is found later, to parse another cell.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * | | b |\n * ```\n *\n * @type {State}\n */\n function headDelimiterBefore(code) {\n if (code === 45 || code === 58) {\n return headDelimiterValueBefore(code);\n }\n if (code === 124) {\n seen = true;\n // If we start with a pipe, we open a cell marker.\n effects.enter('tableCellDivider');\n effects.consume(code);\n effects.exit('tableCellDivider');\n return headDelimiterCellBefore;\n }\n\n // More whitespace / empty row not allowed at start.\n return headDelimiterNok(code);\n }\n\n /**\n * After `|`, before delimiter cell.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterCellBefore(code) {\n if (markdownSpace(code)) {\n return factorySpace(effects, headDelimiterValueBefore, \"whitespace\")(code);\n }\n return headDelimiterValueBefore(code);\n }\n\n /**\n * Before delimiter cell value.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterValueBefore(code) {\n // Align: left.\n if (code === 58) {\n sizeB += 1;\n seen = true;\n effects.enter('tableDelimiterMarker');\n effects.consume(code);\n effects.exit('tableDelimiterMarker');\n return headDelimiterLeftAlignmentAfter;\n }\n\n // Align: none.\n if (code === 45) {\n sizeB += 1;\n // To do: seems weird that this *isn’t* left aligned, but that state is used?\n return headDelimiterLeftAlignmentAfter(code);\n }\n if (code === null || markdownLineEnding(code)) {\n return headDelimiterCellAfter(code);\n }\n return headDelimiterNok(code);\n }\n\n /**\n * After delimiter cell left alignment marker.\n *\n * ```markdown\n * | | a |\n * > | | :- |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterLeftAlignmentAfter(code) {\n if (code === 45) {\n effects.enter('tableDelimiterFiller');\n return headDelimiterFiller(code);\n }\n\n // Anything else is not ok after the left-align colon.\n return headDelimiterNok(code);\n }\n\n /**\n * In delimiter cell filler.\n *\n * ```markdown\n * | | a |\n * > | | - |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterFiller(code) {\n if (code === 45) {\n effects.consume(code);\n return headDelimiterFiller;\n }\n\n // Align is `center` if it was `left`, `right` otherwise.\n if (code === 58) {\n seen = true;\n effects.exit('tableDelimiterFiller');\n effects.enter('tableDelimiterMarker');\n effects.consume(code);\n effects.exit('tableDelimiterMarker');\n return headDelimiterRightAlignmentAfter;\n }\n effects.exit('tableDelimiterFiller');\n return headDelimiterRightAlignmentAfter(code);\n }\n\n /**\n * After delimiter cell right alignment marker.\n *\n * ```markdown\n * | | a |\n * > | | -: |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterRightAlignmentAfter(code) {\n if (markdownSpace(code)) {\n return factorySpace(effects, headDelimiterCellAfter, \"whitespace\")(code);\n }\n return headDelimiterCellAfter(code);\n }\n\n /**\n * After delimiter cell.\n *\n * ```markdown\n * | | a |\n * > | | -: |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterCellAfter(code) {\n if (code === 124) {\n return headDelimiterBefore(code);\n }\n if (code === null || markdownLineEnding(code)) {\n // Exit when:\n // * there was no `:` or `|` at all (it’s a thematic break or setext\n // underline instead)\n // * the header cell count is not the delimiter cell count\n if (!seen || size !== sizeB) {\n return headDelimiterNok(code);\n }\n\n // Note: in markdown-rs`, a reset is needed here.\n effects.exit('tableDelimiterRow');\n effects.exit('tableHead');\n // To do: in `markdown-rs`, resolvers need to be registered manually.\n // effects.register_resolver(ResolveName::GfmTable)\n return ok(code);\n }\n return headDelimiterNok(code);\n }\n\n /**\n * In delimiter row, at a disallowed byte.\n *\n * ```markdown\n * | | a |\n * > | | x |\n * ^\n * ```\n *\n * @type {State}\n */\n function headDelimiterNok(code) {\n // Note: in `markdown-rs`, we need to reset, in `micromark-js` we don‘t.\n return nok(code);\n }\n\n /**\n * Before table body row.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowStart(code) {\n // Note: in `markdown-rs` we need to manually take care of a prefix,\n // but in `micromark-js` that is done for us, so if we’re here, we’re\n // never at whitespace.\n effects.enter('tableRow');\n return bodyRowBreak(code);\n }\n\n /**\n * At break in table body row.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ^\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowBreak(code) {\n if (code === 124) {\n effects.enter('tableCellDivider');\n effects.consume(code);\n effects.exit('tableCellDivider');\n return bodyRowBreak;\n }\n if (code === null || markdownLineEnding(code)) {\n effects.exit('tableRow');\n return ok(code);\n }\n if (markdownSpace(code)) {\n return factorySpace(effects, bodyRowBreak, \"whitespace\")(code);\n }\n\n // Anything else is cell content.\n effects.enter(\"data\");\n return bodyRowData(code);\n }\n\n /**\n * In table body row data.\n *\n * ```markdown\n * | | a |\n * | | - |\n * > | | b |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowData(code) {\n if (code === null || code === 124 || markdownLineEndingOrSpace(code)) {\n effects.exit(\"data\");\n return bodyRowBreak(code);\n }\n effects.consume(code);\n return code === 92 ? bodyRowEscape : bodyRowData;\n }\n\n /**\n * In table body row escape.\n *\n * ```markdown\n * | | a |\n * | | ---- |\n * > | | b\\-c |\n * ^\n * ```\n *\n * @type {State}\n */\n function bodyRowEscape(code) {\n if (code === 92 || code === 124) {\n effects.consume(code);\n return bodyRowData;\n }\n return bodyRowData(code);\n }\n}\n\n/** @type {Resolver} */\n\nfunction resolveTable(events, context) {\n let index = -1;\n let inFirstCellAwaitingPipe = true;\n /** @type {RowKind} */\n let rowKind = 0;\n /** @type {Range} */\n let lastCell = [0, 0, 0, 0];\n /** @type {Range} */\n let cell = [0, 0, 0, 0];\n let afterHeadAwaitingFirstBodyRow = false;\n let lastTableEnd = 0;\n /** @type {Token | undefined} */\n let currentTable;\n /** @type {Token | undefined} */\n let currentBody;\n /** @type {Token | undefined} */\n let currentCell;\n const map = new EditMap();\n while (++index < events.length) {\n const event = events[index];\n const token = event[1];\n if (event[0] === 'enter') {\n // Start of head.\n if (token.type === 'tableHead') {\n afterHeadAwaitingFirstBodyRow = false;\n\n // Inject previous (body end and) table end.\n if (lastTableEnd !== 0) {\n flushTableEnd(map, context, lastTableEnd, currentTable, currentBody);\n currentBody = undefined;\n lastTableEnd = 0;\n }\n\n // Inject table start.\n currentTable = {\n type: 'table',\n start: Object.assign({}, token.start),\n // Note: correct end is set later.\n end: Object.assign({}, token.end)\n };\n map.add(index, 0, [['enter', currentTable, context]]);\n } else if (token.type === 'tableRow' || token.type === 'tableDelimiterRow') {\n inFirstCellAwaitingPipe = true;\n currentCell = undefined;\n lastCell = [0, 0, 0, 0];\n cell = [0, index + 1, 0, 0];\n\n // Inject table body start.\n if (afterHeadAwaitingFirstBodyRow) {\n afterHeadAwaitingFirstBodyRow = false;\n currentBody = {\n type: 'tableBody',\n start: Object.assign({}, token.start),\n // Note: correct end is set later.\n end: Object.assign({}, token.end)\n };\n map.add(index, 0, [['enter', currentBody, context]]);\n }\n rowKind = token.type === 'tableDelimiterRow' ? 2 : currentBody ? 3 : 1;\n }\n // Cell data.\n else if (rowKind && (token.type === \"data\" || token.type === 'tableDelimiterMarker' || token.type === 'tableDelimiterFiller')) {\n inFirstCellAwaitingPipe = false;\n\n // First value in cell.\n if (cell[2] === 0) {\n if (lastCell[1] !== 0) {\n cell[0] = cell[1];\n currentCell = flushCell(map, context, lastCell, rowKind, undefined, currentCell);\n lastCell = [0, 0, 0, 0];\n }\n cell[2] = index;\n }\n } else if (token.type === 'tableCellDivider') {\n if (inFirstCellAwaitingPipe) {\n inFirstCellAwaitingPipe = false;\n } else {\n if (lastCell[1] !== 0) {\n cell[0] = cell[1];\n currentCell = flushCell(map, context, lastCell, rowKind, undefined, currentCell);\n }\n lastCell = cell;\n cell = [lastCell[1], index, 0, 0];\n }\n }\n }\n // Exit events.\n else if (token.type === 'tableHead') {\n afterHeadAwaitingFirstBodyRow = true;\n lastTableEnd = index;\n } else if (token.type === 'tableRow' || token.type === 'tableDelimiterRow') {\n lastTableEnd = index;\n if (lastCell[1] !== 0) {\n cell[0] = cell[1];\n currentCell = flushCell(map, context, lastCell, rowKind, index, currentCell);\n } else if (cell[1] !== 0) {\n currentCell = flushCell(map, context, cell, rowKind, index, currentCell);\n }\n rowKind = 0;\n } else if (rowKind && (token.type === \"data\" || token.type === 'tableDelimiterMarker' || token.type === 'tableDelimiterFiller')) {\n cell[3] = index;\n }\n }\n if (lastTableEnd !== 0) {\n flushTableEnd(map, context, lastTableEnd, currentTable, currentBody);\n }\n map.consume(context.events);\n\n // To do: move this into `html`, when events are exposed there.\n // That’s what `markdown-rs` does.\n // That needs updates to `mdast-util-gfm-table`.\n index = -1;\n while (++index < context.events.length) {\n const event = context.events[index];\n if (event[0] === 'enter' && event[1].type === 'table') {\n event[1]._align = gfmTableAlign(context.events, index);\n }\n }\n return events;\n}\n\n/**\n * Generate a cell.\n *\n * @param {EditMap} map\n * @param {Readonly<TokenizeContext>} context\n * @param {Readonly<Range>} range\n * @param {RowKind} rowKind\n * @param {number | undefined} rowEnd\n * @param {Token | undefined} previousCell\n * @returns {Token | undefined}\n */\n// eslint-disable-next-line max-params\nfunction flushCell(map, context, range, rowKind, rowEnd, previousCell) {\n // `markdown-rs` uses:\n // rowKind === 2 ? 'tableDelimiterCell' : 'tableCell'\n const groupName = rowKind === 1 ? 'tableHeader' : rowKind === 2 ? 'tableDelimiter' : 'tableData';\n // `markdown-rs` uses:\n // rowKind === 2 ? 'tableDelimiterCellValue' : 'tableCellText'\n const valueName = 'tableContent';\n\n // Insert an exit for the previous cell, if there is one.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- exit\n // ^^^^-- this cell\n // ```\n if (range[0] !== 0) {\n previousCell.end = Object.assign({}, getPoint(context.events, range[0]));\n map.add(range[0], 0, [['exit', previousCell, context]]);\n }\n\n // Insert enter of this cell.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- enter\n // ^^^^-- this cell\n // ```\n const now = getPoint(context.events, range[1]);\n previousCell = {\n type: groupName,\n start: Object.assign({}, now),\n // Note: correct end is set later.\n end: Object.assign({}, now)\n };\n map.add(range[1], 0, [['enter', previousCell, context]]);\n\n // Insert text start at first data start and end at last data end, and\n // remove events between.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- enter\n // ^-- exit\n // ^^^^-- this cell\n // ```\n if (range[2] !== 0) {\n const relatedStart = getPoint(context.events, range[2]);\n const relatedEnd = getPoint(context.events, range[3]);\n /** @type {Token} */\n const valueToken = {\n type: valueName,\n start: Object.assign({}, relatedStart),\n end: Object.assign({}, relatedEnd)\n };\n map.add(range[2], 0, [['enter', valueToken, context]]);\n if (rowKind !== 2) {\n // Fix positional info on remaining events\n const start = context.events[range[2]];\n const end = context.events[range[3]];\n start[1].end = Object.assign({}, end[1].end);\n start[1].type = \"chunkText\";\n start[1].contentType = \"text\";\n\n // Remove if needed.\n if (range[3] > range[2] + 1) {\n const a = range[2] + 1;\n const b = range[3] - range[2] - 1;\n map.add(a, b, []);\n }\n }\n map.add(range[3] + 1, 0, [['exit', valueToken, context]]);\n }\n\n // Insert an exit for the last cell, if at the row end.\n //\n // ```markdown\n // > | | aa | bb | cc |\n // ^-- exit\n // ^^^^^^-- this cell (the last one contains two “between” parts)\n // ```\n if (rowEnd !== undefined) {\n previousCell.end = Object.assign({}, getPoint(context.events, rowEnd));\n map.add(rowEnd, 0, [['exit', previousCell, context]]);\n previousCell = undefined;\n }\n return previousCell;\n}\n\n/**\n * Generate table end (and table body end).\n *\n * @param {Readonly<EditMap>} map\n * @param {Readonly<TokenizeContext>} context\n * @param {number} index\n * @param {Token} table\n * @param {Token | undefined} tableBody\n */\n// eslint-disable-next-line max-params\nfunction flushTableEnd(map, context, index, table, tableBody) {\n /** @type {Array<Event>} */\n const exits = [];\n const related = getPoint(context.events, index);\n if (tableBody) {\n tableBody.end = Object.assign({}, related);\n exits.push(['exit', tableBody, context]);\n }\n table.end = Object.assign({}, related);\n exits.push(['exit', table, context]);\n map.add(index + 1, 0, exits);\n}\n\n/**\n * @param {Readonly<Array<Event>>} events\n * @param {number} index\n * @returns {Readonly<Point>}\n */\nfunction getPoint(events, index) {\n const event = events[index];\n const side = event[0] === 'enter' ? 'start' : 'end';\n return event[1][side];\n}","/**\n * @import {Extension, State, TokenizeContext, Tokenizer} from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownLineEndingOrSpace, markdownSpace } from 'micromark-util-character';\nconst tasklistCheck = {\n name: 'tasklistCheck',\n tokenize: tokenizeTasklistCheck\n};\n\n/**\n * Create an HTML extension for `micromark` to support GFM task list items\n * syntax.\n *\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to\n * support GFM task list items when serializing to HTML.\n */\nexport function gfmTaskListItem() {\n return {\n text: {\n [91]: tasklistCheck\n }\n };\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction tokenizeTasklistCheck(effects, ok, nok) {\n const self = this;\n return open;\n\n /**\n * At start of task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (\n // Exit if there’s stuff before.\n self.previous !== null ||\n // Exit if not in the first content that is the first child of a list\n // item.\n !self._gfmTasklistFirstContentOfListItem) {\n return nok(code);\n }\n effects.enter('taskListCheck');\n effects.enter('taskListCheckMarker');\n effects.consume(code);\n effects.exit('taskListCheckMarker');\n return inside;\n }\n\n /**\n * In task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // Currently we match how GH works in files.\n // To match how GH works in comments, use `markdownSpace` (`[\\t ]`) instead\n // of `markdownLineEndingOrSpace` (`[\\t\\n\\r ]`).\n if (markdownLineEndingOrSpace(code)) {\n effects.enter('taskListCheckValueUnchecked');\n effects.consume(code);\n effects.exit('taskListCheckValueUnchecked');\n return close;\n }\n if (code === 88 || code === 120) {\n effects.enter('taskListCheckValueChecked');\n effects.consume(code);\n effects.exit('taskListCheckValueChecked');\n return close;\n }\n return nok(code);\n }\n\n /**\n * At close of task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function close(code) {\n if (code === 93) {\n effects.enter('taskListCheckMarker');\n effects.consume(code);\n effects.exit('taskListCheckMarker');\n effects.exit('taskListCheck');\n return after;\n }\n return nok(code);\n }\n\n /**\n * @type {State}\n */\n function after(code) {\n // EOL in paragraph means there must be something else after it.\n if (markdownLineEnding(code)) {\n return ok(code);\n }\n\n // Space or tab?\n // Check what comes after.\n if (markdownSpace(code)) {\n return effects.check({\n tokenize: spaceThenNonSpace\n }, ok, nok)(code);\n }\n\n // EOF, or non-whitespace, both wrong.\n return nok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * @type {Tokenizer}\n */\nfunction spaceThenNonSpace(effects, ok, nok) {\n return factorySpace(effects, after, \"whitespace\");\n\n /**\n * After whitespace, after task list item check.\n *\n * ```markdown\n * > | * [x] y.\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n // EOF means there was nothing, so bad.\n // EOL means there’s content after it, so good.\n // Impossible to have more spaces.\n // Anything else is good.\n return code === null ? nok(code) : ok(code);\n }\n}","/**\n * @typedef {import('micromark-extension-gfm-footnote').HtmlOptions} HtmlOptions\n * @typedef {import('micromark-extension-gfm-strikethrough').Options} Options\n * @typedef {import('micromark-util-types').Extension} Extension\n * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension\n */\n\nimport {\n combineExtensions,\n combineHtmlExtensions\n} from 'micromark-util-combine-extensions'\nimport {\n gfmAutolinkLiteral,\n gfmAutolinkLiteralHtml\n} from 'micromark-extension-gfm-autolink-literal'\nimport {gfmFootnote, gfmFootnoteHtml} from 'micromark-extension-gfm-footnote'\nimport {\n gfmStrikethrough,\n gfmStrikethroughHtml\n} from 'micromark-extension-gfm-strikethrough'\nimport {gfmTable, gfmTableHtml} from 'micromark-extension-gfm-table'\nimport {gfmTagfilterHtml} from 'micromark-extension-gfm-tagfilter'\nimport {\n gfmTaskListItem,\n gfmTaskListItemHtml\n} from 'micromark-extension-gfm-task-list-item'\n\n/**\n * Create an extension for `micromark` to enable GFM syntax.\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n *\n * Passed to `micromark-extens-gfm-strikethrough`.\n * @returns {Extension}\n * Extension for `micromark` that can be passed in `extensions` to enable GFM\n * syntax.\n */\nexport function gfm(options) {\n return combineExtensions([\n gfmAutolinkLiteral(),\n gfmFootnote(),\n gfmStrikethrough(options),\n gfmTable(),\n gfmTaskListItem()\n ])\n}\n\n/**\n * Create an extension for `micromark` to support GFM when serializing to HTML.\n *\n * @param {HtmlOptions | null | undefined} [options]\n * Configuration (optional).\n *\n * Passed to `micromark-extens-gfm-footnote`.\n * @returns {HtmlExtension}\n * Extension for `micromark` that can be passed in `htmlExtensions` to\n * support GFM when serializing to HTML.\n */\nexport function gfmHtml(options) {\n return combineHtmlExtensions([\n gfmAutolinkLiteralHtml(),\n gfmFootnoteHtml(options),\n gfmStrikethroughHtml(),\n gfmTableHtml(),\n gfmTagfilterHtml(),\n gfmTaskListItemHtml()\n ])\n}\n","/**\n * @import {Root} from 'mdast'\n * @import {Options} from 'remark-gfm'\n * @import {} from 'remark-parse'\n * @import {} from 'remark-stringify'\n * @import {Processor} from 'unified'\n */\n\nimport {gfmFromMarkdown, gfmToMarkdown} from 'mdast-util-gfm'\nimport {gfm} from 'micromark-extension-gfm'\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Add support GFM (autolink literals, footnotes, strikethrough, tables,\n * tasklists).\n *\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {undefined}\n * Nothing.\n */\nexport default function remarkGfm(options) {\n // @ts-expect-error: TS is wrong about `this`.\n // eslint-disable-next-line unicorn/no-this-assignment\n const self = /** @type {Processor<Root>} */ (this)\n const settings = options || emptyOptions\n const data = self.data()\n\n const micromarkExtensions =\n data.micromarkExtensions || (data.micromarkExtensions = [])\n const fromMarkdownExtensions =\n data.fromMarkdownExtensions || (data.fromMarkdownExtensions = [])\n const toMarkdownExtensions =\n data.toMarkdownExtensions || (data.toMarkdownExtensions = [])\n\n micromarkExtensions.push(gfm(settings))\n fromMarkdownExtensions.push(gfmFromMarkdown())\n toMarkdownExtensions.push(gfmToMarkdown(settings))\n}\n","/**\n * Shared Tailwind class string for article-body prose rendering.\n *\n * Used by both the help-article view and the news-article view. The\n * widget renders operator-authored HTML (TipTap output) and RSS\n * `<content:encoded>` via `dangerouslySetInnerHTML`, so styling for\n * every element the editor can emit lives here as one place to keep\n * the two surfaces consistent.\n *\n * Design target: shadcn-style chrome — rounded surfaces, hairline\n * borders, restrained palette. The widget runs inside a 420 px iframe\n * panel by default, so spacing is tighter than a desktop article\n * page; rules favour `text-sm` cadence and `gap-2` ladders.\n *\n * Keep the rules in roughly source-order of the elements they target;\n * a top-down read makes \"did we cover X?\" easy to grep.\n */\nexport const ARTICLE_PROSE_CLASSES = [\n // ─── Container baseline ─────────────────────────────────────────\n \"prose max-w-none text-sm leading-relaxed text-wx-fg\",\n\n // ─── Inline + paragraph ─────────────────────────────────────────\n \"[&_p]:my-3 [&_strong]:font-semibold [&_em]:italic\",\n // Links — brand-coloured underline + hover fade.\n \"[&_a]:text-wx-primary [&_a]:underline [&_a]:underline-offset-2\",\n \"[&_a]:transition-opacity [&_a:hover]:opacity-70\",\n // Inline code — pill-shaped chip on the elevated surface.\n \"[&_code]:rounded-[6px] [&_code]:bg-wx-bg-elevated [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em]\",\n\n // ─── Code blocks ────────────────────────────────────────────────\n // Dark slab with hairline border + rounded edges. Inside the\n // bubble's `<code>` reset to plain text so the inline-code chip\n // rules don't double-apply.\n \"[&_pre]:my-4 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:border [&_pre]:border-wx-border\",\n \"[&_pre]:bg-[#0f1115] [&_pre]:text-zinc-100 [&_pre]:p-4 [&_pre]:text-[12.5px] [&_pre]:leading-relaxed\",\n \"[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:text-zinc-100\",\n // lowlight / highlight.js token colours — visible on the dark\n // slab. One-shot ramp that reads on light + dark widget themes.\n \"[&_.hljs-keyword]:text-violet-300 [&_.hljs-built_in]:text-violet-300 [&_.hljs-type]:text-violet-300\",\n \"[&_.hljs-string]:text-emerald-300\",\n \"[&_.hljs-number]:text-amber-300 [&_.hljs-literal]:text-amber-300\",\n \"[&_.hljs-comment]:text-zinc-500 [&_.hljs-comment]:italic\",\n \"[&_.hljs-attr]:text-sky-300 [&_.hljs-attribute]:text-sky-300\",\n \"[&_.hljs-title]:text-zinc-100 [&_.hljs-title]:font-medium\",\n \"[&_.hljs-tag]:text-rose-300 [&_.hljs-name]:text-rose-300\",\n\n // ─── Headings ───────────────────────────────────────────────────\n // Collapsed scale so long-form posts still feel right in the\n // 420 px panel. Tracking tightens with size — matches shadcn\n // typography defaults.\n \"[&_h1]:mt-6 [&_h1]:mb-3 [&_h1]:text-xl [&_h1]:font-semibold [&_h1]:tracking-tight\",\n \"[&_h2]:mt-5 [&_h2]:mb-2 [&_h2]:text-base [&_h2]:font-semibold [&_h2]:tracking-tight\",\n \"[&_h3]:mt-4 [&_h3]:mb-1.5 [&_h3]:text-sm [&_h3]:font-semibold\",\n // `scroll-margin-top` lifts the smooth-scroll target so TOC\n // clicks don't land the heading flush against the widget's\n // fixed top bar. 64 px clears the typical panel header height.\n \"[&_h1]:scroll-mt-16 [&_h2]:scroll-mt-16 [&_h3]:scroll-mt-16\",\n\n // ─── Lists ──────────────────────────────────────────────────────\n \"[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-5 [&_ul]:marker:text-wx-fg-subtle\",\n \"[&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:marker:text-wx-fg-subtle\",\n \"[&_li]:my-1\",\n\n // ─── Task lists (read-only on widget side) ──────────────────────\n // TipTap's TaskList renders `<ul data-type=\"taskList\">` with each\n // `<li data-type=\"taskItem\" data-checked=\"…\">` containing a\n // `<label><input type=\"checkbox\"></label><div><p>text</p></div>`.\n // Default list rules above would paint a bullet *and* a checkbox,\n // and the inner `<p>` would force the text onto a second line.\n // These rules collapse it into a single Notion-style row with a\n // brand-tinted checkbox sticking left and the prose flowing\n // alongside. `pointer-events-none` on the input neuters interaction —\n // the widget renders authored content; visitors shouldn't be able\n // to tick someone else's todo.\n \"[&_ul[data-type=taskList]]:list-none! [&_ul[data-type=taskList]]:pl-0!\",\n \"[&_ul[data-type=taskList]_li]:my-1.5 [&_ul[data-type=taskList]_li]:flex! [&_ul[data-type=taskList]_li]:items-start [&_ul[data-type=taskList]_li]:gap-2 [&_ul[data-type=taskList]_li]:pl-0\",\n \"[&_ul[data-type=taskList]_li]:marker:content-none\",\n // Make the label its own line-height-matched flex box, then\n // centre the input inside it. With `inline-flex + items-center`\n // and the same line-height as the first row of text, the\n // checkbox sits visually centred against that first line — no\n // brittle pixel margin-tops. `h-5 leading-snug` matches the\n // surrounding text's row metrics; `items-start` on the parent\n // `<li>` keeps multi-line items from floating the box to the\n // middle of the row.\n \"[&_ul[data-type=taskList]_li>label]:m-0 [&_ul[data-type=taskList]_li>label]:inline-flex [&_ul[data-type=taskList]_li>label]:h-5 [&_ul[data-type=taskList]_li>label]:items-center [&_ul[data-type=taskList]_li>label]:shrink-0 [&_ul[data-type=taskList]_li>label]:select-none\",\n // Visible but unclickable — operator-authored state is the source\n // of truth, visitors can't toggle. `pointer-events: none` has to\n // go on the *label*, not just the `<input>`: HTML's spec makes\n // any click on a `<label>` forward to the wrapped input regardless\n // of `pointer-events` on the input itself. Disabling the label\n // neuters both surfaces.\n \"[&_ul[data-type=taskList]_li>label]:pointer-events-none [&_ul[data-type=taskList]_li>label]:cursor-default\",\n \"[&_ul[data-type=taskList]_input]:accent-wx-primary [&_ul[data-type=taskList]_input]:h-3.5 [&_ul[data-type=taskList]_input]:w-3.5\",\n \"[&_ul[data-type=taskList]_li>label>span]:hidden\",\n \"[&_ul[data-type=taskList]_li>div]:min-w-0 [&_ul[data-type=taskList]_li>div]:flex-1\",\n \"[&_ul[data-type=taskList]_li>div>p]:my-0! [&_ul[data-type=taskList]_li>div>p]:leading-snug\",\n \"[&_ul[data-type=taskList]_li[data-checked=true]>div]:text-wx-fg-muted [&_ul[data-type=taskList]_li[data-checked=true]>div]:line-through\",\n\n // ─── Quotes + rules ─────────────────────────────────────────────\n \"[&_blockquote]:my-4 [&_blockquote]:border-l-2 [&_blockquote]:border-wx-primary/40\",\n \"[&_blockquote]:pl-3 [&_blockquote]:italic [&_blockquote]:text-wx-fg-muted\",\n \"[&_hr]:my-6 [&_hr]:border-wx-border\",\n\n // ─── Images + figures ───────────────────────────────────────────\n // Bare image — no border, no rounded corners. Editorial photos\n // look like themselves. Figures keep their framed feel via the\n // `<figcaption>` rule below.\n \"[&_img]:my-3 [&_img]:mx-auto [&_img]:block [&_img]:max-w-full\",\n \"[&_figure]:my-5 [&_figure]:flex [&_figure]:flex-col [&_figure]:items-center [&_figure]:text-center\",\n \"[&_figure_img]:my-0\",\n \"[&_figcaption]:mt-2 [&_figcaption]:text-xs [&_figcaption]:italic [&_figcaption]:text-wx-fg-muted\",\n\n // ─── Tables ─────────────────────────────────────────────────────\n // shadcn-style: hairline `border` around the whole grid, header\n // tinted, alternate row tinting, padded cells. `table-fixed +\n // w-full` so columns split the available width evenly — short cells\n // (\"1 / 2 / 3 / q / w / e\") used to collapse to ~30 px, leaving the\n // rest of the table as dead whitespace. `min-w-full` keeps wide\n // content scrollable; the parent prose container provides the\n // horizontal scroll via `overflow-x-auto` (set on the article body).\n // Cell `<p>` reset prevents the editor's default `<p>` margins from\n // bloating cell height.\n \"[&_table]:my-3 [&_table]:w-full [&_table]:table-fixed [&_table]:border-collapse [&_table]:text-xs\",\n \"[&_table]:overflow-hidden [&_table]:rounded-lg [&_table]:border [&_table]:border-wx-border\",\n \"[&_thead]:bg-wx-bg-elevated\",\n // Tighter cell padding — the 12 × 8 baseline left a lot of\n // dead whitespace inside the widget's 420 px panel. 10 × 6 keeps\n // the table dense without sacrificing readability.\n \"[&_th]:px-2.5 [&_th]:py-1.5 [&_th]:text-left [&_th]:font-medium [&_th]:text-wx-fg\",\n \"[&_th]:border-b [&_th]:border-wx-border\",\n \"[&_th+th]:border-l [&_th+th]:border-wx-border\",\n \"[&_td]:px-2.5 [&_td]:py-1.5 [&_td]:text-wx-fg [&_td]:align-top\",\n \"[&_td+td]:border-l [&_td+td]:border-wx-border\",\n \"[&_tbody_tr]:border-t [&_tbody_tr]:border-wx-border\",\n \"[&_tbody_tr:nth-child(odd)]:bg-wx-bg-elevated/40\",\n // Strip every paragraph margin inside table cells. The TipTap\n // table cell wraps the text in a `<p>` and the default\n // `[&_p]:my-3` rule from this same prose class would push cell\n // content way out — turning each row into a tall band of empty\n // space (the \"padding top and bottom\" the user flagged). `inline`\n // collapses the paragraph entirely so the cell baselines align.\n \"[&_th_p]:my-0 [&_td_p]:my-0 [&_th_p]:inline [&_td_p]:inline\",\n\n // ─── Accordions (native `<details>`) ────────────────────────────\n // shadcn-accordion-style. Native disclosure marker is suppressed\n // (Webkit pseudo + `list-none` for Blink/Gecko) and we render our\n // own chevron via a CSS pseudo so we can rotate it on `[open]`.\n // Each accordion is a stacked card with hairline divider between\n // siblings.\n \"[&_details]:my-2 [&_details]:overflow-hidden [&_details]:rounded-lg [&_details]:border [&_details]:border-wx-border [&_details]:bg-wx-bg-elevated/40\",\n \"[&_details+details]:mt-2\",\n \"[&_summary]:relative [&_summary]:cursor-pointer [&_summary]:list-none [&_summary]:px-4 [&_summary]:py-3\",\n \"[&_summary]:pr-10 [&_summary]:text-sm [&_summary]:font-medium [&_summary]:text-wx-fg\",\n // Suppress the disclosure triangle across browsers. Webkit needs\n // the pseudo selector; Blink/Gecko honour `list-style: none` set\n // by `list-none` above, plus the explicit `marker` reset.\n \"[&_summary::-webkit-details-marker]:hidden [&_summary::marker]:hidden\",\n // Chevron — drawn with a unicode glyph rotated on open. `›`\n // pointing right when closed, down when open. Keeps the bundle\n // clean (no SVG asset for one icon).\n \"[&_summary]:after:absolute [&_summary]:after:right-4 [&_summary]:after:top-1/2\",\n \"[&_summary]:after:-translate-y-1/2 [&_summary]:after:text-wx-fg-subtle\",\n \"[&_summary]:after:text-base [&_summary]:after:leading-none\",\n \"[&_summary]:after:transition-transform [&_summary]:after:content-['\\\\203A']\",\n \"[&_details[open]_summary]:after:rotate-90\",\n // Body sits below the divider when open.\n \"[&_details[open]_summary]:border-b [&_details[open]_summary]:border-wx-border\",\n \"[&_details]:[&>:not(summary)]:px-4 [&_details]:[&>:not(summary)]:py-3\",\n \"[&_details]:[&>:not(summary):first-of-type]:pt-3\",\n\n // Tabs / accordion are no longer DOM-styled here — `ArticleHtml`\n // owns those, rendering proper React components (`TabsBlock`,\n // `AccordionBlock`) via `html-react-parser`. The native `<details>`\n // rules above are kept for RSS-ingested HTML that didn't go through\n // the operator's TipTap editor.\n].join(\" \");\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/** Types of elements found in htmlparser2's DOM */\nvar ElementType;\n(function (ElementType) {\n /** Type for the root element of a document */\n ElementType[\"Root\"] = \"root\";\n /** Type for Text */\n ElementType[\"Text\"] = \"text\";\n /** Type for <? ... ?> */\n ElementType[\"Directive\"] = \"directive\";\n /** Type for <!-- ... --> */\n ElementType[\"Comment\"] = \"comment\";\n /** Type for <script> tags */\n ElementType[\"Script\"] = \"script\";\n /** Type for <style> tags */\n ElementType[\"Style\"] = \"style\";\n /** Type for Any tag */\n ElementType[\"Tag\"] = \"tag\";\n /** Type for <![CDATA[ ... ]]> */\n ElementType[\"CDATA\"] = \"cdata\";\n /** Type for <!doctype ...> */\n ElementType[\"Doctype\"] = \"doctype\";\n})(ElementType || (ElementType = {}));\n/**\n * Tests whether an element is a tag or not.\n * @param element Element to test\n * @param element.type Node type discriminator to check.\n */\nfunction isTag$1(element) {\n return (element.type === ElementType.Tag ||\n element.type === ElementType.Script ||\n element.type === ElementType.Style);\n}\n// Exports for backwards compatibility\n/** Type for the root element of a document */\n// eslint-disable-next-line prefer-destructuring\nElementType.Root;\n/** Type for Text */\n// eslint-disable-next-line prefer-destructuring\nElementType.Text;\n/** Type for <? ... ?> */\n// eslint-disable-next-line prefer-destructuring\nElementType.Directive;\n/** Type for <!-- ... --> */\n// eslint-disable-next-line prefer-destructuring\nElementType.Comment;\n/** Type for <script> tags */\n// eslint-disable-next-line prefer-destructuring\nElementType.Script;\n/** Type for <style> tags */\n// eslint-disable-next-line prefer-destructuring\nElementType.Style;\n/** Type for Any tag */\n// eslint-disable-next-line prefer-destructuring\nElementType.Tag;\n/** Type for <![CDATA[ ... ]]> */\n// eslint-disable-next-line prefer-destructuring\nElementType.CDATA;\n/** Type for <!doctype ...> */\n// eslint-disable-next-line prefer-destructuring\nElementType.Doctype;\n\n/**\n * This object will be used as the prototype for Nodes when creating a\n * DOM-Level-1-compliant structure.\n */\nclass Node {\n /** Parent of the node */\n parent = null;\n /** Previous sibling */\n prev = null;\n /** Next sibling */\n next = null;\n /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */\n startIndex = null;\n /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */\n endIndex = null;\n // Read-write aliases for properties\n /**\n * Same as {@link parent}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get parentNode() {\n return this.parent;\n }\n set parentNode(parent) {\n this.parent = parent;\n }\n /**\n * Same as {@link prev}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get previousSibling() {\n return this.prev;\n }\n set previousSibling(previous) {\n this.prev = previous;\n }\n /**\n * Same as {@link next}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get nextSibling() {\n return this.next;\n }\n set nextSibling(next) {\n this.next = next;\n }\n /**\n * Clone this node, and optionally its children.\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\n cloneNode(recursive = false) {\n return cloneNode(this, recursive);\n }\n}\n/**\n * A node that contains some data.\n */\nclass DataNode extends Node {\n data;\n /**\n * @param data The content of the data node\n */\n constructor(data) {\n super();\n this.data = data;\n }\n /**\n * Same as {@link data}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get nodeValue() {\n return this.data;\n }\n set nodeValue(data) {\n this.data = data;\n }\n}\n/**\n * Text within the document.\n */\nclass Text extends DataNode {\n type = ElementType.Text;\n get nodeType() {\n return 3;\n }\n}\n/**\n * Comments within the document.\n */\nclass Comment extends DataNode {\n type = ElementType.Comment;\n get nodeType() {\n return 8;\n }\n}\n/**\n * Processing instructions, including doc types.\n */\nclass ProcessingInstruction extends DataNode {\n type = ElementType.Directive;\n name;\n constructor(name, data) {\n super(data);\n this.name = name;\n }\n get nodeType() {\n return 1;\n }\n /** If this is a doctype, the document type name (parse5 only). */\n \"x-name\";\n /** If this is a doctype, the document type public identifier (parse5 only). */\n \"x-publicId\";\n /** If this is a doctype, the document type system identifier (parse5 only). */\n \"x-systemId\";\n}\n/**\n * A node that can have children.\n */\nclass NodeWithChildren extends Node {\n children;\n /**\n * @param children Children of the node. Only certain node types can have children.\n */\n constructor(children) {\n super();\n this.children = children;\n }\n // Aliases\n /** First child of the node. */\n get firstChild() {\n return this.children[0] ?? null;\n }\n /** Last child of the node. */\n get lastChild() {\n return this.children.length > 0\n ? this.children[this.children.length - 1]\n : null;\n }\n /**\n * Same as {@link children}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get childNodes() {\n return this.children;\n }\n set childNodes(children) {\n this.children = children;\n }\n}\n/**\n * CDATA nodes.\n */\nclass CDATA extends NodeWithChildren {\n type = ElementType.CDATA;\n get nodeType() {\n return 4;\n }\n}\n/**\n * The root node of the document.\n */\nclass Document extends NodeWithChildren {\n type = ElementType.Root;\n get nodeType() {\n return 9;\n }\n}\n/**\n * An element within the DOM.\n */\nclass Element extends NodeWithChildren {\n name;\n attribs;\n type;\n /**\n * @param name Name of the tag, eg. `div`, `span`.\n * @param attribs Object mapping attribute names to attribute values.\n * @param children Children of the node.\n * @param type Node type used for the new node instance.\n */\n constructor(name, attribs, children = [], type = name === \"script\"\n ? ElementType.Script\n : name === \"style\"\n ? ElementType.Style\n : ElementType.Tag) {\n super(children);\n this.name = name;\n this.attribs = attribs;\n this.type = type;\n }\n get nodeType() {\n return 1;\n }\n // DOM Level 1 aliases\n /**\n * Same as {@link name}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get tagName() {\n return this.name;\n }\n set tagName(name) {\n this.name = name;\n }\n get attributes() {\n return Object.keys(this.attribs).map((name) => ({\n name,\n value: this.attribs[name],\n namespace: this[\"x-attribsNamespace\"]?.[name],\n prefix: this[\"x-attribsPrefix\"]?.[name],\n }));\n }\n /** Element namespace (parse5 only). */\n namespace;\n /** Element attribute namespaces (parse5 only). */\n \"x-attribsNamespace\";\n /** Element attribute namespace-related prefixes (parse5 only). */\n \"x-attribsPrefix\";\n}\n/**\n * Checks if `node` is an element node.\n * @param node Node to check.\n * @returns `true` if the node is an element node.\n */\nfunction isTag(node) {\n return isTag$1(node);\n}\n/**\n * Checks if `node` is a CDATA node.\n * @param node Node to check.\n * @returns `true` if the node is a CDATA node.\n */\nfunction isCDATA(node) {\n return node.type === ElementType.CDATA;\n}\n/**\n * Checks if `node` is a text node.\n * @param node Node to check.\n * @returns `true` if the node is a text node.\n */\nfunction isText(node) {\n return node.type === ElementType.Text;\n}\n/**\n * Checks if `node` is a comment node.\n * @param node Node to check.\n * @returns `true` if the node is a comment node.\n */\nfunction isComment(node) {\n return node.type === ElementType.Comment;\n}\n/**\n * Checks if `node` is a directive node.\n * @param node Node to check.\n * @returns `true` if the node is a directive node.\n */\nfunction isDirective(node) {\n return node.type === ElementType.Directive;\n}\n/**\n * Checks if `node` is a document node.\n * @param node Node to check.\n * @returns `true` if the node is a document node.\n */\nfunction isDocument(node) {\n return node.type === ElementType.Root;\n}\n/**\n * Clone a node, and optionally its children.\n * @param node Node to clone.\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\nfunction cloneNode(node, recursive = false) {\n let result;\n if (isText(node)) {\n result = new Text(node.data);\n }\n else if (isComment(node)) {\n result = new Comment(node.data);\n }\n else if (isTag(node)) {\n const children = recursive ? cloneChildren(node.children) : [];\n const clone = new Element(node.name, { ...node.attribs }, children);\n for (const child of children) {\n child.parent = clone;\n }\n if (node.namespace != null) {\n clone.namespace = node.namespace;\n }\n if (node[\"x-attribsNamespace\"]) {\n clone[\"x-attribsNamespace\"] = { ...node[\"x-attribsNamespace\"] };\n }\n if (node[\"x-attribsPrefix\"]) {\n clone[\"x-attribsPrefix\"] = { ...node[\"x-attribsPrefix\"] };\n }\n result = clone;\n }\n else if (isCDATA(node)) {\n const children = recursive ? cloneChildren(node.children) : [];\n const clone = new CDATA(children);\n for (const child of children) {\n child.parent = clone;\n }\n result = clone;\n }\n else if (isDocument(node)) {\n const children = recursive ? cloneChildren(node.children) : [];\n const clone = new Document(children);\n for (const child of children) {\n child.parent = clone;\n }\n if (node[\"x-mode\"]) {\n clone[\"x-mode\"] = node[\"x-mode\"];\n }\n result = clone;\n }\n else if (isDirective(node)) {\n const instruction = new ProcessingInstruction(node.name, node.data);\n if (node[\"x-name\"] != null) {\n instruction[\"x-name\"] = node[\"x-name\"];\n instruction[\"x-publicId\"] = node[\"x-publicId\"];\n instruction[\"x-systemId\"] = node[\"x-systemId\"];\n }\n result = instruction;\n }\n else {\n throw new Error(`Not implemented yet: ${node.type}`);\n }\n result.startIndex = node.startIndex;\n result.endIndex = node.endIndex;\n if (node.sourceCodeLocation != null) {\n result.sourceCodeLocation = node.sourceCodeLocation;\n }\n return result;\n}\n/**\n * Clone a list of child nodes.\n * @param childs The child nodes to clone.\n * @returns A list of cloned child nodes.\n */\nfunction cloneChildren(childs) {\n const children = childs.map((child) => cloneNode(child, true));\n for (let index = 1; index < children.length; index++) {\n children[index].prev = children[index - 1];\n children[index - 1].next = children[index];\n }\n return children;\n}\n\n/**\n * SVG elements are case-sensitive.\n *\n * @see https://developer.mozilla.org/docs/Web/SVG/Element#svg_elements_a_to_z\n */\nvar CASE_SENSITIVE_TAG_NAMES = [\n 'animateMotion',\n 'animateTransform',\n 'clipPath',\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\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 'linearGradient',\n 'radialGradient',\n 'textPath',\n];\nvar CASE_SENSITIVE_TAG_NAMES_MAP = CASE_SENSITIVE_TAG_NAMES.reduce(function (accumulator, tagName) {\n accumulator[tagName.toLowerCase()] = tagName;\n return accumulator;\n}, {});\n\nvar CARRIAGE_RETURN = '\\r';\nvar CARRIAGE_RETURN_REGEX = new RegExp(CARRIAGE_RETURN, 'g');\nvar CARRIAGE_RETURN_PLACEHOLDER = \"__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_\".concat(Date.now().toString(), \"__\");\nvar CARRIAGE_RETURN_PLACEHOLDER_REGEX = new RegExp(CARRIAGE_RETURN_PLACEHOLDER, 'g');\n/**\n * Gets case-sensitive tag name.\n *\n * @param tagName - Tag name in lowercase.\n * @returns - Case-sensitive tag name.\n */\nfunction getCaseSensitiveTagName(tagName) {\n return CASE_SENSITIVE_TAG_NAMES_MAP[tagName];\n}\n/**\n * Formats DOM attributes to a hash map.\n *\n * @param attributes - List of attributes.\n * @returns - Map of attribute name to value.\n */\nfunction formatAttributes(attributes) {\n var map = {};\n var index = 0;\n var attributesLength = attributes.length;\n // `NamedNodeMap` is array-like\n for (; index < attributesLength; index++) {\n var attribute = attributes[index];\n map[attribute.name] = attribute.value;\n }\n return map;\n}\n/**\n * Corrects the tag name if it is case-sensitive (SVG).\n * Otherwise, returns the lowercase tag name (HTML).\n *\n * @param tagName - Lowercase tag name.\n * @returns - Formatted tag name.\n */\nfunction formatTagName(tagName) {\n tagName = tagName.toLowerCase();\n var caseSensitiveTagName = getCaseSensitiveTagName(tagName);\n if (caseSensitiveTagName) {\n return caseSensitiveTagName;\n }\n return tagName;\n}\n/**\n * Checks if an HTML string contains an opening tag (case-insensitive).\n *\n * @param html - HTML string.\n * @param tagName - Tag name to search for (e.g., 'head' or 'body').\n * @returns - Whether the tag is found.\n */\nfunction hasOpenTag(html, tagName) {\n var openTag = '<' + tagName;\n var index = html.toLowerCase().indexOf(openTag);\n if (index === -1) {\n return false;\n }\n var char = html[index + openTag.length];\n // the character after the tag name must be '>' or whitespace (for attributes)\n return (char === '>' ||\n char === ' ' ||\n char === '\\t' ||\n char === '\\n' ||\n char === '\\r' ||\n char === '/');\n}\n/**\n * Escapes special characters before parsing.\n *\n * @param html - The HTML string.\n * @returns - HTML string with escaped special characters.\n */\nfunction escapeSpecialCharacters(html) {\n return html.replace(CARRIAGE_RETURN_REGEX, CARRIAGE_RETURN_PLACEHOLDER);\n}\n/**\n * Reverts escaped special characters back to actual characters.\n *\n * @param text - The text with escaped characters.\n * @returns - Text with escaped characters reverted.\n */\nfunction revertEscapedCharacters(text) {\n return text.replace(CARRIAGE_RETURN_PLACEHOLDER_REGEX, CARRIAGE_RETURN);\n}\n/**\n * Transforms DOM nodes to `domhandler` nodes.\n *\n * @param nodes - DOM nodes.\n * @param parent - Parent node.\n * @param directive - Directive.\n * @returns - Nodes.\n */\nfunction formatDOM(nodes, parent, directive) {\n var _a, _b, _c, _d;\n if (parent === void 0) { parent = null; }\n var domNodes = [];\n var current;\n var index = 0;\n var nodesLength = nodes.length;\n for (; index < nodesLength; index++) {\n var node = nodes[index];\n // set the node data given the type\n switch (node.nodeType) {\n case 1: {\n var tagName = formatTagName(node.nodeName);\n // script, style, or tag\n current = new Element(tagName, formatAttributes(node.attributes));\n current.children = formatDOM(\n // template children are on content\n tagName === 'template'\n ? node.content.childNodes\n : node.childNodes, current);\n break;\n }\n /* v8 ignore start */\n case 3:\n current = new Text(revertEscapedCharacters((_a = node.nodeValue) !== null && _a !== void 0 ? _a : ''));\n break;\n case 8:\n current = new Comment((_b = node.nodeValue) !== null && _b !== void 0 ? _b : '');\n break;\n /* v8 ignore stop */\n default:\n continue;\n }\n // set previous node next\n var prev = (_c = domNodes[index - 1]) !== null && _c !== void 0 ? _c : null;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (prev) {\n prev.next = current;\n }\n // set properties for current node\n current.parent = parent;\n current.prev = prev;\n current.next = null;\n domNodes.push(current);\n }\n if (directive) {\n current = new ProcessingInstruction(directive.substring(0, directive.indexOf(' ')).toLowerCase(), directive);\n current.next = (_d = domNodes[0]) !== null && _d !== void 0 ? _d : null;\n current.parent = parent;\n domNodes.unshift(current);\n if (domNodes[1]) {\n domNodes[1].prev = domNodes[0];\n }\n }\n return domNodes;\n}\n\n// constants\nvar HTML = 'html';\nvar HEAD = 'head';\nvar BODY = 'body';\nvar FIRST_TAG_REGEX = /<([a-zA-Z]+[0-9]?)/; // e.g., <h1>\nfunction getHTMLForInnerHTML(html, trustedTypePolicy) {\n return trustedTypePolicy ? trustedTypePolicy.createHTML(html) : html;\n}\n// falls back to `parseFromString` if `createHTMLDocument` cannot be used\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* v8 ignore start */\nvar parseFromDocument = function (html, tagName, trustedTypePolicy) {\n throw new Error('This browser does not support `document.implementation.createHTMLDocument`');\n};\nvar parseFromString = function (html, tagName, trustedTypePolicy) {\n throw new Error('This browser does not support `DOMParser.prototype.parseFromString`');\n};\nvar DOMParser = typeof window === 'object' && window.DOMParser;\n/**\n * DOMParser (performance: slow).\n *\n * @see https://developer.mozilla.org/docs/Web/API/DOMParser#Parsing_an_SVG_or_HTML_document\n */\nif (typeof DOMParser === 'function') {\n var domParser_1 = new DOMParser();\n var mimeType_1 = 'text/html';\n /**\n * Creates an HTML document using `DOMParser.parseFromString`.\n *\n * @param html - The HTML string.\n * @param tagName - The element to render the HTML (with 'body' as fallback).\n * @returns - Document.\n */\n parseFromString = function (html, tagName, trustedTypePolicy) {\n if (tagName) {\n html = \"<\".concat(tagName, \">\").concat(html, \"</\").concat(tagName, \">\");\n }\n return domParser_1.parseFromString(html, mimeType_1);\n };\n parseFromDocument = parseFromString;\n}\n/**\n * DOMImplementation (performance: fair).\n *\n * @see https://developer.mozilla.org/docs/Web/API/DOMImplementation/createHTMLDocument\n */\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nif (typeof document === 'object' && document.implementation) {\n var htmlDocument_1 = document.implementation.createHTMLDocument();\n /**\n * Use HTML document created by `document.implementation.createHTMLDocument`.\n *\n * @param html - The HTML string.\n * @param tagName - The element to render the HTML (with 'body' as fallback).\n * @returns - Document\n */\n parseFromDocument = function (html, tagName, trustedTypePolicy) {\n if (tagName) {\n var element = htmlDocument_1.documentElement.querySelector(tagName);\n if (element) {\n element.innerHTML = getHTMLForInnerHTML(html, trustedTypePolicy);\n }\n return htmlDocument_1;\n }\n htmlDocument_1.documentElement.innerHTML = getHTMLForInnerHTML(html, trustedTypePolicy);\n return htmlDocument_1;\n };\n}\n/**\n * Template (performance: fast).\n *\n * @see https://developer.mozilla.org/docs/Web/HTML/Element/template\n */\nvar template = typeof document === 'object' && document.createElement('template');\nvar parseFromTemplate;\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nif (template && template.content) {\n /**\n * Uses a template element (content fragment) to parse HTML.\n *\n * @param html - HTML string.\n * @returns - Nodes.\n */\n parseFromTemplate = function (html, trustedTypePolicy) {\n template.innerHTML = getHTMLForInnerHTML(html, trustedTypePolicy);\n return template.content.childNodes;\n };\n}\nvar createNodeList = function () { return document.createDocumentFragment().childNodes; };\n/* v8 ignore stop */\n/**\n * Parses HTML string to DOM nodes.\n *\n * @param html - HTML markup.\n * @param trustedTypePolicy - Trusted Types policy.\n * @returns - DOM nodes.\n */\nfunction domparser(html, trustedTypePolicy) {\n var _a, _b, _c, _d, _e, _f;\n // Escape special characters before parsing\n html = escapeSpecialCharacters(html);\n var match = FIRST_TAG_REGEX.exec(html);\n var firstTagName = (_a = match === null || match === void 0 ? void 0 : match[1]) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n switch (firstTagName) {\n case HTML: {\n var doc = parseFromString(html);\n // the created document may come with filler head/body elements,\n // so make sure to remove them if they don't actually exist\n if (!hasOpenTag(html, HEAD)) {\n var element = doc.querySelector(HEAD);\n (_b = element === null || element === void 0 ? void 0 : element.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(element);\n }\n if (!hasOpenTag(html, BODY)) {\n var element = doc.querySelector(BODY);\n (_c = element === null || element === void 0 ? void 0 : element.parentNode) === null || _c === void 0 ? void 0 : _c.removeChild(element);\n }\n return doc.querySelectorAll(HTML);\n }\n case HEAD:\n case BODY: {\n var elements = parseFromDocument(html, undefined, trustedTypePolicy).querySelectorAll(firstTagName);\n // if there's a sibling element, then return both elements\n /* v8 ignore next */\n if (hasOpenTag(html, BODY) && hasOpenTag(html, HEAD)) {\n return (_e = (_d = elements[0].parentNode) === null || _d === void 0 ? void 0 : _d.childNodes) !== null && _e !== void 0 ? _e : createNodeList();\n }\n return elements;\n }\n // low-level tag or text\n /* v8 ignore start */\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (parseFromTemplate) {\n return parseFromTemplate(html, trustedTypePolicy);\n }\n var element = parseFromDocument(html, BODY, trustedTypePolicy).querySelector(BODY);\n return (_f = element === null || element === void 0 ? void 0 : element.childNodes) !== null && _f !== void 0 ? _f : createNodeList();\n }\n /* v8 ignore stop */\n }\n}\n\nvar DIRECTIVE_REGEX = /<(![a-zA-Z\\s]+)>/; // e.g., <!doctype html>\n/**\n * Parses HTML string to DOM nodes in browser.\n *\n * @param html - HTML markup.\n * @param options - Parser options.\n * @returns - DOM elements.\n */\nfunction HTMLDOMParser(html, options) {\n if (typeof html !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n if (!html) {\n return [];\n }\n // match directive\n var match = DIRECTIVE_REGEX.exec(html);\n var directive = match ? match[1] : undefined;\n return formatDOM(domparser(html, options === null || options === void 0 ? void 0 : options.trustedTypePolicy), null, directive);\n}\n\nexports.default = HTMLDOMParser;\n//# sourceMappingURL=html-to-dom.js.map\n","// An attribute in which the DOM/SVG standard name is the same as the React prop name (e.g., 'accept').\nvar SAME = 0;\nexports.SAME = SAME;\n\n// An attribute in which the React prop name is the camelcased version of the DOM/SVG standard name (e.g., 'acceptCharset').\nvar CAMELCASE = 1;\nexports.CAMELCASE = CAMELCASE;\n\nexports.possibleStandardNames = {\n accept: 0,\n acceptCharset: 1,\n 'accept-charset': 'acceptCharset',\n accessKey: 1,\n action: 0,\n allowFullScreen: 1,\n alt: 0,\n as: 0,\n async: 0,\n autoCapitalize: 1,\n autoComplete: 1,\n autoCorrect: 1,\n autoFocus: 1,\n autoPlay: 1,\n autoSave: 1,\n capture: 0,\n cellPadding: 1,\n cellSpacing: 1,\n challenge: 0,\n charSet: 1,\n checked: 0,\n children: 0,\n cite: 0,\n class: 'className',\n classID: 1,\n className: 1,\n cols: 0,\n colSpan: 1,\n content: 0,\n contentEditable: 1,\n contextMenu: 1,\n controls: 0,\n controlsList: 1,\n coords: 0,\n crossOrigin: 1,\n dangerouslySetInnerHTML: 1,\n data: 0,\n dateTime: 1,\n default: 0,\n defaultChecked: 1,\n defaultValue: 1,\n defer: 0,\n dir: 0,\n disabled: 0,\n disablePictureInPicture: 1,\n disableRemotePlayback: 1,\n download: 0,\n draggable: 0,\n encType: 1,\n enterKeyHint: 1,\n for: 'htmlFor',\n form: 0,\n formMethod: 1,\n formAction: 1,\n formEncType: 1,\n formNoValidate: 1,\n formTarget: 1,\n frameBorder: 1,\n headers: 0,\n height: 0,\n hidden: 0,\n high: 0,\n href: 0,\n hrefLang: 1,\n htmlFor: 1,\n httpEquiv: 1,\n 'http-equiv': 'httpEquiv',\n icon: 0,\n id: 0,\n innerHTML: 1,\n inputMode: 1,\n integrity: 0,\n is: 0,\n itemID: 1,\n itemProp: 1,\n itemRef: 1,\n itemScope: 1,\n itemType: 1,\n keyParams: 1,\n keyType: 1,\n kind: 0,\n label: 0,\n lang: 0,\n list: 0,\n loop: 0,\n low: 0,\n manifest: 0,\n marginWidth: 1,\n marginHeight: 1,\n max: 0,\n maxLength: 1,\n media: 0,\n mediaGroup: 1,\n method: 0,\n min: 0,\n minLength: 1,\n multiple: 0,\n muted: 0,\n name: 0,\n noModule: 1,\n nonce: 0,\n noValidate: 1,\n open: 0,\n optimum: 0,\n pattern: 0,\n placeholder: 0,\n playsInline: 1,\n poster: 0,\n preload: 0,\n profile: 0,\n radioGroup: 1,\n readOnly: 1,\n referrerPolicy: 1,\n rel: 0,\n required: 0,\n reversed: 0,\n role: 0,\n rows: 0,\n rowSpan: 1,\n sandbox: 0,\n scope: 0,\n scoped: 0,\n scrolling: 0,\n seamless: 0,\n selected: 0,\n shape: 0,\n size: 0,\n sizes: 0,\n span: 0,\n spellCheck: 1,\n src: 0,\n srcDoc: 1,\n srcLang: 1,\n srcSet: 1,\n start: 0,\n step: 0,\n style: 0,\n summary: 0,\n tabIndex: 1,\n target: 0,\n title: 0,\n type: 0,\n useMap: 1,\n value: 0,\n width: 0,\n wmode: 0,\n wrap: 0,\n about: 0,\n accentHeight: 1,\n 'accent-height': 'accentHeight',\n accumulate: 0,\n additive: 0,\n alignmentBaseline: 1,\n 'alignment-baseline': 'alignmentBaseline',\n allowReorder: 1,\n alphabetic: 0,\n amplitude: 0,\n arabicForm: 1,\n 'arabic-form': 'arabicForm',\n ascent: 0,\n attributeName: 1,\n attributeType: 1,\n autoReverse: 1,\n azimuth: 0,\n baseFrequency: 1,\n baselineShift: 1,\n 'baseline-shift': 'baselineShift',\n baseProfile: 1,\n bbox: 0,\n begin: 0,\n bias: 0,\n by: 0,\n calcMode: 1,\n capHeight: 1,\n 'cap-height': 'capHeight',\n clip: 0,\n clipPath: 1,\n 'clip-path': 'clipPath',\n clipPathUnits: 1,\n clipRule: 1,\n 'clip-rule': 'clipRule',\n color: 0,\n colorInterpolation: 1,\n 'color-interpolation': 'colorInterpolation',\n colorInterpolationFilters: 1,\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorProfile: 1,\n 'color-profile': 'colorProfile',\n colorRendering: 1,\n 'color-rendering': 'colorRendering',\n contentScriptType: 1,\n contentStyleType: 1,\n cursor: 0,\n cx: 0,\n cy: 0,\n d: 0,\n datatype: 0,\n decelerate: 0,\n descent: 0,\n diffuseConstant: 1,\n direction: 0,\n display: 0,\n divisor: 0,\n dominantBaseline: 1,\n 'dominant-baseline': 'dominantBaseline',\n dur: 0,\n dx: 0,\n dy: 0,\n edgeMode: 1,\n elevation: 0,\n enableBackground: 1,\n 'enable-background': 'enableBackground',\n end: 0,\n exponent: 0,\n externalResourcesRequired: 1,\n fill: 0,\n fillOpacity: 1,\n 'fill-opacity': 'fillOpacity',\n fillRule: 1,\n 'fill-rule': 'fillRule',\n filter: 0,\n filterRes: 1,\n filterUnits: 1,\n floodOpacity: 1,\n 'flood-opacity': 'floodOpacity',\n floodColor: 1,\n 'flood-color': 'floodColor',\n focusable: 0,\n fontFamily: 1,\n 'font-family': 'fontFamily',\n fontSize: 1,\n 'font-size': 'fontSize',\n fontSizeAdjust: 1,\n 'font-size-adjust': 'fontSizeAdjust',\n fontStretch: 1,\n 'font-stretch': 'fontStretch',\n fontStyle: 1,\n 'font-style': 'fontStyle',\n fontVariant: 1,\n 'font-variant': 'fontVariant',\n fontWeight: 1,\n 'font-weight': 'fontWeight',\n format: 0,\n from: 0,\n fx: 0,\n fy: 0,\n g1: 0,\n g2: 0,\n glyphName: 1,\n 'glyph-name': 'glyphName',\n glyphOrientationHorizontal: 1,\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphOrientationVertical: 1,\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphRef: 1,\n gradientTransform: 1,\n gradientUnits: 1,\n hanging: 0,\n horizAdvX: 1,\n 'horiz-adv-x': 'horizAdvX',\n horizOriginX: 1,\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 0,\n imageRendering: 1,\n 'image-rendering': 'imageRendering',\n in2: 0,\n in: 0,\n inlist: 0,\n intercept: 0,\n k1: 0,\n k2: 0,\n k3: 0,\n k4: 0,\n k: 0,\n kernelMatrix: 1,\n kernelUnitLength: 1,\n kerning: 0,\n keyPoints: 1,\n keySplines: 1,\n keyTimes: 1,\n lengthAdjust: 1,\n letterSpacing: 1,\n 'letter-spacing': 'letterSpacing',\n lightingColor: 1,\n 'lighting-color': 'lightingColor',\n limitingConeAngle: 1,\n local: 0,\n markerEnd: 1,\n 'marker-end': 'markerEnd',\n markerHeight: 1,\n markerMid: 1,\n 'marker-mid': 'markerMid',\n markerStart: 1,\n 'marker-start': 'markerStart',\n markerUnits: 1,\n markerWidth: 1,\n mask: 0,\n maskContentUnits: 1,\n maskUnits: 1,\n mathematical: 0,\n mode: 0,\n numOctaves: 1,\n offset: 0,\n opacity: 0,\n operator: 0,\n order: 0,\n orient: 0,\n orientation: 0,\n origin: 0,\n overflow: 0,\n overlinePosition: 1,\n 'overline-position': 'overlinePosition',\n overlineThickness: 1,\n 'overline-thickness': 'overlineThickness',\n paintOrder: 1,\n 'paint-order': 'paintOrder',\n panose1: 0,\n 'panose-1': 'panose1',\n pathLength: 1,\n patternContentUnits: 1,\n patternTransform: 1,\n patternUnits: 1,\n pointerEvents: 1,\n 'pointer-events': 'pointerEvents',\n points: 0,\n pointsAtX: 1,\n pointsAtY: 1,\n pointsAtZ: 1,\n prefix: 0,\n preserveAlpha: 1,\n preserveAspectRatio: 1,\n primitiveUnits: 1,\n property: 0,\n r: 0,\n radius: 0,\n refX: 1,\n refY: 1,\n renderingIntent: 1,\n 'rendering-intent': 'renderingIntent',\n repeatCount: 1,\n repeatDur: 1,\n requiredExtensions: 1,\n requiredFeatures: 1,\n resource: 0,\n restart: 0,\n result: 0,\n results: 0,\n rotate: 0,\n rx: 0,\n ry: 0,\n scale: 0,\n security: 0,\n seed: 0,\n shapeRendering: 1,\n 'shape-rendering': 'shapeRendering',\n slope: 0,\n spacing: 0,\n specularConstant: 1,\n specularExponent: 1,\n speed: 0,\n spreadMethod: 1,\n startOffset: 1,\n stdDeviation: 1,\n stemh: 0,\n stemv: 0,\n stitchTiles: 1,\n stopColor: 1,\n 'stop-color': 'stopColor',\n stopOpacity: 1,\n 'stop-opacity': 'stopOpacity',\n strikethroughPosition: 1,\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughThickness: 1,\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 0,\n stroke: 0,\n strokeDasharray: 1,\n 'stroke-dasharray': 'strokeDasharray',\n strokeDashoffset: 1,\n 'stroke-dashoffset': 'strokeDashoffset',\n strokeLinecap: 1,\n 'stroke-linecap': 'strokeLinecap',\n strokeLinejoin: 1,\n 'stroke-linejoin': 'strokeLinejoin',\n strokeMiterlimit: 1,\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokeWidth: 1,\n 'stroke-width': 'strokeWidth',\n strokeOpacity: 1,\n 'stroke-opacity': 'strokeOpacity',\n suppressContentEditableWarning: 1,\n suppressHydrationWarning: 1,\n surfaceScale: 1,\n systemLanguage: 1,\n tableValues: 1,\n targetX: 1,\n targetY: 1,\n textAnchor: 1,\n 'text-anchor': 'textAnchor',\n textDecoration: 1,\n 'text-decoration': 'textDecoration',\n textLength: 1,\n textRendering: 1,\n 'text-rendering': 'textRendering',\n to: 0,\n transform: 0,\n typeof: 0,\n u1: 0,\n u2: 0,\n underlinePosition: 1,\n 'underline-position': 'underlinePosition',\n underlineThickness: 1,\n 'underline-thickness': 'underlineThickness',\n unicode: 0,\n unicodeBidi: 1,\n 'unicode-bidi': 'unicodeBidi',\n unicodeRange: 1,\n 'unicode-range': 'unicodeRange',\n unitsPerEm: 1,\n 'units-per-em': 'unitsPerEm',\n unselectable: 0,\n vAlphabetic: 1,\n 'v-alphabetic': 'vAlphabetic',\n values: 0,\n vectorEffect: 1,\n 'vector-effect': 'vectorEffect',\n version: 0,\n vertAdvY: 1,\n 'vert-adv-y': 'vertAdvY',\n vertOriginX: 1,\n 'vert-origin-x': 'vertOriginX',\n vertOriginY: 1,\n 'vert-origin-y': 'vertOriginY',\n vHanging: 1,\n 'v-hanging': 'vHanging',\n vIdeographic: 1,\n 'v-ideographic': 'vIdeographic',\n viewBox: 1,\n viewTarget: 1,\n visibility: 0,\n vMathematical: 1,\n 'v-mathematical': 'vMathematical',\n vocab: 0,\n widths: 0,\n wordSpacing: 1,\n 'word-spacing': 'wordSpacing',\n writingMode: 1,\n 'writing-mode': 'writingMode',\n x1: 0,\n x2: 0,\n x: 0,\n xChannelSelector: 1,\n xHeight: 1,\n 'x-height': 'xHeight',\n xlinkActuate: 1,\n 'xlink:actuate': 'xlinkActuate',\n xlinkArcrole: 1,\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkHref: 1,\n 'xlink:href': 'xlinkHref',\n xlinkRole: 1,\n 'xlink:role': 'xlinkRole',\n xlinkShow: 1,\n 'xlink:show': 'xlinkShow',\n xlinkTitle: 1,\n 'xlink:title': 'xlinkTitle',\n xlinkType: 1,\n 'xlink:type': 'xlinkType',\n xmlBase: 1,\n 'xml:base': 'xmlBase',\n xmlLang: 1,\n 'xml:lang': 'xmlLang',\n xmlns: 0,\n 'xml:space': 'xmlSpace',\n xmlnsXlink: 1,\n 'xmlns:xlink': 'xmlnsXlink',\n xmlSpace: 1,\n y1: 0,\n y2: 0,\n y: 0,\n yChannelSelector: 1,\n z: 0,\n zoomAndPan: 1\n};\n","'use strict';\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n\n\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nconst RESERVED = 0;\n\n// A simple string attribute.\n// Attributes that aren't in the filter are presumed to have this type.\nconst STRING = 1;\n\n// A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\nconst BOOLEANISH_STRING = 2;\n\n// A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\nconst BOOLEAN = 3;\n\n// An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\nconst OVERLOADED_BOOLEAN = 4;\n\n// An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\nconst NUMERIC = 5;\n\n// An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\nconst POSITIVE_NUMERIC = 6;\n\nfunction getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(\n name,\n type,\n mustUseProperty,\n attributeName,\n attributeNamespace,\n sanitizeURL,\n removeEmptyString,\n) {\n this.acceptsBooleans =\n type === BOOLEANISH_STRING ||\n type === BOOLEAN ||\n type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n this.sanitizeURL = sanitizeURL;\n this.removeEmptyString = removeEmptyString;\n}\n\n// When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\nconst properties = {};\n\n// These props are reserved by React. They shouldn't be written to the DOM.\nconst reservedProps = [\n 'children',\n 'dangerouslySetInnerHTML',\n // TODO: This prevents the assignment of defaultValue to regular\n // elements (not just inputs). Now that ReactDOMInput assigns to the\n // defaultValue property -- do we need this?\n 'defaultValue',\n 'defaultChecked',\n 'innerHTML',\n 'suppressContentEditableWarning',\n 'suppressHydrationWarning',\n 'style',\n];\n\nreservedProps.forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n RESERVED,\n false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n[\n ['acceptCharset', 'accept-charset'],\n ['className', 'class'],\n ['htmlFor', 'for'],\n ['httpEquiv', 'http-equiv'],\n].forEach(([name, attributeName]) => {\n properties[name] = new PropertyInfoRecord(\n name,\n STRING,\n false, // mustUseProperty\n attributeName, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n BOOLEANISH_STRING,\n false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n[\n 'autoReverse',\n 'externalResourcesRequired',\n 'focusable',\n 'preserveAlpha',\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n BOOLEANISH_STRING,\n false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are HTML boolean attributes.\n[\n 'allowFullScreen',\n 'async',\n // Note: there is a special case that prevents it from being written to the DOM\n // on the client side because the browsers are inconsistent. Instead we call focus().\n 'autoFocus',\n 'autoPlay',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'disablePictureInPicture',\n 'disableRemotePlayback',\n 'formNoValidate',\n 'hidden',\n 'loop',\n 'noModule',\n 'noValidate',\n 'open',\n 'playsInline',\n 'readOnly',\n 'required',\n 'reversed',\n 'scoped',\n 'seamless',\n // Microdata\n 'itemScope',\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n BOOLEAN,\n false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n[\n 'checked',\n // Note: `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`. We have special logic for handling this.\n 'multiple',\n 'muted',\n 'selected',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n BOOLEAN,\n true, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n[\n 'capture',\n 'download',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n OVERLOADED_BOOLEAN,\n false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are HTML attributes that must be positive numbers.\n[\n 'cols',\n 'rows',\n 'size',\n 'span',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n POSITIVE_NUMERIC,\n false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These are HTML attributes that must be numbers.\n['rowSpan', 'start'].forEach(name => {\n properties[name] = new PropertyInfoRecord(\n name,\n NUMERIC,\n false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\nconst CAMELIZE = /[\\-\\:]([a-z])/g;\nconst capitalize = token => token[1].toUpperCase();\n\n// This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML attribute filter.\n// Some of these attributes can be hard to find. This list was created by\n// scraping the MDN documentation.\n[\n 'accent-height',\n 'alignment-baseline',\n 'arabic-form',\n 'baseline-shift',\n 'cap-height',\n 'clip-path',\n 'clip-rule',\n 'color-interpolation',\n 'color-interpolation-filters',\n 'color-profile',\n 'color-rendering',\n 'dominant-baseline',\n 'enable-background',\n 'fill-opacity',\n 'fill-rule',\n 'flood-color',\n 'flood-opacity',\n 'font-family',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'glyph-name',\n 'glyph-orientation-horizontal',\n 'glyph-orientation-vertical',\n 'horiz-adv-x',\n 'horiz-origin-x',\n 'image-rendering',\n 'letter-spacing',\n 'lighting-color',\n 'marker-end',\n 'marker-mid',\n 'marker-start',\n 'overline-position',\n 'overline-thickness',\n 'paint-order',\n 'panose-1',\n 'pointer-events',\n 'rendering-intent',\n 'shape-rendering',\n 'stop-color',\n 'stop-opacity',\n 'strikethrough-position',\n 'strikethrough-thickness',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n 'stroke-opacity',\n 'stroke-width',\n 'text-anchor',\n 'text-decoration',\n 'text-rendering',\n 'underline-position',\n 'underline-thickness',\n 'unicode-bidi',\n 'unicode-range',\n 'units-per-em',\n 'v-alphabetic',\n 'v-hanging',\n 'v-ideographic',\n 'v-mathematical',\n 'vector-effect',\n 'vert-adv-y',\n 'vert-origin-x',\n 'vert-origin-y',\n 'word-spacing',\n 'writing-mode',\n 'xmlns:xlink',\n 'x-height',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(attributeName => {\n const name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(\n name,\n STRING,\n false, // mustUseProperty\n attributeName,\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// String SVG attributes with the xlink namespace.\n[\n 'xlink:actuate',\n 'xlink:arcrole',\n 'xlink:role',\n 'xlink:show',\n 'xlink:title',\n 'xlink:type',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(attributeName => {\n const name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(\n name,\n STRING,\n false, // mustUseProperty\n attributeName,\n 'http://www.w3.org/1999/xlink',\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// String SVG attributes with the xml namespace.\n[\n 'xml:base',\n 'xml:lang',\n 'xml:space',\n\n // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n].forEach(attributeName => {\n const name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(\n name,\n STRING,\n false, // mustUseProperty\n attributeName,\n 'http://www.w3.org/XML/1998/namespace',\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n['tabIndex', 'crossOrigin'].forEach(attributeName => {\n properties[attributeName] = new PropertyInfoRecord(\n attributeName,\n STRING,\n false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false, // removeEmptyString\n );\n});\n\n// These attributes accept URLs. These must not allow javascript: URLS.\n// These will also need to accept Trusted Types object in the future.\nconst xlinkHref = 'xlinkHref';\nproperties[xlinkHref] = new PropertyInfoRecord(\n 'xlinkHref',\n STRING,\n false, // mustUseProperty\n 'xlink:href',\n 'http://www.w3.org/1999/xlink',\n true, // sanitizeURL\n false, // removeEmptyString\n);\n\n['src', 'href', 'action', 'formAction'].forEach(attributeName => {\n properties[attributeName] = new PropertyInfoRecord(\n attributeName,\n STRING,\n false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n true, // sanitizeURL\n true, // removeEmptyString\n );\n});\n\n// \nconst {\n CAMELCASE,\n SAME,\n possibleStandardNames: possibleStandardNamesOptimized\n} = require('../lib/possibleStandardNamesOptimized');\n\nconst ATTRIBUTE_NAME_START_CHAR =\n ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\n\nconst ATTRIBUTE_NAME_CHAR =\n ATTRIBUTE_NAME_START_CHAR + '\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\n\n/**\n * Checks whether a property name is a custom attribute.\n *\n * @see https://github.com/facebook/react/blob/15-stable/src/renderers/dom/shared/HTMLDOMPropertyConfig.js#L23-L25\n *\n * @type {(attribute: string) => boolean}\n */\nconst isCustomAttribute =\n RegExp.prototype.test.bind(\n // eslint-disable-next-line no-misleading-character-class\n new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$')\n );\n\n/**\n * @type {Record<string, string>}\n */\nconst possibleStandardNames = Object.keys(\n possibleStandardNamesOptimized\n).reduce((accumulator, standardName) => {\n const propName = possibleStandardNamesOptimized[standardName];\n if (propName === SAME) {\n accumulator[standardName] = standardName;\n } else if (propName === CAMELCASE) {\n accumulator[standardName.toLowerCase()] = standardName;\n } else {\n accumulator[standardName] = propName;\n }\n return accumulator;\n}, {});\n\nexports.BOOLEAN = BOOLEAN;\nexports.BOOLEANISH_STRING = BOOLEANISH_STRING;\nexports.NUMERIC = NUMERIC;\nexports.OVERLOADED_BOOLEAN = OVERLOADED_BOOLEAN;\nexports.POSITIVE_NUMERIC = POSITIVE_NUMERIC;\nexports.RESERVED = RESERVED;\nexports.STRING = STRING;\nexports.getPropertyInfo = getPropertyInfo;\nexports.isCustomAttribute = isCustomAttribute;\nexports.possibleStandardNames = possibleStandardNames;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.returnFirstArg = exports.canTextBeChildOfNode = exports.ELEMENTS_WITH_NO_TEXT_CHILDREN = exports.PRESERVE_CUSTOM_ATTRIBUTES = void 0;\nexports.isCustomComponent = isCustomComponent;\nexports.setStyleProp = setStyleProp;\nconst react_1 = require(\"react\");\nconst style_to_js_1 = __importDefault(require(\"style-to-js\"));\nconst RESERVED_SVG_MATHML_ELEMENTS = new Set([\n 'annotation-xml',\n 'color-profile',\n 'font-face',\n 'font-face-src',\n 'font-face-uri',\n 'font-face-format',\n 'font-face-name',\n 'missing-glyph',\n]);\n/**\n * Check if a tag is a custom component.\n *\n * @see {@link https://github.com/facebook/react/blob/v16.6.3/packages/react-dom/src/shared/isCustomComponent.js}\n *\n * @param tagName - Tag name.\n * @param props - Props passed to the element.\n * @returns - Whether the tag is custom component.\n */\nfunction isCustomComponent(tagName, props) {\n if (!tagName.includes('-')) {\n return Boolean(props && typeof props.is === 'string');\n }\n // These are reserved SVG and MathML elements.\n // We don't mind this whitelist too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n if (RESERVED_SVG_MATHML_ELEMENTS.has(tagName)) {\n return false;\n }\n return true;\n}\nconst styleOptions = {\n reactCompat: true,\n};\n/**\n * Sets style prop.\n *\n * @param style - Inline style.\n * @param props - Props object.\n */\nfunction setStyleProp(style, props) {\n if (typeof style !== 'string') {\n return;\n }\n if (!style.trim()) {\n props.style = {};\n return;\n }\n try {\n props.style = (0, style_to_js_1.default)(style, styleOptions);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n }\n catch (error) {\n props.style = {};\n }\n}\n/**\n * @see https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html\n */\nexports.PRESERVE_CUSTOM_ATTRIBUTES = Number(react_1.version.split('.')[0]) >= 16;\n/**\n * @see https://github.com/facebook/react/blob/cae635054e17a6f107a39d328649137b83f25972/packages/react-dom/src/client/validateDOMNesting.js#L213\n */\nexports.ELEMENTS_WITH_NO_TEXT_CHILDREN = new Set([\n 'tr',\n 'tbody',\n 'thead',\n 'tfoot',\n 'colgroup',\n 'table',\n 'head',\n 'html',\n 'frameset',\n]);\n/**\n * Checks if the given node can contain text nodes\n *\n * @param node - Element node.\n * @returns - Whether the node can contain text nodes.\n */\nconst canTextBeChildOfNode = (node) => !exports.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(node.name);\nexports.canTextBeChildOfNode = canTextBeChildOfNode;\n/**\n * Returns the first argument as is.\n *\n * @param arg - The argument to be returned.\n * @returns - The input argument `arg`.\n */\nconst returnFirstArg = (arg) => arg;\nexports.returnFirstArg = returnFirstArg;\n//# sourceMappingURL=utilities.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = attributesToProps;\nconst react_property_1 = require(\"react-property\");\nconst utilities_1 = require(\"./utilities\");\n// https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components\n// https://developer.mozilla.org/docs/Web/HTML/Attributes\nconst UNCONTROLLED_COMPONENT_ATTRIBUTES = ['checked', 'value'];\nconst UNCONTROLLED_COMPONENT_NAMES = ['input', 'select', 'textarea'];\nconst valueOnlyInputs = {\n reset: true,\n submit: true,\n};\n/**\n * Converts HTML/SVG DOM attributes to React props.\n *\n * @param attributes - HTML/SVG DOM attributes.\n * @param nodeName - DOM node name.\n * @returns - React props.\n */\nfunction attributesToProps(attributes = {}, nodeName) {\n const props = {};\n const isInputValueOnly = Boolean(attributes.type && valueOnlyInputs[attributes.type]);\n for (const attributeName in attributes) {\n const attributeValue = attributes[attributeName];\n // ARIA (aria-*) or custom data (data-*) attribute\n if ((0, react_property_1.isCustomAttribute)(attributeName)) {\n props[attributeName] = attributeValue;\n continue;\n }\n // convert HTML/SVG attribute to React prop\n const attributeNameLowerCased = attributeName.toLowerCase();\n let propName = getPropName(attributeNameLowerCased);\n if (propName) {\n const propertyInfo = (0, react_property_1.getPropertyInfo)(propName);\n // convert attribute to uncontrolled component prop (e.g., `value` to `defaultValue`)\n if (UNCONTROLLED_COMPONENT_ATTRIBUTES.includes(propName) &&\n UNCONTROLLED_COMPONENT_NAMES.includes(nodeName) &&\n !isInputValueOnly) {\n propName = getPropName('default' + attributeNameLowerCased);\n }\n props[propName] = attributeValue;\n switch (propertyInfo === null || propertyInfo === void 0 ? void 0 : propertyInfo.type) {\n case react_property_1.BOOLEAN:\n props[propName] = true;\n break;\n case react_property_1.OVERLOADED_BOOLEAN:\n if (attributeValue === '') {\n props[propName] = true;\n }\n break;\n }\n continue;\n }\n // preserve custom attribute if React >=16\n if (utilities_1.PRESERVE_CUSTOM_ATTRIBUTES) {\n props[attributeName] = attributeValue;\n }\n }\n // transform inline style to object\n (0, utilities_1.setStyleProp)(attributes.style, props);\n return props;\n}\n/**\n * Gets prop name from lowercased attribute name.\n *\n * @param attributeName - Lowercased attribute name.\n * @returns - Prop name.\n */\nfunction getPropName(attributeName) {\n return react_property_1.possibleStandardNames[attributeName];\n}\n//# sourceMappingURL=attributes-to-props.js.map","/** Types of elements found in htmlparser2's DOM */\nexport var ElementType;\n(function (ElementType) {\n /** Type for the root element of a document */\n ElementType[\"Root\"] = \"root\";\n /** Type for Text */\n ElementType[\"Text\"] = \"text\";\n /** Type for <? ... ?> */\n ElementType[\"Directive\"] = \"directive\";\n /** Type for <!-- ... --> */\n ElementType[\"Comment\"] = \"comment\";\n /** Type for <script> tags */\n ElementType[\"Script\"] = \"script\";\n /** Type for <style> tags */\n ElementType[\"Style\"] = \"style\";\n /** Type for Any tag */\n ElementType[\"Tag\"] = \"tag\";\n /** Type for <![CDATA[ ... ]]> */\n ElementType[\"CDATA\"] = \"cdata\";\n /** Type for <!doctype ...> */\n ElementType[\"Doctype\"] = \"doctype\";\n})(ElementType || (ElementType = {}));\n/**\n * Tests whether an element is a tag or not.\n * @param element Element to test\n * @param element.type Node type discriminator to check.\n */\nexport function isTag(element) {\n return (element.type === ElementType.Tag ||\n element.type === ElementType.Script ||\n element.type === ElementType.Style);\n}\n// Exports for backwards compatibility\n/** Type for the root element of a document */\n// eslint-disable-next-line prefer-destructuring\nexport const Root = ElementType.Root;\n/** Type for Text */\n// eslint-disable-next-line prefer-destructuring\nexport const Text = ElementType.Text;\n/** Type for <? ... ?> */\n// eslint-disable-next-line prefer-destructuring\nexport const Directive = ElementType.Directive;\n/** Type for <!-- ... --> */\n// eslint-disable-next-line prefer-destructuring\nexport const Comment = ElementType.Comment;\n/** Type for <script> tags */\n// eslint-disable-next-line prefer-destructuring\nexport const Script = ElementType.Script;\n/** Type for <style> tags */\n// eslint-disable-next-line prefer-destructuring\nexport const Style = ElementType.Style;\n/** Type for Any tag */\n// eslint-disable-next-line prefer-destructuring\nexport const Tag = ElementType.Tag;\n/** Type for <![CDATA[ ... ]]> */\n// eslint-disable-next-line prefer-destructuring\nexport const CDATA = ElementType.CDATA;\n/** Type for <!doctype ...> */\n// eslint-disable-next-line prefer-destructuring\nexport const Doctype = ElementType.Doctype;\n","import { ElementType, isTag as isTagRaw } from \"domelementtype\";\n/**\n * This object will be used as the prototype for Nodes when creating a\n * DOM-Level-1-compliant structure.\n */\nexport class Node {\n /** Parent of the node */\n parent = null;\n /** Previous sibling */\n prev = null;\n /** Next sibling */\n next = null;\n /** The start index of the node. Requires `withStartIndices` on the handler to be `true. */\n startIndex = null;\n /** The end index of the node. Requires `withEndIndices` on the handler to be `true. */\n endIndex = null;\n // Read-write aliases for properties\n /**\n * Same as {@link parent}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get parentNode() {\n return this.parent;\n }\n set parentNode(parent) {\n this.parent = parent;\n }\n /**\n * Same as {@link prev}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get previousSibling() {\n return this.prev;\n }\n set previousSibling(previous) {\n this.prev = previous;\n }\n /**\n * Same as {@link next}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get nextSibling() {\n return this.next;\n }\n set nextSibling(next) {\n this.next = next;\n }\n /**\n * Clone this node, and optionally its children.\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\n cloneNode(recursive = false) {\n return cloneNode(this, recursive);\n }\n}\n/**\n * A node that contains some data.\n */\nexport class DataNode extends Node {\n data;\n /**\n * @param data The content of the data node\n */\n constructor(data) {\n super();\n this.data = data;\n }\n /**\n * Same as {@link data}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get nodeValue() {\n return this.data;\n }\n set nodeValue(data) {\n this.data = data;\n }\n}\n/**\n * Text within the document.\n */\nexport class Text extends DataNode {\n type = ElementType.Text;\n get nodeType() {\n return 3;\n }\n}\n/**\n * Comments within the document.\n */\nexport class Comment extends DataNode {\n type = ElementType.Comment;\n get nodeType() {\n return 8;\n }\n}\n/**\n * Processing instructions, including doc types.\n */\nexport class ProcessingInstruction extends DataNode {\n type = ElementType.Directive;\n name;\n constructor(name, data) {\n super(data);\n this.name = name;\n }\n get nodeType() {\n return 1;\n }\n /** If this is a doctype, the document type name (parse5 only). */\n \"x-name\";\n /** If this is a doctype, the document type public identifier (parse5 only). */\n \"x-publicId\";\n /** If this is a doctype, the document type system identifier (parse5 only). */\n \"x-systemId\";\n}\n/**\n * A node that can have children.\n */\nexport class NodeWithChildren extends Node {\n children;\n /**\n * @param children Children of the node. Only certain node types can have children.\n */\n constructor(children) {\n super();\n this.children = children;\n }\n // Aliases\n /** First child of the node. */\n get firstChild() {\n return this.children[0] ?? null;\n }\n /** Last child of the node. */\n get lastChild() {\n return this.children.length > 0\n ? this.children[this.children.length - 1]\n : null;\n }\n /**\n * Same as {@link children}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get childNodes() {\n return this.children;\n }\n set childNodes(children) {\n this.children = children;\n }\n}\n/**\n * CDATA nodes.\n */\nexport class CDATA extends NodeWithChildren {\n type = ElementType.CDATA;\n get nodeType() {\n return 4;\n }\n}\n/**\n * The root node of the document.\n */\nexport class Document extends NodeWithChildren {\n type = ElementType.Root;\n get nodeType() {\n return 9;\n }\n}\n/**\n * An element within the DOM.\n */\nexport class Element extends NodeWithChildren {\n name;\n attribs;\n type;\n /**\n * @param name Name of the tag, eg. `div`, `span`.\n * @param attribs Object mapping attribute names to attribute values.\n * @param children Children of the node.\n * @param type Node type used for the new node instance.\n */\n constructor(name, attribs, children = [], type = name === \"script\"\n ? ElementType.Script\n : name === \"style\"\n ? ElementType.Style\n : ElementType.Tag) {\n super(children);\n this.name = name;\n this.attribs = attribs;\n this.type = type;\n }\n get nodeType() {\n return 1;\n }\n // DOM Level 1 aliases\n /**\n * Same as {@link name}.\n * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.\n */\n get tagName() {\n return this.name;\n }\n set tagName(name) {\n this.name = name;\n }\n get attributes() {\n return Object.keys(this.attribs).map((name) => ({\n name,\n value: this.attribs[name],\n namespace: this[\"x-attribsNamespace\"]?.[name],\n prefix: this[\"x-attribsPrefix\"]?.[name],\n }));\n }\n /** Element namespace (parse5 only). */\n namespace;\n /** Element attribute namespaces (parse5 only). */\n \"x-attribsNamespace\";\n /** Element attribute namespace-related prefixes (parse5 only). */\n \"x-attribsPrefix\";\n}\n/**\n * Checks if `node` is an element node.\n * @param node Node to check.\n * @returns `true` if the node is an element node.\n */\nexport function isTag(node) {\n return isTagRaw(node);\n}\n/**\n * Checks if `node` is a CDATA node.\n * @param node Node to check.\n * @returns `true` if the node is a CDATA node.\n */\nexport function isCDATA(node) {\n return node.type === ElementType.CDATA;\n}\n/**\n * Checks if `node` is a text node.\n * @param node Node to check.\n * @returns `true` if the node is a text node.\n */\nexport function isText(node) {\n return node.type === ElementType.Text;\n}\n/**\n * Checks if `node` is a comment node.\n * @param node Node to check.\n * @returns `true` if the node is a comment node.\n */\nexport function isComment(node) {\n return node.type === ElementType.Comment;\n}\n/**\n * Checks if `node` is a directive node.\n * @param node Node to check.\n * @returns `true` if the node is a directive node.\n */\nexport function isDirective(node) {\n return node.type === ElementType.Directive;\n}\n/**\n * Checks if `node` is a document node.\n * @param node Node to check.\n * @returns `true` if the node is a document node.\n */\nexport function isDocument(node) {\n return node.type === ElementType.Root;\n}\n/**\n * Checks if `node` has children.\n * @param node Node to check.\n * @returns `true` if the node has children.\n */\nexport function hasChildren(node) {\n return Object.hasOwn(node, \"children\");\n}\n/**\n * Clone a node, and optionally its children.\n * @param node Node to clone.\n * @param recursive Clone child nodes as well.\n * @returns A clone of the node.\n */\nexport function cloneNode(node, recursive = false) {\n let result;\n if (isText(node)) {\n result = new Text(node.data);\n }\n else if (isComment(node)) {\n result = new Comment(node.data);\n }\n else if (isTag(node)) {\n const children = recursive ? cloneChildren(node.children) : [];\n const clone = new Element(node.name, { ...node.attribs }, children);\n for (const child of children) {\n child.parent = clone;\n }\n if (node.namespace != null) {\n clone.namespace = node.namespace;\n }\n if (node[\"x-attribsNamespace\"]) {\n clone[\"x-attribsNamespace\"] = { ...node[\"x-attribsNamespace\"] };\n }\n if (node[\"x-attribsPrefix\"]) {\n clone[\"x-attribsPrefix\"] = { ...node[\"x-attribsPrefix\"] };\n }\n result = clone;\n }\n else if (isCDATA(node)) {\n const children = recursive ? cloneChildren(node.children) : [];\n const clone = new CDATA(children);\n for (const child of children) {\n child.parent = clone;\n }\n result = clone;\n }\n else if (isDocument(node)) {\n const children = recursive ? cloneChildren(node.children) : [];\n const clone = new Document(children);\n for (const child of children) {\n child.parent = clone;\n }\n if (node[\"x-mode\"]) {\n clone[\"x-mode\"] = node[\"x-mode\"];\n }\n result = clone;\n }\n else if (isDirective(node)) {\n const instruction = new ProcessingInstruction(node.name, node.data);\n if (node[\"x-name\"] != null) {\n instruction[\"x-name\"] = node[\"x-name\"];\n instruction[\"x-publicId\"] = node[\"x-publicId\"];\n instruction[\"x-systemId\"] = node[\"x-systemId\"];\n }\n result = instruction;\n }\n else {\n throw new Error(`Not implemented yet: ${node.type}`);\n }\n result.startIndex = node.startIndex;\n result.endIndex = node.endIndex;\n if (node.sourceCodeLocation != null) {\n result.sourceCodeLocation = node.sourceCodeLocation;\n }\n return result;\n}\n/**\n * Clone a list of child nodes.\n * @param childs The child nodes to clone.\n * @returns A list of cloned child nodes.\n */\nfunction cloneChildren(childs) {\n const children = childs.map((child) => cloneNode(child, true));\n for (let index = 1; index < children.length; index++) {\n children[index].prev = children[index - 1];\n children[index - 1].next = children[index];\n }\n return children;\n}\n","import { ElementType } from \"domelementtype\";\nimport { CDATA, Comment, Document, Element, ProcessingInstruction, Text, } from \"./node.js\";\nexport * from \"./node.js\";\n// Default options\nconst defaultOptions = {\n withStartIndices: false,\n withEndIndices: false,\n xmlMode: false,\n};\n/**\n * Event-based handler that builds a DOM tree from parser callbacks.\n */\nexport class DomHandler {\n /** The elements of the DOM */\n dom = [];\n /** The root element for the DOM */\n root = new Document(this.dom);\n /** Called once parsing has completed. */\n callback;\n /** Settings for the handler. */\n options;\n /** Callback whenever a tag is closed. */\n elementCB;\n /** Indicated whether parsing has been completed. */\n done = false;\n /** Stack of open tags. */\n tagStack = [this.root];\n /** A data node that is still being written to. */\n lastNode = null;\n /** Reference to the parser instance. Used for location information. */\n parser = null;\n /**\n * @param callback Called once parsing has completed.\n * @param options Settings for the handler.\n * @param elementCB Callback whenever a tag is closed.\n */\n constructor(callback, options, elementCB) {\n // Make it possible to skip arguments, for backwards-compatibility\n if (typeof options === \"function\") {\n elementCB = options;\n options = defaultOptions;\n }\n if (typeof callback === \"object\") {\n options = callback;\n callback = undefined;\n }\n this.callback = callback ?? null;\n this.options = options ?? defaultOptions;\n this.elementCB = elementCB ?? null;\n }\n onparserinit(parser) {\n this.parser = parser;\n }\n // Resets the handler back to starting state\n onreset() {\n this.dom = [];\n this.root = new Document(this.dom);\n this.done = false;\n this.tagStack = [this.root];\n this.lastNode = null;\n this.parser = null;\n }\n // Signals the handler that parsing is done\n onend() {\n if (this.done)\n return;\n this.done = true;\n this.parser = null;\n this.handleCallback(null);\n }\n onerror(error) {\n this.handleCallback(error);\n }\n onclosetag() {\n this.lastNode = null;\n const element = this.tagStack.pop();\n if (this.options.withEndIndices && this.parser) {\n element.endIndex = this.parser.endIndex;\n }\n if (this.elementCB)\n this.elementCB(element);\n }\n onopentag(name, attribs) {\n const type = this.options.xmlMode ? ElementType.Tag : undefined;\n const element = new Element(name, attribs, undefined, type);\n this.addNode(element);\n this.tagStack.push(element);\n }\n ontext(data) {\n const { lastNode } = this;\n if (lastNode && lastNode.type === ElementType.Text) {\n lastNode.data += data;\n if (this.options.withEndIndices && this.parser) {\n lastNode.endIndex = this.parser.endIndex;\n }\n }\n else {\n const node = new Text(data);\n this.addNode(node);\n this.lastNode = node;\n }\n }\n oncomment(data) {\n if (this.lastNode && this.lastNode.type === ElementType.Comment) {\n this.lastNode.data += data;\n return;\n }\n const node = new Comment(data);\n this.addNode(node);\n this.lastNode = node;\n }\n oncommentend() {\n this.lastNode = null;\n }\n oncdatastart() {\n const text = new Text(\"\");\n const node = new CDATA([text]);\n this.addNode(node);\n text.parent = node;\n this.lastNode = text;\n }\n oncdataend() {\n this.lastNode = null;\n }\n onprocessinginstruction(name, data) {\n const node = new ProcessingInstruction(name, data);\n this.addNode(node);\n }\n handleCallback(error) {\n if (typeof this.callback === \"function\") {\n this.callback(error, this.dom);\n }\n else if (error) {\n throw error;\n }\n }\n addNode(node) {\n const parent = this.tagStack[this.tagStack.length - 1];\n const previousSibling = parent.children[parent.children.length - 1];\n if (this.options.withStartIndices && this.parser) {\n node.startIndex = this.parser.startIndex;\n }\n if (this.options.withEndIndices && this.parser) {\n node.endIndex = this.parser.endIndex;\n }\n parent.children.push(node);\n if (previousSibling) {\n node.prev = previousSibling;\n previousSibling.next = node;\n }\n node.parent = parent;\n this.lastNode = null;\n }\n}\nexport default DomHandler;\n","\"use strict\";\n/* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = domToReact;\nconst domhandler_1 = require(\"domhandler\");\nconst react_1 = require(\"react\");\nconst attributes_to_props_1 = __importDefault(require(\"./attributes-to-props\"));\nconst utilities_1 = require(\"./utilities\");\nconst React = {\n cloneElement: react_1.cloneElement,\n createElement: react_1.createElement,\n isValidElement: react_1.isValidElement,\n};\n/**\n * Converts DOM nodes to JSX element(s).\n *\n * @param nodes - DOM nodes.\n * @param options - Options.\n * @returns - String or JSX element(s).\n */\nfunction domToReact(nodes, options = {}) {\n var _a, _b, _c, _d, _e;\n const reactElements = [];\n const hasReplace = typeof options.replace === 'function';\n const transform = (_a = options.transform) !== null && _a !== void 0 ? _a : utilities_1.returnFirstArg;\n const { cloneElement, createElement, isValidElement } = (_b = options.library) !== null && _b !== void 0 ? _b : React;\n const nodesLength = nodes.length;\n normalizeDOMNodes(nodes);\n for (let index = 0; index < nodesLength; index++) {\n const node = nodes[index];\n // replace with custom React element (if present)\n if (hasReplace) {\n let replaceElement = (_c = options.replace) === null || _c === void 0 ? void 0 : _c.call(options, node, index);\n if (isValidElement(replaceElement)) {\n // set \"key\" prop for sibling elements\n // https://react.dev/learn/rendering-lists#rules-of-keys\n if (nodesLength > 1) {\n replaceElement = cloneElement(replaceElement, {\n key: (_d = replaceElement.key) !== null && _d !== void 0 ? _d : index,\n });\n }\n reactElements.push(transform(replaceElement, node, index));\n continue;\n }\n }\n if (node.type === 'text') {\n const isWhitespace = !node.data.trim().length;\n // We have a whitespace node that can't be nested in its parent\n // so skip it\n if (isWhitespace &&\n node.parent &&\n !(0, utilities_1.canTextBeChildOfNode)(node.parent)) {\n continue;\n }\n // Trim is enabled and we have a whitespace node\n // so skip it\n if (options.trim && isWhitespace) {\n continue;\n }\n // We have a text node that's not whitespace and it can be nested\n // in its parent so add it to the results\n reactElements.push(transform(node.data, node, index));\n continue;\n }\n const element = node;\n let props = {};\n if (skipAttributesToProps(element)) {\n (0, utilities_1.setStyleProp)(element.attribs.style, element.attribs);\n props = element.attribs;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n }\n else if (element.attribs) {\n props = (0, attributes_to_props_1.default)(element.attribs, element.name);\n }\n let children;\n switch (node.type) {\n case 'script':\n case 'style':\n // prevent text in <script> or <style> from being escaped\n // https://react.dev/reference/react-dom/components/common#dangerously-setting-the-inner-html\n if (node.children[0]) {\n props.dangerouslySetInnerHTML = {\n __html: node.children[0].data,\n };\n }\n break;\n case 'tag':\n // setting textarea value in children is an antipattern in React\n // https://react.dev/reference/react-dom/components/textarea#caveats\n if (node.name === 'textarea' && node.children[0]) {\n props.defaultValue = node.children[0].data;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n }\n else if ((_e = node.children) === null || _e === void 0 ? void 0 : _e.length) {\n // continue recursion of creating React elements (if applicable)\n children = domToReact(node.children, options);\n }\n break;\n // skip all other cases (e.g., comment)\n default:\n continue;\n }\n // set \"key\" prop for sibling elements\n // https://react.dev/learn/rendering-lists#rules-of-keys\n if (nodesLength > 1) {\n props.key = index;\n }\n reactElements.push(transform(createElement(node.name, props, children), node, index));\n }\n return reactElements.length === 1 ? reactElements[0] : reactElements;\n}\nfunction normalizeDOMNodes(nodes) {\n for (const node of nodes) {\n if (node.type === 'tag' ||\n node.type === 'script' ||\n node.type === 'style') {\n Object.setPrototypeOf(node, domhandler_1.Element.prototype);\n normalizeDOMNodes(node.children);\n }\n }\n}\n/**\n * Determines whether DOM element attributes should be transformed to props.\n * Web Components should not have their attributes transformed except for `style`.\n *\n * @param node - Element node.\n * @returns - Whether the node attributes should be converted to props.\n */\nfunction skipAttributesToProps(node) {\n return (utilities_1.PRESERVE_CUSTOM_ATTRIBUTES &&\n node.type === 'tag' &&\n (0, utilities_1.isCustomComponent)(node.name, node.attribs));\n}\n//# sourceMappingURL=dom-to-react.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.htmlToDOM = exports.domToReact = exports.attributesToProps = exports.Text = exports.ProcessingInstruction = exports.Element = exports.Comment = void 0;\nexports.default = HTMLReactParser;\nconst html_dom_parser_1 = __importDefault(require(\"html-dom-parser\"));\nexports.htmlToDOM = html_dom_parser_1.default;\nconst attributes_to_props_1 = __importDefault(require(\"./attributes-to-props\"));\nexports.attributesToProps = attributes_to_props_1.default;\nconst dom_to_react_1 = __importDefault(require(\"./dom-to-react\"));\nexports.domToReact = dom_to_react_1.default;\nvar domhandler_1 = require(\"domhandler\");\nObject.defineProperty(exports, \"Comment\", { enumerable: true, get: function () { return domhandler_1.Comment; } });\nObject.defineProperty(exports, \"Element\", { enumerable: true, get: function () { return domhandler_1.Element; } });\nObject.defineProperty(exports, \"ProcessingInstruction\", { enumerable: true, get: function () { return domhandler_1.ProcessingInstruction; } });\nObject.defineProperty(exports, \"Text\", { enumerable: true, get: function () { return domhandler_1.Text; } });\nconst domParserOptions = { lowerCaseAttributeNames: false };\n/**\n * Converts HTML string to React elements.\n *\n * @param html - HTML string.\n * @param options - Parser options.\n * @returns - React element(s), empty array, or string.\n */\nfunction HTMLReactParser(html, options) {\n var _a;\n if (typeof html !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n if (!html) {\n return [];\n }\n const htmlToDOMOptions = Object.assign(Object.assign({}, ((_a = options === null || options === void 0 ? void 0 : options.htmlparser2) !== null && _a !== void 0 ? _a : domParserOptions)), { trustedTypePolicy: options === null || options === void 0 ? void 0 : options.trustedTypePolicy });\n return (0, dom_to_react_1.default)((0, html_dom_parser_1.default)(html, htmlToDOMOptions), options);\n}\n//# sourceMappingURL=index.js.map","import HTMLReactParser from '../lib/index.js';\n\nexport {\n attributesToProps,\n Comment,\n domToReact,\n Element,\n htmlToDOM,\n ProcessingInstruction,\n Text,\n} from '../lib/index.js';\n\nexport default HTMLReactParser.default || HTMLReactParser;\n","\"use client\";\n\nimport { ChevronDown } from \"lucide-react\";\nimport { useTranslations } from \"next-intl\";\nimport { useState } from \"react\";\nimport type { TocEntry } from \"@/lib/article-toc\";\nimport { cn } from \"@/lib/utils\";\n\n/**\n * Intercom-style minimal TOC. The earlier \"motion designer\" version\n * (pulsing brand stripe, sliding rail, hover dots) was visually noisy\n * for a documentation surface — readers came for the outline, not a\n * showcase. This rebuild strips back to:\n *\n * • \"Table of contents\" header + chevron, hairline divider.\n * • Plain rows of clickable entries indented by heading level.\n * • Subtle hover background; no active highlight, no marker.\n *\n * The aggressive prose-class resets (`[&_a]:no-underline`,\n * `[&_ul]:list-none`, `[&_li]:m-0`) stay — the card sits inside the\n * article prose container, which would otherwise paint anchor\n * underlines and disc bullets straight onto our nav.\n *\n * Click handler: previous attempts walked up looking for an ancestor\n * with overflow-y + scrollHeight > clientHeight, but the widget's\n * panel mounts the article body inside a shadcn `ScrollArea` whose\n * Radix Viewport carries `data-slot=\"scroll-area-viewport\"`. We\n * target that explicitly first — the data-slot is the canonical\n * scroll anchor on every help / news article view — and only fall\n * back to a generic overflow walk for embeds that don't use\n * ScrollArea (e.g. the FE app's article preview cards).\n */\nexport function TableOfContents({ entries }: { entries: TocEntry[] }) {\n const t = useTranslations(\"article\");\n // Default to closed. The card lives above the article body and\n // long-form posts already have a hero / title section that orients\n // the reader — surfacing the outline by default would dominate the\n // top of the panel. Readers who want it open one tap away.\n const [open, setOpen] = useState(false);\n\n const handleClick = (e: React.MouseEvent | React.KeyboardEvent, id: string) => {\n e.preventDefault();\n\n // The widget renders inside a Shadow DOM, so\n // `document.getElementById` returns null — shadow boundaries\n // are opaque to document queries. Use `getRootNode()` on the\n // click target to retrieve whichever root actually owns this\n // tree (the widget's ShadowRoot in the embed, or `document` for\n // tests / dashboard preview), then querySelector inside that\n // root. Falling back to `document` covers the unusual case\n // where `getRootNode` returns a fragment.\n const rootNode = (e.currentTarget as HTMLElement).getRootNode() as ShadowRoot | Document;\n const root: Document | ShadowRoot =\n rootNode instanceof ShadowRoot || rootNode instanceof Document ? rootNode : document;\n // Escape attribute-special characters in the id for the\n // selector — slugs only contain ASCII letters / digits / dashes\n // today, but defensive coding here is cheap.\n const target =\n \"querySelector\" in root\n ? (root.querySelector(`[id=\"${CSS.escape(id)}\"]`) as HTMLElement | null)\n : null;\n if (!target) return;\n\n // 1. Prefer the shadcn `ScrollArea` viewport that wraps the\n // article body — that's where the widget's scrolling\n // actually lives. `closest()` walks up from the target and\n // returns the first match. Inside a Shadow DOM `closest`\n // works fine within the shadow tree.\n const scrollAreaViewport = target.closest(\n \"[data-slot='scroll-area-viewport']\",\n ) as HTMLElement | null;\n\n // 2. Fall back to a generic overflow walk for non-ScrollArea\n // embeds (cards in the FE dashboard, RSS preview, etc).\n let scroller: HTMLElement | null = scrollAreaViewport;\n if (!scroller) {\n let cur: HTMLElement | null = target.parentElement;\n while (cur) {\n const cs = getComputedStyle(cur);\n if (/(auto|scroll|overlay)/.test(cs.overflowY)) {\n scroller = cur;\n break;\n }\n cur = cur.parentElement;\n }\n }\n\n const offsetPx = 16; // little air above the heading after scroll\n if (scroller) {\n const tRect = target.getBoundingClientRect();\n const sRect = scroller.getBoundingClientRect();\n scroller.scrollTo({\n top: scroller.scrollTop + tRect.top - sRect.top - offsetPx,\n behavior: \"smooth\",\n });\n } else {\n target.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n }\n };\n\n return (\n <nav\n aria-label={t(\"tableOfContents\")}\n className={cn(\n \"wx-toc mt-0 overflow-hidden rounded-xl border border-wx-border bg-wx-bg\",\n // Reset prose rules so the card's descendants don't inherit\n // anchor underline / disc markers / li margins.\n \"[&_a]:no-underline [&_a]:text-inherit [&_a:hover]:opacity-100\",\n \"[&_ul]:m-0 [&_ul]:list-none [&_ul]:p-0\",\n \"[&_li]:m-0\",\n )}\n >\n <button\n type=\"button\"\n onClick={() => setOpen((v) => !v)}\n aria-expanded={open}\n className={cn(\n \"flex w-full items-center justify-between gap-3 px-4 py-3\",\n \"text-left text-sm font-medium text-wx-fg\",\n \"transition-colors hover:bg-wx-bg-elevated/40\",\n )}\n >\n <span>{t(\"tableOfContents\")}</span>\n <ChevronDown\n className={cn(\n \"h-4 w-4 shrink-0 text-wx-fg-subtle transition-transform duration-200\",\n open && \"rotate-180\",\n )}\n aria-hidden=\"true\"\n />\n </button>\n\n {/* Open/close via CSS grid rows so the divider + list slide\n in cleanly without a layout pop. */}\n <div\n className={cn(\n \"grid transition-[grid-template-rows] duration-200 ease-out\",\n open ? \"grid-rows-[1fr]\" : \"grid-rows-[0fr]\",\n )}\n aria-hidden={!open}\n >\n <div className=\"min-h-0 overflow-hidden\">\n <div className=\"border-t border-wx-border/70 px-2 py-2\">\n <div className=\"flex flex-col\">\n {entries.map((entry) => {\n const indentPx = entry.level === 2 ? 16 : entry.level === 3 ? 32 : 0;\n return (\n <button\n key={entry.id}\n type=\"button\"\n onClick={(e) => handleClick(e, entry.id)}\n className={cn(\n \"flex h-8 items-center truncate rounded-md pr-2 text-left text-sm text-wx-fg\",\n \"transition-colors hover:bg-wx-bg-elevated/50\",\n )}\n style={{ paddingLeft: 12 + indentPx }}\n >\n <span className=\"truncate\">{entry.text}</span>\n </button>\n );\n })}\n </div>\n </div>\n </div>\n </div>\n </nav>\n );\n}\n","\"use client\";\n\nimport { ChevronDown } from \"lucide-react\";\nimport { type ReactNode, useState } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\n/**\n * Collapsible disclosure rendered for `<details>` / TipTap\n * `<div data-type=\"details\">`. Owns its own open state and renders its\n * own chevron toggle (the source markup's native toggle is stripped by\n * the accordion handler).\n */\nexport function AccordionBlock({\n summary,\n body,\n defaultOpen,\n}: {\n summary: ReactNode;\n body: ReactNode;\n defaultOpen: boolean;\n}) {\n const [open, setOpen] = useState(defaultOpen);\n return (\n <div className=\"my-2 overflow-hidden rounded-lg border border-wx-border\">\n <button\n type=\"button\"\n onClick={() => setOpen((v) => !v)}\n aria-expanded={open}\n className={cn(\n \"flex w-full items-center justify-between gap-3 px-4 py-3\",\n // Bold title for visual prominence — matches typical\n // accordion patterns (FAQ-style) where the question is\n // bolder than the answer.\n \"text-left text-sm font-semibold text-wx-fg\",\n \"transition-colors hover:bg-wx-bg-elevated/50\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary/30\",\n )}\n >\n <span className=\"min-w-0 flex-1\">{summary}</span>\n <ChevronDown\n className={cn(\n \"h-4 w-4 shrink-0 text-wx-fg-subtle transition-transform\",\n open && \"rotate-180\",\n )}\n aria-hidden=\"true\"\n />\n </button>\n {open && (\n // `[&>:first-child]:mt-0` strips the top margin of the first\n // body paragraph so the divider + body read as one unit\n // without an awkward gap.\n <div className=\"border-t border-wx-border px-4 py-3 text-sm leading-relaxed text-wx-fg [&>:first-child]:mt-0 [&>:last-child]:mb-0\">\n {body}\n </div>\n )}\n </div>\n );\n}\n","import { domToReact, Element } from \"html-react-parser\";\nimport { AccordionBlock } from \"../blocks/accordion-block\";\nimport type { ReplaceHandler } from \"./types\";\n\n/**\n * Accordion. Two shapes are catchable here:\n * 1. **Native `<details>`** — emitted by RSS HTML, older posts\n * authored before we wired the TipTap Details extension, or any\n * external HTML pasted into the editor.\n * 2. **TipTap v3 `<div data-type=\"details\">`** — produced by\n * `@tiptap/extension-details`. Wraps everything in a `<div>` shell\n * with `<summary>` + `<div data-type=\"detailsContent\">` nested\n * under another inner `<div>` (the NodeView's render target).\n * Sometimes a `<button>` toggle sits at the top of the shell —\n * strip it: `AccordionBlock` renders its own toggle.\n */\nexport const accordionHandler: ReplaceHandler = (node, ctx) => {\n const isNativeDetails = node.name === \"details\";\n const isTipTapDetails = node.name === \"div\" && node.attribs?.[\"data-type\"] === \"details\";\n if (!isNativeDetails && !isTipTapDetails) return undefined;\n\n // Walk through the immediate descendants looking for the `<summary>`\n // and the body. The TipTap shell adds extra wrapper divs, so we search\n // recursively (capped to a single level so we don't strip unrelated\n // nested content).\n const allChildren: unknown[] = isTipTapDetails\n ? (node.children ?? []).flatMap((c) =>\n c instanceof Element && c.name === \"div\" && !c.attribs?.[\"data-type\"]\n ? (c.children ?? [])\n : [c],\n )\n : (node.children ?? []);\n const summaryEl = allChildren.find(\n (c): c is Element => c instanceof Element && c.name === \"summary\",\n );\n const rawBodyEls = allChildren.filter(\n (c) =>\n c !== summaryEl &&\n // Skip the TipTap NodeView's toggle button — we render our own\n // chevron inside `AccordionBlock`.\n !(c instanceof Element && c.name === \"button\"),\n );\n // Unwrap `<div data-type=\"detailsContent\">` (or kebab-case alias from\n // older versions) so the body is the actual paragraphs, not the\n // wrapper div which carries `[hidden]`.\n const detailsContentWrapper = rawBodyEls.find(\n (c): c is Element =>\n c instanceof Element &&\n c.name === \"div\" &&\n (c.attribs?.[\"data-type\"] === \"detailsContent\" ||\n c.attribs?.[\"data-type\"] === \"details-content\"),\n );\n const bodyEls = detailsContentWrapper ? (detailsContentWrapper.children ?? []) : rawBodyEls;\n const summary = summaryEl\n ? domToReact(summaryEl.children as Parameters<typeof domToReact>[0], ctx.options)\n : null;\n const body = <>{domToReact(bodyEls as Parameters<typeof domToReact>[0], ctx.options)}</>;\n // Open state: native uses `[open]` attribute; TipTap v3 uses\n // `data-open` on the wrapper. Either flips the initial render to\n // expanded; otherwise the accordion starts collapsed.\n const initiallyOpen = node.attribs?.open !== undefined || node.attribs?.[\"data-open\"] === \"true\";\n return <AccordionBlock defaultOpen={initiallyOpen} summary={summary} body={body} />;\n};\n","import { domToReact } from \"html-react-parser\";\nimport type { ReplaceHandler } from \"./types\";\n\n/**\n * Tiptap-style WYSIWYG editors sometimes emit non-standard block tags\n * (e.g. `<card>`, `<callout>`, `<note>`, `<tip>`, `<warning>`) when an\n * operator drops a custom \"info box\" extension into the article. Those\n * tags reach the visitor surface verbatim — browsers don't know what\n * to do with them (render as inline, no styling), and React in dev\n * surfaces:\n *\n * The tag <card> is unrecognized in this browser.\n *\n * Rather than leak the warning + an unstyled blob to the visitor, we\n * map these known structural tags to a tonal `<div>` shell that\n * matches the widget's card chrome — keeps the operator's intent\n * (visually-distinct callout) without the lint noise. Children pass\n * through `domToReact` so nested content (paragraphs, links, lists)\n * still gets the full replace pipeline (links open with the right\n * referrer policy, images join the lightbox gallery, etc.).\n *\n * Each tag picks a quiet accent colour so a `<warning>` and a\n * `<note>` don't look identical — the visual hierarchy survives even\n * when we don't know the operator's exact intent.\n */\nconst CUSTOM_TAGS: Record<string, string> = {\n card: \"border-wx-border bg-wx-bg-elevated/60\",\n callout: \"border-wx-primary/30 bg-wx-primary/5\",\n note: \"border-wx-border bg-wx-bg-elevated/60\",\n tip: \"border-wx-success/30 bg-wx-success/5\",\n warning: \"border-wx-warning/30 bg-wx-warning/5\",\n danger: \"border-wx-danger/30 bg-wx-danger/5\",\n};\n\nexport const customElementHandler: ReplaceHandler = (node, ctx) => {\n const tone = CUSTOM_TAGS[node.name];\n if (!tone) return undefined;\n return (\n <div className={`my-4 rounded-wx-md border px-4 py-3 ${tone}`} data-custom-block={node.name}>\n {domToReact((node.children ?? []) as Parameters<typeof domToReact>[0], ctx.options)}\n </div>\n );\n};\n","/**\n * Slugify a heading's text content into an HTML id suitable for\n * `<a href=\"#…\">` linking. ASCII letters / digits + dashes only;\n * Unicode passes through `latin1` normalisation when available so\n * accented characters fold to their base letters.\n *\n * Deduped against ids we've already seen — Strapi posts routinely\n * carry repeated section names (\"Tips\", \"Conclusion\") that would\n * otherwise generate colliding ids.\n */\nexport function slugifyHeading(text: string, seen: Set<string>): string {\n const base =\n text\n .normalize(\"NFD\")\n .replace(/[̀-ͯ]/g, \"\") // strip combining marks\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\") || \"section\";\n let id = base;\n let i = 2;\n while (seen.has(id)) {\n id = `${base}-${i}`;\n i += 1;\n }\n seen.add(id);\n return id;\n}\n\nexport interface TocEntry {\n id: string;\n text: string;\n /** 1 for `<h1>`, 2 for `<h2>`, 3 for `<h3>`. */\n level: number;\n}\n","import { Element } from \"html-react-parser\";\n\n/**\n * Recursively collect the text content of a parsed element. Used to\n * derive heading slugs and tab labels from a node's children, skipping\n * element wrappers and concatenating only the raw text segments.\n */\nexport function extractText(node: Element): string {\n let out = \"\";\n for (const child of node.children ?? []) {\n if ((child as { type?: string }).type === \"text\") {\n out += (child as unknown as { data?: string }).data ?? \"\";\n } else if (child instanceof Element) {\n out += extractText(child);\n }\n }\n return out;\n}\n","import { domToReact } from \"html-react-parser\";\nimport { createElement } from \"react\";\nimport { slugifyHeading } from \"@/lib/article-toc\";\nimport { extractText } from \"../extract-text\";\nimport type { ReplaceHandler } from \"./types\";\n\n/**\n * Heading IDs + TOC collection. Slugify the text of every h1 / h2 / h3,\n * push onto the `entries` accumulator the context exposes, then render\n * the heading with the generated id so anchor links work. We only\n * collect 1-3 — h4+ rarely appears in operator content and would bloat\n * the dropdown. Empty-text headings fall through to the default mapping.\n */\nexport const headingHandler: ReplaceHandler = (node, ctx) => {\n if (node.name !== \"h1\" && node.name !== \"h2\" && node.name !== \"h3\") {\n return undefined;\n }\n const level = Number(node.name.slice(1));\n const text = extractText(node).trim();\n if (!text) return undefined;\n const id = slugifyHeading(text, ctx.seenIds);\n ctx.entries.push({ id, text, level });\n return createElement(\n node.name,\n { id },\n domToReact((node.children ?? []) as Parameters<typeof domToReact>[0], ctx.options),\n );\n};\n","import type { ReplaceHandler } from \"./types\";\n\n/**\n * `<img>` — honour width + alignment. The operator's resize/align\n * controls store `width` (as a `%` value) and `data-align`\n * (`left | center | right`). We translate those into a small alignment\n * scheme:\n * - `width: …` — explicit width via inline style.\n * - `data-align=left` — margin-right auto, image sits left.\n * - `data-align=right`— margin-left auto, image sits right.\n * - default / center — both margins auto.\n * Bare image — no border, no rounded corners. Keeps editorial\n * photography looking like itself; `<figure>` wraps still get the\n * framed treatment via the prose `[&_figure_img]` rule.\n */\nexport const imageHandler: ReplaceHandler = (node, ctx) => {\n if (node.name !== \"img\") return undefined;\n const attrs = node.attribs ?? {};\n const align = attrs[\"data-align\"] ?? \"center\";\n const width = attrs.width || attrs.style?.match(/width:\\s*([^;]+)/i)?.[1];\n const marginLeft = align === \"left\" ? \"0\" : align === \"right\" ? \"auto\" : \"auto\";\n const marginRight = align === \"right\" ? \"0\" : align === \"left\" ? \"auto\" : \"auto\";\n const src = attrs.src ?? \"\";\n const alt = attrs.alt ?? \"\";\n\n const style = {\n ...(width ? { width } : {}),\n marginLeft,\n marginRight,\n display: \"block\",\n } as const;\n\n // Clickable when the caller wired a lightbox controller (article\n // views). Register this image in document order and open the gallery\n // at its index on tap. Without a controller (chat-bubble bodies) the\n // image renders inert, exactly as before.\n if (ctx.images && ctx.onImageClick) {\n const index = ctx.images.length;\n ctx.images.push({ url: src, mimetype: \"image/jpeg\", alt });\n const onImageClick = ctx.onImageClick;\n return (\n <button\n type=\"button\"\n onClick={() => onImageClick(index)}\n className=\"my-3 block w-full cursor-zoom-in border-0 bg-transparent p-0\"\n aria-label={alt || \"Open image\"}\n >\n {/* biome-ignore lint/performance/noImgElement: operator/RSS article images have arbitrary dimensions + remote hosts; next/image needs known sizes + an allowlist and isn't viable here */}\n <img src={src} alt={alt} style={style} className=\"max-w-full\" />\n </button>\n );\n }\n\n return (\n // biome-ignore lint/performance/noImgElement: operator/RSS article images have arbitrary dimensions + remote hosts; next/image needs known sizes + an allowlist and isn't viable here\n <img src={src} alt={alt} style={style} className=\"my-3 max-w-full\" />\n );\n};\n","import { domToReact } from \"html-react-parser\";\nimport type { ReplaceHandler } from \"./types\";\n\n/**\n * `<a>` — always open externally with a safe `rel`. Any operator-set\n * `target` is stripped in favour of `_blank`.\n */\nexport const linkHandler: ReplaceHandler = (node, ctx) => {\n if (node.name !== \"a\") return undefined;\n const href = node.attribs?.href ?? \"\";\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-wx-primary underline underline-offset-2 transition-opacity hover:opacity-70\"\n >\n {domToReact((node.children ?? []) as Parameters<typeof domToReact>[0], ctx.options)}\n </a>\n );\n};\n","import { domToReact } from \"html-react-parser\";\nimport { cn } from \"@/lib/utils\";\nimport type { ReplaceHandler } from \"./types\";\n\n/**\n * `<table>` → wrapped in a slim horizontal-scroll container. The native\n * browser scrollbar reads as a chunky grey rectangle that fights the\n * widget's premium chrome, so we paint our own track + thumb via WebKit\n * pseudos (Blink + Safari) and a Firefox `scrollbar-color` fallback.\n * 8 px height + soft rounded thumb matches the shadcn ScrollArea look\n * used on the editor side. The original `<table>` (and its attributes)\n * passes through untouched.\n */\nexport const tableHandler: ReplaceHandler = (node, ctx) => {\n if (node.name !== \"table\") return undefined;\n return (\n <div\n className={cn(\n \"my-3 overflow-x-auto\",\n \"[scrollbar-width:thin] [scrollbar-color:var(--color-wx-fg-subtle)_transparent]\",\n \"[&::-webkit-scrollbar]:h-2\",\n \"[&::-webkit-scrollbar-track]:bg-transparent\",\n \"[&::-webkit-scrollbar-thumb]:rounded-full\",\n \"[&::-webkit-scrollbar-thumb]:bg-wx-fg-subtle/40\",\n \"[&::-webkit-scrollbar-thumb:hover]:bg-wx-fg-subtle/60\",\n )}\n >\n <table>\n {domToReact((node.children ?? []) as Parameters<typeof domToReact>[0], ctx.options)}\n </table>\n </div>\n );\n};\n","\"use client\";\n\nimport { useTranslations } from \"next-intl\";\nimport { type ReactNode, useState } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\n/**\n * Underline-indicator tab bar — Material / GitHub / Notion style.\n * Text-only triggers, the active one carries weight + a 2-px\n * brand-coloured underline that slides between tabs. Visually quiet but\n * very recognisable.\n *\n * Labels fall back to a translated \"Tab {n}\" when the source markup\n * didn't carry a `[data-tab-label]`.\n */\nexport function TabsBlock({ tabs }: { tabs: { label: string; body: ReactNode }[] }) {\n const t = useTranslations(\"article\");\n const [active, setActive] = useState(0);\n if (tabs.length === 0) return null;\n return (\n <div className=\"my-4\">\n {/* Underline-indicator tab bar — Material / GitHub / Notion\n style. Text-only triggers, active one carries weight + a\n 2-px brand-coloured underline that slides between tabs.\n Visually quiet but very recognisable. */}\n <div role=\"tablist\" className=\"relative flex items-center gap-1 border-b border-wx-border\">\n {tabs.map((tab, idx) => {\n const isActive = idx === active;\n const label = tab.label || t(\"tabFallback\", { n: idx + 1 });\n return (\n <button\n // biome-ignore lint/suspicious/noArrayIndexKey: tabs are parsed once from static markup — never reordered, inserted, or filtered, so the index is a stable key\n key={idx}\n type=\"button\"\n role=\"tab\"\n aria-selected={isActive}\n tabIndex={isActive ? 0 : -1}\n onClick={() => setActive(idx)}\n className={cn(\n \"group relative inline-flex items-center justify-center px-3 py-2 text-sm\",\n \"transition-colors focus-visible:outline-none\",\n isActive\n ? \"font-semibold text-wx-fg\"\n : \"font-medium text-wx-fg-muted hover:text-wx-fg\",\n )}\n >\n {label}\n {/* The underline. Always rendered (scale-x:0 when\n inactive) so the visitor sees it ease into the new\n position on click — no layout jump, just a slide.\n origin-left keeps the animation directional. */}\n <span\n aria-hidden=\"true\"\n className={cn(\n \"pointer-events-none absolute inset-x-2 bottom-0 h-[2px] origin-left rounded-full bg-wx-primary\",\n \"transition-transform duration-200 ease-out\",\n isActive ? \"scale-x-100\" : \"scale-x-0\",\n )}\n />\n </button>\n );\n })}\n </div>\n {/* Panel — no card frame; flows with prose. `mt-3` for visual\n separation from the underline. First/last margins inside\n stripped so paragraphs don't double-up against the tab bar\n or the next block below. */}\n <div className=\"mt-3 text-sm leading-relaxed text-wx-fg [&>:first-child]:mt-0 [&>:last-child]:mb-0\">\n {tabs[active]?.body}\n </div>\n </div>\n );\n}\n","import { domToReact, Element } from \"html-react-parser\";\nimport { TabsBlock } from \"../blocks/tabs-block\";\nimport { extractText } from \"../extract-text\";\nimport type { ReplaceHandler } from \"./types\";\n\n/**\n * `<div data-type=\"tabs\">` → `<TabsBlock>` with active-tab state. Each\n * child `<div data-type=\"tab\">` carries a label node (the\n * `[data-tab-label]` div) as its first child; everything else is body.\n * The empty-label fallback (\"Tab N\") is applied in `TabsBlock` so it\n * can be translated.\n */\nexport const tabsHandler: ReplaceHandler = (node, ctx) => {\n const isTabs =\n node.name === \"div\" &&\n (node.attribs?.[\"data-type\"] === \"tabs\" ||\n (node.attribs as Record<string, string> | undefined)?.[\"data-type\"] === \"tabs\");\n if (!isTabs) return undefined;\n\n const tabChildren = (node.children ?? []).filter(\n (child): child is Element =>\n child instanceof Element && child.name === \"div\" && child.attribs?.[\"data-type\"] === \"tab\",\n );\n const tabs = tabChildren.map((tabEl) => {\n // First child of each tab is the label node; the rest is body.\n const labelEl = tabEl.children?.find(\n (c): c is Element =>\n c instanceof Element && c.name === \"div\" && \"data-tab-label\" in (c.attribs ?? {}),\n );\n const bodyEls = (tabEl.children ?? []).filter((c) => c !== labelEl);\n const labelText = labelEl ? extractText(labelEl).trim() : \"\";\n return {\n label: labelText,\n body: <>{domToReact(bodyEls as Parameters<typeof domToReact>[0], ctx.options)}</>,\n };\n });\n return <TabsBlock tabs={tabs} />;\n};\n","import { Element, type HTMLReactParserOptions } from \"html-react-parser\";\nimport type { LightboxItem } from \"@/components/widget/tabs/messages-tab/message/media-lightbox\";\nimport type { TocEntry } from \"@/lib/article-toc\";\nimport { accordionHandler } from \"./build-options/accordion\";\nimport { customElementHandler } from \"./build-options/custom-element\";\nimport { headingHandler } from \"./build-options/heading\";\nimport { imageHandler } from \"./build-options/image\";\nimport { linkHandler } from \"./build-options/link\";\nimport { tableHandler } from \"./build-options/table\";\nimport { tabsHandler } from \"./build-options/tabs\";\nimport type { ReplaceContext, ReplaceHandler } from \"./build-options/types\";\n\n/**\n * Ordered tag → React mappings. Headings run first (they collect the\n * TOC), then the block-level custom mappings, then inline links. The\n * first handler to return a node wins; anything that returns `undefined`\n * falls through to the next handler and finally the parser's default\n * mapping (paragraphs, lists, code, figures, …).\n */\nconst HANDLERS: ReplaceHandler[] = [\n headingHandler,\n tabsHandler,\n accordionHandler,\n // Custom block-level tags like `<card>` / `<callout>` / `<note>` —\n // emitted by Tiptap \"info-box\" extensions on the authoring side.\n // Runs before the table / image / link handlers so a callout's\n // children still flow through them via the recursive `domToReact`.\n customElementHandler,\n tableHandler,\n imageHandler,\n linkHandler,\n];\n\n/**\n * Build the `html-react-parser` options. The `replace` callback recurses\n * through `domToReact`, which needs the same options reference back so\n * nested children also get the heading-id treatment + custom node\n * mappings — hence `options` is declared first, then its `replace`\n * assigned so the closure (and the handler context) share one identity.\n */\nexport function buildOptions(\n entries: TocEntry[],\n seenIds: Set<string>,\n images?: LightboxItem[],\n onImageClick?: (index: number) => void,\n): HTMLReactParserOptions {\n const options: HTMLReactParserOptions = {} as HTMLReactParserOptions;\n const ctx: ReplaceContext = { options, entries, seenIds, images, onImageClick };\n options.replace = (node) => {\n if (!(node instanceof Element)) return undefined;\n for (const handler of HANDLERS) {\n const result = handler(node, ctx);\n if (result !== undefined) return result;\n }\n return undefined;\n };\n return options;\n}\n","\"use client\";\n\nimport parse from \"html-react-parser\";\nimport { type ReactNode, useMemo, useState } from \"react\";\nimport {\n type LightboxItem,\n MediaLightbox,\n} from \"@/components/widget/tabs/messages-tab/message/media-lightbox\";\nimport type { TocEntry } from \"@/lib/article-toc\";\nimport { TableOfContents } from \"./blocks/table-of-contents\";\nimport { buildOptions } from \"./build-options\";\n\n/**\n * Renders operator-authored HTML (TipTap output) and RSS-ingested\n * `<content:encoded>` into a React tree, swapping selected tags for\n * proper React components.\n *\n * Why a parser instead of `dangerouslySetInnerHTML`: TipTap emits\n * custom blocks for tabs + accordions that need interactive state\n * (active tab, expand/collapse). Doing this with raw HTML + a DOM\n * walk in `useEffect` works but ties the markup to imperative\n * post-render mutations. Parsing once into React lets the same\n * components live alongside the rest of the widget tree, with full\n * styling and a11y at the React layer.\n *\n * Custom mappings live in `build-options/` — one file per tag:\n * - `<div data-type=\"tabs\">` → `TabsBlock` with active-tab state\n * - `<details>` / TipTap details → `AccordionBlock` with open state\n * - `<table>` → wrapped in a horizontal scroll container\n * - `<img>` → width + alignment honoured\n * - `<a>` → forced `target=\"_blank\" rel=\"noopener\"`\n * - `h1`/`h2`/`h3` → slugged id + pushed to the TOC\n *\n * Everything else falls through to the parser's default mapping\n * (paragraphs, lists, code, images, figures, …). Those land in the\n * surrounding `prose` class string for styling.\n */\nexport function ArticleHtml({ html, className }: { html: string; className?: string }) {\n // Parse once per render, building the TOC as a side effect of the\n // heading handler. Three+ headings warrant a dropdown; anything less\n // and the post is short enough to scroll without help.\n //\n // Memoised on `html`: `parse()` walks + transforms the whole markup\n // tree (real main-thread work), so we only redo it when the content\n // actually changes — not on every parent re-render. The `entries`\n // accumulator is filled as a side effect of parsing, so it's\n // returned from the same memo.\n // Index of the body image the visitor tapped (opens the lightbox), or\n // `null` when closed.\n const [lightboxIndex, setLightboxIndex] = useState<number | null>(null);\n\n const { parsed, entries, images } = useMemo(() => {\n const collected: TocEntry[] = [];\n const seenIds = new Set<string>();\n const imgs: LightboxItem[] = [];\n const tree = parse(html, buildOptions(collected, seenIds, imgs, setLightboxIndex));\n return { parsed: tree, entries: collected, images: imgs };\n }, [html]);\n\n return (\n <div className={className}>\n {entries.length >= 3 && <TableOfContents entries={entries} />}\n {parsed}\n {images.length > 0 && (\n // Body images open the same full-screen gallery as chat media —\n // tap to zoom, arrow / swipe to move between every image in the\n // article.\n <MediaLightbox\n items={images}\n initialIndex={lightboxIndex ?? 0}\n open={lightboxIndex !== null}\n onClose={() => setLightboxIndex(null)}\n />\n )}\n </div>\n );\n}\n\n/**\n * Standalone version of the parser for callers that don't need a TOC\n * (chat-message body rendering, peek previews). Skips the heading\n * collector closure so it stays a pure transform.\n */\nexport function parseArticleHtml(html: string): ReactNode {\n const noop: TocEntry[] = [];\n const seen = new Set<string>();\n return parse(html, buildOptions(noop, seen));\n}\n","\"use client\";\n\nimport ReactMarkdown from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport { ARTICLE_PROSE_CLASSES } from \"@/lib/article-prose\";\nimport { ArticleHtml } from \"./article-html\";\n\n/**\n * Shared prose container for the help + news article bodies (they had\n * near-identical copies).\n *\n * HTML content goes through `ArticleHtml`, which parses the markup into\n * a React tree (tabs, accordions, table-scroll wrapper, links). Markdown\n * content keeps the `react-markdown` + `remark-gfm` pipeline so RSS feeds\n * that ship plain markdown still render.\n *\n * The HTML path always pins `mt-0`; the markdown path's top margin is the\n * only per-surface difference (help `mt-5`, news `mt-3`), so the caller\n * passes just that margin class — every other prose class is identical.\n */\nexport function ArticleBody({\n content,\n isHtml,\n markdownMarginClass,\n}: {\n content: string;\n isHtml: boolean;\n markdownMarginClass: string;\n}) {\n if (isHtml) {\n return <ArticleHtml html={content} className={`mt-0 ${ARTICLE_PROSE_CLASSES}`} />;\n }\n return (\n <div className={`${markdownMarginClass} ${ARTICLE_PROSE_CLASSES}`}>\n <ReactMarkdown remarkPlugins={[remarkGfm]}>{content}</ReactMarkdown>\n </div>\n );\n}\n","/**\n * Human-readable autonym for a BCP-47 locale code — the language's\n * name written in its OWN language/script:\n * \"en\" → \"English\"\n * \"uk\" → \"Українська\"\n * \"de-DE\" → \"Deutsch\"\n *\n * Uses the platform `Intl.DisplayNames` (available in every browser\n * the widget targets + Node) resolved IN the target locale, so each\n * chip reads natively. Falls back to the uppercased base code when the\n * runtime can't resolve the name (unknown / malformed code).\n */\nexport function languageName(locale: string): string {\n const base = locale.split(\"-\")[0];\n try {\n const dn = new Intl.DisplayNames([locale], { type: \"language\" });\n const name = dn.of(base);\n // `Intl.DisplayNames.of` returns the input code unchanged when it\n // can't resolve it — treat that as a miss and fall through.\n if (name && name.toLowerCase() !== base.toLowerCase()) {\n return name.charAt(0).toUpperCase() + name.slice(1);\n }\n } catch {\n // Older runtime without Intl.DisplayNames — fall through.\n }\n return base.toUpperCase();\n}\n","\"use client\";\n\nimport { Check, ChevronDown, Globe } from \"lucide-react\";\nimport { AnimatePresence, motion } from \"motion/react\";\nimport { useTranslations } from \"next-intl\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport { languageName } from \"./helpers\";\n\ninterface LanguageSelectorProps {\n /** Locale of the article currently on screen — its row renders with a\n * check and the trigger shows its name. */\n currentLocale: string;\n /** Every published locale variant of the article, INCLUDING the\n * current one. The selector hides itself when there's nothing to\n * switch to (a single language). */\n locales: string[];\n /** Visitor picked a language → switch to that variant. */\n onSelect: (locale: string) => void;\n className?: string;\n}\n\n/**\n * Below-article language switcher (Help + News). A compact dropdown:\n * the trigger shows the current language; opening it lists every\n * published locale variant. Picking one switches the article to that\n * language (article-scoped — it never changes the widget's own locale).\n * Hidden entirely when the article exists in only one language.\n *\n * Language labels come from `Intl.DisplayNames` (each shown in its own\n * script) — no per-language i18n keys to maintain. Only the section\n * heading is translated.\n */\nexport function LanguageSelector({\n currentLocale,\n locales,\n onSelect,\n className,\n}: LanguageSelectorProps) {\n const t = useTranslations(\"languageSelector\");\n const [open, setOpen] = useState(false);\n const rootRef = useRef<HTMLDivElement>(null);\n\n // Close on outside-click + Escape. Bound only while open.\n useEffect(() => {\n if (!open) return;\n const onPointer = (e: MouseEvent) => {\n if (rootRef.current && !rootRef.current.contains(e.target as Node)) setOpen(false);\n };\n const onKey = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") setOpen(false);\n };\n document.addEventListener(\"mousedown\", onPointer);\n document.addEventListener(\"keydown\", onKey);\n return () => {\n document.removeEventListener(\"mousedown\", onPointer);\n document.removeEventListener(\"keydown\", onKey);\n };\n }, [open]);\n\n // De-dupe defensively and bail when there's only one language.\n const unique = Array.from(new Set(locales.filter(Boolean)));\n if (unique.length <= 1) return null;\n const currentBase = currentLocale.split(\"-\")[0].toLowerCase();\n\n return (\n <div ref={rootRef} className={cn(\"relative\", className)}>\n <p className=\"mb-1.5 text-xs font-semibold tracking-wide text-wx-fg-muted uppercase\">\n {t(\"title\")}\n </p>\n <button\n type=\"button\"\n onClick={() => setOpen((o) => !o)}\n aria-haspopup=\"listbox\"\n aria-expanded={open}\n aria-label={t(\"ariaLabel\")}\n className={cn(\n \"flex w-full items-center gap-2 rounded-wx-sm border border-wx-border bg-wx-bg px-3 py-2\",\n \"text-sm font-medium text-wx-fg transition-colors hover:bg-wx-bg-elevated\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary\",\n )}\n >\n <Globe size={15} className=\"shrink-0 text-wx-fg-muted\" />\n <span className=\"min-w-0 flex-1 truncate text-left\">{languageName(currentLocale)}</span>\n <ChevronDown\n size={15}\n className={cn(\"shrink-0 text-wx-fg-subtle transition-transform\", open && \"rotate-180\")}\n />\n </button>\n\n <AnimatePresence>\n {open && (\n <motion.ul\n initial={{ opacity: 0, y: 4 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: 4 }}\n transition={{ duration: 0.14 }}\n // Opens upward — the selector sits low in the article, so a\n // downward menu would clip against the related/footer rows.\n className={cn(\n \"absolute bottom-full left-0 z-20 mb-1 max-h-56 w-full overflow-auto\",\n \"rounded-wx-sm border border-wx-border bg-wx-bg py-1 shadow-[0_12px_32px_rgba(0,0,0,0.16)]\",\n )}\n role=\"listbox\"\n >\n {unique.map((loc) => {\n const active = loc.split(\"-\")[0].toLowerCase() === currentBase;\n return (\n <li key={loc}>\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={active}\n onClick={() => {\n onSelect(loc);\n setOpen(false);\n }}\n className={cn(\n \"flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors\",\n active\n ? \"font-semibold text-wx-primary\"\n : \"text-wx-fg hover:bg-wx-bg-elevated\",\n )}\n >\n <span className=\"min-w-0 flex-1 truncate\">{languageName(loc)}</span>\n {active && <Check size={15} className=\"shrink-0 text-wx-primary\" />}\n </button>\n </li>\n );\n })}\n </motion.ul>\n )}\n </AnimatePresence>\n </div>\n );\n}\n","/* eslint-disable */\n/* biome-disable */\n/** Internal type. DO NOT USE DIRECTLY. */\ntype Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\n/** Internal type. DO NOT USE DIRECTLY. */\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\nimport * as Types from '@/lib/graphql/generated/types';\n\nimport { gql } from '@apollo/client';\nimport * as Apollo from '@apollo/client';\nconst defaultOptions = {} as const;\n/** Optional sentiment tag per reaction slot — drives the derived \"% positive\" score. Defaults to NEUTRAL. */\nexport type ReactionSentiment =\n | 'NEGATIVE'\n | 'NEUTRAL'\n | 'POSITIVE';\n\n/** Surface a ReactionSet applies to — News posts or Help articles. */\nexport type ReactionSurface =\n | 'HELP'\n | 'NEWS';\n\nexport type VisitorReactionInput = {\n itemId: string | number;\n slotIndex: number;\n surface: ReactionSurface;\n};\n\nexport type VisitorReactionSetQueryVariables = Exact<{\n surface: Types.ReactionSurface;\n}>;\n\n\nexport type VisitorReactionSetQuery = { __typename: 'Query', visitorReactionSet: { __typename: 'ReactionSet', _id: string, surface: Types.ReactionSurface, enabled: boolean, slots: Array<{ __typename: 'ReactionSlot', slotIndex: number, emoji: string, sentiment: Types.ReactionSentiment }> } };\n\nexport type SubmitVisitorReactionMutationVariables = Exact<{\n input: Types.VisitorReactionInput;\n}>;\n\n\nexport type SubmitVisitorReactionMutation = { __typename: 'Mutation', submitVisitorReaction: { __typename: 'WebOkResponse', ok: boolean } };\n\n\nexport const VisitorReactionSetDocument = gql`\n query VisitorReactionSet($surface: ReactionSurface!) {\n visitorReactionSet(surface: $surface) {\n _id\n surface\n enabled\n slots {\n slotIndex\n emoji\n sentiment\n }\n }\n}\n `;\n\n/**\n * __useVisitorReactionSetQuery__\n *\n * To run a query within a React component, call `useVisitorReactionSetQuery` and pass it any options that fit your needs.\n * When your component renders, `useVisitorReactionSetQuery` returns an object from Apollo Client that contains loading, error, and data properties\n * you can use to render your UI.\n *\n * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;\n *\n * @example\n * const { data, loading, error } = useVisitorReactionSetQuery({\n * variables: {\n * surface: // value for 'surface'\n * },\n * });\n */\nexport function useVisitorReactionSetQuery(baseOptions: Apollo.QueryHookOptions<VisitorReactionSetQuery, VisitorReactionSetQueryVariables> & ({ variables: VisitorReactionSetQueryVariables; skip?: boolean; } | { skip: boolean; }) ) {\n const options = {...defaultOptions, ...baseOptions}\n return Apollo.useQuery<VisitorReactionSetQuery, VisitorReactionSetQueryVariables>(VisitorReactionSetDocument, options);\n }\nexport function useVisitorReactionSetLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<VisitorReactionSetQuery, VisitorReactionSetQueryVariables>) {\n const options = {...defaultOptions, ...baseOptions}\n return Apollo.useLazyQuery<VisitorReactionSetQuery, VisitorReactionSetQueryVariables>(VisitorReactionSetDocument, options);\n }\n// @ts-ignore\nexport function useVisitorReactionSetSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions<VisitorReactionSetQuery, VisitorReactionSetQueryVariables>): Apollo.UseSuspenseQueryResult<VisitorReactionSetQuery, VisitorReactionSetQueryVariables>;\nexport function useVisitorReactionSetSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<VisitorReactionSetQuery, VisitorReactionSetQueryVariables>): Apollo.UseSuspenseQueryResult<VisitorReactionSetQuery | undefined, VisitorReactionSetQueryVariables>;\nexport function useVisitorReactionSetSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<VisitorReactionSetQuery, VisitorReactionSetQueryVariables>) {\n const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}\n return Apollo.useSuspenseQuery<VisitorReactionSetQuery, VisitorReactionSetQueryVariables>(VisitorReactionSetDocument, options);\n }\nexport type VisitorReactionSetQueryHookResult = ReturnType<typeof useVisitorReactionSetQuery>;\nexport type VisitorReactionSetLazyQueryHookResult = ReturnType<typeof useVisitorReactionSetLazyQuery>;\nexport type VisitorReactionSetSuspenseQueryHookResult = ReturnType<typeof useVisitorReactionSetSuspenseQuery>;\nexport type VisitorReactionSetQueryResult = Apollo.QueryResult<VisitorReactionSetQuery, VisitorReactionSetQueryVariables>;\nexport const SubmitVisitorReactionDocument = gql`\n mutation SubmitVisitorReaction($input: VisitorReactionInput!) {\n submitVisitorReaction(input: $input) {\n ok\n }\n}\n `;\nexport type SubmitVisitorReactionMutationFn = Apollo.MutationFunction<SubmitVisitorReactionMutation, SubmitVisitorReactionMutationVariables>;\n\n/**\n * __useSubmitVisitorReactionMutation__\n *\n * To run a mutation, you first call `useSubmitVisitorReactionMutation` within a React component and pass it any options that fit your needs.\n * When your component renders, `useSubmitVisitorReactionMutation` returns a tuple that includes:\n * - A mutate function that you can call at any time to execute the mutation\n * - An object with fields that represent the current status of the mutation's execution\n *\n * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;\n *\n * @example\n * const [submitVisitorReactionMutation, { data, loading, error }] = useSubmitVisitorReactionMutation({\n * variables: {\n * input: // value for 'input'\n * },\n * });\n */\nexport function useSubmitVisitorReactionMutation(baseOptions?: Apollo.MutationHookOptions<SubmitVisitorReactionMutation, SubmitVisitorReactionMutationVariables>) {\n const options = {...defaultOptions, ...baseOptions}\n return Apollo.useMutation<SubmitVisitorReactionMutation, SubmitVisitorReactionMutationVariables>(SubmitVisitorReactionDocument, options);\n }\nexport type SubmitVisitorReactionMutationHookResult = ReturnType<typeof useSubmitVisitorReactionMutation>;\nexport type SubmitVisitorReactionMutationResult = Apollo.MutationResult<SubmitVisitorReactionMutation>;\nexport type SubmitVisitorReactionMutationOptions = Apollo.BaseMutationOptions<SubmitVisitorReactionMutation, SubmitVisitorReactionMutationVariables>;","\"use client\";\n\nimport { useApolloClient } from \"@apollo/client/react\";\nimport { motion } from \"motion/react\";\nimport { useTranslations } from \"next-intl\";\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { ReactionSurface } from \"@/lib/graphql/generated/types\";\nimport {\n useSubmitVisitorReactionMutation,\n useVisitorReactionSetQuery,\n} from \"@/lib/graphql/queries/generated/reactions.generated\";\nimport { cn } from \"@/lib/utils\";\n\ninterface ReactionBarProps {\n /** Which surface the operator's palette comes from. */\n surface: ReactionSurface;\n /** Article / post id the vote attaches to. */\n itemId: string;\n /** The visitor's OWN current reaction slotIndex on this item's\n * translation group, from the BE (`viewerReaction` on the read query),\n * or `null` when they haven't reacted. Authoritative in real mode —\n * drives the active-emoji highlight, per-group + cross-device (once\n * verified). Ignored in demo mode (no BE → localStorage instead). */\n viewerReaction?: number | null;\n /** Every cache id in this item's translation group (the item itself +\n * its locale variants' ids). A reaction is per-GROUP on the BE, so each\n * variant is a separate Apollo cache entry that must be updated together\n * — otherwise switching locales shows a stale highlight/count until\n * reload. Defaults to just `[itemId]`. */\n groupItemIds?: string[];\n /** Sparse `{ [slotIndex]: count }` map fetched alongside the entity.\n * Operator may have removed a slot since the visitor last voted —\n * stranded counts are ignored at render time (only slots present\n * in the active set show up). */\n reactionCounts?: Record<string, number> | null;\n /** Disables submission (dummy mode + dashboard preview). The bar\n * still renders with current counts so the operator sees the UX. */\n readonly?: boolean;\n /** Demo / dashboard-preview mode. Skips the live `reactionSet`\n * config query (no network in demo) and renders a default emoji\n * palette so the marketing/preview surface still shows the bar. */\n isDummy?: boolean;\n /** Operator's `messenger.showReactionCounts` toggle. When `false`,\n * the bar still renders and remains tappable, but the per-emoji\n * numeric tally next to each button is hidden. Defaults to `true`. */\n showCounts?: boolean;\n className?: string;\n}\n\n/** DEMO-ONLY local-storage key for the visitor's pick. In real mode the\n * BE is the source of truth (`viewerReaction` on the read query), so we\n * don't persist anything client-side. Demo has no BE, so it remembers the\n * pick here to keep the active highlight across the session. */\nconst STORAGE_KEY = (surface: ReactionSurface, itemId: string) =>\n `wexio:reaction:${surface}:${itemId}`;\n\n/** Default palette shown in demo / preview mode so the bar is visible\n * without firing the live `reactionSet` query. Mirrors the BE's seed\n * defaults (🎉 / ❤️ / 👍). */\nconst DEMO_REACTION_SLOTS: { slotIndex: number; emoji: string }[] = [\n { slotIndex: 0, emoji: \"🎉\" },\n { slotIndex: 1, emoji: \"❤️\" },\n { slotIndex: 2, emoji: \"👍\" },\n];\n\n/** Reaction surface → the GraphQL `__typename` of the entity it attaches\n * to. Used to address the right normalized cache entries when fanning a\n * vote out across a translation group. */\nconst REACTION_TYPENAME: Record<ReactionSurface, string> = {\n [ReactionSurface.NEWS]: \"NewsPost\",\n [ReactionSurface.HELP]: \"HelpArticle\",\n};\n\n/**\n * Operator-configured emoji reaction palette. Fetches\n * `reactionSet(surface)` once (cached at the Apollo level — emoji\n * palette is org-wide and rarely changes), renders one button per\n * enabled slot, and submits via `submitVisitorReaction`.\n *\n * Visitor semantics: one vote per item (per translation group), lifetime.\n * Re-tap same slot = no-op. Tap a different slot moves the vote (BE\n * decrements prior, increments new). The active highlight comes from the\n * BE's `viewerReaction` (authoritative, cross-device once verified) — the\n * `viewerReaction` prop. Demo mode falls back to `localStorage`.\n */\nexport function ReactionBar({\n surface,\n itemId,\n reactionCounts,\n viewerReaction,\n groupItemIds,\n readonly = false,\n showCounts = true,\n isDummy = false,\n className,\n}: ReactionBarProps) {\n const t = useTranslations(\"reactions\");\n const client = useApolloClient();\n\n const { data, loading } = useVisitorReactionSetQuery({\n variables: { surface },\n fetchPolicy: \"cache-first\",\n // Demo / preview: render the default palette without a network\n // round-trip. The live query is operator-config that demo doesn't\n // have, so firing it would be a pointless request.\n skip: isDummy,\n });\n const [submit, { loading: submitting }] = useSubmitVisitorReactionMutation();\n\n const slots: { slotIndex: number; emoji: string }[] = useMemo(\n () => (isDummy ? DEMO_REACTION_SLOTS : (data?.visitorReactionSet?.slots ?? [])),\n [isDummy, data],\n );\n const enabled = isDummy ? true : (data?.visitorReactionSet?.enabled ?? true);\n\n // The visitor's current pick. `null` = no vote yet; otherwise the\n // slotIndex. Real mode seeds from the BE's `viewerReaction` (canonical,\n // per translation group, cross-device once verified). Demo mode has no\n // BE, so it remembers the pick in localStorage for the session.\n const storageKey = STORAGE_KEY(surface, itemId);\n const [pickedSlot, setPickedSlot] = useState<number | null>(null);\n useEffect(() => {\n if (!isDummy) {\n setPickedSlot(viewerReaction ?? null);\n return;\n }\n if (typeof window === \"undefined\") return;\n const raw = window.localStorage.getItem(storageKey);\n setPickedSlot(raw === null ? null : Number(raw));\n }, [isDummy, storageKey, viewerReaction]);\n\n // Demo-only optimistic counts. Real mode drives counts through the\n // Apollo cache (so every locale variant in the translation group stays\n // in sync), so it doesn't use this local delta.\n const [optimisticCounts, setOptimisticCounts] = useState<Record<number, number>>({});\n const countFor = (slotIndex: number): number => {\n const base =\n (reactionCounts as Record<string, number> | null | undefined)?.[String(slotIndex)] ?? 0;\n return base + (isDummy ? (optimisticCounts[slotIndex] ?? 0) : 0);\n };\n\n // Move the visitor's vote in the cache for EVERY id in the translation\n // group: set `viewerReaction = to`, `+1` on `to`, `-1` on `from`. Reads\n // (single / list / related) of any variant re-render from this, so the\n // highlight + counts stay correct across locale switches without a\n // refetch. Passing `from`/`to` swapped reverts the move.\n const applyVoteToCache = useCallback(\n (from: number | null, to: number | null) => {\n const typename = REACTION_TYPENAME[surface];\n const ids = groupItemIds?.length ? groupItemIds : [itemId];\n for (const id of ids) {\n const cacheId = client.cache.identify({ __typename: typename, _id: id });\n if (!cacheId) continue;\n client.cache.modify({\n id: cacheId,\n fields: {\n viewerReaction: () => to,\n // Apollo types a JSON-scalar field's value broadly\n // (Reference | StoreObject); it's actually our `{ slot: count }`\n // map. Cast in, return a plain map out.\n reactionCounts: (existing: unknown) => {\n const next = { ...((existing as Record<string, number> | null) ?? {}) };\n if (to !== null) next[to] = (next[to] ?? 0) + 1;\n if (from !== null) next[from] = Math.max(0, (next[from] ?? 0) - 1);\n return next;\n },\n },\n });\n }\n },\n [client, surface, groupItemIds, itemId],\n );\n\n const handleTap = async (slotIndex: number) => {\n if (readonly || submitting) return;\n if (pickedSlot === slotIndex) return; // no-op on re-tap\n const prior = pickedSlot;\n setPickedSlot(slotIndex);\n\n // Demo / preview: no BE — persist the pick locally + apply the local\n // optimistic count delta. The bar stays fully interactive.\n if (isDummy) {\n if (typeof window !== \"undefined\") {\n window.localStorage.setItem(storageKey, String(slotIndex));\n }\n setOptimisticCounts((prev) => ({\n ...prev,\n [slotIndex]: (prev[slotIndex] ?? 0) + 1,\n ...(prior !== null ? { [prior]: (prev[prior] ?? 0) - 1 } : {}),\n }));\n return;\n }\n\n // Real: fan the vote into the cache for the whole group, then submit.\n // Roll the cache back on failure.\n applyVoteToCache(prior, slotIndex);\n try {\n await submit({ variables: { input: { surface, itemId, slotIndex } } });\n } catch {\n applyVoteToCache(slotIndex, prior);\n setPickedSlot(prior);\n }\n };\n\n // Operator disabled reactions for this surface, or set is still\n // loading on the first render → don't paint anything yet.\n if (loading || !enabled || slots.length === 0) return null;\n\n return (\n // biome-ignore lint/a11y/useSemanticElements: `<fieldset>` carries default border/margin chrome that would alter this inline strip's layout — a div with role=\"group\" is the intended, style-neutral grouping\n <div\n className={cn(\n // Center-aligned, transparent strip — sits inline with the\n // article content (no panel chrome). Larger emoji + tap\n // surface than the list-card chip variant.\n \"flex flex-wrap items-center justify-center gap-2\",\n className,\n )}\n role=\"group\"\n aria-label={t(\"ariaLabel\")}\n >\n {slots.map((slot) => {\n const active = pickedSlot === slot.slotIndex;\n const count = countFor(slot.slotIndex);\n return (\n <motion.button\n key={slot.slotIndex}\n type=\"button\"\n disabled={readonly || submitting}\n onClick={() => void handleTap(slot.slotIndex)}\n whileTap={{ scale: 0.9 }}\n whileHover={{ scale: 1.06 }}\n transition={{ type: \"spring\", stiffness: 400, damping: 18 }}\n className={cn(\n \"flex items-center gap-1.5 rounded-full px-3 py-1.5 text-2xl leading-none transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary\",\n active ? \"bg-wx-primary/10 ring-1 ring-wx-primary/40\" : \"hover:bg-wx-bg-elevated\",\n readonly && \"cursor-default opacity-70\",\n )}\n aria-pressed={active}\n aria-label={t(\"tapAria\", { emoji: slot.emoji })}\n >\n <span aria-hidden=\"true\">{slot.emoji}</span>\n {showCounts && count > 0 && (\n <span className=\"text-xs font-medium text-wx-fg-muted\">{count}</span>\n )}\n </motion.button>\n );\n })}\n </div>\n );\n}\n"],"x_google_ignoreList":[0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,197,198,199,200,201,202,203,204,205,206,207],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAcM,IAAQ,EAAiB,SAAS;CAJtC,CAAC,UAAU;EAAE,IAAI;EAAM,IAAI;EAAM,GAAG;EAAM,KAAK;EAAU,CAAC;CAC1D,CAAC,QAAQ;EAAE,GAAG;EAAmD,KAAK;EAAU,CAAC;CACjF,CAAC,QAAQ;EAAE,GAAG;EAAY,KAAK;EAAU,CAAC;CAEJ,CAAW;;;ACInD,SAAgB,GAAc,GAA6C;CACzE,IAAI,CAAC,GAAS,OAAO;CACrB,IAAM,IAAS,EAAQ,WAAW,CAAC,MAAM,GAAG,IAAI;CAGhD,OAAO,yBAAyB,KAAK,EAAO;;;;;ACynG9C,IAAA,KAAA,yBAAA,GAAA;;OAg3JA,IAAA,yBAAA,GAAA;;;;;AC9+PA,SAAgB,GACd,GACA,GACM;CACN,QAAgB;EACT,OAEL,OADI,KAAO,EAAgB,EAAM,QACpB,EAAgB,KAAK;IACjC,CAAC,GAAO,EAAgB,CAAC;;;;ACf9B,IAAa,KAAe,CAAC,MAAM,KAAK;AAIxC,eAAe,GAAe,GAAkD;CAC9E,QAAQ,GAAR;EACE,KAAK,MACH,QAAQ,MAAM,OAAO,8BAAA,MAAA,MAAA,EAAA,EAAA,EAA4B;EACnD,SACE,QAAQ,MAAM,OAAO,8BAAA,MAAA,MAAA,EAAA,EAAA,EAA4B;;;AAYvD,SAAgB,GAAc,GAAwD;CACpF,QAAQ,MAAyB;EAC/B,IAAI,IAAkB;EACtB,KAAK,IAAM,KAAW,EAAI,MAAM,IAAI,EAClC,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