@pstdio/ui 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EquationComponent-DeDYHvqY.js +62 -0
- package/dist/EquationComponent-DeDYHvqY.js.map +1 -0
- package/dist/chat-ui.js +347 -0
- package/dist/chat-ui.js.map +1 -0
- package/dist/components/button.stories.d.ts +18 -0
- package/dist/components/chat-ui/components/ai-conversation.d.ts +1161 -0
- package/dist/components/chat-ui/index.d.ts +10 -0
- package/dist/components/chat-ui/utils/get-icon.d.ts +34 -0
- package/{storybook-static → dist}/components/column-file-browser.d.ts +1 -2
- package/dist/components/column-file-browser.stories.d.ts +15 -0
- package/dist/components/data-table/build-columns.d.ts +3 -0
- package/dist/components/data-table/data-table.d.ts +2 -0
- package/{storybook-static/components → dist/components/data-table}/data-table.stories.d.ts +1 -1
- package/dist/components/data-table/helpers.d.ts +10 -0
- package/dist/components/data-table/index.d.ts +3 -0
- package/dist/components/data-table/pagination-footer.d.ts +5 -0
- package/dist/components/data-table/selection-toolbar.d.ts +9 -0
- package/{storybook-static/components/data-table.d.ts → dist/components/data-table/types.d.ts} +6 -4
- package/{storybook-static → dist}/components/file-selector.d.ts +1 -2
- package/{storybook-static/components/style-guide.stories.d.ts → dist/components/file-selector.stories.d.ts} +6 -3
- package/{storybook-static → dist}/components/info-card.d.ts +1 -2
- package/dist/components/info-card.stories.d.ts +41 -0
- package/{storybook-static → dist}/components/menu-item.d.ts +1 -1
- package/dist/components/menu-item.stories.d.ts +72 -0
- package/dist/components/number-input.d.ts +8 -0
- package/{storybook-static → dist}/components/param-editor.stories.d.ts +1 -0
- package/{storybook-static → dist}/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.d.ts +1 -0
- package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -0
- package/dist/components/session-indicator.d.ts +14 -0
- package/dist/components/session-indicator.stories.d.ts +11 -0
- package/dist/components/slider.stories.d.ts +15 -0
- package/dist/components/style-guide.stories.d.ts +28 -0
- package/dist/components/ticket-board.d.ts +33 -0
- package/dist/components/ticket-board.stories.d.ts +5 -0
- package/dist/components/ticket-card.d.ts +24 -0
- package/dist/components/ticket-card.stories.d.ts +17 -0
- package/dist/components/toaster.d.ts +3 -0
- package/{storybook-static → dist}/index.d.ts +5 -3
- package/dist/index.js +435 -0
- package/dist/index.js.map +1 -0
- package/dist/rich-message-CiA3ripk.js +1401 -0
- package/dist/rich-message-CiA3ripk.js.map +1 -0
- package/dist/rich-text.js +485 -0
- package/dist/rich-text.js.map +1 -0
- package/dist/style.css +1 -0
- package/{storybook-static → dist}/theme/primitives/colors.d.ts +6 -0
- package/dist/theme-9E0MRtZk.js +1985 -0
- package/dist/theme-9E0MRtZk.js.map +1 -0
- package/{src/theme/index.ts → dist/theme.js} +5 -2
- package/dist/theme.js.map +1 -0
- package/dist/tooltip-Gm7PLwZG.js +51 -0
- package/dist/tooltip-Gm7PLwZG.js.map +1 -0
- package/{storybook-static/theme/applyThemePreference.d.ts → dist/utils/apply-theme-preference.d.ts} +1 -1
- package/{storybook-static/theme → dist/utils}/theme-preference.d.ts +3 -3
- package/package.json +12 -9
- package/.storybook/main.ts +0 -28
- package/.storybook/preview.tsx +0 -28
- package/.storybook/vitest.setup.ts +0 -6
- package/src/components/alert.tsx +0 -27
- package/src/components/breadcrumb.stories.tsx +0 -40
- package/src/components/breadcrumb.tsx +0 -67
- package/src/components/button.stories.tsx +0 -151
- package/src/components/chat-ui/agent-types.ts +0 -231
- package/src/components/chat-ui/components/ai-conversation.stories.tsx +0 -49
- package/src/components/chat-ui/components/ai-conversation.tsx +0 -68
- package/src/components/chat-ui/components/ai-message.stories.tsx +0 -60
- package/src/components/chat-ui/components/ai-message.tsx +0 -103
- package/src/components/chat-ui/components/ai-response.stories.tsx +0 -48
- package/src/components/chat-ui/components/ai-response.tsx +0 -19
- package/src/components/chat-ui/components/approval-prompt.tsx +0 -51
- package/src/components/chat-ui/components/attachment-list.stories.tsx +0 -24
- package/src/components/chat-ui/components/attachment-list.tsx +0 -76
- package/src/components/chat-ui/components/auto-scroll.tsx +0 -42
- package/src/components/chat-ui/components/chat-input.stories.tsx +0 -114
- package/src/components/chat-ui/components/chat-input.tsx +0 -142
- package/src/components/chat-ui/components/chat-panel.stories.tsx +0 -396
- package/src/components/chat-ui/components/chat-panel.tsx +0 -97
- package/src/components/chat-ui/components/message-parts-renderer.stories.tsx +0 -59
- package/src/components/chat-ui/components/message-parts-renderer.tsx +0 -133
- package/src/components/chat-ui/components/message-types.ts +0 -40
- package/src/components/chat-ui/components/model-swap-separator.stories.tsx +0 -27
- package/src/components/chat-ui/components/model-swap-separator.tsx +0 -20
- package/src/components/chat-ui/components/send-button.tsx +0 -56
- package/src/components/chat-ui/components/timeline.tsx +0 -414
- package/src/components/chat-ui/components/tool-invocation-timeline.stories.tsx +0 -32
- package/src/components/chat-ui/components/tool-invocation-timeline.tsx +0 -16
- package/src/components/chat-ui/index.ts +0 -8
- package/src/components/chat-ui/mocks/full-conversation-normalized.json +0 -3557
- package/src/components/chat-ui/tool-rendering/build-timeline.ts +0 -127
- package/src/components/chat-ui/tool-rendering/default-renderers.ts +0 -420
- package/src/components/chat-ui/tool-rendering/index.ts +0 -3
- package/src/components/chat-ui/tool-rendering/types.ts +0 -19
- package/src/components/chat-ui/utils/diff.ts +0 -228
- package/src/components/chat-ui/utils/editor-state.ts +0 -5
- package/src/components/chat-ui/utils/get-icon.ts +0 -81
- package/src/components/code-editor.tsx +0 -147
- package/src/components/column-file-browser.stories.tsx +0 -217
- package/src/components/column-file-browser.tsx +0 -380
- package/src/components/content-placeholder.tsx +0 -21
- package/src/components/data-table/build-columns.tsx +0 -78
- package/src/components/data-table/data-table.css +0 -51
- package/src/components/data-table/data-table.stories.tsx +0 -209
- package/src/components/data-table/data-table.tsx +0 -232
- package/src/components/data-table/helpers.tsx +0 -69
- package/src/components/data-table/index.ts +0 -3
- package/src/components/data-table/pagination-footer.tsx +0 -58
- package/src/components/data-table/selection-toolbar.tsx +0 -26
- package/src/components/data-table/types.ts +0 -21
- package/src/components/delete-confirmation-modal.stories.tsx +0 -46
- package/src/components/delete-confirmation-modal.tsx +0 -56
- package/src/components/diff-bubble.stories.tsx +0 -70
- package/src/components/diff-bubble.tsx +0 -70
- package/src/components/diff-card.tsx +0 -139
- package/src/components/diff-drawer.stories.tsx +0 -106
- package/src/components/diff-drawer.tsx +0 -59
- package/src/components/diff-editor.tsx +0 -55
- package/src/components/drawer-inline.stories.tsx +0 -124
- package/src/components/drawer-inline.tsx +0 -90
- package/src/components/empty-state.stories.tsx +0 -65
- package/src/components/empty-state.tsx +0 -28
- package/src/components/error-boundary.tsx +0 -80
- package/src/components/file-selector.stories.tsx +0 -166
- package/src/components/file-selector.tsx +0 -192
- package/src/components/file-tree-helpers.ts +0 -28
- package/src/components/horizontal-menu-stack.tsx +0 -15
- package/src/components/info-card.stories.tsx +0 -120
- package/src/components/info-card.tsx +0 -60
- package/src/components/item-section.stories.tsx +0 -57
- package/src/components/item-section.tsx +0 -57
- package/src/components/layout.stories.tsx +0 -341
- package/src/components/layout.tsx +0 -67
- package/src/components/menu-item.stories.tsx +0 -162
- package/src/components/menu-item.tsx +0 -207
- package/src/components/number-input.tsx +0 -21
- package/src/components/open-source-notices-screen.stories.tsx +0 -69
- package/src/components/open-source-notices-screen.tsx +0 -154
- package/src/components/panel-menu.stories.tsx +0 -44
- package/src/components/panel-menu.tsx +0 -27
- package/src/components/param-editor-color-input.tsx +0 -98
- package/src/components/param-editor-date-input.tsx +0 -106
- package/src/components/param-editor-horizontal-text-input.tsx +0 -130
- package/src/components/param-editor-horizontal.stories.tsx +0 -545
- package/src/components/param-editor-horizontal.tsx +0 -137
- package/src/components/param-editor-input-group.tsx +0 -145
- package/src/components/param-editor-number-input.tsx +0 -145
- package/src/components/param-editor-selection-input.tsx +0 -181
- package/src/components/param-editor-text-input.tsx +0 -113
- package/src/components/param-editor.stories.tsx +0 -986
- package/src/components/param-editor.tsx +0 -142
- package/src/components/param-editor.types.ts +0 -95
- package/src/components/properties.stories.tsx +0 -108
- package/src/components/properties.tsx +0 -73
- package/src/components/pstdio-logo.tsx +0 -26
- package/src/components/resource-badge.stories.tsx +0 -26
- package/src/components/resource-badge.tsx +0 -173
- package/src/components/rich-text/collaborative-markdown-editor/awareness-cursors.tsx +0 -45
- package/src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.tsx +0 -230
- package/src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.tsx +0 -131
- package/src/components/rich-text/index.ts +0 -14
- package/src/components/rich-text/markdown-editor/markdown-editor.stories.tsx +0 -147
- package/src/components/rich-text/markdown-editor/markdown-editor.tsx +0 -112
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx +0 -100
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts +0 -32
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.ts +0 -2
- package/src/components/rich-text/prompt-input/commands.ts +0 -44
- package/src/components/rich-text/prompt-input/events.ts +0 -21
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.tsx +0 -8
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.ts +0 -49
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.ts +0 -30
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.tsx +0 -127
- package/src/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.tsx +0 -32
- package/src/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.tsx +0 -30
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.ts +0 -15
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.tsx +0 -88
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.tsx +0 -90
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.tsx +0 -50
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.ts +0 -3
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.tsx +0 -50
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.ts +0 -45
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.ts +0 -20
- package/src/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.tsx +0 -50
- package/src/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.tsx +0 -107
- package/src/components/rich-text/prompt-input/plugins/keyboard-shortcuts.ts +0 -13
- package/src/components/rich-text/prompt-input/prompt-input.stories.tsx +0 -87
- package/src/components/rich-text/prompt-input/prompt-input.tsx +0 -106
- package/src/components/rich-text/prompt-input/theme/prompt-input-theme.css +0 -3
- package/src/components/rich-text/prompt-input/theme/prompt-input-theme.ts +0 -11
- package/src/components/rich-text/prompt-input/utils.ts +0 -158
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx +0 -100
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts +0 -32
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.ts +0 -2
- package/src/components/rich-text/rich-message/rich-message.stories.tsx +0 -146
- package/src/components/rich-text/rich-message/rich-message.tsx +0 -118
- package/src/components/rich-text/shared/components/content-editable.tsx +0 -28
- package/src/components/rich-text/shared/components/default-rich-text-components.tsx +0 -99
- package/src/components/rich-text/shared/editor-config.ts +0 -38
- package/src/components/rich-text/shared/nodes/DataTableNode.stories.tsx +0 -52
- package/src/components/rich-text/shared/nodes/DataTableNode.tsx +0 -73
- package/src/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.tsx +0 -22
- package/src/components/rich-text/shared/plugins/CodePlugin/CodeNode.tsx +0 -57
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.tsx +0 -46
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationNode.tsx +0 -161
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.css +0 -16
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.tsx +0 -45
- package/src/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.tsx +0 -40
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.css +0 -26
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.tsx +0 -414
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.ts +0 -1
- package/src/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.ts +0 -52
- package/src/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.ts +0 -16
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.css +0 -163
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.tsx +0 -355
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.tsx +0 -6
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.ts +0 -17
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.ts +0 -39
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.ts +0 -23
- package/src/components/rich-text/shared/plugins/StateUpdatePlugin.tsx +0 -21
- package/src/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.tsx +0 -224
- package/src/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.css +0 -3
- package/src/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.tsx +0 -315
- package/src/components/rich-text/shared/plugins/ToggleEditablePlugin.tsx +0 -12
- package/src/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.tsx +0 -20
- package/src/components/rich-text/shared/transformers/markdown-transformers.ts +0 -123
- package/src/components/rich-text/shared/types/rich-text-components.ts +0 -17
- package/src/components/rich-text/theme/report-theme.tsx +0 -81
- package/src/components/rich-text/theme/rich-text-theme.css +0 -773
- package/src/components/rich-text/theme/rich-text-theme.tsx +0 -81
- package/src/components/rich-text/types.ts +0 -9
- package/src/components/rich-text/utils/inferResourceType.ts +0 -17
- package/src/components/rich-text/utils/markdown.ts +0 -12
- package/src/components/rich-text/utils/mediaType.ts +0 -31
- package/src/components/session-indicator.stories.tsx +0 -46
- package/src/components/session-indicator.tsx +0 -40
- package/src/components/slider.stories.tsx +0 -38
- package/src/components/slider.tsx +0 -20
- package/src/components/style-guide-data.ts +0 -374
- package/src/components/style-guide.stories.tsx +0 -212
- package/src/components/style-guide.tsx +0 -305
- package/src/components/ticket-board.stories.tsx +0 -109
- package/src/components/ticket-board.tsx +0 -167
- package/src/components/ticket-card.stories.tsx +0 -133
- package/src/components/ticket-card.tsx +0 -126
- package/src/components/toaster.stories.tsx +0 -79
- package/src/components/toaster.tsx +0 -26
- package/src/components/tooltip.tsx +0 -43
- package/src/index.ts +0 -16
- package/src/theme/global.ts +0 -49
- package/src/theme/primitives/colors.ts +0 -209
- package/src/theme/primitives/fonts.ts +0 -33
- package/src/theme/primitives/sizes.ts +0 -49
- package/src/theme/recipes/alert.ts +0 -12
- package/src/theme/recipes/button.ts +0 -124
- package/src/theme/recipes/dialog.ts +0 -11
- package/src/theme/recipes/divider.ts +0 -7
- package/src/theme/recipes/drawer.ts +0 -16
- package/src/theme/recipes/editable.ts +0 -42
- package/src/theme/recipes/form.ts +0 -11
- package/src/theme/recipes/input.ts +0 -25
- package/src/theme/recipes/menu.ts +0 -40
- package/src/theme/recipes/popover.ts +0 -46
- package/src/theme/recipes/progress-circle.ts +0 -22
- package/src/theme/recipes/skeleton.ts +0 -8
- package/src/theme/recipes/textarea.ts +0 -29
- package/src/theme/recipes/tooltip.ts +0 -15
- package/src/theme/theme.ts +0 -70
- package/src/theme/tokens/borders.ts +0 -38
- package/src/theme/tokens/colors.ts +0 -488
- package/src/theme/tokens/layer-styles.ts +0 -15
- package/src/theme/tokens/shadows.ts +0 -47
- package/src/theme/tokens/text.ts +0 -236
- package/src/utils/apply-theme-preference.ts +0 -17
- package/src/utils/formats.ts +0 -27
- package/src/utils/get-file-type-icon.ts +0 -52
- package/src/utils/theme-preference.tsx +0 -60
- package/src/vite-env.d.ts +0 -6
- package/storybook-static/assets/CodeBlockPlugin-C3OWpvP8.js +0 -281
- package/storybook-static/assets/CodeBlockPlugin-e2vWgtYm.css +0 -1
- package/storybook-static/assets/DataTableNode.stories-DLgTftOI.js +0 -33
- package/storybook-static/assets/EquationComponent-CUFxwyNf.js +0 -1
- package/storybook-static/assets/EquationComponent-DWZwfaVI.css +0 -1
- package/storybook-static/assets/FloatingTextFormatToolbarPlugin-B6jc8xvg.js +0 -1
- package/storybook-static/assets/FloatingTextFormatToolbarPlugin-D2l3--Te.css +0 -1
- package/storybook-static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/storybook-static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/storybook-static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/storybook-static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/storybook-static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/storybook-static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/storybook-static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/storybook-static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/storybook-static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/storybook-static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/storybook-static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/storybook-static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/storybook-static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/storybook-static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/storybook-static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/storybook-static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/storybook-static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/storybook-static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/storybook-static/assets/LexicalHistoryPlugin.prod-BQAibkDj.js +0 -1
- package/storybook-static/assets/TreeViewPlugin-CyVKCrKJ.js +0 -24
- package/storybook-static/assets/ai-conversation-DcjS--ee.js +0 -1
- package/storybook-static/assets/ai-conversation.stories-COjWuS8V.js +0 -3
- package/storybook-static/assets/ai-message-DLdAGhWH.js +0 -1
- package/storybook-static/assets/ai-message.stories-CRTyreKL.js +0 -3
- package/storybook-static/assets/ai-response-ySM6s0iN.js +0 -1
- package/storybook-static/assets/ai-response.stories-DVBYlrGf.js +0 -11
- package/storybook-static/assets/attachment-list-1p1601I5.js +0 -1
- package/storybook-static/assets/attachment-list.stories-Cydlsnio.js +0 -7
- package/storybook-static/assets/badge-CtgJasjB.js +0 -1
- package/storybook-static/assets/breadcrumb.stories-SAjB-iqH.js +0 -5
- package/storybook-static/assets/button-C7it2n8t.js +0 -1
- package/storybook-static/assets/button.stories-BMVbbb4y.js +0 -72
- package/storybook-static/assets/chat-input-B-915nCM.js +0 -1
- package/storybook-static/assets/chat-input.stories-DrxvpT9p.js +0 -32
- package/storybook-static/assets/chat-panel.stories-D0L6eIte.js +0 -96
- package/storybook-static/assets/chevron-down-BYCAGyCV.js +0 -1
- package/storybook-static/assets/chevron-right-owK1wZnx.js +0 -1
- package/storybook-static/assets/collaborative-markdown-editor-Bj0GvTvv.js +0 -41
- package/storybook-static/assets/collaborative-markdown-editor.stories-B_MUIC5s.js +0 -11
- package/storybook-static/assets/collapsible-DBDG7h1r.js +0 -1
- package/storybook-static/assets/collapsible-content-B1Uq3jUM.js +0 -1
- package/storybook-static/assets/column-file-browser.stories-DPMQnHCw.js +0 -54
- package/storybook-static/assets/compiler-runtime-BXE7OOXE.js +0 -1
- package/storybook-static/assets/computed-style-C0hzrq9-.js +0 -1
- package/storybook-static/assets/create-recipe-context-BU56IzEo.js +0 -1
- package/storybook-static/assets/create-slot-recipe-context-DAhDE6G_.js +0 -1
- package/storybook-static/assets/create-split-props-u5h9OPvL.js +0 -1
- package/storybook-static/assets/createLucideIcon-CcBBUKX8.js +0 -1
- package/storybook-static/assets/data-table-vuIeWXui.css +0 -1
- package/storybook-static/assets/data-table.stories-Cs-q7dpj.js +0 -19
- package/storybook-static/assets/delete-confirmation-modal.stories-C8vDKFRD.js +0 -14
- package/storybook-static/assets/diff-bubble-_zZypMRt.js +0 -1
- package/storybook-static/assets/diff-bubble.stories-DfonanIk.js +0 -39
- package/storybook-static/assets/diff-drawer.stories-CGDWiKD8.js +0 -38
- package/storybook-static/assets/diff-editor-DV9BXqbn.js +0 -11
- package/storybook-static/assets/dismissable-layer-Cc5dFRd8.js +0 -1
- package/storybook-static/assets/drawer-inline.stories-B3Tp7vjL.js +0 -88
- package/storybook-static/assets/empty-state-BXkyq69k.js +0 -1
- package/storybook-static/assets/empty-state.stories-6eYYBOWR.js +0 -29
- package/storybook-static/assets/factory-BR3bc_RM.js +0 -1
- package/storybook-static/assets/factory-DAJZwK4o.js +0 -1
- package/storybook-static/assets/file-selector.stories-PKIGBUd5.js +0 -31
- package/storybook-static/assets/file-text-D5m8MJlG.js +0 -1
- package/storybook-static/assets/flex-DAJL4AFZ.js +0 -1
- package/storybook-static/assets/folder-C5dba_Co.js +0 -1
- package/storybook-static/assets/form-D_Xln9tK.js +0 -1
- package/storybook-static/assets/full-conversation-normalized-LUbl1coD.js +0 -1
- package/storybook-static/assets/grid-7OIKBlfh.js +0 -1
- package/storybook-static/assets/h-stack-DWHd8f97.js +0 -1
- package/storybook-static/assets/horizontal-menu-stack-Cph6x7ui.js +0 -1
- package/storybook-static/assets/icon-C8FN9JqD.js +0 -1
- package/storybook-static/assets/icon-button-DHiUe7rR.js +0 -1
- package/storybook-static/assets/icons-WRA1cA-W.js +0 -1
- package/storybook-static/assets/iframe-2XPD_vrQ.css +0 -1
- package/storybook-static/assets/iframe-B8FSoBNY.js +0 -1075
- package/storybook-static/assets/index-B0y2_lLF.js +0 -1
- package/storybook-static/assets/index-CXwl6T4k.js +0 -1
- package/storybook-static/assets/index-DaXC_qY_.js +0 -1
- package/storybook-static/assets/index-DpB4ozcR.js +0 -1
- package/storybook-static/assets/index-cFwdnc0b.js +0 -1
- package/storybook-static/assets/info-DlgY5-DW.js +0 -1
- package/storybook-static/assets/info-card.stories-Cry0Qfrn.js +0 -55
- package/storybook-static/assets/input-ZSs5cSFQ.js +0 -1
- package/storybook-static/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
- package/storybook-static/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
- package/storybook-static/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- package/storybook-static/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
- package/storybook-static/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
- package/storybook-static/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
- package/storybook-static/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- package/storybook-static/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
- package/storybook-static/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
- package/storybook-static/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
- package/storybook-static/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- package/storybook-static/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
- package/storybook-static/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
- package/storybook-static/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
- package/storybook-static/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
- package/storybook-static/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- package/storybook-static/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
- package/storybook-static/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
- package/storybook-static/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
- package/storybook-static/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- package/storybook-static/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- package/storybook-static/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
- package/storybook-static/assets/item-section-AoQrVPNJ.js +0 -1
- package/storybook-static/assets/item-section.stories-kYTPHRsx.js +0 -24
- package/storybook-static/assets/layout.stories-DhSjwzU1.js +0 -3
- package/storybook-static/assets/link-DE5grRtm.js +0 -1
- package/storybook-static/assets/markdown-BLUemkxK.js +0 -1
- package/storybook-static/assets/markdown-editor-Y4eMsgVb.js +0 -1
- package/storybook-static/assets/markdown-editor.stories-DIWw-hRP.js +0 -115
- package/storybook-static/assets/menu-item-CrqDaj9K.js +0 -1
- package/storybook-static/assets/menu-item.stories-D9Isjjrf.js +0 -68
- package/storybook-static/assets/message-parts-renderer.stories-CewRvbm7.js +0 -5
- package/storybook-static/assets/message-types-CEyA7Qm7.js +0 -60
- package/storybook-static/assets/model-swap-separator.stories-DrQW2NWQ.js +0 -9
- package/storybook-static/assets/mutation-observer-CAfGweIM.js +0 -1
- package/storybook-static/assets/normalize-props-D7NI5JRu.js +0 -1
- package/storybook-static/assets/number-C92MPsRM.js +0 -1
- package/storybook-static/assets/number-input-D1aC-9ls.js +0 -7
- package/storybook-static/assets/onest-cyrillic-400-normal-BxvCLB5P.woff +0 -0
- package/storybook-static/assets/onest-cyrillic-400-normal-DH8vlB-A.woff2 +0 -0
- package/storybook-static/assets/onest-cyrillic-500-normal-CyY1vN0Q.woff +0 -0
- package/storybook-static/assets/onest-cyrillic-500-normal-DHyr8B2c.woff2 +0 -0
- package/storybook-static/assets/onest-cyrillic-700-normal-CwpXuTGk.woff2 +0 -0
- package/storybook-static/assets/onest-cyrillic-700-normal-DOtXtm0s.woff +0 -0
- package/storybook-static/assets/onest-latin-400-normal-BAzPRZHg.woff +0 -0
- package/storybook-static/assets/onest-latin-400-normal-bladozIj.woff2 +0 -0
- package/storybook-static/assets/onest-latin-500-normal-oFTiz6Nq.woff +0 -0
- package/storybook-static/assets/onest-latin-500-normal-qHiQtL66.woff2 +0 -0
- package/storybook-static/assets/onest-latin-700-normal-Bd6qVL4Q.woff2 +0 -0
- package/storybook-static/assets/onest-latin-700-normal-XTvQgpoh.woff +0 -0
- package/storybook-static/assets/onest-latin-ext-400-normal--mQR5RlC.woff2 +0 -0
- package/storybook-static/assets/onest-latin-ext-400-normal-BbXTNVXw.woff +0 -0
- package/storybook-static/assets/onest-latin-ext-500-normal-BlXa29q8.woff2 +0 -0
- package/storybook-static/assets/onest-latin-ext-500-normal-CoujUMv_.woff +0 -0
- package/storybook-static/assets/onest-latin-ext-700-normal-C-Tcltod.woff2 +0 -0
- package/storybook-static/assets/onest-latin-ext-700-normal-CSGWRWNE.woff +0 -0
- package/storybook-static/assets/open-source-notices-screen.stories-BpdJxDZC.js +0 -21
- package/storybook-static/assets/overflow-CkG1DOya.js +0 -1
- package/storybook-static/assets/panel-menu-CqLSrdTB.js +0 -1
- package/storybook-static/assets/panel-menu.stories-CxdWaWjq.js +0 -14
- package/storybook-static/assets/param-editor-horizontal.stories-C1o-VOjG.js +0 -561
- package/storybook-static/assets/param-editor-selection-input-2pJE1_W1.js +0 -1
- package/storybook-static/assets/param-editor.stories-0ae3y4Vu.js +0 -921
- package/storybook-static/assets/playfair-display-cyrillic-400-normal-CjW2EstV.woff2 +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-400-normal-ZiRag6zj.woff +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-600-normal-DbWAkkgN.woff +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-600-normal-oLY6jnZ7.woff2 +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-700-normal-Dk1mTcxf.woff +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-700-normal-Dw3uKy19.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-400-normal-CFtfchNt.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-400-normal-DHYHbkg3.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-600-normal-CZLGqjJe.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-600-normal-CxxueQ0Z.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-700-normal-Bc_1Q1cG.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-700-normal-CuDiGg7c.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-400-normal-BxlSGspa.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-400-normal-qdZwdvNS.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-600-normal-BumBfC1v.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-600-normal-CEjQclLc.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-700-normal-C58ejOkc.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-700-normal-D5HUU8GT.woff +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-400-normal-BV2APVTb.woff2 +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-400-normal-BbvUAu4N.woff +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-600-normal-BPJkAZPN.woff +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-600-normal-ICsRR-qJ.woff2 +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-700-normal-CaKJSIny.woff2 +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-700-normal-Cr1rw0mr.woff +0 -0
- package/storybook-static/assets/portal-CZHfPTRw.js +0 -1
- package/storybook-static/assets/preload-helper-PPVm8Dsz.js +0 -1
- package/storybook-static/assets/prompt-input-BLCttowi.js +0 -14
- package/storybook-static/assets/prompt-input-BVbz9joI.css +0 -1
- package/storybook-static/assets/prompt-input.stories-J8-AMVXy.js +0 -9
- package/storybook-static/assets/properties.stories-Bs7ivKgb.js +0 -59
- package/storybook-static/assets/react-18-KY0R7ltw.js +0 -9
- package/storybook-static/assets/render-strategy-BebqUNCa.js +0 -1
- package/storybook-static/assets/resource-badge-Bw5UoU4J.js +0 -1
- package/storybook-static/assets/resource-badge.stories-DtSh-RX9.js +0 -9
- package/storybook-static/assets/rich-message-BIkzo1SM.js +0 -1
- package/storybook-static/assets/rich-message.stories-C9Wc4d3O.js +0 -115
- package/storybook-static/assets/rich-text-theme-Bkhh9rAZ.js +0 -14
- package/storybook-static/assets/rich-text-theme-K2MBoCbx.css +0 -1
- package/storybook-static/assets/separator-CQkMOHNm.js +0 -1
- package/storybook-static/assets/settings-DUgg22A7.js +0 -1
- package/storybook-static/assets/simple-grid-DIKjhnVI.js +0 -1
- package/storybook-static/assets/spinner-ZYH_gvW-.js +0 -1
- package/storybook-static/assets/stack-CN4X31TA.js +0 -1
- package/storybook-static/assets/star-CvcHIXRa.js +0 -1
- package/storybook-static/assets/style-guide.stories-BUvEhZov.js +0 -6
- package/storybook-static/assets/tabbable-DHAf8oAu.js +0 -1
- package/storybook-static/assets/table-BKNSzs2r.js +0 -1
- package/storybook-static/assets/textarea-rqmaWSc5.js +0 -1
- package/storybook-static/assets/toaster-d9nN0H7K.js +0 -1
- package/storybook-static/assets/toaster.stories-BRVCYyaM.js +0 -52
- package/storybook-static/assets/tool-invocation-timeline-B-cS0W6M.js +0 -59
- package/storybook-static/assets/tool-invocation-timeline.stories-DXO59O73.js +0 -5
- package/storybook-static/assets/tooltip-C_a-XGZ8.js +0 -1
- package/storybook-static/assets/tooltip-DZxUoouw.js +0 -1
- package/storybook-static/assets/trash-2-BO05slEk.js +0 -1
- package/storybook-static/assets/typeahead-CuY9WxfQ.js +0 -1
- package/storybook-static/assets/use-field-context-DoxKQlMm.js +0 -1
- package/storybook-static/assets/use-presence-context-DK2PGZth.js +0 -1
- package/storybook-static/assets/v-stack-Btoq6OB_.js +0 -1
- package/storybook-static/assets/x-D42ziktz.js +0 -1
- package/storybook-static/components/chat-ui/mocks/full-conversation-normalized.json.d.ts +0 -3560
- package/storybook-static/components/rich-text/utils/inferResourceType.d.ts +0 -1
- package/storybook-static/favicon-wrapper.svg +0 -46
- package/storybook-static/favicon.svg +0 -1
- package/storybook-static/iframe.html +0 -705
- package/storybook-static/index.html +0 -150
- package/storybook-static/index.json +0 -1
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +0 -1
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -628
- package/storybook-static/sb-addons/themes-1/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/vitest-2/manager-bundle.js +0 -3
- package/storybook-static/sb-common-assets/favicon-wrapper.svg +0 -46
- package/storybook-static/sb-common-assets/favicon.svg +0 -1
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-runtime.js +0 -77956
- package/storybook-static/sb-manager/globals.js +0 -24
- package/storybook-static/sb-manager/manager-stores.js +0 -23
- package/storybook-static/sb-manager/runtime.js +0 -20422
- package/storybook-static/theme/types.d.ts +0 -1
- package/storybook-static/vite-inject-mocker-entry.js +0 -2
- package/tsconfig.json +0 -29
- package/vite.config.ts +0 -82
- package/vitest.shims.d.ts +0 -1
- /package/{storybook-static → dist}/components/alert.d.ts +0 -0
- /package/{storybook-static → dist}/components/breadcrumb.d.ts +0 -0
- /package/{storybook-static → dist}/components/breadcrumb.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/agent-types.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-conversation.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-message.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-message.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-response.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-response.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/approval-prompt.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/attachment-list.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/attachment-list.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/auto-scroll.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/chat-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/chat-input.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/chat-panel.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/chat-panel.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/message-parts-renderer.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/message-parts-renderer.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/message-types.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/model-swap-separator.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/model-swap-separator.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/send-button.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/timeline.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/tool-invocation-timeline.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/tool-invocation-timeline.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/tool-rendering/build-timeline.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/tool-rendering/default-renderers.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/tool-rendering/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/tool-rendering/types.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/utils/diff.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/utils/editor-state.d.ts +0 -0
- /package/{storybook-static → dist}/components/code-editor.d.ts +0 -0
- /package/{storybook-static → dist}/components/content-placeholder.d.ts +0 -0
- /package/{storybook-static → dist}/components/delete-confirmation-modal.d.ts +0 -0
- /package/{storybook-static → dist}/components/delete-confirmation-modal.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-bubble.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-bubble.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-card.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-drawer.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-drawer.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-editor.d.ts +0 -0
- /package/{storybook-static → dist}/components/drawer-inline.d.ts +0 -0
- /package/{storybook-static → dist}/components/drawer-inline.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/empty-state.d.ts +0 -0
- /package/{storybook-static → dist}/components/empty-state.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/error-boundary.d.ts +0 -0
- /package/{storybook-static → dist}/components/file-tree-helpers.d.ts +0 -0
- /package/{storybook-static → dist}/components/horizontal-menu-stack.d.ts +0 -0
- /package/{storybook-static → dist}/components/item-section.d.ts +0 -0
- /package/{storybook-static → dist}/components/item-section.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/layout.d.ts +0 -0
- /package/{storybook-static → dist}/components/layout.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/open-source-notices-screen.d.ts +0 -0
- /package/{storybook-static → dist}/components/open-source-notices-screen.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/panel-menu.d.ts +0 -0
- /package/{storybook-static → dist}/components/panel-menu.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-color-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-date-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-horizontal-text-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-horizontal.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-horizontal.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-input-group.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-number-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-selection-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-text-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor.types.d.ts +0 -0
- /package/{storybook-static → dist}/components/properties.d.ts +0 -0
- /package/{storybook-static → dist}/components/properties.stories.d.ts +0 -0
- /package/{storybook-static/components/schub-logo.d.ts → dist/components/pstdio-logo.d.ts} +0 -0
- /package/{storybook-static → dist}/components/resource-badge.d.ts +0 -0
- /package/{storybook-static → dist}/components/resource-badge.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/collaborative-markdown-editor/awareness-cursors.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/markdown-editor.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/markdown-editor.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/commands.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/events.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/keyboard-shortcuts.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/prompt-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/prompt-input.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/theme/prompt-input-theme.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/utils.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/rich-message.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/rich-message.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/components/content-editable.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/components/default-rich-text-components.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/editor-config.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/nodes/DataTableNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/nodes/DataTableNode.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/CodePlugin/CodeNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/EquationPlugin/EquationNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/StateUpdatePlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/ToggleEditablePlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/transformers/markdown-transformers.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/types/rich-text-components.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/theme/report-theme.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/theme/rich-text-theme.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/types.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/utils/markdown.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/utils/mediaType.d.ts +0 -0
- /package/{storybook-static → dist}/components/slider.d.ts +0 -0
- /package/{storybook-static → dist}/components/style-guide-data.d.ts +0 -0
- /package/{storybook-static → dist}/components/style-guide.d.ts +0 -0
- /package/{storybook-static → dist}/components/toaster.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/tooltip.d.ts +0 -0
- /package/{storybook-static → dist}/theme/global.d.ts +0 -0
- /package/{storybook-static → dist}/theme/index.d.ts +0 -0
- /package/{storybook-static → dist}/theme/primitives/fonts.d.ts +0 -0
- /package/{storybook-static → dist}/theme/primitives/sizes.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/alert.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/button.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/dialog.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/divider.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/drawer.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/editable.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/form.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/input.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/menu.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/popover.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/progress-circle.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/skeleton.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/textarea.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/tooltip.d.ts +0 -0
- /package/{storybook-static → dist}/theme/theme.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/borders.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/colors.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/layer-styles.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/shadows.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/text.d.ts +0 -0
- /package/{storybook-static → dist}/utils/formats.d.ts +0 -0
- /package/{storybook-static → dist}/utils/get-file-type-icon.d.ts +0 -0
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import{R as t}from"./rich-message-BIkzo1SM.js";import"./iframe-B8FSoBNY.js";import"./preload-helper-PPVm8Dsz.js";import"./compiler-runtime-BXE7OOXE.js";import"./rich-text-theme-Bkhh9rAZ.js";import"./index-DaXC_qY_.js";import"./index-DpB4ozcR.js";import"./factory-DAJZwK4o.js";import"./flex-DAJL4AFZ.js";import"./CodeBlockPlugin-C3OWpvP8.js";import"./index-B0y2_lLF.js";import"./index-cFwdnc0b.js";import"./create-recipe-context-BU56IzEo.js";import"./textarea-rqmaWSc5.js";import"./factory-BR3bc_RM.js";import"./use-field-context-DoxKQlMm.js";import"./computed-style-C0hzrq9-.js";import"./table-BKNSzs2r.js";import"./create-slot-recipe-context-DAhDE6G_.js";import"./TreeViewPlugin-CyVKCrKJ.js";import"./markdown-BLUemkxK.js";import"./resource-badge-Bw5UoU4J.js";import"./createLucideIcon-CcBBUKX8.js";import"./file-text-D5m8MJlG.js";import"./tooltip-DZxUoouw.js";import"./portal-CZHfPTRw.js";import"./normalize-props-D7NI5JRu.js";import"./tooltip-C_a-XGZ8.js";import"./use-presence-context-DK2PGZth.js";import"./create-split-props-u5h9OPvL.js";import"./overflow-CkG1DOya.js";import"./icon-button-DHiUe7rR.js";import"./button-C7it2n8t.js";import"./spinner-ZYH_gvW-.js";import"./index-CXwl6T4k.js";import"./x-D42ziktz.js";const r=`
|
|
2
|
-
# RichMessage
|
|
3
|
-
|
|
4
|
-
This is a rich message rendered from Markdown.
|
|
5
|
-
|
|
6
|
-
- Supports lists
|
|
7
|
-
- Links like [Pufflig](https://pufflig.com)
|
|
8
|
-
- Quotes
|
|
9
|
-
|
|
10
|
-
> A nice quote to demo the Quote node.
|
|
11
|
-
|
|
12
|
-
| Feature | Supported |
|
|
13
|
-
| ------- | --------- |
|
|
14
|
-
| Tables | ✅ |
|
|
15
|
-
| Links | ✅ |
|
|
16
|
-
| Lists | ✅ |
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Subheading
|
|
21
|
-
Some more text under a subheading.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Table Example
|
|
26
|
-
|
|
27
|
-
| Name | Value |
|
|
28
|
-
| ---- | ----- |
|
|
29
|
-
| Foo | Bar |
|
|
30
|
-
| Baz | Qux |
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
# Heading 1
|
|
35
|
-
|
|
36
|
-
## Heading 2
|
|
37
|
-
|
|
38
|
-
### Heading 3
|
|
39
|
-
|
|
40
|
-
This paragraph has **bold**, *italic*, ~~strikethrough~~ text and <u>underline</u>.
|
|
41
|
-
|
|
42
|
-
Inline link to [Chakra UI](https://chakra-ui.com).
|
|
43
|
-
|
|
44
|
-
ReferenceLink token examples:
|
|
45
|
-
- {{link('$PROJECT/sources/orders.csv')}}
|
|
46
|
-
- {{link('$PROJECT/sources/readme.md')}}
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
# Nested Lists
|
|
51
|
-
|
|
52
|
-
- Fruits
|
|
53
|
-
- Apple
|
|
54
|
-
- Banana
|
|
55
|
-
- Orange
|
|
56
|
-
- Vegetables
|
|
57
|
-
- Carrot
|
|
58
|
-
- Lettuce
|
|
59
|
-
|
|
60
|
-
1. First
|
|
61
|
-
2. Second
|
|
62
|
-
1. Second.A
|
|
63
|
-
2. Second.B
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
A paragraph above the rule.
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
> This is a blockquote.
|
|
72
|
-
> It can span multiple lines.
|
|
73
|
-
|
|
74
|
-
\\[ G_{\\mu\\nu} + \\Lambda g_{\\mu\\nu} = \\frac{8\\pi G}{c^4} T_{\\mu\\nu} \\]
|
|
75
|
-
Where: \\( G_{\\mu\\nu} \\) is the Einstein tensor, which represents the curvature of spacetime. \\( \\Lambda \\) is the cosmological constant. \\( g_{\\mu\\nu} \\) is the metric tensor, which describes the geometry of spacetime. \\( G \\) is the gravitational constant. \\( c \\) is the speed of light in a vacuum. \\( T_{\\mu\\nu} \\) is the stress-energy tensor, which represents the distribution of matter and energy in spacetime.
|
|
76
|
-
|
|
77
|
-
\\[
|
|
78
|
-
\\begin{align}
|
|
79
|
-
a + b &= c \\\\
|
|
80
|
-
d + e &= f \\\\
|
|
81
|
-
g + h &= i
|
|
82
|
-
\\end{align}
|
|
83
|
-
\\]
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## Code Blocks
|
|
88
|
-
|
|
89
|
-
SQL:
|
|
90
|
-
|
|
91
|
-
\`\`\`sql
|
|
92
|
-
CREATE TABLE users (
|
|
93
|
-
id SERIAL PRIMARY KEY,
|
|
94
|
-
email TEXT NOT NULL UNIQUE,
|
|
95
|
-
created_at TIMESTAMPTZ DEFAULT NOW()
|
|
96
|
-
);
|
|
97
|
-
|
|
98
|
-
SELECT id, email
|
|
99
|
-
FROM users
|
|
100
|
-
WHERE created_at > NOW() - INTERVAL '7 days'
|
|
101
|
-
ORDER BY created_at DESC;
|
|
102
|
-
\`\`\`
|
|
103
|
-
|
|
104
|
-
Python:
|
|
105
|
-
|
|
106
|
-
\`\`\`python
|
|
107
|
-
def fib(n: int):
|
|
108
|
-
a, b = 0, 1
|
|
109
|
-
for _ in range(n):
|
|
110
|
-
yield a
|
|
111
|
-
a, b = b, a + b
|
|
112
|
-
|
|
113
|
-
print(list(fib(10)))
|
|
114
|
-
\`\`\`
|
|
115
|
-
`,Q={title:"Chat UI/RichMessage",component:t,parameters:{layout:"padded"},args:{debug:!1,defaultState:r},argTypes:{defaultState:{control:"text",description:"Markdown source to render"},debug:{control:"boolean",description:"Show Lexical tree for debugging"}}},e={};e.parameters={...e.parameters,docs:{...e.parameters?.docs,source:{originalSource:"{}",...e.parameters?.docs?.source}}};const G=["Basic"];export{e as Basic,G as __namedExportsOrder,Q as default};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{r as B,j as q}from"./iframe-B8FSoBNY.js";import{r as Bi}from"./index-DaXC_qY_.js";import{c as ga}from"./compiler-runtime-BXE7OOXE.js";import{c as pa}from"./factory-DAJZwK4o.js";import{F as zi}from"./flex-DAJL4AFZ.js";const ds=B.createContext(null);function _a(n,e){return{getTheme:function(){return e??null}}}function Gn(){const n=B.useContext(ds);return n==null&&(function(e,...t){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",e);for(const o of t)i.append("v",o);throw r.search=i.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),n}function k(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function hs(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);t.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const xe=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,ma=xe&&"documentMode"in document?document.documentMode:null,pe=xe&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),je=xe&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Fn=!(!xe||!("InputEvent"in window)||ma)&&"getTargetRanges"in new window.InputEvent("input"),sn=xe&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Lt=xe&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ya=xe&&/Android/.test(navigator.userAgent),gs=xe&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Wi=xe&&ya&&gs,ln=xe&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&pe&&!gs,xa=0,va=1,Sa=2,ps=128,Ca=1,ba=2,Ea=3,ka=4,Na=5,wa=6,Xn=sn||Lt||ln?" ":"",Zn=`
|
|
2
|
-
|
|
3
|
-
`,Ta=je?" ":Xn,tt={bold:1,capitalize:1024,code:16,highlight:ps,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Oa={directionless:1,unmergeable:2},Ui={center:2,end:6,justify:4,left:1,right:3,start:5},Ma={[ba]:"center",[wa]:"end",[ka]:"justify",[Ca]:"left",[Ea]:"right",[Na]:"start"},Aa={normal:0,segmented:2,token:1},Da={[xa]:"normal",[Sa]:"segmented",[va]:"token"},ji="$config";function _s(n,e,t,r,i,o){let s=n.getFirstChild();for(;s!==null;){const l=s.__key;s.__parent===e&&(v(s)&&_s(s,l,t,r,i,o),t.has(l)||o.delete(l),i.push(l)),s=s.getNextSibling()}}let Fr=!1,ui=0;function Pa(n){ui=n.timeStamp}function mr(n,e,t){const r=n.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(n===i||r&&n.previousSibling===i)||r&&or(n,t)!==void 0}function Fa(n,e,t){const r=ve(ge(t));let i=null,o=null;r!==null&&r.anchorNode===n&&(i=r.anchorOffset,o=r.focusOffset);const s=n.nodeValue;s!==null&&Ni(e,s,i,o,!1)}function La(n,e,t){if(T(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return $e(e)&&t.isAttached()}function Ia(n,e,t,r){for(let i=n;i&&!Kc(i);i=dn(i)){const o=or(i,e);if(o!==void 0){const s=Q(o,t);if(s)return R(s)||!ie(i)?void 0:[i,s]}else if(i===r)return[r,kl(t)]}}function ms(n,e,t){Fr=!0;const r=performance.now()-ui>100;try{Ee(n,()=>{const i=A()||(function(f){return f.getEditorState().read(()=>{const g=A();return g!==null?g.clone():null})})(n),o=new Map,s=n.getRootElement(),l=n._editorState,a=n._blockCursorElement;let c=!1,u="";for(let f=0;f<e.length;f++){const g=e[f],h=g.type,p=g.target,_=Ia(p,n,l,s);if(!_)continue;const[y,m]=_;if(h==="characterData")r&&O(m)&&$e(p)&&La(i,p,m)&&Fa(p,m,n);else if(h==="childList"){c=!0;const x=g.addedNodes;for(let b=0;b<x.length;b++){const w=x[b],S=bl(w),C=w.parentNode;if(C!=null&&w!==a&&S===null&&!mr(w,C,n)){if(je){const D=(ie(w)?w.innerText:null)||w.nodeValue;D&&(u+=D)}C.removeChild(w)}}const E=g.removedNodes,N=E.length;if(N>0){let b=0;for(let w=0;w<N;w++){const S=E[w];(mr(S,p,n)||a===S)&&(p.appendChild(S),b++)}N!==b&&o.set(y,m)}}}if(o.size>0)for(const[f,g]of o)g.reconcileObservedMutation(f,n);const d=t.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const g=d[f],h=g.addedNodes,p=g.target;for(let _=0;_<h.length;_++){const y=h[_],m=y.parentNode;m==null||y.nodeName!=="BR"||mr(y,p,n)||m.removeChild(y)}}t.takeRecords()}i!==null&&(c&&se(i),je&&Ol(n)&&i.insertRawText(u))})}finally{Fr=!1}}function ys(n){const e=n._observer;e!==null&&ms(n,e.takeRecords(),e)}function xs(n){(function(e){ui===0&&ge(e).addEventListener("textInput",Pa,!0)})(n),n._observer=new MutationObserver((e,t)=>{ms(n,e,t)})}let Ra=class{key;parse;unparse;isEqual;defaultValue;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Ba).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0)}};function _f(n,e){return new Ra(n,e)}function $a(n,e,t="latest"){const r=(t==="latest"?n.getLatest():n).__state;return r?r.getValue(e):e.defaultValue}function mf(n,e,t){let r;if(G(),typeof t=="function"){const o=n.getLatest(),s=$a(o,e);if(r=t(s),e.isEqual(s,r))return o}else r=t;const i=n.getWritable();return vs(i).updateFromKnown(e,r),i}function Ka(n){const e=new Map,t=new Set;for(let r=typeof n=="function"?n:n.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=lr(r);if(i&&i.stateConfigs)for(const o of i.stateConfigs){let s;"stateConfig"in o?(s=o.stateConfig,o.flat&&t.add(s.key)):s=o,e.set(s.key,s)}}return{flatKeys:t,sharedConfigMap:e}}class fi{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,r=void 0,i=new Map,o=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=i;const{sharedConfigMap:s}=this.sharedNodeState,l=o!==void 0?o:(function(a,c,u){let d=u.size;if(c)for(const f in c){const g=a.get(f);g&&u.has(g)||d++}return d})(s,r,i);this.size=l}getValue(e){const t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const i=this.unknownState[e.key];i!==void 0&&(r=e.parse(i)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return Ji(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:r}=this,i=new Map(this.knownState);return new fi(e,t,(function(o,s,l){let a;if(l)for(const[c,u]of Object.entries(l)){const d=o.get(c);d?s.has(d)||s.set(d,d.parse(u)):(a=a||{},a[c]=u)}return a})(t.sharedConfigMap,i,r),i,this.size)}updateFromKnown(e,t){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:i,unknownState:o}=this;i.has(e)||o&&r in o||(o&&(delete o[r],this.unknownState=Ji(o)),this.size++),i.set(e,t)}updateFromUnknown(e,t){const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){const{knownState:t}=this;for(const r of t.keys())t.set(r,r.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(const[r,i]of Object.entries(e))this.updateFromUnknown(r,i)}}function vs(n){const e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new fi(e,Ss(e));return e.__state=t,t}function Ss(n){return n.__state?n.__state.sharedNodeState:yl(sr(),n.getType()).sharedNodeState}function Ji(n){if(n)for(const e in n)return n}function Ba(n){return n}function Vi(n,e,t){for(const[r,i]of e.knownState){if(n.has(r.key))continue;n.add(r.key);const o=t?t.getValue(r):r.defaultValue;if(o!==i&&!r.isEqual(o,i))return!0}return!1}function Hi(n,e,t){const{unknownState:r}=e,i=t?t.unknownState:void 0;if(r){for(const[o,s]of Object.entries(r))if(!n.has(o)&&(n.add(o),s!==(i?i[o]:void 0)))return!0}return!1}function qi(n,e){const t=n.__state;return t&&t.node===n?t.getWritable(e):t}function Yi(n,e){const t=n.__mode,r=n.__format,i=n.__style,o=e.__mode,s=e.__format,l=e.__style,a=n.__state,c=e.__state;return(t===null||t===o)&&(r===null||r===s)&&(i===null||i===l)&&(n.__state===null||a===c||(function(u,d){if(u===d)return!0;if(u&&d&&u.size!==d.size)return!1;const f=new Set;return!(u&&Vi(f,u,d)||d&&Vi(f,d,u)||u&&Hi(f,u,d)||d&&Hi(f,d,u))})(a,c))}function Gi(n,e){const t=n.mergeWithSibling(e),r=U()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function Xi(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&O(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(Yi(e,r)){r=Gi(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&O(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(Yi(r,t)){r=Gi(r,t);break}break}t.remove()}}else r.remove()}function At(n){return Zi(n.anchor),Zi(n.focus),n}function Zi(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,i;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),i=!0):(r=e.getChildAtIndex(t),i=!1),O(r)){n.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!v(r))break;n.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let nt,oe,Zt,Qn,Lr,Ir,rt,me,Rr,Qt,H="",Ce=null,Ge=null,St=!1,Ln=!1;function In(n,e){const t=rt.get(n);if(e!==null){const r=zr(n);r.parentNode===e&&e.removeChild(r)}if(me.has(n)||oe._keyToDOMMap.delete(n),v(t)){const r=$n(t,rt);$r(r,0,r.length-1,null)}t!==void 0&&wi(Qt,Zt,Qn,t,"destroyed")}function $r(n,e,t,r){for(let i=e;i<=t;++i){const o=n[i];o!==void 0&&In(o,r)}}function qe(n,e){n.setProperty("text-align",e)}const za="40px";function Cs(n,e){const t=nt.theme.indent;if(typeof t=="string"){const i=n.classList.contains(t);e>0&&!i?n.classList.add(t):e<1&&i&&n.classList.remove(t)}const r=getComputedStyle(n).getPropertyValue("--lexical-indent-base-value")||za;n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function bs(n,e){const t=n.style;e===0?qe(t,""):e===1?qe(t,"left"):e===2?qe(t,"center"):e===3?qe(t,"right"):e===4?qe(t,"justify"):e===5?qe(t,"start"):e===6&&qe(t,"end")}function Kr(n,e){const t=(function(r){const i=r.__dir;if(i!==null)return i;if(ee(r))return null;const o=r.getParentOrThrow();return ee(o)&&o.__dir===null?"auto":null})(e);t!==null?n.dir=t:n.removeAttribute("dir")}function Rn(n,e){const t=me.get(n);t===void 0&&k(60);const r=t.createDOM(nt,oe);if((function(i,o,s){const l=s._keyToDOMMap;(function(a,c,u){const d=`__lexicalKey_${c._key}`;a[d]=u})(o,s,i),l.set(i,o)})(n,r,oe),O(t)?r.setAttribute("data-lexical-text","true"):R(t)&&r.setAttribute("data-lexical-decorator","true"),v(t)){const i=t.__indent,o=t.__size;if(Kr(r,t),i!==0&&Cs(r,i),o!==0){const l=o-1;Br($n(t,me),t,0,l,t.getDOMSlot(r))}const s=t.__format;s!==0&&bs(r,s),t.isInline()||Es(null,t,r)}else{const i=t.getTextContent();if(R(t)){const o=t.decorate(oe,nt);o!==null&&ks(n,o),r.contentEditable="false"}H+=i}return e!==null&&e.insertChild(r),wi(Qt,Zt,Qn,t,"created"),r}function Br(n,e,t,r,i){const o=H;H="";let s=t;for(;s<=r;++s){Rn(n[s],i);const l=me.get(n[s]);l!==null&&O(l)?Ce===null&&(Ce=l.getFormat(),Ge=l.getStyle()):v(l)&&s<r&&!l.isInline()&&(H+=Zn)}i.element.__lexicalTextContent=H,H=o+H}function Qi(n,e){if(n){const t=n.__last;if(t){const r=e.get(t);if(r)return Tt(r)?"line-break":R(r)&&r.isInline()?"decorator":null}return"empty"}return null}function Es(n,e,t){const r=Qi(n,rt),i=Qi(e,me);r!==i&&e.getDOMSlot(t).setManagedLineBreak(i)}function Wa(n,e,t){var r;Ce=null,Ge=null,(function(i,o,s){const l=H,a=i.__size,c=o.__size;H="";const u=s.element;if(a===1&&c===1){const d=i.__first,f=o.__first;if(d===f)wn(d,u);else{const h=zr(d),p=Rn(f,null);try{u.replaceChild(p,h)}catch(_){if(typeof _=="object"&&_!=null){const y=`${_.toString()} Parent: ${u.tagName}, new child: {tag: ${p.tagName} key: ${f}}, old child: {tag: ${h.tagName}, key: ${d}}.`;throw new Error(y)}throw _}In(d,null)}const g=me.get(f);O(g)&&Ce===null&&(Ce=g.getFormat(),Ge=g.getStyle())}else{const d=$n(i,rt),f=$n(o,me);if(d.length!==a&&k(227),f.length!==c&&k(228),a===0)c!==0&&Br(f,0,0,c-1,s);else if(c===0){if(a!==0){const g=s.after==null&&s.before==null&&s.element.__lexicalLineBreak==null;$r(d,0,a-1,g?null:u),g&&(u.textContent="")}}else(function(g,h,p,_,y,m){const x=_-1,E=y-1;let N,b,w=m.getFirstChild(),S=0,C=0;for(;S<=x&&C<=E;){const $=h[S],L=p[C];if($===L)w=yr(wn(L,m.element)),S++,C++;else{if(b===void 0&&(b=eo(p,C)),N===void 0)N=eo(h,S);else if(!N.has($)){S++;continue}if(!b.has($)){w=yr(zr($)),In($,m.element),S++,N.delete($);continue}if(N.has(L)){const J=ot(oe,L);J!==w&&m.withBefore(w).insertChild(J),w=yr(wn(L,m.element)),S++,C++}else Rn(L,m.withBefore(w)),C++}const K=me.get(L);K!==null&&O(K)?Ce===null&&(Ce=K.getFormat(),Ge=K.getStyle()):v(K)&&C<=E&&!K.isInline()&&(H+=Zn)}const D=S>x,F=C>E;if(D&&!F){const $=p[E+1],L=$===void 0?null:oe.getElementByKey($);Br(p,0,C,E,m.withBefore(L))}else F&&!D&&$r(h,S,x,m.element)})(0,d,f,a,c,s)}u.__lexicalTextContent=H,H=l+H})(n,e,e.getDOMSlot(t)),r=e,Ce==null||Ce===r.__textFormat||Ln||r.setTextFormat(Ce),(function(i){Ge==null||Ge===i.__textStyle||Ln||i.setTextStyle(Ge)})(e)}function $n(n,e){const t=[];let r=n.__first;for(;r!==null;){const i=e.get(r);i===void 0&&k(101),t.push(r),r=i.__next}return t}function wn(n,e){const t=rt.get(n);let r=me.get(n);t!==void 0&&r!==void 0||k(61);const i=St||Ir.has(n)||Lr.has(n),o=ot(oe,n);if(t===r&&!i){let s;if(v(t)){const l=o.__lexicalTextContent;typeof l=="string"?s=l:(s=t.getTextContent(),o.__lexicalTextContent=s)}else s=t.getTextContent();return H+=s,o}if(t!==r&&i&&wi(Qt,Zt,Qn,r,"updated"),r.updateDOM(t,o,nt)){const s=Rn(n,null);return e===null&&k(62),e.replaceChild(s,o),In(n,null),s}if(v(t)){v(r)||k(334,n);const s=r.__indent;(St||s!==t.__indent)&&Cs(o,s);const l=r.__format;if((St||l!==t.__format)&&bs(o,l),i)Wa(t,r,o),ee(r)||r.isInline()||Es(t,r,o);else{const a=o.__lexicalTextContent;let c;typeof a=="string"?c=a:(c=t.getTextContent(),o.__lexicalTextContent=c),H+=c}if((St||r.__dir!==t.__dir)&&(Kr(o,r),ee(r)&&!St))for(const a of r.getChildren())v(a)&&Kr(ot(oe,a.getKey()),a)}else{const s=r.getTextContent();if(R(r)){const l=r.decorate(oe,nt);l!==null&&ks(n,l)}H+=s}if(!Ln&&ee(r)&&r.__cachedText!==H){const s=r.getWritable();s.__cachedText=H,r=s}return o}function ks(n,e){let t=oe._pendingDecorators;const r=oe._decorators;if(t===null){if(r[n]===e)return;t=El(oe)}t[n]=e}function yr(n){let e=n.nextSibling;return e!==null&&e===oe._blockCursorElement&&(e=e.nextSibling),e}function eo(n,e){const t=new Set;for(let r=e;r<n.length;r++)t.add(n[r]);return t}function Ua(n,e,t,r,i,o){H="",St=r===2,oe=t,nt=t._config,Zt=t._nodes,Qn=oe._listeners.mutation,Lr=i,Ir=o,rt=n._nodeMap,me=e._nodeMap,Ln=e._readOnly,Rr=new Map(t._keyToDOMMap);const s=new Map;return Qt=s,wn("root",null),oe=void 0,Zt=void 0,Lr=void 0,Ir=void 0,rt=void 0,me=void 0,nt=void 0,Rr=void 0,Qt=void 0,s}function zr(n){const e=Rr.get(n);return e===void 0&&k(75,n),e}function P(n){return{type:n}}const Ns=P("SELECTION_CHANGE_COMMAND"),ja=P("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),ws=P("CLICK_COMMAND"),Ts=P("BEFORE_INPUT_COMMAND"),Os=P("INPUT_COMMAND"),Ms=P("COMPOSITION_START_COMMAND"),As=P("COMPOSITION_END_COMMAND"),Ze=P("DELETE_CHARACTER_COMMAND"),kt=P("INSERT_LINE_BREAK_COMMAND"),Kn=P("INSERT_PARAGRAPH_COMMAND"),Nt=P("CONTROLLED_TEXT_INSERTION_COMMAND"),er=P("PASTE_COMMAND"),Wr=P("REMOVE_TEXT_COMMAND"),en=P("DELETE_WORD_COMMAND"),tn=P("DELETE_LINE_COMMAND"),Be=P("FORMAT_TEXT_COMMAND"),Ds=P("UNDO_COMMAND"),Ps=P("REDO_COMMAND"),Fs=P("KEYDOWN_COMMAND"),Ls=P("KEY_ARROW_RIGHT_COMMAND"),Ja=P("MOVE_TO_END"),Is=P("KEY_ARROW_LEFT_COMMAND"),Va=P("MOVE_TO_START"),Rs=P("KEY_ARROW_UP_COMMAND"),$s=P("KEY_ARROW_DOWN_COMMAND"),Bn=P("KEY_ENTER_COMMAND"),Ks=P("KEY_SPACE_COMMAND"),Bs=P("KEY_BACKSPACE_COMMAND"),zs=P("KEY_ESCAPE_COMMAND"),Ws=P("KEY_DELETE_COMMAND"),Us=P("KEY_TAB_COMMAND"),Ha=P("INSERT_TAB_COMMAND"),qa=P("INDENT_CONTENT_COMMAND"),to=P("OUTDENT_CONTENT_COMMAND"),js=P("DROP_COMMAND"),Ya=P("FORMAT_ELEMENT_COMMAND"),Js=P("DRAGSTART_COMMAND"),Vs=P("DRAGOVER_COMMAND"),Ga=P("DRAGEND_COMMAND"),tr=P("COPY_COMMAND"),di=P("CUT_COMMAND"),Ur=P("SELECT_ALL_COMMAND"),yf=P("CLEAR_EDITOR_COMMAND"),xf=P("CLEAR_HISTORY_COMMAND"),vf=P("CAN_REDO_COMMAND"),Sf=P("CAN_UNDO_COMMAND"),Xa=P("FOCUS_COMMAND"),Za=P("BLUR_COMMAND"),Qa=P("KEY_MODIFIER_COMMAND"),Ae=Object.freeze({}),jr=[["keydown",function(n,e){nn=n.timeStamp,Hs=n.key,!e.isComposing()&&M(e,Fs,n)}],["pointerdown",function(n,e){const t=n.target,r=n.pointerType;Bt(t)&&r!=="touch"&&r!=="pen"&&n.button===0&&Ee(e,()=>{xl(t)||(Hr=!0)})}],["compositionstart",function(n,e){M(e,Ms,n)}],["compositionend",function(n,e){je?Jt=!0:Lt||!sn&&!ln?M(e,As,n):(qr=!0,Yr=n.data)}],["input",function(n,e){n.stopPropagation(),Ee(e,()=>{e.dispatchCommand(Os,n)},{event:n}),Ct=null}],["click",function(n,e){Ee(e,()=>{const t=A(),r=ve(ge(e)),i=ht();if(r){if(T(t)){const o=t.anchor,s=o.getNode();if(o.type==="element"&&o.offset===0&&t.isCollapsed()&&!ee(s)&&V().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&i!==null&&t.is(i))r.removeAllRanges(),t.dirty=!0;else if(n.detail===3&&!t.isCollapsed()&&s!==t.focus.getNode()){const l=ce(s,a=>v(a)&&!a.isInline());v(l)&&l.select(0)}}else if(n.pointerType==="touch"||n.pointerType==="pen"){const o=r.anchorNode;(ie(o)||$e(o))&&se(pi(i,r,e,n))}}M(e,ws,n)})}],["cut",Ae],["copy",Ae],["dragstart",Ae],["dragover",Ae],["dragend",Ae],["paste",Ae],["focus",Ae],["blur",Ae],["drop",Ae]];Fn&&jr.push(["beforeinput",(n,e)=>(function(t,r){const i=t.inputType;i==="deleteCompositionText"||je&&Ol(r)||i!=="insertCompositionText"&&M(r,Ts,t)})(n,e)]);let nn=0,Hs=null,qs=0,Ct=null;const Jr=new WeakMap,zn=new WeakMap;let Vr=!1,Hr=!1,Ht=!1,Jt=!1,qr=!1,Yr="",Xe=null,Ys=[0,"",0,"root",0];function Gs(n,e,t,r,i){const o=n.anchor,s=n.focus,l=o.getNode(),a=U(),c=ve(ge(a)),u=c!==null?c.anchorNode:null,d=o.key,f=a.getElementByKey(d),g=t.length;return d!==s.key||!O(l)||(!i&&(!Fn||qs<r+50)||l.isDirty()&&g<2||Nl(t))&&o.offset!==s.offset&&!l.isComposing()||Fe(l)||l.isDirty()&&g>1||(i||!Fn)&&f!==null&&!l.isComposing()&&u!==Pt(f)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||l.getFormat()!==n.format||l.getStyle()!==n.style||(function(h,p){if(p.isSegmented())return!0;if(!h.isCollapsed())return!1;const _=h.anchor.offset,y=p.getParentOrThrow(),m=Qe(p);return _===0?!p.canInsertTextBefore()||!y.canInsertTextBefore()&&!p.isComposing()||m||(function(x){const E=x.getPreviousSibling();return(O(E)||v(E)&&E.isInline())&&!E.canInsertTextAfter()})(p):_===p.getTextContentSize()&&(!p.canInsertTextAfter()||!y.canInsertTextAfter()&&!p.isComposing()||m)})(n,l)}function no(n,e){return $e(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function ro(n,e,t){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}=n;Vr&&(Vr=!1,no(r,i)&&no(o,s)&&!Xe)||Ee(e,()=>{if(!t)return void se(null);if(!fn(e,r,o))return;let l=A();if(Xe&&T(l)&&l.isCollapsed()){const a=l.anchor,c=Xe.anchor;(a.key===c.key&&a.offset===c.offset+1||a.offset===1&&c.getNode().is(a.getNode().getPreviousSibling()))&&(l=Xe.clone(),se(l))}if(Xe=null,T(l)){const a=l.anchor,c=a.getNode();if(l.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(l.dirty=!0);const u=ge(e).event,d=u?u.timeStamp:performance.now(),[f,g,h,p,_]=Ys,y=V(),m=e.isComposing()===!1&&y.getTextContent()==="";if(d<_+200&&a.offset===h&&a.key===p)Tn(l,f,g);else if(a.type==="text")O(c)||k(141),Xs(l,c);else if(a.type==="element"&&!m){v(c)||k(259);const x=a.getNode();x.isEmpty()?(function(E,N){const b=N.getTextFormat(),w=N.getTextStyle();Tn(E,b,w)})(l,x):Tn(l,0,"")}}else{const u=a.key,d=l.focus.key,f=l.getNodes(),g=f.length,h=l.isBackward(),p=h?s:i,_=h?i:s,y=h?d:u,m=h?u:d;let x=2047,E=!1;for(let N=0;N<g;N++){const b=f[N],w=b.getTextContentSize();if(O(b)&&w!==0&&!(N===0&&b.__key===y&&p===w||N===g-1&&b.__key===m&&_===0)&&(E=!0,x&=b.getFormat(),x===0))break}l.format=E?x:0}}M(e,Ns,void 0)})}function Tn(n,e,t){n.format===e&&n.style===t||(n.format=e,n.style=t,n.dirty=!0)}function Xs(n,e){Tn(n,e.getFormat(),e.getStyle())}function Zs(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function ec(n){const e=n.inputType,t=Zs(n),r=U(),i=A();if(e==="deleteContentBackward"){if(i===null){const d=ht();if(!T(d))return!0;se(d.clone())}if(T(i)){const d=i.anchor.key===i.focus.key;if(o=n.timeStamp,Hs==="MediaLast"&&o<nn+30&&r.isComposing()&&d){if(re(null),nn=0,setTimeout(()=>{Ee(r,()=>{re(null)})},30),T(i)){const f=i.anchor.getNode();f.markDirty(),O(f)||k(142),Xs(i,f)}}else{re(null),n.preventDefault();const f=i.anchor.getNode(),g=f.getTextContent(),h=f.canInsertTextAfter(),p=i.anchor.offset===0&&i.focus.offset===g.length;let _=Wi&&d&&!p&&h;if(_&&i.isCollapsed()&&(_=!R(ei(i.anchor,!0))),!_){M(r,Ze,!0);const y=A();Wi&&T(y)&&y.isCollapsed()&&(Xe=y,setTimeout(()=>Xe=null))}}return!0}}var o;if(!T(i))return!0;const s=n.data;Ct!==null&&ki(!1,r,Ct),i.dirty&&Ct===null||!i.isCollapsed()||ee(i.anchor.getNode())||t===null||i.applyDOMRange(t),Ct=null;const l=i.anchor,a=i.focus,c=l.getNode(),u=a.getNode();if(e==="insertText"||e==="insertTranspose"){if(s===`
|
|
4
|
-
`)n.preventDefault(),M(r,kt,!1);else if(s===Zn)n.preventDefault(),M(r,Kn,void 0);else if(s==null&&n.dataTransfer){const d=n.dataTransfer.getData("text/plain");n.preventDefault(),i.insertRawText(d)}else s!=null&&Gs(i,t,s,n.timeStamp,!0)?(n.preventDefault(),M(r,Nt,s)):Ct=s;return qs=n.timeStamp,!0}switch(n.preventDefault(),e){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":M(r,Nt,n);break;case"insertFromComposition":re(null),M(r,Nt,n);break;case"insertLineBreak":re(null),M(r,kt,!1);break;case"insertParagraph":re(null),Ht&&!Lt?(Ht=!1,M(r,kt,!1)):M(r,Kn,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":M(r,er,n);break;case"deleteByComposition":(function(d,f){return d!==f||v(d)||v(f)||!Qe(d)||!Qe(f)})(c,u)&&M(r,Wr,n);break;case"deleteByDrag":case"deleteByCut":M(r,Wr,n);break;case"deleteContent":M(r,Ze,!1);break;case"deleteWordBackward":M(r,en,!0);break;case"deleteWordForward":M(r,en,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":M(r,tn,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":M(r,tn,!1);break;case"formatStrikeThrough":M(r,Be,"strikethrough");break;case"formatBold":M(r,Be,"bold");break;case"formatItalic":M(r,Be,"italic");break;case"formatUnderline":M(r,Be,"underline");break;case"historyUndo":M(r,Ds,void 0);break;case"historyRedo":M(r,Ps,void 0)}return!0}function tc(n){if(ie(n.target)&&xl(n.target))return!0;const e=U(),t=A(),r=n.data,i=Zs(n);if(r!=null&&T(t)&&Gs(t,i,r,n.timeStamp,!1)){Jt&&(Wn(e,r),Jt=!1);const o=t.anchor.getNode(),s=ve(ge(e));if(s===null)return!0;const l=t.isBackward(),a=l?t.anchor.offset:t.focus.offset,c=l?t.focus.offset:t.anchor.offset;Fn&&!t.isCollapsed()&&O(o)&&s.anchorNode!==null&&o.getTextContent().slice(0,a)+r+o.getTextContent().slice(a+c)===Tl(s.anchorNode)||M(e,Nt,r);const u=r.length;je&&u>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=u),sn||Lt||ln||!e.isComposing()||(nn=0,re(null))}else ki(!1,e,r!==null?r:void 0),Jt&&(Wn(e,r||void 0),Jt=!1);return(function(){G();const o=U();ys(o)})(),!0}function nc(n){const e=U(),t=A();if(T(t)&&!e.isComposing()){const r=t.anchor,i=t.anchor.getNode();re(r.key),(n.timeStamp<nn+30||r.type==="element"||!t.isCollapsed()||i.getFormat()!==t.format||O(i)&&i.getStyle()!==t.style)&&M(e,Nt,Ta)}return!0}function rc(n){return Wn(U(),n.data),!0}function Wn(n,e){const t=n._compositionKey;if(re(null),t!==null&&e!=null){if(e===""){const r=Q(t),i=Pt(n.getElementByKey(t));return void(i!==null&&i.nodeValue!==null&&O(r)&&Ni(r,i.nodeValue,null,null,!0))}if(e[e.length-1]===`
|
|
5
|
-
`){const r=A();if(T(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void M(n,Bn,null)}}}ki(!0,n,e)}function ic(n){const e=U();if(n.key==null)return!0;if(qr&&Ao(n))return Ee(e,()=>{Wn(e,Yr)}),qr=!1,Yr="",!0;if((function(t){return W(t,"ArrowRight",{shiftKey:"any"})})(n))M(e,Ls,n);else if((function(t){return W(t,"ArrowRight",Pe)})(n))M(e,Ja,n);else if((function(t){return W(t,"ArrowLeft",{shiftKey:"any"})})(n))M(e,Is,n);else if((function(t){return W(t,"ArrowLeft",Pe)})(n))M(e,Va,n);else if((function(t){return W(t,"ArrowUp",{altKey:"any",shiftKey:"any"})})(n))M(e,Rs,n);else if((function(t){return W(t,"ArrowDown",{altKey:"any",shiftKey:"any"})})(n))M(e,$s,n);else if((function(t){return W(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(n))Ht=!0,M(e,Bn,n);else if((function(t){return t.key===" "})(n))M(e,Ks,n);else if((function(t){return pe&&W(t,"o",{ctrlKey:!0})})(n))n.preventDefault(),Ht=!0,M(e,kt,!0);else if((function(t){return W(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(n))Ht=!1,M(e,Bn,n);else if((function(t){return W(t,"Backspace",{shiftKey:"any"})||pe&&W(t,"h",{ctrlKey:!0})})(n))Ao(n)?M(e,Bs,n):(n.preventDefault(),M(e,Ze,!0));else if((function(t){return t.key==="Escape"})(n))M(e,zs,n);else if((function(t){return W(t,"Delete",{})||pe&&W(t,"d",{ctrlKey:!0})})(n))(function(t){return t.key==="Delete"})(n)?M(e,Ws,n):(n.preventDefault(),M(e,Ze,!1));else if((function(t){return W(t,"Backspace",Mo)})(n))n.preventDefault(),M(e,en,!0);else if((function(t){return W(t,"Delete",Mo)})(n))n.preventDefault(),M(e,en,!1);else if((function(t){return pe&&W(t,"Backspace",{metaKey:!0})})(n))n.preventDefault(),M(e,tn,!0);else if((function(t){return pe&&(W(t,"Delete",{metaKey:!0})||W(t,"k",{ctrlKey:!0}))})(n))n.preventDefault(),M(e,tn,!1);else if((function(t){return W(t,"b",Pe)})(n))n.preventDefault(),M(e,Be,"bold");else if((function(t){return W(t,"u",Pe)})(n))n.preventDefault(),M(e,Be,"underline");else if((function(t){return W(t,"i",Pe)})(n))n.preventDefault(),M(e,Be,"italic");else if((function(t){return W(t,"Tab",{shiftKey:"any"})})(n))M(e,Us,n);else if((function(t){return W(t,"z",Pe)})(n))n.preventDefault(),M(e,Ds,void 0);else if((function(t){return pe?W(t,"z",{metaKey:!0,shiftKey:!0}):W(t,"y",{ctrlKey:!0})||W(t,"z",{ctrlKey:!0,shiftKey:!0})})(n))n.preventDefault(),M(e,Ps,void 0);else{const t=e._editorState._selection;t===null||T(t)?Do(n)&&(n.preventDefault(),M(e,Ur,n)):(function(r){return W(r,"c",Pe)})(n)?(n.preventDefault(),M(e,tr,n)):(function(r){return W(r,"x",Pe)})(n)?(n.preventDefault(),M(e,di,n)):Do(n)&&(n.preventDefault(),M(e,Ur,n))}return(function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey})(n)&&e.dispatchCommand(Qa,n),!0}function Qs(n){let e=n.__lexicalEventHandles;return e===void 0&&(e=[],n.__lexicalEventHandles=e),e}const wt=new Map;function el(n){const e=Ic(n.target);if(e===null)return;const t=vl(e.anchorNode);if(t===null)return;Hr&&(Hr=!1,Ee(t,()=>{const a=ht(),c=e.anchorNode;(ie(c)||$e(c))&&se(pi(a,e,t,n))}));const r=Ei(t),i=r[r.length-1],o=i._key,s=wt.get(o),l=s||i;l!==t&&ro(e,l,!1),ro(e,t,!0),t!==i?wt.set(o,t):s&&wt.delete(o)}function io(n){n._lexicalHandled=!0}function oo(n){return n._lexicalHandled===!0}function oc(n){const e=Jr.get(n);if(e===void 0)return;const t=zn.get(e);if(t===void 0)return;const r=t-1;r>=0||k(164),Jr.delete(n),zn.set(e,r),r===0&&e.removeEventListener("selectionchange",el);const i=ir(n);bi(i)?((function(s){if(s._parentEditor!==null){const l=Ei(s),a=l[l.length-1]._key;wt.get(a)===s&&wt.delete(a)}else wt.delete(s._key)})(i),n.__lexicalEditor=null):i&&k(198);const o=Qs(n);for(let s=0;s<o.length;s++)o[s]();n.__lexicalEventHandles=[]}function Gr(n,e,t){G();const r=n.__key,i=n.getParent();if(i===null)return;const o=(function(l){const a=A();if(!T(a)||!v(l))return a;const{anchor:c,focus:u}=a,d=c.getNode(),f=u.getNode();return ti(d,l)&&c.set(l.__key,0,"element"),ti(f,l)&&u.set(l.__key,0,"element"),a})(n);let s=!1;if(T(o)&&e){const l=o.anchor,a=o.focus;l.key===r&&(Jn(l,n,i,n.getPreviousSibling(),n.getNextSibling()),s=!0),a.key===r&&(Jn(a,n,i,n.getPreviousSibling(),n.getNextSibling()),s=!0)}else ae(o)&&e&&n.isSelected()&&n.selectPrevious();if(T(o)&&e&&!s){const l=n.getIndexWithinParent();et(n),jn(o,i,l,-1)}else et(n);t||Te(i)||i.canBeEmpty()||!i.isEmpty()||Gr(i,e),e&&o&&ee(i)&&i.isEmpty()&&i.selectEnd()}function Cf(n){return n}const tl=Symbol.for("ephemeral");function Un(n){return n[tl]||!1}class be{__type;__key;__parent;__prev;__next;__state;static getType(){const{ownNodeType:e}=lr(this);return e===void 0&&k(64,this.name),e}static clone(e){k(65,this.name)}$config(){return{}}config(e,t){const r=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:r,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),Cl(this,e)}getType(){return this.__type}isInline(){k(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=Q(e);if(t===null)break;e=t.__parent}return!1}isSelected(e){const t=e||A();if(t==null)return!1;const r=t.getNodes().some(i=>i.__key===this.__key);if(O(this))return r;if(T(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const i=this.getParent();if(R(this)&&this.isInline()&&i){const o=t.isBackward()?t.focus:t.anchor;if(i.is(o.getNode())&&o.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),r=0;for(;t!==null;){if(this.is(t))return r;r++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:Q(e)}getParentOrThrow(){const e=this.getParent();return e===null&&k(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(Te(t))return v(e)||e===this&&R(e)||k(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&k(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:Q(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(t===null)return e;let r=t.getFirstChild();for(;r!==null&&!r.is(this);)e.push(r),r=r.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:Q(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=v(this)?this:this.getParent(),r=v(e)?e:e.getParent(),i=t&&r?Mn(t,r):null;return i?i.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const t=Mn(this,e);return t!==null&&(t.type==="descendant"||(t.type==="branch"?Ll(t)===-1:(t.type!=="same"&&t.type!=="ancestor"&&k(279),!1)))}isParentOf(e){const t=Mn(this,e);return t!==null&&t.type==="ancestor"}getNodesBetween(e){const t=this.isBefore(e),r=[],i=new Set;let o=this;for(;o!==null;){const s=o.__key;if(i.has(s)||(i.add(s),r.push(o)),o===e)break;const l=v(o)?t?o.getFirstChild():o.getLastChild():null;if(l!==null){o=l;continue}const a=t?o.getNextSibling():o.getPreviousSibling();if(a!==null){o=a;continue}const c=o.getParentOrThrow();if(i.has(c.__key)||r.push(c),c===e)break;let u=null,d=c;do{if(d===null&&k(68),u=t?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;u!==null||i.has(d.__key)||r.push(d)}while(u===null);o=u}return t||r.reverse(),r}isDirty(){const e=U()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(Un(this))return this;const e=Q(this.__key);return e===null&&k(113),e}getWritable(){if(Un(this))return this;G();const e=Re(),t=U(),r=e._nodeMap,i=this.__key,o=this.getLatest(),s=t._cloneNotNeeded,l=A();if(l!==null&&l.setCachedNodes(null),s.has(i))return Hn(o),o;const a=Dl(o);return s.add(i),Hn(a),r.set(i,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){k(70)}updateDOM(e,t,r){k(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){k(18,this.name)}updateFromJSON(e){return(function(t,r){const i=t.getWritable(),o=r.$;let s=o;for(const l of Ss(i).flatKeys)l in r&&(s!==void 0&&s!==o||(s={...o}),s[l]=r[l]);return(i.__state||s)&&vs(t).updateFromJSON(s),i})(this,e)}static transform(){return null}remove(e){Gr(this,!0,e)}replace(e,t){G();let r=A();r!==null&&(r=r.clone()),Er(this,e);const i=this.getLatest(),o=this.__key,s=e.__key,l=e.getWritable(),a=this.getParentOrThrow().getWritable(),c=a.__size;et(l);const u=i.getPreviousSibling(),d=i.getNextSibling(),f=i.__prev,g=i.__next,h=i.__parent;if(Gr(i,!1,!0),u===null?a.__first=s:u.getWritable().__next=s,l.__prev=f,d===null?a.__last=s:d.getWritable().__prev=s,l.__next=g,l.__parent=h,a.__size=c,t&&(v(this)&&v(l)||k(139),this.getChildren().forEach(p=>{l.append(p)})),T(r)){se(r);const p=r.anchor,_=r.focus;p.key===o&&uo(p,l),_.key===o&&uo(_,l)}return ze()===o&&re(s),l}insertAfter(e,t=!0){G(),Er(this,e);const r=this.getWritable(),i=e.getWritable(),o=i.getParent(),s=A();let l=!1,a=!1;if(o!==null){const g=e.getIndexWithinParent();if(et(i),T(s)){const h=o.__key,p=s.anchor,_=s.focus;l=p.type==="element"&&p.key===h&&p.offset===g+1,a=_.type==="element"&&_.key===h&&_.offset===g+1}}const c=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),d=i.__key,f=r.__next;if(c===null?u.__last=d:c.getWritable().__prev=d,u.__size++,r.__next=d,i.__next=f,i.__prev=r.__key,i.__parent=r.__parent,t&&T(s)){const g=this.getIndexWithinParent();jn(s,u,g+1);const h=u.__key;l&&s.anchor.set(h,g+2,"element"),a&&s.focus.set(h,g+2,"element")}return e}insertBefore(e,t=!0){G(),Er(this,e);const r=this.getWritable(),i=e.getWritable(),o=i.__key;et(i);const s=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=r.__prev,c=this.getIndexWithinParent();s===null?l.__first=o:s.getWritable().__next=o,l.__size++,r.__prev=o,i.__prev=a,i.__next=r.__key,i.__parent=r.__parent;const u=A();return t&&T(u)&&jn(u,this.getParentOrThrow(),c),e}isParentRequired(){return!1}createParentElementNode(){return te()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){G();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(v(r))return r.select();if(!O(r)){const o=r.getIndexWithinParent()+1;return i.select(o,o)}return r.select(e,t)}selectNext(e,t){G();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(v(r))return r.select(0,0);if(!O(r)){const o=r.getIndexWithinParent();return i.select(o,o)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}const bf="historic",Ef="history-push",qt="history-merge",sc="paste",lc="collaboration",kf="skip-collab",ac="skip-scroll-into-view",cc="skip-dom-selection",so="skip-selection-focus";class It extends be{static getType(){return"linebreak"}static clone(e){return new It(e.__key)}constructor(e){super(e)}getTextContent(){return`
|
|
6
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(t){const r=t.parentElement;if(r!==null&&qn(r)){const i=r.firstChild;if(i===t||i.nextSibling===t&&yn(i)){const o=r.lastChild;if(o===t||o.previousSibling===t&&yn(o))return!0}}return!1})(e)||(function(t){const r=t.parentElement;if(r!==null&&qn(r)){const i=r.firstChild;if(i===t||i.nextSibling===t&&yn(i))return!1;const o=r.lastChild;if(o===t||o.previousSibling===t&&yn(o))return!0}return!1})(e)?null:{conversion:uc,priority:0}}}static importJSON(e){return it().updateFromJSON(e)}}function uc(n){return{node:it()}}function it(){return He(new It)}function Tt(n){return n instanceof It}function yn(n){return $e(n)&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}function xr(n,e){return 16&e?"code":e&ps?"mark":32&e?"sub":64&e?"sup":null}function vr(n,e){return 1&e?"strong":2&e?"em":"span"}function nl(n,e,t,r,i){const o=r.classList;let s=Ot(i,"base");s!==void 0&&o.add(...s),s=Ot(i,"underlineStrikethrough");let l=!1;const a=8&e&&4&e;s!==void 0&&(8&t&&4&t?(l=!0,a||o.add(...s)):a&&o.remove(...s));for(const c in tt){const u=tt[c];if(s=Ot(i,c),s!==void 0)if(t&u){if(l&&(c==="underline"||c==="strikethrough")){e&u&&o.remove(...s);continue}((e&u)===0||a&&c==="underline"||c==="strikethrough")&&o.add(...s)}else e&u&&o.remove(...s)}}function rl(n,e,t){const r=e.firstChild,i=t.isComposing(),o=n+(i?Xn:"");if(r==null)e.textContent=o;else{const s=r.nodeValue;if(s!==o)if(i||je){const[l,a,c]=(function(u,d){const f=u.length,g=d.length;let h=0,p=0;for(;h<f&&h<g&&u[h]===d[h];)h++;for(;p+h<f&&p+h<g&&u[f-p-1]===d[g-p-1];)p++;return[h,f-h-p,d.slice(h,g-p)]})(s,o);a!==0&&r.deleteData(l,a),r.insertData(l,c)}else r.nodeValue=o}}function lo(n,e,t,r,i,o){rl(i,n,e);const s=o.theme.text;s!==void 0&&nl(0,0,r,n,s)}function xn(n,e){const t=document.createElement(e);return t.appendChild(n),t}class ft extends be{__text;__format;__style;__mode;__detail;static getType(){return"text"}static clone(e){return new ft(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return Da[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ze()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=tt[e];return(this.getFormat()&t)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Vn(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){const r=this.__format,i=xr(0,r),o=vr(0,r),s=i===null?o:i,l=document.createElement(s);let a=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),i!==null&&(a=document.createElement(o),l.appendChild(a)),lo(a,this,0,r,this.__text,e);const c=this.__style;return c!==""&&(l.style.cssText=c),l}updateDOM(e,t,r){const i=this.__text,o=e.__format,s=this.__format,l=xr(0,o),a=xr(0,s),c=vr(0,o),u=vr(0,s);if((l===null?c:l)!==(a===null?u:a))return!0;if(l===a&&c!==u){const p=t.firstChild;p==null&&k(48);const _=document.createElement(u);return lo(_,this,0,s,i,r),t.replaceChild(_,p),!1}let d=t;a!==null&&l!==null&&(d=t.firstChild,d==null&&k(49)),rl(i,d,this);const f=r.theme.text;f!==void 0&&o!==s&&nl(0,o,s,d,f);const g=e.__style,h=this.__style;return g!==h&&(t.style.cssText=h),!1}static importDOM(){return{"#text":()=>({conversion:gc,priority:0}),b:()=>({conversion:dc,priority:0}),code:()=>({conversion:De,priority:0}),em:()=>({conversion:De,priority:0}),i:()=>({conversion:De,priority:0}),mark:()=>({conversion:De,priority:0}),s:()=>({conversion:De,priority:0}),span:()=>({conversion:fc,priority:0}),strong:()=>({conversion:De,priority:0}),sub:()=>({conversion:De,priority:0}),sup:()=>({conversion:De,priority:0}),u:()=>({conversion:De,priority:0})}}static importJSON(e){return ne().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return ie(t)||k(132),t.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?t.style.textTransform="lowercase":this.hasFormat("uppercase")?t.style.textTransform="uppercase":this.hasFormat("capitalize")&&(t.style.textTransform="capitalize"),this.hasFormat("bold")&&(t=xn(t,"b")),this.hasFormat("italic")&&(t=xn(t,"i")),this.hasFormat("strikethrough")&&(t=xn(t,"s")),this.hasFormat("underline")&&(t=xn(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format=typeof e=="string"?tt[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail=typeof e=="string"?Oa[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=Vn(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=Aa[e];if(this.__mode===t)return this;const r=this.getWritable();return r.__mode=t,r}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){G();let r=e,i=t;const o=A(),s=this.getTextContent(),l=this.__key;if(typeof s=="string"){const a=s.length;r===void 0&&(r=a),i===void 0&&(i=a)}else r=0,i=0;if(!T(o))return ll(l,r,l,i,"text","text");{const a=ze();a!==o.anchor.key&&a!==o.focus.key||re(l),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,r,i){const o=this.getWritable(),s=o.__text,l=r.length;let a=e;a<0&&(a=l+a,a<0&&(a=0));const c=A();if(i&&T(c)){const d=e+l;c.setTextNodeRange(o,d,o,d)}const u=s.slice(0,a)+r+s.slice(a+t);return o.__text=u,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){G();const t=this.getLatest(),r=t.getTextContent();if(r==="")return[];const i=t.__key,o=ze(),s=r.length;e.sort((S,C)=>S-C),e.push(s);const l=[],a=e.length;for(let S=0,C=0;S<s&&C<=a;C++){const D=e[C];D>S&&(l.push(r.slice(S,D)),S=D)}const c=l.length;if(c===1)return[t];const u=l[0],d=t.getParent();let f;const g=t.getFormat(),h=t.getStyle(),p=t.__detail;let _=!1,y=null,m=null;const x=A();if(T(x)){const[S,C]=x.isBackward()?[x.focus,x.anchor]:[x.anchor,x.focus];S.type==="text"&&S.key===i&&(y=S),C.type==="text"&&C.key===i&&(m=C)}t.isSegmented()?(f=ne(u),f.__format=g,f.__style=h,f.__detail=p,f.__state=qi(t,f),_=!0):f=t.setTextContent(u);const E=[f];for(let S=1;S<c;S++){const C=ne(l[S]);C.__format=g,C.__style=h,C.__detail=p,C.__state=qi(t,C);const D=C.__key;o===i&&re(D),E.push(C)}const N=y?y.offset:null,b=m?m.offset:null;let w=0;for(const S of E){if(!y&&!m)break;const C=w+S.getTextContentSize();if(y!==null&&N!==null&&N<=C&&N>=w&&(y.set(S.getKey(),N-w,"text"),N<C&&(y=null)),m!==null&&b!==null&&b<=C&&b>=w){m.set(S.getKey(),b-w,"text");break}w=C}if(d!==null){(function(D){const F=D.getPreviousSibling(),$=D.getNextSibling();F!==null&&Hn(F),$!==null&&Hn($)})(this);const S=d.getWritable(),C=this.getIndexWithinParent();_?(S.splice(C,0,E),this.remove()):S.splice(C,1,E),T(x)&&jn(x,d,C,c-1)}return E}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||k(50);const r=this.__key,i=e.__key,o=this.__text,s=o.length;ze()===i&&re(r);const l=A();if(T(l)){const d=l.anchor,f=l.focus;d!==null&&d.key===i&&yo(d,t,r,e,s),f!==null&&f.key===i&&yo(f,t,r,e,s)}const a=e.__text,c=t?a+o:o+a;this.setTextContent(c);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function fc(n){return{forChild:hi(n.style),node:null}}function dc(n){const e=n,t=e.style.fontWeight==="normal";return{forChild:hi(e.style,t?void 0:"bold"),node:null}}const ao=new WeakMap;function hc(n){if(!ie(n))return!1;if(n.nodeName==="PRE")return!0;const e=n.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function gc(n){const e=n;n.parentElement===null&&k(129);let t=e.textContent||"";if((function(r){let i,o=r.parentNode;const s=[r];for(;o!==null&&(i=ao.get(o))===void 0&&!hc(o);)s.push(o),o=o.parentNode;const l=i===void 0?o:i;for(let a=0;a<s.length;a++)ao.set(s[a],l);return l})(e)!==null){const r=t.split(/(\r?\n|\t)/),i=[],o=r.length;for(let s=0;s<o;s++){const l=r[s];l===`
|
|
7
|
-
`||l===`\r
|
|
8
|
-
`?i.push(it()):l===" "?i.push(an()):l!==""&&i.push(ne(l))}return{node:i}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){let r=e,i=!0;for(;r!==null&&(r=co(r,!1))!==null;){const o=r.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(t=t.slice(1)),i=!1;break}}i&&(t=t.slice(1))}if(t[t.length-1]===" "){let r=e,i=!0;for(;r!==null&&(r=co(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:ne(t)}}function co(n,e){let t=n;for(;;){let r;for(;(r=e?t.nextSibling:t.previousSibling)===null;){const o=t.parentElement;if(o===null)return null;t=o}if(t=r,ie(t)){const o=t.style.display;if(o===""&&!ii(t)||o!==""&&!o.startsWith("inline"))return null}let i=t;for(;(i=e?t.firstChild:t.lastChild)!==null;)t=i;if($e(t))return t;if(t.nodeName==="BR")return null}}const pc={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function De(n){const e=pc[n.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:hi(n.style,e),node:null}}function ne(n=""){return He(new ft(n))}function O(n){return n instanceof ft}function hi(n,e){const t=n.fontWeight,r=n.textDecoration.split(" "),i=t==="700"||t==="bold",o=r.includes("line-through"),s=n.fontStyle==="italic",l=r.includes("underline"),a=n.verticalAlign;return c=>(O(c)&&(i&&!c.hasFormat("bold")&&c.toggleFormat("bold"),o&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),s&&!c.hasFormat("italic")&&c.toggleFormat("italic"),l&&!c.hasFormat("underline")&&c.toggleFormat("underline"),a!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),a!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),e&&!c.hasFormat(e)&&c.toggleFormat(e)),c)}class Rt extends ft{static getType(){return"tab"}static clone(e){return new Rt(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),r=Ot(e.theme,"tab");return r!==void 0&&t.classList.add(...r),t}static importJSON(e){return an().updateFromJSON(e)}setTextContent(e){return e!==" "&&e!==""&&hs(126),super.setTextContent(" ")}spliceText(e,t,r,i){return r===""&&t===0||r===" "&&t===1||k(286),this}setDetail(e){return e!==2&&k(127),this}setMode(e){return e!=="normal"&&k(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function an(){return He(new Rt)}function il(n){return n instanceof Rt}class _c{key;offset;type;_selection;constructor(e,t,r){this._selection=null,this.key=e,this.offset=t,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:Fl(_e(Oe(this,"next")),_e(Oe(e,"next")))<0}getNode(){const e=Q(this.key);return e===null&&k(20),e}set(e,t,r,i){const o=this._selection,s=this.key;i&&this.key===e&&this.offset===t&&this.type===r||(this.key=e,this.offset=t,this.type=r,cn()||(ze()===s&&re(e),o!==null&&(o.setCachedNodes(null),o.dirty=!0)))}}function we(n,e,t){return new _c(n,e,t)}function Sr(n,e){let t=e.__key,r=n.offset,i="element";if(O(e)){i="text";const o=e.getTextContentSize();r>o&&(r=o)}else if(!v(e)){const o=e.getNextSibling();if(O(o))t=o.__key,r=0,i="text";else{const s=e.getParent();s&&(t=s.__key,r=e.getIndexWithinParent()+1)}}n.set(t,r,i)}function uo(n,e){if(v(e)){const t=e.getLastDescendant();v(t)||O(t)?Sr(n,t):Sr(n,e)}else Sr(n,e)}class nr{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!ae(e))return!1;const t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new nr(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),r=t.length,i=t[r-1];let o;if(O(i))o=i.select();else{const s=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(s,s)}o.insertNodes(e);for(let s=0;s<r;s++)t[s].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=this._nodes,r=[];for(const i of t){const o=Q(i);o!==null&&r.push(o)}return cn()||(this._cachedNodes=r),r}getTextContent(){const e=this.getNodes();let t="";for(let r=0;r<e.length;r++)t+=e[r].getTextContent();return t}deleteNodes(){const e=this.getNodes();if((A()||ht())===this&&e[0]){const t=Y(e[0],"next");Il(Je(t,t))}for(const t of e)t.remove()}}function T(n){return n instanceof dt}class dt{format;style;anchor;focus;_cachedNodes;dirty;constructor(e,t,r,i){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!T(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=(function(r){const i=[],[o,s]=r.getTextSlices();o&&i.push(o.caret.origin);const l=new Set,a=new Set;for(const c of r)if(he(c)){const{origin:u}=c;i.length===0?l.add(u):(a.add(u),i.push(u))}else{const{origin:u}=c;v(u)&&a.has(u)||i.push(u)}if(s&&i.push(s.caret.origin),at(r.focus)&&v(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let c=ye(r.focus.origin,"previous");he(c)&&l.has(c.origin)&&!c.origin.isEmpty()&&c.origin.is(i[i.length-1]);c=ar(c))l.delete(c.origin),i.pop();for(;i.length>1;){const c=i[i.length-1];if(!v(c)||a.has(c)||c.isEmpty()||l.has(c))break;i.pop()}if(i.length===0&&r.isCollapsed()){const c=_e(r.anchor),u=_e(r.anchor.getFlipped()),d=g=>ke(g)?g.origin:g.getNodeAtCaret(),f=d(c)||d(u)||(r.anchor.getNodeAtCaret()?c.origin:u.origin);i.push(f)}return i})($l(Ro(this),"next"));return cn()||(this._cachedNodes=t),t}setTextNodeRange(e,t,r,i){this.anchor.set(e.__key,t,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const t=e[0],r=e[e.length-1],i=this.anchor,o=this.focus,s=i.isBefore(o),[l,a]=Xr(this);let c="",u=!0;for(let d=0;d<e.length;d++){const f=e[d];if(v(f)&&!f.isInline())u||(c+=`
|
|
9
|
-
`),u=!f.isEmpty();else if(u=!1,O(f)){let g=f.getTextContent();f===t?f===r?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(g=l<a?g.slice(l,a):g.slice(a,l)):g=s?g.slice(l):g.slice(a):f===r&&(g=s?g.slice(0,a):g.slice(0,l)),c+=g}else!R(f)&&!Tt(f)||f===r&&this.isCollapsed()||(c+=f.getTextContent())}return c}applyDOMRange(e){const t=U(),r=t.getEditorState()._selection,i=sl(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,r);if(i===null)return;const[o,s]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(s.key,s.offset,s.type,!0),At(this)}clone(){const e=this.anchor,t=this.focus;return new dt(we(e.key,e.offset,e.type),we(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Vn(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=tt[e];return(this.format&t)!==0}insertRawText(e){const t=e.split(/(\r?\n|\t)/),r=[],i=t.length;for(let o=0;o<i;o++){const s=t[o];s===`
|
|
10
|
-
`||s===`\r
|
|
11
|
-
`?r.push(it()):s===" "?r.push(an()):r.push(ne(s))}this.insertNodes(r)}insertText(e){const t=this.anchor,r=this.focus,i=this.format,o=this.style;let s=t,l=r;!this.isCollapsed()&&r.isBefore(t)&&(s=r,l=t),s.type==="element"&&(function(_,y,m,x){const E=_.getNode(),N=E.getChildAtIndex(_.offset),b=ne();if(b.setFormat(m),b.setStyle(x),pl(N))N.splice(0,0,[b]);else{const w=ee(E)?te().append(b):b;N===null?E.append(w):N.insertBefore(w)}_.is(y)&&y.set(b.__key,0,"text"),_.set(b.__key,0,"text")})(s,l,i,o),l.type==="element"&&on(l,_e(Oe(l,"next")));const a=s.offset;let c=l.offset;const u=this.getNodes(),d=u.length;let f=u[0];O(f)||k(26);const g=f.getTextContent().length,h=f.getParentOrThrow();let p=u[d-1];if(d===1&&l.type==="element"&&(c=g,l.set(s.key,c,"text")),this.isCollapsed()&&a===g&&(Fe(f)||!f.canInsertTextAfter()||!h.canInsertTextAfter()&&f.getNextSibling()===null)){let _=f.getNextSibling();if(O(_)&&_.canInsertTextBefore()&&!Fe(_)||(_=ne(),_.setFormat(i),_.setStyle(o),h.canInsertTextAfter()?f.insertAfter(_):h.insertAfter(_)),_.select(0,0),f=_,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&a===0&&(Fe(f)||!f.canInsertTextBefore()||!h.canInsertTextBefore()&&f.getPreviousSibling()===null)){let _=f.getPreviousSibling();if(O(_)&&!Fe(_)||(_=ne(),_.setFormat(i),h.canInsertTextBefore()?f.insertBefore(_):h.insertBefore(_)),_.select(),f=_,e!=="")return void this.insertText(e)}else if(f.isSegmented()&&a!==g){const _=ne(f.getTextContent());_.setFormat(i),f.replace(_),f=_}else if(!this.isCollapsed()&&e!==""){const _=p.getParent();if(!h.canInsertTextBefore()||!h.canInsertTextAfter()||v(_)&&(!_.canInsertTextBefore()||!_.canInsertTextAfter()))return this.insertText(""),ol(this.anchor,this.focus,null),void this.insertText(e)}if(d===1){if(Qe(f)){const x=ne(e);return x.select(),void f.replace(x)}const _=f.getFormat(),y=f.getStyle();if(a!==c||_===i&&y===o){if(il(f)){const x=ne(e);return x.setFormat(i),x.setStyle(o),x.select(),void f.replace(x)}}else{if(f.getTextContent()!==""){const x=ne(e);if(x.setFormat(i),x.setStyle(o),x.select(),a===0)f.insertBefore(x,!1);else{const[E]=f.splitText(a);E.insertAfter(x,!1)}return void(x.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}f.setFormat(i),f.setStyle(o)}const m=c-a;f=f.spliceText(a,m,e,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(f.isComposing()?this.anchor.offset-=e.length:(this.format=_,this.style=y))}else{const _=new Set([...f.getParentKeys(),...p.getParentKeys()]),y=v(f)?f:f.getParentOrThrow();let m=v(p)?p:p.getParentOrThrow(),x=p;if(!y.is(m)&&m.isInline())do x=m,m=m.getParentOrThrow();while(m.isInline());if(l.type==="text"&&(c!==0||p.getTextContent()==="")||l.type==="element"&&p.getIndexWithinParent()<c)if(O(p)&&!Qe(p)&&c!==p.getTextContentSize()){if(p.isSegmented()){const S=ne(p.getTextContent());p.replace(S),p=S}ee(l.getNode())||l.type!=="text"||(p=p.spliceText(0,c,"")),_.add(p.__key)}else{const S=p.getParentOrThrow();S.canBeEmpty()||S.getChildrenSize()!==1?p.remove():S.remove()}else _.add(p.__key);const E=m.getChildren(),N=new Set(u),b=y.is(m),w=y.isInline()&&f.getNextSibling()===null?y:f;for(let S=E.length-1;S>=0;S--){const C=E[S];if(C.is(f)||v(C)&&C.isParentOf(f))break;C.isAttached()&&(!N.has(C)||C.is(x)?b||w.insertAfter(C,!1):C.remove())}if(!b){let S=m,C=null;for(;S!==null;){const D=S.getChildren(),F=D.length;(F===0||D[F-1].is(C))&&(_.delete(S.__key),C=S),S=S.getParent()}}if(Qe(f))if(a===g)f.select();else{const S=ne(e);S.select(),f.replace(S)}else f=f.spliceText(a,g-a,e,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(f.isComposing()?this.anchor.offset-=e.length:(this.format=f.getFormat(),this.style=f.getStyle()));for(let S=1;S<d;S++){const C=u[S],D=C.__key;_.has(D)||C.remove()}}}removeText(){const e=A()===this;An(this,qc(Ro(this))),e&&A()!==this&&se(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void re(null);const r=this.getNodes(),i=[];for(const E of r)O(E)&&i.push(E);const o=E=>{r.forEach(N=>{if(v(N)){const b=N.getFormatFlags(e,E);N.setTextFormat(b)}})},s=i.length;if(s===0)return this.toggleFormat(e),re(null),void o(t);const l=this.anchor,a=this.focus,c=this.isBackward(),u=c?a:l,d=c?l:a;let f=0,g=i[0],h=u.type==="element"?0:u.offset;if(u.type==="text"&&h===g.getTextContentSize()&&(f=1,g=i[1],h=0),g==null)return;const p=g.getFormatFlags(e,t);o(p);const _=s-1;let y=i[_];const m=d.type==="text"?d.offset:y.getTextContentSize();if(g.is(y)){if(h===m)return;if(Fe(g)||h===0&&m===g.getTextContentSize())g.setFormat(p);else{const E=g.splitText(h,m),N=h===0?E[0]:E[1];N.setFormat(p),u.type==="text"&&u.set(N.__key,0,"text"),d.type==="text"&&d.set(N.__key,m-h,"text")}return void(this.format=p)}h===0||Fe(g)||([,g]=g.splitText(h),h=0),g.setFormat(p);const x=y.getFormatFlags(e,p);m>0&&(m===y.getTextContentSize()||Fe(y)||([y]=y.splitText(m)),y.setFormat(x));for(let E=f+1;E<_;E++){const N=i[E],b=N.getFormatFlags(e,x);N.setFormat(b)}u.type==="text"&&u.set(g.__key,h,"text"),d.type==="text"&&d.set(y.__key,m,"text"),this.format=p|x}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const h=A();return T(h)||k(134),h.insertNodes(e)}const t=(this.isBackward()?this.focus:this.anchor).getNode(),r=ce(t,de),i=e[e.length-1];if(v(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const h=Cr(this);r.splice(h,0,e),i.selectEnd()}return}if(!e.some(h=>(v(h)||R(h))&&!h.isInline())){v(r)||k(211,t.constructor.name,t.getType());const h=Cr(this);return r.splice(h,0,e),void i.selectEnd()}const o=(function(h){const p=te();let _=null;for(let y=0;y<h.length;y++){const m=h[y],x=Tt(m);if(x||R(m)&&m.isInline()||v(m)&&m.isInline()||O(m)||m.isParentRequired()){if(_===null&&(_=m.createParentElementNode(),p.append(_),x))continue;_!==null&&_.append(m)}else p.append(m),_=null}return p})(e),s=o.getLastDescendant(),l=o.getChildren(),a=!v(r)||!r.isEmpty()?this.insertParagraph():null,c=l[l.length-1];let u=l[0];var d;v(d=u)&&de(d)&&!d.isEmpty()&&v(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(v(r)||k(211,t.constructor.name,t.getType()),r.append(...u.getChildren()),u=l[1]),u&&(r===null&&k(212,t.constructor.name,t.getType()),(function(h,p){const _=p.getParentOrThrow().getLastChild();let y=p;const m=[p];for(;y!==_;)y.getNextSibling()||k(140),y=y.getNextSibling(),m.push(y);let x=h;for(const E of m)x=x.insertAfter(E)})(r,u));const f=ce(s,de);a&&v(f)&&(a.canMergeWhenEmpty()||de(c))&&(f.append(...a.getChildren()),a.remove()),v(r)&&r.isEmpty()&&r.remove(),s.selectEnd();const g=v(r)?r.getLastChild():null;Tt(g)&&f!==r&&g.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=te();return V().splice(this.anchor.offset,0,[s]),s.select(),s}const e=Cr(this),t=ce(this.anchor.getNode(),de);v(t)||k(213);const r=t.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...i),o.selectStart(),o):null}insertLineBreak(e){const t=it();if(this.insertNodes([t]),e){const r=t.getParentOrThrow(),i=t.getIndexWithinParent();r.select(i,i)}}extract(){const e=[...this.getNodes()],t=e.length;let r=e[0],i=e[t-1];const[o,s]=Xr(this),l=this.isBackward(),[a,c]=l?[this.focus,this.anchor]:[this.anchor,this.focus],[u,d]=l?[s,o]:[o,s];if(t===0)return[];if(t===1){if(O(r)&&!this.isCollapsed()){const f=r.splitText(u,d),g=u===0?f[0]:f[1];return g?(a.set(g.getKey(),0,"text"),c.set(g.getKey(),g.getTextContentSize(),"text"),[g]):[]}return[r]}if(O(r)&&(u===r.getTextContentSize()?e.shift():u!==0&&([,r]=r.splitText(u),e[0]=r,a.set(r.getKey(),0,"text"))),O(i)){const f=i.getTextContent().length;d===0?e.pop():d!==f&&([i]=i.splitText(d),e[e.length-1]=i,c.set(i.getKey(),i.getTextContentSize(),"text"))}return e}modify(e,t,r){if(xo(this,e,t,r))return;const i=e==="move",o=U(),s=ve(ge(o));if(!s)return;const l=o._blockCursorElement,a=o._rootElement,c=this.focus.getNode();if(a===null||l===null||!v(c)||c.isInline()||c.canBeEmpty()||ni(l,o,a),this.dirty){let u=ot(o,this.anchor.key),d=ot(o,this.focus.key);this.anchor.type==="text"&&(u=Pt(u)),this.focus.type==="text"&&(d=Pt(d)),u&&d&&cl(s,u,this.anchor.offset,d,this.focus.offset)}if((function(u,d,f,g){u.modify(d,f,g)})(s,e,t?"backward":"forward",r),s.rangeCount>0){const u=s.getRangeAt(0),d=this.anchor.getNode(),f=ee(d)?d:Pc(d);if(this.applyDOMRange(u),this.dirty=!0,!i){const g=this.getNodes(),h=[];let p=!1;for(let _=0;_<g.length;_++){const y=g[_];ti(y,f)?h.push(y):p=!0}if(p&&h.length>0)if(t){const _=h[0];v(_)?_.selectStart():_.getParentOrThrow().selectStart()}else{const _=h[h.length-1];v(_)?_.selectEnd():_.getParentOrThrow().selectEnd()}s.anchorNode===u.startContainer&&s.anchorOffset===u.startOffset||(function(_){const y=_.focus,m=_.anchor,x=m.key,E=m.offset,N=m.type;m.set(y.key,y.offset,y.type,!0),y.set(x,E,N,!0)})(this)}}r==="lineboundary"&&xo(this,e,t,r,"decorators")}forwardDeletion(e,t,r){if(!r&&(e.type==="element"&&v(t)&&e.offset===t.getChildrenSize()||e.type==="text"&&e.offset===t.getTextContentSize())){const i=t.getParent(),o=t.getNextSibling()||(i===null?null:i.getNextSibling());if(v(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,e))return;const o=Pi(Oe(r,e?"previous":"next"));if(o.getTextSlices().every(l=>l===null||l.distance===0)){let l={type:"initial"};for(const a of o.iterNodeCarets("shadowRoot"))if(he(a)){if(!a.origin.isInline()){if(a.origin.isShadowRoot()){if(l.type==="merge-block")break;if(v(o.anchor.origin)&&o.anchor.origin.isEmpty()){const c=_e(a);An(this,Je(c,c)),o.anchor.origin.remove()}return}l.type!=="merge-next-block"&&l.type!=="merge-block"||(l={block:l.block,caret:a,type:"merge-block"})}}else{if(l.type==="merge-block")break;if(at(a)){if(v(a.origin)){if(a.origin.isInline()){if(!a.origin.isParentOf(o.anchor.origin))break}else l={block:a.origin,type:"merge-next-block"};continue}if(R(a.origin)){if(!a.origin.isIsolated())if(l.type==="merge-next-block"&&(a.origin.isKeyboardSelectable()||!a.origin.isInline())&&v(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const c=al();c.add(a.origin.getKey()),se(c)}else a.origin.remove();return}break}}if(l.type==="merge-block"){const{caret:a,block:c}=l;return An(this,Je(!a.origin.isEmpty()&&c.isEmpty()?hn(Y(c,a.direction)):o.anchor,a)),this.removeText()}}const s=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&ho(this,r.getNode()))return}else{const l=s.type==="text"?s.getNode():null;if(i=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){const a=s.offset,c=l.getTextContentSize();if(l.is(i)||e&&a!==c||!e&&a!==0)return void go(l,e,a)}else if(i!==null&&i.isSegmented()){const a=r.offset,c=i.getTextContentSize();if(i.is(l)||e&&a!==0||!e&&a!==c)return void go(i,e,a)}(function(a,c){const u=a.anchor,d=a.focus,f=u.getNode(),g=d.getNode();if(f===g&&u.type==="text"&&d.type==="text"){const h=u.offset,p=d.offset,_=h<p,y=_?h:p,m=_?p:h,x=m-1;y!==x&&(function(E){return!(Nl(E)||mc(E))})(f.getTextContent().slice(y,m))&&(c?d.set(d.key,x,d.type):u.set(u.key,x,u.type))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&ee(r.getParent())&&r.getPreviousSibling()===null&&ho(this,r)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,r=t.getNode();if(this.forwardDeletion(t,r,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function ae(n){return n instanceof nr}function fo(n){const e=n.offset;if(n.type==="text")return e;const t=n.getNode();return e===t.getChildrenSize()?t.getTextContent().length:0}function Xr(n){const e=n.getStartEndPoints();if(e===null)return[0,0];const[t,r]=e;return t.type==="element"&&r.type==="element"&&t.key===r.key&&t.offset===r.offset?[0,0]:[fo(t),fo(r)]}function ho(n,e){for(let t=e;t;t=t.getParent()){if(v(t)){if(t.collapseAtStart(n))return!0;if(Te(t))break}if(t.getPreviousSibling())break}return!1}const mc=(()=>{try{const n=new RegExp("\\p{Emoji}","u"),e=n.test.bind(n);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function go(n,e,t){const r=n,i=r.getTextContent().split(/(?=\s)/g),o=i.length;let s=0,l=0;for(let c=0;c<o;c++){const u=c===o-1;if(l=s,s+=i[c].length,e&&s===t||s>t||u){i.splice(c,1),u&&(l=void 0);break}}const a=i.join("").trim();a===""?r.remove():(r.setTextContent(a),r.select(l,l))}function po(n,e,t,r){let i,o=e;if(ie(n)){let s=!1;const l=n.childNodes,a=l.length,c=r._blockCursorElement;o===a&&(s=!0,o=a-1);let u=l[o],d=!1;if(u===c)u=l[o+1],d=!0;else if(c!==null){const f=c.parentNode;n===f&&e>Array.prototype.indexOf.call(f.children,c)&&o--}if(i=Et(u),O(i))o=Ne(i,s?"next":"previous");else{let f=Et(n);if(f===null)return null;if(v(f)){const g=r.getElementByKey(f.getKey());g===null&&k(214),[f,o]=f.getDOMSlot(g).resolveChildIndex(f,g,n,e),v(f)||k(215),s&&o>=f.getChildrenSize()&&(o=Math.max(0,f.getChildrenSize()-1));let p=f.getChildAtIndex(o);if(v(p)&&(function(_,y,m){const x=_.getParent();return m===null||x===null||!x.canBeEmpty()||x!==m.getNode()})(p,0,t)){const _=s?p.getLastDescendant():p.getFirstDescendant();_===null?f=p:(p=_,f=v(p)?p:p.getParentOrThrow()),o=0}O(p)?(i=p,f=null,o=Ne(p,s?"next":"previous")):p!==f&&s&&!d&&(v(f)||k(216),o=Math.min(f.getChildrenSize(),o+1))}else{const g=f.getIndexWithinParent();o=e===0&&R(f)&&Et(n)===f?g:g+1,f=f.getParentOrThrow()}if(v(f))return we(f.__key,o,"element")}}else i=Et(n);return O(i)?we(i.__key,Ne(i,o,"clamp"),"text"):null}function _o(n,e,t){const r=n.offset,i=n.getNode();if(r===0){const o=i.getPreviousSibling(),s=i.getParent();if(e){if((t||!e)&&o===null&&v(s)&&s.isInline()){const l=s.getPreviousSibling();O(l)&&n.set(l.__key,l.getTextContent().length,"text")}}else v(o)&&!t&&o.isInline()?n.set(o.__key,o.getChildrenSize(),"element"):O(o)&&n.set(o.__key,o.getTextContent().length,"text")}else if(r===i.getTextContent().length){const o=i.getNextSibling(),s=i.getParent();if(e&&v(o)&&o.isInline())n.set(o.__key,0,"element");else if((t||e)&&o===null&&v(s)&&s.isInline()&&!s.canInsertTextAfter()){const l=s.getNextSibling();O(l)&&n.set(l.__key,0,"text")}}}function ol(n,e,t){if(n.type==="text"&&e.type==="text"){const r=n.isBefore(e),i=n.is(e);_o(n,r,i),_o(e,!r,i),i&&e.set(n.key,n.offset,n.type);const o=U();if(o.isComposing()&&o._compositionKey!==n.key&&T(t)){const s=t.anchor,l=t.focus;n.set(s.key,s.offset,s.type,!0),e.set(l.key,l.offset,l.type,!0)}}}function sl(n,e,t,r,i,o){if(n===null||t===null||!fn(i,n,t))return null;const s=po(n,e,T(o)?o.anchor:null,i);if(s===null)return null;const l=po(t,r,T(o)?o.focus:null,i);if(l===null)return null;if(s.type==="element"&&l.type==="element"){const a=Et(n),c=Et(t);if(R(a)&&R(c))return null}return ol(s,l,o),[s,l]}function Zr(n){return v(n)&&!n.isInline()}function ll(n,e,t,r,i,o){const s=Re(),l=new dt(we(n,e,i),we(t,r,o),0,"");return l.dirty=!0,s._selection=l,l}function gi(){const n=we("root",0,"element"),e=we("root",0,"element");return new dt(n,e,0,"")}function al(){return new nr(new Set)}function pi(n,e,t,r){const i=t._window;if(i===null)return null;const o=r||i.event,s=o?o.type:void 0,l=s==="selectionchange",a=!Fr&&(l||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let c,u,d,f;if(T(n)&&!a)return n.clone();if(e===null)return null;if(c=e.anchorNode,u=e.focusNode,d=e.anchorOffset,f=e.focusOffset,(l||s===void 0)&&T(n)&&!fn(t,c,u))return n.clone();const g=sl(c,d,u,f,t,n);if(g===null)return null;const[h,p]=g;return new dt(h,p,T(n)?n.format:0,T(n)?n.style:"")}function A(){return Re()._selection}function ht(){return U()._editorState._selection}function jn(n,e,t,r=1){const i=n.anchor,o=n.focus,s=i.getNode(),l=o.getNode();if(!e.is(s)&&!e.is(l))return;const a=e.__key;if(n.isCollapsed()){const c=i.offset;if(t<=c&&r>0||t<c&&r<0){const u=Math.max(0,c+r);i.set(a,u,"element"),o.set(a,u,"element"),mo(n)}}else{const c=n.isBackward(),u=c?o:i,d=u.getNode(),f=c?i:o,g=f.getNode();if(e.is(d)){const h=u.offset;(t<=h&&r>0||t<h&&r<0)&&u.set(a,Math.max(0,h+r),"element")}if(e.is(g)){const h=f.offset;(t<=h&&r>0||t<h&&r<0)&&f.set(a,Math.max(0,h+r),"element")}}mo(n)}function mo(n){const e=n.anchor,t=e.offset,r=n.focus,i=r.offset,o=e.getNode(),s=r.getNode();if(n.isCollapsed()){if(!v(o))return;const l=o.getChildrenSize(),a=t>=l,c=a?o.getChildAtIndex(l-1):o.getChildAtIndex(t);if(O(c)){let u=0;a&&(u=c.getTextContentSize()),e.set(c.__key,u,"text"),r.set(c.__key,u,"text")}return}if(v(o)){const l=o.getChildrenSize(),a=t>=l,c=a?o.getChildAtIndex(l-1):o.getChildAtIndex(t);if(O(c)){let u=0;a&&(u=c.getTextContentSize()),e.set(c.__key,u,"text")}}if(v(s)){const l=s.getChildrenSize(),a=i>=l,c=a?s.getChildAtIndex(l-1):s.getChildAtIndex(i);if(O(c)){let u=0;a&&(u=c.getTextContentSize()),r.set(c.__key,u,"text")}}}function Jn(n,e,t,r,i){let o=null,s=0,l=null;r!==null?(o=r.__key,O(r)?(s=r.getTextContentSize(),l="text"):v(r)&&(s=r.getChildrenSize(),l="element")):i!==null&&(o=i.__key,O(i)?l="text":v(i)&&(l="element")),o!==null&&l!==null?n.set(o,s,l):(s=e.getIndexWithinParent(),s===-1&&(s=t.getChildrenSize()),n.set(t.__key,s,"element"))}function yo(n,e,t,r,i){n.type==="text"?n.set(t,n.offset+(e?0:i),"text"):n.offset>r.getIndexWithinParent()&&n.set(n.key,n.offset-1,"element")}function cl(n,e,t,r,i){try{n.setBaseAndExtent(e,t,r,i)}catch{}}function yc(n,e,t,r,i,o,s){const l=r.anchorNode,a=r.focusNode,c=r.anchorOffset,u=r.focusOffset,d=document.activeElement;if(i.has(lc)&&d!==o||d!==null&&Ci(d))return;if(!T(e))return void(n!==null&&fn(t,l,a)&&r.removeAllRanges());const f=e.anchor,g=e.focus,h=f.key,p=g.key,_=ot(t,h),y=ot(t,p),m=f.offset,x=g.offset,E=e.format,N=e.style,b=e.isCollapsed();let w=_,S=y,C=!1;if(f.type==="text"){w=Pt(_);const J=f.getNode();C=J.getFormat()!==E||J.getStyle()!==N}else T(n)&&n.anchor.type==="text"&&(C=!0);var D,F,$,L,K;if(g.type==="text"&&(S=Pt(y)),w!==null&&S!==null&&(b&&(n===null||C||T(n)&&(n.format!==E||n.style!==N))&&(D=E,F=N,$=m,L=h,K=performance.now(),Ys=[D,F,$,L,K]),c!==m||u!==x||l!==w||a!==S||r.type==="Range"&&b||(d!==null&&o.contains(d)||i.has(so)||o.focus({preventScroll:!0}),f.type==="element"))){if(cl(r,w,m,S,x),!je||!e.isCollapsed()||o===null||i.has(so)||document.activeElement!==null&&o.contains(document.activeElement)||o.focus({preventScroll:!0}),!i.has(ac)&&e.isCollapsed()&&o!==null&&o===document.activeElement){const J=T(e)&&e.anchor.type==="element"?w.childNodes[m]||null:r.rangeCount>0?r.getRangeAt(0):null;if(J!==null){let ue;if(J instanceof Text){const Se=document.createRange();Se.selectNode(J),ue=Se.getBoundingClientRect()}else ue=J.getBoundingClientRect();(function(Se,_t,Me){const zt=Ml(Me),$i=Ti(zt);if(zt===null||$i===null)return;let{top:gr,bottom:pr}=_t,pn=0,_n=0,Ke=Me;for(;Ke!==null;){const _r=Ke===zt.body;if(_r)pn=0,_n=ge(Se).innerHeight;else{const mn=Ke.getBoundingClientRect();pn=mn.top,_n=mn.bottom}let Wt=0;if(gr<pn?Wt=-(pn-gr):pr>_n&&(Wt=pr-_n),Wt!==0)if(_r)$i.scrollBy(0,Wt);else{const mn=Ke.scrollTop;Ke.scrollTop+=Wt;const Ki=Ke.scrollTop-mn;gr-=Ki,pr-=Ki}if(_r)break;Ke=dn(Ke)}})(t,ue,o)}}Vr=!0}}function xc(n){let e=A()||ht();e===null&&(e=V().selectEnd()),e.insertNodes(n)}function Cr(n){let e=n;n.isCollapsed()||e.removeText();const t=A();T(t)&&(e=t),T(e)||k(161);const r=e.anchor;let i=r.getNode(),o=r.offset;for(;!de(i);){const s=i;if([i,o]=vc(i,o),s.is(i))break}return o}function vc(n,e){const t=n.getParent();if(!t){const i=te();return V().append(i),i.select(),[V(),0]}if(O(n)){const i=n.splitText(e);if(i.length===0)return[t,n.getIndexWithinParent()];const o=e===0?0:1;return[t,i[0].getIndexWithinParent()+o]}if(!v(n)||e===0)return[t,n.getIndexWithinParent()];const r=n.getChildAtIndex(e);if(r){const i=new dt(we(n.__key,e,"element"),we(n.__key,e,"element"),0,""),o=n.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[t,n.getIndexWithinParent()+1]}function xo(n,e,t,r,i="decorators-and-blocks"){if(e==="move"&&r==="character"&&!n.isCollapsed()){const[u,d]=t===n.isBackward()?[n.focus,n.anchor]:[n.anchor,n.focus];return d.set(u.key,u.offset,u.type),!0}const o=Oe(n.focus,t?"previous":"next"),s=r==="lineboundary",l=e==="move";let a=o,c=i==="decorators-and-blocks";if(!Rl(a)){for(const u of a){c=!1;const{origin:d}=u;if(!R(d)||d.isIsolated()||(a=u,!s||!d.isInline()))break}if(c)for(const u of Pi(o).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(he(u))u.origin.isInline()||(a=u);else{if(v(u.origin))continue;R(u.origin)&&!u.origin.isInline()&&(a=u)}break}}if(a===o)return!1;if(l&&!s&&R(a.origin)&&a.origin.isKeyboardSelectable()){const u=al();return u.add(a.origin.getKey()),se(u),!0}return a=_e(a),l&&on(n.anchor,a),on(n.focus,a),c||!s}let X=null,Z=null,fe=!1,br=!1,On=0;const vo={characterData:!0,childList:!0,subtree:!0};function cn(){return fe||X!==null&&X._readOnly}function G(){fe&&k(13)}function ul(){On>99&&k(14)}function Re(){return X===null&&k(195,fl()),X}function U(){return Z===null&&k(196,fl()),Z}function fl(){let n=0;const e=new Set,t=Dt.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=ir(i);if(bi(o))n++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===t&&(s+=" (separately built, likely a bundler configuration issue)"),e.add(s)}}let r=` Detected on the page: ${n} compatible editor(s) with version ${t}`;return e.size&&(r+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),r}function Sc(){return Z}function So(n,e,t){const r=e.__type,i=yl(n,r);let o=t.get(r);o===void 0&&(o=Array.from(i.transforms),t.set(r,o));const s=o.length;for(let l=0;l<s&&(o[l](e),e.isAttached());l++);}function Co(n,e){return n!==void 0&&n.__key!==e&&n.isAttached()}function dl(n,e){if(!e)return;const t=n._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const i of r)t.add(i)}function Cc(n){return _i(n,U()._nodes)}function _i(n,e){const t=n.type,r=e.get(t);r===void 0&&k(17,t);const i=r.klass;n.type!==i.getType()&&k(18,i.name);const o=i.importJSON(n),s=n.children;if(v(o)&&Array.isArray(s))for(let l=0;l<s.length;l++){const a=_i(s[l],e);o.append(a)}return o}function bo(n,e,t){const r=X,i=fe,o=Z;X=e,fe=!0,Z=n;try{return t()}finally{X=r,fe=i,Z=o}}function Le(n,e){const t=n._pendingEditorState,r=n._rootElement,i=n._headless||r===null;if(t===null)return;const o=n._editorState,s=o._selection,l=t._selection,a=n._dirtyType!==0,c=X,u=fe,d=Z,f=n._updating,g=n._observer;let h=null;if(n._pendingEditorState=null,n._editorState=t,!i&&a&&g!==null){Z=n,X=t,fe=!1,n._updating=!0;try{const b=n._dirtyType,w=n._dirtyElements,S=n._dirtyLeaves;g.disconnect(),h=Ua(o,t,n,b,w,S)}catch(b){if(b instanceof Error&&n._onError(b),br)throw b;return _l(n,null,r,t),xs(n),n._dirtyType=2,br=!0,Le(n,o),void(br=!1)}finally{g.observe(r,vo),n._updating=f,X=c,fe=u,Z=d}}t._readOnly||(t._readOnly=!0);const p=n._dirtyLeaves,_=n._dirtyElements,y=n._normalizedNodes,m=n._updateTags,x=n._deferred;a&&(n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set,n._updateTags=new Set),(function(b,w){const S=b._decorators;let C=b._pendingDecorators||S;const D=w._nodeMap;let F;for(F in C)D.has(F)||(C===S&&(C=El(b)),delete C[F])})(n,t);const E=i?null:ve(ge(n));if(n._editable&&E!==null&&(a||l===null||l.dirty||!l.is(s))&&r!==null&&!m.has(cc)){Z=n,X=t;try{if(g!==null&&g.disconnect(),a||l===null||l.dirty){const b=n._blockCursorElement;b!==null&&ni(b,n,r),yc(s,l,n,E,m,r)}(function(b,w,S){let C=b._blockCursorElement;if(T(S)&&S.isCollapsed()&&S.anchor.type==="element"&&w.contains(document.activeElement)){const D=S.anchor,F=D.getNode(),$=D.offset;let L=!1,K=null;if($===F.getChildrenSize())kr(F.getChildAtIndex($-1))&&(L=!0);else{const J=F.getChildAtIndex($);if(J!==null&&kr(J)){const ue=J.getPreviousSibling();(ue===null||kr(ue))&&(L=!0,K=b.getElementByKey(J.__key))}}if(L){const J=b.getElementByKey(F.__key);return C===null&&(b._blockCursorElement=C=(function(ue){const Se=ue.theme,_t=document.createElement("div");_t.contentEditable="false",_t.setAttribute("data-lexical-cursor","true");let Me=Se.blockCursor;if(Me!==void 0){if(typeof Me=="string"){const zt=cr(Me);Me=Se.blockCursor=zt}Me!==void 0&&_t.classList.add(...Me)}return _t})(b._config)),w.style.caretColor="transparent",void(K===null?J.appendChild(C):J.insertBefore(C,K))}}C!==null&&ni(C,b,w)})(n,r,l)}finally{g!==null&&g.observe(r,vo),Z=d,X=c}}h!==null&&(function(b,w,S,C,D){const F=Array.from(b._listeners.mutation),$=F.length;for(let L=0;L<$;L++){const[K,J]=F[L];for(const ue of J){const Se=w.get(ue);Se!==void 0&&K(Se,{dirtyLeaves:C,prevEditorState:D,updateTags:S})}}})(n,h,m,p,o),T(l)||l===null||s!==null&&s.is(l)||n.dispatchCommand(Ns,void 0);const N=n._pendingDecorators;N!==null&&(n._decorators=N,n._pendingDecorators=null,Yt("decorator",n,!0,N)),(function(b,w,S){const C=To(w),D=To(S);C!==D&&Yt("textcontent",b,!0,D)})(n,e||o,t),Yt("update",n,!0,{dirtyElements:_,dirtyLeaves:p,editorState:t,mutatedNodes:h,normalizedNodes:y,prevEditorState:e||o,tags:m}),(function(b,w){if(b._deferred=[],w.length!==0){const S=b._updating;b._updating=!0;try{for(let C=0;C<w.length;C++)w[C]()}finally{b._updating=S}}})(n,x),(function(b){const w=b._updates;if(w.length!==0){const S=w.shift();if(S){const[C,D]=S;rr(b,C,D)}}})(n)}function Yt(n,e,t,...r){const i=e._updating;e._updating=t;try{const o=Array.from(e._listeners[n]);for(let s=0;s<o.length;s++)o[s].apply(null,r)}finally{e._updating=i}}function Eo(n,e){const t=n._updates;let r=e||!1;for(;t.length!==0;){const i=t.shift();if(i){const[o,s]=i,l=n._pendingEditorState;let a;s!==void 0&&(a=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete&&(l===null&&k(191),l._flushSync=!0),a&&n._deferred.push(a),dl(n,s.tag)),l==null?rr(n,o,s):o()}}return r}function rr(n,e,t){const r=n._updateTags;let i,o=!1,s=!1;t!==void 0&&(i=t.onUpdate,dl(n,t.tag),o=t.skipTransforms||!1,s=t.discrete||!1),i&&n._deferred.push(i);const l=n._editorState;let a=n._pendingEditorState,c=!1;(a===null||a._readOnly)&&(a=n._pendingEditorState=hl(a||l),c=!0),a._flushSync=s;const u=X,d=fe,f=Z,g=n._updating;X=a,fe=!1,n._updating=!0,Z=n;const h=n._headless||n.getRootElement()===null;vi(null);try{c&&(h?l._selection!==null&&(a._selection=l._selection.clone()):a._selection=(function(m,x){const E=m.getEditorState()._selection,N=ve(ge(m));return T(E)||E==null?pi(E,N,m,x):E.clone()})(n,t&&t.event||null));const _=n._compositionKey;e(),o=Eo(n,o),(function(m,x){const E=x.getEditorState()._selection,N=m._selection;if(T(N)){const b=N.anchor,w=N.focus;let S;if(b.type==="text"&&(S=b.getNode(),S.selectionTransform(E,N)),w.type==="text"){const C=w.getNode();S!==C&&C.selectionTransform(E,N)}}})(a,n),n._dirtyType!==0&&(o?(function(m,x){const E=x._dirtyLeaves,N=m._nodeMap;for(const b of E){const w=N.get(b);O(w)&&w.isAttached()&&w.isSimpleText()&&!w.isUnmergeable()&&Xi(w)}})(a,n):(function(m,x){const E=x._dirtyLeaves,N=x._dirtyElements,b=m._nodeMap,w=ze(),S=new Map;let C=E,D=C.size,F=N,$=F.size;for(;D>0||$>0;){if(D>0){x._dirtyLeaves=new Set;for(const L of C){const K=b.get(L);O(K)&&K.isAttached()&&K.isSimpleText()&&!K.isUnmergeable()&&Xi(K),K!==void 0&&Co(K,w)&&So(x,K,S),E.add(L)}if(C=x._dirtyLeaves,D=C.size,D>0){On++;continue}}x._dirtyLeaves=new Set,x._dirtyElements=new Map,F.delete("root")&&F.set("root",!0);for(const L of F){const K=L[0],J=L[1];if(N.set(K,J),!J)continue;const ue=b.get(K);ue!==void 0&&Co(ue,w)&&So(x,ue,S)}C=x._dirtyLeaves,D=C.size,F=x._dirtyElements,$=F.size,On++}x._dirtyLeaves=E,x._dirtyElements=N})(a,n),Eo(n),(function(m,x,E,N){const b=m._nodeMap,w=x._nodeMap,S=[];for(const[C]of N){const D=w.get(C);D!==void 0&&(D.isAttached()||(v(D)&&_s(D,C,b,w,S,N),b.has(C)||N.delete(C),S.push(C)))}for(const C of S)w.delete(C);for(const C of E){const D=w.get(C);D===void 0||D.isAttached()||(b.has(C)||E.delete(C),w.delete(C))}})(l,a,n._dirtyLeaves,n._dirtyElements)),_!==n._compositionKey&&(a._flushSync=!0);const y=a._selection;if(T(y)){const m=a._nodeMap,x=y.anchor.key,E=y.focus.key;m.get(x)!==void 0&&m.get(E)!==void 0||k(19)}else ae(y)&&y._nodes.size===0&&(a._selection=null)}catch(_){return _ instanceof Error&&n._onError(_),n._pendingEditorState=l,n._dirtyType=2,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),void Le(n)}finally{X=u,fe=d,Z=f,n._updating=g,On=0}n._dirtyType!==0||n._deferred.length>0||(function(_,y){const m=y.getEditorState()._selection,x=_._selection;if(x!==null){if(x.dirty||!x.is(m))return!0}else if(m!==null)return!0;return!1})(a,n)?a._flushSync?(a._flushSync=!1,Le(n)):c&&Tc(()=>{Le(n)}):(a._flushSync=!1,c&&(r.clear(),n._deferred=[],n._pendingEditorState=null))}function Ee(n,e,t){Z===n&&t===void 0?e():rr(n,e,t)}class Gt{element;before;after;constructor(e,t,r){this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new Gt(this.element,e,this.after)}withAfter(e){return new Gt(this.element,this.before,e)}withElement(e){return this.element===e?this:new Gt(e,this.before,this.after)}insertChild(e){const t=this.before||this.getManagedLineBreak();return t!==null&&t.parentElement!==this.element&&k(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&k(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&k(224),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{const t=e==="decorator"&&(ln||Lt||sn);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&t.removeChild(r),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===(t.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,o=document.createElement("br");if(r.insertBefore(o,i),e){const s=document.createElement("img");s.setAttribute("data-lexical-linebreak","true"),s.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",s.alt="",r.insertBefore(s,o),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=o}getFirstChildOffset(){let e=0;for(let t=this.after;t!==null;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,r,i){if(r===this.element){const a=this.getFirstChildOffset();return[e,Math.min(a+e.getChildrenSize(),Math.max(a,i))]}const o=ko(t,r);o.push(i);const s=ko(t,this.element);let l=e.getIndexWithinParent();for(let a=0;a<s.length;a++){const c=o[a],u=s[a];if(c===void 0||c<u)break;if(c>u){l+=1;break}}return[e.getParentOrThrow(),l]}}function ko(n,e){const t=[];let r=e;for(;r!==n&&r!==null;r=r.parentNode){let i=0;for(let o=r.previousSibling;o!==null;o=o.previousSibling)i++;t.push(i)}return r!==n&&k(225),t.reverse()}class Ve extends be{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return Ma[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=U()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;t!==null;){if(O(t)&&e.push(t),v(t)){const r=t.getAllTextNodes();e.push(...r)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;v(e);){const t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;v(e);){const t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),r=t.length;if(e>=r){const o=t[r-1];return v(o)&&o.getLastDescendant()||o||null}const i=t[e];return v(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:Q(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&k(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:Q(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&k(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let r,i;if(e<t/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=e;){if(i===e)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=t-1;r!==null&&i>=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e="";const t=this.getChildren(),r=t.length;for(let i=0;i<r;i++){const o=t[i];e+=o.getTextContent(),v(o)&&i!==r-1&&!o.isInline()&&(e+=Zn)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),r=t.length;for(let i=0;i<r;i++){const o=t[i];e+=o.getTextContentSize(),v(o)&&i!==r-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const t=Ui[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){const t=tt[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return Vn(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){G();const r=A();let i=e,o=t;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){const a=this.getFirstChild();if(O(a)||v(a))return a.select(0,0)}else if(!(e!==void 0&&e!==s||t!==void 0&&t!==s)){const a=this.getLastChild();if(O(a)||v(a))return a.select()}}i===void 0&&(i=s),o===void 0&&(o=s);const l=this.__key;return T(r)?(r.anchor.set(l,i,"element"),r.focus.set(l,o,"element"),r.dirty=!0,r):ll(l,i,l,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach(t=>t.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e!==""?Ui[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,r){Un(this)&&k(324,this.__key,this.__type);const i=this.getChildrenSize(),o=this.getWritable();e+t<=i||k(226,String(e),String(t),String(i));const s=o.__key,l=[],a=[],c=this.getChildAtIndex(e+t);let u=null,d=i-t+r.length;if(e!==0)if(e===i)u=this.getLastChild();else{const g=this.getChildAtIndex(e);g!==null&&(u=g.getPreviousSibling())}if(t>0){let g=u===null?this.getFirstChild():u.getNextSibling();for(let h=0;h<t;h++){g===null&&k(100);const p=g.getNextSibling(),_=g.__key;et(g.getWritable()),a.push(_),g=p}}let f=u;for(const g of r){f!==null&&g.is(f)&&(u=f=f.getPreviousSibling());const h=g.getWritable();h.__parent===s&&d--,et(h);const p=g.__key;if(f===null)o.__first=p,h.__prev=null;else{const _=f.getWritable();_.__next=p,h.__prev=_.__key}g.__key===s&&k(76),h.__parent=s,l.push(p),f=g}if(e+t===i)f!==null&&(f.getWritable().__next=null,o.__last=f.__key);else if(c!==null){const g=c.getWritable();if(f!==null){const h=f.getWritable();g.__prev=f.__key,h.__next=c.__key}else g.__prev=null}if(o.__size=d,a.length){const g=A();if(T(g)){const h=new Set(a),p=new Set(l),{anchor:_,focus:y}=g;No(_,h,p)&&Jn(_,_.getNode(),this,u,c),No(y,h,p)&&Jn(y,y.getNode(),this,u,c),d!==0||this.canBeEmpty()||Te(this)||this.remove()}}return o}getDOMSlot(e){return new Gt(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(ie(t)){const r=this.getIndent();r>0&&(t.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(t.dir=i)}return{element:t}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),r=this.getTextStyle();return t===0&&r===""||Te(this)||this.getChildren().some(O)||(t!==0&&(e.textFormat=t),r!==""&&(e.textStyle=r)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){const r=this.getDOMSlot(e);let i=r.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=t.getElementByKey(o.getKey());s!==null&&(i==null?(r.insertChild(s),i=s):i!==s&&r.replaceChild(s,i),i=i.nextSibling)}}}function v(n){return n instanceof Ve}function No(n,e,t){let r=n.getNode();for(;r;){const i=r.__key;if(e.has(i)&&!t.has(i))return!0;r=r.getParent()}return!1}class mi extends be{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function R(n){return n instanceof mi}class $t extends Ve{__cachedText;static getType(){return"root"}static clone(){return new $t}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){k(51)}getTextContent(){const e=this.__cachedText;return!cn()&&U()._dirtyType!==0||e===null?super.getTextContent():e}remove(){k(52)}replace(e){k(53)}insertBefore(e){k(54)}insertAfter(e){k(55)}updateDOM(e,t){return!1}splice(e,t,r){for(const i of r)v(i)||R(i)||k(282);return super.splice(e,t,r)}static importJSON(e){return V().updateFromJSON(e)}collapseAtStart(){return!0}}function ee(n){return n instanceof $t}function hl(n){return new un(new Map(n._nodeMap))}function yi(){return new un(new Map([["root",new $t]]))}function gl(n){const e=n.exportJSON(),t=n.constructor;if(e.type!==t.getType()&&k(130,t.name),v(n)){const r=e.children;Array.isArray(r)||k(59,t.name);const i=n.getChildren();for(let o=0;o<i.length;o++){const s=gl(i[o]);r.push(s)}}return e}function bc(n){return n instanceof un}class un{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,t){return bo(t&&t.editor||null,this,e)}clone(e){const t=new un(this._nodeMap,e===void 0?this._selection:e);return t._readOnly=!0,t}toJSON(){return bo(null,this,()=>({root:gl(V())}))}}class xi extends Ve{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class Kt extends Ve{static getType(){return"paragraph"}static clone(e){return new Kt(e.__key)}createDOM(e){const t=document.createElement("p"),r=Ot(e.theme,"paragraph");return r!==void 0&&t.classList.add(...r),t}updateDOM(e,t,r){return!1}static importDOM(){return{p:e=>({conversion:Ec,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(ie(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r)}return{element:t}}static importJSON(e){return te().updateFromJSON(e)}exportJSON(){const e=super.exportJSON();if(e.textFormat===void 0||e.textStyle===void 0){const t=this.getChildren().find(O);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){const r=te();r.setTextFormat(e.format),r.setTextStyle(e.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,t),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||O(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function Ec(n){const e=te();return n.style&&(e.setFormat(n.style.textAlign),Oi(n,e)),{node:e}}function te(){return He(new Kt)}function pl(n){return n instanceof Kt}const I=0,wo=1,Nf=3,kc=4;function _l(n,e,t,r){const i=n._keyToDOMMap;i.clear(),n._editorState=yi(),n._pendingEditorState=r,n._compositionKey=null,n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),n._normalizedNodes=new Set,n._updateTags=new Set,n._updates=[],n._blockCursorElement=null;const o=n._observer;o!==null&&(o.disconnect(),n._observer=null),e!==null&&(e.textContent=""),t!==null&&(t.textContent="",i.set("root",t))}function Nc(n){const e=new Set,t=new Set;let r=n;for(;r;){const{ownNodeConfig:i}=lr(r),o=r.transform;if(!t.has(o)){t.add(o);const s=r.transform();s&&e.add(s)}if(i){const s=i.$transform;s&&e.add(s),r=i.extends}else{const s=Object.getPrototypeOf(r);r=s.prototype instanceof be&&s!==be?s:void 0}}return e}function ml(n){const e=n||{},t=Sc(),r=e.theme||{},i=n===void 0?t:e.parentEditor||null,o=e.disableEvents||!1,s=yi(),l=e.namespace||(i!==null?i._config.namespace:wl()),a=e.editorState,c=[$t,ft,It,Rt,Kt,xi,...e.nodes||[]],{onError:u,html:d}=e,f=e.editable===void 0||e.editable;let g;if(n===void 0&&t!==null)g=t._nodes;else{g=new Map;for(let p=0;p<c.length;p++){let _=c[p],y=null,m=null;if(typeof _!="function"){const N=_;_=N.replace,y=N.with,m=N.withKlass||null}lr(_);const x=_.getType(),E=Nc(_);g.set(x,{exportDOM:d&&d.export?d.export.get(_):void 0,klass:_,replace:y,replaceWithKlass:m,sharedNodeState:Ka(c[p]),transforms:E})}}const h=new Dt(s,i,g,{disableEvents:o,namespace:l,theme:r},u||console.error,(function(p,_){const y=new Map,m=new Set,x=E=>{Object.keys(E).forEach(N=>{let b=y.get(N);b===void 0&&(b=[],y.set(N,b)),b.push(E[N])})};return p.forEach(E=>{const N=E.klass.importDOM;if(N==null||m.has(N))return;m.add(N);const b=N.call(E.klass);b!==null&&x(b)}),_&&x(_),y})(g,d?d.import:void 0),f,n);return a!==void 0&&(h._pendingEditorState=a,h._dirtyType=2),(function(p){p.registerCommand(Ts,ec,I),p.registerCommand(Os,tc,I),p.registerCommand(Ms,nc,I),p.registerCommand(As,rc,I),p.registerCommand(Fs,ic,I)})(h),h}class Dt{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,t,r,i,o,s,l,a){this._createEditorArgs=a,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=wl(),this._onError=o,this._htmlConversions=s,this._editable=l,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,r){r===void 0&&k(35);const i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=i.get(e);o===void 0&&k(36,String(e));const s=o[r];return s.add(t),()=>{s.delete(t),o.every(l=>l.size===0)&&i.delete(e)}}registerMutationListener(e,t,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;let s=o.get(t);s===void 0&&(s=new Set,o.set(t,s)),s.add(i);const l=r&&r.skipInitialization;return l!==void 0&&l||this.initializeMutationListener(t,i),()=>{s.delete(i),s.size===0&&o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&k(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const r=this._editorState,i=oi(r).get(t.getType());if(!i)return;const o=new Map;for(const s of i.keys())o.set(s,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const r=this.getRegisteredNode(e);return r.transforms.add(t),r}registerNodeTransform(e,t){const r=this.registerNodeTransformToKlass(e,t),i=[r],o=r.replaceWithKlass;if(o!=null){const s=this.registerNodeTransformToKlass(o,t);i.push(s)}return(function(s,l){const a=oi(s.getEditorState()),c=[];for(const u of l){const d=a.get(u);d&&c.push(d)}c.length!==0&&s.update(()=>{for(const u of c)for(const d of u.keys()){const f=Q(d);f&&f.markDirty()}},s._pendingEditorState===null?{tag:qt}:void 0)})(this,i.map(s=>s.klass.getType())),()=>{i.forEach(s=>s.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return M(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const r=Ot(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,_l(this,t,e,i),t!==null&&(this._config.disableEvents||oc(t),r!=null&&t.classList.remove(...r)),e!==null){const o=Ti(e),s=e.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,xs(this),this._updateTags.add(qt),Le(this),this._config.disableEvents||(function(l,a){const c=l.ownerDocument;Jr.set(l,c);const u=zn.get(c)??0;u<1&&c.addEventListener("selectionchange",el),zn.set(c,u+1),l.__lexicalEditor=a;const d=Qs(l);for(let f=0;f<jr.length;f++){const[g,h]=jr[f],p=typeof h=="function"?_=>{oo(_)||(io(_),(a.isEditable()||g==="click")&&h(_,a))}:_=>{if(oo(_))return;io(_);const y=a.isEditable();switch(g){case"cut":return y&&M(a,di,_);case"copy":return M(a,tr,_);case"paste":return y&&M(a,er,_);case"dragstart":return y&&M(a,Js,_);case"dragover":return y&&M(a,Vs,_);case"dragend":return y&&M(a,Ga,_);case"focus":return y&&M(a,Xa,_);case"blur":return y&&M(a,Za,_);case"drop":return y&&M(a,js,_)}};l.addEventListener(g,p),d.push(()=>{l.removeEventListener(g,p)})}})(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add(qt),Le(this);Yt("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&k(38);let r=e;r._readOnly&&(r=hl(e),r._selection=e._selection?e._selection.clone():null),ys(this);const i=this._pendingEditorState,o=this._updateTags,s=t!==void 0?t.tag:null;i===null||i.isEmpty()||(s!=null&&o.add(s),Le(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&o.add(s),this._updating||Le(this)}parseEditorState(e,t){return(function(r,i,o){const s=yi(),l=X,a=fe,c=Z,u=i._dirtyElements,d=i._dirtyLeaves,f=i._cloneNotNeeded,g=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,X=s,fe=!1,Z=i,vi(null);try{const h=i._nodes;_i(r.root,h),o&&o(),s._readOnly=!0}catch(h){h instanceof Error&&i._onError(h)}finally{i._dirtyElements=u,i._dirtyLeaves=d,i._cloneNotNeeded=f,i._dirtyType=g,X=l,fe=a,Z=c}return s})(typeof e=="string"?JSON.parse(e):e,this,t)}read(e){return Le(this),this.getEditorState().read(e,{editor:this})}update(e,t){(function(r,i,o){r._updating?r._updates.push([i,o]):rr(r,i,o)})(this,e,t)}focus(e,t={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Ee(this,()=>{const i=A(),o=V();i!==null?i.dirty||se(i.clone()):o.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),Ac("focus"),Dc(()=>{r.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=ve(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Yt("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Dt.version="0.40.0+prod.esm";let Qr=null;function vi(n){Qr=n}let wc=1;function yl(n,e){const t=Si(n,e);return t===void 0&&k(30,e),t}function Si(n,e){return n._nodes.get(e)}const Tc=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function xl(n){return R(Ft(n))}function Ci(n){const e=document.activeElement;if(!ie(e))return!1;const t=e.nodeName;return R(Ft(n))&&(t==="INPUT"||t==="TEXTAREA"||e.contentEditable==="true"&&ir(e)==null)}function fn(n,e,t){const r=n.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(t)&&e!==null&&!Ci(e)&&vl(e)===n}catch{return!1}}function bi(n){return n instanceof Dt}function vl(n){let e=n;for(;e!=null;){const t=ir(e);if(bi(t))return t;e=dn(e)}return null}function ir(n){return n?n.__lexicalEditor:null}function Qe(n){return il(n)||n.isToken()}function Fe(n){return Qe(n)||n.isSegmented()}function $e(n){return Bt(n)&&n.nodeType===3}function Sl(n){return Bt(n)&&n.nodeType===9}function Pt(n){let e=n;for(;e!=null;){if($e(e))return e;e=e.firstChild}return null}function Vn(n,e,t){const r=tt[e];if(t!==null&&(n&r)===(t&r))return n;let i=n^r;return e==="subscript"?i&=-65:e==="superscript"?i&=-33:e==="lowercase"?(i&=-513,i&=-1025):e==="uppercase"?(i&=-257,i&=-1025):e==="capitalize"&&(i&=-257,i&=-513),i}function wf(n){return O(n)||Tt(n)||R(n)}function Cl(n,e){const t=(function(){const s=Qr;return Qr=null,s})();if((e=e||t&&t.__key)!=null)return void(n.__key=e);G(),ul();const r=U(),i=Re(),o=""+wc++;i._nodeMap.set(o,n),v(n)?r._dirtyElements.set(o,!0):r._dirtyLeaves.add(o),r._cloneNotNeeded.add(o),r._dirtyType=1,n.__key=o}function et(n){const e=n.getParent();if(e!==null){const t=n.getWritable(),r=e.getWritable(),i=n.getPreviousSibling(),o=n.getNextSibling(),s=o!==null?o.__key:null,l=i!==null?i.__key:null,a=i!==null?i.getWritable():null,c=o!==null?o.getWritable():null;i===null&&(r.__first=s),o===null&&(r.__last=l),a!==null&&(a.__next=s),c!==null&&(c.__prev=l),t.__prev=null,t.__next=null,t.__parent=null,r.__size--}}function Hn(n){ul(),Un(n)&&k(323,n.__key,n.__type);const e=n.getLatest(),t=e.__parent,r=Re(),i=U(),o=r._nodeMap,s=i._dirtyElements;t!==null&&(function(a,c,u){let d=a;for(;d!==null;){if(u.has(d))return;const f=c.get(d);if(f===void 0)break;u.set(d,!1),d=f.__parent}})(t,o,s);const l=e.__key;i._dirtyType=1,v(n)?s.set(l,!0):i._dirtyLeaves.add(l)}function re(n){G();const e=U(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){const r=Q(t);r!==null&&r.getWritable()}if(n!==null){const r=Q(n);r!==null&&r.getWritable()}}}function ze(){return cn()?null:U()._compositionKey}function Q(n,e){const t=(e||Re())._nodeMap.get(n);return t===void 0?null:t}function bl(n,e){const t=or(n,U());return t!==void 0?Q(t,e):null}function or(n,e){return n[`__lexicalKey_${e._key}`]}function Ft(n,e){let t=n;for(;t!=null;){const r=bl(t,e);if(r!==null)return r;t=dn(t)}return null}function El(n){const e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function To(n){return n.read(()=>V().getTextContent())}function V(){return kl(Re())}function kl(n){return n._nodeMap.get("root")}function se(n){G();const e=Re();n!==null&&(n.dirty=!0,n.setCachedNodes(null)),e._selection=n}function Et(n){const e=U(),t=(function(r,i){let o=r;for(;o!=null;){const s=or(o,i);if(s!==void 0)return s;o=dn(o)}return null})(n,e);return t===null?n===e.getRootElement()?Q("root"):null:Q(t)}function Nl(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function Ei(n){const e=[];let t=n;for(;t!==null;)e.push(t),t=t._parentEditor;return e}function wl(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Tl(n){return $e(n)?n.nodeValue:null}function ki(n,e,t){const r=ve(ge(e));if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:s}=r;if(i!==null){let l=Tl(i);const a=Ft(i);if(l!==null&&O(a)){if(l===Xn&&t){const c=t.length;l=t,o=c,s=c}l!==null&&Ni(a,l,o,s,n)}}}function Ni(n,e,t,r,i){let o=n;if(o.isAttached()&&(i||!o.isDirty())){const s=o.isComposing();let l=e;(s||i)&&e[e.length-1]===Xn&&(l=e.slice(0,-1));const a=o.getTextContent();if(i||l!==a){if(l===""){if(re(null),sn||Lt||ln)o.remove();else{const p=U();setTimeout(()=>{p.update(()=>{o.isAttached()&&o.remove()})},20)}return}const c=o.getParent(),u=ht(),d=o.getTextContentSize(),f=ze(),g=o.getKey();if(o.isToken()||f!==null&&g===f&&!s||T(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===n.__key&&u.anchor.offset===0&&!o.canInsertTextBefore()&&!s||u.focus.key===n.__key&&u.focus.offset===d&&!o.canInsertTextAfter()&&!s))return void o.markDirty();const h=A();if(!T(h)||t===null||r===null)return void Oo(o,l,h);if(h.setTextNodeRange(o,t,o,r),o.isSegmented()){const p=ne(o.getTextContent());o.replace(p),o=p}Oo(o,l,h)}}}function Oo(n,e,t){if(n.setTextContent(e),T(t)){const r=n.getKey();for(const i of["anchor","focus"]){const o=t[i];o.type==="text"&&o.key===r&&(o.offset=Ne(n,o.offset,"clamp"))}}}function vn(n,e,t){const r=e[t]||!1;return r==="any"||r===n[t]}function Oc(n,e){return vn(n,e,"altKey")&&vn(n,e,"ctrlKey")&&vn(n,e,"shiftKey")&&vn(n,e,"metaKey")}function W(n,e,t){return Oc(n,t)&&n.key.toLowerCase()===e.toLowerCase()}const Pe={ctrlKey:!pe,metaKey:pe},Mo={altKey:pe,ctrlKey:!pe};function Ao(n){return n.key==="Backspace"}function Do(n){return W(n,"a",Pe)}function Mc(n){const e=V();if(T(n)){const t=n.anchor,r=n.focus,i=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),At(n),n}{const t=e.select(0,e.getChildrenSize());return se(At(t)),t}}function Ot(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;const i=n[e];if(typeof i=="string"){const o=cr(i);return t[e]=o,o}return i}function wi(n,e,t,r,i){if(t.size===0)return;const o=r.__type,s=r.__key,l=e.get(o);l===void 0&&k(33,o);const a=l.klass;let c=n.get(a);c===void 0&&(c=new Map,n.set(a,c));const u=c.get(s),d=u==="destroyed"&&i==="created";(u===void 0||d)&&c.set(s,d?"updated":i)}function Tf(n){const e=n.getType(),t=Re();if(t._readOnly){const o=oi(t).get(e);return o?Array.from(o.values()):[]}const r=t._nodeMap,i=[];for(const[,o]of r)o instanceof n&&o.__type===e&&o.isAttached()&&i.push(o);return i}function Po(n,e,t){const r=n.getParent();let i=t,o=n;return r!==null&&(e&&t===0?(i=o.getIndexWithinParent(),o=r):e||t!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(e?i-1:i)}function ei(n,e){const t=n.offset;if(n.type==="element")return Po(n.getNode(),e,t);{const r=n.getNode();if(e&&t===0||!e&&t===r.getTextContentSize()){const i=e?r.getPreviousSibling():r.getNextSibling();return i===null?Po(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):i}}return null}function Ol(n){const e=ge(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function M(n,e,t){return(function(r,i,o){const s=Ei(r);for(let l=4;l>=0;l--)for(let a=0;a<s.length;a++){const c=s[a],u=c._commands.get(i);if(u!==void 0){const d=u[l];if(d!==void 0){const f=Array.from(d),g=f.length;let h=!1;if(Ee(c,()=>{for(let p=0;p<g;p++)if(f[p](o,r))return void(h=!0)}),h)return h}}}return!1})(n,e,t)}function ot(n,e){const t=n._keyToDOMMap.get(e);return t===void 0&&k(75,e),t}function dn(n){const e=n.assignedSlot||n.parentElement;return ri(e)?e.host:e}function Ml(n){return Sl(n)?n:ie(n)?n.ownerDocument:null}function Ac(n){G(),U()._updateTags.add(n)}function Dc(n){G(),U()._deferred.push(n)}function ti(n,e){let t=n.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function Ti(n){const e=Ml(n);return e?e.defaultView:null}function ge(n){const e=n._window;return e===null&&k(78),e}function Of(n){return v(n)&&n.isInline()||R(n)&&n.isInline()}function Pc(n){let e=n.getParentOrThrow();for(;e!==null;){if(Te(e))return e;e=e.getParentOrThrow()}return e}function Te(n){return ee(n)||v(n)&&n.isShadowRoot()}function Fc(n){const e=n.constructor.clone(n);return Cl(e,null),e.afterCloneFrom(n),e}function He(n){const e=U(),t=n.getType(),r=Si(e,t);r===void 0&&k(200,n.constructor.name,t);const{replace:i,replaceWithKlass:o}=r;if(i!==null){const s=i(n),l=s.constructor;return o!==null?s instanceof o||k(201,o.name,o.getType(),l.name,l.getType(),n.constructor.name,t):s instanceof n.constructor&&l!==n.constructor||k(202,l.name,l.getType(),n.constructor.name,t),s.__key===n.__key&&k(203,n.constructor.name,t,l.name,l.getType()),s}return n}function Er(n,e){!ee(n.getParent())||v(e)||R(e)||k(99)}function Lc(n){const e=Q(n);return e===null&&k(63,n),e}function kr(n){return(R(n)||v(n)&&!n.canBeEmpty())&&!n.isInline()}function ni(n,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function ve(n){return xe?(n||window).getSelection():null}function Ic(n){const e=Ti(n);return e?e.getSelection():null}function Al(n){return ie(n)&&n.tagName==="A"}function ie(n){return Bt(n)&&n.nodeType===1}function Bt(n){return typeof n=="object"&&n!==null&&"nodeType"in n&&typeof n.nodeType=="number"}function ri(n){return Bt(n)&&n.nodeType===11}function ii(n){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return n.nodeName.match(e)!==null}function qn(n){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return n.nodeName.match(e)!==null}function de(n){if(R(n)&&!n.isInline())return!0;if(!v(n)||Te(n))return!1;const e=n.getFirstChild(),t=e===null||Tt(e)||O(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function sr(){return U()}const Fo=new WeakMap,Rc=new Map;function oi(n){if(!n._readOnly&&n.isEmpty())return Rc;n._readOnly||k(192);let e=Fo.get(n);return e||(e=(function(t){const r=new Map;for(const[i,o]of t._nodeMap){const s=o.__type;let l=r.get(s);l||(l=new Map,r.set(s,l)),l.set(i,o)}return r})(n),Fo.set(n,e)),e}function Dl(n){const e=n.constructor.clone(n);return e.afterCloneFrom(n),e}function $c(n){return(e=Dl(n))[tl]=!0,e;var e}function Oi(n,e){const t=parseInt(n.style.paddingInlineStart,10)||0,r=Math.round(t/40);e.setIndent(r)}function Mf(n){n.__lexicalUnmanaged=!0}function Kc(n){return n.__lexicalUnmanaged===!0}function Ut(n,e){return(function(t,r){return Object.prototype.hasOwnProperty.call(t,r)})(n,e)&&n[e]!==be[e]}function lr(n){const e=ji in n.prototype?n.prototype[ji]():void 0,t=(function(s){if(!(s===be||s.prototype instanceof be)){let l="<unknown>",a="<unknown>";try{l=s.getType()}catch{}try{Dt.version&&(a=JSON.parse(Dt.version))}catch{}k(290,s.name,l,a)}return s===mi||s===Ve||s===be})(n),r=!t&&Ut(n,"getType")?n.getType():void 0;let i,o=r;if(e)if(r)i=e[r];else for(const[s,l]of Object.entries(e))o=s,i=l;if(!t&&o&&(Ut(n,"getType")||(n.getType=()=>o),Ut(n,"clone")||(n.clone=s=>(vi(s),new n)),Ut(n,"importJSON")||(n.importJSON=i&&i.$importJSON||(s=>new n().updateFromJSON(s))),!Ut(n,"importDOM")&&i)){const{importDOM:s}=i;s&&(n.importDOM=()=>s)}return{ownNodeConfig:i,ownNodeType:o}}function Bc(n){const e=sr();return G(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(n))).klass}const ce=(n,e)=>{let t=n;for(;t!=null&&!ee(t);){if(e(t))return t;t=t.getParent()}return null},zc={next:"previous",previous:"next"};class Mi{origin;constructor(e){this.origin=e}[Symbol.iterator](){return Fi({hasNext:at,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return Y(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Y(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){const r=this.getNodeAtCaret();return e.is(this.origin)||e.is(r)||(r===null?this.insert(e):r.replace(e,t)),this}splice(e,t,r="next"){const i=r===this.direction?t:Array.from(t).reverse();let o=this;const s=this.getParentAtCaret(),l=new Map;for(let a=o.getAdjacentCaret();a!==null&&l.size<e;a=a.getAdjacentCaret()){const c=a.origin.getWritable();l.set(c.getKey(),c)}for(const a of i){if(l.size>0){const c=o.getNodeAtCaret();if(c){if(l.delete(c.getKey()),l.delete(a.getKey()),!(c.is(a)||o.origin.is(a))){const u=a.getParent();u&&u.is(s)&&a.remove(),c.replace(a)}}else c===null&&k(263,Array.from(l).join(" "))}else o.insert(a);o=Y(a,this.direction)}for(const a of l.values())a.remove();return this}}class rn extends Mi{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:ye(e,this.direction)}getParentCaret(e="root"){return Y(Ai(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=gt(this.direction);return Y(this.getNodeAtCaret(),e)||ye(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof rn&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const Wc={root:ee,shadowRoot:Te};function gt(n){return zc[n]}function Ai(n,e="root"){return Wc[e](n)?null:n}class st extends Mi{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Y(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return v(this.origin)?ye(this.origin,this.direction):null}getParentCaret(e="root"){return Y(Ai(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=gt(this.direction);return Y(this.getNodeAtCaret(),e)||ye(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof st&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof st||e instanceof lt)&&this.direction===e.direction&&this.origin.is(e.origin)}}class lt extends Mi{type="text";offset;constructor(e,t){super(e),this.offset=t}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:ct(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return Y(Ai(this.getParentAtCaret(),e),this.direction)}getFlipped(){return ct(this.origin,gt(this.direction),this.offset)}isSamePointCaret(e){return e instanceof lt&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof st||e instanceof lt)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return Y(this.origin,this.direction)}}function ke(n){return n instanceof lt}function at(n){return n instanceof st}function he(n){return n instanceof rn}const Uc={next:class extends lt{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends lt{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},jc={next:class extends st{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends st{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},Jc={next:class extends rn{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(n){return this.origin.splice(0,0,[n]),this}},previous:class extends rn{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(n){return this.origin.splice(this.origin.getChildrenSize(),0,[n]),this}}};function Y(n,e){return n?new jc[e](n):null}function ct(n,e,t){return n?new Uc[e](n,Ne(n,t)):null}function Ne(n,e,t="error"){const r=n.getTextContentSize();let i=e==="next"?r:e==="previous"?0:e;return(i<0||i>r)&&(t!=="clamp"&&hs(284,String(e),String(r),n.getKey()),i=i<0?0:r),i}function Lo(n,e){return new Hc(n,e)}function ye(n,e){return v(n)?new Jc[e](n):null}function Vc(n){return n&&n.getChildCaret()||n}function ar(n){return n&&Vc(n.getAdjacentCaret())}class Di{type="node-caret-range";direction;anchor;focus;constructor(e,t,r){this.anchor=e,this.focus=t,this.direction=r}getLatest(){const e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new Di(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=i=>{const o=this[i].getLatest();return ke(o)?(function(s,l){const{direction:a,origin:c}=s,u=Ne(c,l==="focus"?gt(a):a);return Lo(s,u-s.offset)})(o,i):null},t=e("anchor"),r=e("focus");if(t&&r){const{caret:i}=t,{caret:o}=r;if(i.isSameNodeCaret(o))return[Lo(i,o.offset-i.offset),null]}return[t,r]}iterNodeCarets(e="root"){const t=ke(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=ke(r),o=s=>s.isSameNodeCaret(r)?null:ar(s)||s.getParentCaret(e);return Fi({hasNext:s=>s!==null&&!(i&&r.isSameNodeCaret(s)),initial:t.isSameNodeCaret(r)?null:o(t),map:s=>s,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Hc{type="slice";caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){const{distance:e,caret:{offset:t}}=this,r=t+e;return r<t?[r,t]:[t,r]}getTextContent(){const[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:t}}=this,[r,i]=this.getSliceIndices(),o=e.getTextContent();return ct(e.setTextContent(o.slice(0,r)+o.slice(i)),t,r)}}function Pi(n){return Je(n,Y(V(),n.direction))}function Pl(n){return Je(n,n)}function Je(n,e){return n.direction!==e.direction&&k(265),new Di(n,e,n.direction)}function Fi(n){const{initial:e,hasNext:t,step:r,map:i}=n;let o=e;return{[Symbol.iterator](){return this},next(){if(!t(o))return{done:!0,value:void 0};const s={done:!1,value:i(o)};return o=r(o),s}}}function Fl(n,e){const t=Mn(n.origin,e.origin);switch(t===null&&k(275,n.origin.getKey(),e.origin.getKey()),t.type){case"same":{const r=n.type==="text",i=e.type==="text";return r&&i?(function(o,s){return Math.sign(o-s)})(n.offset,e.offset):n.type===e.type?0:r?-1:i?1:n.type==="child"?-1:1}case"ancestor":return n.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return Ll(t)}}function Ll(n){const{a:e,b:t}=n,r=e.__key,i=t.__key;let o=e,s=t;for(;o&&s;o=o.getNextSibling(),s=s.getNextSibling()){if(o.__key===i)return-1;if(s.__key===r)return 1}return o===null?1:-1}function Sn(n,e){return e.is(n)}function Io(n){return v(n)?[n.getLatest(),null]:[n.getParent(),n.getLatest()]}function Mn(n,e){if(n.is(e))return{commonAncestor:n,type:"same"};const t=new Map;for(let[r,i]=Io(n);r;i=r,r=r.getParent())t.set(r,i);for(let[r,i]=Io(e);r;i=r,r=r.getParent()){const o=t.get(r);if(o!==void 0)return o===null?(Sn(n,r)||k(276),{commonAncestor:r,type:"ancestor"}):i===null?(Sn(e,r)||k(277),{commonAncestor:r,type:"descendant"}):((v(o)||Sn(n,o))&&(v(i)||Sn(e,i))&&r.is(o.getParent())&&r.is(i.getParent())||k(278),{a:o,b:i,commonAncestor:r,type:"branch"})}return null}function Oe(n,e){const{type:t,key:r,offset:i}=n,o=Lc(n.key);return t==="text"?(O(o)||k(266,o.getType(),r),ct(o,e,i)):(v(o)||k(267,o.getType(),r),Yc(o,n.offset,e))}function on(n,e){const{origin:t,direction:r}=e,i=r==="next";ke(e)?n.set(t.getKey(),e.offset,"text"):at(e)?O(t)?n.set(t.getKey(),Ne(t,r),"text"):n.set(t.getParentOrThrow().getKey(),t.getIndexWithinParent()+(i?1:0),"element"):(he(e)&&v(t)||k(268),n.set(t.getKey(),i?0:t.getChildrenSize(),"element"))}function Il(n){const e=A(),t=T(e)?e:gi();return An(t,n),se(t),t}function An(n,e){on(n.anchor,e.anchor),on(n.focus,e.focus)}function Ro(n){const{anchor:e,focus:t}=n,r=Oe(e,"next"),i=Oe(t,"next"),o=Fl(r,i)<=0?"next":"previous";return Je(Ie(r,o),Ie(i,o))}function hn(n){const{direction:e,origin:t}=n,r=Y(t,gt(e)).getNodeAtCaret();return r?Y(r,e):ye(t.getParentOrThrow(),e)}function $o(n,e="root"){const t=[n];for(let r=he(n)?n.getParentCaret(e):n.getSiblingCaret();r!==null;r=r.getParentCaret(e))t.push(hn(r));return t}function Nr(n){return!!n&&n.origin.isAttached()}function qc(n,e="removeEmptySlices"){if(n.isCollapsed())return n;const t="root",r="next";let i=e;const o=$l(n,r),s=$o(o.anchor,t),l=$o(o.focus.getFlipped(),t),a=new Set,c=[];for(const h of o.iterNodeCarets(t))if(he(h))a.add(h.origin.getKey());else if(at(h)){const{origin:p}=h;v(p)&&!a.has(p.getKey())||c.push(p)}for(const h of c)h.remove();for(const h of o.getTextSlices()){if(!h)continue;const{origin:p}=h.caret,_=p.getTextContentSize(),y=hn(Y(p,r)),m=p.getMode();if(Math.abs(h.distance)===_&&i==="removeEmptySlices"||m==="token"&&h.distance!==0)y.remove();else if(h.distance!==0){i="removeEmptySlices";let x=h.removeTextSlice();const E=h.caret.origin;if(m==="segmented"){const N=x.origin,b=ne(N.getTextContent()).setStyle(N.getStyle()).setFormat(N.getFormat());y.replaceOrInsert(b),x=ct(b,r,x.offset)}E.is(s[0].origin)&&(s[0]=x),E.is(l[0].origin)&&(l[0]=x.getFlipped())}}let u,d;for(const h of s)if(Nr(h)){u=_e(h);break}for(const h of l)if(Nr(h)){d=_e(h);break}const f=(function(h,p,_){if(!h||!p)return null;const y=h.getParentAtCaret(),m=p.getParentAtCaret();if(!y||!m)return null;const x=y.getParents().reverse();x.push(y);const E=m.getParents().reverse();E.push(m);const N=Math.min(x.length,E.length);let b;for(b=0;b<N&&x[b]===E[b];b++);const w=(D,F)=>{let $;for(let L=b;L<D.length;L++){const K=D[L];if(Te(K))return;!$&&F(K)&&($=K)}return $},S=w(x,de),C=S&&w(E,D=>_.has(D.getKey())&&de(D));return S&&C?[S,C]:null})(u,d,a);if(f){const[h,p]=f;ye(h,"previous").splice(0,p.getChildren()),p.remove()}const g=[u,d,...s,...l].find(Nr);if(g)return Pl(Ie(_e(g),n.direction));k(269,JSON.stringify(s.map(h=>h.origin.__key)))}function _e(n){const e=(function(i){let o=i;for(;he(o);){const s=ar(o);if(!he(s))break;o=s}return o})(n.getLatest()),{direction:t}=e;if(O(e.origin))return ke(e)?e:ct(e.origin,t,t);const r=e.getAdjacentCaret();return at(r)&&O(r.origin)?ct(r.origin,t,gt(t)):e}function Rl(n){return ke(n)&&n.offset!==Ne(n.origin,n.direction)}function Ie(n,e){return n.direction===e?n:n.getFlipped()}function $l(n,e){return n.direction===e?n:Je(Ie(n.focus,e),Ie(n.anchor,e))}function Yc(n,e,t){let r=ye(n,"next");for(let i=0;i<e;i++){const o=r.getAdjacentCaret();if(o===null)break;r=o}return Ie(r,t)}function Gc(n){const{origin:e,offset:t,direction:r}=n;if(t===Ne(e,r))return n.getSiblingCaret();if(t===Ne(e,gt(r)))return hn(n.getSiblingCaret());const[i]=e.splitText(t);return O(i)||k(281),Ie(Y(i,"next"),r)}function Xc(n,e){return!0}function Zc(n,{$copyElementNode:e=Fc,$splitTextPointCaretNext:t=Gc,rootMode:r="shadowRoot",$shouldSplit:i=Xc}={}){if(ke(n))return t(n);const o=n.getParentCaret(r);if(o){const{origin:s}=o;if(he(n)&&(!s.canBeEmpty()||!i(s,"first")))return hn(o);const l=(function(a){const c=[];for(let u=a.getAdjacentCaret();u;u=u.getAdjacentCaret())c.push(u.origin);return c})(n);(l.length>0||s.canBeEmpty()&&i(s,"last"))&&o.insert(e(s).splice(0,0,l))}return o}function Af(n){return n}function Df(...n){return n}function Pf(n){return n}function Qc(n,e){if(!e||n===e)return n;for(const t in e)if(n[t]!==e[t])return{...n,...e};return n}function cr(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}function ur(n,...e){const t=cr(...e);t.length>0&&n.classList.add(...t)}function Ff(n,...e){const t=cr(...e);t.length>0&&n.classList.remove(...t)}function ut(...n){return()=>{for(let e=n.length-1;e>=0;e--)n[e]();n.length=0}}const si=new Map;function Ko(n){let e=n;for(;e!=null;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function Bo(n){const e=n.parentNode;if(e==null)throw new Error("Should never happen");return[e,Array.from(e.childNodes).indexOf(n)]}function Lf(n,e,t,r,i){const o=e.getKey(),s=r.getKey(),l=document.createRange();let a=n.getElementByKey(o),c=n.getElementByKey(s),u=t,d=i;if(O(e)&&(a=Ko(a)),O(r)&&(c=Ko(c)),e===void 0||r===void 0||a===null||c===null)return null;a.nodeName==="BR"&&([a,u]=Bo(a)),c.nodeName==="BR"&&([c,d]=Bo(c));const f=a.firstChild;a===c&&f!=null&&f.nodeName==="BR"&&u===0&&d===0&&(d=1);try{l.setStart(a,u),l.setEnd(c,d)}catch{return null}return!l.collapsed||u===d&&o===s||(l.setStart(c,d),l.setEnd(a,u)),l}function If(n,e){const t=n.getRootElement();if(t===null)return[];const r=t.getBoundingClientRect(),i=getComputedStyle(t),o=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),s=Array.from(e.getClientRects());let l,a=s.length;s.sort((c,u)=>{const d=c.top-u.top;return Math.abs(d)<=3?c.left-u.left:d});for(let c=0;c<a;c++){const u=s[c],d=l&&l.top<=u.top&&l.top+l.height>u.top&&l.left+l.width>u.left,f=u.width+o===r.width;d||f?(s.splice(c--,1),a--):l=u}return s}function Kl(n){const e={};if(!n)return e;const t=n.split(";");for(const r of t)if(r!==""){const[i,o]=r.split(/:([^]+)/);i&&o&&(e[i.trim()]=o.trim())}return e}function Rf(n){let e=si.get(n);return e===void 0&&(e=Kl(n),si.set(n,e)),e}function Bl(n){const e=sr().getElementByKey(n.getKey());if(e===null)return null;const t=e.ownerDocument.defaultView;return t===null?null:t.getComputedStyle(e)}function zl(n){return Bl(ee(n)?n:n.getParentOrThrow())}function zo(n){const e=zl(n);return e!==null&&e.direction==="rtl"}function Wl(n,e,t="self"){const r=n.getStartEndPoints();if(e.isSelected(n)&&!Fe(e)&&r!==null){const[i,o]=r,s=n.isBackward(),l=i.getNode(),a=o.getNode(),c=e.is(l),u=e.is(a);if(c||u){const[d,f]=Xr(n),g=l.is(a),h=e.is(s?a:l),p=e.is(s?l:a);let _,y=0;g?(y=d>f?f:d,_=d>f?d:f):h?(y=s?f:d,_=void 0):p&&(y=0,_=s?d:f);const m=e.__text.slice(y,_);m!==e.__text&&(t==="clone"&&(e=$c(e)),e.__text=m)}}return e}function eu(n){const e=n.getStyle(),t=Kl(e);si.set(e,t)}function tu(n,e){const t=n.getFormatType(),r=n.getIndent();t!==e.getFormatType()&&e.setFormat(t),r!==e.getIndent()&&e.setIndent(r)}function $f(n,e,t=tu){if(n===null)return;const r=n.getStartEndPoints(),i=new Map;let o=null;if(r){const[s,l]=r;o=gi(),o.anchor.set(s.key,s.offset,s.type),o.focus.set(l.key,l.offset,l.type);const a=ce(s.getNode(),de),c=ce(l.getNode(),de);v(a)&&i.set(a.getKey(),a),v(c)&&i.set(c.getKey(),c)}for(const s of n.getNodes())if(v(s)&&de(s))i.set(s.getKey(),s);else if(r===null){const l=ce(s,de);v(l)&&i.set(l.getKey(),l)}for(const[s,l]of i){const a=e();t(l,a),l.replace(a,!0),o&&(s===o.anchor.key&&o.anchor.set(a.getKey(),o.anchor.offset,o.anchor.type),s===o.focus.key&&o.focus.set(a.getKey(),o.focus.offset,o.focus.type))}o&&n.is(A())&&se(o)}function Ul(n){const e=jl(n);return e!==null&&e.writingMode==="vertical-rl"}function jl(n){const e=n.anchor.getNode();return v(e)?Bl(e):zl(e)}function Wo(n,e){let t=Ul(n)?!e:e;Jl(n)&&(t=!t);const r=Oe(n.focus,t?"previous":"next");if(Rl(r))return!1;for(const i of Pi(r)){if(he(i))return!i.origin.isInline();if(!v(i.origin)){if(R(i.origin))return!0;break}}return!1}function nu(n,e,t,r){n.modify(e?"extend":"move",t,r)}function Jl(n){const e=jl(n);return e!==null&&e.direction==="rtl"}function Uo(n,e,t){const r=Jl(n);let i;i=Ul(n)||r?!t:t,nu(n,e,i,"character")}function Vl(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Hl=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,ru=Hl&&"documentMode"in document?document.documentMode:null;!(!Hl||!("InputEvent"in window)||ru)&&"getTargetRanges"in new window.InputEvent("input");function Kf(n){return n?n.getAdjacentCaret():null}function Bf(n,e){let t=n;for(;t!=null;){if(t instanceof e)return t;t=t.getParent()}return null}function iu(n){const e=ce(n,t=>v(t)&&!t.isInline());return v(e)||Vl(4,n.__key),e}function zf(n){const e=A()||ht();let t;if(T(e))t=Oe(e.focus,"next");else{if(e!=null){const s=e.getNodes(),l=s[s.length-1];l&&(t=Y(l,"next"))}t=t||ye(V(),"previous").getFlipped().insert(te())}const r=ou(n,t),i=ar(r),o=he(i)?_e(i):r;return Il(Pl(o)),n.getLatest()}function ou(n,e,t){let r=Ie(e,"next");for(let i=r;i;i=Zc(i,t))r=i;return ke(r)&&Vl(283),r.insert(n.isInline()?te().append(n):n),Ie(Y(n.getLatest(),"next"),e.direction)}function We(n,e){return n!==null&&Object.getPrototypeOf(n).constructor.name===e.name}function Wf(n,e){const t=[],r=Array.from(n).reverse();for(let i=r.pop();i!==void 0;i=r.pop())if(e(i))t.push(i);else if(v(i))for(const o of su(i))r.push(o);return t}function su(n){return lu(ye(n,"previous"))}function lu(n){return Fi({hasNext:at,initial:n.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}const ql=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,au=ql?B.useLayoutEffect:B.useEffect,Cn={tag:qt};function Uf({initialConfig:n,children:e}){const t=B.useMemo(()=>{const{theme:r,namespace:i,nodes:o,onError:s,editorState:l,html:a}=n,c=_a(null,r),u=ml({editable:n.editable,html:a,namespace:i,nodes:o,onError:d=>s(d,u),theme:r});return(function(d,f){if(f!==null){if(f===void 0)d.update(()=>{const g=V();if(g.isEmpty()){const h=te();g.append(h);const p=ql?document.activeElement:null;(A()!==null||p!==null&&p===d.getRootElement())&&h.select()}},Cn);else if(f!==null)switch(typeof f){case"string":{const g=d.parseEditorState(f);d.setEditorState(g,Cn);break}case"object":d.setEditorState(f,Cn);break;case"function":d.update(()=>{V().isEmpty()&&f(d)},Cn)}}})(u,l),[u,c]},[]);return au(()=>{const r=n.editable,[i]=t;i.setEditable(r===void 0||r)},[]),q.jsx(ds.Provider,{value:t,children:e})}const cu=B.createContext(null),wr={didCatch:!1,error:null};let uu=class extends B.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=wr}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){const{error:t}=this.state;t!==null&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState(wr))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){const{didCatch:r}=this.state,{resetKeys:i}=this.props;r&&t.error!==null&&fu(e.resetKeys,i)&&(this.props.onReset?.({next:i,prev:e.resetKeys,reason:"keys"}),this.setState(wr))}render(){const{children:e,fallbackRender:t,FallbackComponent:r,fallback:i}=this.props,{didCatch:o,error:s}=this.state;let l=e;if(o){const a={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof t=="function")l=t(a);else if(r)l=B.createElement(r,a);else if(i!==void 0)l=i;else throw s}return B.createElement(cu.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},l)}};function fu(n=[],e=[]){return n.length!==e.length||n.some((t,r)=>!Object.is(t,e[r]))}function Jf({children:n,onError:e}){return q.jsx(uu,{fallback:q.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:e,children:n})}const du=Symbol.for("preact-signals");function fr(){if(Ue>1)return void Ue--;let n,e=!1;for(;Xt!==void 0;){let t=Xt;for(Xt=void 0,li++;t!==void 0;){const r=t.o;if(t.o=void 0,t.f&=-3,!(8&t.f)&&Yl(t))try{t.c()}catch(i){e||(n=i,e=!0)}t=r}}if(li=0,Ue--,e)throw n}function Vf(n){if(Ue>0)return n();Ue++;try{return n()}finally{fr()}}let z,Xt;function jo(n){const e=z;z=void 0;try{return n()}finally{z=e}}let Ue=0,li=0,Dn=0;function Jo(n){if(z===void 0)return;let e=n.n;return e===void 0||e.t!==z?(e={i:0,S:n,p:z.s,n:void 0,t:z,e:void 0,x:void 0,r:e},z.s!==void 0&&(z.s.n=e),z.s=e,n.n=e,32&z.f&&n.S(e),e):e.i===-1?(e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=z.s,e.n=void 0,z.s.n=e,z.s=e),e):void 0}function le(n,e){this.v=n,this.i=0,this.n=void 0,this.t=void 0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function hu(n,e){return new le(n,e)}function Yl(n){for(let e=n.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function Vo(n){for(let e=n.s;e!==void 0;e=e.n){const t=e.S.n;if(t!==void 0&&(e.r=t),e.S.n=e,e.i=-1,e.n===void 0){n.s=e;break}}}function Gl(n){let e,t=n.s;for(;t!==void 0;){const r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):e=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}n.s=e}function mt(n,e){le.call(this,void 0),this.x=n,this.s=void 0,this.g=Dn-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}function Xl(n){const e=n.u;if(n.u=void 0,typeof e=="function"){Ue++;const t=z;z=void 0;try{e()}catch(r){throw n.f&=-2,n.f|=8,Li(n),r}finally{z=t,fr()}}}function Li(n){for(let e=n.s;e!==void 0;e=e.n)e.S.U(e);n.x=void 0,n.s=void 0,Xl(n)}function gu(n){if(z!==this)throw new Error("Out-of-order effect");Gl(this),z=n,this.f&=-2,8&this.f&&Li(this),fr()}function bt(n,e){this.x=n,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e?.name}function ai(n,e){const t=new bt(n,e);try{t.c()}catch(i){throw t.d(),i}const r=t.d.bind(t);return r[Symbol.dispose]=r,r}function Hf(n,e={}){const t={};for(const r in n){const i=e[r],o=hu(i===void 0?n[r]:i);t[r]=o}return t}le.prototype.brand=du,le.prototype.h=function(){return!0},le.prototype.S=function(n){const e=this.t;e!==n&&n.e===void 0&&(n.x=e,this.t=n,e!==void 0?e.e=n:jo(()=>{var t;(t=this.W)==null||t.call(this)}))},le.prototype.U=function(n){if(this.t!==void 0){const e=n.e,t=n.x;e!==void 0&&(e.x=t,n.e=void 0),t!==void 0&&(t.e=e,n.x=void 0),n===this.t&&(this.t=t,t===void 0&&jo(()=>{var r;(r=this.Z)==null||r.call(this)}))}},le.prototype.subscribe=function(n){return ai(()=>{const e=this.value,t=z;z=void 0;try{n(e)}finally{z=t}},{name:"sub"})},le.prototype.valueOf=function(){return this.value},le.prototype.toString=function(){return this.value+""},le.prototype.toJSON=function(){return this.value},le.prototype.peek=function(){const n=z;z=void 0;try{return this.value}finally{z=n}},Object.defineProperty(le.prototype,"value",{get(){const n=Jo(this);return n!==void 0&&(n.i=this.i),this.v},set(n){if(n!==this.v){if(li>100)throw new Error("Cycle detected");this.v=n,this.i++,Dn++,Ue++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{fr()}}}}),mt.prototype=new le,mt.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Dn))return!0;if(this.g=Dn,this.f|=1,this.i>0&&!Yl(this))return this.f&=-2,!0;const n=z;try{Vo(this),z=this;const e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return z=n,Gl(this),this.f&=-2,!0},mt.prototype.S=function(n){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}le.prototype.S.call(this,n)},mt.prototype.U=function(n){if(this.t!==void 0&&(le.prototype.U.call(this,n),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},mt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let n=this.t;n!==void 0;n=n.x)n.t.N()}},Object.defineProperty(mt.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const n=Jo(this);if(this.h(),n!==void 0&&(n.i=this.i),16&this.f)throw this.v;return this.v}}),bt.prototype.c=function(){const n=this.S();try{if(8&this.f||this.x===void 0)return;const e=this.x();typeof e=="function"&&(this.u=e)}finally{n()}},bt.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Xl(this),Vo(this),Ue++;const n=z;return z=this,gu.bind(this,n)},bt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Xt,Xt=this)},bt.prototype.d=function(){this.f|=8,1&this.f||Li(this)},bt.prototype.dispose=function(){this.d()};function pu(n){return(typeof n.nodes=="function"?n.nodes():n.nodes)||[]}function j(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Zl(n,e){if(n&&e&&!Array.isArray(e)&&typeof n=="object"&&typeof e=="object"){const t=n,r=e;for(const i in r)t[i]=Zl(t[i],r[i]);return n}return e}const Ii=0,ci=1,Ql=2,Tr=3,bn=4,yt=5,Or=6,jt=7;function Mr(n){return n.id===Ii}function ea(n){return n.id===Ql}function _u(n){return(function(e){return e.id===ci})(n)||j(305,String(n.id),String(ci)),Object.assign(n,{id:Ql})}const mu=new Set;let yu=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:Ii}}mergeConfigs(){let e=this.extension.config||{};const t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Qc;for(const r of this.configs)e=t(e,r);return e}init(e){const t=this.state;ea(t)||j(306,String(t.id));const r={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},o=(function(l,a,c){return Object.assign(l,{config:a,id:Tr,registerState:c})})(t,this.mergeConfigs(),r);let s;this.state=o,this.extension.init&&(s=this.extension.init(e,o.config,r)),this.state=(function(l,a,c){return Object.assign(l,{id:bn,initResult:a,registerState:c})})(o,s,i)}build(e){const t=this.state;let r;t.id!==bn&&j(307,String(t.id),String(yt)),this.extension.build&&(r=this.extension.build(e,t.config,t.registerState));const i={...t.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=(function(o,s,l){return Object.assign(o,{id:yt,output:s,registerState:l})})(t,r,i)}register(e,t){this._signal=t;const r=this.state;r.id!==yt&&j(308,String(r.id),String(yt));const i=this.extension.register&&this.extension.register(e,r.config,r.registerState);return this.state=(function(o){return Object.assign(o,{id:Or})})(r),()=>{const o=this.state;o.id!==jt&&j(309,String(r.id),String(jt)),this.state=(function(s){return Object.assign(s,{id:yt})})(o),i&&i()}}afterRegistration(e){const t=this.state;let r;return t.id!==Or&&j(310,String(t.id),String(Or)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=(function(i){return Object.assign(i,{id:jt})})(t),r}getSignal(){return this._signal===void 0&&j(311),this._signal}getInitResult(){this.extension.init===void 0&&j(312,this.extension.name);const e=this.state;return(function(t){return t.id>=bn})(e)||j(313,String(e.id),String(bn)),e.initResult}getInitPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){const e=this.state;return(function(t){return t.id>=Tr})(e)||j(314,String(e.id),String(Tr)),{config:e.config}}getPeer(e){const t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){const t=this.builder.getExtensionRep(e);return t===void 0&&j(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){const t=this.builder.getExtensionRep(e);return t===void 0&&j(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){const e=this.state;return(function(t){return t.id>=jt})(e)||j(316,String(e.id),String(jt)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||mu}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([t])=>t)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){const e=this.state;(function(t){return t.id>=yt})(e)||j(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}};const Ho={tag:qt};function xu(){const n=V();n.isEmpty()&&n.append(te())}const vu={config:{setOptions:Ho,updateOptions:Ho},init:({$initialEditorState:n=xu})=>({$initialEditorState:n,initialized:!1}),afterRegistration(n,{updateOptions:e,setOptions:t},r){const i=r.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:o}=i;if(bc(o))n.setEditorState(o,t);else if(typeof o=="function")n.update(()=>{o(n)},e);else if(o&&(typeof o=="string"||typeof o=="object")){const s=n.parseEditorState(o);n.setEditorState(s,t)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[$t,ft,It,Rt,Kt]},qo=Symbol.for("@lexical/extension/LexicalBuilder");function Yo(){}function Su(n){throw n}function En(n){return Array.isArray(n)?n:[n]}const Ar="0.40.0+prod.esm";let ta=class Pn{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=Ar,this.roots=e;for(const t of e)this.addExtension(t)}static fromExtensions(e){const t=[En(vu)];for(const r of e)t.push(En(r));return new Pn(t)}static maybeFromEditor(e){const t=e[qo];return t&&(t.PACKAGE_VERSION!==Ar&&j(292,t.PACKAGE_VERSION,Ar),t instanceof Pn||j(293)),t}static fromEditor(e){const t=Pn.maybeFromEditor(e);return t===void 0&&j(294),t}constructEditor(){const{$initialEditorState:e,onError:t,...r}=this.buildCreateEditorArgs(),i=Object.assign(ml({...r,...t?{onError:o=>{t(o,i)}}:{}}),{[qo]:this});for(const o of this.sortedExtensionReps())o.build(i);return i}buildEditor(){let e=Yo;function t(){try{e()}finally{e=Yo}}const r=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=ut(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){const t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&j(295,e.name),t}addEdge(e,t,r){const i=this.outgoingConfigEdges.get(e);i?i.set(t,r):this.outgoingConfigEdges.set(e,new Map([[t,r]]));const o=this.incomingEdges.get(t);o?o.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&j(296);const t=En(e),[r]=t;typeof r.name!="string"&&j(297,typeof r.name);let i=this.extensionNameMap.get(r.name);if(i!==void 0&&i.extension!==r&&j(298,r.name),!i){i=new yu(this,r),this.extensionNameMap.set(r.name,i);const o=this.conflicts.get(r.name);typeof o=="string"&&j(299,r.name,o);for(const s of r.conflictsWith||[])this.extensionNameMap.has(s)&&j(299,r.name,s),this.conflicts.set(s,r.name);for(const s of r.dependencies||[]){const l=En(s);this.addEdge(r.name,l[0].name,l.slice(1)),this.addExtension(l)}for(const[s,l]of r.peerDependencies||[])this.addEdge(r.name,s,l?[l]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const e=[],t=(r,i)=>{let o=r.state;if(ea(o))return;const s=r.extension.name;var l;Mr(o)||j(300,s,i||"[unknown]"),Mr(l=o)||j(304,String(l.id),String(Ii)),o=Object.assign(l,{id:ci}),r.state=o;const a=this.outgoingConfigEdges.get(s);if(a)for(const c of a.keys()){const u=this.extensionNameMap.get(c);u&&t(u,s)}o=_u(o),r.state=o,e.push(r)};for(const r of this.extensionNameMap.values())Mr(r.state)&&t(r);for(const r of e)for(const[i,o]of this.outgoingConfigEdges.get(r.extension.name)||[])if(o.length>0){const s=this.extensionNameMap.get(i);if(s)for(const l of o)s.configs.add(l)}for(const[r,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(r.name);o===void 0&&j(301,r.name);for(const s of i)o.configs.add(s)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){const t=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],o=r.signal;for(const s of t){const l=s.register(e,o);l&&i.push(l)}for(const s of t){const l=s.afterRegistration(e);l&&i.push(l)}return ut(...i)}buildCreateEditorArgs(){const e={},t=new Set,r=new Map,i=new Map,o={},s={},l=this.sortedExtensionReps();for(const u of l){const{extension:d}=u;if(d.onError!==void 0&&(e.onError=d.onError),d.disableEvents!==void 0&&(e.disableEvents=d.disableEvents),d.parentEditor!==void 0&&(e.parentEditor=d.parentEditor),d.editable!==void 0&&(e.editable=d.editable),d.namespace!==void 0&&(e.namespace=d.namespace),d.$initialEditorState!==void 0&&(e.$initialEditorState=d.$initialEditorState),d.nodes)for(const f of pu(d)){if(typeof f!="function"){const g=r.get(f.replace);g&&j(302,d.name,f.replace.name,g.extension.name),r.set(f.replace,u)}t.add(f)}if(d.html){if(d.html.export)for(const[f,g]of d.html.export.entries())i.set(f,g);d.html.import&&Object.assign(o,d.html.import)}d.theme&&Zl(s,d.theme)}Object.keys(s).length>0&&(e.theme=s),t.size&&(e.nodes=[...t]);const a=Object.keys(o).length>0,c=i.size>0;(a||c)&&(e.html={},a&&(e.html.import=o),c&&(e.html.export=i));for(const u of l)u.init(e);return e.onError||(e.onError=Su),e}};function Yf(n,e){const t=ta.fromEditor(n).extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}const Gf=P("INSERT_HORIZONTAL_RULE_COMMAND");let Cu=class na extends mi{static getType(){return"horizontalrule"}static clone(e){return new na(e.__key)}static importJSON(e){return ra().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:bu,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){const t=document.createElement("hr");return ur(t,e.theme.hr),t}getTextContent(){return`
|
|
12
|
-
`}isInline(){return!1}updateDOM(){return!1}};function bu(){return{node:ra()}}function ra(){return Bc(Cu)}const Eu=new Set(["http:","https:","mailto:","sms:","tel:"]);class gn extends Ve{__url;__target;__rel;__title;static getType(){return"link"}static clone(e){return new gn(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",t={},r){super(r);const{target:i=null,rel:o=null,title:s=null}=t;this.__url=e,this.__target=i,this.__rel=o,this.__title=s}createDOM(e){const t=document.createElement("a");return this.updateLinkDOM(null,t,e),ur(t,e.theme.link),t}updateLinkDOM(e,t,r){if(Al(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,s=this[o];e&&e[o]===s||(s?t[i]=s:t.removeAttribute(i))}}}updateDOM(e,t,r){return this.updateLinkDOM(e,t,r),!1}static importDOM(){return{a:e=>({conversion:ku,priority:1})}}static importJSON(e){return Mt().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=Qo(e);try{const t=new URL(Qo(e));if(!Eu.has(t.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){const t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){const t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){const t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){const t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){const r=Mt(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,t),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,r){if(!T(t))return!1;const i=t.anchor.getNode(),o=t.focus.getNode();return this.isParentOf(i)&&this.isParentOf(o)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function ku(n){let e=null;if(Al(n)){const t=n.textContent;(t!==null&&t!==""||n.children.length>0)&&(e=Mt(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:e}}function Mt(n="",e){return He(new gn(n,e))}function Ye(n){return n instanceof gn}let ia=class oa extends gn{__isUnlinked;constructor(e="",t={},r){super(e,t,r),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}static getType(){return"autolink"}static clone(e){return new oa(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,t,r){return super.updateDOM(e,t,r)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return Go().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){const r=this.getParentOrThrow().insertNewAfter(e,t);if(v(r)){const i=Go(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(i),i}return null}};function Go(n="",e){return He(new ia(n,e))}function kn(n){return n instanceof ia}const Xo=P("TOGGLE_LINK_COMMAND");function Zo(n,e){if(n.type==="element"){const t=n.getNode();return v(t)||(function(r,...i){const o=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",r);for(const l of i)s.append("v",l);throw o.search=s.toString(),Error(`Minified Lexical error #${r}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),t.getChildren()[n.offset+e]||null}return null}function Dr(n,e={}){let t;if(n&&typeof n=="object"){const{url:u,...d}=n;t=u,e={...d,...e}}else t=n;const{target:r,title:i}=e,o=e.rel===void 0?"noreferrer":e.rel,s=A();if(s===null||!T(s)&&!ae(s))return;if(ae(s)){const u=s.getNodes();return u.length===0?void 0:void u.forEach(d=>{if(t===null){const f=ce(d,g=>!kn(g)&&Ye(g));f&&(f.insertBefore(d),f.getChildren().length===0&&f.remove())}else{const f=ce(d,g=>!kn(g)&&Ye(g));if(f)f.setURL(t),r!==void 0&&f.setTarget(r),o!==void 0&&f.setRel(o);else{const g=Mt(t,{rel:o,target:r});d.insertBefore(g),g.append(d)}}})}const l=s.extract();if(t===null){const u=new Set;return void l.forEach(d=>{const f=ce(d,g=>!kn(g)&&Ye(g));if(f!==null){const g=f.getKey();if(u.has(g))return;(function(h,p){const _=new Set(p.filter(S=>h.isParentOf(S)).map(S=>S.getKey())),y=h.getChildren(),m=S=>_.has(S.getKey())||v(S)&&p.some(C=>h.isParentOf(C)&&S.isParentOf(C)),x=y.filter(m);if(x.length===y.length)return y.forEach(S=>h.insertBefore(S)),void h.remove();const E=y.findIndex(m),N=y.findLastIndex(m),b=E===0,w=N===y.length-1;if(b)x.forEach(S=>h.insertBefore(S));else if(w)for(let S=x.length-1;S>=0;S--)h.insertAfter(x[S]);else{for(let C=x.length-1;C>=0;C--)h.insertAfter(x[C]);const S=y.slice(N+1);if(S.length>0){const C=Mt(h.getURL(),{rel:h.getRel(),target:h.getTarget(),title:h.getTitle()});x[x.length-1].insertAfter(C),S.forEach(D=>C.append(D))}}})(f,l),u.add(g)}})}const a=new Set,c=u=>{a.has(u.getKey())||(a.add(u.getKey()),u.setURL(t),r!==void 0&&u.setTarget(r),o!==void 0&&u.setRel(o),i!==void 0&&u.setTitle(i))};if(l.length===1){const u=l[0],d=ce(u,Ye);if(d!==null)return c(d)}(function(u){const d=A();if(!T(d))return u();const f=At(d),g=f.isBackward(),h=Zo(f.anchor,g?-1:0),p=Zo(f.focus,g?0:-1);if(u(),h||p){const _=A();if(T(_)){const y=_.clone();if(h){const m=h.getParent();m&&y.anchor.set(m.getKey(),h.getIndexWithinParent()+(g?1:0),"element")}if(p){const m=p.getParent();m&&y.focus.set(m.getKey(),p.getIndexWithinParent()+(g?0:1),"element")}se(At(y))}}})(()=>{let u=null;for(const d of l){if(!d.isAttached())continue;const f=ce(d,Ye);if(f){c(f);continue}if(v(d)){if(!d.isInline())continue;if(Ye(d)){if(!(kn(d)||u!==null&&u.getParentOrThrow().isParentOf(d))){c(d),u=d;continue}for(const h of d.getChildren())d.insertBefore(h);d.remove();continue}}const g=d.getPreviousSibling();Ye(g)&&g.is(u)?g.append(d):(u=Mt(t,{rel:o,target:r,title:i}),d.insertAfter(u),u.append(d))}})}const Nu=/^\+?[0-9\s()-]{5,}$/;function Qo(n){return n.match(/^[a-z][a-z0-9+.-]*:/i)||n.match(/^[/#.]/)?n:n.includes("@")?`mailto:${n}`:Nu.test(n)?`tel:${n}`:`https://${n}`}function Xf(n,e){return ut(ai(()=>n.registerCommand(Xo,t=>{const r=e.validateUrl.peek(),i=e.attributes.peek();if(t===null)return Dr(null),!0;if(typeof t=="string")return!(r!==void 0&&!r(t))&&(Dr(t,i),!0);{const{url:o,target:s,rel:l,title:a}=t;return Dr(o,{...i,rel:l,target:s,title:a}),!0}},wo)),ai(()=>{const t=e.validateUrl.value;if(!t)return;const r=e.attributes.value;return n.registerCommand(er,i=>{const o=A();if(!T(o)||o.isCollapsed()||!We(i,ClipboardEvent)||i.clipboardData===null)return!1;const s=i.clipboardData.getData("text");return!!t(s)&&!o.getNodes().some(l=>v(l))&&(n.dispatchCommand(Xo,{...r,url:s}),i.preventDefault(),!0)},wo)}))}const wu=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?B.useLayoutEffect:B.useEffect;function Tu(n){return{initialValueFn:()=>n.isEditable(),subscribe:e=>n.registerEditableListener(e)}}function Ou(){return(function(n){const[e]=Gn(),t=B.useMemo(()=>n(e),[e,n]),[r,i]=B.useState(()=>t.initialValueFn()),o=B.useRef(r);return wu(()=>{const{initialValueFn:s,subscribe:l}=t,a=s();return o.current!==a&&(o.current=a,i(a)),l(c=>{o.current=c,i(c)})},[t,n]),r})(Tu)}const Mu={name:"@lexical/react/ReactProvider"};function Au(){return V().getTextContent()}function Du(n,e=!0){if(n)return!1;let t=Au();return e&&(t=t.trim()),t===""}function Pu(n){if(!Du(n,!1))return!1;const e=V().getChildren(),t=e.length;if(t>1)return!1;for(let r=0;r<t;r++){const i=e[r];if(R(i))return!1;if(v(i)){if(!pl(i)||i.__indent!==0)return!1;const o=i.getChildren(),s=o.length;for(let l=0;l<s;l++){const a=o[r];if(!O(a))return!1}}}return!0}function sa(n){return()=>Pu(n)}function Fu(n){const e=window.location.origin,t=r=>{if(r.origin!==e)return;const i=n.getRootElement();if(document.activeElement!==i)return;const o=r.data;if(typeof o=="string"){let s;try{s=JSON.parse(o)}catch{return}if(s&&s.protocol==="nuanria_messaging"&&s.type==="request"){const l=s.payload;if(l&&l.functionId==="makeChanges"){const a=l.args;if(a){const[c,u,d,f,g]=a;n.update(()=>{const h=A();if(T(h)){const p=h.anchor;let _=p.getNode(),y=0,m=0;if(O(_)&&c>=0&&u>=0&&(y=c,m=c+u,h.setTextNodeRange(_,y,_,m)),y===m&&d===""||(h.insertRawText(d),_=p.getNode()),O(_)){y=f,m=f+g;const x=_.getTextContentSize();y=y>x?x:y,m=m>x?x:m,h.setTextNodeRange(_,y,_,m)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",t,!0),()=>{window.removeEventListener("message",t,!0)}}function Lu(n,e){const t=Sl(e)?e.body.childNodes:e.childNodes;let r=[];const i=[];for(const o of t)if(!aa.has(o.nodeName)){const s=ca(o,n,i,!1);s!==null&&(r=r.concat(s))}return(function(o){for(const s of o)s.getNextSibling()instanceof xi&&s.insertAfter(it());for(const s of o){const l=s.getChildren();for(const a of l)s.insertBefore(a);s.remove()}})(i),r}function Iu(n,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const t=document.createElement("div"),r=V().getChildren();for(let i=0;i<r.length;i++)la(n,r[i],t,e);return t.innerHTML}function la(n,e,t,r=null){let i=r===null||e.isSelected(r);const o=v(e)&&e.excludeFromCopy("html");let s=e;r!==null&&O(e)&&(s=Wl(r,e,"clone"));const l=v(s)?s.getChildren():[],a=Si(n,s.getType());let c;c=a&&a.exportDOM!==void 0?a.exportDOM(n,s):s.exportDOM(n);const{element:u,after:d}=c;if(!u)return!1;const f=document.createDocumentFragment();for(let g=0;g<l.length;g++){const h=l[g],p=la(n,h,f,r);!i&&v(e)&&p&&e.extractWithChild(h,r,"html")&&(i=!0)}if(i&&!o){if((ie(u)||ri(u))&&u.append(f),t.append(u),d){const g=d.call(s,u);g&&(ri(u)?u.replaceChildren(g):u.replaceWith(g))}}else t.append(f);return i}const aa=new Set(["STYLE","SCRIPT"]);function ca(n,e,t,r,i=new Map,o){let s=[];if(aa.has(n.nodeName))return s;let l=null;const a=(function(h,p){const{nodeName:_}=h,y=p._htmlConversions.get(_.toLowerCase());let m=null;if(y!==void 0)for(const x of y){const E=x(h);E!==null&&(m===null||(m.priority||0)<=(E.priority||0))&&(m=E)}return m!==null?m.conversion:null})(n,e),c=a?a(n):null;let u=null;if(c!==null){u=c.after;const h=c.node;if(l=Array.isArray(h)?h[h.length-1]:h,l!==null){for(const[,p]of i)if(l=p(l,o),!l)break;l&&s.push(...Array.isArray(h)?h:[l])}c.forChild!=null&&i.set(n.nodeName,c.forChild)}const d=n.childNodes;let f=[];const g=(l==null||!Te(l))&&(l!=null&&Zr(l)||r);for(let h=0;h<d.length;h++)f.push(...ca(d[h],e,t,g,new Map(i),l));return u!=null&&(f=u(f)),qn(n)&&(f=Ru(n,f,g?()=>{const h=new xi;return t.push(h),h}:te)),l==null?f.length>0?s=s.concat(f):qn(n)&&(function(h){return h.nextSibling==null||h.previousSibling==null?!1:ii(h.nextSibling)&&ii(h.previousSibling)})(n)&&(s=s.concat(it())):v(l)&&l.append(...f),s}function Ru(n,e,t){const r=n.style.textAlign,i=[];let o=[];for(let s=0;s<e.length;s++){const l=e[s];if(Zr(l))r&&!l.getFormat()&&l.setFormat(r),i.push(l);else if(o.push(l),s===e.length-1||s<e.length-1&&Zr(e[s+1])){const a=t();a.setFormat(r),a.append(...o),i.push(a),o=[]}}return i}function Yn(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function $u(n,e=A()){return e==null&&Yn(166),T(e)&&e.isCollapsed()||e.getNodes().length===0?"":Iu(n,e)}function Ku(n,e=A()){return e==null&&Yn(166),T(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(Bu(n,e))}function es(n,e,t){const r=n.getData("application/x-lexical-editor");if(r)try{const l=JSON.parse(r);if(l.namespace===t._config.namespace&&Array.isArray(l.nodes))return ts(t,zu(l.nodes),e)}catch(l){console.error(l)}const i=n.getData("text/html"),o=n.getData("text/plain");if(i&&o!==i)try{const l=new DOMParser().parseFromString((function(a){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:c=>c}).createHTML(a):a})(i),"text/html");return ts(t,Lu(t,l),e)}catch(l){console.error(l)}const s=o||n.getData("text/uri-list");if(s!=null)if(T(e)){const l=s.split(/(\r?\n|\t)/);l[l.length-1]===""&&l.pop();for(let a=0;a<l.length;a++){const c=A();if(T(c)){const u=l[a];u===`
|
|
13
|
-
`||u===`\r
|
|
14
|
-
`?c.insertParagraph():u===" "?c.insertNodes([an()]):c.insertText(u)}}}else e.insertRawText(s)}function ts(n,e,t){n.dispatchCommand(ja,{nodes:e,selection:t})||(t.insertNodes(e),(function(r){if(T(r)&&r.isCollapsed()){const i=r.anchor;let o=null;const s=Oe(i,"previous");if(s)if(ke(s))o=s.origin;else{const l=Je(s,ye(V(),"next").getFlipped());for(const a of l){if(O(a.origin)){o=a.origin;break}if(v(a.origin)&&!a.origin.isInline())break}}if(o&&O(o)){const l=o.getFormat(),a=o.getStyle();r.format===l&&r.style===a||(r.format=l,r.style=a,r.dirty=!0)}}})(t))}function ua(n,e,t,r=[]){let i=e===null||t.isSelected(e);const o=v(t)&&t.excludeFromCopy("html");let s=t;e!==null&&O(s)&&(s=Wl(e,s,"clone"));const l=v(s)?s.getChildren():[],a=(function(c){const u=c.exportJSON(),d=c.constructor;if(u.type!==d.getType()&&Yn(58,d.name),v(c)){const f=u.children;Array.isArray(f)||Yn(59,d.name)}return u})(s);O(s)&&s.getTextContentSize()===0&&(i=!1);for(let c=0;c<l.length;c++){const u=l[c],d=ua(n,e,u,a.children);!i&&v(t)&&d&&t.extractWithChild(u,e,"clone")&&(i=!0)}if(i&&!o)r.push(a);else if(Array.isArray(a.children))for(let c=0;c<a.children.length;c++){const u=a.children[c];r.push(u)}return i}function Bu(n,e){const t=[],r=V().getChildren();for(let i=0;i<r.length;i++)ua(n,e,r[i],t);return{namespace:n._config.namespace,nodes:t}}function zu(n){const e=[];for(let t=0;t<n.length;t++){const r=n[t],i=Cc(r);O(i)&&eu(i),e.push(i)}return e}let xt=null;async function ns(n,e,t){if(xt!==null)return!1;if(e!==null)return new Promise((c,u)=>{n.update(()=>{c(rs(n,e,t))})});const r=n.getRootElement(),i=n._window||window,o=i.document,s=ve(i);if(r===null||s===null)return!1;const l=o.createElement("span");l.style.cssText="position: fixed; top: -1000px;",l.append(o.createTextNode("#")),r.append(l);const a=new Range;return a.setStart(l,0),a.setEnd(l,1),s.removeAllRanges(),s.addRange(a),new Promise((c,u)=>{const d=n.registerCommand(tr,f=>(We(f,ClipboardEvent)&&(d(),xt!==null&&(i.clearTimeout(xt),xt=null),c(rs(n,f,t))),!0),kc);xt=i.setTimeout(()=>{d(),xt=null,c(!1)},50),o.execCommand("copy"),l.remove()})}function rs(n,e,t){if(t===void 0){const i=ve(n._window),o=A();if(!o||o.isCollapsed()||!i)return!1;const s=i.anchorNode,l=i.focusNode;if(s!==null&&l!==null&&!fn(n,s,l))return!1;t=Wu(o)}e.preventDefault();const r=e.clipboardData;return r!==null&&(Uu(r,t),!0)}const fa=[["text/html",$u],["application/x-lexical-editor",Ku]];function Wu(n=A()){const e={"text/plain":n?n.getTextContent():""};if(n){const t=sr();for(const[r,i]of fa){const o=i(t,n);o!==null&&(e[r]=o)}}return e}function Uu(n,e){for(const[t]of fa)e[t]===void 0&&n.setData(t,"");for(const t in e){const r=e[t];r!==void 0&&n.setData(t,r)}}function is(n,e){if(document.caretRangeFromPoint!==void 0){const t=document.caretRangeFromPoint(n,e);return t===null?null:{node:t.startContainer,offset:t.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const t=document.caretPositionFromPoint(n,e);return t===null?null:{node:t.offsetNode,offset:t.offset}}return null}const pt=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,ju=pt&&"documentMode"in document?document.documentMode:null,Ju=pt&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Vu=!(!pt||!("InputEvent"in window)||ju)&&"getTargetRanges"in new window.InputEvent("input"),Hu=pt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),os=pt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,qu=pt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Yu=pt&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Ju&&!qu,ss=P("DRAG_DROP_PASTE_FILE");class dr extends Ve{static getType(){return"quote"}static clone(e){return new dr(e.__key)}createDOM(e){const t=document.createElement("blockquote");return ur(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:Gu,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(ie(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r);const i=this.getDirection();i&&(t.dir=i)}return{element:t}}static importJSON(e){return da().updateFromJSON(e)}insertNewAfter(e,t){const r=te(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,t),r}collapseAtStart(){const e=te();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function da(){return He(new dr)}function Zf(n){return n instanceof dr}class hr extends Ve{__tag;static getType(){return"heading"}static clone(e){return new hr(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){const t=this.getWritable();return this.__tag=e,t}createDOM(e){const t=this.__tag,r=document.createElement(t),i=e.theme.heading;if(i!==void 0){const o=i[t];ur(r,o)}return r}updateDOM(e,t,r){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:vt,priority:0}),h2:e=>({conversion:vt,priority:0}),h3:e=>({conversion:vt,priority:0}),h4:e=>({conversion:vt,priority:0}),h5:e=>({conversion:vt,priority:0}),h6:e=>({conversion:vt,priority:0}),p:e=>{const t=e.firstChild;return t!==null&&ls(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>ls(e)?{conversion:t=>({node:Vt("h1")}),priority:3}:null}}exportDOM(e){const{element:t}=super.exportDOM(e);if(ie(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r);const i=this.getDirection();i&&(t.dir=i)}return{element:t}}static importJSON(e){return Vt(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){const r=e?e.anchor.offset:0,i=this.getLastDescendant(),o=!i||e&&e.anchor.key===i.getKey()&&r===i.getTextContentSize()||!e?te():Vt(this.getTag()),s=this.getDirection();if(o.setDirection(s),this.insertAfter(o,t),r===0&&!this.isEmpty()&&e){const l=te();l.select(),this.replace(l,!0)}return o}collapseAtStart(){const e=this.isEmpty()?te():Vt(this.getTag());return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}extractWithChild(){return!0}}function ls(n){return n.nodeName.toLowerCase()==="span"&&n.style.fontSize==="26pt"}function vt(n){const e=n.nodeName.toLowerCase();let t=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(t=Vt(e),n.style!==null&&(Oi(n,t),t.setFormat(n.style.textAlign))),{node:t}}function Gu(n){const e=da();return n.style!==null&&(e.setFormat(n.style.textAlign),Oi(n,e)),{node:e}}function Vt(n="h1"){return He(new hr(n))}function Qf(n){return n instanceof hr}function Nn(n){let e=null;if(We(n,DragEvent)?e=n.dataTransfer:We(n,ClipboardEvent)&&(e=n.clipboardData),e===null)return[!1,[],!1];const t=e.types,r=t.includes("Files"),i=t.includes("text/html")||t.includes("text/plain");return[r,Array.from(e.files),i]}function as(n){const e=A();if(!T(e))return!1;const t=new Set,r=e.getNodes();for(let i=0;i<r.length;i++){const o=r[i],s=o.getKey();if(t.has(s))continue;const l=ce(o,c=>v(c)&&!c.isInline());if(l===null)continue;const a=l.getKey();l.canIndent()&&!t.has(a)&&(t.add(a),n(l))}return t.size>0}function cs(n){const e=Ft(n);return R(e)}function Pr(n){for(const e of["lowercase","uppercase","capitalize"])n.hasFormat(e)&&n.toggleFormat(e)}function Xu(n){return ut(n.registerCommand(ws,e=>{const t=A();return!!ae(t)&&(t.clear(),!0)},I),n.registerCommand(Ze,e=>{const t=A();return T(t)?(t.deleteCharacter(e),!0):!!ae(t)&&(t.deleteNodes(),!0)},I),n.registerCommand(en,e=>{const t=A();return!!T(t)&&(t.deleteWord(e),!0)},I),n.registerCommand(tn,e=>{const t=A();return!!T(t)&&(t.deleteLine(e),!0)},I),n.registerCommand(Nt,e=>{const t=A();if(typeof e=="string")t!==null&&t.insertText(e);else{if(t===null)return!1;const r=e.dataTransfer;if(r!=null)es(r,t,n);else if(T(t)){const i=e.data;return i&&t.insertText(i),!0}}return!0},I),n.registerCommand(Wr,()=>{const e=A();return!!T(e)&&(e.removeText(),!0)},I),n.registerCommand(Be,e=>{const t=A();return!!T(t)&&(t.formatText(e),!0)},I),n.registerCommand(Ya,e=>{const t=A();if(!T(t)&&!ae(t))return!1;const r=t.getNodes();for(const i of r){const o=ce(i,s=>v(s)&&!s.isInline());o!==null&&o.setFormat(e)}return!0},I),n.registerCommand(kt,e=>{const t=A();return!!T(t)&&(t.insertLineBreak(e),!0)},I),n.registerCommand(Kn,()=>{const e=A();return!!T(e)&&(e.insertParagraph(),!0)},I),n.registerCommand(Ha,()=>(xc([an()]),!0),I),n.registerCommand(qa,()=>as(e=>{const t=e.getIndent();e.setIndent(t+1)}),I),n.registerCommand(to,()=>as(e=>{const t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),I),n.registerCommand(Rs,e=>{const t=A();if(ae(t)){const r=t.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectPrevious(),!0}else if(T(t)){const r=ei(t.focus,!0);if(!e.shiftKey&&R(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),e.preventDefault(),!0}return!1},I),n.registerCommand($s,e=>{const t=A();if(ae(t)){const r=t.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectNext(0,0),!0}else if(T(t)){if((function(i){const o=i.focus;return o.key==="root"&&o.offset===V().getChildrenSize()})(t))return e.preventDefault(),!0;const r=ei(t.focus,!1);if(!e.shiftKey&&R(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),e.preventDefault(),!0}return!1},I),n.registerCommand(Is,e=>{const t=A();if(ae(t)){const r=t.getNodes();if(r.length>0)return e.preventDefault(),zo(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!T(t))return!1;if(Wo(t,!0)){const r=e.shiftKey;return e.preventDefault(),Uo(t,r,!0),!0}return!1},I),n.registerCommand(Ls,e=>{const t=A();if(ae(t)){const i=t.getNodes();if(i.length>0)return e.preventDefault(),zo(i[0])?i[0].selectPrevious():i[0].selectNext(0,0),!0}if(!T(t))return!1;const r=e.shiftKey;return!!Wo(t,!1)&&(e.preventDefault(),Uo(t,r,!1),!0)},I),n.registerCommand(Bs,e=>{if(cs(e.target))return!1;const t=A();if(T(t)){if((function(r){if(!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;const o=i.getNode();if(ee(o))return!1;const s=iu(o);return s.getIndent()>0&&(s.is(o)||o.is(s.getFirstDescendant()))})(t))return e.preventDefault(),n.dispatchCommand(to,void 0);if(os&&navigator.language==="ko-KR")return!1}else if(!ae(t))return!1;return e.preventDefault(),n.dispatchCommand(Ze,!0)},I),n.registerCommand(Ws,e=>{if(cs(e.target))return!1;const t=A();return!(!T(t)&&!ae(t))&&(e.preventDefault(),n.dispatchCommand(Ze,!1))},I),n.registerCommand(Bn,e=>{const t=A();if(!T(t))return!1;if(Pr(t),e!==null){if((os||Hu||Yu)&&Vu)return!1;if(e.preventDefault(),e.shiftKey)return n.dispatchCommand(kt,!1)}return n.dispatchCommand(Kn,void 0)},I),n.registerCommand(zs,()=>{const e=A();return!!T(e)&&(n.blur(),!0)},I),n.registerCommand(js,e=>{const[,t]=Nn(e);if(t.length>0){const i=is(e.clientX,e.clientY);if(i!==null){const{offset:o,node:s}=i,l=Ft(s);if(l!==null){const a=gi();if(O(l))a.anchor.set(l.getKey(),o,"text"),a.focus.set(l.getKey(),o,"text");else{const u=l.getParentOrThrow().getKey(),d=l.getIndexWithinParent()+1;a.anchor.set(u,d,"element"),a.focus.set(u,d,"element")}const c=At(a);se(c)}n.dispatchCommand(ss,t)}return e.preventDefault(),!0}const r=A();return!!T(r)},I),n.registerCommand(Js,e=>{const[t]=Nn(e),r=A();return!(t&&!T(r))},I),n.registerCommand(Vs,e=>{const[t]=Nn(e),r=A();if(t&&!T(r))return!1;const i=is(e.clientX,e.clientY);if(i!==null){const o=Ft(i.node);R(o)&&e.preventDefault()}return!0},I),n.registerCommand(Ur,()=>(Mc(),!0),I),n.registerCommand(tr,e=>(ns(n,We(e,ClipboardEvent)?e:null),!0),I),n.registerCommand(di,e=>((async function(t,r){await ns(r,We(t,ClipboardEvent)?t:null),r.update(()=>{const i=A();T(i)?i.removeText():ae(i)&&i.getNodes().forEach(o=>o.remove())})})(e,n),!0),I),n.registerCommand(er,e=>{const[,t,r]=Nn(e);return t.length>0&&!r?(n.dispatchCommand(ss,t),!0):Bt(e.target)&&Ci(e.target)?!1:A()!==null&&((function(i,o){i.preventDefault(),o.update(()=>{const s=A(),l=We(i,InputEvent)||We(i,KeyboardEvent)?null:i.clipboardData;l!=null&&s!==null&&es(l,s,o)},{tag:sc})})(e,n),!0)},I),n.registerCommand(Ks,e=>{const t=A();return T(t)&&Pr(t),!1},I),n.registerCommand(Us,e=>{const t=A();return T(t)&&Pr(t),!1},I))}function Zu(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Ri=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?B.useLayoutEffect:B.useEffect;function Qu({editor:n,ErrorBoundary:e}){return(function(t,r){const[i,o]=B.useState(()=>t.getDecorators());return Ri(()=>t.registerDecoratorListener(s=>{Bi.flushSync(()=>{o(s)})}),[t]),B.useEffect(()=>{o(t.getDecorators())},[t]),B.useMemo(()=>{const s=[],l=Object.keys(i);for(let a=0;a<l.length;a++){const c=l[a],u=q.jsx(r,{onError:f=>t._onError(f),children:q.jsx(B.Suspense,{fallback:null,children:i[c]})}),d=t.getElementByKey(c);d!==null&&s.push(Bi.createPortal(u,d,c))}return s},[r,i,t])})(n,e)}function ef({editor:n,ErrorBoundary:e}){return(function(t){const r=ta.maybeFromEditor(t);if(r&&r.hasExtensionByName(Mu.name)){for(const i of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(i)&&Zu(320,i);return!0}return!1})(n)?null:q.jsx(Qu,{editor:n,ErrorBoundary:e})}function us(n){return n.getEditorState().read(sa(n.isComposing()))}function ed({contentEditable:n,placeholder:e=null,ErrorBoundary:t}){const[r]=Gn();return(function(i){Ri(()=>ut(Xu(i),Fu(i)),[i])})(r),q.jsxs(q.Fragment,{children:[n,q.jsx(tf,{content:e}),q.jsx(ef,{editor:r,ErrorBoundary:t})]})}function tf({content:n}){const[e]=Gn(),t=(function(i){const[o,s]=B.useState(()=>us(i));return Ri(()=>{function l(){const a=us(i);s(a)}return l(),ut(i.registerUpdateListener(()=>{l()}),i.registerEditableListener(()=>{l()}))},[i]),o})(e),r=Ou();return t?typeof n=="function"?n(r):n:null}const ha=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?B.useLayoutEffect:B.useEffect;function nf({editor:n,ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:o,ariaExpanded:s,ariaInvalid:l,ariaLabel:a,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:d,ariaRequired:f,autoCapitalize:g,className:h,id:p,role:_="textbox",spellCheck:y=!0,style:m,tabIndex:x,"data-testid":E,...N},b){const[w,S]=B.useState(n.isEditable()),C=B.useCallback(F=>{F&&F.ownerDocument&&F.ownerDocument.defaultView?n.setRootElement(F):n.setRootElement(null)},[n]),D=B.useMemo(()=>(function(...F){return $=>{for(const L of F)typeof L=="function"?L($):L!=null&&(L.current=$)}})(b,C),[C,b]);return ha(()=>(S(n.isEditable()),n.registerEditableListener(F=>{S(F)})),[n]),q.jsx("div",{"aria-activedescendant":w?e:void 0,"aria-autocomplete":w?t:"none","aria-controls":w?r:void 0,"aria-describedby":i,...o!=null?{"aria-errormessage":o}:{},"aria-expanded":w&&_==="combobox"?!!s:void 0,...l!=null?{"aria-invalid":l}:{},"aria-label":a,"aria-labelledby":c,"aria-multiline":u,"aria-owns":w?d:void 0,"aria-readonly":!w||void 0,"aria-required":f,autoCapitalize:g,className:h,contentEditable:w,"data-testid":E,id:p,ref:D,role:_,spellCheck:y,style:m,tabIndex:x,...N})}const rf=B.forwardRef(nf);function fs(n){return n.getEditorState().read(sa(n.isComposing()))}const of=B.forwardRef(sf);function sf(n,e){const{placeholder:t,...r}=n,[i]=Gn();return q.jsxs(q.Fragment,{children:[q.jsx(rf,{editor:i,...r,ref:e}),t!=null&&q.jsx(lf,{editor:i,content:t})]})}function lf({content:n,editor:e}){const t=(function(s){const[l,a]=B.useState(()=>fs(s));return ha(()=>{function c(){const u=fs(s);a(u)}return c(),ut(s.registerUpdateListener(()=>{c()}),s.registerEditableListener(()=>{c()}))},[s]),l})(e),[r,i]=B.useState(e.isEditable());if(B.useLayoutEffect(()=>(i(e.isEditable()),e.registerEditableListener(s=>{i(s)})),[e]),!t)return null;let o=null;return typeof n=="function"?o=n(r):n!==null&&(o=n),o===null?null:q.jsx("div",{"aria-hidden":!0,children:o})}const af=pa(of);function cf(n){const e=ga.c(7),{onRef:t,fullWidth:r,padding:i}=n,o=r===void 0?!1:r,s=o?"flex-start":"center",l=o?"100%":"720px";let a;e[0]!==l?(a=q.jsx(af,{height:"fit-content",minH:"100%",width:"100%",maxWidth:l,textStyle:"paragraph/M/regular",position:"relative",outline:"none"}),e[0]=l,e[1]=a):a=e[1];let c;return e[2]!==t||e[3]!==i||e[4]!==s||e[5]!==a?(c=q.jsx(zi,{className:"rich-text",height:"100%",overflow:"auto",position:"relative",children:q.jsx(zi,{ref:t,width:"100%",padding:i,justifyContent:s,children:a})}),e[2]=t,e[3]=i,e[4]=s,e[5]=a,e[6]=c):c=e[6],c}cf.__docgenInfo={description:"",methods:[],displayName:"ContentEditable",props:{onRef:{required:!1,tsType:{name:"signature",type:"function",raw:"(elem: HTMLDivElement) => void",signature:{arguments:[{type:{name:"HTMLDivElement"},name:"elem"}],return:{name:"void"}}},description:""},fullWidth:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},padding:{required:!1,tsType:{name:"string"},description:""}}};const td={code:"rich-text__code",codeHighlight:{atrule:"rich-text__tokenAttr",attr:"rich-text__tokenAttr",boolean:"rich-text__tokenProperty",builtin:"rich-text__tokenSelector",cdata:"rich-text__tokenComment",char:"rich-text__tokenSelector",class:"rich-text__tokenFunction","class-name":"rich-text__tokenFunction",comment:"rich-text__tokenComment",constant:"rich-text__tokenProperty",deleted:"rich-text__tokenProperty",doctype:"rich-text__tokenComment",entity:"rich-text__tokenOperator",function:"rich-text__tokenFunction",important:"rich-text__tokenVariable",inserted:"rich-text__tokenSelector",keyword:"rich-text__tokenAttr",namespace:"rich-text__tokenVariable",number:"rich-text__tokenProperty",operator:"rich-text__tokenOperator",prolog:"rich-text__tokenComment",property:"rich-text__tokenProperty",punctuation:"rich-text__tokenPunctuation",regex:"rich-text__tokenVariable",selector:"rich-text__tokenSelector",string:"rich-text__tokenSelector",symbol:"rich-text__tokenProperty",tag:"rich-text__tokenProperty",url:"rich-text__tokenOperator",variable:"rich-text__tokenVariable"},embedBlock:{base:"rich-text__embedBlock",focus:"rich-text__embedBlockFocus"},list:{checklist:"rich-text__checklist",listitem:"rich-text__listItem",listitemChecked:"rich-text__listItemChecked",listitemUnchecked:"rich-text__listItemUnchecked",nested:{listitem:"rich-text__nestedListItem"},olDepth:["rich-text__ol1","rich-text__ol2","rich-text__ol3","rich-text__ol4","rich-text__ol5"],ol:"rich-text__ol",ul:"rich-text__ul"},heading:{h1:"rich-text__h1",h2:"rich-text__h2",h3:"rich-text__h3"},paragraph:"rich-text__p",text:{underline:"rich-text__textUnderline",italic:"rich-text__textItalic",code:"rich-text__textCode"},link:"rich-text__link",quote:"rich-text__quote",reference:"rich-text__reference",table:"rich-text__table",tableCell:"rich-text__tableCell",tableRow:"rich-text__tableRow",tableCellHeader:"rich-text__tableCellHeader",layoutContainer:"rich-text__layoutContainer",layoutItem:"rich-text__layoutItem",draggableBlockDemo:{row:"rich-text__row",content:"rich-text__content"}};export{kf as $,zs as A,If as B,cf as C,V as D,Ve as E,ee as F,Za as G,Xa as H,Lf as I,$s as J,ft as K,ed as L,td as M,T as N,v as O,R as P,ml as Q,bf as R,Fs as S,mi as T,ac as U,wo as V,qt as W,Tt as X,vf as Y,dr as Z,O as _,Lc as a,Iu as a$,gn as a0,hr as a1,ae as a2,al as a3,se as a4,He as a5,Cu as a6,ws as a7,Ff as a8,Gf as a9,Ye as aA,kn as aB,mf as aC,$a as aD,Vt as aE,Tf as aF,Ns as aG,kc as aH,Be as aI,xf as aJ,yf as aK,Ef as aL,Af as aM,Yf as aN,ai as aO,Vf as aP,Df as aQ,Pf as aR,we as aS,At as aT,cn as aU,tt as aV,Of as aW,Mf as aX,Ft as aY,Wf as aZ,sr as a_,zf as aa,Xf as ab,Hf as ac,Cf as ad,ne as ae,cr as af,Rf as ag,pl as ah,Kn as ai,ce as aj,Te as ak,wf as al,Bf as am,on as an,_e as ao,ye as ap,il as aq,an as ar,it as as,Bc as at,Y as au,Kf as av,Qf as aw,Zf as ax,da as ay,Mt as az,Ac as b,lc as c,P as d,te as e,Uf as f,ut as g,Ps as h,_f as i,A as j,et as k,I as l,ur as m,Jf as n,Gn as o,ie as p,Sf as q,$f as r,Nf as s,ve as t,vs as u,Bn as v,Q as w,Ds as x,Us as y,Rs as z};
|