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OqT,aAAiC,IAAlBI,EAAOjQ,OACxC,OAEJ,MAAM6e,EAAuB5O,EACxBxM,QAAQqb,KAAiBA,EAAW3P,MACpCjF,KAAK4U,IAAe,CACrBnX,KAAMnL,EAAOmhB,OAAOG,MAAMiB,MAAMvjB,KAChC4W,MAAO0M,MAEXtiB,EACK0B,QACA8gB,SAAQ,EAAG3Q,cACU,MAAlBuQ,EAGOvQ,EAAS4Q,cAAcJ,GAGvBxQ,EAAS6Q,gBAAgBN,EAAgBC,KAGnD1gB,QACAI,KACT,C,uDCjCA,IAAI4gB,EACAC,EAeG,SAASC,IACZ,YAXoB/iB,IAAhB6iB,IACAA,EAAcG,UAAUC,SAASC,SAAS,QAEvCL,EAQU,SAAM,MAC3B,CAEO,SAASM,IAYZ,YAX4BnjB,IAAxB8iB,IAIAA,EAEKrZ,QAAU,iBAAkBA,QACzBuZ,UAAUI,eAAiB,GAE3BJ,UAAUK,iBAAmB,GAElCP,CACX,C","sources":["webpack://app/./node_modules/@mui/icons-material/FormatAlignCenter.js","webpack://app/./node_modules/@mui/icons-material/FormatAlignJustify.js","webpack://app/./node_modules/@mui/icons-material/FormatAlignLeft.js","webpack://app/./node_modules/@mui/icons-material/FormatAlignRight.js","webpack://app/./node_modules/@mui/icons-material/FormatUnderlined.js","webpack://app/./node_modules/@mui/icons-material/HorizontalRule.js","webpack://app/./node_modules/@mui/icons-material/Redo.js","webpack://app/./node_modules/@mui/icons-material/Undo.js","webpack://app/./node_modules/mui-tiptap/dist/esm/MenuDivider.js","webpack://app/./node_modules/mui-tiptap/dist/esm/context.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButton.js","webpack://app/./node_modules/mui-tiptap/dist/esm/icons/Table.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonAddTable.js","webpack://app/./node_modules/@mui/icons-material/esm/FormatQuote.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonBlockquote.js","webpack://app/./node_modules/@mui/icons-material/esm/FormatBold.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonBold.js","webpack://app/./node_modules/@mui/icons-material/esm/FormatListBulleted.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonBulletedList.js","webpack://app/./node_modules/@mui/icons-material/esm/Code.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonCode.js","webpack://app/./node_modules/mui-tiptap/dist/esm/icons/CodeBlock.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonCodeBlock.js","webpack://app/./node_modules/mui-tiptap/dist/esm/icons/FormatColorBar.js","webpack://app/./node_modules/react-colorful/dist/index.mjs","webpack://app/./node_modules/mui-tiptap/dist/esm/utils/color.js","webpack://app/./node_modules/@mui/icons-material/esm/Check.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/ColorSwatchButton.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/ColorPicker.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/ColorPickerPopper.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonColorPicker.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonEditLink.js","webpack://app/./node_modules/mui-tiptap/dist/esm/icons/FormatInkHighlighterNoBar.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonHighlightColor.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonHorizontalRule.js","webpack://app/./node_modules/@mui/icons-material/esm/AddPhotoAlternate.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonAddImage.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonImageUpload.js","webpack://app/./node_modules/@mui/icons-material/esm/FormatIndentIncrease.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonIndent.js","webpack://app/./node_modules/@mui/icons-material/esm/FormatItalic.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonItalic.js","webpack://app/./node_modules/@mui/icons-material/esm/FormatListNumbered.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonOrderedList.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonRedo.js","webpack://app/./node_modules/@mui/icons-material/esm/FormatClear.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonRemoveFormatting.js","webpack://app/./node_modules/@mui/icons-material/esm/StrikethroughS.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonStrikethrough.js","webpack://app/./node_modules/@mui/icons-material/esm/Subscript.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonSubscript.js","webpack://app/./node_modules/@mui/icons-material/esm/Superscript.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonSuperscript.js","webpack://app/./node_modules/@mui/icons-material/esm/Checklist.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonTaskList.js","webpack://app/./node_modules/mui-tiptap/dist/esm/icons/FormatColorTextNoBar.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonTextColor.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonTooltip.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonUnderline.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonUndo.js","webpack://app/./node_modules/@mui/icons-material/esm/FormatIndentDecrease.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuButtonUnindent.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuControlsContainer.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuSelect.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuSelectFontFamily.js","webpack://app/./node_modules/@mui/icons-material/esm/FormatSize.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuSelectFontSize.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuSelectHeading.js","webpack://app/./node_modules/mui-tiptap/dist/esm/controls/MenuSelectTextAlign.js","webpack://app/./node_modules/mui-tiptap/dist/esm/utils/DebounceRender.js","webpack://app/./node_modules/mui-tiptap/dist/esm/utils/getAttributesForEachSelected.js","webpack://app/./node_modules/mui-tiptap/dist/esm/utils/getAttributesForNodes.js","webpack://app/./node_modules/mui-tiptap/dist/esm/utils/getAttributesForMarks.js","webpack://app/./node_modules/mui-tiptap/dist/esm/utils/images.js","webpack://app/./node_modules/mui-tiptap/dist/esm/utils/platform.js"],"sourcesContent":["\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z\"\n}), 'FormatAlignCenter');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M3 21h18v-2H3zm0-4h18v-2H3zm0-4h18v-2H3zm0-4h18V7H3zm0-6v2h18V3z\"\n}), 'FormatAlignJustify');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z\"\n}), 'FormatAlignLeft');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z\"\n}), 'FormatAlignRight');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6m-7 2v2h14v-2z\"\n}), 'FormatUnderlined');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n fillRule: \"evenodd\",\n d: \"M4 11h16v2H4z\"\n}), 'HorizontalRule');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z\"\n}), 'Redo');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8\"\n}), 'Undo');","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Divider } from \"@mui/material\";\nimport { makeStyles } from \"tss-react/mui\";\nconst useStyles = makeStyles({ name: { MenuDivider } })((theme) => ({\n root: {\n height: 18,\n margin: theme.spacing(0, 0.5),\n },\n}));\nexport default function MenuDivider(props) {\n const { classes, cx } = useStyles();\n return (_jsx(Divider, { orientation: \"vertical\", ...props, className: cx(classes.root, props.className) }));\n}\n","import { createContext, useContext } from \"react\";\nexport const RichTextEditorContext = createContext(undefined);\nexport function useRichTextEditorContext() {\n const editor = useContext(RichTextEditorContext);\n if (editor === undefined) {\n throw new Error(\"Tiptap editor not found in component context. Be sure to use !\");\n }\n return editor;\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { ToggleButton, toggleButtonClasses, } from \"@mui/material\";\nimport { makeStyles } from \"tss-react/mui\";\nimport MenuButtonTooltip from \"./MenuButtonTooltip\";\nexport const MENU_BUTTON_FONT_SIZE_DEFAULT = \"1.25rem\";\nconst useStyles = makeStyles({ name: { MenuButton } })({\n root: {\n // Use && for additional specificity, since MUI's conditional \"disabled\"\n // styles also set the border\n [`&& .${toggleButtonClasses.root}`]: {\n border: \"none\",\n padding: 5,\n },\n },\n menuButtonIcon: {\n fontSize: MENU_BUTTON_FONT_SIZE_DEFAULT,\n },\n});\n/**\n * A general-purpose base component for showing an editor control for use in a\n * menu.\n */\nexport default function MenuButton({ tooltipLabel, tooltipShortcutKeys, IconComponent, buttonRef, children, ...toggleButtonProps }) {\n const { classes } = useStyles();\n return (_jsx(\"span\", { className: classes.root, children: _jsx(MenuButtonTooltip, { label: tooltipLabel, shortcutKeys: tooltipShortcutKeys, children: _jsx(ToggleButton, { ref: buttonRef, size: \"small\", value: tooltipLabel, ...toggleButtonProps, children: children !== null && children !== void 0 ? children : (IconComponent && (_jsx(IconComponent, { className: classes.menuButtonIcon }))) }) }) }));\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { createSvgIcon } from \"@mui/material\";\nconst Table = createSvgIcon(\n// From https://boxicons.com/ (https://github.com/atisawd/boxicons)\n_jsx(\"path\", { d: \"M4 21h15.893c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2zm0-2v-5h4v5H4zM14 7v5h-4V7h4zM8 7v5H4V7h4zm2 12v-5h4v5h-4zm6 0v-5h3.894v5H16zm3.893-7H16V7h3.893v5z\" }), \"Table\");\nexport default Table;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useRichTextEditorContext } from \"../context\";\nimport { Table } from \"../icons\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonAddTable(props) {\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Insert table\", IconComponent: Table, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().insertTable(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z\"\n}), 'FormatQuote');","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport { FormatQuote } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonBlockquote(props) {\n var _a;\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Blockquote\", tooltipShortcutKeys: [\"mod\", \"Shift\", \"B\"], IconComponent: FormatQuote, selected: (_a = editor === null || editor === void 0 ? void 0 : editor.isActive(\"blockquote\")) !== null && _a !== void 0 ? _a : false, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleBlockquote(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleBlockquote().run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5\"\n}), 'FormatBold');","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport { FormatBold } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonBold(props) {\n var _a;\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Bold\", tooltipShortcutKeys: [\"mod\", \"B\"], IconComponent: FormatBold, selected: (_a = editor === null || editor === void 0 ? void 0 : editor.isActive(\"bold\")) !== null && _a !== void 0 ? _a : false, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleBold(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleBold().run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z\"\n}), 'FormatListBulleted');","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport { FormatListBulleted } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonBulletedList(props) {\n var _a;\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Bulleted list\", tooltipShortcutKeys: [\"mod\", \"Shift\", \"8\"], IconComponent: FormatListBulleted, selected: (_a = editor === null || editor === void 0 ? void 0 : editor.isActive(\"bulletList\")) !== null && _a !== void 0 ? _a : false, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleBulletList(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleBulletList().run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z\"\n}), 'Code');","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport { Code } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonCode(props) {\n var _a;\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Code\", tooltipShortcutKeys: [\"mod\", \"E\"], IconComponent: Code, selected: (_a = editor === null || editor === void 0 ? void 0 : editor.isActive(\"code\")) !== null && _a !== void 0 ? _a : false, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleCode(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleCode().run(), ...props }));\n}\n","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { createSvgIcon } from \"@mui/material\";\nconst CodeBlock = createSvgIcon(\n// From https://boxicons.com/ (https://github.com/atisawd/boxicons)\n_jsxs(_Fragment, { children: [_jsx(\"path\", { d: \"M20 3H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2zM4 19V7h16l.002 12H4z\" }), _jsx(\"path\", { d: \"M9.293 9.293 5.586 13l3.707 3.707 1.414-1.414L8.414 13l2.293-2.293zm5.414 0-1.414 1.414L15.586 13l-2.293 2.293 1.414 1.414L18.414 13z\" })] }), \"CodeBlock\");\nexport default CodeBlock;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport { useRichTextEditorContext } from \"../context\";\nimport { CodeBlock } from \"../icons\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonCodeBlock(props) {\n var _a;\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Code block\", tooltipShortcutKeys: [\"mod\", \"Alt\", \"C\"], IconComponent: CodeBlock, selected: (_a = editor === null || editor === void 0 ? void 0 : editor.isActive(\"codeBlock\")) !== null && _a !== void 0 ? _a : false, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleCodeBlock(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleCodeBlock().run(), ...props }));\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { createSvgIcon } from \"@mui/material\";\n/**\n * A horizontal bar that is used as a color indicator, matching position and\n * appearance of the bar in icons like FormatColorText, BorderColor, etc. from\n * @mui/icons-material.\n *\n * This allows for rendering the color indication separately from the other\n * portion of the icon (the text letter, highlighter, etc.) when used with icons\n * like FormatColorTextNoBar, FormatInkHighlighterNoBar, and BorderColorNoBar.\n */\nconst FormatColorBar = createSvgIcon(_jsx(\"path\", { d: \"M 2 20 h 20 v 4 H 2 v -4 z\" }), \"FormatColorBar\");\nexport default FormatColorBar;\n","import e,{useRef as r,useMemo as t,useEffect as n,useState as o,useCallback as a,useLayoutEffect as l}from\"react\";function u(){return(u=Object.assign||function(e){for(var r=1;r=0||(o[t]=e[t]);return o}function i(e){var t=r(e),n=r(function(e){t.current&&t.current(e)});return t.current=e,n.current}var s=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=1),e>t?t:e0:e.buttons>0)&&m.current?g(d(m.current,e,b.current)):t(!1)},r=function(){return t(!1)};function t(t){var n=_.current,o=v(m.current),a=t?o.addEventListener:o.removeEventListener;a(n?\"touchmove\":\"mousemove\",e),a(n?\"touchend\":\"mouseup\",r)}return[function(e){var r=e.nativeEvent,n=m.current;if(n&&(h(r),!function(e,r){return r&&!f(e)}(r,_.current)&&n)){if(f(r)){_.current=!0;var o=r.changedTouches||[];o.length&&(b.current=o[0].identifier)}n.focus(),g(d(n,r,b.current)),t(!0)}},function(e){var r=e.which||e.keyCode;r<37||r>40||(e.preventDefault(),p({left:39===r?.05:37===r?-.05:0,top:40===r?.05:38===r?-.05:0}))},t]},[p,g]),C=x[0],E=x[1],H=x[2];return n(function(){return H},[H]),e.createElement(\"div\",u({},s,{onTouchStart:C,onMouseDown:C,className:\"react-colorful__interactive\",ref:m,onKeyDown:E,tabIndex:0,role:\"slider\"}))}),g=function(e){return e.filter(Boolean).join(\" \")},p=function(r){var t=r.color,n=r.left,o=r.top,a=void 0===o?.5:o,l=g([\"react-colorful__pointer\",r.className]);return e.createElement(\"div\",{className:l,style:{top:100*a+\"%\",left:100*n+\"%\"}},e.createElement(\"div\",{className:\"react-colorful__pointer-fill\",style:{backgroundColor:t}}))},b=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=Math.pow(10,r)),Math.round(t*e)/t},_={grad:.9,turn:360,rad:360/(2*Math.PI)},x=function(e){return L(C(e))},C=function(e){return\"#\"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?b(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?b(parseInt(e.substring(6,8),16)/255,2):1}},E=function(e,r){return void 0===r&&(r=\"deg\"),Number(e)*(_[r]||1)},H=function(e){var r=/hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?N({h:E(r[1],r[2]),s:Number(r[3]),l:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},M=H,N=function(e){var r=e.s,t=e.l;return{h:e.h,s:(r*=(t<50?t:100-t)/100)>0?2*r/(t+r)*100:0,v:t+r,a:e.a}},w=function(e){return K(I(e))},y=function(e){var r=e.s,t=e.v,n=e.a,o=(200-r)*t/100;return{h:b(e.h),s:b(o>0&&o<200?r*t/100/(o<=100?o:200-o)*100:0),l:b(o/2),a:b(n,2)}},q=function(e){var r=y(e);return\"hsl(\"+r.h+\", \"+r.s+\"%, \"+r.l+\"%)\"},k=function(e){var r=y(e);return\"hsla(\"+r.h+\", \"+r.s+\"%, \"+r.l+\"%, \"+r.a+\")\"},I=function(e){var r=e.h,t=e.s,n=e.v,o=e.a;r=r/360*6,t/=100,n/=100;var a=Math.floor(r),l=n*(1-t),u=n*(1-(r-a)*t),c=n*(1-(1-r+a)*t),i=a%6;return{r:b(255*[n,u,l,l,c,n][i]),g:b(255*[c,n,n,u,l,l][i]),b:b(255*[l,l,c,n,n,u][i]),a:b(o,2)}},O=function(e){var r=/hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?A({h:E(r[1],r[2]),s:Number(r[3]),v:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},j=O,z=function(e){var r=/rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?L({r:Number(r[1])/(r[2]?100/255:1),g:Number(r[3])/(r[4]?100/255:1),b:Number(r[5])/(r[6]?100/255:1),a:void 0===r[7]?1:Number(r[7])/(r[8]?100:1)}):{h:0,s:0,v:0,a:1}},B=z,D=function(e){var r=e.toString(16);return r.length<2?\"0\"+r:r},K=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=o<1?D(b(255*o)):\"\";return\"#\"+D(r)+D(t)+D(n)+a},L=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=Math.max(r,t,n),l=a-Math.min(r,t,n),u=l?a===r?(t-n)/l:a===t?2+(n-r)/l:4+(r-t)/l:0;return{h:b(60*(u<0?u+6:u)),s:b(a?l/a*100:0),v:b(a/255*100),a:o}},A=function(e){return{h:b(e.h),s:b(e.s),v:b(e.v),a:b(e.a,2)}},S=e.memo(function(r){var t=r.hue,n=r.onChange,o=g([\"react-colorful__hue\",r.className]);return e.createElement(\"div\",{className:o},e.createElement(m,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:s(t+360*e.left,0,360)})},\"aria-label\":\"Hue\",\"aria-valuenow\":b(t),\"aria-valuemax\":\"360\",\"aria-valuemin\":\"0\"},e.createElement(p,{className:\"react-colorful__hue-pointer\",left:t/360,color:q({h:t,s:100,v:100,a:1})})))}),T=e.memo(function(r){var t=r.hsva,n=r.onChange,o={backgroundColor:q({h:t.h,s:100,v:100,a:1})};return e.createElement(\"div\",{className:\"react-colorful__saturation\",style:o},e.createElement(m,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:s(t.s+100*e.left,0,100),v:s(t.v-100*e.top,0,100)})},\"aria-label\":\"Color\",\"aria-valuetext\":\"Saturation \"+b(t.s)+\"%, Brightness \"+b(t.v)+\"%\"},e.createElement(p,{className:\"react-colorful__saturation-pointer\",top:1-t.v/100,left:t.s/100,color:q(t)})))}),F=function(e,r){if(e===r)return!0;for(var t in e)if(e[t]!==r[t])return!1;return!0},P=function(e,r){return e.replace(/\\s/g,\"\")===r.replace(/\\s/g,\"\")},X=function(e,r){return e.toLowerCase()===r.toLowerCase()||F(C(e),C(r))};function Y(e,t,l){var u=i(l),c=o(function(){return e.toHsva(t)}),s=c[0],f=c[1],v=r({color:t,hsva:s});n(function(){if(!e.equal(t,v.current.color)){var r=e.toHsva(t);v.current={hsva:r,color:t},f(r)}},[t,e]),n(function(){var r;F(s,v.current.hsva)||e.equal(r=e.fromHsva(s),v.current.color)||(v.current={hsva:s,color:r},u(r))},[s,e,u]);var d=a(function(e){f(function(r){return Object.assign({},r,e)})},[]);return[s,d]}var R,V=\"undefined\"!=typeof window?l:n,$=function(){return R||(\"undefined\"!=typeof __webpack_nonce__?__webpack_nonce__:void 0)},G=function(e){R=e},J=new Map,Q=function(e){V(function(){var r=e.current?e.current.ownerDocument:document;if(void 0!==r&&!J.has(r)){var t=r.createElement(\"style\");t.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\\'data:image/svg+xml;charset=utf-8,\\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',J.set(r,t);var n=$();n&&t.setAttribute(\"nonce\",n),r.head.appendChild(t)}},[])},U=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,[\"className\",\"colorModel\",\"color\",\"onChange\"]),f=r(null);Q(f);var v=Y(o,l,i),d=v[0],h=v[1],m=g([\"react-colorful\",n]);return e.createElement(\"div\",u({},s,{ref:f,className:m}),e.createElement(T,{hsva:d,onChange:h}),e.createElement(S,{hue:d.h,onChange:h,className:\"react-colorful__last-control\"}))},W={defaultColor:\"000\",toHsva:x,fromHsva:function(e){return w({h:e.h,s:e.s,v:e.v,a:1})},equal:X},Z=function(r){return e.createElement(U,u({},r,{colorModel:W}))},ee=function(r){var t=r.className,n=r.hsva,o=r.onChange,a={backgroundImage:\"linear-gradient(90deg, \"+k(Object.assign({},n,{a:0}))+\", \"+k(Object.assign({},n,{a:1}))+\")\"},l=g([\"react-colorful__alpha\",t]),u=b(100*n.a);return e.createElement(\"div\",{className:l},e.createElement(\"div\",{className:\"react-colorful__alpha-gradient\",style:a}),e.createElement(m,{onMove:function(e){o({a:e.left})},onKey:function(e){o({a:s(n.a+e.left)})},\"aria-label\":\"Alpha\",\"aria-valuetext\":u+\"%\",\"aria-valuenow\":u,\"aria-valuemin\":\"0\",\"aria-valuemax\":\"100\"},e.createElement(p,{className:\"react-colorful__alpha-pointer\",left:n.a,color:k(n)})))},re=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,[\"className\",\"colorModel\",\"color\",\"onChange\"]),f=r(null);Q(f);var v=Y(o,l,i),d=v[0],h=v[1],m=g([\"react-colorful\",n]);return e.createElement(\"div\",u({},s,{ref:f,className:m}),e.createElement(T,{hsva:d,onChange:h}),e.createElement(S,{hue:d.h,onChange:h}),e.createElement(ee,{hsva:d,onChange:h,className:\"react-colorful__last-control\"}))},te={defaultColor:\"0001\",toHsva:x,fromHsva:w,equal:X},ne=function(r){return e.createElement(re,u({},r,{colorModel:te}))},oe={defaultColor:{h:0,s:0,l:0,a:1},toHsva:N,fromHsva:y,equal:F},ae=function(r){return e.createElement(re,u({},r,{colorModel:oe}))},le={defaultColor:\"hsla(0, 0%, 0%, 1)\",toHsva:H,fromHsva:k,equal:P},ue=function(r){return e.createElement(re,u({},r,{colorModel:le}))},ce={defaultColor:{h:0,s:0,l:0},toHsva:function(e){return N({h:e.h,s:e.s,l:e.l,a:1})},fromHsva:function(e){return{h:(r=y(e)).h,s:r.s,l:r.l};var r},equal:F},ie=function(r){return e.createElement(U,u({},r,{colorModel:ce}))},se={defaultColor:\"hsl(0, 0%, 0%)\",toHsva:M,fromHsva:q,equal:P},fe=function(r){return e.createElement(U,u({},r,{colorModel:se}))},ve={defaultColor:{h:0,s:0,v:0,a:1},toHsva:function(e){return e},fromHsva:A,equal:F},de=function(r){return e.createElement(re,u({},r,{colorModel:ve}))},he={defaultColor:\"hsva(0, 0%, 0%, 1)\",toHsva:O,fromHsva:function(e){var r=A(e);return\"hsva(\"+r.h+\", \"+r.s+\"%, \"+r.v+\"%, \"+r.a+\")\"},equal:P},me=function(r){return e.createElement(re,u({},r,{colorModel:he}))},ge={defaultColor:{h:0,s:0,v:0},toHsva:function(e){return{h:e.h,s:e.s,v:e.v,a:1}},fromHsva:function(e){var r=A(e);return{h:r.h,s:r.s,v:r.v}},equal:F},pe=function(r){return e.createElement(U,u({},r,{colorModel:ge}))},be={defaultColor:\"hsv(0, 0%, 0%)\",toHsva:j,fromHsva:function(e){var r=A(e);return\"hsv(\"+r.h+\", \"+r.s+\"%, \"+r.v+\"%)\"},equal:P},_e=function(r){return e.createElement(U,u({},r,{colorModel:be}))},xe={defaultColor:{r:0,g:0,b:0,a:1},toHsva:L,fromHsva:I,equal:F},Ce=function(r){return e.createElement(re,u({},r,{colorModel:xe}))},Ee={defaultColor:\"rgba(0, 0, 0, 1)\",toHsva:z,fromHsva:function(e){var r=I(e);return\"rgba(\"+r.r+\", \"+r.g+\", \"+r.b+\", \"+r.a+\")\"},equal:P},He=function(r){return e.createElement(re,u({},r,{colorModel:Ee}))},Me={defaultColor:{r:0,g:0,b:0},toHsva:function(e){return L({r:e.r,g:e.g,b:e.b,a:1})},fromHsva:function(e){return{r:(r=I(e)).r,g:r.g,b:r.b};var r},equal:F},Ne=function(r){return e.createElement(U,u({},r,{colorModel:Me}))},we={defaultColor:\"rgb(0, 0, 0)\",toHsva:B,fromHsva:function(e){var r=I(e);return\"rgb(\"+r.r+\", \"+r.g+\", \"+r.b+\")\"},equal:P},ye=function(r){return e.createElement(U,u({},r,{colorModel:we}))},qe=/^#?([0-9A-F]{3,8})$/i,ke=function(r){var t=r.color,l=void 0===t?\"\":t,s=r.onChange,f=r.onBlur,v=r.escape,d=r.validate,h=r.format,m=r.process,g=c(r,[\"color\",\"onChange\",\"onBlur\",\"escape\",\"validate\",\"format\",\"process\"]),p=o(function(){return v(l)}),b=p[0],_=p[1],x=i(s),C=i(f),E=a(function(e){var r=v(e.target.value);_(r),d(r)&&x(m?m(r):r)},[v,m,d,x]),H=a(function(e){d(e.target.value)||_(v(l)),C(e)},[l,v,d,C]);return n(function(){_(v(l))},[l,v]),e.createElement(\"input\",u({},g,{value:h?h(b):b,spellCheck:\"false\",onChange:E,onBlur:H}))},Ie=function(e){return\"#\"+e},Oe=function(r){var t=r.prefixed,n=r.alpha,o=c(r,[\"prefixed\",\"alpha\"]),l=a(function(e){return e.replace(/([^0-9A-F]+)/gi,\"\").substring(0,n?8:6)},[n]),i=a(function(e){return function(e,r){var t=qe.exec(e),n=t?t[1].length:0;return 3===n||6===n||!!r&&4===n||!!r&&8===n}(e,n)},[n]);return e.createElement(ke,u({},o,{escape:l,format:t?Ie:void 0,process:Ie,validate:i}))};export{ne as HexAlphaColorPicker,Oe as HexColorInput,Z as HexColorPicker,ie as HslColorPicker,fe as HslStringColorPicker,ae as HslaColorPicker,ue as HslaStringColorPicker,pe as HsvColorPicker,_e as HsvStringColorPicker,de as HsvaColorPicker,me as HsvaStringColorPicker,Ne as RgbColorPicker,ye as RgbStringColorPicker,Ce as RgbaColorPicker,He as RgbaStringColorPicker,G as setNonce};\n//# sourceMappingURL=index.module.js.map\n","import { rgbToHex } from \"@mui/material\";\n/**\n * Convert a color string to a color in hex string format (e.g. \"#ff0000\"), or\n * return null if the given string cannot be parsed as a valid color.\n *\n * Examples:\n * \"rgb(169, 79, 211)\" -> \"#a94fd3\"\n * \"#a94fd3\" -> \"#a94fd3\"\n * \"not a color\" -> null\n *\n * Uses @mui/material's `rgbToHex` function, which supports input strings in\n * these formats: hex like #000 and #00000000, rgb(), rgba(), hsl(), hsla(), and\n * color(). See\n * https://github.com/mui/material-ui/blob/e00a4d857fb2ea1b181afc35d0fd1ffc5631f0fe/packages/mui-system/src/colorManipulator.js#L54\n *\n * Separate third party libraries could be used instead of this function to\n * offer more full-featured parsing (e.g. handling CSS color name keywords,\n * cmyk, etc.), such as colord (https://www.npmjs.com/package/colord) and\n * tinycolor2 (https://www.npmjs.com/package/@ctrl/tinycolor), which have a\n * relatively small footprint. They are not used directly by mui-tiptap to keep\n * dependencies as lean as possible.\n */\nexport function colorToHex(color) {\n try {\n // Though this function is named `rgbToHex`, it supports colors in various\n // formats (rgba, hex, hsl, etc.) as well\n return rgbToHex(color);\n }\n catch (err) {\n return null;\n }\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"\n}), 'Check');","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Check } from \"@mui/icons-material\";\nimport { forwardRef, } from \"react\";\nimport { makeStyles } from \"tss-react/mui\";\n/**\n * Renders a button in the given color `value`, useful for showing and allowing\n * selecting a color preset.\n */\nexport const ColorSwatchButton = forwardRef(({ value: colorValue, label, padding, active, ...buttonProps }, ref) => {\n const { classes, cx, theme } = useStyles();\n return (_jsx(\"button\", { ref: ref, type: \"button\", style: { backgroundColor: colorValue, padding }, \"aria-label\": label !== null && label !== void 0 ? label : colorValue, value: colorValue, ...buttonProps, className: cx(classes.root, !colorValue && classes.colorNotSet, buttonProps.className), children: active && (_jsx(Check, { fontSize: \"small\", className: classes.activeIcon, style: {\n color: colorValue\n ? theme.palette.getContrastText(colorValue)\n : undefined,\n } })) }));\n});\nconst useStyles = makeStyles({ name: { ColorSwatchButton } })((theme) => ({\n root: {\n height: theme.spacing(2.5),\n width: theme.spacing(2.5),\n minWidth: theme.spacing(2.5),\n borderRadius: theme.shape.borderRadius,\n borderColor: theme.palette.mode === \"dark\"\n ? theme.palette.grey[700]\n : theme.palette.grey[400],\n borderStyle: \"solid\",\n borderWidth: 1,\n cursor: \"pointer\",\n // Use background-clip with content-box so that if a `padding` is specified by the\n // user, it adds a gap between the color and the border.\n padding: 0,\n backgroundClip: \"content-box\",\n },\n activeIcon: {\n height: \"100%\",\n width: \"80%\",\n verticalAlign: \"middle\",\n },\n colorNotSet: {\n // To indicate that a color hasn't been chosen, we'll use a checkerboard pattern\n // (https://stackoverflow.com/a/65129916/4543977)\n background: `repeating-conic-gradient(\n ${theme.palette.grey[400]} 0% 25%, ${theme.palette.common.white} 0% 50%)\n 50% / 12px 12px`,\n backgroundClip: \"content-box\",\n },\n}));\nColorSwatchButton.displayName = \"ColorSwatchButton\";\n","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { TextField } from \"@mui/material\";\nimport { useEffect, useRef } from \"react\";\nimport { HexAlphaColorPicker, HexColorPicker } from \"react-colorful\";\nimport { makeStyles } from \"tss-react/mui\";\nimport { colorToHex as colorToHexDefault } from \"../utils/color\";\nimport { ColorSwatchButton } from \"./ColorSwatchButton\";\nconst useStyles = makeStyles({ name: { ColorPicker } })((theme) => ({\n gradientPicker: {\n // Increase specificity to override the styles\n \"&&\": {\n width: \"100%\",\n },\n },\n colorTextInput: {\n marginTop: theme.spacing(1),\n },\n swatchContainer: {\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: 5,\n marginTop: theme.spacing(1),\n },\n}));\n/**\n * Component for the user to choose a color from a gradient-based hue/saturation\n * (and optionally alpha) color-picker or from the given swatch colors.\n */\nexport function ColorPicker({ value, onChange, swatchColors, colorToHex = colorToHexDefault, disableAlpha = false, labels = {}, }) {\n const { classes } = useStyles();\n const { textFieldPlaceholder = 'Ex: \"#7cb5ec\"' } = labels;\n const inputRef = useRef(null);\n useEffect(() => {\n // Any time the color changes external to the text input, update the text\n // input to show the latest value, unless the input is currently focused\n // (since the user may be in the middle of editing)\n if (inputRef.current && inputRef.current !== document.activeElement) {\n inputRef.current.value = value;\n }\n }, [value]);\n const swatchColorObjects = (swatchColors !== null && swatchColors !== void 0 ? swatchColors : []).map((swatchColor) => typeof swatchColor === \"string\" ? { value: swatchColor } : swatchColor);\n const colorValueAsHex = colorToHex(value);\n return (_jsxs(_Fragment, { children: [disableAlpha ? (_jsx(HexColorPicker, { color: colorValueAsHex !== null && colorValueAsHex !== void 0 ? colorValueAsHex : \"#000000\", onChange: (color) => onChange(color, \"gradient\"), className: classes.gradientPicker })) : (_jsx(HexAlphaColorPicker, { color: colorValueAsHex !== null && colorValueAsHex !== void 0 ? colorValueAsHex : \"#000000\", onChange: (color) => onChange(color, \"gradient\"), className: classes.gradientPicker })), _jsx(TextField, { placeholder: textFieldPlaceholder, variant: \"outlined\", size: \"small\", defaultValue: value || \"\", inputRef: inputRef, spellCheck: false, className: classes.colorTextInput, onChange: (event) => {\n const newColor = event.target.value;\n const newHexColor = colorToHex(newColor);\n if (newHexColor) {\n onChange(newHexColor, \"text\");\n }\n }, fullWidth: true }), swatchColorObjects.length > 0 && (_jsx(\"div\", { className: classes.swatchContainer, children: swatchColorObjects.map((swatchColor) => (_jsx(ColorSwatchButton, { value: swatchColor.value, label: swatchColor.label, onClick: () => { var _a; return onChange((_a = swatchColor.value) !== null && _a !== void 0 ? _a : \"\", \"swatch\"); }, \n // We'll show the swatch as active if this swatch color is naively\n // equal to the current color, if this swatch is for \"transparent\"\n // and no color is set, or if the color matches when parsing and\n // converting both colors to hex.\n active: swatchColor.value == value ||\n (!swatchColor.value && !value) ||\n (!!swatchColor.value &&\n !!colorValueAsHex &&\n colorToHex(swatchColor.value) === colorValueAsHex) }, swatchColor.value))) }))] }));\n}\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Button, ClickAwayListener, Fade, Paper, Popper, Stack, Tooltip, } from \"@mui/material\";\nimport { useEffect, useState } from \"react\";\nimport { makeStyles } from \"tss-react/mui\";\nimport { Z_INDEXES } from \"../styles\";\nimport { ColorPicker } from \"./ColorPicker\";\n// NOTE: This component's state logic is able to be kept simple because the\n// component is unmounted whenever the outer Popper is not open, so we don't\n// have to worry about resetting the state ourselves when the user cancels, for\n// instance.\nexport function ColorPickerPopperBody({ value, onCancel, onSave, swatchColors, labels = {}, ColorPickerProps, }) {\n const { removeColorButton = \"None\", removeColorButtonTooltipTitle = \"\", cancelButton = \"Cancel\", saveButton = \"OK\", } = labels;\n // Because color can change rapidly as the user drags the color in the\n // ColorPicker gradient, we'll wait until \"Save\" to call the onSave prop, and\n // we'll store an internal localColor until then. (This could alternatively be\n // implemented such that we \"save\" directly whenever a swatch preset is\n // clicked, by looking at the `source` from `ColorPicker.onChange`, but it may\n // be useful to tweak a color from a swatch before saving.)\n const [localColor, setLocalColor] = useState(value);\n // Update our internal value whenever the `color` prop changes (since this is\n // a controlled component)\n useEffect(() => {\n setLocalColor(value);\n }, [value]);\n return (_jsxs(_Fragment, { children: [_jsx(ColorPicker, { swatchColors: swatchColors, value: localColor, onChange: (newColor) => {\n setLocalColor(newColor);\n }, labels: labels, ...ColorPickerProps }), _jsxs(Stack, { direction: \"row\", justifyContent: \"space-between\", sx: { mt: 1 }, children: [_jsx(Tooltip, { title: removeColorButtonTooltipTitle, arrow: true, children: _jsx(Button, { onClick: () => {\n // No color being specified can mean \"none\" in some scenarios\n // (e.g. highlighting) and \"default color\"/reset in others (text)\n onSave(\"\");\n }, size: \"small\", children: removeColorButton }) }), _jsx(Button, { onClick: onCancel, size: \"small\", children: cancelButton }), _jsx(Button, { onClick: () => {\n onSave(localColor);\n }, size: \"small\", children: saveButton })] })] }));\n}\nconst useStyles = makeStyles({ name: { ColorPickerPopper } })({\n root: {\n zIndex: Z_INDEXES.BUBBLE_MENU,\n // This width seems to work well to allow exactly 8 swatches, as well as the\n // default button content\n width: 235,\n },\n});\n/**\n * Renders the ColorPicker inside of a Popper interface, for use with the\n * MenuButtonColorPicker.\n */\nexport function ColorPickerPopper({ value, onSave, onCancel, swatchColors, ColorPickerProps, labels, ...popperProps }) {\n const { classes, cx } = useStyles();\n return (_jsx(Popper, { transition: true, placement: \"bottom-start\", ...popperProps, className: cx(classes.root, popperProps.className), children: ({ TransitionProps }) => (_jsx(Fade, { ...TransitionProps, timeout: 100, children: _jsx(\"div\", { children: _jsx(ClickAwayListener\n // Listen for \"leading\" events (the start of a click or touch)\n // rather than the trailing events (the end of a click) which is\n // the default, since it's easy to accidentally drag the\n // color-picker saturation/hue gradients beyond the edge of the\n // Popper, and we don't want to close in that situation.\n , { \n // Listen for \"leading\" events (the start of a click or touch)\n // rather than the trailing events (the end of a click) which is\n // the default, since it's easy to accidentally drag the\n // color-picker saturation/hue gradients beyond the edge of the\n // Popper, and we don't want to close in that situation.\n mouseEvent: \"onMouseDown\", touchEvent: \"onTouchStart\", onClickAway: onCancel, children: _jsx(Paper, { elevation: 5, sx: { p: 2.5, pb: 1 }, children: _jsx(ColorPickerPopperBody, { value: value || \"\", onSave: onSave, onCancel: onCancel, swatchColors: swatchColors, ColorPickerProps: ColorPickerProps, labels: labels }) }) }) }) })) }));\n}\n","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useState } from \"react\";\nimport { makeStyles } from \"tss-react/mui\";\nimport { FormatColorBar } from \"../icons\";\nimport { ColorPickerPopper } from \"./ColorPickerPopper\";\nimport MenuButton, { MENU_BUTTON_FONT_SIZE_DEFAULT, } from \"./MenuButton\";\nconst useStyles = makeStyles({ name: { MenuButtonColorPicker } })((theme) => ({\n menuButtonIcon: {\n fontSize: MENU_BUTTON_FONT_SIZE_DEFAULT,\n },\n colorIndicatorIcon: {\n position: \"absolute\",\n },\n colorIndicatorIconDisabled: {\n color: theme.palette.action.disabled,\n },\n}));\nexport function MenuButtonColorPicker({ value: colorValue, onChange, swatchColors, labels, hideColorIndicator = false, popperId, PopperProps, ColorPickerProps, ...menuButtonProps }) {\n const { classes, cx } = useStyles();\n const [anchorEl, setAnchorEl] = useState(null);\n const handleClose = () => setAnchorEl(null);\n const { IconComponent, children, ...otherMenuButtonProps } = menuButtonProps;\n return (_jsxs(_Fragment, { children: [_jsx(MenuButton, { onClick: (e) => anchorEl ? handleClose() : setAnchorEl(e.currentTarget), \"aria-describedby\": popperId, ...otherMenuButtonProps, children: children !== null && children !== void 0 ? children : (_jsxs(_Fragment, { children: [IconComponent && (_jsx(IconComponent, { className: classes.menuButtonIcon })), !hideColorIndicator && colorValue && (_jsx(FormatColorBar, { className: cx(classes.menuButtonIcon, classes.colorIndicatorIcon, menuButtonProps.disabled && classes.colorIndicatorIconDisabled), style: menuButtonProps.disabled ? undefined : { color: colorValue } }))] })) }), _jsx(ColorPickerPopper, { id: popperId, open: !!anchorEl, anchorEl: anchorEl, value: colorValue !== null && colorValue !== void 0 ? colorValue : \"\", onSave: (newColor) => {\n onChange(newColor);\n handleClose();\n }, onCancel: handleClose, swatchColors: swatchColors, ColorPickerProps: ColorPickerProps, labels: labels, ...PopperProps })] }));\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Link } from \"@mui/icons-material\";\nimport { useRef } from \"react\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonEditLink(props) {\n const editor = useRichTextEditorContext();\n const buttonRef = useRef(null);\n return (_jsx(MenuButton, { buttonRef: buttonRef, tooltipLabel: \"Link\", tooltipShortcutKeys: [\"mod\", \"Shift\", \"U\"], IconComponent: Link, selected: editor === null || editor === void 0 ? void 0 : editor.isActive(\"link\"), disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable), onClick: () => \n // When clicking the button to open the bubble menu, we'll place the\n // menu below the button\n editor === null || editor === void 0 ? void 0 : editor.commands.openLinkBubbleMenu({\n anchorEl: buttonRef.current,\n placement: \"bottom\",\n }), ...props }));\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { createSvgIcon } from \"@mui/material\";\n/**\n * A modified version of the FormatInkHighlighter icon, with the horizontal bar\n * below the highlighter removed.\n *\n * This allows us to control/render the color of the bar independently, via a\n * separate icon (mui-tipap's FormatColorBar).\n */\nconst FormatInkHighlighterNoBar = createSvgIcon(_jsx(\"path\", { d: \"M 10.6 8 l 5.4 5.425 l -4 4 q -0.6 0.6 -1.413 0.6 t -1.412 -0.6 L 8.5 18 h -5 l 3.15 -3.125 q -0.6 -0.6 -0.625 -1.438 T 6.6 12 l 4 -4 Z M 12 6.575 L 16 2.6 q 0.6 -0.6 1.413 -0.6 t 1.412 0.6 l 2.6 2.575 q 0.6 0.6 0.6 1.413 T 21.425 8 l -4 4 L 12 6.575 Z\" }), \"FormatInkHighlighterNoBar\");\nexport default FormatInkHighlighterNoBar;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport { useRichTextEditorContext } from \"../context\";\nimport { FormatInkHighlighterNoBar } from \"../icons\";\nimport { MenuButtonColorPicker, } from \"./MenuButtonColorPicker\";\n/**\n * Control for a user to choose a text highlight color, for the\n * @tiptap/extension-highlight when it's configured with\n * `Highlight.configure({ multicolor: true })`.\n *\n * See also MenuButtonHighlightToggle for a simple \"on off\" highlight toggle\n * control, for use with the Highlight extension when not using multicolor.\n */\nexport default function MenuButtonHighlightColor({ defaultMarkColor = \"#ffff00\", ...menuButtonProps }) {\n const editor = useRichTextEditorContext();\n const currentHighlightColor = (editor === null || editor === void 0 ? void 0 : editor.isActive(\"highlight\"))\n ? // If there's no color set for the highlight (as can happen with the\n // highlight keyboard shortcut, toggleHighlight/setHighlight when no\n // explicit color is provided, and the \"==thing==\" syntax), fall back to\n // the provided defaultMarkColor\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n editor.getAttributes(\"highlight\").color ||\n defaultMarkColor\n : \"\";\n return (_jsx(MenuButtonColorPicker, { IconComponent: FormatInkHighlighterNoBar, tooltipLabel: \"Highlight color\", tooltipShortcutKeys: [\"mod\", \"Shift\", \"H\"], value: currentHighlightColor, onChange: (newColor) => {\n if (newColor) {\n editor === null || editor === void 0 ? void 0 : editor.chain().focus().setHighlight({ color: newColor }).run();\n }\n else {\n editor === null || editor === void 0 ? void 0 : editor.chain().focus().unsetHighlight().run();\n }\n }, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleHighlight(), ...menuButtonProps, labels: {\n removeColorButton: \"None\",\n removeColorButtonTooltipTitle: \"Remove highlighting from this text\",\n ...menuButtonProps.labels,\n } }));\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport HorizontalRuleIcon from \"@mui/icons-material/HorizontalRule\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonHorizontalRule(props) {\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Insert horizontal line\", IconComponent: HorizontalRuleIcon, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().setHorizontalRule(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().setHorizontalRule().run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M19 7v2.99s-1.99.01-2 0V7h-3s.01-1.99 0-2h3V2h2v3h3v2zm-3 4V8h-3V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8zM5 19l3-4 2 3 3-4 4 5z\"\n}), 'AddPhotoAlternate');","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { AddPhotoAlternate } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\n/**\n * Render a button for adding an image to the editor content. You must provide\n * your own `onClick` prop in order to specify *how* the image is added. For\n * instance, you might open a popup for the user to provide an image URL, or you\n * might trigger a file upload via file input dialog.\n *\n * Once the image URL is ready (after the user has filled it out or after an\n * upload has completed), you can typically use something like:\n *\n * editor.chain().focus().setImage({ src: url }).run()\n *\n * See Tiptap's example here https://tiptap.dev/api/nodes/image.\n */\nexport default function MenuButtonAddImage({ ...props }) {\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Insert image\", IconComponent: AddPhotoAlternate, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) ||\n // We can use any URL here for testing `can` (to see if an image can be\n // added to the editor currently)\n !editor.can().setImage({ src: \"http://example.com\" }), ...props }));\n}\n","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useRef } from \"react\";\nimport { useRichTextEditorContext } from \"../context\";\nimport { insertImages } from \"../utils\";\nimport MenuButtonAddImage from \"./MenuButtonAddImage\";\n/**\n * Render a button for uploading one or more images to insert into the editor\n * content. You must provide the `onUploadFiles` prop in order to specify how to\n * handle the user-selected files, like uploading them to a server which returns\n * a servable image URL, or converting the image files into a local object URL\n * or base64-encoded image URL.\n */\nexport default function MenuButtonImageUpload({ onUploadFiles, inputProps, ...props }) {\n const editor = useRichTextEditorContext();\n const fileInput = useRef(null);\n const handleAndInsertNewFiles = async (files) => {\n if (!editor || editor.isDestroyed || files.length === 0) {\n return;\n }\n const attributesForImages = await onUploadFiles(Array.from(files));\n insertImages({\n editor,\n images: attributesForImages,\n });\n };\n return (_jsxs(_Fragment, { children: [_jsx(MenuButtonAddImage, { tooltipLabel: \"Upload images\", onClick: () => { var _a; return (_a = fileInput.current) === null || _a === void 0 ? void 0 : _a.click(); }, ...props }), _jsx(\"input\", { ref: fileInput, type: \"file\", accept: \"image/*\", multiple: true, onChange: async (event) => {\n if (event.target.files) {\n await handleAndInsertNewFiles(event.target.files);\n }\n }, style: { display: \"none\" }, ...inputProps })] }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M3 21h18v-2H3zM3 8v8l4-4zm8 9h10v-2H11zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z\"\n}), 'FormatIndentIncrease');","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { FormatIndentIncrease } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonIndent(props) {\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Indent\", tooltipShortcutKeys: [\"Tab\"], IconComponent: FormatIndentIncrease, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().sinkListItem(\"listItem\"), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().sinkListItem(\"listItem\").run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z\"\n}), 'FormatItalic');","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport { FormatItalic } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonItalic(props) {\n var _a;\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Italic\", tooltipShortcutKeys: [\"mod\", \"I\"], IconComponent: FormatItalic, selected: (_a = editor === null || editor === void 0 ? void 0 : editor.isActive(\"italic\")) !== null && _a !== void 0 ? _a : false, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleItalic(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleItalic().run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z\"\n}), 'FormatListNumbered');","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport { FormatListNumbered } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonOrderedList(props) {\n var _a;\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Ordered list\", tooltipShortcutKeys: [\"mod\", \"Shift\", \"7\"], IconComponent: FormatListNumbered, selected: (_a = editor === null || editor === void 0 ? void 0 : editor.isActive(\"orderedList\")) !== null && _a !== void 0 ? _a : false, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleOrderedList(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleOrderedList().run(), ...props }));\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport RedoIcon from \"@mui/icons-material/Redo\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonRedo(props) {\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Redo\", tooltipShortcutKeys: [\"mod\", \"Shift\", \"Z\"], IconComponent: RedoIcon, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().redo(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().redo().run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5z\"\n}), 'FormatClear');","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { FormatClear } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\n/**\n * A control button removes all inline formatting of marks by calling Tiptap’s\n * unsetAllMarks command (https://tiptap.dev/api/commands/unset-all-marks).\n */\nexport default function MenuButtonRemoveFormatting(props) {\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Remove inline formatting\", IconComponent: FormatClear, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().unsetAllMarks(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().unsetAllMarks().run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M6.85 7.08C6.85 4.37 9.45 3 12.24 3c1.64 0 3 .49 3.9 1.28.77.65 1.46 1.73 1.46 3.24h-3.01c0-.31-.05-.59-.15-.85-.29-.86-1.2-1.28-2.25-1.28-1.86 0-2.34 1.02-2.34 1.7 0 .48.25.88.74 1.21.38.25.77.48 1.41.7H7.39c-.21-.34-.54-.89-.54-1.92M21 12v-2H3v2h9.62c1.15.45 1.96.75 1.96 1.97 0 1-.81 1.67-2.28 1.67-1.54 0-2.93-.54-2.93-2.51H6.4c0 .55.08 1.13.24 1.58.81 2.29 3.29 3.3 5.67 3.3 2.27 0 5.3-.89 5.3-4.05 0-.3-.01-1.16-.48-1.94H21z\"\n}), 'StrikethroughS');","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport { StrikethroughS } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonStrikethrough(props) {\n var _a;\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Strikethrough\", tooltipShortcutKeys: [\"mod\", \"Shift\", \"X\"], IconComponent: StrikethroughS, selected: (_a = editor === null || editor === void 0 ? void 0 : editor.isActive(\"strike\")) !== null && _a !== void 0 ? _a : false, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleStrike(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleStrike().run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M22 18h-2v1h3v1h-4v-2c0-.55.45-1 1-1h2v-1h-3v-1h3c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1M5.88 18h2.66l3.4-5.42h.12l3.4 5.42h2.66l-4.65-7.27L17.81 4h-2.68l-3.07 4.99h-.12L8.85 4H6.19l4.32 6.73z\"\n}), 'Subscript');","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport { Subscript } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonSubscript(props) {\n var _a;\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Subscript\", tooltipShortcutKeys: [\"mod\", \",\"], IconComponent: Subscript, selected: (_a = editor === null || editor === void 0 ? void 0 : editor.isActive(\"subscript\")) !== null && _a !== void 0 ? _a : false, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleSubscript(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleSubscript().run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M22 7h-2v1h3v1h-4V7c0-.55.45-1 1-1h2V5h-3V4h3c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1M5.88 20h2.66l3.4-5.42h.12l3.4 5.42h2.66l-4.65-7.27L17.81 6h-2.68l-3.07 4.99h-.12L8.85 6H6.19l4.32 6.73z\"\n}), 'Superscript');","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport { Superscript } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonSuperscript(props) {\n var _a;\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Superscript\", tooltipShortcutKeys: [\"mod\", \".\"], IconComponent: Superscript, selected: (_a = editor === null || editor === void 0 ? void 0 : editor.isActive(\"superscript\")) !== null && _a !== void 0 ? _a : false, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleSuperscript(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleSuperscript().run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M22 7h-9v2h9zm0 8h-9v2h9zM5.54 11 2 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41zm0 8L2 15.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z\"\n}), 'Checklist');","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport { Checklist } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonTaskList(props) {\n var _a;\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Task checklist\", tooltipShortcutKeys: [\"mod\", \"Shift\", \"9\"], IconComponent: Checklist, selected: (_a = editor === null || editor === void 0 ? void 0 : editor.isActive(\"taskList\")) !== null && _a !== void 0 ? _a : false, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleTaskList(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleTaskList().run(), ...props }));\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { createSvgIcon } from \"@mui/material\";\n/**\n * A modified version of the FormatColorText icon from @mui/icons-material, with\n * the horizontal bar below the \"A\" letter removed.\n *\n * This allows us to control/render the color of the bar independently, via a\n * separate icon (mui-tipap's FormatColorBar).\n */\nconst FormatColorTextNoBar = createSvgIcon(_jsx(\"path\", { d: \"M 5.49 17 h 2.42 l 1.27 -3.58 h 5.65 L 16.09 17 h 2.42 L 13.25 3 h -2.5 L 5.49 17 z m 4.42 -5.61 l 2.03 -5.79 h 0.12 l 2.03 5.79 H 9.91 z\" }), \"FormatColorTextNoBar\");\nexport default FormatColorTextNoBar;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useRichTextEditorContext } from \"../context\";\nimport { FormatColorTextNoBar } from \"../icons\";\nimport { getAttributesForEachSelected } from \"../utils\";\nimport { MenuButtonColorPicker, } from \"./MenuButtonColorPicker\";\nexport default function MenuButtonTextColor({ IconComponent = FormatColorTextNoBar, tooltipLabel = \"Text color\", defaultTextColor = \"\", ...menuButtonProps }) {\n const editor = useRichTextEditorContext();\n // Determine if all of the selected content shares the same set color.\n const allCurrentTextStyleAttrs = editor\n ? getAttributesForEachSelected(editor.state, \"textStyle\")\n : [];\n const isTextStyleAppliedToEntireSelection = !!(editor === null || editor === void 0 ? void 0 : editor.isActive(\"textStyle\"));\n const currentColors = allCurrentTextStyleAttrs.map(\n // Treat any null/missing color as the default color\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n (attrs) => attrs.color || defaultTextColor);\n if (!isTextStyleAppliedToEntireSelection) {\n // If there is some selected content that does not have textStyle, we can\n // treat it the same as a selected textStyle mark with color set to the\n // default\n currentColors.push(defaultTextColor);\n }\n const numUniqueCurrentColors = new Set(currentColors).size;\n let currentColor;\n if (numUniqueCurrentColors === 1) {\n // There's exactly one color in the selected content, so show that\n currentColor = currentColors[0];\n }\n else if (numUniqueCurrentColors > 1) {\n // There are multiple colors (either explicitly, or because some of the\n // selection has a color set and some does not and is using the default\n // color). Similar to other rich text editors like Google Docs, we'll treat\n // this as \"unset\" and not show a color indicator in the button or a\n // \"current\" color when interacting with the color picker.\n currentColor = \"\";\n }\n else {\n // Since no color was set anywhere in the selected content, we should show\n // the default color\n currentColor = defaultTextColor;\n }\n return (_jsx(MenuButtonColorPicker, { IconComponent: IconComponent, tooltipLabel: tooltipLabel, value: currentColor, onChange: (newColor) => {\n editor === null || editor === void 0 ? void 0 : editor.chain().focus().setColor(newColor).run();\n }, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().setColor(\"#000\"), ...menuButtonProps, labels: { removeColorButton: \"Reset\", ...menuButtonProps.labels } }));\n}\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Tooltip, Typography, alpha } from \"@mui/material\";\nimport { makeStyles } from \"tss-react/mui\";\nimport { getModShortcutKey } from \"../utils/platform\";\nconst useStyles = makeStyles({ name: { MenuButtonTooltip } })((theme) => ({\n titleContainer: {\n textAlign: \"center\",\n },\n label: {\n fontSize: theme.typography.pxToRem(13),\n },\n shortcutKey: {\n fontSize: theme.typography.pxToRem(12),\n border: `1px solid ${alpha(theme.palette.text.secondary, 0.2)}`,\n backgroundColor: alpha(theme.palette.background.paper, 0.3),\n height: \"19px\",\n lineHeight: \"19px\",\n padding: \"0 4px\",\n minWidth: 17,\n borderRadius: theme.shape.borderRadius,\n display: \"inline-block\",\n \"&:not(:first-of-type)\": {\n marginLeft: 1,\n },\n },\n}));\nexport default function MenuButtonTooltip({ label, shortcutKeys, placement = \"top\", contentWrapperClassName, children, ...otherTooltipProps }) {\n const { classes } = useStyles();\n return (_jsx(Tooltip, { title: label || (shortcutKeys && shortcutKeys.length > 0) ? (_jsxs(\"div\", { className: classes.titleContainer, children: [_jsx(\"div\", { className: classes.label, children: label }), shortcutKeys && shortcutKeys.length > 0 && (_jsx(Typography, { variant: \"body2\", component: \"div\", children: shortcutKeys.map((shortcutKey, index) => (_jsx(\"span\", { className: classes.shortcutKey, children: shortcutKey === \"mod\" ? getModShortcutKey() : shortcutKey }, index))) }))] })) : (\"\"), placement: placement, arrow: true, ...otherTooltipProps, children: _jsx(\"span\", { className: contentWrapperClassName, children: children }) }));\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport FormatUnderlinedIcon from \"@mui/icons-material/FormatUnderlined\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonUnderline(props) {\n var _a;\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Underline\", tooltipShortcutKeys: [\"mod\", \"U\"], IconComponent: FormatUnderlinedIcon, selected: (_a = editor === null || editor === void 0 ? void 0 : editor.isActive(\"underline\")) !== null && _a !== void 0 ? _a : false, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().toggleUnderline(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleUnderline().run(), ...props }));\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\n/// \nimport UndoIcon from \"@mui/icons-material/Undo\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonUndo(props) {\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Undo\", tooltipShortcutKeys: [\"mod\", \"Z\"], IconComponent: UndoIcon, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().undo(), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().undo().run(), ...props }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M11 17h10v-2H11zm-8-5 4 4V8zm0 9h18v-2H3zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z\"\n}), 'FormatIndentDecrease');","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { FormatIndentDecrease } from \"@mui/icons-material\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButton from \"./MenuButton\";\nexport default function MenuButtonUnindent(props) {\n const editor = useRichTextEditorContext();\n return (_jsx(MenuButton, { tooltipLabel: \"Unindent\", tooltipShortcutKeys: [\"Shift\", \"Tab\"], IconComponent: FormatIndentDecrease, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().liftListItem(\"listItem\"), onClick: () => editor === null || editor === void 0 ? void 0 : editor.chain().focus().liftListItem(\"listItem\").run(), ...props }));\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { makeStyles } from \"tss-react/mui\";\nimport DebounceRender from \"../utils/DebounceRender\";\nconst useStyles = makeStyles({\n name: { MenuControlsContainer: MenuControlsContainer },\n})((theme) => {\n return {\n root: {\n display: \"flex\",\n rowGap: theme.spacing(0.3),\n columnGap: theme.spacing(0.3),\n alignItems: \"center\",\n flexWrap: \"wrap\",\n },\n };\n});\n/** Provides consistent spacing between different editor controls components. */\nexport default function MenuControlsContainer({ children, className, debounced, DebounceProps, }) {\n const { classes, cx } = useStyles();\n const content = _jsx(\"div\", { className: cx(classes.root, className), children: children });\n return debounced ? (_jsx(DebounceRender, { ...DebounceProps, children: content })) : (content);\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Select, outlinedInputClasses, selectClasses, svgIconClasses, } from \"@mui/material\";\nimport { useState } from \"react\";\nimport { makeStyles } from \"tss-react/mui\";\nimport MenuButtonTooltip from \"./MenuButtonTooltip\";\nconst useStyles = makeStyles({ name: { MenuSelect } })((theme) => {\n return {\n rootTooltipWrapper: {\n display: \"inline-flex\",\n },\n selectRoot: {\n // Don't show the default outline when not hovering or focused, for better\n // style consistency with the MenuButtons\n [`&:not(:hover):not(.${outlinedInputClasses.focused}) .${outlinedInputClasses.notchedOutline}`]: {\n borderWidth: 0,\n },\n [`& .${svgIconClasses.root}`]: {\n // Ensure that if an icon is used as the `renderValue` result, it uses\n // the same color as the default ToggleButton icon and the Select\n // dropdown arrow icon\n // https://github.com/mui/material-ui/blob/2cb9664b16d5a862a3796add7c8e3b088b47acb5/packages/mui-material/src/ToggleButton/ToggleButton.js#L60,\n // https://github.com/mui/material-ui/blob/0b7beb93c9015da6e35c2a31510f679126cf0de1/packages/mui-material/src/NativeSelect/NativeSelectInput.js#L96\n color: theme.palette.action.active,\n },\n [`&.${selectClasses.disabled} .${svgIconClasses.root}`]: {\n // Matching\n // https://github.com/mui/material-ui/blob/2cb9664b16d5a862a3796add7c8e3b088b47acb5/packages/mui-material/src/ToggleButton/ToggleButton.js#L65\n color: theme.palette.action.disabled,\n },\n },\n select: {\n // Increase specificity to override MUI's styles\n \"&&&\": {\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(3),\n },\n },\n selectDropdownIcon: {\n // Move the caret icon closer to the right than default so the button is\n // more compact\n right: 1,\n },\n input: {\n paddingTop: \"3px\",\n paddingBottom: \"3px\",\n fontSize: \"0.9em\",\n },\n };\n});\n/** A Select that is styled to work well with other menu bar controls. */\nexport default function MenuSelect({ tooltipTitle, ...selectProps }) {\n var _a, _b, _c;\n const { classes, cx } = useStyles();\n // We use a controlled tooltip here because otherwise it seems the tooltip can\n // get stuck open after selecting something (as it can re-trigger the\n // Tooltip's onOpen upon clicking a MenuItem). We instead trigger it to\n // open/close based on interaction specifically with the Select (not the usual\n // Tooltip onOpen/onClose)\n const [tooltipOpen, setTooltipOpen] = useState(false);\n const select = (_jsx(Select, { margin: \"none\", variant: \"outlined\", size: \"small\", ...selectProps, onMouseEnter: (...args) => {\n var _a;\n setTooltipOpen(true);\n (_a = selectProps.onMouseEnter) === null || _a === void 0 ? void 0 : _a.call(selectProps, ...args);\n }, onMouseLeave: (...args) => {\n var _a;\n setTooltipOpen(false);\n (_a = selectProps.onMouseLeave) === null || _a === void 0 ? void 0 : _a.call(selectProps, ...args);\n }, onClick: (...args) => {\n var _a;\n setTooltipOpen(false);\n (_a = selectProps.onClick) === null || _a === void 0 ? void 0 : _a.call(selectProps, ...args);\n }, inputProps: {\n ...selectProps.inputProps,\n className: cx(classes.input, (_a = selectProps.inputProps) === null || _a === void 0 ? void 0 : _a.className),\n }, \n // Always show the dropdown options directly below the select input,\n // aligned to left-most edge\n MenuProps: {\n anchorOrigin: {\n vertical: \"bottom\",\n horizontal: \"left\",\n },\n transformOrigin: {\n vertical: \"top\",\n horizontal: \"left\",\n },\n ...selectProps.MenuProps,\n }, className: cx(classes.selectRoot, selectProps.className), classes: {\n ...selectProps.classes,\n select: cx(classes.select, (_b = selectProps.classes) === null || _b === void 0 ? void 0 : _b.select),\n icon: cx(classes.selectDropdownIcon, (_c = selectProps.classes) === null || _c === void 0 ? void 0 : _c.icon),\n } }));\n return tooltipTitle ? (_jsx(MenuButtonTooltip, { label: tooltipTitle, contentWrapperClassName: classes.rootTooltipWrapper, open: tooltipOpen, children: select })) : (select);\n}\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/// \nimport { MenuItem } from \"@mui/material\";\nimport { makeStyles } from \"tss-react/mui\";\nimport { useRichTextEditorContext } from \"../context\";\nimport { getAttributesForEachSelected } from \"../utils/getAttributesForEachSelected\";\nimport MenuSelect from \"./MenuSelect\";\nconst useStyles = makeStyles({ name: { MenuSelectFontFamily } })({\n selectInput: {\n // We use a fixed width so that the Select element won't change sizes as\n // the selected option changes\n width: 55,\n },\n});\n// Use this as a sentinel value so we can handle the case that the user's\n// selection includes multiple different font families. There won't be a visible\n// \"option\" in the Select for this value, and this will allow the user to set\n// the current font family to \"Default\" or to any of the multiple values, and\n// have it take effect. See more comments around `currentFontFamily` below.\nconst MULTIPLE_FAMILIES_SELECTED_VALUE = \"MULTIPLE\";\n/** A font-family selector for use with the Tiptap FontFamily extension. */\nexport default function MenuSelectFontFamily({ options, hideUnsetOption = false, unsetOptionLabel = \"Default\", emptyLabel = \"Font\", ...menuSelectProps }) {\n var _a;\n const { classes, cx } = useStyles();\n const editor = useRichTextEditorContext();\n // Determine if all of the selected content shares the same set font family.\n // Scenarios:\n // 1) If there is exactly one font family amongst the selected content and all\n // of the selected content has the font family set, we'll show that as the\n // current Selected value (as a user would expect).\n // 2) If there are multiple families used in the selected content or some\n // selected content has font family set and other content does not, we'll\n // assign the Select's `value` to a sentinel variable so that users can\n // unset the families or can change to any given family.\n // 3) Otherwise (no font family is set in any selected content), we'll show the\n // unsetOption as selected.\n const allCurrentTextStyleAttrs = editor\n ? getAttributesForEachSelected(editor.state, \"textStyle\")\n : [];\n const isTextStyleAppliedToEntireSelection = !!(editor === null || editor === void 0 ? void 0 : editor.isActive(\"textStyle\"));\n const currentFontFamilies = allCurrentTextStyleAttrs.map((attrs) => { var _a; return (_a = attrs.fontFamily) !== null && _a !== void 0 ? _a : \"\"; } // Treat any null/missing font-family as \"\"\n );\n if (!isTextStyleAppliedToEntireSelection) {\n // If there is some selected content that does not have textStyle, we can\n // treat it the same as a selected textStyle mark with fontFamily set to\n // null or \"\"\n currentFontFamilies.push(\"\");\n }\n const numUniqueCurrentFontFamilies = new Set(currentFontFamilies).size;\n let currentFontFamily;\n if (numUniqueCurrentFontFamilies === 1) {\n // There's exactly one font family selected, so show that\n currentFontFamily = currentFontFamilies[0];\n }\n else if (numUniqueCurrentFontFamilies > 1) {\n // There are multiple font families (either explicitly, or because some of the\n // selection has a font family set and some does not). This is similar to what\n // Microsoft Word and Google Docs do, for instance, showing the font family\n // input as blank when there are multiple values. If we simply set\n // currentFontFamily as \"\" here, then the \"unset option\" would show as\n // selected, which would prevent the user from unsetting the font families\n // for the selected content (since Select onChange does not fire when the\n // currently selected option is chosen again).\n currentFontFamily = MULTIPLE_FAMILIES_SELECTED_VALUE;\n }\n else {\n // Show as unset (empty), since there are no font families in any of the\n // selected content. This will show the \"unset option\" with the\n // unsetOptionLabel as selected, if `hideUnsetOption` is false.\n currentFontFamily = \"\";\n }\n return (_jsxs(MenuSelect, { onChange: (event) => {\n const value = event.target.value;\n if (value) {\n editor === null || editor === void 0 ? void 0 : editor.chain().setFontFamily(value).focus().run();\n }\n else {\n editor === null || editor === void 0 ? void 0 : editor.chain().unsetFontFamily().focus().run();\n }\n }, disabled: \n // Pass an arbitrary value just to check `can()`\n !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().setFontFamily(\"serif\"), renderValue: (value) => {\n var _a, _b;\n if (!value || value === MULTIPLE_FAMILIES_SELECTED_VALUE) {\n return emptyLabel;\n }\n return (_b = (_a = options.find((option) => option.value === value)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : value;\n }, displayEmpty: true, \"aria-label\": \"Font families\", tooltipTitle: \"Font\", ...menuSelectProps, \n // We don't want to pass any non-string falsy values here, always falling\n // back to \"\"\n value: currentFontFamily || \"\", inputProps: {\n ...menuSelectProps.inputProps,\n className: cx(classes.selectInput, (_a = menuSelectProps.inputProps) === null || _a === void 0 ? void 0 : _a.className),\n }, children: [!hideUnsetOption && (\n // Allow users to unset the font-family\n _jsx(MenuItem, { value: \"\", children: unsetOptionLabel })), _jsx(MenuItem, { style: { display: \"none\" }, value: MULTIPLE_FAMILIES_SELECTED_VALUE }), options.map((fontFamilyOption) => {\n var _a;\n return (_jsx(MenuItem, { value: fontFamilyOption.value, children: _jsx(\"span\", { style: { fontFamily: fontFamilyOption.value }, children: (_a = fontFamilyOption.label) !== null && _a !== void 0 ? _a : fontFamilyOption.value }) }, fontFamilyOption.value));\n })] }));\n}\n","\"use client\";\n\nimport createSvgIcon from './utils/createSvgIcon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M9 4v3h5v12h3V7h5V4zm-6 8h3v7h3v-7h3V9H3z\"\n}), 'FormatSize');","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { FormatSize } from \"@mui/icons-material\";\nimport { MenuItem } from \"@mui/material\";\nimport { makeStyles } from \"tss-react/mui\";\nimport { useRichTextEditorContext } from \"../context\";\nimport { getAttributesForEachSelected } from \"../utils/getAttributesForEachSelected\";\nimport { MENU_BUTTON_FONT_SIZE_DEFAULT } from \"./MenuButton\";\nimport MenuSelect from \"./MenuSelect\";\nconst useStyles = makeStyles({ name: { MenuSelectFontSize } })({\n selectInput: {\n // We use a fixed width so that the Select element won't change sizes as\n // the selected option changes (which would shift other elements in the\n // menu bar), since the options may be different sizes\n width: 17,\n // Ensure that if we render an icon as the value, it's vertically aligned\n // properly\n display: \"flex\",\n alignItems: \"center\",\n },\n fontSizeIcon: {\n fontSize: MENU_BUTTON_FONT_SIZE_DEFAULT,\n },\n});\nconst DEFAULT_FONT_SIZE_SELECT_OPTIONS = [\n \"8px\",\n \"9px\",\n \"10px\",\n \"11px\",\n \"12px\",\n \"14px\",\n \"16px\",\n \"18px\",\n \"24px\",\n \"30px\",\n \"36px\",\n \"48px\",\n \"60px\",\n \"72px\",\n \"96px\",\n];\nfunction stripPxFromValue(value) {\n return value.replace(\"px\", \"\");\n}\n// Use this as a sentinel value so we can handle the case that the user's\n// selection includes multiple different font sizes. There won't be a visible\n// \"option\" in the Select for this value, and this will allow the user to set\n// the current font size to \"Default\" or to any of the multiple values, and have\n// it take effect. See more comments around `currentFontSize` below.\nconst MULTIPLE_SIZES_SELECTED_VALUE = \"MULTIPLE\";\n/** A font-size selector for use with the mui-tiptap FontSize extension. */\nexport default function MenuSelectFontSize({ options = DEFAULT_FONT_SIZE_SELECT_OPTIONS, sizeOptions, hideUnsetOption = false, unsetOptionLabel = \"Default\", unsetOptionContent, emptyLabel, emptyValue, ...menuSelectProps }) {\n var _a;\n const { classes, cx } = useStyles();\n const editor = useRichTextEditorContext();\n // Handle deprecated legacy names for some props:\n emptyLabel = emptyValue !== null && emptyValue !== void 0 ? emptyValue : emptyLabel;\n unsetOptionLabel = unsetOptionContent !== null && unsetOptionContent !== void 0 ? unsetOptionContent : unsetOptionLabel;\n options = sizeOptions !== null && sizeOptions !== void 0 ? sizeOptions : options;\n const optionObjects = (options !== null && options !== void 0 ? options : []).map((option) => (typeof option === \"string\" ? { value: option } : option));\n // Determine if all of the selected content shares the same set font size.\n // Scenarios:\n // 1) If there is exactly one font size amongst the selected content and all\n // of the selected content has the font size set, we'll show that as the\n // current Selected value (as a user would expect).\n // 2) If there are multiple sizes used in the selected content or some\n // selected content has font size set and other content does not, we'll\n // assign the Select's `value` to a sentinel variable so that users can\n // unset the sizes or can change to any given size.\n // 3) Otherwise (no font size is set in any selected content), we'll show the\n // unsetOption as selected.\n const allCurrentTextStyleAttrs = editor\n ? getAttributesForEachSelected(editor.state, \"textStyle\")\n : [];\n const isTextStyleAppliedToEntireSelection = !!(editor === null || editor === void 0 ? void 0 : editor.isActive(\"textStyle\"));\n const currentFontSizes = allCurrentTextStyleAttrs.map((attrs) => { var _a; return (_a = attrs.fontSize) !== null && _a !== void 0 ? _a : \"\"; } // Treat any null/missing font-size as \"\"\n );\n if (!isTextStyleAppliedToEntireSelection) {\n // If there is some selected content that does not have textStyle, we can\n // treat it the same as a selected textStyle mark with fontSize set to null\n // or \"\"\n currentFontSizes.push(\"\");\n }\n const numUniqueCurrentFontSizes = new Set(currentFontSizes).size;\n let currentFontSize;\n if (numUniqueCurrentFontSizes === 1) {\n // There's exactly one font size selected, so show that\n currentFontSize = currentFontSizes[0];\n }\n else if (numUniqueCurrentFontSizes > 1) {\n // There are multiple font sizes (either explicitly, or because some of the\n // selection has a font size set and some does not). This is similar to what\n // Microsoft Word and Google Docs do, for instance, showing the font size\n // input as blank when there are multiple values. If we simply set\n // currentFontSize as \"\" here, then the \"unset option\" would show as\n // selected, which would prevent the user from unsetting the font sizes\n // for the selected content (since Select onChange does not fire when the\n // currently selected option is chosen again).\n currentFontSize = MULTIPLE_SIZES_SELECTED_VALUE;\n }\n else {\n // Show as unset (empty), since there are no font sizes in any of the\n // selected content. This will show the \"unset option\" with the\n // unsetOptionLabel as selected, if `hideUnsetOption` is false.\n currentFontSize = \"\";\n }\n return (_jsxs(MenuSelect, { onChange: (event) => {\n const value = event.target.value;\n if (value) {\n editor === null || editor === void 0 ? void 0 : editor.chain().setFontSize(value).focus().run();\n }\n else {\n editor === null || editor === void 0 ? void 0 : editor.chain().unsetFontSize().focus().run();\n }\n }, disabled: \n // Pass an arbitrary value to can().setFontSize() just to check `can()`\n !(editor === null || editor === void 0 ? void 0 : editor.isEditable) || !editor.can().setFontSize(\"12px\"), renderValue: (value) => {\n if (!value || value === MULTIPLE_SIZES_SELECTED_VALUE) {\n // If a specific font size isn't set, show an icon to indicate what\n // this does, so it's visually similar to other menu button controls,\n // more intuitive, and more meaningful and compact than some other\n // placeholder value here\n return emptyLabel !== null && emptyLabel !== void 0 ? emptyLabel : _jsx(FormatSize, { className: classes.fontSizeIcon });\n }\n return stripPxFromValue(value);\n }, displayEmpty: true, \"aria-label\": \"Font sizes\", tooltipTitle: \"Font size\", ...menuSelectProps, \n // We don't want to pass any non-string falsy values here, always falling\n // back to \"\"\n value: currentFontSize || \"\", inputProps: {\n ...menuSelectProps.inputProps,\n className: cx(classes.selectInput, (_a = menuSelectProps.inputProps) === null || _a === void 0 ? void 0 : _a.className),\n }, children: [!hideUnsetOption && (\n // Allow users to unset the font size\n _jsx(MenuItem, { value: \"\", children: unsetOptionLabel })), _jsx(MenuItem, { style: { display: \"none\" }, value: MULTIPLE_SIZES_SELECTED_VALUE }), optionObjects.map((option) => {\n var _a;\n return (_jsx(MenuItem, { value: option.value, children: (_a = option.label) !== null && _a !== void 0 ? _a : stripPxFromValue(option.value) }, option.value));\n })] }));\n}\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/// \nimport { MenuItem } from \"@mui/material\";\nimport { useCallback, useMemo } from \"react\";\nimport { makeStyles } from \"tss-react/mui\";\nimport { useRichTextEditorContext } from \"../context\";\nimport { getEditorStyles } from \"../styles\";\nimport { getAttributesForEachSelected } from \"../utils/getAttributesForEachSelected\";\nimport MenuButtonTooltip from \"./MenuButtonTooltip\";\nimport MenuSelect from \"./MenuSelect\";\nconst useStyles = makeStyles({ name: { MenuSelectHeading } })((theme) => {\n const editorStyles = getEditorStyles(theme);\n return {\n selectInput: {\n // We use a fixed width so that the Select element won't change sizes as\n // the selected option changes (which would shift other elements in the\n // menu bar)\n width: 77,\n },\n menuOption: {\n // These styles ensure the item fills its MenuItem container, and the\n // tooltip appears in the same place when hovering over the item generally\n // (not just the text of the item)\n display: \"block\",\n width: \"100%\",\n },\n headingOption: {\n marginBlockStart: 0,\n marginBlockEnd: 0,\n fontWeight: \"bold\",\n },\n headingOption1: {\n fontSize: editorStyles[\"& h1\"].fontSize,\n },\n headingOption2: {\n fontSize: editorStyles[\"& h2\"].fontSize,\n },\n headingOption3: {\n fontSize: editorStyles[\"& h3\"].fontSize,\n },\n headingOption4: {\n fontSize: editorStyles[\"& h4\"].fontSize,\n },\n headingOption5: {\n fontSize: editorStyles[\"& h5\"].fontSize,\n },\n headingOption6: {\n fontSize: editorStyles[\"& h6\"].fontSize,\n },\n };\n});\nconst HEADING_OPTION_VALUES = {\n Paragraph: \"Paragraph\",\n Heading1: \"Heading 1\",\n Heading2: \"Heading 2\",\n Heading3: \"Heading 3\",\n Heading4: \"Heading 4\",\n Heading5: \"Heading 5\",\n Heading6: \"Heading 6\",\n};\nconst HEADING_OPTION_VALUE_TO_LEVEL = {\n [HEADING_OPTION_VALUES.Heading1]: 1,\n [HEADING_OPTION_VALUES.Heading2]: 2,\n [HEADING_OPTION_VALUES.Heading3]: 3,\n [HEADING_OPTION_VALUES.Heading4]: 4,\n [HEADING_OPTION_VALUES.Heading5]: 5,\n [HEADING_OPTION_VALUES.Heading6]: 6,\n};\nconst LEVEL_TO_HEADING_OPTION_VALUE = {\n 1: HEADING_OPTION_VALUES.Heading1,\n 2: HEADING_OPTION_VALUES.Heading2,\n 3: HEADING_OPTION_VALUES.Heading3,\n 4: HEADING_OPTION_VALUES.Heading4,\n 5: HEADING_OPTION_VALUES.Heading5,\n 6: HEADING_OPTION_VALUES.Heading6,\n};\nexport default function MenuSelectHeading({ labels, ...menuSelectProps }) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n const { classes, cx } = useStyles();\n const editor = useRichTextEditorContext();\n const handleHeadingType = useCallback((event) => {\n const value = event.target.value;\n if (value === HEADING_OPTION_VALUES.Paragraph) {\n editor === null || editor === void 0 ? void 0 : editor.chain().setParagraph().focus().run();\n }\n else if (value in HEADING_OPTION_VALUE_TO_LEVEL) {\n editor === null || editor === void 0 ? void 0 : editor.chain().setHeading({\n level: HEADING_OPTION_VALUE_TO_LEVEL[value],\n }).focus().run();\n }\n }, [editor]);\n let selectedValue = \"\";\n if (editor === null || editor === void 0 ? void 0 : editor.isActive(\"paragraph\")) {\n selectedValue = HEADING_OPTION_VALUES.Paragraph;\n }\n else if (editor === null || editor === void 0 ? void 0 : editor.isActive(\"heading\")) {\n const currentNodeHeadingAttributes = getAttributesForEachSelected(editor.state, \"heading\");\n const currentNodeLevels = currentNodeHeadingAttributes.map((attrs) => attrs.level);\n const numCurrentNodeLevels = new Set(currentNodeLevels).size;\n // We only want to show a selected level value if all of the selected nodes\n // have the same level. (That way a user can properly change the level when\n // selecting across two separate headings, and so we don't mistakenly just\n // show the first of the selected nodes' levels and not allow changing all\n // selected to that heading level. See\n // https://github.com/ueberdosis/tiptap/issues/3481.)\n const level = numCurrentNodeLevels === 1 ? currentNodeLevels[0] : undefined;\n if (level && level in LEVEL_TO_HEADING_OPTION_VALUE) {\n selectedValue =\n LEVEL_TO_HEADING_OPTION_VALUE[level];\n }\n }\n const isCurrentlyParagraphOrHeading = selectedValue !== \"\";\n const canSetParagraph = editor === null || editor === void 0 ? void 0 : editor.can().setParagraph();\n // We have to pass a level when running `can`, so this is just an arbitrary one\n const canSetHeading = editor === null || editor === void 0 ? void 0 : editor.can().setHeading({ level: 1 });\n // Figure out which settings the user has enabled with the heading extension\n const enabledHeadingLevels = useMemo(() => {\n var _a;\n const headingExtension = editor === null || editor === void 0 ? void 0 : editor.extensionManager.extensions.find((extension) => extension.name == \"heading\");\n return new Set((_a = headingExtension === null || headingExtension === void 0 ? void 0 : headingExtension.options.levels) !== null && _a !== void 0 ? _a : []);\n }, [editor]);\n return (\n // We currently have to specify that the value is of type\n // `HeadingOptionValue | \"\"` rather than just `HeadingOptionValue` due to\n // the bug reported here https://github.com/mui/material-ui/issues/34083. We\n // need it to support \"\" as a possible value in the `renderValue` function\n // below since we have `displayEmpty=true`, and the types don't properly\n // handle that scenario.\n _jsxs(MenuSelect, { onChange: handleHeadingType, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) ||\n (!isCurrentlyParagraphOrHeading && !canSetParagraph && !canSetHeading), displayEmpty: true, renderValue: (selected) => {\n var _a, _b;\n let result;\n if (selected === \"\") {\n // Handle the deprecated `emptyValue` label name, falling back to the\n // newer `labels.empty`, and finally our default empty label\n result = (_b = (_a = labels === null || labels === void 0 ? void 0 : labels.emptyValue) !== null && _a !== void 0 ? _a : labels === null || labels === void 0 ? void 0 : labels.empty) !== null && _b !== void 0 ? _b : _jsx(\"em\", { children: \"Change to\\u2026\" });\n }\n else if (selected === HEADING_OPTION_VALUES.Paragraph) {\n result = labels === null || labels === void 0 ? void 0 : labels.paragraph;\n }\n else if (selected === HEADING_OPTION_VALUES.Heading1) {\n result = labels === null || labels === void 0 ? void 0 : labels.heading1;\n }\n else if (selected === HEADING_OPTION_VALUES.Heading2) {\n result = labels === null || labels === void 0 ? void 0 : labels.heading2;\n }\n else if (selected === HEADING_OPTION_VALUES.Heading3) {\n result = labels === null || labels === void 0 ? void 0 : labels.heading3;\n }\n else if (selected === HEADING_OPTION_VALUES.Heading4) {\n result = labels === null || labels === void 0 ? void 0 : labels.heading4;\n }\n else if (selected === HEADING_OPTION_VALUES.Heading5) {\n result = labels === null || labels === void 0 ? void 0 : labels.heading5;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n }\n else if (selected === HEADING_OPTION_VALUES.Heading6) {\n result = labels === null || labels === void 0 ? void 0 : labels.heading6;\n }\n return result !== null && result !== void 0 ? result : selected;\n }, \"aria-label\": \"Text headings\", tooltipTitle: \"Styles\", ...menuSelectProps, value: selectedValue, inputProps: {\n ...menuSelectProps.inputProps,\n className: cx(classes.selectInput, (_a = menuSelectProps.inputProps) === null || _a === void 0 ? void 0 : _a.className),\n }, children: [_jsx(MenuItem, { value: HEADING_OPTION_VALUES.Paragraph, disabled: !isCurrentlyParagraphOrHeading && !canSetParagraph, children: _jsx(MenuButtonTooltip, { label: \"\", shortcutKeys: [\"mod\", \"alt\", \"0\"], placement: \"right\", contentWrapperClassName: classes.menuOption, children: (_b = labels === null || labels === void 0 ? void 0 : labels.paragraph) !== null && _b !== void 0 ? _b : HEADING_OPTION_VALUES.Paragraph }) }), enabledHeadingLevels.has(1) && (_jsx(MenuItem, { value: HEADING_OPTION_VALUES.Heading1, disabled: !canSetHeading, children: _jsx(MenuButtonTooltip, { label: \"\", shortcutKeys: [\"mod\", \"alt\", \"1\"], placement: \"right\", contentWrapperClassName: cx(classes.menuOption, classes.headingOption, classes.headingOption1), children: (_c = labels === null || labels === void 0 ? void 0 : labels.heading1) !== null && _c !== void 0 ? _c : HEADING_OPTION_VALUES.Heading1 }) })), enabledHeadingLevels.has(2) && (_jsx(MenuItem, { value: HEADING_OPTION_VALUES.Heading2, disabled: !canSetHeading, children: _jsx(MenuButtonTooltip, { label: \"\", shortcutKeys: [\"mod\", \"alt\", \"2\"], placement: \"right\", contentWrapperClassName: cx(classes.menuOption, classes.headingOption, classes.headingOption2), children: (_d = labels === null || labels === void 0 ? void 0 : labels.heading2) !== null && _d !== void 0 ? _d : HEADING_OPTION_VALUES.Heading2 }) })), enabledHeadingLevels.has(3) && (_jsx(MenuItem, { value: HEADING_OPTION_VALUES.Heading3, disabled: !canSetHeading, children: _jsx(MenuButtonTooltip, { label: \"\", shortcutKeys: [\"mod\", \"alt\", \"3\"], placement: \"right\", contentWrapperClassName: cx(classes.menuOption, classes.headingOption, classes.headingOption3), children: (_e = labels === null || labels === void 0 ? void 0 : labels.heading3) !== null && _e !== void 0 ? _e : HEADING_OPTION_VALUES.Heading3 }) })), enabledHeadingLevels.has(4) && (_jsx(MenuItem, { value: HEADING_OPTION_VALUES.Heading4, disabled: !canSetHeading, children: _jsx(MenuButtonTooltip, { label: \"\", shortcutKeys: [\"mod\", \"alt\", \"4\"], placement: \"right\", contentWrapperClassName: cx(classes.menuOption, classes.headingOption, classes.headingOption4), children: (_f = labels === null || labels === void 0 ? void 0 : labels.heading4) !== null && _f !== void 0 ? _f : HEADING_OPTION_VALUES.Heading4 }) })), enabledHeadingLevels.has(5) && (_jsx(MenuItem, { value: HEADING_OPTION_VALUES.Heading5, disabled: !canSetHeading, children: _jsx(MenuButtonTooltip, { label: \"\", shortcutKeys: [\"mod\", \"alt\", \"5\"], placement: \"right\", contentWrapperClassName: cx(classes.menuOption, classes.headingOption, classes.headingOption5), children: (_g = labels === null || labels === void 0 ? void 0 : labels.heading5) !== null && _g !== void 0 ? _g : HEADING_OPTION_VALUES.Heading5 }) })), enabledHeadingLevels.has(6) && (_jsx(MenuItem, { value: HEADING_OPTION_VALUES.Heading6, disabled: !canSetHeading, children: _jsx(MenuButtonTooltip, { label: \"\", shortcutKeys: [\"mod\", \"alt\", \"6\"], placement: \"right\", contentWrapperClassName: cx(classes.menuOption, classes.headingOption, classes.headingOption6), children: (_h = labels === null || labels === void 0 ? void 0 : labels.heading6) !== null && _h !== void 0 ? _h : HEADING_OPTION_VALUES.Heading6 }) }))] }));\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport FormatAlignCenterIcon from \"@mui/icons-material/FormatAlignCenter\";\nimport FormatAlignJustifyIcon from \"@mui/icons-material/FormatAlignJustify\";\nimport FormatAlignLeftIcon from \"@mui/icons-material/FormatAlignLeft\";\nimport FormatAlignRightIcon from \"@mui/icons-material/FormatAlignRight\";\nimport { MenuItem } from \"@mui/material\";\nimport { useCallback, useMemo } from \"react\";\nimport { makeStyles } from \"tss-react/mui\";\nimport { useRichTextEditorContext } from \"../context\";\nimport MenuButtonTooltip from \"./MenuButtonTooltip\";\nimport { MENU_BUTTON_FONT_SIZE_DEFAULT } from \"./MenuButton\";\nimport MenuSelect from \"./MenuSelect\";\nconst useStyles = makeStyles({ name: { MenuSelectTextAlign } })((theme) => ({\n selectInput: {\n // We use a fixed width equal to the size of the menu button icon so that\n // the Select element won't change sizes even if we show the \"blank\"\n // interface when the selected content contains multiple different text\n // alignments.\n width: MENU_BUTTON_FONT_SIZE_DEFAULT,\n },\n menuItem: {\n paddingLeft: 0,\n paddingRight: 0,\n },\n menuOption: {\n // These styles ensure the item fills its MenuItem container, and the\n // tooltip appears in the same place when hovering over the item generally\n // (not just the text of the item)\n display: \"flex\",\n width: \"100%\",\n justifyContent: \"center\",\n },\n menuButtonIcon: {\n fontSize: MENU_BUTTON_FONT_SIZE_DEFAULT,\n // For consistency with toggle button default icon color and the Select\n // dropdown arrow icon color\n // https://github.com/mui/material-ui/blob/2cb9664b16d5a862a3796add7c8e3b088b47acb5/packages/mui-material/src/ToggleButton/ToggleButton.js#L60,\n // https://github.com/mui/material-ui/blob/0b7beb93c9015da6e35c2a31510f679126cf0de1/packages/mui-material/src/NativeSelect/NativeSelectInput.js#L96\n color: theme.palette.action.active,\n },\n}));\nconst DEFAULT_ALIGNMENT_OPTIONS = [\n {\n value: \"left\",\n label: \"Left\",\n shortcutKeys: [\"mod\", \"Shift\", \"L\"],\n IconComponent: FormatAlignLeftIcon,\n },\n {\n value: \"center\",\n label: \"Center\",\n shortcutKeys: [\"mod\", \"Shift\", \"E\"],\n IconComponent: FormatAlignCenterIcon,\n },\n {\n value: \"right\",\n label: \"Right\",\n shortcutKeys: [\"mod\", \"Shift\", \"R\"],\n IconComponent: FormatAlignRightIcon,\n },\n {\n value: \"justify\",\n label: \"Justify\",\n shortcutKeys: [\"mod\", \"Shift\", \"J\"],\n IconComponent: FormatAlignJustifyIcon,\n },\n];\nexport default function MenuSelectTextAlign({ options = DEFAULT_ALIGNMENT_OPTIONS, emptyLabel = \"\", alignmentOptions, ...menuSelectProps }) {\n var _a, _b, _c;\n const { classes, cx } = useStyles();\n const editor = useRichTextEditorContext();\n // Handle the deprecated name for the `options` prop if present\n options =\n (_a = alignmentOptions === null || alignmentOptions === void 0 ? void 0 : alignmentOptions.map((option) => ({\n ...option,\n value: option.alignment,\n }))) !== null && _a !== void 0 ? _a : options;\n const handleAlignmentSelect = useCallback((event) => {\n const alignment = event.target.value;\n editor === null || editor === void 0 ? void 0 : editor.chain().setTextAlign(alignment).focus().run();\n }, [editor]);\n // Figure out which settings the user has enabled with the heading extension\n const textAlignExtensionOptions = useMemo(() => {\n const textAlignExtension = editor === null || editor === void 0 ? void 0 : editor.extensionManager.extensions.find((extension) => extension.name == \"textAlign\");\n return textAlignExtension === null || textAlignExtension === void 0 ? void 0 : textAlignExtension.options;\n }, [editor]);\n const enabledAlignments = useMemo(() => {\n return new Set(textAlignExtensionOptions === null || textAlignExtensionOptions === void 0 ? void 0 : textAlignExtensionOptions.alignments);\n }, [textAlignExtensionOptions]);\n // Only set the Select `value` as non-empty if all alignments are the same\n // (which we'll know if `isActive({ textAlign: alignment })` returns true).\n // This allows the user to change all current selected nodes' alignments to\n // any alignment, including the default alignment. If we instead set the\n // `value` as the default for instance, attempting to change multiple node's\n // alignments to that default would not work (not triggering \"onChange\").\n const selectedValue = (_b = Array.from(enabledAlignments).find((alignment) => editor === null || editor === void 0 ? void 0 : editor.isActive({ textAlign: alignment }))) !== null && _b !== void 0 ? _b : \"\";\n return (_jsx(MenuSelect, { onChange: handleAlignmentSelect, disabled: !(editor === null || editor === void 0 ? void 0 : editor.isEditable) ||\n !Array.from(enabledAlignments).some((alignment) => editor.can().setTextAlign(alignment)), \n // Override the rendering of the selected value so that we don't show\n // tooltips on hovering (like we do for the menu options)\n renderValue: (value) => {\n let content;\n if (value) {\n const alignmentOptionForValue = options.find((option) => option.value === value);\n content = alignmentOptionForValue ? (_jsx(alignmentOptionForValue.IconComponent, { className: classes.menuButtonIcon })) : (value);\n }\n else {\n content = emptyLabel;\n }\n return _jsx(\"span\", { className: classes.menuOption, children: content });\n }, \"aria-label\": \"Text alignments\", tooltipTitle: \"Align\", value: selectedValue, displayEmpty: true, ...menuSelectProps, inputProps: {\n ...menuSelectProps.inputProps,\n className: cx(classes.selectInput, (_c = menuSelectProps.inputProps) === null || _c === void 0 ? void 0 : _c.className),\n }, children: options\n .filter((alignmentOption) => enabledAlignments.has(alignmentOption.value))\n .map((alignmentOption) => {\n var _a;\n return (_jsx(MenuItem, { value: alignmentOption.value, disabled: !(editor === null || editor === void 0 ? void 0 : editor.can().setTextAlign(alignmentOption.value)), className: classes.menuItem, children: _jsx(MenuButtonTooltip, { label: (_a = alignmentOption.label) !== null && _a !== void 0 ? _a : \"\", shortcutKeys: alignmentOption.shortcutKeys, placement: \"right\", contentWrapperClassName: classes.menuOption, children: _jsx(alignmentOption.IconComponent, { className: classes.menuButtonIcon }) }) }, alignmentOption.value));\n }) }));\n}\n","import debounce from \"lodash/debounce\";\nimport { Component } from \"react\";\n/**\n * This component debounces the rendering of its children.\n *\n * WARNING: Use with caution! This component should *only* be used when there\n * are updates triggered via \"force-update\" (like via Tiptap's `useEditor` hook\n * which updates upon ProseMirror editor changes to the selection, content,\n * etc.). For ordinary React components, traditional memoization techniques\n * around props and state (like useCallback, useMemo, memo, etc.) should be used\n * instead.\n *\n * This component is provided for a very narrow use-case: with our menu\n * controls, without debouncing the controls would re-render per editor state\n * change (e.g. for every character typed or for caret movement), which can bog\n * things down a bit, like when holding down backspace or typing very quickly.\n * (This is due to the way that Tiptap's useEditor re-renders upon changes in\n * the ProseMirror state, which is to force-update\n * https://github.com/ueberdosis/tiptap/blob/b0198eb14b98db5ca691bd9bfe698ffaddbc4ded/packages/react/src/useEditor.ts#L105-L113,\n * rather than in response to prop changes. Because of the force re-render, and\n * since we *do* want to watch editor updates, we have to debounce rendering a\n * bit less conventionally, rather than using callbacks, memo, etc.). We do\n * want/need the menu controls to update very frequently, since we need them to\n * reflect the state of the current cursor position and editor nodes/marks,\n * etc., but we want rendering to stay performant, so the `wait` and `options`\n * defaults below are a reasonable enough balance.\n */\nexport default class DebounceRender extends Component {\n constructor(props) {\n var _a, _b;\n super(props);\n this.updateDebounced = debounce(\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.forceUpdate, (_a = props.wait) !== null && _a !== void 0 ? _a : 170, (_b = props.options) !== null && _b !== void 0 ? _b : {\n leading: true,\n trailing: true,\n maxWait: 300,\n });\n }\n shouldComponentUpdate() {\n this.updateDebounced();\n return false;\n }\n componentWillUnmount() {\n this.updateDebounced.cancel();\n }\n render() {\n return this.props.children;\n }\n}\n","import { getSchemaTypeNameByName } from \"@tiptap/core\";\nimport { getAttributesForMarks } from \"./getAttributesForMarks\";\nimport { getAttributesForNodes } from \"./getAttributesForNodes\";\n/**\n * Get the attributes of all currently selected marks and nodes of the given\n * type or name.\n *\n * Returns an array of Records, with an entry for each matching mark/node that\n * is currently selected.\n *\n * NOTE: This function will omit any non-matching nodes/marks in the result\n * array. It may be useful to run `editor.isActive(typeOrName)` separately if\n * you want to guarantee that all selected content is of the given type/name.\n *\n * Based directly on Tiptap's getAttributes\n * (https://github.com/ueberdosis/tiptap/blob/f387ad3dd4c2b30eaea33fb0ba0b42e0cd39263b/packages/core/src/helpers/getAttributes.ts),\n * but returns results for each of the matching marks and nodes, rather than\n * just the first. This enables us to handle situations where there are multiple\n * different attributes set for the different marks/nodes. See related issue\n * here: https://github.com/ueberdosis/tiptap/issues/3481\n */\nexport function getAttributesForEachSelected(state, typeOrName\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n const schemaType = getSchemaTypeNameByName(typeof typeOrName === \"string\" ? typeOrName : typeOrName.name, state.schema);\n if (schemaType === \"node\") {\n return getAttributesForNodes(state, typeOrName);\n }\n if (schemaType === \"mark\") {\n return getAttributesForMarks(state, typeOrName);\n }\n return [];\n}\n","import { getNodeType } from \"@tiptap/core\";\n/**\n * Get the attributes of all currently selected nodes of the given type or\n * name.\n *\n * Returns an array of Records, with an entry for each matching node that is\n * currently selected.\n *\n * Based directly on Tiptap's getNodeAttributes\n * (https://github.com/ueberdosis/tiptap/blob/f387ad3dd4c2b30eaea33fb0ba0b42e0cd39263b/packages/core/src/helpers/getNodeAttributes.ts),\n * but returns results for each of the matching nodes, rather than just the\n * first. See related: https://github.com/ueberdosis/tiptap/issues/3481\n */\nexport function getAttributesForNodes(state, typeOrName\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n const type = getNodeType(typeOrName, state.schema);\n const { from, to } = state.selection;\n const nodes = [];\n state.doc.nodesBetween(from, to, (node) => {\n nodes.push(node);\n });\n return nodes\n .reverse()\n .filter((nodeItem) => nodeItem.type.name === type.name)\n .map((node) => ({ ...node.attrs }));\n}\n","import { getMarkType } from \"@tiptap/core\";\n/**\n * Get the attributes of all currently selected marks of the given type or\n * name.\n *\n * Returns an array of Records, with an entry for each matching mark that is\n * currently selected.\n *\n * Based directly on Tiptap's getMarkAttributes\n * (https://github.com/ueberdosis/tiptap/blob/f387ad3dd4c2b30eaea33fb0ba0b42e0cd39263b/packages/core/src/helpers/getMarkAttributes.ts),\n * but returns results for each of the matching marks, rather than just the\n * first. See related: https://github.com/ueberdosis/tiptap/issues/3481\n */\nexport function getAttributesForMarks(state, typeOrName\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n const type = getMarkType(typeOrName, state.schema);\n const { from, to, empty } = state.selection;\n const marks = [];\n if (empty) {\n if (state.storedMarks) {\n marks.push(...state.storedMarks);\n }\n marks.push(...state.selection.$head.marks());\n }\n else {\n state.doc.nodesBetween(from, to, (node) => {\n marks.push(...node.marks);\n });\n }\n return marks\n .filter((markItem) => markItem.type.name === type.name)\n .map((mark) => ({ ...mark.attrs }));\n}\n","/**\n * Insert the given array of images into the Tiptap editor document content.\n *\n * Optionally specify a given position at which to insert the images into the\n * editor content. If not given, the user's current selection (if there is any)\n * will be replaced by the newly inserted images.\n *\n * @param options.images The attributes of each image to insert\n * @param options.editor The Tiptap editor in which to insert\n * @param options.insertPosition The position at which to insert into the editor\n * content. If not given, uses the current editor caret/selection position.\n */\nexport function insertImages({ images, editor, insertPosition, }) {\n if (!editor || editor.isDestroyed || images.length === 0) {\n return;\n }\n const imageContentToInsert = images\n .filter((imageAttrs) => !!imageAttrs.src)\n .map((imageAttrs) => ({\n type: editor.schema.nodes.image.name,\n attrs: imageAttrs,\n }));\n editor\n .chain()\n .command(({ commands }) => {\n if (insertPosition == null) {\n // We'll insert at and replace the user's current selection if there\n // wasn't a specific insert position given\n return commands.insertContent(imageContentToInsert);\n }\n else {\n return commands.insertContentAt(insertPosition, imageContentToInsert);\n }\n })\n .focus()\n .run();\n}\n","// We'll cache the result of isMac() and isTouchDevice(), since they shouldn't\n// change during a session. That way repeated calls don't require any logic and\n// are rapid.\nlet isMacResult;\nlet isTouchDeviceResult;\n/**\n * Return true if the user is using a Mac (as opposed to Windows, etc.) device.\n */\nexport function isMac() {\n if (isMacResult === undefined) {\n isMacResult = navigator.platform.includes(\"Mac\");\n }\n return isMacResult;\n}\n/**\n * Return a human-readable version of which modifier key should be used for\n * keyboard shortcuts depending on Mac vs non-Mac platforms. Useful for visually\n * indicating which key to press.\n */\nexport function getModShortcutKey() {\n return isMac() ? \"⌘\" : \"Ctrl\";\n}\n/** Return true if the user is using a touch-based device. */\nexport function isTouchDevice() {\n if (isTouchDeviceResult === undefined) {\n // This technique is taken from\n // https://hacks.mozilla.org/2013/04/detecting-touch-its-the-why-not-the-how/\n // (and https://stackoverflow.com/a/4819886/4543977)\n isTouchDeviceResult =\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n (window && \"ontouchstart\" in window) ||\n navigator.maxTouchPoints > 0 ||\n // @ts-expect-error: msMaxTouchPoints is IE-specific, so needs to be ignored\n navigator.msMaxTouchPoints > 0;\n }\n return isTouchDeviceResult;\n}\n"],"names":["_interopRequireDefault","exports","_createSvgIcon","_jsxRuntime","default","jsx","d","fillRule","useStyles","name","MenuDivider","theme","root","height","margin","spacing","props","classes","cx","orientation","className","RichTextEditorContext","createContext","undefined","useRichTextEditorContext","editor","useContext","Error","MENU_BUTTON_FONT_SIZE_DEFAULT","MenuButton","border","padding","menuButtonIcon","fontSize","tooltipLabel","tooltipShortcutKeys","IconComponent","buttonRef","children","toggleButtonProps","label","shortcutKeys","ref","size","value","MenuButtonAddTable","disabled","isEditable","can","insertTable","onClick","chain","focus","rows","cols","withHeaderRow","run","MenuButtonBlockquote","_a","FormatQuote","selected","isActive","toggleBlockquote","MenuButtonBold","FormatBold","toggleBold","MenuButtonBulletedList","FormatListBulleted","toggleBulletList","MenuButtonCode","Code","toggleCode","MenuButtonCodeBlock","toggleCodeBlock","createSvgIcon","u","Object","assign","e","r","arguments","length","t","n","prototype","hasOwnProperty","call","apply","this","c","o","a","keys","indexOf","i","current","s","f","v","ownerDocument","defaultView","self","getBoundingClientRect","identifier","touches","left","pageX","pageXOffset","width","top","pageY","pageYOffset","h","preventDefault","m","onMove","l","onKey","g","p","b","_","x","buttons","addEventListener","removeEventListener","nativeEvent","changedTouches","which","keyCode","C","E","H","onTouchStart","onMouseDown","onKeyDown","tabIndex","role","filter","Boolean","join","color","style","backgroundColor","Math","pow","round","PI","L","substring","parseInt","w","K","I","y","q","k","floor","D","toString","max","min","S","hue","onChange","T","hsva","F","X","toLowerCase","Y","toHsva","equal","fromHsva","R","V","window","J","Map","Q","document","has","createElement","innerHTML","set","setAttribute","head","appendChild","U","colorModel","defaultColor","W","Z","ee","backgroundImage","re","te","ne","err","ColorSwatchButton","forwardRef","colorValue","active","buttonProps","type","colorNotSet","Check","activeIcon","palette","getContrastText","minWidth","borderRadius","shape","borderColor","mode","grey","borderStyle","borderWidth","cursor","backgroundClip","verticalAlign","background","common","white","displayName","ColorPicker","gradientPicker","colorTextInput","marginTop","swatchContainer","display","flexWrap","gap","swatchColors","colorToHex","disableAlpha","labels","textFieldPlaceholder","inputRef","useRef","useEffect","activeElement","swatchColorObjects","map","swatchColor","colorValueAsHex","TextField","placeholder","variant","defaultValue","spellCheck","event","newColor","target","newHexColor","fullWidth","ColorPickerPopperBody","onCancel","onSave","ColorPickerProps","removeColorButton","removeColorButtonTooltipTitle","cancelButton","saveButton","localColor","setLocalColor","useState","Stack","direction","justifyContent","sx","mt","Tooltip","title","arrow","Button","ColorPickerPopper","zIndex","BUBBLE_MENU","popperProps","Popper","transition","placement","TransitionProps","Fade","timeout","ClickAwayListener","mouseEvent","touchEvent","onClickAway","Paper","elevation","pb","MenuButtonColorPicker","colorIndicatorIcon","position","colorIndicatorIconDisabled","action","hideColorIndicator","popperId","PopperProps","menuButtonProps","anchorEl","setAnchorEl","handleClose","otherMenuButtonProps","currentTarget","id","open","MenuButtonEditLink","commands","openLinkBubbleMenu","MenuButtonHighlightColor","defaultMarkColor","currentHighlightColor","getAttributes","setHighlight","unsetHighlight","toggleHighlight","MenuButtonHorizontalRule","setHorizontalRule","MenuButtonAddImage","AddPhotoAlternate","setImage","src","MenuButtonImageUpload","onUploadFiles","inputProps","fileInput","click","accept","multiple","async","files","isDestroyed","attributesForImages","Array","from","images","handleAndInsertNewFiles","MenuButtonIndent","FormatIndentIncrease","sinkListItem","MenuButtonItalic","FormatItalic","toggleItalic","MenuButtonOrderedList","FormatListNumbered","toggleOrderedList","MenuButtonRedo","redo","MenuButtonRemoveFormatting","FormatClear","unsetAllMarks","MenuButtonStrikethrough","StrikethroughS","toggleStrike","MenuButtonSubscript","Subscript","toggleSubscript","MenuButtonSuperscript","Superscript","toggleSuperscript","MenuButtonTaskList","Checklist","toggleTaskList","MenuButtonTextColor","defaultTextColor","allCurrentTextStyleAttrs","getAttributesForEachSelected","state","isTextStyleAppliedToEntireSelection","currentColors","attrs","push","numUniqueCurrentColors","Set","currentColor","setColor","MenuButtonTooltip","titleContainer","textAlign","typography","pxToRem","shortcutKey","text","secondary","paper","lineHeight","marginLeft","contentWrapperClassName","otherTooltipProps","component","index","MenuButtonUnderline","toggleUnderline","MenuButtonUndo","undo","MenuButtonUnindent","FormatIndentDecrease","liftListItem","MenuControlsContainer","rowGap","columnGap","alignItems","debounced","DebounceProps","content","MenuSelect","rootTooltipWrapper","selectRoot","focused","notchedOutline","select","paddingLeft","paddingRight","selectDropdownIcon","right","input","paddingTop","paddingBottom","tooltipTitle","selectProps","_b","_c","tooltipOpen","setTooltipOpen","onMouseEnter","args","onMouseLeave","MenuProps","anchorOrigin","vertical","horizontal","transformOrigin","icon","MenuSelectFontFamily","selectInput","MULTIPLE_FAMILIES_SELECTED_VALUE","options","hideUnsetOption","unsetOptionLabel","emptyLabel","menuSelectProps","currentFontFamilies","fontFamily","numUniqueCurrentFontFamilies","currentFontFamily","setFontFamily","unsetFontFamily","renderValue","find","option","displayEmpty","fontFamilyOption","MenuSelectFontSize","fontSizeIcon","DEFAULT_FONT_SIZE_SELECT_OPTIONS","stripPxFromValue","replace","MULTIPLE_SIZES_SELECTED_VALUE","sizeOptions","unsetOptionContent","emptyValue","optionObjects","currentFontSizes","numUniqueCurrentFontSizes","currentFontSize","setFontSize","unsetFontSize","FormatSize","MenuItem","MenuSelectHeading","editorStyles","menuOption","headingOption","marginBlockStart","marginBlockEnd","fontWeight","headingOption1","headingOption2","headingOption3","headingOption4","headingOption5","headingOption6","HEADING_OPTION_VALUES","Paragraph","Heading1","Heading2","Heading3","Heading4","Heading5","Heading6","HEADING_OPTION_VALUE_TO_LEVEL","LEVEL_TO_HEADING_OPTION_VALUE","_d","_e","_f","_g","_h","handleHeadingType","useCallback","setParagraph","setHeading","level","selectedValue","currentNodeLevels","isCurrentlyParagraphOrHeading","canSetParagraph","canSetHeading","enabledHeadingLevels","useMemo","headingExtension","extensionManager","extensions","extension","levels","result","empty","paragraph","heading1","heading2","heading3","heading4","heading5","heading6","MenuSelectTextAlign","menuItem","DEFAULT_ALIGNMENT_OPTIONS","alignmentOptions","alignment","handleAlignmentSelect","setTextAlign","textAlignExtensionOptions","textAlignExtension","enabledAlignments","alignments","some","alignmentOptionForValue","alignmentOption","DebounceRender","Component","constructor","super","updateDebounced","forceUpdate","wait","leading","trailing","maxWait","shouldComponentUpdate","componentWillUnmount","cancel","render","typeOrName","schemaType","schema","to","selection","nodes","doc","nodesBetween","node","reverse","nodeItem","getAttributesForNodes","marks","storedMarks","$head","markItem","mark","getAttributesForMarks","insertImages","insertPosition","imageContentToInsert","imageAttrs","image","command","insertContent","insertContentAt","isMacResult","isTouchDeviceResult","getModShortcutKey","navigator","platform","includes","isTouchDevice","maxTouchPoints","msMaxTouchPoints"],"sourceRoot":""}