@deepseek-ai/dsh-client-ui-primitives 0.2.2-alpha.3 → 0.2.2-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +16 -16
- package/README.md +21 -14
- package/README.zh.md +21 -14
- package/lib/HoverCard.module.css +8 -3
- package/lib/JsonTree.module.css +7 -17
- package/lib/Menu.module.css +157 -37
- package/lib/Modal.module.css +16 -0
- package/lib/QuotePreview.module.css +37 -0
- package/lib/RiskConfirmation.module.css +11 -37
- package/lib/Toast.module.css +2 -3
- package/lib/Tooltip.module.css +2 -1
- package/lib/index.js +1447 -776
- package/lib/index.js.map +1 -0
- package/lib/markdown/CodeBlock.module.css +64 -0
- package/lib/markdown/MarkdownText.module.css +20 -1
- package/lib/types/AnimatedRows.d.ts +3 -0
- package/lib/types/AnimatedRows.d.ts.map +1 -0
- package/lib/types/AnimatedRows.js.map +1 -0
- package/lib/types/BrandWordmark.d.ts.map +1 -0
- package/lib/types/BrandWordmark.js.map +1 -0
- package/lib/types/Button.d.ts.map +1 -0
- package/lib/types/Button.js.map +1 -0
- package/lib/types/Checkbox.d.ts +3 -1
- package/lib/types/Checkbox.d.ts.map +1 -0
- package/lib/types/Checkbox.js.map +1 -0
- package/lib/types/CodeFileIcon.d.ts.map +1 -0
- package/lib/types/CodeFileIcon.js.map +1 -0
- package/lib/types/CodeToolbar.d.ts.map +1 -0
- package/lib/types/CodeToolbar.js.map +1 -0
- package/lib/types/CommandText.d.ts.map +1 -0
- package/lib/types/CommandText.js.map +1 -0
- package/lib/types/ConfigField.d.ts.map +1 -0
- package/lib/types/ConfigField.js.map +1 -0
- package/lib/types/ConnectionIndicator.d.ts.map +1 -0
- package/lib/types/ConnectionIndicator.js.map +1 -0
- package/lib/types/DetailDocument.d.ts.map +1 -0
- package/lib/types/DetailDocument.js.map +1 -0
- package/lib/types/DiffBlock.d.ts.map +1 -0
- package/lib/types/DiffBlock.js.map +1 -0
- package/lib/types/DisclosureRow.d.ts.map +1 -0
- package/lib/types/DisclosureRow.js.map +1 -0
- package/lib/types/DraggableImage.d.ts.map +1 -0
- package/lib/types/DraggableImage.js.map +1 -0
- package/lib/types/FileTypeIcon.d.ts.map +1 -0
- package/lib/types/FileTypeIcon.js.map +1 -0
- package/lib/types/FishLogo.d.ts.map +1 -0
- package/lib/types/FishLogo.js.map +1 -0
- package/lib/types/FoldToggle.d.ts.map +1 -0
- package/lib/types/FoldToggle.js.map +1 -0
- package/lib/types/HoverCard.d.ts.map +1 -0
- package/lib/types/HoverCard.js.map +1 -0
- package/lib/types/HoverCardGroup.d.ts.map +1 -0
- package/lib/types/HoverCardGroup.js.map +1 -0
- package/lib/types/ImageLightbox.d.ts.map +1 -0
- package/lib/types/ImageLightbox.js.map +1 -0
- package/lib/types/ImagePreview.d.ts.map +1 -0
- package/lib/types/ImagePreview.js.map +1 -0
- package/lib/types/InlineEditor.d.ts.map +1 -0
- package/lib/types/InlineEditor.js.map +1 -0
- package/lib/types/Input.d.ts.map +1 -0
- package/lib/types/Input.js.map +1 -0
- package/lib/types/JsonTree.d.ts.map +1 -0
- package/lib/types/JsonTree.js.map +1 -0
- package/lib/types/LinkIcon.d.ts.map +1 -0
- package/lib/types/LinkIcon.js.map +1 -0
- package/lib/types/Menu.d.ts +26 -14
- package/lib/types/Menu.d.ts.map +1 -0
- package/lib/types/Menu.js.map +1 -0
- package/lib/types/MenuGroup.d.ts.map +1 -0
- package/lib/types/MenuGroup.js.map +1 -0
- package/lib/types/MenuRow.d.ts +37 -0
- package/lib/types/MenuRow.d.ts.map +1 -0
- package/lib/types/MenuRow.js.map +1 -0
- package/lib/types/MenuSurface.d.ts.map +1 -0
- package/lib/types/MenuSurface.js.map +1 -0
- package/lib/types/Modal.d.ts +3 -1
- package/lib/types/Modal.d.ts.map +1 -0
- package/lib/types/Modal.js.map +1 -0
- package/lib/types/PathLabel.d.ts.map +1 -0
- package/lib/types/PathLabel.js.map +1 -0
- package/lib/types/PermissionIcon.d.ts.map +1 -0
- package/lib/types/PermissionIcon.js.map +1 -0
- package/lib/types/Pill.d.ts.map +1 -0
- package/lib/types/Pill.js.map +1 -0
- package/lib/types/QuotePreview.d.ts +17 -4
- package/lib/types/QuotePreview.d.ts.map +1 -0
- package/lib/types/QuotePreview.js.map +1 -0
- package/lib/types/ReadBlock.d.ts.map +1 -0
- package/lib/types/ReadBlock.js.map +1 -0
- package/lib/types/ReferenceIcon.d.ts.map +1 -0
- package/lib/types/ReferenceIcon.js.map +1 -0
- package/lib/types/RiskConfirmation.d.ts.map +1 -0
- package/lib/types/RiskConfirmation.js.map +1 -0
- package/lib/types/SearchBlock.d.ts.map +1 -0
- package/lib/types/SearchBlock.js.map +1 -0
- package/lib/types/SegmentedControl.d.ts.map +1 -0
- package/lib/types/SegmentedControl.js.map +1 -0
- package/lib/types/SegmentedTabs.d.ts.map +1 -0
- package/lib/types/SegmentedTabs.js.map +1 -0
- package/lib/types/ShortcutKeys.d.ts.map +1 -0
- package/lib/types/ShortcutKeys.js.map +1 -0
- package/lib/types/SiteGlyph.d.ts.map +1 -0
- package/lib/types/SiteGlyph.js.map +1 -0
- package/lib/types/StateDot.d.ts.map +1 -0
- package/lib/types/StateDot.js.map +1 -0
- package/lib/types/SubmenuPanel.d.ts +19 -0
- package/lib/types/SubmenuPanel.d.ts.map +1 -0
- package/lib/types/SubmenuPanel.js.map +1 -0
- package/lib/types/Switch.d.ts.map +1 -0
- package/lib/types/Switch.js.map +1 -0
- package/lib/types/Tag.d.ts.map +1 -0
- package/lib/types/Tag.js.map +1 -0
- package/lib/types/TerminalBlock.d.ts.map +1 -0
- package/lib/types/TerminalBlock.js.map +1 -0
- package/lib/types/TextShimmer.d.ts.map +1 -0
- package/lib/types/TextShimmer.js.map +1 -0
- package/lib/types/Toast.d.ts.map +1 -0
- package/lib/types/Toast.js.map +1 -0
- package/lib/types/Tooltip.d.ts.map +1 -0
- package/lib/types/Tooltip.js.map +1 -0
- package/lib/types/UserMessageBubble.d.ts.map +1 -0
- package/lib/types/UserMessageBubble.js.map +1 -0
- package/lib/types/WebBlock.d.ts.map +1 -0
- package/lib/types/WebBlock.js.map +1 -0
- package/lib/types/ZoomControls.d.ts.map +1 -0
- package/lib/types/ZoomControls.js.map +1 -0
- package/lib/types/ansi.d.ts.map +1 -0
- package/lib/types/ansi.js.map +1 -0
- package/lib/types/clipboard.d.ts.map +1 -0
- package/lib/types/clipboard.js.map +1 -0
- package/lib/types/code-file-icon-artwork.d.ts.map +1 -0
- package/lib/types/code-file-icon-artwork.js.map +1 -0
- package/lib/types/code-file-types.d.ts.map +1 -0
- package/lib/types/code-file-types.js.map +1 -0
- package/lib/types/code-highlighting.d.ts.map +1 -0
- package/lib/types/code-highlighting.js.map +1 -0
- package/lib/types/darwin-desktop.d.ts.map +1 -0
- package/lib/types/darwin-desktop.js.map +1 -0
- package/lib/types/document-zoom.d.ts.map +1 -0
- package/lib/types/document-zoom.js.map +1 -0
- package/lib/types/file-drag-actions.d.ts.map +1 -0
- package/lib/types/file-drag-actions.js.map +1 -0
- package/lib/types/file-size.d.ts.map +1 -0
- package/lib/types/file-size.js.map +1 -0
- package/lib/types/focus.d.ts.map +1 -0
- package/lib/types/focus.js.map +1 -0
- package/lib/types/guide-artwork.d.ts.map +1 -0
- package/lib/types/guide-artwork.js.map +1 -0
- package/lib/types/head-tail-cap.d.ts.map +1 -0
- package/lib/types/head-tail-cap.js.map +1 -0
- package/lib/types/icons/artwork.d.ts +12 -0
- package/lib/types/icons/artwork.d.ts.map +1 -0
- package/lib/types/icons/artwork.js.map +1 -0
- package/lib/types/icons/index.d.ts +12 -0
- package/lib/types/icons/index.d.ts.map +1 -0
- package/lib/types/icons/index.js.map +1 -0
- package/lib/types/icons/props.d.ts.map +1 -0
- package/lib/types/icons/props.js.map +1 -0
- package/lib/types/icons/shared-artwork.d.ts.map +1 -0
- package/lib/types/icons/shared-artwork.js.map +1 -0
- package/lib/types/image-drag.d.ts.map +1 -0
- package/lib/types/image-drag.js.map +1 -0
- package/lib/types/index.d.ts +5 -4
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/input-modality.d.ts.map +1 -0
- package/lib/types/input-modality.js.map +1 -0
- package/lib/types/keyboard-composition.d.ts.map +1 -0
- package/lib/types/keyboard-composition.js.map +1 -0
- package/lib/types/markdown/CodeBlock.d.ts +8 -1
- package/lib/types/markdown/CodeBlock.d.ts.map +1 -0
- package/lib/types/markdown/CodeBlock.js.map +1 -0
- package/lib/types/markdown/FenceBlocks.d.ts +31 -0
- package/lib/types/markdown/FenceBlocks.d.ts.map +1 -0
- package/lib/types/markdown/FenceBlocks.js.map +1 -0
- package/lib/types/markdown/JsonBlock.d.ts.map +1 -0
- package/lib/types/markdown/JsonBlock.js.map +1 -0
- package/lib/types/markdown/MarkdownDelegate.d.ts +23 -1
- package/lib/types/markdown/MarkdownDelegate.d.ts.map +1 -0
- package/lib/types/markdown/MarkdownDelegate.js.map +1 -0
- package/lib/types/markdown/MarkdownText.d.ts +2 -0
- package/lib/types/markdown/MarkdownText.d.ts.map +1 -0
- package/lib/types/markdown/MarkdownText.js.map +1 -0
- package/lib/types/markdown/cjkFriendlyStrong.d.ts.map +1 -0
- package/lib/types/markdown/cjkFriendlyStrong.js.map +1 -0
- package/lib/types/markdown/copy-tex.d.ts +14 -0
- package/lib/types/markdown/copy-tex.d.ts.map +1 -0
- package/lib/types/markdown/copy-tex.js.map +1 -0
- package/lib/types/markdown/diff-fence.d.ts +58 -0
- package/lib/types/markdown/diff-fence.d.ts.map +1 -0
- package/lib/types/markdown/diff-fence.js.map +1 -0
- package/lib/types/markdown/file-link.d.ts.map +1 -0
- package/lib/types/markdown/file-link.js.map +1 -0
- package/lib/types/markdown/highlight.d.ts +18 -0
- package/lib/types/markdown/highlight.d.ts.map +1 -0
- package/lib/types/markdown/highlight.js.map +1 -0
- package/lib/types/markdown/incremental.d.ts.map +1 -0
- package/lib/types/markdown/incremental.js.map +1 -0
- package/lib/types/markdown/katex.d.ts.map +1 -0
- package/lib/types/markdown/katex.js.map +1 -0
- package/lib/types/markdown/local-image-syntax.d.ts.map +1 -0
- package/lib/types/markdown/local-image-syntax.js.map +1 -0
- package/lib/types/markdown/mathCompatibility.d.ts.map +1 -0
- package/lib/types/markdown/mathCompatibility.js.map +1 -0
- package/lib/types/markdown/parse.d.ts.map +1 -0
- package/lib/types/markdown/parse.js.map +1 -0
- package/lib/types/markdown/plain-text.d.ts.map +1 -0
- package/lib/types/markdown/plain-text.js.map +1 -0
- package/lib/types/markdown/quote-text.d.ts.map +1 -0
- package/lib/types/markdown/quote-text.js.map +1 -0
- package/lib/types/markdown/render.d.ts.map +1 -0
- package/lib/types/markdown/render.js.map +1 -0
- package/lib/types/markdown/useViewportHighlighting.d.ts.map +1 -0
- package/lib/types/markdown/useViewportHighlighting.js.map +1 -0
- package/lib/types/markdown/windows-path-destinations.d.ts.map +1 -0
- package/lib/types/markdown/windows-path-destinations.js.map +1 -0
- package/lib/types/menu-submenu-position.d.ts +15 -0
- package/lib/types/menu-submenu-position.d.ts.map +1 -0
- package/lib/types/menu-submenu-position.js.map +1 -0
- package/lib/types/overlay-top-margin.d.ts.map +1 -0
- package/lib/types/overlay-top-margin.js.map +1 -0
- package/lib/types/plugin-artwork.d.ts.map +1 -0
- package/lib/types/plugin-artwork.js.map +1 -0
- package/lib/types/pointer-grace.d.ts.map +1 -0
- package/lib/types/pointer-grace.js.map +1 -0
- package/lib/types/rank-by-name.d.ts.map +1 -0
- package/lib/types/rank-by-name.js.map +1 -0
- package/lib/types/relative-time.d.ts.map +1 -0
- package/lib/types/relative-time.js.map +1 -0
- package/lib/types/settings-form/SettingsForm.d.ts.map +1 -0
- package/lib/types/settings-form/SettingsForm.js.map +1 -0
- package/lib/types/settings-form/fields.d.ts.map +1 -0
- package/lib/types/settings-form/fields.js.map +1 -0
- package/lib/types/settings-form/form-model.d.ts.map +1 -0
- package/lib/types/settings-form/form-model.js.map +1 -0
- package/lib/types/tooltip-placement.d.ts.map +1 -0
- package/lib/types/tooltip-placement.js.map +1 -0
- package/lib/types/use-clipboard-copy.d.ts.map +1 -0
- package/lib/types/use-clipboard-copy.js.map +1 -0
- package/lib/types/useAnchoredMaxHeight.d.ts.map +1 -0
- package/lib/types/useAnchoredMaxHeight.js.map +1 -0
- package/lib/types/useDismissOnOutsidePointer.d.ts.map +1 -0
- package/lib/types/useDismissOnOutsidePointer.js.map +1 -0
- package/lib/types/useMenuSubmenu.d.ts +43 -0
- package/lib/types/useMenuSubmenu.d.ts.map +1 -0
- package/lib/types/useMenuSubmenu.js.map +1 -0
- package/lib/types/useModalLayer.d.ts.map +1 -0
- package/lib/types/useModalLayer.js.map +1 -0
- package/lib/types/useRowDragPreview.d.ts.map +1 -0
- package/lib/types/useRowDragPreview.js.map +1 -0
- package/lib/types/user-text.d.ts.map +1 -0
- package/lib/types/user-text.js.map +1 -0
- package/package.json +11 -8
- package/src/AnimatedRows.module.css +7 -0
- package/src/AnimatedRows.tsx +195 -0
- package/src/BrandWordmark.tsx +59 -0
- package/src/Button.module.css +84 -0
- package/src/Button.tsx +36 -0
- package/src/Checkbox.module.css +28 -0
- package/src/Checkbox.tsx +34 -0
- package/src/CodeCard.module.css +85 -0
- package/src/CodeFileIcon.tsx +28 -0
- package/src/CodeToolbar.tsx +62 -0
- package/src/CommandText.module.css +12 -0
- package/src/CommandText.tsx +46 -0
- package/src/ConfigField.module.css +12 -0
- package/src/ConfigField.tsx +53 -0
- package/src/ConnectionIndicator.module.css +120 -0
- package/src/ConnectionIndicator.tsx +103 -0
- package/src/DetailDocument.module.css +67 -0
- package/src/DetailDocument.tsx +120 -0
- package/src/DiffBlock.module.css +82 -0
- package/src/DiffBlock.tsx +221 -0
- package/src/DisclosureRow.module.css +115 -0
- package/src/DisclosureRow.tsx +124 -0
- package/src/DraggableImage.tsx +26 -0
- package/src/FileTypeIcon.module.css +50 -0
- package/src/FileTypeIcon.tsx +285 -0
- package/src/FishLogo.tsx +28 -0
- package/src/FoldToggle.tsx +33 -0
- package/src/HoverCard.module.css +108 -0
- package/src/HoverCard.tsx +356 -0
- package/src/HoverCardGroup.tsx +77 -0
- package/src/ImageLightbox.module.css +54 -0
- package/src/ImageLightbox.tsx +72 -0
- package/src/ImagePreview.module.css +24 -0
- package/src/ImagePreview.tsx +36 -0
- package/src/InlineEditor.module.css +23 -0
- package/src/InlineEditor.tsx +69 -0
- package/src/Input.module.css +38 -0
- package/src/Input.tsx +24 -0
- package/src/JsonTree.module.css +371 -0
- package/src/JsonTree.tsx +850 -0
- package/src/LinkIcon.tsx +118 -0
- package/src/Menu.module.css +443 -0
- package/src/Menu.tsx +553 -0
- package/src/MenuGroup.module.css +37 -0
- package/src/MenuGroup.tsx +103 -0
- package/src/MenuRow.tsx +89 -0
- package/src/MenuSurface.module.css +65 -0
- package/src/MenuSurface.tsx +54 -0
- package/src/Modal.module.css +147 -0
- package/src/Modal.tsx +96 -0
- package/src/PathLabel.module.css +28 -0
- package/src/PathLabel.tsx +41 -0
- package/src/PermissionIcon.tsx +119 -0
- package/src/Pill.module.css +30 -0
- package/src/Pill.tsx +36 -0
- package/src/QuotePreview.module.css +138 -0
- package/src/QuotePreview.tsx +133 -0
- package/src/ReadBlock.module.css +45 -0
- package/src/ReadBlock.tsx +151 -0
- package/src/ReferenceIcon.tsx +49 -0
- package/src/RiskConfirmation.module.css +47 -0
- package/src/RiskConfirmation.tsx +79 -0
- package/src/RowDragPreview.module.css +12 -0
- package/src/SearchBlock.module.css +114 -0
- package/src/SearchBlock.tsx +281 -0
- package/src/SegmentedControl.module.css +81 -0
- package/src/SegmentedControl.tsx +140 -0
- package/src/SegmentedTabs.module.css +77 -0
- package/src/SegmentedTabs.tsx +84 -0
- package/src/ShortcutKeys.module.css +33 -0
- package/src/ShortcutKeys.tsx +12 -0
- package/src/SiteGlyph.tsx +149 -0
- package/src/StateDot.module.css +100 -0
- package/src/StateDot.tsx +77 -0
- package/src/SubmenuPanel.tsx +51 -0
- package/src/Switch.module.css +49 -0
- package/src/Switch.tsx +42 -0
- package/src/Tag.module.css +57 -0
- package/src/Tag.tsx +42 -0
- package/src/TerminalBlock.module.css +207 -0
- package/src/TerminalBlock.tsx +294 -0
- package/src/TextShimmer.module.css +88 -0
- package/src/TextShimmer.tsx +58 -0
- package/src/Toast.module.css +102 -0
- package/src/Toast.tsx +101 -0
- package/src/Tooltip.module.css +68 -0
- package/src/Tooltip.tsx +273 -0
- package/src/UserMessageBubble.module.css +11 -0
- package/src/UserMessageBubble.tsx +16 -0
- package/src/WebBlock.module.css +153 -0
- package/src/WebBlock.tsx +196 -0
- package/src/ZoomControls.module.css +54 -0
- package/src/ZoomControls.tsx +92 -0
- package/src/ansi.ts +447 -0
- package/src/clipboard.ts +47 -0
- package/src/code-file-icon-artwork.manifest.json +71 -0
- package/src/code-file-icon-artwork.ts +60 -0
- package/src/code-file-types.ts +340 -0
- package/src/code-highlighting.ts +25 -0
- package/src/css-modules.d.ts +6 -0
- package/src/darwin-desktop.ts +11 -0
- package/src/document-zoom.ts +12 -0
- package/src/file-drag-actions.ts +29 -0
- package/src/file-size.ts +16 -0
- package/src/focus.ts +44 -0
- package/src/guide-artwork.tsx +32 -0
- package/src/head-tail-cap.ts +27 -0
- package/src/icons/artwork.ts +156 -0
- package/src/icons/index.tsx +634 -0
- package/src/icons/props.ts +8 -0
- package/src/icons/shared-artwork.tsx +71 -0
- package/src/image-drag.ts +84 -0
- package/src/index.ts +142 -0
- package/src/input-modality.ts +59 -0
- package/src/keyboard-composition.ts +36 -0
- package/src/markdown/CodeBlock.module.css +209 -0
- package/src/markdown/CodeBlock.tsx +268 -0
- package/src/markdown/FenceBlocks.tsx +51 -0
- package/src/markdown/JsonBlock.module.css +34 -0
- package/src/markdown/JsonBlock.tsx +36 -0
- package/src/markdown/MarkdownDelegate.tsx +102 -0
- package/src/markdown/MarkdownText.module.css +511 -0
- package/src/markdown/MarkdownText.tsx +218 -0
- package/src/markdown/cjkFriendlyStrong.ts +83 -0
- package/src/markdown/copy-tex.ts +53 -0
- package/src/markdown/diff-fence.ts +212 -0
- package/src/markdown/file-link.ts +45 -0
- package/src/markdown/highlight.ts +689 -0
- package/src/markdown/incremental.ts +360 -0
- package/src/markdown/katex.tsx +90 -0
- package/src/markdown/local-image-syntax.ts +29 -0
- package/src/markdown/mathCompatibility.ts +349 -0
- package/src/markdown/parse.ts +49 -0
- package/src/markdown/plain-text.ts +121 -0
- package/src/markdown/quote-text.ts +10 -0
- package/src/markdown/render.tsx +834 -0
- package/src/markdown/useViewportHighlighting.ts +72 -0
- package/src/markdown/windows-path-destinations.ts +34 -0
- package/src/menu-submenu-position.ts +20 -0
- package/src/overlay-top-margin.ts +18 -0
- package/src/plugin-artwork.tsx +110 -0
- package/src/pointer-grace.ts +47 -0
- package/src/rank-by-name.ts +93 -0
- package/src/relative-time.ts +36 -0
- package/src/settings-form/SettingsForm.module.css +53 -0
- package/src/settings-form/SettingsForm.tsx +74 -0
- package/src/settings-form/fields.module.css +153 -0
- package/src/settings-form/fields.tsx +151 -0
- package/src/settings-form/form-model.ts +393 -0
- package/src/tooltip-placement.ts +60 -0
- package/src/use-clipboard-copy.ts +44 -0
- package/src/useAnchoredMaxHeight.ts +45 -0
- package/src/useDismissOnOutsidePointer.ts +34 -0
- package/src/useMenuSubmenu.ts +182 -0
- package/src/useModalLayer.ts +108 -0
- package/src/useRowDragPreview.ts +76 -0
- package/src/user-text.module.css +46 -0
- package/src/user-text.tsx +67 -0
- package/lib/types/useAnchoredPosition.d.ts +0 -36
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/UserMessageBubble.tsx","../src/icons/artwork.ts","../src/icons/index.tsx","../src/StateDot.tsx","../src/TextShimmer.tsx","../src/DisclosureRow.tsx","../src/AnimatedRows.tsx","../src/useRowDragPreview.ts","../src/Button.tsx","../src/menu-submenu-position.ts","../src/pointer-grace.ts","../src/useMenuSubmenu.ts","../src/ShortcutKeys.tsx","../src/tooltip-placement.ts","../src/useDismissOnOutsidePointer.ts","../src/input-modality.ts","../src/Tooltip.tsx","../src/MenuRow.tsx","../src/MenuSurface.tsx","../src/SubmenuPanel.tsx","../src/keyboard-composition.ts","../src/focus.ts","../src/useModalLayer.ts","../src/Menu.tsx","../src/document-zoom.ts","../src/ZoomControls.tsx","../src/Pill.tsx","../src/SegmentedTabs.tsx","../src/Tag.tsx","../src/PathLabel.tsx","../src/Switch.tsx","../src/SegmentedControl.tsx","../src/Checkbox.tsx","../src/Input.tsx","../src/InlineEditor.tsx","../src/MenuGroup.tsx","../src/overlay-top-margin.ts","../src/useAnchoredMaxHeight.ts","../src/clipboard.ts","../src/HoverCardGroup.tsx","../src/HoverCard.tsx","../src/Modal.tsx","../src/RiskConfirmation.tsx","../src/ConnectionIndicator.tsx","../src/FishLogo.tsx","../src/BrandWordmark.tsx","../src/PermissionIcon.tsx","../src/icons/shared-artwork.tsx","../src/ReferenceIcon.tsx","../src/code-file-icon-artwork.ts","../src/CodeFileIcon.tsx","../src/code-file-types.ts","../src/FileTypeIcon.tsx","../src/SiteGlyph.tsx","../src/LinkIcon.tsx","../src/user-text.tsx","../src/Toast.tsx","../src/file-size.ts","../src/image-drag.ts","../src/DraggableImage.tsx","../src/use-clipboard-copy.ts","../src/settings-form/SettingsForm.tsx","../src/settings-form/fields.tsx","../src/settings-form/form-model.ts","../src/markdown/highlight.ts","../src/code-highlighting.ts","../src/relative-time.ts","../src/rank-by-name.ts","../src/darwin-desktop.ts","../src/JsonTree.tsx","../src/ansi.ts","../src/head-tail-cap.ts","../src/CommandText.tsx","../src/TerminalBlock.tsx","../src/FoldToggle.tsx","../src/CodeToolbar.tsx","../src/markdown/useViewportHighlighting.ts","../src/ReadBlock.tsx","../src/DiffBlock.tsx","../src/SearchBlock.tsx","../src/markdown/copy-tex.ts","../src/markdown/incremental.ts","../src/markdown/local-image-syntax.ts","../src/markdown/cjkFriendlyStrong.ts","../src/markdown/mathCompatibility.ts","../src/markdown/windows-path-destinations.ts","../src/markdown/parse.ts","../src/markdown/diff-fence.ts","../src/markdown/CodeBlock.tsx","../src/markdown/katex.tsx","../src/markdown/FenceBlocks.tsx","../src/markdown/file-link.ts","../src/markdown/MarkdownDelegate.tsx","../src/ImageLightbox.tsx","../src/ImagePreview.tsx","../src/markdown/render.tsx","../src/markdown/MarkdownText.tsx","../src/WebBlock.tsx","../src/markdown/JsonBlock.tsx","../src/DetailDocument.tsx","../src/markdown/plain-text.ts","../src/plugin-artwork.tsx","../src/guide-artwork.tsx","../src/QuotePreview.tsx","../src/markdown/quote-text.ts"],"sourcesContent":["/** Shared user-message background, typography, and content inset. */\nimport type { ComponentPropsWithoutRef } from 'react'\nimport clsx from 'clsx'\nimport css from './UserMessageBubble.module.css'\n\n/** Native div attributes for user-authored message content. */\nexport type UserMessageBubbleProps = ComponentPropsWithoutRef<'div'>\n\n/**\n * Render user-style message content without row placement or actions.\n * @param props - Native div attributes and the caller-owned content.\n * @returns A theme-aware message surface that wraps its content.\n */\nexport function UserMessageBubble({ className, ...props }: UserMessageBubbleProps) {\n return <div {...props} className={clsx(css.bubble, className)} />\n}\n","/**\n * Default artwork for the product icon set. Each glyph is an SVG document\n * whose geometry may depend on the stroke weight; ui-theme publishes every\n * glyph and weight as one `<symbol id=\"dsw-icon-<glyph>-<weight>\">` in the\n * document icon sprite, which a theme can replace with its own SVG.\n */\n\n/** Regular stroke width used by the product icon set. */\nexport const ICON_REGULAR_STROKE = 1\n\n/** Medium stroke width used by emphasized product icons. */\nexport const ICON_MEDIUM_STROKE = 1.3\n\n/** One product glyph: default rendered height, `[width, height]` box ratio when not square, and SVG source per stroke width. */\ninterface IconArtwork {\n size: number\n aspect?: readonly [number, number]\n svg: (strokeWidth: number) => string\n}\n\n/** Default artwork keyed by glyph name; symbol ids derive from these keys. */\nexport const ICON_ARTWORK = {\n 'layers-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8.481371 2.304371 a1.159971 1.159971 0 0 0-.962742 0 L2.547971 4.566371 a.580029 .580029 0 0 0 0 1.0614 l4.9764 2.267829 a1.159971 1.159971 0 0 0 .962829 0 l4.9764-2.262 a.580029 .580029 0 0 0 0-1.0614Z\" stroke=\"currentColor\"></path><path d=\"M2.199971 8 a.580029 .580029 0 0 0 .336429 .527829 l4.987971 2.267742 a1.159971 1.159971 0 0 0 .957 0 l4.9764-2.262 A.580029 .580029 0 0 0 13.800029 8\" stroke=\"currentColor\"></path><path d=\"M2.199971 10.899971 a.580029 .580029 0 0 0 .336429 .527829 l4.987971 2.267829 a1.159971 1.159971 0 0 0 .957 0 l4.9764-2.262 A.580029 .580029 0 0 0 13.800029 10.899971\" stroke=\"currentColor\"></path></svg>` },\n 'save-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"${strokeWidth}\" stroke-linejoin=\"round\"><path d=\"M2.5 1.5h8l3 3v9a1 1 0 0 1-1 1h-10a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1Z\"></path><path d=\"M4.5 1.5v4h6v-4M4 14.5v-6h7v6\"></path></svg>` },\n 'new-chat-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M2.37091 11.2501C1.58745 9.89288 1.32067 8.29835 1.61969 6.76006C1.91872 5.22177 2.76342 3.8433 3.99826 2.87846C5.2331 1.91362 6.77494 1.42737 8.33988 1.50925C9.90482 1.59113 11.3875 2.23562 12.5149 3.32406C13.6425 4.41269 14.3387 5.87206 14.4754 7.4334C14.612 8.99474 14.18 10.5529 13.2587 11.8209C12.3375 13.0888 10.9891 13.9813 9.46194 14.3337C8.18691 14.628 6.85895 14.5294 5.64989 14.0605C5.1712 13.8748 4.76962 13.4932 4.26534 13.3967C3.67413 13.2835 2.95257 13.5598 2.03794 14.3337\" stroke=\"currentColor\"></path><path d=\"M8 5V11\" stroke=\"currentColor\"></path><path d=\"M5 8H11\" stroke=\"currentColor\"></path></svg>` },\n 'search-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M6.58727 11.8586C9.55061 11.8586 11.9529 9.45637 11.9529 6.49304C11.9529 3.5297 9.55061 1.12744 6.58727 1.12744C3.62394 1.12744 1.22168 3.5297 1.22168 6.49304C1.22168 9.45637 3.62394 11.8586 6.58727 11.8586Z\" stroke=\"currentColor\"></path><path d=\"M10.2991 10.3933L14.7783 14.8725\" stroke=\"currentColor\"></path></svg>` },\n 'eye-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M1.5 8C3.36 4.41 5.52 2.63 8 2.63C10.48 2.63 12.64 4.41 14.5 8C12.64 11.59 10.48 13.37 8 13.37C5.52 13.37 3.36 11.59 1.5 8Z\" stroke=\"currentColor\"></path><circle cx=\"8\" cy=\"8\" r=\"2.25\" stroke=\"currentColor\"></circle></svg>` },\n 'eye-off-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M2.25 2.25L13.75 13.75\" stroke=\"currentColor\"></path><path d=\"M6.35 3.03C6.88 2.76 7.42 2.63 8 2.63C10.48 2.63 12.64 4.41 14.5 8C13.75 9.48 12.95 10.6 12.08 11.36\" stroke=\"currentColor\"></path><path d=\"M10.28 12.81C9.54 13.19 8.78 13.37 8 13.37C5.52 13.37 3.36 11.59 1.5 8C2.26 6.49 3.08 5.36 3.97 4.6\" stroke=\"currentColor\"></path><path d=\"M6.55 6.55A2.05 2.05 0 0 0 9.45 9.45\" stroke=\"currentColor\"></path></svg>` },\n 'globe-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M7.99986 14.0887C11.3626 14.0887 14.0886 11.3627 14.0886 7.99998C14.0886 4.63727 11.3626 1.91125 7.99986 1.91125C4.63715 1.91125 1.91113 4.63727 1.91113 7.99998C1.91113 11.3627 4.63715 14.0887 7.99986 14.0887Z\" stroke=\"currentColor\"></path><path d=\"M2.34619 8H13.6538\" stroke=\"currentColor\" stroke-linecap=\"square\"></path><path d=\"M7.99976 14.0889C9.23509 14.0889 10.1743 11.3629 10.1743 8.00006C10.1743 4.63739 9.23509 1.91138 7.99976 1.91138\" stroke=\"currentColor\"></path><path d=\"M7.99973 14.0889C6.76445 14.0889 5.8252 11.3629 5.8252 8.00006C5.8252 4.63739 6.76445 1.91138 7.99973 1.91138\" stroke=\"currentColor\"></path></svg>` },\n 'settings-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M8 9.75012C8.9665 9.75012 9.75 8.96662 9.75 8.00012C9.75 7.03362 8.9665 6.25012 8 6.25012C7.0335 6.25012 6.25 7.03362 6.25 8.00012C6.25 8.96662 7.0335 9.75012 8 9.75012Z\" stroke=\"currentColor\"></path><path d=\"M13.0107 7.79377C12.9505 7.89401 12.9205 7.94413 12.9205 7.99951C12.9205 8.0549 12.9505 8.10502 13.0106 8.20528L13.9849 9.83006C14.045 9.93029 14.0751 9.9804 14.0751 10.0358C14.0751 10.0911 14.045 10.1413 13.9849 10.2415L13.0037 11.8777C12.9468 11.9726 12.9184 12.0201 12.8725 12.0461C12.8267 12.072 12.7713 12.072 12.6607 12.072H10.6704C10.5598 12.072 10.5045 12.072 10.4586 12.098C10.4128 12.1239 10.3843 12.1714 10.3274 12.2662L9.33825 13.9142C9.28133 14.009 9.25287 14.0564 9.20703 14.0823C9.16118 14.1083 9.10588 14.1083 8.99529 14.1083H7.00486C6.89426 14.1083 6.83896 14.1083 6.79312 14.0823C6.74727 14.0564 6.71881 14.009 6.6619 13.9142L5.67273 12.2662C5.61581 12.1714 5.58735 12.1239 5.54151 12.098C5.49566 12.072 5.44036 12.072 5.32977 12.072H3.33945C3.2288 12.072 3.17347 12.072 3.12761 12.0461C3.08176 12.0201 3.0533 11.9726 2.9964 11.8777L2.0152 10.2415C1.9551 10.1413 1.92505 10.0911 1.92505 10.0358C1.92505 9.9804 1.9551 9.93029 2.0152 9.83006L2.98951 8.20528C3.04963 8.10502 3.07969 8.0549 3.07969 7.99951C3.07968 7.94413 3.04961 7.89401 2.98946 7.79377L2.01529 6.17011C1.95514 6.06987 1.92507 6.01975 1.92507 5.96437C1.92506 5.90899 1.95512 5.85886 2.01524 5.7586L2.9964 4.1224C3.0533 4.0275 3.08176 3.98005 3.12761 3.95408C3.17347 3.92811 3.2288 3.92811 3.33945 3.92811H5.32977C5.44036 3.92811 5.49566 3.92811 5.54151 3.90216C5.58735 3.87621 5.61581 3.82879 5.67273 3.73397L6.6619 2.08599C6.71881 1.99116 6.74727 1.94375 6.79312 1.9178C6.83896 1.89185 6.89426 1.89185 7.00486 1.89185H8.99529C9.10588 1.89185 9.16118 1.89185 9.20703 1.9178C9.25287 1.94375 9.28133 1.99116 9.33825 2.08599L10.3274 3.73397C10.3843 3.82879 10.4128 3.87621 10.4586 3.90216C10.5045 3.92811 10.5598 3.92811 10.6704 3.92811H12.6607C12.7713 3.92811 12.8267 3.92811 12.8725 3.95408C12.9184 3.98005 12.9468 4.0275 13.0037 4.1224L13.9849 5.7586C14.045 5.85886 14.0751 5.90899 14.0751 5.96437C14.0751 6.01975 14.045 6.06987 13.9849 6.17011L13.0107 7.79377Z\" stroke=\"currentColor\" stroke-miterlimit=\"10\"></path></svg>` },\n 'panel-left-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M13.5 1.5H2.5C1.94772 1.5 1.5 1.94772 1.5 2.5V13.5C1.5 14.0523 1.94772 14.5 2.5 14.5H13.5C14.0523 14.5 14.5 14.0523 14.5 13.5V2.5C14.5 1.94772 14.0523 1.5 13.5 1.5Z\" stroke=\"currentColor\"></path><path d=\"M5.5 1.5V14.5\" stroke=\"currentColor\"></path></svg>` },\n 'ellipsis-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M3 9C3.55228 9 4 8.55228 4 8C4 7.44772 3.55228 7 3 7C2.44772 7 2 7.44772 2 8C2 8.55228 2.44772 9 3 9Z\" fill=\"currentColor\"></path><path d=\"M8 9C8.55228 9 9 8.55228 9 8C9 7.44772 8.55228 7 8 7C7.44772 7 7 7.44772 7 8C7 8.55228 7.44772 9 8 9Z\" fill=\"currentColor\"></path><path d=\"M13 9C13.5523 9 14 8.55228 14 8C14 7.44772 13.5523 7 13 7C12.4477 7 12 7.44772 12 8C12 8.55228 12.4477 9 13 9Z\" fill=\"currentColor\"></path></svg>` },\n 'plus-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M8 2V14\" stroke=\"currentColor\"></path><path d=\"M2 8H14\" stroke=\"currentColor\"></path></svg>` },\n 'check-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M2.25 8.5L5.49732 11.7473C5.90519 12.1552 6.57263 12.1344 6.95426 11.7018L13.75 4\" stroke=\"currentColor\"></path></svg>` },\n 'branch-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M1.01503 8.0001L5.6964 8.0001C6.41913 8.0001 6.78049 8.0001 7.12115 7.91951C7.4232 7.84804 7.71233 7.73014 7.97821 7.57C8.27809 7.38939 8.5364 7.13669 9.05303 6.63129L11.3281 4.40564\" stroke=\"currentColor\"></path><path d=\"M1.01221 7.9999L5.6964 7.9999C6.41913 7.9999 6.78049 7.9999 7.12115 8.08049C7.4232 8.15196 7.71233 8.26986 7.97821 8.43C8.27809 8.61061 8.5364 8.86331 9.05303 9.36871L11.3281 11.5944\" stroke=\"currentColor\"></path><circle cx=\"12.4502\" cy=\"3.3079\" r=\"1.56962\" stroke=\"currentColor\"></circle><circle cx=\"12.4502\" cy=\"12.6921\" r=\"1.56962\" stroke=\"currentColor\"></circle></svg>` },\n 'chevron-down-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M4 6L7.29289 9.29289C7.68342 9.68342 8.31658 9.68342 8.70711 9.29289L12 6\" stroke=\"currentColor\"></path></svg>` },\n 'chevron-left-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M10 4L6.70711 7.29289C6.31658 7.68342 6.31658 8.31658 6.70711 8.70711L10 12\" stroke=\"currentColor\"></path></svg>` },\n 'chevron-right-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M6 12L9.29289 8.70711C9.68342 8.31658 9.68342 7.68342 9.29289 7.29289L6 4\" stroke=\"currentColor\"></path></svg>` },\n 'triangle-right-fill': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M5.5 4.5C5.5 4.40714 5.52586 4.31612 5.57467 4.23713C5.62349 4.15815 5.69334 4.09431 5.77639 4.05279C5.85945 4.01126 5.95242 3.99368 6.0449 4.00202C6.13738 4.01036 6.22572 4.04429 6.3 4.1L10.967 7.6C11.0291 7.64657 11.0795 7.70697 11.1142 7.77639C11.1489 7.84582 11.167 7.92238 11.167 8C11.167 8.07762 11.1489 8.15418 11.1142 8.22361C11.0795 8.29303 11.0291 8.35343 10.967 8.4L6.3 11.9C6.22572 11.9557 6.13738 11.9896 6.0449 11.998C5.95242 12.0063 5.85945 11.9887 5.77639 11.9472C5.69334 11.9057 5.62349 11.8419 5.57467 11.7629C5.52586 11.6839 5.5 11.5929 5.5 11.5V4.5Z\" fill=\"currentColor\"></path></svg>` },\n 'chevron-up-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M12 10L8.70711 6.70711C8.31658 6.31658 7.68342 6.31658 7.29289 6.70711L4 10\" stroke=\"currentColor\"></path></svg>` },\n 'close-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M2.5 2.5L13.5 13.5\" stroke=\"currentColor\"></path><path d=\"M13.5 2.5L2.5 13.5\" stroke=\"currentColor\"></path></svg>` },\n 'close-fill': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M3.5 3.5L12.5 12.5\" stroke=\"currentColor\"></path><path d=\"M12.5 3.5L3.5 12.5\" stroke=\"currentColor\"></path></svg>` },\n 'close-circle-fill': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M15 8A7 7 0 1 1 1 8A7 7 0 1 1 15 8ZM6.409 10.652L5.348 9.591L6.939 8L5.348 6.409L6.409 5.348L8 6.939L9.591 5.348L10.652 6.409L9.061 8L10.652 9.591L9.591 10.652L8 9.061Z\" fill=\"currentColor\"></path></svg>` },\n 'copy-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><rect x=\"1.52075\" y=\"4.07373\" width=\"10.3932\" height=\"10.3932\" rx=\"2\" stroke=\"currentColor\"></rect><path d=\"M11.9792 1.53296C13.36 1.53296 14.4792 2.65225 14.4792 4.03296V9.42847C14.4792 10.3756 13.9521 11.1987 13.1755 11.6228V10.3298C13.3652 10.0787 13.4792 9.7674 13.4792 9.42847V4.03296C13.4792 3.20453 12.8077 2.53296 11.9792 2.53296H6.58374C6.27966 2.53301 5.99684 2.6235 5.7605 2.77905H4.42358C4.85652 2.03463 5.66056 1.53304 6.58374 1.53296H11.9792Z\" fill=\"currentColor\"></path></svg>` },\n 'refresh-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M14.5001 8C14.5 9.28552 14.1188 10.5422 13.4045 11.611C12.6903 12.6799 11.6752 13.5129 10.4875 14.0049C9.29982 14.4968 7.99295 14.6255 6.73212 14.3747C5.4713 14.124 4.31314 13.505 3.4041 12.596C2.49514 11.687 1.87614 10.5288 1.62537 9.26798C1.37459 8.00716 1.50331 6.70028 1.99525 5.51261C2.48719 4.32494 3.32025 3.30981 4.3891 2.59557C5.45795 1.88134 6.71458 1.50008 8.0001 1.5C9.9001 1.5 11.7001 2.3 13.0001 3.6L14.5001 5.1\" stroke=\"currentColor\"></path><path d=\"M14.4999 1.5V5.1H10.8999\" stroke=\"currentColor\"></path></svg>` },\n 'like-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M13.537 8.12098L12.3983 12.8455C12.1818 13.7438 11.378 14.3769 10.454 14.3769L9.35595 14.3769H7.43799H5.16577C3.50892 14.3769 2.16577 13.0337 2.16577 11.3769V7.88668C2.16577 7.33439 2.61349 6.88668 3.16577 6.88668H4.02665C5.84943 6.88668 7.38083 3.28711 7.67689 2.54578C7.71259 2.45639 7.73501 2.36373 7.77922 2.27824C7.86506 2.11221 8.08228 1.87578 8.59039 2.07775C10.3291 2.76886 9.23144 6.04071 8.96955 6.75058C8.94502 6.81707 8.99495 6.88668 9.06581 6.88668H12.5648C13.2119 6.88668 13.6886 7.49192 13.537 8.12098Z\" stroke=\"currentColor\"></path></svg>` },\n 'like-fill': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M13.537 8.12098L12.3983 12.8455C12.1818 13.7438 11.378 14.3769 10.454 14.3769L9.35595 14.3769H7.43799H5.16577C3.50892 14.3769 2.16577 13.0337 2.16577 11.3769V7.88668C2.16577 7.33439 2.61349 6.88668 3.16577 6.88668H4.02665C5.84943 6.88668 7.38083 3.28711 7.67689 2.54578C7.71259 2.45639 7.73501 2.36373 7.77922 2.27824C7.86506 2.11221 8.08228 1.87578 8.59039 2.07775C10.3291 2.76886 9.23144 6.04071 8.96955 6.75058C8.94502 6.81707 8.99495 6.88668 9.06581 6.88668H12.5648C13.2119 6.88668 13.6886 7.49192 13.537 8.12098Z\" fill=\"currentColor\" stroke=\"currentColor\"></path></svg>` },\n 'dislike-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M2.46302 8.06749L3.60171 3.34299C3.81822 2.44467 4.62196 1.81162 5.546 1.8116L6.64406 1.81158L8.56202 1.81158L10.8342 1.81158C12.4911 1.81158 13.8342 3.15473 13.8342 4.81158L13.8342 8.3018C13.8342 8.85408 13.3865 9.3018 12.8342 9.3018L11.9734 9.3018C10.1506 9.3018 8.61918 12.9014 8.32311 13.6427C8.28741 13.7321 8.26499 13.8247 8.22078 13.9102C8.13494 14.0763 7.91772 14.3127 7.40961 14.1107C5.67089 13.4196 6.76856 10.1478 7.03045 9.43789C7.05498 9.37141 7.00505 9.3018 6.93419 9.3018L3.43519 9.3018C2.78811 9.3018 2.31141 8.69656 2.46302 8.06749Z\" stroke=\"currentColor\"></path></svg>` },\n 'dislike-fill': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M2.46302 8.06749L3.60171 3.34299C3.81822 2.44467 4.62196 1.81162 5.546 1.8116L6.64406 1.81158L8.56202 1.81158L10.8342 1.81158C12.4911 1.81158 13.8342 3.15473 13.8342 4.81158L13.8342 8.3018C13.8342 8.85408 13.3865 9.3018 12.8342 9.3018L11.9734 9.3018C10.1506 9.3018 8.61918 12.9014 8.32311 13.6427C8.28741 13.7321 8.26499 13.8247 8.22078 13.9102C8.13494 14.0763 7.91772 14.3127 7.40961 14.1107C5.67089 13.4196 6.76856 10.1478 7.03045 9.43789C7.05498 9.37141 7.00505 9.3018 6.93419 9.3018L3.43519 9.3018C2.78811 9.3018 2.31141 8.69656 2.46302 8.06749Z\" fill=\"currentColor\" stroke=\"currentColor\"></path></svg>` },\n 'share-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M14.1256 7.58723C14.3483 7.81942 14.3482 8.18589 14.1254 8.41799L8.6646 14.1077C8.53985 14.2377 8.32031 14.1494 8.32031 13.9692L8.32035 10.2039C8.32035 10.1943 8.31534 10.1864 8.30592 10.1849C8.08306 10.148 5.30067 9.7729 1.50993 13.2904C1.49711 13.3023 1.47561 13.2943 1.4757 13.2768C1.49273 9.87168 3.42001 5.07166 8.29999 5.05835C8.31103 5.05832 8.32035 5.04937 8.32035 5.03832L8.32031 2.03109C8.32031 1.85088 8.53993 1.76259 8.66466 1.89266L14.1256 7.58723Z\" stroke=\"currentColor\"></path></svg>` },\n 'deliver-doc': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M6.15479 4.91687H9.84543\" stroke=\"currentColor\"></path><path d=\"M11.8798 9.55347V2.71525C11.8798 2.37416 11.564 2.09766 11.1744 2.09766H4.82577C4.43618 2.09766 4.12036 2.37416 4.12036 2.71525V9.55347\" stroke=\"currentColor\"></path><path d=\"M2.28735 13.8022V8.84792C2.28735 8.77514 2.36262 8.72673 2.42884 8.75693L13.2936 13.7112C13.3914 13.7558 13.3596 13.9022 13.2521 13.9022H2.38735C2.33213 13.9022 2.28735 13.8575 2.28735 13.8022Z\" stroke=\"currentColor\"></path><path d=\"M7.46929 10.979L13.5783 8.7416C13.6435 8.7177 13.7126 8.76601 13.7126 8.83551L13.7125 13.8022C13.7125 13.8574 13.6678 13.9022 13.6125 13.9022H7.99999\" stroke=\"currentColor\"></path><path d=\"M6.15479 7.2395H9.05644\" stroke=\"currentColor\"></path></svg>` },\n 'edit-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M8.85596 2.69971H4.19971C3.37141 2.69971 2.69992 3.37146 2.69971 4.19971V11.8003C2.69992 12.6285 3.37141 13.3003 4.19971 13.3003H11.8003C12.6283 13.2999 13.3001 12.6283 13.3003 11.8003V7.89893H14.3003V11.8003C14.3001 13.1806 13.1806 14.2999 11.8003 14.3003H4.19971C2.81913 14.3003 1.69992 13.1808 1.69971 11.8003V4.19971C1.69992 2.81918 2.81913 1.69971 4.19971 1.69971H8.85596V2.69971Z\" fill=\"currentColor\"></path><path d=\"M7.7849 8.23878L13.888 2.13574\" stroke=\"currentColor\"></path></svg>` },\n 'think-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M10.2854 5.71481C12.9673 8.39663 14.1182 11.5938 12.8562 12.8559C11.5942 14.1179 8.39706 12.9669 5.71518 10.2851C3.03333 7.60323 1.88236 4.40608 3.14441 3.14403C4.40644 1.882 7.6036 3.03297 10.2854 5.71481Z\" stroke=\"currentColor\"></path><path d=\"M10.2854 10.2851C7.6036 12.9669 4.40644 14.1179 3.14441 12.8559C1.88236 11.5938 3.03333 8.39663 5.71518 5.71481C8.39706 3.03297 11.5942 1.882 12.8562 3.14403C14.1182 4.40608 12.9673 7.60323 10.2854 10.2851Z\" stroke=\"currentColor\"></path><path d=\"M8.86291 8.0002C8.86291 8.47549 8.47762 8.86087 8.00224 8.86087C7.52694 8.86087 7.1416 8.47549 7.1416 8.0002C7.1416 7.52485 7.52694 7.13953 8.00224 7.13953C8.47762 7.13953 8.86291 7.52485 8.86291 8.0002Z\" fill=\"currentColor\"></path></svg>` },\n 'agent-preset-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M6.51867 12.3282C7.29816 12.6011 8.16475 12.6514 9.02269 12.4216C9.57879 12.2726 10.0784 12.0185 10.5087 11.6888C10.7819 12.0555 11.1606 12.3304 11.5913 12.4805C10.9688 13.029 10.2149 13.4478 9.35911 13.6771C8.13946 14.0038 6.90632 13.8971 5.82126 13.4533C6.15821 13.1562 6.4021 12.7652 6.51867 12.3282ZM9.17629 2.89409C11.1101 3.34433 12.739 4.81872 13.2889 6.87043C13.4219 7.3665 13.4811 7.8649 13.4774 8.35466C13.0924 8.13213 12.6422 8.01837 12.1741 8.05276L12.1711 8.05257C12.1539 7.77199 12.109 7.48889 12.0334 7.20684C11.6363 5.72533 10.5048 4.6372 9.13549 4.22844C9.25559 3.87667 9.29214 3.49087 9.22309 3.09892C9.2108 3.02922 9.19451 2.96108 9.17629 2.89409ZM4.7311 3.89107L4.78302 4.11879C4.87648 4.4488 5.04146 4.74263 5.25579 4.98896C3.98078 6.01355 3.35848 7.72904 3.8089 9.41059C3.81828 9.44559 3.82866 9.48025 3.83885 9.51479C3.38217 9.61268 2.98548 9.84137 2.68107 10.1556C2.63414 10.022 2.5897 9.88632 2.55244 9.74726C1.93301 7.43489 2.86717 5.07173 4.71504 3.76697L4.7311 3.89107Z\" fill=\"currentColor\"></path><path d=\"M7.99136 5.28105C8.87501 5.28105 9.59136 4.56471 9.59136 3.68105C9.59136 2.7974 8.87501 2.08105 7.99136 2.08105C7.1077 2.08105 6.39136 2.7974 6.39136 3.68105C6.39136 4.56471 7.1077 5.28105 7.99136 5.28105Z\" stroke=\"currentColor\"></path><path d=\"M3.94009 12.9417C4.82374 12.9417 5.54009 12.2254 5.54009 11.3417C5.54009 10.458 4.82374 9.7417 3.94009 9.7417C3.05643 9.7417 2.34009 10.458 2.34009 11.3417C2.34009 12.2254 3.05643 12.9417 3.94009 12.9417Z\" stroke=\"currentColor\"></path><path d=\"M12.0851 12.9417C12.9688 12.9417 13.6851 12.2254 13.6851 11.3417C13.6851 10.458 12.9688 9.7417 12.0851 9.7417C11.2015 9.7417 10.4851 10.458 10.4851 11.3417C10.4851 12.2254 11.2015 12.9417 12.0851 12.9417Z\" stroke=\"currentColor\"></path></svg>` },\n 'browse-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M4.9375 5.90295H11.0625\" stroke=\"currentColor\"></path><path d=\"M4.9375 9.02991H8.27841\" stroke=\"currentColor\"></path><path d=\"M12.5 1.32617C13.3039 1.32617 14 1.95171 14 2.77637V13.2246C13.9996 14.0489 13.3036 14.6738 12.5 14.6738H3.5C2.69637 14.6738 2.00042 14.0489 2 13.2246V2.77637C2 1.95171 2.69613 1.32617 3.5 1.32617H12.5ZM3.5 2.32617C3.1993 2.32617 3 2.55186 3 2.77637V13.2246C3.00044 13.4489 3.19963 13.6738 3.5 13.6738H12.5C12.8004 13.6738 12.9996 13.4489 13 13.2246V2.77637C13 2.55186 12.8007 2.32617 12.5 2.32617H3.5Z\" fill=\"currentColor\"></path></svg>` },\n 'context-injection-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M5 2.5H3.5C3.23478 2.5 2.98043 2.60536 2.79289 2.79289C2.60536 2.98043 2.5 3.23478 2.5 3.5V13.5C2.5 13.7652 2.60536 14.0196 2.79289 14.2071C2.98043 14.3946 3.23478 14.5 3.5 14.5H12.5C12.7652 14.5 13.0196 14.3946 13.2071 14.2071C13.3946 14.0196 13.5 13.7652 13.5 13.5V3.5C13.5 3.23478 13.3946 2.98043 13.2071 2.79289C13.0196 2.60536 12.7652 2.5 12.5 2.5H11\" stroke=\"currentColor\"></path><path d=\"M8 0.5V7.5\" stroke=\"currentColor\"></path><path d=\"M5.5 5L8 7.5L10.5 5\" stroke=\"currentColor\"></path><path d=\"M5.5 11H10.5\" stroke=\"currentColor\"></path></svg>` },\n 'link-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M6.59961 9.40051C6.82779 9.6334 7.10015 9.81842 7.40074 9.94472C7.70132 10.071 8.02409 10.1361 8.35013 10.1361C8.67618 10.1361 8.99894 10.071 9.29953 9.94472C9.60011 9.81842 9.87247 9.6334 10.1007 9.40051L12.9015 6.59967C13.3658 6.13541 13.6266 5.50572 13.6266 4.84915C13.6266 4.19258 13.3658 3.56289 12.9015 3.09863C12.4372 2.63436 11.8075 2.37354 11.151 2.37354C10.4944 2.37354 9.86472 2.63436 9.40045 3.09863L9.05034 3.44873\" stroke=\"currentColor\"></path><path d=\"M9.40051 6.59959C9.17233 6.3667 8.89997 6.18169 8.59939 6.05538C8.2988 5.92907 7.97603 5.86401 7.64999 5.86401C7.32395 5.86401 7.00118 5.92907 6.70059 6.05538C6.40001 6.18169 6.12765 6.3667 5.89946 6.59959L3.09863 9.40043C2.63436 9.8647 2.37354 10.4944 2.37354 11.151C2.37354 11.8075 2.63436 12.4372 3.09863 12.9015C3.56289 13.3657 4.19258 13.6266 4.84915 13.6266C5.50572 13.6266 6.13541 13.3657 6.59967 12.9015L6.94978 12.5514\" stroke=\"currentColor\"></path></svg>` },\n 'right-up-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M11.7256 2.77441C12.5538 2.77469 13.2256 3.44616 13.2256 4.27441V10.1416H12.2256V4.27441C12.2256 3.99844 12.0015 3.77469 11.7256 3.77441H5.7207V2.77441H11.7256Z\" fill=\"currentColor\"></path><path d=\"M2.77441 13.2255L12.3756 3.62427\" stroke=\"currentColor\"></path></svg>` },\n 'enhance-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M1.98486 2.95374H14.0151\" stroke=\"currentColor\"></path><path d=\"M1.98486 6.31787H14.0151\" stroke=\"currentColor\"></path><path d=\"M1.98486 9.68213H14.0151\" stroke=\"currentColor\"></path><path d=\"M1.98486 13.0463H8.4627\" stroke=\"currentColor\"></path></svg>` },\n 'trash-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M1.28149 3.88831H14.7187\" stroke=\"currentColor\"></path><path d=\"M5.41602 3.88833V2.47962C5.41602 2.29282 5.52492 2.11366 5.71876 1.98157C5.9126 1.84948 6.17551 1.77527 6.44964 1.77527H9.55053C9.82466 1.77527 10.0876 1.84948 10.2814 1.98157C10.4753 2.11366 10.5842 2.29282 10.5842 2.47962V3.88833\" stroke=\"currentColor\"></path><path d=\"M2.57349 3.88831L3.19366 13.2943C3.21937 13.5502 3.33952 13.7872 3.53065 13.9593C3.72178 14.1313 3.97016 14.2259 4.22729 14.2246H11.7728C12.0299 14.2259 12.2783 14.1313 12.4694 13.9593C12.6605 13.7872 12.7807 13.5502 12.8064 13.2943L13.4266 3.88831\" stroke=\"currentColor\"></path><path d=\"M6.44946 6.98926V11.1238\" stroke=\"currentColor\"></path><path d=\"M9.55054 6.98926V11.1238\" stroke=\"currentColor\"></path></svg>` },\n 'warning-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5Z\" stroke=\"currentColor\"></path><path d=\"M8 4.29199V9.79199\" stroke=\"currentColor\"></path><path d=\"M8 10.708V11.708\" stroke=\"currentColor\"></path></svg>` },\n 'check-circle-fill': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 36 36\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M28.1936 14.6936L19.8066 23.0806C19.2373 23.65 18.7159 24.1742 18.24 24.5571C17.7389 24.9602 17.1365 25.3359 16.3657 25.458C15.9581 25.5225 15.5428 25.5225 15.1353 25.458C14.3645 25.3359 13.7621 24.9602 13.261 24.5571C12.7851 24.1742 12.2637 23.65 11.6943 23.0806L7.80737 19.1936L10.1936 16.8074L14.0806 20.6943C14.7033 21.317 15.0763 21.6873 15.377 21.9292C15.6523 22.1507 15.7109 22.1325 15.6626 22.1248C15.7208 22.1339 15.7802 22.1339 15.8384 22.1248C15.7901 22.1325 15.8486 22.1507 16.124 21.9292C16.4247 21.6873 16.7977 21.317 17.4204 20.6943L25.8074 12.3074L28.1936 14.6936Z\" fill=\"currentColor\"></path><path d=\"M32.8496 18.0005C32.8496 9.79906 26.2019 3.15137 18.0005 3.15137C9.79906 3.15137 3.15137 9.79906 3.15137 18.0005C3.15137 26.2019 9.79906 32.8496 18.0005 32.8496C26.2019 32.8496 32.8496 26.2019 32.8496 18.0005ZM35.7764 18.0005C35.7764 27.8173 27.8173 35.7764 18.0005 35.7764C8.18363 35.7764 0.224609 27.8173 0.224609 18.0005C0.224609 8.18363 8.18363 0.224609 18.0005 0.224609C27.8173 0.224609 35.7764 8.18363 35.7764 18.0005Z\" fill=\"currentColor\"></path></svg>` },\n 'warning-triangle-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"${strokeWidth}\"><path d=\"M6.87 2.6a1.33 1.33 0 0 1 2.26 0l5.34 9.33A1.33 1.33 0 0 1 13.33 14H2.67a1.33 1.33 0 0 1-1.14-2.07Z\" stroke=\"currentColor\"></path><path d=\"M8 6v3m0 2.33h.01\" stroke=\"currentColor\"></path></svg>` },\n 'user-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M8 8.25C9.51878 8.25 10.75 7.01878 10.75 5.5C10.75 3.98122 9.51878 2.75 8 2.75C6.48122 2.75 5.25 3.98122 5.25 5.5C5.25 7.01878 6.48122 8.25 8 8.25Z\" stroke=\"currentColor\"></path><path d=\"M2.5 14.5C2.5 11.5 5.25 10.25 8 10.25C10.75 10.25 13.5 11.5 13.5 14.5\" stroke=\"currentColor\"></path></svg>` },\n // Users has inset contours in the 16px box; only coordinates, never stroke widths, carry the inset.\n 'users-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M6.18 8.2275C7.5620898 8.2275 8.6825 7.1070898 8.6825 5.725C8.6825 4.3429102 7.5620898 3.2225 6.18 3.2225C4.7979102 3.2225 3.6775 4.3429102 3.6775 5.725C3.6775 7.1070898 4.7979102 8.2275 6.18 8.2275Z\" stroke=\"currentColor\"></path><path d=\"M1.63 13.915C1.63 11.185 3.905 10.0475 6.18 10.0475C8.455 10.0475 10.73 11.185 10.73 13.915\" stroke=\"currentColor\"></path><path d=\"M10.275 3.359C11.3215 3.7685 12.0495 4.6785 12.0495 5.725C12.0495 6.7715 11.3215 7.6815 10.275 8.091\" stroke=\"currentColor\"></path><path d=\"M12.004 10.366C13.369 11.003 14.37 12.186 14.37 13.915\" stroke=\"currentColor\"></path></svg>` },\n 'paper-plane-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M4.74024 9.11029L1.82882 7.79865C1.75022 7.76323 1.75026 7.65161 1.82889 7.61626L12.9665 2.60943C13.0354 2.57846 13.1125 2.63213 13.1073 2.70749L12.3914 13.1388C12.3864 13.2117 12.3073 13.2548 12.2433 13.2194L6.12677 9.83657\" stroke=\"currentColor\"></path><path d=\"M8.44336 11.0825L6.2832 13.2843C6.22048 13.3482 6.11182 13.3038 6.11182 13.2143V9.86772C6.11182 9.84165 6.122 9.8166 6.1402 9.79793L12.972 2.78748\" stroke=\"currentColor\"></path></svg>` },\n 'stop-fill': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M12.5 2.5H3.5C2.94772 2.5 2.5 2.94772 2.5 3.5V12.5C2.5 13.0523 2.94772 13.5 3.5 13.5H12.5C13.0523 13.5 13.5 13.0523 13.5 12.5V3.5C13.5 2.94772 13.0523 2.5 12.5 2.5Z\" fill=\"currentColor\"></path></svg>` },\n 'paperclip-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M12.75 4.5V9.5C12.75 10.7598 12.2496 11.968 11.3588 12.8588C10.468 13.7496 9.25978 14.25 8 14.25C6.74022 14.25 5.53204 13.7496 4.64124 12.8588C3.75045 11.968 3.25 10.7598 3.25 9.5V5C3.25 4.13805 3.59241 3.3114 4.2019 2.7019C4.8114 2.09241 5.63805 1.75 6.5 1.75C7.36195 1.75 8.1886 2.09241 8.7981 2.7019C9.40759 3.3114 9.75 4.13805 9.75 5V9.5C9.75 9.96413 9.56563 10.4092 9.23744 10.7374C8.90925 11.0656 8.46413 11.25 8 11.25C7.53587 11.25 7.09075 11.0656 6.76256 10.7374C6.43437 10.4092 6.25 9.96413 6.25 9.5V5.5\" stroke=\"currentColor\"></path></svg>` },\n 'loading-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M12.596 12.596C11.687 13.5049 10.5288 14.1239 9.26798 14.3747C8.00716 14.6255 6.70028 14.4968 5.51261 14.0048C4.32494 13.5129 3.30981 12.6798 2.59557 11.611C1.88134 10.5421 1.50008 9.2855 1.5 7.99998C1.50008 6.71446 1.88134 5.45783 2.59557 4.38898C3.30981 3.32013 4.32494 2.48707 5.51261 1.99513C6.70028 1.50319 8.00716 1.37447 9.26798 1.62524C10.5288 1.87602 11.687 2.49502 12.596 3.40398\" stroke=\"currentColor\"></path></svg>` },\n 'download-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M8 1.95317V10.0469\" stroke=\"currentColor\"></path><path d=\"M4.25 6.29688L8 10.0469L11.75 6.29688\" stroke=\"currentColor\"></path><path d=\"M1.5 10.0469V13.158C1.5 13.3937 1.60536 13.6198 1.79289 13.7865C1.98043 13.9532 2.23478 14.0469 2.5 14.0469H13.5C13.7652 14.0469 14.0196 13.9532 14.2071 13.7865C14.3946 13.6198 14.5 13.3937 14.5 13.158V10.0469\" stroke=\"currentColor\"></path></svg>` },\n 'play-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5Z\" stroke=\"currentColor\"></path><path d=\"M10.3329 7.91346C10.3996 7.95195 10.3996 8.04818 10.3329 8.08667L6.78304 10.1362C6.71638 10.1747 6.63304 10.1266 6.63304 10.0496L6.63304 5.95055C6.63304 5.87357 6.71638 5.82546 6.78304 5.86395L10.3329 7.91346Z\" stroke=\"currentColor\"></path></svg>` },\n 'pause-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5Z\" stroke=\"currentColor\"></path><path d=\"M6.5 5V11\" stroke=\"currentColor\"></path><path d=\"M9.5 5V11\" stroke=\"currentColor\"></path></svg>` },\n 'fullscreen-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M2.33154 9.40576V13.1685C2.3318 13.4444 2.55556 13.6685 2.83154 13.6685H6.49463V14.6685H2.83154C2.00328 14.6685 1.3318 13.9967 1.33154 13.1685V9.40576H2.33154ZM13.1685 1.33154C13.9964 1.33199 14.6683 2.00352 14.6685 2.83154V6.40576H13.6685V2.83154C13.6683 2.5558 13.4441 2.33199 13.1685 2.33154H9.49463V1.33154H13.1685Z\" fill=\"currentColor\"></path><path d=\"M9.4292 6.57077L13.914 2.08594\" stroke=\"currentColor\"></path><path d=\"M6.57077 9.4292L2.08594 13.914\" stroke=\"currentColor\"></path></svg>` },\n 'code-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M6.27612 1.5L4.52612 14.5\" stroke=\"currentColor\"></path><path d=\"M11.4739 1.5L9.72388 14.5\" stroke=\"currentColor\"></path><path d=\"M2.39868 5.5H14.0681\" stroke=\"currentColor\"></path><path d=\"M1.93188 10.5H13.6013\" stroke=\"currentColor\"></path></svg>` },\n 'cordis-plugin-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M3.16143 6.59068L1.75205 8.00006L3.10619 9.35419L2.39908 10.0613L0.832948 8.49517C0.559581 8.2218 0.559582 7.77831 0.832948 7.50494L2.45432 5.88357L3.16143 6.59068ZM8.49511 15.1671C8.22176 15.4405 7.77826 15.4404 7.50489 15.1671L5.93461 13.5968L6.64172 12.8897L8 14.248L9.40938 12.8386L10.1165 13.5457L8.49511 15.1671ZM15.1671 7.50494C15.4403 7.7782 15.4401 8.22179 15.1671 8.49517L13.652 10.0102L12.9449 9.30309L14.248 8.00006L12.8897 6.64178L13.5968 5.93467L15.1671 7.50494ZM9.35414 3.10624L8 1.7521L6.69696 3.05514L5.98986 2.34803L7.50489 0.833003C7.77828 0.559981 8.22186 0.559752 8.49511 0.833003L10.0612 2.39913L9.35414 3.10624Z\" fill=\"currentColor\"></path><circle cx=\"8\" cy=\"8\" r=\"1.76221\" stroke=\"currentColor\"></circle></svg>` },\n 'api-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M3 4L7 8L3 12\" stroke=\"currentColor\"></path><path d=\"M9 12H13\" stroke=\"currentColor\"></path></svg>` },\n 'personalization-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M3.25 7.16357C3.20417 7.32247 3.17778 7.48993 3.17773 7.66357C3.17773 7.83698 3.20336 8.00486 3.24902 8.16357H1.85742V7.16357H3.25ZM14.1426 8.16357H6.71484C6.76052 8.00485 6.78613 7.837 6.78613 7.66357C6.78609 7.48991 6.75971 7.32249 6.71387 7.16357H14.1426V8.16357Z\" fill=\"currentColor\"></path><path d=\"M9.1377 11.9092C9.08596 12.0666 9.05668 12.2344 9.05664 12.4092C9.05664 12.5838 9.08606 12.7518 9.1377 12.9092H1.85742V11.9092H9.1377ZM14.1426 12.9092H12.1816C12.2332 12.7519 12.2617 12.5838 12.2617 12.4092C12.2617 12.2345 12.2333 12.0666 12.1816 11.9092H14.1426V12.9092Z\" fill=\"currentColor\"></path><path d=\"M9.1123 3.09106C9.06138 3.24865 9.03324 3.41653 9.0332 3.59106C9.0332 3.76549 9.06148 3.93355 9.1123 4.09106H1.85742V3.09106H9.1123ZM14.1426 4.09106H12.207C12.2578 3.93358 12.2861 3.76545 12.2861 3.59106C12.2861 3.41657 12.2579 3.24862 12.207 3.09106H14.1426V4.09106Z\" fill=\"currentColor\"></path><circle cx=\"4.97065\" cy=\"7.66401\" r=\"1.35151\" stroke=\"currentColor\"></circle><circle cx=\"10.6596\" cy=\"12.4091\" r=\"1.35151\" stroke=\"currentColor\"></circle><circle cx=\"10.6596\" cy=\"3.59101\" r=\"1.35151\" stroke=\"currentColor\"></circle></svg>` },\n 'project-add-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M5.54492 2.06738C5.91034 2.06754 6.26318 2.20149 6.53711 2.44336L7.94043 3.68164V4.7998C7.71462 4.74105 7.50367 4.63139 7.32617 4.47461L5.87598 3.19238C5.78477 3.11185 5.66658 3.06754 5.54492 3.06738H2.94922C2.67322 3.06738 2.44946 3.29145 2.44922 3.56738V12.4326C2.44927 12.7087 2.67311 12.9326 2.94922 12.9326H12.9326C13.2086 12.9325 13.4326 12.7086 13.4326 12.4326V8.53613H14.4326V12.4326C14.4326 13.2609 13.7609 13.9325 12.9326 13.9326H2.94922C2.12083 13.9326 1.44927 13.261 1.44922 12.4326V3.56738C1.44946 2.73916 2.12094 2.06738 2.94922 2.06738H5.54492Z\" fill=\"currentColor\"></path><path d=\"M9.75977 4.50208H14.5509\" stroke=\"currentColor\"></path><path d=\"M12.1492 6.89758L12.1492 2.10642\" stroke=\"currentColor\"></path></svg>` },\n 'folder-open-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M12.3994 13.5986H2.04956C1.49728 13.5986 1.04956 13.1509 1.04956 12.5986V3.40137C1.04956 2.84908 1.49728 2.40137 2.04956 2.40137H4.76632C5.01016 2.40137 5.24561 2.49046 5.42836 2.6519L6.94088 3.98799C7.12364 4.14943 7.35908 4.23852 7.60293 4.23852H12.3994C12.9517 4.23852 13.3994 4.68624 13.3994 5.23852V7.16991\" stroke=\"currentColor\"></path><path d=\"M2.55911 7.93683C2.67584 7.49906 3.07229 7.19446 3.52536 7.19446H13.6491C14.3061 7.19446 14.7846 7.81725 14.6153 8.45209L13.4411 12.856C13.3244 13.2938 12.9279 13.5984 12.4748 13.5984H2.35113C1.69411 13.5984 1.21562 12.9756 1.38489 12.3407L2.55911 7.93683Z\" stroke=\"currentColor\"></path></svg>` },\n 'folder-open': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M2.55912 7.93683C2.67584 7.49906 3.0723 7.19446 3.52536 7.19446H13.6491C14.3061 7.19446 14.7846 7.81725 14.6153 8.45209L13.4411 12.856C13.3244 13.2938 12.9279 13.5984 12.4748 13.5984H2.35113C1.69411 13.5984 1.21562 12.9756 1.38489 12.3407L2.55912 7.93683Z\" fill=\"currentColor\" opacity=\"0.16\"></path><path d=\"M13.6491 6.69446C14.6346 6.69453 15.3522 7.62895 15.0983 8.58118L13.9245 12.9845C13.7494 13.6412 13.1539 14.0988 12.4743 14.0988H2.35126C1.36574 14.0988 0.648153 13.1643 0.902044 12.212L2.07587 7.80774C2.25102 7.15128 2.84567 6.69455 3.52509 6.69446H13.6491ZM3.52509 7.69446C3.29865 7.69455 3.10004 7.84674 3.04169 8.06555L1.86786 12.4698C1.78345 12.7872 2.02285 13.0988 2.35126 13.0988H12.4743C12.7007 13.0988 12.8992 12.9463 12.9577 12.7277L14.1325 8.32336C14.2171 8.00598 13.9776 7.69453 13.6491 7.69446H3.52509Z\" fill=\"currentColor\"></path><path d=\"M4.7666 1.90137C5.13227 1.90144 5.48571 2.03525 5.75977 2.27734L7.27246 3.61328C7.36379 3.69382 7.48174 3.73828 7.60352 3.73828H12.3994C13.2276 3.73841 13.8993 4.41005 13.8994 5.23828V6.7168C13.8183 6.70327 13.735 6.69436 13.6494 6.69434H12.8994V5.23828C12.8993 4.96233 12.6754 4.73841 12.3994 4.73828H7.60352C7.23781 4.73828 6.88446 4.60438 6.61035 4.3623L5.09766 3.02637C5.00636 2.94576 4.88838 2.90144 4.7666 2.90137H2.0498C1.77366 2.90137 1.5498 3.12523 1.5498 3.40137V9.78223L0.902344 12.2119C0.648452 13.1642 1.36604 14.0986 2.35156 14.0986H2.0498C1.2214 14.0986 0.549838 13.427 0.549805 12.5986V3.40137C0.549805 2.57294 1.22138 1.90137 2.0498 1.90137H4.7666Z\" fill=\"currentColor\"></path></svg>` },\n 'folder-close': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M1.50439 3.11059C1.50439 2.55831 1.95211 2.1106 2.50439 2.1106H5.43389C5.67773 2.1106 5.91318 2.19969 6.09593 2.36113L7.71649 3.79265C7.89924 3.95409 8.1347 4.04319 8.3785 4.04319H13.4958C14.0481 4.04319 14.4958 4.4909 14.4958 5.04319V12.8894C14.4958 13.4417 14.0481 13.8894 13.4958 13.8894H2.50439C1.95211 13.8894 1.50439 13.4417 1.50439 12.8894V4.04319V3.11059Z\" stroke=\"currentColor\"></path><path d=\"M3.63501 7.66614H12.3647\" stroke=\"currentColor\"></path></svg>` },\n 'tree-corner': { size: 10, aspect: [8, 10], svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 11\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M0.5 0V7C0.5 7.79565 0.81607 8.55871 1.37868 9.12132C1.94129 9.68393 2.70435 10 3.5 10H8.5\" stroke=\"currentColor\"></path></svg>` },\n 'light-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M8.00007 11.8117C10.1052 11.8117 11.8117 10.1052 11.8117 8.00007C11.8117 5.89499 10.1052 4.18848 8.00007 4.18848C5.89499 4.18848 4.18848 5.89499 4.18848 8.00007C4.18848 10.1052 5.89499 11.8117 8.00007 11.8117Z\" stroke=\"currentColor\"></path><path d=\"M13.3899 8H15.1499\" stroke=\"currentColor\"></path><path d=\"M11.8115 11.8115L13.0556 13.0556\" stroke=\"currentColor\"></path><path d=\"M8 13.3901V15.1501\" stroke=\"currentColor\"></path><path d=\"M4.18868 11.8115L2.94458 13.0556\" stroke=\"currentColor\"></path><path d=\"M2.6101 8H0.850098\" stroke=\"currentColor\"></path><path d=\"M4.18868 4.18856L2.94458 2.94446\" stroke=\"currentColor\"></path><path d=\"M8 2.6101V0.850098\" stroke=\"currentColor\"></path><path d=\"M11.8115 4.18856L13.0556 2.94446\" stroke=\"currentColor\"></path></svg>` },\n 'dark-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M14.1127 8.70663C14.2576 8.60602 14.4627 8.71355 14.4386 8.88834C14.2901 9.96567 13.8731 10.9912 13.2229 11.8692C12.479 12.8735 11.4613 13.6421 10.2917 14.0829C9.1222 14.5236 7.85038 14.6179 6.62865 14.3543C5.40692 14.0907 4.28709 13.4805 3.40332 12.5967C2.51955 11.7129 1.90931 10.5931 1.64572 9.37135C1.38212 8.14962 1.47635 6.87779 1.91711 5.70825C2.35787 4.5387 3.12647 3.52103 4.13083 2.77714C5.00878 2.12689 6.03433 1.70994 7.11166 1.5614C7.28645 1.5373 7.39397 1.74238 7.29337 1.88734C6.68703 2.76099 6.37885 3.81241 6.42313 4.88345C6.47392 6.11194 6.98471 7.27645 7.85413 8.14587C8.72355 9.01529 9.88805 9.52608 11.1166 9.57687C12.1876 9.62114 13.239 9.31296 14.1127 8.70663Z\" stroke=\"currentColor\"></path></svg>` },\n 'followsystem-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M13.5 2.5H2.5C1.94772 2.5 1.5 2.94772 1.5 3.5V11.5C1.5 12.0523 1.94772 12.5 2.5 12.5H13.5C14.0523 12.5 14.5 12.0523 14.5 11.5V3.5C14.5 2.94772 14.0523 2.5 13.5 2.5Z\" stroke=\"currentColor\"></path><path d=\"M5 14.5H11\" stroke=\"currentColor\"></path></svg>` },\n 'data-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M7.8667 0.349609C8.96906 0.349634 10.0601 0.481272 11.0317 0.735352C11.9973 0.987845 12.8453 1.362 13.4644 1.84766C14.0744 2.32629 14.507 2.95539 14.5161 3.69336H14.5171V8.53516C14.0843 8.32076 13.6108 8.17679 13.1108 8.11816C13.1831 7.96848 13.2162 7.82856 13.2163 7.70312V5.76758C12.6269 6.16618 11.8739 6.47995 11.0317 6.7002C10.0602 6.95423 8.96896 7.08494 7.8667 7.08496C6.76461 7.08493 5.67411 6.95415 4.70264 6.7002C3.85994 6.48006 3.10694 6.1662 2.51709 5.76758V7.70312L2.521 7.78418C2.56374 8.19554 2.93361 8.74414 3.91357 9.23145C4.9281 9.73585 6.35004 10.0371 7.8667 10.0371C8.26373 10.0371 8.6543 10.0141 9.03271 9.97461C8.75596 10.3799 8.54664 10.8349 8.42041 11.3232C8.23666 11.3313 8.0518 11.3369 7.8667 11.3369C6.20108 11.3369 4.57025 11.01 3.33447 10.3955C3.04163 10.2499 2.76658 10.0836 2.51709 9.90039V11.6738C2.51728 12.1379 2.88589 12.7556 3.92236 13.292C4.93457 13.8157 6.35342 14.1289 7.8667 14.1289C8.12318 14.1289 8.37694 14.1161 8.62646 14.0986C8.82021 14.5535 9.08999 14.9682 9.41943 15.3271C8.91285 15.3934 8.39149 15.4287 7.8667 15.4287C6.19761 15.4287 4.56379 15.0869 3.32568 14.4463C2.11244 13.8185 1.21649 12.8562 1.21631 11.6738V3.76367C1.21595 3.74853 1.21438 3.733 1.21436 3.71777C1.21436 2.96917 1.65103 2.33053 2.26807 1.84668C2.88747 1.36112 3.73675 0.987685 4.70264 0.735352C5.67413 0.481376 6.76457 0.349636 7.8667 0.349609ZM7.8667 1.65039C6.86269 1.65042 5.88326 1.77028 5.03076 1.99316C4.17183 2.2176 3.50421 2.52956 3.06982 2.87012C2.65043 3.19909 2.52622 3.48898 2.51709 3.69336V3.74414C2.52719 3.94845 2.65185 4.23772 3.06982 4.56543C3.50425 4.90601 4.17172 5.21795 5.03076 5.44238C5.88326 5.66527 6.8627 5.78513 7.8667 5.78516C8.8707 5.78513 9.85015 5.66525 10.7026 5.44238C11.5611 5.21787 12.2286 4.9049 12.6626 4.56445C13.0982 4.22252 13.2163 3.9231 13.2163 3.71777L13.2104 3.63574C13.1818 3.43623 13.044 3.16941 12.6626 2.87012C12.2286 2.52957 11.5614 2.21773 10.7026 1.99316C9.85009 1.77025 8.8708 1.65041 7.8667 1.65039Z\" fill=\"currentColor\"></path><path d=\"M12.8936 10.0361L13.2061 10.5566C13.2296 10.5959 13.2651 10.6562 13.3027 10.707C13.3469 10.7666 13.4148 10.8431 13.5195 10.9023C13.6244 10.9617 13.725 10.9801 13.7988 10.9873C13.8619 10.9934 13.9318 10.9932 13.9775 10.9932H14.6162L14.8896 11.4502L14.5947 11.9443C14.5698 11.9859 14.5312 12.0483 14.5029 12.1084C14.4781 12.1611 14.4514 12.2312 14.4395 12.3164L14.4326 12.4072L14.4395 12.4971C14.4514 12.5825 14.4781 12.6532 14.5029 12.7061C14.5312 12.7661 14.5689 12.8287 14.5938 12.8701L14.8896 13.3633L14.6162 13.8213H13.9775C13.9318 13.8213 13.8619 13.821 13.7988 13.8271C13.7433 13.8326 13.6728 13.8442 13.5967 13.875L13.5195 13.9121C13.4148 13.9714 13.3469 14.0478 13.3027 14.1074C13.265 14.1583 13.2296 14.2186 13.2061 14.2578L12.8936 14.7783H12.3115L11.999 14.2578C11.9755 14.2186 11.9401 14.1583 11.9023 14.1074C11.8693 14.0628 11.823 14.0083 11.7578 13.959L11.6855 13.9121L11.6074 13.875C11.5316 13.8445 11.4615 13.8325 11.4062 13.8271C11.3432 13.821 11.2733 13.8213 11.2275 13.8213H10.5889L10.3135 13.3633L10.6104 12.8701C10.6352 12.8287 10.6739 12.7661 10.7021 12.7061C10.7352 12.6357 10.7724 12.534 10.7725 12.4072C10.7724 12.2804 10.7352 12.1788 10.7021 12.1084C10.6739 12.0483 10.6353 11.9859 10.6104 11.9443L10.3135 11.4502L10.5889 10.9932H11.2275C11.2733 10.9932 11.3432 10.9934 11.4062 10.9873C11.4801 10.9801 11.5808 10.9616 11.6855 10.9023C11.7903 10.843 11.8582 10.7666 11.9023 10.707C11.94 10.6562 11.9755 10.5959 11.999 10.5566L12.3115 10.0361H12.8936Z\" stroke=\"currentColor\" stroke-miterlimit=\"10\"></path></svg>` },\n 'database-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M13.1967 5.1869C13.7232 4.77378 14.0003 4.30517 14.0001 3.82819C14.0003 3.3512 13.7232 2.88259 13.1967 2.46947C12.6702 2.05635 11.9128 1.71328 11.0006 1.47475C10.0885 1.23621 9.05371 1.11062 8.00039 1.1106C6.94707 1.11057 5.9123 1.23612 5.00009 1.47461C4.08742 1.71301 3.32948 2.05604 2.80249 2.46919C2.2755 2.88235 1.99805 3.35106 1.99805 3.82819C1.99805 4.30531 2.2755 4.77402 2.80249 5.18718C3.32948 5.60033 4.08742 5.94336 5.00009 6.18176C5.9123 6.42025 6.94707 6.5458 8.00039 6.54578C9.05371 6.54575 10.0885 6.42016 11.0006 6.18163C11.9128 5.94309 12.6702 5.60002 13.1967 5.1869Z\" stroke=\"currentColor\"></path><path d=\"M2 3.80371V11.7848\" stroke=\"currentColor\"></path><path d=\"M14 3.80371V11.7848\" stroke=\"currentColor\"></path><path d=\"M2 7.81396C2 8.60524 2.63214 9.36411 3.75736 9.92363C4.88258 10.4832 6.4087 10.7975 8 10.7975C9.5913 10.7975 11.1174 10.4832 12.2426 9.92363C13.3679 9.36411 14 8.60524 14 7.81396\" stroke=\"currentColor\"></path><path d=\"M2 11.7847C2 12.6081 2.63214 13.3977 3.75736 13.98C4.88258 14.5622 6.4087 14.8893 8 14.8893C9.5913 14.8893 11.1174 14.5622 12.2426 13.98C13.3679 13.3977 14 12.6081 14 11.7847\" stroke=\"currentColor\"></path></svg>` },\n 'clock-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z\" stroke=\"currentColor\"></path><path d=\"M8 4.31V8.46L11 10.08\" stroke=\"currentColor\"></path></svg>` },\n 'gauge-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M3.4041 13.096C2.49514 12.187 1.87614 11.0288 1.62537 9.76798C1.37459 8.50716 1.50331 7.20028 1.99525 6.01261C2.48719 4.82494 3.32025 3.80981 4.3891 3.09557C5.45795 2.38134 6.71458 2.00008 8.0001 2C9.28563 2.00008 10.5423 2.38134 11.6111 3.09557C12.68 3.80981 13.513 4.82494 14.005 6.01261C14.4969 7.20028 14.6256 8.50716 14.3748 9.76798C14.1241 11.0288 13.5051 12.187 12.5961 13.096\" stroke=\"currentColor\"></path><path d=\"M8 8.49994L11.6114 4.88855\" stroke=\"currentColor\"></path><path d=\"M8 9.75C8.69036 9.75 9.25 9.19036 9.25 8.5C9.25 7.80964 8.69036 7.25 8 7.25C7.30964 7.25 6.75 7.80964 6.75 8.5C6.75 9.19036 7.30964 9.75 8 9.75Z\" fill=\"currentColor\"></path></svg>` },\n 'send-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M6.97211 1.94476C7.55785 1.35914 8.50767 1.35919 9.09343 1.94476L13.921 6.77228L13.2138 7.47939L8.38632 2.65187C8.19108 2.45682 7.87443 2.45677 7.67922 2.65187L2.74397 7.58711L2.03687 6.88L6.97211 1.94476Z\" fill=\"currentColor\"></path><path d=\"M7.97571 14.5732L8.02421 2.34139\" stroke=\"currentColor\"></path></svg>` },\n 'queue-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M5 6.75H11\" stroke=\"currentColor\"></path><path d=\"M5 9H8\" stroke=\"currentColor\"></path><path d=\"M2.37067 11.2497C1.5872 9.89252 1.32042 8.29798 1.61945 6.7597C1.91847 5.22141 2.76317 3.84293 3.99801 2.87809C5.23285 1.91325 6.7747 1.427 8.33964 1.50888C9.90458 1.59076 11.3873 2.23526 12.5147 3.32369C13.6422 4.41232 14.3384 5.8717 14.4751 7.43304C14.6118 8.99438 14.1797 10.5525 13.2585 11.8205C12.3372 13.0885 10.9889 13.9809 9.4617 14.3334C8.18666 14.6277 6.8587 14.529 5.64964 14.0601C5.17095 13.8745 4.76937 13.4929 4.26509 13.3963C3.67389 13.2832 2.95232 13.5595 2.0377 14.3334\" stroke=\"currentColor\"></path></svg>` },\n 'checklist-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M3.75 6.25C4.7165 6.25 5.5 5.4665 5.5 4.5C5.5 3.5335 4.7165 2.75 3.75 2.75C2.7835 2.75 2 3.5335 2 4.5C2 5.4665 2.7835 6.25 3.75 6.25Z\" stroke=\"currentColor\"></path><path d=\"M7.5 4.5H13.5\" stroke=\"currentColor\"></path><path d=\"M3.75 13.25C4.7165 13.25 5.5 12.4665 5.5 11.5C5.5 10.5335 4.7165 9.75 3.75 9.75C2.7835 9.75 2 10.5335 2 11.5C2 12.4665 2.7835 13.25 3.75 13.25Z\" stroke=\"currentColor\"></path><path d=\"M7.5 11.5H13.5\" stroke=\"currentColor\"></path></svg>` },\n 'list-pen-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M4.9375 5.90295H11.0625\" stroke=\"currentColor\"></path><path d=\"M4.9375 9.02991H8.27841\" stroke=\"currentColor\"></path><path d=\"M12.5 1.32617C13.3039 1.32617 14 1.95171 14 2.77637V7.61328L13 8.68164V2.77637C13 2.55186 12.8007 2.32617 12.5 2.32617H3.5C3.1993 2.32617 3 2.55186 3 2.77637V13.2246C3.00044 13.4489 3.19963 13.6738 3.5 13.6738H8.32812L7.39258 14.6738H3.5C2.69637 14.6738 2.00042 14.0489 2 13.2246V2.77637C2 1.95171 2.69613 1.32617 3.5 1.32617H12.5Z\" fill=\"currentColor\"></path><path d=\"M8.97212 14.3693C9.17511 14.5723 9.37811 14.7753 9.5811 14.9783C9.67012 14.8953 9.75914 14.8123 9.84815 14.7293C11.4505 13.2352 13.0528 11.7411 14.6551 10.247C14.7441 10.164 14.8331 10.081 14.9221 9.99803C14.5989 9.6748 14.2756 9.35157 13.9524 9.02834C13.8694 9.11736 13.7864 9.20637 13.7034 9.29539C12.2093 10.8977 10.7152 12.5 9.22113 14.1023C9.13813 14.1913 9.05513 14.2803 8.97212 14.3693Z\" fill=\"currentColor\"></path><path d=\"M11.6323 13.7841C11.6323 14.0395 11.6323 14.295 11.6323 14.5504C11.6812 14.5523 11.7301 14.5543 11.779 14.5562C12.659 14.5913 13.539 14.6263 14.419 14.6614C14.4679 14.6633 14.5168 14.6653 14.5657 14.6672C14.5657 14.3339 14.5657 14.0006 14.5657 13.6672C14.5168 13.6692 14.4679 13.6711 14.419 13.6731C13.539 13.7081 12.659 13.7432 11.779 13.7783C11.7301 13.7802 11.6812 13.7821 11.6323 13.7841Z\" fill=\"currentColor\"></path></svg>` },\n 'goal-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M14.5001 8C14.5 9.28552 14.1188 10.5422 13.4045 11.611C12.6903 12.6799 11.6752 13.5129 10.4875 14.0049C9.29982 14.4968 7.99295 14.6255 6.73212 14.3747C5.4713 14.124 4.31314 13.505 3.4041 12.596C2.49514 11.687 1.87614 10.5288 1.62537 9.26798C1.37459 8.00716 1.50331 6.70028 1.99525 5.51261C2.48719 4.32494 3.32025 3.30981 4.3891 2.59557C5.45795 1.88134 6.71458 1.50008 8.0001 1.5\" stroke=\"currentColor\"></path><path d=\"M11.5 8C11.5001 8.69227 11.2948 9.36901 10.9102 9.94463C10.5257 10.5202 9.97901 10.9689 9.33944 11.2338C8.69986 11.4987 7.99609 11.5681 7.31712 11.433C6.63816 11.2979 6.01449 10.9645 5.52501 10.475C5.03548 9.98552 4.70209 9.36185 4.56702 8.68289C4.43195 8.00392 4.50127 7.30015 4.76619 6.66057C5.03112 6.021 5.47976 5.47436 6.05538 5.08978C6.631 4.70519 7.30774 4.49995 8.00001 4.5\" stroke=\"currentColor\"></path><path d=\"M8.00024 7.99976L11.2 4.80005\" stroke=\"currentColor\"></path><path d=\"M12.4719 5.62245C12.4246 5.66972 12.3569 5.69025 12.2913 5.67715L10.7814 5.37555C10.7022 5.35972 10.6402 5.29781 10.6244 5.2186L10.3228 3.70866C10.3097 3.6431 10.3302 3.57533 10.3775 3.52806L12.1826 1.723C12.2863 1.61929 12.4627 1.65879 12.5122 1.79684L12.9271 2.95225C12.9472 3.00847 12.9915 3.05272 13.0477 3.07291L14.2031 3.48774C14.3412 3.5373 14.3807 3.71368 14.277 3.81739L12.4719 5.62245Z\" stroke=\"currentColor\"></path></svg>` },\n 'sparkle': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M5.875 3C5.875 6.33333 7.54167 8 10.875 8C7.54167 8 5.875 9.66667 5.875 13C5.875 9.66667 4.20833 8 0.875 8C4.20833 8 5.875 6.33333 5.875 3Z\" stroke=\"currentColor\"></path><path d=\"M12.375 1.55823C12.375 3.39156 13.2917 4.30823 15.125 4.30823C13.2917 4.30823 12.375 5.22489 12.375 7.05823C12.375 5.22489 11.4583 4.30823 9.625 4.30823C11.4583 4.30823 12.375 3.39156 12.375 1.55823Z\" stroke=\"currentColor\"></path><path d=\"M12.375 10.4418C12.375 11.7751 13.0417 12.4418 14.375 12.4418C13.0417 12.4418 12.375 13.1084 12.375 14.4418C12.375 13.1084 11.7083 12.4418 10.375 12.4418C11.7083 12.4418 12.375 11.7751 12.375 10.4418Z\" stroke=\"currentColor\"></path></svg>` },\n 'inspect-outline': { size: 12, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M4.67398 4.25061L1.36094 7.86484C1.29085 7.9413 1.29085 8.05866 1.36094 8.13513L4.67398 11.7494\" stroke=\"currentColor\"></path><path d=\"M11.3262 4.25061L14.6392 7.86484C14.7093 7.9413 14.7093 8.05866 14.6392 8.13513L11.3262 11.7494\" stroke=\"currentColor\"></path><path d=\"M9.56222 3.62573L6.43774 12.3743\" stroke=\"currentColor\"></path></svg>` },\n 'skill-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 17 17\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M4.57788 5.77124H10.7029\" stroke=\"currentColor\"></path><path d=\"M4.57788 8.89819H7.91879\" stroke=\"currentColor\"></path><path d=\"M12.1404 1.19446C12.9442 1.19446 13.6404 1.81999 13.6404 2.64465V8.89856H12.6404V2.64465C12.6404 2.42015 12.4411 2.19446 12.1404 2.19446H3.14038C2.83968 2.19446 2.64038 2.42015 2.64038 2.64465V13.0929C2.64082 13.3172 2.84001 13.5421 3.14038 13.5421H8.88159V14.5421H3.14038C2.33675 14.5421 1.6408 13.9172 1.64038 13.0929V2.64465C1.64038 1.81999 2.33651 1.19446 3.14038 1.19446H12.1404Z\" fill=\"currentColor\"></path><path d=\"M12.0051 15.1056C12.0051 13.6395 10.8166 12.451 9.35059 12.451C10.8166 12.451 12.0051 11.2626 12.0051 9.79651C12.0051 11.2626 13.1936 12.451 14.6597 12.451C13.1936 12.451 12.0051 13.6395 12.0051 15.1056Z\" stroke=\"currentColor\"></path></svg>` },\n 'question-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5Z\" stroke=\"currentColor\"></path><path d=\"M5.75 6.69646C5.75 6.29865 5.88196 5.90976 6.12919 5.57899C6.37643 5.24821 6.72783 4.99041 7.13896 4.83817C7.5501 4.68593 8.0025 4.6461 8.43895 4.72371C8.87541 4.80132 9.27632 4.99289 9.59099 5.27419C9.90566 5.55549 10.12 5.91388 10.2068 6.30406C10.2936 6.69423 10.249 7.09866 10.0787 7.4662C9.90843 7.83373 9.62004 8.14787 9.25003 8.36889C9.19476 8.4019 9.13803 8.43262 9.08004 8.46099C8.52566 8.73217 8 9.20817 8 9.82532\" stroke=\"currentColor\"></path><path d=\"M8 10.7416V11.7416\" stroke=\"currentColor\"></path></svg>` },\n 'info-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 14\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M12.5757 7.00012C12.5757 3.92085 10.0794 1.42463 7.00012 1.42456C3.9208 1.42456 1.42456 3.9208 1.42456 7.00012C1.42463 10.0794 3.92085 12.5757 7.00012 12.5757C10.0793 12.5756 12.5756 10.0793 12.5757 7.00012ZM13.8002 7.00012C13.8001 10.7559 10.7559 13.8001 7.00012 13.8002C3.2443 13.8002 0.199291 10.7559 0.199219 7.00012C0.199219 3.24426 3.24426 0.199219 7.00012 0.199219C10.7559 0.199291 13.8002 3.2443 13.8002 7.00012Z\" fill=\"currentColor\"></path><path d=\"M7.6127 3.18921V4.55986H6.38735V3.18921H7.6127Z\" fill=\"currentColor\"></path><path d=\"M7.6127 5.68921V10.8109H6.38735V5.68921H7.6127Z\" fill=\"currentColor\"></path></svg>` },\n 'plugin-pinwheel-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M7.84457 5.06199C11.6605 4.93876 14.7962 6.14848 14.8484 7.76397C14.8875 8.97461 13.1838 10.0696 10.7215 10.5942\" stroke=\"currentColor\"></path><path d=\"M5.12742 8.07731C5.00419 4.26138 6.21391 1.12568 7.8294 1.07351C9.04004 1.03441 10.135 2.73808 10.6596 5.20037\" stroke=\"currentColor\"></path><path d=\"M8.02457 10.6802C4.20865 10.8034 1.07294 9.5937 1.02077 7.97821C0.981678 6.76758 2.68535 5.67262 5.14763 5.14798\" stroke=\"currentColor\"></path><path d=\"M10.7476 7.89535C10.8708 11.7113 9.66109 14.847 8.0456 14.8991C6.83496 14.9382 5.74 13.2346 5.21536 10.7723\" stroke=\"currentColor\"></path></svg>` },\n 'alarm-clock-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 17 17\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M4.09372 11.9895L3.11865 14.0387\" stroke=\"currentColor\"></path><path d=\"M12.1392 11.9895L13.1143 14.0387\" stroke=\"currentColor\"></path><path d=\"M8.11646 4.78442V8.03442L10.6165 9.53442\" stroke=\"currentColor\"></path><path d=\"M8.11646 13.4094C11.154 13.4094 13.6165 10.947 13.6165 7.90942C13.6165 4.87186 11.154 2.40942 8.11646 2.40942C5.07889 2.40942 2.61646 4.87186 2.61646 7.90942C2.61646 10.947 5.07889 13.4094 8.11646 13.4094Z\" stroke=\"currentColor\"></path><path d=\"M1.75952 4.74323C2.30657 3.65639 3.12646 2.73047 4.12926 2.05542\" stroke=\"currentColor\"></path><path d=\"M14.3345 4.74323C13.7874 3.65639 12.9675 2.73047 11.9647 2.05542\" stroke=\"currentColor\"></path></svg>` },\n 'archive-outline': { size: 20, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M13.5 2.5H2.5C1.94772 2.5 1.5 2.94772 1.5 3.5V4.5C1.5 5.05228 1.94772 5.5 2.5 5.5H13.5C14.0523 5.5 14.5 5.05228 14.5 4.5V3.5C14.5 2.94772 14.0523 2.5 13.5 2.5Z\" stroke=\"currentColor\"></path><path d=\"M2.5 5.5V13.5C2.5 13.7652 2.60536 14.0196 2.79289 14.2071C2.98043 14.3946 3.23478 14.5 3.5 14.5H12.5C12.7652 14.5 13.0196 14.3946 13.2071 14.2071C13.3946 14.0196 13.5 13.7652 13.5 13.5V5.5\" stroke=\"currentColor\"></path><path d=\"M6.5 9.5H9.5\" stroke=\"currentColor\"></path></svg>` },\n 'wrap-lines-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M2.3457 3.19299H13.6541\" stroke=\"currentColor\"></path><path d=\"M2.3457 7.46497H9.19332\" stroke=\"currentColor\"></path><path d=\"M2.3457 11.7369H6.4849\" stroke=\"currentColor\"></path><path d=\"M9.1936 7.46497H11.5183C12.6981 7.46497 13.6544 8.42132 13.6544 9.60103C13.6544 10.7808 12.6981 11.7371 11.5183 11.7371H9.1936\" stroke=\"currentColor\"></path><path d=\"M10.9505 9.7677L9.12262 11.5956C9.04452 11.6737 9.04452 11.8003 9.12262 11.8784L10.9505 13.7063\" stroke=\"currentColor\"></path></svg>` },\n 'nowrap-fill': { size: 16, svg: () => '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\"><path d=\"M2 15H1V1H2V15Z\" fill=\"currentColor\"></path><path d=\"M12.3535 7.64645C12.5487 7.84171 12.5487 8.15829 12.3535 8.35355L9.85352 10.8535L9.14648 10.1465L10.793 8.5H3.5V7.5H10.793L9.14648 5.85352L9.85352 5.14648L12.3535 7.64645Z\" fill=\"currentColor\"></path><path d=\"M15 15H14V1H15V15Z\" fill=\"currentColor\"></path></svg>' },\n 'wrap-fill': { size: 16, svg: () => '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\"><path d=\"M10.9999 8C10.9999 6.89543 10.1046 6 9 6H4.5V5H9C10.6568 5 11.9999 6.34315 11.9999 8C11.9999 9.65685 10.6568 11 9 11H6.20703L6.85351 11.6465L6.14648 12.3535L4.64652 10.8536C4.45126 10.6583 4.45126 10.3417 4.64652 10.1464L6.14648 8.64648L6.85351 9.35352L6.20703 10H9C10.1046 10 10.9999 9.10457 10.9999 8Z\" fill=\"currentColor\"></path><path d=\"M2 15H1V1H2V15Z\" fill=\"currentColor\"></path><path d=\"M15 15H14V1H15V15Z\" fill=\"currentColor\"></path></svg>' },\n 'compare-split-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M6 1.5H2.5C1.94772 1.5 1.5 1.94772 1.5 2.5V13.5C1.5 14.0523 1.94772 14.5 2.5 14.5H6C6.55228 14.5 7 14.0523 7 13.5V2.5C7 1.94772 6.55228 1.5 6 1.5Z\" stroke=\"currentColor\"></path><path d=\"M13.5 1.5H10C9.44772 1.5 9 1.94772 9 2.5V13.5C9 14.0523 9.44772 14.5 10 14.5H13.5C14.0523 14.5 14.5 14.0523 14.5 13.5V2.5C14.5 1.94772 14.0523 1.5 13.5 1.5Z\" stroke=\"currentColor\"></path></svg>` },\n 'plan-outline': { size: 14, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M4.9375 5.90295H11.0625\" stroke=\"currentColor\"></path><path d=\"M4.9375 9.02991H8.27841\" stroke=\"currentColor\"></path><path d=\"M12.5 1.32617C13.3039 1.32617 14 1.95171 14 2.77637V7.61328L13 8.68164V2.77637C13 2.55186 12.8007 2.32617 12.5 2.32617H3.5C3.1993 2.32617 3 2.55186 3 2.77637V13.2246C3.00044 13.4489 3.19963 13.6738 3.5 13.6738H8.32812L7.39258 14.6738H3.5C2.69637 14.6738 2.00042 14.0489 2 13.2246V2.77637C2 1.95171 2.69613 1.32617 3.5 1.32617H12.5Z\" fill=\"currentColor\"></path><path d=\"M8.97212 14.3693C9.17511 14.5723 9.37811 14.7753 9.5811 14.9783C9.67012 14.8953 9.75914 14.8123 9.84815 14.7293C11.4505 13.2352 13.0528 11.7411 14.6551 10.247C14.7441 10.164 14.8331 10.081 14.9221 9.99803C14.5989 9.6748 14.2756 9.35157 13.9524 9.02834C13.8694 9.11736 13.7864 9.20637 13.7034 9.29539C12.2093 10.8977 10.7152 12.5 9.22113 14.1023C9.13813 14.1913 9.05513 14.2803 8.97212 14.3693Z\" fill=\"currentColor\"></path><path d=\"M11.6323 13.7841C11.6323 14.0395 11.6323 14.295 11.6323 14.5504C11.6812 14.5523 11.7301 14.5543 11.779 14.5562C12.659 14.5913 13.539 14.6263 14.419 14.6614C14.4679 14.6633 14.5168 14.6653 14.5657 14.6672C14.5657 14.3339 14.5657 14.0006 14.5657 13.6672C14.5168 13.6692 14.4679 13.6711 14.419 13.6731C13.539 13.7081 12.659 13.7432 11.779 13.7783C11.7301 13.7802 11.6812 13.7821 11.6323 13.7841Z\" fill=\"currentColor\"></path></svg>` },\n 'compact-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path opacity=\"0.35\" d=\"M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5Z\" stroke=\"currentColor\"></path><path d=\"M8 1.5C8.85359 1.5 9.69883 1.66813 10.4874 1.99478C11.2761 2.32144 11.9926 2.80022 12.5962 3.40381C13.1998 4.00739 13.6786 4.72394 14.0052 5.51256C14.3319 6.30117 14.5 7.14641 14.5 8\" stroke=\"currentColor\"></path></svg>` },\n 'shield-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M6.80132 2.14853C7.70663 1.80917 8.70422 1.80919 9.60952 2.14859L14.1296 3.84317V7.11961C14.1296 11.6089 10.7615 13.5975 8.20543 14.5779C5.64931 13.5975 2.28052 11.6089 2.28052 7.11961V3.84317L6.80132 2.14853Z\" stroke=\"currentColor\" stroke-linejoin=\"round\"></path></svg>` },\n 'check-circle-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M12.5303 6.53027L8.80273 10.2578C8.54967 10.5109 8.31796 10.7439 8.10645 10.9141C7.88375 11.0932 7.616 11.2602 7.27344 11.3145C7.09229 11.3431 6.90771 11.3431 6.72656 11.3145C6.384 11.2602 6.11625 11.0932 5.89355 10.9141C5.68204 10.7439 5.45033 10.5109 5.19727 10.2578L3.46973 8.53027L4.53027 7.46973L6.25781 9.19727C6.53457 9.47402 6.70036 9.63859 6.83398 9.74609C6.95637 9.84453 6.98241 9.83644 6.96094 9.83301C6.98679 9.83709 7.01321 9.83709 7.03906 9.83301C7.01759 9.83644 7.04363 9.84453 7.16602 9.74609C7.29964 9.63859 7.46543 9.47402 7.74219 9.19727L11.4697 5.46973L12.5303 6.53027Z\" fill=\"currentColor\"></path><path d=\"M14.5996 8C14.5996 4.35492 11.6451 1.40039 8 1.40039C4.35492 1.40039 1.40039 4.35492 1.40039 8C1.40039 11.6451 4.35492 14.5996 8 14.5996C11.6451 14.5996 14.5996 11.6451 14.5996 8ZM15.9004 8C15.9004 12.363 12.363 15.9004 8 15.9004C3.63695 15.9004 0.0996094 12.363 0.0996094 8C0.0996094 3.63695 3.63695 0.0996094 8 0.0996094C12.363 0.0996094 15.9004 3.63695 15.9004 8Z\" fill=\"currentColor\"></path></svg>` },\n 'unarchive-outline': { size: 20, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M15.8659 2.05975C17.2603 2.05995 18.3913 3.19096 18.3914 4.58527V5.4874C18.3914 6.02747 18.2192 6.52672 17.9303 6.93735C17.9336 6.96524 17.9388 6.99318 17.9388 7.02195V12.8884C17.9388 13.6345 17.9395 14.2379 17.8996 14.7254C17.8642 15.1593 17.7936 15.5499 17.6373 15.9141L17.5654 16.0685C17.278 16.6328 16.8405 17.1046 16.3038 17.434L16.0679 17.5661C15.66 17.7739 15.2196 17.8598 14.7237 17.9003C14.2362 17.9401 13.6327 17.9405 12.8867 17.9405H7.11122C6.36511 17.9405 5.76171 17.9401 5.27418 17.9003C4.84051 17.8649 4.44949 17.7952 4.08545 17.6391L3.93104 17.5661C3.36673 17.2785 2.89392 16.8414 2.56465 16.3044L2.43245 16.0685C2.22473 15.6608 2.13878 15.2211 2.09825 14.7254C2.05841 14.2379 2.05912 13.6345 2.05912 12.8884V7.02195C2.05912 6.99284 2.06422 6.96449 2.06758 6.93629C1.77931 6.52592 1.60858 6.02687 1.60858 5.4874V4.58527C1.60876 3.19084 2.73962 2.05975 4.1341 2.05975H15.8659ZM16.4984 7.92936C16.296 7.98169 16.0847 8.01288 15.8659 8.01291H4.1341C3.91478 8.01291 3.70246 7.98194 3.49955 7.92936V12.8884C3.49955 13.6582 3.50053 14.1927 3.53445 14.608C3.56769 15.0146 3.62923 15.244 3.71635 15.415L3.7925 15.5514C3.98339 15.8627 4.25749 16.1165 4.58464 16.2833L4.72529 16.3435C4.88095 16.3993 5.08638 16.4402 5.39158 16.4651C5.80685 16.4991 6.34138 16.5001 7.11122 16.5001H12.8867C13.6564 16.5001 14.1911 16.499 14.6063 16.4651C15.0128 16.432 15.2423 16.3703 15.4133 16.2833L15.5508 16.2061C15.8618 16.0152 16.116 15.7419 16.2827 15.415L16.3429 15.2732C16.3985 15.1177 16.4396 14.9128 16.4645 14.608C16.4985 14.1927 16.4984 13.6583 16.4984 12.8884V7.92936ZM4.1341 3.50019C3.53511 3.50019 3.0492 3.98631 3.04902 4.58527V5.4874C3.04902 6.08649 3.535 6.57248 4.1341 6.57248H15.8659C16.4648 6.57228 16.951 6.08638 16.951 5.4874V4.58527C16.9509 3.98644 16.4647 3.50038 15.8659 3.50019H4.1341Z\" fill=\"currentColor\"></path><path d=\"M10 14.1V10.1M7.85 12.05L10 9.9L12.15 12.05\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path></svg>` },\n 'pin-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M9.96976 1.70572L13.1554 3.93629L10.9019 8.12317L11.5158 11.605L10.7192 12.7427L2.52767 7.00693L3.3243 5.86922L6.80612 5.25528L9.96976 1.70572Z\" stroke=\"currentColor\" stroke-linejoin=\"round\"></path><path d=\"M6.05285 9.47511C6.27284 9.16094 6.70586 9.08458 7.02003 9.30457C7.3342 9.52455 7.41055 9.95757 7.19057 10.2717L3.98587 14.4708L3.21223 13.9291L6.05285 9.47511Z\" fill=\"currentColor\"></path></svg>` },\n 'pin-fill': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke-width=\"${strokeWidth}\"><path d=\"M9.96976 1.70572L13.1554 3.93629L10.9019 8.12317L11.5158 11.605L10.7192 12.7427L2.52767 7.00693L3.3243 5.86922L6.80612 5.25528L9.96976 1.70572Z\" fill=\"currentColor\" stroke=\"currentColor\" stroke-linejoin=\"round\"></path><path d=\"M6.05285 9.47511C6.27284 9.16094 6.70586 9.08458 7.02003 9.30457C7.3342 9.52455 7.41055 9.95757 7.19057 10.2717L3.98587 14.4708L3.21223 13.9291L6.05285 9.47511Z\" fill=\"currentColor\"></path></svg>` },\n 'flat-list-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"${strokeWidth}\"><path d=\"M6 3.5h7.5M6 8h7.5M6 12.5h7.5\"></path><path d=\"M2.6 3.5h.01M2.6 8h.01M2.6 12.5h.01\"></path></svg>` },\n 'workspace-tree-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"${strokeWidth}\"><path d=\"M14 12.05c0 .8-.65 1.45-1.46 1.45H3.46C2.65 13.5 2 12.85 2 12.05v-8.1c0-.8.65-1.45 1.46-1.45h2.4c.49 0 .94.24 1.21.65l.5.73c.27.4.73.65 1.21.65h3.76c.8 0 1.46.65 1.46 1.45v6.02Z\"></path><path d=\"M8.7 8.1v3M11.2 8.1v3\"></path></svg>` },\n 'chevrons-up-down-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"${strokeWidth}\"><path d=\"m5.1 6 2.9-2.9L10.9 6\"></path><path d=\"m5.1 10 2.9 2.9 2.9-2.9\"></path></svg>` },\n 'drag-handle-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"${strokeWidth}\"><path d=\"M4 5h8M4 8h8M4 11h8\"></path></svg>` },\n 'archive-off-outline': { size: 16, svg: strokeWidth => strokeWidth === ICON_MEDIUM_STROKE\n ? `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"${strokeWidth}\"><mask id=\"dsw-icon-archive-off-outline-medium-mask\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"16\" height=\"16\"><rect x=\"0\" y=\"0\" width=\"16\" height=\"16\" fill=\"white\" stroke=\"none\"></rect><path d=\"m2.2 1.3 11.6 12.8\" stroke=\"black\" stroke-width=\"4.3\"></path></mask><g mask=\"url(#dsw-icon-archive-off-outline-medium-mask)\"><rect x=\"1.9\" y=\"2.1\" width=\"12.2\" height=\"3.4\" rx=\"1.1\"></rect><path d=\"M2.95 5.7v4.8a2.9 2.9 0 0 0 2.9 2.9h4.3a2.9 2.9 0 0 0 2.9-2.9V5.7\"></path></g><path d=\"m2.2 1.3 11.6 12.8\"></path></svg>`\n : `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"${strokeWidth}\"><mask id=\"dsw-icon-archive-off-outline-regular-mask\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"16\" height=\"16\"><rect x=\"0\" y=\"0\" width=\"16\" height=\"16\" fill=\"white\" stroke=\"none\"></rect><path d=\"m2.2 1.3 11.6 12.8\" stroke=\"black\" stroke-width=\"4\"></path></mask><g mask=\"url(#dsw-icon-archive-off-outline-regular-mask)\"><rect x=\"1.9\" y=\"2.1\" width=\"12.2\" height=\"3.4\" rx=\"1.1\"></rect><path d=\"M2.95 5.7v4.8a2.9 2.9 0 0 0 2.9 2.9h4.3a2.9 2.9 0 0 0 2.9-2.9V5.7\"></path></g><path d=\"m2.2 1.3 11.6 12.8\"></path></svg>` },\n 'archive-check-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"${strokeWidth}\"><rect x=\"1.9\" y=\"2.1\" width=\"12.2\" height=\"3.4\" rx=\"1.1\"></rect><path d=\"M2.95 5.7v4.8a2.9 2.9 0 0 0 2.9 2.9h4.3a2.9 2.9 0 0 0 2.9-2.9V5.7\"></path><path d=\"m6 9.35 1.4 1.4 2.6-2.6\"></path></svg>` },\n 'sliders-two-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"${strokeWidth}\"><path d=\"M2.3 5h5.85M12.05 5h1.65\"></path><circle cx=\"9.95\" cy=\"5\" r=\"1.45\"></circle><path d=\"M2.3 11h1.65M7.85 11h5.85\"></path><circle cx=\"5.75\" cy=\"11\" r=\"1.45\"></circle></svg>` },\n 'microphone-outline': { size: 16, svg: strokeWidth => strokeWidth === ICON_MEDIUM_STROKE\n ? `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"${strokeWidth}\"><rect x=\"5.15\" y=\"1.65\" width=\"5.7\" height=\"8.7\" rx=\"2.85\"></rect><path d=\"M2.35 8.675C3.075 11.3 5.2 13.125 8 13.125C10.8 13.125 12.925 11.3 13.65 8.675M8 13.125V15\"></path></svg>`\n : `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"${strokeWidth}\"><rect x=\"5\" y=\"1.5\" width=\"6\" height=\"9\" rx=\"3\"></rect><path d=\"M2.35 8.675C3.075 11.3 5.2 13.125 8 13.125C10.8 13.125 12.925 11.3 13.65 8.675M8 13.125V15\"></path></svg>` },\n 'apps-add-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"${strokeWidth}\"><rect x=\"2.25\" y=\"2.25\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"2.25\" y=\"9.75\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"9.75\" y=\"9.75\" width=\"4\" height=\"4\" rx=\"1\"></rect><path d=\"M11.75 1.75v5M9.25 4.25h5\"></path></svg>` },\n 'apps-add-compact-outline': { size: 16, svg: strokeWidth => `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"${strokeWidth}\"><rect x=\"2.75\" y=\"2.75\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"2.75\" y=\"9.25\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"9.25\" y=\"9.25\" width=\"4\" height=\"4\" rx=\"1\"></rect><path d=\"M11.25 2.25v5M8.75 4.75h5\"></path></svg>` },\n} satisfies Record<string, IconArtwork>\n\n/** Glyph name accepted by {@link iconSymbolId}. */\nexport type IconGlyph = keyof typeof ICON_ARTWORK\n\n/** Weight suffix of a product icon symbol. */\nexport type IconWeight = 'regular' | 'medium'\n\nconst STROKES: Record<IconWeight, number> = { regular: ICON_REGULAR_STROKE, medium: ICON_MEDIUM_STROKE }\n\n/**\n * Name the sprite symbol that carries one glyph weight.\n * @param glyph - glyph key in {@link ICON_ARTWORK}.\n * @param weight - stroke weight.\n * @returns the `dsw-icon-<glyph>-<weight>` element id.\n */\nexport function iconSymbolId(glyph: IconGlyph, weight: IconWeight): IconSymbolId {\n return `dsw-icon-${glyph}-${weight}`\n}\n\n/** Sprite symbol id of one product glyph weight. */\nexport type IconSymbolId = `dsw-icon-${IconGlyph}-${IconWeight}`\n\n/** Default SVG document of every product icon symbol, keyed by symbol id. */\nexport const ICON_SYMBOLS = Object.freeze(Object.fromEntries(\n (Object.entries(ICON_ARTWORK) as [IconGlyph, IconArtwork][]).flatMap(([glyph, artwork]) =>\n (Object.keys(STROKES) as IconWeight[]).map(weight => [iconSymbolId(glyph, weight), artwork.svg(STROKES[weight])])),\n)) as Readonly<Record<IconSymbolId, string>>\n","/**\n * Shared current-color product icons. Names identify the glyph and weight;\n * rendered size remains a prop instead of part of the component name. Each\n * icon references its `dsw-icon-<glyph>-<weight>` symbol in the document icon\n * sprite that ui-theme maintains, so a theme can replace the artwork without\n * touching callers and the artwork inherits `currentColor` and CSS variables.\n */\nimport { ICON_ARTWORK, iconSymbolId, type IconGlyph, type IconWeight } from './artwork.ts'\nimport type { IconProps } from './props.ts'\n\nexport type { IconProps } from './props.ts'\nexport { ICON_MEDIUM_STROKE, ICON_REGULAR_STROKE, ICON_SYMBOLS, type IconSymbolId } from './artwork.ts'\n\n/** Shared shield contour used by composite icons outside this module. */\nexport const SHIELD_OUTLINE_PATH = 'M6.80132 2.14853C7.70663 1.80917 8.70422 1.80919 9.60952 2.14859L14.1296 3.84317V7.11961C14.1296 11.6089 10.7615 13.5975 8.20543 14.5779C5.64931 13.5975 2.28052 11.6089 2.28052 7.11961V3.84317L6.80132 2.14853Z'\n\nfunction productIcon(glyph: IconGlyph, weight: IconWeight): (props: IconProps) => React.JSX.Element {\n const { size: defaultSize, aspect: [width, height] = [1, 1] }: { size: number; aspect?: readonly [number, number] } = ICON_ARTWORK[glyph]\n const id = iconSymbolId(glyph, weight)\n return ({ size = defaultSize, className }: IconProps) => (\n <svg width={(size * width) / height} height={size} className={className} data-icon={id} aria-hidden=\"true\">\n <use href={`#${id}`} />\n </svg>\n )\n}\n\n/** Regular one-pixel IconLayersOutline artwork. */\nexport const IconLayersOutlineRegular = productIcon('layers-outline', 'regular')\n\n/** Medium IconLayersOutline artwork with a 1.3px stroke. */\nexport const IconLayersOutlineMedium = productIcon('layers-outline', 'medium')\n\n/** Regular one-pixel IconNewChatOutline artwork. */\nexport const IconNewChatOutlineRegular = productIcon('new-chat-outline', 'regular')\n\n/** Medium IconNewChatOutline artwork with a 1.3px stroke. */\nexport const IconNewChatOutlineMedium = productIcon('new-chat-outline', 'medium')\n\n/** Regular one-pixel IconSearchOutline artwork. */\nexport const IconSearchOutlineRegular = productIcon('search-outline', 'regular')\n\n/** Medium IconSearchOutline artwork with a 1.3px stroke. */\nexport const IconSearchOutlineMedium = productIcon('search-outline', 'medium')\n\n/** Regular one-pixel IconEyeOutline artwork. */\nexport const IconEyeOutlineRegular = productIcon('eye-outline', 'regular')\n\n/** Medium IconEyeOutline artwork with a 1.3px stroke. */\nexport const IconEyeOutlineMedium = productIcon('eye-outline', 'medium')\n\n/** Regular one-pixel IconEyeOffOutline artwork. */\nexport const IconEyeOffOutlineRegular = productIcon('eye-off-outline', 'regular')\n\n/** Medium IconEyeOffOutline artwork with a 1.3px stroke. */\nexport const IconEyeOffOutlineMedium = productIcon('eye-off-outline', 'medium')\n\n/** Regular one-pixel IconGlobeOutline artwork. */\nexport const IconGlobeOutlineRegular = productIcon('globe-outline', 'regular')\n\n/** Medium IconGlobeOutline artwork with a 1.3px stroke. */\nexport const IconGlobeOutlineMedium = productIcon('globe-outline', 'medium')\n\n/** Regular one-pixel IconSettingsOutline artwork. */\nexport const IconSettingsOutlineRegular = productIcon('settings-outline', 'regular')\n\n/** Medium IconSettingsOutline artwork with a 1.3px stroke. */\nexport const IconSettingsOutlineMedium = productIcon('settings-outline', 'medium')\n\n/** Regular one-pixel IconPanelLeftOutline artwork. */\nexport const IconPanelLeftOutlineRegular = productIcon('panel-left-outline', 'regular')\n\n/** Medium IconPanelLeftOutline artwork with a 1.3px stroke. */\nexport const IconPanelLeftOutlineMedium = productIcon('panel-left-outline', 'medium')\n\n/** Regular IconEllipsisOutline artwork; its fill-only geometry is weight-independent. */\nexport const IconEllipsisOutlineRegular = productIcon('ellipsis-outline', 'regular')\n\n/** Medium IconEllipsisOutline artwork; it matches Regular because the geometry is fill-only. */\nexport const IconEllipsisOutlineMedium = productIcon('ellipsis-outline', 'medium')\n\n/** Regular one-pixel IconPlusOutline artwork. */\nexport const IconPlusOutlineRegular = productIcon('plus-outline', 'regular')\n\n/** Medium IconPlusOutline artwork with a 1.3px stroke. */\nexport const IconPlusOutlineMedium = productIcon('plus-outline', 'medium')\n\n/** Regular one-pixel IconCheckOutline artwork. */\nexport const IconCheckOutlineRegular = productIcon('check-outline', 'regular')\n\n/** Medium IconCheckOutline artwork with a 1.3px stroke. */\nexport const IconCheckOutlineMedium = productIcon('check-outline', 'medium')\n\n/** Regular one-pixel IconBranchOutline artwork. */\nexport const IconBranchOutlineRegular = productIcon('branch-outline', 'regular')\n\n/** Medium IconBranchOutline artwork with a 1.3px stroke. */\nexport const IconBranchOutlineMedium = productIcon('branch-outline', 'medium')\n\n/** Regular one-pixel IconChevronDownOutline artwork. */\nexport const IconChevronDownOutlineRegular = productIcon('chevron-down-outline', 'regular')\n\n/** Medium IconChevronDownOutline artwork with a 1.3px stroke. */\nexport const IconChevronDownOutlineMedium = productIcon('chevron-down-outline', 'medium')\n\n/** Regular one-pixel IconChevronLeftOutline artwork. */\nexport const IconChevronLeftOutlineRegular = productIcon('chevron-left-outline', 'regular')\n\n/** Medium IconChevronLeftOutline artwork with a 1.3px stroke. */\nexport const IconChevronLeftOutlineMedium = productIcon('chevron-left-outline', 'medium')\n\n/** Regular one-pixel IconChevronRightOutline artwork. */\nexport const IconChevronRightOutlineRegular = productIcon('chevron-right-outline', 'regular')\n\n/** Medium IconChevronRightOutline artwork with a 1.3px stroke. */\nexport const IconChevronRightOutlineMedium = productIcon('chevron-right-outline', 'medium')\n\n/** Regular IconTriangleRightFill artwork; its fill-only geometry is weight-independent. */\nexport const IconTriangleRightFillRegular = productIcon('triangle-right-fill', 'regular')\n\n/** Medium IconTriangleRightFill artwork; it matches Regular because the geometry is fill-only. */\nexport const IconTriangleRightFillMedium = productIcon('triangle-right-fill', 'medium')\n\n/** Regular one-pixel IconChevronUpOutline artwork. */\nexport const IconChevronUpOutlineRegular = productIcon('chevron-up-outline', 'regular')\n\n/** Medium IconChevronUpOutline artwork with a 1.3px stroke. */\nexport const IconChevronUpOutlineMedium = productIcon('chevron-up-outline', 'medium')\n\n/** Regular one-pixel IconCloseOutline artwork. */\nexport const IconCloseOutlineRegular = productIcon('close-outline', 'regular')\n\n/** Medium IconCloseOutline artwork with a 1.3px stroke. */\nexport const IconCloseOutlineMedium = productIcon('close-outline', 'medium')\n\n/** Regular one-pixel IconCloseFill artwork. */\nexport const IconCloseFillRegular = productIcon('close-fill', 'regular')\n\n/** Medium IconCloseFill artwork with a 1.3px stroke. */\nexport const IconCloseFillMedium = productIcon('close-fill', 'medium')\n\n/** Regular IconCloseCircleFill artwork (cross knocked out of a filled disc); its fill-only geometry is weight-independent. */\nexport const IconCloseCircleFillRegular = productIcon('close-circle-fill', 'regular')\n\n/** Medium IconCloseCircleFill artwork; it matches Regular because the geometry is fill-only. */\nexport const IconCloseCircleFillMedium = productIcon('close-circle-fill', 'medium')\n\n/** Regular one-pixel IconCopyOutline artwork. */\nexport const IconCopyOutlineRegular = productIcon('copy-outline', 'regular')\n\n/** Medium IconCopyOutline artwork with a 1.3px stroke. */\nexport const IconCopyOutlineMedium = productIcon('copy-outline', 'medium')\n\n/** Regular one-pixel IconRefreshOutline artwork. */\nexport const IconRefreshOutlineRegular = productIcon('refresh-outline', 'regular')\n\n/** Medium IconRefreshOutline artwork with a 1.3px stroke. */\nexport const IconRefreshOutlineMedium = productIcon('refresh-outline', 'medium')\n\n/** Regular one-pixel IconLikeOutline artwork. */\nexport const IconLikeOutlineRegular = productIcon('like-outline', 'regular')\n\n/** Medium IconLikeOutline artwork with a 1.3px stroke. */\nexport const IconLikeOutlineMedium = productIcon('like-outline', 'medium')\n\n/** Regular one-pixel IconLikeFill artwork. */\nexport const IconLikeFillRegular = productIcon('like-fill', 'regular')\n\n/** Medium IconLikeFill artwork with a 1.3px stroke. */\nexport const IconLikeFillMedium = productIcon('like-fill', 'medium')\n\n/** Regular one-pixel IconDislikeOutline artwork. */\nexport const IconDislikeOutlineRegular = productIcon('dislike-outline', 'regular')\n\n/** Medium IconDislikeOutline artwork with a 1.3px stroke. */\nexport const IconDislikeOutlineMedium = productIcon('dislike-outline', 'medium')\n\n/** Regular one-pixel IconDislikeFill artwork. */\nexport const IconDislikeFillRegular = productIcon('dislike-fill', 'regular')\n\n/** Medium IconDislikeFill artwork with a 1.3px stroke. */\nexport const IconDislikeFillMedium = productIcon('dislike-fill', 'medium')\n\n/** Regular one-pixel IconShareOutline artwork. */\nexport const IconShareOutlineRegular = productIcon('share-outline', 'regular')\n\n/** Medium IconShareOutline artwork with a 1.3px stroke. */\nexport const IconShareOutlineMedium = productIcon('share-outline', 'medium')\n\n/** Regular one-pixel IconDeliverDoc artwork. */\nexport const IconDeliverDocRegular = productIcon('deliver-doc', 'regular')\n\n/** Medium IconDeliverDoc artwork with a 1.3px stroke. */\nexport const IconDeliverDocMedium = productIcon('deliver-doc', 'medium')\n\n/** Regular one-pixel IconEditOutline artwork. */\nexport const IconEditOutlineRegular = productIcon('edit-outline', 'regular')\n\n/** Medium IconEditOutline artwork with a 1.3px stroke. */\nexport const IconEditOutlineMedium = productIcon('edit-outline', 'medium')\n\n/** Regular one-pixel IconThinkOutline artwork. */\nexport const IconThinkOutlineRegular = productIcon('think-outline', 'regular')\n\n/** Medium IconThinkOutline artwork with a 1.3px stroke. */\nexport const IconThinkOutlineMedium = productIcon('think-outline', 'medium')\n\n/** Regular one-pixel IconAgentPresetOutline artwork. */\nexport const IconAgentPresetOutlineRegular = productIcon('agent-preset-outline', 'regular')\n\n/** Medium IconAgentPresetOutline artwork with a 1.3px stroke. */\nexport const IconAgentPresetOutlineMedium = productIcon('agent-preset-outline', 'medium')\n\n/** Regular one-pixel IconBrowseOutline artwork. */\nexport const IconBrowseOutlineRegular = productIcon('browse-outline', 'regular')\n\n/** Medium IconBrowseOutline artwork with a 1.3px stroke. */\nexport const IconBrowseOutlineMedium = productIcon('browse-outline', 'medium')\n\n/** Regular one-pixel IconContextInjectionOutline artwork. */\nexport const IconContextInjectionOutlineRegular = productIcon('context-injection-outline', 'regular')\n\n/** Medium IconContextInjectionOutline artwork with a 1.3px stroke. */\nexport const IconContextInjectionOutlineMedium = productIcon('context-injection-outline', 'medium')\n\n/** Regular one-pixel IconLinkOutline artwork. */\nexport const IconLinkOutlineRegular = productIcon('link-outline', 'regular')\n\n/** Medium IconLinkOutline artwork with a 1.3px stroke. */\nexport const IconLinkOutlineMedium = productIcon('link-outline', 'medium')\n\n/** Regular one-pixel IconRightUpOutline artwork. */\nexport const IconRightUpOutlineRegular = productIcon('right-up-outline', 'regular')\n\n/** Medium IconRightUpOutline artwork with a 1.3px stroke. */\nexport const IconRightUpOutlineMedium = productIcon('right-up-outline', 'medium')\n\n/** Regular one-pixel IconEnhanceOutline artwork. */\nexport const IconEnhanceOutlineRegular = productIcon('enhance-outline', 'regular')\n\n/** Medium IconEnhanceOutline artwork with a 1.3px stroke. */\nexport const IconEnhanceOutlineMedium = productIcon('enhance-outline', 'medium')\n\n/** Regular one-pixel IconTrashOutline artwork. */\nexport const IconTrashOutlineRegular = productIcon('trash-outline', 'regular')\n\n/** Medium IconTrashOutline artwork with a 1.3px stroke. */\nexport const IconTrashOutlineMedium = productIcon('trash-outline', 'medium')\n\n/** Regular one-pixel IconWarningOutline artwork. */\nexport const IconWarningOutlineRegular = productIcon('warning-outline', 'regular')\n\n/** Medium IconWarningOutline artwork with a 1.3px stroke. */\nexport const IconWarningOutlineMedium = productIcon('warning-outline', 'medium')\n\n/** Regular IconCheckCircleFill artwork (circled check); its fill-only geometry is weight-independent. */\nexport const IconCheckCircleFillRegular = productIcon('check-circle-fill', 'regular')\n\n/** Medium IconCheckCircleFill artwork; it matches Regular because the geometry is fill-only. */\nexport const IconCheckCircleFillMedium = productIcon('check-circle-fill', 'medium')\n\n/** Regular rounded warning triangle with an exclamation mark. */\nexport const IconWarningTriangleOutlineRegular = productIcon('warning-triangle-outline', 'regular')\n\n/** Medium rounded warning triangle with an exclamation mark. */\nexport const IconWarningTriangleOutlineMedium = productIcon('warning-triangle-outline', 'medium')\n\n/** Regular one-pixel IconUserOutline artwork. */\nexport const IconUserOutlineRegular = productIcon('user-outline', 'regular')\n\n/** Medium IconUserOutline artwork with a 1.3px stroke. */\nexport const IconUserOutlineMedium = productIcon('user-outline', 'medium')\n\n/** Regular one-pixel IconUsersOutline artwork: a front person with a second person behind. */\nexport const IconUsersOutlineRegular = productIcon('users-outline', 'regular')\n\n/** Medium IconUsersOutline artwork with a 1.3px stroke. */\nexport const IconUsersOutlineMedium = productIcon('users-outline', 'medium')\n\n/** Regular one-pixel IconPaperPlaneOutline artwork. */\nexport const IconPaperPlaneOutlineRegular = productIcon('paper-plane-outline', 'regular')\n\n/** Medium IconPaperPlaneOutline artwork with a 1.3px stroke. */\nexport const IconPaperPlaneOutlineMedium = productIcon('paper-plane-outline', 'medium')\n\n/** Regular IconStopFill artwork; its fill-only geometry is weight-independent. */\nexport const IconStopFillRegular = productIcon('stop-fill', 'regular')\n\n/** Medium IconStopFill artwork; it matches Regular because the geometry is fill-only. */\nexport const IconStopFillMedium = productIcon('stop-fill', 'medium')\n\n/** Regular one-pixel IconPaperclipOutline artwork. */\nexport const IconPaperclipOutlineRegular = productIcon('paperclip-outline', 'regular')\n\n/** Medium IconPaperclipOutline artwork with a 1.3px stroke. */\nexport const IconPaperclipOutlineMedium = productIcon('paperclip-outline', 'medium')\n\n/** Regular one-pixel IconLoadingOutline artwork. */\nexport const IconLoadingOutlineRegular = productIcon('loading-outline', 'regular')\n\n/** Medium IconLoadingOutline artwork with a 1.3px stroke. */\nexport const IconLoadingOutlineMedium = productIcon('loading-outline', 'medium')\n\n/** Regular one-pixel IconDownloadOutline artwork. */\nexport const IconDownloadOutlineRegular = productIcon('download-outline', 'regular')\n\n/** Medium IconDownloadOutline artwork with a 1.3px stroke. */\nexport const IconDownloadOutlineMedium = productIcon('download-outline', 'medium')\n\n/** Regular one-pixel IconPlayOutline artwork. */\nexport const IconPlayOutlineRegular = productIcon('play-outline', 'regular')\n\n/** Medium IconPlayOutline artwork with a 1.3px stroke. */\nexport const IconPlayOutlineMedium = productIcon('play-outline', 'medium')\n\n/** Regular one-pixel IconPauseOutline artwork. */\nexport const IconPauseOutlineRegular = productIcon('pause-outline', 'regular')\n\n/** Medium IconPauseOutline artwork with a 1.3px stroke. */\nexport const IconPauseOutlineMedium = productIcon('pause-outline', 'medium')\n\n/** Regular one-pixel IconFullscreenOutline artwork. */\nexport const IconFullscreenOutlineRegular = productIcon('fullscreen-outline', 'regular')\n\n/** Medium IconFullscreenOutline artwork with a 1.3px stroke. */\nexport const IconFullscreenOutlineMedium = productIcon('fullscreen-outline', 'medium')\n\n/** Regular one-pixel IconCodeOutline artwork. */\nexport const IconCodeOutlineRegular = productIcon('code-outline', 'regular')\n\n/** Medium IconCodeOutline artwork with a 1.3px stroke. */\nexport const IconCodeOutlineMedium = productIcon('code-outline', 'medium')\n\n/** Regular one-pixel IconCordisPluginOutline artwork. */\nexport const IconCordisPluginOutlineRegular = productIcon('cordis-plugin-outline', 'regular')\n\n/** Medium IconCordisPluginOutline artwork with a 1.3px stroke. */\nexport const IconCordisPluginOutlineMedium = productIcon('cordis-plugin-outline', 'medium')\n\n/** Regular one-pixel IconApiOutline artwork. */\nexport const IconApiOutlineRegular = productIcon('api-outline', 'regular')\n\n/** Medium IconApiOutline artwork with a 1.3px stroke. */\nexport const IconApiOutlineMedium = productIcon('api-outline', 'medium')\n\n/** Regular one-pixel IconPersonalizationOutline artwork. */\nexport const IconPersonalizationOutlineRegular = productIcon('personalization-outline', 'regular')\n\n/** Medium IconPersonalizationOutline artwork with a 1.3px stroke. */\nexport const IconPersonalizationOutlineMedium = productIcon('personalization-outline', 'medium')\n\n/** Regular one-pixel IconProjectAddOutline artwork. */\nexport const IconProjectAddOutlineRegular = productIcon('project-add-outline', 'regular')\n\n/** Medium IconProjectAddOutline artwork with a 1.3px stroke. */\nexport const IconProjectAddOutlineMedium = productIcon('project-add-outline', 'medium')\n\n/** Regular one-pixel IconFolderOpenOutline artwork. */\nexport const IconFolderOpenOutlineRegular = productIcon('folder-open-outline', 'regular')\n\n/** Medium IconFolderOpenOutline artwork with a 1.3px stroke. */\nexport const IconFolderOpenOutlineMedium = productIcon('folder-open-outline', 'medium')\n\n/** Regular IconFolderOpen artwork; its fill-only geometry is weight-independent. */\nexport const IconFolderOpenRegular = productIcon('folder-open', 'regular')\n\n/** Medium IconFolderOpen artwork; it matches Regular because the geometry is fill-only. */\nexport const IconFolderOpenMedium = productIcon('folder-open', 'medium')\n\n/** Regular one-pixel IconFolderClose artwork. */\nexport const IconFolderCloseRegular = productIcon('folder-close', 'regular')\n\n/** Medium IconFolderClose artwork with a 1.3px stroke. */\nexport const IconFolderCloseMedium = productIcon('folder-close', 'medium')\n\n/** Regular one-pixel IconTreeCorner artwork. */\nexport const IconTreeCornerRegular = productIcon('tree-corner', 'regular')\n\n/** Medium IconTreeCorner artwork with a 1.3px stroke. */\nexport const IconTreeCornerMedium = productIcon('tree-corner', 'medium')\n\n/** Regular one-pixel IconLightOutline artwork. */\nexport const IconLightOutlineRegular = productIcon('light-outline', 'regular')\n\n/** Medium IconLightOutline artwork with a 1.3px stroke. */\nexport const IconLightOutlineMedium = productIcon('light-outline', 'medium')\n\n/** Regular one-pixel IconDarkOutline artwork. */\nexport const IconDarkOutlineRegular = productIcon('dark-outline', 'regular')\n\n/** Medium IconDarkOutline artwork with a 1.3px stroke. */\nexport const IconDarkOutlineMedium = productIcon('dark-outline', 'medium')\n\n/** Regular one-pixel IconFollowsystemOutline artwork. */\nexport const IconFollowsystemOutlineRegular = productIcon('followsystem-outline', 'regular')\n\n/** Medium IconFollowsystemOutline artwork with a 1.3px stroke. */\nexport const IconFollowsystemOutlineMedium = productIcon('followsystem-outline', 'medium')\n\n/** Regular one-pixel IconDataOutline artwork. */\nexport const IconDataOutlineRegular = productIcon('data-outline', 'regular')\n\n/** Medium IconDataOutline artwork with a 1.3px stroke. */\nexport const IconDataOutlineMedium = productIcon('data-outline', 'medium')\n\n/** Regular one-pixel IconDatabaseOutline artwork. */\nexport const IconDatabaseOutlineRegular = productIcon('database-outline', 'regular')\n\n/** Medium IconDatabaseOutline artwork with a 1.3px stroke. */\nexport const IconDatabaseOutlineMedium = productIcon('database-outline', 'medium')\n\n/** Regular one-pixel IconClockOutline artwork. */\nexport const IconClockOutlineRegular = productIcon('clock-outline', 'regular')\n\n/** Medium IconClockOutline artwork with a 1.3px stroke. */\nexport const IconClockOutlineMedium = productIcon('clock-outline', 'medium')\n\n/** Regular one-pixel IconGaugeOutline artwork. */\nexport const IconGaugeOutlineRegular = productIcon('gauge-outline', 'regular')\n\n/** Medium IconGaugeOutline artwork with a 1.3px stroke. */\nexport const IconGaugeOutlineMedium = productIcon('gauge-outline', 'medium')\n\n/** Regular one-pixel IconSendOutline artwork. */\nexport const IconSendOutlineRegular = productIcon('send-outline', 'regular')\n\n/** Medium IconSendOutline artwork with a 1.3px stroke. */\nexport const IconSendOutlineMedium = productIcon('send-outline', 'medium')\n\n/** Regular one-pixel IconQueueOutline artwork. */\nexport const IconQueueOutlineRegular = productIcon('queue-outline', 'regular')\n\n/** Medium IconQueueOutline artwork with a 1.3px stroke. */\nexport const IconQueueOutlineMedium = productIcon('queue-outline', 'medium')\n\n/** Regular one-pixel IconChecklistOutline artwork. */\nexport const IconChecklistOutlineRegular = productIcon('checklist-outline', 'regular')\n\n/** Medium IconChecklistOutline artwork with a 1.3px stroke. */\nexport const IconChecklistOutlineMedium = productIcon('checklist-outline', 'medium')\n\n/** Regular one-pixel IconListPenOutline artwork. */\nexport const IconListPenOutlineRegular = productIcon('list-pen-outline', 'regular')\n\n/** Medium IconListPenOutline artwork with a 1.3px stroke. */\nexport const IconListPenOutlineMedium = productIcon('list-pen-outline', 'medium')\n\n/** Regular one-pixel IconGoalOutline artwork. */\nexport const IconGoalOutlineRegular = productIcon('goal-outline', 'regular')\n\n/** Medium IconGoalOutline artwork with a 1.3px stroke. */\nexport const IconGoalOutlineMedium = productIcon('goal-outline', 'medium')\n\n/** Regular one-pixel IconSparkle artwork. */\nexport const IconSparkleRegular = productIcon('sparkle', 'regular')\n\n/** Medium IconSparkle artwork with a 1.3px stroke. */\nexport const IconSparkleMedium = productIcon('sparkle', 'medium')\n\n/** Regular one-pixel IconInspectOutline artwork. */\nexport const IconInspectOutlineRegular = productIcon('inspect-outline', 'regular')\n\n/** Medium IconInspectOutline artwork with a 1.3px stroke. */\nexport const IconInspectOutlineMedium = productIcon('inspect-outline', 'medium')\n\n/** Regular one-pixel IconSkillOutline artwork. */\nexport const IconSkillOutlineRegular = productIcon('skill-outline', 'regular')\n\n/** Medium IconSkillOutline artwork with a 1.3px stroke. */\nexport const IconSkillOutlineMedium = productIcon('skill-outline', 'medium')\n\n/** Regular one-pixel IconQuestionOutline artwork. */\nexport const IconQuestionOutlineRegular = productIcon('question-outline', 'regular')\n\n/** Medium IconQuestionOutline artwork with a 1.3px stroke. */\nexport const IconQuestionOutlineMedium = productIcon('question-outline', 'medium')\n\n/** Regular IconInfoOutline artwork; its fill-only geometry is weight-independent. */\nexport const IconInfoOutlineRegular = productIcon('info-outline', 'regular')\n\n/** Medium IconInfoOutline artwork; its fill-only geometry is weight-independent. */\nexport const IconInfoOutlineMedium = productIcon('info-outline', 'medium')\n\n/** Regular one-pixel plugin pinwheel artwork. */\nexport const IconPluginPinwheelOutlineRegular = productIcon('plugin-pinwheel-outline', 'regular')\n\n/** Medium plugin pinwheel artwork with a 1.3px stroke. */\nexport const IconPluginPinwheelOutlineMedium = productIcon('plugin-pinwheel-outline', 'medium')\n\n/** Regular one-pixel IconAlarmClockOutline artwork. */\nexport const IconAlarmClockOutlineRegular = productIcon('alarm-clock-outline', 'regular')\n\n/** Medium IconAlarmClockOutline artwork with a 1.3px stroke. */\nexport const IconAlarmClockOutlineMedium = productIcon('alarm-clock-outline', 'medium')\n\n/** Regular one-pixel IconArchiveOutline artwork. */\nexport const IconArchiveOutlineRegular = productIcon('archive-outline', 'regular')\n\n/** Medium IconArchiveOutline artwork with a 1.3px stroke. */\nexport const IconArchiveOutlineMedium = productIcon('archive-outline', 'medium')\n\n/** Regular one-pixel IconWrapLinesOutline artwork. */\nexport const IconWrapLinesOutlineRegular = productIcon('wrap-lines-outline', 'regular')\n\n/** Medium IconWrapLinesOutline artwork with a 1.3px stroke. */\nexport const IconWrapLinesOutlineMedium = productIcon('wrap-lines-outline', 'medium')\n\n/** Regular IconNowrapFill artwork; fill-only weights render identically. */\nexport const IconNowrapFillRegular = productIcon('nowrap-fill', 'regular')\n\n/** Medium IconNowrapFill artwork; fill-only weights render identically. */\nexport const IconNowrapFillMedium = productIcon('nowrap-fill', 'medium')\n\n/** Regular IconWrapFill artwork; fill-only weights render identically. */\nexport const IconWrapFillRegular = productIcon('wrap-fill', 'regular')\n\n/** Medium IconWrapFill artwork; fill-only weights render identically. */\nexport const IconWrapFillMedium = productIcon('wrap-fill', 'medium')\n\n/** Regular one-pixel IconCompareSplitOutline artwork. */\nexport const IconCompareSplitOutlineRegular = productIcon('compare-split-outline', 'regular')\n\n/** Medium IconCompareSplitOutline artwork with a 1.3px stroke. */\nexport const IconCompareSplitOutlineMedium = productIcon('compare-split-outline', 'medium')\n\n/** Regular one-pixel IconPlanOutline artwork. */\nexport const IconPlanOutlineRegular = productIcon('plan-outline', 'regular')\n\n/** Medium IconPlanOutline artwork with a 1.3px stroke. */\nexport const IconPlanOutlineMedium = productIcon('plan-outline', 'medium')\n\n/** Regular one-pixel IconCompactOutline artwork. */\nexport const IconCompactOutlineRegular = productIcon('compact-outline', 'regular')\n\n/** Medium IconCompactOutline artwork with a 1.3px stroke. */\nexport const IconCompactOutlineMedium = productIcon('compact-outline', 'medium')\n\n/** Regular one-pixel IconShieldOutline artwork. */\nexport const IconShieldOutlineRegular = productIcon('shield-outline', 'regular')\n\n/** Medium IconShieldOutline artwork with a 1.3px stroke. */\nexport const IconShieldOutlineMedium = productIcon('shield-outline', 'medium')\n\n/** Regular one-pixel IconCheckCircleOutline artwork. */\nexport const IconCheckCircleOutlineRegular = productIcon('check-circle-outline', 'regular')\n\n/** Medium IconCheckCircleOutline artwork with a 1.3px stroke. */\nexport const IconCheckCircleOutlineMedium = productIcon('check-circle-outline', 'medium')\n\n/** Regular one-pixel IconUnarchiveOutline artwork. */\nexport const IconUnarchiveOutlineRegular = productIcon('unarchive-outline', 'regular')\n\n/** Medium IconUnarchiveOutline artwork with a 1.3px stroke. */\nexport const IconUnarchiveOutlineMedium = productIcon('unarchive-outline', 'medium')\n\n/** Regular one-pixel IconPinOutline artwork. */\nexport const IconPinOutlineRegular = productIcon('pin-outline', 'regular')\n\n/** Medium IconPinOutline artwork with a 1.3px stroke. */\nexport const IconPinOutlineMedium = productIcon('pin-outline', 'medium')\n\n/** Regular one-pixel IconPinFill artwork. */\nexport const IconPinFillRegular = productIcon('pin-fill', 'regular')\n\n/** Medium IconPinFill artwork with a 1.3px stroke. */\nexport const IconPinFillMedium = productIcon('pin-fill', 'medium')\n\n/** Regular one-pixel IconFlatListOutline artwork. */\nexport const IconFlatListOutlineRegular = productIcon('flat-list-outline', 'regular')\n\n/** Medium IconFlatListOutline artwork with a 1.3px stroke. */\nexport const IconFlatListOutlineMedium = productIcon('flat-list-outline', 'medium')\n\n/** Regular one-pixel IconWorkspaceTreeOutline artwork. */\nexport const IconWorkspaceTreeOutlineRegular = productIcon('workspace-tree-outline', 'regular')\n\n/** Medium IconWorkspaceTreeOutline artwork with a 1.3px stroke. */\nexport const IconWorkspaceTreeOutlineMedium = productIcon('workspace-tree-outline', 'medium')\n\n/** Regular one-pixel IconChevronsUpDownOutline artwork. */\nexport const IconChevronsUpDownOutlineRegular = productIcon('chevrons-up-down-outline', 'regular')\n\n/** Medium IconChevronsUpDownOutline artwork with a 1.3px stroke. */\nexport const IconChevronsUpDownOutlineMedium = productIcon('chevrons-up-down-outline', 'medium')\n\n/** Regular one-pixel IconDragHandleOutline artwork. */\nexport const IconDragHandleOutlineRegular = productIcon('drag-handle-outline', 'regular')\n\n/** Medium IconDragHandleOutline artwork with a 1.3px stroke. */\nexport const IconDragHandleOutlineMedium = productIcon('drag-handle-outline', 'medium')\n\n/** Regular one-pixel IconArchiveOffOutline artwork. */\nexport const IconArchiveOffOutlineRegular = productIcon('archive-off-outline', 'regular')\n\n/** Medium IconArchiveOffOutline artwork with a 1.3px stroke. */\nexport const IconArchiveOffOutlineMedium = productIcon('archive-off-outline', 'medium')\n\n/** Regular one-pixel IconArchiveCheckOutline artwork. */\nexport const IconArchiveCheckOutlineRegular = productIcon('archive-check-outline', 'regular')\n\n/** Medium IconArchiveCheckOutline artwork with a 1.3px stroke. */\nexport const IconArchiveCheckOutlineMedium = productIcon('archive-check-outline', 'medium')\n\n/** Regular one-pixel IconSlidersTwoOutline artwork. */\nexport const IconSlidersTwoOutlineRegular = productIcon('sliders-two-outline', 'regular')\n\n/** Medium IconSlidersTwoOutline artwork with a 1.3px stroke. */\nexport const IconSlidersTwoOutlineMedium = productIcon('sliders-two-outline', 'medium')\n\n/** Microphone with uniform one-pixel strokes. */\nexport const IconMicrophoneOutlineRegular = productIcon('microphone-outline', 'regular')\n\n/** Microphone with uniform 1.3px strokes. */\nexport const IconMicrophoneOutlineMedium = productIcon('microphone-outline', 'medium')\n\n/** `compact` moves the tiles 0.5px inward, for glyphs drawn at card size. */\ntype AppsAddIconProps = IconProps & { readonly compact?: boolean | undefined }\n\nfunction appsAddIcon(weight: IconWeight): (props: AppsAddIconProps) => React.JSX.Element {\n const Wide = productIcon('apps-add-outline', weight)\n const Compact = productIcon('apps-add-compact-outline', weight)\n return ({ compact = false, ...props }: AppsAddIconProps) => (compact ? <Compact {...props} /> : <Wide {...props} />)\n}\n\n/** Three entry tiles and an add mark with one-pixel strokes. */\nexport const IconAppsAddOutlineRegular = appsAddIcon('regular')\n\n/** Three entry tiles and an add mark with 1.3px strokes. */\nexport const IconAppsAddOutlineMedium = appsAddIcon('medium')\n\n/** Regular floppy-disk save action. */\nexport const IconSaveOutlineRegular = productIcon('save-outline', 'regular')\n\n/** Medium floppy-disk save action. */\nexport const IconSaveOutlineMedium = productIcon('save-outline', 'medium')\n","import clsx from 'clsx'\nimport css from './StateDot.module.css'\nimport { IconCheckOutlineRegular } from './icons/index.tsx'\n\n/**\n * State semantic: green done / amber user-attention / tertiary-grey loading /\n * red error / neutral-grey idle for a tracked subject with nothing in progress.\n */\nexport type StateDotState = 'done' | 'warning' | 'ongoing' | 'error' | 'idle'\n\n/**\n * Pin the loader's CSS animations to document time zero. A CSS animation starts\n * when its element is inserted and restarts when the element is moved or shown\n * again, so loaders started at different moments rotate out of phase; one shared\n * start time keeps every visible loader in step. Mount pins the first start; the\n * element's own `animationstart` listener pins each restart.\n * @param element - the mounted loader, or null on unmount.\n */\nfunction syncSpinner(element: SVGSVGElement | null): void {\n if (element === null) return\n pinSpinner(element)\n element.addEventListener('animationstart', () => { pinSpinner(element) })\n}\n\n/**\n * Set every CSS animation in the loader's subtree to start at document time zero.\n * @param element - the mounted loader.\n */\nfunction pinSpinner(element: SVGSVGElement): void {\n // jsdom (the unit lane) implements no Web Animations despite lib.dom's\n // non-optional typing; the optional call leaves that lane unsynced.\n const spinner = element as { getAnimations?: SVGSVGElement['getAnimations'] }\n for (const animation of spinner.getAnimations?.({ subtree: true }) ?? []) animation.startTime = 0\n}\n\n/**\n * Render a state dot.\n * @param props.state - which of `done`, `warning`, `ongoing`, `error`, or `idle` to show.\n * @param props.size - outer diameter in px; defaults to 14 for ongoing and 10 for solid states.\n * @param props.className - extra class for layout placement.\n * @param props.appearance - compact dot by default; step uses a filled check or hollow pending circle.\n * @returns the dot element (aria-hidden; pair with text for accessibility).\n */\nexport function StateDot({ state, size, className, appearance = 'dot' }: {\n state: StateDotState\n size?: number | undefined\n className?: string | undefined\n appearance?: 'dot' | 'step'\n}) {\n const edge = size ?? (state === 'ongoing' ? 14 : 10)\n if (state === 'ongoing') {\n return (\n <svg\n ref={syncSpinner}\n className={clsx(css.spinner, className)}\n data-state=\"ongoing\"\n width={edge}\n height={edge}\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\"\n >\n <g className={css.spinnerMotion}>\n <circle className={css.spinnerTrack} cx=\"12\" cy=\"12\" r=\"9.5\" />\n <circle className={css.spinnerArc} cx=\"12\" cy=\"12\" r=\"9.5\" />\n </g>\n </svg>\n )\n }\n return (\n <span\n className={clsx(appearance === 'step' ? css.step : css.dot, className)}\n data-state={state}\n style={{ width: edge, height: edge }}\n aria-hidden=\"true\"\n >{appearance === 'step' && state === 'done' && <IconCheckOutlineRegular size={edge - 2} />}</span>\n )\n}\n","/** Text activity animation shared by a row and its nested text fragments. */\nimport { createContext, memo, useContext, type ReactNode } from 'react'\nimport clsx from 'clsx'\nimport css from './TextShimmer.module.css'\n\nconst DecorativeCopy = createContext<boolean | undefined>(undefined)\n\n/** Text and activity supplied by the owning row. */\nexport interface TextShimmerProps {\n /** Text or presentational children with text in nested TextShimmer instances. No effects or element ids. */\n children: ReactNode\n /** Whether to animate; nested instances share the containing row's activity. */\n active?: boolean | undefined\n className?: string | undefined\n /** Layout class applied equally to the base and decorative content. */\n contentClassName?: string | undefined\n}\n\nfunction TextContent({ children, className }: Pick<TextShimmerProps, 'children' | 'className'>) {\n const decorative = useContext(DecorativeCopy)\n const generated = decorative === true && typeof children === 'string'\n return (\n <span className={clsx(css.text, className)} data-shimmer-text={generated ? children : undefined}>\n {generated ? null : children}\n </span>\n )\n}\n\n/**\n * Render text with one shared highlight while retaining selectable, accessible content.\n * Nested instances inherit the outer animation. Keep icons outside; mark decorative\n * separators with data-shimmer-decoration so their background follows the highlight.\n * Active children also render in an inert, clipped decoration; supply only presentation.\n * @param props - localized text, running state, and owner styling.\n * @returns retained text and its optional decorative highlight.\n */\nexport const TextShimmer = memo(function TextShimmer({ children, active = false, className, contentClassName }: TextShimmerProps) {\n const decorative = useContext(DecorativeCopy)\n if (decorative !== undefined) return <TextContent className={className}>{children}</TextContent>\n const content = typeof children === 'string' ? <TextContent>{children}</TextContent> : children\n return (\n <span className={clsx(css.root, className)} data-shimmer={active || undefined}>\n <DecorativeCopy.Provider value={false}>\n <span className={clsx(css.content, contentClassName)}>{content}</span>\n </DecorativeCopy.Provider>\n {active && (\n // React 18 forwards inert as an empty string; a boolean is dropped.\n <span className={css.decoration} aria-hidden=\"true\" {...{ inert: '' }}>\n <span className={css.sweep}>\n <DecorativeCopy.Provider value>\n <span className={clsx(css.content, css.highlight, contentClassName)}>{content}</span>\n </DecorativeCopy.Provider>\n </span>\n </span>\n )}\n </span>\n )\n})\n","import { memo, type KeyboardEvent, type MouseEvent, type ReactNode } from 'react'\nimport clsx from 'clsx'\nimport { IconChevronDownOutlineRegular, IconChevronUpOutlineRegular } from './icons/index.tsx'\nimport { TextShimmer } from './TextShimmer.tsx'\nimport css from './DisclosureRow.module.css'\n\n/** Shared 24px process row: tertiary text and icons, secondary on hover. */\nexport interface DisclosureRowProps {\n icon: ReactNode\n title: string\n open: boolean\n expandable: boolean\n onToggle: () => void\n /** Animate the complete header while its owning operation is running. */\n running?: boolean | undefined\n /** Makes the title row the disclosure target; with an accessory, it shrinks to its content width. */\n expandOnRowClick?: boolean | undefined\n /** Replaces the collapsed icon with a chevron while the row is hovered. */\n previewChevron?: boolean | undefined\n /** Keeps `collapsedContent` inline while open. */\n keepContentWhenOpen?: boolean | undefined\n collapsedContent?: ReactNode\n /** Independent action beside the title, outside the disclosure target and shimmer. */\n headerAccessory?: ReactNode\n children?: ReactNode\n className?: string | undefined\n rowClassName?: string | undefined\n /** Sizing class for the header text area, beside the leading icon. */\n contentClassName?: string | undefined\n /** Layout class shared by the header text and its decorative copy. */\n contentLayoutClassName?: string | undefined\n leadingClassName?: string | undefined\n chevronClassName?: string | undefined\n titleClassName?: string | undefined\n}\n\n/**\n * Render one disclosure header and its controlled expanded content.\n * Shallow prop comparison requires stable callbacks and React nodes to skip unchanged renders.\n * @param props - Visual content, controlled state, and interaction policy.\n * @returns the disclosure row.\n */\nexport const DisclosureRow = memo(function DisclosureRow({\n icon,\n title,\n open,\n expandable,\n onToggle,\n running = false,\n expandOnRowClick = false,\n previewChevron = expandable,\n keepContentWhenOpen = false,\n collapsedContent,\n headerAccessory,\n children,\n className,\n rowClassName,\n contentClassName,\n contentLayoutClassName,\n leadingClassName,\n chevronClassName,\n titleClassName,\n}: DisclosureRowProps) {\n const rowExpands = expandable && expandOnRowClick\n const toggleFromLeading = (event: MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation()\n onToggle()\n }\n const toggleFromKeyboard = (event: KeyboardEvent<HTMLDivElement>) => {\n if (!rowExpands || (event.key !== 'Enter' && event.key !== ' ')) return\n event.preventDefault()\n onToggle()\n }\n const collapsedLeading = previewChevron\n ? (\n <>\n <span className={css.iconIdle}>{icon}</span>\n <IconChevronDownOutlineRegular className={clsx(chevronClassName, css.chevronHover)} />\n </>\n )\n : icon\n const leading = open\n ? <IconChevronUpOutlineRegular className={chevronClassName} />\n : collapsedLeading\n\n return (\n <div className={clsx(css.root, className)} data-open={open || undefined}>\n <div className={css.header} data-disclosure-header data-has-accessory={!!headerAccessory || undefined}>\n <div\n className={clsx(css.row, rowClassName)}\n data-disclosure-row\n data-expandable={rowExpands || undefined}\n role={rowExpands ? 'button' : undefined}\n tabIndex={rowExpands ? 0 : undefined}\n aria-expanded={rowExpands ? open : undefined}\n onClick={rowExpands ? onToggle : undefined}\n onKeyDown={rowExpands ? toggleFromKeyboard : undefined}\n >\n {expandable && !rowExpands ? (\n <button\n type=\"button\"\n className={clsx(css.leading, leadingClassName)}\n aria-label={title}\n aria-expanded={open}\n onClick={toggleFromLeading}\n >\n {leading}\n </button>\n ) : (\n <span className={clsx(css.leading, leadingClassName)}>\n {leading}\n </span>\n )}\n <TextShimmer active={running} className={contentClassName} contentClassName={contentLayoutClassName}>\n <TextShimmer className={clsx(css.title, titleClassName)}>{title}</TextShimmer>\n {(keepContentWhenOpen || !open) && collapsedContent}\n </TextShimmer>\n </div>\n {headerAccessory}\n </div>\n {open && children}\n </div>\n )\n})\n","/** React-commit-driven movement and entry/exit fades for keyed rows. */\nimport { Component, createRef, type AriaRole, type ReactNode } from 'react'\nimport css from './AnimatedRows.module.css'\n\nconst ROW_FADE_MS = 100\nconst ROW_GLIDE_MS = 200\n\n/** Keyed row content, list semantics, and animation readiness. */\nexport interface AnimatedRowsProps {\n children: ReactNode\n className: string\n role?: AriaRole\n label?: string\n /** Unique DOM-order keys matching the rendered data-row-key attributes. */\n rowKeys: readonly string[]\n ready: boolean\n /** Changes that replace the view or reveal hidden rows settle immediately. */\n resetKey: string\n}\n\ninterface RowPosition {\n element: HTMLElement\n rect: DOMRect\n opacity: number\n}\n\ntype Viewport = Pick<DOMRect, 'top' | 'bottom' | 'left' | 'right'>\n\ninterface RowSnapshot {\n viewport: Viewport\n positions: Map<string, RowPosition>\n removed: Map<string, RowPosition>\n}\n\nfunction sameRows(previous: AnimatedRowsProps, next: AnimatedRowsProps): boolean {\n return previous.rowKeys.length === next.rowKeys.length\n && previous.rowKeys.every((key, index) => key === next.rowKeys[index])\n}\n\nfunction visibleViewport(list: HTMLElement): Viewport {\n const rect = list.getBoundingClientRect()\n return {\n top: Math.max(0, rect.top), bottom: Math.min(window.innerHeight, rect.bottom),\n left: Math.max(0, rect.left), right: Math.min(window.innerWidth, rect.right),\n }\n}\n\nfunction intersects(row: DOMRect, viewport: Viewport): boolean {\n return row.bottom > viewport.top && row.top < viewport.bottom\n && row.right > viewport.left && row.left < viewport.right\n}\n\n/**\n * Animates keyed rows only when their rendered membership or order changes.\n * Rows must intersect both the list and the browser window before or after the commit.\n * Motion starts after the first pointer or keyboard input inside the mounted list.\n * The parent supplies a positioned container for the inert exit overlay.\n */\nexport class AnimatedRows extends Component<AnimatedRowsProps> {\n private armed = false\n private readonly list = createRef<HTMLDivElement>()\n private readonly overlay = createRef<HTMLDivElement>()\n private readonly movements = new Map<HTMLElement, Animation>()\n private readonly exits = new Map<string, { element: HTMLElement; animation: Animation }>()\n\n override getSnapshotBeforeUpdate(previous: AnimatedRowsProps): RowSnapshot | null {\n const list = this.list.current\n if (!this.armed || sameRows(previous, this.props) || previous.resetKey !== this.props.resetKey\n || !previous.ready || !this.props.ready || list === null\n || typeof list.animate !== 'function'\n || window.matchMedia('(prefers-reduced-motion: reduce)').matches) return null\n\n const viewport = visibleViewport(list)\n const positions = this.readPositions()\n const nextKeys = new Set(this.props.rowKeys)\n const removed = new Map<string, RowPosition>()\n for (const [key, row] of positions) {\n if (nextKeys.has(key) || !intersects(row.rect, viewport)) continue\n const clone = row.element.cloneNode(true) as HTMLElement\n clone.removeAttribute('data-row-key')\n clone.inert = true\n clone.style.paddingInlineStart = getComputedStyle(row.element).paddingInlineStart\n removed.set(key, { ...row, element: clone })\n }\n return { viewport, positions, removed }\n }\n\n override componentDidUpdate(previous: AnimatedRowsProps, _state: unknown, snapshot: RowSnapshot | null): void {\n if (snapshot === null) {\n if (!sameRows(previous, this.props) || previous.resetKey !== this.props.resetKey\n || previous.ready !== this.props.ready) this.clear()\n return\n }\n\n this.cancelMovements()\n const list = this.list.current as HTMLDivElement\n const overlay = this.overlay.current as HTMLDivElement\n const viewport = visibleViewport(list)\n const origin = overlay.getBoundingClientRect()\n const positions = this.readPositions()\n\n for (const [key, row] of positions) {\n this.removeExit(key)\n const previousRow = snapshot.positions.get(key)\n if (!intersects(row.rect, viewport)\n && (previousRow === undefined || !intersects(previousRow.rect, snapshot.viewport))) continue\n if (previousRow === undefined) {\n this.move(row.element, [{ opacity: 0 }, { opacity: 1 }], ROW_FADE_MS)\n continue\n }\n const dx = previousRow.rect.left - row.rect.left\n const dy = previousRow.rect.top - row.rect.top\n if (dx === 0 && dy === 0 && previousRow.opacity === 1) continue\n this.move(row.element, [\n { transform: `translate(${String(dx)}px, ${String(dy)}px)`, opacity: previousRow.opacity },\n { transform: 'translate(0, 0)', opacity: 1 },\n ], ROW_GLIDE_MS)\n }\n\n for (const [key, row] of snapshot.removed) {\n const { element } = row\n this.removeExit(key)\n Object.assign(element.style, {\n position: 'absolute', margin: '0', transform: 'none', boxSizing: 'border-box',\n left: `${String(row.rect.left - origin.left)}px`,\n top: `${String(row.rect.top - origin.top)}px`,\n width: `${String(row.rect.width)}px`, height: `${String(row.rect.height)}px`,\n })\n overlay.append(element)\n const animation = element.animate([{ opacity: row.opacity }, { opacity: 0 }], {\n duration: ROW_FADE_MS, easing: 'ease-out', fill: 'forwards',\n })\n this.exits.set(key, { element, animation })\n animation.onfinish = () => { this.removeExit(key) }\n }\n }\n\n override componentWillUnmount(): void {\n this.clear()\n }\n\n private readPositions(): Map<string, RowPosition> {\n const list = this.list.current as HTMLDivElement\n const rows = list.querySelectorAll<HTMLElement>('[data-row-key]')\n return new Map(Array.from(rows, element => [element.dataset.rowKey as string, {\n element,\n rect: element.getBoundingClientRect(),\n opacity: this.movements.has(element) ? Number(getComputedStyle(element).opacity) : 1,\n }]))\n }\n\n private move(element: HTMLElement, keyframes: Keyframe[], duration: number): void {\n const animation = element.animate(keyframes, { duration, easing: 'ease-out' })\n this.movements.set(element, animation)\n animation.onfinish = () => { this.movements.delete(element); animation.cancel() }\n }\n\n private cancelMovements(): void {\n for (const animation of this.movements.values()) {\n animation.onfinish = null\n animation.cancel()\n }\n this.movements.clear()\n }\n\n private removeExit(key: string): void {\n const exit = this.exits.get(key)\n if (exit === undefined) return\n exit.animation.onfinish = null\n exit.animation.cancel()\n exit.element.remove()\n this.exits.delete(key)\n }\n\n private clear(): void {\n this.cancelMovements()\n for (const key of this.exits.keys()) this.removeExit(key)\n }\n\n override render(): ReactNode {\n return <>\n <div\n ref={this.list}\n className={this.props.className}\n role={this.props.role}\n aria-label={this.props.label}\n onPointerDownCapture={() => { this.armed = true }}\n onKeyDownCapture={() => { this.armed = true }}\n >\n {this.props.children}\n </div>\n <div ref={this.overlay} className={css.exits} aria-hidden=\"true\" />\n </>\n }\n}\n","/** Offscreen row snapshots for native browser dragging. */\nimport { useEffect, useMemo, useRef } from 'react'\nimport type { DragEvent } from 'react'\nimport clsx from 'clsx'\nimport css from './RowDragPreview.module.css'\n\n/**\n * Own a row's inert drag preview until drag end, replacement, or unmount.\n * The offscreen copy keeps WebKit snapshots separate from overlapping panels.\n * The wrapper copies only explicitly requested computed custom properties.\n * Its cloned slot DOM remains in document.body for that lifetime; query live rows\n * within their list to exclude duplicate text and element IDs.\n * @param className - preview background matching the row's surface; WebKit fills\n * transparent snapshot pixels white, including rounded corners.\n * @param inheritedProperties - custom-property names whose computed values the preview needs.\n * Omit to copy none. Keep the list reference stable; replacing it clears the active preview.\n * @returns preview callbacks; cleanup reports whether this row started a drag,\n * even when its preview failed or the row became non-draggable before drag end.\n * Start accepts the source row when a child handle owns the drag event.\n */\nexport function useRowDragPreview(className: string, inheritedProperties?: readonly `--${string}`[]): {\n start: (event: DragEvent<HTMLElement>, row?: HTMLElement) => void\n clear: () => boolean\n} {\n const current = useRef<HTMLDivElement | null>(null)\n const dragging = useRef(false)\n const preview = useMemo(() => {\n const clear = (): boolean => {\n const wasDragging = dragging.current\n dragging.current = false\n current.current?.remove()\n current.current = null\n return wasDragging\n }\n return {\n clear,\n start: (event: DragEvent<HTMLElement>, row = event.currentTarget): void => {\n clear()\n dragging.current = true\n const rect = row.getBoundingClientRect()\n const style = getComputedStyle(row)\n const copy = row.cloneNode(true) as HTMLElement\n copy.removeAttribute('data-row-key')\n copy.tabIndex = -1\n for (const control of copy.querySelectorAll<HTMLElement>(\n 'button, a[href], input, select, textarea, [tabindex], [contenteditable]',\n )) control.tabIndex = -1\n copy.style.color = style.color\n copy.style.paddingInlineStart = style.paddingInlineStart\n const image = row.ownerDocument.createElement('div')\n image.className = clsx(css.preview, className)\n image.inert = true\n image.setAttribute('aria-hidden', 'true')\n inheritedProperties?.forEach((property) => {\n image.style.setProperty(property, style.getPropertyValue(property))\n })\n Object.assign(image.style, {\n left: `${String(-rect.width)}px`, width: `${String(rect.width)}px`,\n height: `${String(rect.height)}px`, font: style.font,\n })\n image.append(copy)\n row.ownerDocument.body.append(image)\n current.current = image\n try {\n event.dataTransfer.setDragImage(image, event.clientX - rect.left, event.clientY - rect.top)\n } catch (_error) {\n // Browsers may reject a custom image; retain native dragging without the copy.\n image.remove()\n current.current = null\n }\n },\n }\n }, [className, inheritedProperties])\n useEffect(() => () => { preview.clear() }, [preview])\n return preview\n}\n","// Button: token-styled button atom. Variants map to the --dsw-alias-button-*\n// fill families; no framework imports, all behavior via props.\n\nimport { forwardRef, type ButtonHTMLAttributes, type ReactNode } from 'react'\nimport clsx from 'clsx'\nimport css from './Button.module.css'\n\n/** Visual variant, each backed by its --dsw-alias-button-* token family. */\nexport type ButtonVariant = 'primary' | 'ghost' | 'outline' | 'toolbar'\n\ntype ButtonProps = {\n variant?: ButtonVariant\n size?: 'md' | 'sm'\n icon?: ReactNode\n className?: string | undefined\n children?: ReactNode\n} & ButtonHTMLAttributes<HTMLButtonElement>\n\n/**\n * Render a button.\n * @param props.variant - visual family (default 'ghost'); outlined buttons use a DPR-aware inset stroke.\n * @param props.size - 'md' 36px control with 12px corners or 'sm' 28px control with 8px corners.\n * @param props.icon - optional leading 16px icon node.\n * @param ref - native button for focus management and overlay anchors.\n * @returns the button element; native button attributes pass through.\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button({\n variant = 'ghost', size = 'md', icon, className, children, ...rest\n}, ref) {\n return (\n <button ref={ref} type=\"button\" className={clsx(css.button, css[variant], css[size], className)} {...rest}>\n {icon != null && <span className={css.icon}>{icon}</span>}\n {children}\n </button>\n )\n})\n","/** Choose between a side child card and a single-panel child page from layout-viewport space. */\n\n/** Gap between the parent card and a side child card, matching `.submenu` in Menu.module.css. */\nexport const SUBMENU_GAP = 4\n/** Layout-viewport inset shared with every portalled Menu card. */\nexport const SUBMENU_MARGIN = 12\n\n/**\n * Report whether neither side of the parent card can hold the child card.\n * CSS anchors place the side card and flip it; this decision only selects the page layout.\n * @param parent - Parent card rectangle in client coordinates.\n * @param width - Natural child card width.\n * @param viewportWidth - Layout viewport width.\n * @returns true when the child must replace the parent page.\n */\nexport function submenuNeedsPage(parent: DOMRect, width: number, viewportWidth: number): boolean {\n const right = parent.right + SUBMENU_GAP + width <= viewportWidth - SUBMENU_MARGIN\n const left = parent.left - SUBMENU_GAP - width >= SUBMENU_MARGIN\n return !right && !left\n}\n","import { useCallback, useEffect, useRef } from 'react'\n\n/**\n * Grace before a pointer-dismissed popup closes. Covers the anchor->popup gap\n * (8px for HoverCard, 4px for Menu) at a hand's travel speed without leaving a\n * popup lingering once the pointer has genuinely moved on.\n */\nexport const POINTER_GRACE_MS = 200\n\n/** Cancelable delayed close for a pointer-dismissed popup. */\nexport interface PointerGrace {\n /** Schedule the close {@link POINTER_GRACE_MS} from now, replacing any pending one. */\n arm: () => void\n /** Abort a pending close (the pointer came back). */\n cancel: () => void\n}\n\n/**\n * Delay a pointer-dismissed popup's close so the pointer can cross the gap\n * between anchor and popup. A pending close is dropped on unmount.\n * @param close - runs when the grace elapses with no re-entry; read at fire\n * time, so callers may pass a fresh closure each render.\n * @returns the {@link PointerGrace} handle.\n */\nexport function usePointerGrace(close: () => void): PointerGrace {\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n const closeRef = useRef(close)\n closeRef.current = close\n\n const cancel = useCallback(() => {\n if (timerRef.current === null) return\n clearTimeout(timerRef.current)\n timerRef.current = null\n }, [])\n\n const arm = useCallback(() => {\n cancel()\n timerRef.current = setTimeout(() => {\n timerRef.current = null\n closeRef.current()\n }, POINTER_GRACE_MS)\n }, [cancel])\n\n useEffect(() => cancel, [cancel])\n\n return { arm, cancel }\n}\n","/** Owns one menu's child layout mode, pointer grace, and focus transitions. */\nimport { useId, useLayoutEffect, useRef, useState } from 'react'\nimport type { RefObject, SyntheticEvent } from 'react'\nimport type { MenuEntry, MenuItem } from './Menu.tsx'\nimport { submenuNeedsPage } from './menu-submenu-position.ts'\nimport { usePointerGrace } from './pointer-grace.ts'\n\n/** Whether a pointer event can request hover interactions.\n * @param event - current pointer, including mixed-input touch events.\n * @returns true for non-touch input with an available hover device.\n */\nexport function menuHoverAllowed(event: { pointerType: string }): boolean {\n return event.pointerType !== 'touch' && window.matchMedia('(any-hover: hover)').matches\n}\n\ninterface MenuSubmenu {\n entry: (MenuItem & { submenu: readonly MenuEntry[] }) | undefined\n panelRef: RefObject<HTMLDivElement>\n /** CSS anchor name of the root card's anchor box; the child card is placed against it. */\n parentAnchor: string\n /** Whether the layout mode for the current child is known; the card stays hidden until it is. */\n measured: boolean\n page: boolean\n hidden: boolean\n contains: (node: Node | null) => boolean\n activeList: (focused: Node | null) => HTMLDivElement | null\n /** Returns false when no visible child can handle the navigation. */\n returnToParent: () => boolean\n openChild: (id: string, target: HTMLButtonElement, enter?: boolean) => void\n focusParent: (id: string, target: HTMLButtonElement) => void\n leave: () => void\n cancelClose: () => void\n collapseFrom: (event: SyntheticEvent<HTMLDivElement>) => void\n}\n\n/** Manage a single child card without owning the root menu's document listeners.\n * @param options - current entries, root lifetime, and fallback focus destination.\n * @returns child rendering data and narrow interaction operations.\n */\nexport function useMenuSubmenu(options: {\n open: boolean\n items: readonly MenuEntry[]\n footer: readonly MenuEntry[] | undefined\n listRef: RefObject<HTMLDivElement>\n refocusAnchor: () => void\n}): MenuSubmenu {\n const { open, items, footer, listRef, refocusAnchor } = options\n const [expanded, setExpanded] = useState<{ id: string; trigger: HTMLButtonElement; activated: boolean } | null>(null)\n const panelRef = useRef<HTMLDivElement>(null)\n // A DOM target suppresses its focus-open handler until focus restoration completes.\n const pendingFocus = useRef<'child' | HTMLButtonElement | null>(null)\n const entry = [...items, ...(footer ?? [])].find((item): item is MenuItem & { submenu: readonly MenuEntry[] } =>\n !('type' in item) && item.id === expanded?.id && item.disabled !== true\n && item.submenu !== undefined && item.submenu.length > 0)\n const trigger = expanded?.trigger ?? null\n const anchorId = useId().replaceAll(':', '')\n const parentAnchor = `--dsh-submenu-parent-${anchorId}`\n // Null until the active child has been measured against the layout viewport.\n const [needsPage, setNeedsPage] = useState<boolean | null>(null)\n const contains = (node: Node | null): boolean => panelRef.current?.contains(node) === true\n const invalidated = expanded !== null && entry === undefined\n // These reads precede React removing an invalidated panel or a page's return row.\n const active = document.activeElement\n const restoreInvalidatedFocus = open && invalidated && (contains(active) || trigger === active)\n const backWasFocused = contains(active) && active?.hasAttribute('data-menu-back') === true\n const measured = needsPage !== null\n const page = entry !== undefined && expanded?.activated === true && needsPage === true\n const hidden = !measured || (needsPage && !page)\n // CSS anchors place the card against the parent card. JavaScript selects the layout and\n // supplies two lengths: the card's natural height and the active row's offset from the\n // parent card's top. Both are relative sizes, so page zoom and panning leave them valid.\n const visible = open && entry !== undefined\n useLayoutEffect(() => {\n const panel = panelRef.current\n const parent = listRef.current\n if (!visible || panel === null || parent === null || trigger === null) { setNeedsPage(null); return }\n const measureRow = (): void => {\n panel.style.setProperty('--dsh-submenu-row-offset', `${trigger.getBoundingClientRect().top - parent.getBoundingClientRect().top}px`)\n }\n // The layout uses the side card's natural size, not the size a page layout gives it.\n const measure = (): void => {\n const layout = panel.getAttribute('data-submenu-layout')\n panel.removeAttribute('data-submenu-layout')\n const width = panel.offsetWidth\n panel.style.setProperty('--dsh-submenu-height', `${panel.offsetHeight}px`)\n if (layout !== null) panel.setAttribute('data-submenu-layout', layout)\n measureRow()\n const viewport = document.documentElement.clientWidth || window.innerWidth\n setNeedsPage(submenuNeedsPage(parent.getBoundingClientRect(), width, viewport))\n }\n measure()\n window.addEventListener('resize', measure)\n parent.addEventListener('scroll', measureRow, true)\n const observer = new ResizeObserver(measure)\n for (const element of [parent, trigger, panel]) observer.observe(element)\n return () => {\n window.removeEventListener('resize', measure)\n parent.removeEventListener('scroll', measureRow, true)\n observer.disconnect()\n }\n }, [visible, entry, trigger, listRef])\n const focusFirstChild = (): void => {\n const panel = panelRef.current\n const first = panel?.querySelector<HTMLButtonElement>('button[role=\"menuitem\"]:not(:disabled):not([data-menu-back])')\n ?? panel?.querySelector<HTMLButtonElement>('button:not(:disabled)')\n first?.focus()\n }\n const returnToParent = (): void => {\n cancelClose()\n pendingFocus.current = trigger\n setExpanded(null)\n }\n const collapse = (): void => {\n cancelClose()\n if (contains(document.activeElement)) returnToParent()\n else setExpanded(null)\n }\n const { arm: armClose, cancel: cancelClose } = usePointerGrace(() => { if (!page) collapse() })\n const openChild = (id: string, target: HTMLButtonElement, enter = false): void => {\n cancelClose()\n if (trigger !== target && contains(document.activeElement)) {\n pendingFocus.current = target\n target.focus()\n pendingFocus.current = null\n }\n pendingFocus.current = enter ? 'child' : null\n setExpanded(current => current?.id === id\n ? enter && !current.activated ? { ...current, activated: true } : current\n : { id, trigger: target, activated: enter })\n if (enter) focusFirstChild()\n }\n useLayoutEffect(() => {\n if (!open || invalidated) {\n cancelClose()\n pendingFocus.current = null\n setExpanded(null)\n if (restoreInvalidatedFocus && (document.activeElement === document.body || document.activeElement === trigger)) {\n const target = trigger?.isConnected === true && !trigger.disabled ? trigger\n : listRef.current?.querySelector<HTMLButtonElement>('button:not(:disabled)')\n pendingFocus.current = target ?? null\n if (target != null) target.focus()\n else refocusAnchor()\n pendingFocus.current = null\n }\n return\n }\n if (entry === undefined && pendingFocus.current instanceof HTMLButtonElement) {\n pendingFocus.current.focus()\n pendingFocus.current = null\n }\n if (entry === undefined || hidden) return\n if (pendingFocus.current === 'child' || (page && listRef.current?.contains(document.activeElement))\n || (!page && backWasFocused)) {\n focusFirstChild()\n pendingFocus.current = null\n }\n }, [open, entry, needsPage, page, hidden, invalidated, restoreInvalidatedFocus, backWasFocused, cancelClose])\n\n const collapseFrom = (event: SyntheticEvent<HTMLDivElement>): void => {\n // React DOM normalizes text-node event targets to their parent element.\n const row = (event.target as Element).closest('button[role=\"menuitem\"]')\n if (row === null || row.getAttribute('aria-haspopup') === 'menu') return\n if (row.closest('[role=\"menu\"]') === event.currentTarget) collapse()\n }\n return {\n entry, panelRef, parentAnchor, measured, page, hidden,\n contains,\n activeList: (focused: Node | null) => page || contains(focused) ? panelRef.current : listRef.current,\n returnToParent: (): boolean => {\n if (entry === undefined || hidden) return false\n returnToParent()\n return true\n },\n openChild,\n focusParent: (id: string, target: HTMLButtonElement): void => {\n if (pendingFocus.current !== target) openChild(id, target)\n },\n leave: (): void => { if (!page) armClose() },\n cancelClose,\n collapseFrom,\n }\n}\n","/** Shared shortcut keycaps; callers supply the effective platform presentation. */\nimport css from './ShortcutKeys.module.css'\nimport clsx from 'clsx'\n\n/**\n * Render one command's keycaps without owning binding defaults or localized copy.\n * @param props - effective key labels, presentation variant and optional interaction styling.\n * @returns unboxed keys by default, or tooltip keycaps with plus-separated combinations grouped together.\n */\nexport function ShortcutKeys({ keys, variant = 'plain', className }: { keys: readonly string[]; variant?: 'plain' | 'tooltip'; className?: string | undefined }) {\n return <span className={clsx(css.keys, variant === 'tooltip' && css.tooltip, variant === 'tooltip' && keys.includes('+') && css.joined, className)}>{keys.map((key, index) => <kbd key={index} className={key === '+' ? css.separator : css.key}>{key}</kbd>)}</span>\n}\n","/** Deterministic tooltip placement using measured border boxes and viewport coordinates. */\n/** Bubble placement relative to the anchor. */\nexport type TooltipSide = 'right' | 'left' | 'bottom' | 'top'\n\ninterface PlacementInput {\n anchor: { left: number; right: number; top: number; bottom: number }\n width: number\n height: number\n viewportWidth: number\n viewportHeight: number\n side: TooltipSide\n align: 'center' | 'end'\n gap: number\n}\n\ninterface TooltipPlacement {\n left: number\n top: number\n width: number\n height: number\n side: TooltipSide\n /** No complete side fits, so placement is bounded by the viewport instead. */\n overflow: boolean\n}\n\nconst opposite: Record<TooltipSide, TooltipSide> = { right: 'left', left: 'right', top: 'bottom', bottom: 'top' }\n\n/**\n * Prefer the requested side, its opposite, then perpendicular sides without covering the anchor.\n * @param input - Observed dimensions, anchor edges, viewport and requested placement; horizontal gaps remain 10px.\n * @returns Border-box coordinates and the selected side; if no side fits, a viewport-bounded fallback.\n */\nexport function placeTooltip(input: PlacementInput): TooltipPlacement {\n const { anchor, viewportWidth, viewportHeight, side, align, gap } = input\n let { width, height } = input\n const margin = 12\n const maxWidth = Math.max(0, viewportWidth - margin * 2)\n const maxHeight = Math.max(0, viewportHeight - margin * 2)\n width = Math.min(width, maxWidth)\n height = Math.min(height, maxHeight)\n const clampX = (x: number) => Math.max(margin, Math.min(x, viewportWidth - margin - width))\n const clampY = (y: number) => Math.max(margin, Math.min(y, viewportHeight - margin - height))\n const horizontal = side === 'right' || side === 'left'\n const candidates: TooltipSide[] = [side, opposite[side], ...horizontal ? ['bottom', 'top'] as const : ['right', 'left'] as const]\n const positions = {\n right: { left: anchor.right + 10, top: clampY((anchor.top + anchor.bottom - height) / 2) },\n left: { left: anchor.left - 10 - width, top: clampY((anchor.top + anchor.bottom - height) / 2) },\n bottom: { left: clampX(align === 'end' ? anchor.right - width : (anchor.left + anchor.right - width) / 2), top: anchor.bottom + gap },\n top: { left: clampX(align === 'end' ? anchor.right - width : (anchor.left + anchor.right - width) / 2), top: anchor.top - gap - height },\n }\n for (const candidate of candidates) {\n const position = positions[candidate]\n if (position.left >= margin && position.top >= margin\n && position.left + width <= viewportWidth - margin && position.top + height <= viewportHeight - margin) {\n return { ...position, side: candidate, width, height, overflow: false }\n }\n }\n const position = positions[side]\n return { left: clampX(position.left), top: clampY(position.top), side, width, height, overflow: true }\n}\n","/**\n * Outside-pointer dismissal for trigger-owned popovers (jobs list, Cordis\n * panel): while the surface is open, a pointerdown outside the root closes it.\n */\nimport { useEffect } from 'react'\nimport type { RefObject } from 'react'\n\n/**\n * Close an open popover when a pointerdown lands outside its root element.\n * @param root - element containing both the trigger and the open surface.\n * @param open - whether the surface is showing; false detaches the listener.\n * @param setOpen - state setter invoked with false on an outside pointerdown.\n * @param portal - surface portaled outside the root (a `document.body` dialog)\n * that also counts as inside; omit when the root contains the whole popover.\n */\nexport function useDismissOnOutsidePointer(\n root: RefObject<HTMLElement | null>,\n open: boolean,\n setOpen: (open: boolean) => void,\n portal?: RefObject<HTMLElement | null>,\n): void {\n useEffect(() => {\n if (!open) return\n const closeOutside = (event: PointerEvent): void => {\n if (event.target instanceof Node\n && root.current?.contains(event.target) !== true\n && portal?.current?.contains(event.target) !== true) {\n setOpen(false)\n }\n }\n document.addEventListener('pointerdown', closeOutside)\n return () => { document.removeEventListener('pointerdown', closeOutside) }\n }, [root, open, setOpen, portal])\n}\n","/**\n * Document-wide input tracking shared by tooltips and focus-ring styles.\n * Tooltips follow the last input; rings follow navigation or a key followed by\n * focus on a different control. Modifiers and refocusing alone keep rings silent.\n * Module-level listeners live for the document lifetime; Node imports are inert.\n */\n\n/** Modality values published on the document element. */\nexport const INPUT_MODALITY = { pointer: 'pointer', keyboard: 'keyboard' } as const\n\n/** Attribute carrying whether focus navigation last owned focus. */\nexport const INPUT_MODALITY_ATTRIBUTE = 'data-input-modality'\n\nconst FOCUS_NAVIGATION = new Set(['Tab', 'Home', 'End', 'PageUp', 'PageDown'])\n\nlet pointer = false\nlet pointerOwnsFocus = false\nlet keyFocusOrigin: EventTarget | undefined\n\nfunction publish(): void {\n document.documentElement.setAttribute(INPUT_MODALITY_ATTRIBUTE, pointerOwnsFocus ? INPUT_MODALITY.pointer : INPUT_MODALITY.keyboard)\n}\n\n/**\n * Whether the last input came from a pointer, independently of ring visibility.\n * @returns True after pointer input; false after any key.\n */\nexport function pointerModality(): boolean {\n return pointer\n}\n\nif (typeof window !== 'undefined') {\n window.addEventListener('pointerdown', () => {\n pointer = true\n pointerOwnsFocus = true\n keyFocusOrigin = undefined\n publish()\n }, true)\n window.addEventListener('keydown', (event) => {\n pointer = false\n if (event.isComposing) {\n keyFocusOrigin = undefined\n return\n }\n // composedPath preserves the real control inside an open shadow root.\n keyFocusOrigin = event.composedPath()[0]\n if (!FOCUS_NAVIGATION.has(event.key) && !event.key.startsWith('Arrow')) return\n pointerOwnsFocus = false\n publish()\n }, true)\n window.addEventListener('focusin', (event) => {\n if (keyFocusOrigin === undefined || event.composedPath()[0] === keyFocusOrigin) return\n keyFocusOrigin = undefined\n if (!pointerOwnsFocus) return\n pointerOwnsFocus = false\n publish()\n }, true)\n window.addEventListener('blur', () => { keyFocusOrigin = undefined })\n}\n","/** Anchor-preserving tooltips; an optional body portal escapes clipping containers and stacking contexts that cap the bubble's z-index. */\n\nimport { cloneElement, createContext, useCallback, useContext, useEffect, useId, useRef, useState } from 'react'\nimport type { FocusEventHandler, MouseEventHandler, MutableRefObject, PointerEventHandler, ReactElement, Ref } from 'react'\nimport { createPortal } from 'react-dom'\nimport { ShortcutKeys } from './ShortcutKeys.tsx'\nimport { placeTooltip, type TooltipSide } from './tooltip-placement.ts'\nimport { useDismissOnOutsidePointer } from './useDismissOnOutsidePointer.ts'\nimport css from './Tooltip.module.css'\n// Tooltips take the wide answer — any key returns to the keyboard. Focus rings read the\n// narrower `data-input-modality` attribute the same module publishes.\nimport { pointerModality } from './input-modality.ts'\n\nexport type { TooltipSide } from './tooltip-placement.ts'\n\n/**\n * Suppression channel for nested tooltips: a visible descendant tooltip\n * withdraws the enclosing tooltip while its bubble is shown.\n */\nexport const TooltipSuppression = createContext<((suppressed: boolean) => void) | null>(null)\n\n/** Props Tooltip injects into its anchor child; the child's own handlers are chained ahead of the tooltip's. */\ninterface AnchorProps {\n 'aria-describedby'?: string | undefined\n ref?: Ref<HTMLElement> | undefined\n onPointerEnter?: PointerEventHandler | undefined\n onPointerLeave?: PointerEventHandler | undefined\n onPointerDown?: PointerEventHandler | undefined\n onClick?: MouseEventHandler | undefined\n onFocus?: FocusEventHandler | undefined\n onBlur?: FocusEventHandler | undefined\n}\n\ntype TooltipLabel = string | (() => string)\n\nfunction clipped(anchor: HTMLElement): boolean {\n return [anchor, ...anchor.querySelectorAll<HTMLElement>('*')]\n .some(el => el instanceof HTMLElement && el.scrollWidth > el.clientWidth)\n}\n\n/**\n * Attach a hover/focus tooltip to an anchor element.\n * @param props.label - bubble text, or a resolver evaluated only while visible; an empty string shows only shortcut keys.\n * @param props.shortcutKeys - effective key labels rendered as platform-formatted keycaps after optional text.\n * @param props.side - preferred placement (default 'right'); fitting tries the opposite then perpendicular sides.\n * @param props.align - horizontal anchor-edge alignment for 'bottom'/'top' bubbles: 'end' pins\n * the bubble's right edge to the anchor's (for anchors beside other hover surfaces the centered\n * bubble would overlap); default 'center'. Horizontal placements ignore it.\n * @param props.portal - render the bubble under document.body, so an ancestor's clipping or its\n * stacking context (which confines the bubble's z-index to that context) cannot hide it.\n * @param props.delayMs - hover delay in milliseconds (default 0).\n * @param props.focusDelayMs - keyboard focus delay in milliseconds (default 0); blur, click,\n * mouse leave, disabling, and unmount cancel a pending show.\n * @param props.gap - anchor-to-bubble distance in pixels for 'bottom'/'top' bubbles (default 8);\n * horizontal placements use 10px, including after a flip.\n * @param props.disabled - suppress the bubble while true; the anchor renders identically so\n * toggling never remounts it (which would cut its CSS transitions).\n * @param props.maxWidth - bubble width cap in pixels, for labels long enough that the default\n * half-viewport cap would render a slab wider than the surface the anchor sits on; always bounded by viewport margins.\n * @param props.openOnClick - clicking or tapping also pins the bubble for reading; another click, Escape,\n * Tab, or an outside pointerdown dismisses it. Defaults to false for ordinary action tooltips.\n * @param props.onlyWhenClipped - show the bubble only when the anchor or an HTML element inside it\n * overflows horizontally, measured when the bubble is about to show; for labels that repeat\n * text an ellipsis may cut off. Defaults to false.\n * @param props.children - a single anchor element; its own ref (callback or object) is forwarded alongside the tooltip's.\n * @returns the cloned anchor plus a fixed-position bubble, optionally portaled to the body.\n * The bubble stays hidden until ResizeObserver supplies its size for viewport fitting; clicking the\n * anchor dismisses the bubble unless openOnClick is enabled, and focus arriving after a pointer\n * interaction (a closing menu refocusing its trigger) never raises it. Touch cannot trigger hover\n * tooltips; tapping still invokes the child's action and can open an openOnClick explanation.\n * When no side fits, the viewport-bounded fallback may overlap the anchor; oversized content is scrollable when pinned.\n */\nexport function Tooltip({ label, shortcutKeys, side = 'right', align = 'center', delayMs = 0, focusDelayMs = 0, gap = 8, disabled = false, portal = false, maxWidth, openOnClick = false, onlyWhenClipped = false, children }: { label: TooltipLabel; shortcutKeys?: readonly string[] | undefined; side?: TooltipSide; align?: 'center' | 'end'; delayMs?: number; focusDelayMs?: number; gap?: number; disabled?: boolean; portal?: boolean; maxWidth?: number; openOnClick?: boolean; onlyWhenClipped?: boolean; children: ReactElement<AnchorProps> }) {\n const id = useId()\n const [pinned, setPinned] = useState(false)\n const anchor = useRef<HTMLElement | null>(null)\n // React 18 keeps the element's ref outside props; forward it so wrapping an\n // anchor in Tooltip never silently severs the owner's ref.\n const childRef = (children as ReactElement<AnchorProps> & { ref?: Ref<HTMLElement> }).ref\n const mergedRef = useCallback((el: HTMLElement | null) => {\n anchor.current = el\n if (typeof childRef === 'function') childRef(el)\n else if (childRef != null) (childRef as MutableRefObject<HTMLElement | null>).current = el\n }, [childRef])\n const [pos, setPos] = useState<DOMRect | null>(null)\n const bubble = useRef<HTMLSpanElement | null>(null)\n const resolvedLabel = pos === null\n ? null\n : typeof label === 'function' ? label() : label\n const showTimer = useRef<ReturnType<typeof setTimeout> | null>(null)\n // Hover and focus are independent triggers: the bubble hides only after\n // BOTH clear (hovering away from a focused anchor must not drop it).\n const triggers = useRef({ hover: false, focus: false })\n\n // A nested tooltip's bubble owns the pointer position, so this tooltip\n // withdraws its own while a descendant shows one; the state below is set by\n // the descendants this tooltip wraps. Announcing on every visibility change\n // covers hide, disable, and unmount; show() also announces synchronously so\n // a nested pair shown in one commit never paints both bubbles.\n const suppressAncestors = useContext(TooltipSuppression)\n const [suppressed, setSuppressed] = useState(false)\n const announce = useCallback((active: boolean) => { suppressAncestors?.(active) }, [suppressAncestors])\n const visible = pos !== null && !disabled\n // ResizeObserver supplies the laid-out border box; fitting never reads\n // geometry after a position write or needs a React commit to flip sides.\n useEffect(() => {\n const el = bubble.current\n if (pos === null || !visible || suppressed || el === null) return\n let size: ResizeObserverSize | undefined\n let anchorRect = pos\n const fit = () => {\n if (size === undefined) return\n const placement = placeTooltip({\n anchor: anchorRect, width: size.inlineSize, height: size.blockSize,\n viewportWidth: window.innerWidth, viewportHeight: window.innerHeight, side, align, gap,\n })\n const horizontal = placement.side === 'right' || placement.side === 'left'\n const offsetX = horizontal ? 0 : align === 'end' ? placement.width : placement.width / 2\n const offsetY = horizontal ? placement.height / 2 : placement.side === 'top' ? placement.height : 0\n el.style.left = `${placement.left + offsetX}px`\n el.style.top = `${placement.top + offsetY}px`\n el.dataset.side = placement.side\n el.style.visibility = 'visible'\n }\n const onResize = () => {\n if (anchor.current !== null) anchorRect = anchor.current.getBoundingClientRect()\n fit()\n }\n const observer = new ResizeObserver((entries) => {\n size = entries[0]?.borderBoxSize[0]\n fit()\n })\n observer.observe(el, { box: 'border-box' })\n window.addEventListener('resize', onResize)\n return () => {\n observer.disconnect()\n window.removeEventListener('resize', onResize)\n }\n }, [align, gap, pos, side, suppressed, visible])\n useEffect(() => {\n announce(visible)\n return () => { announce(false) }\n }, [announce, visible])\n\n // Disabling mid-hover (e.g. clicking a rail control expands the sidebar)\n // must drop an already-visible bubble: no mouseleave fires.\n const cancelShow = useCallback(() => {\n if (showTimer.current === null) return\n clearTimeout(showTimer.current)\n showTimer.current = null\n }, [])\n useEffect(() => {\n if (pinned && (disabled || !openOnClick)) setPinned(false)\n if (disabled) {\n cancelShow()\n triggers.current = { hover: false, focus: false }\n setPos(null)\n }\n return cancelShow\n }, [cancelShow, disabled, openOnClick, pinned])\n\n const show = () => {\n if (disabled) return\n const el = anchor.current\n /* v8 ignore next -- the ref is attached by event time: events fire on the cloned anchor. */\n if (el === null) return\n if (onlyWhenClipped && !clipped(el)) return\n setPos(el.getBoundingClientRect())\n announce(true)\n }\n const showAfterDelay = (delay: number) => {\n cancelShow()\n if (delay <= 0) {\n show()\n return\n }\n showTimer.current = setTimeout(() => {\n showTimer.current = null\n show()\n }, delay)\n }\n const withdraw = useCallback(() => {\n setPinned(false)\n setPos(null)\n announce(false)\n }, [announce])\n const hide = () => {\n cancelShow()\n if (!triggers.current.hover && !triggers.current.focus && !pinned) withdraw()\n }\n const dismiss = useCallback(() => {\n cancelShow()\n triggers.current = { hover: false, focus: false }\n withdraw()\n }, [cancelShow, withdraw])\n useDismissOnOutsidePointer(anchor, openOnClick && visible, dismiss, bubble)\n useEffect(() => {\n if (!openOnClick || !visible) return\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' && event.key !== 'Tab') return\n if (event.key === 'Escape') { event.preventDefault(); event.stopPropagation() }\n dismiss()\n }\n document.addEventListener('keydown', onKeyDown, true)\n return () => { document.removeEventListener('keydown', onKeyDown, true) }\n }, [dismiss, openOnClick, visible])\n\n const content = visible && !suppressed && (\n <span\n ref={bubble}\n id={openOnClick ? id : undefined}\n className={css.bubble}\n data-side={side}\n data-portal={portal || undefined}\n data-pinned={pinned || undefined}\n data-align={align}\n data-has-shortcut={shortcutKeys?.length ? true : undefined}\n style={{ left: pos.left, top: pos.top, visibility: 'hidden', ...maxWidth === undefined ? {} : { maxWidth: `min(${maxWidth}px, calc(100vw - 24px))` } }}\n role=\"tooltip\"\n aria-label={shortcutKeys?.length ? [resolvedLabel, shortcutKeys.join(' ')].filter(Boolean).join(' ') : undefined}\n >\n {resolvedLabel && <span className={css.label}>{resolvedLabel}</span>}\n {shortcutKeys !== undefined && shortcutKeys.length > 0 && <ShortcutKeys keys={shortcutKeys} variant=\"tooltip\" />}\n </span>\n )\n\n return (\n <TooltipSuppression.Provider value={setSuppressed}>\n {cloneElement(children, {\n ref: mergedRef,\n 'aria-describedby': openOnClick && visible\n ? [children.props['aria-describedby'], id].filter(Boolean).join(' ')\n : children.props['aria-describedby'],\n onPointerEnter: (e) => {\n children.props.onPointerEnter?.(e)\n if (e.pointerType === 'touch') return\n // iOS can emit mouse entry when a tapped control replaces its icon.\n if (e.pointerType === 'mouse' && !window.matchMedia('(any-hover: hover)').matches) return\n triggers.current.hover = true\n showAfterDelay(delayMs)\n },\n onPointerLeave: (e) => {\n children.props.onPointerLeave?.(e)\n triggers.current.hover = false\n cancelShow()\n if (!pinned) withdraw()\n },\n onPointerDown: (e) => {\n children.props.onPointerDown?.(e)\n if (e.pointerType === 'touch' && !pinned) dismiss()\n },\n // Activating an ordinary action dismisses the bubble: it often changes\n // what the anchor now does (pin → unpin), and the click leaves the\n // anchor focused, which would otherwise pin the relabelled bubble up.\n onClick: (e) => {\n children.props.onClick?.(e)\n triggers.current.focus = false\n cancelShow()\n if (openOnClick && !disabled && !pinned) { setPinned(true); show() }\n else withdraw()\n },\n onFocus: (e) => {\n children.props.onFocus?.(e)\n if (pointerModality()) return\n triggers.current.focus = true\n showAfterDelay(focusDelayMs)\n },\n onBlur: (e) => { children.props.onBlur?.(e); triggers.current.focus = false; hide() },\n })}\n {portal ? (content !== false && createPortal(content, document.body)) : content}\n </TooltipSuppression.Provider>\n )\n}\n","/** Package-internal row presentation shared by component, data, and child menu entries. */\nimport { useId } from 'react'\nimport type { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react'\nimport clsx from 'clsx'\nimport type { MenuEntry, MenuItemButtonProps, MenuLabel, MenuSeparator } from './Menu.tsx'\nimport { IconCheckOutlineRegular, IconChevronRightOutlineRegular } from './icons/index.tsx'\nimport { ShortcutKeys } from './ShortcutKeys.tsx'\nimport { Tooltip } from './Tooltip.tsx'\nimport css from './Menu.module.css'\n\n/** Optional props that also accept `undefined`, so data rows can forward absent `MenuItem` fields. */\ntype OptionalProps<T, K extends keyof T> = { [P in K]?: T[P] | undefined }\n\n/** Package-internal row props: the `MenuItemButton` row fields plus data- and child-row presentation. */\ntype MenuRowProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>\n & Pick<MenuItemButtonProps, 'children'>\n & OptionalProps<MenuItemButtonProps, 'icon' | 'shortcut' | 'current' | 'disabledReason' | 'danger' | 'separatorBefore'>\n & {\n /** Whether this data row is the menu's current selection. */\n selected?: boolean\n /** Selection marker: a trailing check, or the row fill. */\n selection?: 'check' | 'fill'\n /** Keep an empty icon column so grouped rows stay aligned. */\n reserveIcon?: boolean\n /** Hide the icon from assistive technology; component rows keep it exposed. */\n decorativeIcon?: boolean\n /** Pointer handlers on the row wrapper, used by submenu parents. */\n wrapperProps?: HTMLAttributes<HTMLDivElement> | undefined\n }\n\n/** Render a focus-stable row with optional selection, shortcut, and disabled explanation.\n * @param props - row content, native button events, and optional pointer wrapper events.\n * @returns one menu item; explained disabled rows remain focusable but never activate.\n */\nexport function MenuRow({ children, icon, shortcut, current, disabled = false, disabledReason, danger,\n separatorBefore, selected, selection = 'check', reserveIcon, decorativeIcon = true, wrapperProps, ...button }: MenuRowProps) {\n const reasonId = useId()\n const explained = disabled && disabledReason !== undefined\n // Tooltip remains mounted when the explanation changes, preserving button focus.\n return <div {...wrapperProps} className={css.itemWrap}>\n {separatorBefore && <div className={css.separator} role=\"separator\" />}\n <Tooltip label={disabledReason ?? ''} disabled={!explained} side=\"bottom\" delayMs={500} maxWidth={300} portal>\n <button {...button} type=\"button\" role=\"menuitem\"\n className={clsx(css.item, selected && (selection === 'fill' ? css.selectedFill : css.selected), danger && css.danger)}\n disabled={disabled && !explained} aria-disabled={explained || undefined}\n aria-describedby={explained ? reasonId : undefined} aria-keyshortcuts={shortcut?.aria}\n aria-current={current === true ? 'page' : undefined} onClick={explained ? undefined : button.onClick}>\n {(icon !== undefined || reserveIcon) && <span aria-hidden={decorativeIcon || undefined} className={css.itemIcon}>{icon}</span>}\n <span className={css.itemLabel}>{children}</span>\n {shortcut !== undefined && <span aria-hidden=\"true\" className={css.shortcut}><ShortcutKeys keys={shortcut.keys} className={css.shortcutKeys} /></span>}\n {selected && selection === 'check' && <IconCheckOutlineRegular className={css.check} />}\n {button['aria-haspopup'] === 'menu' && <IconChevronRightOutlineRegular aria-hidden=\"true\" className={css.check} />}\n </button>\n </Tooltip>\n {explained && <span id={reasonId} hidden>{disabledReason}</span>}\n </div>\n}\n\n/** Mark icon columns within each separator-delimited data group.\n * @param entries - entries in one menu area.\n * @param contextual - whether to align grouped context-menu icons.\n * @returns entries that reserve a leading icon column.\n */\nexport function menuIconColumns(entries: readonly MenuEntry[], contextual: boolean): ReadonlySet<MenuEntry> {\n const aligned = new Set<MenuEntry>()\n if (!contextual) return aligned\n let group: MenuEntry[] = []\n const finish = (): void => {\n if (group.some(entry => !('type' in entry) && entry.icon !== undefined)) {\n for (const entry of group) aligned.add(entry)\n }\n group = []\n }\n for (const entry of entries) {\n if ('type' in entry && entry.type === 'separator') finish()\n else group.push(entry)\n }\n finish()\n return aligned\n}\n\n/** Render a separator or group heading outside the keyboard walk.\n * @param entry - non-interactive menu entry.\n * @returns the corresponding element.\n */\nexport function renderMenuDecoration(entry: MenuSeparator | MenuLabel): ReactNode {\n return entry.type === 'separator' ? <div key={entry.id} className={css.separator} role=\"separator\" />\n : <div key={entry.id} className={css.label} role=\"presentation\">{entry.text}</div>\n}\n","/** Shared menu material and the macOS backing that lets Chromium blur transparent windows. */\nimport { forwardRef, useId, useLayoutEffect, useRef, type ComponentPropsWithoutRef, type CSSProperties } from 'react'\nimport { createPortal } from 'react-dom'\nimport clsx from 'clsx'\nimport css from './MenuSurface.module.css'\n\n/** Context-menu transition durations in milliseconds, shared with its lifecycle owner. */\nexport const MENU_TRANSITION_MS = Object.freeze({ enter: 40, dismiss: 80, replace: 10, prepare: 20 })\n\n/** Menu containers preserve native div props and refs. */\nexport interface MenuSurfaceProps extends ComponentPropsWithoutRef<'div'> {\n /** Match the shared compact menu's smaller outer radius. */\n compact?: boolean\n /** Fade direct content, material, and native backing without isolating the material's backdrop. */\n phase?: 'enter' | 'dismiss' | 'replace' | undefined\n}\n\n/**\n * Paint a menu and, on macOS, an opaque backing behind the page content within its bounds.\n * CSS anchors keep each backing aligned during placement, resizing, and nested-menu movement.\n * @param props - Div content and placement, and compact geometry.\n * @param ref - The visible menu div, excluding the non-interactive backing.\n * @returns Menu content plus a backing portal removed with the menu.\n */\nexport const MenuSurface = forwardRef<HTMLDivElement, MenuSurfaceProps>(function MenuSurface({\n compact = false, phase, className, style, children, ...props\n}, ref) {\n const id = useId()\n const backingRef = useRef<HTMLDivElement>(null)\n useLayoutEffect(() => {\n // Nested React portals can insert the backing before its anchor. CSS anchor\n // positioning requires the anchor to precede the positioned element.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- The portal ref is attached before layout effects run.\n document.body.appendChild(backingRef.current!)\n }, [])\n const anchorStyle: CSSProperties & Record<`--dsh-menu-${string}`, string> = {\n '--dsh-menu-anchor': `--dsh-menu-${id.replaceAll(':', '')}`,\n '--dsh-menu-enter': `${MENU_TRANSITION_MS.enter}ms`,\n '--dsh-menu-dismiss': `${MENU_TRANSITION_MS.dismiss}ms`,\n '--dsh-menu-replace': `${MENU_TRANSITION_MS.replace}ms`,\n }\n return <>\n <div {...props} ref={ref} data-menu-material=\"translucent\" data-menu-phase={phase}\n className={clsx(css.surface, compact && css.compact, className)} style={{ ...style, ...anchorStyle }}>\n <div aria-hidden=\"true\" className={css.material} />\n {children}\n </div>\n {createPortal(\n <div ref={backingRef} aria-hidden=\"true\" data-menu-backing=\"\" data-menu-phase={phase} className={clsx(css.backing, compact && css.compact)}\n style={{ ...anchorStyle, visibility: style?.visibility }} />,\n document.body,\n )}\n </>\n})\n","/** Portaled child menu presentation; interaction state belongs to useMenuSubmenu. */\nimport type { CSSProperties, ReactNode } from 'react'\nimport { createPortal } from 'react-dom'\nimport clsx from 'clsx'\nimport { menuHoverAllowed, type useMenuSubmenu } from './useMenuSubmenu.ts'\nimport { menuIconColumns, MenuRow, renderMenuDecoration } from './MenuRow.tsx'\nimport { IconChevronLeftOutlineRegular } from './icons/index.tsx'\nimport { MenuSurface } from './MenuSurface.tsx'\nimport css from './Menu.module.css'\n\n/** Name the parent card anchor, and hide the child card until its layout is known. */\nfunction anchors(submenu: ReturnType<typeof useMenuSubmenu>, hidden: boolean): CSSProperties & Record<`--dsh-submenu-${string}`, string> {\n return { '--dsh-submenu-parent': submenu.parentAnchor, ...hidden ? { visibility: 'hidden' } : {} }\n}\n\n/** Render one child list with a non-selecting back row in single-page placement.\n * @param props - active entry, submenu operations, and shared row presentation options.\n * @returns a body portal that preserves child DOM identity across placement changes.\n */\nexport function SubmenuPanel({ entry, submenu, compact, dense, contextual, backLabel, onSelect, onClose, afterSelection }: {\n entry: NonNullable<ReturnType<typeof useMenuSubmenu>['entry']>\n submenu: ReturnType<typeof useMenuSubmenu>\n compact: boolean\n dense: boolean\n contextual: boolean\n backLabel: ReactNode\n onSelect: ((id: string) => void) | undefined\n onClose: () => void\n afterSelection: () => void\n}) {\n const columns = menuIconColumns(entry.submenu, contextual)\n return createPortal(<MenuSurface ref={submenu.panelRef} compact={compact}\n className={clsx(css.submenu, css.scrollable, dense && css.denseList, compact && css.compactList)}\n style={anchors(submenu, submenu.hidden)}\n data-submenu-layout={submenu.measured ? submenu.page ? 'page' : 'side' : undefined}\n data-contextual={contextual ? '' : undefined} role=\"menu\" onPointerEnter={submenu.cancelClose}\n onPointerLeave={(event) => { if (menuHoverAllowed(event)) submenu.leave() }}\n onContextMenu={contextual ? (event) => { event.preventDefault(); event.stopPropagation(); onClose() } : undefined}\n onClick={(event) => { event.stopPropagation(); afterSelection() }}>\n {submenu.page && <>\n <MenuRow data-menu-back=\"\" icon={<IconChevronLeftOutlineRegular className={css.check} />}\n onClick={submenu.returnToParent}>{backLabel}</MenuRow>\n <div className={css.separator} role=\"separator\" />\n </>}\n <div className={css.viewport} role=\"presentation\">\n {entry.submenu.map(sub => 'type' in sub ? renderMenuDecoration(sub)\n : <MenuRow key={sub.id} icon={sub.icon} reserveIcon={columns.has(sub)} disabled={sub.disabled}\n danger={sub.danger} shortcut={sub.shortcut} onClick={() => { onSelect?.(sub.id) }}>{sub.label}</MenuRow>)}\n </div>\n </MenuSurface>, document.body)\n}\n","/** Composition lifetime for local keyboard handlers, including a late closing keydown. */\n\n/**\n * Observe composition until its closing key is released or consumed.\n * @param document - document whose input events belong to the caller.\n * @returns an event guard and a disposer for all listeners.\n */\nexport function observeComposition(document: Document): {\n guards(event: KeyboardEvent): boolean\n dispose(): void\n} {\n let composing = false\n let ended = false\n const start = (): void => { composing = true }\n const end = (): void => { composing = false; ended = true }\n const release = (): void => { ended = false }\n const blur = (): void => { composing = false; ended = false }\n document.addEventListener('compositionstart', start, true)\n document.addEventListener('compositionend', end, true)\n document.addEventListener('keyup', release, true)\n document.defaultView?.addEventListener('blur', blur)\n return {\n guards: (event) => {\n // oxlint-disable-next-line typescript/no-deprecated -- IME 229 covers engines without isComposing.\n const guarded = composing || ended || event.isComposing || event.keyCode === 229\n ended = false\n return guarded\n },\n dispose: () => {\n document.removeEventListener('compositionstart', start, true)\n document.removeEventListener('compositionend', end, true)\n document.removeEventListener('keyup', release, true)\n document.defaultView?.removeEventListener('blur', blur)\n },\n }\n}\n","/** Mobile-device detection and automatic focus presentation. */\nconst releases = new WeakMap<HTMLElement, () => void>()\nconst navigationKeys = new Set(['Tab', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End'])\nlet mobileDevice: boolean | undefined\n\n/**\n * Identify iOS and Android phones and tablets from the current browser's device information.\n * MacIntel with multiple touch points identifies desktop-mode iPads.\n * The first result is shared by all callers until the page reloads.\n * @returns true for recognized mobile devices; false for other devices, including unrecognized UAs.\n */\nexport function isMobileDevice(): boolean {\n if (mobileDevice !== undefined) return mobileDevice\n const { userAgent, platform, maxTouchPoints } = navigator\n mobileDevice = /Android|iPhone|iPad|iPod/i.test(userAgent)\n || (platform === 'MacIntel' && maxTouchPoints > 1)\n return mobileDevice\n}\n\n/**\n * Focus an automatic destination without a focus outline until keyboard navigation or blur.\n * The theme suppresses outlines while data-dsh-automatic-focus is present; borders and shadows remain intact.\n * Tab and directional navigation restore normal focus styling.\n * @param element - control or container receiving automatic focus.\n * @param options - browser focus options, including scroll preservation.\n */\nexport function focusWithoutRing(element: HTMLElement, options?: FocusOptions): void {\n releases.get(element)?.()\n const release = (): void => {\n element.removeAttribute('data-dsh-automatic-focus')\n element.removeEventListener('blur', release)\n element.removeEventListener('keydown', navigate, true)\n releases.delete(element)\n }\n const navigate = (event: KeyboardEvent): void => {\n if (!event.isComposing && !event.ctrlKey && !event.altKey && !event.metaKey && navigationKeys.has(event.key)) release()\n }\n releases.set(element, release)\n element.setAttribute('data-dsh-automatic-focus', '')\n element.addEventListener('blur', release)\n element.addEventListener('keydown', navigate, true)\n element.focus(options)\n if (!element.matches(':focus')) release()\n}\n","/** Shared modal keyboard ownership and focus lifetime. */\nimport { useLayoutEffect, useRef } from 'react'\nimport type { RefObject } from 'react'\nimport { observeComposition } from './keyboard-composition.ts'\nimport { focusWithoutRing } from './focus.ts'\n\n/** Dialog and menu elements whose document order determines foreground shortcut ownership. */\nexport const modalSelector = '[role=\"dialog\"][aria-modal=\"true\"], [role=\"menu\"]'\n\nconst layers = new WeakMap<Document, { element: HTMLElement; close: () => void }[]>()\n\n/**\n * Request closure of the foreground registered modal using its current onClose callback.\n * A newer menu or unregistered dialog blocks dismissal of the modal behind it.\n * @param document - product document whose modal owns the close command.\n */\nexport function closeTopModal(document: Document): void {\n const top = layers.get(document)?.at(-1)\n if (top === undefined) return\n const foreground = [...document.querySelectorAll(modalSelector)].at(-1)\n if (foreground === top.element) top.close()\n}\n/**\n * Whether an anchor belongs behind the current modal and must yield keyboard input.\n * @param anchor - local control owning the input handler.\n * @returns true when another modal owns the foreground.\n */\nexport function isBehindModal(anchor: HTMLElement | null): boolean {\n if (anchor === null) return false\n const top = layers.get(anchor.ownerDocument)?.at(-1)\n return top !== undefined && !top.element.contains(anchor)\n}\n\nconst focusable = 'button:not(:disabled), input:not(:disabled), textarea:not(:disabled), select:not(:disabled), a[href], [tabindex=\"0\"]'\n\n/**\n * Give only the top modal Escape and Tab ownership, then restore its previous focus.\n * Automatic entry and return focus omit outlines; keyboard traversal retains its indicators.\n * Controls mounted with the dialog use data-modal-autofocus for initial focus;\n * React autoFocus runs before this layer can capture the invoking control.\n * Local menus handle their Escape during capture before this bubble listener.\n * @param dialog - mounted dialog element.\n * @param open - whether this layer is active.\n * @param onClose - top-layer Escape or application close action.\n */\nexport function useModalLayer(dialog: RefObject<HTMLElement | null>, open: boolean, onClose: () => void): void {\n const close = useRef(onClose)\n const pendingRestore = useRef<HTMLElement | undefined>(undefined)\n close.current = onClose\n useLayoutEffect(() => {\n const target = pendingRestore.current\n pendingRestore.current = undefined\n const element = dialog.current\n // Restore only focus left inside the retained dialog, preserving the owner's chosen target.\n if (!open && element?.contains(element.ownerDocument.activeElement)\n && target?.isConnected && !target.closest('[inert], [hidden]') && !isBehindModal(target)) {\n focusWithoutRing(target, { preventScroll: true })\n }\n if (!open || element === null) return\n const document = element.ownerDocument\n const composition = observeComposition(document)\n const previous = document.activeElement\n const stack = layers.get(document) ?? []\n layers.set(document, stack)\n const layer = { element, close: () => { close.current() } }\n stack.push(layer)\n const initial = element.querySelector<HTMLElement>('[data-modal-autofocus]')\n ?? element.querySelector<HTMLElement>(focusable) ?? element\n if (!element.contains(document.activeElement)) focusWithoutRing(initial)\n const keydown = (event: KeyboardEvent): void => {\n const composing = composition.guards(event)\n if (stack.at(-1) !== layer || event.defaultPrevented || composing\n || event.ctrlKey || event.altKey || event.metaKey) return\n if (event.key === 'Escape' && !event.shiftKey) {\n event.preventDefault()\n if (!event.repeat) close.current()\n }\n if (event.key !== 'Tab') return\n // Portaled menus own their traversal while they contain focus.\n if (document.activeElement?.closest('[role=\"menu\"]')) return\n const items = [...element.querySelectorAll<HTMLElement>(focusable)]\n .filter(item => !item.closest('[inert], [hidden]'))\n const first = items[0] ?? element\n const last = items.at(-1) ?? element\n const atEdge = event.shiftKey ? document.activeElement === first : document.activeElement === last\n if (document.activeElement === element || !element.contains(document.activeElement) || atEdge) {\n event.preventDefault()\n const target = event.shiftKey ? last : first\n target.focus()\n }\n }\n document.addEventListener('keydown', keydown)\n return () => {\n composition.dispose()\n const wasTop = stack.at(-1) === layer\n stack.splice(stack.indexOf(layer), 1)\n document.removeEventListener('keydown', keydown)\n if (stack.length === 0) layers.delete(document)\n if (wasTop) {\n const target = previous instanceof HTMLElement && previous.isConnected ? previous : stack.at(-1)?.element\n if (target !== undefined) {\n pendingRestore.current = target\n focusWithoutRing(target)\n }\n }\n }\n }, [dialog, open])\n}\n","import { useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from 'react'\nimport type { ReactNode, RefObject } from 'react'\nimport { createPortal } from 'react-dom'\nimport clsx from 'clsx'\nimport { useMenuSubmenu, menuHoverAllowed } from './useMenuSubmenu.ts'\nimport { MenuRow, menuIconColumns, renderMenuDecoration } from './MenuRow.tsx'\nimport { SubmenuPanel } from './SubmenuPanel.tsx'\nimport { usePointerGrace } from './pointer-grace.ts'\nimport { isBehindModal } from './useModalLayer.ts'\nimport { observeComposition } from './keyboard-composition.ts'\nimport { focusWithoutRing } from './focus.ts'\nimport { MenuSurface } from './MenuSurface.tsx'\nimport css from './Menu.module.css'\n\n/** Selectable row (optionally with a nested submenu). */\nexport interface MenuItem {\n id: string\n label: ReactNode\n disabled?: boolean\n /** Effective binding supplied by the command owner; omitted for unbound actions. */\n shortcut?: { keys: readonly string[]; aria?: string | undefined }\n /** Leading icon (figma .Menu_cell gap 8). */\n icon?: ReactNode\n /** Destructive row: error-colored text/icon and danger hover fill. */\n danger?: boolean\n /** Child choices opened by hover, focus, click, or ArrowRight; placement follows available space. */\n submenu?: readonly MenuEntry[]\n}\n\n/** Hairline between item groups (not selectable). */\nexport interface MenuSeparator {\n type: 'separator'\n id: string\n}\n\n/** Non-interactive heading row above a group of items. */\nexport interface MenuLabel {\n type: 'label'\n id: string\n text: string\n}\n\n/** One primary-menu entry: a row, a separator, or a heading label. */\nexport type MenuEntry = MenuItem | MenuSeparator | MenuLabel\n\n/** Props for one component-rendered menu row. */\nexport interface MenuItemButtonProps {\n /** Visible row label. */\n children: ReactNode\n /** Effective binding supplied by the command owner; omitted for unbound actions. */\n shortcut?: MenuItem['shortcut']\n /** Leading icon (figma .Menu_cell gap 8). */\n icon?: ReactNode\n /** Whether this row identifies the currently displayed page or view. */\n current?: boolean\n /** Whether the row cannot be activated. */\n disabled?: boolean\n /**\n * Why the disabled row cannot be activated. The row then stays hoverable and\n * focusable, shows the reason in a tooltip, and exposes it as the row's\n * description; an enabled row ignores it.\n */\n disabledReason?: string | undefined\n /** Destructive row: error-colored text/icon and danger hover fill. */\n danger?: boolean\n /**\n * Start a new group: a hairline above this row, the same one a\n * `{ type: 'separator' }` data entry draws. It comes and goes with the row,\n * so a row that renders nothing leaves no stray line; a data separator\n * directly before it draws no second line, and the list's first row draws none.\n */\n separatorBefore?: boolean\n /** Row activation (click, Enter, or Tab on the focused row). */\n onSelect: () => void\n}\n\n/**\n * Render one `role=\"menuitem\"` row for a {@link Menu} whose rows are\n * components rather than `items` data: the same markup and styling as a data\n * row, so it joins the list's keyboard walk and post-selection focus return\n * without any shared state. Closing the menu stays the owner's decision, as\n * it is for data rows.\n * @param props.children - visible row label.\n * @param props.shortcut - effective key labels and accessible combination.\n * @param props.icon - optional leading icon.\n * @param props.current - whether the row identifies the currently displayed page or view.\n * @param props.disabled - whether the row cannot be activated.\n * @param props.disabledReason - why a disabled row cannot be activated, shown in a tooltip and read as its description.\n * @param props.danger - whether to use the destructive row colors.\n * @param props.separatorBefore - whether this row starts a new group (hairline above it).\n * @param props.onSelect - row activation callback.\n * @returns one menu-item row.\n */\nexport function MenuItemButton({ onSelect, ...props }: MenuItemButtonProps) {\n return <MenuRow {...props} decorativeIcon={false} onClick={onSelect} />\n}\n\n/**\n * Render an anchored dropdown menu. While the list is open its keys mirror the\n * composer's: Tab settles the focused row — from the trigger, Tab enters the\n * list instead — and Escape or Shift+Tab close it and return focus to the\n * anchor's first button, and selecting a row does the same — the rows unmount\n * with the list. Only a keyboard on the trigger or inside the list is\n * intercepted; Tab presses elsewhere on the page stay the browser's. Escape\n * first returns from a visible child, while ArrowRight enters and ArrowLeft returns.\n * When neither side fits, click or ArrowRight opens a single-panel child page;\n * focus alone retains the parent page.\n * @param props.contextual - cursor positioning, context dismissal, and per-divider icon alignment.\n * @param props.exiting - retain an inert popup during dismissal or replacement fade.\n * @param props.returnFocus - original control captured before asynchronous menu preparation.\n * @param props.isExternalTrigger - recognizes external controls whose pointer presses should not dismiss;\n * omitted, every press outside the anchor and menu panels dismisses.\n * @param props.autoFocus - focus the first item on open; the arrow keys walk the list either way.\n * @param props.open - whether the list is showing (owner-controlled).\n * @param props.anchor - the trigger element (rendered in place).\n * @param props.items - selectable data rows and optional separators (default none; with no `children` either, the list is empty).\n * @param props.submenuBackLabel - localized single-panel return label; omitted uses the caller's\n * parent-row label beside a back arrow, without selecting that row.\n * @param props.selectedId - row shown as selected.\n * @param props.selectedIds - rows shown as selected when a menu contains independent option groups.\n * @param props.onSelect - data-row activation callback (not called for disabled rows or submenu parents that only open children).\n * @param props.onClose - invoked on outside click, Escape, or a window blur\n * that moved focus into an iframe (the only signal a pointerdown inside a\n * cross-origin iframe leaves).\n * @param props.align - list alignment against the anchor (default 'start').\n * @param props.side - open below (`bottom`, default) or above (`top`) the anchor.\n * @param props.portal - render the list into document.body, fixed-positioned\n * with CSS anchor positioning; it follows browser zoom and may exceed the\n * visual viewport. Use when an ancestor's overflow clipping would crop the\n * in-place list; default false keeps the pure-CSS in-place behavior.\n * @param props.closeOnPointerLeave - close the list once the pointer has left\n * both trigger and list for the pointer grace (default false keeps it open\n * until outside click/Escape/selection). The grace makes the 4px trigger->list\n * gap and a brief overshoot survivable; coming back cancels the close.\n * @param props.dense - reduce vertical row spacing without changing the standard typography or card width.\n * @param props.compact - use reduced menu typography and spacing.\n * @param props.anchorRef - external element used as the CSS anchor in portal mode.\n * @param props.anchorPoint - client viewport coordinates captured when a context menu opens.\n * @param props.minWidthFromAnchor - in portal mode, keep the menu at least as wide as its anchor, bounded by viewport margins.\n * @param props.footer - rows pinned below the scrolling items area, separated\n * by a hairline; contextual menus reuse an explicit leading separator. These rows stay visible while the items above scroll.\n * @param props.children - component rows rendered after `items` in the same\n * list, each a `role=\"menuitem\"` button such as {@link MenuItemButton}; they\n * share the keyboard walk, the submenu exclusivity, and the post-selection\n * focus return.\n * @param props.selection - how a selected row is marked: a trailing check\n * (`'check'`, default — figma .Menu_cell) or the hover fill held on the row\n * with no check (`'fill'`, for icon-labelled rows where a trailing glyph\n * crowds the cell).\n * @param props.className - extra class on the anchor wrapper span.\n * @param props.listClassName - extra class on the dropdown card itself; the\n * only style hook that reaches a portaled list, which renders under\n * document.body outside the owner's DOM subtree.\n * @returns anchor wrapper with the conditional list.\n */\nexport function Menu({ open, anchor, items = [], children, submenuBackLabel, selectedId, selectedIds, onSelect, onClose, align = 'start', side = 'bottom', portal = false, closeOnPointerLeave = false, dense = false, compact = false, autoFocus = false, selection = 'check', anchorRef, anchorPoint, minWidthFromAnchor = false, footer, className, listClassName, contextual = false, exiting, returnFocus, isExternalTrigger }: {\n open: boolean\n /** Pointer-positioned popup: cursor clearance, grouped icons, and context gestures. */\n contextual?: boolean\n /** Recognizes external triggers exempt from outside dismissal; omitted exempts no external nodes. */\n isExternalTrigger?: (node: Node) => boolean\n /** Resolve the original control for focus restoration and inert/hidden dismissal. */\n returnFocus?: (() => HTMLElement | null) | undefined\n /** Retain a dismissed context popup during its short fade. */\n exiting?: 'dismiss' | 'replace' | undefined\n autoFocus?: boolean\n anchor: ReactNode\n items?: readonly MenuEntry[]\n /** Localized return action; omitted uses the caller's parent label with a back arrow. */\n submenuBackLabel?: string | undefined\n children?: ReactNode\n footer?: readonly MenuEntry[]\n selectedId?: string | undefined\n selectedIds?: readonly string[] | undefined\n onSelect?: (id: string) => void\n onClose: () => void\n align?: 'start' | 'end'\n side?: 'bottom' | 'top' | 'right'\n portal?: boolean\n closeOnPointerLeave?: boolean\n dense?: boolean\n compact?: boolean\n selection?: 'check' | 'fill'\n anchorRef?: RefObject<HTMLElement | null> | undefined\n /** Client coordinates captured for this opening; Safari offsets are applied once. */\n anchorPoint?: { readonly x: number; readonly y: number } | undefined\n minWidthFromAnchor?: boolean\n className?: string | undefined\n listClassName?: string | undefined\n}) {\n const rootRef = useRef<HTMLSpanElement>(null)\n const listRef = useRef<HTMLDivElement>(null)\n const menuId = useId()\n const pointX = anchorPoint?.x\n const pointY = anchorPoint?.y\n const point = useMemo(() => {\n if (pointX === undefined || pointY === undefined) return undefined\n // WebKit reports client coordinates from the visual origin; fixed CSS uses\n // the layout origin. Subsequent panning must not move this captured point.\n const visualOrigin = open && typeof window.CSS !== 'undefined'\n && window.CSS.supports('-webkit-backdrop-filter', 'none')\n const viewport = visualOrigin ? window.visualViewport : undefined\n return { x: pointX + (viewport?.offsetLeft ?? 0), y: pointY + (viewport?.offsetTop ?? 0) }\n }, [open, pointX, pointY])\n useLayoutEffect(() => {\n const trigger = returnFocus?.()\n if (!open || !contextual || trigger == null) return\n const previous = trigger.getAttribute('aria-controls')\n trigger.setAttribute('aria-controls', [previous, menuId].filter(Boolean).join(' '))\n return () => {\n if (previous === null) trigger.removeAttribute('aria-controls')\n else trigger.setAttribute('aria-controls', previous)\n }\n }, [open, contextual, returnFocus, menuId])\n /** Index the arrow walk last focused, the resume point when focus left the rows. */\n const walkIndex = useRef<number | null>(null)\n /**\n * The control that had the keyboard when this menu opened — its own trigger,\n * which an anchor that wraps several controls (a split button) would not be\n * able to name by position.\n */\n const triggerRef = useRef<HTMLElement | null>(null)\n const selectingWithTab = useRef(false)\n\n /**\n * Hand the keyboard back to the trigger that opened the menu — or, when the\n * anchor never held it, to the anchor's first button. Focus left on a removed\n * row otherwise falls to the page body, where the next Tab restarts from the\n * top of the page.\n * @param navigation - whether explicit keyboard traversal should retain its focus indicator.\n */\n const refocusAnchor = (navigation = false): void => {\n const remembered = triggerRef.current\n const trigger = returnFocus?.() ?? (remembered?.isConnected ? remembered : anchorRef?.current) ?? null\n const target = trigger !== null && document.contains(trigger) && !(trigger as HTMLButtonElement).disabled\n ? trigger : rootRef.current?.querySelector<HTMLButtonElement>('button:not(:disabled)')\n if (target == null) return\n if (navigation) target.focus()\n else focusWithoutRing(target)\n }\n\n /**\n * Post-selection focus, for the paths where the rows unmount with the list.\n * A selection whose owner keeps the menu open is left alone, and so is an\n * owner that moved focus itself (a presented file card hands it to its\n * preview button): only a keyboard left on the closing list (or on the body\n * its removal produced) comes back to the trigger.\n */\n const refocusAfterSelection = (): void => {\n const navigation = selectingWithTab.current\n queueMicrotask(() => {\n if (openRef.current && exitingRef.current === undefined) return\n const active = document.activeElement\n if (active === null || active === document.body || listRef.current?.contains(active) === true\n || submenu.contains(active)) refocusAnchor(navigation)\n })\n }\n const exitingRef = useRef(exiting)\n exitingRef.current = exiting\n const openRef = useRef(open)\n openRef.current = open\n const submenu = useMenuSubmenu({ open: open && exiting === undefined, items, footer, listRef, refocusAnchor })\n const submenuEvents = useRef<Pick<typeof submenu, 'contains' | 'activeList' | 'returnToParent'>>(submenu)\n submenuEvents.current = submenu\n const close = useRef(onClose)\n close.current = onClose\n const anchorName = `--dsh-menu-trigger-${menuId.replaceAll(':', '')}`\n const [externalAnchor, setExternalAnchor] = useState<HTMLElement | null>(null)\n const positioned = !portal || anchorRef === undefined || externalAnchor !== null\n // External refs can attach after this component or replace their element\n // without changing ref identity. Publish the anchor after all refs commit.\n useEffect(() => {\n if (!open || !portal || anchorRef === undefined) {\n setExternalAnchor(null)\n return\n }\n const element = anchorRef.current\n setExternalAnchor(element)\n if (element === null) return\n const previous = element.style.getPropertyValue('anchor-name')\n const priority = element.style.getPropertyPriority('anchor-name')\n element.style.setProperty('anchor-name', anchorName)\n return () => { element.style.setProperty('anchor-name', previous, priority) }\n })\n useEffect(() => {\n if (!open || !portal || exiting !== undefined) return\n const currentAnchor = (): HTMLElement | null => returnFocus?.() ?? (anchorRef === undefined ? rootRef.current : anchorRef.current)\n const element = currentAnchor()\n if (element === null) return\n let dismissed = false\n const check = (): void => {\n const current = currentAnchor()\n if (dismissed || (current !== null && current.isConnected && current.closest('[inert], [hidden]') === null)) return\n dismissed = true\n close.current()\n }\n const observer = new MutationObserver(check)\n observer.observe(element.ownerDocument.documentElement, {\n subtree: true, childList: true, attributes: true, attributeFilter: ['inert', 'hidden'],\n })\n check()\n return () => { observer.disconnect() }\n }, [open, portal, exiting, anchorRef, externalAnchor, returnFocus])\n const { arm: armClose, cancel: cancelClose } = usePointerGrace(onClose)\n\n // Opening remembers where the keyboard was, so closing can hand it back to\n // that control — an anchor wrapping several (a split button) cannot be asked\n // for it by position. Declared before the autoFocus effect so the capture\n // sees the trigger, not the row autoFocus is about to focus.\n useEffect(() => {\n if (!open) return\n const active = document.activeElement\n triggerRef.current = active instanceof HTMLElement && active !== document.body\n && (anchorRef !== undefined || anchorPoint !== undefined || rootRef.current?.contains(active) === true)\n ? active : null\n }, [open])\n\n useEffect(() => {\n if (!open || !positioned || exiting !== undefined || !autoFocus\n || listRef.current?.contains(document.activeElement) || submenu.contains(document.activeElement)) return\n const first = listRef.current?.querySelector<HTMLButtonElement>('button:not(:disabled)')\n walkIndex.current = first === undefined || first === null ? null : 0\n if (first != null) focusWithoutRing(first)\n }, [open, autoFocus, items.length, footer?.length, positioned, exiting])\n\n useEffect(() => {\n if (!open || exiting !== undefined) {\n walkIndex.current = null\n return\n }\n const composition = observeComposition(document)\n const onPointerDown = (e: PointerEvent) => {\n if (!(e.target instanceof Node) || (contextual && e.button === 2)) return\n // The portaled list is outside the anchor subtree; check both.\n if (rootRef.current?.contains(e.target) === true || anchorRef?.current?.contains(e.target) === true) return\n if (isExternalTrigger?.(e.target) === true) return\n if (listRef.current?.contains(e.target) === true || submenuEvents.current.contains(e.target)) return\n onClose()\n }\n const onKeyDown = (e: KeyboardEvent) => {\n if (composition.guards(e) || isBehindModal(triggerRef.current ?? rootRef.current)\n || e.defaultPrevented || e.ctrlKey || e.altKey || e.metaKey) return\n // Where the keyboard is, computed once: the menu owns it when it holds a\n // row or sits on its anchor region.\n const focused = document.activeElement\n const insideList = listRef.current?.contains(focused) === true || submenuEvents.current.contains(focused)\n const anchored = focused === returnFocus?.() || anchorRef?.current?.contains(focused) === true\n || rootRef.current?.contains(focused) === true || insideList\n if (e.key === 'Escape' && !e.shiftKey) {\n e.preventDefault()\n if (e.repeat) return\n if (submenuEvents.current.returnToParent()) return\n // Closing hands the keyboard back when the menu had it — and, as this\n // primitive always did for autoFocus menus, when it held the keyboard\n // and lost it again (a row that unmounted under it).\n onClose()\n if (anchored || autoFocus) refocusAnchor()\n }\n if (e.key === 'ArrowLeft' && anchored && submenuEvents.current.returnToParent()) {\n e.preventDefault()\n return\n }\n if (e.key === 'ArrowRight' && insideList && focused instanceof HTMLButtonElement\n && focused.getAttribute('aria-haspopup') === 'menu') {\n e.preventDefault()\n focused.click()\n return\n }\n // Tab settles like Enter and Shift+Tab leaves like Escape, so a menu's\n // keys mean what they mean in the composer. Only a keyboard already on\n // the trigger or inside the list is intercepted: Tab elsewhere on the\n // page keeps the browser's traversal even while a menu is open.\n if (e.key === 'Tab') {\n const list = submenuEvents.current.activeList(focused)\n if (list === null || !anchored) return\n if (e.shiftKey) {\n e.preventDefault()\n onClose()\n refocusAnchor(true)\n return\n }\n // Tab settles the row it is on; from anywhere else in the menu region\n // it enters the list. A focused control that is not a row (a retry\n // button inside an error strip) and a list with no enabled row keep the\n // browser's traversal instead of being swallowed.\n if (insideList) {\n if (focused instanceof Element && focused.getAttribute('role') === 'menuitem') {\n e.preventDefault()\n if (focused.getAttribute('aria-disabled') === 'true') {\n onClose()\n refocusAnchor(true)\n return\n }\n selectingWithTab.current = true\n try { (focused as HTMLElement).click() }\n finally { selectingWithTab.current = false }\n }\n return\n }\n const row = list.querySelector<HTMLButtonElement>('button:not(:disabled)')\n if (row === null) return\n e.preventDefault()\n row.focus()\n walkIndex.current = 0\n return\n }\n // Arrows walk the list whether or not the menu focused its first item on\n // open, so `autoFocus` chooses only that entry behavior. A keyboard still\n // on the anchor enters at the end the step comes from — unless it already\n // walked, in which case the walk resumes where it left off. The walk resumes\n // from where it last put focus, not from `document.activeElement`: a row\n // that refused focus (a hidden portal frame, a detached node) would\n // otherwise re-enter at the near end on every press and the walk would\n // alternate between two rows.\n if (!['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(e.key)) return\n const list = submenuEvents.current.activeList(focused)\n if (list === null || !anchored) return\n const buttons = Array.from(list.querySelectorAll<HTMLButtonElement>('button:not(:disabled)'))\n if (buttons.length === 0) return\n const index = buttons.indexOf(focused as HTMLButtonElement)\n const from = index >= 0 ? index : walkIndex.current\n const next = e.key === 'Home' ? 0 : e.key === 'End' ? buttons.length - 1\n : from === null\n ? (e.key === 'ArrowDown' ? 0 : buttons.length - 1)\n : (from + (e.key === 'ArrowDown' ? 1 : -1) + buttons.length) % buttons.length\n e.preventDefault()\n walkIndex.current = next\n buttons[next]?.focus()\n }\n // A pointerdown inside a cross-origin iframe (a sandboxed HTML preview)\n // never reaches this document; the focus move it causes blurs the window\n // instead. Only that case closes: an app or tab switch leaves the\n // document's focus where it was, so activeElement is not an iframe.\n const onWindowBlur = () => {\n if (document.activeElement instanceof HTMLIFrameElement) onClose()\n }\n document.addEventListener('pointerdown', onPointerDown)\n const onEscape = (event: KeyboardEvent): void => { if (event.key === 'Escape') onKeyDown(event) }\n const onOtherKey = (event: KeyboardEvent): void => { if (event.key !== 'Escape') onKeyDown(event) }\n document.addEventListener('keydown', onOtherKey)\n document.addEventListener('keydown', onEscape, true)\n window.addEventListener('blur', onWindowBlur)\n return () => {\n composition.dispose()\n document.removeEventListener('pointerdown', onPointerDown)\n document.removeEventListener('keydown', onOtherKey)\n document.removeEventListener('keydown', onEscape, true)\n window.removeEventListener('blur', onWindowBlur)\n }\n }, [open, onClose, autoFocus, contextual, exiting, anchorRef, returnFocus, isExternalTrigger])\n\n useLayoutEffect(() => {\n if (exiting === 'dismiss' && listRef.current?.contains(document.activeElement)) refocusAnchor()\n }, [exiting])\n\n // A close from selection/Escape/outside click outruns a pending grace close;\n // left armed it would shut a list reopened inside the grace window. Its own\n // effect, not the listener effect above: that one re-runs on every `onClose`\n // identity change and would cancel the grace mid-transit.\n useEffect(() => {\n if (!open) cancelClose()\n }, [open, cancelClose])\n\n const itemColumns = menuIconColumns(items, contextual)\n const footerColumns = menuIconColumns(footer ?? [], contextual)\n const renderEntry = (entry: MenuEntry, columns: ReadonlySet<MenuEntry>) => {\n if ('type' in entry) return renderMenuDecoration(entry)\n const hasSub = entry.submenu !== undefined && entry.submenu.length > 0\n return <MenuRow key={entry.id} icon={entry.icon} reserveIcon={columns.has(entry)}\n disabled={entry.disabled} danger={entry.danger} shortcut={entry.shortcut}\n selected={entry.id === selectedId || selectedIds?.includes(entry.id) === true} selection={selection}\n aria-haspopup={hasSub ? 'menu' : undefined}\n aria-expanded={hasSub ? submenu.entry?.id === entry.id && !submenu.hidden : undefined}\n wrapperProps={hasSub ? {\n onPointerEnter: (event) => {\n if (!menuHoverAllowed(event) || entry.disabled) return\n const trigger = event.currentTarget.querySelector<HTMLButtonElement>('button')\n if (trigger !== null) submenu.openChild(entry.id, trigger)\n },\n onPointerLeave: (event) => { if (menuHoverAllowed(event)) submenu.leave() },\n } : undefined}\n onFocus={hasSub ? (event) => { submenu.focusParent(entry.id, event.currentTarget) } : undefined}\n onClick={(event) => {\n if (hasSub) submenu.openChild(entry.id, event.currentTarget, true)\n else onSelect?.(entry.id)\n }}>{entry.label}</MenuRow>\n }\n\n const list = open && positioned && (\n <MenuSurface compact={compact} id={contextual ? menuId : undefined}\n ref={listRef}\n className={clsx(css.list, listClassName, dense && css.denseList, compact && css.compactList, css.scrollable, submenu.page && css.parentPage, portal && css.portal, side === 'top' && !portal && css.sideTop, align === 'end' && !portal && css.alignEnd)}\n style={portal ? { positionAnchor: anchorName } : undefined}\n data-anchor-side={portal ? side : undefined}\n data-anchor-align={portal ? align : undefined}\n data-match-anchor-width={portal && minWidthFromAnchor ? '' : undefined}\n role={exiting === undefined && !submenu.page ? 'menu' : undefined}\n aria-hidden={exiting === undefined && !submenu.page ? undefined : true}\n data-context-menu={contextual ? '' : undefined}\n phase={contextual ? exiting ?? 'enter' : undefined}\n // React portals bubble synthetic events through the REACT tree: without\n // this stop, an item click re-fires the anchor row's own onClick\n // (open/toggle) after onSelect. The same bubble is where every row's\n // activation lands — data rows and component rows alike — so the\n // post-selection focus return is decided once here, after the row's\n // own handler ran; a submenu parent only opened its card.\n onClick={(e) => {\n e.stopPropagation()\n const row = e.target instanceof Element ? e.target.closest('button[role=\"menuitem\"]') : null\n if (row !== null && row.getAttribute('aria-haspopup') !== 'menu') refocusAfterSelection()\n }}\n onContextMenu={contextual ? (event) => {\n event.preventDefault(); event.stopPropagation(); onClose()\n } : undefined}\n onPointerOver={(event) => { if (menuHoverAllowed(event)) submenu.collapseFrom(event) }}\n onFocus={submenu.collapseFrom}\n >\n {/* Child cards anchor to this unscrolled box, which matches the card itself. */}\n {submenu.entry !== undefined && <span aria-hidden=\"true\" className={css.submenuAnchor} style={{ anchorName: submenu.parentAnchor }} />}\n <div className={css.viewport} role=\"presentation\">\n {items.map(entry => renderEntry(entry, itemColumns))}\n {children}\n </div>\n {footer !== undefined && footer.length > 0 && (\n <div className={css.footer} role=\"presentation\">\n {footer.map(entry => renderEntry(entry, footerColumns))}\n </div>\n )}\n </MenuSurface>\n )\n\n // Pointer-leave dismissal watches the WRAPPER, not the list: React's\n // enter/leave traversal runs over the React tree, so trigger and portaled\n // list are one region here. Aiming back at the trigger, or crossing the 4px\n // gap between them, therefore never counts as leaving.\n return (\n <span\n ref={rootRef}\n className={clsx(css.root, className)}\n style={{ anchorName: anchorRef === undefined ? anchorName : undefined, ...(point === undefined ? {} : {\n position: 'fixed', left: point.x, top: point.y, width: 0, height: 0,\n }) }}\n onPointerEnter={closeOnPointerLeave ? cancelClose : undefined}\n onPointerLeave={closeOnPointerLeave ? (event) => { if (open && menuHoverAllowed(event)) armClose() } : undefined}\n >\n {anchor}\n {portal ? (list !== false && createPortal(list, document.body)) : list}\n {open && exiting === undefined && submenu.entry !== undefined && <SubmenuPanel key={submenu.entry.id}\n entry={submenu.entry} submenu={submenu} compact={compact} dense={dense} contextual={contextual}\n backLabel={submenuBackLabel ?? submenu.entry.label} onSelect={onSelect} onClose={onClose} afterSelection={refocusAfterSelection} />}\n </span>\n )\n}\n","/** Shared fixed document scales used by preview surfaces and their controls. */\n/** Fixed scale limits, incremental step, and menu choices. */\nexport const DOCUMENT_ZOOM = { minimum: 0.25, maximum: 4, step: 0.25, presets: [0.25, 0.5, 1, 1.5, 2] } as const\n\n/** Localized labels supplied by the document renderer. */\nexport interface DocumentZoomLabels {\n readonly controls: string\n readonly menu: string\n readonly out: string\n readonly into: string\n readonly value: (percent: number) => string\n}\n","/** Floating controls shared by every zoomable document renderer. */\nimport clsx from 'clsx'\nimport { forwardRef, useEffect, useImperativeHandle, useState, type ReactNode } from 'react'\nimport { Button } from './Button.tsx'\nimport { IconChevronDownOutlineRegular, IconPlusOutlineRegular } from './icons/index.tsx'\nimport { Menu, type MenuEntry } from './Menu.tsx'\nimport { Tooltip } from './Tooltip.tsx'\nimport { DOCUMENT_ZOOM, type DocumentZoomLabels } from './document-zoom.ts'\nimport css from './ZoomControls.module.css'\n\nfunction steppedZoom(zoom: number, direction: -1 | 1): number {\n const step = direction === -1 ? Math.ceil(zoom / DOCUMENT_ZOOM.step) - 1 : Math.floor(zoom / DOCUMENT_ZOOM.step) + 1\n return Math.min(DOCUMENT_ZOOM.maximum, Math.max(DOCUMENT_ZOOM.minimum, step * DOCUMENT_ZOOM.step))\n}\n\n/** Live percentage display updated independently from the document tree. */\nexport interface ZoomControlsHandle {\n /** @param zoom - current gesture scale multiplier. */\n showZoom: (zoom: number) => void\n}\n\n/**\n * Present optional fitting, fixed presets, and incremental controls.\n * @param props - committed `zoom`, optional `fit` row (omitted: no fitting row), localized labels, `visible`, optional\n * owner `className`, and zoom and activity callbacks.\n * @param ref - `showZoom` displays a transient scale until `zoom` changes.\n * @returns a localized zoom toolbar.\n */\nexport const ZoomControls = forwardRef<ZoomControlsHandle, {\n readonly zoom: number\n readonly fit?: { readonly label: string; readonly selected: boolean; readonly onSelect: () => void } | undefined\n readonly className?: string | undefined\n readonly labels: DocumentZoomLabels\n readonly visible: boolean\n readonly onZoom: (zoom: number) => void\n readonly onActiveChange: (active: boolean) => void\n}>(function ZoomControls({\n zoom, fit, className, labels, visible, onZoom, onActiveChange,\n}, ref): ReactNode {\n const [committed, setCommitted] = useState(zoom)\n const [transient, setTransient] = useState<number>()\n const [open, setOpen] = useState(false)\n const [hovered, setHovered] = useState(false)\n const [focused, setFocused] = useState(false)\n if (committed !== zoom) {\n setCommitted(zoom)\n setTransient(undefined)\n }\n const displayZoom = transient ?? zoom\n useImperativeHandle(ref, () => ({ showZoom: setTransient }), [])\n useEffect(() => { onActiveChange(open || hovered || focused) }, [focused, hovered, onActiveChange, open])\n const items: readonly MenuEntry[] = [\n ...(fit === undefined ? [] : [{ id: 'fit', label: fit.label }, { type: 'separator' as const, id: 'fit-scale' }]),\n ...DOCUMENT_ZOOM.presets.map(value => ({ id: String(value), label: labels.value(value * 100) })),\n ]\n const selectedId = fit?.selected === true ? 'fit'\n : DOCUMENT_ZOOM.presets.some(value => value === displayZoom) ? String(displayZoom) : undefined\n return <div className={clsx(css.panel, visible && css.visible, className)} role=\"toolbar\" aria-label={labels.controls}\n data-document-zoom-controls data-document-zoom-visible={visible || undefined}\n onPointerEnter={(event) => { if (event.pointerType !== 'touch') setHovered(true) }} onPointerLeave={() => { setHovered(false) }}\n onFocusCapture={() => { setFocused(true) }} onBlurCapture={(event) => {\n if (!event.currentTarget.contains(event.relatedTarget)) setFocused(false)\n }}>\n <Tooltip label={labels.out} side=\"top\">\n <span className={css.controlAnchor}><Button size=\"sm\" className={css.zoomButton} aria-label={labels.out}\n disabled={displayZoom <= DOCUMENT_ZOOM.minimum} onMouseDown={(event) => { event.preventDefault() }}\n onClick={() => { onZoom(steppedZoom(displayZoom, -1)) }}>\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path d=\"M2 8h12\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n </Button></span>\n </Tooltip>\n <Menu open={open} side=\"top\" align=\"start\" portal compact listClassName={css.zoomMenu}\n anchor={<Button size=\"sm\" className={css.percent} aria-label={labels.menu} aria-expanded={open}\n onMouseDown={(event) => { event.preventDefault() }} onClick={() => { setOpen(value => !value) }}>\n <span>{labels.value(Math.round(displayZoom * 100))}</span>\n <IconChevronDownOutlineRegular size={12} />\n </Button>}\n items={items} selectedId={selectedId} onClose={() => { setOpen(false) }} onSelect={(selected) => {\n setOpen(false)\n if (selected === 'fit') fit?.onSelect()\n else onZoom(Number(selected))\n }} />\n <Tooltip label={labels.into} side=\"top\">\n <span className={css.controlAnchor}><Button size=\"sm\" className={css.zoomButton} aria-label={labels.into}\n disabled={displayZoom >= DOCUMENT_ZOOM.maximum} onMouseDown={(event) => { event.preventDefault() }}\n onClick={() => { onZoom(steppedZoom(displayZoom, 1)) }}>\n <IconPlusOutlineRegular size={14} />\n </Button></span>\n </Tooltip>\n </div>\n})\n","// Pill: capsule at the 24px text-line size, selectable when given `onClick`\n// (view switcher tabs, filters) and a static span otherwise — TerminalBlock's\n// exit status is the read-only case. The 11px read-only badge is `Tag`; size\n// separates the two as much as interactivity does.\n\nimport type { ButtonHTMLAttributes, ReactNode } from 'react'\nimport clsx from 'clsx'\nimport css from './Pill.module.css'\n\n/**\n * Render a pill chip. Interactive when onClick is supplied (renders a button);\n * otherwise a static span.\n * @param props.active - selected/active visual state.\n * @returns pill element.\n */\nexport function Pill({ active = false, className, children, onClick, ...rest }: {\n active?: boolean\n // `| undefined` so a caller can forward an optional class straight through\n // under exactOptionalPropertyTypes (a CSS-module lookup is string|undefined).\n className?: string | undefined\n children?: ReactNode\n} & ButtonHTMLAttributes<HTMLButtonElement>) {\n if (!onClick) {\n return <span className={clsx(css.pill, active && css.active, className)}>{children}</span>\n }\n return (\n <button\n type=\"button\"\n className={clsx(css.pill, css.interactive, active && css.active, className)}\n onClick={onClick}\n {...rest}\n >\n {children}\n </button>\n )\n}\n","import type { KeyboardEvent, ReactNode } from 'react'\nimport clsx from 'clsx'\nimport { Pill } from './Pill.tsx'\nimport css from './SegmentedTabs.module.css'\n\n/** A tab links its localized label to a caller-owned panel. */\nexport interface SegmentedTab<Value extends string = string> {\n value: Value\n label: ReactNode\n id: string\n panelId: string\n}\n\n/**\n * Render equal-width, controlled tabs with a sliding selection indicator.\n * @param props.items - non-empty ordered tabs with unique values and DOM ids.\n * @param props.value - selected value, which must belong to items.\n * @param props.onChange - selection requested by click, Left/Right, or Home/End.\n * Keyboard selection also moves focus; only the selected tab is a tab stop.\n * @param props.label - localized accessible name for the tab list.\n * @param props.className - layout placement; panels remain caller-owned.\n * @param props.size - `sm` draws 30px tabs with a 2px inset (34px tall); the default `md` draws 34px tabs with a 4px inset (42px tall).\n * @returns the tab list, without its panels.\n */\nexport function SegmentedTabs<Value extends string>({ items, value, onChange, label, className, size = 'md' }: {\n items: readonly [SegmentedTab<Value>, ...SegmentedTab<Value>[]]\n value: Value\n onChange: (value: Value) => void\n label: string\n className?: string | undefined\n size?: 'sm' | 'md' | undefined\n}): ReactNode {\n const selectedIndex = items.findIndex(item => item.value === value)\n\n const onKeyDown = (event: KeyboardEvent<HTMLButtonElement>, index: number) => {\n let next: number\n switch (event.key) {\n case 'ArrowLeft': next = (index + items.length - 1) % items.length; break\n case 'ArrowRight': next = (index + 1) % items.length; break\n case 'Home': next = 0; break\n case 'End': next = items.length - 1; break\n default: return\n }\n event.preventDefault()\n event.stopPropagation()\n const tablist = event.currentTarget.parentElement\n const nextItem = items[next]\n /* v8 ignore next -- the event comes from a mounted direct child and next is bounded by non-empty items. */\n if (tablist === null || nextItem === undefined) return\n tablist.querySelectorAll<HTMLButtonElement>('[role=\"tab\"]').item(next).focus()\n onChange(nextItem.value)\n }\n\n return (\n <div\n role=\"tablist\"\n data-size={size}\n aria-label={label}\n className={clsx(css.tabs, className)}\n style={{ gridTemplateColumns: `repeat(${items.length}, minmax(0, 1fr))` }}\n >\n <span\n className={css.indicator}\n aria-hidden=\"true\"\n style={{ width: `calc((100% - 2 * var(--segmented-tabs-inset)) / ${items.length})`, transform: `translateX(${selectedIndex * 100}%)` }}\n />\n {items.map((item, index) => (\n <Pill\n key={item.value}\n id={item.id}\n role=\"tab\"\n className={css.tab}\n aria-selected={value === item.value}\n aria-controls={item.panelId}\n tabIndex={value === item.value ? 0 : -1}\n onClick={() => { onChange(item.value) }}\n onKeyDown={(event) => { onKeyDown(event, index) }}\n >\n {item.label}\n </Pill>\n ))}\n </div>\n )\n}\n","// Tag: read-only capsule badge. The selectable capsule button is `Pill` —\n// a tag takes no `onClick` and no `active`, and carries no copy of its own.\n\nimport type { ReactNode } from 'react'\nimport clsx from 'clsx'\nimport css from './Tag.module.css'\n\n/** Palette selector; each tone names one shipped appearance. */\nexport type TagTone =\n /** Hairline outline on tertiary text: the read-only default. */\n | 'outline'\n /** Inverted fill: one tag per group that names the current selection. */\n | 'solid'\n /** Platform-gray fill: a neutral fact with no status meaning. */\n | 'neutral'\n /** Text only, no fill: a fact stated more quietly than `neutral`. */\n | 'quiet'\n /** Tinted green: a healthy or enabled state. */\n | 'success'\n /** Tinted blue: informational classification, not health. */\n | 'info'\n /** Tinted amber: attention needed, not yet a failure. */\n | 'warning'\n /** Tinted red: a failure. */\n | 'danger'\n\n/**\n * Render a read-only tag.\n * @param props.tone - which palette to use (default `outline`).\n * @param props.className - extra class for layout placement.\n * @param props.children - the localized label, owned by the render site.\n * @returns the tag element.\n */\nexport function Tag({ tone = 'outline', className, children }: {\n tone?: TagTone\n // `| undefined` so a caller can forward an optional class straight through\n // under exactOptionalPropertyTypes (a CSS-module lookup is string|undefined).\n className?: string | undefined\n children?: ReactNode\n}) {\n return <span className={clsx(css.tag, className)} data-tone={tone}>{children}</span>\n}\n","/** A single-line file path whose trailing characters remain visible in narrow toolbars. */\nimport { useLayoutEffect, useRef, type HTMLAttributes } from 'react'\nimport clsx from 'clsx'\nimport { pathPartsOf } from '@deepseek-ai/dsh-util-workspace-path'\nimport css from './PathLabel.module.css'\n\n/**\n * Render subdued directories and a primary filename, with the complete path on hover.\n * Fitting text is left-aligned; overflow clips and fades at the left edge.\n * The fade updates on path changes and, when ResizeObserver is available, size changes.\n * @param props - File path and attributes for its outer span; callers own toolbar spacing.\n * @returns the path label.\n */\nexport function PathLabel({ path, className, ...attributes }: {\n path: string\n} & Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'title'>) {\n const boxRef = useRef<HTMLSpanElement>(null)\n const textRef = useRef<HTMLSpanElement>(null)\n const { directory, name } = pathPartsOf(path)\n useLayoutEffect(() => {\n // Both spans mount unconditionally before this layout effect runs.\n const outer = boxRef.current as HTMLSpanElement\n const inner = textRef.current as HTMLSpanElement\n const apply = (): void => {\n outer.toggleAttribute('data-path-clipped', inner.offsetWidth > outer.clientWidth)\n }\n apply()\n const observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(apply)\n observer?.observe(outer)\n observer?.observe(inner)\n return () => { observer?.disconnect() }\n }, [path])\n return (\n <span {...attributes} ref={boxRef} className={clsx(css.path, className)} title={path} data-path-label>\n <span ref={textRef} className={css.text}>\n {directory !== '' && <span className={css.directory}>{directory}</span>}\n <span className={css.name}>{name}</span>\n </span>\n </span>\n )\n}\n","// Switch: two-state toggle. `label` is required and has no default, so a render\n// site cannot ship the control without an accessible name.\n\nimport clsx from 'clsx'\nimport css from './Switch.module.css'\n\n/**\n * Render a toggle switch.\n * @param props.checked - the current state; the control is fully controlled.\n * @param props.onChange - called with the state the click asks for.\n * @param props.label - localized accessible name, owned by the render site.\n * @param props.disabled - whether the control refuses input; owners also set it\n * while a write is in flight, not only when a deployment locks the toggle.\n * @param props.title - localized hover text, typically why the toggle is locked.\n * @param props.className - extra class for layout placement.\n * @returns the switch element.\n */\nexport function Switch({ checked, onChange, label, disabled = false, title, className }: {\n checked: boolean\n onChange: (next: boolean) => void\n label: string\n disabled?: boolean\n title?: string | undefined\n // `| undefined` so a caller can forward an optional class straight through\n // under exactOptionalPropertyTypes (a CSS-module lookup is string|undefined).\n className?: string | undefined\n}) {\n return (\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={checked}\n aria-label={label}\n title={title}\n disabled={disabled}\n className={clsx(css.switch, className)}\n onClick={() => { onChange(!checked) }}\n >\n <span className={css.thumb} />\n </button>\n )\n}\n","// SegmentedControl: a tablist of two or more equal-width segments with one\n// sliding indicator, for switching a card or panel between a few modes. The\n// owner holds the selection; `label` is required so the tablist never ships\n// without an accessible name, and every segment label is owner-localized.\n// Each tab is `<id>-<value>` and controls the panel `<id>-<value>-panel`, the\n// element the owner renders for that mode and points back at the tab with\n// `aria-labelledby`.\n\nimport { useEffect, useRef } from 'react'\nimport type { CSSProperties, KeyboardEvent } from 'react'\nimport clsx from 'clsx'\nimport css from './SegmentedControl.module.css'\n\n/** One segment of a {@link SegmentedControl}. */\nexport interface SegmentedControlOption<Value extends string> {\n /** The value the owner receives when this segment is chosen. */\n value: Value\n /** Localized segment text. */\n label: string\n /** Whether the segment refuses selection. */\n disabled?: boolean\n /** Localized hover text, typically why the segment is locked. */\n title?: string\n}\n\n/** The keys that walk the tablist, per the WAI-ARIA tabs pattern. */\ntype WalkKey = 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown' | 'Home' | 'End'\n\nfunction isWalkKey(key: string): key is WalkKey {\n return key === 'ArrowLeft' || key === 'ArrowRight' || key === 'ArrowUp' || key === 'ArrowDown'\n || key === 'Home' || key === 'End'\n}\n\n/**\n * The enabled option a walk key lands on from the selected one: arrows step\n * to the nearest enabled neighbour and wrap, Home and End jump to the first\n * and last enabled option.\n */\nfunction walk<Value extends string>(\n options: readonly SegmentedControlOption<Value>[],\n from: number,\n key: WalkKey,\n): SegmentedControlOption<Value> | undefined {\n const enabled = options.filter(option => option.disabled !== true)\n if (key === 'Home') return enabled[0]\n if (key === 'End') return enabled[enabled.length - 1]\n const step = key === 'ArrowRight' || key === 'ArrowDown' ? 1 : -1\n const count = options.length\n for (let offset = 1; offset < count; offset += 1) {\n const candidate = options[((from + step * offset) % count + count) % count]\n if (candidate !== undefined && candidate.disabled !== true) return candidate\n }\n return undefined\n}\n\n/**\n * Render a segmented control.\n * @param props.id - the owner's base id: each tab is `<id>-<value>` and names\n * `<id>-<value>-panel` as the panel it controls.\n * @param props.value - the selected option's value; the control is fully controlled.\n * @param props.options - the segments in display order; at least two.\n * @param props.onChange - called with the value a click or a walk key asks for,\n * never with the value already selected.\n * @param props.label - localized accessible name of the tablist.\n * @param props.disabled - lock every segment, typically while the shown panel\n * has a write or a fetch in flight that switching would orphan.\n * @param props.className - extra class for layout placement.\n * @returns the tablist element.\n */\nexport function SegmentedControl<Value extends string>({\n id, value, options, onChange, label, disabled = false, className,\n}: {\n id: string\n value: Value\n options: readonly SegmentedControlOption<Value>[]\n onChange: (next: Value) => void\n label: string\n disabled?: boolean\n // `| undefined` so a caller can forward an optional class straight through\n // under exactOptionalPropertyTypes (a CSS-module lookup is string|undefined).\n className?: string | undefined\n}) {\n const list = useRef<HTMLDivElement>(null)\n const selected = options.findIndex(option => option.value === value)\n\n // A walk key reports the next value and the owner re-renders with it; the\n // keyboard then follows the selection so the roving tabindex stays usable.\n useEffect(() => {\n const root = list.current\n /* v8 ignore next -- the ref is attached to the always-rendered root before any effect runs. */\n if (root === null) return\n if (!root.contains(document.activeElement)) return\n root.querySelector<HTMLButtonElement>('[role=\"tab\"][aria-selected=\"true\"]')?.focus()\n }, [value])\n\n const onKeyDown = (event: KeyboardEvent<HTMLButtonElement>): void => {\n if (!isWalkKey(event.key)) return\n event.preventDefault()\n const target = walk(options, selected, event.key)\n if (target !== undefined && target.value !== value) onChange(target.value)\n }\n\n const indicator = {\n '--dsh-segment-count': String(options.length),\n '--dsh-segment-index': String(selected),\n } as CSSProperties\n\n return (\n <div\n ref={list}\n role=\"tablist\"\n aria-label={label}\n className={clsx(css.control, className)}\n style={indicator}\n >\n <span aria-hidden=\"true\" className={css.indicator} />\n {options.map((option) => {\n const active = option.value === value\n return (\n <button\n key={option.value}\n id={`${id}-${option.value}`}\n type=\"button\"\n role=\"tab\"\n aria-selected={active}\n aria-controls={`${id}-${option.value}-panel`}\n tabIndex={active ? 0 : -1}\n disabled={disabled || option.disabled === true}\n title={option.title}\n className={css.tab}\n onClick={() => { if (!active) onChange(option.value) }}\n onKeyDown={onKeyDown}\n >\n {option.label}\n </button>\n )\n })}\n </div>\n )\n}\n","/** Controlled native checkbox with a caller-owned visible and accessible label. */\n\nimport clsx from 'clsx'\nimport css from './Checkbox.module.css'\n\n/**\n * Render a labeled checkbox with native keyboard and form semantics.\n * @param props.checked - current checked state.\n * @param props.onChange - receives the requested checked state.\n * @param props.label - localized visible and accessible label.\n * @param props.disabled - whether the control refuses changes.\n * @param props.title - optional localized hover text.\n * @param props.className - extra class for the label's placement.\n * @param props.modalAutofocus - designate the input for the owning Modal's initial focus without React autoFocus.\n * @returns the label containing its checkbox.\n */\nexport function Checkbox({ checked, onChange, label, disabled = false, title, className, modalAutofocus = false }: {\n checked: boolean\n onChange: (next: boolean) => void\n label: string\n disabled?: boolean\n title?: string | undefined\n className?: string | undefined\n modalAutofocus?: boolean\n}) {\n return (\n <label className={clsx(css.checkbox, className)} title={title}>\n <input type=\"checkbox\" checked={checked} disabled={disabled}\n data-modal-autofocus={modalAutofocus || undefined}\n onChange={(event) => { onChange(event.target.checked) }} />\n <span>{label}</span>\n </label>\n )\n}\n","// Input: single-line text input atom (search boxes, inline forms). Multi-line\n// inline edits use InlineEditor; the composer is owned by the conversation package.\n\nimport { forwardRef, type InputHTMLAttributes, type ReactNode } from 'react'\nimport clsx from 'clsx'\nimport css from './Input.module.css'\n\n/**\n * Render a text input with an optional leading icon.\n * @param props.icon - optional 16px leading icon node.\n * @param ref - the native input, cleared when it unmounts.\n * @returns wrapper span containing the native input; input attributes pass through.\n */\nexport const Input = forwardRef<HTMLInputElement, {\n icon?: ReactNode\n className?: string\n} & InputHTMLAttributes<HTMLInputElement>>(function Input({ icon, className, ...rest }, ref) {\n return (\n <span className={clsx(css.wrap, className)}>\n {icon != null && <span className={css.icon}>{icon}</span>}\n <input ref={ref} className={css.input} {...rest} />\n </span>\n )\n})\n","/** Multi-line inline editor for short saved-on-Enter drafts such as queued messages and goals. */\n\nimport { useLayoutEffect, useRef, type KeyboardEvent } from 'react'\nimport clsx from 'clsx'\nimport css from './InlineEditor.module.css'\n\n/**\n * Render an autofocused textarea that grows with its text up to six lines, then scrolls.\n * A textarea rather than an input: HTML strips newlines from single-line input values.\n * Enter saves, Shift+Enter breaks the line, Enter during IME composition does nothing,\n * and Escape cancels.\n * @param props.value - current draft text.\n * @param props.label - localized accessible name.\n * @param props.onChange - receives the edited text.\n * @param props.onSave - called for a plain Enter.\n * @param props.onCancel - called for Escape.\n * @param props.className - extra class for the editor's placement.\n * @returns the textarea.\n */\nexport function InlineEditor({ value, label, onChange, onSave, onCancel, className }: {\n value: string\n label: string\n onChange: (value: string) => void\n onSave: () => void\n onCancel: () => void\n className?: string\n}) {\n const ref = useRef<HTMLTextAreaElement>(null)\n\n useLayoutEffect(() => {\n // The textarea mounts before layout effects run.\n const node = ref.current as HTMLTextAreaElement\n const fit = (): void => {\n node.style.height = 'auto'\n // scrollHeight excludes the border that the border-box height includes.\n node.style.height = `${node.scrollHeight + node.offsetHeight - node.clientHeight}px`\n }\n fit()\n // A width change rewraps the text; the refit height leaves the width unchanged.\n const observer = new ResizeObserver(fit)\n observer.observe(node)\n return () => { observer.disconnect() }\n }, [value])\n\n const onKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>): void => {\n if (event.key === 'Escape') {\n onCancel()\n return\n }\n // keyCode 229 is the legacy IME-composition signal engines emit without isComposing.\n const composing = event.nativeEvent.isComposing || Reflect.get(event.nativeEvent, 'keyCode') === 229\n if (event.key !== 'Enter' || event.shiftKey || composing) return\n event.preventDefault()\n onSave()\n }\n\n return (\n <textarea\n ref={ref}\n autoFocus\n rows={1}\n className={clsx(css.editor, className)}\n aria-label={label}\n value={value}\n onChange={(event) => { onChange(event.currentTarget.value) }}\n onKeyDown={onKeyDown}\n />\n )\n}\n","/** Accessible menu groups with shared sticky-heading presentation and viewport observation. */\nimport { useId, type ReactNode } from 'react'\nimport css from './MenuGroup.module.css'\n\n/**\n * Render a named group with an instance-owned heading id and an inaccessible position sentinel.\n * @param props - Caller-localized label and optional menu rows.\n * @returns A section named by its direct heading, followed by the supplied children.\n */\nexport function MenuGroup({ label, children }: { label: string; children?: ReactNode }) {\n const headingId = useId()\n return (\n <section role=\"group\" aria-labelledby={headingId} data-menu-group=\"\" className={css.group}>\n <span aria-hidden=\"true\" data-menu-group-start=\"\" className={css.start} />\n <div id={headingId} data-menu-group-heading=\"\" className={css.heading}>{label}</div>\n {children}\n </section>\n )\n}\n\n/**\n * Update heading backgrounds asynchronously from native intersection and viewport-size observations.\n * Headings remain transparent until observations identify a section crossing the viewport top.\n * Without IntersectionObserver or ResizeObserver, CSS sticky headings remain transparent.\n * Group membership is captured at setup; dispose before observing changed groups or the same viewport again.\n * @param viewport - Unpadded, borderless scroll container with direct MenuGroup children.\n * @returns Cleanup owning both intersection observers and the viewport resize observer; disconnects\n * them, ignores queued callbacks, and clears managed data-stuck attributes. No valid groups acquires nothing.\n */\nexport function observeStickyMenuGroups(viewport: HTMLElement): () => void {\n const groups = [...viewport.querySelectorAll<HTMLElement>(':scope > [data-menu-group]')].flatMap((section) => {\n const heading = section.querySelector<HTMLElement>(':scope > [data-menu-group-heading]')\n const start = section.querySelector<HTMLElement>(':scope > [data-menu-group-start]')\n return heading === null || start === null ? [] : [{\n section, heading, start, atTop: false, above: false, topTime: -Infinity, aboveTime: -Infinity,\n }]\n })\n if (groups.length === 0 || typeof IntersectionObserver === 'undefined' || typeof ResizeObserver === 'undefined') {\n return () => {}\n }\n\n const sections = new Map<Element, typeof groups[number]>(groups.map(group => [group.section, group]))\n const starts = new Map<Element, typeof groups[number]>(groups.map(group => [group.start, group]))\n let disposed = false\n let stripObserver: IntersectionObserver | undefined\n let viewportHeight: number | undefined\n const render = (group: typeof groups[number]): void => {\n const stuck = group.atTop && group.above\n if (group.heading.hasAttribute('data-stuck') !== stuck) group.heading.toggleAttribute('data-stuck', stuck)\n }\n const startObserver = new IntersectionObserver((entries) => {\n if (disposed) return\n for (const entry of entries) {\n const group = starts.get(entry.target)\n if (!group || entry.rootBounds === null || entry.time < group.aboveTime) continue\n group.above = entry.boundingClientRect.top < entry.rootBounds.top\n group.aboveTime = entry.time\n render(group)\n }\n }, { root: viewport, threshold: [0, 1] })\n for (const { start } of groups) startObserver.observe(start)\n\n const sizeObserver = new ResizeObserver((entries) => {\n if (disposed) return\n for (const entry of entries) {\n if (entry.target !== viewport || entry.contentRect.height === viewportHeight) continue\n viewportHeight = entry.contentRect.height\n stripObserver?.disconnect()\n // A full section crossing this strip is observable even when scrolling skips its start sentinel.\n const observer = new IntersectionObserver((intersections) => {\n if (disposed || stripObserver !== observer) return\n for (const intersection of intersections) {\n const group = sections.get(intersection.target)\n if (!group || intersection.rootBounds === null) continue\n const top = intersection.rootBounds.top\n if (intersection.time >= group.topTime) {\n group.atTop = intersection.isIntersecting && intersection.boundingClientRect.bottom > top\n group.topTime = intersection.time\n }\n // Both observers describe the section's normal-flow start; the newest sample wins.\n if (intersection.time >= group.aboveTime) {\n group.above = intersection.boundingClientRect.top < top\n group.aboveTime = intersection.time\n }\n render(group)\n }\n }, { root: viewport, rootMargin: `0px 0px ${Math.min(1, viewportHeight) - viewportHeight}px 0px`, threshold: 0 })\n stripObserver = observer\n for (const { section } of groups) observer.observe(section)\n }\n })\n sizeObserver.observe(viewport)\n return () => {\n if (disposed) return\n disposed = true\n startObserver.disconnect()\n stripObserver?.disconnect()\n sizeObserver.disconnect()\n for (const { heading } of groups) {\n if (heading.hasAttribute('data-stuck')) heading.removeAttribute('data-stuck')\n }\n }\n}\n","/** Shared viewport inset for overlays, derived from the desktop frame's reserved top strip. */\n\n/**\n * Resolve the top margin an overlay keeps from the viewport edge.\n * @param min - the overlay's own viewport margin in px, used as the floor.\n * @param anchor - the overlay's anchor rect in viewport coordinates. While the anchor's top edge is inside the\n * viewport, the margin never exceeds `anchor.bottom + gap`, so an overlay opened from a control inside the top strip\n * stays next to it.\n * @param gap - the distance the overlay keeps below `anchor`.\n * @returns the frame clearance plus 20px (20px in fullscreen), capped by a visible `anchor`, but never below `min`.\n */\nexport function overlayTopMargin(min: number, anchor?: { readonly top: number; readonly bottom: number }, gap = 0): number {\n const root = document.documentElement\n const clearance = Number.parseFloat(getComputedStyle(root).getPropertyValue('--dsh-frame-top-clearance'))\n if (Number.isNaN(clearance)) return min\n const cap = anchor !== undefined && anchor.top >= 0 ? anchor.bottom + gap : Number.POSITIVE_INFINITY\n return Math.max(min, Math.min((root.hasAttribute('data-fullscreen') ? 0 : clearance) + 20, cap))\n}\n","/**\n * Viewport-fit hook for bottom-anchored overlays (slash menu, popupSelect):\n * the element's bottom edge is laid out independent of its height, so it\n * grows upward and only the top edge can collide with the viewport — clamp\n * the design cap to the space between that edge and the viewport top.\n */\nimport { useLayoutEffect, useState } from 'react'\nimport type { RefObject } from 'react'\nimport { overlayTopMargin } from './overlay-top-margin.ts'\n\n/**\n * Safe distance kept between the overlay and the viewport top edge (mirrors\n * the Menu portal margin); the frame's overlay inset widens it.\n */\nconst MARGIN = 12\n\n/**\n * Clamp a bottom-anchored overlay's max-height to the viewport.\n * @param ref - the overlay element; a null current (overlay closed) skips measuring.\n * @param cap - design max-height in px (the clamp never exceeds it).\n * @param signal - re-measure trigger: pass the overlay's render state so anchor\n * moves (composer growth) re-fit; resize/scroll re-fit while mounted.\n * @param margin - viewport top margin floor in px; the frame's overlay\n * inset widens it. Callers under fixed chrome (the conversation header)\n * raise it past their chrome's height.\n * @returns the max-height to apply inline, in px.\n */\nexport function useAnchoredMaxHeight(ref: RefObject<HTMLElement>, cap: number, signal: unknown, margin: number = MARGIN): number {\n const [maxHeight, setMaxHeight] = useState(cap)\n useLayoutEffect(() => {\n const el = ref.current\n if (el === null) return\n const fit = () => {\n setMaxHeight(Math.min(cap, Math.max(0, el.getBoundingClientRect().bottom - overlayTopMargin(margin))))\n }\n fit()\n window.addEventListener('resize', fit)\n window.addEventListener('scroll', fit, true)\n return () => {\n window.removeEventListener('resize', fit)\n window.removeEventListener('scroll', fit, true)\n }\n }, [ref, cap, signal, margin])\n return maxHeight\n}\n","// Host clipboard write shared by Web UI copy controls. Success feedback stays\n// with each control; this helper only reports whether the host accepted a write.\n\n/**\n * Write text to the host clipboard, preferring the async Clipboard API and\n * falling back to `execCommand('copy')` on hosts (jsdom, insecure contexts)\n * that omit it.\n * @param text - the exact text to place on the clipboard.\n * @returns true only when the host accepted the write.\n */\nexport async function writeClipboard(text: string): Promise<boolean> {\n // lib.dom types clipboard non-optional, but insecure contexts omit it —\n // that runtime gap is exactly what this guard detects.\n /* oxlint-disable-next-line typescript/no-unnecessary-condition */\n if (navigator.clipboard?.writeText) {\n try {\n await navigator.clipboard.writeText(text)\n return true\n } catch {\n // Denied permissions / iframe policy — do not claim success.\n return false\n }\n }\n // jsdom and older hosts: best-effort execCommand path when present.\n // execCommand('copy') is the only clipboard fallback where the async API\n // is missing; deprecated but deliberately retained.\n /* oxlint-disable typescript/no-deprecated */\n const exec = typeof document.execCommand === 'function'\n ? document.execCommand.bind(document)\n : undefined\n if (exec === undefined) return false\n const el = document.createElement('textarea')\n el.value = text\n el.setAttribute('readonly', '')\n el.style.position = 'fixed'\n el.style.left = '-9999px'\n document.body.appendChild(el)\n el.select()\n try {\n return exec('copy')\n } catch {\n return false\n } finally {\n el.remove()\n }\n /* oxlint-enable typescript/no-deprecated */\n}\n","import { createContext, useState, type ReactNode } from 'react'\n\ninterface GroupState {\n isWarm: () => boolean\n enter: (overCard: boolean) => void\n leave: () => void\n containsCard: (target: EventTarget | null) => boolean\n shown: (owner: symbol, dismiss: () => void, element: HTMLElement) => void\n release: (owner: symbol) => void\n}\n\n/** Private coordination shared only by opted-in HoverCards inside one mounted group. */\nexport const HoverCardGroupContext = createContext<GroupState | null>(null)\n\n/**\n * Share first-display dwell across a list and its active portal, including the card's existing pointer grace.\n * @param props.children - list contents, including opted-in HoverCards.\n * @param props.className - classes for the physical list container.\n * @param props.as - physical container tag; use span to preserve inline text layout.\n * @returns the list container and its private hover coordinator.\n */\nexport function HoverCardGroup({ children, className, as: Container = 'div' }: {\n children: ReactNode\n className?: string | undefined\n as?: 'div' | 'span'\n}) {\n const [group] = useState<GroupState>(() => {\n let pointer: 'outside' | 'list' | 'card' = 'outside'\n let warm = false\n let active: { owner: symbol; dismiss: () => void; element: HTMLElement } | null = null\n return {\n isWarm: () => warm,\n enter: (overCard) => {\n pointer = overCard ? 'card' : 'list'\n if (overCard) warm = true\n },\n leave: () => {\n pointer = 'outside'\n // A displayed card owns the grace across the gap; its release ends an outside visit.\n if (active === null) warm = false\n },\n containsCard: target => target instanceof Node && active !== null && active.element.contains(target),\n shown: (owner, dismiss, element) => {\n // Keyboard focus can replace the portal under the pointer without a pointer-out event.\n if (pointer === 'card') { pointer = 'outside'; warm = false }\n if (pointer === 'list') warm = true\n const previous = active\n active = { owner, dismiss, element }\n if (previous !== null && previous.owner !== owner) previous.dismiss()\n },\n release: (owner) => {\n if (active?.owner !== owner) return\n active = null\n if (pointer !== 'list') { pointer = 'outside'; warm = false }\n },\n }\n })\n return (\n <HoverCardGroupContext.Provider value={group}>\n <Container\n className={className}\n onPointerOverCapture={(event) => {\n const overCard = group.containsCard(event.target)\n if (event.currentTarget.contains(event.target as Node) || overCard) group.enter(overCard)\n }}\n onPointerOutCapture={(event) => {\n const fromGroup = event.currentTarget.contains(event.target as Node) || group.containsCard(event.target)\n const intoGroup = (event.relatedTarget instanceof Node && event.currentTarget.contains(event.relatedTarget))\n || group.containsCard(event.relatedTarget)\n if (fromGroup && !intoGroup) group.leave()\n }}\n >\n {children}\n </Container>\n </HoverCardGroupContext.Provider>\n )\n}\n","import { useCallback, useContext, useEffect, useLayoutEffect, useRef, useState } from 'react'\nimport type { CSSProperties, ReactNode, RefObject, SyntheticEvent } from 'react'\nimport clsx from 'clsx'\nimport { createPortal } from 'react-dom'\nimport { writeClipboard } from './clipboard.ts'\nimport { usePointerGrace } from './pointer-grace.ts'\nimport { overlayTopMargin } from './overlay-top-margin.ts'\nimport { HoverCardGroupContext } from './HoverCardGroup.tsx'\nimport css from './HoverCard.module.css'\n\n/** Preview opacity transition and retained lifetime during dismissal. */\nconst PREVIEW_FADE_MS = 100\nconst PREVIEW_MAX_HEIGHT = 420\nconst PREVIEW_INSET = 24\nconst INLINE_PREVIEW_WIDTH = 300\nconst ANCHOR_GAP = 8\nconst VIEWPORT_MARGIN = 8\n\ninterface CardPosition {\n left: number\n top: number\n width?: number\n maxWidth?: number\n maxHeight?: number\n bridge?: { left: number; top: number; width: number; height: number }\n}\n\n/**\n * Render an anchor with a hover-triggered preview card independently of nested tooltips.\n * Touch entry does not open a preview or intercept the anchor's action.\n * @param props.anchor - the hover target (rendered in place inside a wrapper span).\n * @param props.content - card content; the pointer may rest on it, so it is\n * readable and selectable, but it carries no dismissal affordance of its own.\n * @param props.openDelayMs - hover dwell before the card shows (default 500).\n * @param props.variant - compact card beside the anchor, or a preview above/below it\n * with 24px side insets, a 420px height cap, the frame-top clearance (capped below an anchor inside the top strip),\n * and 100ms opacity transitions.\n * @param props.widthAnchorRef - optional element whose width and horizontal position size the preview.\n * @param props.inline - keep the anchor in prose; show a contained preview on hover or keyboard focus.\n * Its hover region connects the anchor and preview across the visual gap.\n * @param props.fitContent - size an inline card to its content within the usual width cap.\n * @param props.disabled - suppress opening; turning true dismisses an open card.\n * @param props.grouped - share first-display dwell across the surrounding list and active portal.\n * Group replacement removes the previous card immediately, including a fading preview.\n * @param props.copyText - optional primary value copied by activation and\n * included in the card's accessible name.\n * @param props.copyLabel - localized accessible activation-label prefix.\n * @param props.copiedLabel - localized visible success label.\n * @returns anchor wrapper with the conditional portaled card.\n */\nexport function HoverCard({\n anchor, content, openDelayMs = 500, disabled = false, grouped = false,\n copyText, copyLabel, copiedLabel, variant = 'compact', widthAnchorRef, inline = false, fitContent = false,\n}: {\n anchor: ReactNode\n /** Inline media preview using the shared menu material and keyboard focus. */\n inline?: boolean\n fitContent?: boolean\n content: ReactNode\n openDelayMs?: number\n disabled?: boolean\n grouped?: boolean\n variant?: 'compact' | 'preview'\n widthAnchorRef?: RefObject<HTMLElement | null>\n} & ({ copyText?: string | undefined; copyLabel: string; copiedLabel: string } | {\n copyText?: undefined\n copyLabel?: string\n copiedLabel?: string\n})) {\n const rootRef = useRef<HTMLSpanElement>(null)\n const cardRef = useRef<HTMLDivElement>(null)\n const portalRef = useRef<HTMLSpanElement>(null)\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n const copyTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n const copyHeightRef = useRef<number | null>(null)\n const copyEpochRef = useRef(0)\n const copyingRef = useRef(false)\n const mountedRef = useRef(true)\n const [phase, setPhase] = useState<'closed' | 'open' | 'closing'>('closed')\n const open = phase !== 'closed'\n const closing = phase === 'closing'\n const [pos, setPos] = useState<CardPosition | null>(null)\n const positioned = pos !== null\n const [copied, setCopied] = useState(false)\n const parentGroup = useContext(HoverCardGroupContext)\n const group = grouped ? parentGroup : null\n const [groupOwner] = useState(() => Symbol('hover-card'))\n\n const clearCopied = useCallback(() => {\n if (copyTimerRef.current !== null) {\n clearTimeout(copyTimerRef.current)\n copyTimerRef.current = null\n }\n copyHeightRef.current = null\n setCopied(false)\n }, [])\n\n const close = useCallback(() => {\n copyEpochRef.current += 1\n clearCopied()\n setPhase(current => variant === 'preview' && current !== 'closed' ? 'closing' : 'closed')\n }, [clearCopied, variant])\n\n const { arm: armClose, cancel: cancelClose } = usePointerGrace(close)\n\n const clearTimer = useCallback(() => {\n if (timerRef.current !== null) {\n clearTimeout(timerRef.current)\n timerRef.current = null\n }\n }, [])\n\n const dismissImmediately = useCallback(() => {\n clearTimer()\n cancelClose()\n copyEpochRef.current += 1\n clearCopied()\n setPhase('closed')\n }, [clearTimer, cancelClose, clearCopied])\n // A fading preview still owns the group's visible card until it unmounts or another card replaces it.\n const groupVisible = open && positioned\n useLayoutEffect(() => {\n if (!groupVisible || group === null) return\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- The visible portal's ref is attached before layout effects.\n group.shown(groupOwner, dismissImmediately, portalRef.current!)\n return () => { group.release(groupOwner) }\n }, [group, groupOwner, groupVisible, dismissImmediately])\n\n useEffect(() => {\n if (!closing) return\n const timer = setTimeout(() => { setPhase('closed') }, PREVIEW_FADE_MS)\n return () => { clearTimeout(timer) }\n }, [closing])\n\n // Owner disabling mid-hover (menu opened, drag started) starts dismissal.\n useEffect(() => {\n if (!disabled) return\n clearTimer()\n cancelClose()\n close()\n }, [disabled, cancelClose, close])\n\n useEffect(() => {\n mountedRef.current = true\n return () => {\n mountedRef.current = false\n copyEpochRef.current += 1\n clearTimer()\n if (copyTimerRef.current !== null) {\n clearTimeout(copyTimerRef.current)\n copyTimerRef.current = null\n }\n }\n }, [])\n\n useEffect(() => {\n if (!open || (variant !== 'preview' && !inline)) return\n const dismiss = (event: KeyboardEvent): void => {\n if (event.key !== 'Escape') return\n if (inline) event.stopPropagation()\n clearTimer()\n cancelClose()\n close()\n }\n window.addEventListener('keydown', dismiss, inline)\n return () => { window.removeEventListener('keydown', dismiss, inline) }\n }, [open, variant, inline, cancelClose, close])\n\n // Fixed-position from the anchor rect before paint; track the anchor while\n // open (capture-phase scroll catches nested panes), as in Menu portal mode.\n useLayoutEffect(() => {\n if (!open) { setPos(null); return }\n const place = () => {\n const wrapper = rootRef.current\n /* v8 ignore next -- the ref is attached before the layout effect runs and the listeners die with it. */\n if (wrapper === null) return\n if (wrapper.closest('[inert], [hidden]') !== null) {\n dismissImmediately()\n return\n }\n const r = wrapper.getBoundingClientRect()\n const h = cardRef.current?.offsetHeight ?? 0\n if (variant === 'preview') {\n const bounds = widthAnchorRef?.current?.getBoundingClientRect() ?? r\n const width = Math.max(0, Math.min(bounds.width - PREVIEW_INSET * 2, window.innerWidth - VIEWPORT_MARGIN * 2))\n const topMargin = overlayTopMargin(VIEWPORT_MARGIN, r, ANCHOR_GAP)\n const belowTop = Math.max(topMargin, r.bottom + ANCHOR_GAP)\n const above = Math.max(0, r.top - ANCHOR_GAP - topMargin)\n const below = Math.max(0, window.innerHeight - belowTop - VIEWPORT_MARGIN)\n const onTop = above >= Math.min(PREVIEW_MAX_HEIGHT, below)\n const maxHeight = Math.min(PREVIEW_MAX_HEIGHT, onTop ? above : below)\n setPos({\n left: Math.max(VIEWPORT_MARGIN, Math.min(bounds.left + PREVIEW_INSET, window.innerWidth - width - VIEWPORT_MARGIN)),\n top: onTop ? Math.max(topMargin, r.top - Math.min(h, maxHeight) - ANCHOR_GAP) : belowTop,\n width, maxHeight,\n })\n return\n }\n if (inline) {\n const height = Math.max(h, cardRef.current?.scrollHeight ?? 0)\n const maxWidth = Math.max(0, Math.min(INLINE_PREVIEW_WIDTH, window.innerWidth - VIEWPORT_MARGIN * 2))\n const width = fitContent ? Math.min(cardRef.current?.offsetWidth ?? maxWidth, maxWidth) : maxWidth\n const topMargin = overlayTopMargin(VIEWPORT_MARGIN, r, ANCHOR_GAP)\n const belowTop = Math.max(topMargin, r.bottom + ANCHOR_GAP)\n const above = Math.max(0, r.top - ANCHOR_GAP - topMargin)\n const below = Math.max(0, window.innerHeight - belowTop - VIEWPORT_MARGIN)\n const onTop = height > below && above > below\n const maxHeight = onTop ? above : below\n const left = Math.max(VIEWPORT_MARGIN, Math.min(r.left, window.innerWidth - width - VIEWPORT_MARGIN))\n const top = onTop ? r.top - ANCHOR_GAP - Math.min(height, maxHeight) : belowTop\n const bridgeTop = onTop ? top + Math.min(height, maxHeight) : r.bottom\n const bridgeLeft = Math.min(r.left, left)\n setPos({\n left, top, ...fitContent ? {} : { width }, maxWidth, maxHeight,\n bridge: {\n left: bridgeLeft, top: bridgeTop,\n width: Math.max(r.right, left + width) - bridgeLeft,\n height: Math.max(0, (onTop ? r.top : top) - bridgeTop),\n },\n })\n return\n }\n const top = r.top + h > window.innerHeight - VIEWPORT_MARGIN ? window.innerHeight - h - VIEWPORT_MARGIN : r.top\n setPos({ left: r.right + ANCHOR_GAP, top })\n }\n place()\n // Observe only the anchor's ancestors: an offscreen drawer can hide without resizing its retained row.\n const visibility = new MutationObserver(place)\n for (let ancestor = rootRef.current?.parentElement; ancestor != null; ancestor = ancestor.parentElement) {\n visibility.observe(ancestor, { attributes: true, attributeFilter: ['inert', 'hidden'] })\n }\n const observer = (variant === 'preview' || inline) && typeof ResizeObserver !== 'undefined' ? new ResizeObserver(place) : null\n for (const element of [cardRef.current, rootRef.current, widthAnchorRef?.current]) {\n if (element !== null && element !== undefined) observer?.observe(element)\n }\n window.addEventListener('scroll', place, true)\n window.addEventListener('resize', place)\n return () => {\n observer?.disconnect()\n visibility.disconnect()\n window.removeEventListener('scroll', place, true)\n window.removeEventListener('resize', place)\n }\n }, [open, variant, widthAnchorRef, positioned, inline, fitContent, dismissImmediately])\n\n // The first placement ran before the card mounted (height read 0): once the\n // card's real height is measurable, correct the bottom-edge clamp. The\n // correction converges — a clamped top satisfies the guard, so it runs once.\n useLayoutEffect(() => {\n if (!open || pos === null || variant === 'preview' || inline) return\n /* v8 ignore next -- the card is mounted whenever pos is set, so the ref is attached here. */\n const h = cardRef.current?.offsetHeight ?? 0\n if (pos.top + h > window.innerHeight - VIEWPORT_MARGIN) {\n setPos({ left: pos.left, top: window.innerHeight - h - VIEWPORT_MARGIN })\n }\n }, [open, pos, variant, inline])\n\n const copy = async (text: string): Promise<void> => {\n if (copied || copyingRef.current) return\n copyingRef.current = true\n const copyEpoch = copyEpochRef.current\n const accepted = await writeClipboard(text)\n copyingRef.current = false\n const card = cardRef.current\n if (!accepted || !mountedRef.current || copyEpoch !== copyEpochRef.current || card === null) return\n const height = card.offsetHeight\n copyHeightRef.current = height > 0 ? height : null\n setCopied(true)\n copyTimerRef.current = setTimeout(clearCopied, 1000)\n }\n\n const copyable = copyText !== undefined\n const dismissFromAnchor = (event: SyntheticEvent<HTMLSpanElement>): void => {\n // Portal content is a React child, but its clicks and text selection do not activate the anchor.\n if (portalRef.current?.contains(event.target as Node)) return\n clearTimer()\n cancelClose()\n close()\n }\n const card = open && pos !== null && (\n <div\n ref={cardRef}\n className={clsx(css.card, variant === 'preview' && css.preview, inline && css.media, inline && fitContent && css.fitContent, copyable && css.copyable, copied && css.feedback)}\n data-closing={closing || undefined}\n style={{\n left: pos.left, top: pos.top, width: pos.width, maxWidth: pos.maxWidth, maxHeight: pos.maxHeight,\n minHeight: copied && copyHeightRef.current !== null ? copyHeightRef.current : undefined,\n '--dsh-hover-preview-fade': `${PREVIEW_FADE_MS}ms`,\n } as CSSProperties}\n role={copyable ? 'button' : undefined}\n tabIndex={copyable ? 0 : undefined}\n aria-label={copyable ? `${copyLabel}: ${copyText}` : undefined}\n onClick={copyable\n ? (e) => {\n const selection = window.getSelection()\n if (selection !== null && !selection.isCollapsed) {\n for (let i = 0; i < selection.rangeCount; i += 1) {\n if (selection.getRangeAt(i).intersectsNode(e.currentTarget)) return\n }\n }\n void copy(copyText)\n }\n : undefined}\n onKeyDown={copyable\n ? (e) => {\n if (e.key !== 'Enter' && e.key !== ' ') return\n e.preventDefault()\n void copy(copyText)\n }\n : undefined}\n >\n {copied ? <span className={css.copied} aria-hidden=\"true\">{copiedLabel}</span> : content}\n </div>\n )\n\n return (\n <span\n ref={rootRef}\n className={clsx(css.root, inline && css.inline)}\n onFocus={inline ? (event) => {\n if (!disabled && event.target.matches(':focus-visible')) { cancelClose(); setPhase('open') }\n } : undefined}\n onBlur={inline ? (event) => {\n if (!event.currentTarget.contains(event.relatedTarget)) { clearTimer(); cancelClose(); close() }\n } : undefined}\n onPointerEnter={(event) => {\n if (disabled || event.pointerType === 'touch') return\n if (event.pointerType === 'mouse' && !window.matchMedia('(any-hover: hover)').matches) return\n // Coming back inside during the grace (the gap, or the card itself)\n // keeps the current card rather than restarting the dwell.\n cancelClose()\n if (open) { setPhase('open'); return }\n clearTimer()\n if (group?.isWarm()) setPhase('open')\n else timerRef.current = setTimeout(() => { setPhase('open') }, openDelayMs)\n }}\n onPointerLeave={() => {\n clearTimer()\n // Leaving a closed card schedules a no-op close; only arm while\n // open, matching Menu's shape.\n if (open) armClose()\n }}\n onPointerDownCapture={dismissFromAnchor}\n onClickCapture={dismissFromAnchor}\n >\n {anchor}\n {open && copyable && <span className={css.status} role=\"status\">{copied ? copiedLabel : ''}</span>}\n {card !== false && createPortal(\n <span ref={portalRef} className={css.portal}>\n {pos.bridge !== undefined && <span className={css.bridge} style={pos.bridge} data-hovercard-bridge=\"\" aria-hidden />}\n {card}\n </span>, document.body,\n )}\n </span>\n )\n}\n","import { useRef } from 'react'\nimport type { KeyboardEventHandler, ReactNode } from 'react'\nimport { createPortal } from 'react-dom'\nimport clsx from 'clsx'\nimport { IconCloseOutlineRegular, IconWarningOutlineRegular } from './icons/index.tsx'\nimport { useModalLayer } from './useModalLayer.ts'\nimport css from './Modal.module.css'\n\ninterface ModalBaseProps {\n open: boolean\n onClose: () => void\n title: string\n tone?: 'warning'\n description?: string\n children?: ReactNode\n footer?: ReactNode\n className?: string\n contentClassName?: string\n shortcutModal?: string\n onKeyDownCapture?: KeyboardEventHandler<HTMLDivElement>\n backdropBlur?: boolean\n}\n\ntype ModalProps = ModalBaseProps & (\n | { headless: true; closeLabel?: never }\n | { headless?: false; closeLabel: string }\n)\n\n/**\n * Render a centered, body-portaled modal over a blurred page mask.\n * @param props.open - whether the dialog is showing.\n * @param props.onClose - application close command, Escape, or mask click; while a menu is open inside the\n * dialog, Escape belongs to that menu first.\n * @param props.title - dialog heading (aria-label in every mode).\n * @param props.tone - warning adds an amber title icon and compact title-to-body spacing; ignored for headless dialogs.\n * @param props.closeLabel - localized accessible close-button label.\n * @param props.description - optional supporting sentence under the title.\n * @param props.children - dialog body; mark its initial-focus control with\n * data-modal-autofocus instead of React autoFocus to preserve return focus.\n * @param props.footer - action row (Cancel / Create).\n * @param props.contentClassName - optional class for a scrollable content region.\n * @param props.backdropBlur - disable when the caller already blurs the page; defaults to true.\n * @param props.shortcutModal - command scope allowed by shortcut owners; unnamed\n * dialogs block application commands unless their owner allows the \"other\" scope.\n * @param props.headless - render children directly in the card (no default\n * header/close/body chrome); mask, card, Escape, and aria-label remain.\n * @param props.onKeyDownCapture - handle a nested dialog's keys before the document Escape listeners.\n * @returns null when closed; otherwise the overlay tree.\n */\nexport function Modal({\n open, onClose, title, closeLabel, description, children, footer, className, contentClassName,\n onKeyDownCapture, headless = false, backdropBlur = true, shortcutModal, tone,\n}: ModalProps) {\n const dialog = useRef<HTMLDivElement>(null)\n useModalLayer(dialog, open, onClose)\n\n if (!open) return null\n\n return createPortal((\n <div className={css.root} role=\"presentation\" onKeyDownCapture={onKeyDownCapture}>\n <div className={css.mask} style={backdropBlur ? undefined : { backdropFilter: 'none' }} aria-hidden=\"true\" onClick={onClose} />\n <div\n ref={dialog}\n tabIndex={-1}\n data-shortcut-modal={shortcutModal}\n className={clsx(css.dialog, !headless && tone === 'warning' && css.warning, className)}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={title}\n >\n {headless\n ? children\n : (\n <>\n <div className={clsx(css.content, contentClassName)}>\n <div className={css.header}>\n <h2 className={css.title}>\n {tone === 'warning' && <IconWarningOutlineRegular size={18} className={css.warningIcon} aria-hidden=\"true\" />}\n {title}\n </h2>\n <button type=\"button\" className={css.close} aria-label={closeLabel} onClick={onClose}>\n <IconCloseOutlineRegular size={14} />\n </button>\n </div>\n {description !== undefined && description !== '' && (\n <p className={css.description}>{description}</p>\n )}\n {children !== undefined && <div className={css.body}>{children}</div>}\n </div>\n {footer !== undefined && <div className={css.footer}>{footer}</div>}\n </>\n )}\n </div>\n </div>\n ), document.body)\n}\n","/**\n * Controlled risk acknowledgement dialog shared by product surfaces that\n * must gate a sensitive action behind an explicit checkbox.\n */\nimport { Button } from './Button.tsx'\nimport { Checkbox } from './Checkbox.tsx'\nimport { Modal } from './Modal.tsx'\nimport css from './RiskConfirmation.module.css'\n\nexport interface RiskConfirmationProps {\n open: boolean\n title: string\n description: string\n acknowledgeLabel: string\n cancelLabel: string\n closeLabel: string\n confirmLabel: string\n acknowledged: boolean\n disabled?: boolean\n onAcknowledgedChange: (acknowledged: boolean) => void\n onCancel: () => void\n onConfirm: () => void\n}\n\n/**\n * Render one in-page confirmation whose primary action is unavailable until\n * the caller-controlled acknowledgement is checked.\n */\nexport function RiskConfirmation({\n open,\n title,\n description,\n acknowledgeLabel,\n cancelLabel,\n closeLabel,\n confirmLabel,\n acknowledged,\n disabled = false,\n onAcknowledgedChange,\n onCancel,\n onConfirm,\n}: RiskConfirmationProps) {\n return (\n <Modal\n open={open}\n onClose={onCancel}\n title={title}\n tone=\"warning\"\n closeLabel={closeLabel}\n className={css.confirmation ?? ''}\n contentClassName={css.confirmationContent ?? ''}\n footer={(\n <>\n <Button variant=\"outline\" className={css.modalAction} onClick={onCancel}>\n {cancelLabel}\n </Button>\n <Button\n variant=\"primary\"\n className={css.confirmAction}\n disabled={disabled || !acknowledged}\n onClick={onConfirm}\n >\n {confirmLabel}\n </Button>\n </>\n )}\n >\n <p className={css.description}>{description}</p>\n <Checkbox\n className={css.acknowledgement}\n checked={acknowledged}\n disabled={disabled}\n modalAutofocus\n label={acknowledgeLabel}\n onChange={onAcknowledgedChange}\n />\n </Modal>\n )\n}\n","import { useEffect, useState } from 'react'\nimport { IconCheckOutlineRegular, IconRefreshOutlineRegular } from './icons/index.tsx'\nimport { StateDot } from './StateDot.tsx'\nimport css from './ConnectionIndicator.module.css'\n\n/** Visual state rendered by {@link ConnectionIndicator}. */\nexport type ConnectionIndicatorState =\n | 'disconnected'\n | 'connecting'\n | 'recovered'\n\n/** Exit-transition length; keep equal to the `.leaving` transition duration in the stylesheet. */\nconst EXIT_MS = 150\n\n/**\n * Render an inline connection-recovery control. The outage and retry-attempt\n * states are one button whose static label already names the retry action;\n * clicking it requests an immediate reconnect. The indicator animates in on\n * appearance and fades out for {@link EXIT_MS} before unmounting.\n * @param props.state - visible outage, retry-attempt, or recovered state.\n * @param props.disconnectedLabel - localized outage text naming the retry action.\n * @param props.connectingLabel - localized retry text followed by the attempt dots.\n * @param props.recoveredLabel - localized recovery confirmation.\n * @param props.reconnectActionLabel - accessible label for the outage action.\n * @param props.restartActionLabel - accessible label for replacing an active attempt.\n * @param props.onReconnect - request an immediate reconnect attempt.\n * @returns the indicator, or null when no connection feedback is active.\n */\nexport function ConnectionIndicator({\n state,\n disconnectedLabel,\n connectingLabel,\n recoveredLabel,\n reconnectActionLabel,\n restartActionLabel,\n onReconnect,\n}: {\n state: ConnectionIndicatorState | undefined\n disconnectedLabel: string\n connectingLabel: string\n recoveredLabel: string\n reconnectActionLabel: string\n restartActionLabel: string\n onReconnect: () => void\n}) {\n const [rendered, setRendered] = useState(state)\n const leaving = state === undefined && rendered !== undefined\n useEffect(() => {\n if (state !== undefined) {\n setRendered(state)\n return\n }\n if (rendered === undefined) return\n const timeout = window.setTimeout(() => { setRendered(undefined) }, EXIT_MS)\n return () => { window.clearTimeout(timeout) }\n }, [state, rendered])\n\n if (rendered === undefined) return null\n const leavingClass = leaving ? ` ${css.leaving}` : ''\n if (rendered === 'recovered') {\n return (\n <div\n className={`${css.indicator} ${css.success}${leavingClass}`}\n role=\"status\"\n aria-label={recoveredLabel}\n >\n <span className={css.icon} aria-hidden=\"true\"><IconCheckOutlineRegular size={14} /></span>\n <span className={css.label}>{recoveredLabel}</span>\n </div>\n )\n }\n\n const connecting = rendered === 'connecting'\n return (\n <button\n type=\"button\"\n className={`${css.indicator} ${css.warning}${leavingClass}`}\n data-phase={rendered}\n aria-label={connecting ? restartActionLabel : reconnectActionLabel}\n onClick={onReconnect}\n >\n <span className={css.icon} aria-hidden=\"true\">\n {connecting\n ? <StateDot state=\"ongoing\" />\n : <IconRefreshOutlineRegular size={14} />}\n </span>\n <span className={css.label}>\n {connecting\n ? (\n <>\n {connectingLabel}\n <span className={css.dots} aria-hidden=\"true\">\n <span>.</span>\n <span className={css.secondDot}>.</span>\n <span className={css.thirdDot}>.</span>\n </span>\n </>\n )\n : disconnectedLabel}\n </span>\n </button>\n )\n}\n","import type { IconProps } from './icons/props.ts'\n\n/** Native viewBox of {@link FISH_LOGO_PATH} (width and height in user units). */\nexport const FISH_LOGO_VIEWBOX = { width: 23.16, height: 17.04 }\n\n/** The fish silhouette path data, exported for consumers that compose their own svg (entrance effects, masks) around the same geometry. */\nexport const FISH_LOGO_PATH = 'M22.9168 1.43018C22.6713 1.31018 22.5658 1.53918 22.4223 1.65519C22.3733 1.69269 22.3318 1.74169 22.2903 1.78669C21.9317 2.1697 21.5127 2.42121 20.9657 2.39121C20.1657 2.34621 19.4827 2.59771 18.8787 3.20973C18.7502 2.45521 18.3236 2.0047 17.6746 1.71569C17.3351 1.56568 16.9916 1.41518 16.7536 1.08867C16.5876 0.856163 16.5421 0.597155 16.4591 0.341647C16.4061 0.187643 16.3536 0.0301382 16.1761 0.00363739C15.9836 -0.0263635 15.9081 0.135141 15.8326 0.270145C15.5306 0.822162 15.4136 1.43018 15.4251 2.0462C15.4516 3.43174 16.0366 4.53527 17.1991 5.3203C17.3311 5.4103 17.3651 5.5003 17.3236 5.63181C17.2441 5.90231 17.1501 6.16482 17.0671 6.43533C17.0141 6.60784 16.9351 6.64584 16.7501 6.57033C16.1121 6.30383 15.5611 5.90931 15.074 5.4328C14.2475 4.63328 13.5 3.75075 12.568 3.05973C12.349 2.89822 12.13 2.74822 11.9034 2.60522C10.9524 1.68169 12.028 0.923165 12.277 0.833162C12.5375 0.739159 12.3675 0.41615 11.5259 0.42015C10.6844 0.42365 9.91439 0.705658 8.93286 1.08117C8.78935 1.13767 8.63835 1.17867 8.48384 1.21267C7.59332 1.04367 6.66829 1.00617 5.70226 1.11517C3.88321 1.31768 2.43016 2.1777 1.36213 3.64575C0.0790928 5.4103 -0.222916 7.41536 0.146595 9.50642C0.535106 11.7105 1.66014 13.535 3.38869 14.9616C5.18125 16.4406 7.24581 17.1657 9.60138 17.0266C11.0319 16.9441 12.6245 16.7526 14.421 15.2321C14.874 15.4576 15.3496 15.5476 16.1381 15.6151C16.7456 15.6716 17.3306 15.5851 17.7836 15.4911C18.4931 15.3411 18.4441 14.6841 18.1876 14.5636C16.1081 13.595 16.5646 13.9891 16.1496 13.67C17.2061 12.42 18.8202 10.1979 19.3182 7.17235C19.3672 6.83834 19.4297 6.36783 19.4222 6.09732C19.4182 5.93231 19.4562 5.86831 19.6447 5.84931C20.1657 5.78931 20.6712 5.64681 21.1357 5.3913C22.4833 4.65528 23.0268 3.44624 23.1548 1.9972C23.1738 1.77569 23.1508 1.54668 22.9168 1.43018ZM11.1749 14.4736C9.15936 12.889 8.18184 12.3675 7.77832 12.39C7.40081 12.4125 7.46881 12.8445 7.55182 13.126C7.63882 13.404 7.75182 13.5955 7.91033 13.8396C8.01983 14.0011 8.09533 14.2411 7.80083 14.4216C7.15181 14.8231 6.02327 14.2866 5.97027 14.2601C4.65673 13.4865 3.5587 12.4655 2.78467 11.069C2.03715 9.72493 1.60314 8.28289 1.53164 6.74384C1.51264 6.37233 1.62214 6.24082 1.99215 6.17332C2.47916 6.08332 2.98118 6.06432 3.46769 6.13582C5.52476 6.43633 7.27581 7.35586 8.74385 8.8129C9.58188 9.64243 10.2159 10.634 10.8689 11.6025C11.5634 12.631 12.3105 13.611 13.262 14.4146C13.598 14.6961 13.866 14.9101 14.1225 15.0681C13.349 15.1546 12.058 15.1731 11.1749 14.4746L11.1749 14.4736ZM12.141 8.25988C12.141 8.09488 12.273 7.96338 12.439 7.96338C12.4765 7.96338 12.5105 7.97088 12.541 7.98188C12.5825 7.99688 12.6205 8.01938 12.6505 8.05338C12.7035 8.10588 12.7335 8.18088 12.7335 8.25988C12.7335 8.42489 12.6015 8.55639 12.4355 8.55639C12.2695 8.55639 12.141 8.42489 12.141 8.25988ZM15.1415 9.79893C14.949 9.87793 14.7565 9.94544 14.5715 9.95294C14.2845 9.96794 13.9715 9.85143 13.8015 9.70893C13.5375 9.48742 13.3485 9.36342 13.2695 8.97691C13.2355 8.8119 13.2545 8.55639 13.2845 8.40989C13.3525 8.09438 13.277 7.89187 13.0545 7.70787C12.8735 7.55786 12.643 7.51636 12.39 7.51636C12.2955 7.51636 12.209 7.47486 12.1445 7.44136C12.039 7.38886 11.9519 7.25735 12.035 7.09585C12.0615 7.04335 12.19 6.91584 12.22 6.89334C12.5635 6.69784 12.9595 6.76184 13.326 6.90834C13.6655 7.04735 13.9225 7.30236 14.292 7.66287C14.6695 8.09838 14.7375 8.21838 14.9525 8.54539C15.1225 8.8009 15.277 9.06341 15.3831 9.36392C15.4471 9.55142 15.3641 9.70493 15.1415 9.79893Z'\n\n/**\n * Render the fish logo.\n * @param props.size - width in px (default 24; height keeps the 23.16:17.04 ratio).\n * @param props.className - extra class for layout placement.\n * @returns the logo svg (aria-hidden; pair with the wordmark for accessibility).\n */\nexport function FishLogo({ size = 24, className }: IconProps) {\n return (\n <svg\n width={size}\n height={(size * FISH_LOGO_VIEWBOX.height) / FISH_LOGO_VIEWBOX.width}\n className={className}\n viewBox={`0 0 ${FISH_LOGO_VIEWBOX.width} ${FISH_LOGO_VIEWBOX.height}`}\n fill=\"none\"\n aria-hidden=\"true\"\n >\n <path d={FISH_LOGO_PATH} fill=\"currentColor\" />\n </svg>\n )\n}\n","import type { IconProps } from './icons/props.ts'\n\n/** Display options for the official brand wordmark. */\nexport interface BrandWordmarkProps extends IconProps {\n /** Whether to include the leading whale mark; defaults to true. */\n includeMark?: boolean | undefined\n}\n\n/**\n * Render the full brand wordmark.\n * @param props.size - height in px (default 24; width follows the selected artwork).\n * @param props.className - extra class for layout placement.\n * @param props.includeMark - whether to include the leading whale mark.\n * @returns the wordmark svg (aria-hidden decorative brand art).\n */\nexport function BrandWordmark({ size = 24, className, includeMark = true }: BrandWordmarkProps) {\n const width = includeMark ? 182 : 156\n return (\n <svg\n width={(size * width) / 24}\n height={size}\n className={className}\n viewBox={includeMark ? '0 0 182 24' : '26 0 156 24'}\n fill=\"none\"\n aria-hidden=\"true\"\n >\n <path d=\"M68.416 18.2447H67.0501V16.1272H68.416C69.2619 16.1272 70.1166 15.9163 70.6671 15.3304C71.2181 14.7444 71.426 13.8455 71.426 12.9471C71.426 12.0487 71.2268 11.1498 70.6671 10.5643C70.1083 9.97831 69.2619 9.76744 68.416 9.76744C67.5701 9.76744 66.7154 9.97831 66.1639 10.5643C65.6129 11.1503 65.4049 12.0487 65.4049 12.9471V21.6435H63.009V7.6582H65.4049V8.54883H65.8442C65.8918 8.49393 65.9394 8.44728 65.9875 8.40064C66.5871 7.85353 67.5049 7.6582 68.4072 7.6582C69.8212 7.6582 71.2341 8.00998 72.1607 8.98662C73.0868 9.96325 73.4143 11.4632 73.4143 12.9558C73.4143 14.4485 73.0785 15.9406 72.1607 16.925C71.2424 17.9094 69.8212 18.2457 68.416 18.2457V18.2447Z\" fill=\"currentColor\"/>\n <path d=\"M31.9551 8.03497H33.3204V10.1525H31.9551C31.1087 10.1525 30.2545 10.3633 29.7035 10.9493C29.1525 11.5353 28.945 12.4342 28.945 13.3326C28.945 14.231 29.1447 15.1294 29.7035 15.7154C30.2623 16.3014 31.1087 16.5122 31.9551 16.5122C32.8015 16.5122 33.6562 16.3014 34.2072 15.7154C34.7582 15.1294 34.9657 14.231 34.9657 13.3326V4.62842H37.3611V18.6219H34.9657V17.7313H34.5264C34.4783 17.7857 34.4307 17.8329 34.3826 17.8795C33.7835 18.4261 32.8652 18.6219 31.9629 18.6219C30.5494 18.6219 29.136 18.2707 28.2099 17.294C27.2838 16.3174 26.9563 14.817 26.9563 13.3248C26.9563 11.8327 27.2916 10.34 28.2099 9.35561C29.136 8.37898 30.5494 8.03497 31.9551 8.03497Z\" fill=\"currentColor\"/>\n <path d=\"M49.3786 13.1431V13.9948H42.9984V12.2996H47.2305C47.1348 11.6825 46.9113 11.1043 46.5119 10.682C45.9371 10.0727 45.0503 9.85409 44.1723 9.85409C43.2943 9.85409 42.4076 10.0727 41.8328 10.682C41.258 11.2913 41.05 12.2213 41.05 13.1435C41.05 14.0658 41.2575 15.003 41.8328 15.6046C42.4076 16.2061 43.2939 16.433 44.1723 16.433C45.0508 16.433 45.9371 16.2143 46.5119 15.6046C46.5916 15.5186 46.6635 15.4248 46.7354 15.331H49.0992C48.8918 16.0657 48.5643 16.7299 48.0691 17.2454C47.111 18.2531 45.6339 18.6205 44.1723 18.6205C42.7108 18.6205 41.2337 18.2609 40.2755 17.2454C39.3174 16.2299 38.9661 14.6828 38.9661 13.1435C38.9661 11.6043 39.3096 10.0494 40.2755 9.04168C41.242 8.03396 42.7108 7.66663 44.1723 7.66663C45.6339 7.66663 47.111 8.02618 48.0691 9.04168C49.0351 10.0572 49.3786 11.6043 49.3786 13.1435V13.1431Z\" fill=\"currentColor\"/>\n <path d=\"M61.4045 13.1431V13.9948H55.0243V12.2996H59.2564C59.1602 11.6825 58.9372 11.1043 58.5378 10.682C57.963 10.0727 57.0762 9.85409 56.1982 9.85409C55.3202 9.85409 54.4335 10.0727 53.8587 10.682C53.2839 11.2913 53.0759 12.2213 53.0759 13.1435C53.0759 14.0658 53.2834 15.003 53.8587 15.6046C54.4335 16.2061 55.3202 16.433 56.1982 16.433C57.0762 16.433 57.963 16.2143 58.5378 15.6046C58.6179 15.5186 58.6894 15.4248 58.7608 15.331H61.1251C60.9171 16.0657 60.5897 16.7299 60.0945 17.2454C59.1364 18.2531 57.6593 18.6205 56.1982 18.6205C54.7372 18.6205 53.2596 18.2609 52.3014 17.2454C51.3432 16.2299 50.9919 14.6828 50.9919 13.1435C50.9919 11.6043 51.3355 10.0494 52.3014 9.04168C53.2678 8.03396 54.7367 7.66663 56.1982 7.66663C57.6598 7.66663 59.1364 8.02618 60.0945 9.04168C61.061 10.0572 61.4045 11.6043 61.4045 13.1435V13.1431Z\" fill=\"currentColor\"/>\n <path d=\"M80.242 18.6214C81.7035 18.6214 83.1801 18.4105 84.1383 17.809C85.0965 17.2075 85.4482 16.2931 85.4482 15.3869C85.4482 14.4807 85.1042 13.5585 84.1383 12.9647C83.1801 12.371 81.703 12.1518 80.242 12.1518C79.6186 12.1518 79.0438 12.0658 78.6366 11.8394C78.2294 11.6047 78.0778 11.2534 78.0778 10.9017C78.0778 10.5499 78.2216 10.1908 78.6366 9.9639C79.0438 9.72921 79.6749 9.65147 80.2973 9.65147C80.9198 9.65147 81.5509 9.73747 81.9591 9.9639C82.3663 10.1986 82.5179 10.5499 82.5179 10.9017H84.9531C84.9531 9.99499 84.6421 9.07327 83.7719 8.47951C82.9017 7.88576 81.5679 7.66663 80.2424 7.66663C78.9169 7.66663 77.5837 7.8775 76.713 8.47951C75.8427 9.08104 75.5308 9.99499 75.5308 10.9017C75.5308 11.8083 75.8423 12.73 76.713 13.3238C77.5832 13.9176 78.9165 14.1367 80.2424 14.1367C80.929 14.1367 81.688 14.2227 82.1428 14.4491C82.5985 14.676 82.7579 15.0351 82.7579 15.3869C82.7579 15.7387 82.5985 16.0977 82.1428 16.3246C81.688 16.5511 80.9931 16.6371 80.3066 16.6371C79.62 16.6371 78.9169 16.5511 78.4694 16.3246C78.0224 16.0982 77.8543 15.7387 77.8543 15.3869H75.0435C75.0435 16.2935 75.3865 17.2153 76.3534 17.809C77.3194 18.4028 78.7809 18.6214 80.2424 18.6214H80.242Z\" fill=\"currentColor\"/>\n <path d=\"M97.4733 13.1431V13.9948H91.0932V12.2996H95.3252C95.23 11.6825 95.006 11.1043 94.6071 10.682C94.0313 10.0727 93.1456 9.85409 92.2666 9.85409C91.3876 9.85409 90.5018 10.0727 89.927 10.682C89.3522 11.2913 89.1452 12.2213 89.1452 13.1435C89.1452 14.0658 89.3522 15.003 89.927 15.6046C90.5018 16.2061 91.3886 16.433 92.2666 16.433C93.1446 16.433 94.0313 16.2143 94.6071 15.6046C94.6863 15.5186 94.7587 15.4248 94.8301 15.331H97.1935C96.9855 16.0657 96.6585 16.7299 96.1639 17.2454C95.2057 18.2531 93.7281 18.6205 92.2666 18.6205C90.805 18.6205 89.3284 18.2609 88.3703 17.2454C87.4121 16.2299 87.0613 14.6828 87.0613 13.1435C87.0613 11.6043 87.4043 10.0494 88.3703 9.04168C89.3367 8.03396 90.806 7.66663 92.2666 7.66663C93.7272 7.66663 95.2057 8.02618 96.1639 9.04168C97.1298 10.0572 97.4729 11.6043 97.4729 13.1435L97.4733 13.1431Z\" fill=\"currentColor\"/>\n <path d=\"M109.499 13.1431V13.9948H103.119V12.2996H107.351C107.256 11.6825 107.032 11.1043 106.632 10.682C106.057 10.0727 105.172 9.85409 104.293 9.85409C103.414 9.85409 102.528 10.0727 101.953 10.682C101.378 11.2913 101.17 12.2213 101.17 13.1435C101.17 14.0658 101.378 15.003 101.953 15.6046C102.528 16.2061 103.415 16.433 104.293 16.433C105.171 16.433 106.057 16.2143 106.632 15.6046C106.712 15.5186 106.784 15.4248 106.856 15.331H109.22C109.012 16.0657 108.685 16.7299 108.19 17.2454C107.231 18.2531 105.754 18.6205 104.293 18.6205C102.831 18.6205 101.355 18.2609 100.396 17.2454C99.4382 16.2299 99.0864 14.6828 99.0864 13.1435C99.0864 11.6043 99.4295 10.0494 100.396 9.04168C101.362 8.03396 102.832 7.66663 104.293 7.66663C105.754 7.66663 107.231 8.02618 108.19 9.04168C109.156 10.0572 109.499 11.6043 109.499 13.1435V13.1431Z\" fill=\"currentColor\"/>\n <path d=\"M113.5 4.62817H111.104V18.6217H113.5V4.62817Z\" fill=\"currentColor\"/>\n <path d=\"M117.589 12.8154L121.517 18.6208H118.554L114.625 12.8154L118.554 8.15088H121.517L117.589 12.8154Z\" fill=\"currentColor\"/>\n <g clipPath=\"url(#dsh-wordmark-whale-clip)\">\n <path d=\"M23.0584 4.95203C22.8129 4.83203 22.7074 5.06103 22.5639 5.17704C22.5149 5.21454 22.4734 5.26354 22.4319 5.30854C22.0734 5.69155 21.6543 5.94306 21.1073 5.91306C20.3073 5.86806 19.6243 6.11957 19.0203 6.73158C18.8918 5.97706 18.4652 5.52655 17.8162 5.23754C17.4767 5.08753 17.1332 4.93703 16.8952 4.61052C16.7292 4.37801 16.6837 4.11901 16.6007 3.8635C16.5477 3.70949 16.4952 3.55199 16.3177 3.52549C16.1252 3.49549 16.0497 3.65699 15.9742 3.792C15.6722 4.34401 15.5552 4.95203 15.5667 5.56805C15.5932 6.95359 16.1782 8.05712 17.3407 8.84215C17.4727 8.93215 17.5067 9.02215 17.4652 9.15366C17.3857 9.42416 17.2917 9.68667 17.2087 9.95718C17.1557 10.1297 17.0767 10.1677 16.8917 10.0922C16.2537 9.82568 15.7027 9.43117 15.2156 8.95465C14.3891 8.15513 13.6416 7.2726 12.7096 6.58158C12.4906 6.42007 12.2716 6.27007 12.045 6.12707C11.094 5.20354 12.1696 4.44502 12.4186 4.35501C12.6791 4.26101 12.5091 3.938 11.6675 3.942C10.826 3.9455 10.056 4.22751 9.07446 4.60302C8.93096 4.65952 8.77995 4.70052 8.62545 4.73452C7.73492 4.56552 6.80989 4.52802 5.84386 4.63702C4.02481 4.83953 2.57177 5.69955 1.50373 7.1676C0.220694 8.93215 -0.0813148 10.9372 0.288196 13.0283C0.676708 15.2323 1.80174 17.0569 3.53029 18.4834C5.32285 19.9625 7.38741 20.6875 9.74298 20.5485C11.1735 20.466 12.7661 20.2745 14.5626 18.7539C15.0156 18.9795 15.4912 19.0695 16.2797 19.137C16.8872 19.1935 17.4722 19.107 17.9252 19.013C18.6347 18.8629 18.5857 18.2059 18.3292 18.0854C16.2497 17.1169 16.7062 17.5109 16.2912 17.1919C17.3477 15.9419 18.9618 13.7198 19.4598 10.6942C19.5088 10.3602 19.5713 9.88968 19.5638 9.61917C19.5598 9.45417 19.5978 9.39016 19.7863 9.37116C20.3073 9.31116 20.8128 9.16866 21.2773 8.91315C22.6249 8.17713 23.1684 6.96809 23.2964 5.51905C23.3154 5.29754 23.2924 5.06853 23.0584 4.95203ZM11.3165 17.9954C9.30097 16.4109 8.32344 15.8894 7.91992 15.9119C7.54241 15.9344 7.61042 16.3664 7.69342 16.6479C7.78042 16.9259 7.89342 17.1174 8.05193 17.3614C8.16143 17.5229 8.23694 17.7629 7.94243 17.9434C7.29341 18.3449 6.16487 17.8084 6.11187 17.7819C4.79833 17.0084 3.7003 15.9874 2.92628 14.5908C2.17875 13.2468 1.74474 11.8047 1.67324 10.2657C1.65424 9.89418 1.76374 9.76267 2.13375 9.69517C2.62077 9.60517 3.12278 9.58617 3.6093 9.65767C5.66636 9.95818 7.41741 10.8777 8.88545 12.3348C9.72348 13.1643 10.3575 14.1558 11.0105 15.1243C11.705 16.1529 12.4521 17.1329 13.4036 17.9364C13.7396 18.2179 14.0076 18.4319 14.2641 18.5899C13.4906 18.6764 12.1996 18.6949 11.3165 17.9964V17.9954ZM12.2826 11.7817C12.2826 11.6167 12.4146 11.4852 12.5806 11.4852C12.6181 11.4852 12.6521 11.4927 12.6826 11.5037C12.7241 11.5187 12.7621 11.5412 12.7921 11.5752C12.8451 11.6277 12.8751 11.7027 12.8751 11.7817C12.8751 11.9467 12.7431 12.0782 12.5771 12.0782C12.4111 12.0782 12.2826 11.9467 12.2826 11.7817ZM15.2831 13.3208C15.0906 13.3998 14.8981 13.4673 14.7131 13.4748C14.4261 13.4898 14.1131 13.3733 13.9431 13.2308C13.6791 13.0093 13.4901 12.8853 13.4111 12.4988C13.3771 12.3338 13.3961 12.0782 13.4261 11.9317C13.4941 11.6162 13.4186 11.4137 13.1961 11.2297C13.0151 11.0797 12.7846 11.0382 12.5316 11.0382C12.4371 11.0382 12.3506 10.9967 12.2861 10.9632C12.1806 10.9107 12.0936 10.7792 12.1766 10.6177C12.2031 10.5652 12.3316 10.4377 12.3616 10.4152C12.7051 10.2197 13.1011 10.2837 13.4676 10.4302C13.8071 10.5692 14.0641 10.8242 14.4336 11.1847C14.8111 11.6202 14.8791 11.7402 15.0941 12.0672C15.2641 12.3228 15.4186 12.5853 15.5247 12.8858C15.5887 13.0733 15.5057 13.2268 15.2831 13.3208Z\" fill=\"currentColor\"/>\n </g>\n <rect x=\"129.348\" y=\"5.5\" width=\"52\" height=\"14\" rx=\"2\" fill=\"currentColor\"/>\n <g clipPath=\"url(#dsh-wordmark-badge-clip)\">\n <path d=\"M132.848 8.93205H134.08V16.137H132.848V8.93205ZM136.5 8.93205H137.732V16.137H136.5V8.93205ZM133.365 13.024V11.99H137.193V13.024H133.365Z\" fill=\"var(--dsw-alias-label-primary-inverted)\"/>\n <path d=\"M140.397 14.432L140.672 13.453H143.202L143.532 14.432H140.397ZM140.287 16.137H139.055L141.277 8.93205H142.201L142.146 9.74605L140.947 13.915H140.969L140.287 16.137ZM145.039 16.137H143.741L143.07 13.948L143.081 13.937L141.871 9.74605L141.926 8.93205H142.817L145.039 16.137Z\" fill=\"var(--dsw-alias-label-primary-inverted)\"/>\n <path d=\"M146.846 8.93205H149.068C149.852 8.93205 150.443 9.11538 150.839 9.48205C151.235 9.84138 151.433 10.3327 151.433 10.956C151.433 11.22 151.396 11.4657 151.323 11.693C151.249 11.9204 151.125 12.1257 150.949 12.309C150.773 12.4924 150.531 12.65 150.223 12.782C149.922 12.9067 149.541 13.0057 149.079 13.079V13.321H146.846V12.639L148.023 12.485C148.631 12.4044 149.09 12.298 149.398 12.166C149.706 12.034 149.915 11.8764 150.025 11.693C150.135 11.5024 150.19 11.2934 150.19 11.066C150.19 10.6994 150.083 10.417 149.871 10.219C149.658 10.021 149.324 9.92205 148.87 9.92205H146.846V8.93205ZM146.395 8.93205H147.627V16.137H146.395V8.93205ZM151.917 16.093V16.137H150.366L149.024 14.322C148.87 14.1094 148.73 13.9407 148.606 13.816C148.481 13.684 148.345 13.5887 148.199 13.53C148.052 13.464 147.872 13.42 147.66 13.398C147.447 13.3687 147.176 13.3504 146.846 13.343V13.145H149.079C149.233 13.211 149.368 13.2844 149.486 13.365C149.61 13.4457 149.735 13.5447 149.86 13.662C149.992 13.7794 150.138 13.937 150.3 14.135L151.917 16.093Z\" fill=\"var(--dsw-alias-label-primary-inverted)\"/>\n <path d=\"M153.58 9.57005L153.591 8.93205H154.46L157.584 15.51V16.137H156.704L153.58 9.57005ZM158.024 16.137H156.968L156.88 8.93205H158.024V16.137ZM154.24 16.137H153.096V8.93205H154.152L154.24 16.137Z\" fill=\"var(--dsw-alias-label-primary-inverted)\"/>\n <path d=\"M159.963 8.93205H161.206V16.137H159.963V8.93205ZM160.095 9.96605V8.93205H164.858V9.96605H160.095ZM160.095 16.137V15.103H164.902V16.137H160.095ZM160.095 13.013V11.99H164.374V13.013H160.095Z\" fill=\"var(--dsw-alias-label-primary-inverted)\"/>\n <path d=\"M169.052 15.257C169.543 15.257 169.895 15.1654 170.108 14.982C170.328 14.7987 170.438 14.5457 170.438 14.223C170.438 14.047 170.405 13.8967 170.339 13.772C170.273 13.6474 170.152 13.5337 169.976 13.431C169.807 13.321 169.558 13.2147 169.228 13.112L168.491 12.881C167.846 12.6757 167.38 12.4044 167.094 12.067C166.808 11.7297 166.665 11.3007 166.665 10.78C166.665 10.428 166.76 10.1017 166.951 9.80105C167.142 9.50038 167.428 9.25838 167.809 9.07505C168.19 8.89172 168.663 8.80005 169.228 8.80005C169.631 8.80005 169.998 8.82938 170.328 8.88805C170.665 8.93938 171.039 9.01638 171.45 9.11905L171.274 10.175C170.834 10.0504 170.442 9.96238 170.097 9.91105C169.76 9.85238 169.463 9.82305 169.206 9.82305C168.737 9.82305 168.403 9.90738 168.205 10.076C168.007 10.2374 167.908 10.439 167.908 10.681C167.908 10.857 167.941 11.0147 168.007 11.154C168.073 11.286 168.19 11.407 168.359 11.517C168.535 11.627 168.784 11.7334 169.107 11.836L169.866 12.078C170.526 12.276 170.995 12.5327 171.274 12.848C171.553 13.156 171.692 13.585 171.692 14.135C171.692 14.5604 171.589 14.9344 171.384 15.257C171.179 15.5797 170.878 15.8327 170.482 16.016C170.093 16.1994 169.609 16.291 169.03 16.291C168.627 16.291 168.212 16.247 167.787 16.159C167.362 16.071 166.9 15.9427 166.401 15.774L166.665 14.718C167.156 14.894 167.6 15.0297 167.996 15.125C168.399 15.213 168.751 15.257 169.052 15.257Z\" fill=\"var(--dsw-alias-label-primary-inverted)\"/>\n <path d=\"M175.809 15.257C176.3 15.257 176.652 15.1654 176.865 14.982C177.085 14.7987 177.195 14.5457 177.195 14.223C177.195 14.047 177.162 13.8967 177.096 13.772C177.03 13.6474 176.909 13.5337 176.733 13.431C176.564 13.321 176.315 13.2147 175.985 13.112L175.248 12.881C174.603 12.6757 174.137 12.4044 173.851 12.067C173.565 11.7297 173.422 11.3007 173.422 10.78C173.422 10.428 173.517 10.1017 173.708 9.80105C173.899 9.50038 174.185 9.25838 174.566 9.07505C174.947 8.89172 175.42 8.80005 175.985 8.80005C176.388 8.80005 176.755 8.82938 177.085 8.88805C177.422 8.93938 177.796 9.01638 178.207 9.11905L178.031 10.175C177.591 10.0504 177.199 9.96238 176.854 9.91105C176.517 9.85238 176.22 9.82305 175.963 9.82305C175.494 9.82305 175.16 9.90738 174.962 10.076C174.764 10.2374 174.665 10.439 174.665 10.681C174.665 10.857 174.698 11.0147 174.764 11.154C174.83 11.286 174.947 11.407 175.116 11.517C175.292 11.627 175.541 11.7334 175.864 11.836L176.623 12.078C177.283 12.276 177.752 12.5327 178.031 12.848C178.31 13.156 178.449 13.585 178.449 14.135C178.449 14.5604 178.346 14.9344 178.141 15.257C177.936 15.5797 177.635 15.8327 177.239 16.016C176.85 16.1994 176.366 16.291 175.787 16.291C175.384 16.291 174.969 16.247 174.544 16.159C174.119 16.071 173.657 15.9427 173.158 15.774L173.422 14.718C173.913 14.894 174.357 15.0297 174.753 15.125C175.156 15.213 175.508 15.257 175.809 15.257Z\" fill=\"var(--dsw-alias-label-primary-inverted)\"/>\n </g>\n <defs>\n <clipPath id=\"dsh-wordmark-whale-clip\">\n <rect width=\"23.16\" height=\"17.0435\" fill=\"white\" transform=\"translate(0.141602 3.52185)\"/>\n </clipPath>\n <clipPath id=\"dsh-wordmark-badge-clip\">\n <rect width=\"46\" height=\"14\" fill=\"white\" transform=\"translate(132.348 5.5)\"/>\n </clipPath>\n </defs>\n </svg>\n )\n}\n","import type { ReactNode } from 'react'\nimport { ICON_MEDIUM_STROKE, ICON_REGULAR_STROKE } from './icons/index.tsx'\nimport type { IconProps } from './icons/props.ts'\n\ninterface PermissionIconArtworkProps extends IconProps {\n strokeWidth: number\n}\n\nfunction ReadOnlyArtwork({ size = 16, className, strokeWidth }: PermissionIconArtworkProps): ReactNode {\n return (\n <svg width={size} height={size} className={className} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" strokeWidth={strokeWidth}>\n <path d=\"M5.08545 8.13775L7.18455 10.2368C7.26636 10.3187 7.4003 10.3142 7.47649 10.2271L11.5148 5.61194\" stroke=\"currentColor\" />\n <path d=\"M6.59624 2.14853C7.50155 1.80917 8.49914 1.80919 9.40444 2.14859L13.9245 3.84317V7.11961C13.9245 11.6089 10.5565 13.5975 8.00035 14.5779C5.44423 13.5975 2.07544 11.6089 2.07544 7.11961V3.84317L6.59624 2.14853Z\" stroke=\"currentColor\" strokeLinejoin=\"round\" />\n </svg>\n )\n}\n\nfunction WorkspaceWriteArtwork({ size = 16, className, strokeWidth }: PermissionIconArtworkProps): ReactNode {\n return (\n <svg width={size} height={size} className={className} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" strokeWidth={strokeWidth}>\n <path d=\"M6.4209 1.68067C7.43922 1.299 8.56177 1.29898 9.58008 1.68067L14.0996 3.375C14.2946 3.44811 14.4236 3.63455 14.4238 3.84278V6.89063C14.1115 6.71853 13.7761 6.58312 13.4238 6.48926V4.18946L9.22852 2.61621C8.43657 2.31947 7.56341 2.31939 6.77148 2.61621L2.5752 4.18946V7.11914C2.5752 11.1796 5.52369 13.056 8 14.0391C8.27653 13.9293 8.55827 13.8067 8.8418 13.6729C9.07101 13.9468 9.33228 14.1929 9.62012 14.4053C9.12409 14.6579 8.63578 14.8696 8.17871 15.0449C8.0637 15.0889 7.93628 15.0889 7.82129 15.0449C5.22011 14.0472 1.5752 11.9381 1.5752 7.11914V3.84278C1.57541 3.63469 1.70463 3.44821 1.89941 3.375L6.4209 1.68067Z\" fill=\"currentColor\" />\n <path d=\"M5.26392 6.60339H10.7361\" stroke=\"currentColor\" />\n <path d=\"M5.26392 9.86902H8.32833\" stroke=\"currentColor\" />\n <path d=\"M10.0317 13.2229C10.263 13.3929 10.4943 13.563 10.7256 13.733C10.7932 13.6482 10.8608 13.5634 10.9284 13.4786C12.1455 11.9522 13.3626 10.4258 14.5798 8.89935C14.6474 8.81455 14.715 8.72975 14.7826 8.64495C14.4143 8.37419 14.046 8.10344 13.6777 7.83268C13.6169 7.92252 13.5562 8.01236 13.4954 8.10219C12.4016 9.71926 11.3078 11.3363 10.214 12.9534C10.1532 13.0432 10.0924 13.1331 10.0317 13.2229Z\" fill=\"currentColor\" />\n <path d=\"M12.6516 12.6696C12.6516 12.925 12.6516 13.1804 12.6516 13.4359C12.6952 13.4378 12.7387 13.4398 12.7823 13.4417C13.5663 13.4768 14.3504 13.5118 15.1345 13.5469C15.178 13.5488 15.2216 13.5508 15.2651 13.5527C15.2651 13.2194 15.2651 12.8861 15.2651 12.5527C15.2216 12.5547 15.178 12.5566 15.1345 12.5586C14.3504 12.5936 13.5663 12.6287 12.7823 12.6637C12.7387 12.6657 12.6952 12.6676 12.6516 12.6696Z\" fill=\"currentColor\" />\n </svg>\n )\n}\n\nfunction FullAccessArtwork({ size = 16, className, strokeWidth }: PermissionIconArtworkProps): ReactNode {\n return (\n <svg width={size} height={size} className={className} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" strokeWidth={strokeWidth}>\n <path d=\"M6.59624 2.14853C7.50155 1.80917 8.49914 1.80919 9.40444 2.14859L13.9245 3.84317V7.11961C13.9245 11.6089 10.5565 13.5975 8.00035 14.5779C5.44423 13.5975 2.07544 11.6089 2.07544 7.11961V3.84317L6.59624 2.14853Z\" stroke=\"currentColor\" strokeLinejoin=\"round\" />\n <path d=\"M8 4.39209V9.89209\" stroke=\"currentColor\" />\n <path d=\"M8 10.8081V11.8081\" stroke=\"currentColor\" />\n </svg>\n )\n}\n\nfunction AutoReviewArtwork({ size = 16, className, strokeWidth }: PermissionIconArtworkProps): ReactNode {\n return (\n <svg width={size} height={size} className={className} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" strokeWidth={strokeWidth}>\n <path d=\"M6.59624 2.14853C7.50155 1.80917 8.49914 1.80919 9.40444 2.14859L13.9245 3.84317V7.11961C13.9245 11.6089 10.5565 13.5975 8.00035 14.5779C5.44423 13.5975 2.07544 11.6089 2.07544 7.11961V3.84317L6.59624 2.14853Z\" stroke=\"currentColor\" strokeLinejoin=\"round\" />\n <path d=\"M5.75 10.15L8 4.95L10.25 10.15M6.43 8.59H9.57\" stroke=\"currentColor\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n )\n}\n\n/**\n * Render the read-only permission icon with a one-pixel stroke.\n * @param props - Size and optional class.\n * @returns The regular decorative permission glyph.\n */\nexport function PermissionIconReadOnlyRegular(props: IconProps): ReactNode {\n return <ReadOnlyArtwork {...props} strokeWidth={ICON_REGULAR_STROKE} />\n}\n\n/**\n * Render the read-only permission icon with a 1.3px stroke.\n * @param props - Size and optional class.\n * @returns The medium decorative permission glyph.\n */\nexport function PermissionIconReadOnlyMedium(props: IconProps): ReactNode {\n return <ReadOnlyArtwork {...props} strokeWidth={ICON_MEDIUM_STROKE} />\n}\n\n/**\n * Render the workspace-write permission icon with a one-pixel stroke.\n * @param props - Size and optional class.\n * @returns The regular decorative permission glyph.\n */\nexport function PermissionIconWorkspaceWriteRegular(props: IconProps): ReactNode {\n return <WorkspaceWriteArtwork {...props} strokeWidth={ICON_REGULAR_STROKE} />\n}\n\n/**\n * Render the workspace-write permission icon with a 1.3px stroke.\n * @param props - Size and optional class.\n * @returns The medium decorative permission glyph.\n */\nexport function PermissionIconWorkspaceWriteMedium(props: IconProps): ReactNode {\n return <WorkspaceWriteArtwork {...props} strokeWidth={ICON_MEDIUM_STROKE} />\n}\n\n/**\n * Render the full-access permission icon with a one-pixel stroke.\n * @param props - Size and optional class.\n * @returns The regular decorative permission glyph.\n */\nexport function PermissionIconFullAccessRegular(props: IconProps): ReactNode {\n return <FullAccessArtwork {...props} strokeWidth={ICON_REGULAR_STROKE} />\n}\n\n/**\n * Render the full-access permission icon with a 1.3px stroke.\n * @param props - Size and optional class.\n * @returns The medium decorative permission glyph.\n */\nexport function PermissionIconFullAccessMedium(props: IconProps): ReactNode {\n return <FullAccessArtwork {...props} strokeWidth={ICON_MEDIUM_STROKE} />\n}\n\n/**\n * Render the auto-review permission icon with a one-pixel stroke.\n * @param props - Size and optional class.\n * @returns The regular decorative permission glyph.\n */\nexport function PermissionIconAutoReviewRegular(props: IconProps): ReactNode {\n return <AutoReviewArtwork {...props} strokeWidth={ICON_REGULAR_STROKE} />\n}\n\n/**\n * Render the auto-review permission icon with a 1.3px stroke.\n * @param props - Size and optional class.\n * @returns The medium decorative permission glyph.\n */\nexport function PermissionIconAutoReviewMedium(props: IconProps): ReactNode {\n return <AutoReviewArtwork {...props} strokeWidth={ICON_MEDIUM_STROKE} />\n}\n","import type { IconProps } from './props.ts'\n\ninterface WeightedArtworkProps extends IconProps {\n strokeWidth: number\n}\n\n/**\n * Render conversation geometry — the chat bubble around two text lines —\n * for session reference icons; it matches the `queue-outline` product glyph.\n * @param props - Size, optional CSS class, and inherited stroke width.\n * @returns The decorative SVG artwork.\n */\nexport const ChatLinesOutlineArtwork = ({ size = 16, className, strokeWidth }: WeightedArtworkProps) => (\n <svg width={size} height={size} className={className} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" strokeWidth={strokeWidth}>\n <path d=\"M5 6.75H11\" stroke=\"currentColor\" />\n <path d=\"M5 9H8\" stroke=\"currentColor\" />\n <path d=\"M2.37067 11.2497C1.5872 9.89252 1.32042 8.29798 1.61945 6.7597C1.91847 5.22141 2.76317 3.84293 3.99801 2.87809C5.23285 1.91325 6.7747 1.427 8.33964 1.50888C9.90458 1.59076 11.3873 2.23526 12.5147 3.32369C13.6422 4.41232 14.3384 5.8717 14.4751 7.43304C14.6118 8.99438 14.1797 10.5525 13.2585 11.8205C12.3372 13.0885 10.9889 13.9809 9.4617 14.3334C8.18666 14.6277 6.8587 14.529 5.64964 14.0601C5.17095 13.8745 4.76937 13.4929 4.26509 13.3963C3.67389 13.2832 2.95232 13.5595 2.0377 14.3334\" stroke=\"currentColor\" />\n </svg>\n)\n\n/**\n * Render globe geometry for link icons; it matches the `globe-outline` product glyph.\n * @param props - Size, optional CSS class, and inherited stroke width.\n * @returns The decorative SVG artwork.\n */\nexport const GlobeOutlineArtwork = ({ size = 14, className, strokeWidth }: WeightedArtworkProps) => (\n <svg width={size} height={size} className={className} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" strokeWidth={strokeWidth}>\n <path d=\"M7.99986 14.0887C11.3626 14.0887 14.0886 11.3627 14.0886 7.99998C14.0886 4.63727 11.3626 1.91125 7.99986 1.91125C4.63715 1.91125 1.91113 4.63727 1.91113 7.99998C1.91113 11.3627 4.63715 14.0887 7.99986 14.0887Z\" stroke=\"currentColor\" />\n <path d=\"M2.34619 8H13.6538\" stroke=\"currentColor\" strokeLinecap=\"square\" />\n <path d=\"M7.99976 14.0889C9.23509 14.0889 10.1743 11.3629 10.1743 8.00006C10.1743 4.63739 9.23509 1.91138 7.99976 1.91138\" stroke=\"currentColor\" />\n <path d=\"M7.99973 14.0889C6.76445 14.0889 5.8252 11.3629 5.8252 8.00006C5.8252 4.63739 6.76445 1.91138 7.99973 1.91138\" stroke=\"currentColor\" />\n </svg>\n)\n\n/**\n * Render code-bracket geometry for link icons; it matches the `inspect-outline` product glyph.\n * @param props - Size, optional CSS class, and inherited stroke width.\n * @returns The decorative SVG artwork.\n */\nexport const CodeBracketsArtwork = ({ size = 14, className, strokeWidth }: WeightedArtworkProps) => (\n <svg width={size} height={size} className={className} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" strokeWidth={strokeWidth}>\n <path d=\"M4.67398 4.25061L1.36094 7.86484C1.29085 7.9413 1.29085 8.05866 1.36094 8.13513L4.67398 11.7494\" stroke=\"currentColor\" />\n <path d=\"M11.3262 4.25061L14.6392 7.86484C14.7093 7.9413 14.7093 8.05866 14.6392 8.13513L11.3262 11.7494\" stroke=\"currentColor\" />\n <path d=\"M9.56222 3.62573L6.43774 12.3743\" stroke=\"currentColor\" />\n </svg>\n)\n\n/**\n * Render document-browse geometry for reference icons; it matches the `browse-outline` product glyph.\n * @param props - Size, optional CSS class, and inherited stroke width.\n * @returns The decorative SVG artwork.\n */\nexport const BrowseOutlineArtwork = ({ size = 16, className, strokeWidth }: WeightedArtworkProps) => (\n <svg width={size} height={size} className={className} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" strokeWidth={strokeWidth}>\n <path d=\"M4.9375 5.90295H11.0625\" stroke=\"currentColor\" />\n <path d=\"M4.9375 9.02991H8.27841\" stroke=\"currentColor\" />\n <path d=\"M12.5 1.32617C13.3039 1.32617 14 1.95171 14 2.77637V13.2246C13.9996 14.0489 13.3036 14.6738 12.5 14.6738H3.5C2.69637 14.6738 2.00042 14.0489 2 13.2246V2.77637C2 1.95171 2.69613 1.32617 3.5 1.32617H12.5ZM3.5 2.32617C3.1993 2.32617 3 2.55186 3 2.77637V13.2246C3.00044 13.4489 3.19963 13.6738 3.5 13.6738H12.5C12.8004 13.6738 12.9996 13.4489 13 13.2246V2.77637C13 2.55186 12.8007 2.32617 12.5 2.32617H3.5Z\" fill=\"currentColor\" />\n </svg>\n)\n\n/**\n * Render closed-folder geometry for reference and link icons; it matches the `folder-close` product glyph.\n * @param props - Size, optional CSS class, and inherited stroke width.\n * @returns The decorative SVG artwork.\n */\nexport const FolderCloseArtwork = ({ size = 16, className, strokeWidth }: WeightedArtworkProps) => (\n <svg width={size} height={size} className={className} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" strokeWidth={strokeWidth}>\n <path d=\"M1.50439 3.11059C1.50439 2.55831 1.95211 2.1106 2.50439 2.1106H5.43389C5.67773 2.1106 5.91318 2.19969 6.09593 2.36113L7.71649 3.79265C7.89924 3.95409 8.1347 4.04319 8.3785 4.04319H13.4958C14.0481 4.04319 14.4958 4.4909 14.4958 5.04319V12.8894C14.4958 13.4417 14.0481 13.8894 13.4958 13.8894H2.50439C1.95211 13.8894 1.50439 13.4417 1.50439 12.8894V4.04319V3.11059Z\" stroke=\"currentColor\" />\n <path d=\"M3.63501 7.66614H12.3647\" stroke=\"currentColor\" />\n </svg>\n)\n","import type { ReactNode } from 'react'\nimport { ICON_MEDIUM_STROKE, ICON_REGULAR_STROKE } from './icons/index.tsx'\nimport type { IconProps } from './icons/props.ts'\nimport {\n BrowseOutlineArtwork, ChatLinesOutlineArtwork, FolderCloseArtwork,\n} from './icons/shared-artwork.tsx'\n\n/** Reference domains with distinct composer and transcript glyphs. */\nexport type ReferenceIconKind = 'session' | 'file' | 'folder'\n\n/** Props shared by inline reference glyphs. */\nexport interface ReferenceIconProps extends IconProps {\n kind: ReferenceIconKind\n}\n\ninterface WeightedReferenceIconProps extends ReferenceIconProps {\n strokeWidth: number\n}\n\n/**\n * Render the icon that identifies one inline reference domain.\n * @param props - Reference kind, optional size, and optional CSS class.\n * @returns The corresponding decorative current-color SVG glyph.\n */\nfunction ReferenceIconArtwork({ kind, size = 16, className, strokeWidth }: WeightedReferenceIconProps): ReactNode {\n switch (kind) {\n case 'session': return <ChatLinesOutlineArtwork size={size} className={className} strokeWidth={strokeWidth} />\n case 'file': return <BrowseOutlineArtwork size={size} className={className} strokeWidth={strokeWidth} />\n case 'folder': return <FolderCloseArtwork size={size} className={className} strokeWidth={strokeWidth} />\n }\n}\n\n/**\n * Render a regular one-pixel reference icon.\n * @param props - Reference kind, size, and optional class.\n * @returns The regular decorative reference glyph.\n */\nexport function ReferenceIconRegular(props: ReferenceIconProps): ReactNode {\n return <ReferenceIconArtwork {...props} strokeWidth={ICON_REGULAR_STROKE} />\n}\n\n/**\n * Render a medium 1.3px reference icon.\n * @param props - Reference kind, size, and optional class.\n * @returns The medium decorative reference glyph.\n */\nexport function ReferenceIconMedium(props: ReferenceIconProps): ReactNode {\n return <ReferenceIconArtwork {...props} strokeWidth={ICON_MEDIUM_STROKE} />\n}\n","/**\n * Embedded square code-icon artwork. The adjacent manifest records the design\n * export digests; the 48 keys match CODE_FILE_TYPES exactly.\n */\nimport type { CodeFileType } from './code-file-types.ts'\n\n/** Placeholder replaced with one React-instance id before SVG insertion. */\nexport const CODE_FILE_ICON_ID_TOKEN = '__DSH_CODE_ICON_INSTANCE__'\n\n/** Validated inner SVG markup for the established detailed code categories. */\nexport const CODE_FILE_ARTWORK = Object.freeze({\n 'angular': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F8ECEF\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#DD0031\" d=\"M16.712 17.711H7.288l-1.204 2.916L12 24l5.916-3.373-1.204-2.916ZM14.692 0l7.832 16.855.814-12.856L14.692 0ZM9.308 0 .662 3.999l.814 12.856L9.308 0Zm-.405 13.93h6.198L12 6.396 8.903 13.93Z\"/></g>',\n 'c': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#EEF4F8\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#659AD2\" d=\"M16.5921 9.1962s-.354-3.298-3.627-3.39c-3.2741-.09-4.9552 2.474-4.9552 6.14 0 3.6651 1.858 6.5972 5.0451 6.5972 3.184 0 3.5381-3.665 3.5381-3.665l6.1041.365s.36 3.31-2.196 5.836c-2.552 2.5241-5.6901 2.9371-7.8762 2.9201-2.19-.017-5.2261.034-8.1602-2.97-2.938-3.0101-3.436-5.9302-3.436-8.8002 0-2.8701.556-6.6702 4.047-9.5502C7.444.72 9.849 0 12.254 0c10.0422 0 10.7172 9.2602 10.7172 9.2602z\"/></g>',\n 'clojure': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F1F7EC\" stroke=\"#DCEAD2\" stroke-width=\".5\"/><svg x=\"2.75\" y=\"2.75\" width=\"14.5\" height=\"14.5\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><g fill=\"none\"><path d=\"M64 0C28.712 0 0 28.6 0 63.751c0 35.155 28.712 63.753 64 63.753s64-28.598 64-63.753C128 28.6 99.288 0 64 0\" fill=\"#FFF\"/><path d=\"M61.659 64.898a265.825 265.825 0 00-1.867 4.12c-2.322 5.241-4.894 11.62-5.834 15.706-.337 1.455-.546 3.258-.542 5.258 0 .79.043 1.622.11 2.469a30.74 30.74 0 0010.533 1.87 30.796 30.796 0 009.642-1.566 18.09 18.09 0 01-2.011-2.12c-4.11-5.221-6.403-12.872-10.031-25.737M46.485 38.96c-7.85 5.51-12.986 14.6-13.005 24.9.019 10.145 5.001 19.116 12.653 24.65 1.877-7.789 6.582-14.92 13.637-29.214a114.691 114.691 0 00-1.43-3.72c-1.955-4.884-4.776-10.556-7.294-13.124-1.283-1.342-2.84-2.502-4.561-3.492\" fill=\"#91DC47\"/><path d=\"M90.697 98.798c-4.05-.506-7.392-1.116-10.317-2.144a36.708 36.708 0 01-16.32 3.807c-20.293 0-36.742-16.383-36.745-36.602 0-10.97 4.852-20.805 12.528-27.512-2.053-.495-4.194-.783-6.38-.779-10.782.101-22.162 6.044-26.9 22.095-.443 2.337-.337 4.103-.337 6.197 0 31.818 25.895 57.613 57.835 57.613 19.561 0 36.841-9.682 47.305-24.489-5.66 1.405-11.103 2.077-15.763 2.091-1.747 0-3.387-.093-4.906-.277\" fill=\"#63B132\"/><path d=\"M79.829 87.634c.357.176 1.167.464 2.293.783 7.579-5.542 12.504-14.469 12.523-24.558h-.003c-.028-16.82-13.693-30.43-30.582-30.462a30.765 30.765 0 00-9.602 1.554c6.21 7.05 9.196 17.127 12.084 28.148l.005.013c.005.009.924 3.06 2.501 7.11 1.566 4.042 3.797 9.048 6.23 12.696 1.597 2.444 3.354 4.2 4.551 4.716\" fill=\"#90B4FE\"/><path d=\"M17.057 30.311c5.463-3.408 11.04-4.637 15.908-4.593 6.722.02 12.008 2.096 14.544 3.516.612.352 1.194.73 1.764 1.12a36.714 36.714 0 0114.786-3.096c20.295.003 36.747 16.386 36.75 36.601-.003 10.192-4.188 19.408-10.934 26.044a45.3 45.3 0 005.225.29c6.406.004 13.329-1.404 18.52-5.753 3.384-2.84 6.22-6.998 7.792-13.233.307-2.408.484-4.856.484-7.347 0-31.817-25.892-57.614-57.835-57.614-19.372 0-36.508 9.5-47.004 24.065z\" fill=\"#5881D8\"/></g></svg>',\n 'cmake': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F2F5F7\" stroke=\"#D9E1E7\" stroke-width=\".5\"/><svg x=\"2.75\" y=\"2.75\" width=\"14.5\" height=\"14.5\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#064F8C\" d=\"M62.8.4L.3 123.8l68.1-57.9z\"/><path fill=\"#249847\" d=\"M123.8 127.7l-84-33.9L0 127.7z\"/><path fill=\"#BE2128\" d=\"M128 126.6L65.6 2.5l9.2 102.6z\"/><path fill=\"#CDCDCE\" d=\"M71.9 104l-3.1-34.9L42 92z\"/></svg>',\n 'cpp': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#E8F2F8\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#00599C\" d=\"M22.394 6c-.167-.29-.398-.543-.652-.69L12.926.22c-.509-.294-1.34-.294-1.848 0L2.26 5.31c-.508.293-.923 1.013-.923 1.6v10.18c0 .294.104.62.271.91.167.29.398.543.652.69l8.816 5.09c.508.293 1.34.293 1.848 0l8.816-5.09c.254-.147.485-.4.652-.69.167-.29.27-.616.27-.91V6.91c.003-.294-.1-.62-.268-.91zM12 19.11c-3.92 0-7.109-3.19-7.109-7.11 0-3.92 3.19-7.11 7.11-7.11a7.133 7.133 0 016.156 3.553l-3.076 1.78a3.567 3.567 0 00-3.08-1.78A3.56 3.56 0 008.444 12 3.56 3.56 0 0012 15.555a3.57 3.57 0 003.08-1.778l3.078 1.78A7.135 7.135 0 0112 19.11zm7.11-6.715h-.79v.79h-.79v-.79h-.79v-.79h.79v-.79h.79v.79h.79zm2.962 0h-.79v.79h-.79v-.79h-.79v-.79h.79v-.79h.79v.79h.79z\"/></g>',\n 'csharp': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F3EEF7\" stroke=\"#E2D7EA\" stroke-width=\".5\"/><svg x=\"2.75\" y=\"2.75\" width=\"14.5\" height=\"14.5\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#9B4F96\" d=\"M115.4 30.7L67.1 2.9c-.8-.5-1.9-.7-3.1-.7-1.2 0-2.3.3-3.1.7l-48 27.9c-1.7 1-2.9 3.5-2.9 5.4v55.7c0 1.1.2 2.4 1 3.5l106.8-62c-.6-1.2-1.5-2.1-2.4-2.7z\"/><path fill=\"#68217A\" d=\"M10.7 95.3c.5.8 1.2 1.5 1.9 1.9l48.2 27.9c.8.5 1.9.7 3.1.7 1.2 0 2.3-.3 3.1-.7l48-27.9c1.7-1 2.9-3.5 2.9-5.4V36.1c0-.9-.1-1.9-.6-2.8l-106.6 62z\"/><path fill=\"#fff\" d=\"M85.3 76.1C81.1 83.5 73.1 88.5 64 88.5c-13.5 0-24.5-11-24.5-24.5s11-24.5 24.5-24.5c9.1 0 17.1 5 21.3 12.5l13-7.5c-6.8-11.9-19.6-20-34.3-20-21.8 0-39.5 17.7-39.5 39.5s17.7 39.5 39.5 39.5c14.6 0 27.4-8 34.2-19.8l-12.9-7.6zM97 66.2l.9-4.3h-4.2v-4.7h5.1L100 51h4.9l-1.2 6.1h3.8l1.2-6.1h4.8l-1.2 6.1h2.4v4.7h-3.3l-.9 4.3h4.2v4.7h-5.1l-1.2 6h-4.9l1.2-6h-3.8l-1.2 6h-4.8l1.2-6h-2.4v-4.7H97zm4.8 0h3.8l.9-4.3h-3.8l-.9 4.3z\"/></svg>',\n 'css': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#1572B6\"/><text x=\"10\" y=\"12.8\" text-anchor=\"middle\" font-family=\"Arial,sans-serif\" font-size=\"6.2\" font-weight=\"900\" fill=\"#fff\">CSS</text>',\n 'dart': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#ECF7FA\" stroke=\"#D5EAF0\" stroke-width=\".5\"/><svg x=\"2.75\" y=\"2.75\" width=\"14.5\" height=\"14.5\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#00c4b3\" d=\"M35.2 34.9l-8.3-8.3v59.7l.1 2.8c0 1.3.2 2.8.7 4.3l65.6 23.1 16.3-7.2-74.4-74.4z\"/><path d=\"M27.7 93.4zm81.9 15.9l-16.3 7.2-65.4-23.1c1.3 4.8 4 10.1 7 13.2l21.3 21.2 47.6.1 5.8-18.6z\" fill=\"#22d3c5\"/><path fill=\"#0075c9\" d=\"M1.7 65.1C-.4 67.3.7 72 4 75.5l14.7 14.8 9.2 3.3c-.3-1.5-.7-3-.7-4.3l-.1-2.8-.2-59.8m82.7 82.6l7.2-16.4-23-65.6c-1.5-.3-3-.6-4.3-.7l-2.9-.1-59.6.1\"/><path d=\"M93.6 27.3c.2 0 .2 0 0 0 .2 0 .2 0 0 0zm16 82l17.7-5.8V54.8l-20.4-20.5c-3-3-8.3-5.8-13.2-7l23.1 65.6\" fill=\"#00a8e1\"/><path fill=\"#00c4b3\" d=\"M90.5 18.2L75.7 3.5c-3.4-3.4-8-4.4-10.4-2.3L26.9 26.6h59.5l2.9.1c1.3 0 2.8.2 4.3.7l-3.1-9.2z\"/></svg>',\n 'docker': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#E8F4FC\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#2496ED\" d=\"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z\"/></g>',\n 'elixir': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F3EEF6\" stroke=\"#E3D9E8\" stroke-width=\".5\"/><svg x=\"2.75\" y=\"2.75\" width=\"14.5\" height=\"14.5\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><linearGradient id=\"__DSH_CODE_ICON_INSTANCE__elixir-original-a\" gradientUnits=\"userSpaceOnUse\" x1=\"835.592\" y1=\"-36.546\" x2=\"821.211\" y2=\"553.414\" gradientTransform=\"matrix(.1297 0 0 .2 -46.03 17.198)\"><stop offset=\"0\" stop-color=\"#d9d8dc\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\".385\"/></linearGradient><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"url(#__DSH_CODE_ICON_INSTANCE__elixir-original-a)\" d=\"M64.4.5C36.7 13.9 1.9 83.4 30.9 113.9c26.8 33.5 85.4 1.3 68.4-40.5-21.5-36-35-37.9-34.9-72.9z\"/><linearGradient id=\"__DSH_CODE_ICON_INSTANCE__elixir-original-b\" gradientUnits=\"userSpaceOnUse\" x1=\"942.357\" y1=\"-40.593\" x2=\"824.692\" y2=\"472.243\" gradientTransform=\"matrix(.1142 0 0 .2271 -47.053 17.229)\"><stop offset=\"0\" stop-color=\"#8d67af\" stop-opacity=\".672\"/><stop offset=\"1\" stop-color=\"#9f8daf\"/></linearGradient><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"url(#__DSH_CODE_ICON_INSTANCE__elixir-original-b)\" d=\"M64.4.2C36.8 13.6 1.9 82.9 31 113.5c10.7 12.4 28 16.5 37.7 9.1 26.4-18.8 7.4-53.1 10.4-78.5C68.1 33.9 64.2 11.3 64.4.2z\"/><linearGradient id=\"__DSH_CODE_ICON_INSTANCE__elixir-original-c\" gradientUnits=\"userSpaceOnUse\" x1=\"924.646\" y1=\"120.513\" x2=\"924.646\" y2=\"505.851\" gradientTransform=\"matrix(.1227 0 0 .2115 -46.493 17.206)\"><stop offset=\"0\" stop-color=\"#26053d\" stop-opacity=\".762\"/><stop offset=\"1\" stop-color=\"#b7b4b4\" stop-opacity=\".278\"/></linearGradient><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"url(#__DSH_CODE_ICON_INSTANCE__elixir-original-c)\" d=\"M56.7 4.3c-22.3 15.9-28.2 75-24.1 94.2 8.2 48.1 75.2 28.3 69.6-16.5-6-29.2-48.8-39.2-45.5-77.7z\"/><linearGradient id=\"__DSH_CODE_ICON_INSTANCE__elixir-original-d\" gradientUnits=\"userSpaceOnUse\" x1=\"428.034\" y1=\"198.448\" x2=\"607.325\" y2=\"559.255\" gradientTransform=\"matrix(.1848 0 0 .1404 -42.394 17.138)\"><stop offset=\"0\" stop-color=\"#91739f\" stop-opacity=\".46\"/><stop offset=\"1\" stop-color=\"#32054f\" stop-opacity=\".54\"/></linearGradient><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"url(#__DSH_CODE_ICON_INSTANCE__elixir-original-d)\" d=\"M78.8 49.8c10.4 13.4 12.7 22.6 6.8 27.9-27.7 19.4-61.3 7.4-54-37.3C22.1 63 4.5 96.8 43.3 101.6c20.8 3.6 54 2 58.9-16.1-.2-15.9-10.8-22.9-23.4-35.7z\"/><linearGradient id=\"__DSH_CODE_ICON_INSTANCE__elixir-original-e\" gradientUnits=\"userSpaceOnUse\" x1=\"907.895\" y1=\"540.636\" x2=\"590.242\" y2=\"201.281\" gradientTransform=\"matrix(.1418 0 0 .1829 -45.23 17.18)\"><stop offset=\"0\" stop-color=\"#463d49\" stop-opacity=\".331\"/><stop offset=\"1\" stop-color=\"#340a50\" stop-opacity=\".821\"/></linearGradient><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"url(#__DSH_CODE_ICON_INSTANCE__elixir-original-e)\" d=\"M38.1 36.4c-2.9 21.2 35.1 77.9 58.3 71-17.7 35.6-56.9-21.2-64-41.7 1.5-11 2.2-16.4 5.7-29.3z\"/><linearGradient id=\"__DSH_CODE_ICON_INSTANCE__elixir-original-f\" gradientUnits=\"userSpaceOnUse\" x1=\"1102.297\" y1=\"100.542\" x2=\"1008.071\" y2=\"431.648\" gradientTransform=\"matrix(.106 0 0 .2448 -47.595 17.242)\"><stop offset=\"0\" stop-color=\"#715383\" stop-opacity=\".145\"/><stop offset=\"1\" stop-color=\"#f4f4f4\" stop-opacity=\".234\"/></linearGradient><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"url(#__DSH_CODE_ICON_INSTANCE__elixir-original-f)\" d=\"M60.4 49.7c.8 7.9 3.9 20.5 0 28.8S38.7 102 43.6 115.3c11.4 24.8 37.1-4.4 36.9-19 1.1-11.8-6.6-38.7-1.8-52.5L76.5 41l-13.6-4c-2.2 3.2-3 7.5-2.5 12.7z\"/><linearGradient id=\"__DSH_CODE_ICON_INSTANCE__elixir-original-g\" gradientUnits=\"userSpaceOnUse\" x1=\"1354.664\" y1=\"140.06\" x2=\"1059.233\" y2=\"84.466\" gradientTransform=\"matrix(.09173 0 0 .2828 -48.536 17.28)\"><stop offset=\"0\" stop-color=\"#a5a1a8\" stop-opacity=\".356\"/><stop offset=\"1\" stop-color=\"#370c50\" stop-opacity=\".582\"/></linearGradient><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"url(#__DSH_CODE_ICON_INSTANCE__elixir-original-g)\" d=\"M65.3 10.8C36 27.4 48 53.4 49.3 81.6l19.1-55.4c-1.4-5.7-2.3-9.5-3.1-15.4z\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"#330A4C\" fill-opacity=\".316\" d=\"M68.3 26.1c-14.8 11.7-14.1 31.3-18.6 54 8.1-21.3 4.1-38.2 18.6-54z\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"#FFF\" d=\"M45.8 119.7c8 1.1 12.1 2.2 12.5 3 .3 4.2-11.1 1.2-12.5-3z\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"#EDEDED\" fill-opacity=\".603\" d=\"M49.8 10.8c-6.9 7.7-14.4 21.8-18.2 29.7-1 6.5-.5 15.7.6 23.5.9-18.2 7.5-39.2 17.6-53.2z\"/></svg>',\n 'env': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#ECD53F\"/><text x=\"10\" y=\"12.9\" text-anchor=\"middle\" font-family=\"Arial,sans-serif\" font-size=\"5.7\" font-weight=\"900\" fill=\"#24292F\">.ENV</text>',\n 'erlang': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#FAEDF1\" stroke=\"#EED6DE\" stroke-width=\".5\"/><svg x=\"2.75\" y=\"2.75\" width=\"14.5\" height=\"14.5\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><path d=\"M20.7 103.9C11 93.5 5.2 79.2 5.3 62.1 5.2 47 10 34 18.2 24.1H1v79.7l19.7.1zm90.4 0c4.2-4.5 8-9.8 11.4-15.9l-19-9.5c-6.7 10.8-16.4 20.8-29.9 20.9-19.6-.1-27.3-16.9-27.3-38.5h73.3c.1-2.4.1-3.6 0-4.7.5-12.9-2.9-23.7-9.1-32.1H127v79.7l-15.9.1zM47.5 42.4c.8-9.8 8.5-16.3 17.6-16.4 9.1 0 15.7 6.6 15.9 16.4H47.5z\" fill=\"#A90533\"/></svg>',\n 'flutter': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#EEF7FD\" stroke=\"#D7EAF6\" stroke-width=\".5\"/><svg x=\"2.75\" y=\"2.75\" width=\"14.5\" height=\"14.5\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><g fill=\"#3FB6D3\"><path d=\"M12.3 64.2L76.3 0h39.4L32.1 83.6zM76.3 128h39.4L81.6 93.9l34.1-34.8H76.3L42.2 93.5z\"/></g><path fill=\"#27AACD\" d=\"M81.6 93.9l-20-20-19.4 19.6 19.4 19.6z\"/><path fill=\"#19599A\" d=\"M115.7 128L81.6 93.9l-20 19.2L76.3 128z\"/><linearGradient id=\"__DSH_CODE_ICON_INSTANCE__flutter-original-a\" gradientUnits=\"userSpaceOnUse\" x1=\"59.365\" y1=\"116.36\" x2=\"86.825\" y2=\"99.399\"><stop offset=\"0\" stop-color=\"#1b4e94\"/><stop offset=\".63\" stop-color=\"#1a5497\"/><stop offset=\"1\" stop-color=\"#195a9b\"/></linearGradient><path fill=\"url(#__DSH_CODE_ICON_INSTANCE__flutter-original-a)\" d=\"M61.6 113.1l30.8-8.4-10.8-10.8z\"/></svg>',\n 'git': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#FFF0EC\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#F05032\" d=\"M13.09 23.549a1.54 1.54 0 0 1-2.18 0L.451 13.089a1.54 1.54 0 0 1 0-2.179l7.191-7.19 2.733 2.733a1.85 1.85 0 0 0 .964 2.326v6.66a1.849 1.849 0 1 0 1.54 0V8.957l2.508 2.508a1.85 1.85 0 1 0 1.09-1.09l-2.634-2.634a1.85 1.85 0 0 0-2.378-2.377L8.73 2.63 10.91.451a1.54 1.54 0 0 1 2.179 0l10.459 10.46a1.54 1.54 0 0 1 0 2.179z\"/></g>',\n 'go': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#E7F9FC\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#00ADD8\" d=\"M1.811 10.231c-.047 0-.058-.023-.035-.059l.246-.315c.023-.035.081-.058.128-.058h4.172c.046 0 .058.035.035.07l-.199.303c-.023.036-.082.07-.117.07zM.047 11.306c-.047 0-.059-.023-.035-.058l.245-.316c.023-.035.082-.058.129-.058h5.328c.047 0 .07.035.058.07l-.093.28c-.012.047-.058.07-.105.07zm2.828 1.075c-.047 0-.059-.035-.035-.07l.163-.292c.023-.035.07-.07.117-.07h2.337c.047 0 .07.035.07.082l-.023.28c0 .047-.047.082-.082.082zm12.129-2.36c-.736.187-1.239.327-1.963.514-.176.046-.187.058-.34-.117-.174-.199-.303-.327-.548-.444-.737-.362-1.45-.257-2.115.175-.795.514-1.204 1.274-1.192 2.22.011.935.654 1.706 1.577 1.835.795.105 1.46-.175 1.987-.77.105-.13.198-.27.315-.434H10.47c-.245 0-.304-.152-.222-.35.152-.362.432-.97.596-1.274a.315.315 0 01.292-.187h4.253c-.023.316-.023.631-.07.947a4.983 4.983 0 01-.958 2.29c-.841 1.11-1.94 1.8-3.33 1.986-1.145.152-2.209-.07-3.143-.77-.865-.655-1.356-1.52-1.484-2.595-.152-1.274.222-2.419.993-3.424.83-1.086 1.928-1.776 3.272-2.02 1.098-.2 2.15-.07 3.096.571.62.41 1.063.97 1.356 1.648.07.105.023.164-.117.2m3.868 6.461c-1.064-.024-2.034-.328-2.852-1.029a3.665 3.665 0 01-1.262-2.255c-.21-1.32.152-2.489.947-3.529.853-1.122 1.881-1.706 3.272-1.95 1.192-.21 2.314-.095 3.33.595.923.63 1.496 1.484 1.648 2.605.198 1.578-.257 2.863-1.344 3.962-.771.783-1.718 1.273-2.805 1.495-.315.06-.63.07-.934.106zm2.78-4.72c-.011-.153-.011-.27-.034-.387-.21-1.157-1.274-1.81-2.384-1.554-1.087.245-1.788.935-2.045 2.033-.21.912.234 1.835 1.075 2.21.643.28 1.285.244 1.905-.07.923-.48 1.425-1.228 1.484-2.233z\"/></g>',\n 'graphql': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#FCEAF6\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#E10098\" d=\"M12.002 0a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.54 4.931a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm0 9.862a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm-8.54 4.931a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.276zm-8.542-4.93a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.277zm0-9.863a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.542-3.378L2.953 6.777v10.448l9.049 5.224 9.047-5.224V6.777zm0 1.601 7.66 13.27H4.34zm-1.387.371L3.97 15.037V7.363zm2.774 0 6.646 3.838v7.674zM5.355 17.44h13.293l-6.646 3.836z\"/></g>',\n 'haskell': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F3F0F7\" stroke=\"#E1D9EA\" stroke-width=\".5\"/><svg x=\"2.75\" y=\"2.75\" width=\"14.5\" height=\"14.5\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#463B63\" d=\"M0 110.2L30.1 65 0 19.9h22.6L52.7 65l-30.1 45.1H0z\"/><path fill=\"#5E5187\" d=\"M30.1 110.2L60.2 65 30.1 19.9h22.6l60.2 90.3H90.4L71.5 81.9l-18.8 28.2H30.1z\"/><path fill=\"#904F8C\" d=\"M102.9 83.8l-10-15.1H128v15.1h-25.1zM87.8 61.3l-10-15.1H128v15.1H87.8z\"/></svg>',\n 'ini': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#6E7781\"/><text x=\"10\" y=\"13.2\" text-anchor=\"middle\" font-family=\"Arial,sans-serif\" font-size=\"7.2\" font-weight=\"800\" fill=\"#fff\">INI</text>',\n 'java': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F4F7FA\" stroke=\"#D9E2E8\" stroke-width=\".5\"/><svg x=\"2.5\" y=\"2.5\" width=\"15\" height=\"15\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#0074BD\" d=\"M47.617 98.12s-4.767 2.774 3.397 3.71c9.892 1.13 14.947.968 25.845-1.092 0 0 2.871 1.795 6.873 3.351-24.439 10.47-55.308-.607-36.115-5.969zm-2.988-13.665s-5.348 3.959 2.823 4.805c10.567 1.091 18.91 1.18 33.354-1.6 0 0 1.993 2.025 5.132 3.131-29.542 8.64-62.446.68-41.309-6.336z\"/><path fill=\"#EA2D2E\" d=\"M69.802 61.271c6.025 6.935-1.58 13.17-1.58 13.17s15.289-7.891 8.269-17.777c-6.559-9.215-11.587-13.792 15.635-29.58 0 .001-42.731 10.67-22.324 34.187z\"/><path fill=\"#0074BD\" d=\"M102.123 108.229s3.529 2.91-3.888 5.159c-14.102 4.272-58.706 5.56-71.094.171-4.451-1.938 3.899-4.625 6.526-5.192 2.739-.593 4.303-.485 4.303-.485-4.953-3.487-32.013 6.85-13.743 9.815 49.821 8.076 90.817-3.637 77.896-9.468zM49.912 70.294s-22.686 5.389-8.033 7.348c6.188.828 18.518.638 30.011-.326 9.39-.789 18.813-2.474 18.813-2.474s-3.308 1.419-5.704 3.053c-23.042 6.061-67.544 3.238-54.731-2.958 10.832-5.239 19.644-4.643 19.644-4.643zm40.697 22.747c23.421-12.167 12.591-23.86 5.032-22.285-1.848.385-2.677.72-2.677.72s.688-1.079 2-1.543c14.953-5.255 26.451 15.503-4.823 23.725 0-.002.359-.327.468-.617z\"/><path fill=\"#EA2D2E\" d=\"M76.491 1.587S89.459 14.563 64.188 34.51c-20.266 16.006-4.621 25.13-.007 35.559-11.831-10.673-20.509-20.07-14.688-28.815C58.041 28.42 81.722 22.195 76.491 1.587z\"/><path fill=\"#0074BD\" d=\"M52.214 126.021c22.476 1.437 57-.8 57.817-11.436 0 0-1.571 4.032-18.577 7.231-19.186 3.612-42.854 3.191-56.887.874 0 .001 2.875 2.381 17.647 3.331z\"/></svg>',\n 'javascript': '<defs><clipPath id=\"__DSH_CODE_ICON_INSTANCE__a\"><rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\"/></clipPath></defs><g clip-path=\"url(#__DSH_CODE_ICON_INSTANCE__a)\"><svg x=\"1\" y=\"1\" width=\"18\" height=\"18\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#F0DB4F\" d=\"M1.408 1.408h125.184v125.185H1.408z\"/><path fill=\"#323330\" d=\"M116.347 96.736c-.917-5.711-4.641-10.508-15.672-14.981-3.832-1.761-8.104-3.022-9.377-5.926-.452-1.69-.512-2.642-.226-3.665.821-3.32 4.784-4.355 7.925-3.403 2.023.678 3.938 2.237 5.093 4.724 5.402-3.498 5.391-3.475 9.163-5.879-1.381-2.141-2.118-3.129-3.022-4.045-3.249-3.629-7.676-5.498-14.756-5.355l-3.688.477c-3.534.893-6.902 2.748-8.877 5.235-5.926 6.724-4.236 18.492 2.975 23.335 7.104 5.332 17.54 6.545 18.873 11.531 1.297 6.104-4.486 8.08-10.234 7.378-4.236-.881-6.592-3.034-9.139-6.949-4.688 2.713-4.688 2.713-9.508 5.485 1.143 2.499 2.344 3.63 4.26 5.795 9.068 9.198 31.76 8.746 35.83-5.176.165-.478 1.261-3.666.38-8.581zM69.462 58.943H57.753l-.048 30.272c0 6.438.333 12.34-.714 14.149-1.713 3.558-6.152 3.117-8.175 2.427-2.059-1.012-3.106-2.451-4.319-4.485-.333-.584-.583-1.036-.667-1.071l-9.52 5.83c1.583 3.249 3.915 6.069 6.902 7.901 4.462 2.678 10.459 3.499 16.731 2.059 4.082-1.189 7.604-3.652 9.448-7.401 2.666-4.915 2.094-10.864 2.07-17.444.06-10.735.001-21.468.001-32.237z\"/></svg></g>',\n 'json': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F4F4F4\" stroke=\"#DDDDDD\" stroke-width=\".5\"/><svg x=\"2.75\" y=\"2.75\" width=\"14.5\" height=\"14.5\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><linearGradient id=\"__DSH_CODE_ICON_INSTANCE__a\" x1=\"-670.564\" x2=\"-583.105\" y1=\"-280.831\" y2=\"-368.306\" gradientTransform=\"matrix(.9988 0 0 -.9987 689.011 -259.008)\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\"/><stop offset=\"1\" stop-color=\"#fff\"/></linearGradient><path fill=\"url(#__DSH_CODE_ICON_INSTANCE__a)\" fill-rule=\"evenodd\" d=\"M63.895 94.303c27.433 37.398 54.281-10.438 54.241-39.205-.046-34.012-34.518-53.021-54.263-53.021C32.182 2.077 2 28.269 2 64.105 2 103.937 36.596 126 63.873 126c-6.172-.889-26.742-5.296-27.019-52.674-.186-32.044 10.453-44.846 26.974-39.214.37.137 18.223 7.18 18.223 30.187 0 22.908-18.156 30.004-18.156 30.004z\" clip-rule=\"evenodd\"/><linearGradient id=\"__DSH_CODE_ICON_INSTANCE__b\" x1=\"-579.148\" x2=\"-666.607\" y1=\"-364.34\" y2=\"-276.873\" gradientTransform=\"matrix(.9988 0 0 -.9987 689.011 -259.008)\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\"/><stop offset=\"1\" stop-color=\"#fff\"/></linearGradient><path fill=\"url(#__DSH_CODE_ICON_INSTANCE__b)\" fill-rule=\"evenodd\" d=\"M63.863 34.086C45.736 27.838 23.53 42.778 23.53 72.703 23.53 121.565 59.739 126 64.128 126 95.818 126 126 99.808 126 63.972 126 24.14 91.404 2.077 64.127 2.077c7.555-1.046 40.719 8.176 40.719 53.504 0 29.559-24.764 45.651-40.87 38.776-.37-.137-18.223-7.18-18.223-30.187 0-22.91 18.11-30.085 18.11-30.084z\" clip-rule=\"evenodd\"/></svg>',\n 'kotlin': '<defs><linearGradient id=\"__DSH_CODE_ICON_INSTANCE__k\" x1=\"1\" y1=\"19\" x2=\"19\" y2=\"1\"><stop stop-color=\"#0095D5\"/><stop offset=\".5\" stop-color=\"#7F52FF\"/><stop offset=\"1\" stop-color=\"#F88909\"/></linearGradient></defs><rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"url(#__DSH_CODE_ICON_INSTANCE__k)\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#FFFFFF\" d=\"M24 24H0V0h24L12 12Z\"/></g>',\n 'lua': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#ECECF7\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#000080\" d=\"M.38 10.377l-.272-.037c-.048.344-.082.695-.101 1.041l.275.016c.018-.34.051-.682.098-1.02zM4.136 3.289l-.184-.205c-.258.232-.509.48-.746.734l.202.188c.231-.248.476-.49.728-.717zM5.769 2.059l-.146-.235c-.296.186-.586.385-.863.594l.166.219c.27-.203.554-.399.843-.578zM1.824 18.369c.185.297.384.586.593.863l.22-.164c-.205-.271-.399-.555-.58-.844l-.233.145zM1.127 16.402l-.255.104c.129.318.274.635.431.943l.005.01.245-.125-.005-.01c-.153-.301-.295-.611-.421-.922zM.298 9.309l.269.063c.076-.332.168-.664.272-.986l-.261-.087c-.108.332-.202.672-.28 1.01zM.274 12.42l-.275.01c.012.348.04.699.083 1.043l.273-.033c-.042-.336-.069-.68-.081-1.02zM.256 14.506c.073.34.162.682.264 1.014l.263-.08c-.1-.326-.187-.658-.258-.99l-.269.056zM11.573.275L11.563 0c-.348.012-.699.039-1.044.082l.034.273c.338-.041.68-.068 1.02-.08zM23.221 8.566c.1.326.186.66.256.992l.27-.059c-.072-.34-.16-.682-.262-1.014l-.264.081zM17.621 1.389c-.309-.164-.627-.314-.947-.449l-.107.252c.314.133.625.281.926.439l.128-.242zM15.693.572c-.332-.105-.67-.199-1.01-.277l-.063.268c.332.076.664.168.988.273l.085-.264zM6.674 1.545c.298-.15.606-.291.916-.418L7.486.873c-.317.127-.632.272-.937.428l-.015.008.125.244.015-.008zM23.727 11.588l.275-.01a11.797 11.797 0 0 0-.082-1.045l-.273.033c.041.338.068.682.08 1.022zM13.654.105c-.346-.047-.696-.08-1.043-.098l-.014.273c.339.018.683.051 1.019.098l.038-.273zM9.544.527l-.058-.27c-.34.072-.681.16-1.014.264l.081.262c.325-.099.659-.185.991-.256zM1.921 5.469l.231.15c.185-.285.384-.566.592-.834l-.217-.17c-.213.276-.417.563-.606.854zM.943 7.318l.253.107c.132-.313.28-.625.439-.924l-.243-.128c-.163.307-.314.625-.449.945zM18.223 21.943l.145.234c.295-.186.586-.385.863-.594l-.164-.219c-.272.204-.557.4-.844.579zM21.248 19.219l.217.17c.215-.273.418-.561.607-.854l-.23-.148c-.186.285-.385.564-.594.832zM19.855 20.715l.184.203c.258-.23.51-.479.746-.732l-.201-.188c-.23.248-.477.488-.729.717zM22.359 17.504l.244.129c.162-.307.314-.625.449-.945l-.254-.107a11.27 11.27 0 0 1-.439.923zM23.617 13.629l.273.039c.049-.346.082-.695.102-1.043l-.275-.014c-.018.338-.051.682-.1 1.018zM23.156 15.621l.264.086c.107-.332.201-.67.279-1.01l-.268-.063c-.077.333-.169.665-.275.987zM22.453 6.672c.154.303.297.617.424.932l.256-.104c-.131-.322-.277-.643-.436-.953l-.244.125zM8.296 23.418c.331.107.67.201 1.009.279l.062-.268c-.331-.076-.663-.168-.986-.273l-.085.262zM10.335 23.889c.345.049.696.082 1.043.102l.014-.275c-.339-.018-.682-.051-1.019-.098l-.038.271zM17.326 22.449c-.303.154-.613.297-.926.424l.104.256c.318-.131.639-.275.947-.434l.004-.002-.123-.246-.006.002zM4.613 21.467c.274.213.562.418.854.605l.149-.23c-.285-.184-.565-.385-.833-.592l-.17.217zM12.417 23.725l.009.275c.348-.014.699-.041 1.045-.084l-.035-.271c-.336.041-.68.068-1.019.08zM6.37 22.604c.307.162.625.314.946.449l.107-.254c-.313-.133-.624-.279-.924-.439l-.129.244zM3.083 20.041c.233.258.48.51.734.746l.188-.201c-.249-.23-.49-.477-.717-.729l-.205.184zM14.445 23.475l.059.27c.34-.074.68-.162 1.014-.266l-.082-.262c-.325.099-.659.185-.991.258zM21.18.129A2.689 2.689 0 1 0 21.18 5.507 2.689 2.689 0 1 0 21.18.129zM15.324 15.447c0 .471.314.66.852.66.67 0 1.297-.396 1.297-1.016v-.645c-.23.107-.379.141-1.107.24-.735.109-1.042.306-1.042.761zM12 2.818c-5.07 0-9.18 4.109-9.18 9.18 0 5.068 4.11 9.18 9.18 9.18 5.07 0 9.18-4.111 9.18-9.18 0-5.07-4.11-9.18-9.18-9.18zm-2.487 13.77H5.771v-6.023h.769v5.346h2.974v.677zm4.13 0h-.619v-.67c-.405.57-.811.793-1.446.793-.843 0-1.38-.463-1.38-1.182v-3.271h.686v3c0 .52.347.85.893.85.719 0 1.181-.578 1.181-1.461v-2.389h.686v4.33zm-.53-8.393c0-1.484 1.205-2.689 2.689-2.689s2.688 1.205 2.688 2.689-1.203 2.688-2.688 2.688-2.689-1.203-2.689-2.688zm5.567 7.856v.52c-.223.059-.33.074-.471.074-.34 0-.637-.238-.711-.57-.381.406-.918.637-1.471.637-.877 0-1.422-.463-1.422-1.248 0-.527.256-.916.76-1.123.266-.107.414-.141 1.389-.264.545-.066.719-.191.719-.48v-.182c0-.412-.348-.645-.967-.645-.645 0-.957.24-1.016.77h-.693c.041-1 .686-1.404 1.734-1.404 1.066 0 1.627.412 1.627 1.182v2.412c0 .215.133.338.373.338.041-.002.074-.002.149-.017z\"/></g>',\n 'makefile': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#427819\"/><path fill=\"#fff\" d=\"m5 4.5 2.3 2.3 2.3-2.3L11 5.9 8.7 8.2l2.4 2.4L9.7 12l-2.4-2.4L5 11.9 3.6 10.5l2.3-2.3-2.3-2.3zm7 6.5h4v1.5h-4zm0 2.8h4v1.5h-4z\"/>',\n 'node': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#EDF7EA\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#539E43\" d=\"M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z\"/></g>',\n 'objective-c': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#438EFF\"/><text x=\"10\" y=\"13.2\" text-anchor=\"middle\" font-family=\"Arial,sans-serif\" font-size=\"7.2\" font-weight=\"800\" fill=\"#fff\">OC</text>',\n 'perl': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#EAF2F7\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#0073A1\" d=\"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0m.157 1.103a10.91 10.91 0 0 1 9.214 5.404c-1.962.152-3.156 1.698-5.132 3.553-2.81 2.637-4.562.582-5.288-.898-.447-1.004-.847-2.117-1.544-2.769A.4.4 0 0 1 9.3 6.02l.08-.37a.083.083 0 0 0-.074-.1c-.33-.022-.601.093-.84.368a2.5 2.5 0 0 0-.375-.064c-.863-.093-1.036.345-1.873.345H5.81c-.758 0-1.391.361-1.7.892-.248.424-.257.884.15.93-.126.445.292.62 1.224.192 0 0 .733.421 1.749.421.549 0 .712.087.914.967.486 2.138 2.404 5.655 6.282 5.655l.118.166c.659.934.86 2.113.48 3.184-.307.867-.697 1.531-.697 1.531q.01.178.01.349c0 .81-.175 1.553-.387 2.23a10.91 10.91 0 0 1-11.989-6.342A10.91 10.91 0 0 1 7.608 2.01a10.9 10.9 0 0 1 4.55-.907M7.524 6.47c.288 0 .575.231.477.272a.4.4 0 0 1-.1.02.38.38 0 0 1-.375.327.384.384 0 0 1-.378-.326.4.4 0 0 1-.101-.02c-.098-.042.19-.273.477-.273m10.193 10.49q.05 0 .101.007.326.054.694.096.135.01.269.026a13.4 13.4 0 0 0 2.846-.007 10.9 10.9 0 0 1-2.007 2.705c-.11-.23-.547-1.19-.573-2.196q-.156-.01-.313-.026-.13-.014-.256-.022a18 18 0 0 1-.735-.102h-.003c-.032 0-.06.01-.074.035l-.003.012q-.081.265-.182.544c.428 1.084.652 2.078.652 2.078.14.22.258.432.363.64a11 11 0 0 1-2.168 1.264 11 11 0 0 1-1.205.426 13.3 13.3 0 0 1 1.055-2.531s.678-1.445 1.027-2.564v-.004a.55.55 0 0 1 .512-.38\"/></g>',\n 'php': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F0EFF8\" stroke=\"#DDDCEB\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#777BB4\" d=\"M7.01 10.207h-.944l-.515 2.648h.838c.556 0 .97-.105 1.242-.314.272-.21.455-.559.55-1.049.092-.47.05-.802-.124-.995-.175-.193-.523-.29-1.047-.29zM12 5.688C5.373 5.688 0 8.514 0 12s5.373 6.313 12 6.313S24 15.486 24 12c0-3.486-5.373-6.312-12-6.312zm-3.26 7.451c-.261.25-.575.438-.917.551-.336.108-.765.164-1.285.164H5.357l-.327 1.681H3.652l1.23-6.326h2.65c.797 0 1.378.209 1.744.628.366.418.476 1.002.33 1.752a2.836 2.836 0 0 1-.305.847c-.143.255-.33.49-.561.703zm4.024.715l.543-2.799c.063-.318.039-.536-.068-.651-.107-.116-.336-.174-.687-.174H11.46l-.704 3.625H9.388l1.23-6.327h1.367l-.327 1.682h1.218c.767 0 1.295.134 1.586.401s.378.7.263 1.299l-.572 2.944h-1.389zm7.597-2.265a2.782 2.782 0 0 1-.305.847c-.143.255-.33.49-.561.703a2.44 2.44 0 0 1-.917.551c-.336.108-.765.164-1.286.164h-1.18l-.327 1.682h-1.378l1.23-6.326h2.649c.797 0 1.378.209 1.744.628.366.417.477 1.001.331 1.751zM17.766 10.207h-.943l-.516 2.648h.838c.557 0 .971-.105 1.242-.314.272-.21.455-.559.551-1.049.092-.47.049-.802-.125-.995s-.524-.29-1.047-.29z\"/></g>',\n 'powershell': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#2671BE\"/><path fill=\"#fff\" fill-opacity=\".16\" d=\"M5.5 4h11l-3.5 12H2z\"/><path d=\"m6.5 6.5 3 3-4.2 3.2m4 1h4\" fill=\"none\" stroke=\"#fff\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>',\n 'protobuf': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#4285F4\"/><path fill=\"none\" stroke=\"#fff\" stroke-width=\"1.2\" stroke-linejoin=\"round\" d=\"m10 3.5 6 3.3v6.4l-6 3.3-6-3.3V6.8z\"/><path fill=\"#fff\" d=\"M6.5 6.5h4.4c2.3 0 3.6 1.2 3.6 3.1s-1.3 3.1-3.6 3.1H9v2H6.5zM9 8.4v2.4h1.6c.8 0 1.2-.4 1.2-1.2s-.4-1.2-1.2-1.2z\"/>',\n 'python': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F2F4F7\" stroke=\"#D5DBE5\" stroke-width=\".5\"/><g transform=\"matrix(.126 0 0 .126 2.30 2.24)\"><path fill=\"#3776AB\" d=\"M 60.510156,6.3979729 C 55.926503,6.4192712 51.549217,6.8101906 47.697656,7.4917229 C 36.35144,9.4962267 34.291407,13.691825 34.291406,21.429223 L 34.291406,31.647973 L 61.103906,31.647973 L 61.103906,35.054223 L 34.291406,35.054223 L 24.228906,35.054223 C 16.436447,35.054223 9.6131468,39.73794 7.4789058,48.647973 C 5.0170858,58.860939 4.9078907,65.233996 7.4789058,75.897973 C 9.3848341,83.835825 13.936449,89.491721 21.728906,89.491723 L 30.947656,89.491723 L 30.947656,77.241723 C 30.947656,68.391821 38.6048,60.585475 47.697656,60.585473 L 74.478906,60.585473 C 81.933857,60.585473 87.885159,54.447309 87.885156,46.960473 L 87.885156,21.429223 C 87.885156,14.162884 81.755176,8.7044455 74.478906,7.4917229 C 69.872919,6.7249976 65.093809,6.3766746 60.510156,6.3979729 z M 46.010156,14.616723 C 48.779703,14.616723 51.041406,16.915369 51.041406,19.741723 C 51.041404,22.558059 48.779703,24.835473 46.010156,24.835473 C 43.23068,24.835472 40.978906,22.558058 40.978906,19.741723 C 40.978905,16.91537 43.23068,14.616723 46.010156,14.616723 z \"/><path fill=\"#FFD43B\" d=\"M 91.228906,35.054223 L 91.228906,46.960473 C 91.228906,56.191228 83.403011,63.960472 74.478906,63.960473 L 47.697656,63.960473 C 40.361823,63.960473 34.291407,70.238956 34.291406,77.585473 L 34.291406,103.11672 C 34.291406,110.38306 40.609994,114.65704 47.697656,116.74172 C 56.184987,119.23733 64.323893,119.68835 74.478906,116.74172 C 81.229061,114.78733 87.885159,110.85411 87.885156,103.11672 L 87.885156,92.897973 L 61.103906,92.897973 L 61.103906,89.491723 L 87.885156,89.491723 L 101.29141,89.491723 C 109.08387,89.491723 111.98766,84.056315 114.69765,75.897973 C 117.49698,67.499087 117.37787,59.422197 114.69765,48.647973 C 112.77187,40.890532 109.09378,35.054223 101.29141,35.054223 L 91.228906,35.054223 z M 76.166406,99.710473 C 78.945884,99.710476 81.197656,101.98789 81.197656,104.80422 C 81.197654,107.63057 78.945881,109.92922 76.166406,109.92922 C 73.396856,109.92922 71.135156,107.63057 71.135156,104.80422 C 71.135158,101.98789 73.396853,99.710473 76.166406,99.710473 z \"/></g>',\n 'r': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#EEF2F6\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#276DC3\" d=\"M12 2.746c-6.627 0-12 3.599-12 8.037 0 3.897 4.144 7.144 9.64 7.88V16.26c-2.924-.915-4.925-2.755-4.925-4.877 0-3.035 4.084-5.494 9.12-5.494 5.038 0 8.757 1.683 8.757 5.494 0 1.976-.999 3.379-2.662 4.272.09.066.174.128.258.216.169.149.25.363.372.544 2.128-1.45 3.44-3.437 3.44-5.631 0-4.44-5.373-8.038-12-8.038zm-2.111 4.99v13.516l4.093-.002-.002-5.291h1.1c.225 0 .321.066.549.25.272.22.715.982.715.982l2.164 4.063 4.627-.002-2.864-4.826s-.086-.193-.265-.383a2.22 2.22 0 00-.582-.416c-.422-.214-1.149-.434-1.149-.434s3.578-.264 3.578-3.826c0-3.562-3.744-3.63-3.744-3.63zm4.127 2.93l2.478.002s1.149-.062 1.149 1.127c0 1.165-1.149 1.17-1.149 1.17h-2.478zm1.754 6.119c-.494.049-1.012.079-1.54.088v1.807a16.622 16.622 0 002.37-.473l-.471-.891s-.108-.183-.248-.394c-.039-.054-.08-.098-.111-.137z\"/></g>',\n 'react': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#20232A\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#61DAFB\" d=\"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z\"/></g>',\n 'ruby': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#FCEDEC\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#CC342D\" d=\"M20.156.083c3.033.525 3.893 2.598 3.829 4.77L24 4.822 22.635 22.71 4.89 23.926h.016C3.433 23.864.15 23.729 0 19.139l1.645-3 2.819 6.586.503 1.172 2.805-9.144-.03.007.016-.03 9.255 2.956-1.396-5.431-.99-3.9 8.82-.569-.615-.51L16.5 2.114 20.159.073l-.003.01zM0 19.089zM5.13 5.073c3.561-3.533 8.157-5.621 9.922-3.84 1.762 1.777-.105 6.105-3.673 9.636-3.563 3.532-8.103 5.734-9.864 3.957-1.766-1.777.045-6.217 3.612-9.75l.003-.003z\"/></g>',\n 'rust': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F3E6DD\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#2B2B2B\" d=\"M23.8346 11.7033l-1.0073-.6236a13.7268 13.7268 0 00-.0283-.2936l.8656-.8069a.3483.3483 0 00-.1154-.578l-1.1066-.414a8.4958 8.4958 0 00-.087-.2856l.6904-.9587a.3462.3462 0 00-.2257-.5446l-1.1663-.1894a9.3574 9.3574 0 00-.1407-.2622l.49-1.0761a.3437.3437 0 00-.0274-.3361.3486.3486 0 00-.3006-.154l-1.1845.0416a6.7444 6.7444 0 00-.1873-.2268l.2723-1.153a.3472.3472 0 00-.417-.4172l-1.1532.2724a14.0183 14.0183 0 00-.2278-.1873l.0415-1.1845a.3442.3442 0 00-.49-.328l-1.076.491c-.0872-.0476-.1742-.0952-.2623-.1407l-.1903-1.1673A.3483.3483 0 0016.256.955l-.9597.6905a8.4867 8.4867 0 00-.2855-.086l-.414-1.1066a.3483.3483 0 00-.5781-.1154l-.8069.8666a9.2936 9.2936 0 00-.2936-.0284L12.2946.1683a.3462.3462 0 00-.5892 0l-.6236 1.0073a13.7383 13.7383 0 00-.2936.0284L9.9803.3374a.3462.3462 0 00-.578.1154l-.4141 1.1065c-.0962.0274-.1903.0567-.2855.086L7.744.955a.3483.3483 0 00-.5447.2258L7.009 2.348a9.3574 9.3574 0 00-.2622.1407l-1.0762-.491a.3462.3462 0 00-.49.328l.0416 1.1845a7.9826 7.9826 0 00-.2278.1873L3.8413 3.425a.3472.3472 0 00-.4171.4171l.2713 1.1531c-.0628.075-.1255.1509-.1863.2268l-1.1845-.0415a.3462.3462 0 00-.328.49l.491 1.0761a9.167 9.167 0 00-.1407.2622l-1.1662.1894a.3483.3483 0 00-.2258.5446l.6904.9587a13.303 13.303 0 00-.087.2855l-1.1065.414a.3483.3483 0 00-.1155.5781l.8656.807a9.2936 9.2936 0 00-.0283.2935l-1.0073.6236a.3442.3442 0 000 .5892l1.0073.6236c.008.0982.0182.1964.0283.2936l-.8656.8079a.3462.3462 0 00.1155.578l1.1065.4141c.0273.0962.0567.1914.087.2855l-.6904.9587a.3452.3452 0 00.2268.5447l1.1662.1893c.0456.088.0922.1751.1408.2622l-.491 1.0762a.3462.3462 0 00.328.49l1.1834-.0415c.0618.0769.1235.1528.1873.2277l-.2713 1.1541a.3462.3462 0 00.4171.4161l1.153-.2713c.075.0638.151.1255.2279.1863l-.0415 1.1845a.3442.3442 0 00.49.327l1.0761-.49c.087.0486.1741.0951.2622.1407l.1903 1.1662a.3483.3483 0 00.5447.2268l.9587-.6904a9.299 9.299 0 00.2855.087l.414 1.1066a.3452.3452 0 00.5781.1154l.8079-.8656c.0972.0111.1954.0203.2936.0294l.6236 1.0073a.3472.3472 0 00.5892 0l.6236-1.0073c.0982-.0091.1964-.0183.2936-.0294l.8069.8656a.3483.3483 0 00.578-.1154l.4141-1.1066a8.4626 8.4626 0 00.2855-.087l.9587.6904a.3452.3452 0 00.5447-.2268l.1903-1.1662c.088-.0456.1751-.0931.2622-.1407l1.0762.49a.3472.3472 0 00.49-.327l-.0415-1.1845a6.7267 6.7267 0 00.2267-.1863l1.1531.2713a.3472.3472 0 00.4171-.416l-.2713-1.1542c.0628-.0749.1255-.1508.1863-.2278l1.1845.0415a.3442.3442 0 00.328-.49l-.49-1.076c.0475-.0872.0951-.1742.1407-.2623l1.1662-.1893a.3483.3483 0 00.2258-.5447l-.6904-.9587.087-.2855 1.1066-.414a.3462.3462 0 00.1154-.5781l-.8656-.8079c.0101-.0972.0202-.1954.0283-.2936l1.0073-.6236a.3442.3442 0 000-.5892zm-6.7413 8.3551a.7138.7138 0 01.2986-1.396.714.714 0 11-.2997 1.396zm-.3422-2.3142a.649.649 0 00-.7715.5l-.3573 1.6685c-1.1035.501-2.3285.7795-3.6193.7795a8.7368 8.7368 0 01-3.6951-.814l-.3574-1.6684a.648.648 0 00-.7714-.499l-1.473.3158a8.7216 8.7216 0 01-.7613-.898h7.1676c.081 0 .1356-.0141.1356-.088v-2.536c0-.074-.0536-.0881-.1356-.0881h-2.0966v-1.6077h2.2677c.2065 0 1.1065.0587 1.394 1.2088.0901.3533.2875 1.5044.4232 1.8729.1346.413.6833 1.2381 1.2685 1.2381h3.5716a.7492.7492 0 00.1296-.0131 8.7874 8.7874 0 01-.8119.9526zM6.8369 20.024a.714.714 0 11-.2997-1.396.714.714 0 01.2997 1.396zM4.1177 8.9972a.7137.7137 0 11-1.304.5791.7137.7137 0 011.304-.579zm-.8352 1.9813l1.5347-.6824a.65.65 0 00.33-.8585l-.3158-.7147h1.2432v5.6025H3.5669a8.7753 8.7753 0 01-.2834-3.348zm6.7343-.5437V8.7836h2.9601c.153 0 1.0792.1772 1.0792.8697 0 .575-.7107.7815-1.2948.7815zm10.7574 1.4862c0 .2187-.008.4363-.0243.651h-.9c-.09 0-.1265.0586-.1265.1477v.413c0 .973-.5487 1.1846-1.0296 1.2382-.4576.0517-.9648-.1913-1.0275-.4717-.2704-1.5186-.7198-1.8436-1.4305-2.4034.8817-.5599 1.799-1.386 1.799-2.4915 0-1.1936-.819-1.9458-1.3769-2.3153-.7825-.5163-1.6491-.6195-1.883-.6195H5.4682a8.7651 8.7651 0 014.907-2.7699l1.0974 1.151a.648.648 0 00.9182.0213l1.227-1.1743a8.7753 8.7753 0 016.0044 4.2762l-.8403 1.8982a.652.652 0 00.33.8585l1.6178.7188c.0283.2875.0425.577.0425.8717zm-9.3006-9.5993a.7128.7128 0 11.984 1.0316.7137.7137 0 01-.984-1.0316zm8.3389 6.71a.7107.7107 0 01.9395-.3625.7137.7137 0 11-.9405.3635z\"/></g>',\n 'scala': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#FCECEB\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#DC322F\" d=\"M4.589 24c4.537 0 13.81-1.516 14.821-3v-5.729c-.957 1.408-10.284 2.912-14.821 2.912V24zM4.589 16.365c4.537 0 13.81-1.516 14.821-3V7.636c-.957 1.408-10.284 2.912-14.821 2.912v5.817zM4.589 8.729c4.537 0 13.81-1.516 14.821-3V0C18.453 1.408 9.126 2.912 4.589 2.912v5.817z\"/></g>',\n 'shell': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#303642\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#7EE787\" d=\"M21.038,4.9l-7.577-4.498C13.009,0.134,12.505,0,12,0c-0.505,0-1.009,0.134-1.462,0.403L2.961,4.9 C2.057,5.437,1.5,6.429,1.5,7.503v8.995c0,1.073,0.557,2.066,1.462,2.603l7.577,4.497C10.991,23.866,11.495,24,12,24 c0.505,0,1.009-0.134,1.461-0.402l7.577-4.497c0.904-0.537,1.462-1.529,1.462-2.603V7.503C22.5,6.429,21.943,5.437,21.038,4.9z M15.17,18.946l0.013,0.646c0.001,0.078-0.05,0.167-0.111,0.198l-0.383,0.22c-0.061,0.031-0.111-0.007-0.112-0.085L14.57,19.29 c-0.328,0.136-0.66,0.169-0.872,0.084c-0.04-0.016-0.057-0.075-0.041-0.142l0.139-0.584c0.011-0.046,0.036-0.092,0.069-0.121 c0.012-0.011,0.024-0.02,0.036-0.026c0.022-0.011,0.043-0.014,0.062-0.006c0.229,0.077,0.521,0.041,0.802-0.101 c0.357-0.181,0.596-0.545,0.592-0.907c-0.003-0.328-0.181-0.465-0.613-0.468c-0.55,0.001-1.064-0.107-1.072-0.917 c-0.007-0.667,0.34-1.361,0.889-1.8l-0.007-0.652c-0.001-0.08,0.048-0.168,0.111-0.2l0.37-0.236 c0.061-0.031,0.111,0.007,0.112,0.087l0.006,0.653c0.273-0.109,0.511-0.138,0.726-0.088c0.047,0.012,0.067,0.076,0.048,0.151 l-0.144,0.578c-0.011,0.044-0.036,0.088-0.065,0.116c-0.012,0.012-0.025,0.021-0.038,0.028c-0.019,0.01-0.038,0.013-0.057,0.009 c-0.098-0.022-0.332-0.073-0.699,0.113c-0.385,0.195-0.52,0.53-0.517,0.778c0.003,0.297,0.155,0.387,0.681,0.396 c0.7,0.012,1.003,0.318,1.01,1.023C16.105,17.747,15.736,18.491,15.17,18.946z M19.143,17.859c0,0.06-0.008,0.116-0.058,0.145 l-1.916,1.164c-0.05,0.029-0.09,0.004-0.09-0.056v-0.494c0-0.06,0.037-0.093,0.087-0.122l1.887-1.129 c0.05-0.029,0.09-0.004,0.09,0.056V17.859z M20.459,6.797l-7.168,4.427c-0.894,0.523-1.553,1.109-1.553,2.187v8.833 c0,0.645,0.26,1.063,0.66,1.184c-0.131,0.023-0.264,0.039-0.398,0.039c-0.42,0-0.833-0.114-1.197-0.33L3.226,18.64 c-0.741-0.44-1.201-1.261-1.201-2.142V7.503c0-0.881,0.46-1.702,1.201-2.142l7.577-4.498c0.363-0.216,0.777-0.33,1.197-0.33 c0.419,0,0.833,0.114,1.197,0.33l7.577,4.498c0.624,0.371,1.046,1.013,1.164,1.732C21.686,6.557,21.12,6.411,20.459,6.797z\"/></g>',\n 'solidity': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F0F0F0\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#363636\" d=\"M4.409 6.608L7.981.255l3.572 6.353H4.409zM8.411 0l3.569 6.348L15.552 0H8.411zm4.036 17.392l3.572 6.354 3.575-6.354h-7.147zm-.608-10.284h-7.43l3.715 6.605 3.715-6.605zm.428-.25h7.428L15.982.255l-3.715 6.603zM15.589 24l-3.569-6.349L8.448 24h7.141zm-3.856-6.858H4.306l3.712 6.603 3.715-6.603zm.428-.25h7.433l-3.718-6.605-3.715 6.605z\"/></g>',\n 'sql': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#336791\"/><ellipse cx=\"10\" cy=\"5.5\" rx=\"5.8\" ry=\"2.1\" fill=\"#fff\"/><path fill=\"#fff\" fill-opacity=\".88\" d=\"M4.2 5.5v8.9c0 1.2 2.6 2.1 5.8 2.1s5.8-.9 5.8-2.1V5.5c0 1.2-2.6 2.1-5.8 2.1s-5.8-.9-5.8-2.1z\"/><path d=\"M4.2 9.2c0 1.2 2.6 2.1 5.8 2.1s5.8-.9 5.8-2.1M4.2 12.9c0 1.2 2.6 2.1 5.8 2.1s5.8-.9 5.8-2.1\" fill=\"none\" stroke=\"#336791\" stroke-opacity=\".7\" stroke-width=\".7\"/>',\n 'svelte': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#FFF0EB\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#FF3E00\" d=\"M10.354 21.125a4.44 4.44 0 0 1-4.765-1.767 4.109 4.109 0 0 1-.703-3.107 3.898 3.898 0 0 1 .134-.522l.105-.321.287.21a7.21 7.21 0 0 0 2.186 1.092l.208.063-.02.208a1.253 1.253 0 0 0 .226.83 1.337 1.337 0 0 0 1.435.533 1.231 1.231 0 0 0 .343-.15l5.59-3.562a1.164 1.164 0 0 0 .524-.778 1.242 1.242 0 0 0-.211-.937 1.338 1.338 0 0 0-1.435-.533 1.23 1.23 0 0 0-.343.15l-2.133 1.36a4.078 4.078 0 0 1-1.135.499 4.44 4.44 0 0 1-4.765-1.766 4.108 4.108 0 0 1-.702-3.108 3.855 3.855 0 0 1 1.742-2.582l5.589-3.563a4.072 4.072 0 0 1 1.135-.499 4.44 4.44 0 0 1 4.765 1.767 4.109 4.109 0 0 1 .703 3.107 3.943 3.943 0 0 1-.134.522l-.105.321-.286-.21a7.204 7.204 0 0 0-2.187-1.093l-.208-.063.02-.207a1.255 1.255 0 0 0-.226-.831 1.337 1.337 0 0 0-1.435-.532 1.231 1.231 0 0 0-.343.15L8.62 9.368a1.162 1.162 0 0 0-.524.778 1.24 1.24 0 0 0 .211.937 1.338 1.338 0 0 0 1.435.533 1.235 1.235 0 0 0 .344-.151l2.132-1.36a4.067 4.067 0 0 1 1.135-.498 4.44 4.44 0 0 1 4.765 1.766 4.108 4.108 0 0 1 .702 3.108 3.857 3.857 0 0 1-1.742 2.583l-5.589 3.562a4.072 4.072 0 0 1-1.135.499m10.358-17.95C18.484-.015 14.082-.96 10.9 1.068L5.31 4.63a6.412 6.412 0 0 0-2.896 4.295 6.753 6.753 0 0 0 .666 4.336 6.43 6.43 0 0 0-.96 2.396 6.833 6.833 0 0 0 1.168 5.167c2.229 3.19 6.63 4.135 9.812 2.108l5.59-3.562a6.41 6.41 0 0 0 2.896-4.295 6.756 6.756 0 0 0-.665-4.336 6.429 6.429 0 0 0 .958-2.396 6.831 6.831 0 0 0-1.167-5.168Z\"/></g>',\n 'swift': '<defs><clipPath id=\"__DSH_CODE_ICON_INSTANCE__a\"><rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\"/></clipPath></defs><g clip-path=\"url(#__DSH_CODE_ICON_INSTANCE__a)\"><svg x=\"1\" y=\"1\" width=\"18\" height=\"18\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#f05138\" d=\"M126.33 34.06a39.32 39.32 0 00-.79-7.83 28.78 28.78 0 00-2.65-7.58 28.84 28.84 0 00-4.76-6.32 23.42 23.42 0 00-6.62-4.55 27.27 27.27 0 00-7.68-2.53c-2.65-.51-5.56-.51-8.21-.76H30.25a45.46 45.46 0 00-6.09.51 21.82 21.82 0 00-5.82 1.52c-.53.25-1.32.51-1.85.76a33.82 33.82 0 00-5 3.28c-.53.51-1.06.76-1.59 1.26a22.41 22.41 0 00-4.76 6.32 23.61 23.61 0 00-2.65 7.58 78.5 78.5 0 00-.79 7.83v60.39a39.32 39.32 0 00.79 7.83 28.78 28.78 0 002.65 7.58 28.84 28.84 0 004.76 6.32 23.42 23.42 0 006.62 4.55 27.27 27.27 0 007.68 2.53c2.65.51 5.56.51 8.21.76h63.22a45.08 45.08 0 008.21-.76 27.27 27.27 0 007.68-2.53 30.13 30.13 0 006.62-4.55 22.41 22.41 0 004.76-6.32 23.61 23.61 0 002.65-7.58 78.49 78.49 0 00.79-7.83V34.06z\"/><path fill=\"#fefefe\" d=\"M85 96.5c-11.11 6.13-26.38 6.76-41.75.47A64.53 64.53 0 0113.84 73a50 50 0 0010.85 6.32c15.87 7.1 31.73 6.61 42.9 0-15.9-11.66-29.4-26.82-39.46-39.2a43.47 43.47 0 01-5.29-6.82c12.16 10.61 31.5 24 38.38 27.79a271.77 271.77 0 01-27-32.34 266.8 266.8 0 0044.47 34.87c.71.38 1.26.7 1.7 1a32.7 32.7 0 001.21-3.51c3.71-12.89-.53-27.54-9.79-39.67C93.25 33.81 106 57.05 100.66 76.51c-.14.53-.29 1-.45 1.55l.19.22c10.59 12.63 7.68 26 6.35 23.5C101 91 90.37 94.33 85 96.5z\"/></svg></g>',\n 'toml': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#F6EEEA\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#9C4121\" d=\"M.014 0h5.34v2.652H2.888v18.681h2.468V24H.015V0Zm17.622 5.049v2.78h-4.274v12.935h-3.008V7.83H6.059V5.05h11.577ZM23.986 24h-5.34v-2.652h2.467V2.667h-2.468V0h5.34v24Z\"/></g>',\n 'typescript': '<defs><clipPath id=\"__DSH_CODE_ICON_INSTANCE__a\"><rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\"/></clipPath></defs><g clip-path=\"url(#__DSH_CODE_ICON_INSTANCE__a)\"><svg x=\"1\" y=\"1\" width=\"18\" height=\"18\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#fff\" d=\"M22.67 47h99.67v73.67H22.67z\"/><path data-name=\"original\" fill=\"#007acc\" d=\"M1.5 63.91v62.5h125v-125H1.5zm100.73-5a15.56 15.56 0 017.82 4.5 20.58 20.58 0 013 4c0 .16-5.4 3.81-8.69 5.85-.12.08-.6-.44-1.13-1.23a7.09 7.09 0 00-5.87-3.53c-3.79-.26-6.23 1.73-6.21 5a4.58 4.58 0 00.54 2.34c.83 1.73 2.38 2.76 7.24 4.86 8.95 3.85 12.78 6.39 15.16 10 2.66 4 3.25 10.46 1.45 15.24-2 5.2-6.9 8.73-13.83 9.9a38.32 38.32 0 01-9.52-.1 23 23 0 01-12.72-6.63c-1.15-1.27-3.39-4.58-3.25-4.82a9.34 9.34 0 011.15-.73L82 101l3.59-2.08.75 1.11a16.78 16.78 0 004.74 4.54c4 2.1 9.46 1.81 12.16-.62a5.43 5.43 0 00.69-6.92c-1-1.39-3-2.56-8.59-5-6.45-2.78-9.23-4.5-11.77-7.24a16.48 16.48 0 01-3.43-6.25 25 25 0 01-.22-8c1.33-6.23 6-10.58 12.82-11.87a31.66 31.66 0 019.49.26zm-29.34 5.24v5.12H56.66v46.23H45.15V69.26H28.88v-5a49.19 49.19 0 01.12-5.17C29.08 59 39 59 51 59h21.83z\"/></svg></g>',\n 'vue': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#ECF8F3\" stroke=\"#D5EAE0\" stroke-width=\".5\"/><path fill=\"#41B883\" d=\"M3.5 5h3.2l3.3 5.7L13.3 5h3.2L10 16z\"/><path fill=\"#35495E\" d=\"M6.7 5H9l1 1.8L11 5h2.3L10 10.7z\"/>',\n 'wasm': '<defs><clipPath id=\"__DSH_CODE_ICON_INSTANCE__a\"><rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\"/></clipPath></defs><g clip-path=\"url(#__DSH_CODE_ICON_INSTANCE__a)\"><svg x=\"1\" y=\"1\" width=\"18\" height=\"18\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#654ff0\" d=\"M.223.222v127.555h127.555V.222H78.594c.014.227.036.455.036.686 0 8.08-6.55 14.626-14.63 14.626-8.078 0-14.625-6.546-14.625-14.626 0-.231.022-.459.031-.686zm29.595 68.746h8.445l5.782 30.738h.107l6.968-30.738h7.908l6.265 31.119h.106l6.597-31.119h8.284l-10.765 45.156H61.12l-6.213-30.738H54.8l-6.7 30.738h-8.557zm59.994 0h13.334l13.284 45.156h-8.77l-2.879-10.051H89.59l-2.212 10.05h-8.5ZM94.895 80.1l-3.684 16.57h11.473L98.448 80.1Z\"/></svg></g>',\n 'xml': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#EAF3FA\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#005FAD\" d=\"M4.345 7.053c-.495.02-.44.725-.536 1.081-.157.583-.3 1.325-.347 1.926-.046.585-.008 1.127.066 1.719.058.46.191.767.07.89-.108.11-3.216 2.962-3.466 3.123-.26.169-.08.584.069.817.157.246.23.373.557.33.306-.042.405-.409.583-.606.228-.252 2.421-2.401 2.616-2.401.077.544.367 1.064.67 1.513.15.222.314.439.505.629.175.175.4.317.587.45.44.024.795-.301.35-.67-.17-.14-.735-.971-.927-1.43-.18-.43-.574-1.076-.146-1.428 1.494-1.23 3.72-2.262 4.247-2.313-.257 1.024-1.356 3.048-1.757 4.012-.14.333-.231.732-.185 1.094.055.434.383.774.587.806.417-.023.7-.387.946-.645.343-.357.634-.685.974-1.043.339-.356.672-.731.971-1.07.184-.207.674-.713.963-.713-.11.693-.716 1.552-.839 2.254-.125.716.531 1.596 1.217.956.623-.58 1.255-1.129 1.867-1.72.217-.208.175.037.224.242.05.208.176.91.275 1.1.18.346.496.592.897.598.362.006.727-.161.982-.414.19-.187.513-.699.154-.832-.23-.086-.217-.176-.495-.129-.172.029-.362.074-.507.179-.367-.003-.381-.89-.324-1.161.068-.327.207-.659.185-.998-.026-.418-.478-.69-.582-.72-.156-.076-.253.023-.458.212-.173.161-.363.332-.535.495-.34.322-.768.813-.942.813.305-.705.708-2.652-.643-2.48-.563.071-.95.377-1.394.71-.29.28-.683.641-.936.87-.236.216-.371.404-.496.404.132-.747 1.685-3.167.885-3.853-.158-.136-.313-.325-.515-.349a4.637 4.637 0 0 0-.833.19c-.565.18-2.78 1.28-4.19 2.289-.131.094-.214-.085-.231-.29-.087-1.058.199-2.19.496-3.188.208-.696-.557-1.225-.659-1.249zm18.177.874c-.166.364-.2.894-.248 1.319a24.307 24.307 0 0 0-1.246-.115c.238.296.691.588 1.056.724-.048.366-.434.67-.599 1.021.458-.127.676-.47.989-.821.362.22.791.627 1.26.636-.177-.376-.334-.695-.658-.966.269-.175.717-.362.924-.633-.345-.074-.718-.093-1.052-.015-.258-.284-.3-.772-.426-1.15zm-2.92.079c-.23.02-.613.49-.832.773-.807 1.039-1.542 3.15-1.661 3.542-.363 1.195-.502 2.672.28 3.722.456.612 1.258.66 2.041.434.405-.116.812-.406.95-.723.114-.263.174-.753-.404-.38-.224.145-.634.304-1.37.291-.247-.004-.651-.357-.76-.722-.192-.595-.11-1.393-.11-1.393.167-1.028.642-2.146 1.061-3.076.163-.36.658-1.259.842-1.546 0 0 .239-.373.131-.77-.031-.116-.091-.16-.168-.152zm3.072 2.976c-.12.264-.144.648-.18.956-.274-.031-.63-.066-.904-.083.172.215.501.426.766.525-.034.265-.314.486-.434.741.332-.092.49-.34.717-.596.263.16.575.456.914.462-.127-.273-.242-.504-.477-.701.195-.127.52-.262.67-.46a1.77 1.77 0 0 0-.763-.01c-.187-.206-.217-.56-.309-.834zm-1.123 2.422c-.083.183-.1.449-.125.662a12.6 12.6 0 0 0-.624-.058c.119.148.346.295.53.363-.025.184-.219.336-.301.513.23-.064.339-.236.496-.413.181.11.397.316.632.32-.088-.19-.168-.349-.33-.485.135-.087.36-.181.463-.317a1.22 1.22 0 0 0-.527-.008c-.13-.142-.151-.387-.214-.576z\"/></g>',\n 'yaml': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#FCEEEF\" stroke=\"#F0D8DB\" stroke-width=\".5\"/><svg x=\"2.75\" y=\"2.75\" width=\"14.5\" height=\"14.5\" viewBox=\"0 0 128 128\" preserveAspectRatio=\"xMidYMid meet\">\\n<polygon transform=\"matrix(.24805 0 0 .24805 .5 5.6287)\" points=\"87.702 137.67 0 0 63.25 0 119.02 88.646 175.24 0 235.79 0 143.98 137.67 143.98 224.95 87.702 224.95\"/>\\n<path d=\"m82.428 49.149h-25.266l-5.1388 12.408h-11.188l23.659-55.798h11.444l22.699 55.798h-11.956l-4.2525-12.408zm-4.197-11.14-7.7455-20.476-8.6412 20.476z\" fill=\"#cb171e\"/>\\n<polygon transform=\"matrix(.24805 0 0 .24805 .5 5.6287)\" points=\"87.701 250.18 87.701 470.65 135 470.65 135 318.57 184.51 420.79 221.74 420.79 272.94 314.98 272.94 470.6 318.32 470.6 318.32 250.18 256.36 250.18 201.38 349.88 149.02 250.18\"/>\\n<polygon transform=\"matrix(.24805 0 0 .24805 .5 5.6287)\" points=\"512 422.74 512 422.74 395.64 422.74 395.64 250.12 347.44 250.12 347.44 469.65 512 469.65\"/>\\n</svg>',\n 'zig': '<rect x=\"1\" y=\"1\" width=\"18\" height=\"18\" rx=\"4\" fill=\"#FFF4DF\" stroke=\"#DDE2E8\" stroke-width=\".5\"/><g transform=\"translate(3 3) scale(.5833333333)\"><path fill=\"#E18A00\" d=\"m23.53 1.02-7.686 3.45h-7.06l-2.98 3.452h7.173L.47 22.98l7.681-3.607h7.065v-.002l2.978-3.45-7.148-.001 12.482-14.9zM0 4.47v14.901h1.883l2.98-3.45H3.451v-8h.942l2.824-3.45H0zm22.117 0-2.98 3.608h1.412v7.844h-.942l-2.98 3.45H24V4.47h-1.883z\"/></g>',\n}) satisfies Readonly<Record<CodeFileType, string>>\n","import { useId } from 'react'\nimport type { ReactNode } from 'react'\nimport type { IconProps } from './icons/props.ts'\nimport type { CodeFileType } from './code-file-types.ts'\nimport { CODE_FILE_ARTWORK, CODE_FILE_ICON_ID_TOKEN } from './code-file-icon-artwork.ts'\n\n/**\n * Render one full-color square code-file glyph from the embedded icon set.\n * @param props - Detailed code type, optional size, and optional CSS class.\n * @returns The selected decorative SVG with its identifying palette intact.\n */\nexport function CodeFileIcon({ type, size = 20, className }: IconProps & { readonly type: CodeFileType }): ReactNode {\n const instanceId = `dsh-code-icon-${useId().replaceAll(':', '')}`\n const artwork = CODE_FILE_ARTWORK[type].replaceAll(CODE_FILE_ICON_ID_TOKEN, instanceId)\n // Package tests reject unsafe markup and invalid local references in this\n // static table. Per-instance ids keep gradients and clip paths independent.\n return (\n <svg\n width={size}\n height={size}\n className={className}\n viewBox=\"0 0 20 20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden\n dangerouslySetInnerHTML={{ __html: artwork }}\n />\n )\n}\n","/** Code and configuration categories with embedded full-color glyphs. */\nexport const CODE_FILE_TYPES = [\n 'angular',\n 'c',\n 'clojure',\n 'cmake',\n 'cpp',\n 'csharp',\n 'css',\n 'dart',\n 'docker',\n 'elixir',\n 'env',\n 'erlang',\n 'flutter',\n 'git',\n 'go',\n 'graphql',\n 'haskell',\n 'ini',\n 'java',\n 'javascript',\n 'json',\n 'kotlin',\n 'lua',\n 'makefile',\n 'node',\n 'objective-c',\n 'perl',\n 'php',\n 'powershell',\n 'protobuf',\n 'python',\n 'r',\n 'react',\n 'ruby',\n 'rust',\n 'scala',\n 'shell',\n 'solidity',\n 'sql',\n 'svelte',\n 'swift',\n 'toml',\n 'typescript',\n 'vue',\n 'wasm',\n 'xml',\n 'yaml',\n 'zig',\n] as const\n\n/** A code or configuration file category with its own full-color square glyph. */\nexport type CodeFileType = typeof CODE_FILE_TYPES[number]\n\n/** Optional project files used by context-sensitive code-icon rules. */\nexport interface FileTypeProjectContext {\n /** Text content keyed by project-relative or basename path. */\n readonly files: Readonly<Record<string, string | undefined>>\n}\n\nconst CODE_FILE_TYPE_SET = new Set<string>(CODE_FILE_TYPES)\n\n// Maps, not objects: a basename or extension equal to an `Object.prototype` key\n// (`constructor`, `__proto__`) must miss instead of resolving the inherited member.\nconst FILE_NAME_TYPES: ReadonlyMap<string, CodeFileType> = new Map(Object.entries({\n '.bash_profile': 'shell',\n '.bashrc': 'shell',\n '.env': 'env',\n '.gitattributes': 'git',\n '.gitconfig': 'git',\n '.gitignore': 'git',\n '.gitmodules': 'git',\n '.mailmap': 'git',\n '.profile': 'shell',\n '.zprofile': 'shell',\n '.zshrc': 'shell',\n 'bsdmakefile': 'makefile',\n 'cmakelists.txt': 'cmake',\n 'commit_editmsg': 'git',\n 'compose.yaml': 'docker',\n 'compose.yml': 'docker',\n 'docker-compose.yaml': 'docker',\n 'docker-compose.yml': 'docker',\n 'dockerfile': 'docker',\n 'gemfile': 'ruby',\n 'gnumakefile': 'makefile',\n 'guardfile': 'ruby',\n 'makefile': 'makefile',\n 'npm-shrinkwrap.json': 'node',\n 'package-lock.json': 'node',\n 'package.json': 'node',\n 'podfile': 'ruby',\n 'rakefile': 'ruby',\n}))\n\nconst FILE_NAME_PREFIX_TYPES: readonly (readonly [string, CodeFileType])[] = [\n ['dockerfile.', 'docker'],\n ['.env.', 'env'],\n]\n\nconst FILE_NAME_SUFFIX_TYPES: readonly (readonly [string, CodeFileType])[] = [\n ['.component.ts', 'angular'],\n ['.component.html', 'angular'],\n ['.directive.ts', 'angular'],\n ['.service.ts', 'angular'],\n ['.module.ts', 'angular'],\n ['.pipe.ts', 'angular'],\n ['.guard.ts', 'angular'],\n ['.interceptor.ts', 'angular'],\n ['.dockerfile', 'docker'],\n]\n\nconst EXTENSION_TYPES: ReadonlyMap<string, CodeFileType> = new Map(Object.entries({\n 'bash': 'shell',\n 'c': 'c',\n 'c++': 'cpp',\n 'cc': 'cpp',\n 'cfg': 'ini',\n 'cjs': 'javascript',\n 'clj': 'clojure',\n 'cljc': 'clojure',\n 'cljs': 'clojure',\n 'cmake': 'cmake',\n 'cpp': 'cpp',\n 'cs': 'csharp',\n 'csh': 'shell',\n 'css': 'css',\n 'csx': 'csharp',\n 'cts': 'typescript',\n 'cxx': 'cpp',\n 'dart': 'dart',\n 'dtd': 'xml',\n 'edn': 'clojure',\n 'env': 'env',\n 'erl': 'erlang',\n 'es6': 'javascript',\n 'escript': 'erlang',\n 'ex': 'elixir',\n 'exs': 'elixir',\n 'fish': 'shell',\n 'gemspec': 'ruby',\n 'go': 'go',\n 'gql': 'graphql',\n 'graphql': 'graphql',\n 'h': 'c',\n 'h++': 'cpp',\n 'hh': 'cpp',\n 'hpp': 'cpp',\n 'hrl': 'erlang',\n 'hs': 'haskell',\n 'hxx': 'cpp',\n 'ini': 'ini',\n 'ipp': 'cpp',\n 'java': 'java',\n 'js': 'javascript',\n 'json': 'json',\n 'json5': 'json',\n 'jsonc': 'json',\n 'jsx': 'react',\n 'ksh': 'shell',\n 'kt': 'kotlin',\n 'kts': 'kotlin',\n 'lhs': 'haskell',\n 'lua': 'lua',\n 'm': 'objective-c',\n 'mak': 'makefile',\n 'mjs': 'javascript',\n 'mk': 'makefile',\n 'mm': 'objective-c',\n 'mts': 'typescript',\n 'node': 'node',\n 'pch': 'objective-c',\n 'php': 'php',\n 'php3': 'php',\n 'php4': 'php',\n 'php5': 'php',\n 'phps': 'php',\n 'phtml': 'php',\n 'pl': 'perl',\n 'plist': 'xml',\n 'pm': 'perl',\n 'pod': 'perl',\n 'proto': 'protobuf',\n 'ps1': 'powershell',\n 'psd1': 'powershell',\n 'psm1': 'powershell',\n 'py': 'python',\n 'pyi': 'python',\n 'pyw': 'python',\n 'pyx': 'python',\n 'r': 'r',\n 'rake': 'ruby',\n 'rb': 'ruby',\n 'rmd': 'r',\n 'rs': 'rust',\n 'sc': 'scala',\n 'scala': 'scala',\n 'sh': 'shell',\n 'sol': 'solidity',\n 'sql': 'sql',\n 'svelte': 'svelte',\n 'swift': 'swift',\n 't': 'perl',\n 'tcsh': 'shell',\n 'toml': 'toml',\n 'tpp': 'cpp',\n 'ts': 'typescript',\n 'tsx': 'react',\n 'vue': 'vue',\n 'wasm': 'wasm',\n 'wast': 'wasm',\n 'wat': 'wasm',\n 'xml': 'xml',\n 'xsd': 'xml',\n 'xsl': 'xml',\n 'xslt': 'xml',\n 'yaml': 'yaml',\n 'yml': 'yaml',\n 'zig': 'zig',\n 'zsh': 'shell',\n}))\n\nconst LINK_CODE_EXTENSIONS = new Set([\n 'ts',\n 'tsx',\n 'js',\n 'jsx',\n 'mjs',\n 'cjs',\n 'cts',\n 'mts',\n 'css',\n 'scss',\n 'sass',\n 'less',\n 'html',\n 'htm',\n 'vue',\n 'svelte',\n 'astro',\n 'json',\n 'jsonc',\n 'json5',\n 'yaml',\n 'yml',\n 'toml',\n 'xml',\n 'ini',\n 'env',\n 'sh',\n 'bash',\n 'zsh',\n 'fish',\n 'ps1',\n 'bat',\n 'cmd',\n 'py',\n 'pyi',\n 'rb',\n 'rs',\n 'go',\n 'java',\n 'kt',\n 'kts',\n 'c',\n 'cc',\n 'cpp',\n 'cxx',\n 'h',\n 'hh',\n 'hpp',\n 'cs',\n 'php',\n 'swift',\n 'sql',\n 'proto',\n 'graphql',\n 'gql',\n 'lua',\n 'r',\n 'pl',\n 'scala',\n 'clj',\n 'cljs',\n 'ex',\n 'exs',\n 'erl',\n 'hs',\n 'dart',\n])\n\nfunction basename(path: string): string {\n return path.slice(Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\\\')) + 1)\n}\n\n/**\n * Test whether a resolved file type uses the full-color code-icon set.\n * @param type - Resolved file-type string.\n * @returns Whether the value is a detailed code-file type.\n */\nexport function isCodeFileType(type: string): type is CodeFileType {\n return CODE_FILE_TYPE_SET.has(type)\n}\n\n/**\n * Test whether an extension belongs to the established coarse link-icon code category.\n * @param extension - Extension without a leading dot.\n * @returns Whether clickable links keep the code glyph for this extension.\n */\nexport function isLinkCodeExtension(extension: string): boolean {\n return LINK_CODE_EXTENSIONS.has(extension.toLowerCase())\n}\n\n/**\n * Resolve the most specific code/configuration icon according to the supplied map priority.\n * @param name - Lowercase basename.\n * @param extension - Lowercase extension without the leading dot.\n * @param context - Optional project-file snapshot for context-sensitive matches.\n * @returns The detailed code type, or null when the traditional file classifier owns the path.\n */\nexport function classifyCodeFileType(\n name: string,\n extension: string,\n context?: FileTypeProjectContext,\n): CodeFileType | null {\n const exact = FILE_NAME_TYPES.get(name)\n if (exact !== undefined) return exact\n for (const [prefix, type] of FILE_NAME_PREFIX_TYPES) {\n if (name.startsWith(prefix)) return type\n }\n for (const [suffix, type] of FILE_NAME_SUFFIX_TYPES) {\n if (name.endsWith(suffix)) return type\n }\n if (extension === 'dart' && context !== undefined) {\n const pubspec = Object.entries(context.files).find(([path]) => basename(path).toLowerCase() === 'pubspec.yaml')?.[1]\n if (pubspec?.includes('flutter:') === true) return 'flutter'\n }\n return EXTENSION_TYPES.get(extension) ?? null\n}\n","import type { ReactNode } from 'react'\nimport clsx from 'clsx'\nimport { CodeFileIcon } from './CodeFileIcon.tsx'\nimport {\n classifyCodeFileType, isCodeFileType, type CodeFileType, type FileTypeProjectContext,\n} from './code-file-types.ts'\nimport type { IconProps } from './icons/props.ts'\nimport css from './FileTypeIcon.module.css'\n\n/** File categories with distinct 28px glyphs. */\nexport type FileType =\n | CodeFileType\n | 'code'\n | 'excel'\n | 'folder'\n | 'html'\n | 'image'\n | 'markdown'\n | 'other'\n | 'pdf'\n | 'ppt'\n | 'video'\n | 'word'\n\n/** Compatibility name for consumers that pass an already resolved category. */\nexport type FileTypeKind = FileType\n\ntype ClassifiedFileType = Exclude<FileType, 'folder'>\ntype TraditionalFileType = Exclude<FileType, CodeFileType>\n\nexport type { CodeFileType, FileTypeProjectContext } from './code-file-types.ts'\n\n/** Props for {@link FileTypeIcon}: either a path to classify or an already resolved kind. */\nexport type FileTypeIconProps = IconProps & (\n | {\n /** File path or name to classify. */\n readonly path: string\n /** Optional project-file snapshot for context-sensitive code icons such as Flutter. */\n readonly context?: FileTypeProjectContext | undefined\n }\n | {\n /** Explicit category for callers that already resolved the file type. */\n readonly kind: FileTypeKind\n }\n)\n\n// Maps, not objects: a basename or extension equal to an `Object.prototype` key\n// (`constructor`, `__proto__`) must miss instead of resolving the inherited member.\nconst EXTENSION_TYPES: ReadonlyMap<string, ClassifiedFileType> = new Map(Object.entries({\n scss: 'code',\n sass: 'code',\n less: 'code',\n vue: 'code',\n svelte: 'code',\n astro: 'code',\n bat: 'code',\n cmd: 'code',\n csv: 'excel',\n tsv: 'excel',\n html: 'html',\n htm: 'html',\n png: 'image',\n jpg: 'image',\n jpeg: 'image',\n gif: 'image',\n svg: 'image',\n webp: 'image',\n avif: 'image',\n bmp: 'image',\n ico: 'image',\n tif: 'image',\n tiff: 'image',\n heic: 'image',\n heif: 'image',\n md: 'markdown',\n mdx: 'markdown',\n markdown: 'markdown',\n pdf: 'pdf',\n ppt: 'ppt',\n pptx: 'ppt',\n key: 'ppt',\n mp4: 'video',\n mov: 'video',\n m4v: 'video',\n webm: 'video',\n mkv: 'video',\n avi: 'video',\n mpg: 'video',\n mpeg: 'video',\n doc: 'word',\n docx: 'word',\n rtf: 'word',\n odt: 'word',\n pages: 'word',\n xls: 'excel',\n xlsx: 'excel',\n xlsm: 'excel',\n xlsb: 'excel',\n xlt: 'excel',\n xltx: 'excel',\n xltm: 'excel',\n ods: 'excel',\n ots: 'excel',\n fods: 'excel',\n numbers: 'excel',\n}))\n\nconst NAME_TYPES: ReadonlyMap<string, ClassifiedFileType> = new Map(Object.entries({\n changelog: 'markdown',\n contributing: 'markdown',\n readme: 'markdown',\n}))\n\nfunction basename(path: string): string {\n return path.slice(Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\\\')) + 1)\n}\n\n/**\n * Extract the final suffix from a file path without changing its case.\n * A leading dot starts a suffix, while a missing or trailing dot returns an empty string.\n * @param path - File path or basename using either path separator.\n * @returns The characters after the basename's final dot.\n */\nexport function fileExtension(path: string): string {\n const name = basename(path)\n const dot = name.lastIndexOf('.')\n return dot < 0 ? '' : name.slice(dot + 1)\n}\n\n/**\n * Classify a file path or name for file-card presentation.\n * Matching is case-insensitive and applies code filename rules before extension rules;\n * unknown names fall back to `other`.\n * @param path - File path or basename using either path separator.\n * @param context - Optional project files used by context-sensitive code mappings.\n * @returns The file's closed presentation category.\n */\nexport function classifyFileType(\n path: string,\n context?: FileTypeProjectContext,\n): ClassifiedFileType {\n const name = basename(path).toLowerCase()\n const extension = fileExtension(name).toLowerCase()\n return classifyCodeFileType(name, extension, context)\n ?? NAME_TYPES.get(name)\n ?? EXTENSION_TYPES.get(extension)\n ?? 'other'\n}\n\nconst FILE_BODY = 'M8.48924 28H19.5108C21.6479 28 22.7165 28 23.5594 27.6509C24.6833 27.1853 25.5762 26.2924 26.0417 25.1685C26.3909 24.3256 26.3909 23.257 26.3909 21.1199V8.79443C26.3909 8.32877 26.3909 8.09593 26.3471 7.87507C26.2887 7.58058 26.173 7.30042 26.0067 7.05048C25.882 6.86303 25.7177 6.69799 25.3893 6.36792L20.0611 1.01354C19.7304 0.681235 19.5651 0.515081 19.3769 0.38885C19.126 0.220541 18.8443 0.103463 18.5481 0.0443412C18.3259 0 18.0915 0 17.6226 0H8.48924C6.35209 0 5.28351 0 4.4406 0.349145C3.31672 0.814671 2.4238 1.70759 1.95828 2.83147C1.60913 3.67438 1.60913 4.74296 1.60913 6.88011V21.1199C1.60913 23.257 1.60913 24.3256 1.95828 25.1685C2.4238 26.2924 3.31672 27.1853 4.4406 27.6509C5.28351 28 6.35209 28 8.48924 28Z'\nconst FILE_FOLD = 'M26.3909 7.37445L19.0525 0V3.77445C19.0525 4.89271 19.0525 5.45184 19.2352 5.89289C19.4788 6.48096 19.946 6.94818 20.5341 7.19176C20.9751 7.37445 21.5342 7.37445 22.6525 7.37445H26.3909Z'\nconst FILE_MARK_TRANSFORM = 'translate(14 16) scale(1.12) translate(-14 -16)'\nconst LARGE_FILE_MARK_TRANSFORM = 'translate(14 16) scale(1.22) translate(-14 -16)'\nconst FOLDER_MARK_TRANSFORM = 'translate(14 13.0693) scale(1.12) translate(-14 -13.0693)'\n\nfunction FileGlyph({\n size, className, children, markTransform, muted = false,\n}: IconProps & { children?: ReactNode; markTransform?: string; muted?: boolean }): ReactNode {\n return (\n <svg width={size} height={size} className={className} viewBox=\"0 0 28 28\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden>\n <path d={FILE_BODY} fill=\"currentColor\" />\n {muted\n ? <path d={FILE_FOLD} fill=\"var(--dsw-static-neutral-400)\" />\n : <path d={FILE_FOLD} fill=\"var(--dsw-static-neutral-00)\" fillOpacity=\".7\" />}\n {children !== undefined && (\n <g color=\"var(--dsw-static-neutral-00)\" data-file-type-mark transform={markTransform}>{children}</g>\n )}\n </svg>\n )\n}\n\nfunction FolderGlyph({ size, className }: IconProps): ReactNode {\n return (\n <svg width={size} height={size} className={className} viewBox=\"0 0 28 28\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden>\n <path\n d=\"M2.80078 10.2112C2.80078 9.52802 2.80078 9.18642 2.85314 8.866C2.98648 8.05 3.36942 7.29538 3.94925 6.70595C4.17694 6.4745 4.45264 6.2728 5.00404 5.86939C5.29197 5.65874 5.43594 5.55342 5.58711 5.46632C5.97089 5.24521 6.39638 5.10618 6.83667 5.05803C7.01011 5.03906 7.18849 5.03906 7.54524 5.03906H11.6543C12.4669 5.03906 12.8732 5.03906 13.2599 5.13697C13.3882 5.16945 13.5143 5.20986 13.6375 5.25795C14.0091 5.40294 14.3398 5.63902 15.0012 6.1112L16.2632 7.01224C16.5526 7.21881 16.6972 7.3221 16.8598 7.38553C16.9137 7.40657 16.9689 7.42425 17.025 7.43846C17.1942 7.4813 17.372 7.4813 17.7275 7.4813H19.8008C22.0506 7.4813 23.1755 7.4813 23.9641 8.05425C24.2188 8.23928 24.4428 8.46326 24.6278 8.71794C25.2008 9.50654 25.2008 10.6315 25.2008 12.8813V18.7283C25.2008 20.9781 25.2008 22.1031 24.6278 22.8917C24.4428 23.1463 24.2188 23.3703 23.9641 23.5554C23.1755 24.1283 22.0506 24.1283 19.8008 24.1283H8.20077C5.95094 24.1283 4.82602 24.1283 4.03743 23.5554C3.78274 23.3703 3.55877 23.1463 3.37373 22.8917C2.80078 22.1031 2.80078 20.9781 2.80078 18.7283V10.2112Z\"\n fill=\"currentColor\"\n />\n <g color=\"var(--dsw-static-neutral-00)\" data-file-type-mark transform={FOLDER_MARK_TRANSFORM}>\n <path d=\"M6.31445 13.0693H21.6893\" stroke=\"currentColor\" strokeWidth=\"2.38\" />\n </g>\n </svg>\n )\n}\n\nfunction SpreadsheetGlyph({ size, className }: IconProps): ReactNode {\n return (\n <FileGlyph size={size} className={className}>\n <path\n d=\"M14 11.5H11.4C10.5599 11.5 10.1399 11.5 9.81901 11.6635C9.53677 11.8073 9.3073 12.0368 9.16349 12.319C9 12.6399 9 13.0599 9 13.9V16.5M14 11.5H16.6C17.4401 11.5 17.8601 11.5 18.181 11.6635C18.4632 11.8073 18.6927 12.0368 18.8365 12.319C19 12.6399 19 13.0599 19 13.9V16.5M14 11.5V21.5M14 21.5H16.6C17.4401 21.5 17.8601 21.5 18.181 21.3365C18.4632 21.1927 18.6927 20.9632 18.8365 20.681C19 20.3601 19 19.9401 19 19.1V16.5M14 21.5H11.4C10.5599 21.5 10.1399 21.5 9.81901 21.3365C9.53677 21.1927 9.3073 20.9632 9.16349 20.681C9 20.3601 9 19.9401 9 19.1V16.5M19 16.5H9\"\n stroke=\"currentColor\"\n strokeWidth=\"1.2\"\n />\n </FileGlyph>\n )\n}\n\nfunction glyph(type: TraditionalFileType, size: number, className: string | undefined): ReactNode {\n switch (type) {\n case 'code':\n return (\n <FileGlyph size={size} className={className}>\n <path d=\"M10.0053 13.126L7.0236 16.3788C6.96052 16.4476 6.96052 16.5532 7.0236 16.622L10.0053 19.8748\" stroke=\"currentColor\" strokeWidth=\"1.35\" />\n <path d=\"M17.9941 13.126L20.9759 16.3788C21.039 16.4476 21.039 16.5532 20.9759 16.622L17.9941 19.8748\" stroke=\"currentColor\" strokeWidth=\"1.35\" />\n <path d=\"M15.2652 12.957L12.7344 20.0433\" stroke=\"currentColor\" strokeWidth=\"1.35\" />\n </FileGlyph>\n )\n case 'excel': return <SpreadsheetGlyph size={size} className={className} />\n case 'folder': return <FolderGlyph size={size} className={className} />\n case 'html':\n return (\n <FileGlyph size={size} className={className} markTransform={FILE_MARK_TRANSFORM}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M13.9994 9.68298C17.212 9.68298 19.8167 12.2872 19.8168 15.4997C19.8168 18.7123 17.2121 21.3171 13.9994 21.3171C10.7869 21.3169 8.18274 18.7122 8.18274 15.4997C8.1829 12.2873 10.787 9.68315 13.9994 9.68298ZM9.26213 16.0247C9.47025 17.9241 10.7936 19.4876 12.5639 20.0463C12.42 19.7977 12.2952 19.5152 12.1879 19.2116C11.885 18.3541 11.693 17.2434 11.6424 16.0247H9.26213ZM16.3565 16.0247C16.3059 17.2434 16.1145 18.3542 15.8116 19.2116C15.7044 19.5151 15.5788 19.7971 15.435 20.0456C17.2054 19.487 18.5293 17.9242 18.7374 16.0247H16.3565ZM12.6938 16.0247C12.7439 17.1459 12.9212 18.1334 13.1784 18.8616C13.332 19.2962 13.503 19.61 13.6686 19.805C13.834 19.9996 13.9473 20.0256 13.9994 20.0258C14.0514 20.0258 14.1651 20.0002 14.331 19.805C14.4966 19.61 14.6676 19.2962 14.8211 18.8616C15.0784 18.1334 15.2557 17.1459 15.3058 16.0247H12.6938ZM13.9994 10.733C13.9473 10.7331 13.834 10.7598 13.6686 10.9545C13.503 11.1494 13.3319 11.4633 13.1784 11.8978C12.903 12.6777 12.7188 13.7545 12.6849 14.9747H15.3147C15.2808 13.7545 15.0966 12.6777 14.8211 11.8978C14.6676 11.4633 14.4965 11.1494 14.331 10.9545C14.1651 10.7593 14.0514 10.733 13.9994 10.733ZM15.5888 11.0051C15.6701 11.1756 15.7444 11.3576 15.8116 11.5478C16.1343 12.4613 16.3308 13.6619 16.3647 14.9747H18.7374C18.5352 13.1307 17.2817 11.6036 15.5888 11.0051ZM12.4101 11.0051C10.7174 11.6037 9.46428 13.1308 9.26213 14.9747H11.6349C11.6688 13.6619 11.8652 12.4613 12.1879 11.5478C12.2551 11.3577 12.3288 11.1756 12.4101 11.0051Z\"\n fill=\"currentColor\"\n />\n </FileGlyph>\n )\n case 'image':\n return (\n <FileGlyph size={size} className={className} markTransform={FILE_MARK_TRANSFORM}>\n <path d=\"M10.4212 15.9204C10.5756 15.6558 10.9579 15.6558 11.1123 15.9204L13.6493 20.2696C13.8048 20.5362 13.6125 20.8711 13.3037 20.8711H8.22974C7.92102 20.8711 7.72868 20.5362 7.88423 20.2696L10.4212 15.9204Z\" fill=\"currentColor\" />\n <path d=\"M15.4981 13.186C15.6505 12.9117 16.0451 12.9117 16.1975 13.186L20.1368 20.2769C20.2849 20.5435 20.0922 20.8711 19.7872 20.8711H11.9084C11.6034 20.8711 11.4107 20.5435 11.5588 20.2769L15.4981 13.186Z\" fill=\"currentColor\" />\n <path d=\"M11.8603 11.3997C11.8603 12.286 11.1418 13.0045 10.2555 13.0045C9.36924 13.0045 8.65076 12.286 8.65076 11.3997C8.65076 10.5134 9.36924 9.79492 10.2555 9.79492C11.1418 9.79492 11.8603 10.5134 11.8603 11.3997Z\" fill=\"currentColor\" />\n </FileGlyph>\n )\n case 'markdown':\n return (\n <FileGlyph size={size} className={className} markTransform={LARGE_FILE_MARK_TRANSFORM}>\n <path d=\"M8.7588 19.5V14.6H9.8998L11.9298 17.932H11.3278L13.3018 14.6H14.4428L14.4568 19.5H13.1828L13.1688 16.539H13.3858L11.9088 19.017H11.2928L9.7738 16.539H10.0398V19.5H8.7588ZM15.4375 19.5V14.6H17.7545C18.2958 14.6 18.7718 14.7003 19.1825 14.901C19.5932 15.1017 19.9128 15.384 20.1415 15.748C20.3748 16.112 20.4915 16.546 20.4915 17.05C20.4915 17.5493 20.3748 17.9833 20.1415 18.352C19.9128 18.716 19.5932 18.9983 19.1825 19.199C18.7718 19.3997 18.2958 19.5 17.7545 19.5H15.4375ZM16.8235 18.394H17.6985C17.9785 18.394 18.2212 18.3427 18.4265 18.24C18.6365 18.1327 18.7998 17.9787 18.9165 17.778C19.0332 17.5727 19.0915 17.33 19.0915 17.05C19.0915 16.7653 19.0332 16.5227 18.9165 16.322C18.7998 16.1213 18.6365 15.9697 18.4265 15.867C18.2212 15.7597 17.9785 15.706 17.6985 15.706H16.8235V18.394Z\" fill=\"currentColor\" />\n </FileGlyph>\n )\n case 'other': return <FileGlyph size={size} className={className} muted />\n case 'pdf':\n return (\n <FileGlyph size={size} className={className} markTransform={LARGE_FILE_MARK_TRANSFORM}>\n <path d=\"M6.80616 19.5V14.6H9.04616C9.49416 14.6 9.87916 14.6723 10.2012 14.817C10.5278 14.9617 10.7798 15.1717 10.9572 15.447C11.1345 15.7177 11.2232 16.0397 11.2232 16.413C11.2232 16.7817 11.1345 17.1013 10.9572 17.372C10.7798 17.6427 10.5278 17.8527 10.2012 18.002C9.87916 18.1467 9.49416 18.219 9.04616 18.219H7.57616L8.19216 17.617V19.5H6.80616ZM8.19216 17.764L7.57616 17.127H8.96216C9.2515 17.127 9.46616 17.064 9.60616 16.938C9.75083 16.812 9.82316 16.637 9.82316 16.413C9.82316 16.1843 9.75083 16.007 9.60616 15.881C9.46616 15.755 9.2515 15.692 8.96216 15.692H7.57616L8.19216 15.055V17.764ZM11.8989 19.5V14.6H14.2159C14.7573 14.6 15.2333 14.7003 15.6439 14.901C16.0546 15.1017 16.3743 15.384 16.6029 15.748C16.8363 16.112 16.9529 16.546 16.9529 17.05C16.9529 17.5493 16.8363 17.9833 16.6029 18.352C16.3743 18.716 16.0546 18.9983 15.6439 19.199C15.2333 19.3997 14.7573 19.5 14.2159 19.5H11.8989ZM13.2849 18.394H14.1599C14.4399 18.394 14.6826 18.3427 14.8879 18.24C15.0979 18.1327 15.2613 17.9787 15.3779 17.778C15.4946 17.5727 15.5529 17.33 15.5529 17.05C15.5529 16.7653 15.4946 16.5227 15.3779 16.322C15.2613 16.1213 15.0979 15.9697 14.8879 15.867C14.6826 15.7597 14.4399 15.706 14.1599 15.706H13.2849V18.394ZM17.6821 19.5V14.6H21.5251V15.671H19.0681V19.5H17.6821ZM18.9701 17.82V16.749H21.2311V17.82H18.9701Z\" fill=\"currentColor\" />\n </FileGlyph>\n )\n case 'ppt':\n return (\n <FileGlyph size={size} className={className} markTransform={LARGE_FILE_MARK_TRANSFORM}>\n <path d=\"M11.0132 20.5V13.5H14.2132C14.8532 13.5 15.4032 13.6033 15.8632 13.81C16.3299 14.0167 16.6899 14.3167 16.9432 14.71C17.1966 15.0967 17.3232 15.5567 17.3232 16.09C17.3232 16.6167 17.1966 17.0733 16.9432 17.46C16.6899 17.8467 16.3299 18.1467 15.8632 18.36C15.4032 18.5667 14.8532 18.67 14.2132 18.67H12.1132L12.9932 17.81V20.5H11.0132ZM12.9932 18.02L12.1132 17.11H14.0932C14.5066 17.11 14.8132 17.02 15.0132 16.84C15.2199 16.66 15.3232 16.41 15.3232 16.09C15.3232 15.7633 15.2199 15.51 15.0132 15.33C14.8132 15.15 14.5066 15.06 14.0932 15.06H12.1132L12.9932 14.15V18.02Z\" fill=\"currentColor\" />\n </FileGlyph>\n )\n case 'video':\n return (\n <FileGlyph size={size} className={className} markTransform={FILE_MARK_TRANSFORM}>\n <path d=\"M17.5 14.634C18.1667 15.0189 18.1667 15.9811 17.5 16.366L11.5 19.8301C10.8333 20.215 10 19.7339 10 18.9641L10 12.0359C10 11.2661 10.8333 10.785 11.5 11.1699L17.5 14.634Z\" fill=\"currentColor\" />\n </FileGlyph>\n )\n case 'word':\n return (\n <FileGlyph size={size} className={className} markTransform={LARGE_FILE_MARK_TRANSFORM}>\n <path d=\"M10.5118 20.5L8.24179 13.5H10.2818L12.1918 19.56H11.1618L13.1718 13.5H14.9918L16.8918 19.56H15.9018L17.8718 13.5H19.7618L17.4918 20.5H15.3718L13.7518 15.35H14.3218L12.6318 20.5H10.5118Z\" fill=\"currentColor\" />\n </FileGlyph>\n )\n /* v8 ignore next -- closed-union backstop; only reached if a type is forged */\n default: return assertNever(type)\n }\n}\n\n/** Closed-union exhaustiveness guard for traditional file artwork. */\n/* v8 ignore next 3 -- only reachable when an untyped caller forges a traditional file type */\nfunction assertNever(value: never): never {\n throw new Error(`unreachable traditional file type: ${String(value)}`)\n}\n\n/**\n * Render a decorative file-type glyph for a path or an explicitly resolved kind.\n * @param props - Path or kind selection, optional project context, size, and CSS class.\n * @returns The category-colored SVG; the caller owns the accessible name and may override\n * the color through `--dsh-file-type-icon-color`.\n */\nexport function FileTypeIcon(props: FileTypeIconProps): ReactNode {\n const { size = 28, className } = props\n const resolvedType = 'path' in props\n ? classifyFileType(props.path, props.context)\n : props.kind\n return isCodeFileType(resolvedType)\n ? <CodeFileIcon type={resolvedType} size={size} className={className} />\n : glyph(resolvedType, size, clsx(css.icon, css[resolvedType], className))\n}\n","/**\n * Site marks for well-known external link hosts. {@link LinkIconMedium} renders one in\n * the leading glyph seat, so a familiar destination leads with its own mark\n * instead of the generic globe. The marks are the `simple-icons` artwork set\n * (CC0-1.0), pinned by this package's dependency on it; each mark takes the\n * link's `currentColor` rather than the brand fill that set records.\n */\nimport type { ReactElement } from 'react'\nimport {\n siAliexpress,\n siApple,\n siBaidu,\n siBilibili,\n siCsdn,\n siDuckduckgo,\n siEbay,\n siFacebook,\n siGithub,\n siGitlab,\n siGoogle,\n siInstagram,\n siJuejin,\n siMdnwebdocs,\n siNetflix,\n siNpm,\n siPypi,\n siQq,\n siQuora,\n siReddit,\n siSinaweibo,\n siSpotify,\n siStackoverflow,\n siTaobao,\n siTelegram,\n siTiktok,\n siV2ex,\n siWechat,\n siWhatsapp,\n siWikipedia,\n siX,\n siYcombinator,\n siYoutube,\n siZhihu,\n} from 'simple-icons'\nimport type { SimpleIcon } from 'simple-icons'\n\n/**\n * Host suffix to site mark, covering the developer sites the transcript\n * usually cites plus the mainstream search, video, social, shopping, and\n * reference sites a general audience links. A host matches a suffix when it\n * equals it or is a subdomain of it, and the longest matching suffix wins, so\n * `weixin.qq.com` keeps WeChat while `qq.com` keeps QQ and `gist.github.com`\n * needs no entry of its own.\n */\nconst SITE_HOSTS: Readonly<Record<string, SimpleIcon>> = {\n 'github.com': siGithub,\n 'github.io': siGithub,\n 'raw.githubusercontent.com': siGithub,\n 'gitlab.com': siGitlab,\n 'npmjs.com': siNpm,\n 'pypi.org': siPypi,\n 'stackoverflow.com': siStackoverflow,\n 'developer.mozilla.org': siMdnwebdocs,\n 'wikipedia.org': siWikipedia,\n 'news.ycombinator.com': siYcombinator,\n 'youtube.com': siYoutube,\n 'youtu.be': siYoutube,\n 'x.com': siX,\n 'twitter.com': siX,\n 'bilibili.com': siBilibili,\n 'zhihu.com': siZhihu,\n 'juejin.cn': siJuejin,\n 'csdn.net': siCsdn,\n 'google.com': siGoogle,\n 'baidu.com': siBaidu,\n 'duckduckgo.com': siDuckduckgo,\n 'tiktok.com': siTiktok,\n 'netflix.com': siNetflix,\n 'spotify.com': siSpotify,\n 'facebook.com': siFacebook,\n 'instagram.com': siInstagram,\n 'reddit.com': siReddit,\n 'telegram.org': siTelegram,\n 't.me': siTelegram,\n 'weixin.qq.com': siWechat,\n 'qq.com': siQq,\n 'whatsapp.com': siWhatsapp,\n 'wa.me': siWhatsapp,\n 'weibo.com': siSinaweibo,\n 'taobao.com': siTaobao,\n 'aliexpress.com': siAliexpress,\n 'ebay.com': siEbay,\n 'quora.com': siQuora,\n 'v2ex.com': siV2ex,\n 'apple.com': siApple,\n}\n\n/**\n * Resolve the mark named by an external destination.\n * @param href - The link destination; only an absolute http(s) URL can name a host.\n * @returns The matched site mark, or undefined when the host is unknown or not http(s).\n */\nfunction siteIcon(href: string): SimpleIcon | undefined {\n let host: string\n try {\n const url = new URL(href)\n if (url.protocol !== 'http:' && url.protocol !== 'https:') return undefined\n host = url.hostname.toLowerCase()\n } catch {\n // Not an absolute URL: nothing here can name a host.\n return undefined\n }\n let match: SimpleIcon | undefined\n let matched = 0\n for (const [suffix, icon] of Object.entries(SITE_HOSTS)) {\n if ((host === suffix || host.endsWith(`.${suffix}`)) && suffix.length > matched) {\n match = icon\n matched = suffix.length\n }\n }\n return match\n}\n\n/** Props for {@link siteGlyph}: the destination plus the shared icon sizing seat. */\ninterface SiteGlyphProps {\n /** The link destination; only an absolute http(s) URL can name a host. */\n href: string | undefined\n /** Square edge in px. */\n size: number\n /** Extra class for layout placement. */\n className?: string | undefined\n}\n\n/**\n * Render the site mark for a known external destination.\n * @param props - The destination and the icon sizing seat.\n * @returns The site's mark riding currentColor, or undefined for an unknown site.\n */\nexport function siteGlyph({ href, size, className }: SiteGlyphProps): ReactElement | undefined {\n const icon = href === undefined ? undefined : siteIcon(href)\n if (icon === undefined) return undefined\n return (\n // Simple Icons fill their 24-unit box edge to edge; the -2 inset leaves the\n // same ~8% margin the 20-unit ic_ds_* glyphs draw inside their own box.\n <svg width={size} height={size} className={className} viewBox=\"-2 -2 28 28\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden>\n <path d={icon.path} fill=\"currentColor\" />\n </svg>\n )\n}\n","/**\n * Leading current-color category glyphs for clickable artifact links. The\n * public component keeps individual artwork private to the link vocabulary.\n */\nimport type { ReactNode } from 'react'\nimport { classifyFileType, fileExtension } from './FileTypeIcon.tsx'\nimport { isCodeFileType, isLinkCodeExtension } from './code-file-types.ts'\nimport { siteGlyph } from './SiteGlyph.tsx'\nimport { ICON_MEDIUM_STROKE, ICON_REGULAR_STROKE } from './icons/index.tsx'\nimport type { IconProps } from './icons/props.ts'\nimport { CodeBracketsArtwork, FolderCloseArtwork, GlobeOutlineArtwork } from './icons/shared-artwork.tsx'\n\n/** Link categories with distinct leading glyphs. */\nexport type LinkIconKind = 'url' | 'folder' | 'code' | 'image' | 'document' | 'other'\n\n/** Props for link icons: the category plus the shared icon sizing seat. */\nexport interface LinkIconProps extends IconProps {\n kind: LinkIconKind\n /** Destination of a URL link; known HTTP(S) hosts render their site mark. */\n href?: string | undefined\n}\n\ninterface WeightedLinkIconProps extends LinkIconProps {\n strokeWidth: number\n}\n\n/**\n * Derive a file path's link-icon category from its extension. Unknown and\n * missing extensions fall to `other` (the plain-paper glyph).\n * @param path - File path as the producing tool spelled it (either separator).\n * @returns The file's glyph category; never `url` or `folder`.\n */\nexport function classifyLinkPath(path: string): LinkIconKind {\n const type = classifyFileType(path)\n const extension = fileExtension(path)\n if (isCodeFileType(type)) return isLinkCodeExtension(extension) ? 'code' : 'other'\n if (extension === '') return 'other'\n switch (type) {\n case 'code':\n case 'html': return 'code'\n case 'image': return 'image'\n case 'excel':\n case 'pdf':\n case 'ppt':\n case 'word': return 'document'\n case 'markdown':\n case 'other':\n case 'video': return 'other'\n /* v8 ignore next -- classifyFileType returns a closed union exhausted above */\n default: return assertNever(type)\n }\n}\n\nconst PhotoGlyph = ({ size, className, strokeWidth }: IconProps & { strokeWidth: number }) => (\n <svg width={size} height={size} className={className} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" strokeWidth={strokeWidth}>\n <path d=\"M12.4326 2.38086H3.56763C2.46306 2.38086 1.56763 3.27629 1.56763 4.38086V11.6192C1.56763 12.7237 2.46306 13.6192 3.56763 13.6192H12.4326C13.5372 13.6192 14.4326 12.7237 14.4326 11.6192V4.38086C14.4326 3.27629 13.5372 2.38086 12.4326 2.38086Z\" stroke=\"currentColor\" />\n <path d=\"M10.536 7.03286C11.1948 7.03286 11.7288 6.49884 11.7288 5.8401C11.7288 5.18136 11.1948 4.64734 10.536 4.64734C9.87728 4.64734 9.34326 5.18136 9.34326 5.8401C9.34326 6.49884 9.87728 7.03286 10.536 7.03286Z\" stroke=\"currentColor\" />\n <path d=\"M1.5979 9.28409L4.17738 7.37514C4.57462 7.08117 5.12701 7.12145 5.47741 7.46992L8.3322 10.309C8.6572 10.6323 9.1605 10.6931 9.5532 10.4566L10.8859 9.65399C11.2531 9.43289 11.7205 9.47039 12.0477 9.74729L14.2823 11.6379\" stroke=\"currentColor\" />\n </svg>\n)\n\nconst PaperDocGlyph = ({ size, className, strokeWidth }: IconProps & { strokeWidth: number }) => (\n <svg width={size} height={size} className={className} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" strokeWidth={strokeWidth}>\n <path d=\"M3.51919 14.5069H12.4807C13.0679 14.5069 13.5438 14.031 13.5438 13.4438V5.97499C13.5438 5.68818 13.428 5.41352 13.2226 5.21341L9.71251 1.79459C9.51402 1.60124 9.24781 1.49304 8.97075 1.49304H3.51919C2.93204 1.49304 2.45605 1.96902 2.45605 2.55618V13.4438C2.45605 14.031 2.93203 14.5069 3.51919 14.5069Z\" stroke=\"currentColor\" />\n <path d=\"M8.90454 1.6095V4.87091C8.90454 5.45806 9.38051 5.93405 9.96768 5.93405H13.4953\" stroke=\"currentColor\" />\n <path d=\"M4.31152 8.7561H7.83046\" stroke=\"currentColor\" />\n <path d=\"M4.31152 11.3651H9.36598\" stroke=\"currentColor\" />\n </svg>\n)\n\nconst PaperGlyph = ({ size, className, strokeWidth }: IconProps & { strokeWidth: number }) => (\n <svg width={size} height={size} className={className} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" strokeWidth={strokeWidth}>\n <path d=\"M3.75275 14.271H12.2473C12.7749 14.271 13.2027 13.8433 13.2027 13.3156V5.91732C13.2027 5.65958 13.0985 5.41276 12.9139 5.23293L9.59477 2.00011C9.4164 1.82636 9.17717 1.72913 8.9282 1.72913H3.75275C3.22511 1.72913 2.79736 2.15686 2.79736 2.68451V13.3156C2.79736 13.8433 3.22511 14.271 3.75275 14.271Z\" stroke=\"currentColor\" />\n <path d=\"M8.84888 1.83838V4.94133C8.84888 5.46896 9.2766 5.89671 9.80426 5.89671H13.157\" stroke=\"currentColor\" />\n </svg>\n)\n\n/** Local exhaustiveness helper — this package does not depend on `dsh-llm`. */\n/* v8 ignore next 3 -- closed-union backstop; only reached if a kind is forged */\nfunction assertNever(value: never): never {\n throw new Error(`unreachable link icon kind: ${String(value)}`)\n}\n\n/**\n * Render the leading glyph for one clickable artifact link at one stroke weight.\n * @param props - The link category, optional size (default 14px), and optional CSS class.\n * @returns The category's decorative current-color SVG glyph.\n */\nfunction LinkIconArtwork({ kind, href, size = 14, className, strokeWidth }: WeightedLinkIconProps): ReactNode {\n switch (kind) {\n case 'url': return siteGlyph({ href, size, className }) ?? <GlobeOutlineArtwork size={size} className={className} strokeWidth={strokeWidth} />\n case 'folder': return <FolderCloseArtwork size={size} className={className} strokeWidth={strokeWidth} />\n case 'code': return <CodeBracketsArtwork size={size} className={className} strokeWidth={strokeWidth} />\n case 'image': return <PhotoGlyph size={size} className={className} strokeWidth={strokeWidth} />\n case 'document': return <PaperDocGlyph size={size} className={className} strokeWidth={strokeWidth} />\n case 'other': return <PaperGlyph size={size} className={className} strokeWidth={strokeWidth} />\n /* v8 ignore next -- closed-union backstop; only reached if a kind is forged */\n default: return assertNever(kind)\n }\n}\n\n/**\n * Render a regular one-pixel link icon.\n * @param props - Link category, size, and optional class.\n * @returns The regular decorative link glyph.\n */\nexport function LinkIconRegular(props: LinkIconProps): ReactNode {\n return <LinkIconArtwork {...props} strokeWidth={ICON_REGULAR_STROKE} />\n}\n\n/**\n * Render a medium 1.3px link icon.\n * @param props - Link category, size, and optional class.\n * @returns The medium decorative link glyph.\n */\nexport function LinkIconMedium(props: LinkIconProps): ReactNode {\n return <LinkIconArtwork {...props} strokeWidth={ICON_MEDIUM_STROKE} />\n}\n","/** Inline text and reference presentation; business rules supply resolved JSON data and actions. */\nimport type { HTMLAttributes } from 'react'\nimport type { ReactNode } from 'react'\nimport clsx from 'clsx'\nimport { ReferenceIconRegular, type ReferenceIconKind } from './ReferenceIcon.tsx'\nimport css from './user-text.module.css'\nimport markdownCss from './markdown/MarkdownText.module.css'\n\n/** Plain text follows the wrapping and typography of its host. */\nexport interface UserTextRunProps {\n readonly text: string\n}\n\n/**\n * Render an uninterpreted inline text run.\n * @param props - text retained verbatim from the caller's document.\n * @returns one inline run without Markdown or reference recognition.\n */\nexport function UserTextRun({ text }: UserTextRunProps): ReactNode {\n return <span className={css.plainRun}>{text}</span>\n}\n\n/** Presentation selected by a reference renderer, independent of its matching grammar. */\nexport interface ReferenceChipProps {\n readonly appearance: ReferenceIconKind | 'skill' | 'command'\n /** Explicit object-menu gesture bindings; absent for display-only references. */\n readonly contextMenuProps?: Pick<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'onKeyDown' | 'tabIndex'>\n readonly label: string\n readonly title: string\n /** Absent for display-only references and previews. */\n readonly onActivate?: () => void\n}\n\n/**\n * Render a reference label or its explicitly supplied activation action.\n * Text selection and repeated pointer clicks do not activate the reference.\n * @param props - resolved visual fields and optional action from the owning renderer.\n * @returns an inline label, or a keyboard-accessible button when activation is supplied.\n */\nexport function ReferenceChip({\n appearance, label, title, onActivate, contextMenuProps,\n}: ReferenceChipProps): ReactNode {\n const slash = appearance === 'skill' || appearance === 'command'\n const contents = <>\n {!slash && <ReferenceIconRegular kind={appearance} size={16} className={css.refIcon} />}\n {label}\n </>\n const className = clsx(css.refChip, slash && css.slashChip)\n return onActivate === undefined\n ? <span\n {...contextMenuProps}\n className={className}\n data-ref-chip={appearance}\n title={title}\n >{contents}</span>\n : <button\n type=\"button\"\n {...contextMenuProps}\n className={clsx(className, markdownCss.fileMention)}\n data-ref-chip={appearance}\n title={title}\n onClick={(event) => {\n if (event.detail > 1 || (event.detail !== 0 && event.currentTarget.ownerDocument.getSelection()?.isCollapsed === false)) return\n onActivate()\n }}\n >{contents}</button>\n}\n","import { Fragment, useEffect, useLayoutEffect, useRef, useState } from 'react'\nimport type { CSSProperties, ReactNode } from 'react'\nimport { createPortal } from 'react-dom'\nimport { IconCheckCircleOutlineRegular } from './icons/index.tsx'\nimport css from './Toast.module.css'\n\n/** Full-opacity hold before the fade starts, when the owner names none. */\nconst HOLD_MS = 3000\n/** Fade duration. Must agree with the stylesheet's toast-fade duration. */\nconst FADE_MS = 1000\n\n/**\n * Transient top-center banner: slides in, holds at full opacity, fades out,\n * then reports done so the owner can unmount it. Re-showing the same text\n * restarts the cycle when the owner remounts the component (key it by a\n * per-show sequence). Rendered through a body portal so an owner inside a\n * transformed or filtered ancestor cannot trap the fixed banner in that\n * ancestor's box.\n * With unchanged holdMs, parent rerenders do not extend the lifetime.\n * Completion calls the latest onDone handler; fully faded actions receive no input.\n *\n * The hold is the owner's to set, because how long a banner has to stay\n * depends on how much there is to read: a one-line limit lands in the default\n * window, while a failure that names what broke does not. One value drives\n * both the unmount timer and the stylesheet's fade delay — the stylesheet\n * reads it as a custom property — so the two can no longer disagree and leave\n * the banner unmounting mid-fade.\n * @param props.text - resolved banner copy; the owner passes localized text.\n * @param props.icon - optional leading glyph (e.g. a warning icon); ignored\n * under `tone=\"success\"`, which brings its own glyph.\n * @param props.tone - 'success' renders the design's circled green check as\n * the leading glyph; omitted, the icon seat keeps its warning tint.\n * @param props.actions - optional inline actions continuing the sentence:\n * each renders its plain-text `prefix` (a connective like 或) followed by its\n * localized `label` as blue clickable text, flowing after `text` as one\n * sentence. Each press is the owner's to handle (e.g. undo the reported\n * change, then unmount the toast). The banner surface stays click-through —\n * only the action text takes the pointer.\n * @param props.holdMs - full-opacity hold before the fade; defaults to 3000.\n * @param props.anchor - optional element whose horizontal center the banner\n * follows (e.g. the composer card, so the banner centers over the chat column\n * rather than the whole window); omitted, it centers on the viewport.\n * @param props.onDone - called once the fade completes; unmount the toast here.\n * @returns the floating banner.\n */\nexport function Toast({ text, icon, tone, anchor, holdMs = HOLD_MS, actions, onDone }: {\n text: string\n icon?: ReactNode\n tone?: 'success'\n anchor?: HTMLElement | null\n holdMs?: number\n actions?: readonly { label: string; prefix?: string; onClick: () => void }[]\n onDone: () => void\n}) {\n const latestOnDone = useRef(onDone)\n useLayoutEffect(() => { latestOnDone.current = onDone }, [onDone])\n useEffect(() => {\n const timer = setTimeout(() => { latestOnDone.current() }, holdMs + FADE_MS)\n return () => { clearTimeout(timer) }\n }, [holdMs])\n // Anchor-centered placement re-measures on window resizes; the banner lives\n // four seconds, so sub-window layout drift within that span stays out of\n // scope.\n const [left, setLeft] = useState<number | null>(null)\n useLayoutEffect(() => {\n if (anchor == null) return\n const measure = (): void => {\n const rect = anchor.getBoundingClientRect()\n setLeft(rect.left + rect.width / 2)\n }\n measure()\n window.addEventListener('resize', measure)\n return () => { window.removeEventListener('resize', measure) }\n }, [anchor])\n return createPortal(\n <div\n className={css.toast}\n role=\"alert\"\n style={{\n ...left === null ? {} : { left },\n '--dsh-toast-hold': `${String(holdMs)}ms`,\n } as CSSProperties}\n >\n {tone === 'success'\n ? <span className={`${css.icon} ${css.success}`} aria-hidden><IconCheckCircleOutlineRegular /></span>\n : icon !== undefined && <span className={css.icon} aria-hidden>{icon}</span>}\n <span className={css.text}>\n {text}\n {actions?.map(action => (\n <Fragment key={action.label}>\n {action.prefix}\n <button type=\"button\" className={css.action} onClick={action.onClick}>\n {action.label}\n </button>\n </Fragment>\n ))}\n </span>\n </div>,\n document.body,\n )\n}\n","/** Compact human-readable byte counts shared by attachment presenters. @module @deepseek-ai/dsh-client-ui-primitives/file-size */\n\n/**\n * Byte count as compact user-facing size text (`312B`, `4.2KB`, `1.5MB`, `2.4GB`).\n * @param bytes - exact byte count.\n * @returns whole-unit text with one decimal below ten of the chosen unit.\n */\nexport function fileSizeText(bytes: number): string {\n if (bytes < 1024) return `${bytes}B`\n const kb = bytes / 1024\n if (kb < 1024) return `${kb < 10 ? kb.toFixed(1) : Math.round(kb)}KB`\n const mb = kb / 1024\n if (mb < 1024) return `${mb < 10 ? mb.toFixed(1) : Math.round(mb)}MB`\n const gb = mb / 1024\n return `${gb < 10 ? gb.toFixed(1) : Math.round(gb)}GB`\n}\n","/** Image gestures delegate file preparation and transport to the owning feature. */\nimport { useCallback, useEffect, useMemo, useRef, type DragEvent, type MouseEvent, type PointerEvent, type ImgHTMLAttributes } from 'react'\nimport type { FileDragActions, FileDragSource, PreparedFileDrag } from './file-drag-actions.ts'\n\ninterface Preparation { abort: AbortController; prepared?: PreparedFileDrag; failed: boolean }\ntype ImageGestures = Required<Pick<ImgHTMLAttributes<HTMLImageElement>,\n 'onPointerEnter' | 'onPointerDown' | 'onPointerLeave' | 'onDragStart' | 'onDragEnd' | 'onClickCapture'>>\n\n/**\n * Prepare resource-backed images on primary press, other images also on hover; release on leave.\n * Releasing inside the image retains preparation for the next gesture; cancelled drags never start late.\n * @param actions - stable file preparation and error callbacks.\n * @param src - displayed image URL.\n * @param name - proposed export name.\n * @param original - already loaded original bytes.\n * @param resourceAddress - verifiable reference to an unmodified local original.\n * @returns image gesture handlers; overflowing images remain owned by their pan handler.\n */\nexport function useImageDrag(\n actions: FileDragActions, src: string, name: string, original?: File, resourceAddress?: string,\n): ImageGestures {\n const source = useMemo<FileDragSource>(() => original === undefined\n ? { kind: 'url', url: src, name, mediaType: '', resourceAddress }\n : { kind: 'blob', blob: original, name, mediaType: original.type, resourceAddress }, [src, name, original, resourceAddress])\n const state = useRef<Preparation>()\n const dragged = useRef(false)\n const release = useCallback((): void => {\n const previous = state.current\n state.current = undefined\n previous?.abort.abort()\n previous?.prepared?.release()\n }, [])\n useEffect(() => release, [release, source, actions])\n const prepare = useCallback((image: HTMLImageElement): void => {\n if (src === '' || state.current !== undefined) return\n const current: Preparation = { abort: new AbortController(), failed: false }\n state.current = current\n window.addEventListener('pointerup', (event) => {\n if (event.target !== image) release()\n }, { signal: current.abort.signal })\n window.addEventListener('blur', release, { once: true, signal: current.abort.signal })\n void actions.prepare(source, current.abort.signal).then((prepared) => {\n if (current.abort.signal.aborted) prepared.release()\n else current.prepared = prepared\n }, (_error: unknown) => {\n // Speculation stays quiet; only a later failed gesture presents retry feedback.\n current.failed = true\n })\n }, [src, actions, source, release])\n const intent = useCallback((event: PointerEvent<HTMLImageElement>): void => {\n if (!event.defaultPrevented && event.currentTarget.draggable\n && (resourceAddress === undefined || event.type === 'pointerdown')) prepare(event.currentTarget)\n }, [prepare, resourceAddress])\n const onDragStart = useCallback((event: DragEvent<HTMLImageElement>): void => {\n if (event.defaultPrevented || src === '') return\n dragged.current = true\n const current = state.current\n if (current?.prepared !== undefined) {\n if (!current.prepared.start(event.dataTransfer, event.currentTarget)) { event.preventDefault(); release() }\n return\n }\n const url = new URL(src, location.href)\n if (original === undefined && (url.protocol === 'https:' || url.protocol === 'http:') && url.origin !== location.origin) return\n event.preventDefault()\n if (current?.failed === true) { actions.reportFailure(); release() }\n prepare(event.currentTarget)\n }, [src, original, actions, prepare, release])\n const onPointerDown = useCallback((event: PointerEvent<HTMLImageElement>): void => {\n dragged.current = false\n if (event.button === 0) intent(event)\n }, [intent])\n const onPointerLeave = useCallback((event: PointerEvent<HTMLImageElement>): void => {\n // Browsers may leave a small image before dispatching its dragstart.\n if (event.buttons !== 1) release()\n }, [release])\n const onClickCapture = useCallback((event: MouseEvent): void => {\n if (event.detail === 0) { dragged.current = false; return }\n if (!dragged.current) return\n event.preventDefault()\n event.stopPropagation()\n dragged.current = false\n }, [])\n return { onPointerEnter: intent, onPointerDown, onPointerLeave, onDragStart, onDragEnd: release, onClickCapture }\n}\n","/** Original-image drag gestures owned by a presentation primitive. */\nimport { forwardRef, type ImgHTMLAttributes } from 'react'\nimport { useImageDrag } from './image-drag.ts'\nimport type { FileDragActions } from './file-drag-actions.ts'\n\n/** Image presentation plus original content and explicit file preparation callbacks. */\nexport interface DraggableImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'draggable' | 'onDragStart' | 'onDragEnd' | 'onPointerEnter' | 'onPointerLeave' | 'onPointerDown' | 'onPointerUp' | 'onClickCapture'> {\n readonly fileDrag: FileDragActions\n readonly src: string\n readonly name: string\n readonly resourceAddress?: string | undefined\n readonly original?: File | undefined\n}\n\n/**\n * Render an image with original-file dragging; using explicit application-owned callbacks.\n * @param props - image attributes, original filename and file preparation callbacks.\n * @param ref - image element for measurement and pointer-mode bindings.\n * @returns a draggable image that suppresses only the mouse click following its drag.\n */\nexport const DraggableImage = forwardRef<HTMLImageElement, DraggableImageProps>(function DraggableImage(\n { fileDrag, src, name, original, resourceAddress, ...props }, ref,\n) {\n const drag = useImageDrag(fileDrag, src, name, original, resourceAddress)\n return <img {...props} {...drag} src={src} ref={ref} draggable />\n})\n","/** Clipboard writes with component-owned success feedback and cleanup. */\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { writeClipboard } from './clipboard.ts'\n\n/** Clipboard action and its temporary success state. */\nexport interface ClipboardCopyState {\n /** True for one second after an accepted clipboard write. */\n readonly copied: boolean\n /** Write the current text unless a write or success indication is already active. */\n readonly onCopy: () => void\n}\n\n/**\n * Keep clipboard feedback local to the mounted control and release its reset timer on unmount.\n * @param text - Exact text to copy when the action is invoked.\n * @returns Success feedback and a callback stable while text and feedback are unchanged.\n */\nexport function useClipboardCopy(text: string): ClipboardCopyState {\n const [copied, setCopied] = useState(false)\n const copyPending = useRef(false)\n const copyTimer = useRef<ReturnType<typeof setTimeout> | null>(null)\n const copyEpoch = useRef(0)\n useEffect(() => () => {\n copyEpoch.current += 1\n copyPending.current = false\n if (copyTimer.current !== null) clearTimeout(copyTimer.current)\n }, [])\n const onCopy = useCallback(() => {\n if (copied || copyPending.current) return\n const epoch = copyEpoch.current\n copyPending.current = true\n void writeClipboard(text).then((ok) => {\n if (epoch !== copyEpoch.current) return\n copyPending.current = false\n if (!ok) return\n setCopied(true)\n copyTimer.current = window.setTimeout(() => {\n copyTimer.current = null\n setCopied(false)\n }, 1000)\n })\n }, [copied, text])\n return { copied, onCopy }\n}\n","/**\n * One plugin's settings form as its page on the Plugins page shows it: the\n * read-only notice when the deployment stores settings read-only, the\n * plugin's controls, and the save that writes every staged edit. The page\n * draws the plugin's title and one-liner itself.\n *\n * Only a save writes. Leaving the page drops every staged edit, so the form\n * discards on unmount and offers no discard control. A form whose namespace\n * the Host stopped serving says so in place of its controls rather than\n * showing fields nothing would accept.\n */\n\nimport { useEffect, useRef, type ReactNode } from 'react'\nimport type { SettingsFormShell } from './form-model.ts'\nimport css from './SettingsForm.module.css'\n\n/** The copy the form frame renders, from the owning plugin's dictionary. */\nexport interface SettingsFormLabels {\n /** Shown in place of the controls while the namespace is not served. */\n unavailable: string\n /** Shown over the controls while the document is read-only. */\n readOnly: string\n /** Shown beside the save after a save the Host did not accept. */\n saveFailed: string\n /** The save control. */\n save: string\n /** The save control while a save is crossing the wire. */\n saving: string\n}\n\n/** Form chrome shared by every settings page. */\nexport interface SettingsFormProps {\n /** The frame's copy. */\n labels: SettingsFormLabels\n /** The form state: availability, writability, and what a save would do. */\n state: SettingsFormShell\n /** Write every staged edit. */\n onSave: () => void\n /** Drop every staged edit; the form calls it when it leaves the page. */\n onDiscard: () => void\n /** The plugin's controls. */\n children: ReactNode\n}\n\n/**\n * Render one plugin's settings form.\n * @param props - the form's copy and state, its controls, and the save and discard actions.\n * @returns the form, or the unavailable line while the namespace is not served.\n */\nexport function SettingsForm(props: SettingsFormProps) {\n const { state, labels } = props\n const discard = useRef(props.onDiscard)\n discard.current = props.onDiscard\n useEffect(() => () => { discard.current() }, [])\n if (!state.available) return <p className={css.unavailable} role=\"status\">{labels.unavailable}</p>\n const blocked = !state.dirty || state.invalid || state.saving\n return (\n <div className={css.form}>\n {!state.writable ? <p className={css.readOnly} role=\"status\">{labels.readOnly}</p> : null}\n {props.children}\n <div className={css.footer}>\n {state.failed ? <p className={css.failed} role=\"status\">{labels.saveFailed}</p> : null}\n <button\n type=\"button\"\n className={css.save}\n disabled={blocked}\n onClick={props.onSave}\n >\n {state.saving ? labels.saving : labels.save}\n </button>\n </div>\n </div>\n )\n}\n","/**\n * The controls of a settings form. Each renders one field's label, its staged\n * text, whether saving would leave an override, and — when one stands — the\n * reset that stages a clear back to the composition layer. Nothing here\n * writes: a control reports what the user typed, and the form's save is the\n * single point where a draft becomes a document mutation.\n */\n\nimport { useState, type ReactNode } from 'react'\nimport { IconInfoOutlineRegular } from '../icons/index.tsx'\nimport { Tag } from '../Tag.tsx'\nimport css from './fields.module.css'\n\n/** What every settings field control needs regardless of its value type. */\nexport interface SettingsFieldProps {\n /** Stable id associating the label with its control. */\n id: string\n /** Visible label. */\n label: string\n /** One-line explanation rendered under the control. */\n hint: string\n /** Draft text this control renders. */\n text: string\n /** True when saving would leave a user-layer entry for this field. */\n overridden: boolean\n /** True when the draft is not a value this field accepts. */\n invalid: boolean\n /** Copy for the overridden badge. */\n overriddenLabel: string\n /** Copy for the reset control. */\n resetLabel: string\n /** Copy shown in place of the hint while the draft is invalid. */\n invalidLabel: string\n /** Disables every control (read-only document, or an unavailable namespace). */\n disabled: boolean\n /** Stage draft text. */\n onEdit: (text: string) => void\n /** Stage a clear so the field re-inherits the composition layer. */\n onReset: () => void\n}\n\n/**\n * A staged value field. `numeric` only hints the keypad: which drafts a field\n * accepts is decided by its spec, so the control never silently rewrites what\n * the user typed.\n * @param props - the field's copy, its staged text, and the edit actions.\n * @returns the labelled control.\n */\nexport function SettingsValueField(props: Omit<SettingsFieldProps, 'hint'> & {\n /** Optional explanation shown below the input. */\n hint?: string\n /** Rules disclosed by the information button beside the label. */\n help?: { label: string; content: ReactNode }\n /** Hints a numeric keypad without narrowing what the control accepts. */\n numeric?: boolean\n /** Placeholder shown while the draft is empty. */\n placeholder?: string\n}) {\n const [helpOpen, setHelpOpen] = useState(false)\n const helpId = `${props.id}-help`\n const messageId = `${props.id}-message`\n const hasMessage = props.invalid || Boolean(props.hint)\n const description = [hasMessage ? messageId : '', helpOpen ? helpId : ''].filter(Boolean).join(' ')\n return (\n <div className={css.field}>\n <div className={css.head}>\n <div className={css.labelGroup}>\n <label className={css.label} htmlFor={props.id}>{props.label}</label>\n {props.help !== undefined\n ? (\n <button type=\"button\" className={css.helpButton}\n aria-label={props.help.label} aria-expanded={helpOpen} aria-controls={helpId}\n onClick={() => { setHelpOpen(!helpOpen) }}>\n <IconInfoOutlineRegular size={12} />\n </button>\n )\n : null}\n </div>\n {props.overridden\n ? (\n <span className={css.badges}>\n <Tag tone=\"neutral\">{props.overriddenLabel}</Tag>\n <button\n type=\"button\"\n className={css.reset}\n disabled={props.disabled}\n onClick={props.onReset}\n >\n {props.resetLabel}\n </button>\n </span>\n )\n : null}\n </div>\n <input\n id={props.id}\n className={css.input}\n type=\"text\"\n {...props.numeric === true ? { inputMode: 'numeric' as const } : {}}\n {...props.invalid ? { 'aria-invalid': true } : {}}\n aria-describedby={description || undefined}\n value={props.text}\n placeholder={props.placeholder ?? ''}\n disabled={props.disabled}\n onChange={(event) => { props.onEdit(event.target.value) }}\n />\n {hasMessage\n ? <p id={messageId} className={props.invalid ? css.invalid : css.hint}>{props.invalid ? props.invalidLabel : props.hint}</p>\n : null}\n {props.help !== undefined && helpOpen\n ? <div id={helpId} className={css.help} role=\"region\" aria-label={props.help.label}>{props.help.content}</div>\n : null}\n </div>\n )\n}\n\n/**\n * A write-only credential control. The value never rides a response, so the\n * control reports only whether one is configured and starts blank; a blank\n * draft writes nothing, which keeps the stored key rather than clearing it.\n * The control asks browsers not to autofill saved login passwords.\n * @param props - the field's copy, its staged text, and the configured state.\n * @returns the labelled control.\n */\nexport function SettingsSecretField(props: Pick<SettingsFieldProps, 'id' | 'label' | 'hint' | 'text' | 'disabled' | 'onEdit'> & {\n /** Whether the Host reports a configured credential for this reference. */\n configured: boolean\n /** Copy describing the configured state. */\n stateLabel: string\n}) {\n return (\n <div className={css.field}>\n <div className={css.head}>\n <label className={css.label} htmlFor={props.id}>{props.label}</label>\n <span className={css.badges}>\n <Tag tone={props.configured ? 'neutral' : 'quiet'}>{props.stateLabel}</Tag>\n </span>\n </div>\n <input\n id={props.id}\n className={css.input}\n type=\"password\"\n autoComplete=\"new-password\"\n value={props.text}\n disabled={props.disabled}\n onChange={(event) => { props.onEdit(event.target.value) }}\n />\n <p className={css.hint}>{props.hint}</p>\n </div>\n )\n}\n","/**\n * The staged form model behind a plugin's settings page.\n *\n * A card stages what the user types and writes it only when they save. Each\n * settings write is a durable, revision-fenced document mutation, so a control\n * that committed as it settled turned one edit into a write the user never\n * asked for and could not preview; staged text makes what is on screen exactly\n * what a save would store.\n *\n * A field shows its effective value — the user layer over the composition\n * layer over the schema default — and whether the user layer carries it. That\n * presence, not a value comparison, is what marks a field overridden: an\n * override equal to the composition default is still an override.\n */\n\nimport { createSnapshotStore, type SnapshotStore } from '@deepseek-ai/dsh-client-store'\n\n/** What the model reads of one Host entry's form. */\nexport interface SettingsFormScopeSnapshot<T> {\n /** `ready` while the Host serves the entry to this client; the form renders nothing otherwise. */\n status: 'loading' | 'ready' | 'unavailable'\n /** Last accepted schema-resolved section; undefined before the first acceptance. */\n value: T | undefined\n /** Composition layer the value resolves over: what a field reverts to once cleared. */\n base: unknown\n /** Raw user layer as stored; a field's PRESENCE here is what marks it overridden. */\n user: unknown\n /** Whether the Host document accepts writes. */\n writable: boolean\n /** Revision the snapshot was read at; a save fences its mutation with the revision its drafts started from. */\n revision: number | undefined\n}\n\n/** One path edit a save sends, as the shared configuration form's `mutate` accepts it. */\nexport type SettingsFormPathOp =\n | { op: 'set'; path: readonly string[]; value: unknown }\n | { op: 'unset'; path: readonly string[] }\n\n/** The entry form the model stages over: the reads and the atomic write of the form `ui-settings` shares per Host entry. */\nexport interface SettingsFormScope<T> {\n /** @returns the current sync snapshot. */\n getSnapshot(): SettingsFormScopeSnapshot<T>\n /**\n * Observe snapshot replacements.\n * @param listener - invoked after each snapshot change.\n * @returns the disposer removing this listener.\n */\n subscribe(listener: () => void): () => void\n /**\n * Apply ordered field edits in one revision-fenced write.\n * @param ops - the edits, in staging order.\n * @param expectedRevision - the revision the drafts were staged against, when known.\n * @returns true for Host acceptance, false for refusal, after any recovery read.\n */\n mutate(ops: readonly SettingsFormPathOp[], expectedRevision?: number): Promise<boolean>\n}\n\n/** The write one field's staged text performs when the card is saved. */\nexport type SettingsFieldWrite =\n | { kind: 'set'; value: unknown }\n | { kind: 'clear' }\n\n/** How one section field converts between its stored value and its draft text. */\nexport interface SettingsFieldSpec {\n /** Field name inside the namespace section. */\n field: string\n /** Render a stored value as draft text; the empty string when the section carries none. */\n format: (value: unknown) => string\n /**\n * The write this draft text stages, or undefined when the text is not a\n * value this field accepts — which blocks the save rather than discarding it.\n */\n parse: (text: string) => SettingsFieldWrite | undefined\n}\n\n/**\n * A control whose value is written outside the settings section. A credential\n * literal never rides a response, so its draft has nothing to seed from: it is\n * blank until typed, and a blank draft writes nothing.\n */\nexport interface SettingsSecretSpec {\n /** Field name addressing this control inside the card's form. */\n field: string\n /** Write the staged text; resolves to whether the Host accepted it. */\n write: (text: string) => Promise<boolean>\n}\n\n/** One field as a card's control renders it. */\nexport interface SettingsFieldState {\n /** Draft text the control renders. */\n text: string\n /**\n * Whether saving would leave a user-layer entry for this field. A staged\n * edit answers for itself, so the badge previews the save rather than\n * reporting a state the pending edit already contradicts.\n */\n overridden: boolean\n /** Whether the draft is not a value this field accepts, which blocks saving. */\n invalid: boolean\n}\n\n/** Form state every plugin card shares. */\nexport interface SettingsFormShell {\n /** False while the namespace is not served to this client; the card renders nothing. */\n available: boolean\n /** Whether the Host document accepts writes. */\n writable: boolean\n /** Whether the form holds edits that a save would write. */\n dirty: boolean\n /** Whether any staged draft is invalid, which blocks the save. */\n invalid: boolean\n /** Whether a save is crossing the wire. */\n saving: boolean\n /** Whether the last save did not land as staged; cleared by the next edit or save. */\n failed: boolean\n}\n\n/** The write actions every plugin card's slot entry injects. */\nexport interface SettingsFormActions {\n /** Stage draft text for one field. */\n edit: (field: string, text: string) => void\n /** Stage a clear, so saving lets the field re-inherit the composition layer. */\n resetField: (field: string) => void\n /** Write every staged edit, then re-seed from what the Host accepted. */\n save: () => void\n /** Drop every staged edit. */\n discard: () => void\n}\n\n/** One field's staged edit. */\ninterface StagedEdit {\n /** Draft text the control renders. */\n text: string\n /** True when this edit clears the field whatever text it shows. */\n clear: boolean\n}\n\n/** One staged edit resolved into the write a save performs. */\ninterface PlannedWrite {\n /** Field this entry writes. */\n field: string\n /**\n * Perform the write and report whether the Host holds the staged value\n * afterwards; undefined when the draft is not a value the field accepts.\n */\n run?: () => Promise<boolean>\n op?: SettingsFormPathOp\n}\n\n/**\n * A whole-number field. An empty draft clears the field; any other draft that\n * is not a finite number blocks the save.\n * @param field - field name inside the namespace section.\n * @returns the field's conversion spec.\n */\nexport function settingsNumberField(field: string): SettingsFieldSpec {\n return {\n field,\n // A section that carries no number for this field renders empty rather\n // than as a value nobody chose.\n format: value => typeof value === 'number' ? String(value) : '',\n parse: (text) => {\n const trimmed = text.trim()\n if (trimmed === '') return { kind: 'clear' }\n const parsed = Number(trimmed)\n return Number.isFinite(parsed) ? { kind: 'set', value: parsed } : undefined\n },\n }\n}\n\n/**\n * A free-text field. An empty draft clears the field, so emptying the control\n * and saving is the same gesture as resetting it.\n * @param field - field name inside the namespace section.\n * @returns the field's conversion spec.\n */\nexport function settingsTextField(field: string): SettingsFieldSpec {\n return {\n field,\n format: value => typeof value === 'string' ? value : '',\n parse: (text) => {\n const trimmed = text.trim()\n return trimmed === '' ? { kind: 'clear' } : { kind: 'set', value: trimmed }\n },\n }\n}\n\n/**\n * Stages one card's edits over one settings namespace and writes them on save.\n *\n * The form publishes through a snapshot store because slot components read\n * through a snapshot selector, while both the scope and the local drafts\n * change underneath; every projection is rebuilt from the two together.\n */\nexport class SettingsFormModel<T> {\n private readonly specs: Map<string, SettingsFieldSpec>\n private readonly secretSpecs: Map<string, SettingsSecretSpec>\n private readonly staged = new Map<string, StagedEdit>()\n private readonly listeners = new Set<() => void>()\n private baseline: SettingsFormScopeSnapshot<T> | undefined\n private readonly unsubscribe: () => void\n private saving = false\n private failed = false\n\n /**\n * @param scope - the shared configuration form for this card's namespace.\n * @param specs - the section fields this card edits.\n * @param secrets - the card's write-only controls, written outside the section.\n */\n constructor(\n private readonly scope: SettingsFormScope<T>,\n specs: SettingsFieldSpec[],\n secrets: SettingsSecretSpec[] = [],\n ) {\n this.specs = new Map(specs.map(spec => [spec.field, spec]))\n this.secretSpecs = new Map(secrets.map(spec => [spec.field, spec]))\n this.unsubscribe = scope.subscribe(() => { this.publish() })\n }\n\n /**\n * Publish a projection of this form, rebuilt whenever the scope or a draft changes.\n * @param project - build the card's state from the form's current reads.\n * @returns the store the card's component reads through its bound selector.\n */\n bind<S>(project: () => S): SnapshotStore<S> {\n const store = createSnapshotStore(project())\n this.listeners.add(() => { store.set(project()) })\n return store\n }\n\n /**\n * Read the card-level state: what the Host serves, and what a save would do.\n * @returns the form state every card shares.\n */\n shell(): SettingsFormShell {\n const snapshot = this.scope.getSnapshot()\n const plan = this.plan()\n return {\n available: snapshot.status === 'ready',\n writable: snapshot.writable,\n dirty: plan.length > 0,\n invalid: plan.some(item => item.run === undefined && item.op === undefined),\n saving: this.saving,\n failed: this.failed,\n }\n }\n\n /**\n * Read one control's state.\n * @param field - field name of a section field or of a write-only control.\n * @returns the draft text, whether a save would leave an override, and whether it is invalid.\n */\n field(field: string): SettingsFieldState {\n const staged = this.staged.get(field)\n if (this.secretSpecs.has(field)) {\n return { text: staged?.text ?? '', overridden: false, invalid: false }\n }\n const spec = this.spec(field)\n if (staged === undefined) {\n return { text: spec.format(this.sectionValue(field)), overridden: this.stored(field), invalid: false }\n }\n const write = staged.clear ? { kind: 'clear' as const } : spec.parse(staged.text)\n return {\n text: staged.text,\n overridden: write?.kind === 'set',\n invalid: write === undefined,\n }\n }\n\n /**\n * Build the edit, reset, save, and discard actions bound to this form.\n * @returns the actions a card's slot entry injects.\n */\n actions(): SettingsFormActions {\n return {\n edit: (field, text) => { this.stage(field, { text, clear: false }) },\n resetField: (field) => {\n this.stage(field, { text: this.spec(field).format(this.baseValue(field)), clear: true })\n },\n save: () => { void this.save() },\n discard: () => {\n if (this.staged.size === 0 && !this.failed) return\n this.staged.clear()\n this.baseline = undefined\n this.failed = false\n this.publish()\n },\n }\n }\n\n /**\n * Write every staged edit, then re-seed from what the Host accepted.\n *\n * The Host is the only authority on whether a value was accepted — its\n * validators own the constraints no schema can express — so the outcome is\n * read back from the section rather than predicted here. A save that did not\n * land keeps its drafts, so the user can correct them instead of retyping.\n * @returns settlement after every write and the read-back.\n */\n async save(): Promise<void> {\n const plan = this.plan()\n if (!plan.length || this.saving || !this.scope.getSnapshot().writable\n || plan.some(item => item.run === undefined && item.op === undefined)) return\n this.saving = true\n this.failed = false\n this.publish()\n try {\n const ops = plan.flatMap(item => item.op === undefined ? [] : [item.op])\n let landed = !ops.length || await this.scope.mutate(ops, this.baseline?.revision)\n if (!landed) { this.failed = true; return }\n for (const item of plan) if (item.run) landed = await item.run() && landed\n if (landed) { this.staged.clear(); this.baseline = undefined }\n this.failed = !landed\n } catch (_error) {\n this.failed = true\n } finally {\n this.saving = false\n this.publish()\n }\n }\n\n /** Release the form's accepted-value subscription. */\n dispose(): void { this.unsubscribe(); this.listeners.clear() }\n\n /**\n * Every staged edit a save would write. An entry whose draft is not a value\n * its field accepts carries no write: the form is still dirty, and the save\n * refuses rather than dropping the edit.\n * @returns the planned writes, in the order the fields were staged.\n */\n private plan(): PlannedWrite[] {\n const plan: PlannedWrite[] = []\n for (const [field, staged] of this.staged) {\n const secret = this.secretSpecs.get(field)\n if (secret !== undefined) {\n const value = staged.text.trim()\n if (value !== '') plan.push({ field, run: () => secret.write(value) })\n continue\n }\n const spec = this.spec(field)\n if (staged.clear) {\n if (this.stored(field)) plan.push({ field, op: { op: 'unset', path: [field] } })\n continue\n }\n if (staged.text === spec.format(this.sectionValue(field))) continue\n const write = spec.parse(staged.text)\n if (write === undefined) plan.push({ field })\n else if (write.kind === 'clear') plan.push({ field, op: { op: 'unset', path: [field] } })\n else plan.push({ field, op: { op: 'set', path: [field], value: write.value } })\n }\n return plan\n }\n\n private stage(field: string, edit: StagedEdit): void {\n this.baseline ??= this.scope.getSnapshot()\n this.staged.set(field, edit)\n this.failed = false\n this.publish()\n }\n\n private spec(field: string): SettingsFieldSpec {\n const spec = this.specs.get(field)\n // Every call site names a field this card declared; a missing one is a\n // wiring mistake that must not degrade into a silently inert control.\n if (spec === undefined) throw new Error(`plugin card has no field ${field}`)\n return spec\n }\n\n private snapshotOf(): SettingsFormScopeSnapshot<T> {\n return this.scope.getSnapshot()\n }\n\n private sectionValue(field: string): unknown {\n return (this.snapshotOf().value as Record<string, unknown> | undefined)?.[field]\n }\n\n private baseValue(field: string): unknown {\n return (this.snapshotOf().base as Record<string, unknown> | undefined)?.[field]\n }\n\n private userLayer(): Record<string, unknown> | undefined {\n return this.snapshotOf().user as Record<string, unknown> | undefined\n }\n\n private stored(field: string): boolean {\n const user = this.userLayer()\n return user !== undefined && Object.hasOwn(user, field)\n }\n\n private publish(): void {\n for (const listener of this.listeners) listener()\n }\n}\n","/**\n * The client's ONE syntax highlighter: a synchronous fine-grained shiki core\n * (JavaScript regex engine — no oniguruma WASM, bundle-friendly) with an\n * explicit grammar allowlist and a CSS-variables theme. Colors live in the\n * theme package's token sheets as `--shiki-*` custom properties (light and\n * dark blocks), never here — the repo's tokens-only styling rule.\n *\n * Only the three markdown-fence and `run_code` grammars (TypeScript, shell,\n * JSON) load into the singleton at boot — the set every session renders. Every\n * other language in the shared extension table\n * (`@deepseek-ai/dsh-util-code-language`: python, rust, yaml, markup, …) is\n * imported lazily and registered the first time such a language is requested,\n * so a session that never opens a code surface in one of those languages pays\n * neither the grammar modules nor their synchronous init. The first render of a\n * lazy language falls back to plain text while its grammar loads, then\n * {@link onGrammarLoaded} notifies subscribers to re-render with highlighting.\n * An unknown or absent language falls back to plain text (no highlighting, still\n * monospace) — never an error.\n */\n\nimport { createHighlighterCoreSync, createCssVariablesTheme } from 'shiki/core'\nimport { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor } from 'shiki/engine/javascript'\nimport langTs from '@shikijs/langs/typescript'\nimport langBash from '@shikijs/langs/shellscript'\nimport langJson from '@shikijs/langs/json'\nimport type { GrammarState, HighlighterCore, ThemedToken } from 'shiki/core'\nimport type { CSSProperties } from 'react'\n\n/** A shiki grammar module's default export (a `LanguageRegistration[]`), taken\n * from a boot grammar so no direct `@shikijs/types` dependency is needed. */\ntype LangModule = { default: typeof langTs }\n\n/**\n * Grammars the singleton loads at boot; each entry's own `name` is the id\n * `codeToTokens`/`codeToHtml` resolve. The JS-family aliases (js/jsx/ts/tsx)\n * resolve to the TypeScript grammar rather than a separate one: it tokenizes\n * plain TS/JS exactly, and JSX/TSX approximately (shiki's TS grammar is not the\n * dedicated TSX grammar, so JSX elements tokenize imperfectly) — an accepted\n * trade to keep the boot set to one JS-family grammar. Every other language in\n * the shared extension table loads lazily through {@link LAZY_GRAMMARS}.\n */\nconst LANGS = [langTs, langBash, langJson]\n\n/**\n * Replace the Go grammar's repeated one-line struct-field rule with the rule\n * worlpaker/go-syntax merged in 4a9b120a52c (https://github.com/worlpaker/go-syntax/pull/25):\n * the repeated rule backtracks exponentially on lines such as a brace-bearing\n * comment after `struct {`. Delete this patch once `@shikijs/langs` ships that\n * commit; 4.5.0 does not. The rule is located as the only rule in\n * `struct_variables_types_fields` containing the field-token literal below,\n * taken from `@shikijs/langs` 4.4.3.\n * @param grammars - the `@shikijs/langs/go` default export, left unmodified.\n * @returns copies of `grammars` with that rule's match replaced in the `go` grammar.\n * @throws When the module has no `go` grammar, the grammar lacks\n * `struct_variables_types_fields`, or that entry has no or several such rules.\n * The lazy load then rejects unhandled and Go code renders as plain text.\n */\nexport function patchGoGrammar(grammars: LangModule['default']): LangModule['default'] {\n const go = grammars.find(grammar => grammar.name === 'go')\n const fields = go?.repository.struct_variables_types_fields\n const patterns = fields?.patterns ?? []\n const rules = patterns.filter(rule => typeof rule.match === 'string' && rule.match.includes('[^\"/`\\\\s]+;?'))\n if (go === undefined || fields === undefined || rules.length !== 1) {\n throw new Error(`ui-primitives: expected exactly one Go struct-field rule to patch for worlpaker/go-syntax#25, found ${\n rules.length}; update or delete the patch`)\n }\n const repository = { ...go.repository }\n repository.struct_variables_types_fields = {\n ...fields,\n patterns: patterns.map(rule => rule === rules[0]\n ? { ...rule, match: '(?:(?<=\\\\{)([^/\\\\`\"]*[^\\\\s/\\\\`\"])\\\\s*(?=\\\\}))' }\n : rule),\n }\n return grammars.map(grammar => grammar === go ? { ...go, repository } : grammar)\n}\n\n/** The Perl grammar's bare `/…/` rule begins a match only after these characters or at line start. */\nconst PERL_FIND_BEGIN = '(?<=[\\\\&({|~]|if|unless|^)\\\\s*((/))'\n\n/**\n * Words after which a Perl `/` starts a match rather than a division. A word\n * counts only when no identifier character, sigil, `>`, `:` or `-` precedes it,\n * so `$split / 2` and `$obj->return / 2` stay divisions. Each word is a\n * separate fixed-length lookbehind alternative because the JavaScript engine's\n * Oniguruma translator rejects nested lookbehinds.\n */\nconst PERL_FIND_WORDS = ['if', 'unless', 'split', 'grep', 'and', 'or', 'not', 'return', 'while', 'until']\n\n/**\n * Widen the vendored Perl grammar's bare `/…/` match rule, which begins only\n * after `&`, `(`, `{`, `|`, `~`, `if`, `unless` or at line start. Elsewhere,\n * such as `split /^---\\s*$/m, $text`, the pattern body tokenizes as code: its\n * `m,` opens an `m` match delimited by commas that runs to the end of the\n * source. The patched rule also begins after `,`, `!`, `=` and `=>`, and after\n * the list operators `split` and `grep`, the low-precedence operators `and`,\n * `or` and `not`, and `return`, `while`, `until`, `if` and `unless` when no\n * identifier character, sigil, `>`, `:` or `-` precedes the word. The upstream\n * textmate/perl.tmbundle grammar, which `@shikijs/langs` 4.4.3 ships through\n * VS Code, has the same rule.\n * @param grammars - the `@shikijs/langs/perl` default export, left unmodified.\n * @returns copies of `grammars` with that rule's begin replaced in the `perl` grammar.\n * @throws When the module has no `perl` grammar or that grammar has no or several\n * top-level rules with the vendored begin pattern. The lazy load then rejects\n * unhandled and Perl code renders as plain text.\n */\nexport function patchPerlGrammar(grammars: LangModule['default']): LangModule['default'] {\n const perl = grammars.find(grammar => grammar.name === 'perl')\n const rules = perl?.patterns.filter(rule => rule.begin === PERL_FIND_BEGIN) ?? []\n if (perl === undefined || rules.length !== 1) {\n throw new Error(`ui-primitives: expected exactly one Perl match rule to patch, found ${rules.length}; update or delete the patch`)\n }\n const words = PERL_FIND_WORDS.flatMap(word => [`[^\\\\w$@%&>:-]${word}`, `^${word}`]).join('|')\n const begin = `(?<=[\\\\&({|~,!=]|=>|^|${words})\\\\s*((/))`\n const patterns = perl.patterns.map(rule => rule === rules[0] ? { ...rule, begin } : rule)\n return grammars.map(grammar => grammar === perl ? { ...perl, patterns } : grammar)\n}\n\n/**\n * The non-boot extension grammars, each behind a dynamic import so its module\n * stays out of the boot chunk until a code surface renders that language.\n * Keyed by the grammar id (`LanguageRegistration.name`) the aliases resolve to.\n * `@shikijs/langs`' default export is a `LanguageRegistration[]`; the loader\n * hands the whole array to `loadLanguageSync`, which registers each entry\n * (including embedded sub-grammars). The three boot grammars are absent —\n * already loaded, so no alias value ever points at a missing entry here.\n */\nconst LAZY_GRAMMARS = new Map<string, () => Promise<LangModule>>([\n ['python', () => import('@shikijs/langs/python')],\n ['ruby', () => import('@shikijs/langs/ruby')],\n ['go', async () => ({ default: patchGoGrammar((await import('@shikijs/langs/go')).default) })],\n ['rust', () => import('@shikijs/langs/rust')],\n ['java', () => import('@shikijs/langs/java')],\n ['c', () => import('@shikijs/langs/c')],\n ['cpp', () => import('@shikijs/langs/cpp')],\n ['csharp', () => import('@shikijs/langs/csharp')],\n ['kotlin', () => import('@shikijs/langs/kotlin')],\n ['swift', () => import('@shikijs/langs/swift')],\n ['php', () => import('@shikijs/langs/php')],\n ['yaml', () => import('@shikijs/langs/yaml')],\n ['toml', () => import('@shikijs/langs/toml')],\n ['ini', () => import('@shikijs/langs/ini')],\n ['markdown', () => import('@shikijs/langs/markdown')],\n ['mdx', () => import('@shikijs/langs/mdx')],\n ['html', () => import('@shikijs/langs/html')],\n ['css', () => import('@shikijs/langs/css')],\n ['scss', () => import('@shikijs/langs/scss')],\n ['less', () => import('@shikijs/langs/less')],\n ['sql', () => import('@shikijs/langs/sql')],\n ['xml', () => import('@shikijs/langs/xml')],\n ['lua', () => import('@shikijs/langs/lua')],\n ['bat', () => import('@shikijs/langs/bat')],\n ['powershell', () => import('@shikijs/langs/powershell')],\n ['fish', () => import('@shikijs/langs/fish')],\n ['dotenv', () => import('@shikijs/langs/dotenv')],\n ['log', () => import('@shikijs/langs/log')],\n ['csv', () => import('@shikijs/langs/csv')],\n ['diff', () => import('@shikijs/langs/diff')],\n ['http', () => import('@shikijs/langs/http')],\n ['rst', () => import('@shikijs/langs/rst')],\n ['latex', () => import('@shikijs/langs/latex')],\n ['bibtex', () => import('@shikijs/langs/bibtex')],\n ['asciidoc', () => import('@shikijs/langs/asciidoc')],\n ['r', () => import('@shikijs/langs/r')],\n ['julia', () => import('@shikijs/langs/julia')],\n ['dart', () => import('@shikijs/langs/dart')],\n ['scala', () => import('@shikijs/langs/scala')],\n ['clojure', () => import('@shikijs/langs/clojure')],\n ['erlang', () => import('@shikijs/langs/erlang')],\n ['elixir', () => import('@shikijs/langs/elixir')],\n ['haskell', () => import('@shikijs/langs/haskell')],\n ['fsharp', () => import('@shikijs/langs/fsharp')],\n ['vb', () => import('@shikijs/langs/vb')],\n ['perl', async () => ({ default: patchPerlGrammar((await import('@shikijs/langs/perl')).default) })],\n ['verilog', () => import('@shikijs/langs/verilog')],\n ['system-verilog', () => import('@shikijs/langs/system-verilog')],\n ['graphql', () => import('@shikijs/langs/graphql')],\n ['proto', () => import('@shikijs/langs/proto')],\n ['hcl', () => import('@shikijs/langs/hcl')],\n ['nix', () => import('@shikijs/langs/nix')],\n ['vue', () => import('@shikijs/langs/vue')],\n ['svelte', () => import('@shikijs/langs/svelte')],\n ['make', () => import('@shikijs/langs/make')],\n ['cmake', () => import('@shikijs/langs/cmake')],\n ['groovy', () => import('@shikijs/langs/groovy')],\n])\n\n/**\n * Language ids (and aliases) the highlighter accepts; everything else renders\n * plain. A Map, not an object: fence info strings are assistant-authored, so\n * a label like `constructor` or `__proto__` must miss instead of resolving an\n * inherited property and crashing the renderer inside shiki. Keys cover both\n * the markdown-fence aliases `CodeBlock` uses, the file-extension language ids\n * `@deepseek-ai/dsh-util-code-language` resolves, and the short ids\n * `readLangHintForPath` persists, so every caller resolves the same grammars.\n * A new short name in the shared table must be aliased here too. The JS family maps to the TypeScript grammar (see {@link LANGS} for\n * the JSX/TSX approximation). A value not in {@link LANGS} names a\n * {@link LAZY_GRAMMARS} entry loaded on first use.\n */\nconst LANG_ALIASES = new Map<string, string>([\n ['typescript', 'typescript'],\n ['ts', 'typescript'],\n ['tsx', 'typescript'],\n ['javascript', 'typescript'],\n ['js', 'typescript'],\n ['jsx', 'typescript'],\n ['shellscript', 'shellscript'],\n ['bash', 'shellscript'],\n ['sh', 'shellscript'],\n ['shell', 'shellscript'],\n ['zsh', 'shellscript'],\n ['json', 'json'],\n ['jsonc', 'json'],\n ['py', 'python'],\n ['python', 'python'],\n ['rb', 'ruby'],\n ['ruby', 'ruby'],\n ['go', 'go'],\n ['rs', 'rust'],\n ['rust', 'rust'],\n ['java', 'java'],\n ['c', 'c'],\n ['cpp', 'cpp'],\n ['cs', 'csharp'],\n ['csharp', 'csharp'],\n ['kotlin', 'kotlin'],\n ['swift', 'swift'],\n ['php', 'php'],\n ['yaml', 'yaml'],\n ['yml', 'yaml'],\n ['toml', 'toml'],\n ['ini', 'ini'],\n ['md', 'markdown'],\n ['markdown', 'markdown'],\n ['mdx', 'mdx'],\n ['html', 'html'],\n ['css', 'css'],\n ['scss', 'scss'],\n ['less', 'less'],\n ['sql', 'sql'],\n ['xml', 'xml'],\n ['lua', 'lua'],\n ['bat', 'bat'],\n ['batch', 'bat'],\n ['powershell', 'powershell'],\n ['ps1', 'powershell'],\n ['ps', 'powershell'],\n ['fish', 'fish'],\n ['properties', 'ini'],\n ['dotenv', 'dotenv'],\n ['env', 'dotenv'],\n ['log', 'log'],\n ['csv', 'csv'],\n ['diff', 'diff'],\n ['patch', 'diff'],\n ['http', 'http'],\n ['rst', 'rst'],\n ['latex', 'latex'],\n ['tex', 'latex'],\n ['bibtex', 'bibtex'],\n ['bib', 'bibtex'],\n ['asciidoc', 'asciidoc'],\n ['adoc', 'asciidoc'],\n ['r', 'r'],\n ['julia', 'julia'],\n ['jl', 'julia'],\n ['dart', 'dart'],\n ['scala', 'scala'],\n ['clojure', 'clojure'],\n ['clj', 'clojure'],\n ['erlang', 'erlang'],\n ['erl', 'erlang'],\n ['elixir', 'elixir'],\n ['ex', 'elixir'],\n ['exs', 'elixir'],\n ['haskell', 'haskell'],\n ['hs', 'haskell'],\n ['fsharp', 'fsharp'],\n ['fs', 'fsharp'],\n ['fsi', 'fsharp'],\n ['fsx', 'fsharp'],\n ['vb', 'vb'],\n ['vbnet', 'vb'],\n ['perl', 'perl'],\n ['pl', 'perl'],\n ['pm', 'perl'],\n ['verilog', 'verilog'],\n // Shiki's own `v` grammar is the V language; the fence label and the `.v`\n // extension both name Verilog here, so a future V registration needs a\n // different alias.\n ['v', 'verilog'],\n ['system-verilog', 'system-verilog'],\n ['systemverilog', 'system-verilog'],\n ['sv', 'system-verilog'],\n ['svh', 'system-verilog'],\n ['graphql', 'graphql'],\n ['gql', 'graphql'],\n ['proto', 'proto'],\n ['protobuf', 'proto'],\n ['hcl', 'hcl'],\n ['tf', 'hcl'],\n ['tfvars', 'hcl'],\n ['nix', 'nix'],\n ['vue', 'vue'],\n ['svelte', 'svelte'],\n ['make', 'make'],\n ['makefile', 'make'],\n ['mk', 'make'],\n ['cmake', 'cmake'],\n ['groovy', 'groovy'],\n ['gradle', 'groovy'],\n])\n\n/**\n * Resolve a language hint to the grammar id {@link LANG_ALIASES} selects.\n * @param lang - Language hint from a code surface: a canonical grammar id or the read card's persisted short id.\n * @returns The resolved grammar id, or `undefined` when the table aliases no grammar.\n */\nexport function grammarForHint(lang: string | undefined): string | undefined {\n return lang === undefined ? undefined : LANG_ALIASES.get(lang.toLowerCase())\n}\n\n/**\n * Whether a language hint can use the shared syntax highlighter.\n * @param lang - Language hint from a code surface.\n * @returns Whether the hint resolves to a supported grammar.\n */\nexport function supportsHighlighting(lang: string | undefined): boolean {\n return grammarForHint(lang) !== undefined\n}\n\n/** All token colors resolve through `--shiki-*` custom properties (theme package sheets). */\nconst cssVariablesTheme = createCssVariablesTheme({\n name: 'css-variables',\n variablePrefix: '--shiki-',\n fontStyle: true,\n})\n\n/**\n * The client regex engine compiles each TextMate pattern when its scanner is\n * created. Shiki otherwise defers patterns longer than 3,000 characters until\n * their first match; that compilation counts against Shiki's 500 ms per-line\n * budget and can return a partial token stream under host contention. Eager\n * compilation leaves the same budget in place for scanning user content.\n */\nconst regexEngine = createJavaScriptRegexEngine({\n forgiving: true,\n regexConstructor: pattern => defaultJavaScriptRegexConstructor(pattern, {\n lazyCompileLength: Number.POSITIVE_INFINITY,\n }),\n})\n\n/**\n * Lines at least this many UTF-16 units long render as one uncolored token.\n * With the JavaScript regex engine, scanning one JavaScript string-literal\n * line costs about 70 ms at 1,000 units, 300 ms at 2,000, 600 ms at 5,000 and\n * 2.5 s at 10,000, so this cap keeps one line within a few frames. A skipped\n * line leaves the grammar state unchanged: a multi-line construct that opens\n * or closes on it colors the following lines as if the line were absent.\n */\nconst TOKENIZE_MAX_LINE_LENGTH = 1000\n\nlet singleton: HighlighterCore | undefined\n\n/** Representative paths through every boot grammar, compiled before user content is timed. */\nconst BOOT_GRAMMAR_WARMUPS = [\n { lang: 'typescript', code: 'const answer: number = 42' },\n { lang: 'shellscript', code: 'printf \\'%s\\\\n\\' \"$HOME\"' },\n { lang: 'json', code: '{\"ready\":true}' },\n] as const\n\n/** Construct and pre-tokenize the boot grammars outside the user-content scan budget. */\nfunction createHighlighter(): HighlighterCore {\n const instance = createHighlighterCoreSync({\n themes: [cssVariablesTheme],\n langs: LANGS,\n engine: regexEngine,\n })\n for (const sample of BOOT_GRAMMAR_WARMUPS) {\n instance.codeToTokens(sample.code, {\n lang: sample.lang,\n theme: 'css-variables',\n tokenizeTimeLimit: 0,\n })\n }\n return instance\n}\n\n/** The synchronous highlighter (one instance per document); pre-warmed below, lazy as the fallback. */\nfunction highlighter(): HighlighterCore {\n singleton ??= createHighlighter()\n return singleton\n}\n\n/** Grammar ids whose lazy import is in flight or done, so it is requested once. */\nconst requested = new Set<string>()\n/** Subscribers re-rendered after a lazy grammar registers (React callers). */\nconst listeners = new Set<() => void>()\n/** Bumped on each lazy-grammar load; the `useSyncExternalStore` snapshot. */\nlet loadCount = 0\n\n/**\n * Subscribe to lazy-grammar load completions; `listener` fires after a\n * {@link LAZY_GRAMMARS} grammar finishes registering on the singleton, so a\n * caller that rendered its plain fallback while the grammar loaded can\n * re-highlight. Uses the `useSyncExternalStore` subscribe signature; pair it with\n * {@link grammarLoadCount} as the snapshot. Returns an unsubscribe function.\n * @param listener - invoked (no args) on each grammar-load completion.\n * @returns a disposer that removes the listener.\n */\nexport function subscribeGrammarLoaded(listener: () => void): () => void {\n listeners.add(listener)\n return () => { listeners.delete(listener) }\n}\n\n/**\n * The lazy-grammar load counter — a value that changes on every load, so a\n * `useSyncExternalStore` snapshot re-renders the subscriber when a grammar\n * registers. Opaque: only its identity across renders matters.\n * @returns the current load count.\n */\nexport function grammarLoadCount(): number {\n return loadCount\n}\n\n/**\n * Ensure the grammar `resolved` names is registered. A boot grammar (not in\n * {@link LAZY_GRAMMARS}) and an already-loaded lazy grammar report ready\n * synchronously; a lazy grammar not yet loaded starts its import (once) and\n * reports not-ready, so the caller renders plain until a\n * {@link subscribeGrammarLoaded} listener fires.\n * @param resolved - the grammar id an alias resolved to.\n * @returns whether the grammar is registered and ready to tokenize now.\n */\nfunction ensureGrammar(resolved: string): boolean {\n const load = LAZY_GRAMMARS.get(resolved)\n // A boot grammar (already registered) has no lazy loader; it is always ready.\n if (load === undefined) return true\n if (highlighter().getLoadedLanguages().includes(resolved)) return true\n if (!requested.has(resolved)) {\n requested.add(resolved)\n void load().then((mod) => {\n highlighter().loadLanguageSync(mod.default)\n loadCount += 1\n for (const listener of listeners) listener()\n })\n }\n return false\n}\n\n// Engine + grammar construction costs a long task (~120-175ms); building it\n// during the first finalized fence's render would jank exactly when a stream\n// completes. Warm the singleton in a deferred task at module load (= plugin\n// boot) instead; the lazy path above stays as the correctness fallback for a\n// fence that renders before the timer fires. `unref` (Node-only) keeps a\n// non-browser import from pinning the event loop.\nconst warmupTimer = setTimeout(() => { highlighter() }, 0)\n;(warmupTimer as { unref?: () => void }).unref?.()\n\n/**\n * Highlight `code` into shiki's HTML (a single `<pre class=\"shiki\">` tree)\n * when `lang` maps to a registered grammar; `undefined` means the caller\n * renders its plain fallback. A lazy grammar not yet loaded returns `undefined`\n * for this call and loads in the background; subscribe with\n * {@link onGrammarLoaded} to re-highlight once it registers.\n * @param code - the source text.\n * @param lang - the language hint (a markdown fence info string or a fixed caller id).\n * @returns the highlighted HTML, or `undefined` for unknown or not-yet-loaded languages.\n */\nexport function highlightToHtml(code: string, lang: string | undefined): string | undefined {\n const resolved = grammarForHint(lang)\n if (resolved === undefined) return undefined\n if (!ensureGrammar(resolved)) return undefined\n return highlighter().codeToHtml(code, {\n lang: resolved, theme: 'css-variables', tokenizeMaxLineLength: TOKENIZE_MAX_LINE_LENGTH,\n })\n}\n\n/**\n * One highlighted run of a line: the text and the inline style shiki assigned\n * it. The css-variables theme colors every run through a `--shiki-*` custom\n * property, so `style.color` is always present; it is held as a style object\n * rather than a bare color so a run spreads onto a `<span style>` uniformly.\n */\nexport interface HighlightSpan {\n text: string\n style: CSSProperties\n}\n\n/** vscode-textmate FontStyle bits shiki folds into `text-decoration` values. */\nconst DECORATION_BITS: readonly (readonly [number, string])[] = [[4, 'underline'], [8, 'line-through']]\n\n/**\n * The inline style shiki's HTML arm assigns one token (`getTokenStyleObject`\n * mirrored onto React style keys): the css-variables color plus the\n * vscode-textmate font-style bits the theme lets through — italic (1), bold\n * (2), and the {@link DECORATION_BITS} decorations (the theme injects bold,\n * italic, and underline rules for markup scopes, so markdown fences carry\n * them). The theme has no per-scope backgrounds, so `background-color` never\n * occurs; the arm-parity tests fail loud if a shiki upgrade changes that.\n */\nfunction spanStyle(token: ThemedToken): CSSProperties {\n const style: CSSProperties = { color: token.color }\n /* v8 ignore next -- fontStyle is optional in ThemedToken's type; tokenizeWithTheme always stamps it. */\n const bits = token.fontStyle ?? 0\n if ((bits & 1) !== 0) style.fontStyle = 'italic'\n if ((bits & 2) !== 0) style.fontWeight = 'bold'\n const decorations = DECORATION_BITS.filter(([bit]) => (bits & bit) !== 0)\n if (decorations.length > 0) style.textDecoration = decorations.map(([, value]) => value).join(' ')\n return style\n}\n\n/**\n * Narrow one tokenized line to the runs a `<span style>` renders, folding a\n * whitespace-only run into the token that follows it — shiki's default\n * `mergeWhitespaces` HTML behavior — with each run styled through\n * {@link spanStyle}, so the streaming spans and the settled `codeToHtml`\n * swap render one identical span tree. shiki exempts underlined/struck\n * whitespace from the fold; under the css-variables theme that case cannot\n * occur — its only underline rule styles inline-link scopes, whose spaced\n * text tokenizes as one run, and it injects no strikethrough rule — so the\n * unconditional fold here stays equivalent (the markdown arm-parity test\n * pins it). A line-trailing whitespace-only run has no follower and keeps\n * its own span, as in shiki.\n */\nfunction lineSpans(line: ThemedToken[]): HighlightSpan[] {\n const spans: HighlightSpan[] = []\n let pendingWhitespace = ''\n for (const [index, token] of line.entries()) {\n if (/^\\s+$/.test(token.content) && index + 1 < line.length) {\n pendingWhitespace += token.content\n continue\n }\n spans.push({ text: pendingWhitespace + token.content, style: spanStyle(token) })\n pendingWhitespace = ''\n }\n return spans\n}\n\n/**\n * Incremental highlighter for one growing streaming fence. TextMate\n * tokenization is line-based and forward-only — a line's tokens depend only on\n * its own text and the grammar state entering it — so appended text never\n * changes a completed line's tokens. The session caches the spans of every\n * completed line together with the grammar state after them;\n * {@link updateFrame} reports only newly completed lines plus the still-growing\n * last line, while {@link update} materializes the complete compatibility\n * result. Per-call tokenization cost therefore excludes the completed prefix,\n * and the result equals a from-scratch tokenization of the same code.\n * Non-append input and a change of resolved grammar reset the cache and\n * re-tokenize fully, so any input stays correct.\n */\nexport class StreamingHighlightSession {\n /** Grammar id the cache was built with; a different resolution resets it. */\n private resolved: string | undefined\n /** Newline-terminated source prefix covered by {@link spans}. */\n private prefix = ''\n /** Cached spans, one entry per completed line of {@link prefix}. */\n private spans: HighlightSpan[][] = []\n /** Grammar state after {@link prefix}; undefined = the grammar's initial state. */\n private state: GrammarState | undefined\n private lastCode: string | undefined\n private lastLang: string | undefined\n private lastResult: HighlightSpan[][] | undefined\n private generation = 0\n private lastFrame: StreamingHighlightFrame | undefined\n\n private reset(resolved: string | undefined): void {\n this.resolved = resolved\n this.prefix = ''\n this.spans = []\n this.state = undefined\n this.generation += 1\n this.lastFrame = undefined\n }\n\n /** Tokenize `text` with `resolved`, resuming from the cached grammar state when one exists. */\n private tokenize(resolved: string, text: string): ThemedToken[][] {\n return highlighter().codeToTokensBase(text, {\n lang: resolved,\n theme: 'css-variables',\n tokenizeMaxLineLength: TOKENIZE_MAX_LINE_LENGTH,\n ...(this.state === undefined ? {} : { grammarState: this.state }),\n })\n }\n\n /**\n * Tokenize one update as a delta for a retained renderer.\n * @param code - the fence text accumulated so far.\n * @param lang - the language hint.\n * @returns Newly completed lines plus the current tail, or `undefined` for the plain arm.\n */\n updateFrame(code: string, lang: string | undefined): StreamingHighlightFrame | undefined {\n if (code === this.lastCode && lang === this.lastLang && this.lastFrame !== undefined) {\n return this.lastFrame\n }\n this.lastCode = code\n this.lastLang = lang\n this.lastResult = undefined\n const resolved = grammarForHint(lang)\n if (resolved === undefined || !ensureGrammar(resolved)) {\n this.reset(undefined)\n return undefined\n }\n if (resolved !== this.resolved || !code.startsWith(this.prefix)) this.reset(resolved)\n const firstNewLine = this.spans.length\n const rest = code.slice(this.prefix.length)\n const lastNewline = rest.lastIndexOf('\\n')\n if (lastNewline >= 0) {\n const grownEnd = rest[lastNewline - 1] === '\\r' ? lastNewline - 1 : lastNewline\n const tokens = this.tokenize(resolved, rest.slice(0, grownEnd))\n for (const line of tokens) this.spans.push(lineSpans(line))\n this.state = highlighter().getLastGrammarState(tokens)\n this.prefix = code.slice(0, this.prefix.length + lastNewline + 1)\n }\n this.lastFrame = {\n generation: this.generation,\n appended: this.spans.slice(firstNewLine),\n tail: this.tokenize(resolved, rest.slice(lastNewline + 1)).map(lineSpans),\n }\n return this.lastFrame\n }\n\n /**\n * Tokenize the fence's current text into per-line highlighted runs;\n * `undefined` means the caller renders its plain fallback. Idempotent per\n * (`code`, `lang`) input — repeated calls return the identical result array —\n * and a retained line keeps its span-array identity across growing calls, so\n * a React caller can reuse cached line elements. A lazy grammar not yet\n * loaded returns `undefined` and loads in the background exactly as\n * {@link highlightToHtml} does; the next call after it registers highlights.\n * @param code - the fence text accumulated so far (display-trimmed, no synthetic trailing newline).\n * @param lang - the language hint (a markdown fence info string).\n * @returns one entry per line of `code` (each an array of runs), or `undefined` for unknown or not-yet-loaded languages.\n */\n update(code: string, lang: string | undefined): readonly HighlightSpan[][] | undefined {\n if (code === this.lastCode && lang === this.lastLang && this.lastResult !== undefined) {\n return this.lastResult\n }\n const frame = this.updateFrame(code, lang)\n if (frame === undefined) return undefined\n this.lastResult = [...this.spans, ...frame.tail]\n return this.lastResult\n }\n}\n\n/** One retained-renderer update from {@link StreamingHighlightSession.updateFrame}. */\nexport interface StreamingHighlightFrame {\n /** Changes whenever prior completed lines must be discarded. */\n readonly generation: number\n /** Completed lines added since the preceding frame in this generation. */\n readonly appended: readonly HighlightSpan[][]\n /** The still-growing final line or lines, replaced by the next frame. */\n readonly tail: readonly HighlightSpan[][]\n}\n\n/**\n * Tokenize `code` into per-line highlighted runs when `lang` maps to a\n * registered grammar; `undefined` means the caller renders its plain fallback.\n * A line-numbered view needs the token runs split per line (one gutter number\n * per line), which the single-`<pre>` {@link highlightToHtml} does not expose,\n * so this returns shiki's own 2D line/token structure narrowed to what a run\n * renders. Each run's color is a `--shiki-*` custom property, keeping token\n * colors on the theme package's sheets exactly as the HTML path does; the\n * markup font-style bits the theme lets through (bold/italic/underline in\n * markdown scopes) are dropped — the line-numbered file view renders\n * color-only runs. The trailing newline shiki appends as a final empty line\n * is dropped so the run count matches the caller's own line array.\n * @param code - the source text.\n * @param lang - the language hint (a file-extension-derived language id).\n * @returns one entry per source line (each an array of runs), or `undefined` for unknown or not-yet-loaded languages.\n */\nexport function highlightLines(code: string, lang: string | undefined): HighlightSpan[][] | undefined {\n const resolved = grammarForHint(lang)\n if (resolved === undefined) return undefined\n if (!ensureGrammar(resolved)) return undefined\n const { tokens } = highlighter().codeToTokens(code, {\n lang: resolved, theme: 'css-variables', tokenizeMaxLineLength: TOKENIZE_MAX_LINE_LENGTH,\n })\n // shiki tokenizes `a\\nb` into two lines; a trailing newline (`a\\n`) adds a\n // third, empty line the caller's own line array does not carry. Drop that\n // one terminator line so the two structures stay in step. The explicit\n // `last !== undefined` (over `tokens[...]?.length`) keeps a single branch for\n // per-file coverage, matching TerminalBlock's terminator check.\n const last = tokens[tokens.length - 1]\n const lines = tokens.length > 1 && last !== undefined && last.length === 0\n ? tokens.slice(0, -1)\n : tokens\n return lines.map(line => line.map(token => ({ text: token.content, style: { color: token.color } })))\n}\n","/** Shared filename-to-grammar selection and lazy line highlighter for source views. */\nimport { useCallback, useSyncExternalStore } from 'react'\nimport {\n grammarLoadCount, highlightLines, subscribeGrammarLoaded, type HighlightSpan,\n} from './markdown/highlight.ts'\n\n// The single extension table is owned by `@deepseek-ai/dsh-util-code-language`,\n// shared with the Host read card; re-export it so Client callers keep importing\n// the language selector and the preview registry's suffix list from this package.\nexport { CODE_HIGHLIGHT_EXTENSIONS, languageForPath } from '@deepseek-ai/dsh-util-code-language'\n\n/** Highlight one source fragment into one token list per line. */\nexport type CodeHighlighter = (code: string) => HighlightSpan[][] | undefined\n\n/**\n * Bind the shared lazy highlighter to one language and refresh after its grammar loads.\n * @param language - grammar hint selected from the source filename.\n * @returns a stable fragment highlighter; unknown and loading grammars return `undefined` for plain-text fallback.\n */\nexport function useCodeHighlighter(language: string | undefined): CodeHighlighter {\n const loaded = useSyncExternalStore(subscribeGrammarLoaded, grammarLoadCount, grammarLoadCount)\n return useCallback(code => highlightLines(code, language), [language, loaded])\n}\n\nexport type { HighlightSpan }\n","/**\n * Compact relative-time bucketing shared by every surface that dates a\n * session. Bucketing is here so two surfaces naming the same session agree;\n * the words stay in each plugin's own dictionary, per locale-owned copy.\n *\n * @module @deepseek-ai/dsh-client-ui-primitives/relative-time\n */\n\n/** Relative-time bucket of a dated row's trailing label. */\nexport type RelativeTimeUnit = 'now' | 'minutes' | 'hours' | 'days' | 'months' | 'years'\n\n/** Structured relative time: the bucket plus its magnitude (0 for 'now'). */\nexport interface RelativeTime {\n unit: RelativeTimeUnit\n n: number\n}\n\n/**\n * Compact relative time, as a structured bucket the renderer localizes\n * (\"now\"/\"5min\"/\"3h\"/\"2d\"/\"4mo\"/\"1y\" in en).\n * @param at - epoch ms of the dated moment.\n * @param now - current epoch ms (injected for pure rendering).\n * @returns the row's trailing time bucket and magnitude.\n */\nexport function relativeTime(at: number, now: number): RelativeTime {\n const MIN = 60_000\n const HOUR = 3_600_000\n const DAY = 86_400_000\n const diff = Math.max(0, now - at)\n if (diff < MIN) return { unit: 'now', n: 0 }\n if (diff < HOUR) return { unit: 'minutes', n: Math.floor(diff / MIN) }\n if (diff < DAY) return { unit: 'hours', n: Math.floor(diff / HOUR) }\n if (diff < 30 * DAY) return { unit: 'days', n: Math.floor(diff / DAY) }\n if (diff < 365 * DAY) return { unit: 'months', n: Math.floor(diff / (30 * DAY)) }\n return { unit: 'years', n: Math.floor(diff / (365 * DAY)) }\n}\n","/**\n * Shared ranking for `/` menu candidates: the query must be a\n * case-insensitive ordered subsequence of the candidate name or, when the\n * candidate carries one, of its display label (a localized title). Prefix\n * hits rank first, then the strongest alignment score over either key, then\n * the source order of the input. Decision record:\n * .agents/notes/archived/feature/2026-08-04-web-slash-command-fuzzy-discovery.md\n */\n\n/** One match with its stable source position. */\ninterface Ranked<T> {\n readonly item: T\n readonly index: number\n readonly prefix: boolean\n readonly score: number\n}\n\n/** Extra weight for name starts and separator boundaries. */\nfunction boundaryBonus(name: string, index: number): number {\n return index === 0 || name.charAt(index - 1) === '-' || name.charAt(index - 1) === '_' ? 8 : 0\n}\n\n/**\n * Score the strongest ordered-subsequence alignment in O(name × query).\n * Boundary and adjacent matches earn weight; skipped and leading characters\n * cost weight. Undefined when the query is not a subsequence of the name.\n */\nfunction alignmentScore(name: string, query: string): number | undefined {\n if (query.length > name.length) return undefined\n const noMatch = Number.NEGATIVE_INFINITY\n let previous = Array<number>(name.length).fill(noMatch)\n for (let index = 0; index < name.length; index++) {\n if (name.charAt(index) === query.charAt(0)) previous[index] = 1 + boundaryBonus(name, index) - index\n }\n for (let queryIndex = 1; queryIndex < query.length; queryIndex++) {\n const current = Array<number>(name.length).fill(noMatch)\n // Sweep the previous row once: `left` is its score one character back\n // (the adjacent continuation), `leftLeft` two back (the earliest gapped one).\n let left = noMatch\n let leftLeft = noMatch\n let bestGapped = noMatch\n for (const [index, prior] of previous.entries()) {\n if (leftLeft !== noMatch) bestGapped = Math.max(bestGapped, leftLeft + index - 2)\n if (name.charAt(index) === query.charAt(queryIndex)) {\n const bonus = 1 + boundaryBonus(name, index)\n let score = noMatch\n if (left !== noMatch) score = left + bonus + 4\n if (bestGapped !== noMatch) score = Math.max(score, bestGapped + bonus + 1 - index)\n current[index] = score\n }\n leftLeft = left\n left = prior\n }\n previous = current\n }\n let best = noMatch\n for (const score of previous) best = Math.max(best, score)\n return best === noMatch ? undefined : best\n}\n\n/**\n * Rank named items by a menu query.\n * @param items - candidates in source order (a host catalog, then client\n * contributions); an item's optional `label` is a second search key beside\n * its name.\n * @param rawQuery - the text typed after the trigger, matched case-insensitively.\n * @returns the matching items: prefix hits first, then by alignment score,\n * then in source order. The input list itself for an empty query.\n */\nexport function rankByName<T extends { readonly name: string; readonly label?: string }>(\n items: readonly T[],\n rawQuery: string,\n): readonly T[] {\n const query = rawQuery.toLowerCase()\n if (query === '') return items\n const ranked: Ranked<T>[] = []\n items.forEach((item, index) => {\n const keys = item.label === undefined ? [item.name] : [item.name, item.label]\n let prefix = false\n let score: number | undefined\n for (const key of keys) {\n const lower = key.toLowerCase()\n const keyScore = alignmentScore(lower, query)\n if (keyScore === undefined) continue\n prefix ||= lower.startsWith(query)\n score = score === undefined ? keyScore : Math.max(score, keyScore)\n }\n if (score !== undefined) ranked.push({ item, index, prefix, score })\n })\n ranked.sort((left, right) =>\n Number(right.prefix) - Number(left.prefix) || right.score - left.score || left.index - right.index)\n return ranked.map(match => match.item)\n}\n","/** macOS desktop detection for hiddenInset-titlebar layout variants. */\n\n/**\n * Whether the client runs in the macOS desktop shell: the Electron preload\n * marks `<html>` with `data-platform=\"darwin\"`; plain web never sets it.\n * Read at render time — the mark may arrive as late as DOMContentLoaded.\n * @returns true only inside the macOS Electron shell.\n */\nexport function isDarwinDesktop(): boolean {\n return document.documentElement.dataset.platform === 'darwin'\n}\n","import clsx from 'clsx'\nimport { useCallback, useEffect, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from 'react'\nimport type {\n CSSProperties,\n KeyboardEvent as ReactKeyboardEvent,\n MouseEvent as ReactMouseEvent,\n ReactNode,\n} from 'react'\nimport { IconCheckOutlineRegular, IconCopyOutlineRegular, IconWrapLinesOutlineRegular } from './icons/index.tsx'\nimport { Menu } from './Menu.tsx'\nimport type { MenuEntry } from './Menu.tsx'\nimport css from './JsonTree.module.css'\n\nconst OBJECT_PREVIEW_LIMIT = 4\nconst ARRAY_PREVIEW_LIMIT = 5\nconst PREVIEW_DEPTH_LIMIT = 2\n\n/**\n * Display copy for the tree's copy affordance; the owner passes localized\n * labels (this package is cordis-free, so copy arrives via props).\n */\nexport interface JsonTreeLabels {\n /** Menu item: copy the raw primitive value. */\n copyValue: string\n /** Menu item: copy the value as compact JSON (primitive rows). */\n copyJson: string\n /** Menu item: copy the property path. */\n copyPath: string\n /** Menu item: copy the value as pretty-printed JSON. */\n copyPrettyJson: string\n /** Menu item: copy the value as compact JSON (object rows). */\n copyCompactJson: string\n /** Copy-button state label after a successful copy. */\n copied: string\n /** Copy-button state label after a failed copy. */\n copyFailed: string\n /** Expander aria label while expanded. */\n collapseNode: string\n /** Expander aria label while collapsed. */\n expandNode: string\n /** Copy-button tooltip, given the current action label. */\n copyButtonTitle: (action: string) => string\n}\n\nfunction valueCopyMenuItems(labels: JsonTreeLabels): readonly MenuEntry[] {\n return [\n { id: 'value', label: labels.copyValue },\n { id: 'json', label: labels.copyJson },\n { id: 'path', label: labels.copyPath },\n ]\n}\n\nfunction objectCopyMenuItems(labels: JsonTreeLabels): readonly MenuEntry[] {\n return [\n { id: 'prettyJson', label: labels.copyPrettyJson },\n { id: 'json', label: labels.copyCompactJson },\n { id: 'path', label: labels.copyPath },\n ]\n}\n\ntype JsonPath = readonly (number | string)[]\n\ninterface RowTarget {\n path: JsonPath\n value: unknown\n}\n\ntype CopyMode = 'json' | 'path' | 'prettyJson' | 'value'\n\ninterface CopySnapshot {\n id: string\n target: RowTarget\n state: 'idle' | 'copied' | 'failed'\n menuOpen: boolean\n}\n\n/** Notify only the old and new row actions; JSON values do not subscribe to hover state. */\nfunction createCopyStore() {\n let current: CopySnapshot | undefined\n const listeners = new Map<string, Set<() => void>>()\n return {\n get: () => current,\n set(next: CopySnapshot | undefined) {\n const previous = current?.id\n current = next\n for (const id of new Set([previous, next?.id])) {\n if (id === undefined) continue\n for (const listener of listeners.get(id) ?? []) listener()\n }\n },\n subscribe(id: string, listener: () => void) {\n let row = listeners.get(id)\n if (row === undefined) listeners.set(id, row = new Set())\n row.add(listener)\n return () => {\n row.delete(listener)\n if (row.size === 0) listeners.delete(id)\n }\n },\n }\n}\n\nfunction JsonCopyAction({ store, target, persistent, labels, onCopy, onClose }: {\n store: ReturnType<typeof createCopyStore>\n target: RowTarget\n persistent: boolean\n labels: JsonTreeLabels\n onCopy: (target: RowTarget, mode: CopyMode) => Promise<void>\n onClose: () => void\n}) {\n const id = pathId(target.path)\n const subscribe = useCallback((listener: () => void) => store.subscribe(id, listener), [id, store])\n const getSnapshot = () => {\n const current = store.get()\n return current?.id === id ? current : undefined\n }\n const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot)\n const buttonRef = useRef<HTMLButtonElement>(null)\n const state = snapshot?.state ?? 'idle'\n const object = typeof target.value === 'object' && target.value !== null\n const copyTitle = state === 'copied'\n ? labels.copied\n : state === 'failed'\n ? labels.copyFailed\n : object ? labels.copyPrettyJson : labels.copyValue\n return (\n <span className={css.copySlot}>\n {(persistent || snapshot !== undefined) && (\n <Menu\n open={snapshot?.menuOpen === true}\n compact\n portal\n align=\"end\"\n anchor={(\n <button\n ref={buttonRef}\n type=\"button\"\n className={css.actionButton}\n data-json-copy-button\n data-state={state}\n aria-label={copyTitle}\n title={labels.copyButtonTitle(copyTitle)}\n onClick={() => void onCopy(target, object ? 'prettyJson' : 'value')}\n onContextMenu={(event) => {\n event.preventDefault()\n event.stopPropagation()\n store.set({ id, target, state, menuOpen: true })\n }}\n >\n {state === 'copied'\n ? <IconCheckOutlineRegular size={12} />\n : <IconCopyOutlineRegular size={12} />}\n </button>\n )}\n items={object ? objectCopyMenuItems(labels) : valueCopyMenuItems(labels)}\n onSelect={(mode) => {\n void onCopy(target, mode as CopyMode)\n }}\n onClose={onClose}\n anchorRef={buttonRef}\n />\n )}\n </span>\n )\n}\n\nfunction isExpandableValue(value: unknown): value is object | unknown[] {\n return typeof value === 'object' && value !== null && !(value instanceof Date)\n}\n\nfunction entriesOf(value: object | unknown[]): readonly (readonly [string, unknown])[] {\n if (Array.isArray(value)) {\n return value.map((item, index) => [String(index), item] as const)\n }\n return Object.keys(value).map(key => [\n key,\n (value as Record<string, unknown>)[key],\n ] as const)\n}\n\nfunction bracketOf(value: object | unknown[]): readonly [string, string] {\n return Array.isArray(value) ? ['[', ']'] : ['{', '}']\n}\n\nfunction previewPrimitive(value: unknown): ReactNode {\n if (value === null) return <span className={css.keywordValue}>null</span>\n if (typeof value === 'string') {\n return <span className={css.stringValue}>{JSON.stringify(value)}</span>\n }\n if (typeof value === 'number') {\n return <span className={css.numberValue}>{String(value)}</span>\n }\n if (typeof value === 'boolean') {\n return <span className={css.keywordValue}>{String(value)}</span>\n }\n if (typeof value === 'bigint') {\n return <span className={css.otherValue}>{value.toString()}</span>\n }\n if (typeof value === 'undefined') {\n return <span className={css.otherValue}>undefined</span>\n }\n if (typeof value === 'symbol') {\n return <span className={css.otherValue}>{value.description ?? 'Symbol'}</span>\n }\n if (typeof value === 'function') {\n return <span className={css.otherValue}>{value.name || 'Function'}</span>\n }\n return null\n}\n\nfunction previewValue(value: unknown, depth: number): ReactNode {\n if (!isExpandableValue(value)) return previewPrimitive(value)\n\n const array = Array.isArray(value)\n const entries = entriesOf(value)\n const limit = array ? ARRAY_PREVIEW_LIMIT : OBJECT_PREVIEW_LIMIT\n const visible = entries.slice(0, limit)\n const [open, close] = bracketOf(value)\n\n return (\n <>\n <span className={css.punctuation}>{open}</span>\n {depth >= PREVIEW_DEPTH_LIMIT\n ? <span className={css.previewEllipsis}>…</span>\n : visible.map(([key, item], index) => (\n <span key={key}>\n {index > 0 && <span className={css.punctuation}>, </span>}\n {!array && (\n <>\n <span className={css.previewProperty}>{key}</span>\n <span className={css.punctuation}>: </span>\n </>\n )}\n {previewValue(item, depth + 1)}\n </span>\n ))}\n {depth < PREVIEW_DEPTH_LIMIT && entries.length > limit && (\n <span className={css.previewEllipsis}>, …</span>\n )}\n <span className={css.punctuation}>{close}</span>\n </>\n )\n}\n\nfunction primitiveValue(value: unknown): ReactNode {\n if (value === null) return <span className={css.keywordValue}>null</span>\n if (typeof value === 'string') {\n return <span className={css.stringValue}>{JSON.stringify(value)}</span>\n }\n if (typeof value === 'boolean') {\n return <span className={css.keywordValue}>{String(value)}</span>\n }\n if (typeof value === 'number') {\n return <span className={css.numberValue}>{String(value)}</span>\n }\n if (typeof value === 'bigint') {\n return <span className={css.numberValue}>{`${value.toString()}n`}</span>\n }\n if (value instanceof Date) {\n return <span className={css.otherValue}>{value.toISOString()}</span>\n }\n if (typeof value === 'function') {\n return <span className={css.otherValue}>function() {'{ }'}</span>\n }\n if (typeof value === 'undefined') {\n return <span className={css.otherValue}>undefined</span>\n }\n return <span className={css.otherValue}>{(value as symbol).toString()}</span>\n}\n\nfunction fieldText(field: string): string {\n return field === '' ? '\"\"' : field\n}\n\nfunction pathId(path: JsonPath): string {\n return path.map(part => (\n typeof part === 'number' ? `n${String(part)}` : `s${String(part.length)}:${part}`\n )).join('/')\n}\n\nfunction claimFocus(button: HTMLElement): void {\n button.focus()\n}\n\nfunction moveFocus(button: HTMLElement, direction: -1 | 1): void {\n const tree = button.closest<HTMLElement>('[role=\"tree\"]')\n /* v8 ignore next -- JsonTree attaches expander handlers only beneath its owning role=tree. */\n if (tree === null) return\n const expanders = Array.from(tree.querySelectorAll<HTMLElement>('[data-json-expander]'))\n const current = expanders.indexOf(button)\n /* v8 ignore next -- the current expander is a member of the queried non-empty set. */\n if (current < 0 || expanders.length === 0) return\n const next = (current + direction + expanders.length) % expanders.length\n const nextExpander = expanders[next]\n /* v8 ignore next -- modulo over the non-empty expander set always resolves a member. */\n if (nextExpander !== undefined) claimFocus(nextExpander)\n}\n\nfunction NodeField({\n field,\n expandable,\n onToggle,\n}: {\n field: string | undefined\n expandable: boolean\n onToggle: () => void\n}) {\n if (field === undefined) return null\n return (\n <span\n className={clsx(css.label, expandable && css.clickableLabel)}\n onClick={expandable ? onToggle : undefined}\n >\n {fieldText(field)}:\n </span>\n )\n}\n\ninterface JsonTreeNodeProps {\n collapsedStringLines: number\n stringWrapping: JsonTreeProps['stringWrapping']\n field?: string\n initialExpanded: boolean\n labels: JsonTreeLabels\n lastElement: boolean\n onClaimTabStop: (id: string) => void\n onRowHover: (row: HTMLElement, target: RowTarget) => void\n path: JsonPath\n renderCopy: ((target: RowTarget, persistent?: boolean) => ReactNode) | undefined\n tabStopId: string | null\n value: unknown\n}\n\nfunction JsonString({\n collapsedStringLines,\n stringWrapping,\n field,\n labels,\n lastElement,\n renderCopy,\n value,\n}: {\n collapsedStringLines: number\n stringWrapping: JsonTreeProps['stringWrapping']\n field: string | undefined\n labels: JsonTreeLabels\n lastElement: boolean\n renderCopy: ((persistent?: boolean) => ReactNode) | undefined\n value: string\n}) {\n const contentsId = useId()\n const contentRef = useRef<HTMLSpanElement>(null)\n const rawRef = useRef<HTMLPreElement>(null)\n const [expanded, setExpanded] = useState(false)\n const [wrapped, setWrapped] = useState(false)\n const [truncated, setTruncated] = useState(false)\n\n useLayoutEffect(() => {\n if (expanded) return\n const content = contentRef.current as HTMLSpanElement\n const measure = () => {\n const lineHeight = Number.parseFloat(getComputedStyle(content).lineHeight)\n setTruncated(content.scrollHeight > lineHeight * collapsedStringLines)\n }\n measure()\n if (typeof ResizeObserver === 'undefined') return\n const observer = new ResizeObserver(measure)\n observer.observe(content)\n return () => { observer.disconnect() }\n }, [collapsedStringLines, expanded, field, lastElement, value])\n\n useLayoutEffect(() => {\n if (!expanded) return\n const raw = rawRef.current as HTMLPreElement\n // Keep raw text within the window and clipping ancestors outside the tree.\n // Capture scrolling because an ancestor can move the string without resizing it.\n const clips: HTMLElement[] = []\n const tree = raw.closest<HTMLElement>(`.${css.root}`) as HTMLElement\n for (let parent = tree.parentElement; parent !== null; parent = parent.parentElement) {\n if (/auto|scroll|hidden|clip/.test(getComputedStyle(parent).overflowY)) clips.push(parent)\n }\n const measure = () => {\n let top = 0\n let bottom = window.innerHeight\n for (const clip of clips) {\n const rect = clip.getBoundingClientRect()\n const style = getComputedStyle(clip)\n top = Math.max(top, rect.top + clip.clientTop)\n bottom = Math.min(bottom, rect.top + clip.clientTop + clip.clientHeight\n - Number.parseFloat(style.paddingBottom))\n }\n const available = bottom - Math.max(top, raw.getBoundingClientRect().top)\n raw.style.maxHeight = `${Math.max(16, available - 4)}px`\n }\n measure()\n const observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(measure)\n observer?.observe(raw)\n for (const clip of clips) observer?.observe(clip)\n window.addEventListener('resize', measure)\n window.addEventListener('scroll', measure, true)\n return () => {\n observer?.disconnect()\n window.removeEventListener('resize', measure)\n window.removeEventListener('scroll', measure, true)\n }\n }, [expanded, value])\n\n if (expanded) {\n const fieldId = `${contentsId}-field`\n return (\n <div className={css.stringField} data-expanded>\n {field !== undefined && <span id={fieldId} className={css.label}>{fieldText(field)}:</span>}\n <pre\n ref={rawRef}\n id={contentsId}\n className={css.stringRaw}\n data-wrap={wrapped}\n tabIndex={0}\n aria-labelledby={field === undefined ? undefined : fieldId}\n >\n {value}\n </pre>\n {!lastElement && <span className={css.punctuation}>,</span>}\n <div className={css.stringActions}>\n {stringWrapping !== undefined && (\n <button\n type=\"button\"\n className={css.actionButton}\n aria-label={stringWrapping.label}\n title={stringWrapping.label}\n aria-pressed={wrapped}\n aria-controls={contentsId}\n onClick={() => {\n const next = !wrapped\n setWrapped(next)\n stringWrapping.setDefault(next)\n }}\n >\n <IconWrapLinesOutlineRegular size={12} />\n </button>\n )}\n <button\n type=\"button\"\n className={css.actionButton}\n aria-label={labels.collapseNode}\n title={labels.collapseNode}\n aria-expanded\n aria-controls={contentsId}\n onClick={() => { setExpanded(false) }}\n >\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d=\"M9.5 1.5V6.5H14.5M1.5 9.5H6.5V14.5\" />\n </svg>\n </button>\n {renderCopy?.(true)}\n </div>\n </div>\n )\n }\n\n return (\n <>\n {renderCopy?.()}\n <span className={css.stringField} data-expanded={expanded}>\n <span ref={contentRef} id={contentsId} className={css.stringText}>\n {truncated && (\n <span className={css.stringToggleSlot}>\n <button\n type=\"button\"\n className={css.stringToggle}\n aria-label={labels.expandNode}\n aria-expanded={false}\n aria-controls={contentsId}\n onClick={() => {\n setWrapped(stringWrapping?.getDefault() ?? false)\n setExpanded(true)\n }}\n >\n <span aria-hidden=\"true\">…</span>{labels.expandNode}\n </button>\n </span>\n )}\n {field !== undefined && <span className={css.label}>{fieldText(field)}:</span>}\n {primitiveValue(value)}\n {!lastElement && <span className={css.punctuation}>,</span>}\n </span>\n </span>\n </>\n )\n}\n\nfunction JsonTreeNode({\n collapsedStringLines,\n stringWrapping,\n field,\n initialExpanded,\n labels,\n lastElement,\n onClaimTabStop,\n onRowHover,\n path,\n renderCopy,\n tabStopId,\n value,\n}: JsonTreeNodeProps) {\n const contentsId = useId()\n const expanderRef = useRef<HTMLSpanElement>(null)\n const [expanded, setExpanded] = useState(initialExpanded)\n const nodeId = pathId(path)\n const container = isExpandableValue(value)\n const entries = container ? entriesOf(value) : []\n const expandable = entries.length > 0\n\n const toggle = () => {\n setExpanded(current => !current)\n claimFocus(expanderRef.current as HTMLSpanElement)\n }\n\n const onExpanderKeyDown = (event: ReactKeyboardEvent<HTMLSpanElement>) => {\n if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {\n event.preventDefault()\n setExpanded(event.key === 'ArrowRight')\n return\n }\n if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n event.preventDefault()\n moveFocus(event.currentTarget, event.key === 'ArrowUp' ? -1 : 1)\n }\n }\n\n const row = (children: ReactNode, ariaExpanded?: boolean) => (\n <div\n className={css.row}\n role=\"treeitem\"\n aria-expanded={ariaExpanded}\n onMouseOver={(event) => {\n event.stopPropagation()\n onRowHover(event.currentTarget, { path, value })\n }}\n >\n {typeof value !== 'string' && renderCopy?.({ path, value })}\n {children}\n </div>\n )\n\n if (typeof value === 'string') {\n return row(\n <JsonString\n collapsedStringLines={collapsedStringLines}\n stringWrapping={stringWrapping}\n field={field}\n value={value}\n labels={labels}\n lastElement={lastElement}\n renderCopy={renderCopy === undefined ? undefined : persistent => renderCopy({ path, value }, persistent)}\n />,\n )\n }\n\n if (!container) {\n return row((\n <>\n <NodeField field={field} expandable={false} onToggle={toggle} />\n {primitiveValue(value)}\n {!lastElement && <span className={css.punctuation}>,</span>}\n </>\n ))\n }\n\n const [open, close] = bracketOf(value)\n if (!expandable) {\n return row((\n <>\n <NodeField field={field} expandable={false} onToggle={toggle} />\n <span className={css.punctuation}>{open}</span>\n <span className={css.punctuation}>{close}</span>\n {!lastElement && <span className={css.punctuation}>,</span>}\n </>\n ))\n }\n\n return row((\n <>\n <span\n ref={expanderRef}\n className={clsx(css.expander, expanded ? css.collapseIcon : css.expandIcon)}\n data-json-expander\n role=\"button\"\n aria-label={expanded ? labels.collapseNode : labels.expandNode}\n aria-expanded={expanded}\n aria-controls={expanded ? contentsId : undefined}\n tabIndex={tabStopId === nodeId ? 0 : -1}\n onFocus={() => { onClaimTabStop(nodeId) }}\n onClick={toggle}\n onKeyDown={onExpanderKeyDown}\n />\n <span className={css.summary}>\n <NodeField field={field} expandable onToggle={toggle} />\n <span className={css.preview}>{previewValue(value, 0)}</span>\n {!lastElement && <span className={css.punctuation}>,</span>}\n </span>\n {expanded && (\n <ul id={contentsId} role=\"group\" className={css.children}>\n {entries.map(([key, item], index) => (\n <JsonTreeNode\n key={key}\n collapsedStringLines={collapsedStringLines}\n stringWrapping={stringWrapping}\n field={key}\n value={item}\n path={[...path, Array.isArray(value) ? index : key]}\n labels={labels}\n lastElement={index === entries.length - 1}\n initialExpanded={false}\n tabStopId={tabStopId}\n onClaimTabStop={onClaimTabStop}\n onRowHover={onRowHover}\n renderCopy={renderCopy}\n />\n ))}\n </ul>\n )}\n </>\n ), expanded)\n}\n\nfunction formattedPath(path: JsonPath): string {\n return path.reduce<string>((result, part) => {\n if (typeof part === 'number') return `${result}[${String(part)}]`\n return /^[A-Za-z_$][\\w$]*$/.test(part)\n ? `${result}.${part}`\n : `${result}[${JSON.stringify(part)}]`\n }, '$')\n}\n\nfunction copyText(target: RowTarget, mode: CopyMode): string {\n if (mode === 'path') return formattedPath(target.path)\n if (mode === 'prettyJson') return JSON.stringify(target.value, null, 2)\n if (mode === 'json') return JSON.stringify(target.value)\n if (typeof target.value === 'string') return target.value\n if (typeof target.value === 'undefined') return 'undefined'\n if (typeof target.value === 'bigint') return target.value.toString()\n if (typeof target.value === 'symbol') return target.value.description ?? 'Symbol'\n if (typeof target.value === 'function') return target.value.name || 'Function'\n return JSON.stringify(target.value)\n}\n\n/** Props for the read-only, token-themed JSON tree. */\nexport interface JsonTreeProps {\n /** Parsed JSON object or array. */\n data: object | unknown[]\n /** Accessible label for the tree. */\n label: string\n /** Optional positioning class owned by the caller. */\n className?: string | undefined\n /** Maximum visible lines per collapsed string; defaults to 3. */\n collapsedStringLines?: number\n /** Optional wrap toggle; each expansion reads the shared default without changing other open strings. */\n stringWrapping?: {\n /** Localized label for the wrapping toggle. */\n label: string\n /** Read the wrapping preference when a string is expanded. @returns Whether to wrap long lines. */\n getDefault: () => boolean\n /** Remember a user toggle for future expansions. @param wrapped - Whether to wrap long lines. */\n setDefault: (wrapped: boolean) => void\n } | undefined\n /** Whether JSON rows expose copy actions. */\n copyable?: boolean\n /** Whether the top-level object or array is always expanded. */\n expandTopLevel?: boolean\n /** Localized display copy supplied by the owning render site. */\n labels: JsonTreeLabels\n}\n\n/**\n * Render parsed JSON as a compact, keyboard-accessible inspector tree.\n * @param props - Parsed data, accessible label, and display options.\n * @returns A read-only JSON tree with an optionally fixed-open top level.\n */\nexport function JsonTree({\n data,\n label,\n className,\n collapsedStringLines = 3,\n stringWrapping,\n copyable = true,\n expandTopLevel = true,\n labels,\n}: JsonTreeProps) {\n const rootEntries = entriesOf(data)\n const firstExpandableIndex = rootEntries.findIndex(([, value]) => (\n isExpandableValue(value) && entriesOf(value).length > 0\n ))\n const firstExpandableEntry = rootEntries[firstExpandableIndex]\n const initialTabStopId = expandTopLevel\n ? firstExpandableEntry === undefined\n ? null\n : pathId([Array.isArray(data) ? firstExpandableIndex : firstExpandableEntry[0]])\n : isExpandableValue(data) && rootEntries.length > 0 ? pathId([]) : null\n const activeRowRef = useRef<HTMLElement>()\n const resetTimer = useRef<ReturnType<typeof setTimeout>>()\n const copySequence = useRef(0)\n const [copyStore] = useState(createCopyStore)\n const [tabStopId, setTabStopId] = useState<string | null>(initialTabStopId)\n\n const setActiveRow = (row: HTMLElement | undefined) => {\n activeRowRef.current?.removeAttribute('data-json-copy-active')\n activeRowRef.current = row\n row?.setAttribute('data-json-copy-active', '')\n }\n\n const clearCopyTarget = () => {\n copySequence.current += 1\n if (resetTimer.current !== undefined) clearTimeout(resetTimer.current)\n setActiveRow(undefined)\n copyStore.set(undefined)\n }\n\n useEffect(() => () => {\n copySequence.current += 1\n if (resetTimer.current !== undefined) clearTimeout(resetTimer.current)\n activeRowRef.current?.removeAttribute('data-json-copy-active')\n }, [])\n\n useEffect(() => {\n clearCopyTarget()\n setTabStopId(initialTabStopId)\n }, [data, expandTopLevel, initialTabStopId])\n\n const handleRowHover = (row: HTMLElement, target: RowTarget) => {\n if (!copyable || copyStore.get()?.menuOpen) return\n if (activeRowRef.current === row) return\n setActiveRow(row)\n copyStore.set({ id: pathId(target.path), target, state: 'idle', menuOpen: false })\n }\n\n const handleRootMouseOver = (event: ReactMouseEvent<HTMLDivElement>) => {\n if (!copyable || copyStore.get()?.menuOpen) return\n /* v8 ignore next -- browser mouse events delivered through React target an Element. */\n if (!(event.target instanceof Element)) return\n if (event.target.closest('[data-json-copy-button]') === null) clearCopyTarget()\n }\n\n const copy = async (target: RowTarget, mode: CopyMode) => {\n const sequence = ++copySequence.current\n const snapshot: CopySnapshot = {\n id: pathId(target.path), target, state: 'idle', menuOpen: false,\n }\n copyStore.set(snapshot)\n let state: CopySnapshot['state']\n try {\n await navigator.clipboard.writeText(copyText(target, mode))\n state = 'copied'\n } catch {\n state = 'failed'\n }\n const current = copyStore.get()\n if (sequence !== copySequence.current || current?.target !== target) return\n copyStore.set({ ...current, state })\n if (resetTimer.current !== undefined) clearTimeout(resetTimer.current)\n resetTimer.current = setTimeout(() => {\n const current = copyStore.get()\n if (current?.target === target) copyStore.set({ ...current, state: 'idle' })\n }, 1_500)\n }\n\n const [rootOpen, rootClose] = bracketOf(data)\n const renderCopy = copyable ? (target: RowTarget, persistent = false) => (\n <JsonCopyAction store={copyStore} target={target} persistent={persistent} labels={labels}\n onCopy={copy} onClose={clearCopyTarget} />\n ) : undefined\n\n return (\n <div\n className={clsx(css.root, className)}\n style={{ '--json-tree-collapsed-lines': collapsedStringLines } as CSSProperties}\n onMouseOver={handleRootMouseOver}\n onMouseLeave={() => {\n if (!copyStore.get()?.menuOpen) clearCopyTarget()\n }}\n >\n {expandTopLevel\n ? (\n <div className={css.expandedTopLevel}>\n <div\n className={clsx(css.row, css.topLevelBracket)}\n data-json-root-row\n onMouseOver={(event) => {\n event.stopPropagation()\n handleRowHover(event.currentTarget, { path: [], value: data })\n }}\n >\n {renderCopy?.({ path: [], value: data })}\n <span className={css.punctuation}>{rootOpen}</span>\n </div>\n <div\n aria-label={label}\n className={clsx(css.container, css.expandedTopLevelContainer)}\n role=\"tree\"\n >\n {rootEntries.map(([key, value], index) => (\n <JsonTreeNode\n key={key}\n collapsedStringLines={collapsedStringLines}\n stringWrapping={stringWrapping}\n field={key}\n value={value}\n path={[Array.isArray(data) ? index : key]}\n labels={labels}\n lastElement={index === rootEntries.length - 1}\n initialExpanded={false}\n tabStopId={tabStopId}\n onClaimTabStop={setTabStopId}\n onRowHover={handleRowHover}\n renderCopy={renderCopy}\n />\n ))}\n </div>\n <div className={clsx(css.row, css.topLevelBracket)}>\n <span className={css.punctuation}>{rootClose}</span>\n </div>\n </div>\n )\n : (\n <div aria-label={label} className={css.container} role=\"tree\">\n <JsonTreeNode\n collapsedStringLines={collapsedStringLines}\n stringWrapping={stringWrapping}\n value={data}\n path={[]}\n labels={labels}\n lastElement\n initialExpanded\n tabStopId={tabStopId}\n onClaimTabStop={setTabStopId}\n onRowHover={handleRowHover}\n renderCopy={renderCopy}\n />\n </div>\n )}\n </div>\n )\n}\n","// Strip control sequences that anser does not consume before resolving SGR\n// runs, so they cannot reach the DOM as literal characters.\n\nimport Anser from 'anser'\nimport type { CSSProperties } from 'react'\n\n/**\n * The subset of one anser JSON chunk this module reads. anser's own types\n * declare `fg`/`bg` as `string`, but its parser leaves them `null` for a run\n * that sets no color, so the null is spelled out here.\n */\ninterface AnsiChunk {\n /** Run text with its SGR codes already removed. */\n content: string\n /** Foreground as an `r, g, b` triple, or null when the run sets none. */\n fg: string | null\n /** Background as an `r, g, b` triple, or null when the run sets none. */\n bg: string | null\n /** SGR attributes in effect for the run, in the order they were declared. */\n decorations: readonly string[]\n}\n\n/** One run of terminal text; `style` is undefined for text that carries no SGR state. */\nexport interface AnsiSpan {\n /** The run's plain text, free of escape sequences and newlines. */\n text: string\n /** Resolved inline style, or undefined when the run needs no wrapper. */\n style: CSSProperties | undefined\n}\n\n/** The spans of one output line, in order. */\nexport type AnsiLine = readonly AnsiSpan[]\n\n/**\n * The 8/16 basic ANSI colors, keyed by the whitespace-free `r,g,b` triple\n * anser emits for them, mapped onto the theme tokens that carry the same\n * semantic. Black and white both resolve to the primary label color so text\n * stays legible under either theme instead of matching the surface it sits\n * on; bright black takes the tertiary label color (the muted-gray role).\n * Cyan and bright cyan take two static blues: the design system has no cyan,\n * and anser's literal bright cyan is unreadable on the light theme's code\n * surface. Magenta has no token equivalent and falls through to anser's\n * literal rgb, as do all 256-palette and truecolor values.\n */\nconst TOKEN_BY_BASIC_RGB: Record<string, string> = {\n '0,0,0': 'var(--dsw-alias-label-primary)',\n '255,255,255': 'var(--dsw-alias-label-primary)',\n '85,85,85': 'var(--dsw-alias-label-tertiary)',\n '187,0,0': 'var(--dsw-alias-state-error-primary)',\n '255,85,85': 'var(--dsw-alias-state-error-secondary)',\n '0,187,0': 'var(--dsw-alias-state-success-primary)',\n '0,255,0': 'var(--dsw-alias-state-success-secondary)',\n '187,187,0': 'var(--dsw-alias-state-warn-primary)',\n '255,255,85': 'var(--dsw-alias-state-warn-secondary)',\n '0,0,187': 'var(--dsw-alias-state-business-primary)',\n '85,85,255': 'var(--dsw-static-blue-400)',\n '0,187,187': 'var(--dsw-static-blue-600)',\n '85,255,255': 'var(--dsw-static-blue-500)',\n}\n\n/**\n * CSS for each SGR attribute anser reports. `blink` is deliberately absent —\n * animated text is not reproduced. `reverse` never arrives here: anser\n * consumes it by swapping the run's foreground and background. Underline and\n * strikethrough share `textDecoration`, so in a run declaring both, the\n * later declaration wins.\n */\nconst STYLE_BY_DECORATION: Record<string, CSSProperties | undefined> = {\n bold: { fontWeight: 700 },\n dim: { opacity: 0.7 },\n italic: { fontStyle: 'italic' },\n underline: { textDecoration: 'underline' },\n strikethrough: { textDecoration: 'line-through' },\n hidden: { visibility: 'hidden' },\n}\n\n/** OSC strings (window title, hyperlinks), with or without their terminator. */\nconst OSC_SEQUENCE = /\\u001b\\][^\\u0007\\u001b]*(?:\\u0007|\\u001b\\\\)?/g\n\n/** Escape sequences other than CSI: charset selection, single-shift, reset. */\nconst NON_CSI_ESCAPE = /\\u001b(?!\\[)[\\u0020-\\u002f]*[\\u0030-\\u007e]?/g\n\n/**\n * C0 controls with no display meaning here. Tab, newline, backspace and ESC\n * survive: the first two for layout, backspace for the cursor replay, ESC\n * for anser's CSI split.\n */\nconst INERT_CONTROL = /[\\u0000-\\u0007\\u000b-\\u001a\\u001c-\\u001f\\u007f]/g\n\n/**\n * Lines whose cursor movements have to be replayed: a carriage return, a\n * backspace, or an erase-in-line. The erase pattern matches the SAME CSI shape\n * `replayLine` parses (parameters may carry `;` and intermediate bytes), so a\n * form like `\\x1b[1;2K` cannot slip past this guard and skip its own erase.\n */\nconst NEEDS_REPLAY = /\\r|\\u0008|\\u001b\\[[\\u0030-\\u003f]*[\\u0020-\\u002f]*K/\n\n/** SGR sequences alone, for folding state through a line that needs no replay. */\nconst SGR_SEQUENCE = /\\u001b\\[([\\u0030-\\u003f]*)[\\u0020-\\u002f]*m/g\n\n/** Terminal tab stop width; a tab advances to the next multiple of this. */\nconst TAB_WIDTH = 8\n\n/**\n * Combining marks and other zero-width code points: a terminal advances no\n * column for them, so `e` + U+0301 occupies one cell and a two-column redraw\n * covers both code points.\n */\nconst ZERO_WIDTH = /^[\\p{Mn}\\p{Me}\\p{Cf}\\u200b-\\u200f\\u2060]$/u\n\n/**\n * Characters a terminal advances two columns for: CJK scripts, fullwidth forms,\n * CJK punctuation, and characters with emoji presentation. Text-presentation\n * symbols (`\\u2713`, `\\u26a0` and the rest of U+2600-U+27BF) are ONE column and\n * must stay out of this set.\n */\nconst WIDE_CHAR = new RegExp(\n '\\\\p{Script=Han}|\\\\p{Script=Hiragana}|\\\\p{Script=Katakana}|\\\\p{Script=Hangul}'\n // Emoji presentation only: the U+2600-U+27BF symbol block is mostly SINGLE\n // width — `\\u2713` (the check every progress line writes, this fixture\n // included) advances one column, verified against a real terminal, so taking\n // the whole block as wide misaligned exactly the output this card exists for.\n + '|\\\\p{Emoji_Presentation}'\n + '|[\\\\uff01-\\\\uff60\\\\u3000-\\\\u303e]',\n 'u',\n)\n\n/**\n * Whether a character occupies two terminal columns (CJK, fullwidth forms,\n * emoji). Covers the ranges a command's output realistically carries; a\n * narrower guess would misalign the columns this card exists to preserve.\n * @param char - one character from the output.\n * @returns true when the terminal advances two columns for it.\n */\nfunction isWide(char: string): boolean {\n const code = char.codePointAt(0)\n if (code === undefined || code < 0x1100) return false\n return WIDE_CHAR.test(char)\n}\n\n/**\n * A cell's graphic state, normalized. Held as fields rather than as the raw\n * sequence history because a terminal tracks CURRENT state, not a transcript:\n * accumulating sequences made each state boundary re-emit the whole chain, so\n * output that switches color without a full reset emitted O(n^2) characters\n * (3200 such cells produced 25 MB and eventually a `RangeError`). It also makes\n * the attribute closers every chalk-based tool writes — `39`, `49`, `22`, `23`,\n * `24`, `27`, `29` — actually close their attribute instead of appending to it.\n */\ninterface SgrState {\n fg: string\n bg: string\n /** Attribute parameters in force, e.g. `1` (bold) or `4` (underline). */\n attrs: readonly string[]\n}\n\n/** The default state: no color, no attributes. */\nconst SGR_NONE: SgrState = { fg: '', bg: '', attrs: [] }\n\n/** Attribute closers, mapped to the opener parameters each one turns off. */\nconst ATTR_CLOSERS: Record<string, readonly string[]> = {\n 22: ['1', '2'], 23: ['3'], 24: ['4'], 25: ['5', '6'], 27: ['7'], 28: ['8'], 29: ['9'],\n}\n\n/**\n * Fold one SGR sequence's parameters into the state it produces.\n * @param state - state in force before the sequence.\n * @param params - the sequence's raw parameter string (`31`, `1;4`, `38;5;208`).\n * @returns the state the sequence leaves in force.\n */\nfunction foldSgr(state: SgrState, params: string): SgrState {\n const codes = params === '' ? ['0'] : params.split(';')\n let next = state\n for (let index = 0; index < codes.length; index++) {\n const code = String(codes[index])\n if (code === '' || code === '0') { next = SGR_NONE; continue }\n // Extended color: `38;5;N` / `38;2;R;G;B` and the `48` background pair\n // consume their own arguments, so they are taken whole.\n if (code === '38' || code === '48') {\n const kind = codes[index + 1] ?? ''\n const span = kind === '2' ? 4 : kind === '5' ? 2 : 0\n const value = codes.slice(index, index + span + 1).join(';')\n next = code === '38' ? { ...next, fg: value } : { ...next, bg: value }\n index += span\n continue\n }\n const closes = ATTR_CLOSERS[code]\n if (closes !== undefined) {\n next = { ...next, attrs: next.attrs.filter(attr => !closes.includes(attr)) }\n continue\n }\n const numeric = Number(code)\n if (code === '39') { next = { ...next, fg: '' }; continue }\n if (code === '49') { next = { ...next, bg: '' }; continue }\n if ((numeric >= 30 && numeric <= 37) || (numeric >= 90 && numeric <= 97)) { next = { ...next, fg: code }; continue }\n if ((numeric >= 40 && numeric <= 47) || (numeric >= 100 && numeric <= 107)) { next = { ...next, bg: code }; continue }\n if (!next.attrs.includes(code)) next = { ...next, attrs: [...next.attrs, code] }\n }\n return next\n}\n\n/**\n * Render a state as the one canonical sequence that establishes it from the\n * default, so a boundary emits a bounded string no matter how the state was\n * reached.\n * @param state - the state to open.\n * @returns the SGR sequence, or the empty string for the default state.\n */\nfunction openSgr(state: SgrState): string {\n const codes = [...state.attrs]\n if (state.fg !== '') codes.push(state.fg)\n if (state.bg !== '') codes.push(state.bg)\n return codes.length === 0 ? '' : `\\u001b[${codes.join(';')}m`\n}\n\n/** Whether two states are the same, so a boundary is only emitted on a change. */\nfunction sameSgr(a: SgrState, b: SgrState): boolean {\n return a.fg === b.fg && a.bg === b.bg && a.attrs.length === b.attrs.length\n && a.attrs.every((attr, index) => attr === b.attrs[index])\n}\n\n/**\n * Replay one line's cursor movements the way a terminal paints it, into a\n * column buffer. Carriage return and backspace only MOVE the cursor — neither\n * erases anything — so what a reader sees is whatever each column last had\n * written to it. That distinction is the whole point of doing this as a buffer\n * rather than as string surgery: `100%\\rOK` shows `OK0%` because the redraw is\n * shorter than the frame beneath it, and a trailing `abc\\b` still shows `abc`\n * because nothing ever overwrote the `c`.\n *\n * A CSI sequence occupies no column; it changes the state that the NEXT writes\n * are stamped with, which is how a terminal stores color per cell. `red bad`\n * then three backspaces then `ok` therefore shows `okd` with the `d` still red:\n * `ok` overwrote two cells and the third kept the state it was written with.\n * The columns are re-emitted as runs, so anser sees that same styling.\n * @param line - one output line, still carrying its CSI sequences.\n * @param entrySgr - SGR state in force when the line begins, since a newline\n * does not reset it.\n * @returns the line as the terminal would have it after every movement, plus the\n * SGR state at its end for the next line to enter with.\n */\nfunction replayLine(line: string, entrySgr: SgrState): { text: string; sgr: SgrState } {\n // Same shape anser splits on, so a sequence is one unit here as well.\n const csi = /\\u001b\\[([\\u0030-\\u003f]*)[\\u0020-\\u002f]*([\\u0040-\\u007e])/g\n /** Per column: the state in force when it was written, and its character. */\n const columns: (Cell | undefined)[] = []\n let cursor = 0\n // State is tracked exactly as a terminal tracks it: each cell is stamped with\n // whatever was in force at the moment of the write, so a later redraw cannot\n // restyle the cells it does not reach. It enters carrying the previous line's\n // state, since a newline does not reset it.\n let sgr = entrySgr\n let at = 0\n\n /** Clear a cell and, for a wide pair, its partner: a terminal erases both. */\n const clear = (index: number, fill: string): void => {\n const cell = columns[index]\n if (cell?.spacer === true && index > 0) columns[index - 1] = { sgr, char: fill }\n else if (cell !== undefined && isWide(cell.char) && columns[index + 1]?.spacer === true) {\n columns[index + 1] = { sgr, char: fill }\n }\n columns[index] = { sgr, char: fill }\n }\n\n const consume = (chunk: string): void => {\n for (const char of chunk) {\n if (char === '\\r') { cursor = 0; continue }\n if (char === '\\u0008') { cursor = Math.max(0, cursor - 1); continue }\n if (char === '\\t') {\n // A tab advances to the next 8-column stop, leaving the cells it skips\n // as they were — which is how a redraw can leave a tabbed column\n // standing. Column alignment is the whole point of this card.\n const stop = cursor + TAB_WIDTH - (cursor % TAB_WIDTH)\n for (; cursor < stop; cursor++) columns[cursor] ??= { sgr, char: ' ' }\n continue\n }\n if (ZERO_WIDTH.test(char)) {\n // No column of its own: it attaches to the cell already written, so a\n // redraw that covers that cell covers the mark with it. With no cell to\n // attach to (line start, or straight after a redraw to column 0) a\n // terminal shows nothing rather than a lone accent.\n const base = cursor > 0 ? columns[cursor - 1] : undefined\n if (base !== undefined) columns[cursor - 1] = { sgr: base.sgr, char: base.char + char }\n continue\n }\n // Writing over either half of a wide pair blanks the other half, since a\n // terminal cannot leave one cell of a two-cell glyph standing.\n clear(cursor, ' ')\n columns[cursor] = { sgr, char }\n cursor++\n // A wide character occupies two columns; the trailing one is a spacer,\n // marked so that overwriting the lead cell leaves a blank behind instead\n // of closing the gap and shifting everything after it left.\n if (isWide(char)) { columns[cursor] = { sgr, char: '', spacer: true }; cursor++ }\n }\n }\n\n for (const match of line.matchAll(csi)) {\n consume(line.slice(at, match.index))\n at = match.index + match[0].length\n // Both groups are mandatory in the pattern, so destructuring types them as\n // strings without a fallback that could never run.\n const params = String(match[1])\n const final = String(match[2])\n if (final === 'K') {\n // Erase in line: the fixed companion of `\\r` in every spinner and progress\n // bar. Without it a shorter redraw leaves the previous frame's tail\n // standing, which is text the terminal never showed. `1` blanks from the\n // line start THROUGH the cursor column (inclusive, per the CSI spec)\n // rather than dropping those cells, since the cursor does not move and a\n // later write can still land past them. Only the FIRST parameter selects\n // the mode; a terminal ignores the rest (`1;2K` erases exactly as `1K`).\n const mode = String(params.split(';')[0])\n if (mode === '1') for (let index = 0; index <= cursor; index++) clear(index, ' ')\n else columns.length = mode === '2' ? 0 : cursor\n continue\n }\n // Only SGR carries graphic state; every other final byte is a cursor or\n // erase action that must not affect a cell's style.\n if (final !== 'm') continue\n sgr = foldSgr(sgr, params)\n }\n consume(line.slice(at))\n\n // Re-emit the columns, opening a run only where its state changes, so anser\n // sees the same styling a terminal shows. Each boundary emits ONE canonical\n // sequence for the state it opens, which is what keeps the output linear in\n // the number of cells however the state was reached.\n let out = ''\n let active = entrySgr\n for (let index = 0; index < columns.length; index++) {\n const column = columns[index] ?? { sgr: SGR_NONE, char: ' ' }\n if (!sameSgr(column.sgr, active)) {\n if (!sameSgr(active, SGR_NONE)) out += '\\u001b[0m'\n out += openSgr(column.sgr)\n active = column.sgr\n }\n // A spacer still holds its column. While its lead cell survives, the wide\n // glyph spans both and the spacer emits nothing; once a later write replaced\n // that lead, the terminal blanks the spacer instead of closing the gap, so\n // emitting nothing would shift everything after it one column left.\n const leadIntact = index > 0 && isWide(columns[index - 1]?.char ?? '')\n out += column.spacer === true && !leadIntact ? ' ' : column.char\n }\n // Converge to the state the SCAN ended in, not the last written cell's: a\n // sequence after the final write (the `\\x1b[0m` closing a colored line) changes\n // no cell yet still ends the run, and it has to reach both the DOM and the\n // next line. Without this a line ending in a reset leaked its color onward.\n if (!sameSgr(active, sgr)) {\n if (!sameSgr(active, SGR_NONE)) out += '\\u001b[0m'\n out += openSgr(sgr)\n }\n return { text: out, sgr }\n}\n\n/** One replayed column: the state it was written with, and its character. */\ninterface Cell {\n sgr: SgrState\n char: string\n /** The trailing half of a wide character's two-column pair. */\n spacer?: boolean\n}\n\n/**\n * Replay every line's cursor movements. A `\\r` that only terminates a CRLF line\n * is dropped first, so those lines keep their text instead of being redrawn onto\n * themselves. SGR state threads across lines: a newline does not reset it, so a\n * run opened before a redraw still colors the lines after it.\n * @param text - output text, already free of OSC and non-CSI escapes.\n * @returns the text with each line painted as the terminal would.\n */\nfunction applyCursorMovements(text: string): string {\n const replayed: string[] = []\n let sgr = SGR_NONE\n for (const raw of text.split('\\n')) {\n const line = raw.replace(/\\r+$/, '')\n if (NEEDS_REPLAY.test(line)) {\n const result = replayLine(line, sgr)\n replayed.push(result.text)\n sgr = result.sgr\n continue\n }\n // No cursor movement: the line needs no column buffer, and painting one\n // would allocate a cell per character of output this card never redraws —\n // an `ls -R` or a 5k-line log. Only its own SGR has to be folded, so a later\n // line that DOES replay enters with the right state.\n replayed.push(line)\n for (const match of line.matchAll(SGR_SEQUENCE)) sgr = foldSgr(sgr, String(match[1]))\n }\n return replayed.join('\\n')\n}\n\n/**\n * Remove every escape sequence and control character that carries no color,\n * leaving CSI sequences for anser and `\\n`/`\\t` for layout. Cursor movements\n * (carriage return, backspace) replay first, since their effect on the visible\n * text must land before the characters that expressed them are dropped.\n * @param text - raw command output.\n * @returns text whose only remaining escapes are CSI sequences.\n */\nfunction sanitize(text: string): string {\n const escaped = text.replace(OSC_SEQUENCE, '').replace(NON_CSI_ESCAPE, '')\n return applyCursorMovements(escaped).replace(INERT_CONTROL, '')\n}\n\n/**\n * Resolve one run's colors and decorations.\n * @param chunk - the anser chunk to style.\n * @returns the run's inline style, or undefined when it carries no SGR state.\n */\nfunction resolveStyle(chunk: AnsiChunk): CSSProperties | undefined {\n const style: CSSProperties = {}\n const background = chunk.bg === null ? undefined : `rgb(${chunk.bg})`\n if (background !== undefined) style.backgroundColor = background\n if (chunk.fg !== null) {\n const literal = `rgb(${chunk.fg})`\n // A run that paints its own background keeps anser's literal pair so the\n // authored foreground/background contrast survives; a foreground-only run\n // maps onto a theme token, which adapts to light and dark surfaces.\n style.color = background === undefined\n ? TOKEN_BY_BASIC_RGB[chunk.fg.replace(/\\s+/g, '')] ?? literal\n : literal\n }\n for (const decoration of chunk.decorations) Object.assign(style, STYLE_BY_DECORATION[decoration])\n return Object.keys(style).length === 0 ? undefined : style\n}\n\n/**\n * Parse command output into styled spans grouped by line.\n * @param text - raw output text, which may contain ANSI escape sequences.\n * @returns one entry per output line (always at least one, possibly empty).\n */\nexport function parseAnsiLines(text: string): AnsiLine[] {\n let current: AnsiSpan[] = []\n const lines: AnsiSpan[][] = [current]\n for (const chunk of Anser.ansiToJson(sanitize(text), { json: true, remove_empty: true })) {\n const style = resolveStyle(chunk)\n for (const [index, part] of chunk.content.split('\\n').entries()) {\n if (index > 0) {\n current = []\n lines.push(current)\n }\n if (part !== '') current.push({ text: part, style })\n }\n }\n return lines\n}\n","/** The head/tail split metrics for a capped list. */\nexport interface HeadTailCap {\n /** Rows beyond the cap (list length − maxLines); ≤ 0 means nothing is hidden. */\n hidden: number\n /** Whether the list is over the cap and not expanded, so it shows a head/tail slice. */\n capped: boolean\n /** Head-slice row count: `ceil(maxLines / 2)`. */\n headLines: number\n /** Tail-slice row count: the remainder after the head. */\n tailLines: number\n}\n\n/**\n * Compute the head/tail cap metrics for a list of `total` rows against `maxLines`,\n * given whether the surface is expanded. Pure arithmetic; the caller slices its\n * own rows with `headLines`/`tailLines` so a block can layer its own concerns\n * (SearchBlock restores a tail file header) on top.\n * @param total - the list's row count.\n * @param maxLines - the collapsed-height cap in rows.\n * @param expanded - whether the surface is expanded (uncaps the list).\n * @returns the split metrics.\n */\nexport function headTailCap(total: number, maxLines: number, expanded: boolean): HeadTailCap {\n const hidden = total - maxLines\n const headLines = Math.ceil(maxLines / 2)\n return { hidden, capped: hidden > 0 && !expanded, headLines, tailLines: maxLines - headLines }\n}\n","/** Selectable command text with keyboard access while horizontally overflowing. */\nimport { useLayoutEffect, useRef, useState } from 'react'\nimport clsx from 'clsx'\nimport css from './CommandText.module.css'\n\n/** Display text and owner-localized identification for a command scrollport. */\nexport interface CommandTextProps {\n /** Original command or formatted command arguments, without truncation. */\n text: string\n /** Accessible name while the text can scroll horizontally. */\n label: string\n /** Owner typography and positioning. */\n className?: string | undefined\n}\n\n/**\n * Render command text without adding Tab stops for content that fits.\n * @param props - Text, localized scrollport name, and owner styling.\n * @returns A horizontal text scrollport, named and keyboard-focusable only when overflowing.\n */\nexport function CommandText({ text, label, className }: CommandTextProps) {\n const ref = useRef<HTMLSpanElement>(null)\n const [overflow, setOverflow] = useState(false)\n useLayoutEffect(() => {\n const element = ref.current\n /* v8 ignore next -- the span is rendered unconditionally. */\n if (element === null) return undefined\n const measure = () => { setOverflow(element.scrollWidth > element.clientWidth) }\n measure()\n const observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(measure)\n observer?.observe(element)\n const fonts = 'fonts' in element.ownerDocument ? element.ownerDocument.fonts : undefined\n fonts?.addEventListener('loadingdone', measure)\n return () => {\n observer?.disconnect()\n fonts?.removeEventListener('loadingdone', measure)\n }\n }, [text])\n return (\n <span ref={ref} className={clsx(css.text, className)} data-command-text\n tabIndex={overflow ? 0 : undefined}\n role={overflow ? 'group' : undefined}\n aria-label={overflow ? label : undefined}\n >{text}</span>\n )\n}\n","import { useCallback, useMemo, useState } from 'react'\nimport clsx from 'clsx'\nimport { parseAnsiLines, type AnsiLine } from './ansi.ts'\nimport { headTailCap } from './head-tail-cap.ts'\nimport { useClipboardCopy } from './use-clipboard-copy.ts'\nimport { Pill } from './Pill.tsx'\nimport { StateDot, type StateDotState } from './StateDot.tsx'\nimport css from './TerminalBlock.module.css'\nimport { CommandText } from './CommandText.tsx'\n\n/** Output lines shown before the height cap collapses the middle. */\nexport const DEFAULT_TERMINAL_MAX_LINES = 16\n\n/**\n * Display copy for the terminal surface; the owner passes localized labels\n * (this package is cordis-free, so copy arrives via props).\n */\nexport interface TerminalBlockLabels {\n /** Accessible name for an overflowing authored command line, numbered from one. */\n commandLine: (line: number) => string\n /** Status pill text for a signal-terminated command. */\n signal: (signal: string) => string\n /** Status pill text for a non-zero exit code. */\n exitCode: (exitCode: number) => string\n /** Status pill text for a command that ended without an exit code: killed by a signal the view does not know, or never started. */\n noExitCode: string\n /** Run-state text while the command is still running. */\n running: string\n /** Run-state text for a signal or non-zero-exit settle. */\n failed: string\n /** Run-state text for a clean settle. */\n done: string\n /** Copy-button idle label. */\n copy: string\n /** Copy-button label during the post-copy confirmation window. */\n copied: string\n /** Placeholder when a settled command produced no visible output. */\n noOutput: string\n /** Collapse-toggle aria label while expanded. */\n collapseAria: string\n /** Collapse-toggle text while expanded. */\n collapse: string\n /** Expand-toggle aria label while capped, given the hidden line count. */\n expandAria: (hidden: number) => string\n /** Expand-toggle text while capped, given the hidden line count. */\n expand: (hidden: number) => string\n}\n\nexport interface TerminalBlockProps {\n /** The command, rendered verbatim after the prompt label; long lines scroll horizontally unless the host enables wrapping. */\n command: string\n /** Working directory for the prompt label; absent renders a plain `$`. */\n cwd?: string | undefined\n /** Absolute home directory, so a cwd equal to it collapses to `~`; absent disables that collapse. */\n home?: string | undefined\n /** The command's output text; may contain ANSI escape sequences. */\n output?: string | undefined\n /** Settled exit code; a non-zero value renders the status pill, and null (settled without one) the no-exit-code pill. */\n exitCode?: number | null | undefined\n /** Settled terminating signal name; any value renders the status pill, taking precedence over the exit code. */\n signal?: string | undefined\n /**\n * The command is still running: with no `output` the block shows the prompt\n * line alone; with output it renders the live text under the running state.\n */\n running?: boolean | undefined\n /**\n * The call launches background work (default false). `running` describes the\n * launch call only; after it returns, retain the command without job status\n * or output. An explicit `copyText` override remains available.\n */\n background?: boolean | undefined\n /** Height cap in output lines before the middle collapses (default {@link DEFAULT_TERMINAL_MAX_LINES}); Infinity disables the cap. */\n maxLines?: number | undefined\n /**\n * Copy-control payload override; the control copies the raw output when\n * absent. Supplying it also keeps the control rendered before any output\n * exists — a command is copyable before it prints.\n */\n copyText?: string | undefined\n /**\n * Draw the run-state dot and its assistive label in the card gutter\n * (default true). Hosts whose surrounding row already carries the same\n * state omit both and reclaim the gutter via `--dsl-terminal-gutter`.\n */\n runStateDot?: boolean | undefined\n /** Extra class merged onto the wrapper (callers position; this component draws). */\n className?: string | undefined\n /** Localized display copy supplied by the owning render site. */\n labels: TerminalBlockLabels\n}\n\n/**\n * Prompt label for a working directory: `~` for the home directory itself,\n * otherwise the path's last segment (both separators accepted, trailing\n * separators ignored), falling back to the path itself when it has no\n * segment.\n * @param cwd - the working directory path.\n * @param home - absolute home directory, when the caller knows it.\n * @returns the prompt label.\n */\nfunction promptLabel(cwd: string, home: string | undefined): string {\n const trimmed = cwd.replace(/[/\\\\]+$/, '')\n if (home !== undefined && trimmed === home.replace(/[/\\\\]+$/, '')) return '~'\n const segment = trimmed.split(/[/\\\\]/).pop()\n return segment === undefined || segment === '' ? cwd : segment\n}\n\n/**\n * Status pill text for a settled command, or undefined when the command\n * settled cleanly (exit 0, no signal) and needs no pill — the same\n * distinction the bash tool's own exit-status markers draw.\n * @param exitCode - settled exit code, when known; null when the command settled without one.\n * @param signal - settled terminating signal name, when known.\n * @param labels - display copy for the pill text.\n * @returns the pill text, or undefined for a clean exit.\n */\nfunction statusText(\n exitCode: number | null | undefined,\n signal: string | undefined,\n labels: TerminalBlockLabels,\n): string | undefined {\n if (signal !== undefined) return labels.signal(signal)\n if (exitCode === null) return labels.noExitCode\n if (exitCode !== undefined && exitCode !== 0) return labels.exitCode(exitCode)\n return undefined\n}\n\n/**\n * Run-state indicator for the command, shown at the head of the prompt line so\n * the card states whether the command is still running without the reader\n * having to infer it from the presence of output. Three of {@link StateDotState}'s\n * five states are reachable: the running chase (the same\n * indicator a running tool row's leading icon uses, so the row and its card\n * never disagree), green for a clean settle, red for a signal or a non-zero\n * exit — the same status distinction {@link statusText} draws for the pill. A\n * settled command whose exit status never reached the view counts as a clean\n * settle: the view says it finished and says nothing went wrong.\n * @param running - the command has not settled.\n * @param exitCode - settled exit code, when known; null when the command settled without one.\n * @param signal - settled terminating signal name, when known.\n * @param labels - display copy for the text label.\n * @returns the dot's state and its text label, since the dot is aria-hidden.\n */\nfunction runState(\n running: boolean,\n exitCode: number | null | undefined,\n signal: string | undefined,\n labels: TerminalBlockLabels,\n): { state: StateDotState; label: string } {\n if (running) return { state: 'ongoing', label: labels.running }\n if (statusText(exitCode, signal, labels) !== undefined) return { state: 'error', label: labels.failed }\n return { state: 'done', label: labels.done }\n}\n\n/**\n * Render one parsed output line. Runs without SGR state render as bare text,\n * so uncolored output carries no span wrappers.\n * @param line - the line's styled runs.\n * @returns the line's children.\n */\nfunction renderLine(line: AnsiLine) {\n return line.map((span, index) => span.style === undefined\n ? span.text\n : <span key={index} style={span.style}>{span.text}</span>)\n}\n\n/**\n * Render a shell command as a terminal surface.\n * @param props - see {@link TerminalBlockProps}.\n * @returns the terminal block element.\n */\nexport function TerminalBlock({\n command,\n cwd,\n home,\n output,\n exitCode,\n signal,\n running = false,\n background = false,\n maxLines = DEFAULT_TERMINAL_MAX_LINES,\n copyText,\n runStateDot = true,\n className,\n labels,\n}: TerminalBlockProps) {\n const copy = labels\n const text = output ?? ''\n // A command's output ends with a newline; that terminator is not an extra\n // blank line to draw or to count against the height cap. The check runs on the\n // PARSED lines rather than on the raw text, because a reset after the final\n // newline (`line\\n\\x1b[0m`) leaves the string not ending in one while still\n // producing a last line with nothing visible in it. A genuinely blank final\n // line — the double newline — survives, since it has a real empty line before\n // the terminator. The copy control's payload is unaffected.\n const lines = useMemo(() => {\n const parsed = parseAnsiLines(text)\n const last = parsed[parsed.length - 1]\n const terminated = parsed.length > 1 && last !== undefined\n && last.every(span => span.text === '')\n return terminated ? parsed.slice(0, -1) : parsed\n }, [text])\n const [expanded, setExpanded] = useState(false)\n // The raw output (or the caller's override), never the rendered tree: the\n // prompt line and the status pill are chrome the user did not run.\n const { copied, onCopy } = useClipboardCopy(copyText ?? text)\n\n const onToggle = useCallback(() => { setExpanded(value => !value) }, [])\n\n const status = background ? undefined : statusText(exitCode, signal, copy)\n const state = runState(running, exitCode, signal, copy)\n const showState = runStateDot && (!background || running)\n // A multi-line command gets one prompt row per line, so a two-command shell\n // snippet reads as the two commands it is instead of collapsing into one\n // ellipsized row. A trailing newline is a terminator, not an empty command.\n const commandLines = useMemo(() => {\n const body = command.endsWith('\\n') ? command.slice(0, -1) : command\n return body.split('\\n')\n }, [command])\n // Read from the parsed lines the card actually renders, not from the raw text:\n // output that is only escapes or control bytes (a lone reset, an OSC title, an\n // erase) survives `text.trim()` yet parses to nothing visible. Judging it on\n // the raw text would draw an output box of blank rows plus a copy control\n // for invisible bytes, and hide the placeholder that belongs there.\n const empty = lines.every(line => line.every(span => span.text.trim() === ''))\n const { hidden, capped, headLines, tailLines } = headTailCap(lines.length, maxLines, expanded)\n // A running command with nothing printed yet is banner-only; once it has\n // printed, the output streams in under the banner as it would in a terminal.\n const body = !background && (!running || !empty)\n\n return (\n <div\n className={clsx(css.block, className)}\n data-terminal=\"\"\n data-running={running ? '' : undefined}\n data-body={body ? '' : undefined}\n >\n <div className={css.header}>\n <div className={css.prompt}>\n {showState && <span className={css.runStateLabel}>{state.label}</span>}\n {commandLines.map((line, index) => (\n <div key={index} className={css.promptLine}>\n {/* One dot for the card, on the first row: the exit status the\n view carries is the whole call's, and bash reports no\n per-command status, so a dot per row would assert a\n per-line outcome nothing here knows. */}\n {index === 0 && showState && <StateDot state={state.state} className={css.runState} />}\n {/* The cwd labels the CALL, so only its first row carries it. The\n view knows one working directory — where the call started —\n and a later line may well run somewhere else (a `cd` in the\n command is enough), so repeating the label down the rows would\n assert a directory per line that nothing here knows. Later\n rows keep a bare `$` to stay aligned as prompts. */}\n <span className={css.cwd}>\n {index > 0 || cwd === undefined ? '$' : promptLabel(cwd, home)}\n </span>\n <CommandText className={css.command} text={line} label={copy.commandLine(index + 1)} />\n </div>\n ))}\n </div>\n {status !== undefined && <Pill className={css.status}>{status}</Pill>}\n {(copyText !== undefined || (!background && !running && !empty)) && (\n <button type=\"button\" className={css.copyButton} onClick={onCopy}>\n {copied ? copy.copied : copy.copy}\n </button>\n )}\n </div>\n {body && (empty\n ? <div className={css.empty}>{copy.noOutput}</div>\n : (\n <div className={css.output}>\n {(capped ? lines.slice(0, headLines) : lines).map((line, index) => (\n <div key={index} className={css.line}>{renderLine(line)}</div>\n ))}\n {hidden > 0 && (\n <button\n type=\"button\"\n className={css.expand}\n aria-expanded={expanded}\n aria-label={expanded ? copy.collapseAria : copy.expandAria(hidden)}\n onClick={onToggle}\n >\n {expanded ? copy.collapse : copy.expand(hidden)}\n </button>\n )}\n {capped && lines.slice(lines.length - tailLines).map((line, index) => (\n <div key={index} className={css.line}>{renderLine(line)}</div>\n ))}\n </div>\n ))}\n </div>\n )\n}\n","interface FoldToggleProps {\n className: string | undefined\n expanded: boolean\n hidden: number\n labels: {\n collapseAria: string\n expandAria: (hidden: number) => string\n collapse: string\n expand: (hidden: number) => string\n }\n onToggle: () => void\n}\n\n/**\n * Render the shared head-tail fold control with caller-owned localized copy.\n * @param props - Fold state, localized labels, and toggle callback.\n * @returns The accessible expand or collapse button.\n */\nexport function FoldToggle({\n className, expanded, hidden, labels, onToggle,\n}: FoldToggleProps) {\n return (\n <button\n type=\"button\"\n className={className}\n aria-expanded={expanded}\n aria-label={expanded ? labels.collapseAria : labels.expandAria(hidden)}\n onClick={onToggle}\n >\n {expanded ? labels.collapse : labels.expand(hidden)}\n </button>\n )\n}\n","/** Shared language, wrapping, and clipboard controls for code cards. */\nimport {\n IconCheckOutlineRegular, IconCopyOutlineRegular, IconNowrapFillRegular, IconWrapFillRegular,\n} from './icons/index.tsx'\nimport { Tooltip } from './Tooltip.tsx'\nimport { supportsHighlighting } from './markdown/highlight.ts'\nimport css from './CodeCard.module.css'\n\n/** Localized language fallback and wrapping actions supplied by the card owner. */\nexport interface CodeToolbarLabels {\n /** Title for an absent or unsupported language. */\n codeLabel: string\n /** Action that enables wrapping. */\n wrapLabel: string\n /** Action that preserves source columns with horizontal scrolling. */\n unwrapLabel: string\n}\n\n/** Display state and callbacks for a code card's toolbar. */\ninterface CodeToolbarProps {\n lang?: string | undefined\n title?: string | undefined\n status?: string | undefined\n labels: CodeToolbarLabels\n copyLabel: string\n copiedLabel: string\n copied: boolean\n wrapped: boolean\n onCopy?: (() => void) | undefined\n onWrap?: (() => void) | undefined\n}\n\n/**\n * Render a language label and keyboard-accessible icon actions with tooltips.\n * @param props - Localized labels, current state, and card-owned actions.\n * @returns The shared code-card header.\n */\nexport function CodeToolbar({ lang, title, status, labels, copyLabel, copiedLabel, copied, wrapped, onCopy, onWrap }: CodeToolbarProps) {\n const wrapLabel = wrapped ? labels.unwrapLabel : labels.wrapLabel\n const clipboardLabel = copied ? copiedLabel : copyLabel\n return (\n <div className={css.header} data-code-block-banner>\n <div className={css.heading}>\n <span className={css.language}>{supportsHighlighting(lang) ? lang : labels.codeLabel}</span>\n {title !== undefined && <span className={css.title} title={title}>{title}</span>}\n </div>\n <div className={css.actions}>\n {status !== undefined && <span className={css.status}>{status}</span>}\n {onWrap !== undefined && <Tooltip label={wrapLabel} side=\"top\" portal>\n <button type=\"button\" className={css.action} aria-label={labels.wrapLabel} aria-pressed={wrapped} onClick={onWrap}>\n {wrapped ? <IconNowrapFillRegular size={14} /> : <IconWrapFillRegular size={14} />}\n </button>\n </Tooltip>}\n {onCopy !== undefined && <Tooltip label={clipboardLabel} side=\"top\" portal>\n <button type=\"button\" className={css.action} aria-label={clipboardLabel} onClick={onCopy}>\n {copied ? <IconCheckOutlineRegular size={14} /> : <IconCopyOutlineRegular size={14} />}\n </button>\n </Tooltip>}\n </div>\n </div>\n )\n}\n","import { useCallback, useEffect, useState } from 'react'\nimport type { RefObject } from 'react'\nimport { supportsHighlighting } from './highlight.ts'\n\nconst noop = (): void => {}\n\n/** One document-wide observer; activated elements leave it permanently. */\nclass HighlightViewport {\n private observer: IntersectionObserver | undefined\n private readonly activators = new Map<Element, () => void>()\n\n observe(element: Element, activate: () => void): () => void {\n if (typeof IntersectionObserver === 'undefined') {\n activate()\n return noop\n }\n this.observer ??= new IntersectionObserver((entries) => {\n for (const entry of entries) {\n if (!entry.isIntersecting) continue\n const current = this.activators.get(entry.target)\n /* v8 ignore next -- the observer reports only elements still registered with it. */\n if (current === undefined) continue\n this.activators.delete(entry.target)\n this.observer?.unobserve(entry.target)\n current()\n }\n this.releaseEmptyObserver()\n })\n this.activators.set(element, activate)\n this.observer.observe(element)\n return () => {\n this.activators.delete(element)\n this.observer?.unobserve(element)\n this.releaseEmptyObserver()\n }\n }\n\n private releaseEmptyObserver(): void {\n if (this.activators.size > 0) return\n this.observer?.disconnect()\n this.observer = undefined\n }\n}\n\nconst highlightViewport = new HighlightViewport()\n\n/**\n * Activate one supported code surface when it first intersects the viewport.\n * Activation lasts for the component lifetime; browsers without\n * IntersectionObserver activate immediately.\n * @param target - Code surface whose plain rendering reserves its geometry.\n * @param lang - Optional language hint.\n * @returns Whether this component may build highlighted output.\n */\nexport function useViewportHighlighting(\n target: RefObject<Element>,\n lang: string | undefined,\n): boolean {\n const supported = supportsHighlighting(lang)\n const [activated, setActivated] = useState(false)\n const activate = useCallback(() => { setActivated(true) }, [])\n\n useEffect(() => {\n if (activated || !supported) return\n const element = target.current\n /* v8 ignore next -- React attaches the host ref before running effects. */\n if (element === null) return\n return highlightViewport.observe(element, activate)\n }, [activate, activated, supported, target])\n\n return activated && supported\n}\n","import { useCallback, useMemo, useRef, useState, useSyncExternalStore, type CSSProperties } from 'react'\nimport clsx from 'clsx'\nimport { FoldToggle } from './FoldToggle.tsx'\nimport { writeClipboard } from './clipboard.ts'\nimport { CodeToolbar, type CodeToolbarLabels } from './CodeToolbar.tsx'\nimport cardCss from './CodeCard.module.css'\nimport {\n grammarLoadCount,\n highlightLines,\n subscribeGrammarLoaded,\n type HighlightSpan,\n} from './markdown/highlight.ts'\nimport { useViewportHighlighting } from './markdown/useViewportHighlighting.ts'\nimport css from './ReadBlock.module.css'\n\n/**\n * Content lines shown before the height cap collapses the middle. Matches\n * TerminalBlock's default so a long read and a long command output cut at the\n * same place in the same flow.\n */\nexport const DEFAULT_READ_MAX_LINES = 16\n\n/** One line of the read window: its file line number and its text (no trailing newline). */\nexport interface ReadBlockLine {\n /** 1-based line number in the file (a window past an offset keeps the file's own numbering). */\n number: number\n /** The line's text, already truncated to the read tool's per-line cap. */\n text: string\n}\n\nexport interface ReadBlockProps {\n /** Banner label (the file path, or a tool-supplied replacement title); omitted draws no label. */\n label?: string | undefined\n /** The returned window's lines, in file order, each keeping its file line number. */\n lines: readonly ReadBlockLine[]\n /** Localized chrome supplied by the owning render site. */\n labels: ReadBlockLabels\n /** Exact total line count in the file, for the \"showing N of M\" note when the read is a window. */\n totalLines: number\n /** Grammar hint (a file-extension-derived language id); unknown or absent = plain monospace. */\n lang?: string | undefined\n /** Height cap in content lines before the middle collapses (default {@link DEFAULT_READ_MAX_LINES}). */\n maxLines?: number | undefined\n /** Extra class merged onto the wrapper (callers position; this component draws). */\n className?: string | undefined\n}\n\n/** Localized chrome for {@link ReadBlock}. */\nexport interface ReadBlockLabels extends CodeToolbarLabels {\n window: (shown: number, total: number) => string\n copy: string\n copied: string\n collapseAria: string\n expandAria: (hidden: number) => string\n collapse: string\n expand: (hidden: number) => string\n}\n\nfunction renderSpans(spans: readonly HighlightSpan[]) {\n return spans.map((span, index) => <span key={index} style={span.style}>{span.text}</span>)\n}\n\n/**\n * Render a read tool result as a line-numbered, optionally syntax-highlighted\n * file view.\n * @param props - see {@link ReadBlockProps}.\n * @returns the read block element.\n */\nexport function ReadBlock({\n label,\n labels,\n lines,\n totalLines,\n lang,\n maxLines = DEFAULT_READ_MAX_LINES,\n className,\n}: ReadBlockProps) {\n const rootRef = useRef<HTMLDivElement>(null)\n const highlighting = useViewportHighlighting(rootRef, lang)\n // Whole-window highlighting preserves multiline grammar context; copy uses\n // the same text without gutter or banner chrome.\n const raw = useMemo(() => lines.map(line => line.text).join('\\n'), [lines])\n // Re-render when a lazy grammar finishes loading, so a read card that showed\n // plain text while its language's grammar imported picks up highlighting. The\n // snapshot value is opaque; only its change across renders drives the memo.\n const loaded = useSyncExternalStore(subscribeGrammarLoaded, grammarLoadCount, grammarLoadCount)\n const highlighted = useMemo(\n () => highlighting ? highlightLines(raw, lang) : undefined,\n [highlighting, raw, lang, loaded],\n )\n const [expanded, setExpanded] = useState(false)\n const [copied, setCopied] = useState(false)\n const [wrapped, setWrapped] = useState(false)\n\n const onCopy = useCallback(() => {\n if (copied) return\n void writeClipboard(raw).then((ok) => {\n if (!ok) return\n setCopied(true)\n window.setTimeout(() => { setCopied(false) }, 1000)\n })\n }, [copied, raw])\n\n const onToggle = useCallback(() => { setExpanded(value => !value) }, [])\n\n const hidden = lines.length - maxLines\n const capped = hidden > 0 && !expanded\n const headLines = Math.ceil(maxLines / 2)\n const tailLines = maxLines - headLines\n // A read is a window when its returned lines are fewer than the file's total;\n // the note states that so a reader is not misled that the file ends here.\n const windowed = lines.length < totalLines\n\n const rows = (slice: readonly (readonly [ReadBlockLine, readonly HighlightSpan[] | undefined])[]) =>\n slice.map(([line, spans]) => (\n <div key={line.number} className={css.line}>\n <span className={css.gutter} aria-hidden>{line.number}</span>\n <span className={css.content}>{spans === undefined ? line.text : renderSpans(spans)}</span>\n </div>\n ))\n\n const gutterDigits = lines.reduce((digits, line) => Math.max(digits, String(line.number).length), 3)\n const gutterStyle = { '--dsl-read-gutter': `${gutterDigits}ch` } as CSSProperties\n\n const paired = lines.map((line, index): readonly [ReadBlockLine, readonly HighlightSpan[] | undefined] =>\n [line, highlighted?.[index]])\n\n return (\n <div ref={rootRef} className={clsx(cardCss.card, css.block, className)} data-read=\"\" data-code-wrap={wrapped} style={gutterStyle}>\n <CodeToolbar\n lang={lang} title={label} status={windowed ? labels.window(lines.length, totalLines) : undefined}\n labels={labels} copyLabel={labels.copy} copiedLabel={labels.copied} copied={copied} wrapped={wrapped}\n // Empty files must not replace the clipboard with empty text.\n onCopy={lines.length > 0 ? onCopy : undefined} onWrap={() => { setWrapped(value => !value) }}\n />\n <div className={cardCss.body}>\n {rows(capped ? paired.slice(0, headLines) : paired)}\n {hidden > 0 && (\n <FoldToggle\n className={css.expand}\n expanded={expanded}\n hidden={hidden}\n labels={labels}\n onToggle={onToggle}\n />\n )}\n {capped && rows(paired.slice(paired.length - tailLines))}\n </div>\n </div>\n )\n}\n","import { useCallback, useMemo, useState } from 'react'\nimport clsx from 'clsx'\nimport { structuredPatch } from 'diff'\nimport { FoldToggle } from './FoldToggle.tsx'\nimport { writeClipboard } from './clipboard.ts'\nimport { CodeToolbar, type CodeToolbarLabels } from './CodeToolbar.tsx'\nimport { languageForPath } from './code-highlighting.ts'\nimport cardCss from './CodeCard.module.css'\nimport css from './DiffBlock.module.css'\n\n/** Output lines shown before the height cap collapses the middle. */\nexport const DEFAULT_DIFF_MAX_LINES = 16\n\n/**\n * One file change in the form {@link DiffBlock} renders. It is declared here\n * so this primitive stays independent of the tool contract.\n */\nexport interface DiffHunk {\n /** The changed file's path, drawn verbatim as the hunk's header (the tool's model-facing path). */\n path: string\n /** Prior content including context, or `null` when no prior content is available. */\n oldText: string | null\n /** Content after the change, including any shared context. */\n newText: string\n}\n\nexport interface DiffBlockProps {\n /** One entry per applied hunk, in file order; empty renders nothing. */\n diffs: DiffHunk[]\n /** Localized chrome supplied by the owning render site. */\n labels: DiffBlockLabels\n /** Height cap in body lines before the middle collapses (default {@link DEFAULT_DIFF_MAX_LINES}). */\n maxLines?: number | undefined\n /** Extra class merged onto the wrapper (callers position; this component draws). */\n className?: string | undefined\n}\n\n/** Localized chrome for {@link DiffBlock}. */\nexport interface DiffBlockLabels extends CodeToolbarLabels {\n copy: string\n copied: string\n collapseAria: string\n expandAria: (hidden: number) => string\n collapse: string\n expand: (hidden: number) => string\n}\n\n/** A single rendered body line and its role, so the height cap slices a flat list. */\ninterface DiffRow {\n kind: 'path' | 'del' | 'add' | 'context' | 'gap'\n text: string\n}\n\n/** Local exhaustiveness helper — this package does not depend on `dsh-llm`. */\n/* v8 ignore next 3 -- closed-union backstop; only reached if a row kind is forged */\nfunction assertNever(value: never): never {\n throw new Error(`unreachable diff row kind: ${String(value)}`)\n}\n\n/** The dim class per row kind (path/gap chrome vs the diff's own +/- colors). */\nconst ROW_CLASS: Record<DiffRow['kind'], string | undefined> = {\n path: css.path,\n del: css.del,\n add: css.add,\n context: css.context,\n gap: css.gap,\n}\n\n/** Bound synchronous edit-graph search; one replacement consumes two edits. */\nconst MAX_DIFF_EDIT_LENGTH = 256\n\n/** Derive exact local patches or a whole-fragment replacement when search exceeds the limit. */\nfunction localHunks(diff: DiffHunk) {\n const oldLines = contentLines(diff.oldText ?? '')\n const newLines = contentLines(diff.newText)\n const normalize = (lines: string[]): string => lines.map(line => `${line}\\n`).join('')\n return structuredPatch('', '', normalize(oldLines), normalize(newLines),\n undefined, undefined, { context: 3, maxEditLength: MAX_DIFF_EDIT_LENGTH })?.hunks\n ?? [{ lines: [...oldLines.map(line => `-${line}`), ...newLines.map(line => `+${line}`)] }]\n}\n\n/**\n * Count displayed additions and deletions. Exact patches exclude shared context;\n * comparisons exceeding the edit limit count both complete fragments as replaced.\n * Text follows {@link contentLines}'s terminator rule.\n * @param diffs - the hunks to count.\n * @returns the +/- totals for tool summaries.\n */\nexport function diffTotals(diffs: DiffHunk[]): { added: number; removed: number } {\n let added = 0\n let removed = 0\n for (const diff of diffs) {\n for (const hunk of localHunks(diff)) {\n for (const line of hunk.lines) {\n if (line.startsWith('+')) added++\n if (line.startsWith('-')) removed++\n }\n }\n }\n return { added, removed }\n}\n\n/**\n * Flatten local patches into rows.\n * A path header opens each new file. A `⋯` gap separates consecutive same-file\n * fragments and distant patches within a fragment.\n * @param diffs - the hunks to render.\n * @returns the body rows.\n */\nfunction buildRows(diffs: DiffHunk[]): DiffRow[] {\n const rows: DiffRow[] = []\n let prevPath: string | undefined\n for (const diff of diffs) {\n if (diff.path !== prevPath) rows.push({ kind: 'path', text: diff.path })\n else rows.push({ kind: 'gap', text: '⋯' })\n prevPath = diff.path\n for (const [index, hunk] of localHunks(diff).entries()) {\n if (index > 0) rows.push({ kind: 'gap', text: '⋯' })\n for (const line of hunk.lines) {\n const kind = line.startsWith('-') ? 'del' : line.startsWith('+') ? 'add' : 'context'\n rows.push({ kind, text: line.slice(1) })\n }\n }\n }\n return rows\n}\n\n/**\n * Split a side's text into its content lines. Empty text is zero lines (a full\n * deletion's `newText` or a create's absent `oldText` side draws nothing), and a\n * single trailing newline is a line terminator rather than an extra empty line —\n * the same terminator rule TerminalBlock applies to command output. An interior\n * blank line (a genuine `\\n\\n`) survives.\n * @param text - the removed or added side's text.\n * @returns the content lines, without the terminating newline.\n */\nfunction contentLines(text: string): string[] {\n if (text === '') return []\n const body = text.endsWith('\\n') ? text.slice(0, -1) : text\n return body.split('\\n')\n}\n\n/**\n * Copy the full local diff, including folded rows: removed/added lines have\n * `- `/`+ ` prefixes, context has two spaces, and paths and gaps stay verbatim.\n * @param rows - the flattened body rows.\n * @returns the diff as plain text.\n */\nfunction copyText(rows: DiffRow[]): string {\n return rows.map((row) => {\n switch (row.kind) {\n case 'del': return `- ${row.text}`\n case 'add': return `+ ${row.text}`\n case 'context': return ` ${row.text}`\n case 'path': return row.text\n case 'gap': return row.text\n /* v8 ignore next -- closed-union backstop; only reached if a row kind is forged */\n default: return assertNever(row.kind)\n }\n }).join('\\n')\n}\n\n/**\n * Render a file mutation as an inline diff surface.\n * @param props - see {@link DiffBlockProps}.\n * @returns the diff block element.\n */\nexport function DiffBlock({ diffs, labels, maxLines = DEFAULT_DIFF_MAX_LINES, className }: DiffBlockProps) {\n const rows = useMemo(() => buildRows(diffs), [diffs])\n const [expanded, setExpanded] = useState(false)\n const [copied, setCopied] = useState(false)\n const [wrapped, setWrapped] = useState(false)\n const firstLanguage = diffs[0] === undefined ? undefined : languageForPath(diffs[0].path)\n const language = diffs.every(diff => languageForPath(diff.path) === firstLanguage) ? firstLanguage : undefined\n\n const onCopy = useCallback(() => {\n if (copied) return\n void writeClipboard(copyText(rows)).then((ok) => {\n if (!ok) return\n setCopied(true)\n window.setTimeout(() => { setCopied(false) }, 1000)\n })\n }, [copied, rows])\n\n const onToggle = useCallback(() => { setExpanded(value => !value) }, [])\n\n if (rows.length === 0) return null\n\n const hidden = rows.length - maxLines\n const capped = hidden > 0 && !expanded\n // Same split arithmetic as TerminalBlock and the TUI transcript's collapsed\n // card, so a body's head and tail slices agree across the front ends.\n const headLines = Math.ceil(maxLines / 2)\n const tailLines = maxLines - headLines\n const head = capped ? rows.slice(0, headLines) : rows\n const tail = capped ? rows.slice(rows.length - tailLines) : []\n\n return (\n <div className={clsx(cardCss.card, css.block, className)} data-diff=\"\" data-code-wrap={wrapped}>\n <CodeToolbar lang={language} labels={labels} copyLabel={labels.copy} copiedLabel={labels.copied}\n copied={copied} wrapped={wrapped} onCopy={onCopy} onWrap={() => { setWrapped(value => !value) }} />\n <div className={css.body}>\n {head.map((row, index) => (\n <div key={index} className={clsx(css.line, ROW_CLASS[row.kind])}>{row.text}</div>\n ))}\n {hidden > 0 && (\n <FoldToggle\n className={css.expand}\n expanded={expanded}\n hidden={hidden}\n labels={labels}\n onToggle={onToggle}\n />\n )}\n {tail.map((row, index) => (\n <div key={index} className={clsx(css.line, ROW_CLASS[row.kind])}>{row.text}</div>\n ))}\n </div>\n </div>\n )\n}\n","import { useCallback, useState, type ReactNode } from 'react'\nimport clsx from 'clsx'\nimport { headTailCap } from './head-tail-cap.ts'\nimport { useClipboardCopy } from './use-clipboard-copy.ts'\nimport css from './SearchBlock.module.css'\n\n/**\n * Result rows shown before the height cap collapses the middle. Matches\n * {@link DEFAULT_TERMINAL_MAX_LINES} so a search card and a terminal card cut a\n * long result at the same place.\n */\nexport const DEFAULT_SEARCH_MAX_LINES = 16\n\n/** One matched line inside a {@link SearchFileGroup}: its 1-based line number and text. */\nexport interface SearchBlockLineMatch {\n /** 1-based line number of the match within its file. */\n lineNumber: number\n /** The matched line text, as the tool surfaced it. */\n line: string\n}\n\n/** One file's grouped matches, in first-seen file order. */\nexport interface SearchFileGroup {\n /** The file the matches belong to (the display path). */\n path: string\n /** The file's matched lines, in output order. */\n matches: SearchBlockLineMatch[]\n}\n\n/** Fields both search shapes carry (the render site positions; this component draws). */\ninterface SearchBlockCommon {\n /** Localized chrome supplied by the owning render site. */\n labels: SearchBlockLabels\n /**\n * Whether the tool capped the inline result: the shape carries only the\n * retained results, not every result the search found. The banner summary\n * folds the pre-cap `total` in (`显示 X / 共 N …`) so the card never presents a\n * capped result as complete.\n */\n truncated: boolean\n /** Total results the search found before capping (equals the retained count when not `truncated`). */\n total: number\n /** Height cap in rows before the middle collapses (default {@link DEFAULT_SEARCH_MAX_LINES}). */\n maxLines?: number | undefined\n /** Extra class merged onto the wrapper. */\n className?: string | undefined\n}\n\n/** Localized chrome for {@link SearchBlock}. */\nexport interface SearchBlockLabels {\n pathsSummary: (shown: number, total: number, truncated: boolean) => string\n matchesSummary: (shown: number, total: number, files: number, truncated: boolean) => string\n copy: string\n copied: string\n noResults: string\n collapseAria: string\n expandAria: (hidden: number) => string\n collapse: string\n expand: (hidden: number) => string\n}\n\n/** Props for the grouped-matches (`grep`) shape. */\nexport interface SearchMatchesBlockProps extends SearchBlockCommon {\n kind: 'matches'\n /** Matched lines grouped by file, in first-seen file order. */\n files: SearchFileGroup[]\n}\n\n/** Props for the flat-path (`glob`) shape. */\nexport interface SearchPathsBlockProps extends SearchBlockCommon {\n kind: 'paths'\n /** The discovered paths, in the tool's result order (the retained page when `truncated`). */\n paths: string[]\n}\n\n/** {@link SearchBlock} props: one card, two `kind`-discriminated shapes. */\nexport type SearchBlockProps = SearchMatchesBlockProps | SearchPathsBlockProps\n\n/**\n * One flattened render row. A matches card produces a `file` header row per\n * group followed by a `match` row per retained line while the group is\n * expanded; a paths card produces one `path` row per path. The height cap\n * counts these rows uniformly, so a file header costs one row exactly as a\n * match line or a path does.\n */\ntype SearchRow =\n | { type: 'file'; path: string; count: number; index: number; collapsed: boolean }\n | { type: 'match'; lineNumber: number; line: string; key: string; fileIndex: number }\n | { type: 'path'; path: string }\n\n/**\n * The plain-text form the copy control writes: the whole structured result\n * regardless of the height cap or which groups are collapsed, so the clipboard\n * carries the result rather than what the card happens to be showing.\n * @param props - the card's props.\n * @returns the copyable text, or the empty string for an empty result.\n */\nfunction copyText(props: SearchBlockProps): string {\n if (props.kind === 'paths') return props.paths.join('\\n')\n return props.files\n .map(file => [file.path, ...file.matches.map(m => `${m.lineNumber}: ${m.line}`)].join('\\n'))\n .join('\\n\\n')\n}\n\n/**\n * Number of retained results the card holds: the matched-line count across all\n * files for a matches card, the path count for a paths card. This is the count\n * the banner summary reports against `total` when the result was capped.\n * @param props - the card's props.\n * @returns the retained result count.\n */\nfunction shownCount(props: SearchBlockProps): number {\n return props.kind === 'paths'\n ? props.paths.length\n : props.files.reduce((sum, file) => sum + file.matches.length, 0)\n}\n\n/**\n * The banner summary. When the search was capped it reads `显示 X / 共 N …` so\n * the retained count and the pre-cap total sit in one clause (mirroring the read\n * card's `显示 X / Y 行`); when it was not capped it is a plain count of what the\n * card holds. The unit — `处匹配 · K 个文件` for grep, `个路径` for glob — trails\n * the count either way.\n * @param props - the card's props.\n * @param shown - the retained result count from {@link shownCount}.\n * @param truncated - whether the search was capped.\n * @param total - the pre-cap total the truncation clause reports.\n * @returns the summary text.\n */\nfunction summaryText(props: SearchBlockProps, shown: number, truncated: boolean, total: number): string {\n return props.kind === 'paths'\n ? props.labels.pathsSummary(shown, total, truncated)\n : props.labels.matchesSummary(shown, total, props.files.length, truncated)\n}\n\n/**\n * Flatten a card's shape into its render rows, dropping a collapsed file\n * group's match rows.\n * @param props - the card's props.\n * @param collapsed - the set of collapsed file-group indices (matches only).\n * @returns the flattened rows in output order.\n */\nfunction toRows(props: SearchBlockProps, collapsed: ReadonlySet<number>): SearchRow[] {\n if (props.kind === 'paths') return props.paths.map((path): SearchRow => ({ type: 'path', path }))\n const rows: SearchRow[] = []\n props.files.forEach((file, index) => {\n const isCollapsed = collapsed.has(index)\n rows.push({ type: 'file', path: file.path, count: file.matches.length, index, collapsed: isCollapsed })\n if (isCollapsed) return\n for (const match of file.matches) {\n rows.push({ type: 'match', lineNumber: match.lineNumber, line: match.line, key: `${index}:${match.lineNumber}`, fileIndex: index })\n }\n })\n return rows\n}\n\n/**\n * A stable React key for a flattened render row: the group-scoped match key, a\n * file-index-scoped header key, or the path itself. Rows of different types\n * never collide, since each key carries its type prefix or the group index.\n * @param row - the flattened row.\n * @returns the key.\n */\nfunction rowKey(row: SearchRow): string {\n switch (row.type) {\n case 'match': return `match:${row.key}`\n case 'file': return `file:${row.index}`\n case 'path': return `path:${row.path}`\n }\n}\n\n/**\n * Render a completed search as a grouped-matches or flat-path card.\n * @param props - see {@link SearchBlockProps}.\n * @returns the search block element.\n */\nexport function SearchBlock(props: SearchBlockProps) {\n const { truncated, total, maxLines = DEFAULT_SEARCH_MAX_LINES, className } = props\n const [expanded, setExpanded] = useState(false)\n const [collapsed, setCollapsed] = useState<ReadonlySet<number>>(() => new Set())\n\n // `props` is a fresh object each render, so memoizing on it never hits; the\n // flatten is cheap, so it runs inline keyed on the collapse set instead.\n const rows = toRows(props, collapsed)\n const shown = shownCount(props)\n const empty = rows.length === 0\n const { copied, onCopy } = useClipboardCopy(copyText(props))\n\n const onToggle = useCallback(() => { setExpanded(value => !value) }, [])\n\n const toggleFile = useCallback((index: number) => {\n setCollapsed((prev) => {\n const next = new Set(prev)\n if (next.has(index)) next.delete(index)\n else next.add(index)\n return next\n })\n }, [])\n\n const { hidden, capped, headLines, tailLines } = headTailCap(rows.length, maxLines, expanded)\n const head = capped ? rows.slice(0, headLines) : rows\n const naturalTail = capped ? rows.slice(rows.length - tailLines) : []\n // When the tail slice begins inside a file's matches, its own header sits\n // above the cut and is not shown, so those rows could not be attributed to a\n // file. Restore the owning header at the top of the tail — unless the head\n // slice already carries it (a single large file), where it would duplicate.\n const tailLead = naturalTail[0]\n const tailHeader = tailLead?.type === 'match'\n && !head.some(row => row.type === 'file' && row.index === tailLead.fileIndex)\n ? rows.find((row): row is Extract<SearchRow, { type: 'file' }> =>\n row.type === 'file' && row.index === tailLead.fileIndex)\n : undefined\n // The restored header is itself a row. Left extra it would push the card to\n // maxLines + 1 and overstate `hidden` by one, so it consumes a tail slot: drop\n // the tail's first row (the match whose header this is) for it. Visible rows\n // hold at maxLines and `hidden` stays exact; the dropped match joins the\n // hidden middle.\n const tail = tailHeader === undefined ? naturalTail : naturalTail.slice(1)\n\n const renderRow = (row: SearchRow): ReactNode => {\n if (row.type === 'path') return <div className={css.line}>{row.path}</div>\n if (row.type === 'match') {\n return (\n <div className={css.line}>\n <span className={css.lineNumber}>{row.lineNumber}: </span>\n {row.line}\n </div>\n )\n }\n return (\n <button\n type=\"button\"\n className={css.fileHeader}\n aria-expanded={!row.collapsed}\n onClick={() => { toggleFile(row.index) }}\n >\n <span className={css.filePath}>{row.path}</span>\n <span className={css.fileCount}>{row.count}</span>\n </button>\n )\n }\n\n return (\n <div className={clsx(css.block, className)} data-search={props.kind}>\n <div className={css.header}>\n <span className={css.summary}>{summaryText(props, shown, truncated, total)}</span>\n {!empty && (\n <button type=\"button\" className={css.copyButton} onClick={onCopy}>\n {copied ? props.labels.copied : props.labels.copy}\n </button>\n )}\n </div>\n {empty\n ? <div className={css.empty}>{props.labels.noResults}</div>\n : (\n <div className={css.body}>\n {head.map(row => (\n <div key={rowKey(row)}>{renderRow(row)}</div>\n ))}\n {hidden > 0 && (\n <button\n type=\"button\"\n className={css.expand}\n aria-expanded={expanded}\n aria-label={expanded ? props.labels.collapseAria : props.labels.expandAria(hidden)}\n onClick={onToggle}\n >\n {expanded ? props.labels.collapse : props.labels.expand(hidden)}\n </button>\n )}\n {tailHeader !== undefined && (\n <div key={`tailHeader:${rowKey(tailHeader)}`}>{renderRow(tailHeader)}</div>\n )}\n {tail.map(row => (\n <div key={rowKey(row)}>{renderRow(row)}</div>\n ))}\n </div>\n )}\n </div>\n )\n}\n","/** Clipboard projection that copies rendered KaTeX formulas as their TeX source. */\n\n/** The whole formula around a node, including the display wrapper that marks display math. */\nfunction closestFormula(node: Node): Element | null {\n const element = node instanceof Element ? node : node.parentElement\n return element?.closest('.katex-display') ?? element?.closest('.katex') ?? null\n}\n\n/**\n * Rewrite a copy whose selection lies inside one rendered Markdown document and\n * includes rendered math, so each formula becomes its trimmed TeX source,\n * delimited as `$…$` inline and `$$…$$` for display math, in both the\n * plain-text and HTML clipboard data. A selection endpoint inside a formula\n * extends to the whole formula in the clipboard only; the visible selection is\n * unchanged. A copy without math, a selection reaching outside `root`, and a\n * copy whose default an inner listener already prevented keep their data.\n * @param event - Native copy event.\n * @param root - The rendered Markdown document root.\n */\nexport function copyKatexAsTex(event: ClipboardEvent, root: HTMLElement): void {\n const selection = root.ownerDocument.getSelection()\n if (event.defaultPrevented || event.clipboardData === null || selection === null\n || selection.rangeCount !== 1 || selection.isCollapsed) return\n const range = selection.getRangeAt(0).cloneRange()\n if (!root.contains(range.commonAncestorContainer)) return\n const startFormula = closestFormula(range.startContainer)\n if (startFormula !== null) range.setStartBefore(startFormula)\n const endFormula = closestFormula(range.endContainer)\n if (endFormula !== null) range.setEndAfter(endFormula)\n const fragment = range.cloneContents()\n const formulas = [...fragment.querySelectorAll('.katex')]\n if (formulas.length === 0) return\n for (const formula of formulas) {\n const tex = formula.querySelector('annotation[encoding=\"application/x-tex\"]')?.textContent.trim()\n if (tex === undefined) continue\n const delimiter = formula.closest('.katex-display') === null ? '$' : '$$'\n formula.replaceWith(`${delimiter}${tex}${delimiter}`)\n }\n // innerText applies the browser's own block and line-break serialization,\n // which needs a rendered element; an off-screen child of the root keeps the\n // Markdown styles that decide block layout while staying invisible.\n const container = root.ownerDocument.createElement('div')\n container.style.cssText = 'position:fixed;top:0;left:-100000px;pointer-events:none'\n container.append(fragment)\n root.append(container)\n try {\n event.clipboardData.setData('text/plain', container.innerText)\n event.clipboardData.setData('text/html', container.innerHTML)\n } finally {\n container.remove()\n }\n event.preventDefault()\n}\n","/**\n * Incremental block-level markdown parsing for an append-only text stream.\n *\n * Re-parsing the whole accumulated document on every streaming chunk is\n * quadratic in the final reply length. CommonMark block parsing is line-based\n * and appended text can only reshape the parse frontier — the last top-level\n * block (a paragraph becoming a setext heading or a table, or a list\n * continuing after a blank line) — so earlier blocks are final. This parser\n * therefore freezes all but the trailing {@link UNSTABLE_TAIL_BLOCKS} blocks\n * and re-parses only the source tail behind them. A final unclosed top-level\n * fence cannot freeze as a block, so its completed content lines use a second\n * frontier: only the last completed line and current partial line return\n * through the caller's grammar. Each source region is therefore parsed a\n * bounded number of times over the stream instead of once per chunk.\n *\n * The block freeze boundary comes from the parser's own `position` offsets.\n * The cut sits at the *end offset* of the last frozen block (not the next\n * block's start): a following block's start offset excludes up to three spaces\n * of insignificant leading indentation, which is harmless to drop, but\n * cutting at the previous end also keeps the inter-block blank lines in the\n * tail so the sliced source stays verbatim. Fence scanning only recognizes a\n * parser-confirmed code node and closing delimiter; ambiguous input returns to\n * the normal tail parse.\n *\n * Known deviation, shared with any prefix-freeze scheme: micromark resolves\n * reference-style links and footnotes document-wide at parse time, so a\n * reference whose definition lands on the other side of the freeze boundary\n * renders literally until the settled full parse self-heals it.\n */\n\nimport type { Code, Root, RootContent } from 'mdast'\n\n/**\n * Trailing blocks kept unstable. Appended text reshapes at most the last\n * block; the second-to-last is retained as safety margin so a freeze decision\n * never has to reason about the parse frontier.\n */\nconst UNSTABLE_TAIL_BLOCKS = 2\n\n/** A top-level mdast block plus a render key that is stable across chunks. */\nexport interface PositionedBlock {\n /** The parsed block. Positions inside it are relative to its parse slice. */\n readonly node: RootContent\n /**\n * The block's start offset in the full source text. Stable from the frame\n * a block first appears through freezing, so React reconciles rather than\n * remounts when a block crosses the freeze boundary.\n */\n readonly key: number\n}\n\n/** One {@link IncrementalMarkdownParser.update} result. */\nexport interface IncrementalBlocks {\n /** Blocks that can no longer change; grows monotonically per generation. */\n readonly frozen: readonly PositionedBlock[]\n /** The re-parsed unstable tail (at most {@link UNSTABLE_TAIL_BLOCKS} blocks plus growth). */\n readonly tail: readonly PositionedBlock[]\n /** Bumped whenever non-append input discards the frozen prefix; callers drop caches keyed on it. */\n readonly generation: number\n}\n\n/**\n * A block's render key: its absolute source start offset. A position-less\n * node (a grammar is free to omit positions) falls back to a negative\n * list-index key — unique within one update's tail, which is the only place\n * the fallback can occur: freezing requires the cut block's position, so a\n * position-less parse keeps every block in the tail (real grammars always\n * stamp positions and never take this path).\n */\nfunction blockKey(node: RootContent, base: number, index: number): number {\n const offset = node.position?.start.offset\n return offset === undefined ? -(index + 1) : base + offset\n}\n\ninterface OpenFenceState {\n readonly marker: '`' | '~'\n readonly markerLength: number\n readonly syntheticPrefix: string\n readonly codeIndex: number\n readonly frozen: readonly PositionedBlock[]\n readonly tail: readonly PositionedBlock[]\n readonly pendingStart: number\n readonly valuePrefix: string\n readonly end: { readonly line: number; readonly column: number; readonly offset: number }\n readonly endedWithCarriageReturn: boolean\n}\n\n/** Return the first line terminator at or after `start`, including a CRLF pair. */\nfunction lineTerminatorEnd(text: string, start: number): number | undefined {\n for (let index = start; index < text.length; index += 1) {\n const char = text[index]\n if (char === '\\n') return index + 1\n if (char === '\\r') return text[index + 1] === '\\n' ? index + 2 : index + 1\n }\n return undefined\n}\n\n/**\n * Source prefix before the last completed line. Keeping that line beside the\n * current partial line lets the grammar retain its trailing-newline semantics.\n */\nfunction committableLinePrefixLength(text: string): number {\n let previousEnd = 0\n let end = 0\n for (let index = 0; index < text.length; index += 1) {\n const char = text[index]\n if (char === '\\n') {\n previousEnd = end\n end = index + 1\n continue\n }\n if (char !== '\\r' || index + 1 >= text.length) continue\n if (text[index + 1] === '\\n') index += 1\n previousEnd = end\n end = index + 1\n }\n return previousEnd\n}\n\n/** Exact source terminator ending a non-empty committable prefix. */\nfunction trailingLineTerminator(text: string): '\\n' | '\\r' | '\\r\\n' {\n return text.endsWith('\\r\\n') ? '\\r\\n' : text.endsWith('\\r') ? '\\r' : '\\n'\n}\n\n/** Whether `text` contains a CommonMark closing fence on one of its logical lines. */\nfunction containsClosingFence(text: string, marker: '`' | '~', markerLength: number): boolean {\n let start = 0\n while (start <= text.length) {\n let end = start\n while (end < text.length && text[end] !== '\\n' && text[end] !== '\\r') end += 1\n const line = text.slice(start, end)\n let indent = 0\n while (indent < 3 && line[indent] === ' ') indent += 1\n let run = indent\n while (line[run] === marker) run += 1\n if (run - indent >= markerLength && /^[ \\t]*$/.test(line.slice(run))) return true\n if (end === text.length) return false\n start = text[end] === '\\r' && text[end + 1] === '\\n' ? end + 2 : end + 1\n }\n /* v8 ignore next -- each loop iteration returns at EOF or advances past a line terminator. */\n return false\n}\n\n/** Advance an mdast point across one append while treating a split CRLF as one line ending. */\nfunction advancePoint(\n point: OpenFenceState['end'],\n appended: string,\n precededByCarriageReturn: boolean,\n): OpenFenceState['end'] {\n let line = point.line\n let column = point.column\n let afterCarriageReturn = precededByCarriageReturn\n for (const char of appended) {\n if (char === '\\n') {\n if (!afterCarriageReturn) line += 1\n column = 1\n afterCarriageReturn = false\n continue\n }\n if (char === '\\r') {\n line += 1\n column = 1\n afterCarriageReturn = true\n continue\n }\n column += 1\n afterCarriageReturn = false\n }\n return { line, column, offset: point.offset + appended.length }\n}\n\n/**\n * Append-only incremental parser over a caller-supplied grammar. One instance\n * accumulates one streaming document; non-append input resets it.\n */\nexport class IncrementalMarkdownParser {\n private prevText = ''\n private tailStart = 0\n private frozen: PositionedBlock[] = []\n private generation = 0\n private cached: IncrementalBlocks | null = null\n private openFence: OpenFenceState | null = null\n\n /** @param parse - Grammar shared with whatever renders the blocks, so boundaries agree. */\n constructor(private readonly parse: (text: string) => Root) {}\n\n /** Parse one unclosed-fence content slice through the caller's grammar. */\n private fenceValue(state: Pick<OpenFenceState, 'syntheticPrefix'>, text: string): string | undefined {\n const root = this.parse(`${state.syntheticPrefix}${text}`)\n if (root.children.length !== 1) return undefined\n const node = root.children[0] as RootContent\n return node.type === 'code' ? node.value : undefined\n }\n\n /** Recognize the parsed tail's final unclosed fence and prepare its incremental content frontier. */\n private openFenceState(\n text: string,\n base: number,\n tail: readonly PositionedBlock[],\n frozen: readonly PositionedBlock[],\n ): OpenFenceState | null {\n const codeIndex = tail.length - 1\n const block = tail[codeIndex]\n if (block?.node.type !== 'code') return null\n const node = block.node\n const startOffset = node.position?.start.offset\n const end = node.position?.end\n if (startOffset === undefined || end?.offset === undefined) return null\n /* v8 ignore next -- the caller's parse slice ends at text.length, so its final node ends there. */\n if (base + end.offset !== text.length) return null\n const source = text.slice(base)\n const previousLf = source.lastIndexOf('\\n', startOffset - 1)\n const previousCr = source.lastIndexOf('\\r', startOffset - 1)\n const lineStart = Math.max(previousLf, previousCr) + 1\n const terminatorEnd = lineTerminatorEnd(source, startOffset)\n /* v8 ignore next -- a parser-confirmed fenced code node requires its opening line terminator. */\n if (terminatorEnd === undefined) return null\n if (terminatorEnd === source.length && source.endsWith('\\r')) return null\n const openingLine = source.slice(lineStart, terminatorEnd).replace(/[\\r\\n]+$/, '')\n const opening = /^( {0,3})(`{3,}|~{3,})/.exec(openingLine)\n if (opening === null) return null\n const indent = opening[1] as string\n const run = opening[2] as string\n /* v8 ignore next -- mdast positions a fenced code node at the matched delimiter after indentation. */\n if (lineStart + indent.length !== startOffset) return null\n const marker = run[0] as '`' | '~'\n const contentStart = base + terminatorEnd\n const content = text.slice(contentStart)\n if (containsClosingFence(content, marker, run.length)) return null\n const syntheticPrefix = `${indent}${run}\\n`\n const stableLength = committableLinePrefixLength(content)\n const stableValue = stableLength === 0\n ? ''\n : this.fenceValue({ syntheticPrefix }, content.slice(0, stableLength))\n if (stableValue === undefined) return null\n const pendingStart = contentStart + stableLength\n const stableSource = content.slice(0, stableLength)\n const valuePrefix = stableLength === 0 ? '' : `${stableValue}${trailingLineTerminator(stableSource)}`\n const pendingValue = this.fenceValue({ syntheticPrefix }, text.slice(pendingStart))\n if (pendingValue === undefined || `${valuePrefix}${pendingValue}` !== node.value) return null\n return {\n marker,\n markerLength: run.length,\n syntheticPrefix,\n codeIndex,\n frozen,\n tail,\n pendingStart,\n valuePrefix,\n end: { line: end.line, column: end.column, offset: end.offset },\n endedWithCarriageReturn: text.endsWith('\\r'),\n }\n }\n\n /** Extend a recognized unclosed fence without parsing its completed content prefix again. */\n private updateOpenFence(\n state: OpenFenceState,\n text: string,\n previousText: string,\n ): IncrementalBlocks | undefined {\n const pending = text.slice(state.pendingStart)\n if (containsClosingFence(pending, state.marker, state.markerLength)) return undefined\n const pendingValue = this.fenceValue(state, pending)\n if (pendingValue === undefined) return undefined\n const stableLength = committableLinePrefixLength(pending)\n const stableValue = stableLength === 0\n ? ''\n : this.fenceValue(state, pending.slice(0, stableLength))\n if (stableValue === undefined) return undefined\n // OpenFenceState is private and is installed only from this exact retained\n // code entry; updates replace that entry with another positioned Code.\n const block = state.tail[state.codeIndex] as PositionedBlock\n const previousNode = block.node as Code & { position: NonNullable<Code['position']> }\n const end = advancePoint(\n state.end,\n text.slice(previousText.length),\n state.endedWithCarriageReturn,\n )\n const node: Code = {\n ...previousNode,\n value: `${state.valuePrefix}${pendingValue}`,\n position: { start: previousNode.position.start, end },\n }\n const tail = state.tail.map((entry, index) => index === state.codeIndex ? { ...entry, node } : entry)\n const cached = {\n frozen: state.frozen,\n tail,\n generation: this.generation,\n }\n this.openFence = {\n ...state,\n tail,\n pendingStart: state.pendingStart + stableLength,\n valuePrefix: stableLength === 0\n ? state.valuePrefix\n : `${state.valuePrefix}${stableValue}${trailingLineTerminator(pending.slice(0, stableLength))}`,\n end,\n endedWithCarriageReturn: text.endsWith('\\r'),\n }\n return cached\n }\n\n /**\n * Fold the current accumulated text and return the frozen/tail split.\n * Idempotent for identical input (the previous result is returned as-is),\n * so callers may invoke it from render paths that re-execute.\n * @param text - The full accumulated markdown source.\n * @returns Frozen and tail blocks with stream-stable render keys.\n */\n update(text: string): IncrementalBlocks {\n if (this.cached !== null && text === this.prevText) return this.cached\n // Deliberate O(prefix) memcmp per update: sound divergence detection has\n // to verify the whole retained prefix, and startsWith compares bytes two\n // orders of magnitude faster than parsing them — the cost this class\n // exists to remove. Passing append/reset deltas instead would push\n // append bookkeeping across the session-projection update boundary for a check\n // that stays sub-millisecond at realistic reply sizes.\n if (!text.startsWith(this.prevText)) {\n this.prevText = ''\n this.tailStart = 0\n this.frozen = []\n this.openFence = null\n this.generation += 1\n }\n const previousText = this.prevText\n if (previousText !== '' && this.openFence !== null) {\n const incremental = this.updateOpenFence(this.openFence, text, previousText)\n if (incremental !== undefined) {\n this.prevText = text\n this.cached = incremental\n return incremental\n }\n this.openFence = null\n }\n this.prevText = text\n const base = this.tailStart\n const blocks = this.parse(text.slice(base)).children\n let firstUnstable = Math.max(0, blocks.length - UNSTABLE_TAIL_BLOCKS)\n if (firstUnstable > 0) {\n const cutEnd = blocks[firstUnstable - 1]?.position?.end.offset\n if (cutEnd === undefined) {\n // A grammar that omits positions leaves nothing to cut at; keep the\n // whole parse in the tail rather than guessing a boundary.\n firstUnstable = 0\n } else {\n for (const node of blocks.slice(0, firstUnstable)) {\n this.frozen.push({ node, key: blockKey(node, base, this.frozen.length) })\n }\n this.tailStart = base + cutEnd\n }\n }\n const tail = blocks.slice(firstUnstable).map((node, index) => ({\n node,\n key: blockKey(node, base, index),\n }))\n this.cached = { frozen: [...this.frozen], tail, generation: this.generation }\n this.openFence = this.openFenceState(text, base, tail, this.cached.frozen)\n return this.cached\n }\n}\n","/** Recover standalone local image references with bare spaces without changing code or source offsets. */\nimport type { Root, RootContent, PhrasingContent } from 'mdast'\nimport { classifyFileType } from '../FileTypeIcon.tsx'\n\n/**\n * Recover only unambiguous, unescaped image-only paragraphs containing a local path with spaces.\n * @param root - Parsed Markdown tree, modified in place.\n * @param source - Original source used to distinguish authored syntax from escaped examples.\n * @returns The same root with recovered image nodes.\n */\nexport function recoverLocalImages(root: Root, source: string): Root {\n const visit = (node: Root | RootContent): void => {\n if (node.type === 'paragraph' && node.children.length === 1) {\n const [child] = node.children as [PhrasingContent]\n if (child.type === 'text' && child.position !== undefined\n && source.slice(child.position.start.offset, child.position.end.offset) === child.value) {\n const pattern = /^!\\[([^\\]\\n]*)\\]\\(((?:\\/(?!\\/)|\\.{1,2}\\/|[a-z]:[\\\\/])[^\\n<>()[\\]\"']+\\.[a-z\\d]+)\\)$/iu\n const match = pattern.exec(child.value) as [string, string, string] | null\n if (match !== null && match[2].includes(' ') && classifyFileType(match[2]) === 'image') {\n node.children = [{ type: 'image', alt: match[1], url: match[2], position: child.position }]\n }\n }\n } else if ('children' in node) {\n for (const child of node.children) visit(child)\n }\n }\n visit(root)\n return root\n}\n","/** Let asterisk strong emphasis close after punctuation when CJK prose continues without whitespace. */\n\nimport { attention } from 'micromark-core-commonmark'\nimport { unicodePunctuation } from 'micromark-util-character'\nimport { classifyCharacter } from 'micromark-util-classify-character'\nimport { codes, constants } from 'micromark-util-symbol'\nimport type { Construct, Extension, State, Tokenizer } from 'micromark-util-types'\n\nconst cjkCharacter = new RegExp([\n '\\\\p{Script_Extensions=Han}',\n '\\\\p{Script_Extensions=Hiragana}',\n '\\\\p{Script_Extensions=Katakana}',\n '\\\\p{Script_Extensions=Hangul}',\n '\\\\p{Script_Extensions=Bopomofo}',\n].join('|'), 'u')\n\nfunction isCjkCharacter(code: number | null): boolean {\n return code !== null && code >= 0 && cjkCharacter.test(String.fromCodePoint(code))\n}\n\nconst tokenizeCjkFriendlyAttention: Tokenizer = function (effects, ok, nok) {\n const configuredAttentionMarkers = this.parser.constructs.attentionMarkers.null\n if (configuredAttentionMarkers === undefined) {\n throw new Error('micromark CommonMark attention markers are unavailable')\n }\n const attentionMarkers = configuredAttentionMarkers\n const previous = this.previous\n const before = classifyCharacter(previous)\n let marker: number | null = codes.eof\n\n return start\n\n function start(code: number | null): State | undefined {\n /* v8 ignore next -- this text construct is dispatched only for an asterisk. */\n if (code !== codes.asterisk) return nok(code)\n marker = code\n effects.enter('attentionSequence')\n return inside(code)\n }\n\n function inside(code: number | null): State | undefined {\n if (code === marker) {\n effects.consume(code)\n return inside\n }\n\n const token = effects.exit('attentionSequence')\n const after = classifyCharacter(code)\n const open = !after || (after === constants.characterGroupPunctuation && Boolean(before))\n || attentionMarkers.includes(code)\n const commonMarkClose = !before\n || (before === constants.characterGroupPunctuation && Boolean(after))\n || attentionMarkers.includes(previous)\n const markerCount = token.end.offset - token.start.offset\n const cjkStrongClose = markerCount >= 2\n && unicodePunctuation(previous)\n && isCjkCharacter(code)\n const close = commonMarkClose || cjkStrongClose\n\n token._open = open\n token._close = close\n return ok(code)\n }\n}\n\nconst cjkFriendlyAttention: Construct = {\n name: 'cjkFriendlyAttention',\n resolveAll: attention.resolveAll,\n tokenize: tokenizeCjkFriendlyAttention,\n}\n\nconst cjkFriendlyStrongExtension: Extension = {\n text: { [codes.asterisk]: cjkFriendlyAttention },\n}\n\n/**\n * Extend CommonMark asterisk strong emphasis for punctuation-delimited CJK\n * prose, as a micromark syntax extension for `fromMarkdown`.\n * @returns The micromark syntax extension.\n */\nexport function cjkFriendlyStrong(): Extension {\n return cjkFriendlyStrongExtension\n}\n","/** Extend upstream dollar-only math syntax with TeX delimiters while reusing its token vocabulary. */\n\nimport { factorySpace } from 'micromark-factory-space'\nimport type {} from 'micromark-extension-math'\nimport { markdownLineEnding } from 'micromark-util-character'\nimport { codes, constants, types } from 'micromark-util-symbol'\nimport type { Construct, Extension, Previous, State, Tokenizer } from 'micromark-util-types'\n\n// oxlint-disable typescript/no-this-alias -- micromark binds tokenizer context only on the outer callback.\n\nconst previousBackslash: Previous = function (code) {\n if (code !== codes.backslash) return true\n const tail = this.events.at(-1)\n /* v8 ignore next -- a previous code necessarily has a preceding event. */\n if (tail === undefined) return false\n return tail[1].type === types.characterEscape\n}\n\nconst tokenizeBackslashMathText: Tokenizer = function (effects, ok, nok) {\n return start\n\n function start(code: number | null): State | undefined {\n /* v8 ignore next -- the text construct is dispatched only for a backslash. */\n if (code !== codes.backslash) return nok(code)\n effects.enter('mathText')\n effects.enter('mathTextSequence')\n effects.consume(code)\n return open\n }\n\n function open(code: number | null): State | undefined {\n if (code !== codes.leftParenthesis) return nok(code)\n effects.consume(code)\n effects.exit('mathTextSequence')\n return between\n }\n\n function between(code: number | null): State | undefined {\n if (code === codes.eof) return nok(code)\n if (code === codes.backslash) {\n return effects.attempt({ partial: true, tokenize: tokenizeClose }, close, afterCloseAttempt)(code)\n }\n if (markdownLineEnding(code)) {\n effects.enter(types.lineEnding)\n effects.consume(code)\n effects.exit(types.lineEnding)\n return between\n }\n return dataStart(code)\n }\n\n function afterCloseAttempt(code: number | null): State | undefined {\n return effects.check({ partial: true, tokenize: tokenizeOpen }, nok, dataStart)(code)\n }\n\n function dataStart(code: number | null): State | undefined {\n effects.enter('mathTextData')\n effects.consume(code)\n return code === codes.backslash ? afterDataBackslash : data\n }\n\n function afterDataBackslash(code: number | null): State | undefined {\n if (code === codes.backslash) {\n effects.consume(code)\n return data\n }\n return data(code)\n }\n\n function data(code: number | null): State | undefined {\n if (code === codes.eof || code === codes.backslash || markdownLineEnding(code)) {\n effects.exit('mathTextData')\n return between(code)\n }\n effects.consume(code)\n return data\n }\n\n function close(code: number | null): State | undefined {\n effects.exit('mathText')\n return ok(code)\n }\n\n function tokenizeClose(closeEffects: Parameters<Tokenizer>[0], closeOk: State, closeNok: State): State {\n return slash\n\n function slash(code: number | null): State | undefined {\n /* v8 ignore next -- this partial construct is attempted only at a backslash. */\n if (code !== codes.backslash) return closeNok(code)\n closeEffects.enter('mathTextSequence')\n closeEffects.consume(code)\n return parenthesis\n }\n\n function parenthesis(code: number | null): State | undefined {\n if (code !== codes.rightParenthesis) return closeNok(code)\n closeEffects.consume(code)\n closeEffects.exit('mathTextSequence')\n return closeOk\n }\n }\n\n function tokenizeOpen(openEffects: Parameters<Tokenizer>[0], openOk: State, openNok: State): State {\n return slash\n\n function slash(code: number | null): State | undefined {\n /* v8 ignore next -- the opening check follows a failed close attempt at a backslash. */\n if (code !== codes.backslash) return openNok(code)\n openEffects.enter(types.chunkString)\n openEffects.consume(code)\n return parenthesis\n }\n\n function parenthesis(code: number | null): State | undefined {\n if (code !== codes.leftParenthesis) return openNok(code)\n openEffects.consume(code)\n openEffects.exit(types.chunkString)\n return openOk\n }\n }\n}\n\nfunction createMathFlow(marker: number, openMarker: number, closeMarker: number, multiline: boolean): Construct {\n const tokenize: Tokenizer = function (effects, ok, nok) {\n const self = this\n let oddBackslashRun = false\n const tail = self.events.at(-1)\n const initialSize = tail?.[1].type === types.linePrefix\n ? tail[2].sliceSerialize(tail[1], true).length\n : 0\n\n return start\n\n function start(code: number | null): State | undefined {\n /* v8 ignore next -- the flow construct is dispatched only for its marker. */\n if (code !== marker) return nok(code)\n effects.enter('mathFlow')\n effects.enter('mathFlowFence')\n effects.enter('mathFlowFenceSequence')\n effects.consume(code)\n return open\n }\n\n function open(code: number | null): State | undefined {\n if (code !== openMarker) return nok(code)\n effects.consume(code)\n effects.exit('mathFlowFenceSequence')\n effects.exit('mathFlowFence')\n return marker === codes.dollarSign ? afterDollarOpen : content\n }\n\n function afterDollarOpen(code: number | null): State | undefined {\n return code === codes.dollarSign ? nok(code) : content(code)\n }\n\n function content(code: number | null): State | undefined {\n if (code === codes.eof) return nok(code)\n if (code === marker && (marker !== codes.dollarSign || !oddBackslashRun)) {\n return effects.attempt(\n { partial: true, tokenize: tokenizeClosingFence },\n closed,\n afterClosingFenceAttempt,\n )(code)\n }\n if (markdownLineEnding(code)) {\n return multiline\n ? effects.attempt(nonLazyContinuation, afterContinuation, nok)(code)\n : nok(code)\n }\n return valueStart(code)\n }\n\n function afterClosingFenceAttempt(code: number | null): State | undefined {\n return marker === codes.backslash\n ? effects.check({ partial: true, tokenize: tokenizeOpeningFence }, nok, markerValueStart)(code)\n : markerValueStart(code)\n }\n\n function afterContinuation(code: number | null): State | undefined {\n return effects.attempt(\n { partial: true, tokenize: tokenizeClosingFence },\n closed,\n initialSize\n ? factorySpace(effects, content, types.linePrefix, initialSize + 1)\n : content,\n )(code)\n }\n\n function valueStart(code: number | null): State | undefined {\n effects.enter('mathFlowValue')\n oddBackslashRun = code === codes.backslash\n effects.consume(code)\n return value\n }\n\n function markerValueStart(code: number | null): State | undefined {\n effects.enter('mathFlowValue')\n oddBackslashRun = false\n effects.consume(code)\n return valueAfterMarker\n }\n\n function valueAfterMarker(code: number | null): State | undefined {\n if (code === marker) {\n effects.consume(code)\n return value\n }\n return value(code)\n }\n\n function value(code: number | null): State | undefined {\n if (code === codes.eof || code === marker || markdownLineEnding(code)) {\n effects.exit('mathFlowValue')\n return content(code)\n }\n oddBackslashRun = code === codes.backslash ? !oddBackslashRun : false\n effects.consume(code)\n return value\n }\n\n function closed(code: number | null): State | undefined {\n effects.exit('mathFlow')\n return ok(code)\n }\n\n function tokenizeClosingFence(\n closeEffects: Parameters<Tokenizer>[0],\n closeOk: State,\n closeNok: State,\n ): State {\n return factorySpace(closeEffects, sequenceStart, types.linePrefix, constants.tabSize)\n\n function sequenceStart(code: number | null): State | undefined {\n if (code !== marker) return closeNok(code)\n closeEffects.enter('mathFlowFence')\n closeEffects.enter('mathFlowFenceSequence')\n closeEffects.consume(code)\n return sequenceEnd\n }\n\n function sequenceEnd(code: number | null): State | undefined {\n if (code !== closeMarker) return closeNok(code)\n closeEffects.consume(code)\n closeEffects.exit('mathFlowFenceSequence')\n return factorySpace(closeEffects, after, types.whitespace)\n }\n\n function after(code: number | null): State | undefined {\n if (code !== codes.eof && !markdownLineEnding(code)) return closeNok(code)\n closeEffects.exit('mathFlowFence')\n return closeOk(code)\n }\n }\n\n function tokenizeOpeningFence(\n openEffects: Parameters<Tokenizer>[0],\n openOk: State,\n openNok: State,\n ): State {\n return sequenceStart\n\n function sequenceStart(code: number | null): State | undefined {\n /* v8 ignore next -- the opening check follows a failed close attempt at the marker. */\n if (code !== marker) return openNok(code)\n openEffects.enter(types.chunkString)\n openEffects.consume(code)\n return sequenceEnd\n }\n\n function sequenceEnd(code: number | null): State | undefined {\n if (code !== openMarker) return openNok(code)\n openEffects.consume(code)\n openEffects.exit(types.chunkString)\n return openOk\n }\n }\n }\n\n return {\n concrete: true,\n name: marker === codes.dollarSign ? 'sameLineDollarMathFlow' : 'backslashMathFlow',\n tokenize,\n }\n}\n\nconst tokenizeNonLazyContinuation: Tokenizer = function (effects, ok, nok) {\n const self = this\n\n return start\n\n function start(code: number | null): State | undefined {\n /* v8 ignore next -- continuation constructs are attempted only after a line ending. */\n if (code === codes.eof) return ok(code)\n /* v8 ignore next -- continuation constructs are attempted only after a line ending. */\n if (!markdownLineEnding(code)) return nok(code)\n effects.enter(types.lineEnding)\n effects.consume(code)\n effects.exit(types.lineEnding)\n return lineStart\n }\n\n function lineStart(code: number | null): State | undefined {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code)\n }\n}\n\nconst nonLazyContinuation: Construct = {\n partial: true,\n tokenize: tokenizeNonLazyContinuation,\n}\n\nconst backslashMathText: Construct = {\n name: 'backslashMathText',\n previous: previousBackslash,\n tokenize: tokenizeBackslashMathText,\n}\n\nconst backslashMathFlow = createMathFlow(\n codes.backslash,\n codes.leftSquareBracket,\n codes.rightSquareBracket,\n true,\n)\n\nconst sameLineDollarMathFlow = createMathFlow(\n codes.dollarSign,\n codes.dollarSign,\n codes.dollarSign,\n false,\n)\n\nconst backslashMath: Extension = {\n flow: {\n [codes.backslash]: backslashMathFlow,\n [codes.dollarSign]: sameLineDollarMathFlow,\n },\n text: { [codes.backslash]: backslashMathText },\n}\n\n/**\n * TeX backslash delimiters and same-line display-dollar blocks as a micromark\n * syntax extension reusing `micromark-extension-math`'s token vocabulary; the\n * caller must also register `math()` on the same parse so the emitted tokens\n * compile to standard math nodes.\n * @returns The micromark syntax extension.\n */\nexport function mathCompatibility(): Extension {\n return backslashMath\n}\n","/** Keep backslash separators in Markdown destinations written as Windows paths. */\nimport type { Definition, Image, Link } from 'mdast'\nimport type { CompileContext, Extension, Token } from 'mdast-util-from-markdown'\nimport { decodeString } from 'micromark-util-decode-string'\n\n/**\n * A raw destination is a Windows path when it has a backslash and no URL\n * scheme, and either has no `/` or has a backslash before a letter or digit,\n * which CommonMark cannot read as an escape. A drive letter is not a scheme.\n */\nfunction isWindowsPath(raw: string): boolean {\n return raw.includes('\\\\') && !/^[a-z][a-z\\d+.-]+:/iu.test(raw)\n && (!raw.includes('/') || /\\\\[\\p{L}\\p{N}]/u.test(raw))\n}\n\nfunction exitDestination(this: CompileContext, token: Token): void {\n const parsed = this.resume()\n const raw = this.sliceSerialize(token)\n const node = this.stack.at(-1) as Link | Image | Definition\n // Doubling each backslash makes every one literal; character references still decode.\n node.url = isWindowsPath(raw) ? decodeString(raw.replaceAll('\\\\', '\\\\\\\\')) : parsed\n}\n\n/**\n * CommonMark reads `\\.` or `\\_` in a destination as an escaped character, so\n * `D:\\repo\\.github` would parse as `D:\\repo.github`. For a destination that\n * is a Windows path, this `fromMarkdown` extension keeps every backslash\n * literally, including one before punctuation such as `\\(`, while character\n * references such as `&` still decode; other destinations parse unchanged.\n * @returns The mdast extension.\n */\nexport function windowsPathDestinations(): Extension {\n return { exit: { resourceDestinationString: exitDestination, definitionDestinationString: exitDestination } }\n}\n","/**\n * The markdown renderer's two mdast grammars, one per rendering arm. Each\n * arm is internally consistent — the incremental tail parses, the one-shot\n * parses, and the plain-text projection of a given grammar always agree on\n * where blocks start and end — and the settled grammar is the streaming one\n * plus the math extensions, so the arms differ only where TeX delimiters\n * begin a math construct (a `$$` block is a paragraph while streaming and a\n * math block once settled, by design).\n */\n\nimport type { Root } from 'mdast'\nimport { recoverLocalImages } from './local-image-syntax.ts'\nimport { fromMarkdown } from 'mdast-util-from-markdown'\nimport { gfmFromMarkdown } from 'mdast-util-gfm'\nimport { mathFromMarkdown } from 'mdast-util-math'\nimport { gfm } from 'micromark-extension-gfm'\nimport { math } from 'micromark-extension-math'\nimport { cjkFriendlyStrong } from './cjkFriendlyStrong.ts'\nimport { mathCompatibility } from './mathCompatibility.ts'\nimport { windowsPathDestinations } from './windows-path-destinations.ts'\n\n/** GFM strikethrough requires `~~`; a single `~` stays literal, as in ranges such as `10~20`. */\nconst gfmOptions = { singleTilde: false }\n\n/**\n * Parse GFM markdown (the streaming arm's grammar: no math, so incomplete\n * TeX never flashes KaTeX errors mid-stream).\n * @param text - Markdown source.\n * @returns The mdast root.\n */\nexport function parseGfm(text: string): Root {\n return recoverLocalImages(fromMarkdown(text, {\n extensions: [gfm(gfmOptions), cjkFriendlyStrong()],\n mdastExtensions: [gfmFromMarkdown(), windowsPathDestinations()],\n }), text)\n}\n\n/**\n * Parse GFM markdown plus TeX math with the compatibility delimiters\n * (the settled arm's grammar).\n * @param text - Markdown source.\n * @returns The mdast root.\n */\nexport function parseGfmWithMath(text: string): Root {\n return recoverLocalImages(fromMarkdown(text, {\n extensions: [gfm(gfmOptions), cjkFriendlyStrong(), mathCompatibility(), math()],\n mdastExtensions: [gfmFromMarkdown(), mathFromMarkdown(), windowsPathDestinations()],\n }), text)\n}\n","/** Unified-diff row parsing and per-file body tokenization for markdown fences. @module dsh-client-ui-primitives/markdown/diff-fence */\n\nimport { languageForPath } from '../code-highlighting.ts'\nimport { highlightLines } from './highlight.ts'\nimport type { HighlightSpan } from './highlight.ts'\n\n/** Fence info strings rendered as a unified diff instead of grammar-highlighted code. */\nexport const DIFF_FENCE_LANGUAGES = new Set(['diff', 'patch'])\n\n/**\n * Whether a fence info string selects diff row rendering.\n * @param lang - the fence info string, case-insensitively compared.\n * @returns whether the fence is a unified diff.\n */\nexport function isDiffFenceLanguage(lang: string | undefined): boolean {\n return lang !== undefined && DIFF_FENCE_LANGUAGES.has(lang.toLowerCase())\n}\n\n/** One unified-diff line, split so the marker column stays out of the tokenized body. */\nexport interface DiffRow {\n /** Row role, which selects the line's diff class. */\n kind: 'add' | 'del' | 'context' | 'hunk' | 'meta'\n /** The marker column, kept verbatim so copy reproduces the source. */\n marker: string\n /** The code after the marker column, or the whole line for chrome rows. */\n body: string\n /** The full source line, rendered as-is for hunk and meta rows. */\n raw: string\n /** Index of the file section this row belongs to; -1 before any file header. */\n file: number\n}\n\n/** Parsed fence: rows plus the language each file section names. */\nexport interface DiffFence {\n /** The fence rows in source order. */\n rows: DiffRow[]\n /** Inner language per file section, when the header names a known one. */\n languages: ReadonlyMap<number, string>\n}\n\n/** File-level chrome a unified diff carries above and between hunks. */\nconst DIFF_META_PREFIXES = [\n 'diff --git ', 'index ', 'old mode ', 'new mode ', 'new file mode ', 'deleted file mode ',\n 'similarity index ', 'dissimilarity index ', 'rename from ', 'rename to ', 'copy from ', 'copy to ',\n 'Binary files ', 'GIT binary patch', '\\\\ No newline',\n]\n\n/** Hunk header with both line counts; a missing count means one line. */\nconst HUNK_HEADER = /^@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@/u\n\n/** Lines the hunk header says remain on each side. */\ninterface HunkRemainder {\n /** Unconsumed old-side lines. */\n old: number\n /** Unconsumed new-side lines. */\n new: number\n}\n\n/**\n * Parse a hunk header's line budget.\n * @param raw - the `@@ -a,b +c,d @@` line.\n * @returns the remaining line counts, or `undefined` for a malformed header.\n */\nfunction hunkRemainder(raw: string): HunkRemainder | undefined {\n const match = HUNK_HEADER.exec(raw)\n if (match === null) return undefined\n return {\n old: match[2] === undefined ? 1 : Number(match[2]),\n new: match[4] === undefined ? 1 : Number(match[4]),\n }\n}\n\n/** Whether a raw line is file-level chrome rather than hunk content. */\nfunction isDiffMeta(raw: string): boolean {\n return DIFF_META_PREFIXES.some(prefix => raw.startsWith(prefix))\n}\n\n/**\n * Resolve the inner language a `---`/`+++` header names.\n * @param raw - the header line.\n * @returns the language id, or `undefined` for `/dev/null` or an unknown path.\n */\nfunction headerLanguage(raw: string): string | undefined {\n const path = raw.slice(4).replace(/\\t.*$/u, '').trim()\n const unquoted = path.startsWith('\"') && path.endsWith('\"')\n ? path.slice(1, -1).replace(/\\\\([\"\\\\])/gu, '$1')\n : path\n if (unquoted === '' || unquoted === '/dev/null') return undefined\n return languageForPath(unquoted.replace(/^[ab]\\//u, ''))\n}\n\n/**\n * Split a unified diff into rows without losing a byte (copy reads the DOM).\n *\n * The hunk header's line budget ends a hunk, so a following `---` / `+++` file\n * header is chrome again — both for a concatenated `git diff` and for `diff -u`\n * output without `diff --git` lines. A malformed header keeps the row until the\n * next `diff --git`, matching how authored fences are rendered.\n * @param code - the fence body, display-trimmed.\n * @returns the rows and each file section's language.\n */\nexport function parseDiffFence(code: string): DiffFence {\n const rows: DiffRow[] = []\n const languages = new Map<number, string>()\n let inHunk = false\n let remainder: HunkRemainder | undefined\n let file = -1\n\n const push = (row: Omit<DiffRow, 'file'>): void => {\n rows.push({ ...row, file })\n }\n\n for (const raw of code.split('\\n')) {\n if (raw.startsWith('diff --git ')) {\n inHunk = false\n remainder = undefined\n push({ kind: 'meta', marker: '', body: '', raw })\n continue\n }\n if (raw.startsWith('@@')) {\n inHunk = true\n remainder = hunkRemainder(raw)\n push({ kind: 'hunk', marker: '', body: '', raw })\n continue\n }\n // A file header carries a marker column but names the file, not a line.\n if (!inHunk && (raw.startsWith('--- ') || raw.startsWith('+++ '))) {\n if (raw.startsWith('--- ')) file += 1\n const language = headerLanguage(raw)\n if (language !== undefined) languages.set(file, language)\n push({ kind: 'meta', marker: '', body: '', raw })\n continue\n }\n if (isDiffMeta(raw)) {\n push({ kind: 'meta', marker: '', body: '', raw })\n continue\n }\n if (raw.startsWith('+')) {\n if (remainder !== undefined) remainder.new -= 1\n push({ kind: 'add', marker: '+', body: raw.slice(1), raw })\n } else if (raw.startsWith('-')) {\n if (remainder !== undefined) remainder.old -= 1\n push({ kind: 'del', marker: '-', body: raw.slice(1), raw })\n } else if (raw.startsWith(' ')) {\n if (remainder !== undefined) {\n remainder.old -= 1\n remainder.new -= 1\n }\n push({ kind: 'context', marker: ' ', body: raw.slice(1), raw })\n } else {\n // Authored diffs may omit the context marker column; the text is the body.\n push({ kind: 'context', marker: '', body: raw, raw })\n }\n if (inHunk && remainder !== undefined && remainder.old <= 0 && remainder.new <= 0) inHunk = false\n }\n return { rows, languages }\n}\n\n/**\n * Whether a row carries code the body highlighter tokenizes.\n * @param row - the parsed row.\n * @returns whether the row has tokenizable body text.\n */\nexport function isDiffContent(row: DiffRow): boolean {\n return row.kind === 'add' || row.kind === 'del' || row.kind === 'context'\n}\n\n/**\n * Tokenize each file's old side (context and deletions) and new side (context\n * and additions) separately, so an unterminated comment or string in a removed\n * line cannot color the added lines and one file's grammar never applies to the\n * next. Context rows keep the old-side runs.\n * @param diff - parsed fence rows and per-file languages.\n * @returns token runs per content-row index, or `undefined` when no body has a\n * loaded grammar and the caller should render plain text.\n */\nexport function diffFenceTokens(diff: DiffFence): Map<number, readonly HighlightSpan[]> | undefined {\n const groups = new Map<string, Array<{ row: number; body: string; kind: DiffRow['kind'] }>>()\n for (const [index, row] of diff.rows.entries()) {\n if (!isDiffContent(row)) continue\n const sides: Array<'old' | 'new'> = row.kind === 'del'\n ? ['old']\n : row.kind === 'add' ? ['new'] : ['old', 'new']\n for (const side of sides) {\n const key = `${row.file}:${side}`\n const entry = { row: index, body: row.body, kind: row.kind }\n const list = groups.get(key)\n if (list === undefined) groups.set(key, [entry])\n else list.push(entry)\n }\n }\n if (groups.size === 0) return undefined\n\n const tokens = new Map<number, readonly HighlightSpan[]>()\n let highlighted = false\n for (const [key, entries] of groups) {\n const separator = key.lastIndexOf(':')\n const language = diff.languages.get(Number(key.slice(0, separator)))\n const side = key.slice(separator + 1)\n const lines = highlightLines(entries.map(entry => entry.body).join('\\n'), language)\n if (lines === undefined) continue\n highlighted = true\n entries.forEach((entry, lineIndex) => {\n // A group ending in an empty body line loses shiki's terminal empty row;\n // that row stays plain while its siblings keep their tokens.\n const line = lines[lineIndex] ?? []\n // Context runs come from the old side; added rows only exist on the new side.\n if (side === 'old' || entry.kind === 'add') tokens.set(entry.row, line)\n })\n }\n return highlighted ? tokens : undefined\n}\n","import { Fragment, useCallback, useMemo, useRef, useState, useSyncExternalStore } from 'react'\nimport type { CSSProperties, ReactNode, Ref } from 'react'\nimport clsx from 'clsx'\nimport { writeClipboard } from '../clipboard.ts'\nimport { CodeToolbar, type CodeToolbarLabels } from '../CodeToolbar.tsx'\nimport {\n diffFenceTokens, isDiffContent, isDiffFenceLanguage, parseDiffFence,\n} from './diff-fence.ts'\nimport type { DiffRow } from './diff-fence.ts'\nimport {\n StreamingHighlightSession, grammarLoadCount, highlightToHtml, subscribeGrammarLoaded,\n} from './highlight.ts'\nimport type { HighlightSpan, StreamingHighlightFrame } from './highlight.ts'\nimport { useViewportHighlighting } from './useViewportHighlighting.ts'\nimport css from './CodeBlock.module.css'\n\nexport interface CodeBlockProps {\n /** The source text, rendered verbatim (trailing newline trimmed for display). */\n code: string\n /** Grammar hint (markdown fence info string or a fixed caller id); unknown = plain. */\n lang?: string | undefined\n /**\n * Render unified-diff rows: row colors by marker column, and each file's\n * removed and added sides tokenized with the language its header names.\n * Omitted, a `diff` or `patch` `lang` selects them; `true` or `false` forces\n * the choice for any `lang`.\n */\n diff?: boolean | undefined\n /**\n * The code is still growing (a streaming markdown fence): highlight through\n * a per-instance {@link StreamingHighlightSession}, which re-tokenizes only\n * appended text and keeps completed line groups (and DOM) untouched. The\n * caller must keep the component instance stable across growth (a\n * stream-stable React key); an unchanged streamed fence also retains that\n * tree when it settles. Cold settled callers get shiki's HTML.\n */\n streaming?: boolean | undefined\n /** Extra class merged onto the wrapper (callers position; this component draws). */\n className?: string | undefined\n /** Ref for the stable source-content wrapper, for owners that use it as a scrollport. */\n contentRef?: Ref<HTMLDivElement> | undefined\n /** Show a numbered gutter without adding numbers to copied source. Defaults to false. */\n lineNumbers?: boolean | undefined\n /** Show the language and copy header; false when the caller supplies a toolbar. Defaults to true. */\n showHeader?: boolean | undefined\n /** Copy-button idle label; the owner passes localized copy (this package is cordis-free, so copy arrives via props). */\n copyLabel: string\n /** Copy-button label during the post-copy confirmation window. */\n copiedLabel: string\n /** Enable the shared card toolbar and spacing; omit for custom toolbar layouts. */\n toolbarLabels?: CodeToolbarLabels | undefined\n /** With toolbarLabels, use the owner's wrapping preference and omit the toolbar's local wrap action. */\n wrap?: boolean | undefined\n}\n\n/**\n * The `pre` attributes shiki's HTML arm emits for the css-variables theme,\n * mirrored so the streaming arm's tree is interchangeable with the settled\n * swap (`tests/streaming-code-block.client.spec.tsx` pins the two arms'\n * parity).\n */\nconst SHIKI_PRE_PROPS = {\n className: 'shiki css-variables',\n style: { backgroundColor: 'var(--shiki-background)', color: 'var(--shiki-foreground)' },\n tabIndex: 0,\n} as const\n\n/** Completed-line group size; React reconciles groups while the DOM remains line-for-line identical. */\nconst STREAMING_LINE_GROUP_SIZE = 32\n\n/** Line class per row kind; context rows keep the block's default ink. */\nconst DIFF_ROW_CLASS: Record<DiffRow['kind'], string | undefined> = {\n add: css.diffAdd,\n del: css.diffDel,\n hunk: css.diffHunk,\n meta: css.diffMeta,\n context: css.diffContext,\n}\n\n/** One diff row: optional marker column, then the body with its token colors. */\nfunction renderDiffRow(row: DiffRow, index: number, tokens: readonly HighlightSpan[] | undefined): ReactNode {\n const kindClass = DIFF_ROW_CLASS[row.kind]\n return (\n <Fragment key={index}>\n {index > 0 && '\\n'}\n <span className={clsx('line', css.diffLine, kindClass)}>\n {isDiffContent(row)\n ? <Fragment>\n <span className={css.diffMarker}>{row.marker}</span>\n {tokens === undefined\n ? row.body\n : tokens.map((span, spanIndex) => <span key={spanIndex} style={span.style}>{span.text}</span>)}\n </Fragment>\n : row.raw}\n </span>\n </Fragment>\n )\n}\n\nfunction renderLine(line: readonly HighlightSpan[], index: number): ReactNode {\n return (\n <Fragment key={index}>\n {index > 0 && '\\n'}\n <span className=\"line\">\n {line.map((span, spanIndex) => <span key={spanIndex} style={span.style}>{span.text}</span>)}\n </span>\n </Fragment>\n )\n}\n\nexport function CodeBlock({\n code, lang, diff, streaming, className, contentRef, lineNumbers = false, showHeader = true, copyLabel, copiedLabel, toolbarLabels, wrap,\n}: CodeBlockProps) {\n const trimmed = code.endsWith('\\n') ? code.slice(0, -1) : code\n const diffRows = useMemo(() => ((diff ?? isDiffFenceLanguage(lang)) ? parseDiffFence(trimmed) : undefined),\n [trimmed, lang, diff])\n const sourceLines = lineNumbers ? trimmed.split('\\n') : undefined\n const rootRef = useRef<HTMLDivElement>(null)\n // Diff rows join the same viewport gate as grammar-highlighted fences, so an\n // off-screen fence paints its row colors without tokenizing the body.\n const highlighting = useViewportHighlighting(rootRef, diffRows === undefined ? lang : 'diff')\n // Re-render when a lazy grammar finishes loading, so a fence that showed plain\n // text while its language's grammar imported picks up highlighting. The\n // snapshot value is opaque; only its change across renders drives the memo.\n const loaded = useSyncExternalStore(subscribeGrammarLoaded, grammarLoadCount, grammarLoadCount)\n // Each file's old and new sides are tokenized separately; a growing fence\n // re-tokenizes per chunk because that grouping has no incremental path, and\n // diffs in a fence are short enough to accept it.\n const diffTokens = useMemo(\n () => (diffRows === undefined || !highlighting ? undefined : diffFenceTokens(diffRows)),\n [diffRows, highlighting, loaded],\n )\n // Streaming state lives in refs mutated inside the memo (the MarkdownText\n // streaming-cache pattern): the session's caches carry across chunks only\n // because the owner keys this instance stably while the fence grows.\n const sessionRef = useRef<StreamingHighlightSession | null>(null)\n const lineCacheRef = useRef<{\n code: string\n lang: string | undefined\n generation: number\n frame: StreamingHighlightFrame\n groups: ReactNode[]\n pending: ReactNode[]\n nextLine: number\n body: ReactNode\n } | null>(null)\n const settledRef = useRef(false)\n const streamedBody = useMemo(() => {\n // A diff fence draws its own rows; the session's single-language stream is unused.\n if (!highlighting || diffRows !== undefined) {\n sessionRef.current = null\n lineCacheRef.current = null\n settledRef.current = false\n return undefined\n }\n if (streaming !== true) {\n const previous = lineCacheRef.current\n if (previous !== null && previous.code === trimmed && previous.lang === lang) {\n settledRef.current = true\n return previous.body\n }\n sessionRef.current = null\n lineCacheRef.current = null\n settledRef.current = true\n return undefined\n }\n if (settledRef.current) {\n sessionRef.current = null\n lineCacheRef.current = null\n settledRef.current = false\n }\n sessionRef.current ??= new StreamingHighlightSession()\n const frame = sessionRef.current.updateFrame(trimmed, lang)\n if (frame === undefined) {\n lineCacheRef.current = null\n return undefined\n }\n const previous = lineCacheRef.current\n if (previous?.frame === frame && previous.code === trimmed && previous.lang === lang) {\n return previous.body\n }\n const sameGeneration = previous?.generation === frame.generation\n const groups = sameGeneration ? [...previous.groups] : []\n let pending = sameGeneration ? [...previous.pending] : []\n let nextLine = sameGeneration ? previous.nextLine : 0\n for (const line of frame.appended) {\n pending.push(renderLine(line, nextLine))\n nextLine += 1\n if (pending.length !== STREAMING_LINE_GROUP_SIZE) continue\n const start = nextLine - pending.length\n groups.push(<Fragment key={start}>{pending}</Fragment>)\n pending = []\n }\n const tail = frame.tail.map((line, index) => renderLine(line, nextLine + index))\n const tailGroup = <Fragment key={nextLine - pending.length}>{[...pending, ...tail]}</Fragment>\n const body = <pre {...SHIKI_PRE_PROPS}><code>{groups}{tailGroup}</code></pre>\n lineCacheRef.current = {\n code: trimmed, lang, generation: frame.generation, frame, groups, pending, nextLine, body,\n }\n return body\n }, [streaming, highlighting, diffRows, trimmed, lang, loaded])\n const html = useMemo(\n () => (diffRows === undefined && highlighting && streaming !== true && streamedBody === undefined\n ? highlightToHtml(trimmed, lang)\n : undefined),\n [diffRows, streaming, highlighting, streamedBody, trimmed, lang, loaded],\n )\n const [copied, setCopied] = useState(false)\n const [localWrapped, setWrapped] = useState(true)\n const wrapped = wrap ?? localWrapped\n\n const onCopy = useCallback(() => {\n if (copied) return\n /* v8 ignore next -- both arms always mount a <pre>; trimmed is the\n typed fallback if the DOM shape ever diverges. */\n const text = rootRef.current?.querySelector('pre')?.textContent ?? trimmed\n void writeClipboard(text).then((ok) => {\n if (!ok) return\n setCopied(true)\n window.setTimeout(() => { setCopied(false) }, 1000)\n })\n }, [copied, trimmed])\n\n // shiki's HTML output is a static span tree it generated from `code` (no\n // user HTML passes through), the sanctioned innerHTML consumption path per\n // shiki's own docs.\n const body = diffRows !== undefined\n ? (\n <pre className={css.plain}><code>{diffRows.rows.map((row, index) => renderDiffRow(row, index, diffTokens?.get(index)))}</code></pre>\n )\n : streamedBody !== undefined\n ? streamedBody\n : html === undefined\n ? (\n <pre className={css.plain}><code>{sourceLines === undefined ? trimmed : sourceLines.map((line, index) => (\n <Fragment key={index}>{index > 0 && '\\n'}<span className=\"line\">{line}</span></Fragment>\n ))}</code></pre>\n )\n : (\n <div dangerouslySetInnerHTML={{ __html: html }} />\n )\n\n return (\n <div ref={rootRef} className={clsx(css.block, 'md-code-block', lineNumbers && css.numbered, diffRows !== undefined && !lineNumbers && css.diffFence, toolbarLabels !== undefined && css.card, className)}\n data-line-numbers={lineNumbers || undefined}\n data-code-wrap={toolbarLabels === undefined ? undefined : wrapped}\n style={sourceLines === undefined ? undefined : {\n '--dsl-code-block-line-number-width': `${Math.max(2, String(sourceLines.length).length)}ch`,\n } as CSSProperties}>\n {/* These paired attributes are stable semantic hooks for owner styling and DOM tests. */}\n {showHeader && <div className={css.bannerWrap}>\n {toolbarLabels !== undefined ? <CodeToolbar\n lang={lang} labels={toolbarLabels} copyLabel={copyLabel} copiedLabel={copiedLabel}\n copied={copied} wrapped={wrapped} onCopy={onCopy}\n onWrap={wrap === undefined ? () => { setWrapped(value => !value) } : undefined}\n /> : <div className={css.banner} data-code-block-banner>\n <div className={css.infostring} data-text-interaction-exclude=\"\">{lang ?? ''}</div>\n <div className={css.action}>\n <button type=\"button\" className={css.copyButton} onClick={onCopy}>\n {copied ? copiedLabel : copyLabel}\n </button>\n </div>\n </div>}\n </div>}\n <div ref={contentRef} className={css.content} data-code-block-content>{body}</div>\n </div>\n )\n}\n","/**\n * TeX-to-React via KaTeX, replicating the rehype-katex pipeline this renderer\n * replaced: the same three-arm error chain (strict render, `strict: 'ignore'`\n * retry, error span) and a DOM-identical element tree, so settled math keeps\n * its exact markup. KaTeX emits an HTML string; the browser's own HTML parser\n * (`DOMParser`, applying the spec's SVG/MathML foreign-content attribute\n * adjustments KaTeX output relies on) turns it into a tree this module maps\n * onto React elements — KaTeX output is a static span/MathML/SVG vocabulary\n * with no raw user HTML, the same trust shiki's tree gets in CodeBlock.\n *\n * React 18 has no MathML support, so the `.katex-mathml` subtree's elements\n * land in the HTML namespace — exactly as they did under the replaced\n * hast-util-to-jsx-runtime pipeline. The visual arm is the `.katex-html`\n * span tree; the MathML arm serves assistive technology, which reads it by\n * tag name regardless of namespace.\n */\n\nimport { createElement } from 'react'\nimport type { CSSProperties, ReactNode } from 'react'\nimport katex from 'katex'\n\n/**\n * Convert one inline `style` attribute string into React's style object.\n * KaTeX emits only plain kebab-case declarations (no custom properties and no\n * nameless declarations), so camel-casing the property is the whole mapping.\n */\nfunction styleObject(css: string): CSSProperties {\n const style: Record<string, string> = {}\n for (const declaration of css.split(';')) {\n const colon = declaration.indexOf(':')\n if (colon === -1) continue\n const name = declaration.slice(0, colon).trim()\n const key = name.replace(/-([a-z])/g, (_, letter: string) => letter.toUpperCase())\n style[key] = declaration.slice(colon + 1).trim()\n }\n return style\n}\n\n/** Map one parsed DOM node onto a React element (text nodes pass through). */\nfunction domToReact(node: ChildNode, key: number): ReactNode {\n if (node.nodeType === Node.TEXT_NODE) return node.textContent\n /* v8 ignore next 2 -- KaTeX output holds only elements and text; other\n node kinds cannot appear in its serialized vocabulary. */\n if (node.nodeType !== Node.ELEMENT_NODE) return null\n const element = node as Element\n const props: Record<string, unknown> = { key }\n for (const attribute of element.attributes) {\n if (attribute.name === 'class') props['className'] = attribute.value\n else if (attribute.name === 'style') props['style'] = styleObject(attribute.value)\n else props[attribute.name] = attribute.value\n }\n const children = [...element.childNodes].map(domToReact)\n return children.length === 0\n ? createElement(element.localName, props)\n : createElement(element.localName, props, ...children)\n}\n\n/**\n * Render TeX source to React elements through KaTeX.\n * @param value - The TeX source (math node value; fenced `math` blocks append\n * their trailing newline to match the replaced pipeline's text extraction).\n * @param displayMode - Display (block) versus inline rendering.\n * @returns KaTeX's element tree, or the error span when the source does not\n * parse (colored with KaTeX's stock `errorColor`, matching rehype-katex).\n */\nexport function renderTexToReact(value: string, displayMode: boolean): ReactNode {\n let html: string\n try {\n html = katex.renderToString(value, { displayMode, throwOnError: true })\n } catch (error) {\n try {\n html = katex.renderToString(value, { displayMode, strict: 'ignore', throwOnError: false })\n } catch {\n // KaTeX renders ParseErrors itself under throwOnError: false; only its\n // internal errors reach here, so mirror rehype-katex's manual span.\n /* v8 ignore next 8 */\n return (\n <span\n className=\"katex-error\"\n style={{ color: '#cc0000' }}\n title={String(error)}\n >\n {value}\n </span>\n )\n }\n }\n const parsed = new DOMParser().parseFromString(html, 'text/html')\n return [...parsed.body.childNodes].map(domToReact)\n}\n","/** Fence presets: the code and math blocks a Markdown document renders for one fence. */\nimport type { ReactNode } from 'react'\nimport { CodeBlock } from './CodeBlock.tsx'\nimport { renderTexToReact } from './katex.tsx'\nimport type { MarkdownCodeLabels } from './render.tsx'\n\n/** Inputs of {@link FenceCodeBlock}. */\nexport interface FenceCodeBlockProps {\n /** Grammar hint and banner text; omitted renders plain code. */\n lang?: string | undefined\n /** The fence body without its closing newline. */\n code: string\n /** The surrounding document is still streaming; the block keeps its instance as `code` grows. */\n streaming: boolean\n /** Localized code-block chrome. */\n labels: MarkdownCodeLabels\n /** Unified-diff rows; omitted follows `lang` as {@link CodeBlock} does. */\n diff?: boolean | undefined\n}\n\n/**\n * Render one fence body as a code block.\n * @param props - fence language, body, streaming state, chrome labels, and diff choice.\n * @returns the code block.\n */\nexport function FenceCodeBlock({ lang, code, streaming, labels, diff }: FenceCodeBlockProps): ReactNode {\n return (\n <CodeBlock\n // The replaced hast pipeline appended one synthetic newline that\n // CodeBlock's display trim removes; feeding the bare value would make\n // that trim eat a REAL trailing blank line inside the fence instead.\n code={`${code}\\n`}\n lang={lang}\n streaming={streaming}\n diff={diff}\n copyLabel={labels.copyLabel}\n copiedLabel={labels.copiedLabel}\n toolbarLabels={labels.toolbarLabels}\n />\n )\n}\n\n/**\n * Render one `math` fence body as display TeX.\n * @param props - the fence body without its closing newline.\n * @returns the typeset formula.\n */\nexport function FenceMathBlock({ code }: { code: string }): ReactNode {\n // rehype-katex parity: its text extraction saw the code block's trailing newline.\n return <>{renderTexToReact(`${code}\\n`, true)}</>\n}\n","/** Local Markdown destinations accepted by the file-preview callback. */\n\n/**\n * Recognize a relative, rooted, or absolute Windows path before URL parsing.\n * @param value - A decoded or URI-normalized destination.\n * @returns Whether a filesystem prefix makes the destination unambiguous.\n */\nexport function isExplicitFilePath(value: string): boolean {\n return /^(?:[\\\\/]|\\.{1,2}[\\\\/]|[a-z]:[\\\\/])/i.test(value)\n}\n\n/**\n * Decode a file destination with a fragment, line range, or line/column suffix.\n * Explicit relative, slash/backslash-rooted, and Windows drive paths take\n * precedence over URLs. Other parseable absolute URLs are not file links.\n * Fragments take precedence over colon suffixes; invalid locations open the\n * file without selecting a line. Columns are consumed but not selected.\n * Percent-encode literal `?`, `#`, and numeric colon suffixes in filenames.\n * @param value - Parsed Markdown link destination.\n * @returns A local path and optional first line, or undefined for URLs,\n * fragment-only links, queries, malformed escapes, or control characters.\n */\nexport function parseFileLink(value: string): { path: string; line?: number } | undefined {\n const hash = value.indexOf('#')\n const destination = hash < 0 ? value : value.slice(0, hash)\n if (destination.includes('?')) return undefined\n let path: string\n try {\n path = decodeURIComponent(destination)\n } catch (_error) {\n // Malformed percent escapes cannot identify a file unambiguously.\n return undefined\n }\n if (path.length === 0 || /[\\u0000-\\u001f\\u007f]/.test(path)) return undefined\n if (!isExplicitFilePath(path) && URL.canParse(path)) return undefined\n const suffix = hash < 0 ? /:(\\d+)(?::\\d+|-(\\d+))?$/.exec(destination) : null\n if (suffix !== null) path = path.slice(0, -suffix[0].length)\n if (path.length === 0) return undefined\n const match = suffix ?? (hash < 0 ? null : /^L(\\d+)(?:-L(\\d+))?$/.exec(value.slice(hash + 1)))\n if (match === null) return { path }\n const line = Number(match[1])\n const end = match[2] === undefined ? line : Number(match[2])\n if (!Number.isSafeInteger(line) || !Number.isSafeInteger(end) || line < 1 || end < line) return { path }\n return { path, line }\n}\n","/** Consumer-owned navigation for Markdown links. */\nimport { createContext, useContext, useMemo } from 'react'\nimport type { HTMLAttributes, ReactNode } from 'react'\nimport type { FileDragActions } from '../file-drag-actions.ts'\nimport type { ImageLightboxLabels } from '../ImageLightbox.tsx'\n\n/**\n * Handle one sanitized absolute HTTP(S) URL selected from Markdown.\n * @param href - destination URL.\n */\nexport type MarkdownExternalLinkHandler = (href: string) => void\n\n/** Explicit object and viewport coordinates from the element owning a context gesture. */\nexport type MarkdownMenuTarget =\n | { kind: 'file'; path: string; line?: number }\n | { kind: 'url'; url: string }\n | { kind: 'image'; url: string; path?: string; name?: string; mediaType?: string }\n\n/** One Markdown code fence whose language is final, as {@link MarkdownDelegate.renderCode} receives it. */\nexport interface MarkdownDelegateFenceInfo {\n /**\n * The info string's language word, cut at its first character outside\n * letters, digits, `_`, and `-`, then lowercased (`c++` yields `c`).\n */\n readonly lang: string\n /** The fence body without its closing newline. */\n readonly code: string\n /** The surrounding document is still streaming, so `code` may still change. */\n readonly streaming: boolean\n /** The info string after the language word, as the author wrote it; absent when the fence names only a language. */\n readonly meta?: string | undefined\n}\n\n/** Navigation capabilities supplied by the nearest Markdown owner. */\nexport interface MarkdownDelegate {\n /** Open an object menu without executing its normal activation. */\n readonly getTriggerProps?: ((target: MarkdownMenuTarget) => Pick<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'onKeyDown' | 'tabIndex'>) | undefined\n /**\n * Image previews for decoded local paths in this owner's workspace. The renderer\n * appends a per-mount `load` query parameter to `api/file` route URLs.\n */\n readonly fileImages?: {\n fileDrag: FileDragActions\n resolve: (path: string) => string | undefined\n resourceAddress?: ((path: string) => string) | undefined\n labels: ImageLightboxLabels & { open: string; loading: string; failed: string }\n } | undefined\n /** Ordinary HTTP(S) activation; absent handlers retain native anchor behavior. */\n readonly openExternalLink?: MarkdownExternalLinkHandler | undefined\n /**\n * Open a decoded local destination from settled Markdown; absent handlers leave plain text.\n * @param path - Absolute or workspace-relative file path.\n * @param options - First line to reveal when the destination specifies a line or range.\n */\n readonly openFile?: ((path: string, options?: { line?: number }) => void) | undefined\n /**\n * Render one fence whose language is final: it has a language and content.\n * Absent, the document renders fences with its built-in code and math blocks;\n * present, the owner renders every such fence, including `diff` and `math`.\n * @param fence - language, body, and streaming state.\n * @returns the rendered block.\n */\n readonly renderCode?: ((fence: MarkdownDelegateFenceInfo) => ReactNode) | undefined\n}\n\nconst MarkdownDelegateContext = createContext<MarkdownDelegate>({})\n\n/** Props for one Markdown navigation scope. */\nexport interface MarkdownDelegateProviderProps extends MarkdownDelegate {\n readonly children: ReactNode\n}\n\n/**\n * Scope Markdown navigation without threading callbacks through renderers.\n * Nested providers replace the enclosing capabilities. Handler changes reach cached links.\n * @param props - Child tree and its file and HTTP(S) link handlers.\n * @returns the scoped child tree.\n */\nexport function MarkdownDelegateProvider({\n children,\n openExternalLink,\n openFile,\n fileImages,\n getTriggerProps,\n renderCode,\n}: MarkdownDelegateProviderProps): ReactNode {\n const delegate = useMemo(() => ({ openExternalLink, openFile, fileImages, getTriggerProps, renderCode }),\n [openExternalLink, openFile, fileImages, getTriggerProps, renderCode])\n return (\n <MarkdownDelegateContext.Provider value={delegate}>\n {children}\n </MarkdownDelegateContext.Provider>\n )\n}\n\n/**\n * Read the nearest Markdown navigation capabilities.\n * @returns Owner callbacks, or an empty delegate outside a provider.\n */\nexport function useMarkdownDelegate(): MarkdownDelegate {\n return useContext(MarkdownDelegateContext)\n}\n","import type { HTMLAttributes } from 'react'\nimport { useEffect, useRef } from 'react'\nimport { createPortal } from 'react-dom'\nimport { IconCloseOutlineRegular } from './icons/index.tsx'\nimport css from './ImageLightbox.module.css'\n\n/** Lightbox strings the owner resolves from its own locale namespace. */\nexport interface ImageLightboxLabels {\n /** Accessible name of the preview dialog. */\n dialog: string\n /** Accessible label of the close control. */\n close: string\n}\n\n/**\n * Document-level original-image preview opened by clicking a thumbnail.\n * Closes on Escape, backdrop press, or the close control, and restores focus\n * to the opener on unmount. Rendered through a body portal: an opener inside\n * a transformed or filtered ancestor would otherwise trap the fixed backdrop\n * in that ancestor's box instead of covering the viewport.\n *\n * @param props.src - the original image URL.\n * @param props.alt - the image's alt text.\n * @param props.labels - dialog and close-control strings.\n * @param props.contextMenuProps - optional original-image gesture bindings.\n * @param props.onClose - dismiss callback owned by the opener.\n * @returns the modal preview dialog.\n */\nexport function ImageLightbox({ src, alt, labels, onClose, contextMenuProps }: {\n src: string\n alt: string\n labels: ImageLightboxLabels\n onClose: () => void\n contextMenuProps?: Pick<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'onKeyDown' | 'tabIndex'> | undefined\n}) {\n const closeRef = useRef<HTMLButtonElement | null>(null)\n const restoreRef = useRef<HTMLElement | null>(null)\n\n useEffect(() => {\n restoreRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null\n closeRef.current?.focus()\n const onKeyDown = (event: globalThis.KeyboardEvent): void => {\n // A portaled image menu owns Escape and Tab until it returns focus.\n if (event.defaultPrevented || document.activeElement?.closest('[role=\"menu\"]')) return\n if (event.key === 'Escape') { event.stopPropagation(); onClose() }\n if (event.key === 'Tab') { event.preventDefault(); closeRef.current?.focus() }\n }\n window.addEventListener('keydown', onKeyDown, true)\n return () => {\n window.removeEventListener('keydown', onKeyDown, true)\n restoreRef.current?.focus()\n }\n }, [onClose])\n\n return createPortal(\n <div\n className={css.backdrop}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={labels.dialog}\n >\n <div className={css.stage}>\n <div className={css.mask} aria-hidden=\"true\" onMouseDown={onClose} />\n <img className={css.image} src={src} alt={alt} {...contextMenuProps} />\n <button ref={closeRef} type=\"button\" className={css.close} aria-label={labels.close} onClick={onClose}>\n <IconCloseOutlineRegular size={16} />\n </button>\n </div>\n </div>,\n document.body,\n )\n}\n","/** Passive, contained image preview for Markdown image links. */\nimport { useState } from 'react'\nimport { IconLoadingOutlineRegular } from './icons/index.tsx'\nimport css from './ImagePreview.module.css'\n\n/**\n * Render an image without introducing a second activation target.\n * @param props - Source, accessible description, localized status.\n * @returns A contained preview with loading or failure status.\n */\nexport function ImagePreview({ src, alt, loadingLabel, failedLabel }: {\n src: string\n alt: string\n loadingLabel: string\n failedLabel: string\n}) {\n return <Preview key={src} src={src} alt={alt} loadingLabel={loadingLabel} failedLabel={failedLabel} />\n}\n\nfunction Preview({ src, alt, loadingLabel, failedLabel }: {\n src: string\n alt: string\n loadingLabel: string\n failedLabel: string\n}) {\n const [state, setState] = useState<'loading' | 'ready' | 'failed'>('loading')\n return <span className={css.frame}>\n {state !== 'failed' && <img src={src} alt={alt} loading=\"lazy\" decoding=\"async\" referrerPolicy=\"no-referrer\"\n className={css.image} data-ready={state === 'ready' || undefined}\n onLoad={() => { setState('ready') }} onError={() => { setState('failed') }} />}\n {state !== 'ready' && <span className={css.status} role=\"status\">\n {state === 'loading' && <IconLoadingOutlineRegular size={16} />}\n <span>{state === 'loading' ? loadingLabel : failedLabel}</span>\n </span>}\n </span>\n}\n","/**\n * Direct mdast→React markdown renderer. Replaces the react-markdown /\n * remark-rehype pipeline with one switch over parsed nodes so streaming can\n * cache frozen blocks as React elements; the rendered DOM is pinned\n * byte-for-byte by `tests/fixtures/markdown-dom` and must not drift.\n *\n * External links reject executable and embedded-document protocols; settled\n * local file links use an explicit owner callback. Images additionally require\n * absolute HTTP(S), raw HTML renders as literal text (no HTML enters the\n * DOM), and KaTeX runs without trusted commands. Fragment-only URLs are not\n * absolute, so footnote references and back-references render as plain\n * text rather than in-page links.\n *\n * Merge-extensible node unions fall through the documented default (render\n * nothing) rather than ending in assertNever: grammars registered elsewhere\n * may add node types this renderer has no mapping for.\n */\n\nimport type { HTMLAttributes } from 'react'\nimport { Fragment, createElement, useCallback, useState } from 'react'\nimport type { Key, ReactNode } from 'react'\nimport clsx from 'clsx'\nimport type * as Md from 'mdast'\nimport type {} from 'mdast-util-math'\nimport { normalizeUri } from 'micromark-util-sanitize-uri'\nimport type { CodeToolbarLabels } from '../CodeToolbar.tsx'\nimport { FenceCodeBlock, FenceMathBlock } from './FenceBlocks.tsx'\nimport { isExplicitFilePath, parseFileLink } from './file-link.ts'\nimport { renderTexToReact } from './katex.tsx'\nimport { LinkIconMedium, classifyLinkPath } from '../LinkIcon.tsx'\nimport { useMarkdownDelegate } from './MarkdownDelegate.tsx'\nimport { HoverCard } from '../HoverCard.tsx'\nimport { DraggableImage } from '../DraggableImage.tsx'\nimport { ImageLightbox } from '../ImageLightbox.tsx'\nimport { ImagePreview } from '../ImagePreview.tsx'\nimport type { PositionedBlock } from './incremental.ts'\nimport css from './MarkdownText.module.css'\n\n/** Copy-button labels forwarded to fence CodeBlocks (this package is cordis-free, so copy arrives via props). */\nexport interface MarkdownCodeLabels {\n /** Copy-button idle label. */\n copyLabel: string\n /** Copy-button label during the post-copy confirmation window. */\n copiedLabel: string\n /** Shared card controls; omitted for custom toolbar layouts. */\n toolbarLabels?: CodeToolbarLabels | undefined\n}\n\n/** Localized chrome for a Markdown document. */\nexport interface MarkdownLabels {\n code: MarkdownCodeLabels\n footnotes: string\n}\n\nfunction sanitizeUrl(url: string): string {\n if (isExplicitFilePath(url)) return ''\n try {\n switch (new URL(url).protocol) {\n case 'javascript:':\n case 'vbscript:':\n case 'data:':\n case 'blob:':\n return ''\n default:\n return url\n }\n } catch {\n // Relative and otherwise unparsable destinations are disallowed alongside\n // disallowed protocols; new URL() has no other failure mode for strings.\n return ''\n }\n}\n\nfunction remoteImageUrl(url: string): string | undefined {\n try {\n const protocol = new URL(url).protocol\n return protocol === 'http:' || protocol === 'https:' ? url : undefined\n } catch {\n // Same single failure mode as above: not an absolute URL.\n return undefined\n }\n}\n\n/** Authenticated Host media routes as the Desktop application addresses them. */\nconst DESKTOP_MEDIA_ROUTES = [\n 'dsh-app://app/api/file?', 'dsh-app://app/api/plugin-market/detail-file?', 'dsh-app://app/api/plugin-manager/detail-file?',\n]\n\n/** Rewritten images may use Web media protocols or the Desktop application's media routes. */\nfunction vocabularyImageUrl(url: string): string | undefined {\n try {\n const protocol = new URL(url).protocol\n return protocol === 'http:' || protocol === 'https:' || protocol === 'blob:' || protocol === 'data:'\n || DESKTOP_MEDIA_ROUTES.some(route => url.startsWith(route))\n ? url\n : undefined\n } catch {\n // A vocabulary result must be an absolute URL; anything else stays a miss.\n return undefined\n }\n}\n\n/**\n * The displayable source for one image destination: absolute HTTP(S) as\n * authored, otherwise the context's local-path vocabulary when it vouches for\n * the destination. Either miss leaves the authored fallback (alt text) to the\n * caller.\n * @param url - The authored markdown destination.\n * @param pathImages - Rewriting vocabulary, when the render pass has one.\n * @param load - The mounted image's load number for rewritten URLs.\n * @returns The displayable image URL, or undefined.\n */\nfunction imageSource(url: string, pathImages: MarkdownPathImages | undefined, load: number): string | undefined {\n const remote = remoteImageUrl(sanitizeUrl(normalizeUri(url)))\n if (remote !== undefined) return remote\n const rewritten = pathImages?.resolve(url)\n const allowed = rewritten === undefined ? undefined : vocabularyImageUrl(rewritten)\n return allowed === undefined ? undefined : freshImageUrl(allowed, load)\n}\n\n// A module counter, not useId: useId derives from tree position, so images at\n// the same position in two sessions would share a URL.\nlet imageLoads = 0\nconst nextImageLoad = (): number => ++imageLoads\n\n/**\n * Tag a Host file-route image URL with its mount's load number. Browsers reuse\n * a same-URL image within one document despite `no-store`, so without the tag\n * a newly rendered image of a rewritten file would show the earlier bytes.\n * @param url - Absolute resolved image URL; URLs outside the `api/file` route stay unchanged.\n * @param load - Number allocated once per mounted image or file link.\n * @returns The URL with a `load` query parameter, or the unchanged URL.\n */\nfunction freshImageUrl(url: string, load: number): string {\n let fresh: URL\n try { fresh = new URL(url) }\n catch { return url } // Only an unparsable owner-supplied URL throws; it is emitted as before.\n if (!fresh.pathname.endsWith('/api/file')) return url\n // Appending preserves the resolver's existing query encoding.\n fresh.search = `${fresh.search === '' ? '?' : `${fresh.search}&`}load=${load}`\n return fresh.href\n}\n\n/** Link/image reference targets collected from a document (first definition per identifier wins, as in CommonMark). */\nexport interface ReferenceTargets {\n /** Link/image definitions keyed by upper-cased identifier. */\n definitions: Map<string, Md.Definition>\n /** Footnote definitions keyed by upper-cased identifier. */\n footnotes: Map<string, Md.FootnoteDefinition>\n}\n\n/**\n * Create an empty {@link ReferenceTargets}.\n * @returns Fresh empty maps.\n */\nexport function createReferenceTargets(): ReferenceTargets {\n return { definitions: new Map(), footnotes: new Map() }\n}\n\n/**\n * Record every definition and footnote definition under `nodes` into\n * `targets`, depth-first, keeping the first definition per identifier.\n * @param nodes - Subtrees to walk (top-level blocks or any nested children).\n * @param targets - Accumulator, typically shared across incremental segments.\n */\nexport function collectReferenceTargets(\n nodes: readonly Md.RootContent[],\n targets: ReferenceTargets,\n): void {\n for (const node of nodes) {\n if (node.type === 'definition') {\n const id = node.identifier.toUpperCase()\n if (!targets.definitions.has(id)) targets.definitions.set(id, node)\n } else if (node.type === 'footnoteDefinition') {\n const id = node.identifier.toUpperCase()\n if (!targets.footnotes.has(id)) targets.footnotes.set(id, node)\n }\n if ('children' in node) collectReferenceTargets(node.children, targets)\n }\n}\n\n/**\n * Local-path image vocabulary for image destinations: the owner maps an\n * authored destination that fails the remote-URL allowlist (an absolute local\n * file path, for example) to a displayable URL it can vouch for. Absent\n * wherever no such vocabulary exists, authored local destinations keep their\n * documented fallback (the image's alt text). Rewritten destinations must be\n * absolute; the renderer re-checks their protocol before emitting them.\n */\nexport interface MarkdownPathImages {\n /**\n * Resolve one authored image destination.\n * @param value - The destination exactly as the markdown author wrote it.\n * @returns A displayable absolute URL, or undefined when the destination\n * names no displayable image — it then stays inert alt text. The renderer\n * appends a per-mount `load` query parameter to `api/file` route results.\n */\n resolve(value: string): string | undefined\n}\n\n/**\n * File-mention affordance for inline code: the owner resolves an authored\n * token to the file it names, using its own vocabulary of real files — the\n * renderer never guesses at what looks like a path.\n */\nexport interface MarkdownFileMentions {\n /**\n * Resolve one inline-code token.\n * @param value - The authored token, exactly as written.\n * @returns The opener with its accessible label and full-path title, or\n * undefined when the token names no known file — it then stays inert code.\n */\n resolve(value: string): {\n open: () => void\n contextMenuProps?: Pick<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'onKeyDown' | 'tabIndex'>\n label: string\n title: string\n } | undefined\n}\n\n/**\n * One render pass's state: immutable options and targets plus the footnote\n * numbering accumulated in document order while references render.\n */\nexport interface MarkdownRenderContext {\n /** Streaming arm: fences highlight incrementally as they grow; TeX (including ```math fences) stays literal until the settled pass. */\n readonly streaming: boolean\n /** Localized fence copy-button labels. */\n readonly labels: MarkdownLabels\n /** Inside a blockquote's children: tables there always fill the quote's width. */\n readonly inBlockquote?: boolean\n /** Inline-code file mentions; absent wherever no opener vocabulary exists. */\n readonly fileMentions: MarkdownFileMentions | undefined\n /** Local-path image vocabulary; absent wherever no rewriting owner exists. */\n readonly pathImages: MarkdownPathImages | undefined\n /** Raw HTML renders nothing instead of literal text. */\n readonly omitHtml: boolean\n /** Inside an anchor's children: interactive mentions must not nest there. */\n readonly inLink?: boolean\n /** Reference targets visible to this pass. */\n readonly targets: ReferenceTargets\n /** Footnote identifiers in first-reference order; a footnote's number is its 1-based index here. */\n readonly footnoteOrder: string[]\n /** References rendered per identifier; drives the section's back-reference count. */\n readonly footnoteCounts: Map<string, number>\n}\n\n/**\n * Render top-level blocks. Nodes that render nothing (definitions, unmapped\n * types) are dropped rather than kept as null placeholders, matching the\n * replaced pipeline's child lists so separator newlines land identically.\n * @param blocks - Blocks with their stream-stable render keys.\n * @param context - The pass state; footnote numbering mutates in document order.\n * @returns One React node per rendered block.\n */\nexport function renderBlocks(\n blocks: readonly PositionedBlock[],\n context: MarkdownRenderContext,\n): ReactNode[] {\n return blocks\n .map(block => renderNode(block.node, block.key, context))\n .filter(element => element !== null)\n}\n\n/**\n * Interleave the newline text nodes the replaced pipeline emitted between\n * block-level children. They are invisible between elements but coalesce\n * into adjacent literal raw-HTML text, where the DOM parity fixtures pin\n * them.\n * @param elements - Rendered block children with empty renders already dropped.\n * @param edges - Also emit the leading and trailing newline (hast's loose wrap).\n * @returns The interleaved children.\n */\nexport function wrapBlockChildren(elements: readonly ReactNode[], edges: boolean): ReactNode[] {\n const wrapped: ReactNode[] = []\n for (const element of elements) {\n if (edges || wrapped.length > 0) wrapped.push('\\n')\n wrapped.push(element)\n }\n if (edges && elements.length > 0) wrapped.push('\\n')\n return wrapped\n}\n\n/**\n * A block child rendered for a parent that must tell paragraphs apart from\n * other blocks (list items unwrap them when tight; footnote bodies receive\n * their back-references inside the trailing paragraph).\n */\ntype BlockEntry = { paragraph: ReactNode[] } | { element: ReactNode }\n\n/** Render container children into {@link BlockEntry} values, dropping empty renders. */\nfunction renderBlockEntries(\n blocks: readonly Md.RootContent[],\n context: MarkdownRenderContext,\n): BlockEntry[] {\n const entries: BlockEntry[] = []\n for (const [index, block] of blocks.entries()) {\n if (block.type === 'paragraph') {\n entries.push({ paragraph: renderChildren(block.children, context) })\n } else {\n const element = renderNode(block, index, context)\n if (element !== null) entries.push({ element })\n }\n }\n return entries\n}\n\nfunction renderChildren(\n nodes: readonly Md.RootContent[],\n context: MarkdownRenderContext,\n): ReactNode[] {\n return nodes.map((node, index) => renderNode(node, index, context))\n}\n\nfunction renderNode(node: Md.RootContent, key: Key, context: MarkdownRenderContext): ReactNode {\n switch (node.type) {\n case 'text':\n return node.value\n case 'paragraph':\n return <p key={key}>{renderChildren(node.children, context)}</p>\n case 'heading':\n return createElement(`h${node.depth}`, { key }, ...renderChildren(node.children, context))\n case 'blockquote':\n return (\n <blockquote key={key}>\n {wrapBlockChildren(\n renderChildren(node.children, { ...context, inBlockquote: true }).filter(child => child !== null),\n true,\n )}\n </blockquote>\n )\n case 'thematicBreak':\n return <hr key={key} />\n case 'break':\n // The replaced pipeline emitted a newline text node after each <br>.\n return <Fragment key={key}><br />{'\\n'}</Fragment>\n case 'strong':\n return <strong key={key}>{renderChildren(node.children, context)}</strong>\n case 'emphasis':\n return <em key={key}>{renderChildren(node.children, context)}</em>\n case 'delete':\n return <del key={key}>{renderChildren(node.children, context)}</del>\n case 'inlineCode': {\n // Parity with mdast-util-to-hast: inline code renders line endings as spaces.\n const value = node.value.replace(/\\r?\\n|\\r/g, ' ')\n // An inline-code token that is entirely an absolute HTTP(S) URL keeps\n // its code chrome and gains the same safe external anchor as a link;\n // commands, partial URLs, and other schemes stay inert. The value is\n // authored text, not a parsed destination, so no normalizeUri: port,\n // path, and query render unchanged.\n const href = inlineCodeHttpUrl(value)\n if (href !== undefined) return <code key={key}>{renderSafeLink(href, [value], 'link')}</code>\n // A token the owner's file-mention vocabulary recognizes opens that\n // file; the resolver, not this renderer, decides what names a file.\n // Inside an anchor the token stays inert — a button cannot nest there.\n const mention = context.inLink === true ? undefined : context.fileMentions?.resolve(value)\n if (mention !== undefined) {\n return (\n <code key={key}>\n <button\n type=\"button\"\n className={css.fileMention}\n title={mention.title}\n aria-label={mention.label}\n onClick={mention.open}\n {...mention.contextMenuProps}\n >\n <LinkIconMedium kind={classifyLinkPath(value)} className={css.linkIcon} />\n {value}\n </button>\n </code>\n )\n }\n return <code key={key}>{value}</code>\n }\n case 'html':\n // No HTML parser enters the pipeline: raw HTML is literal text, or nothing where the owner omits it.\n return context.omitHtml ? null : node.value\n case 'code':\n return renderCode(node, key, context)\n case 'math':\n return <Fragment key={key}>{renderTexToReact(node.value, true)}</Fragment>\n case 'inlineMath':\n return <Fragment key={key}>{renderTexToReact(node.value, false)}</Fragment>\n case 'list':\n return renderList(node, key, context)\n case 'listItem':\n // Reachable only in hand-built trees: the grammar emits items inside lists.\n return renderListItem(node, listItemLoose(node), key, context)\n case 'table':\n return renderTable(node, key, context)\n case 'link':\n return renderAnchor(\n node.url, renderChildren(node.children, { ...context, inLink: true }), key,\n !anchorWrapsOnlyImages(node.children), context.streaming,\n )\n case 'linkReference':\n return renderLinkReference(node, key, context)\n case 'image':\n return renderImage(node.url, node.alt ?? '', key, context)\n case 'imageReference':\n return renderImageReference(node, key, context)\n case 'footnoteReference':\n return renderFootnoteReference(node, key, context)\n case 'definition':\n case 'footnoteDefinition':\n // Targets render elsewhere: definitions resolve references in place;\n // footnote bodies render in the trailing section.\n return null\n default:\n // Documented default for the merge-extensible union: node types without\n // a mapping (tableRow/tableCell outside a table, frontmatter, future\n // grammar contributions) render nothing.\n return null\n }\n}\n\nfunction renderCode(node: Md.Code, key: Key, context: MarkdownRenderContext): ReactNode {\n const language = node.lang ?? undefined\n if (node.value === '') {\n // Parity: the replaced pipeline kept the stock <pre> for an empty fence.\n return (\n <pre key={key}>\n <code className={language === undefined ? undefined : `language-${language}`} />\n </pre>\n )\n }\n // The replaced pipeline recovered the grammar id from the hast class with\n // /language-([\\w-]+)/, which truncates at the first non-word character.\n const lang = language === undefined ? undefined : /^[\\w-]+/.exec(language)?.[0]\n // Streaming keys are source offsets, stable while the fence grows, so the\n // block instance (and its incremental highlight session) survives every\n // chunk. A fence whose info string is still mid-chunk has no content yet and\n // took the empty-fence arm above, so `lang` here is final.\n if (lang === undefined) {\n return <FenceCodeBlock key={key} code={node.value} streaming={context.streaming} labels={context.labels.code} />\n }\n return (\n <MarkdownFenceSeat\n key={key} lang={lang} meta={node.meta ?? undefined} code={node.value} streaming={context.streaming} labels={context.labels.code}\n />\n )\n}\n\n/**\n * One fence whose language is final: the delegate's renderer when the owner\n * supplies one, otherwise the built-in math and code blocks. Reading the\n * delegate in this Component rather than in the render pass lets cached\n * streaming elements follow a provider change.\n */\nfunction MarkdownFenceSeat({ lang, meta, code, streaming, labels }: {\n readonly lang: string\n readonly meta: string | undefined\n readonly code: string\n readonly streaming: boolean\n readonly labels: MarkdownCodeLabels\n}): ReactNode {\n const { renderCode } = useMarkdownDelegate()\n if (renderCode !== undefined) {\n // The seat box spaces the fence among its siblings, so the delegate's blocks carry no margins of their own.\n return <div className={css.fenceSeat}>{renderCode({ lang: lang.toLowerCase(), code, streaming, meta })}</div>\n }\n // ```math fences render as display TeX once settled; while streaming they stay literal.\n if (!streaming && lang === 'math') return <FenceMathBlock code={code} />\n return <FenceCodeBlock lang={lang} code={code} streaming={streaming} labels={labels} />\n}\n\n/** A list is loose when it or any of its items is spread; every item then keeps its paragraphs. */\nfunction listLoose(list: Md.List): boolean {\n return (list.spread ?? false) || list.children.some(listItemLoose)\n}\n\nfunction listItemLoose(item: Md.ListItem): boolean {\n return item.spread ?? item.children.length > 1\n}\n\nfunction renderList(node: Md.List, key: Key, context: MarkdownRenderContext): ReactNode {\n const loose = listLoose(node)\n const properties: { start?: number; className?: string } = {}\n if (typeof node.start === 'number' && node.start !== 1) properties.start = node.start\n if (node.children.some(item => typeof item.checked === 'boolean')) {\n properties.className = 'contains-task-list'\n }\n return createElement(\n node.ordered === true ? 'ol' : 'ul',\n { key, ...properties },\n ...node.children.map((item, index) => renderListItem(item, loose, index, context)),\n )\n}\n\nfunction renderListItem(\n item: Md.ListItem,\n loose: boolean,\n key: Key,\n context: MarkdownRenderContext,\n): ReactNode {\n const entries = renderBlockEntries(item.children, context)\n const task = typeof item.checked === 'boolean'\n if (task) {\n const checkbox = <input key=\"task-checkbox\" type=\"checkbox\" checked={item.checked === true} disabled />\n const head = entries[0]\n if (head !== undefined && 'paragraph' in head) {\n head.paragraph = head.paragraph.length > 0 ? [checkbox, ' ', ...head.paragraph] : [checkbox]\n } else {\n entries.unshift({ paragraph: [checkbox] })\n }\n }\n // Newline placement and tight-paragraph unwrapping mirror\n // mdast-util-to-hast's list-item handler: a newline before every child\n // except a tight leading paragraph, and after a trailing non-paragraph\n // (or any trailing child when loose).\n const parts: ReactNode[] = []\n for (const [index, entry] of entries.entries()) {\n const isParagraph = 'paragraph' in entry\n if (loose || index !== 0 || !isParagraph) parts.push('\\n')\n if (!isParagraph) parts.push(entry.element)\n else if (loose) parts.push(<p key={`p-${index}`}>{entry.paragraph}</p>)\n else parts.push(<Fragment key={`p-${index}`}>{entry.paragraph}</Fragment>)\n }\n const tail = entries[entries.length - 1]\n if (tail !== undefined && (loose || !('paragraph' in tail))) parts.push('\\n')\n return (\n <li key={key} className={task ? 'task-list-item' : undefined}>\n {parts}\n </li>\n )\n}\n\nfunction renderTable(node: Md.Table, key: Key, context: MarkdownRenderContext): ReactNode {\n const align = node.align ?? null\n const [headRow, ...bodyRows] = node.children\n const columns = align === null ? headRow?.children.length ?? 0 : align.length\n // Four or more columns read as a comparison matrix: the block keeps the\n // table at natural width and exposes the stable `md-table-wide` hook so a\n // hosting layout (the chat transcript) can widen it past the message\n // column. Narrower tables — and any table inside a blockquote — fill the\n // column and wrap instead (deepsuite chat TableWrapper parity).\n const wide = columns >= 4 && context.inBlockquote !== true\n return (\n // On hover-capable inputs, wide tables rest with overflow-x hidden (the\n // hover-revealed bar in MarkdownText.module.css), dropping Chromium's implicit scroller\n // focusability — the explicit tabindex keeps them keyboard-reachable,\n // and :focus-visible restores scrolling.\n <div\n key={key}\n className={clsx(css.tableScroll, wide ? 'md-table-wide' : css.tableFill)}\n tabIndex={wide ? 0 : undefined}\n >\n <table>\n {headRow !== undefined && <thead>{renderTableRow(headRow, 'th', align, 0, context)}</thead>}\n {bodyRows.length > 0 && (\n <tbody>\n {bodyRows.map((row, index) => renderTableRow(row, 'td', align, index + 1, context))}\n </tbody>\n )}\n </table>\n </div>\n )\n}\n\nfunction renderTableRow(\n row: Md.TableRow,\n cellTag: 'th' | 'td',\n align: readonly Md.AlignType[] | null,\n key: Key,\n context: MarkdownRenderContext,\n): ReactNode {\n // With column alignment present, every row renders exactly one cell per\n // column, padding or truncating the row (mdast-util-to-hast parity).\n const length = align === null ? row.children.length : align.length\n const cells: ReactNode[] = []\n for (let index = 0; index < length; index++) {\n const cell = row.children[index]\n const alignValue = align?.[index]\n cells.push(createElement(\n cellTag,\n // hast-util-to-jsx-runtime's default tableCellAlignToStyle turned the\n // deprecated align attribute into an inline style; keep that DOM.\n { key: index, style: alignValue == null ? undefined : { textAlign: alignValue } },\n ...(cell === undefined ? [] : renderChildren(cell.children, context)),\n ))\n }\n return <tr key={key}>{cells}</tr>\n}\n\n/**\n * True when an anchor's markdown children are all images, so the anchor is a\n * clickable picture (badge, thumbnail): the leading URL glyph would dangle\n * beside the image instead of leading link text, so those anchors skip it.\n */\nfunction anchorWrapsOnlyImages(children: Md.PhrasingContent[]): boolean {\n return children.length > 0 && children.every(child => child.type === 'image' || child.type === 'imageReference')\n}\n\n/** Anchor over a safe absolute href, with optional owner navigation for HTTP(S). */\nfunction renderSafeLink(href: string, children: ReactNode[], key: Key, glyph = true): ReactNode {\n const safeHref = sanitizeUrl(href)\n if (safeHref === '') return <Fragment key={key}>{children}</Fragment>\n return <MarkdownAnchor key={key} href={safeHref} glyph={glyph}>{children}</MarkdownAnchor>\n}\n\nfunction MarkdownAnchor({ href, glyph, children }: {\n readonly href: string\n readonly glyph: boolean\n readonly children: ReactNode[]\n}): ReactNode {\n const { openExternalLink, getTriggerProps } = useMarkdownDelegate()\n const external = ['http:', 'https:'].includes(new URL(href).protocol)\n const open = external ? openExternalLink : undefined\n return (\n <a\n href={href}\n {...external ? getTriggerProps?.({ kind: 'url', url: href }) : {}}\n {...(external ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n onClick={open === undefined ? undefined : (event) => {\n if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return\n event.preventDefault()\n open(href)\n }}\n >\n {glyph && <LinkIconMedium kind=\"url\" href={href} className={css.linkIcon} />}\n {children}\n </a>\n )\n}\n\n/** Local destinations use the scoped file delegate after settlement. */\nfunction renderAnchor(url: string, children: ReactNode[], key: Key, glyph = true, streaming = false): ReactNode {\n const file = parseFileLink(url)\n if (file !== undefined) {\n if (streaming) return <Fragment key={key}>{children}</Fragment>\n return <MarkdownFileLink key={key} file={file} glyph={glyph}>{children}</MarkdownFileLink>\n }\n return renderSafeLink(normalizeUri(url), children, key, glyph)\n}\n\nfunction MarkdownFileLink({ file, glyph, children }: {\n readonly file: { path: string; line?: number }\n readonly glyph: boolean\n readonly children: ReactNode[]\n}): ReactNode {\n const { openFile, fileImages, getTriggerProps } = useMarkdownDelegate()\n const [load] = useState(nextImageLoad)\n if (openFile === undefined) return <>{children}</>\n // Pure-image anchors already contain their preview and keep one navigation target.\n const preview = glyph && classifyLinkPath(file.path) === 'image' ? fileImages : undefined\n const resolved = preview?.resolve(file.path)\n const src = resolved === undefined ? undefined : freshImageUrl(resolved, load)\n const anchor = (\n <button\n type=\"button\"\n className={clsx(css.fileMention, css.fileLink)}\n title={src === undefined ? file.path : undefined}\n {...getTriggerProps?.({ kind: 'file', ...file })}\n onClick={() => { openFile(file.path, file.line === undefined ? undefined : { line: file.line }) }}\n >\n {glyph && <LinkIconMedium kind={classifyLinkPath(file.path)} className={css.linkIcon} />}\n {children}\n </button>\n )\n if (src === undefined || preview === undefined) return anchor\n return <HoverCard inline anchor={anchor}\n content={<>\n <ImagePreview src={src} alt={file.path} loadingLabel={preview.labels.loading} failedLabel={preview.labels.failed} />\n <span className={css.previewName}>{file.path.split(/[\\\\/]/u).pop()}</span>\n </>} />\n}\n\n/**\n * The complete inline-code value when it is exactly an absolute HTTP(S) URL\n * (no surrounding whitespace); anything else stays inert code.\n */\nfunction inlineCodeHttpUrl(value: string): string | undefined {\n if (value.trim() !== value) return undefined\n try {\n const protocol = new URL(value).protocol\n return protocol === 'http:' || protocol === 'https:' ? value : undefined\n } catch {\n // Not an absolute URL at all — the only way new URL() rejects a string.\n return undefined\n }\n}\n\nfunction renderImage(url: string, alt: string, key: Key, context: MarkdownRenderContext): ReactNode {\n return <MarkdownImage key={`${key}:${url}`} destination={url} alt={alt}\n pathImages={context.pathImages} streaming={context.streaming} inLink={context.inLink === true} />\n}\n\nfunction MarkdownImage({ destination, alt, pathImages, streaming, inLink }: {\n destination: string\n alt: string\n pathImages: MarkdownPathImages | undefined\n streaming: boolean\n inLink: boolean\n}): ReactNode {\n const { fileImages } = useMarkdownDelegate()\n const [load] = useState(nextImageLoad)\n const file = streaming ? undefined : parseFileLink(destination)\n const resolved = file === undefined ? undefined : fileImages?.resolve(file.path)\n const src = resolved === undefined ? imageSource(destination, pathImages, load) : freshImageUrl(resolved, load)\n if (src === undefined) return <span className={css.imageAlt}>{alt}</span>\n return <LoadedMarkdownImage key={src} src={src} alt={alt} destination={destination} preview={inLink ? undefined : fileImages} />\n}\n\nfunction LoadedMarkdownImage({ src, alt, destination, preview }: {\n src: string\n alt: string\n destination: string\n preview: ReturnType<typeof useMarkdownDelegate>['fileImages']\n}): ReactNode {\n const { getTriggerProps } = useMarkdownDelegate()\n const [failed, setFailed] = useState(false)\n const [open, setOpen] = useState(false)\n const close = useCallback(() => { setOpen(false) }, [])\n if (failed) return <span className={css.imageAlt}>{preview === undefined ? '' : `${preview.labels.failed} · `}{alt || destination}</span>\n const file = parseFileLink(destination)\n const contextMenuProps = getTriggerProps?.({ kind: 'image', url: src, ...(file === undefined ? {} : { path: file.path }) })\n const imageProps = { className: css.image, src, alt, onError: () => { setFailed(true) },\n loading: 'lazy' as const, decoding: 'async' as const, referrerPolicy: 'no-referrer' as const }\n if (preview === undefined) return <img {...imageProps} {...contextMenuProps} />\n const localFileName = file?.path.split(/[\\\\/]/u).at(-1)\n const urlFileName = destination.split('/').at(-1)?.split(/[?#]/u)[0]\n const exportName = localFileName || urlFileName || 'image'\n const img = <DraggableImage\n fileDrag={preview.fileDrag}\n {...imageProps}\n resourceAddress={file === undefined ? undefined : preview.resourceAddress?.(file.path)}\n name={exportName}\n />\n return <>\n <button type=\"button\" className={css.imageButton} title={preview.labels.open}\n {...contextMenuProps}\n aria-label={alt ? `${preview.labels.open}: ${alt}` : preview.labels.open}\n onClick={() => { setOpen(true) }}>{img}</button>\n {open && <ImageLightbox src={src} alt={alt} labels={preview.labels} onClose={close} contextMenuProps={contextMenuProps} />}\n </>\n}\n\n/** The bracketed source text a reference reverts to when its definition is missing. */\nfunction referenceSuffix(node: Md.LinkReference | Md.ImageReference): string {\n if (node.referenceType === 'collapsed') return '][]'\n if (node.referenceType === 'full') return `][${node.label ?? node.identifier}]`\n return ']'\n}\n\nfunction renderLinkReference(\n node: Md.LinkReference,\n key: Key,\n context: MarkdownRenderContext,\n): ReactNode {\n const definition = context.targets.definitions.get(node.identifier.toUpperCase())\n if (definition === undefined) {\n // The grammar only emits references whose definitions exist somewhere in\n // the same parse, but incremental segments and hand-built trees may still\n // present unresolved ones: revert to the bracketed source text — which is\n // not an anchor, so mentions inside it stay live.\n return <Fragment key={key}>{'['}{renderChildren(node.children, context)}{referenceSuffix(node)}</Fragment>\n }\n const rendered = renderChildren(node.children, { ...context, inLink: true })\n return renderAnchor(definition.url, rendered, key, !anchorWrapsOnlyImages(node.children), context.streaming)\n}\n\nfunction renderImageReference(\n node: Md.ImageReference,\n key: Key,\n context: MarkdownRenderContext,\n): ReactNode {\n const definition = context.targets.definitions.get(node.identifier.toUpperCase())\n if (definition === undefined) return `![${node.alt ?? ''}${referenceSuffix(node)}`\n return renderImage(definition.url, node.alt ?? '', key, context)\n}\n\nfunction renderFootnoteReference(\n node: Md.FootnoteReference,\n key: Key,\n context: MarkdownRenderContext,\n): ReactNode {\n const id = node.identifier.toUpperCase()\n const seen = context.footnoteCounts.get(id)\n if (seen === undefined) context.footnoteOrder.push(id)\n context.footnoteCounts.set(id, (seen ?? 0) + 1)\n // The in-page anchor is not an absolute URL, so only the numbered\n // superscript renders (matching the replaced pipeline's unwrapped link).\n return <sup key={key}>{String(context.footnoteOrder.indexOf(id) + 1)}</sup>\n}\n\n/**\n * Render the trailing footnote section for every footnote referenced during\n * the pass, in first-reference order, with one plain-text back-reference\n * marker per rendered reference.\n * @param context - The pass state after all blocks rendered.\n * @returns The section, or null when no referenced footnote has a definition.\n */\nexport function renderFootnoteSection(context: MarkdownRenderContext): ReactNode | null {\n const items: ReactNode[] = []\n for (const id of context.footnoteOrder) {\n const definition = context.targets.footnotes.get(id)\n if (definition === undefined) continue\n const count = context.footnoteCounts.get(id) ?? 0\n const backrefs: ReactNode[] = []\n for (let reference = 1; reference <= count; reference++) {\n if (backrefs.length > 0) backrefs.push(' ')\n backrefs.push('↩')\n if (reference > 1) backrefs.push(<sup key={`re-${reference}`}>{String(reference)}</sup>)\n }\n const entries = renderBlockEntries(definition.children, context)\n const tail = entries[entries.length - 1]\n const body: ReactNode[] = entries.map((entry, index) => (\n 'paragraph' in entry\n ? (\n <p key={`p-${index}`}>\n {entry.paragraph}\n {entry === tail && <>{' '}{backrefs}</>}\n </p>\n )\n : entry.element\n ))\n // Without a trailing paragraph the back-references join the block list\n // itself (and pick up the wrap newlines), as in the replaced pipeline.\n if (tail === undefined || !('paragraph' in tail)) body.push(...backrefs)\n items.push(\n <li key={id} id={`user-content-fn-${normalizeUri(id.toLowerCase())}`}>\n {wrapBlockChildren(body, true)}\n </li>,\n )\n }\n if (items.length === 0) return null\n return (\n <section key=\"footnotes\" data-footnotes className=\"footnotes\">\n <h2 id=\"footnote-label\" className=\"sr-only\">{context.labels.footnotes}</h2>\n <ol>{items}</ol>\n </section>\n )\n}\n","/**\n * Untrusted assistant-Markdown renderer over the direct mdast pipeline:\n * `parse.ts` grammars, the incremental streaming parser, and `render.tsx`.\n * While a message streams, all but the trailing two blocks freeze as cached\n * React elements and only the source tail behind them re-parses per chunk,\n * so per-chunk work tracks the tail size instead of the whole reply. Frozen\n * blocks keep their source-offset keys when they cross the freeze boundary,\n * so React reconciles instead of remounting. Known deviation while\n * streaming: a reference-style link or footnote whose definition sits on the\n * other side of the freeze boundary renders literally until the settled\n * full parse self-heals it.\n */\n\nimport { memo, useMemo, useRef } from 'react'\nimport type { ReactNode } from 'react'\nimport clsx from 'clsx'\nimport { copyKatexAsTex } from './copy-tex.ts'\nimport { IncrementalMarkdownParser } from './incremental.ts'\nimport { parseGfm, parseGfmWithMath } from './parse.ts'\nimport {\n collectReferenceTargets, createReferenceTargets, renderBlocks, renderFootnoteSection,\n wrapBlockChildren,\n} from './render.tsx'\nimport type { MarkdownFileMentions, MarkdownLabels, MarkdownPathImages, MarkdownRenderContext, ReferenceTargets } from './render.tsx'\nimport 'katex/dist/katex.min.css'\nimport css from './MarkdownText.module.css'\n\nexport type { MarkdownCodeLabels, MarkdownFileMentions, MarkdownLabels, MarkdownPathImages } from './render.tsx'\n\n/** One settled full render: parse with math, resolve references, append the footnote section. */\nfunction renderSettled(\n text: string,\n labels: MarkdownLabels,\n fileMentions: MarkdownFileMentions | undefined,\n pathImages: MarkdownPathImages | undefined,\n omitHtml: boolean,\n): ReactNode[] {\n const root = parseGfmWithMath(text)\n const targets = createReferenceTargets()\n collectReferenceTargets(root.children, targets)\n const context: MarkdownRenderContext = {\n streaming: false,\n labels,\n fileMentions,\n pathImages,\n omitHtml,\n targets,\n footnoteOrder: [],\n footnoteCounts: new Map(),\n }\n const blocks = wrapBlockChildren(\n renderBlocks(root.children.map((node, index) => ({\n node,\n /* v8 ignore next -- parseFull uses parseGfm, which stamps every top-level node. */\n key: node.position?.start.offset ?? -(index + 1),\n })), context),\n false,\n )\n const section = renderFootnoteSection(context)\n return section === null ? blocks : [...blocks, '\\n', section]\n}\n\n/**\n * Streaming render state for one growing message: the incremental parser,\n * the frozen blocks' cached elements, and the reference/footnote state their\n * rendering consumed (footnote numbering assigned to frozen references is\n * final, so the tail continues from a copy of it each frame).\n */\nclass StreamingRenderer {\n private readonly parser = new IncrementalMarkdownParser(parseGfm)\n private generation = -1\n private frozenCount = 0\n private frozenElements: ReactNode[] = []\n private frozenTargets: ReferenceTargets = createReferenceTargets()\n private frozenFootnoteOrder: string[] = []\n private frozenFootnoteCounts = new Map<string, number>()\n private lastText: string | null = null\n private lastRendered: ReactNode[] = []\n\n /**\n * @param labels - Localized Markdown chrome baked into cached elements; the owner replaces the renderer when it changes.\n * @param omitHtml - Whether raw HTML renders nothing; the owner replaces the renderer when it changes.\n */\n constructor(private readonly labels: MarkdownLabels, readonly omitHtml: boolean) {}\n\n /**\n * Render the current accumulated text. Idempotent per text value, so React\n * may re-execute the calling render freely.\n * @param text - The full accumulated markdown source.\n * @returns Frozen elements, re-rendered tail, and the footnote section.\n */\n render(text: string): ReactNode[] {\n if (text === this.lastText) return this.lastRendered\n const { frozen, tail, generation } = this.parser.update(text)\n if (generation !== this.generation) {\n this.generation = generation\n this.frozenCount = 0\n this.frozenElements = []\n this.frozenTargets = createReferenceTargets()\n this.frozenFootnoteOrder = []\n this.frozenFootnoteCounts = new Map()\n }\n const newlyFrozen = frozen.slice(this.frozenCount)\n collectReferenceTargets(newlyFrozen.map(block => block.node), this.frozenTargets)\n // Targets visible this frame: everything frozen so far plus the current\n // tail parse — a newly frozen block's references resolved against the\n // same parse tree its definitions came from.\n const frameTargets: ReferenceTargets = {\n definitions: new Map(this.frozenTargets.definitions),\n footnotes: new Map(this.frozenTargets.footnotes),\n }\n collectReferenceTargets(tail.map(block => block.node), frameTargets)\n if (newlyFrozen.length > 0) {\n const frozenContext: MarkdownRenderContext = {\n streaming: true,\n labels: this.labels,\n fileMentions: undefined,\n pathImages: undefined,\n omitHtml: this.omitHtml,\n targets: frameTargets,\n footnoteOrder: this.frozenFootnoteOrder,\n footnoteCounts: this.frozenFootnoteCounts,\n }\n // Separator newlines are cached alongside the elements so the\n // assembled children match the settled pipeline's block wrapping.\n const batch = [...this.frozenElements]\n for (const element of renderBlocks(newlyFrozen, frozenContext)) {\n if (batch.length > 0) batch.push('\\n')\n batch.push(element)\n }\n this.frozenElements = batch\n this.frozenCount = frozen.length\n }\n const tailContext: MarkdownRenderContext = {\n streaming: true,\n labels: this.labels,\n fileMentions: undefined,\n pathImages: undefined,\n omitHtml: this.omitHtml,\n targets: frameTargets,\n footnoteOrder: [...this.frozenFootnoteOrder],\n footnoteCounts: new Map(this.frozenFootnoteCounts),\n }\n const children = [...this.frozenElements]\n for (const element of renderBlocks(tail, tailContext)) {\n if (children.length > 0) children.push('\\n')\n children.push(element)\n }\n const section = renderFootnoteSection(tailContext)\n if (section !== null) children.push('\\n', section)\n this.lastText = text\n this.lastRendered = children\n return this.lastRendered\n }\n}\n\n/**\n * Render untrusted assistant-authored Markdown as semantic React elements.\n * @param props - Markdown source text preserved by the session projection;\n * `streaming` parses incrementally across chunks and highlights fences as\n * they grow (each fence re-tokenizes only appended text; TeX stays literal\n * until the finalize swap so incomplete formulae never flash errors);\n * `labels` forwards localized fence and footnote chrome — pass a\n * reference-stable object (memoized per locale revision), because a new\n * identity discards the streaming render cache mid-message. `fileMentions`\n * links inline-code tokens its resolver recognizes as real files, and\n * `pathImages` rewrites image destinations that are local file paths into\n * displayable URLs its resolver vouches for. Those two vocabularies are the\n * single streaming gate — they apply to settled renders only, because a\n * streaming message's vocabulary is not final and frozen cached elements\n * must not bake in handlers that could go stale. A surrounding\n * `MarkdownDelegateProvider` can delegate ordinary HTTP(S) activation while\n * modified clicks retain native behavior. `variant=\"compact\"` uses secondary\n * text sizing, uniform bold headings, and tight block spacing; the default\n * `body` variant uses the full document typography. `omitHtml` renders raw\n * HTML as nothing instead of literal text, for documents written for HTML\n * renderers, such as package READMEs. `textInteractionSource` marks the\n * existing root as a source for text selection interactions.\n * The provider's `openFile` enables local Markdown links in settled messages,\n * including `#L24` / `#L24-L30` fragments and `:24` / `:24-30` / `:24:5` suffixes\n * (ranges open at their first line, columns are ignored, and invalid locations\n * open only the file; see the README for URL/path classification).\n * Copying a selection inside the document writes selected formulas as\n * `$…$` / `$$…$$` TeX source.\n * @returns A GFM document with TeX math rendered through KaTeX; raw HTML never\n * renders as markup, and unsafe protocols are disabled. Local links without an opener remain text;\n * absolute HTTP(S) images render directly.\n */\nexport const MarkdownText = memo(function MarkdownText({\n text, streaming = false, labels, fileMentions, pathImages, variant = 'body', omitHtml = false, textInteractionSource = false,\n}: {\n text: string\n streaming?: boolean\n labels: MarkdownLabels\n fileMentions?: MarkdownFileMentions | undefined\n pathImages?: MarkdownPathImages | undefined\n variant?: 'body' | 'compact'\n omitHtml?: boolean\n textInteractionSource?: boolean\n}) {\n const streamRef = useRef<StreamingRenderer | null>(null)\n const streamLabelsRef = useRef<MarkdownLabels>(labels)\n const children = useMemo(() => {\n if (!streaming) {\n streamRef.current = null\n return renderSettled(text, labels, fileMentions, pathImages, omitHtml)\n }\n if (streamRef.current === null || streamLabelsRef.current !== labels || streamRef.current.omitHtml !== omitHtml) {\n streamRef.current = new StreamingRenderer(labels, omitHtml)\n streamLabelsRef.current = labels\n }\n return streamRef.current.render(text)\n }, [text, streaming, labels, fileMentions, pathImages, omitHtml])\n return <div className={clsx(css.markdown, variant === 'compact' && css.compact)}\n data-text-interaction-source={textInteractionSource ? '' : undefined}\n data-markdown-variant={variant === 'compact' ? variant : undefined}\n onCopy={(event) => { copyKatexAsTex(event.nativeEvent, event.currentTarget) }}>{children}</div>\n})\n","import clsx from 'clsx'\nimport { MarkdownText, type MarkdownLabels } from './markdown/MarkdownText.tsx'\nimport { LinkIconMedium } from './LinkIcon.tsx'\nimport css from './WebBlock.module.css'\n\n/**\n * One citeable source drawn in a search card: the projection of the contract's\n * `WebSource`, with the optional fields kept optional so a provider that\n * returned only a URL still renders (its hostname becomes the label).\n */\nexport interface WebSourceView {\n /** The source URL; becomes a safe external link when it is http(s). */\n url: string\n /** The source title; when absent the URL's hostname labels the link. */\n title?: string | undefined\n /** A short excerpt or summary shown under the link. */\n snippet?: string | undefined\n /** Publication/crawl timestamp, a provider-supplied string shown under the link. */\n publishedAt?: string | undefined\n}\n\n/** A `web_search` card: an optional answer over a capped citation list. */\nexport interface WebSearchBlockProps {\n kind: 'search'\n /** Localized chrome supplied by the owning render site. */\n labels: WebBlockLabels\n /** The provider-generated answer, rendered as markdown above the sources. */\n answer?: string | undefined\n /** The cited sources, in provider order. */\n sources: WebSourceView[]\n /** True when the tool cut the source list to its result cap. */\n truncated: boolean\n /** Extra class merged onto the wrapper (callers position; this component draws). */\n className?: string | undefined\n}\n\n/** A `web_fetch` card: the retrieval summary for one fetched URL. */\nexport interface WebFetchBlockProps {\n kind: 'fetch'\n /** Localized chrome supplied by the owning render site. */\n labels: WebBlockLabels\n /** The final URL after allowed redirects; becomes a safe external link when http(s). */\n url: string\n /** HTTP status code of the fetched response. */\n statusCode: number\n /** True when the provider or the output cap cut the fetched content. */\n truncated: boolean\n /** Extra class merged onto the wrapper (callers position; this component draws). */\n className?: string | undefined\n}\n\n/** A completed web retrieval card, discriminated by `kind`. */\nexport type WebBlockProps = WebSearchBlockProps | WebFetchBlockProps\n\n/** Localized chrome for {@link WebBlock}. */\nexport interface WebBlockLabels {\n noResults: string\n sourcesTruncated: string\n http: string\n contentTruncated: string\n markdown: MarkdownLabels\n}\n\n/**\n * The URL to link to, or undefined when the URL must render as plain text. Only\n * http(s) becomes a navigable external anchor, so a `javascript:`/`data:`/`file:`\n * URL or an unparseable string never reaches the DOM as an href. This is the\n * http(s) subset of the allowlist MarkdownText applies to untrusted links —\n * MarkdownText also permits `mailto:`, deliberately excluded here since a\n * retrieval URL is never a mail address.\n * @param url - the source or fetch URL, from tool result content.\n * @returns the href to use, or undefined for plain text.\n */\nfunction safeHref(url: string): string | undefined {\n try {\n const { protocol } = new URL(url)\n return protocol === 'http:' || protocol === 'https:' ? url : undefined\n } catch {\n return undefined\n }\n}\n\n/**\n * The link's visible label: the title when the provider gave one, otherwise the\n * URL's hostname, falling back to the raw URL when it does not parse OR parses\n * to an empty hostname (a `file:`/`data:`/`javascript:` URL), so a label is\n * never blank.\n * @param url - the source URL.\n * @param title - the provider title, if any.\n * @returns the label text.\n */\nfunction linkLabel(url: string, title: string | undefined): string {\n if (title !== undefined && title !== '') return title\n try {\n const { hostname } = new URL(url)\n return hostname === '' ? url : hostname\n } catch {\n return url\n }\n}\n\n/**\n * A single URL rendered as a safe external anchor, or as plain text when the\n * URL is not an http(s) link.\n * @param props.url - the URL to render.\n * @param props.label - the visible label.\n * @param props.className - class for the anchor or the plain span.\n * @returns the anchor or span element.\n */\nfunction SafeLink({ url, label, className }: { url: string; label: string; className?: string | undefined }) {\n const href = safeHref(url)\n if (href === undefined) return <span className={className}>{label}</span>\n return (\n <a className={className} href={href} target=\"_blank\" rel=\"noopener noreferrer\">\n <LinkIconMedium kind=\"url\" href={href} className={css.linkIcon} />\n {label}\n </a>\n )\n}\n\n/**\n * One source row in a search card: the safe link plus its snippet and date. The\n * `<li value>` pins the source's 1-based citation index explicitly rather than\n * relying on the `<ol>`'s implicit numbering, so a row reads by its real index\n * even inside the scroll container.\n * @param props.source - the source to render.\n * @param props.ordinal - the source's 1-based position in the full list.\n * @returns the source list item.\n */\nfunction SourceItem({ source, ordinal }: { source: WebSourceView; ordinal: number }) {\n return (\n <li className={css.source} value={ordinal}>\n <SafeLink url={source.url} label={linkLabel(source.url, source.title)} className={css.sourceLink} />\n {source.snippet !== undefined && source.snippet !== '' && (\n <div className={css.snippet}>{source.snippet}</div>\n )}\n {source.publishedAt !== undefined && source.publishedAt !== '' && (\n <div className={css.published}>{source.publishedAt}</div>\n )}\n </li>\n )\n}\n\n/**\n * The search card body: the answer over the full source list, which scrolls in\n * place once it exceeds the `.sources` container height.\n * @param props - see {@link WebSearchBlockProps}.\n * @returns the search card element.\n */\nfunction WebSearchBlock({ answer, sources, truncated, labels, className }: WebSearchBlockProps) {\n // A provider may legitimately return no answer and no sources; the chat WebRow\n // does not show the raw result content, so without this the user would see an\n // empty card. Mirror the backend's `No results found.` render text.\n const empty = (answer === undefined || answer === '') && sources.length === 0\n return (\n <div className={clsx(css.block, className)} data-web=\"search\">\n {answer !== undefined && answer !== '' && (\n <div className={css.answer}><MarkdownText text={answer} labels={labels.markdown} /></div>\n )}\n {empty ? (\n <div className={css.empty}>{labels.noResults}</div>\n ) : (\n <ol className={css.sources}>\n {sources.map((source, index) => <SourceItem key={index} source={source} ordinal={index + 1} />)}\n </ol>\n )}\n {truncated && <div className={css.truncated}>{labels.sourcesTruncated}</div>}\n </div>\n )\n}\n\n/**\n * The fetch card body: the linked URL and its HTTP status.\n * @param props - see {@link WebFetchBlockProps}.\n * @returns the fetch card element.\n */\nfunction WebFetchBlock({ url, statusCode, truncated, labels, className }: WebFetchBlockProps) {\n return (\n <div className={clsx(css.block, css.fetch, className)} data-web=\"fetch\">\n <SafeLink url={url} label={url} className={css.fetchUrl} />\n <div className={css.fetchMeta}>\n <span className={css.status}>{labels.http} {statusCode}</span>\n {truncated && <span className={css.truncated}>{labels.contentTruncated}</span>}\n </div>\n </div>\n )\n}\n\n/**\n * Render a completed web retrieval as a structured card.\n * @param props - see {@link WebBlockProps}; `kind` selects the search or fetch body.\n * @returns the web card element.\n */\nexport function WebBlock(props: WebBlockProps) {\n return props.kind === 'search' ? <WebSearchBlock {...props} /> : <WebFetchBlock {...props} />\n}\n","// JsonBlock: collapsible JSON block (conversation side; independent from the RPC panel's PayloadJson to avoid cross-panel coupling).\n\nimport { useMemo, useState } from 'react'\nimport css from './JsonBlock.module.css'\n\nconst MAX_CHARS = 20_000\n\nexport function JsonBlock({ label, payload, defaultOpen = false, truncatedLabel }: {\n label: string\n payload: unknown\n defaultOpen?: boolean\n /** Footer appended when the body exceeds the char cap, given the full length (this package is cordis-free, so copy arrives via props). */\n truncatedLabel: (total: number) => string\n}) {\n const [open, setOpen] = useState(defaultOpen)\n const body = useMemo(() => {\n if (!open) return ''\n let s: string\n try {\n // lib typing hides stringify's undefined arm (undefined/function/symbol payloads).\n // oxlint-disable-next-line typescript/no-unnecessary-condition\n s = JSON.stringify(payload, null, 2) ?? String(payload)\n } catch {\n s = String(payload)\n }\n return s.length > MAX_CHARS ? `${s.slice(0, MAX_CHARS)}\\n${truncatedLabel(s.length)}` : s\n }, [open, payload, truncatedLabel])\n return (\n <div className={css.root}>\n <button type=\"button\" className={css.toggle} onClick={() => { setOpen(v => !v) }}>\n {open ? '▾' : '▸'} {label}\n </button>\n {open && <pre className={css.body}>{body}</pre>}\n </div>\n )\n}\n","import { useMemo, type ReactNode } from 'react'\nimport { Button } from './Button.tsx'\nimport { MarkdownText, type MarkdownLabels, type MarkdownPathImages } from './markdown/MarkdownText.tsx'\nimport { StateDot } from './StateDot.tsx'\nimport css from './DetailDocument.module.css'\n\n/** One read of a long Markdown description, such as a plugin's detail document. */\nexport type DetailDocumentState =\n | { readonly status: 'loading' }\n | { readonly status: 'found'; readonly markdown: string }\n | { readonly status: 'none' }\n | { readonly status: 'error'; readonly message: string }\n\n/** A read as owners track it: in flight, settled with a document or none, or failed with a localized message. */\nexport type DetailDocumentRead =\n | undefined\n | { readonly status: 'loading' }\n | { readonly status: 'ready'; readonly markdown: string | undefined }\n | { readonly status: 'error'; readonly message: string }\n\n/**\n * The state {@link DetailDocument} shows for an owner's read: loading until it settles, then the document, none, or the\n * failure.\n * @param read - the owner's read; undefined before it starts.\n * @returns the state to show.\n */\nexport function detailDocumentState(read: DetailDocumentRead): DetailDocumentState {\n if (read?.status === 'ready') return read.markdown === undefined ? { status: 'none' } : { status: 'found', markdown: read.markdown }\n return read?.status === 'error' ? read : { status: 'loading' }\n}\n\n/** Translated strings of a detail document's chrome, as an owner's dictionary supplies them. */\nexport interface DetailDocumentCopy {\n readonly title: string\n readonly loading: string\n readonly retry: string\n readonly copy: string\n readonly copied: string\n readonly codeBlock: string\n readonly wrap: string\n readonly unwrap: string\n readonly footnotes: string\n}\n\n/**\n * Assemble reference-stable labels for {@link DetailDocument} from translated strings.\n * @param copy - the translated strings.\n * @returns labels that keep their identity while the strings stay equal.\n */\nexport function useDetailDocumentLabels(copy: DetailDocumentCopy): DetailDocumentLabels {\n const { title, loading, retry, footnotes } = copy\n const { copy: copyLabel, copied: copiedLabel, codeBlock: codeLabel, wrap: wrapLabel, unwrap: unwrapLabel } = copy\n const markdown = useMemo(() => ({ code: { copyLabel, copiedLabel, toolbarLabels: { codeLabel, wrapLabel, unwrapLabel } }, footnotes }),\n [copyLabel, copiedLabel, codeLabel, wrapLabel, unwrapLabel, footnotes])\n return useMemo(() => ({ title, loading, retry, markdown }), [title, loading, retry, markdown])\n}\n\n/** Localized chrome of a detail document. */\nexport interface DetailDocumentLabels {\n /** Accessible name of the scrollable document region; the section shows no heading of its own. */\n readonly title: string\n /** Accessible name of the loading placeholder. */\n readonly loading: string\n /** Retry button text. */\n readonly retry: string\n readonly markdown: MarkdownLabels\n}\n\n/**\n * A section showing a long Markdown description, without a heading of its own: three skeleton lines while it loads, the\n * document once found, or the owner's failure message with a retry. Nothing renders for `none`. A document taller than\n * the section's height limit scrolls inside it, and the scroll region, named by `labels.title`, takes keyboard focus.\n * Raw HTML is omitted, relative links stay text, and only images the owner's `images` resolver accepts, or absolute\n * HTTP(S) images, load.\n * @param props.state - the read to show.\n * @param props.labels - localized region name, placeholder name, retry text, and Markdown chrome; keep `markdown` reference-stable.\n * @param props.images - resolves the document's relative image destinations to displayable URLs.\n * @param props.onRetry - reads the document again after a failure.\n * @returns the section, or null.\n */\nexport function DetailDocument({ state, labels, images, onRetry }: {\n readonly state: DetailDocumentState\n readonly labels: DetailDocumentLabels\n readonly images?: MarkdownPathImages | undefined\n readonly onRetry: () => void\n}): ReactNode {\n if (state.status === 'none') return null\n let body: ReactNode\n switch (state.status) {\n case 'found':\n body = (\n <div className={css.document} role=\"region\" aria-label={labels.title} tabIndex={0}>\n <MarkdownText text={state.markdown} labels={labels.markdown} pathImages={images} omitHtml />\n </div>\n )\n break\n case 'error':\n body = (\n <div className={css.failure}>\n <p className={css.error} role=\"alert\"><StateDot state=\"error\" />{state.message}</p>\n <Button variant=\"outline\" size=\"sm\" onClick={onRetry}>{labels.retry}</Button>\n </div>\n )\n break\n case 'loading':\n body = (\n <div className={css.skeleton} role=\"status\" aria-label={labels.loading} aria-busy=\"true\">\n <span className={`${css.bar} ${css.long}`} />\n <span className={`${css.bar} ${css.long}`} />\n <span className={`${css.bar} ${css.short}`} />\n </div>\n )\n break\n }\n return (\n <section className={css.section} data-detail-document>\n {body}\n </section>\n )\n}\n","/**\n * Markdown-to-plain-text projection for compact summaries and labels.\n * Parsing shares the renderer's streaming GFM grammar ({@link parseGfm}), so\n * the projection strips exactly the markup the renderer would draw; raw HTML\n * stays literal, links keep their labels, images keep alt text, and code\n * keeps its source text.\n */\n\nimport { parseGfm } from './parse.ts'\n\n/** Amount of parsed Markdown content returned by the extractor. */\nexport type MarkdownPlainTextMode = 'all' | 'first-line' | 'first-paragraph'\n\n/** Options for {@link extractMarkdownPlainText}. */\nexport interface MarkdownPlainTextOptions {\n /** Projection boundary; defaults to the complete document. */\n mode?: MarkdownPlainTextMode\n}\n\ninterface MarkdownNode {\n type: string\n value?: string\n alt?: string\n children?: MarkdownNode[]\n}\n\nfunction inlineText(node: MarkdownNode): string {\n switch (node.type) {\n case 'text':\n case 'inlineCode':\n case 'code':\n return node.value ?? ''\n case 'image':\n case 'imageReference':\n return node.alt ?? ''\n case 'break':\n return '\\n'\n case 'html':\n return node.value ?? ''\n default:\n return node.children?.map(inlineText).join('') ?? ''\n }\n}\n\nfunction compactInline(text: string): string {\n return text.replace(/\\s+/g, ' ').trim()\n}\n\nfunction blockText(node: MarkdownNode): string {\n switch (node.type) {\n case 'root':\n case 'blockquote':\n return node.children?.map(blockText).filter(Boolean).join('\\n\\n') ?? ''\n case 'paragraph':\n case 'heading':\n return compactInline(inlineText(node))\n case 'code':\n return node.value?.trim() ?? ''\n case 'list':\n return node.children?.map(blockText).filter(Boolean).join('\\n') ?? ''\n case 'listItem':\n return node.children?.map(blockText).filter(Boolean).join(' ') ?? ''\n case 'table':\n return node.children?.map(blockText).filter(Boolean).join('\\n') ?? ''\n case 'tableRow':\n return node.children?.map(blockText).join('\\t') ?? ''\n case 'tableCell':\n return compactInline(inlineText(node))\n case 'html':\n return node.value ?? ''\n case 'thematicBreak':\n case 'definition':\n return ''\n default:\n return compactInline(inlineText(node))\n }\n}\n\nfunction findFirstParagraph(node: MarkdownNode): string | undefined {\n if (node.type === 'paragraph') {\n const text = compactInline(inlineText(node))\n if (text !== '') return text\n }\n for (const child of node.children ?? []) {\n const text = findFirstParagraph(child)\n if (text !== undefined) return text\n }\n return undefined\n}\n\nfunction fullText(root: MarkdownNode): string {\n return blockText(root)\n .split('\\n')\n .map(line => line.trim())\n .join('\\n')\n .replace(/\\n{3,}/g, '\\n\\n')\n .trim()\n}\n\n/**\n * Parse GFM Markdown, remove its presentation markup, and preserve raw HTML literally.\n * @param markdown - Markdown source.\n * @param options - Optional extraction boundary.\n * @returns Plain text for the whole document, first visible line, or first semantic paragraph.\n */\nexport function extractMarkdownPlainText(\n markdown: string,\n options: MarkdownPlainTextOptions = {},\n): string {\n const { mode = 'all' } = options\n const root = parseGfm(markdown) as MarkdownNode\n const all = fullText(root)\n switch (mode) {\n case 'all':\n return all\n case 'first-line':\n return all.split('\\n').find(line => line !== '') ?? ''\n case 'first-paragraph':\n return findFirstParagraph(root) ?? all.split('\\n').find(line => line !== '') ?? ''\n }\n}\n","/**\n * Fixed-palette plugin artwork for the plugin management surfaces. Unlike the\n * ic_ds_* set these glyphs carry their own brand colors and gradients instead\n * of riding currentColor; all draw on a 36×36 viewBox and take {size, className}.\n */\nimport { useId } from 'react'\nimport type { IconProps } from './icons/props.ts'\n\n/**\n * A per-instance SVG def id prefix: the artwork repeats across cards and rows,\n * and duplicate document ids would make every `url(#…)` resolve to the first instance.\n */\nconst useArtworkId = (): string => `dsh_plugin_art_${useId().replaceAll(':', '')}`\n\n/** Light-blue terminal artwork shared by plugin cards and sidebar guide entries. */\nexport const PluginArtworkTerminal = ({ size = 36, className }: IconProps) => (\n <svg width={size} height={size} className={className} viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M10 11L16.606 17.606C16.6841 17.6841 16.6841 17.8107 16.606 17.8888L10 24.4948\" stroke=\"#679EFE\" strokeWidth=\"3.5\" />\n <path d=\"M20.1211 24.4946H26.8685\" stroke=\"#679EFE\" strokeWidth=\"3.5\" />\n </svg>\n)\n\n/** Agent-loop plugin artwork (four leaves circling a center). */\nexport const PluginArtworkLoop = ({ size = 36, className }: IconProps) => {\n const uid = useArtworkId()\n return (\n <svg width={size} height={size} className={className} viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18.0486 28.4901C12.0858 28.4901 7.25195 23.6562 7.25195 17.6934C13.2148 17.6934 18.0486 22.5272 18.0486 28.4901Z\" fill=\"#A797FC\" />\n <path d=\"M18.0486 6.89667C12.0858 6.89667 7.25195 11.7305 7.25195 17.6934C13.2148 17.6934 18.0486 12.8595 18.0486 6.89667Z\" fill={`url(#${uid}a)`} />\n <path d=\"M18.0485 28.4901C24.0114 28.4901 28.8452 23.6562 28.8452 17.6934C22.8824 17.6934 18.0485 22.5272 18.0485 28.4901Z\" fill=\"#4561EE\" />\n <path d=\"M18.0485 6.89667C24.0114 6.89667 28.8452 11.7305 28.8452 17.6934C22.8824 17.6934 18.0485 12.8595 18.0485 6.89667Z\" fill=\"#658EFF\" />\n <defs>\n <linearGradient id={`${uid}a`} x1=\"16.7911\" y1=\"16.1655\" x2=\"8.98192\" y2=\"8.74289\" gradientUnits=\"userSpaceOnUse\">\n <stop stopColor=\"#A23AE7\" />\n <stop offset=\"1\" stopColor=\"#E2E2E2\" />\n </linearGradient>\n </defs>\n </svg>\n )\n}\n\n/** Subagent plugin artwork (two stacked rounded squares); also marks every row inside a bundle. */\nexport const PluginArtworkSubagent = ({ size = 36, className }: IconProps) => {\n const uid = useArtworkId()\n return (\n <svg width={size} height={size} className={className} viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"14.9893\" y=\"15.1877\" width=\"12.2365\" height=\"12.2365\" rx=\"2\" fill={`url(#${uid}a)`} fillOpacity=\"0.8\" />\n <rect x=\"8.87109\" y=\"9.0697\" width=\"12.2365\" height=\"12.2365\" rx=\"2\" fill={`url(#${uid}b)`} fillOpacity=\"0.8\" />\n <defs>\n <linearGradient id={`${uid}a`} x1=\"21.1075\" y1=\"15.1877\" x2=\"21.1075\" y2=\"27.4243\" gradientUnits=\"userSpaceOnUse\">\n <stop stopColor=\"#45E7A4\" />\n <stop offset=\"1\" stopColor=\"#05909D\" />\n </linearGradient>\n <linearGradient id={`${uid}b`} x1=\"14.9894\" y1=\"9.0697\" x2=\"14.9894\" y2=\"21.3063\" gradientUnits=\"userSpaceOnUse\">\n <stop stopColor=\"#69B9FF\" />\n <stop offset=\"1\" stopColor=\"#324DE2\" />\n </linearGradient>\n </defs>\n </svg>\n )\n}\n\n/**\n * Web-search plugin artwork (conic-gradient ring and handle). SVG has no\n * native conic gradient, so the ring clips an HTML div painted with CSS\n * `conic-gradient` — the same emulation Figma exports; it renders inline in\n * the browser UI but would stay empty in an `<img>` or mask context.\n */\nexport const PluginArtworkSearch = ({ size = 36, className }: IconProps) => {\n const uid = useArtworkId()\n return (\n <svg width={size} height={size} className={className} viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M26.5362 26.9865L22.3813 22.8317\" stroke=\"#658EFF\" strokeWidth=\"3\" />\n <g clipPath={`url(#${uid}ring)`}>\n <g transform=\"matrix(0.0119394 -0.00173904 0.00173904 0.0119394 15.7661 16.2159)\">\n <foreignObject x=\"-958.94\" y=\"-958.94\" width=\"1917.88\" height=\"1917.88\">\n <div\n style={{\n background: 'conic-gradient(from 90deg, rgb(65, 225, 172) 0deg, rgb(101, 142, 255) 62.0619deg, rgb(65, 225, 172) 360deg)',\n height: '100%',\n width: '100%',\n }}\n />\n </foreignObject>\n </g>\n </g>\n <defs>\n <clipPath id={`${uid}ring`}>\n <path d=\"M21.9717 16.2159H19.9717C19.9717 18.5386 18.0888 20.4215 15.7661 20.4215V22.4215V24.4215C20.2979 24.4215 23.9717 20.7478 23.9717 16.2159H21.9717ZM15.7661 22.4215V20.4215C13.4434 20.4215 11.5605 18.5386 11.5605 16.2159H9.56055H7.56055C7.56055 20.7478 11.2343 24.4215 15.7661 24.4215V22.4215ZM9.56055 16.2159H11.5605C11.5605 13.8933 13.4434 12.0104 15.7661 12.0104V10.0104V8.01038C11.2343 8.01038 7.56055 11.6841 7.56055 16.2159H9.56055ZM15.7661 10.0104V12.0104C18.0888 12.0104 19.9717 13.8933 19.9717 16.2159H21.9717H23.9717C23.9717 11.6841 20.2979 8.01038 15.7661 8.01038V10.0104Z\" />\n </clipPath>\n </defs>\n </svg>\n )\n}\n\n/** Default plugin artwork for plugins without one of their own (connector blocks and a node). */\nexport const PluginArtworkDefault = ({ size = 36, className }: IconProps) => {\n const uid = useArtworkId()\n return (\n <svg width={size} height={size} className={className} viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M24.6294 8.63696C26.2862 8.63705 27.6294 9.98016 27.6294 11.637V12.7825C27.6292 14.4391 26.2861 15.7824 24.6294 15.7825H23.4839C22.6519 15.7825 21.5454 16.3459 21.5454 17.1778V18.1573C21.5454 18.7757 22.216 19.1966 22.8345 19.1965H24.6294C26.2861 19.1965 27.6292 20.5398 27.6294 22.1965V23.9924C27.6292 25.6491 26.2861 26.9924 24.6294 26.9924H22.8345C21.1778 26.9924 19.8347 25.649 19.8345 23.9924V22.1965C19.8345 21.7148 19.4957 21.2327 19.014 21.2327H16.4792C15.7975 21.2327 15.3374 22.0061 15.3374 22.6877V23.8333C15.3373 25.49 13.9942 26.8333 12.3374 26.8333H11.1919C9.53509 26.8333 8.19198 25.49 8.19189 23.8333V22.6877C8.19189 21.0309 9.53504 19.6877 11.1919 19.6877H12.3374C13.1964 19.6877 14.3999 19.0959 14.3999 18.2369V16.0185C14.3999 14.9518 15.2646 14.0872 16.3312 14.0872H19.435C20.0596 14.0872 20.484 13.4071 20.4839 12.7825V11.637C20.4839 9.98011 21.827 8.63696 23.4839 8.63696H24.6294ZM13.4116 11.2468C13.4116 12.6882 12.2431 13.8567 10.8018 13.8567C9.36037 13.8567 8.19189 12.6882 8.19189 11.2468C8.19189 9.80544 9.36037 8.63696 10.8018 8.63696C12.2431 8.63696 13.4116 9.80544 13.4116 11.2468Z\" fill={`url(#${uid}a)`} />\n <defs>\n <linearGradient id={`${uid}a`} x1=\"15.1481\" y1=\"9.94188\" x2=\"15.1481\" y2=\"13.6375\" gradientUnits=\"userSpaceOnUse\">\n <stop stopColor=\"#54ECE7\" />\n <stop offset=\"1\" stopColor=\"#658EFF\" />\n </linearGradient>\n </defs>\n </svg>\n )\n}\n","/** Fixed-palette artwork for sidebar guide entries. */\nimport type { IconProps } from './icons/props.ts'\n\n/**\n * Render fixed-palette artwork for a sidebar guide entry.\n * @param props - canvas size and layout class supplied by the guide.\n * @returns an ornamental SVG hidden from assistive technology.\n */\nexport function GuideArtworkBrowser({ size = 36, className }: IconProps) {\n return (\n <svg width={size} height={size} className={className} aria-hidden=\"true\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M17.9995 28.1465C23.6034 28.1465 28.1461 23.6038 28.1461 18C28.1461 12.3963 23.6034 7.85352 17.9995 7.85352C12.3958 7.85352 7.85303 12.3963 7.85303 18C7.85303 23.6038 12.3958 28.1465 17.9995 28.1465Z\" stroke=\"#539CFA\" strokeWidth=\"2\" />\n <path d=\"M8.57764 18H27.4211\" stroke=\"#539CFA\" strokeWidth=\"2\" strokeLinecap=\"square\" />\n <path d=\"M17.999 28.1467C20.0576 28.1467 21.6228 23.6039 21.6228 18C21.6228 12.3963 20.0576 7.85352 17.999 7.85352\" stroke=\"#539CFA\" strokeWidth=\"2\" />\n <path d=\"M17.9992 28.1467C15.9407 28.1467 14.3755 23.6039 14.3755 18C14.3755 12.3963 15.9407 7.85352 17.9992 7.85352\" stroke=\"#539CFA\" strokeWidth=\"2\" />\n </svg>\n )\n}\n\n/**\n * Render fixed-palette artwork for a sidebar guide entry.\n * @param props - canvas size and layout class supplied by the guide.\n * @returns an ornamental SVG hidden from assistive technology.\n */\nexport function GuideArtworkFiles({ size = 36, className }: IconProps) {\n return (\n <svg width={size} height={size} className={className} aria-hidden=\"true\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M10.7603 27.922H24.6817C26.3441 27.922 27.1753 27.922 27.8102 27.5984C28.3687 27.3139 28.8228 26.8598 29.1074 26.3012C29.4309 25.6663 29.4309 24.8351 29.4309 23.1727V15.4936\" stroke=\"#FFCD78\" strokeWidth=\"1.97886\" />\n <path d=\"M13.1597 8.07812C13.4182 8.07818 13.6727 8.14336 13.8989 8.26855L16.7554 9.84961C16.9817 9.97485 17.2369 10.041 17.4956 10.041H26.106C26.9492 10.0412 27.6323 10.7251 27.6323 11.5684V24.5371C27.6323 25.3805 26.9483 26.0645 26.105 26.0645H8.09619C7.25281 26.0645 6.56884 25.3805 6.56885 24.5371V9.60449C6.56909 8.76133 7.25297 8.07812 8.09619 8.07812H13.1597ZM9.81592 14.5508V16.5293H24.3999V14.5508H9.81592Z\" fill=\"#FFBC4D\" />\n </svg>\n )\n}\n","/** Shared compact presentation for draft and sent text quotes. */\n\nimport { useLayoutEffect, useRef, useState } from 'react'\nimport type { JSX, MouseEvent as ReactMouseEvent } from 'react'\nimport { IconCloseOutlineRegular } from './icons/index.tsx'\nimport { HoverCard } from './HoverCard.tsx'\nimport css from './QuotePreview.module.css'\n\nfunction QuoteMarkIcon({ className }: { readonly className?: string | undefined }) {\n return (\n <svg width={16} height={16} className={className} viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden>\n <g transform=\"translate(6.8 2.4)\">\n <path d=\"M2.8125 0.583008L3.2002 1.16602C2.43912 1.6713 1.88491 2.41238 1.60547 3.25684H2.98926V6.70605H0V4.52148C1.96593e-05 2.70313 0.9109 1.00575 2.42578 0L2.8125 0.583008Z\" fill=\"currentColor\" />\n <path d=\"M7.50781 0.583008L7.89551 1.16602C7.13443 1.6713 6.58022 2.41238 6.30078 3.25684H7.68457V6.70605H4.69531V4.52148C4.69533 2.70313 5.60621 1.00575 7.12109 0L7.50781 0.583008Z\" fill=\"currentColor\" />\n </g>\n </svg>\n )\n}\n\n/** Optional whole-quote removal control supplied by an editable owner. */\nexport interface QuotePreviewRemoval {\n /** Localized accessible name for the removal button. */\n readonly label: string\n /** Remove the complete owning quote node. */\n readonly onRemove: () => void\n}\n\n/** Owner-supplied readable form of a quote whose exact text is long structured content. */\nexport interface QuoteSummary {\n /** Short inline label shown before `body` in place of the exact text; assistive technology reads `title` and `detail` instead. */\n readonly label: string\n /** First popover line, such as a file path; also the label's accessible text. */\n readonly title: string\n /** Secondary popover line, such as a line range. */\n readonly detail?: string | undefined\n /** Main text, such as a user's comment, shown inline after `label` and in full in the popover. */\n readonly body: string\n}\n\n/** Presentation inputs for one compact quote excerpt. */\nexport interface QuotePreviewProps {\n /** Exact selected text rendered inline and exposed in a popover while clipped, unless `summary` replaces it. */\n readonly text: string\n /** Readable replacement for `text`: its label renders inline and its popover opens on every hover. */\n readonly summary?: QuoteSummary | undefined\n /** Composer-only removal action; omit for inert sent quotes. */\n readonly removal?: QuotePreviewRemoval | undefined\n}\n\n/**\n * Render one width-capped quote preview shared by editable drafts and sent messages.\n * Clipped excerpts open a content-sized, scrollable popover that fits within the viewport.\n * @param props - selected text, optional summary, and optional localized removal action.\n * @returns a non-navigating quote preview with a full-text popover only while clipped, or a summary popover.\n */\nexport function QuotePreview({ text, summary, removal }: QuotePreviewProps): JSX.Element {\n const sourceRef = useRef<HTMLSpanElement | null>(null)\n const [truncated, setTruncated] = useState(false)\n useLayoutEffect(() => {\n const source = sourceRef.current\n /* v8 ignore next -- the ref is attached before layout effects run. */\n if (source === null) return\n const measure = () => {\n const clipped = source.scrollWidth > source.clientWidth\n setTruncated(clipped)\n }\n measure()\n if (typeof ResizeObserver === 'undefined') return\n const observer = new ResizeObserver(measure)\n observer.observe(source)\n return () => { observer.disconnect() }\n }, [text])\n const remove = (event: ReactMouseEvent<HTMLButtonElement>): void => {\n event.preventDefault()\n event.stopPropagation()\n removal?.onRemove()\n }\n const preview = (\n <span\n className={css.quote}\n data-quote-preview=\"\"\n data-removable={removal === undefined ? undefined : ''}\n >\n {removal === undefined\n ? (\n <span className={css.marker} aria-hidden>\n <QuoteMarkIcon className={css.quoteMark} />\n </span>\n )\n : (\n <button\n type=\"button\"\n className={css.remove}\n aria-label={removal.label}\n onPointerDown={(event) => { event.preventDefault(); event.stopPropagation() }}\n onKeyDown={(event) => { event.stopPropagation() }}\n onClick={remove}\n >\n <QuoteMarkIcon className={css.quoteMark} />\n <IconCloseOutlineRegular size={12} className={css.closeMark} />\n </button>\n )}\n <span ref={sourceRef} className={css.source} data-quote-preview-text=\"\">\n {summary === undefined ? text : (\n <>\n <span aria-hidden=\"true\">{summary.label}</span>\n <span className={css.visuallyHidden}>{summary.detail === undefined ? summary.title : `${summary.title} ${summary.detail}`}</span>\n {' '}<span className={css.inlineBody}>{summary.body}</span>\n </>\n )}\n </span>\n </span>\n )\n return (\n <HoverCard\n inline\n grouped\n fitContent\n openDelayMs={0}\n disabled={summary === undefined && !truncated}\n anchor={preview}\n content={summary === undefined\n ? <span className={css.popoverText} data-quote-popover=\"\" aria-hidden=\"true\">{text}</span>\n : (\n <span className={css.summary} data-quote-popover=\"\" aria-hidden=\"true\">\n <span className={css.summaryTitle}>{summary.title}</span>\n {summary.detail !== undefined && <span className={css.summaryDetail}>{summary.detail}</span>}\n <span className={css.summaryBody}>{summary.body}</span>\n </span>\n )}\n />\n )\n}\n","/** Shared Markdown blockquote formatting for browser text. */\n\n/**\n * Project selected visible text as an ordinary Markdown blockquote.\n * @param text - selected visible text without quote markers.\n * @returns one `> `-prefixed line per normalized input line.\n */\nexport function formatQuoteText(text: string): string {\n return text.replace(/\\r\\n?/gu, '\\n').split('\\n').map(line => `> ${line}`).join('\\n')\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,SAAgB,kBAAkB,EAAE,WAAW,GAAG,SAA+B;CAC/E,OAAO,IAAA,OAAA;EAAA,GAAS;EAAO,WAAW,KAAK,IAAI,QAAQ,SAAS;CAAC,CAAA;AAC/D;;;;;;;;;;ACPA,MAAa,sBAAsB;;AAGnC,MAAa,qBAAqB;;AAUlC,MAAa,eAAe;CAC1B,kBAAkB;EAAE,MAAM;EAAI,MAAK,gBAAe,yFAAyF,YAAW;CAAwrB;CAC90B,gBAAgB;EAAE,MAAM;EAAI,MAAK,gBAAe,+GAA+G,YAAW;CAAsK;CAChV,oBAAoB;EAAE,MAAM;EAAI,MAAK,gBAAe,yFAAyF,YAAW;CAAwnB;CAChxB,kBAAkB;EAAE,MAAM;EAAI,MAAK,gBAAe,yFAAyF,YAAW;CAAyU;CAC/d,eAAe;EAAE,MAAM;EAAI,MAAK,gBAAe,yFAAyF,YAAW;CAA2O;CAC9X,mBAAmB;EAAE,MAAM;EAAI,MAAK,gBAAe,yFAAyF,YAAW;CAA2a;CAClkB,iBAAiB;EAAE,MAAM;EAAI,MAAK,gBAAe,yFAAyF,YAAW;CAAkoB;CACvxB,oBAAoB;EAAE,MAAM;EAAI,MAAK,gBAAe,yFAAyF,YAAW;CAAirE;CACz0E,sBAAsB;EAAE,MAAM;EAAI,MAAK,gBAAe,yFAAyF,YAAW;CAA2Q;CACra,oBAAoB;EAAE,MAAM;EAAI,MA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