@nimbus-ds/patterns 1.7.0-rc.2 → 1.7.0-rc.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/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"./index.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,SAAUA,QAAQ,yBAA0BA,QAAQ,oBAAqBA,QAAQ,qBAAsBA,QAAQ,WAAYA,QAAQ,aAAcA,QAAQ,oBAAqBA,QAAQ,aAC9L,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,QAAS,wBAAyB,mBAAoB,oBAAqB,UAAW,YAAa,mBAAoB,YAAaJ,GAClH,iBAAZC,QACdA,QAAQ,uBAAyBD,EAAQG,QAAQ,SAAUA,QAAQ,yBAA0BA,QAAQ,oBAAqBA,QAAQ,qBAAsBA,QAAQ,WAAYA,QAAQ,aAAcA,QAAQ,oBAAqBA,QAAQ,aAEvOJ,EAAK,uBAAyBC,EAAQD,EAAY,MAAGA,EAAK,yBAA0BA,EAAK,oBAAqBA,EAAK,qBAAsBA,EAAc,QAAGA,EAAK,aAAcA,EAAK,oBAAqBA,EAAK,YAC7M,CATD,CASGO,QAAQ,CAACC,EAAmCC,EAAmDC,EAA8CC,EAA+CC,EAAqCC,EAAuCC,EAA8CC,wGCDzT,IAAIC,EAAO,EAAQ,mDACfC,EAAY,EAAQ,6DACpBC,EAAQ,EAAQ,qDAChBC,EAAU,EAAQ,WAStB,MAAMC,EAAgC,oBAAXC,aAAqD,IAApBA,OAAOC,eAAqE,IAAlCD,OAAOC,SAASC,cAUhHC,EAAkBC,GAAgBL,GAAeK,GAAgBJ,QAAQK,eAAiB,KAYhG,SAASC,EAAgBC,GACvB,MAAMX,EAAYE,EAAQU,gBAE1B,GAAiB,MAAbZ,EAEA,MAAMa,MAAM,mCAKhB,OAAIX,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B,IAAIC,EAAS6tD,EAAyBE,GAAY,CAGjDhuD,QAAS,CAAC,GAOX,OAHAkuD,EAAoBF,GAAU/tD,EAAQA,EAAOD,QAAS+tD,GAG/C9tD,EAAOD,OACf,QCrBA+tD,EAAoBnG,EAAI,CAAC5nD,EAASmuD,KACjC,IAAI,IAAI78C,KAAO68C,EACXJ,EAAoBhhC,EAAEohC,EAAY78C,KAASy8C,EAAoBhhC,EAAE/sB,EAASsR,IAC5EiZ,OAAOm+B,eAAe1oD,EAASsR,EAAK,CAAEo6C,YAAY,EAAM56C,IAAKq9C,EAAW78C,IAE1E,ECNDy8C,EAAoBhhC,EAAI,CAACqhC,EAAKC,IAAU9jC,OAAOK,UAAUC,eAAe7U,KAAKo4C,EAAKC,GCClFN,EAAoBnpD,EAAK5E,IACH,oBAAXmrC,QAA0BA,OAAOmjB,aAC1C/jC,OAAOm+B,eAAe1oD,EAASmrC,OAAOmjB,YAAa,CAAE9vC,MAAO,WAE7D+L,OAAOm+B,eAAe1oD,EAAS,aAAc,CAAEwe,OAAO,GAAO,ECFpCuvC,EAAoB","sources":["webpack://@nimbus-ds/patterns/webpack/universalModuleDefinition","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/clipboard/LexicalClipboard.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/clipboard/LexicalClipboard.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/dragon/LexicalDragon.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/dragon/LexicalDragon.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/history/LexicalHistory.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/history/LexicalHistory.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/html/LexicalHtml.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/html/LexicalHtml.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/link/LexicalLink.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/link/LexicalLink.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/list/LexicalList.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/list/LexicalList.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalAutoFocusPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalAutoFocusPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalComposer.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalComposer.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalComposerContext.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalComposerContext.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalContentEditable.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalContentEditable.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalDecoratorBlockNode.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalDecoratorBlockNode.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalErrorBoundary.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalErrorBoundary.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalHistoryPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalHistoryPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalLinkPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalLinkPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalListPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalListPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalOnChangePlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalOnChangePlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalRichTextPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalRichTextPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalTabIndentationPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalTabIndentationPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/useLexicalEditable.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/useLexicalEditable.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/rich-text/LexicalRichText.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/rich-text/LexicalRichText.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/selection/LexicalSelection.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/selection/LexicalSelection.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/text/LexicalText.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/text/LexicalText.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/utils/LexicalUtils.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/utils/LexicalUtils.js","webpack://@nimbus-ds/patterns/./src/components/AppShell/src/AppShell.tsx","webpack://@nimbus-ds/patterns/./src/components/AppShell/src/components/AppShellHeader/AppShellHeader.tsx","webpack://@nimbus-ds/patterns/./src/components/AppShell/src/components/AppShellHeader/index.ts","webpack://@nimbus-ds/patterns/./src/components/AppShell/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/AppShell/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/Calendar.tsx","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/CustomCaptionLabel/CustomCaptionLabel.tsx","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/CustomCaptionLabel/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/CustomDay/CustomDay.tsx","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/CustomDay/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/Weekdays/Weekdays.tsx","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/Weekdays/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/Wrapper/Wrapper.tsx","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/Wrapper/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/utils/getWeekdays.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/utils/index.ts","webpack://@nimbus-ds/patterns/./src/components/CalloutCard/src/CalloutCard.tsx","webpack://@nimbus-ds/patterns/./src/components/CalloutCard/src/calloutCard.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/CalloutCard/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataList/src/DataList.tsx","webpack://@nimbus-ds/patterns/./src/components/DataList/src/components/DataListRow/DataListRow.tsx","webpack://@nimbus-ds/patterns/./src/components/DataList/src/components/DataListRow/dataListRow.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/DataList/src/components/DataListRow/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataList/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataList/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/DataTable.tsx","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableBulkActions/DataTableBulkActions.tsx","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableBulkActions/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableCell/DataTableCell.tsx","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableCell/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableFooter/DataTableFooter.tsx","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableFooter/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableHeader/DataTableHeader.tsx","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableHeader/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableRow/DataTableRow.tsx","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableRow/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/Editor.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Bold/Bold.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Bold/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/ClearFormatting/ClearFormatting.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/ClearFormatting/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Header/Header.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Header/header.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Header/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/History/History.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/History/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Italic/Italic.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Italic/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Link/Link.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Link/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Link/link.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/OrderedList/OrderedList.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/OrderedList/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/UnorderedList/UnorderedList.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/UnorderedList/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Video/Video.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Video/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Button/Button.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Button/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Divider/Divider.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Divider/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Placeholder/Placeholder.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Placeholder/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Toolbar/Toolbar.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Toolbar/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Toolbar/toolbar.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/contexts/EditorContext/EditorContext.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/contexts/EditorContext/editorContext.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/contexts/EditorContext/editorContext.types.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/contexts/EditorContext/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/contexts/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/editor.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useEditor/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useEditor/useEditor.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useEditor/useEditor.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useEditorState/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useEditorState/useEditorState.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useToolbar/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useToolbar/useToolbar.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useToolbar/useToolbar.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomClearFormattingPlugin/CustomClearFormattingPlugin.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomClearFormattingPlugin/customClear.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomClearFormattingPlugin/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomHeadingPlugin/CustomHeadingPlugin.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomHeadingPlugin/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomParagraphPlugin/CustomParagraphPlugin.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomParagraphPlugin/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/DefaultPlugins/DefaultPlugins.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/DefaultPlugins/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/utils/customCommands.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/utils/index.ts","webpack://@nimbus-ds/patterns/./src/components/EmptyMessage/src/EmptyMessage.tsx","webpack://@nimbus-ds/patterns/./src/components/EmptyMessage/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/FormField/src/FormField.tsx","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/FormFieldInput/FormFieldInput.tsx","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/FormFieldInput/index.ts","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/FormFieldSelect/FormFieldSelect.tsx","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/FormFieldSelect/index.ts","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/FormFieldTextarea/FormFieldTextarea.tsx","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/FormFieldTextarea/index.ts","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/FormField/src/formField.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/FormField/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/HelpLink/src/HelpLink.tsx","webpack://@nimbus-ds/patterns/./src/components/HelpLink/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/InteractiveList.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListButtonItem/InteractiveListButtonItem.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListButtonItem/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListButtonItemSkeleton/InteractiveListButtonItemSkeleton.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListButtonItemSkeleton/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListCheckboxItem/InteractiveListCheckboxItem.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListCheckboxItem/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListCheckboxItemSkeleton/InteractiveListCheckboxItemSkeleton.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListCheckboxItemSkeleton/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListRadioItem/InteractiveListRadioItem.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListRadioItem/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListRadioItemSkeleton/InteractiveListRadioItemSkeleton.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListRadioItemSkeleton/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListRow/InteractiveListRow.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListRow/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListStructure/InteractiveListStructure.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListStructure/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListStructureSkeleton/InteractiveListStructureSkeleton.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListStructureSkeleton/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListToggleItem/InteractiveListToggleItem.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListToggleItem/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListToggleItemSkeleton/InteractiveListToggleItemSkeleton.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListToggleItemSkeleton/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/interactiveList.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Layout/src/Layout.tsx","webpack://@nimbus-ds/patterns/./src/components/Layout/src/components/LayoutSection/LayoutSection.tsx","webpack://@nimbus-ds/patterns/./src/components/Layout/src/components/LayoutSection/index.ts","webpack://@nimbus-ds/patterns/./src/components/Layout/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/Layout/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/Layout/src/layout.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Menu/src/Menu.tsx","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuBody/MenuBody.tsx","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuBody/index.ts","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuFooter/MenuFooter.tsx","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuFooter/index.ts","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuHeader/MenuHeader.tsx","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuHeader/index.ts","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuSection/MenuSection.tsx","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuSection/index.ts","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/Menu/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/MenuButton/src/MenuButton.tsx","webpack://@nimbus-ds/patterns/./src/components/MenuButton/src/components/MenuButtonAccordion/MenuButtonAccordion.tsx","webpack://@nimbus-ds/patterns/./src/components/MenuButton/src/components/MenuButtonAccordion/index.ts","webpack://@nimbus-ds/patterns/./src/components/MenuButton/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/MenuButton/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/NavTabs/src/NavTabs.tsx","webpack://@nimbus-ds/patterns/./src/components/NavTabs/src/components/NavTabsItem/NavTabsItem.tsx","webpack://@nimbus-ds/patterns/./src/components/NavTabs/src/components/NavTabsItem/index.ts","webpack://@nimbus-ds/patterns/./src/components/NavTabs/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/NavTabs/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/Page/src/Page.tsx","webpack://@nimbus-ds/patterns/./src/components/Page/src/components/PageBody/PageBody.tsx","webpack://@nimbus-ds/patterns/./src/components/Page/src/components/PageBody/index.ts","webpack://@nimbus-ds/patterns/./src/components/Page/src/components/PageHeader/PageHeader.tsx","webpack://@nimbus-ds/patterns/./src/components/Page/src/components/PageHeader/index.ts","webpack://@nimbus-ds/patterns/./src/components/Page/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/Page/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/ProductUpdates/src/ProductUpdates.tsx","webpack://@nimbus-ds/patterns/./src/components/ProductUpdates/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/SideModal/src/SideModal.tsx","webpack://@nimbus-ds/patterns/./src/components/SideModal/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/ThumbnailWithAction/src/ThumbnailWithAction.tsx","webpack://@nimbus-ds/patterns/./src/components/ThumbnailWithAction/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/ThumbnailWithAction/src/thumbnailWithAction.definitions.ts","webpack://@nimbus-ds/patterns/./src/index.ts","webpack://@nimbus-ds/patterns/../../node_modules/tslib/tslib.es6.js","webpack://@nimbus-ds/patterns/external umd \"@nimbus-ds/components\"","webpack://@nimbus-ds/patterns/external umd \"@nimbus-ds/icons\"","webpack://@nimbus-ds/patterns/external umd \"@nimbus-ds/styles\"","webpack://@nimbus-ds/patterns/external umd \"date-fns\"","webpack://@nimbus-ds/patterns/external umd \"lexical\"","webpack://@nimbus-ds/patterns/external umd \"react\"","webpack://@nimbus-ds/patterns/external umd \"react-day-picker\"","webpack://@nimbus-ds/patterns/external umd \"react-dom\"","webpack://@nimbus-ds/patterns/webpack/bootstrap","webpack://@nimbus-ds/patterns/webpack/runtime/define property getters","webpack://@nimbus-ds/patterns/webpack/runtime/hasOwnProperty shorthand","webpack://@nimbus-ds/patterns/webpack/runtime/make namespace object","webpack://@nimbus-ds/patterns/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"@nimbus-ds/components\"), require(\"@nimbus-ds/icons\"), require(\"@nimbus-ds/styles\"), require(\"lexical\"), require(\"react-dom\"), require(\"react-day-picker\"), require(\"date-fns\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"@nimbus-ds/components\", \"@nimbus-ds/icons\", \"@nimbus-ds/styles\", \"lexical\", \"react-dom\", \"react-day-picker\", \"date-fns\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@nimbus-ds/patterns\"] = factory(require(\"react\"), require(\"@nimbus-ds/components\"), require(\"@nimbus-ds/icons\"), require(\"@nimbus-ds/styles\"), require(\"lexical\"), require(\"react-dom\"), require(\"react-day-picker\"), require(\"date-fns\"));\n\telse\n\t\troot[\"@nimbus-ds/patterns\"] = factory(root[\"react\"], root[\"@nimbus-ds/components\"], root[\"@nimbus-ds/icons\"], root[\"@nimbus-ds/styles\"], root[\"lexical\"], root[\"react-dom\"], root[\"react-day-picker\"], root[\"date-fns\"]);\n})(global, (__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE__nimbus_ds_components__, __WEBPACK_EXTERNAL_MODULE__nimbus_ds_icons__, __WEBPACK_EXTERNAL_MODULE__nimbus_ds_styles__, __WEBPACK_EXTERNAL_MODULE_lexical__, __WEBPACK_EXTERNAL_MODULE_react_dom__, __WEBPACK_EXTERNAL_MODULE_react_day_picker__, __WEBPACK_EXTERNAL_MODULE_date_fns__) => {\nreturn ","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar html = require('@lexical/html');\nvar selection = require('@lexical/selection');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nconst getDOMSelection = targetWindow => CAN_USE_DOM ? (targetWindow || window).getSelection() : null;\n/**\n * Returns the *currently selected* Lexical content as an HTML string, relying on the\n * logic defined in the exportDOM methods on the LexicalNode classes. Note that\n * this will not return the HTML content of the entire editor (unless all the content is included\n * in the current selection).\n *\n * @param editor - LexicalEditor instance to get HTML content from\n * @returns a string of HTML content\n */\n\n\nfunction $getHtmlContent(editor) {\n const selection = lexical.$getSelection();\n\n if (selection == null) {\n {\n throw Error(`Expected valid LexicalSelection`);\n }\n } // If we haven't selected anything\n\n\n if (lexical.$isRangeSelection(selection) && selection.isCollapsed() || selection.getNodes().length === 0) {\n return '';\n }\n\n return html.$generateHtmlFromNodes(editor, selection);\n}\n/**\n * Returns the *currently selected* Lexical content as a JSON string, relying on the\n * logic defined in the exportJSON methods on the LexicalNode classes. Note that\n * this will not return the JSON content of the entire editor (unless all the content is included\n * in the current selection).\n *\n * @param editor - LexicalEditor instance to get the JSON content from\n * @returns\n */\n\nfunction $getLexicalContent(editor) {\n const selection = lexical.$getSelection();\n\n if (selection == null) {\n {\n throw Error(`Expected valid LexicalSelection`);\n }\n } // If we haven't selected anything\n\n\n if (lexical.$isRangeSelection(selection) && selection.isCollapsed() || selection.getNodes().length === 0) {\n return null;\n }\n\n return JSON.stringify($generateJSONFromSelectedNodes(editor, selection));\n}\n/**\n * Attempts to insert content of the mime-types text/plain or text/uri-list from\n * the provided DataTransfer object into the editor at the provided selection.\n * text/uri-list is only used if text/plain is not also provided.\n *\n * @param dataTransfer an object conforming to the [DataTransfer interface] (https://html.spec.whatwg.org/multipage/dnd.html#the-datatransfer-interface)\n * @param selection the selection to use as the insertion point for the content in the DataTransfer object\n */\n\nfunction $insertDataTransferForPlainText(dataTransfer, selection) {\n const text = dataTransfer.getData('text/plain') || dataTransfer.getData('text/uri-list');\n\n if (text != null) {\n selection.insertRawText(text);\n }\n}\n/**\n * Attempts to insert content of the mime-types application/x-lexical-editor, text/html,\n * text/plain, or text/uri-list (in descending order of priority) from the provided DataTransfer\n * object into the editor at the provided selection.\n *\n * @param dataTransfer an object conforming to the [DataTransfer interface] (https://html.spec.whatwg.org/multipage/dnd.html#the-datatransfer-interface)\n * @param selection the selection to use as the insertion point for the content in the DataTransfer object\n * @param editor the LexicalEditor the content is being inserted into.\n */\n\nfunction $insertDataTransferForRichText(dataTransfer, selection, editor) {\n const lexicalString = dataTransfer.getData('application/x-lexical-editor');\n\n if (lexicalString) {\n try {\n const payload = JSON.parse(lexicalString);\n\n if (payload.namespace === editor._config.namespace && Array.isArray(payload.nodes)) {\n const nodes = $generateNodesFromSerializedNodes(payload.nodes);\n return $insertGeneratedNodes(editor, nodes, selection);\n }\n } catch {// Fail silently.\n }\n }\n\n const htmlString = dataTransfer.getData('text/html');\n\n if (htmlString) {\n try {\n const parser = new DOMParser();\n const dom = parser.parseFromString(htmlString, 'text/html');\n const nodes = html.$generateNodesFromDOM(editor, dom);\n return $insertGeneratedNodes(editor, nodes, selection);\n } catch {// Fail silently.\n }\n } // Multi-line plain text in rich text mode pasted as separate paragraphs\n // instead of single paragraph with linebreaks.\n // Webkit-specific: Supports read 'text/uri-list' in clipboard.\n\n\n const text = dataTransfer.getData('text/plain') || dataTransfer.getData('text/uri-list');\n\n if (text != null) {\n if (lexical.$isRangeSelection(selection)) {\n const parts = text.split(/(\\r?\\n|\\t)/);\n const partsLength = parts.length;\n\n for (let i = 0; i < partsLength; i++) {\n const part = parts[i];\n\n if (part === '\\n' || part === '\\r\\n') {\n selection.insertParagraph();\n } else if (part === '\\t') {\n selection.insertNodes([lexical.$createTabNode()]);\n } else {\n selection.insertText(part);\n }\n }\n } else {\n selection.insertRawText(text);\n }\n }\n}\n/**\n * Inserts Lexical nodes into the editor using different strategies depending on\n * some simple selection-based heuristics. If you're looking for a generic way to\n * to insert nodes into the editor at a specific selection point, you probably want\n * {@link lexical.$insertNodes}\n *\n * @param editor LexicalEditor instance to insert the nodes into.\n * @param nodes The nodes to insert.\n * @param selection The selection to insert the nodes into.\n */\n\nfunction $insertGeneratedNodes(editor, nodes, selection) {\n const isSelectionInsideOfGrid = lexical.DEPRECATED_$isGridSelection(selection) || utils.$findMatchingParent(selection.anchor.getNode(), n => lexical.DEPRECATED_$isGridCellNode(n)) !== null && utils.$findMatchingParent(selection.focus.getNode(), n => lexical.DEPRECATED_$isGridCellNode(n)) !== null;\n\n if (isSelectionInsideOfGrid && nodes.length === 1 && lexical.DEPRECATED_$isGridNode(nodes[0])) {\n $mergeGridNodesStrategy(nodes, selection, false, editor);\n return;\n }\n\n $basicInsertStrategy(nodes, selection);\n return;\n}\n\nfunction $basicInsertStrategy(nodes, selection) {\n // Wrap text and inline nodes in paragraph nodes so we have all blocks at the top-level\n const topLevelBlocks = [];\n let currentBlock = null;\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n const isLineBreakNode = lexical.$isLineBreakNode(node);\n\n if (isLineBreakNode || lexical.$isDecoratorNode(node) && node.isInline() || lexical.$isElementNode(node) && node.isInline() || lexical.$isTextNode(node) || node.isParentRequired()) {\n if (currentBlock === null) {\n currentBlock = node.createParentElementNode();\n topLevelBlocks.push(currentBlock); // In the case of LineBreakNode, we just need to\n // add an empty ParagraphNode to the topLevelBlocks.\n\n if (isLineBreakNode) {\n continue;\n }\n }\n\n if (currentBlock !== null) {\n currentBlock.append(node);\n }\n } else {\n topLevelBlocks.push(node);\n currentBlock = null;\n }\n }\n\n if (lexical.$isRangeSelection(selection)) {\n selection.insertNodes(topLevelBlocks);\n } else if (lexical.DEPRECATED_$isGridSelection(selection)) {\n // If there's an active grid selection and a non grid is pasted, add to the anchor.\n const anchorCell = selection.anchor.getNode();\n\n if (!lexical.DEPRECATED_$isGridCellNode(anchorCell)) {\n {\n throw Error(`Expected Grid Cell in Grid Selection`);\n }\n }\n\n anchorCell.append(...topLevelBlocks);\n }\n}\n\nfunction $mergeGridNodesStrategy(nodes, selection, isFromLexical, editor) {\n if (nodes.length !== 1 || !lexical.DEPRECATED_$isGridNode(nodes[0])) {\n {\n throw Error(`$mergeGridNodesStrategy: Expected Grid insertion.`);\n }\n }\n\n const newGrid = nodes[0];\n const newGridRows = newGrid.getChildren();\n const newColumnCount = newGrid.getFirstChildOrThrow().getChildrenSize();\n const newRowCount = newGrid.getChildrenSize();\n const gridCellNode = utils.$findMatchingParent(selection.anchor.getNode(), n => lexical.DEPRECATED_$isGridCellNode(n));\n const gridRowNode = gridCellNode && utils.$findMatchingParent(gridCellNode, n => lexical.DEPRECATED_$isGridRowNode(n));\n const gridNode = gridRowNode && utils.$findMatchingParent(gridRowNode, n => lexical.DEPRECATED_$isGridNode(n));\n\n if (!lexical.DEPRECATED_$isGridCellNode(gridCellNode) || !lexical.DEPRECATED_$isGridRowNode(gridRowNode) || !lexical.DEPRECATED_$isGridNode(gridNode)) {\n {\n throw Error(`$mergeGridNodesStrategy: Expected selection to be inside of a Grid.`);\n }\n }\n\n const startY = gridRowNode.getIndexWithinParent();\n const stopY = Math.min(gridNode.getChildrenSize() - 1, startY + newRowCount - 1);\n const startX = gridCellNode.getIndexWithinParent();\n const stopX = Math.min(gridRowNode.getChildrenSize() - 1, startX + newColumnCount - 1);\n const fromX = Math.min(startX, stopX);\n const fromY = Math.min(startY, stopY);\n const toX = Math.max(startX, stopX);\n const toY = Math.max(startY, stopY);\n const gridRowNodes = gridNode.getChildren();\n let newRowIdx = 0;\n let newAnchorCellKey;\n let newFocusCellKey;\n\n for (let r = fromY; r <= toY; r++) {\n const currentGridRowNode = gridRowNodes[r];\n\n if (!lexical.DEPRECATED_$isGridRowNode(currentGridRowNode)) {\n {\n throw Error(`getNodes: expected to find GridRowNode`);\n }\n }\n\n const newGridRowNode = newGridRows[newRowIdx];\n\n if (!lexical.DEPRECATED_$isGridRowNode(newGridRowNode)) {\n {\n throw Error(`getNodes: expected to find GridRowNode`);\n }\n }\n\n const gridCellNodes = currentGridRowNode.getChildren();\n const newGridCellNodes = newGridRowNode.getChildren();\n let newColumnIdx = 0;\n\n for (let c = fromX; c <= toX; c++) {\n const currentGridCellNode = gridCellNodes[c];\n\n if (!lexical.DEPRECATED_$isGridCellNode(currentGridCellNode)) {\n {\n throw Error(`getNodes: expected to find GridCellNode`);\n }\n }\n\n const newGridCellNode = newGridCellNodes[newColumnIdx];\n\n if (!lexical.DEPRECATED_$isGridCellNode(newGridCellNode)) {\n {\n throw Error(`getNodes: expected to find GridCellNode`);\n }\n }\n\n if (r === fromY && c === fromX) {\n newAnchorCellKey = currentGridCellNode.getKey();\n } else if (r === toY && c === toX) {\n newFocusCellKey = currentGridCellNode.getKey();\n }\n\n const originalChildren = currentGridCellNode.getChildren();\n newGridCellNode.getChildren().forEach(child => {\n if (lexical.$isTextNode(child)) {\n const paragraphNode = lexical.$createParagraphNode();\n paragraphNode.append(child);\n currentGridCellNode.append(child);\n } else {\n currentGridCellNode.append(child);\n }\n });\n originalChildren.forEach(n => n.remove());\n newColumnIdx++;\n }\n\n newRowIdx++;\n }\n\n if (newAnchorCellKey && newFocusCellKey) {\n const newGridSelection = lexical.DEPRECATED_$createGridSelection();\n newGridSelection.set(gridNode.getKey(), newAnchorCellKey, newFocusCellKey);\n lexical.$setSelection(newGridSelection);\n editor.dispatchCommand(lexical.SELECTION_CHANGE_COMMAND, undefined);\n }\n}\n\nfunction exportNodeToJSON(node) {\n const serializedNode = node.exportJSON();\n const nodeClass = node.constructor; // @ts-expect-error TODO Replace Class utility type with InstanceType\n\n if (serializedNode.type !== nodeClass.getType()) {\n {\n throw Error(`LexicalNode: Node ${nodeClass.name} does not implement .exportJSON().`);\n }\n } // @ts-expect-error TODO Replace Class utility type with InstanceType\n\n\n const serializedChildren = serializedNode.children;\n\n if (lexical.$isElementNode(node)) {\n if (!Array.isArray(serializedChildren)) {\n {\n throw Error(`LexicalNode: Node ${nodeClass.name} is an element but .exportJSON() does not have a children array.`);\n }\n }\n }\n\n return serializedNode;\n}\n\nfunction $appendNodesToJSON(editor, selection$1, currentNode, targetArray = []) {\n let shouldInclude = selection$1 != null ? currentNode.isSelected(selection$1) : true;\n const shouldExclude = lexical.$isElementNode(currentNode) && currentNode.excludeFromCopy('html');\n let target = currentNode;\n\n if (selection$1 !== null) {\n let clone = selection.$cloneWithProperties(currentNode);\n clone = lexical.$isTextNode(clone) && selection$1 != null ? selection.$sliceSelectedTextNodeContent(selection$1, clone) : clone;\n target = clone;\n }\n\n const children = lexical.$isElementNode(target) ? target.getChildren() : [];\n const serializedNode = exportNodeToJSON(target); // TODO: TextNode calls getTextContent() (NOT node.__text) within it's exportJSON method\n // which uses getLatest() to get the text from the original node with the same key.\n // This is a deeper issue with the word \"clone\" here, it's still a reference to the\n // same node as far as the LexicalEditor is concerned since it shares a key.\n // We need a way to create a clone of a Node in memory with it's own key, but\n // until then this hack will work for the selected text extract use case.\n\n if (lexical.$isTextNode(target)) {\n const text = target.__text; // If an uncollapsed selection ends or starts at the end of a line of specialized,\n // TextNodes, such as code tokens, we will get a 'blank' TextNode here, i.e., one\n // with text of length 0. We don't want this, it makes a confusing mess. Reset!\n\n if (text.length > 0) {\n serializedNode.text = text;\n } else {\n shouldInclude = false;\n }\n }\n\n for (let i = 0; i < children.length; i++) {\n const childNode = children[i];\n const shouldIncludeChild = $appendNodesToJSON(editor, selection$1, childNode, serializedNode.children);\n\n if (!shouldInclude && lexical.$isElementNode(currentNode) && shouldIncludeChild && currentNode.extractWithChild(childNode, selection$1, 'clone')) {\n shouldInclude = true;\n }\n }\n\n if (shouldInclude && !shouldExclude) {\n targetArray.push(serializedNode);\n } else if (Array.isArray(serializedNode.children)) {\n for (let i = 0; i < serializedNode.children.length; i++) {\n const serializedChildNode = serializedNode.children[i];\n targetArray.push(serializedChildNode);\n }\n }\n\n return shouldInclude;\n} // TODO why $ function with Editor instance?\n\n/**\n * Gets the Lexical JSON of the nodes inside the provided Selection.\n *\n * @param editor LexicalEditor to get the JSON content from.\n * @param selection Selection to get the JSON content from.\n * @returns an object with the editor namespace and a list of serializable nodes as JavaScript objects.\n */\n\n\nfunction $generateJSONFromSelectedNodes(editor, selection) {\n const nodes = [];\n const root = lexical.$getRoot();\n const topLevelChildren = root.getChildren();\n\n for (let i = 0; i < topLevelChildren.length; i++) {\n const topLevelNode = topLevelChildren[i];\n $appendNodesToJSON(editor, selection, topLevelNode, nodes);\n }\n\n return {\n namespace: editor._config.namespace,\n nodes\n };\n}\n/**\n * This method takes an array of objects conforming to the BaseSeralizedNode interface and returns\n * an Array containing instances of the corresponding LexicalNode classes registered on the editor.\n * Normally, you'd get an Array of BaseSerialized nodes from {@link $generateJSONFromSelectedNodes}\n *\n * @param serializedNodes an Array of objects conforming to the BaseSerializedNode interface.\n * @returns an Array of Lexical Node objects.\n */\n\nfunction $generateNodesFromSerializedNodes(serializedNodes) {\n const nodes = [];\n\n for (let i = 0; i < serializedNodes.length; i++) {\n const serializedNode = serializedNodes[i];\n const node = lexical.$parseSerializedNode(serializedNode);\n\n if (lexical.$isTextNode(node)) {\n selection.$addNodeStyle(node);\n }\n\n nodes.push(node);\n }\n\n return nodes;\n}\nconst EVENT_LATENCY = 50;\nlet clipboardEventTimeout = null; // TODO custom selection\n// TODO potentially have a node customizable version for plain text\n\n/**\n * Copies the content of the current selection to the clipboard in\n * text/plain, text/html, and application/x-lexical-editor (Lexical JSON)\n * formats.\n *\n * @param editor the LexicalEditor instance to copy content from\n * @param event the native browser ClipboardEvent to add the content to.\n * @returns\n */\n\nasync function copyToClipboard(editor, event) {\n if (clipboardEventTimeout !== null) {\n // Prevent weird race conditions that can happen when this function is run multiple times\n // synchronously. In the future, we can do better, we can cancel/override the previously running job.\n return false;\n }\n\n if (event !== null) {\n return new Promise((resolve, reject) => {\n editor.update(() => {\n resolve($copyToClipboardEvent(editor, event));\n });\n });\n }\n\n const rootElement = editor.getRootElement();\n const windowDocument = editor._window == null ? window.document : editor._window.document;\n const domSelection = getDOMSelection(editor._window);\n\n if (rootElement === null || domSelection === null) {\n return false;\n }\n\n const element = windowDocument.createElement('span');\n element.style.cssText = 'position: fixed; top: -1000px;';\n element.append(windowDocument.createTextNode('#'));\n rootElement.append(element);\n const range = new Range();\n range.setStart(element, 0);\n range.setEnd(element, 1);\n domSelection.removeAllRanges();\n domSelection.addRange(range);\n return new Promise((resolve, reject) => {\n const removeListener = editor.registerCommand(lexical.COPY_COMMAND, secondEvent => {\n if (utils.objectKlassEquals(secondEvent, ClipboardEvent)) {\n removeListener();\n\n if (clipboardEventTimeout !== null) {\n window.clearTimeout(clipboardEventTimeout);\n clipboardEventTimeout = null;\n }\n\n resolve($copyToClipboardEvent(editor, secondEvent));\n } // Block the entire copy flow while we wait for the next ClipboardEvent\n\n\n return true;\n }, lexical.COMMAND_PRIORITY_CRITICAL); // If the above hack execCommand hack works, this timeout code should never fire. Otherwise,\n // the listener will be quickly freed so that the user can reuse it again\n\n clipboardEventTimeout = window.setTimeout(() => {\n removeListener();\n clipboardEventTimeout = null;\n resolve(false);\n }, EVENT_LATENCY);\n windowDocument.execCommand('copy');\n element.remove();\n });\n} // TODO shouldn't pass editor (pass namespace directly)\n\nfunction $copyToClipboardEvent(editor, event) {\n const domSelection = getDOMSelection(editor._window);\n\n if (!domSelection) {\n return false;\n }\n\n const anchorDOM = domSelection.anchorNode;\n const focusDOM = domSelection.focusNode;\n\n if (anchorDOM !== null && focusDOM !== null && !lexical.isSelectionWithinEditor(editor, anchorDOM, focusDOM)) {\n return false;\n }\n\n event.preventDefault();\n const clipboardData = event.clipboardData;\n const selection = lexical.$getSelection();\n\n if (clipboardData === null || selection === null) {\n return false;\n }\n\n const htmlString = $getHtmlContent(editor);\n const lexicalString = $getLexicalContent(editor);\n let plainString = '';\n\n if (selection !== null) {\n plainString = selection.getTextContent();\n }\n\n if (htmlString !== null) {\n clipboardData.setData('text/html', htmlString);\n }\n\n if (lexicalString !== null) {\n clipboardData.setData('application/x-lexical-editor', lexicalString);\n }\n\n clipboardData.setData('text/plain', plainString);\n return true;\n}\n\nexports.$generateJSONFromSelectedNodes = $generateJSONFromSelectedNodes;\nexports.$generateNodesFromSerializedNodes = $generateNodesFromSerializedNodes;\nexports.$getHtmlContent = $getHtmlContent;\nexports.$getLexicalContent = $getLexicalContent;\nexports.$insertDataTransferForPlainText = $insertDataTransferForPlainText;\nexports.$insertDataTransferForRichText = $insertDataTransferForRichText;\nexports.$insertGeneratedNodes = $insertGeneratedNodes;\nexports.copyToClipboard = copyToClipboard;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalClipboard = process.env.NODE_ENV === 'development' ? require('./LexicalClipboard.dev.js') : require('./LexicalClipboard.prod.js')\nmodule.exports = LexicalClipboard;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar lexical = require('lexical');\n\n/** @module @lexical/dragon */\nfunction registerDragonSupport(editor) {\n const origin = window.location.origin;\n\n const handler = event => {\n if (event.origin !== origin) {\n return;\n }\n\n const rootElement = editor.getRootElement();\n\n if (document.activeElement !== rootElement) {\n return;\n }\n\n const data = event.data;\n\n if (typeof data === 'string') {\n let parsedData;\n\n try {\n parsedData = JSON.parse(data);\n } catch (e) {\n return;\n }\n\n if (parsedData && parsedData.protocol === 'nuanria_messaging' && parsedData.type === 'request') {\n const payload = parsedData.payload;\n\n if (payload && payload.functionId === 'makeChanges') {\n const args = payload.args;\n\n if (args) {\n const [elementStart, elementLength, text, selStart, selLength, formatCommand] = args; // TODO: we should probably handle formatCommand somehow?\n editor.update(() => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isRangeSelection(selection)) {\n const anchor = selection.anchor;\n let anchorNode = anchor.getNode();\n let setSelStart = 0;\n let setSelEnd = 0;\n\n if (lexical.$isTextNode(anchorNode)) {\n // set initial selection\n if (elementStart >= 0 && elementLength >= 0) {\n setSelStart = elementStart;\n setSelEnd = elementStart + elementLength; // If the offset is more than the end, make it the end\n\n selection.setTextNodeRange(anchorNode, setSelStart, anchorNode, setSelEnd);\n }\n }\n\n if (setSelStart !== setSelEnd || text !== '') {\n selection.insertRawText(text);\n anchorNode = anchor.getNode();\n }\n\n if (lexical.$isTextNode(anchorNode)) {\n // set final selection\n setSelStart = selStart;\n setSelEnd = selStart + selLength;\n const anchorNodeTextLength = anchorNode.getTextContentSize(); // If the offset is more than the end, make it the end\n\n setSelStart = setSelStart > anchorNodeTextLength ? anchorNodeTextLength : setSelStart;\n setSelEnd = setSelEnd > anchorNodeTextLength ? anchorNodeTextLength : setSelEnd;\n selection.setTextNodeRange(anchorNode, setSelStart, anchorNode, setSelEnd);\n } // block the chrome extension from handling this event\n\n\n event.stopImmediatePropagation();\n }\n });\n }\n }\n }\n }\n };\n\n window.addEventListener('message', handler, true);\n return () => {\n window.removeEventListener('message', handler, true);\n };\n}\n\nexports.registerDragonSupport = registerDragonSupport;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalDragon = process.env.NODE_ENV === 'development' ? require('./LexicalDragon.dev.js') : require('./LexicalDragon.prod.js')\nmodule.exports = LexicalDragon;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\n\n/** @module @lexical/history */\nconst HISTORY_MERGE = 0;\nconst HISTORY_PUSH = 1;\nconst DISCARD_HISTORY_CANDIDATE = 2;\nconst OTHER = 0;\nconst COMPOSING_CHARACTER = 1;\nconst INSERT_CHARACTER_AFTER_SELECTION = 2;\nconst DELETE_CHARACTER_BEFORE_SELECTION = 3;\nconst DELETE_CHARACTER_AFTER_SELECTION = 4;\n\nfunction getDirtyNodes(editorState, dirtyLeaves, dirtyElements) {\n const nodeMap = editorState._nodeMap;\n const nodes = [];\n\n for (const dirtyLeafKey of dirtyLeaves) {\n const dirtyLeaf = nodeMap.get(dirtyLeafKey);\n\n if (dirtyLeaf !== undefined) {\n nodes.push(dirtyLeaf);\n }\n }\n\n for (const [dirtyElementKey, intentionallyMarkedAsDirty] of dirtyElements) {\n if (!intentionallyMarkedAsDirty) {\n continue;\n }\n\n const dirtyElement = nodeMap.get(dirtyElementKey);\n\n if (dirtyElement !== undefined && !lexical.$isRootNode(dirtyElement)) {\n nodes.push(dirtyElement);\n }\n }\n\n return nodes;\n}\n\nfunction getChangeType(prevEditorState, nextEditorState, dirtyLeavesSet, dirtyElementsSet, isComposing) {\n if (prevEditorState === null || dirtyLeavesSet.size === 0 && dirtyElementsSet.size === 0 && !isComposing) {\n return OTHER;\n }\n\n const nextSelection = nextEditorState._selection;\n const prevSelection = prevEditorState._selection;\n\n if (isComposing) {\n return COMPOSING_CHARACTER;\n }\n\n if (!lexical.$isRangeSelection(nextSelection) || !lexical.$isRangeSelection(prevSelection) || !prevSelection.isCollapsed() || !nextSelection.isCollapsed()) {\n return OTHER;\n }\n\n const dirtyNodes = getDirtyNodes(nextEditorState, dirtyLeavesSet, dirtyElementsSet);\n\n if (dirtyNodes.length === 0) {\n return OTHER;\n } // Catching the case when inserting new text node into an element (e.g. first char in paragraph/list),\n // or after existing node.\n\n\n if (dirtyNodes.length > 1) {\n const nextNodeMap = nextEditorState._nodeMap;\n const nextAnchorNode = nextNodeMap.get(nextSelection.anchor.key);\n const prevAnchorNode = nextNodeMap.get(prevSelection.anchor.key);\n\n if (nextAnchorNode && prevAnchorNode && !prevEditorState._nodeMap.has(nextAnchorNode.__key) && lexical.$isTextNode(nextAnchorNode) && nextAnchorNode.__text.length === 1 && nextSelection.anchor.offset === 1) {\n return INSERT_CHARACTER_AFTER_SELECTION;\n }\n\n return OTHER;\n }\n\n const nextDirtyNode = dirtyNodes[0];\n\n const prevDirtyNode = prevEditorState._nodeMap.get(nextDirtyNode.__key);\n\n if (!lexical.$isTextNode(prevDirtyNode) || !lexical.$isTextNode(nextDirtyNode) || prevDirtyNode.__mode !== nextDirtyNode.__mode) {\n return OTHER;\n }\n\n const prevText = prevDirtyNode.__text;\n const nextText = nextDirtyNode.__text;\n\n if (prevText === nextText) {\n return OTHER;\n }\n\n const nextAnchor = nextSelection.anchor;\n const prevAnchor = prevSelection.anchor;\n\n if (nextAnchor.key !== prevAnchor.key || nextAnchor.type !== 'text') {\n return OTHER;\n }\n\n const nextAnchorOffset = nextAnchor.offset;\n const prevAnchorOffset = prevAnchor.offset;\n const textDiff = nextText.length - prevText.length;\n\n if (textDiff === 1 && prevAnchorOffset === nextAnchorOffset - 1) {\n return INSERT_CHARACTER_AFTER_SELECTION;\n }\n\n if (textDiff === -1 && prevAnchorOffset === nextAnchorOffset + 1) {\n return DELETE_CHARACTER_BEFORE_SELECTION;\n }\n\n if (textDiff === -1 && prevAnchorOffset === nextAnchorOffset) {\n return DELETE_CHARACTER_AFTER_SELECTION;\n }\n\n return OTHER;\n}\n\nfunction isTextNodeUnchanged(key, prevEditorState, nextEditorState) {\n const prevNode = prevEditorState._nodeMap.get(key);\n\n const nextNode = nextEditorState._nodeMap.get(key);\n\n const prevSelection = prevEditorState._selection;\n const nextSelection = nextEditorState._selection;\n let isDeletingLine = false;\n\n if (lexical.$isRangeSelection(prevSelection) && lexical.$isRangeSelection(nextSelection)) {\n isDeletingLine = prevSelection.anchor.type === 'element' && prevSelection.focus.type === 'element' && nextSelection.anchor.type === 'text' && nextSelection.focus.type === 'text';\n }\n\n if (!isDeletingLine && lexical.$isTextNode(prevNode) && lexical.$isTextNode(nextNode)) {\n return prevNode.__type === nextNode.__type && prevNode.__text === nextNode.__text && prevNode.__mode === nextNode.__mode && prevNode.__detail === nextNode.__detail && prevNode.__style === nextNode.__style && prevNode.__format === nextNode.__format && prevNode.__parent === nextNode.__parent;\n }\n\n return false;\n}\n\nfunction createMergeActionGetter(editor, delay) {\n let prevChangeTime = Date.now();\n let prevChangeType = OTHER;\n return (prevEditorState, nextEditorState, currentHistoryEntry, dirtyLeaves, dirtyElements, tags) => {\n const changeTime = Date.now(); // If applying changes from history stack there's no need\n // to run history logic again, as history entries already calculated\n\n if (tags.has('historic')) {\n prevChangeType = OTHER;\n prevChangeTime = changeTime;\n return DISCARD_HISTORY_CANDIDATE;\n }\n\n const changeType = getChangeType(prevEditorState, nextEditorState, dirtyLeaves, dirtyElements, editor.isComposing());\n\n const mergeAction = (() => {\n const isSameEditor = currentHistoryEntry === null || currentHistoryEntry.editor === editor;\n const shouldPushHistory = tags.has('history-push');\n const shouldMergeHistory = !shouldPushHistory && isSameEditor && tags.has('history-merge');\n\n if (shouldMergeHistory) {\n return HISTORY_MERGE;\n }\n\n if (prevEditorState === null) {\n return HISTORY_PUSH;\n }\n\n const selection = nextEditorState._selection;\n const hasDirtyNodes = dirtyLeaves.size > 0 || dirtyElements.size > 0;\n\n if (!hasDirtyNodes) {\n if (selection !== null) {\n return HISTORY_MERGE;\n }\n\n return DISCARD_HISTORY_CANDIDATE;\n }\n\n if (shouldPushHistory === false && changeType !== OTHER && changeType === prevChangeType && changeTime < prevChangeTime + delay && isSameEditor) {\n return HISTORY_MERGE;\n } // A single node might have been marked as dirty, but not have changed\n // due to some node transform reverting the change.\n\n\n if (dirtyLeaves.size === 1) {\n const dirtyLeafKey = Array.from(dirtyLeaves)[0];\n\n if (isTextNodeUnchanged(dirtyLeafKey, prevEditorState, nextEditorState)) {\n return HISTORY_MERGE;\n }\n }\n\n return HISTORY_PUSH;\n })();\n\n prevChangeTime = changeTime;\n prevChangeType = changeType;\n return mergeAction;\n };\n}\n\nfunction redo(editor, historyState) {\n const redoStack = historyState.redoStack;\n const undoStack = historyState.undoStack;\n\n if (redoStack.length !== 0) {\n const current = historyState.current;\n\n if (current !== null) {\n undoStack.push(current);\n editor.dispatchCommand(lexical.CAN_UNDO_COMMAND, true);\n }\n\n const historyStateEntry = redoStack.pop();\n\n if (redoStack.length === 0) {\n editor.dispatchCommand(lexical.CAN_REDO_COMMAND, false);\n }\n\n historyState.current = historyStateEntry || null;\n\n if (historyStateEntry) {\n historyStateEntry.editor.setEditorState(historyStateEntry.editorState, {\n tag: 'historic'\n });\n }\n }\n}\n\nfunction undo(editor, historyState) {\n const redoStack = historyState.redoStack;\n const undoStack = historyState.undoStack;\n const undoStackLength = undoStack.length;\n\n if (undoStackLength !== 0) {\n const current = historyState.current;\n const historyStateEntry = undoStack.pop();\n\n if (current !== null) {\n redoStack.push(current);\n editor.dispatchCommand(lexical.CAN_REDO_COMMAND, true);\n }\n\n if (undoStack.length === 0) {\n editor.dispatchCommand(lexical.CAN_UNDO_COMMAND, false);\n }\n\n historyState.current = historyStateEntry || null;\n\n if (historyStateEntry) {\n historyStateEntry.editor.setEditorState(historyStateEntry.editorState, {\n tag: 'historic'\n });\n }\n }\n}\n\nfunction clearHistory(historyState) {\n historyState.undoStack = [];\n historyState.redoStack = [];\n historyState.current = null;\n}\n/**\n * Registers necessary listeners to manage undo/redo history stack and related editor commands.\n * It returns `unregister` callback that cleans up all listeners and should be called on editor unmount.\n * @param editor - The lexical editor.\n * @param historyState - The history state, containing the current state and the undo/redo stack.\n * @param delay - The time (in milliseconds) the editor should delay generating a new history stack,\n * instead of merging the current changes with the current stack.\n * @returns The listeners cleanup callback function.\n */\n\n\nfunction registerHistory(editor, historyState, delay) {\n const getMergeAction = createMergeActionGetter(editor, delay);\n\n const applyChange = ({\n editorState,\n prevEditorState,\n dirtyLeaves,\n dirtyElements,\n tags\n }) => {\n const current = historyState.current;\n const redoStack = historyState.redoStack;\n const undoStack = historyState.undoStack;\n const currentEditorState = current === null ? null : current.editorState;\n\n if (current !== null && editorState === currentEditorState) {\n return;\n }\n\n const mergeAction = getMergeAction(prevEditorState, editorState, current, dirtyLeaves, dirtyElements, tags);\n\n if (mergeAction === HISTORY_PUSH) {\n if (redoStack.length !== 0) {\n historyState.redoStack = [];\n editor.dispatchCommand(lexical.CAN_REDO_COMMAND, false);\n }\n\n if (current !== null) {\n undoStack.push({ ...current\n });\n editor.dispatchCommand(lexical.CAN_UNDO_COMMAND, true);\n }\n } else if (mergeAction === DISCARD_HISTORY_CANDIDATE) {\n return;\n } // Else we merge\n\n\n historyState.current = {\n editor,\n editorState\n };\n };\n\n const unregisterCommandListener = utils.mergeRegister(editor.registerCommand(lexical.UNDO_COMMAND, () => {\n undo(editor, historyState);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.REDO_COMMAND, () => {\n redo(editor, historyState);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.CLEAR_EDITOR_COMMAND, () => {\n clearHistory(historyState);\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.CLEAR_HISTORY_COMMAND, () => {\n clearHistory(historyState);\n editor.dispatchCommand(lexical.CAN_REDO_COMMAND, false);\n editor.dispatchCommand(lexical.CAN_UNDO_COMMAND, false);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerUpdateListener(applyChange));\n const unregisterUpdateListener = editor.registerUpdateListener(applyChange);\n return () => {\n unregisterCommandListener();\n unregisterUpdateListener();\n };\n}\n/**\n * Creates an empty history state.\n * @returns - The empty history state, as an object.\n */\n\nfunction createEmptyHistoryState() {\n return {\n current: null,\n redoStack: [],\n undoStack: []\n };\n}\n\nexports.createEmptyHistoryState = createEmptyHistoryState;\nexports.registerHistory = registerHistory;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalHistory = process.env.NODE_ENV === 'development' ? require('./LexicalHistory.dev.js') : require('./LexicalHistory.prod.js')\nmodule.exports = LexicalHistory;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar selection = require('@lexical/selection');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\n\n/** @module @lexical/html */\n/**\n * How you parse your html string to get a document is left up to you. In the browser you can use the native\n * DOMParser API to generate a document (see clipboard.ts), but to use in a headless environment you can use JSDom\n * or an equivilant library and pass in the document here.\n */\n\nfunction $generateNodesFromDOM(editor, dom) {\n const elements = dom.body ? dom.body.childNodes : [];\n let lexicalNodes = [];\n\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n\n if (!IGNORE_TAGS.has(element.nodeName)) {\n const lexicalNode = $createNodesFromDOM(element, editor);\n\n if (lexicalNode !== null) {\n lexicalNodes = lexicalNodes.concat(lexicalNode);\n }\n }\n }\n\n return lexicalNodes;\n}\nfunction $generateHtmlFromNodes(editor, selection) {\n if (typeof document === 'undefined' || typeof window === 'undefined') {\n throw new Error('To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.');\n }\n\n const container = document.createElement('div');\n const root = lexical.$getRoot();\n const topLevelChildren = root.getChildren();\n\n for (let i = 0; i < topLevelChildren.length; i++) {\n const topLevelNode = topLevelChildren[i];\n $appendNodesToHTML(editor, topLevelNode, container, selection);\n }\n\n return container.innerHTML;\n}\n\nfunction $appendNodesToHTML(editor, currentNode, parentElement, selection$1 = null) {\n let shouldInclude = selection$1 != null ? currentNode.isSelected(selection$1) : true;\n const shouldExclude = lexical.$isElementNode(currentNode) && currentNode.excludeFromCopy('html');\n let target = currentNode;\n\n if (selection$1 !== null) {\n let clone = selection.$cloneWithProperties(currentNode);\n clone = lexical.$isTextNode(clone) && selection$1 != null ? selection.$sliceSelectedTextNodeContent(selection$1, clone) : clone;\n target = clone;\n }\n\n const children = lexical.$isElementNode(target) ? target.getChildren() : [];\n const {\n element,\n after\n } = target.exportDOM(editor);\n\n if (!element) {\n return false;\n }\n\n const fragment = document.createDocumentFragment();\n\n for (let i = 0; i < children.length; i++) {\n const childNode = children[i];\n const shouldIncludeChild = $appendNodesToHTML(editor, childNode, fragment, selection$1);\n\n if (!shouldInclude && lexical.$isElementNode(currentNode) && shouldIncludeChild && currentNode.extractWithChild(childNode, selection$1, 'html')) {\n shouldInclude = true;\n }\n }\n\n if (shouldInclude && !shouldExclude) {\n if (utils.isHTMLElement(element)) {\n element.append(fragment);\n }\n\n parentElement.append(element);\n\n if (after) {\n const newElement = after.call(target, element);\n if (newElement) element.replaceWith(newElement);\n }\n } else {\n parentElement.append(fragment);\n }\n\n return shouldInclude;\n}\n\nfunction getConversionFunction(domNode, editor) {\n const {\n nodeName\n } = domNode;\n\n const cachedConversions = editor._htmlConversions.get(nodeName.toLowerCase());\n\n let currentConversion = null;\n\n if (cachedConversions !== undefined) {\n for (const cachedConversion of cachedConversions) {\n const domConversion = cachedConversion(domNode);\n\n if (domConversion !== null && (currentConversion === null || currentConversion.priority < domConversion.priority)) {\n currentConversion = domConversion;\n }\n }\n }\n\n return currentConversion !== null ? currentConversion.conversion : null;\n}\n\nconst IGNORE_TAGS = new Set(['STYLE', 'SCRIPT']);\n\nfunction $createNodesFromDOM(node, editor, forChildMap = new Map(), parentLexicalNode) {\n let lexicalNodes = [];\n\n if (IGNORE_TAGS.has(node.nodeName)) {\n return lexicalNodes;\n }\n\n let currentLexicalNode = null;\n const transformFunction = getConversionFunction(node, editor);\n const transformOutput = transformFunction ? transformFunction(node) : null;\n let postTransform = null;\n\n if (transformOutput !== null) {\n postTransform = transformOutput.after;\n const transformNodes = transformOutput.node;\n currentLexicalNode = Array.isArray(transformNodes) ? transformNodes[transformNodes.length - 1] : transformNodes;\n\n if (currentLexicalNode !== null) {\n for (const [, forChildFunction] of forChildMap) {\n currentLexicalNode = forChildFunction(currentLexicalNode, parentLexicalNode);\n\n if (!currentLexicalNode) {\n break;\n }\n }\n\n if (currentLexicalNode) {\n lexicalNodes.push(...(Array.isArray(transformNodes) ? transformNodes : [currentLexicalNode]));\n }\n }\n\n if (transformOutput.forChild != null) {\n forChildMap.set(node.nodeName, transformOutput.forChild);\n }\n } // If the DOM node doesn't have a transformer, we don't know what\n // to do with it but we still need to process any childNodes.\n\n\n const children = node.childNodes;\n let childLexicalNodes = [];\n\n for (let i = 0; i < children.length; i++) {\n childLexicalNodes.push(...$createNodesFromDOM(children[i], editor, new Map(forChildMap), currentLexicalNode));\n }\n\n if (postTransform != null) {\n childLexicalNodes = postTransform(childLexicalNodes);\n }\n\n if (currentLexicalNode == null) {\n // If it hasn't been converted to a LexicalNode, we hoist its children\n // up to the same level as it.\n lexicalNodes = lexicalNodes.concat(childLexicalNodes);\n } else {\n if (lexical.$isElementNode(currentLexicalNode)) {\n // If the current node is a ElementNode after conversion,\n // we can append all the children to it.\n currentLexicalNode.append(...childLexicalNodes);\n }\n }\n\n return lexicalNodes;\n}\n\nexports.$generateHtmlFromNodes = $generateHtmlFromNodes;\nexports.$generateNodesFromDOM = $generateNodesFromDOM;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalHtml = process.env.NODE_ENV === 'development' ? require('./LexicalHtml.dev.js') : require('./LexicalHtml.prod.js')\nmodule.exports = LexicalHtml;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\n\n/** @module @lexical/link */\nconst SUPPORTED_URL_PROTOCOLS = new Set(['http:', 'https:', 'mailto:', 'sms:', 'tel:']);\n/** @noInheritDoc */\n\nclass LinkNode extends lexical.ElementNode {\n /** @internal */\n\n /** @internal */\n\n /** @internal */\n\n /** @internal */\n static getType() {\n return 'link';\n }\n\n static clone(node) {\n return new LinkNode(node.__url, {\n rel: node.__rel,\n target: node.__target,\n title: node.__title\n }, node.__key);\n }\n\n constructor(url, attributes = {}, key) {\n super(key);\n const {\n target = null,\n rel = null,\n title = null\n } = attributes;\n this.__url = url;\n this.__target = target;\n this.__rel = rel;\n this.__title = title;\n }\n\n createDOM(config) {\n const element = document.createElement('a');\n element.href = this.sanitizeUrl(this.__url);\n\n if (this.__target !== null) {\n element.target = this.__target;\n }\n\n if (this.__rel !== null) {\n element.rel = this.__rel;\n }\n\n if (this.__title !== null) {\n element.title = this.__title;\n }\n\n utils.addClassNamesToElement(element, config.theme.link);\n return element;\n }\n\n updateDOM(prevNode, anchor, config) {\n const url = this.__url;\n const target = this.__target;\n const rel = this.__rel;\n const title = this.__title;\n\n if (url !== prevNode.__url) {\n anchor.href = url;\n }\n\n if (target !== prevNode.__target) {\n if (target) {\n anchor.target = target;\n } else {\n anchor.removeAttribute('target');\n }\n }\n\n if (rel !== prevNode.__rel) {\n if (rel) {\n anchor.rel = rel;\n } else {\n anchor.removeAttribute('rel');\n }\n }\n\n if (title !== prevNode.__title) {\n if (title) {\n anchor.title = title;\n } else {\n anchor.removeAttribute('title');\n }\n }\n\n return false;\n }\n\n static importDOM() {\n return {\n a: node => ({\n conversion: convertAnchorElement,\n priority: 1\n })\n };\n }\n\n static importJSON(serializedNode) {\n const node = $createLinkNode(serializedNode.url, {\n rel: serializedNode.rel,\n target: serializedNode.target,\n title: serializedNode.title\n });\n node.setFormat(serializedNode.format);\n node.setIndent(serializedNode.indent);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n sanitizeUrl(url) {\n try {\n const parsedUrl = new URL(url); // eslint-disable-next-line no-script-url\n\n if (!SUPPORTED_URL_PROTOCOLS.has(parsedUrl.protocol)) {\n return 'about:blank';\n }\n } catch {\n return url;\n }\n\n return url;\n }\n\n exportJSON() {\n return { ...super.exportJSON(),\n rel: this.getRel(),\n target: this.getTarget(),\n title: this.getTitle(),\n type: 'link',\n url: this.getURL(),\n version: 1\n };\n }\n\n getURL() {\n return this.getLatest().__url;\n }\n\n setURL(url) {\n const writable = this.getWritable();\n writable.__url = url;\n }\n\n getTarget() {\n return this.getLatest().__target;\n }\n\n setTarget(target) {\n const writable = this.getWritable();\n writable.__target = target;\n }\n\n getRel() {\n return this.getLatest().__rel;\n }\n\n setRel(rel) {\n const writable = this.getWritable();\n writable.__rel = rel;\n }\n\n getTitle() {\n return this.getLatest().__title;\n }\n\n setTitle(title) {\n const writable = this.getWritable();\n writable.__title = title;\n }\n\n insertNewAfter(selection, restoreSelection = true) {\n const element = this.getParentOrThrow().insertNewAfter(selection, restoreSelection);\n\n if (lexical.$isElementNode(element)) {\n const linkNode = $createLinkNode(this.__url, {\n rel: this.__rel,\n target: this.__target,\n title: this.__title\n });\n element.append(linkNode);\n return linkNode;\n }\n\n return null;\n }\n\n canInsertTextBefore() {\n return false;\n }\n\n canInsertTextAfter() {\n return false;\n }\n\n canBeEmpty() {\n return false;\n }\n\n isInline() {\n return true;\n }\n\n extractWithChild(child, selection, destination) {\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n const anchorNode = selection.anchor.getNode();\n const focusNode = selection.focus.getNode();\n return this.isParentOf(anchorNode) && this.isParentOf(focusNode) && selection.getTextContent().length > 0;\n }\n\n}\n\nfunction convertAnchorElement(domNode) {\n let node = null;\n\n if (utils.isHTMLAnchorElement(domNode)) {\n const content = domNode.textContent;\n\n if (content !== null && content !== '') {\n node = $createLinkNode(domNode.getAttribute('href') || '', {\n rel: domNode.getAttribute('rel'),\n target: domNode.getAttribute('target'),\n title: domNode.getAttribute('title')\n });\n }\n }\n\n return {\n node\n };\n}\n/**\n * Takes a URL and creates a LinkNode.\n * @param url - The URL the LinkNode should direct to.\n * @param attributes - Optional HTML a tag attributes { target, rel, title }\n * @returns The LinkNode.\n */\n\n\nfunction $createLinkNode(url, attributes) {\n return lexical.$applyNodeReplacement(new LinkNode(url, attributes));\n}\n/**\n * Determines if node is a LinkNode.\n * @param node - The node to be checked.\n * @returns true if node is a LinkNode, false otherwise.\n */\n\nfunction $isLinkNode(node) {\n return node instanceof LinkNode;\n}\n// Custom node type to override `canInsertTextAfter` that will\n// allow typing within the link\nclass AutoLinkNode extends LinkNode {\n static getType() {\n return 'autolink';\n }\n\n static clone(node) {\n return new AutoLinkNode(node.__url, {\n rel: node.__rel,\n target: node.__target,\n title: node.__title\n }, node.__key);\n }\n\n static importJSON(serializedNode) {\n const node = $createAutoLinkNode(serializedNode.url, {\n rel: serializedNode.rel,\n target: serializedNode.target,\n title: serializedNode.title\n });\n node.setFormat(serializedNode.format);\n node.setIndent(serializedNode.indent);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n static importDOM() {\n // TODO: Should link node should handle the import over autolink?\n return null;\n }\n\n exportJSON() {\n return { ...super.exportJSON(),\n type: 'autolink',\n version: 1\n };\n }\n\n insertNewAfter(selection, restoreSelection = true) {\n const element = this.getParentOrThrow().insertNewAfter(selection, restoreSelection);\n\n if (lexical.$isElementNode(element)) {\n const linkNode = $createAutoLinkNode(this.__url, {\n rel: this._rel,\n target: this.__target,\n title: this.__title\n });\n element.append(linkNode);\n return linkNode;\n }\n\n return null;\n }\n\n}\n/**\n * Takes a URL and creates an AutoLinkNode. AutoLinkNodes are generally automatically generated\n * during typing, which is especially useful when a button to generate a LinkNode is not practical.\n * @param url - The URL the LinkNode should direct to.\n * @param attributes - Optional HTML a tag attributes. { target, rel, title }\n * @returns The LinkNode.\n */\n\nfunction $createAutoLinkNode(url, attributes) {\n return lexical.$applyNodeReplacement(new AutoLinkNode(url, attributes));\n}\n/**\n * Determines if node is an AutoLinkNode.\n * @param node - The node to be checked.\n * @returns true if node is an AutoLinkNode, false otherwise.\n */\n\nfunction $isAutoLinkNode(node) {\n return node instanceof AutoLinkNode;\n}\nconst TOGGLE_LINK_COMMAND = lexical.createCommand('TOGGLE_LINK_COMMAND');\n/**\n * Generates or updates a LinkNode. It can also delete a LinkNode if the URL is null,\n * but saves any children and brings them up to the parent node.\n * @param url - The URL the link directs to.\n * @param attributes - Optional HTML a tag attributes. { target, rel, title }\n */\n\nfunction toggleLink(url, attributes = {}) {\n const {\n target,\n title\n } = attributes;\n const rel = attributes.rel === undefined ? 'noreferrer' : attributes.rel;\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return;\n }\n\n const nodes = selection.extract();\n\n if (url === null) {\n // Remove LinkNodes\n nodes.forEach(node => {\n const parent = node.getParent();\n\n if ($isLinkNode(parent)) {\n const children = parent.getChildren();\n\n for (let i = 0; i < children.length; i++) {\n parent.insertBefore(children[i]);\n }\n\n parent.remove();\n }\n });\n } else {\n // Add or merge LinkNodes\n if (nodes.length === 1) {\n const firstNode = nodes[0]; // if the first node is a LinkNode or if its\n // parent is a LinkNode, we update the URL, target and rel.\n\n const linkNode = $isLinkNode(firstNode) ? firstNode : $getLinkAncestor(firstNode);\n\n if (linkNode !== null) {\n linkNode.setURL(url);\n\n if (target !== undefined) {\n linkNode.setTarget(target);\n }\n\n if (rel !== null) {\n linkNode.setRel(rel);\n }\n\n if (title !== undefined) {\n linkNode.setTitle(title);\n }\n\n return;\n }\n }\n\n let prevParent = null;\n let linkNode = null;\n nodes.forEach(node => {\n const parent = node.getParent();\n\n if (parent === linkNode || parent === null || lexical.$isElementNode(node) && !node.isInline()) {\n return;\n }\n\n if ($isLinkNode(parent)) {\n linkNode = parent;\n parent.setURL(url);\n\n if (target !== undefined) {\n parent.setTarget(target);\n }\n\n if (rel !== null) {\n linkNode.setRel(rel);\n }\n\n if (title !== undefined) {\n linkNode.setTitle(title);\n }\n\n return;\n }\n\n if (!parent.is(prevParent)) {\n prevParent = parent;\n linkNode = $createLinkNode(url, {\n rel,\n target\n });\n\n if ($isLinkNode(parent)) {\n if (node.getPreviousSibling() === null) {\n parent.insertBefore(linkNode);\n } else {\n parent.insertAfter(linkNode);\n }\n } else {\n node.insertBefore(linkNode);\n }\n }\n\n if ($isLinkNode(node)) {\n if (node.is(linkNode)) {\n return;\n }\n\n if (linkNode !== null) {\n const children = node.getChildren();\n\n for (let i = 0; i < children.length; i++) {\n linkNode.append(children[i]);\n }\n }\n\n node.remove();\n return;\n }\n\n if (linkNode !== null) {\n linkNode.append(node);\n }\n });\n }\n}\n\nfunction $getLinkAncestor(node) {\n return $getAncestor(node, $isLinkNode);\n}\n\nfunction $getAncestor(node, predicate) {\n let parent = node;\n\n while (parent !== null && (parent = parent.getParent()) !== null && !predicate(parent));\n\n return parent;\n}\n\nexports.$createAutoLinkNode = $createAutoLinkNode;\nexports.$createLinkNode = $createLinkNode;\nexports.$isAutoLinkNode = $isAutoLinkNode;\nexports.$isLinkNode = $isLinkNode;\nexports.AutoLinkNode = AutoLinkNode;\nexports.LinkNode = LinkNode;\nexports.TOGGLE_LINK_COMMAND = TOGGLE_LINK_COMMAND;\nexports.toggleLink = toggleLink;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalLink = process.env.NODE_ENV === 'development' ? require('./LexicalLink.dev.js') : require('./LexicalLink.prod.js')\nmodule.exports = LexicalLink;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar lexical = require('lexical');\nvar utils = require('@lexical/utils');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n/**\n * Checks the depth of listNode from the root node.\n * @param listNode - The ListNode to be checked.\n * @returns The depth of the ListNode.\n */\n\nfunction $getListDepth(listNode) {\n let depth = 1;\n let parent = listNode.getParent();\n\n while (parent != null) {\n if ($isListItemNode(parent)) {\n const parentList = parent.getParent();\n\n if ($isListNode(parentList)) {\n depth++;\n parent = parentList.getParent();\n continue;\n }\n\n {\n throw Error(`A ListItemNode must have a ListNode for a parent.`);\n }\n }\n\n return depth;\n }\n\n return depth;\n}\n/**\n * Finds the nearest ancestral ListNode and returns it, throws an invariant if listItem is not a ListItemNode.\n * @param listItem - The node to be checked.\n * @returns The ListNode found.\n */\n\nfunction $getTopListNode(listItem) {\n let list = listItem.getParent();\n\n if (!$isListNode(list)) {\n {\n throw Error(`A ListItemNode must have a ListNode for a parent.`);\n }\n }\n\n let parent = list;\n\n while (parent !== null) {\n parent = parent.getParent();\n\n if ($isListNode(parent)) {\n list = parent;\n }\n }\n\n return list;\n}\n/**\n * A recursive Depth-First Search (Postorder Traversal) that finds all of a node's children\n * that are of type ListItemNode and returns them in an array.\n * @param node - The ListNode to start the search.\n * @returns An array containing all nodes of type ListItemNode found.\n */\n// This should probably be $getAllChildrenOfType\n\nfunction $getAllListItems(node) {\n let listItemNodes = [];\n const listChildren = node.getChildren().filter($isListItemNode);\n\n for (let i = 0; i < listChildren.length; i++) {\n const listItemNode = listChildren[i];\n const firstChild = listItemNode.getFirstChild();\n\n if ($isListNode(firstChild)) {\n listItemNodes = listItemNodes.concat($getAllListItems(firstChild));\n } else {\n listItemNodes.push(listItemNode);\n }\n }\n\n return listItemNodes;\n}\n/**\n * Checks to see if the passed node is a ListItemNode and has a ListNode as a child.\n * @param node - The node to be checked.\n * @returns true if the node is a ListItemNode and has a ListNode child, false otherwise.\n */\n\nfunction isNestedListNode(node) {\n return $isListItemNode(node) && $isListNode(node.getFirstChild());\n}\n/**\n * Takes a deeply nested ListNode or ListItemNode and traverses up the branch to delete the first\n * ancestral ListNode (which could be the root ListNode) or ListItemNode with siblings, essentially\n * bringing the deeply nested node up the branch once. Would remove sublist if it has siblings.\n * Should not break ListItem -> List -> ListItem chain as empty List/ItemNodes should be removed on .remove().\n * @param sublist - The nested ListNode or ListItemNode to be brought up the branch.\n */\n\nfunction $removeHighestEmptyListParent(sublist) {\n // Nodes may be repeatedly indented, to create deeply nested lists that each\n // contain just one bullet.\n // Our goal is to remove these (empty) deeply nested lists. The easiest\n // way to do that is crawl back up the tree until we find a node that has siblings\n // (e.g. is actually part of the list contents) and delete that, or delete\n // the root of the list (if no list nodes have siblings.)\n let emptyListPtr = sublist;\n\n while (emptyListPtr.getNextSibling() == null && emptyListPtr.getPreviousSibling() == null) {\n const parent = emptyListPtr.getParent();\n\n if (parent == null || !($isListItemNode(emptyListPtr) || $isListNode(emptyListPtr))) {\n break;\n }\n\n emptyListPtr = parent;\n }\n\n emptyListPtr.remove();\n}\n/**\n * Wraps a node into a ListItemNode.\n * @param node - The node to be wrapped into a ListItemNode\n * @returns The ListItemNode which the passed node is wrapped in.\n */\n\nfunction wrapInListItem(node) {\n const listItemWrapper = $createListItemNode();\n return listItemWrapper.append(node);\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction $isSelectingEmptyListItem(anchorNode, nodes) {\n return $isListItemNode(anchorNode) && (nodes.length === 0 || nodes.length === 1 && anchorNode.is(nodes[0]) && anchorNode.getChildrenSize() === 0);\n}\n\nfunction $getListItemValue(listItem) {\n const list = listItem.getParent();\n let value = 1;\n\n if (list != null) {\n if (!$isListNode(list)) {\n {\n throw Error(`$getListItemValue: list node is not parent of list item node`);\n }\n } else {\n value = list.getStart();\n }\n }\n\n const siblings = listItem.getPreviousSiblings();\n\n for (let i = 0; i < siblings.length; i++) {\n const sibling = siblings[i];\n\n if ($isListItemNode(sibling) && !$isListNode(sibling.getFirstChild())) {\n value++;\n }\n }\n\n return value;\n}\n/**\n * Inserts a new ListNode. If the selection's anchor node is an empty ListItemNode and is a child of\n * the root/shadow root, it will replace the ListItemNode with a ListNode and the old ListItemNode.\n * Otherwise it will replace its parent with a new ListNode and re-insert the ListItemNode and any previous children.\n * If the selection's anchor node is not an empty ListItemNode, it will add a new ListNode or merge an existing ListNode,\n * unless the the node is a leaf node, in which case it will attempt to find a ListNode up the branch and replace it with\n * a new ListNode, or create a new ListNode at the nearest root/shadow root.\n * @param editor - The lexical editor.\n * @param listType - The type of list, \"number\" | \"bullet\" | \"check\".\n */\n\n\nfunction insertList(editor, listType) {\n editor.update(() => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isRangeSelection(selection) || lexical.DEPRECATED_$isGridSelection(selection)) {\n const nodes = selection.getNodes();\n const anchor = selection.anchor;\n const anchorNode = anchor.getNode();\n const anchorNodeParent = anchorNode.getParent();\n\n if ($isSelectingEmptyListItem(anchorNode, nodes)) {\n const list = $createListNode(listType);\n\n if (lexical.$isRootOrShadowRoot(anchorNodeParent)) {\n anchorNode.replace(list);\n const listItem = $createListItemNode();\n\n if (lexical.$isElementNode(anchorNode)) {\n listItem.setFormat(anchorNode.getFormatType());\n listItem.setIndent(anchorNode.getIndent());\n }\n\n list.append(listItem);\n } else if ($isListItemNode(anchorNode)) {\n const parent = anchorNode.getParentOrThrow();\n append(list, parent.getChildren());\n parent.replace(list);\n }\n\n return;\n } else {\n const handled = new Set();\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (lexical.$isElementNode(node) && node.isEmpty() && !handled.has(node.getKey())) {\n createListOrMerge(node, listType);\n continue;\n }\n\n if (lexical.$isLeafNode(node)) {\n let parent = node.getParent();\n\n while (parent != null) {\n const parentKey = parent.getKey();\n\n if ($isListNode(parent)) {\n if (!handled.has(parentKey)) {\n const newListNode = $createListNode(listType);\n append(newListNode, parent.getChildren());\n parent.replace(newListNode);\n updateChildrenListItemValue(newListNode);\n handled.add(parentKey);\n }\n\n break;\n } else {\n const nextParent = parent.getParent();\n\n if (lexical.$isRootOrShadowRoot(nextParent) && !handled.has(parentKey)) {\n handled.add(parentKey);\n createListOrMerge(parent, listType);\n break;\n }\n\n parent = nextParent;\n }\n }\n }\n }\n }\n }\n });\n}\n\nfunction append(node, nodesToAppend) {\n node.splice(node.getChildrenSize(), 0, nodesToAppend);\n}\n\nfunction createListOrMerge(node, listType) {\n if ($isListNode(node)) {\n return node;\n }\n\n const previousSibling = node.getPreviousSibling();\n const nextSibling = node.getNextSibling();\n const listItem = $createListItemNode();\n listItem.setFormat(node.getFormatType());\n listItem.setIndent(node.getIndent());\n append(listItem, node.getChildren());\n\n if ($isListNode(previousSibling) && listType === previousSibling.getListType()) {\n previousSibling.append(listItem);\n node.remove(); // if the same type of list is on both sides, merge them.\n\n if ($isListNode(nextSibling) && listType === nextSibling.getListType()) {\n append(previousSibling, nextSibling.getChildren());\n nextSibling.remove();\n }\n\n return previousSibling;\n } else if ($isListNode(nextSibling) && listType === nextSibling.getListType()) {\n nextSibling.getFirstChildOrThrow().insertBefore(listItem);\n node.remove();\n return nextSibling;\n } else {\n const list = $createListNode(listType);\n list.append(listItem);\n node.replace(list);\n updateChildrenListItemValue(list);\n return list;\n }\n}\n/**\n * A recursive function that goes through each list and their children, including nested lists,\n * appending list2 children after list1 children and updating ListItemNode values.\n * @param list1 - The first list to be merged.\n * @param list2 - The second list to be merged.\n */\n\n\nfunction mergeLists(list1, list2) {\n const listItem1 = list1.getLastChild();\n const listItem2 = list2.getFirstChild();\n\n if (listItem1 && listItem2 && isNestedListNode(listItem1) && isNestedListNode(listItem2)) {\n mergeLists(listItem1.getFirstChild(), listItem2.getFirstChild());\n listItem2.remove();\n }\n\n const toMerge = list2.getChildren();\n\n if (toMerge.length > 0) {\n list1.append(...toMerge);\n updateChildrenListItemValue(list1);\n }\n\n list2.remove();\n}\n/**\n * Searches for the nearest ancestral ListNode and removes it. If selection is an empty ListItemNode\n * it will remove the whole list, including the ListItemNode. For each ListItemNode in the ListNode,\n * removeList will also generate new ParagraphNodes in the removed ListNode's place. Any child node\n * inside a ListItemNode will be appended to the new ParagraphNodes.\n * @param editor - The lexical editor.\n */\n\nfunction removeList(editor) {\n editor.update(() => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isRangeSelection(selection)) {\n const listNodes = new Set();\n const nodes = selection.getNodes();\n const anchorNode = selection.anchor.getNode();\n\n if ($isSelectingEmptyListItem(anchorNode, nodes)) {\n listNodes.add($getTopListNode(anchorNode));\n } else {\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (lexical.$isLeafNode(node)) {\n const listItemNode = utils.$getNearestNodeOfType(node, ListItemNode);\n\n if (listItemNode != null) {\n listNodes.add($getTopListNode(listItemNode));\n }\n }\n }\n }\n\n for (const listNode of listNodes) {\n let insertionPoint = listNode;\n const listItems = $getAllListItems(listNode);\n\n for (const listItemNode of listItems) {\n const paragraph = lexical.$createParagraphNode();\n append(paragraph, listItemNode.getChildren());\n insertionPoint.insertAfter(paragraph);\n insertionPoint = paragraph; // When the anchor and focus fall on the textNode\n // we don't have to change the selection because the textNode will be appended to\n // the newly generated paragraph.\n // When selection is in empty nested list item, selection is actually on the listItemNode.\n // When the corresponding listItemNode is deleted and replaced by the newly generated paragraph\n // we should manually set the selection's focus and anchor to the newly generated paragraph.\n\n if (listItemNode.__key === selection.anchor.key) {\n selection.anchor.set(paragraph.getKey(), 0, 'element');\n }\n\n if (listItemNode.__key === selection.focus.key) {\n selection.focus.set(paragraph.getKey(), 0, 'element');\n }\n\n listItemNode.remove();\n }\n\n listNode.remove();\n }\n }\n });\n}\n/**\n * Takes the value of a child ListItemNode and makes it the value the ListItemNode\n * should be if it isn't already. If only certain children should be updated, they\n * can be passed optionally in an array.\n * @param list - The list whose children are updated.\n * @param children - An array of the children to be updated.\n */\n\nfunction updateChildrenListItemValue(list, children) {\n const childrenOrExisting = children || list.getChildren();\n\n if (childrenOrExisting !== undefined) {\n for (let i = 0; i < childrenOrExisting.length; i++) {\n const child = childrenOrExisting[i];\n\n if ($isListItemNode(child)) {\n const prevValue = child.getValue();\n const nextValue = $getListItemValue(child);\n\n if (prevValue !== nextValue) {\n child.setValue(nextValue);\n }\n }\n }\n }\n}\n/**\n * Adds an empty ListNode/ListItemNode chain at listItemNode, so as to\n * create an indent effect. Won't indent ListItemNodes that have a ListNode as\n * a child, but does merge sibling ListItemNodes if one has a nested ListNode.\n * @param listItemNode - The ListItemNode to be indented.\n */\n\nfunction $handleIndent(listItemNode) {\n // go through each node and decide where to move it.\n const removed = new Set();\n\n if (isNestedListNode(listItemNode) || removed.has(listItemNode.getKey())) {\n return;\n }\n\n const parent = listItemNode.getParent(); // We can cast both of the below `isNestedListNode` only returns a boolean type instead of a user-defined type guards\n\n const nextSibling = listItemNode.getNextSibling();\n const previousSibling = listItemNode.getPreviousSibling(); // if there are nested lists on either side, merge them all together.\n\n if (isNestedListNode(nextSibling) && isNestedListNode(previousSibling)) {\n const innerList = previousSibling.getFirstChild();\n\n if ($isListNode(innerList)) {\n innerList.append(listItemNode);\n const nextInnerList = nextSibling.getFirstChild();\n\n if ($isListNode(nextInnerList)) {\n const children = nextInnerList.getChildren();\n append(innerList, children);\n nextSibling.remove();\n removed.add(nextSibling.getKey());\n }\n\n updateChildrenListItemValue(innerList);\n }\n } else if (isNestedListNode(nextSibling)) {\n // if the ListItemNode is next to a nested ListNode, merge them\n const innerList = nextSibling.getFirstChild();\n\n if ($isListNode(innerList)) {\n const firstChild = innerList.getFirstChild();\n\n if (firstChild !== null) {\n firstChild.insertBefore(listItemNode);\n }\n\n updateChildrenListItemValue(innerList);\n }\n } else if (isNestedListNode(previousSibling)) {\n const innerList = previousSibling.getFirstChild();\n\n if ($isListNode(innerList)) {\n innerList.append(listItemNode);\n updateChildrenListItemValue(innerList);\n }\n } else {\n // otherwise, we need to create a new nested ListNode\n if ($isListNode(parent)) {\n const newListItem = $createListItemNode();\n const newList = $createListNode(parent.getListType());\n newListItem.append(newList);\n newList.append(listItemNode);\n\n if (previousSibling) {\n previousSibling.insertAfter(newListItem);\n } else if (nextSibling) {\n nextSibling.insertBefore(newListItem);\n } else {\n parent.append(newListItem);\n }\n\n updateChildrenListItemValue(newList);\n }\n }\n\n if ($isListNode(parent)) {\n updateChildrenListItemValue(parent);\n }\n}\n/**\n * Removes an indent by removing an empty ListNode/ListItemNode chain. An indented ListItemNode\n * has a great grandparent node of type ListNode, which is where the ListItemNode will reside\n * within as a child.\n * @param listItemNode - The ListItemNode to remove the indent (outdent).\n */\n\nfunction $handleOutdent(listItemNode) {\n // go through each node and decide where to move it.\n if (isNestedListNode(listItemNode)) {\n return;\n }\n\n const parentList = listItemNode.getParent();\n const grandparentListItem = parentList ? parentList.getParent() : undefined;\n const greatGrandparentList = grandparentListItem ? grandparentListItem.getParent() : undefined; // If it doesn't have these ancestors, it's not indented.\n\n if ($isListNode(greatGrandparentList) && $isListItemNode(grandparentListItem) && $isListNode(parentList)) {\n // if it's the first child in it's parent list, insert it into the\n // great grandparent list before the grandparent\n const firstChild = parentList ? parentList.getFirstChild() : undefined;\n const lastChild = parentList ? parentList.getLastChild() : undefined;\n\n if (listItemNode.is(firstChild)) {\n grandparentListItem.insertBefore(listItemNode);\n\n if (parentList.isEmpty()) {\n grandparentListItem.remove();\n } // if it's the last child in it's parent list, insert it into the\n // great grandparent list after the grandparent.\n\n } else if (listItemNode.is(lastChild)) {\n grandparentListItem.insertAfter(listItemNode);\n\n if (parentList.isEmpty()) {\n grandparentListItem.remove();\n }\n } else {\n // otherwise, we need to split the siblings into two new nested lists\n const listType = parentList.getListType();\n const previousSiblingsListItem = $createListItemNode();\n const previousSiblingsList = $createListNode(listType);\n previousSiblingsListItem.append(previousSiblingsList);\n listItemNode.getPreviousSiblings().forEach(sibling => previousSiblingsList.append(sibling));\n const nextSiblingsListItem = $createListItemNode();\n const nextSiblingsList = $createListNode(listType);\n nextSiblingsListItem.append(nextSiblingsList);\n append(nextSiblingsList, listItemNode.getNextSiblings()); // put the sibling nested lists on either side of the grandparent list item in the great grandparent.\n\n grandparentListItem.insertBefore(previousSiblingsListItem);\n grandparentListItem.insertAfter(nextSiblingsListItem); // replace the grandparent list item (now between the siblings) with the outdented list item.\n\n grandparentListItem.replace(listItemNode);\n }\n\n updateChildrenListItemValue(parentList);\n updateChildrenListItemValue(greatGrandparentList);\n }\n}\n/**\n * Attempts to insert a ParagraphNode at selection and selects the new node. The selection must contain a ListItemNode\n * or a node that does not already contain text. If its grandparent is the root/shadow root, it will get the ListNode\n * (which should be the parent node) and insert the ParagraphNode as a sibling to the ListNode. If the ListNode is\n * nested in a ListItemNode instead, it will add the ParagraphNode after the grandparent ListItemNode.\n * Throws an invariant if the selection is not a child of a ListNode.\n * @returns true if a ParagraphNode was inserted succesfully, false if there is no selection\n * or the selection does not contain a ListItemNode or the node already holds text.\n */\n\nfunction $handleListInsertParagraph() {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection) || !selection.isCollapsed()) {\n return false;\n } // Only run this code on empty list items\n\n\n const anchor = selection.anchor.getNode();\n\n if (!$isListItemNode(anchor) || anchor.getChildrenSize() !== 0) {\n return false;\n }\n\n const topListNode = $getTopListNode(anchor);\n const parent = anchor.getParent();\n\n if (!$isListNode(parent)) {\n throw Error(`A ListItemNode must have a ListNode for a parent.`);\n }\n\n const grandparent = parent.getParent();\n let replacementNode;\n\n if (lexical.$isRootOrShadowRoot(grandparent)) {\n replacementNode = lexical.$createParagraphNode();\n topListNode.insertAfter(replacementNode);\n } else if ($isListItemNode(grandparent)) {\n replacementNode = $createListItemNode();\n grandparent.insertAfter(replacementNode);\n } else {\n return false;\n }\n\n replacementNode.select();\n const nextSiblings = anchor.getNextSiblings();\n\n if (nextSiblings.length > 0) {\n const newList = $createListNode(parent.getListType());\n\n if (lexical.$isParagraphNode(replacementNode)) {\n replacementNode.insertAfter(newList);\n } else {\n const newListItem = $createListItemNode();\n newListItem.append(newList);\n replacementNode.insertAfter(newListItem);\n }\n\n nextSiblings.forEach(sibling => {\n sibling.remove();\n newList.append(sibling);\n });\n } // Don't leave hanging nested empty lists\n\n\n $removeHighestEmptyListParent(anchor);\n return true;\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/** @noInheritDoc */\nclass ListItemNode extends lexical.ElementNode {\n /** @internal */\n\n /** @internal */\n static getType() {\n return 'listitem';\n }\n\n static clone(node) {\n return new ListItemNode(node.__value, node.__checked, node.__key);\n }\n\n constructor(value, checked, key) {\n super(key);\n this.__value = value === undefined ? 1 : value;\n this.__checked = checked;\n }\n\n createDOM(config) {\n const element = document.createElement('li');\n const parent = this.getParent();\n\n if ($isListNode(parent) && parent.getListType() === 'check') {\n updateListItemChecked(element, this, null);\n }\n\n element.value = this.__value;\n $setListItemThemeClassNames(element, config.theme, this);\n return element;\n }\n\n updateDOM(prevNode, dom, config) {\n const parent = this.getParent();\n\n if ($isListNode(parent) && parent.getListType() === 'check') {\n updateListItemChecked(dom, this, prevNode);\n } // @ts-expect-error - this is always HTMLListItemElement\n\n\n dom.value = this.__value;\n $setListItemThemeClassNames(dom, config.theme, this);\n return false;\n }\n\n static transform() {\n return node => {\n const parent = node.getParent();\n\n if ($isListNode(parent)) {\n updateChildrenListItemValue(parent);\n\n if (parent.getListType() !== 'check' && node.getChecked() != null) {\n node.setChecked(undefined);\n }\n }\n };\n }\n\n static importDOM() {\n return {\n li: node => ({\n conversion: convertListItemElement,\n priority: 0\n })\n };\n }\n\n static importJSON(serializedNode) {\n const node = $createListItemNode();\n node.setChecked(serializedNode.checked);\n node.setValue(serializedNode.value);\n node.setFormat(serializedNode.format);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n exportJSON() {\n return { ...super.exportJSON(),\n checked: this.getChecked(),\n type: 'listitem',\n value: this.getValue(),\n version: 1\n };\n }\n\n append(...nodes) {\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (lexical.$isElementNode(node) && this.canMergeWith(node)) {\n const children = node.getChildren();\n this.append(...children);\n node.remove();\n } else {\n super.append(node);\n }\n }\n\n return this;\n }\n\n replace(replaceWithNode, includeChildren) {\n if ($isListItemNode(replaceWithNode)) {\n return super.replace(replaceWithNode);\n }\n\n this.setIndent(0);\n const list = this.getParentOrThrow();\n if (!$isListNode(list)) return replaceWithNode;\n\n if (list.__first === this.getKey()) {\n list.insertBefore(replaceWithNode);\n } else if (list.__last === this.getKey()) {\n list.insertAfter(replaceWithNode);\n } else {\n // Split the list\n const newList = $createListNode(list.getListType());\n let nextSibling = this.getNextSibling();\n\n while (nextSibling) {\n const nodeToAppend = nextSibling;\n nextSibling = nextSibling.getNextSibling();\n newList.append(nodeToAppend);\n }\n\n list.insertAfter(replaceWithNode);\n replaceWithNode.insertAfter(newList);\n }\n\n if (includeChildren) {\n this.getChildren().forEach(child => {\n replaceWithNode.append(child);\n });\n }\n\n this.remove();\n\n if (list.getChildrenSize() === 0) {\n list.remove();\n }\n\n return replaceWithNode;\n }\n\n insertAfter(node, restoreSelection = true) {\n const listNode = this.getParentOrThrow();\n\n if (!$isListNode(listNode)) {\n {\n throw Error(`insertAfter: list node is not parent of list item node`);\n }\n }\n\n const siblings = this.getNextSiblings();\n\n if ($isListItemNode(node)) {\n const after = super.insertAfter(node, restoreSelection);\n const afterListNode = node.getParentOrThrow();\n\n if ($isListNode(afterListNode)) {\n updateChildrenListItemValue(afterListNode);\n }\n\n return after;\n } // Attempt to merge if the list is of the same type.\n\n\n if ($isListNode(node)) {\n let child = node;\n const children = node.getChildren();\n\n for (let i = children.length - 1; i >= 0; i--) {\n child = children[i];\n this.insertAfter(child, restoreSelection);\n }\n\n return child;\n } // Otherwise, split the list\n // Split the lists and insert the node in between them\n\n\n listNode.insertAfter(node, restoreSelection);\n\n if (siblings.length !== 0) {\n const newListNode = $createListNode(listNode.getListType());\n siblings.forEach(sibling => newListNode.append(sibling));\n node.insertAfter(newListNode, restoreSelection);\n }\n\n return node;\n }\n\n remove(preserveEmptyParent) {\n const prevSibling = this.getPreviousSibling();\n const nextSibling = this.getNextSibling();\n super.remove(preserveEmptyParent);\n\n if (prevSibling && nextSibling && isNestedListNode(prevSibling) && isNestedListNode(nextSibling)) {\n mergeLists(prevSibling.getFirstChild(), nextSibling.getFirstChild());\n nextSibling.remove();\n } else if (nextSibling) {\n const parent = nextSibling.getParent();\n\n if ($isListNode(parent)) {\n updateChildrenListItemValue(parent);\n }\n }\n }\n\n insertNewAfter(_, restoreSelection = true) {\n const newElement = $createListItemNode(this.__checked == null ? undefined : false);\n this.insertAfter(newElement, restoreSelection);\n return newElement;\n }\n\n collapseAtStart(selection) {\n const paragraph = lexical.$createParagraphNode();\n const children = this.getChildren();\n children.forEach(child => paragraph.append(child));\n const listNode = this.getParentOrThrow();\n const listNodeParent = listNode.getParentOrThrow();\n const isIndented = $isListItemNode(listNodeParent);\n\n if (listNode.getChildrenSize() === 1) {\n if (isIndented) {\n // if the list node is nested, we just want to remove it,\n // effectively unindenting it.\n listNode.remove();\n listNodeParent.select();\n } else {\n listNode.insertBefore(paragraph);\n listNode.remove(); // If we have selection on the list item, we'll need to move it\n // to the paragraph\n\n const anchor = selection.anchor;\n const focus = selection.focus;\n const key = paragraph.getKey();\n\n if (anchor.type === 'element' && anchor.getNode().is(this)) {\n anchor.set(key, anchor.offset, 'element');\n }\n\n if (focus.type === 'element' && focus.getNode().is(this)) {\n focus.set(key, focus.offset, 'element');\n }\n }\n } else {\n listNode.insertBefore(paragraph);\n this.remove();\n }\n\n return true;\n }\n\n getValue() {\n const self = this.getLatest();\n return self.__value;\n }\n\n setValue(value) {\n const self = this.getWritable();\n self.__value = value;\n }\n\n getChecked() {\n const self = this.getLatest();\n return self.__checked;\n }\n\n setChecked(checked) {\n const self = this.getWritable();\n self.__checked = checked;\n }\n\n toggleChecked() {\n this.setChecked(!this.__checked);\n }\n\n getIndent() {\n // If we don't have a parent, we are likely serializing\n const parent = this.getParent();\n\n if (parent === null) {\n return this.getLatest().__indent;\n } // ListItemNode should always have a ListNode for a parent.\n\n\n let listNodeParent = parent.getParentOrThrow();\n let indentLevel = 0;\n\n while ($isListItemNode(listNodeParent)) {\n listNodeParent = listNodeParent.getParentOrThrow().getParentOrThrow();\n indentLevel++;\n }\n\n return indentLevel;\n }\n\n setIndent(indent) {\n if (!(typeof indent === 'number' && indent > -1)) {\n throw Error(`Invalid indent value.`);\n }\n\n let currentIndent = this.getIndent();\n\n while (currentIndent !== indent) {\n if (currentIndent < indent) {\n $handleIndent(this);\n currentIndent++;\n } else {\n $handleOutdent(this);\n currentIndent--;\n }\n }\n\n return this;\n }\n\n insertBefore(nodeToInsert) {\n if ($isListItemNode(nodeToInsert)) {\n const parent = this.getParentOrThrow();\n\n if ($isListNode(parent)) {\n const siblings = this.getNextSiblings();\n updateChildrenListItemValue(parent, siblings);\n }\n }\n\n return super.insertBefore(nodeToInsert);\n }\n\n canInsertAfter(node) {\n return $isListItemNode(node);\n }\n\n canReplaceWith(replacement) {\n return $isListItemNode(replacement);\n }\n\n canMergeWith(node) {\n return lexical.$isParagraphNode(node) || $isListItemNode(node);\n }\n\n extractWithChild(child, selection) {\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n const anchorNode = selection.anchor.getNode();\n const focusNode = selection.focus.getNode();\n return this.isParentOf(anchorNode) && this.isParentOf(focusNode) && this.getTextContent().length === selection.getTextContent().length;\n }\n\n isParentRequired() {\n return true;\n }\n\n createParentElementNode() {\n return $createListNode('bullet');\n }\n\n}\n\nfunction $setListItemThemeClassNames(dom, editorThemeClasses, node) {\n const classesToAdd = [];\n const classesToRemove = [];\n const listTheme = editorThemeClasses.list;\n const listItemClassName = listTheme ? listTheme.listitem : undefined;\n let nestedListItemClassName;\n\n if (listTheme && listTheme.nested) {\n nestedListItemClassName = listTheme.nested.listitem;\n }\n\n if (listItemClassName !== undefined) {\n const listItemClasses = listItemClassName.split(' ');\n classesToAdd.push(...listItemClasses);\n }\n\n if (listTheme) {\n const parentNode = node.getParent();\n const isCheckList = $isListNode(parentNode) && parentNode.getListType() === 'check';\n const checked = node.getChecked();\n\n if (!isCheckList || checked) {\n classesToRemove.push(listTheme.listitemUnchecked);\n }\n\n if (!isCheckList || !checked) {\n classesToRemove.push(listTheme.listitemChecked);\n }\n\n if (isCheckList) {\n classesToAdd.push(checked ? listTheme.listitemChecked : listTheme.listitemUnchecked);\n }\n }\n\n if (nestedListItemClassName !== undefined) {\n const nestedListItemClasses = nestedListItemClassName.split(' ');\n\n if (node.getChildren().some(child => $isListNode(child))) {\n classesToAdd.push(...nestedListItemClasses);\n } else {\n classesToRemove.push(...nestedListItemClasses);\n }\n }\n\n if (classesToRemove.length > 0) {\n utils.removeClassNamesFromElement(dom, ...classesToRemove);\n }\n\n if (classesToAdd.length > 0) {\n utils.addClassNamesToElement(dom, ...classesToAdd);\n }\n}\n\nfunction updateListItemChecked(dom, listItemNode, prevListItemNode, listNode) {\n // Only add attributes for leaf list items\n if ($isListNode(listItemNode.getFirstChild())) {\n dom.removeAttribute('role');\n dom.removeAttribute('tabIndex');\n dom.removeAttribute('aria-checked');\n } else {\n dom.setAttribute('role', 'checkbox');\n dom.setAttribute('tabIndex', '-1');\n\n if (!prevListItemNode || listItemNode.__checked !== prevListItemNode.__checked) {\n dom.setAttribute('aria-checked', listItemNode.getChecked() ? 'true' : 'false');\n }\n }\n}\n\nfunction convertListItemElement(domNode) {\n const checked = utils.isHTMLElement(domNode) && domNode.getAttribute('aria-checked') === 'true';\n return {\n node: $createListItemNode(checked)\n };\n}\n/**\n * Creates a new List Item node, passing true/false will convert it to a checkbox input.\n * @param checked - Is the List Item a checkbox and, if so, is it checked? undefined/null: not a checkbox, true/false is a checkbox and checked/unchecked, respectively.\n * @returns The new List Item.\n */\n\n\nfunction $createListItemNode(checked) {\n return lexical.$applyNodeReplacement(new ListItemNode(undefined, checked));\n}\n/**\n * Checks to see if the node is a ListItemNode.\n * @param node - The node to be checked.\n * @returns true if the node is a ListItemNode, false otherwise.\n */\n\nfunction $isListItemNode(node) {\n return node instanceof ListItemNode;\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/** @noInheritDoc */\nclass ListNode extends lexical.ElementNode {\n /** @internal */\n\n /** @internal */\n\n /** @internal */\n static getType() {\n return 'list';\n }\n\n static clone(node) {\n const listType = node.__listType || TAG_TO_LIST_TYPE[node.__tag];\n return new ListNode(listType, node.__start, node.__key);\n }\n\n constructor(listType, start, key) {\n super(key);\n\n const _listType = TAG_TO_LIST_TYPE[listType] || listType;\n\n this.__listType = _listType;\n this.__tag = _listType === 'number' ? 'ol' : 'ul';\n this.__start = start;\n }\n\n getTag() {\n return this.__tag;\n }\n\n setListType(type) {\n const writable = this.getWritable();\n writable.__listType = type;\n writable.__tag = type === 'number' ? 'ol' : 'ul';\n }\n\n getListType() {\n return this.__listType;\n }\n\n getStart() {\n return this.__start;\n } // View\n\n\n createDOM(config, _editor) {\n const tag = this.__tag;\n const dom = document.createElement(tag);\n\n if (this.__start !== 1) {\n dom.setAttribute('start', String(this.__start));\n } // @ts-expect-error Internal field.\n\n\n dom.__lexicalListType = this.__listType;\n setListThemeClassNames(dom, config.theme, this);\n return dom;\n }\n\n updateDOM(prevNode, dom, config) {\n if (prevNode.__tag !== this.__tag) {\n return true;\n }\n\n setListThemeClassNames(dom, config.theme, this);\n return false;\n }\n\n static importDOM() {\n return {\n ol: node => ({\n conversion: convertListNode,\n priority: 0\n }),\n ul: node => ({\n conversion: convertListNode,\n priority: 0\n })\n };\n }\n\n static importJSON(serializedNode) {\n const node = $createListNode(serializedNode.listType, serializedNode.start);\n node.setFormat(serializedNode.format);\n node.setIndent(serializedNode.indent);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n exportDOM(editor) {\n const {\n element\n } = super.exportDOM(editor);\n\n if (element && utils.isHTMLElement(element)) {\n if (this.__start !== 1) {\n element.setAttribute('start', String(this.__start));\n }\n\n if (this.__listType === 'check') {\n element.setAttribute('__lexicalListType', 'check');\n }\n }\n\n return {\n element\n };\n }\n\n exportJSON() {\n return { ...super.exportJSON(),\n listType: this.getListType(),\n start: this.getStart(),\n tag: this.getTag(),\n type: 'list',\n version: 1\n };\n }\n\n canBeEmpty() {\n return false;\n }\n\n canIndent() {\n return false;\n }\n\n append(...nodesToAppend) {\n for (let i = 0; i < nodesToAppend.length; i++) {\n const currentNode = nodesToAppend[i];\n\n if ($isListItemNode(currentNode)) {\n super.append(currentNode);\n } else {\n const listItemNode = $createListItemNode();\n\n if ($isListNode(currentNode)) {\n listItemNode.append(currentNode);\n } else if (lexical.$isElementNode(currentNode)) {\n const textNode = lexical.$createTextNode(currentNode.getTextContent());\n listItemNode.append(textNode);\n } else {\n listItemNode.append(currentNode);\n }\n\n super.append(listItemNode);\n }\n }\n\n updateChildrenListItemValue(this);\n return this;\n }\n\n extractWithChild(child) {\n return $isListItemNode(child);\n }\n\n}\n\nfunction setListThemeClassNames(dom, editorThemeClasses, node) {\n const classesToAdd = [];\n const classesToRemove = [];\n const listTheme = editorThemeClasses.list;\n\n if (listTheme !== undefined) {\n const listLevelsClassNames = listTheme[`${node.__tag}Depth`] || [];\n const listDepth = $getListDepth(node) - 1;\n const normalizedListDepth = listDepth % listLevelsClassNames.length;\n const listLevelClassName = listLevelsClassNames[normalizedListDepth];\n const listClassName = listTheme[node.__tag];\n let nestedListClassName;\n const nestedListTheme = listTheme.nested;\n\n if (nestedListTheme !== undefined && nestedListTheme.list) {\n nestedListClassName = nestedListTheme.list;\n }\n\n if (listClassName !== undefined) {\n classesToAdd.push(listClassName);\n }\n\n if (listLevelClassName !== undefined) {\n const listItemClasses = listLevelClassName.split(' ');\n classesToAdd.push(...listItemClasses);\n\n for (let i = 0; i < listLevelsClassNames.length; i++) {\n if (i !== normalizedListDepth) {\n classesToRemove.push(node.__tag + i);\n }\n }\n }\n\n if (nestedListClassName !== undefined) {\n const nestedListItemClasses = nestedListClassName.split(' ');\n\n if (listDepth > 1) {\n classesToAdd.push(...nestedListItemClasses);\n } else {\n classesToRemove.push(...nestedListItemClasses);\n }\n }\n }\n\n if (classesToRemove.length > 0) {\n utils.removeClassNamesFromElement(dom, ...classesToRemove);\n }\n\n if (classesToAdd.length > 0) {\n utils.addClassNamesToElement(dom, ...classesToAdd);\n }\n}\n/*\n * This function normalizes the children of a ListNode after the conversion from HTML,\n * ensuring that they are all ListItemNodes and contain either a single nested ListNode\n * or some other inline content.\n */\n\n\nfunction normalizeChildren(nodes) {\n const normalizedListItems = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if ($isListItemNode(node)) {\n normalizedListItems.push(node);\n const children = node.getChildren();\n\n if (children.length > 1) {\n children.forEach(child => {\n if ($isListNode(child)) {\n normalizedListItems.push(wrapInListItem(child));\n }\n });\n }\n } else {\n normalizedListItems.push(wrapInListItem(node));\n }\n }\n\n return normalizedListItems;\n}\n\nfunction convertListNode(domNode) {\n const nodeName = domNode.nodeName.toLowerCase();\n let node = null;\n\n if (nodeName === 'ol') {\n // @ts-ignore\n const start = domNode.start;\n node = $createListNode('number', start);\n } else if (nodeName === 'ul') {\n if (utils.isHTMLElement(domNode) && domNode.getAttribute('__lexicallisttype') === 'check') {\n node = $createListNode('check');\n } else {\n node = $createListNode('bullet');\n }\n }\n\n return {\n after: normalizeChildren,\n node\n };\n}\n\nconst TAG_TO_LIST_TYPE = {\n ol: 'number',\n ul: 'bullet'\n};\n/**\n * Creates a ListNode of listType.\n * @param listType - The type of list to be created. Can be 'number', 'bullet', or 'check'.\n * @param start - Where an ordered list starts its count, start = 1 if left undefined.\n * @returns The new ListNode\n */\n\nfunction $createListNode(listType, start = 1) {\n return lexical.$applyNodeReplacement(new ListNode(listType, start));\n}\n/**\n * Checks to see if the node is a ListNode.\n * @param node - The node to be checked.\n * @returns true if the node is a ListNode, false otherwise.\n */\n\nfunction $isListNode(node) {\n return node instanceof ListNode;\n}\n\n/** @module @lexical/list */\nconst INSERT_UNORDERED_LIST_COMMAND = lexical.createCommand('INSERT_UNORDERED_LIST_COMMAND');\nconst INSERT_ORDERED_LIST_COMMAND = lexical.createCommand('INSERT_ORDERED_LIST_COMMAND');\nconst INSERT_CHECK_LIST_COMMAND = lexical.createCommand('INSERT_CHECK_LIST_COMMAND');\nconst REMOVE_LIST_COMMAND = lexical.createCommand('REMOVE_LIST_COMMAND');\n\nexports.$createListItemNode = $createListItemNode;\nexports.$createListNode = $createListNode;\nexports.$getListDepth = $getListDepth;\nexports.$handleListInsertParagraph = $handleListInsertParagraph;\nexports.$isListItemNode = $isListItemNode;\nexports.$isListNode = $isListNode;\nexports.INSERT_CHECK_LIST_COMMAND = INSERT_CHECK_LIST_COMMAND;\nexports.INSERT_ORDERED_LIST_COMMAND = INSERT_ORDERED_LIST_COMMAND;\nexports.INSERT_UNORDERED_LIST_COMMAND = INSERT_UNORDERED_LIST_COMMAND;\nexports.ListItemNode = ListItemNode;\nexports.ListNode = ListNode;\nexports.REMOVE_LIST_COMMAND = REMOVE_LIST_COMMAND;\nexports.insertList = insertList;\nexports.removeList = removeList;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalList = process.env.NODE_ENV === 'development' ? require('./LexicalList.dev.js') : require('./LexicalList.prod.js')\nmodule.exports = LexicalList;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction AutoFocusPlugin({\n defaultSelection\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n react.useEffect(() => {\n editor.focus(() => {\n // If we try and move selection to the same point with setBaseAndExtent, it won't\n // trigger a re-focus on the element. So in the case this occurs, we'll need to correct it.\n // Normally this is fine, Selection API !== Focus API, but fore the intents of the naming\n // of this plugin, which should preserve focus too.\n const activeElement = document.activeElement;\n const rootElement = editor.getRootElement();\n\n if (rootElement !== null && (activeElement === null || !rootElement.contains(activeElement))) {\n // Note: preventScroll won't work in Webkit.\n rootElement.focus({\n preventScroll: true\n });\n }\n }, {\n defaultSelection\n });\n }, [defaultSelection, editor]);\n return null;\n}\n\nexports.AutoFocusPlugin = AutoFocusPlugin;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalAutoFocusPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalAutoFocusPlugin.dev.js') : require('./LexicalAutoFocusPlugin.prod.js')\nmodule.exports = LexicalAutoFocusPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar lexical = require('lexical');\nvar React = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst useLayoutEffectImpl = CAN_USE_DOM ? React.useLayoutEffect : React.useEffect;\nvar useLayoutEffect = useLayoutEffectImpl;\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst HISTORY_MERGE_OPTIONS = {\n tag: 'history-merge'\n};\nfunction LexicalComposer({\n initialConfig,\n children\n}) {\n const composerContext = React.useMemo(() => {\n const {\n theme,\n namespace,\n editor__DEPRECATED: initialEditor,\n nodes,\n onError,\n editorState: initialEditorState\n } = initialConfig;\n const context = LexicalComposerContext.createLexicalComposerContext(null, theme);\n let editor = initialEditor || null;\n\n if (editor === null) {\n const newEditor = lexical.createEditor({\n editable: initialConfig.editable,\n namespace,\n nodes,\n onError: error => onError(error, newEditor),\n theme\n });\n initializeEditor(newEditor, initialEditorState);\n editor = newEditor;\n }\n\n return [editor, context];\n }, // We only do this for init\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n useLayoutEffect(() => {\n const isEditable = initialConfig.editable;\n const [editor] = composerContext;\n editor.setEditable(isEditable !== undefined ? isEditable : true); // We only do this for init\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return /*#__PURE__*/React.createElement(LexicalComposerContext.LexicalComposerContext.Provider, {\n value: composerContext\n }, children);\n}\n\nfunction initializeEditor(editor, initialEditorState) {\n if (initialEditorState === null) {\n return;\n } else if (initialEditorState === undefined) {\n editor.update(() => {\n const root = lexical.$getRoot();\n\n if (root.isEmpty()) {\n const paragraph = lexical.$createParagraphNode();\n root.append(paragraph);\n const activeElement = CAN_USE_DOM ? document.activeElement : null;\n\n if (lexical.$getSelection() !== null || activeElement !== null && activeElement === editor.getRootElement()) {\n paragraph.select();\n }\n }\n }, HISTORY_MERGE_OPTIONS);\n } else if (initialEditorState !== null) {\n switch (typeof initialEditorState) {\n case 'string':\n {\n const parsedEditorState = editor.parseEditorState(initialEditorState);\n editor.setEditorState(parsedEditorState, HISTORY_MERGE_OPTIONS);\n break;\n }\n\n case 'object':\n {\n editor.setEditorState(initialEditorState, HISTORY_MERGE_OPTIONS);\n break;\n }\n\n case 'function':\n {\n editor.update(() => {\n const root = lexical.$getRoot();\n\n if (root.isEmpty()) {\n initialEditorState(editor);\n }\n }, HISTORY_MERGE_OPTIONS);\n break;\n }\n }\n }\n}\n\nexports.LexicalComposer = LexicalComposer;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalComposer = process.env.NODE_ENV === 'development' ? require('./LexicalComposer.dev.js') : require('./LexicalComposer.prod.js')\nmodule.exports = LexicalComposer;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst LexicalComposerContext = /*#__PURE__*/react.createContext(null);\nfunction createLexicalComposerContext(parent, theme) {\n let parentContext = null;\n\n if (parent != null) {\n parentContext = parent[1];\n }\n\n function getTheme() {\n if (theme != null) {\n return theme;\n }\n\n return parentContext != null ? parentContext.getTheme() : null;\n }\n\n return {\n getTheme\n };\n}\nfunction useLexicalComposerContext() {\n const composerContext = react.useContext(LexicalComposerContext);\n\n if (composerContext == null) {\n {\n throw Error(`LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext`);\n }\n }\n\n return composerContext;\n}\n\nexports.LexicalComposerContext = LexicalComposerContext;\nexports.createLexicalComposerContext = createLexicalComposerContext;\nexports.useLexicalComposerContext = useLexicalComposerContext;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalComposerContext = process.env.NODE_ENV === 'development' ? require('./LexicalComposerContext.dev.js') : require('./LexicalComposerContext.prod.js')\nmodule.exports = LexicalComposerContext;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar React = require('react');\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst useLayoutEffectImpl = CAN_USE_DOM ? React.useLayoutEffect : React.useEffect;\nvar useLayoutEffect = useLayoutEffectImpl;\n\nfunction ContentEditable({\n ariaActiveDescendant,\n ariaAutoComplete,\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaLabel,\n ariaLabelledBy,\n ariaMultiline,\n ariaOwns,\n ariaRequired,\n autoCapitalize,\n className,\n id,\n role = 'textbox',\n spellCheck = true,\n style,\n tabIndex,\n 'data-testid': testid,\n ...rest\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const [isEditable, setEditable] = React.useState(false);\n const ref = React.useCallback(rootElement => {\n editor.setRootElement(rootElement);\n }, [editor]);\n useLayoutEffect(() => {\n setEditable(editor.isEditable());\n return editor.registerEditableListener(currentIsEditable => {\n setEditable(currentIsEditable);\n });\n }, [editor]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, rest, {\n \"aria-activedescendant\": !isEditable ? undefined : ariaActiveDescendant,\n \"aria-autocomplete\": !isEditable ? 'none' : ariaAutoComplete,\n \"aria-controls\": !isEditable ? undefined : ariaControls,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": !isEditable ? undefined : role === 'combobox' ? !!ariaExpanded : undefined,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-multiline\": ariaMultiline,\n \"aria-owns\": !isEditable ? undefined : ariaOwns,\n \"aria-readonly\": !isEditable ? true : undefined,\n \"aria-required\": ariaRequired,\n autoCapitalize: autoCapitalize,\n className: className,\n contentEditable: isEditable,\n \"data-testid\": testid,\n id: id,\n ref: ref,\n role: role,\n spellCheck: spellCheck,\n style: style,\n tabIndex: tabIndex\n }));\n}\n\nexports.ContentEditable = ContentEditable;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalContentEditable = process.env.NODE_ENV === 'development' ? require('./LexicalContentEditable.dev.js') : require('./LexicalContentEditable.prod.js')\nmodule.exports = LexicalContentEditable;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar lexical = require('lexical');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nclass DecoratorBlockNode extends lexical.DecoratorNode {\n constructor(format, key) {\n super(key);\n this.__format = format || '';\n }\n\n exportJSON() {\n return {\n format: this.__format || '',\n type: 'decorator-block',\n version: 1\n };\n }\n\n createDOM() {\n return document.createElement('div');\n }\n\n updateDOM() {\n return false;\n }\n\n setFormat(format) {\n const self = this.getWritable();\n self.__format = format;\n }\n\n isInline() {\n return false;\n }\n\n}\nfunction $isDecoratorBlockNode(node) {\n return node instanceof DecoratorBlockNode;\n}\n\nexports.$isDecoratorBlockNode = $isDecoratorBlockNode;\nexports.DecoratorBlockNode = DecoratorBlockNode;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalDecoratorBlockNode = process.env.NODE_ENV === 'development' ? require('./LexicalDecoratorBlockNode.dev.js') : require('./LexicalDecoratorBlockNode.prod.js')\nmodule.exports = LexicalDecoratorBlockNode;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar React = require('react');\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n}\n\nvar changedArray = function changedArray(a, b) {\n if (a === void 0) {\n a = [];\n }\n\n if (b === void 0) {\n b = [];\n }\n\n return a.length !== b.length || a.some(function (item, index) {\n return !Object.is(item, b[index]);\n });\n};\n\nvar initialState = {\n error: null\n};\n\nvar ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n\n function ErrorBoundary() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n _this.state = initialState;\n\n _this.resetErrorBoundary = function () {\n var _this$props;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this.props.onReset == null ? void 0 : (_this$props = _this.props).onReset.apply(_this$props, args);\n\n _this.reset();\n };\n\n return _this;\n }\n\n ErrorBoundary.getDerivedStateFromError = function getDerivedStateFromError(error) {\n return {\n error: error\n };\n };\n\n var _proto = ErrorBoundary.prototype;\n\n _proto.reset = function reset() {\n this.setState(initialState);\n };\n\n _proto.componentDidCatch = function componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n\n (_this$props$onError = (_this$props2 = this.props).onError) == null ? void 0 : _this$props$onError.call(_this$props2, error, info);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n var error = this.state.error;\n var resetKeys = this.props.resetKeys; // There's an edge case where if the thing that triggered the error\n // happens to *also* be in the resetKeys array, we'd end up resetting\n // the error boundary immediately. This would likely trigger a second\n // error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call\n // of cDU after the error is set\n\n if (error !== null && prevState.error !== null && changedArray(prevProps.resetKeys, resetKeys)) {\n var _this$props$onResetKe, _this$props3;\n\n (_this$props$onResetKe = (_this$props3 = this.props).onResetKeysChange) == null ? void 0 : _this$props$onResetKe.call(_this$props3, prevProps.resetKeys, resetKeys);\n this.reset();\n }\n };\n\n _proto.render = function render() {\n var error = this.state.error;\n var _this$props4 = this.props,\n fallbackRender = _this$props4.fallbackRender,\n FallbackComponent = _this$props4.FallbackComponent,\n fallback = _this$props4.fallback;\n\n if (error !== null) {\n var _props = {\n error: error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n\n if ( /*#__PURE__*/React.isValidElement(fallback)) {\n return fallback;\n } else if (typeof fallbackRender === 'function') {\n return fallbackRender(_props);\n } else if (FallbackComponent) {\n return /*#__PURE__*/React.createElement(FallbackComponent, _props);\n } else {\n throw new Error('react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop');\n }\n }\n\n return this.props.children;\n };\n\n return ErrorBoundary;\n}(React.Component);\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction LexicalErrorBoundary({\n children,\n onError\n}) {\n return /*#__PURE__*/React.createElement(ErrorBoundary, {\n fallback: /*#__PURE__*/React.createElement(\"div\", {\n style: {\n border: '1px solid #f00',\n color: '#f00',\n padding: '8px'\n }\n }, \"An error was thrown.\"),\n onError: onError\n }, children);\n}\n\nmodule.exports = LexicalErrorBoundary;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalErrorBoundary = process.env.NODE_ENV === 'development' ? require('./LexicalErrorBoundary.dev.js') : require('./LexicalErrorBoundary.prod.js')\nmodule.exports = LexicalErrorBoundary;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar history = require('@lexical/history');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction useHistory(editor, externalHistoryState, delay = 1000) {\n const historyState = react.useMemo(() => externalHistoryState || history.createEmptyHistoryState(), [externalHistoryState]);\n react.useEffect(() => {\n return history.registerHistory(editor, historyState, delay);\n }, [delay, editor, historyState]);\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction HistoryPlugin({\n externalHistoryState\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n useHistory(editor, externalHistoryState);\n return null;\n}\n\nexports.createEmptyHistoryState = history.createEmptyHistoryState;\nexports.HistoryPlugin = HistoryPlugin;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalHistoryPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalHistoryPlugin.dev.js') : require('./LexicalHistoryPlugin.prod.js')\nmodule.exports = LexicalHistoryPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar link = require('@lexical/link');\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction LinkPlugin({\n validateUrl\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n react.useEffect(() => {\n if (!editor.hasNodes([link.LinkNode])) {\n throw new Error('LinkPlugin: LinkNode not registered on editor');\n }\n\n return utils.mergeRegister(editor.registerCommand(link.TOGGLE_LINK_COMMAND, payload => {\n if (payload === null) {\n link.toggleLink(payload);\n return true;\n } else if (typeof payload === 'string') {\n if (validateUrl === undefined || validateUrl(payload)) {\n link.toggleLink(payload);\n return true;\n }\n\n return false;\n } else {\n const {\n url,\n target,\n rel,\n title\n } = payload;\n link.toggleLink(url, {\n rel,\n target,\n title\n });\n return true;\n }\n }, lexical.COMMAND_PRIORITY_LOW), validateUrl !== undefined ? editor.registerCommand(lexical.PASTE_COMMAND, event => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection) || selection.isCollapsed() || !(event instanceof ClipboardEvent) || event.clipboardData == null) {\n return false;\n }\n\n const clipboardText = event.clipboardData.getData('text');\n\n if (!validateUrl(clipboardText)) {\n return false;\n } // If we select nodes that are elements then avoid applying the link.\n\n\n if (!selection.getNodes().some(node => lexical.$isElementNode(node))) {\n editor.dispatchCommand(link.TOGGLE_LINK_COMMAND, clipboardText);\n event.preventDefault();\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_LOW) : () => {// Don't paste arbritrary text as a link when there's no validate function\n });\n }, [editor, validateUrl]);\n return null;\n}\n\nexports.LinkPlugin = LinkPlugin;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalLinkPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalLinkPlugin.dev.js') : require('./LexicalLinkPlugin.prod.js')\nmodule.exports = LexicalLinkPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar list = require('@lexical/list');\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar react = require('react');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction useList(editor) {\n react.useEffect(() => {\n return utils.mergeRegister(editor.registerCommand(list.INSERT_ORDERED_LIST_COMMAND, () => {\n list.insertList(editor, 'number');\n return true;\n }, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(list.INSERT_UNORDERED_LIST_COMMAND, () => {\n list.insertList(editor, 'bullet');\n return true;\n }, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(list.REMOVE_LIST_COMMAND, () => {\n list.removeList(editor);\n return true;\n }, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical.INSERT_PARAGRAPH_COMMAND, () => {\n const hasHandledInsertParagraph = list.$handleListInsertParagraph();\n\n if (hasHandledInsertParagraph) {\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_LOW));\n }, [editor]);\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction ListPlugin() {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n react.useEffect(() => {\n if (!editor.hasNodes([list.ListNode, list.ListItemNode])) {\n throw new Error('ListPlugin: ListNode and/or ListItemNode not registered on editor');\n }\n }, [editor]);\n useList(editor);\n return null;\n}\n\nexports.ListPlugin = ListPlugin;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalListPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalListPlugin.dev.js') : require('./LexicalListPlugin.prod.js')\nmodule.exports = LexicalListPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;\nvar useLayoutEffect = useLayoutEffectImpl;\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction OnChangePlugin({\n ignoreHistoryMergeTagChange = true,\n ignoreSelectionChange = false,\n onChange\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n useLayoutEffect(() => {\n if (onChange) {\n return editor.registerUpdateListener(({\n editorState,\n dirtyElements,\n dirtyLeaves,\n prevEditorState,\n tags\n }) => {\n if (ignoreSelectionChange && dirtyElements.size === 0 && dirtyLeaves.size === 0 || ignoreHistoryMergeTagChange && tags.has('history-merge') || prevEditorState.isEmpty()) {\n return;\n }\n\n onChange(editorState, editor, tags);\n });\n }\n }, [editor, ignoreHistoryMergeTagChange, ignoreSelectionChange, onChange]);\n return null;\n}\n\nexports.OnChangePlugin = OnChangePlugin;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalOnChangePlugin = process.env.NODE_ENV === 'development' ? require('./LexicalOnChangePlugin.dev.js') : require('./LexicalOnChangePlugin.prod.js')\nmodule.exports = LexicalOnChangePlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar useLexicalEditable = require('@lexical/react/useLexicalEditable');\nvar React = require('react');\nvar text = require('@lexical/text');\nvar utils = require('@lexical/utils');\nvar reactDom = require('react-dom');\nvar dragon = require('@lexical/dragon');\nvar richText = require('@lexical/rich-text');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst useLayoutEffectImpl = CAN_USE_DOM ? React.useLayoutEffect : React.useEffect;\nvar useLayoutEffect = useLayoutEffectImpl;\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction canShowPlaceholderFromCurrentEditorState(editor) {\n const currentCanShowPlaceholder = editor.getEditorState().read(text.$canShowPlaceholderCurry(editor.isComposing()));\n return currentCanShowPlaceholder;\n}\n\nfunction useCanShowPlaceholder(editor) {\n const [canShowPlaceholder, setCanShowPlaceholder] = React.useState(() => canShowPlaceholderFromCurrentEditorState(editor));\n useLayoutEffect(() => {\n function resetCanShowPlaceholder() {\n const currentCanShowPlaceholder = canShowPlaceholderFromCurrentEditorState(editor);\n setCanShowPlaceholder(currentCanShowPlaceholder);\n }\n\n resetCanShowPlaceholder();\n return utils.mergeRegister(editor.registerUpdateListener(() => {\n resetCanShowPlaceholder();\n }), editor.registerEditableListener(() => {\n resetCanShowPlaceholder();\n }));\n }, [editor]);\n return canShowPlaceholder;\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction useDecorators(editor, ErrorBoundary) {\n const [decorators, setDecorators] = React.useState(() => editor.getDecorators()); // Subscribe to changes\n\n useLayoutEffect(() => {\n return editor.registerDecoratorListener(nextDecorators => {\n reactDom.flushSync(() => {\n setDecorators(nextDecorators);\n });\n });\n }, [editor]);\n React.useEffect(() => {\n // If the content editable mounts before the subscription is added, then\n // nothing will be rendered on initial pass. We can get around that by\n // ensuring that we set the value.\n setDecorators(editor.getDecorators());\n }, [editor]); // Return decorators defined as React Portals\n\n return React.useMemo(() => {\n const decoratedPortals = [];\n const decoratorKeys = Object.keys(decorators);\n\n for (let i = 0; i < decoratorKeys.length; i++) {\n const nodeKey = decoratorKeys[i];\n const reactDecorator = /*#__PURE__*/React.createElement(ErrorBoundary, {\n onError: e => editor._onError(e)\n }, /*#__PURE__*/React.createElement(React.Suspense, {\n fallback: null\n }, decorators[nodeKey]));\n const element = editor.getElementByKey(nodeKey);\n\n if (element !== null) {\n decoratedPortals.push( /*#__PURE__*/reactDom.createPortal(reactDecorator, element, nodeKey));\n }\n }\n\n return decoratedPortals;\n }, [ErrorBoundary, decorators, editor]);\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction useRichTextSetup(editor) {\n useLayoutEffect(() => {\n return utils.mergeRegister(richText.registerRichText(editor), dragon.registerDragonSupport(editor)); // We only do this for init\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [editor]);\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction RichTextPlugin({\n contentEditable,\n placeholder,\n ErrorBoundary\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const decorators = useDecorators(editor, ErrorBoundary);\n useRichTextSetup(editor);\n return /*#__PURE__*/React.createElement(React.Fragment, null, contentEditable, /*#__PURE__*/React.createElement(Placeholder, {\n content: placeholder\n }), decorators);\n}\n\nfunction Placeholder({\n content\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const showPlaceholder = useCanShowPlaceholder(editor);\n const editable = useLexicalEditable();\n\n if (!showPlaceholder) {\n return null;\n }\n\n if (typeof content === 'function') {\n return content(editable);\n } else {\n return content;\n }\n}\n\nexports.RichTextPlugin = RichTextPlugin;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalRichTextPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalRichTextPlugin.dev.js') : require('./LexicalRichTextPlugin.prod.js')\nmodule.exports = LexicalRichTextPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction indentOverTab(selection) {\n // const handled = new Set();\n const nodes = selection.getNodes();\n const canIndentBlockNodes = utils.$filter(nodes, node => {\n if (lexical.$isBlockElementNode(node) && node.canIndent()) {\n return node;\n }\n\n return null;\n }); // 1. If selection spans across canIndent block nodes: indent\n\n if (canIndentBlockNodes.length > 0) {\n return true;\n } // 2. If first (anchor/focus) is at block start: indent\n\n\n const anchor = selection.anchor;\n const focus = selection.focus;\n const first = focus.isBefore(anchor) ? focus : anchor;\n const firstNode = first.getNode();\n const firstBlock = utils.$getNearestBlockElementAncestorOrThrow(firstNode);\n\n if (firstBlock.canIndent()) {\n const firstBlockKey = firstBlock.getKey();\n let selectionAtStart = lexical.$createRangeSelection();\n selectionAtStart.anchor.set(firstBlockKey, 0, 'element');\n selectionAtStart.focus.set(firstBlockKey, 0, 'element');\n selectionAtStart = lexical.$normalizeSelection__EXPERIMENTAL(selectionAtStart);\n\n if (selectionAtStart.anchor.is(first)) {\n return true;\n }\n } // 3. Else: tab\n\n\n return false;\n}\n\nfunction registerTabIndentation(editor) {\n return editor.registerCommand(lexical.KEY_TAB_COMMAND, event => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n event.preventDefault();\n const command = indentOverTab(selection) ? event.shiftKey ? lexical.OUTDENT_CONTENT_COMMAND : lexical.INDENT_CONTENT_COMMAND : lexical.INSERT_TAB_COMMAND;\n return editor.dispatchCommand(command, undefined);\n }, lexical.COMMAND_PRIORITY_EDITOR);\n}\n/**\n * This plugin adds the ability to indent content using the tab key. Generally, we don't\n * recommend using this plugin as it could negatively affect acessibility for keyboard\n * users, causing focus to become trapped within the editor.\n */\n\nfunction TabIndentationPlugin() {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n react.useEffect(() => {\n return registerTabIndentation(editor);\n });\n return null;\n}\n\nexports.TabIndentationPlugin = TabIndentationPlugin;\nexports.registerTabIndentation = registerTabIndentation;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalTabIndentationPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalTabIndentationPlugin.dev.js') : require('./LexicalTabIndentationPlugin.prod.js')\nmodule.exports = LexicalTabIndentationPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;\nvar useLayoutEffect = useLayoutEffectImpl;\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/**\n * Shortcut to Lexical subscriptions when values are used for render.\n */\nfunction useLexicalSubscription(subscription) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const initializedSubscription = react.useMemo(() => subscription(editor), [editor, subscription]);\n const valueRef = react.useRef(initializedSubscription.initialValueFn());\n const [value, setValue] = react.useState(valueRef.current);\n useLayoutEffect(() => {\n const {\n initialValueFn,\n subscribe\n } = initializedSubscription;\n const currentValue = initialValueFn();\n\n if (valueRef.current !== currentValue) {\n valueRef.current = currentValue;\n setValue(currentValue);\n }\n\n return subscribe(newValue => {\n valueRef.current = newValue;\n setValue(newValue);\n });\n }, [initializedSubscription, subscription]);\n return value;\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction subscription(editor) {\n return {\n initialValueFn: () => editor.isEditable(),\n subscribe: callback => {\n return editor.registerEditableListener(callback);\n }\n };\n}\n\nfunction useLexicalEditable() {\n return useLexicalSubscription(subscription);\n}\n\nmodule.exports = useLexicalEditable;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst useLexicalEditable = process.env.NODE_ENV === 'development' ? require('./useLexicalEditable.dev.js') : require('./useLexicalEditable.prod.js')\nmodule.exports = useLexicalEditable;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar clipboard = require('@lexical/clipboard');\nvar selection = require('@lexical/selection');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction caretFromPoint(x, y) {\n if (typeof document.caretRangeFromPoint !== 'undefined') {\n const range = document.caretRangeFromPoint(x, y);\n\n if (range === null) {\n return null;\n }\n\n return {\n node: range.startContainer,\n offset: range.startOffset\n }; // @ts-ignore\n } else if (document.caretPositionFromPoint !== 'undefined') {\n // @ts-ignore FF - no types\n const range = document.caretPositionFromPoint(x, y);\n\n if (range === null) {\n return null;\n }\n\n return {\n node: range.offsetNode,\n offset: range.offset\n };\n } else {\n // Gracefully handle IE\n return null;\n }\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst documentMode = CAN_USE_DOM && 'documentMode' in document ? document.documentMode : null;\nCAN_USE_DOM && /Mac|iPod|iPhone|iPad/.test(navigator.platform);\nCAN_USE_DOM && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);\nconst CAN_USE_BEFORE_INPUT = CAN_USE_DOM && 'InputEvent' in window && !documentMode ? 'getTargetRanges' in new window.InputEvent('input') : false;\nconst IS_SAFARI = CAN_USE_DOM && /Version\\/[\\d.]+.*Safari/.test(navigator.userAgent);\nconst IS_IOS = CAN_USE_DOM && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; // Keep these in case we need to use them in the future.\n// export const IS_WINDOWS: boolean = CAN_USE_DOM && /Win/.test(navigator.platform);\n\nconst IS_CHROME = CAN_USE_DOM && /^(?=.*Chrome).*/i.test(navigator.userAgent); // export const canUseTextInputEvent: boolean = CAN_USE_DOM && 'TextEvent' in window && !documentMode;\n\nconst IS_APPLE_WEBKIT = CAN_USE_DOM && /AppleWebKit\\/[\\d.]+/.test(navigator.userAgent) && !IS_CHROME;\n\n/** @module @lexical/rich-text */\nconst DRAG_DROP_PASTE = lexical.createCommand('DRAG_DROP_PASTE_FILE');\n\n/** @noInheritDoc */\nclass QuoteNode extends lexical.ElementNode {\n static getType() {\n return 'quote';\n }\n\n static clone(node) {\n return new QuoteNode(node.__key);\n }\n\n constructor(key) {\n super(key);\n } // View\n\n\n createDOM(config) {\n const element = document.createElement('blockquote');\n utils.addClassNamesToElement(element, config.theme.quote);\n return element;\n }\n\n updateDOM(prevNode, dom) {\n return false;\n }\n\n static importDOM() {\n return {\n blockquote: node => ({\n conversion: convertBlockquoteElement,\n priority: 0\n })\n };\n }\n\n exportDOM(editor) {\n const {\n element\n } = super.exportDOM(editor);\n\n if (element && utils.isHTMLElement(element)) {\n if (this.isEmpty()) element.append(document.createElement('br'));\n const formatType = this.getFormatType();\n element.style.textAlign = formatType;\n const direction = this.getDirection();\n\n if (direction) {\n element.dir = direction;\n }\n }\n\n return {\n element\n };\n }\n\n static importJSON(serializedNode) {\n const node = $createQuoteNode();\n node.setFormat(serializedNode.format);\n node.setIndent(serializedNode.indent);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n exportJSON() {\n return { ...super.exportJSON(),\n type: 'quote'\n };\n } // Mutation\n\n\n insertNewAfter(_, restoreSelection) {\n const newBlock = lexical.$createParagraphNode();\n const direction = this.getDirection();\n newBlock.setDirection(direction);\n this.insertAfter(newBlock, restoreSelection);\n return newBlock;\n }\n\n collapseAtStart() {\n const paragraph = lexical.$createParagraphNode();\n const children = this.getChildren();\n children.forEach(child => paragraph.append(child));\n this.replace(paragraph);\n return true;\n }\n\n}\nfunction $createQuoteNode() {\n return lexical.$applyNodeReplacement(new QuoteNode());\n}\nfunction $isQuoteNode(node) {\n return node instanceof QuoteNode;\n}\n\n/** @noInheritDoc */\nclass HeadingNode extends lexical.ElementNode {\n /** @internal */\n static getType() {\n return 'heading';\n }\n\n static clone(node) {\n return new HeadingNode(node.__tag, node.__key);\n }\n\n constructor(tag, key) {\n super(key);\n this.__tag = tag;\n }\n\n getTag() {\n return this.__tag;\n } // View\n\n\n createDOM(config) {\n const tag = this.__tag;\n const element = document.createElement(tag);\n const theme = config.theme;\n const classNames = theme.heading;\n\n if (classNames !== undefined) {\n const className = classNames[tag];\n utils.addClassNamesToElement(element, className);\n }\n\n return element;\n }\n\n updateDOM(prevNode, dom) {\n return false;\n }\n\n static importDOM() {\n return {\n h1: node => ({\n conversion: convertHeadingElement,\n priority: 0\n }),\n h2: node => ({\n conversion: convertHeadingElement,\n priority: 0\n }),\n h3: node => ({\n conversion: convertHeadingElement,\n priority: 0\n }),\n h4: node => ({\n conversion: convertHeadingElement,\n priority: 0\n }),\n h5: node => ({\n conversion: convertHeadingElement,\n priority: 0\n }),\n h6: node => ({\n conversion: convertHeadingElement,\n priority: 0\n }),\n p: node => {\n // domNode is a <p> since we matched it by nodeName\n const paragraph = node;\n const firstChild = paragraph.firstChild;\n\n if (firstChild !== null && isGoogleDocsTitle(firstChild)) {\n return {\n conversion: () => ({\n node: null\n }),\n priority: 3\n };\n }\n\n return null;\n },\n span: node => {\n if (isGoogleDocsTitle(node)) {\n return {\n conversion: domNode => {\n return {\n node: $createHeadingNode('h1')\n };\n },\n priority: 3\n };\n }\n\n return null;\n }\n };\n }\n\n exportDOM(editor) {\n const {\n element\n } = super.exportDOM(editor);\n\n if (element && utils.isHTMLElement(element)) {\n if (this.isEmpty()) element.append(document.createElement('br'));\n const formatType = this.getFormatType();\n element.style.textAlign = formatType;\n const direction = this.getDirection();\n\n if (direction) {\n element.dir = direction;\n }\n }\n\n return {\n element\n };\n }\n\n static importJSON(serializedNode) {\n const node = $createHeadingNode(serializedNode.tag);\n node.setFormat(serializedNode.format);\n node.setIndent(serializedNode.indent);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n exportJSON() {\n return { ...super.exportJSON(),\n tag: this.getTag(),\n type: 'heading',\n version: 1\n };\n } // Mutation\n\n\n insertNewAfter(selection, restoreSelection = true) {\n const anchorOffet = selection ? selection.anchor.offset : 0;\n const newElement = anchorOffet > 0 && anchorOffet < this.getTextContentSize() ? $createHeadingNode(this.getTag()) : lexical.$createParagraphNode();\n const direction = this.getDirection();\n newElement.setDirection(direction);\n this.insertAfter(newElement, restoreSelection);\n return newElement;\n }\n\n collapseAtStart() {\n const newElement = !this.isEmpty() ? $createHeadingNode(this.getTag()) : lexical.$createParagraphNode();\n const children = this.getChildren();\n children.forEach(child => newElement.append(child));\n this.replace(newElement);\n return true;\n }\n\n extractWithChild() {\n return true;\n }\n\n}\n\nfunction isGoogleDocsTitle(domNode) {\n if (domNode.nodeName.toLowerCase() === 'span') {\n return domNode.style.fontSize === '26pt';\n }\n\n return false;\n}\n\nfunction convertHeadingElement(element) {\n const nodeName = element.nodeName.toLowerCase();\n let node = null;\n\n if (nodeName === 'h1' || nodeName === 'h2' || nodeName === 'h3' || nodeName === 'h4' || nodeName === 'h5' || nodeName === 'h6') {\n node = $createHeadingNode(nodeName);\n\n if (element.style !== null) {\n node.setFormat(element.style.textAlign);\n }\n }\n\n return {\n node\n };\n}\n\nfunction convertBlockquoteElement(element) {\n const node = $createQuoteNode();\n\n if (element.style !== null) {\n node.setFormat(element.style.textAlign);\n }\n\n return {\n node\n };\n}\n\nfunction $createHeadingNode(headingTag) {\n return lexical.$applyNodeReplacement(new HeadingNode(headingTag));\n}\nfunction $isHeadingNode(node) {\n return node instanceof HeadingNode;\n}\n\nfunction onPasteForRichText(event, editor) {\n event.preventDefault();\n editor.update(() => {\n const selection = lexical.$getSelection();\n const clipboardData = event instanceof InputEvent || event instanceof KeyboardEvent ? null : event.clipboardData;\n\n if (clipboardData != null && (lexical.$isRangeSelection(selection) || lexical.DEPRECATED_$isGridSelection(selection))) {\n clipboard.$insertDataTransferForRichText(clipboardData, selection, editor);\n }\n }, {\n tag: 'paste'\n });\n}\n\nasync function onCutForRichText(event, editor) {\n await clipboard.copyToClipboard(editor, utils.objectKlassEquals(event, ClipboardEvent) ? event : null);\n editor.update(() => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isRangeSelection(selection)) {\n selection.removeText();\n } else if (lexical.$isNodeSelection(selection)) {\n selection.getNodes().forEach(node => node.remove());\n }\n });\n} // Clipboard may contain files that we aren't allowed to read. While the event is arguably useless,\n// in certain ocassions, we want to know whether it was a file transfer, as opposed to text. We\n// control this with the first boolean flag.\n\n\nfunction eventFiles(event) {\n let dataTransfer = null;\n\n if (event instanceof DragEvent) {\n dataTransfer = event.dataTransfer;\n } else if (event instanceof ClipboardEvent) {\n dataTransfer = event.clipboardData;\n }\n\n if (dataTransfer === null) {\n return [false, [], false];\n }\n\n const types = dataTransfer.types;\n const hasFiles = types.includes('Files');\n const hasContent = types.includes('text/html') || types.includes('text/plain');\n return [hasFiles, Array.from(dataTransfer.files), hasContent];\n}\n\nfunction handleIndentAndOutdent(indentOrOutdent) {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n const alreadyHandled = new Set();\n const nodes = selection.getNodes();\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n const key = node.getKey();\n\n if (alreadyHandled.has(key)) {\n continue;\n }\n\n const parentBlock = utils.$getNearestBlockElementAncestorOrThrow(node);\n const parentKey = parentBlock.getKey();\n\n if (parentBlock.canIndent() && !alreadyHandled.has(parentKey)) {\n alreadyHandled.add(parentKey);\n indentOrOutdent(parentBlock);\n }\n }\n\n return alreadyHandled.size > 0;\n}\n\nfunction $isTargetWithinDecorator(target) {\n const node = lexical.$getNearestNodeFromDOMNode(target);\n return lexical.$isDecoratorNode(node);\n}\n\nfunction $isSelectionAtEndOfRoot(selection) {\n const focus = selection.focus;\n return focus.key === 'root' && focus.offset === lexical.$getRoot().getChildrenSize();\n}\n\nfunction registerRichText(editor) {\n const removeListener = utils.mergeRegister(editor.registerCommand(lexical.CLICK_COMMAND, payload => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isNodeSelection(selection)) {\n selection.clear();\n return true;\n }\n\n return false;\n }, 0), editor.registerCommand(lexical.DELETE_CHARACTER_COMMAND, isBackward => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.deleteCharacter(isBackward);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DELETE_WORD_COMMAND, isBackward => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.deleteWord(isBackward);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DELETE_LINE_COMMAND, isBackward => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.deleteLine(isBackward);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.CONTROLLED_TEXT_INSERTION_COMMAND, eventOrText => {\n const selection = lexical.$getSelection();\n\n if (typeof eventOrText === 'string') {\n if (lexical.$isRangeSelection(selection)) {\n selection.insertText(eventOrText);\n } else if (lexical.DEPRECATED_$isGridSelection(selection)) ;\n } else {\n if (!lexical.$isRangeSelection(selection) && !lexical.DEPRECATED_$isGridSelection(selection)) {\n return false;\n }\n\n const dataTransfer = eventOrText.dataTransfer;\n\n if (dataTransfer != null) {\n clipboard.$insertDataTransferForRichText(dataTransfer, selection, editor);\n } else if (lexical.$isRangeSelection(selection)) {\n const data = eventOrText.data;\n\n if (data) {\n selection.insertText(data);\n }\n\n return true;\n }\n }\n\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.REMOVE_TEXT_COMMAND, () => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.removeText();\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.FORMAT_TEXT_COMMAND, format => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.formatText(format);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.FORMAT_ELEMENT_COMMAND, format => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection) && !lexical.$isNodeSelection(selection)) {\n return false;\n }\n\n const nodes = selection.getNodes();\n\n for (const node of nodes) {\n const element = utils.$findMatchingParent(node, parentNode => lexical.$isElementNode(parentNode) && !parentNode.isInline());\n\n if (element !== null) {\n element.setFormat(format);\n }\n }\n\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.INSERT_LINE_BREAK_COMMAND, selectStart => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.insertLineBreak(selectStart);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.INSERT_PARAGRAPH_COMMAND, () => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.insertParagraph();\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.INSERT_TAB_COMMAND, () => {\n lexical.$insertNodes([lexical.$createTabNode()]);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.INDENT_CONTENT_COMMAND, () => {\n return handleIndentAndOutdent(block => {\n const indent = block.getIndent();\n block.setIndent(indent + 1);\n });\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.OUTDENT_CONTENT_COMMAND, () => {\n return handleIndentAndOutdent(block => {\n const indent = block.getIndent();\n\n if (indent > 0) {\n block.setIndent(indent - 1);\n }\n });\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ARROW_UP_COMMAND, event => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isNodeSelection(selection) && !$isTargetWithinDecorator(event.target)) {\n // If selection is on a node, let's try and move selection\n // back to being a range selection.\n const nodes = selection.getNodes();\n\n if (nodes.length > 0) {\n nodes[0].selectPrevious();\n return true;\n }\n } else if (lexical.$isRangeSelection(selection)) {\n const possibleNode = lexical.$getAdjacentNode(selection.focus, true);\n\n if (!event.shiftKey && lexical.$isDecoratorNode(possibleNode) && !possibleNode.isIsolated() && !possibleNode.isInline()) {\n possibleNode.selectPrevious();\n event.preventDefault();\n return true;\n }\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ARROW_DOWN_COMMAND, event => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isNodeSelection(selection)) {\n // If selection is on a node, let's try and move selection\n // back to being a range selection.\n const nodes = selection.getNodes();\n\n if (nodes.length > 0) {\n nodes[0].selectNext(0, 0);\n return true;\n }\n } else if (lexical.$isRangeSelection(selection)) {\n if ($isSelectionAtEndOfRoot(selection)) {\n event.preventDefault();\n return true;\n }\n\n const possibleNode = lexical.$getAdjacentNode(selection.focus, false);\n\n if (!event.shiftKey && lexical.$isDecoratorNode(possibleNode) && !possibleNode.isIsolated() && !possibleNode.isInline()) {\n possibleNode.selectNext();\n event.preventDefault();\n return true;\n }\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ARROW_LEFT_COMMAND, event => {\n const selection$1 = lexical.$getSelection();\n\n if (lexical.$isNodeSelection(selection$1)) {\n // If selection is on a node, let's try and move selection\n // back to being a range selection.\n const nodes = selection$1.getNodes();\n\n if (nodes.length > 0) {\n event.preventDefault();\n nodes[0].selectPrevious();\n return true;\n }\n }\n\n if (!lexical.$isRangeSelection(selection$1)) {\n return false;\n }\n\n if (selection.$shouldOverrideDefaultCharacterSelection(selection$1, true)) {\n const isHoldingShift = event.shiftKey;\n event.preventDefault();\n selection.$moveCharacter(selection$1, isHoldingShift, true);\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ARROW_RIGHT_COMMAND, event => {\n const selection$1 = lexical.$getSelection();\n\n if (lexical.$isNodeSelection(selection$1) && !$isTargetWithinDecorator(event.target)) {\n // If selection is on a node, let's try and move selection\n // back to being a range selection.\n const nodes = selection$1.getNodes();\n\n if (nodes.length > 0) {\n event.preventDefault();\n nodes[0].selectNext(0, 0);\n return true;\n }\n }\n\n if (!lexical.$isRangeSelection(selection$1)) {\n return false;\n }\n\n const isHoldingShift = event.shiftKey;\n\n if (selection.$shouldOverrideDefaultCharacterSelection(selection$1, false)) {\n event.preventDefault();\n selection.$moveCharacter(selection$1, isHoldingShift, false);\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_BACKSPACE_COMMAND, event => {\n if ($isTargetWithinDecorator(event.target)) {\n return false;\n }\n\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n event.preventDefault();\n const {\n anchor\n } = selection;\n const anchorNode = anchor.getNode();\n\n if (selection.isCollapsed() && anchor.offset === 0 && !lexical.$isRootNode(anchorNode)) {\n const element = utils.$getNearestBlockElementAncestorOrThrow(anchorNode);\n\n if (element.getIndent() > 0) {\n return editor.dispatchCommand(lexical.OUTDENT_CONTENT_COMMAND, undefined);\n }\n }\n\n return editor.dispatchCommand(lexical.DELETE_CHARACTER_COMMAND, true);\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_DELETE_COMMAND, event => {\n if ($isTargetWithinDecorator(event.target)) {\n return false;\n }\n\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n event.preventDefault();\n return editor.dispatchCommand(lexical.DELETE_CHARACTER_COMMAND, false);\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ENTER_COMMAND, event => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n if (event !== null) {\n // If we have beforeinput, then we can avoid blocking\n // the default behavior. This ensures that the iOS can\n // intercept that we're actually inserting a paragraph,\n // and autocomplete, autocapitalize etc work as intended.\n // This can also cause a strange performance issue in\n // Safari, where there is a noticeable pause due to\n // preventing the key down of enter.\n if ((IS_IOS || IS_SAFARI || IS_APPLE_WEBKIT) && CAN_USE_BEFORE_INPUT) {\n return false;\n }\n\n event.preventDefault();\n\n if (event.shiftKey) {\n return editor.dispatchCommand(lexical.INSERT_LINE_BREAK_COMMAND, false);\n }\n }\n\n return editor.dispatchCommand(lexical.INSERT_PARAGRAPH_COMMAND, undefined);\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ESCAPE_COMMAND, () => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n editor.blur();\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DROP_COMMAND, event => {\n const [, files] = eventFiles(event);\n\n if (files.length > 0) {\n const x = event.clientX;\n const y = event.clientY;\n const eventRange = caretFromPoint(x, y);\n\n if (eventRange !== null) {\n const {\n offset: domOffset,\n node: domNode\n } = eventRange;\n const node = lexical.$getNearestNodeFromDOMNode(domNode);\n\n if (node !== null) {\n const selection = lexical.$createRangeSelection();\n\n if (lexical.$isTextNode(node)) {\n selection.anchor.set(node.getKey(), domOffset, 'text');\n selection.focus.set(node.getKey(), domOffset, 'text');\n } else {\n const parentKey = node.getParentOrThrow().getKey();\n const offset = node.getIndexWithinParent() + 1;\n selection.anchor.set(parentKey, offset, 'element');\n selection.focus.set(parentKey, offset, 'element');\n }\n\n const normalizedSelection = lexical.$normalizeSelection__EXPERIMENTAL(selection);\n lexical.$setSelection(normalizedSelection);\n }\n\n editor.dispatchCommand(DRAG_DROP_PASTE, files);\n }\n\n event.preventDefault();\n return true;\n }\n\n const selection = lexical.$getSelection();\n\n if (lexical.$isRangeSelection(selection)) {\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DRAGSTART_COMMAND, event => {\n const [isFileTransfer] = eventFiles(event);\n const selection = lexical.$getSelection();\n\n if (isFileTransfer && !lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DRAGOVER_COMMAND, event => {\n const [isFileTransfer] = eventFiles(event);\n const selection = lexical.$getSelection();\n\n if (isFileTransfer && !lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n const x = event.clientX;\n const y = event.clientY;\n const eventRange = caretFromPoint(x, y);\n\n if (eventRange !== null) {\n const node = lexical.$getNearestNodeFromDOMNode(eventRange.node);\n\n if (lexical.$isDecoratorNode(node)) {\n // Show browser caret as the user is dragging the media across the screen. Won't work\n // for DecoratorNode nor it's relevant.\n event.preventDefault();\n }\n }\n\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.SELECT_ALL_COMMAND, () => {\n lexical.$selectAll();\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.COPY_COMMAND, event => {\n clipboard.copyToClipboard(editor, utils.objectKlassEquals(event, ClipboardEvent) ? event : null);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.CUT_COMMAND, event => {\n onCutForRichText(event, editor);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.PASTE_COMMAND, event => {\n const [, files, hasTextContent] = eventFiles(event);\n\n if (files.length > 0 && !hasTextContent) {\n editor.dispatchCommand(DRAG_DROP_PASTE, files);\n return true;\n } // if inputs then paste within the input ignore creating a new node on paste event\n\n\n if (lexical.isSelectionCapturedInDecoratorInput(event.target)) {\n return false;\n }\n\n const selection = lexical.$getSelection();\n\n if (lexical.$isRangeSelection(selection) || lexical.DEPRECATED_$isGridSelection(selection)) {\n onPasteForRichText(event, editor);\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR));\n return removeListener;\n}\n\nexports.$createHeadingNode = $createHeadingNode;\nexports.$createQuoteNode = $createQuoteNode;\nexports.$isHeadingNode = $isHeadingNode;\nexports.$isQuoteNode = $isQuoteNode;\nexports.DRAG_DROP_PASTE = DRAG_DROP_PASTE;\nexports.HeadingNode = HeadingNode;\nexports.QuoteNode = QuoteNode;\nexports.eventFiles = eventFiles;\nexports.registerRichText = registerRichText;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalRichText = process.env.NODE_ENV === 'development' ? require('./LexicalRichText.dev.js') : require('./LexicalRichText.prod.js')\nmodule.exports = LexicalRichText;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar lexical = require('lexical');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CSS_TO_STYLES = new Map();\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction getDOMTextNode(element) {\n let node = element;\n\n while (node != null) {\n if (node.nodeType === Node.TEXT_NODE) {\n return node;\n }\n\n node = node.firstChild;\n }\n\n return null;\n}\n\nfunction getDOMIndexWithinParent(node) {\n const parent = node.parentNode;\n\n if (parent == null) {\n throw new Error('Should never happen');\n }\n\n return [parent, Array.from(parent.childNodes).indexOf(node)];\n}\n/**\n * Creates a selection range for the DOM.\n * @param editor - The lexical editor.\n * @param anchorNode - The anchor node of a selection.\n * @param _anchorOffset - The amount of space offset from the anchor to the focus.\n * @param focusNode - The current focus.\n * @param _focusOffset - The amount of space offset from the focus to the anchor.\n * @returns The range of selection for the DOM that was created.\n */\n\n\nfunction createDOMRange(editor, anchorNode, _anchorOffset, focusNode, _focusOffset) {\n const anchorKey = anchorNode.getKey();\n const focusKey = focusNode.getKey();\n const range = document.createRange();\n let anchorDOM = editor.getElementByKey(anchorKey);\n let focusDOM = editor.getElementByKey(focusKey);\n let anchorOffset = _anchorOffset;\n let focusOffset = _focusOffset;\n\n if (lexical.$isTextNode(anchorNode)) {\n anchorDOM = getDOMTextNode(anchorDOM);\n }\n\n if (lexical.$isTextNode(focusNode)) {\n focusDOM = getDOMTextNode(focusDOM);\n }\n\n if (anchorNode === undefined || focusNode === undefined || anchorDOM === null || focusDOM === null) {\n return null;\n }\n\n if (anchorDOM.nodeName === 'BR') {\n [anchorDOM, anchorOffset] = getDOMIndexWithinParent(anchorDOM);\n }\n\n if (focusDOM.nodeName === 'BR') {\n [focusDOM, focusOffset] = getDOMIndexWithinParent(focusDOM);\n }\n\n const firstChild = anchorDOM.firstChild;\n\n if (anchorDOM === focusDOM && firstChild != null && firstChild.nodeName === 'BR' && anchorOffset === 0 && focusOffset === 0) {\n focusOffset = 1;\n }\n\n try {\n range.setStart(anchorDOM, anchorOffset);\n range.setEnd(focusDOM, focusOffset);\n } catch (e) {\n return null;\n }\n\n if (range.collapsed && (anchorOffset !== focusOffset || anchorKey !== focusKey)) {\n // Range is backwards, we need to reverse it\n range.setStart(focusDOM, focusOffset);\n range.setEnd(anchorDOM, anchorOffset);\n }\n\n return range;\n}\n/**\n * Creates DOMRects, generally used to help the editor find a specific location on the screen.\n * @param editor - The lexical editor\n * @param range - A fragment of a document that can contain nodes and parts of text nodes.\n * @returns The selectionRects as an array.\n */\n\nfunction createRectsFromDOMRange(editor, range) {\n const rootElement = editor.getRootElement();\n\n if (rootElement === null) {\n return [];\n }\n\n const rootRect = rootElement.getBoundingClientRect();\n const computedStyle = getComputedStyle(rootElement);\n const rootPadding = parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight);\n const selectionRects = Array.from(range.getClientRects());\n let selectionRectsLength = selectionRects.length; //sort rects from top left to bottom right.\n\n selectionRects.sort((a, b) => {\n const top = a.top - b.top; // Some rects match position closely, but not perfectly,\n // so we give a 3px tolerance.\n\n if (Math.abs(top) <= 3) {\n return a.left - b.left;\n }\n\n return top;\n });\n let prevRect;\n\n for (let i = 0; i < selectionRectsLength; i++) {\n const selectionRect = selectionRects[i]; // Exclude rects that overlap preceding Rects in the sorted list.\n\n const isOverlappingRect = prevRect && prevRect.top <= selectionRect.top && prevRect.top + prevRect.height > selectionRect.top && prevRect.left + prevRect.width > selectionRect.left; // Exclude selections that span the entire element\n\n const selectionSpansElement = selectionRect.width + rootPadding === rootRect.width;\n\n if (isOverlappingRect || selectionSpansElement) {\n selectionRects.splice(i--, 1);\n selectionRectsLength--;\n continue;\n }\n\n prevRect = selectionRect;\n }\n\n return selectionRects;\n}\n/**\n * Creates an object containing all the styles and their values provided in the CSS string.\n * @param css - The CSS string of styles and their values.\n * @returns The styleObject containing all the styles and their values.\n */\n\nfunction getStyleObjectFromRawCSS(css) {\n const styleObject = {};\n const styles = css.split(';');\n\n for (const style of styles) {\n if (style !== '') {\n const [key, value] = style.split(/:([^]+)/); // split on first colon\n\n styleObject[key.trim()] = value.trim();\n }\n }\n\n return styleObject;\n}\n/**\n * Given a CSS string, returns an object from the style cache.\n * @param css - The CSS property as a string.\n * @returns The value of the given CSS property.\n */\n\nfunction getStyleObjectFromCSS(css) {\n let value = CSS_TO_STYLES.get(css);\n\n if (value === undefined) {\n value = getStyleObjectFromRawCSS(css);\n CSS_TO_STYLES.set(css, value);\n }\n\n {\n // Freeze the value in DEV to prevent accidental mutations\n Object.freeze(value);\n }\n\n return value;\n}\n/**\n * Gets the CSS styles from the style object.\n * @param styles - The style object containing the styles to get.\n * @returns A string containing the CSS styles and their values.\n */\n\nfunction getCSSFromStyleObject(styles) {\n let css = '';\n\n for (const style in styles) {\n if (style) {\n css += `${style}: ${styles[style]};`;\n }\n }\n\n return css;\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction $updateElementNodeProperties(target, source) {\n target.__first = source.__first;\n target.__last = source.__last;\n target.__size = source.__size;\n target.__format = source.__format;\n target.__indent = source.__indent;\n target.__dir = source.__dir;\n return target;\n}\n\nfunction $updateTextNodeProperties(target, source) {\n target.__format = source.__format;\n target.__style = source.__style;\n target.__mode = source.__mode;\n target.__detail = source.__detail;\n return target;\n}\n/**\n * Returns a copy of a node, but generates a new key for the copy.\n * @param node - The node to be cloned.\n * @returns The clone of the node.\n */\n\n\nfunction $cloneWithProperties(node) {\n const constructor = node.constructor; // @ts-expect-error\n\n const clone = constructor.clone(node);\n clone.__parent = node.__parent;\n clone.__next = node.__next;\n clone.__prev = node.__prev;\n\n if (lexical.$isElementNode(node) && lexical.$isElementNode(clone)) {\n return $updateElementNodeProperties(clone, node);\n }\n\n if (lexical.$isTextNode(node) && lexical.$isTextNode(clone)) {\n return $updateTextNodeProperties(clone, node);\n }\n\n return clone;\n}\n/**\n * Generally used to append text content to HTML and JSON. Grabs the text content and \"slices\"\n * it to be generated into the new TextNode.\n * @param selection - The selection containing the node whose TextNode is to be edited.\n * @param textNode - The TextNode to be edited.\n * @returns The updated TextNode.\n */\n\nfunction $sliceSelectedTextNodeContent(selection, textNode) {\n if (textNode.isSelected() && !textNode.isSegmented() && !textNode.isToken() && (lexical.$isRangeSelection(selection) || lexical.DEPRECATED_$isGridSelection(selection))) {\n const anchorNode = selection.anchor.getNode();\n const focusNode = selection.focus.getNode();\n const isAnchor = textNode.is(anchorNode);\n const isFocus = textNode.is(focusNode);\n\n if (isAnchor || isFocus) {\n const isBackward = selection.isBackward();\n const [anchorOffset, focusOffset] = selection.getCharacterOffsets();\n const isSame = anchorNode.is(focusNode);\n const isFirst = textNode.is(isBackward ? focusNode : anchorNode);\n const isLast = textNode.is(isBackward ? anchorNode : focusNode);\n let startOffset = 0;\n let endOffset = undefined;\n\n if (isSame) {\n startOffset = anchorOffset > focusOffset ? focusOffset : anchorOffset;\n endOffset = anchorOffset > focusOffset ? anchorOffset : focusOffset;\n } else if (isFirst) {\n const offset = isBackward ? focusOffset : anchorOffset;\n startOffset = offset;\n endOffset = undefined;\n } else if (isLast) {\n const offset = isBackward ? anchorOffset : focusOffset;\n startOffset = 0;\n endOffset = offset;\n }\n\n textNode.__text = textNode.__text.slice(startOffset, endOffset);\n return textNode;\n }\n }\n\n return textNode;\n}\n/**\n * Determines if the current selection is at the end of the node.\n * @param point - The point of the selection to test.\n * @returns true if the provided point offset is in the last possible position, false otherwise.\n */\n\nfunction $isAtNodeEnd(point) {\n if (point.type === 'text') {\n return point.offset === point.getNode().getTextContentSize();\n }\n\n return point.offset === point.getNode().getChildrenSize();\n}\n/**\n * Trims text from a node in order to shorten it, eg. to enforce a text's max length. If it deletes text\n * that is an ancestor of the anchor then it will leave 2 indents, otherwise, if no text content exists, it deletes\n * the TextNode. It will move the focus to either the end of any left over text or beginning of a new TextNode.\n * @param editor - The lexical editor.\n * @param anchor - The anchor of the current selection, where the selection should be pointing.\n * @param delCount - The amount of characters to delete. Useful as a dynamic variable eg. textContentSize - maxLength;\n */\n\nfunction trimTextContentFromAnchor(editor, anchor, delCount) {\n // Work from the current selection anchor point\n let currentNode = anchor.getNode();\n let remaining = delCount;\n\n if (lexical.$isElementNode(currentNode)) {\n const descendantNode = currentNode.getDescendantByIndex(anchor.offset);\n\n if (descendantNode !== null) {\n currentNode = descendantNode;\n }\n }\n\n while (remaining > 0 && currentNode !== null) {\n let nextNode = currentNode.getPreviousSibling();\n let additionalElementWhitespace = 0;\n\n if (nextNode === null) {\n let parent = currentNode.getParentOrThrow();\n let parentSibling = parent.getPreviousSibling();\n\n while (parentSibling === null) {\n parent = parent.getParent();\n\n if (parent === null) {\n nextNode = null;\n break;\n }\n\n parentSibling = parent.getPreviousSibling();\n }\n\n if (parent !== null) {\n additionalElementWhitespace = parent.isInline() ? 0 : 2;\n\n if (lexical.$isElementNode(parentSibling)) {\n nextNode = parentSibling.getLastDescendant();\n } else {\n nextNode = parentSibling;\n }\n }\n }\n\n let text = currentNode.getTextContent(); // If the text is empty, we need to consider adding in two line breaks to match\n // the content if we were to get it from its parent.\n\n if (text === '' && lexical.$isElementNode(currentNode) && !currentNode.isInline()) {\n // TODO: should this be handled in core?\n text = '\\n\\n';\n }\n\n const currentNodeSize = text.length;\n\n if (!lexical.$isTextNode(currentNode) || remaining >= currentNodeSize) {\n const parent = currentNode.getParent();\n currentNode.remove();\n\n if (parent != null && parent.getChildrenSize() === 0 && !lexical.$isRootNode(parent)) {\n parent.remove();\n }\n\n remaining -= currentNodeSize + additionalElementWhitespace;\n currentNode = nextNode;\n } else {\n const key = currentNode.getKey(); // See if we can just revert it to what was in the last editor state\n\n const prevTextContent = editor.getEditorState().read(() => {\n const prevNode = lexical.$getNodeByKey(key);\n\n if (lexical.$isTextNode(prevNode) && prevNode.isSimpleText()) {\n return prevNode.getTextContent();\n }\n\n return null;\n });\n const offset = currentNodeSize - remaining;\n const slicedText = text.slice(0, offset);\n\n if (prevTextContent !== null && prevTextContent !== text) {\n const prevSelection = lexical.$getPreviousSelection();\n let target = currentNode;\n\n if (!currentNode.isSimpleText()) {\n const textNode = lexical.$createTextNode(prevTextContent);\n currentNode.replace(textNode);\n target = textNode;\n } else {\n currentNode.setTextContent(prevTextContent);\n }\n\n if (lexical.$isRangeSelection(prevSelection) && prevSelection.isCollapsed()) {\n const prevOffset = prevSelection.anchor.offset;\n target.select(prevOffset, prevOffset);\n }\n } else if (currentNode.isSimpleText()) {\n // Split text\n const isSelected = anchor.key === key;\n let anchorOffset = anchor.offset; // Move offset to end if it's less than the remaining number, otherwise\n // we'll have a negative splitStart.\n\n if (anchorOffset < remaining) {\n anchorOffset = currentNodeSize;\n }\n\n const splitStart = isSelected ? anchorOffset - remaining : 0;\n const splitEnd = isSelected ? anchorOffset : offset;\n\n if (isSelected && splitStart === 0) {\n const [excessNode] = currentNode.splitText(splitStart, splitEnd);\n excessNode.remove();\n } else {\n const [, excessNode] = currentNode.splitText(splitStart, splitEnd);\n excessNode.remove();\n }\n } else {\n const textNode = lexical.$createTextNode(slicedText);\n currentNode.replace(textNode);\n }\n\n remaining = 0;\n }\n }\n}\n/**\n * Gets the TextNode's style object and adds the styles to the CSS.\n * @param node - The TextNode to add styles to.\n */\n\nfunction $addNodeStyle(node) {\n const CSSText = node.getStyle();\n const styles = getStyleObjectFromRawCSS(CSSText);\n CSS_TO_STYLES.set(CSSText, styles);\n}\n\nfunction $patchStyle(target, patch) {\n const prevStyles = getStyleObjectFromCSS('getStyle' in target ? target.getStyle() : target.style);\n const newStyles = Object.entries(patch).reduce((styles, [key, value]) => {\n if (value === null) {\n delete styles[key];\n } else {\n styles[key] = value;\n }\n\n return styles;\n }, { ...prevStyles\n } || {});\n const newCSSText = getCSSFromStyleObject(newStyles);\n target.setStyle(newCSSText);\n CSS_TO_STYLES.set(newCSSText, newStyles);\n}\n/**\n * Applies the provided styles to the TextNodes in the provided Selection.\n * Will update partially selected TextNodes by splitting the TextNode and applying\n * the styles to the appropriate one.\n * @param selection - The selected node(s) to update.\n * @param patch - The patch to apply, which can include multiple styles. { CSSProperty: value }\n */\n\n\nfunction $patchStyleText(selection, patch) {\n const selectedNodes = selection.getNodes();\n const selectedNodesLength = selectedNodes.length;\n\n if (lexical.DEPRECATED_$isGridSelection(selection)) {\n const cellSelection = lexical.$createRangeSelection();\n const cellSelectionAnchor = cellSelection.anchor;\n const cellSelectionFocus = cellSelection.focus;\n\n for (let i = 0; i < selectedNodesLength; i++) {\n const node = selectedNodes[i];\n\n if (lexical.DEPRECATED_$isGridCellNode(node)) {\n cellSelectionAnchor.set(node.getKey(), 0, 'element');\n cellSelectionFocus.set(node.getKey(), node.getChildrenSize(), 'element');\n $patchStyleText(lexical.$normalizeSelection__EXPERIMENTAL(cellSelection), patch);\n }\n }\n\n lexical.$setSelection(selection);\n return;\n }\n\n const lastIndex = selectedNodesLength - 1;\n let firstNode = selectedNodes[0];\n let lastNode = selectedNodes[lastIndex];\n\n if (selection.isCollapsed()) {\n $patchStyle(selection, patch);\n return;\n }\n\n const anchor = selection.anchor;\n const focus = selection.focus;\n const firstNodeText = firstNode.getTextContent();\n const firstNodeTextLength = firstNodeText.length;\n const focusOffset = focus.offset;\n let anchorOffset = anchor.offset;\n const isBefore = anchor.isBefore(focus);\n let startOffset = isBefore ? anchorOffset : focusOffset;\n let endOffset = isBefore ? focusOffset : anchorOffset;\n const startType = isBefore ? anchor.type : focus.type;\n const endType = isBefore ? focus.type : anchor.type;\n const endKey = isBefore ? focus.key : anchor.key; // This is the case where the user only selected the very end of the\n // first node so we don't want to include it in the formatting change.\n\n if (lexical.$isTextNode(firstNode) && startOffset === firstNodeTextLength) {\n const nextSibling = firstNode.getNextSibling();\n\n if (lexical.$isTextNode(nextSibling)) {\n // we basically make the second node the firstNode, changing offsets accordingly\n anchorOffset = 0;\n startOffset = 0;\n firstNode = nextSibling;\n }\n } // This is the case where we only selected a single node\n\n\n if (selectedNodes.length === 1) {\n if (lexical.$isTextNode(firstNode)) {\n startOffset = startType === 'element' ? 0 : anchorOffset > focusOffset ? focusOffset : anchorOffset;\n endOffset = endType === 'element' ? firstNodeTextLength : anchorOffset > focusOffset ? anchorOffset : focusOffset; // No actual text is selected, so do nothing.\n\n if (startOffset === endOffset) {\n return;\n } // The entire node is selected, so just format it\n\n\n if (startOffset === 0 && endOffset === firstNodeTextLength) {\n $patchStyle(firstNode, patch);\n firstNode.select(startOffset, endOffset);\n } else {\n // The node is partially selected, so split it into two nodes\n // and style the selected one.\n const splitNodes = firstNode.splitText(startOffset, endOffset);\n const replacement = startOffset === 0 ? splitNodes[0] : splitNodes[1];\n $patchStyle(replacement, patch);\n replacement.select(0, endOffset - startOffset);\n }\n } // multiple nodes selected.\n\n } else {\n if (lexical.$isTextNode(firstNode) && startOffset < firstNode.getTextContentSize()) {\n if (startOffset !== 0) {\n // the entire first node isn't selected, so split it\n firstNode = firstNode.splitText(startOffset)[1];\n startOffset = 0;\n }\n\n $patchStyle(firstNode, patch);\n }\n\n if (lexical.$isTextNode(lastNode)) {\n const lastNodeText = lastNode.getTextContent();\n const lastNodeTextLength = lastNodeText.length; // The last node might not actually be the end node\n //\n // If not, assume the last node is fully-selected unless the end offset is\n // zero.\n\n if (lastNode.__key !== endKey && endOffset !== 0) {\n endOffset = lastNodeTextLength;\n } // if the entire last node isn't selected, split it\n\n\n if (endOffset !== lastNodeTextLength) {\n [lastNode] = lastNode.splitText(endOffset);\n }\n\n if (endOffset !== 0) {\n $patchStyle(lastNode, patch);\n }\n } // style all the text nodes in between\n\n\n for (let i = 1; i < lastIndex; i++) {\n const selectedNode = selectedNodes[i];\n const selectedNodeKey = selectedNode.getKey();\n\n if (lexical.$isTextNode(selectedNode) && selectedNodeKey !== firstNode.getKey() && selectedNodeKey !== lastNode.getKey() && !selectedNode.isToken()) {\n $patchStyle(selectedNode, patch);\n }\n }\n }\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n/**\n * Converts all nodes in the selection that are of one block type to another.\n * @param selection - The selected blocks to be converted.\n * @param createElement - The function that creates the node. eg. $createParagraphNode.\n */\n\nfunction $setBlocksType(selection, createElement) {\n if (selection.anchor.key === 'root') {\n const element = createElement();\n const root = lexical.$getRoot();\n const firstChild = root.getFirstChild();\n\n if (firstChild) {\n firstChild.replace(element, true);\n } else {\n root.append(element);\n }\n\n return;\n }\n\n const nodes = selection.getNodes();\n let maybeBlock = selection.anchor.getNode().getParentOrThrow();\n\n if (nodes.indexOf(maybeBlock) === -1) {\n nodes.push(maybeBlock);\n }\n\n if (maybeBlock.isInline()) {\n maybeBlock = maybeBlock.getParentOrThrow();\n\n if (nodes.indexOf(maybeBlock) === -1) {\n nodes.push(maybeBlock);\n }\n }\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (!isBlock(node)) {\n continue;\n }\n\n const targetElement = createElement();\n targetElement.setFormat(node.getFormatType());\n targetElement.setIndent(node.getIndent());\n node.replace(targetElement, true);\n }\n}\n\nfunction isBlock(node) {\n if (!lexical.$isElementNode(node) || lexical.$isRootOrShadowRoot(node)) {\n return false;\n }\n\n const firstChild = node.getFirstChild();\n const isLeafElement = firstChild === null || lexical.$isLineBreakNode(firstChild) || lexical.$isTextNode(firstChild) || firstChild.isInline();\n return !node.isInline() && node.canBeEmpty() !== false && isLeafElement;\n}\n\nfunction isPointAttached(point) {\n return point.getNode().isAttached();\n}\n\nfunction $removeParentEmptyElements(startingNode) {\n let node = startingNode;\n\n while (node !== null && !lexical.$isRootOrShadowRoot(node)) {\n const latest = node.getLatest();\n const parentNode = node.getParent();\n\n if (latest.getChildrenSize() === 0) {\n node.remove(true);\n }\n\n node = parentNode;\n }\n}\n/**\n * @deprecated\n * Wraps all nodes in the selection into another node of the type returned by createElement.\n * @param selection - The selection of nodes to be wrapped.\n * @param createElement - A function that creates the wrapping ElementNode. eg. $createParagraphNode.\n * @param wrappingElement - An element to append the wrapped selection and its children to.\n */\n\n\nfunction $wrapNodes(selection, createElement, wrappingElement = null) {\n const nodes = selection.getNodes();\n const nodesLength = nodes.length;\n const anchor = selection.anchor;\n\n if (nodesLength === 0 || nodesLength === 1 && anchor.type === 'element' && anchor.getNode().getChildrenSize() === 0) {\n const target = anchor.type === 'text' ? anchor.getNode().getParentOrThrow() : anchor.getNode();\n const children = target.getChildren();\n let element = createElement();\n element.setFormat(target.getFormatType());\n element.setIndent(target.getIndent());\n children.forEach(child => element.append(child));\n\n if (wrappingElement) {\n element = wrappingElement.append(element);\n }\n\n target.replace(element);\n return;\n }\n\n let topLevelNode = null;\n let descendants = [];\n\n for (let i = 0; i < nodesLength; i++) {\n const node = nodes[i]; // Determine whether wrapping has to be broken down into multiple chunks. This can happen if the\n // user selected multiple Root-like nodes that have to be treated separately as if they are\n // their own branch. I.e. you don't want to wrap a whole table, but rather the contents of each\n // of each of the cell nodes.\n\n if (lexical.$isRootOrShadowRoot(node)) {\n $wrapNodesImpl(selection, descendants, descendants.length, createElement, wrappingElement);\n descendants = [];\n topLevelNode = node;\n } else if (topLevelNode === null || topLevelNode !== null && lexical.$hasAncestor(node, topLevelNode)) {\n descendants.push(node);\n } else {\n $wrapNodesImpl(selection, descendants, descendants.length, createElement, wrappingElement);\n descendants = [node];\n }\n }\n\n $wrapNodesImpl(selection, descendants, descendants.length, createElement, wrappingElement);\n}\n/**\n * Wraps each node into a new ElementNode.\n * @param selection - The selection of nodes to wrap.\n * @param nodes - An array of nodes, generally the descendants of the selection.\n * @param nodesLength - The length of nodes.\n * @param createElement - A function that creates the wrapping ElementNode. eg. $createParagraphNode.\n * @param wrappingElement - An element to wrap all the nodes into.\n * @returns\n */\n\nfunction $wrapNodesImpl(selection, nodes, nodesLength, createElement, wrappingElement = null) {\n if (nodes.length === 0) {\n return;\n }\n\n const firstNode = nodes[0];\n const elementMapping = new Map();\n const elements = []; // The below logic is to find the right target for us to\n // either insertAfter/insertBefore/append the corresponding\n // elements to. This is made more complicated due to nested\n // structures.\n\n let target = lexical.$isElementNode(firstNode) ? firstNode : firstNode.getParentOrThrow();\n\n if (target.isInline()) {\n target = target.getParentOrThrow();\n }\n\n let targetIsPrevSibling = false;\n\n while (target !== null) {\n const prevSibling = target.getPreviousSibling();\n\n if (prevSibling !== null) {\n target = prevSibling;\n targetIsPrevSibling = true;\n break;\n }\n\n target = target.getParentOrThrow();\n\n if (lexical.$isRootOrShadowRoot(target)) {\n break;\n }\n }\n\n const emptyElements = new Set(); // Find any top level empty elements\n\n for (let i = 0; i < nodesLength; i++) {\n const node = nodes[i];\n\n if (lexical.$isElementNode(node) && node.getChildrenSize() === 0) {\n emptyElements.add(node.getKey());\n }\n }\n\n const movedNodes = new Set(); // Move out all leaf nodes into our elements array.\n // If we find a top level empty element, also move make\n // an element for that.\n\n for (let i = 0; i < nodesLength; i++) {\n const node = nodes[i];\n let parent = node.getParent();\n\n if (parent !== null && parent.isInline()) {\n parent = parent.getParent();\n }\n\n if (parent !== null && lexical.$isLeafNode(node) && !movedNodes.has(node.getKey())) {\n const parentKey = parent.getKey();\n\n if (elementMapping.get(parentKey) === undefined) {\n const targetElement = createElement();\n targetElement.setFormat(parent.getFormatType());\n targetElement.setIndent(parent.getIndent());\n elements.push(targetElement);\n elementMapping.set(parentKey, targetElement); // Move node and its siblings to the new\n // element.\n\n parent.getChildren().forEach(child => {\n targetElement.append(child);\n movedNodes.add(child.getKey());\n\n if (lexical.$isElementNode(child)) {\n // Skip nested leaf nodes if the parent has already been moved\n child.getChildrenKeys().forEach(key => movedNodes.add(key));\n }\n });\n $removeParentEmptyElements(parent);\n }\n } else if (emptyElements.has(node.getKey())) {\n const targetElement = createElement();\n targetElement.setFormat(node.getFormatType());\n targetElement.setIndent(node.getIndent());\n elements.push(targetElement);\n node.remove(true);\n }\n }\n\n if (wrappingElement !== null) {\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n wrappingElement.append(element);\n }\n }\n\n let lastElement = null; // If our target is Root-like, let's see if we can re-adjust\n // so that the target is the first child instead.\n\n if (lexical.$isRootOrShadowRoot(target)) {\n if (targetIsPrevSibling) {\n if (wrappingElement !== null) {\n target.insertAfter(wrappingElement);\n } else {\n for (let i = elements.length - 1; i >= 0; i--) {\n const element = elements[i];\n target.insertAfter(element);\n }\n }\n } else {\n const firstChild = target.getFirstChild();\n\n if (lexical.$isElementNode(firstChild)) {\n target = firstChild;\n }\n\n if (firstChild === null) {\n if (wrappingElement) {\n target.append(wrappingElement);\n } else {\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n target.append(element);\n lastElement = element;\n }\n }\n } else {\n if (wrappingElement !== null) {\n firstChild.insertBefore(wrappingElement);\n } else {\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n firstChild.insertBefore(element);\n lastElement = element;\n }\n }\n }\n }\n } else {\n if (wrappingElement) {\n target.insertAfter(wrappingElement);\n } else {\n for (let i = elements.length - 1; i >= 0; i--) {\n const element = elements[i];\n target.insertAfter(element);\n lastElement = element;\n }\n }\n }\n\n const prevSelection = lexical.$getPreviousSelection();\n\n if (lexical.$isRangeSelection(prevSelection) && isPointAttached(prevSelection.anchor) && isPointAttached(prevSelection.focus)) {\n lexical.$setSelection(prevSelection.clone());\n } else if (lastElement !== null) {\n lastElement.selectEnd();\n } else {\n selection.dirty = true;\n }\n}\n/**\n * Determines if the default character selection should be overridden. Used with DecoratorNodes\n * @param selection - The selection whose default character selection may need to be overridden.\n * @param isBackward - Is the selection backwards (the focus comes before the anchor)?\n * @returns true if it should be overridden, false if not.\n */\n\nfunction $shouldOverrideDefaultCharacterSelection(selection, isBackward) {\n const possibleNode = lexical.$getAdjacentNode(selection.focus, isBackward);\n return lexical.$isDecoratorNode(possibleNode) && !possibleNode.isIsolated() || lexical.$isElementNode(possibleNode) && !possibleNode.isInline() && !possibleNode.canBeEmpty();\n}\n/**\n * Moves the selection according to the arguments.\n * @param selection - The selected text or nodes.\n * @param isHoldingShift - Is the shift key being held down during the operation.\n * @param isBackward - Is the selection selected backwards (the focus comes before the anchor)?\n * @param granularity - The distance to adjust the current selection.\n */\n\nfunction $moveCaretSelection(selection, isHoldingShift, isBackward, granularity) {\n selection.modify(isHoldingShift ? 'extend' : 'move', isBackward, granularity);\n}\n/**\n * Tests a parent element for right to left direction.\n * @param selection - The selection whose parent is to be tested.\n * @returns true if the selections' parent element has a direction of 'rtl' (right to left), false otherwise.\n */\n\nfunction $isParentElementRTL(selection) {\n const anchorNode = selection.anchor.getNode();\n const parent = lexical.$isRootNode(anchorNode) ? anchorNode : anchorNode.getParentOrThrow();\n return parent.getDirection() === 'rtl';\n}\n/**\n * Moves selection by character according to arguments.\n * @param selection - The selection of the characters to move.\n * @param isHoldingShift - Is the shift key being held down during the operation.\n * @param isBackward - Is the selection backward (the focus comes before the anchor)?\n */\n\nfunction $moveCharacter(selection, isHoldingShift, isBackward) {\n const isRTL = $isParentElementRTL(selection);\n $moveCaretSelection(selection, isHoldingShift, isBackward ? !isRTL : isRTL, 'character');\n}\n/**\n * Expands the current Selection to cover all of the content in the editor.\n * @param selection - The current selection.\n */\n\nfunction $selectAll(selection) {\n const anchor = selection.anchor;\n const focus = selection.focus;\n const anchorNode = anchor.getNode();\n const topParent = anchorNode.getTopLevelElementOrThrow();\n const root = topParent.getParentOrThrow();\n let firstNode = root.getFirstDescendant();\n let lastNode = root.getLastDescendant();\n let firstType = 'element';\n let lastType = 'element';\n let lastOffset = 0;\n\n if (lexical.$isTextNode(firstNode)) {\n firstType = 'text';\n } else if (!lexical.$isElementNode(firstNode) && firstNode !== null) {\n firstNode = firstNode.getParentOrThrow();\n }\n\n if (lexical.$isTextNode(lastNode)) {\n lastType = 'text';\n lastOffset = lastNode.getTextContentSize();\n } else if (!lexical.$isElementNode(lastNode) && lastNode !== null) {\n lastNode = lastNode.getParentOrThrow();\n }\n\n if (firstNode && lastNode) {\n anchor.set(firstNode.getKey(), 0, firstType);\n focus.set(lastNode.getKey(), lastOffset, lastType);\n }\n}\n/**\n * Returns the current value of a CSS property for Nodes, if set. If not set, it returns the defaultValue.\n * @param node - The node whose style value to get.\n * @param styleProperty - The CSS style property.\n * @param defaultValue - The default value for the property.\n * @returns The value of the property for node.\n */\n\nfunction $getNodeStyleValueForProperty(node, styleProperty, defaultValue) {\n const css = node.getStyle();\n const styleObject = getStyleObjectFromCSS(css);\n\n if (styleObject !== null) {\n return styleObject[styleProperty] || defaultValue;\n }\n\n return defaultValue;\n}\n/**\n * Returns the current value of a CSS property for TextNodes in the Selection, if set. If not set, it returns the defaultValue.\n * If all TextNodes do not have the same value, it returns an empty string.\n * @param selection - The selection of TextNodes whose value to find.\n * @param styleProperty - The CSS style property.\n * @param defaultValue - The default value for the property, defaults to an empty string.\n * @returns The value of the property for the selected TextNodes.\n */\n\n\nfunction $getSelectionStyleValueForProperty(selection, styleProperty, defaultValue = '') {\n let styleValue = null;\n const nodes = selection.getNodes();\n const anchor = selection.anchor;\n const focus = selection.focus;\n const isBackward = selection.isBackward();\n const endOffset = isBackward ? focus.offset : anchor.offset;\n const endNode = isBackward ? focus.getNode() : anchor.getNode();\n\n if (selection.style !== '') {\n const css = selection.style;\n const styleObject = getStyleObjectFromCSS(css);\n\n if (styleObject !== null && styleProperty in styleObject) {\n return styleObject[styleProperty];\n }\n }\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i]; // if no actual characters in the end node are selected, we don't\n // include it in the selection for purposes of determining style\n // value\n\n if (i !== 0 && endOffset === 0 && node.is(endNode)) {\n continue;\n }\n\n if (lexical.$isTextNode(node)) {\n const nodeStyleValue = $getNodeStyleValueForProperty(node, styleProperty, defaultValue);\n\n if (styleValue === null) {\n styleValue = nodeStyleValue;\n } else if (styleValue !== nodeStyleValue) {\n // multiple text nodes are in the selection and they don't all\n // have the same style.\n styleValue = '';\n break;\n }\n }\n }\n\n return styleValue === null ? defaultValue : styleValue;\n}\n\nexports.$addNodeStyle = $addNodeStyle;\nexports.$cloneWithProperties = $cloneWithProperties;\nexports.$getSelectionStyleValueForProperty = $getSelectionStyleValueForProperty;\nexports.$isAtNodeEnd = $isAtNodeEnd;\nexports.$isParentElementRTL = $isParentElementRTL;\nexports.$moveCaretSelection = $moveCaretSelection;\nexports.$moveCharacter = $moveCharacter;\nexports.$patchStyleText = $patchStyleText;\nexports.$selectAll = $selectAll;\nexports.$setBlocksType = $setBlocksType;\nexports.$shouldOverrideDefaultCharacterSelection = $shouldOverrideDefaultCharacterSelection;\nexports.$sliceSelectedTextNodeContent = $sliceSelectedTextNodeContent;\nexports.$wrapNodes = $wrapNodes;\nexports.createDOMRange = createDOMRange;\nexports.createRectsFromDOMRange = createRectsFromDOMRange;\nexports.getStyleObjectFromCSS = getStyleObjectFromCSS;\nexports.trimTextContentFromAnchor = trimTextContentFromAnchor;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalSelection = process.env.NODE_ENV === 'development' ? require('./LexicalSelection.dev.js') : require('./LexicalSelection.prod.js')\nmodule.exports = LexicalSelection;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar lexical = require('lexical');\n\n/** @module @lexical/text */\n\n/**\n * Finds a TextNode with a size larger than targetCharacters and returns\n * the node along with the remaining length of the text.\n * @param root - The RootNode.\n * @param targetCharacters - The number of characters whose TextNode must be larger than.\n * @returns The TextNode and the intersections offset, or null if no TextNode is found.\n */\nfunction $findTextIntersectionFromCharacters(root, targetCharacters) {\n let node = root.getFirstChild();\n let currentCharacters = 0;\n\n mainLoop: while (node !== null) {\n if (lexical.$isElementNode(node)) {\n const child = node.getFirstChild();\n\n if (child !== null) {\n node = child;\n continue;\n }\n } else if (lexical.$isTextNode(node)) {\n const characters = node.getTextContentSize();\n\n if (currentCharacters + characters > targetCharacters) {\n return {\n node,\n offset: targetCharacters - currentCharacters\n };\n }\n\n currentCharacters += characters;\n }\n\n const sibling = node.getNextSibling();\n\n if (sibling !== null) {\n node = sibling;\n continue;\n }\n\n let parent = node.getParent();\n\n while (parent !== null) {\n const parentSibling = parent.getNextSibling();\n\n if (parentSibling !== null) {\n node = parentSibling;\n continue mainLoop;\n }\n\n parent = parent.getParent();\n }\n\n break;\n }\n\n return null;\n}\n/**\n * Determines if the root has any text content and can trim any whitespace if it does.\n * @param isEditorComposing - Is the editor in composition mode due to an active Input Method Editor?\n * @param trim - Should the root text have its whitespaced trimmed? Defaults to true.\n * @returns true if text content is empty, false if there is text or isEditorComposing is true.\n */\n\nfunction $isRootTextContentEmpty(isEditorComposing, trim = true) {\n if (isEditorComposing) {\n return false;\n }\n\n let text = $rootTextContent();\n\n if (trim) {\n text = text.trim();\n }\n\n return text === '';\n}\n/**\n * Returns a function that executes {@link $isRootTextContentEmpty}\n * @param isEditorComposing - Is the editor in composition mode due to an active Input Method Editor?\n * @param trim - Should the root text have its whitespaced trimmed? Defaults to true.\n * @returns A function that executes $isRootTextContentEmpty based on arguments.\n */\n\nfunction $isRootTextContentEmptyCurry(isEditorComposing, trim) {\n return () => $isRootTextContentEmpty(isEditorComposing, trim);\n}\n/**\n * Returns the root's text content.\n * @returns The root's text content.\n */\n\nfunction $rootTextContent() {\n const root = lexical.$getRoot();\n return root.getTextContent();\n}\n/**\n * Determines if the input should show the placeholder. If anything is in\n * in the root the placeholder should not be shown.\n * @param isComposing - Is the editor in composition mode due to an active Input Method Editor?\n * @returns true if the input should show the placeholder, false otherwise.\n */\n\nfunction $canShowPlaceholder(isComposing) {\n if (!$isRootTextContentEmpty(isComposing, false)) {\n return false;\n }\n\n const root = lexical.$getRoot();\n const children = root.getChildren();\n const childrenLength = children.length;\n\n if (childrenLength > 1) {\n return false;\n }\n\n for (let i = 0; i < childrenLength; i++) {\n const topBlock = children[i];\n\n if (lexical.$isDecoratorNode(topBlock)) {\n return false;\n }\n\n if (lexical.$isElementNode(topBlock)) {\n if (!lexical.$isParagraphNode(topBlock)) {\n return false;\n }\n\n if (topBlock.__indent !== 0) {\n return false;\n }\n\n const topBlockChildren = topBlock.getChildren();\n const topBlockChildrenLength = topBlockChildren.length;\n\n for (let s = 0; s < topBlockChildrenLength; s++) {\n const child = topBlockChildren[i];\n\n if (!lexical.$isTextNode(child)) {\n return false;\n }\n }\n }\n }\n\n return true;\n}\n/**\n * Returns a function that executes {@link $canShowPlaceholder}\n * @param isEditorComposing - Is the editor in composition mode due to an active Input Method Editor?\n * @returns A function that executes $canShowPlaceholder with arguments.\n */\n\nfunction $canShowPlaceholderCurry(isEditorComposing) {\n return () => $canShowPlaceholder(isEditorComposing);\n}\n\n/**\n * Returns a touple that can be rested (...) into mergeRegister to clean up\n * node transforms listeners that transforms text into another node, eg. a HashtagNode.\n * @example\n * ```ts\n * useEffect(() => {\n return mergeRegister(\n ...registerLexicalTextEntity(editor, getMatch, targetNode, createNode),\n );\n }, [createNode, editor, getMatch, targetNode]);\n * ```\n * Where targetNode is the type of node containing the text you want to transform (like a text input),\n * then getMatch uses a regex to find a matching text and creates the proper node to include the matching text.\n * @param editor - The lexical editor.\n * @param getMatch - Finds a matching string that satisfies a regex expression.\n * @param targetNode - The node type that contains text to match with. eg. HashtagNode\n * @param createNode - A function that creates a new node to contain the matched text. eg createHashtagNode\n * @returns An array containing the plain text and reverse node transform listeners.\n */\nfunction registerLexicalTextEntity(editor, getMatch, targetNode, createNode) {\n const isTargetNode = node => {\n return node instanceof targetNode;\n };\n\n const replaceWithSimpleText = node => {\n const textNode = lexical.$createTextNode(node.getTextContent());\n textNode.setFormat(node.getFormat());\n node.replace(textNode);\n };\n\n const getMode = node => {\n return node.getLatest().__mode;\n };\n\n const textNodeTransform = node => {\n if (!node.isSimpleText()) {\n return;\n }\n\n const prevSibling = node.getPreviousSibling();\n let text = node.getTextContent();\n let currentNode = node;\n let match;\n\n if (lexical.$isTextNode(prevSibling)) {\n const previousText = prevSibling.getTextContent();\n const combinedText = previousText + text;\n const prevMatch = getMatch(combinedText);\n\n if (isTargetNode(prevSibling)) {\n if (prevMatch === null || getMode(prevSibling) !== 0) {\n replaceWithSimpleText(prevSibling);\n return;\n } else {\n const diff = prevMatch.end - previousText.length;\n\n if (diff > 0) {\n const concatText = text.slice(0, diff);\n const newTextContent = previousText + concatText;\n prevSibling.select();\n prevSibling.setTextContent(newTextContent);\n\n if (diff === text.length) {\n node.remove();\n } else {\n const remainingText = text.slice(diff);\n node.setTextContent(remainingText);\n }\n\n return;\n }\n }\n } else if (prevMatch === null || prevMatch.start < previousText.length) {\n return;\n }\n } // eslint-disable-next-line no-constant-condition\n\n\n while (true) {\n match = getMatch(text);\n let nextText = match === null ? '' : text.slice(match.end);\n text = nextText;\n\n if (nextText === '') {\n const nextSibling = currentNode.getNextSibling();\n\n if (lexical.$isTextNode(nextSibling)) {\n nextText = currentNode.getTextContent() + nextSibling.getTextContent();\n const nextMatch = getMatch(nextText);\n\n if (nextMatch === null) {\n if (isTargetNode(nextSibling)) {\n replaceWithSimpleText(nextSibling);\n } else {\n nextSibling.markDirty();\n }\n\n return;\n } else if (nextMatch.start !== 0) {\n return;\n }\n }\n } else {\n const nextMatch = getMatch(nextText);\n\n if (nextMatch !== null && nextMatch.start === 0) {\n return;\n }\n }\n\n if (match === null) {\n return;\n }\n\n if (match.start === 0 && lexical.$isTextNode(prevSibling) && prevSibling.isTextEntity()) {\n continue;\n }\n\n let nodeToReplace;\n\n if (match.start === 0) {\n [nodeToReplace, currentNode] = currentNode.splitText(match.end);\n } else {\n [, nodeToReplace, currentNode] = currentNode.splitText(match.start, match.end);\n }\n\n const replacementNode = createNode(nodeToReplace);\n replacementNode.setFormat(nodeToReplace.getFormat());\n nodeToReplace.replace(replacementNode);\n\n if (currentNode == null) {\n return;\n }\n }\n };\n\n const reverseNodeTransform = node => {\n const text = node.getTextContent();\n const match = getMatch(text);\n\n if (match === null || match.start !== 0) {\n replaceWithSimpleText(node);\n return;\n }\n\n if (text.length > match.end) {\n // This will split out the rest of the text as simple text\n node.splitText(match.end);\n return;\n }\n\n const prevSibling = node.getPreviousSibling();\n\n if (lexical.$isTextNode(prevSibling) && prevSibling.isTextEntity()) {\n replaceWithSimpleText(prevSibling);\n replaceWithSimpleText(node);\n }\n\n const nextSibling = node.getNextSibling();\n\n if (lexical.$isTextNode(nextSibling) && nextSibling.isTextEntity()) {\n replaceWithSimpleText(nextSibling); // This may have already been converted in the previous block\n\n if (isTargetNode(node)) {\n replaceWithSimpleText(node);\n }\n }\n };\n\n const removePlainTextTransform = editor.registerNodeTransform(lexical.TextNode, textNodeTransform);\n const removeReverseNodeTransform = editor.registerNodeTransform(targetNode, reverseNodeTransform);\n return [removePlainTextTransform, removeReverseNodeTransform];\n}\n\nexports.$canShowPlaceholder = $canShowPlaceholder;\nexports.$canShowPlaceholderCurry = $canShowPlaceholderCurry;\nexports.$findTextIntersectionFromCharacters = $findTextIntersectionFromCharacters;\nexports.$isRootTextContentEmpty = $isRootTextContentEmpty;\nexports.$isRootTextContentEmptyCurry = $isRootTextContentEmptyCurry;\nexports.$rootTextContent = $rootTextContent;\nexports.registerLexicalTextEntity = registerLexicalTextEntity;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalText = process.env.NODE_ENV === 'development' ? require('./LexicalText.dev.js') : require('./LexicalText.prod.js')\nmodule.exports = LexicalText;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar selection = require('@lexical/selection');\nvar lexical = require('lexical');\n\n/** @module @lexical/utils */\n\n/**\n * Takes an HTML element and adds the classNames passed within an array,\n * ignoring any non-string types. A space can be used to add multiple classes\n * eg. addClassNamesToElement(element, ['element-inner active', true, null])\n * will add both 'element-inner' and 'active' as classes to that element.\n * @param element - The element in which the classes are added\n * @param classNames - An array defining the class names to add to the element\n */\nfunction addClassNamesToElement(element, ...classNames) {\n classNames.forEach(className => {\n if (typeof className === 'string') {\n const classesToAdd = className.split(' ').filter(n => n !== '');\n element.classList.add(...classesToAdd);\n }\n });\n}\n/**\n * Takes an HTML element and removes the classNames passed within an array,\n * ignoring any non-string types. A space can be used to remove multiple classes\n * eg. removeClassNamesFromElement(element, ['active small', true, null])\n * will remove both the 'active' and 'small' classes from that element.\n * @param element - The element in which the classes are removed\n * @param classNames - An array defining the class names to remove from the element\n */\n\nfunction removeClassNamesFromElement(element, ...classNames) {\n classNames.forEach(className => {\n if (typeof className === 'string') {\n element.classList.remove(...className.split(' '));\n }\n });\n}\n/**\n * Returns true if the file type matches the types passed within the acceptableMimeTypes array, false otherwise.\n * The types passed must be strings and are CASE-SENSITIVE.\n * eg. if file is of type 'text' and acceptableMimeTypes = ['TEXT', 'IMAGE'] the function will return false.\n * @param file - The file you want to type check.\n * @param acceptableMimeTypes - An array of strings of types which the file is checked against.\n * @returns true if the file is an acceptable mime type, false otherwise.\n */\n\nfunction isMimeType(file, acceptableMimeTypes) {\n for (const acceptableType of acceptableMimeTypes) {\n if (file.type.startsWith(acceptableType)) {\n return true;\n }\n }\n\n return false;\n}\n/**\n * Lexical File Reader with:\n * 1. MIME type support\n * 2. batched results (HistoryPlugin compatibility)\n * 3. Order aware (respects the order when multiple Files are passed)\n *\n * const filesResult = await mediaFileReader(files, ['image/']);\n * filesResult.forEach(file => editor.dispatchCommand('INSERT_IMAGE', {\n * src: file.result,\n * }));\n */\n\nfunction mediaFileReader(files, acceptableMimeTypes) {\n const filesIterator = files[Symbol.iterator]();\n return new Promise((resolve, reject) => {\n const processed = [];\n\n const handleNextFile = () => {\n const {\n done,\n value: file\n } = filesIterator.next();\n\n if (done) {\n return resolve(processed);\n }\n\n const fileReader = new FileReader();\n fileReader.addEventListener('error', reject);\n fileReader.addEventListener('load', () => {\n const result = fileReader.result;\n\n if (typeof result === 'string') {\n processed.push({\n file,\n result\n });\n }\n\n handleNextFile();\n });\n\n if (isMimeType(file, acceptableMimeTypes)) {\n fileReader.readAsDataURL(file);\n } else {\n handleNextFile();\n }\n };\n\n handleNextFile();\n });\n}\n/**\n * \"Depth-First Search\" starts at the root/top node of a tree and goes as far as it can down a branch end\n * before backtracking and finding a new path. Consider solving a maze by hugging either wall, moving down a\n * branch until you hit a dead-end (leaf) and backtracking to find the nearest branching path and repeat.\n * It will then return all the nodes found in the search in an array of objects.\n * @param startingNode - The node to start the search, if ommitted, it will start at the root node.\n * @param endingNode - The node to end the search, if ommitted, it will find all descendants of the startingNode.\n * @returns An array of objects of all the nodes found by the search, including their depth into the tree.\n * {depth: number, node: LexicalNode} It will always return at least 1 node (the ending node) so long as it exists\n */\n\nfunction $dfs(startingNode, endingNode) {\n const nodes = [];\n const start = (startingNode || lexical.$getRoot()).getLatest();\n const end = endingNode || (lexical.$isElementNode(start) ? start.getLastDescendant() : start);\n let node = start;\n let depth = $getDepth(node);\n\n while (node !== null && !node.is(end)) {\n nodes.push({\n depth,\n node\n });\n\n if (lexical.$isElementNode(node) && node.getChildrenSize() > 0) {\n node = node.getFirstChild();\n depth++;\n } else {\n // Find immediate sibling or nearest parent sibling\n let sibling = null;\n\n while (sibling === null && node !== null) {\n sibling = node.getNextSibling();\n\n if (sibling === null) {\n node = node.getParent();\n depth--;\n } else {\n node = sibling;\n }\n }\n }\n }\n\n if (node !== null && node.is(end)) {\n nodes.push({\n depth,\n node\n });\n }\n\n return nodes;\n}\n\nfunction $getDepth(node) {\n let innerNode = node;\n let depth = 0;\n\n while ((innerNode = innerNode.getParent()) !== null) {\n depth++;\n }\n\n return depth;\n}\n/**\n * Takes a node and traverses up its ancestors (toward the root node)\n * in order to find a specific type of node.\n * @param node - the node to begin searching.\n * @param klass - an instance of the type of node to look for.\n * @returns the node of type klass that was passed, or null if none exist.\n */\n\n\nfunction $getNearestNodeOfType(node, klass) {\n let parent = node;\n\n while (parent != null) {\n if (parent instanceof klass) {\n return parent;\n }\n\n parent = parent.getParent();\n }\n\n return null;\n}\n/**\n * Returns the element node of the nearest ancestor, otherwise throws an error.\n * @param startNode - The starting node of the search\n * @returns The ancestor node found\n */\n\nfunction $getNearestBlockElementAncestorOrThrow(startNode) {\n const blockNode = $findMatchingParent(startNode, node => lexical.$isElementNode(node) && !node.isInline());\n\n if (!lexical.$isElementNode(blockNode)) {\n {\n throw Error(`Expected node ${startNode.__key} to have closest block element node.`);\n }\n }\n\n return blockNode;\n}\n\n/**\n * Starts with a node and moves up the tree (toward the root node) to find a matching node based on\n * the search parameters of the findFn. (Consider JavaScripts' .find() function where a testing function must be\n * passed as an argument. eg. if( (node) => node.__type === 'div') ) return true; otherwise return false\n * @param startingNode - The node where the search starts.\n * @param findFn - A testing function that returns true if the current node satisfies the testing parameters.\n * @returns A parent node that matches the findFn parameters, or null if one wasn't found.\n */\nfunction $findMatchingParent(startingNode, findFn) {\n let curr = startingNode;\n\n while (curr !== lexical.$getRoot() && curr != null) {\n if (findFn(curr)) {\n return curr;\n }\n\n curr = curr.getParent();\n }\n\n return null;\n}\n\n/**\n * Returns a function that will execute all functions passed when called. It is generally used\n * to register multiple lexical listeners and then tear them down with a single function call, such\n * as React's useEffect hook.\n * @example\n * ```ts\n * useEffect(() => {\n * return mergeRegister(\n * editor.registerCommand(...registerCommand1 logic),\n * editor.registerCommand(...registerCommand2 logic),\n * editor.registerCommand(...registerCommand3 logic)\n * )\n * }, [editor])\n * ```\n * In this case, useEffect is returning the function returned by mergeRegister as a cleanup\n * function to be executed after either the useEffect runs again (due to one of its dependencies\n * updating) or the compenent it resides in unmounts.\n * Note the functions don't neccesarily need to be in an array as all arguements\n * are considered to be the func argument and spread from there.\n * @param func - An array of functions meant to be executed by the returned function.\n * @returns the function which executes all the passed register command functions.\n */\nfunction mergeRegister(...func) {\n return () => {\n func.forEach(f => f());\n };\n}\n/**\n * Attempts to resolve nested element nodes of the same type into a single node of that type.\n * It is generally used for marks/commenting\n * @param editor - The lexical editor\n * @param targetNode - The target for the nested element to be extracted from.\n * @param cloneNode - See {@link $createMarkNode}\n * @param handleOverlap - Handles any overlap between the node to extract and the targetNode\n * @returns The lexical editor\n */\n\nfunction registerNestedElementResolver(editor, targetNode, cloneNode, handleOverlap) {\n const $isTargetNode = node => {\n return node instanceof targetNode;\n };\n\n const $findMatch = node => {\n // First validate we don't have any children that are of the target,\n // as we need to handle them first.\n const children = node.getChildren();\n\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n\n if ($isTargetNode(child)) {\n return null;\n }\n }\n\n let parentNode = node;\n let childNode = node;\n\n while (parentNode !== null) {\n childNode = parentNode;\n parentNode = parentNode.getParent();\n\n if ($isTargetNode(parentNode)) {\n return {\n child: childNode,\n parent: parentNode\n };\n }\n }\n\n return null;\n };\n\n const elementNodeTransform = node => {\n const match = $findMatch(node);\n\n if (match !== null) {\n const {\n child,\n parent\n } = match; // Simple path, we can move child out and siblings into a new parent.\n\n if (child.is(node)) {\n handleOverlap(parent, node);\n const nextSiblings = child.getNextSiblings();\n const nextSiblingsLength = nextSiblings.length;\n parent.insertAfter(child);\n\n if (nextSiblingsLength !== 0) {\n const newParent = cloneNode(parent);\n child.insertAfter(newParent);\n\n for (let i = 0; i < nextSiblingsLength; i++) {\n newParent.append(nextSiblings[i]);\n }\n }\n\n if (!parent.canBeEmpty() && parent.getChildrenSize() === 0) {\n parent.remove();\n }\n }\n }\n };\n\n return editor.registerNodeTransform(targetNode, elementNodeTransform);\n}\n/**\n * Clones the editor and marks it as dirty to be reconciled. If there was a selection,\n * it would be set back to its previous state, or null otherwise.\n * @param editor - The lexical editor\n * @param editorState - The editor's state\n */\n\nfunction $restoreEditorState(editor, editorState) {\n const FULL_RECONCILE = 2;\n const nodeMap = new Map();\n const activeEditorState = editor._pendingEditorState;\n\n for (const [key, node] of editorState._nodeMap) {\n const clone = selection.$cloneWithProperties(node);\n\n if (lexical.$isTextNode(clone)) {\n clone.__text = node.__text;\n }\n\n nodeMap.set(key, clone);\n }\n\n if (activeEditorState) {\n activeEditorState._nodeMap = nodeMap;\n }\n\n editor._dirtyType = FULL_RECONCILE;\n const selection$1 = editorState._selection;\n lexical.$setSelection(selection$1 === null ? null : selection$1.clone());\n}\n/**\n * If the selected insertion area is the root/shadow root node (see {@link lexical!$isRootOrShadowRoot}),\n * the node will be appended there, otherwise, it will be inserted before the insertion area.\n * If there is no selection where the node is to be inserted, it will be appended after any current nodes\n * within the tree, as a child of the root node. A paragraph node will then be added after the inserted node and selected.\n * @param node - The node to be inserted\n * @returns The node after its insertion\n */\n\nfunction $insertNodeToNearestRoot(node) {\n const selection = lexical.$getSelection() || lexical.$getPreviousSelection();\n\n if (lexical.$isRangeSelection(selection)) {\n const {\n focus\n } = selection;\n const focusNode = focus.getNode();\n const focusOffset = focus.offset;\n\n if (lexical.$isRootOrShadowRoot(focusNode)) {\n const focusChild = focusNode.getChildAtIndex(focusOffset);\n\n if (focusChild == null) {\n focusNode.append(node);\n } else {\n focusChild.insertBefore(node);\n }\n\n node.selectNext();\n } else {\n let splitNode;\n let splitOffset;\n\n if (lexical.$isTextNode(focusNode)) {\n splitNode = focusNode.getParentOrThrow();\n splitOffset = focusNode.getIndexWithinParent();\n\n if (focusOffset > 0) {\n splitOffset += 1;\n focusNode.splitText(focusOffset);\n }\n } else {\n splitNode = focusNode;\n splitOffset = focusOffset;\n }\n\n const [, rightTree] = lexical.$splitNode(splitNode, splitOffset);\n rightTree.insertBefore(node);\n rightTree.selectStart();\n }\n } else {\n if (lexical.$isNodeSelection(selection) || lexical.DEPRECATED_$isGridSelection(selection)) {\n const nodes = selection.getNodes();\n nodes[nodes.length - 1].getTopLevelElementOrThrow().insertAfter(node);\n } else {\n const root = lexical.$getRoot();\n root.append(node);\n }\n\n const paragraphNode = lexical.$createParagraphNode();\n node.insertAfter(paragraphNode);\n paragraphNode.select();\n }\n\n return node.getLatest();\n}\n/**\n * Wraps the node into another node created from a createElementNode function, eg. $createParagraphNode\n * @param node - Node to be wrapped.\n * @param createElementNode - Creates a new lexcial element to wrap the to-be-wrapped node and returns it.\n * @returns A new lexcial element with the previous node appended within (as a child, including its children).\n */\n\nfunction $wrapNodeInElement(node, createElementNode) {\n const elementNode = createElementNode();\n node.replace(elementNode);\n elementNode.append(node);\n return elementNode;\n} // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n/**\n * @param object = The instance of the type\n * @param objectClass = The class of the type\n * @returns Whether the object is has the same Klass of the objectClass, ignoring the difference across window (e.g. different iframs)\n */\nfunction objectKlassEquals(object, objectClass) {\n return object !== null ? Object.getPrototypeOf(object).constructor.name === objectClass.name : false;\n}\n/**\n * Filter the nodes\n * @param nodes Array of nodes that needs to be filtered\n * @param filterFn A filter function that returns node if the current node satisfies the condition otherwise null\n * @returns Array of filtered nodes\n */\n\nfunction $filter(nodes, filterFn) {\n const result = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = filterFn(nodes[i]);\n\n if (node !== null) {\n result.push(node);\n }\n }\n\n return result;\n}\n/**\n * Appends the node before the first child of the parent node\n * @param parent A parent node\n * @param node Node that needs to be appended\n */\n\nfunction $insertFirst(parent, node) {\n const firstChild = parent.getFirstChild();\n\n if (firstChild !== null) {\n firstChild.insertBefore(node);\n } else {\n parent.append(node);\n }\n}\n\nexports.$splitNode = lexical.$splitNode;\nexports.isHTMLAnchorElement = lexical.isHTMLAnchorElement;\nexports.isHTMLElement = lexical.isHTMLElement;\nexports.$dfs = $dfs;\nexports.$filter = $filter;\nexports.$findMatchingParent = $findMatchingParent;\nexports.$getNearestBlockElementAncestorOrThrow = $getNearestBlockElementAncestorOrThrow;\nexports.$getNearestNodeOfType = $getNearestNodeOfType;\nexports.$insertFirst = $insertFirst;\nexports.$insertNodeToNearestRoot = $insertNodeToNearestRoot;\nexports.$restoreEditorState = $restoreEditorState;\nexports.$wrapNodeInElement = $wrapNodeInElement;\nexports.addClassNamesToElement = addClassNamesToElement;\nexports.isMimeType = isMimeType;\nexports.mediaFileReader = mediaFileReader;\nexports.mergeRegister = mergeRegister;\nexports.objectKlassEquals = objectKlassEquals;\nexports.registerNestedElementResolver = registerNestedElementResolver;\nexports.removeClassNamesFromElement = removeClassNamesFromElement;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalUtils = process.env.NODE_ENV === 'development' ? require('./LexicalUtils.dev.js') : require('./LexicalUtils.prod.js')\nmodule.exports = LexicalUtils;","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { AppShellHeader } from \"./components\";\n\nimport { AppShellProps, AppShellComponents } from \"./appShell.types\";\n\nconst AppShell: React.FC<AppShellProps> & AppShellComponents = ({\n className: _className,\n style: _style,\n children,\n menu,\n menuProperties = {\n display: {\n xs: \"none\",\n md: \"block\",\n },\n },\n ...rest\n}: AppShellProps) => (\n <Box {...rest} display=\"flex\">\n {menu && (\n <Box\n {...menuProperties}\n width=\"18rem\"\n height=\"100vh\"\n position=\"sticky\"\n top=\"0\"\n left=\"0\"\n borderStyle=\"solid\"\n borderWidth=\"none\"\n borderRightWidth=\"1\"\n borderColor=\"neutral-surfaceHighlight\"\n >\n {menu}\n </Box>\n )}\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n flex=\"1 1 auto\"\n backgroundColor=\"neutral-surface\"\n width=\"100%\"\n >\n {children}\n </Box>\n </Box>\n);\n\nAppShell.Header = AppShellHeader;\n\nAppShell.displayName = \"AppShell\";\nAppShell.Header.displayName = \"AppShell.Header\";\n\nexport { AppShell };\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { AppShellHeaderProps } from \"./appShellHeader.types\";\n\nconst AppShellHeader: React.FC<AppShellHeaderProps> = ({\n className: _className,\n style: _style,\n leftSlot,\n rightSlot,\n ...rest\n}: AppShellHeaderProps) => (\n <Box\n {...rest}\n paddingX=\"2\"\n paddingY=\"4\"\n display=\"flex\"\n justifyContent={leftSlot ? \"space-between\" : \"flex-end\"}\n gap=\"2\"\n >\n {leftSlot}\n {rightSlot && (\n <Box display=\"flex\" gap=\"1\">\n {rightSlot}\n </Box>\n )}\n </Box>\n);\n\nexport { AppShellHeader };\n","import { AppShellHeader } from \"./AppShellHeader\";\n\nexport { AppShellHeader } from \"./AppShellHeader\";\nexport default AppShellHeader;\n","export * from \"./AppShellHeader\";\n","import { AppShell } from \"./AppShell\";\n\nexport { AppShell } from \"./AppShell\";\nexport type { AppShellProps } from \"./appShell.types\";\nexport default AppShell;\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\nimport { ChevronLeftIcon, ChevronRightIcon } from \"@nimbus-ds/icons\";\nimport { calendar } from \"@nimbus-ds/styles\";\nimport { DayPicker } from \"react-day-picker\";\nimport { CalendarProps } from \"./calendar.types\";\nimport { CustomCaptionLabel, CustomDay, Weekdays, Wrapper } from \"./components\";\n\nconst Calendar: React.FC<CalendarProps> = ({\n className: _className,\n style: _style,\n hideBorder = false,\n containerProps,\n stickyWeekdays = false,\n fullWidthDays = false,\n ...rest\n}: CalendarProps) => (\n <Wrapper initialProps={{ ...rest }}>\n <Box\n borderWidth={hideBorder ? \"none\" : \"1\"}\n borderStyle=\"solid\"\n borderColor=\"neutral-surfaceHighlight\"\n borderRadius=\"2\"\n data-style=\"nimbus-calendar\"\n overflowY=\"auto\"\n position=\"relative\"\n {...containerProps}\n >\n {rest.numberOfMonths && rest.numberOfMonths > 1 && stickyWeekdays && (\n <Weekdays />\n )}\n <DayPicker\n {...rest}\n classNames={{\n table: calendar.classnames.table,\n row: calendar.classnames.row,\n cell: calendar.classnames.cell,\n caption: calendar.classnames.caption,\n caption_start: calendar.classnames.caption_start,\n caption_end: calendar.classnames.caption_end,\n head: stickyWeekdays\n ? calendar.classnames.head_stickyWeekdays\n : calendar.classnames.head,\n head_row: calendar.classnames.row,\n head_cell: calendar.classnames.cell__head,\n tbody: calendar.classnames.body,\n nav: calendar.classnames.nav,\n nav_button_previous: calendar.classnames.nav__button,\n nav_button_next: calendar.classnames.nav__button,\n day: fullWidthDays\n ? calendar.classnames.day_fullWidth\n : calendar.classnames.day,\n day_selected: calendar.classnames.day_selected,\n day_today: calendar.classnames.day_today,\n day_outside: calendar.classnames.day_outside,\n day_disabled: calendar.classnames.day_disabled,\n day_range_middle: calendar.classnames.day__middle,\n day_range_start: calendar.classnames.day__start,\n day_range_end: calendar.classnames.day__end,\n months: calendar.classnames.months,\n }}\n components={{\n CaptionLabel: CustomCaptionLabel,\n IconLeft: ChevronLeftIcon,\n IconRight: ChevronRightIcon,\n Day: CustomDay,\n }}\n />\n </Box>\n </Wrapper>\n);\n\nCalendar.displayName = \"Calendar\";\n\nexport { Calendar };\n","import React from \"react\";\nimport { CaptionLabelProps, useDayPicker } from \"react-day-picker\";\n\nimport { Text } from \"@nimbus-ds/components\";\n\nconst CustomCaptionLabel: React.FC<CaptionLabelProps> = ({\n ...rest\n}: CaptionLabelProps) => {\n const {\n locale,\n formatters: { formatCaption }\n } = useDayPicker();\n return (\n <Text fontSize=\"highlight\" fontWeight=\"medium\" {...rest}>\n {formatCaption(rest.displayMonth, { locale })}\n </Text>\n );\n};\n\nexport { CustomCaptionLabel };\n","import { CustomCaptionLabel } from \"./CustomCaptionLabel\";\n\nexport { CustomCaptionLabel } from \"./CustomCaptionLabel\";\nexport default CustomCaptionLabel;\n","import React from \"react\";\n\nimport { Day } from \"react-day-picker\";\nimport { format } from \"date-fns\";\nimport { CustomDayProps } from \"./customDay.types\";\n\nconst CustomDay: React.FC<CustomDayProps> = ({ ...props }: CustomDayProps) => (\n <div id={format(props.date, \"yyyy-MM-dd\")} style={{ width: \"100%\" }}>\n <Day {...props} />\n </div>\n);\n\nexport { CustomDay };\n","import { CustomDay } from \"./CustomDay\";\n\nexport { CustomDay } from \"./CustomDay\";\nexport default CustomDay;\n","import React from \"react\";\nimport { useDayPicker } from \"react-day-picker\";\nimport { Box, Text } from \"@nimbus-ds/components\";\nimport { getWeekdays } from \"../../utils\";\n\nconst Weekdays: React.FC = () => {\n const {\n locale,\n weekStartsOn,\n ISOWeek,\n formatters: { formatWeekdayName },\n labels: { labelWeekday },\n } = useDayPicker();\n\n const weekdays = getWeekdays(locale, weekStartsOn, ISOWeek);\n\n return (\n <Box\n display=\"flex\"\n width=\"100%\"\n backgroundColor=\"neutral-surface\"\n position=\"sticky\"\n top=\"0\"\n py=\"2\"\n px=\"4\"\n zIndex=\"100\"\n >\n {weekdays.map((weekday) => (\n <Box\n key={labelWeekday(weekday, { locale })}\n display=\"flex\"\n flex=\"1\"\n alignItems=\"center\"\n justifyContent=\"center\"\n aria-label={labelWeekday(weekday, { locale })}\n >\n <Text textAlign=\"center\" fontSize=\"caption\" fontWeight=\"medium\">\n {formatWeekdayName(weekday, { locale })}\n </Text>\n </Box>\n ))}\n </Box>\n );\n};\n\nexport { Weekdays };\n","import { Weekdays } from \"./Weekdays\";\n\nexport { Weekdays } from \"./Weekdays\";\nexport default Weekdays;\n","import React from \"react\";\n\nimport { DayPickerProvider } from \"react-day-picker\";\nimport { WrapperProps } from \"./wrapper.types\";\n\nconst Wrapper: React.FC<WrapperProps> = ({\n children,\n ...rest\n}: WrapperProps) => <DayPickerProvider {...rest}>{children}</DayPickerProvider>;\n\nexport { Wrapper };\n","import { Wrapper } from \"./Wrapper\";\n\nexport { Wrapper } from \"./Wrapper\";\nexport default Wrapper;\n","export * from \"./CustomCaptionLabel\";\nexport * from \"./CustomDay\";\nexport * from \"./Wrapper\";\nexport * from \"./Weekdays\";\n","import { Calendar } from \"./Calendar\";\n\nexport { Calendar } from \"./Calendar\";\nexport type { CalendarProps } from \"./calendar.types\";\nexport default Calendar;\n","import { addDays, Locale, startOfISOWeek, startOfWeek } from \"date-fns\";\n\n/**\n * Generate a series of 7 days, starting from the week, to use for formatting\n * the weekday names (Monday, Tuesday, etc.).\n */\nexport function getWeekdays(\n locale?: Locale,\n /** The index of the first day of the week (0 - Sunday). */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,\n /** Use ISOWeek instead of locale/ */\n ISOWeek?: boolean,\n): Date[] {\n const start = ISOWeek\n ? startOfISOWeek(new Date())\n : startOfWeek(new Date(), { locale, weekStartsOn });\n\n const days = [];\n // eslint-disable-next-line no-plusplus\n for (let i = 0; i < 7; i++) {\n const day = addDays(start, i);\n days.push(day);\n }\n return days;\n}\n","export * from \"./getWeekdays\";\n","import React from \"react\";\nimport { ChevronRightIcon } from \"@nimbus-ds/icons\";\nimport { Box, Icon, Text } from \"@nimbus-ds/components\";\n\nimport {\n cardBackground,\n iconBackground,\n cardBorder,\n iconColor,\n textColor\n} from \"./calloutCard.definitions\";\nimport { CalloutCardProps } from \"./calloutCard.types\";\n\nconst CalloutCard: React.FC<CalloutCardProps> = ({\n appearance,\n title,\n subtitle,\n link,\n onClick,\n icon: Source,\n ...rest\n}) => (\n <Box\n {...rest}\n display=\"flex\"\n backgroundColor={cardBackground[appearance]}\n borderColor={cardBorder[appearance]}\n borderStyle=\"solid\"\n borderWidth=\"1\"\n borderRadius=\"2\"\n cursor={link ? \"auto\" : \"pointer\"}\n flex=\"0 1 auto\"\n gap=\"2\"\n p=\"2\"\n as={link ? \"div\" : \"button\"}\n onClick={onClick}\n width=\"100%\"\n >\n <Box\n backgroundColor={iconBackground[appearance]}\n height=\"36px\"\n width=\"36px\"\n minHeight=\"36px\"\n minWidth=\"36px\"\n borderRadius=\"2\"\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <Icon\n data-testid=\"callout-card-icon\"\n color={iconColor[appearance]}\n source={<Source size=\"medium\" />}\n />\n </Box>\n <Box display=\"flex\" flex=\"1 1 auto\" flexDirection=\"column\">\n <Text\n data-testid=\"callout-card-title\"\n color={textColor[appearance]}\n fontSize=\"caption\"\n fontWeight=\"bold\"\n >\n {title}\n </Text>\n <Text\n data-testid=\"callout-card-subtitle\"\n color={textColor[appearance]}\n fontSize=\"caption\"\n >\n {subtitle}\n </Text>\n {link && <Box mt=\"2\">{link}</Box>}\n </Box>\n {!link && (\n <Box alignSelf=\"center\">\n <Icon\n data-testid=\"callout-card-open-icon\"\n cursor=\"pointer\"\n color={iconColor[appearance]}\n source={<ChevronRightIcon size=\"small\" />}\n />\n </Box>\n )}\n </Box>\n);\n\nCalloutCard.displayName = \"CalloutCard\";\n\nexport { CalloutCard };\n","export const cardBackground = {\n primary: \"primary-surface\",\n success: \"success-surface\",\n warning: \"warning-surface\",\n danger: \"danger-surface\",\n neutral: \"neutral-surface\",\n} as {\n [key: string]:\n | \"primary-surface\"\n | \"success-surface\"\n | \"warning-surface\"\n | \"danger-surface\"\n | \"neutral-surface\";\n};\n\nexport const cardBorder = {\n primary: \"primary-interactive\",\n success: \"success-interactive\",\n warning: \"warning-interactive\",\n danger: \"danger-interactive\",\n neutral: \"neutral-interactive\",\n} as {\n [key: string]:\n | \"primary-interactive\"\n | \"success-interactive\"\n | \"warning-interactive\"\n | \"danger-interactive\"\n | \"neutral-interactive\";\n};\n\nexport const iconBackground = {\n primary: \"primary-surfaceHighlight\",\n success: \"success-surfaceHighlight\",\n warning: \"warning-surfaceHighlight\",\n danger: \"danger-surfaceHighlight\",\n neutral: \"neutral-surfaceHighlight\",\n} as {\n [key: string]:\n | \"primary-surfaceHighlight\"\n | \"success-surfaceHighlight\"\n | \"warning-surfaceHighlight\"\n | \"danger-surfaceHighlight\"\n | \"neutral-surfaceHighlight\";\n};\n\nexport const iconColor = {\n primary: \"primary-textLow\",\n success: \"success-textLow\",\n warning: \"warning-textLow\",\n danger: \"danger-textLow\",\n neutral: \"neutral-textLow\",\n} as {\n [key: string]:\n | \"primary-textLow\"\n | \"success-textLow\"\n | \"warning-textLow\"\n | \"danger-textLow\"\n | \"neutral-textLow\";\n};\n\nexport const textColor = iconColor;\n","import { CalloutCard } from \"./CalloutCard\";\n\nexport { CalloutCard } from \"./CalloutCard\";\nexport type { CalloutCardProps } from \"./calloutCard.types\";\nexport default CalloutCard;\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { DataListProps, DataListComponents } from \"./dataList.types\";\n\nimport { DataListRow } from \"./components\";\n\nconst DataList: React.FC<DataListProps> & DataListComponents = ({\n className: _className,\n style: _style,\n children,\n bottomDivider = true,\n ...rest\n}: DataListProps) => (\n <Box\n role=\"list\"\n borderStyle=\"solid\"\n borderWidth=\"none\"\n borderBottomWidth={bottomDivider ? \"1\" : \"none\"}\n borderColor=\"neutral-surfaceHighlight\"\n backgroundColor=\"neutral-background\"\n display=\"flex\"\n flexDirection=\"column\"\n width=\"100%\"\n {...rest}\n >\n {children}\n </Box>\n);\n\nDataList.Row = DataListRow;\nDataList.displayName = \"DataList\";\nDataListRow.displayName = \"DataList.Row\";\nDataList.Row.displayName = \"DataList.Row\";\n\nexport { DataList };\n","import React from \"react\";\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { DataListRowProps } from \"./dataListRow.types\";\nimport { rowPadding } from \"./dataListRow.definitions\";\n\nconst DataListRow: React.FC<DataListRowProps> = ({\n className: _className,\n style: _style,\n children,\n padding = \"base\",\n topDivider = true,\n ...rest\n}: DataListRowProps) => (\n <Box\n role=\"listitem\"\n borderStyle=\"solid\"\n borderWidth=\"none\"\n borderTopWidth={topDivider ? \"1\" : \"none\"}\n borderColor=\"neutral-surfaceHighlight\"\n display=\"flex\"\n flexDirection=\"column\"\n padding={rowPadding[padding]}\n {...rest}\n >\n {children}\n </Box>\n);\n\nexport { DataListRow };\n","export const rowPadding = {\n base: \"4\",\n small: \"2\",\n none: \"none\",\n} as { [key: string]: \"4\" | \"2\" | \"none\" };\n","import { DataListRow } from \"./DataListRow\";\n\nexport { DataListRow } from \"./DataListRow\";\nexport default DataListRow;\n","export * from \"./DataListRow\";\n","import { DataList } from \"./DataList\";\n\nexport { DataList } from \"./DataList\";\nexport type { DataListProps } from \"./dataList.types\";\nexport default DataList;\n","import React from \"react\";\n\nimport { Box, Table } from \"@nimbus-ds/components\";\n\nimport {\n DataTableBulkActions,\n DataTableFooter,\n DataTableHeader,\n DataTableRow,\n DataTableCell,\n} from \"./components\";\n\nimport { DataTableProps, DataTableComponents } from \"./dataTable.types\";\n\nconst DataTable: React.FC<DataTableProps> & DataTableComponents = ({\n className: _className,\n style: _style,\n bulkActions,\n header,\n footer,\n children,\n ...rest\n}: DataTableProps) => (\n <Box>\n <Box\n position=\"relative\"\n borderRadius=\"2\"\n borderColor=\"neutral-surfaceHighlight\"\n borderStyle=\"solid\"\n borderWidth=\"1\"\n // overflow=\"hidden\"\n >\n {bulkActions}\n <Table {...rest}>\n {header}\n <Table.Body>{children}</Table.Body>\n </Table>\n </Box>\n {footer}\n </Box>\n);\n\nexport { DataTable };\n\nDataTable.displayName = \"DataTable\";\n\nDataTable.BulkActions = DataTableBulkActions;\nDataTable.Header = DataTableHeader;\nDataTable.Footer = DataTableFooter;\nDataTable.Row = DataTableRow;\nDataTable.Cell = DataTableCell;\n\nDataTable.BulkActions.displayName = \"DataTable.BulkActions\";\nDataTable.Header.displayName = \"DataTable.Header\";\nDataTable.Footer.displayName = \"DataTable.Footer\";\nDataTable.Row.displayName = \"DataTable.Row\";\nDataTable.Cell.displayName = \"DataTable.Cell\";\n","import React from \"react\";\n\nimport { Box, Checkbox, Label, Text } from \"@nimbus-ds/components\";\n\nimport { DataTableBulkActionsProps } from \"./dataTableBulkActions.types\";\n\nconst DataTableBulkActions: React.FC<DataTableBulkActionsProps> = ({\n className: _className,\n style: _style,\n checkbox,\n link,\n action,\n label,\n ...rest\n}: DataTableBulkActionsProps) => (\n <Box\n {...rest}\n position=\"sticky\"\n top=\"0\"\n left=\"0\"\n width=\"100%\"\n backgroundColor=\"neutral-surface\"\n display=\"flex\"\n alignItems=\"center\"\n gap=\"4\"\n p=\"2\"\n boxSizing=\"border-box\"\n borderRadius=\"2\"\n zIndex=\"100\"\n >\n <Checkbox {...checkbox} id=\"select-all\" />\n <Label htmlFor=\"select-all\">\n <Text color=\"neutral-textLow\" fontSize=\"base\">\n {label}\n </Text>\n </Label>\n {link}\n {action}\n </Box>\n);\n\nexport { DataTableBulkActions };\n","import { DataTableBulkActions } from \"./DataTableBulkActions\";\n\nexport { DataTableBulkActions } from \"./DataTableBulkActions\";\nexport default DataTableBulkActions;\n","import React from \"react\";\n\nimport { Table } from \"@nimbus-ds/components\";\n\nimport { DataTableCellProps } from \"./dataTableCell.types\";\n\nconst DataTableCell: React.FC<DataTableCellProps> = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: DataTableCellProps) => <Table.Cell {...rest}>{children}</Table.Cell>;\n\nexport { DataTableCell };\n","import { DataTableCell } from \"./DataTableCell\";\n\nexport { DataTableCell } from \"./DataTableCell\";\nexport default DataTableCell;\n","import React from \"react\";\n\nimport { Text, Pagination, Box } from \"@nimbus-ds/components\";\n\nimport { DataTableFooterProps } from \"./dataTableFooter.types\";\n\nconst DataTableFooter: React.FC<DataTableFooterProps> = ({\n className: _className,\n style: _style,\n itemCount,\n pagination,\n ...rest\n}: DataTableFooterProps) => (\n <Box\n {...rest}\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n p=\"2\"\n >\n <Text fontSize=\"caption\" color=\"neutral-textLow\">\n {itemCount}\n </Text>\n {pagination && <Pagination {...pagination} />}\n </Box>\n);\n\nexport { DataTableFooter };\n","import { DataTableFooter } from \"./DataTableFooter\";\n\nexport { DataTableFooter } from \"./DataTableFooter\";\nexport default DataTableFooter;\n","import React from \"react\";\n\nimport { Table, Checkbox } from \"@nimbus-ds/components\";\n\nimport { DataTableHeaderProps } from \"./dataTableHeader.types\";\n\nconst DataTableHeader: React.FC<DataTableHeaderProps> = ({\n className: _className,\n style: _style,\n checkbox,\n children,\n ...rest\n}: DataTableHeaderProps) => (\n <Table.Head {...rest}>\n <Table.Row backgroundColor=\"neutral-surface\">\n <Table.Cell as=\"th\" width=\"1rem\">\n <Checkbox {...checkbox} />\n </Table.Cell>\n {children}\n </Table.Row>\n </Table.Head>\n);\n\nexport { DataTableHeader };\n","import { DataTableHeader } from \"./DataTableHeader\";\n\nexport { DataTableHeader } from \"./DataTableHeader\";\nexport default DataTableHeader;\n","import React from \"react\";\n\nimport { Table, Checkbox } from \"@nimbus-ds/components\";\n\nimport { DataTableRowProps } from \"./dataTableRow.types\";\n\nconst DataTableRow: React.FC<DataTableRowProps> = ({\n className: _className,\n style: _style,\n checkbox,\n children,\n ...rest\n}: DataTableRowProps) => (\n <Table.Row {...rest}>\n <Table.Cell width=\"1rem\">\n <Checkbox {...checkbox} />\n </Table.Cell>\n {children}\n </Table.Row>\n);\n\nexport { DataTableRow };\n","import { DataTableRow } from \"./DataTableRow\";\n\nexport { DataTableRow } from \"./DataTableRow\";\nexport default DataTableRow;\n","export * from \"./DataTableBulkActions\";\nexport * from \"./DataTableFooter\";\nexport * from \"./DataTableHeader\";\nexport * from \"./DataTableRow\";\nexport * from \"./DataTableCell\";\n","import { DataTable } from \"./DataTable\";\n\nexport { DataTable } from \"./DataTable\";\nexport type { DataTableProps } from \"./dataTable.types\";\nexport default DataTable;\n","import React from \"react\";\nimport { Box, Icon, Text } from \"@nimbus-ds/components\";\nimport { editor as editorStyles } from \"@nimbus-ds/styles\";\nimport { EditorState, LexicalEditor } from \"lexical\";\nimport {\n InitialConfigType,\n LexicalComposer,\n} from \"@lexical/react/LexicalComposer\";\nimport { OnChangePlugin } from \"@lexical/react/LexicalOnChangePlugin\";\nimport { RichTextPlugin } from \"@lexical/react/LexicalRichTextPlugin\";\nimport { ContentEditable } from \"@lexical/react/LexicalContentEditable\";\nimport LexicalErrorBoundary from \"@lexical/react/LexicalErrorBoundary\";\n\nimport { Placeholder, Toolbar } from \"./components\";\nimport { EditorProps } from \"./editor.types\";\nimport {\n defaultTheme,\n defaultModules,\n aliasModules,\n editorAppearance,\n helpTextAppearance,\n nodes,\n} from \"./editor.definitions\";\nimport {\n CustomHeadingPlugin,\n CustomParagraphPlugin,\n CustomClearFormattingPlugin,\n DefaultPlugins,\n} from \"./plugins\";\n\nimport { useEditor } from \"./hooks\";\n\nconst Editor: React.FC<EditorProps> = ({\n style: _style,\n className: _className,\n theme,\n modules,\n placeholder,\n value,\n parser = \"json\",\n helpText,\n helpIcon: IconSrc,\n appearance = \"none\",\n onChange,\n ...rest\n}) => {\n const { setContent, onChangeEditor, onError } = useEditor({\n parser,\n onChange,\n });\n\n const initialConfig: InitialConfigType = {\n namespace: \"@nimbus-ds/editor\",\n theme: theme ?? defaultTheme,\n editorState: (editor: LexicalEditor) => setContent(editor, value),\n nodes,\n onError,\n };\n\n return (\n <Box position=\"relative\" {...rest}>\n <Box\n as={LexicalComposer}\n initialConfig={initialConfig}\n position=\"relative\"\n backgroundColor=\"danger-interactive\"\n >\n <Toolbar\n className={\n editorStyles.classnames.toolbar[editorAppearance[appearance]]\n }\n >\n {modules ??\n defaultModules.map((defaultModule) => {\n const Module = aliasModules[defaultModule] ?? null;\n return <Module key={defaultModule} />;\n })}\n </Toolbar>\n <Box position=\"relative\">\n <RichTextPlugin\n contentEditable={\n <ContentEditable\n className={\n editorStyles.classnames.content[editorAppearance[appearance]]\n }\n />\n }\n placeholder={<Placeholder text={placeholder} />}\n ErrorBoundary={LexicalErrorBoundary}\n />\n </Box>\n {helpText && (\n <Box mt=\"2\">\n <Box display=\"inline-flex\" gap=\"1\">\n {IconSrc && (\n <Icon\n color={helpTextAppearance[appearance]}\n source={<IconSrc size={12} />}\n />\n )}\n <Text color={helpTextAppearance[appearance]} fontSize=\"caption\">\n {helpText}\n </Text>\n </Box>\n </Box>\n )}\n <DefaultPlugins />\n <CustomHeadingPlugin />\n <CustomParagraphPlugin />\n <CustomClearFormattingPlugin />\n <OnChangePlugin\n onChange={(editorState: EditorState, editor: LexicalEditor) => {\n onChangeEditor(editorState, editor);\n }}\n />\n </Box>\n </Box>\n );\n};\n\nEditor.displayName = \"Editor\";\n\nexport { Editor };\n","import React from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { BoldIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { FORMAT_TEXT_COMMAND } from \"lexical\";\n\nimport { Button } from \"../../components\";\nimport { useEditorState } from \"../../hooks\";\n\nconst Bold: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state } = useEditorState();\n return (\n <Button\n aria-label=\"Format Bold\"\n onClick={() => editor.dispatchCommand(FORMAT_TEXT_COMMAND, \"bold\")}\n selected={state.isBold}\n >\n <Icon source={<BoldIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { Bold };\n","import { Bold } from \"./Bold\";\n\nexport { Bold } from \"./Bold\";\nexport default Bold;\n","import React from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { RemoveFormatIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\n\nimport { Button } from \"../../components\";\nimport { CLEAR_FORMATTING_COMMAND } from \"../../utils\";\n\nconst ClearFormatting: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n\n return (\n <Button\n aria-label=\"Undo\"\n onClick={() =>\n editor.dispatchCommand(CLEAR_FORMATTING_COMMAND, undefined)\n }\n >\n <Icon source={<RemoveFormatIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { ClearFormatting };\n","import { ClearFormatting } from \"./ClearFormatting\";\n\nexport { ClearFormatting } from \"./ClearFormatting\";\nexport default ClearFormatting;\n","import React from \"react\";\nimport { Box, Icon, Text, Popover } from \"@nimbus-ds/components\";\nimport { TextSizeIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\n\nimport { useEditorState } from \"../../hooks\";\nimport { headerTranslations, supportedHeaderTypes } from \"./header.definitions\";\n\nconst Header: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state } = useEditorState();\n\n return (\n <Popover\n width=\"fit-content\"\n padding=\"small\"\n offset={8}\n content={\n <Box display=\"flex\" flexDirection=\"column\" gap=\"1\">\n {supportedHeaderTypes.map((supportedHeaderType) => (\n <Box\n key={supportedHeaderType.tag}\n as=\"button\"\n type=\"button\"\n cursor=\"pointer\"\n borderWidth=\"none\"\n color=\"primary-interactive\"\n display=\"flex\"\n gap=\"1\"\n p=\"2\"\n borderRadius=\"1\"\n backgroundColor={{\n hover: \"primary-surface\",\n xs:\n state.blockType === supportedHeaderType.tag\n ? \"primary-surface\"\n : \"transparent\",\n }}\n onClick={() =>\n editor.dispatchCommand(\n supportedHeaderType.command,\n supportedHeaderType.tag\n )\n }\n >\n <Icon source={<TextSizeIcon />} color=\"currentColor\" />\n <Text color=\"currentColor\">\n {headerTranslations[supportedHeaderType.tag]}\n </Text>\n </Box>\n ))}\n </Box>\n }\n arrow={false}\n position=\"bottom-start\"\n >\n <Box\n as=\"button\"\n type=\"button\"\n aria-label=\"Formatting options for text style\"\n display=\"flex\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n gap=\"1\"\n p=\"2\"\n borderWidth=\"none\"\n borderRadius=\"1\"\n color=\"primary-interactive\"\n backgroundColor={{\n hover: \"primary-surface\",\n xs: \"transparent\",\n }}\n cursor=\"pointer\"\n >\n <Icon source={<TextSizeIcon />} color=\"currentColor\" />\n <Box display={{ xs: \"none\", md: \"flex\" }}>\n {headerTranslations[state.blockType] && (\n <Text as=\"span\" color=\"currentColor\">\n {headerTranslations[state.blockType]}\n </Text>\n )}\n </Box>\n </Box>\n </Popover>\n );\n};\n\nexport { Header };\n","import { FORMAT_HEADING_COMMAND, FORMAT_PARAGRAPH_COMMAND } from \"../../utils\";\n\nexport const supportedHeaderTypes = [\n { tag: \"h3\", command: FORMAT_HEADING_COMMAND },\n { tag: \"h4\", command: FORMAT_HEADING_COMMAND },\n { tag: \"paragraph\", command: FORMAT_PARAGRAPH_COMMAND },\n];\n\nexport const headerTranslations = {\n h3: \"Título\",\n h4: \"Subtítulo\",\n paragraph: \"Parágrafo\",\n} as { [key: string]: string };\n","import { Header } from \"./Header\";\n\nexport { Header } from \"./Header\";\nexport default Header;\n","import React, { useEffect } from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { RedoIcon, UndoIcon } from \"@nimbus-ds/icons\";\nimport { mergeRegister } from \"@lexical/utils\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport {\n CAN_REDO_COMMAND,\n CAN_UNDO_COMMAND,\n COMMAND_PRIORITY_CRITICAL,\n REDO_COMMAND,\n UNDO_COMMAND,\n} from \"lexical\";\n\nimport { EditorActionKind } from \"../../contexts\";\nimport { Button } from \"../../components\";\nimport { useEditorState } from \"../../hooks\";\n\nconst History: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state, dispatch } = useEditorState();\n\n useEffect(() => {\n mergeRegister(\n editor.registerCommand<boolean>(\n CAN_UNDO_COMMAND,\n (payload) => {\n dispatch({\n type: EditorActionKind.CAN_UNDO,\n payload,\n });\n return false;\n },\n COMMAND_PRIORITY_CRITICAL\n ),\n editor.registerCommand<boolean>(\n CAN_REDO_COMMAND,\n (payload) => {\n dispatch({\n type: EditorActionKind.CAN_REDO,\n payload,\n });\n return false;\n },\n COMMAND_PRIORITY_CRITICAL\n )\n );\n }, [editor, dispatch]);\n\n return (\n <>\n <Button\n aria-label=\"Undo\"\n disabled={!state.canUndo}\n onClick={() => editor.dispatchCommand(UNDO_COMMAND, undefined)}\n >\n <Icon source={<UndoIcon />} color=\"currentColor\" />\n </Button>\n <Button\n aria-label=\"Redo\"\n disabled={!state.canRedo}\n onClick={() => editor.dispatchCommand(REDO_COMMAND, undefined)}\n >\n <Icon source={<RedoIcon />} color=\"currentColor\" />\n </Button>\n </>\n );\n};\n\nexport { History };\n","import { History } from \"./History\";\n\nexport { History } from \"./History\";\nexport default History;\n","import React from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { ItalicIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { FORMAT_TEXT_COMMAND } from \"lexical\";\n\nimport { Button } from \"../../components\";\nimport { useEditorState } from \"../../hooks\";\n\nconst Italic: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state } = useEditorState();\n return (\n <Button\n aria-label=\"Format ItalicIcon\"\n onClick={() => editor.dispatchCommand(FORMAT_TEXT_COMMAND, \"italic\")}\n selected={state.isItalic}\n >\n <Icon source={<ItalicIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { Italic };\n","import { Italic } from \"./Italic\";\n\nexport { Italic } from \"./Italic\";\nexport default Italic;\n","import React, { useCallback } from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { LinkIcon } from \"@nimbus-ds/icons\";\nimport { TOGGLE_LINK_COMMAND } from \"@lexical/link\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\n\nimport { Button } from \"../../components\";\nimport { useEditorState } from \"../../hooks\";\nimport { sanitizeUrl } from \"./link.definitions\";\n\nconst Link: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state } = useEditorState();\n\n const insertLink = useCallback(() => {\n if (!state.isLink) {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, sanitizeUrl(\"https://\"));\n } else {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null);\n }\n }, [editor, state.isLink]);\n\n return (\n <Button aria-label=\"Undo\" onClick={insertLink}>\n <Icon source={<LinkIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { Link };\n","import { Link } from \"./Link\";\n\nexport { Link } from \"./Link\";\nexport default Link;\n","const SUPPORTED_URL_PROTOCOLS = new Set([\n \"http:\",\n \"https:\",\n \"mailto:\",\n \"sms:\",\n \"tel:\",\n]);\n\nexport const sanitizeUrl = (url: string): string => {\n try {\n const parsedUrl = new URL(url);\n if (!SUPPORTED_URL_PROTOCOLS.has(parsedUrl.protocol)) {\n return \"about:blank\";\n }\n } catch {\n return url;\n }\n return url;\n};\n","import React from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { OrderedListIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport {\n INSERT_ORDERED_LIST_COMMAND,\n REMOVE_LIST_COMMAND,\n} from \"@lexical/list\";\n\nimport { LexicalCommand } from \"lexical\";\nimport { Button } from \"../../components\";\nimport { useEditorState } from \"../../hooks\";\n\nconst OrderedList: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state } = useEditorState();\n\n const onClick = (type: \"ul\" | \"ol\", command: LexicalCommand<unknown>) => {\n if (state.blockType !== type) {\n editor.dispatchCommand(command, undefined);\n } else {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n }\n };\n\n return (\n <Button\n aria-label=\"List Ordered\"\n onClick={() => onClick(\"ol\", INSERT_ORDERED_LIST_COMMAND)}\n selected={state.blockType === \"ol\"}\n >\n <Icon source={<OrderedListIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { OrderedList };\n","import { OrderedList } from \"./OrderedList\";\n\nexport { OrderedList } from \"./OrderedList\";\nexport default OrderedList;\n","import React from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { ListIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport {\n INSERT_UNORDERED_LIST_COMMAND,\n REMOVE_LIST_COMMAND,\n} from \"@lexical/list\";\n\nimport { LexicalCommand } from \"lexical\";\nimport { Button } from \"../../components\";\nimport { useEditorState } from \"../../hooks\";\n\nconst UnorderedList: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state } = useEditorState();\n\n const onClick = (type: \"ul\" | \"ol\", command: LexicalCommand<unknown>) => {\n if (state.blockType !== type) {\n editor.dispatchCommand(command, undefined);\n } else {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n }\n };\n\n return (\n <Button\n aria-label=\"List Unordered\"\n onClick={() => onClick(\"ul\", INSERT_UNORDERED_LIST_COMMAND)}\n selected={state.blockType === \"ul\"}\n >\n <Icon source={<ListIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { UnorderedList };\n","import { UnorderedList } from \"./UnorderedList\";\n\nexport { UnorderedList } from \"./UnorderedList\";\nexport default UnorderedList;\n","import React from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { PlayIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { UNDO_COMMAND } from \"lexical\";\nimport { Button } from \"../../components\";\n\nconst Video: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n return (\n <Button\n aria-label=\"Undo\"\n onClick={() => editor.dispatchCommand(UNDO_COMMAND, undefined)}\n >\n <Icon source={<PlayIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { Video };\n","import { Video } from \"./Video\";\n\nexport { Video } from \"./Video\";\nexport default Video;\n","export * from \"./Bold\";\nexport * from \"./ClearFormatting\";\nexport * from \"./Header\";\nexport * from \"./UnorderedList\";\nexport * from \"./Italic\";\nexport * from \"./History\";\nexport * from \"./Link\";\nexport * from \"./OrderedList\";\nexport * from \"./UnorderedList\";\nexport * from \"./Video\";\n","import React from \"react\";\nimport { Box } from \"@nimbus-ds/components\";\nimport { ButtonProps } from \"./button.types\";\n\nconst Button: React.FC<ButtonProps> = ({\n ref: _ref,\n backgroundColor,\n selected,\n ...props\n}) => (\n <Box\n as=\"button\"\n type=\"button\"\n data-id=\"button-toolbar\"\n backgroundColor={{\n hover: \"primary-surface\",\n xs: selected ? \"primary-surface\" : \"transparent\",\n }}\n pointerEvents={props.disabled ? \"none\" : \"auto\"}\n borderRadius=\"1\"\n cursor=\"pointer\"\n borderWidth=\"none\"\n color={props.disabled ? \"neutral-interactive\" : \"primary-interactive\"}\n height=\"32px\"\n minWidth=\"32px\"\n {...props}\n p=\"2\"\n />\n);\n\nexport { Button };\n","import { Button } from \"./Button\";\n\nexport { Button } from \"./Button\";\nexport default Button;\n","import React from \"react\";\nimport { Box } from \"@nimbus-ds/components\";\n\nconst Divider: React.FC = () => (\n <Box\n data-testid=\"divider-toolbar\"\n backgroundColor=\"neutral-surfaceHighlight\"\n borderRadius=\"1\"\n height=\"32px\"\n width=\"1px\"\n />\n);\n\nexport { Divider };\n","import { Divider } from \"./Divider\";\n\nexport { Divider } from \"./Divider\";\nexport default Divider;\n","import React from \"react\";\nimport { editor } from \"@nimbus-ds/styles\";\n\nimport { PlaceholderProps } from \"./placeholder.types\";\n\nconst Placeholder: React.FC<PlaceholderProps> = ({ text }) => {\n if (!text) return null;\n return <div className={editor.classnames.placeholder}>{text}</div>;\n};\n\nexport { Placeholder };\n","import { Placeholder } from \"./Placeholder\";\n\nexport { Placeholder } from \"./Placeholder\";\nexport default Placeholder;\n","import React, { useEffect, useState, useRef } from \"react\";\nimport { COMMAND_PRIORITY_CRITICAL, SELECTION_CHANGE_COMMAND } from \"lexical\";\nimport { Box, Icon, Text, Popover } from \"@nimbus-ds/components\";\nimport { EllipsisIcon } from \"@nimbus-ds/icons\";\nimport { mergeRegister } from \"@lexical/utils\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\n\nimport { headerTranslations } from \"../../actions/Header/header.definitions\";\nimport { EditorContext } from \"../../contexts\";\nimport { useToolbar } from \"../../hooks\";\nimport { Button } from \"../Button\";\nimport { ToolbarProps } from \"./toolbar.types\";\nimport { ELIPSIS_BUTTON, PADDING } from \"./toolbar.definitions\";\n\nconst Toolbar: React.FC<ToolbarProps> = ({ children, className }) => {\n const toolbarRef = useRef<HTMLDivElement>(null);\n const buttonRefs = useRef<HTMLDivElement[]>([]);\n\n const { calcButtonWidths, calcVisibleButtons, updateToolbar, context } =\n useToolbar();\n\n const [editor] = useLexicalComposerContext();\n const [activeEditor, setActiveEditor] = useState(editor);\n\n const [visibleButtons, setVisibleButtons] = useState<React.ReactNode[]>(\n React.Children.toArray(children)\n );\n const [buttonWidths, setButtonWidths] = useState<number[]>([]);\n const [hiddenButtons, setHiddenButtons] = useState<React.ReactNode[]>([]);\n\n useEffect(() => {\n setButtonWidths(calcButtonWidths(buttonRefs));\n }, [buttonRefs, calcButtonWidths]);\n\n const availableWidth =\n (toolbarRef.current?.clientWidth ?? 0) - (PADDING + ELIPSIS_BUTTON);\n\n useEffect(() => {\n const maxVisibleButtons = calcVisibleButtons(buttonWidths, availableWidth);\n const buttons = React.Children.toArray(children);\n setVisibleButtons(buttons.slice(0, maxVisibleButtons));\n setHiddenButtons(buttons.slice(maxVisibleButtons));\n }, [buttonWidths, availableWidth, calcVisibleButtons, children]);\n\n useEffect(\n () =>\n editor.registerCommand(\n SELECTION_CHANGE_COMMAND,\n (_payload, newEditor) => {\n updateToolbar();\n setActiveEditor(newEditor);\n return false;\n },\n COMMAND_PRIORITY_CRITICAL\n ),\n [editor, updateToolbar]\n );\n\n useEffect(() => {\n mergeRegister(\n activeEditor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n updateToolbar();\n });\n })\n );\n }, [updateToolbar, activeEditor]);\n\n return (\n <>\n <div ref={toolbarRef} className={className}>\n <EditorContext.Provider value={context}>\n <Box display=\"flex\" alignItems=\"center\" gap=\"2\" flexWrap=\"wrap\">\n {visibleButtons.map((button, index) => (\n <div\n key={`button-toolbar-${index}`} // eslint-disable-line react/no-array-index-key\n ref={(ref) => {\n if (ref) buttonRefs.current[index] = ref;\n }}\n >\n {button}\n </div>\n ))}\n </Box>\n {!!hiddenButtons.length && (\n <Popover\n width=\"fit-content\"\n maxWidth={`${(toolbarRef.current?.clientWidth ?? 0) - PADDING}px`}\n padding=\"small\"\n offset={8}\n content={\n <Box\n display=\"flex\"\n gap=\"2\"\n flexWrap=\"wrap\"\n justifyContent=\"flex-end\"\n >\n {hiddenButtons.filter(\n (child) =>\n !(child as unknown as { key: string })?.key.includes(\n \"divider\"\n )\n )}\n </Box>\n }\n arrow={false}\n position=\"bottom-end\"\n >\n <Button>\n <Icon source={<EllipsisIcon />} color=\"currentColor\" />\n </Button>\n </Popover>\n )}\n </EditorContext.Provider>\n </div>\n <Box\n display={{ xs: \"block\", md: \"none\" }}\n position=\"absolute\"\n bottom=\"0\"\n py=\"1\"\n px=\"2\"\n width=\"100%\"\n borderWidth=\"none\"\n borderTopWidth=\"1\"\n borderColor=\"neutral-surfaceHighlight\"\n borderStyle=\"solid\"\n >\n <Text fontSize=\"caption\" lineHeight=\"caption\">\n {headerTranslations[context.state.blockType]}\n </Text>\n </Box>\n </>\n );\n};\n\nexport { Toolbar };\n","import { Toolbar } from \"./Toolbar\";\n\nexport { Toolbar } from \"./Toolbar\";\nexport default Toolbar;\n","export const GAP = 16;\nexport const PADDING = 16;\nexport const ELIPSIS_BUTTON = 32;\n","export * from \"./Placeholder\";\nexport * from \"./Toolbar\";\nexport * from \"./Button\";\nexport * from \"./Divider\";\n","import { createContext } from \"react\";\nimport { EditorContextProps } from \"./editorContext.types\";\nimport { initialContext } from \"./editorContext.definitions\";\n\nexport const EditorContext = createContext<EditorContextProps>(\n initialContext as EditorContextProps\n);\n","export const initialContext = {\n state: {\n blockType: \"paragraph\",\n canUndo: false,\n canRedo: false,\n isBold: false,\n isLink: false,\n isItalic: false,\n },\n};\n","import { initialContext } from \"./editorContext.definitions\";\n\n// eslint-disable-next-line no-shadow\nexport enum EditorActionKind {\n BLOCK_TYPE = \"BLOCK_TYPE\",\n CAN_UNDO = \"CAN_UNDO\",\n CAN_REDO = \"CAN_REDO\",\n IS_BOLD = \"IS_BOLD\",\n IS_ITALIC = \"IS_ITALIC\",\n IS_LINK = \"IS_LINK\",\n}\n\nexport interface EditorAction {\n type: EditorActionKind;\n payload: any;\n}\n\nexport interface EditorContextProps {\n state: typeof initialContext.state;\n dispatch: (action: EditorAction) => void;\n}\n","import { EditorContext } from \"./EditorContext\";\n\nexport { EditorContext } from \"./EditorContext\";\nexport type { EditorContextProps, EditorAction } from \"./editorContext.types\";\nexport { EditorActionKind } from \"./editorContext.types\";\nexport { initialContext } from \"./editorContext.definitions\";\n\nexport default EditorContext;\n","export * from \"./EditorContext\";\n","import { link, text, list, title, editor } from \"@nimbus-ds/styles\";\nimport { EditorThemeClasses } from \"lexical\";\nimport { HeadingNode } from \"@lexical/rich-text\";\nimport { LinkNode } from \"@lexical/link\";\nimport { ListItemNode, ListNode } from \"@lexical/list\";\n\nimport {\n Bold,\n ClearFormatting,\n UnorderedList,\n OrderedList,\n Header,\n History,\n Italic,\n Link,\n Video,\n} from \"./actions\";\nimport { Module } from \"./editor.types\";\nimport { Divider } from \"./components\";\n\nconst joinClassNames = (classNames: string[]) => classNames.join(\" \");\n\nexport const defaultTheme: EditorThemeClasses = {\n heading: {\n h3: joinClassNames([\n title.classnames.base,\n title.classnames.appearance.h3,\n title.sprinkle({\n fontSize: \"6\",\n lineHeight: \"6\",\n color: \"primary-textHigh\",\n }),\n ]),\n h4: joinClassNames([\n title.classnames.base,\n title.classnames.appearance.h4,\n title.sprinkle({\n fontSize: \"5\",\n lineHeight: \"5\",\n color: \"primary-textHigh\",\n }),\n ]),\n },\n paragraph: joinClassNames([\n text.classnames.base,\n text.sprinkle({ color: \"neutral-textLow\" as \"$neutral-textLow\" })\n ?.className ?? \"\",\n ]),\n link: joinClassNames([\n link.classnames.appearance.primary,\n link.classnames.base,\n link.sprinkle({ textDecoration: \"none\" }),\n ]),\n list: {\n listitem: list.classnames.container__item,\n nested: {\n listitem: editor.classnames.nested_list__item,\n },\n ul: list.classnames.container,\n ol: list.classnames.container,\n },\n text: {\n italic: editor.classnames.text__italic,\n bold: joinClassNames([\n text.sprinkle({\n fontWeight: \"bold\" as \"$bold\",\n })?.className ?? \"\",\n ]),\n },\n};\n\nexport const aliasModules = {\n bold: Bold,\n clearFormating: ClearFormatting,\n orderedList: OrderedList,\n unorderedList: UnorderedList,\n header: Header,\n history: History,\n italic: Italic,\n link: Link,\n video: Video,\n divider: Divider,\n};\n\nexport const defaultModules: Module[] = [\n \"history\",\n \"divider\",\n \"header\",\n \"divider\",\n \"orderedList\",\n \"unorderedList\",\n \"divider\",\n \"bold\",\n \"italic\",\n \"link\",\n \"video\",\n \"divider\",\n \"clearFormating\",\n];\n\nexport const helpTextAppearance = {\n danger: \"danger-textLow\",\n warning: \"warning-textLow\",\n success: \"success-textLow\",\n none: \"neutral-textLow\",\n} as {\n [key: string]:\n | \"danger-textLow\"\n | \"warning-textLow\"\n | \"success-textLow\"\n | \"neutral-textLow\";\n};\n\nexport const editorAppearance = {\n danger: \"danger\",\n warning: \"warning\",\n success: \"success\",\n none: \"neutral\",\n} as {\n [key: string]: \"danger\" | \"warning\" | \"success\" | \"neutral\";\n};\n\nexport const nodes = [HeadingNode, ListNode, ListItemNode, LinkNode];\n","export { useEditor } from \"./useEditor\";\nexport { useEditorState } from \"./useEditorState\";\nexport { useToolbar } from \"./useToolbar\";\n","export { useEditor } from \"./useEditor\";\n","import { $getRoot, $insertNodes, LexicalEditor } from \"lexical\";\nimport { $generateNodesFromDOM } from \"@lexical/html\";\n\nexport const parserDOM = new DOMParser();\n\nexport const setContentHTML = (editor: LexicalEditor, value: string) => {\n const dom = parserDOM.parseFromString(value, \"text/html\");\n const nodes = $generateNodesFromDOM(editor, dom);\n $getRoot().select();\n $insertNodes(nodes);\n};\n\nexport const setContentJSON = (editor: LexicalEditor, value: string) => {\n const state = editor.parseEditorState(value);\n editor.setEditorState(state);\n};\n\nexport const isEmptyContent = () => {\n const root = $getRoot();\n return root?.getFirstChild?.()?.isEmpty() && root.getChildrenSize() === 1;\n};\n","import { EditorState, LexicalEditor } from \"lexical\";\nimport { $generateHtmlFromNodes } from \"@lexical/html\";\n\nimport { useEditorProps } from \"./useEditor.types\";\nimport {\n setContentHTML,\n setContentJSON,\n isEmptyContent,\n} from \"./useEditor.definitions\";\n\nexport const useEditor = ({\n parser,\n onChange: handleChange,\n}: useEditorProps) => {\n const setContent = (editor: LexicalEditor, value?: string) => {\n if (!value) return false;\n switch (parser) {\n case \"html\":\n return setContentHTML(editor, value);\n default:\n return setContentJSON(editor, value);\n }\n };\n\n const onChangeJSON = (editorState: EditorState) => {\n const editorContentJSON = editorState.toJSON();\n handleChange?.(JSON.stringify(editorContentJSON));\n return editorContentJSON;\n };\n\n const onChangeHTML = (editorState: EditorState, editor: LexicalEditor) => {\n const editorContentHtml = editorState.read(() => {\n if (isEmptyContent()) return \"\";\n return $generateHtmlFromNodes(editor);\n });\n handleChange?.(editorContentHtml);\n return editorContentHtml;\n };\n\n const onChangeEditor = (editorState: EditorState, editor: LexicalEditor) => {\n switch (parser) {\n case \"html\":\n return onChangeHTML(editorState, editor);\n default:\n return onChangeJSON(editorState);\n }\n };\n\n const onError = (error: Error) => {\n console.error(error);\n };\n\n return { setContent, onChangeEditor, onError };\n};\n","export { useEditorState } from \"./useEditorState\";\n","import { useContext } from \"react\";\n\nimport { EditorContext, EditorContextProps } from \"../../contexts\";\n\nexport const useEditorState: () => EditorContextProps = () => {\n const context = useContext(EditorContext);\n return context;\n};\n","export { useToolbar } from \"./useToolbar\";\n","import { ElementNode, RangeSelection, TextNode } from \"lexical\";\nimport { $isAtNodeEnd } from \"@lexical/selection\";\nimport { EditorAction, EditorActionKind, initialContext } from \"../../contexts\";\n\nexport const GAP = 16;\nexport const PADDING = 16;\nexport const ELIPSIS_BUTTON = 32;\n\nexport const reducer = (\n state: typeof initialContext.state,\n action: EditorAction\n) => {\n switch (action.type) {\n case EditorActionKind.BLOCK_TYPE:\n return {\n ...state,\n blockType: action.payload,\n };\n case EditorActionKind.CAN_REDO:\n return {\n ...state,\n canRedo: action.payload,\n };\n case EditorActionKind.CAN_UNDO:\n return {\n ...state,\n canUndo: action.payload,\n };\n case EditorActionKind.IS_BOLD:\n return {\n ...state,\n isBold: action.payload,\n };\n case EditorActionKind.IS_ITALIC:\n return {\n ...state,\n isItalic: action.payload,\n };\n case EditorActionKind.IS_LINK:\n return {\n ...state,\n isLink: action.payload,\n };\n default:\n return state;\n }\n};\n\nexport const getSelectedNode = (\n selection: RangeSelection\n): TextNode | ElementNode => {\n const { anchor } = selection;\n const { focus } = selection;\n const anchorNode = selection.anchor.getNode();\n const focusNode = selection.focus.getNode();\n if (anchorNode === focusNode) {\n return anchorNode;\n }\n const isBackward = selection.isBackward();\n if (isBackward) {\n return $isAtNodeEnd(focus) ? anchorNode : focusNode;\n }\n return $isAtNodeEnd(anchor) ? anchorNode : focusNode;\n};\n","import React, {\n useCallback,\n useEffect,\n useMemo,\n useReducer,\n useState,\n} from \"react\";\nimport { $getSelection, $isRangeSelection, RangeSelection } from \"lexical\";\nimport { $isLinkNode } from \"@lexical/link\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { $isListNode, ListNode } from \"@lexical/list\";\nimport { $isHeadingNode } from \"@lexical/rich-text\";\nimport { $getNearestNodeOfType } from \"@lexical/utils\";\n\nimport { GAP, getSelectedNode, reducer } from \"./useToolbar.definitions\";\nimport { EditorActionKind, initialContext } from \"../../contexts\";\n\nexport const useToolbar = () => {\n const [editor] = useLexicalComposerContext();\n const [windowWidth, setWindowWidth] = useState(window.innerWidth);\n const [state, dispatch] = useReducer(reducer, initialContext.state);\n\n const handleResize = () => {\n setWindowWidth(window.innerWidth);\n };\n\n useEffect(() => {\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n const calcButtonWidths = useCallback(\n (buttonRefs: React.MutableRefObject<HTMLDivElement[]>) => {\n const buttonWidths = buttonRefs.current.map(\n (ref: HTMLDivElement) => ref?.getBoundingClientRect().width\n );\n return buttonWidths;\n },\n []\n );\n\n const calcVisibleButtons = useCallback(\n (buttonWidths: number[], availableWidth: number) => {\n const visibleButtons = buttonWidths.reduce(\n (prev, curr) => {\n if (prev.totalWidthButtons + curr <= availableWidth) {\n prev.maxVisibleButtons += 1; // eslint-disable-line no-param-reassign\n prev.totalWidthButtons += Math.ceil(curr + GAP); // eslint-disable-line no-param-reassign\n }\n return prev;\n },\n { totalWidthButtons: 0, maxVisibleButtons: 0 }\n );\n return visibleButtons.maxVisibleButtons;\n },\n []\n );\n\n const updateToolbar = useCallback(() => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n const anchorNode = selection.anchor.getNode();\n const element =\n anchorNode.getKey() === \"root\"\n ? anchorNode\n : anchorNode.getTopLevelElementOrThrow();\n\n const elementKey = element.getKey();\n const elementDOM = editor.getElementByKey(elementKey);\n\n dispatch({\n type: EditorActionKind.IS_BOLD,\n payload: (selection as RangeSelection)?.hasFormat?.(\"bold\"),\n });\n\n dispatch({\n type: EditorActionKind.IS_ITALIC,\n payload: (selection as RangeSelection)?.hasFormat?.(\"italic\"),\n });\n\n const node = getSelectedNode(selection);\n const parent = node.getParent();\n\n dispatch({\n type: EditorActionKind.IS_LINK,\n payload: !!($isLinkNode(parent) || $isLinkNode(node)) ?? false,\n });\n\n if (elementDOM !== null) {\n if ($isListNode(element)) {\n const parentList = $getNearestNodeOfType(anchorNode, ListNode);\n const type = parentList ? parentList.getTag() : element.getTag();\n dispatch({\n type: EditorActionKind.BLOCK_TYPE,\n payload: type,\n });\n } else {\n const type = $isHeadingNode(element)\n ? element.getTag()\n : element.getType();\n\n dispatch({\n type: EditorActionKind.BLOCK_TYPE,\n payload: type,\n });\n }\n }\n }\n }, [editor]);\n\n const context = useMemo(\n () => ({\n state,\n dispatch,\n }),\n [state, dispatch]\n );\n\n return {\n windowWidth,\n calcButtonWidths,\n calcVisibleButtons,\n updateToolbar,\n context,\n };\n};\n","import { Editor } from \"./Editor\";\n\nexport { Editor } from \"./Editor\";\nexport type { EditorProps } from \"./editor.types\";\nexport default Editor;\n","import { useEffect } from \"react\";\nimport {\n $createParagraphNode,\n $getSelection,\n $isRangeSelection,\n $isTextNode,\n COMMAND_PRIORITY_NORMAL,\n} from \"lexical\";\nimport { $isHeadingNode, $isQuoteNode } from \"@lexical/rich-text\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { $isDecoratorBlockNode } from \"@lexical/react/LexicalDecoratorBlockNode\";\n\nimport { CLEAR_FORMATTING_COMMAND } from \"../../utils\";\nimport {\n clearNodeFormatting,\n isCursorAtTheSamePosition,\n} from \"./customClear.definitions\";\n\nconst CustomClearFormattingPlugin = () => {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n editor.registerCommand(\n CLEAR_FORMATTING_COMMAND,\n () => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n const { anchor, focus } = selection;\n const nodes = selection.getNodes();\n\n if (isCursorAtTheSamePosition(anchor, focus)) {\n return true;\n }\n\n nodes.forEach((node, idx) => {\n if ($isTextNode(node)) {\n if (idx === 0 && anchor.offset !== 0) {\n node = node.splitText(anchor.offset)[1] || node; // eslint-disable-line no-param-reassign\n }\n if (idx === nodes.length - 1) {\n node = node.splitText(focus.offset)[0] || node; // eslint-disable-line no-param-reassign\n }\n clearNodeFormatting(node);\n } else if ($isHeadingNode(node) || $isQuoteNode(node)) {\n node.replaceWith($createParagraphNode(), true);\n } else if ($isDecoratorBlockNode(node)) {\n clearNodeFormatting(node);\n }\n });\n }\n return true;\n },\n COMMAND_PRIORITY_NORMAL\n );\n }, [editor]);\n\n return null;\n};\n\nexport { CustomClearFormattingPlugin };\n","import { LexicalNode } from \"lexical\";\nimport { PointType } from \"lexical/LexicalSelection\";\nimport { $getNearestBlockElementAncestorOrThrow } from \"@lexical/utils\";\n\nexport const isCursorAtTheSamePosition = (\n anchor: PointType,\n focus: PointType\n) => anchor.key === focus.key && anchor.offset === focus.offset;\n\nexport const clearNodeFormatting = (node: LexicalNode) => {\n // eslint-disable-next-line no-underscore-dangle\n if (node.__style !== \"\") {\n node.setStyle(\"\");\n }\n // eslint-disable-next-line no-underscore-dangle\n if (node.__format !== 0) {\n node.setFormat(0);\n $getNearestBlockElementAncestorOrThrow(node).setFormat(\"\");\n }\n};\n","import { CustomClearFormattingPlugin } from \"./CustomClearFormattingPlugin\";\n\nexport { CustomClearFormattingPlugin } from \"./CustomClearFormattingPlugin\";\nexport default CustomClearFormattingPlugin;\n","import { useEffect } from \"react\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport {\n $getSelection,\n $isRangeSelection,\n COMMAND_PRIORITY_NORMAL,\n} from \"lexical\";\nimport { $setBlocksType } from \"@lexical/selection\";\nimport { HeadingTagType, $createHeadingNode } from \"@lexical/rich-text\";\nimport { FORMAT_HEADING_COMMAND } from \"../../utils\";\n\nconst CustomHeadingPlugin = () => {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n editor.registerCommand<HeadingTagType>(\n FORMAT_HEADING_COMMAND,\n (payload) => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n $setBlocksType(selection, () => $createHeadingNode(payload));\n }\n return true;\n },\n COMMAND_PRIORITY_NORMAL\n );\n }, [editor]);\n\n return null;\n};\n\nexport { CustomHeadingPlugin };\n","import { CustomHeadingPlugin } from \"./CustomHeadingPlugin\";\n\nexport { CustomHeadingPlugin } from \"./CustomHeadingPlugin\";\nexport default CustomHeadingPlugin;\n","import { useEffect } from \"react\";\nimport {\n $createParagraphNode,\n $getSelection,\n $isRangeSelection,\n COMMAND_PRIORITY_NORMAL,\n} from \"lexical\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\n\nimport { $setBlocksType } from \"@lexical/selection\";\nimport { FORMAT_PARAGRAPH_COMMAND } from \"../../utils\";\n\nconst CustomParagraphPlugin = () => {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n editor.registerCommand(\n FORMAT_PARAGRAPH_COMMAND,\n () => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n $setBlocksType(selection, () => $createParagraphNode());\n }\n return true;\n },\n COMMAND_PRIORITY_NORMAL\n );\n }, [editor]);\n\n return null;\n};\n\nexport { CustomParagraphPlugin };\n","import { CustomParagraphPlugin } from \"./CustomParagraphPlugin\";\n\nexport { CustomParagraphPlugin } from \"./CustomParagraphPlugin\";\nexport default CustomParagraphPlugin;\n","import React from \"react\";\nimport { TabIndentationPlugin } from \"@lexical/react/LexicalTabIndentationPlugin\";\nimport { LinkPlugin } from \"@lexical/react/LexicalLinkPlugin\";\nimport { ListPlugin } from \"@lexical/react/LexicalListPlugin\";\nimport { AutoFocusPlugin } from \"@lexical/react/LexicalAutoFocusPlugin\";\nimport { HistoryPlugin } from \"@lexical/react/LexicalHistoryPlugin\";\n\nconst DefaultPlugins: React.FC = () => (\n <>\n <ListPlugin />\n <LinkPlugin />\n <AutoFocusPlugin />\n <HistoryPlugin />\n <TabIndentationPlugin />\n </>\n);\n\nexport { DefaultPlugins };\n","import { DefaultPlugins } from \"./DefaultPlugins\";\n\nexport { DefaultPlugins } from \"./DefaultPlugins\";\nexport default DefaultPlugins;\n","export * from \"./CustomClearFormattingPlugin\";\nexport * from \"./CustomHeadingPlugin\";\nexport * from \"./CustomParagraphPlugin\";\nexport * from \"./DefaultPlugins\";\n","import { createCommand } from \"lexical\";\n\nexport const FORMAT_HEADING_COMMAND = createCommand(\"FORMAT_HEADING_COMMAND\");\nexport const FORMAT_PARAGRAPH_COMMAND = createCommand(\n \"FORMAT_PARAGRAPH_COMMAND\"\n);\nexport const CLEAR_FORMATTING_COMMAND = createCommand(\n \"CLEAR_FORMATING_COMMAND\"\n);\n","export * from \"./customCommands\";\n","import React from \"react\";\n\nimport { Box, Icon as NimbusIcon, Title, Text } from \"@nimbus-ds/components\";\n\nimport { EmptyMessageProps } from \"./emptyMessage.types\";\n\nconst EmptyMessage: React.FC<EmptyMessageProps> = ({\n className: _className,\n style: _style,\n illustration,\n icon,\n title,\n text,\n actions,\n ...rest\n}: EmptyMessageProps) => {\n const emptyMessageContent = (\n <Box\n {...rest}\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"1\"\n alignItems={{\n xs: \"center\",\n md: illustration ? \"flex-start\" : \"center\",\n }}\n >\n {icon && <NimbusIcon source={icon} />}\n <Title\n as={illustration ? \"h1\" : \"h4\"}\n textAlign={{\n xs: \"center\",\n md: \"left\"\n }}\n >\n {title}\n </Title>\n {text && <Text textAlign=\"center\">{text}</Text>}\n {actions && (\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n gap=\"4\"\n mt={illustration ? \"4\" : \"2\"}\n flexWrap=\"wrap\"\n >\n {actions}\n </Box>\n )}\n </Box>\n );\n return illustration ? (\n <Box\n display=\"flex\"\n flexDirection={{\n xs: \"column\",\n md: \"row\",\n }}\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n {illustration}\n {emptyMessageContent}\n </Box>\n ) : (\n emptyMessageContent\n );\n};\n\nEmptyMessage.displayName = \"EmptyMessage\";\n\nexport { EmptyMessage };\n","import { EmptyMessage } from \"./EmptyMessage\";\n\nexport { EmptyMessage } from \"./EmptyMessage\";\nexport type { EmptyMessageProps } from \"./emptyMessage.types\";\nexport default EmptyMessage;\n","import React from \"react\";\nimport { Box, Text, Icon, Label } from \"@nimbus-ds/components\";\n\nimport { FormFieldProps, FormFieldComponents } from \"./formField.types\";\nimport { helpTextAppearance } from \"./formField.definitions\";\n\nimport {\n FormFieldSelect,\n FormFieldTextarea,\n FormFieldInput,\n} from \"./components\";\n\nconst FormField: React.FC<FormFieldProps> & FormFieldComponents = ({\n label,\n helpText,\n helpIcon: IconSrc,\n appearance = \"none\",\n showHelpText = false,\n children,\n ...rest\n}: FormFieldProps) => (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"2\" width=\"100%\">\n {label && <Label htmlFor={rest.id}>{label}</Label>}\n {children}\n {showHelpText && (\n <Box display=\"inline-flex\" gap=\"1\">\n {IconSrc && (\n <Icon\n color={helpTextAppearance[appearance]}\n source={<IconSrc size={12} />}\n />\n )}\n {helpText && (\n <Text color={helpTextAppearance[appearance]} fontSize=\"caption\">\n {helpText}\n </Text>\n )}\n </Box>\n )}\n </Box>\n);\n\nFormField.displayName = \"FormField\";\n\nFormField.Select = FormFieldSelect;\nFormField.Textarea = FormFieldTextarea;\nFormField.Input = FormFieldInput;\nFormField.Select.displayName = \"FormField.Select\";\nFormField.Textarea.displayName = \"FormField.Textarea\";\nFormField.Input.displayName = \"FormField.Input\";\n\nexport { FormField };\n","import React from \"react\";\n\nimport { Input } from \"@nimbus-ds/components\";\n\nimport { FormField } from \"../../FormField\";\nimport { FormFieldInputProps } from \"./formFieldInput.types\";\nimport { inputAppearance } from \"../../formField.definitions\";\n\nconst FormFieldInput: React.FC<FormFieldInputProps> = ({\n label,\n helpText,\n helpIcon: IconSrc,\n appearance = \"none\",\n showHelpText = false,\n ...rest\n}) => (\n <FormField\n label={label}\n helpText={helpText}\n helpIcon={IconSrc}\n appearance={appearance}\n showHelpText={showHelpText}\n id={rest.id}\n >\n <Input {...rest} appearance={inputAppearance[appearance]} />\n </FormField>\n);\n\nexport { FormFieldInput };\n","import { FormFieldInput } from \"./FormFieldInput\";\n\nexport { FormFieldInput } from \"./FormFieldInput\";\nexport default FormFieldInput;\n","import React from \"react\";\n\nimport { Select } from \"@nimbus-ds/components\";\n\nimport { FormField } from \"../../FormField\";\nimport { FormFieldSelectProps } from \"./formFieldSelect.types\";\nimport { inputAppearance } from \"../../formField.definitions\";\n\nconst FormFieldSelect: React.FC<FormFieldSelectProps> = ({\n label,\n helpText,\n helpIcon: IconSrc,\n appearance = \"none\",\n showHelpText = false,\n ...rest\n}) => (\n <FormField\n label={label}\n helpText={helpText}\n helpIcon={IconSrc}\n appearance={appearance}\n showHelpText={showHelpText}\n id={rest.id}\n >\n <Select {...rest} appearance={inputAppearance[appearance]} />\n </FormField>\n);\n\nexport { FormFieldSelect };\n","import { FormFieldSelect } from \"./FormFieldSelect\";\n\nexport { FormFieldSelect } from \"./FormFieldSelect\";\nexport default FormFieldSelect;\n","import React from \"react\";\n\nimport { Textarea } from \"@nimbus-ds/components\";\n\nimport { FormField } from \"../../FormField\";\nimport { FormFieldTextareaProps } from \"./formFieldTextarea.types\";\nimport { inputAppearance } from \"../../formField.definitions\";\n\nconst FormFieldTextarea: React.FC<FormFieldTextareaProps> = ({\n label,\n helpText,\n helpIcon: IconSrc,\n appearance = \"none\",\n showHelpText = false,\n ...rest\n}) => (\n <FormField\n label={label}\n helpText={helpText}\n helpIcon={IconSrc}\n appearance={appearance}\n showHelpText={showHelpText}\n id={rest.id}\n >\n <Textarea {...rest} appearance={inputAppearance[appearance]} />\n </FormField>\n);\n\nexport { FormFieldTextarea };\n","import { FormFieldTextarea } from \"./FormFieldTextarea\";\n\nexport { FormFieldTextarea } from \"./FormFieldTextarea\";\nexport default FormFieldTextarea;\n","export * from \"./FormFieldSelect\";\nexport * from \"./FormFieldTextarea\";\nexport * from \"./FormFieldInput\";\n","export const inputAppearance = {\n danger: \"danger\",\n warning: \"warning\",\n success: \"success\",\n none: \"neutral\",\n} as {\n [key: string]: \"danger\" | \"warning\" | \"success\" | \"neutral\";\n};\n\nexport const helpTextAppearance = {\n danger: \"danger-textLow\",\n warning: \"warning-textLow\",\n success: \"success-textLow\",\n none: \"neutral-textLow\",\n} as {\n [key: string]:\n | \"danger-textLow\"\n | \"warning-textLow\"\n | \"success-textLow\"\n | \"neutral-textLow\";\n};\n","import { FormField } from \"./FormField\";\n\nexport { FormField } from \"./FormField\";\nexport type { FormFieldProps } from \"./formField.types\";\nexport default FormField;\n","import React from \"react\";\n\nimport { Box, Icon } from \"@nimbus-ds/components\";\nimport { QuestionCircleIcon } from \"@nimbus-ds/icons\";\n\nimport { HelpLinkProps } from \"./helpLink.types\";\n\nconst HelpLink: React.FC<HelpLinkProps> = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: HelpLinkProps) => (\n <Box\n {...rest}\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"2\"\n >\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n borderRadius=\"2\"\n width=\"2rem\"\n height=\"2rem\"\n minWidth=\"2rem\"\n minHeight=\"2rem\"\n backgroundColor=\"primary-surface\"\n >\n <Icon source={<QuestionCircleIcon />} color=\"primary-textLow\" />\n </Box>\n {children}\n </Box>\n);\n\nHelpLink.displayName = \"HelpLink\";\n\nexport { HelpLink };\n","import { HelpLink } from \"./HelpLink\";\n\nexport { HelpLink } from \"./HelpLink\";\nexport type { HelpLinkProps } from \"./helpLink.types\";\nexport default HelpLink;\n","import React from \"react\";\n\nimport { DataList } from \"@nimbus-ds/data-list\";\n\nimport {\n InteractiveListProps,\n InteractiveListComponents,\n} from \"./interactiveList.types\";\n\nimport {\n InteractiveListStructure,\n InteractiveListButtonItem,\n InteractiveListCheckboxItem,\n InteractiveListRadioItem,\n InteractiveListToggleItem,\n InteractiveListCheckboxItemSkeleton,\n InteractiveListStructureSkeleton,\n InteractiveListButtonItemSkeleton,\n InteractiveListRadioItemSkeleton,\n InteractiveListToggleItemSkeleton,\n} from \"./components\";\n\nconst InteractiveList: React.FC<InteractiveListProps> &\n InteractiveListComponents = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: InteractiveListProps) => (\n <DataList role=\"menu\" {...rest}>\n {children}\n </DataList>\n);\n\nInteractiveList.Structure = InteractiveListStructure;\nInteractiveList.StructureSkeleton = InteractiveListStructureSkeleton;\nInteractiveList.ButtonItem = InteractiveListButtonItem;\nInteractiveList.ButtonItemSkeleton = InteractiveListButtonItemSkeleton;\nInteractiveList.CheckboxItem = InteractiveListCheckboxItem;\nInteractiveList.CheckboxItemSkeleton = InteractiveListCheckboxItemSkeleton;\nInteractiveList.RadioItem = InteractiveListRadioItem;\nInteractiveList.RadioItemSkeleton = InteractiveListRadioItemSkeleton;\nInteractiveList.ToggleItem = InteractiveListToggleItem;\nInteractiveList.ToggleItemSkeleton = InteractiveListToggleItemSkeleton;\n\nInteractiveList.displayName = \"InteractiveList\";\nInteractiveList.Structure.displayName = \"InteractiveList.Structure\";\nInteractiveList.ButtonItem.displayName = \"InteractiveList.ButtonItem\";\nInteractiveList.CheckboxItem.displayName = \"InteractiveList.CheckboxItem\";\nInteractiveList.RadioItem.displayName = \"InteractiveList.RadioItem\";\nInteractiveList.ToggleItem.displayName = \"InteractiveList.ToggleItem\";\nInteractiveList.StructureSkeleton.displayName =\n \"InteractiveList.StructureSkeleton\";\nInteractiveList.ButtonItemSkeleton.displayName =\n \"InteractiveList.ButtonItemSkeleton\";\nInteractiveList.CheckboxItemSkeleton.displayName =\n \"InteractiveList.CheckboxItemSkeleton\";\nInteractiveList.RadioItemSkeleton.displayName =\n \"InteractiveList.RadioItemSkeleton\";\nInteractiveList.ToggleItemSkeleton.displayName =\n \"InteractiveList.ToggleItemSkeleton\";\n\nexport { InteractiveList };\n","import React from \"react\";\n\nimport { IconButton } from \"@nimbus-ds/components\";\nimport { ChevronRightIcon } from \"@nimbus-ds/icons\";\n\nimport { InteractiveListButtonItemProps } from \"./interactiveListButtonItem.types\";\nimport { InteractiveListStructure, InteractiveListRow } from \"..\";\nimport { generateID } from \"../../interactiveList.definitions\";\n\nconst InteractiveListButtonItem: React.FC<InteractiveListButtonItemProps> = ({\n className: _className,\n style: _style,\n iconButton,\n ...rest\n}: InteractiveListButtonItemProps) => {\n const itemID = generateID(rest.title);\n\n return (\n <InteractiveListRow\n alignItems=\"center\"\n role=\"menuitem\"\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n as=\"label\"\n htmlFor={itemID}\n topDivider={rest.topDivider}\n >\n <InteractiveListStructure {...rest} />\n <IconButton\n id={itemID}\n aria-label={rest.title}\n backgroundColor=\"transparent\"\n borderColor=\"transparent\"\n size=\"2rem\"\n source={<ChevronRightIcon />}\n {...iconButton}\n />\n </InteractiveListRow>\n );\n};\n\nexport { InteractiveListButtonItem };\n","import { InteractiveListButtonItem } from \"./InteractiveListButtonItem\";\n\nexport { InteractiveListButtonItem } from \"./InteractiveListButtonItem\";\nexport default InteractiveListButtonItem;\n","import React from \"react\";\n\nimport { IconButton } from \"@nimbus-ds/components\";\n\nimport { InteractiveListButtonItemSkeletonProps } from \"./interactiveListButtonItemSkeleton.types\";\nimport { InteractiveListRow } from \"..\";\nimport { InteractiveList } from \"../../InteractiveList\";\n\nconst InteractiveListButtonItemSkeleton: React.FC<\n InteractiveListButtonItemSkeletonProps\n> = ({\n className: _className,\n style: _style,\n ...rest\n}: InteractiveListButtonItemSkeletonProps) => (\n <InteractiveListRow>\n <InteractiveList.StructureSkeleton {...rest} />\n <IconButton.Skeleton />\n </InteractiveListRow>\n);\n\nexport { InteractiveListButtonItemSkeleton };\n","import { InteractiveListButtonItemSkeleton } from \"./InteractiveListButtonItemSkeleton\";\n\nexport { InteractiveListButtonItemSkeleton } from \"./InteractiveListButtonItemSkeleton\";\nexport default InteractiveListButtonItemSkeleton;\n","import React from \"react\";\n\nimport { Checkbox } from \"@nimbus-ds/components\";\n\nimport { InteractiveListCheckboxItemProps } from \"./interactiveListCheckboxItem.types\";\nimport { InteractiveListStructure, InteractiveListRow } from \"..\";\nimport { generateID } from \"../../interactiveList.definitions\";\n\nconst InteractiveListCheckboxItem: React.FC<\n InteractiveListCheckboxItemProps\n> = ({\n className: _className,\n style: _style,\n checkbox,\n ...rest\n}: InteractiveListCheckboxItemProps) => {\n const itemID = generateID(rest.title);\n\n return (\n <InteractiveListRow\n role=\"menuitemcheckbox\"\n aria-checked={checkbox.checked}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n as=\"label\"\n htmlFor={itemID}\n topDivider={rest.topDivider}\n >\n <Checkbox id={itemID} {...checkbox} />\n <InteractiveListStructure {...rest} />\n </InteractiveListRow>\n );\n};\n\nexport { InteractiveListCheckboxItem };\n","import { InteractiveListCheckboxItem } from \"./InteractiveListCheckboxItem\";\n\nexport { InteractiveListCheckboxItem } from \"./InteractiveListCheckboxItem\";\nexport default InteractiveListCheckboxItem;\n","import React from \"react\";\nimport { Skeleton } from \"@nimbus-ds/components\";\n\nimport { InteractiveListCheckboxItemSkeletonProps } from \"./interactiveListCheckboxItemSkeleton.types\";\nimport { InteractiveListRow } from \"..\";\nimport { InteractiveList } from \"../../InteractiveList\";\n\nconst InteractiveListCheckboxItemSkeleton: React.FC<\n InteractiveListCheckboxItemSkeletonProps\n> = ({\n className: _className,\n style: _style,\n ...rest\n}: InteractiveListCheckboxItemSkeletonProps) => (\n <InteractiveListRow role=\"menuitemcheckbox\">\n <Skeleton width=\"1rem\" height=\"1rem\" borderRadius=\"0.25rem\" />\n <InteractiveList.StructureSkeleton {...rest} />\n </InteractiveListRow>\n);\n\nexport { InteractiveListCheckboxItemSkeleton };\n","import { InteractiveListCheckboxItemSkeleton } from \"./InteractiveListCheckboxItemSkeleton\";\n\nexport { InteractiveListCheckboxItemSkeleton } from \"./InteractiveListCheckboxItemSkeleton\";\nexport default InteractiveListCheckboxItemSkeleton;\n","import React from \"react\";\n\nimport { Radio } from \"@nimbus-ds/components\";\n\nimport { InteractiveListRadioItemProps } from \"./interactiveListRadioItem.types\";\nimport { InteractiveListStructure, InteractiveListRow } from \"..\";\nimport { generateID } from \"../../interactiveList.definitions\";\n\nconst InteractiveListRadioItem: React.FC<InteractiveListRadioItemProps> = ({\n className: _className,\n style: _style,\n radio,\n ...rest\n}: InteractiveListRadioItemProps) => {\n const itemID = generateID(rest.title);\n\n return (\n <InteractiveListRow\n role=\"menuitemradio\"\n aria-checked={radio.checked}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n as=\"label\"\n htmlFor={itemID}\n topDivider={rest.topDivider}\n >\n <Radio id={itemID} {...radio} />\n <InteractiveListStructure {...rest} />\n </InteractiveListRow>\n );\n};\n\nexport { InteractiveListRadioItem };\n","import { InteractiveListRadioItem } from \"./InteractiveListRadioItem\";\n\nexport { InteractiveListRadioItem } from \"./InteractiveListRadioItem\";\nexport default InteractiveListRadioItem;\n","import React from \"react\";\nimport { Skeleton } from \"@nimbus-ds/components\";\n\nimport { InteractiveListRadioItemSkeletonProps } from \"./interactiveListRadioItemSkeleton.types\";\nimport { InteractiveListRow } from \"..\";\nimport { InteractiveList } from \"../../InteractiveList\";\n\nconst InteractiveListRadioItemSkeleton: React.FC<\n InteractiveListRadioItemSkeletonProps\n> = ({\n className: _className,\n style: _style,\n ...rest\n}: InteractiveListRadioItemSkeletonProps) => (\n <InteractiveListRow>\n <Skeleton width=\"1rem\" height=\"1rem\" borderRadius=\"0.75rem\" />\n <InteractiveList.StructureSkeleton {...rest} />\n </InteractiveListRow>\n);\n\nexport { InteractiveListRadioItemSkeleton };\n","import { InteractiveListRadioItemSkeleton } from \"./InteractiveListRadioItemSkeleton\";\n\nexport { InteractiveListRadioItemSkeleton } from \"./InteractiveListRadioItemSkeleton\";\nexport default InteractiveListRadioItemSkeleton;\n","import React from \"react\";\n\nimport { DataList } from \"@nimbus-ds/data-list\";\n\nimport { InteractiveListRowProps } from \"./interactiveListRow.types\";\n\nconst InteractiveListRow: React.FC<InteractiveListRowProps> = ({\n className: _className,\n style: _style,\n children,\n topDivider = true,\n ...rest\n}: InteractiveListRowProps) => (\n <DataList.Row\n flexDirection=\"row\"\n gap=\"2\"\n cursor=\"pointer\"\n alignItems=\"flex-start\"\n backgroundColor={{ hover: \"neutral-surface\" }}\n transitionDuration=\"fast\"\n transitionProperty=\"background-color\"\n transitionTimingFunction=\"ease-in-out\"\n boxShadow={{ focusWithin: \"focusRing\" }}\n borderWidth=\"none\"\n borderTopWidth={topDivider ? \"1\" : \"none\"}\n {...rest}\n >\n {children}\n </DataList.Row>\n);\n\nexport { InteractiveListRow };\n","import { InteractiveListRow } from \"./InteractiveListRow\";\n\nexport { InteractiveListRow } from \"./InteractiveListRow\";\nexport default InteractiveListRow;\n","import React from \"react\";\n\nimport { Box, Text } from \"@nimbus-ds/components\";\n\nimport { InteractiveListStructureProps } from \"./interactiveListStructure.types\";\n\nconst InteractiveListStructure: React.FC<InteractiveListStructureProps> = ({\n className: _className,\n style: _style,\n title,\n showTitle = true,\n description,\n children,\n ...rest\n}: InteractiveListStructureProps) => (\n <Box\n className={_className}\n style={_style}\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"1\"\n width=\"100%\"\n flex=\"1 1 auto\"\n {...rest}\n >\n {showTitle && <Text color=\"neutral-textHigh\">{title}</Text>}\n {description && (\n <Text fontSize=\"caption\" color=\"neutral-textLow\">\n {description}\n </Text>\n )}\n {children}\n </Box>\n);\n\nexport { InteractiveListStructure };\n","import { InteractiveListStructure } from \"./InteractiveListStructure\";\n\nexport { InteractiveListStructure } from \"./InteractiveListStructure\";\nexport default InteractiveListStructure;\n","import React from \"react\";\nimport { Box, Skeleton } from \"@nimbus-ds/components\";\n\nimport { InteractiveListStructureSkeletonProps } from \"./interactiveListStructureSkeleton.types\";\n\nconst InteractiveListStructureSkeleton: React.FC<\n InteractiveListStructureSkeletonProps\n> = ({\n className: _className,\n style: _style,\n title,\n showTitle = true,\n description,\n children,\n ...rest\n}: InteractiveListStructureSkeletonProps) => (\n <Box\n className={_className}\n style={_style}\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"1\"\n width=\"100%\"\n flex=\"1 1 auto\"\n {...rest}\n >\n {showTitle && (\n <Skeleton width=\"3rem\" height=\"1.25rem\" borderRadius=\"0.25rem\" />\n )}\n {description && (\n <Skeleton width=\"15rem\" height=\"1.25rem\" borderRadius=\"0.25rem\" />\n )}\n {children}\n </Box>\n);\n\nexport { InteractiveListStructureSkeleton };\n","import { InteractiveListStructureSkeleton } from \"./InteractiveListStructureSkeleton\";\n\nexport { InteractiveListStructureSkeleton } from \"./InteractiveListStructureSkeleton\";\nexport default InteractiveListStructureSkeleton;\n","import React from \"react\";\n\nimport { Toggle } from \"@nimbus-ds/components\";\n\nimport { InteractiveListToggleItemProps } from \"./interactiveListToggleItem.types\";\nimport { InteractiveListStructure, InteractiveListRow } from \"..\";\nimport { generateID } from \"../../interactiveList.definitions\";\n\nconst InteractiveListToggleItem: React.FC<InteractiveListToggleItemProps> = ({\n className: _className,\n style: _style,\n toggle,\n ...rest\n}: InteractiveListToggleItemProps) => {\n const itemID = generateID(rest.title);\n\n return (\n <InteractiveListRow\n role=\"menuitem\"\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n as=\"label\"\n htmlFor={itemID}\n topDivider={rest.topDivider}\n >\n <InteractiveListStructure {...rest} />\n <Toggle id={itemID} {...toggle} />\n </InteractiveListRow>\n );\n};\n\nexport { InteractiveListToggleItem };\n","import { InteractiveListToggleItem } from \"./InteractiveListToggleItem\";\n\nexport { InteractiveListToggleItem } from \"./InteractiveListToggleItem\";\nexport default InteractiveListToggleItem;\n","import React from \"react\";\nimport { Skeleton } from \"@nimbus-ds/components\";\n\nimport { InteractiveListToggleItemSkeletonProps } from \"./interactiveListToggleItemSkeleton.types\";\nimport { InteractiveListRow } from \"..\";\nimport { InteractiveList } from \"../../InteractiveList\";\n\nconst InteractiveListToggleItemSkeleton: React.FC<\n InteractiveListToggleItemSkeletonProps\n> = ({\n className: _className,\n style: _style,\n toggle,\n ...rest\n}: InteractiveListToggleItemSkeletonProps) => (\n <InteractiveListRow>\n <InteractiveList.StructureSkeleton {...rest} />\n <Skeleton\n width=\"2rem\"\n height=\"1rem\"\n borderRadius=\"0.5rem\"\n data-testid=\"toggle-skeleton\"\n />\n </InteractiveListRow>\n);\n\nexport { InteractiveListToggleItemSkeleton };\n","import { InteractiveListToggleItemSkeleton } from \"./InteractiveListToggleItemSkeleton\";\n\nexport { InteractiveListToggleItemSkeleton } from \"./InteractiveListToggleItemSkeleton\";\nexport default InteractiveListToggleItemSkeleton;\n","export * from \"./InteractiveListStructure\";\nexport * from \"./InteractiveListStructureSkeleton\";\nexport * from \"./InteractiveListCheckboxItem\";\nexport * from \"./InteractiveListCheckboxItemSkeleton\";\nexport * from \"./InteractiveListRadioItem\";\nexport * from \"./InteractiveListRadioItemSkeleton\";\nexport * from \"./InteractiveListToggleItem\";\nexport * from \"./InteractiveListToggleItemSkeleton\";\nexport * from \"./InteractiveListButtonItem\";\nexport * from \"./InteractiveListButtonItemSkeleton\";\nexport * from \"./InteractiveListRow\";\n","import { InteractiveList } from \"./InteractiveList\";\n\nexport { InteractiveList } from \"./InteractiveList\";\nexport type { InteractiveListProps } from \"./interactiveList.types\";\nexport default InteractiveList;\n","export const generateID = (name: string) =>\n `${name.toLowerCase().replace(/ /g, \"-\")}_${Math.floor(\n Math.random() * Date.now() + 1\n )}`;\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { LayoutSection } from \"./components\";\n\nimport { LayoutProps, LayoutComponents } from \"./layout.types\";\n\nimport { colQuantity } from \"./layout.definitions\";\n\nconst Layout: React.FC<LayoutProps> & LayoutComponents = ({\n className: _className,\n style: _style,\n children,\n columns = \"1\",\n ...rest\n}: LayoutProps) => (\n <Box\n {...rest}\n boxSizing=\"border-box\"\n display=\"grid\"\n gridTemplateColumns={{\n xs: \"1fr\",\n md: colQuantity[columns],\n }}\n gridGap={rest.gap || \"4\"}\n >\n {children}\n </Box>\n);\n\nLayout.Section = LayoutSection;\n\nLayout.displayName = \"Layout\";\nLayout.Section.displayName = \"Layout.Section\";\n\nexport { Layout };\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { LayoutSectionProps } from \"./layoutSection.types\";\n\nconst LayoutSection: React.FC<LayoutSectionProps> = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: LayoutSectionProps) => (\n <Box\n {...rest}\n boxSizing=\"border-box\"\n display=\"flex\"\n flexDirection=\"column\"\n gap={rest.gap || \"4\"}\n >\n {children}\n </Box>\n);\n\nexport { LayoutSection };\n","import { LayoutSection } from \"./LayoutSection\";\n\nexport { LayoutSection } from \"./LayoutSection\";\nexport default LayoutSection;\n","export * from \"./LayoutSection\";\n","import { Layout } from \"./Layout\";\n\nexport { Layout } from \"./Layout\";\nexport type { LayoutProps } from \"./layout.types\";\nexport default Layout;\n","export const colQuantity = {\n \"1\": \"1fr\",\n \"2 - asymmetric\": \"2fr 1fr\",\n \"2 - symmetric\": \"1fr 1fr\",\n \"3\": \"1fr 1fr 1fr\",\n} as {\n [key: string]: \"1fr\" | \"2fr 1fr\" | \"1fr 1fr\" | \"1fr 1fr 1fr\";\n};\n","import React from \"react\";\nimport { Box } from \"@nimbus-ds/components\";\nimport { MenuButton } from \"@nimbus-ds/menubutton\";\n\nimport { MenuProps, MenuComponents } from \"./menu.types\";\nimport { MenuSection, MenuHeader, MenuBody, MenuFooter } from \"./components\";\n\nconst Menu: React.FC<MenuProps> & MenuComponents = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: MenuProps) => (\n <Box\n {...rest}\n display=\"flex\"\n flexDirection=\"column\"\n flex=\"0 0 auto\"\n height=\"100%\"\n backgroundColor=\"neutral-background\"\n width=\"100%\"\n boxSizing=\"border-box\"\n >\n {children}\n </Box>\n );\n\nMenu.Section = MenuSection;\nMenu.Button = MenuButton;\nMenu.ButtonAccordion = MenuButton?.Accordion;\nMenu.Header = MenuHeader;\nMenu.Body = MenuBody;\nMenu.Footer = MenuFooter;\n\nMenu.displayName = \"Menu\";\nMenu.Section.displayName = \"Menu.Section\";\nMenu.Header.displayName = \"Menu.Header\";\nMenu.Body.displayName = \"Menu.Body\";\nMenu.Footer.displayName = \"Menu.Footer\";\n\nexport { Menu };\n","import React from \"react\";\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { MenuBodyProps } from \"./menuBody.types\";\n\nconst MenuBody: React.FC<MenuBodyProps> = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: MenuBodyProps) => (\n <Box\n {...rest}\n display=\"flex\"\n flexDirection=\"column\"\n flex=\"1 1 auto\"\n gap=\"2\"\n paddingX=\"2\"\n paddingY=\"4\"\n width=\"100%\"\n overflowY=\"auto\"\n boxSizing=\"border-box\"\n >\n {children}\n </Box>\n);\n\nexport { MenuBody };\n","import { MenuBody } from \"./MenuBody\";\n\nexport { MenuBody } from \"./MenuBody\";\nexport default MenuBody;\n","import React from \"react\";\nimport { ChevronRightIcon } from \"@nimbus-ds/icons\";\nimport { Box, Icon } from \"@nimbus-ds/components\";\nimport { MenuButton } from \"@nimbus-ds/menubutton\";\n\nimport { MenuFooterProps } from \"./menuFooter.types\";\n\nconst MenuFooter: React.FC<MenuFooterProps> = ({\n className: _className,\n style: _style,\n ...rest\n}: MenuFooterProps) => {\n const activeColor = rest.active ? \"primary-interactive\" : \"primary-textHigh\";\n const disabledColor = rest.disabled ? \"neutral-textDisabled\" : activeColor;\n\n return (\n <Box\n boxSizing=\"border-box\"\n display=\"flex\"\n flex=\"0 1 auto\"\n paddingX=\"2\"\n paddingY=\"4\"\n width=\"100%\"\n >\n <MenuButton {...rest}>\n <Icon source={<ChevronRightIcon />} color={disabledColor} />\n </MenuButton>\n </Box>\n );\n};\n\nexport { MenuFooter };\n","import { MenuFooter } from \"./MenuFooter\";\n\nexport { MenuFooter } from \"./MenuFooter\";\nexport default MenuFooter;\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { MenuHeaderProps } from \"./menuHeader.types\";\n\nconst MenuHeader: React.FC<MenuHeaderProps> = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: MenuHeaderProps) => (\n <Box\n {...rest}\n boxSizing=\"border-box\"\n display=\"flex\"\n flex=\"0 1 auto\"\n padding=\"4\"\n width=\"100%\"\n >\n {children}\n </Box>\n);\n\nexport { MenuHeader };\n","import { MenuHeader } from \"./MenuHeader\";\n\nexport { MenuHeader } from \"./MenuHeader\";\nexport default MenuHeader;\n","import React from \"react\";\n\nimport { Text, Box } from \"@nimbus-ds/components\";\n\nimport { MenuSectionProps } from \"./menuSection.types\";\n\nconst MenuSection: React.FC<MenuSectionProps> = ({\n className: _className,\n style: _style,\n title,\n children,\n ...rest\n}: MenuSectionProps) => (\n <Box {...rest} display=\"flex\" flexDirection=\"column\" gap=\"2\">\n {title && (\n <Box pl=\"2\" pt=\"2\">\n <Text color=\"neutral-textHigh\" fontSize=\"caption\">\n {title}\n </Text>\n </Box>\n )}\n {children}\n </Box>\n);\n\nexport { MenuSection };\n","import { MenuSection } from \"./MenuSection\";\n\nexport { MenuSection } from \"./MenuSection\";\nexport default MenuSection;\n","export * from \"./MenuHeader\";\nexport * from \"./MenuBody\";\nexport * from \"./MenuFooter\";\nexport * from \"./MenuSection\";\n","import { Menu } from \"./Menu\";\n\nexport { Menu } from \"./Menu\";\nexport type { MenuProps } from \"./menu.types\";\nexport default Menu;\n","import React, { ComponentPropsWithRef, forwardRef } from \"react\";\n\nimport { Text, Icon, Box } from \"@nimbus-ds/components\";\nimport { PolymorphicForwardRefComponent } from \"@nimbus-ds/typings\";\n\nimport { MenuButtonBaseProps, MenuButtonComponents } from \"./menuButton.types\";\nimport { MenuButtonAccordion } from \"./components\";\n\nconst MenuButton = forwardRef(\n (\n {\n className: _className,\n style: _style,\n label,\n onClick,\n startIcon: IconSrc,\n children,\n active = false,\n as = \"button\",\n ...rest\n }: MenuButtonBaseProps & { as: any },\n ref\n ) => {\n const activeColor = active ? \"primary-interactive\" : \"primary-textHigh\";\n const disabledColor = rest.disabled ? \"neutral-textDisabled\" : activeColor;\n\n return (\n <Box\n {...rest}\n ref={ref}\n as={as}\n type=\"button\"\n onClick={onClick}\n alignItems=\"center\"\n textDecoration=\"none\"\n backgroundColor={{\n xs: active ? \"primary-surface\" : \"transparent\",\n hover: \"primary-surface\",\n active: \"primary-surfaceHighlight\",\n disabled: \"neutral-surfaceDisabled\",\n }}\n boxShadow={{\n focus: \"focusRing\",\n }}\n borderRadius=\"2\"\n borderWidth=\"none\"\n cursor={{\n xs: \"pointer\",\n disabled: \"not-allowed\",\n }}\n display=\"flex\"\n gap=\"2\"\n padding=\"2\"\n width=\"100%\"\n transitionProperty=\"all\"\n transitionDuration=\"base\"\n transitionTimingFunction=\"ease-in-out\"\n >\n {IconSrc && <Icon color={disabledColor} source={<IconSrc />} />}\n <Box display=\"inline-flex\" flex=\"1\">\n <Text fontSize=\"base\" color={disabledColor}>\n {label}\n </Text>\n </Box>\n {children}\n </Box>\n );\n }\n) as PolymorphicForwardRefComponent<\"button\" | \"a\", MenuButtonBaseProps> &\n MenuButtonComponents;\n\nMenuButton.Accordion = MenuButtonAccordion;\n\nMenuButton.displayName = \"MenuButton\";\nMenuButton.Accordion.displayName = \"MenuButton.Accordion\";\n\nexport type MenuButtonProps = ComponentPropsWithRef<typeof MenuButton>;\nexport { MenuButton };\n","import React, {\n ComponentPropsWithRef,\n forwardRef,\n useMemo,\n useState,\n} from \"react\";\nimport { Box } from \"@nimbus-ds/components\";\nimport { PolymorphicForwardRefComponent } from \"@nimbus-ds/typings\";\n\nimport { MenuButtonAccordionBaseProps } from \"./menuButtonAccordion.types\";\nimport { MenuButton } from \"../../MenuButton\";\n\nconst MenuButtonAccordion = forwardRef(\n (\n {\n className: _className,\n style: _style,\n open: controlledOpen,\n active,\n menuButton,\n children,\n as,\n ...rest\n }: MenuButtonAccordionBaseProps & { as: any },\n ref\n ) => {\n const [isOpen, setOpen] = useState(false);\n const handleOpen = () => setOpen((prevState) => !prevState);\n\n const open = useMemo(\n () => (controlledOpen === undefined ? isOpen : controlledOpen),\n [controlledOpen, isOpen]\n );\n\n const getBackgroundColor = () => {\n if (active) {\n return \"primary-surface\";\n }\n return open ? \"neutral-surface\" : \"transparent\";\n };\n\n return (\n <Box\n {...rest}\n ref={ref}\n as={as}\n backgroundColor={getBackgroundColor()}\n borderRadius=\"2\"\n zIndex={open ? \"100\" : undefined}\n textDecoration=\"none\"\n >\n <MenuButton\n {...menuButton}\n onClick={\n controlledOpen !== undefined ? menuButton.onClick : handleOpen\n }\n active={active}\n aria-expanded={open}\n />\n {open && (\n <Box\n id=\"content-1\"\n aria-hidden={!open}\n height={open ? \"auto\" : \"0\"}\n overflow=\"hidden\"\n pl=\"6\"\n pt=\"1\"\n pb=\"1\"\n pr=\"1\"\n >\n {children}\n </Box>\n )}\n </Box>\n );\n }\n) as PolymorphicForwardRefComponent<\n \"button\" | \"a\",\n MenuButtonAccordionBaseProps\n>;\n\nMenuButtonAccordion.displayName = \"MenuButtonAccordion\";\nexport type MenuButtonAccordionProps = ComponentPropsWithRef<\n typeof MenuButtonAccordion\n>;\n\nexport { MenuButtonAccordion };\n","import { MenuButtonAccordion } from \"./MenuButtonAccordion\";\n\nexport { MenuButtonAccordion } from \"./MenuButtonAccordion\";\nexport type { MenuButtonAccordionProperties } from \"./menuButtonAccordion.types\";\nexport type { MenuButtonAccordionProps } from \"./MenuButtonAccordion\";\nexport default MenuButtonAccordion;\n","export * from \"./MenuButtonAccordion\";\n","import { MenuButton } from \"./MenuButton\";\n\nexport { MenuButton } from \"./MenuButton\";\nexport type { MenuButtonProperties } from \"./menuButton.types\";\nexport type { MenuButtonProps } from \"./MenuButton\";\nexport default MenuButton;\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { NavTabsProps, NavTabsComponents } from \"./navTabs.types\";\n\nimport { NavTabsItem } from \"./components\";\n\nconst NavTabs: React.FC<NavTabsProps> & NavTabsComponents = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: NavTabsProps) => (\n <Box\n {...rest}\n className={_className}\n style={_style}\n alignItems=\"center\"\n backgroundColor=\"neutral-background\"\n borderStyle=\"solid\"\n borderWidth=\"none\"\n borderTopWidth=\"1\"\n borderColor=\"neutral-surfaceHighlight\"\n bottom=\"0\"\n display=\"flex\"\n justifyContent=\"space-between\"\n left=\"0\"\n position=\"fixed\"\n px=\"4\"\n py=\"2\"\n width=\"100%\"\n zIndex=\"500\"\n >\n {children}\n </Box>\n);\n\nNavTabs.Item = NavTabsItem;\n\nNavTabs.displayName = \"NavTabs\";\nNavTabs.Item.displayName = \"NavTabs.Item\";\n\nexport { NavTabs };\n","import React from \"react\";\n\nimport { Icon, Box } from \"@nimbus-ds/components\";\n\nimport { NavTabsItemProps } from \"./navTabsItem.types\";\n\nconst NavTabsItem: React.FC<NavTabsItemProps> = ({\n className: _className,\n style: _style,\n icon,\n active = false,\n badge = false,\n onClick,\n ariaLabel,\n ...rest\n}: NavTabsItemProps) => (\n <Box\n {...rest}\n className={_className}\n style={_style}\n backgroundColor={active ? \"primary-surface\" : \"transparent\"}\n borderColor=\"transparent\"\n borderRadius=\"2\"\n cursor=\"pointer\"\n as=\"button\"\n type=\"button\"\n p=\"2-5\"\n position=\"relative\"\n onClick={onClick}\n aria-label={ariaLabel}\n >\n <Icon\n source={icon}\n color={active ? \"primary-interactive\" : \"primary-textLow\"}\n />\n {badge && (\n <Box\n borderRadius=\"full\"\n backgroundColor=\"primary-interactive\"\n height=\".25rem\"\n position=\"absolute\"\n right=\".25rem\"\n top=\".25rem\"\n width=\".25rem\"\n />\n )}\n </Box>\n);\n\nexport { NavTabsItem };\n","import { NavTabsItem } from \"./NavTabsItem\";\n\nexport { NavTabsItem } from \"./NavTabsItem\";\nexport default NavTabsItem;\n","export * from \"./NavTabsItem\";\n","import { NavTabs } from \"./NavTabs\";\n\nexport { NavTabs } from \"./NavTabs\";\nexport type { NavTabsProps } from \"./navTabs.types\";\nexport default NavTabs;\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { PageComponents, PageProps } from \"./page.types\";\nimport { PageBody, PageHeader } from \"./components\";\n\nconst Page: React.FC<PageProps> & PageComponents = ({\n className: _className,\n style: _style,\n children,\n maxWidth = \"1200px\",\n ...rest\n}: PageProps) => (\n <Box as=\"main\" {...rest} width=\"100%\" maxWidth={maxWidth} marginX=\"auto\">\n {children}\n </Box>\n);\n\nPage.Header = PageHeader;\nPage.Body = PageBody;\n\nPage.displayName = \"Page\";\nPage.Header.displayName = \"Page.Header\";\nPage.Body.displayName = \"Page.Body\";\n\nexport { Page };\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { PageBodyProps } from \"./pageBody.types\";\n\nconst PageBody: React.FC<PageBodyProps> = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: PageBodyProps) => (\n <Box as=\"section\" paddingY=\"4\" paddingX=\"6\" {...rest}>\n {children}\n </Box>\n);\n\nexport { PageBody };\n","import { PageBody } from \"./PageBody\";\n\nexport { PageBody } from \"./PageBody\";\nexport default PageBody;\n","import React from \"react\";\n\nimport { Box, Title, Text } from \"@nimbus-ds/components\";\n\nimport { PageHeaderProps } from \"./pageHeader.types\";\n\nconst PageHeader: React.FC<PageHeaderProps> = ({\n className: _className,\n style: _style,\n title,\n subtitle,\n buttonStack,\n children,\n ...rest\n}: PageHeaderProps) => (\n <Box\n as=\"header\"\n paddingY=\"4\"\n paddingX=\"6\"\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"4\"\n {...rest}\n >\n <Box display=\"flex\" alignItems=\"center\" gap=\"2\">\n <Box display=\"inline-flex\" flex=\"1\">\n <Title as=\"h1\">{title}</Title>\n </Box>\n {buttonStack}\n </Box>\n {subtitle && (\n <Text color=\"neutral-textHigh\" fontSize=\"base\">\n {subtitle}\n </Text>\n )}\n {children}\n </Box>\n);\n\nexport { PageHeader };\n","import { PageHeader } from \"./PageHeader\";\n\nexport { PageHeader } from \"./PageHeader\";\nexport default PageHeader;\n","export * from \"./PageHeader\";\nexport * from \"./PageBody\";\n","import { Page } from \"./Page\";\n\nexport { Page } from \"./Page\";\nexport type { PageProps } from \"./page.types\";\nexport default Page;\n","import React, { useState } from \"react\";\n\nimport {\n Text,\n Link,\n Box,\n IconButton,\n Icon,\n Popover,\n} from \"@nimbus-ds/components\";\nimport { CloseIcon } from \"@nimbus-ds/icons\";\nimport { ProductUpdatesProps } from \"./productUpdates.types\";\n\nconst ProductUpdates: React.FC<ProductUpdatesProps> = ({\n className: _className,\n style: _style,\n title,\n text,\n bodyContent,\n dismissLink,\n ...rest\n}: ProductUpdatesProps) => {\n const [visible, setVisibility] = useState(!!rest.visible);\n\n const handleVisibility = () => setVisibility(!visible);\n\n const productUpdatesContent = (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"2\" width=\"100%\">\n <Text color=\"neutral-background\" fontSize=\"base\" fontWeight=\"bold\">\n {title}\n </Text>\n <Text color=\"neutral-background\" fontSize=\"base\">\n {text}\n </Text>\n </Box>\n );\n\n const hasDismissLink = dismissLink ? (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"4\" width=\"100%\">\n {productUpdatesContent}\n {bodyContent}\n <Link\n as=\"button\"\n onClick={\n rest?.onVisibility\n ? () => rest?.onVisibility?.(false)\n : handleVisibility\n }\n appearance=\"neutral-background\"\n >\n {dismissLink}\n </Link>\n </Box>\n ) : (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"4\" width=\"100%\">\n <Box pr=\"8\" position=\"relative\">\n {productUpdatesContent}\n <Box position=\"absolute\" top=\"-16px\" right=\"-16px\">\n <IconButton\n onClick={\n rest?.onVisibility\n ? () => rest?.onVisibility?.(false)\n : handleVisibility\n }\n size=\"2.75rem\"\n source={<Icon color=\"neutral-background\" source={<CloseIcon />} />}\n borderColor=\"transparent\"\n backgroundColor=\"transparent\"\n />\n </Box>\n </Box>\n {bodyContent}\n </Box>\n );\n\n return (\n <Popover\n {...rest}\n backgroundColor=\"primary-interactiveHover\"\n content={hasDismissLink}\n visible={rest.visible === undefined ? visible : rest.visible}\n onVisibility={\n rest.onVisibility ||\n ((newVisible: boolean) => setVisibility(newVisible))\n }\n enabledDismiss={false}\n enabledClick={false}\n />\n );\n};\n\nProductUpdates.displayName = \"ProductUpdates\";\n\nexport { ProductUpdates };\n","import { ProductUpdates } from \"./ProductUpdates\";\n\nexport { ProductUpdates } from \"./ProductUpdates\";\nexport type { ProductUpdatesProps } from \"./productUpdates.types\";\nexport default ProductUpdates;\n","import React from \"react\";\nimport { Sidebar, Box, Title, Button } from \"@nimbus-ds/components\";\n\nimport { SideModalProps } from \"./sideModal.types\";\n\nconst SideModal: React.FC<SideModalProps> = ({\n title,\n titleAction,\n headerAction,\n headerIcon,\n paddingHeader,\n paddingBody,\n paddingFooter,\n footer,\n children,\n ...rest\n}) => (\n <Sidebar {...rest}>\n <Sidebar.Header padding={paddingHeader || \"base\"}>\n <Box\n display=\"flex\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n mb=\"4\"\n >\n {headerAction}\n {headerIcon}\n </Box>\n <Box display=\"flex\" justifyContent=\"space-between\" alignItems=\"center\">\n <Title color=\"primary-textHigh\" as=\"h1\">\n {title}\n </Title>\n {titleAction}\n </Box>\n </Sidebar.Header>\n <Sidebar.Body padding={paddingBody}>{children}</Sidebar.Body>\n {!!footer && (\n <Sidebar.Footer padding={paddingFooter || \"base\"}>\n <Button {...footer.primaryAction} />\n <Button {...footer.secondaryAction} />\n </Sidebar.Footer>\n )}\n </Sidebar>\n);\n\nSideModal.displayName = \"SideModal\";\n\nexport { SideModal };\n","import { SideModal } from \"./SideModal\";\n\nexport { SideModal } from \"./SideModal\";\nexport type { SideModalProps } from \"./sideModal.types\";\nexport default SideModal;\n","import React from \"react\";\n\nimport { Thumbnail, Box } from \"@nimbus-ds/components\";\n\nimport { ThumbnailWithActionProps } from \"./thumbnailWithAction.types\";\n\nimport { contentPositions } from \"./thumbnailWithAction.definitions\";\n\nconst ThumbnailWithAction: React.FC<ThumbnailWithActionProps> = ({\n className: _className,\n style: _style,\n thumbnail,\n children,\n contentPosition = \"top-right\",\n ...rest\n}: ThumbnailWithActionProps) => {\n const { top, left, right, bottom } = contentPositions[contentPosition];\n\n return (\n <Box\n position=\"relative\"\n width=\"fit-content\"\n borderRadius=\"2\"\n overflow=\"hidden\"\n >\n <Box\n {...rest}\n style={_style}\n className={_className}\n position=\"absolute\"\n zIndex=\"100\"\n top={top}\n left={left}\n right={right}\n bottom={bottom}\n p=\"2\"\n >\n {children}\n </Box>\n <Thumbnail {...thumbnail} />\n </Box>\n );\n};\n\nThumbnailWithAction.displayName = \"ThumbnailWithAction\";\n\nexport { ThumbnailWithAction };\n","import { ThumbnailWithAction } from \"./ThumbnailWithAction\";\n\nexport { ThumbnailWithAction } from \"./ThumbnailWithAction\";\nexport type { ThumbnailWithActionProps } from \"./thumbnailWithAction.types\";\nexport default ThumbnailWithAction;\n","export const contentPositions = {\n \"top-left\": { top: \"0\", left: \"0\", right: undefined, bottom: undefined },\n \"top-right\": { top: \"0\", left: undefined, right: \"0\", bottom: undefined },\n \"bottom-left\": { top: undefined, left: \"0\", right: undefined, bottom: \"0\" },\n \"bottom-right\": { top: undefined, left: undefined, right: \"0\", bottom: \"0\" },\n};\n","// components\nexport * from \"@nimbus-ds/app-shell\";\nexport * from \"@nimbus-ds/callout-card\";\nexport * from \"@nimbus-ds/data-list\";\nexport * from \"@nimbus-ds/data-table\";\nexport * from \"@nimbus-ds/editor\";\nexport * from \"@nimbus-ds/empty-message\";\nexport * from \"@nimbus-ds/formfield\";\nexport * from \"@nimbus-ds/help-link\";\nexport * from \"@nimbus-ds/interactive-list\";\nexport * from \"@nimbus-ds/layout\";\nexport * from \"@nimbus-ds/menu\";\nexport * from \"@nimbus-ds/menubutton\";\nexport * from \"@nimbus-ds/nav-tabs\";\nexport * from \"@nimbus-ds/page\";\nexport * from \"@nimbus-ds/productupdates\";\nexport * from \"@nimbus-ds/sidemodal\";\nexport * from \"@nimbus-ds/thumbnail-with-action\";\nexport * from \"@nimbus-ds/calendar\";\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","module.exports = __WEBPACK_EXTERNAL_MODULE__nimbus_ds_components__;","module.exports = __WEBPACK_EXTERNAL_MODULE__nimbus_ds_icons__;","module.exports = __WEBPACK_EXTERNAL_MODULE__nimbus_ds_styles__;","module.exports = __WEBPACK_EXTERNAL_MODULE_date_fns__;","module.exports = __WEBPACK_EXTERNAL_MODULE_lexical__;","module.exports = __WEBPACK_EXTERNAL_MODULE_react__;","module.exports = __WEBPACK_EXTERNAL_MODULE_react_day_picker__;","module.exports = __WEBPACK_EXTERNAL_MODULE_react_dom__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/index.ts\");\n"],"names":["root","factory","exports","module","require","define","amd","global","__WEBPACK_EXTERNAL_MODULE_react__","__WEBPACK_EXTERNAL_MODULE__nimbus_ds_components__","__WEBPACK_EXTERNAL_MODULE__nimbus_ds_icons__","__WEBPACK_EXTERNAL_MODULE__nimbus_ds_styles__","__WEBPACK_EXTERNAL_MODULE_lexical__","__WEBPACK_EXTERNAL_MODULE_react_dom__","__WEBPACK_EXTERNAL_MODULE_react_day_picker__","__WEBPACK_EXTERNAL_MODULE_date_fns__","html","selection","utils","lexical","CAN_USE_DOM","window","document","createElement","getDOMSelection","targetWindow","getSelection","$getHtmlContent","editor","$getSelection","Error","$isRangeSelection","isCollapsed","getNodes","length","$generateHtmlFromNodes","$getLexicalContent","JSON","stringify","$generateJSONFromSelectedNodes","$insertGeneratedNodes","nodes","DEPRECATED_$isGridSelection","$findMatchingParent","anchor","getNode","n","DEPRECATED_$isGridCellNode","focus","DEPRECATED_$isGridNode","isFromLexical","newGrid","newGridRows","getChildren","newColumnCount","getFirstChildOrThrow","getChildrenSize","newRowCount","gridCellNode","gridRowNode","DEPRECATED_$isGridRowNode","gridNode","startY","getIndexWithinParent","stopY","Math","min","startX","stopX","fromX","fromY","toX","max","toY","gridRowNodes","newAnchorCellKey","newFocusCellKey","newRowIdx","r","currentGridRowNode","newGridRowNode","gridCellNodes","newGridCellNodes","newColumnIdx","c","currentGridCellNode","newGridCellNode","getKey","originalChildren","forEach","child","$isTextNode","$createParagraphNode","append","remove","newGridSelection","DEPRECATED_$createGridSelection","set","$setSelection","dispatchCommand","SELECTION_CHANGE_COMMAND","undefined","$mergeGridNodesStrategy","topLevelBlocks","currentBlock","i","node","isLineBreakNode","$isLineBreakNode","$isDecoratorNode","isInline","$isElementNode","isParentRequired","createParentElementNode","push","insertNodes","anchorCell","$basicInsertStrategy","$appendNodesToJSON","selection$1","currentNode","targetArray","shouldInclude","isSelected","shouldExclude","excludeFromCopy","target","clone","$cloneWithProperties","$sliceSelectedTextNodeContent","children","serializedNode","exportJSON","nodeClass","constructor","type","getType","name","serializedChildren","Array","isArray","exportNodeToJSON","text","__text","childNode","shouldIncludeChild","extractWithChild","serializedChildNode","topLevelChildren","$getRoot","namespace","_config","$generateNodesFromSerializedNodes","serializedNodes","$parseSerializedNode","$addNodeStyle","clipboardEventTimeout","$copyToClipboardEvent","event","domSelection","_window","anchorDOM","anchorNode","focusDOM","focusNode","isSelectionWithinEditor","preventDefault","clipboardData","htmlString","lexicalString","plainString","getTextContent","setData","$insertDataTransferForPlainText","dataTransfer","getData","insertRawText","$insertDataTransferForRichText","payload","parse","dom","DOMParser","parseFromString","$generateNodesFromDOM","parts","split","partsLength","part","insertParagraph","$createTabNode","insertText","copyToClipboard","async","Promise","resolve","reject","update","rootElement","getRootElement","windowDocument","element","style","cssText","createTextNode","range","Range","setStart","setEnd","removeAllRanges","addRange","removeListener","registerCommand","COPY_COMMAND","secondEvent","objectKlassEquals","ClipboardEvent","clearTimeout","COMMAND_PRIORITY_CRITICAL","setTimeout","execCommand","LexicalClipboard","registerDragonSupport","origin","location","handler","activeElement","data","parsedData","e","protocol","functionId","args","elementStart","elementLength","selStart","selLength","formatCommand","setSelStart","setSelEnd","setTextNodeRange","anchorNodeTextLength","getTextContentSize","stopImmediatePropagation","addEventListener","removeEventListener","LexicalDragon","HISTORY_MERGE","HISTORY_PUSH","DISCARD_HISTORY_CANDIDATE","OTHER","COMPOSING_CHARACTER","INSERT_CHARACTER_AFTER_SELECTION","DELETE_CHARACTER_BEFORE_SELECTION","DELETE_CHARACTER_AFTER_SELECTION","getChangeType","prevEditorState","nextEditorState","dirtyLeavesSet","dirtyElementsSet","isComposing","size","nextSelection","_selection","prevSelection","dirtyNodes","editorState","dirtyLeaves","dirtyElements","nodeMap","_nodeMap","dirtyLeafKey","dirtyLeaf","get","dirtyElementKey","intentionallyMarkedAsDirty","dirtyElement","$isRootNode","getDirtyNodes","nextNodeMap","nextAnchorNode","key","prevAnchorNode","has","__key","offset","nextDirtyNode","prevDirtyNode","__mode","prevText","nextText","nextAnchor","prevAnchor","nextAnchorOffset","prevAnchorOffset","textDiff","createMergeActionGetter","delay","prevChangeTime","Date","now","prevChangeType","currentHistoryEntry","tags","changeTime","changeType","mergeAction","isSameEditor","shouldPushHistory","prevNode","nextNode","isDeletingLine","__type","__detail","__style","__format","__parent","isTextNodeUnchanged","from","clearHistory","historyState","undoStack","redoStack","current","createEmptyHistoryState","registerHistory","getMergeAction","applyChange","currentEditorState","CAN_REDO_COMMAND","CAN_UNDO_COMMAND","unregisterCommandListener","mergeRegister","UNDO_COMMAND","historyStateEntry","pop","setEditorState","tag","undo","COMMAND_PRIORITY_EDITOR","REDO_COMMAND","redo","CLEAR_EDITOR_COMMAND","CLEAR_HISTORY_COMMAND","registerUpdateListener","unregisterUpdateListener","LexicalHistory","$appendNodesToHTML","parentElement","after","exportDOM","fragment","createDocumentFragment","isHTMLElement","newElement","call","replaceWith","IGNORE_TAGS","Set","$createNodesFromDOM","forChildMap","Map","parentLexicalNode","lexicalNodes","nodeName","currentLexicalNode","transformFunction","domNode","cachedConversions","_htmlConversions","toLowerCase","currentConversion","cachedConversion","domConversion","priority","conversion","getConversionFunction","transformOutput","postTransform","transformNodes","forChildFunction","forChild","childNodes","childLexicalNodes","concat","container","innerHTML","elements","body","lexicalNode","LexicalHtml","SUPPORTED_URL_PROTOCOLS","LinkNode","ElementNode","static","__url","rel","__rel","__target","title","__title","url","attributes","super","this","createDOM","config","href","sanitizeUrl","addClassNamesToElement","theme","link","updateDOM","removeAttribute","a","convertAnchorElement","$createLinkNode","setFormat","format","setIndent","indent","setDirection","direction","parsedUrl","URL","getRel","getTarget","getTitle","getURL","version","getLatest","setURL","getWritable","setTarget","setRel","setTitle","insertNewAfter","restoreSelection","getParentOrThrow","linkNode","canInsertTextBefore","canInsertTextAfter","canBeEmpty","destination","isParentOf","isHTMLAnchorElement","content","textContent","getAttribute","$applyNodeReplacement","$isLinkNode","AutoLinkNode","$createAutoLinkNode","_rel","TOGGLE_LINK_COMMAND","createCommand","$isAutoLinkNode","toggleLink","extract","parent","getParent","insertBefore","firstNode","predicate","$getAncestor","prevParent","is","getPreviousSibling","insertAfter","LexicalLink","$getListDepth","listNode","depth","$isListItemNode","parentList","$isListNode","$getTopListNode","listItem","list","$getAllListItems","listItemNodes","listChildren","filter","listItemNode","firstChild","getFirstChild","isNestedListNode","wrapInListItem","$createListItemNode","$isSelectingEmptyListItem","$getListItemValue","value","getStart","siblings","getPreviousSiblings","sibling","nodesToAppend","splice","createListOrMerge","listType","previousSibling","nextSibling","getNextSibling","getFormatType","getIndent","getListType","$createListNode","replace","updateChildrenListItemValue","mergeLists","list1","list2","listItem1","getLastChild","listItem2","toMerge","childrenOrExisting","prevValue","getValue","nextValue","setValue","$handleIndent","removed","innerList","nextInnerList","add","newListItem","newList","$handleOutdent","grandparentListItem","greatGrandparentList","lastChild","isEmpty","previousSiblingsListItem","previousSiblingsList","nextSiblingsListItem","nextSiblingsList","getNextSiblings","ListItemNode","__value","__checked","checked","updateListItemChecked","$setListItemThemeClassNames","getChecked","setChecked","li","convertListItemElement","canMergeWith","replaceWithNode","includeChildren","__first","__last","nodeToAppend","afterListNode","newListNode","preserveEmptyParent","prevSibling","_","collapseAtStart","paragraph","listNodeParent","isIndented","select","toggleChecked","__indent","indentLevel","currentIndent","nodeToInsert","canInsertAfter","canReplaceWith","replacement","$isParagraphNode","editorThemeClasses","classesToAdd","classesToRemove","listTheme","listItemClassName","listitem","nestedListItemClassName","nested","listItemClasses","parentNode","isCheckList","listitemUnchecked","listitemChecked","nestedListItemClasses","some","removeClassNamesFromElement","prevListItemNode","setAttribute","ListNode","__listType","TAG_TO_LIST_TYPE","__tag","__start","start","_listType","getTag","setListType","writable","_editor","String","__lexicalListType","setListThemeClassNames","ol","convertListNode","ul","canIndent","textNode","$createTextNode","listLevelsClassNames","listDepth","normalizedListDepth","listLevelClassName","listClassName","nestedListClassName","nestedListTheme","normalizeChildren","normalizedListItems","INSERT_UNORDERED_LIST_COMMAND","INSERT_ORDERED_LIST_COMMAND","INSERT_CHECK_LIST_COMMAND","REMOVE_LIST_COMMAND","$handleListInsertParagraph","topListNode","grandparent","replacementNode","$isRootOrShadowRoot","nextSiblings","sublist","emptyListPtr","$removeHighestEmptyListParent","insertList","anchorNodeParent","handled","$isLeafNode","parentKey","nextParent","removeList","listNodes","$getNearestNodeOfType","insertionPoint","listItems","LexicalList","LexicalComposerContext","react","AutoFocusPlugin","defaultSelection","useLexicalComposerContext","useEffect","contains","preventScroll","LexicalAutoFocusPlugin","React","useLayoutEffect","HISTORY_MERGE_OPTIONS","LexicalComposer","initialConfig","composerContext","useMemo","editor__DEPRECATED","initialEditor","onError","initialEditorState","context","createLexicalComposerContext","newEditor","createEditor","editable","error","parsedEditorState","parseEditorState","initializeEditor","isEditable","setEditable","Provider","createContext","parentContext","getTheme","useContext","_extends","Object","assign","bind","arguments","source","prototype","hasOwnProperty","apply","ContentEditable","ariaActiveDescendant","ariaAutoComplete","ariaControls","ariaDescribedBy","ariaExpanded","ariaLabel","ariaLabelledBy","ariaMultiline","ariaOwns","ariaRequired","autoCapitalize","className","id","role","spellCheck","tabIndex","testid","rest","useState","ref","useCallback","setRootElement","registerEditableListener","currentIsEditable","contentEditable","LexicalContentEditable","DecoratorBlockNode","DecoratorNode","$isDecoratorBlockNode","LexicalDecoratorBlockNode","_setPrototypeOf","o","p","setPrototypeOf","__proto__","initialState","ErrorBoundary","_React$Component","subClass","superClass","_this","_len","_args","_key","state","resetErrorBoundary","_this$props","_len2","_key2","props","onReset","reset","create","getDerivedStateFromError","_proto","setState","componentDidCatch","info","_this$props$onError","_this$props2","componentDidUpdate","prevProps","prevState","_this$props$onResetKe","_this$props3","b","resetKeys","item","index","onResetKeysChange","render","_this$props4","fallbackRender","FallbackComponent","fallback","_props","isValidElement","Component","border","color","padding","LexicalErrorBoundary","history","HistoryPlugin","externalHistoryState","useHistory","LexicalHistoryPlugin","LinkPlugin","validateUrl","hasNodes","COMMAND_PRIORITY_LOW","PASTE_COMMAND","clipboardText","LexicalLinkPlugin","ListPlugin","INSERT_PARAGRAPH_COMMAND","useList","LexicalListPlugin","OnChangePlugin","ignoreHistoryMergeTagChange","ignoreSelectionChange","onChange","LexicalOnChangePlugin","useLexicalEditable","reactDom","dragon","richText","canShowPlaceholderFromCurrentEditorState","getEditorState","read","$canShowPlaceholderCurry","Placeholder","showPlaceholder","canShowPlaceholder","setCanShowPlaceholder","resetCanShowPlaceholder","currentCanShowPlaceholder","useCanShowPlaceholder","RichTextPlugin","placeholder","decorators","setDecorators","getDecorators","registerDecoratorListener","nextDecorators","flushSync","decoratedPortals","decoratorKeys","keys","nodeKey","reactDecorator","_onError","Suspense","getElementByKey","createPortal","useDecorators","registerRichText","useRichTextSetup","Fragment","LexicalRichTextPlugin","registerTabIndentation","KEY_TAB_COMMAND","command","$filter","$isBlockElementNode","first","isBefore","firstBlock","$getNearestBlockElementAncestorOrThrow","firstBlockKey","selectionAtStart","$createRangeSelection","$normalizeSelection__EXPERIMENTAL","indentOverTab","shiftKey","OUTDENT_CONTENT_COMMAND","INDENT_CONTENT_COMMAND","INSERT_TAB_COMMAND","TabIndentationPlugin","LexicalTabIndentationPlugin","subscription","initialValueFn","subscribe","callback","initializedSubscription","valueRef","useRef","currentValue","newValue","useLexicalSubscription","clipboard","caretFromPoint","x","y","caretRangeFromPoint","startContainer","startOffset","caretPositionFromPoint","offsetNode","documentMode","test","navigator","platform","userAgent","CAN_USE_BEFORE_INPUT","InputEvent","IS_SAFARI","IS_IOS","MSStream","IS_CHROME","IS_APPLE_WEBKIT","DRAG_DROP_PASTE","QuoteNode","quote","blockquote","convertBlockquoteElement","formatType","textAlign","getDirection","dir","$createQuoteNode","newBlock","HeadingNode","classNames","heading","h1","convertHeadingElement","h2","h3","h4","h5","h6","isGoogleDocsTitle","span","$createHeadingNode","anchorOffet","fontSize","headingTag","eventFiles","DragEvent","types","hasFiles","includes","hasContent","files","handleIndentAndOutdent","indentOrOutdent","alreadyHandled","parentBlock","$isTargetWithinDecorator","$getNearestNodeFromDOMNode","$isHeadingNode","$isQuoteNode","CLICK_COMMAND","$isNodeSelection","clear","DELETE_CHARACTER_COMMAND","isBackward","deleteCharacter","DELETE_WORD_COMMAND","deleteWord","DELETE_LINE_COMMAND","deleteLine","CONTROLLED_TEXT_INSERTION_COMMAND","eventOrText","REMOVE_TEXT_COMMAND","removeText","FORMAT_TEXT_COMMAND","formatText","FORMAT_ELEMENT_COMMAND","INSERT_LINE_BREAK_COMMAND","selectStart","insertLineBreak","$insertNodes","block","KEY_ARROW_UP_COMMAND","selectPrevious","possibleNode","$getAdjacentNode","isIsolated","KEY_ARROW_DOWN_COMMAND","selectNext","$isSelectionAtEndOfRoot","KEY_ARROW_LEFT_COMMAND","$shouldOverrideDefaultCharacterSelection","isHoldingShift","$moveCharacter","KEY_ARROW_RIGHT_COMMAND","KEY_BACKSPACE_COMMAND","KEY_DELETE_COMMAND","KEY_ENTER_COMMAND","KEY_ESCAPE_COMMAND","blur","DROP_COMMAND","eventRange","clientX","clientY","domOffset","normalizedSelection","DRAGSTART_COMMAND","isFileTransfer","DRAGOVER_COMMAND","SELECT_ALL_COMMAND","$selectAll","CUT_COMMAND","onCutForRichText","hasTextContent","isSelectionCapturedInDecoratorInput","KeyboardEvent","onPasteForRichText","LexicalRichText","CSS_TO_STYLES","getDOMTextNode","nodeType","Node","TEXT_NODE","getDOMIndexWithinParent","indexOf","getStyleObjectFromRawCSS","css","styleObject","styles","trim","getStyleObjectFromCSS","freeze","$patchStyle","patch","prevStyles","getStyle","newStyles","entries","reduce","newCSSText","getCSSFromStyleObject","setStyle","isBlock","isLeafElement","isPointAttached","point","isAttached","$removeParentEmptyElements","startingNode","latest","$wrapNodesImpl","nodesLength","wrappingElement","elementMapping","targetIsPrevSibling","emptyElements","movedNodes","targetElement","getChildrenKeys","lastElement","$getPreviousSelection","selectEnd","dirty","$moveCaretSelection","granularity","modify","$isParentElementRTL","$getNodeStyleValueForProperty","styleProperty","defaultValue","CSSText","__next","__prev","__size","__dir","$updateTextNodeProperties","$getSelectionStyleValueForProperty","styleValue","endOffset","endNode","nodeStyleValue","$isAtNodeEnd","isRTL","$patchStyleText","selectedNodes","selectedNodesLength","cellSelection","cellSelectionAnchor","cellSelectionFocus","lastIndex","lastNode","firstNodeTextLength","focusOffset","anchorOffset","startType","endType","endKey","splitNodes","splitText","lastNodeTextLength","selectedNode","selectedNodeKey","isToken","getTopLevelElementOrThrow","getFirstDescendant","getLastDescendant","firstType","lastType","lastOffset","$setBlocksType","maybeBlock","isSegmented","isAnchor","isFocus","getCharacterOffsets","isSame","isFirst","isLast","slice","$wrapNodes","topLevelNode","descendants","$hasAncestor","createDOMRange","_anchorOffset","_focusOffset","anchorKey","focusKey","createRange","collapsed","createRectsFromDOMRange","rootRect","getBoundingClientRect","computedStyle","getComputedStyle","rootPadding","parseFloat","paddingLeft","paddingRight","selectionRects","getClientRects","prevRect","selectionRectsLength","sort","top","abs","left","selectionRect","isOverlappingRect","height","width","selectionSpansElement","trimTextContentFromAnchor","delCount","remaining","descendantNode","getDescendantByIndex","additionalElementWhitespace","parentSibling","currentNodeSize","prevTextContent","$getNodeByKey","isSimpleText","slicedText","setTextContent","prevOffset","splitStart","splitEnd","excessNode","LexicalSelection","$isRootTextContentEmpty","isEditorComposing","$rootTextContent","$canShowPlaceholder","childrenLength","topBlock","topBlockChildren","topBlockChildrenLength","s","$findTextIntersectionFromCharacters","targetCharacters","currentCharacters","mainLoop","characters","$isRootTextContentEmptyCurry","registerLexicalTextEntity","getMatch","targetNode","createNode","isTargetNode","replaceWithSimpleText","getFormat","registerNodeTransform","TextNode","match","previousText","prevMatch","getMode","diff","end","newTextContent","remainingText","nodeToReplace","nextMatch","markDirty","isTextEntity","LexicalText","isMimeType","file","acceptableMimeTypes","acceptableType","startsWith","findFn","curr","$splitNode","$dfs","endingNode","innerNode","$getDepth","filterFn","result","startNode","blockNode","klass","$insertFirst","$insertNodeToNearestRoot","focusChild","getChildAtIndex","splitNode","splitOffset","rightTree","paragraphNode","$restoreEditorState","activeEditorState","_pendingEditorState","_dirtyType","$wrapNodeInElement","createElementNode","elementNode","classList","mediaFileReader","filesIterator","Symbol","iterator","processed","handleNextFile","done","next","fileReader","FileReader","readAsDataURL","func","f","object","objectClass","getPrototypeOf","registerNestedElementResolver","cloneNode","handleOverlap","$isTargetNode","$findMatch","nextSiblingsLength","newParent","LexicalUtils","AppShell","_className","_style","menu","menuProperties","display","xs","md","Box","position","borderStyle","borderWidth","borderRightWidth","borderColor","flexDirection","flex","backgroundColor","Header","AppShellHeader","displayName","leftSlot","rightSlot","paddingX","paddingY","justifyContent","gap","Calendar","hideBorder","containerProps","stickyWeekdays","fullWidthDays","Wrapper","initialProps","borderRadius","overflowY","numberOfMonths","Weekdays","DayPicker","table","calendar","classnames","row","cell","caption","caption_start","caption_end","head","head_stickyWeekdays","head_row","head_cell","cell__head","tbody","nav","nav_button_previous","nav__button","nav_button_next","day","day_fullWidth","day_selected","day_today","day_outside","day_disabled","day_range_middle","day__middle","day_range_start","day__start","day_range_end","day__end","months","components","CaptionLabel","CustomCaptionLabel","IconLeft","ChevronLeftIcon","IconRight","ChevronRightIcon","Day","CustomDay","locale","formatters","formatCaption","useDayPicker","Text","fontWeight","displayMonth","date","weekStartsOn","ISOWeek","formatWeekdayName","labels","labelWeekday","weekdays","getWeekdays","py","px","zIndex","map","weekday","alignItems","DayPickerProvider","startOfISOWeek","startOfWeek","days","addDays","CalloutCard","appearance","subtitle","onClick","icon","Source","cardBackground","cardBorder","cursor","as","iconBackground","minHeight","minWidth","Icon","iconColor","textColor","mt","alignSelf","primary","success","warning","danger","neutral","DataList","bottomDivider","borderBottomWidth","Row","DataListRow","topDivider","borderTopWidth","rowPadding","base","small","none","DataTable","bulkActions","header","footer","Table","Body","BulkActions","DataTableBulkActions","DataTableHeader","Footer","DataTableFooter","DataTableRow","Cell","DataTableCell","checkbox","action","label","boxSizing","Checkbox","Label","htmlFor","itemCount","pagination","Pagination","Head","Editor","modules","parser","helpText","helpIcon","IconSrc","setContent","onChangeEditor","useEditor","defaultTheme","Toolbar","toolbar","editorAppearance","defaultModules","defaultModule","Module","aliasModules","helpTextAppearance","DefaultPlugins","CustomHeadingPlugin","CustomParagraphPlugin","CustomClearFormattingPlugin","Bold","useEditorState","Button","selected","isBold","BoldIcon","ClearFormatting","CLEAR_FORMATTING_COMMAND","RemoveFormatIcon","Popover","supportedHeaderTypes","supportedHeaderType","hover","blockType","TextSizeIcon","headerTranslations","arrow","FORMAT_HEADING_COMMAND","FORMAT_PARAGRAPH_COMMAND","History","dispatch","EditorActionKind","CAN_UNDO","CAN_REDO","disabled","canUndo","UndoIcon","canRedo","RedoIcon","Italic","isItalic","ItalicIcon","Link","insertLink","isLink","LinkIcon","OrderedList","OrderedListIcon","UnorderedList","ListIcon","Video","PlayIcon","_ref","pointerEvents","Divider","toolbarRef","buttonRefs","calcButtonWidths","calcVisibleButtons","updateToolbar","useToolbar","activeEditor","setActiveEditor","visibleButtons","setVisibleButtons","Children","toArray","buttonWidths","setButtonWidths","hiddenButtons","setHiddenButtons","availableWidth","clientWidth","PADDING","ELIPSIS_BUTTON","maxVisibleButtons","buttons","_payload","EditorContext","flexWrap","button","maxWidth","EllipsisIcon","bottom","lineHeight","GAP","initialContext","joinClassNames","join","sprinkle","textDecoration","container__item","nested_list__item","italic","text__italic","bold","clearFormating","orderedList","unorderedList","video","divider","parserDOM","setContentHTML","setContentJSON","isEmptyContent","handleChange","editorContentHtml","onChangeHTML","editorContentJSON","toJSON","onChangeJSON","console","reducer","BLOCK_TYPE","IS_BOLD","IS_ITALIC","IS_LINK","getSelectedNode","windowWidth","setWindowWidth","innerWidth","useReducer","handleResize","prev","totalWidthButtons","ceil","elementKey","elementDOM","hasFormat","isCursorAtTheSamePosition","idx","clearNodeFormatting","COMMAND_PRIORITY_NORMAL","EmptyMessage","illustration","actions","emptyMessageContent","Title","FormField","showHelpText","Select","FormFieldSelect","Textarea","FormFieldTextarea","Input","FormFieldInput","inputAppearance","HelpLink","QuestionCircleIcon","InteractiveList","Structure","InteractiveListStructure","StructureSkeleton","InteractiveListStructureSkeleton","ButtonItem","InteractiveListButtonItem","ButtonItemSkeleton","InteractiveListButtonItemSkeleton","CheckboxItem","InteractiveListCheckboxItem","CheckboxItemSkeleton","InteractiveListCheckboxItemSkeleton","RadioItem","InteractiveListRadioItem","RadioItemSkeleton","InteractiveListRadioItemSkeleton","ToggleItem","InteractiveListToggleItem","ToggleItemSkeleton","InteractiveListToggleItemSkeleton","iconButton","itemID","generateID","InteractiveListRow","IconButton","Skeleton","radio","Radio","transitionDuration","transitionProperty","transitionTimingFunction","boxShadow","focusWithin","showTitle","description","toggle","Toggle","floor","random","Layout","columns","gridTemplateColumns","colQuantity","gridGap","Section","LayoutSection","Menu","MenuSection","MenuButton","ButtonAccordion","Accordion","MenuHeader","MenuBody","MenuFooter","activeColor","active","disabledColor","pl","pt","forwardRef","startIcon","MenuButtonAccordion","open","controlledOpen","menuButton","isOpen","setOpen","overflow","pb","pr","NavTabs","Item","NavTabsItem","badge","right","Page","marginX","PageHeader","PageBody","buttonStack","ProductUpdates","bodyContent","dismissLink","visible","setVisibility","handleVisibility","productUpdatesContent","hasDismissLink","onVisibility","CloseIcon","newVisible","enabledDismiss","enabledClick","SideModal","titleAction","headerAction","headerIcon","paddingHeader","paddingBody","paddingFooter","Sidebar","mb","primaryAction","secondaryAction","ThumbnailWithAction","thumbnail","contentPosition","contentPositions","Thumbnail","extendStatics","d","__extends","TypeError","__","__assign","t","__rest","getOwnPropertySymbols","propertyIsEnumerable","__decorate","desc","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__param","paramIndex","decorator","__esDecorate","ctor","descriptorIn","contextIn","initializers","extraInitializers","accept","kind","descriptor","access","addInitializer","init","__runInitializers","thisArg","useValue","__propKey","__setFunctionName","prefix","configurable","__metadata","metadataKey","metadataValue","metadata","__awaiter","_arguments","P","generator","fulfilled","step","rejected","then","__generator","g","sent","trys","ops","verb","v","op","__createBinding","m","k","k2","__esModule","enumerable","__exportStar","__values","__read","ar","__spread","__spreadArrays","il","j","jl","__spreadArray","to","pack","l","__await","__asyncGenerator","asyncIterator","q","resume","fulfill","settle","shift","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","raw","__setModuleDefault","__importStar","mod","__importDefault","default","__classPrivateFieldGet","receiver","__classPrivateFieldSet","__classPrivateFieldIn","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","obj","prop","toStringTag"],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AAUY,+BCAjBX,EAAOD,QAAUO,0BCAjBN,EAAOD,QAAUQ,2BCAjBP,EAAOD,QAAUS,kBCAjBR,EAAOD,QAAUc,eCAjBb,EAAOD,QAAUU,aCAjBT,EAAOD,QAAUM,0BCAjBL,EAAOD,QAAUa,mBCAjBZ,EAAOD,QAAUW,ICCb+7D,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBx2D,IAAjBy2D,EACH,OAAOA,EAAa78D,QAGrB,IAAIC,EAASy8D,EAAyBE,GAAY,CAGjD58D,QAAS,CAAC,GAOX,OAHA88D,EAAoBF,GAAU38D,EAAQA,EAAOD,QAAS28D,GAG/C18D,EAAOD,OACf,QCrBA28D,EAAoB/F,EAAI,CAAC52D,EAAS+8D,KACjC,IAAI,IAAIxrD,KAAOwrD,EACXJ,EAAoB5oC,EAAEgpC,EAAYxrD,KAASorD,EAAoB5oC,EAAE/zB,EAASuR,IAC5EugB,OAAO2lC,eAAez3D,EAASuR,EAAK,CAAEipD,YAAY,EAAMzpD,IAAKgsD,EAAWxrD,IAE1E,ECNDorD,EAAoB5oC,EAAI,CAACipC,EAAKC,IAAUnrC,OAAOI,UAAUC,eAAelc,KAAK+mD,EAAKC,GCClFN,EAAoB93D,EAAK7E,IACH,oBAAX81C,QAA0BA,OAAOonB,aAC1CprC,OAAO2lC,eAAez3D,EAAS81C,OAAOonB,YAAa,CAAEz+C,MAAO,WAE7DqT,OAAO2lC,eAAez3D,EAAS,aAAc,CAAEye,OAAO,GAAO,ECFpCk+C,EAAoB","sources":["webpack://@nimbus-ds/patterns/webpack/universalModuleDefinition","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/clipboard/LexicalClipboard.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/clipboard/LexicalClipboard.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/dragon/LexicalDragon.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/dragon/LexicalDragon.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/history/LexicalHistory.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/history/LexicalHistory.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/html/LexicalHtml.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/html/LexicalHtml.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/link/LexicalLink.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/link/LexicalLink.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/list/LexicalList.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/list/LexicalList.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalAutoEmbedPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalAutoEmbedPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalAutoFocusPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalAutoFocusPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalAutoLinkPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalAutoLinkPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalBlockWithAlignableContents.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalBlockWithAlignableContents.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalComposer.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalComposer.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalComposerContext.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalComposerContext.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalContentEditable.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalContentEditable.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalDecoratorBlockNode.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalDecoratorBlockNode.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalErrorBoundary.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalErrorBoundary.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalHistoryPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalHistoryPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalLinkPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalLinkPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalListPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalListPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalNodeMenuPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalNodeMenuPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalOnChangePlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalOnChangePlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalRichTextPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalRichTextPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalTabIndentationPlugin.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/LexicalTabIndentationPlugin.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/useLexicalEditable.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/useLexicalEditable.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/useLexicalNodeSelection.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/react/useLexicalNodeSelection.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/rich-text/LexicalRichText.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/rich-text/LexicalRichText.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/selection/LexicalSelection.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/selection/LexicalSelection.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/text/LexicalText.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/text/LexicalText.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/utils/LexicalUtils.dev.js","webpack://@nimbus-ds/patterns/../../node_modules/@lexical/utils/LexicalUtils.js","webpack://@nimbus-ds/patterns/./src/components/AppShell/src/AppShell.tsx","webpack://@nimbus-ds/patterns/./src/components/AppShell/src/components/AppShellHeader/AppShellHeader.tsx","webpack://@nimbus-ds/patterns/./src/components/AppShell/src/components/AppShellHeader/index.ts","webpack://@nimbus-ds/patterns/./src/components/AppShell/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/AppShell/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/Calendar.tsx","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/CustomCaptionLabel/CustomCaptionLabel.tsx","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/CustomCaptionLabel/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/CustomDay/CustomDay.tsx","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/CustomDay/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/Weekdays/Weekdays.tsx","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/Weekdays/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/Wrapper/Wrapper.tsx","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/Wrapper/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/utils/getWeekdays.ts","webpack://@nimbus-ds/patterns/./src/components/Calendar/src/utils/index.ts","webpack://@nimbus-ds/patterns/./src/components/CalloutCard/src/CalloutCard.tsx","webpack://@nimbus-ds/patterns/./src/components/CalloutCard/src/calloutCard.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/CalloutCard/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataList/src/DataList.tsx","webpack://@nimbus-ds/patterns/./src/components/DataList/src/components/DataListRow/DataListRow.tsx","webpack://@nimbus-ds/patterns/./src/components/DataList/src/components/DataListRow/dataListRow.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/DataList/src/components/DataListRow/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataList/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataList/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/DataTable.tsx","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableBulkActions/DataTableBulkActions.tsx","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableBulkActions/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableCell/DataTableCell.tsx","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableCell/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableFooter/DataTableFooter.tsx","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableFooter/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableHeader/DataTableHeader.tsx","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableHeader/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableRow/DataTableRow.tsx","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/DataTableRow/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/DataTable/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/Editor.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Bold/Bold.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Bold/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/ClearFormatting/ClearFormatting.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/ClearFormatting/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Header/Header.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Header/header.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Header/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/History/History.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/History/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Italic/Italic.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Italic/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Link/Link.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Link/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Link/link.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/OrderedList/OrderedList.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/OrderedList/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/UnorderedList/UnorderedList.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/UnorderedList/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Video/Video.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/Video/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/actions/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Button/Button.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Button/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Divider/Divider.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Divider/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Placeholder/Placeholder.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Placeholder/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Toolbar/Toolbar.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Toolbar/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/Toolbar/toolbar.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/contexts/EditorContext/EditorContext.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/contexts/EditorContext/editorContext.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/contexts/EditorContext/editorContext.types.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/contexts/EditorContext/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/contexts/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/editor.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useEditor/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useEditor/useEditor.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useEditor/useEditor.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useEditorState/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useEditorState/useEditorState.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useToolbar/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useToolbar/useToolbar.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/hooks/useToolbar/useToolbar.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/nodes/YouTubeNode/YouTubeNode.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/nodes/YouTubeNode/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/nodes/YouTubeNode/youTubeNode.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/nodes/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomAutoEmbedPlugin/CustomAutoEmbedPlugin.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomAutoEmbedPlugin/customAutoEmbedPlugin.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomAutoEmbedPlugin/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomClearFormattingPlugin/CustomClearFormattingPlugin.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomClearFormattingPlugin/customClear.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomClearFormattingPlugin/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomFloatingLinkEditor/CustomFloatingLinkEditor.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomFloatingLinkEditor/components/PopoverEditLink/PopoverEditLink.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomFloatingLinkEditor/components/PopoverEditLink/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomFloatingLinkEditor/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomFloatingLinkEditor/hooks/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomFloatingLinkEditor/hooks/useFloatingLinkEditor/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomFloatingLinkEditor/hooks/useFloatingLinkEditor/useFloatingLinkEditor.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomFloatingLinkEditor/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomHeadingPlugin/CustomHeadingPlugin.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomHeadingPlugin/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomParagraphPlugin/CustomParagraphPlugin.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomParagraphPlugin/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomYouTubePlugin/CustomYouTubePlugin.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/CustomYouTubePlugin/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/DefaultPlugins/DefaultPlugins.tsx","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/DefaultPlugins/defaultPlugins.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/DefaultPlugins/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/plugins/index.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/utils/customCommands.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/utils/debounce.ts","webpack://@nimbus-ds/patterns/./src/components/Editor/src/utils/index.ts","webpack://@nimbus-ds/patterns/./src/components/EmptyMessage/src/EmptyMessage.tsx","webpack://@nimbus-ds/patterns/./src/components/EmptyMessage/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/FormField/src/FormField.tsx","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/FormFieldInput/FormFieldInput.tsx","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/FormFieldInput/index.ts","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/FormFieldSelect/FormFieldSelect.tsx","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/FormFieldSelect/index.ts","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/FormFieldTextarea/FormFieldTextarea.tsx","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/FormFieldTextarea/index.ts","webpack://@nimbus-ds/patterns/./src/components/FormField/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/FormField/src/formField.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/FormField/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/HelpLink/src/HelpLink.tsx","webpack://@nimbus-ds/patterns/./src/components/HelpLink/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/InteractiveList.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListButtonItem/InteractiveListButtonItem.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListButtonItem/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListButtonItemSkeleton/InteractiveListButtonItemSkeleton.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListButtonItemSkeleton/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListCheckboxItem/InteractiveListCheckboxItem.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListCheckboxItem/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListCheckboxItemSkeleton/InteractiveListCheckboxItemSkeleton.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListCheckboxItemSkeleton/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListRadioItem/InteractiveListRadioItem.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListRadioItem/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListRadioItemSkeleton/InteractiveListRadioItemSkeleton.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListRadioItemSkeleton/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListRow/InteractiveListRow.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListRow/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListStructure/InteractiveListStructure.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListStructure/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListStructureSkeleton/InteractiveListStructureSkeleton.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListStructureSkeleton/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListToggleItem/InteractiveListToggleItem.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListToggleItem/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListToggleItemSkeleton/InteractiveListToggleItemSkeleton.tsx","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/InteractiveListToggleItemSkeleton/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/InteractiveList/src/interactiveList.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Layout/src/Layout.tsx","webpack://@nimbus-ds/patterns/./src/components/Layout/src/components/LayoutSection/LayoutSection.tsx","webpack://@nimbus-ds/patterns/./src/components/Layout/src/components/LayoutSection/index.ts","webpack://@nimbus-ds/patterns/./src/components/Layout/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/Layout/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/Layout/src/layout.definitions.ts","webpack://@nimbus-ds/patterns/./src/components/Menu/src/Menu.tsx","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuBody/MenuBody.tsx","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuBody/index.ts","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuFooter/MenuFooter.tsx","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuFooter/index.ts","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuHeader/MenuHeader.tsx","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuHeader/index.ts","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuSection/MenuSection.tsx","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/MenuSection/index.ts","webpack://@nimbus-ds/patterns/./src/components/Menu/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/Menu/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/MenuButton/src/MenuButton.tsx","webpack://@nimbus-ds/patterns/./src/components/MenuButton/src/components/MenuButtonAccordion/MenuButtonAccordion.tsx","webpack://@nimbus-ds/patterns/./src/components/MenuButton/src/components/MenuButtonAccordion/index.ts","webpack://@nimbus-ds/patterns/./src/components/MenuButton/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/MenuButton/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/NavTabs/src/NavTabs.tsx","webpack://@nimbus-ds/patterns/./src/components/NavTabs/src/components/NavTabsItem/NavTabsItem.tsx","webpack://@nimbus-ds/patterns/./src/components/NavTabs/src/components/NavTabsItem/index.ts","webpack://@nimbus-ds/patterns/./src/components/NavTabs/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/NavTabs/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/Page/src/Page.tsx","webpack://@nimbus-ds/patterns/./src/components/Page/src/components/PageBody/PageBody.tsx","webpack://@nimbus-ds/patterns/./src/components/Page/src/components/PageBody/index.ts","webpack://@nimbus-ds/patterns/./src/components/Page/src/components/PageHeader/PageHeader.tsx","webpack://@nimbus-ds/patterns/./src/components/Page/src/components/PageHeader/index.ts","webpack://@nimbus-ds/patterns/./src/components/Page/src/components/index.ts","webpack://@nimbus-ds/patterns/./src/components/Page/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/ProductUpdates/src/ProductUpdates.tsx","webpack://@nimbus-ds/patterns/./src/components/ProductUpdates/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/SideModal/src/SideModal.tsx","webpack://@nimbus-ds/patterns/./src/components/SideModal/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/ThumbnailWithAction/src/ThumbnailWithAction.tsx","webpack://@nimbus-ds/patterns/./src/components/ThumbnailWithAction/src/index.ts","webpack://@nimbus-ds/patterns/./src/components/ThumbnailWithAction/src/thumbnailWithAction.definitions.ts","webpack://@nimbus-ds/patterns/./src/index.ts","webpack://@nimbus-ds/patterns/../../node_modules/tslib/tslib.es6.js","webpack://@nimbus-ds/patterns/external umd \"@floating-ui/react\"","webpack://@nimbus-ds/patterns/external umd \"@nimbus-ds/components\"","webpack://@nimbus-ds/patterns/external umd \"@nimbus-ds/icons\"","webpack://@nimbus-ds/patterns/external umd \"@nimbus-ds/styles\"","webpack://@nimbus-ds/patterns/external umd \"date-fns\"","webpack://@nimbus-ds/patterns/external umd \"lexical\"","webpack://@nimbus-ds/patterns/external umd \"react\"","webpack://@nimbus-ds/patterns/external umd \"react-day-picker\"","webpack://@nimbus-ds/patterns/external umd \"react-dom\"","webpack://@nimbus-ds/patterns/webpack/bootstrap","webpack://@nimbus-ds/patterns/webpack/runtime/define property getters","webpack://@nimbus-ds/patterns/webpack/runtime/hasOwnProperty shorthand","webpack://@nimbus-ds/patterns/webpack/runtime/make namespace object","webpack://@nimbus-ds/patterns/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"@nimbus-ds/components\"), require(\"@nimbus-ds/icons\"), require(\"@nimbus-ds/styles\"), require(\"lexical\"), require(\"react-dom\"), require(\"@floating-ui/react\"), require(\"react-day-picker\"), require(\"date-fns\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"@nimbus-ds/components\", \"@nimbus-ds/icons\", \"@nimbus-ds/styles\", \"lexical\", \"react-dom\", \"@floating-ui/react\", \"react-day-picker\", \"date-fns\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@nimbus-ds/patterns\"] = factory(require(\"react\"), require(\"@nimbus-ds/components\"), require(\"@nimbus-ds/icons\"), require(\"@nimbus-ds/styles\"), require(\"lexical\"), require(\"react-dom\"), require(\"@floating-ui/react\"), require(\"react-day-picker\"), require(\"date-fns\"));\n\telse\n\t\troot[\"@nimbus-ds/patterns\"] = factory(root[\"react\"], root[\"@nimbus-ds/components\"], root[\"@nimbus-ds/icons\"], root[\"@nimbus-ds/styles\"], root[\"lexical\"], root[\"react-dom\"], root[\"@floating-ui/react\"], root[\"react-day-picker\"], root[\"date-fns\"]);\n})(global, (__WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE__nimbus_ds_components__, __WEBPACK_EXTERNAL_MODULE__nimbus_ds_icons__, __WEBPACK_EXTERNAL_MODULE__nimbus_ds_styles__, __WEBPACK_EXTERNAL_MODULE_lexical__, __WEBPACK_EXTERNAL_MODULE_react_dom__, __WEBPACK_EXTERNAL_MODULE__floating_ui_react__, __WEBPACK_EXTERNAL_MODULE_react_day_picker__, __WEBPACK_EXTERNAL_MODULE_date_fns__) => {\nreturn ","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar html = require('@lexical/html');\nvar selection = require('@lexical/selection');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nconst getDOMSelection = targetWindow => CAN_USE_DOM ? (targetWindow || window).getSelection() : null;\n/**\n * Returns the *currently selected* Lexical content as an HTML string, relying on the\n * logic defined in the exportDOM methods on the LexicalNode classes. Note that\n * this will not return the HTML content of the entire editor (unless all the content is included\n * in the current selection).\n *\n * @param editor - LexicalEditor instance to get HTML content from\n * @returns a string of HTML content\n */\n\n\nfunction $getHtmlContent(editor) {\n const selection = lexical.$getSelection();\n\n if (selection == null) {\n {\n throw Error(`Expected valid LexicalSelection`);\n }\n } // If we haven't selected anything\n\n\n if (lexical.$isRangeSelection(selection) && selection.isCollapsed() || selection.getNodes().length === 0) {\n return '';\n }\n\n return html.$generateHtmlFromNodes(editor, selection);\n}\n/**\n * Returns the *currently selected* Lexical content as a JSON string, relying on the\n * logic defined in the exportJSON methods on the LexicalNode classes. Note that\n * this will not return the JSON content of the entire editor (unless all the content is included\n * in the current selection).\n *\n * @param editor - LexicalEditor instance to get the JSON content from\n * @returns\n */\n\nfunction $getLexicalContent(editor) {\n const selection = lexical.$getSelection();\n\n if (selection == null) {\n {\n throw Error(`Expected valid LexicalSelection`);\n }\n } // If we haven't selected anything\n\n\n if (lexical.$isRangeSelection(selection) && selection.isCollapsed() || selection.getNodes().length === 0) {\n return null;\n }\n\n return JSON.stringify($generateJSONFromSelectedNodes(editor, selection));\n}\n/**\n * Attempts to insert content of the mime-types text/plain or text/uri-list from\n * the provided DataTransfer object into the editor at the provided selection.\n * text/uri-list is only used if text/plain is not also provided.\n *\n * @param dataTransfer an object conforming to the [DataTransfer interface] (https://html.spec.whatwg.org/multipage/dnd.html#the-datatransfer-interface)\n * @param selection the selection to use as the insertion point for the content in the DataTransfer object\n */\n\nfunction $insertDataTransferForPlainText(dataTransfer, selection) {\n const text = dataTransfer.getData('text/plain') || dataTransfer.getData('text/uri-list');\n\n if (text != null) {\n selection.insertRawText(text);\n }\n}\n/**\n * Attempts to insert content of the mime-types application/x-lexical-editor, text/html,\n * text/plain, or text/uri-list (in descending order of priority) from the provided DataTransfer\n * object into the editor at the provided selection.\n *\n * @param dataTransfer an object conforming to the [DataTransfer interface] (https://html.spec.whatwg.org/multipage/dnd.html#the-datatransfer-interface)\n * @param selection the selection to use as the insertion point for the content in the DataTransfer object\n * @param editor the LexicalEditor the content is being inserted into.\n */\n\nfunction $insertDataTransferForRichText(dataTransfer, selection, editor) {\n const lexicalString = dataTransfer.getData('application/x-lexical-editor');\n\n if (lexicalString) {\n try {\n const payload = JSON.parse(lexicalString);\n\n if (payload.namespace === editor._config.namespace && Array.isArray(payload.nodes)) {\n const nodes = $generateNodesFromSerializedNodes(payload.nodes);\n return $insertGeneratedNodes(editor, nodes, selection);\n }\n } catch {// Fail silently.\n }\n }\n\n const htmlString = dataTransfer.getData('text/html');\n\n if (htmlString) {\n try {\n const parser = new DOMParser();\n const dom = parser.parseFromString(htmlString, 'text/html');\n const nodes = html.$generateNodesFromDOM(editor, dom);\n return $insertGeneratedNodes(editor, nodes, selection);\n } catch {// Fail silently.\n }\n } // Multi-line plain text in rich text mode pasted as separate paragraphs\n // instead of single paragraph with linebreaks.\n // Webkit-specific: Supports read 'text/uri-list' in clipboard.\n\n\n const text = dataTransfer.getData('text/plain') || dataTransfer.getData('text/uri-list');\n\n if (text != null) {\n if (lexical.$isRangeSelection(selection)) {\n const parts = text.split(/(\\r?\\n|\\t)/);\n const partsLength = parts.length;\n\n for (let i = 0; i < partsLength; i++) {\n const part = parts[i];\n\n if (part === '\\n' || part === '\\r\\n') {\n selection.insertParagraph();\n } else if (part === '\\t') {\n selection.insertNodes([lexical.$createTabNode()]);\n } else {\n selection.insertText(part);\n }\n }\n } else {\n selection.insertRawText(text);\n }\n }\n}\n/**\n * Inserts Lexical nodes into the editor using different strategies depending on\n * some simple selection-based heuristics. If you're looking for a generic way to\n * to insert nodes into the editor at a specific selection point, you probably want\n * {@link lexical.$insertNodes}\n *\n * @param editor LexicalEditor instance to insert the nodes into.\n * @param nodes The nodes to insert.\n * @param selection The selection to insert the nodes into.\n */\n\nfunction $insertGeneratedNodes(editor, nodes, selection) {\n const isSelectionInsideOfGrid = lexical.DEPRECATED_$isGridSelection(selection) || utils.$findMatchingParent(selection.anchor.getNode(), n => lexical.DEPRECATED_$isGridCellNode(n)) !== null && utils.$findMatchingParent(selection.focus.getNode(), n => lexical.DEPRECATED_$isGridCellNode(n)) !== null;\n\n if (isSelectionInsideOfGrid && nodes.length === 1 && lexical.DEPRECATED_$isGridNode(nodes[0])) {\n $mergeGridNodesStrategy(nodes, selection, false, editor);\n return;\n }\n\n $basicInsertStrategy(nodes, selection);\n return;\n}\n\nfunction $basicInsertStrategy(nodes, selection) {\n // Wrap text and inline nodes in paragraph nodes so we have all blocks at the top-level\n const topLevelBlocks = [];\n let currentBlock = null;\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n const isLineBreakNode = lexical.$isLineBreakNode(node);\n\n if (isLineBreakNode || lexical.$isDecoratorNode(node) && node.isInline() || lexical.$isElementNode(node) && node.isInline() || lexical.$isTextNode(node) || node.isParentRequired()) {\n if (currentBlock === null) {\n currentBlock = node.createParentElementNode();\n topLevelBlocks.push(currentBlock); // In the case of LineBreakNode, we just need to\n // add an empty ParagraphNode to the topLevelBlocks.\n\n if (isLineBreakNode) {\n continue;\n }\n }\n\n if (currentBlock !== null) {\n currentBlock.append(node);\n }\n } else {\n topLevelBlocks.push(node);\n currentBlock = null;\n }\n }\n\n if (lexical.$isRangeSelection(selection)) {\n selection.insertNodes(topLevelBlocks);\n } else if (lexical.DEPRECATED_$isGridSelection(selection)) {\n // If there's an active grid selection and a non grid is pasted, add to the anchor.\n const anchorCell = selection.anchor.getNode();\n\n if (!lexical.DEPRECATED_$isGridCellNode(anchorCell)) {\n {\n throw Error(`Expected Grid Cell in Grid Selection`);\n }\n }\n\n anchorCell.append(...topLevelBlocks);\n }\n}\n\nfunction $mergeGridNodesStrategy(nodes, selection, isFromLexical, editor) {\n if (nodes.length !== 1 || !lexical.DEPRECATED_$isGridNode(nodes[0])) {\n {\n throw Error(`$mergeGridNodesStrategy: Expected Grid insertion.`);\n }\n }\n\n const newGrid = nodes[0];\n const newGridRows = newGrid.getChildren();\n const newColumnCount = newGrid.getFirstChildOrThrow().getChildrenSize();\n const newRowCount = newGrid.getChildrenSize();\n const gridCellNode = utils.$findMatchingParent(selection.anchor.getNode(), n => lexical.DEPRECATED_$isGridCellNode(n));\n const gridRowNode = gridCellNode && utils.$findMatchingParent(gridCellNode, n => lexical.DEPRECATED_$isGridRowNode(n));\n const gridNode = gridRowNode && utils.$findMatchingParent(gridRowNode, n => lexical.DEPRECATED_$isGridNode(n));\n\n if (!lexical.DEPRECATED_$isGridCellNode(gridCellNode) || !lexical.DEPRECATED_$isGridRowNode(gridRowNode) || !lexical.DEPRECATED_$isGridNode(gridNode)) {\n {\n throw Error(`$mergeGridNodesStrategy: Expected selection to be inside of a Grid.`);\n }\n }\n\n const startY = gridRowNode.getIndexWithinParent();\n const stopY = Math.min(gridNode.getChildrenSize() - 1, startY + newRowCount - 1);\n const startX = gridCellNode.getIndexWithinParent();\n const stopX = Math.min(gridRowNode.getChildrenSize() - 1, startX + newColumnCount - 1);\n const fromX = Math.min(startX, stopX);\n const fromY = Math.min(startY, stopY);\n const toX = Math.max(startX, stopX);\n const toY = Math.max(startY, stopY);\n const gridRowNodes = gridNode.getChildren();\n let newRowIdx = 0;\n let newAnchorCellKey;\n let newFocusCellKey;\n\n for (let r = fromY; r <= toY; r++) {\n const currentGridRowNode = gridRowNodes[r];\n\n if (!lexical.DEPRECATED_$isGridRowNode(currentGridRowNode)) {\n {\n throw Error(`getNodes: expected to find GridRowNode`);\n }\n }\n\n const newGridRowNode = newGridRows[newRowIdx];\n\n if (!lexical.DEPRECATED_$isGridRowNode(newGridRowNode)) {\n {\n throw Error(`getNodes: expected to find GridRowNode`);\n }\n }\n\n const gridCellNodes = currentGridRowNode.getChildren();\n const newGridCellNodes = newGridRowNode.getChildren();\n let newColumnIdx = 0;\n\n for (let c = fromX; c <= toX; c++) {\n const currentGridCellNode = gridCellNodes[c];\n\n if (!lexical.DEPRECATED_$isGridCellNode(currentGridCellNode)) {\n {\n throw Error(`getNodes: expected to find GridCellNode`);\n }\n }\n\n const newGridCellNode = newGridCellNodes[newColumnIdx];\n\n if (!lexical.DEPRECATED_$isGridCellNode(newGridCellNode)) {\n {\n throw Error(`getNodes: expected to find GridCellNode`);\n }\n }\n\n if (r === fromY && c === fromX) {\n newAnchorCellKey = currentGridCellNode.getKey();\n } else if (r === toY && c === toX) {\n newFocusCellKey = currentGridCellNode.getKey();\n }\n\n const originalChildren = currentGridCellNode.getChildren();\n newGridCellNode.getChildren().forEach(child => {\n if (lexical.$isTextNode(child)) {\n const paragraphNode = lexical.$createParagraphNode();\n paragraphNode.append(child);\n currentGridCellNode.append(child);\n } else {\n currentGridCellNode.append(child);\n }\n });\n originalChildren.forEach(n => n.remove());\n newColumnIdx++;\n }\n\n newRowIdx++;\n }\n\n if (newAnchorCellKey && newFocusCellKey) {\n const newGridSelection = lexical.DEPRECATED_$createGridSelection();\n newGridSelection.set(gridNode.getKey(), newAnchorCellKey, newFocusCellKey);\n lexical.$setSelection(newGridSelection);\n editor.dispatchCommand(lexical.SELECTION_CHANGE_COMMAND, undefined);\n }\n}\n\nfunction exportNodeToJSON(node) {\n const serializedNode = node.exportJSON();\n const nodeClass = node.constructor; // @ts-expect-error TODO Replace Class utility type with InstanceType\n\n if (serializedNode.type !== nodeClass.getType()) {\n {\n throw Error(`LexicalNode: Node ${nodeClass.name} does not implement .exportJSON().`);\n }\n } // @ts-expect-error TODO Replace Class utility type with InstanceType\n\n\n const serializedChildren = serializedNode.children;\n\n if (lexical.$isElementNode(node)) {\n if (!Array.isArray(serializedChildren)) {\n {\n throw Error(`LexicalNode: Node ${nodeClass.name} is an element but .exportJSON() does not have a children array.`);\n }\n }\n }\n\n return serializedNode;\n}\n\nfunction $appendNodesToJSON(editor, selection$1, currentNode, targetArray = []) {\n let shouldInclude = selection$1 != null ? currentNode.isSelected(selection$1) : true;\n const shouldExclude = lexical.$isElementNode(currentNode) && currentNode.excludeFromCopy('html');\n let target = currentNode;\n\n if (selection$1 !== null) {\n let clone = selection.$cloneWithProperties(currentNode);\n clone = lexical.$isTextNode(clone) && selection$1 != null ? selection.$sliceSelectedTextNodeContent(selection$1, clone) : clone;\n target = clone;\n }\n\n const children = lexical.$isElementNode(target) ? target.getChildren() : [];\n const serializedNode = exportNodeToJSON(target); // TODO: TextNode calls getTextContent() (NOT node.__text) within it's exportJSON method\n // which uses getLatest() to get the text from the original node with the same key.\n // This is a deeper issue with the word \"clone\" here, it's still a reference to the\n // same node as far as the LexicalEditor is concerned since it shares a key.\n // We need a way to create a clone of a Node in memory with it's own key, but\n // until then this hack will work for the selected text extract use case.\n\n if (lexical.$isTextNode(target)) {\n const text = target.__text; // If an uncollapsed selection ends or starts at the end of a line of specialized,\n // TextNodes, such as code tokens, we will get a 'blank' TextNode here, i.e., one\n // with text of length 0. We don't want this, it makes a confusing mess. Reset!\n\n if (text.length > 0) {\n serializedNode.text = text;\n } else {\n shouldInclude = false;\n }\n }\n\n for (let i = 0; i < children.length; i++) {\n const childNode = children[i];\n const shouldIncludeChild = $appendNodesToJSON(editor, selection$1, childNode, serializedNode.children);\n\n if (!shouldInclude && lexical.$isElementNode(currentNode) && shouldIncludeChild && currentNode.extractWithChild(childNode, selection$1, 'clone')) {\n shouldInclude = true;\n }\n }\n\n if (shouldInclude && !shouldExclude) {\n targetArray.push(serializedNode);\n } else if (Array.isArray(serializedNode.children)) {\n for (let i = 0; i < serializedNode.children.length; i++) {\n const serializedChildNode = serializedNode.children[i];\n targetArray.push(serializedChildNode);\n }\n }\n\n return shouldInclude;\n} // TODO why $ function with Editor instance?\n\n/**\n * Gets the Lexical JSON of the nodes inside the provided Selection.\n *\n * @param editor LexicalEditor to get the JSON content from.\n * @param selection Selection to get the JSON content from.\n * @returns an object with the editor namespace and a list of serializable nodes as JavaScript objects.\n */\n\n\nfunction $generateJSONFromSelectedNodes(editor, selection) {\n const nodes = [];\n const root = lexical.$getRoot();\n const topLevelChildren = root.getChildren();\n\n for (let i = 0; i < topLevelChildren.length; i++) {\n const topLevelNode = topLevelChildren[i];\n $appendNodesToJSON(editor, selection, topLevelNode, nodes);\n }\n\n return {\n namespace: editor._config.namespace,\n nodes\n };\n}\n/**\n * This method takes an array of objects conforming to the BaseSeralizedNode interface and returns\n * an Array containing instances of the corresponding LexicalNode classes registered on the editor.\n * Normally, you'd get an Array of BaseSerialized nodes from {@link $generateJSONFromSelectedNodes}\n *\n * @param serializedNodes an Array of objects conforming to the BaseSerializedNode interface.\n * @returns an Array of Lexical Node objects.\n */\n\nfunction $generateNodesFromSerializedNodes(serializedNodes) {\n const nodes = [];\n\n for (let i = 0; i < serializedNodes.length; i++) {\n const serializedNode = serializedNodes[i];\n const node = lexical.$parseSerializedNode(serializedNode);\n\n if (lexical.$isTextNode(node)) {\n selection.$addNodeStyle(node);\n }\n\n nodes.push(node);\n }\n\n return nodes;\n}\nconst EVENT_LATENCY = 50;\nlet clipboardEventTimeout = null; // TODO custom selection\n// TODO potentially have a node customizable version for plain text\n\n/**\n * Copies the content of the current selection to the clipboard in\n * text/plain, text/html, and application/x-lexical-editor (Lexical JSON)\n * formats.\n *\n * @param editor the LexicalEditor instance to copy content from\n * @param event the native browser ClipboardEvent to add the content to.\n * @returns\n */\n\nasync function copyToClipboard(editor, event) {\n if (clipboardEventTimeout !== null) {\n // Prevent weird race conditions that can happen when this function is run multiple times\n // synchronously. In the future, we can do better, we can cancel/override the previously running job.\n return false;\n }\n\n if (event !== null) {\n return new Promise((resolve, reject) => {\n editor.update(() => {\n resolve($copyToClipboardEvent(editor, event));\n });\n });\n }\n\n const rootElement = editor.getRootElement();\n const windowDocument = editor._window == null ? window.document : editor._window.document;\n const domSelection = getDOMSelection(editor._window);\n\n if (rootElement === null || domSelection === null) {\n return false;\n }\n\n const element = windowDocument.createElement('span');\n element.style.cssText = 'position: fixed; top: -1000px;';\n element.append(windowDocument.createTextNode('#'));\n rootElement.append(element);\n const range = new Range();\n range.setStart(element, 0);\n range.setEnd(element, 1);\n domSelection.removeAllRanges();\n domSelection.addRange(range);\n return new Promise((resolve, reject) => {\n const removeListener = editor.registerCommand(lexical.COPY_COMMAND, secondEvent => {\n if (utils.objectKlassEquals(secondEvent, ClipboardEvent)) {\n removeListener();\n\n if (clipboardEventTimeout !== null) {\n window.clearTimeout(clipboardEventTimeout);\n clipboardEventTimeout = null;\n }\n\n resolve($copyToClipboardEvent(editor, secondEvent));\n } // Block the entire copy flow while we wait for the next ClipboardEvent\n\n\n return true;\n }, lexical.COMMAND_PRIORITY_CRITICAL); // If the above hack execCommand hack works, this timeout code should never fire. Otherwise,\n // the listener will be quickly freed so that the user can reuse it again\n\n clipboardEventTimeout = window.setTimeout(() => {\n removeListener();\n clipboardEventTimeout = null;\n resolve(false);\n }, EVENT_LATENCY);\n windowDocument.execCommand('copy');\n element.remove();\n });\n} // TODO shouldn't pass editor (pass namespace directly)\n\nfunction $copyToClipboardEvent(editor, event) {\n const domSelection = getDOMSelection(editor._window);\n\n if (!domSelection) {\n return false;\n }\n\n const anchorDOM = domSelection.anchorNode;\n const focusDOM = domSelection.focusNode;\n\n if (anchorDOM !== null && focusDOM !== null && !lexical.isSelectionWithinEditor(editor, anchorDOM, focusDOM)) {\n return false;\n }\n\n event.preventDefault();\n const clipboardData = event.clipboardData;\n const selection = lexical.$getSelection();\n\n if (clipboardData === null || selection === null) {\n return false;\n }\n\n const htmlString = $getHtmlContent(editor);\n const lexicalString = $getLexicalContent(editor);\n let plainString = '';\n\n if (selection !== null) {\n plainString = selection.getTextContent();\n }\n\n if (htmlString !== null) {\n clipboardData.setData('text/html', htmlString);\n }\n\n if (lexicalString !== null) {\n clipboardData.setData('application/x-lexical-editor', lexicalString);\n }\n\n clipboardData.setData('text/plain', plainString);\n return true;\n}\n\nexports.$generateJSONFromSelectedNodes = $generateJSONFromSelectedNodes;\nexports.$generateNodesFromSerializedNodes = $generateNodesFromSerializedNodes;\nexports.$getHtmlContent = $getHtmlContent;\nexports.$getLexicalContent = $getLexicalContent;\nexports.$insertDataTransferForPlainText = $insertDataTransferForPlainText;\nexports.$insertDataTransferForRichText = $insertDataTransferForRichText;\nexports.$insertGeneratedNodes = $insertGeneratedNodes;\nexports.copyToClipboard = copyToClipboard;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalClipboard = process.env.NODE_ENV === 'development' ? require('./LexicalClipboard.dev.js') : require('./LexicalClipboard.prod.js')\nmodule.exports = LexicalClipboard;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar lexical = require('lexical');\n\n/** @module @lexical/dragon */\nfunction registerDragonSupport(editor) {\n const origin = window.location.origin;\n\n const handler = event => {\n if (event.origin !== origin) {\n return;\n }\n\n const rootElement = editor.getRootElement();\n\n if (document.activeElement !== rootElement) {\n return;\n }\n\n const data = event.data;\n\n if (typeof data === 'string') {\n let parsedData;\n\n try {\n parsedData = JSON.parse(data);\n } catch (e) {\n return;\n }\n\n if (parsedData && parsedData.protocol === 'nuanria_messaging' && parsedData.type === 'request') {\n const payload = parsedData.payload;\n\n if (payload && payload.functionId === 'makeChanges') {\n const args = payload.args;\n\n if (args) {\n const [elementStart, elementLength, text, selStart, selLength, formatCommand] = args; // TODO: we should probably handle formatCommand somehow?\n editor.update(() => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isRangeSelection(selection)) {\n const anchor = selection.anchor;\n let anchorNode = anchor.getNode();\n let setSelStart = 0;\n let setSelEnd = 0;\n\n if (lexical.$isTextNode(anchorNode)) {\n // set initial selection\n if (elementStart >= 0 && elementLength >= 0) {\n setSelStart = elementStart;\n setSelEnd = elementStart + elementLength; // If the offset is more than the end, make it the end\n\n selection.setTextNodeRange(anchorNode, setSelStart, anchorNode, setSelEnd);\n }\n }\n\n if (setSelStart !== setSelEnd || text !== '') {\n selection.insertRawText(text);\n anchorNode = anchor.getNode();\n }\n\n if (lexical.$isTextNode(anchorNode)) {\n // set final selection\n setSelStart = selStart;\n setSelEnd = selStart + selLength;\n const anchorNodeTextLength = anchorNode.getTextContentSize(); // If the offset is more than the end, make it the end\n\n setSelStart = setSelStart > anchorNodeTextLength ? anchorNodeTextLength : setSelStart;\n setSelEnd = setSelEnd > anchorNodeTextLength ? anchorNodeTextLength : setSelEnd;\n selection.setTextNodeRange(anchorNode, setSelStart, anchorNode, setSelEnd);\n } // block the chrome extension from handling this event\n\n\n event.stopImmediatePropagation();\n }\n });\n }\n }\n }\n }\n };\n\n window.addEventListener('message', handler, true);\n return () => {\n window.removeEventListener('message', handler, true);\n };\n}\n\nexports.registerDragonSupport = registerDragonSupport;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalDragon = process.env.NODE_ENV === 'development' ? require('./LexicalDragon.dev.js') : require('./LexicalDragon.prod.js')\nmodule.exports = LexicalDragon;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\n\n/** @module @lexical/history */\nconst HISTORY_MERGE = 0;\nconst HISTORY_PUSH = 1;\nconst DISCARD_HISTORY_CANDIDATE = 2;\nconst OTHER = 0;\nconst COMPOSING_CHARACTER = 1;\nconst INSERT_CHARACTER_AFTER_SELECTION = 2;\nconst DELETE_CHARACTER_BEFORE_SELECTION = 3;\nconst DELETE_CHARACTER_AFTER_SELECTION = 4;\n\nfunction getDirtyNodes(editorState, dirtyLeaves, dirtyElements) {\n const nodeMap = editorState._nodeMap;\n const nodes = [];\n\n for (const dirtyLeafKey of dirtyLeaves) {\n const dirtyLeaf = nodeMap.get(dirtyLeafKey);\n\n if (dirtyLeaf !== undefined) {\n nodes.push(dirtyLeaf);\n }\n }\n\n for (const [dirtyElementKey, intentionallyMarkedAsDirty] of dirtyElements) {\n if (!intentionallyMarkedAsDirty) {\n continue;\n }\n\n const dirtyElement = nodeMap.get(dirtyElementKey);\n\n if (dirtyElement !== undefined && !lexical.$isRootNode(dirtyElement)) {\n nodes.push(dirtyElement);\n }\n }\n\n return nodes;\n}\n\nfunction getChangeType(prevEditorState, nextEditorState, dirtyLeavesSet, dirtyElementsSet, isComposing) {\n if (prevEditorState === null || dirtyLeavesSet.size === 0 && dirtyElementsSet.size === 0 && !isComposing) {\n return OTHER;\n }\n\n const nextSelection = nextEditorState._selection;\n const prevSelection = prevEditorState._selection;\n\n if (isComposing) {\n return COMPOSING_CHARACTER;\n }\n\n if (!lexical.$isRangeSelection(nextSelection) || !lexical.$isRangeSelection(prevSelection) || !prevSelection.isCollapsed() || !nextSelection.isCollapsed()) {\n return OTHER;\n }\n\n const dirtyNodes = getDirtyNodes(nextEditorState, dirtyLeavesSet, dirtyElementsSet);\n\n if (dirtyNodes.length === 0) {\n return OTHER;\n } // Catching the case when inserting new text node into an element (e.g. first char in paragraph/list),\n // or after existing node.\n\n\n if (dirtyNodes.length > 1) {\n const nextNodeMap = nextEditorState._nodeMap;\n const nextAnchorNode = nextNodeMap.get(nextSelection.anchor.key);\n const prevAnchorNode = nextNodeMap.get(prevSelection.anchor.key);\n\n if (nextAnchorNode && prevAnchorNode && !prevEditorState._nodeMap.has(nextAnchorNode.__key) && lexical.$isTextNode(nextAnchorNode) && nextAnchorNode.__text.length === 1 && nextSelection.anchor.offset === 1) {\n return INSERT_CHARACTER_AFTER_SELECTION;\n }\n\n return OTHER;\n }\n\n const nextDirtyNode = dirtyNodes[0];\n\n const prevDirtyNode = prevEditorState._nodeMap.get(nextDirtyNode.__key);\n\n if (!lexical.$isTextNode(prevDirtyNode) || !lexical.$isTextNode(nextDirtyNode) || prevDirtyNode.__mode !== nextDirtyNode.__mode) {\n return OTHER;\n }\n\n const prevText = prevDirtyNode.__text;\n const nextText = nextDirtyNode.__text;\n\n if (prevText === nextText) {\n return OTHER;\n }\n\n const nextAnchor = nextSelection.anchor;\n const prevAnchor = prevSelection.anchor;\n\n if (nextAnchor.key !== prevAnchor.key || nextAnchor.type !== 'text') {\n return OTHER;\n }\n\n const nextAnchorOffset = nextAnchor.offset;\n const prevAnchorOffset = prevAnchor.offset;\n const textDiff = nextText.length - prevText.length;\n\n if (textDiff === 1 && prevAnchorOffset === nextAnchorOffset - 1) {\n return INSERT_CHARACTER_AFTER_SELECTION;\n }\n\n if (textDiff === -1 && prevAnchorOffset === nextAnchorOffset + 1) {\n return DELETE_CHARACTER_BEFORE_SELECTION;\n }\n\n if (textDiff === -1 && prevAnchorOffset === nextAnchorOffset) {\n return DELETE_CHARACTER_AFTER_SELECTION;\n }\n\n return OTHER;\n}\n\nfunction isTextNodeUnchanged(key, prevEditorState, nextEditorState) {\n const prevNode = prevEditorState._nodeMap.get(key);\n\n const nextNode = nextEditorState._nodeMap.get(key);\n\n const prevSelection = prevEditorState._selection;\n const nextSelection = nextEditorState._selection;\n let isDeletingLine = false;\n\n if (lexical.$isRangeSelection(prevSelection) && lexical.$isRangeSelection(nextSelection)) {\n isDeletingLine = prevSelection.anchor.type === 'element' && prevSelection.focus.type === 'element' && nextSelection.anchor.type === 'text' && nextSelection.focus.type === 'text';\n }\n\n if (!isDeletingLine && lexical.$isTextNode(prevNode) && lexical.$isTextNode(nextNode)) {\n return prevNode.__type === nextNode.__type && prevNode.__text === nextNode.__text && prevNode.__mode === nextNode.__mode && prevNode.__detail === nextNode.__detail && prevNode.__style === nextNode.__style && prevNode.__format === nextNode.__format && prevNode.__parent === nextNode.__parent;\n }\n\n return false;\n}\n\nfunction createMergeActionGetter(editor, delay) {\n let prevChangeTime = Date.now();\n let prevChangeType = OTHER;\n return (prevEditorState, nextEditorState, currentHistoryEntry, dirtyLeaves, dirtyElements, tags) => {\n const changeTime = Date.now(); // If applying changes from history stack there's no need\n // to run history logic again, as history entries already calculated\n\n if (tags.has('historic')) {\n prevChangeType = OTHER;\n prevChangeTime = changeTime;\n return DISCARD_HISTORY_CANDIDATE;\n }\n\n const changeType = getChangeType(prevEditorState, nextEditorState, dirtyLeaves, dirtyElements, editor.isComposing());\n\n const mergeAction = (() => {\n const isSameEditor = currentHistoryEntry === null || currentHistoryEntry.editor === editor;\n const shouldPushHistory = tags.has('history-push');\n const shouldMergeHistory = !shouldPushHistory && isSameEditor && tags.has('history-merge');\n\n if (shouldMergeHistory) {\n return HISTORY_MERGE;\n }\n\n if (prevEditorState === null) {\n return HISTORY_PUSH;\n }\n\n const selection = nextEditorState._selection;\n const hasDirtyNodes = dirtyLeaves.size > 0 || dirtyElements.size > 0;\n\n if (!hasDirtyNodes) {\n if (selection !== null) {\n return HISTORY_MERGE;\n }\n\n return DISCARD_HISTORY_CANDIDATE;\n }\n\n if (shouldPushHistory === false && changeType !== OTHER && changeType === prevChangeType && changeTime < prevChangeTime + delay && isSameEditor) {\n return HISTORY_MERGE;\n } // A single node might have been marked as dirty, but not have changed\n // due to some node transform reverting the change.\n\n\n if (dirtyLeaves.size === 1) {\n const dirtyLeafKey = Array.from(dirtyLeaves)[0];\n\n if (isTextNodeUnchanged(dirtyLeafKey, prevEditorState, nextEditorState)) {\n return HISTORY_MERGE;\n }\n }\n\n return HISTORY_PUSH;\n })();\n\n prevChangeTime = changeTime;\n prevChangeType = changeType;\n return mergeAction;\n };\n}\n\nfunction redo(editor, historyState) {\n const redoStack = historyState.redoStack;\n const undoStack = historyState.undoStack;\n\n if (redoStack.length !== 0) {\n const current = historyState.current;\n\n if (current !== null) {\n undoStack.push(current);\n editor.dispatchCommand(lexical.CAN_UNDO_COMMAND, true);\n }\n\n const historyStateEntry = redoStack.pop();\n\n if (redoStack.length === 0) {\n editor.dispatchCommand(lexical.CAN_REDO_COMMAND, false);\n }\n\n historyState.current = historyStateEntry || null;\n\n if (historyStateEntry) {\n historyStateEntry.editor.setEditorState(historyStateEntry.editorState, {\n tag: 'historic'\n });\n }\n }\n}\n\nfunction undo(editor, historyState) {\n const redoStack = historyState.redoStack;\n const undoStack = historyState.undoStack;\n const undoStackLength = undoStack.length;\n\n if (undoStackLength !== 0) {\n const current = historyState.current;\n const historyStateEntry = undoStack.pop();\n\n if (current !== null) {\n redoStack.push(current);\n editor.dispatchCommand(lexical.CAN_REDO_COMMAND, true);\n }\n\n if (undoStack.length === 0) {\n editor.dispatchCommand(lexical.CAN_UNDO_COMMAND, false);\n }\n\n historyState.current = historyStateEntry || null;\n\n if (historyStateEntry) {\n historyStateEntry.editor.setEditorState(historyStateEntry.editorState, {\n tag: 'historic'\n });\n }\n }\n}\n\nfunction clearHistory(historyState) {\n historyState.undoStack = [];\n historyState.redoStack = [];\n historyState.current = null;\n}\n/**\n * Registers necessary listeners to manage undo/redo history stack and related editor commands.\n * It returns `unregister` callback that cleans up all listeners and should be called on editor unmount.\n * @param editor - The lexical editor.\n * @param historyState - The history state, containing the current state and the undo/redo stack.\n * @param delay - The time (in milliseconds) the editor should delay generating a new history stack,\n * instead of merging the current changes with the current stack.\n * @returns The listeners cleanup callback function.\n */\n\n\nfunction registerHistory(editor, historyState, delay) {\n const getMergeAction = createMergeActionGetter(editor, delay);\n\n const applyChange = ({\n editorState,\n prevEditorState,\n dirtyLeaves,\n dirtyElements,\n tags\n }) => {\n const current = historyState.current;\n const redoStack = historyState.redoStack;\n const undoStack = historyState.undoStack;\n const currentEditorState = current === null ? null : current.editorState;\n\n if (current !== null && editorState === currentEditorState) {\n return;\n }\n\n const mergeAction = getMergeAction(prevEditorState, editorState, current, dirtyLeaves, dirtyElements, tags);\n\n if (mergeAction === HISTORY_PUSH) {\n if (redoStack.length !== 0) {\n historyState.redoStack = [];\n editor.dispatchCommand(lexical.CAN_REDO_COMMAND, false);\n }\n\n if (current !== null) {\n undoStack.push({ ...current\n });\n editor.dispatchCommand(lexical.CAN_UNDO_COMMAND, true);\n }\n } else if (mergeAction === DISCARD_HISTORY_CANDIDATE) {\n return;\n } // Else we merge\n\n\n historyState.current = {\n editor,\n editorState\n };\n };\n\n const unregisterCommandListener = utils.mergeRegister(editor.registerCommand(lexical.UNDO_COMMAND, () => {\n undo(editor, historyState);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.REDO_COMMAND, () => {\n redo(editor, historyState);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.CLEAR_EDITOR_COMMAND, () => {\n clearHistory(historyState);\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.CLEAR_HISTORY_COMMAND, () => {\n clearHistory(historyState);\n editor.dispatchCommand(lexical.CAN_REDO_COMMAND, false);\n editor.dispatchCommand(lexical.CAN_UNDO_COMMAND, false);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerUpdateListener(applyChange));\n const unregisterUpdateListener = editor.registerUpdateListener(applyChange);\n return () => {\n unregisterCommandListener();\n unregisterUpdateListener();\n };\n}\n/**\n * Creates an empty history state.\n * @returns - The empty history state, as an object.\n */\n\nfunction createEmptyHistoryState() {\n return {\n current: null,\n redoStack: [],\n undoStack: []\n };\n}\n\nexports.createEmptyHistoryState = createEmptyHistoryState;\nexports.registerHistory = registerHistory;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalHistory = process.env.NODE_ENV === 'development' ? require('./LexicalHistory.dev.js') : require('./LexicalHistory.prod.js')\nmodule.exports = LexicalHistory;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar selection = require('@lexical/selection');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\n\n/** @module @lexical/html */\n/**\n * How you parse your html string to get a document is left up to you. In the browser you can use the native\n * DOMParser API to generate a document (see clipboard.ts), but to use in a headless environment you can use JSDom\n * or an equivilant library and pass in the document here.\n */\n\nfunction $generateNodesFromDOM(editor, dom) {\n const elements = dom.body ? dom.body.childNodes : [];\n let lexicalNodes = [];\n\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n\n if (!IGNORE_TAGS.has(element.nodeName)) {\n const lexicalNode = $createNodesFromDOM(element, editor);\n\n if (lexicalNode !== null) {\n lexicalNodes = lexicalNodes.concat(lexicalNode);\n }\n }\n }\n\n return lexicalNodes;\n}\nfunction $generateHtmlFromNodes(editor, selection) {\n if (typeof document === 'undefined' || typeof window === 'undefined') {\n throw new Error('To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.');\n }\n\n const container = document.createElement('div');\n const root = lexical.$getRoot();\n const topLevelChildren = root.getChildren();\n\n for (let i = 0; i < topLevelChildren.length; i++) {\n const topLevelNode = topLevelChildren[i];\n $appendNodesToHTML(editor, topLevelNode, container, selection);\n }\n\n return container.innerHTML;\n}\n\nfunction $appendNodesToHTML(editor, currentNode, parentElement, selection$1 = null) {\n let shouldInclude = selection$1 != null ? currentNode.isSelected(selection$1) : true;\n const shouldExclude = lexical.$isElementNode(currentNode) && currentNode.excludeFromCopy('html');\n let target = currentNode;\n\n if (selection$1 !== null) {\n let clone = selection.$cloneWithProperties(currentNode);\n clone = lexical.$isTextNode(clone) && selection$1 != null ? selection.$sliceSelectedTextNodeContent(selection$1, clone) : clone;\n target = clone;\n }\n\n const children = lexical.$isElementNode(target) ? target.getChildren() : [];\n const {\n element,\n after\n } = target.exportDOM(editor);\n\n if (!element) {\n return false;\n }\n\n const fragment = document.createDocumentFragment();\n\n for (let i = 0; i < children.length; i++) {\n const childNode = children[i];\n const shouldIncludeChild = $appendNodesToHTML(editor, childNode, fragment, selection$1);\n\n if (!shouldInclude && lexical.$isElementNode(currentNode) && shouldIncludeChild && currentNode.extractWithChild(childNode, selection$1, 'html')) {\n shouldInclude = true;\n }\n }\n\n if (shouldInclude && !shouldExclude) {\n if (utils.isHTMLElement(element)) {\n element.append(fragment);\n }\n\n parentElement.append(element);\n\n if (after) {\n const newElement = after.call(target, element);\n if (newElement) element.replaceWith(newElement);\n }\n } else {\n parentElement.append(fragment);\n }\n\n return shouldInclude;\n}\n\nfunction getConversionFunction(domNode, editor) {\n const {\n nodeName\n } = domNode;\n\n const cachedConversions = editor._htmlConversions.get(nodeName.toLowerCase());\n\n let currentConversion = null;\n\n if (cachedConversions !== undefined) {\n for (const cachedConversion of cachedConversions) {\n const domConversion = cachedConversion(domNode);\n\n if (domConversion !== null && (currentConversion === null || currentConversion.priority < domConversion.priority)) {\n currentConversion = domConversion;\n }\n }\n }\n\n return currentConversion !== null ? currentConversion.conversion : null;\n}\n\nconst IGNORE_TAGS = new Set(['STYLE', 'SCRIPT']);\n\nfunction $createNodesFromDOM(node, editor, forChildMap = new Map(), parentLexicalNode) {\n let lexicalNodes = [];\n\n if (IGNORE_TAGS.has(node.nodeName)) {\n return lexicalNodes;\n }\n\n let currentLexicalNode = null;\n const transformFunction = getConversionFunction(node, editor);\n const transformOutput = transformFunction ? transformFunction(node) : null;\n let postTransform = null;\n\n if (transformOutput !== null) {\n postTransform = transformOutput.after;\n const transformNodes = transformOutput.node;\n currentLexicalNode = Array.isArray(transformNodes) ? transformNodes[transformNodes.length - 1] : transformNodes;\n\n if (currentLexicalNode !== null) {\n for (const [, forChildFunction] of forChildMap) {\n currentLexicalNode = forChildFunction(currentLexicalNode, parentLexicalNode);\n\n if (!currentLexicalNode) {\n break;\n }\n }\n\n if (currentLexicalNode) {\n lexicalNodes.push(...(Array.isArray(transformNodes) ? transformNodes : [currentLexicalNode]));\n }\n }\n\n if (transformOutput.forChild != null) {\n forChildMap.set(node.nodeName, transformOutput.forChild);\n }\n } // If the DOM node doesn't have a transformer, we don't know what\n // to do with it but we still need to process any childNodes.\n\n\n const children = node.childNodes;\n let childLexicalNodes = [];\n\n for (let i = 0; i < children.length; i++) {\n childLexicalNodes.push(...$createNodesFromDOM(children[i], editor, new Map(forChildMap), currentLexicalNode));\n }\n\n if (postTransform != null) {\n childLexicalNodes = postTransform(childLexicalNodes);\n }\n\n if (currentLexicalNode == null) {\n // If it hasn't been converted to a LexicalNode, we hoist its children\n // up to the same level as it.\n lexicalNodes = lexicalNodes.concat(childLexicalNodes);\n } else {\n if (lexical.$isElementNode(currentLexicalNode)) {\n // If the current node is a ElementNode after conversion,\n // we can append all the children to it.\n currentLexicalNode.append(...childLexicalNodes);\n }\n }\n\n return lexicalNodes;\n}\n\nexports.$generateHtmlFromNodes = $generateHtmlFromNodes;\nexports.$generateNodesFromDOM = $generateNodesFromDOM;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalHtml = process.env.NODE_ENV === 'development' ? require('./LexicalHtml.dev.js') : require('./LexicalHtml.prod.js')\nmodule.exports = LexicalHtml;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\n\n/** @module @lexical/link */\nconst SUPPORTED_URL_PROTOCOLS = new Set(['http:', 'https:', 'mailto:', 'sms:', 'tel:']);\n/** @noInheritDoc */\n\nclass LinkNode extends lexical.ElementNode {\n /** @internal */\n\n /** @internal */\n\n /** @internal */\n\n /** @internal */\n static getType() {\n return 'link';\n }\n\n static clone(node) {\n return new LinkNode(node.__url, {\n rel: node.__rel,\n target: node.__target,\n title: node.__title\n }, node.__key);\n }\n\n constructor(url, attributes = {}, key) {\n super(key);\n const {\n target = null,\n rel = null,\n title = null\n } = attributes;\n this.__url = url;\n this.__target = target;\n this.__rel = rel;\n this.__title = title;\n }\n\n createDOM(config) {\n const element = document.createElement('a');\n element.href = this.sanitizeUrl(this.__url);\n\n if (this.__target !== null) {\n element.target = this.__target;\n }\n\n if (this.__rel !== null) {\n element.rel = this.__rel;\n }\n\n if (this.__title !== null) {\n element.title = this.__title;\n }\n\n utils.addClassNamesToElement(element, config.theme.link);\n return element;\n }\n\n updateDOM(prevNode, anchor, config) {\n const url = this.__url;\n const target = this.__target;\n const rel = this.__rel;\n const title = this.__title;\n\n if (url !== prevNode.__url) {\n anchor.href = url;\n }\n\n if (target !== prevNode.__target) {\n if (target) {\n anchor.target = target;\n } else {\n anchor.removeAttribute('target');\n }\n }\n\n if (rel !== prevNode.__rel) {\n if (rel) {\n anchor.rel = rel;\n } else {\n anchor.removeAttribute('rel');\n }\n }\n\n if (title !== prevNode.__title) {\n if (title) {\n anchor.title = title;\n } else {\n anchor.removeAttribute('title');\n }\n }\n\n return false;\n }\n\n static importDOM() {\n return {\n a: node => ({\n conversion: convertAnchorElement,\n priority: 1\n })\n };\n }\n\n static importJSON(serializedNode) {\n const node = $createLinkNode(serializedNode.url, {\n rel: serializedNode.rel,\n target: serializedNode.target,\n title: serializedNode.title\n });\n node.setFormat(serializedNode.format);\n node.setIndent(serializedNode.indent);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n sanitizeUrl(url) {\n try {\n const parsedUrl = new URL(url); // eslint-disable-next-line no-script-url\n\n if (!SUPPORTED_URL_PROTOCOLS.has(parsedUrl.protocol)) {\n return 'about:blank';\n }\n } catch {\n return url;\n }\n\n return url;\n }\n\n exportJSON() {\n return { ...super.exportJSON(),\n rel: this.getRel(),\n target: this.getTarget(),\n title: this.getTitle(),\n type: 'link',\n url: this.getURL(),\n version: 1\n };\n }\n\n getURL() {\n return this.getLatest().__url;\n }\n\n setURL(url) {\n const writable = this.getWritable();\n writable.__url = url;\n }\n\n getTarget() {\n return this.getLatest().__target;\n }\n\n setTarget(target) {\n const writable = this.getWritable();\n writable.__target = target;\n }\n\n getRel() {\n return this.getLatest().__rel;\n }\n\n setRel(rel) {\n const writable = this.getWritable();\n writable.__rel = rel;\n }\n\n getTitle() {\n return this.getLatest().__title;\n }\n\n setTitle(title) {\n const writable = this.getWritable();\n writable.__title = title;\n }\n\n insertNewAfter(selection, restoreSelection = true) {\n const element = this.getParentOrThrow().insertNewAfter(selection, restoreSelection);\n\n if (lexical.$isElementNode(element)) {\n const linkNode = $createLinkNode(this.__url, {\n rel: this.__rel,\n target: this.__target,\n title: this.__title\n });\n element.append(linkNode);\n return linkNode;\n }\n\n return null;\n }\n\n canInsertTextBefore() {\n return false;\n }\n\n canInsertTextAfter() {\n return false;\n }\n\n canBeEmpty() {\n return false;\n }\n\n isInline() {\n return true;\n }\n\n extractWithChild(child, selection, destination) {\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n const anchorNode = selection.anchor.getNode();\n const focusNode = selection.focus.getNode();\n return this.isParentOf(anchorNode) && this.isParentOf(focusNode) && selection.getTextContent().length > 0;\n }\n\n}\n\nfunction convertAnchorElement(domNode) {\n let node = null;\n\n if (utils.isHTMLAnchorElement(domNode)) {\n const content = domNode.textContent;\n\n if (content !== null && content !== '') {\n node = $createLinkNode(domNode.getAttribute('href') || '', {\n rel: domNode.getAttribute('rel'),\n target: domNode.getAttribute('target'),\n title: domNode.getAttribute('title')\n });\n }\n }\n\n return {\n node\n };\n}\n/**\n * Takes a URL and creates a LinkNode.\n * @param url - The URL the LinkNode should direct to.\n * @param attributes - Optional HTML a tag attributes { target, rel, title }\n * @returns The LinkNode.\n */\n\n\nfunction $createLinkNode(url, attributes) {\n return lexical.$applyNodeReplacement(new LinkNode(url, attributes));\n}\n/**\n * Determines if node is a LinkNode.\n * @param node - The node to be checked.\n * @returns true if node is a LinkNode, false otherwise.\n */\n\nfunction $isLinkNode(node) {\n return node instanceof LinkNode;\n}\n// Custom node type to override `canInsertTextAfter` that will\n// allow typing within the link\nclass AutoLinkNode extends LinkNode {\n static getType() {\n return 'autolink';\n }\n\n static clone(node) {\n return new AutoLinkNode(node.__url, {\n rel: node.__rel,\n target: node.__target,\n title: node.__title\n }, node.__key);\n }\n\n static importJSON(serializedNode) {\n const node = $createAutoLinkNode(serializedNode.url, {\n rel: serializedNode.rel,\n target: serializedNode.target,\n title: serializedNode.title\n });\n node.setFormat(serializedNode.format);\n node.setIndent(serializedNode.indent);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n static importDOM() {\n // TODO: Should link node should handle the import over autolink?\n return null;\n }\n\n exportJSON() {\n return { ...super.exportJSON(),\n type: 'autolink',\n version: 1\n };\n }\n\n insertNewAfter(selection, restoreSelection = true) {\n const element = this.getParentOrThrow().insertNewAfter(selection, restoreSelection);\n\n if (lexical.$isElementNode(element)) {\n const linkNode = $createAutoLinkNode(this.__url, {\n rel: this._rel,\n target: this.__target,\n title: this.__title\n });\n element.append(linkNode);\n return linkNode;\n }\n\n return null;\n }\n\n}\n/**\n * Takes a URL and creates an AutoLinkNode. AutoLinkNodes are generally automatically generated\n * during typing, which is especially useful when a button to generate a LinkNode is not practical.\n * @param url - The URL the LinkNode should direct to.\n * @param attributes - Optional HTML a tag attributes. { target, rel, title }\n * @returns The LinkNode.\n */\n\nfunction $createAutoLinkNode(url, attributes) {\n return lexical.$applyNodeReplacement(new AutoLinkNode(url, attributes));\n}\n/**\n * Determines if node is an AutoLinkNode.\n * @param node - The node to be checked.\n * @returns true if node is an AutoLinkNode, false otherwise.\n */\n\nfunction $isAutoLinkNode(node) {\n return node instanceof AutoLinkNode;\n}\nconst TOGGLE_LINK_COMMAND = lexical.createCommand('TOGGLE_LINK_COMMAND');\n/**\n * Generates or updates a LinkNode. It can also delete a LinkNode if the URL is null,\n * but saves any children and brings them up to the parent node.\n * @param url - The URL the link directs to.\n * @param attributes - Optional HTML a tag attributes. { target, rel, title }\n */\n\nfunction toggleLink(url, attributes = {}) {\n const {\n target,\n title\n } = attributes;\n const rel = attributes.rel === undefined ? 'noreferrer' : attributes.rel;\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return;\n }\n\n const nodes = selection.extract();\n\n if (url === null) {\n // Remove LinkNodes\n nodes.forEach(node => {\n const parent = node.getParent();\n\n if ($isLinkNode(parent)) {\n const children = parent.getChildren();\n\n for (let i = 0; i < children.length; i++) {\n parent.insertBefore(children[i]);\n }\n\n parent.remove();\n }\n });\n } else {\n // Add or merge LinkNodes\n if (nodes.length === 1) {\n const firstNode = nodes[0]; // if the first node is a LinkNode or if its\n // parent is a LinkNode, we update the URL, target and rel.\n\n const linkNode = $isLinkNode(firstNode) ? firstNode : $getLinkAncestor(firstNode);\n\n if (linkNode !== null) {\n linkNode.setURL(url);\n\n if (target !== undefined) {\n linkNode.setTarget(target);\n }\n\n if (rel !== null) {\n linkNode.setRel(rel);\n }\n\n if (title !== undefined) {\n linkNode.setTitle(title);\n }\n\n return;\n }\n }\n\n let prevParent = null;\n let linkNode = null;\n nodes.forEach(node => {\n const parent = node.getParent();\n\n if (parent === linkNode || parent === null || lexical.$isElementNode(node) && !node.isInline()) {\n return;\n }\n\n if ($isLinkNode(parent)) {\n linkNode = parent;\n parent.setURL(url);\n\n if (target !== undefined) {\n parent.setTarget(target);\n }\n\n if (rel !== null) {\n linkNode.setRel(rel);\n }\n\n if (title !== undefined) {\n linkNode.setTitle(title);\n }\n\n return;\n }\n\n if (!parent.is(prevParent)) {\n prevParent = parent;\n linkNode = $createLinkNode(url, {\n rel,\n target\n });\n\n if ($isLinkNode(parent)) {\n if (node.getPreviousSibling() === null) {\n parent.insertBefore(linkNode);\n } else {\n parent.insertAfter(linkNode);\n }\n } else {\n node.insertBefore(linkNode);\n }\n }\n\n if ($isLinkNode(node)) {\n if (node.is(linkNode)) {\n return;\n }\n\n if (linkNode !== null) {\n const children = node.getChildren();\n\n for (let i = 0; i < children.length; i++) {\n linkNode.append(children[i]);\n }\n }\n\n node.remove();\n return;\n }\n\n if (linkNode !== null) {\n linkNode.append(node);\n }\n });\n }\n}\n\nfunction $getLinkAncestor(node) {\n return $getAncestor(node, $isLinkNode);\n}\n\nfunction $getAncestor(node, predicate) {\n let parent = node;\n\n while (parent !== null && (parent = parent.getParent()) !== null && !predicate(parent));\n\n return parent;\n}\n\nexports.$createAutoLinkNode = $createAutoLinkNode;\nexports.$createLinkNode = $createLinkNode;\nexports.$isAutoLinkNode = $isAutoLinkNode;\nexports.$isLinkNode = $isLinkNode;\nexports.AutoLinkNode = AutoLinkNode;\nexports.LinkNode = LinkNode;\nexports.TOGGLE_LINK_COMMAND = TOGGLE_LINK_COMMAND;\nexports.toggleLink = toggleLink;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalLink = process.env.NODE_ENV === 'development' ? require('./LexicalLink.dev.js') : require('./LexicalLink.prod.js')\nmodule.exports = LexicalLink;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar lexical = require('lexical');\nvar utils = require('@lexical/utils');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n/**\n * Checks the depth of listNode from the root node.\n * @param listNode - The ListNode to be checked.\n * @returns The depth of the ListNode.\n */\n\nfunction $getListDepth(listNode) {\n let depth = 1;\n let parent = listNode.getParent();\n\n while (parent != null) {\n if ($isListItemNode(parent)) {\n const parentList = parent.getParent();\n\n if ($isListNode(parentList)) {\n depth++;\n parent = parentList.getParent();\n continue;\n }\n\n {\n throw Error(`A ListItemNode must have a ListNode for a parent.`);\n }\n }\n\n return depth;\n }\n\n return depth;\n}\n/**\n * Finds the nearest ancestral ListNode and returns it, throws an invariant if listItem is not a ListItemNode.\n * @param listItem - The node to be checked.\n * @returns The ListNode found.\n */\n\nfunction $getTopListNode(listItem) {\n let list = listItem.getParent();\n\n if (!$isListNode(list)) {\n {\n throw Error(`A ListItemNode must have a ListNode for a parent.`);\n }\n }\n\n let parent = list;\n\n while (parent !== null) {\n parent = parent.getParent();\n\n if ($isListNode(parent)) {\n list = parent;\n }\n }\n\n return list;\n}\n/**\n * A recursive Depth-First Search (Postorder Traversal) that finds all of a node's children\n * that are of type ListItemNode and returns them in an array.\n * @param node - The ListNode to start the search.\n * @returns An array containing all nodes of type ListItemNode found.\n */\n// This should probably be $getAllChildrenOfType\n\nfunction $getAllListItems(node) {\n let listItemNodes = [];\n const listChildren = node.getChildren().filter($isListItemNode);\n\n for (let i = 0; i < listChildren.length; i++) {\n const listItemNode = listChildren[i];\n const firstChild = listItemNode.getFirstChild();\n\n if ($isListNode(firstChild)) {\n listItemNodes = listItemNodes.concat($getAllListItems(firstChild));\n } else {\n listItemNodes.push(listItemNode);\n }\n }\n\n return listItemNodes;\n}\n/**\n * Checks to see if the passed node is a ListItemNode and has a ListNode as a child.\n * @param node - The node to be checked.\n * @returns true if the node is a ListItemNode and has a ListNode child, false otherwise.\n */\n\nfunction isNestedListNode(node) {\n return $isListItemNode(node) && $isListNode(node.getFirstChild());\n}\n/**\n * Takes a deeply nested ListNode or ListItemNode and traverses up the branch to delete the first\n * ancestral ListNode (which could be the root ListNode) or ListItemNode with siblings, essentially\n * bringing the deeply nested node up the branch once. Would remove sublist if it has siblings.\n * Should not break ListItem -> List -> ListItem chain as empty List/ItemNodes should be removed on .remove().\n * @param sublist - The nested ListNode or ListItemNode to be brought up the branch.\n */\n\nfunction $removeHighestEmptyListParent(sublist) {\n // Nodes may be repeatedly indented, to create deeply nested lists that each\n // contain just one bullet.\n // Our goal is to remove these (empty) deeply nested lists. The easiest\n // way to do that is crawl back up the tree until we find a node that has siblings\n // (e.g. is actually part of the list contents) and delete that, or delete\n // the root of the list (if no list nodes have siblings.)\n let emptyListPtr = sublist;\n\n while (emptyListPtr.getNextSibling() == null && emptyListPtr.getPreviousSibling() == null) {\n const parent = emptyListPtr.getParent();\n\n if (parent == null || !($isListItemNode(emptyListPtr) || $isListNode(emptyListPtr))) {\n break;\n }\n\n emptyListPtr = parent;\n }\n\n emptyListPtr.remove();\n}\n/**\n * Wraps a node into a ListItemNode.\n * @param node - The node to be wrapped into a ListItemNode\n * @returns The ListItemNode which the passed node is wrapped in.\n */\n\nfunction wrapInListItem(node) {\n const listItemWrapper = $createListItemNode();\n return listItemWrapper.append(node);\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction $isSelectingEmptyListItem(anchorNode, nodes) {\n return $isListItemNode(anchorNode) && (nodes.length === 0 || nodes.length === 1 && anchorNode.is(nodes[0]) && anchorNode.getChildrenSize() === 0);\n}\n\nfunction $getListItemValue(listItem) {\n const list = listItem.getParent();\n let value = 1;\n\n if (list != null) {\n if (!$isListNode(list)) {\n {\n throw Error(`$getListItemValue: list node is not parent of list item node`);\n }\n } else {\n value = list.getStart();\n }\n }\n\n const siblings = listItem.getPreviousSiblings();\n\n for (let i = 0; i < siblings.length; i++) {\n const sibling = siblings[i];\n\n if ($isListItemNode(sibling) && !$isListNode(sibling.getFirstChild())) {\n value++;\n }\n }\n\n return value;\n}\n/**\n * Inserts a new ListNode. If the selection's anchor node is an empty ListItemNode and is a child of\n * the root/shadow root, it will replace the ListItemNode with a ListNode and the old ListItemNode.\n * Otherwise it will replace its parent with a new ListNode and re-insert the ListItemNode and any previous children.\n * If the selection's anchor node is not an empty ListItemNode, it will add a new ListNode or merge an existing ListNode,\n * unless the the node is a leaf node, in which case it will attempt to find a ListNode up the branch and replace it with\n * a new ListNode, or create a new ListNode at the nearest root/shadow root.\n * @param editor - The lexical editor.\n * @param listType - The type of list, \"number\" | \"bullet\" | \"check\".\n */\n\n\nfunction insertList(editor, listType) {\n editor.update(() => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isRangeSelection(selection) || lexical.DEPRECATED_$isGridSelection(selection)) {\n const nodes = selection.getNodes();\n const anchor = selection.anchor;\n const anchorNode = anchor.getNode();\n const anchorNodeParent = anchorNode.getParent();\n\n if ($isSelectingEmptyListItem(anchorNode, nodes)) {\n const list = $createListNode(listType);\n\n if (lexical.$isRootOrShadowRoot(anchorNodeParent)) {\n anchorNode.replace(list);\n const listItem = $createListItemNode();\n\n if (lexical.$isElementNode(anchorNode)) {\n listItem.setFormat(anchorNode.getFormatType());\n listItem.setIndent(anchorNode.getIndent());\n }\n\n list.append(listItem);\n } else if ($isListItemNode(anchorNode)) {\n const parent = anchorNode.getParentOrThrow();\n append(list, parent.getChildren());\n parent.replace(list);\n }\n\n return;\n } else {\n const handled = new Set();\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (lexical.$isElementNode(node) && node.isEmpty() && !handled.has(node.getKey())) {\n createListOrMerge(node, listType);\n continue;\n }\n\n if (lexical.$isLeafNode(node)) {\n let parent = node.getParent();\n\n while (parent != null) {\n const parentKey = parent.getKey();\n\n if ($isListNode(parent)) {\n if (!handled.has(parentKey)) {\n const newListNode = $createListNode(listType);\n append(newListNode, parent.getChildren());\n parent.replace(newListNode);\n updateChildrenListItemValue(newListNode);\n handled.add(parentKey);\n }\n\n break;\n } else {\n const nextParent = parent.getParent();\n\n if (lexical.$isRootOrShadowRoot(nextParent) && !handled.has(parentKey)) {\n handled.add(parentKey);\n createListOrMerge(parent, listType);\n break;\n }\n\n parent = nextParent;\n }\n }\n }\n }\n }\n }\n });\n}\n\nfunction append(node, nodesToAppend) {\n node.splice(node.getChildrenSize(), 0, nodesToAppend);\n}\n\nfunction createListOrMerge(node, listType) {\n if ($isListNode(node)) {\n return node;\n }\n\n const previousSibling = node.getPreviousSibling();\n const nextSibling = node.getNextSibling();\n const listItem = $createListItemNode();\n listItem.setFormat(node.getFormatType());\n listItem.setIndent(node.getIndent());\n append(listItem, node.getChildren());\n\n if ($isListNode(previousSibling) && listType === previousSibling.getListType()) {\n previousSibling.append(listItem);\n node.remove(); // if the same type of list is on both sides, merge them.\n\n if ($isListNode(nextSibling) && listType === nextSibling.getListType()) {\n append(previousSibling, nextSibling.getChildren());\n nextSibling.remove();\n }\n\n return previousSibling;\n } else if ($isListNode(nextSibling) && listType === nextSibling.getListType()) {\n nextSibling.getFirstChildOrThrow().insertBefore(listItem);\n node.remove();\n return nextSibling;\n } else {\n const list = $createListNode(listType);\n list.append(listItem);\n node.replace(list);\n updateChildrenListItemValue(list);\n return list;\n }\n}\n/**\n * A recursive function that goes through each list and their children, including nested lists,\n * appending list2 children after list1 children and updating ListItemNode values.\n * @param list1 - The first list to be merged.\n * @param list2 - The second list to be merged.\n */\n\n\nfunction mergeLists(list1, list2) {\n const listItem1 = list1.getLastChild();\n const listItem2 = list2.getFirstChild();\n\n if (listItem1 && listItem2 && isNestedListNode(listItem1) && isNestedListNode(listItem2)) {\n mergeLists(listItem1.getFirstChild(), listItem2.getFirstChild());\n listItem2.remove();\n }\n\n const toMerge = list2.getChildren();\n\n if (toMerge.length > 0) {\n list1.append(...toMerge);\n updateChildrenListItemValue(list1);\n }\n\n list2.remove();\n}\n/**\n * Searches for the nearest ancestral ListNode and removes it. If selection is an empty ListItemNode\n * it will remove the whole list, including the ListItemNode. For each ListItemNode in the ListNode,\n * removeList will also generate new ParagraphNodes in the removed ListNode's place. Any child node\n * inside a ListItemNode will be appended to the new ParagraphNodes.\n * @param editor - The lexical editor.\n */\n\nfunction removeList(editor) {\n editor.update(() => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isRangeSelection(selection)) {\n const listNodes = new Set();\n const nodes = selection.getNodes();\n const anchorNode = selection.anchor.getNode();\n\n if ($isSelectingEmptyListItem(anchorNode, nodes)) {\n listNodes.add($getTopListNode(anchorNode));\n } else {\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (lexical.$isLeafNode(node)) {\n const listItemNode = utils.$getNearestNodeOfType(node, ListItemNode);\n\n if (listItemNode != null) {\n listNodes.add($getTopListNode(listItemNode));\n }\n }\n }\n }\n\n for (const listNode of listNodes) {\n let insertionPoint = listNode;\n const listItems = $getAllListItems(listNode);\n\n for (const listItemNode of listItems) {\n const paragraph = lexical.$createParagraphNode();\n append(paragraph, listItemNode.getChildren());\n insertionPoint.insertAfter(paragraph);\n insertionPoint = paragraph; // When the anchor and focus fall on the textNode\n // we don't have to change the selection because the textNode will be appended to\n // the newly generated paragraph.\n // When selection is in empty nested list item, selection is actually on the listItemNode.\n // When the corresponding listItemNode is deleted and replaced by the newly generated paragraph\n // we should manually set the selection's focus and anchor to the newly generated paragraph.\n\n if (listItemNode.__key === selection.anchor.key) {\n selection.anchor.set(paragraph.getKey(), 0, 'element');\n }\n\n if (listItemNode.__key === selection.focus.key) {\n selection.focus.set(paragraph.getKey(), 0, 'element');\n }\n\n listItemNode.remove();\n }\n\n listNode.remove();\n }\n }\n });\n}\n/**\n * Takes the value of a child ListItemNode and makes it the value the ListItemNode\n * should be if it isn't already. If only certain children should be updated, they\n * can be passed optionally in an array.\n * @param list - The list whose children are updated.\n * @param children - An array of the children to be updated.\n */\n\nfunction updateChildrenListItemValue(list, children) {\n const childrenOrExisting = children || list.getChildren();\n\n if (childrenOrExisting !== undefined) {\n for (let i = 0; i < childrenOrExisting.length; i++) {\n const child = childrenOrExisting[i];\n\n if ($isListItemNode(child)) {\n const prevValue = child.getValue();\n const nextValue = $getListItemValue(child);\n\n if (prevValue !== nextValue) {\n child.setValue(nextValue);\n }\n }\n }\n }\n}\n/**\n * Adds an empty ListNode/ListItemNode chain at listItemNode, so as to\n * create an indent effect. Won't indent ListItemNodes that have a ListNode as\n * a child, but does merge sibling ListItemNodes if one has a nested ListNode.\n * @param listItemNode - The ListItemNode to be indented.\n */\n\nfunction $handleIndent(listItemNode) {\n // go through each node and decide where to move it.\n const removed = new Set();\n\n if (isNestedListNode(listItemNode) || removed.has(listItemNode.getKey())) {\n return;\n }\n\n const parent = listItemNode.getParent(); // We can cast both of the below `isNestedListNode` only returns a boolean type instead of a user-defined type guards\n\n const nextSibling = listItemNode.getNextSibling();\n const previousSibling = listItemNode.getPreviousSibling(); // if there are nested lists on either side, merge them all together.\n\n if (isNestedListNode(nextSibling) && isNestedListNode(previousSibling)) {\n const innerList = previousSibling.getFirstChild();\n\n if ($isListNode(innerList)) {\n innerList.append(listItemNode);\n const nextInnerList = nextSibling.getFirstChild();\n\n if ($isListNode(nextInnerList)) {\n const children = nextInnerList.getChildren();\n append(innerList, children);\n nextSibling.remove();\n removed.add(nextSibling.getKey());\n }\n\n updateChildrenListItemValue(innerList);\n }\n } else if (isNestedListNode(nextSibling)) {\n // if the ListItemNode is next to a nested ListNode, merge them\n const innerList = nextSibling.getFirstChild();\n\n if ($isListNode(innerList)) {\n const firstChild = innerList.getFirstChild();\n\n if (firstChild !== null) {\n firstChild.insertBefore(listItemNode);\n }\n\n updateChildrenListItemValue(innerList);\n }\n } else if (isNestedListNode(previousSibling)) {\n const innerList = previousSibling.getFirstChild();\n\n if ($isListNode(innerList)) {\n innerList.append(listItemNode);\n updateChildrenListItemValue(innerList);\n }\n } else {\n // otherwise, we need to create a new nested ListNode\n if ($isListNode(parent)) {\n const newListItem = $createListItemNode();\n const newList = $createListNode(parent.getListType());\n newListItem.append(newList);\n newList.append(listItemNode);\n\n if (previousSibling) {\n previousSibling.insertAfter(newListItem);\n } else if (nextSibling) {\n nextSibling.insertBefore(newListItem);\n } else {\n parent.append(newListItem);\n }\n\n updateChildrenListItemValue(newList);\n }\n }\n\n if ($isListNode(parent)) {\n updateChildrenListItemValue(parent);\n }\n}\n/**\n * Removes an indent by removing an empty ListNode/ListItemNode chain. An indented ListItemNode\n * has a great grandparent node of type ListNode, which is where the ListItemNode will reside\n * within as a child.\n * @param listItemNode - The ListItemNode to remove the indent (outdent).\n */\n\nfunction $handleOutdent(listItemNode) {\n // go through each node and decide where to move it.\n if (isNestedListNode(listItemNode)) {\n return;\n }\n\n const parentList = listItemNode.getParent();\n const grandparentListItem = parentList ? parentList.getParent() : undefined;\n const greatGrandparentList = grandparentListItem ? grandparentListItem.getParent() : undefined; // If it doesn't have these ancestors, it's not indented.\n\n if ($isListNode(greatGrandparentList) && $isListItemNode(grandparentListItem) && $isListNode(parentList)) {\n // if it's the first child in it's parent list, insert it into the\n // great grandparent list before the grandparent\n const firstChild = parentList ? parentList.getFirstChild() : undefined;\n const lastChild = parentList ? parentList.getLastChild() : undefined;\n\n if (listItemNode.is(firstChild)) {\n grandparentListItem.insertBefore(listItemNode);\n\n if (parentList.isEmpty()) {\n grandparentListItem.remove();\n } // if it's the last child in it's parent list, insert it into the\n // great grandparent list after the grandparent.\n\n } else if (listItemNode.is(lastChild)) {\n grandparentListItem.insertAfter(listItemNode);\n\n if (parentList.isEmpty()) {\n grandparentListItem.remove();\n }\n } else {\n // otherwise, we need to split the siblings into two new nested lists\n const listType = parentList.getListType();\n const previousSiblingsListItem = $createListItemNode();\n const previousSiblingsList = $createListNode(listType);\n previousSiblingsListItem.append(previousSiblingsList);\n listItemNode.getPreviousSiblings().forEach(sibling => previousSiblingsList.append(sibling));\n const nextSiblingsListItem = $createListItemNode();\n const nextSiblingsList = $createListNode(listType);\n nextSiblingsListItem.append(nextSiblingsList);\n append(nextSiblingsList, listItemNode.getNextSiblings()); // put the sibling nested lists on either side of the grandparent list item in the great grandparent.\n\n grandparentListItem.insertBefore(previousSiblingsListItem);\n grandparentListItem.insertAfter(nextSiblingsListItem); // replace the grandparent list item (now between the siblings) with the outdented list item.\n\n grandparentListItem.replace(listItemNode);\n }\n\n updateChildrenListItemValue(parentList);\n updateChildrenListItemValue(greatGrandparentList);\n }\n}\n/**\n * Attempts to insert a ParagraphNode at selection and selects the new node. The selection must contain a ListItemNode\n * or a node that does not already contain text. If its grandparent is the root/shadow root, it will get the ListNode\n * (which should be the parent node) and insert the ParagraphNode as a sibling to the ListNode. If the ListNode is\n * nested in a ListItemNode instead, it will add the ParagraphNode after the grandparent ListItemNode.\n * Throws an invariant if the selection is not a child of a ListNode.\n * @returns true if a ParagraphNode was inserted succesfully, false if there is no selection\n * or the selection does not contain a ListItemNode or the node already holds text.\n */\n\nfunction $handleListInsertParagraph() {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection) || !selection.isCollapsed()) {\n return false;\n } // Only run this code on empty list items\n\n\n const anchor = selection.anchor.getNode();\n\n if (!$isListItemNode(anchor) || anchor.getChildrenSize() !== 0) {\n return false;\n }\n\n const topListNode = $getTopListNode(anchor);\n const parent = anchor.getParent();\n\n if (!$isListNode(parent)) {\n throw Error(`A ListItemNode must have a ListNode for a parent.`);\n }\n\n const grandparent = parent.getParent();\n let replacementNode;\n\n if (lexical.$isRootOrShadowRoot(grandparent)) {\n replacementNode = lexical.$createParagraphNode();\n topListNode.insertAfter(replacementNode);\n } else if ($isListItemNode(grandparent)) {\n replacementNode = $createListItemNode();\n grandparent.insertAfter(replacementNode);\n } else {\n return false;\n }\n\n replacementNode.select();\n const nextSiblings = anchor.getNextSiblings();\n\n if (nextSiblings.length > 0) {\n const newList = $createListNode(parent.getListType());\n\n if (lexical.$isParagraphNode(replacementNode)) {\n replacementNode.insertAfter(newList);\n } else {\n const newListItem = $createListItemNode();\n newListItem.append(newList);\n replacementNode.insertAfter(newListItem);\n }\n\n nextSiblings.forEach(sibling => {\n sibling.remove();\n newList.append(sibling);\n });\n } // Don't leave hanging nested empty lists\n\n\n $removeHighestEmptyListParent(anchor);\n return true;\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/** @noInheritDoc */\nclass ListItemNode extends lexical.ElementNode {\n /** @internal */\n\n /** @internal */\n static getType() {\n return 'listitem';\n }\n\n static clone(node) {\n return new ListItemNode(node.__value, node.__checked, node.__key);\n }\n\n constructor(value, checked, key) {\n super(key);\n this.__value = value === undefined ? 1 : value;\n this.__checked = checked;\n }\n\n createDOM(config) {\n const element = document.createElement('li');\n const parent = this.getParent();\n\n if ($isListNode(parent) && parent.getListType() === 'check') {\n updateListItemChecked(element, this, null);\n }\n\n element.value = this.__value;\n $setListItemThemeClassNames(element, config.theme, this);\n return element;\n }\n\n updateDOM(prevNode, dom, config) {\n const parent = this.getParent();\n\n if ($isListNode(parent) && parent.getListType() === 'check') {\n updateListItemChecked(dom, this, prevNode);\n } // @ts-expect-error - this is always HTMLListItemElement\n\n\n dom.value = this.__value;\n $setListItemThemeClassNames(dom, config.theme, this);\n return false;\n }\n\n static transform() {\n return node => {\n const parent = node.getParent();\n\n if ($isListNode(parent)) {\n updateChildrenListItemValue(parent);\n\n if (parent.getListType() !== 'check' && node.getChecked() != null) {\n node.setChecked(undefined);\n }\n }\n };\n }\n\n static importDOM() {\n return {\n li: node => ({\n conversion: convertListItemElement,\n priority: 0\n })\n };\n }\n\n static importJSON(serializedNode) {\n const node = $createListItemNode();\n node.setChecked(serializedNode.checked);\n node.setValue(serializedNode.value);\n node.setFormat(serializedNode.format);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n exportJSON() {\n return { ...super.exportJSON(),\n checked: this.getChecked(),\n type: 'listitem',\n value: this.getValue(),\n version: 1\n };\n }\n\n append(...nodes) {\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (lexical.$isElementNode(node) && this.canMergeWith(node)) {\n const children = node.getChildren();\n this.append(...children);\n node.remove();\n } else {\n super.append(node);\n }\n }\n\n return this;\n }\n\n replace(replaceWithNode, includeChildren) {\n if ($isListItemNode(replaceWithNode)) {\n return super.replace(replaceWithNode);\n }\n\n this.setIndent(0);\n const list = this.getParentOrThrow();\n if (!$isListNode(list)) return replaceWithNode;\n\n if (list.__first === this.getKey()) {\n list.insertBefore(replaceWithNode);\n } else if (list.__last === this.getKey()) {\n list.insertAfter(replaceWithNode);\n } else {\n // Split the list\n const newList = $createListNode(list.getListType());\n let nextSibling = this.getNextSibling();\n\n while (nextSibling) {\n const nodeToAppend = nextSibling;\n nextSibling = nextSibling.getNextSibling();\n newList.append(nodeToAppend);\n }\n\n list.insertAfter(replaceWithNode);\n replaceWithNode.insertAfter(newList);\n }\n\n if (includeChildren) {\n this.getChildren().forEach(child => {\n replaceWithNode.append(child);\n });\n }\n\n this.remove();\n\n if (list.getChildrenSize() === 0) {\n list.remove();\n }\n\n return replaceWithNode;\n }\n\n insertAfter(node, restoreSelection = true) {\n const listNode = this.getParentOrThrow();\n\n if (!$isListNode(listNode)) {\n {\n throw Error(`insertAfter: list node is not parent of list item node`);\n }\n }\n\n const siblings = this.getNextSiblings();\n\n if ($isListItemNode(node)) {\n const after = super.insertAfter(node, restoreSelection);\n const afterListNode = node.getParentOrThrow();\n\n if ($isListNode(afterListNode)) {\n updateChildrenListItemValue(afterListNode);\n }\n\n return after;\n } // Attempt to merge if the list is of the same type.\n\n\n if ($isListNode(node)) {\n let child = node;\n const children = node.getChildren();\n\n for (let i = children.length - 1; i >= 0; i--) {\n child = children[i];\n this.insertAfter(child, restoreSelection);\n }\n\n return child;\n } // Otherwise, split the list\n // Split the lists and insert the node in between them\n\n\n listNode.insertAfter(node, restoreSelection);\n\n if (siblings.length !== 0) {\n const newListNode = $createListNode(listNode.getListType());\n siblings.forEach(sibling => newListNode.append(sibling));\n node.insertAfter(newListNode, restoreSelection);\n }\n\n return node;\n }\n\n remove(preserveEmptyParent) {\n const prevSibling = this.getPreviousSibling();\n const nextSibling = this.getNextSibling();\n super.remove(preserveEmptyParent);\n\n if (prevSibling && nextSibling && isNestedListNode(prevSibling) && isNestedListNode(nextSibling)) {\n mergeLists(prevSibling.getFirstChild(), nextSibling.getFirstChild());\n nextSibling.remove();\n } else if (nextSibling) {\n const parent = nextSibling.getParent();\n\n if ($isListNode(parent)) {\n updateChildrenListItemValue(parent);\n }\n }\n }\n\n insertNewAfter(_, restoreSelection = true) {\n const newElement = $createListItemNode(this.__checked == null ? undefined : false);\n this.insertAfter(newElement, restoreSelection);\n return newElement;\n }\n\n collapseAtStart(selection) {\n const paragraph = lexical.$createParagraphNode();\n const children = this.getChildren();\n children.forEach(child => paragraph.append(child));\n const listNode = this.getParentOrThrow();\n const listNodeParent = listNode.getParentOrThrow();\n const isIndented = $isListItemNode(listNodeParent);\n\n if (listNode.getChildrenSize() === 1) {\n if (isIndented) {\n // if the list node is nested, we just want to remove it,\n // effectively unindenting it.\n listNode.remove();\n listNodeParent.select();\n } else {\n listNode.insertBefore(paragraph);\n listNode.remove(); // If we have selection on the list item, we'll need to move it\n // to the paragraph\n\n const anchor = selection.anchor;\n const focus = selection.focus;\n const key = paragraph.getKey();\n\n if (anchor.type === 'element' && anchor.getNode().is(this)) {\n anchor.set(key, anchor.offset, 'element');\n }\n\n if (focus.type === 'element' && focus.getNode().is(this)) {\n focus.set(key, focus.offset, 'element');\n }\n }\n } else {\n listNode.insertBefore(paragraph);\n this.remove();\n }\n\n return true;\n }\n\n getValue() {\n const self = this.getLatest();\n return self.__value;\n }\n\n setValue(value) {\n const self = this.getWritable();\n self.__value = value;\n }\n\n getChecked() {\n const self = this.getLatest();\n return self.__checked;\n }\n\n setChecked(checked) {\n const self = this.getWritable();\n self.__checked = checked;\n }\n\n toggleChecked() {\n this.setChecked(!this.__checked);\n }\n\n getIndent() {\n // If we don't have a parent, we are likely serializing\n const parent = this.getParent();\n\n if (parent === null) {\n return this.getLatest().__indent;\n } // ListItemNode should always have a ListNode for a parent.\n\n\n let listNodeParent = parent.getParentOrThrow();\n let indentLevel = 0;\n\n while ($isListItemNode(listNodeParent)) {\n listNodeParent = listNodeParent.getParentOrThrow().getParentOrThrow();\n indentLevel++;\n }\n\n return indentLevel;\n }\n\n setIndent(indent) {\n if (!(typeof indent === 'number' && indent > -1)) {\n throw Error(`Invalid indent value.`);\n }\n\n let currentIndent = this.getIndent();\n\n while (currentIndent !== indent) {\n if (currentIndent < indent) {\n $handleIndent(this);\n currentIndent++;\n } else {\n $handleOutdent(this);\n currentIndent--;\n }\n }\n\n return this;\n }\n\n insertBefore(nodeToInsert) {\n if ($isListItemNode(nodeToInsert)) {\n const parent = this.getParentOrThrow();\n\n if ($isListNode(parent)) {\n const siblings = this.getNextSiblings();\n updateChildrenListItemValue(parent, siblings);\n }\n }\n\n return super.insertBefore(nodeToInsert);\n }\n\n canInsertAfter(node) {\n return $isListItemNode(node);\n }\n\n canReplaceWith(replacement) {\n return $isListItemNode(replacement);\n }\n\n canMergeWith(node) {\n return lexical.$isParagraphNode(node) || $isListItemNode(node);\n }\n\n extractWithChild(child, selection) {\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n const anchorNode = selection.anchor.getNode();\n const focusNode = selection.focus.getNode();\n return this.isParentOf(anchorNode) && this.isParentOf(focusNode) && this.getTextContent().length === selection.getTextContent().length;\n }\n\n isParentRequired() {\n return true;\n }\n\n createParentElementNode() {\n return $createListNode('bullet');\n }\n\n}\n\nfunction $setListItemThemeClassNames(dom, editorThemeClasses, node) {\n const classesToAdd = [];\n const classesToRemove = [];\n const listTheme = editorThemeClasses.list;\n const listItemClassName = listTheme ? listTheme.listitem : undefined;\n let nestedListItemClassName;\n\n if (listTheme && listTheme.nested) {\n nestedListItemClassName = listTheme.nested.listitem;\n }\n\n if (listItemClassName !== undefined) {\n const listItemClasses = listItemClassName.split(' ');\n classesToAdd.push(...listItemClasses);\n }\n\n if (listTheme) {\n const parentNode = node.getParent();\n const isCheckList = $isListNode(parentNode) && parentNode.getListType() === 'check';\n const checked = node.getChecked();\n\n if (!isCheckList || checked) {\n classesToRemove.push(listTheme.listitemUnchecked);\n }\n\n if (!isCheckList || !checked) {\n classesToRemove.push(listTheme.listitemChecked);\n }\n\n if (isCheckList) {\n classesToAdd.push(checked ? listTheme.listitemChecked : listTheme.listitemUnchecked);\n }\n }\n\n if (nestedListItemClassName !== undefined) {\n const nestedListItemClasses = nestedListItemClassName.split(' ');\n\n if (node.getChildren().some(child => $isListNode(child))) {\n classesToAdd.push(...nestedListItemClasses);\n } else {\n classesToRemove.push(...nestedListItemClasses);\n }\n }\n\n if (classesToRemove.length > 0) {\n utils.removeClassNamesFromElement(dom, ...classesToRemove);\n }\n\n if (classesToAdd.length > 0) {\n utils.addClassNamesToElement(dom, ...classesToAdd);\n }\n}\n\nfunction updateListItemChecked(dom, listItemNode, prevListItemNode, listNode) {\n // Only add attributes for leaf list items\n if ($isListNode(listItemNode.getFirstChild())) {\n dom.removeAttribute('role');\n dom.removeAttribute('tabIndex');\n dom.removeAttribute('aria-checked');\n } else {\n dom.setAttribute('role', 'checkbox');\n dom.setAttribute('tabIndex', '-1');\n\n if (!prevListItemNode || listItemNode.__checked !== prevListItemNode.__checked) {\n dom.setAttribute('aria-checked', listItemNode.getChecked() ? 'true' : 'false');\n }\n }\n}\n\nfunction convertListItemElement(domNode) {\n const checked = utils.isHTMLElement(domNode) && domNode.getAttribute('aria-checked') === 'true';\n return {\n node: $createListItemNode(checked)\n };\n}\n/**\n * Creates a new List Item node, passing true/false will convert it to a checkbox input.\n * @param checked - Is the List Item a checkbox and, if so, is it checked? undefined/null: not a checkbox, true/false is a checkbox and checked/unchecked, respectively.\n * @returns The new List Item.\n */\n\n\nfunction $createListItemNode(checked) {\n return lexical.$applyNodeReplacement(new ListItemNode(undefined, checked));\n}\n/**\n * Checks to see if the node is a ListItemNode.\n * @param node - The node to be checked.\n * @returns true if the node is a ListItemNode, false otherwise.\n */\n\nfunction $isListItemNode(node) {\n return node instanceof ListItemNode;\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/** @noInheritDoc */\nclass ListNode extends lexical.ElementNode {\n /** @internal */\n\n /** @internal */\n\n /** @internal */\n static getType() {\n return 'list';\n }\n\n static clone(node) {\n const listType = node.__listType || TAG_TO_LIST_TYPE[node.__tag];\n return new ListNode(listType, node.__start, node.__key);\n }\n\n constructor(listType, start, key) {\n super(key);\n\n const _listType = TAG_TO_LIST_TYPE[listType] || listType;\n\n this.__listType = _listType;\n this.__tag = _listType === 'number' ? 'ol' : 'ul';\n this.__start = start;\n }\n\n getTag() {\n return this.__tag;\n }\n\n setListType(type) {\n const writable = this.getWritable();\n writable.__listType = type;\n writable.__tag = type === 'number' ? 'ol' : 'ul';\n }\n\n getListType() {\n return this.__listType;\n }\n\n getStart() {\n return this.__start;\n } // View\n\n\n createDOM(config, _editor) {\n const tag = this.__tag;\n const dom = document.createElement(tag);\n\n if (this.__start !== 1) {\n dom.setAttribute('start', String(this.__start));\n } // @ts-expect-error Internal field.\n\n\n dom.__lexicalListType = this.__listType;\n setListThemeClassNames(dom, config.theme, this);\n return dom;\n }\n\n updateDOM(prevNode, dom, config) {\n if (prevNode.__tag !== this.__tag) {\n return true;\n }\n\n setListThemeClassNames(dom, config.theme, this);\n return false;\n }\n\n static importDOM() {\n return {\n ol: node => ({\n conversion: convertListNode,\n priority: 0\n }),\n ul: node => ({\n conversion: convertListNode,\n priority: 0\n })\n };\n }\n\n static importJSON(serializedNode) {\n const node = $createListNode(serializedNode.listType, serializedNode.start);\n node.setFormat(serializedNode.format);\n node.setIndent(serializedNode.indent);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n exportDOM(editor) {\n const {\n element\n } = super.exportDOM(editor);\n\n if (element && utils.isHTMLElement(element)) {\n if (this.__start !== 1) {\n element.setAttribute('start', String(this.__start));\n }\n\n if (this.__listType === 'check') {\n element.setAttribute('__lexicalListType', 'check');\n }\n }\n\n return {\n element\n };\n }\n\n exportJSON() {\n return { ...super.exportJSON(),\n listType: this.getListType(),\n start: this.getStart(),\n tag: this.getTag(),\n type: 'list',\n version: 1\n };\n }\n\n canBeEmpty() {\n return false;\n }\n\n canIndent() {\n return false;\n }\n\n append(...nodesToAppend) {\n for (let i = 0; i < nodesToAppend.length; i++) {\n const currentNode = nodesToAppend[i];\n\n if ($isListItemNode(currentNode)) {\n super.append(currentNode);\n } else {\n const listItemNode = $createListItemNode();\n\n if ($isListNode(currentNode)) {\n listItemNode.append(currentNode);\n } else if (lexical.$isElementNode(currentNode)) {\n const textNode = lexical.$createTextNode(currentNode.getTextContent());\n listItemNode.append(textNode);\n } else {\n listItemNode.append(currentNode);\n }\n\n super.append(listItemNode);\n }\n }\n\n updateChildrenListItemValue(this);\n return this;\n }\n\n extractWithChild(child) {\n return $isListItemNode(child);\n }\n\n}\n\nfunction setListThemeClassNames(dom, editorThemeClasses, node) {\n const classesToAdd = [];\n const classesToRemove = [];\n const listTheme = editorThemeClasses.list;\n\n if (listTheme !== undefined) {\n const listLevelsClassNames = listTheme[`${node.__tag}Depth`] || [];\n const listDepth = $getListDepth(node) - 1;\n const normalizedListDepth = listDepth % listLevelsClassNames.length;\n const listLevelClassName = listLevelsClassNames[normalizedListDepth];\n const listClassName = listTheme[node.__tag];\n let nestedListClassName;\n const nestedListTheme = listTheme.nested;\n\n if (nestedListTheme !== undefined && nestedListTheme.list) {\n nestedListClassName = nestedListTheme.list;\n }\n\n if (listClassName !== undefined) {\n classesToAdd.push(listClassName);\n }\n\n if (listLevelClassName !== undefined) {\n const listItemClasses = listLevelClassName.split(' ');\n classesToAdd.push(...listItemClasses);\n\n for (let i = 0; i < listLevelsClassNames.length; i++) {\n if (i !== normalizedListDepth) {\n classesToRemove.push(node.__tag + i);\n }\n }\n }\n\n if (nestedListClassName !== undefined) {\n const nestedListItemClasses = nestedListClassName.split(' ');\n\n if (listDepth > 1) {\n classesToAdd.push(...nestedListItemClasses);\n } else {\n classesToRemove.push(...nestedListItemClasses);\n }\n }\n }\n\n if (classesToRemove.length > 0) {\n utils.removeClassNamesFromElement(dom, ...classesToRemove);\n }\n\n if (classesToAdd.length > 0) {\n utils.addClassNamesToElement(dom, ...classesToAdd);\n }\n}\n/*\n * This function normalizes the children of a ListNode after the conversion from HTML,\n * ensuring that they are all ListItemNodes and contain either a single nested ListNode\n * or some other inline content.\n */\n\n\nfunction normalizeChildren(nodes) {\n const normalizedListItems = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if ($isListItemNode(node)) {\n normalizedListItems.push(node);\n const children = node.getChildren();\n\n if (children.length > 1) {\n children.forEach(child => {\n if ($isListNode(child)) {\n normalizedListItems.push(wrapInListItem(child));\n }\n });\n }\n } else {\n normalizedListItems.push(wrapInListItem(node));\n }\n }\n\n return normalizedListItems;\n}\n\nfunction convertListNode(domNode) {\n const nodeName = domNode.nodeName.toLowerCase();\n let node = null;\n\n if (nodeName === 'ol') {\n // @ts-ignore\n const start = domNode.start;\n node = $createListNode('number', start);\n } else if (nodeName === 'ul') {\n if (utils.isHTMLElement(domNode) && domNode.getAttribute('__lexicallisttype') === 'check') {\n node = $createListNode('check');\n } else {\n node = $createListNode('bullet');\n }\n }\n\n return {\n after: normalizeChildren,\n node\n };\n}\n\nconst TAG_TO_LIST_TYPE = {\n ol: 'number',\n ul: 'bullet'\n};\n/**\n * Creates a ListNode of listType.\n * @param listType - The type of list to be created. Can be 'number', 'bullet', or 'check'.\n * @param start - Where an ordered list starts its count, start = 1 if left undefined.\n * @returns The new ListNode\n */\n\nfunction $createListNode(listType, start = 1) {\n return lexical.$applyNodeReplacement(new ListNode(listType, start));\n}\n/**\n * Checks to see if the node is a ListNode.\n * @param node - The node to be checked.\n * @returns true if the node is a ListNode, false otherwise.\n */\n\nfunction $isListNode(node) {\n return node instanceof ListNode;\n}\n\n/** @module @lexical/list */\nconst INSERT_UNORDERED_LIST_COMMAND = lexical.createCommand('INSERT_UNORDERED_LIST_COMMAND');\nconst INSERT_ORDERED_LIST_COMMAND = lexical.createCommand('INSERT_ORDERED_LIST_COMMAND');\nconst INSERT_CHECK_LIST_COMMAND = lexical.createCommand('INSERT_CHECK_LIST_COMMAND');\nconst REMOVE_LIST_COMMAND = lexical.createCommand('REMOVE_LIST_COMMAND');\n\nexports.$createListItemNode = $createListItemNode;\nexports.$createListNode = $createListNode;\nexports.$getListDepth = $getListDepth;\nexports.$handleListInsertParagraph = $handleListInsertParagraph;\nexports.$isListItemNode = $isListItemNode;\nexports.$isListNode = $isListNode;\nexports.INSERT_CHECK_LIST_COMMAND = INSERT_CHECK_LIST_COMMAND;\nexports.INSERT_ORDERED_LIST_COMMAND = INSERT_ORDERED_LIST_COMMAND;\nexports.INSERT_UNORDERED_LIST_COMMAND = INSERT_UNORDERED_LIST_COMMAND;\nexports.ListItemNode = ListItemNode;\nexports.ListNode = ListNode;\nexports.REMOVE_LIST_COMMAND = REMOVE_LIST_COMMAND;\nexports.insertList = insertList;\nexports.removeList = removeList;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalList = process.env.NODE_ENV === 'development' ? require('./LexicalList.dev.js') : require('./LexicalList.prod.js')\nmodule.exports = LexicalList;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar link = require('@lexical/link');\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar LexicalNodeMenuPlugin = require('@lexical/react/LexicalNodeMenuPlugin');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\nvar React = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst URL_MATCHER = /((https?:\\/\\/(www\\.)?)|(www\\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;\nconst INSERT_EMBED_COMMAND = lexical.createCommand('INSERT_EMBED_COMMAND');\nclass AutoEmbedOption extends LexicalNodeMenuPlugin.MenuOption {\n constructor(title, options) {\n super(title);\n this.title = title;\n this.onSelect = options.onSelect.bind(this);\n }\n\n}\nfunction LexicalAutoEmbedPlugin({\n embedConfigs,\n onOpenEmbedModalForConfig,\n getMenuOptions,\n menuRenderFn\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const [nodeKey, setNodeKey] = React.useState(null);\n const [activeEmbedConfig, setActiveEmbedConfig] = React.useState(null);\n const reset = React.useCallback(() => {\n setNodeKey(null);\n setActiveEmbedConfig(null);\n }, []);\n const checkIfLinkNodeIsEmbeddable = React.useCallback(key => {\n editor.getEditorState().read(async () => {\n const linkNode = lexical.$getNodeByKey(key);\n\n if (link.$isLinkNode(linkNode)) {\n for (let i = 0; i < embedConfigs.length; i++) {\n const embedConfig = embedConfigs[i];\n const urlMatch = await Promise.resolve(embedConfig.parseUrl(linkNode.__url));\n\n if (urlMatch != null) {\n setActiveEmbedConfig(embedConfig);\n setNodeKey(linkNode.getKey());\n }\n }\n }\n });\n }, [editor, embedConfigs]);\n React.useEffect(() => {\n const listener = (nodeMutations, {\n updateTags,\n dirtyLeaves\n }) => {\n for (const [key, mutation] of nodeMutations) {\n if (mutation === 'created' && updateTags.has('paste') && dirtyLeaves.size <= 3) {\n checkIfLinkNodeIsEmbeddable(key);\n } else if (key === nodeKey) {\n reset();\n }\n }\n };\n\n return utils.mergeRegister(...[link.LinkNode, link.AutoLinkNode].map(Klass => editor.registerMutationListener(Klass, (...args) => listener(...args))));\n }, [checkIfLinkNodeIsEmbeddable, editor, embedConfigs, nodeKey, reset]);\n React.useEffect(() => {\n return editor.registerCommand(INSERT_EMBED_COMMAND, embedConfigType => {\n const embedConfig = embedConfigs.find(({\n type\n }) => type === embedConfigType);\n\n if (embedConfig) {\n onOpenEmbedModalForConfig(embedConfig);\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR);\n }, [editor, embedConfigs, onOpenEmbedModalForConfig]);\n const embedLinkViaActiveEmbedConfig = React.useCallback(async () => {\n if (activeEmbedConfig != null && nodeKey != null) {\n const linkNode = editor.getEditorState().read(() => {\n const node = lexical.$getNodeByKey(nodeKey);\n\n if (link.$isLinkNode(node)) {\n return node;\n }\n\n return null;\n });\n\n if (link.$isLinkNode(linkNode)) {\n const result = await Promise.resolve(activeEmbedConfig.parseUrl(linkNode.__url));\n\n if (result != null) {\n editor.update(() => {\n if (!lexical.$getSelection()) {\n linkNode.selectEnd();\n }\n\n activeEmbedConfig.insertNode(editor, result);\n\n if (linkNode.isAttached()) {\n linkNode.remove();\n }\n });\n }\n }\n }\n }, [activeEmbedConfig, editor, nodeKey]);\n const options = React.useMemo(() => {\n return activeEmbedConfig != null && nodeKey != null ? getMenuOptions(activeEmbedConfig, embedLinkViaActiveEmbedConfig, reset) : [];\n }, [activeEmbedConfig, embedLinkViaActiveEmbedConfig, getMenuOptions, nodeKey, reset]);\n const onSelectOption = React.useCallback((selectedOption, targetNode, closeMenu) => {\n editor.update(() => {\n selectedOption.onSelect(targetNode);\n closeMenu();\n });\n }, [editor]);\n return nodeKey != null ? /*#__PURE__*/React.createElement(LexicalNodeMenuPlugin.LexicalNodeMenuPlugin, {\n nodeKey: nodeKey,\n onClose: reset,\n onSelectOption: onSelectOption,\n options: options,\n menuRenderFn: menuRenderFn\n }) : null;\n}\n\nexports.AutoEmbedOption = AutoEmbedOption;\nexports.INSERT_EMBED_COMMAND = INSERT_EMBED_COMMAND;\nexports.LexicalAutoEmbedPlugin = LexicalAutoEmbedPlugin;\nexports.URL_MATCHER = URL_MATCHER;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalAutoEmbedPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalAutoEmbedPlugin.dev.js') : require('./LexicalAutoEmbedPlugin.prod.js')\nmodule.exports = LexicalAutoEmbedPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction AutoFocusPlugin({\n defaultSelection\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n react.useEffect(() => {\n editor.focus(() => {\n // If we try and move selection to the same point with setBaseAndExtent, it won't\n // trigger a re-focus on the element. So in the case this occurs, we'll need to correct it.\n // Normally this is fine, Selection API !== Focus API, but fore the intents of the naming\n // of this plugin, which should preserve focus too.\n const activeElement = document.activeElement;\n const rootElement = editor.getRootElement();\n\n if (rootElement !== null && (activeElement === null || !rootElement.contains(activeElement))) {\n // Note: preventScroll won't work in Webkit.\n rootElement.focus({\n preventScroll: true\n });\n }\n }, {\n defaultSelection\n });\n }, [defaultSelection, editor]);\n return null;\n}\n\nexports.AutoFocusPlugin = AutoFocusPlugin;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalAutoFocusPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalAutoFocusPlugin.dev.js') : require('./LexicalAutoFocusPlugin.prod.js')\nmodule.exports = LexicalAutoFocusPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar link = require('@lexical/link');\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction createLinkMatcherWithRegExp(regExp, urlTransformer = text => text) {\n return text => {\n const match = regExp.exec(text);\n if (match === null) return null;\n return {\n index: match.index,\n length: match[0].length,\n text: match[0],\n url: urlTransformer(text)\n };\n };\n}\n\nfunction findFirstMatch(text, matchers) {\n for (let i = 0; i < matchers.length; i++) {\n const match = matchers[i](text);\n\n if (match) {\n return match;\n }\n }\n\n return null;\n}\n\nconst PUNCTUATION_OR_SPACE = /[.,;\\s]/;\n\nfunction isSeparator(char) {\n return PUNCTUATION_OR_SPACE.test(char);\n}\n\nfunction endsWithSeparator(textContent) {\n return isSeparator(textContent[textContent.length - 1]);\n}\n\nfunction startsWithSeparator(textContent) {\n return isSeparator(textContent[0]);\n}\n\nfunction isPreviousNodeValid(node) {\n let previousNode = node.getPreviousSibling();\n\n if (lexical.$isElementNode(previousNode)) {\n previousNode = previousNode.getLastDescendant();\n }\n\n return previousNode === null || lexical.$isLineBreakNode(previousNode) || lexical.$isTextNode(previousNode) && endsWithSeparator(previousNode.getTextContent());\n}\n\nfunction isNextNodeValid(node) {\n let nextNode = node.getNextSibling();\n\n if (lexical.$isElementNode(nextNode)) {\n nextNode = nextNode.getFirstDescendant();\n }\n\n return nextNode === null || lexical.$isLineBreakNode(nextNode) || lexical.$isTextNode(nextNode) && startsWithSeparator(nextNode.getTextContent());\n}\n\nfunction isContentAroundIsValid(matchStart, matchEnd, text, node) {\n const contentBeforeIsValid = matchStart > 0 ? isSeparator(text[matchStart - 1]) : isPreviousNodeValid(node);\n\n if (!contentBeforeIsValid) {\n return false;\n }\n\n const contentAfterIsValid = matchEnd < text.length ? isSeparator(text[matchEnd]) : isNextNodeValid(node);\n return contentAfterIsValid;\n}\n\nfunction handleLinkCreation(node, matchers, onChange) {\n const nodeText = node.getTextContent();\n let text = nodeText;\n let invalidMatchEnd = 0;\n let remainingTextNode = node;\n let match;\n\n while ((match = findFirstMatch(text, matchers)) && match !== null) {\n const matchStart = match.index;\n const matchLength = match.length;\n const matchEnd = matchStart + matchLength;\n const isValid = isContentAroundIsValid(invalidMatchEnd + matchStart, invalidMatchEnd + matchEnd, nodeText, node);\n\n if (isValid) {\n let linkTextNode;\n\n if (invalidMatchEnd + matchStart === 0) {\n [linkTextNode, remainingTextNode] = remainingTextNode.splitText(invalidMatchEnd + matchLength);\n } else {\n [, linkTextNode, remainingTextNode] = remainingTextNode.splitText(invalidMatchEnd + matchStart, invalidMatchEnd + matchStart + matchLength);\n }\n\n const linkNode = link.$createAutoLinkNode(match.url, match.attributes);\n const textNode = lexical.$createTextNode(match.text);\n textNode.setFormat(linkTextNode.getFormat());\n textNode.setDetail(linkTextNode.getDetail());\n linkNode.append(textNode);\n linkTextNode.replace(linkNode);\n onChange(match.url, null);\n invalidMatchEnd = 0;\n } else {\n invalidMatchEnd += matchEnd;\n }\n\n text = text.substring(matchEnd);\n }\n}\n\nfunction handleLinkEdit(linkNode, matchers, onChange) {\n // Check children are simple text\n const children = linkNode.getChildren();\n const childrenLength = children.length;\n\n for (let i = 0; i < childrenLength; i++) {\n const child = children[i];\n\n if (!lexical.$isTextNode(child) || !child.isSimpleText()) {\n replaceWithChildren(linkNode);\n onChange(null, linkNode.getURL());\n return;\n }\n } // Check text content fully matches\n\n\n const text = linkNode.getTextContent();\n const match = findFirstMatch(text, matchers);\n\n if (match === null || match.text !== text) {\n replaceWithChildren(linkNode);\n onChange(null, linkNode.getURL());\n return;\n } // Check neighbors\n\n\n if (!isPreviousNodeValid(linkNode) || !isNextNodeValid(linkNode)) {\n replaceWithChildren(linkNode);\n onChange(null, linkNode.getURL());\n return;\n }\n\n const url = linkNode.getURL();\n\n if (url !== match.url) {\n linkNode.setURL(match.url);\n onChange(match.url, url);\n }\n\n if (match.attributes) {\n const rel = linkNode.getRel();\n\n if (rel !== match.attributes.rel) {\n linkNode.setRel(match.attributes.rel || null);\n onChange(match.attributes.rel || null, rel);\n }\n\n const target = linkNode.getTarget();\n\n if (target !== match.attributes.target) {\n linkNode.setTarget(match.attributes.target || null);\n onChange(match.attributes.target || null, target);\n }\n }\n} // Bad neighbours are edits in neighbor nodes that make AutoLinks incompatible.\n// Given the creation preconditions, these can only be simple text nodes.\n\n\nfunction handleBadNeighbors(textNode, matchers, onChange) {\n const previousSibling = textNode.getPreviousSibling();\n const nextSibling = textNode.getNextSibling();\n const text = textNode.getTextContent();\n\n if (link.$isAutoLinkNode(previousSibling) && !startsWithSeparator(text)) {\n previousSibling.append(textNode);\n handleLinkEdit(previousSibling, matchers, onChange);\n onChange(null, previousSibling.getURL());\n }\n\n if (link.$isAutoLinkNode(nextSibling) && !endsWithSeparator(text)) {\n replaceWithChildren(nextSibling);\n handleLinkEdit(nextSibling, matchers, onChange);\n onChange(null, nextSibling.getURL());\n }\n}\n\nfunction replaceWithChildren(node) {\n const children = node.getChildren();\n const childrenLength = children.length;\n\n for (let j = childrenLength - 1; j >= 0; j--) {\n node.insertAfter(children[j]);\n }\n\n node.remove();\n return children.map(child => child.getLatest());\n}\n\nfunction useAutoLink(editor, matchers, onChange) {\n react.useEffect(() => {\n if (!editor.hasNodes([link.AutoLinkNode])) {\n {\n throw Error(`LexicalAutoLinkPlugin: AutoLinkNode not registered on editor`);\n }\n }\n\n const onChangeWrapped = (url, prevUrl) => {\n if (onChange) {\n onChange(url, prevUrl);\n }\n };\n\n return utils.mergeRegister(editor.registerNodeTransform(lexical.TextNode, textNode => {\n const parent = textNode.getParentOrThrow();\n const previous = textNode.getPreviousSibling();\n\n if (link.$isAutoLinkNode(parent)) {\n handleLinkEdit(parent, matchers, onChangeWrapped);\n } else if (!link.$isLinkNode(parent)) {\n if (textNode.isSimpleText() && (startsWithSeparator(textNode.getTextContent()) || !link.$isAutoLinkNode(previous))) {\n handleLinkCreation(textNode, matchers, onChangeWrapped);\n }\n\n handleBadNeighbors(textNode, matchers, onChangeWrapped);\n }\n }));\n }, [editor, matchers, onChange]);\n}\n\nfunction AutoLinkPlugin({\n matchers,\n onChange\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n useAutoLink(editor, matchers, onChange);\n return null;\n}\n\nexports.AutoLinkPlugin = AutoLinkPlugin;\nexports.createLinkMatcherWithRegExp = createLinkMatcherWithRegExp;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalAutoLinkPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalAutoLinkPlugin.dev.js') : require('./LexicalAutoLinkPlugin.prod.js')\nmodule.exports = LexicalAutoLinkPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar LexicalDecoratorBlockNode = require('@lexical/react/LexicalDecoratorBlockNode');\nvar useLexicalNodeSelection = require('@lexical/react/useLexicalNodeSelection');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\nvar React = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction BlockWithAlignableContents({\n children,\n format,\n nodeKey,\n className\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const [isSelected, setSelected, clearSelection] = useLexicalNodeSelection.useLexicalNodeSelection(nodeKey);\n const ref = React.useRef(null);\n const onDelete = React.useCallback(event => {\n if (isSelected && lexical.$isNodeSelection(lexical.$getSelection())) {\n event.preventDefault();\n const node = lexical.$getNodeByKey(nodeKey);\n\n if (lexical.$isDecoratorNode(node)) {\n node.remove();\n }\n }\n\n return false;\n }, [isSelected, nodeKey]);\n React.useEffect(() => {\n return utils.mergeRegister(editor.registerCommand(lexical.FORMAT_ELEMENT_COMMAND, formatType => {\n if (isSelected) {\n const selection = lexical.$getSelection();\n\n if (lexical.$isNodeSelection(selection)) {\n const node = lexical.$getNodeByKey(nodeKey);\n\n if (LexicalDecoratorBlockNode.$isDecoratorBlockNode(node)) {\n node.setFormat(formatType);\n }\n } else if (lexical.$isRangeSelection(selection)) {\n const nodes = selection.getNodes();\n\n for (const node of nodes) {\n if (LexicalDecoratorBlockNode.$isDecoratorBlockNode(node)) {\n node.setFormat(formatType);\n } else {\n const element = utils.$getNearestBlockElementAncestorOrThrow(node);\n element.setFormat(formatType);\n }\n }\n }\n\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical.CLICK_COMMAND, event => {\n if (event.target === ref.current) {\n event.preventDefault();\n\n if (!event.shiftKey) {\n clearSelection();\n }\n\n setSelected(!isSelected);\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical.KEY_DELETE_COMMAND, onDelete, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical.KEY_BACKSPACE_COMMAND, onDelete, lexical.COMMAND_PRIORITY_LOW));\n }, [clearSelection, editor, isSelected, nodeKey, onDelete, setSelected]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: [className.base, isSelected ? className.focus : null].filter(Boolean).join(' '),\n ref: ref,\n style: {\n textAlign: format ? format : undefined\n }\n }, children);\n}\n\nexports.BlockWithAlignableContents = BlockWithAlignableContents;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalBlockWithAlignableContents = process.env.NODE_ENV === 'development' ? require('./LexicalBlockWithAlignableContents.dev.js') : require('./LexicalBlockWithAlignableContents.prod.js')\nmodule.exports = LexicalBlockWithAlignableContents;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar lexical = require('lexical');\nvar React = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst useLayoutEffectImpl = CAN_USE_DOM ? React.useLayoutEffect : React.useEffect;\nvar useLayoutEffect = useLayoutEffectImpl;\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst HISTORY_MERGE_OPTIONS = {\n tag: 'history-merge'\n};\nfunction LexicalComposer({\n initialConfig,\n children\n}) {\n const composerContext = React.useMemo(() => {\n const {\n theme,\n namespace,\n editor__DEPRECATED: initialEditor,\n nodes,\n onError,\n editorState: initialEditorState\n } = initialConfig;\n const context = LexicalComposerContext.createLexicalComposerContext(null, theme);\n let editor = initialEditor || null;\n\n if (editor === null) {\n const newEditor = lexical.createEditor({\n editable: initialConfig.editable,\n namespace,\n nodes,\n onError: error => onError(error, newEditor),\n theme\n });\n initializeEditor(newEditor, initialEditorState);\n editor = newEditor;\n }\n\n return [editor, context];\n }, // We only do this for init\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n useLayoutEffect(() => {\n const isEditable = initialConfig.editable;\n const [editor] = composerContext;\n editor.setEditable(isEditable !== undefined ? isEditable : true); // We only do this for init\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return /*#__PURE__*/React.createElement(LexicalComposerContext.LexicalComposerContext.Provider, {\n value: composerContext\n }, children);\n}\n\nfunction initializeEditor(editor, initialEditorState) {\n if (initialEditorState === null) {\n return;\n } else if (initialEditorState === undefined) {\n editor.update(() => {\n const root = lexical.$getRoot();\n\n if (root.isEmpty()) {\n const paragraph = lexical.$createParagraphNode();\n root.append(paragraph);\n const activeElement = CAN_USE_DOM ? document.activeElement : null;\n\n if (lexical.$getSelection() !== null || activeElement !== null && activeElement === editor.getRootElement()) {\n paragraph.select();\n }\n }\n }, HISTORY_MERGE_OPTIONS);\n } else if (initialEditorState !== null) {\n switch (typeof initialEditorState) {\n case 'string':\n {\n const parsedEditorState = editor.parseEditorState(initialEditorState);\n editor.setEditorState(parsedEditorState, HISTORY_MERGE_OPTIONS);\n break;\n }\n\n case 'object':\n {\n editor.setEditorState(initialEditorState, HISTORY_MERGE_OPTIONS);\n break;\n }\n\n case 'function':\n {\n editor.update(() => {\n const root = lexical.$getRoot();\n\n if (root.isEmpty()) {\n initialEditorState(editor);\n }\n }, HISTORY_MERGE_OPTIONS);\n break;\n }\n }\n }\n}\n\nexports.LexicalComposer = LexicalComposer;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalComposer = process.env.NODE_ENV === 'development' ? require('./LexicalComposer.dev.js') : require('./LexicalComposer.prod.js')\nmodule.exports = LexicalComposer;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst LexicalComposerContext = /*#__PURE__*/react.createContext(null);\nfunction createLexicalComposerContext(parent, theme) {\n let parentContext = null;\n\n if (parent != null) {\n parentContext = parent[1];\n }\n\n function getTheme() {\n if (theme != null) {\n return theme;\n }\n\n return parentContext != null ? parentContext.getTheme() : null;\n }\n\n return {\n getTheme\n };\n}\nfunction useLexicalComposerContext() {\n const composerContext = react.useContext(LexicalComposerContext);\n\n if (composerContext == null) {\n {\n throw Error(`LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext`);\n }\n }\n\n return composerContext;\n}\n\nexports.LexicalComposerContext = LexicalComposerContext;\nexports.createLexicalComposerContext = createLexicalComposerContext;\nexports.useLexicalComposerContext = useLexicalComposerContext;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalComposerContext = process.env.NODE_ENV === 'development' ? require('./LexicalComposerContext.dev.js') : require('./LexicalComposerContext.prod.js')\nmodule.exports = LexicalComposerContext;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar React = require('react');\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst useLayoutEffectImpl = CAN_USE_DOM ? React.useLayoutEffect : React.useEffect;\nvar useLayoutEffect = useLayoutEffectImpl;\n\nfunction ContentEditable({\n ariaActiveDescendant,\n ariaAutoComplete,\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaLabel,\n ariaLabelledBy,\n ariaMultiline,\n ariaOwns,\n ariaRequired,\n autoCapitalize,\n className,\n id,\n role = 'textbox',\n spellCheck = true,\n style,\n tabIndex,\n 'data-testid': testid,\n ...rest\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const [isEditable, setEditable] = React.useState(false);\n const ref = React.useCallback(rootElement => {\n editor.setRootElement(rootElement);\n }, [editor]);\n useLayoutEffect(() => {\n setEditable(editor.isEditable());\n return editor.registerEditableListener(currentIsEditable => {\n setEditable(currentIsEditable);\n });\n }, [editor]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, rest, {\n \"aria-activedescendant\": !isEditable ? undefined : ariaActiveDescendant,\n \"aria-autocomplete\": !isEditable ? 'none' : ariaAutoComplete,\n \"aria-controls\": !isEditable ? undefined : ariaControls,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": !isEditable ? undefined : role === 'combobox' ? !!ariaExpanded : undefined,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-multiline\": ariaMultiline,\n \"aria-owns\": !isEditable ? undefined : ariaOwns,\n \"aria-readonly\": !isEditable ? true : undefined,\n \"aria-required\": ariaRequired,\n autoCapitalize: autoCapitalize,\n className: className,\n contentEditable: isEditable,\n \"data-testid\": testid,\n id: id,\n ref: ref,\n role: role,\n spellCheck: spellCheck,\n style: style,\n tabIndex: tabIndex\n }));\n}\n\nexports.ContentEditable = ContentEditable;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalContentEditable = process.env.NODE_ENV === 'development' ? require('./LexicalContentEditable.dev.js') : require('./LexicalContentEditable.prod.js')\nmodule.exports = LexicalContentEditable;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar lexical = require('lexical');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nclass DecoratorBlockNode extends lexical.DecoratorNode {\n constructor(format, key) {\n super(key);\n this.__format = format || '';\n }\n\n exportJSON() {\n return {\n format: this.__format || '',\n type: 'decorator-block',\n version: 1\n };\n }\n\n createDOM() {\n return document.createElement('div');\n }\n\n updateDOM() {\n return false;\n }\n\n setFormat(format) {\n const self = this.getWritable();\n self.__format = format;\n }\n\n isInline() {\n return false;\n }\n\n}\nfunction $isDecoratorBlockNode(node) {\n return node instanceof DecoratorBlockNode;\n}\n\nexports.$isDecoratorBlockNode = $isDecoratorBlockNode;\nexports.DecoratorBlockNode = DecoratorBlockNode;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalDecoratorBlockNode = process.env.NODE_ENV === 'development' ? require('./LexicalDecoratorBlockNode.dev.js') : require('./LexicalDecoratorBlockNode.prod.js')\nmodule.exports = LexicalDecoratorBlockNode;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar React = require('react');\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n}\n\nvar changedArray = function changedArray(a, b) {\n if (a === void 0) {\n a = [];\n }\n\n if (b === void 0) {\n b = [];\n }\n\n return a.length !== b.length || a.some(function (item, index) {\n return !Object.is(item, b[index]);\n });\n};\n\nvar initialState = {\n error: null\n};\n\nvar ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n\n function ErrorBoundary() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n _this.state = initialState;\n\n _this.resetErrorBoundary = function () {\n var _this$props;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this.props.onReset == null ? void 0 : (_this$props = _this.props).onReset.apply(_this$props, args);\n\n _this.reset();\n };\n\n return _this;\n }\n\n ErrorBoundary.getDerivedStateFromError = function getDerivedStateFromError(error) {\n return {\n error: error\n };\n };\n\n var _proto = ErrorBoundary.prototype;\n\n _proto.reset = function reset() {\n this.setState(initialState);\n };\n\n _proto.componentDidCatch = function componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n\n (_this$props$onError = (_this$props2 = this.props).onError) == null ? void 0 : _this$props$onError.call(_this$props2, error, info);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n var error = this.state.error;\n var resetKeys = this.props.resetKeys; // There's an edge case where if the thing that triggered the error\n // happens to *also* be in the resetKeys array, we'd end up resetting\n // the error boundary immediately. This would likely trigger a second\n // error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call\n // of cDU after the error is set\n\n if (error !== null && prevState.error !== null && changedArray(prevProps.resetKeys, resetKeys)) {\n var _this$props$onResetKe, _this$props3;\n\n (_this$props$onResetKe = (_this$props3 = this.props).onResetKeysChange) == null ? void 0 : _this$props$onResetKe.call(_this$props3, prevProps.resetKeys, resetKeys);\n this.reset();\n }\n };\n\n _proto.render = function render() {\n var error = this.state.error;\n var _this$props4 = this.props,\n fallbackRender = _this$props4.fallbackRender,\n FallbackComponent = _this$props4.FallbackComponent,\n fallback = _this$props4.fallback;\n\n if (error !== null) {\n var _props = {\n error: error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n\n if ( /*#__PURE__*/React.isValidElement(fallback)) {\n return fallback;\n } else if (typeof fallbackRender === 'function') {\n return fallbackRender(_props);\n } else if (FallbackComponent) {\n return /*#__PURE__*/React.createElement(FallbackComponent, _props);\n } else {\n throw new Error('react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop');\n }\n }\n\n return this.props.children;\n };\n\n return ErrorBoundary;\n}(React.Component);\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction LexicalErrorBoundary({\n children,\n onError\n}) {\n return /*#__PURE__*/React.createElement(ErrorBoundary, {\n fallback: /*#__PURE__*/React.createElement(\"div\", {\n style: {\n border: '1px solid #f00',\n color: '#f00',\n padding: '8px'\n }\n }, \"An error was thrown.\"),\n onError: onError\n }, children);\n}\n\nmodule.exports = LexicalErrorBoundary;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalErrorBoundary = process.env.NODE_ENV === 'development' ? require('./LexicalErrorBoundary.dev.js') : require('./LexicalErrorBoundary.prod.js')\nmodule.exports = LexicalErrorBoundary;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar history = require('@lexical/history');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction useHistory(editor, externalHistoryState, delay = 1000) {\n const historyState = react.useMemo(() => externalHistoryState || history.createEmptyHistoryState(), [externalHistoryState]);\n react.useEffect(() => {\n return history.registerHistory(editor, historyState, delay);\n }, [delay, editor, historyState]);\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction HistoryPlugin({\n externalHistoryState\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n useHistory(editor, externalHistoryState);\n return null;\n}\n\nexports.createEmptyHistoryState = history.createEmptyHistoryState;\nexports.HistoryPlugin = HistoryPlugin;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalHistoryPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalHistoryPlugin.dev.js') : require('./LexicalHistoryPlugin.prod.js')\nmodule.exports = LexicalHistoryPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar link = require('@lexical/link');\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction LinkPlugin({\n validateUrl\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n react.useEffect(() => {\n if (!editor.hasNodes([link.LinkNode])) {\n throw new Error('LinkPlugin: LinkNode not registered on editor');\n }\n\n return utils.mergeRegister(editor.registerCommand(link.TOGGLE_LINK_COMMAND, payload => {\n if (payload === null) {\n link.toggleLink(payload);\n return true;\n } else if (typeof payload === 'string') {\n if (validateUrl === undefined || validateUrl(payload)) {\n link.toggleLink(payload);\n return true;\n }\n\n return false;\n } else {\n const {\n url,\n target,\n rel,\n title\n } = payload;\n link.toggleLink(url, {\n rel,\n target,\n title\n });\n return true;\n }\n }, lexical.COMMAND_PRIORITY_LOW), validateUrl !== undefined ? editor.registerCommand(lexical.PASTE_COMMAND, event => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection) || selection.isCollapsed() || !(event instanceof ClipboardEvent) || event.clipboardData == null) {\n return false;\n }\n\n const clipboardText = event.clipboardData.getData('text');\n\n if (!validateUrl(clipboardText)) {\n return false;\n } // If we select nodes that are elements then avoid applying the link.\n\n\n if (!selection.getNodes().some(node => lexical.$isElementNode(node))) {\n editor.dispatchCommand(link.TOGGLE_LINK_COMMAND, clipboardText);\n event.preventDefault();\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_LOW) : () => {// Don't paste arbritrary text as a link when there's no validate function\n });\n }, [editor, validateUrl]);\n return null;\n}\n\nexports.LinkPlugin = LinkPlugin;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalLinkPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalLinkPlugin.dev.js') : require('./LexicalLinkPlugin.prod.js')\nmodule.exports = LexicalLinkPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar list = require('@lexical/list');\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar react = require('react');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction useList(editor) {\n react.useEffect(() => {\n return utils.mergeRegister(editor.registerCommand(list.INSERT_ORDERED_LIST_COMMAND, () => {\n list.insertList(editor, 'number');\n return true;\n }, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(list.INSERT_UNORDERED_LIST_COMMAND, () => {\n list.insertList(editor, 'bullet');\n return true;\n }, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(list.REMOVE_LIST_COMMAND, () => {\n list.removeList(editor);\n return true;\n }, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical.INSERT_PARAGRAPH_COMMAND, () => {\n const hasHandledInsertParagraph = list.$handleListInsertParagraph();\n\n if (hasHandledInsertParagraph) {\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_LOW));\n }, [editor]);\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction ListPlugin() {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n react.useEffect(() => {\n if (!editor.hasNodes([list.ListNode, list.ListItemNode])) {\n throw new Error('ListPlugin: ListNode and/or ListItemNode not registered on editor');\n }\n }, [editor]);\n useList(editor);\n return null;\n}\n\nexports.ListPlugin = ListPlugin;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalListPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalListPlugin.dev.js') : require('./LexicalListPlugin.prod.js')\nmodule.exports = LexicalListPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar lexical = require('lexical');\nvar React = require('react');\nvar utils = require('@lexical/utils');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst useLayoutEffectImpl = CAN_USE_DOM ? React.useLayoutEffect : React.useEffect;\nvar useLayoutEffect = useLayoutEffectImpl;\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nclass MenuOption {\n constructor(key) {\n this.key = key;\n this.ref = {\n current: null\n };\n this.setRefElement = this.setRefElement.bind(this);\n }\n\n setRefElement(element) {\n this.ref = {\n current: element\n };\n }\n\n}\n\nconst scrollIntoViewIfNeeded = target => {\n const typeaheadContainerNode = document.getElementById('typeahead-menu');\n if (!typeaheadContainerNode) return;\n const typeaheadRect = typeaheadContainerNode.getBoundingClientRect();\n\n if (typeaheadRect.top + typeaheadRect.height > window.innerHeight) {\n typeaheadContainerNode.scrollIntoView({\n block: 'center'\n });\n }\n\n if (typeaheadRect.top < 0) {\n typeaheadContainerNode.scrollIntoView({\n block: 'center'\n });\n }\n\n target.scrollIntoView({\n block: 'nearest'\n });\n};\n/**\n * Walk backwards along user input and forward through entity title to try\n * and replace more of the user's text with entity.\n */\n\n\nfunction getFullMatchOffset(documentText, entryText, offset) {\n let triggerOffset = offset;\n\n for (let i = triggerOffset; i <= entryText.length; i++) {\n if (documentText.substr(-i) === entryText.substr(0, i)) {\n triggerOffset = i;\n }\n }\n\n return triggerOffset;\n}\n/**\n * Split Lexical TextNode and return a new TextNode only containing matched text.\n * Common use cases include: removing the node, replacing with a new node.\n */\n\n\nfunction $splitNodeContainingQuery(match) {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection) || !selection.isCollapsed()) {\n return null;\n }\n\n const anchor = selection.anchor;\n\n if (anchor.type !== 'text') {\n return null;\n }\n\n const anchorNode = anchor.getNode();\n\n if (!anchorNode.isSimpleText()) {\n return null;\n }\n\n const selectionOffset = anchor.offset;\n const textContent = anchorNode.getTextContent().slice(0, selectionOffset);\n const characterOffset = match.replaceableString.length;\n const queryOffset = getFullMatchOffset(textContent, match.matchingString, characterOffset);\n const startOffset = selectionOffset - queryOffset;\n\n if (startOffset < 0) {\n return null;\n }\n\n let newNode;\n\n if (startOffset === 0) {\n [newNode] = anchorNode.splitText(selectionOffset);\n } else {\n [, newNode] = anchorNode.splitText(startOffset, selectionOffset);\n }\n\n return newNode;\n} // Got from https://stackoverflow.com/a/42543908/2013580\n\n\nfunction getScrollParent(element, includeHidden) {\n let style = getComputedStyle(element);\n const excludeStaticParent = style.position === 'absolute';\n const overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/;\n\n if (style.position === 'fixed') {\n return document.body;\n }\n\n for (let parent = element; parent = parent.parentElement;) {\n style = getComputedStyle(parent);\n\n if (excludeStaticParent && style.position === 'static') {\n continue;\n }\n\n if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX)) {\n return parent;\n }\n }\n\n return document.body;\n}\n\nfunction isTriggerVisibleInNearestScrollContainer(targetElement, containerElement) {\n const tRect = targetElement.getBoundingClientRect();\n const cRect = containerElement.getBoundingClientRect();\n return tRect.top > cRect.top && tRect.top < cRect.bottom;\n} // Reposition the menu on scroll, window resize, and element resize.\n\n\nfunction useDynamicPositioning(resolution, targetElement, onReposition, onVisibilityChange) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n React.useEffect(() => {\n if (targetElement != null && resolution != null) {\n const rootElement = editor.getRootElement();\n const rootScrollParent = rootElement != null ? getScrollParent(rootElement, false) : document.body;\n let ticking = false;\n let previousIsInView = isTriggerVisibleInNearestScrollContainer(targetElement, rootScrollParent);\n\n const handleScroll = function () {\n if (!ticking) {\n window.requestAnimationFrame(function () {\n onReposition();\n ticking = false;\n });\n ticking = true;\n }\n\n const isInView = isTriggerVisibleInNearestScrollContainer(targetElement, rootScrollParent);\n\n if (isInView !== previousIsInView) {\n previousIsInView = isInView;\n\n if (onVisibilityChange != null) {\n onVisibilityChange(isInView);\n }\n }\n };\n\n const resizeObserver = new ResizeObserver(onReposition);\n window.addEventListener('resize', onReposition);\n document.addEventListener('scroll', handleScroll, {\n capture: true,\n passive: true\n });\n resizeObserver.observe(targetElement);\n return () => {\n resizeObserver.unobserve(targetElement);\n window.removeEventListener('resize', onReposition);\n document.removeEventListener('scroll', handleScroll);\n };\n }\n }, [targetElement, editor, onVisibilityChange, onReposition, resolution]);\n}\nconst SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND = lexical.createCommand('SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND');\nfunction LexicalMenu({\n close,\n editor,\n anchorElementRef,\n resolution,\n options,\n menuRenderFn,\n onSelectOption,\n shouldSplitNodeWithQuery = false\n}) {\n const [selectedIndex, setHighlightedIndex] = React.useState(null);\n const matchingString = resolution.match && resolution.match.matchingString;\n React.useEffect(() => {\n setHighlightedIndex(0);\n }, [matchingString]);\n const selectOptionAndCleanUp = React.useCallback(selectedEntry => {\n editor.update(() => {\n const textNodeContainingQuery = resolution.match != null && shouldSplitNodeWithQuery ? $splitNodeContainingQuery(resolution.match) : null;\n onSelectOption(selectedEntry, textNodeContainingQuery, close, resolution.match ? resolution.match.matchingString : '');\n });\n }, [editor, shouldSplitNodeWithQuery, resolution.match, onSelectOption, close]);\n const updateSelectedIndex = React.useCallback(index => {\n const rootElem = editor.getRootElement();\n\n if (rootElem !== null) {\n rootElem.setAttribute('aria-activedescendant', 'typeahead-item-' + index);\n setHighlightedIndex(index);\n }\n }, [editor]);\n React.useEffect(() => {\n return () => {\n const rootElem = editor.getRootElement();\n\n if (rootElem !== null) {\n rootElem.removeAttribute('aria-activedescendant');\n }\n };\n }, [editor]);\n useLayoutEffect(() => {\n if (options === null) {\n setHighlightedIndex(null);\n } else if (selectedIndex === null) {\n updateSelectedIndex(0);\n }\n }, [options, selectedIndex, updateSelectedIndex]);\n React.useEffect(() => {\n return utils.mergeRegister(editor.registerCommand(SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND, ({\n option\n }) => {\n if (option.ref && option.ref.current != null) {\n scrollIntoViewIfNeeded(option.ref.current);\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_LOW));\n }, [editor, updateSelectedIndex]);\n React.useEffect(() => {\n return utils.mergeRegister(editor.registerCommand(lexical.KEY_ARROW_DOWN_COMMAND, payload => {\n const event = payload;\n\n if (options !== null && options.length && selectedIndex !== null) {\n const newSelectedIndex = selectedIndex !== options.length - 1 ? selectedIndex + 1 : 0;\n updateSelectedIndex(newSelectedIndex);\n const option = options[newSelectedIndex];\n\n if (option.ref != null && option.ref.current) {\n editor.dispatchCommand(SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND, {\n index: newSelectedIndex,\n option\n });\n }\n\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n\n return true;\n }, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical.KEY_ARROW_UP_COMMAND, payload => {\n const event = payload;\n\n if (options !== null && options.length && selectedIndex !== null) {\n const newSelectedIndex = selectedIndex !== 0 ? selectedIndex - 1 : options.length - 1;\n updateSelectedIndex(newSelectedIndex);\n const option = options[newSelectedIndex];\n\n if (option.ref != null && option.ref.current) {\n scrollIntoViewIfNeeded(option.ref.current);\n }\n\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n\n return true;\n }, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical.KEY_ESCAPE_COMMAND, payload => {\n const event = payload;\n event.preventDefault();\n event.stopImmediatePropagation();\n close();\n return true;\n }, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical.KEY_TAB_COMMAND, payload => {\n const event = payload;\n\n if (options === null || selectedIndex === null || options[selectedIndex] == null) {\n return false;\n }\n\n event.preventDefault();\n event.stopImmediatePropagation();\n selectOptionAndCleanUp(options[selectedIndex]);\n return true;\n }, lexical.COMMAND_PRIORITY_LOW), editor.registerCommand(lexical.KEY_ENTER_COMMAND, event => {\n if (options === null || selectedIndex === null || options[selectedIndex] == null) {\n return false;\n }\n\n if (event !== null) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n\n selectOptionAndCleanUp(options[selectedIndex]);\n return true;\n }, lexical.COMMAND_PRIORITY_LOW));\n }, [selectOptionAndCleanUp, close, editor, options, selectedIndex, updateSelectedIndex]);\n const listItemProps = React.useMemo(() => ({\n options,\n selectOptionAndCleanUp,\n selectedIndex,\n setHighlightedIndex\n }), [selectOptionAndCleanUp, selectedIndex, options]);\n return menuRenderFn(anchorElementRef, listItemProps, resolution.match ? resolution.match.matchingString : '');\n}\nfunction useMenuAnchorRef(resolution, setResolution, className) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const anchorElementRef = React.useRef(document.createElement('div'));\n const positionMenu = React.useCallback(() => {\n const rootElement = editor.getRootElement();\n const containerDiv = anchorElementRef.current;\n const menuEle = containerDiv.firstChild;\n\n if (rootElement !== null && resolution !== null) {\n const {\n left,\n top,\n width,\n height\n } = resolution.getRect();\n containerDiv.style.top = `${top + window.pageYOffset}px`;\n containerDiv.style.left = `${left + window.pageXOffset}px`;\n containerDiv.style.height = `${height}px`;\n containerDiv.style.width = `${width}px`;\n\n if (menuEle !== null) {\n const menuRect = menuEle.getBoundingClientRect();\n const menuHeight = menuRect.height;\n const menuWidth = menuRect.width;\n const rootElementRect = rootElement.getBoundingClientRect();\n\n if (left + menuWidth > rootElementRect.right) {\n containerDiv.style.left = `${rootElementRect.right - menuWidth + window.pageXOffset}px`;\n }\n\n const margin = 10;\n\n if ((top + menuHeight > window.innerHeight || top + menuHeight > rootElementRect.bottom) && top - rootElementRect.top > menuHeight) {\n containerDiv.style.top = `${top - menuHeight + window.pageYOffset - (height + margin)}px`;\n }\n }\n\n if (!containerDiv.isConnected) {\n if (className != null) {\n containerDiv.className = className;\n }\n\n containerDiv.setAttribute('aria-label', 'Typeahead menu');\n containerDiv.setAttribute('id', 'typeahead-menu');\n containerDiv.setAttribute('role', 'listbox');\n containerDiv.style.display = 'block';\n containerDiv.style.position = 'absolute';\n document.body.append(containerDiv);\n }\n\n anchorElementRef.current = containerDiv;\n rootElement.setAttribute('aria-controls', 'typeahead-menu');\n }\n }, [editor, resolution, className]);\n React.useEffect(() => {\n const rootElement = editor.getRootElement();\n\n if (resolution !== null) {\n positionMenu();\n return () => {\n if (rootElement !== null) {\n rootElement.removeAttribute('aria-controls');\n }\n\n const containerDiv = anchorElementRef.current;\n\n if (containerDiv !== null && containerDiv.isConnected) {\n containerDiv.remove();\n }\n };\n }\n }, [editor, positionMenu, resolution]);\n const onVisibilityChange = React.useCallback(isInView => {\n if (resolution !== null) {\n if (!isInView) {\n setResolution(null);\n }\n }\n }, [resolution, setResolution]);\n useDynamicPositioning(resolution, anchorElementRef.current, positionMenu, onVisibilityChange);\n return anchorElementRef;\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction startTransition(callback) {\n if (React.startTransition) {\n React.startTransition(callback);\n } else {\n callback();\n }\n}\n\nfunction LexicalNodeMenuPlugin({\n options,\n nodeKey,\n onClose,\n onOpen,\n onSelectOption,\n menuRenderFn,\n anchorClassName\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const [resolution, setResolution] = React.useState(null);\n const anchorElementRef = useMenuAnchorRef(resolution, setResolution, anchorClassName);\n const closeNodeMenu = React.useCallback(() => {\n setResolution(null);\n\n if (onClose != null && resolution !== null) {\n onClose();\n }\n }, [onClose, resolution]);\n const openNodeMenu = React.useCallback(res => {\n setResolution(res);\n\n if (onOpen != null && resolution === null) {\n onOpen(res);\n }\n }, [onOpen, resolution]);\n const positionOrCloseMenu = React.useCallback(() => {\n if (nodeKey) {\n editor.update(() => {\n const node = lexical.$getNodeByKey(nodeKey);\n const domElement = editor.getElementByKey(nodeKey);\n\n if (node != null && domElement != null) {\n if (resolution == null) {\n startTransition(() => openNodeMenu({\n getRect: () => domElement.getBoundingClientRect()\n }));\n }\n }\n });\n } else if (nodeKey == null && resolution != null) {\n closeNodeMenu();\n }\n }, [closeNodeMenu, editor, nodeKey, openNodeMenu, resolution]);\n React.useEffect(() => {\n positionOrCloseMenu();\n }, [positionOrCloseMenu, nodeKey]);\n React.useEffect(() => {\n if (nodeKey != null) {\n return editor.registerUpdateListener(({\n dirtyElements\n }) => {\n if (dirtyElements.get(nodeKey)) {\n positionOrCloseMenu();\n }\n });\n }\n }, [editor, positionOrCloseMenu, nodeKey]);\n return resolution === null || editor === null ? null : /*#__PURE__*/React.createElement(LexicalMenu, {\n close: closeNodeMenu,\n resolution: resolution,\n editor: editor,\n anchorElementRef: anchorElementRef,\n options: options,\n menuRenderFn: menuRenderFn,\n onSelectOption: onSelectOption\n });\n}\n\nexports.LexicalNodeMenuPlugin = LexicalNodeMenuPlugin;\nexports.MenuOption = MenuOption;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalNodeMenuPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalNodeMenuPlugin.dev.js') : require('./LexicalNodeMenuPlugin.prod.js')\nmodule.exports = LexicalNodeMenuPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;\nvar useLayoutEffect = useLayoutEffectImpl;\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction OnChangePlugin({\n ignoreHistoryMergeTagChange = true,\n ignoreSelectionChange = false,\n onChange\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n useLayoutEffect(() => {\n if (onChange) {\n return editor.registerUpdateListener(({\n editorState,\n dirtyElements,\n dirtyLeaves,\n prevEditorState,\n tags\n }) => {\n if (ignoreSelectionChange && dirtyElements.size === 0 && dirtyLeaves.size === 0 || ignoreHistoryMergeTagChange && tags.has('history-merge') || prevEditorState.isEmpty()) {\n return;\n }\n\n onChange(editorState, editor, tags);\n });\n }\n }, [editor, ignoreHistoryMergeTagChange, ignoreSelectionChange, onChange]);\n return null;\n}\n\nexports.OnChangePlugin = OnChangePlugin;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalOnChangePlugin = process.env.NODE_ENV === 'development' ? require('./LexicalOnChangePlugin.dev.js') : require('./LexicalOnChangePlugin.prod.js')\nmodule.exports = LexicalOnChangePlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar useLexicalEditable = require('@lexical/react/useLexicalEditable');\nvar React = require('react');\nvar text = require('@lexical/text');\nvar utils = require('@lexical/utils');\nvar reactDom = require('react-dom');\nvar dragon = require('@lexical/dragon');\nvar richText = require('@lexical/rich-text');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst useLayoutEffectImpl = CAN_USE_DOM ? React.useLayoutEffect : React.useEffect;\nvar useLayoutEffect = useLayoutEffectImpl;\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction canShowPlaceholderFromCurrentEditorState(editor) {\n const currentCanShowPlaceholder = editor.getEditorState().read(text.$canShowPlaceholderCurry(editor.isComposing()));\n return currentCanShowPlaceholder;\n}\n\nfunction useCanShowPlaceholder(editor) {\n const [canShowPlaceholder, setCanShowPlaceholder] = React.useState(() => canShowPlaceholderFromCurrentEditorState(editor));\n useLayoutEffect(() => {\n function resetCanShowPlaceholder() {\n const currentCanShowPlaceholder = canShowPlaceholderFromCurrentEditorState(editor);\n setCanShowPlaceholder(currentCanShowPlaceholder);\n }\n\n resetCanShowPlaceholder();\n return utils.mergeRegister(editor.registerUpdateListener(() => {\n resetCanShowPlaceholder();\n }), editor.registerEditableListener(() => {\n resetCanShowPlaceholder();\n }));\n }, [editor]);\n return canShowPlaceholder;\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction useDecorators(editor, ErrorBoundary) {\n const [decorators, setDecorators] = React.useState(() => editor.getDecorators()); // Subscribe to changes\n\n useLayoutEffect(() => {\n return editor.registerDecoratorListener(nextDecorators => {\n reactDom.flushSync(() => {\n setDecorators(nextDecorators);\n });\n });\n }, [editor]);\n React.useEffect(() => {\n // If the content editable mounts before the subscription is added, then\n // nothing will be rendered on initial pass. We can get around that by\n // ensuring that we set the value.\n setDecorators(editor.getDecorators());\n }, [editor]); // Return decorators defined as React Portals\n\n return React.useMemo(() => {\n const decoratedPortals = [];\n const decoratorKeys = Object.keys(decorators);\n\n for (let i = 0; i < decoratorKeys.length; i++) {\n const nodeKey = decoratorKeys[i];\n const reactDecorator = /*#__PURE__*/React.createElement(ErrorBoundary, {\n onError: e => editor._onError(e)\n }, /*#__PURE__*/React.createElement(React.Suspense, {\n fallback: null\n }, decorators[nodeKey]));\n const element = editor.getElementByKey(nodeKey);\n\n if (element !== null) {\n decoratedPortals.push( /*#__PURE__*/reactDom.createPortal(reactDecorator, element, nodeKey));\n }\n }\n\n return decoratedPortals;\n }, [ErrorBoundary, decorators, editor]);\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction useRichTextSetup(editor) {\n useLayoutEffect(() => {\n return utils.mergeRegister(richText.registerRichText(editor), dragon.registerDragonSupport(editor)); // We only do this for init\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [editor]);\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction RichTextPlugin({\n contentEditable,\n placeholder,\n ErrorBoundary\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const decorators = useDecorators(editor, ErrorBoundary);\n useRichTextSetup(editor);\n return /*#__PURE__*/React.createElement(React.Fragment, null, contentEditable, /*#__PURE__*/React.createElement(Placeholder, {\n content: placeholder\n }), decorators);\n}\n\nfunction Placeholder({\n content\n}) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const showPlaceholder = useCanShowPlaceholder(editor);\n const editable = useLexicalEditable();\n\n if (!showPlaceholder) {\n return null;\n }\n\n if (typeof content === 'function') {\n return content(editable);\n } else {\n return content;\n }\n}\n\nexports.RichTextPlugin = RichTextPlugin;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalRichTextPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalRichTextPlugin.dev.js') : require('./LexicalRichTextPlugin.prod.js')\nmodule.exports = LexicalRichTextPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction indentOverTab(selection) {\n // const handled = new Set();\n const nodes = selection.getNodes();\n const canIndentBlockNodes = utils.$filter(nodes, node => {\n if (lexical.$isBlockElementNode(node) && node.canIndent()) {\n return node;\n }\n\n return null;\n }); // 1. If selection spans across canIndent block nodes: indent\n\n if (canIndentBlockNodes.length > 0) {\n return true;\n } // 2. If first (anchor/focus) is at block start: indent\n\n\n const anchor = selection.anchor;\n const focus = selection.focus;\n const first = focus.isBefore(anchor) ? focus : anchor;\n const firstNode = first.getNode();\n const firstBlock = utils.$getNearestBlockElementAncestorOrThrow(firstNode);\n\n if (firstBlock.canIndent()) {\n const firstBlockKey = firstBlock.getKey();\n let selectionAtStart = lexical.$createRangeSelection();\n selectionAtStart.anchor.set(firstBlockKey, 0, 'element');\n selectionAtStart.focus.set(firstBlockKey, 0, 'element');\n selectionAtStart = lexical.$normalizeSelection__EXPERIMENTAL(selectionAtStart);\n\n if (selectionAtStart.anchor.is(first)) {\n return true;\n }\n } // 3. Else: tab\n\n\n return false;\n}\n\nfunction registerTabIndentation(editor) {\n return editor.registerCommand(lexical.KEY_TAB_COMMAND, event => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n event.preventDefault();\n const command = indentOverTab(selection) ? event.shiftKey ? lexical.OUTDENT_CONTENT_COMMAND : lexical.INDENT_CONTENT_COMMAND : lexical.INSERT_TAB_COMMAND;\n return editor.dispatchCommand(command, undefined);\n }, lexical.COMMAND_PRIORITY_EDITOR);\n}\n/**\n * This plugin adds the ability to indent content using the tab key. Generally, we don't\n * recommend using this plugin as it could negatively affect acessibility for keyboard\n * users, causing focus to become trapped within the editor.\n */\n\nfunction TabIndentationPlugin() {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n react.useEffect(() => {\n return registerTabIndentation(editor);\n });\n return null;\n}\n\nexports.TabIndentationPlugin = TabIndentationPlugin;\nexports.registerTabIndentation = registerTabIndentation;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalTabIndentationPlugin = process.env.NODE_ENV === 'development' ? require('./LexicalTabIndentationPlugin.dev.js') : require('./LexicalTabIndentationPlugin.prod.js')\nmodule.exports = LexicalTabIndentationPlugin;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;\nvar useLayoutEffect = useLayoutEffectImpl;\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n/**\n * Shortcut to Lexical subscriptions when values are used for render.\n */\nfunction useLexicalSubscription(subscription) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const initializedSubscription = react.useMemo(() => subscription(editor), [editor, subscription]);\n const valueRef = react.useRef(initializedSubscription.initialValueFn());\n const [value, setValue] = react.useState(valueRef.current);\n useLayoutEffect(() => {\n const {\n initialValueFn,\n subscribe\n } = initializedSubscription;\n const currentValue = initialValueFn();\n\n if (valueRef.current !== currentValue) {\n valueRef.current = currentValue;\n setValue(currentValue);\n }\n\n return subscribe(newValue => {\n valueRef.current = newValue;\n setValue(newValue);\n });\n }, [initializedSubscription, subscription]);\n return value;\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction subscription(editor) {\n return {\n initialValueFn: () => editor.isEditable(),\n subscribe: callback => {\n return editor.registerEditableListener(callback);\n }\n };\n}\n\nfunction useLexicalEditable() {\n return useLexicalSubscription(subscription);\n}\n\nmodule.exports = useLexicalEditable;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst useLexicalEditable = process.env.NODE_ENV === 'development' ? require('./useLexicalEditable.dev.js') : require('./useLexicalEditable.prod.js')\nmodule.exports = useLexicalEditable;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar LexicalComposerContext = require('@lexical/react/LexicalComposerContext');\nvar lexical = require('lexical');\nvar react = require('react');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction isNodeSelected(editor, key) {\n return editor.getEditorState().read(() => {\n const node = lexical.$getNodeByKey(key);\n\n if (node === null) {\n return false;\n }\n\n return node.isSelected();\n });\n}\n\nfunction useLexicalNodeSelection(key) {\n const [editor] = LexicalComposerContext.useLexicalComposerContext();\n const [isSelected, setIsSelected] = react.useState(() => isNodeSelected(editor, key));\n react.useEffect(() => {\n let isMounted = true;\n const unregister = editor.registerUpdateListener(() => {\n if (isMounted) {\n setIsSelected(isNodeSelected(editor, key));\n }\n });\n return () => {\n isMounted = false;\n unregister();\n };\n }, [editor, key]);\n const setSelected = react.useCallback(selected => {\n editor.update(() => {\n let selection = lexical.$getSelection();\n\n if (!lexical.$isNodeSelection(selection)) {\n selection = lexical.$createNodeSelection();\n lexical.$setSelection(selection);\n }\n\n if (selected) {\n selection.add(key);\n } else {\n selection.delete(key);\n }\n });\n }, [editor, key]);\n const clearSelected = react.useCallback(() => {\n editor.update(() => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isNodeSelection(selection)) {\n selection.clear();\n }\n });\n }, [editor]);\n return [isSelected, setSelected, clearSelected];\n}\n\nexports.useLexicalNodeSelection = useLexicalNodeSelection;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst useLexicalNodeSelection = process.env.NODE_ENV === 'development' ? require('./useLexicalNodeSelection.dev.js') : require('./useLexicalNodeSelection.prod.js')\nmodule.exports = useLexicalNodeSelection;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar clipboard = require('@lexical/clipboard');\nvar selection = require('@lexical/selection');\nvar utils = require('@lexical/utils');\nvar lexical = require('lexical');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nfunction caretFromPoint(x, y) {\n if (typeof document.caretRangeFromPoint !== 'undefined') {\n const range = document.caretRangeFromPoint(x, y);\n\n if (range === null) {\n return null;\n }\n\n return {\n node: range.startContainer,\n offset: range.startOffset\n }; // @ts-ignore\n } else if (document.caretPositionFromPoint !== 'undefined') {\n // @ts-ignore FF - no types\n const range = document.caretPositionFromPoint(x, y);\n\n if (range === null) {\n return null;\n }\n\n return {\n node: range.offsetNode,\n offset: range.offset\n };\n } else {\n // Gracefully handle IE\n return null;\n }\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst documentMode = CAN_USE_DOM && 'documentMode' in document ? document.documentMode : null;\nCAN_USE_DOM && /Mac|iPod|iPhone|iPad/.test(navigator.platform);\nCAN_USE_DOM && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);\nconst CAN_USE_BEFORE_INPUT = CAN_USE_DOM && 'InputEvent' in window && !documentMode ? 'getTargetRanges' in new window.InputEvent('input') : false;\nconst IS_SAFARI = CAN_USE_DOM && /Version\\/[\\d.]+.*Safari/.test(navigator.userAgent);\nconst IS_IOS = CAN_USE_DOM && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; // Keep these in case we need to use them in the future.\n// export const IS_WINDOWS: boolean = CAN_USE_DOM && /Win/.test(navigator.platform);\n\nconst IS_CHROME = CAN_USE_DOM && /^(?=.*Chrome).*/i.test(navigator.userAgent); // export const canUseTextInputEvent: boolean = CAN_USE_DOM && 'TextEvent' in window && !documentMode;\n\nconst IS_APPLE_WEBKIT = CAN_USE_DOM && /AppleWebKit\\/[\\d.]+/.test(navigator.userAgent) && !IS_CHROME;\n\n/** @module @lexical/rich-text */\nconst DRAG_DROP_PASTE = lexical.createCommand('DRAG_DROP_PASTE_FILE');\n\n/** @noInheritDoc */\nclass QuoteNode extends lexical.ElementNode {\n static getType() {\n return 'quote';\n }\n\n static clone(node) {\n return new QuoteNode(node.__key);\n }\n\n constructor(key) {\n super(key);\n } // View\n\n\n createDOM(config) {\n const element = document.createElement('blockquote');\n utils.addClassNamesToElement(element, config.theme.quote);\n return element;\n }\n\n updateDOM(prevNode, dom) {\n return false;\n }\n\n static importDOM() {\n return {\n blockquote: node => ({\n conversion: convertBlockquoteElement,\n priority: 0\n })\n };\n }\n\n exportDOM(editor) {\n const {\n element\n } = super.exportDOM(editor);\n\n if (element && utils.isHTMLElement(element)) {\n if (this.isEmpty()) element.append(document.createElement('br'));\n const formatType = this.getFormatType();\n element.style.textAlign = formatType;\n const direction = this.getDirection();\n\n if (direction) {\n element.dir = direction;\n }\n }\n\n return {\n element\n };\n }\n\n static importJSON(serializedNode) {\n const node = $createQuoteNode();\n node.setFormat(serializedNode.format);\n node.setIndent(serializedNode.indent);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n exportJSON() {\n return { ...super.exportJSON(),\n type: 'quote'\n };\n } // Mutation\n\n\n insertNewAfter(_, restoreSelection) {\n const newBlock = lexical.$createParagraphNode();\n const direction = this.getDirection();\n newBlock.setDirection(direction);\n this.insertAfter(newBlock, restoreSelection);\n return newBlock;\n }\n\n collapseAtStart() {\n const paragraph = lexical.$createParagraphNode();\n const children = this.getChildren();\n children.forEach(child => paragraph.append(child));\n this.replace(paragraph);\n return true;\n }\n\n}\nfunction $createQuoteNode() {\n return lexical.$applyNodeReplacement(new QuoteNode());\n}\nfunction $isQuoteNode(node) {\n return node instanceof QuoteNode;\n}\n\n/** @noInheritDoc */\nclass HeadingNode extends lexical.ElementNode {\n /** @internal */\n static getType() {\n return 'heading';\n }\n\n static clone(node) {\n return new HeadingNode(node.__tag, node.__key);\n }\n\n constructor(tag, key) {\n super(key);\n this.__tag = tag;\n }\n\n getTag() {\n return this.__tag;\n } // View\n\n\n createDOM(config) {\n const tag = this.__tag;\n const element = document.createElement(tag);\n const theme = config.theme;\n const classNames = theme.heading;\n\n if (classNames !== undefined) {\n const className = classNames[tag];\n utils.addClassNamesToElement(element, className);\n }\n\n return element;\n }\n\n updateDOM(prevNode, dom) {\n return false;\n }\n\n static importDOM() {\n return {\n h1: node => ({\n conversion: convertHeadingElement,\n priority: 0\n }),\n h2: node => ({\n conversion: convertHeadingElement,\n priority: 0\n }),\n h3: node => ({\n conversion: convertHeadingElement,\n priority: 0\n }),\n h4: node => ({\n conversion: convertHeadingElement,\n priority: 0\n }),\n h5: node => ({\n conversion: convertHeadingElement,\n priority: 0\n }),\n h6: node => ({\n conversion: convertHeadingElement,\n priority: 0\n }),\n p: node => {\n // domNode is a <p> since we matched it by nodeName\n const paragraph = node;\n const firstChild = paragraph.firstChild;\n\n if (firstChild !== null && isGoogleDocsTitle(firstChild)) {\n return {\n conversion: () => ({\n node: null\n }),\n priority: 3\n };\n }\n\n return null;\n },\n span: node => {\n if (isGoogleDocsTitle(node)) {\n return {\n conversion: domNode => {\n return {\n node: $createHeadingNode('h1')\n };\n },\n priority: 3\n };\n }\n\n return null;\n }\n };\n }\n\n exportDOM(editor) {\n const {\n element\n } = super.exportDOM(editor);\n\n if (element && utils.isHTMLElement(element)) {\n if (this.isEmpty()) element.append(document.createElement('br'));\n const formatType = this.getFormatType();\n element.style.textAlign = formatType;\n const direction = this.getDirection();\n\n if (direction) {\n element.dir = direction;\n }\n }\n\n return {\n element\n };\n }\n\n static importJSON(serializedNode) {\n const node = $createHeadingNode(serializedNode.tag);\n node.setFormat(serializedNode.format);\n node.setIndent(serializedNode.indent);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n exportJSON() {\n return { ...super.exportJSON(),\n tag: this.getTag(),\n type: 'heading',\n version: 1\n };\n } // Mutation\n\n\n insertNewAfter(selection, restoreSelection = true) {\n const anchorOffet = selection ? selection.anchor.offset : 0;\n const newElement = anchorOffet > 0 && anchorOffet < this.getTextContentSize() ? $createHeadingNode(this.getTag()) : lexical.$createParagraphNode();\n const direction = this.getDirection();\n newElement.setDirection(direction);\n this.insertAfter(newElement, restoreSelection);\n return newElement;\n }\n\n collapseAtStart() {\n const newElement = !this.isEmpty() ? $createHeadingNode(this.getTag()) : lexical.$createParagraphNode();\n const children = this.getChildren();\n children.forEach(child => newElement.append(child));\n this.replace(newElement);\n return true;\n }\n\n extractWithChild() {\n return true;\n }\n\n}\n\nfunction isGoogleDocsTitle(domNode) {\n if (domNode.nodeName.toLowerCase() === 'span') {\n return domNode.style.fontSize === '26pt';\n }\n\n return false;\n}\n\nfunction convertHeadingElement(element) {\n const nodeName = element.nodeName.toLowerCase();\n let node = null;\n\n if (nodeName === 'h1' || nodeName === 'h2' || nodeName === 'h3' || nodeName === 'h4' || nodeName === 'h5' || nodeName === 'h6') {\n node = $createHeadingNode(nodeName);\n\n if (element.style !== null) {\n node.setFormat(element.style.textAlign);\n }\n }\n\n return {\n node\n };\n}\n\nfunction convertBlockquoteElement(element) {\n const node = $createQuoteNode();\n\n if (element.style !== null) {\n node.setFormat(element.style.textAlign);\n }\n\n return {\n node\n };\n}\n\nfunction $createHeadingNode(headingTag) {\n return lexical.$applyNodeReplacement(new HeadingNode(headingTag));\n}\nfunction $isHeadingNode(node) {\n return node instanceof HeadingNode;\n}\n\nfunction onPasteForRichText(event, editor) {\n event.preventDefault();\n editor.update(() => {\n const selection = lexical.$getSelection();\n const clipboardData = event instanceof InputEvent || event instanceof KeyboardEvent ? null : event.clipboardData;\n\n if (clipboardData != null && (lexical.$isRangeSelection(selection) || lexical.DEPRECATED_$isGridSelection(selection))) {\n clipboard.$insertDataTransferForRichText(clipboardData, selection, editor);\n }\n }, {\n tag: 'paste'\n });\n}\n\nasync function onCutForRichText(event, editor) {\n await clipboard.copyToClipboard(editor, utils.objectKlassEquals(event, ClipboardEvent) ? event : null);\n editor.update(() => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isRangeSelection(selection)) {\n selection.removeText();\n } else if (lexical.$isNodeSelection(selection)) {\n selection.getNodes().forEach(node => node.remove());\n }\n });\n} // Clipboard may contain files that we aren't allowed to read. While the event is arguably useless,\n// in certain ocassions, we want to know whether it was a file transfer, as opposed to text. We\n// control this with the first boolean flag.\n\n\nfunction eventFiles(event) {\n let dataTransfer = null;\n\n if (event instanceof DragEvent) {\n dataTransfer = event.dataTransfer;\n } else if (event instanceof ClipboardEvent) {\n dataTransfer = event.clipboardData;\n }\n\n if (dataTransfer === null) {\n return [false, [], false];\n }\n\n const types = dataTransfer.types;\n const hasFiles = types.includes('Files');\n const hasContent = types.includes('text/html') || types.includes('text/plain');\n return [hasFiles, Array.from(dataTransfer.files), hasContent];\n}\n\nfunction handleIndentAndOutdent(indentOrOutdent) {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n const alreadyHandled = new Set();\n const nodes = selection.getNodes();\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n const key = node.getKey();\n\n if (alreadyHandled.has(key)) {\n continue;\n }\n\n const parentBlock = utils.$getNearestBlockElementAncestorOrThrow(node);\n const parentKey = parentBlock.getKey();\n\n if (parentBlock.canIndent() && !alreadyHandled.has(parentKey)) {\n alreadyHandled.add(parentKey);\n indentOrOutdent(parentBlock);\n }\n }\n\n return alreadyHandled.size > 0;\n}\n\nfunction $isTargetWithinDecorator(target) {\n const node = lexical.$getNearestNodeFromDOMNode(target);\n return lexical.$isDecoratorNode(node);\n}\n\nfunction $isSelectionAtEndOfRoot(selection) {\n const focus = selection.focus;\n return focus.key === 'root' && focus.offset === lexical.$getRoot().getChildrenSize();\n}\n\nfunction registerRichText(editor) {\n const removeListener = utils.mergeRegister(editor.registerCommand(lexical.CLICK_COMMAND, payload => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isNodeSelection(selection)) {\n selection.clear();\n return true;\n }\n\n return false;\n }, 0), editor.registerCommand(lexical.DELETE_CHARACTER_COMMAND, isBackward => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.deleteCharacter(isBackward);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DELETE_WORD_COMMAND, isBackward => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.deleteWord(isBackward);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DELETE_LINE_COMMAND, isBackward => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.deleteLine(isBackward);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.CONTROLLED_TEXT_INSERTION_COMMAND, eventOrText => {\n const selection = lexical.$getSelection();\n\n if (typeof eventOrText === 'string') {\n if (lexical.$isRangeSelection(selection)) {\n selection.insertText(eventOrText);\n } else if (lexical.DEPRECATED_$isGridSelection(selection)) ;\n } else {\n if (!lexical.$isRangeSelection(selection) && !lexical.DEPRECATED_$isGridSelection(selection)) {\n return false;\n }\n\n const dataTransfer = eventOrText.dataTransfer;\n\n if (dataTransfer != null) {\n clipboard.$insertDataTransferForRichText(dataTransfer, selection, editor);\n } else if (lexical.$isRangeSelection(selection)) {\n const data = eventOrText.data;\n\n if (data) {\n selection.insertText(data);\n }\n\n return true;\n }\n }\n\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.REMOVE_TEXT_COMMAND, () => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.removeText();\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.FORMAT_TEXT_COMMAND, format => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.formatText(format);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.FORMAT_ELEMENT_COMMAND, format => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection) && !lexical.$isNodeSelection(selection)) {\n return false;\n }\n\n const nodes = selection.getNodes();\n\n for (const node of nodes) {\n const element = utils.$findMatchingParent(node, parentNode => lexical.$isElementNode(parentNode) && !parentNode.isInline());\n\n if (element !== null) {\n element.setFormat(format);\n }\n }\n\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.INSERT_LINE_BREAK_COMMAND, selectStart => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.insertLineBreak(selectStart);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.INSERT_PARAGRAPH_COMMAND, () => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n selection.insertParagraph();\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.INSERT_TAB_COMMAND, () => {\n lexical.$insertNodes([lexical.$createTabNode()]);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.INDENT_CONTENT_COMMAND, () => {\n return handleIndentAndOutdent(block => {\n const indent = block.getIndent();\n block.setIndent(indent + 1);\n });\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.OUTDENT_CONTENT_COMMAND, () => {\n return handleIndentAndOutdent(block => {\n const indent = block.getIndent();\n\n if (indent > 0) {\n block.setIndent(indent - 1);\n }\n });\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ARROW_UP_COMMAND, event => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isNodeSelection(selection) && !$isTargetWithinDecorator(event.target)) {\n // If selection is on a node, let's try and move selection\n // back to being a range selection.\n const nodes = selection.getNodes();\n\n if (nodes.length > 0) {\n nodes[0].selectPrevious();\n return true;\n }\n } else if (lexical.$isRangeSelection(selection)) {\n const possibleNode = lexical.$getAdjacentNode(selection.focus, true);\n\n if (!event.shiftKey && lexical.$isDecoratorNode(possibleNode) && !possibleNode.isIsolated() && !possibleNode.isInline()) {\n possibleNode.selectPrevious();\n event.preventDefault();\n return true;\n }\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ARROW_DOWN_COMMAND, event => {\n const selection = lexical.$getSelection();\n\n if (lexical.$isNodeSelection(selection)) {\n // If selection is on a node, let's try and move selection\n // back to being a range selection.\n const nodes = selection.getNodes();\n\n if (nodes.length > 0) {\n nodes[0].selectNext(0, 0);\n return true;\n }\n } else if (lexical.$isRangeSelection(selection)) {\n if ($isSelectionAtEndOfRoot(selection)) {\n event.preventDefault();\n return true;\n }\n\n const possibleNode = lexical.$getAdjacentNode(selection.focus, false);\n\n if (!event.shiftKey && lexical.$isDecoratorNode(possibleNode) && !possibleNode.isIsolated() && !possibleNode.isInline()) {\n possibleNode.selectNext();\n event.preventDefault();\n return true;\n }\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ARROW_LEFT_COMMAND, event => {\n const selection$1 = lexical.$getSelection();\n\n if (lexical.$isNodeSelection(selection$1)) {\n // If selection is on a node, let's try and move selection\n // back to being a range selection.\n const nodes = selection$1.getNodes();\n\n if (nodes.length > 0) {\n event.preventDefault();\n nodes[0].selectPrevious();\n return true;\n }\n }\n\n if (!lexical.$isRangeSelection(selection$1)) {\n return false;\n }\n\n if (selection.$shouldOverrideDefaultCharacterSelection(selection$1, true)) {\n const isHoldingShift = event.shiftKey;\n event.preventDefault();\n selection.$moveCharacter(selection$1, isHoldingShift, true);\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ARROW_RIGHT_COMMAND, event => {\n const selection$1 = lexical.$getSelection();\n\n if (lexical.$isNodeSelection(selection$1) && !$isTargetWithinDecorator(event.target)) {\n // If selection is on a node, let's try and move selection\n // back to being a range selection.\n const nodes = selection$1.getNodes();\n\n if (nodes.length > 0) {\n event.preventDefault();\n nodes[0].selectNext(0, 0);\n return true;\n }\n }\n\n if (!lexical.$isRangeSelection(selection$1)) {\n return false;\n }\n\n const isHoldingShift = event.shiftKey;\n\n if (selection.$shouldOverrideDefaultCharacterSelection(selection$1, false)) {\n event.preventDefault();\n selection.$moveCharacter(selection$1, isHoldingShift, false);\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_BACKSPACE_COMMAND, event => {\n if ($isTargetWithinDecorator(event.target)) {\n return false;\n }\n\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n event.preventDefault();\n const {\n anchor\n } = selection;\n const anchorNode = anchor.getNode();\n\n if (selection.isCollapsed() && anchor.offset === 0 && !lexical.$isRootNode(anchorNode)) {\n const element = utils.$getNearestBlockElementAncestorOrThrow(anchorNode);\n\n if (element.getIndent() > 0) {\n return editor.dispatchCommand(lexical.OUTDENT_CONTENT_COMMAND, undefined);\n }\n }\n\n return editor.dispatchCommand(lexical.DELETE_CHARACTER_COMMAND, true);\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_DELETE_COMMAND, event => {\n if ($isTargetWithinDecorator(event.target)) {\n return false;\n }\n\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n event.preventDefault();\n return editor.dispatchCommand(lexical.DELETE_CHARACTER_COMMAND, false);\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ENTER_COMMAND, event => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n if (event !== null) {\n // If we have beforeinput, then we can avoid blocking\n // the default behavior. This ensures that the iOS can\n // intercept that we're actually inserting a paragraph,\n // and autocomplete, autocapitalize etc work as intended.\n // This can also cause a strange performance issue in\n // Safari, where there is a noticeable pause due to\n // preventing the key down of enter.\n if ((IS_IOS || IS_SAFARI || IS_APPLE_WEBKIT) && CAN_USE_BEFORE_INPUT) {\n return false;\n }\n\n event.preventDefault();\n\n if (event.shiftKey) {\n return editor.dispatchCommand(lexical.INSERT_LINE_BREAK_COMMAND, false);\n }\n }\n\n return editor.dispatchCommand(lexical.INSERT_PARAGRAPH_COMMAND, undefined);\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.KEY_ESCAPE_COMMAND, () => {\n const selection = lexical.$getSelection();\n\n if (!lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n editor.blur();\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DROP_COMMAND, event => {\n const [, files] = eventFiles(event);\n\n if (files.length > 0) {\n const x = event.clientX;\n const y = event.clientY;\n const eventRange = caretFromPoint(x, y);\n\n if (eventRange !== null) {\n const {\n offset: domOffset,\n node: domNode\n } = eventRange;\n const node = lexical.$getNearestNodeFromDOMNode(domNode);\n\n if (node !== null) {\n const selection = lexical.$createRangeSelection();\n\n if (lexical.$isTextNode(node)) {\n selection.anchor.set(node.getKey(), domOffset, 'text');\n selection.focus.set(node.getKey(), domOffset, 'text');\n } else {\n const parentKey = node.getParentOrThrow().getKey();\n const offset = node.getIndexWithinParent() + 1;\n selection.anchor.set(parentKey, offset, 'element');\n selection.focus.set(parentKey, offset, 'element');\n }\n\n const normalizedSelection = lexical.$normalizeSelection__EXPERIMENTAL(selection);\n lexical.$setSelection(normalizedSelection);\n }\n\n editor.dispatchCommand(DRAG_DROP_PASTE, files);\n }\n\n event.preventDefault();\n return true;\n }\n\n const selection = lexical.$getSelection();\n\n if (lexical.$isRangeSelection(selection)) {\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DRAGSTART_COMMAND, event => {\n const [isFileTransfer] = eventFiles(event);\n const selection = lexical.$getSelection();\n\n if (isFileTransfer && !lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.DRAGOVER_COMMAND, event => {\n const [isFileTransfer] = eventFiles(event);\n const selection = lexical.$getSelection();\n\n if (isFileTransfer && !lexical.$isRangeSelection(selection)) {\n return false;\n }\n\n const x = event.clientX;\n const y = event.clientY;\n const eventRange = caretFromPoint(x, y);\n\n if (eventRange !== null) {\n const node = lexical.$getNearestNodeFromDOMNode(eventRange.node);\n\n if (lexical.$isDecoratorNode(node)) {\n // Show browser caret as the user is dragging the media across the screen. Won't work\n // for DecoratorNode nor it's relevant.\n event.preventDefault();\n }\n }\n\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.SELECT_ALL_COMMAND, () => {\n lexical.$selectAll();\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.COPY_COMMAND, event => {\n clipboard.copyToClipboard(editor, utils.objectKlassEquals(event, ClipboardEvent) ? event : null);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.CUT_COMMAND, event => {\n onCutForRichText(event, editor);\n return true;\n }, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.PASTE_COMMAND, event => {\n const [, files, hasTextContent] = eventFiles(event);\n\n if (files.length > 0 && !hasTextContent) {\n editor.dispatchCommand(DRAG_DROP_PASTE, files);\n return true;\n } // if inputs then paste within the input ignore creating a new node on paste event\n\n\n if (lexical.isSelectionCapturedInDecoratorInput(event.target)) {\n return false;\n }\n\n const selection = lexical.$getSelection();\n\n if (lexical.$isRangeSelection(selection) || lexical.DEPRECATED_$isGridSelection(selection)) {\n onPasteForRichText(event, editor);\n return true;\n }\n\n return false;\n }, lexical.COMMAND_PRIORITY_EDITOR));\n return removeListener;\n}\n\nexports.$createHeadingNode = $createHeadingNode;\nexports.$createQuoteNode = $createQuoteNode;\nexports.$isHeadingNode = $isHeadingNode;\nexports.$isQuoteNode = $isQuoteNode;\nexports.DRAG_DROP_PASTE = DRAG_DROP_PASTE;\nexports.HeadingNode = HeadingNode;\nexports.QuoteNode = QuoteNode;\nexports.eventFiles = eventFiles;\nexports.registerRichText = registerRichText;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalRichText = process.env.NODE_ENV === 'development' ? require('./LexicalRichText.dev.js') : require('./LexicalRichText.prod.js')\nmodule.exports = LexicalRichText;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar lexical = require('lexical');\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst CSS_TO_STYLES = new Map();\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction getDOMTextNode(element) {\n let node = element;\n\n while (node != null) {\n if (node.nodeType === Node.TEXT_NODE) {\n return node;\n }\n\n node = node.firstChild;\n }\n\n return null;\n}\n\nfunction getDOMIndexWithinParent(node) {\n const parent = node.parentNode;\n\n if (parent == null) {\n throw new Error('Should never happen');\n }\n\n return [parent, Array.from(parent.childNodes).indexOf(node)];\n}\n/**\n * Creates a selection range for the DOM.\n * @param editor - The lexical editor.\n * @param anchorNode - The anchor node of a selection.\n * @param _anchorOffset - The amount of space offset from the anchor to the focus.\n * @param focusNode - The current focus.\n * @param _focusOffset - The amount of space offset from the focus to the anchor.\n * @returns The range of selection for the DOM that was created.\n */\n\n\nfunction createDOMRange(editor, anchorNode, _anchorOffset, focusNode, _focusOffset) {\n const anchorKey = anchorNode.getKey();\n const focusKey = focusNode.getKey();\n const range = document.createRange();\n let anchorDOM = editor.getElementByKey(anchorKey);\n let focusDOM = editor.getElementByKey(focusKey);\n let anchorOffset = _anchorOffset;\n let focusOffset = _focusOffset;\n\n if (lexical.$isTextNode(anchorNode)) {\n anchorDOM = getDOMTextNode(anchorDOM);\n }\n\n if (lexical.$isTextNode(focusNode)) {\n focusDOM = getDOMTextNode(focusDOM);\n }\n\n if (anchorNode === undefined || focusNode === undefined || anchorDOM === null || focusDOM === null) {\n return null;\n }\n\n if (anchorDOM.nodeName === 'BR') {\n [anchorDOM, anchorOffset] = getDOMIndexWithinParent(anchorDOM);\n }\n\n if (focusDOM.nodeName === 'BR') {\n [focusDOM, focusOffset] = getDOMIndexWithinParent(focusDOM);\n }\n\n const firstChild = anchorDOM.firstChild;\n\n if (anchorDOM === focusDOM && firstChild != null && firstChild.nodeName === 'BR' && anchorOffset === 0 && focusOffset === 0) {\n focusOffset = 1;\n }\n\n try {\n range.setStart(anchorDOM, anchorOffset);\n range.setEnd(focusDOM, focusOffset);\n } catch (e) {\n return null;\n }\n\n if (range.collapsed && (anchorOffset !== focusOffset || anchorKey !== focusKey)) {\n // Range is backwards, we need to reverse it\n range.setStart(focusDOM, focusOffset);\n range.setEnd(anchorDOM, anchorOffset);\n }\n\n return range;\n}\n/**\n * Creates DOMRects, generally used to help the editor find a specific location on the screen.\n * @param editor - The lexical editor\n * @param range - A fragment of a document that can contain nodes and parts of text nodes.\n * @returns The selectionRects as an array.\n */\n\nfunction createRectsFromDOMRange(editor, range) {\n const rootElement = editor.getRootElement();\n\n if (rootElement === null) {\n return [];\n }\n\n const rootRect = rootElement.getBoundingClientRect();\n const computedStyle = getComputedStyle(rootElement);\n const rootPadding = parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight);\n const selectionRects = Array.from(range.getClientRects());\n let selectionRectsLength = selectionRects.length; //sort rects from top left to bottom right.\n\n selectionRects.sort((a, b) => {\n const top = a.top - b.top; // Some rects match position closely, but not perfectly,\n // so we give a 3px tolerance.\n\n if (Math.abs(top) <= 3) {\n return a.left - b.left;\n }\n\n return top;\n });\n let prevRect;\n\n for (let i = 0; i < selectionRectsLength; i++) {\n const selectionRect = selectionRects[i]; // Exclude rects that overlap preceding Rects in the sorted list.\n\n const isOverlappingRect = prevRect && prevRect.top <= selectionRect.top && prevRect.top + prevRect.height > selectionRect.top && prevRect.left + prevRect.width > selectionRect.left; // Exclude selections that span the entire element\n\n const selectionSpansElement = selectionRect.width + rootPadding === rootRect.width;\n\n if (isOverlappingRect || selectionSpansElement) {\n selectionRects.splice(i--, 1);\n selectionRectsLength--;\n continue;\n }\n\n prevRect = selectionRect;\n }\n\n return selectionRects;\n}\n/**\n * Creates an object containing all the styles and their values provided in the CSS string.\n * @param css - The CSS string of styles and their values.\n * @returns The styleObject containing all the styles and their values.\n */\n\nfunction getStyleObjectFromRawCSS(css) {\n const styleObject = {};\n const styles = css.split(';');\n\n for (const style of styles) {\n if (style !== '') {\n const [key, value] = style.split(/:([^]+)/); // split on first colon\n\n styleObject[key.trim()] = value.trim();\n }\n }\n\n return styleObject;\n}\n/**\n * Given a CSS string, returns an object from the style cache.\n * @param css - The CSS property as a string.\n * @returns The value of the given CSS property.\n */\n\nfunction getStyleObjectFromCSS(css) {\n let value = CSS_TO_STYLES.get(css);\n\n if (value === undefined) {\n value = getStyleObjectFromRawCSS(css);\n CSS_TO_STYLES.set(css, value);\n }\n\n {\n // Freeze the value in DEV to prevent accidental mutations\n Object.freeze(value);\n }\n\n return value;\n}\n/**\n * Gets the CSS styles from the style object.\n * @param styles - The style object containing the styles to get.\n * @returns A string containing the CSS styles and their values.\n */\n\nfunction getCSSFromStyleObject(styles) {\n let css = '';\n\n for (const style in styles) {\n if (style) {\n css += `${style}: ${styles[style]};`;\n }\n }\n\n return css;\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nfunction $updateElementNodeProperties(target, source) {\n target.__first = source.__first;\n target.__last = source.__last;\n target.__size = source.__size;\n target.__format = source.__format;\n target.__indent = source.__indent;\n target.__dir = source.__dir;\n return target;\n}\n\nfunction $updateTextNodeProperties(target, source) {\n target.__format = source.__format;\n target.__style = source.__style;\n target.__mode = source.__mode;\n target.__detail = source.__detail;\n return target;\n}\n/**\n * Returns a copy of a node, but generates a new key for the copy.\n * @param node - The node to be cloned.\n * @returns The clone of the node.\n */\n\n\nfunction $cloneWithProperties(node) {\n const constructor = node.constructor; // @ts-expect-error\n\n const clone = constructor.clone(node);\n clone.__parent = node.__parent;\n clone.__next = node.__next;\n clone.__prev = node.__prev;\n\n if (lexical.$isElementNode(node) && lexical.$isElementNode(clone)) {\n return $updateElementNodeProperties(clone, node);\n }\n\n if (lexical.$isTextNode(node) && lexical.$isTextNode(clone)) {\n return $updateTextNodeProperties(clone, node);\n }\n\n return clone;\n}\n/**\n * Generally used to append text content to HTML and JSON. Grabs the text content and \"slices\"\n * it to be generated into the new TextNode.\n * @param selection - The selection containing the node whose TextNode is to be edited.\n * @param textNode - The TextNode to be edited.\n * @returns The updated TextNode.\n */\n\nfunction $sliceSelectedTextNodeContent(selection, textNode) {\n if (textNode.isSelected() && !textNode.isSegmented() && !textNode.isToken() && (lexical.$isRangeSelection(selection) || lexical.DEPRECATED_$isGridSelection(selection))) {\n const anchorNode = selection.anchor.getNode();\n const focusNode = selection.focus.getNode();\n const isAnchor = textNode.is(anchorNode);\n const isFocus = textNode.is(focusNode);\n\n if (isAnchor || isFocus) {\n const isBackward = selection.isBackward();\n const [anchorOffset, focusOffset] = selection.getCharacterOffsets();\n const isSame = anchorNode.is(focusNode);\n const isFirst = textNode.is(isBackward ? focusNode : anchorNode);\n const isLast = textNode.is(isBackward ? anchorNode : focusNode);\n let startOffset = 0;\n let endOffset = undefined;\n\n if (isSame) {\n startOffset = anchorOffset > focusOffset ? focusOffset : anchorOffset;\n endOffset = anchorOffset > focusOffset ? anchorOffset : focusOffset;\n } else if (isFirst) {\n const offset = isBackward ? focusOffset : anchorOffset;\n startOffset = offset;\n endOffset = undefined;\n } else if (isLast) {\n const offset = isBackward ? anchorOffset : focusOffset;\n startOffset = 0;\n endOffset = offset;\n }\n\n textNode.__text = textNode.__text.slice(startOffset, endOffset);\n return textNode;\n }\n }\n\n return textNode;\n}\n/**\n * Determines if the current selection is at the end of the node.\n * @param point - The point of the selection to test.\n * @returns true if the provided point offset is in the last possible position, false otherwise.\n */\n\nfunction $isAtNodeEnd(point) {\n if (point.type === 'text') {\n return point.offset === point.getNode().getTextContentSize();\n }\n\n return point.offset === point.getNode().getChildrenSize();\n}\n/**\n * Trims text from a node in order to shorten it, eg. to enforce a text's max length. If it deletes text\n * that is an ancestor of the anchor then it will leave 2 indents, otherwise, if no text content exists, it deletes\n * the TextNode. It will move the focus to either the end of any left over text or beginning of a new TextNode.\n * @param editor - The lexical editor.\n * @param anchor - The anchor of the current selection, where the selection should be pointing.\n * @param delCount - The amount of characters to delete. Useful as a dynamic variable eg. textContentSize - maxLength;\n */\n\nfunction trimTextContentFromAnchor(editor, anchor, delCount) {\n // Work from the current selection anchor point\n let currentNode = anchor.getNode();\n let remaining = delCount;\n\n if (lexical.$isElementNode(currentNode)) {\n const descendantNode = currentNode.getDescendantByIndex(anchor.offset);\n\n if (descendantNode !== null) {\n currentNode = descendantNode;\n }\n }\n\n while (remaining > 0 && currentNode !== null) {\n let nextNode = currentNode.getPreviousSibling();\n let additionalElementWhitespace = 0;\n\n if (nextNode === null) {\n let parent = currentNode.getParentOrThrow();\n let parentSibling = parent.getPreviousSibling();\n\n while (parentSibling === null) {\n parent = parent.getParent();\n\n if (parent === null) {\n nextNode = null;\n break;\n }\n\n parentSibling = parent.getPreviousSibling();\n }\n\n if (parent !== null) {\n additionalElementWhitespace = parent.isInline() ? 0 : 2;\n\n if (lexical.$isElementNode(parentSibling)) {\n nextNode = parentSibling.getLastDescendant();\n } else {\n nextNode = parentSibling;\n }\n }\n }\n\n let text = currentNode.getTextContent(); // If the text is empty, we need to consider adding in two line breaks to match\n // the content if we were to get it from its parent.\n\n if (text === '' && lexical.$isElementNode(currentNode) && !currentNode.isInline()) {\n // TODO: should this be handled in core?\n text = '\\n\\n';\n }\n\n const currentNodeSize = text.length;\n\n if (!lexical.$isTextNode(currentNode) || remaining >= currentNodeSize) {\n const parent = currentNode.getParent();\n currentNode.remove();\n\n if (parent != null && parent.getChildrenSize() === 0 && !lexical.$isRootNode(parent)) {\n parent.remove();\n }\n\n remaining -= currentNodeSize + additionalElementWhitespace;\n currentNode = nextNode;\n } else {\n const key = currentNode.getKey(); // See if we can just revert it to what was in the last editor state\n\n const prevTextContent = editor.getEditorState().read(() => {\n const prevNode = lexical.$getNodeByKey(key);\n\n if (lexical.$isTextNode(prevNode) && prevNode.isSimpleText()) {\n return prevNode.getTextContent();\n }\n\n return null;\n });\n const offset = currentNodeSize - remaining;\n const slicedText = text.slice(0, offset);\n\n if (prevTextContent !== null && prevTextContent !== text) {\n const prevSelection = lexical.$getPreviousSelection();\n let target = currentNode;\n\n if (!currentNode.isSimpleText()) {\n const textNode = lexical.$createTextNode(prevTextContent);\n currentNode.replace(textNode);\n target = textNode;\n } else {\n currentNode.setTextContent(prevTextContent);\n }\n\n if (lexical.$isRangeSelection(prevSelection) && prevSelection.isCollapsed()) {\n const prevOffset = prevSelection.anchor.offset;\n target.select(prevOffset, prevOffset);\n }\n } else if (currentNode.isSimpleText()) {\n // Split text\n const isSelected = anchor.key === key;\n let anchorOffset = anchor.offset; // Move offset to end if it's less than the remaining number, otherwise\n // we'll have a negative splitStart.\n\n if (anchorOffset < remaining) {\n anchorOffset = currentNodeSize;\n }\n\n const splitStart = isSelected ? anchorOffset - remaining : 0;\n const splitEnd = isSelected ? anchorOffset : offset;\n\n if (isSelected && splitStart === 0) {\n const [excessNode] = currentNode.splitText(splitStart, splitEnd);\n excessNode.remove();\n } else {\n const [, excessNode] = currentNode.splitText(splitStart, splitEnd);\n excessNode.remove();\n }\n } else {\n const textNode = lexical.$createTextNode(slicedText);\n currentNode.replace(textNode);\n }\n\n remaining = 0;\n }\n }\n}\n/**\n * Gets the TextNode's style object and adds the styles to the CSS.\n * @param node - The TextNode to add styles to.\n */\n\nfunction $addNodeStyle(node) {\n const CSSText = node.getStyle();\n const styles = getStyleObjectFromRawCSS(CSSText);\n CSS_TO_STYLES.set(CSSText, styles);\n}\n\nfunction $patchStyle(target, patch) {\n const prevStyles = getStyleObjectFromCSS('getStyle' in target ? target.getStyle() : target.style);\n const newStyles = Object.entries(patch).reduce((styles, [key, value]) => {\n if (value === null) {\n delete styles[key];\n } else {\n styles[key] = value;\n }\n\n return styles;\n }, { ...prevStyles\n } || {});\n const newCSSText = getCSSFromStyleObject(newStyles);\n target.setStyle(newCSSText);\n CSS_TO_STYLES.set(newCSSText, newStyles);\n}\n/**\n * Applies the provided styles to the TextNodes in the provided Selection.\n * Will update partially selected TextNodes by splitting the TextNode and applying\n * the styles to the appropriate one.\n * @param selection - The selected node(s) to update.\n * @param patch - The patch to apply, which can include multiple styles. { CSSProperty: value }\n */\n\n\nfunction $patchStyleText(selection, patch) {\n const selectedNodes = selection.getNodes();\n const selectedNodesLength = selectedNodes.length;\n\n if (lexical.DEPRECATED_$isGridSelection(selection)) {\n const cellSelection = lexical.$createRangeSelection();\n const cellSelectionAnchor = cellSelection.anchor;\n const cellSelectionFocus = cellSelection.focus;\n\n for (let i = 0; i < selectedNodesLength; i++) {\n const node = selectedNodes[i];\n\n if (lexical.DEPRECATED_$isGridCellNode(node)) {\n cellSelectionAnchor.set(node.getKey(), 0, 'element');\n cellSelectionFocus.set(node.getKey(), node.getChildrenSize(), 'element');\n $patchStyleText(lexical.$normalizeSelection__EXPERIMENTAL(cellSelection), patch);\n }\n }\n\n lexical.$setSelection(selection);\n return;\n }\n\n const lastIndex = selectedNodesLength - 1;\n let firstNode = selectedNodes[0];\n let lastNode = selectedNodes[lastIndex];\n\n if (selection.isCollapsed()) {\n $patchStyle(selection, patch);\n return;\n }\n\n const anchor = selection.anchor;\n const focus = selection.focus;\n const firstNodeText = firstNode.getTextContent();\n const firstNodeTextLength = firstNodeText.length;\n const focusOffset = focus.offset;\n let anchorOffset = anchor.offset;\n const isBefore = anchor.isBefore(focus);\n let startOffset = isBefore ? anchorOffset : focusOffset;\n let endOffset = isBefore ? focusOffset : anchorOffset;\n const startType = isBefore ? anchor.type : focus.type;\n const endType = isBefore ? focus.type : anchor.type;\n const endKey = isBefore ? focus.key : anchor.key; // This is the case where the user only selected the very end of the\n // first node so we don't want to include it in the formatting change.\n\n if (lexical.$isTextNode(firstNode) && startOffset === firstNodeTextLength) {\n const nextSibling = firstNode.getNextSibling();\n\n if (lexical.$isTextNode(nextSibling)) {\n // we basically make the second node the firstNode, changing offsets accordingly\n anchorOffset = 0;\n startOffset = 0;\n firstNode = nextSibling;\n }\n } // This is the case where we only selected a single node\n\n\n if (selectedNodes.length === 1) {\n if (lexical.$isTextNode(firstNode)) {\n startOffset = startType === 'element' ? 0 : anchorOffset > focusOffset ? focusOffset : anchorOffset;\n endOffset = endType === 'element' ? firstNodeTextLength : anchorOffset > focusOffset ? anchorOffset : focusOffset; // No actual text is selected, so do nothing.\n\n if (startOffset === endOffset) {\n return;\n } // The entire node is selected, so just format it\n\n\n if (startOffset === 0 && endOffset === firstNodeTextLength) {\n $patchStyle(firstNode, patch);\n firstNode.select(startOffset, endOffset);\n } else {\n // The node is partially selected, so split it into two nodes\n // and style the selected one.\n const splitNodes = firstNode.splitText(startOffset, endOffset);\n const replacement = startOffset === 0 ? splitNodes[0] : splitNodes[1];\n $patchStyle(replacement, patch);\n replacement.select(0, endOffset - startOffset);\n }\n } // multiple nodes selected.\n\n } else {\n if (lexical.$isTextNode(firstNode) && startOffset < firstNode.getTextContentSize()) {\n if (startOffset !== 0) {\n // the entire first node isn't selected, so split it\n firstNode = firstNode.splitText(startOffset)[1];\n startOffset = 0;\n }\n\n $patchStyle(firstNode, patch);\n }\n\n if (lexical.$isTextNode(lastNode)) {\n const lastNodeText = lastNode.getTextContent();\n const lastNodeTextLength = lastNodeText.length; // The last node might not actually be the end node\n //\n // If not, assume the last node is fully-selected unless the end offset is\n // zero.\n\n if (lastNode.__key !== endKey && endOffset !== 0) {\n endOffset = lastNodeTextLength;\n } // if the entire last node isn't selected, split it\n\n\n if (endOffset !== lastNodeTextLength) {\n [lastNode] = lastNode.splitText(endOffset);\n }\n\n if (endOffset !== 0) {\n $patchStyle(lastNode, patch);\n }\n } // style all the text nodes in between\n\n\n for (let i = 1; i < lastIndex; i++) {\n const selectedNode = selectedNodes[i];\n const selectedNodeKey = selectedNode.getKey();\n\n if (lexical.$isTextNode(selectedNode) && selectedNodeKey !== firstNode.getKey() && selectedNodeKey !== lastNode.getKey() && !selectedNode.isToken()) {\n $patchStyle(selectedNode, patch);\n }\n }\n }\n}\n\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n/**\n * Converts all nodes in the selection that are of one block type to another.\n * @param selection - The selected blocks to be converted.\n * @param createElement - The function that creates the node. eg. $createParagraphNode.\n */\n\nfunction $setBlocksType(selection, createElement) {\n if (selection.anchor.key === 'root') {\n const element = createElement();\n const root = lexical.$getRoot();\n const firstChild = root.getFirstChild();\n\n if (firstChild) {\n firstChild.replace(element, true);\n } else {\n root.append(element);\n }\n\n return;\n }\n\n const nodes = selection.getNodes();\n let maybeBlock = selection.anchor.getNode().getParentOrThrow();\n\n if (nodes.indexOf(maybeBlock) === -1) {\n nodes.push(maybeBlock);\n }\n\n if (maybeBlock.isInline()) {\n maybeBlock = maybeBlock.getParentOrThrow();\n\n if (nodes.indexOf(maybeBlock) === -1) {\n nodes.push(maybeBlock);\n }\n }\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (!isBlock(node)) {\n continue;\n }\n\n const targetElement = createElement();\n targetElement.setFormat(node.getFormatType());\n targetElement.setIndent(node.getIndent());\n node.replace(targetElement, true);\n }\n}\n\nfunction isBlock(node) {\n if (!lexical.$isElementNode(node) || lexical.$isRootOrShadowRoot(node)) {\n return false;\n }\n\n const firstChild = node.getFirstChild();\n const isLeafElement = firstChild === null || lexical.$isLineBreakNode(firstChild) || lexical.$isTextNode(firstChild) || firstChild.isInline();\n return !node.isInline() && node.canBeEmpty() !== false && isLeafElement;\n}\n\nfunction isPointAttached(point) {\n return point.getNode().isAttached();\n}\n\nfunction $removeParentEmptyElements(startingNode) {\n let node = startingNode;\n\n while (node !== null && !lexical.$isRootOrShadowRoot(node)) {\n const latest = node.getLatest();\n const parentNode = node.getParent();\n\n if (latest.getChildrenSize() === 0) {\n node.remove(true);\n }\n\n node = parentNode;\n }\n}\n/**\n * @deprecated\n * Wraps all nodes in the selection into another node of the type returned by createElement.\n * @param selection - The selection of nodes to be wrapped.\n * @param createElement - A function that creates the wrapping ElementNode. eg. $createParagraphNode.\n * @param wrappingElement - An element to append the wrapped selection and its children to.\n */\n\n\nfunction $wrapNodes(selection, createElement, wrappingElement = null) {\n const nodes = selection.getNodes();\n const nodesLength = nodes.length;\n const anchor = selection.anchor;\n\n if (nodesLength === 0 || nodesLength === 1 && anchor.type === 'element' && anchor.getNode().getChildrenSize() === 0) {\n const target = anchor.type === 'text' ? anchor.getNode().getParentOrThrow() : anchor.getNode();\n const children = target.getChildren();\n let element = createElement();\n element.setFormat(target.getFormatType());\n element.setIndent(target.getIndent());\n children.forEach(child => element.append(child));\n\n if (wrappingElement) {\n element = wrappingElement.append(element);\n }\n\n target.replace(element);\n return;\n }\n\n let topLevelNode = null;\n let descendants = [];\n\n for (let i = 0; i < nodesLength; i++) {\n const node = nodes[i]; // Determine whether wrapping has to be broken down into multiple chunks. This can happen if the\n // user selected multiple Root-like nodes that have to be treated separately as if they are\n // their own branch. I.e. you don't want to wrap a whole table, but rather the contents of each\n // of each of the cell nodes.\n\n if (lexical.$isRootOrShadowRoot(node)) {\n $wrapNodesImpl(selection, descendants, descendants.length, createElement, wrappingElement);\n descendants = [];\n topLevelNode = node;\n } else if (topLevelNode === null || topLevelNode !== null && lexical.$hasAncestor(node, topLevelNode)) {\n descendants.push(node);\n } else {\n $wrapNodesImpl(selection, descendants, descendants.length, createElement, wrappingElement);\n descendants = [node];\n }\n }\n\n $wrapNodesImpl(selection, descendants, descendants.length, createElement, wrappingElement);\n}\n/**\n * Wraps each node into a new ElementNode.\n * @param selection - The selection of nodes to wrap.\n * @param nodes - An array of nodes, generally the descendants of the selection.\n * @param nodesLength - The length of nodes.\n * @param createElement - A function that creates the wrapping ElementNode. eg. $createParagraphNode.\n * @param wrappingElement - An element to wrap all the nodes into.\n * @returns\n */\n\nfunction $wrapNodesImpl(selection, nodes, nodesLength, createElement, wrappingElement = null) {\n if (nodes.length === 0) {\n return;\n }\n\n const firstNode = nodes[0];\n const elementMapping = new Map();\n const elements = []; // The below logic is to find the right target for us to\n // either insertAfter/insertBefore/append the corresponding\n // elements to. This is made more complicated due to nested\n // structures.\n\n let target = lexical.$isElementNode(firstNode) ? firstNode : firstNode.getParentOrThrow();\n\n if (target.isInline()) {\n target = target.getParentOrThrow();\n }\n\n let targetIsPrevSibling = false;\n\n while (target !== null) {\n const prevSibling = target.getPreviousSibling();\n\n if (prevSibling !== null) {\n target = prevSibling;\n targetIsPrevSibling = true;\n break;\n }\n\n target = target.getParentOrThrow();\n\n if (lexical.$isRootOrShadowRoot(target)) {\n break;\n }\n }\n\n const emptyElements = new Set(); // Find any top level empty elements\n\n for (let i = 0; i < nodesLength; i++) {\n const node = nodes[i];\n\n if (lexical.$isElementNode(node) && node.getChildrenSize() === 0) {\n emptyElements.add(node.getKey());\n }\n }\n\n const movedNodes = new Set(); // Move out all leaf nodes into our elements array.\n // If we find a top level empty element, also move make\n // an element for that.\n\n for (let i = 0; i < nodesLength; i++) {\n const node = nodes[i];\n let parent = node.getParent();\n\n if (parent !== null && parent.isInline()) {\n parent = parent.getParent();\n }\n\n if (parent !== null && lexical.$isLeafNode(node) && !movedNodes.has(node.getKey())) {\n const parentKey = parent.getKey();\n\n if (elementMapping.get(parentKey) === undefined) {\n const targetElement = createElement();\n targetElement.setFormat(parent.getFormatType());\n targetElement.setIndent(parent.getIndent());\n elements.push(targetElement);\n elementMapping.set(parentKey, targetElement); // Move node and its siblings to the new\n // element.\n\n parent.getChildren().forEach(child => {\n targetElement.append(child);\n movedNodes.add(child.getKey());\n\n if (lexical.$isElementNode(child)) {\n // Skip nested leaf nodes if the parent has already been moved\n child.getChildrenKeys().forEach(key => movedNodes.add(key));\n }\n });\n $removeParentEmptyElements(parent);\n }\n } else if (emptyElements.has(node.getKey())) {\n const targetElement = createElement();\n targetElement.setFormat(node.getFormatType());\n targetElement.setIndent(node.getIndent());\n elements.push(targetElement);\n node.remove(true);\n }\n }\n\n if (wrappingElement !== null) {\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n wrappingElement.append(element);\n }\n }\n\n let lastElement = null; // If our target is Root-like, let's see if we can re-adjust\n // so that the target is the first child instead.\n\n if (lexical.$isRootOrShadowRoot(target)) {\n if (targetIsPrevSibling) {\n if (wrappingElement !== null) {\n target.insertAfter(wrappingElement);\n } else {\n for (let i = elements.length - 1; i >= 0; i--) {\n const element = elements[i];\n target.insertAfter(element);\n }\n }\n } else {\n const firstChild = target.getFirstChild();\n\n if (lexical.$isElementNode(firstChild)) {\n target = firstChild;\n }\n\n if (firstChild === null) {\n if (wrappingElement) {\n target.append(wrappingElement);\n } else {\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n target.append(element);\n lastElement = element;\n }\n }\n } else {\n if (wrappingElement !== null) {\n firstChild.insertBefore(wrappingElement);\n } else {\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n firstChild.insertBefore(element);\n lastElement = element;\n }\n }\n }\n }\n } else {\n if (wrappingElement) {\n target.insertAfter(wrappingElement);\n } else {\n for (let i = elements.length - 1; i >= 0; i--) {\n const element = elements[i];\n target.insertAfter(element);\n lastElement = element;\n }\n }\n }\n\n const prevSelection = lexical.$getPreviousSelection();\n\n if (lexical.$isRangeSelection(prevSelection) && isPointAttached(prevSelection.anchor) && isPointAttached(prevSelection.focus)) {\n lexical.$setSelection(prevSelection.clone());\n } else if (lastElement !== null) {\n lastElement.selectEnd();\n } else {\n selection.dirty = true;\n }\n}\n/**\n * Determines if the default character selection should be overridden. Used with DecoratorNodes\n * @param selection - The selection whose default character selection may need to be overridden.\n * @param isBackward - Is the selection backwards (the focus comes before the anchor)?\n * @returns true if it should be overridden, false if not.\n */\n\nfunction $shouldOverrideDefaultCharacterSelection(selection, isBackward) {\n const possibleNode = lexical.$getAdjacentNode(selection.focus, isBackward);\n return lexical.$isDecoratorNode(possibleNode) && !possibleNode.isIsolated() || lexical.$isElementNode(possibleNode) && !possibleNode.isInline() && !possibleNode.canBeEmpty();\n}\n/**\n * Moves the selection according to the arguments.\n * @param selection - The selected text or nodes.\n * @param isHoldingShift - Is the shift key being held down during the operation.\n * @param isBackward - Is the selection selected backwards (the focus comes before the anchor)?\n * @param granularity - The distance to adjust the current selection.\n */\n\nfunction $moveCaretSelection(selection, isHoldingShift, isBackward, granularity) {\n selection.modify(isHoldingShift ? 'extend' : 'move', isBackward, granularity);\n}\n/**\n * Tests a parent element for right to left direction.\n * @param selection - The selection whose parent is to be tested.\n * @returns true if the selections' parent element has a direction of 'rtl' (right to left), false otherwise.\n */\n\nfunction $isParentElementRTL(selection) {\n const anchorNode = selection.anchor.getNode();\n const parent = lexical.$isRootNode(anchorNode) ? anchorNode : anchorNode.getParentOrThrow();\n return parent.getDirection() === 'rtl';\n}\n/**\n * Moves selection by character according to arguments.\n * @param selection - The selection of the characters to move.\n * @param isHoldingShift - Is the shift key being held down during the operation.\n * @param isBackward - Is the selection backward (the focus comes before the anchor)?\n */\n\nfunction $moveCharacter(selection, isHoldingShift, isBackward) {\n const isRTL = $isParentElementRTL(selection);\n $moveCaretSelection(selection, isHoldingShift, isBackward ? !isRTL : isRTL, 'character');\n}\n/**\n * Expands the current Selection to cover all of the content in the editor.\n * @param selection - The current selection.\n */\n\nfunction $selectAll(selection) {\n const anchor = selection.anchor;\n const focus = selection.focus;\n const anchorNode = anchor.getNode();\n const topParent = anchorNode.getTopLevelElementOrThrow();\n const root = topParent.getParentOrThrow();\n let firstNode = root.getFirstDescendant();\n let lastNode = root.getLastDescendant();\n let firstType = 'element';\n let lastType = 'element';\n let lastOffset = 0;\n\n if (lexical.$isTextNode(firstNode)) {\n firstType = 'text';\n } else if (!lexical.$isElementNode(firstNode) && firstNode !== null) {\n firstNode = firstNode.getParentOrThrow();\n }\n\n if (lexical.$isTextNode(lastNode)) {\n lastType = 'text';\n lastOffset = lastNode.getTextContentSize();\n } else if (!lexical.$isElementNode(lastNode) && lastNode !== null) {\n lastNode = lastNode.getParentOrThrow();\n }\n\n if (firstNode && lastNode) {\n anchor.set(firstNode.getKey(), 0, firstType);\n focus.set(lastNode.getKey(), lastOffset, lastType);\n }\n}\n/**\n * Returns the current value of a CSS property for Nodes, if set. If not set, it returns the defaultValue.\n * @param node - The node whose style value to get.\n * @param styleProperty - The CSS style property.\n * @param defaultValue - The default value for the property.\n * @returns The value of the property for node.\n */\n\nfunction $getNodeStyleValueForProperty(node, styleProperty, defaultValue) {\n const css = node.getStyle();\n const styleObject = getStyleObjectFromCSS(css);\n\n if (styleObject !== null) {\n return styleObject[styleProperty] || defaultValue;\n }\n\n return defaultValue;\n}\n/**\n * Returns the current value of a CSS property for TextNodes in the Selection, if set. If not set, it returns the defaultValue.\n * If all TextNodes do not have the same value, it returns an empty string.\n * @param selection - The selection of TextNodes whose value to find.\n * @param styleProperty - The CSS style property.\n * @param defaultValue - The default value for the property, defaults to an empty string.\n * @returns The value of the property for the selected TextNodes.\n */\n\n\nfunction $getSelectionStyleValueForProperty(selection, styleProperty, defaultValue = '') {\n let styleValue = null;\n const nodes = selection.getNodes();\n const anchor = selection.anchor;\n const focus = selection.focus;\n const isBackward = selection.isBackward();\n const endOffset = isBackward ? focus.offset : anchor.offset;\n const endNode = isBackward ? focus.getNode() : anchor.getNode();\n\n if (selection.style !== '') {\n const css = selection.style;\n const styleObject = getStyleObjectFromCSS(css);\n\n if (styleObject !== null && styleProperty in styleObject) {\n return styleObject[styleProperty];\n }\n }\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i]; // if no actual characters in the end node are selected, we don't\n // include it in the selection for purposes of determining style\n // value\n\n if (i !== 0 && endOffset === 0 && node.is(endNode)) {\n continue;\n }\n\n if (lexical.$isTextNode(node)) {\n const nodeStyleValue = $getNodeStyleValueForProperty(node, styleProperty, defaultValue);\n\n if (styleValue === null) {\n styleValue = nodeStyleValue;\n } else if (styleValue !== nodeStyleValue) {\n // multiple text nodes are in the selection and they don't all\n // have the same style.\n styleValue = '';\n break;\n }\n }\n }\n\n return styleValue === null ? defaultValue : styleValue;\n}\n\nexports.$addNodeStyle = $addNodeStyle;\nexports.$cloneWithProperties = $cloneWithProperties;\nexports.$getSelectionStyleValueForProperty = $getSelectionStyleValueForProperty;\nexports.$isAtNodeEnd = $isAtNodeEnd;\nexports.$isParentElementRTL = $isParentElementRTL;\nexports.$moveCaretSelection = $moveCaretSelection;\nexports.$moveCharacter = $moveCharacter;\nexports.$patchStyleText = $patchStyleText;\nexports.$selectAll = $selectAll;\nexports.$setBlocksType = $setBlocksType;\nexports.$shouldOverrideDefaultCharacterSelection = $shouldOverrideDefaultCharacterSelection;\nexports.$sliceSelectedTextNodeContent = $sliceSelectedTextNodeContent;\nexports.$wrapNodes = $wrapNodes;\nexports.createDOMRange = createDOMRange;\nexports.createRectsFromDOMRange = createRectsFromDOMRange;\nexports.getStyleObjectFromCSS = getStyleObjectFromCSS;\nexports.trimTextContentFromAnchor = trimTextContentFromAnchor;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalSelection = process.env.NODE_ENV === 'development' ? require('./LexicalSelection.dev.js') : require('./LexicalSelection.prod.js')\nmodule.exports = LexicalSelection;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar lexical = require('lexical');\n\n/** @module @lexical/text */\n\n/**\n * Finds a TextNode with a size larger than targetCharacters and returns\n * the node along with the remaining length of the text.\n * @param root - The RootNode.\n * @param targetCharacters - The number of characters whose TextNode must be larger than.\n * @returns The TextNode and the intersections offset, or null if no TextNode is found.\n */\nfunction $findTextIntersectionFromCharacters(root, targetCharacters) {\n let node = root.getFirstChild();\n let currentCharacters = 0;\n\n mainLoop: while (node !== null) {\n if (lexical.$isElementNode(node)) {\n const child = node.getFirstChild();\n\n if (child !== null) {\n node = child;\n continue;\n }\n } else if (lexical.$isTextNode(node)) {\n const characters = node.getTextContentSize();\n\n if (currentCharacters + characters > targetCharacters) {\n return {\n node,\n offset: targetCharacters - currentCharacters\n };\n }\n\n currentCharacters += characters;\n }\n\n const sibling = node.getNextSibling();\n\n if (sibling !== null) {\n node = sibling;\n continue;\n }\n\n let parent = node.getParent();\n\n while (parent !== null) {\n const parentSibling = parent.getNextSibling();\n\n if (parentSibling !== null) {\n node = parentSibling;\n continue mainLoop;\n }\n\n parent = parent.getParent();\n }\n\n break;\n }\n\n return null;\n}\n/**\n * Determines if the root has any text content and can trim any whitespace if it does.\n * @param isEditorComposing - Is the editor in composition mode due to an active Input Method Editor?\n * @param trim - Should the root text have its whitespaced trimmed? Defaults to true.\n * @returns true if text content is empty, false if there is text or isEditorComposing is true.\n */\n\nfunction $isRootTextContentEmpty(isEditorComposing, trim = true) {\n if (isEditorComposing) {\n return false;\n }\n\n let text = $rootTextContent();\n\n if (trim) {\n text = text.trim();\n }\n\n return text === '';\n}\n/**\n * Returns a function that executes {@link $isRootTextContentEmpty}\n * @param isEditorComposing - Is the editor in composition mode due to an active Input Method Editor?\n * @param trim - Should the root text have its whitespaced trimmed? Defaults to true.\n * @returns A function that executes $isRootTextContentEmpty based on arguments.\n */\n\nfunction $isRootTextContentEmptyCurry(isEditorComposing, trim) {\n return () => $isRootTextContentEmpty(isEditorComposing, trim);\n}\n/**\n * Returns the root's text content.\n * @returns The root's text content.\n */\n\nfunction $rootTextContent() {\n const root = lexical.$getRoot();\n return root.getTextContent();\n}\n/**\n * Determines if the input should show the placeholder. If anything is in\n * in the root the placeholder should not be shown.\n * @param isComposing - Is the editor in composition mode due to an active Input Method Editor?\n * @returns true if the input should show the placeholder, false otherwise.\n */\n\nfunction $canShowPlaceholder(isComposing) {\n if (!$isRootTextContentEmpty(isComposing, false)) {\n return false;\n }\n\n const root = lexical.$getRoot();\n const children = root.getChildren();\n const childrenLength = children.length;\n\n if (childrenLength > 1) {\n return false;\n }\n\n for (let i = 0; i < childrenLength; i++) {\n const topBlock = children[i];\n\n if (lexical.$isDecoratorNode(topBlock)) {\n return false;\n }\n\n if (lexical.$isElementNode(topBlock)) {\n if (!lexical.$isParagraphNode(topBlock)) {\n return false;\n }\n\n if (topBlock.__indent !== 0) {\n return false;\n }\n\n const topBlockChildren = topBlock.getChildren();\n const topBlockChildrenLength = topBlockChildren.length;\n\n for (let s = 0; s < topBlockChildrenLength; s++) {\n const child = topBlockChildren[i];\n\n if (!lexical.$isTextNode(child)) {\n return false;\n }\n }\n }\n }\n\n return true;\n}\n/**\n * Returns a function that executes {@link $canShowPlaceholder}\n * @param isEditorComposing - Is the editor in composition mode due to an active Input Method Editor?\n * @returns A function that executes $canShowPlaceholder with arguments.\n */\n\nfunction $canShowPlaceholderCurry(isEditorComposing) {\n return () => $canShowPlaceholder(isEditorComposing);\n}\n\n/**\n * Returns a touple that can be rested (...) into mergeRegister to clean up\n * node transforms listeners that transforms text into another node, eg. a HashtagNode.\n * @example\n * ```ts\n * useEffect(() => {\n return mergeRegister(\n ...registerLexicalTextEntity(editor, getMatch, targetNode, createNode),\n );\n }, [createNode, editor, getMatch, targetNode]);\n * ```\n * Where targetNode is the type of node containing the text you want to transform (like a text input),\n * then getMatch uses a regex to find a matching text and creates the proper node to include the matching text.\n * @param editor - The lexical editor.\n * @param getMatch - Finds a matching string that satisfies a regex expression.\n * @param targetNode - The node type that contains text to match with. eg. HashtagNode\n * @param createNode - A function that creates a new node to contain the matched text. eg createHashtagNode\n * @returns An array containing the plain text and reverse node transform listeners.\n */\nfunction registerLexicalTextEntity(editor, getMatch, targetNode, createNode) {\n const isTargetNode = node => {\n return node instanceof targetNode;\n };\n\n const replaceWithSimpleText = node => {\n const textNode = lexical.$createTextNode(node.getTextContent());\n textNode.setFormat(node.getFormat());\n node.replace(textNode);\n };\n\n const getMode = node => {\n return node.getLatest().__mode;\n };\n\n const textNodeTransform = node => {\n if (!node.isSimpleText()) {\n return;\n }\n\n const prevSibling = node.getPreviousSibling();\n let text = node.getTextContent();\n let currentNode = node;\n let match;\n\n if (lexical.$isTextNode(prevSibling)) {\n const previousText = prevSibling.getTextContent();\n const combinedText = previousText + text;\n const prevMatch = getMatch(combinedText);\n\n if (isTargetNode(prevSibling)) {\n if (prevMatch === null || getMode(prevSibling) !== 0) {\n replaceWithSimpleText(prevSibling);\n return;\n } else {\n const diff = prevMatch.end - previousText.length;\n\n if (diff > 0) {\n const concatText = text.slice(0, diff);\n const newTextContent = previousText + concatText;\n prevSibling.select();\n prevSibling.setTextContent(newTextContent);\n\n if (diff === text.length) {\n node.remove();\n } else {\n const remainingText = text.slice(diff);\n node.setTextContent(remainingText);\n }\n\n return;\n }\n }\n } else if (prevMatch === null || prevMatch.start < previousText.length) {\n return;\n }\n } // eslint-disable-next-line no-constant-condition\n\n\n while (true) {\n match = getMatch(text);\n let nextText = match === null ? '' : text.slice(match.end);\n text = nextText;\n\n if (nextText === '') {\n const nextSibling = currentNode.getNextSibling();\n\n if (lexical.$isTextNode(nextSibling)) {\n nextText = currentNode.getTextContent() + nextSibling.getTextContent();\n const nextMatch = getMatch(nextText);\n\n if (nextMatch === null) {\n if (isTargetNode(nextSibling)) {\n replaceWithSimpleText(nextSibling);\n } else {\n nextSibling.markDirty();\n }\n\n return;\n } else if (nextMatch.start !== 0) {\n return;\n }\n }\n } else {\n const nextMatch = getMatch(nextText);\n\n if (nextMatch !== null && nextMatch.start === 0) {\n return;\n }\n }\n\n if (match === null) {\n return;\n }\n\n if (match.start === 0 && lexical.$isTextNode(prevSibling) && prevSibling.isTextEntity()) {\n continue;\n }\n\n let nodeToReplace;\n\n if (match.start === 0) {\n [nodeToReplace, currentNode] = currentNode.splitText(match.end);\n } else {\n [, nodeToReplace, currentNode] = currentNode.splitText(match.start, match.end);\n }\n\n const replacementNode = createNode(nodeToReplace);\n replacementNode.setFormat(nodeToReplace.getFormat());\n nodeToReplace.replace(replacementNode);\n\n if (currentNode == null) {\n return;\n }\n }\n };\n\n const reverseNodeTransform = node => {\n const text = node.getTextContent();\n const match = getMatch(text);\n\n if (match === null || match.start !== 0) {\n replaceWithSimpleText(node);\n return;\n }\n\n if (text.length > match.end) {\n // This will split out the rest of the text as simple text\n node.splitText(match.end);\n return;\n }\n\n const prevSibling = node.getPreviousSibling();\n\n if (lexical.$isTextNode(prevSibling) && prevSibling.isTextEntity()) {\n replaceWithSimpleText(prevSibling);\n replaceWithSimpleText(node);\n }\n\n const nextSibling = node.getNextSibling();\n\n if (lexical.$isTextNode(nextSibling) && nextSibling.isTextEntity()) {\n replaceWithSimpleText(nextSibling); // This may have already been converted in the previous block\n\n if (isTargetNode(node)) {\n replaceWithSimpleText(node);\n }\n }\n };\n\n const removePlainTextTransform = editor.registerNodeTransform(lexical.TextNode, textNodeTransform);\n const removeReverseNodeTransform = editor.registerNodeTransform(targetNode, reverseNodeTransform);\n return [removePlainTextTransform, removeReverseNodeTransform];\n}\n\nexports.$canShowPlaceholder = $canShowPlaceholder;\nexports.$canShowPlaceholderCurry = $canShowPlaceholderCurry;\nexports.$findTextIntersectionFromCharacters = $findTextIntersectionFromCharacters;\nexports.$isRootTextContentEmpty = $isRootTextContentEmpty;\nexports.$isRootTextContentEmptyCurry = $isRootTextContentEmptyCurry;\nexports.$rootTextContent = $rootTextContent;\nexports.registerLexicalTextEntity = registerLexicalTextEntity;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalText = process.env.NODE_ENV === 'development' ? require('./LexicalText.dev.js') : require('./LexicalText.prod.js')\nmodule.exports = LexicalText;","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar selection = require('@lexical/selection');\nvar lexical = require('lexical');\n\n/** @module @lexical/utils */\n\n/**\n * Takes an HTML element and adds the classNames passed within an array,\n * ignoring any non-string types. A space can be used to add multiple classes\n * eg. addClassNamesToElement(element, ['element-inner active', true, null])\n * will add both 'element-inner' and 'active' as classes to that element.\n * @param element - The element in which the classes are added\n * @param classNames - An array defining the class names to add to the element\n */\nfunction addClassNamesToElement(element, ...classNames) {\n classNames.forEach(className => {\n if (typeof className === 'string') {\n const classesToAdd = className.split(' ').filter(n => n !== '');\n element.classList.add(...classesToAdd);\n }\n });\n}\n/**\n * Takes an HTML element and removes the classNames passed within an array,\n * ignoring any non-string types. A space can be used to remove multiple classes\n * eg. removeClassNamesFromElement(element, ['active small', true, null])\n * will remove both the 'active' and 'small' classes from that element.\n * @param element - The element in which the classes are removed\n * @param classNames - An array defining the class names to remove from the element\n */\n\nfunction removeClassNamesFromElement(element, ...classNames) {\n classNames.forEach(className => {\n if (typeof className === 'string') {\n element.classList.remove(...className.split(' '));\n }\n });\n}\n/**\n * Returns true if the file type matches the types passed within the acceptableMimeTypes array, false otherwise.\n * The types passed must be strings and are CASE-SENSITIVE.\n * eg. if file is of type 'text' and acceptableMimeTypes = ['TEXT', 'IMAGE'] the function will return false.\n * @param file - The file you want to type check.\n * @param acceptableMimeTypes - An array of strings of types which the file is checked against.\n * @returns true if the file is an acceptable mime type, false otherwise.\n */\n\nfunction isMimeType(file, acceptableMimeTypes) {\n for (const acceptableType of acceptableMimeTypes) {\n if (file.type.startsWith(acceptableType)) {\n return true;\n }\n }\n\n return false;\n}\n/**\n * Lexical File Reader with:\n * 1. MIME type support\n * 2. batched results (HistoryPlugin compatibility)\n * 3. Order aware (respects the order when multiple Files are passed)\n *\n * const filesResult = await mediaFileReader(files, ['image/']);\n * filesResult.forEach(file => editor.dispatchCommand('INSERT_IMAGE', {\n * src: file.result,\n * }));\n */\n\nfunction mediaFileReader(files, acceptableMimeTypes) {\n const filesIterator = files[Symbol.iterator]();\n return new Promise((resolve, reject) => {\n const processed = [];\n\n const handleNextFile = () => {\n const {\n done,\n value: file\n } = filesIterator.next();\n\n if (done) {\n return resolve(processed);\n }\n\n const fileReader = new FileReader();\n fileReader.addEventListener('error', reject);\n fileReader.addEventListener('load', () => {\n const result = fileReader.result;\n\n if (typeof result === 'string') {\n processed.push({\n file,\n result\n });\n }\n\n handleNextFile();\n });\n\n if (isMimeType(file, acceptableMimeTypes)) {\n fileReader.readAsDataURL(file);\n } else {\n handleNextFile();\n }\n };\n\n handleNextFile();\n });\n}\n/**\n * \"Depth-First Search\" starts at the root/top node of a tree and goes as far as it can down a branch end\n * before backtracking and finding a new path. Consider solving a maze by hugging either wall, moving down a\n * branch until you hit a dead-end (leaf) and backtracking to find the nearest branching path and repeat.\n * It will then return all the nodes found in the search in an array of objects.\n * @param startingNode - The node to start the search, if ommitted, it will start at the root node.\n * @param endingNode - The node to end the search, if ommitted, it will find all descendants of the startingNode.\n * @returns An array of objects of all the nodes found by the search, including their depth into the tree.\n * {depth: number, node: LexicalNode} It will always return at least 1 node (the ending node) so long as it exists\n */\n\nfunction $dfs(startingNode, endingNode) {\n const nodes = [];\n const start = (startingNode || lexical.$getRoot()).getLatest();\n const end = endingNode || (lexical.$isElementNode(start) ? start.getLastDescendant() : start);\n let node = start;\n let depth = $getDepth(node);\n\n while (node !== null && !node.is(end)) {\n nodes.push({\n depth,\n node\n });\n\n if (lexical.$isElementNode(node) && node.getChildrenSize() > 0) {\n node = node.getFirstChild();\n depth++;\n } else {\n // Find immediate sibling or nearest parent sibling\n let sibling = null;\n\n while (sibling === null && node !== null) {\n sibling = node.getNextSibling();\n\n if (sibling === null) {\n node = node.getParent();\n depth--;\n } else {\n node = sibling;\n }\n }\n }\n }\n\n if (node !== null && node.is(end)) {\n nodes.push({\n depth,\n node\n });\n }\n\n return nodes;\n}\n\nfunction $getDepth(node) {\n let innerNode = node;\n let depth = 0;\n\n while ((innerNode = innerNode.getParent()) !== null) {\n depth++;\n }\n\n return depth;\n}\n/**\n * Takes a node and traverses up its ancestors (toward the root node)\n * in order to find a specific type of node.\n * @param node - the node to begin searching.\n * @param klass - an instance of the type of node to look for.\n * @returns the node of type klass that was passed, or null if none exist.\n */\n\n\nfunction $getNearestNodeOfType(node, klass) {\n let parent = node;\n\n while (parent != null) {\n if (parent instanceof klass) {\n return parent;\n }\n\n parent = parent.getParent();\n }\n\n return null;\n}\n/**\n * Returns the element node of the nearest ancestor, otherwise throws an error.\n * @param startNode - The starting node of the search\n * @returns The ancestor node found\n */\n\nfunction $getNearestBlockElementAncestorOrThrow(startNode) {\n const blockNode = $findMatchingParent(startNode, node => lexical.$isElementNode(node) && !node.isInline());\n\n if (!lexical.$isElementNode(blockNode)) {\n {\n throw Error(`Expected node ${startNode.__key} to have closest block element node.`);\n }\n }\n\n return blockNode;\n}\n\n/**\n * Starts with a node and moves up the tree (toward the root node) to find a matching node based on\n * the search parameters of the findFn. (Consider JavaScripts' .find() function where a testing function must be\n * passed as an argument. eg. if( (node) => node.__type === 'div') ) return true; otherwise return false\n * @param startingNode - The node where the search starts.\n * @param findFn - A testing function that returns true if the current node satisfies the testing parameters.\n * @returns A parent node that matches the findFn parameters, or null if one wasn't found.\n */\nfunction $findMatchingParent(startingNode, findFn) {\n let curr = startingNode;\n\n while (curr !== lexical.$getRoot() && curr != null) {\n if (findFn(curr)) {\n return curr;\n }\n\n curr = curr.getParent();\n }\n\n return null;\n}\n\n/**\n * Returns a function that will execute all functions passed when called. It is generally used\n * to register multiple lexical listeners and then tear them down with a single function call, such\n * as React's useEffect hook.\n * @example\n * ```ts\n * useEffect(() => {\n * return mergeRegister(\n * editor.registerCommand(...registerCommand1 logic),\n * editor.registerCommand(...registerCommand2 logic),\n * editor.registerCommand(...registerCommand3 logic)\n * )\n * }, [editor])\n * ```\n * In this case, useEffect is returning the function returned by mergeRegister as a cleanup\n * function to be executed after either the useEffect runs again (due to one of its dependencies\n * updating) or the compenent it resides in unmounts.\n * Note the functions don't neccesarily need to be in an array as all arguements\n * are considered to be the func argument and spread from there.\n * @param func - An array of functions meant to be executed by the returned function.\n * @returns the function which executes all the passed register command functions.\n */\nfunction mergeRegister(...func) {\n return () => {\n func.forEach(f => f());\n };\n}\n/**\n * Attempts to resolve nested element nodes of the same type into a single node of that type.\n * It is generally used for marks/commenting\n * @param editor - The lexical editor\n * @param targetNode - The target for the nested element to be extracted from.\n * @param cloneNode - See {@link $createMarkNode}\n * @param handleOverlap - Handles any overlap between the node to extract and the targetNode\n * @returns The lexical editor\n */\n\nfunction registerNestedElementResolver(editor, targetNode, cloneNode, handleOverlap) {\n const $isTargetNode = node => {\n return node instanceof targetNode;\n };\n\n const $findMatch = node => {\n // First validate we don't have any children that are of the target,\n // as we need to handle them first.\n const children = node.getChildren();\n\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n\n if ($isTargetNode(child)) {\n return null;\n }\n }\n\n let parentNode = node;\n let childNode = node;\n\n while (parentNode !== null) {\n childNode = parentNode;\n parentNode = parentNode.getParent();\n\n if ($isTargetNode(parentNode)) {\n return {\n child: childNode,\n parent: parentNode\n };\n }\n }\n\n return null;\n };\n\n const elementNodeTransform = node => {\n const match = $findMatch(node);\n\n if (match !== null) {\n const {\n child,\n parent\n } = match; // Simple path, we can move child out and siblings into a new parent.\n\n if (child.is(node)) {\n handleOverlap(parent, node);\n const nextSiblings = child.getNextSiblings();\n const nextSiblingsLength = nextSiblings.length;\n parent.insertAfter(child);\n\n if (nextSiblingsLength !== 0) {\n const newParent = cloneNode(parent);\n child.insertAfter(newParent);\n\n for (let i = 0; i < nextSiblingsLength; i++) {\n newParent.append(nextSiblings[i]);\n }\n }\n\n if (!parent.canBeEmpty() && parent.getChildrenSize() === 0) {\n parent.remove();\n }\n }\n }\n };\n\n return editor.registerNodeTransform(targetNode, elementNodeTransform);\n}\n/**\n * Clones the editor and marks it as dirty to be reconciled. If there was a selection,\n * it would be set back to its previous state, or null otherwise.\n * @param editor - The lexical editor\n * @param editorState - The editor's state\n */\n\nfunction $restoreEditorState(editor, editorState) {\n const FULL_RECONCILE = 2;\n const nodeMap = new Map();\n const activeEditorState = editor._pendingEditorState;\n\n for (const [key, node] of editorState._nodeMap) {\n const clone = selection.$cloneWithProperties(node);\n\n if (lexical.$isTextNode(clone)) {\n clone.__text = node.__text;\n }\n\n nodeMap.set(key, clone);\n }\n\n if (activeEditorState) {\n activeEditorState._nodeMap = nodeMap;\n }\n\n editor._dirtyType = FULL_RECONCILE;\n const selection$1 = editorState._selection;\n lexical.$setSelection(selection$1 === null ? null : selection$1.clone());\n}\n/**\n * If the selected insertion area is the root/shadow root node (see {@link lexical!$isRootOrShadowRoot}),\n * the node will be appended there, otherwise, it will be inserted before the insertion area.\n * If there is no selection where the node is to be inserted, it will be appended after any current nodes\n * within the tree, as a child of the root node. A paragraph node will then be added after the inserted node and selected.\n * @param node - The node to be inserted\n * @returns The node after its insertion\n */\n\nfunction $insertNodeToNearestRoot(node) {\n const selection = lexical.$getSelection() || lexical.$getPreviousSelection();\n\n if (lexical.$isRangeSelection(selection)) {\n const {\n focus\n } = selection;\n const focusNode = focus.getNode();\n const focusOffset = focus.offset;\n\n if (lexical.$isRootOrShadowRoot(focusNode)) {\n const focusChild = focusNode.getChildAtIndex(focusOffset);\n\n if (focusChild == null) {\n focusNode.append(node);\n } else {\n focusChild.insertBefore(node);\n }\n\n node.selectNext();\n } else {\n let splitNode;\n let splitOffset;\n\n if (lexical.$isTextNode(focusNode)) {\n splitNode = focusNode.getParentOrThrow();\n splitOffset = focusNode.getIndexWithinParent();\n\n if (focusOffset > 0) {\n splitOffset += 1;\n focusNode.splitText(focusOffset);\n }\n } else {\n splitNode = focusNode;\n splitOffset = focusOffset;\n }\n\n const [, rightTree] = lexical.$splitNode(splitNode, splitOffset);\n rightTree.insertBefore(node);\n rightTree.selectStart();\n }\n } else {\n if (lexical.$isNodeSelection(selection) || lexical.DEPRECATED_$isGridSelection(selection)) {\n const nodes = selection.getNodes();\n nodes[nodes.length - 1].getTopLevelElementOrThrow().insertAfter(node);\n } else {\n const root = lexical.$getRoot();\n root.append(node);\n }\n\n const paragraphNode = lexical.$createParagraphNode();\n node.insertAfter(paragraphNode);\n paragraphNode.select();\n }\n\n return node.getLatest();\n}\n/**\n * Wraps the node into another node created from a createElementNode function, eg. $createParagraphNode\n * @param node - Node to be wrapped.\n * @param createElementNode - Creates a new lexcial element to wrap the to-be-wrapped node and returns it.\n * @returns A new lexcial element with the previous node appended within (as a child, including its children).\n */\n\nfunction $wrapNodeInElement(node, createElementNode) {\n const elementNode = createElementNode();\n node.replace(elementNode);\n elementNode.append(node);\n return elementNode;\n} // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n/**\n * @param object = The instance of the type\n * @param objectClass = The class of the type\n * @returns Whether the object is has the same Klass of the objectClass, ignoring the difference across window (e.g. different iframs)\n */\nfunction objectKlassEquals(object, objectClass) {\n return object !== null ? Object.getPrototypeOf(object).constructor.name === objectClass.name : false;\n}\n/**\n * Filter the nodes\n * @param nodes Array of nodes that needs to be filtered\n * @param filterFn A filter function that returns node if the current node satisfies the condition otherwise null\n * @returns Array of filtered nodes\n */\n\nfunction $filter(nodes, filterFn) {\n const result = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = filterFn(nodes[i]);\n\n if (node !== null) {\n result.push(node);\n }\n }\n\n return result;\n}\n/**\n * Appends the node before the first child of the parent node\n * @param parent A parent node\n * @param node Node that needs to be appended\n */\n\nfunction $insertFirst(parent, node) {\n const firstChild = parent.getFirstChild();\n\n if (firstChild !== null) {\n firstChild.insertBefore(node);\n } else {\n parent.append(node);\n }\n}\n\nexports.$splitNode = lexical.$splitNode;\nexports.isHTMLAnchorElement = lexical.isHTMLAnchorElement;\nexports.isHTMLElement = lexical.isHTMLElement;\nexports.$dfs = $dfs;\nexports.$filter = $filter;\nexports.$findMatchingParent = $findMatchingParent;\nexports.$getNearestBlockElementAncestorOrThrow = $getNearestBlockElementAncestorOrThrow;\nexports.$getNearestNodeOfType = $getNearestNodeOfType;\nexports.$insertFirst = $insertFirst;\nexports.$insertNodeToNearestRoot = $insertNodeToNearestRoot;\nexports.$restoreEditorState = $restoreEditorState;\nexports.$wrapNodeInElement = $wrapNodeInElement;\nexports.addClassNamesToElement = addClassNamesToElement;\nexports.isMimeType = isMimeType;\nexports.mediaFileReader = mediaFileReader;\nexports.mergeRegister = mergeRegister;\nexports.objectKlassEquals = objectKlassEquals;\nexports.registerNestedElementResolver = registerNestedElementResolver;\nexports.removeClassNamesFromElement = removeClassNamesFromElement;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict'\nconst LexicalUtils = process.env.NODE_ENV === 'development' ? require('./LexicalUtils.dev.js') : require('./LexicalUtils.prod.js')\nmodule.exports = LexicalUtils;","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { AppShellHeader } from \"./components\";\n\nimport { AppShellProps, AppShellComponents } from \"./appShell.types\";\n\nconst AppShell: React.FC<AppShellProps> & AppShellComponents = ({\n className: _className,\n style: _style,\n children,\n menu,\n menuProperties = {\n display: {\n xs: \"none\",\n md: \"block\",\n },\n },\n ...rest\n}: AppShellProps) => (\n <Box {...rest} display=\"flex\">\n {menu && (\n <Box\n {...menuProperties}\n width=\"18rem\"\n height=\"100vh\"\n position=\"sticky\"\n top=\"0\"\n left=\"0\"\n borderStyle=\"solid\"\n borderWidth=\"none\"\n borderRightWidth=\"1\"\n borderColor=\"neutral-surfaceHighlight\"\n >\n {menu}\n </Box>\n )}\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n flex=\"1 1 auto\"\n backgroundColor=\"neutral-surface\"\n width=\"100%\"\n >\n {children}\n </Box>\n </Box>\n);\n\nAppShell.Header = AppShellHeader;\n\nAppShell.displayName = \"AppShell\";\nAppShell.Header.displayName = \"AppShell.Header\";\n\nexport { AppShell };\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { AppShellHeaderProps } from \"./appShellHeader.types\";\n\nconst AppShellHeader: React.FC<AppShellHeaderProps> = ({\n className: _className,\n style: _style,\n leftSlot,\n rightSlot,\n ...rest\n}: AppShellHeaderProps) => (\n <Box\n {...rest}\n paddingX=\"2\"\n paddingY=\"4\"\n display=\"flex\"\n justifyContent={leftSlot ? \"space-between\" : \"flex-end\"}\n gap=\"2\"\n >\n {leftSlot}\n {rightSlot && (\n <Box display=\"flex\" gap=\"1\">\n {rightSlot}\n </Box>\n )}\n </Box>\n);\n\nexport { AppShellHeader };\n","import { AppShellHeader } from \"./AppShellHeader\";\n\nexport { AppShellHeader } from \"./AppShellHeader\";\nexport default AppShellHeader;\n","export * from \"./AppShellHeader\";\n","import { AppShell } from \"./AppShell\";\n\nexport { AppShell } from \"./AppShell\";\nexport type { AppShellProps } from \"./appShell.types\";\nexport default AppShell;\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\nimport { ChevronLeftIcon, ChevronRightIcon } from \"@nimbus-ds/icons\";\nimport { calendar } from \"@nimbus-ds/styles\";\nimport { DayPicker } from \"react-day-picker\";\nimport { CalendarProps } from \"./calendar.types\";\nimport { CustomCaptionLabel, CustomDay, Weekdays, Wrapper } from \"./components\";\n\nconst Calendar: React.FC<CalendarProps> = ({\n className: _className,\n style: _style,\n hideBorder = false,\n containerProps,\n stickyWeekdays = false,\n fullWidthDays = false,\n ...rest\n}: CalendarProps) => (\n <Wrapper initialProps={{ ...rest }}>\n <Box\n borderWidth={hideBorder ? \"none\" : \"1\"}\n borderStyle=\"solid\"\n borderColor=\"neutral-surfaceHighlight\"\n borderRadius=\"2\"\n data-style=\"nimbus-calendar\"\n overflowY=\"auto\"\n position=\"relative\"\n {...containerProps}\n >\n {rest.numberOfMonths && rest.numberOfMonths > 1 && stickyWeekdays && (\n <Weekdays />\n )}\n <DayPicker\n {...rest}\n classNames={{\n table: calendar.classnames.table,\n row: calendar.classnames.row,\n cell: calendar.classnames.cell,\n caption: calendar.classnames.caption,\n caption_start: calendar.classnames.caption_start,\n caption_end: calendar.classnames.caption_end,\n head: stickyWeekdays\n ? calendar.classnames.head_stickyWeekdays\n : calendar.classnames.head,\n head_row: calendar.classnames.row,\n head_cell: calendar.classnames.cell__head,\n tbody: calendar.classnames.body,\n nav: calendar.classnames.nav,\n nav_button_previous: calendar.classnames.nav__button,\n nav_button_next: calendar.classnames.nav__button,\n day: fullWidthDays\n ? calendar.classnames.day_fullWidth\n : calendar.classnames.day,\n day_selected: calendar.classnames.day_selected,\n day_today: calendar.classnames.day_today,\n day_outside: calendar.classnames.day_outside,\n day_disabled: calendar.classnames.day_disabled,\n day_range_middle: calendar.classnames.day__middle,\n day_range_start: calendar.classnames.day__start,\n day_range_end: calendar.classnames.day__end,\n months: calendar.classnames.months,\n }}\n components={{\n CaptionLabel: CustomCaptionLabel,\n IconLeft: ChevronLeftIcon,\n IconRight: ChevronRightIcon,\n Day: CustomDay,\n }}\n />\n </Box>\n </Wrapper>\n);\n\nCalendar.displayName = \"Calendar\";\n\nexport { Calendar };\n","import React from \"react\";\nimport { CaptionLabelProps, useDayPicker } from \"react-day-picker\";\n\nimport { Text } from \"@nimbus-ds/components\";\n\nconst CustomCaptionLabel: React.FC<CaptionLabelProps> = ({\n ...rest\n}: CaptionLabelProps) => {\n const {\n locale,\n formatters: { formatCaption }\n } = useDayPicker();\n return (\n <Text fontSize=\"highlight\" fontWeight=\"medium\" {...rest}>\n {formatCaption(rest.displayMonth, { locale })}\n </Text>\n );\n};\n\nexport { CustomCaptionLabel };\n","import { CustomCaptionLabel } from \"./CustomCaptionLabel\";\n\nexport { CustomCaptionLabel } from \"./CustomCaptionLabel\";\nexport default CustomCaptionLabel;\n","import React from \"react\";\n\nimport { Day } from \"react-day-picker\";\nimport { format } from \"date-fns\";\nimport { CustomDayProps } from \"./customDay.types\";\n\nconst CustomDay: React.FC<CustomDayProps> = ({ ...props }: CustomDayProps) => (\n <div id={format(props.date, \"yyyy-MM-dd\")} style={{ width: \"100%\" }}>\n <Day {...props} />\n </div>\n);\n\nexport { CustomDay };\n","import { CustomDay } from \"./CustomDay\";\n\nexport { CustomDay } from \"./CustomDay\";\nexport default CustomDay;\n","import React from \"react\";\nimport { useDayPicker } from \"react-day-picker\";\nimport { Box, Text } from \"@nimbus-ds/components\";\nimport { getWeekdays } from \"../../utils\";\n\nconst Weekdays: React.FC = () => {\n const {\n locale,\n weekStartsOn,\n ISOWeek,\n formatters: { formatWeekdayName },\n labels: { labelWeekday },\n } = useDayPicker();\n\n const weekdays = getWeekdays(locale, weekStartsOn, ISOWeek);\n\n return (\n <Box\n display=\"flex\"\n width=\"100%\"\n backgroundColor=\"neutral-surface\"\n position=\"sticky\"\n top=\"0\"\n py=\"2\"\n px=\"4\"\n zIndex=\"100\"\n >\n {weekdays.map((weekday) => (\n <Box\n key={labelWeekday(weekday, { locale })}\n display=\"flex\"\n flex=\"1\"\n alignItems=\"center\"\n justifyContent=\"center\"\n aria-label={labelWeekday(weekday, { locale })}\n >\n <Text textAlign=\"center\" fontSize=\"caption\" fontWeight=\"medium\">\n {formatWeekdayName(weekday, { locale })}\n </Text>\n </Box>\n ))}\n </Box>\n );\n};\n\nexport { Weekdays };\n","import { Weekdays } from \"./Weekdays\";\n\nexport { Weekdays } from \"./Weekdays\";\nexport default Weekdays;\n","import React from \"react\";\n\nimport { DayPickerProvider } from \"react-day-picker\";\nimport { WrapperProps } from \"./wrapper.types\";\n\nconst Wrapper: React.FC<WrapperProps> = ({\n children,\n ...rest\n}: WrapperProps) => <DayPickerProvider {...rest}>{children}</DayPickerProvider>;\n\nexport { Wrapper };\n","import { Wrapper } from \"./Wrapper\";\n\nexport { Wrapper } from \"./Wrapper\";\nexport default Wrapper;\n","export * from \"./CustomCaptionLabel\";\nexport * from \"./CustomDay\";\nexport * from \"./Wrapper\";\nexport * from \"./Weekdays\";\n","import { Calendar } from \"./Calendar\";\n\nexport { Calendar } from \"./Calendar\";\nexport type { CalendarProps } from \"./calendar.types\";\nexport default Calendar;\n","import { addDays, Locale, startOfISOWeek, startOfWeek } from \"date-fns\";\n\n/**\n * Generate a series of 7 days, starting from the week, to use for formatting\n * the weekday names (Monday, Tuesday, etc.).\n */\nexport function getWeekdays(\n locale?: Locale,\n /** The index of the first day of the week (0 - Sunday). */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,\n /** Use ISOWeek instead of locale/ */\n ISOWeek?: boolean,\n): Date[] {\n const start = ISOWeek\n ? startOfISOWeek(new Date())\n : startOfWeek(new Date(), { locale, weekStartsOn });\n\n const days = [];\n // eslint-disable-next-line no-plusplus\n for (let i = 0; i < 7; i++) {\n const day = addDays(start, i);\n days.push(day);\n }\n return days;\n}\n","export * from \"./getWeekdays\";\n","import React from \"react\";\nimport { ChevronRightIcon } from \"@nimbus-ds/icons\";\nimport { Box, Icon, Text } from \"@nimbus-ds/components\";\n\nimport {\n cardBackground,\n iconBackground,\n cardBorder,\n iconColor,\n textColor\n} from \"./calloutCard.definitions\";\nimport { CalloutCardProps } from \"./calloutCard.types\";\n\nconst CalloutCard: React.FC<CalloutCardProps> = ({\n appearance,\n title,\n subtitle,\n link,\n onClick,\n icon: Source,\n ...rest\n}) => (\n <Box\n {...rest}\n display=\"flex\"\n backgroundColor={cardBackground[appearance]}\n borderColor={cardBorder[appearance]}\n borderStyle=\"solid\"\n borderWidth=\"1\"\n borderRadius=\"2\"\n cursor={link ? \"auto\" : \"pointer\"}\n flex=\"0 1 auto\"\n gap=\"2\"\n p=\"2\"\n as={link ? \"div\" : \"button\"}\n onClick={onClick}\n width=\"100%\"\n >\n <Box\n backgroundColor={iconBackground[appearance]}\n height=\"36px\"\n width=\"36px\"\n minHeight=\"36px\"\n minWidth=\"36px\"\n borderRadius=\"2\"\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <Icon\n data-testid=\"callout-card-icon\"\n color={iconColor[appearance]}\n source={<Source size=\"medium\" />}\n />\n </Box>\n <Box display=\"flex\" flex=\"1 1 auto\" flexDirection=\"column\">\n <Text\n data-testid=\"callout-card-title\"\n color={textColor[appearance]}\n fontSize=\"caption\"\n fontWeight=\"bold\"\n >\n {title}\n </Text>\n <Text\n data-testid=\"callout-card-subtitle\"\n color={textColor[appearance]}\n fontSize=\"caption\"\n >\n {subtitle}\n </Text>\n {link && <Box mt=\"2\">{link}</Box>}\n </Box>\n {!link && (\n <Box alignSelf=\"center\">\n <Icon\n data-testid=\"callout-card-open-icon\"\n cursor=\"pointer\"\n color={iconColor[appearance]}\n source={<ChevronRightIcon size=\"small\" />}\n />\n </Box>\n )}\n </Box>\n);\n\nCalloutCard.displayName = \"CalloutCard\";\n\nexport { CalloutCard };\n","export const cardBackground = {\n primary: \"primary-surface\",\n success: \"success-surface\",\n warning: \"warning-surface\",\n danger: \"danger-surface\",\n neutral: \"neutral-surface\",\n} as {\n [key: string]:\n | \"primary-surface\"\n | \"success-surface\"\n | \"warning-surface\"\n | \"danger-surface\"\n | \"neutral-surface\";\n};\n\nexport const cardBorder = {\n primary: \"primary-interactive\",\n success: \"success-interactive\",\n warning: \"warning-interactive\",\n danger: \"danger-interactive\",\n neutral: \"neutral-interactive\",\n} as {\n [key: string]:\n | \"primary-interactive\"\n | \"success-interactive\"\n | \"warning-interactive\"\n | \"danger-interactive\"\n | \"neutral-interactive\";\n};\n\nexport const iconBackground = {\n primary: \"primary-surfaceHighlight\",\n success: \"success-surfaceHighlight\",\n warning: \"warning-surfaceHighlight\",\n danger: \"danger-surfaceHighlight\",\n neutral: \"neutral-surfaceHighlight\",\n} as {\n [key: string]:\n | \"primary-surfaceHighlight\"\n | \"success-surfaceHighlight\"\n | \"warning-surfaceHighlight\"\n | \"danger-surfaceHighlight\"\n | \"neutral-surfaceHighlight\";\n};\n\nexport const iconColor = {\n primary: \"primary-textLow\",\n success: \"success-textLow\",\n warning: \"warning-textLow\",\n danger: \"danger-textLow\",\n neutral: \"neutral-textLow\",\n} as {\n [key: string]:\n | \"primary-textLow\"\n | \"success-textLow\"\n | \"warning-textLow\"\n | \"danger-textLow\"\n | \"neutral-textLow\";\n};\n\nexport const textColor = iconColor;\n","import { CalloutCard } from \"./CalloutCard\";\n\nexport { CalloutCard } from \"./CalloutCard\";\nexport type { CalloutCardProps } from \"./calloutCard.types\";\nexport default CalloutCard;\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { DataListProps, DataListComponents } from \"./dataList.types\";\n\nimport { DataListRow } from \"./components\";\n\nconst DataList: React.FC<DataListProps> & DataListComponents = ({\n className: _className,\n style: _style,\n children,\n bottomDivider = true,\n ...rest\n}: DataListProps) => (\n <Box\n role=\"list\"\n borderStyle=\"solid\"\n borderWidth=\"none\"\n borderBottomWidth={bottomDivider ? \"1\" : \"none\"}\n borderColor=\"neutral-surfaceHighlight\"\n backgroundColor=\"neutral-background\"\n display=\"flex\"\n flexDirection=\"column\"\n width=\"100%\"\n {...rest}\n >\n {children}\n </Box>\n);\n\nDataList.Row = DataListRow;\nDataList.displayName = \"DataList\";\nDataListRow.displayName = \"DataList.Row\";\nDataList.Row.displayName = \"DataList.Row\";\n\nexport { DataList };\n","import React from \"react\";\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { DataListRowProps } from \"./dataListRow.types\";\nimport { rowPadding } from \"./dataListRow.definitions\";\n\nconst DataListRow: React.FC<DataListRowProps> = ({\n className: _className,\n style: _style,\n children,\n padding = \"base\",\n topDivider = true,\n ...rest\n}: DataListRowProps) => (\n <Box\n role=\"listitem\"\n borderStyle=\"solid\"\n borderWidth=\"none\"\n borderTopWidth={topDivider ? \"1\" : \"none\"}\n borderColor=\"neutral-surfaceHighlight\"\n display=\"flex\"\n flexDirection=\"column\"\n padding={rowPadding[padding]}\n {...rest}\n >\n {children}\n </Box>\n);\n\nexport { DataListRow };\n","export const rowPadding = {\n base: \"4\",\n small: \"2\",\n none: \"none\",\n} as { [key: string]: \"4\" | \"2\" | \"none\" };\n","import { DataListRow } from \"./DataListRow\";\n\nexport { DataListRow } from \"./DataListRow\";\nexport default DataListRow;\n","export * from \"./DataListRow\";\n","import { DataList } from \"./DataList\";\n\nexport { DataList } from \"./DataList\";\nexport type { DataListProps } from \"./dataList.types\";\nexport default DataList;\n","import React from \"react\";\n\nimport { Box, Table } from \"@nimbus-ds/components\";\n\nimport {\n DataTableBulkActions,\n DataTableFooter,\n DataTableHeader,\n DataTableRow,\n DataTableCell,\n} from \"./components\";\n\nimport { DataTableProps, DataTableComponents } from \"./dataTable.types\";\n\nconst DataTable: React.FC<DataTableProps> & DataTableComponents = ({\n className: _className,\n style: _style,\n bulkActions,\n header,\n footer,\n children,\n ...rest\n}: DataTableProps) => (\n <Box>\n <Box\n position=\"relative\"\n borderRadius=\"2\"\n borderColor=\"neutral-surfaceHighlight\"\n borderStyle=\"solid\"\n borderWidth=\"1\"\n // overflow=\"hidden\"\n >\n {bulkActions}\n <Table {...rest}>\n {header}\n <Table.Body>{children}</Table.Body>\n </Table>\n </Box>\n {footer}\n </Box>\n);\n\nexport { DataTable };\n\nDataTable.displayName = \"DataTable\";\n\nDataTable.BulkActions = DataTableBulkActions;\nDataTable.Header = DataTableHeader;\nDataTable.Footer = DataTableFooter;\nDataTable.Row = DataTableRow;\nDataTable.Cell = DataTableCell;\n\nDataTable.BulkActions.displayName = \"DataTable.BulkActions\";\nDataTable.Header.displayName = \"DataTable.Header\";\nDataTable.Footer.displayName = \"DataTable.Footer\";\nDataTable.Row.displayName = \"DataTable.Row\";\nDataTable.Cell.displayName = \"DataTable.Cell\";\n","import React from \"react\";\n\nimport { Box, Checkbox, Label, Text } from \"@nimbus-ds/components\";\n\nimport { DataTableBulkActionsProps } from \"./dataTableBulkActions.types\";\n\nconst DataTableBulkActions: React.FC<DataTableBulkActionsProps> = ({\n className: _className,\n style: _style,\n checkbox,\n link,\n action,\n label,\n ...rest\n}: DataTableBulkActionsProps) => (\n <Box\n {...rest}\n position=\"sticky\"\n top=\"0\"\n left=\"0\"\n width=\"100%\"\n backgroundColor=\"neutral-surface\"\n display=\"flex\"\n alignItems=\"center\"\n gap=\"4\"\n p=\"2\"\n boxSizing=\"border-box\"\n borderRadius=\"2\"\n zIndex=\"100\"\n >\n <Checkbox {...checkbox} id=\"select-all\" />\n <Label htmlFor=\"select-all\">\n <Text color=\"neutral-textLow\" fontSize=\"base\">\n {label}\n </Text>\n </Label>\n {link}\n {action}\n </Box>\n);\n\nexport { DataTableBulkActions };\n","import { DataTableBulkActions } from \"./DataTableBulkActions\";\n\nexport { DataTableBulkActions } from \"./DataTableBulkActions\";\nexport default DataTableBulkActions;\n","import React from \"react\";\n\nimport { Table } from \"@nimbus-ds/components\";\n\nimport { DataTableCellProps } from \"./dataTableCell.types\";\n\nconst DataTableCell: React.FC<DataTableCellProps> = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: DataTableCellProps) => <Table.Cell {...rest}>{children}</Table.Cell>;\n\nexport { DataTableCell };\n","import { DataTableCell } from \"./DataTableCell\";\n\nexport { DataTableCell } from \"./DataTableCell\";\nexport default DataTableCell;\n","import React from \"react\";\n\nimport { Text, Pagination, Box } from \"@nimbus-ds/components\";\n\nimport { DataTableFooterProps } from \"./dataTableFooter.types\";\n\nconst DataTableFooter: React.FC<DataTableFooterProps> = ({\n className: _className,\n style: _style,\n itemCount,\n pagination,\n ...rest\n}: DataTableFooterProps) => (\n <Box\n {...rest}\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n p=\"2\"\n >\n <Text fontSize=\"caption\" color=\"neutral-textLow\">\n {itemCount}\n </Text>\n {pagination && <Pagination {...pagination} />}\n </Box>\n);\n\nexport { DataTableFooter };\n","import { DataTableFooter } from \"./DataTableFooter\";\n\nexport { DataTableFooter } from \"./DataTableFooter\";\nexport default DataTableFooter;\n","import React from \"react\";\n\nimport { Table, Checkbox } from \"@nimbus-ds/components\";\n\nimport { DataTableHeaderProps } from \"./dataTableHeader.types\";\n\nconst DataTableHeader: React.FC<DataTableHeaderProps> = ({\n className: _className,\n style: _style,\n checkbox,\n children,\n ...rest\n}: DataTableHeaderProps) => (\n <Table.Head {...rest}>\n <Table.Row backgroundColor=\"neutral-surface\">\n <Table.Cell as=\"th\" width=\"1rem\">\n <Checkbox {...checkbox} />\n </Table.Cell>\n {children}\n </Table.Row>\n </Table.Head>\n);\n\nexport { DataTableHeader };\n","import { DataTableHeader } from \"./DataTableHeader\";\n\nexport { DataTableHeader } from \"./DataTableHeader\";\nexport default DataTableHeader;\n","import React from \"react\";\n\nimport { Table, Checkbox } from \"@nimbus-ds/components\";\n\nimport { DataTableRowProps } from \"./dataTableRow.types\";\n\nconst DataTableRow: React.FC<DataTableRowProps> = ({\n className: _className,\n style: _style,\n checkbox,\n children,\n ...rest\n}: DataTableRowProps) => (\n <Table.Row {...rest}>\n <Table.Cell width=\"1rem\">\n <Checkbox {...checkbox} />\n </Table.Cell>\n {children}\n </Table.Row>\n);\n\nexport { DataTableRow };\n","import { DataTableRow } from \"./DataTableRow\";\n\nexport { DataTableRow } from \"./DataTableRow\";\nexport default DataTableRow;\n","export * from \"./DataTableBulkActions\";\nexport * from \"./DataTableFooter\";\nexport * from \"./DataTableHeader\";\nexport * from \"./DataTableRow\";\nexport * from \"./DataTableCell\";\n","import { DataTable } from \"./DataTable\";\n\nexport { DataTable } from \"./DataTable\";\nexport type { DataTableProps } from \"./dataTable.types\";\nexport default DataTable;\n","import React from \"react\";\nimport { Box, Icon, Text } from \"@nimbus-ds/components\";\nimport { editor as editorStyles } from \"@nimbus-ds/styles\";\nimport { EditorState, LexicalEditor } from \"lexical\";\nimport {\n InitialConfigType,\n LexicalComposer,\n} from \"@lexical/react/LexicalComposer\";\nimport { OnChangePlugin } from \"@lexical/react/LexicalOnChangePlugin\";\nimport { RichTextPlugin } from \"@lexical/react/LexicalRichTextPlugin\";\nimport { ContentEditable } from \"@lexical/react/LexicalContentEditable\";\nimport LexicalErrorBoundary from \"@lexical/react/LexicalErrorBoundary\";\n\nimport { Placeholder, Toolbar } from \"./components\";\nimport { EditorProps } from \"./editor.types\";\nimport {\n defaultTheme,\n defaultModules,\n aliasModules,\n editorAppearance,\n helpTextAppearance,\n nodes,\n} from \"./editor.definitions\";\nimport {\n CustomHeadingPlugin,\n CustomParagraphPlugin,\n CustomClearFormattingPlugin,\n CustomYouTubePlugin,\n CustomAutoEmbedPlugin,\n CustomFloatingLinkEditor,\n DefaultPlugins,\n} from \"./plugins\";\n\nimport { useEditor } from \"./hooks\";\n\nconst Editor: React.FC<EditorProps> = ({\n style: _style,\n className: _className,\n theme,\n modules,\n placeholder,\n value,\n parser = \"json\",\n helpText,\n helpIcon: IconSrc,\n appearance = \"none\",\n onChange,\n ...rest\n}) => {\n const { setContent, onChangeEditor, onError } = useEditor({\n parser,\n onChange,\n });\n\n const initialConfig: InitialConfigType = {\n namespace: \"@nimbus-ds/editor\",\n theme: theme ?? defaultTheme,\n editorState: (editor: LexicalEditor) => setContent(editor, value),\n nodes,\n onError,\n };\n\n return (\n <div\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n className={\n editorStyles.classnames.container[editorAppearance[appearance]]\n }\n {...rest}\n >\n <Box\n as={LexicalComposer}\n initialConfig={initialConfig}\n position=\"relative\"\n backgroundColor=\"danger-interactive\"\n >\n <Toolbar className={editorStyles.classnames.toolbar}>\n {modules ??\n defaultModules.map((defaultModule) => {\n const Module = aliasModules[defaultModule] ?? null;\n return <Module key={defaultModule} />;\n })}\n </Toolbar>\n <Box position=\"relative\">\n <RichTextPlugin\n contentEditable={\n <ContentEditable className={editorStyles.classnames.content} />\n }\n placeholder={<Placeholder text={placeholder} />}\n ErrorBoundary={LexicalErrorBoundary}\n />\n </Box>\n {helpText && (\n <Box mt=\"2\">\n <Box display=\"inline-flex\" gap=\"1\">\n {IconSrc && (\n <Icon\n color={helpTextAppearance[appearance]}\n source={<IconSrc size={12} />}\n />\n )}\n <Text color={helpTextAppearance[appearance]} fontSize=\"caption\">\n {helpText}\n </Text>\n </Box>\n </Box>\n )}\n <DefaultPlugins />\n <CustomAutoEmbedPlugin />\n <CustomHeadingPlugin />\n <CustomParagraphPlugin />\n <CustomFloatingLinkEditor />\n <CustomClearFormattingPlugin />\n <CustomYouTubePlugin />\n <OnChangePlugin\n onChange={(editorState: EditorState, editor: LexicalEditor) => {\n onChangeEditor(editorState, editor);\n }}\n />\n </Box>\n </div>\n );\n};\n\nEditor.displayName = \"Editor\";\n\nexport { Editor };\n","import React from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { BoldIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { FORMAT_TEXT_COMMAND } from \"lexical\";\n\nimport { Button } from \"../../components\";\nimport { useEditorState } from \"../../hooks\";\n\nconst Bold: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state } = useEditorState();\n return (\n <Button\n aria-label=\"Format Bold\"\n onClick={() => editor.dispatchCommand(FORMAT_TEXT_COMMAND, \"bold\")}\n selected={state.isBold}\n >\n <Icon source={<BoldIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { Bold };\n","import { Bold } from \"./Bold\";\n\nexport { Bold } from \"./Bold\";\nexport default Bold;\n","import React from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { RemoveFormatIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\n\nimport { Button } from \"../../components\";\nimport { CLEAR_FORMATTING_COMMAND } from \"../../utils\";\n\nconst ClearFormatting: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n\n return (\n <Button\n aria-label=\"Undo\"\n onClick={() =>\n editor.dispatchCommand(CLEAR_FORMATTING_COMMAND, undefined)\n }\n >\n <Icon source={<RemoveFormatIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { ClearFormatting };\n","import { ClearFormatting } from \"./ClearFormatting\";\n\nexport { ClearFormatting } from \"./ClearFormatting\";\nexport default ClearFormatting;\n","import React from \"react\";\nimport { Box, Icon, Text, Popover } from \"@nimbus-ds/components\";\nimport { TextSizeIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\n\nimport { useEditorState } from \"../../hooks\";\nimport { headerTranslations, supportedHeaderTypes } from \"./header.definitions\";\n\nconst Header: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state } = useEditorState();\n\n return (\n <Popover\n width=\"fit-content\"\n padding=\"small\"\n offset={8}\n content={\n <Box display=\"flex\" flexDirection=\"column\" gap=\"1\">\n {supportedHeaderTypes.map((supportedHeaderType) => (\n <Box\n key={supportedHeaderType.tag}\n as=\"button\"\n type=\"button\"\n cursor=\"pointer\"\n borderWidth=\"none\"\n color=\"primary-interactive\"\n display=\"flex\"\n gap=\"1\"\n p=\"2\"\n borderRadius=\"1\"\n backgroundColor={{\n hover: \"primary-surface\",\n xs:\n state.blockType === supportedHeaderType.tag\n ? \"primary-surface\"\n : \"transparent\",\n }}\n onClick={() =>\n editor.dispatchCommand(\n supportedHeaderType.command,\n supportedHeaderType.tag\n )\n }\n >\n <Icon source={<TextSizeIcon />} color=\"currentColor\" />\n <Text color=\"currentColor\">\n {headerTranslations[supportedHeaderType.tag]}\n </Text>\n </Box>\n ))}\n </Box>\n }\n arrow={false}\n position=\"bottom-start\"\n >\n <Box\n as=\"button\"\n type=\"button\"\n aria-label=\"Formatting options for text style\"\n display=\"flex\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n gap=\"1\"\n p=\"2\"\n borderWidth=\"none\"\n borderRadius=\"1\"\n color=\"primary-interactive\"\n backgroundColor={{\n hover: \"primary-surface\",\n xs: \"transparent\",\n }}\n cursor=\"pointer\"\n >\n <Icon source={<TextSizeIcon />} color=\"currentColor\" />\n <Box display={{ xs: \"none\", md: \"flex\" }}>\n {headerTranslations[state.blockType] && (\n <Text as=\"span\" color=\"currentColor\">\n {headerTranslations[state.blockType]}\n </Text>\n )}\n </Box>\n </Box>\n </Popover>\n );\n};\n\nexport { Header };\n","import { FORMAT_HEADING_COMMAND, FORMAT_PARAGRAPH_COMMAND } from \"../../utils\";\n\nexport const supportedHeaderTypes = [\n { tag: \"h3\", command: FORMAT_HEADING_COMMAND },\n { tag: \"h4\", command: FORMAT_HEADING_COMMAND },\n { tag: \"paragraph\", command: FORMAT_PARAGRAPH_COMMAND },\n];\n\nexport const headerTranslations = {\n h3: \"Título\",\n h4: \"Subtítulo\",\n paragraph: \"Parágrafo\",\n} as { [key: string]: string };\n","import { Header } from \"./Header\";\n\nexport { Header } from \"./Header\";\nexport default Header;\n","import React, { useEffect } from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { RedoIcon, UndoIcon } from \"@nimbus-ds/icons\";\nimport { mergeRegister } from \"@lexical/utils\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport {\n CAN_REDO_COMMAND,\n CAN_UNDO_COMMAND,\n COMMAND_PRIORITY_CRITICAL,\n REDO_COMMAND,\n UNDO_COMMAND,\n} from \"lexical\";\n\nimport { EditorActionKind } from \"../../contexts\";\nimport { Button } from \"../../components\";\nimport { useEditorState } from \"../../hooks\";\n\nconst History: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state, dispatch } = useEditorState();\n\n useEffect(() => {\n mergeRegister(\n editor.registerCommand<boolean>(\n CAN_UNDO_COMMAND,\n (payload) => {\n dispatch({\n type: EditorActionKind.CAN_UNDO,\n payload,\n });\n return false;\n },\n COMMAND_PRIORITY_CRITICAL\n ),\n editor.registerCommand<boolean>(\n CAN_REDO_COMMAND,\n (payload) => {\n dispatch({\n type: EditorActionKind.CAN_REDO,\n payload,\n });\n return false;\n },\n COMMAND_PRIORITY_CRITICAL\n )\n );\n }, [editor, dispatch]);\n\n return (\n <>\n <Button\n aria-label=\"Undo\"\n disabled={!state.canUndo}\n onClick={() => editor.dispatchCommand(UNDO_COMMAND, undefined)}\n >\n <Icon source={<UndoIcon />} color=\"currentColor\" />\n </Button>\n <Button\n aria-label=\"Redo\"\n disabled={!state.canRedo}\n onClick={() => editor.dispatchCommand(REDO_COMMAND, undefined)}\n >\n <Icon source={<RedoIcon />} color=\"currentColor\" />\n </Button>\n </>\n );\n};\n\nexport { History };\n","import { History } from \"./History\";\n\nexport { History } from \"./History\";\nexport default History;\n","import React from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { ItalicIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { FORMAT_TEXT_COMMAND } from \"lexical\";\n\nimport { Button } from \"../../components\";\nimport { useEditorState } from \"../../hooks\";\n\nconst Italic: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state } = useEditorState();\n return (\n <Button\n aria-label=\"Format ItalicIcon\"\n onClick={() => editor.dispatchCommand(FORMAT_TEXT_COMMAND, \"italic\")}\n selected={state.isItalic}\n >\n <Icon source={<ItalicIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { Italic };\n","import { Italic } from \"./Italic\";\n\nexport { Italic } from \"./Italic\";\nexport default Italic;\n","import React, { useCallback } from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { LinkIcon } from \"@nimbus-ds/icons\";\nimport { TOGGLE_LINK_COMMAND } from \"@lexical/link\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\n\nimport { Button } from \"../../components\";\nimport { useEditorState } from \"../../hooks\";\nimport { sanitizeUrl } from \"./link.definitions\";\n\nconst Link: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state } = useEditorState();\n\n const insertLink = useCallback(() => {\n if (!state.isLink) {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, sanitizeUrl(\"https://\"));\n } else {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null);\n }\n }, [editor, state.isLink]);\n\n return (\n <Button aria-label=\"Undo\" onClick={insertLink} selected={state.isLink}>\n <Icon source={<LinkIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { Link };\n","import { Link } from \"./Link\";\n\nexport { Link } from \"./Link\";\nexport default Link;\n","const SUPPORTED_URL_PROTOCOLS = new Set([\n \"http:\",\n \"https:\",\n \"mailto:\",\n \"sms:\",\n \"tel:\",\n]);\n\nexport const sanitizeUrl = (url: string): string => {\n try {\n const parsedUrl = new URL(url);\n if (!SUPPORTED_URL_PROTOCOLS.has(parsedUrl.protocol)) {\n return \"about:blank\";\n }\n } catch {\n return url;\n }\n return url;\n};\n","import React from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { OrderedListIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport {\n INSERT_ORDERED_LIST_COMMAND,\n REMOVE_LIST_COMMAND,\n} from \"@lexical/list\";\n\nimport { LexicalCommand } from \"lexical\";\nimport { Button } from \"../../components\";\nimport { useEditorState } from \"../../hooks\";\n\nconst OrderedList: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state } = useEditorState();\n\n const onClick = (type: \"ul\" | \"ol\", command: LexicalCommand<unknown>) => {\n if (state.blockType !== type) {\n editor.dispatchCommand(command, undefined);\n } else {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n }\n };\n\n return (\n <Button\n aria-label=\"List Ordered\"\n onClick={() => onClick(\"ol\", INSERT_ORDERED_LIST_COMMAND)}\n selected={state.blockType === \"ol\"}\n >\n <Icon source={<OrderedListIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { OrderedList };\n","import { OrderedList } from \"./OrderedList\";\n\nexport { OrderedList } from \"./OrderedList\";\nexport default OrderedList;\n","import React from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { ListIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport {\n INSERT_UNORDERED_LIST_COMMAND,\n REMOVE_LIST_COMMAND,\n} from \"@lexical/list\";\n\nimport { LexicalCommand } from \"lexical\";\nimport { Button } from \"../../components\";\nimport { useEditorState } from \"../../hooks\";\n\nconst UnorderedList: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n const { state } = useEditorState();\n\n const onClick = (type: \"ul\" | \"ol\", command: LexicalCommand<unknown>) => {\n if (state.blockType !== type) {\n editor.dispatchCommand(command, undefined);\n } else {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n }\n };\n\n return (\n <Button\n aria-label=\"List Unordered\"\n onClick={() => onClick(\"ul\", INSERT_UNORDERED_LIST_COMMAND)}\n selected={state.blockType === \"ul\"}\n >\n <Icon source={<ListIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { UnorderedList };\n","import { UnorderedList } from \"./UnorderedList\";\n\nexport { UnorderedList } from \"./UnorderedList\";\nexport default UnorderedList;\n","import React from \"react\";\nimport { Icon } from \"@nimbus-ds/components\";\nimport { PlayIcon } from \"@nimbus-ds/icons\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { INSERT_EMBED_COMMAND } from \"@lexical/react/LexicalAutoEmbedPlugin\";\n\nimport { Button } from \"../../components\";\nimport { YoutubeEmbedConfig } from \"../../plugins\";\n\nconst Video: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n return (\n <Button\n aria-label=\"Insert Video\"\n onClick={() =>\n editor.dispatchCommand(INSERT_EMBED_COMMAND, YoutubeEmbedConfig.type)\n }\n >\n <Icon source={<PlayIcon />} color=\"currentColor\" />\n </Button>\n );\n};\n\nexport { Video };\n","import { Video } from \"./Video\";\n\nexport { Video } from \"./Video\";\nexport default Video;\n","export * from \"./Bold\";\nexport * from \"./ClearFormatting\";\nexport * from \"./Header\";\nexport * from \"./UnorderedList\";\nexport * from \"./Italic\";\nexport * from \"./History\";\nexport * from \"./Link\";\nexport * from \"./OrderedList\";\nexport * from \"./UnorderedList\";\nexport * from \"./Video\";\n","import React from \"react\";\nimport { Box } from \"@nimbus-ds/components\";\nimport { ButtonProps } from \"./button.types\";\n\nconst Button: React.FC<ButtonProps> = ({\n ref: _ref,\n backgroundColor,\n selected,\n ...props\n}) => (\n <Box\n as=\"button\"\n type=\"button\"\n data-id=\"button-toolbar\"\n backgroundColor={{\n hover: \"primary-surface\",\n xs: selected ? \"primary-surface\" : \"transparent\",\n }}\n pointerEvents={props.disabled ? \"none\" : \"auto\"}\n borderRadius=\"1\"\n cursor=\"pointer\"\n borderWidth=\"none\"\n color={props.disabled ? \"neutral-interactive\" : \"primary-interactive\"}\n height=\"32px\"\n minWidth=\"32px\"\n {...props}\n p=\"2\"\n />\n);\n\nexport { Button };\n","import { Button } from \"./Button\";\n\nexport { Button } from \"./Button\";\nexport default Button;\n","import React from \"react\";\nimport { Box } from \"@nimbus-ds/components\";\n\nconst Divider: React.FC = () => (\n <Box\n data-testid=\"divider-toolbar\"\n backgroundColor=\"neutral-surfaceHighlight\"\n borderRadius=\"1\"\n height=\"32px\"\n width=\"1px\"\n />\n);\n\nexport { Divider };\n","import { Divider } from \"./Divider\";\n\nexport { Divider } from \"./Divider\";\nexport default Divider;\n","import React from \"react\";\nimport { editor } from \"@nimbus-ds/styles\";\n\nimport { PlaceholderProps } from \"./placeholder.types\";\n\nconst Placeholder: React.FC<PlaceholderProps> = ({ text }) => {\n if (!text) return null;\n return <div className={editor.classnames.placeholder}>{text}</div>;\n};\n\nexport { Placeholder };\n","import { Placeholder } from \"./Placeholder\";\n\nexport { Placeholder } from \"./Placeholder\";\nexport default Placeholder;\n","import React, { useEffect, useState, useRef } from \"react\";\nimport { COMMAND_PRIORITY_CRITICAL, SELECTION_CHANGE_COMMAND } from \"lexical\";\nimport { Box, Icon, Text, Popover } from \"@nimbus-ds/components\";\nimport { EllipsisIcon } from \"@nimbus-ds/icons\";\nimport { mergeRegister } from \"@lexical/utils\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\n\nimport { headerTranslations } from \"../../actions/Header/header.definitions\";\nimport { EditorContext } from \"../../contexts\";\nimport { useToolbar } from \"../../hooks\";\nimport { Button } from \"../Button\";\nimport { ToolbarProps } from \"./toolbar.types\";\nimport { ELIPSIS_BUTTON, PADDING } from \"./toolbar.definitions\";\n\nconst Toolbar: React.FC<ToolbarProps> = ({ children, className }) => {\n const toolbarRef = useRef<HTMLDivElement>(null);\n const buttonRefs = useRef<HTMLDivElement[]>([]);\n\n const { calcButtonWidths, calcVisibleButtons, updateToolbar, context } =\n useToolbar();\n\n const [editor] = useLexicalComposerContext();\n const [activeEditor, setActiveEditor] = useState(editor);\n\n const [visibleButtons, setVisibleButtons] = useState<React.ReactNode[]>(\n React.Children.toArray(children)\n );\n const [buttonWidths, setButtonWidths] = useState<number[]>([]);\n const [hiddenButtons, setHiddenButtons] = useState<React.ReactNode[]>([]);\n\n useEffect(() => {\n setButtonWidths(calcButtonWidths(buttonRefs));\n }, [buttonRefs, calcButtonWidths]);\n\n const availableWidth =\n (toolbarRef.current?.clientWidth ?? 0) - (PADDING + ELIPSIS_BUTTON);\n\n useEffect(() => {\n const maxVisibleButtons = calcVisibleButtons(buttonWidths, availableWidth);\n const buttons = React.Children.toArray(children);\n setVisibleButtons(buttons.slice(0, maxVisibleButtons));\n setHiddenButtons(buttons.slice(maxVisibleButtons));\n }, [buttonWidths, availableWidth, calcVisibleButtons, children]);\n\n useEffect(\n () =>\n editor.registerCommand(\n SELECTION_CHANGE_COMMAND,\n (_payload, newEditor) => {\n updateToolbar();\n setActiveEditor(newEditor);\n return false;\n },\n COMMAND_PRIORITY_CRITICAL\n ),\n [editor, updateToolbar]\n );\n\n useEffect(() => {\n mergeRegister(\n activeEditor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n updateToolbar();\n });\n })\n );\n }, [updateToolbar, activeEditor]);\n\n return (\n <>\n <div ref={toolbarRef} className={className}>\n <EditorContext.Provider value={context}>\n <Box display=\"flex\" alignItems=\"center\" gap=\"2\" flexWrap=\"wrap\">\n {visibleButtons.map((button, index) => (\n <div\n key={`button-toolbar-${index}`} // eslint-disable-line react/no-array-index-key\n ref={(ref) => {\n if (ref) buttonRefs.current[index] = ref;\n }}\n >\n {button}\n </div>\n ))}\n </Box>\n {!!hiddenButtons.length && (\n <Popover\n width=\"fit-content\"\n maxWidth={`${(toolbarRef.current?.clientWidth ?? 0) - PADDING}px`}\n padding=\"small\"\n offset={8}\n content={\n <Box\n display=\"flex\"\n gap=\"2\"\n flexWrap=\"wrap\"\n justifyContent=\"flex-end\"\n >\n {hiddenButtons.filter(\n (child) =>\n !(child as unknown as { key: string })?.key.includes(\n \"divider\"\n )\n )}\n </Box>\n }\n arrow={false}\n position=\"bottom-end\"\n >\n <Button>\n <Icon source={<EllipsisIcon />} color=\"currentColor\" />\n </Button>\n </Popover>\n )}\n </EditorContext.Provider>\n </div>\n <Box\n display={{ xs: \"block\", md: \"none\" }}\n position=\"absolute\"\n bottom=\"0\"\n py=\"1\"\n px=\"2\"\n width=\"100%\"\n borderWidth=\"none\"\n borderTopWidth=\"1\"\n borderColor=\"neutral-surfaceHighlight\"\n borderStyle=\"solid\"\n >\n <Text fontSize=\"caption\" lineHeight=\"caption\">\n {headerTranslations[context.state.blockType]}\n </Text>\n </Box>\n </>\n );\n};\n\nexport { Toolbar };\n","import { Toolbar } from \"./Toolbar\";\n\nexport { Toolbar } from \"./Toolbar\";\nexport default Toolbar;\n","export const GAP = 16;\nexport const PADDING = 16;\nexport const ELIPSIS_BUTTON = 32;\n","export * from \"./Placeholder\";\nexport * from \"./Toolbar\";\nexport * from \"./Button\";\nexport * from \"./Divider\";\n","import { createContext } from \"react\";\nimport { EditorContextProps } from \"./editorContext.types\";\nimport { initialContext } from \"./editorContext.definitions\";\n\nexport const EditorContext = createContext<EditorContextProps>(\n initialContext as EditorContextProps\n);\n","export const initialContext = {\n state: {\n blockType: \"paragraph\",\n canUndo: false,\n canRedo: false,\n isBold: false,\n isLink: false,\n isItalic: false,\n },\n};\n","import { initialContext } from \"./editorContext.definitions\";\n\n// eslint-disable-next-line no-shadow\nexport enum EditorActionKind {\n BLOCK_TYPE = \"BLOCK_TYPE\",\n CAN_UNDO = \"CAN_UNDO\",\n CAN_REDO = \"CAN_REDO\",\n IS_BOLD = \"IS_BOLD\",\n IS_ITALIC = \"IS_ITALIC\",\n IS_LINK = \"IS_LINK\",\n}\n\nexport interface EditorAction {\n type: EditorActionKind;\n payload: any;\n}\n\nexport interface EditorContextProps {\n state: typeof initialContext.state;\n dispatch: (action: EditorAction) => void;\n}\n","import { EditorContext } from \"./EditorContext\";\n\nexport { EditorContext } from \"./EditorContext\";\nexport type { EditorContextProps, EditorAction } from \"./editorContext.types\";\nexport { EditorActionKind } from \"./editorContext.types\";\nexport { initialContext } from \"./editorContext.definitions\";\n\nexport default EditorContext;\n","export * from \"./EditorContext\";\n","import { link, text, list, title, editor } from \"@nimbus-ds/styles\";\nimport { EditorThemeClasses } from \"lexical\";\nimport { HeadingNode } from \"@lexical/rich-text\";\nimport { AutoLinkNode, LinkNode } from \"@lexical/link\";\nimport { ListItemNode, ListNode } from \"@lexical/list\";\n\nimport {\n Bold,\n ClearFormatting,\n UnorderedList,\n OrderedList,\n Header,\n History,\n Italic,\n Link,\n Video,\n} from \"./actions\";\nimport { Divider } from \"./components\";\nimport { YouTubeNode } from \"./nodes\";\nimport { Module } from \"./editor.types\";\n\nconst joinClassNames = (classNames: string[]) => classNames.join(\" \");\n\nexport const defaultTheme: EditorThemeClasses = {\n heading: {\n h3: joinClassNames([\n title.classnames.base,\n title.classnames.appearance.h3,\n title.sprinkle({\n fontSize: \"6\",\n lineHeight: \"6\",\n color: \"primary-textHigh\",\n }),\n ]),\n h4: joinClassNames([\n title.classnames.base,\n title.classnames.appearance.h4,\n title.sprinkle({\n fontSize: \"5\",\n lineHeight: \"5\",\n color: \"primary-textHigh\",\n }),\n ]),\n },\n paragraph: joinClassNames([\n text.classnames.base,\n text.sprinkle({ color: \"neutral-textLow\" as \"$neutral-textLow\" })\n ?.className ?? \"\",\n ]),\n link: joinClassNames([\n link.classnames.appearance.primary,\n link.classnames.base,\n link.sprinkle({ textDecoration: \"none\" }),\n ]),\n list: {\n listitem: list.classnames.container__item,\n nested: {\n listitem: editor.classnames.nested_list__item,\n },\n ul: list.classnames.container,\n ol: list.classnames.container,\n },\n text: {\n italic: editor.classnames.text__italic,\n bold: joinClassNames([\n text.sprinkle({\n fontWeight: \"bold\" as \"$bold\",\n })?.className ?? \"\",\n ]),\n },\n};\n\nexport const aliasModules = {\n bold: Bold,\n clearFormating: ClearFormatting,\n orderedList: OrderedList,\n unorderedList: UnorderedList,\n header: Header,\n history: History,\n italic: Italic,\n link: Link,\n video: Video,\n divider: Divider,\n};\n\nexport const defaultModules: Module[] = [\n \"history\",\n \"divider\",\n \"header\",\n \"divider\",\n \"orderedList\",\n \"unorderedList\",\n \"divider\",\n \"bold\",\n \"italic\",\n \"link\",\n \"video\",\n \"divider\",\n \"clearFormating\",\n];\n\nexport const helpTextAppearance = {\n danger: \"danger-textLow\",\n warning: \"warning-textLow\",\n success: \"success-textLow\",\n none: \"neutral-textLow\",\n} as {\n [key: string]:\n | \"danger-textLow\"\n | \"warning-textLow\"\n | \"success-textLow\"\n | \"neutral-textLow\";\n};\n\nexport const editorAppearance = {\n danger: \"danger\",\n warning: \"warning\",\n success: \"success\",\n none: \"neutral\",\n} as {\n [key: string]: \"danger\" | \"warning\" | \"success\" | \"neutral\";\n};\n\nexport const nodes = [\n AutoLinkNode,\n HeadingNode,\n ListNode,\n ListItemNode,\n LinkNode,\n YouTubeNode,\n];\n","export { useEditor } from \"./useEditor\";\nexport { useEditorState } from \"./useEditorState\";\nexport { useToolbar, getSelectedNode } from \"./useToolbar\";\n","export { useEditor } from \"./useEditor\";\n","import { $getRoot, $insertNodes, LexicalEditor } from \"lexical\";\nimport { $generateNodesFromDOM } from \"@lexical/html\";\n\nexport const parserDOM = new DOMParser();\n\nexport const setContentHTML = (editor: LexicalEditor, value: string) => {\n const dom = parserDOM.parseFromString(value, \"text/html\");\n const nodes = $generateNodesFromDOM(editor, dom);\n $getRoot().select();\n $insertNodes(nodes);\n};\n\nexport const setContentJSON = (editor: LexicalEditor, value: string) => {\n const state = editor.parseEditorState(value);\n editor.setEditorState(state);\n};\n\nexport const isEmptyContent = () => {\n const root = $getRoot();\n return root?.getFirstChild?.()?.isEmpty() && root.getChildrenSize() === 1;\n};\n","import { EditorState, LexicalEditor } from \"lexical\";\nimport { $generateHtmlFromNodes } from \"@lexical/html\";\n\nimport { useEditorProps } from \"./useEditor.types\";\nimport {\n setContentHTML,\n setContentJSON,\n isEmptyContent,\n} from \"./useEditor.definitions\";\n\nexport const useEditor = ({\n parser,\n onChange: handleChange,\n}: useEditorProps) => {\n const setContent = (editor: LexicalEditor, value?: string) => {\n if (!value) return false;\n switch (parser) {\n case \"html\":\n return setContentHTML(editor, value);\n default:\n return setContentJSON(editor, value);\n }\n };\n\n const onChangeJSON = (editorState: EditorState) => {\n const editorContentJSON = editorState.toJSON();\n handleChange?.(JSON.stringify(editorContentJSON));\n return editorContentJSON;\n };\n\n const onChangeHTML = (editorState: EditorState, editor: LexicalEditor) => {\n const editorContentHtml = editorState.read(() => {\n if (isEmptyContent()) return \"\";\n return $generateHtmlFromNodes(editor);\n });\n handleChange?.(editorContentHtml);\n return editorContentHtml;\n };\n\n const onChangeEditor = (editorState: EditorState, editor: LexicalEditor) => {\n switch (parser) {\n case \"html\":\n return onChangeHTML(editorState, editor);\n default:\n return onChangeJSON(editorState);\n }\n };\n\n const onError = (error: Error) => {\n console.error(error);\n };\n\n return { setContent, onChangeEditor, onError };\n};\n","export { useEditorState } from \"./useEditorState\";\n","import { useContext } from \"react\";\n\nimport { EditorContext, EditorContextProps } from \"../../contexts\";\n\nexport const useEditorState: () => EditorContextProps = () => {\n const context = useContext(EditorContext);\n return context;\n};\n","export { useToolbar } from \"./useToolbar\";\nexport { getSelectedNode } from \"./useToolbar.definitions\";\n","import { ElementNode, RangeSelection, TextNode } from \"lexical\";\nimport { $isAtNodeEnd } from \"@lexical/selection\";\nimport { EditorAction, EditorActionKind, initialContext } from \"../../contexts\";\n\nexport const GAP = 16;\nexport const PADDING = 16;\nexport const ELIPSIS_BUTTON = 32;\n\nexport const reducer = (\n state: typeof initialContext.state,\n action: EditorAction\n) => {\n switch (action.type) {\n case EditorActionKind.BLOCK_TYPE:\n return {\n ...state,\n blockType: action.payload,\n };\n case EditorActionKind.CAN_REDO:\n return {\n ...state,\n canRedo: action.payload,\n };\n case EditorActionKind.CAN_UNDO:\n return {\n ...state,\n canUndo: action.payload,\n };\n case EditorActionKind.IS_BOLD:\n return {\n ...state,\n isBold: action.payload,\n };\n case EditorActionKind.IS_ITALIC:\n return {\n ...state,\n isItalic: action.payload,\n };\n case EditorActionKind.IS_LINK:\n return {\n ...state,\n isLink: action.payload,\n };\n default:\n return state;\n }\n};\n\nexport const getSelectedNode = (\n selection: RangeSelection\n): TextNode | ElementNode => {\n const { anchor } = selection;\n const { focus } = selection;\n const anchorNode = selection.anchor.getNode();\n const focusNode = selection.focus.getNode();\n if (anchorNode === focusNode) {\n return anchorNode;\n }\n const isBackward = selection.isBackward();\n if (isBackward) {\n return $isAtNodeEnd(focus) ? anchorNode : focusNode;\n }\n return $isAtNodeEnd(anchor) ? anchorNode : focusNode;\n};\n","import React, {\n useCallback,\n useEffect,\n useMemo,\n useReducer,\n useState,\n} from \"react\";\nimport { $getSelection, $isRangeSelection, RangeSelection } from \"lexical\";\nimport { $isLinkNode } from \"@lexical/link\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { $isListNode, ListNode } from \"@lexical/list\";\nimport { $isHeadingNode } from \"@lexical/rich-text\";\nimport { $getNearestNodeOfType } from \"@lexical/utils\";\n\nimport { GAP, getSelectedNode, reducer } from \"./useToolbar.definitions\";\nimport { EditorActionKind, initialContext } from \"../../contexts\";\n\nexport const useToolbar = () => {\n const [editor] = useLexicalComposerContext();\n const [windowWidth, setWindowWidth] = useState(window.innerWidth);\n const [state, dispatch] = useReducer(reducer, initialContext.state);\n\n const handleResize = () => {\n setWindowWidth(window.innerWidth);\n };\n\n useEffect(() => {\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n const calcButtonWidths = useCallback(\n (buttonRefs: React.MutableRefObject<HTMLDivElement[]>) => {\n const buttonWidths = buttonRefs.current.map(\n (ref: HTMLDivElement) => ref?.getBoundingClientRect().width\n );\n return buttonWidths;\n },\n []\n );\n\n const calcVisibleButtons = useCallback(\n (buttonWidths: number[], availableWidth: number) => {\n const visibleButtons = buttonWidths.reduce(\n (prev, curr) => {\n if (prev.totalWidthButtons + curr <= availableWidth) {\n prev.maxVisibleButtons += 1; // eslint-disable-line no-param-reassign\n prev.totalWidthButtons += Math.ceil(curr + GAP); // eslint-disable-line no-param-reassign\n }\n return prev;\n },\n { totalWidthButtons: 0, maxVisibleButtons: 0 }\n );\n return visibleButtons.maxVisibleButtons;\n },\n []\n );\n\n const updateToolbar = useCallback(() => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n const anchorNode = selection.anchor.getNode();\n const element =\n anchorNode.getKey() === \"root\"\n ? anchorNode\n : anchorNode.getTopLevelElementOrThrow();\n\n const elementKey = element.getKey();\n const elementDOM = editor.getElementByKey(elementKey);\n\n dispatch({\n type: EditorActionKind.IS_BOLD,\n payload: (selection as RangeSelection)?.hasFormat?.(\"bold\"),\n });\n\n dispatch({\n type: EditorActionKind.IS_ITALIC,\n payload: (selection as RangeSelection)?.hasFormat?.(\"italic\"),\n });\n\n const node = getSelectedNode(selection);\n const parent = node.getParent();\n\n dispatch({\n type: EditorActionKind.IS_LINK,\n payload: !!($isLinkNode(parent) || $isLinkNode(node)) ?? false,\n });\n\n if (elementDOM !== null) {\n if ($isListNode(element)) {\n const parentList = $getNearestNodeOfType(anchorNode, ListNode);\n const type = parentList ? parentList.getTag() : element.getTag();\n dispatch({\n type: EditorActionKind.BLOCK_TYPE,\n payload: type,\n });\n } else {\n const type = $isHeadingNode(element)\n ? element.getTag()\n : element.getType();\n\n dispatch({\n type: EditorActionKind.BLOCK_TYPE,\n payload: type,\n });\n }\n }\n }\n }, [editor]);\n\n const context = useMemo(\n () => ({\n state,\n dispatch,\n }),\n [state, dispatch]\n );\n\n return {\n windowWidth,\n calcButtonWidths,\n calcVisibleButtons,\n updateToolbar,\n context,\n };\n};\n","import { Editor } from \"./Editor\";\n\nexport { Editor } from \"./Editor\";\nexport type { EditorProps } from \"./editor.types\";\nexport default Editor;\n","import React from \"react\";\nimport type {\n DOMConversionMap,\n DOMExportOutput,\n EditorConfig,\n ElementFormatType,\n LexicalEditor,\n NodeKey,\n} from \"lexical\";\nimport { DecoratorBlockNode } from \"@lexical/react/LexicalDecoratorBlockNode\";\nimport { BlockWithAlignableContents } from \"@lexical/react/LexicalBlockWithAlignableContents\";\n\nimport {\n $createYouTubeNode,\n convertYoutubeElement,\n} from \"./youTubeNode.definitions\";\nimport {\n SerializedYouTubeNode,\n YouTubeComponentProps,\n} from \"./youTubeNode.types\";\n\nconst YouTubeComponent: React.FC<YouTubeComponentProps> = ({\n className,\n format,\n nodeKey,\n videoID,\n}) => (\n <BlockWithAlignableContents\n className={className}\n format={format}\n nodeKey={nodeKey}\n >\n <iframe\n width=\"560\"\n height=\"315\"\n src={`https://www.youtube-nocookie.com/embed/${videoID}`}\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n allowFullScreen\n title=\"YouTube video\"\n />\n </BlockWithAlignableContents>\n);\n\nclass YouTubeNode extends DecoratorBlockNode {\n __id: string;\n\n static getType(): string {\n return \"youtube\";\n }\n\n static clone(node: YouTubeNode): YouTubeNode {\n return new YouTubeNode(node.__id, node.__format, node.__key);\n }\n\n static importJSON(serializedNode: SerializedYouTubeNode): YouTubeNode {\n const node = $createYouTubeNode(serializedNode.videoID);\n node.setFormat(serializedNode.format);\n return node;\n }\n\n exportJSON(): SerializedYouTubeNode {\n return {\n ...super.exportJSON(),\n type: \"youtube\",\n version: 1,\n videoID: this.__id,\n };\n }\n\n constructor(id: string, format?: ElementFormatType, key?: NodeKey) {\n super(format, key);\n this.__id = id;\n }\n\n exportDOM(): DOMExportOutput {\n const element = document.createElement(\"iframe\");\n element.setAttribute(\"data-lexical-youtube\", this.__id);\n element.setAttribute(\"width\", \"560\");\n element.setAttribute(\"height\", \"315\");\n element.setAttribute(\n \"src\",\n `https://www.youtube-nocookie.com/embed/${this.__id}`\n );\n element.setAttribute(\"frameborder\", \"0\");\n element.setAttribute(\n \"allow\",\n \"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n );\n element.setAttribute(\"allowfullscreen\", \"true\");\n element.setAttribute(\"title\", \"YouTube video\");\n return { element };\n }\n\n static importDOM(): DOMConversionMap | null {\n return {\n iframe: (domNode: HTMLElement) => {\n if (!domNode.hasAttribute(\"data-lexical-youtube\")) {\n return null;\n }\n return {\n conversion: convertYoutubeElement,\n priority: 1,\n };\n },\n };\n }\n\n // eslint-disable-next-line class-methods-use-this\n updateDOM(): false {\n return false;\n }\n\n getId(): string {\n return this.__id;\n }\n\n getTextContent(): string {\n return `https://www.youtube.com/watch?v=${this.__id}`;\n }\n\n decorate(_editor: LexicalEditor, config: EditorConfig): React.ReactElement {\n const embedBlockTheme = config.theme.embedBlock || {};\n const className = {\n base: embedBlockTheme.base || \"\",\n focus: embedBlockTheme.focus || \"\",\n };\n return (\n <YouTubeComponent\n className={className}\n format={this.__format}\n nodeKey={this.getKey()}\n videoID={this.__id}\n />\n );\n }\n}\n\nexport { YouTubeNode };\n","import { YouTubeNode } from \"./YouTubeNode\";\n\nexport { YouTubeNode } from \"./YouTubeNode\";\nexport { $isYouTubeNode, $createYouTubeNode } from \"./youTubeNode.definitions\";\nexport default YouTubeNode;\n","import { DOMConversionOutput, LexicalNode } from \"lexical\";\nimport { YouTubeNode } from \"./YouTubeNode\";\n\nexport const $createYouTubeNode = (videoID: string): YouTubeNode =>\n new YouTubeNode(videoID);\n\nexport const $isYouTubeNode = (\n node: YouTubeNode | LexicalNode | null | undefined\n): node is YouTubeNode => node instanceof YouTubeNode;\n\nexport const convertYoutubeElement = (\n domNode: HTMLElement\n): null | DOMConversionOutput => {\n const videoID = domNode.getAttribute(\"data-lexical-youtube\");\n if (videoID) {\n const node = $createYouTubeNode(videoID);\n return { node };\n }\n return null;\n};\n","export * from \"./YouTubeNode\";\n","import React, { useMemo, useState } from \"react\";\nimport { Button, Modal } from \"@nimbus-ds/components\";\nimport { FormField } from \"@nimbus-ds/formfield\";\nimport {\n AutoEmbedOption,\n EmbedMatchResult,\n LexicalAutoEmbedPlugin,\n URL_MATCHER,\n} from \"@lexical/react/LexicalAutoEmbedPlugin\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { PlaygroundEmbedConfig } from \"./customAutoEmbedPlugin.types\";\nimport { YoutubeEmbedConfig } from \"./customAutoEmbedPlugin.definitions\";\nimport { debounce } from \"../../utils\";\n\nconst CustomAutoEmbedPlugin: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n\n const [text, setText] = useState(\"\");\n const [showModal, setShowModal] = useState(false);\n const handleModal = () => setShowModal((prevState) => !prevState);\n\n const [embedResult, setEmbedResult] = useState<EmbedMatchResult | null>(null);\n const [embedConfig, setEmbedConfig] = useState<PlaygroundEmbedConfig | null>(\n null\n );\n const openEmbedModal = (currentEmbedConfig: PlaygroundEmbedConfig) => {\n setEmbedConfig(currentEmbedConfig);\n handleModal();\n };\n\n const getMenuOptions = (\n activeEmbedConfig: PlaygroundEmbedConfig,\n embedFn: () => void,\n dismissFn: () => void\n ) => [\n new AutoEmbedOption(\"Dismiss\", {\n onSelect: dismissFn,\n }),\n new AutoEmbedOption(`Embed ${activeEmbedConfig.contentName}`, {\n onSelect: embedFn,\n }),\n ];\n\n const validateText = useMemo(\n () =>\n debounce((inputText: string) => {\n const urlMatch = URL_MATCHER.exec(inputText);\n\n if (embedConfig != null && inputText != null && urlMatch != null) {\n Promise.resolve(embedConfig.parseUrl(inputText)).then(\n (parseResult) => {\n setEmbedResult(parseResult);\n }\n );\n } else if (embedResult != null) {\n setEmbedResult(null);\n }\n }, 200),\n [embedConfig, embedResult]\n );\n\n const onClick = () => {\n if (embedResult != null) {\n embedConfig?.insertNode(editor, embedResult);\n handleModal();\n }\n };\n\n return (\n <>\n <Modal open={showModal} onDismiss={handleModal}>\n <Modal.Header title=\"Embed Youtube Video\" />\n <Modal.Body padding=\"none\">\n <FormField.Input\n label=\"URL\"\n value={text}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n const { value } = e.target;\n setText(value);\n validateText(value);\n }}\n />\n </Modal.Body>\n <Modal.Footer>\n <Button disabled={!embedResult} onClick={onClick}>\n Embed\n </Button>\n </Modal.Footer>\n </Modal>\n <LexicalAutoEmbedPlugin<PlaygroundEmbedConfig>\n embedConfigs={[YoutubeEmbedConfig]}\n onOpenEmbedModalForConfig={openEmbedModal}\n getMenuOptions={getMenuOptions}\n menuRenderFn={() => null}\n />\n </>\n );\n};\n\nexport { CustomAutoEmbedPlugin };\n","import { LexicalEditor } from \"lexical\";\nimport { EmbedMatchResult } from \"@lexical/react/LexicalAutoEmbedPlugin\";\n\nimport { PlaygroundEmbedConfig } from \"./customAutoEmbedPlugin.types\";\nimport { INSERT_YOUTUBE_COMMAND } from \"../../utils\";\n\nexport const YoutubeEmbedConfig: PlaygroundEmbedConfig = {\n contentName: \"Youtube Video\",\n\n exampleUrl: \"https://www.youtube.com/watch?v=jNQXAC9IVRw\",\n\n insertNode: (editor: LexicalEditor, result: EmbedMatchResult) => {\n editor.dispatchCommand(INSERT_YOUTUBE_COMMAND, result.id);\n },\n\n keywords: [\"youtube\", \"video\"],\n\n // Determine if a given URL is a match and return url data.\n parseUrl: async (url: string) => {\n const match =\n /^.*(youtu\\.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|&v=)([^#&?]*).*/.exec(url);\n\n const id = match ? (match?.[2].length === 11 ? match[2] : null) : null; // eslint-disable-line no-nested-ternary\n\n if (id != null) {\n return {\n id,\n url,\n };\n }\n\n return null;\n },\n\n type: \"youtube-video\",\n};\n","import { CustomAutoEmbedPlugin } from \"./CustomAutoEmbedPlugin\";\n\nexport { CustomAutoEmbedPlugin } from \"./CustomAutoEmbedPlugin\";\nexport { YoutubeEmbedConfig } from \"./customAutoEmbedPlugin.definitions\";\nexport default CustomAutoEmbedPlugin;\n","import { useEffect } from \"react\";\nimport {\n $createParagraphNode,\n $getSelection,\n $isRangeSelection,\n $isTextNode,\n COMMAND_PRIORITY_NORMAL,\n} from \"lexical\";\nimport { $isHeadingNode, $isQuoteNode } from \"@lexical/rich-text\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { $isDecoratorBlockNode } from \"@lexical/react/LexicalDecoratorBlockNode\";\n\nimport { CLEAR_FORMATTING_COMMAND } from \"../../utils\";\nimport {\n clearNodeFormatting,\n isCursorAtTheSamePosition,\n} from \"./customClear.definitions\";\n\nconst CustomClearFormattingPlugin = () => {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n editor.registerCommand(\n CLEAR_FORMATTING_COMMAND,\n () => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n const { anchor, focus } = selection;\n const nodes = selection.getNodes();\n\n if (isCursorAtTheSamePosition(anchor, focus)) {\n return true;\n }\n\n nodes.forEach((node, idx) => {\n if ($isTextNode(node)) {\n if (idx === 0 && anchor.offset !== 0) {\n node = node.splitText(anchor.offset)[1] || node; // eslint-disable-line no-param-reassign\n }\n if (idx === nodes.length - 1) {\n node = node.splitText(focus.offset)[0] || node; // eslint-disable-line no-param-reassign\n }\n clearNodeFormatting(node);\n } else if ($isHeadingNode(node) || $isQuoteNode(node)) {\n node.replaceWith($createParagraphNode(), true);\n } else if ($isDecoratorBlockNode(node)) {\n clearNodeFormatting(node);\n }\n });\n }\n return true;\n },\n COMMAND_PRIORITY_NORMAL\n );\n }, [editor]);\n\n return null;\n};\n\nexport { CustomClearFormattingPlugin };\n","import { LexicalNode } from \"lexical\";\nimport { PointType } from \"lexical/LexicalSelection\";\nimport { $getNearestBlockElementAncestorOrThrow } from \"@lexical/utils\";\n\nexport const isCursorAtTheSamePosition = (\n anchor: PointType,\n focus: PointType\n) => anchor.key === focus.key && anchor.offset === focus.offset;\n\nexport const clearNodeFormatting = (node: LexicalNode) => {\n // eslint-disable-next-line no-underscore-dangle\n if (node.__style !== \"\") {\n node.setStyle(\"\");\n }\n // eslint-disable-next-line no-underscore-dangle\n if (node.__format !== 0) {\n node.setFormat(0);\n $getNearestBlockElementAncestorOrThrow(node).setFormat(\"\");\n }\n};\n","import { CustomClearFormattingPlugin } from \"./CustomClearFormattingPlugin\";\n\nexport { CustomClearFormattingPlugin } from \"./CustomClearFormattingPlugin\";\nexport default CustomClearFormattingPlugin;\n","import React, { useRef } from \"react\";\nimport {\n useFloating,\n shift,\n flip,\n FloatingPortal,\n autoUpdate,\n} from \"@floating-ui/react\";\nimport { popover } from \"@nimbus-ds/styles\";\n\nimport { useFloatingLinkEditor } from \"./hooks\";\nimport { PopoverEditLink } from \"./components\";\n\nconst CustomFloatingLinkEditor: React.FC = () => {\n const ref = useRef(null);\n const { isLink, linkUrl, showPopover, handlePopover } =\n useFloatingLinkEditor();\n\n const { floatingStyles } = useFloating({\n strategy: \"fixed\",\n whileElementsMounted: autoUpdate,\n elements: {\n floating: ref?.current,\n reference: window?.getSelection?.()?.focusNode?.parentElement,\n },\n middleware: [\n shift(),\n flip({\n crossAxis: true,\n fallbackAxisSideDirection: \"end\",\n padding: 5,\n }),\n ],\n });\n\n return (\n <FloatingPortal id=\"nimbus-popover-floating\">\n <div\n ref={ref}\n style={{ ...floatingStyles, display: isLink ? \"flex\" : \"none\" }}\n className={popover.classnames.content}\n >\n {showPopover && (\n <PopoverEditLink linkUrl={linkUrl} handlePopover={handlePopover} />\n )}\n </div>\n </FloatingPortal>\n );\n};\n\nexport { CustomFloatingLinkEditor };\n","import React, { useState, useEffect } from \"react\";\nimport { Box, IconButton, Link } from \"@nimbus-ds/components\";\nimport { FormField } from \"@nimbus-ds/formfield\";\nimport { PencilIcon, TrashIcon, CloseIcon, CheckIcon } from \"@nimbus-ds/icons\";\nimport { TOGGLE_LINK_COMMAND } from \"@lexical/link\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { PopoverEditLinkProps } from \"./popoverEditLink.types\";\n\nconst PopoverEditLink: React.FC<PopoverEditLinkProps> = ({\n linkUrl,\n handlePopover,\n}) => {\n const [editor] = useLexicalComposerContext();\n\n const [text, setText] = useState(linkUrl);\n const [editLink, setEditLink] = useState(false);\n\n useEffect(() => {\n if (!text && linkUrl) {\n setText(linkUrl);\n }\n }, [linkUrl, text]);\n\n return (\n <Box backgroundColor=\"neutral-background\" p=\"4\" borderRadius=\"2\">\n <Box>\n {!editLink && (\n <Box display=\"flex\" gap=\"2\">\n <Link as=\"a\" href={linkUrl} target=\"_blank\" appearance=\"primary\">\n {linkUrl}\n </Link>\n <Box display=\"flex\" gap=\"1\">\n <IconButton\n source={<PencilIcon size={15} />}\n size=\"1.5rem\"\n onClick={() => setEditLink(true)}\n />\n <IconButton\n source={<TrashIcon size={15} />}\n size=\"1.5rem\"\n onClick={() => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null);\n handlePopover();\n }}\n />\n </Box>\n </Box>\n )}\n {editLink && (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"2\">\n <FormField.Input\n label=\"URL\"\n value={text}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => {\n const { value } = e.target;\n setText(value);\n }}\n />\n <Box display=\"flex\" gap=\"1\" justifyContent=\"flex-end\">\n <IconButton\n source={<CloseIcon size={12} />}\n size=\"1.4rem\"\n onClick={() => {\n setEditLink(false);\n setText(linkUrl);\n }}\n />\n <IconButton\n source={<CheckIcon size={12} />}\n size=\"1.4rem\"\n disabled={!text.length}\n onClick={() => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, text);\n handlePopover();\n }}\n />\n </Box>\n </Box>\n )}\n </Box>\n </Box>\n );\n};\n\nexport { PopoverEditLink };\n","import { PopoverEditLink } from \"./PopoverEditLink\";\n\nexport { PopoverEditLink } from \"./PopoverEditLink\";\nexport default PopoverEditLink;\n","export * from \"./PopoverEditLink\";\n","export { useFloatingLinkEditor } from \"./useFloatingLinkEditor\";\n","export { useFloatingLinkEditor } from \"./useFloatingLinkEditor\";\n","import { useEffect, useState } from \"react\";\nimport {\n $getSelection,\n $isRangeSelection,\n CLICK_COMMAND,\n COMMAND_PRIORITY_CRITICAL,\n COMMAND_PRIORITY_LOW,\n SELECTION_CHANGE_COMMAND,\n} from \"lexical\";\nimport { $findMatchingParent, mergeRegister } from \"@lexical/utils\";\nimport { $isAutoLinkNode, $isLinkNode } from \"@lexical/link\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\n\nimport { getSelectedNode } from \"../../../../hooks\";\n\nexport const useFloatingLinkEditor = () => {\n const [editor] = useLexicalComposerContext();\n const [isLink, setIsLink] = useState(false);\n const [linkUrl, setLinkUrl] = useState(\"\");\n const [showPopover, setShowPopover] = useState<boolean>(false);\n const handlePopover = () => setShowPopover((prevState) => !prevState);\n\n const updateToolbar = () => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n const node = getSelectedNode(selection);\n const linkParent = $findMatchingParent(node, $isLinkNode);\n const autoLinkParent = $findMatchingParent(node, $isAutoLinkNode);\n\n // We don't want this menu to open for auto links.\n if (linkParent !== null && autoLinkParent === null) {\n setIsLink(true);\n setLinkUrl(linkParent.__url);\n } else {\n setIsLink(false);\n }\n }\n };\n\n useEffect(\n () =>\n mergeRegister(\n editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n updateToolbar();\n });\n }),\n editor.registerCommand(\n SELECTION_CHANGE_COMMAND,\n () => {\n updateToolbar();\n return false;\n },\n COMMAND_PRIORITY_CRITICAL\n ),\n editor.registerCommand(\n CLICK_COMMAND,\n (payload) => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n const node = getSelectedNode(selection);\n const linkNode = $findMatchingParent(node, $isLinkNode);\n if (\n $isLinkNode(linkNode) &&\n (payload.metaKey || payload.ctrlKey)\n ) {\n setIsLink(false);\n window.open(linkNode.getURL(), \"_blank\");\n return true;\n }\n if ($isLinkNode(linkNode)) {\n setShowPopover(true);\n }\n }\n return false;\n },\n COMMAND_PRIORITY_LOW\n )\n ),\n [editor]\n );\n\n return { isLink, linkUrl, showPopover, handlePopover };\n};\n","import { CustomFloatingLinkEditor } from \"./CustomFloatingLinkEditor\";\n\nexport { CustomFloatingLinkEditor } from \"./CustomFloatingLinkEditor\";\nexport default CustomFloatingLinkEditor;\n","import { useEffect } from \"react\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport {\n $getSelection,\n $isRangeSelection,\n COMMAND_PRIORITY_NORMAL,\n} from \"lexical\";\nimport { $setBlocksType } from \"@lexical/selection\";\nimport { HeadingTagType, $createHeadingNode } from \"@lexical/rich-text\";\nimport { FORMAT_HEADING_COMMAND } from \"../../utils\";\n\nconst CustomHeadingPlugin = () => {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n editor.registerCommand<HeadingTagType>(\n FORMAT_HEADING_COMMAND,\n (payload) => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n $setBlocksType(selection, () => $createHeadingNode(payload));\n }\n return true;\n },\n COMMAND_PRIORITY_NORMAL\n );\n }, [editor]);\n\n return null;\n};\n\nexport { CustomHeadingPlugin };\n","import { CustomHeadingPlugin } from \"./CustomHeadingPlugin\";\n\nexport { CustomHeadingPlugin } from \"./CustomHeadingPlugin\";\nexport default CustomHeadingPlugin;\n","import { useEffect } from \"react\";\nimport {\n $createParagraphNode,\n $getSelection,\n $isRangeSelection,\n COMMAND_PRIORITY_NORMAL,\n} from \"lexical\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\n\nimport { $setBlocksType } from \"@lexical/selection\";\nimport { FORMAT_PARAGRAPH_COMMAND } from \"../../utils\";\n\nconst CustomParagraphPlugin = () => {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n editor.registerCommand(\n FORMAT_PARAGRAPH_COMMAND,\n () => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n $setBlocksType(selection, () => $createParagraphNode());\n }\n return true;\n },\n COMMAND_PRIORITY_NORMAL\n );\n }, [editor]);\n\n return null;\n};\n\nexport { CustomParagraphPlugin };\n","import { CustomParagraphPlugin } from \"./CustomParagraphPlugin\";\n\nexport { CustomParagraphPlugin } from \"./CustomParagraphPlugin\";\nexport default CustomParagraphPlugin;\n","import React, { useEffect } from \"react\";\nimport { COMMAND_PRIORITY_EDITOR } from \"lexical\";\nimport { $insertNodeToNearestRoot } from \"@lexical/utils\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\n\nimport { $createYouTubeNode, YouTubeNode } from \"../../nodes\";\nimport { INSERT_YOUTUBE_COMMAND } from \"../../utils\";\n\nconst CustomYouTubePlugin: React.FC = () => {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n if (!editor.hasNodes([YouTubeNode])) {\n throw new Error(\"YouTubePlugin: YouTubeNode not registered on editor\");\n }\n\n return editor.registerCommand<string>(\n INSERT_YOUTUBE_COMMAND,\n (payload) => {\n console.log(\"payload\", payload);\n const youTubeNode = $createYouTubeNode(payload);\n $insertNodeToNearestRoot(youTubeNode);\n return true;\n },\n COMMAND_PRIORITY_EDITOR\n );\n }, [editor]);\n return null;\n};\n\nexport { CustomYouTubePlugin };\n","import { CustomYouTubePlugin } from \"./CustomYouTubePlugin\";\n\nexport { CustomYouTubePlugin } from \"./CustomYouTubePlugin\";\nexport default CustomYouTubePlugin;\n","import React from \"react\";\nimport { TabIndentationPlugin } from \"@lexical/react/LexicalTabIndentationPlugin\";\nimport { LinkPlugin } from \"@lexical/react/LexicalLinkPlugin\";\nimport { ListPlugin } from \"@lexical/react/LexicalListPlugin\";\nimport { AutoFocusPlugin } from \"@lexical/react/LexicalAutoFocusPlugin\";\nimport { HistoryPlugin } from \"@lexical/react/LexicalHistoryPlugin\";\nimport { AutoLinkPlugin } from \"@lexical/react/LexicalAutoLinkPlugin\";\nimport { MATCHERS, validateUrl } from \"./defaultPlugins.definitions\";\n\nconst DefaultPlugins: React.FC = () => (\n <>\n <ListPlugin />\n <LinkPlugin validateUrl={validateUrl} />\n <AutoLinkPlugin matchers={MATCHERS} />\n <AutoFocusPlugin />\n <HistoryPlugin />\n <TabIndentationPlugin />\n </>\n);\n\nexport { DefaultPlugins };\n","import { createLinkMatcherWithRegExp } from \"@lexical/react/LexicalAutoLinkPlugin\";\n\n// eslint-disable-next-line prefer-regex-literals\nconst urlRegExp = new RegExp(\n /((([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[-;:&=+$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\\w]+@)[A-Za-z0-9.-]+)((?:\\/[+~%/.\\w-_]*)?\\??(?:[-+=&;%@.\\w_]*)#?(?:[\\w]*))?)/\n);\nexport function validateUrl(url: string): boolean {\n return url === \"https://\" || urlRegExp.test(url);\n}\n\nconst URL_REGEX =\n /(https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|www\\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9]+\\.[^\\s]{2,}|www\\.[a-zA-Z0-9]+\\.[^\\s]{2,})/;\n\nconst EMAIL_REGEX =\n /(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))/;\n\nexport const MATCHERS = [\n createLinkMatcherWithRegExp(URL_REGEX, (text) => text),\n createLinkMatcherWithRegExp(EMAIL_REGEX, (text) => `mailto:${text}`),\n];\n","import { DefaultPlugins } from \"./DefaultPlugins\";\n\nexport { DefaultPlugins } from \"./DefaultPlugins\";\nexport default DefaultPlugins;\n","export * from \"./CustomAutoEmbedPlugin\";\nexport * from \"./CustomClearFormattingPlugin\";\nexport * from \"./CustomFloatingLinkEditor\";\nexport * from \"./CustomHeadingPlugin\";\nexport * from \"./CustomParagraphPlugin\";\nexport * from \"./CustomYouTubePlugin\";\nexport * from \"./DefaultPlugins\";\n","import { LexicalCommand, createCommand } from \"lexical\";\n\nexport const FORMAT_HEADING_COMMAND: LexicalCommand<string> = createCommand(\n \"FORMAT_HEADING_COMMAND\"\n);\nexport const FORMAT_PARAGRAPH_COMMAND: LexicalCommand<string> = createCommand(\n \"FORMAT_PARAGRAPH_COMMAND\"\n);\nexport const CLEAR_FORMATTING_COMMAND = createCommand(\n \"CLEAR_FORMATING_COMMAND\"\n);\nexport const INSERT_YOUTUBE_COMMAND: LexicalCommand<string> = createCommand(\n \"INSERT_YOUTUBE_COMMAND\"\n);\n","export const debounce = (callback: (text: string) => void, delay: number) => {\n let timeoutId: number;\n return (text: string) => {\n window.clearTimeout(timeoutId);\n timeoutId = window.setTimeout(() => {\n callback(text);\n }, delay);\n };\n};\n","export * from \"./customCommands\";\nexport * from \"./debounce\";\n","import React from \"react\";\n\nimport { Box, Icon as NimbusIcon, Title, Text } from \"@nimbus-ds/components\";\n\nimport { EmptyMessageProps } from \"./emptyMessage.types\";\n\nconst EmptyMessage: React.FC<EmptyMessageProps> = ({\n className: _className,\n style: _style,\n illustration,\n icon,\n title,\n text,\n actions,\n ...rest\n}: EmptyMessageProps) => {\n const emptyMessageContent = (\n <Box\n {...rest}\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"1\"\n alignItems={{\n xs: \"center\",\n md: illustration ? \"flex-start\" : \"center\",\n }}\n >\n {icon && <NimbusIcon source={icon} />}\n <Title\n as={illustration ? \"h1\" : \"h4\"}\n textAlign={{\n xs: \"center\",\n md: \"left\"\n }}\n >\n {title}\n </Title>\n {text && <Text textAlign=\"center\">{text}</Text>}\n {actions && (\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n gap=\"4\"\n mt={illustration ? \"4\" : \"2\"}\n flexWrap=\"wrap\"\n >\n {actions}\n </Box>\n )}\n </Box>\n );\n return illustration ? (\n <Box\n display=\"flex\"\n flexDirection={{\n xs: \"column\",\n md: \"row\",\n }}\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n {illustration}\n {emptyMessageContent}\n </Box>\n ) : (\n emptyMessageContent\n );\n};\n\nEmptyMessage.displayName = \"EmptyMessage\";\n\nexport { EmptyMessage };\n","import { EmptyMessage } from \"./EmptyMessage\";\n\nexport { EmptyMessage } from \"./EmptyMessage\";\nexport type { EmptyMessageProps } from \"./emptyMessage.types\";\nexport default EmptyMessage;\n","import React from \"react\";\nimport { Box, Text, Icon, Label } from \"@nimbus-ds/components\";\n\nimport { FormFieldProps, FormFieldComponents } from \"./formField.types\";\nimport { helpTextAppearance } from \"./formField.definitions\";\n\nimport {\n FormFieldSelect,\n FormFieldTextarea,\n FormFieldInput,\n} from \"./components\";\n\nconst FormField: React.FC<FormFieldProps> & FormFieldComponents = ({\n label,\n helpText,\n helpIcon: IconSrc,\n appearance = \"none\",\n showHelpText = false,\n children,\n ...rest\n}: FormFieldProps) => (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"2\" width=\"100%\">\n {label && <Label htmlFor={rest.id}>{label}</Label>}\n {children}\n {showHelpText && (\n <Box display=\"inline-flex\" gap=\"1\">\n {IconSrc && (\n <Icon\n color={helpTextAppearance[appearance]}\n source={<IconSrc size={12} />}\n />\n )}\n {helpText && (\n <Text color={helpTextAppearance[appearance]} fontSize=\"caption\">\n {helpText}\n </Text>\n )}\n </Box>\n )}\n </Box>\n);\n\nFormField.displayName = \"FormField\";\n\nFormField.Select = FormFieldSelect;\nFormField.Textarea = FormFieldTextarea;\nFormField.Input = FormFieldInput;\nFormField.Select.displayName = \"FormField.Select\";\nFormField.Textarea.displayName = \"FormField.Textarea\";\nFormField.Input.displayName = \"FormField.Input\";\n\nexport { FormField };\n","import React from \"react\";\n\nimport { Input } from \"@nimbus-ds/components\";\n\nimport { FormField } from \"../../FormField\";\nimport { FormFieldInputProps } from \"./formFieldInput.types\";\nimport { inputAppearance } from \"../../formField.definitions\";\n\nconst FormFieldInput: React.FC<FormFieldInputProps> = ({\n label,\n helpText,\n helpIcon: IconSrc,\n appearance = \"none\",\n showHelpText = false,\n ...rest\n}) => (\n <FormField\n label={label}\n helpText={helpText}\n helpIcon={IconSrc}\n appearance={appearance}\n showHelpText={showHelpText}\n id={rest.id}\n >\n <Input {...rest} appearance={inputAppearance[appearance]} />\n </FormField>\n);\n\nexport { FormFieldInput };\n","import { FormFieldInput } from \"./FormFieldInput\";\n\nexport { FormFieldInput } from \"./FormFieldInput\";\nexport default FormFieldInput;\n","import React from \"react\";\n\nimport { Select } from \"@nimbus-ds/components\";\n\nimport { FormField } from \"../../FormField\";\nimport { FormFieldSelectProps } from \"./formFieldSelect.types\";\nimport { inputAppearance } from \"../../formField.definitions\";\n\nconst FormFieldSelect: React.FC<FormFieldSelectProps> = ({\n label,\n helpText,\n helpIcon: IconSrc,\n appearance = \"none\",\n showHelpText = false,\n ...rest\n}) => (\n <FormField\n label={label}\n helpText={helpText}\n helpIcon={IconSrc}\n appearance={appearance}\n showHelpText={showHelpText}\n id={rest.id}\n >\n <Select {...rest} appearance={inputAppearance[appearance]} />\n </FormField>\n);\n\nexport { FormFieldSelect };\n","import { FormFieldSelect } from \"./FormFieldSelect\";\n\nexport { FormFieldSelect } from \"./FormFieldSelect\";\nexport default FormFieldSelect;\n","import React from \"react\";\n\nimport { Textarea } from \"@nimbus-ds/components\";\n\nimport { FormField } from \"../../FormField\";\nimport { FormFieldTextareaProps } from \"./formFieldTextarea.types\";\nimport { inputAppearance } from \"../../formField.definitions\";\n\nconst FormFieldTextarea: React.FC<FormFieldTextareaProps> = ({\n label,\n helpText,\n helpIcon: IconSrc,\n appearance = \"none\",\n showHelpText = false,\n ...rest\n}) => (\n <FormField\n label={label}\n helpText={helpText}\n helpIcon={IconSrc}\n appearance={appearance}\n showHelpText={showHelpText}\n id={rest.id}\n >\n <Textarea {...rest} appearance={inputAppearance[appearance]} />\n </FormField>\n);\n\nexport { FormFieldTextarea };\n","import { FormFieldTextarea } from \"./FormFieldTextarea\";\n\nexport { FormFieldTextarea } from \"./FormFieldTextarea\";\nexport default FormFieldTextarea;\n","export * from \"./FormFieldSelect\";\nexport * from \"./FormFieldTextarea\";\nexport * from \"./FormFieldInput\";\n","export const inputAppearance = {\n danger: \"danger\",\n warning: \"warning\",\n success: \"success\",\n none: \"neutral\",\n} as {\n [key: string]: \"danger\" | \"warning\" | \"success\" | \"neutral\";\n};\n\nexport const helpTextAppearance = {\n danger: \"danger-textLow\",\n warning: \"warning-textLow\",\n success: \"success-textLow\",\n none: \"neutral-textLow\",\n} as {\n [key: string]:\n | \"danger-textLow\"\n | \"warning-textLow\"\n | \"success-textLow\"\n | \"neutral-textLow\";\n};\n","import { FormField } from \"./FormField\";\n\nexport { FormField } from \"./FormField\";\nexport type { FormFieldProps } from \"./formField.types\";\nexport default FormField;\n","import React from \"react\";\n\nimport { Box, Icon } from \"@nimbus-ds/components\";\nimport { QuestionCircleIcon } from \"@nimbus-ds/icons\";\n\nimport { HelpLinkProps } from \"./helpLink.types\";\n\nconst HelpLink: React.FC<HelpLinkProps> = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: HelpLinkProps) => (\n <Box\n {...rest}\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"2\"\n >\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n borderRadius=\"2\"\n width=\"2rem\"\n height=\"2rem\"\n minWidth=\"2rem\"\n minHeight=\"2rem\"\n backgroundColor=\"primary-surface\"\n >\n <Icon source={<QuestionCircleIcon />} color=\"primary-textLow\" />\n </Box>\n {children}\n </Box>\n);\n\nHelpLink.displayName = \"HelpLink\";\n\nexport { HelpLink };\n","import { HelpLink } from \"./HelpLink\";\n\nexport { HelpLink } from \"./HelpLink\";\nexport type { HelpLinkProps } from \"./helpLink.types\";\nexport default HelpLink;\n","import React from \"react\";\n\nimport { DataList } from \"@nimbus-ds/data-list\";\n\nimport {\n InteractiveListProps,\n InteractiveListComponents,\n} from \"./interactiveList.types\";\n\nimport {\n InteractiveListStructure,\n InteractiveListButtonItem,\n InteractiveListCheckboxItem,\n InteractiveListRadioItem,\n InteractiveListToggleItem,\n InteractiveListCheckboxItemSkeleton,\n InteractiveListStructureSkeleton,\n InteractiveListButtonItemSkeleton,\n InteractiveListRadioItemSkeleton,\n InteractiveListToggleItemSkeleton,\n} from \"./components\";\n\nconst InteractiveList: React.FC<InteractiveListProps> &\n InteractiveListComponents = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: InteractiveListProps) => (\n <DataList role=\"menu\" {...rest}>\n {children}\n </DataList>\n);\n\nInteractiveList.Structure = InteractiveListStructure;\nInteractiveList.StructureSkeleton = InteractiveListStructureSkeleton;\nInteractiveList.ButtonItem = InteractiveListButtonItem;\nInteractiveList.ButtonItemSkeleton = InteractiveListButtonItemSkeleton;\nInteractiveList.CheckboxItem = InteractiveListCheckboxItem;\nInteractiveList.CheckboxItemSkeleton = InteractiveListCheckboxItemSkeleton;\nInteractiveList.RadioItem = InteractiveListRadioItem;\nInteractiveList.RadioItemSkeleton = InteractiveListRadioItemSkeleton;\nInteractiveList.ToggleItem = InteractiveListToggleItem;\nInteractiveList.ToggleItemSkeleton = InteractiveListToggleItemSkeleton;\n\nInteractiveList.displayName = \"InteractiveList\";\nInteractiveList.Structure.displayName = \"InteractiveList.Structure\";\nInteractiveList.ButtonItem.displayName = \"InteractiveList.ButtonItem\";\nInteractiveList.CheckboxItem.displayName = \"InteractiveList.CheckboxItem\";\nInteractiveList.RadioItem.displayName = \"InteractiveList.RadioItem\";\nInteractiveList.ToggleItem.displayName = \"InteractiveList.ToggleItem\";\nInteractiveList.StructureSkeleton.displayName =\n \"InteractiveList.StructureSkeleton\";\nInteractiveList.ButtonItemSkeleton.displayName =\n \"InteractiveList.ButtonItemSkeleton\";\nInteractiveList.CheckboxItemSkeleton.displayName =\n \"InteractiveList.CheckboxItemSkeleton\";\nInteractiveList.RadioItemSkeleton.displayName =\n \"InteractiveList.RadioItemSkeleton\";\nInteractiveList.ToggleItemSkeleton.displayName =\n \"InteractiveList.ToggleItemSkeleton\";\n\nexport { InteractiveList };\n","import React from \"react\";\n\nimport { IconButton } from \"@nimbus-ds/components\";\nimport { ChevronRightIcon } from \"@nimbus-ds/icons\";\n\nimport { InteractiveListButtonItemProps } from \"./interactiveListButtonItem.types\";\nimport { InteractiveListStructure, InteractiveListRow } from \"..\";\nimport { generateID } from \"../../interactiveList.definitions\";\n\nconst InteractiveListButtonItem: React.FC<InteractiveListButtonItemProps> = ({\n className: _className,\n style: _style,\n iconButton,\n ...rest\n}: InteractiveListButtonItemProps) => {\n const itemID = generateID(rest.title);\n\n return (\n <InteractiveListRow\n alignItems=\"center\"\n role=\"menuitem\"\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n as=\"label\"\n htmlFor={itemID}\n topDivider={rest.topDivider}\n >\n <InteractiveListStructure {...rest} />\n <IconButton\n id={itemID}\n aria-label={rest.title}\n backgroundColor=\"transparent\"\n borderColor=\"transparent\"\n size=\"2rem\"\n source={<ChevronRightIcon />}\n {...iconButton}\n />\n </InteractiveListRow>\n );\n};\n\nexport { InteractiveListButtonItem };\n","import { InteractiveListButtonItem } from \"./InteractiveListButtonItem\";\n\nexport { InteractiveListButtonItem } from \"./InteractiveListButtonItem\";\nexport default InteractiveListButtonItem;\n","import React from \"react\";\n\nimport { IconButton } from \"@nimbus-ds/components\";\n\nimport { InteractiveListButtonItemSkeletonProps } from \"./interactiveListButtonItemSkeleton.types\";\nimport { InteractiveListRow } from \"..\";\nimport { InteractiveList } from \"../../InteractiveList\";\n\nconst InteractiveListButtonItemSkeleton: React.FC<\n InteractiveListButtonItemSkeletonProps\n> = ({\n className: _className,\n style: _style,\n ...rest\n}: InteractiveListButtonItemSkeletonProps) => (\n <InteractiveListRow>\n <InteractiveList.StructureSkeleton {...rest} />\n <IconButton.Skeleton />\n </InteractiveListRow>\n);\n\nexport { InteractiveListButtonItemSkeleton };\n","import { InteractiveListButtonItemSkeleton } from \"./InteractiveListButtonItemSkeleton\";\n\nexport { InteractiveListButtonItemSkeleton } from \"./InteractiveListButtonItemSkeleton\";\nexport default InteractiveListButtonItemSkeleton;\n","import React from \"react\";\n\nimport { Checkbox } from \"@nimbus-ds/components\";\n\nimport { InteractiveListCheckboxItemProps } from \"./interactiveListCheckboxItem.types\";\nimport { InteractiveListStructure, InteractiveListRow } from \"..\";\nimport { generateID } from \"../../interactiveList.definitions\";\n\nconst InteractiveListCheckboxItem: React.FC<\n InteractiveListCheckboxItemProps\n> = ({\n className: _className,\n style: _style,\n checkbox,\n ...rest\n}: InteractiveListCheckboxItemProps) => {\n const itemID = generateID(rest.title);\n\n return (\n <InteractiveListRow\n role=\"menuitemcheckbox\"\n aria-checked={checkbox.checked}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n as=\"label\"\n htmlFor={itemID}\n topDivider={rest.topDivider}\n >\n <Checkbox id={itemID} {...checkbox} />\n <InteractiveListStructure {...rest} />\n </InteractiveListRow>\n );\n};\n\nexport { InteractiveListCheckboxItem };\n","import { InteractiveListCheckboxItem } from \"./InteractiveListCheckboxItem\";\n\nexport { InteractiveListCheckboxItem } from \"./InteractiveListCheckboxItem\";\nexport default InteractiveListCheckboxItem;\n","import React from \"react\";\nimport { Skeleton } from \"@nimbus-ds/components\";\n\nimport { InteractiveListCheckboxItemSkeletonProps } from \"./interactiveListCheckboxItemSkeleton.types\";\nimport { InteractiveListRow } from \"..\";\nimport { InteractiveList } from \"../../InteractiveList\";\n\nconst InteractiveListCheckboxItemSkeleton: React.FC<\n InteractiveListCheckboxItemSkeletonProps\n> = ({\n className: _className,\n style: _style,\n ...rest\n}: InteractiveListCheckboxItemSkeletonProps) => (\n <InteractiveListRow role=\"menuitemcheckbox\">\n <Skeleton width=\"1rem\" height=\"1rem\" borderRadius=\"0.25rem\" />\n <InteractiveList.StructureSkeleton {...rest} />\n </InteractiveListRow>\n);\n\nexport { InteractiveListCheckboxItemSkeleton };\n","import { InteractiveListCheckboxItemSkeleton } from \"./InteractiveListCheckboxItemSkeleton\";\n\nexport { InteractiveListCheckboxItemSkeleton } from \"./InteractiveListCheckboxItemSkeleton\";\nexport default InteractiveListCheckboxItemSkeleton;\n","import React from \"react\";\n\nimport { Radio } from \"@nimbus-ds/components\";\n\nimport { InteractiveListRadioItemProps } from \"./interactiveListRadioItem.types\";\nimport { InteractiveListStructure, InteractiveListRow } from \"..\";\nimport { generateID } from \"../../interactiveList.definitions\";\n\nconst InteractiveListRadioItem: React.FC<InteractiveListRadioItemProps> = ({\n className: _className,\n style: _style,\n radio,\n ...rest\n}: InteractiveListRadioItemProps) => {\n const itemID = generateID(rest.title);\n\n return (\n <InteractiveListRow\n role=\"menuitemradio\"\n aria-checked={radio.checked}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n as=\"label\"\n htmlFor={itemID}\n topDivider={rest.topDivider}\n >\n <Radio id={itemID} {...radio} />\n <InteractiveListStructure {...rest} />\n </InteractiveListRow>\n );\n};\n\nexport { InteractiveListRadioItem };\n","import { InteractiveListRadioItem } from \"./InteractiveListRadioItem\";\n\nexport { InteractiveListRadioItem } from \"./InteractiveListRadioItem\";\nexport default InteractiveListRadioItem;\n","import React from \"react\";\nimport { Skeleton } from \"@nimbus-ds/components\";\n\nimport { InteractiveListRadioItemSkeletonProps } from \"./interactiveListRadioItemSkeleton.types\";\nimport { InteractiveListRow } from \"..\";\nimport { InteractiveList } from \"../../InteractiveList\";\n\nconst InteractiveListRadioItemSkeleton: React.FC<\n InteractiveListRadioItemSkeletonProps\n> = ({\n className: _className,\n style: _style,\n ...rest\n}: InteractiveListRadioItemSkeletonProps) => (\n <InteractiveListRow>\n <Skeleton width=\"1rem\" height=\"1rem\" borderRadius=\"0.75rem\" />\n <InteractiveList.StructureSkeleton {...rest} />\n </InteractiveListRow>\n);\n\nexport { InteractiveListRadioItemSkeleton };\n","import { InteractiveListRadioItemSkeleton } from \"./InteractiveListRadioItemSkeleton\";\n\nexport { InteractiveListRadioItemSkeleton } from \"./InteractiveListRadioItemSkeleton\";\nexport default InteractiveListRadioItemSkeleton;\n","import React from \"react\";\n\nimport { DataList } from \"@nimbus-ds/data-list\";\n\nimport { InteractiveListRowProps } from \"./interactiveListRow.types\";\n\nconst InteractiveListRow: React.FC<InteractiveListRowProps> = ({\n className: _className,\n style: _style,\n children,\n topDivider = true,\n ...rest\n}: InteractiveListRowProps) => (\n <DataList.Row\n flexDirection=\"row\"\n gap=\"2\"\n cursor=\"pointer\"\n alignItems=\"flex-start\"\n backgroundColor={{ hover: \"neutral-surface\" }}\n transitionDuration=\"fast\"\n transitionProperty=\"background-color\"\n transitionTimingFunction=\"ease-in-out\"\n boxShadow={{ focusWithin: \"focusRing\" }}\n borderWidth=\"none\"\n borderTopWidth={topDivider ? \"1\" : \"none\"}\n {...rest}\n >\n {children}\n </DataList.Row>\n);\n\nexport { InteractiveListRow };\n","import { InteractiveListRow } from \"./InteractiveListRow\";\n\nexport { InteractiveListRow } from \"./InteractiveListRow\";\nexport default InteractiveListRow;\n","import React from \"react\";\n\nimport { Box, Text } from \"@nimbus-ds/components\";\n\nimport { InteractiveListStructureProps } from \"./interactiveListStructure.types\";\n\nconst InteractiveListStructure: React.FC<InteractiveListStructureProps> = ({\n className: _className,\n style: _style,\n title,\n showTitle = true,\n description,\n children,\n ...rest\n}: InteractiveListStructureProps) => (\n <Box\n className={_className}\n style={_style}\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"1\"\n width=\"100%\"\n flex=\"1 1 auto\"\n {...rest}\n >\n {showTitle && <Text color=\"neutral-textHigh\">{title}</Text>}\n {description && (\n <Text fontSize=\"caption\" color=\"neutral-textLow\">\n {description}\n </Text>\n )}\n {children}\n </Box>\n);\n\nexport { InteractiveListStructure };\n","import { InteractiveListStructure } from \"./InteractiveListStructure\";\n\nexport { InteractiveListStructure } from \"./InteractiveListStructure\";\nexport default InteractiveListStructure;\n","import React from \"react\";\nimport { Box, Skeleton } from \"@nimbus-ds/components\";\n\nimport { InteractiveListStructureSkeletonProps } from \"./interactiveListStructureSkeleton.types\";\n\nconst InteractiveListStructureSkeleton: React.FC<\n InteractiveListStructureSkeletonProps\n> = ({\n className: _className,\n style: _style,\n title,\n showTitle = true,\n description,\n children,\n ...rest\n}: InteractiveListStructureSkeletonProps) => (\n <Box\n className={_className}\n style={_style}\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"1\"\n width=\"100%\"\n flex=\"1 1 auto\"\n {...rest}\n >\n {showTitle && (\n <Skeleton width=\"3rem\" height=\"1.25rem\" borderRadius=\"0.25rem\" />\n )}\n {description && (\n <Skeleton width=\"15rem\" height=\"1.25rem\" borderRadius=\"0.25rem\" />\n )}\n {children}\n </Box>\n);\n\nexport { InteractiveListStructureSkeleton };\n","import { InteractiveListStructureSkeleton } from \"./InteractiveListStructureSkeleton\";\n\nexport { InteractiveListStructureSkeleton } from \"./InteractiveListStructureSkeleton\";\nexport default InteractiveListStructureSkeleton;\n","import React from \"react\";\n\nimport { Toggle } from \"@nimbus-ds/components\";\n\nimport { InteractiveListToggleItemProps } from \"./interactiveListToggleItem.types\";\nimport { InteractiveListStructure, InteractiveListRow } from \"..\";\nimport { generateID } from \"../../interactiveList.definitions\";\n\nconst InteractiveListToggleItem: React.FC<InteractiveListToggleItemProps> = ({\n className: _className,\n style: _style,\n toggle,\n ...rest\n}: InteractiveListToggleItemProps) => {\n const itemID = generateID(rest.title);\n\n return (\n <InteractiveListRow\n role=\"menuitem\"\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n as=\"label\"\n htmlFor={itemID}\n topDivider={rest.topDivider}\n >\n <InteractiveListStructure {...rest} />\n <Toggle id={itemID} {...toggle} />\n </InteractiveListRow>\n );\n};\n\nexport { InteractiveListToggleItem };\n","import { InteractiveListToggleItem } from \"./InteractiveListToggleItem\";\n\nexport { InteractiveListToggleItem } from \"./InteractiveListToggleItem\";\nexport default InteractiveListToggleItem;\n","import React from \"react\";\nimport { Skeleton } from \"@nimbus-ds/components\";\n\nimport { InteractiveListToggleItemSkeletonProps } from \"./interactiveListToggleItemSkeleton.types\";\nimport { InteractiveListRow } from \"..\";\nimport { InteractiveList } from \"../../InteractiveList\";\n\nconst InteractiveListToggleItemSkeleton: React.FC<\n InteractiveListToggleItemSkeletonProps\n> = ({\n className: _className,\n style: _style,\n toggle,\n ...rest\n}: InteractiveListToggleItemSkeletonProps) => (\n <InteractiveListRow>\n <InteractiveList.StructureSkeleton {...rest} />\n <Skeleton\n width=\"2rem\"\n height=\"1rem\"\n borderRadius=\"0.5rem\"\n data-testid=\"toggle-skeleton\"\n />\n </InteractiveListRow>\n);\n\nexport { InteractiveListToggleItemSkeleton };\n","import { InteractiveListToggleItemSkeleton } from \"./InteractiveListToggleItemSkeleton\";\n\nexport { InteractiveListToggleItemSkeleton } from \"./InteractiveListToggleItemSkeleton\";\nexport default InteractiveListToggleItemSkeleton;\n","export * from \"./InteractiveListStructure\";\nexport * from \"./InteractiveListStructureSkeleton\";\nexport * from \"./InteractiveListCheckboxItem\";\nexport * from \"./InteractiveListCheckboxItemSkeleton\";\nexport * from \"./InteractiveListRadioItem\";\nexport * from \"./InteractiveListRadioItemSkeleton\";\nexport * from \"./InteractiveListToggleItem\";\nexport * from \"./InteractiveListToggleItemSkeleton\";\nexport * from \"./InteractiveListButtonItem\";\nexport * from \"./InteractiveListButtonItemSkeleton\";\nexport * from \"./InteractiveListRow\";\n","import { InteractiveList } from \"./InteractiveList\";\n\nexport { InteractiveList } from \"./InteractiveList\";\nexport type { InteractiveListProps } from \"./interactiveList.types\";\nexport default InteractiveList;\n","export const generateID = (name: string) =>\n `${name.toLowerCase().replace(/ /g, \"-\")}_${Math.floor(\n Math.random() * Date.now() + 1\n )}`;\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { LayoutSection } from \"./components\";\n\nimport { LayoutProps, LayoutComponents } from \"./layout.types\";\n\nimport { colQuantity } from \"./layout.definitions\";\n\nconst Layout: React.FC<LayoutProps> & LayoutComponents = ({\n className: _className,\n style: _style,\n children,\n columns = \"1\",\n ...rest\n}: LayoutProps) => (\n <Box\n {...rest}\n boxSizing=\"border-box\"\n display=\"grid\"\n gridTemplateColumns={{\n xs: \"1fr\",\n md: colQuantity[columns],\n }}\n gridGap={rest.gap || \"4\"}\n >\n {children}\n </Box>\n);\n\nLayout.Section = LayoutSection;\n\nLayout.displayName = \"Layout\";\nLayout.Section.displayName = \"Layout.Section\";\n\nexport { Layout };\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { LayoutSectionProps } from \"./layoutSection.types\";\n\nconst LayoutSection: React.FC<LayoutSectionProps> = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: LayoutSectionProps) => (\n <Box\n {...rest}\n boxSizing=\"border-box\"\n display=\"flex\"\n flexDirection=\"column\"\n gap={rest.gap || \"4\"}\n >\n {children}\n </Box>\n);\n\nexport { LayoutSection };\n","import { LayoutSection } from \"./LayoutSection\";\n\nexport { LayoutSection } from \"./LayoutSection\";\nexport default LayoutSection;\n","export * from \"./LayoutSection\";\n","import { Layout } from \"./Layout\";\n\nexport { Layout } from \"./Layout\";\nexport type { LayoutProps } from \"./layout.types\";\nexport default Layout;\n","export const colQuantity = {\n \"1\": \"1fr\",\n \"2 - asymmetric\": \"2fr 1fr\",\n \"2 - symmetric\": \"1fr 1fr\",\n \"3\": \"1fr 1fr 1fr\",\n} as {\n [key: string]: \"1fr\" | \"2fr 1fr\" | \"1fr 1fr\" | \"1fr 1fr 1fr\";\n};\n","import React from \"react\";\nimport { Box } from \"@nimbus-ds/components\";\nimport { MenuButton } from \"@nimbus-ds/menubutton\";\n\nimport { MenuProps, MenuComponents } from \"./menu.types\";\nimport { MenuSection, MenuHeader, MenuBody, MenuFooter } from \"./components\";\n\nconst Menu: React.FC<MenuProps> & MenuComponents = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: MenuProps) => (\n <Box\n {...rest}\n display=\"flex\"\n flexDirection=\"column\"\n flex=\"0 0 auto\"\n height=\"100%\"\n backgroundColor=\"neutral-background\"\n width=\"100%\"\n boxSizing=\"border-box\"\n >\n {children}\n </Box>\n );\n\nMenu.Section = MenuSection;\nMenu.Button = MenuButton;\nMenu.ButtonAccordion = MenuButton?.Accordion;\nMenu.Header = MenuHeader;\nMenu.Body = MenuBody;\nMenu.Footer = MenuFooter;\n\nMenu.displayName = \"Menu\";\nMenu.Section.displayName = \"Menu.Section\";\nMenu.Header.displayName = \"Menu.Header\";\nMenu.Body.displayName = \"Menu.Body\";\nMenu.Footer.displayName = \"Menu.Footer\";\n\nexport { Menu };\n","import React from \"react\";\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { MenuBodyProps } from \"./menuBody.types\";\n\nconst MenuBody: React.FC<MenuBodyProps> = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: MenuBodyProps) => (\n <Box\n {...rest}\n display=\"flex\"\n flexDirection=\"column\"\n flex=\"1 1 auto\"\n gap=\"2\"\n paddingX=\"2\"\n paddingY=\"4\"\n width=\"100%\"\n overflowY=\"auto\"\n boxSizing=\"border-box\"\n >\n {children}\n </Box>\n);\n\nexport { MenuBody };\n","import { MenuBody } from \"./MenuBody\";\n\nexport { MenuBody } from \"./MenuBody\";\nexport default MenuBody;\n","import React from \"react\";\nimport { ChevronRightIcon } from \"@nimbus-ds/icons\";\nimport { Box, Icon } from \"@nimbus-ds/components\";\nimport { MenuButton } from \"@nimbus-ds/menubutton\";\n\nimport { MenuFooterProps } from \"./menuFooter.types\";\n\nconst MenuFooter: React.FC<MenuFooterProps> = ({\n className: _className,\n style: _style,\n ...rest\n}: MenuFooterProps) => {\n const activeColor = rest.active ? \"primary-interactive\" : \"primary-textHigh\";\n const disabledColor = rest.disabled ? \"neutral-textDisabled\" : activeColor;\n\n return (\n <Box\n boxSizing=\"border-box\"\n display=\"flex\"\n flex=\"0 1 auto\"\n paddingX=\"2\"\n paddingY=\"4\"\n width=\"100%\"\n >\n <MenuButton {...rest}>\n <Icon source={<ChevronRightIcon />} color={disabledColor} />\n </MenuButton>\n </Box>\n );\n};\n\nexport { MenuFooter };\n","import { MenuFooter } from \"./MenuFooter\";\n\nexport { MenuFooter } from \"./MenuFooter\";\nexport default MenuFooter;\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { MenuHeaderProps } from \"./menuHeader.types\";\n\nconst MenuHeader: React.FC<MenuHeaderProps> = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: MenuHeaderProps) => (\n <Box\n {...rest}\n boxSizing=\"border-box\"\n display=\"flex\"\n flex=\"0 1 auto\"\n padding=\"4\"\n width=\"100%\"\n >\n {children}\n </Box>\n);\n\nexport { MenuHeader };\n","import { MenuHeader } from \"./MenuHeader\";\n\nexport { MenuHeader } from \"./MenuHeader\";\nexport default MenuHeader;\n","import React from \"react\";\n\nimport { Text, Box } from \"@nimbus-ds/components\";\n\nimport { MenuSectionProps } from \"./menuSection.types\";\n\nconst MenuSection: React.FC<MenuSectionProps> = ({\n className: _className,\n style: _style,\n title,\n children,\n ...rest\n}: MenuSectionProps) => (\n <Box {...rest} display=\"flex\" flexDirection=\"column\" gap=\"2\">\n {title && (\n <Box pl=\"2\" pt=\"2\">\n <Text color=\"neutral-textHigh\" fontSize=\"caption\">\n {title}\n </Text>\n </Box>\n )}\n {children}\n </Box>\n);\n\nexport { MenuSection };\n","import { MenuSection } from \"./MenuSection\";\n\nexport { MenuSection } from \"./MenuSection\";\nexport default MenuSection;\n","export * from \"./MenuHeader\";\nexport * from \"./MenuBody\";\nexport * from \"./MenuFooter\";\nexport * from \"./MenuSection\";\n","import { Menu } from \"./Menu\";\n\nexport { Menu } from \"./Menu\";\nexport type { MenuProps } from \"./menu.types\";\nexport default Menu;\n","import React, { ComponentPropsWithRef, forwardRef } from \"react\";\n\nimport { Text, Icon, Box } from \"@nimbus-ds/components\";\nimport { PolymorphicForwardRefComponent } from \"@nimbus-ds/typings\";\n\nimport { MenuButtonBaseProps, MenuButtonComponents } from \"./menuButton.types\";\nimport { MenuButtonAccordion } from \"./components\";\n\nconst MenuButton = forwardRef(\n (\n {\n className: _className,\n style: _style,\n label,\n onClick,\n startIcon: IconSrc,\n children,\n active = false,\n as = \"button\",\n ...rest\n }: MenuButtonBaseProps & { as: any },\n ref\n ) => {\n const activeColor = active ? \"primary-interactive\" : \"primary-textHigh\";\n const disabledColor = rest.disabled ? \"neutral-textDisabled\" : activeColor;\n\n return (\n <Box\n {...rest}\n ref={ref}\n as={as}\n type=\"button\"\n onClick={onClick}\n alignItems=\"center\"\n textDecoration=\"none\"\n backgroundColor={{\n xs: active ? \"primary-surface\" : \"transparent\",\n hover: \"primary-surface\",\n active: \"primary-surfaceHighlight\",\n disabled: \"neutral-surfaceDisabled\",\n }}\n boxShadow={{\n focus: \"focusRing\",\n }}\n borderRadius=\"2\"\n borderWidth=\"none\"\n cursor={{\n xs: \"pointer\",\n disabled: \"not-allowed\",\n }}\n display=\"flex\"\n gap=\"2\"\n padding=\"2\"\n width=\"100%\"\n transitionProperty=\"all\"\n transitionDuration=\"base\"\n transitionTimingFunction=\"ease-in-out\"\n >\n {IconSrc && <Icon color={disabledColor} source={<IconSrc />} />}\n <Box display=\"inline-flex\" flex=\"1\">\n <Text fontSize=\"base\" color={disabledColor}>\n {label}\n </Text>\n </Box>\n {children}\n </Box>\n );\n }\n) as PolymorphicForwardRefComponent<\"button\" | \"a\", MenuButtonBaseProps> &\n MenuButtonComponents;\n\nMenuButton.Accordion = MenuButtonAccordion;\n\nMenuButton.displayName = \"MenuButton\";\nMenuButton.Accordion.displayName = \"MenuButton.Accordion\";\n\nexport type MenuButtonProps = ComponentPropsWithRef<typeof MenuButton>;\nexport { MenuButton };\n","import React, {\n ComponentPropsWithRef,\n forwardRef,\n useMemo,\n useState,\n} from \"react\";\nimport { Box } from \"@nimbus-ds/components\";\nimport { PolymorphicForwardRefComponent } from \"@nimbus-ds/typings\";\n\nimport { MenuButtonAccordionBaseProps } from \"./menuButtonAccordion.types\";\nimport { MenuButton } from \"../../MenuButton\";\n\nconst MenuButtonAccordion = forwardRef(\n (\n {\n className: _className,\n style: _style,\n open: controlledOpen,\n active,\n menuButton,\n children,\n as,\n ...rest\n }: MenuButtonAccordionBaseProps & { as: any },\n ref\n ) => {\n const [isOpen, setOpen] = useState(false);\n const handleOpen = () => setOpen((prevState) => !prevState);\n\n const open = useMemo(\n () => (controlledOpen === undefined ? isOpen : controlledOpen),\n [controlledOpen, isOpen]\n );\n\n const getBackgroundColor = () => {\n if (active) {\n return \"primary-surface\";\n }\n return open ? \"neutral-surface\" : \"transparent\";\n };\n\n return (\n <Box\n {...rest}\n ref={ref}\n as={as}\n backgroundColor={getBackgroundColor()}\n borderRadius=\"2\"\n zIndex={open ? \"100\" : undefined}\n textDecoration=\"none\"\n >\n <MenuButton\n {...menuButton}\n onClick={\n controlledOpen !== undefined ? menuButton.onClick : handleOpen\n }\n active={active}\n aria-expanded={open}\n />\n {open && (\n <Box\n id=\"content-1\"\n aria-hidden={!open}\n height={open ? \"auto\" : \"0\"}\n overflow=\"hidden\"\n pl=\"6\"\n pt=\"1\"\n pb=\"1\"\n pr=\"1\"\n >\n {children}\n </Box>\n )}\n </Box>\n );\n }\n) as PolymorphicForwardRefComponent<\n \"button\" | \"a\",\n MenuButtonAccordionBaseProps\n>;\n\nMenuButtonAccordion.displayName = \"MenuButtonAccordion\";\nexport type MenuButtonAccordionProps = ComponentPropsWithRef<\n typeof MenuButtonAccordion\n>;\n\nexport { MenuButtonAccordion };\n","import { MenuButtonAccordion } from \"./MenuButtonAccordion\";\n\nexport { MenuButtonAccordion } from \"./MenuButtonAccordion\";\nexport type { MenuButtonAccordionProperties } from \"./menuButtonAccordion.types\";\nexport type { MenuButtonAccordionProps } from \"./MenuButtonAccordion\";\nexport default MenuButtonAccordion;\n","export * from \"./MenuButtonAccordion\";\n","import { MenuButton } from \"./MenuButton\";\n\nexport { MenuButton } from \"./MenuButton\";\nexport type { MenuButtonProperties } from \"./menuButton.types\";\nexport type { MenuButtonProps } from \"./MenuButton\";\nexport default MenuButton;\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { NavTabsProps, NavTabsComponents } from \"./navTabs.types\";\n\nimport { NavTabsItem } from \"./components\";\n\nconst NavTabs: React.FC<NavTabsProps> & NavTabsComponents = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: NavTabsProps) => (\n <Box\n {...rest}\n className={_className}\n style={_style}\n alignItems=\"center\"\n backgroundColor=\"neutral-background\"\n borderStyle=\"solid\"\n borderWidth=\"none\"\n borderTopWidth=\"1\"\n borderColor=\"neutral-surfaceHighlight\"\n bottom=\"0\"\n display=\"flex\"\n justifyContent=\"space-between\"\n left=\"0\"\n position=\"fixed\"\n px=\"4\"\n py=\"2\"\n width=\"100%\"\n zIndex=\"500\"\n >\n {children}\n </Box>\n);\n\nNavTabs.Item = NavTabsItem;\n\nNavTabs.displayName = \"NavTabs\";\nNavTabs.Item.displayName = \"NavTabs.Item\";\n\nexport { NavTabs };\n","import React from \"react\";\n\nimport { Icon, Box } from \"@nimbus-ds/components\";\n\nimport { NavTabsItemProps } from \"./navTabsItem.types\";\n\nconst NavTabsItem: React.FC<NavTabsItemProps> = ({\n className: _className,\n style: _style,\n icon,\n active = false,\n badge = false,\n onClick,\n ariaLabel,\n ...rest\n}: NavTabsItemProps) => (\n <Box\n {...rest}\n className={_className}\n style={_style}\n backgroundColor={active ? \"primary-surface\" : \"transparent\"}\n borderColor=\"transparent\"\n borderRadius=\"2\"\n cursor=\"pointer\"\n as=\"button\"\n type=\"button\"\n p=\"2-5\"\n position=\"relative\"\n onClick={onClick}\n aria-label={ariaLabel}\n >\n <Icon\n source={icon}\n color={active ? \"primary-interactive\" : \"primary-textLow\"}\n />\n {badge && (\n <Box\n borderRadius=\"full\"\n backgroundColor=\"primary-interactive\"\n height=\".25rem\"\n position=\"absolute\"\n right=\".25rem\"\n top=\".25rem\"\n width=\".25rem\"\n />\n )}\n </Box>\n);\n\nexport { NavTabsItem };\n","import { NavTabsItem } from \"./NavTabsItem\";\n\nexport { NavTabsItem } from \"./NavTabsItem\";\nexport default NavTabsItem;\n","export * from \"./NavTabsItem\";\n","import { NavTabs } from \"./NavTabs\";\n\nexport { NavTabs } from \"./NavTabs\";\nexport type { NavTabsProps } from \"./navTabs.types\";\nexport default NavTabs;\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { PageComponents, PageProps } from \"./page.types\";\nimport { PageBody, PageHeader } from \"./components\";\n\nconst Page: React.FC<PageProps> & PageComponents = ({\n className: _className,\n style: _style,\n children,\n maxWidth = \"1200px\",\n ...rest\n}: PageProps) => (\n <Box as=\"main\" {...rest} width=\"100%\" maxWidth={maxWidth} marginX=\"auto\">\n {children}\n </Box>\n);\n\nPage.Header = PageHeader;\nPage.Body = PageBody;\n\nPage.displayName = \"Page\";\nPage.Header.displayName = \"Page.Header\";\nPage.Body.displayName = \"Page.Body\";\n\nexport { Page };\n","import React from \"react\";\n\nimport { Box } from \"@nimbus-ds/components\";\n\nimport { PageBodyProps } from \"./pageBody.types\";\n\nconst PageBody: React.FC<PageBodyProps> = ({\n className: _className,\n style: _style,\n children,\n ...rest\n}: PageBodyProps) => (\n <Box as=\"section\" paddingY=\"4\" paddingX=\"6\" {...rest}>\n {children}\n </Box>\n);\n\nexport { PageBody };\n","import { PageBody } from \"./PageBody\";\n\nexport { PageBody } from \"./PageBody\";\nexport default PageBody;\n","import React from \"react\";\n\nimport { Box, Title, Text } from \"@nimbus-ds/components\";\n\nimport { PageHeaderProps } from \"./pageHeader.types\";\n\nconst PageHeader: React.FC<PageHeaderProps> = ({\n className: _className,\n style: _style,\n title,\n subtitle,\n buttonStack,\n children,\n ...rest\n}: PageHeaderProps) => (\n <Box\n as=\"header\"\n paddingY=\"4\"\n paddingX=\"6\"\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"4\"\n {...rest}\n >\n <Box display=\"flex\" alignItems=\"center\" gap=\"2\">\n <Box display=\"inline-flex\" flex=\"1\">\n <Title as=\"h1\">{title}</Title>\n </Box>\n {buttonStack}\n </Box>\n {subtitle && (\n <Text color=\"neutral-textHigh\" fontSize=\"base\">\n {subtitle}\n </Text>\n )}\n {children}\n </Box>\n);\n\nexport { PageHeader };\n","import { PageHeader } from \"./PageHeader\";\n\nexport { PageHeader } from \"./PageHeader\";\nexport default PageHeader;\n","export * from \"./PageHeader\";\nexport * from \"./PageBody\";\n","import { Page } from \"./Page\";\n\nexport { Page } from \"./Page\";\nexport type { PageProps } from \"./page.types\";\nexport default Page;\n","import React, { useState } from \"react\";\n\nimport {\n Text,\n Link,\n Box,\n IconButton,\n Icon,\n Popover,\n} from \"@nimbus-ds/components\";\nimport { CloseIcon } from \"@nimbus-ds/icons\";\nimport { ProductUpdatesProps } from \"./productUpdates.types\";\n\nconst ProductUpdates: React.FC<ProductUpdatesProps> = ({\n className: _className,\n style: _style,\n title,\n text,\n bodyContent,\n dismissLink,\n ...rest\n}: ProductUpdatesProps) => {\n const [visible, setVisibility] = useState(!!rest.visible);\n\n const handleVisibility = () => setVisibility(!visible);\n\n const productUpdatesContent = (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"2\" width=\"100%\">\n <Text color=\"neutral-background\" fontSize=\"base\" fontWeight=\"bold\">\n {title}\n </Text>\n <Text color=\"neutral-background\" fontSize=\"base\">\n {text}\n </Text>\n </Box>\n );\n\n const hasDismissLink = dismissLink ? (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"4\" width=\"100%\">\n {productUpdatesContent}\n {bodyContent}\n <Link\n as=\"button\"\n onClick={\n rest?.onVisibility\n ? () => rest?.onVisibility?.(false)\n : handleVisibility\n }\n appearance=\"neutral-background\"\n >\n {dismissLink}\n </Link>\n </Box>\n ) : (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"4\" width=\"100%\">\n <Box pr=\"8\" position=\"relative\">\n {productUpdatesContent}\n <Box position=\"absolute\" top=\"-16px\" right=\"-16px\">\n <IconButton\n onClick={\n rest?.onVisibility\n ? () => rest?.onVisibility?.(false)\n : handleVisibility\n }\n size=\"2.75rem\"\n source={<Icon color=\"neutral-background\" source={<CloseIcon />} />}\n borderColor=\"transparent\"\n backgroundColor=\"transparent\"\n />\n </Box>\n </Box>\n {bodyContent}\n </Box>\n );\n\n return (\n <Popover\n {...rest}\n backgroundColor=\"primary-interactiveHover\"\n content={hasDismissLink}\n visible={rest.visible === undefined ? visible : rest.visible}\n onVisibility={\n rest.onVisibility ||\n ((newVisible: boolean) => setVisibility(newVisible))\n }\n enabledDismiss={false}\n enabledClick={false}\n />\n );\n};\n\nProductUpdates.displayName = \"ProductUpdates\";\n\nexport { ProductUpdates };\n","import { ProductUpdates } from \"./ProductUpdates\";\n\nexport { ProductUpdates } from \"./ProductUpdates\";\nexport type { ProductUpdatesProps } from \"./productUpdates.types\";\nexport default ProductUpdates;\n","import React from \"react\";\nimport { Sidebar, Box, Title, Button } from \"@nimbus-ds/components\";\n\nimport { SideModalProps } from \"./sideModal.types\";\n\nconst SideModal: React.FC<SideModalProps> = ({\n title,\n titleAction,\n headerAction,\n headerIcon,\n paddingHeader,\n paddingBody,\n paddingFooter,\n footer,\n children,\n ...rest\n}) => (\n <Sidebar {...rest}>\n <Sidebar.Header padding={paddingHeader || \"base\"}>\n <Box\n display=\"flex\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n mb=\"4\"\n >\n {headerAction}\n {headerIcon}\n </Box>\n <Box display=\"flex\" justifyContent=\"space-between\" alignItems=\"center\">\n <Title color=\"primary-textHigh\" as=\"h1\">\n {title}\n </Title>\n {titleAction}\n </Box>\n </Sidebar.Header>\n <Sidebar.Body padding={paddingBody}>{children}</Sidebar.Body>\n {!!footer && (\n <Sidebar.Footer padding={paddingFooter || \"base\"}>\n <Button {...footer.primaryAction} />\n <Button {...footer.secondaryAction} />\n </Sidebar.Footer>\n )}\n </Sidebar>\n);\n\nSideModal.displayName = \"SideModal\";\n\nexport { SideModal };\n","import { SideModal } from \"./SideModal\";\n\nexport { SideModal } from \"./SideModal\";\nexport type { SideModalProps } from \"./sideModal.types\";\nexport default SideModal;\n","import React from \"react\";\n\nimport { Thumbnail, Box } from \"@nimbus-ds/components\";\n\nimport { ThumbnailWithActionProps } from \"./thumbnailWithAction.types\";\n\nimport { contentPositions } from \"./thumbnailWithAction.definitions\";\n\nconst ThumbnailWithAction: React.FC<ThumbnailWithActionProps> = ({\n className: _className,\n style: _style,\n thumbnail,\n children,\n contentPosition = \"top-right\",\n ...rest\n}: ThumbnailWithActionProps) => {\n const { top, left, right, bottom } = contentPositions[contentPosition];\n\n return (\n <Box\n position=\"relative\"\n width=\"fit-content\"\n borderRadius=\"2\"\n overflow=\"hidden\"\n >\n <Box\n {...rest}\n style={_style}\n className={_className}\n position=\"absolute\"\n zIndex=\"100\"\n top={top}\n left={left}\n right={right}\n bottom={bottom}\n p=\"2\"\n >\n {children}\n </Box>\n <Thumbnail {...thumbnail} />\n </Box>\n );\n};\n\nThumbnailWithAction.displayName = \"ThumbnailWithAction\";\n\nexport { ThumbnailWithAction };\n","import { ThumbnailWithAction } from \"./ThumbnailWithAction\";\n\nexport { ThumbnailWithAction } from \"./ThumbnailWithAction\";\nexport type { ThumbnailWithActionProps } from \"./thumbnailWithAction.types\";\nexport default ThumbnailWithAction;\n","export const contentPositions = {\n \"top-left\": { top: \"0\", left: \"0\", right: undefined, bottom: undefined },\n \"top-right\": { top: \"0\", left: undefined, right: \"0\", bottom: undefined },\n \"bottom-left\": { top: undefined, left: \"0\", right: undefined, bottom: \"0\" },\n \"bottom-right\": { top: undefined, left: undefined, right: \"0\", bottom: \"0\" },\n};\n","// components\nexport * from \"@nimbus-ds/app-shell\";\nexport * from \"@nimbus-ds/callout-card\";\nexport * from \"@nimbus-ds/data-list\";\nexport * from \"@nimbus-ds/data-table\";\nexport * from \"@nimbus-ds/editor\";\nexport * from \"@nimbus-ds/empty-message\";\nexport * from \"@nimbus-ds/formfield\";\nexport * from \"@nimbus-ds/help-link\";\nexport * from \"@nimbus-ds/interactive-list\";\nexport * from \"@nimbus-ds/layout\";\nexport * from \"@nimbus-ds/menu\";\nexport * from \"@nimbus-ds/menubutton\";\nexport * from \"@nimbus-ds/nav-tabs\";\nexport * from \"@nimbus-ds/page\";\nexport * from \"@nimbus-ds/productupdates\";\nexport * from \"@nimbus-ds/sidemodal\";\nexport * from \"@nimbus-ds/thumbnail-with-action\";\nexport * from \"@nimbus-ds/calendar\";\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","module.exports = __WEBPACK_EXTERNAL_MODULE__floating_ui_react__;","module.exports = __WEBPACK_EXTERNAL_MODULE__nimbus_ds_components__;","module.exports = __WEBPACK_EXTERNAL_MODULE__nimbus_ds_icons__;","module.exports = __WEBPACK_EXTERNAL_MODULE__nimbus_ds_styles__;","module.exports = __WEBPACK_EXTERNAL_MODULE_date_fns__;","module.exports = __WEBPACK_EXTERNAL_MODULE_lexical__;","module.exports = __WEBPACK_EXTERNAL_MODULE_react__;","module.exports = __WEBPACK_EXTERNAL_MODULE_react_day_picker__;","module.exports = __WEBPACK_EXTERNAL_MODULE_react_dom__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/index.ts\");\n"],"names":["root","factory","exports","module","require","define","amd","global","__WEBPACK_EXTERNAL_MODULE_react__","__WEBPACK_EXTERNAL_MODULE__nimbus_ds_components__","__WEBPACK_EXTERNAL_MODULE__nimbus_ds_icons__","__WEBPACK_EXTERNAL_MODULE__nimbus_ds_styles__","__WEBPACK_EXTERNAL_MODULE_lexical__","__WEBPACK_EXTERNAL_MODULE_react_dom__","__WEBPACK_EXTERNAL_MODULE__floating_ui_react__","__WEBPACK_EXTERNAL_MODULE_react_day_picker__","__WEBPACK_EXTERNAL_MODULE_date_fns__","html","selection","utils","lexical","CAN_USE_DOM","window","document","createElement","getDOMSelection","targetWindow","getSelection","$getHtmlContent","editor","$getSelection","Error","$isRangeSelection","isCollapsed","getNodes","length","$generateHtmlFromNodes","$getLexicalContent","JSON","stringify","$generateJSONFromSelectedNodes","$insertGeneratedNodes","nodes","DEPRECATED_$isGridSelection","$findMatchingParent","anchor","getNode","n","DEPRECATED_$isGridCellNode","focus","DEPRECATED_$isGridNode","isFromLexical","newGrid","newGridRows","getChildren","newColumnCount","getFirstChildOrThrow","getChildrenSize","newRowCount","gridCellNode","gridRowNode","DEPRECATED_$isGridRowNode","gridNode","startY","getIndexWithinParent","stopY","Math","min","startX","stopX","fromX","fromY","toX","max","toY","gridRowNodes","newAnchorCellKey","newFocusCellKey","newRowIdx","r","currentGridRowNode","newGridRowNode","gridCellNodes","newGridCellNodes","newColumnIdx","c","currentGridCellNode","newGridCellNode","getKey","originalChildren","forEach","child","$isTextNode","$createParagraphNode","append","remove","newGridSelection","DEPRECATED_$createGridSelection","set","$setSelection","dispatchCommand","SELECTION_CHANGE_COMMAND","undefined","$mergeGridNodesStrategy","topLevelBlocks","currentBlock","i","node","isLineBreakNode","$isLineBreakNode","$isDecoratorNode","isInline","$isElementNode","isParentRequired","createParentElementNode","push","insertNodes","anchorCell","$basicInsertStrategy","$appendNodesToJSON","selection$1","currentNode","targetArray","shouldInclude","isSelected","shouldExclude","excludeFromCopy","target","clone","$cloneWithProperties","$sliceSelectedTextNodeContent","children","serializedNode","exportJSON","nodeClass","constructor","type","getType","name","serializedChildren","Array","isArray","exportNodeToJSON","text","__text","childNode","shouldIncludeChild","extractWithChild","serializedChildNode","topLevelChildren","$getRoot","namespace","_config","$generateNodesFromSerializedNodes","serializedNodes","$parseSerializedNode","$addNodeStyle","clipboardEventTimeout","$copyToClipboardEvent","event","domSelection","_window","anchorDOM","anchorNode","focusDOM","focusNode","isSelectionWithinEditor","preventDefault","clipboardData","htmlString","lexicalString","plainString","getTextContent","setData","$insertDataTransferForPlainText","dataTransfer","getData","insertRawText","$insertDataTransferForRichText","payload","parse","dom","DOMParser","parseFromString","$generateNodesFromDOM","parts","split","partsLength","part","insertParagraph","$createTabNode","insertText","copyToClipboard","async","Promise","resolve","reject","update","rootElement","getRootElement","windowDocument","element","style","cssText","createTextNode","range","Range","setStart","setEnd","removeAllRanges","addRange","removeListener","registerCommand","COPY_COMMAND","secondEvent","objectKlassEquals","ClipboardEvent","clearTimeout","COMMAND_PRIORITY_CRITICAL","setTimeout","execCommand","LexicalClipboard","registerDragonSupport","origin","location","handler","activeElement","data","parsedData","e","protocol","functionId","args","elementStart","elementLength","selStart","selLength","formatCommand","setSelStart","setSelEnd","setTextNodeRange","anchorNodeTextLength","getTextContentSize","stopImmediatePropagation","addEventListener","removeEventListener","LexicalDragon","HISTORY_MERGE","HISTORY_PUSH","DISCARD_HISTORY_CANDIDATE","OTHER","COMPOSING_CHARACTER","INSERT_CHARACTER_AFTER_SELECTION","DELETE_CHARACTER_BEFORE_SELECTION","DELETE_CHARACTER_AFTER_SELECTION","getChangeType","prevEditorState","nextEditorState","dirtyLeavesSet","dirtyElementsSet","isComposing","size","nextSelection","_selection","prevSelection","dirtyNodes","editorState","dirtyLeaves","dirtyElements","nodeMap","_nodeMap","dirtyLeafKey","dirtyLeaf","get","dirtyElementKey","intentionallyMarkedAsDirty","dirtyElement","$isRootNode","getDirtyNodes","nextNodeMap","nextAnchorNode","key","prevAnchorNode","has","__key","offset","nextDirtyNode","prevDirtyNode","__mode","prevText","nextText","nextAnchor","prevAnchor","nextAnchorOffset","prevAnchorOffset","textDiff","createMergeActionGetter","delay","prevChangeTime","Date","now","prevChangeType","currentHistoryEntry","tags","changeTime","changeType","mergeAction","isSameEditor","shouldPushHistory","prevNode","nextNode","isDeletingLine","__type","__detail","__style","__format","__parent","isTextNodeUnchanged","from","clearHistory","historyState","undoStack","redoStack","current","createEmptyHistoryState","registerHistory","getMergeAction","applyChange","currentEditorState","CAN_REDO_COMMAND","CAN_UNDO_COMMAND","unregisterCommandListener","mergeRegister","UNDO_COMMAND","historyStateEntry","pop","setEditorState","tag","undo","COMMAND_PRIORITY_EDITOR","REDO_COMMAND","redo","CLEAR_EDITOR_COMMAND","CLEAR_HISTORY_COMMAND","registerUpdateListener","unregisterUpdateListener","LexicalHistory","$appendNodesToHTML","parentElement","after","exportDOM","fragment","createDocumentFragment","isHTMLElement","newElement","call","replaceWith","IGNORE_TAGS","Set","$createNodesFromDOM","forChildMap","Map","parentLexicalNode","lexicalNodes","nodeName","currentLexicalNode","transformFunction","domNode","cachedConversions","_htmlConversions","toLowerCase","currentConversion","cachedConversion","domConversion","priority","conversion","getConversionFunction","transformOutput","postTransform","transformNodes","forChildFunction","forChild","childNodes","childLexicalNodes","concat","container","innerHTML","elements","body","lexicalNode","LexicalHtml","SUPPORTED_URL_PROTOCOLS","LinkNode","ElementNode","static","__url","rel","__rel","__target","title","__title","url","attributes","super","this","createDOM","config","href","sanitizeUrl","addClassNamesToElement","theme","link","updateDOM","removeAttribute","a","convertAnchorElement","$createLinkNode","setFormat","format","setIndent","indent","setDirection","direction","parsedUrl","URL","getRel","getTarget","getTitle","getURL","version","getLatest","setURL","getWritable","setTarget","setRel","setTitle","insertNewAfter","restoreSelection","getParentOrThrow","linkNode","canInsertTextBefore","canInsertTextAfter","canBeEmpty","destination","isParentOf","isHTMLAnchorElement","content","textContent","getAttribute","$applyNodeReplacement","$isLinkNode","AutoLinkNode","$createAutoLinkNode","_rel","TOGGLE_LINK_COMMAND","createCommand","$isAutoLinkNode","toggleLink","extract","parent","getParent","insertBefore","firstNode","predicate","$getAncestor","prevParent","is","getPreviousSibling","insertAfter","LexicalLink","$getListDepth","listNode","depth","$isListItemNode","parentList","$isListNode","$getTopListNode","listItem","list","$getAllListItems","listItemNodes","listChildren","filter","listItemNode","firstChild","getFirstChild","isNestedListNode","wrapInListItem","$createListItemNode","$isSelectingEmptyListItem","$getListItemValue","value","getStart","siblings","getPreviousSiblings","sibling","nodesToAppend","splice","createListOrMerge","listType","previousSibling","nextSibling","getNextSibling","getFormatType","getIndent","getListType","$createListNode","replace","updateChildrenListItemValue","mergeLists","list1","list2","listItem1","getLastChild","listItem2","toMerge","childrenOrExisting","prevValue","getValue","nextValue","setValue","$handleIndent","removed","innerList","nextInnerList","add","newListItem","newList","$handleOutdent","grandparentListItem","greatGrandparentList","lastChild","isEmpty","previousSiblingsListItem","previousSiblingsList","nextSiblingsListItem","nextSiblingsList","getNextSiblings","ListItemNode","__value","__checked","checked","updateListItemChecked","$setListItemThemeClassNames","getChecked","setChecked","li","convertListItemElement","canMergeWith","replaceWithNode","includeChildren","__first","__last","nodeToAppend","afterListNode","newListNode","preserveEmptyParent","prevSibling","_","collapseAtStart","paragraph","listNodeParent","isIndented","select","toggleChecked","__indent","indentLevel","currentIndent","nodeToInsert","canInsertAfter","canReplaceWith","replacement","$isParagraphNode","editorThemeClasses","classesToAdd","classesToRemove","listTheme","listItemClassName","listitem","nestedListItemClassName","nested","listItemClasses","parentNode","isCheckList","listitemUnchecked","listitemChecked","nestedListItemClasses","some","removeClassNamesFromElement","prevListItemNode","setAttribute","ListNode","__listType","TAG_TO_LIST_TYPE","__tag","__start","start","_listType","getTag","setListType","writable","_editor","String","__lexicalListType","setListThemeClassNames","ol","convertListNode","ul","canIndent","textNode","$createTextNode","listLevelsClassNames","listDepth","normalizedListDepth","listLevelClassName","listClassName","nestedListClassName","nestedListTheme","normalizeChildren","normalizedListItems","INSERT_UNORDERED_LIST_COMMAND","INSERT_ORDERED_LIST_COMMAND","INSERT_CHECK_LIST_COMMAND","REMOVE_LIST_COMMAND","$handleListInsertParagraph","topListNode","grandparent","replacementNode","$isRootOrShadowRoot","nextSiblings","sublist","emptyListPtr","$removeHighestEmptyListParent","insertList","anchorNodeParent","handled","$isLeafNode","parentKey","nextParent","removeList","listNodes","$getNearestNodeOfType","insertionPoint","listItems","LexicalList","LexicalComposerContext","LexicalNodeMenuPlugin","React","INSERT_EMBED_COMMAND","AutoEmbedOption","MenuOption","options","onSelect","bind","LexicalAutoEmbedPlugin","embedConfigs","onOpenEmbedModalForConfig","getMenuOptions","menuRenderFn","useLexicalComposerContext","nodeKey","setNodeKey","useState","activeEmbedConfig","setActiveEmbedConfig","reset","useCallback","checkIfLinkNodeIsEmbeddable","getEditorState","read","$getNodeByKey","embedConfig","parseUrl","useEffect","map","Klass","registerMutationListener","nodeMutations","updateTags","mutation","listener","embedConfigType","find","embedLinkViaActiveEmbedConfig","result","selectEnd","insertNode","isAttached","useMemo","onSelectOption","selectedOption","targetNode","closeMenu","onClose","URL_MATCHER","react","AutoFocusPlugin","defaultSelection","contains","preventScroll","LexicalAutoFocusPlugin","findFirstMatch","matchers","match","PUNCTUATION_OR_SPACE","isSeparator","char","test","endsWithSeparator","startsWithSeparator","isPreviousNodeValid","previousNode","getLastDescendant","isNextNodeValid","getFirstDescendant","isContentAroundIsValid","matchStart","matchEnd","handleLinkEdit","onChange","childrenLength","isSimpleText","replaceWithChildren","j","useAutoLink","hasNodes","onChangeWrapped","prevUrl","registerNodeTransform","TextNode","previous","nodeText","invalidMatchEnd","remainingTextNode","index","matchLength","linkTextNode","splitText","getFormat","setDetail","getDetail","substring","handleLinkCreation","handleBadNeighbors","AutoLinkPlugin","createLinkMatcherWithRegExp","regExp","urlTransformer","exec","LexicalAutoLinkPlugin","LexicalDecoratorBlockNode","useLexicalNodeSelection","BlockWithAlignableContents","className","setSelected","clearSelection","ref","useRef","onDelete","$isNodeSelection","FORMAT_ELEMENT_COMMAND","formatType","$isDecoratorBlockNode","$getNearestBlockElementAncestorOrThrow","COMMAND_PRIORITY_LOW","CLICK_COMMAND","shiftKey","KEY_DELETE_COMMAND","KEY_BACKSPACE_COMMAND","base","Boolean","join","textAlign","LexicalBlockWithAlignableContents","useLayoutEffect","HISTORY_MERGE_OPTIONS","LexicalComposer","initialConfig","composerContext","editor__DEPRECATED","initialEditor","onError","initialEditorState","context","createLexicalComposerContext","newEditor","createEditor","editable","error","parsedEditorState","parseEditorState","initializeEditor","isEditable","setEditable","Provider","createContext","parentContext","getTheme","useContext","_extends","Object","assign","arguments","source","prototype","hasOwnProperty","apply","ContentEditable","ariaActiveDescendant","ariaAutoComplete","ariaControls","ariaDescribedBy","ariaExpanded","ariaLabel","ariaLabelledBy","ariaMultiline","ariaOwns","ariaRequired","autoCapitalize","id","role","spellCheck","tabIndex","testid","rest","setRootElement","registerEditableListener","currentIsEditable","contentEditable","LexicalContentEditable","DecoratorBlockNode","DecoratorNode","_setPrototypeOf","o","p","setPrototypeOf","__proto__","initialState","ErrorBoundary","_React$Component","subClass","superClass","_this","_len","_args","_key","state","resetErrorBoundary","_this$props","_len2","_key2","props","onReset","create","getDerivedStateFromError","_proto","setState","componentDidCatch","info","_this$props$onError","_this$props2","componentDidUpdate","prevProps","prevState","_this$props$onResetKe","_this$props3","b","resetKeys","item","onResetKeysChange","render","_this$props4","fallbackRender","FallbackComponent","fallback","_props","isValidElement","Component","border","color","padding","LexicalErrorBoundary","history","HistoryPlugin","externalHistoryState","useHistory","LexicalHistoryPlugin","LinkPlugin","validateUrl","PASTE_COMMAND","clipboardText","LexicalLinkPlugin","ListPlugin","INSERT_PARAGRAPH_COMMAND","useList","LexicalListPlugin","scrollIntoViewIfNeeded","typeaheadContainerNode","getElementById","typeaheadRect","getBoundingClientRect","top","height","innerHeight","scrollIntoView","block","isTriggerVisibleInNearestScrollContainer","targetElement","containerElement","tRect","cRect","bottom","useDynamicPositioning","resolution","onReposition","onVisibilityChange","rootScrollParent","includeHidden","getComputedStyle","excludeStaticParent","position","overflowRegex","overflow","overflowY","overflowX","getScrollParent","ticking","previousIsInView","handleScroll","requestAnimationFrame","isInView","resizeObserver","ResizeObserver","capture","passive","observe","unobserve","SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND","LexicalMenu","close","anchorElementRef","shouldSplitNodeWithQuery","selectedIndex","setHighlightedIndex","matchingString","selectOptionAndCleanUp","selectedEntry","textNodeContainingQuery","selectionOffset","slice","characterOffset","replaceableString","startOffset","documentText","entryText","triggerOffset","substr","getFullMatchOffset","newNode","$splitNodeContainingQuery","updateSelectedIndex","rootElem","option","KEY_ARROW_DOWN_COMMAND","newSelectedIndex","KEY_ARROW_UP_COMMAND","KEY_ESCAPE_COMMAND","KEY_TAB_COMMAND","KEY_ENTER_COMMAND","onOpen","anchorClassName","setResolution","positionMenu","containerDiv","menuEle","left","width","getRect","pageYOffset","pageXOffset","menuRect","menuHeight","menuWidth","rootElementRect","right","margin","isConnected","display","useMenuAnchorRef","closeNodeMenu","openNodeMenu","res","positionOrCloseMenu","domElement","getElementByKey","callback","startTransition","setRefElement","OnChangePlugin","ignoreHistoryMergeTagChange","ignoreSelectionChange","LexicalOnChangePlugin","useLexicalEditable","reactDom","dragon","richText","canShowPlaceholderFromCurrentEditorState","$canShowPlaceholderCurry","Placeholder","showPlaceholder","canShowPlaceholder","setCanShowPlaceholder","resetCanShowPlaceholder","currentCanShowPlaceholder","useCanShowPlaceholder","RichTextPlugin","placeholder","decorators","setDecorators","getDecorators","registerDecoratorListener","nextDecorators","flushSync","decoratedPortals","decoratorKeys","keys","reactDecorator","_onError","Suspense","createPortal","useDecorators","registerRichText","useRichTextSetup","Fragment","LexicalRichTextPlugin","registerTabIndentation","command","$filter","$isBlockElementNode","first","isBefore","firstBlock","firstBlockKey","selectionAtStart","$createRangeSelection","$normalizeSelection__EXPERIMENTAL","indentOverTab","OUTDENT_CONTENT_COMMAND","INDENT_CONTENT_COMMAND","INSERT_TAB_COMMAND","TabIndentationPlugin","LexicalTabIndentationPlugin","subscription","initialValueFn","subscribe","initializedSubscription","valueRef","currentValue","newValue","useLexicalSubscription","isNodeSelected","setIsSelected","isMounted","unregister","selected","$createNodeSelection","delete","clear","clipboard","caretFromPoint","x","y","caretRangeFromPoint","startContainer","caretPositionFromPoint","offsetNode","documentMode","navigator","platform","userAgent","CAN_USE_BEFORE_INPUT","InputEvent","IS_SAFARI","IS_IOS","MSStream","IS_CHROME","IS_APPLE_WEBKIT","DRAG_DROP_PASTE","QuoteNode","quote","blockquote","convertBlockquoteElement","getDirection","dir","$createQuoteNode","newBlock","HeadingNode","classNames","heading","h1","convertHeadingElement","h2","h3","h4","h5","h6","isGoogleDocsTitle","span","$createHeadingNode","anchorOffet","fontSize","headingTag","eventFiles","DragEvent","types","hasFiles","includes","hasContent","files","handleIndentAndOutdent","indentOrOutdent","alreadyHandled","parentBlock","$isTargetWithinDecorator","$getNearestNodeFromDOMNode","$isHeadingNode","$isQuoteNode","DELETE_CHARACTER_COMMAND","isBackward","deleteCharacter","DELETE_WORD_COMMAND","deleteWord","DELETE_LINE_COMMAND","deleteLine","CONTROLLED_TEXT_INSERTION_COMMAND","eventOrText","REMOVE_TEXT_COMMAND","removeText","FORMAT_TEXT_COMMAND","formatText","INSERT_LINE_BREAK_COMMAND","selectStart","insertLineBreak","$insertNodes","selectPrevious","possibleNode","$getAdjacentNode","isIsolated","selectNext","$isSelectionAtEndOfRoot","KEY_ARROW_LEFT_COMMAND","$shouldOverrideDefaultCharacterSelection","isHoldingShift","$moveCharacter","KEY_ARROW_RIGHT_COMMAND","blur","DROP_COMMAND","eventRange","clientX","clientY","domOffset","normalizedSelection","DRAGSTART_COMMAND","isFileTransfer","DRAGOVER_COMMAND","SELECT_ALL_COMMAND","$selectAll","CUT_COMMAND","onCutForRichText","hasTextContent","isSelectionCapturedInDecoratorInput","KeyboardEvent","onPasteForRichText","LexicalRichText","CSS_TO_STYLES","getDOMTextNode","nodeType","Node","TEXT_NODE","getDOMIndexWithinParent","indexOf","getStyleObjectFromRawCSS","css","styleObject","styles","trim","getStyleObjectFromCSS","freeze","$patchStyle","patch","prevStyles","getStyle","newStyles","entries","reduce","newCSSText","getCSSFromStyleObject","setStyle","isBlock","isLeafElement","isPointAttached","point","$removeParentEmptyElements","startingNode","latest","$wrapNodesImpl","nodesLength","wrappingElement","elementMapping","targetIsPrevSibling","emptyElements","movedNodes","getChildrenKeys","lastElement","$getPreviousSelection","dirty","$moveCaretSelection","granularity","modify","$isParentElementRTL","$getNodeStyleValueForProperty","styleProperty","defaultValue","CSSText","__next","__prev","__size","__dir","$updateTextNodeProperties","$getSelectionStyleValueForProperty","styleValue","endOffset","endNode","nodeStyleValue","$isAtNodeEnd","isRTL","$patchStyleText","selectedNodes","selectedNodesLength","cellSelection","cellSelectionAnchor","cellSelectionFocus","lastIndex","lastNode","firstNodeTextLength","focusOffset","anchorOffset","startType","endType","endKey","splitNodes","lastNodeTextLength","selectedNode","selectedNodeKey","isToken","getTopLevelElementOrThrow","firstType","lastType","lastOffset","$setBlocksType","maybeBlock","isSegmented","isAnchor","isFocus","getCharacterOffsets","isSame","isFirst","isLast","$wrapNodes","topLevelNode","descendants","$hasAncestor","createDOMRange","_anchorOffset","_focusOffset","anchorKey","focusKey","createRange","collapsed","createRectsFromDOMRange","rootRect","computedStyle","rootPadding","parseFloat","paddingLeft","paddingRight","selectionRects","getClientRects","prevRect","selectionRectsLength","sort","abs","selectionRect","isOverlappingRect","selectionSpansElement","trimTextContentFromAnchor","delCount","remaining","descendantNode","getDescendantByIndex","additionalElementWhitespace","parentSibling","currentNodeSize","prevTextContent","slicedText","setTextContent","prevOffset","splitStart","splitEnd","excessNode","LexicalSelection","$isRootTextContentEmpty","isEditorComposing","$rootTextContent","$canShowPlaceholder","topBlock","topBlockChildren","topBlockChildrenLength","s","$findTextIntersectionFromCharacters","targetCharacters","currentCharacters","mainLoop","characters","$isRootTextContentEmptyCurry","registerLexicalTextEntity","getMatch","createNode","isTargetNode","replaceWithSimpleText","previousText","prevMatch","getMode","diff","end","newTextContent","remainingText","nodeToReplace","nextMatch","markDirty","isTextEntity","LexicalText","isMimeType","file","acceptableMimeTypes","acceptableType","startsWith","findFn","curr","$splitNode","$dfs","endingNode","innerNode","$getDepth","filterFn","startNode","blockNode","klass","$insertFirst","$insertNodeToNearestRoot","focusChild","getChildAtIndex","splitNode","splitOffset","rightTree","paragraphNode","$restoreEditorState","activeEditorState","_pendingEditorState","_dirtyType","$wrapNodeInElement","createElementNode","elementNode","classList","mediaFileReader","filesIterator","Symbol","iterator","processed","handleNextFile","done","next","fileReader","FileReader","readAsDataURL","func","f","object","objectClass","getPrototypeOf","registerNestedElementResolver","cloneNode","handleOverlap","$isTargetNode","$findMatch","nextSiblingsLength","newParent","LexicalUtils","AppShell","_className","_style","menu","menuProperties","xs","md","Box","borderStyle","borderWidth","borderRightWidth","borderColor","flexDirection","flex","backgroundColor","Header","AppShellHeader","displayName","leftSlot","rightSlot","paddingX","paddingY","justifyContent","gap","Calendar","hideBorder","containerProps","stickyWeekdays","fullWidthDays","Wrapper","initialProps","borderRadius","numberOfMonths","Weekdays","DayPicker","table","calendar","classnames","row","cell","caption","caption_start","caption_end","head","head_stickyWeekdays","head_row","head_cell","cell__head","tbody","nav","nav_button_previous","nav__button","nav_button_next","day","day_fullWidth","day_selected","day_today","day_outside","day_disabled","day_range_middle","day__middle","day_range_start","day__start","day_range_end","day__end","months","components","CaptionLabel","CustomCaptionLabel","IconLeft","ChevronLeftIcon","IconRight","ChevronRightIcon","Day","CustomDay","locale","formatters","formatCaption","useDayPicker","Text","fontWeight","displayMonth","date","weekStartsOn","ISOWeek","formatWeekdayName","labels","labelWeekday","weekdays","getWeekdays","py","px","zIndex","weekday","alignItems","DayPickerProvider","startOfISOWeek","startOfWeek","days","addDays","CalloutCard","appearance","subtitle","onClick","icon","Source","cardBackground","cardBorder","cursor","as","iconBackground","minHeight","minWidth","Icon","iconColor","textColor","mt","alignSelf","primary","success","warning","danger","neutral","DataList","bottomDivider","borderBottomWidth","Row","DataListRow","topDivider","borderTopWidth","rowPadding","small","none","DataTable","bulkActions","header","footer","Table","Body","BulkActions","DataTableBulkActions","DataTableHeader","Footer","DataTableFooter","DataTableRow","Cell","DataTableCell","checkbox","action","label","boxSizing","Checkbox","Label","htmlFor","itemCount","pagination","Pagination","Head","Editor","modules","parser","helpText","helpIcon","IconSrc","setContent","onChangeEditor","useEditor","defaultTheme","editorAppearance","Toolbar","toolbar","defaultModules","defaultModule","Module","aliasModules","helpTextAppearance","DefaultPlugins","CustomAutoEmbedPlugin","CustomHeadingPlugin","CustomParagraphPlugin","CustomFloatingLinkEditor","CustomClearFormattingPlugin","CustomYouTubePlugin","Bold","useEditorState","Button","isBold","BoldIcon","ClearFormatting","CLEAR_FORMATTING_COMMAND","RemoveFormatIcon","Popover","supportedHeaderTypes","supportedHeaderType","hover","blockType","TextSizeIcon","headerTranslations","arrow","FORMAT_HEADING_COMMAND","FORMAT_PARAGRAPH_COMMAND","History","dispatch","EditorActionKind","CAN_UNDO","CAN_REDO","disabled","canUndo","UndoIcon","canRedo","RedoIcon","Italic","isItalic","ItalicIcon","Link","insertLink","isLink","LinkIcon","OrderedList","OrderedListIcon","UnorderedList","ListIcon","Video","YoutubeEmbedConfig","PlayIcon","_ref","pointerEvents","Divider","toolbarRef","buttonRefs","calcButtonWidths","calcVisibleButtons","updateToolbar","useToolbar","activeEditor","setActiveEditor","visibleButtons","setVisibleButtons","Children","toArray","buttonWidths","setButtonWidths","hiddenButtons","setHiddenButtons","availableWidth","clientWidth","PADDING","ELIPSIS_BUTTON","maxVisibleButtons","buttons","_payload","EditorContext","flexWrap","button","maxWidth","EllipsisIcon","lineHeight","GAP","initialContext","joinClassNames","sprinkle","textDecoration","container__item","nested_list__item","italic","text__italic","bold","clearFormating","orderedList","unorderedList","video","divider","YouTubeNode","getSelectedNode","parserDOM","setContentHTML","setContentJSON","isEmptyContent","handleChange","editorContentHtml","onChangeHTML","editorContentJSON","toJSON","onChangeJSON","console","reducer","BLOCK_TYPE","IS_BOLD","IS_ITALIC","IS_LINK","windowWidth","setWindowWidth","innerWidth","useReducer","handleResize","prev","totalWidthButtons","ceil","elementKey","elementDOM","hasFormat","YouTubeComponent","videoID","src","allow","allowFullScreen","__id","$createYouTubeNode","iframe","hasAttribute","convertYoutubeElement","getId","decorate","embedBlockTheme","embedBlock","$isYouTubeNode","setText","showModal","setShowModal","handleModal","embedResult","setEmbedResult","setEmbedConfig","validateText","debounce","inputText","urlMatch","then","parseResult","Modal","open","onDismiss","FormField","Input","currentEmbedConfig","embedFn","dismissFn","contentName","exampleUrl","INSERT_YOUTUBE_COMMAND","keywords","isCursorAtTheSamePosition","idx","clearNodeFormatting","COMMAND_PRIORITY_NORMAL","linkUrl","showPopover","handlePopover","useFloatingLinkEditor","floatingStyles","useFloating","strategy","whileElementsMounted","autoUpdate","floating","reference","middleware","shift","flip","crossAxis","fallbackAxisSideDirection","FloatingPortal","popover","PopoverEditLink","editLink","setEditLink","IconButton","PencilIcon","TrashIcon","CloseIcon","CheckIcon","setIsLink","setLinkUrl","setShowPopover","linkParent","autoLinkParent","metaKey","ctrlKey","log","youTubeNode","MATCHERS","urlRegExp","RegExp","timeoutId","EmptyMessage","illustration","actions","emptyMessageContent","Title","showHelpText","Select","FormFieldSelect","Textarea","FormFieldTextarea","FormFieldInput","inputAppearance","HelpLink","QuestionCircleIcon","InteractiveList","Structure","InteractiveListStructure","StructureSkeleton","InteractiveListStructureSkeleton","ButtonItem","InteractiveListButtonItem","ButtonItemSkeleton","InteractiveListButtonItemSkeleton","CheckboxItem","InteractiveListCheckboxItem","CheckboxItemSkeleton","InteractiveListCheckboxItemSkeleton","RadioItem","InteractiveListRadioItem","RadioItemSkeleton","InteractiveListRadioItemSkeleton","ToggleItem","InteractiveListToggleItem","ToggleItemSkeleton","InteractiveListToggleItemSkeleton","iconButton","itemID","generateID","InteractiveListRow","Skeleton","radio","Radio","transitionDuration","transitionProperty","transitionTimingFunction","boxShadow","focusWithin","showTitle","description","toggle","Toggle","floor","random","Layout","columns","gridTemplateColumns","colQuantity","gridGap","Section","LayoutSection","Menu","MenuSection","MenuButton","ButtonAccordion","Accordion","MenuHeader","MenuBody","MenuFooter","activeColor","active","disabledColor","pl","pt","forwardRef","startIcon","MenuButtonAccordion","controlledOpen","menuButton","isOpen","setOpen","pb","pr","NavTabs","Item","NavTabsItem","badge","Page","marginX","PageHeader","PageBody","buttonStack","ProductUpdates","bodyContent","dismissLink","visible","setVisibility","handleVisibility","productUpdatesContent","hasDismissLink","onVisibility","newVisible","enabledDismiss","enabledClick","SideModal","titleAction","headerAction","headerIcon","paddingHeader","paddingBody","paddingFooter","Sidebar","mb","primaryAction","secondaryAction","ThumbnailWithAction","thumbnail","contentPosition","contentPositions","Thumbnail","extendStatics","d","__extends","TypeError","__","__assign","t","__rest","getOwnPropertySymbols","propertyIsEnumerable","__decorate","desc","getOwnPropertyDescriptor","Reflect","defineProperty","__param","paramIndex","decorator","__esDecorate","ctor","descriptorIn","contextIn","initializers","extraInitializers","accept","kind","descriptor","access","addInitializer","init","__runInitializers","thisArg","useValue","__propKey","__setFunctionName","prefix","configurable","__metadata","metadataKey","metadataValue","metadata","__awaiter","_arguments","P","generator","fulfilled","step","rejected","__generator","g","sent","trys","ops","verb","v","op","__createBinding","m","k","k2","__esModule","enumerable","__exportStar","__values","__read","ar","__spread","__spreadArrays","il","jl","__spreadArray","to","pack","l","__await","__asyncGenerator","asyncIterator","q","resume","fulfill","settle","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","raw","__setModuleDefault","__importStar","mod","__importDefault","default","__classPrivateFieldGet","receiver","__classPrivateFieldSet","__classPrivateFieldIn","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","obj","prop","toStringTag"],"sourceRoot":""}