@aquera/nile-elements 2.0.15 → 2.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/demo/nxtgen-classes.css +5 -5
- package/demo/nxtgen-dark.css +16 -16
- package/demo/nxtgen-properties.css +2 -2
- package/demo/nxtgen-utilities.css +5 -5
- package/demo/nxtgen.css +5 -5
- package/demo/utilities.css +2 -2
- package/demo/variables.css +2 -2
- package/dist/{index-f6944844.cjs.js → index-0c0c869d.cjs.js} +2 -2
- package/dist/{index-f6944844.cjs.js.map → index-0c0c869d.cjs.js.map} +1 -1
- package/dist/{index-403841c7.cjs.js → index-129ef6fb.cjs.js} +3 -3
- package/dist/{index-403841c7.cjs.js.map → index-129ef6fb.cjs.js.map} +1 -1
- package/dist/{index-1faa963c.esm.js → index-36f2a6b5.esm.js} +1 -1
- package/dist/index-4df50481.esm.js +1 -0
- package/dist/index-5d34cff1.esm.js +1 -0
- package/dist/index-7ae95edd.cjs.js +2 -0
- package/dist/{index-3ca67627.cjs.js.map → index-7ae95edd.cjs.js.map} +1 -1
- package/dist/index-7ca72b78.esm.js +1 -0
- package/dist/index-bbe23ad8.cjs.js +2 -0
- package/dist/index-bbe23ad8.cjs.js.map +1 -0
- package/dist/index-ccc6a799.cjs.js +5 -0
- package/dist/index-ccc6a799.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +124 -72
- package/dist/nile-auto-complete/index.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/portal-manager.cjs.js +1 -1
- package/dist/nile-auto-complete/portal-utils.cjs.js +1 -1
- package/dist/nile-code-editor/extensionSetup.cjs.js +2 -2
- package/dist/nile-code-editor/index.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
- package/dist/nile-code-editor/theme.cjs.js +1 -1
- package/dist/nile-color-picker/index.cjs.js +1 -1
- package/dist/nile-color-picker/nile-color-picker.cjs.js +1 -1
- package/dist/nile-combobox/index.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
- package/dist/nile-combobox/portal-manager.cjs.js +1 -1
- package/dist/nile-context-menu/index.cjs.js +1 -1
- package/dist/nile-context-menu/nile-context-menu.cjs.js +1 -1
- package/dist/nile-context-submenu/index.cjs.js +1 -1
- package/dist/nile-context-submenu/nile-context-submenu.cjs.js +1 -1
- package/dist/nile-detail/index.cjs.js +1 -1
- package/dist/nile-detail/nile-detail.cjs.js +1 -1
- package/dist/nile-dropdown/index.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
- package/dist/nile-dropdown/portal-manager.cjs.js +1 -1
- package/dist/nile-file-upload/index.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.template.cjs.js +1 -1
- package/dist/nile-floating-panel/index.cjs.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
- package/dist/nile-lite-tooltip/index.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.css.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.css.cjs.js.map +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.css.esm.js +1 -1
- package/dist/nile-markdown-editor/index.cjs.js +1 -1
- package/dist/nile-markdown-editor/nile-markdown-editor.cjs.js +1 -1
- package/dist/nile-popover/index.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +1 -1
- package/dist/nile-popover/portal-manager.cjs.js +1 -1
- package/dist/nile-popup/index.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.cjs.js +1 -1
- package/dist/nile-segmented-progress-bar/index.cjs.js +1 -1
- package/dist/nile-segmented-progress-bar/nile-segmented-progress-bar.cjs.js +1 -1
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/portal-manager.cjs.js +1 -1
- package/dist/nile-side-bar-action/index.cjs.js +1 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js +1 -1
- package/dist/nile-side-bar-action/portal-manager.cjs.js +1 -1
- package/dist/nile-tooltip/index.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.esm.js +1 -1
- package/dist/nile-virtual-select/index.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +1 -1
- package/dist/nile-virtual-select/portal-manager.cjs.js +1 -1
- package/dist/nile-virtual-select/renderer.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/commands.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/commands.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/commands.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/create-state.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/create-state.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/email-css.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/email-css.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/email-css.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/email-render.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/email-render.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/email-render.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/html-detect.cjs.js +2 -0
- package/dist/nile-wysiwyg-editor/engine/html-detect.cjs.js.map +1 -0
- package/dist/nile-wysiwyg-editor/engine/html-detect.esm.js +1 -0
- package/dist/nile-wysiwyg-editor/engine/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/inputrules.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/inputrules.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/keymap.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/keymap.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/code-highlight.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/embed-view.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/embeds.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/find-replace.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/format-painter.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/image-view.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/image.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/image.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/link.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/link.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/link.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/max-length.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/paste.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/placeholder.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/single-line.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/suggestions.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/plugins/tables.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js +2 -1
- package/dist/nile-wysiwyg-editor/engine/sanitize.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/sanitize.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/schema.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/schema.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/schema.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/selection-state.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/selection-state.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/serializer.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/engine/serializer.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/engine/serializer.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.css.esm.js +45 -4
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +2 -2
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/bookmark-panel.esm.js +2 -2
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.esm.js +5 -5
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/code-block-menu.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-menu.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-panel.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-panel.esm.js +2 -2
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/emoji-picker.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/find-replace.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/find-replace.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/find-replace.esm.js +3 -3
- package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/image-menu.esm.js +3 -3
- package/dist/nile-wysiwyg-editor/ui/image-panel.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/image-panel.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/image-panel.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/insert-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/insert-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/insert-menu.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/link-editor.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/link-editor.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/link-editor.esm.js +9 -9
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/markdown-panel.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/math-panel.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/math-panel.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/shortcut-help.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/source-view.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/source-view.esm.js +4 -4
- package/dist/nile-wysiwyg-editor/ui/special-chars.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/special-chars.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/special-chars.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/suggest-list.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/suggest-list.esm.js +23 -12
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/table-grid-picker.esm.js +7 -7
- package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/table-menu.esm.js +1 -1
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.css.js +1 -1
- package/dist/src/nile-lite-tooltip/nile-lite-tooltip.css.js.map +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.css.js +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/create-state.d.ts +5 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.js +2 -0
- package/dist/src/nile-wysiwyg-editor/engine/create-state.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/email-css.d.ts +14 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-css.js +140 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-css.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-fidelity.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-fidelity.test.js +1045 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-fidelity.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-render.d.ts +11 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-render.js +93 -0
- package/dist/src/nile-wysiwyg-editor/engine/email-render.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/html-detect.d.ts +2 -0
- package/dist/src/nile-wysiwyg-editor/engine/html-detect.js +24 -0
- package/dist/src/nile-wysiwyg-editor/engine/html-detect.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/engine/index.d.ts +4 -1
- package/dist/src/nile-wysiwyg-editor/engine/index.js +3 -1
- package/dist/src/nile-wysiwyg-editor/engine/index.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.d.ts +0 -5
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.js +19 -0
- package/dist/src/nile-wysiwyg-editor/engine/inputrules.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.js +3 -2
- package/dist/src/nile-wysiwyg-editor/engine/plugins/image-view.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.d.ts +4 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.js +56 -1
- package/dist/src/nile-wysiwyg-editor/engine/plugins/link.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.d.ts +5 -0
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.js +27 -6
- package/dist/src/nile-wysiwyg-editor/engine/plugins/paste.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js +30 -7
- package/dist/src/nile-wysiwyg-editor/engine/plugins/tables.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.js +46 -0
- package/dist/src/nile-wysiwyg-editor/engine/pm.test.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.d.ts +9 -1
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.js +730 -7
- package/dist/src/nile-wysiwyg-editor/engine/sanitize.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/schema.d.ts +3 -0
- package/dist/src/nile-wysiwyg-editor/engine/schema.js +215 -34
- package/dist/src/nile-wysiwyg-editor/engine/schema.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.js +3 -1
- package/dist/src/nile-wysiwyg-editor/engine/selection-state.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/engine/serializer.d.ts +12 -4
- package/dist/src/nile-wysiwyg-editor/engine/serializer.js +18 -8
- package/dist/src/nile-wysiwyg-editor/engine/serializer.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor-email-fidelity.test.d.ts +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor-email-fidelity.test.js +287 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor-email-fidelity.test.js.map +1 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js +45 -4
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.d.ts +23 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js +113 -15
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js +213 -0
- package/dist/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.js +2 -2
- package/dist/src/nile-wysiwyg-editor/ui/bookmark-panel.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/bubble-menu.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/embed-menu.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/embed-panel.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/emoji-picker.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/find-replace.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/image-menu.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/image-panel.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/insert-menu.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.js +2 -2
- package/dist/src/nile-wysiwyg-editor/ui/link-editor.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/markdown-panel.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/math-panel.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/shortcut-help.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/source-view.js +2 -2
- package/dist/src/nile-wysiwyg-editor/ui/source-view.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/special-chars.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js +14 -3
- package/dist/src/nile-wysiwyg-editor/ui/suggest-list.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js +2 -2
- package/dist/src/nile-wysiwyg-editor/ui/table-grid-picker.js.map +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.js +1 -1
- package/dist/src/nile-wysiwyg-editor/ui/table-menu.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/version.cjs.js +1 -1
- package/dist/version.cjs.js.map +1 -1
- package/dist/version.esm.js +1 -1
- package/package.json +1 -1
- package/src/nile-lite-tooltip/nile-lite-tooltip.css.ts +1 -1
- package/src/nile-tooltip/nile-tooltip.css.ts +1 -1
- package/src/nile-wysiwyg-editor/engine/create-state.ts +7 -0
- package/src/nile-wysiwyg-editor/engine/email-css.ts +136 -0
- package/src/nile-wysiwyg-editor/engine/email-fidelity.test.ts +1347 -0
- package/src/nile-wysiwyg-editor/engine/email-render.ts +99 -0
- package/src/nile-wysiwyg-editor/engine/html-detect.ts +26 -0
- package/src/nile-wysiwyg-editor/engine/index.ts +10 -1
- package/src/nile-wysiwyg-editor/engine/inputrules.ts +18 -1
- package/src/nile-wysiwyg-editor/engine/plugins/image-view.ts +3 -2
- package/src/nile-wysiwyg-editor/engine/plugins/link.ts +58 -2
- package/src/nile-wysiwyg-editor/engine/plugins/paste.ts +31 -8
- package/src/nile-wysiwyg-editor/engine/plugins/tables.ts +29 -7
- package/src/nile-wysiwyg-editor/engine/pm.test.ts +73 -0
- package/src/nile-wysiwyg-editor/engine/sanitize.ts +729 -7
- package/src/nile-wysiwyg-editor/engine/schema.ts +206 -33
- package/src/nile-wysiwyg-editor/engine/selection-state.ts +3 -1
- package/src/nile-wysiwyg-editor/engine/serializer.ts +30 -8
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor-email-fidelity.test.ts +357 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.css.ts +45 -4
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.test.ts +258 -0
- package/src/nile-wysiwyg-editor/nile-wysiwyg-editor.ts +119 -12
- package/src/nile-wysiwyg-editor/ui/bookmark-panel.ts +2 -2
- package/src/nile-wysiwyg-editor/ui/bubble-menu.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/embed-menu.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/embed-panel.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/emoji-picker.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/find-replace.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/image-menu.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/image-panel.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/insert-menu.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/link-editor.ts +2 -2
- package/src/nile-wysiwyg-editor/ui/markdown-panel.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/math-panel.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/shortcut-help.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/source-view.ts +2 -2
- package/src/nile-wysiwyg-editor/ui/special-chars.ts +1 -1
- package/src/nile-wysiwyg-editor/ui/suggest-list.ts +14 -3
- package/src/nile-wysiwyg-editor/ui/table-grid-picker.ts +2 -2
- package/src/nile-wysiwyg-editor/ui/table-menu.ts +1 -1
- package/vscode-html-custom-data.json +15 -1
- package/web-test-runner.config.mjs +4 -0
- package/dist/index-3ca67627.cjs.js +0 -2
- package/dist/index-6f3fa4ab.esm.js +0 -1
- package/dist/index-7b1c9857.esm.js +0 -1
- package/dist/index-89c520e9.cjs.js +0 -5
- package/dist/index-89c520e9.cjs.js.map +0 -1
- package/dist/index-ba47645d.esm.js +0 -1
- package/dist/index-c3210a9c.cjs.js +0 -2
- package/dist/index-c3210a9c.cjs.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -3970,7 +3970,7 @@ ${o?R`
|
|
|
3970
3970
|
font-weight: var(--nile-tooltip-font-weight-sm, var(--ng-font-weight-semibold));
|
|
3971
3971
|
line-height: var(--nile-tooltip-line-height-sm, var(--ng-line-height-text-xs));
|
|
3972
3972
|
padding: var(--nile-tooltip-padding-y, var(--ng-spacing-md)) var(--nile-tooltip-padding-x, var(--ng-spacing-md));
|
|
3973
|
-
color: var(--nile-colors-white-base, var(--ng-colors-text-
|
|
3973
|
+
color: var(--nile-colors-white-base, var(--ng-colors-text-white));
|
|
3974
3974
|
pointer-events: none;
|
|
3975
3975
|
word-break: break-word;
|
|
3976
3976
|
font-family: var(--nile-font-family-inherit, var(--ng-font-family-body));
|
|
@@ -4663,7 +4663,7 @@ ${o?R`
|
|
|
4663
4663
|
.tippy-box {
|
|
4664
4664
|
position: relative;
|
|
4665
4665
|
background-color: var(--nile-colors-dark-900, var(--ng-colors-bg-primary-solid));
|
|
4666
|
-
color: var(--nile-colors-dark-200, var(--ng-colors-text-
|
|
4666
|
+
color: var(--nile-colors-dark-200, var(--ng-colors-text-white));
|
|
4667
4667
|
font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));
|
|
4668
4668
|
border-radius: var(--nile-radius-sm, var(--ng-radius-md));
|
|
4669
4669
|
font-size: var(--nile-type-scale-3, var(--ng-font-size-text-xs));
|
|
@@ -6475,7 +6475,7 @@ class Ys{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
|
6475
6475
|
* @license
|
|
6476
6476
|
* Copyright 2021 Google LLC
|
|
6477
6477
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6478
|
-
*/(this._hostElement,e),this._scrollerController=new Zs(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach((e=>{e.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(e),this._hostElementRO.observe(e)})),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach((e=>this._childrenRO.observe(e))),this._scrollEventListeners.forEach((e=>e.addEventListener("scroll",this,this._scrollEventListenerOptions)))}disconnected(){this._scrollEventListeners.forEach((e=>e.removeEventListener("scroll",this,this._scrollEventListenerOptions))),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){const e=this._hostElement.style;e.display=e.display||"block",e.position=e.position||"relative",e.contain=e.contain||"size layout",this._isScroller&&(e.overflow=e.overflow||"auto",e.minHeight=e.minHeight||"150px")}_getSizer(){const e=this._hostElement;if(!this._sizer){let t=e.querySelector(`[${Vs}]`);t||(t=document.createElement("div"),t.setAttribute(Vs,""),e.appendChild(t)),Object.assign(t.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),t.textContent=" ",t.setAttribute(Vs,""),this._sizer=t}return this._sizer}async updateLayoutConfig(e){await this._layoutInitialized;const t=e.type||Rs;if("function"==typeof t&&this._layout instanceof t){const t={...e};return delete t.type,this._layout.config=t,!0}return!1}async _initLayout(e){let t,i;if("function"==typeof e.type){i=e.type;const n={...e};delete n.type,t=n}else t=e;void 0===i&&(Rs=i=(await Promise.resolve().then((function(){return mX}))).FlowLayout),this._layout=new i((e=>this._handleLayoutMessage(e)),t),this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(null!==this._benchmarkStart){const e=window.performance.now(),t=e-this._benchmarkStart,i=performance.getEntriesByName("uv-virtualizing","measure").filter((t=>t.startTime>=this._benchmarkStart&&t.startTime<e)).reduce(((e,t)=>e+t.duration),0);return this._benchmarkStart=null,{timeElapsed:t,virtualizationTime:i}}return null}_measureChildren(){const e={},t=this._children,i=this._measureChildOverride||this._measureChild;for(let n=0;n<t.length;n++){const o=t[n],r=this._first+n;(this._itemsChanged||this._toBeMeasured.has(o))&&(e[r]=i.call(this,o,this._items[r]))}this._childMeasurements=e,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(e){const{width:t,height:i}=e.getBoundingClientRect();return Object.assign({width:t,height:i},function(e){const t=window.getComputedStyle(e);return{marginTop:Bs(t.marginTop),marginRight:Bs(t.marginRight),marginBottom:Bs(t.marginBottom),marginLeft:Bs(t.marginLeft)}}(e))}async _schedule(e){this._scheduled.has(e)||(this._scheduled.add(e),await Promise.resolve(),this._scheduled.delete(e),e.call(this))}async _updateDOM(e){this._scrollSize=e.scrollSize,this._adjustRange(e.range),this._childrenPos=e.childPositions,this._scrollError=e.scrollError||null;const{_rangeChanged:t,_itemsChanged:i}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(t||i)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach((e=>this._childrenRO.observe(e))),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(e){console.warn("Error measuring performance data: ",e)}window.performance.mark("uv-start")}!1===this._scrollerController.correctingScrollError&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(e){if("scroll"===e.type)(e.currentTarget===window||this._clippingAncestors.includes(e.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",e)}_handleLayoutMessage(e){"stateChanged"===e.type?this._updateDOM(e):"visibilityChanged"===e.type?(this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._notifyVisibility()):"unpinned"===e.type&&this._hostElement.dispatchEvent(new Us)}get _children(){const e=[];let t=this._hostElement.firstElementChild;for(;t;)t.hasAttribute(Vs)||e.push(t),t=t.nextElementSibling;return e}_updateView(){const e=this._hostElement,t=this._scrollerController?.element,i=this._layout;if(e&&t&&i){let n,o,r,s;const a=e.getBoundingClientRect();n=0,o=0,r=window.innerHeight,s=window.innerWidth;const l=this._clippingAncestors.map((e=>e.getBoundingClientRect()));l.unshift(a);for(const e of l)n=Math.max(n,e.top),o=Math.max(o,e.left),r=Math.min(r,e.bottom),s=Math.min(s,e.right);const M=t.getBoundingClientRect(),c={left:a.left-M.left,top:a.top-M.top},g={width:t.scrollWidth,height:t.scrollHeight},u=n-a.top+e.scrollTop,d=o-a.left+e.scrollLeft,h=Math.max(0,r-n),N=Math.max(0,s-o);i.viewportSize={width:N,height:h},i.viewportScroll={top:u,left:d},i.totalScrollSize=g,i.offsetWithinScroller=c}}_sizeHostElement(e){const t=82e5,i=e&&null!==e.width?Math.min(t,e.width):0,n=e&&null!==e.height?Math.min(t,e.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${i}px, ${n}px)`;else{const e=this._hostElement.style;e.minWidth=i?`${i}px`:"100%",e.minHeight=n?`${n}px`:"100%"}}_positionChildren(e){e&&e.forEach((({top:e,left:t,width:i,height:n,xOffset:o,yOffset:r},s)=>{const a=this._children[s-this._first];a&&(a.style.position="absolute",a.style.boxSizing="border-box",a.style.transform=`translate(${t}px, ${e}px)`,void 0!==i&&(a.style.width=i+"px"),void 0!==n&&(a.style.height=n+"px"),a.style.left=void 0===o?null:o+"px",a.style.top=void 0===r?null:r+"px")}))}async _adjustRange(e){const{_first:t,_last:i,_firstVisible:n,_lastVisible:o}=this;this._first=e.first,this._last=e.last,this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==t||this._last!==i,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==n||this._lastVisible!==o}_correctScrollError(){if(this._scrollError){const{scrollTop:e,scrollLeft:t}=this._scrollerController,{top:i,left:n}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:e-i,left:t-n})}}element(e){return e===1/0&&(e=this._items.length-1),void 0===this._items?.[e]?void 0:{scrollIntoView:(t={})=>this._scrollElementIntoView({...t,index:e})}}_scrollElementIntoView(e){if(e.index>=this._first&&e.index<=this._last)this._children[e.index-this._first].scrollIntoView(e);else if(e.index=Math.min(e.index,this._items.length-1),"smooth"===e.behavior){const t=this._layout.getScrollIntoViewCoordinates(e),{behavior:i}=e;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(t,{behavior:i}),(()=>this._layout.getScrollIntoViewCoordinates(e)),(()=>this._scrollIntoViewTarget=null)),this._scrollIntoViewTarget=e}else this._layout.pin=e}_checkScrollIntoViewTarget(e){const{index:t}=this._scrollIntoViewTarget||{};t&&e?.has(t)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new Cs({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new Qs({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise(((e,t)=>{this._layoutCompleteResolver=e,this._layoutCompleteRejecter=t}))),this._layoutCompletePromise}_rejectLayoutCompletePromise(e){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(e),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame((()=>requestAnimationFrame((()=>this._resolveLayoutCompletePromise())))))}_resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(e){if(this._layout?.measureChildren){for(const t of e)this._toBeMeasured.set(t.target,t.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}};function Bs(e){const t=e?parseFloat(e):NaN;return Number.isNaN(t)?0:t}function $s(e){if(null!==e.assignedSlot)return e.assignedSlot;if(null!==e.parentElement)return e.parentElement;const t=e.parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host||null}const Fs=Te(class extends Ss{constructor(e){if(super(e),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>((e,t)=>R`${t}: ${JSON.stringify(e,null,2)}`)(e,t+this._first),this._keyFunction=(e,t)=>(e=>e)(e,this._first),this._items=[],e.type!==je)throw new Error("The virtualize directive can only be used in child expressions")}render(e){e&&this._setFunctions(e);const t=[];if(this._first>=0&&this._last>=this._first)for(let e=this._first;e<=this._last;e++)t.push(this._items[e]);return Es(t,this._keyFunction,this._renderItem)}update(e,[t]){this._setFunctions(t);const i=this._items!==t.items;return this._items=t.items||[],this._virtualizer?this._updateVirtualizerConfig(e,t):this._initialize(e,t),i?W:this.render()}async _updateVirtualizerConfig(e,t){if(!await this._virtualizer.updateLayoutConfig(t.layout||{})){const i=e.parentNode;this._makeVirtualizer(i,t)}this._virtualizer.items=this._items}_setFunctions(e){const{renderItem:t,keyFunction:i}=e;t&&(this._renderItem=(e,i)=>t(e,i+this._first)),i&&(this._keyFunction=(e,t)=>i(e,t+this._first))}_makeVirtualizer(e,t){this._virtualizer&&this._virtualizer.disconnected();const{layout:i,scroller:n,items:o}=t;this._virtualizer=new Ws({hostElement:e,layout:i,scroller:n}),this._virtualizer.items=o,this._virtualizer.connected()}_initialize(e,t){const i=e.parentNode;i&&1===i.nodeType&&(i.addEventListener("rangeChanged",(e=>{this._first=e.first,this._last=e.last,this.setValue(this.render())})),this._makeVirtualizer(i,t))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}});class Gs{static getVirtualizedContent(e,t,i,n,o,r,s,a,l,M,c,g,u,d,h,N,p,D){return R`
|
|
6478
|
+
*/(this._hostElement,e),this._scrollerController=new Zs(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach((e=>{e.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(e),this._hostElementRO.observe(e)})),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach((e=>this._childrenRO.observe(e))),this._scrollEventListeners.forEach((e=>e.addEventListener("scroll",this,this._scrollEventListenerOptions)))}disconnected(){this._scrollEventListeners.forEach((e=>e.removeEventListener("scroll",this,this._scrollEventListenerOptions))),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){const e=this._hostElement.style;e.display=e.display||"block",e.position=e.position||"relative",e.contain=e.contain||"size layout",this._isScroller&&(e.overflow=e.overflow||"auto",e.minHeight=e.minHeight||"150px")}_getSizer(){const e=this._hostElement;if(!this._sizer){let t=e.querySelector(`[${Vs}]`);t||(t=document.createElement("div"),t.setAttribute(Vs,""),e.appendChild(t)),Object.assign(t.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),t.textContent=" ",t.setAttribute(Vs,""),this._sizer=t}return this._sizer}async updateLayoutConfig(e){await this._layoutInitialized;const t=e.type||Rs;if("function"==typeof t&&this._layout instanceof t){const t={...e};return delete t.type,this._layout.config=t,!0}return!1}async _initLayout(e){let t,i;if("function"==typeof e.type){i=e.type;const n={...e};delete n.type,t=n}else t=e;void 0===i&&(Rs=i=(await Promise.resolve().then((function(){return kq}))).FlowLayout),this._layout=new i((e=>this._handleLayoutMessage(e)),t),this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(null!==this._benchmarkStart){const e=window.performance.now(),t=e-this._benchmarkStart,i=performance.getEntriesByName("uv-virtualizing","measure").filter((t=>t.startTime>=this._benchmarkStart&&t.startTime<e)).reduce(((e,t)=>e+t.duration),0);return this._benchmarkStart=null,{timeElapsed:t,virtualizationTime:i}}return null}_measureChildren(){const e={},t=this._children,i=this._measureChildOverride||this._measureChild;for(let n=0;n<t.length;n++){const o=t[n],r=this._first+n;(this._itemsChanged||this._toBeMeasured.has(o))&&(e[r]=i.call(this,o,this._items[r]))}this._childMeasurements=e,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(e){const{width:t,height:i}=e.getBoundingClientRect();return Object.assign({width:t,height:i},function(e){const t=window.getComputedStyle(e);return{marginTop:Bs(t.marginTop),marginRight:Bs(t.marginRight),marginBottom:Bs(t.marginBottom),marginLeft:Bs(t.marginLeft)}}(e))}async _schedule(e){this._scheduled.has(e)||(this._scheduled.add(e),await Promise.resolve(),this._scheduled.delete(e),e.call(this))}async _updateDOM(e){this._scrollSize=e.scrollSize,this._adjustRange(e.range),this._childrenPos=e.childPositions,this._scrollError=e.scrollError||null;const{_rangeChanged:t,_itemsChanged:i}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(t||i)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach((e=>this._childrenRO.observe(e))),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(e){console.warn("Error measuring performance data: ",e)}window.performance.mark("uv-start")}!1===this._scrollerController.correctingScrollError&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(e){if("scroll"===e.type)(e.currentTarget===window||this._clippingAncestors.includes(e.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",e)}_handleLayoutMessage(e){"stateChanged"===e.type?this._updateDOM(e):"visibilityChanged"===e.type?(this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._notifyVisibility()):"unpinned"===e.type&&this._hostElement.dispatchEvent(new Us)}get _children(){const e=[];let t=this._hostElement.firstElementChild;for(;t;)t.hasAttribute(Vs)||e.push(t),t=t.nextElementSibling;return e}_updateView(){const e=this._hostElement,t=this._scrollerController?.element,i=this._layout;if(e&&t&&i){let n,o,r,s;const a=e.getBoundingClientRect();n=0,o=0,r=window.innerHeight,s=window.innerWidth;const l=this._clippingAncestors.map((e=>e.getBoundingClientRect()));l.unshift(a);for(const e of l)n=Math.max(n,e.top),o=Math.max(o,e.left),r=Math.min(r,e.bottom),s=Math.min(s,e.right);const M=t.getBoundingClientRect(),c={left:a.left-M.left,top:a.top-M.top},g={width:t.scrollWidth,height:t.scrollHeight},u=n-a.top+e.scrollTop,d=o-a.left+e.scrollLeft,h=Math.max(0,r-n),N=Math.max(0,s-o);i.viewportSize={width:N,height:h},i.viewportScroll={top:u,left:d},i.totalScrollSize=g,i.offsetWithinScroller=c}}_sizeHostElement(e){const t=82e5,i=e&&null!==e.width?Math.min(t,e.width):0,n=e&&null!==e.height?Math.min(t,e.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${i}px, ${n}px)`;else{const e=this._hostElement.style;e.minWidth=i?`${i}px`:"100%",e.minHeight=n?`${n}px`:"100%"}}_positionChildren(e){e&&e.forEach((({top:e,left:t,width:i,height:n,xOffset:o,yOffset:r},s)=>{const a=this._children[s-this._first];a&&(a.style.position="absolute",a.style.boxSizing="border-box",a.style.transform=`translate(${t}px, ${e}px)`,void 0!==i&&(a.style.width=i+"px"),void 0!==n&&(a.style.height=n+"px"),a.style.left=void 0===o?null:o+"px",a.style.top=void 0===r?null:r+"px")}))}async _adjustRange(e){const{_first:t,_last:i,_firstVisible:n,_lastVisible:o}=this;this._first=e.first,this._last=e.last,this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==t||this._last!==i,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==n||this._lastVisible!==o}_correctScrollError(){if(this._scrollError){const{scrollTop:e,scrollLeft:t}=this._scrollerController,{top:i,left:n}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:e-i,left:t-n})}}element(e){return e===1/0&&(e=this._items.length-1),void 0===this._items?.[e]?void 0:{scrollIntoView:(t={})=>this._scrollElementIntoView({...t,index:e})}}_scrollElementIntoView(e){if(e.index>=this._first&&e.index<=this._last)this._children[e.index-this._first].scrollIntoView(e);else if(e.index=Math.min(e.index,this._items.length-1),"smooth"===e.behavior){const t=this._layout.getScrollIntoViewCoordinates(e),{behavior:i}=e;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(t,{behavior:i}),(()=>this._layout.getScrollIntoViewCoordinates(e)),(()=>this._scrollIntoViewTarget=null)),this._scrollIntoViewTarget=e}else this._layout.pin=e}_checkScrollIntoViewTarget(e){const{index:t}=this._scrollIntoViewTarget||{};t&&e?.has(t)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new Cs({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new Qs({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise(((e,t)=>{this._layoutCompleteResolver=e,this._layoutCompleteRejecter=t}))),this._layoutCompletePromise}_rejectLayoutCompletePromise(e){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(e),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame((()=>requestAnimationFrame((()=>this._resolveLayoutCompletePromise())))))}_resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(e){if(this._layout?.measureChildren){for(const t of e)this._toBeMeasured.set(t.target,t.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}};function Bs(e){const t=e?parseFloat(e):NaN;return Number.isNaN(t)?0:t}function $s(e){if(null!==e.assignedSlot)return e.assignedSlot;if(null!==e.parentElement)return e.parentElement;const t=e.parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host||null}const Fs=Te(class extends Ss{constructor(e){if(super(e),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>((e,t)=>R`${t}: ${JSON.stringify(e,null,2)}`)(e,t+this._first),this._keyFunction=(e,t)=>(e=>e)(e,this._first),this._items=[],e.type!==je)throw new Error("The virtualize directive can only be used in child expressions")}render(e){e&&this._setFunctions(e);const t=[];if(this._first>=0&&this._last>=this._first)for(let e=this._first;e<=this._last;e++)t.push(this._items[e]);return Es(t,this._keyFunction,this._renderItem)}update(e,[t]){this._setFunctions(t);const i=this._items!==t.items;return this._items=t.items||[],this._virtualizer?this._updateVirtualizerConfig(e,t):this._initialize(e,t),i?W:this.render()}async _updateVirtualizerConfig(e,t){if(!await this._virtualizer.updateLayoutConfig(t.layout||{})){const i=e.parentNode;this._makeVirtualizer(i,t)}this._virtualizer.items=this._items}_setFunctions(e){const{renderItem:t,keyFunction:i}=e;t&&(this._renderItem=(e,i)=>t(e,i+this._first)),i&&(this._keyFunction=(e,t)=>i(e,t+this._first))}_makeVirtualizer(e,t){this._virtualizer&&this._virtualizer.disconnected();const{layout:i,scroller:n,items:o}=t;this._virtualizer=new Ws({hostElement:e,layout:i,scroller:n}),this._virtualizer.items=o,this._virtualizer.connected()}_initialize(e,t){const i=e.parentNode;i&&1===i.nodeType&&(i.addEventListener("rangeChanged",(e=>{this._first=e.first,this._last=e.last,this.setValue(this.render())})),this._makeVirtualizer(i,t))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}});class Gs{static getVirtualizedContent(e,t,i,n,o,r,s,a,l,M,c,g,u,d,h,N,p,D){return R`
|
|
6479
6479
|
<div part="select-options" class="select__options ${t?"select__options__search-enabled":""} ${u?"loading":""}">
|
|
6480
6480
|
${c&&!u?R`
|
|
6481
6481
|
<div part="select-no-results" class="select__no-results">
|
|
@@ -19658,7 +19658,7 @@ nile-rich-text-editor[disabled] .editor figure.rte-image {
|
|
|
19658
19658
|
${this._renderTrigger()}
|
|
19659
19659
|
${e}
|
|
19660
19660
|
</nile-popover>
|
|
19661
|
-
`:e}};e([de({type:String,attribute:!0,reflect:!0})],NS.prototype,"type",void 0),e([de({type:String,attribute:!0,reflect:!0})],NS.prototype,"value",void 0),e([de({type:String,reflect:!0})],NS.prototype,"swatchTooltip",void 0),e([de({type:Number,reflect:!0})],NS.prototype,"recentColorsCount",void 0),e([de({type:Boolean,reflect:!0})],NS.prototype,"noFill",void 0),e([de({type:String,reflect:!0})],NS.prototype,"mode",void 0),e([de({type:Boolean,reflect:!0})],NS.prototype,"showCanvas",void 0),e([de({type:Boolean,reflect:!0})],NS.prototype,"showHue",void 0),e([de({type:Boolean,reflect:!0})],NS.prototype,"showInputs",void 0),e([de({type:Boolean,reflect:!0})],NS.prototype,"showActions",void 0),e([de({type:Boolean,reflect:!0,attribute:!0})],NS.prototype,"open",void 0),e([de({attribute:"palette",converter:{fromAttribute:e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t.map((e=>"string"==typeof e?{color:e,name:e}:e&&"string"==typeof e.color?{color:e.color,name:e.name||e.color}:null)).filter(Boolean):[]}catch{return[]}},toAttribute:e=>JSON.stringify(e)}})],NS.prototype,"palette",void 0),e([he()],NS.prototype,"_view",void 0),e([he()],NS.prototype,"_recentColors",void 0),e([he()],NS.prototype,"_hue",void 0),e([he()],NS.prototype,"_sat",void 0),e([he()],NS.prototype,"_val",void 0),e([he()],NS.prototype,"_colorMode",void 0),e([he()],NS.prototype,"_hexInput",void 0),e([he()],NS.prototype,"_r",void 0),e([he()],NS.prototype,"_g",void 0),e([he()],NS.prototype,"_b",void 0),NS=e([ce("nile-color-picker")],NS);function pS(){return function(){if("undefined"==typeof window||"function"!=typeof getComputedStyle)return null;try{return getComputedStyle(document.documentElement).getPropertyValue("--nile-version").trim().replace(/^["']|["']$/g,"")||null}catch{return null}}()??"1.3.
|
|
19661
|
+
`:e}};e([de({type:String,attribute:!0,reflect:!0})],NS.prototype,"type",void 0),e([de({type:String,attribute:!0,reflect:!0})],NS.prototype,"value",void 0),e([de({type:String,reflect:!0})],NS.prototype,"swatchTooltip",void 0),e([de({type:Number,reflect:!0})],NS.prototype,"recentColorsCount",void 0),e([de({type:Boolean,reflect:!0})],NS.prototype,"noFill",void 0),e([de({type:String,reflect:!0})],NS.prototype,"mode",void 0),e([de({type:Boolean,reflect:!0})],NS.prototype,"showCanvas",void 0),e([de({type:Boolean,reflect:!0})],NS.prototype,"showHue",void 0),e([de({type:Boolean,reflect:!0})],NS.prototype,"showInputs",void 0),e([de({type:Boolean,reflect:!0})],NS.prototype,"showActions",void 0),e([de({type:Boolean,reflect:!0,attribute:!0})],NS.prototype,"open",void 0),e([de({attribute:"palette",converter:{fromAttribute:e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t.map((e=>"string"==typeof e?{color:e,name:e}:e&&"string"==typeof e.color?{color:e.color,name:e.name||e.color}:null)).filter(Boolean):[]}catch{return[]}},toAttribute:e=>JSON.stringify(e)}})],NS.prototype,"palette",void 0),e([he()],NS.prototype,"_view",void 0),e([he()],NS.prototype,"_recentColors",void 0),e([he()],NS.prototype,"_hue",void 0),e([he()],NS.prototype,"_sat",void 0),e([he()],NS.prototype,"_val",void 0),e([he()],NS.prototype,"_colorMode",void 0),e([he()],NS.prototype,"_hexInput",void 0),e([he()],NS.prototype,"_r",void 0),e([he()],NS.prototype,"_g",void 0),e([he()],NS.prototype,"_b",void 0),NS=e([ce("nile-color-picker")],NS);function pS(){return function(){if("undefined"==typeof window||"function"!=typeof getComputedStyle)return null;try{return getComputedStyle(document.documentElement).getPropertyValue("--nile-version").trim().replace(/^["']|["']$/g,"")||null}catch{return null}}()??"1.3.5"}if("undefined"!=typeof window){window.nileElementsVersion='"2.0.17"';let e=null;Object.defineProperty(window,"nileVersion",{configurable:!0,get:()=>e??pS(),set:t=>{e=t}}),window.process=window.process||{env:{NODE_ENV:"production"}}}const DS=s`
|
|
19662
19662
|
.utility-control::part(base) {
|
|
19663
19663
|
width: var(--nile-app-shell-utility-size, 32px);
|
|
19664
19664
|
height: var(--nile-app-shell-utility-size, 32px);
|
|
@@ -25803,12 +25803,43 @@ a {
|
|
|
25803
25803
|
cursor: col-resize;
|
|
25804
25804
|
}
|
|
25805
25805
|
|
|
25806
|
+
/* --- Email fidelity: an unsized layout table (e.g. a button) fits its
|
|
25807
|
+
content, as it does in mail clients, instead of the 100% default. --- */
|
|
25808
|
+
:host([email-fidelity]) .ProseMirror table[data-autowidth] {
|
|
25809
|
+
width: auto;
|
|
25810
|
+
}
|
|
25811
|
+
|
|
25812
|
+
/* Column resizing sets an inline min-width of 100px per column; on a nested
|
|
25813
|
+
layout table (e.g. a row of social icons) that overflows the cell holding it. */
|
|
25814
|
+
:host([email-fidelity]) .ProseMirror table[data-layout-table] {
|
|
25815
|
+
min-width: 0 !important;
|
|
25816
|
+
}
|
|
25817
|
+
|
|
25818
|
+
/* Email fidelity: the wrapper is editor-only (it holds the resize handles), so
|
|
25819
|
+
its margin would add space the saved email doesn't have. */
|
|
25820
|
+
:host([email-fidelity]) .ProseMirror .tableWrapper {
|
|
25821
|
+
margin: 0;
|
|
25822
|
+
}
|
|
25823
|
+
|
|
25824
|
+
/* Email fidelity: draw unstyled layout-table cells like a mail client (no padding, centred, no header fill). */
|
|
25825
|
+
:host([email-fidelity]) .ProseMirror table[data-layout-table] > tbody > tr > td,
|
|
25826
|
+
:host([email-fidelity]) .ProseMirror table[data-layout-table] > tbody > tr > th {
|
|
25827
|
+
padding: 0;
|
|
25828
|
+
vertical-align: middle;
|
|
25829
|
+
}
|
|
25830
|
+
|
|
25831
|
+
:host([email-fidelity]) .ProseMirror table[data-layout-table] > tbody > tr > th {
|
|
25832
|
+
background: none;
|
|
25833
|
+
}
|
|
25834
|
+
|
|
25806
25835
|
/* --- Layout tables (role="presentation"): borderless output, dashed
|
|
25807
25836
|
guides while editing so the structure stays visible. --- */
|
|
25808
25837
|
.ProseMirror table[data-layout] td,
|
|
25809
25838
|
.ProseMirror table[data-layout] th {
|
|
25810
|
-
|
|
25811
|
-
|
|
25839
|
+
/* Draw the editing guide with an inset outline, not a border/background, so
|
|
25840
|
+
author-set cell borders and backgrounds (email fidelity) are preserved. */
|
|
25841
|
+
outline: 1px dashed var(--nile-colors-neutral-300, var(--ng-colors-border-primary));
|
|
25842
|
+
outline-offset: -1px;
|
|
25812
25843
|
font-weight: inherit;
|
|
25813
25844
|
text-align: inherit;
|
|
25814
25845
|
}
|
|
@@ -25862,7 +25893,7 @@ a {
|
|
|
25862
25893
|
width: 9px;
|
|
25863
25894
|
height: 9px;
|
|
25864
25895
|
background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));
|
|
25865
|
-
border: 1.5px solid var(--ng-colors-bg-primary);
|
|
25896
|
+
border: 1.5px solid var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
25866
25897
|
border-radius: 2px;
|
|
25867
25898
|
z-index: 2;
|
|
25868
25899
|
}
|
|
@@ -26133,7 +26164,17 @@ a {
|
|
|
26133
26164
|
background: var(--nile-wysiwyg-mention-bg, var(--nile-colors-primary-50, var(--ng-componentcolors-utility-blue-50)));
|
|
26134
26165
|
color: var(--nile-wysiwyg-mention-color, var(--nile-colors-primary-700, var(--ng-componentcolors-utility-blue-700)));
|
|
26135
26166
|
font-weight: 500;
|
|
26136
|
-
|
|
26167
|
+
/* Short mentions stay on one line; a long one (e.g. a deep field path) wraps
|
|
26168
|
+
inside its container instead of overflowing a table cell or the editor. */
|
|
26169
|
+
max-width: 100%;
|
|
26170
|
+
overflow-wrap: anywhere;
|
|
26171
|
+
}
|
|
26172
|
+
|
|
26173
|
+
/* The chip's 500 is only a default — bold, headings and an explicit
|
|
26174
|
+
font-weight from the content win, so the chip looks the way it exports. */
|
|
26175
|
+
.ProseMirror :is(strong, b, h1, h2, h3, h4, h5, h6, th, [style*='font-weight'])
|
|
26176
|
+
span.nile-wysiwyg__mention {
|
|
26177
|
+
font-weight: inherit;
|
|
26137
26178
|
}
|
|
26138
26179
|
|
|
26139
26180
|
.ProseMirror span.nile-wysiwyg__mention.ProseMirror-selectednode {
|
|
@@ -26302,7 +26343,7 @@ a {
|
|
|
26302
26343
|
.nile-wysiwyg--show-blocks .ProseMirror h6::after { content: 'H6'; }
|
|
26303
26344
|
.nile-wysiwyg--show-blocks .ProseMirror blockquote::after { content: 'QUOTE'; }
|
|
26304
26345
|
.nile-wysiwyg--show-blocks .ProseMirror pre::after { content: 'PRE'; }
|
|
26305
|
-
`,XP=["ol",0],qP=["ul",0],KP=["li",0],eV={attrs:{order:{default:1,validate:"number"}},parseDOM:[{tag:"ol",getAttrs:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1})}],toDOM:e=>1==e.attrs.order?XP:["ol",{start:e.attrs.order},0]},tV={parseDOM:[{tag:"ul"}],toDOM:()=>qP},iV={parseDOM:[{tag:"li"}],toDOM:()=>KP,defining:!0};function nV(e,t){let i={};for(let t in e)i[t]=e[t];for(let e in t)i[e]=t[e];return i}function oV(e,t=null){return function(i,n){let{$from:o,$to:r}=i.selection,s=o.blockRange(r);if(!s)return!1;let a=n?i.tr:null;return!!function(e,t,i,n=null){let o=!1,r=t,s=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(i)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=s.resolve(t.start-2);r=new UQ(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new UQ(t.$from,s.resolve(t.$to.end(t.depth)),t.depth)),o=!0}let a=VU(r,i,n,t);if(!a)return!1;e&&function(e,t,i,n,o){let r=NQ.empty;for(let e=i.length-1;e>=0;e--)r=NQ.from(i[e].type.create(i[e].attrs,r));e.step(new UU(t.start-(n?2:0),t.end,t.start,t.end,new zQ(r,0,0),i.length,!0));let s=0;for(let e=0;e<i.length;e++)i[e].type==o&&(s=e+1);let a=i.length-s,l=t.start+i.length-(n?2:0),M=t.parent;for(let i=t.startIndex,n=t.endIndex,o=!0;i<n;i++,o=!1)!o&&$U(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=M.child(i).nodeSize}(e,t,a,o,i);return!0}(a,s,e,t)&&(n&&n(a.scrollIntoView()),!0)}}function rV(e,t){return function(i,n){let{$from:o,$to:r,node:s}=i.selection;if(s&&s.isBlock||o.depth<2||!o.sameParent(r))return!1;let a=o.node(-1);if(a.type!=e)return!1;if(0==o.parent.content.size&&o.node(-1).childCount==o.indexAfter(-1)){if(3==o.depth||o.node(-3).type!=e||o.index(-2)!=o.node(-2).childCount-1)return!1;if(n){let t=NQ.empty,r=o.index(-1)?1:o.index(-2)?2:3;for(let e=o.depth-r;e>=o.depth-3;e--)t=NQ.from(o.node(e).copy(t));let s=o.indexAfter(-1)<o.node(-2).childCount?1:o.indexAfter(-2)<o.node(-3).childCount?2:3;t=t.append(NQ.from(e.createAndFill()));let a=o.before(o.depth-(r-1)),l=i.tr.replace(a,o.after(-s),new zQ(t,4-r,0)),M=-1;l.doc.nodesBetween(a,l.doc.content.size,((e,t)=>{if(M>-1)return!1;e.isTextblock&&0==e.content.size&&(M=t+1)})),M>-1&&l.setSelection(cY.near(l.doc.resolve(M))),n(l.scrollIntoView())}return!0}let l=r.pos==o.end()?a.contentMatchAt(0).defaultType:null,M=i.tr.delete(o.pos,r.pos),c=l?[t?{type:e,attrs:t}:null,{type:l}]:void 0;return!!$U(M.doc,o.pos,2,c)&&(n&&n(M.split(o.pos,2,c).scrollIntoView()),!0)}}function sV(e){return function(t,i){let{$from:n,$to:o}=t.selection,r=n.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));return!!r&&(!i||(n.node(r.depth-1).type==e?function(e,t,i,n){let o=e.tr,r=n.end,s=n.$to.end(n.depth);r<s&&(o.step(new UU(r-1,s,r,s,new zQ(NQ.from(i.create(null,n.parent.copy())),1,0),1,!0)),n=new UQ(o.doc.resolve(n.$from.pos),o.doc.resolve(s),n.depth));const a=PU(n);if(null==a)return!1;o.lift(n,a);let l=o.doc.resolve(o.mapping.map(r,-1)-1);FU(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos);return t(o.scrollIntoView()),!0}(t,i,e,r):function(e,t,i){let n=e.tr,o=i.parent;for(let e=i.end,t=i.endIndex-1,r=i.startIndex;t>r;t--)e-=o.child(t).nodeSize,n.delete(e-1,e+1);let r=n.doc.resolve(i.start),s=r.nodeAfter;if(n.mapping.map(i.end)!=i.start+r.nodeAfter.nodeSize)return!1;let a=0==i.startIndex,l=i.endIndex==o.childCount,M=r.node(-1),c=r.index(-1);if(!M.canReplace(c+(a?0:1),c+1,s.content.append(l?NQ.empty:NQ.from(o))))return!1;let g=r.pos,u=g+s.nodeSize;return n.step(new UU(g-(a?1:0),u+(l?1:0),g+1,u-1,new zQ((a?NQ.empty:NQ.from(o.copy(NQ.empty))).append(l?NQ.empty:NQ.from(o.copy(NQ.empty))),a?0:1,l?0:1),a?0:1)),t(n.scrollIntoView()),!0}(t,i,r)))}}function aV(e){return function(t,i){let{$from:n,$to:o}=t.selection,r=n.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));if(!r)return!1;let s=r.startIndex;if(0==s)return!1;let a=r.parent,l=a.child(s-1);if(l.type!=e)return!1;if(i){let n=l.lastChild&&l.lastChild.type==a.type,o=NQ.from(n?e.create():null),s=new zQ(NQ.from(e.create(null,NQ.from(a.type.create(null,o)))),n?3:1,0),M=r.start,c=r.end;i(t.tr.step(new UU(M-(n?3:1),c,M,c,s,1,!0)).scrollIntoView())}return!0}}const lV="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),MV="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function cV(e){let t,i,n,o,r=e.split(/-(?!$)/),s=r[r.length-1];"Space"==s&&(s=" ");for(let e=0;e<r.length-1;e++){let s=r[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))i=!0;else if(/^s(hift)?$/i.test(s))n=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);lV?o=!0:i=!0}}return t&&(s="Alt-"+s),i&&(s="Ctrl-"+s),o&&(s="Meta-"+s),n&&(s="Shift-"+s),s}function gV(e,t,i=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),i&&t.shiftKey&&(e="Shift-"+e),e}function uV(e){return new LY({props:{handleKeyDown:dV(e)}})}function dV(e){let t=function(e){let t=Object.create(null);for(let i in e)t[cV(i)]=e[i];return t}(e);return function(e,i){let n,o=gg(i),r=t[gV(o,i)];if(r&&r(e.state,e.dispatch,e))return!0;if(1==o.length&&" "!=o){if(i.shiftKey){let n=t[gV(o,i,!1)];if(n&&n(e.state,e.dispatch,e))return!0}if((i.altKey||i.metaKey||i.ctrlKey)&&!(MV&&i.ctrlKey&&i.altKey)&&(n=rg[i.keyCode])&&n!=o){let o=t[gV(n,i)];if(o&&o(e.state,e.dispatch,e))return!0}}return!1}}let hV,NV;if("undefined"!=typeof WeakMap){let e=new WeakMap;hV=t=>e.get(t),NV=(t,i)=>(e.set(t,i),i)}else{const e=[],t=10;let i=0;hV=t=>{for(let i=0;i<e.length;i+=2)if(e[i]==t)return e[i+1]},NV=(n,o)=>(i==t&&(i=0),e[i++]=n,e[i++]=o)}var pV=class{constructor(e,t,i,n){this.width=e,this.height=t,this.map=i,this.problems=n}findCell(e){for(let t=0;t<this.map.length;t++){const i=this.map[t];if(i!=e)continue;const n=t%this.width,o=t/this.width|0;let r=n+1,s=o+1;for(let e=1;r<this.width&&this.map[t+e]==i;e++)r++;for(let e=1;s<this.height&&this.map[t+this.width*e]==i;e++)s++;return{left:n,top:o,right:r,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,i){const{left:n,right:o,top:r,bottom:s}=this.findCell(e);return"horiz"==t?(i<0?0==n:o==this.width)?null:this.map[r*this.width+(i<0?n-1:o)]:(i<0?0==r:s==this.height)?null:this.map[n+this.width*(i<0?r-1:s)]}rectBetween(e,t){const{left:i,right:n,top:o,bottom:r}=this.findCell(e),{left:s,right:a,top:l,bottom:M}=this.findCell(t);return{left:Math.min(i,s),top:Math.min(o,l),right:Math.max(n,a),bottom:Math.max(r,M)}}cellsInRect(e){const t=[],i={};for(let n=e.top;n<e.bottom;n++)for(let o=e.left;o<e.right;o++){const r=n*this.width+o,s=this.map[r];i[s]||(i[s]=!0,o==e.left&&o&&this.map[r-1]==s||n==e.top&&n&&this.map[r-this.width]==s||t.push(s))}return t}positionAt(e,t,i){for(let n=0,o=0;;n++){const r=o+i.child(n).nodeSize;if(n==e){let i=t+e*this.width;const n=(e+1)*this.width;for(;i<n&&this.map[i]<o;)i++;return i==n?r-1:this.map[i]}o=r}}static get(e){return hV(e)||NV(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);const t=function(e){let t=-1,i=!1;for(let n=0;n<e.childCount;n++){const o=e.child(n);let r=0;if(i)for(let t=0;t<n;t++){const i=e.child(t);for(let e=0;e<i.childCount;e++){const o=i.child(e);t+o.attrs.rowspan>n&&(r+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){const t=o.child(e);r+=t.attrs.colspan,t.attrs.rowspan>1&&(i=!0)}-1==t?t=r:t!=r&&(t=Math.max(t,r))}return t}(e),i=e.childCount,n=[];let o=0,r=null;const s=[];for(let e=0,o=t*i;e<o;e++)n[e]=0;for(let a=0,l=0;a<i;a++){const M=e.child(a);l++;for(let e=0;;e++){for(;o<n.length&&0!=n[o];)o++;if(e==M.childCount)break;const c=M.child(e),{colspan:g,rowspan:u,colwidth:d}=c.attrs;for(let e=0;e<u;e++){if(e+a>=i){(r||(r=[])).push({type:"overlong_rowspan",pos:l,n:u-e});break}const M=o+e*t;for(let e=0;e<g;e++){0==n[M+e]?n[M+e]=l:(r||(r=[])).push({type:"collision",row:a,pos:l,n:g-e});const i=d&&d[e];if(i){const n=(M+e)%t*2,o=s[n];null==o||o!=i&&1==s[n+1]?(s[n]=i,s[n+1]=1):o==i&&s[n+1]++}}}o+=g,l+=c.nodeSize}const c=(a+1)*t;let g=0;for(;o<c;)0==n[o++]&&g++;g&&(r||(r=[])).push({type:"missing",row:a,n:g}),l++}0!==t&&0!==i||(r||(r=[])).push({type:"zero_sized"});const a=new pV(t,i,n,r);let l=!1;for(let e=0;!l&&e<s.length;e+=2)null!=s[e]&&s[e+1]<i&&(l=!0);l&&function(e,t,i){e.problems||(e.problems=[]);const n={};for(let o=0;o<e.map.length;o++){const r=e.map[o];if(n[r])continue;n[r]=!0;const s=i.nodeAt(r);if(!s)throw new RangeError(`No cell with offset ${r} found`);let a=null;const l=s.attrs;for(let i=0;i<l.colspan;i++){const n=t[(o+i)%e.width*2];null==n||l.colwidth&&l.colwidth[i]==n||((a||(a=DV(l)))[i]=n)}a&&e.problems.unshift({type:"colwidth mismatch",pos:r,colwidth:a})}}(a,s,e);return a}(e))}};function DV(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let i=0;i<e.colspan;i++)t.push(0);return t}function yV(e,t){if("string"==typeof e)return{};const i=e.getAttribute("data-colwidth"),n=i&&/^\d+(,\d+)*$/.test(i)?i.split(",").map((e=>Number(e))):null,o=Number(e.getAttribute("colspan")||1),r={colspan:o,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:n&&n.length==o?n:null};for(const i in t){const n=t[i].getFromDOM,o=n&&n(e);null!=o&&(r[i]=o)}return r}function IV(e,t){const i={};1!=e.attrs.colspan&&(i.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(i.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(i["data-colwidth"]=e.attrs.colwidth.join(","));for(const n in t){const o=t[n].setDOMAttr;o&&o(e.attrs[n],i)}return i}function jV(e){if(null!==e){if(!Array.isArray(e))throw new TypeError("colwidth must be null or an array");for(const t of e)if("number"!=typeof t)throw new TypeError("colwidth must be null or an array of numbers")}}function zV(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const i in e.nodes){const n=e.nodes[i],o=n.spec.tableRole;o&&(t[o]=n)}}return t}const mV=new SY("selectingCells");function TV(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function xV(e){const t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function AV(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;const i=TV(t.$head)||function(e){for(let t=e.nodeAfter,i=e.pos;t;t=t.firstChild,i++){const n=t.type.spec.tableRole;if("cell"==n||"header_cell"==n)return e.doc.resolve(i)}for(let t=e.nodeBefore,i=e.pos;t;t=t.lastChild,i--){const n=t.type.spec.tableRole;if("cell"==n||"header_cell"==n)return e.doc.resolve(i-t.nodeSize)}}(t.$head);if(i)return i;throw new RangeError(`No cell found around position ${t.head}`)}function OV(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function fV(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function bV(e,t,i){const n=e.node(-1),o=pV.get(n),r=e.start(-1),s=o.nextCell(e.pos-r,t,i);return null==s?null:e.node(0).resolve(r+s)}function LV(e,t,i=1){const n={...e,colspan:e.colspan-i};return n.colwidth&&(n.colwidth=n.colwidth.slice(),n.colwidth.splice(t,i),n.colwidth.some((e=>e>0))||(n.colwidth=null)),n}function wV(e,t,i=1){const n={...e,colspan:e.colspan+i};if(n.colwidth){n.colwidth=n.colwidth.slice();for(let e=0;e<i;e++)n.colwidth.splice(t,0,0)}return n}var vV=class e extends cY{constructor(e,t=e){const i=e.node(-1),n=pV.get(i),o=e.start(-1),r=n.rectBetween(e.pos-o,t.pos-o),s=e.node(0),a=n.cellsInRect(r).filter((e=>e!=t.pos-o));a.unshift(t.pos-o);const l=a.map((e=>{const t=i.nodeAt(e);if(!t)throw new RangeError(`No cell with offset ${e} found`);const n=o+e+1;return new gY(s.resolve(n),s.resolve(n+t.content.size))}));super(l[0].$from,l[0].$to,l),this.$anchorCell=e,this.$headCell=t}map(t,i){const n=t.resolve(i.map(this.$anchorCell.pos)),o=t.resolve(i.map(this.$headCell.pos));if(OV(n)&&OV(o)&&fV(n,o)){const t=this.$anchorCell.node(-1)!=n.node(-1);return t&&this.isRowSelection()?e.rowSelection(n,o):t&&this.isColSelection()?e.colSelection(n,o):new e(n,o)}return hY.between(n,o)}content(){const e=this.$anchorCell.node(-1),t=pV.get(e),i=this.$anchorCell.start(-1),n=t.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},r=[];for(let i=n.top;i<n.bottom;i++){const s=[];for(let r=i*t.width+n.left,a=n.left;a<n.right;a++,r++){const i=t.map[r];if(o[i])continue;o[i]=!0;const a=t.findCell(i);let l=e.nodeAt(i);if(!l)throw new RangeError(`No cell with offset ${i} found`);const M=n.left-a.left,c=a.right-n.right;if(M>0||c>0){let e=l.attrs;if(M>0&&(e=LV(e,0,M)),c>0&&(e=LV(e,e.colspan-c,c)),a.left<n.left){if(l=l.type.createAndFill(e),!l)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else l=l.type.create(e,l.content)}if(a.top<n.top||a.bottom>n.bottom){const e={...l.attrs,rowspan:Math.min(a.bottom,n.bottom)-Math.max(a.top,n.top)};l=a.top<n.top?l.type.createAndFill(e):l.type.create(e,l.content)}s.push(l)}r.push(e.child(i).copy(NQ.from(s)))}const s=this.isColSelection()&&this.isRowSelection()?e:r;return new zQ(NQ.from(s),1,1)}replace(e,t=zQ.empty){const i=e.steps.length,n=this.ranges;for(let o=0;o<n.length;o++){const{$from:r,$to:s}=n[o],a=e.mapping.slice(i);e.replace(a.map(r.pos),a.map(s.pos),o?zQ.empty:t)}const o=cY.findFrom(e.doc.resolve(e.mapping.slice(i).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new zQ(NQ.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),i=pV.get(t),n=this.$anchorCell.start(-1),o=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n));for(let i=0;i<o.length;i++)e(t.nodeAt(o[i]),n+o[i])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const i=e+this.$anchorCell.nodeAfter.attrs.rowspan,n=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(i,n)==this.$headCell.node(-1).childCount}static colSelection(t,i=t){const n=t.node(-1),o=pV.get(n),r=t.start(-1),s=o.findCell(t.pos-r),a=o.findCell(i.pos-r),l=t.node(0);return s.top<=a.top?(s.top>0&&(t=l.resolve(r+o.map[s.left])),a.bottom<o.height&&(i=l.resolve(r+o.map[o.width*(o.height-1)+a.right-1]))):(a.top>0&&(i=l.resolve(r+o.map[a.left])),s.bottom<o.height&&(t=l.resolve(r+o.map[o.width*(o.height-1)+s.right-1]))),new e(t,i)}isRowSelection(){const e=this.$anchorCell.node(-1),t=pV.get(e),i=this.$anchorCell.start(-1),n=t.colCount(this.$anchorCell.pos-i),o=t.colCount(this.$headCell.pos-i);if(Math.min(n,o)>0)return!1;const r=n+this.$anchorCell.nodeAfter.attrs.colspan,s=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(r,s)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,i=t){const n=t.node(-1),o=pV.get(n),r=t.start(-1),s=o.findCell(t.pos-r),a=o.findCell(i.pos-r),l=t.node(0);return s.left<=a.left?(s.left>0&&(t=l.resolve(r+o.map[s.top*o.width])),a.right<o.width&&(i=l.resolve(r+o.map[o.width*(a.top+1)-1]))):(a.left>0&&(i=l.resolve(r+o.map[a.top*o.width])),s.right<o.width&&(t=l.resolve(r+o.map[o.width*(s.top+1)-1]))),new e(t,i)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,i){return new e(t.resolve(i.anchor),t.resolve(i.head))}static create(t,i,n=i){return new e(t.resolve(i),t.resolve(n))}getBookmark(){return new SV(this.$anchorCell.pos,this.$headCell.pos)}};vV.prototype.visible=!1,cY.jsonID("cell",vV);var SV=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){const t=e.resolve(this.anchor),i=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==i.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&i.index()<i.parent.childCount&&fV(t,i)?new vV(t,i):cY.near(i,1)}};function kV(e){if(!(e.selection instanceof vV))return null;const t=[];return e.selection.forEachCell(((e,i)=>{t.push(DP.node(i,i+e.nodeSize,{class:"selectedCell"}))})),jP.create(e.doc,t)}const EV=new SY("fix-tables");function CV(e,t,i,n){const o=e.childCount,r=t.childCount;e:for(let s=0,a=0;s<r;s++){const r=t.child(s);for(let t=a,n=Math.min(o,s+3);t<n;t++)if(e.child(t)==r){a=t+1,i+=r.nodeSize;continue e}n(r,i),a<o&&e.child(a).sameMarkup(r)?CV(e.child(a),r,i+1,n):r.nodesBetween(0,r.content.size,n,i+1),i+=r.nodeSize}}function QV(e,t){let i;const n=(t,n)=>{"table"==t.type.spec.tableRole&&(i=function(e,t,i,n){const o=pV.get(t);if(!o.problems)return n;n||(n=e.tr);const r=[];for(let e=0;e<o.height;e++)r.push(0);for(let e=0;e<o.problems.length;e++){const s=o.problems[e];if("collision"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;const o=e.attrs;for(let e=0;e<o.rowspan;e++)r[s.row+e]+=s.n;n.setNodeMarkup(n.mapping.map(i+1+s.pos),null,LV(o,o.colspan-s.n,s.n))}else if("missing"==s.type)r[s.row]+=s.n;else if("overlong_rowspan"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;n.setNodeMarkup(n.mapping.map(i+1+s.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-s.n})}else if("colwidth mismatch"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;n.setNodeMarkup(n.mapping.map(i+1+s.pos),null,{...e.attrs,colwidth:s.colwidth})}else if("zero_sized"==s.type){const e=n.mapping.map(i);n.delete(e,e+t.nodeSize)}}let s,a;for(let e=0;e<r.length;e++)r[e]&&(null==s&&(s=e),a=e);for(let l=0,M=i+1;l<o.height;l++){const i=t.child(l),o=M+i.nodeSize,c=r[l];if(c>0){let t="cell";i.firstChild&&(t=i.firstChild.type.spec.tableRole);const r=[];for(let i=0;i<c;i++){const i=zV(e.schema)[t].createAndFill();i&&r.push(i)}const g=0!=l&&s!=l-1||a!=l?o-1:M+1;n.insert(n.mapping.map(g),r)}M=o}return n.setMeta(EV,{fixTables:!0})}(e,t,n,i))};return t?t.doc!=e.doc&&CV(t.doc,e.doc,0,n):e.doc.descendants(n),i}function UV(e){const t=e.selection,i=AV(e),n=i.node(-1),o=i.start(-1),r=pV.get(n);return{...t instanceof vV?r.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):r.findCell(i.pos-o),tableStart:o,map:r,table:n}}function YV(e,{map:t,tableStart:i,table:n},o){let r=o>0?-1:0;(function(e,t,i){const n=zV(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[i+o*e.width]).type!=n)return!1;return!0})(t,n,o+r)&&(r=0==o||o==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+o;if(o>0&&o<t.width&&t.map[a-1]==t.map[a]){const r=t.map[a],l=n.nodeAt(r);e.setNodeMarkup(e.mapping.map(i+r),null,wV(l.attrs,o-t.colCount(r))),s+=l.attrs.rowspan-1}else{const l=null==r?zV(n.type.schema).cell:n.nodeAt(t.map[a+r]).type,M=t.positionAt(s,o,n);e.insert(e.mapping.map(i+M),l.createAndFill())}}return e}function ZV(e,t){if(!xV(e))return!1;if(t){const i=UV(e);t(YV(e.tr,i,i.left))}return!0}function _V(e,t){if(!xV(e))return!1;if(t){const i=UV(e);t(YV(e.tr,i,i.right))}return!0}function PV(e,{map:t,table:i,tableStart:n},o){const r=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+o,l=t.map[a],M=i.nodeAt(l),c=M.attrs;if(o>0&&t.map[a-1]==l||o<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(r).map(n+l),null,LV(c,o-t.colCount(l)));else{const t=e.mapping.slice(r).map(n+l);e.delete(t,t+M.nodeSize)}s+=c.rowspan}}function VV(e,t){if(!xV(e))return!1;if(t){const i=UV(e),n=e.tr;if(0==i.left&&i.right==i.map.width)return!1;for(let e=i.right-1;PV(n,i,e),e!=i.left;e--){const e=i.tableStart?n.doc.nodeAt(i.tableStart-1):n.doc;if(!e)throw new RangeError("No table found");i.table=e,i.map=pV.get(e)}t(n)}return!0}function RV(e,{map:t,tableStart:i,table:n},o){let r=i;for(let e=0;e<o;e++)r+=n.child(e).nodeSize;const s=[];let a=o>0?-1:0;(function(e,t,i){var n;const o=zV(t.type.schema).header_cell;for(let r=0;r<e.width;r++)if((null===(n=t.nodeAt(e.map[r+i*e.width]))||void 0===n?void 0:n.type)!=o)return!1;return!0})(t,n,o+a)&&(a=0==o||o==t.height?null:0);for(let r=0,M=t.width*o;r<t.width;r++,M++)if(o>0&&o<t.height&&t.map[M]==t.map[M-t.width]){const o=t.map[M],s=n.nodeAt(o).attrs;e.setNodeMarkup(i+o,null,{...s,rowspan:s.rowspan+1}),r+=s.colspan-1}else{var l;const e=null==a?zV(n.type.schema).cell:null===(l=n.nodeAt(t.map[M+a*t.width]))||void 0===l?void 0:l.type,i=null==e?void 0:e.createAndFill();i&&s.push(i)}return e.insert(r,zV(n.type.schema).row.create(null,s)),e}function WV(e,t){if(!xV(e))return!1;if(t){const i=UV(e);t(RV(e.tr,i,i.top))}return!0}function BV(e,t){if(!xV(e))return!1;if(t){const i=UV(e);t(RV(e.tr,i,i.bottom))}return!0}function $V(e,{map:t,table:i,tableStart:n},o){let r=0;for(let e=0;e<o;e++)r+=i.child(e).nodeSize;const s=r+i.child(o).nodeSize,a=e.mapping.maps.length;e.delete(r+n,s+n);const l=new Set;for(let r=0,s=o*t.width;r<t.width;r++,s++){const M=t.map[s];if(!l.has(M))if(l.add(M),o>0&&M==t.map[s-t.width]){const t=i.nodeAt(M).attrs;e.setNodeMarkup(e.mapping.slice(a).map(M+n),null,{...t,rowspan:t.rowspan-1}),r+=t.colspan-1}else if(o<t.height&&M==t.map[s+t.width]){const s=i.nodeAt(M),l=s.attrs,c=s.type.create({...l,rowspan:s.attrs.rowspan-1},s.content),g=t.positionAt(o+1,r,i);e.insert(e.mapping.slice(a).map(n+g),c),r+=l.colspan-1}}}function FV(e,t){if(!xV(e))return!1;if(t){const i=UV(e),n=e.tr;if(0==i.top&&i.bottom==i.map.height)return!1;for(let e=i.bottom-1;$V(n,i,e),e!=i.top;e--){const e=i.tableStart?n.doc.nodeAt(i.tableStart-1):n.doc;if(!e)throw new RangeError("No table found");i.table=e,i.map=pV.get(i.table)}t(n)}return!0}function GV(e){const t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function HV(e,t){const i=e.selection;if(!(i instanceof vV)||i.$anchorCell.pos==i.$headCell.pos)return!1;const n=UV(e),{map:o}=n;if(function({width:e,height:t,map:i},n){let o=n.top*e+n.left,r=o,s=(n.bottom-1)*e+n.left,a=o+(n.right-n.left-1);for(let t=n.top;t<n.bottom;t++){if(n.left>0&&i[r]==i[r-1]||n.right<e&&i[a]==i[a+1])return!0;r+=e,a+=e}for(let r=n.left;r<n.right;r++){if(n.top>0&&i[o]==i[o-e]||n.bottom<t&&i[s]==i[s+e])return!0;o++,s++}return!1}(o,n))return!1;if(t){const i=e.tr,r={};let s,a,l=NQ.empty;for(let e=n.top;e<n.bottom;e++)for(let t=n.left;t<n.right;t++){const M=o.map[e*o.width+t],c=n.table.nodeAt(M);if(!r[M]&&c)if(r[M]=!0,null==s)s=M,a=c;else{GV(c)||(l=l.append(c.content));const e=i.mapping.map(M+n.tableStart);i.delete(e,e+c.nodeSize)}}if(null==s||null==a)return!0;if(i.setNodeMarkup(s+n.tableStart,null,{...wV(a.attrs,a.attrs.colspan,n.right-n.left-a.attrs.colspan),rowspan:n.bottom-n.top}),l.size>0){const e=s+1+a.content.size,t=GV(a)?s+1:e;i.replaceWith(t+n.tableStart,e+n.tableStart,l)}i.setSelection(new vV(i.doc.resolve(s+n.tableStart))),t(i)}return!0}function JV(e,t){const i=zV(e.schema);return(n=({node:e})=>i[e.type.spec.tableRole],(e,t)=>{const i=e.selection;let o,r;if(i instanceof vV){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;o=i.$anchorCell.nodeAfter,r=i.$anchorCell.pos}else{var s;if(o=function(e){for(let t=e.depth;t>0;t--){const i=e.node(t).type.spec.tableRole;if("cell"===i||"header_cell"===i)return e.node(t)}return null}(i.$from),!o)return!1;r=null===(s=TV(i.$from))||void 0===s?void 0:s.pos}if(null==o||null==r)return!1;if(1==o.attrs.colspan&&1==o.attrs.rowspan)return!1;if(t){let s=o.attrs;const a=[],l=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});const M=UV(e),c=e.tr;for(let e=0;e<M.right-M.left;e++)a.push(l?{...s,colwidth:l&&l[e]?[l[e]]:null}:s);let g;for(let e=M.top;e<M.bottom;e++){let t=M.map.positionAt(e,M.left,M.table);e==M.top&&(t+=o.nodeSize);for(let i=M.left,r=0;i<M.right;i++,r++)i==M.left&&e==M.top||c.insert(g=c.mapping.map(t+M.tableStart,1),n({node:o,row:e,col:i}).createAndFill(a[r]))}c.setNodeMarkup(r,n({node:o,row:M.top,col:M.left}),a[0]),i instanceof vV&&c.setSelection(new vV(c.doc.resolve(i.$anchorCell.pos),g?c.doc.resolve(g):void 0)),t(c)}return!0})(e,t);var n}function XV(e,t,i){const n=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<n.length;e++){const o=t.table.nodeAt(n[e]);if(o&&o.type!==i.header_cell)return!1}return!0}function qV(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,i){if(!xV(t))return!1;if(i){const n=zV(t.schema),o=UV(t),r=t.tr,s=o.map.cellsInRect("column"==e?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==e?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),a=s.map((e=>o.table.nodeAt(e)));for(let e=0;e<s.length;e++)a[e].type==n.header_cell&&r.setNodeMarkup(o.tableStart+s[e],n.cell,a[e].attrs);if(0===r.steps.length)for(let e=0;e<s.length;e++)r.setNodeMarkup(o.tableStart+s[e],n.header_cell,a[e].attrs);i(r)}return!0}}(e):function(t,i){if(!xV(t))return!1;if(i){const n=zV(t.schema),o=UV(t),r=t.tr,s=XV("row",o,n),a=XV("column",o,n),l=("column"===e?s:"row"===e&&a)?1:0,M="column"==e?{left:0,top:l,right:1,bottom:o.map.height}:"row"==e?{left:l,top:0,right:o.map.width,bottom:1}:o,c="column"==e?a?n.cell:n.header_cell:"row"==e?s?n.cell:n.header_cell:n.cell;o.map.cellsInRect(M).forEach((e=>{const t=e+o.tableStart,i=r.doc.nodeAt(t);i&&r.setNodeMarkup(t,c,i.attrs)})),i(r)}return!0}}const KV=qV("row",{useDeprecatedLogic:!0});function eR(e,t){const i=e.selection.$anchor;for(let n=i.depth;n>0;n--)if("table"==i.node(n).type.spec.tableRole)return t&&t(e.tr.delete(i.before(n),i.after(n)).scrollIntoView()),!0;return!1}function tR(e,t){const i=e.selection;if(!(i instanceof vV))return!1;if(t){const n=e.tr,o=zV(e.schema).cell.createAndFill().content;i.forEachCell(((e,t)=>{e.content.eq(o)||n.replace(n.mapping.map(t+1),n.mapping.map(t+e.nodeSize-1),new zQ(o,0,0))})),n.docChanged&&t(n)}return!0}function iR(e){if(0===e.size)return null;let{content:t,openStart:i,openEnd:n}=e;for(;1==t.childCount&&(i>0&&n>0||"table"==t.child(0).type.spec.tableRole);)i--,n--,t=t.child(0).content;const o=t.child(0),r=o.type.spec.tableRole,s=o.type.schema,a=[];if("row"==r)for(let e=0;e<t.childCount;e++){let o=t.child(e).content;const r=e?0:Math.max(0,i-1),l=e<t.childCount-1?0:Math.max(0,n-1);(r||l)&&(o=nR(zV(s).row,new zQ(o,r,l)).content),a.push(o)}else{if("cell"!=r&&"header_cell"!=r)return null;a.push(i||n?nR(zV(s).row,new zQ(t,i,n)).content:t)}return function(e,t){const i=[];for(let e=0;e<t.length;e++){const n=t[e];for(let t=n.childCount-1;t>=0;t--){const{rowspan:o,colspan:r}=n.child(t).attrs;for(let t=e;t<e+o;t++)i[t]=(i[t]||0)+r}}let n=0;for(let e=0;e<i.length;e++)n=Math.max(n,i[e]);for(let o=0;o<i.length;o++)if(o>=t.length&&t.push(NQ.empty),i[o]<n){const r=zV(e).cell.createAndFill(),s=[];for(let e=i[o];e<n;e++)s.push(r);t[o]=t[o].append(NQ.from(s))}return{height:t.length,width:n,rows:t}}(s,a)}function nR(e,t){const i=e.createAndFill();return new lY(i).replace(0,i.content.size,t).doc}function oR(e,t,i,n,o,r,s,a){if(0==s||s==t.height)return!1;let l=!1;for(let M=o;M<r;M++){const o=s*t.width+M,r=t.map[o];if(t.map[o-t.width]==r){l=!0;const o=i.nodeAt(r),{top:c,left:g}=t.findCell(r);e.setNodeMarkup(e.mapping.slice(a).map(r+n),null,{...o.attrs,rowspan:s-c}),e.insert(e.mapping.slice(a).map(t.positionAt(s,g,i)),o.type.createAndFill({...o.attrs,rowspan:c+o.attrs.rowspan-s})),M+=o.attrs.colspan-1}}return l}function rR(e,t,i,n,o,r,s,a){if(0==s||s==t.width)return!1;let l=!1;for(let M=o;M<r;M++){const o=M*t.width+s,r=t.map[o];if(t.map[o-1]==r){l=!0;const o=i.nodeAt(r),c=t.colCount(r),g=e.mapping.slice(a).map(r+n);e.setNodeMarkup(g,null,LV(o.attrs,s-c,o.attrs.colspan-(s-c))),e.insert(g+o.nodeSize,o.type.createAndFill(LV(o.attrs,0,s-c))),M+=o.attrs.rowspan-1}}return l}function sR(e,t,i,n,o){let r=i?e.doc.nodeAt(i-1):e.doc;if(!r)throw new Error("No table found");let s=pV.get(r);const{top:a,left:l}=n,M=l+o.width,c=a+o.height,g=e.tr;let u=0;function d(){if(r=i?g.doc.nodeAt(i-1):g.doc,!r)throw new Error("No table found");s=pV.get(r),u=g.mapping.maps.length}(function(e,t,i,n,o,r,s){const a=zV(e.doc.type.schema);let l,M;if(o>t.width)for(let r=0,c=0;r<t.height;r++){const g=i.child(r);c+=g.nodeSize;const u=[];let d;d=null==g.lastChild||g.lastChild.type==a.cell?l||(l=a.cell.createAndFill()):M||(M=a.header_cell.createAndFill());for(let e=t.width;e<o;e++)u.push(d);e.insert(e.mapping.slice(s).map(c-1+n),u)}if(r>t.height){const c=[];for(let e=0,n=(t.height-1)*t.width;e<Math.max(t.width,o);e++){const o=!(e>=t.width)&&i.nodeAt(t.map[n+e]).type==a.header_cell;c.push(o?M||(M=a.header_cell.createAndFill()):l||(l=a.cell.createAndFill()))}const g=a.row.create(null,NQ.from(c)),u=[];for(let e=t.height;e<r;e++)u.push(g);e.insert(e.mapping.slice(s).map(n+i.nodeSize-2),u)}return!(!l&&!M)})(g,s,r,i,M,c,u)&&d(),oR(g,s,r,i,l,M,a,u)&&d(),oR(g,s,r,i,l,M,c,u)&&d(),rR(g,s,r,i,a,c,l,u)&&d(),rR(g,s,r,i,a,c,M,u)&&d();for(let e=a;e<c;e++){const t=s.positionAt(e,l,r),n=s.positionAt(e,M,r);g.replace(g.mapping.slice(u).map(t+i),g.mapping.slice(u).map(n+i),new zQ(o.rows[e-a],0,0))}d(),g.setSelection(new vV(g.doc.resolve(i+s.positionAt(a,l,r)),g.doc.resolve(i+s.positionAt(c-1,M-1,r)))),t(g)}qV("column",{useDeprecatedLogic:!0}),qV("cell",{useDeprecatedLogic:!0});const aR=dV({ArrowLeft:MR("horiz",-1),ArrowRight:MR("horiz",1),ArrowUp:MR("vert",-1),ArrowDown:MR("vert",1),"Shift-ArrowLeft":cR("horiz",-1),"Shift-ArrowRight":cR("horiz",1),"Shift-ArrowUp":cR("vert",-1),"Shift-ArrowDown":cR("vert",1),Backspace:tR,"Mod-Backspace":tR,Delete:tR,"Mod-Delete":tR});function lR(e,t,i){return!i.eq(e.selection)&&(t&&t(e.tr.setSelection(i).scrollIntoView()),!0)}function MR(e,t){return(i,n,o)=>{if(!o)return!1;const r=i.selection;if(r instanceof vV)return lR(i,n,cY.near(r.$headCell,t));if("horiz"!=e&&!r.empty)return!1;const s=hR(o,e,t);if(null==s)return!1;if("horiz"==e)return lR(i,n,cY.near(i.doc.resolve(r.head+t),t));{const o=i.doc.resolve(s),r=bV(o,e,t);let a;return a=r?cY.near(r,1):t<0?cY.near(i.doc.resolve(o.before(-1)),-1):cY.near(i.doc.resolve(o.after(-1)),1),lR(i,n,a)}}}function cR(e,t){return(i,n,o)=>{if(!o)return!1;const r=i.selection;let s;if(r instanceof vV)s=r;else{const n=hR(o,e,t);if(null==n)return!1;s=new vV(i.doc.resolve(n))}const a=bV(s.$headCell,e,t);return!!a&&lR(i,n,new vV(s.$anchorCell,a))}}function gR(e,t){const i=TV(e.state.doc.resolve(t));return!!i&&(e.dispatch(e.state.tr.setSelection(new vV(i))),!0)}function uR(e,t,i){if(!xV(e.state))return!1;let n=iR(i);const o=e.state.selection;if(o instanceof vV){n||(n={width:1,height:1,rows:[NQ.from(nR(zV(e.state.schema).cell,i))]});const t=o.$anchorCell.node(-1),r=o.$anchorCell.start(-1),s=pV.get(t).rectBetween(o.$anchorCell.pos-r,o.$headCell.pos-r);return n=function({width:e,height:t,rows:i},n,o){if(e!=n){const t=[],o=[];for(let e=0;e<i.length;e++){const r=i[e],s=[];for(let i=t[e]||0,o=0;i<n;o++){let a=r.child(o%r.childCount);i+a.attrs.colspan>n&&(a=a.type.createChecked(LV(a.attrs,a.attrs.colspan,i+a.attrs.colspan-n),a.content)),s.push(a),i+=a.attrs.colspan;for(let i=1;i<a.attrs.rowspan;i++)t[e+i]=(t[e+i]||0)+a.attrs.colspan}o.push(NQ.from(s))}i=o,e=n}if(t!=o){const e=[];for(let n=0,r=0;n<o;n++,r++){const s=[],a=i[r%t];for(let e=0;e<a.childCount;e++){let t=a.child(e);n+t.attrs.rowspan>o&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,o-t.attrs.rowspan)},t.content)),s.push(t)}e.push(NQ.from(s))}i=e,t=o}return{width:e,height:t,rows:i}}(n,s.right-s.left,s.bottom-s.top),sR(e.state,e.dispatch,r,s,n),!0}if(n){const t=AV(e.state),i=t.start(-1);return sR(e.state,e.dispatch,i,pV.get(t.node(-1)).findCell(t.pos-i),n),!0}return!1}function dR(e,t){var i;if(0!=t.button)return;if(t.ctrlKey||t.metaKey)return;const n=NR(e,t.target);let o;if(t.shiftKey&&e.state.selection instanceof vV)r(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&n&&null!=(o=TV(e.state.selection.$anchor))&&(null===(i=pR(e,t))||void 0===i?void 0:i.pos)!=o.pos)r(o,t),t.preventDefault();else if(!n)return;function r(t,i){let n=pR(e,i);const o=null==mV.getState(e.state);if(!n||!fV(t,n)){if(!o)return;n=t}const r=new vV(t,n);if(o||!e.state.selection.eq(r)){const i=e.state.tr.setSelection(r);o&&i.setMeta(mV,t.pos),e.dispatch(i)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),null!=mV.getState(e.state)&&e.dispatch(e.state.tr.setMeta(mV,-1))}function a(i){const o=i,a=mV.getState(e.state);let l;if(null!=a)l=e.state.doc.resolve(a);else if(NR(e,o.target)!=n&&(l=pR(e,t),!l))return s();l&&r(l,o)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function hR(e,t,i){if(!(e.state.selection instanceof hY))return null;const{$head:n}=e.state.selection;for(let o=n.depth-1;o>=0;o--){const r=n.node(o);if((i<0?n.index(o):n.indexAfter(o))!=(i<0?0:r.childCount))return null;if("cell"==r.type.spec.tableRole||"header_cell"==r.type.spec.tableRole){const r=n.before(o),s="vert"==t?i>0?"down":"up":i>0?"right":"left";return e.endOfTextblock(s)?r:null}}return null}function NR(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function pR(e,t){const i=e.posAtCoords({left:t.clientX,top:t.clientY});if(!i)return null;let{inside:n,pos:o}=i;return n>=0&&TV(e.state.doc.resolve(n))||TV(e.state.doc.resolve(o))}var DR=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),yR(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,yR(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function yR(e,t,i,n,o,r){let s=0,a=!0,l=t.firstChild;const M=e.firstChild;if(M){for(let e=0,i=0;e<M.childCount;e++){const{colspan:c,colwidth:g}=M.child(e).attrs;for(let e=0;e<c;e++,i++){const M=o==i?r:g&&g[e],c=M?M+"px":"";if(s+=M||n,M||(a=!1),l)l.style.width!=c&&(l.style.width=c),l=l.nextSibling;else{const e=document.createElement("col");e.style.width=c,t.appendChild(e)}}}for(;l;){var c;const e=l.nextSibling;null===(c=l.parentNode)||void 0===c||c.removeChild(l),l=e}a?(i.style.width=s+"px",i.style.minWidth=""):(i.style.width="",i.style.minWidth=s+"px")}}const IR=new SY("tableColumnResizing");function jR({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:i=100,View:n=DR,lastColumnResizable:o=!0}={}){const r=new LY({key:IR,state:{init(e,t){var o;const s=null===(o=r.spec)||void 0===o||null===(o=o.props)||void 0===o?void 0:o.nodeViews,a=zV(t.schema).table.name;return n&&s&&(s[a]=(e,t)=>new n(e,i,t)),new zR(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>{const t=IR.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,i)=>{!function(e,t,i,n){if(!e.editable)return;const o=IR.getState(e.state);if(!o)return;if(!o.dragging){const r=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target);let s=-1;if(r){const{left:n,right:o}=r.getBoundingClientRect();t.clientX-n<=i?s=mR(e,t,"left",i):o-t.clientX<=i&&(s=mR(e,t,"right",i))}if(s!=o.activeHandle){if(!n&&-1!==s){const t=e.state.doc.resolve(s),i=t.node(-1),n=pV.get(i),o=t.start(-1);if(n.colCount(t.pos-o)+t.nodeAfter.attrs.colspan-1==n.width-1)return}xR(e,s)}}}(t,i,e,o)},mouseleave:e=>{!function(e){if(!e.editable)return;const t=IR.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&xR(e,-1)}(e)},mousedown:(e,n)=>{!function(e,t,i,n){var o;if(!e.editable)return!1;const r=null!==(o=e.dom.ownerDocument.defaultView)&&void 0!==o?o:window,s=IR.getState(e.state);if(!s||-1==s.activeHandle||s.dragging)return!1;const a=e.state.doc.nodeAt(s.activeHandle),l=function(e,t,{colspan:i,colwidth:n}){const o=n&&n[n.length-1];if(o)return o;const r=e.domAtPos(t);let s=r.node.childNodes[r.offset].offsetWidth,a=i;if(n)for(let e=0;e<i;e++)n[e]&&(s-=n[e],a--);return s/a}(e,s.activeHandle,a.attrs);function M(t){r.removeEventListener("mouseup",M),r.removeEventListener("mousemove",c);const n=IR.getState(e.state);(null==n?void 0:n.dragging)&&(!function(e,t,i){const n=e.state.doc.resolve(t),o=n.node(-1),r=pV.get(o),s=n.start(-1),a=r.colCount(n.pos-s)+n.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<r.height;e++){const t=e*r.width+a;if(e&&r.map[t]==r.map[t-r.width])continue;const n=r.map[t],M=o.nodeAt(n).attrs,c=1==M.colspan?0:a-r.colCount(n);if(M.colwidth&&M.colwidth[c]==i)continue;const g=M.colwidth?M.colwidth.slice():OR(M.colspan);g[c]=i,l.setNodeMarkup(s+n,null,{...M,colwidth:g})}l.docChanged&&e.dispatch(l)}(e,n.activeHandle,TR(n.dragging,t,i)),e.dispatch(e.state.tr.setMeta(IR,{setDragging:null})))}function c(t){if(!t.which)return M(t);const o=IR.getState(e.state);if(o&&o.dragging){const r=TR(o.dragging,t,i);AR(e,o.activeHandle,r,n)}}e.dispatch(e.state.tr.setMeta(IR,{setDragging:{startX:t.clientX,startWidth:l}})),AR(e,s.activeHandle,l,n),r.addEventListener("mouseup",M),r.addEventListener("mousemove",c),t.preventDefault()}(e,n,t,i)}},decorations:e=>{const t=IR.getState(e);if(t&&t.activeHandle>-1)return function(e,t){const i=[],n=e.doc.resolve(t),o=n.node(-1);if(!o)return jP.empty;const r=pV.get(o),s=n.start(-1),a=r.colCount(n.pos-s)+n.nodeAfter.attrs.colspan-1;for(let t=0;t<r.height;t++){const n=a+t*r.width;if(!(a!=r.width-1&&r.map[n]==r.map[n+1]||0!=t&&r.map[n]==r.map[n-r.width])){var l;const t=r.map[n],a=s+t+o.nodeAt(t).nodeSize-1,M=document.createElement("div");M.className="column-resize-handle",(null===(l=IR.getState(e))||void 0===l?void 0:l.dragging)&&i.push(DP.node(s+t,s+t+o.nodeAt(t).nodeSize,{class:"column-resize-dragging"})),i.push(DP.widget(a,M))}}return jP.create(e.doc,i)}(e,t.activeHandle)},nodeViews:{}}});return r}var zR=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){const i=this,n=t.getMeta(IR);if(n&&null!=n.setHandle)return new e(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new e(i.activeHandle,n.setDragging);if(i.activeHandle>-1&&t.docChanged){let n=t.mapping.map(i.activeHandle,-1);return OV(t.doc.resolve(n))||(n=-1),new e(n,i.dragging)}return i}};function mR(e,t,i,n){const o="right"==i?-n:n,r=e.posAtCoords({left:t.clientX+o,top:t.clientY});if(!r)return-1;const{pos:s}=r,a=TV(e.state.doc.resolve(s));if(!a)return-1;if("right"==i)return a.pos;const l=pV.get(a.node(-1)),M=a.start(-1),c=l.map.indexOf(a.pos-M);return c%l.width==0?-1:M+l.map[c-1]}function TR(e,t,i){const n=t.clientX-e.startX;return Math.max(i,e.startWidth+n)}function xR(e,t){e.dispatch(e.state.tr.setMeta(IR,{setHandle:t}))}function AR(e,t,i,n){const o=e.state.doc.resolve(t),r=o.node(-1),s=o.start(-1),a=pV.get(r).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let l=e.domAtPos(o.start(-1)).node;for(;l&&"TABLE"!=l.nodeName;)l=l.parentNode;l&&yR(r,l.firstChild,l,n,a,i)}function OR(e){return Array(e).fill(0)}function fR({allowTableNodeSelection:e=!1}={}){return new LY({key:mV,state:{init:()=>null,apply(e,t){const i=e.getMeta(mV);if(null!=i)return-1==i?null:i;if(null==t||!e.docChanged)return t;const{deleted:n,pos:o}=e.mapping.mapResult(t);return n?null:o}},props:{decorations:kV,handleDOMEvents:{mousedown:dR},createSelectionBetween:e=>null!=mV.getState(e.state)?e.state.selection:null,handleTripleClick:gR,handleKeyDown:aR,handlePaste:uR},appendTransaction:(t,i,n)=>function(e,t,i){const n=(t||e).selection,o=(t||e).doc;let r,s;if(n instanceof pY&&(s=n.node.type.spec.tableRole)){if("cell"==s||"header_cell"==s)r=vV.create(o,n.from);else if("row"==s){const e=o.resolve(n.from+1);r=vV.rowSelection(e,e)}else if(!i){const e=pV.get(n.node),t=n.from+1,i=t+e.map[e.width*e.height-1];r=vV.create(o,t+1,i)}}else n instanceof hY&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let i=e.pos,n=t.pos,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,i++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,n--);return i==n&&/row|table/.test(e.node(o).type.spec.tableRole)}(n)?r=hY.create(o,n.from):n instanceof hY&&function({$from:e,$to:t}){let i,n;for(let t=e.depth;t>0;t--){const n=e.node(t);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){i=n;break}}for(let e=t.depth;e>0;e--){const i=t.node(e);if("cell"===i.type.spec.tableRole||"header_cell"===i.type.spec.tableRole){n=i;break}}return i!==n&&0===t.parentOffset}(n)&&(r=hY.create(o,n.$from.start(),n.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(n,QV(n,i),e)})}const bR="allow-scripts allow-same-origin allow-presentation allow-popups",LR="strict-origin-when-cross-origin";function wR(e){let t;try{t=new URL(e.trim())}catch{return null}if("https:"!==t.protocol)return null;const i=t.hostname.replace(/^www\./,"");if("youtube.com"===i||"youtube-nocookie.com"===i||"youtu.be"===i){let e="";if("youtu.be"===i)e=t.pathname.slice(1).split("/")[0];else if("/watch"===t.pathname)e=t.searchParams.get("v")??"";else{const i=/^\/(embed|shorts)\/([\w-]+)/.exec(t.pathname);i&&(e=i[2])}if(/^[\w-]{6,20}$/.test(e))return{src:`https://www.youtube-nocookie.com/embed/${e}`,provider:"youtube"}}else if("vimeo.com"===i||"player.vimeo.com"===i){const e=/\/(?:video\/)?(\d{6,12})(?:$|[/?])/.exec(t.pathname);if(e)return{src:`https://player.vimeo.com/video/${e[1]}`,provider:"vimeo"}}else if("loom.com"===i){const e=/^\/(share|embed)\/([0-9a-f]{16,40})/.exec(t.pathname);if(e)return{src:`https://www.loom.com/embed/${e[2]}`,provider:"loom"}}return{src:t.href,provider:"generic"}}function vR(e){try{return"https:"===new URL(e.trim()).protocol}catch{return!1}}const SR=["left","center","right","justify"];function kR(e){const t=e.style.textAlign||e.getAttribute("align")||"";return SR.includes(t)?t:null}function ER(e){const t=e.style.marginInlineStart||e.style.marginLeft||"",i=parseFloat(t);return!Number.isFinite(i)||i<=0?0:Math.min(8,Math.round(i/40))}function CR(e){const t=e.style.lineHeight.trim();if(!t||"normal"===t)return null;const i=parseFloat(t);return!Number.isFinite(i)||i<=0?null:t.endsWith("%")?String(i/100):t}function QR(e){const t=[],i=function(e){return e?`text-align: ${e}`:null}(e.align??null);return i&&t.push(i),e.indent&&t.push(`margin-inline-start: ${40*e.indent}px`),e.lineHeight&&t.push(`line-height: ${e.lineHeight}`),t.length?t.join("; "):null}const UR=/^(?:nile-wysiwyg|ProseMirror)/;function YR(e){if(!e)return null;const t=e.split(/\s+/).filter((e=>e&&!UR.test(e)));return t.length?t.join(" "):null}function ZR(e){return e&&!UR.test(e)?e:null}const _R={htmlClass:{default:null},htmlId:{default:null}};function PR(e){return{htmlClass:YR(e.getAttribute("class")),htmlId:ZR(e.getAttribute("id"))}}function VR(e){if(!("tag"in e)||"style"in e)return e;const t=e.getAttrs;return{...e,getAttrs(e){const i=t?t(e):null;return!1!==i&&{...i??{},...PR(e)}}}}function RR(e){return{...e,attrs:{...e.attrs??{},..._R},parseDOM:e.parseDOM?.map(VR),toDOM:(t=e.toDOM,t?(e,...i)=>{const n=t(e,...i),o=e.attrs.htmlClass,r=e.attrs.htmlId;if(!Array.isArray(n)||!o&&!r)return n;const[s,...a]=n;let l={},M=a;return a.length&&a[0]&&"object"==typeof a[0]&&!Array.isArray(a[0])&&(l={...a[0]},M=a.slice(1)),o&&(l.class=l.class?`${l.class} ${o}`:o),r&&(l.id=r),[s,l,...M]}:t)};var t}const WR=["paragraph","heading","blockquote","code_block","bullet_list","ordered_list","list_item","table","table_row","table_cell","table_header"],BR=["link","bold","italic","underline","strike","code","subscript","superscript"],$R={doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:{align:{default:null},indent:{default:0},lineHeight:{default:null}},parseDOM:[{tag:"p",getAttrs:e=>({align:kR(e),indent:ER(e),lineHeight:CR(e)})}],toDOM(e){const t=QR(e.attrs);return t?["p",{style:t},0]:["p",0]}},heading:{content:"inline*",group:"block",defining:!0,attrs:{level:{default:1},align:{default:null},indent:{default:0},lineHeight:{default:null}},parseDOM:[1,2,3,4,5,6].map((e=>({tag:`h${e}`,getAttrs:t=>({level:e,align:kR(t),indent:ER(t),lineHeight:CR(t)})}))),toDOM(e){const t=QR(e.attrs);return t?[`h${e.attrs.level}`,{style:t},0]:[`h${e.attrs.level}`,0]}},blockquote:{content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:()=>["blockquote",0]},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["hr"]},text:{group:"inline"},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]},code_block:{content:"text*",group:"block",marks:"",code:!0,defining:!0,attrs:{language:{default:null}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({language:e.getAttribute("data-language")})}],toDOM(e){const t={class:"nile-wysiwyg__code-block"};return e.attrs.language&&(t["data-language"]=e.attrs.language),["pre",t,["code",0]]}},image:{inline:!0,group:"inline",draggable:!0,attrs:{src:{},alt:{default:null},title:{default:null},width:{default:null}},parseDOM:[{tag:"img[src]",getAttrs:e=>{const t=parseFloat(e.style.width),i=parseFloat(e.getAttribute("width")??""),n=Number.isFinite(t)?Math.round(t):Number.isFinite(i)?Math.round(i):null;return{src:e.getAttribute("src"),alt:e.getAttribute("alt"),title:e.getAttribute("title"),width:n&&n>0?n:null}}}],toDOM(e){const{src:t,alt:i,title:n,width:o}=e.attrs,r={src:t};return i&&(r.alt=i),n&&(r.title=n),o&&(r.style=`width: ${o}px`),["img",r]}},figure:{group:"block",content:"inline*",defining:!0,isolating:!0,attrs:{src:{},alt:{default:null},title:{default:null},width:{default:null},align:{default:null}},parseDOM:[{tag:"figure",contentElement:"figcaption",getAttrs:e=>{const t=e.querySelector("img[src]");if(!t)return!1;const i=parseFloat(t.style.width||e.style.width),n=e.getAttribute("data-align");return{src:t.getAttribute("src"),alt:t.getAttribute("alt"),title:t.getAttribute("title"),width:Number.isFinite(i)&&i>0?Math.round(i):null,align:"left"===n||"center"===n||"right"===n?n:null}}}],toDOM(e){const{src:t,alt:i,title:n,width:o,align:r}=e.attrs,s={class:"nile-wysiwyg__figure"};r&&(s["data-align"]=r);const a=[];o&&a.push(`width: ${o}px`),"center"===r?a.push("margin-left: auto; margin-right: auto"):"right"===r&&a.push("margin-left: auto; margin-right: 0"),a.length&&(s.style=a.join("; "));const l={src:t,style:"width: 100%"};return i&&(l.alt=i),n&&(l.title=n),["figure",s,["img",l],["figcaption",{class:"nile-wysiwyg__figcaption"},0]]}},task_list:{content:"task_item+",group:"block",parseDOM:[{tag:"ul[data-task-list]",priority:51}],toDOM:()=>["ul",{"data-task-list":"true",class:"nile-wysiwyg__task-list"},0]},task_item:{content:"paragraph block*",defining:!0,attrs:{checked:{default:!1}},parseDOM:[{tag:"li[data-task-item]",priority:51,getAttrs:e=>({checked:"true"===e.getAttribute("data-checked")})}],toDOM:e=>["li",{"data-task-item":"true","data-checked":String(e.attrs.checked),class:"nile-wysiwyg__task-item"},0]},embed:{group:"block",atom:!0,selectable:!0,draggable:!0,attrs:{src:{},provider:{default:null},title:{default:null},width:{default:null},align:{default:null}},parseDOM:[{tag:"div[data-embed-provider]",getAttrs:e=>{const t=e.querySelector("iframe[src]");if(!t)return!1;const i=e.getAttribute("data-width")??/^(\d+)px$/.exec(e.style.width)?.[1],n=i?parseInt(i,10):NaN,o=e.getAttribute("data-align");return{src:t.getAttribute("src"),provider:e.getAttribute("data-embed-provider"),title:t.getAttribute("title"),width:Number.isFinite(n)&&n>0?n:null,align:"left"===o||"center"===o||"right"===o?o:null}}},{tag:"iframe[src]",getAttrs:e=>{const t=parseInt(e.getAttribute("width")??"",10);return{src:e.getAttribute("src"),title:e.getAttribute("title"),width:Number.isFinite(t)&&t>0?t:null}}}],toDOM(e){const{src:t,provider:i,title:n,width:o,align:r}=e.attrs,s={src:t,frameborder:"0",allowfullscreen:"true",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",sandbox:bR,referrerpolicy:LR};n&&(s.title=n);const a={class:"nile-wysiwyg__embed","data-embed-provider":i??"generic"},l=[];return o&&(a["data-width"]=String(o),l.push(`width: ${o}px`,"max-width: 100%")),r&&(a["data-align"]=r,"center"===r?l.push("margin-left: auto","margin-right: auto"):"right"===r&&l.push("margin-left: auto","margin-right: 0")),l.length&&(a.style=l.join("; ")),["div",a,["iframe",s]]}},styleBlock:{group:"block",atom:!0,selectable:!0,attrs:{css:{default:""}},parseDOM:[{tag:"style",getAttrs:e=>({css:e.textContent??""})}],toDOM:e=>["style",e.attrs.css]},bookmark:{inline:!0,group:"inline",atom:!0,selectable:!0,attrs:{id:{}},parseDOM:[{tag:"a[data-bookmark]",priority:60,getAttrs:e=>{const t=e.getAttribute("id")||e.getAttribute("name");return!!t&&{id:t}}},{tag:"a[id]",getAttrs:e=>!e.hasAttribute("href")&&{id:e.getAttribute("id")}},{tag:"a[name]",getAttrs:e=>!e.hasAttribute("href")&&{id:e.getAttribute("name")}}],toDOM:e=>["a",{id:e.attrs.id,"data-bookmark":"true"}]},mention:{inline:!0,group:"inline",atom:!0,selectable:!0,attrs:{trigger:{default:"@"},key:{},label:{}},parseDOM:[{tag:"span[data-mention-key]",getAttrs:e=>({trigger:e.getAttribute("data-mention-trigger")||"@",key:e.getAttribute("data-mention-key"),label:e.getAttribute("data-mention-label")||e.textContent?.slice(1)||""})}],toDOM(e){const{trigger:t,key:i,label:n}=e.attrs;return["span",{class:"nile-wysiwyg__mention","data-mention-trigger":t,"data-mention-key":i,"data-mention-label":n},`${t}${n}`]}},merge_field:{inline:!0,group:"inline",atom:!0,selectable:!0,attrs:{id:{},label:{default:null}},parseDOM:[{tag:"span[data-merge-field]",getAttrs:e=>{const t=e.getAttribute("data-merge-field");return!!t&&{id:t,label:e.getAttribute("data-merge-label")||e.textContent||null}}}],toDOM(e){const{id:t,label:i}=e.attrs;return["span",{class:"nile-wysiwyg__merge-field","data-merge-field":t,"data-merge-label":i??""},i||`{{${t}}}`]}},math:{inline:!0,group:"inline",atom:!0,selectable:!0,attrs:{latex:{},display:{default:"inline"}},parseDOM:[{tag:"span[data-math]",getAttrs:e=>({latex:e.getAttribute("data-math")||e.textContent||"",display:"block"===e.getAttribute("data-math-display")?"block":"inline"})}],toDOM(e){const{latex:t,display:i}=e.attrs;return["span",{class:"nile-wysiwyg__math","data-math":t,"data-math-display":i},t]}}},FR=function(e){const t=e.cellAttributes||{},i={colspan:{default:1,validate:"number"},rowspan:{default:1,validate:"number"},colwidth:{default:null,validate:jV}};for(const e in t)i[e]={default:t[e].default,validate:t[e].validate};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:()=>["table",["tbody",0]]},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:()=>["tr",0]},table_cell:{content:e.cellContent,attrs:i,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:e=>yV(e,t)}],toDOM:e=>["td",IV(e,t),0]},table_header:{content:e.cellContent,attrs:i,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:e=>yV(e,t)}],toDOM:e=>["th",IV(e,t),0]}}}({tableGroup:"block",cellContent:"block+",cellAttributes:{background:{default:null,getFromDOM:e=>e.style.backgroundColor||null,setDOMAttr(e,t){e&&(t.style=`${t.style||""}background-color: ${e};`)}}}}),GR=FR.table,HR={...GR,attrs:{...GR.attrs??{},layout:{default:!1}},parseDOM:[{tag:"table",getAttrs:e=>({layout:"presentation"===e.getAttribute("role")||e.hasAttribute("data-layout")})}],toDOM:e=>e.attrs.layout?["table",{role:"presentation","data-layout":"true"},["tbody",0]]:["table",["tbody",0]]},JR={link:{attrs:{href:{},title:{default:null},target:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),title:e.getAttribute("title"),target:e.getAttribute("target")})}],toDOM(e){const{href:t,title:i,target:n}=e.attrs,o={href:t};return i&&(o.title=i),n&&(o.target=n,"_blank"===n&&(o.rel="noopener noreferrer")),["a",o,0]}},bold:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>["strong",0]},italic:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:()=>["em",0]},underline:{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>e.includes("underline")&&null},{style:"text-decoration-line",getAttrs:e=>e.includes("underline")&&null}],toDOM:()=>["u",0]},strike:{parseDOM:[{tag:"s"},{tag:"strike"},{tag:"del"},{style:"text-decoration",getAttrs:e=>e.includes("line-through")&&null},{style:"text-decoration-line",getAttrs:e=>e.includes("line-through")&&null}],toDOM:()=>["s",0]},subscript:{excludes:"subscript superscript",parseDOM:[{tag:"sub"},{style:"vertical-align=sub"}],toDOM:()=>["sub",0]},superscript:{excludes:"subscript superscript",parseDOM:[{tag:"sup"},{style:"vertical-align=super"}],toDOM:()=>["sup",0]},code:{parseDOM:[{tag:"code"}],toDOM:()=>["code",{class:"nile-wysiwyg__inline-code"},0]},html_span:{attrs:{htmlClass:{default:null},htmlId:{default:null}},parseDOM:[{tag:"span",priority:5,getAttrs:e=>{const t=YR(e.getAttribute("class")),i=ZR(e.getAttribute("id"));return!(!t&&!i)&&{htmlClass:t,htmlId:i}}}],toDOM(e){const t={};return e.attrs.htmlClass&&(t.class=e.attrs.htmlClass),e.attrs.htmlId&&(t.id=e.attrs.htmlId),["span",t,0]}},text_color:{attrs:{color:{}},parseDOM:[{style:"color",getAttrs:e=>!!e&&{color:e}}],toDOM:e=>["span",{style:`color: ${e.attrs.color}`},0]},bg_color:{attrs:{color:{}},parseDOM:[{style:"background-color",getAttrs:e=>!(!e||"transparent"===e)&&{color:e}}],toDOM:e=>["span",{style:`background-color: ${e.attrs.color}`},0]},font_family:{attrs:{family:{}},parseDOM:[{style:"font-family",getAttrs:e=>!!e&&{family:e}}],toDOM:e=>["span",{style:`font-family: ${e.attrs.family}`},0]},font_size:{attrs:{size:{}},parseDOM:[{style:"font-size",getAttrs:e=>!!e&&{size:e}}],toDOM:e=>["span",{style:`font-size: ${e.attrs.size}`},0]}},XR=["disc","circle","square"],qR={1:"decimal",a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman"},KR=Object.fromEntries(Object.entries(qR).map((([e,t])=>[t,e]))),eW="multilevel",tW={content:"list_item+",group:"block",attrs:{style:{default:null}},parseDOM:[{tag:"ul",getAttrs:e=>{const t=e.style.listStyleType;return{style:XR.includes(t)?t:null}}}],toDOM:e=>e.attrs.style?["ul",{style:`list-style-type: ${e.attrs.style}`},0]:["ul",0]},iW={content:"list_item+",group:"block",attrs:{order:{default:1},style:{default:null}},parseDOM:[{tag:"ol",getAttrs:e=>{const t=e.getAttribute("type")??"",i=e.style.listStyleType,n=e.getAttribute("data-list-style")===eW?eW:qR[t]??(Object.values(qR).includes(i)?i:null),o=Number(e.getAttribute("start"));return{order:Number.isFinite(o)&&o>0?o:1,style:n}}}],toDOM(e){const t={};return 1!==e.attrs.order&&(t.start=String(e.attrs.order)),e.attrs.style===eW?t["data-list-style"]=eW:e.attrs.style&&KR[e.attrs.style]&&(t.type=KR[e.attrs.style]),["ol",t,0]}};function nW(){let e=function(e,t,i){return e.append({ordered_list:nV(eV,{content:"list_item+",group:i}),bullet_list:nV(tV,{content:"list_item+",group:i}),list_item:nV(iV,{content:t})})}(cQ.from($R),"paragraph block*","block").update("bullet_list",tW).update("ordered_list",iW).append(FR).update("table",HR);for(const t of WR){const i=e.get(t);i&&(e=e.update(t,RR(i)))}let t=cQ.from(JR);for(const e of BR){const i=t.get(e);i&&(t=t.update(e,RR(i)))}return new oU({nodes:e,marks:t})}const oW=nW(),rW=new Set(["script","frame","frameset","object","embed","applet","form","input","textarea","select","button","meta","link","base","title","noscript","template","svg","math","canvas","audio","video","dialog","slot"]),sW=new Set(["p","h1","h2","h3","h4","h5","h6","blockquote","ul","ol","li","br","hr","a","b","strong","i","em","u","s","strike","del","span","code","sub","sup","div","font","pre","figure","figcaption","img","iframe","table","thead","tbody","tfoot","tr","td","th","colgroup","col"]),aW={a:new Set(["href","title","target","rel","id","name","data-bookmark"]),table:new Set(["role","data-layout"]),ol:new Set(["start","type","data-list-style"]),ul:new Set(["data-task-list"]),figure:new Set(["data-align"]),li:new Set(["data-task-item","data-checked"]),span:new Set(["data-mention-trigger","data-mention-key","data-mention-label","data-merge-field","data-merge-label","data-math","data-math-display"]),pre:new Set(["data-language"]),img:new Set(["src","alt","title","width","height"]),td:new Set(["colspan","rowspan","data-colwidth"]),th:new Set(["colspan","rowspan","data-colwidth"]),col:new Set(["span","width"]),div:new Set(["data-embed-provider","data-width","data-align"]),iframe:new Set(["src","title","frameborder","allowfullscreen","allow","sandbox","referrerpolicy"])},lW=new Set(["style","align","class","id"]),MW=/^(?:nile-wysiwyg|ProseMirror)/;const cW=new Set(["color","background-color","font-family","font-size","font-style","font-weight","text-align","text-decoration","text-decoration-line","vertical-align","margin-left","margin-inline-start","list-style-type","line-height"]),gW=["http:","https:","mailto:","tel:","ftp:"];function uW(e,t=!1){const i=e.trim();if(""===i)return!1;if(/^(#|\/|\.\/|\.\.\/)/.test(i))return!0;const n=/^([a-z][a-z0-9+.-]*):/i.exec(i);if(!n)return!0;const o=`${n[1].toLowerCase()}:`;return!!gW.includes(o)||!(!t||"data:"!==o)&&/^data:image\/(png|gif|jpe?g|webp|avif|bmp);/i.test(i)}const dW={img:new Set(["width","height"]),figure:new Set(["width","margin-right"]),div:new Set(["width","max-width"])};function hW(e,t){const i=dW[t];return e.split(";").map((e=>e.trim())).filter((e=>{const t=e.slice(0,e.indexOf(":")).trim().toLowerCase();return!!(cW.has(t)||i&&i.has(t))&&!/url\s*\(|expression\s*\(/i.test(e)})).join("; ")}function NW(e){return e.replace(/<\/style/gi,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/@import[^;]*;?/gi,"").replace(/expression\s*\(/gi,"blocked(").replace(/(behavior|-moz-binding)(\s*):/gi,"blocked-prop$2:").replace(/url\(\s*(['"]?)([^)]*?)\1\s*\)/gi,((e,t,i)=>{const n=String(i).trim();return/^#/.test(n)||/^data:image\/(png|gif|jpe?g|webp|avif|bmp);/i.test(n)?e:"url(#)"})).trim()}function pW(e){const t=e.tagName.toLowerCase(),i=aW[t];for(const n of Array.from(e.attributes)){const o=n.name.toLowerCase();if((lW.has(o)||void 0!==i&&i.has(o))&&!o.startsWith("on"))if("style"===o){const i=hW(n.value,t);i?e.setAttribute("style",i):e.removeAttribute("style")}else if("class"===o){const t=n.value.split(/\s+/).filter((e=>e&&!MW.test(e))).join(" ");t?e.setAttribute("class",t):e.removeAttribute("class")}else"id"===o?MW.test(n.value)&&e.removeAttribute("id"):"href"===o||"src"===o?uW(n.value,"img"===t)||e.removeAttribute(n.name):"target"===o&&("_blank"===n.value?e.setAttribute("rel","noopener noreferrer"):e.removeAttribute("target"));else e.removeAttribute(n.name)}}function DW(e){for(const t of Array.from(e.children)){const e=t.tagName.toLowerCase();if(rW.has(e))t.remove();else{if("iframe"===e){if(!vR(t.getAttribute("src")??"")){t.remove();continue}t.setAttribute("sandbox",bR),t.setAttribute("referrerpolicy",LR)}if("style"!==e)sW.has(e)?(pW(t),DW(t)):(DW(t),t.replaceWith(...Array.from(t.childNodes)));else{t.textContent=NW(t.textContent??"");for(const e of Array.from(t.attributes))t.removeAttribute(e.name)}}}}function yW(e){const t=(new DOMParser).parseFromString(`<body>${e}</body>`,"text/html");return DW(t.body),t.body.innerHTML}const IW=new WeakMap,jW=new WeakMap;function zW(e){let t=IW.get(e);return t||(t=sU.fromSchema(e),IW.set(e,t)),t}function mW(e,t,i=!0){const n=i?yW(t):t,o=(new DOMParser).parseFromString(`<body>${n}</body>`,"text/html");return zW(e).parse(o.body)}function TW(e,t,i=!0){const n=i?yW(t):t,o=(new DOMParser).parseFromString(`<body>${n}</body>`,"text/html");return zW(e).parseSlice(o.body,{preserveWhitespace:!0})}function xW(e){const t=e.type.schema,i=document.createElement("div");return i.appendChild(function(e){let t=jW.get(e);return t||(t=pU.fromSchema(e),jW.set(e,t)),t}(t).serializeFragment(e.content)),i.innerHTML}function AW(e){return e.textBetween(0,e.content.size,"\n"," ")}function OW(e){return e.toJSON()}function fW(e,t){return ZQ.fromJSON(e,t)}function bW(e){const t=AW(e);return{words:t.trim()?t.trim().split(/\s+/).length:0,characters:t.replace(/\n/g,"").length}}function LW(e){if(e.childCount>1)return!1;const t=e.firstChild;return!t||"paragraph"===t.type.name&&0===t.content.size}const wW=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function vW(e,t,i=!1){for(let n=e;n;n="start"==t?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(i&&1!=n.childCount)return!1}return!1}function SW(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function kW(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let i=e.node(t);if(e.index(t)+1<i.childCount)return e.doc.resolve(e.after(t+1));if(i.type.spec.isolating)break}return null}const EW=(e,t)=>{let{$from:i,$to:n}=e.selection,o=i.blockRange(n),r=o&&PU(o);return null!=r&&(t&&t(e.tr.lift(o,r).scrollIntoView()),!0)};function CW(e){for(let t=0;t<e.edgeCount;t++){let{type:i}=e.edge(t);if(i.isTextblock&&!i.hasRequiredAttrs())return i}return null}const QW=(e,t)=>{let{$head:i,$anchor:n}=e.selection;if(!i.parent.type.spec.code||!i.sameParent(n))return!1;let o=i.node(-1),r=i.indexAfter(-1),s=CW(o.contentMatchAt(r));if(!s||!o.canReplaceWith(r,r,s))return!1;if(t){let n=i.after(),o=e.tr.replaceWith(n,n,s.createAndFill());o.setSelection(cY.near(o.doc.resolve(n),1)),t(o.scrollIntoView())}return!0};const UW=(e,t)=>{if(e.selection instanceof pY&&e.selection.node.isBlock){let{$from:i}=e.selection;return!(!i.parentOffset||!$U(e.doc,i.pos)||(t&&t(e.tr.split(i.pos).scrollIntoView()),0))}if(!e.selection.$from.depth)return!1;let i=e.tr;!e.selection.empty&&(e.selection instanceof hY||e.selection instanceof yY)&&i.deleteSelection();let n,o,{$from:r}=i.selection,s=i.steps.length,a=[],l=!1,M=!1;for(let e=r.depth;;e--){if(r.node(e).isBlock){l=r.end(e)==r.pos+(r.depth-e),M=r.start(e)==r.pos-(r.depth-e),o=CW(r.node(e-1).contentMatchAt(r.indexAfter(e-1)));let t=YW&&YW(r.parent,l,r);a.unshift(t||(l&&o?{type:o}:null)),n=e;break}if(1==e)return!1;a.unshift(null)}let c=r.pos,g=$U(i.doc,c,a.length,a);if(g||(a[0]=o?{type:o}:null,g=$U(i.doc,c,a.length,a)),!g)return!1;if(i.split(c,a.length,a),!l&&M&&r.node(n).type!=o){let e=i.mapping.slice(s),t=e.map(r.before(n)),a=i.doc.resolve(t);o&&r.node(n-1).canReplaceWith(a.index(),a.index()+1,o)&&i.setNodeMarkup(e.map(r.before(n)),o)}return t&&t(i.scrollIntoView()),!0};var YW;function ZW(e,t,i,n){let o,r,s=t.nodeBefore,a=t.nodeAfter,l=s.type.spec.isolating||a.type.spec.isolating;if(!l&&function(e,t,i){let n=t.nodeBefore,o=t.nodeAfter,r=t.index();return!(!(n&&o&&n.type.compatibleContent(o.type))||(!n.content.size&&t.parent.canReplace(r-1,r)?(i&&i(e.tr.delete(t.pos-n.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(r,r+1)||!o.isTextblock&&!FU(e.doc,t.pos)||(i&&i(e.tr.join(t.pos).scrollIntoView()),0)))}(e,t,i))return!0;let M=!l&&t.parent.canReplace(t.index(),t.index()+1);if(M&&(o=(r=s.contentMatchAt(s.childCount)).findWrapping(a.type))&&r.matchType(o[0]||a.type).validEnd){if(i){let n=t.pos+a.nodeSize,r=NQ.empty;for(let e=o.length-1;e>=0;e--)r=NQ.from(o[e].create(null,r));r=NQ.from(s.copy(r));let l=e.tr.step(new UU(t.pos-1,n,t.pos,n,new zQ(r,1,0),o.length,!0)),M=l.doc.resolve(n+2*o.length);M.nodeAfter&&M.nodeAfter.type==s.type&&FU(l.doc,M.pos)&&l.join(M.pos),i(l.scrollIntoView())}return!0}let c=a.type.spec.isolating||n>0&&l?null:cY.findFrom(t,1),g=c&&c.$from.blockRange(c.$to),u=g&&PU(g);if(null!=u&&u>=t.depth)return i&&i(e.tr.lift(g,u).scrollIntoView()),!0;if(M&&vW(a,"start",!0)&&vW(s,"end")){let n=s,o=[];for(;o.push(n),!n.isTextblock;)n=n.lastChild;let r=a,l=1;for(;!r.isTextblock;r=r.firstChild)l++;if(n.canReplace(n.childCount,n.childCount,r.content)){if(i){let n=NQ.empty;for(let e=o.length-1;e>=0;e--)n=NQ.from(o[e].copy(n));i(e.tr.step(new UU(t.pos-o.length,t.pos+a.nodeSize,t.pos+l,t.pos+a.nodeSize-l,new zQ(n,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function _W(e){return function(t,i){let n=t.selection,o=e<0?n.$from:n.$to,r=o.depth;for(;o.node(r).isInline;){if(!r)return!1;r--}return!!o.node(r).isTextblock&&(i&&i(t.tr.setSelection(hY.create(t.doc,e<0?o.start(r):o.end(r)))),!0)}}const PW=_W(-1),VW=_W(1);function RW(e,t=null){return function(i,n){let o=!1;for(let n=0;n<i.selection.ranges.length&&!o;n++){let{$from:{pos:r},$to:{pos:s}}=i.selection.ranges[n];i.doc.nodesBetween(r,s,((n,r)=>{if(o)return!1;if(n.isTextblock&&!n.hasMarkup(e,t))if(n.type==e)o=!0;else{let t=i.doc.resolve(r),n=t.index();o=t.parent.canReplaceWith(n,n+1,e)}}))}if(!o)return!1;if(n){let o=i.tr;for(let n=0;n<i.selection.ranges.length;n++){let{$from:{pos:r},$to:{pos:s}}=i.selection.ranges[n];o.setBlockType(r,s,e,t)}n(o.scrollIntoView())}return!0}}function WW(e,t=null,i){let n=!1!==(i&&i.removeWhenPresent),o=!1!==(i&&i.enterInlineAtoms),r=!(i&&i.includeWhitespace);return function(i,s){let{empty:a,$cursor:l,ranges:M}=i.selection;if(a&&!l||!function(e,t,i,n){for(let o=0;o<t.length;o++){let{$from:r,$to:s}=t[o],a=0==r.depth&&e.inlineContent&&e.type.allowsMarkType(i);if(e.nodesBetween(r.pos,s.pos,((e,t)=>{if(a||!n&&e.isAtom&&e.isInline&&t>=r.pos&&t+e.nodeSize<=s.pos)return!1;a=e.inlineContent&&e.type.allowsMarkType(i)})),a)return!0}return!1}(i.doc,M,e,o))return!1;if(s)if(l)e.isInSet(i.storedMarks||l.marks())?s(i.tr.removeStoredMark(e)):s(i.tr.addStoredMark(e.create(t)));else{let a,l=i.tr;o||(M=function(e){let t=[];for(let i=0;i<e.length;i++){let{$from:n,$to:o}=e[i];n.doc.nodesBetween(n.pos,o.pos,((e,i)=>{if(e.isAtom&&e.content.size&&e.isInline&&i>=n.pos&&i+e.nodeSize<=o.pos)return i+1>n.pos&&t.push(new gY(n,n.doc.resolve(i+1))),n=n.doc.resolve(i+1+e.content.size),!1})),n.pos<o.pos&&t.push(new gY(n,o))}return t}(M)),a=n?!M.some((t=>i.doc.rangeHasMark(t.$from.pos,t.$to.pos,e))):!M.every((t=>{let i=!1;return l.doc.nodesBetween(t.$from.pos,t.$to.pos,((n,o,r)=>{if(i)return!1;i=!e.isInSet(n.marks)&&!!r&&r.type.allowsMarkType(e)&&!(n.isText&&/^\s*$/.test(n.textBetween(Math.max(0,t.$from.pos-o),Math.min(n.nodeSize,t.$to.pos-o))))})),!i}));for(let i=0;i<M.length;i++){let{$from:n,$to:o}=M[i];if(a){let i=n.pos,s=o.pos,a=n.nodeAfter,M=o.nodeBefore,c=r&&a&&a.isText?/^\s*/.exec(a.text)[0].length:0,g=r&&M&&M.isText?/\s*$/.exec(M.text)[0].length:0;i+c<s&&(i+=c,s-=g),l.addMark(i,s,e.create(t))}else l.removeMark(n.pos,o.pos,e)}s(l.scrollIntoView())}return!0}}function BW(...e){return function(t,i,n){for(let o=0;o<e.length;o++)if(e[o](t,i,n))return!0;return!1}}let $W=BW(wW,((e,t,i)=>{let n=function(e,t){let{$cursor:i}=e.selection;return!i||(t?!t.endOfTextblock("backward",e):i.parentOffset>0)?null:i}(e,i);if(!n)return!1;let o=SW(n);if(!o){let i=n.blockRange(),o=i&&PU(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)}let r=o.nodeBefore;if(ZW(e,o,t,-1))return!0;if(0==n.parent.content.size&&(vW(r,"end")||pY.isSelectable(r)))for(let i=n.depth;;i--){let s=HU(e.doc,n.before(i),n.after(i),zQ.empty);if(s&&s.slice.size<s.to-s.from){if(t){let i=e.tr.step(s);i.setSelection(vW(r,"end")?cY.findFrom(i.doc.resolve(i.mapping.map(o.pos,-1)),-1):pY.create(i.doc,o.pos-r.nodeSize)),t(i.scrollIntoView())}return!0}if(1==i||n.node(i-1).childCount>1)break}return!(!r.isAtom||o.depth!=n.depth-1)&&(t&&t(e.tr.delete(o.pos-r.nodeSize,o.pos).scrollIntoView()),!0)}),((e,t,i)=>{let{$head:n,empty:o}=e.selection,r=n;if(!o)return!1;if(n.parent.isTextblock){if(i?!i.endOfTextblock("backward",e):n.parentOffset>0)return!1;r=SW(n)}let s=r&&r.nodeBefore;return!(!s||!pY.isSelectable(s))&&(t&&t(e.tr.setSelection(pY.create(e.doc,r.pos-s.nodeSize)).scrollIntoView()),!0)})),FW=BW(wW,((e,t,i)=>{let n=function(e,t){let{$cursor:i}=e.selection;return!i||(t?!t.endOfTextblock("forward",e):i.parentOffset<i.parent.content.size)?null:i}(e,i);if(!n)return!1;let o=kW(n);if(!o)return!1;let r=o.nodeAfter;if(ZW(e,o,t,1))return!0;if(0==n.parent.content.size&&(vW(r,"start")||pY.isSelectable(r))){let i=HU(e.doc,n.before(),n.after(),zQ.empty);if(i&&i.slice.size<i.to-i.from){if(t){let n=e.tr.step(i);n.setSelection(vW(r,"start")?cY.findFrom(n.doc.resolve(n.mapping.map(o.pos)),1):pY.create(n.doc,n.mapping.map(o.pos))),t(n.scrollIntoView())}return!0}}return!(!r.isAtom||o.depth!=n.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+r.nodeSize).scrollIntoView()),!0)}),((e,t,i)=>{let{$head:n,empty:o}=e.selection,r=n;if(!o)return!1;if(n.parent.isTextblock){if(i?!i.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)return!1;r=kW(n)}let s=r&&r.nodeAfter;return!(!s||!pY.isSelectable(s))&&(t&&t(e.tr.setSelection(pY.create(e.doc,r.pos)).scrollIntoView()),!0)}));const GW={Enter:BW(((e,t)=>{let{$head:i,$anchor:n}=e.selection;return!(!i.parent.type.spec.code||!i.sameParent(n))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)}),((e,t)=>{let i=e.selection,{$from:n,$to:o}=i;if(i instanceof yY||n.parent.inlineContent||o.parent.inlineContent)return!1;let r=CW(o.parent.contentMatchAt(o.indexAfter()));if(!r||!r.isTextblock)return!1;if(t){let i=(!n.parentOffset&&o.index()<o.parent.childCount?n:o).pos,s=e.tr.insert(i,r.createAndFill());s.setSelection(hY.create(s.doc,i+1)),t(s.scrollIntoView())}return!0}),((e,t)=>{let{$cursor:i}=e.selection;if(!i||i.parent.content.size)return!1;if(i.depth>1&&i.after()!=i.end(-1)){let n=i.before();if($U(e.doc,n))return t&&t(e.tr.split(n).scrollIntoView()),!0}let n=i.blockRange(),o=n&&PU(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}),UW),"Mod-Enter":QW,Backspace:$W,"Mod-Backspace":$W,"Shift-Backspace":$W,Delete:FW,"Mod-Delete":FW,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new yY(e.doc))),!0)},HW={"Ctrl-h":GW.Backspace,"Alt-Backspace":GW["Mod-Backspace"],"Ctrl-d":GW.Delete,"Ctrl-Alt-Backspace":GW["Mod-Delete"],"Alt-Delete":GW["Mod-Delete"],"Alt-d":GW["Mod-Delete"],"Ctrl-a":PW,"Ctrl-e":VW};for(let e in GW)HW[e]=GW[e];const JW=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&"darwin"==os.platform())?HW:GW;var XW=200,qW=function(){};qW.prototype.append=function(e){return e.length?(e=qW.from(e),!this.length&&e||e.length<XW&&this.leafAppend(e)||this.length<XW&&e.leafPrepend(this)||this.appendInner(e)):this},qW.prototype.prepend=function(e){return e.length?qW.from(e).append(this):this},qW.prototype.appendInner=function(e){return new eB(this,e)},qW.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?qW.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},qW.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},qW.prototype.forEach=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=this.length),t<=i?this.forEachInner(e,t,i,0):this.forEachInvertedInner(e,t,i,0)},qW.prototype.map=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=this.length);var n=[];return this.forEach((function(t,i){return n.push(e(t,i))}),t,i),n},qW.from=function(e){return e instanceof qW?e:e&&e.length?new KW(e):qW.empty};var KW=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,i){return 0==e&&i==this.length?this:new t(this.values.slice(e,i))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,i,n){for(var o=t;o<i;o++)if(!1===e(this.values[o],n+o))return!1},t.prototype.forEachInvertedInner=function(e,t,i,n){for(var o=t-1;o>=i;o--)if(!1===e(this.values[o],n+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=XW)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=XW)return new t(e.flatten().concat(this.values))},i.length.get=function(){return this.values.length},i.depth.get=function(){return 0},Object.defineProperties(t.prototype,i),t}(qW);qW.empty=new KW([]);var eB=function(e){function t(t,i){e.call(this),this.left=t,this.right=i,this.length=t.length+i.length,this.depth=Math.max(t.depth,i.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,i,n){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(i,o),n))&&(!(i>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,i)-o,n+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,i,n){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(i,o)-o,n+o))&&(!(i<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),i,n))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var i=this.left.length;return t<=i?this.left.slice(e,t):e>=i?this.right.slice(e-i,t-i):this.left.slice(e,i).append(this.right.slice(0,t-i))},t.prototype.leafAppend=function(e){var i=this.right.leafAppend(e);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(e){var i=this.left.leafPrepend(e);if(i)return new t(i,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(qW);class tB{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let i,n,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(i=this.remapping(o,this.items.length),n=i.maps.length);let r,s,a=e.tr,l=[],M=[];return this.items.forEach(((e,t)=>{if(!e.step)return i||(i=this.remapping(o,t+1),n=i.maps.length),n--,void M.push(e);if(i){M.push(new iB(e.map));let t,o=e.step.map(i.slice(n));o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new iB(t,void 0,void 0,l.length+M.length))),n--,t&&i.appendMap(t,n)}else a.maybeStep(e.step);return e.selection?(r=i?e.selection.map(i.slice(n)):e.selection,s=new tB(this.items.slice(0,o).append(M.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:r}}addTransform(e,t,i,n){let o=[],r=this.eventCount,s=this.items,a=!n&&s.length?s.get(s.length-1):null;for(let i=0;i<e.steps.length;i++){let l,M=e.steps[i].invert(e.docs[i]),c=new iB(e.mapping.maps[i],M,t);(l=a&&a.merge(c))&&(c=l,i?o.pop():s=s.slice(0,s.length-1)),o.push(c),t&&(r++,t=void 0),n||(a=c)}let l=r-i.depth;return l>oB&&(s=function(e,t){let i;return e.forEach(((e,n)=>{if(e.selection&&0==t--)return i=n,!1})),e.slice(i)}(s,l),r-=l),new tB(s.append(o),r)}remapping(e,t){let i=new fU;return this.items.forEach(((t,n)=>{let o=null!=t.mirrorOffset&&n-t.mirrorOffset>=e?i.maps.length-t.mirrorOffset:void 0;i.appendMap(t.map,o)}),e,t),i}addMaps(e){return 0==this.eventCount?this:new tB(this.items.append(e.map((e=>new iB(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let i=[],n=Math.max(0,this.items.length-t),o=e.mapping,r=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),n);let a=t;this.items.forEach((t=>{let n=o.getMirror(--a);if(null==n)return;r=Math.min(r,n);let l=o.maps[n];if(t.step){let r=e.steps[n].invert(e.docs[n]),M=t.selection&&t.selection.map(o.slice(a+1,n));M&&s++,i.push(new iB(l,r,M))}else i.push(new iB(l))}),n);let l=[];for(let e=t;e<r;e++)l.push(new iB(o.maps[e]));let M=this.items.slice(0,n).append(l).append(i),c=new tB(M,s);return c.emptyItemCount()>500&&(c=c.compress(this.items.length-i.length)),c}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),i=t.maps.length,n=[],o=0;return this.items.forEach(((r,s)=>{if(s>=e)n.push(r),r.selection&&o++;else if(r.step){let e=r.step.map(t.slice(i)),s=e&&e.getMap();if(i--,s&&t.appendMap(s,i),e){let a=r.selection&&r.selection.map(t.slice(i));a&&o++;let l,M=new iB(s.invert(),e,a),c=n.length-1;(l=n.length&&n[c].merge(M))?n[c]=l:n.push(M)}}else r.map&&i--}),this.items.length,0),new tB(qW.from(n.reverse()),o)}}tB.empty=new tB(qW.empty,0);class iB{constructor(e,t,i,n){this.map=e,this.step=t,this.selection=i,this.mirrorOffset=n}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new iB(t.getMap().invert(),t,this.selection)}}}class nB{constructor(e,t,i,n,o){this.done=e,this.undone=t,this.prevRanges=i,this.prevTime=n,this.prevComposition=o}}const oB=20;function rB(e){let t=[];for(let i=e.length-1;i>=0&&0==t.length;i--)e[i].forEach(((e,i,n,o)=>t.push(n,o)));return t}function sB(e,t){if(!e)return null;let i=[];for(let n=0;n<e.length;n+=2){let o=t.map(e[n],1),r=t.map(e[n+1],-1);o<=r&&i.push(o,r)}return i}let aB=!1,lB=null;function MB(e){let t=e.plugins;if(lB!=t){aB=!1,lB=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){aB=!0;break}}return aB}const cB=new SY("history"),gB=new SY("closeHistory");function uB(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new LY({key:cB,state:{init:()=>new nB(tB.empty,tB.empty,null,0,-1),apply:(t,i,n)=>function(e,t,i,n){let o,r=i.getMeta(cB);if(r)return r.historyState;i.getMeta(gB)&&(e=new nB(e.done,e.undone,null,0,-1));let s=i.getMeta("appendedTransaction");if(0==i.steps.length)return e;if(s&&s.getMeta(cB))return s.getMeta(cB).redo?new nB(e.done.addTransform(i,void 0,n,MB(t)),e.undone,rB(i.mapping.maps),e.prevTime,e.prevComposition):new nB(e.done,e.undone.addTransform(i,void 0,n,MB(t)),null,e.prevTime,e.prevComposition);if(!1===i.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=i.getMeta("rebased"))?new nB(e.done.rebased(i,o),e.undone.rebased(i,o),sB(e.prevRanges,i.mapping),e.prevTime,e.prevComposition):new nB(e.done.addMaps(i.mapping.maps),e.undone.addMaps(i.mapping.maps),sB(e.prevRanges,i.mapping),e.prevTime,e.prevComposition);{let o=i.getMeta("composition"),r=0==e.prevTime||!s&&e.prevComposition!=o&&(e.prevTime<(i.time||0)-n.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let i=!1;return e.mapping.maps[0].forEach(((e,n)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&n>=t[o]&&(i=!0)})),i}(i,e.prevRanges)),a=s?sB(e.prevRanges,i.mapping):rB(i.mapping.maps);return new nB(e.done.addTransform(i,r?t.selection.getBookmark():void 0,n,MB(t)),tB.empty,a,i.time,null==o?e.prevComposition:o)}}(i,n,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let i=t.inputType,n="historyUndo"==i?hB:"historyRedo"==i?NB:null;return!(!n||!e.editable)&&(t.preventDefault(),n(e.state,e.dispatch))}}}})}function dB(e,t){return(i,n)=>{let o=cB.getState(i);if(!o||0==(e?o.undone:o.done).eventCount)return!1;if(n){let r=function(e,t,i){let n=MB(t),o=cB.get(t).spec.config,r=(i?e.undone:e.done).popEvent(t,n);if(!r)return null;let s=r.selection.resolve(r.transform.doc),a=(i?e.done:e.undone).addTransform(r.transform,t.selection.getBookmark(),o,n),l=new nB(i?a:r.remaining,i?r.remaining:a,null,0,-1);return r.transform.setSelection(s).setMeta(cB,{redo:i,historyState:l})}(o,i,e);r&&n(t?r.scrollIntoView():r)}return!0}}const hB=dB(!1,!0),NB=dB(!0,!0);function pB(e,t){const{parent:i,parentOffset:n}=e,o=i.childAfter(n);if(!o.node||!t.isInSet(o.node.marks))return null;let r=o.index,s=e.start()+o.offset;for(;r>0&&t.isInSet(i.child(r-1).marks);)r-=1,s-=i.child(r).nodeSize;let a=o.index+1,l=s+o.node.nodeSize;for(;a<i.childCount&&t.isInSet(i.child(a).marks);)l+=i.child(a).nodeSize,a+=1;return{from:s,to:l}}function DB(e,t){return(i,n)=>{const{empty:o,ranges:r,$from:s}=i.selection;if(o&&!(i.selection instanceof hY&&i.selection.$cursor))return!1;if(!o&&!i.selection.content().content.firstChild)return!1;if(n){const s=i.tr;if(o)s.removeStoredMark(e),t&&s.addStoredMark(e.create(t));else{for(const i of r)s.removeMark(i.$from.pos,i.$to.pos,e),t&&s.addMark(i.$from.pos,i.$to.pos,e.create(t));s.scrollIntoView()}n(s)}return!0}}function yB(e){const{$from:t}=e.selection,{bullet_list:i,ordered_list:n,task_list:o}=e.schema.nodes;for(let e=t.depth;e>0;e-=1){const r=t.node(e);if(r.type===i||r.type===n||r.type===o)return{node:r,pos:t.before(e),depth:e}}return null}function IB(e){const{schema:t}=e;return e===t.nodes.task_list?t.nodes.task_item:t.nodes.list_item}function jB(e,t){return(i,n,o)=>{const r=yB(i);if(r){if(r.node.type===e)return sV(IB(r.node.type))(i,n,o);if(n){const o=IB(r.node.type),s=[];r.node.forEach((e=>{s.push(e.type===o&&o!==t?t.create(null,e.content,e.marks):e)}));const a=e.create(r.node.attrs,s),l=i.tr,{from:M,to:c}=i.selection;l.replaceWith(r.pos,r.pos+r.node.nodeSize,a),l.setSelection(hY.create(l.doc,M,c)),n(l)}return!0}return oV(e)(i,n,o)}}function zB(e){return(t,i,n)=>function(e,t){const{$from:i}=e.selection;for(let e=i.depth;e>0;e-=1)if(i.node(e).type===t)return!0;return!1}(t,e)?EW(t,i):function(e,t=null){return function(i,n){let{$from:o,$to:r}=i.selection,s=o.blockRange(r),a=s&&VU(s,e,t);return!!a&&(n&&n(i.tr.wrap(s,a).scrollIntoView()),!0)}}(e)(t,i,n)}function mB(e){return(t,i)=>{const{from:n,to:o}=t.selection,r=[];if(t.doc.nodesBetween(n,o,((t,i)=>{if(t.isTextblock&&t.type.spec.attrs&&"indent"in t.type.spec.attrs){const n=t.attrs.indent??0,o=Math.max(0,Math.min(8,n+e));o!==n&&r.push({pos:i,node:t,next:o})}return!0})),0===r.length)return!1;if(i){const e=t.tr;for(const{pos:t,node:i,next:n}of r)e.setNodeMarkup(t,void 0,{...i.attrs,indent:n});i(e)}return!0}}function TB(e){const{image:t,figure:i}=e.schema.nodes,n=e.selection;if(n instanceof pY){if(n.node.type===t)return{node:n.node,pos:n.from,isFigure:!1};if(n.node.type===i)return{node:n.node,pos:n.from,isFigure:!0}}const{$from:o}=n;for(let e=o.depth;e>0;e-=1)if(o.node(e).type===i)return{node:o.node(e),pos:o.before(e),isFigure:!0};return null}function xB(e){const t=e.selection;return t instanceof pY&&t.node.type===e.schema.nodes.embed?{node:t.node,pos:t.from}:null}function AB(e,t,i={}){const{schema:n}=e,{nodes:o,marks:r}=n;switch(t){case"bold":return WW(r.bold);case"italic":return WW(r.italic);case"underline":return WW(r.underline);case"strike":return WW(r.strike);case"subscript":return WW(r.subscript);case"superscript":return WW(r.superscript);case"code":return WW(r.code);case"paragraph":return RW(o.paragraph);case"heading":return RW(o.heading,{level:i.level??1});case"blockquote":return zB(o.blockquote);case"align":return u=i.align??null,(e,t)=>{const{from:i,to:n}=e.selection,o=[];if(e.doc.nodesBetween(i,n,((e,t)=>(e.isTextblock&&e.type.spec.attrs&&"align"in e.type.spec.attrs&&o.push({pos:t,node:e}),!0))),0===o.length)return!1;if(t){const i=e.tr;for(const{pos:e,node:t}of o)i.setNodeMarkup(e,void 0,{...t.attrs,align:u});t(i)}return!0};case"lineHeight":return g=i.lineHeight??null,(e,t)=>{const{from:i,to:n}=e.selection,o=[];if(e.doc.nodesBetween(i,n,((e,t)=>(e.isTextblock&&e.type.spec.attrs&&"lineHeight"in e.type.spec.attrs&&o.push({pos:t,node:e}),!0))),0===o.length)return!1;if(t){const i=e.tr;for(const{pos:e,node:t}of o)i.setNodeMarkup(e,void 0,{...t.attrs,lineHeight:g});t(i)}return!0};case"bulletList":return jB(o.bullet_list,o.list_item);case"orderedList":return jB(o.ordered_list,o.list_item);case"taskList":return jB(o.task_list,o.task_item);case"indent":return BW(aV(o.task_item),aV(o.list_item),mB(1));case"outdent":return BW(sV(o.task_item),sV(o.list_item),mB(-1),EW);case"setListStyle":return c=i.style??null,(e,t)=>{const i=yB(e);if(!i)return!1;let n=i;const{$from:o}=e.selection,r=e.schema.nodes.ordered_list;for(let e=1;e<=o.depth;e+=1){const t=o.node(e);if(t.type===r&&(c===eW||t.attrs.style===eW)){n={node:t,pos:o.before(e),depth:e};break}}return t&&t(e.tr.setNodeMarkup(n.pos,void 0,{...n.node.attrs,style:c})),!0};case"setListStart":return function(e){return(t,i)=>{const n=yB(t);return!(!n||n.node.type!==t.schema.nodes.ordered_list||(i&&i(t.tr.setNodeMarkup(n.pos,void 0,{...n.node.attrs,order:Math.max(1,Math.round(e))})),0))}}(i.start??1);case"toggleImageCaption":return function(e){return(t,i)=>{const n=TB(t);if(!n)return!1;if(i){const o=t.tr;if(n.isFigure){const{src:t,alt:i,title:r,width:s}=n.node.attrs,a=e.nodes.image.create({src:t,alt:i,title:r,width:s});o.replaceWith(n.pos,n.pos+n.node.nodeSize,e.nodes.paragraph.create(null,a)),o.setSelection(pY.create(o.doc,n.pos+1))}else{const{src:i,alt:r,title:s,width:a}=n.node.attrs,l=r?e.text(r):null,M=e.nodes.figure.create({src:i,alt:r,title:s,width:a,align:null},l),c=t.doc.resolve(n.pos),g=c.parent,u=1===g.childCount&&"paragraph"===g.type.name,d=u?c.before():n.pos,h=u?c.after():n.pos+n.node.nodeSize;o.replaceWith(d,h,M),o.setSelection(hY.create(o.doc,d+1+M.content.size))}i(o.scrollIntoView())}return!0}}(n);case"setImageAlign":return function(e,t){return(i,n)=>{const o=TB(i);if(!o)return!1;const r="left"===t||"center"===t||"right"===t?t:null;if(n){const t=i.tr;if(o.isFigure)t.setNodeMarkup(o.pos,void 0,{...o.node.attrs,align:r}),i.selection instanceof pY&&t.setSelection(pY.create(t.doc,o.pos));else{const{src:n,alt:s,title:a,width:l}=o.node.attrs,M=e.nodes.figure.create({src:n,alt:s,title:a,width:l,align:r}),c=i.doc.resolve(o.pos),g=c.parent,u=1===g.childCount&&"paragraph"===g.type.name,d=u?c.before():o.pos,h=u?c.after():o.pos+o.node.nodeSize;t.replaceWith(d,h,M),t.setSelection(pY.create(t.doc,d))}n(t.scrollIntoView())}return!0}}(n,i.align??null);case"setImageWidth":return M=i.width??null,(e,t)=>{const i=TB(e);if(!i)return!1;if(t){const n=e.tr.setNodeMarkup(i.pos,void 0,{...i.node.attrs,width:M&&M>0?Math.round(M):null});e.selection instanceof pY&&n.setSelection(pY.create(n.doc,i.pos)),t(n)}return!0};case"deleteImage":return(e,t)=>{const i=TB(e);return!!i&&(t&&t(e.tr.delete(i.pos,i.pos+i.node.nodeSize).scrollIntoView()),!0)};case"setEmbedAlign":return function(e){return(t,i)=>{const n=xB(t);if(!n)return!1;const o="left"===e||"center"===e||"right"===e?e:null;if(i){const e=t.tr.setNodeMarkup(n.pos,void 0,{...n.node.attrs,align:o});e.setSelection(pY.create(e.doc,n.pos)),i(e.scrollIntoView())}return!0}}(i.align??null);case"deleteEmbed":return(e,t)=>{const i=xB(e);return!!i&&(t&&t(e.tr.delete(i.pos,i.pos+i.node.nodeSize).scrollIntoView()),!0)};case"link":return function(e,t){return(i,n)=>{if(!t.href)return!1;const{empty:o,$from:r,from:s,to:a}=i.selection;let l={from:s,to:a};if(o){const t=pB(r,e);if(!t)return!1;l=t}if(n){const o=i.tr;o.removeMark(l.from,l.to,e),o.addMark(l.from,l.to,e.create({href:t.href,title:t.title??null,target:t.target??null})),n(o.scrollIntoView())}return!0}}(r.link,i);case"unlink":return l=r.link,(e,t)=>{const{empty:i,$from:n,from:o,to:r}=e.selection;let s={from:o,to:r};if(i){const e=pB(n,l);if(!e)return!1;s=e}else if(!e.doc.rangeHasMark(o,r,l))return!1;return t&&t(e.tr.removeMark(s.from,s.to,l)),!0};case"insertBookmark":return function(e,t){return(i,n)=>{const o=t.id?.trim();if(!o)return!1;if(n){const t=e.nodes.bookmark.create({id:o});n(i.tr.replaceSelectionWith(t,!1).scrollIntoView())}return!0}}(n,i);case"textColor":return DB(r.text_color,i.color?{color:i.color}:null);case"bgColor":return DB(r.bg_color,i.color?{color:i.color}:null);case"fontFamily":return DB(r.font_family,i.family?{family:i.family}:null);case"fontSize":return DB(r.font_size,i.size?{size:i.size}:null);case"horizontalRule":return a=o.horizontal_rule,(e,t)=>(t&&t(e.tr.replaceSelectionWith(a.create()).scrollIntoView()),!0);case"clearFormatting":return(e,t)=>{const{from:i,to:n,empty:o}=e.selection;if(t){const r=e.tr;o||r.removeMark(i,n,null),r.setStoredMarks([]),e.doc.nodesBetween(i,n,((e,t)=>(e.isTextblock&&e.type.spec.attrs&&"align"in e.type.spec.attrs&&(e.attrs.align||e.attrs.lineHeight)&&r.setNodeMarkup(t,void 0,{...e.attrs,align:null,lineHeight:null}),!0))),t(r)}return!0};case"undo":return hB;case"redo":return NB;case"codeBlock":return function(e,t){return(i,n,o)=>{const{$from:r}=i.selection;return r.parent.type===e.nodes.code_block?RW(e.nodes.paragraph)(i,n,o):RW(e.nodes.code_block,{language:t})(i,n,o)}}(n,i.language??null);case"setCodeBlockLanguage":return function(e,t){return(i,n)=>{const{$from:o}=i.selection;for(let r=o.depth;r>0;r-=1)if(o.node(r).type===e.nodes.code_block)return n&&n(i.tr.setNodeMarkup(o.before(r),void 0,{language:t})),!0;return!1}}(n,i.language??null);case"insertEmbed":return function(e,t){return(i,n)=>{if(!t.src)return!1;const o=e.nodes.embed.create({src:t.src,provider:t.provider??null,title:t.title??null});return n&&n(i.tr.replaceSelectionWith(o).scrollIntoView()),!0}}(n,i);case"insertImage":return function(e,t){return(i,n)=>{if(!t.src)return!1;const o=t.src,r=t.alt??null,s=t.title??null,a=null!=t.caption?String(t.caption).trim():"",l=a?e.nodes.figure.create({src:o,alt:r,title:s,width:null,align:null},e.text(a)):e.nodes.image.create({src:o,alt:r,title:s});return n&&n(i.tr.replaceSelectionWith(l).scrollIntoView()),!0}}(n,i);case"updateImage":return function(e,t){return(i,n)=>{const o=TB(i);if(!o||!t.src)return!1;const r=t.src,s=t.alt??null,a=t.title??null,l=null!=t.caption?String(t.caption).trim():"",M=o.node.attrs.width??null,c=o.isFigure?o.node.attrs.align??null:null;if(n){const t=i.tr;if(l){const n=e.nodes.figure.create({src:r,alt:s,title:a,width:M,align:c},e.text(l));if(o.isFigure)t.replaceWith(o.pos,o.pos+o.node.nodeSize,n),t.setSelection(pY.create(t.doc,o.pos));else{const e=i.doc.resolve(o.pos),r=e.parent,s=1===r.childCount&&"paragraph"===r.type.name,a=s?e.before():o.pos,l=s?e.after():o.pos+o.node.nodeSize;t.replaceWith(a,l,n),t.setSelection(pY.create(t.doc,a))}}else if(o.isFigure){const i=e.nodes.image.create({src:r,alt:s,title:a,width:M});t.replaceWith(o.pos,o.pos+o.node.nodeSize,e.nodes.paragraph.create(null,i)),t.setSelection(pY.create(t.doc,o.pos+1))}else t.setNodeMarkup(o.pos,void 0,{src:r,alt:s,title:a,width:M}),i.selection instanceof pY&&t.setSelection(pY.create(t.doc,o.pos));n(t.scrollIntoView())}return!0}}(n,i);case"insertTable":return function(e,t){const i=Math.max(1,t.rows??3),n=Math.max(1,t.cols??3),o=t.withHeaderRow??!0;return(t,r)=>{const{table:s,table_row:a,table_cell:l,table_header:M}=e.nodes,c=[];for(let e=0;e<i;e+=1){const t=0===e&&o?M:l,i=[];for(let e=0;e<n;e+=1)i.push(t.createAndFill());c.push(a.create(null,i))}return r&&r(t.tr.replaceSelectionWith(s.create(null,c)).scrollIntoView()),!0}}(n,i);case"addRowBefore":return WV;case"addRowAfter":return BV;case"addColumnBefore":return ZV;case"addColumnAfter":return _V;case"deleteRow":return FV;case"deleteColumn":return VV;case"mergeCells":return HV;case"splitCell":return JV;case"toggleHeaderRow":return KV;case"toggleLayoutTable":return(e,t)=>{const{$from:i}=e.selection;for(let n=i.depth;n>0;n-=1){const o=i.node(n);if(o.type===e.schema.nodes.table)return t&&t(e.tr.setNodeMarkup(i.before(n),void 0,{...o.attrs,layout:!o.attrs.layout})),!0}return!1};case"deleteTable":return eR;case"changeCase":return s=i.textCase??"upper",(e,t)=>{const{from:i,to:n,empty:o}=e.selection;if(o)return!1;const r=[];if(e.doc.nodesBetween(i,n,((e,t)=>{if(!e.isText||!e.text)return;const o=Math.max(i,t),a=Math.min(n,t+e.nodeSize);if(o>=a)return;const l=e.text.slice(o-t,a-t),M=function(e,t){switch(t){case"upper":return e.toUpperCase();case"lower":return e.toLowerCase();case"title":return e.toLowerCase().replace(/(^|\s)(\p{L})/gu,((e,t,i)=>t+i.toUpperCase()));case"sentence":return e.toLowerCase().replace(/(^|[.!?]\s+)(\p{L})/gu,((e,t,i)=>t+i.toUpperCase()))}}(l,s);M!==l&&r.push({from:o,to:a,text:M,marks:e.marks})})),0===r.length)return!1;if(t){const i=e.tr;for(const t of r.reverse())i.replaceWith(t.from,t.to,e.schema.text(t.text,t.marks));t(i.scrollIntoView())}return!0};case"insertMergeField":return function(e,t){return(i,n)=>{const o=e.nodes.merge_field;if(!o||!t.id)return!1;if(n){const e=o.create({id:t.id,label:t.label??null});n(i.tr.replaceSelectionWith(e).scrollIntoView())}return!0}}(n,i);case"insertMath":return function(e,t){return(i,n)=>{const o=e.nodes.math,r=(t.latex??"").trim();if(!o||!r)return!1;if(n){const e=o.create({latex:r,display:t.mathDisplay??"inline"});n(i.tr.replaceSelectionWith(e).scrollIntoView())}return!0}}(n,i);default:return null}var s,a,l,M,c,g,u}function OB(e){let t="";return e.forEach((e=>{e.isText?t+=function(e,t){const i=e=>t.some((t=>t.type.name===e));let n;if(i("code")){const t=e.includes("`")?"``":"`";n=`${t}${e}${t}`}else n=function(e){return e.replace(/([\\`*_[\]<>])/g,"\\$1")}(e);i("subscript")&&(n=`<sub>${n}</sub>`),i("superscript")&&(n=`<sup>${n}</sup>`),i("underline")&&(n=`<u>${n}</u>`),i("strike")&&(n=`~~${n}~~`),i("italic")&&(n=`*${n}*`),i("bold")&&(n=`**${n}**`);const o=t.find((e=>"link"===e.type.name));return o&&(n=`[${n}](${o.attrs.href})`),n}(e.text??"",e.marks):"hard_break"===e.type.name?t+=" \n":"image"===e.type.name?t+=``:"mention"===e.type.name&&(t+=`${e.attrs.trigger}${e.attrs.label}`)})),t}function fB(e){const t=[];return e.forEach((e=>t.push(SB(e)))),t.join("\n\n")}function bB(e,t,i){const n=i+" ".repeat(t.length),o=[];e.forEach((e=>{const t=e.type.name;"bullet_list"===t?o.push(LB(e,n,null)):"ordered_list"===t?o.push(LB(e,n,e.attrs.order??1)):"task_list"===t?o.push(wB(e,n)):o.push(SB(e).split("\n").map((e=>n+e)).join("\n"))}));return i+t+o.join("\n").slice(n.length)}function LB(e,t,i){const n=[];let o=i??1;return e.forEach((e=>{n.push(bB(e,null===i?"- ":`${o}. `,t)),o+=1})),n.join("\n")}function wB(e,t){const i=[];return e.forEach((e=>{const n=e.attrs.checked?"[x] ":"[ ] ";i.push(bB(e,`- ${n}`,t))})),i.join("\n")}function vB(e){const t=[];if(e.forEach((e=>{const i=[];e.forEach((e=>{const t=e.firstChild?OB(e.firstChild):"";i.push(t.replace(/\n/g," ").replace(/\|/g,"\\|").trim())})),t.push(i)})),0===t.length)return"";const i=Math.max(...t.map((e=>e.length))),n=e=>`| ${(e=>{const t=e.slice();for(;t.length<i;)t.push("");return t})(e).join(" | ")} |`;return[n(t[0]),n(new Array(i).fill("---")),...t.slice(1).map(n)].join("\n")}function SB(e){switch(e.type.name){case"paragraph":return OB(e);case"heading":return`${"#".repeat(e.attrs.level)} ${OB(e)}`;case"blockquote":return fB(e).split("\n").map((e=>e?`> ${e}`:">")).join("\n");case"code_block":return`\`\`\`${e.attrs.language??""}\n${e.textContent}\n\`\`\``;case"horizontal_rule":return"---";case"bullet_list":return LB(e,"",null);case"ordered_list":return LB(e,"",e.attrs.order??1);case"task_list":return wB(e,"");case"table":return vB(e);case"embed":return e.attrs.src;default:return e.isTextblock?OB(e):fB(e)}}function kB(e){const t=fB(e).replace(/\n{3,}/g,"\n\n").trim();return t?`${t}\n`:""}const EB=/^(\s*)([-*+])\s+(.*)$/,CB=/^(\s*)(\d+)[.)]\s+(.*)$/,QB=/^\[([ xX])\]\s+(.*)$/,UB=/^\s{0,3}(```+|~~~+)\s*(\S*)\s*$/,YB=/^\s{0,3}(#{1,6})\s+(.*)$/,ZB=/^\s{0,3}(?:-{3,}|\*{3,}|_{3,})\s*$/,_B=/^\s{0,3}>\s?/,PB=/^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s*$/;function VB(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function RB(e){let t=e;return t=t.replace(/!\[([^\]]*)\]\(([^()\s]+)(?:\s+[^)]*)?\)/g,((e,t,i)=>`<img src="${i}" alt="${t}">`)),t=t.replace(/\[([^\]]+)\]\(([^()\s]+)(?:\s+[^)]*)?\)/g,((e,t,i)=>`<a href="${i}">${t}</a>`)),t=t.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),t=t.replace(/__([^_]+)__/g,"<strong>$1</strong>"),t=t.replace(/(^|[^*\w])\*([^*\s](?:[^*]*[^*\s])?)\*/g,"$1<em>$2</em>"),t=t.replace(/(^|[^_\w])_([^_\s](?:[^_]*[^_\s])?)_(?![\w])/g,"$1<em>$2</em>"),t=t.replace(/~~([^~]+)~~/g,"<s>$1</s>"),t=t.replace(/ *\n/g,"<br>"),t}function WB(e){const t=function(e){return e.replace(/\\([\\`*_[\]()#+\-.!~|])/g,((e,t)=>`\0${t.charCodeAt(0)}\0`))}(e),i=/(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;let n=t,o="";for(;;){const e=i.exec(n);if(!e){o+=RB(VB(n));break}o+=RB(VB(n.slice(0,e.index))),o+=`<code>${VB(e[2])}</code>`,n=n.slice(e.index+e[0].length)}return function(e){return e.replace(/\u0000(\d+)\u0000/g,((e,t)=>String.fromCharCode(Number(t))))}(o)}function BB(e){return YB.test(e)||UB.test(e)||ZB.test(e)||_B.test(e)||EB.test(e)||CB.test(e)}function $B(e){const t=EB.exec(e[0])??CB.exec(e[0]),i=t[1].length,n=CB.test(e[0])&&!EB.test(e[0]),o=n?Number(t[2]):1,r=[];let s=null;for(let t=0;t<e.length;t+=1){const o=e[t],a=n?CB.exec(o):EB.exec(o),l=n?EB.exec(o):CB.exec(o);if(a&&a[1].length<=i){let e=a[3],t=null;if(!n){const i=QB.exec(e);i&&(t="x"===i[1].toLowerCase(),e=i[2])}r.push({lines:[e],checked:t})}else{if(l&&l[1].length<=i){s=e.slice(t);break}r.length>0&&r[r.length-1].lines.push(o.replace(new RegExp(`^\\s{0,${i+2}}`),""))}}const a=[];for(const e of r){const t=null!==e.checked,i=a[a.length-1];i&&i.task===t?i.items.push(e):a.push({task:t,items:[e]})}const l=a.map((e=>{const t=e.items.map((t=>{const i=GB(t.lines);return e.task?`<li data-task-item="true" data-checked="${!0===t.checked}">${i}</li>`:`<li>${i}</li>`})).join("");if(e.task)return`<ul data-task-list="true">${t}</ul>`;if(n){return`<ol${1!==o?` start="${o}"`:""}>${t}</ol>`}return`<ul>${t}</ul>`})).join("");return s?l+$B(s):l}function FB(e){const t=e=>e.trim().replace(/^\|/,"").replace(/\|$/,"").split(/(?<!\\)\|/).map((e=>e.trim().replace(/\\\|/g,"|"))),i=t(e[0]),n=e.slice(2).map(t),o=(e,t)=>`<tr>${i.map(((i,n)=>`<${t}><p>${WB(e[n]??"")}</p></${t}>`)).join("")}</tr>`;return`<table>${o(i,"th")}${n.map((e=>o(e,"td"))).join("")}</table>`}function GB(e){const t=[];let i=0;for(;i<e.length;){const n=e[i];if(!n.trim()){i+=1;continue}const o=UB.exec(n);if(o){const n=new RegExp(`^\\s{0,3}${o[1]}\\s*$`),r=[];for(i+=1;i<e.length&&!n.test(e[i]);)r.push(e[i]),i+=1;i+=1;const s=o[2]?` data-language="${VB(o[2])}"`:"";t.push(`<pre${s}><code>${VB(r.join("\n"))}</code></pre>`);continue}const r=YB.exec(n);if(r){const e=r[1].length,n=r[2].replace(/\s+#+\s*$/,"");t.push(`<h${e}>${WB(n)}</h${e}>`),i+=1;continue}if(ZB.test(n)){t.push("<hr>"),i+=1;continue}if(_B.test(n)){const n=[];for(;i<e.length&&(_B.test(e[i])||n.length>0&&""!==e[i].trim()&&!BB(e[i]));)n.push(e[i].replace(_B,"")),i+=1;t.push(`<blockquote>${GB(n)}</blockquote>`);continue}if(EB.test(n)||CB.test(n)){const n=[];for(;i<e.length;){const t=e[i];if(""===t.trim()){const t=e[i+1];if(void 0!==t&&(EB.test(t)||CB.test(t)||/^\s{2,}\S/.test(t))){i+=1;continue}break}if(!EB.test(t)&&!CB.test(t)&&!/^\s{2,}\S/.test(t))break;n.push(t),i+=1}t.push($B(n));continue}if(n.includes("|")&&i+1<e.length&&PB.test(e[i+1])&&e[i+1].includes("|")){const n=[e[i],e[i+1]];for(i+=2;i<e.length&&e[i].includes("|")&&""!==e[i].trim();)n.push(e[i]),i+=1;t.push(FB(n));continue}const s=[n];for(i+=1;i<e.length&&""!==e[i].trim()&&!BB(e[i]);)s.push(e[i]),i+=1;t.push(`<p>${WB(s.join("\n"))}</p>`)}return t.join("")}function HB(e){return GB(e.replace(/\r\n?/g,"\n").split("\n"))}function JB(e){if(/<\/?[a-z][^>]*>/i.test(e))return!1;return/^\s{0,3}(#{1,6}\s+\S|```|(?:[-*+]|\d+[.)])\s+\S|>\s?\S|\|.+\|)/m.test(e)||/\*\*[^*\n]+\*\*|~~[^~\n]+~~|\[[^\]\n]+\]\([^)\n]+\)|`[^`\n]+`/.test(e)}function XB(e){return/class="?Mso|style=["'][^"']*mso-|urn:schemas-microsoft-com|<o:p>|<w:WordDocument/i.test(e)||/id="?docs-internal-guid/i.test(e)}function qB(e){const t=e.getAttribute("style")??"",i=/mso-list:[^;"]*\blevel(\d+)/i.exec(t);return i?{level:Number(i[1])}:/\bMsoListParagraph/i.test(e.className)&&/mso-list/i.test(t)?{level:1}:null}function KB(e){let t=!1;const i=e.querySelectorAll("span");for(const e of Array.from(i))if(/mso-list:\s*ignore/i.test(e.getAttribute("style")??""))return t=/^\s*(\d+|[a-z]{1,4}|[ivxlc]+)[.)]/i.test(e.textContent??""),e.remove(),{ordered:t};const n=e.textContent??"";if(/^\s*(\d+|[a-z])[.)]\s+/i.exec(n)){t=!0;const i=e.firstChild;i?.nodeType===Node.TEXT_NODE&&(i.textContent=(i.textContent??"").replace(/^\s*\S+[.)]\s+/,""))}return{ordered:t}}function e$(e){let t=e.replace(/<!--\[if[\s\S]*?<!\[endif\]-->/gi,"").replace(/<!\[if[\s\S]*?<!\[endif\]>/gi,"").replace(/<!--[\s\S]*?-->/g,"");const i=(new DOMParser).parseFromString(t,"text/html").body;for(const e of Array.from(i.querySelectorAll("*")))e.tagName.includes(":")&&e.replaceWith(...Array.from(e.childNodes));for(const e of Array.from(i.querySelectorAll('b[id^="docs-internal-guid"]')))e.replaceWith(...Array.from(e.childNodes));!function(e){const t=e.ownerDocument,i=Array.from(e.querySelectorAll("p"));let n=[];const o=()=>{if(0===n.length)return;const e=n[0].paragraph,i=[],o=[];for(const e of n){for(;o.length>0&&o[o.length-1].level>e.level;)o.pop();if(0===o.length||o[o.length-1].level<e.level){const n=t.createElement(e.ordered?"ol":"ul");if(0===o.length)i.push(n);else{const e=o[o.length-1].list.children;(e[e.length-1]??null??o[o.length-1].list).appendChild(n)}o.push({level:e.level,list:n})}const n=t.createElement("li"),r=t.createElement("p");r.innerHTML=e.paragraph.innerHTML,n.appendChild(r),o[o.length-1].list.appendChild(n)}e.before(...i);for(const e of n)e.paragraph.remove();n=[]};for(const e of i){const t=qB(e);if(t){const{ordered:i}=KB(e);n.push({level:t.level,ordered:i,paragraph:e})}else o()}o()}(i),function(e){return/urn:schemas-microsoft-com:office:excel|ProgId["']?[^>]*Excel\.Sheet|<x:ExcelWorkbook/i.test(e)}(e)&&function(e){const t=e.ownerDocument;for(const i of Array.from(e.querySelectorAll("td, th"))){const e=i.getAttribute("bgcolor");e&&!/background/i.test(i.getAttribute("style")??"")&&(i.style.backgroundColor=e);const n=i.getAttribute("align")||i.style.textAlign;if(!i.querySelector("p, div, ul, ol, table, h1, h2, h3, h4, h5, h6")&&i.childNodes.length>0){const e=t.createElement("p");for(n&&(e.style.textAlign=n);i.firstChild;)e.appendChild(i.firstChild);i.appendChild(e)}}}(i);for(const e of Array.from(i.querySelectorAll("*"))){/\bMso/i.test(e.className)&&e.removeAttribute("class");const t=e.getAttribute("style");if(t&&/mso-/i.test(t)){const i=t.split(";").filter((e=>e.trim()&&!/^\s*mso-/i.test(e))).join(";");i.trim()?e.setAttribute("style",i):e.removeAttribute("style")}}for(const e of Array.from(i.querySelectorAll("p")))""!==(e.textContent??"").replace(/ /g,"").trim()||e.querySelector("img")||e.remove();return i.innerHTML}const t$=["color","font-family","font-size","font-weight","font-style","line-height","text-align","text-transform"],i$={"background-color":["rgba(0, 0, 0, 0)","transparent"],"text-decoration-line":["none"],"margin-top":["0px"],"margin-right":["0px"],"margin-bottom":["0px"],"margin-left":["0px"],"padding-top":["0px"],"padding-right":["0px"],"padding-bottom":["0px"],"padding-left":["0px"],"vertical-align":["baseline"]},n$=new Set(["TABLE","TD","TH","THEAD","TBODY","TR"]),o$=new Set(["href","src","alt","title","colspan","rowspan","width","height","align","target","rel"]);function r$(e,t,i){const n=getComputedStyle(e),o=i?getComputedStyle(i):null;for(const e of t$){const i=n.getPropertyValue(e);i&&(o&&o.getPropertyValue(e)===i||t.style.setProperty(e,i))}for(const[e,i]of Object.entries(i$)){const o=n.getPropertyValue(e);o&&!i.includes(o)&&t.style.setProperty(e,o)}if("UL"===e.tagName||"OL"===e.tagName){const e=n.getPropertyValue("list-style-type");e&&"none"!==e&&t.style.setProperty("list-style-type",e)}"IMG"!==e.tagName&&"IFRAME"!==e.tagName||t.style.setProperty("max-width","100%"),function(e,t,i){if(!n$.has(e.tagName))return;const n=getComputedStyle(e);"collapse"===n.getPropertyValue("border-collapse")&&i.style.setProperty("border-collapse","collapse");for(const e of["top","right","bottom","left"]){const t=n.getPropertyValue(`border-${e}-width`);if(t&&"0px"!==t){const o=n.getPropertyValue(`border-${e}-style`)||"solid",r=n.getPropertyValue(`border-${e}-color`);i.style.setProperty(`border-${e}`,`${t} ${o} ${r}`)}}}(e,0,t);for(const e of Array.from(t.attributes))"style"===e.name||o$.has(e.name)||t.removeAttribute(e.name)}function s$(e,t,i){if(e.nodeType===Node.TEXT_NODE)return t.createTextNode(e.textContent??"");if(e.nodeType!==Node.ELEMENT_NODE)return null;const n=e;if(n.classList.contains("ProseMirror-gapcursor"))return null;if(n.classList.contains("ProseMirror-separator"))return null;const o=t.createElement(n.tagName.toLowerCase());for(const e of Array.from(n.attributes))o.setAttribute(e.name,e.value);r$(n,o,i);for(const e of Array.from(n.childNodes)){const i=s$(e,t,n);i&&o.appendChild(i)}return o}function a$(e){const t=document.implementation.createHTMLDocument(""),i=t.createElement("div");for(const n of Array.from(e.childNodes)){const o=s$(n,t,e);o&&i.appendChild(o)}return i.innerHTML}function l$(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function M$(e,t="Document"){return`<!DOCTYPE html>\n<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head><meta charset="utf-8"><title>${l$(t)}</title>\x3c!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:Zoom>100</w:Zoom><w:DoNotOptimizeForBrowser/></w:WordDocument></xml><![endif]--\x3e<style>@page { size: A4; margin: 2cm; } body { font-family: Calibri, Arial, sans-serif; } table { border-collapse: collapse; } td, th { border: 1px solid #999; padding: 4px; }</style></head><body>`+e+"</body></html>"}function c$(e,t={}){const{title:i="Document",header:n="",footer:o="",fontFamily:r='system-ui, -apple-system, "Segoe UI", Roboto, sans-serif'}=t,s=(n?`<div class="nw-print-header">${l$(n)}</div>`:"")+(o?`<div class="nw-print-footer">${l$(o)}</div>`:"");return`<!DOCTYPE html>\n<html><head><meta charset="utf-8"><title>${l$(i)}</title><style>@page { size: A4; margin: 20mm; }body { font-family: ${r}; color: #101828; line-height: 1.5; margin: 0; }img, iframe { max-width: 100%; }table { border-collapse: collapse; width: 100%; }td, th { border: 1px solid #d0d5dd; padding: 6px 8px; }pre, blockquote, table, figure, img { break-inside: avoid; page-break-inside: avoid; }h1, h2, h3, h4 { break-after: avoid; page-break-after: avoid; }.nw-page-break { break-before: page; page-break-before: always; }`+(n?".nw-print-header { position: fixed; top: 0; left: 0; right: 0; font-size: 10px; color: #667085; padding: 6px 0; }":"")+(o?".nw-print-footer { position: fixed; bottom: 0; left: 0; right: 0; font-size: 10px; color: #667085; padding: 6px 0; text-align: center; }":"")+"</style></head><body>"+s+`<main>${e}</main></body></html>`}function g$(e,t,i,n=40){for(const o of["nw","ne","sw","se"]){const r=document.createElement("span");r.className=`nile-wysiwyg__resize-handle nile-wysiwyg__resize-handle--${o}`,r.dataset.resizeHandle=o,r.contentEditable="false",r.addEventListener("mousedown",(r=>{r.preventDefault(),r.stopPropagation();const s=r.clientX,a=t.getBoundingClientRect().width,l=o.includes("w")?-1:1,M=e.closest(".ProseMirror")?.getBoundingClientRect().width??2e3;let c=a;const g=e=>{c=Math.max(n,Math.min(M,a+l*(e.clientX-s))),t.style.width=`${Math.round(c)}px`},u=()=>{window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",u),e.classList.remove("nile-wysiwyg__resizing"),i(Math.round(c))};e.classList.add("nile-wysiwyg__resizing"),window.addEventListener("mousemove",g),window.addEventListener("mouseup",u)})),e.appendChild(r)}}function u$(e){return e.target instanceof HTMLElement&&!!e.target.dataset.resizeHandle}class d${constructor(e,t,i){this.node=e,this.dom=document.createElement("span"),this.dom.className="nile-wysiwyg__image-resizer",this.img=document.createElement("img"),this.applyAttrs(e),this.dom.appendChild(this.img),g$(this.dom,this.img,(e=>{const n=i();if(void 0===n||!t.editable)return;const o=t.state.doc.nodeAt(n);o&&t.dispatch(t.state.tr.setNodeMarkup(n,void 0,{...o.attrs,width:e}))}))}applyAttrs(e){const{src:t,alt:i,title:n,width:o}=e.attrs;this.img.src=t,i?this.img.alt=i:this.img.removeAttribute("alt"),n?this.img.title=n:this.img.removeAttribute("title"),this.img.style.width=o?`${o}px`:""}update(e){return e.type===this.node.type&&(this.node=e,this.applyAttrs(e),!0)}selectNode(){this.dom.classList.add("nile-wysiwyg__image-resizer--selected")}deselectNode(){this.dom.classList.remove("nile-wysiwyg__image-resizer--selected")}stopEvent(e){return u$(e)}ignoreMutation(){return!0}}class h${constructor(e,t,i){this.node=e,this.dom=document.createElement("figure"),this.dom.className="nile-wysiwyg__figure",this.wrapper=document.createElement("span"),this.wrapper.className="nile-wysiwyg__image-resizer",this.wrapper.contentEditable="false",this.img=document.createElement("img"),this.wrapper.appendChild(this.img),this.contentDOM=document.createElement("figcaption"),this.contentDOM.className="nile-wysiwyg__figcaption",this.dom.append(this.wrapper,this.contentDOM),this.applyAttrs(e),this.img.addEventListener("mousedown",(e=>{e.preventDefault();const n=i();void 0!==n&&(t.dispatch(t.state.tr.setSelection(pY.create(t.state.doc,n))),t.focus())})),g$(this.wrapper,this.img,(e=>{const n=i();if(void 0===n||!t.editable)return;const o=t.state.doc.nodeAt(n);o&&t.dispatch(t.state.tr.setNodeMarkup(n,void 0,{...o.attrs,width:e}))}))}applyAttrs(e){const{src:t,alt:i,title:n,width:o,align:r}=e.attrs;this.img.src=t,i?this.img.alt=i:this.img.removeAttribute("alt"),n?this.img.title=n:this.img.removeAttribute("title"),this.dom.style.width=o?`${o}px`:"",r?this.dom.setAttribute("data-align",r):this.dom.removeAttribute("data-align"),this.dom.classList.toggle("nile-wysiwyg__figure--empty-caption",0===e.content.size)}update(e){return e.type===this.node.type&&(this.node=e,this.applyAttrs(e),!0)}selectNode(){this.dom.classList.add("nile-wysiwyg__figure--selected"),this.wrapper.classList.add("nile-wysiwyg__image-resizer--selected")}deselectNode(){this.dom.classList.remove("nile-wysiwyg__figure--selected"),this.wrapper.classList.remove("nile-wysiwyg__image-resizer--selected")}stopEvent(e){return u$(e)}ignoreMutation(e){return!this.contentDOM.contains(e.target)}}class N${constructor(e,t,i){this.node=e,this.dom=document.createElement("div"),this.dom.className="nile-wysiwyg__embed",this.iframe=document.createElement("iframe"),this.iframe.setAttribute("frameborder","0"),this.iframe.setAttribute("allowfullscreen","true"),this.iframe.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"),this.iframe.setAttribute("sandbox",bR),this.iframe.setAttribute("referrerpolicy",LR),this.dom.appendChild(this.iframe),this.applyAttrs(e),g$(this.dom,this.dom,(e=>{const n=i();if(void 0===n||!t.editable)return;const o=t.state.doc.nodeAt(n);o&&t.dispatch(t.state.tr.setNodeMarkup(n,void 0,{...o.attrs,width:e}))}),160)}applyAttrs(e){const{src:t,provider:i,title:n,width:o,align:r}=e.attrs;this.iframe.getAttribute("src")!==t&&this.iframe.setAttribute("src",t),this.dom.setAttribute("data-embed-provider",i??"generic"),n?this.iframe.title=n:this.iframe.removeAttribute("title"),o?(this.dom.setAttribute("data-width",String(o)),this.dom.style.width=`${o}px`):(this.dom.removeAttribute("data-width"),this.dom.style.width=""),r?this.dom.setAttribute("data-align",r):this.dom.removeAttribute("data-align"),this.dom.style.marginLeft="center"===r||"right"===r?"auto":"",this.dom.style.marginRight="center"===r?"auto":""}update(e){return e.type===this.node.type&&(this.node=e,this.applyAttrs(e),!0)}stopEvent(e){return u$(e)}ignoreMutation(){return!0}}const p$=".ProseMirror";function D$(e,t){const i=e[t];for(t+=1;t<e.length;)if("\\"!==e[t]){if(e[t]===i)return t+1;t+=1}else t+=2;return t}function y$(e,t){return function(e,t){const i=[];let n=0,o="";for(let r=0;r<e.length;r+=1){const s=e[r];if('"'!==s&&"'"!==s)"("===s||"["===s?n+=1:")"!==s&&"]"!==s||(n-=1),s!==t||0!==n?o+=s:(i.push(o),o="");else{const t=D$(e,r);o+=e.slice(r,t),r=t-1}}return i.push(o),i}(e,",").map((e=>function(e,t){const i=e.trim();if(!i)return i;if(/^(?:html|body|:root)$/i.test(i))return t;const n=i.match(/^(?:html|body|:root)\b\s*/i);return n?`${t} ${i.slice(n[0].length)}`.trim():`${t} ${i}`}(e,t))).filter(Boolean).join(", ")}const I$=new Set(["media","supports","container","layer","scope"]);function j$(e,t){let i="",n=0;const o=e.length;for(;n<o;){let r=n;for(;r<o;){const t=e[r];if('"'!==t&&"'"!==t){if("{"===t||";"===t)break;r+=1}else r=D$(e,r)}if(r>=o){i+=e.slice(n);break}if(";"===e[r]){i+=e.slice(n,r+1),n=r+1;continue}const s=e.slice(n,r).trim();let a=1,l=r+1;for(;l<o&&a>0;){const t=e[l];'"'!==t&&"'"!==t?("{"===t?a+=1:"}"===t&&(a-=1),l+=1):l=D$(e,l)}const M=e.slice(r+1,l-1);if(s.startsWith("@")){const e=(s.match(/^@([a-z-]+)/i)?.[1]??"").toLowerCase();i+=I$.has(e)?`${s} {${j$(M,t)}}`:`${s} {${M}}`}else s&&(i+=`${y$(s,t)} {${M}}`);n=l}return i}function z$(e,t){if(!e.trim())return"";try{return j$(e,t)}catch{return e}}class m${constructor(e){this.node=e,this.dom=document.createElement("div"),this.dom.className="nile-wysiwyg__style-block",this.dom.contentEditable="false",this.styleEl=document.createElement("style"),this.styleEl.textContent=z$(e.attrs.css,p$),this.dom.append(this.styleEl)}update(e){return e.type===this.node.type&&(e.attrs.css!==this.node.attrs.css&&(this.styleEl.textContent=z$(e.attrs.css,p$)),this.node=e,!0)}ignoreMutation(){return!0}}let T$=null;class x${constructor(e,t){this.token=0,this.renderer=t,this.dom=document.createElement("span"),this.dom.contentEditable="false",this.render(e)}render(e){const t=e.attrs.latex??"",i=e.attrs.display??"inline";this.dom.className="block"===i?"nile-wysiwyg__math nile-wysiwyg__math--block":"nile-wysiwyg__math",this.dom.setAttribute("data-math",t),this.dom.setAttribute("data-math-display",i),this.dom.title=t;const n=++this.token;if(this.renderer)try{return void(this.dom.innerHTML=this.renderer(t,i))}catch{}this.dom.textContent=t,(T$||(T$=Promise.resolve().then((function(){return K1})).then((e=>e.default))),T$).then((e=>{if(n===this.token)try{this.dom.innerHTML=e.renderToString(t,{output:"mathml",displayMode:"block"===i,throwOnError:!1})}catch{this.dom.textContent=t}})).catch((()=>{}))}update(e){return"math"===e.type.name&&(this.render(e),!0)}ignoreMutation(){return!0}}function A$(e,t){const{from:i,$from:n,to:o,empty:r}=e.selection;return r?!!t.isInSet(e.storedMarks||n.marks()):e.doc.rangeHasMark(i,o,t)}function O$(e,t,i){const{$from:n,from:o,to:r,empty:s}=e.selection;if(s){const o=t.isInSet(e.storedMarks||n.marks());return o?o.attrs[i]??null:null}let a=null;return e.doc.nodesBetween(o,r,(e=>{if(null!==a||!e.isText)return null===a;const n=t.isInSet(e.marks);return n&&(a=n.attrs[i]??null),null===a})),a}function f$(e){const{schema:t}=e,{$from:i,from:n,to:o,empty:r}=e.selection;let s=i.parent;if(!s.isTextblock){let t=null;e.doc.nodesBetween(n,o,(e=>(!t&&e.isTextblock&&(t=e),!t))),t&&(s=t)}const a=s.type.name,l="heading"===a?s.attrs.level:null,M=s.type.spec.attrs&&"align"in s.type.spec.attrs?s.attrs.align??null:null;let c=!1,g=!1,u=!1,d=!1,h=!1,N=!1,p=null,D=null;for(let e=i.depth;e>0;e-=1){const n=i.node(e);n.type===t.nodes.bullet_list?(c=!0,null===p&&(p=n.attrs.style??null)):n.type===t.nodes.ordered_list?(g=!0,null===p&&(p=n.attrs.style??null),null===D&&(D=n.attrs.order??1)):n.type===t.nodes.task_list?u=!0:n.type===t.nodes.blockquote?d=!0:n.type===t.nodes.table&&(h=!0,N=!!n.attrs.layout)}const y=TB(e),I=xB(e),j=A$(e,t.marks.link);let z=null;if(j&&(z=O$(e,t.marks.link,"href"),null===z&&r)){const n=pB(i,t.marks.link);if(n){const i=t.marks.link.isInSet(e.doc.resolve(n.from+1).marks());z=i?i.attrs.href:null}}return{bold:A$(e,t.marks.bold),italic:A$(e,t.marks.italic),underline:A$(e,t.marks.underline),strike:A$(e,t.marks.strike),subscript:A$(e,t.marks.subscript),superscript:A$(e,t.marks.superscript),code:A$(e,t.marks.code),blockType:a,headingLevel:l,align:M,lineHeight:s.type.spec.attrs&&"lineHeight"in s.type.spec.attrs?s.attrs.lineHeight??null:null,inBulletList:c,inOrderedList:g,inTaskList:u,inBlockquote:d,inTable:h,tableLayout:N,blockIndent:s.type.spec.attrs&&"indent"in s.type.spec.attrs?s.attrs.indent??0:0,listStyle:p,listStart:D,imageSelected:null!==y,imageIsFigure:y?.isFigure??!1,imageAlign:y?.isFigure?y.node.attrs.align??null:null,embedSelected:null!==I,embedAlign:I?.node.attrs.align??null,inCodeBlock:"code_block"===a,codeBlockLanguage:"code_block"===a?s.attrs.language??null:null,canUndo:hB(e),canRedo:NB(e),linkActive:j,linkHref:z,textColor:O$(e,t.marks.text_color,"color"),bgColor:O$(e,t.marks.bg_color,"color"),fontFamily:O$(e,t.marks.font_family,"family"),fontSize:O$(e,t.marks.font_size,"size"),selectionEmpty:r}}class b${constructor(e,t){var i;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=null!==(i=t.width)&&void 0!==i?i:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((t=>{let i=e=>{this[t](e)};return e.dom.addEventListener(t,i),{name:t,handler:i}}))}destroy(){this.handlers.forEach((({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t)))}update(e,t){if(null!=this.cursorPos&&t.doc!=e.state.doc)if(this.lastDragEvent){let e=this.computeTarget(this.lastDragEvent);e==this.cursorPos?this.updateOverlay():this.setCursor(e)}else this.updateOverlay()}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos),i=!t.parent.inlineContent,n=this.editorView.dom,o=n.getBoundingClientRect(),r=o.width/n.offsetWidth,s=o.height/n.offsetHeight;if(i){let i=t.nodeBefore,n=t.nodeAfter;if(i||n){let t=this.editorView.nodeDOM(this.cursorPos-(i?i.nodeSize:0));if(t){let o=t.getBoundingClientRect(),r=i?o.bottom:o.top;i&&n&&(r=(r+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let a=this.width/2*s;e={left:o.left,right:o.right,top:r-a,bottom:r+a}}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos),i=this.width/2*r;e={left:t.left-i,right:t.left+i,top:t.top,bottom:t.bottom}}let a,l,M=this.editorView.dom.offsetParent;if(this.element||(this.element=M.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",i),this.element.classList.toggle("prosemirror-dropcursor-inline",!i),!M||M==document.body&&"static"==getComputedStyle(M).position)a=-pageXOffset,l=-pageYOffset;else{let e=M.getBoundingClientRect(),t=e.width/M.offsetWidth,i=e.height/M.offsetHeight;a=e.left-M.scrollLeft*t,l=e.top-M.scrollTop*i}this.element.style.left=(e.left-a)/r+"px",this.element.style.top=(e.top-l)/s+"px",this.element.style.width=(e.right-e.left)/r+"px",this.element.style.height=(e.bottom-e.top)/s+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),i=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),n=i&&i.type.spec.disableDropCursor,o="function"==typeof n?n(this.editorView,t,e):n;if(!t||o)return null;let r=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=GU(this.editorView.state.doc,r,this.editorView.dragging.slice);null!=e&&(r=e)}return r}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);null!=t&&(this.setCursor(t),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class L$ extends cY{constructor(e){super(e,e)}map(e,t){let i=e.resolve(t.map(this.head));return L$.valid(i)?new L$(i):cY.near(i)}content(){return zQ.empty}eq(e){return e instanceof L$&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new L$(e.resolve(t.pos))}getBookmark(){return new w$(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!function(e){for(let t=e.depth;t>=0;t--){let i=e.index(t),n=e.node(t);if(0!=i)for(let e=n.child(i-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||v$(e.type))return!0;if(e.inlineContent)return!1}else if(n.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let i=e.indexAfter(t),n=e.node(t);if(i!=n.childCount)for(let e=n.child(i);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||v$(e.type))return!0;if(e.inlineContent)return!1}else if(n.type.spec.isolating)return!0}return!0}(e))return!1;let i=t.type.spec.allowGapCursor;if(null!=i)return i;let n=t.contentMatchAt(e.index()).defaultType;return n&&n.isTextblock}static findGapCursorFrom(e,t,i=!1){e:for(;;){if(!i&&L$.valid(e))return e;let n=e.pos,o=null;for(let i=e.depth;;i--){let r=e.node(i);if(t>0?e.indexAfter(i)<r.childCount:e.index(i)>0){o=r.child(t>0?e.indexAfter(i):e.index(i)-1);break}if(0==i)return null;n+=t;let s=e.doc.resolve(n);if(L$.valid(s))return s}for(;;){let r=t>0?o.firstChild:o.lastChild;if(!r){if(o.isAtom&&!o.isText&&!pY.isSelectable(o)){e=e.doc.resolve(n+o.nodeSize*t),i=!1;continue e}break}o=r,n+=t;let s=e.doc.resolve(n);if(L$.valid(s))return s}return null}}}L$.prototype.visible=!1,L$.findFrom=L$.findGapCursorFrom,cY.jsonID("gapcursor",L$);class w${constructor(e){this.pos=e}map(e){return new w$(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return L$.valid(t)?new L$(t):cY.near(t)}}function v$(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}const S$=dV({ArrowLeft:k$("horiz",-1),ArrowRight:k$("horiz",1),ArrowUp:k$("vert",-1),ArrowDown:k$("vert",1)});function k$(e,t){const i="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,n,o){let r=e.selection,s=t>0?r.$to:r.$from,a=r.empty;if(r instanceof hY){if(!o.endOfTextblock(i)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=L$.findGapCursorFrom(s,t,a);return!!l&&(n&&n(e.tr.setSelection(new L$(l))),!0)}}function E$(e,t,i){if(!e||!e.editable)return!1;let n=e.state.doc.resolve(t);if(!L$.valid(n))return!1;let o=e.posAtCoords({left:i.clientX,top:i.clientY});return!(o&&o.inside>-1&&pY.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new L$(n))),!0)}function C$(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof L$))return!1;let{$from:i}=e.state.selection,n=i.parent.contentMatchAt(i.index()).findWrapping(e.state.schema.nodes.text);if(!n)return!1;let o=NQ.empty;for(let e=n.length-1;e>=0;e--)o=NQ.from(n[e].createAndFill(null,o));let r=e.state.tr.replace(i.pos,i.pos,new zQ(o,0,0));return r.setSelection(hY.near(r.doc.resolve(i.pos+1))),e.dispatch(r),!1}function Q$(e){if(!(e.selection instanceof L$))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",jP.create(e.doc,[DP.widget(e.selection.head,t,{key:"gapcursor"})])}class U${constructor(e,t,i={}){this.match=e,this.match=e,this.handler="string"==typeof t?function(e){return function(t,i,n,o){let r=e;if(i[1]){let e=i[0].lastIndexOf(i[1]);r+=i[0].slice(e+i[1].length);let t=(n+=e)-o;t>0&&(r=i[0].slice(e-t,e)+r,n=o)}return t.tr.insertText(r,n,o)}}(t):t,this.undoable=!1!==i.undoable,this.inCode=i.inCode||!1,this.inCodeMark=!1!==i.inCodeMark}}function Y$(e,t,i,n,o,r){if(e.composing)return!1;let s=e.state,a=s.doc.resolve(t),l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,null,"")+n;for(let M=0;M<o.length;M++){let c=o[M];if(!c.inCodeMark&&a.marks().some((e=>e.type.spec.code)))continue;if(a.parent.type.spec.code){if(!c.inCode)continue}else if("only"===c.inCode)continue;let g=c.match.exec(l);if(!g||g[0].length<n.length)continue;let u=t-(g[0].length-n.length);if(!c.inCodeMark){let e=!1;if(s.doc.nodesBetween(u,a.pos,(t=>{t.isInline&&t.marks.some((e=>e.type.spec.code))&&(e=!0)})),e)continue}let d=c.handler(s,g,u,i);if(d)return c.undoable&&d.setMeta(r,{transform:d,from:t,to:i,text:n}),e.dispatch(d),!0}return!1}const Z$=(e,t)=>{let i=e.plugins;for(let n=0;n<i.length;n++){let o,r=i[n];if(r.spec.isInputRules&&(o=r.getState(e))){if(t){let i=e.tr,n=o.transform;for(let e=n.steps.length-1;e>=0;e--)i.step(n.steps[e].invert(n.docs[e]));if(o.text){let t=i.doc.resolve(o.from).marks();i.replaceWith(o.from,o.to,e.schema.text(o.text,t))}else i.delete(o.from,o.to);t(i)}return!0}}return!1};function _$(e,t,i=null,n){return new U$(e,((e,o,r,s)=>{let a=i instanceof Function?i(o):i,l=e.tr.delete(r,s),M=l.doc.resolve(r).blockRange(),c=M&&VU(M,t,a);if(!c)return null;l.wrap(M,c);let g=l.doc.resolve(r-1).nodeBefore;return g&&g.type==t&&FU(l.doc,r-1)&&(!n||n(o,g))&&l.join(r-1),l}))}function P$(e,t,i=null){return new U$(e,((e,n,o,r)=>{let s=e.doc.resolve(o),a=i instanceof Function?i(n):i;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?e.tr.delete(o,r).setBlockType(o,o,t,a):null}))}function V$(e,t){const i=t.split(/\r\n?|\n/).map((t=>e.nodes.paragraph.create(null,t?e.text(t):null)));return new zQ(NQ.from(i),1,1)}function R$(e,t={}){return new LY({props:{handlePaste(i,n){if(t.getForcePlainText?.())return!1;if(t.getMarkdownPaste&&!t.getMarkdownPaste())return!1;const o=n.clipboardData?.getData("text/html")??"",r=n.clipboardData?.getData("text/plain")??"";if(o.trim()||!r.trim())return!1;if(i.state.selection.$from.parent.type.spec.code)return!1;if(!JB(r))return!1;const s=TW(e,HB(r),t.getSanitize?.()??!0);return i.dispatch(i.state.tr.replaceSelection(s).scrollIntoView()),!0},transformPasted:i=>t.getForcePlainText?.()?function(e,t){return V$(e,t.content.textBetween(0,t.content.size,"\n","\n"))}(e,i):i}})}new U$(/--$/,"—",{inCodeMark:!1}),new U$(/\.\.\.$/,"…",{inCodeMark:!1}),new U$(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1}),new U$(/"$/,"”",{inCodeMark:!1}),new U$(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1}),new U$(/'$/,"’",{inCodeMark:!1});const W$="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function B$(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $$(e,t){return new U$(e,((e,i,n,o)=>{if(function(e){const{$from:t}=e.selection;if(t.parent.type.spec.code)return!0;const i=e.schema.marks.code;return!(!i||!i.isInSet(e.storedMarks||t.marks()))}(e))return null;let r=t,s=n;if(i.length>1&&void 0!==i[1]){const e=i[0].lastIndexOf(i[1]);r+=i[0].slice(e+i[1].length),s+=e;const t=s-o;t>0&&(r=i[0].slice(e-t,e)+r,s=o)}return e.tr.insertText(r,s,o)}))}function F$(e,t){const i=B$(e),n=B$(e[0]),o=new RegExp(`(?:^|\\s)${i}([^${n}\\s](?:[^${n}]*[^${n}\\s])?)${i}$`);return new U$(o,((i,n,o,r)=>{const s=n[1],a=o+n[0].indexOf(e),l=i.tr;return l.delete(a,r),l.insertText(s,a),l.addMark(a,a+s.length,t.create()),l.removeStoredMark(t),l}))}function G$(e){const t=e.marks.link;return new U$(/(?:^|\s)((?:https?:\/\/|www\.)[^\s]*[^\s.,:;!?'")\]}])\s$/i,((i,n,o,r)=>{const s=n[1],a=o+n[0].indexOf(s),l=a+s.length;if(i.doc.rangeHasMark(a,l,t))return null;if(i.doc.rangeHasMark(a,l,e.marks.code))return null;const M=/^www\./i.test(s)?`https://${s}`:s,c=i.tr;return c.addMark(a,l,t.create({href:M})),c.removeStoredMark(t),c.insertText(" ",r),c}))}function H$(e,t={}){return function({rules:e}){let t=new LY({state:{init:()=>null,apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(i,n,o,r)=>Y$(i,n,o,r,e,t),handleDOMEvents:{compositionend:i=>{setTimeout((()=>{let{$cursor:n}=i.state.selection;n&&Y$(i,n.pos,n.pos,"",e,t)}))}}},isInputRules:!0});return t}({rules:[...!1===t.textTransform?[]:[$$(/\(c\)$/i,"©"),$$(/\(r\)$/i,"®"),$$(/\(tm\)$/i,"™"),$$(/(?:^|\s)(1\/2)\s$/,"½"),$$(/(?:^|\s)(1\/4)\s$/,"¼"),$$(/(?:^|\s)(3\/4)\s$/,"¾"),$$(/\s(---)\s$/,"—"),$$(/\s(--)\s$/,"–"),$$(/\.\.\.$/,"…"),$$(/(?:^|[\s{[(<'"‘“])(")$/,"“"),$$(/"$/,"”"),$$(/(?:^|[\s{[(<'"‘“])(')$/,"‘"),$$(/'$/,"’")],P$(new RegExp("^(#{1,6})\\s$"),e.nodes.heading,(e=>({level:e[1].length}))),_$(/^\s*>\s$/,e.nodes.blockquote),_$(/^\s*([-*])\s$/,e.nodes.bullet_list),_$(/^(\d+)\.\s$/,e.nodes.ordered_list,(e=>({order:+e[1]})),((e,t)=>t.childCount+t.attrs.order===+e[1])),P$(/^```$/,e.nodes.code_block),_$(/^\s*\[[ ]?\]\s$/,e.nodes.task_list),F$("**",e.marks.bold),F$("*",e.marks.italic),F$("~~",e.marks.strike),F$("~",e.marks.subscript),F$("^",e.marks.superscript),F$("`",e.marks.code),G$(e)]})}const J$=/^https?:\/\/\S+$/i;function X$(e){if(e.childCount<=1)return e;const t=e.type.schema,i=[];return e.descendants((e=>!e.isInline||(e.type===t.nodes.hard_break||i.push(e),!1))),t.nodes.doc.create(null,t.nodes.paragraph.create(null,i))}class q$ extends DR{constructor(e,t){super(e,t),this.applyHtmlAttrs(e)}applyHtmlAttrs(e){const t=e.attrs.htmlClass,i=e.attrs.htmlId;this.table.className=t??"",i?this.table.id=i:this.table.removeAttribute("id")}update(e){const t=super.update(e);return t&&this.applyHtmlAttrs(e),t}}const K$=new SY("nileImageUpload");function eF(e){return e?Array.from(e.files).filter((e=>e.type.startsWith("image/"))):[]}const tF={active:!1,trigger:"",query:"",from:0,to:0};function iF(e,t){return new LY({key:e,state:{init:()=>tF,apply(e,i,n,o){const r=function(e,t){const{$from:i,empty:n}=e.selection;if(!n||!i.parent.isTextblock||i.parent.type.spec.code)return tF;const o=i.parent.textBetween(0,i.parentOffset,"\0","\0"),r=[...t.getTriggers()].sort(((e,t)=>t.length-e.length));for(const e of r){if(!e)continue;const n=o.lastIndexOf(e);if(-1===n)continue;if(t.startOfLine&&0!==n)continue;const r=o[n-1];if(void 0!==r&&!/\s/.test(r))continue;const s=o.slice(n+e.length);if(!(s.length>50||/\s/.test(s)||s.length<(t.minQueryLength??0)))return{active:!0,trigger:e,query:s,from:i.start()+n,to:i.pos}}return tF}(o,t);return r.active===i.active&&r.query===i.query&&r.trigger===i.trigger&&r.from===i.from||t.onChange(r),r}},props:{decorations(t){const i=e.getState(t);return i.active?jP.create(t.doc,[DP.inline(i.from,i.to,{class:"nile-wysiwyg__suggestion"})]):null},handleKeyDown(i,n){const o=e.getState(i.state);return!(!o.active||!t.onKeyDown)&&t.onKeyDown(n,o)}}})}const nF=new SY("nileFindReplace"),oF={query:"",caseSensitive:!1,matches:[],activeIndex:0};function rF(e,t,i){if(!t)return[];const n=[],o=i?t:t.toLowerCase();return e.descendants(((e,t)=>{if(!e.isTextblock)return!0;const r=e.textBetween(0,e.content.size,"\0","\0"),s=i?r:r.toLowerCase();let a=0;for(;-1!==(a=s.indexOf(o,a));)n.push({from:t+1+a,to:t+1+a+o.length}),a+=o.length;return!1})),n}function sF(){return new LY({key:nF,state:{init:()=>oF,apply(e,t){const i=e.getMeta(nF);if(i)return function(e,t,i){switch(t.type){case"search":{const n=t.caseSensitive??e.caseSensitive;return{query:t.query,caseSensitive:n,matches:rF(i,t.query,n),activeIndex:0}}case"next":return e.matches.length?{...e,activeIndex:(e.activeIndex+1)%e.matches.length}:e;case"prev":return e.matches.length?{...e,activeIndex:(e.activeIndex-1+e.matches.length)%e.matches.length}:e;default:return oF}}(t,i,e.doc);if(e.docChanged&&t.query){const i=rF(e.doc,t.query,t.caseSensitive);return{...t,matches:i,activeIndex:Math.min(t.activeIndex,Math.max(0,i.length-1))}}return t}},props:{decorations(e){const t=nF.getState(e);return t&&t.matches.length?jP.create(e.doc,t.matches.map(((e,i)=>DP.inline(e.from,e.to,{class:i===t.activeIndex?"nile-wysiwyg__find-match nile-wysiwyg__find-active":"nile-wysiwyg__find-match"})))):null}}})}function aF(e){return nF.getState(e)??oF}function lF(e,t){return e.tr.setMeta(nF,{type:t})}function MF(e){return AW(e).replace(/\n/g,"").length}function cF(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gF(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((t=>{const i=e[t],n=typeof i;"object"!==n&&"function"!==n||Object.isFrozen(i)||gF(i)})),e}class uF{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function dF(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function hF(e,...t){const i=Object.create(null);for(const t in e)i[t]=e[t];return t.forEach((function(e){for(const t in e)i[t]=e[t]})),i}const NF=e=>!!e.scope;class pF{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=dF(e)}openNode(e){if(!NF(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const i=e.split(".");return[`${t}${i.shift()}`,...i.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){NF(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const DF=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class yF{constructor(){this.rootNode=DF(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=DF({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{yF._collapse(e)})))}}class IF extends yF{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const i=e.root;t&&(i.scope=`language:${t}`),this.add(i)}toHTML(){return new pF(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function jF(e){return e?"string"==typeof e?e:e.source:null}function zF(e){return xF("(?=",e,")")}function mF(e){return xF("(?:",e,")*")}function TF(e){return xF("(?:",e,")?")}function xF(...e){const t=e.map((e=>jF(e))).join("");return t}function AF(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),i="("+(t.capture?"":"?:")+e.map((e=>jF(e))).join("|")+")";return i}function OF(e){return new RegExp(e.toString()+"|").exec("").length-1}const fF=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function bF(e,{joinWith:t}){let i=0;return e.map((e=>{i+=1;const t=i;let n=jF(e),o="";for(;n.length>0;){const e=fF.exec(n);if(!e){o+=n;break}o+=n.substring(0,e.index),n=n.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+String(Number(e[1])+t):(o+=e[0],"("===e[0]&&i++)}return o})).map((e=>`(${e})`)).join(t)}const LF="[a-zA-Z]\\w*",wF="[a-zA-Z_]\\w*",vF="\\b\\d+(\\.\\d+)?",SF="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",kF="\\b(0b[01]+)",EF={begin:"\\\\[\\s\\S]",relevance:0},CF={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[EF]},QF={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[EF]},UF=function(e,t,i={}){const n=hF({scope:"comment",begin:e,end:t,contains:[]},i);n.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=AF("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return n.contains.push({begin:xF(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},YF=UF("//","$"),ZF=UF("/\\*","\\*/"),_F=UF("#","$"),PF={scope:"number",begin:vF,relevance:0},VF={scope:"number",begin:SF,relevance:0},RF={scope:"number",begin:kF,relevance:0},WF={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[EF,{begin:/\[/,end:/\]/,relevance:0,contains:[EF]}]},BF={scope:"title",begin:LF,relevance:0},$F={scope:"title",begin:wF,relevance:0},FF={begin:"\\.\\s*"+wF,relevance:0};var GF=Object.freeze({__proto__:null,APOS_STRING_MODE:CF,BACKSLASH_ESCAPE:EF,BINARY_NUMBER_MODE:RF,BINARY_NUMBER_RE:kF,COMMENT:UF,C_BLOCK_COMMENT_MODE:ZF,C_LINE_COMMENT_MODE:YF,C_NUMBER_MODE:VF,C_NUMBER_RE:SF,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:_F,IDENT_RE:LF,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:FF,NUMBER_MODE:PF,NUMBER_RE:vF,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:QF,REGEXP_MODE:WF,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=xF(t,/.*\b/,e.binary,/\b.*/)),hF({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:BF,UNDERSCORE_IDENT_RE:wF,UNDERSCORE_TITLE_MODE:$F});function HF(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function JF(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function XF(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=HF,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function qF(e,t){Array.isArray(e.illegal)&&(e.illegal=AF(...e.illegal))}function KF(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function eG(e,t){void 0===e.relevance&&(e.relevance=1)}const tG=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const i=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=i.keywords,e.begin=xF(i.beforeMatch,zF(i.begin)),e.starts={relevance:0,contains:[Object.assign(i,{endsParent:!0})]},e.relevance=0,delete i.beforeMatch},iG=["of","and","for","in","not","or","if","then","parent","list","value"];function nG(e,t,i="keyword"){const n=Object.create(null);return"string"==typeof e?o(i,e.split(" ")):Array.isArray(e)?o(i,e):Object.keys(e).forEach((function(i){Object.assign(n,nG(e[i],t,i))})),n;function o(e,i){t&&(i=i.map((e=>e.toLowerCase()))),i.forEach((function(t){const i=t.split("|");n[i[0]]=[e,oG(i[0],i[1])]}))}}function oG(e,t){return t?Number(t):function(e){return iG.includes(e.toLowerCase())}(e)?0:1}const rG={},sG=e=>{console.error(e)},aG=(e,...t)=>{console.log(`WARN: ${e}`,...t)},lG=(e,t)=>{rG[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),rG[`${e}/${t}`]=!0)},MG=new Error;function cG(e,t,{key:i}){let n=0;const o=e[i],r={},s={};for(let e=1;e<=t.length;e++)s[e+n]=o[e],r[e+n]=!0,n+=OF(t[e-1]);e[i]=s,e[i]._emit=r,e[i]._multi=!0}function gG(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw sG("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),MG;if("object"!=typeof e.beginScope||null===e.beginScope)throw sG("beginScope must be object"),MG;cG(e,e.begin,{key:"beginScope"}),e.begin=bF(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw sG("skip, excludeEnd, returnEnd not compatible with endScope: {}"),MG;if("object"!=typeof e.endScope||null===e.endScope)throw sG("endScope must be object"),MG;cG(e,e.end,{key:"endScope"}),e.end=bF(e.end,{joinWith:""})}}(e)}function uG(e){function t(t,i){return new RegExp(jF(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(i?"g":""))}class i{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=OF(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(bF(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const i=t.findIndex(((e,t)=>t>0&&void 0!==e)),n=this.matchIndexes[i];return t.splice(0,i),Object.assign(t,n)}}class n{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new i;return this.rules.slice(e).forEach((([e,i])=>t.addRule(e,i))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let i=t.exec(e);if(this.resumingScanAtSamePosition())if(i&&i.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,i=t.exec(e)}return i&&(this.regexIndex+=i.position+1,this.regexIndex===this.count&&this.considerAll()),i}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=hF(e.classNameAliases||{}),function i(o,r){const s=o;if(o.isCompiled)return s;[JF,KF,gG,tG].forEach((e=>e(o,r))),e.compilerExtensions.forEach((e=>e(o,r))),o.__beforeBegin=null,[XF,qF,eG].forEach((e=>e(o,r))),o.isCompiled=!0;let a=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),a=o.keywords.$pattern,delete o.keywords.$pattern),a=a||/\w+/,o.keywords&&(o.keywords=nG(o.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),r&&(o.begin||(o.begin=/\B|\b/),s.beginRe=t(s.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(s.endRe=t(s.end)),s.terminatorEnd=jF(s.end)||"",o.endsWithParent&&r.terminatorEnd&&(s.terminatorEnd+=(o.end?"|":"")+r.terminatorEnd)),o.illegal&&(s.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return hF(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(dG(e))return hF(e,{starts:e.starts?hF(e.starts):null});if(Object.isFrozen(e))return hF(e);return e}("self"===e?o:e)}))),o.contains.forEach((function(e){i(e,s)})),o.starts&&i(o.starts,r),s.matcher=function(e){const t=new n;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function dG(e){return!!e&&(e.endsWithParent||dG(e.starts))}class hG extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const NG=dF,pG=hF,DG=Symbol("nomatch"),yG=function(e){const t=Object.create(null),i=Object.create(null),n=[];let o=!0;const r="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:IF};function l(e){return a.noHighlightRe.test(e)}function M(e,t,i){let n="",o="";"object"==typeof t?(n=e,i=t.ignoreIllegals,o=t.language):(lG("10.7.0","highlight(lang, code, ...args) has been deprecated."),lG("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,n=t),void 0===i&&(i=!0);const r={code:n,language:o};y("before:highlight",r);const s=r.result?r.result:c(r.language,r.code,i);return s.code=r.code,y("after:highlight",s),s}function c(e,i,n,s){const l=Object.create(null);function M(){if(!A.keywords)return void f.addText(b);let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(b),i="";for(;t;){i+=b.substring(e,t.index);const o=m.case_insensitive?t[0].toLowerCase():t[0],r=(n=o,A.keywords[n]);if(r){const[e,n]=r;if(f.addText(i),i="",l[o]=(l[o]||0)+1,l[o]<=7&&(L+=n),e.startsWith("_"))i+=t[0];else{const i=m.classNameAliases[e]||e;d(t[0],i)}}else i+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(b)}var n;i+=b.substring(e),f.addText(i)}function u(){null!=A.subLanguage?function(){if(""===b)return;let e=null;if("string"==typeof A.subLanguage){if(!t[A.subLanguage])return void f.addText(b);e=c(A.subLanguage,b,!0,O[A.subLanguage]),O[A.subLanguage]=e._top}else e=g(b,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(L+=e.relevance),f.__addSublanguage(e._emitter,e.language)}():M(),b=""}function d(e,t){""!==e&&(f.startScope(t),f.addText(e),f.endScope())}function h(e,t){let i=1;const n=t.length-1;for(;i<=n;){if(!e._emit[i]){i++;continue}const n=m.classNameAliases[e[i]]||e[i],o=t[i];n?d(o,n):(b=o,M(),b=""),i++}}function p(e,t){return e.scope&&"string"==typeof e.scope&&f.openNode(m.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(d(b,m.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),b=""):e.beginScope._multi&&(h(e.beginScope,t),b="")),A=Object.create(e,{parent:{value:A}}),A}function D(e,t,i){let n=function(e,t){const i=e&&e.exec(t);return i&&0===i.index}(e.endRe,i);if(n){if(e["on:end"]){const i=new uF(e);e["on:end"](t,i),i.isMatchIgnored&&(n=!1)}if(n){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return D(e.parent,t,i)}function y(e){return 0===A.matcher.regexIndex?(b+=e[0],1):(S=!0,0)}function I(e){const t=e[0],n=i.substring(e.index),o=D(A,e,n);if(!o)return DG;const r=A;A.endScope&&A.endScope._wrap?(u(),d(t,A.endScope._wrap)):A.endScope&&A.endScope._multi?(u(),h(A.endScope,e)):r.skip?b+=t:(r.returnEnd||r.excludeEnd||(b+=t),u(),r.excludeEnd&&(b=t));do{A.scope&&f.closeNode(),A.skip||A.subLanguage||(L+=A.relevance),A=A.parent}while(A!==o.parent);return o.starts&&p(o.starts,e),r.returnEnd?0:t.length}let j={};function z(t,r){const s=r&&r[0];if(b+=t,null==s)return u(),0;if("begin"===j.type&&"end"===r.type&&j.index===r.index&&""===s){if(b+=i.slice(r.index,r.index+1),!o){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=j.rule,t}return 1}if(j=r,"begin"===r.type)return function(e){const t=e[0],i=e.rule,n=new uF(i),o=[i.__beforeBegin,i["on:begin"]];for(const i of o)if(i&&(i(e,n),n.isMatchIgnored))return y(t);return i.skip?b+=t:(i.excludeBegin&&(b+=t),u(),i.returnBegin||i.excludeBegin||(b=t)),p(i,e),i.returnBegin?0:t.length}(r);if("illegal"===r.type&&!n){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(A.scope||"<unnamed>")+'"');throw e.mode=A,e}if("end"===r.type){const e=I(r);if(e!==DG)return e}if("illegal"===r.type&&""===s)return r.index===i.length||(b+="\n"),1;if(v>1e5&&v>3*r.index){throw new Error("potential infinite loop, way more iterations than matches")}return b+=s,s.length}const m=N(e);if(!m)throw sG(r.replace("{}",e)),new Error('Unknown language: "'+e+'"');const T=uG(m);let x="",A=s||T;const O={},f=new a.__emitter(a);!function(){const e=[];for(let t=A;t!==m;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>f.openNode(e)))}();let b="",L=0,w=0,v=0,S=!1;try{if(m.__emitTokens)m.__emitTokens(i,f);else{for(A.matcher.considerAll();;){v++,S?S=!1:A.matcher.considerAll(),A.matcher.lastIndex=w;const e=A.matcher.exec(i);if(!e)break;const t=z(i.substring(w,e.index),e);w=e.index+t}z(i.substring(w))}return f.finalize(),x=f.toHTML(),{language:e,value:x,relevance:L,illegal:!1,_emitter:f,_top:A}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:NG(i),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:w,context:i.slice(w-100,w+100),mode:t.mode,resultSoFar:x},_emitter:f};if(o)return{language:e,value:NG(i),illegal:!1,relevance:0,errorRaised:t,_emitter:f,_top:A};throw t}}function g(e,i){i=i||a.languages||Object.keys(t);const n=function(e){const t={value:NG(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),o=i.filter(N).filter(D).map((t=>c(t,e,!1)));o.unshift(n);const r=o.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(N(e.language).supersetOf===t.language)return 1;if(N(t.language).supersetOf===e.language)return-1}return 0})),[l,M]=r,g=l;return g.secondBest=M,g}function u(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const i=a.languageDetectRe.exec(t);if(i){const t=N(i[1]);return t||(aG(r.replace("{}",i[1])),aG("Falling back to no-highlight mode for this block.",e)),t?i[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||N(e)))}(e);if(l(n))return;if(y("before:highlightElement",{el:e,language:n}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),a.throwUnescapedHTML)){throw new hG("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const o=t.textContent,s=n?M(o,{language:n,ignoreIllegals:!0}):g(o);e.innerHTML=s.value,e.dataset.highlighted="yes",function(e,t,n){const o=t&&i[t]||n;e.classList.add("hljs"),e.classList.add(`language-${o}`)}(e,n,s.language),e.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(e.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),y("after:highlightElement",{el:e,result:s,text:o})}let d=!1;function h(){if("loading"===document.readyState)return d||window.addEventListener("DOMContentLoaded",(function(){h()}),!1),void(d=!0);document.querySelectorAll(a.cssSelector).forEach(u)}function N(e){return e=(e||"").toLowerCase(),t[e]||t[i[e]]}function p(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{i[e.toLowerCase()]=t}))}function D(e){const t=N(e);return t&&!t.disableAutodetect}function y(e,t){const i=e;n.forEach((function(e){e[i]&&e[i](t)}))}Object.assign(e,{highlight:M,highlightAuto:g,highlightAll:h,highlightElement:u,highlightBlock:function(e){return lG("10.7.0","highlightBlock will be removed entirely in v12.0"),lG("10.7.0","Please use highlightElement now."),u(e)},configure:function(e){a=pG(a,e)},initHighlighting:()=>{h(),lG("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){h(),lG("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(i,n){let r=null;try{r=n(e)}catch(e){if(sG("Language definition for '{}' could not be registered.".replace("{}",i)),!o)throw e;sG(e),r=s}r.name||(r.name=i),t[i]=r,r.rawDefinition=n.bind(null,e),r.aliases&&p(r.aliases,{languageName:i})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(i))i[t]===e&&delete i[t]},listLanguages:function(){return Object.keys(t)},getLanguage:N,registerAliases:p,autoDetection:D,inherit:pG,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),n.push(e)},removePlugin:function(e){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString="11.11.2",e.regex={concat:xF,lookahead:zF,either:AF,optional:TF,anyNumberOfTimes:mF};for(const e in GF)"object"==typeof GF[e]&&gF(GF[e]);return Object.assign(e,GF),e},IG=yG({});IG.newInstance=()=>yG({});var jG=IG;IG.HighlightJS=IG,IG.default=IG;var zG=cF(jG);const mG="[A-Za-z$_][0-9A-Za-z$_]*",TG=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],xG=["true","false","null","undefined","NaN","Infinity"],AG=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],OG=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],fG=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],bG=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],LG=[].concat(fG,AG,OG);var wG=function(e){const t=e.regex,i=mG,n="<>",o="</>",r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const i=e[0].length+e.index,n=e.input[i];if("<"===n||","===n)return void t.ignoreMatch();let o;">"===n&&(((e,{after:t})=>{const i="</"+e[0].slice(1);return-1!==e.input.indexOf(i,t)})(e,{after:i})||t.ignoreMatch());const r=e.input.substring(i);((o=r.match(/^\s*=/))||(o=r.match(/^\s+extends\s+/))&&0===o.index)&&t.ignoreMatch()}},s={$pattern:mG,keyword:TG,literal:xG,built_in:LG,"variable.language":bG},a="[0-9](_?[0-9])*",l=`\\.(${a})`,M="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",c={className:"number",variants:[{begin:`(\\b(${M})((${l})|\\.)?|(${l}))[eE][+-]?(${a})\\b`},{begin:`\\b(${M})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},g={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},u={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"xml"}},d={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},h={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"graphql"}},N={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,g]},p={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},D=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,N,{match:/\$\d+/},c];g.contains=D.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(D)});const y=[].concat(p,g.contains),I=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(y)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:I},z={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},m={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...AG,...OG]}},T={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},x={match:t.concat(/\b/,function(e){return t.concat("(?!",e.join("|"),")")}([...fG,"super","import","await"].map((e=>`${e}\\s*\\(`))),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},A={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},O={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},f="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",b={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(f)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:m},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,N,p,{match:/\$\d+/},c,m,{scope:"attr",match:i+t.lookahead(":"),relevance:0},b,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[p,e.REGEXP_MODE,{className:"function",begin:f,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:I}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:n,end:o},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},T,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[j,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},A,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},x,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},z,O,{match:/\$[(.]/}]}},vG=cF(wG);const SG="[A-Za-z$_][0-9A-Za-z$_]*",kG=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],EG=["true","false","null","undefined","NaN","Infinity"],CG=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],QG=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],UG=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],YG=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ZG=[].concat(UG,CG,QG);function _G(e){const t=e.regex,i=SG,n="<>",o="</>",r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const i=e[0].length+e.index,n=e.input[i];if("<"===n||","===n)return void t.ignoreMatch();let o;">"===n&&(((e,{after:t})=>{const i="</"+e[0].slice(1);return-1!==e.input.indexOf(i,t)})(e,{after:i})||t.ignoreMatch());const r=e.input.substring(i);((o=r.match(/^\s*=/))||(o=r.match(/^\s+extends\s+/))&&0===o.index)&&t.ignoreMatch()}},s={$pattern:SG,keyword:kG,literal:EG,built_in:ZG,"variable.language":YG},a="[0-9](_?[0-9])*",l=`\\.(${a})`,M="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",c={className:"number",variants:[{begin:`(\\b(${M})((${l})|\\.)?|(${l}))[eE][+-]?(${a})\\b`},{begin:`\\b(${M})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},g={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},u={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"xml"}},d={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},h={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"graphql"}},N={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,g]},p={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},D=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,N,{match:/\$\d+/},c];g.contains=D.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(D)});const y=[].concat(p,g.contains),I=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(y)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:I},z={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},m={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...CG,...QG]}},T={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/};const x={match:t.concat(/\b/,function(e){return t.concat("(?!",e.join("|"),")")}([...UG,"super","import","await"].map((e=>`${e}\\s*\\(`))),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},A={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},O={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},f="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",b={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(f)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:m},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,N,p,{match:/\$\d+/},c,m,{scope:"attr",match:i+t.lookahead(":"),relevance:0},b,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[p,e.REGEXP_MODE,{className:"function",begin:f,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:I}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:n,end:o},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},T,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[j,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},A,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},x,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},z,O,{match:/\$[(.]/}]}}var PG=function(e){const t=e.regex,i=_G(e),n=SG,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],r={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[i.exports.CLASS_REFERENCE]},a={$pattern:SG,keyword:kG.concat(["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"]),literal:EG,built_in:ZG.concat(o),"variable.language":YG},l={className:"meta",begin:"@"+n},M=(e,t,i)=>{const n=e.contains.findIndex((e=>e.label===t));if(-1===n)throw new Error("can not find mode to replace");e.contains.splice(n,1,i)};Object.assign(i.keywords,a),i.exports.PARAMS_CONTAINS.push(l);const c=i.contains.find((e=>"attr"===e.scope)),g=Object.assign({},c,{match:t.concat(n,t.lookahead(/\s*\?:/))});i.exports.PARAMS_CONTAINS.push([i.exports.CLASS_REFERENCE,c,g]),i.contains=i.contains.concat([l,r,s,g]),M(i,"shebang",e.SHEBANG()),M(i,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/});const u=i.contains.find((e=>"func.def"===e.label));return u.relevance=0,Object.assign(i,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),i},VG=cF(PG);const RG={scope:"number",match:"([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",relevance:0};var WG=function(e){const t=["true","false","null"],i={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:t},contains:[{className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,RG,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}},BG=cF(WG);var $G=cF((function(e){const t=e.regex,i=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),n={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},r=e.inherit(o,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[n]},{begin:/'/,end:/'/,contains:[n]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,a,s,r,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,r,a,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},n,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(i,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:i,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(i,/>/))),contains:[{className:"name",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}));const FG=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],GG=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),HG=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),JG=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),XG=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();var qG=cF((function(e){const t=e.regex,i=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),n=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[i.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},i.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+HG.join("|")+")"},{begin:":(:)?("+JG.join("|")+")"}]},i.CSS_VARIABLE,{className:"attribute",begin:"\\b("+XG.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[i.BLOCK_COMMENT,i.HEXCOLOR,i.IMPORTANT,i.CSS_NUMBER_MODE,i.UNICODE_RANGE,...n,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...n,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},i.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:GG.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...n,i.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+FG.join("|")+")\\b"}]}}));const KG=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],eH=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),tH=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),iH=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),nH=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();var oH=function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),i=iH,n=tH,o="@[a-z-]+",r={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+KG.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+n.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+i.join("|")+")"},r,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+nH.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,r,t.HEXCOLOR,t.CSS_NUMBER_MODE,t.UNICODE_RANGE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:eH.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},r,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}},rH=cF(oH);var sH=function(e){const t=e.regex,i=e.COMMENT("--","$"),n=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],o=n,r=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!n.includes(e))),s={match:t.concat(/\b/,t.either(...o),/\s*\(/),relevance:0,keywords:{built_in:o}};function a(e){return t.concat(/\b/,t.either(...e.map((e=>e.replace(/\s+/,"\\s+")))),/\b/)}const l={scope:"keyword",match:a(["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"]),relevance:0};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:i}={}){const n=i;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:n(e)?`${e}|0`:e))}(r,{when:e=>e.length<3}),literal:["true","false","unknown"],type:["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{scope:"type",match:a(["double precision","large object","with timezone","without timezone"])},l,s,{scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},{scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},{begin:/"/,end:/"/,contains:[{match:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,i,{scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}},aH=cF(sH);var lH=function(e){const t=e.regex,i=/[\p{XID_Start}_]\p{XID_Continue}*/u,n=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:n,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},r={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,r,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r,a,s]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},M="[0-9](_?[0-9])*",c=`(\\b(${M}))?\\.(${M})|\\b(${M})\\.`,g=`\\b|${n.join("|")}`,u={className:"number",relevance:0,variants:[{begin:`(\\b(${M})|(${c}))[eE][+-]?(${M})[jJ]?(?=${g})`},{begin:`(${c})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${g})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${g})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`},{begin:`\\b(${M})[jJ](?=${g})`}]},d={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},h={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",r,u,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,u,r],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[r,u,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},l,d,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,i],scope:{1:"keyword",3:"title.function"},contains:[h]},{variants:[{match:[/\bclass/,/\s+/,i,/\s*/,/\(\s*/,i,/\s*\)/]},{match:[/\bclass/,/\s+/,i]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[u,h,l]}]}},MH=cF(lH),cH="[0-9](_*[0-9])*",gH=`\\.(${cH})`,uH="[0-9a-fA-F](_*[0-9a-fA-F])*",dH={className:"number",variants:[{begin:`(\\b(${cH})((${gH})|\\.)?|(${gH}))[eE][+-]?(${cH})[fFdD]?\\b`},{begin:`\\b(${cH})((${gH})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${gH})[fFdD]?\\b`},{begin:`\\b(${cH})[fFdD]\\b`},{begin:`\\b0[xX]((${uH})\\.?|(${uH})?\\.(${uH}))[pP][+-]?(${cH})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${uH})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function hH(e,t,i){return-1===i?"":e.replace(t,(n=>hH(e,t,i-1)))}var NH=function(e){const t=e.regex,i="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",n=i+hH("(?:<"+i+"~~~(?:\\s*,\\s*"+i+"~~~)*>)?",/~~~/g,2),o={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},r={className:"meta",begin:"@"+i,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:o,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,i),/\s+/,i,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,i],className:{1:"keyword",3:"title.class"},contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+n+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:o,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,dH,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},dH,r]}},pH=cF(NH);var DH=function(e){const t=e.regex,i={},n={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[i]}]};Object.assign(i,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},r=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,o]};o.contains.push(a);const l={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,i]},M=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[M,e.SHEBANG(),c,l,r,s,{match:/(\/[a-z._-]+)+/},a,{match:/\\"/},{className:"string",begin:/'/,end:/'/},{match:/\\'/},i]}},yH=cF(DH);var IH=cF((function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}));var jH=function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},n={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},o={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},r=e.inherit(n,{contains:[]}),s=e.inherit(o,{contains:[]});n.contains.push(s),o.contains.push(r);let a=[t,i];return[n,o,r,s].forEach((e=>{e.contains=e.contains.concat(a)})),a=a.concat(n,o),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},n,o,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},i,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}},zH=cF(jH);var mH=cF((function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}));var TH=function(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",r="("+n+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},M={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},c={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},g=t.optional(o)+e.IDENT_RE+"\\s*\\(",u={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},d=[M,s,i,e.C_BLOCK_COMMENT_MODE,l,a],h={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:d.concat([{begin:/\(/,end:/\)/,keywords:u,contains:d.concat(["self"]),relevance:0}]),relevance:0},N={begin:"("+r+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:u,relevance:0},{begin:g,returnBegin:!0,contains:[e.inherit(c,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,i,e.C_BLOCK_COMMENT_MODE,M]};return{name:"C",aliases:["h"],keywords:u,disableAutodetect:!0,illegal:"</",contains:[].concat(h,N,d,[M,{begin:e.IDENT_RE+"::",keywords:u},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:M,strings:a,keywords:u}}},xH=cF(TH);var AH=function(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",r="(?!struct)("+n+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},M={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},c={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},g=t.optional(o)+e.IDENT_RE+"\\s*\\(",u=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],d={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:u,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,`(?!${u.join("|")})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[h,M,s,i,e.C_BLOCK_COMMENT_MODE,l,a],p={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:N.concat([{begin:/\(/,end:/\)/,keywords:d,contains:N.concat(["self"]),relevance:0}]),relevance:0},D={className:"function",begin:"("+r+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:d,relevance:0},{begin:g,returnBegin:!0,contains:[c],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,i,e.C_BLOCK_COMMENT_MODE,M]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(p,D,h,N,[M,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:d,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:d},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}},OH=cF(AH);var fH=function(e){const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},i=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),n={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9'_]+|(\\b[\\d'_]+(\\.[\\d'_]*)?|\\.[\\d'_]+)([eE][-+]?[\\d'_]+)?)"}],relevance:0},o={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},r=e.inherit(o,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:t},a=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,a]},M={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},c=e.inherit(M,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[M,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,n,e.C_BLOCK_COMMENT_MODE],a.contains=[c,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,n,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const g={variants:[{className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},M,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},u={begin:"<",end:">",contains:[{beginKeywords:"in out"},i]},d=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",h={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},g,n,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},i,u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+d+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,u],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[g,n,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},h]}},bH=cF(fH);var LH=function(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}},wH=cF(LH);var vH=function(e){const t=e.regex,i=/(r#)?/,n=t.concat(i,e.UNDERSCORE_IDENT_RE),o=t.concat(i,e.IDENT_RE),r={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",a=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],l=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:l,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:a},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+s},{begin:"\\b0o([0-7_]+)"+s},{begin:"\\b0x([A-Fa-f0-9_]+)"+s},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+s}],relevance:0},{begin:[/fn/,/\s+/,n],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,n],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,n,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:a,type:l}},{className:"punctuation",begin:"->"},r]}},SH=cF(vH);var kH=function(e){const t=e.regex,i=/(?![A-Za-z0-9])(?![$])/,n=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,i),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,i),r=t.concat(/[A-Z]+/,i),s={scope:"variable",match:"\\$+"+n},a={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),M=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),c={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},g="[ \t\n]",u={scope:"string",variants:[M,l,c,e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/})]},d={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},h=["false","null","true"],N=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],p=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],D={keyword:N,literal:(e=>{const t=[];return e.forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(h),built_in:p},y=e=>e.map((e=>e.replace(/\|\d+$/,""))),I={variants:[{match:[/new/,t.concat(g,"+"),t.concat("(?!",y(p).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},j=t.concat(n,"\\b(?!\\()"),z={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),j],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),j],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},m={scope:"attr",match:t.concat(n,t.lookahead(":"),t.lookahead(/(?!::)/))},T={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[m,s,z,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,u,d,I]},x={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",y(N).join("\\b|"),"|",y(p).join("\\b|"),"\\b)"),n,t.concat(g,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[T]};T.contains.push(x);const A=[m,z,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,u,d,I],O={begin:t.concat(/#\[\s*\\?/,t.either(o,r)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:h,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:h,keyword:["new","array"]},contains:["self",...A]},...A,{scope:"meta",variants:[{match:o},{match:r}]}]};return{case_insensitive:!1,keywords:D,contains:[O,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},s,x,z,{match:[/const/,/\s/,n],scope:{1:"keyword",3:"variable.constant"}},I,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:D,contains:["self",O,s,z,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,u,d]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},u,d]}},EH=cF(kH);var CH=cF((function(e){const t=e.regex,i="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",n=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(n,/(::\w+)*/),r={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield","include","extend","prepend","public","private","protected","raise","throw"],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],M={className:"subst",begin:/#\{/,end:/\}/,keywords:r},c={className:"string",contains:[e.BACKSLASH_ESCAPE,M],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,M]})]}]},g="[0-9](_?[0-9])*",u={className:"number",relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},d={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:r}]},h=[c,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:r},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:r},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:n,scope:"title.class"},{match:[/def/,/\s+/,i],scope:{1:"keyword",3:"title.function"},contains:[d]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[c,{begin:i}],relevance:0},u,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:r},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,M],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a,l),relevance:0}].concat(a,l);M.contains=h,d.contains=h;const N=[{begin:/^\s*=>/,starts:{end:"$",contains:h}},{className:"meta.prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",keywords:r,contains:h}}];return l.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:r,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(N).concat(l).concat(h)}})),QH="[0-9](_*[0-9])*",UH=`\\.(${QH})`,YH="[0-9a-fA-F](_*[0-9a-fA-F])*",ZH={className:"number",variants:[{begin:`(\\b(${QH})((${UH})|\\.)?|(${UH}))[eE][+-]?(${QH})[fFdD]?\\b`},{begin:`\\b(${QH})((${UH})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${UH})[fFdD]?\\b`},{begin:`\\b(${QH})[fFdD]\\b`},{begin:`\\b0[xX]((${YH})\\.?|(${YH})?\\.(${YH}))[pP][+-]?(${QH})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${YH})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};var _H=function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},n={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},r={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,n]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,n]}]};n.contains.push(r);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(r,{className:"string"}),"self"]}]},l=ZH,M=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),c={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},g=c;return g.variants[1].contains=[c],c.variants[1].contains=[g],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,M,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},i,s,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[c,e.C_LINE_COMMENT_MODE,M],relevance:0},e.C_LINE_COMMENT_MODE,M,s,a,r,e.C_NUMBER_MODE]},M]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,a]},r,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}},PH=cF(_H);function VH(e){return e?"string"==typeof e?e:e.source:null}function RH(e){return WH("(?=",e,")")}function WH(...e){const t=e.map((e=>VH(e))).join("");return t}function BH(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),i="("+(t.capture?"":"?:")+e.map((e=>VH(e))).join("|")+")";return i}const $H=e=>WH(/\b/,e,/\w$/.test(e)?/\b/:/\B/),FH=["Protocol","Type"].map($H),GH=["init","self"].map($H),HH=["Any","Self"],JH=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],XH=["false","nil","true"],qH=["assignment","associativity","higherThan","left","lowerThan","none","right"],KH=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],eJ=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],tJ=BH(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),iJ=BH(tJ,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),nJ=WH(tJ,iJ,"*"),oJ=BH(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),rJ=BH(oJ,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),sJ=WH(oJ,rJ,"*"),aJ=WH(/[A-Z]/,rJ,"*"),lJ=["attached","autoclosure",WH(/convention\(/,BH("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",WH(/objc\(/,sJ,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],MJ=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];var cJ=function(e){const t={match:/\s+/,relevance:0},i=e.COMMENT("/\\*","\\*/",{contains:["self"]}),n=[e.C_LINE_COMMENT_MODE,i],o={match:[/\./,BH(...FH,...GH)],className:{2:"keyword"}},r={match:WH(/\./,BH(...JH)),relevance:0},s=JH.filter((e=>"string"==typeof e)).concat(["_|0"]),a={variants:[{className:"keyword",match:BH(...JH.filter((e=>"string"!=typeof e)).concat(HH).map($H),...GH)}]},l={$pattern:BH(/\b\w+/,/#\w+/),keyword:s.concat(KH),literal:XH},M=[o,r,a],c=[{match:WH(/\./,BH(...eJ)),relevance:0},{className:"built_in",match:WH(/\b/,BH(...eJ),/(?=\()/)}],g={match:/->/,relevance:0},u=[g,{className:"operator",relevance:0,variants:[{match:nJ},{match:`\\.(\\.|${iJ})+`}]}],d="([0-9]_*)+",h="([0-9a-fA-F]_*)+",N={className:"number",relevance:0,variants:[{match:`\\b(${d})(\\.(${d}))?([eE][+-]?(${d}))?\\b`},{match:`\\b0x(${h})(\\.(${h}))?([pP][+-]?(${d}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},p=(e="")=>({className:"subst",variants:[{match:WH(/\\/,e,/[0\\tnr"']/)},{match:WH(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),D=(e="")=>({className:"subst",match:WH(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),y=(e="")=>({className:"subst",label:"interpol",begin:WH(/\\/,e,/\(/),end:/\)/}),I=(e="")=>({begin:WH(e,/"""/),end:WH(/"""/,e),contains:[p(e),D(e),y(e)]}),j=(e="")=>({begin:WH(e,/"/),end:WH(/"/,e),contains:[p(e),y(e)]}),z={className:"string",variants:[I(),I("#"),I("##"),I("###"),j(),j("#"),j("##"),j("###")]},m=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],T={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:m},x=e=>{const t=WH(e,/\//),i=WH(/\//,e);return{begin:t,end:i,contains:[...m,{scope:"comment",begin:`#(?!.*${i})`,end:/$/}]}},A={scope:"regexp",variants:[x("###"),x("##"),x("#"),T]},O={match:WH(/`/,sJ,/`/)},f=[O,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${rJ}+`}],b=[{match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:MJ,contains:[...u,N,z]}]}},{scope:"keyword",match:WH(/@/,BH(...lJ),RH(BH(/\(/,/\s+/)))},{scope:"meta",match:WH(/@/,sJ)}],L={match:RH(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:WH(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,rJ,"+")},{className:"type",match:aJ,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:WH(/\s+&\s+/,RH(aJ)),relevance:0}]},w={begin:/</,end:/>/,keywords:l,contains:[...n,...M,...b,g,L]};L.contains.push(w);const v={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:WH(sJ,/\s*:/),keywords:"_|0",relevance:0},...n,A,...M,...c,...u,N,z,...f,...b,L]},S={begin:/</,end:/>/,keywords:"repeat each",contains:[...n,L]},k={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:BH(RH(WH(sJ,/\s*:/)),RH(WH(sJ,/\s+/,sJ,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:sJ}]},...n,...M,...u,N,z,...b,L,v],endsParent:!0,illegal:/["']/},E={match:[/(func|macro)/,/\s+/,BH(O.match,sJ,nJ)],className:{1:"keyword",3:"title.function"},contains:[S,k,t],illegal:[/\[/,/%/]},C={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[S,k,t],illegal:/\[|%/},Q={match:[/operator/,/\s+/,nJ],className:{1:"keyword",3:"title"}},U={begin:[/precedencegroup/,/\s+/,aJ],className:{1:"keyword",3:"title"},contains:[L],keywords:[...qH,...XH],end:/}/},Y={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,sJ,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:l,contains:[S,...M,{begin:/:/,end:/\{/,keywords:l,contains:[{scope:"title.class.inherited",match:aJ},...M],relevance:0}]};for(const e of z.variants){const t=e.contains.find((e=>"interpol"===e.label));t.keywords=l;const i=[...M,...c,...u,N,z,...f];t.contains=[...i,{begin:/\(/,end:/\)/,contains:["self",...i]}]}return{name:"Swift",keywords:l,contains:[...n,E,C,{match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},{match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Y,Q,U,{beginKeywords:"import",end:/$/,contains:[...n],relevance:0},A,...M,...c,...u,N,z,...f,...b,L,v]}},gJ=cF(cJ);var uJ=function(e){const t="true false yes no null",i="[\\w#;/?:@&=+$,.~*'()[\\]]+",n={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},o=e.inherit(n,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),r={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},s={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},a={begin:/\{/,end:/\}/,contains:[s],illegal:"\\n",relevance:0},l={begin:"\\[",end:"\\]",contains:[s],illegal:"\\n",relevance:0},M=[{className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+i},{className:"type",begin:"!<"+i+">"},{className:"type",begin:"!"+i},{className:"type",begin:"!!"+i},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},r,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},a,l,{className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},n],c=[...M];return c.pop(),c.push(o),s.contains=c,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:M}},dJ=cF(uJ);var hJ=cF((function(e){return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:["from","maintainer","expose","env","arg","user","onbuild","stopsignal"],contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"</"}}));var NJ=cF((function(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}));var pJ=cF((function(e){const t=e.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}));zG.registerLanguage("javascript",vG),zG.registerLanguage("typescript",VG),zG.registerLanguage("json",BG),zG.registerLanguage("xml",$G),zG.registerAliases(["html"],{languageName:"xml"}),zG.registerLanguage("css",qG),zG.registerLanguage("scss",rH),zG.registerLanguage("sql",aH),zG.registerLanguage("python",MH),zG.registerLanguage("java",pH),zG.registerLanguage("bash",yH),zG.registerLanguage("shell",IH),zG.registerLanguage("markdown",zH),zG.registerLanguage("plaintext",mH),zG.registerLanguage("c",xH),zG.registerLanguage("cpp",OH),zG.registerLanguage("csharp",bH),zG.registerLanguage("go",wH),zG.registerLanguage("rust",SH),zG.registerLanguage("php",EH),zG.registerLanguage("ruby",CH),zG.registerLanguage("kotlin",PH),zG.registerLanguage("swift",gJ),zG.registerLanguage("yaml",dJ),zG.registerLanguage("dockerfile",hJ),zG.registerLanguage("diff",NJ),zG.registerLanguage("graphql",pJ);const DJ=new SY("nileCodeHighlight"),yJ=[{value:"",label:"Auto"},{value:"plaintext",label:"Plain text"},{value:"javascript",label:"JavaScript"},{value:"typescript",label:"TypeScript"},{value:"json",label:"JSON"},{value:"html",label:"HTML"},{value:"css",label:"CSS"},{value:"scss",label:"SCSS"},{value:"sql",label:"SQL"},{value:"python",label:"Python"},{value:"java",label:"Java"},{value:"c",label:"C"},{value:"cpp",label:"C++"},{value:"csharp",label:"C#"},{value:"go",label:"Go"},{value:"rust",label:"Rust"},{value:"php",label:"PHP"},{value:"ruby",label:"Ruby"},{value:"kotlin",label:"Kotlin"},{value:"swift",label:"Swift"},{value:"bash",label:"Bash"},{value:"shell",label:"Shell"},{value:"yaml",label:"YAML"},{value:"dockerfile",label:"Dockerfile"},{value:"graphql",label:"GraphQL"},{value:"diff",label:"Diff"},{value:"markdown",label:"Markdown"}],IJ=["javascript","typescript","json","xml","css","sql","python","java","bash","go","rust","ruby"];function jJ(e){const t=[];return e.descendants(((e,i)=>"code_block"!==e.type.name||(t.push(...function(e,t,i){if(!e||e.length>2e4)return[];let n;try{if(t&&zG.getLanguage(t))n=zG.highlight(e,{language:t}).value;else{if("plaintext"===t)return[];n=zG.highlightAuto(e,IJ).value}}catch{return[]}const o=document.createElement("template");o.innerHTML=n;const r=[];let s=0;const a=(e,t)=>{e.childNodes.forEach((e=>{if(3===e.nodeType){const n=e.nodeValue?.length??0;t.length&&n&&r.push(DP.inline(i+s,i+s+n,{class:t.join(" ")})),s+=n}else if(1===e.nodeType){const i=e;a(i,[...t,...i.className.split(/\s+/).filter(Boolean)])}}))};return a(o.content,[]),r}(e.textContent,e.attrs.language,i+1)),!1))),t.length?jP.create(e,t):jP.empty}const zJ=new SY("nileFormatPainter");function mJ(e){return!!zJ.getState(e)?.marks}function TJ(e){const t=zJ.getState(e);if(!t?.marks)return null;const{from:i,to:n,empty:o}=e.selection;if(o)return null;const r=e.tr;r.removeMark(i,n,null);for(const e of t.marks)r.addMark(i,n,e);return r.setMeta(zJ,{type:"disarm"}),r}const xJ=new SY("nileMentionSuggest"),AJ=new SY("nileSlashSuggest"),OJ=new SY("nileEmojiSuggest");function fJ(e={}){const t=e.schema??oW,i=[];var n;return e.mentions&&i.push(iF(xJ,e.mentions)),e.slashCommands&&i.push(iF(AJ,{...e.slashCommands,getTriggers:()=>["/"],startOfLine:!0})),e.emoji&&i.push(iF(OJ,{...e.emoji,getTriggers:()=>[":"],minQueryLength:2})),i.push(H$(t,{textTransform:e.textTransform}),...function(e,t={}){const i={};i["Mod-z"]=hB,i["Shift-Mod-z"]=NB,W$||(i["Mod-y"]=NB),i.Backspace=Z$,i["Mod-b"]=(e,t,i)=>AB(e,"bold")(e,t,i),i["Mod-i"]=(e,t,i)=>AB(e,"italic")(e,t,i),i["Mod-u"]=(e,t,i)=>AB(e,"underline")(e,t,i),i["Shift-Mod-x"]=(e,t,i)=>AB(e,"strike")(e,t,i),i["Mod-,"]=(e,t,i)=>AB(e,"subscript")(e,t,i),i["Mod-."]=(e,t,i)=>AB(e,"superscript")(e,t,i),i["Shift-Mod-v"]=(e,t,i)=>!(!i||"undefined"==typeof navigator||!navigator.clipboard?.readText||(navigator.clipboard.readText().then((e=>{if(!e||!i)return;const t=V$(i.state.schema,e);i.dispatch(i.state.tr.replaceSelection(t).scrollIntoView())})).catch((()=>{})),0)),i["Shift-Ctrl-0"]=(e,t,i)=>AB(e,"paragraph")(e,t,i);for(let e=1;e<=6;e+=1)i[`Shift-Ctrl-${e}`]=(t,i,n)=>AB(t,"heading",{level:e})(t,i,n);i["Shift-Mod-7"]=(e,t,i)=>AB(e,"orderedList")(e,t,i),i["Shift-Mod-8"]=(e,t,i)=>AB(e,"bulletList")(e,t,i),i["Shift-Mod-9"]=(e,t,i)=>AB(e,"blockquote")(e,t,i),i["Mod-Alt-c"]=(e,t,i)=>AB(e,"codeBlock")(e,t,i),i["Mod-]"]=(e,t,i)=>AB(e,"indent")(e,t,i),i["Mod-["]=(e,t,i)=>AB(e,"outdent")(e,t,i),i.Enter=BW(rV(e.nodes.task_item,{checked:!1}),rV(e.nodes.list_item)),i.Tab=BW(aV(e.nodes.task_item),aV(e.nodes.list_item)),i["Shift-Tab"]=BW(sV(e.nodes.task_item),sV(e.nodes.list_item));const n=BW(QW,((t,i)=>(i&&i(t.tr.replaceSelectionWith(e.nodes.hard_break.create()).scrollIntoView()),!0)));if(i["Shift-Enter"]=n,i["Mod-Enter"]=n,t.onLinkShortcut){const e=t.onLinkShortcut;i["Mod-k"]=()=>(e(),!0)}if(t.onFindShortcut){const e=t.onFindShortcut;i["Mod-f"]=()=>(e(),!0)}if(t.onShortcutHelp){const e=t.onShortcutHelp;i["Mod-/"]=()=>(e(),!0)}return[uV(i),uV(JW)]}(t,{onLinkShortcut:e.onLinkShortcut,onFindShortcut:e.onFindShortcut,onShortcutHelp:e.onShortcutHelp}),uB(),function(e={}){return new LY({view:t=>new b$(t,e)})}(),new LY({props:{decorations:Q$,createSelectionBetween:(e,t,i)=>t.pos==i.pos&&L$.valid(i)?new L$(i):null,handleClick:E$,handleKeyDown:S$,handleDOMEvents:{beforeinput:C$}}}),function(e){return new LY({props:{decorations(t){const i=e();if(!i||!LW(t.doc))return null;const n=DP.node(0,t.doc.firstChild.nodeSize,{class:"nile-wysiwyg__empty","data-placeholder":i});return jP.create(t.doc,[n])}}})}(e.getPlaceholder??(()=>"")),function(e={}){return new LY({props:{handleClick(t,i,n){if(!n.metaKey&&!n.ctrlKey)return!1;const o=n.target?.closest?.("a[href]");if(!o)return!1;const r=o.getAttribute("href");return!!uW(r)&&(e.onOpenLink?e.onOpenLink(r):window.open(r,"_blank","noopener,noreferrer"),!0)},handlePaste(e,t){const{state:i}=e,{empty:n,from:o,to:r}=i.selection;if(n)return!1;const s=t.clipboardData?.getData("text/plain")?.trim();if(!s||!J$.test(s)||!uW(s))return!1;const a=i.schema.marks.link.create({href:s});return e.dispatch(i.tr.addMark(o,r,a)),!0}}})}({onOpenLink:e.onOpenLink}),jR({View:q$}),fR({allowTableNodeSelection:!0}),function(e={}){return new LY({key:K$,state:{init:()=>jP.empty,apply(e,t){let i=t.map(e.mapping,e.doc);const n=e.getMeta(K$);if(n?.add){const t=document.createElement("span");t.className="nile-wysiwyg__upload-placeholder",t.textContent="Uploading image…",i=i.add(e.doc,[DP.widget(n.add.pos,t,{id:n.add.id})])}return n?.remove&&(i=i.remove(i.find(void 0,void 0,(e=>e.id===n.remove.id)))),i}},props:{decorations:e=>K$.getState(e),handlePaste(t,i){const n=eF(i.clipboardData);return!(0===n.length||!e.onImageFiles||(e.onImageFiles(n,null),0))},handleDrop(t,i){const n=eF(i.dataTransfer);if(0===n.length||!e.onImageFiles)return!1;const o=t.posAtCoords({left:i.clientX,top:i.clientY});return e.onImageFiles(n,o?o.pos:null),!0}}})}({onImageFiles:e.onImageFiles}),sF(),new LY({key:DJ,state:{init:(e,t)=>jJ(t.doc),apply:(e,t)=>e.docChanged?jJ(e.doc):t},props:{decorations:e=>DJ.getState(e)}}),new LY({props:{handlePaste(e,t){const{state:i}=e;if(!i.selection.empty)return!1;const n=t.clipboardData?.getData("text/plain")?.trim();if(!n||/\s/.test(n))return!1;const o=wR(n);if(!o)return!1;const r=i.schema.nodes.embed.create({src:o.src,provider:o.provider});return e.dispatch(i.tr.replaceSelectionWith(r).scrollIntoView()),!0}}}),new LY({key:zJ,state:{init:()=>({marks:null}),apply(e,t){const i=e.getMeta(zJ);return"arm"===i?.type?{marks:i.marks}:"disarm"===i?.type?{marks:null}:t}},props:{attributes:e=>zJ.getState(e)?.marks?{class:"nile-wysiwyg--painting"}:{}}}),R$(t,{getForcePlainText:e.getForcePlainText,getMarkdownPaste:e.getMarkdownPaste,getSanitize:e.getSanitize})),e.getMaxLength&&i.push((n=e.getMaxLength,new LY({filterTransaction(e,t){if(!e.docChanged)return!0;const i=n();if(!i||i<=0)return!0;const o=MF(e.doc);return o<=i||o<MF(t.doc)}}))),e.singleLine&&i.push(new LY({filterTransaction:e=>!e.docChanged||e.doc.childCount<=1,props:{handleKeyDown:(e,t)=>"Enter"===t.key,transformPasted(e){const t=[];return e.content.descendants((e=>!e.isInline||(t.push(e),!1))),new zQ(NQ.from(t),0,0)}}})),e.plugins&&i.push(...e.plugins),fY.create({schema:t,doc:e.doc,plugins:i})}class bJ{constructor(e,t,i){this.node=e,this.dom=document.createElement("li"),this.dom.className="nile-wysiwyg__task-item",this.dom.dataset.taskItem="true",this.dom.dataset.checked=String(e.attrs.checked),this.checkbox=document.createElement("input"),this.checkbox.type="checkbox",this.checkbox.contentEditable="false",this.checkbox.checked=e.attrs.checked,this.checkbox.addEventListener("mousedown",(e=>e.preventDefault())),this.checkbox.addEventListener("change",(()=>{const e=i();if(void 0===e||!t.editable)return void(this.checkbox.checked=this.node.attrs.checked);const n=t.state.doc.nodeAt(e);n&&t.dispatch(t.state.tr.setNodeMarkup(e,void 0,{...n.attrs,checked:this.checkbox.checked}))})),this.contentDOM=document.createElement("div"),this.contentDOM.className="nile-wysiwyg__task-content",this.dom.append(this.checkbox,this.contentDOM)}update(e){return e.type===this.node.type&&(this.node=e,this.checkbox.checked=e.attrs.checked,this.dom.dataset.checked=String(e.attrs.checked),!0)}stopEvent(e){return e.target===this.checkbox}}const LJ="undo redo findReplace | heading | bold italic underline strike subscript superscript | fontFamily fontSize lineHeight | textColor bgColor | alignLeft alignCenter alignRight alignJustify | bulletList orderedList taskList listStyle indent outdent blockquote | link bookmark table image embed codeBlock math horizontalRule specialChars emoji >> mergeField template | formatPainter caseChange clearFormatting pastePlainText showBlocks sourceView | importMarkdown importWord exportInlineHtml exportWord exportPdf | shortcutHelp fullscreen",wJ=[{name:"smile",char:"😄"},{name:"grin",char:"😁"},{name:"joy",char:"😂"},{name:"rofl",char:"🤣"},{name:"slight_smile",char:"🙂"},{name:"wink",char:"😉"},{name:"blush",char:"😊"},{name:"heart_eyes",char:"😍"},{name:"kiss",char:"😘"},{name:"thinking",char:"🤔"},{name:"neutral",char:"😐"},{name:"smirk",char:"😏"},{name:"unamused",char:"😒"},{name:"roll_eyes",char:"🙄"},{name:"grimacing",char:"😬"},{name:"relieved",char:"😌"},{name:"pensive",char:"😔"},{name:"sleepy",char:"😴"},{name:"mask",char:"😷"},{name:"sunglasses",char:"😎"},{name:"nerd",char:"🤓"},{name:"confused",char:"😕"},{name:"worried",char:"😟"},{name:"frown",char:"🙁"},{name:"open_mouth",char:"😮"},{name:"astonished",char:"😲"},{name:"scream",char:"😱"},{name:"cry",char:"😢"},{name:"sob",char:"😭"},{name:"sweat",char:"😓"},{name:"angry",char:"😠"},{name:"rage",char:"😡"},{name:"exploding_head",char:"🤯"},{name:"party",char:"🥳"},{name:"cowboy",char:"🤠"},{name:"clown",char:"🤡"},{name:"ghost",char:"👻"},{name:"alien",char:"👽"},{name:"robot",char:"🤖"},{name:"poop",char:"💩"},{name:"skull",char:"💀"},{name:"heart",char:"❤️"},{name:"broken_heart",char:"💔"},{name:"sparkling_heart",char:"💖"},{name:"fire",char:"🔥"},{name:"sparkles",char:"✨"},{name:"star",char:"⭐"},{name:"boom",char:"💥"},{name:"zap",char:"⚡"},{name:"rainbow",char:"🌈"},{name:"sun",char:"☀️"},{name:"cloud",char:"☁️"},{name:"rain",char:"🌧️"},{name:"snowflake",char:"❄️"},{name:"thumbsup",char:"👍"},{name:"thumbsdown",char:"👎"},{name:"ok_hand",char:"👌"},{name:"clap",char:"👏"},{name:"wave",char:"👋"},{name:"raised_hands",char:"🙌"},{name:"pray",char:"🙏"},{name:"muscle",char:"💪"},{name:"point_right",char:"👉"},{name:"point_left",char:"👈"},{name:"point_up",char:"☝️"},{name:"point_down",char:"👇"},{name:"handshake",char:"🤝"},{name:"crossed_fingers",char:"🤞"},{name:"victory",char:"✌️"},{name:"eyes",char:"👀"},{name:"brain",char:"🧠"},{name:"tada",char:"🎉"},{name:"confetti",char:"🎊"},{name:"balloon",char:"🎈"},{name:"gift",char:"🎁"},{name:"trophy",char:"🏆"},{name:"medal",char:"🥇"},{name:"rocket",char:"🚀"},{name:"airplane",char:"✈️"},{name:"car",char:"🚗"},{name:"bike",char:"🚲"},{name:"hourglass",char:"⏳"},{name:"clock",char:"🕐"},{name:"alarm",char:"⏰"},{name:"calendar",char:"📅"},{name:"pushpin",char:"📌"},{name:"paperclip",char:"📎"},{name:"scissors",char:"✂️"},{name:"pencil",char:"✏️"},{name:"memo",char:"📝"},{name:"book",char:"📖"},{name:"books",char:"📚"},{name:"bulb",char:"💡"},{name:"mag",char:"🔍"},{name:"lock",char:"🔒"},{name:"unlock",char:"🔓"},{name:"key",char:"🔑"},{name:"hammer",char:"🔨"},{name:"wrench",char:"🔧"},{name:"gear",char:"⚙️"},{name:"link",char:"🔗"},{name:"bell",char:"🔔"},{name:"mega",char:"📣"},{name:"email",char:"📧"},{name:"phone",char:"📱"},{name:"computer",char:"💻"},{name:"bug",char:"🐛"},{name:"check",char:"✅"},{name:"x",char:"❌"},{name:"warning",char:"⚠️"},{name:"question",char:"❓"},{name:"exclamation",char:"❗"},{name:"hundred",char:"💯"},{name:"money",char:"💰"},{name:"chart_up",char:"📈"},{name:"chart_down",char:"📉"},{name:"coffee",char:"☕"},{name:"beer",char:"🍺"},{name:"pizza",char:"🍕"},{name:"burger",char:"🍔"},{name:"cake",char:"🎂"},{name:"apple",char:"🍎"},{name:"banana",char:"🍌"},{name:"dog",char:"🐶"},{name:"cat",char:"🐱"},{name:"unicorn",char:"🦄"},{name:"bee",char:"🐝"},{name:"turtle",char:"🐢"},{name:"penguin",char:"🐧"},{name:"flower",char:"🌸"},{name:"tree",char:"🌳"},{name:"earth",char:"🌍"},{name:"moon",char:"🌙"},{name:"wave_water",char:"🌊"}],vJ=s`
|
|
26346
|
+
`,XP=["ol",0],qP=["ul",0],KP=["li",0],eV={attrs:{order:{default:1,validate:"number"}},parseDOM:[{tag:"ol",getAttrs:e=>({order:e.hasAttribute("start")?+e.getAttribute("start"):1})}],toDOM:e=>1==e.attrs.order?XP:["ol",{start:e.attrs.order},0]},tV={parseDOM:[{tag:"ul"}],toDOM:()=>qP},iV={parseDOM:[{tag:"li"}],toDOM:()=>KP,defining:!0};function nV(e,t){let i={};for(let t in e)i[t]=e[t];for(let e in t)i[e]=t[e];return i}function oV(e,t=null){return function(i,n){let{$from:o,$to:r}=i.selection,s=o.blockRange(r);if(!s)return!1;let a=n?i.tr:null;return!!function(e,t,i,n=null){let o=!1,r=t,s=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(i)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=s.resolve(t.start-2);r=new UQ(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new UQ(t.$from,s.resolve(t.$to.end(t.depth)),t.depth)),o=!0}let a=VU(r,i,n,t);if(!a)return!1;e&&function(e,t,i,n,o){let r=NQ.empty;for(let e=i.length-1;e>=0;e--)r=NQ.from(i[e].type.create(i[e].attrs,r));e.step(new UU(t.start-(n?2:0),t.end,t.start,t.end,new zQ(r,0,0),i.length,!0));let s=0;for(let e=0;e<i.length;e++)i[e].type==o&&(s=e+1);let a=i.length-s,l=t.start+i.length-(n?2:0),M=t.parent;for(let i=t.startIndex,n=t.endIndex,o=!0;i<n;i++,o=!1)!o&&$U(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=M.child(i).nodeSize}(e,t,a,o,i);return!0}(a,s,e,t)&&(n&&n(a.scrollIntoView()),!0)}}function rV(e,t){return function(i,n){let{$from:o,$to:r,node:s}=i.selection;if(s&&s.isBlock||o.depth<2||!o.sameParent(r))return!1;let a=o.node(-1);if(a.type!=e)return!1;if(0==o.parent.content.size&&o.node(-1).childCount==o.indexAfter(-1)){if(3==o.depth||o.node(-3).type!=e||o.index(-2)!=o.node(-2).childCount-1)return!1;if(n){let t=NQ.empty,r=o.index(-1)?1:o.index(-2)?2:3;for(let e=o.depth-r;e>=o.depth-3;e--)t=NQ.from(o.node(e).copy(t));let s=o.indexAfter(-1)<o.node(-2).childCount?1:o.indexAfter(-2)<o.node(-3).childCount?2:3;t=t.append(NQ.from(e.createAndFill()));let a=o.before(o.depth-(r-1)),l=i.tr.replace(a,o.after(-s),new zQ(t,4-r,0)),M=-1;l.doc.nodesBetween(a,l.doc.content.size,((e,t)=>{if(M>-1)return!1;e.isTextblock&&0==e.content.size&&(M=t+1)})),M>-1&&l.setSelection(cY.near(l.doc.resolve(M))),n(l.scrollIntoView())}return!0}let l=r.pos==o.end()?a.contentMatchAt(0).defaultType:null,M=i.tr.delete(o.pos,r.pos),c=l?[t?{type:e,attrs:t}:null,{type:l}]:void 0;return!!$U(M.doc,o.pos,2,c)&&(n&&n(M.split(o.pos,2,c).scrollIntoView()),!0)}}function sV(e){return function(t,i){let{$from:n,$to:o}=t.selection,r=n.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));return!!r&&(!i||(n.node(r.depth-1).type==e?function(e,t,i,n){let o=e.tr,r=n.end,s=n.$to.end(n.depth);r<s&&(o.step(new UU(r-1,s,r,s,new zQ(NQ.from(i.create(null,n.parent.copy())),1,0),1,!0)),n=new UQ(o.doc.resolve(n.$from.pos),o.doc.resolve(s),n.depth));const a=PU(n);if(null==a)return!1;o.lift(n,a);let l=o.doc.resolve(o.mapping.map(r,-1)-1);FU(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos);return t(o.scrollIntoView()),!0}(t,i,e,r):function(e,t,i){let n=e.tr,o=i.parent;for(let e=i.end,t=i.endIndex-1,r=i.startIndex;t>r;t--)e-=o.child(t).nodeSize,n.delete(e-1,e+1);let r=n.doc.resolve(i.start),s=r.nodeAfter;if(n.mapping.map(i.end)!=i.start+r.nodeAfter.nodeSize)return!1;let a=0==i.startIndex,l=i.endIndex==o.childCount,M=r.node(-1),c=r.index(-1);if(!M.canReplace(c+(a?0:1),c+1,s.content.append(l?NQ.empty:NQ.from(o))))return!1;let g=r.pos,u=g+s.nodeSize;return n.step(new UU(g-(a?1:0),u+(l?1:0),g+1,u-1,new zQ((a?NQ.empty:NQ.from(o.copy(NQ.empty))).append(l?NQ.empty:NQ.from(o.copy(NQ.empty))),a?0:1,l?0:1),a?0:1)),t(n.scrollIntoView()),!0}(t,i,r)))}}function aV(e){return function(t,i){let{$from:n,$to:o}=t.selection,r=n.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));if(!r)return!1;let s=r.startIndex;if(0==s)return!1;let a=r.parent,l=a.child(s-1);if(l.type!=e)return!1;if(i){let n=l.lastChild&&l.lastChild.type==a.type,o=NQ.from(n?e.create():null),s=new zQ(NQ.from(e.create(null,NQ.from(a.type.create(null,o)))),n?3:1,0),M=r.start,c=r.end;i(t.tr.step(new UU(M-(n?3:1),c,M,c,s,1,!0)).scrollIntoView())}return!0}}const lV="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),MV="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function cV(e){let t,i,n,o,r=e.split(/-(?!$)/),s=r[r.length-1];"Space"==s&&(s=" ");for(let e=0;e<r.length-1;e++){let s=r[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))i=!0;else if(/^s(hift)?$/i.test(s))n=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);lV?o=!0:i=!0}}return t&&(s="Alt-"+s),i&&(s="Ctrl-"+s),o&&(s="Meta-"+s),n&&(s="Shift-"+s),s}function gV(e,t,i=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),i&&t.shiftKey&&(e="Shift-"+e),e}function uV(e){return new LY({props:{handleKeyDown:dV(e)}})}function dV(e){let t=function(e){let t=Object.create(null);for(let i in e)t[cV(i)]=e[i];return t}(e);return function(e,i){let n,o=gg(i),r=t[gV(o,i)];if(r&&r(e.state,e.dispatch,e))return!0;if(1==o.length&&" "!=o){if(i.shiftKey){let n=t[gV(o,i,!1)];if(n&&n(e.state,e.dispatch,e))return!0}if((i.altKey||i.metaKey||i.ctrlKey)&&!(MV&&i.ctrlKey&&i.altKey)&&(n=rg[i.keyCode])&&n!=o){let o=t[gV(n,i)];if(o&&o(e.state,e.dispatch,e))return!0}}return!1}}let hV,NV;if("undefined"!=typeof WeakMap){let e=new WeakMap;hV=t=>e.get(t),NV=(t,i)=>(e.set(t,i),i)}else{const e=[],t=10;let i=0;hV=t=>{for(let i=0;i<e.length;i+=2)if(e[i]==t)return e[i+1]},NV=(n,o)=>(i==t&&(i=0),e[i++]=n,e[i++]=o)}var pV=class{constructor(e,t,i,n){this.width=e,this.height=t,this.map=i,this.problems=n}findCell(e){for(let t=0;t<this.map.length;t++){const i=this.map[t];if(i!=e)continue;const n=t%this.width,o=t/this.width|0;let r=n+1,s=o+1;for(let e=1;r<this.width&&this.map[t+e]==i;e++)r++;for(let e=1;s<this.height&&this.map[t+this.width*e]==i;e++)s++;return{left:n,top:o,right:r,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,i){const{left:n,right:o,top:r,bottom:s}=this.findCell(e);return"horiz"==t?(i<0?0==n:o==this.width)?null:this.map[r*this.width+(i<0?n-1:o)]:(i<0?0==r:s==this.height)?null:this.map[n+this.width*(i<0?r-1:s)]}rectBetween(e,t){const{left:i,right:n,top:o,bottom:r}=this.findCell(e),{left:s,right:a,top:l,bottom:M}=this.findCell(t);return{left:Math.min(i,s),top:Math.min(o,l),right:Math.max(n,a),bottom:Math.max(r,M)}}cellsInRect(e){const t=[],i={};for(let n=e.top;n<e.bottom;n++)for(let o=e.left;o<e.right;o++){const r=n*this.width+o,s=this.map[r];i[s]||(i[s]=!0,o==e.left&&o&&this.map[r-1]==s||n==e.top&&n&&this.map[r-this.width]==s||t.push(s))}return t}positionAt(e,t,i){for(let n=0,o=0;;n++){const r=o+i.child(n).nodeSize;if(n==e){let i=t+e*this.width;const n=(e+1)*this.width;for(;i<n&&this.map[i]<o;)i++;return i==n?r-1:this.map[i]}o=r}}static get(e){return hV(e)||NV(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);const t=function(e){let t=-1,i=!1;for(let n=0;n<e.childCount;n++){const o=e.child(n);let r=0;if(i)for(let t=0;t<n;t++){const i=e.child(t);for(let e=0;e<i.childCount;e++){const o=i.child(e);t+o.attrs.rowspan>n&&(r+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){const t=o.child(e);r+=t.attrs.colspan,t.attrs.rowspan>1&&(i=!0)}-1==t?t=r:t!=r&&(t=Math.max(t,r))}return t}(e),i=e.childCount,n=[];let o=0,r=null;const s=[];for(let e=0,o=t*i;e<o;e++)n[e]=0;for(let a=0,l=0;a<i;a++){const M=e.child(a);l++;for(let e=0;;e++){for(;o<n.length&&0!=n[o];)o++;if(e==M.childCount)break;const c=M.child(e),{colspan:g,rowspan:u,colwidth:d}=c.attrs;for(let e=0;e<u;e++){if(e+a>=i){(r||(r=[])).push({type:"overlong_rowspan",pos:l,n:u-e});break}const M=o+e*t;for(let e=0;e<g;e++){0==n[M+e]?n[M+e]=l:(r||(r=[])).push({type:"collision",row:a,pos:l,n:g-e});const i=d&&d[e];if(i){const n=(M+e)%t*2,o=s[n];null==o||o!=i&&1==s[n+1]?(s[n]=i,s[n+1]=1):o==i&&s[n+1]++}}}o+=g,l+=c.nodeSize}const c=(a+1)*t;let g=0;for(;o<c;)0==n[o++]&&g++;g&&(r||(r=[])).push({type:"missing",row:a,n:g}),l++}0!==t&&0!==i||(r||(r=[])).push({type:"zero_sized"});const a=new pV(t,i,n,r);let l=!1;for(let e=0;!l&&e<s.length;e+=2)null!=s[e]&&s[e+1]<i&&(l=!0);l&&function(e,t,i){e.problems||(e.problems=[]);const n={};for(let o=0;o<e.map.length;o++){const r=e.map[o];if(n[r])continue;n[r]=!0;const s=i.nodeAt(r);if(!s)throw new RangeError(`No cell with offset ${r} found`);let a=null;const l=s.attrs;for(let i=0;i<l.colspan;i++){const n=t[(o+i)%e.width*2];null==n||l.colwidth&&l.colwidth[i]==n||((a||(a=DV(l)))[i]=n)}a&&e.problems.unshift({type:"colwidth mismatch",pos:r,colwidth:a})}}(a,s,e);return a}(e))}};function DV(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let i=0;i<e.colspan;i++)t.push(0);return t}function yV(e,t){if("string"==typeof e)return{};const i=e.getAttribute("data-colwidth"),n=i&&/^\d+(,\d+)*$/.test(i)?i.split(",").map((e=>Number(e))):null,o=Number(e.getAttribute("colspan")||1),r={colspan:o,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:n&&n.length==o?n:null};for(const i in t){const n=t[i].getFromDOM,o=n&&n(e);null!=o&&(r[i]=o)}return r}function IV(e,t){const i={};1!=e.attrs.colspan&&(i.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(i.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(i["data-colwidth"]=e.attrs.colwidth.join(","));for(const n in t){const o=t[n].setDOMAttr;o&&o(e.attrs[n],i)}return i}function jV(e){if(null!==e){if(!Array.isArray(e))throw new TypeError("colwidth must be null or an array");for(const t of e)if("number"!=typeof t)throw new TypeError("colwidth must be null or an array of numbers")}}function zV(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const i in e.nodes){const n=e.nodes[i],o=n.spec.tableRole;o&&(t[o]=n)}}return t}const mV=new SY("selectingCells");function TV(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function xV(e){const t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function AV(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;const i=TV(t.$head)||function(e){for(let t=e.nodeAfter,i=e.pos;t;t=t.firstChild,i++){const n=t.type.spec.tableRole;if("cell"==n||"header_cell"==n)return e.doc.resolve(i)}for(let t=e.nodeBefore,i=e.pos;t;t=t.lastChild,i--){const n=t.type.spec.tableRole;if("cell"==n||"header_cell"==n)return e.doc.resolve(i-t.nodeSize)}}(t.$head);if(i)return i;throw new RangeError(`No cell found around position ${t.head}`)}function OV(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function fV(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function bV(e,t,i){const n=e.node(-1),o=pV.get(n),r=e.start(-1),s=o.nextCell(e.pos-r,t,i);return null==s?null:e.node(0).resolve(r+s)}function LV(e,t,i=1){const n={...e,colspan:e.colspan-i};return n.colwidth&&(n.colwidth=n.colwidth.slice(),n.colwidth.splice(t,i),n.colwidth.some((e=>e>0))||(n.colwidth=null)),n}function wV(e,t,i=1){const n={...e,colspan:e.colspan+i};if(n.colwidth){n.colwidth=n.colwidth.slice();for(let e=0;e<i;e++)n.colwidth.splice(t,0,0)}return n}var vV=class e extends cY{constructor(e,t=e){const i=e.node(-1),n=pV.get(i),o=e.start(-1),r=n.rectBetween(e.pos-o,t.pos-o),s=e.node(0),a=n.cellsInRect(r).filter((e=>e!=t.pos-o));a.unshift(t.pos-o);const l=a.map((e=>{const t=i.nodeAt(e);if(!t)throw new RangeError(`No cell with offset ${e} found`);const n=o+e+1;return new gY(s.resolve(n),s.resolve(n+t.content.size))}));super(l[0].$from,l[0].$to,l),this.$anchorCell=e,this.$headCell=t}map(t,i){const n=t.resolve(i.map(this.$anchorCell.pos)),o=t.resolve(i.map(this.$headCell.pos));if(OV(n)&&OV(o)&&fV(n,o)){const t=this.$anchorCell.node(-1)!=n.node(-1);return t&&this.isRowSelection()?e.rowSelection(n,o):t&&this.isColSelection()?e.colSelection(n,o):new e(n,o)}return hY.between(n,o)}content(){const e=this.$anchorCell.node(-1),t=pV.get(e),i=this.$anchorCell.start(-1),n=t.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},r=[];for(let i=n.top;i<n.bottom;i++){const s=[];for(let r=i*t.width+n.left,a=n.left;a<n.right;a++,r++){const i=t.map[r];if(o[i])continue;o[i]=!0;const a=t.findCell(i);let l=e.nodeAt(i);if(!l)throw new RangeError(`No cell with offset ${i} found`);const M=n.left-a.left,c=a.right-n.right;if(M>0||c>0){let e=l.attrs;if(M>0&&(e=LV(e,0,M)),c>0&&(e=LV(e,e.colspan-c,c)),a.left<n.left){if(l=l.type.createAndFill(e),!l)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else l=l.type.create(e,l.content)}if(a.top<n.top||a.bottom>n.bottom){const e={...l.attrs,rowspan:Math.min(a.bottom,n.bottom)-Math.max(a.top,n.top)};l=a.top<n.top?l.type.createAndFill(e):l.type.create(e,l.content)}s.push(l)}r.push(e.child(i).copy(NQ.from(s)))}const s=this.isColSelection()&&this.isRowSelection()?e:r;return new zQ(NQ.from(s),1,1)}replace(e,t=zQ.empty){const i=e.steps.length,n=this.ranges;for(let o=0;o<n.length;o++){const{$from:r,$to:s}=n[o],a=e.mapping.slice(i);e.replace(a.map(r.pos),a.map(s.pos),o?zQ.empty:t)}const o=cY.findFrom(e.doc.resolve(e.mapping.slice(i).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new zQ(NQ.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),i=pV.get(t),n=this.$anchorCell.start(-1),o=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n));for(let i=0;i<o.length;i++)e(t.nodeAt(o[i]),n+o[i])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const i=e+this.$anchorCell.nodeAfter.attrs.rowspan,n=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(i,n)==this.$headCell.node(-1).childCount}static colSelection(t,i=t){const n=t.node(-1),o=pV.get(n),r=t.start(-1),s=o.findCell(t.pos-r),a=o.findCell(i.pos-r),l=t.node(0);return s.top<=a.top?(s.top>0&&(t=l.resolve(r+o.map[s.left])),a.bottom<o.height&&(i=l.resolve(r+o.map[o.width*(o.height-1)+a.right-1]))):(a.top>0&&(i=l.resolve(r+o.map[a.left])),s.bottom<o.height&&(t=l.resolve(r+o.map[o.width*(o.height-1)+s.right-1]))),new e(t,i)}isRowSelection(){const e=this.$anchorCell.node(-1),t=pV.get(e),i=this.$anchorCell.start(-1),n=t.colCount(this.$anchorCell.pos-i),o=t.colCount(this.$headCell.pos-i);if(Math.min(n,o)>0)return!1;const r=n+this.$anchorCell.nodeAfter.attrs.colspan,s=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(r,s)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,i=t){const n=t.node(-1),o=pV.get(n),r=t.start(-1),s=o.findCell(t.pos-r),a=o.findCell(i.pos-r),l=t.node(0);return s.left<=a.left?(s.left>0&&(t=l.resolve(r+o.map[s.top*o.width])),a.right<o.width&&(i=l.resolve(r+o.map[o.width*(a.top+1)-1]))):(a.left>0&&(i=l.resolve(r+o.map[a.top*o.width])),s.right<o.width&&(t=l.resolve(r+o.map[o.width*(s.top+1)-1]))),new e(t,i)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,i){return new e(t.resolve(i.anchor),t.resolve(i.head))}static create(t,i,n=i){return new e(t.resolve(i),t.resolve(n))}getBookmark(){return new SV(this.$anchorCell.pos,this.$headCell.pos)}};vV.prototype.visible=!1,cY.jsonID("cell",vV);var SV=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){const t=e.resolve(this.anchor),i=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==i.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&i.index()<i.parent.childCount&&fV(t,i)?new vV(t,i):cY.near(i,1)}};function kV(e){if(!(e.selection instanceof vV))return null;const t=[];return e.selection.forEachCell(((e,i)=>{t.push(DP.node(i,i+e.nodeSize,{class:"selectedCell"}))})),jP.create(e.doc,t)}const EV=new SY("fix-tables");function CV(e,t,i,n){const o=e.childCount,r=t.childCount;e:for(let s=0,a=0;s<r;s++){const r=t.child(s);for(let t=a,n=Math.min(o,s+3);t<n;t++)if(e.child(t)==r){a=t+1,i+=r.nodeSize;continue e}n(r,i),a<o&&e.child(a).sameMarkup(r)?CV(e.child(a),r,i+1,n):r.nodesBetween(0,r.content.size,n,i+1),i+=r.nodeSize}}function QV(e,t){let i;const n=(t,n)=>{"table"==t.type.spec.tableRole&&(i=function(e,t,i,n){const o=pV.get(t);if(!o.problems)return n;n||(n=e.tr);const r=[];for(let e=0;e<o.height;e++)r.push(0);for(let e=0;e<o.problems.length;e++){const s=o.problems[e];if("collision"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;const o=e.attrs;for(let e=0;e<o.rowspan;e++)r[s.row+e]+=s.n;n.setNodeMarkup(n.mapping.map(i+1+s.pos),null,LV(o,o.colspan-s.n,s.n))}else if("missing"==s.type)r[s.row]+=s.n;else if("overlong_rowspan"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;n.setNodeMarkup(n.mapping.map(i+1+s.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-s.n})}else if("colwidth mismatch"==s.type){const e=t.nodeAt(s.pos);if(!e)continue;n.setNodeMarkup(n.mapping.map(i+1+s.pos),null,{...e.attrs,colwidth:s.colwidth})}else if("zero_sized"==s.type){const e=n.mapping.map(i);n.delete(e,e+t.nodeSize)}}let s,a;for(let e=0;e<r.length;e++)r[e]&&(null==s&&(s=e),a=e);for(let l=0,M=i+1;l<o.height;l++){const i=t.child(l),o=M+i.nodeSize,c=r[l];if(c>0){let t="cell";i.firstChild&&(t=i.firstChild.type.spec.tableRole);const r=[];for(let i=0;i<c;i++){const i=zV(e.schema)[t].createAndFill();i&&r.push(i)}const g=0!=l&&s!=l-1||a!=l?o-1:M+1;n.insert(n.mapping.map(g),r)}M=o}return n.setMeta(EV,{fixTables:!0})}(e,t,n,i))};return t?t.doc!=e.doc&&CV(t.doc,e.doc,0,n):e.doc.descendants(n),i}function UV(e){const t=e.selection,i=AV(e),n=i.node(-1),o=i.start(-1),r=pV.get(n);return{...t instanceof vV?r.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):r.findCell(i.pos-o),tableStart:o,map:r,table:n}}function YV(e,{map:t,tableStart:i,table:n},o){let r=o>0?-1:0;(function(e,t,i){const n=zV(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[i+o*e.width]).type!=n)return!1;return!0})(t,n,o+r)&&(r=0==o||o==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+o;if(o>0&&o<t.width&&t.map[a-1]==t.map[a]){const r=t.map[a],l=n.nodeAt(r);e.setNodeMarkup(e.mapping.map(i+r),null,wV(l.attrs,o-t.colCount(r))),s+=l.attrs.rowspan-1}else{const l=null==r?zV(n.type.schema).cell:n.nodeAt(t.map[a+r]).type,M=t.positionAt(s,o,n);e.insert(e.mapping.map(i+M),l.createAndFill())}}return e}function ZV(e,t){if(!xV(e))return!1;if(t){const i=UV(e);t(YV(e.tr,i,i.left))}return!0}function _V(e,t){if(!xV(e))return!1;if(t){const i=UV(e);t(YV(e.tr,i,i.right))}return!0}function PV(e,{map:t,table:i,tableStart:n},o){const r=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+o,l=t.map[a],M=i.nodeAt(l),c=M.attrs;if(o>0&&t.map[a-1]==l||o<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(r).map(n+l),null,LV(c,o-t.colCount(l)));else{const t=e.mapping.slice(r).map(n+l);e.delete(t,t+M.nodeSize)}s+=c.rowspan}}function VV(e,t){if(!xV(e))return!1;if(t){const i=UV(e),n=e.tr;if(0==i.left&&i.right==i.map.width)return!1;for(let e=i.right-1;PV(n,i,e),e!=i.left;e--){const e=i.tableStart?n.doc.nodeAt(i.tableStart-1):n.doc;if(!e)throw new RangeError("No table found");i.table=e,i.map=pV.get(e)}t(n)}return!0}function RV(e,{map:t,tableStart:i,table:n},o){let r=i;for(let e=0;e<o;e++)r+=n.child(e).nodeSize;const s=[];let a=o>0?-1:0;(function(e,t,i){var n;const o=zV(t.type.schema).header_cell;for(let r=0;r<e.width;r++)if((null===(n=t.nodeAt(e.map[r+i*e.width]))||void 0===n?void 0:n.type)!=o)return!1;return!0})(t,n,o+a)&&(a=0==o||o==t.height?null:0);for(let r=0,M=t.width*o;r<t.width;r++,M++)if(o>0&&o<t.height&&t.map[M]==t.map[M-t.width]){const o=t.map[M],s=n.nodeAt(o).attrs;e.setNodeMarkup(i+o,null,{...s,rowspan:s.rowspan+1}),r+=s.colspan-1}else{var l;const e=null==a?zV(n.type.schema).cell:null===(l=n.nodeAt(t.map[M+a*t.width]))||void 0===l?void 0:l.type,i=null==e?void 0:e.createAndFill();i&&s.push(i)}return e.insert(r,zV(n.type.schema).row.create(null,s)),e}function WV(e,t){if(!xV(e))return!1;if(t){const i=UV(e);t(RV(e.tr,i,i.top))}return!0}function BV(e,t){if(!xV(e))return!1;if(t){const i=UV(e);t(RV(e.tr,i,i.bottom))}return!0}function $V(e,{map:t,table:i,tableStart:n},o){let r=0;for(let e=0;e<o;e++)r+=i.child(e).nodeSize;const s=r+i.child(o).nodeSize,a=e.mapping.maps.length;e.delete(r+n,s+n);const l=new Set;for(let r=0,s=o*t.width;r<t.width;r++,s++){const M=t.map[s];if(!l.has(M))if(l.add(M),o>0&&M==t.map[s-t.width]){const t=i.nodeAt(M).attrs;e.setNodeMarkup(e.mapping.slice(a).map(M+n),null,{...t,rowspan:t.rowspan-1}),r+=t.colspan-1}else if(o<t.height&&M==t.map[s+t.width]){const s=i.nodeAt(M),l=s.attrs,c=s.type.create({...l,rowspan:s.attrs.rowspan-1},s.content),g=t.positionAt(o+1,r,i);e.insert(e.mapping.slice(a).map(n+g),c),r+=l.colspan-1}}}function FV(e,t){if(!xV(e))return!1;if(t){const i=UV(e),n=e.tr;if(0==i.top&&i.bottom==i.map.height)return!1;for(let e=i.bottom-1;$V(n,i,e),e!=i.top;e--){const e=i.tableStart?n.doc.nodeAt(i.tableStart-1):n.doc;if(!e)throw new RangeError("No table found");i.table=e,i.map=pV.get(i.table)}t(n)}return!0}function GV(e){const t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function HV(e,t){const i=e.selection;if(!(i instanceof vV)||i.$anchorCell.pos==i.$headCell.pos)return!1;const n=UV(e),{map:o}=n;if(function({width:e,height:t,map:i},n){let o=n.top*e+n.left,r=o,s=(n.bottom-1)*e+n.left,a=o+(n.right-n.left-1);for(let t=n.top;t<n.bottom;t++){if(n.left>0&&i[r]==i[r-1]||n.right<e&&i[a]==i[a+1])return!0;r+=e,a+=e}for(let r=n.left;r<n.right;r++){if(n.top>0&&i[o]==i[o-e]||n.bottom<t&&i[s]==i[s+e])return!0;o++,s++}return!1}(o,n))return!1;if(t){const i=e.tr,r={};let s,a,l=NQ.empty;for(let e=n.top;e<n.bottom;e++)for(let t=n.left;t<n.right;t++){const M=o.map[e*o.width+t],c=n.table.nodeAt(M);if(!r[M]&&c)if(r[M]=!0,null==s)s=M,a=c;else{GV(c)||(l=l.append(c.content));const e=i.mapping.map(M+n.tableStart);i.delete(e,e+c.nodeSize)}}if(null==s||null==a)return!0;if(i.setNodeMarkup(s+n.tableStart,null,{...wV(a.attrs,a.attrs.colspan,n.right-n.left-a.attrs.colspan),rowspan:n.bottom-n.top}),l.size>0){const e=s+1+a.content.size,t=GV(a)?s+1:e;i.replaceWith(t+n.tableStart,e+n.tableStart,l)}i.setSelection(new vV(i.doc.resolve(s+n.tableStart))),t(i)}return!0}function JV(e,t){const i=zV(e.schema);return(n=({node:e})=>i[e.type.spec.tableRole],(e,t)=>{const i=e.selection;let o,r;if(i instanceof vV){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;o=i.$anchorCell.nodeAfter,r=i.$anchorCell.pos}else{var s;if(o=function(e){for(let t=e.depth;t>0;t--){const i=e.node(t).type.spec.tableRole;if("cell"===i||"header_cell"===i)return e.node(t)}return null}(i.$from),!o)return!1;r=null===(s=TV(i.$from))||void 0===s?void 0:s.pos}if(null==o||null==r)return!1;if(1==o.attrs.colspan&&1==o.attrs.rowspan)return!1;if(t){let s=o.attrs;const a=[],l=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});const M=UV(e),c=e.tr;for(let e=0;e<M.right-M.left;e++)a.push(l?{...s,colwidth:l&&l[e]?[l[e]]:null}:s);let g;for(let e=M.top;e<M.bottom;e++){let t=M.map.positionAt(e,M.left,M.table);e==M.top&&(t+=o.nodeSize);for(let i=M.left,r=0;i<M.right;i++,r++)i==M.left&&e==M.top||c.insert(g=c.mapping.map(t+M.tableStart,1),n({node:o,row:e,col:i}).createAndFill(a[r]))}c.setNodeMarkup(r,n({node:o,row:M.top,col:M.left}),a[0]),i instanceof vV&&c.setSelection(new vV(c.doc.resolve(i.$anchorCell.pos),g?c.doc.resolve(g):void 0)),t(c)}return!0})(e,t);var n}function XV(e,t,i){const n=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<n.length;e++){const o=t.table.nodeAt(n[e]);if(o&&o.type!==i.header_cell)return!1}return!0}function qV(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,i){if(!xV(t))return!1;if(i){const n=zV(t.schema),o=UV(t),r=t.tr,s=o.map.cellsInRect("column"==e?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==e?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),a=s.map((e=>o.table.nodeAt(e)));for(let e=0;e<s.length;e++)a[e].type==n.header_cell&&r.setNodeMarkup(o.tableStart+s[e],n.cell,a[e].attrs);if(0===r.steps.length)for(let e=0;e<s.length;e++)r.setNodeMarkup(o.tableStart+s[e],n.header_cell,a[e].attrs);i(r)}return!0}}(e):function(t,i){if(!xV(t))return!1;if(i){const n=zV(t.schema),o=UV(t),r=t.tr,s=XV("row",o,n),a=XV("column",o,n),l=("column"===e?s:"row"===e&&a)?1:0,M="column"==e?{left:0,top:l,right:1,bottom:o.map.height}:"row"==e?{left:l,top:0,right:o.map.width,bottom:1}:o,c="column"==e?a?n.cell:n.header_cell:"row"==e?s?n.cell:n.header_cell:n.cell;o.map.cellsInRect(M).forEach((e=>{const t=e+o.tableStart,i=r.doc.nodeAt(t);i&&r.setNodeMarkup(t,c,i.attrs)})),i(r)}return!0}}const KV=qV("row",{useDeprecatedLogic:!0});function eR(e,t){const i=e.selection.$anchor;for(let n=i.depth;n>0;n--)if("table"==i.node(n).type.spec.tableRole)return t&&t(e.tr.delete(i.before(n),i.after(n)).scrollIntoView()),!0;return!1}function tR(e,t){const i=e.selection;if(!(i instanceof vV))return!1;if(t){const n=e.tr,o=zV(e.schema).cell.createAndFill().content;i.forEachCell(((e,t)=>{e.content.eq(o)||n.replace(n.mapping.map(t+1),n.mapping.map(t+e.nodeSize-1),new zQ(o,0,0))})),n.docChanged&&t(n)}return!0}function iR(e){if(0===e.size)return null;let{content:t,openStart:i,openEnd:n}=e;for(;1==t.childCount&&(i>0&&n>0||"table"==t.child(0).type.spec.tableRole);)i--,n--,t=t.child(0).content;const o=t.child(0),r=o.type.spec.tableRole,s=o.type.schema,a=[];if("row"==r)for(let e=0;e<t.childCount;e++){let o=t.child(e).content;const r=e?0:Math.max(0,i-1),l=e<t.childCount-1?0:Math.max(0,n-1);(r||l)&&(o=nR(zV(s).row,new zQ(o,r,l)).content),a.push(o)}else{if("cell"!=r&&"header_cell"!=r)return null;a.push(i||n?nR(zV(s).row,new zQ(t,i,n)).content:t)}return function(e,t){const i=[];for(let e=0;e<t.length;e++){const n=t[e];for(let t=n.childCount-1;t>=0;t--){const{rowspan:o,colspan:r}=n.child(t).attrs;for(let t=e;t<e+o;t++)i[t]=(i[t]||0)+r}}let n=0;for(let e=0;e<i.length;e++)n=Math.max(n,i[e]);for(let o=0;o<i.length;o++)if(o>=t.length&&t.push(NQ.empty),i[o]<n){const r=zV(e).cell.createAndFill(),s=[];for(let e=i[o];e<n;e++)s.push(r);t[o]=t[o].append(NQ.from(s))}return{height:t.length,width:n,rows:t}}(s,a)}function nR(e,t){const i=e.createAndFill();return new lY(i).replace(0,i.content.size,t).doc}function oR(e,t,i,n,o,r,s,a){if(0==s||s==t.height)return!1;let l=!1;for(let M=o;M<r;M++){const o=s*t.width+M,r=t.map[o];if(t.map[o-t.width]==r){l=!0;const o=i.nodeAt(r),{top:c,left:g}=t.findCell(r);e.setNodeMarkup(e.mapping.slice(a).map(r+n),null,{...o.attrs,rowspan:s-c}),e.insert(e.mapping.slice(a).map(t.positionAt(s,g,i)),o.type.createAndFill({...o.attrs,rowspan:c+o.attrs.rowspan-s})),M+=o.attrs.colspan-1}}return l}function rR(e,t,i,n,o,r,s,a){if(0==s||s==t.width)return!1;let l=!1;for(let M=o;M<r;M++){const o=M*t.width+s,r=t.map[o];if(t.map[o-1]==r){l=!0;const o=i.nodeAt(r),c=t.colCount(r),g=e.mapping.slice(a).map(r+n);e.setNodeMarkup(g,null,LV(o.attrs,s-c,o.attrs.colspan-(s-c))),e.insert(g+o.nodeSize,o.type.createAndFill(LV(o.attrs,0,s-c))),M+=o.attrs.rowspan-1}}return l}function sR(e,t,i,n,o){let r=i?e.doc.nodeAt(i-1):e.doc;if(!r)throw new Error("No table found");let s=pV.get(r);const{top:a,left:l}=n,M=l+o.width,c=a+o.height,g=e.tr;let u=0;function d(){if(r=i?g.doc.nodeAt(i-1):g.doc,!r)throw new Error("No table found");s=pV.get(r),u=g.mapping.maps.length}(function(e,t,i,n,o,r,s){const a=zV(e.doc.type.schema);let l,M;if(o>t.width)for(let r=0,c=0;r<t.height;r++){const g=i.child(r);c+=g.nodeSize;const u=[];let d;d=null==g.lastChild||g.lastChild.type==a.cell?l||(l=a.cell.createAndFill()):M||(M=a.header_cell.createAndFill());for(let e=t.width;e<o;e++)u.push(d);e.insert(e.mapping.slice(s).map(c-1+n),u)}if(r>t.height){const c=[];for(let e=0,n=(t.height-1)*t.width;e<Math.max(t.width,o);e++){const o=!(e>=t.width)&&i.nodeAt(t.map[n+e]).type==a.header_cell;c.push(o?M||(M=a.header_cell.createAndFill()):l||(l=a.cell.createAndFill()))}const g=a.row.create(null,NQ.from(c)),u=[];for(let e=t.height;e<r;e++)u.push(g);e.insert(e.mapping.slice(s).map(n+i.nodeSize-2),u)}return!(!l&&!M)})(g,s,r,i,M,c,u)&&d(),oR(g,s,r,i,l,M,a,u)&&d(),oR(g,s,r,i,l,M,c,u)&&d(),rR(g,s,r,i,a,c,l,u)&&d(),rR(g,s,r,i,a,c,M,u)&&d();for(let e=a;e<c;e++){const t=s.positionAt(e,l,r),n=s.positionAt(e,M,r);g.replace(g.mapping.slice(u).map(t+i),g.mapping.slice(u).map(n+i),new zQ(o.rows[e-a],0,0))}d(),g.setSelection(new vV(g.doc.resolve(i+s.positionAt(a,l,r)),g.doc.resolve(i+s.positionAt(c-1,M-1,r)))),t(g)}qV("column",{useDeprecatedLogic:!0}),qV("cell",{useDeprecatedLogic:!0});const aR=dV({ArrowLeft:MR("horiz",-1),ArrowRight:MR("horiz",1),ArrowUp:MR("vert",-1),ArrowDown:MR("vert",1),"Shift-ArrowLeft":cR("horiz",-1),"Shift-ArrowRight":cR("horiz",1),"Shift-ArrowUp":cR("vert",-1),"Shift-ArrowDown":cR("vert",1),Backspace:tR,"Mod-Backspace":tR,Delete:tR,"Mod-Delete":tR});function lR(e,t,i){return!i.eq(e.selection)&&(t&&t(e.tr.setSelection(i).scrollIntoView()),!0)}function MR(e,t){return(i,n,o)=>{if(!o)return!1;const r=i.selection;if(r instanceof vV)return lR(i,n,cY.near(r.$headCell,t));if("horiz"!=e&&!r.empty)return!1;const s=hR(o,e,t);if(null==s)return!1;if("horiz"==e)return lR(i,n,cY.near(i.doc.resolve(r.head+t),t));{const o=i.doc.resolve(s),r=bV(o,e,t);let a;return a=r?cY.near(r,1):t<0?cY.near(i.doc.resolve(o.before(-1)),-1):cY.near(i.doc.resolve(o.after(-1)),1),lR(i,n,a)}}}function cR(e,t){return(i,n,o)=>{if(!o)return!1;const r=i.selection;let s;if(r instanceof vV)s=r;else{const n=hR(o,e,t);if(null==n)return!1;s=new vV(i.doc.resolve(n))}const a=bV(s.$headCell,e,t);return!!a&&lR(i,n,new vV(s.$anchorCell,a))}}function gR(e,t){const i=TV(e.state.doc.resolve(t));return!!i&&(e.dispatch(e.state.tr.setSelection(new vV(i))),!0)}function uR(e,t,i){if(!xV(e.state))return!1;let n=iR(i);const o=e.state.selection;if(o instanceof vV){n||(n={width:1,height:1,rows:[NQ.from(nR(zV(e.state.schema).cell,i))]});const t=o.$anchorCell.node(-1),r=o.$anchorCell.start(-1),s=pV.get(t).rectBetween(o.$anchorCell.pos-r,o.$headCell.pos-r);return n=function({width:e,height:t,rows:i},n,o){if(e!=n){const t=[],o=[];for(let e=0;e<i.length;e++){const r=i[e],s=[];for(let i=t[e]||0,o=0;i<n;o++){let a=r.child(o%r.childCount);i+a.attrs.colspan>n&&(a=a.type.createChecked(LV(a.attrs,a.attrs.colspan,i+a.attrs.colspan-n),a.content)),s.push(a),i+=a.attrs.colspan;for(let i=1;i<a.attrs.rowspan;i++)t[e+i]=(t[e+i]||0)+a.attrs.colspan}o.push(NQ.from(s))}i=o,e=n}if(t!=o){const e=[];for(let n=0,r=0;n<o;n++,r++){const s=[],a=i[r%t];for(let e=0;e<a.childCount;e++){let t=a.child(e);n+t.attrs.rowspan>o&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,o-t.attrs.rowspan)},t.content)),s.push(t)}e.push(NQ.from(s))}i=e,t=o}return{width:e,height:t,rows:i}}(n,s.right-s.left,s.bottom-s.top),sR(e.state,e.dispatch,r,s,n),!0}if(n){const t=AV(e.state),i=t.start(-1);return sR(e.state,e.dispatch,i,pV.get(t.node(-1)).findCell(t.pos-i),n),!0}return!1}function dR(e,t){var i;if(0!=t.button)return;if(t.ctrlKey||t.metaKey)return;const n=NR(e,t.target);let o;if(t.shiftKey&&e.state.selection instanceof vV)r(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&n&&null!=(o=TV(e.state.selection.$anchor))&&(null===(i=pR(e,t))||void 0===i?void 0:i.pos)!=o.pos)r(o,t),t.preventDefault();else if(!n)return;function r(t,i){let n=pR(e,i);const o=null==mV.getState(e.state);if(!n||!fV(t,n)){if(!o)return;n=t}const r=new vV(t,n);if(o||!e.state.selection.eq(r)){const i=e.state.tr.setSelection(r);o&&i.setMeta(mV,t.pos),e.dispatch(i)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),null!=mV.getState(e.state)&&e.dispatch(e.state.tr.setMeta(mV,-1))}function a(i){const o=i,a=mV.getState(e.state);let l;if(null!=a)l=e.state.doc.resolve(a);else if(NR(e,o.target)!=n&&(l=pR(e,t),!l))return s();l&&r(l,o)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function hR(e,t,i){if(!(e.state.selection instanceof hY))return null;const{$head:n}=e.state.selection;for(let o=n.depth-1;o>=0;o--){const r=n.node(o);if((i<0?n.index(o):n.indexAfter(o))!=(i<0?0:r.childCount))return null;if("cell"==r.type.spec.tableRole||"header_cell"==r.type.spec.tableRole){const r=n.before(o),s="vert"==t?i>0?"down":"up":i>0?"right":"left";return e.endOfTextblock(s)?r:null}}return null}function NR(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function pR(e,t){const i=e.posAtCoords({left:t.clientX,top:t.clientY});if(!i)return null;let{inside:n,pos:o}=i;return n>=0&&TV(e.state.doc.resolve(n))||TV(e.state.doc.resolve(o))}var DR=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),yR(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,yR(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function yR(e,t,i,n,o,r){let s=0,a=!0,l=t.firstChild;const M=e.firstChild;if(M){for(let e=0,i=0;e<M.childCount;e++){const{colspan:c,colwidth:g}=M.child(e).attrs;for(let e=0;e<c;e++,i++){const M=o==i?r:g&&g[e],c=M?M+"px":"";if(s+=M||n,M||(a=!1),l)l.style.width!=c&&(l.style.width=c),l=l.nextSibling;else{const e=document.createElement("col");e.style.width=c,t.appendChild(e)}}}for(;l;){var c;const e=l.nextSibling;null===(c=l.parentNode)||void 0===c||c.removeChild(l),l=e}a?(i.style.width=s+"px",i.style.minWidth=""):(i.style.width="",i.style.minWidth=s+"px")}}const IR=new SY("tableColumnResizing");function jR({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:i=100,View:n=DR,lastColumnResizable:o=!0}={}){const r=new LY({key:IR,state:{init(e,t){var o;const s=null===(o=r.spec)||void 0===o||null===(o=o.props)||void 0===o?void 0:o.nodeViews,a=zV(t.schema).table.name;return n&&s&&(s[a]=(e,t)=>new n(e,i,t)),new zR(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>{const t=IR.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,i)=>{!function(e,t,i,n){if(!e.editable)return;const o=IR.getState(e.state);if(!o)return;if(!o.dragging){const r=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target);let s=-1;if(r){const{left:n,right:o}=r.getBoundingClientRect();t.clientX-n<=i?s=mR(e,t,"left",i):o-t.clientX<=i&&(s=mR(e,t,"right",i))}if(s!=o.activeHandle){if(!n&&-1!==s){const t=e.state.doc.resolve(s),i=t.node(-1),n=pV.get(i),o=t.start(-1);if(n.colCount(t.pos-o)+t.nodeAfter.attrs.colspan-1==n.width-1)return}xR(e,s)}}}(t,i,e,o)},mouseleave:e=>{!function(e){if(!e.editable)return;const t=IR.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&xR(e,-1)}(e)},mousedown:(e,n)=>{!function(e,t,i,n){var o;if(!e.editable)return!1;const r=null!==(o=e.dom.ownerDocument.defaultView)&&void 0!==o?o:window,s=IR.getState(e.state);if(!s||-1==s.activeHandle||s.dragging)return!1;const a=e.state.doc.nodeAt(s.activeHandle),l=function(e,t,{colspan:i,colwidth:n}){const o=n&&n[n.length-1];if(o)return o;const r=e.domAtPos(t);let s=r.node.childNodes[r.offset].offsetWidth,a=i;if(n)for(let e=0;e<i;e++)n[e]&&(s-=n[e],a--);return s/a}(e,s.activeHandle,a.attrs);function M(t){r.removeEventListener("mouseup",M),r.removeEventListener("mousemove",c);const n=IR.getState(e.state);(null==n?void 0:n.dragging)&&(!function(e,t,i){const n=e.state.doc.resolve(t),o=n.node(-1),r=pV.get(o),s=n.start(-1),a=r.colCount(n.pos-s)+n.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let e=0;e<r.height;e++){const t=e*r.width+a;if(e&&r.map[t]==r.map[t-r.width])continue;const n=r.map[t],M=o.nodeAt(n).attrs,c=1==M.colspan?0:a-r.colCount(n);if(M.colwidth&&M.colwidth[c]==i)continue;const g=M.colwidth?M.colwidth.slice():OR(M.colspan);g[c]=i,l.setNodeMarkup(s+n,null,{...M,colwidth:g})}l.docChanged&&e.dispatch(l)}(e,n.activeHandle,TR(n.dragging,t,i)),e.dispatch(e.state.tr.setMeta(IR,{setDragging:null})))}function c(t){if(!t.which)return M(t);const o=IR.getState(e.state);if(o&&o.dragging){const r=TR(o.dragging,t,i);AR(e,o.activeHandle,r,n)}}e.dispatch(e.state.tr.setMeta(IR,{setDragging:{startX:t.clientX,startWidth:l}})),AR(e,s.activeHandle,l,n),r.addEventListener("mouseup",M),r.addEventListener("mousemove",c),t.preventDefault()}(e,n,t,i)}},decorations:e=>{const t=IR.getState(e);if(t&&t.activeHandle>-1)return function(e,t){const i=[],n=e.doc.resolve(t),o=n.node(-1);if(!o)return jP.empty;const r=pV.get(o),s=n.start(-1),a=r.colCount(n.pos-s)+n.nodeAfter.attrs.colspan-1;for(let t=0;t<r.height;t++){const n=a+t*r.width;if(!(a!=r.width-1&&r.map[n]==r.map[n+1]||0!=t&&r.map[n]==r.map[n-r.width])){var l;const t=r.map[n],a=s+t+o.nodeAt(t).nodeSize-1,M=document.createElement("div");M.className="column-resize-handle",(null===(l=IR.getState(e))||void 0===l?void 0:l.dragging)&&i.push(DP.node(s+t,s+t+o.nodeAt(t).nodeSize,{class:"column-resize-dragging"})),i.push(DP.widget(a,M))}}return jP.create(e.doc,i)}(e,t.activeHandle)},nodeViews:{}}});return r}var zR=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){const i=this,n=t.getMeta(IR);if(n&&null!=n.setHandle)return new e(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new e(i.activeHandle,n.setDragging);if(i.activeHandle>-1&&t.docChanged){let n=t.mapping.map(i.activeHandle,-1);return OV(t.doc.resolve(n))||(n=-1),new e(n,i.dragging)}return i}};function mR(e,t,i,n){const o="right"==i?-n:n,r=e.posAtCoords({left:t.clientX+o,top:t.clientY});if(!r)return-1;const{pos:s}=r,a=TV(e.state.doc.resolve(s));if(!a)return-1;if("right"==i)return a.pos;const l=pV.get(a.node(-1)),M=a.start(-1),c=l.map.indexOf(a.pos-M);return c%l.width==0?-1:M+l.map[c-1]}function TR(e,t,i){const n=t.clientX-e.startX;return Math.max(i,e.startWidth+n)}function xR(e,t){e.dispatch(e.state.tr.setMeta(IR,{setHandle:t}))}function AR(e,t,i,n){const o=e.state.doc.resolve(t),r=o.node(-1),s=o.start(-1),a=pV.get(r).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let l=e.domAtPos(o.start(-1)).node;for(;l&&"TABLE"!=l.nodeName;)l=l.parentNode;l&&yR(r,l.firstChild,l,n,a,i)}function OR(e){return Array(e).fill(0)}function fR({allowTableNodeSelection:e=!1}={}){return new LY({key:mV,state:{init:()=>null,apply(e,t){const i=e.getMeta(mV);if(null!=i)return-1==i?null:i;if(null==t||!e.docChanged)return t;const{deleted:n,pos:o}=e.mapping.mapResult(t);return n?null:o}},props:{decorations:kV,handleDOMEvents:{mousedown:dR},createSelectionBetween:e=>null!=mV.getState(e.state)?e.state.selection:null,handleTripleClick:gR,handleKeyDown:aR,handlePaste:uR},appendTransaction:(t,i,n)=>function(e,t,i){const n=(t||e).selection,o=(t||e).doc;let r,s;if(n instanceof pY&&(s=n.node.type.spec.tableRole)){if("cell"==s||"header_cell"==s)r=vV.create(o,n.from);else if("row"==s){const e=o.resolve(n.from+1);r=vV.rowSelection(e,e)}else if(!i){const e=pV.get(n.node),t=n.from+1,i=t+e.map[e.width*e.height-1];r=vV.create(o,t+1,i)}}else n instanceof hY&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let i=e.pos,n=t.pos,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,i++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,n--);return i==n&&/row|table/.test(e.node(o).type.spec.tableRole)}(n)?r=hY.create(o,n.from):n instanceof hY&&function({$from:e,$to:t}){let i,n;for(let t=e.depth;t>0;t--){const n=e.node(t);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){i=n;break}}for(let e=t.depth;e>0;e--){const i=t.node(e);if("cell"===i.type.spec.tableRole||"header_cell"===i.type.spec.tableRole){n=i;break}}return i!==n&&0===t.parentOffset}(n)&&(r=hY.create(o,n.$from.start(),n.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(n,QV(n,i),e)})}const bR="allow-scripts allow-same-origin allow-presentation allow-popups",LR="strict-origin-when-cross-origin";function wR(e){let t;try{t=new URL(e.trim())}catch{return null}if("https:"!==t.protocol)return null;const i=t.hostname.replace(/^www\./,"");if("youtube.com"===i||"youtube-nocookie.com"===i||"youtu.be"===i){let e="";if("youtu.be"===i)e=t.pathname.slice(1).split("/")[0];else if("/watch"===t.pathname)e=t.searchParams.get("v")??"";else{const i=/^\/(embed|shorts)\/([\w-]+)/.exec(t.pathname);i&&(e=i[2])}if(/^[\w-]{6,20}$/.test(e))return{src:`https://www.youtube-nocookie.com/embed/${e}`,provider:"youtube"}}else if("vimeo.com"===i||"player.vimeo.com"===i){const e=/\/(?:video\/)?(\d{6,12})(?:$|[/?])/.exec(t.pathname);if(e)return{src:`https://player.vimeo.com/video/${e[1]}`,provider:"vimeo"}}else if("loom.com"===i){const e=/^\/(share|embed)\/([0-9a-f]{16,40})/.exec(t.pathname);if(e)return{src:`https://www.loom.com/embed/${e[2]}`,provider:"loom"}}return{src:t.href,provider:"generic"}}function vR(e){try{return"https:"===new URL(e.trim()).protocol}catch{return!1}}const SR=new Set(["td","th","table","p","h1","h2","h3","h4","h5","h6"]),kR=new Set(["position","top","right","bottom","left","inset","inset-block","inset-block-start","inset-block-end","inset-inline","inset-inline-start","inset-inline-end","z-index","content","behavior","-moz-binding","transform","transform-origin","transform-box","filter","backdrop-filter","perspective","perspective-origin","display","visibility","opacity","pointer-events","clip","clip-path","mask","mask-image","mask-repeat","mask-position","mask-size","animation","animation-name","transition","transition-property","will-change","cursor","float","clear","overflow","overflow-x","overflow-y","background","background-image","list-style-image","border-image","border-image-source"]),ER=new Set(["color","background-color","font-family","font-size","font-style","font-weight","text-align","text-decoration","text-decoration-line","vertical-align","margin-left","margin-inline-start","list-style-type","line-height","text-decoration-style","text-decoration-color","padding","padding-top","padding-right","padding-bottom","padding-left","width","border","border-top","border-right","border-bottom","border-left","border-radius","max-width","margin-right","margin","margin-top","margin-bottom"]);function CR(e){return!!/^(?:mso-)?[a-z]+(?:-[a-z]+)*$/.test(e)&&(!kR.has(e)&&!ER.has(e))}function QR(e){const t=e.trim();if(!t||t.length>128)return!1;if(/[^\x00-\x7f]/.test(t))return!1;if(/\b(?:url|expression|var|calc|attr|env|image-set)\b/i.test(t))return!1;if(/[\\<>{};@]/.test(t))return!1;if(/\/\*/.test(t))return!1;if(/\//.test(t))return!1;if(/!important/i.test(t))return!1;if(/[()]/.test(t)){if(1!==(t.match(/\(/g)??[]).length)return!1;const e=/(?:rgba?|hsla?)\(\s*[\d.]+%?(?:\s*,\s*[\d.]+%?){2,3}\s*\)/i.exec(t);if(!e||/[()]/.test(t.replace(e[0],"")))return!1}return!0}function UR(e){const t=[];for(const i of String(e??"").split(";")){const e=i.indexOf(":");if(-1===e)continue;const n=i.slice(0,e).trim().toLowerCase(),o=i.slice(e+1).trim();CR(n)&&QR(o)&&t.push(`${n}: ${o}`)}return t.join("; ")}const YR=new Set(["script","frame","frameset","object","embed","applet","form","input","textarea","select","button","meta","link","base","title","noscript","template","svg","math","canvas","audio","video","dialog","slot"]),ZR=new Set(["p","h1","h2","h3","h4","h5","h6","blockquote","ul","ol","li","br","hr","a","b","strong","i","em","u","s","strike","del","span","code","sub","sup","div","font","pre","figure","figcaption","img","iframe","table","thead","tbody","tfoot","tr","td","th","colgroup","col"]),_R={a:new Set(["href","title","target","rel","id","name","data-bookmark"]),table:new Set(["role","data-layout"]),ol:new Set(["start","type","data-list-style"]),ul:new Set(["data-task-list"]),figure:new Set(["data-align"]),li:new Set(["data-task-item","data-checked"]),span:new Set(["data-mention-trigger","data-mention-key","data-mention-label","data-merge-field","data-merge-label","data-math","data-math-display"]),pre:new Set(["data-language"]),img:new Set(["src","alt","title","width","height"]),td:new Set(["colspan","rowspan","data-colwidth"]),th:new Set(["colspan","rowspan","data-colwidth"]),col:new Set(["span","width"]),div:new Set(["data-embed-provider","data-width","data-align"]),iframe:new Set(["src","title","frameborder","allowfullscreen","allow","sandbox","referrerpolicy"])},PR=new Set(["style","align","class","id"]),VR=/^(?:nile-wysiwyg|ProseMirror)/;const RR=new Set(["color","background-color","font-family","font-size","font-style","font-weight","text-align","text-decoration","text-decoration-line","vertical-align","margin-left","margin-inline-start","list-style-type","line-height"]),WR=["http:","https:","mailto:","tel:","ftp:"];function BR(e,t=!1){const i=e.trim();if(""===i)return!1;if(/^(#|\/|\.\/|\.\.\/)/.test(i))return!0;const n=/^([a-z][a-z0-9+.-]*):/i.exec(i);if(!n)return!0;const o=`${n[1].toLowerCase()}:`;return!!WR.includes(o)||!(!t||"data:"!==o)&&/^data:image\/(png|gif|jpe?g|webp|avif|bmp);/i.test(i)}const $R={img:new Set(["width","height"]),figure:new Set(["width","margin-right"]),div:new Set(["width","max-width"])};function FR(e,t){const i=$R[t];return e.split(";").map((e=>e.trim())).filter((e=>{const t=e.slice(0,e.indexOf(":")).trim().toLowerCase();return!!(RR.has(t)||i&&i.has(t))&&!/url\s*\(|expression\s*\(/i.test(e)})).join("; ")}const GR=new Set(["table","td","th","p","h1","h2","h3","h4","h5","h6","div","li","blockquote","tr","tbody"]),HR=new Set(["color","background-color","font-family","font-size","font-weight","font-style","text-decoration","text-decoration-line","text-decoration-style","text-decoration-color"]),JR=new Set(["padding","padding-top","padding-right","padding-bottom","padding-left","width","vertical-align","border","border-top","border-right","border-bottom","border-left","border-radius"]),XR=/^border-(?:(?:top|right|bottom|left)-)?(?:width|style|color)$/,qR=new Set(["width","max-width","border","margin-left","margin-right"]),KR=new Set(["margin","margin-top","margin-bottom"]),eW=new Set(["solid","dashed","dotted","double","none"]),tW=new Set(["top","middle","bottom","baseline","sub","super","text-top","text-bottom"]),iW=/^-?(?:\d+\.?\d*|\.\d+)(?:px|%|em|rem|pt)$/;function nW(e){return!/[^\x00-\x7f]/.test(e)}function oW(e){return/[\\/(]|url|var|calc|expression/i.test(e)}function rW(e){return"0"===e||"auto"===e||iW.test(e)}function sW(e){if(!nW(e)||oW(e))return!1;const t=e.trim().split(/\s+/);return t.length>=1&&t.length<=4&&t.every(rW)}function aW(e){if(!nW(e))return!1;const t=e.trim();return!!/^[a-z]+$/i.test(t)||(!!/^#[0-9a-f]{3,8}$/i.test(t)||(!!/^rgba?\(\s*[\d.]+%?(?:\s*,\s*[\d.]+%?){2,3}\s*\)$/i.test(t)||/^hsla?\(\s*[\d.]+%?(?:\s*,\s*[\d.]+%?){2,3}\s*\)$/i.test(t)))}function lW(e){if(!nW(e)||oW(e))return!1;const t=e.trim();return!!/^\d+(?:\.\d+)?$/.test(t)||rW(t)}const MW=new Set(["left","center","right","justify","start","end"]),cW=new Set(["left","center","right","justify"]);function gW(e){if(!nW(e))return!1;if(/[\\/]|url|var|calc|expression/i.test(e))return!1;const t=e.trim().match(/rgba?\([^)]*\)|\S+/gi)??[];if(!t.length)return!1;let i=!1;for(const e of t)if(eW.has(e.toLowerCase()))i=!0;else if(!rW(e)&&!aW(e))return!1;return i}function uW(e){const t=e.trim().toLowerCase();return tW.has(t)||rW(t)}function dW(e,t){return"vertical-align"===e?uW(t):"border-radius"===e?sW(t):e.startsWith("border")?gW(t):sW(t)}function hW(e,t){return!(!nW(t)||/url|expression|var|calc/i.test(t))&&("color"===e?aW(t):"font-size"===e?rW(t):"font-weight"===e?/^(normal|bold|bolder|lighter|[1-9]00)$/i.test(t.trim()):!/[(){}<>;\\]/.test(t))}const NW=["color","font-family","font-size","font-weight"],pW=["color","font-family","font-size","font-weight","line-height"];function DW(e,t){if("td"===t||"th"===t){const t=e.style.backgroundColor;t&&(e.setAttribute("data-cell-bg",t),e.style.removeProperty("background-color"));const i=[];for(const t of NW){const n=e.style.getPropertyValue(t);n&&(i.push(`${t}: ${n}`),e.style.removeProperty(t))}i.length&&e.setAttribute("data-cell-text-style",i.join("; "));const n=e.style.textAlign;n&&(e.setAttribute("data-cell-align",n),e.style.removeProperty("text-align")),e.getAttribute("style")||e.removeAttribute("style")}else if("table"===t){const t=e.style.backgroundColor;t&&(e.setAttribute("data-table-bg",t),e.style.removeProperty("background-color"));const i=[];for(const t of pW){const n=e.style.getPropertyValue(t);n&&(i.push(`${t}: ${n}`),e.style.removeProperty(t))}i.length&&e.setAttribute("data-table-text-style",i.join("; "));const n=e.parentElement?.closest("td, th");"center"!==e.getAttribute("align")?.toLowerCase()&&"center"!==n?.getAttribute("align")?.toLowerCase()||e.setAttribute("data-table-align","center"),e.getAttribute("style")||e.removeAttribute("style")}}function yW(e){for(const t of Array.from(e.children))DW(t,t.tagName.toLowerCase()),yW(t)}function IW(e){const t=/width\s*:\s*([^;]+)/i.exec(e.getAttribute("style")??"")?.[1]?.trim(),i=(t||e.getAttribute("width")||"").trim();return i?/^\d+$/.test(i)?`${i}px`:iW.test(i)&&/(?:px|%)$/.test(i)?i:null:null}function jW(e){const t=[];for(const i of Array.from(e.children)){const e=i.tagName.toLowerCase();if("tr"===e)t.push(i);else if("thead"===e||"tbody"===e||"tfoot"===e)for(const e of Array.from(i.children))"tr"===e.tagName.toLowerCase()&&t.push(e)}return t}function zW(e){const t=function(e){const t=[];for(const i of Array.from(e.querySelectorAll(":scope > colgroup > col, :scope > col"))){const e=parseInt(i.getAttribute("span")??"1",10),n=Number.isFinite(e)&&e>0?e:1,o=IW(i);for(let e=0;e<n;e+=1)t.push(o)}return t}(e);if(t.some(Boolean))for(const i of jW(e)){const e=Array.from(i.children).filter((e=>/^t[dh]$/.test(e.tagName.toLowerCase())));e.some((e=>parseInt(e.getAttribute("colspan")??"1",10)>1))||e.forEach(((e,i)=>{const n=t[i];if(!n)return;if(/(?:^|;)\s*width\s*:/i.test(e.getAttribute("style")??"")||e.hasAttribute("width"))return;const o=e.getAttribute("style")??"";e.setAttribute("style",o?`${o}; width: ${n}`:`width: ${n}`)}))}}function mW(e){const t=(new DOMParser).parseFromString(`<body>${e}</body>`,"text/html");return yW(t.body),t.body.innerHTML}function TW(e){return e.replace(/<\/style/gi,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/@import[^;]*;?/gi,"").replace(/expression\s*\(/gi,"blocked(").replace(/(behavior|-moz-binding)(\s*):/gi,"blocked-prop$2:").replace(/url\(\s*(['"]?)([^)]*?)\1\s*\)/gi,((e,t,i)=>{const n=String(i).trim();return/^#/.test(n)||/^data:image\/(png|gif|jpe?g|webp|avif|bmp);/i.test(n)?e:"url(#)"})).trim()}const xW=new Set(["td","th","table","p","h1","h2","h3","h4","h5","h6"]);function AW(e){const t=[];for(const i of String(e??"").split(";")){const e=i.indexOf(":");if(-1===e)continue;const n=i.slice(0,e).trim().toLowerCase(),o=i.slice(e+1).trim();if(!o)continue;("line-height"===n?lW(o):pW.includes(n)&&hW(n,o))&&t.push(`${n}: ${o}`)}return t.join("; ")}function OW(e,t=!1,i){const n=e.tagName.toLowerCase();t&&"table"===n&&zW(e);const o=t&&GR.has(n)?function(e,t){const i="td"===t||"th"===t,n="table"===t,o=/^(?:p|h[1-6])$/.test(t),r=$R[t],s=[];for(const t of(e.getAttribute("style")??"").split(";")){const e=t.indexOf(":");if(-1===e)continue;const a=t.slice(0,e).trim().toLowerCase(),l=t.slice(e+1).trim();if(l&&!/url\s*\(|expression\s*\(/i.test(t))if("background-color"!==a)if("color"!==a&&"font-family"!==a&&"font-size"!==a&&"font-weight"!==a)if("text-align"===a&&i&&MW.has(l.toLowerCase()))s.push(`text-align: ${l.toLowerCase()}`);else if("line-height"===a&&n)lW(l)&&s.push(`line-height: ${l}`);else if("margin"===a&&n){if(sW(l)){const e=l.trim().split(/\s+/),[,t]=1===e.length?[e[0],e[0]]:[e[0],e[1]],i=e.length>=4?e[3]:t;s.push(`margin-left: ${i}`,`margin-right: ${t}`)}}else HR.has(a)||i&&XR.test(a)||(i&&JR.has(a)&&dW(a,l)||n&&qR.has(a)&&dW(a,l)||o&&KR.has(a)&&sW(l)||RR.has(a)||r&&r.has(a))&&s.push(`${a}: ${l}`);else(i||o||n)&&hW(a,l)&&s.push(`${a}: ${l}`);else(i||n)&&aW(l)&&s.push(`${a}: ${l}`)}if(i&&!s.some((e=>e.startsWith("border:")))){const t=e.style;for(const e of["top","right","bottom","left"]){const i=`border-${e}`;if(s.some((e=>e.startsWith(`${i}:`))))continue;const n=t?.getPropertyValue(i);n&&gW(n)&&s.push(`${i}: ${n}`)}}if(i||n){const t=e.getAttribute("bgcolor");t&&aW(t)&&!s.some((e=>e.startsWith("background-color")))&&s.push(`background-color: ${t}`);const n=e.getAttribute("width");if(n&&!s.some((e=>e.startsWith("width")))){const e=/^\d+$/.test(n)?`${n}px`:/^\d+%$/.test(n)?n:null;e&&s.push(`width: ${e}`)}const o=e.getAttribute("valign");i&&o&&uW(o)&&!s.some((e=>e.startsWith("vertical-align")))&&s.push(`vertical-align: ${o}`);const r=e.getAttribute("align");i&&r&&cW.has(r.toLowerCase())&&!s.some((e=>e.startsWith("text-align")))&&s.push(`text-align: ${r.toLowerCase()}`)}return s.join("; ")}(e,n):null,r=t&&xW.has(n)?function(e,t){if(!t)return"";const i=[];for(const n of(e.getAttribute("style")??"").split(";")){const e=n.indexOf(":");if(-1===e)continue;const o=n.slice(0,e).trim().toLowerCase(),r=n.slice(e+1).trim();t.has(o)&&QR(r)&&i.push(`${o}: ${r}`)}return i.join("; ")}(e,i?.get(n)):"",s=_R[n];for(const t of Array.from(e.attributes)){const i=t.name.toLowerCase();if((PR.has(i)||void 0!==s&&s.has(i))&&!i.startsWith("on"))if("style"===i){const i=FR(t.value,n);i?e.setAttribute("style",i):e.removeAttribute("style")}else if("class"===i){const i=t.value.split(/\s+/).filter((e=>e&&!VR.test(e))).join(" ");i?e.setAttribute("class",i):e.removeAttribute("class")}else"id"===i?VR.test(t.value)&&e.removeAttribute("id"):"href"===i||"src"===i?BR(t.value,"img"===n)||e.removeAttribute(t.name):"target"===i&&("_blank"===t.value?e.setAttribute("rel","noopener noreferrer"):e.removeAttribute("target"));else e.removeAttribute(t.name)}null!==o&&(o?e.setAttribute("style",o):e.removeAttribute("style")),r&&e.setAttribute("data-extra-style",r)}function fW(e,t=!1,i){for(const n of Array.from(e.children)){const e=n.tagName.toLowerCase();if(YR.has(e))n.remove();else{if(t){const e=n.getAttribute("style")??"";if(/display\s*:\s*none/i.test(e)||/mso-hide\s*:\s*all/i.test(e)){n.remove();continue}}if("iframe"===e){if(!vR(n.getAttribute("src")??"")){n.remove();continue}n.setAttribute("sandbox",bR),n.setAttribute("referrerpolicy",LR)}if("style"!==e)ZR.has(e)?(OW(n,t,i),fW(n,t,i)):(fW(n,t,i),n.replaceWith(...Array.from(n.childNodes)));else{n.textContent=TW(n.textContent??"");for(const e of Array.from(n.attributes))n.removeAttribute(e.name)}}}}const bW=new Set(["background-color","padding","padding-top","padding-right","padding-bottom","padding-left","border-radius","width","border","border-top","border-right","border-bottom","border-left","text-align"]),LW=new Set(["color","font-size","font-weight","font-family","font-style","text-decoration","text-decoration-line","line-height"]),wW=new Set(["td","th","div","p"]);function vW(e){const t=[];for(const i of e.split(";")){const e=i.indexOf(":");if(-1===e)continue;const n=i.slice(0,e).trim().toLowerCase(),o=i.slice(e+1).trim();n&&o&&t.push({name:n,value:o})}return t}function SW(e){const t=e.find((e=>"display"===e.name))?.value.toLowerCase();return("inline-block"===t||"block"===t)&&e.some((e=>"background-color"===e.name||e.name.startsWith("padding")))}function kW(e){const t=e.find((e=>"margin-left"===e.name))?.value.toLowerCase(),i=e.find((e=>"margin-right"===e.name))?.value.toLowerCase();if("auto"===t||"auto"===i)return!0;const n=e.find((e=>"margin"===e.name))?.value;if(!n)return!1;const o=n.trim().split(/\s+/),r=o.length>=2?o[1]:o[0];return"auto"===(o.length>=4?o[3]:r).toLowerCase()||"auto"===r.toLowerCase()}function EW(e,t){for(const i of Array.from(e.childNodes))if(i!==t){if(3!==i.nodeType)return!1;if(""!==(i.textContent??"").trim())return!1}return!0}const CW=new Set(["a","b","strong","i","em","u","s","strike","del","span","code","sub","sup","font","br","img","small","big","mark","abbr","q","cite","label","bdi","bdo","wbr","time","kbd","samp","var"]);function QW(e){return 3===e.nodeType||1===e.nodeType&&CW.has(e.tagName.toLowerCase())}function UW(e){const t=/text-align\s*:\s*([a-z-]+)/i.exec(e.getAttribute("style")??"")?.[1];if(t&&MW.has(t.toLowerCase()))return!0;const i=e.getAttribute("align");return!(!i||!cW.has(i.toLowerCase()))}function YW(e,t){const i=(e.getAttribute("style")??"").trim();e.setAttribute("style",i?`${i}; text-align: ${t}`:`text-align: ${t}`)}function ZW(e){const t=[];for(const i of jW(e))for(const e of Array.from(i.children))/^t[dh]$/.test(e.tagName.toLowerCase())&&t.push(e);return t}function _W(e,t){let i=e.parentElement;for(;i&&i!==t;){if("table"===i.tagName.toLowerCase())return!0;i=i.parentElement}return!1}function PW(e,t,i){!function(e,t){const i=e.ownerDocument;let n=[];const o=()=>{for(;n.length&&3===n[n.length-1].nodeType&&""===(n[n.length-1].textContent??"").trim();)n.pop();if(!n.length)return;const e=i.createElement("p");e.setAttribute("style",`text-align: ${t}`),n[0].before(e);for(const t of n)e.appendChild(t);n=[]};for(const t of Array.from(e.childNodes))if(QW(t)){if(3===t.nodeType&&""===(t.textContent??"").trim()&&!n.length)continue;n.push(t)}else o();o()}(e,t);for(const i of function(e){return Array.from(e.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li")).filter((t=>!_W(t,e)))}(e))UW(i)||YW(i,t);if(i)for(const i of Array.from(e.querySelectorAll("table")))_W(i,e)||i.getAttribute("align")||i.setAttribute("align",t)}function VW(e,t){const i=(new DOMParser).parseFromString(`<body>${e}</body>`,"text/html");return t?.emailFidelity&&(function(e){const t=e.ownerDocument;for(const n of Array.from(e.querySelectorAll("a[href]"))){const e=vW(n.getAttribute("style")??"");if(!SW(e))continue;const o=n.parentElement;if(!o)continue;if(!wW.has(o.tagName.toLowerCase()))continue;if(!EW(o,n))continue;const r=e.filter((e=>bW.has(e.name)));r.some((e=>"text-align"===e.name))||r.push({name:"text-align",value:"center"});const s=e.filter((e=>LW.has(e.name))).map((e=>`${e.name}: ${e.value}`)).join("; "),a=kW(e)||!!/text-align\s*:\s*center/i.test((i=o).getAttribute("style")??"")||"center"===i.getAttribute("align")?.toLowerCase(),l=t.createElement("table");l.setAttribute("role","presentation"),a&&l.setAttribute("align","center");const M=t.createElement("tbody"),c=t.createElement("tr"),g=t.createElement("td");g.setAttribute("style",r.map((e=>`${e.name}: ${e.value}`)).join("; ")),s?n.setAttribute("style",s):n.removeAttribute("style"),g.appendChild(n),c.appendChild(g),M.appendChild(c),l.appendChild(M);const u=o.tagName.toLowerCase();"p"===u||"div"===u?o.replaceWith(l):o.appendChild(l)}var i}(i.body),function(e){for(const t of Array.from(e.querySelectorAll("center, div"))){if("center"===t.tagName.toLowerCase()){PW(t,"center",!0);continue}const e=t.getAttribute("align")?.toLowerCase();if(e&&cW.has(e)){PW(t,e,!0);continue}const i=/text-align\s*:\s*([a-z-]+)/i.exec(t.getAttribute("style")??"")?.[1]?.toLowerCase();i&&MW.has(i)&&PW(t,i,!1)}for(const t of Array.from(e.querySelectorAll("td[align], th[align]"))){const e=t.getAttribute("align")?.toLowerCase();if(e&&cW.has(e))for(const e of Array.from(t.querySelectorAll("table")))if(e.closest("td, th")===t)for(const t of ZW(e))UW(t)||YW(t,"left")}for(const t of Array.from(e.querySelectorAll("table"))){const e=/text-align\s*:\s*([a-z-]+)/i.exec(t.getAttribute("style")??"")?.[1]?.toLowerCase();if(e&&MW.has(e))for(const i of ZW(t))UW(i)||YW(i,e)}for(const t of Array.from(e.querySelectorAll("tr[align]"))){const e=t.getAttribute("align")?.toLowerCase();if(e&&cW.has(e))for(const i of Array.from(t.children))/^t[dh]$/.test(i.tagName.toLowerCase())&&(UW(i)||YW(i,e))}}(i.body)),fW(i.body,t?.emailFidelity??!1,t?.allowedStyles),i.body.innerHTML}const RW=["left","center","right","justify"],WW=new Set(["left","center","right","justify","start","end"]);function BW(e){const t=e.style.textAlign||e.getAttribute("align")||"";return RW.includes(t)?t:null}const $W=/^(\d{1,3}(?:\.\d{1,2})?)%$/;function FW(e){if("number"==typeof e)return e>0?`${e}px`:null;if("string"==typeof e){const t=$W.exec(e.trim());if(t){const i=parseFloat(t[1]);if(i>0&&i<=100)return e.trim()}}return null}function GW(e,t){const i=e.trim();if(i.endsWith("%")){const e=$W.exec(i);if(e){const t=parseFloat(e[1]);if(t>0&&t<=100)return i}return null}const n=parseFloat(e),o=parseFloat(t??""),r=Number.isFinite(n)?Math.round(n):Number.isFinite(o)?Math.round(o):null;return r&&r>0?r:null}function HW(e){const t=e.style.marginInlineStart||e.style.marginLeft||"",i=parseFloat(t);return!Number.isFinite(i)||i<=0?0:Math.min(8,Math.round(i/40))}function JW(e){const t=e.style.lineHeight.trim();if(!t||"normal"===t)return null;const i=parseFloat(t);return!Number.isFinite(i)||i<=0?null:t.endsWith("%")?String(i/100):t}function XW(e){const t=e.style;if(t.margin)return`margin: ${t.margin}`;const i=[];return t.marginTop&&i.push(`margin-top: ${t.marginTop}`),t.marginBottom&&i.push(`margin-bottom: ${t.marginBottom}`),i.length?i.join("; "):null}function qW(e){const t=[];e.margin&&t.push(e.margin);const i=function(e){return e?`text-align: ${e}`:null}(e.align??null);if(i&&t.push(i),e.indent&&t.push(`margin-inline-start: ${40*e.indent}px`),e.lineHeight&&t.push(`line-height: ${e.lineHeight}`),e.extraStyle){const i=UR(e.extraStyle);i&&t.push(i)}return t.length?t.join("; "):null}const KW=/^(?:nile-wysiwyg|ProseMirror)/;function eB(e){if(!e)return null;const t=e.split(/\s+/).filter((e=>e&&!KW.test(e)));return t.length?t.join(" "):null}function tB(e){return e&&!KW.test(e)?e:null}const iB={htmlClass:{default:null},htmlId:{default:null}};function nB(e){return{htmlClass:eB(e.getAttribute("class")),htmlId:tB(e.getAttribute("id"))}}function oB(e){if(!("tag"in e)||"style"in e)return e;const t=e.getAttrs;return{...e,getAttrs(e){const i=t?t(e):null;return!1!==i&&{...i??{},...nB(e)}}}}function rB(e){return{...e,attrs:{...e.attrs??{},...iB},parseDOM:e.parseDOM?.map(oB),toDOM:(t=e.toDOM,t?(e,...i)=>{const n=t(e,...i),o=e.attrs.htmlClass,r=e.attrs.htmlId;if(!Array.isArray(n)||!o&&!r)return n;const[s,...a]=n;let l={},M=a;return a.length&&a[0]&&"object"==typeof a[0]&&!Array.isArray(a[0])&&(l={...a[0]},M=a.slice(1)),o&&(l.class=l.class?`${l.class} ${o}`:o),r&&(l.id=r),[s,l,...M]}:t)};var t}const sB=["paragraph","heading","blockquote","code_block","bullet_list","ordered_list","list_item","table","table_row","table_cell","table_header"],aB=["link","bold","italic","underline","strike","code","subscript","superscript"],lB={doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:{align:{default:null},indent:{default:0},lineHeight:{default:null},margin:{default:null},extraStyle:{default:null}},parseDOM:[{tag:"p",getAttrs:e=>({align:BW(e),indent:HW(e),lineHeight:JW(e),margin:XW(e),extraStyle:e.getAttribute("data-extra-style")})}],toDOM(e){const t=qW(e.attrs);return t?["p",{style:t},0]:["p",0]}},heading:{content:"inline*",group:"block",defining:!0,attrs:{level:{default:1},align:{default:null},indent:{default:0},lineHeight:{default:null},margin:{default:null},extraStyle:{default:null}},parseDOM:[1,2,3,4,5,6].map((e=>({tag:`h${e}`,getAttrs:t=>({level:e,align:BW(t),indent:HW(t),lineHeight:JW(t),margin:XW(t),extraStyle:t.getAttribute("data-extra-style")})}))),toDOM(e){const t=qW(e.attrs);return t?[`h${e.attrs.level}`,{style:t},0]:[`h${e.attrs.level}`,0]}},blockquote:{content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:()=>["blockquote",0]},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["hr"]},text:{group:"inline"},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]},code_block:{content:"text*",group:"block",marks:"",code:!0,defining:!0,attrs:{language:{default:null}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({language:e.getAttribute("data-language")})}],toDOM(e){const t={class:"nile-wysiwyg__code-block"};return e.attrs.language&&(t["data-language"]=e.attrs.language),["pre",t,["code",0]]}},image:{inline:!0,group:"inline",draggable:!0,attrs:{src:{},alt:{default:null},title:{default:null},width:{default:null}},parseDOM:[{tag:"img[src]",getAttrs:e=>({src:e.getAttribute("src"),alt:e.getAttribute("alt"),title:e.getAttribute("title"),width:GW(e.style.width,e.getAttribute("width")??"")})}],toDOM(e){const{src:t,alt:i,title:n,width:o}=e.attrs,r={src:t};i&&(r.alt=i),n&&(r.title=n);const s=FW(o);return s&&(r.style=`width: ${s}`),["img",r]}},figure:{group:"block",content:"inline*",defining:!0,isolating:!0,attrs:{src:{},alt:{default:null},title:{default:null},width:{default:null},align:{default:null}},parseDOM:[{tag:"figure",contentElement:"figcaption",getAttrs:e=>{const t=e.querySelector("img[src]");if(!t)return!1;const i=e.getAttribute("data-align");return{src:t.getAttribute("src"),alt:t.getAttribute("alt"),title:t.getAttribute("title"),width:GW(t.style.width||e.style.width),align:"left"===i||"center"===i||"right"===i?i:null}}}],toDOM(e){const{src:t,alt:i,title:n,width:o,align:r}=e.attrs,s={class:"nile-wysiwyg__figure"};r&&(s["data-align"]=r);const a=[],l=FW(o);l&&a.push(`width: ${l}`),"center"===r?a.push("margin-left: auto; margin-right: auto"):"right"===r&&a.push("margin-left: auto; margin-right: 0"),a.length&&(s.style=a.join("; "));const M={src:t,style:"width: 100%"};return i&&(M.alt=i),n&&(M.title=n),["figure",s,["img",M],["figcaption",{class:"nile-wysiwyg__figcaption"},0]]}},task_list:{content:"task_item+",group:"block",parseDOM:[{tag:"ul[data-task-list]",priority:51}],toDOM:()=>["ul",{"data-task-list":"true",class:"nile-wysiwyg__task-list"},0]},task_item:{content:"paragraph block*",defining:!0,attrs:{checked:{default:!1}},parseDOM:[{tag:"li[data-task-item]",priority:51,getAttrs:e=>({checked:"true"===e.getAttribute("data-checked")})}],toDOM:e=>["li",{"data-task-item":"true","data-checked":String(e.attrs.checked),class:"nile-wysiwyg__task-item"},0]},embed:{group:"block",atom:!0,selectable:!0,draggable:!0,attrs:{src:{},provider:{default:null},title:{default:null},width:{default:null},align:{default:null}},parseDOM:[{tag:"div[data-embed-provider]",getAttrs:e=>{const t=e.querySelector("iframe[src]");if(!t)return!1;const i=e.getAttribute("data-width")??/^(\d+)px$/.exec(e.style.width)?.[1],n=i?parseInt(i,10):NaN,o=e.getAttribute("data-align");return{src:t.getAttribute("src"),provider:e.getAttribute("data-embed-provider"),title:t.getAttribute("title"),width:Number.isFinite(n)&&n>0?n:null,align:"left"===o||"center"===o||"right"===o?o:null}}},{tag:"iframe[src]",getAttrs:e=>{const t=parseInt(e.getAttribute("width")??"",10);return{src:e.getAttribute("src"),title:e.getAttribute("title"),width:Number.isFinite(t)&&t>0?t:null}}}],toDOM(e){const{src:t,provider:i,title:n,width:o,align:r}=e.attrs,s={src:t,frameborder:"0",allowfullscreen:"true",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",sandbox:bR,referrerpolicy:LR};n&&(s.title=n);const a={class:"nile-wysiwyg__embed","data-embed-provider":i??"generic"},l=[];return o&&(a["data-width"]=String(o),l.push(`width: ${o}px`,"max-width: 100%")),r&&(a["data-align"]=r,"center"===r?l.push("margin-left: auto","margin-right: auto"):"right"===r&&l.push("margin-left: auto","margin-right: 0")),l.length&&(a.style=l.join("; ")),["div",a,["iframe",s]]}},styleBlock:{group:"block",atom:!0,selectable:!0,attrs:{css:{default:""}},parseDOM:[{tag:"style",getAttrs:e=>({css:e.textContent??""})}],toDOM:e=>["style",e.attrs.css]},bookmark:{inline:!0,group:"inline",atom:!0,selectable:!0,attrs:{id:{}},parseDOM:[{tag:"a[data-bookmark]",priority:60,getAttrs:e=>{const t=e.getAttribute("id")||e.getAttribute("name");return!!t&&{id:t}}},{tag:"a[id]",getAttrs:e=>!e.hasAttribute("href")&&{id:e.getAttribute("id")}},{tag:"a[name]",getAttrs:e=>!e.hasAttribute("href")&&{id:e.getAttribute("name")}}],toDOM:e=>["a",{id:e.attrs.id,"data-bookmark":"true"}]},mention:{inline:!0,group:"inline",atom:!0,selectable:!0,attrs:{trigger:{default:"@"},key:{},label:{}},parseDOM:[{tag:"span[data-mention-key]",getAttrs:e=>({trigger:e.getAttribute("data-mention-trigger")||"@",key:e.getAttribute("data-mention-key"),label:e.getAttribute("data-mention-label")||e.textContent?.slice(1)||""})}],toDOM(e){const{trigger:t,key:i,label:n}=e.attrs;return["span",{class:"nile-wysiwyg__mention","data-mention-trigger":t,"data-mention-key":i,"data-mention-label":n},`${t}${n}`]}},merge_field:{inline:!0,group:"inline",atom:!0,selectable:!0,attrs:{id:{},label:{default:null}},parseDOM:[{tag:"span[data-merge-field]",getAttrs:e=>{const t=e.getAttribute("data-merge-field");return!!t&&{id:t,label:e.getAttribute("data-merge-label")||e.textContent||null}}}],toDOM(e){const{id:t,label:i}=e.attrs;return["span",{class:"nile-wysiwyg__merge-field","data-merge-field":t,"data-merge-label":i??""},i||`{{${t}}}`]}},math:{inline:!0,group:"inline",atom:!0,selectable:!0,attrs:{latex:{},display:{default:"inline"}},parseDOM:[{tag:"span[data-math]",getAttrs:e=>({latex:e.getAttribute("data-math")||e.textContent||"",display:"block"===e.getAttribute("data-math-display")?"block":"inline"})}],toDOM(e){const{latex:t,display:i}=e.attrs;return["span",{class:"nile-wysiwyg__math","data-math":t,"data-math-display":i},t]}}};function MB(e){return{default:null,getFromDOM:t=>t.style.getPropertyValue(e)||null,setDOMAttr(t,i){t&&(i.style=`${i.style||""}${e}: ${t};`)}}}const cB=function(e){const t=e.cellAttributes||{},i={colspan:{default:1,validate:"number"},rowspan:{default:1,validate:"number"},colwidth:{default:null,validate:jV}};for(const e in t)i[e]={default:t[e].default,validate:t[e].validate};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:()=>["table",["tbody",0]]},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:()=>["tr",0]},table_cell:{content:e.cellContent,attrs:i,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:e=>yV(e,t)}],toDOM:e=>["td",IV(e,t),0]},table_header:{content:e.cellContent,attrs:i,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:e=>yV(e,t)}],toDOM:e=>["th",IV(e,t),0]}}}({tableGroup:"block",cellContent:"block+",cellAttributes:{background:{default:null,getFromDOM:e=>e.getAttribute("data-cell-bg")||e.style.backgroundColor||null,setDOMAttr(e,t){e&&(t.style=`${t.style||""}background-color: ${e};`)}},paddingTop:MB("padding-top"),paddingRight:MB("padding-right"),paddingBottom:MB("padding-bottom"),paddingLeft:MB("padding-left"),width:MB("width"),valign:MB("vertical-align"),borderTop:MB("border-top"),borderRight:MB("border-right"),borderBottom:MB("border-bottom"),borderLeft:MB("border-left"),borderRadius:MB("border-radius"),textStyle:{default:null,getFromDOM:e=>e.getAttribute("data-cell-text-style")||null,setDOMAttr(e,t){const i=AW(e);i&&(t.style=`${t.style||""}${i};`)}},textAlign:{default:null,getFromDOM:e=>e.getAttribute("data-cell-align")||null,setDOMAttr(e,t){const i=String(e??"").toLowerCase();WW.has(i)&&(t.style=`${t.style||""}text-align: ${i};`)}},extraStyle:{default:null,getFromDOM:e=>e.getAttribute("data-extra-style")||null,setDOMAttr(e,t){const i=UR(e);i&&(t.style=`${t.style||""}${i};`)}}}}),gB=cB.table;function uB(e){const{width:t,maxWidth:i,background:n,border:o,align:r,textStyle:s,extraStyle:a}=e,l=[];if(t&&l.push(`width: ${t}`),i&&l.push(`max-width: ${i}`),n&&l.push(`background-color: ${n}`),o&&l.push(`border: ${o}`),"center"===r&&l.push("margin-left: auto","margin-right: auto"),s){const e=AW(s);e&&l.push(e)}if(a){const e=UR(a);e&&l.push(e)}return l}const dB={...gB,attrs:{...gB.attrs??{},layout:{default:!1},width:{default:null},maxWidth:{default:null},background:{default:null},border:{default:null},align:{default:null},textStyle:{default:null},extraStyle:{default:null}},parseDOM:[{tag:"table",getAttrs:e=>({layout:"presentation"===e.getAttribute("role")||e.hasAttribute("data-layout"),width:e.style.width||null,maxWidth:e.style.maxWidth||null,extraStyle:e.getAttribute("data-extra-style")||null,textStyle:e.getAttribute("data-table-text-style")||null,background:e.getAttribute("data-table-bg")||null,border:e.style.border||null,align:"center"===e.getAttribute("data-table-align")||"auto"===e.style.marginLeft&&"auto"===e.style.marginRight?"center":null})}],toDOM(e){const t=uB(e.attrs),i=e.attrs.layout?{role:"presentation","data-layout":"true"}:{};return t.length&&(i.style=t.join("; ")),["table",i,["tbody",0]]}},hB={link:{attrs:{href:{},title:{default:null},target:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>({href:e.getAttribute("href"),title:e.getAttribute("title"),target:e.getAttribute("target")})}],toDOM(e){const{href:t,title:i,target:n}=e.attrs,o={href:t};return i&&(o.title=i),n&&(o.target=n,"_blank"===n&&(o.rel="noopener noreferrer")),["a",o,0]}},bold:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM:()=>["strong",0]},italic:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}],toDOM:()=>["em",0]},underline:{parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>e.includes("underline")&&null},{style:"text-decoration-line",getAttrs:e=>e.includes("underline")&&null}],toDOM:()=>["u",0]},strike:{parseDOM:[{tag:"s"},{tag:"strike"},{tag:"del"},{style:"text-decoration",getAttrs:e=>e.includes("line-through")&&null},{style:"text-decoration-line",getAttrs:e=>e.includes("line-through")&&null}],toDOM:()=>["s",0]},subscript:{excludes:"subscript superscript",parseDOM:[{tag:"sub"},{style:"vertical-align=sub"}],toDOM:()=>["sub",0]},superscript:{excludes:"subscript superscript",parseDOM:[{tag:"sup"},{style:"vertical-align=super"}],toDOM:()=>["sup",0]},code:{parseDOM:[{tag:"code"}],toDOM:()=>["code",{class:"nile-wysiwyg__inline-code"},0]},html_span:{attrs:{htmlClass:{default:null},htmlId:{default:null}},parseDOM:[{tag:"span",priority:5,getAttrs:e=>{const t=eB(e.getAttribute("class")),i=tB(e.getAttribute("id"));return!(!t&&!i)&&{htmlClass:t,htmlId:i}}}],toDOM(e){const t={};return e.attrs.htmlClass&&(t.class=e.attrs.htmlClass),e.attrs.htmlId&&(t.id=e.attrs.htmlId),["span",t,0]}},text_color:{attrs:{color:{}},parseDOM:[{style:"color",getAttrs:e=>!!e&&{color:e}}],toDOM:e=>["span",{style:`color: ${e.attrs.color}`},0]},bg_color:{attrs:{color:{}},parseDOM:[{style:"background-color",getAttrs:e=>!(!e||"transparent"===e)&&{color:e}}],toDOM:e=>["span",{style:`background-color: ${e.attrs.color}`},0]},font_family:{attrs:{family:{}},parseDOM:[{style:"font-family",getAttrs:e=>!!e&&{family:e}}],toDOM:e=>["span",{style:`font-family: ${e.attrs.family}`},0]},font_size:{attrs:{size:{}},parseDOM:[{style:"font-size",getAttrs:e=>!!e&&{size:e}}],toDOM:e=>["span",{style:`font-size: ${e.attrs.size}`},0]}},NB=["disc","circle","square"],pB={1:"decimal",a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman"},DB=Object.fromEntries(Object.entries(pB).map((([e,t])=>[t,e]))),yB="multilevel",IB={content:"list_item+",group:"block",attrs:{style:{default:null}},parseDOM:[{tag:"ul",getAttrs:e=>{const t=e.style.listStyleType;return{style:NB.includes(t)?t:null}}}],toDOM:e=>e.attrs.style?["ul",{style:`list-style-type: ${e.attrs.style}`},0]:["ul",0]},jB={content:"list_item+",group:"block",attrs:{order:{default:1},style:{default:null}},parseDOM:[{tag:"ol",getAttrs:e=>{const t=e.getAttribute("type")??"",i=e.style.listStyleType,n=e.getAttribute("data-list-style")===yB?yB:pB[t]??(Object.values(pB).includes(i)?i:null),o=Number(e.getAttribute("start"));return{order:Number.isFinite(o)&&o>0?o:1,style:n}}}],toDOM(e){const t={};return 1!==e.attrs.order&&(t.start=String(e.attrs.order)),e.attrs.style===yB?t["data-list-style"]=yB:e.attrs.style&&DB[e.attrs.style]&&(t.type=DB[e.attrs.style]),["ol",t,0]}};function zB(){let e=function(e,t,i){return e.append({ordered_list:nV(eV,{content:"list_item+",group:i}),bullet_list:nV(tV,{content:"list_item+",group:i}),list_item:nV(iV,{content:t})})}(cQ.from(lB),"paragraph block*","block").update("bullet_list",IB).update("ordered_list",jB).append(cB).update("table",dB);for(const t of sB){const i=e.get(t);i&&(e=e.update(t,rB(i)))}let t=cQ.from(hB);for(const e of aB){const i=t.get(e);i&&(t=t.update(e,rB(i)))}return new oU({nodes:e,marks:t})}const mB=zB(),TB=new RegExp("<(table|div|p|h1|h2|h3|h4|h5|h6|ul|ol|blockquote|section|body)(?:\\s[^>]*)?>[\\s\\S]*?</\\1\\s*>","i");const xB={paddingTop:"6px",paddingRight:"8px",paddingBottom:"6px",paddingLeft:"8px"},AB=["borderTop","borderRight","borderBottom","borderLeft"];function OB(e,t){return fB(e,null,t)}function fB(e,t,i){if(e.isLeaf)return e;const n=e.type.name;let o=e.attrs,r=null;"table"===n?o.layout||(r="data-table",o.width||(o={...o,width:"100%"})):"table_row"===n?r=t:"table_cell"!==n&&"table_header"!==n||"data-table"!==t?"data-cell"===t&&"margin"in o&&!o.margin&&(o={...o,margin:"margin-top: 0px; margin-bottom: 0px"}):(o=function(e,t,i){const n={...e};for(const[e,t]of Object.entries(xB))n[e]||(n[e]=t);n.valign||(n.valign="top");if(i.borderColor){const e=`1px solid ${i.borderColor}`;for(const t of AB)n[t]||(n[t]=e)}const o=n.colwidth;!n.width&&Array.isArray(o)&&o.length&&o.every((e=>e>0))&&(n.width=`${o.reduce(((e,t)=>e+t),0)}px`);if(t){!n.background&&i.headerBackground&&(n.background=i.headerBackground),n.textAlign||(n.textAlign="left");const e=n.textStyle??"";/font-weight/i.test(e)||(n.textStyle=e?`${e}; font-weight: 600`:"font-weight: 600")}return n}(o,"table_header"===n,i),r="data-cell");const s=[];return e.forEach((e=>s.push(fB(e,r,i)))),e.type.create(o,NQ.fromArray(s),e.marks)}const bB=new WeakMap,LB=new WeakMap;function wB(e){let t=bB.get(e);return t||(t=sU.fromSchema(e),bB.set(e,t)),t}function vB(e,t,i=!0,n){let o=i?VW(t,n):t;n?.emailFidelity&&(o=mW(o));const r=(new DOMParser).parseFromString(`<body>${o}</body>`,"text/html");return wB(e).parse(r.body)}function SB(e,t,i=!0,n){let o=i?VW(t,n):t;n?.emailFidelity&&(o=mW(o));const r=(new DOMParser).parseFromString(`<body>${o}</body>`,"text/html");return wB(e).parseSlice(r.body,{preserveWhitespace:!0})}function kB(e,t){const i=e.type.schema,n=t?OB(e,t):e,o=document.createElement("div");return o.appendChild(function(e){let t=LB.get(e);return t||(t=pU.fromSchema(e),LB.set(e,t)),t}(i).serializeFragment(n.content)),t&&function(e){for(const t of Array.from(e.querySelectorAll("table"))){t.hasAttribute("cellpadding")||t.setAttribute("cellpadding","0"),t.hasAttribute("cellspacing")||t.setAttribute("cellspacing","0");const e=t.getAttribute("style")??"",i=[];if(/(^|;)\s*border-collapse\s*:/i.test(e)||i.push("border-collapse: collapse"),"presentation"===t.getAttribute("role")||/(^|;)\s*table-layout\s*:/i.test(e)||i.push("table-layout: fixed"),i.length){const n=e.trim().replace(/;\s*$/,"");t.setAttribute("style",n?`${n}; ${i.join("; ")}`:i.join("; "))}}}(o),o.innerHTML}function EB(e){return e.textBetween(0,e.content.size,"\n"," ")}function CB(e){return e.toJSON()}function QB(e,t){return ZQ.fromJSON(e,t)}function UB(e){const t=EB(e);return{words:t.trim()?t.trim().split(/\s+/).length:0,characters:t.replace(/\n/g,"").length}}function YB(e){if(e.childCount>1)return!1;const t=e.firstChild;return!t||"paragraph"===t.type.name&&0===t.content.size}const ZB=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function _B(e,t,i=!1){for(let n=e;n;n="start"==t?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(i&&1!=n.childCount)return!1}return!1}function PB(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function VB(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let i=e.node(t);if(e.index(t)+1<i.childCount)return e.doc.resolve(e.after(t+1));if(i.type.spec.isolating)break}return null}const RB=(e,t)=>{let{$from:i,$to:n}=e.selection,o=i.blockRange(n),r=o&&PU(o);return null!=r&&(t&&t(e.tr.lift(o,r).scrollIntoView()),!0)};function WB(e){for(let t=0;t<e.edgeCount;t++){let{type:i}=e.edge(t);if(i.isTextblock&&!i.hasRequiredAttrs())return i}return null}const BB=(e,t)=>{let{$head:i,$anchor:n}=e.selection;if(!i.parent.type.spec.code||!i.sameParent(n))return!1;let o=i.node(-1),r=i.indexAfter(-1),s=WB(o.contentMatchAt(r));if(!s||!o.canReplaceWith(r,r,s))return!1;if(t){let n=i.after(),o=e.tr.replaceWith(n,n,s.createAndFill());o.setSelection(cY.near(o.doc.resolve(n),1)),t(o.scrollIntoView())}return!0};const $B=(e,t)=>{if(e.selection instanceof pY&&e.selection.node.isBlock){let{$from:i}=e.selection;return!(!i.parentOffset||!$U(e.doc,i.pos)||(t&&t(e.tr.split(i.pos).scrollIntoView()),0))}if(!e.selection.$from.depth)return!1;let i=e.tr;!e.selection.empty&&(e.selection instanceof hY||e.selection instanceof yY)&&i.deleteSelection();let n,o,{$from:r}=i.selection,s=i.steps.length,a=[],l=!1,M=!1;for(let e=r.depth;;e--){if(r.node(e).isBlock){l=r.end(e)==r.pos+(r.depth-e),M=r.start(e)==r.pos-(r.depth-e),o=WB(r.node(e-1).contentMatchAt(r.indexAfter(e-1)));let t=FB&&FB(r.parent,l,r);a.unshift(t||(l&&o?{type:o}:null)),n=e;break}if(1==e)return!1;a.unshift(null)}let c=r.pos,g=$U(i.doc,c,a.length,a);if(g||(a[0]=o?{type:o}:null,g=$U(i.doc,c,a.length,a)),!g)return!1;if(i.split(c,a.length,a),!l&&M&&r.node(n).type!=o){let e=i.mapping.slice(s),t=e.map(r.before(n)),a=i.doc.resolve(t);o&&r.node(n-1).canReplaceWith(a.index(),a.index()+1,o)&&i.setNodeMarkup(e.map(r.before(n)),o)}return t&&t(i.scrollIntoView()),!0};var FB;function GB(e,t,i,n){let o,r,s=t.nodeBefore,a=t.nodeAfter,l=s.type.spec.isolating||a.type.spec.isolating;if(!l&&function(e,t,i){let n=t.nodeBefore,o=t.nodeAfter,r=t.index();return!(!(n&&o&&n.type.compatibleContent(o.type))||(!n.content.size&&t.parent.canReplace(r-1,r)?(i&&i(e.tr.delete(t.pos-n.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(r,r+1)||!o.isTextblock&&!FU(e.doc,t.pos)||(i&&i(e.tr.join(t.pos).scrollIntoView()),0)))}(e,t,i))return!0;let M=!l&&t.parent.canReplace(t.index(),t.index()+1);if(M&&(o=(r=s.contentMatchAt(s.childCount)).findWrapping(a.type))&&r.matchType(o[0]||a.type).validEnd){if(i){let n=t.pos+a.nodeSize,r=NQ.empty;for(let e=o.length-1;e>=0;e--)r=NQ.from(o[e].create(null,r));r=NQ.from(s.copy(r));let l=e.tr.step(new UU(t.pos-1,n,t.pos,n,new zQ(r,1,0),o.length,!0)),M=l.doc.resolve(n+2*o.length);M.nodeAfter&&M.nodeAfter.type==s.type&&FU(l.doc,M.pos)&&l.join(M.pos),i(l.scrollIntoView())}return!0}let c=a.type.spec.isolating||n>0&&l?null:cY.findFrom(t,1),g=c&&c.$from.blockRange(c.$to),u=g&&PU(g);if(null!=u&&u>=t.depth)return i&&i(e.tr.lift(g,u).scrollIntoView()),!0;if(M&&_B(a,"start",!0)&&_B(s,"end")){let n=s,o=[];for(;o.push(n),!n.isTextblock;)n=n.lastChild;let r=a,l=1;for(;!r.isTextblock;r=r.firstChild)l++;if(n.canReplace(n.childCount,n.childCount,r.content)){if(i){let n=NQ.empty;for(let e=o.length-1;e>=0;e--)n=NQ.from(o[e].copy(n));i(e.tr.step(new UU(t.pos-o.length,t.pos+a.nodeSize,t.pos+l,t.pos+a.nodeSize-l,new zQ(n,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function HB(e){return function(t,i){let n=t.selection,o=e<0?n.$from:n.$to,r=o.depth;for(;o.node(r).isInline;){if(!r)return!1;r--}return!!o.node(r).isTextblock&&(i&&i(t.tr.setSelection(hY.create(t.doc,e<0?o.start(r):o.end(r)))),!0)}}const JB=HB(-1),XB=HB(1);function qB(e,t=null){return function(i,n){let o=!1;for(let n=0;n<i.selection.ranges.length&&!o;n++){let{$from:{pos:r},$to:{pos:s}}=i.selection.ranges[n];i.doc.nodesBetween(r,s,((n,r)=>{if(o)return!1;if(n.isTextblock&&!n.hasMarkup(e,t))if(n.type==e)o=!0;else{let t=i.doc.resolve(r),n=t.index();o=t.parent.canReplaceWith(n,n+1,e)}}))}if(!o)return!1;if(n){let o=i.tr;for(let n=0;n<i.selection.ranges.length;n++){let{$from:{pos:r},$to:{pos:s}}=i.selection.ranges[n];o.setBlockType(r,s,e,t)}n(o.scrollIntoView())}return!0}}function KB(e,t=null,i){let n=!1!==(i&&i.removeWhenPresent),o=!1!==(i&&i.enterInlineAtoms),r=!(i&&i.includeWhitespace);return function(i,s){let{empty:a,$cursor:l,ranges:M}=i.selection;if(a&&!l||!function(e,t,i,n){for(let o=0;o<t.length;o++){let{$from:r,$to:s}=t[o],a=0==r.depth&&e.inlineContent&&e.type.allowsMarkType(i);if(e.nodesBetween(r.pos,s.pos,((e,t)=>{if(a||!n&&e.isAtom&&e.isInline&&t>=r.pos&&t+e.nodeSize<=s.pos)return!1;a=e.inlineContent&&e.type.allowsMarkType(i)})),a)return!0}return!1}(i.doc,M,e,o))return!1;if(s)if(l)e.isInSet(i.storedMarks||l.marks())?s(i.tr.removeStoredMark(e)):s(i.tr.addStoredMark(e.create(t)));else{let a,l=i.tr;o||(M=function(e){let t=[];for(let i=0;i<e.length;i++){let{$from:n,$to:o}=e[i];n.doc.nodesBetween(n.pos,o.pos,((e,i)=>{if(e.isAtom&&e.content.size&&e.isInline&&i>=n.pos&&i+e.nodeSize<=o.pos)return i+1>n.pos&&t.push(new gY(n,n.doc.resolve(i+1))),n=n.doc.resolve(i+1+e.content.size),!1})),n.pos<o.pos&&t.push(new gY(n,o))}return t}(M)),a=n?!M.some((t=>i.doc.rangeHasMark(t.$from.pos,t.$to.pos,e))):!M.every((t=>{let i=!1;return l.doc.nodesBetween(t.$from.pos,t.$to.pos,((n,o,r)=>{if(i)return!1;i=!e.isInSet(n.marks)&&!!r&&r.type.allowsMarkType(e)&&!(n.isText&&/^\s*$/.test(n.textBetween(Math.max(0,t.$from.pos-o),Math.min(n.nodeSize,t.$to.pos-o))))})),!i}));for(let i=0;i<M.length;i++){let{$from:n,$to:o}=M[i];if(a){let i=n.pos,s=o.pos,a=n.nodeAfter,M=o.nodeBefore,c=r&&a&&a.isText?/^\s*/.exec(a.text)[0].length:0,g=r&&M&&M.isText?/\s*$/.exec(M.text)[0].length:0;i+c<s&&(i+=c,s-=g),l.addMark(i,s,e.create(t))}else l.removeMark(n.pos,o.pos,e)}s(l.scrollIntoView())}return!0}}function e$(...e){return function(t,i,n){for(let o=0;o<e.length;o++)if(e[o](t,i,n))return!0;return!1}}let t$=e$(ZB,((e,t,i)=>{let n=function(e,t){let{$cursor:i}=e.selection;return!i||(t?!t.endOfTextblock("backward",e):i.parentOffset>0)?null:i}(e,i);if(!n)return!1;let o=PB(n);if(!o){let i=n.blockRange(),o=i&&PU(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)}let r=o.nodeBefore;if(GB(e,o,t,-1))return!0;if(0==n.parent.content.size&&(_B(r,"end")||pY.isSelectable(r)))for(let i=n.depth;;i--){let s=HU(e.doc,n.before(i),n.after(i),zQ.empty);if(s&&s.slice.size<s.to-s.from){if(t){let i=e.tr.step(s);i.setSelection(_B(r,"end")?cY.findFrom(i.doc.resolve(i.mapping.map(o.pos,-1)),-1):pY.create(i.doc,o.pos-r.nodeSize)),t(i.scrollIntoView())}return!0}if(1==i||n.node(i-1).childCount>1)break}return!(!r.isAtom||o.depth!=n.depth-1)&&(t&&t(e.tr.delete(o.pos-r.nodeSize,o.pos).scrollIntoView()),!0)}),((e,t,i)=>{let{$head:n,empty:o}=e.selection,r=n;if(!o)return!1;if(n.parent.isTextblock){if(i?!i.endOfTextblock("backward",e):n.parentOffset>0)return!1;r=PB(n)}let s=r&&r.nodeBefore;return!(!s||!pY.isSelectable(s))&&(t&&t(e.tr.setSelection(pY.create(e.doc,r.pos-s.nodeSize)).scrollIntoView()),!0)})),i$=e$(ZB,((e,t,i)=>{let n=function(e,t){let{$cursor:i}=e.selection;return!i||(t?!t.endOfTextblock("forward",e):i.parentOffset<i.parent.content.size)?null:i}(e,i);if(!n)return!1;let o=VB(n);if(!o)return!1;let r=o.nodeAfter;if(GB(e,o,t,1))return!0;if(0==n.parent.content.size&&(_B(r,"start")||pY.isSelectable(r))){let i=HU(e.doc,n.before(),n.after(),zQ.empty);if(i&&i.slice.size<i.to-i.from){if(t){let n=e.tr.step(i);n.setSelection(_B(r,"start")?cY.findFrom(n.doc.resolve(n.mapping.map(o.pos)),1):pY.create(n.doc,n.mapping.map(o.pos))),t(n.scrollIntoView())}return!0}}return!(!r.isAtom||o.depth!=n.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+r.nodeSize).scrollIntoView()),!0)}),((e,t,i)=>{let{$head:n,empty:o}=e.selection,r=n;if(!o)return!1;if(n.parent.isTextblock){if(i?!i.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)return!1;r=VB(n)}let s=r&&r.nodeAfter;return!(!s||!pY.isSelectable(s))&&(t&&t(e.tr.setSelection(pY.create(e.doc,r.pos)).scrollIntoView()),!0)}));const n$={Enter:e$(((e,t)=>{let{$head:i,$anchor:n}=e.selection;return!(!i.parent.type.spec.code||!i.sameParent(n))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)}),((e,t)=>{let i=e.selection,{$from:n,$to:o}=i;if(i instanceof yY||n.parent.inlineContent||o.parent.inlineContent)return!1;let r=WB(o.parent.contentMatchAt(o.indexAfter()));if(!r||!r.isTextblock)return!1;if(t){let i=(!n.parentOffset&&o.index()<o.parent.childCount?n:o).pos,s=e.tr.insert(i,r.createAndFill());s.setSelection(hY.create(s.doc,i+1)),t(s.scrollIntoView())}return!0}),((e,t)=>{let{$cursor:i}=e.selection;if(!i||i.parent.content.size)return!1;if(i.depth>1&&i.after()!=i.end(-1)){let n=i.before();if($U(e.doc,n))return t&&t(e.tr.split(n).scrollIntoView()),!0}let n=i.blockRange(),o=n&&PU(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}),$B),"Mod-Enter":BB,Backspace:t$,"Mod-Backspace":t$,"Shift-Backspace":t$,Delete:i$,"Mod-Delete":i$,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new yY(e.doc))),!0)},o$={"Ctrl-h":n$.Backspace,"Alt-Backspace":n$["Mod-Backspace"],"Ctrl-d":n$.Delete,"Ctrl-Alt-Backspace":n$["Mod-Delete"],"Alt-Delete":n$["Mod-Delete"],"Alt-d":n$["Mod-Delete"],"Ctrl-a":JB,"Ctrl-e":XB};for(let e in n$)o$[e]=n$[e];const r$=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&"darwin"==os.platform())?o$:n$;var s$=200,a$=function(){};a$.prototype.append=function(e){return e.length?(e=a$.from(e),!this.length&&e||e.length<s$&&this.leafAppend(e)||this.length<s$&&e.leafPrepend(this)||this.appendInner(e)):this},a$.prototype.prepend=function(e){return e.length?a$.from(e).append(this):this},a$.prototype.appendInner=function(e){return new M$(this,e)},a$.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?a$.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},a$.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},a$.prototype.forEach=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=this.length),t<=i?this.forEachInner(e,t,i,0):this.forEachInvertedInner(e,t,i,0)},a$.prototype.map=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=this.length);var n=[];return this.forEach((function(t,i){return n.push(e(t,i))}),t,i),n},a$.from=function(e){return e instanceof a$?e:e&&e.length?new l$(e):a$.empty};var l$=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,i){return 0==e&&i==this.length?this:new t(this.values.slice(e,i))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,i,n){for(var o=t;o<i;o++)if(!1===e(this.values[o],n+o))return!1},t.prototype.forEachInvertedInner=function(e,t,i,n){for(var o=t-1;o>=i;o--)if(!1===e(this.values[o],n+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=s$)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=s$)return new t(e.flatten().concat(this.values))},i.length.get=function(){return this.values.length},i.depth.get=function(){return 0},Object.defineProperties(t.prototype,i),t}(a$);a$.empty=new l$([]);var M$=function(e){function t(t,i){e.call(this),this.left=t,this.right=i,this.length=t.length+i.length,this.depth=Math.max(t.depth,i.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,i,n){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(i,o),n))&&(!(i>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,i)-o,n+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,i,n){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(i,o)-o,n+o))&&(!(i<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),i,n))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var i=this.left.length;return t<=i?this.left.slice(e,t):e>=i?this.right.slice(e-i,t-i):this.left.slice(e,i).append(this.right.slice(0,t-i))},t.prototype.leafAppend=function(e){var i=this.right.leafAppend(e);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(e){var i=this.left.leafPrepend(e);if(i)return new t(i,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(a$);class c${constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let i,n,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(i=this.remapping(o,this.items.length),n=i.maps.length);let r,s,a=e.tr,l=[],M=[];return this.items.forEach(((e,t)=>{if(!e.step)return i||(i=this.remapping(o,t+1),n=i.maps.length),n--,void M.push(e);if(i){M.push(new g$(e.map));let t,o=e.step.map(i.slice(n));o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new g$(t,void 0,void 0,l.length+M.length))),n--,t&&i.appendMap(t,n)}else a.maybeStep(e.step);return e.selection?(r=i?e.selection.map(i.slice(n)):e.selection,s=new c$(this.items.slice(0,o).append(M.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:r}}addTransform(e,t,i,n){let o=[],r=this.eventCount,s=this.items,a=!n&&s.length?s.get(s.length-1):null;for(let i=0;i<e.steps.length;i++){let l,M=e.steps[i].invert(e.docs[i]),c=new g$(e.mapping.maps[i],M,t);(l=a&&a.merge(c))&&(c=l,i?o.pop():s=s.slice(0,s.length-1)),o.push(c),t&&(r++,t=void 0),n||(a=c)}let l=r-i.depth;return l>d$&&(s=function(e,t){let i;return e.forEach(((e,n)=>{if(e.selection&&0==t--)return i=n,!1})),e.slice(i)}(s,l),r-=l),new c$(s.append(o),r)}remapping(e,t){let i=new fU;return this.items.forEach(((t,n)=>{let o=null!=t.mirrorOffset&&n-t.mirrorOffset>=e?i.maps.length-t.mirrorOffset:void 0;i.appendMap(t.map,o)}),e,t),i}addMaps(e){return 0==this.eventCount?this:new c$(this.items.append(e.map((e=>new g$(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let i=[],n=Math.max(0,this.items.length-t),o=e.mapping,r=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),n);let a=t;this.items.forEach((t=>{let n=o.getMirror(--a);if(null==n)return;r=Math.min(r,n);let l=o.maps[n];if(t.step){let r=e.steps[n].invert(e.docs[n]),M=t.selection&&t.selection.map(o.slice(a+1,n));M&&s++,i.push(new g$(l,r,M))}else i.push(new g$(l))}),n);let l=[];for(let e=t;e<r;e++)l.push(new g$(o.maps[e]));let M=this.items.slice(0,n).append(l).append(i),c=new c$(M,s);return c.emptyItemCount()>500&&(c=c.compress(this.items.length-i.length)),c}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),i=t.maps.length,n=[],o=0;return this.items.forEach(((r,s)=>{if(s>=e)n.push(r),r.selection&&o++;else if(r.step){let e=r.step.map(t.slice(i)),s=e&&e.getMap();if(i--,s&&t.appendMap(s,i),e){let a=r.selection&&r.selection.map(t.slice(i));a&&o++;let l,M=new g$(s.invert(),e,a),c=n.length-1;(l=n.length&&n[c].merge(M))?n[c]=l:n.push(M)}}else r.map&&i--}),this.items.length,0),new c$(a$.from(n.reverse()),o)}}c$.empty=new c$(a$.empty,0);class g${constructor(e,t,i,n){this.map=e,this.step=t,this.selection=i,this.mirrorOffset=n}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new g$(t.getMap().invert(),t,this.selection)}}}class u${constructor(e,t,i,n,o){this.done=e,this.undone=t,this.prevRanges=i,this.prevTime=n,this.prevComposition=o}}const d$=20;function h$(e){let t=[];for(let i=e.length-1;i>=0&&0==t.length;i--)e[i].forEach(((e,i,n,o)=>t.push(n,o)));return t}function N$(e,t){if(!e)return null;let i=[];for(let n=0;n<e.length;n+=2){let o=t.map(e[n],1),r=t.map(e[n+1],-1);o<=r&&i.push(o,r)}return i}let p$=!1,D$=null;function y$(e){let t=e.plugins;if(D$!=t){p$=!1,D$=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){p$=!0;break}}return p$}const I$=new SY("history"),j$=new SY("closeHistory");function z$(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new LY({key:I$,state:{init:()=>new u$(c$.empty,c$.empty,null,0,-1),apply:(t,i,n)=>function(e,t,i,n){let o,r=i.getMeta(I$);if(r)return r.historyState;i.getMeta(j$)&&(e=new u$(e.done,e.undone,null,0,-1));let s=i.getMeta("appendedTransaction");if(0==i.steps.length)return e;if(s&&s.getMeta(I$))return s.getMeta(I$).redo?new u$(e.done.addTransform(i,void 0,n,y$(t)),e.undone,h$(i.mapping.maps),e.prevTime,e.prevComposition):new u$(e.done,e.undone.addTransform(i,void 0,n,y$(t)),null,e.prevTime,e.prevComposition);if(!1===i.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=i.getMeta("rebased"))?new u$(e.done.rebased(i,o),e.undone.rebased(i,o),N$(e.prevRanges,i.mapping),e.prevTime,e.prevComposition):new u$(e.done.addMaps(i.mapping.maps),e.undone.addMaps(i.mapping.maps),N$(e.prevRanges,i.mapping),e.prevTime,e.prevComposition);{let o=i.getMeta("composition"),r=0==e.prevTime||!s&&e.prevComposition!=o&&(e.prevTime<(i.time||0)-n.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let i=!1;return e.mapping.maps[0].forEach(((e,n)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&n>=t[o]&&(i=!0)})),i}(i,e.prevRanges)),a=s?N$(e.prevRanges,i.mapping):h$(i.mapping.maps);return new u$(e.done.addTransform(i,r?t.selection.getBookmark():void 0,n,y$(t)),c$.empty,a,i.time,null==o?e.prevComposition:o)}}(i,n,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let i=t.inputType,n="historyUndo"==i?T$:"historyRedo"==i?x$:null;return!(!n||!e.editable)&&(t.preventDefault(),n(e.state,e.dispatch))}}}})}function m$(e,t){return(i,n)=>{let o=I$.getState(i);if(!o||0==(e?o.undone:o.done).eventCount)return!1;if(n){let r=function(e,t,i){let n=y$(t),o=I$.get(t).spec.config,r=(i?e.undone:e.done).popEvent(t,n);if(!r)return null;let s=r.selection.resolve(r.transform.doc),a=(i?e.done:e.undone).addTransform(r.transform,t.selection.getBookmark(),o,n),l=new u$(i?a:r.remaining,i?r.remaining:a,null,0,-1);return r.transform.setSelection(s).setMeta(I$,{redo:i,historyState:l})}(o,i,e);r&&n(t?r.scrollIntoView():r)}return!0}}const T$=m$(!1,!0),x$=m$(!0,!0);function A$(e,t){const{parent:i,parentOffset:n}=e,o=i.childAfter(n);if(!o.node||!t.isInSet(o.node.marks))return null;let r=o.index,s=e.start()+o.offset;for(;r>0&&t.isInSet(i.child(r-1).marks);)r-=1,s-=i.child(r).nodeSize;let a=o.index+1,l=s+o.node.nodeSize;for(;a<i.childCount&&t.isInSet(i.child(a).marks);)l+=i.child(a).nodeSize,a+=1;return{from:s,to:l}}function O$(e,t){return(i,n)=>{const{empty:o,ranges:r,$from:s}=i.selection;if(o&&!(i.selection instanceof hY&&i.selection.$cursor))return!1;if(!o&&!i.selection.content().content.firstChild)return!1;if(n){const s=i.tr;if(o)s.removeStoredMark(e),t&&s.addStoredMark(e.create(t));else{for(const i of r)s.removeMark(i.$from.pos,i.$to.pos,e),t&&s.addMark(i.$from.pos,i.$to.pos,e.create(t));s.scrollIntoView()}n(s)}return!0}}function f$(e){const{$from:t}=e.selection,{bullet_list:i,ordered_list:n,task_list:o}=e.schema.nodes;for(let e=t.depth;e>0;e-=1){const r=t.node(e);if(r.type===i||r.type===n||r.type===o)return{node:r,pos:t.before(e),depth:e}}return null}function b$(e){const{schema:t}=e;return e===t.nodes.task_list?t.nodes.task_item:t.nodes.list_item}function L$(e,t){return(i,n,o)=>{const r=f$(i);if(r){if(r.node.type===e)return sV(b$(r.node.type))(i,n,o);if(n){const o=b$(r.node.type),s=[];r.node.forEach((e=>{s.push(e.type===o&&o!==t?t.create(null,e.content,e.marks):e)}));const a=e.create(r.node.attrs,s),l=i.tr,{from:M,to:c}=i.selection;l.replaceWith(r.pos,r.pos+r.node.nodeSize,a),l.setSelection(hY.create(l.doc,M,c)),n(l)}return!0}return oV(e)(i,n,o)}}function w$(e){return(t,i,n)=>function(e,t){const{$from:i}=e.selection;for(let e=i.depth;e>0;e-=1)if(i.node(e).type===t)return!0;return!1}(t,e)?RB(t,i):function(e,t=null){return function(i,n){let{$from:o,$to:r}=i.selection,s=o.blockRange(r),a=s&&VU(s,e,t);return!!a&&(n&&n(i.tr.wrap(s,a).scrollIntoView()),!0)}}(e)(t,i,n)}function v$(e){return(t,i)=>{const{from:n,to:o}=t.selection,r=[];if(t.doc.nodesBetween(n,o,((t,i)=>{if(t.isTextblock&&t.type.spec.attrs&&"indent"in t.type.spec.attrs){const n=t.attrs.indent??0,o=Math.max(0,Math.min(8,n+e));o!==n&&r.push({pos:i,node:t,next:o})}return!0})),0===r.length)return!1;if(i){const e=t.tr;for(const{pos:t,node:i,next:n}of r)e.setNodeMarkup(t,void 0,{...i.attrs,indent:n});i(e)}return!0}}function S$(e){const{image:t,figure:i}=e.schema.nodes,n=e.selection;if(n instanceof pY){if(n.node.type===t)return{node:n.node,pos:n.from,isFigure:!1};if(n.node.type===i)return{node:n.node,pos:n.from,isFigure:!0}}const{$from:o}=n;for(let e=o.depth;e>0;e-=1)if(o.node(e).type===i)return{node:o.node(e),pos:o.before(e),isFigure:!0};return null}function k$(e){const t=e.selection;return t instanceof pY&&t.node.type===e.schema.nodes.embed?{node:t.node,pos:t.from}:null}function E$(e,t,i={}){const{schema:n}=e,{nodes:o,marks:r}=n;switch(t){case"bold":return KB(r.bold);case"italic":return KB(r.italic);case"underline":return KB(r.underline);case"strike":return KB(r.strike);case"subscript":return KB(r.subscript);case"superscript":return KB(r.superscript);case"code":return KB(r.code);case"paragraph":return qB(o.paragraph);case"heading":return qB(o.heading,{level:i.level??1});case"blockquote":return w$(o.blockquote);case"align":return u=i.align??null,(e,t)=>{const{from:i,to:n}=e.selection,o=[];if(e.doc.nodesBetween(i,n,((e,t)=>(e.isTextblock&&e.type.spec.attrs&&"align"in e.type.spec.attrs&&o.push({pos:t,node:e}),!0))),0===o.length)return!1;if(t){const i=e.tr;for(const{pos:e,node:t}of o)i.setNodeMarkup(e,void 0,{...t.attrs,align:u});t(i)}return!0};case"lineHeight":return g=i.lineHeight??null,(e,t)=>{const{from:i,to:n}=e.selection,o=[];if(e.doc.nodesBetween(i,n,((e,t)=>(e.isTextblock&&e.type.spec.attrs&&"lineHeight"in e.type.spec.attrs&&o.push({pos:t,node:e}),!0))),0===o.length)return!1;if(t){const i=e.tr;for(const{pos:e,node:t}of o)i.setNodeMarkup(e,void 0,{...t.attrs,lineHeight:g});t(i)}return!0};case"bulletList":return L$(o.bullet_list,o.list_item);case"orderedList":return L$(o.ordered_list,o.list_item);case"taskList":return L$(o.task_list,o.task_item);case"indent":return e$(aV(o.task_item),aV(o.list_item),v$(1));case"outdent":return e$(sV(o.task_item),sV(o.list_item),v$(-1),RB);case"setListStyle":return c=i.style??null,(e,t)=>{const i=f$(e);if(!i)return!1;let n=i;const{$from:o}=e.selection,r=e.schema.nodes.ordered_list;for(let e=1;e<=o.depth;e+=1){const t=o.node(e);if(t.type===r&&(c===yB||t.attrs.style===yB)){n={node:t,pos:o.before(e),depth:e};break}}return t&&t(e.tr.setNodeMarkup(n.pos,void 0,{...n.node.attrs,style:c})),!0};case"setListStart":return function(e){return(t,i)=>{const n=f$(t);return!(!n||n.node.type!==t.schema.nodes.ordered_list||(i&&i(t.tr.setNodeMarkup(n.pos,void 0,{...n.node.attrs,order:Math.max(1,Math.round(e))})),0))}}(i.start??1);case"toggleImageCaption":return function(e){return(t,i)=>{const n=S$(t);if(!n)return!1;if(i){const o=t.tr;if(n.isFigure){const{src:t,alt:i,title:r,width:s}=n.node.attrs,a=e.nodes.image.create({src:t,alt:i,title:r,width:s});o.replaceWith(n.pos,n.pos+n.node.nodeSize,e.nodes.paragraph.create(null,a)),o.setSelection(pY.create(o.doc,n.pos+1))}else{const{src:i,alt:r,title:s,width:a}=n.node.attrs,l=r?e.text(r):null,M=e.nodes.figure.create({src:i,alt:r,title:s,width:a,align:null},l),c=t.doc.resolve(n.pos),g=c.parent,u=1===g.childCount&&"paragraph"===g.type.name,d=u?c.before():n.pos,h=u?c.after():n.pos+n.node.nodeSize;o.replaceWith(d,h,M),o.setSelection(hY.create(o.doc,d+1+M.content.size))}i(o.scrollIntoView())}return!0}}(n);case"setImageAlign":return function(e,t){return(i,n)=>{const o=S$(i);if(!o)return!1;const r="left"===t||"center"===t||"right"===t?t:null;if(n){const t=i.tr;if(o.isFigure)t.setNodeMarkup(o.pos,void 0,{...o.node.attrs,align:r}),i.selection instanceof pY&&t.setSelection(pY.create(t.doc,o.pos));else{const{src:n,alt:s,title:a,width:l}=o.node.attrs,M=e.nodes.figure.create({src:n,alt:s,title:a,width:l,align:r}),c=i.doc.resolve(o.pos),g=c.parent,u=1===g.childCount&&"paragraph"===g.type.name,d=u?c.before():o.pos,h=u?c.after():o.pos+o.node.nodeSize;t.replaceWith(d,h,M),t.setSelection(pY.create(t.doc,d))}n(t.scrollIntoView())}return!0}}(n,i.align??null);case"setImageWidth":return M=i.width??null,(e,t)=>{const i=S$(e);if(!i)return!1;if(t){const n=e.tr.setNodeMarkup(i.pos,void 0,{...i.node.attrs,width:M&&M>0?Math.round(M):null});e.selection instanceof pY&&n.setSelection(pY.create(n.doc,i.pos)),t(n)}return!0};case"deleteImage":return(e,t)=>{const i=S$(e);return!!i&&(t&&t(e.tr.delete(i.pos,i.pos+i.node.nodeSize).scrollIntoView()),!0)};case"setEmbedAlign":return function(e){return(t,i)=>{const n=k$(t);if(!n)return!1;const o="left"===e||"center"===e||"right"===e?e:null;if(i){const e=t.tr.setNodeMarkup(n.pos,void 0,{...n.node.attrs,align:o});e.setSelection(pY.create(e.doc,n.pos)),i(e.scrollIntoView())}return!0}}(i.align??null);case"deleteEmbed":return(e,t)=>{const i=k$(e);return!!i&&(t&&t(e.tr.delete(i.pos,i.pos+i.node.nodeSize).scrollIntoView()),!0)};case"link":return function(e,t){return(i,n)=>{if(!t.href)return!1;const{empty:o,$from:r,from:s,to:a}=i.selection;let l={from:s,to:a};if(o){const t=A$(r,e);if(!t)return!1;l=t}if(n){const o=i.tr;o.removeMark(l.from,l.to,e),o.addMark(l.from,l.to,e.create({href:t.href,title:t.title??null,target:t.target??null})),n(o.scrollIntoView())}return!0}}(r.link,i);case"unlink":return l=r.link,(e,t)=>{const{empty:i,$from:n,from:o,to:r}=e.selection;let s={from:o,to:r};if(i){const e=A$(n,l);if(!e)return!1;s=e}else if(!e.doc.rangeHasMark(o,r,l))return!1;return t&&t(e.tr.removeMark(s.from,s.to,l)),!0};case"insertBookmark":return function(e,t){return(i,n)=>{const o=t.id?.trim();if(!o)return!1;if(n){const t=e.nodes.bookmark.create({id:o});n(i.tr.replaceSelectionWith(t,!1).scrollIntoView())}return!0}}(n,i);case"textColor":return O$(r.text_color,i.color?{color:i.color}:null);case"bgColor":return O$(r.bg_color,i.color?{color:i.color}:null);case"fontFamily":return O$(r.font_family,i.family?{family:i.family}:null);case"fontSize":return O$(r.font_size,i.size?{size:i.size}:null);case"horizontalRule":return a=o.horizontal_rule,(e,t)=>(t&&t(e.tr.replaceSelectionWith(a.create()).scrollIntoView()),!0);case"clearFormatting":return(e,t)=>{const{from:i,to:n,empty:o}=e.selection;if(t){const r=e.tr;o||r.removeMark(i,n,null),r.setStoredMarks([]),e.doc.nodesBetween(i,n,((e,t)=>(e.isTextblock&&e.type.spec.attrs&&"align"in e.type.spec.attrs&&(e.attrs.align||e.attrs.lineHeight)&&r.setNodeMarkup(t,void 0,{...e.attrs,align:null,lineHeight:null}),!0))),t(r)}return!0};case"undo":return T$;case"redo":return x$;case"codeBlock":return function(e,t){return(i,n,o)=>{const{$from:r}=i.selection;return r.parent.type===e.nodes.code_block?qB(e.nodes.paragraph)(i,n,o):qB(e.nodes.code_block,{language:t})(i,n,o)}}(n,i.language??null);case"setCodeBlockLanguage":return function(e,t){return(i,n)=>{const{$from:o}=i.selection;for(let r=o.depth;r>0;r-=1)if(o.node(r).type===e.nodes.code_block)return n&&n(i.tr.setNodeMarkup(o.before(r),void 0,{language:t})),!0;return!1}}(n,i.language??null);case"insertEmbed":return function(e,t){return(i,n)=>{if(!t.src)return!1;const o=e.nodes.embed.create({src:t.src,provider:t.provider??null,title:t.title??null});return n&&n(i.tr.replaceSelectionWith(o).scrollIntoView()),!0}}(n,i);case"insertImage":return function(e,t){return(i,n)=>{if(!t.src)return!1;const o=t.src,r=t.alt??null,s=t.title??null,a=null!=t.caption?String(t.caption).trim():"",l=a?e.nodes.figure.create({src:o,alt:r,title:s,width:null,align:null},e.text(a)):e.nodes.image.create({src:o,alt:r,title:s});return n&&n(i.tr.replaceSelectionWith(l).scrollIntoView()),!0}}(n,i);case"updateImage":return function(e,t){return(i,n)=>{const o=S$(i);if(!o||!t.src)return!1;const r=t.src,s=t.alt??null,a=t.title??null,l=null!=t.caption?String(t.caption).trim():"",M=o.node.attrs.width??null,c=o.isFigure?o.node.attrs.align??null:null;if(n){const t=i.tr;if(l){const n=e.nodes.figure.create({src:r,alt:s,title:a,width:M,align:c},e.text(l));if(o.isFigure)t.replaceWith(o.pos,o.pos+o.node.nodeSize,n),t.setSelection(pY.create(t.doc,o.pos));else{const e=i.doc.resolve(o.pos),r=e.parent,s=1===r.childCount&&"paragraph"===r.type.name,a=s?e.before():o.pos,l=s?e.after():o.pos+o.node.nodeSize;t.replaceWith(a,l,n),t.setSelection(pY.create(t.doc,a))}}else if(o.isFigure){const i=e.nodes.image.create({src:r,alt:s,title:a,width:M});t.replaceWith(o.pos,o.pos+o.node.nodeSize,e.nodes.paragraph.create(null,i)),t.setSelection(pY.create(t.doc,o.pos+1))}else t.setNodeMarkup(o.pos,void 0,{src:r,alt:s,title:a,width:M}),i.selection instanceof pY&&t.setSelection(pY.create(t.doc,o.pos));n(t.scrollIntoView())}return!0}}(n,i);case"insertTable":return function(e,t){const i=Math.max(1,t.rows??3),n=Math.max(1,t.cols??3),o=t.withHeaderRow??!0;return(t,r)=>{const{table:s,table_row:a,table_cell:l,table_header:M}=e.nodes,c=[];for(let e=0;e<i;e+=1){const t=0===e&&o?M:l,i=[];for(let e=0;e<n;e+=1)i.push(t.createAndFill());c.push(a.create(null,i))}return r&&r(t.tr.replaceSelectionWith(s.create(null,c)).scrollIntoView()),!0}}(n,i);case"addRowBefore":return WV;case"addRowAfter":return BV;case"addColumnBefore":return ZV;case"addColumnAfter":return _V;case"deleteRow":return FV;case"deleteColumn":return VV;case"mergeCells":return HV;case"splitCell":return JV;case"toggleHeaderRow":return KV;case"toggleLayoutTable":return(e,t)=>{const{$from:i}=e.selection;for(let n=i.depth;n>0;n-=1){const o=i.node(n);if(o.type===e.schema.nodes.table)return t&&t(e.tr.setNodeMarkup(i.before(n),void 0,{...o.attrs,layout:!o.attrs.layout})),!0}return!1};case"deleteTable":return eR;case"changeCase":return s=i.textCase??"upper",(e,t)=>{const{from:i,to:n,empty:o}=e.selection;if(o)return!1;const r=[];if(e.doc.nodesBetween(i,n,((e,t)=>{if(!e.isText||!e.text)return;const o=Math.max(i,t),a=Math.min(n,t+e.nodeSize);if(o>=a)return;const l=e.text.slice(o-t,a-t),M=function(e,t){switch(t){case"upper":return e.toUpperCase();case"lower":return e.toLowerCase();case"title":return e.toLowerCase().replace(/(^|\s)(\p{L})/gu,((e,t,i)=>t+i.toUpperCase()));case"sentence":return e.toLowerCase().replace(/(^|[.!?]\s+)(\p{L})/gu,((e,t,i)=>t+i.toUpperCase()))}}(l,s);M!==l&&r.push({from:o,to:a,text:M,marks:e.marks})})),0===r.length)return!1;if(t){const i=e.tr;for(const t of r.reverse())i.replaceWith(t.from,t.to,e.schema.text(t.text,t.marks));t(i.scrollIntoView())}return!0};case"insertMergeField":return function(e,t){return(i,n)=>{const o=e.nodes.merge_field;if(!o||!t.id)return!1;if(n){const e=o.create({id:t.id,label:t.label??null});n(i.tr.replaceSelectionWith(e).scrollIntoView())}return!0}}(n,i);case"insertMath":return function(e,t){return(i,n)=>{const o=e.nodes.math,r=(t.latex??"").trim();if(!o||!r)return!1;if(n){const e=o.create({latex:r,display:t.mathDisplay??"inline"});n(i.tr.replaceSelectionWith(e).scrollIntoView())}return!0}}(n,i);default:return null}var s,a,l,M,c,g,u}function C$(e){let t="";return e.forEach((e=>{e.isText?t+=function(e,t){const i=e=>t.some((t=>t.type.name===e));let n;if(i("code")){const t=e.includes("`")?"``":"`";n=`${t}${e}${t}`}else n=function(e){return e.replace(/([\\`*_[\]<>])/g,"\\$1")}(e);i("subscript")&&(n=`<sub>${n}</sub>`),i("superscript")&&(n=`<sup>${n}</sup>`),i("underline")&&(n=`<u>${n}</u>`),i("strike")&&(n=`~~${n}~~`),i("italic")&&(n=`*${n}*`),i("bold")&&(n=`**${n}**`);const o=t.find((e=>"link"===e.type.name));return o&&(n=`[${n}](${o.attrs.href})`),n}(e.text??"",e.marks):"hard_break"===e.type.name?t+=" \n":"image"===e.type.name?t+=``:"mention"===e.type.name&&(t+=`${e.attrs.trigger}${e.attrs.label}`)})),t}function Q$(e){const t=[];return e.forEach((e=>t.push(P$(e)))),t.join("\n\n")}function U$(e,t,i){const n=i+" ".repeat(t.length),o=[];e.forEach((e=>{const t=e.type.name;"bullet_list"===t?o.push(Y$(e,n,null)):"ordered_list"===t?o.push(Y$(e,n,e.attrs.order??1)):"task_list"===t?o.push(Z$(e,n)):o.push(P$(e).split("\n").map((e=>n+e)).join("\n"))}));return i+t+o.join("\n").slice(n.length)}function Y$(e,t,i){const n=[];let o=i??1;return e.forEach((e=>{n.push(U$(e,null===i?"- ":`${o}. `,t)),o+=1})),n.join("\n")}function Z$(e,t){const i=[];return e.forEach((e=>{const n=e.attrs.checked?"[x] ":"[ ] ";i.push(U$(e,`- ${n}`,t))})),i.join("\n")}function _$(e){const t=[];if(e.forEach((e=>{const i=[];e.forEach((e=>{const t=e.firstChild?C$(e.firstChild):"";i.push(t.replace(/\n/g," ").replace(/\|/g,"\\|").trim())})),t.push(i)})),0===t.length)return"";const i=Math.max(...t.map((e=>e.length))),n=e=>`| ${(e=>{const t=e.slice();for(;t.length<i;)t.push("");return t})(e).join(" | ")} |`;return[n(t[0]),n(new Array(i).fill("---")),...t.slice(1).map(n)].join("\n")}function P$(e){switch(e.type.name){case"paragraph":return C$(e);case"heading":return`${"#".repeat(e.attrs.level)} ${C$(e)}`;case"blockquote":return Q$(e).split("\n").map((e=>e?`> ${e}`:">")).join("\n");case"code_block":return`\`\`\`${e.attrs.language??""}\n${e.textContent}\n\`\`\``;case"horizontal_rule":return"---";case"bullet_list":return Y$(e,"",null);case"ordered_list":return Y$(e,"",e.attrs.order??1);case"task_list":return Z$(e,"");case"table":return _$(e);case"embed":return e.attrs.src;default:return e.isTextblock?C$(e):Q$(e)}}function V$(e){const t=Q$(e).replace(/\n{3,}/g,"\n\n").trim();return t?`${t}\n`:""}const R$=/^(\s*)([-*+])\s+(.*)$/,W$=/^(\s*)(\d+)[.)]\s+(.*)$/,B$=/^\[([ xX])\]\s+(.*)$/,$$=/^\s{0,3}(```+|~~~+)\s*(\S*)\s*$/,F$=/^\s{0,3}(#{1,6})\s+(.*)$/,G$=/^\s{0,3}(?:-{3,}|\*{3,}|_{3,})\s*$/,H$=/^\s{0,3}>\s?/,J$=/^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s*$/;function X$(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function q$(e){let t=e;return t=t.replace(/!\[([^\]]*)\]\(([^()\s]+)(?:\s+[^)]*)?\)/g,((e,t,i)=>`<img src="${i}" alt="${t}">`)),t=t.replace(/\[([^\]]+)\]\(([^()\s]+)(?:\s+[^)]*)?\)/g,((e,t,i)=>`<a href="${i}">${t}</a>`)),t=t.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),t=t.replace(/__([^_]+)__/g,"<strong>$1</strong>"),t=t.replace(/(^|[^*\w])\*([^*\s](?:[^*]*[^*\s])?)\*/g,"$1<em>$2</em>"),t=t.replace(/(^|[^_\w])_([^_\s](?:[^_]*[^_\s])?)_(?![\w])/g,"$1<em>$2</em>"),t=t.replace(/~~([^~]+)~~/g,"<s>$1</s>"),t=t.replace(/ *\n/g,"<br>"),t}function K$(e){const t=function(e){return e.replace(/\\([\\`*_[\]()#+\-.!~|])/g,((e,t)=>`\0${t.charCodeAt(0)}\0`))}(e),i=/(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;let n=t,o="";for(;;){const e=i.exec(n);if(!e){o+=q$(X$(n));break}o+=q$(X$(n.slice(0,e.index))),o+=`<code>${X$(e[2])}</code>`,n=n.slice(e.index+e[0].length)}return function(e){return e.replace(/\u0000(\d+)\u0000/g,((e,t)=>String.fromCharCode(Number(t))))}(o)}function eF(e){return F$.test(e)||$$.test(e)||G$.test(e)||H$.test(e)||R$.test(e)||W$.test(e)}function tF(e){const t=R$.exec(e[0])??W$.exec(e[0]),i=t[1].length,n=W$.test(e[0])&&!R$.test(e[0]),o=n?Number(t[2]):1,r=[];let s=null;for(let t=0;t<e.length;t+=1){const o=e[t],a=n?W$.exec(o):R$.exec(o),l=n?R$.exec(o):W$.exec(o);if(a&&a[1].length<=i){let e=a[3],t=null;if(!n){const i=B$.exec(e);i&&(t="x"===i[1].toLowerCase(),e=i[2])}r.push({lines:[e],checked:t})}else{if(l&&l[1].length<=i){s=e.slice(t);break}r.length>0&&r[r.length-1].lines.push(o.replace(new RegExp(`^\\s{0,${i+2}}`),""))}}const a=[];for(const e of r){const t=null!==e.checked,i=a[a.length-1];i&&i.task===t?i.items.push(e):a.push({task:t,items:[e]})}const l=a.map((e=>{const t=e.items.map((t=>{const i=nF(t.lines);return e.task?`<li data-task-item="true" data-checked="${!0===t.checked}">${i}</li>`:`<li>${i}</li>`})).join("");if(e.task)return`<ul data-task-list="true">${t}</ul>`;if(n){return`<ol${1!==o?` start="${o}"`:""}>${t}</ol>`}return`<ul>${t}</ul>`})).join("");return s?l+tF(s):l}function iF(e){const t=e=>e.trim().replace(/^\|/,"").replace(/\|$/,"").split(/(?<!\\)\|/).map((e=>e.trim().replace(/\\\|/g,"|"))),i=t(e[0]),n=e.slice(2).map(t),o=(e,t)=>`<tr>${i.map(((i,n)=>`<${t}><p>${K$(e[n]??"")}</p></${t}>`)).join("")}</tr>`;return`<table>${o(i,"th")}${n.map((e=>o(e,"td"))).join("")}</table>`}function nF(e){const t=[];let i=0;for(;i<e.length;){const n=e[i];if(!n.trim()){i+=1;continue}const o=$$.exec(n);if(o){const n=new RegExp(`^\\s{0,3}${o[1]}\\s*$`),r=[];for(i+=1;i<e.length&&!n.test(e[i]);)r.push(e[i]),i+=1;i+=1;const s=o[2]?` data-language="${X$(o[2])}"`:"";t.push(`<pre${s}><code>${X$(r.join("\n"))}</code></pre>`);continue}const r=F$.exec(n);if(r){const e=r[1].length,n=r[2].replace(/\s+#+\s*$/,"");t.push(`<h${e}>${K$(n)}</h${e}>`),i+=1;continue}if(G$.test(n)){t.push("<hr>"),i+=1;continue}if(H$.test(n)){const n=[];for(;i<e.length&&(H$.test(e[i])||n.length>0&&""!==e[i].trim()&&!eF(e[i]));)n.push(e[i].replace(H$,"")),i+=1;t.push(`<blockquote>${nF(n)}</blockquote>`);continue}if(R$.test(n)||W$.test(n)){const n=[];for(;i<e.length;){const t=e[i];if(""===t.trim()){const t=e[i+1];if(void 0!==t&&(R$.test(t)||W$.test(t)||/^\s{2,}\S/.test(t))){i+=1;continue}break}if(!R$.test(t)&&!W$.test(t)&&!/^\s{2,}\S/.test(t))break;n.push(t),i+=1}t.push(tF(n));continue}if(n.includes("|")&&i+1<e.length&&J$.test(e[i+1])&&e[i+1].includes("|")){const n=[e[i],e[i+1]];for(i+=2;i<e.length&&e[i].includes("|")&&""!==e[i].trim();)n.push(e[i]),i+=1;t.push(iF(n));continue}const s=[n];for(i+=1;i<e.length&&""!==e[i].trim()&&!eF(e[i]);)s.push(e[i]),i+=1;t.push(`<p>${K$(s.join("\n"))}</p>`)}return t.join("")}function oF(e){return nF(e.replace(/\r\n?/g,"\n").split("\n"))}function rF(e){if(/<\/?[a-z][^>]*>/i.test(e))return!1;return/^\s{0,3}(#{1,6}\s+\S|```|(?:[-*+]|\d+[.)])\s+\S|>\s?\S|\|.+\|)/m.test(e)||/\*\*[^*\n]+\*\*|~~[^~\n]+~~|\[[^\]\n]+\]\([^)\n]+\)|`[^`\n]+`/.test(e)}function sF(e){return/class="?Mso|style=["'][^"']*mso-|urn:schemas-microsoft-com|<o:p>|<w:WordDocument/i.test(e)||/id="?docs-internal-guid/i.test(e)}function aF(e){const t=e.getAttribute("style")??"",i=/mso-list:[^;"]*\blevel(\d+)/i.exec(t);return i?{level:Number(i[1])}:/\bMsoListParagraph/i.test(e.className)&&/mso-list/i.test(t)?{level:1}:null}function lF(e){let t=!1;const i=e.querySelectorAll("span");for(const e of Array.from(i))if(/mso-list:\s*ignore/i.test(e.getAttribute("style")??""))return t=/^\s*(\d+|[a-z]{1,4}|[ivxlc]+)[.)]/i.test(e.textContent??""),e.remove(),{ordered:t};const n=e.textContent??"";if(/^\s*(\d+|[a-z])[.)]\s+/i.exec(n)){t=!0;const i=e.firstChild;i?.nodeType===Node.TEXT_NODE&&(i.textContent=(i.textContent??"").replace(/^\s*\S+[.)]\s+/,""))}return{ordered:t}}function MF(e){let t=e.replace(/<!--\[if[\s\S]*?<!\[endif\]-->/gi,"").replace(/<!\[if[\s\S]*?<!\[endif\]>/gi,"").replace(/<!--[\s\S]*?-->/g,"");const i=(new DOMParser).parseFromString(t,"text/html").body;for(const e of Array.from(i.querySelectorAll("*")))e.tagName.includes(":")&&e.replaceWith(...Array.from(e.childNodes));for(const e of Array.from(i.querySelectorAll('b[id^="docs-internal-guid"]')))e.replaceWith(...Array.from(e.childNodes));!function(e){const t=e.ownerDocument,i=Array.from(e.querySelectorAll("p"));let n=[];const o=()=>{if(0===n.length)return;const e=n[0].paragraph,i=[],o=[];for(const e of n){for(;o.length>0&&o[o.length-1].level>e.level;)o.pop();if(0===o.length||o[o.length-1].level<e.level){const n=t.createElement(e.ordered?"ol":"ul");if(0===o.length)i.push(n);else{const e=o[o.length-1].list.children;(e[e.length-1]??null??o[o.length-1].list).appendChild(n)}o.push({level:e.level,list:n})}const n=t.createElement("li"),r=t.createElement("p");r.innerHTML=e.paragraph.innerHTML,n.appendChild(r),o[o.length-1].list.appendChild(n)}e.before(...i);for(const e of n)e.paragraph.remove();n=[]};for(const e of i){const t=aF(e);if(t){const{ordered:i}=lF(e);n.push({level:t.level,ordered:i,paragraph:e})}else o()}o()}(i),function(e){return/urn:schemas-microsoft-com:office:excel|ProgId["']?[^>]*Excel\.Sheet|<x:ExcelWorkbook/i.test(e)}(e)&&function(e){const t=e.ownerDocument;for(const i of Array.from(e.querySelectorAll("td, th"))){const e=i.getAttribute("bgcolor");e&&!/background/i.test(i.getAttribute("style")??"")&&(i.style.backgroundColor=e);const n=i.getAttribute("align")||i.style.textAlign;if(!i.querySelector("p, div, ul, ol, table, h1, h2, h3, h4, h5, h6")&&i.childNodes.length>0){const e=t.createElement("p");for(n&&(e.style.textAlign=n);i.firstChild;)e.appendChild(i.firstChild);i.appendChild(e)}}}(i);for(const e of Array.from(i.querySelectorAll("*"))){/\bMso/i.test(e.className)&&e.removeAttribute("class");const t=e.getAttribute("style");if(t&&/mso-/i.test(t)){const i=t.split(";").filter((e=>e.trim()&&!/^\s*mso-/i.test(e))).join(";");i.trim()?e.setAttribute("style",i):e.removeAttribute("style")}}for(const e of Array.from(i.querySelectorAll("p")))""!==(e.textContent??"").replace(/ /g,"").trim()||e.querySelector("img")||e.remove();return i.innerHTML}const cF=["color","font-family","font-size","font-weight","font-style","line-height","text-align","text-transform"],gF={"background-color":["rgba(0, 0, 0, 0)","transparent"],"text-decoration-line":["none"],"margin-top":["0px"],"margin-right":["0px"],"margin-bottom":["0px"],"margin-left":["0px"],"padding-top":["0px"],"padding-right":["0px"],"padding-bottom":["0px"],"padding-left":["0px"],"vertical-align":["baseline"]},uF=new Set(["TABLE","TD","TH","THEAD","TBODY","TR"]),dF=new Set(["href","src","alt","title","colspan","rowspan","width","height","align","target","rel"]);function hF(e,t,i){const n=getComputedStyle(e),o=i?getComputedStyle(i):null;for(const e of cF){const i=n.getPropertyValue(e);i&&(o&&o.getPropertyValue(e)===i||t.style.setProperty(e,i))}for(const[e,i]of Object.entries(gF)){const o=n.getPropertyValue(e);o&&!i.includes(o)&&t.style.setProperty(e,o)}if("UL"===e.tagName||"OL"===e.tagName){const e=n.getPropertyValue("list-style-type");e&&"none"!==e&&t.style.setProperty("list-style-type",e)}"IMG"!==e.tagName&&"IFRAME"!==e.tagName||t.style.setProperty("max-width","100%"),function(e,t,i){if(!uF.has(e.tagName))return;const n=getComputedStyle(e);"collapse"===n.getPropertyValue("border-collapse")&&i.style.setProperty("border-collapse","collapse");for(const e of["top","right","bottom","left"]){const t=n.getPropertyValue(`border-${e}-width`);if(t&&"0px"!==t){const o=n.getPropertyValue(`border-${e}-style`)||"solid",r=n.getPropertyValue(`border-${e}-color`);i.style.setProperty(`border-${e}`,`${t} ${o} ${r}`)}}}(e,0,t);for(const e of Array.from(t.attributes))"style"===e.name||dF.has(e.name)||t.removeAttribute(e.name)}function NF(e,t,i){if(e.nodeType===Node.TEXT_NODE)return t.createTextNode(e.textContent??"");if(e.nodeType!==Node.ELEMENT_NODE)return null;const n=e;if(n.classList.contains("ProseMirror-gapcursor"))return null;if(n.classList.contains("ProseMirror-separator"))return null;const o=t.createElement(n.tagName.toLowerCase());for(const e of Array.from(n.attributes))o.setAttribute(e.name,e.value);hF(n,o,i);for(const e of Array.from(n.childNodes)){const i=NF(e,t,n);i&&o.appendChild(i)}return o}function pF(e){const t=document.implementation.createHTMLDocument(""),i=t.createElement("div");for(const n of Array.from(e.childNodes)){const o=NF(n,t,e);o&&i.appendChild(o)}return i.innerHTML}function DF(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function yF(e,t="Document"){return`<!DOCTYPE html>\n<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head><meta charset="utf-8"><title>${DF(t)}</title>\x3c!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:Zoom>100</w:Zoom><w:DoNotOptimizeForBrowser/></w:WordDocument></xml><![endif]--\x3e<style>@page { size: A4; margin: 2cm; } body { font-family: Calibri, Arial, sans-serif; } table { border-collapse: collapse; } td, th { border: 1px solid #999; padding: 4px; }</style></head><body>`+e+"</body></html>"}function IF(e,t={}){const{title:i="Document",header:n="",footer:o="",fontFamily:r='system-ui, -apple-system, "Segoe UI", Roboto, sans-serif'}=t,s=(n?`<div class="nw-print-header">${DF(n)}</div>`:"")+(o?`<div class="nw-print-footer">${DF(o)}</div>`:"");return`<!DOCTYPE html>\n<html><head><meta charset="utf-8"><title>${DF(i)}</title><style>@page { size: A4; margin: 20mm; }body { font-family: ${r}; color: #101828; line-height: 1.5; margin: 0; }img, iframe { max-width: 100%; }table { border-collapse: collapse; width: 100%; }td, th { border: 1px solid #d0d5dd; padding: 6px 8px; }pre, blockquote, table, figure, img { break-inside: avoid; page-break-inside: avoid; }h1, h2, h3, h4 { break-after: avoid; page-break-after: avoid; }.nw-page-break { break-before: page; page-break-before: always; }`+(n?".nw-print-header { position: fixed; top: 0; left: 0; right: 0; font-size: 10px; color: #667085; padding: 6px 0; }":"")+(o?".nw-print-footer { position: fixed; bottom: 0; left: 0; right: 0; font-size: 10px; color: #667085; padding: 6px 0; text-align: center; }":"")+"</style></head><body>"+s+`<main>${e}</main></body></html>`}function jF(e,t,i,n=40){for(const o of["nw","ne","sw","se"]){const r=document.createElement("span");r.className=`nile-wysiwyg__resize-handle nile-wysiwyg__resize-handle--${o}`,r.dataset.resizeHandle=o,r.contentEditable="false",r.addEventListener("mousedown",(r=>{r.preventDefault(),r.stopPropagation();const s=r.clientX,a=t.getBoundingClientRect().width,l=o.includes("w")?-1:1,M=e.closest(".ProseMirror")?.getBoundingClientRect().width??2e3;let c=a;const g=e=>{c=Math.max(n,Math.min(M,a+l*(e.clientX-s))),t.style.width=`${Math.round(c)}px`},u=()=>{window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",u),e.classList.remove("nile-wysiwyg__resizing"),i(Math.round(c))};e.classList.add("nile-wysiwyg__resizing"),window.addEventListener("mousemove",g),window.addEventListener("mouseup",u)})),e.appendChild(r)}}function zF(e){return e.target instanceof HTMLElement&&!!e.target.dataset.resizeHandle}class mF{constructor(e,t,i){this.node=e,this.dom=document.createElement("span"),this.dom.className="nile-wysiwyg__image-resizer",this.img=document.createElement("img"),this.applyAttrs(e),this.dom.appendChild(this.img),jF(this.dom,this.img,(e=>{const n=i();if(void 0===n||!t.editable)return;const o=t.state.doc.nodeAt(n);o&&t.dispatch(t.state.tr.setNodeMarkup(n,void 0,{...o.attrs,width:e}))}))}applyAttrs(e){const{src:t,alt:i,title:n,width:o}=e.attrs;this.img.src=t,i?this.img.alt=i:this.img.removeAttribute("alt"),n?this.img.title=n:this.img.removeAttribute("title"),this.img.style.width=FW(o)??""}update(e){return e.type===this.node.type&&(this.node=e,this.applyAttrs(e),!0)}selectNode(){this.dom.classList.add("nile-wysiwyg__image-resizer--selected")}deselectNode(){this.dom.classList.remove("nile-wysiwyg__image-resizer--selected")}stopEvent(e){return zF(e)}ignoreMutation(){return!0}}class TF{constructor(e,t,i){this.node=e,this.dom=document.createElement("figure"),this.dom.className="nile-wysiwyg__figure",this.wrapper=document.createElement("span"),this.wrapper.className="nile-wysiwyg__image-resizer",this.wrapper.contentEditable="false",this.img=document.createElement("img"),this.wrapper.appendChild(this.img),this.contentDOM=document.createElement("figcaption"),this.contentDOM.className="nile-wysiwyg__figcaption",this.dom.append(this.wrapper,this.contentDOM),this.applyAttrs(e),this.img.addEventListener("mousedown",(e=>{e.preventDefault();const n=i();void 0!==n&&(t.dispatch(t.state.tr.setSelection(pY.create(t.state.doc,n))),t.focus())})),jF(this.wrapper,this.img,(e=>{const n=i();if(void 0===n||!t.editable)return;const o=t.state.doc.nodeAt(n);o&&t.dispatch(t.state.tr.setNodeMarkup(n,void 0,{...o.attrs,width:e}))}))}applyAttrs(e){const{src:t,alt:i,title:n,width:o,align:r}=e.attrs;this.img.src=t,i?this.img.alt=i:this.img.removeAttribute("alt"),n?this.img.title=n:this.img.removeAttribute("title"),this.dom.style.width=FW(o)??"",r?this.dom.setAttribute("data-align",r):this.dom.removeAttribute("data-align"),this.dom.classList.toggle("nile-wysiwyg__figure--empty-caption",0===e.content.size)}update(e){return e.type===this.node.type&&(this.node=e,this.applyAttrs(e),!0)}selectNode(){this.dom.classList.add("nile-wysiwyg__figure--selected"),this.wrapper.classList.add("nile-wysiwyg__image-resizer--selected")}deselectNode(){this.dom.classList.remove("nile-wysiwyg__figure--selected"),this.wrapper.classList.remove("nile-wysiwyg__image-resizer--selected")}stopEvent(e){return zF(e)}ignoreMutation(e){return!this.contentDOM.contains(e.target)}}class xF{constructor(e,t,i){this.node=e,this.dom=document.createElement("div"),this.dom.className="nile-wysiwyg__embed",this.iframe=document.createElement("iframe"),this.iframe.setAttribute("frameborder","0"),this.iframe.setAttribute("allowfullscreen","true"),this.iframe.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"),this.iframe.setAttribute("sandbox",bR),this.iframe.setAttribute("referrerpolicy",LR),this.dom.appendChild(this.iframe),this.applyAttrs(e),jF(this.dom,this.dom,(e=>{const n=i();if(void 0===n||!t.editable)return;const o=t.state.doc.nodeAt(n);o&&t.dispatch(t.state.tr.setNodeMarkup(n,void 0,{...o.attrs,width:e}))}),160)}applyAttrs(e){const{src:t,provider:i,title:n,width:o,align:r}=e.attrs;this.iframe.getAttribute("src")!==t&&this.iframe.setAttribute("src",t),this.dom.setAttribute("data-embed-provider",i??"generic"),n?this.iframe.title=n:this.iframe.removeAttribute("title"),o?(this.dom.setAttribute("data-width",String(o)),this.dom.style.width=`${o}px`):(this.dom.removeAttribute("data-width"),this.dom.style.width=""),r?this.dom.setAttribute("data-align",r):this.dom.removeAttribute("data-align"),this.dom.style.marginLeft="center"===r||"right"===r?"auto":"",this.dom.style.marginRight="center"===r?"auto":""}update(e){return e.type===this.node.type&&(this.node=e,this.applyAttrs(e),!0)}stopEvent(e){return zF(e)}ignoreMutation(){return!0}}const AF=".ProseMirror";function OF(e,t){const i=e[t];for(t+=1;t<e.length;)if("\\"!==e[t]){if(e[t]===i)return t+1;t+=1}else t+=2;return t}function fF(e,t){return function(e,t){const i=[];let n=0,o="";for(let r=0;r<e.length;r+=1){const s=e[r];if('"'!==s&&"'"!==s)"("===s||"["===s?n+=1:")"!==s&&"]"!==s||(n-=1),s!==t||0!==n?o+=s:(i.push(o),o="");else{const t=OF(e,r);o+=e.slice(r,t),r=t-1}}return i.push(o),i}(e,",").map((e=>function(e,t){const i=e.trim();if(!i)return i;if(/^(?:html|body|:root)$/i.test(i))return t;const n=i.match(/^(?:html|body|:root)\b\s*/i);return n?`${t} ${i.slice(n[0].length)}`.trim():`${t} ${i}`}(e,t))).filter(Boolean).join(", ")}const bF=new Set(["media","supports","container","layer","scope"]);function LF(e,t){let i="",n=0;const o=e.length;for(;n<o;){let r=n;for(;r<o;){const t=e[r];if('"'!==t&&"'"!==t){if("{"===t||";"===t)break;r+=1}else r=OF(e,r)}if(r>=o){i+=e.slice(n);break}if(";"===e[r]){i+=e.slice(n,r+1),n=r+1;continue}const s=e.slice(n,r).trim();let a=1,l=r+1;for(;l<o&&a>0;){const t=e[l];'"'!==t&&"'"!==t?("{"===t?a+=1:"}"===t&&(a-=1),l+=1):l=OF(e,l)}const M=e.slice(r+1,l-1);if(s.startsWith("@")){const e=(s.match(/^@([a-z-]+)/i)?.[1]??"").toLowerCase();i+=bF.has(e)?`${s} {${LF(M,t)}}`:`${s} {${M}}`}else s&&(i+=`${fF(s,t)} {${M}}`);n=l}return i}function wF(e,t){if(!e.trim())return"";try{return LF(e,t)}catch{return e}}class vF{constructor(e){this.node=e,this.dom=document.createElement("div"),this.dom.className="nile-wysiwyg__style-block",this.dom.contentEditable="false",this.styleEl=document.createElement("style"),this.styleEl.textContent=wF(e.attrs.css,AF),this.dom.append(this.styleEl)}update(e){return e.type===this.node.type&&(e.attrs.css!==this.node.attrs.css&&(this.styleEl.textContent=wF(e.attrs.css,AF)),this.node=e,!0)}ignoreMutation(){return!0}}let SF=null;class kF{constructor(e,t){this.token=0,this.renderer=t,this.dom=document.createElement("span"),this.dom.contentEditable="false",this.render(e)}render(e){const t=e.attrs.latex??"",i=e.attrs.display??"inline";this.dom.className="block"===i?"nile-wysiwyg__math nile-wysiwyg__math--block":"nile-wysiwyg__math",this.dom.setAttribute("data-math",t),this.dom.setAttribute("data-math-display",i),this.dom.title=t;const n=++this.token;if(this.renderer)try{return void(this.dom.innerHTML=this.renderer(t,i))}catch{}this.dom.textContent=t,(SF||(SF=Promise.resolve().then((function(){return c5})).then((e=>e.default))),SF).then((e=>{if(n===this.token)try{this.dom.innerHTML=e.renderToString(t,{output:"mathml",displayMode:"block"===i,throwOnError:!1})}catch{this.dom.textContent=t}})).catch((()=>{}))}update(e){return"math"===e.type.name&&(this.render(e),!0)}ignoreMutation(){return!0}}function EF(e,t){const{from:i,$from:n,to:o,empty:r}=e.selection;return r?!!t.isInSet(e.storedMarks||n.marks()):e.doc.rangeHasMark(i,o,t)}function CF(e,t,i){const{$from:n,from:o,to:r,empty:s}=e.selection;if(s){const o=t.isInSet(e.storedMarks||n.marks());return o?o.attrs[i]??null:null}let a=null;return e.doc.nodesBetween(o,r,(e=>{if(null!==a||!e.isText)return null===a;const n=t.isInSet(e.marks);return n&&(a=n.attrs[i]??null),null===a})),a}function QF(e){const{schema:t}=e,{$from:i,from:n,to:o,empty:r}=e.selection;let s=i.parent;if(!s.isTextblock){let t=null;e.doc.nodesBetween(n,o,(e=>(!t&&e.isTextblock&&(t=e),!t))),t&&(s=t)}const a=s.type.name,l="heading"===a?s.attrs.level:null,M=s.type.spec.attrs&&"align"in s.type.spec.attrs?s.attrs.align??null:null;let c=!1,g=!1,u=!1,d=!1,h=!1,N=!1,p=null,D=null;for(let e=i.depth;e>0;e-=1){const n=i.node(e);n.type===t.nodes.bullet_list?(c=!0,null===p&&(p=n.attrs.style??null)):n.type===t.nodes.ordered_list?(g=!0,null===p&&(p=n.attrs.style??null),null===D&&(D=n.attrs.order??1)):n.type===t.nodes.task_list?u=!0:n.type===t.nodes.blockquote?d=!0:n.type!==t.nodes.table||h||(h=!0,N=!!n.attrs.layout)}const y=S$(e),I=k$(e),j=EF(e,t.marks.link);let z=null;if(j&&(z=CF(e,t.marks.link,"href"),null===z&&r)){const n=A$(i,t.marks.link);if(n){const i=t.marks.link.isInSet(e.doc.resolve(n.from+1).marks());z=i?i.attrs.href:null}}return{bold:EF(e,t.marks.bold),italic:EF(e,t.marks.italic),underline:EF(e,t.marks.underline),strike:EF(e,t.marks.strike),subscript:EF(e,t.marks.subscript),superscript:EF(e,t.marks.superscript),code:EF(e,t.marks.code),blockType:a,headingLevel:l,align:M,lineHeight:s.type.spec.attrs&&"lineHeight"in s.type.spec.attrs?s.attrs.lineHeight??null:null,inBulletList:c,inOrderedList:g,inTaskList:u,inBlockquote:d,inTable:h,tableLayout:N,blockIndent:s.type.spec.attrs&&"indent"in s.type.spec.attrs?s.attrs.indent??0:0,listStyle:p,listStart:D,imageSelected:null!==y,imageIsFigure:y?.isFigure??!1,imageAlign:y?.isFigure?y.node.attrs.align??null:null,embedSelected:null!==I,embedAlign:I?.node.attrs.align??null,inCodeBlock:"code_block"===a,codeBlockLanguage:"code_block"===a?s.attrs.language??null:null,canUndo:T$(e),canRedo:x$(e),linkActive:j,linkHref:z,textColor:CF(e,t.marks.text_color,"color"),bgColor:CF(e,t.marks.bg_color,"color"),fontFamily:CF(e,t.marks.font_family,"family"),fontSize:CF(e,t.marks.font_size,"size"),selectionEmpty:r}}class UF{constructor(e,t){var i;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=null!==(i=t.width)&&void 0!==i?i:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((t=>{let i=e=>{this[t](e)};return e.dom.addEventListener(t,i),{name:t,handler:i}}))}destroy(){this.handlers.forEach((({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t)))}update(e,t){if(null!=this.cursorPos&&t.doc!=e.state.doc)if(this.lastDragEvent){let e=this.computeTarget(this.lastDragEvent);e==this.cursorPos?this.updateOverlay():this.setCursor(e)}else this.updateOverlay()}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos),i=!t.parent.inlineContent,n=this.editorView.dom,o=n.getBoundingClientRect(),r=o.width/n.offsetWidth,s=o.height/n.offsetHeight;if(i){let i=t.nodeBefore,n=t.nodeAfter;if(i||n){let t=this.editorView.nodeDOM(this.cursorPos-(i?i.nodeSize:0));if(t){let o=t.getBoundingClientRect(),r=i?o.bottom:o.top;i&&n&&(r=(r+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let a=this.width/2*s;e={left:o.left,right:o.right,top:r-a,bottom:r+a}}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos),i=this.width/2*r;e={left:t.left-i,right:t.left+i,top:t.top,bottom:t.bottom}}let a,l,M=this.editorView.dom.offsetParent;if(this.element||(this.element=M.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",i),this.element.classList.toggle("prosemirror-dropcursor-inline",!i),!M||M==document.body&&"static"==getComputedStyle(M).position)a=-pageXOffset,l=-pageYOffset;else{let e=M.getBoundingClientRect(),t=e.width/M.offsetWidth,i=e.height/M.offsetHeight;a=e.left-M.scrollLeft*t,l=e.top-M.scrollTop*i}this.element.style.left=(e.left-a)/r+"px",this.element.style.top=(e.top-l)/s+"px",this.element.style.width=(e.right-e.left)/r+"px",this.element.style.height=(e.bottom-e.top)/s+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),i=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),n=i&&i.type.spec.disableDropCursor,o="function"==typeof n?n(this.editorView,t,e):n;if(!t||o)return null;let r=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=GU(this.editorView.state.doc,r,this.editorView.dragging.slice);null!=e&&(r=e)}return r}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);null!=t&&(this.setCursor(t),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class YF extends cY{constructor(e){super(e,e)}map(e,t){let i=e.resolve(t.map(this.head));return YF.valid(i)?new YF(i):cY.near(i)}content(){return zQ.empty}eq(e){return e instanceof YF&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new YF(e.resolve(t.pos))}getBookmark(){return new ZF(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!function(e){for(let t=e.depth;t>=0;t--){let i=e.index(t),n=e.node(t);if(0!=i)for(let e=n.child(i-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||_F(e.type))return!0;if(e.inlineContent)return!1}else if(n.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let i=e.indexAfter(t),n=e.node(t);if(i!=n.childCount)for(let e=n.child(i);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||_F(e.type))return!0;if(e.inlineContent)return!1}else if(n.type.spec.isolating)return!0}return!0}(e))return!1;let i=t.type.spec.allowGapCursor;if(null!=i)return i;let n=t.contentMatchAt(e.index()).defaultType;return n&&n.isTextblock}static findGapCursorFrom(e,t,i=!1){e:for(;;){if(!i&&YF.valid(e))return e;let n=e.pos,o=null;for(let i=e.depth;;i--){let r=e.node(i);if(t>0?e.indexAfter(i)<r.childCount:e.index(i)>0){o=r.child(t>0?e.indexAfter(i):e.index(i)-1);break}if(0==i)return null;n+=t;let s=e.doc.resolve(n);if(YF.valid(s))return s}for(;;){let r=t>0?o.firstChild:o.lastChild;if(!r){if(o.isAtom&&!o.isText&&!pY.isSelectable(o)){e=e.doc.resolve(n+o.nodeSize*t),i=!1;continue e}break}o=r,n+=t;let s=e.doc.resolve(n);if(YF.valid(s))return s}return null}}}YF.prototype.visible=!1,YF.findFrom=YF.findGapCursorFrom,cY.jsonID("gapcursor",YF);class ZF{constructor(e){this.pos=e}map(e){return new ZF(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return YF.valid(t)?new YF(t):cY.near(t)}}function _F(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}const PF=dV({ArrowLeft:VF("horiz",-1),ArrowRight:VF("horiz",1),ArrowUp:VF("vert",-1),ArrowDown:VF("vert",1)});function VF(e,t){const i="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,n,o){let r=e.selection,s=t>0?r.$to:r.$from,a=r.empty;if(r instanceof hY){if(!o.endOfTextblock(i)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=YF.findGapCursorFrom(s,t,a);return!!l&&(n&&n(e.tr.setSelection(new YF(l))),!0)}}function RF(e,t,i){if(!e||!e.editable)return!1;let n=e.state.doc.resolve(t);if(!YF.valid(n))return!1;let o=e.posAtCoords({left:i.clientX,top:i.clientY});return!(o&&o.inside>-1&&pY.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new YF(n))),!0)}function WF(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof YF))return!1;let{$from:i}=e.state.selection,n=i.parent.contentMatchAt(i.index()).findWrapping(e.state.schema.nodes.text);if(!n)return!1;let o=NQ.empty;for(let e=n.length-1;e>=0;e--)o=NQ.from(n[e].createAndFill(null,o));let r=e.state.tr.replace(i.pos,i.pos,new zQ(o,0,0));return r.setSelection(hY.near(r.doc.resolve(i.pos+1))),e.dispatch(r),!1}function BF(e){if(!(e.selection instanceof YF))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",jP.create(e.doc,[DP.widget(e.selection.head,t,{key:"gapcursor"})])}class $F{constructor(e,t,i={}){this.match=e,this.match=e,this.handler="string"==typeof t?function(e){return function(t,i,n,o){let r=e;if(i[1]){let e=i[0].lastIndexOf(i[1]);r+=i[0].slice(e+i[1].length);let t=(n+=e)-o;t>0&&(r=i[0].slice(e-t,e)+r,n=o)}return t.tr.insertText(r,n,o)}}(t):t,this.undoable=!1!==i.undoable,this.inCode=i.inCode||!1,this.inCodeMark=!1!==i.inCodeMark}}function FF(e,t,i,n,o,r){if(e.composing)return!1;let s=e.state,a=s.doc.resolve(t),l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,null,"")+n;for(let M=0;M<o.length;M++){let c=o[M];if(!c.inCodeMark&&a.marks().some((e=>e.type.spec.code)))continue;if(a.parent.type.spec.code){if(!c.inCode)continue}else if("only"===c.inCode)continue;let g=c.match.exec(l);if(!g||g[0].length<n.length)continue;let u=t-(g[0].length-n.length);if(!c.inCodeMark){let e=!1;if(s.doc.nodesBetween(u,a.pos,(t=>{t.isInline&&t.marks.some((e=>e.type.spec.code))&&(e=!0)})),e)continue}let d=c.handler(s,g,u,i);if(d)return c.undoable&&d.setMeta(r,{transform:d,from:t,to:i,text:n}),e.dispatch(d),!0}return!1}const GF=(e,t)=>{let i=e.plugins;for(let n=0;n<i.length;n++){let o,r=i[n];if(r.spec.isInputRules&&(o=r.getState(e))){if(t){let i=e.tr,n=o.transform;for(let e=n.steps.length-1;e>=0;e--)i.step(n.steps[e].invert(n.docs[e]));if(o.text){let t=i.doc.resolve(o.from).marks();i.replaceWith(o.from,o.to,e.schema.text(o.text,t))}else i.delete(o.from,o.to);t(i)}return!0}}return!1};function HF(e,t,i=null,n){return new $F(e,((e,o,r,s)=>{let a=i instanceof Function?i(o):i,l=e.tr.delete(r,s),M=l.doc.resolve(r).blockRange(),c=M&&VU(M,t,a);if(!c)return null;l.wrap(M,c);let g=l.doc.resolve(r-1).nodeBefore;return g&&g.type==t&&FU(l.doc,r-1)&&(!n||n(o,g))&&l.join(r-1),l}))}function JF(e,t,i=null){return new $F(e,((e,n,o,r)=>{let s=e.doc.resolve(o),a=i instanceof Function?i(n):i;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?e.tr.delete(o,r).setBlockType(o,o,t,a):null}))}function XF(e,t){const i=t.split(/\r\n?|\n/).map((t=>e.nodes.paragraph.create(null,t?e.text(t):null)));return new zQ(NQ.from(i),1,1)}function qF(e,t={}){return new LY({props:{handlePaste(i,n){const o=n.clipboardData?.getData("text/html")??"",r=n.clipboardData?.getData("text/plain")??"";if(o.trim()||!r.trim())return!1;if(i.state.selection.$from.parent.type.spec.code)return!1;const s=t.getForcePlainText?.()??!1,a=t.getSanitize?.()??!0;if(function(e){if(!e)return!1;let t=e.replace(/^\s+/,"");for(;t.startsWith("\x3c!--");){const e=t.indexOf("--\x3e");if(-1===e)break;t=t.slice(e+3).replace(/^\s+/,"")}const i=t.toLowerCase();return!(!i.startsWith("<!doctype html")&&!i.startsWith("<html"))||TB.test(e)}(r)){if(t.getEmailFidelity?.()&&!s){const n=vB(e,r,a,{emailFidelity:!0,allowedStyles:t.getAllowedStyles?.()}),o=new zQ(n.content,0,0);i.dispatch(i.state.tr.replaceSelection(o).scrollIntoView())}else{const t=XF(e,r);i.dispatch(i.state.tr.replaceSelection(t).scrollIntoView())}return!0}if(s)return!1;if(t.getMarkdownPaste&&!t.getMarkdownPaste())return!1;if(!rF(r))return!1;const l=SB(e,oF(r),a);return i.dispatch(i.state.tr.replaceSelection(l).scrollIntoView()),!0},transformPasted:i=>t.getForcePlainText?.()?function(e,t){return XF(e,t.content.textBetween(0,t.content.size,"\n","\n"))}(e,i):i}})}new $F(/--$/,"—",{inCodeMark:!1}),new $F(/\.\.\.$/,"…",{inCodeMark:!1}),new $F(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1}),new $F(/"$/,"”",{inCodeMark:!1}),new $F(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1}),new $F(/'$/,"’",{inCodeMark:!1});const KF="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function eG(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tG(e,t){return new $F(e,((e,i,n,o)=>{if(function(e){const{$from:t}=e.selection;if(t.parent.type.spec.code)return!0;const i=e.schema.marks.code;return!(!i||!i.isInSet(e.storedMarks||t.marks()))}(e))return null;let r=t,s=n;if(i.length>1&&void 0!==i[1]){const e=i[0].lastIndexOf(i[1]);r+=i[0].slice(e+i[1].length),s+=e;const t=s-o;t>0&&(r=i[0].slice(e-t,e)+r,s=o)}return e.tr.insertText(r,s,o)}))}function iG(e,t){const i=eG(e),n=eG(e[0]),o=new RegExp(`(?:^|\\s)${i}([^${n}\\s](?:[^${n}]*[^${n}\\s])?)${i}$`);return new $F(o,((i,n,o,r)=>{const s=n[1],a=o+n[0].indexOf(e),l=i.tr;return l.delete(a,r),l.insertText(s,a),l.addMark(a,a+s.length,t.create()),l.removeStoredMark(t),l}))}function nG(e){const t=e.marks.link;return new $F(/(?:^|\s)((?:https?:\/\/|www\.)[^\s]*[^\s.,:;!?'")\]}])\s$/i,((i,n,o,r)=>{const s=n[1],a=o+n[0].indexOf(s),l=a+s.length;if(i.doc.rangeHasMark(a,l,t))return null;if(i.doc.rangeHasMark(a,l,e.marks.code))return null;const M=/^www\./i.test(s)?`https://${s}`:s,c=i.tr;return c.addMark(a,l,t.create({href:M})),c.removeStoredMark(t),c.insertText(" ",r),c}))}function oG(e){return new $F(/^(?:---|\*\*\*|___)$/,((t,i,n)=>{const o=t.doc.resolve(n),{paragraph:r,horizontal_rule:s}=e.nodes;if(o.parent.type!==r||2!==o.parent.content.size)return null;const a=o.index(-1);if(!o.node(-1).canReplaceWith(a,a+1,s))return null;const l=o.before(),M=t.tr.replaceWith(l,o.after(),[s.create(),r.create()]);return M.setSelection(hY.create(M.doc,l+2)).scrollIntoView()}))}function rG(e,t={}){return function({rules:e}){let t=new LY({state:{init:()=>null,apply(e,t){return e.getMeta(this)||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(i,n,o,r)=>FF(i,n,o,r,e,t),handleDOMEvents:{compositionend:i=>{setTimeout((()=>{let{$cursor:n}=i.state.selection;n&&FF(i,n.pos,n.pos,"",e,t)}))}}},isInputRules:!0});return t}({rules:[...!1===t.textTransform?[]:[tG(/\(c\)$/i,"©"),tG(/\(r\)$/i,"®"),tG(/\(tm\)$/i,"™"),tG(/(?:^|\s)(1\/2)\s$/,"½"),tG(/(?:^|\s)(1\/4)\s$/,"¼"),tG(/(?:^|\s)(3\/4)\s$/,"¾"),tG(/\s(---)\s$/,"—"),tG(/\s(--)\s$/,"–"),tG(/\.\.\.$/,"…"),tG(/(?:^|[\s{[(<'"‘“])(")$/,"“"),tG(/"$/,"”"),tG(/(?:^|[\s{[(<'"‘“])(')$/,"‘"),tG(/'$/,"’")],JF(new RegExp("^(#{1,6})\\s$"),e.nodes.heading,(e=>({level:e[1].length}))),HF(/^\s*>\s$/,e.nodes.blockquote),HF(/^\s*([-*])\s$/,e.nodes.bullet_list),HF(/^(\d+)\.\s$/,e.nodes.ordered_list,(e=>({order:+e[1]})),((e,t)=>t.childCount+t.attrs.order===+e[1])),JF(/^```$/,e.nodes.code_block),oG(e),HF(/^\s*\[[ ]?\]\s$/,e.nodes.task_list),iG("**",e.marks.bold),iG("*",e.marks.italic),iG("~~",e.marks.strike),iG("~",e.marks.subscript),iG("^",e.marks.superscript),iG("`",e.marks.code),nG(e)]})}const sG=/^https?:\/\/\S+$/i,aG=new SY("nile-wysiwyg-link-retype");function lG(e){if(e.childCount<=1)return e;const t=e.type.schema,i=[];return e.descendants((e=>!e.isInline||(e.type===t.nodes.hard_break||i.push(e),!1))),t.nodes.doc.create(null,t.nodes.paragraph.create(null,i))}class MG extends DR{constructor(e,t){super(e,t),this.applyHtmlAttrs(e)}applyHtmlAttrs(e){const t=e.attrs.htmlClass,i=e.attrs.htmlId;this.table.className=t??"",i?this.table.id=i:this.table.removeAttribute("id");const n=this.table.style,o=uB(e.attrs).flatMap((e=>e.split(";"))).map((e=>e.trim())).filter((e=>e.includes(":")));for(const e of["max-width","background-color","border","margin-left","margin-right","color","font-family","font-size","font-weight","line-height"])n.removeProperty(e);for(const e of o)n.removeProperty(e.slice(0,e.indexOf(":")).trim());for(const e of o){const t=e.indexOf(":");n.setProperty(e.slice(0,t).trim(),e.slice(t+1).trim())}this.table.toggleAttribute("data-autowidth",Boolean(e.attrs.layout&&!e.attrs.width)),this.table.toggleAttribute("data-layout-table",Boolean(e.attrs.layout))}update(e){const t=super.update(e);return t&&this.applyHtmlAttrs(e),t}}const cG=new SY("nileImageUpload");function gG(e){return e?Array.from(e.files).filter((e=>e.type.startsWith("image/"))):[]}const uG={active:!1,trigger:"",query:"",from:0,to:0};function dG(e,t){return new LY({key:e,state:{init:()=>uG,apply(e,i,n,o){const r=function(e,t){const{$from:i,empty:n}=e.selection;if(!n||!i.parent.isTextblock||i.parent.type.spec.code)return uG;const o=i.parent.textBetween(0,i.parentOffset,"\0","\0"),r=[...t.getTriggers()].sort(((e,t)=>t.length-e.length));for(const e of r){if(!e)continue;const n=o.lastIndexOf(e);if(-1===n)continue;if(t.startOfLine&&0!==n)continue;const r=o[n-1];if(void 0!==r&&!/\s/.test(r))continue;const s=o.slice(n+e.length);if(!(s.length>50||/\s/.test(s)||s.length<(t.minQueryLength??0)))return{active:!0,trigger:e,query:s,from:i.start()+n,to:i.pos}}return uG}(o,t);return r.active===i.active&&r.query===i.query&&r.trigger===i.trigger&&r.from===i.from||t.onChange(r),r}},props:{decorations(t){const i=e.getState(t);return i.active?jP.create(t.doc,[DP.inline(i.from,i.to,{class:"nile-wysiwyg__suggestion"})]):null},handleKeyDown(i,n){const o=e.getState(i.state);return!(!o.active||!t.onKeyDown)&&t.onKeyDown(n,o)}}})}const hG=new SY("nileFindReplace"),NG={query:"",caseSensitive:!1,matches:[],activeIndex:0};function pG(e,t,i){if(!t)return[];const n=[],o=i?t:t.toLowerCase();return e.descendants(((e,t)=>{if(!e.isTextblock)return!0;const r=e.textBetween(0,e.content.size,"\0","\0"),s=i?r:r.toLowerCase();let a=0;for(;-1!==(a=s.indexOf(o,a));)n.push({from:t+1+a,to:t+1+a+o.length}),a+=o.length;return!1})),n}function DG(){return new LY({key:hG,state:{init:()=>NG,apply(e,t){const i=e.getMeta(hG);if(i)return function(e,t,i){switch(t.type){case"search":{const n=t.caseSensitive??e.caseSensitive;return{query:t.query,caseSensitive:n,matches:pG(i,t.query,n),activeIndex:0}}case"next":return e.matches.length?{...e,activeIndex:(e.activeIndex+1)%e.matches.length}:e;case"prev":return e.matches.length?{...e,activeIndex:(e.activeIndex-1+e.matches.length)%e.matches.length}:e;default:return NG}}(t,i,e.doc);if(e.docChanged&&t.query){const i=pG(e.doc,t.query,t.caseSensitive);return{...t,matches:i,activeIndex:Math.min(t.activeIndex,Math.max(0,i.length-1))}}return t}},props:{decorations(e){const t=hG.getState(e);return t&&t.matches.length?jP.create(e.doc,t.matches.map(((e,i)=>DP.inline(e.from,e.to,{class:i===t.activeIndex?"nile-wysiwyg__find-match nile-wysiwyg__find-active":"nile-wysiwyg__find-match"})))):null}}})}function yG(e){return hG.getState(e)??NG}function IG(e,t){return e.tr.setMeta(hG,{type:t})}function jG(e){return EB(e).replace(/\n/g,"").length}function zG(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mG(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((t=>{const i=e[t],n=typeof i;"object"!==n&&"function"!==n||Object.isFrozen(i)||mG(i)})),e}class TG{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function xG(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function AG(e,...t){const i=Object.create(null);for(const t in e)i[t]=e[t];return t.forEach((function(e){for(const t in e)i[t]=e[t]})),i}const OG=e=>!!e.scope;class fG{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=xG(e)}openNode(e){if(!OG(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const i=e.split(".");return[`${t}${i.shift()}`,...i.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){OG(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const bG=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class LG{constructor(){this.rootNode=bG(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=bG({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{LG._collapse(e)})))}}class wG extends LG{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const i=e.root;t&&(i.scope=`language:${t}`),this.add(i)}toHTML(){return new fG(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function vG(e){return e?"string"==typeof e?e:e.source:null}function SG(e){return CG("(?=",e,")")}function kG(e){return CG("(?:",e,")*")}function EG(e){return CG("(?:",e,")?")}function CG(...e){const t=e.map((e=>vG(e))).join("");return t}function QG(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),i="("+(t.capture?"":"?:")+e.map((e=>vG(e))).join("|")+")";return i}function UG(e){return new RegExp(e.toString()+"|").exec("").length-1}const YG=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ZG(e,{joinWith:t}){let i=0;return e.map((e=>{i+=1;const t=i;let n=vG(e),o="";for(;n.length>0;){const e=YG.exec(n);if(!e){o+=n;break}o+=n.substring(0,e.index),n=n.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?o+="\\"+String(Number(e[1])+t):(o+=e[0],"("===e[0]&&i++)}return o})).map((e=>`(${e})`)).join(t)}const _G="[a-zA-Z]\\w*",PG="[a-zA-Z_]\\w*",VG="\\b\\d+(\\.\\d+)?",RG="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",WG="\\b(0b[01]+)",BG={begin:"\\\\[\\s\\S]",relevance:0},$G={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[BG]},FG={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[BG]},GG=function(e,t,i={}){const n=AG({scope:"comment",begin:e,end:t,contains:[]},i);n.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=QG("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return n.contains.push({begin:CG(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},HG=GG("//","$"),JG=GG("/\\*","\\*/"),XG=GG("#","$"),qG={scope:"number",begin:VG,relevance:0},KG={scope:"number",begin:RG,relevance:0},eH={scope:"number",begin:WG,relevance:0},tH={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[BG,{begin:/\[/,end:/\]/,relevance:0,contains:[BG]}]},iH={scope:"title",begin:_G,relevance:0},nH={scope:"title",begin:PG,relevance:0},oH={begin:"\\.\\s*"+PG,relevance:0};var rH=Object.freeze({__proto__:null,APOS_STRING_MODE:$G,BACKSLASH_ESCAPE:BG,BINARY_NUMBER_MODE:eH,BINARY_NUMBER_RE:WG,COMMENT:GG,C_BLOCK_COMMENT_MODE:JG,C_LINE_COMMENT_MODE:HG,C_NUMBER_MODE:KG,C_NUMBER_RE:RG,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:XG,IDENT_RE:_G,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:oH,NUMBER_MODE:qG,NUMBER_RE:VG,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:FG,REGEXP_MODE:tH,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=CG(t,/.*\b/,e.binary,/\b.*/)),AG({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:iH,UNDERSCORE_IDENT_RE:PG,UNDERSCORE_TITLE_MODE:nH});function sH(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function aH(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function lH(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=sH,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function MH(e,t){Array.isArray(e.illegal)&&(e.illegal=QG(...e.illegal))}function cH(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function gH(e,t){void 0===e.relevance&&(e.relevance=1)}const uH=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const i=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=i.keywords,e.begin=CG(i.beforeMatch,SG(i.begin)),e.starts={relevance:0,contains:[Object.assign(i,{endsParent:!0})]},e.relevance=0,delete i.beforeMatch},dH=["of","and","for","in","not","or","if","then","parent","list","value"];function hH(e,t,i="keyword"){const n=Object.create(null);return"string"==typeof e?o(i,e.split(" ")):Array.isArray(e)?o(i,e):Object.keys(e).forEach((function(i){Object.assign(n,hH(e[i],t,i))})),n;function o(e,i){t&&(i=i.map((e=>e.toLowerCase()))),i.forEach((function(t){const i=t.split("|");n[i[0]]=[e,NH(i[0],i[1])]}))}}function NH(e,t){return t?Number(t):function(e){return dH.includes(e.toLowerCase())}(e)?0:1}const pH={},DH=e=>{console.error(e)},yH=(e,...t)=>{console.log(`WARN: ${e}`,...t)},IH=(e,t)=>{pH[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),pH[`${e}/${t}`]=!0)},jH=new Error;function zH(e,t,{key:i}){let n=0;const o=e[i],r={},s={};for(let e=1;e<=t.length;e++)s[e+n]=o[e],r[e+n]=!0,n+=UG(t[e-1]);e[i]=s,e[i]._emit=r,e[i]._multi=!0}function mH(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw DH("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),jH;if("object"!=typeof e.beginScope||null===e.beginScope)throw DH("beginScope must be object"),jH;zH(e,e.begin,{key:"beginScope"}),e.begin=ZG(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw DH("skip, excludeEnd, returnEnd not compatible with endScope: {}"),jH;if("object"!=typeof e.endScope||null===e.endScope)throw DH("endScope must be object"),jH;zH(e,e.end,{key:"endScope"}),e.end=ZG(e.end,{joinWith:""})}}(e)}function TH(e){function t(t,i){return new RegExp(vG(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(i?"g":""))}class i{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=UG(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(ZG(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const i=t.findIndex(((e,t)=>t>0&&void 0!==e)),n=this.matchIndexes[i];return t.splice(0,i),Object.assign(t,n)}}class n{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new i;return this.rules.slice(e).forEach((([e,i])=>t.addRule(e,i))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let i=t.exec(e);if(this.resumingScanAtSamePosition())if(i&&i.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,i=t.exec(e)}return i&&(this.regexIndex+=i.position+1,this.regexIndex===this.count&&this.considerAll()),i}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=AG(e.classNameAliases||{}),function i(o,r){const s=o;if(o.isCompiled)return s;[aH,cH,mH,uH].forEach((e=>e(o,r))),e.compilerExtensions.forEach((e=>e(o,r))),o.__beforeBegin=null,[lH,MH,gH].forEach((e=>e(o,r))),o.isCompiled=!0;let a=null;return"object"==typeof o.keywords&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),a=o.keywords.$pattern,delete o.keywords.$pattern),a=a||/\w+/,o.keywords&&(o.keywords=hH(o.keywords,e.case_insensitive)),s.keywordPatternRe=t(a,!0),r&&(o.begin||(o.begin=/\B|\b/),s.beginRe=t(s.begin),o.end||o.endsWithParent||(o.end=/\B|\b/),o.end&&(s.endRe=t(s.end)),s.terminatorEnd=vG(s.end)||"",o.endsWithParent&&r.terminatorEnd&&(s.terminatorEnd+=(o.end?"|":"")+r.terminatorEnd)),o.illegal&&(s.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return AG(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(xH(e))return AG(e,{starts:e.starts?AG(e.starts):null});if(Object.isFrozen(e))return AG(e);return e}("self"===e?o:e)}))),o.contains.forEach((function(e){i(e,s)})),o.starts&&i(o.starts,r),s.matcher=function(e){const t=new n;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function xH(e){return!!e&&(e.endsWithParent||xH(e.starts))}class AH extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const OH=xG,fH=AG,bH=Symbol("nomatch"),LH=function(e){const t=Object.create(null),i=Object.create(null),n=[];let o=!0;const r="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:wG};function l(e){return a.noHighlightRe.test(e)}function M(e,t,i){let n="",o="";"object"==typeof t?(n=e,i=t.ignoreIllegals,o=t.language):(IH("10.7.0","highlight(lang, code, ...args) has been deprecated."),IH("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,n=t),void 0===i&&(i=!0);const r={code:n,language:o};y("before:highlight",r);const s=r.result?r.result:c(r.language,r.code,i);return s.code=r.code,y("after:highlight",s),s}function c(e,i,n,s){const l=Object.create(null);function M(){if(!A.keywords)return void f.addText(b);let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(b),i="";for(;t;){i+=b.substring(e,t.index);const o=m.case_insensitive?t[0].toLowerCase():t[0],r=(n=o,A.keywords[n]);if(r){const[e,n]=r;if(f.addText(i),i="",l[o]=(l[o]||0)+1,l[o]<=7&&(L+=n),e.startsWith("_"))i+=t[0];else{const i=m.classNameAliases[e]||e;d(t[0],i)}}else i+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(b)}var n;i+=b.substring(e),f.addText(i)}function u(){null!=A.subLanguage?function(){if(""===b)return;let e=null;if("string"==typeof A.subLanguage){if(!t[A.subLanguage])return void f.addText(b);e=c(A.subLanguage,b,!0,O[A.subLanguage]),O[A.subLanguage]=e._top}else e=g(b,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(L+=e.relevance),f.__addSublanguage(e._emitter,e.language)}():M(),b=""}function d(e,t){""!==e&&(f.startScope(t),f.addText(e),f.endScope())}function h(e,t){let i=1;const n=t.length-1;for(;i<=n;){if(!e._emit[i]){i++;continue}const n=m.classNameAliases[e[i]]||e[i],o=t[i];n?d(o,n):(b=o,M(),b=""),i++}}function p(e,t){return e.scope&&"string"==typeof e.scope&&f.openNode(m.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(d(b,m.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),b=""):e.beginScope._multi&&(h(e.beginScope,t),b="")),A=Object.create(e,{parent:{value:A}}),A}function D(e,t,i){let n=function(e,t){const i=e&&e.exec(t);return i&&0===i.index}(e.endRe,i);if(n){if(e["on:end"]){const i=new TG(e);e["on:end"](t,i),i.isMatchIgnored&&(n=!1)}if(n){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return D(e.parent,t,i)}function y(e){return 0===A.matcher.regexIndex?(b+=e[0],1):(S=!0,0)}function I(e){const t=e[0],n=i.substring(e.index),o=D(A,e,n);if(!o)return bH;const r=A;A.endScope&&A.endScope._wrap?(u(),d(t,A.endScope._wrap)):A.endScope&&A.endScope._multi?(u(),h(A.endScope,e)):r.skip?b+=t:(r.returnEnd||r.excludeEnd||(b+=t),u(),r.excludeEnd&&(b=t));do{A.scope&&f.closeNode(),A.skip||A.subLanguage||(L+=A.relevance),A=A.parent}while(A!==o.parent);return o.starts&&p(o.starts,e),r.returnEnd?0:t.length}let j={};function z(t,r){const s=r&&r[0];if(b+=t,null==s)return u(),0;if("begin"===j.type&&"end"===r.type&&j.index===r.index&&""===s){if(b+=i.slice(r.index,r.index+1),!o){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=j.rule,t}return 1}if(j=r,"begin"===r.type)return function(e){const t=e[0],i=e.rule,n=new TG(i),o=[i.__beforeBegin,i["on:begin"]];for(const i of o)if(i&&(i(e,n),n.isMatchIgnored))return y(t);return i.skip?b+=t:(i.excludeBegin&&(b+=t),u(),i.returnBegin||i.excludeBegin||(b=t)),p(i,e),i.returnBegin?0:t.length}(r);if("illegal"===r.type&&!n){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(A.scope||"<unnamed>")+'"');throw e.mode=A,e}if("end"===r.type){const e=I(r);if(e!==bH)return e}if("illegal"===r.type&&""===s)return r.index===i.length||(b+="\n"),1;if(v>1e5&&v>3*r.index){throw new Error("potential infinite loop, way more iterations than matches")}return b+=s,s.length}const m=N(e);if(!m)throw DH(r.replace("{}",e)),new Error('Unknown language: "'+e+'"');const T=TH(m);let x="",A=s||T;const O={},f=new a.__emitter(a);!function(){const e=[];for(let t=A;t!==m;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>f.openNode(e)))}();let b="",L=0,w=0,v=0,S=!1;try{if(m.__emitTokens)m.__emitTokens(i,f);else{for(A.matcher.considerAll();;){v++,S?S=!1:A.matcher.considerAll(),A.matcher.lastIndex=w;const e=A.matcher.exec(i);if(!e)break;const t=z(i.substring(w,e.index),e);w=e.index+t}z(i.substring(w))}return f.finalize(),x=f.toHTML(),{language:e,value:x,relevance:L,illegal:!1,_emitter:f,_top:A}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:OH(i),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:w,context:i.slice(w-100,w+100),mode:t.mode,resultSoFar:x},_emitter:f};if(o)return{language:e,value:OH(i),illegal:!1,relevance:0,errorRaised:t,_emitter:f,_top:A};throw t}}function g(e,i){i=i||a.languages||Object.keys(t);const n=function(e){const t={value:OH(e),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return t._emitter.addText(e),t}(e),o=i.filter(N).filter(D).map((t=>c(t,e,!1)));o.unshift(n);const r=o.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(N(e.language).supersetOf===t.language)return 1;if(N(t.language).supersetOf===e.language)return-1}return 0})),[l,M]=r,g=l;return g.secondBest=M,g}function u(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const i=a.languageDetectRe.exec(t);if(i){const t=N(i[1]);return t||(yH(r.replace("{}",i[1])),yH("Falling back to no-highlight mode for this block.",e)),t?i[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||N(e)))}(e);if(l(n))return;if(y("before:highlightElement",{el:e,language:n}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),a.throwUnescapedHTML)){throw new AH("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const o=t.textContent,s=n?M(o,{language:n,ignoreIllegals:!0}):g(o);e.innerHTML=s.value,e.dataset.highlighted="yes",function(e,t,n){const o=t&&i[t]||n;e.classList.add("hljs"),e.classList.add(`language-${o}`)}(e,n,s.language),e.result={language:s.language,re:s.relevance,relevance:s.relevance},s.secondBest&&(e.secondBest={language:s.secondBest.language,relevance:s.secondBest.relevance}),y("after:highlightElement",{el:e,result:s,text:o})}let d=!1;function h(){if("loading"===document.readyState)return d||window.addEventListener("DOMContentLoaded",(function(){h()}),!1),void(d=!0);document.querySelectorAll(a.cssSelector).forEach(u)}function N(e){return e=(e||"").toLowerCase(),t[e]||t[i[e]]}function p(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{i[e.toLowerCase()]=t}))}function D(e){const t=N(e);return t&&!t.disableAutodetect}function y(e,t){const i=e;n.forEach((function(e){e[i]&&e[i](t)}))}Object.assign(e,{highlight:M,highlightAuto:g,highlightAll:h,highlightElement:u,highlightBlock:function(e){return IH("10.7.0","highlightBlock will be removed entirely in v12.0"),IH("10.7.0","Please use highlightElement now."),u(e)},configure:function(e){a=fH(a,e)},initHighlighting:()=>{h(),IH("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){h(),IH("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(i,n){let r=null;try{r=n(e)}catch(e){if(DH("Language definition for '{}' could not be registered.".replace("{}",i)),!o)throw e;DH(e),r=s}r.name||(r.name=i),t[i]=r,r.rawDefinition=n.bind(null,e),r.aliases&&p(r.aliases,{languageName:i})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(i))i[t]===e&&delete i[t]},listLanguages:function(){return Object.keys(t)},getLanguage:N,registerAliases:p,autoDetection:D,inherit:fH,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),n.push(e)},removePlugin:function(e){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString="11.11.2",e.regex={concat:CG,lookahead:SG,either:QG,optional:EG,anyNumberOfTimes:kG};for(const e in rH)"object"==typeof rH[e]&&mG(rH[e]);return Object.assign(e,rH),e},wH=LH({});wH.newInstance=()=>LH({});var vH=wH;wH.HighlightJS=wH,wH.default=wH;var SH=zG(vH);const kH="[A-Za-z$_][0-9A-Za-z$_]*",EH=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],CH=["true","false","null","undefined","NaN","Infinity"],QH=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],UH=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],YH=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],ZH=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],_H=[].concat(YH,QH,UH);var PH=function(e){const t=e.regex,i=kH,n="<>",o="</>",r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const i=e[0].length+e.index,n=e.input[i];if("<"===n||","===n)return void t.ignoreMatch();let o;">"===n&&(((e,{after:t})=>{const i="</"+e[0].slice(1);return-1!==e.input.indexOf(i,t)})(e,{after:i})||t.ignoreMatch());const r=e.input.substring(i);((o=r.match(/^\s*=/))||(o=r.match(/^\s+extends\s+/))&&0===o.index)&&t.ignoreMatch()}},s={$pattern:kH,keyword:EH,literal:CH,built_in:_H,"variable.language":ZH},a="[0-9](_?[0-9])*",l=`\\.(${a})`,M="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",c={className:"number",variants:[{begin:`(\\b(${M})((${l})|\\.)?|(${l}))[eE][+-]?(${a})\\b`},{begin:`\\b(${M})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},g={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},u={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"xml"}},d={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},h={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"graphql"}},N={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,g]},p={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},D=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,N,{match:/\$\d+/},c];g.contains=D.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(D)});const y=[].concat(p,g.contains),I=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(y)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:I},z={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},m={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...QH,...UH]}},T={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/},x={match:t.concat(/\b/,function(e){return t.concat("(?!",e.join("|"),")")}([...YH,"super","import","await"].map((e=>`${e}\\s*\\(`))),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},A={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},O={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},f="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",b={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(f)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:m},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,N,p,{match:/\$\d+/},c,m,{scope:"attr",match:i+t.lookahead(":"),relevance:0},b,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[p,e.REGEXP_MODE,{className:"function",begin:f,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:I}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:n,end:o},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},T,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[j,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},A,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},x,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},z,O,{match:/\$[(.]/}]}},VH=zG(PH);const RH="[A-Za-z$_][0-9A-Za-z$_]*",WH=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],BH=["true","false","null","undefined","NaN","Infinity"],$H=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],FH=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],GH=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],HH=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],JH=[].concat(GH,$H,FH);function XH(e){const t=e.regex,i=RH,n="<>",o="</>",r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const i=e[0].length+e.index,n=e.input[i];if("<"===n||","===n)return void t.ignoreMatch();let o;">"===n&&(((e,{after:t})=>{const i="</"+e[0].slice(1);return-1!==e.input.indexOf(i,t)})(e,{after:i})||t.ignoreMatch());const r=e.input.substring(i);((o=r.match(/^\s*=/))||(o=r.match(/^\s+extends\s+/))&&0===o.index)&&t.ignoreMatch()}},s={$pattern:RH,keyword:WH,literal:BH,built_in:JH,"variable.language":HH},a="[0-9](_?[0-9])*",l=`\\.(${a})`,M="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",c={className:"number",variants:[{begin:`(\\b(${M})((${l})|\\.)?|(${l}))[eE][+-]?(${a})\\b`},{begin:`\\b(${M})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},g={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},u={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"xml"}},d={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},h={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"graphql"}},N={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,g]},p={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},D=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,N,{match:/\$\d+/},c];g.contains=D.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(D)});const y=[].concat(p,g.contains),I=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(y)}]),j={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:I},z={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},m={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...$H,...FH]}},T={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[j],illegal:/%/};const x={match:t.concat(/\b/,function(e){return t.concat("(?!",e.join("|"),")")}([...GH,"super","import","await"].map((e=>`${e}\\s*\\(`))),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},A={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},O={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},j]},f="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",b={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(f)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[j]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:I,CLASS_REFERENCE:m},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,d,h,N,p,{match:/\$\d+/},c,m,{scope:"attr",match:i+t.lookahead(":"),relevance:0},b,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[p,e.REGEXP_MODE,{className:"function",begin:f,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:I}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:n,end:o},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},T,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[j,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},A,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[j]},x,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},z,O,{match:/\$[(.]/}]}}var qH=function(e){const t=e.regex,i=XH(e),n=RH,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],r={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[i.exports.CLASS_REFERENCE]},a={$pattern:RH,keyword:WH.concat(["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"]),literal:BH,built_in:JH.concat(o),"variable.language":HH},l={className:"meta",begin:"@"+n},M=(e,t,i)=>{const n=e.contains.findIndex((e=>e.label===t));if(-1===n)throw new Error("can not find mode to replace");e.contains.splice(n,1,i)};Object.assign(i.keywords,a),i.exports.PARAMS_CONTAINS.push(l);const c=i.contains.find((e=>"attr"===e.scope)),g=Object.assign({},c,{match:t.concat(n,t.lookahead(/\s*\?:/))});i.exports.PARAMS_CONTAINS.push([i.exports.CLASS_REFERENCE,c,g]),i.contains=i.contains.concat([l,r,s,g]),M(i,"shebang",e.SHEBANG()),M(i,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/});const u=i.contains.find((e=>"func.def"===e.label));return u.relevance=0,Object.assign(i,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),i},KH=zG(qH);const eJ={scope:"number",match:"([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",relevance:0};var tJ=function(e){const t=["true","false","null"],i={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:t},contains:[{className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,eJ,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}},iJ=zG(tJ);var nJ=zG((function(e){const t=e.regex,i=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),n={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},r=e.inherit(o,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:"string"}),a=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[n]},{begin:/'/,end:/'/,contains:[n]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,a,s,r,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,r,a,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},n,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[a]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(i,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:i,relevance:0,starts:l}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(i,/>/))),contains:[{className:"name",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}));const oJ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],rJ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),sJ=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),aJ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),lJ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();var MJ=zG((function(e){const t=e.regex,i=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),n=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[i.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},i.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+sJ.join("|")+")"},{begin:":(:)?("+aJ.join("|")+")"}]},i.CSS_VARIABLE,{className:"attribute",begin:"\\b("+lJ.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[i.BLOCK_COMMENT,i.HEXCOLOR,i.IMPORTANT,i.CSS_NUMBER_MODE,i.UNICODE_RANGE,...n,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...n,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},i.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:rJ.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...n,i.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+oJ.join("|")+")\\b"}]}}));const cJ=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],gJ=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),uJ=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),dJ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),hJ=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();var NJ=function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),i=dJ,n=uJ,o="@[a-z-]+",r={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+cJ.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+n.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+i.join("|")+")"},r,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+hJ.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,r,t.HEXCOLOR,t.CSS_NUMBER_MODE,t.UNICODE_RANGE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:o,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:gJ.join(" ")},contains:[{begin:o,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},r,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}},pJ=zG(NJ);var DJ=function(e){const t=e.regex,i=e.COMMENT("--","$"),n=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],o=n,r=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!n.includes(e))),s={match:t.concat(/\b/,t.either(...o),/\s*\(/),relevance:0,keywords:{built_in:o}};function a(e){return t.concat(/\b/,t.either(...e.map((e=>e.replace(/\s+/,"\\s+")))),/\b/)}const l={scope:"keyword",match:a(["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"]),relevance:0};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:i}={}){const n=i;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:n(e)?`${e}|0`:e))}(r,{when:e=>e.length<3}),literal:["true","false","unknown"],type:["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{scope:"type",match:a(["double precision","large object","with timezone","without timezone"])},l,s,{scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},{scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},{begin:/"/,end:/"/,contains:[{match:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,i,{scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}},yJ=zG(DJ);var IJ=function(e){const t=e.regex,i=/[\p{XID_Start}_]\p{XID_Continue}*/u,n=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:n,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},r={className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},a={begin:/\{\{/,relevance:0},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,r,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r,a,s]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,a,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},M="[0-9](_?[0-9])*",c=`(\\b(${M}))?\\.(${M})|\\b(${M})\\.`,g=`\\b|${n.join("|")}`,u={className:"number",relevance:0,variants:[{begin:`(\\b(${M})|(${c}))[eE][+-]?(${M})[jJ]?(?=${g})`},{begin:`(${c})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${g})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${g})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`},{begin:`\\b(${M})[jJ](?=${g})`}]},d={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},h={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",r,u,l,e.HASH_COMMENT_MODE]}]};return s.contains=[l,u,r],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[r,u,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},l,d,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,i],scope:{1:"keyword",3:"title.function"},contains:[h]},{variants:[{match:[/\bclass/,/\s+/,i,/\s*/,/\(\s*/,i,/\s*\)/]},{match:[/\bclass/,/\s+/,i]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[u,h,l]}]}},jJ=zG(IJ),zJ="[0-9](_*[0-9])*",mJ=`\\.(${zJ})`,TJ="[0-9a-fA-F](_*[0-9a-fA-F])*",xJ={className:"number",variants:[{begin:`(\\b(${zJ})((${mJ})|\\.)?|(${mJ}))[eE][+-]?(${zJ})[fFdD]?\\b`},{begin:`\\b(${zJ})((${mJ})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${mJ})[fFdD]?\\b`},{begin:`\\b(${zJ})[fFdD]\\b`},{begin:`\\b0[xX]((${TJ})\\.?|(${TJ})?\\.(${TJ}))[pP][+-]?(${zJ})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${TJ})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function AJ(e,t,i){return-1===i?"":e.replace(t,(n=>AJ(e,t,i-1)))}var OJ=function(e){const t=e.regex,i="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",n=i+AJ("(?:<"+i+"~~~(?:\\s*,\\s*"+i+"~~~)*>)?",/~~~/g,2),o={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},r={className:"meta",begin:"@"+i,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},s={className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:o,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,i),/\s+/,i,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,i],className:{1:"keyword",3:"title.class"},contains:[s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+n+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:o,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,xJ,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},xJ,r]}},fJ=zG(OJ);var bJ=function(e){const t=e.regex,i={},n={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[i]}]};Object.assign(i,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},r=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,o]};o.contains.push(a);const l={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,i]},M=e.SHEBANG({binary:`(${["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"].join("|")})`,relevance:10}),c={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],literal:["true","false"],built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"]},contains:[M,e.SHEBANG(),c,l,r,s,{match:/(\/[a-z._-]+)+/},a,{match:/\\"/},{className:"string",begin:/'/,end:/'/},{match:/\\'/},i]}},LJ=zG(bJ);var wJ=zG((function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}));var vJ=function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},n={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},o={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},r=e.inherit(n,{contains:[]}),s=e.inherit(o,{contains:[]});n.contains.push(s),o.contains.push(r);let a=[t,i];return[n,o,r,s].forEach((e=>{e.contains=e.contains.concat(a)})),a=a.concat(n,o),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:a},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:a}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},n,o,{className:"quote",begin:"^>\\s+",contains:a,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},i,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}},SJ=zG(vJ);var kJ=zG((function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}));var EJ=function(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",r="("+n+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},M={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},c={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},g=t.optional(o)+e.IDENT_RE+"\\s*\\(",u={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},d=[M,s,i,e.C_BLOCK_COMMENT_MODE,l,a],h={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:d.concat([{begin:/\(/,end:/\)/,keywords:u,contains:d.concat(["self"]),relevance:0}]),relevance:0},N={begin:"("+r+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:u,relevance:0},{begin:g,returnBegin:!0,contains:[e.inherit(c,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,i,e.C_BLOCK_COMMENT_MODE,M]};return{name:"C",aliases:["h"],keywords:u,disableAutodetect:!0,illegal:"</",contains:[].concat(h,N,d,[M,{begin:e.IDENT_RE+"::",keywords:u},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:M,strings:a,keywords:u}}},CJ=zG(EJ);var QJ=function(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",o="[a-zA-Z_]\\w*::",r="(?!struct)("+n+"|"+t.optional(o)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},a={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},M={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(a,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},c={className:"title",begin:t.optional(o)+e.IDENT_RE,relevance:0},g=t.optional(o)+e.IDENT_RE+"\\s*\\(",u=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],d={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:u,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,`(?!${u.join("|")})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},N=[h,M,s,i,e.C_BLOCK_COMMENT_MODE,l,a],p={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:d,contains:N.concat([{begin:/\(/,end:/\)/,keywords:d,contains:N.concat(["self"]),relevance:0}]),relevance:0},D={className:"function",begin:"("+r+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:d,relevance:0},{begin:g,returnBegin:!0,contains:[c],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[a,l]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,a,l,s,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,a,l,s]}]},s,i,e.C_BLOCK_COMMENT_MODE,M]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:d,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(p,D,h,N,[M,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:d,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:d},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}},UJ=zG(QJ);var YJ=function(e){const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},i=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),n={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9'_]+|(\\b[\\d'_]+(\\.[\\d'_]*)?|\\.[\\d'_]+)([eE][-+]?[\\d'_]+)?)"}],relevance:0},o={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},r=e.inherit(o,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/,keywords:t},a=e.inherit(s,{illegal:/\n/}),l={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,a]},M={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},c=e.inherit(M,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},a]});s.contains=[M,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,n,e.C_BLOCK_COMMENT_MODE],a.contains=[c,l,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,n,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const g={variants:[{className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},M,l,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},u={begin:"<",end:">",contains:[{beginKeywords:"in out"},i]},d=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",h={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},g,n,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},i,u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+d+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,u],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[g,n,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},h]}},ZJ=zG(YJ);var _J=function(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}},PJ=zG(_J);var VJ=function(e){const t=e.regex,i=/(r#)?/,n=t.concat(i,e.UNDERSCORE_IDENT_RE),o=t.concat(i,e.IDENT_RE),r={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,o,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",a=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],l=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:l,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:a},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+s},{begin:"\\b0o([0-7_]+)"+s},{begin:"\\b0x([A-Fa-f0-9_]+)"+s},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+s}],relevance:0},{begin:[/fn/,/\s+/,n],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,n],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,n,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:a,type:l}},{className:"punctuation",begin:"->"},r]}},RJ=zG(VJ);var WJ=function(e){const t=e.regex,i=/(?![A-Za-z0-9])(?![$])/,n=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,i),o=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,i),r=t.concat(/[A-Z]+/,i),s={scope:"variable",match:"\\$+"+n},a={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),M=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(a)}),c={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(a),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},g="[ \t\n]",u={scope:"string",variants:[M,l,c,e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/})]},d={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},h=["false","null","true"],N=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],p=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],D={keyword:N,literal:(e=>{const t=[];return e.forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(h),built_in:p},y=e=>e.map((e=>e.replace(/\|\d+$/,""))),I={variants:[{match:[/new/,t.concat(g,"+"),t.concat("(?!",y(p).join("\\b|"),"\\b)"),o],scope:{1:"keyword",4:"title.class"}}]},j=t.concat(n,"\\b(?!\\()"),z={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),j],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,t.concat(/::/,t.lookahead(/(?!class\b)/)),j],scope:{1:"title.class",3:"variable.constant"}},{match:[o,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},m={scope:"attr",match:t.concat(n,t.lookahead(":"),t.lookahead(/(?!::)/))},T={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[m,s,z,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,u,d,I]},x={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",y(N).join("\\b|"),"|",y(p).join("\\b|"),"\\b)"),n,t.concat(g,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[T]};T.contains.push(x);const A=[m,z,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,u,d,I],O={begin:t.concat(/#\[\s*\\?/,t.either(o,r)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:h,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:h,keyword:["new","array"]},contains:["self",...A]},...A,{scope:"meta",variants:[{match:o},{match:r}]}]};return{case_insensitive:!1,keywords:D,contains:[O,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},s,x,z,{match:[/const/,/\s/,n],scope:{1:"keyword",3:"variable.constant"}},I,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:D,contains:["self",O,s,z,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,u,d]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},u,d]}},BJ=zG(WJ);var $J=zG((function(e){const t=e.regex,i="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",n=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=t.concat(n,/(::\w+)*/),r={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield","include","extend","prepend","public","private","protected","raise","throw"],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},l=[e.COMMENT("#","$",{contains:[s]}),e.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],M={className:"subst",begin:/#\{/,end:/\}/,keywords:r},c={className:"string",contains:[e.BACKSLASH_ESCAPE,M],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,M]})]}]},g="[0-9](_?[0-9])*",u={className:"number",relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},d={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:r}]},h=[c,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:r},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:r},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:n,scope:"title.class"},{match:[/def/,/\s+/,i],scope:{1:"keyword",3:"title.function"},contains:[d]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[c,{begin:i}],relevance:0},u,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:r},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,M],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a,l),relevance:0}].concat(a,l);M.contains=h,d.contains=h;const N=[{begin:/^\s*=>/,starts:{end:"$",contains:h}},{className:"meta.prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",keywords:r,contains:h}}];return l.unshift(a),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:r,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(N).concat(l).concat(h)}})),FJ="[0-9](_*[0-9])*",GJ=`\\.(${FJ})`,HJ="[0-9a-fA-F](_*[0-9a-fA-F])*",JJ={className:"number",variants:[{begin:`(\\b(${FJ})((${GJ})|\\.)?|(${GJ}))[eE][+-]?(${FJ})[fFdD]?\\b`},{begin:`\\b(${FJ})((${GJ})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${GJ})[fFdD]?\\b`},{begin:`\\b(${FJ})[fFdD]\\b`},{begin:`\\b0[xX]((${HJ})\\.?|(${HJ})?\\.(${HJ}))[pP][+-]?(${FJ})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${HJ})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};var XJ=function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},n={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},r={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,n]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,n]}]};n.contains.push(r);const s={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},a={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(r,{className:"string"}),"self"]}]},l=JJ,M=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),c={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},g=c;return g.variants[1].contains=[c],c.variants[1].contains=[g],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,M,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},i,s,a,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[c,e.C_LINE_COMMENT_MODE,M],relevance:0},e.C_LINE_COMMENT_MODE,M,s,a,r,e.C_NUMBER_MODE]},M]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,a]},r,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},l]}},qJ=zG(XJ);function KJ(e){return e?"string"==typeof e?e:e.source:null}function eX(e){return tX("(?=",e,")")}function tX(...e){const t=e.map((e=>KJ(e))).join("");return t}function iX(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e),i="("+(t.capture?"":"?:")+e.map((e=>KJ(e))).join("|")+")";return i}const nX=e=>tX(/\b/,e,/\w$/.test(e)?/\b/:/\B/),oX=["Protocol","Type"].map(nX),rX=["init","self"].map(nX),sX=["Any","Self"],aX=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],lX=["false","nil","true"],MX=["assignment","associativity","higherThan","left","lowerThan","none","right"],cX=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],gX=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],uX=iX(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),dX=iX(uX,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),hX=tX(uX,dX,"*"),NX=iX(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),pX=iX(NX,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),DX=tX(NX,pX,"*"),yX=tX(/[A-Z]/,pX,"*"),IX=["attached","autoclosure",tX(/convention\(/,iX("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",tX(/objc\(/,DX,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],jX=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];var zX=function(e){const t={match:/\s+/,relevance:0},i=e.COMMENT("/\\*","\\*/",{contains:["self"]}),n=[e.C_LINE_COMMENT_MODE,i],o={match:[/\./,iX(...oX,...rX)],className:{2:"keyword"}},r={match:tX(/\./,iX(...aX)),relevance:0},s=aX.filter((e=>"string"==typeof e)).concat(["_|0"]),a={variants:[{className:"keyword",match:iX(...aX.filter((e=>"string"!=typeof e)).concat(sX).map(nX),...rX)}]},l={$pattern:iX(/\b\w+/,/#\w+/),keyword:s.concat(cX),literal:lX},M=[o,r,a],c=[{match:tX(/\./,iX(...gX)),relevance:0},{className:"built_in",match:tX(/\b/,iX(...gX),/(?=\()/)}],g={match:/->/,relevance:0},u=[g,{className:"operator",relevance:0,variants:[{match:hX},{match:`\\.(\\.|${dX})+`}]}],d="([0-9]_*)+",h="([0-9a-fA-F]_*)+",N={className:"number",relevance:0,variants:[{match:`\\b(${d})(\\.(${d}))?([eE][+-]?(${d}))?\\b`},{match:`\\b0x(${h})(\\.(${h}))?([pP][+-]?(${d}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},p=(e="")=>({className:"subst",variants:[{match:tX(/\\/,e,/[0\\tnr"']/)},{match:tX(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),D=(e="")=>({className:"subst",match:tX(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),y=(e="")=>({className:"subst",label:"interpol",begin:tX(/\\/,e,/\(/),end:/\)/}),I=(e="")=>({begin:tX(e,/"""/),end:tX(/"""/,e),contains:[p(e),D(e),y(e)]}),j=(e="")=>({begin:tX(e,/"/),end:tX(/"/,e),contains:[p(e),y(e)]}),z={className:"string",variants:[I(),I("#"),I("##"),I("###"),j(),j("#"),j("##"),j("###")]},m=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],T={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:m},x=e=>{const t=tX(e,/\//),i=tX(/\//,e);return{begin:t,end:i,contains:[...m,{scope:"comment",begin:`#(?!.*${i})`,end:/$/}]}},A={scope:"regexp",variants:[x("###"),x("##"),x("#"),T]},O={match:tX(/`/,DX,/`/)},f=[O,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${pX}+`}],b=[{match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:jX,contains:[...u,N,z]}]}},{scope:"keyword",match:tX(/@/,iX(...IX),eX(iX(/\(/,/\s+/)))},{scope:"meta",match:tX(/@/,DX)}],L={match:eX(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:tX(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,pX,"+")},{className:"type",match:yX,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:tX(/\s+&\s+/,eX(yX)),relevance:0}]},w={begin:/</,end:/>/,keywords:l,contains:[...n,...M,...b,g,L]};L.contains.push(w);const v={begin:/\(/,end:/\)/,relevance:0,keywords:l,contains:["self",{match:tX(DX,/\s*:/),keywords:"_|0",relevance:0},...n,A,...M,...c,...u,N,z,...f,...b,L]},S={begin:/</,end:/>/,keywords:"repeat each",contains:[...n,L]},k={begin:/\(/,end:/\)/,keywords:l,contains:[{begin:iX(eX(tX(DX,/\s*:/)),eX(tX(DX,/\s+/,DX,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:DX}]},...n,...M,...u,N,z,...b,L,v],endsParent:!0,illegal:/["']/},E={match:[/(func|macro)/,/\s+/,iX(O.match,DX,hX)],className:{1:"keyword",3:"title.function"},contains:[S,k,t],illegal:[/\[/,/%/]},C={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[S,k,t],illegal:/\[|%/},Q={match:[/operator/,/\s+/,hX],className:{1:"keyword",3:"title"}},U={begin:[/precedencegroup/,/\s+/,yX],className:{1:"keyword",3:"title"},contains:[L],keywords:[...MX,...lX],end:/}/},Y={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,DX,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:l,contains:[S,...M,{begin:/:/,end:/\{/,keywords:l,contains:[{scope:"title.class.inherited",match:yX},...M],relevance:0}]};for(const e of z.variants){const t=e.contains.find((e=>"interpol"===e.label));t.keywords=l;const i=[...M,...c,...u,N,z,...f];t.contains=[...i,{begin:/\(/,end:/\)/,contains:["self",...i]}]}return{name:"Swift",keywords:l,contains:[...n,E,C,{match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},{match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Y,Q,U,{beginKeywords:"import",end:/$/,contains:[...n],relevance:0},A,...M,...c,...u,N,z,...f,...b,L,v]}},mX=zG(zX);var TX=function(e){const t="true false yes no null",i="[\\w#;/?:@&=+$,.~*'()[\\]]+",n={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},o=e.inherit(n,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),r={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},s={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},a={begin:/\{/,end:/\}/,contains:[s],illegal:"\\n",relevance:0},l={begin:"\\[",end:"\\]",contains:[s],illegal:"\\n",relevance:0},M=[{className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+i},{className:"type",begin:"!<"+i+">"},{className:"type",begin:"!"+i},{className:"type",begin:"!!"+i},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},r,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},a,l,{className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},n],c=[...M];return c.pop(),c.push(o),s.contains=c,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:M}},xX=zG(TX);var AX=zG((function(e){return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:["from","maintainer","expose","env","arg","user","onbuild","stopsignal"],contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"</"}}));var OX=zG((function(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}));var fX=zG((function(e){const t=e.regex;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}));SH.registerLanguage("javascript",VH),SH.registerLanguage("typescript",KH),SH.registerLanguage("json",iJ),SH.registerLanguage("xml",nJ),SH.registerAliases(["html"],{languageName:"xml"}),SH.registerLanguage("css",MJ),SH.registerLanguage("scss",pJ),SH.registerLanguage("sql",yJ),SH.registerLanguage("python",jJ),SH.registerLanguage("java",fJ),SH.registerLanguage("bash",LJ),SH.registerLanguage("shell",wJ),SH.registerLanguage("markdown",SJ),SH.registerLanguage("plaintext",kJ),SH.registerLanguage("c",CJ),SH.registerLanguage("cpp",UJ),SH.registerLanguage("csharp",ZJ),SH.registerLanguage("go",PJ),SH.registerLanguage("rust",RJ),SH.registerLanguage("php",BJ),SH.registerLanguage("ruby",$J),SH.registerLanguage("kotlin",qJ),SH.registerLanguage("swift",mX),SH.registerLanguage("yaml",xX),SH.registerLanguage("dockerfile",AX),SH.registerLanguage("diff",OX),SH.registerLanguage("graphql",fX);const bX=new SY("nileCodeHighlight"),LX=[{value:"",label:"Auto"},{value:"plaintext",label:"Plain text"},{value:"javascript",label:"JavaScript"},{value:"typescript",label:"TypeScript"},{value:"json",label:"JSON"},{value:"html",label:"HTML"},{value:"css",label:"CSS"},{value:"scss",label:"SCSS"},{value:"sql",label:"SQL"},{value:"python",label:"Python"},{value:"java",label:"Java"},{value:"c",label:"C"},{value:"cpp",label:"C++"},{value:"csharp",label:"C#"},{value:"go",label:"Go"},{value:"rust",label:"Rust"},{value:"php",label:"PHP"},{value:"ruby",label:"Ruby"},{value:"kotlin",label:"Kotlin"},{value:"swift",label:"Swift"},{value:"bash",label:"Bash"},{value:"shell",label:"Shell"},{value:"yaml",label:"YAML"},{value:"dockerfile",label:"Dockerfile"},{value:"graphql",label:"GraphQL"},{value:"diff",label:"Diff"},{value:"markdown",label:"Markdown"}],wX=["javascript","typescript","json","xml","css","sql","python","java","bash","go","rust","ruby"];function vX(e){const t=[];return e.descendants(((e,i)=>"code_block"!==e.type.name||(t.push(...function(e,t,i){if(!e||e.length>2e4)return[];let n;try{if(t&&SH.getLanguage(t))n=SH.highlight(e,{language:t}).value;else{if("plaintext"===t)return[];n=SH.highlightAuto(e,wX).value}}catch{return[]}const o=document.createElement("template");o.innerHTML=n;const r=[];let s=0;const a=(e,t)=>{e.childNodes.forEach((e=>{if(3===e.nodeType){const n=e.nodeValue?.length??0;t.length&&n&&r.push(DP.inline(i+s,i+s+n,{class:t.join(" ")})),s+=n}else if(1===e.nodeType){const i=e;a(i,[...t,...i.className.split(/\s+/).filter(Boolean)])}}))};return a(o.content,[]),r}(e.textContent,e.attrs.language,i+1)),!1))),t.length?jP.create(e,t):jP.empty}const SX=new SY("nileFormatPainter");function kX(e){return!!SX.getState(e)?.marks}function EX(e){const t=SX.getState(e);if(!t?.marks)return null;const{from:i,to:n,empty:o}=e.selection;if(o)return null;const r=e.tr;r.removeMark(i,n,null);for(const e of t.marks)r.addMark(i,n,e);return r.setMeta(SX,{type:"disarm"}),r}const CX=new SY("nileMentionSuggest"),QX=new SY("nileSlashSuggest"),UX=new SY("nileEmojiSuggest");function YX(e={}){const t=e.schema??mB,i=[];var n;return e.mentions&&i.push(dG(CX,e.mentions)),e.slashCommands&&i.push(dG(QX,{...e.slashCommands,getTriggers:()=>["/"],startOfLine:!0})),e.emoji&&i.push(dG(UX,{...e.emoji,getTriggers:()=>[":"],minQueryLength:2})),i.push(rG(t,{textTransform:e.textTransform}),...function(e,t={}){const i={};i["Mod-z"]=T$,i["Shift-Mod-z"]=x$,KF||(i["Mod-y"]=x$),i.Backspace=GF,i["Mod-b"]=(e,t,i)=>E$(e,"bold")(e,t,i),i["Mod-i"]=(e,t,i)=>E$(e,"italic")(e,t,i),i["Mod-u"]=(e,t,i)=>E$(e,"underline")(e,t,i),i["Shift-Mod-x"]=(e,t,i)=>E$(e,"strike")(e,t,i),i["Mod-,"]=(e,t,i)=>E$(e,"subscript")(e,t,i),i["Mod-."]=(e,t,i)=>E$(e,"superscript")(e,t,i),i["Shift-Mod-v"]=(e,t,i)=>!(!i||"undefined"==typeof navigator||!navigator.clipboard?.readText||(navigator.clipboard.readText().then((e=>{if(!e||!i)return;const t=XF(i.state.schema,e);i.dispatch(i.state.tr.replaceSelection(t).scrollIntoView())})).catch((()=>{})),0)),i["Shift-Ctrl-0"]=(e,t,i)=>E$(e,"paragraph")(e,t,i);for(let e=1;e<=6;e+=1)i[`Shift-Ctrl-${e}`]=(t,i,n)=>E$(t,"heading",{level:e})(t,i,n);i["Shift-Mod-7"]=(e,t,i)=>E$(e,"orderedList")(e,t,i),i["Shift-Mod-8"]=(e,t,i)=>E$(e,"bulletList")(e,t,i),i["Shift-Mod-9"]=(e,t,i)=>E$(e,"blockquote")(e,t,i),i["Mod-Alt-c"]=(e,t,i)=>E$(e,"codeBlock")(e,t,i),i["Mod-]"]=(e,t,i)=>E$(e,"indent")(e,t,i),i["Mod-["]=(e,t,i)=>E$(e,"outdent")(e,t,i),i.Enter=e$(rV(e.nodes.task_item,{checked:!1}),rV(e.nodes.list_item)),i.Tab=e$(aV(e.nodes.task_item),aV(e.nodes.list_item)),i["Shift-Tab"]=e$(sV(e.nodes.task_item),sV(e.nodes.list_item));const n=e$(BB,((t,i)=>(i&&i(t.tr.replaceSelectionWith(e.nodes.hard_break.create()).scrollIntoView()),!0)));if(i["Shift-Enter"]=n,i["Mod-Enter"]=n,t.onLinkShortcut){const e=t.onLinkShortcut;i["Mod-k"]=()=>(e(),!0)}if(t.onFindShortcut){const e=t.onFindShortcut;i["Mod-f"]=()=>(e(),!0)}if(t.onShortcutHelp){const e=t.onShortcutHelp;i["Mod-/"]=()=>(e(),!0)}return[uV(i),uV(r$)]}(t,{onLinkShortcut:e.onLinkShortcut,onFindShortcut:e.onFindShortcut,onShortcutHelp:e.onShortcutHelp}),z$(),function(e={}){return new LY({view:t=>new UF(t,e)})}(),new LY({props:{decorations:BF,createSelectionBetween:(e,t,i)=>t.pos==i.pos&&YF.valid(i)?new YF(i):null,handleClick:RF,handleKeyDown:PF,handleDOMEvents:{beforeinput:WF}}}),function(e){return new LY({props:{decorations(t){const i=e();if(!i||!YB(t.doc))return null;const n=DP.node(0,t.doc.firstChild.nodeSize,{class:"nile-wysiwyg__empty","data-placeholder":i});return jP.create(t.doc,[n])}}})}(e.getPlaceholder??(()=>"")),function(e={}){return new LY({key:aG,state:{init:()=>null,apply(e,t){const i=e.getMeta(aG);if(void 0!==i)return i;if(!t)return null;if(!e.docChanged)return e.selectionSet?null:t;const n=e.mapping.map(t.pos);return e.selection.empty&&e.selection.from===n?{...t,pos:n}:null}},props:{handleTextInput(e,t,i,n){const{state:o}=e;let r=null;if(t<i)r=function(e,t,i){const n=e.schema.marks.link;let o=null,r=!0;return e.doc.nodesBetween(t,i,(e=>{if(!r||!e.isText)return;const t=n.isInSet(e.marks);!t||o&&!t.eq(o)?r=!1:o=t})),r?o:null}(o,t,i);else{const e=aG.getState(o);e&&e.pos===t&&(r=e.mark)}if(!r)return!1;const s=t+n.length,a=o.tr.insertText(n,t,i).addMark(t,s,r);return a.setMeta(aG,{pos:s,mark:r}),e.dispatch(a),!0},handleClick(t,i,n){if(!n.metaKey&&!n.ctrlKey)return!1;const o=n.target?.closest?.("a[href]");if(!o)return!1;const r=o.getAttribute("href");return!!BR(r)&&(e.onOpenLink?e.onOpenLink(r):window.open(r,"_blank","noopener,noreferrer"),!0)},handlePaste(e,t){const{state:i}=e,{empty:n,from:o,to:r}=i.selection;if(n)return!1;const s=t.clipboardData?.getData("text/plain")?.trim();if(!s||!sG.test(s)||!BR(s))return!1;const a=i.schema.marks.link.create({href:s});return e.dispatch(i.tr.addMark(o,r,a)),!0}}})}({onOpenLink:e.onOpenLink}),jR({View:MG}),fR({allowTableNodeSelection:!0}),function(e={}){return new LY({key:cG,state:{init:()=>jP.empty,apply(e,t){let i=t.map(e.mapping,e.doc);const n=e.getMeta(cG);if(n?.add){const t=document.createElement("span");t.className="nile-wysiwyg__upload-placeholder",t.textContent="Uploading image…",i=i.add(e.doc,[DP.widget(n.add.pos,t,{id:n.add.id})])}return n?.remove&&(i=i.remove(i.find(void 0,void 0,(e=>e.id===n.remove.id)))),i}},props:{decorations:e=>cG.getState(e),handlePaste(t,i){const n=gG(i.clipboardData);return!(0===n.length||!e.onImageFiles||(e.onImageFiles(n,null),0))},handleDrop(t,i){const n=gG(i.dataTransfer);if(0===n.length||!e.onImageFiles)return!1;const o=t.posAtCoords({left:i.clientX,top:i.clientY});return e.onImageFiles(n,o?o.pos:null),!0}}})}({onImageFiles:e.onImageFiles}),DG(),new LY({key:bX,state:{init:(e,t)=>vX(t.doc),apply:(e,t)=>e.docChanged?vX(e.doc):t},props:{decorations:e=>bX.getState(e)}}),new LY({props:{handlePaste(e,t){const{state:i}=e;if(!i.selection.empty)return!1;const n=t.clipboardData?.getData("text/plain")?.trim();if(!n||/\s/.test(n))return!1;const o=wR(n);if(!o)return!1;const r=i.schema.nodes.embed.create({src:o.src,provider:o.provider});return e.dispatch(i.tr.replaceSelectionWith(r).scrollIntoView()),!0}}}),new LY({key:SX,state:{init:()=>({marks:null}),apply(e,t){const i=e.getMeta(SX);return"arm"===i?.type?{marks:i.marks}:"disarm"===i?.type?{marks:null}:t}},props:{attributes:e=>SX.getState(e)?.marks?{class:"nile-wysiwyg--painting"}:{}}}),qF(t,{getForcePlainText:e.getForcePlainText,getMarkdownPaste:e.getMarkdownPaste,getSanitize:e.getSanitize,getEmailFidelity:e.getEmailFidelity,getAllowedStyles:e.getAllowedStyles})),e.getMaxLength&&i.push((n=e.getMaxLength,new LY({filterTransaction(e,t){if(!e.docChanged)return!0;const i=n();if(!i||i<=0)return!0;const o=jG(e.doc);return o<=i||o<jG(t.doc)}}))),e.singleLine&&i.push(new LY({filterTransaction:e=>!e.docChanged||e.doc.childCount<=1,props:{handleKeyDown:(e,t)=>"Enter"===t.key,transformPasted(e){const t=[];return e.content.descendants((e=>!e.isInline||(t.push(e),!1))),new zQ(NQ.from(t),0,0)}}})),e.plugins&&i.push(...e.plugins),fY.create({schema:t,doc:e.doc,plugins:i})}class ZX{constructor(e,t,i){this.node=e,this.dom=document.createElement("li"),this.dom.className="nile-wysiwyg__task-item",this.dom.dataset.taskItem="true",this.dom.dataset.checked=String(e.attrs.checked),this.checkbox=document.createElement("input"),this.checkbox.type="checkbox",this.checkbox.contentEditable="false",this.checkbox.checked=e.attrs.checked,this.checkbox.addEventListener("mousedown",(e=>e.preventDefault())),this.checkbox.addEventListener("change",(()=>{const e=i();if(void 0===e||!t.editable)return void(this.checkbox.checked=this.node.attrs.checked);const n=t.state.doc.nodeAt(e);n&&t.dispatch(t.state.tr.setNodeMarkup(e,void 0,{...n.attrs,checked:this.checkbox.checked}))})),this.contentDOM=document.createElement("div"),this.contentDOM.className="nile-wysiwyg__task-content",this.dom.append(this.checkbox,this.contentDOM)}update(e){return e.type===this.node.type&&(this.node=e,this.checkbox.checked=e.attrs.checked,this.dom.dataset.checked=String(e.attrs.checked),!0)}stopEvent(e){return e.target===this.checkbox}}const _X="undo redo findReplace | heading | bold italic underline strike subscript superscript | fontFamily fontSize lineHeight | textColor bgColor | alignLeft alignCenter alignRight alignJustify | bulletList orderedList taskList listStyle indent outdent blockquote | link bookmark table image embed codeBlock math horizontalRule specialChars emoji >> mergeField template | formatPainter caseChange clearFormatting pastePlainText showBlocks sourceView | importMarkdown importWord exportInlineHtml exportWord exportPdf | shortcutHelp fullscreen",PX=[{name:"smile",char:"😄"},{name:"grin",char:"😁"},{name:"joy",char:"😂"},{name:"rofl",char:"🤣"},{name:"slight_smile",char:"🙂"},{name:"wink",char:"😉"},{name:"blush",char:"😊"},{name:"heart_eyes",char:"😍"},{name:"kiss",char:"😘"},{name:"thinking",char:"🤔"},{name:"neutral",char:"😐"},{name:"smirk",char:"😏"},{name:"unamused",char:"😒"},{name:"roll_eyes",char:"🙄"},{name:"grimacing",char:"😬"},{name:"relieved",char:"😌"},{name:"pensive",char:"😔"},{name:"sleepy",char:"😴"},{name:"mask",char:"😷"},{name:"sunglasses",char:"😎"},{name:"nerd",char:"🤓"},{name:"confused",char:"😕"},{name:"worried",char:"😟"},{name:"frown",char:"🙁"},{name:"open_mouth",char:"😮"},{name:"astonished",char:"😲"},{name:"scream",char:"😱"},{name:"cry",char:"😢"},{name:"sob",char:"😭"},{name:"sweat",char:"😓"},{name:"angry",char:"😠"},{name:"rage",char:"😡"},{name:"exploding_head",char:"🤯"},{name:"party",char:"🥳"},{name:"cowboy",char:"🤠"},{name:"clown",char:"🤡"},{name:"ghost",char:"👻"},{name:"alien",char:"👽"},{name:"robot",char:"🤖"},{name:"poop",char:"💩"},{name:"skull",char:"💀"},{name:"heart",char:"❤️"},{name:"broken_heart",char:"💔"},{name:"sparkling_heart",char:"💖"},{name:"fire",char:"🔥"},{name:"sparkles",char:"✨"},{name:"star",char:"⭐"},{name:"boom",char:"💥"},{name:"zap",char:"⚡"},{name:"rainbow",char:"🌈"},{name:"sun",char:"☀️"},{name:"cloud",char:"☁️"},{name:"rain",char:"🌧️"},{name:"snowflake",char:"❄️"},{name:"thumbsup",char:"👍"},{name:"thumbsdown",char:"👎"},{name:"ok_hand",char:"👌"},{name:"clap",char:"👏"},{name:"wave",char:"👋"},{name:"raised_hands",char:"🙌"},{name:"pray",char:"🙏"},{name:"muscle",char:"💪"},{name:"point_right",char:"👉"},{name:"point_left",char:"👈"},{name:"point_up",char:"☝️"},{name:"point_down",char:"👇"},{name:"handshake",char:"🤝"},{name:"crossed_fingers",char:"🤞"},{name:"victory",char:"✌️"},{name:"eyes",char:"👀"},{name:"brain",char:"🧠"},{name:"tada",char:"🎉"},{name:"confetti",char:"🎊"},{name:"balloon",char:"🎈"},{name:"gift",char:"🎁"},{name:"trophy",char:"🏆"},{name:"medal",char:"🥇"},{name:"rocket",char:"🚀"},{name:"airplane",char:"✈️"},{name:"car",char:"🚗"},{name:"bike",char:"🚲"},{name:"hourglass",char:"⏳"},{name:"clock",char:"🕐"},{name:"alarm",char:"⏰"},{name:"calendar",char:"📅"},{name:"pushpin",char:"📌"},{name:"paperclip",char:"📎"},{name:"scissors",char:"✂️"},{name:"pencil",char:"✏️"},{name:"memo",char:"📝"},{name:"book",char:"📖"},{name:"books",char:"📚"},{name:"bulb",char:"💡"},{name:"mag",char:"🔍"},{name:"lock",char:"🔒"},{name:"unlock",char:"🔓"},{name:"key",char:"🔑"},{name:"hammer",char:"🔨"},{name:"wrench",char:"🔧"},{name:"gear",char:"⚙️"},{name:"link",char:"🔗"},{name:"bell",char:"🔔"},{name:"mega",char:"📣"},{name:"email",char:"📧"},{name:"phone",char:"📱"},{name:"computer",char:"💻"},{name:"bug",char:"🐛"},{name:"check",char:"✅"},{name:"x",char:"❌"},{name:"warning",char:"⚠️"},{name:"question",char:"❓"},{name:"exclamation",char:"❗"},{name:"hundred",char:"💯"},{name:"money",char:"💰"},{name:"chart_up",char:"📈"},{name:"chart_down",char:"📉"},{name:"coffee",char:"☕"},{name:"beer",char:"🍺"},{name:"pizza",char:"🍕"},{name:"burger",char:"🍔"},{name:"cake",char:"🎂"},{name:"apple",char:"🍎"},{name:"banana",char:"🍌"},{name:"dog",char:"🐶"},{name:"cat",char:"🐱"},{name:"unicorn",char:"🦄"},{name:"bee",char:"🐝"},{name:"turtle",char:"🐢"},{name:"penguin",char:"🐧"},{name:"flower",char:"🌸"},{name:"tree",char:"🌳"},{name:"earth",char:"🌍"},{name:"moon",char:"🌙"},{name:"wave_water",char:"🌊"}],VX=s`
|
|
26306
26347
|
:host {
|
|
26307
26348
|
display: block;
|
|
26308
26349
|
font-family: var(
|
|
@@ -26524,7 +26565,7 @@ a {
|
|
|
26524
26565
|
margin: 0 4px;
|
|
26525
26566
|
background: var(--nile-colors-neutral-400, var(--ng-colors-border-neutral));
|
|
26526
26567
|
}
|
|
26527
|
-
`;let
|
|
26568
|
+
`;let RX=class extends Fe{constructor(){super(...arguments),this.disabled=!1,this.maxRows=20,this.maxCols=20,this.open=!1,this.hoverRows=0,this.hoverCols=0,this.customRows="",this.customCols="",this.handleOutside=e=>{this.open&&!e.composedPath().includes(this)&&(this.open=!1)}}static get styles(){return[s`
|
|
26528
26569
|
:host {
|
|
26529
26570
|
font-family: var(
|
|
26530
26571
|
--nile-font-family-sans-serif,
|
|
@@ -26564,7 +26605,7 @@ a {
|
|
|
26564
26605
|
left: 0;
|
|
26565
26606
|
z-index: 30;
|
|
26566
26607
|
padding: 8px;
|
|
26567
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
26608
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
26568
26609
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
26569
26610
|
border-radius: 8px;
|
|
26570
26611
|
box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
|
|
@@ -26645,7 +26686,7 @@ a {
|
|
|
26645
26686
|
border: none;
|
|
26646
26687
|
border-radius: 6px;
|
|
26647
26688
|
background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));
|
|
26648
|
-
color: var(--ng-colors-text-white);
|
|
26689
|
+
color: var(--nile-colors-white-base, var(--ng-colors-text-white));
|
|
26649
26690
|
font-size: 12px;
|
|
26650
26691
|
font-weight: 600;
|
|
26651
26692
|
font-family: inherit;
|
|
@@ -26725,7 +26766,7 @@ a {
|
|
|
26725
26766
|
</div>
|
|
26726
26767
|
</div>
|
|
26727
26768
|
`:""}
|
|
26728
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
26769
|
+
`}};e([de({type:Boolean,reflect:!0})],RX.prototype,"disabled",void 0),e([de({type:Number,attribute:"max-rows",reflect:!0})],RX.prototype,"maxRows",void 0),e([de({type:Number,attribute:"max-cols",reflect:!0})],RX.prototype,"maxCols",void 0),e([he()],RX.prototype,"open",void 0),e([he()],RX.prototype,"hoverRows",void 0),e([he()],RX.prototype,"hoverCols",void 0),e([he()],RX.prototype,"customRows",void 0),e([he()],RX.prototype,"customCols",void 0),RX=e([ce("nile-wysiwyg-table-picker")],RX);const WX={undo:{kind:"button",command:"undo",label:"Undo (Ctrl+Z)",icon:"undo",disabled:e=>!e.canUndo},redo:{kind:"button",command:"redo",label:"Redo (Ctrl+Y)",icon:"redo",disabled:e=>!e.canRedo},findReplace:{kind:"button",command:"openFind",label:"Find & replace (Ctrl+F)",icon:"ng-text-search"},bold:{kind:"button",command:"bold",label:"Bold (Ctrl+B)",icon:"format_bold",active:e=>e.bold},italic:{kind:"button",command:"italic",label:"Italic (Ctrl+I)",icon:"format_italic",active:e=>e.italic},underline:{kind:"button",command:"underline",label:"Underline (Ctrl+U)",icon:"format_underline",active:e=>e.underline},strike:{kind:"button",command:"strike",label:"Strikethrough",icon:"ng-strikethrough",active:e=>e.strike},subscript:{kind:"button",command:"subscript",label:"Subscript (Ctrl+,)",icon:"ng-subscript",active:e=>e.subscript},superscript:{kind:"button",command:"superscript",label:"Superscript (Ctrl+.)",icon:"ng-superscript",active:e=>e.superscript},code:{kind:"button",command:"code",label:"Inline code",text:"</>",active:e=>e.code},alignLeft:{kind:"button",command:"align",attrs:{align:"left"},label:"Align left",icon:"format_align_left",active:e=>"left"===e.align},alignCenter:{kind:"button",command:"align",attrs:{align:"center"},label:"Align center",icon:"format_align_middle",active:e=>"center"===e.align},alignRight:{kind:"button",command:"align",attrs:{align:"right"},label:"Align right",icon:"format_align_right",active:e=>"right"===e.align},alignJustify:{kind:"button",command:"align",attrs:{align:"justify"},label:"Justify",icon:"format_align_justify",active:e=>"justify"===e.align},bulletList:{kind:"button",command:"bulletList",label:"Bulleted list",icon:"format_list_bulleted",active:e=>e.inBulletList},orderedList:{kind:"button",command:"orderedList",label:"Numbered list",icon:"format_list_numbered",active:e=>e.inOrderedList},taskList:{kind:"button",command:"taskList",label:"Checklist",icon:"ng-list-checks",active:e=>e.inTaskList},indent:{kind:"button",command:"indent",label:"Increase indent (Ctrl+])",icon:"ng-list-indent-increase",disabled:e=>e.inCodeBlock},outdent:{kind:"button",command:"outdent",label:"Decrease indent (Ctrl+[)",icon:"ng-list-indent-decrease",disabled:e=>!(e.inBulletList||e.inOrderedList||e.inTaskList||e.inBlockquote||0!==e.blockIndent)},listStyle:{kind:"select",label:"List style",options:e=>e?.inOrderedList?[{value:"",label:"1, 2, 3"},{value:"lower-alpha",label:"a, b, c"},{value:"upper-alpha",label:"A, B, C"},{value:"lower-roman",label:"i, ii, iii"},{value:"upper-roman",label:"I, II, III"},{value:"multilevel",label:"1.1, 1.1.1"}]:[{value:"",label:"• Disc"},{value:"circle",label:"○ Circle"},{value:"square",label:"▪ Square"}],value:e=>e.listStyle??"",command:e=>({name:"setListStyle",attrs:{style:e||null}}),disabled:e=>!e.inBulletList&&!e.inOrderedList},blockquote:{kind:"button",command:"blockquote",label:"Blockquote",text:"❝",active:e=>e.inBlockquote},link:{kind:"button",command:"openLink",label:"Link (Ctrl+K)",icon:"link_2",active:e=>e.linkActive},bookmark:{kind:"button",command:"openBookmark",label:"Insert bookmark (in-text anchor)",icon:"ng-bookmark"},horizontalRule:{kind:"button",command:"horizontalRule",label:"Horizontal rule",icon:"minus"},specialChars:{kind:"button",command:"openSpecialChars",label:"Special characters",text:"Ω"},emoji:{kind:"button",command:"openEmoji",label:"Emoji",icon:"ng-smile"},codeBlock:{kind:"button",command:"codeBlock",label:"Code block (Ctrl+Alt+C)",icon:"ng-code",active:e=>e.inCodeBlock},image:{kind:"button",command:"openImage",label:"Insert image",icon:"image_2"},embed:{kind:"button",command:"openEmbed",label:"Embed video (YouTube, Vimeo, Loom)",icon:"ng-video"},sourceView:{kind:"button",command:"toggleSource",label:"HTML source",icon:"ng-code-xml"},showBlocks:{kind:"button",command:"toggleShowBlocks",label:"Show blocks",icon:"ng-square-pilcrow",active:e=>!!e.showBlocks},clearFormatting:{kind:"button",command:"clearFormatting",label:"Clear formatting",icon:"format_clear"},pastePlainText:{kind:"button",command:"togglePastePlainText",label:"Paste as plain text",icon:"ng-clipboard-paste",active:e=>!!e.pasteAsPlainText},fullscreen:{kind:"button",command:"toggleFullscreen",label:"Fullscreen (Esc to exit)",icon:"ng-maximize-2",iconActive:"ng-minimize-2",active:e=>!!e.fullscreen},shortcutHelp:{kind:"button",command:"openShortcutHelp",label:"Keyboard shortcuts (Ctrl+/)",icon:"ng-keyboard"},exportPdf:{kind:"button",command:"exportPdf",label:"Export to PDF",icon:"ng-printer"},exportWord:{kind:"button",command:"exportWord",label:"Export to Word",icon:"ng-file-text"},exportInlineHtml:{kind:"button",command:"exportInlineHtml",label:"Export HTML with inline styles (email)",icon:"ng-file-code"},importMarkdown:{kind:"button",command:"openMarkdown",label:"Insert from Markdown",icon:"ng-clipboard-paste"},importWord:{kind:"button",command:"importWord",label:"Import from Word",icon:"ng-file-input"},formatPainter:{kind:"button",command:"toggleFormatPainter",label:"Format painter (copy formatting)",icon:"ng-paintbrush",active:e=>!!e.formatPainter},caseChange:{kind:"select",label:"Change case",options:[{value:"",label:"Case"},{value:"upper",label:"UPPERCASE"},{value:"lower",label:"lowercase"},{value:"title",label:"Title Case"},{value:"sentence",label:"Sentence case"}],value:()=>"",command:e=>({name:"changeCase",attrs:{textCase:e||"upper"}}),disabled:e=>e.selectionEmpty},mergeField:{kind:"button",command:"openMergeField",label:"Insert merge field",icon:"ng-braces"},template:{kind:"button",command:"openTemplate",label:"Insert template",icon:"ng-layout-template"},math:{kind:"button",command:"openMath",label:"Insert math (LaTeX)",icon:"ng-sigma"},heading:{kind:"select",label:"Paragraph style",options:[{value:"",label:"Paragraph"},{value:"1",label:"Heading 1"},{value:"2",label:"Heading 2"},{value:"3",label:"Heading 3"},{value:"4",label:"Heading 4"},{value:"5",label:"Heading 5"},{value:"6",label:"Heading 6"}],value:e=>e.headingLevel?String(e.headingLevel):"",command:e=>""===e?{name:"paragraph"}:{name:"heading",attrs:{level:Number(e)}}},fontFamily:{kind:"select",label:"Font family",options:[{value:"",label:"Font"},...["Arial","Georgia","Tahoma","Times New Roman","Trebuchet MS","Verdana","Courier New"].map((e=>({value:e,label:e})))],value:e=>e.fontFamily??"",command:e=>({name:"fontFamily",attrs:{family:e||null}})},fontSize:{kind:"select",label:"Font size",options:[{value:"",label:"Size"},...["10px","12px","14px","16px","18px","20px","24px","28px","32px","48px"].map((e=>({value:e,label:e.replace("px","")})))],value:e=>e.fontSize??"",command:e=>({name:"fontSize",attrs:{size:e||null}})},lineHeight:{kind:"select",label:"Line height",options:[{value:"",label:"Spacing"},{value:"1",label:"1"},{value:"1.15",label:"1.15"},{value:"1.5",label:"1.5"},{value:"2",label:"2"},{value:"2.5",label:"2.5"},{value:"3",label:"3"}],value:e=>e.lineHeight??"",command:e=>({name:"lineHeight",attrs:{lineHeight:e||null}}),disabled:e=>e.inCodeBlock},textColor:{kind:"color",label:"Text color",glyph:"A",command:"textColor",value:e=>e.textColor},bgColor:{kind:"color",label:"Highlight color",glyph:"✎",command:"bgColor",value:e=>e.bgColor}};let BX=class extends Fe{constructor(){super(...arguments),this.config=_X,this.disabled=!1,this.openMenu=null,this.overflowOpen=!1,this.handleOutsideClick=e=>{!this.openMenu&&!this.overflowOpen||e.composedPath().includes(this)||(this.openMenu=null,this.overflowOpen=!1)},this.toggleOverflow=()=>{this.overflowOpen=!this.overflowOpen,this.openMenu=null}}static get styles(){return[VX]}get isAuthoringContainer(){return!!this.closest("nile-wysiwyg-editor")}connectedCallback(){super.connectedCallback(),this.isAuthoringContainer||document.addEventListener("mousedown",this.handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.handleOutsideClick)}toggleMenu(e){this.openMenu=this.openMenu===e?null:e}dispatchCommand(e,t){this.overflowOpen=!1,this.emit("wysiwyg-command",{name:e,attrs:t})}withTooltip(e,t){return R`
|
|
26729
26770
|
<nile-lite-tooltip content=${e} placement="top">${t}</nile-lite-tooltip>
|
|
26730
26771
|
`}renderButton(e,t){const i=this.toolbarState,n=!(!i||!e.active)&&e.active(i),o=this.disabled||!(!i||!e.disabled)&&e.disabled(i),r=t?.label??e.label,s=t?.icon??e.icon,a=n&&e.iconActive?e.iconActive:s;return this.withTooltip(r,R`
|
|
26731
26772
|
<button
|
|
@@ -26810,7 +26851,7 @@ a {
|
|
|
26810
26851
|
part="button"
|
|
26811
26852
|
?disabled=${this.disabled}
|
|
26812
26853
|
></nile-wysiwyg-table-picker>
|
|
26813
|
-
`);const i=
|
|
26854
|
+
`);const i=WX[e];if(!i)return B;switch(i.kind){case"button":return this.renderButton(i,t);case"select":return this.renderSelect(e,i,t);case"color":return this.renderColor(e,i,t);default:return B}}itemsFromConfig(e){return e.trim().split(/\s+/).filter(Boolean).map((e=>({name:e})))}groupItems(e){const t=[[]];for(const i of e)"|"!==i.name?t[t.length-1].push(i):t[t.length-1].length&&t.push([]);return t.filter((e=>e.length>0))}partitionGroups(e){const t=e.findIndex((e=>">>"===e.name));return-1!==t?{main:this.groupItems(e.slice(0,t)),overflow:this.groupItems(e.slice(t+1))}:e.some((e=>e.overflow))?{main:this.groupItems(e.filter((e=>!e.overflow))),overflow:this.groupItems(e.filter((e=>e.overflow)))}:{main:this.groupItems(e),overflow:[]}}renderOverflow(e,t){const i=this.overflowOpen;return R`
|
|
26814
26855
|
${e?R`<span class="toolbar__divider"></span>`:B}
|
|
26815
26856
|
<span class="toolbar__overflow" part="overflow">
|
|
26816
26857
|
${this.withTooltip("More",R`
|
|
@@ -26849,7 +26890,7 @@ a {
|
|
|
26849
26890
|
`))}
|
|
26850
26891
|
${i.length?this.renderOverflow(t.length>0,i):B}
|
|
26851
26892
|
</div>
|
|
26852
|
-
`}};e([de({type:String})],
|
|
26893
|
+
`}};e([de({type:String})],BX.prototype,"config",void 0),e([de({attribute:!1})],BX.prototype,"items",void 0),e([de({type:Boolean,reflect:!0})],BX.prototype,"disabled",void 0),e([de({attribute:!1})],BX.prototype,"toolbarState",void 0),e([he()],BX.prototype,"openMenu",void 0),e([he()],BX.prototype,"overflowOpen",void 0),BX=e([ce("nile-wysiwyg-toolbar")],BX);let $X=class extends le{constructor(){super(...arguments),this.name="",this.label="",this.icon="",this.divider=!1,this.overflow=!1}createRenderRoot(){return this}shouldUpdate(){return!1}};e([de({type:String,reflect:!0})],$X.prototype,"name",void 0),e([de({type:String,reflect:!0})],$X.prototype,"label",void 0),e([de({type:String,reflect:!0})],$X.prototype,"icon",void 0),e([de({type:Boolean,reflect:!0})],$X.prototype,"divider",void 0),e([de({type:Boolean,reflect:!0})],$X.prototype,"overflow",void 0),$X=e([ce("nile-wysiwyg-toolbar-item")],$X);let FX=class extends Fe{constructor(){super(...arguments),this.open=!1,this.href="",this.text="",this.allowText=!1,this.canRemove=!1}static get styles(){return[s`
|
|
26853
26894
|
:host {
|
|
26854
26895
|
font-family: var(
|
|
26855
26896
|
--nile-font-family-sans-serif,
|
|
@@ -26870,7 +26911,7 @@ a {
|
|
|
26870
26911
|
gap: 8px;
|
|
26871
26912
|
min-width: 280px;
|
|
26872
26913
|
padding: 12px;
|
|
26873
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
26914
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
26874
26915
|
border: 1px solid
|
|
26875
26916
|
var(--nile-wysiwyg-border-color, var(--nile-colors-neutral-400, var(--ng-colors-border-primary)));
|
|
26876
26917
|
border-radius: var(--nile-wysiwyg-radius, 8px);
|
|
@@ -26918,7 +26959,7 @@ a {
|
|
|
26918
26959
|
|
|
26919
26960
|
button.primary {
|
|
26920
26961
|
background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));
|
|
26921
|
-
color: var(--ng-colors-text-white);
|
|
26962
|
+
color: var(--nile-colors-white-base, var(--ng-colors-text-white));
|
|
26922
26963
|
}
|
|
26923
26964
|
|
|
26924
26965
|
button.danger {
|
|
@@ -26962,7 +27003,7 @@ a {
|
|
|
26962
27003
|
<button type="submit" class="primary">Apply</button>
|
|
26963
27004
|
</div>
|
|
26964
27005
|
</form>
|
|
26965
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
27006
|
+
`}};e([de({type:Boolean,reflect:!0})],FX.prototype,"open",void 0),e([de({type:String})],FX.prototype,"href",void 0),e([de({type:String})],FX.prototype,"text",void 0),e([de({type:Boolean})],FX.prototype,"allowText",void 0),e([de({type:Boolean})],FX.prototype,"canRemove",void 0),e([pe(".link-editor__href")],FX.prototype,"hrefInput",void 0),FX=e([ce("nile-wysiwyg-link-editor")],FX);const GX={bold:{command:"bold",label:"Bold",icon:"format_bold",active:e=>e.bold},italic:{command:"italic",label:"Italic",icon:"format_italic",active:e=>e.italic},underline:{command:"underline",label:"Underline",icon:"format_underline",active:e=>e.underline},strike:{command:"strike",label:"Strikethrough",icon:"ng-strikethrough",active:e=>e.strike},code:{command:"code",label:"Inline code",icon:"ng-code",active:e=>e.code},subscript:{command:"subscript",label:"Subscript",icon:"ng-subscript",active:e=>e.subscript},superscript:{command:"superscript",label:"Superscript",icon:"ng-superscript",active:e=>e.superscript},link:{command:"openLink",label:"Link",icon:"link_2",active:e=>e.linkActive},bulletList:{command:"bulletList",label:"Bulleted list",icon:"format_list_bulleted",active:e=>e.inBulletList},orderedList:{command:"orderedList",label:"Numbered list",icon:"format_list_numbered",active:e=>e.inOrderedList},alignLeft:{command:"align",label:"Align left",icon:"format_align_left",attrs:{align:"left"},active:e=>"left"===e.align},alignCenter:{command:"align",label:"Align center",icon:"format_align_middle",attrs:{align:"center"},active:e=>"center"===e.align},alignRight:{command:"align",label:"Align right",icon:"format_align_right",attrs:{align:"right"},active:e=>"right"===e.align},clearFormatting:{command:"clearFormatting",label:"Clear formatting",icon:"format_clear"}},HX=["bold","italic","underline","strike","link"];let JX=class extends Fe{constructor(){super(...arguments),this.open=!1}static get styles(){return[s`
|
|
26966
27007
|
:host {
|
|
26967
27008
|
font-family: var(
|
|
26968
27009
|
--nile-font-family-sans-serif,
|
|
@@ -26981,7 +27022,7 @@ a {
|
|
|
26981
27022
|
display: flex;
|
|
26982
27023
|
gap: 2px;
|
|
26983
27024
|
padding: 4px;
|
|
26984
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
27025
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
26985
27026
|
border: 1px solid
|
|
26986
27027
|
var(--nile-wysiwyg-border-color, var(--nile-colors-neutral-400, var(--ng-colors-border-primary)));
|
|
26987
27028
|
border-radius: var(--nile-wysiwyg-radius, 8px);
|
|
@@ -27021,11 +27062,11 @@ a {
|
|
|
27021
27062
|
margin: 3px 2px;
|
|
27022
27063
|
background: var(--nile-colors-neutral-300, var(--ng-colors-border-secondary));
|
|
27023
27064
|
}
|
|
27024
|
-
`]}get isAuthoringContainer(){return!!this.closest("nile-wysiwyg-editor")}render(){if(this.isAuthoringContainer)return R``;const e=this.toolbarState,t=this.items&&this.items.length?this.items:
|
|
27065
|
+
`]}get isAuthoringContainer(){return!!this.closest("nile-wysiwyg-editor")}render(){if(this.isAuthoringContainer)return R``;const e=this.toolbarState,t=this.items&&this.items.length?this.items:HX.map((e=>({name:e})));return R`
|
|
27025
27066
|
<div class="bubble" part="bubble-menu" @mousedown=${e=>e.preventDefault()}>
|
|
27026
27067
|
${t.map((t=>this.renderEntry(t,e)))}
|
|
27027
27068
|
</div>
|
|
27028
|
-
`}renderEntry(e,t){if("|"===e.name)return R`<span class="divider" part="bubble-divider"></span>`;const i=
|
|
27069
|
+
`}renderEntry(e,t){if("|"===e.name)return R`<span class="divider" part="bubble-divider"></span>`;const i=GX[e.name],n=e.label||i?.label||e.name,o=e.icon||i?.icon;if(!o)return B;const r=i?.command??e.name,s=i?.attrs,a=!(!i?.active||!t)&&i.active(t);return R`
|
|
27029
27070
|
<nile-lite-tooltip content=${n} placement="top">
|
|
27030
27071
|
<button
|
|
27031
27072
|
type="button"
|
|
@@ -27036,7 +27077,7 @@ a {
|
|
|
27036
27077
|
${IS(o,16)}
|
|
27037
27078
|
</button>
|
|
27038
27079
|
</nile-lite-tooltip>
|
|
27039
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
27080
|
+
`}};e([de({type:Boolean,reflect:!0})],JX.prototype,"open",void 0),e([de({attribute:!1})],JX.prototype,"toolbarState",void 0),e([de({attribute:!1})],JX.prototype,"items",void 0),JX=e([ce("nile-wysiwyg-bubble-menu")],JX);let XX=class extends le{constructor(){super(...arguments),this.name="",this.label="",this.icon="",this.divider=!1}createRenderRoot(){return this}shouldUpdate(){return!1}};e([de({type:String,reflect:!0})],XX.prototype,"name",void 0),e([de({type:String,reflect:!0})],XX.prototype,"label",void 0),e([de({type:String,reflect:!0})],XX.prototype,"icon",void 0),e([de({type:Boolean,reflect:!0})],XX.prototype,"divider",void 0),XX=e([ce("nile-wysiwyg-bubble-item")],XX);let qX=class extends Fe{constructor(){super(...arguments),this.open=!1,this.editing=!1,this.uploadFromComputer=!1,this.maxFileSize=2097152,this.srcValue="",this.altValue="",this.captionValue="",this.uploadedFileName="",this.errorMessage="",this.stagedFile=null}static get styles(){return[s`
|
|
27040
27081
|
:host {
|
|
27041
27082
|
font-family: var(
|
|
27042
27083
|
--nile-font-family-sans-serif,
|
|
@@ -27058,7 +27099,7 @@ a {
|
|
|
27058
27099
|
min-width: 340px;
|
|
27059
27100
|
max-width: 420px;
|
|
27060
27101
|
padding: 12px;
|
|
27061
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
27102
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
27062
27103
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
27063
27104
|
border-radius: 8px;
|
|
27064
27105
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
@@ -27206,7 +27247,7 @@ a {
|
|
|
27206
27247
|
>
|
|
27207
27248
|
</div>
|
|
27208
27249
|
</div>
|
|
27209
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
27250
|
+
`}};e([de({type:Boolean,reflect:!0})],qX.prototype,"open",void 0),e([de({type:Boolean})],qX.prototype,"editing",void 0),e([de({type:Boolean,attribute:"upload-from-computer"})],qX.prototype,"uploadFromComputer",void 0),e([de({type:Number,attribute:"max-file-size"})],qX.prototype,"maxFileSize",void 0),e([he()],qX.prototype,"srcValue",void 0),e([he()],qX.prototype,"altValue",void 0),e([he()],qX.prototype,"captionValue",void 0),e([he()],qX.prototype,"uploadedFileName",void 0),e([he()],qX.prototype,"errorMessage",void 0),qX=e([ce("nile-wysiwyg-image-panel")],qX);const KX=[{name:"addRowBefore",label:"Add row above",icon:"ng-between-vertical-start"},{name:"addRowAfter",label:"Add row below",icon:"ng-between-vertical-end"},{name:"addColumnBefore",label:"Add column left",icon:"ng-between-horizontal-start"},{name:"addColumnAfter",label:"Add column right",icon:"ng-between-horizontal-end"},{name:"deleteRow",label:"Delete row",icon:"ng-rows-2"},{name:"deleteColumn",label:"Delete column",icon:"ng-columns-2"},{name:"mergeCells",label:"Merge cells",icon:"ng-table-cells-merge"},{name:"splitCell",label:"Split cell",icon:"ng-table-cells-split"},{name:"toggleHeaderRow",label:"Toggle header row",icon:"ng-panel-top"},{name:"toggleLayoutTable",label:"Toggle layout table (borderless)",icon:"ng-grid-2x2"},{name:"deleteTable",label:"Delete table",icon:"ng-trash-2"}];let eq=class extends Fe{constructor(){super(...arguments),this.open=!1}static get styles(){return[s`
|
|
27210
27251
|
:host {
|
|
27211
27252
|
font-family: var(
|
|
27212
27253
|
--nile-font-family-sans-serif,
|
|
@@ -27225,7 +27266,7 @@ a {
|
|
|
27225
27266
|
display: flex;
|
|
27226
27267
|
gap: 2px;
|
|
27227
27268
|
padding: 4px;
|
|
27228
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
27269
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
27229
27270
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
27230
27271
|
border-radius: 8px;
|
|
27231
27272
|
box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
|
|
@@ -27252,7 +27293,7 @@ a {
|
|
|
27252
27293
|
}
|
|
27253
27294
|
`]}render(){return R`
|
|
27254
27295
|
<div class="menu" part="table-menu" @mousedown=${e=>e.preventDefault()}>
|
|
27255
|
-
${
|
|
27296
|
+
${KX.map((e=>R`
|
|
27256
27297
|
<nile-lite-tooltip content=${e.label} placement="top">
|
|
27257
27298
|
<button
|
|
27258
27299
|
type="button"
|
|
@@ -27264,7 +27305,7 @@ a {
|
|
|
27264
27305
|
</nile-lite-tooltip>
|
|
27265
27306
|
`))}
|
|
27266
27307
|
</div>
|
|
27267
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
27308
|
+
`}};e([de({type:Boolean,reflect:!0})],eq.prototype,"open",void 0),eq=e([ce("nile-wysiwyg-table-menu")],eq);let tq=class extends Fe{constructor(){super(...arguments),this.open=!1,this.items=[],this.activeIndex=0}static get styles(){return[s`
|
|
27268
27309
|
:host {
|
|
27269
27310
|
font-family: var(
|
|
27270
27311
|
--nile-font-family-sans-serif,
|
|
@@ -27281,11 +27322,14 @@ a {
|
|
|
27281
27322
|
|
|
27282
27323
|
.list {
|
|
27283
27324
|
min-width: 200px;
|
|
27284
|
-
|
|
27325
|
+
/* Wide enough for long field names (e.g. source.JobAssignment…); longer
|
|
27326
|
+
labels wrap rather than scrolling sideways. */
|
|
27327
|
+
max-width: min(480px, calc(100vw - 32px));
|
|
27285
27328
|
max-height: 240px;
|
|
27286
27329
|
overflow-y: auto;
|
|
27330
|
+
overflow-x: hidden;
|
|
27287
27331
|
padding: 4px;
|
|
27288
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
27332
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
27289
27333
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
27290
27334
|
border-radius: 8px;
|
|
27291
27335
|
box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
|
|
@@ -27303,12 +27347,20 @@ a {
|
|
|
27303
27347
|
color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary-700));
|
|
27304
27348
|
}
|
|
27305
27349
|
|
|
27350
|
+
.label {
|
|
27351
|
+
min-width: 0;
|
|
27352
|
+
/* Wrap a long label instead of truncating it: names that differ only in
|
|
27353
|
+
their last word (…JobFunction / …JobFunctionCode) must stay tellable apart. */
|
|
27354
|
+
overflow-wrap: anywhere;
|
|
27355
|
+
}
|
|
27356
|
+
|
|
27306
27357
|
.item.active {
|
|
27307
27358
|
background: var(--nile-colors-primary-50, var(--ng-componentcolors-utility-blue-50));
|
|
27308
27359
|
color: var(--nile-colors-primary-700, var(--ng-componentcolors-utility-blue-700));
|
|
27309
27360
|
}
|
|
27310
27361
|
|
|
27311
27362
|
.hint {
|
|
27363
|
+
flex-shrink: 0;
|
|
27312
27364
|
font-size: 11px;
|
|
27313
27365
|
color: var(--nile-colors-neutral-500, var(--ng-colors-text-quaternary-500));
|
|
27314
27366
|
}
|
|
@@ -27325,12 +27377,12 @@ a {
|
|
|
27325
27377
|
@mouseenter=${()=>{this.activeIndex=t}}
|
|
27326
27378
|
@click=${()=>this.selectCurrent()}
|
|
27327
27379
|
>
|
|
27328
|
-
<span>${e.label}</span>
|
|
27380
|
+
<span class="label" title=${e.label}>${e.label}</span>
|
|
27329
27381
|
${e.hint?R`<span class="hint">${e.hint}</span>`:""}
|
|
27330
27382
|
</div>
|
|
27331
27383
|
`)):R`<div class="empty">No results</div>`}
|
|
27332
27384
|
</div>
|
|
27333
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
27385
|
+
`}};e([de({type:Boolean,reflect:!0})],tq.prototype,"open",void 0),e([de({attribute:!1})],tq.prototype,"items",void 0),e([he()],tq.prototype,"activeIndex",void 0),tq=e([ce("nile-wysiwyg-suggest-list")],tq);let iq=class extends Fe{constructor(){super(...arguments),this.open=!1,this.matchCount=0,this.activeIndex=0}static get styles(){return[s`
|
|
27334
27386
|
:host {
|
|
27335
27387
|
font-family: var(
|
|
27336
27388
|
--nile-font-family-sans-serif,
|
|
@@ -27353,7 +27405,7 @@ a {
|
|
|
27353
27405
|
align-items: center;
|
|
27354
27406
|
gap: 6px;
|
|
27355
27407
|
padding: 8px;
|
|
27356
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
27408
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
27357
27409
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
27358
27410
|
border-radius: 8px;
|
|
27359
27411
|
box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
|
|
@@ -27441,14 +27493,14 @@ a {
|
|
|
27441
27493
|
✕
|
|
27442
27494
|
</button>
|
|
27443
27495
|
</div>
|
|
27444
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
27496
|
+
`}};e([de({type:Boolean,reflect:!0})],iq.prototype,"open",void 0),e([de({type:Number})],iq.prototype,"matchCount",void 0),e([de({type:Number})],iq.prototype,"activeIndex",void 0),e([pe(".find-bar__query")],iq.prototype,"queryInput",void 0),e([pe(".find-bar__replace")],iq.prototype,"replaceInput",void 0),iq=e([ce("nile-wysiwyg-find-bar")],iq);let nq=class extends le{constructor(){super(...arguments),this.content=""}static get styles(){return[JP,s`
|
|
27445
27497
|
:host {
|
|
27446
27498
|
display: block;
|
|
27447
27499
|
}
|
|
27448
27500
|
.ProseMirror {
|
|
27449
27501
|
min-height: 0;
|
|
27450
27502
|
}
|
|
27451
|
-
`]}render(){return R`<article class="ProseMirror">${fe(this.content)}</article>`}};e([de({type:String})]
|
|
27503
|
+
`]}render(){return R`<article class="ProseMirror">${fe(this.content)}</article>`}};e([de({type:String})],nq.prototype,"content",void 0),nq=e([ce("nile-wysiwyg-preview")],nq),SH.registerLanguage("xml",nJ);let oq=class extends Fe{constructor(){super(...arguments),this.value="",this.draft="",this.splitRatio=.5,this.splitDragging=!1,this.startSplitDrag=e=>{const t=this.bodyEl;if(!t)return;e.preventDefault(),this.splitDragging=!0;const i=t.getBoundingClientRect(),n=e=>{if(0===i.width)return;const t=(e.clientX-i.left)/i.width;this.splitRatio=Math.min(.85,Math.max(.15,t))},o=()=>{this.splitDragging=!1,window.removeEventListener("pointermove",n),window.removeEventListener("pointerup",o)};window.addEventListener("pointermove",n),window.addEventListener("pointerup",o)},this.resetSplit=()=>{this.splitRatio=.5},this.onInput=e=>{this.draft=e.target.value},this.onScroll=e=>{const t=e.target;this.highlightEl&&(this.highlightEl.style.transform=`translate(${-t.scrollLeft}px, ${-t.scrollTop}px)`),this.linenosEl&&(this.linenosEl.style.transform=`translateY(${-t.scrollTop}px)`)}}static get styles(){return[s`
|
|
27452
27504
|
:host {
|
|
27453
27505
|
display: flex;
|
|
27454
27506
|
flex-direction: column;
|
|
@@ -27493,7 +27545,7 @@ a {
|
|
|
27493
27545
|
|
|
27494
27546
|
button.primary {
|
|
27495
27547
|
background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));
|
|
27496
|
-
color: var(--ng-colors-text-white);
|
|
27548
|
+
color: var(--nile-colors-white-base, var(--ng-colors-text-white));
|
|
27497
27549
|
}
|
|
27498
27550
|
|
|
27499
27551
|
.body {
|
|
@@ -27656,7 +27708,7 @@ a {
|
|
|
27656
27708
|
|
|
27657
27709
|
.gutter:hover,
|
|
27658
27710
|
.body--dragging .gutter {
|
|
27659
|
-
background: var(--ng-colors-bg-brand-primary);
|
|
27711
|
+
background: var(--nile-colors-primary-100, var(--ng-colors-bg-brand-primary));
|
|
27660
27712
|
}
|
|
27661
27713
|
|
|
27662
27714
|
.pane--preview {
|
|
@@ -27677,7 +27729,7 @@ a {
|
|
|
27677
27729
|
font-size: 12px;
|
|
27678
27730
|
opacity: 0.7;
|
|
27679
27731
|
}
|
|
27680
|
-
`]}willUpdate(e){e.has("value")&&(this.draft=this.value)}get currentValue(){return this.draft}focusInput(){this.updateComplete.then((()=>this.textarea?.focus()))}get highlighted(){if(!this.draft)return"";try{return
|
|
27732
|
+
`]}willUpdate(e){e.has("value")&&(this.draft=this.value)}get currentValue(){return this.draft}focusInput(){this.updateComplete.then((()=>this.textarea?.focus()))}get highlighted(){if(!this.draft)return"";try{return SH.highlight(this.draft,{language:"xml"}).value}catch{return this.draft.replace(/[&<>]/g,(e=>({"&":"&","<":"<",">":">"}[e])))}}get lineCount(){return this.draft?this.draft.split("\n").length:1}render(){const e=VW(this.draft),t=[];for(let e=1;e<=this.lineCount;e+=1)t.push(R`<div>${e}</div>`);return R`
|
|
27681
27733
|
<div class="bar" part="source-bar">
|
|
27682
27734
|
<span>HTML</span>
|
|
27683
27735
|
<span class="actions">
|
|
@@ -27727,7 +27779,7 @@ a {
|
|
|
27727
27779
|
${this.draft.trim()?R`<nile-wysiwyg-preview .content=${e}></nile-wysiwyg-preview>`:R`<span class="preview-empty">Nothing to preview</span>`}
|
|
27728
27780
|
</div>
|
|
27729
27781
|
</div>
|
|
27730
|
-
`}};e([de({type:String})],
|
|
27782
|
+
`}};e([de({type:String})],oq.prototype,"value",void 0),e([pe("textarea")],oq.prototype,"textarea",void 0),e([pe(".hl > code")],oq.prototype,"highlightEl",void 0),e([pe(".linenos-inner")],oq.prototype,"linenosEl",void 0),e([pe(".body")],oq.prototype,"bodyEl",void 0),e([he()],oq.prototype,"draft",void 0),e([he()],oq.prototype,"splitRatio",void 0),e([he()],oq.prototype,"splitDragging",void 0),oq=e([ce("nile-wysiwyg-source-view")],oq);let rq=class extends Fe{constructor(){super(...arguments),this.open=!1,this.urlValue="",this.error=""}static get styles(){return[s`
|
|
27731
27783
|
:host {
|
|
27732
27784
|
font-family: var(
|
|
27733
27785
|
--nile-font-family-sans-serif,
|
|
@@ -27749,7 +27801,7 @@ a {
|
|
|
27749
27801
|
min-width: 340px;
|
|
27750
27802
|
max-width: 420px;
|
|
27751
27803
|
padding: 12px;
|
|
27752
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
27804
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
27753
27805
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
27754
27806
|
border-radius: 8px;
|
|
27755
27807
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
@@ -27794,7 +27846,7 @@ a {
|
|
|
27794
27846
|
>
|
|
27795
27847
|
</div>
|
|
27796
27848
|
</div>
|
|
27797
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
27849
|
+
`}};e([de({type:Boolean,reflect:!0})],rq.prototype,"open",void 0),e([he()],rq.prototype,"urlValue",void 0),e([he()],rq.prototype,"error",void 0),rq=e([ce("nile-wysiwyg-embed-panel")],rq);let sq=class extends Fe{constructor(){super(...arguments),this.open=!1,this.error=""}static get styles(){return[s`
|
|
27798
27850
|
:host {
|
|
27799
27851
|
font-family: var(
|
|
27800
27852
|
--nile-font-family-sans-serif,
|
|
@@ -27815,7 +27867,7 @@ a {
|
|
|
27815
27867
|
gap: 8px;
|
|
27816
27868
|
min-width: 280px;
|
|
27817
27869
|
padding: 12px;
|
|
27818
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
27870
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
27819
27871
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
27820
27872
|
border-radius: var(--nile-wysiwyg-radius, 8px);
|
|
27821
27873
|
box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
|
|
@@ -27869,7 +27921,7 @@ a {
|
|
|
27869
27921
|
|
|
27870
27922
|
button.primary {
|
|
27871
27923
|
background: var(--nile-colors-primary-600, var(--ng-componentcolors-utility-blue-600));
|
|
27872
|
-
color: var(--ng-colors-text-white);
|
|
27924
|
+
color: var(--nile-colors-white-base, var(--ng-colors-text-white));
|
|
27873
27925
|
}
|
|
27874
27926
|
`]}focusInput(){this.error="",this.updateComplete.then((()=>{this.nameInput&&(this.nameInput.value=""),this.nameInput?.focus()}))}handleSubmit(e){e.preventDefault();const t=(this.nameInput?.value??"").trim().replace(/\s+/g,"-");t?(this.error="",this.emit("wysiwyg-bookmark-apply",{id:t})):this.error="Enter a bookmark name."}render(){return R`
|
|
27875
27927
|
<form
|
|
@@ -27890,7 +27942,7 @@ a {
|
|
|
27890
27942
|
<button type="submit" class="primary">Insert</button>
|
|
27891
27943
|
</div>
|
|
27892
27944
|
</form>
|
|
27893
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
27945
|
+
`}};e([de({type:Boolean,reflect:!0})],sq.prototype,"open",void 0),e([he()],sq.prototype,"error",void 0),e([pe(".bookmark-panel__name")],sq.prototype,"nameInput",void 0),sq=e([ce("nile-wysiwyg-bookmark-panel")],sq);let aq=class extends Fe{constructor(){super(...arguments),this.open=!1,this.language=null}static get styles(){return[s`
|
|
27894
27946
|
:host {
|
|
27895
27947
|
font-family: var(
|
|
27896
27948
|
--nile-font-family-sans-serif,
|
|
@@ -27947,14 +27999,14 @@ a {
|
|
|
27947
27999
|
.value=${e}
|
|
27948
28000
|
@change=${e=>{const t=e.target.value;this.emit("wysiwyg-command",{name:"setCodeBlockLanguage",attrs:{language:t||null}})}}
|
|
27949
28001
|
>
|
|
27950
|
-
${
|
|
28002
|
+
${LX.map((t=>R`
|
|
27951
28003
|
<option value=${t.value} ?selected=${t.value===e}>
|
|
27952
28004
|
${t.label}
|
|
27953
28005
|
</option>
|
|
27954
28006
|
`))}
|
|
27955
28007
|
</select>
|
|
27956
28008
|
</span>
|
|
27957
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
28009
|
+
`}};e([de({type:Boolean,reflect:!0})],aq.prototype,"open",void 0),e([de({type:String})],aq.prototype,"language",void 0),aq=e([ce("nile-wysiwyg-code-menu")],aq);const lq="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);const Mq=[{title:"Formatting",items:[{keys:["Mod-B"],label:"Bold"},{keys:["Mod-I"],label:"Italic"},{keys:["Mod-U"],label:"Underline"},{keys:["Mod-Shift-X"],label:"Strikethrough"},{keys:["Mod-,"],label:"Subscript"},{keys:["Mod-."],label:"Superscript"}]},{title:"Blocks",items:[{keys:["Ctrl-Shift-0"],label:"Paragraph"},{keys:["Ctrl-Shift-1…6"],label:"Heading 1–6"},{keys:["Mod-Shift-8"],label:"Bulleted list"},{keys:["Mod-Shift-7"],label:"Numbered list"},{keys:["Mod-Shift-9"],label:"Blockquote"},{keys:["Mod-Alt-C"],label:"Code block"},{keys:["Tab","Shift-Tab"],label:"Indent / outdent list item"},{keys:["Mod-]","Mod-["],label:"Indent / outdent block"},{keys:["Shift-Enter"],label:"Line break"}]},{title:"Editing & tools",items:[{keys:["Mod-Z"],label:"Undo"},{keys:["Mod-Shift-Z"],label:"Redo"},{keys:["Mod-K"],label:"Insert or edit link"},{keys:["Mod-F"],label:"Find & replace"},{keys:["Mod-Shift-V"],label:"Paste without formatting"},{keys:["Mod-/"],label:"This dialog"}]},{title:"Typing shortcuts",items:[{keys:["# + space"],label:"Heading (## for level 2 …)"},{keys:["- + space"],label:"Bulleted list"},{keys:["1. + space"],label:"Numbered list"},{keys:["[] + space"],label:"Checklist"},{keys:["> + space"],label:"Blockquote"},{keys:["```"],label:"Code block"},{keys:["**text**"],label:"Bold as you type"},{keys:["URL + space"],label:"Automatic link"},{keys:["/"],label:"Command menu"},{keys:[": + name"],label:"Emoji picker"}]}];let cq=class extends Fe{constructor(){super(...arguments),this.open=!1,this.previousBodyOverflow=null}static get styles(){return[s`
|
|
27958
28010
|
/* Fixed so the dialog overlays the viewport instead of being
|
|
27959
28011
|
clipped by a small editor. */
|
|
27960
28012
|
:host {
|
|
@@ -27989,7 +28041,7 @@ a {
|
|
|
27989
28041
|
overflow-y: auto;
|
|
27990
28042
|
overscroll-behavior: contain;
|
|
27991
28043
|
outline: none;
|
|
27992
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
28044
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
27993
28045
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
27994
28046
|
border-radius: 10px;
|
|
27995
28047
|
box-shadow: var(
|
|
@@ -28083,7 +28135,7 @@ a {
|
|
|
28083
28135
|
</button>
|
|
28084
28136
|
</div>
|
|
28085
28137
|
<div class="help__columns">
|
|
28086
|
-
${
|
|
28138
|
+
${Mq.map((e=>R`
|
|
28087
28139
|
<div>
|
|
28088
28140
|
<div class="help__group-title">${e.title}</div>
|
|
28089
28141
|
${e.items.map((e=>R`
|
|
@@ -28091,7 +28143,7 @@ a {
|
|
|
28091
28143
|
<span>${e.label}</span>
|
|
28092
28144
|
<span class="help__keys">
|
|
28093
28145
|
${e.keys.map(((e,t)=>{return R`${t>0?" / ":B}<kbd
|
|
28094
|
-
>${i=e,i.split("-").map((e=>{switch(e){case"Mod":return
|
|
28146
|
+
>${i=e,i.split("-").map((e=>{switch(e){case"Mod":return lq?"⌘":"Ctrl";case"Shift":return lq?"⇧":"Shift";case"Alt":return lq?"⌥":"Alt";case"Ctrl":return lq?"⌃":"Ctrl";default:return e}})).join(lq?"":"+")}</kbd
|
|
28095
28147
|
>`;var i}))}
|
|
28096
28148
|
</span>
|
|
28097
28149
|
</div>
|
|
@@ -28100,7 +28152,7 @@ a {
|
|
|
28100
28152
|
`))}
|
|
28101
28153
|
</div>
|
|
28102
28154
|
</div>
|
|
28103
|
-
`:B}};e([de({type:Boolean,reflect:!0})],
|
|
28155
|
+
`:B}};e([de({type:Boolean,reflect:!0})],cq.prototype,"open",void 0),e([pe(".help__panel")],cq.prototype,"panelEl",void 0),cq=e([ce("nile-wysiwyg-shortcut-help")],cq);const gq=[{label:"Align left",icon:"format_align_left",command:"setImageAlign",attrs:{align:"left"},active:e=>"left"===e.imageAlign},{label:"Align center",icon:"format_align_middle",command:"setImageAlign",attrs:{align:"center"},active:e=>"center"===e.imageAlign},{label:"Align right",icon:"format_align_right",command:"setImageAlign",attrs:{align:"right"},active:e=>"right"===e.imageAlign},{label:"Toggle caption",icon:"ng-captions",command:"toggleImageCaption",active:e=>e.imageIsFigure},{label:"Original size",text:"1:1",command:"setImageWidth",attrs:{width:null}},{label:"Delete image",icon:"ng-trash-01",command:"deleteImage"}];let uq=class extends Fe{constructor(){super(...arguments),this.open=!1}static get styles(){return[s`
|
|
28104
28156
|
:host {
|
|
28105
28157
|
font-family: var(
|
|
28106
28158
|
--nile-font-family-sans-serif,
|
|
@@ -28119,7 +28171,7 @@ a {
|
|
|
28119
28171
|
display: flex;
|
|
28120
28172
|
gap: 2px;
|
|
28121
28173
|
padding: 4px;
|
|
28122
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
28174
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
28123
28175
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
28124
28176
|
border-radius: 8px;
|
|
28125
28177
|
box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
|
|
@@ -28151,7 +28203,7 @@ a {
|
|
|
28151
28203
|
}
|
|
28152
28204
|
`]}render(){const e=this.toolbarState;return R`
|
|
28153
28205
|
<div class="menu" part="image-menu" @mousedown=${e=>e.preventDefault()}>
|
|
28154
|
-
${
|
|
28206
|
+
${gq.map((t=>R`
|
|
28155
28207
|
<button
|
|
28156
28208
|
type="button"
|
|
28157
28209
|
title=${t.label}
|
|
@@ -28163,7 +28215,7 @@ a {
|
|
|
28163
28215
|
</button>
|
|
28164
28216
|
`))}
|
|
28165
28217
|
</div>
|
|
28166
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
28218
|
+
`}};e([de({type:Boolean,reflect:!0})],uq.prototype,"open",void 0),e([de({attribute:!1})],uq.prototype,"toolbarState",void 0),uq=e([ce("nile-wysiwyg-image-menu")],uq);const dq=[{label:"Align left",icon:"format_align_left",command:"setEmbedAlign",attrs:{align:"left"},active:e=>"left"===e.embedAlign||null===e.embedAlign},{label:"Align center",icon:"format_align_middle",command:"setEmbedAlign",attrs:{align:"center"},active:e=>"center"===e.embedAlign},{label:"Align right",icon:"format_align_right",command:"setEmbedAlign",attrs:{align:"right"},active:e=>"right"===e.embedAlign},{label:"Delete video",icon:"ng-trash-01",command:"deleteEmbed"}];let hq=class extends Fe{constructor(){super(...arguments),this.open=!1}static get styles(){return[s`
|
|
28167
28219
|
:host {
|
|
28168
28220
|
font-family: var(
|
|
28169
28221
|
--nile-font-family-sans-serif,
|
|
@@ -28182,7 +28234,7 @@ a {
|
|
|
28182
28234
|
display: flex;
|
|
28183
28235
|
gap: 2px;
|
|
28184
28236
|
padding: 4px;
|
|
28185
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
28237
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
28186
28238
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
28187
28239
|
border-radius: 8px;
|
|
28188
28240
|
box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
|
|
@@ -28214,7 +28266,7 @@ a {
|
|
|
28214
28266
|
}
|
|
28215
28267
|
`]}render(){const e=this.toolbarState;return R`
|
|
28216
28268
|
<div class="menu" part="embed-menu" @mousedown=${e=>e.preventDefault()}>
|
|
28217
|
-
${
|
|
28269
|
+
${dq.map((t=>R`
|
|
28218
28270
|
<button
|
|
28219
28271
|
type="button"
|
|
28220
28272
|
title=${t.label}
|
|
@@ -28226,7 +28278,7 @@ a {
|
|
|
28226
28278
|
</button>
|
|
28227
28279
|
`))}
|
|
28228
28280
|
</div>
|
|
28229
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
28281
|
+
`}};e([de({type:Boolean,reflect:!0})],hq.prototype,"open",void 0),e([de({attribute:!1})],hq.prototype,"toolbarState",void 0),hq=e([ce("nile-wysiwyg-embed-menu")],hq);const Nq=[{key:"punctuation",label:"Punctuation",icon:"¶",chars:["–","—","…","‘","’","“","”","‚","„","«","»","‹","›","§","¶","†","‡","•","·","¡","¿","′","″","‰"]},{key:"currency",label:"Currency",icon:"$",chars:["$","€","£","¥","₹","¢","₩","₽","₺","₪","₫","₦","₴","₱","฿","₿"]},{key:"math",label:"Math",icon:"∑",chars:["±","×","÷","≠","≈","≤","≥","¬","∞","∑","∏","√","∫","∂","∆","∇","∈","∉","∩","∪","⊂","⊃","°","µ","‰","½","⅓","¼","¾","⅛"]},{key:"arrows",label:"Arrows",icon:"→",chars:["←","→","↑","↓","↔","↕","⇐","⇒","⇑","⇓","⇔","↩","↪","↖","↗","↘","↙","⟵","⟶"]},{key:"latin",label:"Latin",icon:"Á",chars:["À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ñ","Ò","Ó","Ô","Õ","Ö","Ø","Ù","Ú","Û","Ü","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ñ","ò","ó","ô","õ","ö","ø","ù","ú","û","ü","ÿ"]},{key:"symbols",label:"Symbols",icon:"★",chars:["©","®","™","℠","№","℮","✓","✗","★","☆","♠","♣","♥","♦","☀","☁","☂","♻","⚠","⌘","⌥","⇧","⏎","⌫"]}];let pq=class extends Fe{constructor(){super(...arguments),this.open=!1,this.category=Nq[0].key}static get styles(){return[s`
|
|
28230
28282
|
:host {
|
|
28231
28283
|
font-family: var(
|
|
28232
28284
|
--nile-font-family-sans-serif,
|
|
@@ -28244,7 +28296,7 @@ a {
|
|
|
28244
28296
|
.panel {
|
|
28245
28297
|
width: 316px;
|
|
28246
28298
|
padding: 8px;
|
|
28247
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
28299
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
28248
28300
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
28249
28301
|
border-radius: 8px;
|
|
28250
28302
|
box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
|
|
@@ -28287,7 +28339,7 @@ a {
|
|
|
28287
28339
|
.char:hover {
|
|
28288
28340
|
background: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));
|
|
28289
28341
|
}
|
|
28290
|
-
`]}handleKeydown(e){"Escape"===e.key&&(e.stopPropagation(),this.emit("wysiwyg-char-cancel"))}render(){const e=
|
|
28342
|
+
`]}handleKeydown(e){"Escape"===e.key&&(e.stopPropagation(),this.emit("wysiwyg-char-cancel"))}render(){const e=Nq.find((e=>e.key===this.category))??Nq[0];return R`
|
|
28291
28343
|
<div
|
|
28292
28344
|
class="panel"
|
|
28293
28345
|
part="special-chars"
|
|
@@ -28299,7 +28351,7 @@ a {
|
|
|
28299
28351
|
.value=${this.category}
|
|
28300
28352
|
@nile-change=${e=>{this.category=e.detail.value}}
|
|
28301
28353
|
>
|
|
28302
|
-
${
|
|
28354
|
+
${Nq.map((e=>R`
|
|
28303
28355
|
<nile-button-toggle
|
|
28304
28356
|
value=${e.key}
|
|
28305
28357
|
title=${e.label}
|
|
@@ -28321,7 +28373,7 @@ a {
|
|
|
28321
28373
|
`))}
|
|
28322
28374
|
</div>
|
|
28323
28375
|
</div>
|
|
28324
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
28376
|
+
`}};e([de({type:Boolean,reflect:!0})],pq.prototype,"open",void 0),e([he()],pq.prototype,"category",void 0),pq=e([ce("nile-wysiwyg-special-chars")],pq);let Dq=class extends Fe{constructor(){super(...arguments),this.open=!1,this.filter=""}static get styles(){return[s`
|
|
28325
28377
|
:host {
|
|
28326
28378
|
font-family: var(
|
|
28327
28379
|
--nile-font-family-sans-serif,
|
|
@@ -28339,7 +28391,7 @@ a {
|
|
|
28339
28391
|
.panel {
|
|
28340
28392
|
width: 316px;
|
|
28341
28393
|
padding: 8px;
|
|
28342
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
28394
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
28343
28395
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
28344
28396
|
border-radius: 8px;
|
|
28345
28397
|
box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
|
|
@@ -28392,7 +28444,7 @@ a {
|
|
|
28392
28444
|
color: var(--nile-colors-neutral-500, var(--ng-colors-text-quaternary-500));
|
|
28393
28445
|
text-align: center;
|
|
28394
28446
|
}
|
|
28395
|
-
`]}focusInput(){this.filter="",this.updateComplete.then((()=>{this.searchInput&&(this.searchInput.value=""),this.searchInput?.focus()}))}handleKeydown(e){"Escape"===e.key&&(e.stopPropagation(),this.emit("wysiwyg-emoji-cancel"))}render(){const e=this.filter.trim().toLowerCase(),t=e?
|
|
28447
|
+
`]}focusInput(){this.filter="",this.updateComplete.then((()=>{this.searchInput&&(this.searchInput.value=""),this.searchInput?.focus()}))}handleKeydown(e){"Escape"===e.key&&(e.stopPropagation(),this.emit("wysiwyg-emoji-cancel"))}render(){const e=this.filter.trim().toLowerCase(),t=e?PX.filter((t=>t.name.includes(e))):PX;return R`
|
|
28396
28448
|
<div class="panel" part="emoji-picker" @keydown=${this.handleKeydown}>
|
|
28397
28449
|
<input
|
|
28398
28450
|
class="emoji-picker__search"
|
|
@@ -28416,7 +28468,7 @@ a {
|
|
|
28416
28468
|
${0===t.length?R`<div class="empty" style="grid-column: 1 / -1">No emoji found</div>`:""}
|
|
28417
28469
|
</div>
|
|
28418
28470
|
</div>
|
|
28419
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
28471
|
+
`}};e([de({type:Boolean,reflect:!0})],Dq.prototype,"open",void 0),e([he()],Dq.prototype,"filter",void 0),e([pe(".emoji-picker__search")],Dq.prototype,"searchInput",void 0),Dq=e([ce("nile-wysiwyg-emoji-picker")],Dq);let yq=class extends Fe{constructor(){super(...arguments),this.open=!1,this.heading="",this.emptyText="Nothing configured.",this.items=[]}static get styles(){return[s`
|
|
28420
28472
|
:host {
|
|
28421
28473
|
font-family: var(
|
|
28422
28474
|
--nile-font-family-sans-serif,
|
|
@@ -28437,7 +28489,7 @@ a {
|
|
|
28437
28489
|
overflow-y: auto;
|
|
28438
28490
|
overscroll-behavior: contain;
|
|
28439
28491
|
padding: 6px;
|
|
28440
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
28492
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
28441
28493
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
28442
28494
|
border-radius: 8px;
|
|
28443
28495
|
box-shadow: var(--nile-wysiwyg-popover-shadow, 0 4px 12px rgba(16, 24, 40, 0.12));
|
|
@@ -28505,7 +28557,7 @@ a {
|
|
|
28505
28557
|
</button>
|
|
28506
28558
|
`))}
|
|
28507
28559
|
</div>
|
|
28508
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
28560
|
+
`}};e([de({type:Boolean,reflect:!0})],yq.prototype,"open",void 0),e([de({type:String})],yq.prototype,"heading",void 0),e([de({type:String,attribute:"empty-text"})],yq.prototype,"emptyText",void 0),e([de({attribute:!1})],yq.prototype,"items",void 0),yq=e([ce("nile-wysiwyg-insert-menu")],yq);let Iq=class extends Fe{constructor(){super(...arguments),this.open=!1,this.latexValue="",this.display="inline"}static get styles(){return[s`
|
|
28509
28561
|
:host {
|
|
28510
28562
|
font-family: var(
|
|
28511
28563
|
--nile-font-family-sans-serif,
|
|
@@ -28527,7 +28579,7 @@ a {
|
|
|
28527
28579
|
min-width: 340px;
|
|
28528
28580
|
max-width: 420px;
|
|
28529
28581
|
padding: 12px;
|
|
28530
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
28582
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
28531
28583
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
28532
28584
|
border-radius: 8px;
|
|
28533
28585
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
@@ -28593,7 +28645,7 @@ a {
|
|
|
28593
28645
|
>
|
|
28594
28646
|
</div>
|
|
28595
28647
|
</div>
|
|
28596
|
-
`}};e([de({type:Boolean,reflect:!0})],
|
|
28648
|
+
`}};e([de({type:Boolean,reflect:!0})],Iq.prototype,"open",void 0),e([he()],Iq.prototype,"latexValue",void 0),e([he()],Iq.prototype,"display",void 0),Iq=e([ce("nile-wysiwyg-math-panel")],Iq);let jq=class extends Fe{constructor(){super(...arguments),this.open=!1}static get styles(){return[s`
|
|
28597
28649
|
:host {
|
|
28598
28650
|
font-family: var(
|
|
28599
28651
|
--nile-font-family-sans-serif,
|
|
@@ -28615,7 +28667,7 @@ a {
|
|
|
28615
28667
|
width: 460px;
|
|
28616
28668
|
max-width: 90vw;
|
|
28617
28669
|
padding: 14px;
|
|
28618
|
-
background: var(--nile-wysiwyg-popover-bg, var(--ng-colors-bg-primary));
|
|
28670
|
+
background: var(--nile-wysiwyg-popover-bg, var(--nile-colors-white-base, var(--ng-colors-bg-primary)));
|
|
28619
28671
|
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-primary));
|
|
28620
28672
|
border-radius: 8px;
|
|
28621
28673
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
@@ -28672,7 +28724,7 @@ a {
|
|
|
28672
28724
|
<nile-button variant="primary" @click=${()=>this.submit()}>Insert</nile-button>
|
|
28673
28725
|
</div>
|
|
28674
28726
|
</div>
|
|
28675
|
-
`}};e([de({type:Boolean,reflect:!0})],MX.prototype,"open",void 0),e([pe("textarea")],MX.prototype,"textarea",void 0),MX=e([ce("nile-wysiwyg-markdown-panel")],MX);const cX=[{key:"heading1",label:"Heading 1",hint:"#",command:"heading",attrs:{level:1}},{key:"heading2",label:"Heading 2",hint:"##",command:"heading",attrs:{level:2}},{key:"heading3",label:"Heading 3",hint:"###",command:"heading",attrs:{level:3}},{key:"bulletList",label:"Bulleted list",hint:"-",command:"bulletList"},{key:"orderedList",label:"Numbered list",hint:"1.",command:"orderedList"},{key:"taskList",label:"Checklist",hint:"[ ]",command:"taskList"},{key:"blockquote",label:"Blockquote",hint:">",command:"blockquote"},{key:"codeBlock",label:"Code block",hint:"```",command:"codeBlock"},{key:"table",label:"Table",hint:"3×3",command:"insertTable",attrs:{rows:3,cols:3}},{key:"image",label:"Image",command:"openImage"},{key:"embed",label:"Video embed",hint:"YouTube…",command:"openEmbed"},{key:"bookmark",label:"Bookmark (anchor)",command:"openBookmark"},{key:"horizontalRule",label:"Divider",hint:"---",command:"horizontalRule"}];let gX=0;let uX=class extends Fe{static get styles(){return[JP]}constructor(){super(),this.value="",this.placeholder="",this.disabled=!1,this.readonly=!1,this.toolbar=LJ,this.bubbleMenu=!1,this.sanitize=!0,this.singleLine=!1,this.name="",this.required=!1,this.allowBase64Images=!0,this.uploadFromComputer=!1,this.imageMaxFileSize=2097152,this.mentions={},this.noSlashCommands=!1,this.noEmoji=!1,this.maxLength=0,this.showCounter=!1,this.stickyToolbar=!1,this.snippets=[],this.mergeFields=[],this.templates=[],this.autosaveInterval=0,this.pasteAsPlainText=!1,this.noMarkdownPaste=!1,this.noTextTransform=!1,this.fullscreen=!1,this.showBlocks=!1,this.hasFocus=!1,this.sourceMode=!1,this.counter={words:0,characters:0},this.insertMenuMode=null,this.mentionMatch=null,this.slashMatch=null,this.emojiMatch=null,this.activeSuggestSource=null,this.suggestDismissed=null,this.mentionQueryToken="",this.lastAutosaveValue="",this.defaultValue="",this.syncingValue=!1,this.pendingChange=!1,this.previousBodyOverflow=null,this.onAnyScroll=()=>{this.bubbleMenuEl&&[this.bubbleMenuEl,this.tableMenuEl,this.codeMenuEl,this.imageMenuEl,this.embedMenuEl].forEach((e=>{e?.open&&(e.open=!1)}))},this.painterDragActive=!1,this.onPainterPointerDown=()=>{this.view&&mJ(this.view.state)&&(this.painterDragActive=!0)},this.onPainterPointerUp=()=>{this.painterDragActive&&(this.painterDragActive=!1,requestAnimationFrame((()=>{if(!this.view)return;if(this.view.state.selection.empty||!mJ(this.view.state))return;const e=TJ(this.view.state);e&&this.view.dispatch(e)})))},this.onOutsidePointerDown=e=>{const t=this.floatingPanels.filter((e=>!!e&&e.open));if(!t.length)return;const i=e.composedPath();if(t.some((e=>i.includes(e))))return;const n=i.includes(this)||!!this.shadowRoot&&i.includes(this.shadowRoot);this.closeAllPanels(n)},"function"==typeof this.attachInternals&&(this.internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this.hasUpdated&&!this.view&&this.updateComplete.then((()=>this.mountView())),document.addEventListener("pointerdown",this.onOutsidePointerDown,!0),document.addEventListener("mouseup",this.onPainterPointerUp),document.addEventListener("scroll",this.onAnyScroll,{capture:!0,passive:!0}),this.syncAuthoredToolbar(),this.syncAuthoredBubble(),this.toolbarObserver||(this.toolbarObserver=new MutationObserver((()=>{this.syncAuthoredToolbar(),this.syncAuthoredBubble()}))),this.toolbarObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["name","label","icon","divider","overflow"]})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onOutsidePointerDown,!0),document.removeEventListener("mouseup",this.onPainterPointerUp),document.removeEventListener("scroll",this.onAnyScroll,{capture:!0}),this.surfaceEl?.removeEventListener("scroll",this.onAnyScroll),this.toolbarObserver?.disconnect(),this.changeTimer&&clearTimeout(this.changeTimer),this.autosaveTimer&&clearInterval(this.autosaveTimer),null!==this.previousBodyOverflow&&(document.body.style.overflow=this.previousBodyOverflow,this.previousBodyOverflow=null),this.view?.destroy(),this.view=void 0}firstUpdated(){this.defaultValue=this.value,this.syncAuthoredToolbar(),this.syncAuthoredBubble(),this.mountView()}syncAuthoredToolbar(){const e=this.querySelectorAll("nile-wysiwyg-toolbar-item"),t=e.length?Array.from(e).map((e=>({name:e.hasAttribute("divider")?"|":e.getAttribute("name")||"",label:e.getAttribute("label")||void 0,icon:e.getAttribute("icon")||void 0,overflow:e.hasAttribute("overflow")||void 0}))).filter((e=>e.name)):void 0;JSON.stringify(t)!==JSON.stringify(this.authoredToolbar)&&(this.authoredToolbar=t)}syncAuthoredBubble(){const e=this.querySelectorAll("nile-wysiwyg-bubble-item"),t=e.length?Array.from(e).map((e=>({name:e.hasAttribute("divider")?"|":e.getAttribute("name")||"",label:e.getAttribute("label")||void 0,icon:e.getAttribute("icon")||void 0}))).filter((e=>e.name)):void 0;JSON.stringify(t)!==JSON.stringify(this.authoredBubble)&&(this.authoredBubble=t)}updated(e){if(e.has("value")&&this.view&&!this.syncingValue){xW(this.view.state.doc)!==this.value&&this.setContent(this.value)}this.syncingValue=!1,(e.has("disabled")||e.has("readonly"))&&this.view&&this.view.setProps({}),e.has("placeholder")&&this.view&&this.view.dispatch(this.view.state.tr),e.has("required")&&this.updateValidity(),e.has("autosaveInterval")&&this.restartAutosave(),(e.has("pasteAsPlainText")||e.has("fullscreen")||e.has("showBlocks"))&&this.view&&(this.toolbarState=this.snapshotToolbar(this.view.state)),e.has("noTextTransform")&&this.view&&!e.has("value")&&this.view.updateState(this.buildState(this.view.state.doc)),e.has("fullscreen")&&(this.fullscreen?null===this.previousBodyOverflow&&(this.previousBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden"):null!==this.previousBodyOverflow&&(document.body.style.overflow=this.previousBodyOverflow,this.previousBodyOverflow=null))}restartAutosave(){this.autosaveTimer&&clearInterval(this.autosaveTimer),this.autosaveTimer=void 0,this.autosaveInterval>0&&(this.lastAutosaveValue=this.value,this.autosaveTimer=setInterval((()=>{this.view&&this.value!==this.lastAutosaveValue&&(this.lastAutosaveValue=this.value,this.emit("nile-autosave",this.buildChangeDetail(this.view.state.doc)))}),this.autosaveInterval))}buildState(e){return fJ({schema:oW,doc:e,getPlaceholder:()=>this.placeholder,singleLine:this.singleLine,onLinkShortcut:()=>this.openLinkEditor(),onFindShortcut:()=>this.openFindBar(),onShortcutHelp:()=>this.openShortcutHelp(),onImageFiles:(e,t)=>{for(const i of e)this.insertImageFile(i,t)},mentions:{getTriggers:()=>Object.keys(this.mentions),onChange:e=>{this.mentionMatch=e,this.updateSuggestList()},onKeyDown:e=>this.handleSuggestKey(e,"mention")},slashCommands:{onChange:e=>{this.slashMatch=e,this.updateSuggestList()},onKeyDown:e=>this.handleSuggestKey(e,"slash")},emoji:{onChange:e=>{this.emojiMatch=e,this.updateSuggestList()},onKeyDown:e=>this.handleSuggestKey(e,"emoji")},getMaxLength:()=>this.maxLength,getForcePlainText:()=>this.pasteAsPlainText,getMarkdownPaste:()=>!this.noMarkdownPaste,getSanitize:()=>this.sanitize,textTransform:!this.noTextTransform})}snapshotToolbar(e){return{...f$(e),pasteAsPlainText:this.pasteAsPlainText,fullscreen:this.fullscreen,showBlocks:this.showBlocks,formatPainter:mJ(e)}}mountView(){if(this.view||!this.surfaceEl)return;let e=this.value?mW(oW,this.value,this.sanitize):void 0;e&&this.singleLine&&(e=X$(e)),this.view=new WP(this.surfaceEl,{state:this.buildState(e),dispatchTransaction:e=>this.handleTransaction(e),editable:()=>!this.disabled&&!this.readonly,transformPastedHTML:e=>{const t=XB(e)?e$(e):e;return this.sanitize?yW(t):t},handleDOMEvents:{mousedown:()=>(this.closeSpecialChars(!1),this.closeInsertMenu(!1),!1),focus:()=>(this.hasFocus=!0,this.updateOverlays(),this.emit("nile-focus"),!1),blur:(e,t)=>{const i=t.relatedTarget;return i&&(this.shadowRoot?.contains(i)||this.contains(i))||(this.hasFocus=!1,this.flushChange(),this.updateOverlays(),this.closeSuggestList(),this.closeSpecialChars(!1),this.emit("nile-blur")),!1}},attributes:{role:"textbox","aria-multiline":this.singleLine?"false":"true"},nodeViews:{task_item:(e,t,i)=>new bJ(e,t,i),image:(e,t,i)=>new d$(e,t,i),figure:(e,t,i)=>new h$(e,t,i),embed:(e,t,i)=>new N$(e,t,i),styleBlock:e=>new m$(e),math:e=>new x$(e,this.mathRenderer)}}),this.view.dom.addEventListener("mousedown",this.onPainterPointerDown),this.surfaceEl.addEventListener("scroll",this.onAnyScroll,{passive:!0}),this.toolbarState=this.snapshotToolbar(this.view.state),this.counter=bW(this.view.state.doc),this.syncFormValue(this.view.state.doc)}handleTransaction(e){if(!this.view)return;const t=this.view.state.apply(e);if(this.view.updateState(t),e.selectionSet&&!t.selection.empty&&mJ(t)&&!this.painterDragActive){const e=TJ(t);if(e)return void this.view.dispatch(e)}if(this.toolbarState=this.snapshotToolbar(t),this.emit("nile-selection-change",this.toolbarState),this.updateOverlays(),this.findBarEl?.open){const e=aF(t);this.findBarEl.matchCount=e.matches.length,this.findBarEl.activeIndex=e.activeIndex}if(e.docChanged){const e=this.buildChangeDetail(t.doc);this.syncingValue=!0,this.value=e.value,this.syncFormValue(t.doc),this.emit("nile-input",e),this.counter=bW(t.doc),this.emit("nile-word-count",this.counter),this.scheduleChange()}}buildChangeDetail(e){const t=LW(e)?"":xW(e);return{value:t,json:OW(e),content:t}}scheduleChange(){this.pendingChange=!0,this.changeTimer&&clearTimeout(this.changeTimer),this.changeTimer=setTimeout((()=>this.flushChange()),250)}flushChange(){this.pendingChange&&this.view&&(this.pendingChange=!1,this.changeTimer&&clearTimeout(this.changeTimer),this.emit("nile-change",this.buildChangeDetail(this.view.state.doc)))}syncFormValue(e){if(!this.internals)return;const t=LW(e)?"":xW(e);this.internals.setFormValue(""===t?null:t),this.updateValidity()}updateValidity(){if(!this.internals)return;const e=this.view?LW(this.view.state.doc):""===this.value;this.required&&e?this.internals.setValidity({valueMissing:!0},"Please fill out this field.",this.surfaceEl??void 0):this.internals.setValidity({})}formResetCallback(){this.setContent(this.defaultValue)}formDisabledCallback(e){this.disabled=e}checkValidity(){return!this.internals||this.internals.checkValidity()}reportValidity(){return!this.internals||this.internals.reportValidity()}positionOverlay(e,t,i){if(!this.view||!this.baseEl)return;const n=i??this.view.state.selection.from,o=this.view.coordsAtPos(n),r=this.baseEl.getBoundingClientRect(),s=Math.max(4,Math.min(o.left-r.left,r.width-e.offsetWidth-4));e.style.left=`${s}px`,e.style.top="above"===t?`${Math.max(4,o.top-r.top-e.offsetHeight-8)}px`:o.bottom-r.top+6+"px"}positionOverlayBelowAnchor(e,t){if(!this.baseEl)return;const i=this.baseEl.getBoundingClientRect(),n=t.getBoundingClientRect(),o=Math.max(4,Math.min(n.left-i.left,i.width-e.offsetWidth-4));e.style.right="auto",e.style.left=`${o}px`,e.style.top=n.bottom-i.top+6+"px"}toolbarButton(e){return this.toolbarEl?.shadowRoot?.querySelector(`button[aria-label="${e}"]`)??null}updateOverlays(){if(!this.bubbleMenuEl)return;const e=this.linkEditorEl?.open||this.imagePanelEl?.open||this.embedPanelEl?.open||this.bookmarkPanelEl?.open||this.emojiPickerEl?.open,t=this.bubbleMenu&&this.hasFocus&&!!this.toolbarState&&!this.toolbarState.selectionEmpty&&!this.toolbarState.imageSelected&&!this.toolbarState.embedSelected&&!e;if(this.bubbleMenuEl.open=t,t&&(this.bubbleMenuEl.toolbarState=this.toolbarState,this.bubbleMenuEl.updateComplete.then((()=>this.positionOverlay(this.bubbleMenuEl,"above")))),this.tableMenuEl){const t=this.hasFocus&&!!this.toolbarState&&this.toolbarState.inTable&&!e;this.tableMenuEl.open=t,t&&this.tableMenuEl.updateComplete.then((()=>this.positionOverlay(this.tableMenuEl,"below")))}if(this.codeMenuEl){const t=this.hasFocus&&!!this.toolbarState&&this.toolbarState.inCodeBlock&&!e;this.codeMenuEl.open=t,t&&(this.codeMenuEl.language=this.toolbarState.codeBlockLanguage??"",this.codeMenuEl.updateComplete.then((()=>this.positionOverlay(this.codeMenuEl,"above"))))}if(this.imageMenuEl){const t=this.hasFocus&&!!this.toolbarState&&this.toolbarState.imageSelected&&!e;this.imageMenuEl.open=t,t&&(this.imageMenuEl.toolbarState=this.toolbarState,this.imageMenuEl.updateComplete.then((()=>this.positionOverlay(this.imageMenuEl,"above"))))}if(this.embedMenuEl){const t=this.hasFocus&&!!this.toolbarState&&this.toolbarState.embedSelected&&!e;this.embedMenuEl.open=t,t&&(this.embedMenuEl.toolbarState=this.toolbarState,this.embedMenuEl.updateComplete.then((()=>this.positionOverlay(this.embedMenuEl,"above"))))}}openSpecialChars(){this.view&&this.specialCharsEl&&!this.disabled&&!this.readonly&&(this.specialCharsEl.open=!0,this.specialCharsEl.updateComplete.then((()=>this.positionOverlay(this.specialCharsEl,"below"))))}closeSpecialChars(e=!0){this.specialCharsEl&&(this.specialCharsEl.open=!1),e&&this.view?.focus()}insertSpecialChar(e){this.view&&(this.view.dispatch(this.view.state.tr.insertText(e).scrollIntoView()),this.view.focus())}openInsertMenu(e){if(!this.view||!this.insertMenuEl||this.disabled||this.readonly)return;this.insertMenuMode=e;const t=this.insertMenuEl;"merge"===e?(t.heading="Merge field",t.emptyText="No merge fields configured.",t.items=this.mergeFields.map((e=>({label:e.label,description:`{{${e.id}}}`})))):(t.heading="Template",t.emptyText="No templates configured.",t.items=this.templates.map((e=>({label:e.label,description:e.description})))),t.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),t.updateComplete.then((()=>this.positionOverlay(t,"below")))}closeInsertMenu(e=!0){this.insertMenuEl&&(this.insertMenuEl.open=!1),this.insertMenuMode=null,e&&this.view?.focus()}handleInsertSelect(e){const t=this.insertMenuMode;if(this.closeInsertMenu(),this.view)if("merge"===t){const t=this.mergeFields[e];t&&this.execCommand("insertMergeField",{id:t.id,label:t.label})}else if("template"===t){const t=this.templates[e];t&&this.insertHTML(t.html)}}insertMergeField(e,t){this.execCommand("insertMergeField",{id:e,label:t??null})}changeCase(e){this.execCommand("changeCase",{textCase:e})}openMathPanel(){this.view&&this.mathPanelEl&&!this.disabled&&!this.readonly&&(this.mathPanelEl.reset(),this.mathPanelEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.tableMenuEl&&(this.tableMenuEl.open=!1),this.mathPanelEl.updateComplete.then((()=>{const e=this.toolbarButton("Insert math (LaTeX)");e?this.positionOverlayBelowAnchor(this.mathPanelEl,e):this.positionOverlay(this.mathPanelEl,"below"),this.mathPanelEl.focusInput()})))}closeMathPanel(e=!0){this.mathPanelEl&&(this.mathPanelEl.open=!1),e&&this.view?.focus()}openMarkdownPanel(){this.view&&this.markdownPanelEl&&!this.disabled&&!this.readonly&&(this.markdownPanelEl.reset(),this.markdownPanelEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.tableMenuEl&&(this.tableMenuEl.open=!1),this.markdownPanelEl.updateComplete.then((()=>{const e=this.toolbarButton("Insert from Markdown");e?this.positionOverlayBelowAnchor(this.markdownPanelEl,e):this.positionOverlay(this.markdownPanelEl,"below"),this.markdownPanelEl.focusInput()})))}closeMarkdownPanel(e=!0){this.markdownPanelEl&&(this.markdownPanelEl.open=!1),e&&this.view?.focus()}applyMath(e,t){this.closeMathPanel(),this.execCommand("insertMath",{latex:e,mathDisplay:t})}insertMath(e,t="inline"){this.execCommand("insertMath",{latex:e,mathDisplay:t})}openEmojiPicker(){this.view&&this.emojiPickerEl&&!this.disabled&&!this.readonly&&(this.emojiPickerEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.tableMenuEl&&(this.tableMenuEl.open=!1),this.emojiPickerEl.updateComplete.then((()=>{this.positionOverlay(this.emojiPickerEl,"below"),this.emojiPickerEl.focusInput()})))}closeEmojiPicker(e=!0){this.emojiPickerEl&&(this.emojiPickerEl.open=!1),e&&this.view?.focus()}openEmbedPanel(){this.view&&this.embedPanelEl&&!this.disabled&&!this.readonly&&(this.embedPanelEl.reset(),this.embedPanelEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.tableMenuEl&&(this.tableMenuEl.open=!1),this.embedPanelEl.updateComplete.then((()=>{const e=this.toolbarButton("Embed video (YouTube, Vimeo, Loom)");e?this.positionOverlayBelowAnchor(this.embedPanelEl,e):this.positionOverlay(this.embedPanelEl,"below"),this.embedPanelEl.focusInput()})))}closeEmbedPanel(e=!0){this.embedPanelEl&&(this.embedPanelEl.open=!1),e&&this.view?.focus()}openBookmarkPanel(){this.view&&this.bookmarkPanelEl&&!this.disabled&&!this.readonly&&(this.bookmarkPanelEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.tableMenuEl&&(this.tableMenuEl.open=!1),this.bookmarkPanelEl.updateComplete.then((()=>{this.positionOverlay(this.bookmarkPanelEl,"below"),this.bookmarkPanelEl.focusInput()})))}closeBookmarkPanel(e=!0){this.bookmarkPanelEl&&(this.bookmarkPanelEl.open=!1),e&&this.view?.focus()}openImagePanel(){if(!this.view||!this.imagePanelEl||this.disabled||this.readonly)return;const e=TB(this.view.state);e?this.imagePanelEl.prefill({src:e.node.attrs.src,alt:e.node.attrs.alt??"",caption:e.isFigure?e.node.textContent:""}):this.imagePanelEl.reset(),this.imagePanelEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.tableMenuEl&&(this.tableMenuEl.open=!1),this.imagePanelEl.updateComplete.then((()=>{const e=this.toolbarButton("Insert image");e?this.positionOverlayBelowAnchor(this.imagePanelEl,e):this.positionOverlay(this.imagePanelEl,"below"),this.imagePanelEl.focusInput()}))}closeImagePanel(e=!0){this.imagePanelEl&&(this.imagePanelEl.open=!1),e&&this.view?.focus()}insertImageAt(e,t,i,n=null){if(this.view){if(null!==i){const e=this.view.state.doc.resolve(Math.min(i,this.view.state.doc.content.size));this.view.dispatch(this.view.state.tr.setSelection(hY.near(e)))}this.execCommand("insertImage",{src:e,alt:t,caption:n})}}async insertImageFile(e,t=null,i){if(!this.view)return;const n=i?.alt??null,o=i?.caption??null;if(!this.emit("nile-image-upload-request",{file:e,insert:(e,i)=>this.insertImageAt(e,i??n,t,o)},!0,!0,!0).defaultPrevented)if(this.uploadHandler){gX+=1;const i=`nile-upload-${gX}`,r=t??this.view.state.selection.from;this.view.dispatch(this.view.state.tr.setMeta(K$,{add:{id:i,pos:r}}));try{const{src:t,alt:r}=await this.uploadHandler(e),s=this.view?function(e,t){const i=K$.getState(e),n=i?.find(void 0,void 0,(e=>e.id===t));return n&&n.length?n[0].from:null}(this.view.state,i):null;this.view?.dispatch(this.view.state.tr.setMeta(K$,{remove:{id:i}})),this.insertImageAt(t,n??r??null,s,o)}catch(t){this.view?.dispatch(this.view.state.tr.setMeta(K$,{remove:{id:i}})),this.emit("nile-image-upload-error",{file:e,error:t})}}else if(this.allowBase64Images){const i=await function(e){return new Promise(((t,i)=>{const n=new FileReader;n.onload=()=>t(n.result),n.onerror=()=>i(n.error),n.readAsDataURL(e)}))}(e);this.insertImageAt(i,n,t,o)}}dismissKeyFor(e,t){return`${e}:${t.trigger}:${t.from}`}handleSuggestKey(e,t){if(this.activeSuggestSource!==t||!this.suggestListEl?.open)return!1;switch(e.key){case"ArrowDown":return this.suggestListEl.next(),!0;case"ArrowUp":return this.suggestListEl.prev(),!0;case"Enter":case"Tab":return this.suggestListEl.selectCurrent();case"Escape":{const e="mention"===t?this.mentionMatch:"slash"===t?this.slashMatch:this.emojiMatch;return e&&(this.suggestDismissed=this.dismissKeyFor(t,e)),this.closeSuggestList(),!0}default:return!1}}closeSuggestList(){this.suggestListEl&&(this.suggestListEl.open=!1),this.activeSuggestSource=null}updateSuggestList(){if(!this.suggestListEl||!this.view)return;const e=this.mentionMatch?.active?this.mentionMatch:null,t=!this.noSlashCommands&&this.slashMatch?.active?this.slashMatch:null,i=!this.noEmoji&&this.emojiMatch?.active?this.emojiMatch:null,n=e?"mention":t?"slash":i?"emoji":null,o=e??t??i;if(n&&o&&!this.disabled&&!this.readonly){if(this.suggestDismissed!==this.dismissKeyFor(n,o)){if(this.suggestDismissed=null,"mention"===n){const e=this.mentions[o.trigger]??[],t=o.query.toLowerCase();this.suggestListEl.items=e.filter((e=>e.label.toLowerCase().includes(t)));const i=`${o.trigger} ${o.query}`;this.mentionQueryToken=i,this.emit("nile-mention-query",{trigger:o.trigger,query:o.query,provide:e=>{this.mentionQueryToken===i&&Array.isArray(e)&&(this.suggestListEl.items=e.filter((e=>e&&"string"==typeof e.key&&"string"==typeof e.label)).map((e=>({key:e.key,label:e.label}))))}})}else if("slash"===n){const e=o.query.toLowerCase(),t=this.snippets.map((e=>({key:`snippet:${e.key}`,label:e.label,hint:"snippet"})));this.suggestListEl.items=[...cX,...t].filter((t=>t.label.toLowerCase().includes(e)))}else{const e=o.query.toLowerCase();if(this.suggestListEl.items=wJ.filter((t=>t.name.includes(e))).slice(0,12).map((e=>({key:e.name,label:`${e.char} ${e.name}`}))),0===this.suggestListEl.items.length)return void this.closeSuggestList()}this.activeSuggestSource=n,this.suggestListEl.resetActive(),this.suggestListEl.open=!0,this.suggestListEl.updateComplete.then((()=>this.positionOverlay(this.suggestListEl,"below",o.from)))}}else this.closeSuggestList()}handleSuggestSelect(e){if(this.view){if("mention"===this.activeSuggestSource&&this.mentionMatch?.active){const t=this.mentionMatch,{state:i}=this.view,n=i.schema.nodes.mention.create({trigger:t.trigger,key:e.key,label:e.label});this.view.dispatch(i.tr.replaceWith(t.from,t.to,[n,i.schema.text(" ")])),this.view.focus(),this.emit("nile-mention-select",{trigger:t.trigger,key:e.key,label:e.label})}else if("slash"===this.activeSuggestSource&&this.slashMatch?.active){const t=this.slashMatch;if(this.view.dispatch(this.view.state.tr.delete(t.from,t.to)),this.closeSuggestList(),e.key.startsWith("snippet:")){const t=this.snippets.find((t=>`snippet:${t.key}`===e.key));return void(t&&this.insertHTML(t.html))}const i=cX.find((t=>t.key===e.key));if(!i)return;"openImage"===i.command?this.openImagePanel():"openEmbed"===i.command?this.openEmbedPanel():"openBookmark"===i.command?this.openBookmarkPanel():this.execCommand(i.command,i.attrs)}else if("emoji"===this.activeSuggestSource&&this.emojiMatch?.active){const t=this.emojiMatch,i=wJ.find((t=>t.name===e.key));i&&(this.view.dispatch(this.view.state.tr.insertText(i.char,t.from,t.to)),this.view.focus())}this.closeSuggestList()}}openFindBar(){if(!this.findBarEl||this.sourceMode)return;this.findBarEl.open=!0;const e=this.view?aF(this.view.state):null;this.findBarEl.matchCount=e?.matches.length??0,this.findBarEl.activeIndex=e?.activeIndex??0,this.findBarEl.updateComplete.then((()=>{const e=this.toolbarButton("Find & replace (Ctrl+F)");e&&this.positionOverlayBelowAnchor(this.findBarEl,e),this.findBarEl.focusInput()}))}closeFindBar(){this.view&&this.view.dispatch(this.view.state.tr.setMeta(nF,{type:"clear"})),this.findBarEl&&(this.findBarEl.open=!1),this.view?.focus()}find(e){return this.view?(this.view.dispatch(function(e,t,i){return e.tr.setMeta(nF,{type:"search",query:t,caseSensitive:i})}(this.view.state,e)),this.scrollToActiveMatch(),aF(this.view.state).matches.length):0}findNext(){this.view&&(this.view.dispatch(lF(this.view.state,"next")),this.scrollToActiveMatch())}findPrev(){this.view&&(this.view.dispatch(lF(this.view.state,"prev")),this.scrollToActiveMatch())}replace(e){if(!this.view)return;const t=function(e,t){const i=aF(e),n=i.matches[i.activeIndex];return n?e.tr.insertText(t,n.from,n.to):null}(this.view.state,e);t&&this.view.dispatch(t)}replaceAll(e){if(!this.view)return;const t=function(e,t){const i=aF(e);if(!i.matches.length)return null;const n=e.tr;for(const e of[...i.matches].reverse())n.insertText(t,e.from,e.to);return n}(this.view.state,e);t&&this.view.dispatch(t)}scrollToActiveMatch(){if(!this.view)return;const e=aF(this.view.state),t=e.matches[e.activeIndex];t&&this.view.dispatch(this.view.state.tr.setSelection(hY.create(this.view.state.doc,t.from,t.to)).scrollIntoView())}toggleSourceView(){this.sourceMode?this.applySourceView(this.sourceViewEl?.currentValue??null):(this.sourceMode=!0,this.updateComplete.then((()=>{this.sourceViewEl&&(this.sourceViewEl.value=this.getHTML(),this.sourceViewEl.focusInput())})))}applySourceView(e){this.sourceMode=!1,null!==e&&this.setContent(e,!0),this.updateComplete.then((()=>this.view?.focus()))}getWordCount(){return this.view?bW(this.view.state.doc):{words:0,characters:0}}toggleFormatPainter(){if(!this.view)return;const e=mJ(this.view.state)?this.view.state.tr.setMeta(zJ,{type:"disarm"}):function(e){const t=function(e){const{$from:t,empty:i}=e.selection;return i?e.storedMarks??t.marks():t.marksAcross(e.selection.$to)??t.marks()}(e);return e.tr.setMeta(zJ,{type:"arm",marks:t})}(this.view.state);e&&this.view.dispatch(e),this.view.focus()}get contentRoot(){return this.view?.dom??null}exportFilename(e){return`${(this.name||"document").replace(/[^\w.-]+/g,"-").replace(/^-+|-+$/g,"")||"document"}.${e}`}downloadBlob(e,t,i){const n=new Blob([e],{type:t}),o=URL.createObjectURL(n),r=document.createElement("a");r.href=o,r.download=i,r.style.display="none",document.body.appendChild(r),r.click(),r.remove(),setTimeout((()=>URL.revokeObjectURL(o)),0)}getInlineStyledHTML(){const e=this.contentRoot;return this.view&&e&&!LW(this.view.state.doc)?a$(e):""}exportInlineHtml(e){const t=this.getInlineStyledHTML();if(!t)return;const i=`<!DOCTYPE html>\n<html><head><meta charset="utf-8"></head><body>${t}</body></html>`;this.downloadBlob(i,"text/html;charset=utf-8",e??this.exportFilename("html"))}exportToWord(e){const t=this.getInlineStyledHTML();if(!t)return;const i=M$(t,this.name||"Document");this.downloadBlob(i,"application/msword",e??this.exportFilename("doc"))}exportToPdf(e={}){const t=this.getInlineStyledHTML();if(!t)return;const i=c$(t,{title:this.name||"Document",...e}),n=document.createElement("iframe");n.setAttribute("aria-hidden","true"),Object.assign(n.style,{position:"fixed",right:"0",bottom:"0",width:"0",height:"0",border:"0"}),document.body.appendChild(n);const o=()=>{setTimeout((()=>n.remove()),1e3)};n.onload=()=>{const e=n.contentWindow;e?(e.focus(),e.addEventListener("afterprint",o,{once:!0}),e.print()):o()};const r=n.contentDocument;r?(r.open(),r.write(i),r.close()):n.remove()}importFromWord(e,t=!0){if(!e)return;const i=XB(e)?e$(e):e;this.setContent(i,t)}importFromWordFile(){const e=document.createElement("input");e.type="file",e.accept=".htm,.html,text/html",e.style.display="none",e.addEventListener("change",(()=>{const t=e.files?.[0];e.remove(),t&&t.text().then((e=>this.importFromWord(e)))})),document.body.appendChild(e),e.click()}openShortcutHelp(){this.shortcutHelpEl&&(this.shortcutHelpEl.open=!0,this.shortcutHelpEl.focusPanel())}closeShortcutHelp(){this.shortcutHelpEl&&(this.shortcutHelpEl.open=!1),this.view?.focus()}toggleFullscreen(){this.fullscreen=!this.fullscreen,this.view?.focus()}openLinkEditor(){if(!this.view||!this.linkEditorEl||this.disabled||this.readonly)return;const e=this.toolbarState??f$(this.view.state);this.linkEditorEl.href=e.linkHref??"",this.linkEditorEl.text="",this.linkEditorEl.allowText=e.selectionEmpty&&!e.linkActive,this.linkEditorEl.canRemove=e.linkActive,this.linkEditorEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.linkEditorEl.updateComplete.then((()=>{this.positionOverlay(this.linkEditorEl,"below"),this.linkEditorEl.focusInput()}))}closeLinkEditor(e=!0){this.linkEditorEl&&(this.linkEditorEl.open=!1),e&&this.view?.focus()}applyLink(e,t){if(!this.view)return;const{state:i}=this.view,n=i.schema.marks.link;if(i.selection.empty&&!pB(i.selection.$from,n)){const o=t||e,r=i.schema.text(o,[n.create({href:e})]);this.view.dispatch(i.tr.replaceSelectionWith(r,!1).scrollIntoView())}else this.execCommand("link",{href:e});this.closeLinkEditor()}get pmView(){return this.view}get json(){return this.view?OW(this.view.state.doc):null}set json(e){e&&this.setContent(e)}focus(){this.view?.focus()}blur(){this.view?.dom?.blur()}getHTML(){return this.view&&!LW(this.view.state.doc)?xW(this.view.state.doc):""}getJSON(){return this.json}getText(){return this.view?AW(this.view.state.doc):""}getMarkdown(){return this.view&&!LW(this.view.state.doc)?kB(this.view.state.doc):""}setMarkdown(e,t=!1){this.setContent(HB(e),t)}insertMarkdown(e){this.insertHTML(HB(e))}setContent(e,t=!1){if(!this.view)return void("string"==typeof e&&(this.value=e));let i="string"==typeof e?mW(oW,e,this.sanitize):fW(oW,e);this.singleLine&&(i=X$(i)),this.view.updateState(this.buildState(i)),this.toolbarState=this.snapshotToolbar(this.view.state),this.syncingValue=!0,this.value=LW(i)?"":xW(i),this.syncFormValue(i),t&&(this.emit("nile-input",this.buildChangeDetail(i)),this.emit("nile-change",this.buildChangeDetail(i)))}clear(){this.setContent("")}insertHTML(e){if(!this.view)return;const t=TW(oW,e,this.sanitize);this.view.dispatch(this.view.state.tr.replaceSelection(t).scrollIntoView()),this.view.focus()}execCommand(e,t){if(!this.view)return!1;const i=AB(this.view.state,e,t);if(!i)return!1;const n=i(this.view.state,this.view.dispatch,this.view);return this.view.focus(),n}isCommandActive(e){const t=this.toolbarState;if(!t)return!1;switch(e){case"bold":return t.bold;case"italic":return t.italic;case"underline":return t.underline;case"strike":return t.strike;case"code":return t.code;case"link":return t.linkActive;case"bulletList":return t.inBulletList;case"orderedList":return t.inOrderedList;case"blockquote":return t.inBlockquote;default:return!1}}handleCommand(e){e.stopPropagation();const{name:t,attrs:i}=e.detail;if("openLink"!==t)if("openImage"!==t)if("openEmbed"!==t)if("openBookmark"!==t){if("toggleShowBlocks"===t)return this.showBlocks=!this.showBlocks,void this.view?.focus();if("toggleSource"!==t)return"togglePastePlainText"===t?(this.pasteAsPlainText=!this.pasteAsPlainText,void this.view?.focus()):void("toggleFullscreen"!==t?"openShortcutHelp"!==t?"openSpecialChars"!==t?"openEmoji"!==t?"openFind"!==t?"exportPdf"!==t?"exportWord"!==t?"exportInlineHtml"!==t?"importWord"!==t?"toggleFormatPainter"!==t?"openMergeField"!==t?"openTemplate"!==t?"openMarkdown"!==t?"openMath"!==t?this.execCommand(t,i):this.openMathPanel():this.openMarkdownPanel():this.openInsertMenu("template"):this.openInsertMenu("merge"):this.toggleFormatPainter():this.importFromWordFile():this.exportInlineHtml():this.exportToWord():this.exportToPdf():this.openFindBar():this.openEmojiPicker():this.openSpecialChars():this.openShortcutHelp():this.toggleFullscreen());this.toggleSourceView()}else this.openBookmarkPanel();else this.openEmbedPanel();else this.openImagePanel();else this.openLinkEditor()}handleBaseKeydown(e){if("Escape"!==e.key||e.defaultPrevented)return;if(this.specialCharsEl?.open)return void this.closeSpecialChars();if(!this.fullscreen)return;this.linkEditorEl?.open||this.imagePanelEl?.open||this.embedPanelEl?.open||this.bookmarkPanelEl?.open||this.emojiPickerEl?.open||this.findBarEl?.open||this.shortcutHelpEl?.open||this.suggestListEl?.open||(this.fullscreen=!1)}handleChromeFocusOut(e){const t=e.relatedTarget;t&&(this.shadowRoot?.contains(t)||this.contains(t))||this.view?.hasFocus()||(this.hasFocus=!1,this.updateOverlays())}get floatingPanels(){return[this.linkEditorEl,this.imagePanelEl,this.embedPanelEl,this.bookmarkPanelEl,this.specialCharsEl,this.emojiPickerEl,this.insertMenuEl,this.mathPanelEl,this.markdownPanelEl]}closeAllPanels(e=!0){this.linkEditorEl?.open&&this.closeLinkEditor(e),this.imagePanelEl?.open&&this.closeImagePanel(e),this.embedPanelEl?.open&&this.closeEmbedPanel(e),this.bookmarkPanelEl?.open&&this.closeBookmarkPanel(e),this.specialCharsEl?.open&&this.closeSpecialChars(e),this.emojiPickerEl?.open&&this.closeEmojiPicker(e),this.insertMenuEl?.open&&this.closeInsertMenu(e),this.mathPanelEl?.open&&this.closeMathPanel(e),this.markdownPanelEl?.open&&this.closeMarkdownPanel(e)}render(){const e=(this.authoredToolbar?.length??0)>0,t=("none"!==this.toolbar||e)&&!this.readonly;return R`
|
|
28727
|
+
`}};e([de({type:Boolean,reflect:!0})],jq.prototype,"open",void 0),e([pe("textarea")],jq.prototype,"textarea",void 0),jq=e([ce("nile-wysiwyg-markdown-panel")],jq);const zq=[{key:"heading1",label:"Heading 1",hint:"#",command:"heading",attrs:{level:1}},{key:"heading2",label:"Heading 2",hint:"##",command:"heading",attrs:{level:2}},{key:"heading3",label:"Heading 3",hint:"###",command:"heading",attrs:{level:3}},{key:"bulletList",label:"Bulleted list",hint:"-",command:"bulletList"},{key:"orderedList",label:"Numbered list",hint:"1.",command:"orderedList"},{key:"taskList",label:"Checklist",hint:"[ ]",command:"taskList"},{key:"blockquote",label:"Blockquote",hint:">",command:"blockquote"},{key:"codeBlock",label:"Code block",hint:"```",command:"codeBlock"},{key:"table",label:"Table",hint:"3×3",command:"insertTable",attrs:{rows:3,cols:3}},{key:"image",label:"Image",command:"openImage"},{key:"embed",label:"Video embed",hint:"YouTube…",command:"openEmbed"},{key:"bookmark",label:"Bookmark (anchor)",command:"openBookmark"},{key:"horizontalRule",label:"Divider",hint:"---",command:"horizontalRule"}];let mq=0;let Tq=class extends Fe{static get styles(){return[JP]}constructor(){super(),this.value="",this.placeholder="",this.disabled=!1,this.readonly=!1,this.toolbar=_X,this.bubbleMenu=!1,this.sanitize=!0,this.singleLine=!1,this.name="",this.required=!1,this.allowBase64Images=!0,this.uploadFromComputer=!1,this.imageMaxFileSize=2097152,this.mentions={},this.noSlashCommands=!1,this.noEmoji=!1,this.noTableMenu=!1,this.maxLength=0,this.showCounter=!1,this.stickyToolbar=!1,this.snippets=[],this.mergeFields=[],this.templates=[],this.autosaveInterval=0,this.pasteAsPlainText=!1,this.noMarkdownPaste=!1,this.emailFidelity=!1,this.allowedStyles={},this.noTextTransform=!1,this.fullscreen=!1,this.showBlocks=!1,this.hasFocus=!1,this.sourceMode=!1,this.counter={words:0,characters:0},this.insertMenuMode=null,this.normalizedAllowedStyles=new Map,this.mentionMatch=null,this.slashMatch=null,this.emojiMatch=null,this.activeSuggestSource=null,this.suggestDismissed=null,this.mentionQueryToken="",this.lastAutosaveValue="",this.defaultValue="",this.syncingValue=!1,this.lastSourceHtml="",this.lastSerializedValue="",this.pendingChange=!1,this.previousBodyOverflow=null,this.onAnyScroll=()=>{this.bubbleMenuEl&&[this.bubbleMenuEl,this.tableMenuEl,this.codeMenuEl,this.imageMenuEl,this.embedMenuEl].forEach((e=>{e?.open&&(e.open=!1)}))},this.renderProbe=null,this.painterDragActive=!1,this.onPainterPointerDown=()=>{this.view&&kX(this.view.state)&&(this.painterDragActive=!0)},this.onPainterPointerUp=()=>{this.painterDragActive&&(this.painterDragActive=!1,requestAnimationFrame((()=>{if(!this.view)return;if(this.view.state.selection.empty||!kX(this.view.state))return;const e=EX(this.view.state);e&&this.view.dispatch(e)})))},this.onOutsidePointerDown=e=>{const t=this.floatingPanels.filter((e=>!!e&&e.open));if(!t.length)return;const i=e.composedPath();if(t.some((e=>i.includes(e))))return;const n=i.includes(this)||!!this.shadowRoot&&i.includes(this.shadowRoot);this.closeAllPanels(n)},"function"==typeof this.attachInternals&&(this.internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this.hasUpdated&&!this.view&&this.updateComplete.then((()=>this.mountView())),document.addEventListener("pointerdown",this.onOutsidePointerDown,!0),document.addEventListener("mouseup",this.onPainterPointerUp),document.addEventListener("scroll",this.onAnyScroll,{capture:!0,passive:!0}),this.syncAuthoredToolbar(),this.syncAuthoredBubble(),this.toolbarObserver||(this.toolbarObserver=new MutationObserver((()=>{this.syncAuthoredToolbar(),this.syncAuthoredBubble()}))),this.toolbarObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["name","label","icon","divider","overflow"]})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onOutsidePointerDown,!0),document.removeEventListener("mouseup",this.onPainterPointerUp),document.removeEventListener("scroll",this.onAnyScroll,{capture:!0}),this.surfaceEl?.removeEventListener("scroll",this.onAnyScroll),this.toolbarObserver?.disconnect(),this.changeTimer&&clearTimeout(this.changeTimer),this.autosaveTimer&&clearInterval(this.autosaveTimer),null!==this.previousBodyOverflow&&(document.body.style.overflow=this.previousBodyOverflow,this.previousBodyOverflow=null),this.view?.destroy(),this.view=void 0}firstUpdated(){this.defaultValue=this.value,this.syncAuthoredToolbar(),this.syncAuthoredBubble(),this.mountView()}syncAuthoredToolbar(){const e=this.querySelectorAll("nile-wysiwyg-toolbar-item"),t=e.length?Array.from(e).map((e=>({name:e.hasAttribute("divider")?"|":e.getAttribute("name")||"",label:e.getAttribute("label")||void 0,icon:e.getAttribute("icon")||void 0,overflow:e.hasAttribute("overflow")||void 0}))).filter((e=>e.name)):void 0;JSON.stringify(t)!==JSON.stringify(this.authoredToolbar)&&(this.authoredToolbar=t)}syncAuthoredBubble(){const e=this.querySelectorAll("nile-wysiwyg-bubble-item"),t=e.length?Array.from(e).map((e=>({name:e.hasAttribute("divider")?"|":e.getAttribute("name")||"",label:e.getAttribute("label")||void 0,icon:e.getAttribute("icon")||void 0}))).filter((e=>e.name)):void 0;JSON.stringify(t)!==JSON.stringify(this.authoredBubble)&&(this.authoredBubble=t)}updated(e){e.has("allowedStyles")&&(this.normalizedAllowedStyles=function(e){const t=new Map;if(!e||"object"!=typeof e)return t;for(const[i,n]of Object.entries(e)){const e=String(i).toLowerCase();if(!SR.has(e)){console.warn(`[nile-wysiwyg-editor] allowedStyles: ignoring tag "${i}" (unsupported tag)`);continue}if(!Array.isArray(n))continue;const o=t.get(e)??new Set;for(const t of n){const i=String(t);if(CR(i))o.add(i);else{const n=kR.has(i)?"denylisted":ER.has(i)?"already handled by a built-in":"invalid property name";console.warn(`[nile-wysiwyg-editor] allowedStyles: ignoring "${e}: ${t}" (${n})`)}}o.size&&t.set(e,o)}return t}(this.allowedStyles));const t=e.has("value")&&!!this.view&&!this.syncingValue&&this.serializeDoc(this.view.state.doc)!==this.value;t&&this.setContent(this.value),this.syncingValue=!1,(e.has("disabled")||e.has("readonly"))&&this.view&&this.view.setProps({}),e.has("placeholder")&&this.view&&this.view.dispatch(this.view.state.tr),e.has("required")&&this.updateValidity(),e.has("autosaveInterval")&&this.restartAutosave(),(e.has("pasteAsPlainText")||e.has("fullscreen")||e.has("showBlocks"))&&this.view&&(this.toolbarState=this.snapshotToolbar(this.view.state)),e.has("noTextTransform")&&this.view&&!e.has("value")&&this.view.updateState(this.buildState(this.view.state.doc)),(e.has("emailFidelity")&&this.view&&!t||e.has("allowedStyles")&&this.view&&!t)&&this.setContent(this.reparseSource()),(e.has("noTableMenu")||e.has("emailFidelity"))&&this.updateOverlays(),e.has("fullscreen")&&(this.fullscreen?null===this.previousBodyOverflow&&(this.previousBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden"):null!==this.previousBodyOverflow&&(document.body.style.overflow=this.previousBodyOverflow,this.previousBodyOverflow=null))}restartAutosave(){this.autosaveTimer&&clearInterval(this.autosaveTimer),this.autosaveTimer=void 0,this.autosaveInterval>0&&(this.lastAutosaveValue=this.value,this.autosaveTimer=setInterval((()=>{this.view&&this.value!==this.lastAutosaveValue&&(this.lastAutosaveValue=this.value,this.emit("nile-autosave",this.buildChangeDetail(this.view.state.doc)))}),this.autosaveInterval))}buildState(e){return YX({schema:mB,doc:e,getPlaceholder:()=>this.placeholder,singleLine:this.singleLine,onLinkShortcut:()=>this.openLinkEditor(),onFindShortcut:()=>this.openFindBar(),onShortcutHelp:()=>this.openShortcutHelp(),onImageFiles:(e,t)=>{for(const i of e)this.insertImageFile(i,t)},mentions:{getTriggers:()=>Object.keys(this.mentions),onChange:e=>{this.mentionMatch=e,this.updateSuggestList()},onKeyDown:e=>this.handleSuggestKey(e,"mention")},slashCommands:{onChange:e=>{this.slashMatch=e,this.updateSuggestList()},onKeyDown:e=>this.handleSuggestKey(e,"slash")},emoji:{onChange:e=>{this.emojiMatch=e,this.updateSuggestList()},onKeyDown:e=>this.handleSuggestKey(e,"emoji")},getMaxLength:()=>this.maxLength,getForcePlainText:()=>this.pasteAsPlainText,getMarkdownPaste:()=>!this.noMarkdownPaste,getEmailFidelity:()=>this.emailFidelity,getAllowedStyles:()=>this.normalizedAllowedStyles,getSanitize:()=>this.sanitize,textTransform:!this.noTextTransform})}snapshotToolbar(e){return{...QF(e),pasteAsPlainText:this.pasteAsPlainText,fullscreen:this.fullscreen,showBlocks:this.showBlocks,formatPainter:kX(e)}}reparseSource(){return this.value===this.lastSerializedValue?this.lastSourceHtml:this.value}serializeDoc(e){return kB(e,this.emailFidelity?this.emailRenderDefaults():void 0)}emailRenderDefaults(){const e=this.shadowRoot;if(!e||!this.isConnected)return{borderColor:null,headerBackground:null};if(!this.renderProbe||!this.renderProbe.isConnected){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.style.cssText="position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;border-top:1px solid var(--nile-wysiwyg-table-border, var(--nile-colors-neutral-300, var(--ng-colors-border-primary)));background-color:var(--nile-wysiwyg-table-header-bg, var(--nile-colors-neutral-50, var(--ng-colors-bg-secondary)));",e.appendChild(t),this.renderProbe=t}const t=getComputedStyle(this.renderProbe),i=t.backgroundColor;return{borderColor:"solid"===t.borderTopStyle?t.borderTopColor:null,headerBackground:i&&"transparent"!==i&&"rgba(0, 0, 0, 0)"!==i?i:null}}emailOptions(){return{emailFidelity:this.emailFidelity,allowedStyles:this.normalizedAllowedStyles}}mountView(){if(this.view||!this.surfaceEl)return;let e=this.value?vB(mB,this.value,this.sanitize,this.emailOptions()):void 0;e&&this.singleLine&&(e=lG(e)),this.view=new WP(this.surfaceEl,{state:this.buildState(e),dispatchTransaction:e=>this.handleTransaction(e),editable:()=>!this.disabled&&!this.readonly,transformPastedHTML:e=>{const t=sF(e)?MF(e):e;let i=this.sanitize?VW(t,this.emailOptions()):t;return this.emailFidelity&&(i=mW(i)),i},handleDOMEvents:{mousedown:()=>(this.closeSpecialChars(!1),this.closeInsertMenu(!1),!1),focus:()=>(this.hasFocus=!0,this.updateOverlays(),this.emit("nile-focus"),!1),blur:(e,t)=>{const i=t.relatedTarget;return i&&(this.shadowRoot?.contains(i)||this.contains(i))||(this.hasFocus=!1,this.flushChange(),this.updateOverlays(),this.closeSuggestList(),this.closeSpecialChars(!1),this.emit("nile-blur")),!1}},attributes:{role:"textbox","aria-multiline":this.singleLine?"false":"true"},nodeViews:{task_item:(e,t,i)=>new ZX(e,t,i),image:(e,t,i)=>new mF(e,t,i),figure:(e,t,i)=>new TF(e,t,i),embed:(e,t,i)=>new xF(e,t,i),styleBlock:e=>new vF(e),math:e=>new kF(e,this.mathRenderer)}}),this.view.dom.addEventListener("mousedown",this.onPainterPointerDown),this.surfaceEl.addEventListener("scroll",this.onAnyScroll,{passive:!0}),this.toolbarState=this.snapshotToolbar(this.view.state),this.counter=UB(this.view.state.doc),this.syncFormValue(this.view.state.doc)}handleTransaction(e){if(!this.view)return;const t=this.view.state.apply(e);if(this.view.updateState(t),e.selectionSet&&!t.selection.empty&&kX(t)&&!this.painterDragActive){const e=EX(t);if(e)return void this.view.dispatch(e)}if(this.toolbarState=this.snapshotToolbar(t),this.emit("nile-selection-change",this.toolbarState),this.updateOverlays(),this.findBarEl?.open){const e=yG(t);this.findBarEl.matchCount=e.matches.length,this.findBarEl.activeIndex=e.activeIndex}if(e.docChanged){const e=this.buildChangeDetail(t.doc);this.syncingValue=!0,this.value=e.value,this.syncFormValue(t.doc),this.emit("nile-input",e),this.counter=UB(t.doc),this.emit("nile-word-count",this.counter),this.scheduleChange()}}buildChangeDetail(e){const t=YB(e)?"":this.serializeDoc(e);return{value:t,json:CB(e),content:t}}scheduleChange(){this.pendingChange=!0,this.changeTimer&&clearTimeout(this.changeTimer),this.changeTimer=setTimeout((()=>this.flushChange()),250)}flushChange(){this.pendingChange&&this.view&&(this.pendingChange=!1,this.changeTimer&&clearTimeout(this.changeTimer),this.emit("nile-change",this.buildChangeDetail(this.view.state.doc)))}syncFormValue(e){if(!this.internals)return;const t=YB(e)?"":this.serializeDoc(e);this.internals.setFormValue(""===t?null:t),this.updateValidity()}updateValidity(){if(!this.internals)return;const e=this.view?YB(this.view.state.doc):""===this.value;this.required&&e?this.internals.setValidity({valueMissing:!0},"Please fill out this field.",this.surfaceEl??void 0):this.internals.setValidity({})}formResetCallback(){this.setContent(this.defaultValue)}formDisabledCallback(e){this.disabled=e}checkValidity(){return!this.internals||this.internals.checkValidity()}reportValidity(){return!this.internals||this.internals.reportValidity()}positionOverlay(e,t,i){if(!this.view||!this.baseEl)return;const n=i??this.view.state.selection.from,o=this.view.coordsAtPos(n),r=this.baseEl.getBoundingClientRect(),s=Math.max(4,Math.min(o.left-r.left,r.width-e.offsetWidth-4));e.style.left=`${s}px`,e.style.top="above"===t?`${Math.max(4,o.top-r.top-e.offsetHeight-8)}px`:o.bottom-r.top+6+"px"}positionOverlayBelowAnchor(e,t){if(!this.baseEl)return;const i=this.baseEl.getBoundingClientRect(),n=t.getBoundingClientRect(),o=Math.max(4,Math.min(n.left-i.left,i.width-e.offsetWidth-4));e.style.right="auto",e.style.left=`${o}px`,e.style.top=n.bottom-i.top+6+"px"}toolbarButton(e){return this.toolbarEl?.shadowRoot?.querySelector(`button[aria-label="${e}"]`)??null}updateOverlays(){if(!this.bubbleMenuEl)return;const e=this.linkEditorEl?.open||this.imagePanelEl?.open||this.embedPanelEl?.open||this.bookmarkPanelEl?.open||this.emojiPickerEl?.open,t=this.bubbleMenu&&this.hasFocus&&!!this.toolbarState&&!this.toolbarState.selectionEmpty&&!this.toolbarState.imageSelected&&!this.toolbarState.embedSelected&&!e;if(this.bubbleMenuEl.open=t,t&&(this.bubbleMenuEl.toolbarState=this.toolbarState,this.bubbleMenuEl.updateComplete.then((()=>this.positionOverlay(this.bubbleMenuEl,"above")))),this.tableMenuEl){const t=!this.noTableMenu&&this.hasFocus&&!!this.toolbarState&&this.toolbarState.inTable&&!(this.emailFidelity&&this.toolbarState.tableLayout)&&!e;this.tableMenuEl.open=t,t&&this.tableMenuEl.updateComplete.then((()=>this.positionOverlay(this.tableMenuEl,"below")))}if(this.codeMenuEl){const t=this.hasFocus&&!!this.toolbarState&&this.toolbarState.inCodeBlock&&!e;this.codeMenuEl.open=t,t&&(this.codeMenuEl.language=this.toolbarState.codeBlockLanguage??"",this.codeMenuEl.updateComplete.then((()=>this.positionOverlay(this.codeMenuEl,"above"))))}if(this.imageMenuEl){const t=this.hasFocus&&!!this.toolbarState&&this.toolbarState.imageSelected&&!e;this.imageMenuEl.open=t,t&&(this.imageMenuEl.toolbarState=this.toolbarState,this.imageMenuEl.updateComplete.then((()=>this.positionOverlay(this.imageMenuEl,"above"))))}if(this.embedMenuEl){const t=this.hasFocus&&!!this.toolbarState&&this.toolbarState.embedSelected&&!e;this.embedMenuEl.open=t,t&&(this.embedMenuEl.toolbarState=this.toolbarState,this.embedMenuEl.updateComplete.then((()=>this.positionOverlay(this.embedMenuEl,"above"))))}}openSpecialChars(){this.view&&this.specialCharsEl&&!this.disabled&&!this.readonly&&(this.specialCharsEl.open=!0,this.specialCharsEl.updateComplete.then((()=>this.positionOverlay(this.specialCharsEl,"below"))))}closeSpecialChars(e=!0){this.specialCharsEl&&(this.specialCharsEl.open=!1),e&&this.view?.focus()}insertSpecialChar(e){this.view&&(this.view.dispatch(this.view.state.tr.insertText(e).scrollIntoView()),this.view.focus())}openInsertMenu(e){if(!this.view||!this.insertMenuEl||this.disabled||this.readonly)return;this.insertMenuMode=e;const t=this.insertMenuEl;"merge"===e?(t.heading="Merge field",t.emptyText="No merge fields configured.",t.items=this.mergeFields.map((e=>({label:e.label,description:`{{${e.id}}}`})))):(t.heading="Template",t.emptyText="No templates configured.",t.items=this.templates.map((e=>({label:e.label,description:e.description})))),t.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),t.updateComplete.then((()=>this.positionOverlay(t,"below")))}closeInsertMenu(e=!0){this.insertMenuEl&&(this.insertMenuEl.open=!1),this.insertMenuMode=null,e&&this.view?.focus()}handleInsertSelect(e){const t=this.insertMenuMode;if(this.closeInsertMenu(),this.view)if("merge"===t){const t=this.mergeFields[e];t&&this.execCommand("insertMergeField",{id:t.id,label:t.label})}else if("template"===t){const t=this.templates[e];t&&this.insertHTML(t.html)}}insertMergeField(e,t){this.execCommand("insertMergeField",{id:e,label:t??null})}changeCase(e){this.execCommand("changeCase",{textCase:e})}openMathPanel(){this.view&&this.mathPanelEl&&!this.disabled&&!this.readonly&&(this.mathPanelEl.reset(),this.mathPanelEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.tableMenuEl&&(this.tableMenuEl.open=!1),this.mathPanelEl.updateComplete.then((()=>{const e=this.toolbarButton("Insert math (LaTeX)");e?this.positionOverlayBelowAnchor(this.mathPanelEl,e):this.positionOverlay(this.mathPanelEl,"below"),this.mathPanelEl.focusInput()})))}closeMathPanel(e=!0){this.mathPanelEl&&(this.mathPanelEl.open=!1),e&&this.view?.focus()}openMarkdownPanel(){this.view&&this.markdownPanelEl&&!this.disabled&&!this.readonly&&(this.markdownPanelEl.reset(),this.markdownPanelEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.tableMenuEl&&(this.tableMenuEl.open=!1),this.markdownPanelEl.updateComplete.then((()=>{const e=this.toolbarButton("Insert from Markdown");e?this.positionOverlayBelowAnchor(this.markdownPanelEl,e):this.positionOverlay(this.markdownPanelEl,"below"),this.markdownPanelEl.focusInput()})))}closeMarkdownPanel(e=!0){this.markdownPanelEl&&(this.markdownPanelEl.open=!1),e&&this.view?.focus()}applyMath(e,t){this.closeMathPanel(),this.execCommand("insertMath",{latex:e,mathDisplay:t})}insertMath(e,t="inline"){this.execCommand("insertMath",{latex:e,mathDisplay:t})}openEmojiPicker(){this.view&&this.emojiPickerEl&&!this.disabled&&!this.readonly&&(this.emojiPickerEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.tableMenuEl&&(this.tableMenuEl.open=!1),this.emojiPickerEl.updateComplete.then((()=>{this.positionOverlay(this.emojiPickerEl,"below"),this.emojiPickerEl.focusInput()})))}closeEmojiPicker(e=!0){this.emojiPickerEl&&(this.emojiPickerEl.open=!1),e&&this.view?.focus()}openEmbedPanel(){this.view&&this.embedPanelEl&&!this.disabled&&!this.readonly&&(this.embedPanelEl.reset(),this.embedPanelEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.tableMenuEl&&(this.tableMenuEl.open=!1),this.embedPanelEl.updateComplete.then((()=>{const e=this.toolbarButton("Embed video (YouTube, Vimeo, Loom)");e?this.positionOverlayBelowAnchor(this.embedPanelEl,e):this.positionOverlay(this.embedPanelEl,"below"),this.embedPanelEl.focusInput()})))}closeEmbedPanel(e=!0){this.embedPanelEl&&(this.embedPanelEl.open=!1),e&&this.view?.focus()}openBookmarkPanel(){this.view&&this.bookmarkPanelEl&&!this.disabled&&!this.readonly&&(this.bookmarkPanelEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.tableMenuEl&&(this.tableMenuEl.open=!1),this.bookmarkPanelEl.updateComplete.then((()=>{this.positionOverlay(this.bookmarkPanelEl,"below"),this.bookmarkPanelEl.focusInput()})))}closeBookmarkPanel(e=!0){this.bookmarkPanelEl&&(this.bookmarkPanelEl.open=!1),e&&this.view?.focus()}openImagePanel(){if(!this.view||!this.imagePanelEl||this.disabled||this.readonly)return;const e=S$(this.view.state);e?this.imagePanelEl.prefill({src:e.node.attrs.src,alt:e.node.attrs.alt??"",caption:e.isFigure?e.node.textContent:""}):this.imagePanelEl.reset(),this.imagePanelEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.tableMenuEl&&(this.tableMenuEl.open=!1),this.imagePanelEl.updateComplete.then((()=>{const e=this.toolbarButton("Insert image");e?this.positionOverlayBelowAnchor(this.imagePanelEl,e):this.positionOverlay(this.imagePanelEl,"below"),this.imagePanelEl.focusInput()}))}closeImagePanel(e=!0){this.imagePanelEl&&(this.imagePanelEl.open=!1),e&&this.view?.focus()}insertImageAt(e,t,i,n=null){if(this.view){if(null!==i){const e=this.view.state.doc.resolve(Math.min(i,this.view.state.doc.content.size));this.view.dispatch(this.view.state.tr.setSelection(hY.near(e)))}this.execCommand("insertImage",{src:e,alt:t,caption:n})}}async insertImageFile(e,t=null,i){if(!this.view)return;const n=i?.alt??null,o=i?.caption??null;if(!this.emit("nile-image-upload-request",{file:e,insert:(e,i)=>this.insertImageAt(e,i??n,t,o)},!0,!0,!0).defaultPrevented)if(this.uploadHandler){mq+=1;const i=`nile-upload-${mq}`,r=t??this.view.state.selection.from;this.view.dispatch(this.view.state.tr.setMeta(cG,{add:{id:i,pos:r}}));try{const{src:t,alt:r}=await this.uploadHandler(e),s=this.view?function(e,t){const i=cG.getState(e),n=i?.find(void 0,void 0,(e=>e.id===t));return n&&n.length?n[0].from:null}(this.view.state,i):null;this.view?.dispatch(this.view.state.tr.setMeta(cG,{remove:{id:i}})),this.insertImageAt(t,n??r??null,s,o)}catch(t){this.view?.dispatch(this.view.state.tr.setMeta(cG,{remove:{id:i}})),this.emit("nile-image-upload-error",{file:e,error:t})}}else if(this.allowBase64Images){const i=await function(e){return new Promise(((t,i)=>{const n=new FileReader;n.onload=()=>t(n.result),n.onerror=()=>i(n.error),n.readAsDataURL(e)}))}(e);this.insertImageAt(i,n,t,o)}}dismissKeyFor(e,t){return`${e}:${t.trigger}:${t.from}`}handleSuggestKey(e,t){if(this.activeSuggestSource!==t||!this.suggestListEl?.open)return!1;switch(e.key){case"ArrowDown":return this.suggestListEl.next(),!0;case"ArrowUp":return this.suggestListEl.prev(),!0;case"Enter":case"Tab":return this.suggestListEl.selectCurrent();case"Escape":{const e="mention"===t?this.mentionMatch:"slash"===t?this.slashMatch:this.emojiMatch;return e&&(this.suggestDismissed=this.dismissKeyFor(t,e)),this.closeSuggestList(),!0}default:return!1}}closeSuggestList(){this.suggestListEl&&(this.suggestListEl.open=!1),this.activeSuggestSource=null}updateSuggestList(){if(!this.suggestListEl||!this.view)return;const e=this.mentionMatch?.active?this.mentionMatch:null,t=!this.noSlashCommands&&this.slashMatch?.active?this.slashMatch:null,i=!this.noEmoji&&this.emojiMatch?.active?this.emojiMatch:null,n=e?"mention":t?"slash":i?"emoji":null,o=e??t??i;if(n&&o&&!this.disabled&&!this.readonly){if(this.suggestDismissed!==this.dismissKeyFor(n,o)){if(this.suggestDismissed=null,"mention"===n){const e=this.mentions[o.trigger]??[],t=o.query.toLowerCase();this.suggestListEl.items=e.filter((e=>e.label.toLowerCase().includes(t)));const i=`${o.trigger} ${o.query}`;this.mentionQueryToken=i,this.emit("nile-mention-query",{trigger:o.trigger,query:o.query,provide:e=>{this.mentionQueryToken===i&&Array.isArray(e)&&(this.suggestListEl.items=e.filter((e=>e&&"string"==typeof e.key&&"string"==typeof e.label)).map((e=>({key:e.key,label:e.label}))))}})}else if("slash"===n){const e=o.query.toLowerCase(),t=this.snippets.map((e=>({key:`snippet:${e.key}`,label:e.label,hint:"snippet"})));this.suggestListEl.items=[...zq,...t].filter((t=>t.label.toLowerCase().includes(e)))}else{const e=o.query.toLowerCase();if(this.suggestListEl.items=PX.filter((t=>t.name.includes(e))).slice(0,12).map((e=>({key:e.name,label:`${e.char} ${e.name}`}))),0===this.suggestListEl.items.length)return void this.closeSuggestList()}this.activeSuggestSource=n,this.suggestListEl.resetActive(),this.suggestListEl.open=!0,this.suggestListEl.updateComplete.then((()=>this.positionOverlay(this.suggestListEl,"below",o.from)))}}else this.closeSuggestList()}handleSuggestSelect(e){if(this.view){if("mention"===this.activeSuggestSource&&this.mentionMatch?.active){const t=this.mentionMatch,{state:i}=this.view,n=i.schema.nodes.mention.create({trigger:t.trigger,key:e.key,label:e.label});this.view.dispatch(i.tr.replaceWith(t.from,t.to,[n,i.schema.text(" ")])),this.view.focus(),this.emit("nile-mention-select",{trigger:t.trigger,key:e.key,label:e.label})}else if("slash"===this.activeSuggestSource&&this.slashMatch?.active){const t=this.slashMatch;if(this.view.dispatch(this.view.state.tr.delete(t.from,t.to)),this.closeSuggestList(),e.key.startsWith("snippet:")){const t=this.snippets.find((t=>`snippet:${t.key}`===e.key));return void(t&&this.insertHTML(t.html))}const i=zq.find((t=>t.key===e.key));if(!i)return;"openImage"===i.command?this.openImagePanel():"openEmbed"===i.command?this.openEmbedPanel():"openBookmark"===i.command?this.openBookmarkPanel():this.execCommand(i.command,i.attrs)}else if("emoji"===this.activeSuggestSource&&this.emojiMatch?.active){const t=this.emojiMatch,i=PX.find((t=>t.name===e.key));i&&(this.view.dispatch(this.view.state.tr.insertText(i.char,t.from,t.to)),this.view.focus())}this.closeSuggestList()}}openFindBar(){if(!this.findBarEl||this.sourceMode)return;this.findBarEl.open=!0;const e=this.view?yG(this.view.state):null;this.findBarEl.matchCount=e?.matches.length??0,this.findBarEl.activeIndex=e?.activeIndex??0,this.findBarEl.updateComplete.then((()=>{const e=this.toolbarButton("Find & replace (Ctrl+F)");e&&this.positionOverlayBelowAnchor(this.findBarEl,e),this.findBarEl.focusInput()}))}closeFindBar(){this.view&&this.view.dispatch(this.view.state.tr.setMeta(hG,{type:"clear"})),this.findBarEl&&(this.findBarEl.open=!1),this.view?.focus()}find(e){return this.view?(this.view.dispatch(function(e,t,i){return e.tr.setMeta(hG,{type:"search",query:t,caseSensitive:i})}(this.view.state,e)),this.scrollToActiveMatch(),yG(this.view.state).matches.length):0}findNext(){this.view&&(this.view.dispatch(IG(this.view.state,"next")),this.scrollToActiveMatch())}findPrev(){this.view&&(this.view.dispatch(IG(this.view.state,"prev")),this.scrollToActiveMatch())}replace(e){if(!this.view)return;const t=function(e,t){const i=yG(e),n=i.matches[i.activeIndex];return n?e.tr.insertText(t,n.from,n.to):null}(this.view.state,e);t&&this.view.dispatch(t)}replaceAll(e){if(!this.view)return;const t=function(e,t){const i=yG(e);if(!i.matches.length)return null;const n=e.tr;for(const e of[...i.matches].reverse())n.insertText(t,e.from,e.to);return n}(this.view.state,e);t&&this.view.dispatch(t)}scrollToActiveMatch(){if(!this.view)return;const e=yG(this.view.state),t=e.matches[e.activeIndex];t&&this.view.dispatch(this.view.state.tr.setSelection(hY.create(this.view.state.doc,t.from,t.to)).scrollIntoView())}toggleSourceView(){this.sourceMode?this.applySourceView(this.sourceViewEl?.currentValue??null):(this.sourceMode=!0,this.updateComplete.then((()=>{this.sourceViewEl&&(this.sourceViewEl.value=this.getHTML(),this.sourceViewEl.focusInput())})))}applySourceView(e){this.sourceMode=!1,null!==e&&this.setContent(e,!0),this.updateComplete.then((()=>this.view?.focus()))}getWordCount(){return this.view?UB(this.view.state.doc):{words:0,characters:0}}toggleFormatPainter(){if(!this.view)return;const e=kX(this.view.state)?this.view.state.tr.setMeta(SX,{type:"disarm"}):function(e){const t=function(e){const{$from:t,empty:i}=e.selection;return i?e.storedMarks??t.marks():t.marksAcross(e.selection.$to)??t.marks()}(e);return e.tr.setMeta(SX,{type:"arm",marks:t})}(this.view.state);e&&this.view.dispatch(e),this.view.focus()}get contentRoot(){return this.view?.dom??null}exportFilename(e){return`${(this.name||"document").replace(/[^\w.-]+/g,"-").replace(/^-+|-+$/g,"")||"document"}.${e}`}downloadBlob(e,t,i){const n=new Blob([e],{type:t}),o=URL.createObjectURL(n),r=document.createElement("a");r.href=o,r.download=i,r.style.display="none",document.body.appendChild(r),r.click(),r.remove(),setTimeout((()=>URL.revokeObjectURL(o)),0)}getInlineStyledHTML(){const e=this.contentRoot;return this.view&&e&&!YB(this.view.state.doc)?pF(e):""}exportInlineHtml(e){const t=this.getInlineStyledHTML();if(!t)return;const i=`<!DOCTYPE html>\n<html><head><meta charset="utf-8"></head><body>${t}</body></html>`;this.downloadBlob(i,"text/html;charset=utf-8",e??this.exportFilename("html"))}exportToWord(e){const t=this.getInlineStyledHTML();if(!t)return;const i=yF(t,this.name||"Document");this.downloadBlob(i,"application/msword",e??this.exportFilename("doc"))}exportToPdf(e={}){const t=this.getInlineStyledHTML();if(!t)return;const i=IF(t,{title:this.name||"Document",...e}),n=document.createElement("iframe");n.setAttribute("aria-hidden","true"),Object.assign(n.style,{position:"fixed",right:"0",bottom:"0",width:"0",height:"0",border:"0"}),document.body.appendChild(n);const o=()=>{setTimeout((()=>n.remove()),1e3)};n.onload=()=>{const e=n.contentWindow;e?(e.focus(),e.addEventListener("afterprint",o,{once:!0}),e.print()):o()};const r=n.contentDocument;r?(r.open(),r.write(i),r.close()):n.remove()}importFromWord(e,t=!0){if(!e)return;const i=sF(e)?MF(e):e;this.setContent(i,t)}importFromWordFile(){const e=document.createElement("input");e.type="file",e.accept=".htm,.html,text/html",e.style.display="none",e.addEventListener("change",(()=>{const t=e.files?.[0];e.remove(),t&&t.text().then((e=>this.importFromWord(e)))})),document.body.appendChild(e),e.click()}openShortcutHelp(){this.shortcutHelpEl&&(this.shortcutHelpEl.open=!0,this.shortcutHelpEl.focusPanel())}closeShortcutHelp(){this.shortcutHelpEl&&(this.shortcutHelpEl.open=!1),this.view?.focus()}toggleFullscreen(){this.fullscreen=!this.fullscreen,this.view?.focus()}openLinkEditor(){if(!this.view||!this.linkEditorEl||this.disabled||this.readonly)return;const e=this.toolbarState??QF(this.view.state);this.linkEditorEl.href=e.linkHref??"",this.linkEditorEl.text="",this.linkEditorEl.allowText=e.selectionEmpty&&!e.linkActive,this.linkEditorEl.canRemove=e.linkActive,this.linkEditorEl.open=!0,this.bubbleMenuEl&&(this.bubbleMenuEl.open=!1),this.linkEditorEl.updateComplete.then((()=>{this.positionOverlay(this.linkEditorEl,"below"),this.linkEditorEl.focusInput()}))}closeLinkEditor(e=!0){this.linkEditorEl&&(this.linkEditorEl.open=!1),e&&this.view?.focus()}applyLink(e,t){if(!this.view)return;const{state:i}=this.view,n=i.schema.marks.link;if(i.selection.empty&&!A$(i.selection.$from,n)){const o=t||e,r=i.schema.text(o,[n.create({href:e})]);this.view.dispatch(i.tr.replaceSelectionWith(r,!1).scrollIntoView())}else this.execCommand("link",{href:e});this.closeLinkEditor()}get pmView(){return this.view}get json(){return this.view?CB(this.view.state.doc):null}set json(e){e&&this.setContent(e)}focus(){this.view?.focus()}blur(){this.view?.dom?.blur()}getHTML(){return this.view&&!YB(this.view.state.doc)?this.serializeDoc(this.view.state.doc):""}getJSON(){return this.json}getText(){return this.view?EB(this.view.state.doc):""}getMarkdown(){return this.view&&!YB(this.view.state.doc)?V$(this.view.state.doc):""}setMarkdown(e,t=!1){this.setContent(oF(e),t)}insertMarkdown(e){this.insertHTML(oF(e))}setContent(e,t=!1){if(!this.view)return void("string"==typeof e&&(this.value=e));"string"==typeof e&&(this.lastSourceHtml=e);let i="string"==typeof e?vB(mB,e,this.sanitize,this.emailOptions()):QB(mB,e);this.singleLine&&(i=lG(i)),this.view.updateState(this.buildState(i)),this.toolbarState=this.snapshotToolbar(this.view.state),this.syncingValue=!0,this.value=YB(i)?"":this.serializeDoc(i),this.lastSerializedValue=this.value,this.syncFormValue(i),t&&(this.emit("nile-input",this.buildChangeDetail(i)),this.emit("nile-change",this.buildChangeDetail(i)))}clear(){this.setContent("")}insertHTML(e){if(!this.view)return;const t=SB(mB,e,this.sanitize,this.emailOptions());this.view.dispatch(this.view.state.tr.replaceSelection(t).scrollIntoView()),this.view.focus()}execCommand(e,t){if(!this.view)return!1;const i=E$(this.view.state,e,t);if(!i)return!1;const n=i(this.view.state,this.view.dispatch,this.view);return this.view.focus(),n}isCommandActive(e){const t=this.toolbarState;if(!t)return!1;switch(e){case"bold":return t.bold;case"italic":return t.italic;case"underline":return t.underline;case"strike":return t.strike;case"code":return t.code;case"link":return t.linkActive;case"bulletList":return t.inBulletList;case"orderedList":return t.inOrderedList;case"blockquote":return t.inBlockquote;default:return!1}}handleCommand(e){e.stopPropagation();const{name:t,attrs:i}=e.detail;if("openLink"!==t)if("openImage"!==t)if("openEmbed"!==t)if("openBookmark"!==t){if("toggleShowBlocks"===t)return this.showBlocks=!this.showBlocks,void this.view?.focus();if("toggleSource"!==t)return"togglePastePlainText"===t?(this.pasteAsPlainText=!this.pasteAsPlainText,void this.view?.focus()):void("toggleFullscreen"!==t?"openShortcutHelp"!==t?"openSpecialChars"!==t?"openEmoji"!==t?"openFind"!==t?"exportPdf"!==t?"exportWord"!==t?"exportInlineHtml"!==t?"importWord"!==t?"toggleFormatPainter"!==t?"openMergeField"!==t?"openTemplate"!==t?"openMarkdown"!==t?"openMath"!==t?this.execCommand(t,i):this.openMathPanel():this.openMarkdownPanel():this.openInsertMenu("template"):this.openInsertMenu("merge"):this.toggleFormatPainter():this.importFromWordFile():this.exportInlineHtml():this.exportToWord():this.exportToPdf():this.openFindBar():this.openEmojiPicker():this.openSpecialChars():this.openShortcutHelp():this.toggleFullscreen());this.toggleSourceView()}else this.openBookmarkPanel();else this.openEmbedPanel();else this.openImagePanel();else this.openLinkEditor()}handleBaseKeydown(e){if("Escape"!==e.key||e.defaultPrevented)return;if(this.specialCharsEl?.open)return void this.closeSpecialChars();if(!this.fullscreen)return;this.linkEditorEl?.open||this.imagePanelEl?.open||this.embedPanelEl?.open||this.bookmarkPanelEl?.open||this.emojiPickerEl?.open||this.findBarEl?.open||this.shortcutHelpEl?.open||this.suggestListEl?.open||(this.fullscreen=!1)}handleChromeFocusOut(e){const t=e.relatedTarget;t&&(this.shadowRoot?.contains(t)||this.contains(t))||this.view?.hasFocus()||(this.hasFocus=!1,this.updateOverlays())}get floatingPanels(){return[this.linkEditorEl,this.imagePanelEl,this.embedPanelEl,this.bookmarkPanelEl,this.specialCharsEl,this.emojiPickerEl,this.insertMenuEl,this.mathPanelEl,this.markdownPanelEl]}closeAllPanels(e=!0){this.linkEditorEl?.open&&this.closeLinkEditor(e),this.imagePanelEl?.open&&this.closeImagePanel(e),this.embedPanelEl?.open&&this.closeEmbedPanel(e),this.bookmarkPanelEl?.open&&this.closeBookmarkPanel(e),this.specialCharsEl?.open&&this.closeSpecialChars(e),this.emojiPickerEl?.open&&this.closeEmojiPicker(e),this.insertMenuEl?.open&&this.closeInsertMenu(e),this.mathPanelEl?.open&&this.closeMathPanel(e),this.markdownPanelEl?.open&&this.closeMarkdownPanel(e)}render(){const e=(this.authoredToolbar?.length??0)>0,t=("none"!==this.toolbar||e)&&!this.readonly;return R`
|
|
28676
28728
|
<div
|
|
28677
28729
|
class="nile-wysiwyg ${this.showBlocks?"nile-wysiwyg--show-blocks":""}"
|
|
28678
28730
|
part="base"
|
|
@@ -28769,19 +28821,19 @@ a {
|
|
|
28769
28821
|
@wysiwyg-link-cancel=${e=>{e.stopPropagation(),this.closeLinkEditor()}}
|
|
28770
28822
|
></nile-wysiwyg-link-editor>
|
|
28771
28823
|
</div>
|
|
28772
|
-
`}};function
|
|
28824
|
+
`}};function xq(e,t={}){return(i,n)=>{const o=e??globalThis.katex;if(!o)return i;try{return o.renderToString(i,{displayMode:"block"===n,throwOnError:!1,...t.katexOptions})}catch{return i}}}
|
|
28773
28825
|
/**
|
|
28774
28826
|
* @license
|
|
28775
28827
|
* Copyright 2021 Google LLC
|
|
28776
28828
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28777
|
-
*/
|
|
28829
|
+
*/Tq.formAssociated=!0,e([de({type:String})],Tq.prototype,"value",void 0),e([de({type:String})],Tq.prototype,"placeholder",void 0),e([de({type:Boolean,reflect:!0})],Tq.prototype,"disabled",void 0),e([de({type:Boolean,reflect:!0})],Tq.prototype,"readonly",void 0),e([de({type:String})],Tq.prototype,"toolbar",void 0),e([he()],Tq.prototype,"authoredToolbar",void 0),e([he()],Tq.prototype,"authoredBubble",void 0),e([de({type:Boolean,attribute:"bubble-menu"})],Tq.prototype,"bubbleMenu",void 0),e([de({type:Boolean})],Tq.prototype,"sanitize",void 0),e([de({type:Boolean,attribute:"singleline"})],Tq.prototype,"singleLine",void 0),e([de({type:String})],Tq.prototype,"name",void 0),e([de({type:Boolean,reflect:!0})],Tq.prototype,"required",void 0),e([de({attribute:!1})],Tq.prototype,"uploadHandler",void 0),e([de({attribute:!1})],Tq.prototype,"allowBase64Images",void 0),e([de({type:Boolean,attribute:"upload-from-computer"})],Tq.prototype,"uploadFromComputer",void 0),e([de({type:Number,attribute:"image-max-file-size"})],Tq.prototype,"imageMaxFileSize",void 0),e([de({attribute:"mentions",converter:{fromAttribute:e=>{try{const t=JSON.parse(e),i={};for(const e of Object.keys(t)){const n=t[e];Array.isArray(n)&&(i[e]=n.filter((e=>e&&"string"==typeof e.key&&"string"==typeof e.label)).map((e=>({key:e.key,label:e.label}))))}return i}catch{return{}}},toAttribute:e=>JSON.stringify(e)}})],Tq.prototype,"mentions",void 0),e([de({type:Boolean,attribute:"no-slash-commands"})],Tq.prototype,"noSlashCommands",void 0),e([de({type:Boolean,attribute:"no-emoji"})],Tq.prototype,"noEmoji",void 0),e([de({type:Boolean,attribute:"no-table-menu"})],Tq.prototype,"noTableMenu",void 0),e([de({type:Number,attribute:"maxlength"})],Tq.prototype,"maxLength",void 0),e([de({type:Boolean,attribute:"show-counter"})],Tq.prototype,"showCounter",void 0),e([de({type:Boolean,attribute:"sticky-toolbar",reflect:!0})],Tq.prototype,"stickyToolbar",void 0),e([de({attribute:"snippets",converter:{fromAttribute:e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t.filter((e=>e&&"string"==typeof e.key&&"string"==typeof e.label&&"string"==typeof e.html)):[]}catch{return[]}},toAttribute:e=>JSON.stringify(e)}})],Tq.prototype,"snippets",void 0),e([de({attribute:"merge-fields",converter:{fromAttribute:e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t.filter((e=>e&&"string"==typeof e.id&&"string"==typeof e.label)):[]}catch{return[]}},toAttribute:e=>JSON.stringify(e)}})],Tq.prototype,"mergeFields",void 0),e([de({attribute:"templates",converter:{fromAttribute:e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t.filter((e=>e&&"string"==typeof e.label&&"string"==typeof e.html)):[]}catch{return[]}},toAttribute:e=>JSON.stringify(e)}})],Tq.prototype,"templates",void 0),e([de({attribute:!1})],Tq.prototype,"mathRenderer",void 0),e([de({type:Number,attribute:"autosave-interval"})],Tq.prototype,"autosaveInterval",void 0),e([de({type:Boolean,attribute:"paste-as-plain-text",reflect:!0})],Tq.prototype,"pasteAsPlainText",void 0),e([de({type:Boolean,attribute:"no-markdown-paste"})],Tq.prototype,"noMarkdownPaste",void 0),e([de({type:Boolean,attribute:"email-fidelity",reflect:!0})],Tq.prototype,"emailFidelity",void 0),e([de({attribute:"allowed-styles",converter:{fromAttribute:e=>function(e){const t={};for(const i of e.split(";")){const e=i.indexOf(":");if(-1===e)continue;const n=i.slice(0,e).trim();if(!n)continue;const o=i.slice(e+1).split(",").map((e=>e.trim())).filter(Boolean);o.length&&(t[n]=o)}return t}(e??"")}})],Tq.prototype,"allowedStyles",void 0),e([de({type:Boolean,attribute:"no-text-transform"})],Tq.prototype,"noTextTransform",void 0),e([de({type:Boolean,reflect:!0})],Tq.prototype,"fullscreen",void 0),e([de({type:Boolean,attribute:"show-blocks",reflect:!0})],Tq.prototype,"showBlocks",void 0),e([he()],Tq.prototype,"toolbarState",void 0),e([he()],Tq.prototype,"hasFocus",void 0),e([he()],Tq.prototype,"sourceMode",void 0),e([he()],Tq.prototype,"counter",void 0),e([he()],Tq.prototype,"insertMenuMode",void 0),e([pe(".nile-wysiwyg")],Tq.prototype,"baseEl",void 0),e([pe("nile-wysiwyg-toolbar")],Tq.prototype,"toolbarEl",void 0),e([pe(".nile-wysiwyg__surface")],Tq.prototype,"surfaceEl",void 0),e([pe("nile-wysiwyg-link-editor")],Tq.prototype,"linkEditorEl",void 0),e([pe("nile-wysiwyg-bubble-menu")],Tq.prototype,"bubbleMenuEl",void 0),e([pe("nile-wysiwyg-image-panel")],Tq.prototype,"imagePanelEl",void 0),e([pe("nile-wysiwyg-table-menu")],Tq.prototype,"tableMenuEl",void 0),e([pe("nile-wysiwyg-suggest-list")],Tq.prototype,"suggestListEl",void 0),e([pe("nile-wysiwyg-find-bar")],Tq.prototype,"findBarEl",void 0),e([pe("nile-wysiwyg-source-view")],Tq.prototype,"sourceViewEl",void 0),e([pe("nile-wysiwyg-embed-panel")],Tq.prototype,"embedPanelEl",void 0),e([pe("nile-wysiwyg-bookmark-panel")],Tq.prototype,"bookmarkPanelEl",void 0),e([pe("nile-wysiwyg-code-menu")],Tq.prototype,"codeMenuEl",void 0),e([pe("nile-wysiwyg-shortcut-help")],Tq.prototype,"shortcutHelpEl",void 0),e([pe("nile-wysiwyg-image-menu")],Tq.prototype,"imageMenuEl",void 0),e([pe("nile-wysiwyg-embed-menu")],Tq.prototype,"embedMenuEl",void 0),e([pe("nile-wysiwyg-special-chars")],Tq.prototype,"specialCharsEl",void 0),e([pe("nile-wysiwyg-emoji-picker")],Tq.prototype,"emojiPickerEl",void 0),e([pe("nile-wysiwyg-insert-menu")],Tq.prototype,"insertMenuEl",void 0),e([pe("nile-wysiwyg-math-panel")],Tq.prototype,"mathPanelEl",void 0),e([pe("nile-wysiwyg-markdown-panel")],Tq.prototype,"markdownPanelEl",void 0),Tq=e([ce("nile-wysiwyg-editor")],Tq);class Aq{constructor(e){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,!0===e?.roundAverageSize&&(this._roundAverageSize=!0)}set(e,t){const i=this._map.get(e)||0;this._map.set(e,t),this.totalSize+=t-i}get averageSize(){if(this._map.size>0){const e=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(e):e}return 0}getSize(e){return this._map.get(e)}clear(){this._map.clear(),this.totalSize=0}}
|
|
28778
28830
|
/**
|
|
28779
28831
|
* @license
|
|
28780
28832
|
* Copyright 2021 Google LLC
|
|
28781
28833
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28782
|
-
*/function
|
|
28834
|
+
*/function Oq(e){return"horizontal"===e?"width":"height"}class fq{_getDefaultConfig(){return{direction:"vertical"}}constructor(e,t){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=e,Promise.resolve().then((()=>this.config=t||this._getDefaultConfig()))}set config(e){Object.assign(this,Object.assign({},this._getDefaultConfig(),e))}get config(){return{direction:this.direction}}get items(){return this._items}set items(e){this._setItems(e)}_setItems(e){e!==this._items&&(this._items=e,this._scheduleReflow())}get direction(){return this._direction}set direction(e){(e="horizontal"===e?e:"vertical")!==this._direction&&(this._direction=e,this._sizeDim="horizontal"===e?"width":"height",this._secondarySizeDim="horizontal"===e?"height":"width",this._positionDim="horizontal"===e?"left":"top",this._secondaryPositionDim="horizontal"===e?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(e){const{_viewDim1:t,_viewDim2:i}=this;Object.assign(this._viewportSize,e),i!==this._viewDim2?this._scheduleLayoutUpdate():t!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(e){Object.assign(this._latestCoords,e);const t=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim];Math.abs(t-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(e=!1){(e||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(e){this._pin=e,this._triggerReflow()}get pin(){if(null!==this._pin){const{index:e,block:t}=this._pin;return{index:Math.max(0,Math.min(e,this.items.length-1)),block:t}}return null}_clampScrollPosition(e){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(e,this.totalScrollSize[Oq(this.direction)]-this._viewDim1))}unpin(){null!==this._pin&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then((()=>this.reflowIfNeeded()))}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(null!==this.pin){const e=this._scrollPosition,{index:t,block:i}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:t,block:i||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=e-this._scrollPosition}}_calculateScrollIntoViewPosition(e){const{block:t}=e,i=Math.min(this.items.length,Math.max(0,e.index)),n=this._getItemPosition(i)[this._positionDim];let o=n;if("start"!==t){const e=this._getItemSize(i)[this._sizeDim];if("center"===t)o=n-.5*this._viewDim1+.5*e;else{const i=n-this._viewDim1+e;if("end"===t)o=i;else{const e=this._scrollPosition;o=Math.abs(e-n)<Math.abs(e-i)?n:i}}}return o+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(o)}getScrollIntoViewCoordinates(e){return{[this._positionDim]:this._calculateScrollIntoViewPosition(e)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){const e=new Map;if(-1!==this._first&&-1!==this._last)for(let t=this._first;t<=this._last;t++)e.set(t,this._getItemPosition(t));const t={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:e};this._scrollError&&(t.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0},this._scrollError=0),this._hostSink(t)}get _num(){return-1===this._first||-1===this._last?0:this._last-this._first+1}_checkThresholds(){if(0===this._viewDim1&&this._num>0||null!==this._pin)this._scheduleReflow();else{const e=Math.max(0,this._scrollPosition-this._overhang),t=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>e||this._physicalMax<t?this._scheduleReflow():this._updateVisibleIndices({emit:!0})}}_updateVisibleIndices(e){if(-1===this._first||-1===this._last)return;let t=this._first;for(;t<this._last&&Math.round(this._getItemPosition(t)[this._positionDim]+this._getItemSize(t)[this._sizeDim])<=Math.round(this._scrollPosition);)t++;let i=this._last;for(;i>this._first&&Math.round(this._getItemPosition(i)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)i--;t===this._firstVisible&&i===this._lastVisible||(this._firstVisible=t,this._lastVisible=i,e&&e.emit&&this._sendVisibilityChangedMessage())}}
|
|
28783
28835
|
/**
|
|
28784
28836
|
* @license
|
|
28785
28837
|
* Copyright 2021 Google LLC
|
|
28786
28838
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28787
|
-
*/function DX(e){return"horizontal"===e?"marginLeft":"marginTop"}function yX(e){return"horizontal"===e?"marginRight":"marginBottom"}function IX(e){return"horizontal"===e?"xOffset":"yOffset"}function jX(e,t){const i=[e,t].sort();return i[1]<=0?Math.min(...i):i[0]>=0?Math.max(...i):i[0]+i[1]}class zX{constructor(){this._childSizeCache=new hX,this._marginSizeCache=new hX,this._metricsCache=new Map}update(e,t){const i=new Set;Object.keys(e).forEach((n=>{const o=Number(n);this._metricsCache.set(o,e[o]),this._childSizeCache.set(o,e[o][NX(t)]),i.add(o),i.add(o+1)}));for(const e of i){const i=this._metricsCache.get(e)?.[DX(t)]||0,n=this._metricsCache.get(e-1)?.[yX(t)]||0;this._marginSizeCache.set(e,jX(i,n))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(e,t){return this._metricsCache.get(e)?.[DX(t)]||0}getChildSize(e){return this._childSizeCache.getSize(e)}getMarginSize(e){return this._marginSizeCache.getSize(e)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}}var mX=Object.freeze({__proto__:null,FlowLayout:class extends pX{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new zX,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(e){this._metricsCache.update(e,this.direction),this._scheduleReflow()}_getPhysicalItem(e){return this._newPhysicalItems.get(e)??this._physicalItems.get(e)}_getSize(e){return this._getPhysicalItem(e)&&this._metricsCache.getChildSize(e)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(e){const t=this._metricsCache;if(-1===this._first||-1===this._last)return t.averageMarginSize+e*(t.averageMarginSize+this._getAverageSize());if(e<this._first){const i=this._first-e;return this._getPhysicalItem(this._first).pos-(t.getMarginSize(this._first-1)||t.averageMarginSize)-(i*t.averageChildSize+(i-1)*t.averageMarginSize)}{const i=e-this._last;return this._getPhysicalItem(this._last).pos+(t.getChildSize(this._last)||t.averageChildSize)+(t.getMarginSize(this._last)||t.averageMarginSize)+i*(t.averageChildSize+t.averageMarginSize)}}_getPosition(e){const t=this._getPhysicalItem(e),{averageMarginSize:i}=this._metricsCache;return 0===e?this._metricsCache.getMarginSize(0)??i:t?t.pos:this._estimatePosition(e)}_calculateAnchor(e,t){return e<=0?0:t>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((e+t)/2/this._delta)))}_getAnchor(e,t){if(0===this._physicalItems.size)return this._calculateAnchor(e,t);if(this._first<0)return this._calculateAnchor(e,t);if(this._last<0)return this._calculateAnchor(e,t);const i=this._getPhysicalItem(this._first),n=this._getPhysicalItem(this._last),o=i.pos;if(n.pos+this._metricsCache.getChildSize(this._last)<e)return this._calculateAnchor(e,t);if(o>t)return this._calculateAnchor(e,t);let r=this._firstVisible-1,s=-1/0;for(;s<e;){s=this._getPhysicalItem(++r).pos+this._metricsCache.getChildSize(r)}return r}_getActiveItems(){0===this._viewDim1||0===this.items.length?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;const e=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=e,this._stable=!0}_getItems(){const e=this._newPhysicalItems;let t,i;if(this._stable=!0,null!==this.pin){const{index:e}=this.pin;this._anchorIdx=e,this._anchorPos=this._getPosition(e)}if(t=this._scrollPosition-this._overhang,i=this._scrollPosition+this._viewDim1+this._overhang,i<0||t>this._scrollSize)return void this._clearItems();null!==this._anchorIdx&&null!==this._anchorPos||(this._anchorIdx=this._getAnchor(t,i),this._anchorPos=this._getPosition(this._anchorIdx));let n=this._getSize(this._anchorIdx);void 0===n&&(this._stable=!1,n=this._getAverageSize());const o=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,r=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;0===this._anchorIdx&&(this._anchorPos=o),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-r-n);let s=0;for(this._anchorPos+n+r<t&&(s=t-(this._anchorPos+n+r)),this._anchorPos-o>i&&(s=i-(this._anchorPos-o)),s&&(this._scrollPosition-=s,t-=s,i-=s,this._scrollError+=s),e.set(this._anchorIdx,{pos:this._anchorPos,size:n}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-o,this._physicalMax=this._anchorPos+n+r;this._physicalMin>t&&this._first>0;){let t=this._getSize(--this._first);void 0===t&&(this._stable=!1,t=this._getAverageSize());let i=this._metricsCache.getMarginSize(this._first);void 0===i&&(this._stable=!1,i=this._metricsCache.averageMarginSize),this._physicalMin-=t;const n=this._physicalMin;if(e.set(this._first,{pos:n,size:t}),this._physicalMin-=i,!1===this._stable&&!1===this._estimate)break}for(;this._physicalMax<i&&this._last<this.items.length-1;){let t=this._getSize(++this._last);void 0===t&&(this._stable=!1,t=this._getAverageSize());let i=this._metricsCache.getMarginSize(this._last);void 0===i&&(this._stable=!1,i=this._metricsCache.averageMarginSize);const n=this._physicalMax;if(e.set(this._last,{pos:n,size:t}),this._physicalMax+=t+i,!this._stable&&!this._estimate)break}const a=this._calculateError();a&&(this._physicalMin-=a,this._physicalMax-=a,this._anchorPos-=a,this._scrollPosition-=a,e.forEach((e=>e.pos-=a)),this._scrollError+=a),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=e)}_calculateError(){return 0===this._first?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){const{_first:e,_last:t}=this;super._reflow(),(-1===this._first&&-1==this._last||this._first===e&&this._last===t)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){const{averageMarginSize:e}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(e+this._getAverageSize())+e)}get _delta(){const{averageMarginSize:e}=this._metricsCache;return this._getAverageSize()+e}_getItemPosition(e){return{[this._positionDim]:this._getPosition(e),[this._secondaryPositionDim]:0,[IX(this.direction)]:-(this._metricsCache.getLeadingMarginValue(e,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(e){return{[this._sizeDim]:this._getSize(e)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});class TX extends Error{constructor(e,t){var i,n,o="KaTeX parse error: "+e,r=t&&t.loc;if(r&&r.start<=r.end){var s=r.lexer.input;i=r.start,n=r.end,i===s.length?o+=" at end of input: ":o+=" at position "+(i+1)+": ";var a=s.slice(i,n).replace(/[^]/g,"$&̲");o+=(i>15?"…"+s.slice(i-15,i):s.slice(0,i))+a+(n+15<s.length?s.slice(n,n+15)+"…":s.slice(n))}super(o),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,TX.prototype),this.position=i,null!=i&&null!=n&&(this.length=n-i),this.rawMessage=e}}var xX=/([A-Z])/g,AX={"&":"&",">":">","<":"<",'"':""","'":"'"},OX=/[&><"']/g,fX=e=>String(e).replace(OX,(e=>AX[e])),bX=e=>"ordgroup"===e.type||"color"===e.type?1===e.body.length?bX(e.body[0]):e:"font"===e.type?bX(e.body):e,LX=new Set(["mathord","textord","atom"]),wX=e=>LX.has(bX(e).type),vX={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function SX(e){return void 0!==e.default?e.default:function(e){if("string"!=typeof e)return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}(Array.isArray(e.type)?e.type[0]:e.type)}function kX(e,t,i,n){var o=i[t];e[t]=void 0!==o?n.processor?n.processor(o):o:SX(n)}class EX{constructor(e){for(var t of(void 0===e&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Object.keys(vX))){var i=vX[t];i&&kX(this,t,e,i)}}reportNonstrict(e,t,i){var n=this.strict;if("function"==typeof n&&(n=n(e,t,i)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new TX("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",i);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,i){var n=this.strict;if("function"==typeof n)try{n=n(e,t,i)}catch(e){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=(e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"})(e.url);if(null==t)return!1;e.protocol=t}var i="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(i)}}class CX{constructor(e,t,i){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=i}sup(){return QX[UX[this.id]]}sub(){return QX[YX[this.id]]}fracNum(){return QX[ZX[this.id]]}fracDen(){return QX[_X[this.id]]}cramp(){return QX[PX[this.id]]}text(){return QX[VX[this.id]]}isTight(){return this.size>=2}}var QX=[new CX(0,0,!1),new CX(1,0,!0),new CX(2,1,!1),new CX(3,1,!0),new CX(4,2,!1),new CX(5,2,!0),new CX(6,3,!1),new CX(7,3,!0)],UX=[4,5,4,5,6,7,6,7],YX=[5,5,5,5,7,7,7,7],ZX=[2,3,4,5,6,7,6,7],_X=[3,3,5,5,7,7,7,7],PX=[1,1,3,3,5,5,7,7],VX=[0,1,2,3,2,3,2,3],RX={DISPLAY:QX[0],TEXT:QX[2],SCRIPT:QX[4],SCRIPTSCRIPT:QX[6]},WX=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var BX=[];function $X(e){for(var t=0;t<BX.length;t+=2)if(e>=BX[t]&&e<=BX[t+1])return!0;return!1}WX.forEach((e=>e.blocks.forEach((e=>BX.push(...e)))));var FX=e=>e+" "+e,GX=80,HX={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:FX("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:FX("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:FX("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:FX("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:FX("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:FX("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:FX("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:FX("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class JX{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>{if("toText"in e)return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)})).join("")}}var XX={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},qX={ex:!0,em:!0,mu:!0},KX=function(e){return"string"!=typeof e&&(e=e.unit),e in XX||e in qX||"ex"===e},eq=function(e,t){var i;if(e.unit in XX)i=XX[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)i=t.fontMetrics().cssEmPerMu;else{var n;if(n=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)i=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new TX("Invalid unit: '"+e.unit+"'");i=n.fontMetrics().quad}n!==t&&(i*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*i,t.maxSize)},tq=function(e){return+e.toFixed(4)+"em"},iq=function(e){return e.filter((e=>e)).join(" ")},nq=function(e){var t="";for(var i of Object.keys(e)){var n=e[i];void 0!==n&&(t+=i.replace(xX,"-$1").toLowerCase()+":"+n+";")}return t},oq=function(e,t,i){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=i||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},rq=function(e){var t=document.createElement(e);for(var i of(t.className=iq(this.classes),Object.assign(t.style,this.style),Object.keys(this.attributes)))t.setAttribute(i,this.attributes[i]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t},sq=/[\s"'>/=\x00-\x1f]/,aq=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+fX(iq(this.classes))+'"');var i=nq(this.style);for(var n of(i&&(t+=' style="'+fX(i)+'"'),Object.keys(this.attributes))){if(sq.test(n))throw new TX("Invalid attribute name '"+n+"'");t+=" "+n+'="'+fX(this.attributes[n])+'"'}t+=">";for(var o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+="</"+e+">"};class lq{constructor(e,t,i,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,oq.call(this,e,i,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return rq.call(this,"span")}toMarkup(){return aq.call(this,"span")}}class Mq{constructor(e,t,i,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,oq.call(this,t,n),this.children=i||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return rq.call(this,"a")}toMarkup(){return aq.call(this,"a")}}class cq{constructor(e,t,i){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=i}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e='<img src="'+fX(this.src)+'" alt="'+fX(this.alt)+'"',t=nq(this.style);return t&&(e+=' style="'+fX(t)+'"'),e+="'/>"}}var gq={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class uq{constructor(e,t,i,n,o,r,s,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=i||0,this.italic=n||0,this.skew=o||0,this.width=r||0,this.classes=s||[],this.style=a||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<WX.length;t++)for(var i=WX[t],n=0;n<i.blocks.length;n++){var o=i.blocks[n];if(e>=o[0]&&e<=o[1])return i.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=gq[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&((t=document.createElement("span")).style.marginRight=tq(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=iq(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=fX(iq(this.classes)),t+='"');var i="";this.italic>0&&(i+="margin-right:"+tq(this.italic)+";"),(i+=nq(this.style))&&(e=!0,t+=' style="'+fX(i)+'"');var n=fX(this.text);return e?(t+=">",t+=n,t+="</span>"):n}}class dq{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var i=0;i<this.children.length;i++)e.appendChild(this.children[i].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t of Object.keys(this.attributes))e+=" "+t+'="'+fX(this.attributes[t])+'"';e+=">";for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+="</svg>"}}class hq{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",HX[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+fX(this.alternate)+'"/>':'<path d="'+fX(HX[this.pathName])+'"/>'}}class Nq{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t of Object.keys(this.attributes))e+=" "+t+'="'+fX(this.attributes[t])+'"';return e+="/>"}}var pq={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Dq={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},yq={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function Iq(e,t){pq[e]=t}function jq(e,t,i){if(!pq[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),o=pq[t][n];if(!o&&e[0]in yq&&(n=yq[e[0]].charCodeAt(0),o=pq[t][n]),o||"text"!==i||$X(n)&&(o=pq[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var zq={};var mq={math:{},text:{}};function Tq(e,t,i,n,o,r){mq[e][o]={font:t,group:i,replace:n},r&&n&&(mq[e][n]=mq[e][o])}var xq="math",Aq="text",Oq="main",fq="ams",bq="accent-token",Lq="bin",wq="close",vq="inner",Sq="mathord",kq="op-token",Eq="open",Cq="punct",Qq="rel",Uq="spacing",Yq="textord";Tq(xq,Oq,Qq,"≡","\\equiv",!0),Tq(xq,Oq,Qq,"≺","\\prec",!0),Tq(xq,Oq,Qq,"≻","\\succ",!0),Tq(xq,Oq,Qq,"∼","\\sim",!0),Tq(xq,Oq,Qq,"⊥","\\perp"),Tq(xq,Oq,Qq,"⪯","\\preceq",!0),Tq(xq,Oq,Qq,"⪰","\\succeq",!0),Tq(xq,Oq,Qq,"≃","\\simeq",!0),Tq(xq,Oq,Qq,"∣","\\mid",!0),Tq(xq,Oq,Qq,"≪","\\ll",!0),Tq(xq,Oq,Qq,"≫","\\gg",!0),Tq(xq,Oq,Qq,"≍","\\asymp",!0),Tq(xq,Oq,Qq,"∥","\\parallel"),Tq(xq,Oq,Qq,"⋈","\\bowtie",!0),Tq(xq,Oq,Qq,"⌣","\\smile",!0),Tq(xq,Oq,Qq,"⊑","\\sqsubseteq",!0),Tq(xq,Oq,Qq,"⊒","\\sqsupseteq",!0),Tq(xq,Oq,Qq,"≐","\\doteq",!0),Tq(xq,Oq,Qq,"⌢","\\frown",!0),Tq(xq,Oq,Qq,"∋","\\ni",!0),Tq(xq,Oq,Qq,"∝","\\propto",!0),Tq(xq,Oq,Qq,"⊢","\\vdash",!0),Tq(xq,Oq,Qq,"⊣","\\dashv",!0),Tq(xq,Oq,Qq,"∋","\\owns"),Tq(xq,Oq,Cq,".","\\ldotp"),Tq(xq,Oq,Cq,"⋅","\\cdotp"),Tq(xq,Oq,Cq,"⋅","·"),Tq(Aq,Oq,Yq,"⋅","·"),Tq(xq,Oq,Yq,"#","\\#"),Tq(Aq,Oq,Yq,"#","\\#"),Tq(xq,Oq,Yq,"&","\\&"),Tq(Aq,Oq,Yq,"&","\\&"),Tq(xq,Oq,Yq,"ℵ","\\aleph",!0),Tq(xq,Oq,Yq,"∀","\\forall",!0),Tq(xq,Oq,Yq,"ℏ","\\hbar",!0),Tq(xq,Oq,Yq,"∃","\\exists",!0),Tq(xq,Oq,Yq,"∇","\\nabla",!0),Tq(xq,Oq,Yq,"♭","\\flat",!0),Tq(xq,Oq,Yq,"ℓ","\\ell",!0),Tq(xq,Oq,Yq,"♮","\\natural",!0),Tq(xq,Oq,Yq,"♣","\\clubsuit",!0),Tq(xq,Oq,Yq,"℘","\\wp",!0),Tq(xq,Oq,Yq,"♯","\\sharp",!0),Tq(xq,Oq,Yq,"♢","\\diamondsuit",!0),Tq(xq,Oq,Yq,"ℜ","\\Re",!0),Tq(xq,Oq,Yq,"♡","\\heartsuit",!0),Tq(xq,Oq,Yq,"ℑ","\\Im",!0),Tq(xq,Oq,Yq,"♠","\\spadesuit",!0),Tq(xq,Oq,Yq,"§","\\S",!0),Tq(Aq,Oq,Yq,"§","\\S"),Tq(xq,Oq,Yq,"¶","\\P",!0),Tq(Aq,Oq,Yq,"¶","\\P"),Tq(xq,Oq,Yq,"†","\\dag"),Tq(Aq,Oq,Yq,"†","\\dag"),Tq(Aq,Oq,Yq,"†","\\textdagger"),Tq(xq,Oq,Yq,"‡","\\ddag"),Tq(Aq,Oq,Yq,"‡","\\ddag"),Tq(Aq,Oq,Yq,"‡","\\textdaggerdbl"),Tq(xq,Oq,wq,"⎱","\\rmoustache",!0),Tq(xq,Oq,Eq,"⎰","\\lmoustache",!0),Tq(xq,Oq,wq,"⟯","\\rgroup",!0),Tq(xq,Oq,Eq,"⟮","\\lgroup",!0),Tq(xq,Oq,Lq,"∓","\\mp",!0),Tq(xq,Oq,Lq,"⊖","\\ominus",!0),Tq(xq,Oq,Lq,"⊎","\\uplus",!0),Tq(xq,Oq,Lq,"⊓","\\sqcap",!0),Tq(xq,Oq,Lq,"∗","\\ast"),Tq(xq,Oq,Lq,"⊔","\\sqcup",!0),Tq(xq,Oq,Lq,"◯","\\bigcirc",!0),Tq(xq,Oq,Lq,"∙","\\bullet",!0),Tq(xq,Oq,Lq,"‡","\\ddagger"),Tq(xq,Oq,Lq,"≀","\\wr",!0),Tq(xq,Oq,Lq,"⨿","\\amalg"),Tq(xq,Oq,Lq,"&","\\And"),Tq(xq,Oq,Qq,"⟵","\\longleftarrow",!0),Tq(xq,Oq,Qq,"⇐","\\Leftarrow",!0),Tq(xq,Oq,Qq,"⟸","\\Longleftarrow",!0),Tq(xq,Oq,Qq,"⟶","\\longrightarrow",!0),Tq(xq,Oq,Qq,"⇒","\\Rightarrow",!0),Tq(xq,Oq,Qq,"⟹","\\Longrightarrow",!0),Tq(xq,Oq,Qq,"↔","\\leftrightarrow",!0),Tq(xq,Oq,Qq,"⟷","\\longleftrightarrow",!0),Tq(xq,Oq,Qq,"⇔","\\Leftrightarrow",!0),Tq(xq,Oq,Qq,"⟺","\\Longleftrightarrow",!0),Tq(xq,Oq,Qq,"↦","\\mapsto",!0),Tq(xq,Oq,Qq,"⟼","\\longmapsto",!0),Tq(xq,Oq,Qq,"↗","\\nearrow",!0),Tq(xq,Oq,Qq,"↩","\\hookleftarrow",!0),Tq(xq,Oq,Qq,"↪","\\hookrightarrow",!0),Tq(xq,Oq,Qq,"↘","\\searrow",!0),Tq(xq,Oq,Qq,"↼","\\leftharpoonup",!0),Tq(xq,Oq,Qq,"⇀","\\rightharpoonup",!0),Tq(xq,Oq,Qq,"↙","\\swarrow",!0),Tq(xq,Oq,Qq,"↽","\\leftharpoondown",!0),Tq(xq,Oq,Qq,"⇁","\\rightharpoondown",!0),Tq(xq,Oq,Qq,"↖","\\nwarrow",!0),Tq(xq,Oq,Qq,"⇌","\\rightleftharpoons",!0),Tq(xq,fq,Qq,"≮","\\nless",!0),Tq(xq,fq,Qq,"","\\@nleqslant"),Tq(xq,fq,Qq,"","\\@nleqq"),Tq(xq,fq,Qq,"⪇","\\lneq",!0),Tq(xq,fq,Qq,"≨","\\lneqq",!0),Tq(xq,fq,Qq,"","\\@lvertneqq"),Tq(xq,fq,Qq,"⋦","\\lnsim",!0),Tq(xq,fq,Qq,"⪉","\\lnapprox",!0),Tq(xq,fq,Qq,"⊀","\\nprec",!0),Tq(xq,fq,Qq,"⋠","\\npreceq",!0),Tq(xq,fq,Qq,"⋨","\\precnsim",!0),Tq(xq,fq,Qq,"⪹","\\precnapprox",!0),Tq(xq,fq,Qq,"≁","\\nsim",!0),Tq(xq,fq,Qq,"","\\@nshortmid"),Tq(xq,fq,Qq,"∤","\\nmid",!0),Tq(xq,fq,Qq,"⊬","\\nvdash",!0),Tq(xq,fq,Qq,"⊭","\\nvDash",!0),Tq(xq,fq,Qq,"⋪","\\ntriangleleft"),Tq(xq,fq,Qq,"⋬","\\ntrianglelefteq",!0),Tq(xq,fq,Qq,"⊊","\\subsetneq",!0),Tq(xq,fq,Qq,"","\\@varsubsetneq"),Tq(xq,fq,Qq,"⫋","\\subsetneqq",!0),Tq(xq,fq,Qq,"","\\@varsubsetneqq"),Tq(xq,fq,Qq,"≯","\\ngtr",!0),Tq(xq,fq,Qq,"","\\@ngeqslant"),Tq(xq,fq,Qq,"","\\@ngeqq"),Tq(xq,fq,Qq,"⪈","\\gneq",!0),Tq(xq,fq,Qq,"≩","\\gneqq",!0),Tq(xq,fq,Qq,"","\\@gvertneqq"),Tq(xq,fq,Qq,"⋧","\\gnsim",!0),Tq(xq,fq,Qq,"⪊","\\gnapprox",!0),Tq(xq,fq,Qq,"⊁","\\nsucc",!0),Tq(xq,fq,Qq,"⋡","\\nsucceq",!0),Tq(xq,fq,Qq,"⋩","\\succnsim",!0),Tq(xq,fq,Qq,"⪺","\\succnapprox",!0),Tq(xq,fq,Qq,"≆","\\ncong",!0),Tq(xq,fq,Qq,"","\\@nshortparallel"),Tq(xq,fq,Qq,"∦","\\nparallel",!0),Tq(xq,fq,Qq,"⊯","\\nVDash",!0),Tq(xq,fq,Qq,"⋫","\\ntriangleright"),Tq(xq,fq,Qq,"⋭","\\ntrianglerighteq",!0),Tq(xq,fq,Qq,"","\\@nsupseteqq"),Tq(xq,fq,Qq,"⊋","\\supsetneq",!0),Tq(xq,fq,Qq,"","\\@varsupsetneq"),Tq(xq,fq,Qq,"⫌","\\supsetneqq",!0),Tq(xq,fq,Qq,"","\\@varsupsetneqq"),Tq(xq,fq,Qq,"⊮","\\nVdash",!0),Tq(xq,fq,Qq,"⪵","\\precneqq",!0),Tq(xq,fq,Qq,"⪶","\\succneqq",!0),Tq(xq,fq,Qq,"","\\@nsubseteqq"),Tq(xq,fq,Lq,"⊴","\\unlhd"),Tq(xq,fq,Lq,"⊵","\\unrhd"),Tq(xq,fq,Qq,"↚","\\nleftarrow",!0),Tq(xq,fq,Qq,"↛","\\nrightarrow",!0),Tq(xq,fq,Qq,"⇍","\\nLeftarrow",!0),Tq(xq,fq,Qq,"⇏","\\nRightarrow",!0),Tq(xq,fq,Qq,"↮","\\nleftrightarrow",!0),Tq(xq,fq,Qq,"⇎","\\nLeftrightarrow",!0),Tq(xq,fq,Qq,"△","\\vartriangle"),Tq(xq,fq,Yq,"ℏ","\\hslash"),Tq(xq,fq,Yq,"▽","\\triangledown"),Tq(xq,fq,Yq,"◊","\\lozenge"),Tq(xq,fq,Yq,"Ⓢ","\\circledS"),Tq(xq,fq,Yq,"®","\\circledR"),Tq(Aq,fq,Yq,"®","\\circledR"),Tq(xq,fq,Yq,"∡","\\measuredangle",!0),Tq(xq,fq,Yq,"∄","\\nexists"),Tq(xq,fq,Yq,"℧","\\mho"),Tq(xq,fq,Yq,"Ⅎ","\\Finv",!0),Tq(xq,fq,Yq,"⅁","\\Game",!0),Tq(xq,fq,Yq,"‵","\\backprime"),Tq(xq,fq,Yq,"▲","\\blacktriangle"),Tq(xq,fq,Yq,"▼","\\blacktriangledown"),Tq(xq,fq,Yq,"■","\\blacksquare"),Tq(xq,fq,Yq,"⧫","\\blacklozenge"),Tq(xq,fq,Yq,"★","\\bigstar"),Tq(xq,fq,Yq,"∢","\\sphericalangle",!0),Tq(xq,fq,Yq,"∁","\\complement",!0),Tq(xq,fq,Yq,"ð","\\eth",!0),Tq(Aq,Oq,Yq,"ð","ð"),Tq(xq,fq,Yq,"╱","\\diagup"),Tq(xq,fq,Yq,"╲","\\diagdown"),Tq(xq,fq,Yq,"□","\\square"),Tq(xq,fq,Yq,"□","\\Box"),Tq(xq,fq,Yq,"◊","\\Diamond"),Tq(xq,fq,Yq,"¥","\\yen",!0),Tq(Aq,fq,Yq,"¥","\\yen",!0),Tq(xq,fq,Yq,"✓","\\checkmark",!0),Tq(Aq,fq,Yq,"✓","\\checkmark"),Tq(xq,fq,Yq,"ℶ","\\beth",!0),Tq(xq,fq,Yq,"ℸ","\\daleth",!0),Tq(xq,fq,Yq,"ℷ","\\gimel",!0),Tq(xq,fq,Yq,"ϝ","\\digamma",!0),Tq(xq,fq,Yq,"ϰ","\\varkappa"),Tq(xq,fq,Eq,"┌","\\@ulcorner",!0),Tq(xq,fq,wq,"┐","\\@urcorner",!0),Tq(xq,fq,Eq,"└","\\@llcorner",!0),Tq(xq,fq,wq,"┘","\\@lrcorner",!0),Tq(xq,fq,Qq,"≦","\\leqq",!0),Tq(xq,fq,Qq,"⩽","\\leqslant",!0),Tq(xq,fq,Qq,"⪕","\\eqslantless",!0),Tq(xq,fq,Qq,"≲","\\lesssim",!0),Tq(xq,fq,Qq,"⪅","\\lessapprox",!0),Tq(xq,fq,Qq,"≊","\\approxeq",!0),Tq(xq,fq,Lq,"⋖","\\lessdot"),Tq(xq,fq,Qq,"⋘","\\lll",!0),Tq(xq,fq,Qq,"≶","\\lessgtr",!0),Tq(xq,fq,Qq,"⋚","\\lesseqgtr",!0),Tq(xq,fq,Qq,"⪋","\\lesseqqgtr",!0),Tq(xq,fq,Qq,"≑","\\doteqdot"),Tq(xq,fq,Qq,"≓","\\risingdotseq",!0),Tq(xq,fq,Qq,"≒","\\fallingdotseq",!0),Tq(xq,fq,Qq,"∽","\\backsim",!0),Tq(xq,fq,Qq,"⋍","\\backsimeq",!0),Tq(xq,fq,Qq,"⫅","\\subseteqq",!0),Tq(xq,fq,Qq,"⋐","\\Subset",!0),Tq(xq,fq,Qq,"⊏","\\sqsubset",!0),Tq(xq,fq,Qq,"≼","\\preccurlyeq",!0),Tq(xq,fq,Qq,"⋞","\\curlyeqprec",!0),Tq(xq,fq,Qq,"≾","\\precsim",!0),Tq(xq,fq,Qq,"⪷","\\precapprox",!0),Tq(xq,fq,Qq,"⊲","\\vartriangleleft"),Tq(xq,fq,Qq,"⊴","\\trianglelefteq"),Tq(xq,fq,Qq,"⊨","\\vDash",!0),Tq(xq,fq,Qq,"⊪","\\Vvdash",!0),Tq(xq,fq,Qq,"⌣","\\smallsmile"),Tq(xq,fq,Qq,"⌢","\\smallfrown"),Tq(xq,fq,Qq,"≏","\\bumpeq",!0),Tq(xq,fq,Qq,"≎","\\Bumpeq",!0),Tq(xq,fq,Qq,"≧","\\geqq",!0),Tq(xq,fq,Qq,"⩾","\\geqslant",!0),Tq(xq,fq,Qq,"⪖","\\eqslantgtr",!0),Tq(xq,fq,Qq,"≳","\\gtrsim",!0),Tq(xq,fq,Qq,"⪆","\\gtrapprox",!0),Tq(xq,fq,Lq,"⋗","\\gtrdot"),Tq(xq,fq,Qq,"⋙","\\ggg",!0),Tq(xq,fq,Qq,"≷","\\gtrless",!0),Tq(xq,fq,Qq,"⋛","\\gtreqless",!0),Tq(xq,fq,Qq,"⪌","\\gtreqqless",!0),Tq(xq,fq,Qq,"≖","\\eqcirc",!0),Tq(xq,fq,Qq,"≗","\\circeq",!0),Tq(xq,fq,Qq,"≜","\\triangleq",!0),Tq(xq,fq,Qq,"∼","\\thicksim"),Tq(xq,fq,Qq,"≈","\\thickapprox"),Tq(xq,fq,Qq,"⫆","\\supseteqq",!0),Tq(xq,fq,Qq,"⋑","\\Supset",!0),Tq(xq,fq,Qq,"⊐","\\sqsupset",!0),Tq(xq,fq,Qq,"≽","\\succcurlyeq",!0),Tq(xq,fq,Qq,"⋟","\\curlyeqsucc",!0),Tq(xq,fq,Qq,"≿","\\succsim",!0),Tq(xq,fq,Qq,"⪸","\\succapprox",!0),Tq(xq,fq,Qq,"⊳","\\vartriangleright"),Tq(xq,fq,Qq,"⊵","\\trianglerighteq"),Tq(xq,fq,Qq,"⊩","\\Vdash",!0),Tq(xq,fq,Qq,"∣","\\shortmid"),Tq(xq,fq,Qq,"∥","\\shortparallel"),Tq(xq,fq,Qq,"≬","\\between",!0),Tq(xq,fq,Qq,"⋔","\\pitchfork",!0),Tq(xq,fq,Qq,"∝","\\varpropto"),Tq(xq,fq,Qq,"◀","\\blacktriangleleft"),Tq(xq,fq,Qq,"∴","\\therefore",!0),Tq(xq,fq,Qq,"∍","\\backepsilon"),Tq(xq,fq,Qq,"▶","\\blacktriangleright"),Tq(xq,fq,Qq,"∵","\\because",!0),Tq(xq,fq,Qq,"⋘","\\llless"),Tq(xq,fq,Qq,"⋙","\\gggtr"),Tq(xq,fq,Lq,"⊲","\\lhd"),Tq(xq,fq,Lq,"⊳","\\rhd"),Tq(xq,fq,Qq,"≂","\\eqsim",!0),Tq(xq,Oq,Qq,"⋈","\\Join"),Tq(xq,fq,Qq,"≑","\\Doteq",!0),Tq(xq,fq,Lq,"∔","\\dotplus",!0),Tq(xq,fq,Lq,"∖","\\smallsetminus"),Tq(xq,fq,Lq,"⋒","\\Cap",!0),Tq(xq,fq,Lq,"⋓","\\Cup",!0),Tq(xq,fq,Lq,"⩞","\\doublebarwedge",!0),Tq(xq,fq,Lq,"⊟","\\boxminus",!0),Tq(xq,fq,Lq,"⊞","\\boxplus",!0),Tq(xq,fq,Lq,"⋇","\\divideontimes",!0),Tq(xq,fq,Lq,"⋉","\\ltimes",!0),Tq(xq,fq,Lq,"⋊","\\rtimes",!0),Tq(xq,fq,Lq,"⋋","\\leftthreetimes",!0),Tq(xq,fq,Lq,"⋌","\\rightthreetimes",!0),Tq(xq,fq,Lq,"⋏","\\curlywedge",!0),Tq(xq,fq,Lq,"⋎","\\curlyvee",!0),Tq(xq,fq,Lq,"⊝","\\circleddash",!0),Tq(xq,fq,Lq,"⊛","\\circledast",!0),Tq(xq,fq,Lq,"⋅","\\centerdot"),Tq(xq,fq,Lq,"⊺","\\intercal",!0),Tq(xq,fq,Lq,"⋒","\\doublecap"),Tq(xq,fq,Lq,"⋓","\\doublecup"),Tq(xq,fq,Lq,"⊠","\\boxtimes",!0),Tq(xq,fq,Qq,"⇢","\\dashrightarrow",!0),Tq(xq,fq,Qq,"⇠","\\dashleftarrow",!0),Tq(xq,fq,Qq,"⇇","\\leftleftarrows",!0),Tq(xq,fq,Qq,"⇆","\\leftrightarrows",!0),Tq(xq,fq,Qq,"⇚","\\Lleftarrow",!0),Tq(xq,fq,Qq,"↞","\\twoheadleftarrow",!0),Tq(xq,fq,Qq,"↢","\\leftarrowtail",!0),Tq(xq,fq,Qq,"↫","\\looparrowleft",!0),Tq(xq,fq,Qq,"⇋","\\leftrightharpoons",!0),Tq(xq,fq,Qq,"↶","\\curvearrowleft",!0),Tq(xq,fq,Qq,"↺","\\circlearrowleft",!0),Tq(xq,fq,Qq,"↰","\\Lsh",!0),Tq(xq,fq,Qq,"⇈","\\upuparrows",!0),Tq(xq,fq,Qq,"↿","\\upharpoonleft",!0),Tq(xq,fq,Qq,"⇃","\\downharpoonleft",!0),Tq(xq,Oq,Qq,"⊶","\\origof",!0),Tq(xq,Oq,Qq,"⊷","\\imageof",!0),Tq(xq,fq,Qq,"⊸","\\multimap",!0),Tq(xq,fq,Qq,"↭","\\leftrightsquigarrow",!0),Tq(xq,fq,Qq,"⇉","\\rightrightarrows",!0),Tq(xq,fq,Qq,"⇄","\\rightleftarrows",!0),Tq(xq,fq,Qq,"↠","\\twoheadrightarrow",!0),Tq(xq,fq,Qq,"↣","\\rightarrowtail",!0),Tq(xq,fq,Qq,"↬","\\looparrowright",!0),Tq(xq,fq,Qq,"↷","\\curvearrowright",!0),Tq(xq,fq,Qq,"↻","\\circlearrowright",!0),Tq(xq,fq,Qq,"↱","\\Rsh",!0),Tq(xq,fq,Qq,"⇊","\\downdownarrows",!0),Tq(xq,fq,Qq,"↾","\\upharpoonright",!0),Tq(xq,fq,Qq,"⇂","\\downharpoonright",!0),Tq(xq,fq,Qq,"⇝","\\rightsquigarrow",!0),Tq(xq,fq,Qq,"⇝","\\leadsto"),Tq(xq,fq,Qq,"⇛","\\Rrightarrow",!0),Tq(xq,fq,Qq,"↾","\\restriction"),Tq(xq,Oq,Yq,"‘","`"),Tq(xq,Oq,Yq,"$","\\$"),Tq(Aq,Oq,Yq,"$","\\$"),Tq(Aq,Oq,Yq,"$","\\textdollar"),Tq(xq,Oq,Yq,"%","\\%"),Tq(Aq,Oq,Yq,"%","\\%"),Tq(xq,Oq,Yq,"_","\\_"),Tq(Aq,Oq,Yq,"_","\\_"),Tq(Aq,Oq,Yq,"_","\\textunderscore"),Tq(xq,Oq,Yq,"∠","\\angle",!0),Tq(xq,Oq,Yq,"∞","\\infty",!0),Tq(xq,Oq,Yq,"′","\\prime"),Tq(xq,Oq,Yq,"△","\\triangle"),Tq(xq,Oq,Yq,"Γ","\\Gamma",!0),Tq(xq,Oq,Yq,"Δ","\\Delta",!0),Tq(xq,Oq,Yq,"Θ","\\Theta",!0),Tq(xq,Oq,Yq,"Λ","\\Lambda",!0),Tq(xq,Oq,Yq,"Ξ","\\Xi",!0),Tq(xq,Oq,Yq,"Π","\\Pi",!0),Tq(xq,Oq,Yq,"Σ","\\Sigma",!0),Tq(xq,Oq,Yq,"Υ","\\Upsilon",!0),Tq(xq,Oq,Yq,"Φ","\\Phi",!0),Tq(xq,Oq,Yq,"Ψ","\\Psi",!0),Tq(xq,Oq,Yq,"Ω","\\Omega",!0),Tq(xq,Oq,Yq,"A","Α"),Tq(xq,Oq,Yq,"B","Β"),Tq(xq,Oq,Yq,"E","Ε"),Tq(xq,Oq,Yq,"Z","Ζ"),Tq(xq,Oq,Yq,"H","Η"),Tq(xq,Oq,Yq,"I","Ι"),Tq(xq,Oq,Yq,"K","Κ"),Tq(xq,Oq,Yq,"M","Μ"),Tq(xq,Oq,Yq,"N","Ν"),Tq(xq,Oq,Yq,"O","Ο"),Tq(xq,Oq,Yq,"P","Ρ"),Tq(xq,Oq,Yq,"T","Τ"),Tq(xq,Oq,Yq,"X","Χ"),Tq(xq,Oq,Yq,"¬","\\neg",!0),Tq(xq,Oq,Yq,"¬","\\lnot"),Tq(xq,Oq,Yq,"⊤","\\top"),Tq(xq,Oq,Yq,"⊥","\\bot"),Tq(xq,Oq,Yq,"∅","\\emptyset"),Tq(xq,fq,Yq,"∅","\\varnothing"),Tq(xq,Oq,Sq,"α","\\alpha",!0),Tq(xq,Oq,Sq,"β","\\beta",!0),Tq(xq,Oq,Sq,"γ","\\gamma",!0),Tq(xq,Oq,Sq,"δ","\\delta",!0),Tq(xq,Oq,Sq,"ϵ","\\epsilon",!0),Tq(xq,Oq,Sq,"ζ","\\zeta",!0),Tq(xq,Oq,Sq,"η","\\eta",!0),Tq(xq,Oq,Sq,"θ","\\theta",!0),Tq(xq,Oq,Sq,"ι","\\iota",!0),Tq(xq,Oq,Sq,"κ","\\kappa",!0),Tq(xq,Oq,Sq,"λ","\\lambda",!0),Tq(xq,Oq,Sq,"μ","\\mu",!0),Tq(xq,Oq,Sq,"ν","\\nu",!0),Tq(xq,Oq,Sq,"ξ","\\xi",!0),Tq(xq,Oq,Sq,"ο","\\omicron",!0),Tq(xq,Oq,Sq,"π","\\pi",!0),Tq(xq,Oq,Sq,"ρ","\\rho",!0),Tq(xq,Oq,Sq,"σ","\\sigma",!0),Tq(xq,Oq,Sq,"τ","\\tau",!0),Tq(xq,Oq,Sq,"υ","\\upsilon",!0),Tq(xq,Oq,Sq,"ϕ","\\phi",!0),Tq(xq,Oq,Sq,"χ","\\chi",!0),Tq(xq,Oq,Sq,"ψ","\\psi",!0),Tq(xq,Oq,Sq,"ω","\\omega",!0),Tq(xq,Oq,Sq,"ε","\\varepsilon",!0),Tq(xq,Oq,Sq,"ϑ","\\vartheta",!0),Tq(xq,Oq,Sq,"ϖ","\\varpi",!0),Tq(xq,Oq,Sq,"ϱ","\\varrho",!0),Tq(xq,Oq,Sq,"ς","\\varsigma",!0),Tq(xq,Oq,Sq,"φ","\\varphi",!0),Tq(xq,Oq,Lq,"∗","*",!0),Tq(xq,Oq,Lq,"+","+"),Tq(xq,Oq,Lq,"−","-",!0),Tq(xq,Oq,Lq,"⋅","\\cdot",!0),Tq(xq,Oq,Lq,"∘","\\circ",!0),Tq(xq,Oq,Lq,"÷","\\div",!0),Tq(xq,Oq,Lq,"±","\\pm",!0),Tq(xq,Oq,Lq,"×","\\times",!0),Tq(xq,Oq,Lq,"∩","\\cap",!0),Tq(xq,Oq,Lq,"∪","\\cup",!0),Tq(xq,Oq,Lq,"∖","\\setminus",!0),Tq(xq,Oq,Lq,"∧","\\land"),Tq(xq,Oq,Lq,"∨","\\lor"),Tq(xq,Oq,Lq,"∧","\\wedge",!0),Tq(xq,Oq,Lq,"∨","\\vee",!0),Tq(xq,Oq,Yq,"√","\\surd"),Tq(xq,Oq,Eq,"⟨","\\langle",!0),Tq(xq,Oq,Eq,"∣","\\lvert"),Tq(xq,Oq,Eq,"∥","\\lVert"),Tq(xq,Oq,wq,"?","?"),Tq(xq,Oq,wq,"!","!"),Tq(xq,Oq,wq,"⟩","\\rangle",!0),Tq(xq,Oq,wq,"∣","\\rvert"),Tq(xq,Oq,wq,"∥","\\rVert"),Tq(xq,Oq,Qq,"=","="),Tq(xq,Oq,Qq,":",":"),Tq(xq,Oq,Qq,"≈","\\approx",!0),Tq(xq,Oq,Qq,"≅","\\cong",!0),Tq(xq,Oq,Qq,"≥","\\ge"),Tq(xq,Oq,Qq,"≥","\\geq",!0),Tq(xq,Oq,Qq,"←","\\gets"),Tq(xq,Oq,Qq,">","\\gt",!0),Tq(xq,Oq,Qq,"∈","\\in",!0),Tq(xq,Oq,Qq,"","\\@not"),Tq(xq,Oq,Qq,"⊂","\\subset",!0),Tq(xq,Oq,Qq,"⊃","\\supset",!0),Tq(xq,Oq,Qq,"⊆","\\subseteq",!0),Tq(xq,Oq,Qq,"⊇","\\supseteq",!0),Tq(xq,fq,Qq,"⊈","\\nsubseteq",!0),Tq(xq,fq,Qq,"⊉","\\nsupseteq",!0),Tq(xq,Oq,Qq,"⊨","\\models"),Tq(xq,Oq,Qq,"←","\\leftarrow",!0),Tq(xq,Oq,Qq,"≤","\\le"),Tq(xq,Oq,Qq,"≤","\\leq",!0),Tq(xq,Oq,Qq,"<","\\lt",!0),Tq(xq,Oq,Qq,"→","\\rightarrow",!0),Tq(xq,Oq,Qq,"→","\\to"),Tq(xq,fq,Qq,"≱","\\ngeq",!0),Tq(xq,fq,Qq,"≰","\\nleq",!0),Tq(xq,Oq,Uq," ","\\ "),Tq(xq,Oq,Uq," ","\\space"),Tq(xq,Oq,Uq," ","\\nobreakspace"),Tq(Aq,Oq,Uq," ","\\ "),Tq(Aq,Oq,Uq," "," "),Tq(Aq,Oq,Uq," ","\\space"),Tq(Aq,Oq,Uq," ","\\nobreakspace"),Tq(xq,Oq,Uq,"","\\nobreak"),Tq(xq,Oq,Uq,"","\\allowbreak"),Tq(xq,Oq,Cq,",",","),Tq(xq,Oq,Cq,";",";"),Tq(xq,fq,Lq,"⊼","\\barwedge",!0),Tq(xq,fq,Lq,"⊻","\\veebar",!0),Tq(xq,Oq,Lq,"⊙","\\odot",!0),Tq(xq,Oq,Lq,"⊕","\\oplus",!0),Tq(xq,Oq,Lq,"⊗","\\otimes",!0),Tq(xq,Oq,Yq,"∂","\\partial",!0),Tq(xq,Oq,Lq,"⊘","\\oslash",!0),Tq(xq,fq,Lq,"⊚","\\circledcirc",!0),Tq(xq,fq,Lq,"⊡","\\boxdot",!0),Tq(xq,Oq,Lq,"△","\\bigtriangleup"),Tq(xq,Oq,Lq,"▽","\\bigtriangledown"),Tq(xq,Oq,Lq,"†","\\dagger"),Tq(xq,Oq,Lq,"⋄","\\diamond"),Tq(xq,Oq,Lq,"⋆","\\star"),Tq(xq,Oq,Lq,"◃","\\triangleleft"),Tq(xq,Oq,Lq,"▹","\\triangleright"),Tq(xq,Oq,Eq,"{","\\{"),Tq(Aq,Oq,Yq,"{","\\{"),Tq(Aq,Oq,Yq,"{","\\textbraceleft"),Tq(xq,Oq,wq,"}","\\}"),Tq(Aq,Oq,Yq,"}","\\}"),Tq(Aq,Oq,Yq,"}","\\textbraceright"),Tq(xq,Oq,Eq,"{","\\lbrace"),Tq(xq,Oq,wq,"}","\\rbrace"),Tq(xq,Oq,Eq,"[","\\lbrack",!0),Tq(Aq,Oq,Yq,"[","\\lbrack",!0),Tq(xq,Oq,wq,"]","\\rbrack",!0),Tq(Aq,Oq,Yq,"]","\\rbrack",!0),Tq(xq,Oq,Eq,"(","\\lparen",!0),Tq(xq,Oq,wq,")","\\rparen",!0),Tq(Aq,Oq,Yq,"<","\\textless",!0),Tq(Aq,Oq,Yq,">","\\textgreater",!0),Tq(xq,Oq,Eq,"⌊","\\lfloor",!0),Tq(xq,Oq,wq,"⌋","\\rfloor",!0),Tq(xq,Oq,Eq,"⌈","\\lceil",!0),Tq(xq,Oq,wq,"⌉","\\rceil",!0),Tq(xq,Oq,Yq,"\\","\\backslash"),Tq(xq,Oq,Yq,"∣","|"),Tq(xq,Oq,Yq,"∣","\\vert"),Tq(Aq,Oq,Yq,"|","\\textbar",!0),Tq(xq,Oq,Yq,"∥","\\|"),Tq(xq,Oq,Yq,"∥","\\Vert"),Tq(Aq,Oq,Yq,"∥","\\textbardbl"),Tq(Aq,Oq,Yq,"~","\\textasciitilde"),Tq(Aq,Oq,Yq,"\\","\\textbackslash"),Tq(Aq,Oq,Yq,"^","\\textasciicircum"),Tq(xq,Oq,Qq,"↑","\\uparrow",!0),Tq(xq,Oq,Qq,"⇑","\\Uparrow",!0),Tq(xq,Oq,Qq,"↓","\\downarrow",!0),Tq(xq,Oq,Qq,"⇓","\\Downarrow",!0),Tq(xq,Oq,Qq,"↕","\\updownarrow",!0),Tq(xq,Oq,Qq,"⇕","\\Updownarrow",!0),Tq(xq,Oq,kq,"∐","\\coprod"),Tq(xq,Oq,kq,"⋁","\\bigvee"),Tq(xq,Oq,kq,"⋀","\\bigwedge"),Tq(xq,Oq,kq,"⨄","\\biguplus"),Tq(xq,Oq,kq,"⋂","\\bigcap"),Tq(xq,Oq,kq,"⋃","\\bigcup"),Tq(xq,Oq,kq,"∫","\\int"),Tq(xq,Oq,kq,"∫","\\intop"),Tq(xq,Oq,kq,"∬","\\iint"),Tq(xq,Oq,kq,"∭","\\iiint"),Tq(xq,Oq,kq,"∏","\\prod"),Tq(xq,Oq,kq,"∑","\\sum"),Tq(xq,Oq,kq,"⨂","\\bigotimes"),Tq(xq,Oq,kq,"⨁","\\bigoplus"),Tq(xq,Oq,kq,"⨀","\\bigodot"),Tq(xq,Oq,kq,"∮","\\oint"),Tq(xq,Oq,kq,"∯","\\oiint"),Tq(xq,Oq,kq,"∰","\\oiiint"),Tq(xq,Oq,kq,"⨆","\\bigsqcup"),Tq(xq,Oq,kq,"∫","\\smallint"),Tq(Aq,Oq,vq,"…","\\textellipsis"),Tq(xq,Oq,vq,"…","\\mathellipsis"),Tq(Aq,Oq,vq,"…","\\ldots",!0),Tq(xq,Oq,vq,"…","\\ldots",!0),Tq(xq,Oq,vq,"⋯","\\@cdots",!0),Tq(xq,Oq,vq,"⋱","\\ddots",!0),Tq(xq,Oq,Yq,"⋮","\\varvdots"),Tq(Aq,Oq,Yq,"⋮","\\varvdots"),Tq(xq,Oq,bq,"ˊ","\\acute"),Tq(xq,Oq,bq,"ˋ","\\grave"),Tq(xq,Oq,bq,"¨","\\ddot"),Tq(xq,Oq,bq,"~","\\tilde"),Tq(xq,Oq,bq,"ˉ","\\bar"),Tq(xq,Oq,bq,"˘","\\breve"),Tq(xq,Oq,bq,"ˇ","\\check"),Tq(xq,Oq,bq,"^","\\hat"),Tq(xq,Oq,bq,"⃗","\\vec"),Tq(xq,Oq,bq,"˙","\\dot"),Tq(xq,Oq,bq,"˚","\\mathring"),Tq(xq,Oq,Sq,"","\\@imath"),Tq(xq,Oq,Sq,"","\\@jmath"),Tq(xq,Oq,Yq,"ı","ı"),Tq(xq,Oq,Yq,"ȷ","ȷ"),Tq(Aq,Oq,Yq,"ı","\\i",!0),Tq(Aq,Oq,Yq,"ȷ","\\j",!0),Tq(Aq,Oq,Yq,"ß","\\ss",!0),Tq(Aq,Oq,Yq,"æ","\\ae",!0),Tq(Aq,Oq,Yq,"œ","\\oe",!0),Tq(Aq,Oq,Yq,"ø","\\o",!0),Tq(Aq,Oq,Yq,"Æ","\\AE",!0),Tq(Aq,Oq,Yq,"Œ","\\OE",!0),Tq(Aq,Oq,Yq,"Ø","\\O",!0),Tq(Aq,Oq,bq,"ˊ","\\'"),Tq(Aq,Oq,bq,"ˋ","\\`"),Tq(Aq,Oq,bq,"ˆ","\\^"),Tq(Aq,Oq,bq,"˜","\\~"),Tq(Aq,Oq,bq,"ˉ","\\="),Tq(Aq,Oq,bq,"˘","\\u"),Tq(Aq,Oq,bq,"˙","\\."),Tq(Aq,Oq,bq,"¸","\\c"),Tq(Aq,Oq,bq,"˚","\\r"),Tq(Aq,Oq,bq,"ˇ","\\v"),Tq(Aq,Oq,bq,"¨",'\\"'),Tq(Aq,Oq,bq,"˝","\\H"),Tq(Aq,Oq,bq,"◯","\\textcircled");var Zq={"--":!0,"---":!0,"``":!0,"''":!0};Tq(Aq,Oq,Yq,"–","--",!0),Tq(Aq,Oq,Yq,"–","\\textendash"),Tq(Aq,Oq,Yq,"—","---",!0),Tq(Aq,Oq,Yq,"—","\\textemdash"),Tq(Aq,Oq,Yq,"‘","`",!0),Tq(Aq,Oq,Yq,"‘","\\textquoteleft"),Tq(Aq,Oq,Yq,"’","'",!0),Tq(Aq,Oq,Yq,"’","\\textquoteright"),Tq(Aq,Oq,Yq,"“","``",!0),Tq(Aq,Oq,Yq,"“","\\textquotedblleft"),Tq(Aq,Oq,Yq,"”","''",!0),Tq(Aq,Oq,Yq,"”","\\textquotedblright"),Tq(xq,Oq,Yq,"°","\\degree",!0),Tq(Aq,Oq,Yq,"°","\\degree"),Tq(Aq,Oq,Yq,"°","\\textdegree",!0),Tq(xq,Oq,Yq,"£","\\pounds"),Tq(xq,Oq,Yq,"£","\\mathsterling",!0),Tq(Aq,Oq,Yq,"£","\\pounds"),Tq(Aq,Oq,Yq,"£","\\textsterling",!0),Tq(xq,fq,Yq,"✠","\\maltese"),Tq(Aq,fq,Yq,"✠","\\maltese");for(var _q='0123456789/@."',Pq=0;Pq<14;Pq++){var Vq=_q.charAt(Pq);Tq(xq,Oq,Yq,Vq,Vq)}for(var Rq='0123456789!@*()-=+";:?/.,',Wq=0;Wq<25;Wq++){var Bq=Rq.charAt(Wq);Tq(Aq,Oq,Yq,Bq,Bq)}for(var $q,Fq="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Gq=0;Gq<52;Gq++){var Hq=Fq.charAt(Gq);Tq(xq,Oq,Sq,Hq,Hq),Tq(Aq,Oq,Yq,Hq,Hq)}Tq(xq,fq,Yq,"C","ℂ"),Tq(Aq,fq,Yq,"C","ℂ"),Tq(xq,fq,Yq,"H","ℍ"),Tq(Aq,fq,Yq,"H","ℍ"),Tq(xq,fq,Yq,"N","ℕ"),Tq(Aq,fq,Yq,"N","ℕ"),Tq(xq,fq,Yq,"P","ℙ"),Tq(Aq,fq,Yq,"P","ℙ"),Tq(xq,fq,Yq,"Q","ℚ"),Tq(Aq,fq,Yq,"Q","ℚ"),Tq(xq,fq,Yq,"R","ℝ"),Tq(Aq,fq,Yq,"R","ℝ"),Tq(xq,fq,Yq,"Z","ℤ"),Tq(Aq,fq,Yq,"Z","ℤ"),Tq(xq,Oq,Sq,"h","ℎ"),Tq(Aq,Oq,Sq,"h","ℎ");for(var Jq=0;Jq<52;Jq++){var Xq=Fq.charAt(Jq);Tq(xq,Oq,Sq,Xq,$q=String.fromCharCode(55349,56320+Jq)),Tq(Aq,Oq,Yq,Xq,$q),Tq(xq,Oq,Sq,Xq,$q=String.fromCharCode(55349,56372+Jq)),Tq(Aq,Oq,Yq,Xq,$q),Tq(xq,Oq,Sq,Xq,$q=String.fromCharCode(55349,56424+Jq)),Tq(Aq,Oq,Yq,Xq,$q),Tq(xq,Oq,Sq,Xq,$q=String.fromCharCode(55349,56580+Jq)),Tq(Aq,Oq,Yq,Xq,$q),Tq(xq,Oq,Sq,Xq,$q=String.fromCharCode(55349,56684+Jq)),Tq(Aq,Oq,Yq,Xq,$q),Tq(xq,Oq,Sq,Xq,$q=String.fromCharCode(55349,56736+Jq)),Tq(Aq,Oq,Yq,Xq,$q),Tq(xq,Oq,Sq,Xq,$q=String.fromCharCode(55349,56788+Jq)),Tq(Aq,Oq,Yq,Xq,$q),Tq(xq,Oq,Sq,Xq,$q=String.fromCharCode(55349,56840+Jq)),Tq(Aq,Oq,Yq,Xq,$q),Tq(xq,Oq,Sq,Xq,$q=String.fromCharCode(55349,56944+Jq)),Tq(Aq,Oq,Yq,Xq,$q),Jq<26&&(Tq(xq,Oq,Sq,Xq,$q=String.fromCharCode(55349,56632+Jq)),Tq(Aq,Oq,Yq,Xq,$q),Tq(xq,Oq,Sq,Xq,$q=String.fromCharCode(55349,56476+Jq)),Tq(Aq,Oq,Yq,Xq,$q))}Tq(xq,Oq,Sq,"k",$q=String.fromCharCode(55349,56668)),Tq(Aq,Oq,Yq,"k",$q);for(var qq=0;qq<10;qq++){var Kq=qq.toString();Tq(xq,Oq,Sq,Kq,$q=String.fromCharCode(55349,57294+qq)),Tq(Aq,Oq,Yq,Kq,$q),Tq(xq,Oq,Sq,Kq,$q=String.fromCharCode(55349,57314+qq)),Tq(Aq,Oq,Yq,Kq,$q),Tq(xq,Oq,Sq,Kq,$q=String.fromCharCode(55349,57324+qq)),Tq(Aq,Oq,Yq,Kq,$q),Tq(xq,Oq,Sq,Kq,$q=String.fromCharCode(55349,57334+qq)),Tq(Aq,Oq,Yq,Kq,$q)}for(var eK="ÐÞþ",tK=0;tK<3;tK++){var iK=eK.charAt(tK);Tq(xq,Oq,Sq,iK,iK),Tq(Aq,Oq,Yq,iK,iK)}var nK={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},oK={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},rK={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},sK={mathClass:"",textClass:"",font:""},aK={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},lK={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},MK={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},cK={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},gK={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},uK={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},dK={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},hK=[nK,nK,oK,oK,rK,rK,{mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},sK,sK,sK,aK,aK,lK,lK,MK,MK,cK,cK,gK,gK,uK,uK,sK,sK,dK,dK],NK=[nK,sK,cK,gK,dK],pK=function(e,t,i){if(mq[i][e]){var n=mq[i][e].replace;n&&(e=n)}return{value:e,metrics:jq(e,t,i)}},DK=function(e,t,i,n,o){var r,s=pK(e,t,i),a=s.metrics;if(e=s.value,a){var l=a.italic;("text"===i||n&&"mathit"===n.font)&&(l=0),r=new uq(e,a.height,a.depth,l,a.skew,a.width,o)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+i+"'"),r=new uq(e,0,0,0,0,0,o);if(n){r.maxFontSize=n.sizeMultiplier,n.style.isTight()&&r.classes.push("mtight");var M=n.getColor();M&&(r.style.color=M)}return r},yK=function(e,t,i,n){return void 0===n&&(n=[]),"boldsymbol"===i.font&&pK(e,"Main-Bold",t).metrics?DK(e,"Main-Bold",t,i,n.concat(["mathbf"])):"\\"===e||"main"===mq[t][e].font?DK(e,"Main-Regular",t,i,n):DK(e,"AMS-Regular",t,i,n.concat(["amsrm"]))},IK=function(e,t,i){var n=e.mode,o=e.text,r=["mord"],{font:s,fontFamily:a,fontWeight:l,fontShape:M}=t,c="math"===n||"text"===n&&!!s,g=c?s:a,u="",d="";if(55349===o.charCodeAt(0)){var h=(e=>{var t=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536;if(119808<=t&&t<120484){var i=Math.floor((t-119808)/26);return hK[i]}if(120782<=t&&t<=120831){var n=Math.floor((t-120782)/10);return NK[n]}if(120485===t||120486===t)return hK[0];if(120486<t&&t<120782)return sK;throw new TX("Unsupported character: "+e)})(o);u=h.font,d=h[n+"Class"]}if(u)return DK(o,u,n,t,r.concat(d));if(g){var N,p;if("boldsymbol"===g){var D=function(e,t,i){return"textord"!==i&&pK(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(o,n,i);N=D.fontName,p=[D.fontClass]}else c?(N=vK[s].fontName,p=[s]):(N=wK(a,l,M),p=[a,l,M]);if(pK(o,N,n).metrics)return DK(o,N,n,t,r.concat(p));if(Zq.hasOwnProperty(o)&&"Typewriter"===N.slice(0,10)){for(var y=[],I=0;I<o.length;I++)y.push(DK(o[I],N,n,t,r.concat(p)));return OK(y)}}if("mathord"===i)return DK(o,"Math-Italic",n,t,r.concat(["mathnormal"]));if("textord"===i){var j=mq[n][o]&&mq[n][o].font;if("ams"===j){var z=wK("amsrm",l,M);return DK(o,z,n,t,r.concat("amsrm",l,M))}if("main"!==j&&j){var m=wK(j,l,M);return DK(o,m,n,t,r.concat(m,l,M))}var T=wK("textrm",l,M);return DK(o,T,n,t,r.concat(l,M))}throw new Error("unexpected type: "+i+" in makeOrd")},jK=(e,t)=>{if(iq(e.classes)!==iq(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||0!==e.italic&&e.hasClass("mathnormal"))return!1;if(1===e.classes.length){var i=e.classes[0];if("mbin"===i||"mord"===i)return!1}for(var n of Object.keys(e.style))if(e.style[n]!==t.style[n])return!1;for(var o of Object.keys(t.style))if(e.style[o]!==t.style[o])return!1;return!0},zK=e=>{for(var t=0;t<e.length-1;t++){var i=e[t],n=e[t+1];i instanceof uq&&n instanceof uq&&jK(i,n)&&(i.text+=n.text,i.height=Math.max(i.height,n.height),i.depth=Math.max(i.depth,n.depth),i.italic=n.italic,e.splice(t+1,1),t--)}return e},mK=function(e){for(var t=0,i=0,n=0,o=0;o<e.children.length;o++){var r=e.children[o];r.height>t&&(t=r.height),r.depth>i&&(i=r.depth),r.maxFontSize>n&&(n=r.maxFontSize)}e.height=t,e.depth=i,e.maxFontSize=n},TK=function(e,t,i,n){var o=new lq(e,t,i,n);return mK(o),o},xK=(e,t,i,n)=>new lq(e,t,i,n),AK=function(e,t,i){var n=TK([e],[],t);return n.height=Math.max(i||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=tq(n.height),n.maxFontSize=1,n},OK=function(e){var t=new JX(e);return mK(t),t},fK=function(e,t){return e instanceof JX?TK([],[e],t):e},bK=function(e,t){for(var{children:i,depth:n}=function(e){if("individualShift"===e.positionType){for(var t=e.children,i=[t[0]],n=-t[0].shift-t[0].elem.depth,o=n,r=1;r<t.length;r++){var s=-t[r].shift-o-t[r].elem.depth,a=s-(t[r-1].elem.height+t[r-1].elem.depth);o+=s,i.push({type:"kern",size:a}),i.push(t[r])}return{children:i,depth:n}}var l;if("top"===e.positionType){for(var M=e.positionData,c=0;c<e.children.length;c++){var g=e.children[c];M-="kern"===g.type?g.size:g.elem.height+g.elem.depth}l=M}else if("bottom"===e.positionType)l=-e.positionData;else{var u=e.children[0];if("elem"!==u.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-u.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-u.elem.depth}}return{children:e.children,depth:l}}(e),o=0,r=0;r<i.length;r++){var s=i[r];if("elem"===s.type){var a=s.elem;o=Math.max(o,a.maxFontSize,a.height)}}o+=2;var l=TK(["pstrut"],[]);l.style.height=tq(o);for(var M=[],c=n,g=n,u=n,d=0;d<i.length;d++){var h=i[d];if("kern"===h.type)u+=h.size;else{var N=h.elem,p=h.wrapperClasses||[],D=h.wrapperStyle||{},y=TK(p,[l,N],void 0,D);y.style.top=tq(-o-u-N.depth),h.marginLeft&&(y.style.marginLeft=h.marginLeft),h.marginRight&&(y.style.marginRight=h.marginRight),M.push(y),u+=N.height+N.depth}c=Math.min(c,u),g=Math.max(g,u)}var I,j=TK(["vlist"],M);if(j.style.height=tq(g),c<0){var z=TK([],[]),m=TK(["vlist"],[z]);m.style.height=tq(-c);var T=TK(["vlist-s"],[new uq("")]);I=[TK(["vlist-r"],[j,T]),TK(["vlist-r"],[m])]}else I=[TK(["vlist-r"],[j])];var x=TK(["vlist-t"],I);return 2===I.length&&x.classes.push("vlist-t2"),x.height=g,x.depth=-c,x},LK=(e,t)=>{var i=TK(["mspace"],[],t),n=eq(e,t);return i.style.marginRight=tq(n),i},wK=(e,t,i)=>{var n;switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===i?"BoldItalic":"textbf"===t?"Bold":"textit"===i?"Italic":"Regular")},vK={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},SK={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},kK=function(e,t){var[i,n,o]=SK[e],r=new hq(i),s=new dq([r],{width:tq(n),height:tq(o),style:"width:"+tq(n),viewBox:"0 0 "+1e3*n+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),a=xK(["overlay"],[s],t);return a.height=o,a.style.height=tq(o),a.style.width=tq(n),a},EK={number:3,unit:"mu"},CK={number:4,unit:"mu"},QK={number:5,unit:"mu"},UK={mord:{mop:EK,mbin:CK,mrel:QK,minner:EK},mop:{mord:EK,mop:EK,mrel:QK,minner:EK},mbin:{mord:CK,mop:CK,mopen:CK,minner:CK},mrel:{mord:QK,mop:QK,mopen:QK,minner:QK},mopen:{},mclose:{mop:EK,mbin:CK,mrel:QK,minner:EK},mpunct:{mord:EK,mop:EK,mrel:QK,mopen:EK,mclose:EK,mpunct:EK,minner:EK},minner:{mord:EK,mop:EK,mbin:CK,mrel:QK,mopen:EK,mpunct:EK,minner:EK}},YK={mord:{mop:EK},mop:{mord:EK,mop:EK},mbin:{},mrel:{},mopen:{},mclose:{mop:EK},mpunct:{},minner:{mop:EK}},ZK={},_K={},PK={};function VK(e){for(var{type:t,names:i,props:n,handler:o,htmlBuilder:r,mathmlBuilder:s}=e,a={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:o},l=0;l<i.length;++l)ZK[i[l]]=a;t&&(r&&(_K[t]=r),s&&(PK[t]=s))}function RK(e){var{type:t,htmlBuilder:i,mathmlBuilder:n}=e;VK({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:i,mathmlBuilder:n})}var WK=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},BK=function(e){return"ordgroup"===e.type?e.body:[e]},$K=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),FK=new Set(["rightmost","mrel","mclose","mpunct"]),GK={display:RX.DISPLAY,text:RX.TEXT,script:RX.SCRIPT,scriptscript:RX.SCRIPTSCRIPT},HK={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},JK=function(e,t,i,n){void 0===n&&(n=[null,null]);for(var o=[],r=0;r<e.length;r++){var s=i0(e[r],t);if(s instanceof JX){var a=s.children;o.push(...a)}else o.push(s)}if(zK(o),!i)return o;var l=t;if(1===e.length){var M=e[0];"sizing"===M.type?l=t.havingSize(M.size):"styling"===M.type&&(l=t.havingStyle(GK[M.style]))}var c=TK([n[0]||"leftmost"],[],t),g=TK([n[1]||"rightmost"],[],t),u="root"===i;return XK(o,((e,t)=>{var i=t.classes[0],n=e.classes[0];"mbin"===i&&FK.has(n)?t.classes[0]="mord":"mbin"===n&&$K.has(i)&&(e.classes[0]="mord")}),{node:c},g,u),XK(o,((e,t)=>{var i,n,o=e0(t),r=e0(e),s=o&&r?e.hasClass("mtight")?null==(i=YK[o])?void 0:i[r]:null==(n=UK[o])?void 0:n[r]:null;if(s)return LK(s,l)}),{node:c},g,u),o},XK=function(e,t,i,n,o){n&&e.push(n);for(var r=0;r<e.length;r++){var s=e[r],a=qK(s);if(a)XK(a.children,t,i,null,o);else{var l=!s.hasClass("mspace");if(l){var M=t(s,i.node);M&&(i.insertAfter?i.insertAfter(M):(e.unshift(M),r++))}l?i.node=s:o&&s.hasClass("newline")&&(i.node=TK(["leftmost"])),i.insertAfter=(t=>i=>{e.splice(t+1,0,i),r++})(r)}}n&&e.pop()},qK=function(e){return e instanceof JX||e instanceof Mq||e instanceof lq&&e.hasClass("enclosing")?e:null},KK=function(e,t){var i=qK(e);if(i){var n=i.children;if(n.length){if("right"===t)return KK(n[n.length-1],"right");if("left"===t)return KK(n[0],"left")}}return e},e0=function(e,t){if(!e)return null;t&&(e=KK(e,t));var i=e.classes[0];return HK[i]||null},t0=function(e,t){var i=["nulldelimiter"].concat(e.baseSizingClasses());return TK(t.concat(i))},i0=function(e,t,i){if(!e)return TK();if(_K[e.type]){var n=_K[e.type](e,t);if(i&&t.size!==i.size){n=TK(t.sizingClasses(i),[n],t);var o=t.sizeMultiplier/i.sizeMultiplier;n.height*=o,n.depth*=o}return n}throw new TX("Got group of unknown type: '"+e.type+"'")};function n0(e,t){var i=TK(["base"],e,t),n=TK(["strut"]);return n.style.height=tq(i.height+i.depth),i.depth&&(n.style.verticalAlign=tq(-i.depth)),i.children.unshift(n),i}function o0(e,t){var i=null;1===e.length&&"tag"===e[0].type&&(i=e[0].tag,e=e[0].body);var n,o=JK(e,t,"root");2===o.length&&o[1].hasClass("tag")&&(n=o.pop());for(var r,s=[],a=[],l=0;l<o.length;l++)if(a.push(o[l]),o[l].hasClass("mbin")||o[l].hasClass("mrel")||o[l].hasClass("allowbreak")){for(var M=!1;l<o.length-1&&o[l+1].hasClass("mspace")&&!o[l+1].hasClass("newline");)l++,a.push(o[l]),o[l].hasClass("nobreak")&&(M=!0);M||(s.push(n0(a,t)),a=[])}else o[l].hasClass("newline")&&(a.pop(),a.length>0&&(s.push(n0(a,t)),a=[]),s.push(o[l]));a.length>0&&s.push(n0(a,t)),i?((r=n0(JK(i,t,!0),t)).classes=["tag"],s.push(r)):n&&s.push(n);var c=TK(["katex-html"],s);if(c.setAttribute("aria-hidden","true"),r){var g=r.children[0];g.style.height=tq(c.height+c.depth),c.depth&&(g.style.verticalAlign=tq(-c.depth))}return c}function r0(e){return new JX(e)}class s0{constructor(e,t,i){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=i||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=iq(this.classes));for(var i=0;i<this.children.length;i++)if(this.children[i]instanceof a0&&this.children[i+1]instanceof a0){for(var n=this.children[i].toText()+this.children[++i].toText();this.children[i+1]instanceof a0;)n+=this.children[++i].toText();e.appendChild(new a0(n).toNode())}else e.appendChild(this.children[i].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=fX(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+fX(iq(this.classes))+'"'),e+=">";for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class a0{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return fX(this.toText())}toText(){return this.text}}class l0{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":e>=-.05556&&e<=-.05555?" ":e>=-.1667&&e<=-.1666?" ":e>=-.2223&&e<=-.2222?" ":e>=-.2778&&e<=-.2777?" ":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",tq(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+tq(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var M0=new Set(["\\imath","\\jmath"]),c0=new Set(["mrow","mtable"]),g0=function(e,t,i){return!mq[t][e]||!mq[t][e].replace||55349===e.charCodeAt(0)||Zq.hasOwnProperty(e)&&i&&(i.fontFamily&&"tt"===i.fontFamily.slice(4,6)||i.font&&"tt"===i.font.slice(4,6))||(e=mq[t][e].replace),new a0(e)},u0=function(e){return 1===e.length?e[0]:new s0("mrow",e)},d0={mathit:"italic",boldsymbol:e=>"textord"===e.type?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},h0=(e,t)=>{if("text"===e.mode){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold"}var i=t.font;if(!i||"mathnormal"===i)return null;var n=e.mode,o=d0[i];if(o)return"function"==typeof o?o(e):o;var r=e.text;if(M0.has(r))return null;if(mq[n][r]){var s=mq[n][r].replace;s&&(r=s)}return jq(r,vK[i].fontName,n)?vK[i].variant:null};function N0(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof a0&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var i=e.children[0];return i instanceof a0&&","===i.text}return!1}var p0=function(e,t,i){if(1===e.length){var n=y0(e[0],t);return i&&n instanceof s0&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var o,r=[],s=0;s<e.length;s++){var a=y0(e[s],t);if(a instanceof s0&&o instanceof s0){if("mtext"===a.type&&"mtext"===o.type&&a.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...a.children);continue}if("mn"===a.type&&"mn"===o.type){o.children.push(...a.children);continue}if(N0(a)&&"mn"===o.type){o.children.push(...a.children);continue}if("mn"===a.type&&N0(o))a.children=[...o.children,...a.children],r.pop();else if(("msup"===a.type||"msub"===a.type)&&a.children.length>=1&&("mn"===o.type||N0(o))){var l=a.children[0];l instanceof s0&&"mn"===l.type&&(l.children=[...o.children,...l.children],r.pop())}else if("mi"===o.type&&1===o.children.length){var M=o.children[0];if(M instanceof a0&&"̸"===M.text&&("mo"===a.type||"mi"===a.type||"mn"===a.type)){var c=a.children[0];c instanceof a0&&c.text.length>0&&(c.text=c.text.slice(0,1)+"̸"+c.text.slice(1),r.pop())}}}r.push(a),o=a}return r},D0=function(e,t,i){return u0(p0(e,t,i))},y0=function(e,t){if(!e)return new s0("mrow");if(PK[e.type])return PK[e.type](e,t);throw new TX("Got group of unknown type: '"+e.type+"'")};function I0(e,t,i,n,o){var r,s=p0(e,i);r=1===s.length&&s[0]instanceof s0&&c0.has(s[0].type)?s[0]:new s0("mrow",s);var a=new s0("annotation",[new a0(t)]);a.setAttribute("encoding","application/x-tex");var l=new s0("semantics",[r,a]),M=new s0("math",[l]);return M.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&M.setAttribute("display","block"),TK([o?"katex":"katex-mathml"],[M])}var j0=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],z0=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],m0=function(e,t){return t.size<2?e:j0[e-1][t.size-1]};class T0{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||T0.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=z0[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,e),new T0(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:m0(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:z0[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=m0(T0.BASESIZE,e);return this.size===t&&this.textSize===T0.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==T0.BASESIZE?["sizing","reset-size"+this.size,"size"+T0.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!zq[t=e>=5?0:e>=3?1:2]){var i=zq[t]={cssEmPerMu:Dq.quad[t]/18};for(var n in Dq)Dq.hasOwnProperty(n)&&(i[n]=Dq[n][t])}return zq[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}T0.BASESIZE=6;var x0=function(e){return new T0({style:e.displayMode?RX.DISPLAY:RX.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},A0=function(e,t){if(t.displayMode){var i=["katex-display"];t.leqno&&i.push("leqno"),t.fleqn&&i.push("fleqn"),e=TK(i,[e])}return e},O0={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},f0=function(e){var t=new s0("mo",[new a0(O0[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},b0={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},L0=new Set(["widehat","widecheck","widetilde","utilde"]),w0=function(e,t){var{span:i,minWidth:n,height:o}=function(){var i=4e5,n=e.label.slice(1);if(L0.has(n)&&"base"in e){var o,r,s,a="ordgroup"===e.base.type?e.base.body.length:1;if(a>5)"widehat"===n||"widecheck"===n?(o=420,i=2364,s=.42,r=n+"4"):(o=312,i=2340,s=.34,r="tilde4");else{var l=[1,1,2,2,3,3][a];"widehat"===n||"widecheck"===n?(i=[0,1062,2364,2364,2364][l],o=[0,239,300,360,420][l],s=[0,.24,.3,.3,.36,.42][l],r=n+l):(i=[0,600,1033,2339,2340][l],o=[0,260,286,306,312][l],s=[0,.26,.286,.3,.306,.34][l],r="tilde"+l)}var M=new hq(r),c=new dq([M],{width:"100%",height:tq(s),viewBox:"0 0 "+i+" "+o,preserveAspectRatio:"none"});return{span:xK([],[c],t),minWidth:0,height:s}}var g=[],u=b0[n];if(!u)throw new Error('No SVG data for "'+n+'".');var d,h,[N,p,D]=u,y=D/1e3,I=N.length;if(1===I){if(4!==u.length)throw new Error('Expected 4-tuple for single-path SVG data "'+n+'".');d=["hide-tail"],h=[u[3]]}else if(2===I)d=["halfarrow-left","halfarrow-right"],h=["xMinYMin","xMaxYMin"];else{if(3!==I)throw new Error("Correct katexImagesData or update code here to support\n "+I+" children.");d=["brace-left","brace-center","brace-right"],h=["xMinYMin","xMidYMin","xMaxYMin"]}for(var j=0;j<I;j++){var z=new hq(N[j]),m=new dq([z],{width:"400em",height:tq(y),viewBox:"0 0 "+i+" "+D,preserveAspectRatio:h[j]+" slice"}),T=xK([d[j]],[m],t);if(1===I)return{span:T,minWidth:p,height:y};T.style.height=tq(y),g.push(T)}return{span:TK(["stretchy"],g,t),minWidth:p,height:y}}();return i.height=o,i.style.height=tq(o),n>0&&(i.style.minWidth=tq(n)),i},v0={bin:1,close:1,inner:1,open:1,punct:1,rel:1},S0={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function k0(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function E0(e){var t=C0(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function C0(e){return e&&("atom"===e.type||S0.hasOwnProperty(e.type))?e:null}var Q0=e=>{return e instanceof uq?e:((t=e)instanceof lq||t instanceof Mq||t instanceof JX)&&1===e.children.length?Q0(e.children[0]):void 0;var t},U0=(e,t)=>{var i,n,o;e&&"supsub"===e.type?(i=(n=k0(e.base,"accent")).base,e.base=i,o=function(e){if(e instanceof lq)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(i0(e,t)),e.base=n):i=(n=k0(e,"accent")).base;var r,s,a=i0(i,t.havingCrampedStyle()),l=0;n.isShifty&&wX(i)&&(l=null!=(r=null==(s=Q0(a))?void 0:s.skew)?r:0);var M,c="\\c"===n.label,g=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight);if(n.isStretchy)M=w0(n,t),M=bK({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:M,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+tq(2*l)+")",marginLeft:tq(2*l)}:void 0}]});else{var u,d;"\\vec"===n.label?(u=kK("vec",t),d=SK.vec[1]):(u=function(e){if(e instanceof uq)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}(u=IK({type:"textord",mode:n.mode,text:n.label},t,"textord")),u.italic=0,d=u.width,c&&(g+=u.depth)),M=TK(["accent-body"],[u]);var h="\\textcircled"===n.label;h&&(M.classes.push("accent-full"),g=a.height);var N=l;h||(N-=d/2),M.style.left=tq(N),"\\textcircled"===n.label&&(M.style.top=".2em"),M=bK({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-g},{type:"elem",elem:M}]})}var p=TK(["mord","accent"],[M],t);return o?(o.children[0]=p,o.height=Math.max(p.height,o.height),o.classes[0]="mord",o):p},Y0=(e,t)=>{var i=e.isStretchy?f0(e.label):new s0("mo",[g0(e.label,e.mode)]),n=new s0("mover",[y0(e.base,t),i]);return n.setAttribute("accent","true"),n},Z0=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));VK({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var i=WK(t[0]),n=!Z0.test(e.funcName),o=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:o,base:i}},htmlBuilder:U0,mathmlBuilder:Y0}),VK({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var i=t[0],n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:i}},htmlBuilder:U0,mathmlBuilder:Y0}),VK({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0];return{type:"accentUnder",mode:i.mode,label:n,base:o}},htmlBuilder:(e,t)=>{var i=i0(e.base,t),n=w0(e,t),o="\\utilde"===e.label?.12:0,r=bK({positionType:"top",positionData:i.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:i}]});return TK(["mord","accentunder"],[r],t)},mathmlBuilder:(e,t)=>{var i=f0(e.label),n=new s0("munder",[y0(e.base,t),i]);return n.setAttribute("accentunder","true"),n}});var _0=e=>{var t=new s0("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};function P0(e,t){var i=JK(e.body,t,!0);return TK([e.mclass],i,t)}function V0(e,t){var i,n=p0(e.body,t);return"minner"===e.mclass?i=new s0("mpadded",n):"mord"===e.mclass?e.isCharacterBox?(i=n[0]).type="mi":i=new s0("mi",n):(e.isCharacterBox?(i=n[0]).type="mo":i=new s0("mo",n),"mbin"===e.mclass?(i.attributes.lspace="0.22em",i.attributes.rspace="0.22em"):"mpunct"===e.mclass?(i.attributes.lspace="0em",i.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(i.attributes.lspace="0em",i.attributes.rspace="0em"):"minner"===e.mclass&&(i.attributes.lspace="0.0556em",i.attributes.width="+0.1111em")),i}VK({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){var{parser:n,funcName:o}=e;return{type:"xArrow",mode:n.mode,label:o,body:t[0],below:i[0]}},htmlBuilder(e,t){var i,n=t.style,o=t.havingStyle(n.sup()),r=fK(i0(e.body,o,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";r.classes.push(s+"-arrow-pad"),e.below&&(o=t.havingStyle(n.sub()),(i=fK(i0(e.below,o,t),t)).classes.push(s+"-arrow-pad"));var a,l=w0(e,t),M=-t.fontMetrics().axisHeight+.5*l.height,c=-t.fontMetrics().axisHeight-.5*l.height-.111;if((r.depth>.25||"\\xleftequilibrium"===e.label)&&(c-=r.depth),i){var g=-t.fontMetrics().axisHeight+i.height+.5*l.height+.111;a=bK({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:l,shift:M,wrapperClasses:["svg-align"]},{type:"elem",elem:i,shift:g}]})}else a=bK({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:l,shift:M,wrapperClasses:["svg-align"]}]});return TK(["mrel","x-arrow"],[a],t)},mathmlBuilder(e,t){var i,n=f0(e.label);if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var o=_0(y0(e.body,t));if(e.below){var r=_0(y0(e.below,t));i=new s0("munderover",[n,r,o])}else i=new s0("mover",[n,o])}else if(e.below){var s=_0(y0(e.below,t));i=new s0("munder",[n,s])}else i=_0(),i=new s0("mover",[n,i]);return i}}),VK({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:i,funcName:n}=e,o=t[0];return{type:"mclass",mode:i.mode,mclass:"m"+n.slice(5),body:BK(o),isCharacterBox:wX(o)}},htmlBuilder:P0,mathmlBuilder:V0});var R0=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};VK({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:i}=e;return{type:"mclass",mode:i.mode,mclass:R0(t[0]),body:BK(t[1]),isCharacterBox:wX(t[1])}}}),VK({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var i,{parser:n,funcName:o}=e,r=t[1],s=t[0];i="\\stackrel"!==o?R0(r):"mrel";var a={type:"op",mode:r.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==o,body:BK(r)},l={type:"supsub",mode:s.mode,base:a,sup:"\\underset"===o?null:s,sub:"\\underset"===o?s:null};return{type:"mclass",mode:n.mode,mclass:i,body:[l],isCharacterBox:wX(l)}},htmlBuilder:P0,mathmlBuilder:V0}),VK({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"pmb",mode:i.mode,mclass:R0(t[0]),body:BK(t[0])}},htmlBuilder(e,t){var i=JK(e.body,t,!0),n=TK([e.mclass],i,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var i=p0(e.body,t),n=new s0("mstyle",i);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var W0={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},B0=e=>"textord"===e.type&&"@"===e.text;function $0(e,t,i){var n=W0[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return i.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var o={type:"atom",text:n,mode:"math",family:"rel"},r={type:"ordgroup",mode:"math",body:[i.callFunction("\\\\cdleft",[t[0]],[]),i.callFunction("\\Big",[o],[]),i.callFunction("\\\\cdright",[t[1]],[])]};return i.callFunction("\\\\cdparent",[r],[]);case"\\\\cdlongequal":return i.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return i.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}VK({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:n}=e;return{type:"cdlabel",mode:i.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var i=t.havingStyle(t.style.sup()),n=fK(i0(e.label,i,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=tq(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var i=new s0("mrow",[y0(e.label,t)]);return(i=new s0("mpadded",[i])).setAttribute("width","0"),"left"===e.side&&i.setAttribute("lspace","-1width"),i.setAttribute("voffset","0.7em"),(i=new s0("mstyle",[i])).setAttribute("displaystyle","false"),i.setAttribute("scriptlevel","1"),i}}),VK({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:i}=e;return{type:"cdlabelparent",mode:i.mode,fragment:t[0]}},htmlBuilder(e,t){var i=fK(i0(e.fragment,t),t);return i.classes.push("cd-vert-arrow"),i},mathmlBuilder:(e,t)=>new s0("mrow",[y0(e.fragment,t)])}),VK({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:i}=e,n=k0(t[0],"ordgroup").body,o="",r=0;r<n.length;r++){o+=k0(n[r],"textord").text}var s,a=parseInt(o);if(isNaN(a))throw new TX("\\@char has non-numeric argument "+o);if(a<0||a>=1114111)throw new TX("\\@char with invalid code point "+o);return a<=65535?s=String.fromCharCode(a):(a-=65536,s=String.fromCharCode(55296+(a>>10),56320+(1023&a))),{type:"textord",mode:i.mode,text:s}}});var F0=(e,t)=>{var i=JK(e.body,t.withColor(e.color),!1);return OK(i)},G0=(e,t)=>{var i=p0(e.body,t.withColor(e.color)),n=new s0("mstyle",i);return n.setAttribute("mathcolor",e.color),n};VK({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:i}=e,n=k0(t[0],"color-token").color,o=t[1];return{type:"color",mode:i.mode,color:n,body:BK(o)}},htmlBuilder:F0,mathmlBuilder:G0}),VK({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:i,breakOnTokenText:n}=e,o=k0(t[0],"color-token").color;i.gullet.macros.set("\\current@color",o);var r=i.parseExpression(!0,n);return{type:"color",mode:i.mode,color:o,body:r}},htmlBuilder:F0,mathmlBuilder:G0}),VK({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,i){var{parser:n}=e,o="["===n.gullet.future().text?n.parseSizeGroup(!0):null,r=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:r,size:o&&k0(o,"size").value}},htmlBuilder(e,t){var i=TK(["mspace"],[],t);return e.newLine&&(i.classes.push("newline"),e.size&&(i.style.marginTop=tq(eq(e.size,t)))),i},mathmlBuilder(e,t){var i=new s0("mspace");return e.newLine&&(i.setAttribute("linebreak","newline"),e.size&&i.setAttribute("height",tq(eq(e.size,t)))),i}});var H0={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},J0=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new TX("Expected a control sequence",e);return t},X0=(e,t,i,n)=>{var o=e.gullet.macros.get(i.text);null==o&&(i.noexpand=!0,o={tokens:[i],numArgs:0,unexpandable:!e.gullet.isExpandable(i.text)}),e.gullet.macros.set(t,o,n)};VK({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:i}=e;t.consumeSpaces();var n=t.fetch();if(H0[n.text])return"\\global"!==i&&"\\\\globallong"!==i||(n.text=H0[n.text]),k0(t.parseFunction(),"internal");throw new TX("Invalid token after macro prefix",n)}}),VK({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,n=t.gullet.popToken(),o=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new TX("Expected a control sequence",n);for(var r,s=0,a=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){r=t.gullet.future(),a[s].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new TX('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new TX('Argument number "'+n.text+'" out of order');s++,a.push([])}else{if("EOF"===n.text)throw new TX("Expected a macro definition");a[s].push(n.text)}var{tokens:l}=t.gullet.consumeArg();return r&&l.unshift(r),"\\edef"!==i&&"\\xdef"!==i||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(o,{tokens:l,numArgs:s,delimiters:a},i===H0[i]),{type:"internal",mode:t.mode}}}),VK({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,n=J0(t.gullet.popToken());t.gullet.consumeSpaces();var o=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return X0(t,n,o,"\\\\globallet"===i),{type:"internal",mode:t.mode}}}),VK({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,n=J0(t.gullet.popToken()),o=t.gullet.popToken(),r=t.gullet.popToken();return X0(t,n,r,"\\\\globalfuture"===i),t.gullet.pushToken(r),t.gullet.pushToken(o),{type:"internal",mode:t.mode}}});var q0=function(e,t,i){var n=jq(mq.math[e]&&mq.math[e].replace||e,t,i);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},K0=function(e,t,i,n){var o=i.havingBaseStyle(t),r=TK(n.concat(o.sizingClasses(i)),[e],i),s=o.sizeMultiplier/i.sizeMultiplier;return r.height*=s,r.depth*=s,r.maxFontSize=o.sizeMultiplier,r},e4=function(e,t,i){var n=t.havingBaseStyle(i),o=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=tq(o),e.height-=o,e.depth+=o},t4=function(e,t,i,n,o,r){var s=function(e,t,i,n){return DK(e,"Size"+t+"-Regular",i,n)}(e,t,o,n),a=K0(TK(["delimsizing","size"+t],[s],n),RX.TEXT,n,r);return i&&e4(a,n,RX.TEXT),a},i4=function(e,t,i){return{type:"elem",elem:TK(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[TK([],[DK(e,t,i)])])}},n4=function(e,t,i){var n=pq["Size4-Regular"][e.charCodeAt(0)]?pq["Size4-Regular"][e.charCodeAt(0)][4]:pq["Size1-Regular"][e.charCodeAt(0)][4],o=new hq("inner",function(e,t){switch(e){case"⎜":return FX("M291 0 H417 V"+t+" H291z");case"∣":return FX("M145 0 H188 V"+t+" H145z");case"∥":return FX("M145 0 H188 V"+t+" H145z")+FX("M367 0 H410 V"+t+" H367z");case"⎟":return FX("M457 0 H583 V"+t+" H457z");case"⎢":return FX("M319 0 H403 V"+t+" H319z");case"⎥":return FX("M263 0 H347 V"+t+" H263z");case"⎪":return FX("M384 0 H504 V"+t+" H384z");case"⏐":return FX("M312 0 H355 V"+t+" H312z");case"‖":return FX("M257 0 H300 V"+t+" H257z")+FX("M478 0 H521 V"+t+" H478z");default:return""}}(e,Math.round(1e3*t))),r=new dq([o],{width:tq(n),height:tq(t),style:"width:"+tq(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),s=xK([],[r],i);return s.height=t,s.style.height=tq(t),s.style.width=tq(n),{type:"elem",elem:s}},o4={type:"kern",size:-.008},r4=new Set(["|","\\lvert","\\rvert","\\vert"]),s4=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),a4=function(e,t,i,n,o,r){var s,a,l,M,c="",g=0;s=l=M=e,a=null;var u="Size1-Regular";"\\uparrow"===e?l=M="⏐":"\\Uparrow"===e?l=M="‖":"\\downarrow"===e?s=l="⏐":"\\Downarrow"===e?s=l="‖":"\\updownarrow"===e?(s="\\uparrow",l="⏐",M="\\downarrow"):"\\Updownarrow"===e?(s="\\Uparrow",l="‖",M="\\Downarrow"):r4.has(e)?(l="∣",c="vert",g=333):s4.has(e)?(l="∥",c="doublevert",g=556):"["===e||"\\lbrack"===e?(s="⎡",l="⎢",M="⎣",u="Size4-Regular",c="lbrack",g=667):"]"===e||"\\rbrack"===e?(s="⎤",l="⎥",M="⎦",u="Size4-Regular",c="rbrack",g=667):"\\lfloor"===e||"⌊"===e?(l=s="⎢",M="⎣",u="Size4-Regular",c="lfloor",g=667):"\\lceil"===e||"⌈"===e?(s="⎡",l=M="⎢",u="Size4-Regular",c="lceil",g=667):"\\rfloor"===e||"⌋"===e?(l=s="⎥",M="⎦",u="Size4-Regular",c="rfloor",g=667):"\\rceil"===e||"⌉"===e?(s="⎤",l=M="⎥",u="Size4-Regular",c="rceil",g=667):"("===e||"\\lparen"===e?(s="⎛",l="⎜",M="⎝",u="Size4-Regular",c="lparen",g=875):")"===e||"\\rparen"===e?(s="⎞",l="⎟",M="⎠",u="Size4-Regular",c="rparen",g=875):"\\{"===e||"\\lbrace"===e?(s="⎧",a="⎨",M="⎩",l="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(s="⎫",a="⎬",M="⎭",l="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(s="⎧",M="⎩",l="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(s="⎫",M="⎭",l="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(s="⎧",M="⎭",l="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(s="⎫",M="⎩",l="⎪",u="Size4-Regular");var d=q0(s,u,o),h=d.height+d.depth,N=q0(l,u,o),p=N.height+N.depth,D=q0(M,u,o),y=D.height+D.depth,I=0,j=1;if(null!==a){var z=q0(a,u,o);I=z.height+z.depth,j=2}var m=h+y+I,T=m+Math.max(0,Math.ceil((t-m)/(j*p)))*j*p,x=n.fontMetrics().axisHeight;i&&(x*=n.sizeMultiplier);var A=T/2-x,O=[];if(c.length>0){var f=T-h-y,b=Math.round(1e3*T),L=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 v84 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(c,Math.round(1e3*f)),w=new hq(c,L),v=tq(g/1e3),S=tq(b/1e3),k=new dq([w],{width:v,height:S,viewBox:"0 0 "+g+" "+b}),E=xK([],[k],n);E.height=b/1e3,E.style.width=v,E.style.height=S,O.push({type:"elem",elem:E})}else{if(O.push(i4(M,u,o)),O.push(o4),null===a){var C=T-h-y+.016;O.push(n4(l,C,n))}else{var Q=(T-h-y-I)/2+.016;O.push(n4(l,Q,n)),O.push(o4),O.push(i4(a,u,o)),O.push(o4),O.push(n4(l,Q,n))}O.push(o4),O.push(i4(s,u,o))}var U=n.havingBaseStyle(RX.TEXT),Y=bK({positionType:"bottom",positionData:A,children:O});return K0(TK(["delimsizing","mult"],[Y],U),RX.TEXT,n,r)},l4=.08,M4=function(e,t,i,n,o){var r=function(e,t,i){t*=1e3;var n="";switch(e){case"sqrtMain":n=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,GX);break;case"sqrtSize1":n=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,GX);break;case"sqrtSize2":n=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,GX);break;case"sqrtSize3":n=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,GX);break;case"sqrtSize4":n=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,GX);break;case"sqrtTall":n=function(e,t,i){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(i-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,GX,i)}return n}(e,n,i),s=new hq(e,r),a=new dq([s],{width:"400em",height:tq(t),viewBox:"0 0 400000 "+i,preserveAspectRatio:"xMinYMin slice"});return xK(["hide-tail"],[a],o)},c4=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),g4=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),u4=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),d4=[0,1.2,1.8,2.4,3],h4=function(e,t,i,n,o){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),c4.has(e)||u4.has(e))return t4(e,t,!1,i,n,o);if(g4.has(e))return a4(e,d4[t],!1,i,n,o);throw new TX("Illegal delimiter: '"+e+"'")},N4=[{type:"small",style:RX.SCRIPTSCRIPT},{type:"small",style:RX.SCRIPT},{type:"small",style:RX.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],p4=[{type:"small",style:RX.SCRIPTSCRIPT},{type:"small",style:RX.SCRIPT},{type:"small",style:RX.TEXT},{type:"stack"}],D4=[{type:"small",style:RX.SCRIPTSCRIPT},{type:"small",style:RX.SCRIPT},{type:"small",style:RX.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],y4=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";var t=e.type;throw new Error("Add support for delim type '"+t+"' here.")},I4=function(e,t,i,n){for(var o=Math.min(2,3-n.style.size);o<i.length;o++){var r=i[o];if("stack"===r.type)break;var s=q0(e,y4(r),"math"),a=s.height+s.depth;if("small"===r.type)a*=n.havingBaseStyle(r.style).sizeMultiplier;if(a>t)return r}return i[i.length-1]},j4=function(e,t,i,n,o,r){var s;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),s=u4.has(e)?N4:c4.has(e)?D4:p4;var a=I4(e,t,s,n);return"small"===a.type?function(e,t,i,n,o,r){var s=DK(e,"Main-Regular",o,n),a=K0(s,t,n,r);return i&&e4(a,n,t),a}(e,a.style,i,n,o,r):"large"===a.type?t4(e,a.size,i,n,o,r):a4(e,t,i,n,o,r)},z4=function(e,t,i,n,o,r){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,a=5/n.fontMetrics().ptPerEm,l=Math.max(t-s,i+s),M=Math.max(l/500*901,2*l-a);return j4(e,M,!0,n,o,r)},m4={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},T4=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function x4(e){return"isMiddle"in e}function A4(e,t){var i=C0(e);if(i&&T4.has(i.text))return i;throw new TX(i?"Invalid delimiter '"+i.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function O4(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}VK({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var i=A4(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:m4[e.funcName].size,mclass:m4[e.funcName].mclass,delim:i.text}},htmlBuilder:(e,t)=>"."===e.delim?TK([e.mclass]):h4(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(g0(e.delim,e.mode));var i=new s0("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?i.setAttribute("fence","true"):i.setAttribute("fence","false"),i.setAttribute("stretchy","true");var n=tq(d4[e.size]);return i.setAttribute("minsize",n),i.setAttribute("maxsize",n),i}}),VK({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=e.parser.gullet.macros.get("\\current@color");if(i&&"string"!=typeof i)throw new TX("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:A4(t[0],e).text,color:i}}}),VK({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=A4(t[0],e),n=e.parser;++n.leftrightDepth;var o=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var r=k0(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:o,left:i.text,right:r.delim,rightColor:r.color}},htmlBuilder:(e,t)=>{O4(e);for(var i,n,o=JK(e.body,t,!0,["mopen","mclose"]),r=0,s=0,a=!1,l=0;l<o.length;l++){x4(o[l])?a=!0:(r=Math.max(o[l].height,r),s=Math.max(o[l].depth,s))}if(r*=t.sizeMultiplier,s*=t.sizeMultiplier,i="."===e.left?t0(t,["mopen"]):z4(e.left,r,s,t,e.mode,["mopen"]),o.unshift(i),a)for(var M=1;M<o.length;M++){var c=o[M];if(x4(c)){var g=c.isMiddle;o[M]=z4(g.delim,r,s,g.options,e.mode,[])}}if("."===e.right)n=t0(t,["mclose"]);else{var u=e.rightColor?t.withColor(e.rightColor):t;n=z4(e.right,r,s,u,e.mode,["mclose"])}return o.push(n),TK(["minner"],o,t)},mathmlBuilder:(e,t)=>{O4(e);var i=p0(e.body,t);if("."!==e.left){var n=new s0("mo",[g0(e.left,e.mode)]);n.setAttribute("fence","true"),i.unshift(n)}if("."!==e.right){var o=new s0("mo",[g0(e.right,e.mode)]);o.setAttribute("fence","true"),e.rightColor&&o.setAttribute("mathcolor",e.rightColor),i.push(o)}return u0(i)}}),VK({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=A4(t[0],e);if(!e.parser.leftrightDepth)throw new TX("\\middle without preceding \\left",i);return{type:"middle",mode:e.parser.mode,delim:i.text}},htmlBuilder:(e,t)=>{var i;return"."===e.delim?i=t0(t,[]):(i=h4(e.delim,1,t,e.mode,[])).isMiddle={delim:e.delim,options:t},i},mathmlBuilder:(e,t)=>{var i="\\vert"===e.delim||"|"===e.delim?g0("|","text"):g0(e.delim,e.mode),n=new s0("mo",[i]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var f4=(e,t)=>{var i,n,o,r=fK(i0(e.body,t),t),s=e.label.slice(1),a=t.sizeMultiplier,l=wX(e.body);if("sout"===s)(i=TK(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/a,n=-.5*t.fontMetrics().xHeight;else if("phase"===s){var M=eq({number:.6,unit:"pt"},t),c=eq({number:.35,unit:"ex"},t);a/=t.havingBaseSizing().sizeMultiplier;var g=r.height+r.depth+M+c;r.style.paddingLeft=tq(g/2+M);var u=Math.floor(1e3*g*a),d=function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"}(u),h=new dq([new hq("phase",d)],{width:"400em",height:tq(u/1e3),viewBox:"0 0 400000 "+u,preserveAspectRatio:"xMinYMin slice"});(i=xK(["hide-tail"],[h],t)).style.height=tq(g),n=r.depth+M+c}else{var N,p;/cancel/.test(s)?l||r.classes.push("cancel-pad"):"angl"===s?r.classes.push("anglpad"):r.classes.push("boxpad");var D=0;/box/.test(s)?(D=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=N=t.fontMetrics().fboxsep+("colorbox"===s?0:D)):"angl"===s?(N=4*(D=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),p=Math.max(0,.25-r.depth)):p=N=l?.2:0,i=function(e,t,i,n,o){var r,s=e.height+e.depth+i+n;if(/fbox|color|angl/.test(t)){if(r=TK(["stretchy",t],[],o),"fbox"===t){var a=o.color&&o.getColor();a&&(r.style.borderColor=a)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new Nq({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new Nq({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var M=new dq(l,{width:"100%",height:tq(s)});r=xK([],[M],o)}return r.height=s,r.style.height=tq(s),r}(r,s,N,p,t),/fbox|boxed|fcolorbox/.test(s)?(i.style.borderStyle="solid",i.style.borderWidth=tq(D)):"angl"===s&&.049!==D&&(i.style.borderTopWidth=tq(D),i.style.borderRightWidth=tq(D)),n=r.depth+p,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}if(e.backgroundColor)o=bK({positionType:"individualShift",children:[{type:"elem",elem:i,shift:n},{type:"elem",elem:r,shift:0}]});else{var y=/cancel|phase/.test(s)?["svg-align"]:[];o=bK({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:i,shift:n,wrapperClasses:y}]})}return/cancel/.test(s)&&(o.height=r.height,o.depth=r.depth),/cancel/.test(s)&&!l?TK(["mord","cancel-lap"],[o],t):TK(["mord"],[o],t)},b4=(e,t)=>{var i,n=new s0(e.label.includes("colorbox")?"mpadded":"menclose",[y0(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(i=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*i+"pt"),n.setAttribute("height","+"+2*i+"pt"),n.setAttribute("lspace",i+"pt"),n.setAttribute("voffset",i+"pt"),"\\fcolorbox"===e.label){var o=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+tq(o)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};VK({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,i){var{parser:n,funcName:o}=e,r=k0(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:n.mode,label:o,backgroundColor:r,body:s}},htmlBuilder:f4,mathmlBuilder:b4}),VK({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,i){var{parser:n,funcName:o}=e,r=k0(t[0],"color-token").color,s=k0(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:n.mode,label:o,backgroundColor:s,borderColor:r,body:a}},htmlBuilder:f4,mathmlBuilder:b4}),VK({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"enclose",mode:i.mode,label:"\\fbox",body:t[0]}}}),VK({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:n}=e,o=t[0];return{type:"enclose",mode:i.mode,label:n,body:o}},htmlBuilder:f4,mathmlBuilder:b4}),VK({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:i,funcName:n}=e;"math"===i.mode&&i.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var o=t[0];return{type:"enclose",mode:i.mode,label:n,body:o}},htmlBuilder:f4,mathmlBuilder:b4}),VK({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:i}=e;return{type:"enclose",mode:i.mode,label:"\\angl",body:t[0]}}});var L4={};function w4(e){for(var{type:t,names:i,props:n,handler:o,htmlBuilder:r,mathmlBuilder:s}=e,a={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o},l=0;l<i.length;++l)L4[i[l]]=a;r&&(_K[t]=r),s&&(PK[t]=s)}var v4={};function S4(e,t){v4[e]=t}class k4{constructor(e,t,i){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=i}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new k4(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class E4{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new E4(t,k4.range(this,e))}}function C4(e){var t=[];e.consumeSpaces();var i=e.fetch().text;for("\\relax"===i&&(e.consume(),e.consumeSpaces(),i=e.fetch().text);"\\hline"===i||"\\hdashline"===i;)e.consume(),t.push("\\hdashline"===i),e.consumeSpaces(),i=e.fetch().text;return t}var Q4=e=>{if(!e.parser.settings.displayMode)throw new TX("{"+e.envName+"} can be used only in display mode.")},U4=new Set(["gather","gather*"]);function Y4(e){if(!e.includes("ed"))return!e.includes("*")}function Z4(e,t,i){var{hskipBeforeAndAfter:n,addJot:o,cols:r,arraystretch:s,colSeparationType:a,autoTag:l,singleRow:M,emptySingleRow:c,maxNumCols:g,leqno:u}=t;if(e.gullet.beginGroup(),M||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var d=e.gullet.expandMacroAsText("\\arraystretch");if(null==d)s=1;else if(!(s=parseFloat(d))||s<0)throw new TX("Invalid \\arraystretch: "+d)}e.gullet.beginGroup();var h=[],N=[h],p=[],D=[],y=null!=l?[]:void 0;function I(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function j(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new E4("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(I(),D.push(C4(e));;){var z=e.parseExpression(!1,M?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var m={type:"ordgroup",mode:e.mode,body:z};i&&(m={type:"styling",mode:e.mode,style:i,resetFont:!0,body:[m]}),h.push(m);var T=e.fetch().text;if("&"===T){if(g&&h.length===g){if(M||a)throw new TX("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===T){j(),1===h.length&&"styling"===m.type&&1===m.body.length&&"ordgroup"===m.body[0].type&&0===m.body[0].body.length&&(N.length>1||!c)&&N.pop(),D.length<N.length+1&&D.push([]);break}if("\\\\"!==T)throw new TX("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var x=void 0;" "!==e.gullet.future().text&&(x=e.parseSizeGroup(!0)),p.push(x?x.value:null),j(),D.push(C4(e)),h=[],N.push(h),I()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:o,arraystretch:s,body:N,cols:r,rowGaps:p,hskipBeforeAndAfter:n,hLinesBeforeRow:D,colSeparationType:a,tags:y,leqno:u}}function _4(e){return"d"===e.slice(0,1)?"display":"text"}var P4=function(e,t){var i,n,o=e.body.length,r=e.hLinesBeforeRow,s=0,a=new Array(o),l=[],M=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),c=1/t.fontMetrics().ptPerEm,g=5*c;e.colSeparationType&&"small"===e.colSeparationType&&(g=t.havingStyle(RX.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var u="CD"===e.colSeparationType?eq({number:3,unit:"ex"},t):12*c,d=3*c,h=e.arraystretch*u,N=.7*h,p=.3*h,D=0;function y(e){for(var t=0;t<e.length;++t)t>0&&(D+=.25),l.push({pos:D,isDashed:e[t]})}for(y(r[0]),i=0;i<e.body.length;++i){var I=e.body[i],j=N,z=p;s<I.length&&(s=I.length);var m={cells:new Array(I.length),height:0,depth:0,pos:0};for(n=0;n<I.length;++n){var T=i0(I[n],t);z<T.depth&&(z=T.depth),j<T.height&&(j=T.height),m.cells[n]=T}var x=e.rowGaps[i],A=0;x&&(A=eq(x,t))>0&&(z<(A+=p)&&(z=A),A=0),e.addJot&&i<e.body.length-1&&(z+=d),m.height=j,m.depth=z,D+=j,m.pos=D,D+=z+A,a[i]=m,y(r[i+1])}var O,f,b=D/2+t.fontMetrics().axisHeight,L=e.cols||[],w=[],v=[];if(e.tags&&e.tags.some((e=>e)))for(i=0;i<o;++i){var S=a[i],k=S.pos-b,E=e.tags[i],C=void 0;(C=!0===E?TK(["eqn-num"],[],t):TK([],!1===E?[]:JK(E,t,!0),t)).depth=S.depth,C.height=S.height,v.push({type:"elem",elem:C,shift:k})}for(n=0,f=0;n<s||f<L.length;++n,++f){for(var Q,U=L[f],Y=!0;"separator"===(null==(Z=U)?void 0:Z.type);){var Z;if(Y||((O=TK(["arraycolsep"],[])).style.width=tq(t.fontMetrics().doubleRuleSep),w.push(O)),"|"!==U.separator&&":"!==U.separator)throw new TX("Invalid separator type: "+U.separator);var _="|"===U.separator?"solid":"dashed",P=TK(["vertical-separator"],[],t);P.style.height=tq(D),P.style.borderRightWidth=tq(M),P.style.borderRightStyle=_,P.style.margin="0 "+tq(-M/2);var V=D-b;V&&(P.style.verticalAlign=tq(-V)),w.push(P),U=L[++f],Y=!1}if(!(n>=s)){var R,W,B=void 0;if(n>0||e.hskipBeforeAndAfter)0!==(B=null!=(R=null==(W=U)?void 0:W.pregap)?R:g)&&((O=TK(["arraycolsep"],[])).style.width=tq(B),w.push(O));var $=[];for(i=0;i<o;++i){var F=a[i],G=F.cells[n];if(G){var H=F.pos-b;G.depth=F.depth,G.height=F.height,$.push({type:"elem",elem:G,shift:H})}}var J,X,q=bK({positionType:"individualShift",children:$}),K=TK(["col-align-"+((null==(Q=U)?void 0:Q.align)||"c")],[q]);if(w.push(K),n<s-1||e.hskipBeforeAndAfter)0!==(B=null!=(J=null==(X=U)?void 0:X.postgap)?J:g)&&((O=TK(["arraycolsep"],[])).style.width=tq(B),w.push(O))}}var ee=TK(["mtable"],w);if(l.length>0){for(var te=AK("hline",t,M),ie=AK("hdashline",t,M),ne=[{type:"elem",elem:ee,shift:0}];l.length>0;){var oe=l.pop(),re=oe.pos-b;oe.isDashed?ne.push({type:"elem",elem:ie,shift:re}):ne.push({type:"elem",elem:te,shift:re})}ee=bK({positionType:"individualShift",children:ne})}if(0===v.length)return TK(["mord"],[ee],t);var se=bK({positionType:"individualShift",children:v}),ae=TK(["tag"],[se],t);return OK([ee,ae])},V4={c:"center ",l:"left ",r:"right "},R4=function(e,t){for(var i=[],n=new s0("mtd",[],["mtr-glue"]),o=new s0("mtd",[],["mml-eqn-num"]),r=0;r<e.body.length;r++){for(var s=e.body[r],a=[],l=0;l<s.length;l++)a.push(new s0("mtd",[y0(s[l],t)]));e.tags&&e.tags[r]&&(a.unshift(n),a.push(n),e.leqno?a.unshift(o):a.push(o)),i.push(new s0("mtr",a))}var M=new s0("mtable",i),c=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);M.setAttribute("rowspacing",tq(c));var g="",u="";if(e.cols&&e.cols.length>0){var d=e.cols,h="",N=!1,p=0,D=d.length;"separator"===d[0].type&&(g+="top ",p=1),"separator"===d[d.length-1].type&&(g+="bottom ",D-=1);for(var y=p;y<D;y++){var I=d[y];"align"===I.type?(u+=V4[I.align],N&&(h+="none "),N=!0):"separator"===I.type&&N&&(h+="|"===I.separator?"solid ":"dashed ",N=!1)}M.setAttribute("columnalign",u.trim()),/[sd]/.test(h)&&M.setAttribute("columnlines",h.trim())}if("align"===e.colSeparationType){for(var j=e.cols||[],z="",m=1;m<j.length;m++)z+=m%2?"0em ":"1em ";M.setAttribute("columnspacing",z.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?M.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?M.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?M.setAttribute("columnspacing","0.5em"):M.setAttribute("columnspacing","1em");var T="",x=e.hLinesBeforeRow;g+=x[0].length>0?"left ":"",g+=x[x.length-1].length>0?"right ":"";for(var A=1;A<x.length-1;A++)T+=0===x[A].length?"none ":x[A][0]?"dashed ":"solid ";return/[sd]/.test(T)&&M.setAttribute("rowlines",T.trim()),""!==g&&(M=new s0("menclose",[M])).setAttribute("notation",g.trim()),e.arraystretch&&e.arraystretch<1&&(M=new s0("mstyle",[M])).setAttribute("scriptlevel","1"),M},W4=function(e,t){e.envName.includes("ed")||Q4(e);var i=[],n=e.envName.includes("at")?"alignat":"align",o="split"===e.envName,r=Z4(e.parser,{cols:i,addJot:!0,autoTag:o?void 0:Y4(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,a=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var M="",c=0;c<t[0].body.length;c++){M+=k0(t[0].body[c],"textord").text}s=Number(M),a=2*s}var g=!a;r.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var i=k0(e[t],"styling");k0(i.body[0],"ordgroup").body.unshift(l)}if(g)a<e.length&&(a=e.length);else{var n=e.length/2;if(s<n)throw new TX("Too many math in a row: expected "+s+", but got "+n,e[0])}}));for(var u=0;u<a;++u){var d="r",h=0;u%2==1?d="l":u>0&&g&&(h=1),i[u]={type:"align",align:d,pregap:h,postgap:0}}return r.colSeparationType=g?"align":"alignat",r};w4({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var i=(C0(t[0])?[t[0]]:k0(t[0],"ordgroup").body).map((function(e){var t=E0(e).text;if("lcr".includes(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new TX("Unknown column alignment: "+t,e)})),n={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Z4(e.parser,n,_4(e.envName))},htmlBuilder:P4,mathmlBuilder:R4}),w4({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],i="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:i}]};if("*"===e.envName.charAt(e.envName.length-1)){var o=e.parser;if(o.consumeSpaces(),"["===o.fetch().text){if(o.consume(),o.consumeSpaces(),i=o.fetch().text,!"lcr".includes(i))throw new TX("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),n.cols=[{type:"align",align:i}]}}var r=Z4(e.parser,n,_4(e.envName)),s=Math.max(0,...r.body.map((e=>e.length)));return r.cols=new Array(s).fill({type:"align",align:i}),t?{type:"leftright",mode:e.mode,body:[r],left:t[0],right:t[1],rightColor:void 0}:r},htmlBuilder:P4,mathmlBuilder:R4}),w4({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=Z4(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:P4,mathmlBuilder:R4}),w4({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var i=(C0(t[0])?[t[0]]:k0(t[0],"ordgroup").body).map((function(e){var t=E0(e).text;if("lc".includes(t))return{type:"align",align:t};throw new TX("Unknown column alignment: "+t,e)}));if(i.length>1)throw new TX("{subarray} can contain only one column");var n={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5},o=Z4(e.parser,n,"script");if(o.body.length>0&&o.body[0].length>1)throw new TX("{subarray} can contain only one column");return o},htmlBuilder:P4,mathmlBuilder:R4}),w4({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=Z4(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},_4(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:P4,mathmlBuilder:R4}),w4({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:W4,htmlBuilder:P4,mathmlBuilder:R4}),w4({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){U4.has(e.envName)&&Q4(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Y4(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Z4(e.parser,t,"display")},htmlBuilder:P4,mathmlBuilder:R4}),w4({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:W4,htmlBuilder:P4,mathmlBuilder:R4}),w4({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Q4(e);var t={autoTag:Y4(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Z4(e.parser,t,"display")},htmlBuilder:P4,mathmlBuilder:R4}),w4({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Q4(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var i=e.fetch().text;if("&"!==i&&"\\\\"!==i){if("\\end"===i){0===t[t.length-1].length&&t.pop();break}throw new TX("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var n,o,r=[],s=[r],a=0;a<t.length;a++){for(var l=t[a],M={type:"styling",body:[],mode:"math",style:"display",resetFont:!0},c=0;c<l.length;c++)if(B0(l[c])){r.push(M);var g=E0(l[c+=1]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(g));else{if(!"<>AV".includes(g))throw new TX('Expected one of "<>AV=|." after @',l[c]);for(var d=0;d<2;d++){for(var h=!0,N=c+1;N<l.length;N++){if(o=g,("mathord"===(n=l[N]).type||"atom"===n.type)&&n.text===o){h=!1,c=N;break}if(B0(l[N]))throw new TX("Missing a "+g+" character to complete a CD arrow.",l[N]);u[d].body.push(l[N])}if(h)throw new TX("Missing a "+g+" character to complete a CD arrow.",l[c])}}var p={type:"styling",body:[$0(g,u,e)],mode:"math",style:"display",resetFont:!0};r.push(p),M={type:"styling",body:[],mode:"math",style:"display",resetFont:!0}}else M.body.push(l[c]);a%2==0?r.push(M):r.shift(),r=[],s.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}(e.parser)),htmlBuilder:P4,mathmlBuilder:R4}),S4("\\nonumber","\\gdef\\@eqnsw{0}"),S4("\\notag","\\nonumber"),VK({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new TX(e.funcName+" valid only within array environment")}});var B4=L4;VK({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:i,funcName:n}=e,o=t[0];if("ordgroup"!==o.type)throw new TX("Invalid environment name",o);for(var r="",s=0;s<o.body.length;++s)r+=k0(o.body[s],"textord").text;if("\\begin"===n){if(!B4.hasOwnProperty(r))throw new TX("No such environment: "+r,o);var a=B4[r],{args:l,optArgs:M}=i.parseArguments("\\begin{"+r+"}",a),c={mode:i.mode,envName:r,parser:i},g=a.handler(c,l,M);i.expect("\\end",!1);var u=i.nextToken,d=k0(i.parseFunction(),"environment");if(d.name!==r)throw new TX("Mismatch: \\begin{"+r+"} matched by \\end{"+d.name+"}",u);return g}return{type:"environment",mode:i.mode,name:r,nameGroup:o}}});var $4=(e,t)=>{var i=e.font,n=t.withFont(i);return i0(e.body,n)},F4=(e,t)=>{var i=e.font,n=t.withFont(i);return y0(e.body,n)},G4={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};VK({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=WK(t[0]),r=n;return r in G4&&(r=G4[r]),{type:"font",mode:i.mode,font:r.slice(1),body:o}},htmlBuilder:$4,mathmlBuilder:F4}),VK({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:i}=e,n=t[0];return{type:"mclass",mode:i.mode,mclass:R0(n),body:[{type:"font",mode:i.mode,font:"boldsymbol",body:n}],isCharacterBox:wX(n)}}}),VK({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:i,funcName:n,breakOnTokenText:o}=e,{mode:r}=i,s=i.parseExpression(!0,o);return{type:"font",mode:r,font:"math"+n.slice(1),body:{type:"ordgroup",mode:i.mode,body:s}}},htmlBuilder:$4,mathmlBuilder:F4});var H4=(e,t)=>t?{type:"styling",mode:e.mode,style:t,body:[e]}:e;VK({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var i,{parser:n,funcName:o}=e,r=t[0],s=t[1],a=null,l=null;switch(o){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,a="(",l=")";break;case"\\\\bracefrac":i=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":i=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var M="\\cfrac"===o,c=null;return M||o.startsWith("\\d")?c="display":o.startsWith("\\t")&&(c="text"),H4({type:"genfrac",mode:n.mode,numer:r,denom:s,continued:M,hasBarLine:i,leftDelim:a,rightDelim:l,barSize:null},c)},htmlBuilder:(e,t)=>{var i,n=t.style,o=n.fracNum(),r=n.fracDen();i=t.havingStyle(o);var s=i0(e.numer,i,t);if(e.continued){var a=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height<a?a:s.height,s.depth=s.depth<l?l:s.depth}i=t.havingStyle(r);var M,c,g,u,d,h,N,p,D,y,I=i0(e.denom,i,t);if(e.hasBarLine?(e.barSize?(c=eq(e.barSize,t),M=AK("frac-line",t,c)):M=AK("frac-line",t),c=M.height,g=M.height):(M=null,c=0,g=t.fontMetrics().defaultRuleThickness),n.size===RX.DISPLAY.size?(u=t.fontMetrics().num1,d=c>0?3*g:7*g,h=t.fontMetrics().denom1):(c>0?(u=t.fontMetrics().num2,d=g):(u=t.fontMetrics().num3,d=3*g),h=t.fontMetrics().denom2),M){var j=t.fontMetrics().axisHeight;u-s.depth-(j+.5*c)<d&&(u+=d-(u-s.depth-(j+.5*c))),j-.5*c-(I.height-h)<d&&(h+=d-(j-.5*c-(I.height-h))),N=bK({positionType:"individualShift",children:[{type:"elem",elem:I,shift:h},{type:"elem",elem:M,shift:-(j-.5*c)},{type:"elem",elem:s,shift:-u}]})}else{var z=u-s.depth-(I.height-h);z<d&&(u+=.5*(d-z),h+=.5*(d-z)),N=bK({positionType:"individualShift",children:[{type:"elem",elem:I,shift:h},{type:"elem",elem:s,shift:-u}]})}return i=t.havingStyle(n),N.height*=i.sizeMultiplier/t.sizeMultiplier,N.depth*=i.sizeMultiplier/t.sizeMultiplier,p=n.size===RX.DISPLAY.size?t.fontMetrics().delim1:n.size===RX.SCRIPTSCRIPT.size?t.havingStyle(RX.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,D=null==e.leftDelim?t0(t,["mopen"]):j4(e.leftDelim,p,!0,t.havingStyle(n),e.mode,["mopen"]),y=e.continued?TK([]):null==e.rightDelim?t0(t,["mclose"]):j4(e.rightDelim,p,!0,t.havingStyle(n),e.mode,["mclose"]),TK(["mord"].concat(i.sizingClasses(t)),[D,TK(["mfrac"],[N]),y],t)},mathmlBuilder:(e,t)=>{var i=new s0("mfrac",[y0(e.numer,t),y0(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var n=eq(e.barSize,t);i.setAttribute("linethickness",tq(n))}}else i.setAttribute("linethickness","0px");if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var r=new s0("mo",[new a0(e.leftDelim.replace("\\",""))]);r.setAttribute("fence","true"),o.push(r)}if(o.push(i),null!=e.rightDelim){var s=new s0("mo",[new a0(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}return u0(o)}return i}}),VK({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:i,funcName:n,token:o}=e;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:i.mode,replaceWith:t,token:o}}});var J4=["display","text","script","scriptscript"],X4=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};VK({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var i,{parser:n}=e,o=t[4],r=t[5],s=WK(t[0]),a="atom"===s.type&&"open"===s.family?X4(s.text):null,l=WK(t[1]),M="atom"===l.type&&"close"===l.family?X4(l.text):null,c=k0(t[2],"size"),g=null;i=!!c.isBlank||(g=c.value).number>0;var u=null,d=t[3];if("ordgroup"===d.type){if(d.body.length>0){var h=k0(d.body[0],"textord");u=J4[Number(h.text)]}}else d=k0(d,"textord"),u=J4[Number(d.text)];return H4({type:"genfrac",mode:n.mode,numer:o,denom:r,continued:!1,hasBarLine:i,barSize:g,leftDelim:a,rightDelim:M},u)}}),VK({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:i,funcName:n,token:o}=e;return{type:"infix",mode:i.mode,replaceWith:"\\\\abovefrac",size:k0(t[0],"size").value,token:o}}}),VK({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0],r=k0(t[1],"infix").size;if(!r)throw new Error("\\\\abovefrac expected size, but got "+String(r));var s=t[2],a=r.number>0;return{type:"genfrac",mode:i.mode,numer:o,denom:s,continued:!1,hasBarLine:a,barSize:r,leftDelim:null,rightDelim:null}}});var q4=(e,t)=>{var i,n,o=t.style;"supsub"===e.type?(i=e.sup?i0(e.sup,t.havingStyle(o.sup()),t):i0(e.sub,t.havingStyle(o.sub()),t),n=k0(e.base,"horizBrace")):n=k0(e,"horizBrace");var r,s=i0(n.base,t.havingBaseStyle(RX.DISPLAY)),a=w0(n,t);if(r=n.isOver?bK({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):bK({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:s}]}),i){var l=TK(["minner",n.isOver?"mover":"munder"],[r],t);r=n.isOver?bK({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:i}]}):bK({positionType:"bottom",positionData:l.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:l}]})}return TK(["minner",n.isOver?"mover":"munder"],[r],t)};VK({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:n}=e;return{type:"horizBrace",mode:i.mode,label:n,isOver:n.includes("\\over"),base:t[0]}},htmlBuilder:q4,mathmlBuilder:(e,t)=>{var i=f0(e.label);return new s0(e.isOver?"mover":"munder",[y0(e.base,t),i])}}),VK({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=t[1],o=k0(t[0],"url").url;return i.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:i.mode,href:o,body:BK(n)}:i.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var i=JK(e.body,t,!1);return function(e,t,i,n){var o=new Mq(e,t,i,n);return mK(o),o}(e.href,[],i,t)},mathmlBuilder:(e,t)=>{var i=D0(e.body,t);return i instanceof s0||(i=new s0("mrow",[i])),i.setAttribute("href",e.href),i}}),VK({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=k0(t[0],"url").url;if(!i.settings.isTrusted({command:"\\url",url:n}))return i.formatUnsupportedCmd("\\url");for(var o=[],r=0;r<n.length;r++){var s=n[r];"~"===s&&(s="\\textasciitilde"),o.push({type:"textord",mode:"text",text:s})}var a={type:"text",mode:i.mode,font:"\\texttt",body:o};return{type:"href",mode:i.mode,href:n,body:BK(a)}}}),VK({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:i}=e;return{type:"hbox",mode:i.mode,body:BK(t[0])}},htmlBuilder(e,t){var i=JK(e.body,t.withFont(""),!1);return OK(i)},mathmlBuilder:(e,t)=>new s0("mrow",p0(e.body,t.withFont("")))}),VK({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var i,{parser:n,funcName:o,token:r}=e,s=k0(t[0],"raw").string,a=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(o){case"\\htmlClass":l.class=s,i={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,i={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,i={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var M=s.split(","),c=0;c<M.length;c++){var g=M[c],u=g.indexOf("=");if(u<0)throw new TX("\\htmlData key/value '"+g+"' missing equals sign");var d=g.slice(0,u),h=g.slice(u+1);l["data-"+d.trim()]=h}i={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(i)?{type:"html",mode:n.mode,attributes:l,body:BK(a)}:n.formatUnsupportedCmd(o)},htmlBuilder:(e,t)=>{var i=JK(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var o=TK(n,i,t);for(var r in e.attributes)"class"!==r&&e.attributes.hasOwnProperty(r)&&o.setAttribute(r,e.attributes[r]);return o},mathmlBuilder:(e,t)=>D0(e.body,t)}),VK({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e;return{type:"htmlmathml",mode:i.mode,html:BK(t[0]),mathml:BK(t[1])}},htmlBuilder:(e,t)=>{var i=JK(e.html,t,!1);return OK(i)},mathmlBuilder:(e,t)=>D0(e.mathml,t)});var K4=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new TX("Invalid size: '"+e+"' in \\includegraphics");var i={number:+(t[1]+t[2]),unit:t[3]};if(!KX(i))throw new TX("Invalid unit: '"+i.unit+"' in \\includegraphics.");return i};VK({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,i)=>{var{parser:n}=e,o={number:0,unit:"em"},r={number:.9,unit:"em"},s={number:0,unit:"em"},a="";if(i[0])for(var l=k0(i[0],"raw").string.split(","),M=0;M<l.length;M++){var c=l[M].split("=");if(2===c.length){var g=c[1].trim();switch(c[0].trim()){case"alt":a=g;break;case"width":o=K4(g);break;case"height":r=K4(g);break;case"totalheight":s=K4(g);break;default:throw new TX("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}var u=k0(t[0],"url").url;return""===a&&(a=(a=(a=u).replace(/^.*[\\/]/,"")).substring(0,a.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:u})?{type:"includegraphics",mode:n.mode,alt:a,width:o,height:r,totalheight:s,src:u}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var i=eq(e.height,t),n=0;e.totalheight.number>0&&(n=eq(e.totalheight,t)-i);var o=0;e.width.number>0&&(o=eq(e.width,t));var r={height:tq(i+n)};o>0&&(r.width=tq(o)),n>0&&(r.verticalAlign=tq(-n));var s=new cq(e.src,e.alt,r);return s.height=i,s.depth=n,s},mathmlBuilder:(e,t)=>{var i=new s0("mglyph",[]);i.setAttribute("alt",e.alt);var n=eq(e.height,t),o=0;if(e.totalheight.number>0&&(o=eq(e.totalheight,t)-n,i.setAttribute("valign",tq(-o))),i.setAttribute("height",tq(n+o)),e.width.number>0){var r=eq(e.width,t);i.setAttribute("width",tq(r))}return i.setAttribute("src",e.src),i}}),VK({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:n}=e,o=k0(t[0],"size");if(i.settings.strict){var r="m"===n[1],s="mu"===o.value.unit;r?(s||i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+o.value.unit+" units"),"math"!==i.mode&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:i.mode,dimension:o.value}},htmlBuilder:(e,t)=>LK(e.dimension,t),mathmlBuilder(e,t){var i=eq(e.dimension,t);return new l0(i)}}),VK({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0];return{type:"lap",mode:i.mode,alignment:n.slice(5),body:o}},htmlBuilder:(e,t)=>{var i;"clap"===e.alignment?(i=TK([],[i0(e.body,t)]),i=TK(["inner"],[i],t)):i=TK(["inner"],[i0(e.body,t)]);var n=TK(["fix"],[]),o=TK([e.alignment],[i,n],t),r=TK(["strut"]);return r.style.height=tq(o.height+o.depth),o.depth&&(r.style.verticalAlign=tq(-o.depth)),o.children.unshift(r),o=TK(["thinbox"],[o],t),TK(["mord","vbox"],[o],t)},mathmlBuilder:(e,t)=>{var i=new s0("mpadded",[y0(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";i.setAttribute("lspace",n+"width")}return i.setAttribute("width","0px"),i}}),VK({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:i,parser:n}=e,o=n.mode;n.switchMode("math");var r="\\("===i?"\\)":"$",s=n.parseExpression(!1,r);return n.expect(r),n.switchMode(o),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:s}}}),VK({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new TX("Mismatched "+e.funcName)}});var e1=(e,t)=>{switch(t.style.size){case RX.DISPLAY.size:return e.display;case RX.TEXT.size:return e.text;case RX.SCRIPT.size:return e.script;case RX.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};VK({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:i}=e;return{type:"mathchoice",mode:i.mode,display:BK(t[0]),text:BK(t[1]),script:BK(t[2]),scriptscript:BK(t[3])}},htmlBuilder:(e,t)=>{var i=e1(e,t),n=JK(i,t,!1);return OK(n)},mathmlBuilder:(e,t)=>{var i=e1(e,t);return D0(i,t)}});var t1=(e,t,i,n,o,r,s)=>{e=TK([],[e]);var a,l,M,c=i&&wX(i);if(t){var g=i0(t,n.havingStyle(o.sup()),n);l={elem:g,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-g.depth)}}if(i){var u=i0(i,n.havingStyle(o.sub()),n);a={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-u.height)}}if(l&&a){var d=n.fontMetrics().bigOpSpacing5+a.elem.height+a.elem.depth+a.kern+e.depth+s;M=bK({positionType:"bottom",positionData:d,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:tq(-r)},{type:"kern",size:a.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:tq(r)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(a){var h=e.height-s;M=bK({positionType:"top",positionData:h,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:tq(-r)},{type:"kern",size:a.kern},{type:"elem",elem:e}]})}else{if(!l)return e;var N=e.depth+s;M=bK({positionType:"bottom",positionData:N,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:tq(r)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}var p=[M];if(a&&0!==r&&!c){var D=TK(["mspace"],[],n);D.style.marginRight=tq(r),p.unshift(D)}return TK(["mop","op-limits"],p,n)},i1=new Set(["\\smallint"]),n1=(e,t)=>{var i,n,o,r=!1;"supsub"===e.type?(i=e.sup,n=e.sub,o=k0(e.base,"op"),r=!0):o=k0(e,"op");var s,a,l=t.style,M=!1;if(l.size===RX.DISPLAY.size&&o.symbol&&!i1.has(o.name)&&(M=!0),o.symbol){var c=M?"Size2-Regular":"Size1-Regular",g="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(g=o.name.slice(1),o.name="oiint"===g?"\\iint":"\\iiint"),a=(s=DK(o.name,c,"math",t,["mop","op-symbol",M?"large-op":"small-op"])).italic,g.length>0){var u=kK(g+"Size"+(M?"2":"1"),t);s=bK({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:u,shift:M?.08:0}]}),o.name="\\"+g,s.classes.unshift("mop"),s.italic=a}}else if(o.body){var d=JK(o.body,t,!0);1===d.length&&d[0]instanceof uq?(s=d[0]).classes[0]="mop":s=TK(["mop"],d,t)}else{for(var h=[],N=1;N<o.name.length;N++)h.push(yK(o.name[N],o.mode,t));s=TK(["mop"],h,t)}var p,D=0,y=0;(s instanceof uq||"\\oiint"===o.name||"\\oiiint"===o.name)&&!o.suppressBaseShift&&(D=(s.height-s.depth)/2-t.fontMetrics().axisHeight,y=null!=(p=s.italic)?p:0);return r?t1(s,i,n,t,l,y,D):(D&&(s.style.position="relative",s.style.top=tq(D)),s)},o1=(e,t)=>{var i;if(e.symbol)i=new s0("mo",[g0(e.name,e.mode)]),i1.has(e.name)&&i.setAttribute("largeop","false");else if(e.body)i=new s0("mo",p0(e.body,t));else{i=new s0("mi",[new a0(e.name.slice(1))]);var n=new s0("mo",[g0("","text")]);i=e.parentIsSupSub?new s0("mrow",[i,n]):r0([i,n])}return i},r1={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};VK({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=n;return 1===o.length&&(o=r1[o]),{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:n1,mathmlBuilder:o1}),VK({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:i}=e,n=t[0];return{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:BK(n)}},htmlBuilder:n1,mathmlBuilder:o1});var s1={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};VK({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:i}},htmlBuilder:n1,mathmlBuilder:o1}),VK({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:i}},htmlBuilder:n1,mathmlBuilder:o1}),VK({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:i}=e,n=i;return 1===n.length&&(n=s1[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:n1,mathmlBuilder:o1});var a1=(e,t)=>{var i,n,o,r,s=!1;if("supsub"===e.type?(i=e.sup,n=e.sub,o=k0(e.base,"operatorname"),s=!0):o=k0(e,"operatorname"),o.body.length>0){for(var a=(o.body.map((e=>{var t="text"in e?e.text:void 0;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}))),l=JK(a,t.withFont("mathrm"),!0),M=0;M<l.length;M++){var c=l[M];c instanceof uq&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}r=TK(["mop"],l,t)}else r=TK(["mop"],[],t);return s?t1(r,i,n,t,t.style,0,0):r};function l1(e,t,i){for(var n=JK(e,t,!1),o=t.sizeMultiplier/i.sizeMultiplier,r=0;r<n.length;r++){var s=n[r].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[r].classes,t.sizingClasses(i)):n[r].classes[s+1]==="reset-size"+t.size&&(n[r].classes[s+1]="reset-size"+i.size),n[r].height*=o,n[r].depth*=o}return OK(n)}VK({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0];return{type:"operatorname",mode:i.mode,body:BK(o),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:a1,mathmlBuilder:(e,t)=>{for(var i=p0(e.body,t.withFont("mathrm")),n=!0,o=0;o<i.length;o++){var r=i[o];if(r instanceof l0);else if(r instanceof s0)switch(r.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":var s=r.children[0];1===r.children.length&&s instanceof a0?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}if(n){var a=i.map((e=>e.toText())).join("");i=[new a0(a)]}var l=new s0("mi",i);l.setAttribute("mathvariant","normal");var M=new s0("mo",[g0("","text")]);return e.parentIsSupSub?new s0("mrow",[l,M]):r0([l,M])}}),S4("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),RK({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?OK(JK(e.body,t,!1)):TK(["mord"],JK(e.body,t,!0),t),mathmlBuilder:(e,t)=>D0(e.body,t,!0)}),VK({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:i}=e,n=t[0];return{type:"overline",mode:i.mode,body:n}},htmlBuilder(e,t){var i=i0(e.body,t.havingCrampedStyle()),n=AK("overline-line",t),o=t.fontMetrics().defaultRuleThickness,r=bK({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:3*o},{type:"elem",elem:n},{type:"kern",size:o}]});return TK(["mord","overline"],[r],t)},mathmlBuilder(e,t){var i=new s0("mo",[new a0("‾")]);i.setAttribute("stretchy","true");var n=new s0("mover",[y0(e.body,t),i]);return n.setAttribute("accent","true"),n}}),VK({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=t[0];return{type:"phantom",mode:i.mode,body:BK(n)}},htmlBuilder:(e,t)=>{var i=JK(e.body,t.withPhantom(),!1);return OK(i)},mathmlBuilder:(e,t)=>{var i=p0(e.body,t);return new s0("mphantom",i)}}),S4("\\hphantom","\\smash{\\phantom{#1}}"),VK({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=t[0];return{type:"vphantom",mode:i.mode,body:n}},htmlBuilder:(e,t)=>{var i=TK(["inner"],[i0(e.body,t.withPhantom())]),n=TK(["fix"],[]);return TK(["mord","rlap"],[i,n],t)},mathmlBuilder:(e,t)=>{var i=p0(BK(e.body),t),n=new s0("mphantom",i),o=new s0("mpadded",[n]);return o.setAttribute("width","0px"),o}}),VK({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:i}=e,n=k0(t[0],"size").value,o=t[1];return{type:"raisebox",mode:i.mode,dy:n,body:o}},htmlBuilder(e,t){var i=i0(e.body,t),n=eq(e.dy,t);return bK({positionType:"shift",positionData:-n,children:[{type:"elem",elem:i}]})},mathmlBuilder(e,t){var i=new s0("mpadded",[y0(e.body,t)]),n=e.dy.number+e.dy.unit;return i.setAttribute("voffset",n),i}}),VK({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),VK({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,i){var{parser:n}=e,o=i[0],r=k0(t[0],"size"),s=k0(t[1],"size");return{type:"rule",mode:n.mode,shift:o&&k0(o,"size").value,width:r.value,height:s.value}},htmlBuilder(e,t){var i=TK(["mord","rule"],[],t),n=eq(e.width,t),o=eq(e.height,t),r=e.shift?eq(e.shift,t):0;return i.style.borderRightWidth=tq(n),i.style.borderTopWidth=tq(o),i.style.bottom=tq(r),i.width=n,i.height=o+r,i.depth=-r,i.maxFontSize=1.125*o*t.sizeMultiplier,i},mathmlBuilder(e,t){var i=eq(e.width,t),n=eq(e.height,t),o=e.shift?eq(e.shift,t):0,r=t.color&&t.getColor()||"black",s=new s0("mspace");s.setAttribute("mathbackground",r),s.setAttribute("width",tq(i)),s.setAttribute("height",tq(n));var a=new s0("mpadded",[s]);return o>=0?a.setAttribute("height",tq(o)):(a.setAttribute("height",tq(o)),a.setAttribute("depth",tq(-o))),a.setAttribute("voffset",tq(o)),a}});var M1=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];VK({type:"sizing",names:M1,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:i,funcName:n,parser:o}=e,r=o.parseExpression(!1,i);return{type:"sizing",mode:o.mode,size:M1.indexOf(n)+1,body:r}},htmlBuilder:(e,t)=>{var i=t.havingSize(e.size);return l1(e.body,i,t)},mathmlBuilder:(e,t)=>{var i=t.havingSize(e.size),n=p0(e.body,i),o=new s0("mstyle",n);return o.setAttribute("mathsize",tq(i.sizeMultiplier)),o}}),VK({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,i)=>{var{parser:n}=e,o=!1,r=!1,s=i[0]&&k0(i[0],"ordgroup");if(s)for(var a,l=0;l<s.body.length;++l){if("t"===(a=E0(s.body[l]).text))o=!0;else{if("b"!==a){o=!1,r=!1;break}r=!0}}else o=!0,r=!0;var M=t[0];return{type:"smash",mode:n.mode,body:M,smashHeight:o,smashDepth:r}},htmlBuilder:(e,t)=>{var i=TK([],[i0(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return i;if(e.smashHeight&&(i.height=0),e.smashDepth&&(i.depth=0),e.smashHeight&&e.smashDepth)return TK(["mord","smash"],[i],t);if(i.children)for(var n=0;n<i.children.length;n++)e.smashHeight&&(i.children[n].height=0),e.smashDepth&&(i.children[n].depth=0);var o=bK({positionType:"firstBaseline",children:[{type:"elem",elem:i}]});return TK(["mord"],[o],t)},mathmlBuilder:(e,t)=>{var i=new s0("mpadded",[y0(e.body,t)]);return e.smashHeight&&i.setAttribute("height","0px"),e.smashDepth&&i.setAttribute("depth","0px"),i}}),VK({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){var{parser:n}=e,o=i[0],r=t[0];return{type:"sqrt",mode:n.mode,body:r,index:o}},htmlBuilder(e,t){var i=i0(e.body,t.havingCrampedStyle());0===i.height&&(i.height=t.fontMetrics().xHeight),i=fK(i,t);var n=t.fontMetrics().defaultRuleThickness,o=n;t.style.id<RX.TEXT.id&&(o=t.fontMetrics().xHeight);var r=n+o/4,s=i.height+i.depth+r+n,{span:a,ruleWidth:l,advanceWidth:M}=function(e,t){var i,n,o,r,s,a=t.havingBaseSizing(),l=I4("\\surd",e*a.sizeMultiplier,D4,a),M=a.sizeMultiplier,c=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);return"small"===l.type?(e<1?M=1:e<1.4&&(M=.7),o=(1+c)/M,(i=M4("sqrtMain",n=(1+c+l4)/M,r=1e3+1e3*c+80,c,t)).style.minWidth="0.853em",s=.833/M):"large"===l.type?(r=1080*d4[l.size],o=(d4[l.size]+c)/M,n=(d4[l.size]+c+l4)/M,(i=M4("sqrtSize"+l.size,n,r,c,t)).style.minWidth="1.02em",s=1/M):(n=e+c+l4,o=e+c,r=Math.floor(1e3*e+c)+80,(i=M4("sqrtTall",n,r,c,t)).style.minWidth="0.742em",s=1.056),i.height=o,i.style.height=tq(n),{span:i,advanceWidth:s,ruleWidth:(t.fontMetrics().sqrtRuleThickness+c)*M}}(s,t),c=a.height-l;c>i.height+i.depth+r&&(r=(r+c-i.height-i.depth)/2);var g=a.height-i.height-r-l;i.style.paddingLeft=tq(M);var u=bK({positionType:"firstBaseline",children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:-(i.height+g)},{type:"elem",elem:a},{type:"kern",size:l}]});if(e.index){var d=t.havingStyle(RX.SCRIPTSCRIPT),h=i0(e.index,d,t),N=.6*(u.height-u.depth),p=bK({positionType:"shift",positionData:-N,children:[{type:"elem",elem:h}]}),D=TK(["root"],[p]);return TK(["mord","sqrt"],[D,u],t)}return TK(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:i,index:n}=e;return n?new s0("mroot",[y0(i,t),y0(n,t)]):new s0("msqrt",[y0(i,t)])}});var c1={display:RX.DISPLAY,text:RX.TEXT,script:RX.SCRIPT,scriptscript:RX.SCRIPTSCRIPT};VK({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:i,funcName:n,parser:o}=e,r=o.parseExpression(!0,i),s=n.slice(1,n.length-5);if(!function(e){return e in c1}(s))throw new Error("Unknown style: "+s);return{type:"styling",mode:o.mode,style:s,body:r}},htmlBuilder(e,t){var i=c1[e.style],n=t.havingStyle(i);return e.resetFont&&(n=n.withFont("")),l1(e.body,n,t)},mathmlBuilder(e,t){var i=c1[e.style],n=t.havingStyle(i);e.resetFont&&(n=n.withFont(""));var o=p0(e.body,n),r=new s0("mstyle",o),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return r.setAttribute("scriptlevel",s[0]),r.setAttribute("displaystyle",s[1]),r}});RK({type:"supsub",htmlBuilder(e,t){var i=function(e,t){var i=e.base;return i?"op"===i.type?i.limits&&(t.style.size===RX.DISPLAY.size||i.alwaysHandleSupSub)?n1:null:"operatorname"===i.type?i.alwaysHandleSupSub&&(t.style.size===RX.DISPLAY.size||i.limits)?a1:null:"accent"===i.type?wX(i.base)?U0:null:"horizBrace"===i.type&&!e.sub===i.isOver?q4:null:null}(e,t);if(i)return i(e,t);var n,o,r,{base:s,sup:a,sub:l}=e,M=i0(s,t),c=t.fontMetrics(),g=0,u=0,d=s&&wX(s);if(a){var h=t.havingStyle(t.style.sup());n=i0(a,h,t),d||(g=M.height-h.fontMetrics().supDrop*h.sizeMultiplier/t.sizeMultiplier)}if(l){var N=t.havingStyle(t.style.sub());o=i0(l,N,t),d||(u=M.depth+N.fontMetrics().subDrop*N.sizeMultiplier/t.sizeMultiplier)}r=t.style===RX.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;var p,D=t.sizeMultiplier,y=tq(.5/c.ptPerEm/D),I=null;if(o){var j,z=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);if(M instanceof uq||z)I=tq(-(null!=(j=M.italic)?j:0))}if(n&&o){g=Math.max(g,r,n.depth+.25*c.xHeight),u=Math.max(u,c.sub2);var m=4*c.defaultRuleThickness;if(g-n.depth-(o.height-u)<m){u=m-(g-n.depth)+o.height;var T=.8*c.xHeight-(g-n.depth);T>0&&(g+=T,u-=T)}p=bK({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u,marginRight:y,marginLeft:I},{type:"elem",elem:n,shift:-g,marginRight:y}]})}else if(o){u=Math.max(u,c.sub1,o.height-.8*c.xHeight),p=bK({positionType:"shift",positionData:u,children:[{type:"elem",elem:o,marginLeft:I,marginRight:y}]})}else{if(!n)throw new Error("supsub must have either sup or sub.");g=Math.max(g,r,n.depth+.25*c.xHeight),p=bK({positionType:"shift",positionData:-g,children:[{type:"elem",elem:n,marginRight:y}]})}var x=e0(M,"right")||"mord";return TK([x],[M,TK(["msupsub"],[p])],t)},mathmlBuilder(e,t){var i,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,i=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var o,r=[y0(e.base,t)];if(e.sub&&r.push(y0(e.sub,t)),e.sup&&r.push(y0(e.sup,t)),n)o=i?"mover":"munder";else if(e.sub)if(e.sup){var s=e.base;o=s&&"op"===s.type&&s.limits&&t.style===RX.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(t.style===RX.DISPLAY||s.limits)?"munderover":"msubsup"}else{var a=e.base;o=a&&"op"===a.type&&a.limits&&(t.style===RX.DISPLAY||a.alwaysHandleSupSub)||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(a.limits||t.style===RX.DISPLAY)?"munder":"msub"}else{var l=e.base;o=l&&"op"===l.type&&l.limits&&(t.style===RX.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===RX.DISPLAY)?"mover":"msup"}return new s0(o,r)}}),RK({type:"atom",htmlBuilder:(e,t)=>yK(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var i=new s0("mo",[g0(e.text,e.mode)]);if("bin"===e.family){var n=h0(e,t);"bold-italic"===n&&i.setAttribute("mathvariant",n)}else"punct"===e.family?i.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||i.setAttribute("stretchy","false");return i}});var g1={mi:"italic",mn:"normal",mtext:"normal"};RK({type:"mathord",htmlBuilder:(e,t)=>IK(e,t,"mathord"),mathmlBuilder(e,t){var i=new s0("mi",[g0(e.text,e.mode,t)]),n=h0(e,t)||"italic";return n!==g1[i.type]&&i.setAttribute("mathvariant",n),i}}),RK({type:"textord",htmlBuilder:(e,t)=>IK(e,t,"textord"),mathmlBuilder(e,t){var i,n=g0(e.text,e.mode,t),o=h0(e,t)||"normal";return i="text"===e.mode?new s0("mtext",[n]):/[0-9]/.test(e.text)?new s0("mn",[n]):"\\prime"===e.text?new s0("mo",[n]):new s0("mi",[n]),o!==g1[i.type]&&i.setAttribute("mathvariant",o),i}});var u1={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},d1={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};RK({type:"spacing",htmlBuilder(e,t){if(d1.hasOwnProperty(e.text)){var i=d1[e.text].className||"";if("text"===e.mode){var n=IK(e,t,"textord");return n.classes.push(i),n}return TK(["mspace",i],[yK(e.text,e.mode,t)],t)}if(u1.hasOwnProperty(e.text))return TK(["mspace",u1[e.text]],[],t);throw new TX('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!d1.hasOwnProperty(e.text)){if(u1.hasOwnProperty(e.text))return new s0("mspace");throw new TX('Unknown type of space "'+e.text+'"')}return new s0("mtext",[new a0(" ")])}});var h1=()=>{var e=new s0("mtd",[]);return e.setAttribute("width","50%"),e};RK({type:"tag",mathmlBuilder(e,t){var i=new s0("mtable",[new s0("mtr",[h1(),new s0("mtd",[D0(e.body,t)]),h1(),new s0("mtd",[D0(e.tag,t)])])]);return i.setAttribute("width","100%"),i}});var N1={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},p1={"\\textbf":"textbf","\\textmd":"textmd"},D1={"\\textit":"textit","\\textup":"textup"},y1=(e,t)=>{var i=e.font;return i?N1[i]?t.withTextFontFamily(N1[i]):p1[i]?t.withTextFontWeight(p1[i]):"\\emph"===i?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(D1[i]):t};VK({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:n}=e,o=t[0];return{type:"text",mode:i.mode,body:BK(o),font:n}},htmlBuilder(e,t){var i=y1(e,t),n=JK(e.body,i,!0);return TK(["mord","text"],n,i)},mathmlBuilder(e,t){var i=y1(e,t);return D0(e.body,i)}}),VK({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"underline",mode:i.mode,body:t[0]}},htmlBuilder(e,t){var i=i0(e.body,t),n=AK("underline-line",t),o=t.fontMetrics().defaultRuleThickness,r=bK({positionType:"top",positionData:i.height,children:[{type:"kern",size:o},{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:i}]});return TK(["mord","underline"],[r],t)},mathmlBuilder(e,t){var i=new s0("mo",[new a0("‾")]);i.setAttribute("stretchy","true");var n=new s0("munder",[y0(e.body,t),i]);return n.setAttribute("accentunder","true"),n}}),VK({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:i}=e;return{type:"vcenter",mode:i.mode,body:t[0]}},htmlBuilder(e,t){var i=i0(e.body,t),n=t.fontMetrics().axisHeight,o=.5*(i.height-n-(i.depth+n));return bK({positionType:"shift",positionData:o,children:[{type:"elem",elem:i}]})},mathmlBuilder(e,t){var i=new s0("mpadded",[y0(e.body,t)],["vcenter"]);return new s0("mrow",[i])}}),VK({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,i){throw new TX("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var i=I1(e),n=[],o=t.havingStyle(t.style.text()),r=0;r<i.length;r++){var s=i[r];"~"===s&&(s="\\textasciitilde"),n.push(DK(s,"Typewriter-Regular",e.mode,o,["mord","texttt"]))}return TK(["mord","text"].concat(o.sizingClasses(t)),zK(n),o)},mathmlBuilder(e,t){var i=new a0(I1(e)),n=new s0("mtext",[i]);return n.setAttribute("mathvariant","monospace"),n}});var I1=e=>e.body.replace(/ /g,e.star?"␣":" "),j1=ZK,z1="[ \r\n\t]",m1="(\\\\[a-zA-Z@]+)"+z1+"*",T1="[̀-ͯ]",x1=new RegExp(T1+"+$"),A1="("+z1+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+T1+"*|[\ud800-\udbff][\udc00-\udfff]"+T1+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+m1+"|\\\\[^\ud800-\udfff])";class O1{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(A1,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new E4("EOF",new k4(this,t,t));var i=this.tokenRegex.exec(e);if(null===i||i.index!==t)throw new TX("Unexpected character: '"+e[t]+"'",new E4(e[t],new k4(this,t,t+1)));var n=i[6]||i[3]||(i[2]?"\\ ":" ");if(14===this.catcodes[n]){var o=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===o?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new E4(n,new k4(this,t,this.tokenRegex.lastIndex))}}class f1{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new TX("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,i){if(void 0===i&&(i=!1),i){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(e)&&(o[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var b1=v4;S4("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),S4("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),S4("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),S4("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),S4("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var i=e.future();return 1===t[0].length&&t[0][0].text===i.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),S4("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),S4("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var L1={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};S4("\\char",(function(e){var t,i=e.popToken(),n=0;if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if("\\"===(i=e.popToken()).text[0])n=i.text.charCodeAt(1);else{if("EOF"===i.text)throw new TX("\\char` missing argument");n=i.text.charCodeAt(0)}else t=10;if(t){if(null==(n=L1[i.text])||n>=t)throw new TX("Invalid base-"+t+" digit "+i.text);for(var o;null!=(o=L1[e.future().text])&&o<t;)n*=t,n+=o,e.popToken()}return"\\@char{"+n+"}"}));var w1=(e,t,i,n)=>{var o=e.consumeArg().tokens;if(1!==o.length)throw new TX("\\newcommand's first argument must be a macro name");var r=o[0].text,s=e.isDefined(r);if(s&&!t)throw new TX("\\newcommand{"+r+"} attempting to redefine "+r+"; use \\renewcommand");if(!s&&!i)throw new TX("\\renewcommand{"+r+"} when command "+r+" does not yet exist; use \\newcommand");var a=0;if(1===(o=e.consumeArg().tokens).length&&"["===o[0].text){for(var l="",M=e.expandNextToken();"]"!==M.text&&"EOF"!==M.text;)l+=M.text,M=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new TX("Invalid number of arguments: "+l);a=parseInt(l),o=e.consumeArg().tokens}return s&&n||e.macros.set(r,{tokens:o,numArgs:a}),""};S4("\\newcommand",(e=>w1(e,!1,!0,!1))),S4("\\renewcommand",(e=>w1(e,!0,!1,!1))),S4("\\providecommand",(e=>w1(e,!0,!0,!0))),S4("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),S4("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),S4("\\show",(e=>{var t=e.popToken(),i=t.text;return console.log(t,e.macros.get(i),j1[i],mq.math[i],mq.text[i]),""})),S4("\\bgroup","{"),S4("\\egroup","}"),S4("~","\\nobreakspace"),S4("\\lq","`"),S4("\\rq","'"),S4("\\aa","\\r a"),S4("\\AA","\\r A"),S4("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),S4("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),S4("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),S4("ℬ","\\mathscr{B}"),S4("ℰ","\\mathscr{E}"),S4("ℱ","\\mathscr{F}"),S4("ℋ","\\mathscr{H}"),S4("ℐ","\\mathscr{I}"),S4("ℒ","\\mathscr{L}"),S4("ℳ","\\mathscr{M}"),S4("ℛ","\\mathscr{R}"),S4("ℭ","\\mathfrak{C}"),S4("ℌ","\\mathfrak{H}"),S4("ℨ","\\mathfrak{Z}"),S4("\\Bbbk","\\Bbb{k}"),S4("\\llap","\\mathllap{\\textrm{#1}}"),S4("\\rlap","\\mathrlap{\\textrm{#1}}"),S4("\\clap","\\mathclap{\\textrm{#1}}"),S4("\\mathstrut","\\vphantom{(}"),S4("\\underbar","\\underline{\\text{#1}}"),S4("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),S4("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),S4("\\ne","\\neq"),S4("≠","\\neq"),S4("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),S4("∉","\\notin"),S4("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),S4("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),S4("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),S4("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),S4("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),S4("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),S4("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),S4("⟂","\\perp"),S4("‼","\\mathclose{!\\mkern-0.8mu!}"),S4("∌","\\notni"),S4("⌜","\\ulcorner"),S4("⌝","\\urcorner"),S4("⌞","\\llcorner"),S4("⌟","\\lrcorner"),S4("©","\\copyright"),S4("®","\\textregistered"),S4("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),S4("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),S4("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),S4("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),S4("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),S4("⋮","\\vdots"),S4("\\varGamma","\\mathit{\\Gamma}"),S4("\\varDelta","\\mathit{\\Delta}"),S4("\\varTheta","\\mathit{\\Theta}"),S4("\\varLambda","\\mathit{\\Lambda}"),S4("\\varXi","\\mathit{\\Xi}"),S4("\\varPi","\\mathit{\\Pi}"),S4("\\varSigma","\\mathit{\\Sigma}"),S4("\\varUpsilon","\\mathit{\\Upsilon}"),S4("\\varPhi","\\mathit{\\Phi}"),S4("\\varPsi","\\mathit{\\Psi}"),S4("\\varOmega","\\mathit{\\Omega}"),S4("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),S4("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),S4("\\boxed","\\fbox{$\\displaystyle{#1}$}"),S4("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),S4("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),S4("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),S4("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),S4("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var v1={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},S1=new Set(["bin","rel"]);S4("\\dots",(function(e){var t="\\dotso",i=e.expandAfterFuture().text;return i in v1?t=v1[i]:("\\not"===i.slice(0,4)||i in mq.math&&S1.has(mq.math[i].group))&&(t="\\dotsb"),t}));var k1={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};S4("\\dotso",(function(e){return e.future().text in k1?"\\ldots\\,":"\\ldots"})),S4("\\dotsc",(function(e){var t=e.future().text;return t in k1&&","!==t?"\\ldots\\,":"\\ldots"})),S4("\\cdots",(function(e){return e.future().text in k1?"\\@cdots\\,":"\\@cdots"})),S4("\\dotsb","\\cdots"),S4("\\dotsm","\\cdots"),S4("\\dotsi","\\!\\cdots"),S4("\\dotsx","\\ldots\\,"),S4("\\DOTSI","\\relax"),S4("\\DOTSB","\\relax"),S4("\\DOTSX","\\relax"),S4("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),S4("\\,","\\tmspace+{3mu}{.1667em}"),S4("\\thinspace","\\,"),S4("\\>","\\mskip{4mu}"),S4("\\:","\\tmspace+{4mu}{.2222em}"),S4("\\medspace","\\:"),S4("\\;","\\tmspace+{5mu}{.2777em}"),S4("\\thickspace","\\;"),S4("\\!","\\tmspace-{3mu}{.1667em}"),S4("\\negthinspace","\\!"),S4("\\negmedspace","\\tmspace-{4mu}{.2222em}"),S4("\\negthickspace","\\tmspace-{5mu}{.277em}"),S4("\\enspace","\\kern.5em "),S4("\\enskip","\\hskip.5em\\relax"),S4("\\quad","\\hskip1em\\relax"),S4("\\qquad","\\hskip2em\\relax"),S4("\\tag","\\@ifstar\\tag@literal\\tag@paren"),S4("\\tag@paren","\\tag@literal{({#1})}"),S4("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new TX("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),S4("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),S4("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),S4("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),S4("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),S4("\\newline","\\\\\\relax"),S4("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var E1=tq(pq["Main-Regular"]["T".charCodeAt(0)][1]-.7*pq["Main-Regular"]["A".charCodeAt(0)][1]);S4("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+E1+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),S4("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+E1+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),S4("\\hspace","\\@ifstar\\@hspacer\\@hspace"),S4("\\@hspace","\\hskip #1\\relax"),S4("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),S4("\\ordinarycolon",":"),S4("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),S4("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),S4("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),S4("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),S4("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),S4("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),S4("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),S4("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),S4("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),S4("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),S4("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),S4("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),S4("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),S4("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),S4("∷","\\dblcolon"),S4("∹","\\eqcolon"),S4("≔","\\coloneqq"),S4("≕","\\eqqcolon"),S4("⩴","\\Coloneqq"),S4("\\ratio","\\vcentcolon"),S4("\\coloncolon","\\dblcolon"),S4("\\colonequals","\\coloneqq"),S4("\\coloncolonequals","\\Coloneqq"),S4("\\equalscolon","\\eqqcolon"),S4("\\equalscoloncolon","\\Eqqcolon"),S4("\\colonminus","\\coloneq"),S4("\\coloncolonminus","\\Coloneq"),S4("\\minuscolon","\\eqcolon"),S4("\\minuscoloncolon","\\Eqcolon"),S4("\\coloncolonapprox","\\Colonapprox"),S4("\\coloncolonsim","\\Colonsim"),S4("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),S4("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),S4("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),S4("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),S4("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),S4("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),S4("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),S4("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),S4("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),S4("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),S4("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),S4("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),S4("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),S4("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),S4("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),S4("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),S4("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),S4("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),S4("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),S4("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),S4("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),S4("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),S4("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),S4("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),S4("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),S4("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),S4("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),S4("\\imath","\\html@mathml{\\@imath}{ı}"),S4("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),S4("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),S4("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),S4("⟦","\\llbracket"),S4("⟧","\\rrbracket"),S4("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),S4("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),S4("⦃","\\lBrace"),S4("⦄","\\rBrace"),S4("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),S4("⦵","\\minuso"),S4("\\darr","\\downarrow"),S4("\\dArr","\\Downarrow"),S4("\\Darr","\\Downarrow"),S4("\\lang","\\langle"),S4("\\rang","\\rangle"),S4("\\uarr","\\uparrow"),S4("\\uArr","\\Uparrow"),S4("\\Uarr","\\Uparrow"),S4("\\N","\\mathbb{N}"),S4("\\R","\\mathbb{R}"),S4("\\Z","\\mathbb{Z}"),S4("\\alef","\\aleph"),S4("\\alefsym","\\aleph"),S4("\\Alpha","\\mathrm{A}"),S4("\\Beta","\\mathrm{B}"),S4("\\bull","\\bullet"),S4("\\Chi","\\mathrm{X}"),S4("\\clubs","\\clubsuit"),S4("\\cnums","\\mathbb{C}"),S4("\\Complex","\\mathbb{C}"),S4("\\Dagger","\\ddagger"),S4("\\diamonds","\\diamondsuit"),S4("\\empty","\\emptyset"),S4("\\Epsilon","\\mathrm{E}"),S4("\\Eta","\\mathrm{H}"),S4("\\exist","\\exists"),S4("\\harr","\\leftrightarrow"),S4("\\hArr","\\Leftrightarrow"),S4("\\Harr","\\Leftrightarrow"),S4("\\hearts","\\heartsuit"),S4("\\image","\\Im"),S4("\\infin","\\infty"),S4("\\Iota","\\mathrm{I}"),S4("\\isin","\\in"),S4("\\Kappa","\\mathrm{K}"),S4("\\larr","\\leftarrow"),S4("\\lArr","\\Leftarrow"),S4("\\Larr","\\Leftarrow"),S4("\\lrarr","\\leftrightarrow"),S4("\\lrArr","\\Leftrightarrow"),S4("\\Lrarr","\\Leftrightarrow"),S4("\\Mu","\\mathrm{M}"),S4("\\natnums","\\mathbb{N}"),S4("\\Nu","\\mathrm{N}"),S4("\\Omicron","\\mathrm{O}"),S4("\\plusmn","\\pm"),S4("\\rarr","\\rightarrow"),S4("\\rArr","\\Rightarrow"),S4("\\Rarr","\\Rightarrow"),S4("\\real","\\Re"),S4("\\reals","\\mathbb{R}"),S4("\\Reals","\\mathbb{R}"),S4("\\Rho","\\mathrm{P}"),S4("\\sdot","\\cdot"),S4("\\sect","\\S"),S4("\\spades","\\spadesuit"),S4("\\sub","\\subset"),S4("\\sube","\\subseteq"),S4("\\supe","\\supseteq"),S4("\\Tau","\\mathrm{T}"),S4("\\thetasym","\\vartheta"),S4("\\weierp","\\wp"),S4("\\Zeta","\\mathrm{Z}"),S4("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),S4("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),S4("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),S4("\\bra","\\mathinner{\\langle{#1}|}"),S4("\\ket","\\mathinner{|{#1}\\rangle}"),S4("\\braket","\\mathinner{\\langle{#1}\\rangle}"),S4("\\Bra","\\left\\langle#1\\right|"),S4("\\Ket","\\left|#1\\right\\rangle");var C1=e=>t=>{var i=t.consumeArg().tokens,n=t.consumeArg().tokens,o=t.consumeArg().tokens,r=t.consumeArg().tokens,s=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();var l=t=>i=>{e&&(i.macros.set("|",s),o.length&&i.macros.set("\\|",a));var r=t;!t&&o.length&&("|"===i.future().text&&(i.popToken(),r=!0));return{tokens:r?o:n,numArgs:0}};t.macros.set("|",l(!1)),o.length&&t.macros.set("\\|",l(!0));var M=t.consumeArg().tokens,c=t.expandTokens([...r,...M,...i]);return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};S4("\\bra@ket",C1(!1)),S4("\\bra@set",C1(!0)),S4("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),S4("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),S4("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),S4("\\angln","{\\angl n}"),S4("\\blue","\\textcolor{##6495ed}{#1}"),S4("\\orange","\\textcolor{##ffa500}{#1}"),S4("\\pink","\\textcolor{##ff00af}{#1}"),S4("\\red","\\textcolor{##df0030}{#1}"),S4("\\green","\\textcolor{##28ae7b}{#1}"),S4("\\gray","\\textcolor{gray}{#1}"),S4("\\purple","\\textcolor{##9d38bd}{#1}"),S4("\\blueA","\\textcolor{##ccfaff}{#1}"),S4("\\blueB","\\textcolor{##80f6ff}{#1}"),S4("\\blueC","\\textcolor{##63d9ea}{#1}"),S4("\\blueD","\\textcolor{##11accd}{#1}"),S4("\\blueE","\\textcolor{##0c7f99}{#1}"),S4("\\tealA","\\textcolor{##94fff5}{#1}"),S4("\\tealB","\\textcolor{##26edd5}{#1}"),S4("\\tealC","\\textcolor{##01d1c1}{#1}"),S4("\\tealD","\\textcolor{##01a995}{#1}"),S4("\\tealE","\\textcolor{##208170}{#1}"),S4("\\greenA","\\textcolor{##b6ffb0}{#1}"),S4("\\greenB","\\textcolor{##8af281}{#1}"),S4("\\greenC","\\textcolor{##74cf70}{#1}"),S4("\\greenD","\\textcolor{##1fab54}{#1}"),S4("\\greenE","\\textcolor{##0d923f}{#1}"),S4("\\goldA","\\textcolor{##ffd0a9}{#1}"),S4("\\goldB","\\textcolor{##ffbb71}{#1}"),S4("\\goldC","\\textcolor{##ff9c39}{#1}"),S4("\\goldD","\\textcolor{##e07d10}{#1}"),S4("\\goldE","\\textcolor{##a75a05}{#1}"),S4("\\redA","\\textcolor{##fca9a9}{#1}"),S4("\\redB","\\textcolor{##ff8482}{#1}"),S4("\\redC","\\textcolor{##f9685d}{#1}"),S4("\\redD","\\textcolor{##e84d39}{#1}"),S4("\\redE","\\textcolor{##bc2612}{#1}"),S4("\\maroonA","\\textcolor{##ffbde0}{#1}"),S4("\\maroonB","\\textcolor{##ff92c6}{#1}"),S4("\\maroonC","\\textcolor{##ed5fa6}{#1}"),S4("\\maroonD","\\textcolor{##ca337c}{#1}"),S4("\\maroonE","\\textcolor{##9e034e}{#1}"),S4("\\purpleA","\\textcolor{##ddd7ff}{#1}"),S4("\\purpleB","\\textcolor{##c6b9fc}{#1}"),S4("\\purpleC","\\textcolor{##aa87ff}{#1}"),S4("\\purpleD","\\textcolor{##7854ab}{#1}"),S4("\\purpleE","\\textcolor{##543b78}{#1}"),S4("\\mintA","\\textcolor{##f5f9e8}{#1}"),S4("\\mintB","\\textcolor{##edf2df}{#1}"),S4("\\mintC","\\textcolor{##e0e5cc}{#1}"),S4("\\grayA","\\textcolor{##f6f7f7}{#1}"),S4("\\grayB","\\textcolor{##f0f1f2}{#1}"),S4("\\grayC","\\textcolor{##e3e5e6}{#1}"),S4("\\grayD","\\textcolor{##d6d8da}{#1}"),S4("\\grayE","\\textcolor{##babec2}{#1}"),S4("\\grayF","\\textcolor{##888d93}{#1}"),S4("\\grayG","\\textcolor{##626569}{#1}"),S4("\\grayH","\\textcolor{##3b3e40}{#1}"),S4("\\grayI","\\textcolor{##21242c}{#1}"),S4("\\kaBlue","\\textcolor{##314453}{#1}"),S4("\\kaGreen","\\textcolor{##71B307}{#1}");var Q1={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class U1{constructor(e,t,i){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new f1(b1,t.macros),this.mode=i,this.stack=[]}feed(e){this.lexer=new O1(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,i,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:n,end:i}=this.consumeArg(["]"]))}else({tokens:n,start:t,end:i}=this.consumeArg());return this.pushToken(new E4("EOF",i.loc)),this.pushTokens(n),new E4("",k4.range(t,i))}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],i=e&&e.length>0;i||this.consumeSpaces();var n,o=this.future(),r=0,s=0;do{if(n=this.popToken(),t.push(n),"{"===n.text)++r;else if("}"===n.text){if(-1===--r)throw new TX("Extra }",n)}else if("EOF"===n.text)throw new TX("Unexpected end of input in a macro argument, expected '"+(e&&i?e[s]:"}")+"'",n);if(e&&i)if((0===r||1===r&&"{"===e[s])&&n.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==r||i);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:n}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new TX("The length of delimiters doesn't match the number of args!");for(var i=t[0],n=0;n<i.length;n++){var o=this.popToken();if(i[n]!==o.text)throw new TX("Use of the macro doesn't match its definition",o)}}for(var r=[],s=0;s<e;s++)r.push(this.consumeArg(t&&t[s+1]).tokens);return r}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new TX("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),i=t.text,n=t.noexpand?null:this._getExpansion(i);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===i[0]&&!this.isDefined(i))throw new TX("Undefined control sequence: "+i);return this.pushToken(t),!1}this.countExpansion(1);var o=n.tokens,r=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(o=o.slice()).length-1;s>=0;--s){var a=o[s];if("#"===a.text){if(0===s)throw new TX("Incomplete placeholder at end of macro body",a);if("#"===(a=o[--s]).text)o.splice(s+1,1);else{if(!/^[1-9]$/.test(a.text))throw new TX("Not a valid argument number",a);o.splice(s,2,...r[+a.text-1])}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new E4(e)]):void 0}expandTokens(e){var t=[],i=this.stack.length;for(this.pushTokens(e);this.stack.length>i;)if(!1===this.expandOnce(!0)){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var i=this.lexer.catcodes[e];if(null!=i&&13!==i)return}var n="function"==typeof t?t(this):t;if("string"==typeof n){var o=0;if(n.includes("#"))for(var r=n.replace(/##/g,"");r.includes("#"+(o+1));)++o;for(var s=new O1(n,this.settings),a=[],l=s.lex();"EOF"!==l.text;)a.push(l),l=s.lex();return a.reverse(),{tokens:a,numArgs:o}}return n}isDefined(e){return this.macros.has(e)||j1.hasOwnProperty(e)||mq.math.hasOwnProperty(e)||mq.text.hasOwnProperty(e)||Q1.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:j1.hasOwnProperty(e)&&!j1[e].primitive}}var Y1=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Z1=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),_1={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},P1={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class V1{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new U1(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new TX("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new E4("}")),this.gullet.pushTokens(e);var i=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,i}parseExpression(e,t){for(var i=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(V1.endOfExpression.has(n.text))break;if(t&&n.text===t)break;if(e&&j1[n.text]&&j1[n.text].infix)break;var o=this.parseAtom(t);if(!o)break;"internal"!==o.type&&i.push(o)}return"text"===this.mode&&this.formLigatures(i),this.handleInfixNodes(i)}handleInfixNodes(e){for(var t,i=-1,n=0;n<e.length;n++){var o=e[n];if("infix"===o.type){if(-1!==i)throw new TX("only one infix operator per group",o.token);i=n,t=o.replaceWith}}if(-1!==i&&t){var r,s,a=e.slice(0,i),l=e.slice(i+1);return r=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},s=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[r,e[i],s],[]):this.callFunction(t,[r,s],[])]}return e}handleSupSubscript(e){var t,i=this.fetch(),n=i.text;this.consume(),this.consumeSpaces();do{var o;t=this.parseGroup(e)}while("internal"===(null==(o=t)?void 0:o.type));if(!t)throw new TX("Expected group after '"+n+"'",i);return t}formatUnsupportedCmd(e){for(var t=[],i=0;i<e.length;i++)t.push({type:"textord",mode:"text",text:e[i]});var n={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(e){var t,i,n=this.parseGroup("atom",e);if("internal"===(null==n?void 0:n.type))return n;if("text"===this.mode)return n;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(n&&"op"===n.type){var r="\\limits"===o.text;n.limits=r,n.alwaysHandleSupSub=!0}else{if(!n||"operatorname"!==n.type)throw new TX("Limit controls must follow a math operator",o);n.alwaysHandleSupSub&&(n.limits="\\limits"===o.text)}this.consume()}else if("^"===o.text){if(t)throw new TX("Double superscript",o);t=this.handleSupSubscript("superscript")}else if("_"===o.text){if(i)throw new TX("Double subscript",o);i=this.handleSupSubscript("subscript")}else if("'"===o.text){if(t)throw new TX("Double superscript",o);var s={type:"textord",mode:this.mode,text:"\\prime"},a=[s];for(this.consume();"'"===this.fetch().text;)a.push(s),this.consume();"^"===this.fetch().text&&a.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:a}}else{if(!Z1[o.text])break;var l=Y1.test(o.text),M=[];for(M.push(new E4(Z1[o.text])),this.consume();;){var c=this.fetch().text;if(!Z1[c])break;if(Y1.test(c)!==l)break;M.unshift(new E4(Z1[c])),this.consume()}var g=this.subparse(M);l?i={type:"ordgroup",mode:"math",body:g}:t={type:"ordgroup",mode:"math",body:g}}}return t||i?{type:"supsub",mode:this.mode,base:n,sup:t,sub:i}:n}parseFunction(e,t){var i=this.fetch(),n=i.text,o=j1[n];if(!o)return null;if(this.consume(),t&&"atom"!==t&&!o.allowedInArgument)throw new TX("Got function '"+n+"' with no arguments"+(t?" as "+t:""),i);if("text"===this.mode&&!o.allowedInText)throw new TX("Can't use function '"+n+"' in text mode",i);if("math"===this.mode&&!1===o.allowedInMath)throw new TX("Can't use function '"+n+"' in math mode",i);var{args:r,optArgs:s}=this.parseArguments(n,o);return this.callFunction(n,r,s,i,e)}callFunction(e,t,i,n,o){var r={funcName:e,parser:this,token:n,breakOnTokenText:o},s=j1[e];if(s&&s.handler)return s.handler(r,t,i);throw new TX("No function handler for "+e)}parseArguments(e,t){var i=t.numArgs+t.numOptionalArgs;if(0===i)return{args:[],optArgs:[]};for(var n=[],o=[],r=0;r<i;r++){var s=t.argTypes&&t.argTypes[r],a=r<t.numOptionalArgs;("primitive"in t&&t.primitive&&null==s||"sqrt"===t.type&&1===r&&null==o[0])&&(s="primitive");var l=this.parseGroupOfType("argument to '"+e+"'",s,a);if(a)o.push(l);else{if(null==l)throw new TX("Null argument, please report this as a bug");n.push(l)}}return{args:n,optArgs:o}}parseGroupOfType(e,t,i){switch(t){case"color":return this.parseColorGroup(i);case"size":return this.parseSizeGroup(i);case"url":return this.parseUrlGroup(i);case"math":case"text":return this.parseArgumentGroup(i,t);case"hbox":var n=this.parseArgumentGroup(i,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],style:"text",resetFont:!0}:null;case"raw":var o=this.parseStringGroup("raw",i);return null!=o?{type:"raw",mode:"text",string:o.text}:null;case"primitive":if(i)throw new TX("A primitive argument cannot be optional");var r=this.parseGroup(e);if(null==r)throw new TX("Expected group as "+e,this.fetch());return r;case"original":case null:case void 0:return this.parseArgumentGroup(i);default:throw new TX("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var i=this.gullet.scanArgument(t);if(null==i)return null;for(var n,o="";"EOF"!==(n=this.fetch()).text;)o+=n.text,this.consume();return this.consume(),i.text=o,i}parseRegexGroup(e,t){for(var i,n=this.fetch(),o=n,r="";"EOF"!==(i=this.fetch()).text&&e.test(r+i.text);)r+=(o=i).text,this.consume();if(""===r)throw new TX("Invalid "+t+": '"+n.text+"'",n);return n.range(o,r)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var i=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!i)throw new TX("Invalid color: '"+t.text+"'",t);var n=i[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}}parseSizeGroup(e){var t,i=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",i=!0);var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!n)throw new TX("Invalid size: '"+t.text+"'",t);var o={number:+(n[1]+n[2]),unit:n[3]};if(!KX(o))throw new TX("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:i}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var i=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:i}}parseArgumentGroup(e,t){var i=this.gullet.scanArgument(e);if(null==i)return null;var n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var r={type:"ordgroup",mode:this.mode,loc:i.loc,body:o};return t&&this.switchMode(n),r}parseGroup(e,t){var i,n=this.fetch(),o=n.text;if("{"===o||"\\begingroup"===o){this.consume();var r="{"===o?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,r),a=this.fetch();this.expect(r),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:k4.range(n,a),body:s,semisimple:"\\begingroup"===o||void 0}}else if(null==(i=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===o[0]&&!Q1.hasOwnProperty(o)){if(this.settings.throwOnError)throw new TX("Undefined control sequence: "+o,n);i=this.formatUnsupportedCmd(o),this.consume()}return i}formLigatures(e){for(var t=e.length-1,i=0;i<t;++i){var n=e[i];if("textord"===n.type){var o=n.text,r=e[i+1];if(r&&"textord"===r.type){if("-"===o&&"-"===r.text){var s=e[i+2];i+1<t&&s&&"textord"===s.type&&"-"===s.text?(e.splice(i,3,{type:"textord",mode:"text",loc:k4.range(n,s),text:"---"}),t-=2):(e.splice(i,2,{type:"textord",mode:"text",loc:k4.range(n,r),text:"--"}),t-=1)}"'"!==o&&"`"!==o||r.text!==o||(e.splice(i,2,{type:"textord",mode:"text",loc:k4.range(n,r),text:o+o}),t-=1)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var i=t.slice(5),n="*"===i.charAt(0);if(n&&(i=i.slice(1)),i.length<2||i.charAt(0)!==i.slice(-1))throw new TX("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:i=i.slice(1,-1),star:n}}P1.hasOwnProperty(t[0])&&!mq[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=P1[t[0]]+t.slice(1));var o,r=x1.exec(t);if(r&&("i"===(t=t.substring(0,r.index))?t="ı":"j"===t&&(t="ȷ")),mq[this.mode][t]){this.settings.strict&&"math"===this.mode&&eK.includes(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s=mq[this.mode][t].group,a=k4.range(e);o=s in v0?{type:"atom",mode:this.mode,family:s,loc:a,text:t}:{type:s,mode:this.mode,loc:a,text:t}}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&($X(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:k4.range(e),text:t}}if(this.consume(),r)for(var l=0;l<r[0].length;l++){var M=r[0][l];if(!_1[M])throw new TX("Unknown accent ' "+M+"'",e);var c=_1[M][this.mode]||_1[M].text;if(!c)throw new TX("Accent "+M+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:k4.range(e),label:c,isStretchy:!1,isShifty:!0,base:o}}return o}}V1.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var R1=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var i=new V1(e,t);delete i.gullet.macros.current["\\df@tag"];var n=i.parse();if(delete i.gullet.macros.current["\\current@color"],delete i.gullet.macros.current["\\color"],i.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new TX("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:i.subparse([new E4("\\df@tag")])}]}return n},W1=function(e,t,i){t.textContent="";var n=G1(e,i).toNode();t.appendChild(n)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),W1=function(){throw new TX("KaTeX doesn't work in quirks mode.")});var B1=function(e,t){return G1(e,t).toMarkup()},$1=function(e,t){var i=new EX(t);return R1(e,i)},F1=function(e,t,i){if(i.throwOnError||!(e instanceof TX))throw e;var n=TK(["katex-error"],[new uq(t)]);return n.setAttribute("title",e.toString()),n.setAttribute("style","color:"+i.errorColor),n},G1=function(e,t){var i=new EX(t);try{return function(e,t,i){var n,o=x0(i);if("mathml"===i.output)return I0(e,t,o,i.displayMode,!0);if("html"===i.output){var r=o0(e,o);n=TK(["katex"],[r])}else{var s=I0(e,t,o,i.displayMode,!1),a=o0(e,o);n=TK(["katex"],[s,a])}return A0(n,i)}(R1(e,i),e,i)}catch(t){return F1(t,e,i)}},H1=function(e,t){var i=new EX(t);try{return function(e,t,i){var n=o0(e,x0(i)),o=TK(["katex"],[n]);return A0(o,i)}(R1(e,i),0,i)}catch(t){return F1(t,e,i)}},J1="0.16.47",X1={Span:lq,Anchor:Mq,SymbolNode:uq,SvgNode:dq,PathNode:hq,LineNode:Nq},q1={version:J1,render:W1,renderToString:B1,ParseError:TX,SETTINGS_SCHEMA:vX,__parse:$1,__renderToDomTree:G1,__renderToHTMLTree:H1,__setFontMetrics:Iq,__defineSymbol:Tq,__defineFunction:VK,__defineMacro:S4,__domTree:X1},K1=Object.freeze({__proto__:null,ParseError:TX,SETTINGS_SCHEMA:vX,__defineFunction:VK,__defineMacro:S4,__defineSymbol:Tq,__domTree:X1,__parse:$1,__renderToDomTree:G1,__renderToHTMLTree:H1,__setFontMetrics:Iq,default:q1,get render(){return W1},renderToString:B1,version:J1});export{LJ as DEFAULT_TOOLBAR,GL as NileAccordion,jS as NileAppShell,bS as NileAppShellMain,mS as NileAppShellNavToggle,wS as NileAppShellPanel,OS as NileAppShellSideNav,ja as NileAutoComplete,gL as NileAvatar,St as NileBadge,Ob as NileBreadcrumb,bb as NileBreadcrumbItem,Xe as NileButton,$b as NileButtonFilter,Ql as NileButtonToggle,Yl as NileButtonToggleGroup,ul as NileCalendar,Sb as NileCard,Yb as NileCarousel,Eb as NileCarouselItem,oi as NileCheckbox,si as NileCheckboxGroup,tl as NileChip,Gb as NileCircularProgressbar,jb as NileCodeEditor,NS as NileColorPicker,cS as NileColorSwatch,Ka as NileCombobox,CE as NileCommandMenu,UE as NileCommandMenuGroup,ZE as NileCommandMenuItem,$l as NileContentEditor,wE as NileContextMenu,pE as NileContextMenuGroup,yE as NileContextMenuItem,al as NileDatePicker,Ok as NileDetail,Gl as NileDialog,JL as NileDivider,AL as NileDotStepper,ii as NileDrawer,ha as NileDropdown,DL as NileEmptyState,Ml as NileErrorMessage,Jl as NileErrorNotification,rv as NileFilePreview,Ww as NileFileUpload,uw as NileFilterChip,uE as NileFloatingPanel,Tt as NileFormErrorMessage,wb as NileFormGroup,zt as NileFormHelpText,vL as NileFormatDate,fv as NileGrid,Lv as NileGridBody,Cv as NileGridCellItem,Uv as NileGridHead,kv as NileGridHeadItem,vv as NileGridRow,qe as NileHeading,IL as NileHero,fL as NileHeroHeader,Se as NileIcon,Lt as NileIconButton,aw as NileInlineEdit,uk as NileInlineSidebar,ck as NileInlineSidebarGroup,hk as NileInlineSidebarItem,RE as NileInlineSidebarItemBody,PE as NileInlineSidebarItemHeader,pk as NileInlineSidebarPanel,yk as NileInlineSidebarPanelGroup,ct as NileInput,kl as NileLink,$L as NileList,WL as NileListItem,Sn as NileLoader,oQ as NileMarkdown,MQ as NileMarkdownEditor,Ot as NileMenu,la as NileMenuItem,iE as NileNavTab,oE as NileNavTabGroup,aE as NileNavTabPanel,sa as NileOption,av as NileOptionGroup,xt as NileOtpInput,dL as NilePageHeader,Nw as NilePagination,Wb as NilePopover,An as NilePopup,En as NileProgressBar,Kk as NileQrCode,li as NileRadio,ci as NileRadioGroup,lS as NileRichTextEditor,ew as NileSectionMessage,Ns as NileSegmentedProgressBar,oa as NileSelect,SS as NileSideBar,ik as NileSideBarAction,lk as NileSideBarActionMenu,sk as NileSideBarActionMenuItem,YS as NileSideBarExpand,GS as NileSideBarFooter,JS as NileSideBarFooterItem,ok as NileSideBarFooterText,_S as NileSideBarGroup,VS as NileSideBarGroupItem,WS as NileSideBarGroupItemIcon,$S as NileSideBarGroupItemText,ES as NileSideBarHeader,QS as NileSideBarLogo,jk as NileSideBarPanel,Is as NileSkeletonLoader,wn as NileSlideToggle,Tw as NileSlider,Ds as NileSpinner,EL as NileSplitPanel,Et as NileStatusLight,TL as NileStepper,zL as NileStepperItem,Wl as NileSwitcher,tM as NileTab,ql as NileTabGroup,oM as NileTabPanel,Mw as NileTable,aL as NileTableBody,nL as NileTableCellItem,ML as NileTableHeaderItem,rL as NileTableRow,ms as NileTag,nl as NileTextarea,wl as NileTimestampBuilder,qL as NileTitle,xb as NileToast,iw as NileToolbar,bn as NileTooltip,VL as NileTree,ZL as NileTreeItem,LL as NileVerticalStepperItem,ta as NileVirtualSelect,_J as NileWysiwygBubbleItem,ZJ as NileWysiwygBubbleMenu,JJ as NileWysiwygCodeMenu,uX as NileWysiwygEditor,GJ as NileWysiwygEmbedPanel,BJ as NileWysiwygFindBar,tX as NileWysiwygImageMenu,PJ as NileWysiwygImagePanel,aX as NileWysiwygInsertMenu,QJ as NileWysiwygLinkEditor,lX as NileWysiwygMathPanel,KJ as NileWysiwygShortcutHelp,FJ as NileWysiwygSourceView,rX as NileWysiwygSpecialChars,WJ as NileWysiwygSuggestList,RJ as NileWysiwygTableMenu,SJ as NileWysiwygTablePicker,EJ as NileWysiwygToolbar,CJ as NileWysiwygToolbarItem,hs as NileliteTooltip,c$ as buildPrintDocument,M$ as buildWordDocument,f$ as computeToolbarState,fJ as createEditorState,dX as createKatexRenderer,nW as createSchema,oW as defaultSchema,xW as docToHtml,OW as docToJson,kB as docToMarkdown,mW as htmlToDoc,fW as jsonToDoc,JB as looksLikeMarkdown,HB as markdownToHtml,yW as sanitizeHtml,a$ as toInlineStyledHtml};
|
|
28839
|
+
*/function bq(e){return"horizontal"===e?"marginLeft":"marginTop"}function Lq(e){return"horizontal"===e?"marginRight":"marginBottom"}function wq(e){return"horizontal"===e?"xOffset":"yOffset"}function vq(e,t){const i=[e,t].sort();return i[1]<=0?Math.min(...i):i[0]>=0?Math.max(...i):i[0]+i[1]}class Sq{constructor(){this._childSizeCache=new Aq,this._marginSizeCache=new Aq,this._metricsCache=new Map}update(e,t){const i=new Set;Object.keys(e).forEach((n=>{const o=Number(n);this._metricsCache.set(o,e[o]),this._childSizeCache.set(o,e[o][Oq(t)]),i.add(o),i.add(o+1)}));for(const e of i){const i=this._metricsCache.get(e)?.[bq(t)]||0,n=this._metricsCache.get(e-1)?.[Lq(t)]||0;this._marginSizeCache.set(e,vq(i,n))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(e,t){return this._metricsCache.get(e)?.[bq(t)]||0}getChildSize(e){return this._childSizeCache.getSize(e)}getMarginSize(e){return this._marginSizeCache.getSize(e)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}}var kq=Object.freeze({__proto__:null,FlowLayout:class extends fq{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new Sq,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(e){this._metricsCache.update(e,this.direction),this._scheduleReflow()}_getPhysicalItem(e){return this._newPhysicalItems.get(e)??this._physicalItems.get(e)}_getSize(e){return this._getPhysicalItem(e)&&this._metricsCache.getChildSize(e)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(e){const t=this._metricsCache;if(-1===this._first||-1===this._last)return t.averageMarginSize+e*(t.averageMarginSize+this._getAverageSize());if(e<this._first){const i=this._first-e;return this._getPhysicalItem(this._first).pos-(t.getMarginSize(this._first-1)||t.averageMarginSize)-(i*t.averageChildSize+(i-1)*t.averageMarginSize)}{const i=e-this._last;return this._getPhysicalItem(this._last).pos+(t.getChildSize(this._last)||t.averageChildSize)+(t.getMarginSize(this._last)||t.averageMarginSize)+i*(t.averageChildSize+t.averageMarginSize)}}_getPosition(e){const t=this._getPhysicalItem(e),{averageMarginSize:i}=this._metricsCache;return 0===e?this._metricsCache.getMarginSize(0)??i:t?t.pos:this._estimatePosition(e)}_calculateAnchor(e,t){return e<=0?0:t>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((e+t)/2/this._delta)))}_getAnchor(e,t){if(0===this._physicalItems.size)return this._calculateAnchor(e,t);if(this._first<0)return this._calculateAnchor(e,t);if(this._last<0)return this._calculateAnchor(e,t);const i=this._getPhysicalItem(this._first),n=this._getPhysicalItem(this._last),o=i.pos;if(n.pos+this._metricsCache.getChildSize(this._last)<e)return this._calculateAnchor(e,t);if(o>t)return this._calculateAnchor(e,t);let r=this._firstVisible-1,s=-1/0;for(;s<e;){s=this._getPhysicalItem(++r).pos+this._metricsCache.getChildSize(r)}return r}_getActiveItems(){0===this._viewDim1||0===this.items.length?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;const e=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=e,this._stable=!0}_getItems(){const e=this._newPhysicalItems;let t,i;if(this._stable=!0,null!==this.pin){const{index:e}=this.pin;this._anchorIdx=e,this._anchorPos=this._getPosition(e)}if(t=this._scrollPosition-this._overhang,i=this._scrollPosition+this._viewDim1+this._overhang,i<0||t>this._scrollSize)return void this._clearItems();null!==this._anchorIdx&&null!==this._anchorPos||(this._anchorIdx=this._getAnchor(t,i),this._anchorPos=this._getPosition(this._anchorIdx));let n=this._getSize(this._anchorIdx);void 0===n&&(this._stable=!1,n=this._getAverageSize());const o=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,r=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;0===this._anchorIdx&&(this._anchorPos=o),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-r-n);let s=0;for(this._anchorPos+n+r<t&&(s=t-(this._anchorPos+n+r)),this._anchorPos-o>i&&(s=i-(this._anchorPos-o)),s&&(this._scrollPosition-=s,t-=s,i-=s,this._scrollError+=s),e.set(this._anchorIdx,{pos:this._anchorPos,size:n}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-o,this._physicalMax=this._anchorPos+n+r;this._physicalMin>t&&this._first>0;){let t=this._getSize(--this._first);void 0===t&&(this._stable=!1,t=this._getAverageSize());let i=this._metricsCache.getMarginSize(this._first);void 0===i&&(this._stable=!1,i=this._metricsCache.averageMarginSize),this._physicalMin-=t;const n=this._physicalMin;if(e.set(this._first,{pos:n,size:t}),this._physicalMin-=i,!1===this._stable&&!1===this._estimate)break}for(;this._physicalMax<i&&this._last<this.items.length-1;){let t=this._getSize(++this._last);void 0===t&&(this._stable=!1,t=this._getAverageSize());let i=this._metricsCache.getMarginSize(this._last);void 0===i&&(this._stable=!1,i=this._metricsCache.averageMarginSize);const n=this._physicalMax;if(e.set(this._last,{pos:n,size:t}),this._physicalMax+=t+i,!this._stable&&!this._estimate)break}const a=this._calculateError();a&&(this._physicalMin-=a,this._physicalMax-=a,this._anchorPos-=a,this._scrollPosition-=a,e.forEach((e=>e.pos-=a)),this._scrollError+=a),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=e)}_calculateError(){return 0===this._first?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){const{_first:e,_last:t}=this;super._reflow(),(-1===this._first&&-1==this._last||this._first===e&&this._last===t)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){const{averageMarginSize:e}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(e+this._getAverageSize())+e)}get _delta(){const{averageMarginSize:e}=this._metricsCache;return this._getAverageSize()+e}_getItemPosition(e){return{[this._positionDim]:this._getPosition(e),[this._secondaryPositionDim]:0,[wq(this.direction)]:-(this._metricsCache.getLeadingMarginValue(e,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(e){return{[this._sizeDim]:this._getSize(e)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});class Eq extends Error{constructor(e,t){var i,n,o="KaTeX parse error: "+e,r=t&&t.loc;if(r&&r.start<=r.end){var s=r.lexer.input;i=r.start,n=r.end,i===s.length?o+=" at end of input: ":o+=" at position "+(i+1)+": ";var a=s.slice(i,n).replace(/[^]/g,"$&̲");o+=(i>15?"…"+s.slice(i-15,i):s.slice(0,i))+a+(n+15<s.length?s.slice(n,n+15)+"…":s.slice(n))}super(o),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,Eq.prototype),this.position=i,null!=i&&null!=n&&(this.length=n-i),this.rawMessage=e}}var Cq=/([A-Z])/g,Qq={"&":"&",">":">","<":"<",'"':""","'":"'"},Uq=/[&><"']/g,Yq=e=>String(e).replace(Uq,(e=>Qq[e])),Zq=e=>"ordgroup"===e.type||"color"===e.type?1===e.body.length?Zq(e.body[0]):e:"font"===e.type?Zq(e.body):e,_q=new Set(["mathord","textord","atom"]),Pq=e=>_q.has(Zq(e).type),Vq={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Rq(e){return void 0!==e.default?e.default:function(e){if("string"!=typeof e)return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}(Array.isArray(e.type)?e.type[0]:e.type)}function Wq(e,t,i,n){var o=i[t];e[t]=void 0!==o?n.processor?n.processor(o):o:Rq(n)}class Bq{constructor(e){for(var t of(void 0===e&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Object.keys(Vq))){var i=Vq[t];i&&Wq(this,t,e,i)}}reportNonstrict(e,t,i){var n=this.strict;if("function"==typeof n&&(n=n(e,t,i)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new Eq("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",i);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,i){var n=this.strict;if("function"==typeof n)try{n=n(e,t,i)}catch(e){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=(e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"})(e.url);if(null==t)return!1;e.protocol=t}var i="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(i)}}class $q{constructor(e,t,i){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=i}sup(){return Fq[Gq[this.id]]}sub(){return Fq[Hq[this.id]]}fracNum(){return Fq[Jq[this.id]]}fracDen(){return Fq[Xq[this.id]]}cramp(){return Fq[qq[this.id]]}text(){return Fq[Kq[this.id]]}isTight(){return this.size>=2}}var Fq=[new $q(0,0,!1),new $q(1,0,!0),new $q(2,1,!1),new $q(3,1,!0),new $q(4,2,!1),new $q(5,2,!0),new $q(6,3,!1),new $q(7,3,!0)],Gq=[4,5,4,5,6,7,6,7],Hq=[5,5,5,5,7,7,7,7],Jq=[2,3,4,5,6,7,6,7],Xq=[3,3,5,5,7,7,7,7],qq=[1,1,3,3,5,5,7,7],Kq=[0,1,2,3,2,3,2,3],eK={DISPLAY:Fq[0],TEXT:Fq[2],SCRIPT:Fq[4],SCRIPTSCRIPT:Fq[6]},tK=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var iK=[];function nK(e){for(var t=0;t<iK.length;t+=2)if(e>=iK[t]&&e<=iK[t+1])return!0;return!1}tK.forEach((e=>e.blocks.forEach((e=>iK.push(...e)))));var oK=e=>e+" "+e,rK=80,sK={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:oK("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:oK("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:oK("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:oK("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:oK("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:oK("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:oK("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:oK("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class aK{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>{if("toText"in e)return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)})).join("")}}var lK={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},MK={ex:!0,em:!0,mu:!0},cK=function(e){return"string"!=typeof e&&(e=e.unit),e in lK||e in MK||"ex"===e},gK=function(e,t){var i;if(e.unit in lK)i=lK[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)i=t.fontMetrics().cssEmPerMu;else{var n;if(n=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)i=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new Eq("Invalid unit: '"+e.unit+"'");i=n.fontMetrics().quad}n!==t&&(i*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*i,t.maxSize)},uK=function(e){return+e.toFixed(4)+"em"},dK=function(e){return e.filter((e=>e)).join(" ")},hK=function(e){var t="";for(var i of Object.keys(e)){var n=e[i];void 0!==n&&(t+=i.replace(Cq,"-$1").toLowerCase()+":"+n+";")}return t},NK=function(e,t,i){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=i||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},pK=function(e){var t=document.createElement(e);for(var i of(t.className=dK(this.classes),Object.assign(t.style,this.style),Object.keys(this.attributes)))t.setAttribute(i,this.attributes[i]);for(var n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t},DK=/[\s"'>/=\x00-\x1f]/,yK=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Yq(dK(this.classes))+'"');var i=hK(this.style);for(var n of(i&&(t+=' style="'+Yq(i)+'"'),Object.keys(this.attributes))){if(DK.test(n))throw new Eq("Invalid attribute name '"+n+"'");t+=" "+n+'="'+Yq(this.attributes[n])+'"'}t+=">";for(var o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+="</"+e+">"};class IK{constructor(e,t,i,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,NK.call(this,e,i,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return pK.call(this,"span")}toMarkup(){return yK.call(this,"span")}}class jK{constructor(e,t,i,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,NK.call(this,t,n),this.children=i||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return pK.call(this,"a")}toMarkup(){return yK.call(this,"a")}}class zK{constructor(e,t,i){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=i}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e='<img src="'+Yq(this.src)+'" alt="'+Yq(this.alt)+'"',t=hK(this.style);return t&&(e+=' style="'+Yq(t)+'"'),e+="'/>"}}var mK={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class TK{constructor(e,t,i,n,o,r,s,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=i||0,this.italic=n||0,this.skew=o||0,this.width=r||0,this.classes=s||[],this.style=a||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<tK.length;t++)for(var i=tK[t],n=0;n<i.blocks.length;n++){var o=i.blocks[n];if(e>=o[0]&&e<=o[1])return i.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=mK[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&((t=document.createElement("span")).style.marginRight=uK(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=dK(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Yq(dK(this.classes)),t+='"');var i="";this.italic>0&&(i+="margin-right:"+uK(this.italic)+";"),(i+=hK(this.style))&&(e=!0,t+=' style="'+Yq(i)+'"');var n=Yq(this.text);return e?(t+=">",t+=n,t+="</span>"):n}}class xK{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var i=0;i<this.children.length;i++)e.appendChild(this.children[i].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t of Object.keys(this.attributes))e+=" "+t+'="'+Yq(this.attributes[t])+'"';e+=">";for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+="</svg>"}}class AK{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",sK[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+Yq(this.alternate)+'"/>':'<path d="'+Yq(sK[this.pathName])+'"/>'}}class OK{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t of Object.keys(this.attributes))e+=" "+t+'="'+Yq(this.attributes[t])+'"';return e+="/>"}}var fK={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},bK={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},LK={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function wK(e,t){fK[e]=t}function vK(e,t,i){if(!fK[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),o=fK[t][n];if(!o&&e[0]in LK&&(n=LK[e[0]].charCodeAt(0),o=fK[t][n]),o||"text"!==i||nK(n)&&(o=fK[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var SK={};var kK={math:{},text:{}};function EK(e,t,i,n,o,r){kK[e][o]={font:t,group:i,replace:n},r&&n&&(kK[e][n]=kK[e][o])}var CK="math",QK="text",UK="main",YK="ams",ZK="accent-token",_K="bin",PK="close",VK="inner",RK="mathord",WK="op-token",BK="open",$K="punct",FK="rel",GK="spacing",HK="textord";EK(CK,UK,FK,"≡","\\equiv",!0),EK(CK,UK,FK,"≺","\\prec",!0),EK(CK,UK,FK,"≻","\\succ",!0),EK(CK,UK,FK,"∼","\\sim",!0),EK(CK,UK,FK,"⊥","\\perp"),EK(CK,UK,FK,"⪯","\\preceq",!0),EK(CK,UK,FK,"⪰","\\succeq",!0),EK(CK,UK,FK,"≃","\\simeq",!0),EK(CK,UK,FK,"∣","\\mid",!0),EK(CK,UK,FK,"≪","\\ll",!0),EK(CK,UK,FK,"≫","\\gg",!0),EK(CK,UK,FK,"≍","\\asymp",!0),EK(CK,UK,FK,"∥","\\parallel"),EK(CK,UK,FK,"⋈","\\bowtie",!0),EK(CK,UK,FK,"⌣","\\smile",!0),EK(CK,UK,FK,"⊑","\\sqsubseteq",!0),EK(CK,UK,FK,"⊒","\\sqsupseteq",!0),EK(CK,UK,FK,"≐","\\doteq",!0),EK(CK,UK,FK,"⌢","\\frown",!0),EK(CK,UK,FK,"∋","\\ni",!0),EK(CK,UK,FK,"∝","\\propto",!0),EK(CK,UK,FK,"⊢","\\vdash",!0),EK(CK,UK,FK,"⊣","\\dashv",!0),EK(CK,UK,FK,"∋","\\owns"),EK(CK,UK,$K,".","\\ldotp"),EK(CK,UK,$K,"⋅","\\cdotp"),EK(CK,UK,$K,"⋅","·"),EK(QK,UK,HK,"⋅","·"),EK(CK,UK,HK,"#","\\#"),EK(QK,UK,HK,"#","\\#"),EK(CK,UK,HK,"&","\\&"),EK(QK,UK,HK,"&","\\&"),EK(CK,UK,HK,"ℵ","\\aleph",!0),EK(CK,UK,HK,"∀","\\forall",!0),EK(CK,UK,HK,"ℏ","\\hbar",!0),EK(CK,UK,HK,"∃","\\exists",!0),EK(CK,UK,HK,"∇","\\nabla",!0),EK(CK,UK,HK,"♭","\\flat",!0),EK(CK,UK,HK,"ℓ","\\ell",!0),EK(CK,UK,HK,"♮","\\natural",!0),EK(CK,UK,HK,"♣","\\clubsuit",!0),EK(CK,UK,HK,"℘","\\wp",!0),EK(CK,UK,HK,"♯","\\sharp",!0),EK(CK,UK,HK,"♢","\\diamondsuit",!0),EK(CK,UK,HK,"ℜ","\\Re",!0),EK(CK,UK,HK,"♡","\\heartsuit",!0),EK(CK,UK,HK,"ℑ","\\Im",!0),EK(CK,UK,HK,"♠","\\spadesuit",!0),EK(CK,UK,HK,"§","\\S",!0),EK(QK,UK,HK,"§","\\S"),EK(CK,UK,HK,"¶","\\P",!0),EK(QK,UK,HK,"¶","\\P"),EK(CK,UK,HK,"†","\\dag"),EK(QK,UK,HK,"†","\\dag"),EK(QK,UK,HK,"†","\\textdagger"),EK(CK,UK,HK,"‡","\\ddag"),EK(QK,UK,HK,"‡","\\ddag"),EK(QK,UK,HK,"‡","\\textdaggerdbl"),EK(CK,UK,PK,"⎱","\\rmoustache",!0),EK(CK,UK,BK,"⎰","\\lmoustache",!0),EK(CK,UK,PK,"⟯","\\rgroup",!0),EK(CK,UK,BK,"⟮","\\lgroup",!0),EK(CK,UK,_K,"∓","\\mp",!0),EK(CK,UK,_K,"⊖","\\ominus",!0),EK(CK,UK,_K,"⊎","\\uplus",!0),EK(CK,UK,_K,"⊓","\\sqcap",!0),EK(CK,UK,_K,"∗","\\ast"),EK(CK,UK,_K,"⊔","\\sqcup",!0),EK(CK,UK,_K,"◯","\\bigcirc",!0),EK(CK,UK,_K,"∙","\\bullet",!0),EK(CK,UK,_K,"‡","\\ddagger"),EK(CK,UK,_K,"≀","\\wr",!0),EK(CK,UK,_K,"⨿","\\amalg"),EK(CK,UK,_K,"&","\\And"),EK(CK,UK,FK,"⟵","\\longleftarrow",!0),EK(CK,UK,FK,"⇐","\\Leftarrow",!0),EK(CK,UK,FK,"⟸","\\Longleftarrow",!0),EK(CK,UK,FK,"⟶","\\longrightarrow",!0),EK(CK,UK,FK,"⇒","\\Rightarrow",!0),EK(CK,UK,FK,"⟹","\\Longrightarrow",!0),EK(CK,UK,FK,"↔","\\leftrightarrow",!0),EK(CK,UK,FK,"⟷","\\longleftrightarrow",!0),EK(CK,UK,FK,"⇔","\\Leftrightarrow",!0),EK(CK,UK,FK,"⟺","\\Longleftrightarrow",!0),EK(CK,UK,FK,"↦","\\mapsto",!0),EK(CK,UK,FK,"⟼","\\longmapsto",!0),EK(CK,UK,FK,"↗","\\nearrow",!0),EK(CK,UK,FK,"↩","\\hookleftarrow",!0),EK(CK,UK,FK,"↪","\\hookrightarrow",!0),EK(CK,UK,FK,"↘","\\searrow",!0),EK(CK,UK,FK,"↼","\\leftharpoonup",!0),EK(CK,UK,FK,"⇀","\\rightharpoonup",!0),EK(CK,UK,FK,"↙","\\swarrow",!0),EK(CK,UK,FK,"↽","\\leftharpoondown",!0),EK(CK,UK,FK,"⇁","\\rightharpoondown",!0),EK(CK,UK,FK,"↖","\\nwarrow",!0),EK(CK,UK,FK,"⇌","\\rightleftharpoons",!0),EK(CK,YK,FK,"≮","\\nless",!0),EK(CK,YK,FK,"","\\@nleqslant"),EK(CK,YK,FK,"","\\@nleqq"),EK(CK,YK,FK,"⪇","\\lneq",!0),EK(CK,YK,FK,"≨","\\lneqq",!0),EK(CK,YK,FK,"","\\@lvertneqq"),EK(CK,YK,FK,"⋦","\\lnsim",!0),EK(CK,YK,FK,"⪉","\\lnapprox",!0),EK(CK,YK,FK,"⊀","\\nprec",!0),EK(CK,YK,FK,"⋠","\\npreceq",!0),EK(CK,YK,FK,"⋨","\\precnsim",!0),EK(CK,YK,FK,"⪹","\\precnapprox",!0),EK(CK,YK,FK,"≁","\\nsim",!0),EK(CK,YK,FK,"","\\@nshortmid"),EK(CK,YK,FK,"∤","\\nmid",!0),EK(CK,YK,FK,"⊬","\\nvdash",!0),EK(CK,YK,FK,"⊭","\\nvDash",!0),EK(CK,YK,FK,"⋪","\\ntriangleleft"),EK(CK,YK,FK,"⋬","\\ntrianglelefteq",!0),EK(CK,YK,FK,"⊊","\\subsetneq",!0),EK(CK,YK,FK,"","\\@varsubsetneq"),EK(CK,YK,FK,"⫋","\\subsetneqq",!0),EK(CK,YK,FK,"","\\@varsubsetneqq"),EK(CK,YK,FK,"≯","\\ngtr",!0),EK(CK,YK,FK,"","\\@ngeqslant"),EK(CK,YK,FK,"","\\@ngeqq"),EK(CK,YK,FK,"⪈","\\gneq",!0),EK(CK,YK,FK,"≩","\\gneqq",!0),EK(CK,YK,FK,"","\\@gvertneqq"),EK(CK,YK,FK,"⋧","\\gnsim",!0),EK(CK,YK,FK,"⪊","\\gnapprox",!0),EK(CK,YK,FK,"⊁","\\nsucc",!0),EK(CK,YK,FK,"⋡","\\nsucceq",!0),EK(CK,YK,FK,"⋩","\\succnsim",!0),EK(CK,YK,FK,"⪺","\\succnapprox",!0),EK(CK,YK,FK,"≆","\\ncong",!0),EK(CK,YK,FK,"","\\@nshortparallel"),EK(CK,YK,FK,"∦","\\nparallel",!0),EK(CK,YK,FK,"⊯","\\nVDash",!0),EK(CK,YK,FK,"⋫","\\ntriangleright"),EK(CK,YK,FK,"⋭","\\ntrianglerighteq",!0),EK(CK,YK,FK,"","\\@nsupseteqq"),EK(CK,YK,FK,"⊋","\\supsetneq",!0),EK(CK,YK,FK,"","\\@varsupsetneq"),EK(CK,YK,FK,"⫌","\\supsetneqq",!0),EK(CK,YK,FK,"","\\@varsupsetneqq"),EK(CK,YK,FK,"⊮","\\nVdash",!0),EK(CK,YK,FK,"⪵","\\precneqq",!0),EK(CK,YK,FK,"⪶","\\succneqq",!0),EK(CK,YK,FK,"","\\@nsubseteqq"),EK(CK,YK,_K,"⊴","\\unlhd"),EK(CK,YK,_K,"⊵","\\unrhd"),EK(CK,YK,FK,"↚","\\nleftarrow",!0),EK(CK,YK,FK,"↛","\\nrightarrow",!0),EK(CK,YK,FK,"⇍","\\nLeftarrow",!0),EK(CK,YK,FK,"⇏","\\nRightarrow",!0),EK(CK,YK,FK,"↮","\\nleftrightarrow",!0),EK(CK,YK,FK,"⇎","\\nLeftrightarrow",!0),EK(CK,YK,FK,"△","\\vartriangle"),EK(CK,YK,HK,"ℏ","\\hslash"),EK(CK,YK,HK,"▽","\\triangledown"),EK(CK,YK,HK,"◊","\\lozenge"),EK(CK,YK,HK,"Ⓢ","\\circledS"),EK(CK,YK,HK,"®","\\circledR"),EK(QK,YK,HK,"®","\\circledR"),EK(CK,YK,HK,"∡","\\measuredangle",!0),EK(CK,YK,HK,"∄","\\nexists"),EK(CK,YK,HK,"℧","\\mho"),EK(CK,YK,HK,"Ⅎ","\\Finv",!0),EK(CK,YK,HK,"⅁","\\Game",!0),EK(CK,YK,HK,"‵","\\backprime"),EK(CK,YK,HK,"▲","\\blacktriangle"),EK(CK,YK,HK,"▼","\\blacktriangledown"),EK(CK,YK,HK,"■","\\blacksquare"),EK(CK,YK,HK,"⧫","\\blacklozenge"),EK(CK,YK,HK,"★","\\bigstar"),EK(CK,YK,HK,"∢","\\sphericalangle",!0),EK(CK,YK,HK,"∁","\\complement",!0),EK(CK,YK,HK,"ð","\\eth",!0),EK(QK,UK,HK,"ð","ð"),EK(CK,YK,HK,"╱","\\diagup"),EK(CK,YK,HK,"╲","\\diagdown"),EK(CK,YK,HK,"□","\\square"),EK(CK,YK,HK,"□","\\Box"),EK(CK,YK,HK,"◊","\\Diamond"),EK(CK,YK,HK,"¥","\\yen",!0),EK(QK,YK,HK,"¥","\\yen",!0),EK(CK,YK,HK,"✓","\\checkmark",!0),EK(QK,YK,HK,"✓","\\checkmark"),EK(CK,YK,HK,"ℶ","\\beth",!0),EK(CK,YK,HK,"ℸ","\\daleth",!0),EK(CK,YK,HK,"ℷ","\\gimel",!0),EK(CK,YK,HK,"ϝ","\\digamma",!0),EK(CK,YK,HK,"ϰ","\\varkappa"),EK(CK,YK,BK,"┌","\\@ulcorner",!0),EK(CK,YK,PK,"┐","\\@urcorner",!0),EK(CK,YK,BK,"└","\\@llcorner",!0),EK(CK,YK,PK,"┘","\\@lrcorner",!0),EK(CK,YK,FK,"≦","\\leqq",!0),EK(CK,YK,FK,"⩽","\\leqslant",!0),EK(CK,YK,FK,"⪕","\\eqslantless",!0),EK(CK,YK,FK,"≲","\\lesssim",!0),EK(CK,YK,FK,"⪅","\\lessapprox",!0),EK(CK,YK,FK,"≊","\\approxeq",!0),EK(CK,YK,_K,"⋖","\\lessdot"),EK(CK,YK,FK,"⋘","\\lll",!0),EK(CK,YK,FK,"≶","\\lessgtr",!0),EK(CK,YK,FK,"⋚","\\lesseqgtr",!0),EK(CK,YK,FK,"⪋","\\lesseqqgtr",!0),EK(CK,YK,FK,"≑","\\doteqdot"),EK(CK,YK,FK,"≓","\\risingdotseq",!0),EK(CK,YK,FK,"≒","\\fallingdotseq",!0),EK(CK,YK,FK,"∽","\\backsim",!0),EK(CK,YK,FK,"⋍","\\backsimeq",!0),EK(CK,YK,FK,"⫅","\\subseteqq",!0),EK(CK,YK,FK,"⋐","\\Subset",!0),EK(CK,YK,FK,"⊏","\\sqsubset",!0),EK(CK,YK,FK,"≼","\\preccurlyeq",!0),EK(CK,YK,FK,"⋞","\\curlyeqprec",!0),EK(CK,YK,FK,"≾","\\precsim",!0),EK(CK,YK,FK,"⪷","\\precapprox",!0),EK(CK,YK,FK,"⊲","\\vartriangleleft"),EK(CK,YK,FK,"⊴","\\trianglelefteq"),EK(CK,YK,FK,"⊨","\\vDash",!0),EK(CK,YK,FK,"⊪","\\Vvdash",!0),EK(CK,YK,FK,"⌣","\\smallsmile"),EK(CK,YK,FK,"⌢","\\smallfrown"),EK(CK,YK,FK,"≏","\\bumpeq",!0),EK(CK,YK,FK,"≎","\\Bumpeq",!0),EK(CK,YK,FK,"≧","\\geqq",!0),EK(CK,YK,FK,"⩾","\\geqslant",!0),EK(CK,YK,FK,"⪖","\\eqslantgtr",!0),EK(CK,YK,FK,"≳","\\gtrsim",!0),EK(CK,YK,FK,"⪆","\\gtrapprox",!0),EK(CK,YK,_K,"⋗","\\gtrdot"),EK(CK,YK,FK,"⋙","\\ggg",!0),EK(CK,YK,FK,"≷","\\gtrless",!0),EK(CK,YK,FK,"⋛","\\gtreqless",!0),EK(CK,YK,FK,"⪌","\\gtreqqless",!0),EK(CK,YK,FK,"≖","\\eqcirc",!0),EK(CK,YK,FK,"≗","\\circeq",!0),EK(CK,YK,FK,"≜","\\triangleq",!0),EK(CK,YK,FK,"∼","\\thicksim"),EK(CK,YK,FK,"≈","\\thickapprox"),EK(CK,YK,FK,"⫆","\\supseteqq",!0),EK(CK,YK,FK,"⋑","\\Supset",!0),EK(CK,YK,FK,"⊐","\\sqsupset",!0),EK(CK,YK,FK,"≽","\\succcurlyeq",!0),EK(CK,YK,FK,"⋟","\\curlyeqsucc",!0),EK(CK,YK,FK,"≿","\\succsim",!0),EK(CK,YK,FK,"⪸","\\succapprox",!0),EK(CK,YK,FK,"⊳","\\vartriangleright"),EK(CK,YK,FK,"⊵","\\trianglerighteq"),EK(CK,YK,FK,"⊩","\\Vdash",!0),EK(CK,YK,FK,"∣","\\shortmid"),EK(CK,YK,FK,"∥","\\shortparallel"),EK(CK,YK,FK,"≬","\\between",!0),EK(CK,YK,FK,"⋔","\\pitchfork",!0),EK(CK,YK,FK,"∝","\\varpropto"),EK(CK,YK,FK,"◀","\\blacktriangleleft"),EK(CK,YK,FK,"∴","\\therefore",!0),EK(CK,YK,FK,"∍","\\backepsilon"),EK(CK,YK,FK,"▶","\\blacktriangleright"),EK(CK,YK,FK,"∵","\\because",!0),EK(CK,YK,FK,"⋘","\\llless"),EK(CK,YK,FK,"⋙","\\gggtr"),EK(CK,YK,_K,"⊲","\\lhd"),EK(CK,YK,_K,"⊳","\\rhd"),EK(CK,YK,FK,"≂","\\eqsim",!0),EK(CK,UK,FK,"⋈","\\Join"),EK(CK,YK,FK,"≑","\\Doteq",!0),EK(CK,YK,_K,"∔","\\dotplus",!0),EK(CK,YK,_K,"∖","\\smallsetminus"),EK(CK,YK,_K,"⋒","\\Cap",!0),EK(CK,YK,_K,"⋓","\\Cup",!0),EK(CK,YK,_K,"⩞","\\doublebarwedge",!0),EK(CK,YK,_K,"⊟","\\boxminus",!0),EK(CK,YK,_K,"⊞","\\boxplus",!0),EK(CK,YK,_K,"⋇","\\divideontimes",!0),EK(CK,YK,_K,"⋉","\\ltimes",!0),EK(CK,YK,_K,"⋊","\\rtimes",!0),EK(CK,YK,_K,"⋋","\\leftthreetimes",!0),EK(CK,YK,_K,"⋌","\\rightthreetimes",!0),EK(CK,YK,_K,"⋏","\\curlywedge",!0),EK(CK,YK,_K,"⋎","\\curlyvee",!0),EK(CK,YK,_K,"⊝","\\circleddash",!0),EK(CK,YK,_K,"⊛","\\circledast",!0),EK(CK,YK,_K,"⋅","\\centerdot"),EK(CK,YK,_K,"⊺","\\intercal",!0),EK(CK,YK,_K,"⋒","\\doublecap"),EK(CK,YK,_K,"⋓","\\doublecup"),EK(CK,YK,_K,"⊠","\\boxtimes",!0),EK(CK,YK,FK,"⇢","\\dashrightarrow",!0),EK(CK,YK,FK,"⇠","\\dashleftarrow",!0),EK(CK,YK,FK,"⇇","\\leftleftarrows",!0),EK(CK,YK,FK,"⇆","\\leftrightarrows",!0),EK(CK,YK,FK,"⇚","\\Lleftarrow",!0),EK(CK,YK,FK,"↞","\\twoheadleftarrow",!0),EK(CK,YK,FK,"↢","\\leftarrowtail",!0),EK(CK,YK,FK,"↫","\\looparrowleft",!0),EK(CK,YK,FK,"⇋","\\leftrightharpoons",!0),EK(CK,YK,FK,"↶","\\curvearrowleft",!0),EK(CK,YK,FK,"↺","\\circlearrowleft",!0),EK(CK,YK,FK,"↰","\\Lsh",!0),EK(CK,YK,FK,"⇈","\\upuparrows",!0),EK(CK,YK,FK,"↿","\\upharpoonleft",!0),EK(CK,YK,FK,"⇃","\\downharpoonleft",!0),EK(CK,UK,FK,"⊶","\\origof",!0),EK(CK,UK,FK,"⊷","\\imageof",!0),EK(CK,YK,FK,"⊸","\\multimap",!0),EK(CK,YK,FK,"↭","\\leftrightsquigarrow",!0),EK(CK,YK,FK,"⇉","\\rightrightarrows",!0),EK(CK,YK,FK,"⇄","\\rightleftarrows",!0),EK(CK,YK,FK,"↠","\\twoheadrightarrow",!0),EK(CK,YK,FK,"↣","\\rightarrowtail",!0),EK(CK,YK,FK,"↬","\\looparrowright",!0),EK(CK,YK,FK,"↷","\\curvearrowright",!0),EK(CK,YK,FK,"↻","\\circlearrowright",!0),EK(CK,YK,FK,"↱","\\Rsh",!0),EK(CK,YK,FK,"⇊","\\downdownarrows",!0),EK(CK,YK,FK,"↾","\\upharpoonright",!0),EK(CK,YK,FK,"⇂","\\downharpoonright",!0),EK(CK,YK,FK,"⇝","\\rightsquigarrow",!0),EK(CK,YK,FK,"⇝","\\leadsto"),EK(CK,YK,FK,"⇛","\\Rrightarrow",!0),EK(CK,YK,FK,"↾","\\restriction"),EK(CK,UK,HK,"‘","`"),EK(CK,UK,HK,"$","\\$"),EK(QK,UK,HK,"$","\\$"),EK(QK,UK,HK,"$","\\textdollar"),EK(CK,UK,HK,"%","\\%"),EK(QK,UK,HK,"%","\\%"),EK(CK,UK,HK,"_","\\_"),EK(QK,UK,HK,"_","\\_"),EK(QK,UK,HK,"_","\\textunderscore"),EK(CK,UK,HK,"∠","\\angle",!0),EK(CK,UK,HK,"∞","\\infty",!0),EK(CK,UK,HK,"′","\\prime"),EK(CK,UK,HK,"△","\\triangle"),EK(CK,UK,HK,"Γ","\\Gamma",!0),EK(CK,UK,HK,"Δ","\\Delta",!0),EK(CK,UK,HK,"Θ","\\Theta",!0),EK(CK,UK,HK,"Λ","\\Lambda",!0),EK(CK,UK,HK,"Ξ","\\Xi",!0),EK(CK,UK,HK,"Π","\\Pi",!0),EK(CK,UK,HK,"Σ","\\Sigma",!0),EK(CK,UK,HK,"Υ","\\Upsilon",!0),EK(CK,UK,HK,"Φ","\\Phi",!0),EK(CK,UK,HK,"Ψ","\\Psi",!0),EK(CK,UK,HK,"Ω","\\Omega",!0),EK(CK,UK,HK,"A","Α"),EK(CK,UK,HK,"B","Β"),EK(CK,UK,HK,"E","Ε"),EK(CK,UK,HK,"Z","Ζ"),EK(CK,UK,HK,"H","Η"),EK(CK,UK,HK,"I","Ι"),EK(CK,UK,HK,"K","Κ"),EK(CK,UK,HK,"M","Μ"),EK(CK,UK,HK,"N","Ν"),EK(CK,UK,HK,"O","Ο"),EK(CK,UK,HK,"P","Ρ"),EK(CK,UK,HK,"T","Τ"),EK(CK,UK,HK,"X","Χ"),EK(CK,UK,HK,"¬","\\neg",!0),EK(CK,UK,HK,"¬","\\lnot"),EK(CK,UK,HK,"⊤","\\top"),EK(CK,UK,HK,"⊥","\\bot"),EK(CK,UK,HK,"∅","\\emptyset"),EK(CK,YK,HK,"∅","\\varnothing"),EK(CK,UK,RK,"α","\\alpha",!0),EK(CK,UK,RK,"β","\\beta",!0),EK(CK,UK,RK,"γ","\\gamma",!0),EK(CK,UK,RK,"δ","\\delta",!0),EK(CK,UK,RK,"ϵ","\\epsilon",!0),EK(CK,UK,RK,"ζ","\\zeta",!0),EK(CK,UK,RK,"η","\\eta",!0),EK(CK,UK,RK,"θ","\\theta",!0),EK(CK,UK,RK,"ι","\\iota",!0),EK(CK,UK,RK,"κ","\\kappa",!0),EK(CK,UK,RK,"λ","\\lambda",!0),EK(CK,UK,RK,"μ","\\mu",!0),EK(CK,UK,RK,"ν","\\nu",!0),EK(CK,UK,RK,"ξ","\\xi",!0),EK(CK,UK,RK,"ο","\\omicron",!0),EK(CK,UK,RK,"π","\\pi",!0),EK(CK,UK,RK,"ρ","\\rho",!0),EK(CK,UK,RK,"σ","\\sigma",!0),EK(CK,UK,RK,"τ","\\tau",!0),EK(CK,UK,RK,"υ","\\upsilon",!0),EK(CK,UK,RK,"ϕ","\\phi",!0),EK(CK,UK,RK,"χ","\\chi",!0),EK(CK,UK,RK,"ψ","\\psi",!0),EK(CK,UK,RK,"ω","\\omega",!0),EK(CK,UK,RK,"ε","\\varepsilon",!0),EK(CK,UK,RK,"ϑ","\\vartheta",!0),EK(CK,UK,RK,"ϖ","\\varpi",!0),EK(CK,UK,RK,"ϱ","\\varrho",!0),EK(CK,UK,RK,"ς","\\varsigma",!0),EK(CK,UK,RK,"φ","\\varphi",!0),EK(CK,UK,_K,"∗","*",!0),EK(CK,UK,_K,"+","+"),EK(CK,UK,_K,"−","-",!0),EK(CK,UK,_K,"⋅","\\cdot",!0),EK(CK,UK,_K,"∘","\\circ",!0),EK(CK,UK,_K,"÷","\\div",!0),EK(CK,UK,_K,"±","\\pm",!0),EK(CK,UK,_K,"×","\\times",!0),EK(CK,UK,_K,"∩","\\cap",!0),EK(CK,UK,_K,"∪","\\cup",!0),EK(CK,UK,_K,"∖","\\setminus",!0),EK(CK,UK,_K,"∧","\\land"),EK(CK,UK,_K,"∨","\\lor"),EK(CK,UK,_K,"∧","\\wedge",!0),EK(CK,UK,_K,"∨","\\vee",!0),EK(CK,UK,HK,"√","\\surd"),EK(CK,UK,BK,"⟨","\\langle",!0),EK(CK,UK,BK,"∣","\\lvert"),EK(CK,UK,BK,"∥","\\lVert"),EK(CK,UK,PK,"?","?"),EK(CK,UK,PK,"!","!"),EK(CK,UK,PK,"⟩","\\rangle",!0),EK(CK,UK,PK,"∣","\\rvert"),EK(CK,UK,PK,"∥","\\rVert"),EK(CK,UK,FK,"=","="),EK(CK,UK,FK,":",":"),EK(CK,UK,FK,"≈","\\approx",!0),EK(CK,UK,FK,"≅","\\cong",!0),EK(CK,UK,FK,"≥","\\ge"),EK(CK,UK,FK,"≥","\\geq",!0),EK(CK,UK,FK,"←","\\gets"),EK(CK,UK,FK,">","\\gt",!0),EK(CK,UK,FK,"∈","\\in",!0),EK(CK,UK,FK,"","\\@not"),EK(CK,UK,FK,"⊂","\\subset",!0),EK(CK,UK,FK,"⊃","\\supset",!0),EK(CK,UK,FK,"⊆","\\subseteq",!0),EK(CK,UK,FK,"⊇","\\supseteq",!0),EK(CK,YK,FK,"⊈","\\nsubseteq",!0),EK(CK,YK,FK,"⊉","\\nsupseteq",!0),EK(CK,UK,FK,"⊨","\\models"),EK(CK,UK,FK,"←","\\leftarrow",!0),EK(CK,UK,FK,"≤","\\le"),EK(CK,UK,FK,"≤","\\leq",!0),EK(CK,UK,FK,"<","\\lt",!0),EK(CK,UK,FK,"→","\\rightarrow",!0),EK(CK,UK,FK,"→","\\to"),EK(CK,YK,FK,"≱","\\ngeq",!0),EK(CK,YK,FK,"≰","\\nleq",!0),EK(CK,UK,GK," ","\\ "),EK(CK,UK,GK," ","\\space"),EK(CK,UK,GK," ","\\nobreakspace"),EK(QK,UK,GK," ","\\ "),EK(QK,UK,GK," "," "),EK(QK,UK,GK," ","\\space"),EK(QK,UK,GK," ","\\nobreakspace"),EK(CK,UK,GK,"","\\nobreak"),EK(CK,UK,GK,"","\\allowbreak"),EK(CK,UK,$K,",",","),EK(CK,UK,$K,";",";"),EK(CK,YK,_K,"⊼","\\barwedge",!0),EK(CK,YK,_K,"⊻","\\veebar",!0),EK(CK,UK,_K,"⊙","\\odot",!0),EK(CK,UK,_K,"⊕","\\oplus",!0),EK(CK,UK,_K,"⊗","\\otimes",!0),EK(CK,UK,HK,"∂","\\partial",!0),EK(CK,UK,_K,"⊘","\\oslash",!0),EK(CK,YK,_K,"⊚","\\circledcirc",!0),EK(CK,YK,_K,"⊡","\\boxdot",!0),EK(CK,UK,_K,"△","\\bigtriangleup"),EK(CK,UK,_K,"▽","\\bigtriangledown"),EK(CK,UK,_K,"†","\\dagger"),EK(CK,UK,_K,"⋄","\\diamond"),EK(CK,UK,_K,"⋆","\\star"),EK(CK,UK,_K,"◃","\\triangleleft"),EK(CK,UK,_K,"▹","\\triangleright"),EK(CK,UK,BK,"{","\\{"),EK(QK,UK,HK,"{","\\{"),EK(QK,UK,HK,"{","\\textbraceleft"),EK(CK,UK,PK,"}","\\}"),EK(QK,UK,HK,"}","\\}"),EK(QK,UK,HK,"}","\\textbraceright"),EK(CK,UK,BK,"{","\\lbrace"),EK(CK,UK,PK,"}","\\rbrace"),EK(CK,UK,BK,"[","\\lbrack",!0),EK(QK,UK,HK,"[","\\lbrack",!0),EK(CK,UK,PK,"]","\\rbrack",!0),EK(QK,UK,HK,"]","\\rbrack",!0),EK(CK,UK,BK,"(","\\lparen",!0),EK(CK,UK,PK,")","\\rparen",!0),EK(QK,UK,HK,"<","\\textless",!0),EK(QK,UK,HK,">","\\textgreater",!0),EK(CK,UK,BK,"⌊","\\lfloor",!0),EK(CK,UK,PK,"⌋","\\rfloor",!0),EK(CK,UK,BK,"⌈","\\lceil",!0),EK(CK,UK,PK,"⌉","\\rceil",!0),EK(CK,UK,HK,"\\","\\backslash"),EK(CK,UK,HK,"∣","|"),EK(CK,UK,HK,"∣","\\vert"),EK(QK,UK,HK,"|","\\textbar",!0),EK(CK,UK,HK,"∥","\\|"),EK(CK,UK,HK,"∥","\\Vert"),EK(QK,UK,HK,"∥","\\textbardbl"),EK(QK,UK,HK,"~","\\textasciitilde"),EK(QK,UK,HK,"\\","\\textbackslash"),EK(QK,UK,HK,"^","\\textasciicircum"),EK(CK,UK,FK,"↑","\\uparrow",!0),EK(CK,UK,FK,"⇑","\\Uparrow",!0),EK(CK,UK,FK,"↓","\\downarrow",!0),EK(CK,UK,FK,"⇓","\\Downarrow",!0),EK(CK,UK,FK,"↕","\\updownarrow",!0),EK(CK,UK,FK,"⇕","\\Updownarrow",!0),EK(CK,UK,WK,"∐","\\coprod"),EK(CK,UK,WK,"⋁","\\bigvee"),EK(CK,UK,WK,"⋀","\\bigwedge"),EK(CK,UK,WK,"⨄","\\biguplus"),EK(CK,UK,WK,"⋂","\\bigcap"),EK(CK,UK,WK,"⋃","\\bigcup"),EK(CK,UK,WK,"∫","\\int"),EK(CK,UK,WK,"∫","\\intop"),EK(CK,UK,WK,"∬","\\iint"),EK(CK,UK,WK,"∭","\\iiint"),EK(CK,UK,WK,"∏","\\prod"),EK(CK,UK,WK,"∑","\\sum"),EK(CK,UK,WK,"⨂","\\bigotimes"),EK(CK,UK,WK,"⨁","\\bigoplus"),EK(CK,UK,WK,"⨀","\\bigodot"),EK(CK,UK,WK,"∮","\\oint"),EK(CK,UK,WK,"∯","\\oiint"),EK(CK,UK,WK,"∰","\\oiiint"),EK(CK,UK,WK,"⨆","\\bigsqcup"),EK(CK,UK,WK,"∫","\\smallint"),EK(QK,UK,VK,"…","\\textellipsis"),EK(CK,UK,VK,"…","\\mathellipsis"),EK(QK,UK,VK,"…","\\ldots",!0),EK(CK,UK,VK,"…","\\ldots",!0),EK(CK,UK,VK,"⋯","\\@cdots",!0),EK(CK,UK,VK,"⋱","\\ddots",!0),EK(CK,UK,HK,"⋮","\\varvdots"),EK(QK,UK,HK,"⋮","\\varvdots"),EK(CK,UK,ZK,"ˊ","\\acute"),EK(CK,UK,ZK,"ˋ","\\grave"),EK(CK,UK,ZK,"¨","\\ddot"),EK(CK,UK,ZK,"~","\\tilde"),EK(CK,UK,ZK,"ˉ","\\bar"),EK(CK,UK,ZK,"˘","\\breve"),EK(CK,UK,ZK,"ˇ","\\check"),EK(CK,UK,ZK,"^","\\hat"),EK(CK,UK,ZK,"⃗","\\vec"),EK(CK,UK,ZK,"˙","\\dot"),EK(CK,UK,ZK,"˚","\\mathring"),EK(CK,UK,RK,"","\\@imath"),EK(CK,UK,RK,"","\\@jmath"),EK(CK,UK,HK,"ı","ı"),EK(CK,UK,HK,"ȷ","ȷ"),EK(QK,UK,HK,"ı","\\i",!0),EK(QK,UK,HK,"ȷ","\\j",!0),EK(QK,UK,HK,"ß","\\ss",!0),EK(QK,UK,HK,"æ","\\ae",!0),EK(QK,UK,HK,"œ","\\oe",!0),EK(QK,UK,HK,"ø","\\o",!0),EK(QK,UK,HK,"Æ","\\AE",!0),EK(QK,UK,HK,"Œ","\\OE",!0),EK(QK,UK,HK,"Ø","\\O",!0),EK(QK,UK,ZK,"ˊ","\\'"),EK(QK,UK,ZK,"ˋ","\\`"),EK(QK,UK,ZK,"ˆ","\\^"),EK(QK,UK,ZK,"˜","\\~"),EK(QK,UK,ZK,"ˉ","\\="),EK(QK,UK,ZK,"˘","\\u"),EK(QK,UK,ZK,"˙","\\."),EK(QK,UK,ZK,"¸","\\c"),EK(QK,UK,ZK,"˚","\\r"),EK(QK,UK,ZK,"ˇ","\\v"),EK(QK,UK,ZK,"¨",'\\"'),EK(QK,UK,ZK,"˝","\\H"),EK(QK,UK,ZK,"◯","\\textcircled");var JK={"--":!0,"---":!0,"``":!0,"''":!0};EK(QK,UK,HK,"–","--",!0),EK(QK,UK,HK,"–","\\textendash"),EK(QK,UK,HK,"—","---",!0),EK(QK,UK,HK,"—","\\textemdash"),EK(QK,UK,HK,"‘","`",!0),EK(QK,UK,HK,"‘","\\textquoteleft"),EK(QK,UK,HK,"’","'",!0),EK(QK,UK,HK,"’","\\textquoteright"),EK(QK,UK,HK,"“","``",!0),EK(QK,UK,HK,"“","\\textquotedblleft"),EK(QK,UK,HK,"”","''",!0),EK(QK,UK,HK,"”","\\textquotedblright"),EK(CK,UK,HK,"°","\\degree",!0),EK(QK,UK,HK,"°","\\degree"),EK(QK,UK,HK,"°","\\textdegree",!0),EK(CK,UK,HK,"£","\\pounds"),EK(CK,UK,HK,"£","\\mathsterling",!0),EK(QK,UK,HK,"£","\\pounds"),EK(QK,UK,HK,"£","\\textsterling",!0),EK(CK,YK,HK,"✠","\\maltese"),EK(QK,YK,HK,"✠","\\maltese");for(var XK='0123456789/@."',qK=0;qK<14;qK++){var KK=XK.charAt(qK);EK(CK,UK,HK,KK,KK)}for(var e0='0123456789!@*()-=+";:?/.,',t0=0;t0<25;t0++){var i0=e0.charAt(t0);EK(QK,UK,HK,i0,i0)}for(var n0,o0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",r0=0;r0<52;r0++){var s0=o0.charAt(r0);EK(CK,UK,RK,s0,s0),EK(QK,UK,HK,s0,s0)}EK(CK,YK,HK,"C","ℂ"),EK(QK,YK,HK,"C","ℂ"),EK(CK,YK,HK,"H","ℍ"),EK(QK,YK,HK,"H","ℍ"),EK(CK,YK,HK,"N","ℕ"),EK(QK,YK,HK,"N","ℕ"),EK(CK,YK,HK,"P","ℙ"),EK(QK,YK,HK,"P","ℙ"),EK(CK,YK,HK,"Q","ℚ"),EK(QK,YK,HK,"Q","ℚ"),EK(CK,YK,HK,"R","ℝ"),EK(QK,YK,HK,"R","ℝ"),EK(CK,YK,HK,"Z","ℤ"),EK(QK,YK,HK,"Z","ℤ"),EK(CK,UK,RK,"h","ℎ"),EK(QK,UK,RK,"h","ℎ");for(var a0=0;a0<52;a0++){var l0=o0.charAt(a0);EK(CK,UK,RK,l0,n0=String.fromCharCode(55349,56320+a0)),EK(QK,UK,HK,l0,n0),EK(CK,UK,RK,l0,n0=String.fromCharCode(55349,56372+a0)),EK(QK,UK,HK,l0,n0),EK(CK,UK,RK,l0,n0=String.fromCharCode(55349,56424+a0)),EK(QK,UK,HK,l0,n0),EK(CK,UK,RK,l0,n0=String.fromCharCode(55349,56580+a0)),EK(QK,UK,HK,l0,n0),EK(CK,UK,RK,l0,n0=String.fromCharCode(55349,56684+a0)),EK(QK,UK,HK,l0,n0),EK(CK,UK,RK,l0,n0=String.fromCharCode(55349,56736+a0)),EK(QK,UK,HK,l0,n0),EK(CK,UK,RK,l0,n0=String.fromCharCode(55349,56788+a0)),EK(QK,UK,HK,l0,n0),EK(CK,UK,RK,l0,n0=String.fromCharCode(55349,56840+a0)),EK(QK,UK,HK,l0,n0),EK(CK,UK,RK,l0,n0=String.fromCharCode(55349,56944+a0)),EK(QK,UK,HK,l0,n0),a0<26&&(EK(CK,UK,RK,l0,n0=String.fromCharCode(55349,56632+a0)),EK(QK,UK,HK,l0,n0),EK(CK,UK,RK,l0,n0=String.fromCharCode(55349,56476+a0)),EK(QK,UK,HK,l0,n0))}EK(CK,UK,RK,"k",n0=String.fromCharCode(55349,56668)),EK(QK,UK,HK,"k",n0);for(var M0=0;M0<10;M0++){var c0=M0.toString();EK(CK,UK,RK,c0,n0=String.fromCharCode(55349,57294+M0)),EK(QK,UK,HK,c0,n0),EK(CK,UK,RK,c0,n0=String.fromCharCode(55349,57314+M0)),EK(QK,UK,HK,c0,n0),EK(CK,UK,RK,c0,n0=String.fromCharCode(55349,57324+M0)),EK(QK,UK,HK,c0,n0),EK(CK,UK,RK,c0,n0=String.fromCharCode(55349,57334+M0)),EK(QK,UK,HK,c0,n0)}for(var g0="ÐÞþ",u0=0;u0<3;u0++){var d0=g0.charAt(u0);EK(CK,UK,RK,d0,d0),EK(QK,UK,HK,d0,d0)}var h0={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},N0={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},p0={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},D0={mathClass:"",textClass:"",font:""},y0={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},I0={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},j0={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},z0={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},m0={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},T0={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},x0={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},A0=[h0,h0,N0,N0,p0,p0,{mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},D0,D0,D0,y0,y0,I0,I0,j0,j0,z0,z0,m0,m0,T0,T0,D0,D0,x0,x0],O0=[h0,D0,z0,m0,x0],f0=function(e,t,i){if(kK[i][e]){var n=kK[i][e].replace;n&&(e=n)}return{value:e,metrics:vK(e,t,i)}},b0=function(e,t,i,n,o){var r,s=f0(e,t,i),a=s.metrics;if(e=s.value,a){var l=a.italic;("text"===i||n&&"mathit"===n.font)&&(l=0),r=new TK(e,a.height,a.depth,l,a.skew,a.width,o)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+i+"'"),r=new TK(e,0,0,0,0,0,o);if(n){r.maxFontSize=n.sizeMultiplier,n.style.isTight()&&r.classes.push("mtight");var M=n.getColor();M&&(r.style.color=M)}return r},L0=function(e,t,i,n){return void 0===n&&(n=[]),"boldsymbol"===i.font&&f0(e,"Main-Bold",t).metrics?b0(e,"Main-Bold",t,i,n.concat(["mathbf"])):"\\"===e||"main"===kK[t][e].font?b0(e,"Main-Regular",t,i,n):b0(e,"AMS-Regular",t,i,n.concat(["amsrm"]))},w0=function(e,t,i){var n=e.mode,o=e.text,r=["mord"],{font:s,fontFamily:a,fontWeight:l,fontShape:M}=t,c="math"===n||"text"===n&&!!s,g=c?s:a,u="",d="";if(55349===o.charCodeAt(0)){var h=(e=>{var t=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536;if(119808<=t&&t<120484){var i=Math.floor((t-119808)/26);return A0[i]}if(120782<=t&&t<=120831){var n=Math.floor((t-120782)/10);return O0[n]}if(120485===t||120486===t)return A0[0];if(120486<t&&t<120782)return D0;throw new Eq("Unsupported character: "+e)})(o);u=h.font,d=h[n+"Class"]}if(u)return b0(o,u,n,t,r.concat(d));if(g){var N,p;if("boldsymbol"===g){var D=function(e,t,i){return"textord"!==i&&f0(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(o,n,i);N=D.fontName,p=[D.fontClass]}else c?(N=V0[s].fontName,p=[s]):(N=P0(a,l,M),p=[a,l,M]);if(f0(o,N,n).metrics)return b0(o,N,n,t,r.concat(p));if(JK.hasOwnProperty(o)&&"Typewriter"===N.slice(0,10)){for(var y=[],I=0;I<o.length;I++)y.push(b0(o[I],N,n,t,r.concat(p)));return U0(y)}}if("mathord"===i)return b0(o,"Math-Italic",n,t,r.concat(["mathnormal"]));if("textord"===i){var j=kK[n][o]&&kK[n][o].font;if("ams"===j){var z=P0("amsrm",l,M);return b0(o,z,n,t,r.concat("amsrm",l,M))}if("main"!==j&&j){var m=P0(j,l,M);return b0(o,m,n,t,r.concat(m,l,M))}var T=P0("textrm",l,M);return b0(o,T,n,t,r.concat(l,M))}throw new Error("unexpected type: "+i+" in makeOrd")},v0=(e,t)=>{if(dK(e.classes)!==dK(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||0!==e.italic&&e.hasClass("mathnormal"))return!1;if(1===e.classes.length){var i=e.classes[0];if("mbin"===i||"mord"===i)return!1}for(var n of Object.keys(e.style))if(e.style[n]!==t.style[n])return!1;for(var o of Object.keys(t.style))if(e.style[o]!==t.style[o])return!1;return!0},S0=e=>{for(var t=0;t<e.length-1;t++){var i=e[t],n=e[t+1];i instanceof TK&&n instanceof TK&&v0(i,n)&&(i.text+=n.text,i.height=Math.max(i.height,n.height),i.depth=Math.max(i.depth,n.depth),i.italic=n.italic,e.splice(t+1,1),t--)}return e},k0=function(e){for(var t=0,i=0,n=0,o=0;o<e.children.length;o++){var r=e.children[o];r.height>t&&(t=r.height),r.depth>i&&(i=r.depth),r.maxFontSize>n&&(n=r.maxFontSize)}e.height=t,e.depth=i,e.maxFontSize=n},E0=function(e,t,i,n){var o=new IK(e,t,i,n);return k0(o),o},C0=(e,t,i,n)=>new IK(e,t,i,n),Q0=function(e,t,i){var n=E0([e],[],t);return n.height=Math.max(i||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=uK(n.height),n.maxFontSize=1,n},U0=function(e){var t=new aK(e);return k0(t),t},Y0=function(e,t){return e instanceof aK?E0([],[e],t):e},Z0=function(e,t){for(var{children:i,depth:n}=function(e){if("individualShift"===e.positionType){for(var t=e.children,i=[t[0]],n=-t[0].shift-t[0].elem.depth,o=n,r=1;r<t.length;r++){var s=-t[r].shift-o-t[r].elem.depth,a=s-(t[r-1].elem.height+t[r-1].elem.depth);o+=s,i.push({type:"kern",size:a}),i.push(t[r])}return{children:i,depth:n}}var l;if("top"===e.positionType){for(var M=e.positionData,c=0;c<e.children.length;c++){var g=e.children[c];M-="kern"===g.type?g.size:g.elem.height+g.elem.depth}l=M}else if("bottom"===e.positionType)l=-e.positionData;else{var u=e.children[0];if("elem"!==u.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-u.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-u.elem.depth}}return{children:e.children,depth:l}}(e),o=0,r=0;r<i.length;r++){var s=i[r];if("elem"===s.type){var a=s.elem;o=Math.max(o,a.maxFontSize,a.height)}}o+=2;var l=E0(["pstrut"],[]);l.style.height=uK(o);for(var M=[],c=n,g=n,u=n,d=0;d<i.length;d++){var h=i[d];if("kern"===h.type)u+=h.size;else{var N=h.elem,p=h.wrapperClasses||[],D=h.wrapperStyle||{},y=E0(p,[l,N],void 0,D);y.style.top=uK(-o-u-N.depth),h.marginLeft&&(y.style.marginLeft=h.marginLeft),h.marginRight&&(y.style.marginRight=h.marginRight),M.push(y),u+=N.height+N.depth}c=Math.min(c,u),g=Math.max(g,u)}var I,j=E0(["vlist"],M);if(j.style.height=uK(g),c<0){var z=E0([],[]),m=E0(["vlist"],[z]);m.style.height=uK(-c);var T=E0(["vlist-s"],[new TK("")]);I=[E0(["vlist-r"],[j,T]),E0(["vlist-r"],[m])]}else I=[E0(["vlist-r"],[j])];var x=E0(["vlist-t"],I);return 2===I.length&&x.classes.push("vlist-t2"),x.height=g,x.depth=-c,x},_0=(e,t)=>{var i=E0(["mspace"],[],t),n=gK(e,t);return i.style.marginRight=uK(n),i},P0=(e,t,i)=>{var n;switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===i?"BoldItalic":"textbf"===t?"Bold":"textit"===i?"Italic":"Regular")},V0={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},R0={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},W0=function(e,t){var[i,n,o]=R0[e],r=new AK(i),s=new xK([r],{width:uK(n),height:uK(o),style:"width:"+uK(n),viewBox:"0 0 "+1e3*n+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),a=C0(["overlay"],[s],t);return a.height=o,a.style.height=uK(o),a.style.width=uK(n),a},B0={number:3,unit:"mu"},$0={number:4,unit:"mu"},F0={number:5,unit:"mu"},G0={mord:{mop:B0,mbin:$0,mrel:F0,minner:B0},mop:{mord:B0,mop:B0,mrel:F0,minner:B0},mbin:{mord:$0,mop:$0,mopen:$0,minner:$0},mrel:{mord:F0,mop:F0,mopen:F0,minner:F0},mopen:{},mclose:{mop:B0,mbin:$0,mrel:F0,minner:B0},mpunct:{mord:B0,mop:B0,mrel:F0,mopen:B0,mclose:B0,mpunct:B0,minner:B0},minner:{mord:B0,mop:B0,mbin:$0,mrel:F0,mopen:B0,mpunct:B0,minner:B0}},H0={mord:{mop:B0},mop:{mord:B0,mop:B0},mbin:{},mrel:{},mopen:{},mclose:{mop:B0},mpunct:{},minner:{mop:B0}},J0={},X0={},q0={};function K0(e){for(var{type:t,names:i,props:n,handler:o,htmlBuilder:r,mathmlBuilder:s}=e,a={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:o},l=0;l<i.length;++l)J0[i[l]]=a;t&&(r&&(X0[t]=r),s&&(q0[t]=s))}function e4(e){var{type:t,htmlBuilder:i,mathmlBuilder:n}=e;K0({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:i,mathmlBuilder:n})}var t4=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},i4=function(e){return"ordgroup"===e.type?e.body:[e]},n4=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),o4=new Set(["rightmost","mrel","mclose","mpunct"]),r4={display:eK.DISPLAY,text:eK.TEXT,script:eK.SCRIPT,scriptscript:eK.SCRIPTSCRIPT},s4={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},a4=function(e,t,i,n){void 0===n&&(n=[null,null]);for(var o=[],r=0;r<e.length;r++){var s=d4(e[r],t);if(s instanceof aK){var a=s.children;o.push(...a)}else o.push(s)}if(S0(o),!i)return o;var l=t;if(1===e.length){var M=e[0];"sizing"===M.type?l=t.havingSize(M.size):"styling"===M.type&&(l=t.havingStyle(r4[M.style]))}var c=E0([n[0]||"leftmost"],[],t),g=E0([n[1]||"rightmost"],[],t),u="root"===i;return l4(o,((e,t)=>{var i=t.classes[0],n=e.classes[0];"mbin"===i&&o4.has(n)?t.classes[0]="mord":"mbin"===n&&n4.has(i)&&(e.classes[0]="mord")}),{node:c},g,u),l4(o,((e,t)=>{var i,n,o=g4(t),r=g4(e),s=o&&r?e.hasClass("mtight")?null==(i=H0[o])?void 0:i[r]:null==(n=G0[o])?void 0:n[r]:null;if(s)return _0(s,l)}),{node:c},g,u),o},l4=function(e,t,i,n,o){n&&e.push(n);for(var r=0;r<e.length;r++){var s=e[r],a=M4(s);if(a)l4(a.children,t,i,null,o);else{var l=!s.hasClass("mspace");if(l){var M=t(s,i.node);M&&(i.insertAfter?i.insertAfter(M):(e.unshift(M),r++))}l?i.node=s:o&&s.hasClass("newline")&&(i.node=E0(["leftmost"])),i.insertAfter=(t=>i=>{e.splice(t+1,0,i),r++})(r)}}n&&e.pop()},M4=function(e){return e instanceof aK||e instanceof jK||e instanceof IK&&e.hasClass("enclosing")?e:null},c4=function(e,t){var i=M4(e);if(i){var n=i.children;if(n.length){if("right"===t)return c4(n[n.length-1],"right");if("left"===t)return c4(n[0],"left")}}return e},g4=function(e,t){if(!e)return null;t&&(e=c4(e,t));var i=e.classes[0];return s4[i]||null},u4=function(e,t){var i=["nulldelimiter"].concat(e.baseSizingClasses());return E0(t.concat(i))},d4=function(e,t,i){if(!e)return E0();if(X0[e.type]){var n=X0[e.type](e,t);if(i&&t.size!==i.size){n=E0(t.sizingClasses(i),[n],t);var o=t.sizeMultiplier/i.sizeMultiplier;n.height*=o,n.depth*=o}return n}throw new Eq("Got group of unknown type: '"+e.type+"'")};function h4(e,t){var i=E0(["base"],e,t),n=E0(["strut"]);return n.style.height=uK(i.height+i.depth),i.depth&&(n.style.verticalAlign=uK(-i.depth)),i.children.unshift(n),i}function N4(e,t){var i=null;1===e.length&&"tag"===e[0].type&&(i=e[0].tag,e=e[0].body);var n,o=a4(e,t,"root");2===o.length&&o[1].hasClass("tag")&&(n=o.pop());for(var r,s=[],a=[],l=0;l<o.length;l++)if(a.push(o[l]),o[l].hasClass("mbin")||o[l].hasClass("mrel")||o[l].hasClass("allowbreak")){for(var M=!1;l<o.length-1&&o[l+1].hasClass("mspace")&&!o[l+1].hasClass("newline");)l++,a.push(o[l]),o[l].hasClass("nobreak")&&(M=!0);M||(s.push(h4(a,t)),a=[])}else o[l].hasClass("newline")&&(a.pop(),a.length>0&&(s.push(h4(a,t)),a=[]),s.push(o[l]));a.length>0&&s.push(h4(a,t)),i?((r=h4(a4(i,t,!0),t)).classes=["tag"],s.push(r)):n&&s.push(n);var c=E0(["katex-html"],s);if(c.setAttribute("aria-hidden","true"),r){var g=r.children[0];g.style.height=uK(c.height+c.depth),c.depth&&(g.style.verticalAlign=uK(-c.depth))}return c}function p4(e){return new aK(e)}class D4{constructor(e,t,i){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=i||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=dK(this.classes));for(var i=0;i<this.children.length;i++)if(this.children[i]instanceof y4&&this.children[i+1]instanceof y4){for(var n=this.children[i].toText()+this.children[++i].toText();this.children[i+1]instanceof y4;)n+=this.children[++i].toText();e.appendChild(new y4(n).toNode())}else e.appendChild(this.children[i].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Yq(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Yq(dK(this.classes))+'"'),e+=">";for(var i=0;i<this.children.length;i++)e+=this.children[i].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class y4{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Yq(this.toText())}toText(){return this.text}}class I4{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?" ":e>=-.05556&&e<=-.05555?" ":e>=-.1667&&e<=-.1666?" ":e>=-.2223&&e<=-.2222?" ":e>=-.2778&&e<=-.2777?" ":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",uK(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+uK(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var j4=new Set(["\\imath","\\jmath"]),z4=new Set(["mrow","mtable"]),m4=function(e,t,i){return!kK[t][e]||!kK[t][e].replace||55349===e.charCodeAt(0)||JK.hasOwnProperty(e)&&i&&(i.fontFamily&&"tt"===i.fontFamily.slice(4,6)||i.font&&"tt"===i.font.slice(4,6))||(e=kK[t][e].replace),new y4(e)},T4=function(e){return 1===e.length?e[0]:new D4("mrow",e)},x4={mathit:"italic",boldsymbol:e=>"textord"===e.type?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},A4=(e,t)=>{if("text"===e.mode){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold"}var i=t.font;if(!i||"mathnormal"===i)return null;var n=e.mode,o=x4[i];if(o)return"function"==typeof o?o(e):o;var r=e.text;if(j4.has(r))return null;if(kK[n][r]){var s=kK[n][r].replace;s&&(r=s)}return vK(r,V0[i].fontName,n)?V0[i].variant:null};function O4(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof y4&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var i=e.children[0];return i instanceof y4&&","===i.text}return!1}var f4=function(e,t,i){if(1===e.length){var n=L4(e[0],t);return i&&n instanceof D4&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var o,r=[],s=0;s<e.length;s++){var a=L4(e[s],t);if(a instanceof D4&&o instanceof D4){if("mtext"===a.type&&"mtext"===o.type&&a.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...a.children);continue}if("mn"===a.type&&"mn"===o.type){o.children.push(...a.children);continue}if(O4(a)&&"mn"===o.type){o.children.push(...a.children);continue}if("mn"===a.type&&O4(o))a.children=[...o.children,...a.children],r.pop();else if(("msup"===a.type||"msub"===a.type)&&a.children.length>=1&&("mn"===o.type||O4(o))){var l=a.children[0];l instanceof D4&&"mn"===l.type&&(l.children=[...o.children,...l.children],r.pop())}else if("mi"===o.type&&1===o.children.length){var M=o.children[0];if(M instanceof y4&&"̸"===M.text&&("mo"===a.type||"mi"===a.type||"mn"===a.type)){var c=a.children[0];c instanceof y4&&c.text.length>0&&(c.text=c.text.slice(0,1)+"̸"+c.text.slice(1),r.pop())}}}r.push(a),o=a}return r},b4=function(e,t,i){return T4(f4(e,t,i))},L4=function(e,t){if(!e)return new D4("mrow");if(q0[e.type])return q0[e.type](e,t);throw new Eq("Got group of unknown type: '"+e.type+"'")};function w4(e,t,i,n,o){var r,s=f4(e,i);r=1===s.length&&s[0]instanceof D4&&z4.has(s[0].type)?s[0]:new D4("mrow",s);var a=new D4("annotation",[new y4(t)]);a.setAttribute("encoding","application/x-tex");var l=new D4("semantics",[r,a]),M=new D4("math",[l]);return M.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&M.setAttribute("display","block"),E0([o?"katex":"katex-mathml"],[M])}var v4=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],S4=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],k4=function(e,t){return t.size<2?e:v4[e-1][t.size-1]};class E4{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||E4.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=S4[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,e),new E4(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:k4(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:S4[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=k4(E4.BASESIZE,e);return this.size===t&&this.textSize===E4.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==E4.BASESIZE?["sizing","reset-size"+this.size,"size"+E4.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!SK[t=e>=5?0:e>=3?1:2]){var i=SK[t]={cssEmPerMu:bK.quad[t]/18};for(var n in bK)bK.hasOwnProperty(n)&&(i[n]=bK[n][t])}return SK[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}E4.BASESIZE=6;var C4=function(e){return new E4({style:e.displayMode?eK.DISPLAY:eK.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Q4=function(e,t){if(t.displayMode){var i=["katex-display"];t.leqno&&i.push("leqno"),t.fleqn&&i.push("fleqn"),e=E0(i,[e])}return e},U4={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Y4=function(e){var t=new D4("mo",[new y4(U4[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Z4={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},_4=new Set(["widehat","widecheck","widetilde","utilde"]),P4=function(e,t){var{span:i,minWidth:n,height:o}=function(){var i=4e5,n=e.label.slice(1);if(_4.has(n)&&"base"in e){var o,r,s,a="ordgroup"===e.base.type?e.base.body.length:1;if(a>5)"widehat"===n||"widecheck"===n?(o=420,i=2364,s=.42,r=n+"4"):(o=312,i=2340,s=.34,r="tilde4");else{var l=[1,1,2,2,3,3][a];"widehat"===n||"widecheck"===n?(i=[0,1062,2364,2364,2364][l],o=[0,239,300,360,420][l],s=[0,.24,.3,.3,.36,.42][l],r=n+l):(i=[0,600,1033,2339,2340][l],o=[0,260,286,306,312][l],s=[0,.26,.286,.3,.306,.34][l],r="tilde"+l)}var M=new AK(r),c=new xK([M],{width:"100%",height:uK(s),viewBox:"0 0 "+i+" "+o,preserveAspectRatio:"none"});return{span:C0([],[c],t),minWidth:0,height:s}}var g=[],u=Z4[n];if(!u)throw new Error('No SVG data for "'+n+'".');var d,h,[N,p,D]=u,y=D/1e3,I=N.length;if(1===I){if(4!==u.length)throw new Error('Expected 4-tuple for single-path SVG data "'+n+'".');d=["hide-tail"],h=[u[3]]}else if(2===I)d=["halfarrow-left","halfarrow-right"],h=["xMinYMin","xMaxYMin"];else{if(3!==I)throw new Error("Correct katexImagesData or update code here to support\n "+I+" children.");d=["brace-left","brace-center","brace-right"],h=["xMinYMin","xMidYMin","xMaxYMin"]}for(var j=0;j<I;j++){var z=new AK(N[j]),m=new xK([z],{width:"400em",height:uK(y),viewBox:"0 0 "+i+" "+D,preserveAspectRatio:h[j]+" slice"}),T=C0([d[j]],[m],t);if(1===I)return{span:T,minWidth:p,height:y};T.style.height=uK(y),g.push(T)}return{span:E0(["stretchy"],g,t),minWidth:p,height:y}}();return i.height=o,i.style.height=uK(o),n>0&&(i.style.minWidth=uK(n)),i},V4={bin:1,close:1,inner:1,open:1,punct:1,rel:1},R4={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function W4(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function B4(e){var t=$4(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function $4(e){return e&&("atom"===e.type||R4.hasOwnProperty(e.type))?e:null}var F4=e=>{return e instanceof TK?e:((t=e)instanceof IK||t instanceof jK||t instanceof aK)&&1===e.children.length?F4(e.children[0]):void 0;var t},G4=(e,t)=>{var i,n,o;e&&"supsub"===e.type?(i=(n=W4(e.base,"accent")).base,e.base=i,o=function(e){if(e instanceof IK)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(d4(e,t)),e.base=n):i=(n=W4(e,"accent")).base;var r,s,a=d4(i,t.havingCrampedStyle()),l=0;n.isShifty&&Pq(i)&&(l=null!=(r=null==(s=F4(a))?void 0:s.skew)?r:0);var M,c="\\c"===n.label,g=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight);if(n.isStretchy)M=P4(n,t),M=Z0({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:M,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+uK(2*l)+")",marginLeft:uK(2*l)}:void 0}]});else{var u,d;"\\vec"===n.label?(u=W0("vec",t),d=R0.vec[1]):(u=function(e){if(e instanceof TK)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}(u=w0({type:"textord",mode:n.mode,text:n.label},t,"textord")),u.italic=0,d=u.width,c&&(g+=u.depth)),M=E0(["accent-body"],[u]);var h="\\textcircled"===n.label;h&&(M.classes.push("accent-full"),g=a.height);var N=l;h||(N-=d/2),M.style.left=uK(N),"\\textcircled"===n.label&&(M.style.top=".2em"),M=Z0({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-g},{type:"elem",elem:M}]})}var p=E0(["mord","accent"],[M],t);return o?(o.children[0]=p,o.height=Math.max(p.height,o.height),o.classes[0]="mord",o):p},H4=(e,t)=>{var i=e.isStretchy?Y4(e.label):new D4("mo",[m4(e.label,e.mode)]),n=new D4("mover",[L4(e.base,t),i]);return n.setAttribute("accent","true"),n},J4=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));K0({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var i=t4(t[0]),n=!J4.test(e.funcName),o=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:o,base:i}},htmlBuilder:G4,mathmlBuilder:H4}),K0({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var i=t[0],n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:i}},htmlBuilder:G4,mathmlBuilder:H4}),K0({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0];return{type:"accentUnder",mode:i.mode,label:n,base:o}},htmlBuilder:(e,t)=>{var i=d4(e.base,t),n=P4(e,t),o="\\utilde"===e.label?.12:0,r=Z0({positionType:"top",positionData:i.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:i}]});return E0(["mord","accentunder"],[r],t)},mathmlBuilder:(e,t)=>{var i=Y4(e.label),n=new D4("munder",[L4(e.base,t),i]);return n.setAttribute("accentunder","true"),n}});var X4=e=>{var t=new D4("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};function q4(e,t){var i=a4(e.body,t,!0);return E0([e.mclass],i,t)}function K4(e,t){var i,n=f4(e.body,t);return"minner"===e.mclass?i=new D4("mpadded",n):"mord"===e.mclass?e.isCharacterBox?(i=n[0]).type="mi":i=new D4("mi",n):(e.isCharacterBox?(i=n[0]).type="mo":i=new D4("mo",n),"mbin"===e.mclass?(i.attributes.lspace="0.22em",i.attributes.rspace="0.22em"):"mpunct"===e.mclass?(i.attributes.lspace="0em",i.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(i.attributes.lspace="0em",i.attributes.rspace="0em"):"minner"===e.mclass&&(i.attributes.lspace="0.0556em",i.attributes.width="+0.1111em")),i}K0({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){var{parser:n,funcName:o}=e;return{type:"xArrow",mode:n.mode,label:o,body:t[0],below:i[0]}},htmlBuilder(e,t){var i,n=t.style,o=t.havingStyle(n.sup()),r=Y0(d4(e.body,o,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";r.classes.push(s+"-arrow-pad"),e.below&&(o=t.havingStyle(n.sub()),(i=Y0(d4(e.below,o,t),t)).classes.push(s+"-arrow-pad"));var a,l=P4(e,t),M=-t.fontMetrics().axisHeight+.5*l.height,c=-t.fontMetrics().axisHeight-.5*l.height-.111;if((r.depth>.25||"\\xleftequilibrium"===e.label)&&(c-=r.depth),i){var g=-t.fontMetrics().axisHeight+i.height+.5*l.height+.111;a=Z0({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:l,shift:M,wrapperClasses:["svg-align"]},{type:"elem",elem:i,shift:g}]})}else a=Z0({positionType:"individualShift",children:[{type:"elem",elem:r,shift:c},{type:"elem",elem:l,shift:M,wrapperClasses:["svg-align"]}]});return E0(["mrel","x-arrow"],[a],t)},mathmlBuilder(e,t){var i,n=Y4(e.label);if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var o=X4(L4(e.body,t));if(e.below){var r=X4(L4(e.below,t));i=new D4("munderover",[n,r,o])}else i=new D4("mover",[n,o])}else if(e.below){var s=X4(L4(e.below,t));i=new D4("munder",[n,s])}else i=X4(),i=new D4("mover",[n,i]);return i}}),K0({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:i,funcName:n}=e,o=t[0];return{type:"mclass",mode:i.mode,mclass:"m"+n.slice(5),body:i4(o),isCharacterBox:Pq(o)}},htmlBuilder:q4,mathmlBuilder:K4});var e1=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};K0({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:i}=e;return{type:"mclass",mode:i.mode,mclass:e1(t[0]),body:i4(t[1]),isCharacterBox:Pq(t[1])}}}),K0({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var i,{parser:n,funcName:o}=e,r=t[1],s=t[0];i="\\stackrel"!==o?e1(r):"mrel";var a={type:"op",mode:r.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==o,body:i4(r)},l={type:"supsub",mode:s.mode,base:a,sup:"\\underset"===o?null:s,sub:"\\underset"===o?s:null};return{type:"mclass",mode:n.mode,mclass:i,body:[l],isCharacterBox:Pq(l)}},htmlBuilder:q4,mathmlBuilder:K4}),K0({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"pmb",mode:i.mode,mclass:e1(t[0]),body:i4(t[0])}},htmlBuilder(e,t){var i=a4(e.body,t,!0),n=E0([e.mclass],i,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var i=f4(e.body,t),n=new D4("mstyle",i);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var t1={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},i1=e=>"textord"===e.type&&"@"===e.text;function n1(e,t,i){var n=t1[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return i.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var o={type:"atom",text:n,mode:"math",family:"rel"},r={type:"ordgroup",mode:"math",body:[i.callFunction("\\\\cdleft",[t[0]],[]),i.callFunction("\\Big",[o],[]),i.callFunction("\\\\cdright",[t[1]],[])]};return i.callFunction("\\\\cdparent",[r],[]);case"\\\\cdlongequal":return i.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return i.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}K0({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:n}=e;return{type:"cdlabel",mode:i.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var i=t.havingStyle(t.style.sup()),n=Y0(d4(e.label,i,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=uK(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var i=new D4("mrow",[L4(e.label,t)]);return(i=new D4("mpadded",[i])).setAttribute("width","0"),"left"===e.side&&i.setAttribute("lspace","-1width"),i.setAttribute("voffset","0.7em"),(i=new D4("mstyle",[i])).setAttribute("displaystyle","false"),i.setAttribute("scriptlevel","1"),i}}),K0({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:i}=e;return{type:"cdlabelparent",mode:i.mode,fragment:t[0]}},htmlBuilder(e,t){var i=Y0(d4(e.fragment,t),t);return i.classes.push("cd-vert-arrow"),i},mathmlBuilder:(e,t)=>new D4("mrow",[L4(e.fragment,t)])}),K0({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:i}=e,n=W4(t[0],"ordgroup").body,o="",r=0;r<n.length;r++){o+=W4(n[r],"textord").text}var s,a=parseInt(o);if(isNaN(a))throw new Eq("\\@char has non-numeric argument "+o);if(a<0||a>=1114111)throw new Eq("\\@char with invalid code point "+o);return a<=65535?s=String.fromCharCode(a):(a-=65536,s=String.fromCharCode(55296+(a>>10),56320+(1023&a))),{type:"textord",mode:i.mode,text:s}}});var o1=(e,t)=>{var i=a4(e.body,t.withColor(e.color),!1);return U0(i)},r1=(e,t)=>{var i=f4(e.body,t.withColor(e.color)),n=new D4("mstyle",i);return n.setAttribute("mathcolor",e.color),n};K0({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:i}=e,n=W4(t[0],"color-token").color,o=t[1];return{type:"color",mode:i.mode,color:n,body:i4(o)}},htmlBuilder:o1,mathmlBuilder:r1}),K0({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:i,breakOnTokenText:n}=e,o=W4(t[0],"color-token").color;i.gullet.macros.set("\\current@color",o);var r=i.parseExpression(!0,n);return{type:"color",mode:i.mode,color:o,body:r}},htmlBuilder:o1,mathmlBuilder:r1}),K0({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,i){var{parser:n}=e,o="["===n.gullet.future().text?n.parseSizeGroup(!0):null,r=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:r,size:o&&W4(o,"size").value}},htmlBuilder(e,t){var i=E0(["mspace"],[],t);return e.newLine&&(i.classes.push("newline"),e.size&&(i.style.marginTop=uK(gK(e.size,t)))),i},mathmlBuilder(e,t){var i=new D4("mspace");return e.newLine&&(i.setAttribute("linebreak","newline"),e.size&&i.setAttribute("height",uK(gK(e.size,t)))),i}});var s1={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},a1=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Eq("Expected a control sequence",e);return t},l1=(e,t,i,n)=>{var o=e.gullet.macros.get(i.text);null==o&&(i.noexpand=!0,o={tokens:[i],numArgs:0,unexpandable:!e.gullet.isExpandable(i.text)}),e.gullet.macros.set(t,o,n)};K0({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:i}=e;t.consumeSpaces();var n=t.fetch();if(s1[n.text])return"\\global"!==i&&"\\\\globallong"!==i||(n.text=s1[n.text]),W4(t.parseFunction(),"internal");throw new Eq("Invalid token after macro prefix",n)}}),K0({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,n=t.gullet.popToken(),o=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new Eq("Expected a control sequence",n);for(var r,s=0,a=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){r=t.gullet.future(),a[s].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Eq('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new Eq('Argument number "'+n.text+'" out of order');s++,a.push([])}else{if("EOF"===n.text)throw new Eq("Expected a macro definition");a[s].push(n.text)}var{tokens:l}=t.gullet.consumeArg();return r&&l.unshift(r),"\\edef"!==i&&"\\xdef"!==i||(l=t.gullet.expandTokens(l)).reverse(),t.gullet.macros.set(o,{tokens:l,numArgs:s,delimiters:a},i===s1[i]),{type:"internal",mode:t.mode}}}),K0({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,n=a1(t.gullet.popToken());t.gullet.consumeSpaces();var o=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return l1(t,n,o,"\\\\globallet"===i),{type:"internal",mode:t.mode}}}),K0({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:i}=e,n=a1(t.gullet.popToken()),o=t.gullet.popToken(),r=t.gullet.popToken();return l1(t,n,r,"\\\\globalfuture"===i),t.gullet.pushToken(r),t.gullet.pushToken(o),{type:"internal",mode:t.mode}}});var M1=function(e,t,i){var n=vK(kK.math[e]&&kK.math[e].replace||e,t,i);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},c1=function(e,t,i,n){var o=i.havingBaseStyle(t),r=E0(n.concat(o.sizingClasses(i)),[e],i),s=o.sizeMultiplier/i.sizeMultiplier;return r.height*=s,r.depth*=s,r.maxFontSize=o.sizeMultiplier,r},g1=function(e,t,i){var n=t.havingBaseStyle(i),o=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=uK(o),e.height-=o,e.depth+=o},u1=function(e,t,i,n,o,r){var s=function(e,t,i,n){return b0(e,"Size"+t+"-Regular",i,n)}(e,t,o,n),a=c1(E0(["delimsizing","size"+t],[s],n),eK.TEXT,n,r);return i&&g1(a,n,eK.TEXT),a},d1=function(e,t,i){return{type:"elem",elem:E0(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[E0([],[b0(e,t,i)])])}},h1=function(e,t,i){var n=fK["Size4-Regular"][e.charCodeAt(0)]?fK["Size4-Regular"][e.charCodeAt(0)][4]:fK["Size1-Regular"][e.charCodeAt(0)][4],o=new AK("inner",function(e,t){switch(e){case"⎜":return oK("M291 0 H417 V"+t+" H291z");case"∣":return oK("M145 0 H188 V"+t+" H145z");case"∥":return oK("M145 0 H188 V"+t+" H145z")+oK("M367 0 H410 V"+t+" H367z");case"⎟":return oK("M457 0 H583 V"+t+" H457z");case"⎢":return oK("M319 0 H403 V"+t+" H319z");case"⎥":return oK("M263 0 H347 V"+t+" H263z");case"⎪":return oK("M384 0 H504 V"+t+" H384z");case"⏐":return oK("M312 0 H355 V"+t+" H312z");case"‖":return oK("M257 0 H300 V"+t+" H257z")+oK("M478 0 H521 V"+t+" H478z");default:return""}}(e,Math.round(1e3*t))),r=new xK([o],{width:uK(n),height:uK(t),style:"width:"+uK(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),s=C0([],[r],i);return s.height=t,s.style.height=uK(t),s.style.width=uK(n),{type:"elem",elem:s}},N1={type:"kern",size:-.008},p1=new Set(["|","\\lvert","\\rvert","\\vert"]),D1=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),y1=function(e,t,i,n,o,r){var s,a,l,M,c="",g=0;s=l=M=e,a=null;var u="Size1-Regular";"\\uparrow"===e?l=M="⏐":"\\Uparrow"===e?l=M="‖":"\\downarrow"===e?s=l="⏐":"\\Downarrow"===e?s=l="‖":"\\updownarrow"===e?(s="\\uparrow",l="⏐",M="\\downarrow"):"\\Updownarrow"===e?(s="\\Uparrow",l="‖",M="\\Downarrow"):p1.has(e)?(l="∣",c="vert",g=333):D1.has(e)?(l="∥",c="doublevert",g=556):"["===e||"\\lbrack"===e?(s="⎡",l="⎢",M="⎣",u="Size4-Regular",c="lbrack",g=667):"]"===e||"\\rbrack"===e?(s="⎤",l="⎥",M="⎦",u="Size4-Regular",c="rbrack",g=667):"\\lfloor"===e||"⌊"===e?(l=s="⎢",M="⎣",u="Size4-Regular",c="lfloor",g=667):"\\lceil"===e||"⌈"===e?(s="⎡",l=M="⎢",u="Size4-Regular",c="lceil",g=667):"\\rfloor"===e||"⌋"===e?(l=s="⎥",M="⎦",u="Size4-Regular",c="rfloor",g=667):"\\rceil"===e||"⌉"===e?(s="⎤",l=M="⎥",u="Size4-Regular",c="rceil",g=667):"("===e||"\\lparen"===e?(s="⎛",l="⎜",M="⎝",u="Size4-Regular",c="lparen",g=875):")"===e||"\\rparen"===e?(s="⎞",l="⎟",M="⎠",u="Size4-Regular",c="rparen",g=875):"\\{"===e||"\\lbrace"===e?(s="⎧",a="⎨",M="⎩",l="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(s="⎫",a="⎬",M="⎭",l="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(s="⎧",M="⎩",l="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(s="⎫",M="⎭",l="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(s="⎧",M="⎭",l="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(s="⎫",M="⎩",l="⎪",u="Size4-Regular");var d=M1(s,u,o),h=d.height+d.depth,N=M1(l,u,o),p=N.height+N.depth,D=M1(M,u,o),y=D.height+D.depth,I=0,j=1;if(null!==a){var z=M1(a,u,o);I=z.height+z.depth,j=2}var m=h+y+I,T=m+Math.max(0,Math.ceil((t-m)/(j*p)))*j*p,x=n.fontMetrics().axisHeight;i&&(x*=n.sizeMultiplier);var A=T/2-x,O=[];if(c.length>0){var f=T-h-y,b=Math.round(1e3*T),L=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 v84 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(c,Math.round(1e3*f)),w=new AK(c,L),v=uK(g/1e3),S=uK(b/1e3),k=new xK([w],{width:v,height:S,viewBox:"0 0 "+g+" "+b}),E=C0([],[k],n);E.height=b/1e3,E.style.width=v,E.style.height=S,O.push({type:"elem",elem:E})}else{if(O.push(d1(M,u,o)),O.push(N1),null===a){var C=T-h-y+.016;O.push(h1(l,C,n))}else{var Q=(T-h-y-I)/2+.016;O.push(h1(l,Q,n)),O.push(N1),O.push(d1(a,u,o)),O.push(N1),O.push(h1(l,Q,n))}O.push(N1),O.push(d1(s,u,o))}var U=n.havingBaseStyle(eK.TEXT),Y=Z0({positionType:"bottom",positionData:A,children:O});return c1(E0(["delimsizing","mult"],[Y],U),eK.TEXT,n,r)},I1=.08,j1=function(e,t,i,n,o){var r=function(e,t,i){t*=1e3;var n="";switch(e){case"sqrtMain":n=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,rK);break;case"sqrtSize1":n=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,rK);break;case"sqrtSize2":n=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,rK);break;case"sqrtSize3":n=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,rK);break;case"sqrtSize4":n=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,rK);break;case"sqrtTall":n=function(e,t,i){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(i-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,rK,i)}return n}(e,n,i),s=new AK(e,r),a=new xK([s],{width:"400em",height:uK(t),viewBox:"0 0 400000 "+i,preserveAspectRatio:"xMinYMin slice"});return C0(["hide-tail"],[a],o)},z1=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),m1=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),T1=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),x1=[0,1.2,1.8,2.4,3],A1=function(e,t,i,n,o){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),z1.has(e)||T1.has(e))return u1(e,t,!1,i,n,o);if(m1.has(e))return y1(e,x1[t],!1,i,n,o);throw new Eq("Illegal delimiter: '"+e+"'")},O1=[{type:"small",style:eK.SCRIPTSCRIPT},{type:"small",style:eK.SCRIPT},{type:"small",style:eK.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],f1=[{type:"small",style:eK.SCRIPTSCRIPT},{type:"small",style:eK.SCRIPT},{type:"small",style:eK.TEXT},{type:"stack"}],b1=[{type:"small",style:eK.SCRIPTSCRIPT},{type:"small",style:eK.SCRIPT},{type:"small",style:eK.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],L1=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";var t=e.type;throw new Error("Add support for delim type '"+t+"' here.")},w1=function(e,t,i,n){for(var o=Math.min(2,3-n.style.size);o<i.length;o++){var r=i[o];if("stack"===r.type)break;var s=M1(e,L1(r),"math"),a=s.height+s.depth;if("small"===r.type)a*=n.havingBaseStyle(r.style).sizeMultiplier;if(a>t)return r}return i[i.length-1]},v1=function(e,t,i,n,o,r){var s;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),s=T1.has(e)?O1:z1.has(e)?b1:f1;var a=w1(e,t,s,n);return"small"===a.type?function(e,t,i,n,o,r){var s=b0(e,"Main-Regular",o,n),a=c1(s,t,n,r);return i&&g1(a,n,t),a}(e,a.style,i,n,o,r):"large"===a.type?u1(e,a.size,i,n,o,r):y1(e,t,i,n,o,r)},S1=function(e,t,i,n,o,r){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,a=5/n.fontMetrics().ptPerEm,l=Math.max(t-s,i+s),M=Math.max(l/500*901,2*l-a);return v1(e,M,!0,n,o,r)},k1={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},E1=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function C1(e){return"isMiddle"in e}function Q1(e,t){var i=$4(e);if(i&&E1.has(i.text))return i;throw new Eq(i?"Invalid delimiter '"+i.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function U1(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}K0({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var i=Q1(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:k1[e.funcName].size,mclass:k1[e.funcName].mclass,delim:i.text}},htmlBuilder:(e,t)=>"."===e.delim?E0([e.mclass]):A1(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(m4(e.delim,e.mode));var i=new D4("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?i.setAttribute("fence","true"):i.setAttribute("fence","false"),i.setAttribute("stretchy","true");var n=uK(x1[e.size]);return i.setAttribute("minsize",n),i.setAttribute("maxsize",n),i}}),K0({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=e.parser.gullet.macros.get("\\current@color");if(i&&"string"!=typeof i)throw new Eq("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Q1(t[0],e).text,color:i}}}),K0({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=Q1(t[0],e),n=e.parser;++n.leftrightDepth;var o=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var r=W4(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:o,left:i.text,right:r.delim,rightColor:r.color}},htmlBuilder:(e,t)=>{U1(e);for(var i,n,o=a4(e.body,t,!0,["mopen","mclose"]),r=0,s=0,a=!1,l=0;l<o.length;l++){C1(o[l])?a=!0:(r=Math.max(o[l].height,r),s=Math.max(o[l].depth,s))}if(r*=t.sizeMultiplier,s*=t.sizeMultiplier,i="."===e.left?u4(t,["mopen"]):S1(e.left,r,s,t,e.mode,["mopen"]),o.unshift(i),a)for(var M=1;M<o.length;M++){var c=o[M];if(C1(c)){var g=c.isMiddle;o[M]=S1(g.delim,r,s,g.options,e.mode,[])}}if("."===e.right)n=u4(t,["mclose"]);else{var u=e.rightColor?t.withColor(e.rightColor):t;n=S1(e.right,r,s,u,e.mode,["mclose"])}return o.push(n),E0(["minner"],o,t)},mathmlBuilder:(e,t)=>{U1(e);var i=f4(e.body,t);if("."!==e.left){var n=new D4("mo",[m4(e.left,e.mode)]);n.setAttribute("fence","true"),i.unshift(n)}if("."!==e.right){var o=new D4("mo",[m4(e.right,e.mode)]);o.setAttribute("fence","true"),e.rightColor&&o.setAttribute("mathcolor",e.rightColor),i.push(o)}return T4(i)}}),K0({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=Q1(t[0],e);if(!e.parser.leftrightDepth)throw new Eq("\\middle without preceding \\left",i);return{type:"middle",mode:e.parser.mode,delim:i.text}},htmlBuilder:(e,t)=>{var i;return"."===e.delim?i=u4(t,[]):(i=A1(e.delim,1,t,e.mode,[])).isMiddle={delim:e.delim,options:t},i},mathmlBuilder:(e,t)=>{var i="\\vert"===e.delim||"|"===e.delim?m4("|","text"):m4(e.delim,e.mode),n=new D4("mo",[i]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Y1=(e,t)=>{var i,n,o,r=Y0(d4(e.body,t),t),s=e.label.slice(1),a=t.sizeMultiplier,l=Pq(e.body);if("sout"===s)(i=E0(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/a,n=-.5*t.fontMetrics().xHeight;else if("phase"===s){var M=gK({number:.6,unit:"pt"},t),c=gK({number:.35,unit:"ex"},t);a/=t.havingBaseSizing().sizeMultiplier;var g=r.height+r.depth+M+c;r.style.paddingLeft=uK(g/2+M);var u=Math.floor(1e3*g*a),d=function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"}(u),h=new xK([new AK("phase",d)],{width:"400em",height:uK(u/1e3),viewBox:"0 0 400000 "+u,preserveAspectRatio:"xMinYMin slice"});(i=C0(["hide-tail"],[h],t)).style.height=uK(g),n=r.depth+M+c}else{var N,p;/cancel/.test(s)?l||r.classes.push("cancel-pad"):"angl"===s?r.classes.push("anglpad"):r.classes.push("boxpad");var D=0;/box/.test(s)?(D=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=N=t.fontMetrics().fboxsep+("colorbox"===s?0:D)):"angl"===s?(N=4*(D=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),p=Math.max(0,.25-r.depth)):p=N=l?.2:0,i=function(e,t,i,n,o){var r,s=e.height+e.depth+i+n;if(/fbox|color|angl/.test(t)){if(r=E0(["stretchy",t],[],o),"fbox"===t){var a=o.color&&o.getColor();a&&(r.style.borderColor=a)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new OK({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new OK({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var M=new xK(l,{width:"100%",height:uK(s)});r=C0([],[M],o)}return r.height=s,r.style.height=uK(s),r}(r,s,N,p,t),/fbox|boxed|fcolorbox/.test(s)?(i.style.borderStyle="solid",i.style.borderWidth=uK(D)):"angl"===s&&.049!==D&&(i.style.borderTopWidth=uK(D),i.style.borderRightWidth=uK(D)),n=r.depth+p,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}if(e.backgroundColor)o=Z0({positionType:"individualShift",children:[{type:"elem",elem:i,shift:n},{type:"elem",elem:r,shift:0}]});else{var y=/cancel|phase/.test(s)?["svg-align"]:[];o=Z0({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:i,shift:n,wrapperClasses:y}]})}return/cancel/.test(s)&&(o.height=r.height,o.depth=r.depth),/cancel/.test(s)&&!l?E0(["mord","cancel-lap"],[o],t):E0(["mord"],[o],t)},Z1=(e,t)=>{var i,n=new D4(e.label.includes("colorbox")?"mpadded":"menclose",[L4(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(i=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*i+"pt"),n.setAttribute("height","+"+2*i+"pt"),n.setAttribute("lspace",i+"pt"),n.setAttribute("voffset",i+"pt"),"\\fcolorbox"===e.label){var o=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+uK(o)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};K0({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,i){var{parser:n,funcName:o}=e,r=W4(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:n.mode,label:o,backgroundColor:r,body:s}},htmlBuilder:Y1,mathmlBuilder:Z1}),K0({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,i){var{parser:n,funcName:o}=e,r=W4(t[0],"color-token").color,s=W4(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:n.mode,label:o,backgroundColor:s,borderColor:r,body:a}},htmlBuilder:Y1,mathmlBuilder:Z1}),K0({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"enclose",mode:i.mode,label:"\\fbox",body:t[0]}}}),K0({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:n}=e,o=t[0];return{type:"enclose",mode:i.mode,label:n,body:o}},htmlBuilder:Y1,mathmlBuilder:Z1}),K0({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:i,funcName:n}=e;"math"===i.mode&&i.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var o=t[0];return{type:"enclose",mode:i.mode,label:n,body:o}},htmlBuilder:Y1,mathmlBuilder:Z1}),K0({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:i}=e;return{type:"enclose",mode:i.mode,label:"\\angl",body:t[0]}}});var _1={};function P1(e){for(var{type:t,names:i,props:n,handler:o,htmlBuilder:r,mathmlBuilder:s}=e,a={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o},l=0;l<i.length;++l)_1[i[l]]=a;r&&(X0[t]=r),s&&(q0[t]=s)}var V1={};function R1(e,t){V1[e]=t}class W1{constructor(e,t,i){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=i}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new W1(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class B1{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new B1(t,W1.range(this,e))}}function $1(e){var t=[];e.consumeSpaces();var i=e.fetch().text;for("\\relax"===i&&(e.consume(),e.consumeSpaces(),i=e.fetch().text);"\\hline"===i||"\\hdashline"===i;)e.consume(),t.push("\\hdashline"===i),e.consumeSpaces(),i=e.fetch().text;return t}var F1=e=>{if(!e.parser.settings.displayMode)throw new Eq("{"+e.envName+"} can be used only in display mode.")},G1=new Set(["gather","gather*"]);function H1(e){if(!e.includes("ed"))return!e.includes("*")}function J1(e,t,i){var{hskipBeforeAndAfter:n,addJot:o,cols:r,arraystretch:s,colSeparationType:a,autoTag:l,singleRow:M,emptySingleRow:c,maxNumCols:g,leqno:u}=t;if(e.gullet.beginGroup(),M||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var d=e.gullet.expandMacroAsText("\\arraystretch");if(null==d)s=1;else if(!(s=parseFloat(d))||s<0)throw new Eq("Invalid \\arraystretch: "+d)}e.gullet.beginGroup();var h=[],N=[h],p=[],D=[],y=null!=l?[]:void 0;function I(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function j(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new B1("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(l)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(I(),D.push($1(e));;){var z=e.parseExpression(!1,M?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var m={type:"ordgroup",mode:e.mode,body:z};i&&(m={type:"styling",mode:e.mode,style:i,resetFont:!0,body:[m]}),h.push(m);var T=e.fetch().text;if("&"===T){if(g&&h.length===g){if(M||a)throw new Eq("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===T){j(),1===h.length&&"styling"===m.type&&1===m.body.length&&"ordgroup"===m.body[0].type&&0===m.body[0].body.length&&(N.length>1||!c)&&N.pop(),D.length<N.length+1&&D.push([]);break}if("\\\\"!==T)throw new Eq("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var x=void 0;" "!==e.gullet.future().text&&(x=e.parseSizeGroup(!0)),p.push(x?x.value:null),j(),D.push($1(e)),h=[],N.push(h),I()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:o,arraystretch:s,body:N,cols:r,rowGaps:p,hskipBeforeAndAfter:n,hLinesBeforeRow:D,colSeparationType:a,tags:y,leqno:u}}function X1(e){return"d"===e.slice(0,1)?"display":"text"}var q1=function(e,t){var i,n,o=e.body.length,r=e.hLinesBeforeRow,s=0,a=new Array(o),l=[],M=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),c=1/t.fontMetrics().ptPerEm,g=5*c;e.colSeparationType&&"small"===e.colSeparationType&&(g=t.havingStyle(eK.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var u="CD"===e.colSeparationType?gK({number:3,unit:"ex"},t):12*c,d=3*c,h=e.arraystretch*u,N=.7*h,p=.3*h,D=0;function y(e){for(var t=0;t<e.length;++t)t>0&&(D+=.25),l.push({pos:D,isDashed:e[t]})}for(y(r[0]),i=0;i<e.body.length;++i){var I=e.body[i],j=N,z=p;s<I.length&&(s=I.length);var m={cells:new Array(I.length),height:0,depth:0,pos:0};for(n=0;n<I.length;++n){var T=d4(I[n],t);z<T.depth&&(z=T.depth),j<T.height&&(j=T.height),m.cells[n]=T}var x=e.rowGaps[i],A=0;x&&(A=gK(x,t))>0&&(z<(A+=p)&&(z=A),A=0),e.addJot&&i<e.body.length-1&&(z+=d),m.height=j,m.depth=z,D+=j,m.pos=D,D+=z+A,a[i]=m,y(r[i+1])}var O,f,b=D/2+t.fontMetrics().axisHeight,L=e.cols||[],w=[],v=[];if(e.tags&&e.tags.some((e=>e)))for(i=0;i<o;++i){var S=a[i],k=S.pos-b,E=e.tags[i],C=void 0;(C=!0===E?E0(["eqn-num"],[],t):E0([],!1===E?[]:a4(E,t,!0),t)).depth=S.depth,C.height=S.height,v.push({type:"elem",elem:C,shift:k})}for(n=0,f=0;n<s||f<L.length;++n,++f){for(var Q,U=L[f],Y=!0;"separator"===(null==(Z=U)?void 0:Z.type);){var Z;if(Y||((O=E0(["arraycolsep"],[])).style.width=uK(t.fontMetrics().doubleRuleSep),w.push(O)),"|"!==U.separator&&":"!==U.separator)throw new Eq("Invalid separator type: "+U.separator);var _="|"===U.separator?"solid":"dashed",P=E0(["vertical-separator"],[],t);P.style.height=uK(D),P.style.borderRightWidth=uK(M),P.style.borderRightStyle=_,P.style.margin="0 "+uK(-M/2);var V=D-b;V&&(P.style.verticalAlign=uK(-V)),w.push(P),U=L[++f],Y=!1}if(!(n>=s)){var R,W,B=void 0;if(n>0||e.hskipBeforeAndAfter)0!==(B=null!=(R=null==(W=U)?void 0:W.pregap)?R:g)&&((O=E0(["arraycolsep"],[])).style.width=uK(B),w.push(O));var $=[];for(i=0;i<o;++i){var F=a[i],G=F.cells[n];if(G){var H=F.pos-b;G.depth=F.depth,G.height=F.height,$.push({type:"elem",elem:G,shift:H})}}var J,X,q=Z0({positionType:"individualShift",children:$}),K=E0(["col-align-"+((null==(Q=U)?void 0:Q.align)||"c")],[q]);if(w.push(K),n<s-1||e.hskipBeforeAndAfter)0!==(B=null!=(J=null==(X=U)?void 0:X.postgap)?J:g)&&((O=E0(["arraycolsep"],[])).style.width=uK(B),w.push(O))}}var ee=E0(["mtable"],w);if(l.length>0){for(var te=Q0("hline",t,M),ie=Q0("hdashline",t,M),ne=[{type:"elem",elem:ee,shift:0}];l.length>0;){var oe=l.pop(),re=oe.pos-b;oe.isDashed?ne.push({type:"elem",elem:ie,shift:re}):ne.push({type:"elem",elem:te,shift:re})}ee=Z0({positionType:"individualShift",children:ne})}if(0===v.length)return E0(["mord"],[ee],t);var se=Z0({positionType:"individualShift",children:v}),ae=E0(["tag"],[se],t);return U0([ee,ae])},K1={c:"center ",l:"left ",r:"right "},e2=function(e,t){for(var i=[],n=new D4("mtd",[],["mtr-glue"]),o=new D4("mtd",[],["mml-eqn-num"]),r=0;r<e.body.length;r++){for(var s=e.body[r],a=[],l=0;l<s.length;l++)a.push(new D4("mtd",[L4(s[l],t)]));e.tags&&e.tags[r]&&(a.unshift(n),a.push(n),e.leqno?a.unshift(o):a.push(o)),i.push(new D4("mtr",a))}var M=new D4("mtable",i),c=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);M.setAttribute("rowspacing",uK(c));var g="",u="";if(e.cols&&e.cols.length>0){var d=e.cols,h="",N=!1,p=0,D=d.length;"separator"===d[0].type&&(g+="top ",p=1),"separator"===d[d.length-1].type&&(g+="bottom ",D-=1);for(var y=p;y<D;y++){var I=d[y];"align"===I.type?(u+=K1[I.align],N&&(h+="none "),N=!0):"separator"===I.type&&N&&(h+="|"===I.separator?"solid ":"dashed ",N=!1)}M.setAttribute("columnalign",u.trim()),/[sd]/.test(h)&&M.setAttribute("columnlines",h.trim())}if("align"===e.colSeparationType){for(var j=e.cols||[],z="",m=1;m<j.length;m++)z+=m%2?"0em ":"1em ";M.setAttribute("columnspacing",z.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?M.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?M.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?M.setAttribute("columnspacing","0.5em"):M.setAttribute("columnspacing","1em");var T="",x=e.hLinesBeforeRow;g+=x[0].length>0?"left ":"",g+=x[x.length-1].length>0?"right ":"";for(var A=1;A<x.length-1;A++)T+=0===x[A].length?"none ":x[A][0]?"dashed ":"solid ";return/[sd]/.test(T)&&M.setAttribute("rowlines",T.trim()),""!==g&&(M=new D4("menclose",[M])).setAttribute("notation",g.trim()),e.arraystretch&&e.arraystretch<1&&(M=new D4("mstyle",[M])).setAttribute("scriptlevel","1"),M},t2=function(e,t){e.envName.includes("ed")||F1(e);var i=[],n=e.envName.includes("at")?"alignat":"align",o="split"===e.envName,r=J1(e.parser,{cols:i,addJot:!0,autoTag:o?void 0:H1(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,a=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var M="",c=0;c<t[0].body.length;c++){M+=W4(t[0].body[c],"textord").text}s=Number(M),a=2*s}var g=!a;r.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var i=W4(e[t],"styling");W4(i.body[0],"ordgroup").body.unshift(l)}if(g)a<e.length&&(a=e.length);else{var n=e.length/2;if(s<n)throw new Eq("Too many math in a row: expected "+s+", but got "+n,e[0])}}));for(var u=0;u<a;++u){var d="r",h=0;u%2==1?d="l":u>0&&g&&(h=1),i[u]={type:"align",align:d,pregap:h,postgap:0}}return r.colSeparationType=g?"align":"alignat",r};P1({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var i=($4(t[0])?[t[0]]:W4(t[0],"ordgroup").body).map((function(e){var t=B4(e).text;if("lcr".includes(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new Eq("Unknown column alignment: "+t,e)})),n={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return J1(e.parser,n,X1(e.envName))},htmlBuilder:q1,mathmlBuilder:e2}),P1({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],i="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:i}]};if("*"===e.envName.charAt(e.envName.length-1)){var o=e.parser;if(o.consumeSpaces(),"["===o.fetch().text){if(o.consume(),o.consumeSpaces(),i=o.fetch().text,!"lcr".includes(i))throw new Eq("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),n.cols=[{type:"align",align:i}]}}var r=J1(e.parser,n,X1(e.envName)),s=Math.max(0,...r.body.map((e=>e.length)));return r.cols=new Array(s).fill({type:"align",align:i}),t?{type:"leftright",mode:e.mode,body:[r],left:t[0],right:t[1],rightColor:void 0}:r},htmlBuilder:q1,mathmlBuilder:e2}),P1({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=J1(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:q1,mathmlBuilder:e2}),P1({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var i=($4(t[0])?[t[0]]:W4(t[0],"ordgroup").body).map((function(e){var t=B4(e).text;if("lc".includes(t))return{type:"align",align:t};throw new Eq("Unknown column alignment: "+t,e)}));if(i.length>1)throw new Eq("{subarray} can contain only one column");var n={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5},o=J1(e.parser,n,"script");if(o.body.length>0&&o.body[0].length>1)throw new Eq("{subarray} can contain only one column");return o},htmlBuilder:q1,mathmlBuilder:e2}),P1({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=J1(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},X1(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:q1,mathmlBuilder:e2}),P1({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:t2,htmlBuilder:q1,mathmlBuilder:e2}),P1({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){G1.has(e.envName)&&F1(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:H1(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return J1(e.parser,t,"display")},htmlBuilder:q1,mathmlBuilder:e2}),P1({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:t2,htmlBuilder:q1,mathmlBuilder:e2}),P1({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){F1(e);var t={autoTag:H1(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return J1(e.parser,t,"display")},htmlBuilder:q1,mathmlBuilder:e2}),P1({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(F1(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var i=e.fetch().text;if("&"!==i&&"\\\\"!==i){if("\\end"===i){0===t[t.length-1].length&&t.pop();break}throw new Eq("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var n,o,r=[],s=[r],a=0;a<t.length;a++){for(var l=t[a],M={type:"styling",body:[],mode:"math",style:"display",resetFont:!0},c=0;c<l.length;c++)if(i1(l[c])){r.push(M);var g=B4(l[c+=1]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(g));else{if(!"<>AV".includes(g))throw new Eq('Expected one of "<>AV=|." after @',l[c]);for(var d=0;d<2;d++){for(var h=!0,N=c+1;N<l.length;N++){if(o=g,("mathord"===(n=l[N]).type||"atom"===n.type)&&n.text===o){h=!1,c=N;break}if(i1(l[N]))throw new Eq("Missing a "+g+" character to complete a CD arrow.",l[N]);u[d].body.push(l[N])}if(h)throw new Eq("Missing a "+g+" character to complete a CD arrow.",l[c])}}var p={type:"styling",body:[n1(g,u,e)],mode:"math",style:"display",resetFont:!0};r.push(p),M={type:"styling",body:[],mode:"math",style:"display",resetFont:!0}}else M.body.push(l[c]);a%2==0?r.push(M):r.shift(),r=[],s.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}(e.parser)),htmlBuilder:q1,mathmlBuilder:e2}),R1("\\nonumber","\\gdef\\@eqnsw{0}"),R1("\\notag","\\nonumber"),K0({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Eq(e.funcName+" valid only within array environment")}});var i2=_1;K0({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:i,funcName:n}=e,o=t[0];if("ordgroup"!==o.type)throw new Eq("Invalid environment name",o);for(var r="",s=0;s<o.body.length;++s)r+=W4(o.body[s],"textord").text;if("\\begin"===n){if(!i2.hasOwnProperty(r))throw new Eq("No such environment: "+r,o);var a=i2[r],{args:l,optArgs:M}=i.parseArguments("\\begin{"+r+"}",a),c={mode:i.mode,envName:r,parser:i},g=a.handler(c,l,M);i.expect("\\end",!1);var u=i.nextToken,d=W4(i.parseFunction(),"environment");if(d.name!==r)throw new Eq("Mismatch: \\begin{"+r+"} matched by \\end{"+d.name+"}",u);return g}return{type:"environment",mode:i.mode,name:r,nameGroup:o}}});var n2=(e,t)=>{var i=e.font,n=t.withFont(i);return d4(e.body,n)},o2=(e,t)=>{var i=e.font,n=t.withFont(i);return L4(e.body,n)},r2={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};K0({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t4(t[0]),r=n;return r in r2&&(r=r2[r]),{type:"font",mode:i.mode,font:r.slice(1),body:o}},htmlBuilder:n2,mathmlBuilder:o2}),K0({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:i}=e,n=t[0];return{type:"mclass",mode:i.mode,mclass:e1(n),body:[{type:"font",mode:i.mode,font:"boldsymbol",body:n}],isCharacterBox:Pq(n)}}}),K0({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:i,funcName:n,breakOnTokenText:o}=e,{mode:r}=i,s=i.parseExpression(!0,o);return{type:"font",mode:r,font:"math"+n.slice(1),body:{type:"ordgroup",mode:i.mode,body:s}}},htmlBuilder:n2,mathmlBuilder:o2});var s2=(e,t)=>t?{type:"styling",mode:e.mode,style:t,body:[e]}:e;K0({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var i,{parser:n,funcName:o}=e,r=t[0],s=t[1],a=null,l=null;switch(o){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,a="(",l=")";break;case"\\\\bracefrac":i=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":i=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var M="\\cfrac"===o,c=null;return M||o.startsWith("\\d")?c="display":o.startsWith("\\t")&&(c="text"),s2({type:"genfrac",mode:n.mode,numer:r,denom:s,continued:M,hasBarLine:i,leftDelim:a,rightDelim:l,barSize:null},c)},htmlBuilder:(e,t)=>{var i,n=t.style,o=n.fracNum(),r=n.fracDen();i=t.havingStyle(o);var s=d4(e.numer,i,t);if(e.continued){var a=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height<a?a:s.height,s.depth=s.depth<l?l:s.depth}i=t.havingStyle(r);var M,c,g,u,d,h,N,p,D,y,I=d4(e.denom,i,t);if(e.hasBarLine?(e.barSize?(c=gK(e.barSize,t),M=Q0("frac-line",t,c)):M=Q0("frac-line",t),c=M.height,g=M.height):(M=null,c=0,g=t.fontMetrics().defaultRuleThickness),n.size===eK.DISPLAY.size?(u=t.fontMetrics().num1,d=c>0?3*g:7*g,h=t.fontMetrics().denom1):(c>0?(u=t.fontMetrics().num2,d=g):(u=t.fontMetrics().num3,d=3*g),h=t.fontMetrics().denom2),M){var j=t.fontMetrics().axisHeight;u-s.depth-(j+.5*c)<d&&(u+=d-(u-s.depth-(j+.5*c))),j-.5*c-(I.height-h)<d&&(h+=d-(j-.5*c-(I.height-h))),N=Z0({positionType:"individualShift",children:[{type:"elem",elem:I,shift:h},{type:"elem",elem:M,shift:-(j-.5*c)},{type:"elem",elem:s,shift:-u}]})}else{var z=u-s.depth-(I.height-h);z<d&&(u+=.5*(d-z),h+=.5*(d-z)),N=Z0({positionType:"individualShift",children:[{type:"elem",elem:I,shift:h},{type:"elem",elem:s,shift:-u}]})}return i=t.havingStyle(n),N.height*=i.sizeMultiplier/t.sizeMultiplier,N.depth*=i.sizeMultiplier/t.sizeMultiplier,p=n.size===eK.DISPLAY.size?t.fontMetrics().delim1:n.size===eK.SCRIPTSCRIPT.size?t.havingStyle(eK.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,D=null==e.leftDelim?u4(t,["mopen"]):v1(e.leftDelim,p,!0,t.havingStyle(n),e.mode,["mopen"]),y=e.continued?E0([]):null==e.rightDelim?u4(t,["mclose"]):v1(e.rightDelim,p,!0,t.havingStyle(n),e.mode,["mclose"]),E0(["mord"].concat(i.sizingClasses(t)),[D,E0(["mfrac"],[N]),y],t)},mathmlBuilder:(e,t)=>{var i=new D4("mfrac",[L4(e.numer,t),L4(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var n=gK(e.barSize,t);i.setAttribute("linethickness",uK(n))}}else i.setAttribute("linethickness","0px");if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var r=new D4("mo",[new y4(e.leftDelim.replace("\\",""))]);r.setAttribute("fence","true"),o.push(r)}if(o.push(i),null!=e.rightDelim){var s=new D4("mo",[new y4(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}return T4(o)}return i}}),K0({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:i,funcName:n,token:o}=e;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:i.mode,replaceWith:t,token:o}}});var a2=["display","text","script","scriptscript"],l2=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};K0({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var i,{parser:n}=e,o=t[4],r=t[5],s=t4(t[0]),a="atom"===s.type&&"open"===s.family?l2(s.text):null,l=t4(t[1]),M="atom"===l.type&&"close"===l.family?l2(l.text):null,c=W4(t[2],"size"),g=null;i=!!c.isBlank||(g=c.value).number>0;var u=null,d=t[3];if("ordgroup"===d.type){if(d.body.length>0){var h=W4(d.body[0],"textord");u=a2[Number(h.text)]}}else d=W4(d,"textord"),u=a2[Number(d.text)];return s2({type:"genfrac",mode:n.mode,numer:o,denom:r,continued:!1,hasBarLine:i,barSize:g,leftDelim:a,rightDelim:M},u)}}),K0({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:i,funcName:n,token:o}=e;return{type:"infix",mode:i.mode,replaceWith:"\\\\abovefrac",size:W4(t[0],"size").value,token:o}}}),K0({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0],r=W4(t[1],"infix").size;if(!r)throw new Error("\\\\abovefrac expected size, but got "+String(r));var s=t[2],a=r.number>0;return{type:"genfrac",mode:i.mode,numer:o,denom:s,continued:!1,hasBarLine:a,barSize:r,leftDelim:null,rightDelim:null}}});var M2=(e,t)=>{var i,n,o=t.style;"supsub"===e.type?(i=e.sup?d4(e.sup,t.havingStyle(o.sup()),t):d4(e.sub,t.havingStyle(o.sub()),t),n=W4(e.base,"horizBrace")):n=W4(e,"horizBrace");var r,s=d4(n.base,t.havingBaseStyle(eK.DISPLAY)),a=P4(n,t);if(r=n.isOver?Z0({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):Z0({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:s}]}),i){var l=E0(["minner",n.isOver?"mover":"munder"],[r],t);r=n.isOver?Z0({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:i}]}):Z0({positionType:"bottom",positionData:l.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:l}]})}return E0(["minner",n.isOver?"mover":"munder"],[r],t)};K0({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:i,funcName:n}=e;return{type:"horizBrace",mode:i.mode,label:n,isOver:n.includes("\\over"),base:t[0]}},htmlBuilder:M2,mathmlBuilder:(e,t)=>{var i=Y4(e.label);return new D4(e.isOver?"mover":"munder",[L4(e.base,t),i])}}),K0({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=t[1],o=W4(t[0],"url").url;return i.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:i.mode,href:o,body:i4(n)}:i.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var i=a4(e.body,t,!1);return function(e,t,i,n){var o=new jK(e,t,i,n);return k0(o),o}(e.href,[],i,t)},mathmlBuilder:(e,t)=>{var i=b4(e.body,t);return i instanceof D4||(i=new D4("mrow",[i])),i.setAttribute("href",e.href),i}}),K0({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=W4(t[0],"url").url;if(!i.settings.isTrusted({command:"\\url",url:n}))return i.formatUnsupportedCmd("\\url");for(var o=[],r=0;r<n.length;r++){var s=n[r];"~"===s&&(s="\\textasciitilde"),o.push({type:"textord",mode:"text",text:s})}var a={type:"text",mode:i.mode,font:"\\texttt",body:o};return{type:"href",mode:i.mode,href:n,body:i4(a)}}}),K0({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:i}=e;return{type:"hbox",mode:i.mode,body:i4(t[0])}},htmlBuilder(e,t){var i=a4(e.body,t.withFont(""),!1);return U0(i)},mathmlBuilder:(e,t)=>new D4("mrow",f4(e.body,t.withFont("")))}),K0({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var i,{parser:n,funcName:o,token:r}=e,s=W4(t[0],"raw").string,a=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(o){case"\\htmlClass":l.class=s,i={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,i={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,i={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var M=s.split(","),c=0;c<M.length;c++){var g=M[c],u=g.indexOf("=");if(u<0)throw new Eq("\\htmlData key/value '"+g+"' missing equals sign");var d=g.slice(0,u),h=g.slice(u+1);l["data-"+d.trim()]=h}i={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(i)?{type:"html",mode:n.mode,attributes:l,body:i4(a)}:n.formatUnsupportedCmd(o)},htmlBuilder:(e,t)=>{var i=a4(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var o=E0(n,i,t);for(var r in e.attributes)"class"!==r&&e.attributes.hasOwnProperty(r)&&o.setAttribute(r,e.attributes[r]);return o},mathmlBuilder:(e,t)=>b4(e.body,t)}),K0({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e;return{type:"htmlmathml",mode:i.mode,html:i4(t[0]),mathml:i4(t[1])}},htmlBuilder:(e,t)=>{var i=a4(e.html,t,!1);return U0(i)},mathmlBuilder:(e,t)=>b4(e.mathml,t)});var c2=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Eq("Invalid size: '"+e+"' in \\includegraphics");var i={number:+(t[1]+t[2]),unit:t[3]};if(!cK(i))throw new Eq("Invalid unit: '"+i.unit+"' in \\includegraphics.");return i};K0({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,i)=>{var{parser:n}=e,o={number:0,unit:"em"},r={number:.9,unit:"em"},s={number:0,unit:"em"},a="";if(i[0])for(var l=W4(i[0],"raw").string.split(","),M=0;M<l.length;M++){var c=l[M].split("=");if(2===c.length){var g=c[1].trim();switch(c[0].trim()){case"alt":a=g;break;case"width":o=c2(g);break;case"height":r=c2(g);break;case"totalheight":s=c2(g);break;default:throw new Eq("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}var u=W4(t[0],"url").url;return""===a&&(a=(a=(a=u).replace(/^.*[\\/]/,"")).substring(0,a.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:u})?{type:"includegraphics",mode:n.mode,alt:a,width:o,height:r,totalheight:s,src:u}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var i=gK(e.height,t),n=0;e.totalheight.number>0&&(n=gK(e.totalheight,t)-i);var o=0;e.width.number>0&&(o=gK(e.width,t));var r={height:uK(i+n)};o>0&&(r.width=uK(o)),n>0&&(r.verticalAlign=uK(-n));var s=new zK(e.src,e.alt,r);return s.height=i,s.depth=n,s},mathmlBuilder:(e,t)=>{var i=new D4("mglyph",[]);i.setAttribute("alt",e.alt);var n=gK(e.height,t),o=0;if(e.totalheight.number>0&&(o=gK(e.totalheight,t)-n,i.setAttribute("valign",uK(-o))),i.setAttribute("height",uK(n+o)),e.width.number>0){var r=gK(e.width,t);i.setAttribute("width",uK(r))}return i.setAttribute("src",e.src),i}}),K0({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:n}=e,o=W4(t[0],"size");if(i.settings.strict){var r="m"===n[1],s="mu"===o.value.unit;r?(s||i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+o.value.unit+" units"),"math"!==i.mode&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:i.mode,dimension:o.value}},htmlBuilder:(e,t)=>_0(e.dimension,t),mathmlBuilder(e,t){var i=gK(e.dimension,t);return new I4(i)}}),K0({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0];return{type:"lap",mode:i.mode,alignment:n.slice(5),body:o}},htmlBuilder:(e,t)=>{var i;"clap"===e.alignment?(i=E0([],[d4(e.body,t)]),i=E0(["inner"],[i],t)):i=E0(["inner"],[d4(e.body,t)]);var n=E0(["fix"],[]),o=E0([e.alignment],[i,n],t),r=E0(["strut"]);return r.style.height=uK(o.height+o.depth),o.depth&&(r.style.verticalAlign=uK(-o.depth)),o.children.unshift(r),o=E0(["thinbox"],[o],t),E0(["mord","vbox"],[o],t)},mathmlBuilder:(e,t)=>{var i=new D4("mpadded",[L4(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";i.setAttribute("lspace",n+"width")}return i.setAttribute("width","0px"),i}}),K0({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:i,parser:n}=e,o=n.mode;n.switchMode("math");var r="\\("===i?"\\)":"$",s=n.parseExpression(!1,r);return n.expect(r),n.switchMode(o),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:s}}}),K0({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Eq("Mismatched "+e.funcName)}});var g2=(e,t)=>{switch(t.style.size){case eK.DISPLAY.size:return e.display;case eK.TEXT.size:return e.text;case eK.SCRIPT.size:return e.script;case eK.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};K0({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:i}=e;return{type:"mathchoice",mode:i.mode,display:i4(t[0]),text:i4(t[1]),script:i4(t[2]),scriptscript:i4(t[3])}},htmlBuilder:(e,t)=>{var i=g2(e,t),n=a4(i,t,!1);return U0(n)},mathmlBuilder:(e,t)=>{var i=g2(e,t);return b4(i,t)}});var u2=(e,t,i,n,o,r,s)=>{e=E0([],[e]);var a,l,M,c=i&&Pq(i);if(t){var g=d4(t,n.havingStyle(o.sup()),n);l={elem:g,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-g.depth)}}if(i){var u=d4(i,n.havingStyle(o.sub()),n);a={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-u.height)}}if(l&&a){var d=n.fontMetrics().bigOpSpacing5+a.elem.height+a.elem.depth+a.kern+e.depth+s;M=Z0({positionType:"bottom",positionData:d,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:uK(-r)},{type:"kern",size:a.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:uK(r)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(a){var h=e.height-s;M=Z0({positionType:"top",positionData:h,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:uK(-r)},{type:"kern",size:a.kern},{type:"elem",elem:e}]})}else{if(!l)return e;var N=e.depth+s;M=Z0({positionType:"bottom",positionData:N,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:uK(r)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}var p=[M];if(a&&0!==r&&!c){var D=E0(["mspace"],[],n);D.style.marginRight=uK(r),p.unshift(D)}return E0(["mop","op-limits"],p,n)},d2=new Set(["\\smallint"]),h2=(e,t)=>{var i,n,o,r=!1;"supsub"===e.type?(i=e.sup,n=e.sub,o=W4(e.base,"op"),r=!0):o=W4(e,"op");var s,a,l=t.style,M=!1;if(l.size===eK.DISPLAY.size&&o.symbol&&!d2.has(o.name)&&(M=!0),o.symbol){var c=M?"Size2-Regular":"Size1-Regular",g="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(g=o.name.slice(1),o.name="oiint"===g?"\\iint":"\\iiint"),a=(s=b0(o.name,c,"math",t,["mop","op-symbol",M?"large-op":"small-op"])).italic,g.length>0){var u=W0(g+"Size"+(M?"2":"1"),t);s=Z0({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:u,shift:M?.08:0}]}),o.name="\\"+g,s.classes.unshift("mop"),s.italic=a}}else if(o.body){var d=a4(o.body,t,!0);1===d.length&&d[0]instanceof TK?(s=d[0]).classes[0]="mop":s=E0(["mop"],d,t)}else{for(var h=[],N=1;N<o.name.length;N++)h.push(L0(o.name[N],o.mode,t));s=E0(["mop"],h,t)}var p,D=0,y=0;(s instanceof TK||"\\oiint"===o.name||"\\oiiint"===o.name)&&!o.suppressBaseShift&&(D=(s.height-s.depth)/2-t.fontMetrics().axisHeight,y=null!=(p=s.italic)?p:0);return r?u2(s,i,n,t,l,y,D):(D&&(s.style.position="relative",s.style.top=uK(D)),s)},N2=(e,t)=>{var i;if(e.symbol)i=new D4("mo",[m4(e.name,e.mode)]),d2.has(e.name)&&i.setAttribute("largeop","false");else if(e.body)i=new D4("mo",f4(e.body,t));else{i=new D4("mi",[new y4(e.name.slice(1))]);var n=new D4("mo",[m4("","text")]);i=e.parentIsSupSub?new D4("mrow",[i,n]):p4([i,n])}return i},p2={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};K0({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=n;return 1===o.length&&(o=p2[o]),{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:h2,mathmlBuilder:N2}),K0({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:i}=e,n=t[0];return{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:i4(n)}},htmlBuilder:h2,mathmlBuilder:N2});var D2={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};K0({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:i}},htmlBuilder:h2,mathmlBuilder:N2}),K0({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:i}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:i}},htmlBuilder:h2,mathmlBuilder:N2}),K0({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:i}=e,n=i;return 1===n.length&&(n=D2[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:h2,mathmlBuilder:N2});var y2=(e,t)=>{var i,n,o,r,s=!1;if("supsub"===e.type?(i=e.sup,n=e.sub,o=W4(e.base,"operatorname"),s=!0):o=W4(e,"operatorname"),o.body.length>0){for(var a=(o.body.map((e=>{var t="text"in e?e.text:void 0;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}))),l=a4(a,t.withFont("mathrm"),!0),M=0;M<l.length;M++){var c=l[M];c instanceof TK&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}r=E0(["mop"],l,t)}else r=E0(["mop"],[],t);return s?u2(r,i,n,t,t.style,0,0):r};function I2(e,t,i){for(var n=a4(e,t,!1),o=t.sizeMultiplier/i.sizeMultiplier,r=0;r<n.length;r++){var s=n[r].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[r].classes,t.sizingClasses(i)):n[r].classes[s+1]==="reset-size"+t.size&&(n[r].classes[s+1]="reset-size"+i.size),n[r].height*=o,n[r].depth*=o}return U0(n)}K0({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:i,funcName:n}=e,o=t[0];return{type:"operatorname",mode:i.mode,body:i4(o),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:y2,mathmlBuilder:(e,t)=>{for(var i=f4(e.body,t.withFont("mathrm")),n=!0,o=0;o<i.length;o++){var r=i[o];if(r instanceof I4);else if(r instanceof D4)switch(r.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":var s=r.children[0];1===r.children.length&&s instanceof y4?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}if(n){var a=i.map((e=>e.toText())).join("");i=[new y4(a)]}var l=new D4("mi",i);l.setAttribute("mathvariant","normal");var M=new D4("mo",[m4("","text")]);return e.parentIsSupSub?new D4("mrow",[l,M]):p4([l,M])}}),R1("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),e4({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?U0(a4(e.body,t,!1)):E0(["mord"],a4(e.body,t,!0),t),mathmlBuilder:(e,t)=>b4(e.body,t,!0)}),K0({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:i}=e,n=t[0];return{type:"overline",mode:i.mode,body:n}},htmlBuilder(e,t){var i=d4(e.body,t.havingCrampedStyle()),n=Q0("overline-line",t),o=t.fontMetrics().defaultRuleThickness,r=Z0({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:3*o},{type:"elem",elem:n},{type:"kern",size:o}]});return E0(["mord","overline"],[r],t)},mathmlBuilder(e,t){var i=new D4("mo",[new y4("‾")]);i.setAttribute("stretchy","true");var n=new D4("mover",[L4(e.body,t),i]);return n.setAttribute("accent","true"),n}}),K0({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=t[0];return{type:"phantom",mode:i.mode,body:i4(n)}},htmlBuilder:(e,t)=>{var i=a4(e.body,t.withPhantom(),!1);return U0(i)},mathmlBuilder:(e,t)=>{var i=f4(e.body,t);return new D4("mphantom",i)}}),R1("\\hphantom","\\smash{\\phantom{#1}}"),K0({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:i}=e,n=t[0];return{type:"vphantom",mode:i.mode,body:n}},htmlBuilder:(e,t)=>{var i=E0(["inner"],[d4(e.body,t.withPhantom())]),n=E0(["fix"],[]);return E0(["mord","rlap"],[i,n],t)},mathmlBuilder:(e,t)=>{var i=f4(i4(e.body),t),n=new D4("mphantom",i),o=new D4("mpadded",[n]);return o.setAttribute("width","0px"),o}}),K0({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:i}=e,n=W4(t[0],"size").value,o=t[1];return{type:"raisebox",mode:i.mode,dy:n,body:o}},htmlBuilder(e,t){var i=d4(e.body,t),n=gK(e.dy,t);return Z0({positionType:"shift",positionData:-n,children:[{type:"elem",elem:i}]})},mathmlBuilder(e,t){var i=new D4("mpadded",[L4(e.body,t)]),n=e.dy.number+e.dy.unit;return i.setAttribute("voffset",n),i}}),K0({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),K0({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,i){var{parser:n}=e,o=i[0],r=W4(t[0],"size"),s=W4(t[1],"size");return{type:"rule",mode:n.mode,shift:o&&W4(o,"size").value,width:r.value,height:s.value}},htmlBuilder(e,t){var i=E0(["mord","rule"],[],t),n=gK(e.width,t),o=gK(e.height,t),r=e.shift?gK(e.shift,t):0;return i.style.borderRightWidth=uK(n),i.style.borderTopWidth=uK(o),i.style.bottom=uK(r),i.width=n,i.height=o+r,i.depth=-r,i.maxFontSize=1.125*o*t.sizeMultiplier,i},mathmlBuilder(e,t){var i=gK(e.width,t),n=gK(e.height,t),o=e.shift?gK(e.shift,t):0,r=t.color&&t.getColor()||"black",s=new D4("mspace");s.setAttribute("mathbackground",r),s.setAttribute("width",uK(i)),s.setAttribute("height",uK(n));var a=new D4("mpadded",[s]);return o>=0?a.setAttribute("height",uK(o)):(a.setAttribute("height",uK(o)),a.setAttribute("depth",uK(-o))),a.setAttribute("voffset",uK(o)),a}});var j2=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];K0({type:"sizing",names:j2,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:i,funcName:n,parser:o}=e,r=o.parseExpression(!1,i);return{type:"sizing",mode:o.mode,size:j2.indexOf(n)+1,body:r}},htmlBuilder:(e,t)=>{var i=t.havingSize(e.size);return I2(e.body,i,t)},mathmlBuilder:(e,t)=>{var i=t.havingSize(e.size),n=f4(e.body,i),o=new D4("mstyle",n);return o.setAttribute("mathsize",uK(i.sizeMultiplier)),o}}),K0({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,i)=>{var{parser:n}=e,o=!1,r=!1,s=i[0]&&W4(i[0],"ordgroup");if(s)for(var a,l=0;l<s.body.length;++l){if("t"===(a=B4(s.body[l]).text))o=!0;else{if("b"!==a){o=!1,r=!1;break}r=!0}}else o=!0,r=!0;var M=t[0];return{type:"smash",mode:n.mode,body:M,smashHeight:o,smashDepth:r}},htmlBuilder:(e,t)=>{var i=E0([],[d4(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return i;if(e.smashHeight&&(i.height=0),e.smashDepth&&(i.depth=0),e.smashHeight&&e.smashDepth)return E0(["mord","smash"],[i],t);if(i.children)for(var n=0;n<i.children.length;n++)e.smashHeight&&(i.children[n].height=0),e.smashDepth&&(i.children[n].depth=0);var o=Z0({positionType:"firstBaseline",children:[{type:"elem",elem:i}]});return E0(["mord"],[o],t)},mathmlBuilder:(e,t)=>{var i=new D4("mpadded",[L4(e.body,t)]);return e.smashHeight&&i.setAttribute("height","0px"),e.smashDepth&&i.setAttribute("depth","0px"),i}}),K0({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){var{parser:n}=e,o=i[0],r=t[0];return{type:"sqrt",mode:n.mode,body:r,index:o}},htmlBuilder(e,t){var i=d4(e.body,t.havingCrampedStyle());0===i.height&&(i.height=t.fontMetrics().xHeight),i=Y0(i,t);var n=t.fontMetrics().defaultRuleThickness,o=n;t.style.id<eK.TEXT.id&&(o=t.fontMetrics().xHeight);var r=n+o/4,s=i.height+i.depth+r+n,{span:a,ruleWidth:l,advanceWidth:M}=function(e,t){var i,n,o,r,s,a=t.havingBaseSizing(),l=w1("\\surd",e*a.sizeMultiplier,b1,a),M=a.sizeMultiplier,c=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);return"small"===l.type?(e<1?M=1:e<1.4&&(M=.7),o=(1+c)/M,(i=j1("sqrtMain",n=(1+c+I1)/M,r=1e3+1e3*c+80,c,t)).style.minWidth="0.853em",s=.833/M):"large"===l.type?(r=1080*x1[l.size],o=(x1[l.size]+c)/M,n=(x1[l.size]+c+I1)/M,(i=j1("sqrtSize"+l.size,n,r,c,t)).style.minWidth="1.02em",s=1/M):(n=e+c+I1,o=e+c,r=Math.floor(1e3*e+c)+80,(i=j1("sqrtTall",n,r,c,t)).style.minWidth="0.742em",s=1.056),i.height=o,i.style.height=uK(n),{span:i,advanceWidth:s,ruleWidth:(t.fontMetrics().sqrtRuleThickness+c)*M}}(s,t),c=a.height-l;c>i.height+i.depth+r&&(r=(r+c-i.height-i.depth)/2);var g=a.height-i.height-r-l;i.style.paddingLeft=uK(M);var u=Z0({positionType:"firstBaseline",children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:-(i.height+g)},{type:"elem",elem:a},{type:"kern",size:l}]});if(e.index){var d=t.havingStyle(eK.SCRIPTSCRIPT),h=d4(e.index,d,t),N=.6*(u.height-u.depth),p=Z0({positionType:"shift",positionData:-N,children:[{type:"elem",elem:h}]}),D=E0(["root"],[p]);return E0(["mord","sqrt"],[D,u],t)}return E0(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:i,index:n}=e;return n?new D4("mroot",[L4(i,t),L4(n,t)]):new D4("msqrt",[L4(i,t)])}});var z2={display:eK.DISPLAY,text:eK.TEXT,script:eK.SCRIPT,scriptscript:eK.SCRIPTSCRIPT};K0({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:i,funcName:n,parser:o}=e,r=o.parseExpression(!0,i),s=n.slice(1,n.length-5);if(!function(e){return e in z2}(s))throw new Error("Unknown style: "+s);return{type:"styling",mode:o.mode,style:s,body:r}},htmlBuilder(e,t){var i=z2[e.style],n=t.havingStyle(i);return e.resetFont&&(n=n.withFont("")),I2(e.body,n,t)},mathmlBuilder(e,t){var i=z2[e.style],n=t.havingStyle(i);e.resetFont&&(n=n.withFont(""));var o=f4(e.body,n),r=new D4("mstyle",o),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return r.setAttribute("scriptlevel",s[0]),r.setAttribute("displaystyle",s[1]),r}});e4({type:"supsub",htmlBuilder(e,t){var i=function(e,t){var i=e.base;return i?"op"===i.type?i.limits&&(t.style.size===eK.DISPLAY.size||i.alwaysHandleSupSub)?h2:null:"operatorname"===i.type?i.alwaysHandleSupSub&&(t.style.size===eK.DISPLAY.size||i.limits)?y2:null:"accent"===i.type?Pq(i.base)?G4:null:"horizBrace"===i.type&&!e.sub===i.isOver?M2:null:null}(e,t);if(i)return i(e,t);var n,o,r,{base:s,sup:a,sub:l}=e,M=d4(s,t),c=t.fontMetrics(),g=0,u=0,d=s&&Pq(s);if(a){var h=t.havingStyle(t.style.sup());n=d4(a,h,t),d||(g=M.height-h.fontMetrics().supDrop*h.sizeMultiplier/t.sizeMultiplier)}if(l){var N=t.havingStyle(t.style.sub());o=d4(l,N,t),d||(u=M.depth+N.fontMetrics().subDrop*N.sizeMultiplier/t.sizeMultiplier)}r=t.style===eK.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;var p,D=t.sizeMultiplier,y=uK(.5/c.ptPerEm/D),I=null;if(o){var j,z=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);if(M instanceof TK||z)I=uK(-(null!=(j=M.italic)?j:0))}if(n&&o){g=Math.max(g,r,n.depth+.25*c.xHeight),u=Math.max(u,c.sub2);var m=4*c.defaultRuleThickness;if(g-n.depth-(o.height-u)<m){u=m-(g-n.depth)+o.height;var T=.8*c.xHeight-(g-n.depth);T>0&&(g+=T,u-=T)}p=Z0({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u,marginRight:y,marginLeft:I},{type:"elem",elem:n,shift:-g,marginRight:y}]})}else if(o){u=Math.max(u,c.sub1,o.height-.8*c.xHeight),p=Z0({positionType:"shift",positionData:u,children:[{type:"elem",elem:o,marginLeft:I,marginRight:y}]})}else{if(!n)throw new Error("supsub must have either sup or sub.");g=Math.max(g,r,n.depth+.25*c.xHeight),p=Z0({positionType:"shift",positionData:-g,children:[{type:"elem",elem:n,marginRight:y}]})}var x=g4(M,"right")||"mord";return E0([x],[M,E0(["msupsub"],[p])],t)},mathmlBuilder(e,t){var i,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,i=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var o,r=[L4(e.base,t)];if(e.sub&&r.push(L4(e.sub,t)),e.sup&&r.push(L4(e.sup,t)),n)o=i?"mover":"munder";else if(e.sub)if(e.sup){var s=e.base;o=s&&"op"===s.type&&s.limits&&t.style===eK.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(t.style===eK.DISPLAY||s.limits)?"munderover":"msubsup"}else{var a=e.base;o=a&&"op"===a.type&&a.limits&&(t.style===eK.DISPLAY||a.alwaysHandleSupSub)||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(a.limits||t.style===eK.DISPLAY)?"munder":"msub"}else{var l=e.base;o=l&&"op"===l.type&&l.limits&&(t.style===eK.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===eK.DISPLAY)?"mover":"msup"}return new D4(o,r)}}),e4({type:"atom",htmlBuilder:(e,t)=>L0(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var i=new D4("mo",[m4(e.text,e.mode)]);if("bin"===e.family){var n=A4(e,t);"bold-italic"===n&&i.setAttribute("mathvariant",n)}else"punct"===e.family?i.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||i.setAttribute("stretchy","false");return i}});var m2={mi:"italic",mn:"normal",mtext:"normal"};e4({type:"mathord",htmlBuilder:(e,t)=>w0(e,t,"mathord"),mathmlBuilder(e,t){var i=new D4("mi",[m4(e.text,e.mode,t)]),n=A4(e,t)||"italic";return n!==m2[i.type]&&i.setAttribute("mathvariant",n),i}}),e4({type:"textord",htmlBuilder:(e,t)=>w0(e,t,"textord"),mathmlBuilder(e,t){var i,n=m4(e.text,e.mode,t),o=A4(e,t)||"normal";return i="text"===e.mode?new D4("mtext",[n]):/[0-9]/.test(e.text)?new D4("mn",[n]):"\\prime"===e.text?new D4("mo",[n]):new D4("mi",[n]),o!==m2[i.type]&&i.setAttribute("mathvariant",o),i}});var T2={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},x2={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};e4({type:"spacing",htmlBuilder(e,t){if(x2.hasOwnProperty(e.text)){var i=x2[e.text].className||"";if("text"===e.mode){var n=w0(e,t,"textord");return n.classes.push(i),n}return E0(["mspace",i],[L0(e.text,e.mode,t)],t)}if(T2.hasOwnProperty(e.text))return E0(["mspace",T2[e.text]],[],t);throw new Eq('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!x2.hasOwnProperty(e.text)){if(T2.hasOwnProperty(e.text))return new D4("mspace");throw new Eq('Unknown type of space "'+e.text+'"')}return new D4("mtext",[new y4(" ")])}});var A2=()=>{var e=new D4("mtd",[]);return e.setAttribute("width","50%"),e};e4({type:"tag",mathmlBuilder(e,t){var i=new D4("mtable",[new D4("mtr",[A2(),new D4("mtd",[b4(e.body,t)]),A2(),new D4("mtd",[b4(e.tag,t)])])]);return i.setAttribute("width","100%"),i}});var O2={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},f2={"\\textbf":"textbf","\\textmd":"textmd"},b2={"\\textit":"textit","\\textup":"textup"},L2=(e,t)=>{var i=e.font;return i?O2[i]?t.withTextFontFamily(O2[i]):f2[i]?t.withTextFontWeight(f2[i]):"\\emph"===i?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(b2[i]):t};K0({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:n}=e,o=t[0];return{type:"text",mode:i.mode,body:i4(o),font:n}},htmlBuilder(e,t){var i=L2(e,t),n=a4(e.body,i,!0);return E0(["mord","text"],n,i)},mathmlBuilder(e,t){var i=L2(e,t);return b4(e.body,i)}}),K0({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:i}=e;return{type:"underline",mode:i.mode,body:t[0]}},htmlBuilder(e,t){var i=d4(e.body,t),n=Q0("underline-line",t),o=t.fontMetrics().defaultRuleThickness,r=Z0({positionType:"top",positionData:i.height,children:[{type:"kern",size:o},{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:i}]});return E0(["mord","underline"],[r],t)},mathmlBuilder(e,t){var i=new D4("mo",[new y4("‾")]);i.setAttribute("stretchy","true");var n=new D4("munder",[L4(e.body,t),i]);return n.setAttribute("accentunder","true"),n}}),K0({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:i}=e;return{type:"vcenter",mode:i.mode,body:t[0]}},htmlBuilder(e,t){var i=d4(e.body,t),n=t.fontMetrics().axisHeight,o=.5*(i.height-n-(i.depth+n));return Z0({positionType:"shift",positionData:o,children:[{type:"elem",elem:i}]})},mathmlBuilder(e,t){var i=new D4("mpadded",[L4(e.body,t)],["vcenter"]);return new D4("mrow",[i])}}),K0({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,i){throw new Eq("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var i=w2(e),n=[],o=t.havingStyle(t.style.text()),r=0;r<i.length;r++){var s=i[r];"~"===s&&(s="\\textasciitilde"),n.push(b0(s,"Typewriter-Regular",e.mode,o,["mord","texttt"]))}return E0(["mord","text"].concat(o.sizingClasses(t)),S0(n),o)},mathmlBuilder(e,t){var i=new y4(w2(e)),n=new D4("mtext",[i]);return n.setAttribute("mathvariant","monospace"),n}});var w2=e=>e.body.replace(/ /g,e.star?"␣":" "),v2=J0,S2="[ \r\n\t]",k2="(\\\\[a-zA-Z@]+)"+S2+"*",E2="[̀-ͯ]",C2=new RegExp(E2+"+$"),Q2="("+S2+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧-豈-]"+E2+"*|[\ud800-\udbff][\udc00-\udfff]"+E2+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+k2+"|\\\\[^\ud800-\udfff])";class U2{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Q2,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new B1("EOF",new W1(this,t,t));var i=this.tokenRegex.exec(e);if(null===i||i.index!==t)throw new Eq("Unexpected character: '"+e[t]+"'",new B1(e[t],new W1(this,t,t+1)));var n=i[6]||i[3]||(i[2]?"\\ ":" ");if(14===this.catcodes[n]){var o=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===o?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new B1(n,new W1(this,t,this.tokenRegex.lastIndex))}}class Y2{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new Eq("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,i){if(void 0===i&&(i=!1),i){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(e)&&(o[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Z2=V1;R1("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),R1("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),R1("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),R1("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),R1("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var i=e.future();return 1===t[0].length&&t[0][0].text===i.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),R1("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),R1("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var _2={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};R1("\\char",(function(e){var t,i=e.popToken(),n=0;if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if("\\"===(i=e.popToken()).text[0])n=i.text.charCodeAt(1);else{if("EOF"===i.text)throw new Eq("\\char` missing argument");n=i.text.charCodeAt(0)}else t=10;if(t){if(null==(n=_2[i.text])||n>=t)throw new Eq("Invalid base-"+t+" digit "+i.text);for(var o;null!=(o=_2[e.future().text])&&o<t;)n*=t,n+=o,e.popToken()}return"\\@char{"+n+"}"}));var P2=(e,t,i,n)=>{var o=e.consumeArg().tokens;if(1!==o.length)throw new Eq("\\newcommand's first argument must be a macro name");var r=o[0].text,s=e.isDefined(r);if(s&&!t)throw new Eq("\\newcommand{"+r+"} attempting to redefine "+r+"; use \\renewcommand");if(!s&&!i)throw new Eq("\\renewcommand{"+r+"} when command "+r+" does not yet exist; use \\newcommand");var a=0;if(1===(o=e.consumeArg().tokens).length&&"["===o[0].text){for(var l="",M=e.expandNextToken();"]"!==M.text&&"EOF"!==M.text;)l+=M.text,M=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Eq("Invalid number of arguments: "+l);a=parseInt(l),o=e.consumeArg().tokens}return s&&n||e.macros.set(r,{tokens:o,numArgs:a}),""};R1("\\newcommand",(e=>P2(e,!1,!0,!1))),R1("\\renewcommand",(e=>P2(e,!0,!1,!1))),R1("\\providecommand",(e=>P2(e,!0,!0,!0))),R1("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),R1("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),R1("\\show",(e=>{var t=e.popToken(),i=t.text;return console.log(t,e.macros.get(i),v2[i],kK.math[i],kK.text[i]),""})),R1("\\bgroup","{"),R1("\\egroup","}"),R1("~","\\nobreakspace"),R1("\\lq","`"),R1("\\rq","'"),R1("\\aa","\\r a"),R1("\\AA","\\r A"),R1("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),R1("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),R1("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),R1("ℬ","\\mathscr{B}"),R1("ℰ","\\mathscr{E}"),R1("ℱ","\\mathscr{F}"),R1("ℋ","\\mathscr{H}"),R1("ℐ","\\mathscr{I}"),R1("ℒ","\\mathscr{L}"),R1("ℳ","\\mathscr{M}"),R1("ℛ","\\mathscr{R}"),R1("ℭ","\\mathfrak{C}"),R1("ℌ","\\mathfrak{H}"),R1("ℨ","\\mathfrak{Z}"),R1("\\Bbbk","\\Bbb{k}"),R1("\\llap","\\mathllap{\\textrm{#1}}"),R1("\\rlap","\\mathrlap{\\textrm{#1}}"),R1("\\clap","\\mathclap{\\textrm{#1}}"),R1("\\mathstrut","\\vphantom{(}"),R1("\\underbar","\\underline{\\text{#1}}"),R1("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),R1("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),R1("\\ne","\\neq"),R1("≠","\\neq"),R1("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),R1("∉","\\notin"),R1("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),R1("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),R1("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),R1("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),R1("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),R1("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),R1("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),R1("⟂","\\perp"),R1("‼","\\mathclose{!\\mkern-0.8mu!}"),R1("∌","\\notni"),R1("⌜","\\ulcorner"),R1("⌝","\\urcorner"),R1("⌞","\\llcorner"),R1("⌟","\\lrcorner"),R1("©","\\copyright"),R1("®","\\textregistered"),R1("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),R1("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),R1("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),R1("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),R1("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),R1("⋮","\\vdots"),R1("\\varGamma","\\mathit{\\Gamma}"),R1("\\varDelta","\\mathit{\\Delta}"),R1("\\varTheta","\\mathit{\\Theta}"),R1("\\varLambda","\\mathit{\\Lambda}"),R1("\\varXi","\\mathit{\\Xi}"),R1("\\varPi","\\mathit{\\Pi}"),R1("\\varSigma","\\mathit{\\Sigma}"),R1("\\varUpsilon","\\mathit{\\Upsilon}"),R1("\\varPhi","\\mathit{\\Phi}"),R1("\\varPsi","\\mathit{\\Psi}"),R1("\\varOmega","\\mathit{\\Omega}"),R1("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),R1("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),R1("\\boxed","\\fbox{$\\displaystyle{#1}$}"),R1("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),R1("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),R1("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),R1("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),R1("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var V2={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},R2=new Set(["bin","rel"]);R1("\\dots",(function(e){var t="\\dotso",i=e.expandAfterFuture().text;return i in V2?t=V2[i]:("\\not"===i.slice(0,4)||i in kK.math&&R2.has(kK.math[i].group))&&(t="\\dotsb"),t}));var W2={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};R1("\\dotso",(function(e){return e.future().text in W2?"\\ldots\\,":"\\ldots"})),R1("\\dotsc",(function(e){var t=e.future().text;return t in W2&&","!==t?"\\ldots\\,":"\\ldots"})),R1("\\cdots",(function(e){return e.future().text in W2?"\\@cdots\\,":"\\@cdots"})),R1("\\dotsb","\\cdots"),R1("\\dotsm","\\cdots"),R1("\\dotsi","\\!\\cdots"),R1("\\dotsx","\\ldots\\,"),R1("\\DOTSI","\\relax"),R1("\\DOTSB","\\relax"),R1("\\DOTSX","\\relax"),R1("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),R1("\\,","\\tmspace+{3mu}{.1667em}"),R1("\\thinspace","\\,"),R1("\\>","\\mskip{4mu}"),R1("\\:","\\tmspace+{4mu}{.2222em}"),R1("\\medspace","\\:"),R1("\\;","\\tmspace+{5mu}{.2777em}"),R1("\\thickspace","\\;"),R1("\\!","\\tmspace-{3mu}{.1667em}"),R1("\\negthinspace","\\!"),R1("\\negmedspace","\\tmspace-{4mu}{.2222em}"),R1("\\negthickspace","\\tmspace-{5mu}{.277em}"),R1("\\enspace","\\kern.5em "),R1("\\enskip","\\hskip.5em\\relax"),R1("\\quad","\\hskip1em\\relax"),R1("\\qquad","\\hskip2em\\relax"),R1("\\tag","\\@ifstar\\tag@literal\\tag@paren"),R1("\\tag@paren","\\tag@literal{({#1})}"),R1("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new Eq("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),R1("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),R1("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),R1("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),R1("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),R1("\\newline","\\\\\\relax"),R1("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var B2=uK(fK["Main-Regular"]["T".charCodeAt(0)][1]-.7*fK["Main-Regular"]["A".charCodeAt(0)][1]);R1("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+B2+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),R1("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+B2+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),R1("\\hspace","\\@ifstar\\@hspacer\\@hspace"),R1("\\@hspace","\\hskip #1\\relax"),R1("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),R1("\\ordinarycolon",":"),R1("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),R1("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),R1("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),R1("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),R1("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),R1("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),R1("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),R1("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),R1("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),R1("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),R1("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),R1("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),R1("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),R1("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),R1("∷","\\dblcolon"),R1("∹","\\eqcolon"),R1("≔","\\coloneqq"),R1("≕","\\eqqcolon"),R1("⩴","\\Coloneqq"),R1("\\ratio","\\vcentcolon"),R1("\\coloncolon","\\dblcolon"),R1("\\colonequals","\\coloneqq"),R1("\\coloncolonequals","\\Coloneqq"),R1("\\equalscolon","\\eqqcolon"),R1("\\equalscoloncolon","\\Eqqcolon"),R1("\\colonminus","\\coloneq"),R1("\\coloncolonminus","\\Coloneq"),R1("\\minuscolon","\\eqcolon"),R1("\\minuscoloncolon","\\Eqcolon"),R1("\\coloncolonapprox","\\Colonapprox"),R1("\\coloncolonsim","\\Colonsim"),R1("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),R1("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),R1("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),R1("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),R1("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),R1("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),R1("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),R1("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),R1("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),R1("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),R1("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),R1("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),R1("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),R1("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),R1("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),R1("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),R1("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),R1("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),R1("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),R1("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),R1("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),R1("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),R1("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),R1("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),R1("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),R1("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),R1("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),R1("\\imath","\\html@mathml{\\@imath}{ı}"),R1("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),R1("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),R1("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),R1("⟦","\\llbracket"),R1("⟧","\\rrbracket"),R1("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),R1("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),R1("⦃","\\lBrace"),R1("⦄","\\rBrace"),R1("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),R1("⦵","\\minuso"),R1("\\darr","\\downarrow"),R1("\\dArr","\\Downarrow"),R1("\\Darr","\\Downarrow"),R1("\\lang","\\langle"),R1("\\rang","\\rangle"),R1("\\uarr","\\uparrow"),R1("\\uArr","\\Uparrow"),R1("\\Uarr","\\Uparrow"),R1("\\N","\\mathbb{N}"),R1("\\R","\\mathbb{R}"),R1("\\Z","\\mathbb{Z}"),R1("\\alef","\\aleph"),R1("\\alefsym","\\aleph"),R1("\\Alpha","\\mathrm{A}"),R1("\\Beta","\\mathrm{B}"),R1("\\bull","\\bullet"),R1("\\Chi","\\mathrm{X}"),R1("\\clubs","\\clubsuit"),R1("\\cnums","\\mathbb{C}"),R1("\\Complex","\\mathbb{C}"),R1("\\Dagger","\\ddagger"),R1("\\diamonds","\\diamondsuit"),R1("\\empty","\\emptyset"),R1("\\Epsilon","\\mathrm{E}"),R1("\\Eta","\\mathrm{H}"),R1("\\exist","\\exists"),R1("\\harr","\\leftrightarrow"),R1("\\hArr","\\Leftrightarrow"),R1("\\Harr","\\Leftrightarrow"),R1("\\hearts","\\heartsuit"),R1("\\image","\\Im"),R1("\\infin","\\infty"),R1("\\Iota","\\mathrm{I}"),R1("\\isin","\\in"),R1("\\Kappa","\\mathrm{K}"),R1("\\larr","\\leftarrow"),R1("\\lArr","\\Leftarrow"),R1("\\Larr","\\Leftarrow"),R1("\\lrarr","\\leftrightarrow"),R1("\\lrArr","\\Leftrightarrow"),R1("\\Lrarr","\\Leftrightarrow"),R1("\\Mu","\\mathrm{M}"),R1("\\natnums","\\mathbb{N}"),R1("\\Nu","\\mathrm{N}"),R1("\\Omicron","\\mathrm{O}"),R1("\\plusmn","\\pm"),R1("\\rarr","\\rightarrow"),R1("\\rArr","\\Rightarrow"),R1("\\Rarr","\\Rightarrow"),R1("\\real","\\Re"),R1("\\reals","\\mathbb{R}"),R1("\\Reals","\\mathbb{R}"),R1("\\Rho","\\mathrm{P}"),R1("\\sdot","\\cdot"),R1("\\sect","\\S"),R1("\\spades","\\spadesuit"),R1("\\sub","\\subset"),R1("\\sube","\\subseteq"),R1("\\supe","\\supseteq"),R1("\\Tau","\\mathrm{T}"),R1("\\thetasym","\\vartheta"),R1("\\weierp","\\wp"),R1("\\Zeta","\\mathrm{Z}"),R1("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),R1("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),R1("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),R1("\\bra","\\mathinner{\\langle{#1}|}"),R1("\\ket","\\mathinner{|{#1}\\rangle}"),R1("\\braket","\\mathinner{\\langle{#1}\\rangle}"),R1("\\Bra","\\left\\langle#1\\right|"),R1("\\Ket","\\left|#1\\right\\rangle");var $2=e=>t=>{var i=t.consumeArg().tokens,n=t.consumeArg().tokens,o=t.consumeArg().tokens,r=t.consumeArg().tokens,s=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();var l=t=>i=>{e&&(i.macros.set("|",s),o.length&&i.macros.set("\\|",a));var r=t;!t&&o.length&&("|"===i.future().text&&(i.popToken(),r=!0));return{tokens:r?o:n,numArgs:0}};t.macros.set("|",l(!1)),o.length&&t.macros.set("\\|",l(!0));var M=t.consumeArg().tokens,c=t.expandTokens([...r,...M,...i]);return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};R1("\\bra@ket",$2(!1)),R1("\\bra@set",$2(!0)),R1("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),R1("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),R1("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),R1("\\angln","{\\angl n}"),R1("\\blue","\\textcolor{##6495ed}{#1}"),R1("\\orange","\\textcolor{##ffa500}{#1}"),R1("\\pink","\\textcolor{##ff00af}{#1}"),R1("\\red","\\textcolor{##df0030}{#1}"),R1("\\green","\\textcolor{##28ae7b}{#1}"),R1("\\gray","\\textcolor{gray}{#1}"),R1("\\purple","\\textcolor{##9d38bd}{#1}"),R1("\\blueA","\\textcolor{##ccfaff}{#1}"),R1("\\blueB","\\textcolor{##80f6ff}{#1}"),R1("\\blueC","\\textcolor{##63d9ea}{#1}"),R1("\\blueD","\\textcolor{##11accd}{#1}"),R1("\\blueE","\\textcolor{##0c7f99}{#1}"),R1("\\tealA","\\textcolor{##94fff5}{#1}"),R1("\\tealB","\\textcolor{##26edd5}{#1}"),R1("\\tealC","\\textcolor{##01d1c1}{#1}"),R1("\\tealD","\\textcolor{##01a995}{#1}"),R1("\\tealE","\\textcolor{##208170}{#1}"),R1("\\greenA","\\textcolor{##b6ffb0}{#1}"),R1("\\greenB","\\textcolor{##8af281}{#1}"),R1("\\greenC","\\textcolor{##74cf70}{#1}"),R1("\\greenD","\\textcolor{##1fab54}{#1}"),R1("\\greenE","\\textcolor{##0d923f}{#1}"),R1("\\goldA","\\textcolor{##ffd0a9}{#1}"),R1("\\goldB","\\textcolor{##ffbb71}{#1}"),R1("\\goldC","\\textcolor{##ff9c39}{#1}"),R1("\\goldD","\\textcolor{##e07d10}{#1}"),R1("\\goldE","\\textcolor{##a75a05}{#1}"),R1("\\redA","\\textcolor{##fca9a9}{#1}"),R1("\\redB","\\textcolor{##ff8482}{#1}"),R1("\\redC","\\textcolor{##f9685d}{#1}"),R1("\\redD","\\textcolor{##e84d39}{#1}"),R1("\\redE","\\textcolor{##bc2612}{#1}"),R1("\\maroonA","\\textcolor{##ffbde0}{#1}"),R1("\\maroonB","\\textcolor{##ff92c6}{#1}"),R1("\\maroonC","\\textcolor{##ed5fa6}{#1}"),R1("\\maroonD","\\textcolor{##ca337c}{#1}"),R1("\\maroonE","\\textcolor{##9e034e}{#1}"),R1("\\purpleA","\\textcolor{##ddd7ff}{#1}"),R1("\\purpleB","\\textcolor{##c6b9fc}{#1}"),R1("\\purpleC","\\textcolor{##aa87ff}{#1}"),R1("\\purpleD","\\textcolor{##7854ab}{#1}"),R1("\\purpleE","\\textcolor{##543b78}{#1}"),R1("\\mintA","\\textcolor{##f5f9e8}{#1}"),R1("\\mintB","\\textcolor{##edf2df}{#1}"),R1("\\mintC","\\textcolor{##e0e5cc}{#1}"),R1("\\grayA","\\textcolor{##f6f7f7}{#1}"),R1("\\grayB","\\textcolor{##f0f1f2}{#1}"),R1("\\grayC","\\textcolor{##e3e5e6}{#1}"),R1("\\grayD","\\textcolor{##d6d8da}{#1}"),R1("\\grayE","\\textcolor{##babec2}{#1}"),R1("\\grayF","\\textcolor{##888d93}{#1}"),R1("\\grayG","\\textcolor{##626569}{#1}"),R1("\\grayH","\\textcolor{##3b3e40}{#1}"),R1("\\grayI","\\textcolor{##21242c}{#1}"),R1("\\kaBlue","\\textcolor{##314453}{#1}"),R1("\\kaGreen","\\textcolor{##71B307}{#1}");var F2={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class G2{constructor(e,t,i){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Y2(Z2,t.macros),this.mode=i,this.stack=[]}feed(e){this.lexer=new U2(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,i,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:n,end:i}=this.consumeArg(["]"]))}else({tokens:n,start:t,end:i}=this.consumeArg());return this.pushToken(new B1("EOF",i.loc)),this.pushTokens(n),new B1("",W1.range(t,i))}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],i=e&&e.length>0;i||this.consumeSpaces();var n,o=this.future(),r=0,s=0;do{if(n=this.popToken(),t.push(n),"{"===n.text)++r;else if("}"===n.text){if(-1===--r)throw new Eq("Extra }",n)}else if("EOF"===n.text)throw new Eq("Unexpected end of input in a macro argument, expected '"+(e&&i?e[s]:"}")+"'",n);if(e&&i)if((0===r||1===r&&"{"===e[s])&&n.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==r||i);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:n}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Eq("The length of delimiters doesn't match the number of args!");for(var i=t[0],n=0;n<i.length;n++){var o=this.popToken();if(i[n]!==o.text)throw new Eq("Use of the macro doesn't match its definition",o)}}for(var r=[],s=0;s<e;s++)r.push(this.consumeArg(t&&t[s+1]).tokens);return r}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new Eq("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),i=t.text,n=t.noexpand?null:this._getExpansion(i);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===i[0]&&!this.isDefined(i))throw new Eq("Undefined control sequence: "+i);return this.pushToken(t),!1}this.countExpansion(1);var o=n.tokens,r=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(o=o.slice()).length-1;s>=0;--s){var a=o[s];if("#"===a.text){if(0===s)throw new Eq("Incomplete placeholder at end of macro body",a);if("#"===(a=o[--s]).text)o.splice(s+1,1);else{if(!/^[1-9]$/.test(a.text))throw new Eq("Not a valid argument number",a);o.splice(s,2,...r[+a.text-1])}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new B1(e)]):void 0}expandTokens(e){var t=[],i=this.stack.length;for(this.pushTokens(e);this.stack.length>i;)if(!1===this.expandOnce(!0)){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var i=this.lexer.catcodes[e];if(null!=i&&13!==i)return}var n="function"==typeof t?t(this):t;if("string"==typeof n){var o=0;if(n.includes("#"))for(var r=n.replace(/##/g,"");r.includes("#"+(o+1));)++o;for(var s=new U2(n,this.settings),a=[],l=s.lex();"EOF"!==l.text;)a.push(l),l=s.lex();return a.reverse(),{tokens:a,numArgs:o}}return n}isDefined(e){return this.macros.has(e)||v2.hasOwnProperty(e)||kK.math.hasOwnProperty(e)||kK.text.hasOwnProperty(e)||F2.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:v2.hasOwnProperty(e)&&!v2[e].primitive}}var H2=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,J2=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),X2={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},q2={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class K2{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new G2(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new Eq("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new B1("}")),this.gullet.pushTokens(e);var i=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,i}parseExpression(e,t){for(var i=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(K2.endOfExpression.has(n.text))break;if(t&&n.text===t)break;if(e&&v2[n.text]&&v2[n.text].infix)break;var o=this.parseAtom(t);if(!o)break;"internal"!==o.type&&i.push(o)}return"text"===this.mode&&this.formLigatures(i),this.handleInfixNodes(i)}handleInfixNodes(e){for(var t,i=-1,n=0;n<e.length;n++){var o=e[n];if("infix"===o.type){if(-1!==i)throw new Eq("only one infix operator per group",o.token);i=n,t=o.replaceWith}}if(-1!==i&&t){var r,s,a=e.slice(0,i),l=e.slice(i+1);return r=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},s=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[r,e[i],s],[]):this.callFunction(t,[r,s],[])]}return e}handleSupSubscript(e){var t,i=this.fetch(),n=i.text;this.consume(),this.consumeSpaces();do{var o;t=this.parseGroup(e)}while("internal"===(null==(o=t)?void 0:o.type));if(!t)throw new Eq("Expected group after '"+n+"'",i);return t}formatUnsupportedCmd(e){for(var t=[],i=0;i<e.length;i++)t.push({type:"textord",mode:"text",text:e[i]});var n={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(e){var t,i,n=this.parseGroup("atom",e);if("internal"===(null==n?void 0:n.type))return n;if("text"===this.mode)return n;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(n&&"op"===n.type){var r="\\limits"===o.text;n.limits=r,n.alwaysHandleSupSub=!0}else{if(!n||"operatorname"!==n.type)throw new Eq("Limit controls must follow a math operator",o);n.alwaysHandleSupSub&&(n.limits="\\limits"===o.text)}this.consume()}else if("^"===o.text){if(t)throw new Eq("Double superscript",o);t=this.handleSupSubscript("superscript")}else if("_"===o.text){if(i)throw new Eq("Double subscript",o);i=this.handleSupSubscript("subscript")}else if("'"===o.text){if(t)throw new Eq("Double superscript",o);var s={type:"textord",mode:this.mode,text:"\\prime"},a=[s];for(this.consume();"'"===this.fetch().text;)a.push(s),this.consume();"^"===this.fetch().text&&a.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:a}}else{if(!J2[o.text])break;var l=H2.test(o.text),M=[];for(M.push(new B1(J2[o.text])),this.consume();;){var c=this.fetch().text;if(!J2[c])break;if(H2.test(c)!==l)break;M.unshift(new B1(J2[c])),this.consume()}var g=this.subparse(M);l?i={type:"ordgroup",mode:"math",body:g}:t={type:"ordgroup",mode:"math",body:g}}}return t||i?{type:"supsub",mode:this.mode,base:n,sup:t,sub:i}:n}parseFunction(e,t){var i=this.fetch(),n=i.text,o=v2[n];if(!o)return null;if(this.consume(),t&&"atom"!==t&&!o.allowedInArgument)throw new Eq("Got function '"+n+"' with no arguments"+(t?" as "+t:""),i);if("text"===this.mode&&!o.allowedInText)throw new Eq("Can't use function '"+n+"' in text mode",i);if("math"===this.mode&&!1===o.allowedInMath)throw new Eq("Can't use function '"+n+"' in math mode",i);var{args:r,optArgs:s}=this.parseArguments(n,o);return this.callFunction(n,r,s,i,e)}callFunction(e,t,i,n,o){var r={funcName:e,parser:this,token:n,breakOnTokenText:o},s=v2[e];if(s&&s.handler)return s.handler(r,t,i);throw new Eq("No function handler for "+e)}parseArguments(e,t){var i=t.numArgs+t.numOptionalArgs;if(0===i)return{args:[],optArgs:[]};for(var n=[],o=[],r=0;r<i;r++){var s=t.argTypes&&t.argTypes[r],a=r<t.numOptionalArgs;("primitive"in t&&t.primitive&&null==s||"sqrt"===t.type&&1===r&&null==o[0])&&(s="primitive");var l=this.parseGroupOfType("argument to '"+e+"'",s,a);if(a)o.push(l);else{if(null==l)throw new Eq("Null argument, please report this as a bug");n.push(l)}}return{args:n,optArgs:o}}parseGroupOfType(e,t,i){switch(t){case"color":return this.parseColorGroup(i);case"size":return this.parseSizeGroup(i);case"url":return this.parseUrlGroup(i);case"math":case"text":return this.parseArgumentGroup(i,t);case"hbox":var n=this.parseArgumentGroup(i,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],style:"text",resetFont:!0}:null;case"raw":var o=this.parseStringGroup("raw",i);return null!=o?{type:"raw",mode:"text",string:o.text}:null;case"primitive":if(i)throw new Eq("A primitive argument cannot be optional");var r=this.parseGroup(e);if(null==r)throw new Eq("Expected group as "+e,this.fetch());return r;case"original":case null:case void 0:return this.parseArgumentGroup(i);default:throw new Eq("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var i=this.gullet.scanArgument(t);if(null==i)return null;for(var n,o="";"EOF"!==(n=this.fetch()).text;)o+=n.text,this.consume();return this.consume(),i.text=o,i}parseRegexGroup(e,t){for(var i,n=this.fetch(),o=n,r="";"EOF"!==(i=this.fetch()).text&&e.test(r+i.text);)r+=(o=i).text,this.consume();if(""===r)throw new Eq("Invalid "+t+": '"+n.text+"'",n);return n.range(o,r)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var i=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!i)throw new Eq("Invalid color: '"+t.text+"'",t);var n=i[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}}parseSizeGroup(e){var t,i=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",i=!0);var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!n)throw new Eq("Invalid size: '"+t.text+"'",t);var o={number:+(n[1]+n[2]),unit:n[3]};if(!cK(o))throw new Eq("Invalid unit: '"+o.unit+"'",t);return{type:"size",mode:this.mode,value:o,isBlank:i}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var i=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:i}}parseArgumentGroup(e,t){var i=this.gullet.scanArgument(e);if(null==i)return null;var n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var r={type:"ordgroup",mode:this.mode,loc:i.loc,body:o};return t&&this.switchMode(n),r}parseGroup(e,t){var i,n=this.fetch(),o=n.text;if("{"===o||"\\begingroup"===o){this.consume();var r="{"===o?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,r),a=this.fetch();this.expect(r),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:W1.range(n,a),body:s,semisimple:"\\begingroup"===o||void 0}}else if(null==(i=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===o[0]&&!F2.hasOwnProperty(o)){if(this.settings.throwOnError)throw new Eq("Undefined control sequence: "+o,n);i=this.formatUnsupportedCmd(o),this.consume()}return i}formLigatures(e){for(var t=e.length-1,i=0;i<t;++i){var n=e[i];if("textord"===n.type){var o=n.text,r=e[i+1];if(r&&"textord"===r.type){if("-"===o&&"-"===r.text){var s=e[i+2];i+1<t&&s&&"textord"===s.type&&"-"===s.text?(e.splice(i,3,{type:"textord",mode:"text",loc:W1.range(n,s),text:"---"}),t-=2):(e.splice(i,2,{type:"textord",mode:"text",loc:W1.range(n,r),text:"--"}),t-=1)}"'"!==o&&"`"!==o||r.text!==o||(e.splice(i,2,{type:"textord",mode:"text",loc:W1.range(n,r),text:o+o}),t-=1)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var i=t.slice(5),n="*"===i.charAt(0);if(n&&(i=i.slice(1)),i.length<2||i.charAt(0)!==i.slice(-1))throw new Eq("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:i=i.slice(1,-1),star:n}}q2.hasOwnProperty(t[0])&&!kK[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=q2[t[0]]+t.slice(1));var o,r=C2.exec(t);if(r&&("i"===(t=t.substring(0,r.index))?t="ı":"j"===t&&(t="ȷ")),kK[this.mode][t]){this.settings.strict&&"math"===this.mode&&g0.includes(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s=kK[this.mode][t].group,a=W1.range(e);o=s in V4?{type:"atom",mode:this.mode,family:s,loc:a,text:t}:{type:s,mode:this.mode,loc:a,text:t}}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(nK(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:W1.range(e),text:t}}if(this.consume(),r)for(var l=0;l<r[0].length;l++){var M=r[0][l];if(!X2[M])throw new Eq("Unknown accent ' "+M+"'",e);var c=X2[M][this.mode]||X2[M].text;if(!c)throw new Eq("Accent "+M+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:W1.range(e),label:c,isStretchy:!1,isShifty:!0,base:o}}return o}}K2.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var e5=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var i=new K2(e,t);delete i.gullet.macros.current["\\df@tag"];var n=i.parse();if(delete i.gullet.macros.current["\\current@color"],delete i.gullet.macros.current["\\color"],i.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new Eq("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:i.subparse([new B1("\\df@tag")])}]}return n},t5=function(e,t,i){t.textContent="";var n=r5(e,i).toNode();t.appendChild(n)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),t5=function(){throw new Eq("KaTeX doesn't work in quirks mode.")});var i5=function(e,t){return r5(e,t).toMarkup()},n5=function(e,t){var i=new Bq(t);return e5(e,i)},o5=function(e,t,i){if(i.throwOnError||!(e instanceof Eq))throw e;var n=E0(["katex-error"],[new TK(t)]);return n.setAttribute("title",e.toString()),n.setAttribute("style","color:"+i.errorColor),n},r5=function(e,t){var i=new Bq(t);try{return function(e,t,i){var n,o=C4(i);if("mathml"===i.output)return w4(e,t,o,i.displayMode,!0);if("html"===i.output){var r=N4(e,o);n=E0(["katex"],[r])}else{var s=w4(e,t,o,i.displayMode,!1),a=N4(e,o);n=E0(["katex"],[s,a])}return Q4(n,i)}(e5(e,i),e,i)}catch(t){return o5(t,e,i)}},s5=function(e,t){var i=new Bq(t);try{return function(e,t,i){var n=N4(e,C4(i)),o=E0(["katex"],[n]);return Q4(o,i)}(e5(e,i),0,i)}catch(t){return o5(t,e,i)}},a5="0.16.47",l5={Span:IK,Anchor:jK,SymbolNode:TK,SvgNode:xK,PathNode:AK,LineNode:OK},M5={version:a5,render:t5,renderToString:i5,ParseError:Eq,SETTINGS_SCHEMA:Vq,__parse:n5,__renderToDomTree:r5,__renderToHTMLTree:s5,__setFontMetrics:wK,__defineSymbol:EK,__defineFunction:K0,__defineMacro:R1,__domTree:l5},c5=Object.freeze({__proto__:null,ParseError:Eq,SETTINGS_SCHEMA:Vq,__defineFunction:K0,__defineMacro:R1,__defineSymbol:EK,__domTree:l5,__parse:n5,__renderToDomTree:r5,__renderToHTMLTree:s5,__setFontMetrics:wK,default:M5,get render(){return t5},renderToString:i5,version:a5});export{_X as DEFAULT_TOOLBAR,GL as NileAccordion,jS as NileAppShell,bS as NileAppShellMain,mS as NileAppShellNavToggle,wS as NileAppShellPanel,OS as NileAppShellSideNav,ja as NileAutoComplete,gL as NileAvatar,St as NileBadge,Ob as NileBreadcrumb,bb as NileBreadcrumbItem,Xe as NileButton,$b as NileButtonFilter,Ql as NileButtonToggle,Yl as NileButtonToggleGroup,ul as NileCalendar,Sb as NileCard,Yb as NileCarousel,Eb as NileCarouselItem,oi as NileCheckbox,si as NileCheckboxGroup,tl as NileChip,Gb as NileCircularProgressbar,jb as NileCodeEditor,NS as NileColorPicker,cS as NileColorSwatch,Ka as NileCombobox,CE as NileCommandMenu,UE as NileCommandMenuGroup,ZE as NileCommandMenuItem,$l as NileContentEditor,wE as NileContextMenu,pE as NileContextMenuGroup,yE as NileContextMenuItem,al as NileDatePicker,Ok as NileDetail,Gl as NileDialog,JL as NileDivider,AL as NileDotStepper,ii as NileDrawer,ha as NileDropdown,DL as NileEmptyState,Ml as NileErrorMessage,Jl as NileErrorNotification,rv as NileFilePreview,Ww as NileFileUpload,uw as NileFilterChip,uE as NileFloatingPanel,Tt as NileFormErrorMessage,wb as NileFormGroup,zt as NileFormHelpText,vL as NileFormatDate,fv as NileGrid,Lv as NileGridBody,Cv as NileGridCellItem,Uv as NileGridHead,kv as NileGridHeadItem,vv as NileGridRow,qe as NileHeading,IL as NileHero,fL as NileHeroHeader,Se as NileIcon,Lt as NileIconButton,aw as NileInlineEdit,uk as NileInlineSidebar,ck as NileInlineSidebarGroup,hk as NileInlineSidebarItem,RE as NileInlineSidebarItemBody,PE as NileInlineSidebarItemHeader,pk as NileInlineSidebarPanel,yk as NileInlineSidebarPanelGroup,ct as NileInput,kl as NileLink,$L as NileList,WL as NileListItem,Sn as NileLoader,oQ as NileMarkdown,MQ as NileMarkdownEditor,Ot as NileMenu,la as NileMenuItem,iE as NileNavTab,oE as NileNavTabGroup,aE as NileNavTabPanel,sa as NileOption,av as NileOptionGroup,xt as NileOtpInput,dL as NilePageHeader,Nw as NilePagination,Wb as NilePopover,An as NilePopup,En as NileProgressBar,Kk as NileQrCode,li as NileRadio,ci as NileRadioGroup,lS as NileRichTextEditor,ew as NileSectionMessage,Ns as NileSegmentedProgressBar,oa as NileSelect,SS as NileSideBar,ik as NileSideBarAction,lk as NileSideBarActionMenu,sk as NileSideBarActionMenuItem,YS as NileSideBarExpand,GS as NileSideBarFooter,JS as NileSideBarFooterItem,ok as NileSideBarFooterText,_S as NileSideBarGroup,VS as NileSideBarGroupItem,WS as NileSideBarGroupItemIcon,$S as NileSideBarGroupItemText,ES as NileSideBarHeader,QS as NileSideBarLogo,jk as NileSideBarPanel,Is as NileSkeletonLoader,wn as NileSlideToggle,Tw as NileSlider,Ds as NileSpinner,EL as NileSplitPanel,Et as NileStatusLight,TL as NileStepper,zL as NileStepperItem,Wl as NileSwitcher,tM as NileTab,ql as NileTabGroup,oM as NileTabPanel,Mw as NileTable,aL as NileTableBody,nL as NileTableCellItem,ML as NileTableHeaderItem,rL as NileTableRow,ms as NileTag,nl as NileTextarea,wl as NileTimestampBuilder,qL as NileTitle,xb as NileToast,iw as NileToolbar,bn as NileTooltip,VL as NileTree,ZL as NileTreeItem,LL as NileVerticalStepperItem,ta as NileVirtualSelect,XX as NileWysiwygBubbleItem,JX as NileWysiwygBubbleMenu,aq as NileWysiwygCodeMenu,Tq as NileWysiwygEditor,rq as NileWysiwygEmbedPanel,iq as NileWysiwygFindBar,uq as NileWysiwygImageMenu,qX as NileWysiwygImagePanel,yq as NileWysiwygInsertMenu,FX as NileWysiwygLinkEditor,Iq as NileWysiwygMathPanel,cq as NileWysiwygShortcutHelp,oq as NileWysiwygSourceView,pq as NileWysiwygSpecialChars,tq as NileWysiwygSuggestList,eq as NileWysiwygTableMenu,RX as NileWysiwygTablePicker,BX as NileWysiwygToolbar,$X as NileWysiwygToolbarItem,hs as NileliteTooltip,IF as buildPrintDocument,yF as buildWordDocument,QF as computeToolbarState,YX as createEditorState,xq as createKatexRenderer,zB as createSchema,mB as defaultSchema,kB as docToHtml,CB as docToJson,V$ as docToMarkdown,vB as htmlToDoc,QB as jsonToDoc,rF as looksLikeMarkdown,oF as markdownToHtml,VW as sanitizeHtml,pF as toInlineStyledHtml};
|