rj-editor 1.1.7 → 1.1.8
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 +39 -0
- package/dist/components/RJTextEditor.d.ts +1 -1
- package/dist/components/rj-text-editor/RJTextEditor.types.d.ts +6 -1
- package/dist/components/rj-text-editor/RJTextEditorContent.d.ts +6 -1
- package/dist/components/rj-text-editor/footer/EditorFooter.d.ts +13 -0
- package/dist/components/rj-text-editor/footer/index.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/rj-editor.css +1 -1
- package/dist/rj-editor.js +884 -711
- package/dist/rj-editor.umd.cjs +2 -2
- package/dist/types/RJEditorFooterItem.d.ts +1 -0
- package/dist/types/RJEditorFooterStats.d.ts +11 -0
- package/dist/types/RJEditorTranslations.d.ts +11 -0
- package/dist/types/RJTextEditorFooterRender.d.ts +3 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/utils/helpers/countTextCharacters.d.ts +1 -0
- package/dist/utils/helpers/countTextWords.d.ts +1 -0
- package/dist/utils/helpers/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/rj-editor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const RJ_EDITOR_STYLE_ID = "rj-editor-style";
|
|
2
|
-
const RJ_EDITOR_CSS = ":root{--rj-color-text:#111827;--rj-color-muted:#526070;--rj-color-subtle:#8a94a6;--rj-color-page-bg:#f5f7fb;--rj-color-surface:#fff;--rj-color-surface-soft:#f8fafc;--rj-color-border:#d9dde5;--rj-color-brand:#3167c8;--rj-color-brand-strong:#1f4f9a;--rj-color-brand-soft:#eef4ff;--rj-color-brand-tint:#eaf2ff;--rj-color-link:#2563eb;--rj-color-focus:#7aa7f7;--rj-color-table-border:#cbd5e1;--rj-color-table-header-bg:#f1f5f9;--rj-color-image-border:#94a3b8;--rj-shadow-image:0 .875rem 2rem #0f172a2e;--rj-color-inline-code-bg:#2a2828;--rj-color-inline-code-text:#ededed;--rj-color-inline-code-border:#ffffff24;--rj-color-code-bg:#0b0c0e;--rj-color-code-header-bg:#111214;--rj-color-code-border:#34363a;--rj-color-code-text:#ededed;--rj-color-code-muted:#a1a1aa;--rj-color-code-keyword:#c678dd;--rj-color-code-string:#98c379;--rj-color-code-number:#d19a66;--rj-color-code-comment:#7f848e;--rj-color-code-function:#61afef;--rj-color-code-operator:#56b6c2;--rj-color-code-tag:#e06c75;--rj-color-danger:#dc2626;--rj-color-danger-soft:#fce1e13f;--rj-color-danger-border:#fca5a5;--rj-color-inverse-bg:#101827;--rj-color-inverse-text:#dbeafe;--rj-color-white:#fff;--rj-editor-bg:var(--rj-color-surface);--rj-editor-border:var(--rj-color-border);--rj-editor-text:var(--rj-color-text);--rj-editor-placeholder:var(--rj-color-subtle);--rj-editor-toolbar-bg:var(--rj-color-surface-soft);--rj-editor-toolbar-button-bg:var(--rj-color-surface);--rj-editor-toolbar-button-active-bg:var(--rj-color-brand-tint);--rj-editor-link:var(--rj-color-link);--rj-editor-focus-border:var(--rj-color-focus);--rj-editor-table-border:var(--rj-color-table-border);--rj-editor-table-header-bg:var(--rj-color-table-header-bg);--rj-editor-table-selected-bg:var(--rj-color-brand-tint);--rj-editor-image-border:var(--rj-color-image-border);--rj-editor-image-shadow:var(--rj-shadow-image);--rj-editor-inline-code-bg:var(--rj-color-inline-code-bg);--rj-editor-inline-code-text:var(--rj-color-inline-code-text);--rj-editor-inline-code-border:var(--rj-color-inline-code-border);--rj-editor-code-bg:var(--rj-color-code-bg);--rj-editor-code-header-bg:var(--rj-color-code-header-bg);--rj-editor-code-border:var(--rj-color-code-border);--rj-editor-code-text:var(--rj-color-code-text);--rj-editor-code-muted:var(--rj-color-code-muted);--rj-editor-code-keyword:var(--rj-color-code-keyword);--rj-editor-code-string:var(--rj-color-code-string);--rj-editor-code-number:var(--rj-color-code-number);--rj-editor-code-comment:var(--rj-color-code-comment);--rj-editor-code-function:var(--rj-color-code-function);--rj-editor-code-operator:var(--rj-color-code-operator);--rj-editor-code-tag:var(--rj-color-code-tag);--rj-editor-muted-text:var(--rj-color-muted);--rj-editor-danger:var(--rj-color-danger);--rj-editor-danger-bg:var(--rj-color-danger-soft);--rj-editor-danger-border:var(--rj-color-danger-border);--rj-editor-focus-ring:#7aa7f738;--rj-editor-floating-shadow:0 .75rem 1.75rem #0f172a24;--rj-editor-modal-overlay:#0f172a6b;--rj-editor-modal-shadow:0 1.5rem 4rem #0f172a38;color:var(--rj-color-text);background:var(--rj-color-page-bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:1rem;line-height:1.5}[data-rj-editor-theme=light]{--rj-color-text:#111827;--rj-color-muted:#526070;--rj-color-subtle:#8a94a6;--rj-color-page-bg:#f5f7fb;--rj-color-surface:#fff;--rj-color-surface-soft:#f8fafc;--rj-color-border:#d9dde5;--rj-color-brand:#3167c8;--rj-color-brand-strong:#1f4f9a;--rj-color-brand-soft:#eef4ff;--rj-color-brand-tint:#eaf2ff;--rj-color-link:#2563eb;--rj-color-focus:#7aa7f7;--rj-color-table-border:#cbd5e1;--rj-color-table-header-bg:#f1f5f9;--rj-color-image-border:#94a3b8;--rj-shadow-image:0 .875rem 2rem #0f172a2e;--rj-color-inline-code-bg:#2a2828;--rj-color-inline-code-text:#ededed;--rj-color-inline-code-border:#ffffff24;--rj-color-code-bg:#0b0c0e;--rj-color-code-header-bg:#111214;--rj-color-code-border:#34363a;--rj-color-code-text:#ededed;--rj-color-code-muted:#a1a1aa;--rj-color-code-keyword:#c678dd;--rj-color-code-string:#98c379;--rj-color-code-number:#d19a66;--rj-color-code-comment:#7f848e;--rj-color-code-function:#61afef;--rj-color-code-operator:#56b6c2;--rj-color-code-tag:#e06c75;--rj-color-danger:#dc2626;--rj-color-danger-soft:#fce1e13f;--rj-color-danger-border:#fca5a5;--rj-color-inverse-bg:#101827;--rj-color-inverse-text:#dbeafe;--rj-color-white:#fff;--rj-editor-bg:var(--rj-color-surface);--rj-editor-border:var(--rj-color-border);--rj-editor-text:var(--rj-color-text);--rj-editor-placeholder:var(--rj-color-subtle);--rj-editor-toolbar-bg:var(--rj-color-surface-soft);--rj-editor-toolbar-button-bg:var(--rj-color-surface);--rj-editor-toolbar-button-active-bg:var(--rj-color-brand-tint);--rj-editor-link:var(--rj-color-link);--rj-editor-focus-border:var(--rj-color-focus);--rj-editor-table-border:var(--rj-color-table-border);--rj-editor-table-header-bg:var(--rj-color-table-header-bg);--rj-editor-table-selected-bg:var(--rj-color-brand-tint);--rj-editor-image-border:var(--rj-color-image-border);--rj-editor-image-shadow:var(--rj-shadow-image);--rj-editor-inline-code-bg:var(--rj-color-inline-code-bg);--rj-editor-inline-code-text:var(--rj-color-inline-code-text);--rj-editor-inline-code-border:var(--rj-color-inline-code-border);--rj-editor-code-bg:var(--rj-color-code-bg);--rj-editor-code-header-bg:var(--rj-color-code-header-bg);--rj-editor-code-border:var(--rj-color-code-border);--rj-editor-code-text:var(--rj-color-code-text);--rj-editor-code-muted:var(--rj-color-code-muted);--rj-editor-code-keyword:var(--rj-color-code-keyword);--rj-editor-code-string:var(--rj-color-code-string);--rj-editor-code-number:var(--rj-color-code-number);--rj-editor-code-comment:var(--rj-color-code-comment);--rj-editor-code-function:var(--rj-color-code-function);--rj-editor-code-operator:var(--rj-color-code-operator);--rj-editor-code-tag:var(--rj-color-code-tag);--rj-editor-muted-text:var(--rj-color-muted);--rj-editor-danger:var(--rj-color-danger);--rj-editor-danger-bg:var(--rj-color-danger-soft);--rj-editor-danger-border:var(--rj-color-danger-border);--rj-editor-focus-ring:#7aa7f738;--rj-editor-floating-shadow:0 .75rem 1.75rem #0f172a24;--rj-editor-modal-overlay:#0f172a6b;--rj-editor-modal-shadow:0 1.5rem 4rem #0f172a38;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}[data-rj-editor-theme=dark]{--rj-color-text:#ededed;--rj-color-muted:#b0b0b0;--rj-color-subtle:#898989;--rj-color-page-bg:#151515;--rj-color-surface:#1b1b1b;--rj-color-surface-soft:#232323;--rj-color-border:#414141;--rj-color-brand:#b8b8b8;--rj-color-brand-strong:#d4d4d4;--rj-color-brand-soft:#292929;--rj-color-brand-tint:#303030;--rj-color-link:#d0d0d0;--rj-color-focus:#a8a8a8;--rj-color-table-border:#484848;--rj-color-table-header-bg:#292929;--rj-color-image-border:#686868;--rj-shadow-image:0 .875rem 2rem #00000061;--rj-color-inline-code-bg:#101010;--rj-color-inline-code-text:#ededed;--rj-color-inline-code-border:#ffffff29;--rj-color-code-bg:#0b0b0b;--rj-color-code-header-bg:#141414;--rj-color-code-border:#404040;--rj-color-code-text:#ededed;--rj-color-code-muted:#949494;--rj-color-code-keyword:#d7d7d7;--rj-color-code-string:#b8b8b8;--rj-color-code-number:#c9c9c9;--rj-color-code-comment:#777;--rj-color-code-function:#e1e1e1;--rj-color-code-operator:#a6a6a6;--rj-color-code-tag:#c2c2c2;--rj-color-danger:#f87171;--rj-color-danger-soft:#f871711f;--rj-color-danger-border:#985050;--rj-color-inverse-bg:#ededed;--rj-color-inverse-text:#1b1b1b;--rj-color-white:#fff;--rj-editor-bg:var(--rj-color-surface);--rj-editor-border:var(--rj-color-border);--rj-editor-text:var(--rj-color-text);--rj-editor-placeholder:var(--rj-color-subtle);--rj-editor-toolbar-bg:var(--rj-color-surface-soft);--rj-editor-toolbar-button-bg:var(--rj-color-surface);--rj-editor-toolbar-button-active-bg:var(--rj-color-brand-tint);--rj-editor-link:var(--rj-color-link);--rj-editor-focus-border:var(--rj-color-focus);--rj-editor-table-border:var(--rj-color-table-border);--rj-editor-table-header-bg:var(--rj-color-table-header-bg);--rj-editor-table-selected-bg:var(--rj-color-brand-tint);--rj-editor-image-border:var(--rj-color-image-border);--rj-editor-image-shadow:var(--rj-shadow-image);--rj-editor-inline-code-bg:var(--rj-color-inline-code-bg);--rj-editor-inline-code-text:var(--rj-color-inline-code-text);--rj-editor-inline-code-border:var(--rj-color-inline-code-border);--rj-editor-code-bg:var(--rj-color-code-bg);--rj-editor-code-header-bg:var(--rj-color-code-header-bg);--rj-editor-code-border:var(--rj-color-code-border);--rj-editor-code-text:var(--rj-color-code-text);--rj-editor-code-muted:var(--rj-color-code-muted);--rj-editor-code-keyword:var(--rj-color-code-keyword);--rj-editor-code-string:var(--rj-color-code-string);--rj-editor-code-number:var(--rj-color-code-number);--rj-editor-code-comment:var(--rj-color-code-comment);--rj-editor-code-function:var(--rj-color-code-function);--rj-editor-code-operator:var(--rj-color-code-operator);--rj-editor-code-tag:var(--rj-color-code-tag);--rj-editor-muted-text:var(--rj-color-muted);--rj-editor-danger:var(--rj-color-danger);--rj-editor-danger-bg:var(--rj-color-danger-soft);--rj-editor-danger-border:var(--rj-color-danger-border);--rj-editor-focus-ring:#bebebe33;--rj-editor-floating-shadow:0 .75rem 1.75rem #00000061;--rj-editor-modal-overlay:#00000094;--rj-editor-modal-shadow:0 1.5rem 4rem #0000007a;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}._wrapper_se0k7_1{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.375rem;align-items:center;gap:.125rem;width:100%;height:2.125rem;padding:0 .5rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1;display:inline-flex}._wrapper_se0k7_1:focus-within{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .125rem #7aa7f72e}._wrapper_se0k7_1._disabled_se0k7_23{cursor:not-allowed;opacity:.55}._affix_se0k7_28{color:var(--rj-editor-muted-text,#526070);cursor:text;font:inherit;-webkit-user-select:none;user-select:none;flex:none}._affix_se0k7_28 svg{width:1rem!important;height:1rem!important}._affix_se0k7_28 svg path{stroke:var(--rj-editor-muted-text,#526070)}._input_se0k7_43{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.375rem;outline:none;width:100%;height:2.125rem;padding:0 .5rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1}._inputAffix_se0k7_58{box-shadow:none;background:0 0;border:0;border-radius:0;flex:auto;width:100%;min-width:0;height:100%;padding:0}._input_se0k7_43:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .125rem #7aa7f72e}._inputAffix_se0k7_58:focus{box-shadow:none;border-color:#0000}._input_se0k7_43:disabled{cursor:not-allowed;opacity:.55}._overlay_qjax1_1{background:var(--rj-editor-modal-overlay,#0f172a6b);z-index:1200;justify-content:center;align-items:center;padding:1.5rem;display:flex;position:fixed;inset:0}._modal_qjax1_12{background:var(--rj-editor-bg,#fff);box-shadow:var(--rj-editor-modal-shadow,0 1.5rem 4rem #0f172a38);color:var(--rj-editor-text,#111827);min-width:min(26.25rem,100vw - 3rem);max-width:calc(100vw - 3rem);max-height:min(45rem,100vh - 3rem);width:var(--rj-modal-width,26.25rem);border-radius:.5rem;overflow:hidden}._header_qjax1_24{border-bottom:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:move;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;padding:.875rem 1.125rem;display:flex}._title_qjax1_34{margin:0;font-family:system-ui,sans-serif;font-size:1rem;font-weight:700;line-height:1.3}._closeButton_qjax1_42{color:var(--rj-editor-muted-text,#526070);cursor:pointer;cursor:pointer;background:0 0;border:0;border-radius:.375rem;justify-content:center;align-items:center;width:1.875rem;height:1.875rem;padding:0;display:inline-flex}._closeButton_qjax1_42:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);color:var(--rj-editor-text,#111827)}._body_qjax1_65{max-height:calc(100vh - 11.375rem);padding:1.125rem;overflow:auto}._footer_qjax1_71{border-top:.0625rem solid var(--rj-editor-border,#d9dde5);justify-content:flex-end;align-items:center;gap:.5rem;padding:.75rem 1.125rem;display:flex}._button_qjax1_80{border:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:.5rem;justify-content:center;align-items:center;min-width:4.75rem;height:2.125rem;padding:0 .875rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1;display:inline-flex}._cancelButton_qjax1_96{background:var(--rj-editor-toolbar-button-bg,#fff);color:var(--rj-editor-text,#111827)}._cancelButton_qjax1_96:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}._okButton_qjax1_106{background:var(--rj-color-brand,#3167c8);border-color:var(--rj-color-brand,#3167c8);color:var(--rj-color-white,#fff)}._okButton_qjax1_106:hover{background:var(--rj-color-brand-strong,#1f4f9a);border-color:var(--rj-color-brand-strong,#1f4f9a)}._button_qjax1_80:disabled{cursor:not-allowed;opacity:.5}.rj-editor-image-border-radius-input{width:4.375rem}.rj-editor-image-edit-form{gap:.5rem;display:grid}.rj-editor-image-edit-form label{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.25}.rj-editor-image-edit-form input,.rj-editor-image-edit-form textarea{background:var(--rj-editor-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;outline:none;width:100%;padding:.5625rem .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1.35}.rj-editor-image-edit-form input{height:2.375rem}.rj-editor-image-edit-form textarea{resize:vertical;min-height:6rem}.rj-editor-image-edit-form input:focus,.rj-editor-image-edit-form textarea:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .1875rem var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-link-form{gap:.75rem;display:grid}.rj-editor-link-field{gap:.375rem;display:grid}.rj-editor-link-field label,.rj-editor-link-checkbox{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.25}.rj-editor-link-field input{background:var(--rj-editor-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;outline:none;height:2.25rem;padding:0 .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1.35}.rj-editor-link-field input:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .1875rem var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-link-checkbox{align-items:center;gap:.5rem;width:fit-content;display:inline-flex}.rj-editor-link-checkbox input{accent-color:var(--rj-color-brand,#3167c8);width:1rem;height:1rem}.rj-editor-youtube-form{gap:.75rem;display:grid}.rj-editor-youtube-field{gap:.375rem;display:grid}.rj-editor-youtube-field label{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.25}.rj-editor-youtube-field input{background:var(--rj-editor-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;outline:none;width:100%;height:2.375rem;padding:.5625rem .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1.35}.rj-editor-youtube-field input:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .1875rem var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-youtube-error{color:var(--rj-editor-danger,#dc2626);margin:0;font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.35}.rj-editor-toolbar{background:var(--rj-editor-toolbar-bg,#f8fafc);border-bottom:.0625rem solid var(--rj-editor-border,#d9dde5);flex-direction:column;display:flex}.rj-editor-toolbar-tabs{border-bottom:.0625rem solid var(--rj-editor-border,#d9dde5);justify-content:space-between;align-items:center;gap:.25rem;padding:.375rem .5rem;display:flex}.rj-editor-toolbar-tabs-list{flex-wrap:wrap;align-items:center;gap:.25rem;display:flex}.rj-editor-toolbar-tabs-list button{background:0 0;border:.0625rem solid #0000;border-bottom:0;border-radius:.5rem .5rem 0 0;min-width:auto;height:2rem;padding:0 .875rem}.rj-editor-toolbar-tabs-list button:hover,.rj-editor-toolbar-tabs-list button.is-active{background:var(--rj-editor-toolbar-button-bg,#fff);border-color:var(--rj-editor-border,#d9dde5)}.rj-editor-toolbar-fullscreen{flex:none}.rj-editor-toolbar-panel{flex-wrap:wrap;align-items:center;gap:.375rem;min-height:3.125rem;padding:.5rem;display:flex}.rj-editor-toolbar-panel--home,.rj-editor-toolbar-panel--image{flex-flow:column;align-items:stretch;gap:.5rem}.rj-editor-toolbar-row{flex-wrap:wrap;flex:none;align-items:center;gap:.375rem;padding-bottom:.0625rem;display:flex}.rj-editor-equation-toolbar{flex-flow:wrap;align-items:stretch}.rj-editor-equation-ribbon{flex-wrap:wrap;align-items:stretch;gap:.5rem;width:100%;display:flex}.rj-editor-equation-ribbon-group{flex:none;align-items:center;min-width:0;display:inline-flex}.rj-editor-equation-ribbon-group--symbols{max-width:26.875rem}.rj-editor-equation-ribbon-group--structures{flex:26.25rem}.rj-editor-equation-tools{align-items:center;gap:.375rem;display:inline-flex}.rj-editor-equation-primary{flex-direction:column;gap:.125rem;min-width:4.625rem!important;height:3.875rem!important;padding:.375rem .625rem!important}.rj-editor-equation-primary-icon{color:var(--rj-color-brand,#3167c8);font-family:Georgia,Times New Roman,serif;font-size:1.875rem;font-weight:700;line-height:1}.rj-editor-equation-mode-stack{gap:.25rem;display:grid}.rj-editor-equation-mode-stack button{min-width:4rem;height:1.75rem}.rj-editor-equation-symbol-palette{gap:.125rem;display:grid}.rj-editor-equation-symbol-row{gap:.125rem;display:flex}.rj-editor-equation-symbol-row button{border-radius:.1875rem;min-width:1.75rem;height:1.75rem;padding:0 .375rem;font-family:Georgia,Times New Roman,serif;font-size:1rem}.rj-editor-equation-structures{flex-wrap:wrap;align-items:center;gap:.375rem;display:flex}.rj-editor-equation-structure{flex-direction:column;gap:.25rem;min-width:5rem!important;height:3.875rem!important;padding:.375rem .625rem!important}.rj-editor-equation-structure small{color:var(--rj-editor-muted-text,#526070);align-items:center;gap:.125rem;font-family:system-ui,sans-serif;font-size:.625rem;font-weight:600;line-height:1;display:inline-flex}.rj-editor-equation-structure small svg{width:.75rem!important;height:.75rem!important}.rj-editor-equation-math-preview{justify-content:center;align-items:center;min-width:2.125rem;min-height:1.5rem;display:inline-flex}.rj-editor-equation-math-preview .rj-editor-equation-render{font-family:Georgia,Times New Roman,serif;font-size:1.25rem;font-weight:600}.rj-editor-equation-gallery{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);box-shadow:var(--rj-editor-floating-shadow,0 1rem 2.375rem #0f172a2e);scrollbar-width:thin;border-radius:.5rem;min-width:23.75rem;max-height:32.5rem;padding:.625rem;overflow:auto}.rj-editor-equation-gallery-title{color:var(--rj-editor-muted-text,#526070);margin-bottom:.5rem;font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:700}.rj-editor-equation-gallery-grid{grid-template-columns:repeat(3,minmax(6rem,1fr));gap:.5rem;display:grid}.rj-editor-equation-gallery-grid button{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:.375rem;flex-direction:column;justify-content:center;align-items:center;gap:.375rem;min-height:4.75rem;padding:.5rem;display:flex}.rj-editor-equation-gallery-grid button:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-equation-gallery-grid small{color:var(--rj-editor-muted-text,#526070);text-align:center;font-family:system-ui,sans-serif;font-size:.6875rem;font-weight:600;line-height:1.2}.rj-editor-equation-gallery-section{background:linear-gradient(180deg, var(--rj-editor-toolbar-bg,#f8fafc), var(--rj-editor-toolbar-button-bg,#fff));color:var(--rj-editor-muted-text,#526070);border-radius:.25rem;grid-column:1/-1;padding:.3125rem .375rem;font-size:.75rem;font-weight:700}.rj-editor-equation-gallery-grid .rj-editor-equation-math-preview{min-height:2.125rem}.rj-editor-equation-gallery-grid .rj-editor-equation-math-preview .rj-editor-equation-render{font-size:1.125rem}.rj-editor-toolbar-group{white-space:nowrap;flex-wrap:nowrap;flex:none;align-items:center;gap:.375rem;display:inline-flex}.rj-editor-toolbar-group button svg{min-width:1rem;min-height:1rem}.rj-editor-toolbar button{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:.5rem;justify-content:center;align-items:center;min-width:2.125rem;height:2.125rem;padding:0 .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1;display:inline-flex}.rj-editor-toolbar--clear-btn{color:var(--rj-editor-danger,#dc2626)!important}.rj-editor-toolbar--clear-btn svg path{stroke:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar button:hover:not(:disabled),.rj-editor-toolbar button.is-active,.rj-editor-toolbar select:hover,.rj-editor-toolbar input[type=color]:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-toolbar .rj-editor-toolbar--clear-btn:hover:not(:disabled){background:var(--rj-editor-danger-bg,#fee2e2);border-color:var(--rj-editor-danger-border,#fca5a5);color:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar input[type=color]{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;height:2.125rem}.rj-editor-toolbar-select{border-radius:.5rem;min-width:5.75rem;height:2.125rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1}.rj-editor-toolbar-select .ant-select-selector{font:inherit;align-items:center;min-height:2.125rem;display:flex;border-radius:.5rem!important}.rj-editor-toolbar-select .ant-select-selection-item,.rj-editor-toolbar-select .ant-select-selection-placeholder{font:inherit}.rj-editor-toolbar-select .ant-select-arrow{color:var(--rj-editor-muted-text,#526070);align-items:center;display:inline-flex}.rj-editor-toolbar-select .ant-select-suffix{align-items:center;width:1.25rem;height:1.25rem;display:inline-flex}.rj-editor-toolbar-select-font{min-width:9.25rem}.rj-editor-toolbar-select-crop{min-width:7.25rem}.rj-editor-image-width-input{width:5.25rem}.rj-editor-toolbar input[type=color]{cursor:pointer;width:2.375rem;padding:.1875rem}.rj-editor-toolbar button:disabled{cursor:not-allowed;opacity:.45}.rj-editor-color-button{min-width:2.625rem}.rj-editor-color-button svg{filter:drop-shadow(0 0 .0625rem #fff)!important}.rj-editor-text-color-mark{flex-direction:column;align-items:center;gap:.125rem;font-weight:700;line-height:1;display:inline-flex}.rj-editor-text-color-line{border-radius:62.4375rem;width:1.125rem;height:.1875rem;display:block}.rj-editor-background-color-mark{border:.0625rem solid var(--rj-editor-border,#d9dde5);border-radius:.25rem;justify-content:center;align-items:center;min-width:1.75rem;max-width:1.875rem;height:1.375rem;padding:0 .25rem;font-size:.75rem;font-weight:700;display:inline-flex}.rj-editor-background-color-mark.is-none{background:linear-gradient(135deg, transparent 45%, var(--rj-editor-focus-border,#7aa7f7) 47%, var(--rj-editor-focus-border,#7aa7f7) 53%, transparent 55%), var(--rj-editor-toolbar-button-bg,#fff)}.rj-editor-color-menu-item{color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;align-items:center;gap:.5rem;width:100%;min-width:7.5rem;padding:.125rem 0;display:flex}.rj-editor-spacing-menu-item{color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;width:100%;min-width:6rem;padding:.125rem 0}.rj-editor-color-menu-input{cursor:pointer;width:1.75rem;height:1.375rem;margin-left:auto;padding:0}.rj-editor-color-swatch,.rj-editor-color-none{border:.0625rem solid var(--rj-editor-border,#d9dde5);border-radius:.25rem;width:1.125rem;height:1.125rem;display:inline-flex}.rj-editor-color-none{background:linear-gradient(135deg, transparent 43%, #ef4444 46%, #ef4444 54%, transparent 57%), var(--rj-editor-toolbar-button-bg,#fff)}.rj-editor-toolbar button svg{width:1.125rem;height:1.125rem}.rj-editor-toolbar-divider{background:var(--rj-editor-border,#d9dde5);width:.0625rem;height:1.375rem;margin:0 .125rem}.rj-editor-table-icon span{border:.09375rem solid;border-radius:.125rem}.rj-editor-table-menu{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);box-shadow:var(--rj-editor-floating-shadow,0 .75rem 1.75rem #0f172a24);border-radius:.5rem;gap:.625rem;min-width:16.25rem;padding:.75rem;display:grid}.rj-editor-table-menu-title{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.875rem;font-weight:700;line-height:1.2}.rj-editor-table-grid{grid-template-columns:repeat(10,1.125rem);gap:.3125rem;display:grid}.rj-editor-table-grid button{background:var(--rj-editor-toolbar-bg,#f8fafc);border:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:.125rem;width:1.125rem;min-width:1.125rem;height:1.125rem;padding:0}.rj-editor-table-grid button:hover,.rj-editor-table-grid button.is-selected{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-table-menu-divider{background:var(--rj-editor-border,#d9dde5);height:.0625rem;margin:.125rem -.75rem}.rj-editor-table-menu-row{grid-template-columns:1fr 4.75rem;align-items:center;gap:.625rem;display:grid}.rj-editor-table-menu-row label{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:500;line-height:1.2}.rj-editor{border:.0625rem solid var(--rj-editor-border,#d9dde5);background:var(--rj-editor-bg,#fff);color:var(--rj-editor-text,#111827);text-align:left;border-radius:.5rem;transition:border-color .2s,box-shadow .2s;overflow:hidden}.rj-editor[data-rj-editor-theme=dark]{accent-color:var(--rj-color-brand,#b8b8b8)}.rj-editor[data-rj-editor-theme=dark] ::selection{color:#fff;background:#555}.rj-editor-hidden-file-input{display:none!important}.ant-form-item-has-error .rj-editor{border-color:var(--rj-editor-error-border,#ff4d4f);box-shadow:0 0 0 .125rem var(--rj-editor-error-shadow,#ff4d4f1a)}.ant-form-item-has-warning .rj-editor{border-color:var(--rj-editor-warning-border,#faad14);box-shadow:0 0 0 .125rem var(--rj-editor-warning-shadow,#faad141a)}.ant-form-item-has-error .rj-editor .rj-editor-toolbar-select .ant-select-selector,.ant-form-item-has-warning .rj-editor .rj-editor-toolbar-select .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-status-error .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-status-warning .ant-select-selector{border-color:var(--rj-editor-border,#d9dde5)!important;box-shadow:none!important}.ant-form-item-has-error .rj-editor .rj-editor-toolbar-select.ant-select-focused .ant-select-selector,.ant-form-item-has-warning .rj-editor .rj-editor-toolbar-select.ant-select-focused .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-focused.ant-select-status-error .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-focused.ant-select-status-warning .ant-select-selector{border-color:var(--rj-editor-focus-border,#7aa7f7)!important;box-shadow:0 0 0 .125rem var(--rj-editor-focus-ring,#7aa7f738)!important}.ant-form-item-has-error .rj-editor .rj-editor-code-block-language-select .ant-select-selector,.ant-form-item-has-warning .rj-editor .rj-editor-code-block-language-select .ant-select-selector,.rj-editor .rj-editor-code-block-language-select.ant-select-status-error .ant-select-selector,.rj-editor .rj-editor-code-block-language-select.ant-select-status-warning .ant-select-selector{border-color:var(--rj-editor-code-border,#34363a)!important;box-shadow:none!important}.rj-editor--fullscreen{z-index:1000;border-radius:0;flex-direction:column;display:flex;position:fixed;inset:0}.rj-editor-body{flex:auto;min-height:0;position:relative}.rj-editor-input{outline:none;min-height:13.75rem;padding:1.125rem}.rj-editor--fullscreen .rj-editor-input{height:100%;min-height:0;overflow:auto}.rj-editor-placeholder{color:var(--rj-editor-placeholder,#8a94a6);pointer-events:none;-webkit-user-select:none;user-select:none;position:absolute;top:1.125rem;left:1.125rem}.rj-editor-paragraph{margin:0 0 .75rem}.rj-editor-paragraph:last-child{margin-bottom:0}.rj-editor-text-bold{font-weight:700}.rj-editor-text-code{background:var(--rj-editor-inline-code-bg,#2a2828);border:.0625rem solid var(--rj-editor-inline-code-border,#ffffff24);color:var(--rj-editor-inline-code-text,#ededed);white-space:pre-wrap;border-radius:.375rem;padding:.125rem .375rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.92em;line-height:1.35}.rj-editor-code-block{background:var(--rj-editor-code-bg,#0b0c0e);border:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-text,#ededed);scrollbar-color:var(--rj-editor-code-border,#34363a) transparent;scrollbar-width:thin;tab-size:2;white-space:pre;border-radius:.5rem;outline:none;min-height:7rem;margin:.75rem 0;padding:3.625rem 1rem 1.125rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.8125rem;line-height:1.65;display:block;position:relative;overflow:auto}.rj-editor-code-block:before{background:var(--rj-editor-code-header-bg,#111214);border-bottom:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-muted,#a1a1aa);content:\">_ \" attr(data-language);align-items:center;height:2.625rem;padding:0 .875rem;font-family:inherit;font-size:.75rem;display:flex;position:absolute;top:0;left:0;right:0}.rj-editor-code-block-actions{z-index:20;align-items:center;gap:.3125rem;width:11.875rem;display:inline-flex;position:absolute}.rj-editor-code-block-language-select{flex:auto;min-width:0}.rj-editor-code-block-language-select.ant-select .ant-select-selector{background-color:var(--rj-editor-code-header-bg,#111214)!important;border-color:var(--rj-editor-code-border,#34363a)!important;color:var(--rj-editor-code-text,#ededed)!important}.rj-editor-code-block-language-select .ant-select-selection-item,.rj-editor-code-block-language-select .ant-select-arrow,.rj-editor-code-block-language-select .ant-select-suffix{color:var(--rj-editor-code-text,#ededed)!important}.rj-editor-code-block-language-popup{border:.0625rem solid var(--rj-editor-code-border,#34363a);background:var(--rj-editor-code-header-bg,#111214)!important}.rj-editor-code-block-language-popup .ant-select-item{color:var(--rj-editor-code-text,#ededed)!important}.rj-editor-code-block-language-popup .ant-select-item-option-active,.rj-editor-code-block-language-popup .ant-select-item-option-selected{background:#303030!important}.rj-editor-code-block-actions button{background:var(--rj-editor-code-header-bg,#111214);border:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-muted,#a1a1aa);cursor:pointer;border-radius:.375rem;flex:0 0 1.75rem;justify-content:center;align-items:center;height:1.75rem;padding:0;display:inline-flex}.rj-editor-code-block-actions button:hover,.rj-editor-code-block-actions button.is-copied{color:var(--rj-editor-code-text,#ededed);background:#303030;border-color:#787878}.rj-editor-code-block-actions button svg{width:1rem;height:1rem}.rj-editor-code-block-export{background:var(--rj-editor-code-bg,#0b0c0e);border:.0625rem solid var(--rj-editor-code-border,#34363a);border-radius:.5rem;max-width:100%;margin:.75rem 0;overflow:hidden}.rj-editor-code-block-export-header{background:var(--rj-editor-code-header-bg,#111214);border-bottom:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-muted,#a1a1aa);justify-content:space-between;align-items:center;height:2.625rem;padding:0 .5rem 0 .875rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.75rem;display:flex}.rj-editor-code-block-export-copy{color:var(--rj-editor-code-muted,#a1a1aa);cursor:pointer;background:0 0;border:.0625rem solid #0000;border-radius:.375rem;justify-content:center;align-items:center;width:1.75rem;height:1.75rem;padding:0;display:inline-flex}.rj-editor-code-block-export-copy:hover,.rj-editor-code-block-export-copy.is-copied{color:var(--rj-editor-code-text,#ededed);background:#303030;border-color:#787878}.rj-editor-code-block-export-copy svg{width:1rem;height:1rem}.rj-editor-code-block.rj-editor-code-block--exported{border:0;border-radius:0;min-height:4.375rem;margin:0;padding:1rem}.rj-editor-code-block.rj-editor-code-block--exported:before{content:none;display:none}.rj-editor-code-token-comment{color:var(--rj-editor-code-comment,#7f848e)}.rj-editor-code-token-atrule,.rj-editor-code-token-keyword,.rj-editor-code-token-important{color:var(--rj-editor-code-keyword,#c678dd)}.rj-editor-code-token-attr,.rj-editor-code-token-char,.rj-editor-code-token-inserted,.rj-editor-code-token-regex,.rj-editor-code-token-selector,.rj-editor-code-token-string{color:var(--rj-editor-code-string,#98c379)}.rj-editor-code-token-boolean,.rj-editor-code-token-constant,.rj-editor-code-token-number,.rj-editor-code-token-symbol{color:var(--rj-editor-code-number,#d19a66)}.rj-editor-code-token-class,.rj-editor-code-token-class-name,.rj-editor-code-token-function{color:var(--rj-editor-code-function,#61afef)}.rj-editor-code-token-builtin,.rj-editor-code-token-entity,.rj-editor-code-token-operator,.rj-editor-code-token-property,.rj-editor-code-token-punctuation,.rj-editor-code-token-url,.rj-editor-code-token-variable{color:var(--rj-editor-code-operator,#56b6c2)}.rj-editor-code-token-deleted,.rj-editor-code-token-tag{color:var(--rj-editor-code-tag,#e06c75)}.rj-editor-text-italic{font-style:italic}.rj-editor-text-strikethrough{text-decoration:line-through}.rj-editor-text-subscript{vertical-align:sub;font-size:.75em}.rj-editor-text-superscript{vertical-align:super;font-size:.75em}.rj-editor-text-underline{text-decoration:underline}.rj-editor-input a{color:var(--rj-editor-link,#2563eb);text-decoration:underline}.rj-editor-input hr{border:0;border-top:.0625rem solid var(--rj-editor-border,#d9dde5);margin:1rem 0}.rj-editor-equation-node{display:inline}.rj-editor-equation{cursor:pointer;scrollbar-width:thin;vertical-align:middle;border-radius:.375rem;min-width:0;max-width:100%;padding:.125rem .25rem;display:inline-flex;overflow-x:auto}.rj-editor-equation--block{justify-content:center;width:100%;margin:.625rem 0;padding:.5rem;display:flex;overflow-x:auto}.rj-editor-equation-editor{flex-direction:column;align-items:center;gap:.5rem;min-width:0;max-width:100%;display:inline-flex}.rj-editor-equation-editor input:not(.rj-editor-equation-slot-input){background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border:.0625rem solid var(--rj-editor-focus-border,#7aa7f7);color:var(--rj-editor-text,#111827);resize:none;text-align:center;border-radius:.25rem;outline:none;min-width:16.25rem;min-height:2.125rem;padding:.25rem .5rem;font-family:Georgia,Times New Roman,serif;font-size:1.125rem;font-weight:500;line-height:1.25}.rj-editor-equation-editor input::placeholder,.rj-editor-equation-content.is-empty{color:var(--rj-editor-placeholder,#8a94a6)}.rj-editor-equation-visual-editor{align-items:center;min-width:0;min-height:2.125rem;display:inline-flex}.rj-editor-equation-visual,.rj-editor-equation-render{vertical-align:middle;justify-content:center;align-items:center;gap:.25rem;min-width:0;max-width:100%;font-family:Georgia,Times New Roman,serif;font-size:1.25rem;font-style:italic;line-height:1.15;display:inline-flex}.rj-editor-equation-visual{min-height:2.125rem}.rj-editor-equation-render-slot{text-align:center;text-overflow:ellipsis;min-width:.625rem;max-width:8.75rem;display:inline-block;overflow:hidden}.rj-editor-equation-nested{align-items:center;min-width:0;display:inline-flex}.rj-editor-equation-insert-point{appearance:none;cursor:text;background:0 0;border:0;border-radius:.125rem;flex:0 0 .5rem;align-self:stretch;width:.5rem;min-height:1.5rem;margin:0 -.125rem;padding:0;display:inline-flex;position:relative}.rj-editor-equation-insert-point:after{background:var(--rj-editor-focus-border,#7aa7f7);content:\"\";opacity:0;border-radius:.125rem;width:.125rem;transition:opacity .12s;position:absolute;top:.1875rem;bottom:.1875rem;left:50%;transform:translate(-50%)}.rj-editor-equation-insert-point:hover:after,.rj-editor-equation-insert-point.is-active:after{opacity:1}.rj-editor-equation-slot-input{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border:.0625rem dashed var(--rj-editor-focus-border,#7aa7f7);color:var(--rj-editor-text,#111827);box-sizing:border-box;text-align:center;text-overflow:clip;border-radius:.25rem;outline:none;flex:none;width:auto;min-width:1.375rem;max-width:9.375rem;min-height:1.5rem;padding:.0625rem .3125rem;font-family:Georgia,Times New Roman,serif;font-size:1.125rem;font-style:italic;font-weight:600;line-height:1.2;overflow:hidden}.rj-editor-equation-editor .rj-editor-equation-slot-input{width:auto;min-width:1.375rem;min-height:1.5rem;padding:.0625rem .3125rem;font-size:1.125rem}.rj-editor-equation-slot-input:focus{box-shadow:0 0 0 .125rem var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-style:solid}.rj-editor-equation-slot-input::placeholder{color:var(--rj-editor-muted-text,#526070)}.rj-editor-equation-slot-input--limit,.rj-editor-equation-slot-input--script,.rj-editor-equation-slot-input--small,.rj-editor-equation-slot-input--root-index,.rj-editor-equation-editor .rj-editor-equation-slot-input--limit,.rj-editor-equation-editor .rj-editor-equation-slot-input--script,.rj-editor-equation-editor .rj-editor-equation-slot-input--small,.rj-editor-equation-editor .rj-editor-equation-slot-input--root-index{min-width:1.125rem;min-height:1.125rem;padding:.0625rem .25rem;font-size:.8125rem}.rj-editor-equation-slot-input--small{min-width:1.125rem}.rj-editor-equation-slot-input--matrix{min-width:1.375rem}.rj-editor-equation-visual--fraction,.rj-editor-equation-render--fraction{place-items:center;gap:.125rem;min-width:0;display:inline-grid}.rj-editor-equation-fraction-line,.rj-editor-equation-render-line{background:var(--rj-editor-text,#111827);width:100%;height:.125rem;display:block}.rj-editor-equation-visual--fraction-inline,.rj-editor-equation-render--fraction-inline,.rj-editor-equation-visual--row,.rj-editor-equation-render--row{flex-wrap:nowrap;align-items:center;gap:.125rem;min-width:0;display:inline-flex}.rj-editor-equation-visual--script,.rj-editor-equation-render--script{vertical-align:middle;align-items:center;gap:.125rem}.rj-editor-equation-script-stack,.rj-editor-equation-render-script-stack{place-items:center;gap:.0625rem;line-height:1;display:inline-grid}.rj-editor-equation-visual--script.has-superscript:not(.has-subscript) .rj-editor-equation-script-stack,.rj-editor-equation-render--script.has-superscript:not(.has-subscript) .rj-editor-equation-render-script-stack{transform:translateY(-.4375rem)}.rj-editor-equation-visual--script.has-subscript:not(.has-superscript) .rj-editor-equation-script-stack,.rj-editor-equation-render--script.has-subscript:not(.has-superscript) .rj-editor-equation-render-script-stack{transform:translateY(.4375rem)}.rj-editor-equation-visual--script.has-superscript.has-subscript .rj-editor-equation-script-stack,.rj-editor-equation-render--script.has-superscript.has-subscript .rj-editor-equation-render-script-stack{transform:translateY(-.0625rem)}.rj-editor-equation-render-script-stack{font-size:.68em}.rj-editor-equation-visual--root,.rj-editor-equation-render--root{align-items:flex-start;gap:0}.rj-editor-equation-root-symbol,.rj-editor-equation-render-root-symbol{font-size:1.875rem;font-style:normal;line-height:1}.rj-editor-equation-radicand,.rj-editor-equation-render-radicand{border-top:.125rem solid var(--rj-editor-text,#111827);margin-top:.125rem;padding:.125rem .25rem 0;display:inline-flex}.rj-editor-equation-slot-input--root-index,.rj-editor-equation-render-root-index{align-self:flex-start;margin-right:-.125rem}.rj-editor-equation-render-root-index{font-size:.62em}.rj-editor-equation-limits,.rj-editor-equation-render-limits{place-items:center;gap:.0625rem;line-height:1;display:inline-grid}.rj-editor-equation-render-limits span:first-child,.rj-editor-equation-render-limits span:last-child{font-size:.62em}.rj-editor-equation-large-symbol,.rj-editor-equation-render-large-symbol{font-size:2.125rem;font-style:normal;line-height:.9}.rj-editor-equation-function-name{font-style:normal;font-weight:600}.rj-editor-equation-bracket,.rj-editor-equation-render-bracket,.rj-editor-equation-matrix-bracket,.rj-editor-equation-render-matrix-bracket{font-size:2.125rem;font-style:normal;line-height:1}.rj-editor-equation-visual--accent,.rj-editor-equation-render--accent{justify-items:center;gap:0;display:inline-grid}.rj-editor-equation-accent-mark,.rj-editor-equation-render-accent-mark{font-size:1.125rem;line-height:.7}.rj-editor-equation-matrix-grid,.rj-editor-equation-render-matrix-grid{gap:.25rem .5rem;display:inline-grid}.rj-editor-equation-render-matrix-grid span{text-align:center;min-width:1.5rem}.rj-editor-equation.is-selected{outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:.125rem}.rj-editor-equation-content,.rj-editor-equation-content math{max-width:100%}.rj-editor-equation-content .katex-display{margin:0}.rj-editor-image-node{margin:.75rem 0;display:block}.rj-editor-youtube-node{clear:both;margin:1rem 0;display:block}.rj-editor-youtube{aspect-ratio:16/9;background:var(--rj-editor-toolbar-bg,#f8fafc);border:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:.5rem;width:100%;max-width:45rem;overflow:hidden}.rj-editor-youtube.is-selected{outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:.125rem}.rj-editor-youtube iframe{border:0;width:100%;height:100%;display:block}.rj-editor-image-frame{width:100%;display:flex;position:relative}.rj-editor-image-frame--wrap-square{width:auto;max-width:100%;display:block}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--left{float:left;margin:.25rem 1rem .625rem 0}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--right{float:right;margin:.25rem 0 .625rem 1rem}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--center,.rj-editor-image-frame--wrap-top-bottom{clear:both;width:100%;display:flex}.rj-editor-image-frame--left{justify-content:flex-start}.rj-editor-image-frame--center{justify-content:center}.rj-editor-image-frame--right{justify-content:flex-end}.rj-editor-image{width:100%;max-width:100%;height:auto;display:block}.rj-editor-image-box{transform-origin:50%;flex-direction:column;display:inline-flex;position:relative}.rj-editor-image-rotator{transform:rotate(var(--rj-image-rotation,0deg));transform-origin:50%;width:100%;display:block}.rj-editor-image-box.is-quarter-turn{display:block}.rj-editor-image-box.is-quarter-turn .rj-editor-image-rotator{transform:translate(-50%, -50%) rotate(var(--rj-image-rotation,0deg));position:absolute;top:50%;left:50%}.rj-editor-image-box.is-quarter-turn .rj-editor-image-link,.rj-editor-image-box.is-quarter-turn .rj-editor-image{width:100%;max-width:none;height:100%}.rj-editor-image-box.is-quarter-turn .rj-editor-image-caption{width:100%;position:absolute;top:100%;left:0}.rj-editor-image-box.has-border .rj-editor-image{border:.0625rem solid var(--rj-editor-image-border,#94a3b8)}.rj-editor-image-box.has-shadow .rj-editor-image{box-shadow:var(--rj-editor-image-shadow,0 .875rem 2rem #0f172a2e)}.rj-editor-image-link{display:block}.rj-editor-image-caption{color:var(--rj-editor-muted-text,#64748b);text-align:center;margin-top:.375rem;font-family:system-ui,sans-serif;font-size:.75rem;font-weight:500;line-height:1.35;display:block}.rj-editor-image-frame.is-selected .rj-editor-image-box{outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:.125rem}.rj-editor-image-floating-toolbar{background:var(--rj-editor-toolbar-bg,#f8fafc);border:.0625rem solid var(--rj-editor-border,#d9dde5);box-shadow:var(--rj-editor-floating-shadow,0 .75rem 1.75rem #0f172a24);z-index:1005;border-radius:.5rem;align-items:center;gap:.25rem;padding:.25rem;display:inline-flex;position:absolute}.rj-editor-image-floating-toolbar button{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:.375rem;justify-content:center;align-items:center;min-width:1.75rem;height:1.75rem;padding:0 .4375rem;font-family:system-ui,sans-serif;font-size:.75rem;font-weight:500;line-height:1;display:inline-flex}.rj-editor-image-floating-toolbar button svg{width:1.25rem;height:1.25rem}.rj-editor-image-floating-toolbar button:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-image-resize-handle{background:var(--rj-editor-focus-border,#7aa7f7);border:.125rem solid var(--rj-editor-bg,#fff);touch-action:none;z-index:2;border-radius:62.4375rem;width:.75rem;height:.75rem;position:absolute;transform:translate(-50%,-50%)}.rj-editor-image-resize-handle--left{cursor:ew-resize;top:50%;left:0}.rj-editor-image-resize-handle--right{cursor:ew-resize;top:50%;left:100%}.rj-editor-image-resize-handle--top{cursor:ns-resize;top:0;left:50%}.rj-editor-image-resize-handle--bottom{cursor:ns-resize;top:100%;left:50%}.rj-editor-image-resize-handle--top-left{cursor:nwse-resize;top:0;left:0}.rj-editor-image-resize-handle--top-right{cursor:nesw-resize;top:0;left:100%}.rj-editor-image-resize-handle--bottom-right{cursor:nwse-resize;top:100%;left:100%}.rj-editor-image-resize-handle--bottom-left{cursor:nesw-resize;top:100%;left:0}.rj-editor-table-scrollable-wrapper{max-width:100%;margin:.75rem 0;overflow-x:auto}.rj-editor-table{border-collapse:collapse;table-layout:fixed;width:100%}.rj-editor-table-cell,.rj-editor-table-cell-header{border:.0625rem solid var(--rj-editor-table-border,#cbd5e1);box-sizing:border-box;vertical-align:top;min-width:5rem;height:2rem;padding:.5rem .625rem}.rj-editor-table-cell .rj-editor-paragraph,.rj-editor-table-cell-header .rj-editor-paragraph{min-height:1.25rem;margin:0;line-height:1.25rem}.rj-editor-table-cell-header{background:var(--rj-editor-table-header-bg,#f1f5f9);font-weight:700}.rj-editor-table-cell-selected{background:var(--rj-editor-table-selected-bg,#eaf2ff);outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:-.125rem}.rj-editor-list-ol,.rj-editor-list-ul{margin:0 0 .75rem 1.5rem;padding:0}.rj-editor-list-item{margin:.25rem 0}\n/*$vite$:1*/";
|
|
2
|
+
const RJ_EDITOR_CSS = ":root{--rj-color-text:#111827;--rj-color-muted:#526070;--rj-color-subtle:#8a94a6;--rj-color-page-bg:#f5f7fb;--rj-color-surface:#fff;--rj-color-surface-soft:#f8fafc;--rj-color-border:#d9dde5;--rj-color-brand:#3167c8;--rj-color-brand-strong:#1f4f9a;--rj-color-brand-soft:#eef4ff;--rj-color-brand-tint:#eaf2ff;--rj-color-link:#2563eb;--rj-color-focus:#7aa7f7;--rj-color-table-border:#cbd5e1;--rj-color-table-header-bg:#f1f5f9;--rj-color-image-border:#94a3b8;--rj-shadow-image:0 .875rem 2rem #0f172a2e;--rj-color-inline-code-bg:#2a2828;--rj-color-inline-code-text:#ededed;--rj-color-inline-code-border:#ffffff24;--rj-color-code-bg:#0b0c0e;--rj-color-code-header-bg:#111214;--rj-color-code-border:#34363a;--rj-color-code-text:#ededed;--rj-color-code-muted:#a1a1aa;--rj-color-code-keyword:#c678dd;--rj-color-code-string:#98c379;--rj-color-code-number:#d19a66;--rj-color-code-comment:#7f848e;--rj-color-code-function:#61afef;--rj-color-code-operator:#56b6c2;--rj-color-code-tag:#e06c75;--rj-color-danger:#dc2626;--rj-color-danger-soft:#fce1e13f;--rj-color-danger-border:#fca5a5;--rj-color-inverse-bg:#101827;--rj-color-inverse-text:#dbeafe;--rj-color-white:#fff;--rj-editor-bg:var(--rj-color-surface);--rj-editor-border:var(--rj-color-border);--rj-editor-text:var(--rj-color-text);--rj-editor-placeholder:var(--rj-color-subtle);--rj-editor-toolbar-bg:var(--rj-color-surface-soft);--rj-editor-toolbar-button-bg:var(--rj-color-surface);--rj-editor-toolbar-button-active-bg:var(--rj-color-brand-tint);--rj-editor-link:var(--rj-color-link);--rj-editor-focus-border:var(--rj-color-focus);--rj-editor-table-border:var(--rj-color-table-border);--rj-editor-table-header-bg:var(--rj-color-table-header-bg);--rj-editor-table-selected-bg:var(--rj-color-brand-tint);--rj-editor-image-border:var(--rj-color-image-border);--rj-editor-image-shadow:var(--rj-shadow-image);--rj-editor-inline-code-bg:var(--rj-color-inline-code-bg);--rj-editor-inline-code-text:var(--rj-color-inline-code-text);--rj-editor-inline-code-border:var(--rj-color-inline-code-border);--rj-editor-code-bg:var(--rj-color-code-bg);--rj-editor-code-header-bg:var(--rj-color-code-header-bg);--rj-editor-code-border:var(--rj-color-code-border);--rj-editor-code-text:var(--rj-color-code-text);--rj-editor-code-muted:var(--rj-color-code-muted);--rj-editor-code-keyword:var(--rj-color-code-keyword);--rj-editor-code-string:var(--rj-color-code-string);--rj-editor-code-number:var(--rj-color-code-number);--rj-editor-code-comment:var(--rj-color-code-comment);--rj-editor-code-function:var(--rj-color-code-function);--rj-editor-code-operator:var(--rj-color-code-operator);--rj-editor-code-tag:var(--rj-color-code-tag);--rj-editor-muted-text:var(--rj-color-muted);--rj-editor-danger:var(--rj-color-danger);--rj-editor-danger-bg:var(--rj-color-danger-soft);--rj-editor-danger-border:var(--rj-color-danger-border);--rj-editor-focus-ring:#7aa7f738;--rj-editor-floating-shadow:0 .75rem 1.75rem #0f172a24;--rj-editor-modal-overlay:#0f172a6b;--rj-editor-modal-shadow:0 1.5rem 4rem #0f172a38;color:var(--rj-color-text);background:var(--rj-color-page-bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:1rem;line-height:1.5}[data-rj-editor-theme=light]{--rj-color-text:#111827;--rj-color-muted:#526070;--rj-color-subtle:#8a94a6;--rj-color-page-bg:#f5f7fb;--rj-color-surface:#fff;--rj-color-surface-soft:#f8fafc;--rj-color-border:#d9dde5;--rj-color-brand:#3167c8;--rj-color-brand-strong:#1f4f9a;--rj-color-brand-soft:#eef4ff;--rj-color-brand-tint:#eaf2ff;--rj-color-link:#2563eb;--rj-color-focus:#7aa7f7;--rj-color-table-border:#cbd5e1;--rj-color-table-header-bg:#f1f5f9;--rj-color-image-border:#94a3b8;--rj-shadow-image:0 .875rem 2rem #0f172a2e;--rj-color-inline-code-bg:#2a2828;--rj-color-inline-code-text:#ededed;--rj-color-inline-code-border:#ffffff24;--rj-color-code-bg:#0b0c0e;--rj-color-code-header-bg:#111214;--rj-color-code-border:#34363a;--rj-color-code-text:#ededed;--rj-color-code-muted:#a1a1aa;--rj-color-code-keyword:#c678dd;--rj-color-code-string:#98c379;--rj-color-code-number:#d19a66;--rj-color-code-comment:#7f848e;--rj-color-code-function:#61afef;--rj-color-code-operator:#56b6c2;--rj-color-code-tag:#e06c75;--rj-color-danger:#dc2626;--rj-color-danger-soft:#fce1e13f;--rj-color-danger-border:#fca5a5;--rj-color-inverse-bg:#101827;--rj-color-inverse-text:#dbeafe;--rj-color-white:#fff;--rj-editor-bg:var(--rj-color-surface);--rj-editor-border:var(--rj-color-border);--rj-editor-text:var(--rj-color-text);--rj-editor-placeholder:var(--rj-color-subtle);--rj-editor-toolbar-bg:var(--rj-color-surface-soft);--rj-editor-toolbar-button-bg:var(--rj-color-surface);--rj-editor-toolbar-button-active-bg:var(--rj-color-brand-tint);--rj-editor-link:var(--rj-color-link);--rj-editor-focus-border:var(--rj-color-focus);--rj-editor-table-border:var(--rj-color-table-border);--rj-editor-table-header-bg:var(--rj-color-table-header-bg);--rj-editor-table-selected-bg:var(--rj-color-brand-tint);--rj-editor-image-border:var(--rj-color-image-border);--rj-editor-image-shadow:var(--rj-shadow-image);--rj-editor-inline-code-bg:var(--rj-color-inline-code-bg);--rj-editor-inline-code-text:var(--rj-color-inline-code-text);--rj-editor-inline-code-border:var(--rj-color-inline-code-border);--rj-editor-code-bg:var(--rj-color-code-bg);--rj-editor-code-header-bg:var(--rj-color-code-header-bg);--rj-editor-code-border:var(--rj-color-code-border);--rj-editor-code-text:var(--rj-color-code-text);--rj-editor-code-muted:var(--rj-color-code-muted);--rj-editor-code-keyword:var(--rj-color-code-keyword);--rj-editor-code-string:var(--rj-color-code-string);--rj-editor-code-number:var(--rj-color-code-number);--rj-editor-code-comment:var(--rj-color-code-comment);--rj-editor-code-function:var(--rj-color-code-function);--rj-editor-code-operator:var(--rj-color-code-operator);--rj-editor-code-tag:var(--rj-color-code-tag);--rj-editor-muted-text:var(--rj-color-muted);--rj-editor-danger:var(--rj-color-danger);--rj-editor-danger-bg:var(--rj-color-danger-soft);--rj-editor-danger-border:var(--rj-color-danger-border);--rj-editor-focus-ring:#7aa7f738;--rj-editor-floating-shadow:0 .75rem 1.75rem #0f172a24;--rj-editor-modal-overlay:#0f172a6b;--rj-editor-modal-shadow:0 1.5rem 4rem #0f172a38;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}[data-rj-editor-theme=dark]{--rj-color-text:#ededed;--rj-color-muted:#b0b0b0;--rj-color-subtle:#898989;--rj-color-page-bg:#151515;--rj-color-surface:#1b1b1b;--rj-color-surface-soft:#232323;--rj-color-border:#414141;--rj-color-brand:#b8b8b8;--rj-color-brand-strong:#d4d4d4;--rj-color-brand-soft:#292929;--rj-color-brand-tint:#303030;--rj-color-link:#d0d0d0;--rj-color-focus:#a8a8a8;--rj-color-table-border:#484848;--rj-color-table-header-bg:#292929;--rj-color-image-border:#686868;--rj-shadow-image:0 .875rem 2rem #00000061;--rj-color-inline-code-bg:#101010;--rj-color-inline-code-text:#ededed;--rj-color-inline-code-border:#ffffff29;--rj-color-code-bg:#0b0b0b;--rj-color-code-header-bg:#141414;--rj-color-code-border:#404040;--rj-color-code-text:#ededed;--rj-color-code-muted:#949494;--rj-color-code-keyword:#d7d7d7;--rj-color-code-string:#b8b8b8;--rj-color-code-number:#c9c9c9;--rj-color-code-comment:#777;--rj-color-code-function:#e1e1e1;--rj-color-code-operator:#a6a6a6;--rj-color-code-tag:#c2c2c2;--rj-color-danger:#f87171;--rj-color-danger-soft:#f871711f;--rj-color-danger-border:#985050;--rj-color-inverse-bg:#ededed;--rj-color-inverse-text:#1b1b1b;--rj-color-white:#fff;--rj-editor-bg:var(--rj-color-surface);--rj-editor-border:var(--rj-color-border);--rj-editor-text:var(--rj-color-text);--rj-editor-placeholder:var(--rj-color-subtle);--rj-editor-toolbar-bg:var(--rj-color-surface-soft);--rj-editor-toolbar-button-bg:var(--rj-color-surface);--rj-editor-toolbar-button-active-bg:var(--rj-color-brand-tint);--rj-editor-link:var(--rj-color-link);--rj-editor-focus-border:var(--rj-color-focus);--rj-editor-table-border:var(--rj-color-table-border);--rj-editor-table-header-bg:var(--rj-color-table-header-bg);--rj-editor-table-selected-bg:var(--rj-color-brand-tint);--rj-editor-image-border:var(--rj-color-image-border);--rj-editor-image-shadow:var(--rj-shadow-image);--rj-editor-inline-code-bg:var(--rj-color-inline-code-bg);--rj-editor-inline-code-text:var(--rj-color-inline-code-text);--rj-editor-inline-code-border:var(--rj-color-inline-code-border);--rj-editor-code-bg:var(--rj-color-code-bg);--rj-editor-code-header-bg:var(--rj-color-code-header-bg);--rj-editor-code-border:var(--rj-color-code-border);--rj-editor-code-text:var(--rj-color-code-text);--rj-editor-code-muted:var(--rj-color-code-muted);--rj-editor-code-keyword:var(--rj-color-code-keyword);--rj-editor-code-string:var(--rj-color-code-string);--rj-editor-code-number:var(--rj-color-code-number);--rj-editor-code-comment:var(--rj-color-code-comment);--rj-editor-code-function:var(--rj-color-code-function);--rj-editor-code-operator:var(--rj-color-code-operator);--rj-editor-code-tag:var(--rj-color-code-tag);--rj-editor-muted-text:var(--rj-color-muted);--rj-editor-danger:var(--rj-color-danger);--rj-editor-danger-bg:var(--rj-color-danger-soft);--rj-editor-danger-border:var(--rj-color-danger-border);--rj-editor-focus-ring:#bebebe33;--rj-editor-floating-shadow:0 .75rem 1.75rem #00000061;--rj-editor-modal-overlay:#00000094;--rj-editor-modal-shadow:0 1.5rem 4rem #0000007a;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}._wrapper_se0k7_1{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.375rem;align-items:center;gap:.125rem;width:100%;height:2.125rem;padding:0 .5rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1;display:inline-flex}._wrapper_se0k7_1:focus-within{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .125rem #7aa7f72e}._wrapper_se0k7_1._disabled_se0k7_23{cursor:not-allowed;opacity:.55}._affix_se0k7_28{color:var(--rj-editor-muted-text,#526070);cursor:text;font:inherit;-webkit-user-select:none;user-select:none;flex:none}._affix_se0k7_28 svg{width:1rem!important;height:1rem!important}._affix_se0k7_28 svg path{stroke:var(--rj-editor-muted-text,#526070)}._input_se0k7_43{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.375rem;outline:none;width:100%;height:2.125rem;padding:0 .5rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1}._inputAffix_se0k7_58{box-shadow:none;background:0 0;border:0;border-radius:0;flex:auto;width:100%;min-width:0;height:100%;padding:0}._input_se0k7_43:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .125rem #7aa7f72e}._inputAffix_se0k7_58:focus{box-shadow:none;border-color:#0000}._input_se0k7_43:disabled{cursor:not-allowed;opacity:.55}._overlay_qjax1_1{background:var(--rj-editor-modal-overlay,#0f172a6b);z-index:1200;justify-content:center;align-items:center;padding:1.5rem;display:flex;position:fixed;inset:0}._modal_qjax1_12{background:var(--rj-editor-bg,#fff);box-shadow:var(--rj-editor-modal-shadow,0 1.5rem 4rem #0f172a38);color:var(--rj-editor-text,#111827);min-width:min(26.25rem,100vw - 3rem);max-width:calc(100vw - 3rem);max-height:min(45rem,100vh - 3rem);width:var(--rj-modal-width,26.25rem);border-radius:.5rem;overflow:hidden}._header_qjax1_24{border-bottom:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:move;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;padding:.875rem 1.125rem;display:flex}._title_qjax1_34{margin:0;font-family:system-ui,sans-serif;font-size:1rem;font-weight:700;line-height:1.3}._closeButton_qjax1_42{color:var(--rj-editor-muted-text,#526070);cursor:pointer;cursor:pointer;background:0 0;border:0;border-radius:.375rem;justify-content:center;align-items:center;width:1.875rem;height:1.875rem;padding:0;display:inline-flex}._closeButton_qjax1_42:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);color:var(--rj-editor-text,#111827)}._body_qjax1_65{max-height:calc(100vh - 11.375rem);padding:1.125rem;overflow:auto}._footer_qjax1_71{border-top:.0625rem solid var(--rj-editor-border,#d9dde5);justify-content:flex-end;align-items:center;gap:.5rem;padding:.75rem 1.125rem;display:flex}._button_qjax1_80{border:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:.5rem;justify-content:center;align-items:center;min-width:4.75rem;height:2.125rem;padding:0 .875rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1;display:inline-flex}._cancelButton_qjax1_96{background:var(--rj-editor-toolbar-button-bg,#fff);color:var(--rj-editor-text,#111827)}._cancelButton_qjax1_96:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}._okButton_qjax1_106{background:var(--rj-color-brand,#3167c8);border-color:var(--rj-color-brand,#3167c8);color:var(--rj-color-white,#fff)}._okButton_qjax1_106:hover{background:var(--rj-color-brand-strong,#1f4f9a);border-color:var(--rj-color-brand-strong,#1f4f9a)}._button_qjax1_80:disabled{cursor:not-allowed;opacity:.5}.rj-editor-image-border-radius-input{width:4.375rem}.rj-editor-image-edit-form{gap:.5rem;display:grid}.rj-editor-image-edit-form label{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.25}.rj-editor-image-edit-form input,.rj-editor-image-edit-form textarea{background:var(--rj-editor-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;outline:none;width:100%;padding:.5625rem .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1.35}.rj-editor-image-edit-form input{height:2.375rem}.rj-editor-image-edit-form textarea{resize:vertical;min-height:6rem}.rj-editor-image-edit-form input:focus,.rj-editor-image-edit-form textarea:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .1875rem var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-link-form{gap:.75rem;display:grid}.rj-editor-link-field{gap:.375rem;display:grid}.rj-editor-link-field label,.rj-editor-link-checkbox{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.25}.rj-editor-link-field input{background:var(--rj-editor-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;outline:none;height:2.25rem;padding:0 .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1.35}.rj-editor-link-field input:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .1875rem var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-link-checkbox{align-items:center;gap:.5rem;width:fit-content;display:inline-flex}.rj-editor-link-checkbox input{accent-color:var(--rj-color-brand,#3167c8);width:1rem;height:1rem}.rj-editor-youtube-form{gap:.75rem;display:grid}.rj-editor-youtube-field{gap:.375rem;display:grid}.rj-editor-youtube-field label{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.25}.rj-editor-youtube-field input{background:var(--rj-editor-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;outline:none;width:100%;height:2.375rem;padding:.5625rem .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1.35}.rj-editor-youtube-field input:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .1875rem var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-youtube-error{color:var(--rj-editor-danger,#dc2626);margin:0;font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.35}.rj-editor-toolbar{background:var(--rj-editor-toolbar-bg,#f8fafc);border-bottom:.0625rem solid var(--rj-editor-border,#d9dde5);flex-direction:column;display:flex}.rj-editor-toolbar-tabs{border-bottom:.0625rem solid var(--rj-editor-border,#d9dde5);justify-content:space-between;align-items:center;gap:.25rem;padding:.375rem .5rem;display:flex}.rj-editor-toolbar-tabs-list{flex-wrap:wrap;align-items:center;gap:.25rem;display:flex}.rj-editor-toolbar-tabs-list button{background:0 0;border:.0625rem solid #0000;border-bottom:0;border-radius:.5rem .5rem 0 0;min-width:auto;height:2rem;padding:0 .875rem}.rj-editor-toolbar-tabs-list button:hover,.rj-editor-toolbar-tabs-list button.is-active{background:var(--rj-editor-toolbar-button-bg,#fff);border-color:var(--rj-editor-border,#d9dde5)}.rj-editor-toolbar-fullscreen{flex:none}.rj-editor-toolbar-panel{flex-wrap:wrap;align-items:center;gap:.375rem;min-height:3.125rem;padding:.5rem;display:flex}.rj-editor-toolbar-panel--home,.rj-editor-toolbar-panel--image{flex-flow:column;align-items:stretch;gap:.5rem}.rj-editor-toolbar-row{flex-wrap:wrap;flex:none;align-items:center;gap:.375rem;padding-bottom:.0625rem;display:flex}.rj-editor-equation-toolbar{flex-flow:wrap;align-items:stretch}.rj-editor-equation-ribbon{flex-wrap:wrap;align-items:stretch;gap:.5rem;width:100%;display:flex}.rj-editor-equation-ribbon-group{flex:none;align-items:center;min-width:0;display:inline-flex}.rj-editor-equation-ribbon-group--symbols{max-width:26.875rem}.rj-editor-equation-ribbon-group--structures{flex:26.25rem}.rj-editor-equation-tools{align-items:center;gap:.375rem;display:inline-flex}.rj-editor-equation-primary{flex-direction:column;gap:.125rem;min-width:4.625rem!important;height:3.875rem!important;padding:.375rem .625rem!important}.rj-editor-equation-primary-icon{color:var(--rj-color-brand,#3167c8);font-family:Georgia,Times New Roman,serif;font-size:1.875rem;font-weight:700;line-height:1}.rj-editor-equation-mode-stack{gap:.25rem;display:grid}.rj-editor-equation-mode-stack button{min-width:4rem;height:1.75rem}.rj-editor-equation-symbol-palette{gap:.125rem;display:grid}.rj-editor-equation-symbol-row{gap:.125rem;display:flex}.rj-editor-equation-symbol-row button{border-radius:.1875rem;min-width:1.75rem;height:1.75rem;padding:0 .375rem;font-family:Georgia,Times New Roman,serif;font-size:1rem}.rj-editor-equation-structures{flex-wrap:wrap;align-items:center;gap:.375rem;display:flex}.rj-editor-equation-structure{flex-direction:column;gap:.25rem;min-width:5rem!important;height:3.875rem!important;padding:.375rem .625rem!important}.rj-editor-equation-structure small{color:var(--rj-editor-muted-text,#526070);align-items:center;gap:.125rem;font-family:system-ui,sans-serif;font-size:.625rem;font-weight:600;line-height:1;display:inline-flex}.rj-editor-equation-structure small svg{width:.75rem!important;height:.75rem!important}.rj-editor-equation-math-preview{justify-content:center;align-items:center;min-width:2.125rem;min-height:1.5rem;display:inline-flex}.rj-editor-equation-math-preview .rj-editor-equation-render{font-family:Georgia,Times New Roman,serif;font-size:1.25rem;font-weight:600}.rj-editor-equation-gallery{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);box-shadow:var(--rj-editor-floating-shadow,0 1rem 2.375rem #0f172a2e);scrollbar-width:thin;border-radius:.5rem;min-width:23.75rem;max-height:32.5rem;padding:.625rem;overflow:auto}.rj-editor-equation-gallery-title{color:var(--rj-editor-muted-text,#526070);margin-bottom:.5rem;font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:700}.rj-editor-equation-gallery-grid{grid-template-columns:repeat(3,minmax(6rem,1fr));gap:.5rem;display:grid}.rj-editor-equation-gallery-grid button{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:.375rem;flex-direction:column;justify-content:center;align-items:center;gap:.375rem;min-height:4.75rem;padding:.5rem;display:flex}.rj-editor-equation-gallery-grid button:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-equation-gallery-grid small{color:var(--rj-editor-muted-text,#526070);text-align:center;font-family:system-ui,sans-serif;font-size:.6875rem;font-weight:600;line-height:1.2}.rj-editor-equation-gallery-section{background:linear-gradient(180deg, var(--rj-editor-toolbar-bg,#f8fafc), var(--rj-editor-toolbar-button-bg,#fff));color:var(--rj-editor-muted-text,#526070);border-radius:.25rem;grid-column:1/-1;padding:.3125rem .375rem;font-size:.75rem;font-weight:700}.rj-editor-equation-gallery-grid .rj-editor-equation-math-preview{min-height:2.125rem}.rj-editor-equation-gallery-grid .rj-editor-equation-math-preview .rj-editor-equation-render{font-size:1.125rem}.rj-editor-toolbar-group{white-space:nowrap;flex-wrap:nowrap;flex:none;align-items:center;gap:.375rem;display:inline-flex}.rj-editor-toolbar-group button svg{min-width:1rem;min-height:1rem}.rj-editor-toolbar button{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:.5rem;justify-content:center;align-items:center;min-width:2.125rem;height:2.125rem;padding:0 .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1;display:inline-flex}.rj-editor-toolbar--clear-btn{color:var(--rj-editor-danger,#dc2626)!important}.rj-editor-toolbar--clear-btn svg path{stroke:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar button:hover:not(:disabled),.rj-editor-toolbar button.is-active,.rj-editor-toolbar select:hover,.rj-editor-toolbar input[type=color]:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-toolbar .rj-editor-toolbar--clear-btn:hover:not(:disabled){background:var(--rj-editor-danger-bg,#fee2e2);border-color:var(--rj-editor-danger-border,#fca5a5);color:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar input[type=color]{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;height:2.125rem}.rj-editor-toolbar-select{border-radius:.5rem;min-width:5.75rem;height:2.125rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1}.rj-editor-toolbar-select .ant-select-selector{font:inherit;align-items:center;min-height:2.125rem;display:flex;border-radius:.5rem!important}.rj-editor-toolbar-select .ant-select-selection-item,.rj-editor-toolbar-select .ant-select-selection-placeholder{font:inherit}.rj-editor-toolbar-select .ant-select-arrow{color:var(--rj-editor-muted-text,#526070);align-items:center;display:inline-flex}.rj-editor-toolbar-select .ant-select-suffix{align-items:center;width:1.25rem;height:1.25rem;display:inline-flex}.rj-editor-toolbar-select-font{min-width:9.25rem}.rj-editor-toolbar-select-crop{min-width:7.25rem}.rj-editor-image-width-input{width:5.25rem}.rj-editor-toolbar input[type=color]{cursor:pointer;width:2.375rem;padding:.1875rem}.rj-editor-toolbar button:disabled{cursor:not-allowed;opacity:.45}.rj-editor-color-button{min-width:2.625rem}.rj-editor-color-button svg{filter:drop-shadow(0 0 .0625rem #fff)!important}.rj-editor-text-color-mark{flex-direction:column;align-items:center;gap:.125rem;font-weight:700;line-height:1;display:inline-flex}.rj-editor-text-color-line{border-radius:62.4375rem;width:1.125rem;height:.1875rem;display:block}.rj-editor-background-color-mark{border:.0625rem solid var(--rj-editor-border,#d9dde5);border-radius:.25rem;justify-content:center;align-items:center;min-width:1.75rem;max-width:1.875rem;height:1.375rem;padding:0 .25rem;font-size:.75rem;font-weight:700;display:inline-flex}.rj-editor-background-color-mark.is-none{background:linear-gradient(135deg, transparent 45%, var(--rj-editor-focus-border,#7aa7f7) 47%, var(--rj-editor-focus-border,#7aa7f7) 53%, transparent 55%), var(--rj-editor-toolbar-button-bg,#fff)}.rj-editor-color-menu-item{color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;align-items:center;gap:.5rem;width:100%;min-width:7.5rem;padding:.125rem 0;display:flex}.rj-editor-spacing-menu-item{color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;width:100%;min-width:6rem;padding:.125rem 0}.rj-editor-color-menu-input{cursor:pointer;width:1.75rem;height:1.375rem;margin-left:auto;padding:0}.rj-editor-color-swatch,.rj-editor-color-none{border:.0625rem solid var(--rj-editor-border,#d9dde5);border-radius:.25rem;width:1.125rem;height:1.125rem;display:inline-flex}.rj-editor-color-none{background:linear-gradient(135deg, transparent 43%, #ef4444 46%, #ef4444 54%, transparent 57%), var(--rj-editor-toolbar-button-bg,#fff)}.rj-editor-toolbar button svg{width:1.125rem;height:1.125rem}.rj-editor-toolbar-divider{background:var(--rj-editor-border,#d9dde5);width:.0625rem;height:1.375rem;margin:0 .125rem}.rj-editor-table-icon span{border:.09375rem solid;border-radius:.125rem}.rj-editor-table-menu{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);box-shadow:var(--rj-editor-floating-shadow,0 .75rem 1.75rem #0f172a24);border-radius:.5rem;gap:.625rem;min-width:16.25rem;padding:.75rem;display:grid}.rj-editor-table-menu-title{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.875rem;font-weight:700;line-height:1.2}.rj-editor-table-grid{grid-template-columns:repeat(10,1.125rem);gap:.3125rem;display:grid}.rj-editor-table-grid button{background:var(--rj-editor-toolbar-bg,#f8fafc);border:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:.125rem;width:1.125rem;min-width:1.125rem;height:1.125rem;padding:0}.rj-editor-table-grid button:hover,.rj-editor-table-grid button.is-selected{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-table-menu-divider{background:var(--rj-editor-border,#d9dde5);height:.0625rem;margin:.125rem -.75rem}.rj-editor-table-menu-row{grid-template-columns:1fr 4.75rem;align-items:center;gap:.625rem;display:grid}.rj-editor-table-menu-row label{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:500;line-height:1.2}.rj-editor-footer{background:var(--rj-editor-toolbar-bg,#f8fafc);border-top:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-muted-text,#526070);align-items:center;gap:.75rem;min-height:2.125rem;padding:.375rem .75rem;font-size:.75rem;font-weight:500;line-height:1.2;display:flex;overflow:hidden}.rj-editor-footer-items{flex-wrap:wrap;align-items:center;gap:.375rem .875rem;width:100%;min-width:0;display:flex}.rj-editor-footer-item{white-space:nowrap;flex:none;align-items:center;gap:.25rem;display:inline-flex}.rj-editor-footer-item-value{color:var(--rj-editor-text,#111827);font-weight:600}.rj-editor-footer-spacer{flex:auto;min-width:.5rem}.rj-editor{border:.0625rem solid var(--rj-editor-border,#d9dde5);background:var(--rj-editor-bg,#fff);color:var(--rj-editor-text,#111827);text-align:left;border-radius:.5rem;transition:border-color .2s,box-shadow .2s;overflow:hidden}.rj-editor[data-rj-editor-theme=dark]{accent-color:var(--rj-color-brand,#b8b8b8)}.rj-editor[data-rj-editor-theme=dark] ::selection{color:#fff;background:#555}.rj-editor-hidden-file-input{display:none!important}.ant-form-item-has-error .rj-editor{border-color:var(--rj-editor-error-border,#ff4d4f);box-shadow:0 0 0 .125rem var(--rj-editor-error-shadow,#ff4d4f1a)}.ant-form-item-has-warning .rj-editor{border-color:var(--rj-editor-warning-border,#faad14);box-shadow:0 0 0 .125rem var(--rj-editor-warning-shadow,#faad141a)}.ant-form-item-has-error .rj-editor .rj-editor-toolbar-select .ant-select-selector,.ant-form-item-has-warning .rj-editor .rj-editor-toolbar-select .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-status-error .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-status-warning .ant-select-selector{border-color:var(--rj-editor-border,#d9dde5)!important;box-shadow:none!important}.ant-form-item-has-error .rj-editor .rj-editor-toolbar-select.ant-select-focused .ant-select-selector,.ant-form-item-has-warning .rj-editor .rj-editor-toolbar-select.ant-select-focused .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-focused.ant-select-status-error .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-focused.ant-select-status-warning .ant-select-selector{border-color:var(--rj-editor-focus-border,#7aa7f7)!important;box-shadow:0 0 0 .125rem var(--rj-editor-focus-ring,#7aa7f738)!important}.ant-form-item-has-error .rj-editor .rj-editor-code-block-language-select .ant-select-selector,.ant-form-item-has-warning .rj-editor .rj-editor-code-block-language-select .ant-select-selector,.rj-editor .rj-editor-code-block-language-select.ant-select-status-error .ant-select-selector,.rj-editor .rj-editor-code-block-language-select.ant-select-status-warning .ant-select-selector{border-color:var(--rj-editor-code-border,#34363a)!important;box-shadow:none!important}.rj-editor--fullscreen{z-index:1000;border-radius:0;flex-direction:column;display:flex;position:fixed;inset:0}.rj-editor-body{flex:auto;min-height:0;position:relative}.rj-editor-input{outline:none;min-height:13.75rem;padding:1.125rem}.rj-editor--fullscreen .rj-editor-input{height:100%;min-height:0;overflow:auto}.rj-editor-placeholder{color:var(--rj-editor-placeholder,#8a94a6);pointer-events:none;-webkit-user-select:none;user-select:none;position:absolute;top:1.125rem;left:1.125rem}.rj-editor-paragraph{margin:0 0 .75rem}.rj-editor-paragraph:last-child{margin-bottom:0}.rj-editor-text-bold{font-weight:700}.rj-editor-text-code{background:var(--rj-editor-inline-code-bg,#2a2828);border:.0625rem solid var(--rj-editor-inline-code-border,#ffffff24);color:var(--rj-editor-inline-code-text,#ededed);white-space:pre-wrap;border-radius:.375rem;padding:.125rem .375rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.92em;line-height:1.35}.rj-editor-code-block{background:var(--rj-editor-code-bg,#0b0c0e);border:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-text,#ededed);scrollbar-color:var(--rj-editor-code-border,#34363a) transparent;scrollbar-width:thin;tab-size:2;white-space:pre;border-radius:.5rem;outline:none;min-height:7rem;margin:.75rem 0;padding:3.625rem 1rem 1.125rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.8125rem;line-height:1.65;display:block;position:relative;overflow:auto}.rj-editor-code-block:before{background:var(--rj-editor-code-header-bg,#111214);border-bottom:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-muted,#a1a1aa);content:\">_ \" attr(data-language);align-items:center;height:2.625rem;padding:0 .875rem;font-family:inherit;font-size:.75rem;display:flex;position:absolute;top:0;left:0;right:0}.rj-editor-code-block-actions{z-index:20;align-items:center;gap:.3125rem;width:11.875rem;display:inline-flex;position:absolute}.rj-editor-code-block-language-select{flex:auto;min-width:0}.rj-editor-code-block-language-select.ant-select .ant-select-selector{background-color:var(--rj-editor-code-header-bg,#111214)!important;border-color:var(--rj-editor-code-border,#34363a)!important;color:var(--rj-editor-code-text,#ededed)!important}.rj-editor-code-block-language-select .ant-select-selection-item,.rj-editor-code-block-language-select .ant-select-arrow,.rj-editor-code-block-language-select .ant-select-suffix{color:var(--rj-editor-code-text,#ededed)!important}.rj-editor-code-block-language-popup{border:.0625rem solid var(--rj-editor-code-border,#34363a);background:var(--rj-editor-code-header-bg,#111214)!important}.rj-editor-code-block-language-popup .ant-select-item{color:var(--rj-editor-code-text,#ededed)!important}.rj-editor-code-block-language-popup .ant-select-item-option-active,.rj-editor-code-block-language-popup .ant-select-item-option-selected{background:#303030!important}.rj-editor-code-block-actions button{background:var(--rj-editor-code-header-bg,#111214);border:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-muted,#a1a1aa);cursor:pointer;border-radius:.375rem;flex:0 0 1.75rem;justify-content:center;align-items:center;height:1.75rem;padding:0;display:inline-flex}.rj-editor-code-block-actions button:hover,.rj-editor-code-block-actions button.is-copied{color:var(--rj-editor-code-text,#ededed);background:#303030;border-color:#787878}.rj-editor-code-block-actions button svg{width:1rem;height:1rem}.rj-editor-code-block-export{background:var(--rj-editor-code-bg,#0b0c0e);border:.0625rem solid var(--rj-editor-code-border,#34363a);border-radius:.5rem;max-width:100%;margin:.75rem 0;overflow:hidden}.rj-editor-code-block-export-header{background:var(--rj-editor-code-header-bg,#111214);border-bottom:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-muted,#a1a1aa);justify-content:space-between;align-items:center;height:2.625rem;padding:0 .5rem 0 .875rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.75rem;display:flex}.rj-editor-code-block-export-copy{color:var(--rj-editor-code-muted,#a1a1aa);cursor:pointer;background:0 0;border:.0625rem solid #0000;border-radius:.375rem;justify-content:center;align-items:center;width:1.75rem;height:1.75rem;padding:0;display:inline-flex}.rj-editor-code-block-export-copy:hover,.rj-editor-code-block-export-copy.is-copied{color:var(--rj-editor-code-text,#ededed);background:#303030;border-color:#787878}.rj-editor-code-block-export-copy svg{width:1rem;height:1rem}.rj-editor-code-block.rj-editor-code-block--exported{border:0;border-radius:0;min-height:4.375rem;margin:0;padding:1rem}.rj-editor-code-block.rj-editor-code-block--exported:before{content:none;display:none}.rj-editor-code-token-comment{color:var(--rj-editor-code-comment,#7f848e)}.rj-editor-code-token-atrule,.rj-editor-code-token-keyword,.rj-editor-code-token-important{color:var(--rj-editor-code-keyword,#c678dd)}.rj-editor-code-token-attr,.rj-editor-code-token-char,.rj-editor-code-token-inserted,.rj-editor-code-token-regex,.rj-editor-code-token-selector,.rj-editor-code-token-string{color:var(--rj-editor-code-string,#98c379)}.rj-editor-code-token-boolean,.rj-editor-code-token-constant,.rj-editor-code-token-number,.rj-editor-code-token-symbol{color:var(--rj-editor-code-number,#d19a66)}.rj-editor-code-token-class,.rj-editor-code-token-class-name,.rj-editor-code-token-function{color:var(--rj-editor-code-function,#61afef)}.rj-editor-code-token-builtin,.rj-editor-code-token-entity,.rj-editor-code-token-operator,.rj-editor-code-token-property,.rj-editor-code-token-punctuation,.rj-editor-code-token-url,.rj-editor-code-token-variable{color:var(--rj-editor-code-operator,#56b6c2)}.rj-editor-code-token-deleted,.rj-editor-code-token-tag{color:var(--rj-editor-code-tag,#e06c75)}.rj-editor-text-italic{font-style:italic}.rj-editor-text-strikethrough{text-decoration:line-through}.rj-editor-text-subscript{vertical-align:sub;font-size:.75em}.rj-editor-text-superscript{vertical-align:super;font-size:.75em}.rj-editor-text-underline{text-decoration:underline}.rj-editor-input a{color:var(--rj-editor-link,#2563eb);text-decoration:underline}.rj-editor-input hr{border:0;border-top:.0625rem solid var(--rj-editor-border,#d9dde5);margin:1rem 0}.rj-editor-equation-node{display:inline}.rj-editor-equation{cursor:pointer;scrollbar-width:thin;vertical-align:middle;border-radius:.375rem;min-width:0;max-width:100%;padding:.125rem .25rem;display:inline-flex;overflow-x:auto}.rj-editor-equation--block{justify-content:center;width:100%;margin:.625rem 0;padding:.5rem;display:flex;overflow-x:auto}.rj-editor-equation-editor{flex-direction:column;align-items:center;gap:.5rem;min-width:0;max-width:100%;display:inline-flex}.rj-editor-equation-editor input:not(.rj-editor-equation-slot-input){background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border:.0625rem solid var(--rj-editor-focus-border,#7aa7f7);color:var(--rj-editor-text,#111827);resize:none;text-align:center;border-radius:.25rem;outline:none;min-width:16.25rem;min-height:2.125rem;padding:.25rem .5rem;font-family:Georgia,Times New Roman,serif;font-size:1.125rem;font-weight:500;line-height:1.25}.rj-editor-equation-editor input::placeholder,.rj-editor-equation-content.is-empty{color:var(--rj-editor-placeholder,#8a94a6)}.rj-editor-equation-visual-editor{align-items:center;min-width:0;min-height:2.125rem;display:inline-flex}.rj-editor-equation-visual,.rj-editor-equation-render{vertical-align:middle;justify-content:center;align-items:center;gap:.25rem;min-width:0;max-width:100%;font-family:Georgia,Times New Roman,serif;font-size:1.25rem;font-style:italic;line-height:1.15;display:inline-flex}.rj-editor-equation-visual{min-height:2.125rem}.rj-editor-equation-render-slot{text-align:center;text-overflow:ellipsis;min-width:.625rem;max-width:8.75rem;display:inline-block;overflow:hidden}.rj-editor-equation-nested{align-items:center;min-width:0;display:inline-flex}.rj-editor-equation-insert-point{appearance:none;cursor:text;background:0 0;border:0;border-radius:.125rem;flex:0 0 .5rem;align-self:stretch;width:.5rem;min-height:1.5rem;margin:0 -.125rem;padding:0;display:inline-flex;position:relative}.rj-editor-equation-insert-point:after{background:var(--rj-editor-focus-border,#7aa7f7);content:\"\";opacity:0;border-radius:.125rem;width:.125rem;transition:opacity .12s;position:absolute;top:.1875rem;bottom:.1875rem;left:50%;transform:translate(-50%)}.rj-editor-equation-insert-point:hover:after,.rj-editor-equation-insert-point.is-active:after{opacity:1}.rj-editor-equation-slot-input{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border:.0625rem dashed var(--rj-editor-focus-border,#7aa7f7);color:var(--rj-editor-text,#111827);box-sizing:border-box;text-align:center;text-overflow:clip;border-radius:.25rem;outline:none;flex:none;width:auto;min-width:1.375rem;max-width:9.375rem;min-height:1.5rem;padding:.0625rem .3125rem;font-family:Georgia,Times New Roman,serif;font-size:1.125rem;font-style:italic;font-weight:600;line-height:1.2;overflow:hidden}.rj-editor-equation-editor .rj-editor-equation-slot-input{width:auto;min-width:1.375rem;min-height:1.5rem;padding:.0625rem .3125rem;font-size:1.125rem}.rj-editor-equation-slot-input:focus{box-shadow:0 0 0 .125rem var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-style:solid}.rj-editor-equation-slot-input::placeholder{color:var(--rj-editor-muted-text,#526070)}.rj-editor-equation-slot-input--limit,.rj-editor-equation-slot-input--script,.rj-editor-equation-slot-input--small,.rj-editor-equation-slot-input--root-index,.rj-editor-equation-editor .rj-editor-equation-slot-input--limit,.rj-editor-equation-editor .rj-editor-equation-slot-input--script,.rj-editor-equation-editor .rj-editor-equation-slot-input--small,.rj-editor-equation-editor .rj-editor-equation-slot-input--root-index{min-width:1.125rem;min-height:1.125rem;padding:.0625rem .25rem;font-size:.8125rem}.rj-editor-equation-slot-input--small{min-width:1.125rem}.rj-editor-equation-slot-input--matrix{min-width:1.375rem}.rj-editor-equation-visual--fraction,.rj-editor-equation-render--fraction{place-items:center;gap:.125rem;min-width:0;display:inline-grid}.rj-editor-equation-fraction-line,.rj-editor-equation-render-line{background:var(--rj-editor-text,#111827);width:100%;height:.125rem;display:block}.rj-editor-equation-visual--fraction-inline,.rj-editor-equation-render--fraction-inline,.rj-editor-equation-visual--row,.rj-editor-equation-render--row{flex-wrap:nowrap;align-items:center;gap:.125rem;min-width:0;display:inline-flex}.rj-editor-equation-visual--script,.rj-editor-equation-render--script{vertical-align:middle;align-items:center;gap:.125rem}.rj-editor-equation-script-stack,.rj-editor-equation-render-script-stack{place-items:center;gap:.0625rem;line-height:1;display:inline-grid}.rj-editor-equation-visual--script.has-superscript:not(.has-subscript) .rj-editor-equation-script-stack,.rj-editor-equation-render--script.has-superscript:not(.has-subscript) .rj-editor-equation-render-script-stack{transform:translateY(-.4375rem)}.rj-editor-equation-visual--script.has-subscript:not(.has-superscript) .rj-editor-equation-script-stack,.rj-editor-equation-render--script.has-subscript:not(.has-superscript) .rj-editor-equation-render-script-stack{transform:translateY(.4375rem)}.rj-editor-equation-visual--script.has-superscript.has-subscript .rj-editor-equation-script-stack,.rj-editor-equation-render--script.has-superscript.has-subscript .rj-editor-equation-render-script-stack{transform:translateY(-.0625rem)}.rj-editor-equation-render-script-stack{font-size:.68em}.rj-editor-equation-visual--root,.rj-editor-equation-render--root{align-items:flex-start;gap:0}.rj-editor-equation-root-symbol,.rj-editor-equation-render-root-symbol{font-size:1.875rem;font-style:normal;line-height:1}.rj-editor-equation-radicand,.rj-editor-equation-render-radicand{border-top:.125rem solid var(--rj-editor-text,#111827);margin-top:.125rem;padding:.125rem .25rem 0;display:inline-flex}.rj-editor-equation-slot-input--root-index,.rj-editor-equation-render-root-index{align-self:flex-start;margin-right:-.125rem}.rj-editor-equation-render-root-index{font-size:.62em}.rj-editor-equation-limits,.rj-editor-equation-render-limits{place-items:center;gap:.0625rem;line-height:1;display:inline-grid}.rj-editor-equation-render-limits span:first-child,.rj-editor-equation-render-limits span:last-child{font-size:.62em}.rj-editor-equation-large-symbol,.rj-editor-equation-render-large-symbol{font-size:2.125rem;font-style:normal;line-height:.9}.rj-editor-equation-function-name{font-style:normal;font-weight:600}.rj-editor-equation-bracket,.rj-editor-equation-render-bracket,.rj-editor-equation-matrix-bracket,.rj-editor-equation-render-matrix-bracket{font-size:2.125rem;font-style:normal;line-height:1}.rj-editor-equation-visual--accent,.rj-editor-equation-render--accent{justify-items:center;gap:0;display:inline-grid}.rj-editor-equation-accent-mark,.rj-editor-equation-render-accent-mark{font-size:1.125rem;line-height:.7}.rj-editor-equation-matrix-grid,.rj-editor-equation-render-matrix-grid{gap:.25rem .5rem;display:inline-grid}.rj-editor-equation-render-matrix-grid span{text-align:center;min-width:1.5rem}.rj-editor-equation.is-selected{outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:.125rem}.rj-editor-equation-content,.rj-editor-equation-content math{max-width:100%}.rj-editor-equation-content .katex-display{margin:0}.rj-editor-image-node{margin:.75rem 0;display:block}.rj-editor-youtube-node{clear:both;margin:1rem 0;display:block}.rj-editor-youtube{aspect-ratio:16/9;background:var(--rj-editor-toolbar-bg,#f8fafc);border:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:.5rem;width:100%;max-width:45rem;overflow:hidden}.rj-editor-youtube.is-selected{outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:.125rem}.rj-editor-youtube iframe{border:0;width:100%;height:100%;display:block}.rj-editor-image-frame{width:100%;display:flex;position:relative}.rj-editor-image-frame--wrap-square{width:auto;max-width:100%;display:block}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--left{float:left;margin:.25rem 1rem .625rem 0}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--right{float:right;margin:.25rem 0 .625rem 1rem}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--center,.rj-editor-image-frame--wrap-top-bottom{clear:both;width:100%;display:flex}.rj-editor-image-frame--left{justify-content:flex-start}.rj-editor-image-frame--center{justify-content:center}.rj-editor-image-frame--right{justify-content:flex-end}.rj-editor-image{width:100%;max-width:100%;height:auto;display:block}.rj-editor-image-box{transform-origin:50%;flex-direction:column;display:inline-flex;position:relative}.rj-editor-image-rotator{transform:rotate(var(--rj-image-rotation,0deg));transform-origin:50%;width:100%;display:block}.rj-editor-image-box.is-quarter-turn{display:block}.rj-editor-image-box.is-quarter-turn .rj-editor-image-rotator{transform:translate(-50%, -50%) rotate(var(--rj-image-rotation,0deg));position:absolute;top:50%;left:50%}.rj-editor-image-box.is-quarter-turn .rj-editor-image-link,.rj-editor-image-box.is-quarter-turn .rj-editor-image{width:100%;max-width:none;height:100%}.rj-editor-image-box.is-quarter-turn .rj-editor-image-caption{width:100%;position:absolute;top:100%;left:0}.rj-editor-image-box.has-border .rj-editor-image{border:.0625rem solid var(--rj-editor-image-border,#94a3b8)}.rj-editor-image-box.has-shadow .rj-editor-image{box-shadow:var(--rj-editor-image-shadow,0 .875rem 2rem #0f172a2e)}.rj-editor-image-link{display:block}.rj-editor-image-caption{color:var(--rj-editor-muted-text,#64748b);text-align:center;margin-top:.375rem;font-family:system-ui,sans-serif;font-size:.75rem;font-weight:500;line-height:1.35;display:block}.rj-editor-image-frame.is-selected .rj-editor-image-box{outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:.125rem}.rj-editor-image-floating-toolbar{background:var(--rj-editor-toolbar-bg,#f8fafc);border:.0625rem solid var(--rj-editor-border,#d9dde5);box-shadow:var(--rj-editor-floating-shadow,0 .75rem 1.75rem #0f172a24);z-index:1005;border-radius:.5rem;align-items:center;gap:.25rem;padding:.25rem;display:inline-flex;position:absolute}.rj-editor-image-floating-toolbar button{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:.375rem;justify-content:center;align-items:center;min-width:1.75rem;height:1.75rem;padding:0 .4375rem;font-family:system-ui,sans-serif;font-size:.75rem;font-weight:500;line-height:1;display:inline-flex}.rj-editor-image-floating-toolbar button svg{width:1.25rem;height:1.25rem}.rj-editor-image-floating-toolbar button:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-image-resize-handle{background:var(--rj-editor-focus-border,#7aa7f7);border:.125rem solid var(--rj-editor-bg,#fff);touch-action:none;z-index:2;border-radius:62.4375rem;width:.75rem;height:.75rem;position:absolute;transform:translate(-50%,-50%)}.rj-editor-image-resize-handle--left{cursor:ew-resize;top:50%;left:0}.rj-editor-image-resize-handle--right{cursor:ew-resize;top:50%;left:100%}.rj-editor-image-resize-handle--top{cursor:ns-resize;top:0;left:50%}.rj-editor-image-resize-handle--bottom{cursor:ns-resize;top:100%;left:50%}.rj-editor-image-resize-handle--top-left{cursor:nwse-resize;top:0;left:0}.rj-editor-image-resize-handle--top-right{cursor:nesw-resize;top:0;left:100%}.rj-editor-image-resize-handle--bottom-right{cursor:nwse-resize;top:100%;left:100%}.rj-editor-image-resize-handle--bottom-left{cursor:nesw-resize;top:100%;left:0}.rj-editor-table-scrollable-wrapper{max-width:100%;margin:.75rem 0;overflow-x:auto}.rj-editor-table{border-collapse:collapse;table-layout:fixed;width:100%}.rj-editor-table-cell,.rj-editor-table-cell-header{border:.0625rem solid var(--rj-editor-table-border,#cbd5e1);box-sizing:border-box;vertical-align:top;min-width:5rem;height:2rem;padding:.5rem .625rem}.rj-editor-table-cell .rj-editor-paragraph,.rj-editor-table-cell-header .rj-editor-paragraph{min-height:1.25rem;margin:0;line-height:1.25rem}.rj-editor-table-cell-header{background:var(--rj-editor-table-header-bg,#f1f5f9);font-weight:700}.rj-editor-table-cell-selected{background:var(--rj-editor-table-selected-bg,#eaf2ff);outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:-.125rem}.rj-editor-list-ol,.rj-editor-list-ul{margin:0 0 .75rem 1.5rem;padding:0}.rj-editor-list-item{margin:.25rem 0}\n/*$vite$:1*/";
|
|
3
3
|
function injectRJEditorStyle() {
|
|
4
4
|
if (typeof document === "undefined" || document.getElementById(RJ_EDITOR_STYLE_ID)) return;
|
|
5
5
|
const style = document.createElement("style");
|
|
@@ -289,56 +289,67 @@ async function Et(e) {
|
|
|
289
289
|
t.setAttribute("aria-hidden", "true"), t.style.position = "fixed", t.style.opacity = "0", t.value = e, document.body.append(t), t.select(), document.execCommand("copy"), t.remove();
|
|
290
290
|
}
|
|
291
291
|
//#endregion
|
|
292
|
+
//#region src/utils/helpers/countTextCharacters.ts
|
|
293
|
+
function Dt(e) {
|
|
294
|
+
return Array.from(e.replace(/\n/g, "")).length;
|
|
295
|
+
}
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region src/utils/helpers/countTextWords.ts
|
|
298
|
+
function Ot(e) {
|
|
299
|
+
let t = e.replace(/\u00a0/g, " ").trim();
|
|
300
|
+
return t ? t.split(/\s+/).length : 0;
|
|
301
|
+
}
|
|
302
|
+
//#endregion
|
|
292
303
|
//#region src/utils/helpers/equationModelPrefix.ts
|
|
293
|
-
var
|
|
304
|
+
var kt = "rj-equation-model:";
|
|
294
305
|
//#endregion
|
|
295
306
|
//#region src/utils/helpers/isVisualEquationValue.ts
|
|
296
|
-
function
|
|
297
|
-
return e.startsWith(
|
|
307
|
+
function At(e) {
|
|
308
|
+
return e.startsWith(kt);
|
|
298
309
|
}
|
|
299
310
|
//#endregion
|
|
300
311
|
//#region src/utils/helpers/decodeEquationValue.ts
|
|
301
|
-
function
|
|
302
|
-
if (!
|
|
312
|
+
function jt(e) {
|
|
313
|
+
if (!At(e)) return null;
|
|
303
314
|
try {
|
|
304
|
-
return JSON.parse(decodeURIComponent(e.slice(
|
|
315
|
+
return JSON.parse(decodeURIComponent(e.slice(kt.length)));
|
|
305
316
|
} catch {
|
|
306
317
|
return null;
|
|
307
318
|
}
|
|
308
319
|
}
|
|
309
320
|
//#endregion
|
|
310
321
|
//#region src/utils/helpers/encodeEquationModel.ts
|
|
311
|
-
function
|
|
312
|
-
return `${
|
|
322
|
+
function Mt(e) {
|
|
323
|
+
return `${kt}${encodeURIComponent(JSON.stringify(e))}`;
|
|
313
324
|
}
|
|
314
325
|
//#endregion
|
|
315
326
|
//#region src/utils/helpers/escapeHtml.ts
|
|
316
|
-
var
|
|
327
|
+
var Nt = {
|
|
317
328
|
"&": "&",
|
|
318
329
|
"\"": """,
|
|
319
330
|
"'": "'",
|
|
320
331
|
"<": "<",
|
|
321
332
|
">": ">"
|
|
322
333
|
};
|
|
323
|
-
function
|
|
324
|
-
return e.replace(/[&"'<>]/g, (e) =>
|
|
334
|
+
function Pt(e) {
|
|
335
|
+
return e.replace(/[&"'<>]/g, (e) => Nt[e]);
|
|
325
336
|
}
|
|
326
337
|
//#endregion
|
|
327
338
|
//#region src/utils/helpers/formatNumberText.ts
|
|
328
|
-
function
|
|
339
|
+
function Ft(e, t) {
|
|
329
340
|
if (!t || e === "") return e;
|
|
330
341
|
let n = e.endsWith("."), [r, i] = e.split("."), a = r.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
331
342
|
return typeof i == "string" ? `${a}.${i}` : n ? `${a}.` : a;
|
|
332
343
|
}
|
|
333
344
|
//#endregion
|
|
334
345
|
//#region src/utils/helpers/isApplePlatform.ts
|
|
335
|
-
function
|
|
346
|
+
function It() {
|
|
336
347
|
return typeof navigator > "u" ? !1 : /Mac|iPhone|iPad|iPod/i.test(navigator.platform);
|
|
337
348
|
}
|
|
338
349
|
//#endregion
|
|
339
350
|
//#region src/utils/helpers/formatShortcutTitle.ts
|
|
340
351
|
function L(e, t) {
|
|
341
|
-
return `${e.replace(/\bMOD\b/g,
|
|
352
|
+
return `${e.replace(/\bMOD\b/g, It() ? "CMD" : "CTRL")} | ${t}`;
|
|
342
353
|
}
|
|
343
354
|
//#endregion
|
|
344
355
|
//#region src/utils/helpers/getFirstEquationSlotId.ts
|
|
@@ -362,25 +373,25 @@ function R(e) {
|
|
|
362
373
|
}
|
|
363
374
|
//#endregion
|
|
364
375
|
//#region src/utils/helpers/getYouTubeVideoId.ts
|
|
365
|
-
var
|
|
366
|
-
function
|
|
376
|
+
var Lt = /^[a-zA-Z0-9_-]{11}$/;
|
|
377
|
+
function Rt(e) {
|
|
367
378
|
let t = e.trim();
|
|
368
|
-
if (
|
|
379
|
+
if (Lt.test(t)) return t;
|
|
369
380
|
try {
|
|
370
381
|
let e = new URL(t), n = e.hostname.replace(/^www\./, "");
|
|
371
382
|
if (n === "youtu.be") {
|
|
372
383
|
let t = e.pathname.split("/").filter(Boolean)[0];
|
|
373
|
-
return t &&
|
|
384
|
+
return t && Lt.test(t) ? t : null;
|
|
374
385
|
}
|
|
375
386
|
if (n === "youtube.com" || n === "m.youtube.com" || n === "youtube-nocookie.com") {
|
|
376
387
|
let t = e.searchParams.get("v");
|
|
377
|
-
if (t &&
|
|
388
|
+
if (t && Lt.test(t)) return t;
|
|
378
389
|
let [, n, r] = e.pathname.split("/");
|
|
379
390
|
if ([
|
|
380
391
|
"embed",
|
|
381
392
|
"live",
|
|
382
393
|
"shorts"
|
|
383
|
-
].includes(n) && r &&
|
|
394
|
+
].includes(n) && r && Lt.test(r)) return r;
|
|
384
395
|
}
|
|
385
396
|
} catch {
|
|
386
397
|
return null;
|
|
@@ -389,20 +400,20 @@ function It(e) {
|
|
|
389
400
|
}
|
|
390
401
|
//#endregion
|
|
391
402
|
//#region src/utils/helpers/insertEquationModelIntoSlot.ts
|
|
392
|
-
function
|
|
403
|
+
function zt(e) {
|
|
393
404
|
return {
|
|
394
405
|
kind: "text",
|
|
395
406
|
value: e
|
|
396
407
|
};
|
|
397
408
|
}
|
|
398
|
-
function
|
|
409
|
+
function Bt(e, t, n) {
|
|
399
410
|
if (typeof e == "string") {
|
|
400
411
|
let r = Math.max(0, Math.min(n?.start ?? e.length, e.length)), i = Math.max(r, Math.min(n?.end ?? r, e.length)), a = e.slice(0, r), o = e.slice(i);
|
|
401
412
|
return {
|
|
402
413
|
items: [
|
|
403
|
-
a ?
|
|
414
|
+
a ? zt(a) : null,
|
|
404
415
|
t,
|
|
405
|
-
o ?
|
|
416
|
+
o ? zt(o) : null
|
|
406
417
|
].filter(Boolean),
|
|
407
418
|
kind: "row"
|
|
408
419
|
};
|
|
@@ -419,31 +430,31 @@ function Rt(e, t, n) {
|
|
|
419
430
|
kind: "row"
|
|
420
431
|
};
|
|
421
432
|
}
|
|
422
|
-
function
|
|
433
|
+
function Vt(e, t) {
|
|
423
434
|
if (!t) return e.kind === "row" ? e : null;
|
|
424
435
|
let n = F(e, t);
|
|
425
436
|
return typeof n != "string" && n.kind === "row" ? n : null;
|
|
426
437
|
}
|
|
427
|
-
function
|
|
438
|
+
function Ht(e) {
|
|
428
439
|
let t = e.split(">");
|
|
429
440
|
return t.at(-1) === "text.value" ? t.slice(0, -1).join(">") : null;
|
|
430
441
|
}
|
|
431
|
-
function
|
|
442
|
+
function Ut(e, t) {
|
|
432
443
|
return e ? `${e}>${t}` : t;
|
|
433
444
|
}
|
|
434
|
-
function
|
|
435
|
-
if (typeof t == "string" && !t.trim()) return
|
|
436
|
-
if (typeof t == "string") return
|
|
445
|
+
function Wt(e, t, n, r) {
|
|
446
|
+
if (typeof t == "string" && !t.trim()) return Ut(e, `row.items.0>${R(n)}`);
|
|
447
|
+
if (typeof t == "string") return Ut(e, `row.items.${r?.start && r.start > 0 ? 1 : 0}>${R(n)}`);
|
|
437
448
|
if (typeof t != "string" && t.kind === "row") {
|
|
438
449
|
let r = t.items.at(-1);
|
|
439
|
-
return
|
|
450
|
+
return Ut(e, `row.items.${r?.kind === "text" && typeof r.value == "string" && !r.value.trim() ? t.items.length - 1 : t.items.length}>${R(n)}`);
|
|
440
451
|
}
|
|
441
|
-
return
|
|
452
|
+
return Ut(e, `row.items.1>${R(n)}`);
|
|
442
453
|
}
|
|
443
|
-
function
|
|
454
|
+
function Gt(e, t, n, r) {
|
|
444
455
|
let i = vt(t);
|
|
445
456
|
if (i) {
|
|
446
|
-
let t =
|
|
457
|
+
let t = Vt(e, i.rowSlotId);
|
|
447
458
|
if (!t) return {
|
|
448
459
|
activeSlotId: R(n),
|
|
449
460
|
model: e
|
|
@@ -457,22 +468,22 @@ function Ut(e, t, n, r) {
|
|
|
457
468
|
]
|
|
458
469
|
};
|
|
459
470
|
return {
|
|
460
|
-
activeSlotId:
|
|
471
|
+
activeSlotId: Ut(i.rowSlotId, `row.items.${r}>${R(n)}`),
|
|
461
472
|
model: i.rowSlotId ? I(e, i.rowSlotId, a) : a
|
|
462
473
|
};
|
|
463
474
|
}
|
|
464
|
-
let a =
|
|
475
|
+
let a = Ht(t), o = F(e, t), s = Bt(o, n, r);
|
|
465
476
|
return a === null ? {
|
|
466
|
-
activeSlotId:
|
|
477
|
+
activeSlotId: Wt(t, o, n, r),
|
|
467
478
|
model: I(e, t, s)
|
|
468
479
|
} : {
|
|
469
|
-
activeSlotId:
|
|
480
|
+
activeSlotId: Wt(a, o, n, r),
|
|
470
481
|
model: a ? I(e, a, s) : s
|
|
471
482
|
};
|
|
472
483
|
}
|
|
473
484
|
//#endregion
|
|
474
485
|
//#region src/utils/helpers/normalizeNumberText.ts
|
|
475
|
-
function
|
|
486
|
+
function Kt(e, t, n) {
|
|
476
487
|
let r = e.replace(/,/g, ".").replace(/\s/g, ""), i = "", a = !1, o = 0;
|
|
477
488
|
for (let e of r) {
|
|
478
489
|
if (/\d/.test(e)) {
|
|
@@ -497,14 +508,14 @@ var z = [
|
|
|
497
508
|
"#FCE7F3",
|
|
498
509
|
"#EDE9FE",
|
|
499
510
|
"#E5E7EB"
|
|
500
|
-
],
|
|
511
|
+
], qt = "rj-editor-equation-insert", Jt = [
|
|
501
512
|
"Arial",
|
|
502
513
|
"Georgia",
|
|
503
514
|
"Inter",
|
|
504
515
|
"Times New Roman",
|
|
505
516
|
"Trebuchet MS",
|
|
506
517
|
"Verdana"
|
|
507
|
-
],
|
|
518
|
+
], Yt = [
|
|
508
519
|
"0.5rem",
|
|
509
520
|
"0.5625rem",
|
|
510
521
|
"0.6875rem",
|
|
@@ -558,14 +569,14 @@ var z = [
|
|
|
558
569
|
tableCellVerticalAlign: void 0,
|
|
559
570
|
tableHasMergedCell: !1,
|
|
560
571
|
textColor: ""
|
|
561
|
-
},
|
|
572
|
+
}, Xt = w("INSERT_CODE_BLOCK_COMMAND"), Zt = w("INSERT_EQUATION_COMMAND"), Qt = w("INSERT_IMAGE_COMMAND"), $t = w("INSERT_YOUTUBE_COMMAND"), en = [
|
|
562
573
|
"1",
|
|
563
574
|
"1.15",
|
|
564
575
|
"1.5",
|
|
565
576
|
"2",
|
|
566
577
|
"2.5",
|
|
567
578
|
"3"
|
|
568
|
-
],
|
|
579
|
+
], tn = "rj-editor:open-link-modal", nn = [
|
|
569
580
|
"#111827",
|
|
570
581
|
"#dc2626",
|
|
571
582
|
"#2563eb",
|
|
@@ -575,147 +586,147 @@ var z = [
|
|
|
575
586
|
];
|
|
576
587
|
//#endregion
|
|
577
588
|
//#region src/utils/helpers/normalizeEditorFontFamily.ts
|
|
578
|
-
function
|
|
589
|
+
function rn(e) {
|
|
579
590
|
return e.trim().replace(/^['"]|['"]$/g, "").toLowerCase();
|
|
580
591
|
}
|
|
581
|
-
function
|
|
592
|
+
function an(e) {
|
|
582
593
|
if (!e) return;
|
|
583
|
-
let t = e.split(",").map(
|
|
584
|
-
return
|
|
594
|
+
let t = e.split(",").map(rn);
|
|
595
|
+
return Jt.find((e) => t.includes(rn(e)));
|
|
585
596
|
}
|
|
586
597
|
//#endregion
|
|
587
598
|
//#region src/utils/helpers/normalizeEditorFontSize.ts
|
|
588
|
-
function
|
|
599
|
+
function on(e) {
|
|
589
600
|
return e.trim().toLowerCase();
|
|
590
601
|
}
|
|
591
|
-
function
|
|
602
|
+
function sn(e) {
|
|
592
603
|
if (!e) return;
|
|
593
|
-
let t =
|
|
594
|
-
return
|
|
604
|
+
let t = on(e);
|
|
605
|
+
return Yt.find((e) => on(e) === t);
|
|
595
606
|
}
|
|
596
607
|
//#endregion
|
|
597
608
|
//#region src/utils/helpers/pxToRem.ts
|
|
598
|
-
var
|
|
609
|
+
var cn = 16;
|
|
599
610
|
function V(e) {
|
|
600
|
-
let t = e /
|
|
611
|
+
let t = e / cn;
|
|
601
612
|
return `${Number(t.toFixed(6))}rem`;
|
|
602
613
|
}
|
|
603
614
|
//#endregion
|
|
604
615
|
//#region src/utils/helpers/normalizeRJEditorHtml.ts
|
|
605
|
-
var
|
|
616
|
+
var ln = {
|
|
606
617
|
borderCollapse: "collapse",
|
|
607
618
|
tableLayout: "fixed",
|
|
608
619
|
width: "100%"
|
|
609
|
-
},
|
|
620
|
+
}, un = {
|
|
610
621
|
border: "0.0625rem solid var(--rj-editor-table-border, #cbd5e1)",
|
|
611
622
|
minWidth: "5rem",
|
|
612
623
|
padding: "0.5rem 0.625rem"
|
|
613
|
-
},
|
|
614
|
-
function
|
|
624
|
+
}, dn = "rgb(242, 243, 245)", fn = "var(--rj-editor-table-header-bg, #f1f5f9)", pn = "[data-rj-editor-content=\"true\"]", mn = "pre.rj-editor-code-block";
|
|
625
|
+
function hn(e) {
|
|
615
626
|
let t = "http://www.w3.org/2000/svg", n = e.createElementNS(t, "svg"), r = e.createElementNS(t, "path");
|
|
616
627
|
return n.setAttribute("aria-hidden", "true"), n.setAttribute("fill", "none"), n.setAttribute("viewBox", "0 0 24 24"), r.setAttribute("d", "M5 15C4.06812 15 3.60218 15 3.23463 14.8478C2.74458 14.6448 2.35523 14.2554 2.15224 13.7654C2 13.3978 2 12.9319 2 12V5.2C2 4.0799 2 3.51984 2.21799 3.09202C2.40973 2.71569 2.71569 2.40973 3.09202 2.21799C3.51984 2 4.0799 2 5.2 2H12C12.9319 2 13.3978 2 13.7654 2.15224C14.2554 2.35523 14.6448 2.74458 14.8478 3.23463C15 3.60218 15 4.06812 15 5M12.2 22H18.8C19.9201 22 20.4802 22 20.908 21.782C21.2843 21.5903 21.5903 21.2843 21.782 20.908C22 20.4802 22 19.9201 22 18.8V12.2C22 11.0799 22 10.5198 21.782 10.092C21.5903 9.71569 21.2843 9.40973 20.908 9.21799C20.4802 9 19.9201 9 18.8 9H12.2C11.0799 9 10.5198 9 10.092 9.21799C9.71569 9.40973 9.40973 9.71569 9.21799 10.092C9 10.5198 9 11.0799 9 12.2V18.8C9 19.9201 9 20.4802 9.21799 20.908C9.40973 21.2843 9.71569 21.5903 10.092 21.782C10.5198 22 11.0799 22 12.2 22Z"), r.setAttribute("stroke", "currentColor"), r.setAttribute("stroke-linecap", "round"), r.setAttribute("stroke-linejoin", "round"), r.setAttribute("stroke-width", "2"), n.append(r), n;
|
|
617
628
|
}
|
|
618
|
-
function
|
|
619
|
-
e.querySelectorAll(
|
|
629
|
+
function gn(e) {
|
|
630
|
+
e.querySelectorAll(mn).forEach((t) => {
|
|
620
631
|
if (!(t instanceof HTMLElement) || t.closest("[data-rj-editor-code-block=\"true\"]")) return;
|
|
621
632
|
let n = e.createElement("div"), r = e.createElement("div"), i = e.createElement("span"), a = e.createElement("button");
|
|
622
|
-
n.className = "rj-editor-code-block-export", n.setAttribute("data-rj-editor-code-block", "true"), r.className = "rj-editor-code-block-export-header", i.className = "rj-editor-code-block-export-language", i.textContent = `>_ ${t.getAttribute("data-language") || "plain"}`, a.className = "rj-editor-code-block-export-copy", a.setAttribute("aria-label", "Copy code"), a.setAttribute("data-rj-editor-code-copy", "true"), a.setAttribute("title", "Copy code"), a.setAttribute("type", "button"), a.append(
|
|
633
|
+
n.className = "rj-editor-code-block-export", n.setAttribute("data-rj-editor-code-block", "true"), r.className = "rj-editor-code-block-export-header", i.className = "rj-editor-code-block-export-language", i.textContent = `>_ ${t.getAttribute("data-language") || "plain"}`, a.className = "rj-editor-code-block-export-copy", a.setAttribute("aria-label", "Copy code"), a.setAttribute("data-rj-editor-code-copy", "true"), a.setAttribute("title", "Copy code"), a.setAttribute("type", "button"), a.append(hn(e)), t.classList.add("rj-editor-code-block--exported"), t.replaceWith(n), r.append(i, a), n.append(r, t);
|
|
623
634
|
});
|
|
624
635
|
}
|
|
625
|
-
function
|
|
636
|
+
function _n(e, t) {
|
|
626
637
|
Object.entries(t).forEach(([t, n]) => {
|
|
627
638
|
typeof n == "string" && e.style.setProperty(t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), n);
|
|
628
639
|
});
|
|
629
640
|
}
|
|
630
|
-
function
|
|
641
|
+
function vn(e, t, n) {
|
|
631
642
|
n === "square" && t === "left" && (e.style.float = "left", e.style.margin = "0.25rem 1rem 0.625rem 0"), n === "square" && t === "right" && (e.style.float = "right", e.style.margin = "0.25rem 0 0.625rem 1rem"), n !== "square" && t === "center" && (e.style.marginLeft = "auto", e.style.marginRight = "auto"), n !== "square" && t === "right" && (e.style.marginLeft = "auto", e.style.marginRight = "0"), n !== "square" && t === "left" && (e.style.marginLeft = "0", e.style.marginRight = "auto");
|
|
632
643
|
}
|
|
633
|
-
function
|
|
644
|
+
function yn(e, t) {
|
|
634
645
|
let n = e.createElement("span");
|
|
635
646
|
return n.className = "rj-editor-image-caption", n.textContent = t, n.style.color = "var(--rj-editor-muted-text, #64748b)", n.style.display = "block", n.style.font = "500 0.75rem/1.35 system-ui, sans-serif", n.style.marginTop = "0.375rem", n.style.textAlign = "center", n.style.width = "100%", n;
|
|
636
647
|
}
|
|
637
|
-
function
|
|
648
|
+
function bn(e, t, n) {
|
|
638
649
|
let r = n?.trim();
|
|
639
650
|
if (!r) return t;
|
|
640
651
|
let i = e.createElement("a");
|
|
641
652
|
return i.href = r, i.rel = "noreferrer", i.target = "_blank", i.style.color = "inherit", i.style.display = "block", i.style.textDecoration = "none", t.replaceWith(i), i.append(t), i;
|
|
642
653
|
}
|
|
643
|
-
function
|
|
654
|
+
function xn(e) {
|
|
644
655
|
return Array.from(e.querySelectorAll("img[data-text-wrap=\"square\"], [data-rj-image-caption-wrapper=\"true\"], [data-rj-image-rotation-wrapper=\"true\"]")).some((e) => {
|
|
645
656
|
let t = e;
|
|
646
657
|
return t.style.float === "left" || t.style.float === "right";
|
|
647
658
|
});
|
|
648
659
|
}
|
|
649
|
-
function
|
|
650
|
-
if (!
|
|
660
|
+
function Sn(e) {
|
|
661
|
+
if (!xn(e) || e.body.children.length === 1 && e.body.firstElementChild?.matches(pn)) return;
|
|
651
662
|
let t = e.createElement("div");
|
|
652
663
|
t.className = "rj-editor-content", t.setAttribute("data-rj-editor-content", "true"), t.style.display = "flow-root", t.style.width = "100%", t.append(...Array.from(e.body.childNodes)), e.body.append(t);
|
|
653
664
|
}
|
|
654
|
-
function
|
|
665
|
+
function Cn(e, t) {
|
|
655
666
|
let n = t.getAttribute("data-caption")?.trim();
|
|
656
667
|
if (!n) return !1;
|
|
657
668
|
let r = t.getAttribute("data-alignment"), i = t.getAttribute("data-text-wrap"), a = e.createElement("span");
|
|
658
|
-
return a.setAttribute("data-rj-image-caption-wrapper", "true"), a.style.display = "block", a.style.maxWidth = "100%", a.style.width = t.style.width || "fit-content",
|
|
669
|
+
return a.setAttribute("data-rj-image-caption-wrapper", "true"), a.style.display = "block", a.style.maxWidth = "100%", a.style.width = t.style.width || "fit-content", vn(a, r, i), t.style.float = "", t.style.margin = "0", t.style.width = "100%", t.replaceWith(a), a.append(bn(e, t, t.getAttribute("data-link-url")), yn(e, n)), !0;
|
|
659
670
|
}
|
|
660
|
-
function
|
|
671
|
+
function wn(e) {
|
|
661
672
|
return (Number(e || 0) % 360 + 360) % 360;
|
|
662
673
|
}
|
|
663
|
-
function
|
|
664
|
-
let r = t.getAttribute("data-rj-image-node-key"), i =
|
|
674
|
+
function Tn(e, t, n) {
|
|
675
|
+
let r = t.getAttribute("data-rj-image-node-key"), i = wn(t.getAttribute("data-rotation"));
|
|
665
676
|
if (!r || i !== 90 && i !== 270) return !1;
|
|
666
677
|
let a = (n?.getElementByKey(r))?.querySelector(".rj-editor-image-rotator");
|
|
667
678
|
if (!(a instanceof HTMLElement)) return !1;
|
|
668
679
|
let o = a.getBoundingClientRect(), s = a.offsetWidth, c = a.offsetHeight;
|
|
669
680
|
if (!o.width || !o.height || !s || !c) return !1;
|
|
670
681
|
let l = t.getAttribute("data-alignment"), u = t.getAttribute("data-caption")?.trim(), d = t.getAttribute("data-link-url"), f = t.getAttribute("data-text-wrap"), p = e.createElement("span"), m = e.createElement("span");
|
|
671
|
-
return m.setAttribute("data-rj-image-rotation-wrapper", "true"), m.style.display = "block", m.style.height = V(Math.ceil(o.height)), m.style.maxWidth = "100%", m.style.position = "relative", m.style.width = V(Math.ceil(o.width)),
|
|
682
|
+
return m.setAttribute("data-rj-image-rotation-wrapper", "true"), m.style.display = "block", m.style.height = V(Math.ceil(o.height)), m.style.maxWidth = "100%", m.style.position = "relative", m.style.width = V(Math.ceil(o.width)), vn(m, l, f), p.style.display = "block", p.style.height = V(Math.ceil(o.height)), p.style.position = "relative", p.style.width = V(Math.ceil(o.width)), t.style.display = "block", t.style.float = "", t.style.height = V(c), t.style.left = "50%", t.style.margin = "0", t.style.maxWidth = "none", t.style.position = "absolute", t.style.top = "50%", t.style.transform = `translate(-50%, -50%) rotate(${i}deg)`, t.style.transformOrigin = "center", t.style.width = V(s), t.replaceWith(m), p.append(bn(e, t, d)), m.append(p), u && m.append(yn(e, u)), !0;
|
|
672
683
|
}
|
|
673
|
-
function
|
|
684
|
+
function En(e, t) {
|
|
674
685
|
if (!e.trim() || typeof DOMParser > "u") return e;
|
|
675
686
|
let n = new DOMParser().parseFromString(e, "text/html");
|
|
676
687
|
return n.querySelectorAll("table").forEach((e) => {
|
|
677
|
-
e.classList.add("rj-editor-table"),
|
|
688
|
+
e.classList.add("rj-editor-table"), _n(e, ln);
|
|
678
689
|
}), n.querySelectorAll("td, th").forEach((e) => {
|
|
679
|
-
let t = e, n = e.tagName.toLowerCase() === "th", r = t.style.backgroundColor ===
|
|
680
|
-
t.classList.add(n ? "rj-editor-table-cell-header" : "rj-editor-table-cell"),
|
|
690
|
+
let t = e, n = e.tagName.toLowerCase() === "th", r = t.style.backgroundColor === dn;
|
|
691
|
+
t.classList.add(n ? "rj-editor-table-cell-header" : "rj-editor-table-cell"), _n(t, un), t.style.verticalAlign || (t.style.verticalAlign = "top"), n && (!t.style.backgroundColor || r) && (t.style.backgroundColor = fn, t.style.fontWeight = "700");
|
|
681
692
|
}), n.querySelectorAll("img[data-alignment]").forEach((e) => {
|
|
682
693
|
let r = e, i = r.getAttribute("data-alignment"), a = r.getAttribute("data-text-wrap");
|
|
683
|
-
|
|
684
|
-
}),
|
|
694
|
+
Tn(n, r, t) || (r.style.display = "block", r.style.maxWidth = "100%", vn(r, i, a), Cn(n, r) || bn(n, r, r.getAttribute("data-link-url")));
|
|
695
|
+
}), gn(n), Sn(n), n.body.innerHTML;
|
|
685
696
|
}
|
|
686
697
|
//#endregion
|
|
687
698
|
//#region src/utils/helpers/numberToInputText.ts
|
|
688
|
-
function
|
|
689
|
-
return typeof e != "number" || Number.isNaN(e) ? "" :
|
|
699
|
+
function Dn(e, t) {
|
|
700
|
+
return typeof e != "number" || Number.isNaN(e) ? "" : Ft(String(e), t);
|
|
690
701
|
}
|
|
691
702
|
//#endregion
|
|
692
703
|
//#region src/utils/helpers/openFilePicker.ts
|
|
693
|
-
var
|
|
694
|
-
function
|
|
704
|
+
var On = 1200, kn = 700;
|
|
705
|
+
function An() {
|
|
695
706
|
return document.fullscreenElement ? new Promise((e) => {
|
|
696
707
|
let t = () => {
|
|
697
708
|
window.clearTimeout(n), document.removeEventListener("fullscreenchange", t), e();
|
|
698
|
-
}, n = window.setTimeout(t,
|
|
709
|
+
}, n = window.setTimeout(t, On);
|
|
699
710
|
document.addEventListener("fullscreenchange", t, { once: !0 });
|
|
700
711
|
}) : Promise.resolve();
|
|
701
712
|
}
|
|
702
|
-
function
|
|
713
|
+
function jn() {
|
|
703
714
|
return new Promise((e) => {
|
|
704
|
-
window.setTimeout(e,
|
|
715
|
+
window.setTimeout(e, kn);
|
|
705
716
|
});
|
|
706
717
|
}
|
|
707
|
-
async function
|
|
718
|
+
async function Mn(e) {
|
|
708
719
|
if (e) {
|
|
709
720
|
if (document.fullscreenElement) try {
|
|
710
|
-
let e =
|
|
711
|
-
await document.exitFullscreen(), await e, await
|
|
721
|
+
let e = An();
|
|
722
|
+
await document.exitFullscreen(), await e, await jn();
|
|
712
723
|
} catch {}
|
|
713
724
|
e.ownerDocument.defaultView?.focus(), e.click();
|
|
714
725
|
}
|
|
715
726
|
}
|
|
716
727
|
//#endregion
|
|
717
728
|
//#region src/utils/helpers/readFileAsDataUrl.ts
|
|
718
|
-
function
|
|
729
|
+
function Nn(e) {
|
|
719
730
|
return new Promise((t, n) => {
|
|
720
731
|
let r = new FileReader();
|
|
721
732
|
r.addEventListener("error", () => {
|
|
@@ -731,9 +742,9 @@ function jn(e) {
|
|
|
731
742
|
}
|
|
732
743
|
//#endregion
|
|
733
744
|
//#region src/utils/helpers/registerCodeBlockCopyHandler.ts
|
|
734
|
-
var
|
|
735
|
-
function
|
|
736
|
-
|
|
745
|
+
var Pn = !1;
|
|
746
|
+
function Fn() {
|
|
747
|
+
Pn || typeof document > "u" || (Pn = !0, document.addEventListener("click", async (e) => {
|
|
737
748
|
let t = e.target, n = t instanceof Element ? t.closest("[data-rj-editor-code-copy=\"true\"]") : null;
|
|
738
749
|
if (!(n instanceof HTMLButtonElement)) return;
|
|
739
750
|
let r = n.closest("[data-rj-editor-code-block=\"true\"]")?.querySelector("pre.rj-editor-code-block");
|
|
@@ -745,12 +756,12 @@ function Nn() {
|
|
|
745
756
|
//#endregion
|
|
746
757
|
//#region src/utils/helpers/renderEquationModelToHtml.ts
|
|
747
758
|
function H(e, t = "□") {
|
|
748
|
-
return e && typeof e != "string" ?
|
|
759
|
+
return e && typeof e != "string" ? Vn(e) : `<span class="rj-editor-equation-render-slot">${Pt(e?.trim() || t)}</span>`;
|
|
749
760
|
}
|
|
750
|
-
function
|
|
761
|
+
function In(e) {
|
|
751
762
|
return e === "absolute" ? ["|", "|"] : e === "angle" ? ["⟨", "⟩"] : e === "brace" ? ["{", "}"] : e === "ceiling" ? ["⌈", "⌉"] : e === "doubleAbsolute" ? ["‖", "‖"] : e === "floor" ? ["⌊", "⌋"] : e === "square" ? ["[", "]"] : ["(", ")"];
|
|
752
763
|
}
|
|
753
|
-
function
|
|
764
|
+
function Ln(e) {
|
|
754
765
|
return {
|
|
755
766
|
intersection: "⋂",
|
|
756
767
|
product: "∏",
|
|
@@ -758,7 +769,7 @@ function Fn(e) {
|
|
|
758
769
|
union: "⋃"
|
|
759
770
|
}[e];
|
|
760
771
|
}
|
|
761
|
-
function
|
|
772
|
+
function Rn(e) {
|
|
762
773
|
return {
|
|
763
774
|
contour: "∮",
|
|
764
775
|
double: "∫∫",
|
|
@@ -766,7 +777,7 @@ function In(e) {
|
|
|
766
777
|
triple: "∫∫∫"
|
|
767
778
|
}[e || "single"];
|
|
768
779
|
}
|
|
769
|
-
function
|
|
780
|
+
function zn(e) {
|
|
770
781
|
return [
|
|
771
782
|
"rj-editor-equation-render",
|
|
772
783
|
"rj-editor-equation-render--script",
|
|
@@ -775,11 +786,11 @@ function Ln(e) {
|
|
|
775
786
|
e.subscript === void 0 ? "" : "has-subscript"
|
|
776
787
|
].filter(Boolean).join(" ");
|
|
777
788
|
}
|
|
778
|
-
function
|
|
789
|
+
function Bn(e) {
|
|
779
790
|
let t = `<span class="rj-editor-equation-render-matrix-grid" style="grid-template-columns: repeat(${Math.max(...e.cells.map((e) => e.length), 1)}, minmax(1.75rem, auto));">${e.cells.flatMap((e) => e.map((e) => `<span>${H(e)}</span>`)).join("")}</span>`;
|
|
780
791
|
return e.bracket === "none" ? t : e.bracket === "determinant" ? `<span class="rj-editor-equation-render-matrix-bracket">|</span>${t}<span class="rj-editor-equation-render-matrix-bracket">|</span>` : e.bracket === "round" ? `<span class="rj-editor-equation-render-matrix-bracket">(</span>${t}<span class="rj-editor-equation-render-matrix-bracket">)</span>` : `<span class="rj-editor-equation-render-matrix-bracket">[</span>${t}<span class="rj-editor-equation-render-matrix-bracket">]</span>`;
|
|
781
792
|
}
|
|
782
|
-
function
|
|
793
|
+
function Vn(e) {
|
|
783
794
|
switch (e.kind) {
|
|
784
795
|
case "accent": return `<span class="rj-editor-equation-render rj-editor-equation-render--accent"><span class="rj-editor-equation-render-accent-mark">${{
|
|
785
796
|
bar: "¯",
|
|
@@ -789,28 +800,28 @@ function zn(e) {
|
|
|
789
800
|
vector: "⃗"
|
|
790
801
|
}[e.accent]}</span>${H(e.value, "x")}</span>`;
|
|
791
802
|
case "bracket": {
|
|
792
|
-
let [t, n] =
|
|
793
|
-
return `<span class="rj-editor-equation-render rj-editor-equation-render--bracket"><span class="rj-editor-equation-render-bracket">${
|
|
803
|
+
let [t, n] = In(e.bracket);
|
|
804
|
+
return `<span class="rj-editor-equation-render rj-editor-equation-render--bracket"><span class="rj-editor-equation-render-bracket">${Pt(t)}</span>${H(e.value, "x")}<span class="rj-editor-equation-render-bracket">${Pt(n)}</span></span>`;
|
|
794
805
|
}
|
|
795
806
|
case "fraction": return e.variant === "linear" || e.variant === "skewed" ? `<span class="rj-editor-equation-render rj-editor-equation-render--fraction-inline"><span>${H(e.numerator)}</span><span>${e.variant === "skewed" ? "⁄" : "/"}</span><span>${H(e.denominator)}</span></span>` : `<span class="rj-editor-equation-render rj-editor-equation-render--fraction"><span>${H(e.numerator)}</span><span class="rj-editor-equation-render-line"></span><span>${H(e.denominator)}</span></span>`;
|
|
796
807
|
case "function": return `<span class="rj-editor-equation-render rj-editor-equation-render--function"><span>${e.functionName}</span><span>(</span>${H(e.argument, "x")}<span>)</span></span>`;
|
|
797
|
-
case "integral": return `<span class="rj-editor-equation-render rj-editor-equation-render--integral"><span class="rj-editor-equation-render-limits"><span>${e.upper === void 0 ? "" : H(e.upper, "b")}</span><span class="rj-editor-equation-render-large-symbol">${
|
|
798
|
-
case "largeOperator": return `<span class="rj-editor-equation-render rj-editor-equation-render--large-operator"><span class="rj-editor-equation-render-limits"><span>${e.upper === void 0 ? "" : H(e.upper, "n")}</span><span class="rj-editor-equation-render-large-symbol">${
|
|
808
|
+
case "integral": return `<span class="rj-editor-equation-render rj-editor-equation-render--integral"><span class="rj-editor-equation-render-limits"><span>${e.upper === void 0 ? "" : H(e.upper, "b")}</span><span class="rj-editor-equation-render-large-symbol">${Rn(e.variant)}</span><span>${e.lower === void 0 ? "" : H(e.lower, "a")}</span></span>${H(e.body, "f(x)")}<span>d</span>${H(e.variable, "x")}</span>`;
|
|
809
|
+
case "largeOperator": return `<span class="rj-editor-equation-render rj-editor-equation-render--large-operator"><span class="rj-editor-equation-render-limits"><span>${e.upper === void 0 ? "" : H(e.upper, "n")}</span><span class="rj-editor-equation-render-large-symbol">${Ln(e.operator)}</span><span>${e.lower === void 0 ? "" : H(e.lower, "i=1")}</span></span>${H(e.body, "i")}</span>`;
|
|
799
810
|
case "limit": return `<span class="rj-editor-equation-render rj-editor-equation-render--limit"><span class="rj-editor-equation-render-limits"><span>lim</span><span>${H(e.target, "x→0")}</span></span>${H(e.body, "f(x)")}</span>`;
|
|
800
|
-
case "matrix": return `<span class="rj-editor-equation-render rj-editor-equation-render--matrix">${
|
|
801
|
-
case "operator": return `<span class="rj-editor-equation-render">${
|
|
811
|
+
case "matrix": return `<span class="rj-editor-equation-render rj-editor-equation-render--matrix">${Bn(e)}</span>`;
|
|
812
|
+
case "operator": return `<span class="rj-editor-equation-render">${Pt(e.value || "□")}</span>`;
|
|
802
813
|
case "root": return `<span class="rj-editor-equation-render rj-editor-equation-render--root">${e.index === void 0 ? "" : `<span class="rj-editor-equation-render-root-index">${H(e.index, "n")}</span>`}<span class="rj-editor-equation-render-root-symbol">√</span><span class="rj-editor-equation-render-radicand">${H(e.value, "x")}</span></span>`;
|
|
803
|
-
case "script": return e.position === "before" ? `<span class="${
|
|
814
|
+
case "script": return e.position === "before" ? `<span class="${zn(e)}"><span class="rj-editor-equation-render-script-stack">${e.superscript === void 0 ? "" : `<span>${H(e.superscript, "n")}</span>`}${e.subscript === void 0 ? "" : `<span>${H(e.subscript, "1")}</span>`}</span>${H(e.base, "Y")}</span>` : `<span class="${zn(e)}">${H(e.base, "x")}<span class="rj-editor-equation-render-script-stack">${e.superscript === void 0 ? "" : `<span>${H(e.superscript, "2")}</span>`}${e.subscript === void 0 ? "" : `<span>${H(e.subscript, "i")}</span>`}</span></span>`;
|
|
804
815
|
case "text": return `<span class="rj-editor-equation-render">${H(e.value, "□")}</span>`;
|
|
805
|
-
case "row": return `<span class="rj-editor-equation-render rj-editor-equation-render--row">${e.items.map(
|
|
816
|
+
case "row": return `<span class="rj-editor-equation-render rj-editor-equation-render--row">${e.items.map(Vn).join("")}</span>`;
|
|
806
817
|
default: return "";
|
|
807
818
|
}
|
|
808
819
|
}
|
|
809
820
|
//#endregion
|
|
810
821
|
//#region src/utils/helpers/renderEquationToHtml.ts
|
|
811
|
-
function
|
|
812
|
-
let n =
|
|
813
|
-
return n ?
|
|
822
|
+
function Hn(e, t) {
|
|
823
|
+
let n = jt(e);
|
|
824
|
+
return n ? Vn(n) : T.renderToString(e, {
|
|
814
825
|
displayMode: t === "block",
|
|
815
826
|
output: "mathml",
|
|
816
827
|
strict: !1,
|
|
@@ -820,7 +831,7 @@ function Bn(e, t) {
|
|
|
820
831
|
}
|
|
821
832
|
//#endregion
|
|
822
833
|
//#region src/utils/helpers/setEditorHtml.ts
|
|
823
|
-
function
|
|
834
|
+
function Un(e, n) {
|
|
824
835
|
let r = new DOMParser().parseFromString(n || "", "text/html"), a = r.body.querySelector("[data-rj-editor-content=\"true\"]");
|
|
825
836
|
r.body.querySelectorAll("[data-rj-editor-code-block=\"true\"]").forEach((e) => {
|
|
826
837
|
let t = e.querySelector("pre.rj-editor-code-block");
|
|
@@ -839,7 +850,7 @@ function Vn(e, n) {
|
|
|
839
850
|
}
|
|
840
851
|
//#endregion
|
|
841
852
|
//#region src/slice/toolbarSlice.ts
|
|
842
|
-
var
|
|
853
|
+
var Wn = be({
|
|
843
854
|
name: "toolbar",
|
|
844
855
|
initialState: B,
|
|
845
856
|
reducers: {
|
|
@@ -868,11 +879,11 @@ var Hn = be({
|
|
|
868
879
|
e.isImageSelected = t.payload.isImageSelected, e.selectedImageAlignment = t.payload.selectedImageAlignment, e.selectedImageAltText = t.payload.selectedImageAltText, e.selectedImageAspectRatioLocked = t.payload.selectedImageAspectRatioLocked, e.selectedImageBorderEnabled = t.payload.selectedImageBorderEnabled, e.selectedImageBorderRadius = t.payload.selectedImageBorderRadius, e.selectedImageCaption = t.payload.selectedImageCaption, e.selectedImageHeight = t.payload.selectedImageHeight, e.selectedImageKey = t.payload.selectedImageKey, e.selectedImageLinkUrl = t.payload.selectedImageLinkUrl, e.selectedImageObjectFit = t.payload.selectedImageObjectFit, e.selectedImageRotation = t.payload.selectedImageRotation, e.selectedImageShadowEnabled = t.payload.selectedImageShadowEnabled, e.selectedImageTextWrap = t.payload.selectedImageTextWrap, e.selectedImageWidth = t.payload.selectedImageWidth;
|
|
869
880
|
}
|
|
870
881
|
}
|
|
871
|
-
}), { setBlockFormats:
|
|
872
|
-
|
|
882
|
+
}), { setBlockFormats: Gn, setCanRedo: Kn, setCanUndo: qn, setEquationFormats: Jn, setImageFormats: Yn, setStyleFormats: U, setTableFormats: Xn, setTextFormats: Zn } = Wn.actions, Qn = Wn.reducer, $n = () => ye({ reducer: { toolbar: Qn } });
|
|
883
|
+
$n();
|
|
873
884
|
//#endregion
|
|
874
885
|
//#region src/store/hooks.ts
|
|
875
|
-
var W = _e.withTypes(), G = ve.withTypes(),
|
|
886
|
+
var W = _e.withTypes(), G = ve.withTypes(), er = {
|
|
876
887
|
alerts: {
|
|
877
888
|
imageSizeLimit: "Image size must be 5MB or less.",
|
|
878
889
|
onlyImages: "Only image files can be uploaded."
|
|
@@ -886,6 +897,17 @@ var W = _e.withTypes(), G = ve.withTypes(), Qn = {
|
|
|
886
897
|
optional: "Optional",
|
|
887
898
|
save: "Save"
|
|
888
899
|
},
|
|
900
|
+
footer: {
|
|
901
|
+
characters: "characters",
|
|
902
|
+
editing: "Editing",
|
|
903
|
+
focus: "Focus",
|
|
904
|
+
fullscreen: "Fullscreen",
|
|
905
|
+
language: "Language",
|
|
906
|
+
selected: "Selected",
|
|
907
|
+
statusBar: "Editor status",
|
|
908
|
+
words: "words",
|
|
909
|
+
zoom: "Zoom"
|
|
910
|
+
},
|
|
889
911
|
modal: { closeAriaLabel: "Close modal" },
|
|
890
912
|
placeholders: { editor: "Write your article here..." },
|
|
891
913
|
toolbar: {
|
|
@@ -1052,22 +1074,22 @@ var W = _e.withTypes(), G = ve.withTypes(), Qn = {
|
|
|
1052
1074
|
};
|
|
1053
1075
|
//#endregion
|
|
1054
1076
|
//#region src/i18n/mergeTranslations.ts
|
|
1055
|
-
function
|
|
1056
|
-
return !e || typeof e != "object" ? e : Array.isArray(e) ? e.map((e) =>
|
|
1077
|
+
function tr(e) {
|
|
1078
|
+
return !e || typeof e != "object" ? e : Array.isArray(e) ? e.map((e) => tr(e)) : Object.fromEntries(Object.entries(e).map(([e, t]) => [e, tr(t)]));
|
|
1057
1079
|
}
|
|
1058
|
-
function
|
|
1080
|
+
function nr(e, ...t) {
|
|
1059
1081
|
return t.reduce((e, t) => (t && Object.entries(t).forEach(([t, n]) => {
|
|
1060
1082
|
let r = e[t];
|
|
1061
1083
|
if (n && typeof n == "object" && !Array.isArray(n) && r && typeof r == "object") {
|
|
1062
|
-
e[t] =
|
|
1084
|
+
e[t] = nr(r, n);
|
|
1063
1085
|
return;
|
|
1064
1086
|
}
|
|
1065
1087
|
e[t] = n;
|
|
1066
|
-
}), e),
|
|
1088
|
+
}), e), tr(e));
|
|
1067
1089
|
}
|
|
1068
1090
|
//#endregion
|
|
1069
1091
|
//#region src/i18n/locales/ru.ts
|
|
1070
|
-
var
|
|
1092
|
+
var rr = nr(er, {
|
|
1071
1093
|
alerts: {
|
|
1072
1094
|
imageSizeLimit: "Размер изображения должен быть не больше 5MB.",
|
|
1073
1095
|
onlyImages: "Можно загружать только изображения."
|
|
@@ -1081,6 +1103,17 @@ var tr = er(Qn, {
|
|
|
1081
1103
|
optional: "Необязательно",
|
|
1082
1104
|
save: "Сохранить"
|
|
1083
1105
|
},
|
|
1106
|
+
footer: {
|
|
1107
|
+
characters: "символов",
|
|
1108
|
+
editing: "Редактирование",
|
|
1109
|
+
focus: "Фокус",
|
|
1110
|
+
fullscreen: "Полный экран",
|
|
1111
|
+
language: "Язык",
|
|
1112
|
+
selected: "Выделено",
|
|
1113
|
+
statusBar: "Статус редактора",
|
|
1114
|
+
words: "слов",
|
|
1115
|
+
zoom: "Масштаб"
|
|
1116
|
+
},
|
|
1084
1117
|
modal: { closeAriaLabel: "Закрыть модальное окно" },
|
|
1085
1118
|
placeholders: { editor: "Напишите текст здесь..." },
|
|
1086
1119
|
toolbar: {
|
|
@@ -1133,7 +1166,7 @@ var tr = er(Qn, {
|
|
|
1133
1166
|
titlePlaceholder: "Необязательно"
|
|
1134
1167
|
}
|
|
1135
1168
|
}
|
|
1136
|
-
}),
|
|
1169
|
+
}), ir = nr(er, {
|
|
1137
1170
|
alerts: {
|
|
1138
1171
|
imageSizeLimit: "Rasm hajmi 5MB yoki undan kichik bo‘lishi kerak.",
|
|
1139
1172
|
onlyImages: "Faqat rasm fayllarini yuklash mumkin."
|
|
@@ -1147,6 +1180,17 @@ var tr = er(Qn, {
|
|
|
1147
1180
|
optional: "Ixtiyoriy",
|
|
1148
1181
|
save: "Saqlash"
|
|
1149
1182
|
},
|
|
1183
|
+
footer: {
|
|
1184
|
+
characters: "belgi",
|
|
1185
|
+
editing: "Tahrirlash",
|
|
1186
|
+
focus: "Fokus",
|
|
1187
|
+
fullscreen: "To‘liq ekran",
|
|
1188
|
+
language: "Til",
|
|
1189
|
+
selected: "Tanlangan",
|
|
1190
|
+
statusBar: "Editor holati",
|
|
1191
|
+
words: "so‘z",
|
|
1192
|
+
zoom: "Masshtab"
|
|
1193
|
+
},
|
|
1150
1194
|
modal: { closeAriaLabel: "Modalni yopish" },
|
|
1151
1195
|
placeholders: { editor: "Maqolangizni shu yerga yozing..." },
|
|
1152
1196
|
toolbar: {
|
|
@@ -1291,18 +1335,18 @@ var tr = er(Qn, {
|
|
|
1291
1335
|
titlePlaceholder: "Ixtiyoriy"
|
|
1292
1336
|
}
|
|
1293
1337
|
}
|
|
1294
|
-
}),
|
|
1295
|
-
en:
|
|
1296
|
-
ru:
|
|
1297
|
-
uz:
|
|
1338
|
+
}), ar = O.createContext(ir), or = {
|
|
1339
|
+
en: er,
|
|
1340
|
+
ru: rr,
|
|
1341
|
+
uz: ir
|
|
1298
1342
|
};
|
|
1299
|
-
function
|
|
1300
|
-
let i = O.useMemo(() =>
|
|
1343
|
+
function sr({ children: e, locale: t = "uz", locales: n, translations: r }) {
|
|
1344
|
+
let i = O.useMemo(() => nr(or[t] || er, n?.[t], r), [
|
|
1301
1345
|
t,
|
|
1302
1346
|
n,
|
|
1303
1347
|
r
|
|
1304
1348
|
]);
|
|
1305
|
-
return /* @__PURE__ */ M(
|
|
1349
|
+
return /* @__PURE__ */ M(ar.Provider, {
|
|
1306
1350
|
value: i,
|
|
1307
1351
|
children: e
|
|
1308
1352
|
});
|
|
@@ -1310,14 +1354,14 @@ function ar({ children: e, locale: t = "uz", locales: n, translations: r }) {
|
|
|
1310
1354
|
//#endregion
|
|
1311
1355
|
//#region src/i18n/useRJEditorI18n.ts
|
|
1312
1356
|
function K() {
|
|
1313
|
-
return O.useContext(
|
|
1357
|
+
return O.useContext(ar);
|
|
1314
1358
|
}
|
|
1315
1359
|
//#endregion
|
|
1316
1360
|
//#region src/theme/getAntdThemeConfig.ts
|
|
1317
|
-
var
|
|
1361
|
+
var cr = {
|
|
1318
1362
|
algorithm: D.defaultAlgorithm,
|
|
1319
1363
|
token: { colorPrimary: "#3167c8" }
|
|
1320
|
-
},
|
|
1364
|
+
}, lr = {
|
|
1321
1365
|
algorithm: D.darkAlgorithm,
|
|
1322
1366
|
token: {
|
|
1323
1367
|
colorBgContainer: "#202020",
|
|
@@ -1336,64 +1380,77 @@ var or = {
|
|
|
1336
1380
|
colorTextTertiary: "#999999"
|
|
1337
1381
|
}
|
|
1338
1382
|
};
|
|
1339
|
-
function
|
|
1340
|
-
return e === "dark" ?
|
|
1383
|
+
function ur(e) {
|
|
1384
|
+
return e === "dark" ? lr : cr;
|
|
1341
1385
|
}
|
|
1342
1386
|
//#endregion
|
|
1343
1387
|
//#region src/theme/RJEditorThemeContext.ts
|
|
1344
|
-
var
|
|
1388
|
+
var dr = O.createContext("light");
|
|
1345
1389
|
//#endregion
|
|
1346
1390
|
//#region src/theme/useRJEditorTheme.ts
|
|
1347
|
-
function
|
|
1348
|
-
return O.useContext(
|
|
1391
|
+
function fr() {
|
|
1392
|
+
return O.useContext(dr);
|
|
1349
1393
|
}
|
|
1350
1394
|
//#endregion
|
|
1351
1395
|
//#region src/theme/useResolvedRJEditorTheme.ts
|
|
1352
|
-
function
|
|
1396
|
+
function pr(e) {
|
|
1353
1397
|
let t = e?.trim().toLowerCase();
|
|
1354
1398
|
if (t === "dark" || t === "only dark") return "dark";
|
|
1355
1399
|
if (t === "light" || t === "only light") return "light";
|
|
1356
1400
|
}
|
|
1357
|
-
function
|
|
1358
|
-
if (
|
|
1359
|
-
let
|
|
1401
|
+
function mr(e) {
|
|
1402
|
+
if (!e) return;
|
|
1403
|
+
let t = pr(e.dataset.rjEditorTheme) || pr(e.dataset.colorScheme) || pr(e.dataset.theme) || pr(e.getAttribute("color-scheme"));
|
|
1360
1404
|
if (t) return t;
|
|
1361
|
-
|
|
1362
|
-
|
|
1405
|
+
if (e.classList.contains("dark")) return "dark";
|
|
1406
|
+
if (e.classList.contains("light")) return "light";
|
|
1363
1407
|
}
|
|
1364
|
-
function
|
|
1365
|
-
|
|
1408
|
+
function hr(e) {
|
|
1409
|
+
return e ? pr(window.getComputedStyle(e).colorScheme) : void 0;
|
|
1410
|
+
}
|
|
1411
|
+
function gr() {
|
|
1412
|
+
if (typeof document > "u" || typeof window > "u") return "light";
|
|
1413
|
+
let e = document.documentElement, t = document.body, n = mr(e) || mr(t);
|
|
1414
|
+
if (n) return n;
|
|
1415
|
+
let r = document.querySelector("meta[name=\"color-scheme\"]")?.content;
|
|
1416
|
+
return hr(e) || hr(t) || pr(r) || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
|
|
1417
|
+
}
|
|
1418
|
+
function _r(e) {
|
|
1419
|
+
let [t, n] = O.useState(() => gr());
|
|
1366
1420
|
return O.useEffect(() => {
|
|
1367
1421
|
if (e !== "auto") return;
|
|
1368
|
-
let t = () => n(
|
|
1422
|
+
let t = () => n(gr()), r = window.matchMedia("(prefers-color-scheme: dark)"), i = new MutationObserver(t), a = new MutationObserver(t), o = new MutationObserver(t), s = window.requestAnimationFrame(t), c = [
|
|
1423
|
+
"class",
|
|
1424
|
+
"color-scheme",
|
|
1425
|
+
"data-color-scheme",
|
|
1426
|
+
"data-rj-editor-theme",
|
|
1427
|
+
"data-theme",
|
|
1428
|
+
"style"
|
|
1429
|
+
];
|
|
1369
1430
|
return r.addEventListener("change", t), i.observe(document.documentElement, {
|
|
1370
|
-
attributeFilter:
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
"data-rj-editor-theme",
|
|
1375
|
-
"data-theme",
|
|
1376
|
-
"style"
|
|
1377
|
-
],
|
|
1431
|
+
attributeFilter: c,
|
|
1432
|
+
attributes: !0
|
|
1433
|
+
}), document.body && a.observe(document.body, {
|
|
1434
|
+
attributeFilter: c,
|
|
1378
1435
|
attributes: !0
|
|
1379
|
-
}),
|
|
1436
|
+
}), o.observe(document.head, {
|
|
1380
1437
|
attributeFilter: ["content"],
|
|
1381
1438
|
attributes: !0,
|
|
1382
1439
|
childList: !0,
|
|
1383
1440
|
subtree: !0
|
|
1384
1441
|
}), () => {
|
|
1385
|
-
window.cancelAnimationFrame(
|
|
1442
|
+
window.cancelAnimationFrame(s), r.removeEventListener("change", t), i.disconnect(), a.disconnect(), o.disconnect();
|
|
1386
1443
|
};
|
|
1387
1444
|
}, [e]), e === "auto" ? t : e;
|
|
1388
1445
|
}
|
|
1389
1446
|
//#endregion
|
|
1390
1447
|
//#region src/components/equation/visual/equation-visual-editor/EquationVisualEditor.tsx
|
|
1391
|
-
var
|
|
1392
|
-
function
|
|
1393
|
-
let r = Array.from(e || t ||
|
|
1448
|
+
var vr = "□", yr = "x + y = z";
|
|
1449
|
+
function br(e, t, n) {
|
|
1450
|
+
let r = Array.from(e || t || vr).length, i = n?.includes("rj-editor-equation-slot-input--limit") || n?.includes("rj-editor-equation-slot-input--matrix") || n?.includes("rj-editor-equation-slot-input--root-index") || n?.includes("rj-editor-equation-slot-input--script") || n?.includes("rj-editor-equation-slot-input--small"), a = i ? 2 : 2.5, o = i ? 5 : 11;
|
|
1394
1451
|
return `calc(${Math.min(Math.max(r + 1, a), o)}ch + 0.25rem)`;
|
|
1395
1452
|
}
|
|
1396
|
-
function
|
|
1453
|
+
function xr(e) {
|
|
1397
1454
|
return [
|
|
1398
1455
|
"rj-editor-equation-visual",
|
|
1399
1456
|
"rj-editor-equation-visual--script",
|
|
@@ -1402,44 +1459,44 @@ function _r(e) {
|
|
|
1402
1459
|
e.subscript === void 0 ? "" : "has-subscript"
|
|
1403
1460
|
].filter(Boolean).join(" ");
|
|
1404
1461
|
}
|
|
1405
|
-
function
|
|
1462
|
+
function Sr(e) {
|
|
1406
1463
|
e.stopPropagation();
|
|
1407
1464
|
}
|
|
1408
|
-
function
|
|
1465
|
+
function Cr(e) {
|
|
1409
1466
|
let t = e.selectionStart ?? e.value.length;
|
|
1410
1467
|
return {
|
|
1411
1468
|
end: e.selectionEnd ?? t,
|
|
1412
1469
|
start: t
|
|
1413
1470
|
};
|
|
1414
1471
|
}
|
|
1415
|
-
function
|
|
1472
|
+
function wr({ className: e, inputRef: t, onActiveSlotChange: n, onSlotSelectionChange: r, onSlotChange: i, placeholder: a = vr, slotId: o, value: s }) {
|
|
1416
1473
|
let c = (e) => {
|
|
1417
|
-
|
|
1474
|
+
Sr(e), n(o), r(o, Cr(e.currentTarget));
|
|
1418
1475
|
};
|
|
1419
1476
|
return /* @__PURE__ */ M("input", {
|
|
1420
1477
|
"aria-label": "Equation field",
|
|
1421
1478
|
className: ["rj-editor-equation-slot-input", e || ""].filter(Boolean).join(" "),
|
|
1422
1479
|
onChange: (e) => {
|
|
1423
|
-
i(o, e.target.value), r(o,
|
|
1480
|
+
i(o, e.target.value), r(o, Cr(e.currentTarget));
|
|
1424
1481
|
},
|
|
1425
1482
|
onClick: c,
|
|
1426
1483
|
onFocus: c,
|
|
1427
|
-
onKeyDown:
|
|
1484
|
+
onKeyDown: Sr,
|
|
1428
1485
|
onKeyUp: c,
|
|
1429
|
-
onMouseDown:
|
|
1486
|
+
onMouseDown: Sr,
|
|
1430
1487
|
onSelect: c,
|
|
1431
1488
|
placeholder: a,
|
|
1432
1489
|
ref: t,
|
|
1433
1490
|
size: Math.max(1, Math.min(Array.from(s || a).length + 1, 12)),
|
|
1434
|
-
style: { width:
|
|
1491
|
+
style: { width: br(s, a, e) },
|
|
1435
1492
|
type: "text",
|
|
1436
1493
|
value: s
|
|
1437
1494
|
});
|
|
1438
1495
|
}
|
|
1439
|
-
function
|
|
1496
|
+
function Tr(e) {
|
|
1440
1497
|
return e === "absolute" ? ["|", "|"] : e === "angle" ? ["⟨", "⟩"] : e === "brace" ? ["{", "}"] : e === "ceiling" ? ["⌈", "⌉"] : e === "doubleAbsolute" ? ["‖", "‖"] : e === "floor" ? ["⌊", "⌋"] : e === "square" ? ["[", "]"] : ["(", ")"];
|
|
1441
1498
|
}
|
|
1442
|
-
function
|
|
1499
|
+
function Er(e) {
|
|
1443
1500
|
return {
|
|
1444
1501
|
intersection: "⋂",
|
|
1445
1502
|
product: "∏",
|
|
@@ -1447,7 +1504,7 @@ function Sr(e) {
|
|
|
1447
1504
|
union: "⋃"
|
|
1448
1505
|
}[e];
|
|
1449
1506
|
}
|
|
1450
|
-
function
|
|
1507
|
+
function Dr(e) {
|
|
1451
1508
|
return {
|
|
1452
1509
|
contour: "∮",
|
|
1453
1510
|
double: "∫∫",
|
|
@@ -1455,7 +1512,7 @@ function Cr(e) {
|
|
|
1455
1512
|
triple: "∫∫∫"
|
|
1456
1513
|
}[e || "single"];
|
|
1457
1514
|
}
|
|
1458
|
-
var
|
|
1515
|
+
var Or = O.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r, onActiveSlotChange: i, onSlotSelectionChange: a, onSlotChange: o, slotPrefix: s = "" }) {
|
|
1459
1516
|
let c = O.useRef({}), l = O.useCallback((e) => (t) => {
|
|
1460
1517
|
c.current[e] = t;
|
|
1461
1518
|
}, []);
|
|
@@ -1487,7 +1544,7 @@ var wr = O.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
1487
1544
|
t,
|
|
1488
1545
|
i,
|
|
1489
1546
|
s
|
|
1490
|
-
]), d = O.useCallback((r, c, u, d =
|
|
1547
|
+
]), d = O.useCallback((r, c, u, d = vr) => {
|
|
1491
1548
|
let f = `${s}${r}`;
|
|
1492
1549
|
return c && typeof c != "string" ? /* @__PURE__ */ M("span", {
|
|
1493
1550
|
className: "rj-editor-equation-nested",
|
|
@@ -1500,7 +1557,7 @@ var wr = O.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
1500
1557
|
onSlotChange: o,
|
|
1501
1558
|
slotPrefix: `${f}>`
|
|
1502
1559
|
})
|
|
1503
|
-
}, f) : /* @__PURE__ */ M(
|
|
1560
|
+
}, f) : /* @__PURE__ */ M(wr, {
|
|
1504
1561
|
className: u,
|
|
1505
1562
|
inputRef: l(f),
|
|
1506
1563
|
onActiveSlotChange: i,
|
|
@@ -1533,7 +1590,7 @@ var wr = O.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
1533
1590
|
}), d("accent.value", r.value)]
|
|
1534
1591
|
});
|
|
1535
1592
|
if (r.kind === "bracket") {
|
|
1536
|
-
let [e, t] =
|
|
1593
|
+
let [e, t] = Tr(r.bracket);
|
|
1537
1594
|
return /* @__PURE__ */ N("span", {
|
|
1538
1595
|
className: "rj-editor-equation-visual rj-editor-equation-visual--bracket",
|
|
1539
1596
|
children: [
|
|
@@ -1585,7 +1642,7 @@ var wr = O.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
1585
1642
|
r.upper === void 0 ? /* @__PURE__ */ M("span", {}) : d("integral.upper", r.upper, "rj-editor-equation-slot-input--limit", "b"),
|
|
1586
1643
|
/* @__PURE__ */ M("span", {
|
|
1587
1644
|
className: "rj-editor-equation-large-symbol",
|
|
1588
|
-
children:
|
|
1645
|
+
children: Dr(r.variant)
|
|
1589
1646
|
}),
|
|
1590
1647
|
r.lower === void 0 ? /* @__PURE__ */ M("span", {}) : d("integral.lower", r.lower, "rj-editor-equation-slot-input--limit", "a")
|
|
1591
1648
|
]
|
|
@@ -1603,7 +1660,7 @@ var wr = O.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
1603
1660
|
d("largeOperator.upper", r.upper, "rj-editor-equation-slot-input--limit", "n"),
|
|
1604
1661
|
/* @__PURE__ */ M("span", {
|
|
1605
1662
|
className: "rj-editor-equation-large-symbol",
|
|
1606
|
-
children:
|
|
1663
|
+
children: Er(r.operator)
|
|
1607
1664
|
}),
|
|
1608
1665
|
d("largeOperator.lower", r.lower, "rj-editor-equation-slot-input--limit", "i=1")
|
|
1609
1666
|
]
|
|
@@ -1662,13 +1719,13 @@ var wr = O.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
1662
1719
|
})
|
|
1663
1720
|
]
|
|
1664
1721
|
}) : r.kind === "script" ? r.position === "before" ? /* @__PURE__ */ N("span", {
|
|
1665
|
-
className:
|
|
1722
|
+
className: xr(r),
|
|
1666
1723
|
children: [/* @__PURE__ */ N("span", {
|
|
1667
1724
|
className: "rj-editor-equation-script-stack",
|
|
1668
1725
|
children: [r.superscript === void 0 ? null : d("script.superscript", r.superscript, "rj-editor-equation-slot-input--script", "n"), r.subscript === void 0 ? null : d("script.subscript", r.subscript, "rj-editor-equation-slot-input--script", "1")]
|
|
1669
1726
|
}), d("script.base", r.base, void 0, "Y")]
|
|
1670
1727
|
}) : /* @__PURE__ */ N("span", {
|
|
1671
|
-
className:
|
|
1728
|
+
className: xr(r),
|
|
1672
1729
|
children: [d("script.base", r.base, void 0, "x"), /* @__PURE__ */ N("span", {
|
|
1673
1730
|
className: "rj-editor-equation-script-stack",
|
|
1674
1731
|
children: [r.superscript === void 0 ? null : d("script.superscript", r.superscript, "rj-editor-equation-slot-input--script", "2"), r.subscript === void 0 ? null : d("script.subscript", r.subscript, "rj-editor-equation-slot-input--script", "i")]
|
|
@@ -1686,22 +1743,22 @@ var wr = O.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
1686
1743
|
}), u(c + 1)] }, `${s}row.items.${c}`))]
|
|
1687
1744
|
}) : /* @__PURE__ */ M("span", {
|
|
1688
1745
|
className: "rj-editor-equation-visual",
|
|
1689
|
-
children: d("text.value", r.value, void 0, s ?
|
|
1746
|
+
children: d("text.value", r.value, void 0, s ? vr : yr)
|
|
1690
1747
|
});
|
|
1691
1748
|
});
|
|
1692
1749
|
//#endregion
|
|
1693
1750
|
//#region src/components/equation/EquationComponent.tsx
|
|
1694
|
-
function
|
|
1751
|
+
function kr(e, t) {
|
|
1695
1752
|
let n = r(e);
|
|
1696
|
-
|
|
1753
|
+
Pr(n) && t(n);
|
|
1697
1754
|
}
|
|
1698
|
-
var
|
|
1699
|
-
let [r] = P(), i = W(), a = O.useRef(""), o = O.useRef({}), s = O.useRef(null), [c, l] = O.useState(""), [u, d] = O.useState(), [f, p, m] = tt(n), h = O.useMemo(() =>
|
|
1755
|
+
var Ar = O.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
1756
|
+
let [r] = P(), i = W(), a = O.useRef(""), o = O.useRef({}), s = O.useRef(null), [c, l] = O.useState(""), [u, d] = O.useState(), [f, p, m] = tt(n), h = O.useMemo(() => jt(t), [t]), g = O.useMemo(() => t.trim() ? Hn(t, e) : "", [e, t]), v = O.useMemo(() => !h && !/[\\{}_^]/.test(t), [t, h]), y = O.useCallback((t) => {
|
|
1700
1757
|
r.update(() => {
|
|
1701
|
-
|
|
1702
|
-
|
|
1758
|
+
kr(n, (e) => {
|
|
1759
|
+
Pr(e) && e.setEquation(t);
|
|
1703
1760
|
});
|
|
1704
|
-
}), i(
|
|
1761
|
+
}), i(Jn({
|
|
1705
1762
|
isEquationSelected: !0,
|
|
1706
1763
|
selectedEquation: t,
|
|
1707
1764
|
selectedEquationDisplayMode: e,
|
|
@@ -1717,11 +1774,11 @@ var Er = O.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
1717
1774
|
}, []), x = O.useCallback((e, t) => {
|
|
1718
1775
|
o.current[e] = t, b(e, t);
|
|
1719
1776
|
}, [b]), S = O.useCallback((e) => {
|
|
1720
|
-
y(
|
|
1777
|
+
y(Mt(e));
|
|
1721
1778
|
}, [y]), C = O.useCallback((e, t) => {
|
|
1722
1779
|
h && S(I(h, e, t));
|
|
1723
1780
|
}, [h, S]), ne = O.useCallback(() => {
|
|
1724
|
-
m(), p(!0), h && b(a.current || R(h)), i(
|
|
1781
|
+
m(), p(!0), h && b(a.current || R(h)), i(Jn({
|
|
1725
1782
|
isEquationSelected: !0,
|
|
1726
1783
|
selectedEquation: t,
|
|
1727
1784
|
selectedEquationDisplayMode: e,
|
|
@@ -1748,11 +1805,11 @@ var Er = O.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
1748
1805
|
]), O.useEffect(() => {
|
|
1749
1806
|
if (!f) return;
|
|
1750
1807
|
let e = r.registerCommand(te, (e) => e.target instanceof HTMLInputElement ? !1 : (e.preventDefault(), r.update(() => {
|
|
1751
|
-
|
|
1808
|
+
kr(n, (e) => {
|
|
1752
1809
|
e?.remove();
|
|
1753
1810
|
});
|
|
1754
1811
|
}), !0), _), t = r.registerCommand(ee, (e) => e.target instanceof HTMLInputElement ? !1 : (e.preventDefault(), r.update(() => {
|
|
1755
|
-
|
|
1812
|
+
kr(n, (e) => {
|
|
1756
1813
|
e?.remove();
|
|
1757
1814
|
});
|
|
1758
1815
|
}), !0), _);
|
|
@@ -1768,10 +1825,10 @@ var Er = O.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
1768
1825
|
let e = (e) => {
|
|
1769
1826
|
let n = e.detail;
|
|
1770
1827
|
if (!n) return;
|
|
1771
|
-
let r =
|
|
1828
|
+
let r = jt(n);
|
|
1772
1829
|
if (r) {
|
|
1773
1830
|
if (h) {
|
|
1774
|
-
let e = a.current || R(h), t =
|
|
1831
|
+
let e = a.current || R(h), t = Gt(h, e, r, o.current[e]);
|
|
1775
1832
|
b(t.activeSlotId), S(t.model);
|
|
1776
1833
|
return;
|
|
1777
1834
|
}
|
|
@@ -1793,8 +1850,8 @@ var Er = O.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
1793
1850
|
i.focus(), i.setSelectionRange(d, d);
|
|
1794
1851
|
});
|
|
1795
1852
|
};
|
|
1796
|
-
return window.addEventListener(
|
|
1797
|
-
window.removeEventListener(
|
|
1853
|
+
return window.addEventListener(qt, e), () => {
|
|
1854
|
+
window.removeEventListener(qt, e);
|
|
1798
1855
|
};
|
|
1799
1856
|
}, [
|
|
1800
1857
|
t,
|
|
@@ -1818,7 +1875,7 @@ var Er = O.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
1818
1875
|
tabIndex: -1,
|
|
1819
1876
|
children: f ? /* @__PURE__ */ N("span", {
|
|
1820
1877
|
className: "rj-editor-equation-editor",
|
|
1821
|
-
children: [h ? /* @__PURE__ */ M(
|
|
1878
|
+
children: [h ? /* @__PURE__ */ M(Or, {
|
|
1822
1879
|
activeSlotId: c || R(h),
|
|
1823
1880
|
activeSlotSelection: u,
|
|
1824
1881
|
model: h,
|
|
@@ -1859,14 +1916,14 @@ var Er = O.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
1859
1916
|
});
|
|
1860
1917
|
//#endregion
|
|
1861
1918
|
//#region src/nodes/EquationNode.tsx
|
|
1862
|
-
function
|
|
1919
|
+
function jr(e) {
|
|
1863
1920
|
let t = e.getAttribute("data-equation");
|
|
1864
|
-
return t ? { node:
|
|
1921
|
+
return t ? { node: Nr({
|
|
1865
1922
|
displayMode: e.getAttribute("data-display-mode") === "inline" ? "inline" : "block",
|
|
1866
1923
|
equation: t
|
|
1867
1924
|
}) } : null;
|
|
1868
1925
|
}
|
|
1869
|
-
var
|
|
1926
|
+
var Mr = class e extends b {
|
|
1870
1927
|
__displayMode;
|
|
1871
1928
|
__equation;
|
|
1872
1929
|
static clone(t) {
|
|
@@ -1878,17 +1935,17 @@ var Or = class e extends b {
|
|
|
1878
1935
|
static importDOM() {
|
|
1879
1936
|
return {
|
|
1880
1937
|
div: (e) => e.hasAttribute("data-equation") ? {
|
|
1881
|
-
conversion:
|
|
1938
|
+
conversion: jr,
|
|
1882
1939
|
priority: 1
|
|
1883
1940
|
} : null,
|
|
1884
1941
|
span: (e) => e.hasAttribute("data-equation") ? {
|
|
1885
|
-
conversion:
|
|
1942
|
+
conversion: jr,
|
|
1886
1943
|
priority: 1
|
|
1887
1944
|
} : null
|
|
1888
1945
|
};
|
|
1889
1946
|
}
|
|
1890
1947
|
static importJSON(e) {
|
|
1891
|
-
return
|
|
1948
|
+
return Nr({
|
|
1892
1949
|
displayMode: e.displayMode,
|
|
1893
1950
|
equation: e.equation
|
|
1894
1951
|
});
|
|
@@ -1901,7 +1958,7 @@ var Or = class e extends b {
|
|
|
1901
1958
|
return t.className = e.theme.equation || "rj-editor-equation-node", t;
|
|
1902
1959
|
}
|
|
1903
1960
|
decorate() {
|
|
1904
|
-
return /* @__PURE__ */ M(
|
|
1961
|
+
return /* @__PURE__ */ M(Ar, {
|
|
1905
1962
|
displayMode: this.__displayMode,
|
|
1906
1963
|
equation: this.__equation,
|
|
1907
1964
|
nodeKey: this.__key
|
|
@@ -1911,7 +1968,7 @@ var Or = class e extends b {
|
|
|
1911
1968
|
let e = this.__displayMode === "inline" ? document.createElement("span") : document.createElement("div");
|
|
1912
1969
|
e.setAttribute("data-equation", this.__equation), e.setAttribute("data-display-mode", this.__displayMode);
|
|
1913
1970
|
try {
|
|
1914
|
-
e.innerHTML =
|
|
1971
|
+
e.innerHTML = Hn(this.__equation, this.__displayMode);
|
|
1915
1972
|
} catch {
|
|
1916
1973
|
e.textContent = this.__equation;
|
|
1917
1974
|
}
|
|
@@ -1949,15 +2006,15 @@ var Or = class e extends b {
|
|
|
1949
2006
|
return !1;
|
|
1950
2007
|
}
|
|
1951
2008
|
};
|
|
1952
|
-
function
|
|
1953
|
-
return new
|
|
2009
|
+
function Nr({ displayMode: e = "block", equation: t }) {
|
|
2010
|
+
return new Mr(t, e);
|
|
1954
2011
|
}
|
|
1955
|
-
function
|
|
1956
|
-
return e instanceof
|
|
2012
|
+
function Pr(e) {
|
|
2013
|
+
return e instanceof Mr;
|
|
1957
2014
|
}
|
|
1958
2015
|
//#endregion
|
|
1959
2016
|
//#region src/nodes/ExtendedTextNode.ts
|
|
1960
|
-
var
|
|
2017
|
+
var Fr = [
|
|
1961
2018
|
"b",
|
|
1962
2019
|
"code",
|
|
1963
2020
|
"em",
|
|
@@ -1971,34 +2028,34 @@ var jr = [
|
|
|
1971
2028
|
"sup",
|
|
1972
2029
|
"u"
|
|
1973
2030
|
];
|
|
1974
|
-
function
|
|
1975
|
-
let t = [], n = e.style.backgroundColor, r = e.style.color || e.getAttribute("color") || "", i =
|
|
2031
|
+
function Ir(e) {
|
|
2032
|
+
let t = [], n = e.style.backgroundColor, r = e.style.color || e.getAttribute("color") || "", i = an(e.style.fontFamily || e.getAttribute("face") || ""), a = sn(e.style.fontSize), o = e.style.lineHeight;
|
|
1976
2033
|
return n && t.push(`background-color: ${n}`), r && t.push(`color: ${r}`), i && t.push(`font-family: ${i}`), a && t.push(`font-size: ${a}`), o && t.push(`line-height: ${o}`), t.join("; ");
|
|
1977
2034
|
}
|
|
1978
|
-
function
|
|
2035
|
+
function Lr(e, t) {
|
|
1979
2036
|
return e ? t ? `${e}; ${t}` : e : t;
|
|
1980
2037
|
}
|
|
1981
|
-
function
|
|
2038
|
+
function Rr(e) {
|
|
1982
2039
|
return e ? {
|
|
1983
2040
|
...e,
|
|
1984
2041
|
conversion: (t) => {
|
|
1985
2042
|
let n = e.conversion(t);
|
|
1986
2043
|
if (!n) return n;
|
|
1987
|
-
let r = n.forChild, i =
|
|
2044
|
+
let r = n.forChild, i = Ir(t), a = t.tagName.toLowerCase() === "code";
|
|
1988
2045
|
return !i && !a ? n : {
|
|
1989
2046
|
...n,
|
|
1990
2047
|
forChild: (e, t) => {
|
|
1991
2048
|
let n = r ? r(e, t) : e;
|
|
1992
|
-
return u(n) && (i && n.setStyle(
|
|
2049
|
+
return u(n) && (i && n.setStyle(Lr(n.getStyle(), i)), a && !n.hasFormat("code") && n.toggleFormat("code")), n;
|
|
1993
2050
|
}
|
|
1994
2051
|
};
|
|
1995
2052
|
}
|
|
1996
2053
|
} : null;
|
|
1997
2054
|
}
|
|
1998
|
-
function
|
|
2055
|
+
function zr(e, t) {
|
|
1999
2056
|
return t.setDetail(e.getDetail()), t.setFormat(e.getFormat()), t.setMode(e.getMode()), t.setStyle(e.getStyle()), t;
|
|
2000
2057
|
}
|
|
2001
|
-
var
|
|
2058
|
+
var Br = class e extends se {
|
|
2002
2059
|
static clone(t) {
|
|
2003
2060
|
return new e(t.__text, t.__key);
|
|
2004
2061
|
}
|
|
@@ -2009,13 +2066,13 @@ var Ir = class e extends se {
|
|
|
2009
2066
|
let e = se.importDOM();
|
|
2010
2067
|
if (!e) return null;
|
|
2011
2068
|
let t = { ...e };
|
|
2012
|
-
return
|
|
2069
|
+
return Fr.forEach((n) => {
|
|
2013
2070
|
let r = e[n];
|
|
2014
|
-
r && (t[n] = (e) =>
|
|
2071
|
+
r && (t[n] = (e) => Rr(r(e)));
|
|
2015
2072
|
}), t;
|
|
2016
2073
|
}
|
|
2017
2074
|
static importJSON(e) {
|
|
2018
|
-
return
|
|
2075
|
+
return Vr(e.text).updateFromJSON(e);
|
|
2019
2076
|
}
|
|
2020
2077
|
constructor(e = "", t) {
|
|
2021
2078
|
super(e, t);
|
|
@@ -2028,15 +2085,15 @@ var Ir = class e extends se {
|
|
|
2028
2085
|
};
|
|
2029
2086
|
}
|
|
2030
2087
|
};
|
|
2031
|
-
function
|
|
2032
|
-
return new
|
|
2088
|
+
function Vr(e = "") {
|
|
2089
|
+
return new Br(e);
|
|
2033
2090
|
}
|
|
2034
|
-
function
|
|
2035
|
-
return
|
|
2091
|
+
function Hr(e) {
|
|
2092
|
+
return zr(e, Vr(e.getTextContent()));
|
|
2036
2093
|
}
|
|
2037
2094
|
//#endregion
|
|
2038
2095
|
//#region src/assets/icons/AlignCenterIcon.tsx
|
|
2039
|
-
function
|
|
2096
|
+
function Ur(e) {
|
|
2040
2097
|
return /* @__PURE__ */ M("svg", {
|
|
2041
2098
|
width: "24",
|
|
2042
2099
|
height: "24",
|
|
@@ -2054,7 +2111,7 @@ function zr(e) {
|
|
|
2054
2111
|
}
|
|
2055
2112
|
//#endregion
|
|
2056
2113
|
//#region src/assets/icons/AlignLeftIcon.tsx
|
|
2057
|
-
function
|
|
2114
|
+
function Wr(e) {
|
|
2058
2115
|
return /* @__PURE__ */ M("svg", {
|
|
2059
2116
|
width: "24",
|
|
2060
2117
|
height: "24",
|
|
@@ -2072,7 +2129,7 @@ function Br(e) {
|
|
|
2072
2129
|
}
|
|
2073
2130
|
//#endregion
|
|
2074
2131
|
//#region src/assets/icons/AlignRightIcon.tsx
|
|
2075
|
-
function
|
|
2132
|
+
function Gr(e) {
|
|
2076
2133
|
return /* @__PURE__ */ M("svg", {
|
|
2077
2134
|
width: "24",
|
|
2078
2135
|
height: "24",
|
|
@@ -2090,7 +2147,7 @@ function Vr(e) {
|
|
|
2090
2147
|
}
|
|
2091
2148
|
//#endregion
|
|
2092
2149
|
//#region src/assets/icons/TrashIcon03.tsx
|
|
2093
|
-
function
|
|
2150
|
+
function Kr(e) {
|
|
2094
2151
|
return /* @__PURE__ */ M("svg", {
|
|
2095
2152
|
width: "24",
|
|
2096
2153
|
height: "24",
|
|
@@ -2108,7 +2165,7 @@ function Hr(e) {
|
|
|
2108
2165
|
}
|
|
2109
2166
|
//#endregion
|
|
2110
2167
|
//#region src/assets/icons/RefreshCcwIcon05.tsx
|
|
2111
|
-
function
|
|
2168
|
+
function qr(e) {
|
|
2112
2169
|
return /* @__PURE__ */ M("svg", {
|
|
2113
2170
|
width: "24",
|
|
2114
2171
|
height: "24",
|
|
@@ -2126,7 +2183,7 @@ function Ur(e) {
|
|
|
2126
2183
|
}
|
|
2127
2184
|
//#endregion
|
|
2128
2185
|
//#region src/components/image/ImageComponent.tsx
|
|
2129
|
-
var
|
|
2186
|
+
var Jr = 100, Yr = 2e3, Xr = 10, Zr = 32, Qr = 42, $r = 340, ei = 12, ti = [
|
|
2130
2187
|
"top-left",
|
|
2131
2188
|
"top",
|
|
2132
2189
|
"top-right",
|
|
@@ -2140,19 +2197,19 @@ function q(e, t) {
|
|
|
2140
2197
|
let n = r(e);
|
|
2141
2198
|
Y(n) && t(n);
|
|
2142
2199
|
}
|
|
2143
|
-
function
|
|
2200
|
+
function ni(e, t) {
|
|
2144
2201
|
let n = t?.getBoundingClientRect();
|
|
2145
2202
|
if (!n) return {
|
|
2146
2203
|
x: 8,
|
|
2147
2204
|
y: 8
|
|
2148
2205
|
};
|
|
2149
|
-
let r = e.clientX - n.left, i = e.clientY - n.top, a = Math.max(8, n.width -
|
|
2206
|
+
let r = e.clientX - n.left, i = e.clientY - n.top, a = Math.max(8, n.width - $r - 8), o = Math.max(8, n.height - Qr - 8), s = r + ei, c = i + ei;
|
|
2150
2207
|
return {
|
|
2151
2208
|
x: Math.min(Math.max(s, 8), a),
|
|
2152
|
-
y: Math.max(c > o ? i -
|
|
2209
|
+
y: Math.max(c > o ? i - Qr - ei : c, 8)
|
|
2153
2210
|
};
|
|
2154
2211
|
}
|
|
2155
|
-
function
|
|
2212
|
+
function ri({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r, borderRadius: i, caption: a, height: o, linkUrl: s, nodeKey: c, objectFit: l, rotation: u, shadowEnabled: d, src: f, textWrap: p, width: m }) {
|
|
2156
2213
|
let [h] = P(), g = K(), v = W(), [y, b, x] = tt(c), S = O.useRef(null), C = O.useRef(null), ne = O.useRef(null), [re, ie] = O.useState({
|
|
2157
2214
|
x: 0,
|
|
2158
2215
|
y: 0
|
|
@@ -2198,13 +2255,13 @@ function $r({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2198
2255
|
}, de = (e) => {
|
|
2199
2256
|
h.update(() => {
|
|
2200
2257
|
q(c, (t) => {
|
|
2201
|
-
Y(t) && t.setWidth(Math.min(
|
|
2258
|
+
Y(t) && t.setWidth(Math.min(Jr, Math.max(Xr, e)));
|
|
2202
2259
|
});
|
|
2203
2260
|
});
|
|
2204
2261
|
}, fe = (e, t) => {
|
|
2205
2262
|
h.update(() => {
|
|
2206
2263
|
q(c, (n) => {
|
|
2207
|
-
Y(n) && (n.setWidth(Math.min(
|
|
2264
|
+
Y(n) && (n.setWidth(Math.min(Jr, Math.max(Xr, e))), n.setHeight(t === void 0 ? void 0 : Math.min(Yr, Math.max(Zr, t))));
|
|
2208
2265
|
});
|
|
2209
2266
|
}), b(!0);
|
|
2210
2267
|
}, pe = (e, t) => {
|
|
@@ -2242,7 +2299,7 @@ function $r({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2242
2299
|
window.alert(g.alerts.imageSizeLimit);
|
|
2243
2300
|
return;
|
|
2244
2301
|
}
|
|
2245
|
-
let n = await
|
|
2302
|
+
let n = await Nn(t);
|
|
2246
2303
|
h.update(() => {
|
|
2247
2304
|
q(c, (e) => {
|
|
2248
2305
|
Y(e) && (e.setSrc(n), e.setAltText(t.name));
|
|
@@ -2302,19 +2359,19 @@ function $r({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2302
2359
|
"aria-label": g.toolbar.image.alignLeft,
|
|
2303
2360
|
onClick: () => ue("left"),
|
|
2304
2361
|
type: "button",
|
|
2305
|
-
children: /* @__PURE__ */ M(
|
|
2362
|
+
children: /* @__PURE__ */ M(Wr, { "aria-hidden": "true" })
|
|
2306
2363
|
}),
|
|
2307
2364
|
/* @__PURE__ */ M("button", {
|
|
2308
2365
|
"aria-label": g.toolbar.image.alignCenter,
|
|
2309
2366
|
onClick: () => ue("center"),
|
|
2310
2367
|
type: "button",
|
|
2311
|
-
children: /* @__PURE__ */ M(
|
|
2368
|
+
children: /* @__PURE__ */ M(Ur, { "aria-hidden": "true" })
|
|
2312
2369
|
}),
|
|
2313
2370
|
/* @__PURE__ */ M("button", {
|
|
2314
2371
|
"aria-label": g.toolbar.image.alignRight,
|
|
2315
2372
|
onClick: () => ue("right"),
|
|
2316
2373
|
type: "button",
|
|
2317
|
-
children: /* @__PURE__ */ M(
|
|
2374
|
+
children: /* @__PURE__ */ M(Gr, { "aria-hidden": "true" })
|
|
2318
2375
|
}),
|
|
2319
2376
|
/* @__PURE__ */ M("button", {
|
|
2320
2377
|
onClick: () => de(25),
|
|
@@ -2333,16 +2390,16 @@ function $r({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2333
2390
|
}),
|
|
2334
2391
|
/* @__PURE__ */ M("button", {
|
|
2335
2392
|
"aria-label": g.toolbar.image.replace,
|
|
2336
|
-
onClick: () => void
|
|
2393
|
+
onClick: () => void Mn(S.current),
|
|
2337
2394
|
type: "button",
|
|
2338
|
-
children: /* @__PURE__ */ M(
|
|
2395
|
+
children: /* @__PURE__ */ M(qr, { "aria-hidden": "true" })
|
|
2339
2396
|
}),
|
|
2340
2397
|
/* @__PURE__ */ M("button", {
|
|
2341
2398
|
"aria-label": g.toolbar.image.delete,
|
|
2342
2399
|
className: "rj-editor-toolbar--clear-btn",
|
|
2343
2400
|
onClick: me,
|
|
2344
2401
|
type: "button",
|
|
2345
|
-
children: /* @__PURE__ */ M(
|
|
2402
|
+
children: /* @__PURE__ */ M(Kr, { "aria-hidden": "true" })
|
|
2346
2403
|
})
|
|
2347
2404
|
]
|
|
2348
2405
|
}) : null,
|
|
@@ -2355,7 +2412,7 @@ function $r({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2355
2412
|
T ? "is-quarter-turn" : ""
|
|
2356
2413
|
].filter(Boolean).join(" "),
|
|
2357
2414
|
onClick: (f) => {
|
|
2358
|
-
f.preventDefault(), f.stopPropagation(), x(), b(!0), ie(
|
|
2415
|
+
f.preventDefault(), f.stopPropagation(), x(), b(!0), ie(ni(f, C.current)), v(Yn({
|
|
2359
2416
|
isImageSelected: !0,
|
|
2360
2417
|
selectedImageAlignment: e,
|
|
2361
2418
|
selectedImageAltText: t,
|
|
@@ -2390,7 +2447,7 @@ function $r({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2390
2447
|
className: "rj-editor-image-caption",
|
|
2391
2448
|
children: a
|
|
2392
2449
|
}) : null,
|
|
2393
|
-
y ? /* @__PURE__ */ M(j, { children:
|
|
2450
|
+
y ? /* @__PURE__ */ M(j, { children: ti.map((e) => /* @__PURE__ */ M("span", {
|
|
2394
2451
|
"aria-hidden": "true",
|
|
2395
2452
|
className: ["rj-editor-image-resize-handle", `rj-editor-image-resize-handle--${e}`].join(" "),
|
|
2396
2453
|
onPointerDown: (t) => pe(t, e)
|
|
@@ -2409,20 +2466,20 @@ function $r({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2409
2466
|
}
|
|
2410
2467
|
//#endregion
|
|
2411
2468
|
//#region src/nodes/ImageNode.tsx
|
|
2412
|
-
function
|
|
2469
|
+
function ii(e) {
|
|
2413
2470
|
return e === "square" || e === "around" ? "square" : "top-bottom";
|
|
2414
2471
|
}
|
|
2415
|
-
function
|
|
2472
|
+
function ai(e) {
|
|
2416
2473
|
return e === "left" || e === "right" || e === "center" ? e : "center";
|
|
2417
2474
|
}
|
|
2418
|
-
function
|
|
2475
|
+
function oi(e) {
|
|
2419
2476
|
return e === "cover" || e === "fill" || e === "contain" ? e : "contain";
|
|
2420
2477
|
}
|
|
2421
2478
|
function J(e) {
|
|
2422
2479
|
let t = Number.parseFloat(e || "");
|
|
2423
2480
|
return Number.isFinite(t) ? t : void 0;
|
|
2424
2481
|
}
|
|
2425
|
-
function
|
|
2482
|
+
function si(e) {
|
|
2426
2483
|
let t = J(e.getAttribute("data-width"));
|
|
2427
2484
|
if (t !== void 0) return t;
|
|
2428
2485
|
let n = e.closest("[data-rj-image-caption-wrapper=\"true\"], [data-rj-image-rotation-wrapper=\"true\"]"), r = J(n?.style.width);
|
|
@@ -2430,47 +2487,47 @@ function ri(e) {
|
|
|
2430
2487
|
let i = J(e.style.width);
|
|
2431
2488
|
return i !== void 0 && e.style.width.includes("%") ? i : 100;
|
|
2432
2489
|
}
|
|
2433
|
-
function
|
|
2490
|
+
function ci(e) {
|
|
2434
2491
|
let t = e.getAttribute("data-alignment");
|
|
2435
|
-
if (t) return
|
|
2492
|
+
if (t) return ai(t);
|
|
2436
2493
|
let n = e.closest("[data-rj-image-caption-wrapper=\"true\"], [data-rj-image-rotation-wrapper=\"true\"]") || e;
|
|
2437
2494
|
return n.style.float === "left" ? "left" : n.style.float === "right" || n.style.marginLeft === "auto" && ["0", "0rem"].includes(n.style.marginRight) ? "right" : ["0", "0rem"].includes(n.style.marginLeft) && n.style.marginRight === "auto" ? "left" : "center";
|
|
2438
2495
|
}
|
|
2439
|
-
function
|
|
2496
|
+
function li(e) {
|
|
2440
2497
|
let t = e.getAttribute("data-text-wrap");
|
|
2441
|
-
return t ?
|
|
2498
|
+
return t ? ii(t) : (e.closest("[data-rj-image-caption-wrapper=\"true\"], [data-rj-image-rotation-wrapper=\"true\"]") || e).style.float ? "square" : "top-bottom";
|
|
2442
2499
|
}
|
|
2443
|
-
function
|
|
2500
|
+
function ui(e) {
|
|
2444
2501
|
return e.getAttribute("data-caption") || e.closest("[data-rj-image-caption-wrapper=\"true\"], [data-rj-image-rotation-wrapper=\"true\"]")?.querySelector(".rj-editor-image-caption")?.textContent || "";
|
|
2445
2502
|
}
|
|
2446
|
-
function
|
|
2503
|
+
function di(e) {
|
|
2447
2504
|
return e.getAttribute("data-link-url") || e.closest("a")?.href || "";
|
|
2448
2505
|
}
|
|
2449
|
-
function
|
|
2506
|
+
function fi(e) {
|
|
2450
2507
|
if (!(e instanceof HTMLImageElement)) return null;
|
|
2451
2508
|
let t = e.getAttribute("src");
|
|
2452
|
-
return t ? { node:
|
|
2453
|
-
alignment:
|
|
2509
|
+
return t ? { node: hi({
|
|
2510
|
+
alignment: ci(e),
|
|
2454
2511
|
altText: e.getAttribute("alt") || "",
|
|
2455
2512
|
aspectRatioLocked: e.getAttribute("data-aspect-ratio-locked") !== "false",
|
|
2456
2513
|
borderEnabled: !!e.style.border,
|
|
2457
2514
|
borderRadius: J(e.style.borderRadius) || 0,
|
|
2458
|
-
caption:
|
|
2515
|
+
caption: ui(e),
|
|
2459
2516
|
height: J(e.getAttribute("data-height")) || J(e.style.height),
|
|
2460
|
-
linkUrl:
|
|
2461
|
-
objectFit:
|
|
2517
|
+
linkUrl: di(e),
|
|
2518
|
+
objectFit: oi(e.getAttribute("data-object-fit") || e.style.objectFit),
|
|
2462
2519
|
rotation: J(e.getAttribute("data-rotation")) || 0,
|
|
2463
2520
|
shadowEnabled: !!e.style.boxShadow,
|
|
2464
2521
|
src: t,
|
|
2465
|
-
textWrap:
|
|
2466
|
-
width:
|
|
2522
|
+
textWrap: li(e),
|
|
2523
|
+
width: si(e)
|
|
2467
2524
|
}) } : null;
|
|
2468
2525
|
}
|
|
2469
|
-
function
|
|
2526
|
+
function pi(e) {
|
|
2470
2527
|
let t = e.querySelector("img");
|
|
2471
|
-
return t ?
|
|
2528
|
+
return t ? fi(t) : null;
|
|
2472
2529
|
}
|
|
2473
|
-
var
|
|
2530
|
+
var mi = class e extends b {
|
|
2474
2531
|
__alignment;
|
|
2475
2532
|
__aspectRatioLocked;
|
|
2476
2533
|
__altText;
|
|
@@ -2494,21 +2551,21 @@ var ui = class e extends b {
|
|
|
2494
2551
|
static importDOM() {
|
|
2495
2552
|
return {
|
|
2496
2553
|
a: (e) => !(e instanceof HTMLAnchorElement) || !e.querySelector("img") ? null : {
|
|
2497
|
-
conversion:
|
|
2554
|
+
conversion: pi,
|
|
2498
2555
|
priority: 2
|
|
2499
2556
|
},
|
|
2500
2557
|
img: () => ({
|
|
2501
|
-
conversion:
|
|
2558
|
+
conversion: fi,
|
|
2502
2559
|
priority: 0
|
|
2503
2560
|
}),
|
|
2504
2561
|
span: (e) => !(e instanceof HTMLElement) || e.getAttribute("data-rj-image-caption-wrapper") !== "true" && e.getAttribute("data-rj-image-rotation-wrapper") !== "true" ? null : {
|
|
2505
|
-
conversion:
|
|
2562
|
+
conversion: pi,
|
|
2506
2563
|
priority: 2
|
|
2507
2564
|
}
|
|
2508
2565
|
};
|
|
2509
2566
|
}
|
|
2510
2567
|
static importJSON(e) {
|
|
2511
|
-
return
|
|
2568
|
+
return hi({
|
|
2512
2569
|
alignment: e.alignment,
|
|
2513
2570
|
altText: e.altText,
|
|
2514
2571
|
aspectRatioLocked: e.aspectRatioLocked,
|
|
@@ -2521,7 +2578,7 @@ var ui = class e extends b {
|
|
|
2521
2578
|
rotation: e.rotation,
|
|
2522
2579
|
shadowEnabled: e.shadowEnabled,
|
|
2523
2580
|
src: e.src,
|
|
2524
|
-
textWrap:
|
|
2581
|
+
textWrap: ii(e.textWrap),
|
|
2525
2582
|
width: e.width
|
|
2526
2583
|
});
|
|
2527
2584
|
}
|
|
@@ -2533,7 +2590,7 @@ var ui = class e extends b {
|
|
|
2533
2590
|
return t.className = e.theme.image || "rj-editor-image-node", t;
|
|
2534
2591
|
}
|
|
2535
2592
|
decorate() {
|
|
2536
|
-
return /* @__PURE__ */ M(
|
|
2593
|
+
return /* @__PURE__ */ M(ri, {
|
|
2537
2594
|
alignment: this.__alignment,
|
|
2538
2595
|
altText: this.__altText,
|
|
2539
2596
|
aspectRatioLocked: this.__aspectRatioLocked,
|
|
@@ -2683,23 +2740,23 @@ var ui = class e extends b {
|
|
|
2683
2740
|
return !1;
|
|
2684
2741
|
}
|
|
2685
2742
|
};
|
|
2686
|
-
function
|
|
2687
|
-
return new
|
|
2743
|
+
function hi({ alignment: e, aspectRatioLocked: t, altText: n, borderEnabled: r, borderRadius: i, caption: a, height: o, linkUrl: s, objectFit: c, rotation: l, shadowEnabled: u, src: d, textWrap: f, width: p }) {
|
|
2744
|
+
return new mi(d, n, p, e, a, o, s, c, f, i, r, u, l, t);
|
|
2688
2745
|
}
|
|
2689
2746
|
function Y(e) {
|
|
2690
|
-
return e instanceof
|
|
2747
|
+
return e instanceof mi;
|
|
2691
2748
|
}
|
|
2692
2749
|
//#endregion
|
|
2693
2750
|
//#region src/components/youtube/YouTubeComponent.tsx
|
|
2694
|
-
function
|
|
2751
|
+
function gi(e) {
|
|
2695
2752
|
let t = r(e);
|
|
2696
|
-
|
|
2753
|
+
xi(t) && t.remove();
|
|
2697
2754
|
}
|
|
2698
|
-
var
|
|
2755
|
+
var _i = O.memo(function({ nodeKey: e, title: t, videoId: n }) {
|
|
2699
2756
|
let [r] = P(), [i, a, o] = tt(e), s = t || "YouTube video";
|
|
2700
2757
|
return O.useEffect(() => {
|
|
2701
2758
|
if (!i) return;
|
|
2702
|
-
let t = r.registerCommand(te, (t) => (t.preventDefault(), r.update(() =>
|
|
2759
|
+
let t = r.registerCommand(te, (t) => (t.preventDefault(), r.update(() => gi(e)), !0), _), n = r.registerCommand(ee, (t) => (t.preventDefault(), r.update(() => gi(e)), !0), _);
|
|
2703
2760
|
return () => {
|
|
2704
2761
|
t(), n();
|
|
2705
2762
|
};
|
|
@@ -2725,14 +2782,14 @@ var pi = O.memo(function({ nodeKey: e, title: t, videoId: n }) {
|
|
|
2725
2782
|
});
|
|
2726
2783
|
//#endregion
|
|
2727
2784
|
//#region src/nodes/YouTubeNode.tsx
|
|
2728
|
-
function
|
|
2729
|
-
let t =
|
|
2730
|
-
return t ? { node:
|
|
2785
|
+
function vi(e) {
|
|
2786
|
+
let t = Rt(e.getAttribute("data-youtube-video-id") || e.getAttribute("src") || "");
|
|
2787
|
+
return t ? { node: bi({
|
|
2731
2788
|
title: e.getAttribute("title") || "",
|
|
2732
2789
|
videoId: t
|
|
2733
2790
|
}) } : null;
|
|
2734
2791
|
}
|
|
2735
|
-
var
|
|
2792
|
+
var yi = class e extends b {
|
|
2736
2793
|
__title;
|
|
2737
2794
|
__videoId;
|
|
2738
2795
|
static clone(t) {
|
|
@@ -2742,13 +2799,13 @@ var hi = class e extends b {
|
|
|
2742
2799
|
return "youtube";
|
|
2743
2800
|
}
|
|
2744
2801
|
static importDOM() {
|
|
2745
|
-
return { iframe: (e) =>
|
|
2746
|
-
conversion:
|
|
2802
|
+
return { iframe: (e) => Rt(e.getAttribute("src") || "") ? {
|
|
2803
|
+
conversion: vi,
|
|
2747
2804
|
priority: 1
|
|
2748
2805
|
} : null };
|
|
2749
2806
|
}
|
|
2750
2807
|
static importJSON(e) {
|
|
2751
|
-
return
|
|
2808
|
+
return bi({
|
|
2752
2809
|
title: e.title,
|
|
2753
2810
|
videoId: e.videoId
|
|
2754
2811
|
});
|
|
@@ -2761,7 +2818,7 @@ var hi = class e extends b {
|
|
|
2761
2818
|
return t.className = e.theme.youtube || "rj-editor-youtube-node", t;
|
|
2762
2819
|
}
|
|
2763
2820
|
decorate() {
|
|
2764
|
-
return /* @__PURE__ */ M(
|
|
2821
|
+
return /* @__PURE__ */ M(_i, {
|
|
2765
2822
|
nodeKey: this.__key,
|
|
2766
2823
|
title: this.__title,
|
|
2767
2824
|
videoId: this.__videoId
|
|
@@ -2799,15 +2856,15 @@ var hi = class e extends b {
|
|
|
2799
2856
|
return !1;
|
|
2800
2857
|
}
|
|
2801
2858
|
};
|
|
2802
|
-
function
|
|
2803
|
-
return new
|
|
2859
|
+
function bi({ title: e = "", videoId: t }) {
|
|
2860
|
+
return new yi(t, e);
|
|
2804
2861
|
}
|
|
2805
|
-
function
|
|
2806
|
-
return e instanceof
|
|
2862
|
+
function xi(e) {
|
|
2863
|
+
return e instanceof yi;
|
|
2807
2864
|
}
|
|
2808
2865
|
//#endregion
|
|
2809
2866
|
//#region src/components/rj-text-editor/editorTheme.ts
|
|
2810
|
-
var
|
|
2867
|
+
var Si = {
|
|
2811
2868
|
code: "rj-editor-code-block",
|
|
2812
2869
|
codeHighlight: {
|
|
2813
2870
|
atrule: "rj-editor-code-token-atrule",
|
|
@@ -2869,21 +2926,21 @@ var vi = {
|
|
|
2869
2926
|
};
|
|
2870
2927
|
//#endregion
|
|
2871
2928
|
//#region src/components/rj-text-editor/createInitialConfig.ts
|
|
2872
|
-
function
|
|
2929
|
+
function Ci({ defaultValue: e, namespace: t, value: n }) {
|
|
2873
2930
|
return {
|
|
2874
2931
|
namespace: t,
|
|
2875
2932
|
nodes: [
|
|
2876
2933
|
Qe,
|
|
2877
2934
|
Ze,
|
|
2878
|
-
|
|
2935
|
+
Br,
|
|
2879
2936
|
{
|
|
2880
2937
|
replace: se,
|
|
2881
|
-
with:
|
|
2882
|
-
withKlass:
|
|
2938
|
+
with: Hr,
|
|
2939
|
+
withKlass: Br
|
|
2883
2940
|
},
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2941
|
+
Mr,
|
|
2942
|
+
mi,
|
|
2943
|
+
yi,
|
|
2887
2944
|
Ce,
|
|
2888
2945
|
Ae,
|
|
2889
2946
|
ke,
|
|
@@ -2894,13 +2951,13 @@ function yi({ defaultValue: e, namespace: t, value: n }) {
|
|
|
2894
2951
|
onError(e) {
|
|
2895
2952
|
throw e;
|
|
2896
2953
|
},
|
|
2897
|
-
editorState: n || e ? (t) =>
|
|
2898
|
-
theme:
|
|
2954
|
+
editorState: n || e ? (t) => Un(t, n || e || "") : void 0,
|
|
2955
|
+
theme: Si
|
|
2899
2956
|
};
|
|
2900
2957
|
}
|
|
2901
2958
|
//#endregion
|
|
2902
2959
|
//#region src/assets/icons/CopyIcon01.tsx
|
|
2903
|
-
function
|
|
2960
|
+
function wi(e) {
|
|
2904
2961
|
return /* @__PURE__ */ M("svg", {
|
|
2905
2962
|
width: "24",
|
|
2906
2963
|
height: "24",
|
|
@@ -2918,7 +2975,7 @@ function bi(e) {
|
|
|
2918
2975
|
}
|
|
2919
2976
|
//#endregion
|
|
2920
2977
|
//#region src/assets/icons/ChevronDownIcon.tsx
|
|
2921
|
-
function
|
|
2978
|
+
function Ti(e) {
|
|
2922
2979
|
return /* @__PURE__ */ M("svg", {
|
|
2923
2980
|
width: "24",
|
|
2924
2981
|
height: "24",
|
|
@@ -2936,10 +2993,10 @@ function xi(e) {
|
|
|
2936
2993
|
}
|
|
2937
2994
|
//#endregion
|
|
2938
2995
|
//#region src/components/code-block/actions/code-block-action/CodeBlockAction.tsx
|
|
2939
|
-
var
|
|
2996
|
+
var Ei = 190, Di = 8, Oi = $e().map(([e, t]) => ({
|
|
2940
2997
|
label: t,
|
|
2941
2998
|
value: e
|
|
2942
|
-
})),
|
|
2999
|
+
})), ki = {
|
|
2943
3000
|
algorithm: D.darkAlgorithm,
|
|
2944
3001
|
token: {
|
|
2945
3002
|
colorBgContainer: "#181818",
|
|
@@ -2952,7 +3009,7 @@ var Si = 190, Ci = 8, wi = $e().map(([e, t]) => ({
|
|
|
2952
3009
|
colorTextSecondary: "#b8b8b8"
|
|
2953
3010
|
}
|
|
2954
3011
|
};
|
|
2955
|
-
function
|
|
3012
|
+
function Ai({ editor: e, language: t, nodeKey: n }) {
|
|
2956
3013
|
let i = K(), a = O.useRef(null), [o, s] = O.useState(!1), [c, l] = O.useState({
|
|
2957
3014
|
left: 0,
|
|
2958
3015
|
top: 0,
|
|
@@ -2966,9 +3023,9 @@ function Ei({ editor: e, language: t, nodeKey: n }) {
|
|
|
2966
3023
|
} : e);
|
|
2967
3024
|
return;
|
|
2968
3025
|
}
|
|
2969
|
-
let i = r.getBoundingClientRect(), o = t.getBoundingClientRect(), s = a.current?.getBoundingClientRect().width ||
|
|
2970
|
-
left: Math.min(Math.max(u,
|
|
2971
|
-
top: Math.max(o.top - i.top +
|
|
3026
|
+
let i = r.getBoundingClientRect(), o = t.getBoundingClientRect(), s = a.current?.getBoundingClientRect().width || Ei, c = Math.max(Di, i.width - s - Di), u = o.right - i.left - s - Di, d = {
|
|
3027
|
+
left: Math.min(Math.max(u, Di), c),
|
|
3028
|
+
top: Math.max(o.top - i.top + Di, Di),
|
|
2972
3029
|
visible: !0
|
|
2973
3030
|
};
|
|
2974
3031
|
l((e) => e.left === d.left && e.top === d.top && e.visible === d.visible ? e : d);
|
|
@@ -3004,9 +3061,9 @@ function Ei({ editor: e, language: t, nodeKey: n }) {
|
|
|
3004
3061
|
top: c.top
|
|
3005
3062
|
},
|
|
3006
3063
|
children: [/* @__PURE__ */ M(me, {
|
|
3007
|
-
theme:
|
|
3064
|
+
theme: ki,
|
|
3008
3065
|
children: /* @__PURE__ */ M(E, {
|
|
3009
|
-
suffixIcon: /* @__PURE__ */ M(
|
|
3066
|
+
suffixIcon: /* @__PURE__ */ M(Ti, {}),
|
|
3010
3067
|
"aria-label": i.toolbar.codeBlock.language,
|
|
3011
3068
|
className: "rj-editor-code-block-language-select",
|
|
3012
3069
|
classNames: { popup: { root: "rj-editor-code-block-language-popup" } },
|
|
@@ -3016,7 +3073,7 @@ function Ei({ editor: e, language: t, nodeKey: n }) {
|
|
|
3016
3073
|
Xe(e) && e.setLanguage(t);
|
|
3017
3074
|
});
|
|
3018
3075
|
},
|
|
3019
|
-
options:
|
|
3076
|
+
options: Oi,
|
|
3020
3077
|
popupMatchSelectWidth: !1,
|
|
3021
3078
|
size: "small",
|
|
3022
3079
|
value: t
|
|
@@ -3027,19 +3084,19 @@ function Ei({ editor: e, language: t, nodeKey: n }) {
|
|
|
3027
3084
|
onClick: () => void d(),
|
|
3028
3085
|
title: o ? i.toolbar.codeBlock.copied : i.toolbar.codeBlock.copy,
|
|
3029
3086
|
type: "button",
|
|
3030
|
-
children: /* @__PURE__ */ M(
|
|
3087
|
+
children: /* @__PURE__ */ M(wi, { "aria-hidden": "true" })
|
|
3031
3088
|
})]
|
|
3032
3089
|
}) : null;
|
|
3033
3090
|
}
|
|
3034
3091
|
//#endregion
|
|
3035
3092
|
//#region src/components/code-block/actions/CodeBlockActions.tsx
|
|
3036
|
-
function
|
|
3093
|
+
function ji(e, t) {
|
|
3037
3094
|
return e.length === t.length && e.every((e, n) => {
|
|
3038
3095
|
let r = t[n];
|
|
3039
3096
|
return e.key === r?.key && e.language === r.language;
|
|
3040
3097
|
});
|
|
3041
3098
|
}
|
|
3042
|
-
function
|
|
3099
|
+
function Mi() {
|
|
3043
3100
|
let [e] = P(), [t, n] = O.useState([]);
|
|
3044
3101
|
return O.useEffect(() => {
|
|
3045
3102
|
let t = () => {
|
|
@@ -3047,12 +3104,12 @@ function Oi() {
|
|
|
3047
3104
|
key: e.getKey(),
|
|
3048
3105
|
language: e.getLanguage() || "plain"
|
|
3049
3106
|
}));
|
|
3050
|
-
n((t) =>
|
|
3107
|
+
n((t) => ji(t, e) ? t : e);
|
|
3051
3108
|
};
|
|
3052
3109
|
return e.getEditorState().read(t), e.registerUpdateListener(({ editorState: e }) => {
|
|
3053
3110
|
e.read(t);
|
|
3054
3111
|
});
|
|
3055
|
-
}, [e]), t.map((t) => /* @__PURE__ */ M(
|
|
3112
|
+
}, [e]), t.map((t) => /* @__PURE__ */ M(Ai, {
|
|
3056
3113
|
editor: e,
|
|
3057
3114
|
language: t.language,
|
|
3058
3115
|
nodeKey: t.key
|
|
@@ -3060,7 +3117,7 @@ function Oi() {
|
|
|
3060
3117
|
}
|
|
3061
3118
|
//#endregion
|
|
3062
3119
|
//#region src/assets/icons/AlignJustifyIcon.tsx
|
|
3063
|
-
function
|
|
3120
|
+
function Ni(e) {
|
|
3064
3121
|
return /* @__PURE__ */ M("svg", {
|
|
3065
3122
|
width: "24",
|
|
3066
3123
|
height: "24",
|
|
@@ -3078,7 +3135,7 @@ function ki(e) {
|
|
|
3078
3135
|
}
|
|
3079
3136
|
//#endregion
|
|
3080
3137
|
//#region src/components/toolbar/home/alignment/AlignmentControls.tsx
|
|
3081
|
-
function
|
|
3138
|
+
function Pi({ editor: e }) {
|
|
3082
3139
|
let t = K(), n = G((e) => e.toolbar.alignment), r = n === "" || n === "start" ? "left" : n === "end" ? "right" : n;
|
|
3083
3140
|
return /* @__PURE__ */ N(j, { children: [
|
|
3084
3141
|
/* @__PURE__ */ M("button", {
|
|
@@ -3088,7 +3145,7 @@ function Ai({ editor: e }) {
|
|
|
3088
3145
|
onClick: () => e.dispatchCommand(x, "left"),
|
|
3089
3146
|
title: L("MOD+SHIFT+L", t.toolbar.alignment.left),
|
|
3090
3147
|
type: "button",
|
|
3091
|
-
children: /* @__PURE__ */ M(
|
|
3148
|
+
children: /* @__PURE__ */ M(Wr, {})
|
|
3092
3149
|
}),
|
|
3093
3150
|
/* @__PURE__ */ M("button", {
|
|
3094
3151
|
"aria-label": t.toolbar.alignment.center,
|
|
@@ -3097,7 +3154,7 @@ function Ai({ editor: e }) {
|
|
|
3097
3154
|
onClick: () => e.dispatchCommand(x, "center"),
|
|
3098
3155
|
title: L("MOD+SHIFT+C", t.toolbar.alignment.center),
|
|
3099
3156
|
type: "button",
|
|
3100
|
-
children: /* @__PURE__ */ M(
|
|
3157
|
+
children: /* @__PURE__ */ M(Ur, {})
|
|
3101
3158
|
}),
|
|
3102
3159
|
/* @__PURE__ */ M("button", {
|
|
3103
3160
|
"aria-label": t.toolbar.alignment.right,
|
|
@@ -3106,7 +3163,7 @@ function Ai({ editor: e }) {
|
|
|
3106
3163
|
onClick: () => e.dispatchCommand(x, "right"),
|
|
3107
3164
|
title: L("MOD+SHIFT+R", t.toolbar.alignment.right),
|
|
3108
3165
|
type: "button",
|
|
3109
|
-
children: /* @__PURE__ */ M(
|
|
3166
|
+
children: /* @__PURE__ */ M(Gr, {})
|
|
3110
3167
|
}),
|
|
3111
3168
|
/* @__PURE__ */ M("button", {
|
|
3112
3169
|
"aria-label": t.toolbar.alignment.justify,
|
|
@@ -3115,18 +3172,18 @@ function Ai({ editor: e }) {
|
|
|
3115
3172
|
onClick: () => e.dispatchCommand(x, "justify"),
|
|
3116
3173
|
title: L("MOD+SHIFT+J", t.toolbar.alignment.justify),
|
|
3117
3174
|
type: "button",
|
|
3118
|
-
children: /* @__PURE__ */ M(
|
|
3175
|
+
children: /* @__PURE__ */ M(Ni, {})
|
|
3119
3176
|
})
|
|
3120
3177
|
] });
|
|
3121
3178
|
}
|
|
3122
3179
|
//#endregion
|
|
3123
3180
|
//#region src/components/toolbar/home/divider/ToolbarDivider.tsx
|
|
3124
|
-
function
|
|
3181
|
+
function Fi() {
|
|
3125
3182
|
return /* @__PURE__ */ M("span", { className: "rj-editor-toolbar-divider" });
|
|
3126
3183
|
}
|
|
3127
3184
|
//#endregion
|
|
3128
3185
|
//#region src/assets/icons/FlipBackwardIcon.tsx
|
|
3129
|
-
function
|
|
3186
|
+
function Ii(e) {
|
|
3130
3187
|
return /* @__PURE__ */ M("svg", {
|
|
3131
3188
|
width: "24",
|
|
3132
3189
|
height: "24",
|
|
@@ -3144,7 +3201,7 @@ function Mi(e) {
|
|
|
3144
3201
|
}
|
|
3145
3202
|
//#endregion
|
|
3146
3203
|
//#region src/assets/icons/FlipForwardIcon.tsx
|
|
3147
|
-
function
|
|
3204
|
+
function Li(e) {
|
|
3148
3205
|
return /* @__PURE__ */ M("svg", {
|
|
3149
3206
|
width: "24",
|
|
3150
3207
|
height: "24",
|
|
@@ -3162,7 +3219,7 @@ function Ni(e) {
|
|
|
3162
3219
|
}
|
|
3163
3220
|
//#endregion
|
|
3164
3221
|
//#region src/components/toolbar/home/history/HistoryControls.tsx
|
|
3165
|
-
function
|
|
3222
|
+
function Ri({ editor: e }) {
|
|
3166
3223
|
let t = K(), { canRedo: n, canUndo: r } = G((e) => e.toolbar);
|
|
3167
3224
|
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("button", {
|
|
3168
3225
|
"aria-label": t.toolbar.history.undo,
|
|
@@ -3170,19 +3227,19 @@ function Pi({ editor: e }) {
|
|
|
3170
3227
|
onClick: () => e.dispatchCommand(ce, void 0),
|
|
3171
3228
|
title: L("MOD+Z", t.toolbar.shortcuts.undo),
|
|
3172
3229
|
type: "button",
|
|
3173
|
-
children: /* @__PURE__ */ M(
|
|
3230
|
+
children: /* @__PURE__ */ M(Ii, {})
|
|
3174
3231
|
}), /* @__PURE__ */ M("button", {
|
|
3175
3232
|
"aria-label": t.toolbar.history.redo,
|
|
3176
3233
|
disabled: !n,
|
|
3177
3234
|
onClick: () => e.dispatchCommand(ae, void 0),
|
|
3178
3235
|
title: L("MOD+Y", t.toolbar.shortcuts.redo),
|
|
3179
3236
|
type: "button",
|
|
3180
|
-
children: /* @__PURE__ */ M(
|
|
3237
|
+
children: /* @__PURE__ */ M(Li, {})
|
|
3181
3238
|
})] });
|
|
3182
3239
|
}
|
|
3183
3240
|
//#endregion
|
|
3184
3241
|
//#region src/assets/icons/LeftIndentIcon01.tsx
|
|
3185
|
-
function
|
|
3242
|
+
function zi(e) {
|
|
3186
3243
|
return /* @__PURE__ */ M("svg", {
|
|
3187
3244
|
width: "24",
|
|
3188
3245
|
height: "24",
|
|
@@ -3200,7 +3257,7 @@ function Fi(e) {
|
|
|
3200
3257
|
}
|
|
3201
3258
|
//#endregion
|
|
3202
3259
|
//#region src/assets/icons/RightIndentIcon01.tsx
|
|
3203
|
-
function
|
|
3260
|
+
function Bi(e) {
|
|
3204
3261
|
return /* @__PURE__ */ M("svg", {
|
|
3205
3262
|
width: "24",
|
|
3206
3263
|
height: "24",
|
|
@@ -3218,25 +3275,25 @@ function Ii(e) {
|
|
|
3218
3275
|
}
|
|
3219
3276
|
//#endregion
|
|
3220
3277
|
//#region src/components/toolbar/home/indent/IndentControls.tsx
|
|
3221
|
-
function
|
|
3278
|
+
function Vi() {
|
|
3222
3279
|
let [e] = P(), t = K();
|
|
3223
3280
|
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("button", {
|
|
3224
3281
|
"aria-label": t.toolbar.shortcuts.increaseIndent,
|
|
3225
3282
|
onClick: () => e.dispatchCommand(C, void 0),
|
|
3226
3283
|
title: L("MOD+]", t.toolbar.shortcuts.increaseIndent),
|
|
3227
3284
|
type: "button",
|
|
3228
|
-
children: /* @__PURE__ */ M(
|
|
3285
|
+
children: /* @__PURE__ */ M(zi, { "aria-hidden": "true" })
|
|
3229
3286
|
}), /* @__PURE__ */ M("button", {
|
|
3230
3287
|
"aria-label": t.toolbar.shortcuts.decreaseIndent,
|
|
3231
3288
|
onClick: () => e.dispatchCommand(re, void 0),
|
|
3232
3289
|
title: L("MOD+[", t.toolbar.shortcuts.decreaseIndent),
|
|
3233
3290
|
type: "button",
|
|
3234
|
-
children: /* @__PURE__ */ M(
|
|
3291
|
+
children: /* @__PURE__ */ M(Bi, { "aria-hidden": "true" })
|
|
3235
3292
|
})] });
|
|
3236
3293
|
}
|
|
3237
3294
|
//#endregion
|
|
3238
3295
|
//#region src/assets/icons/ClearOrderListIcon.tsx
|
|
3239
|
-
function
|
|
3296
|
+
function Hi(e) {
|
|
3240
3297
|
return /* @__PURE__ */ M("svg", {
|
|
3241
3298
|
width: "24",
|
|
3242
3299
|
height: "24",
|
|
@@ -3254,7 +3311,7 @@ function Ri(e) {
|
|
|
3254
3311
|
}
|
|
3255
3312
|
//#endregion
|
|
3256
3313
|
//#region src/assets/icons/DotpointsIcon01.tsx
|
|
3257
|
-
function
|
|
3314
|
+
function Ui(e) {
|
|
3258
3315
|
return /* @__PURE__ */ M("svg", {
|
|
3259
3316
|
width: "24",
|
|
3260
3317
|
height: "24",
|
|
@@ -3272,7 +3329,7 @@ function zi(e) {
|
|
|
3272
3329
|
}
|
|
3273
3330
|
//#endregion
|
|
3274
3331
|
//#region src/assets/icons/OrderListIcon.tsx
|
|
3275
|
-
function
|
|
3332
|
+
function Wi(e) {
|
|
3276
3333
|
return /* @__PURE__ */ M("svg", {
|
|
3277
3334
|
width: "24",
|
|
3278
3335
|
height: "24",
|
|
@@ -3290,7 +3347,7 @@ function Bi(e) {
|
|
|
3290
3347
|
}
|
|
3291
3348
|
//#endregion
|
|
3292
3349
|
//#region src/components/toolbar/home/list/ListControls.tsx
|
|
3293
|
-
function
|
|
3350
|
+
function Gi({ editor: e }) {
|
|
3294
3351
|
let t = K(), n = G((e) => e.toolbar.listType);
|
|
3295
3352
|
return /* @__PURE__ */ N(j, { children: [
|
|
3296
3353
|
/* @__PURE__ */ M("button", {
|
|
@@ -3300,7 +3357,7 @@ function Vi({ editor: e }) {
|
|
|
3300
3357
|
onClick: () => e.dispatchCommand(Oe, void 0),
|
|
3301
3358
|
title: L("MOD+SHIFT+8", t.toolbar.shortcuts.bulletList),
|
|
3302
3359
|
type: "button",
|
|
3303
|
-
children: /* @__PURE__ */ M(
|
|
3360
|
+
children: /* @__PURE__ */ M(Ui, {})
|
|
3304
3361
|
}),
|
|
3305
3362
|
/* @__PURE__ */ M("button", {
|
|
3306
3363
|
"aria-label": t.toolbar.list.numbered,
|
|
@@ -3309,7 +3366,7 @@ function Vi({ editor: e }) {
|
|
|
3309
3366
|
onClick: () => e.dispatchCommand(De, void 0),
|
|
3310
3367
|
title: L("MOD+SHIFT+7", t.toolbar.shortcuts.numberedList),
|
|
3311
3368
|
type: "button",
|
|
3312
|
-
children: /* @__PURE__ */ M(
|
|
3369
|
+
children: /* @__PURE__ */ M(Wi, {})
|
|
3313
3370
|
}),
|
|
3314
3371
|
/* @__PURE__ */ M("button", {
|
|
3315
3372
|
"aria-label": t.toolbar.list.remove,
|
|
@@ -3318,13 +3375,13 @@ function Vi({ editor: e }) {
|
|
|
3318
3375
|
title: t.toolbar.shortcuts.removeList,
|
|
3319
3376
|
type: "button",
|
|
3320
3377
|
className: "rj-editor-toolbar--clear-btn",
|
|
3321
|
-
children: /* @__PURE__ */ M(
|
|
3378
|
+
children: /* @__PURE__ */ M(Hi, {})
|
|
3322
3379
|
})
|
|
3323
3380
|
] });
|
|
3324
3381
|
}
|
|
3325
3382
|
//#endregion
|
|
3326
3383
|
//#region src/assets/icons/ParagraphSpacingIco.tsx
|
|
3327
|
-
function
|
|
3384
|
+
function Ki(e) {
|
|
3328
3385
|
return /* @__PURE__ */ M("svg", {
|
|
3329
3386
|
width: "24",
|
|
3330
3387
|
height: "24",
|
|
@@ -3350,7 +3407,7 @@ function X(e, t) {
|
|
|
3350
3407
|
});
|
|
3351
3408
|
});
|
|
3352
3409
|
}
|
|
3353
|
-
function
|
|
3410
|
+
function qi(e) {
|
|
3354
3411
|
e.update(() => {
|
|
3355
3412
|
let e = a();
|
|
3356
3413
|
if (!c(e)) return;
|
|
@@ -3386,7 +3443,7 @@ function Ui(e) {
|
|
|
3386
3443
|
}
|
|
3387
3444
|
//#endregion
|
|
3388
3445
|
//#region src/components/toolbar/home/spacing/SpacingControls.tsx
|
|
3389
|
-
function
|
|
3446
|
+
function Ji() {
|
|
3390
3447
|
let [e] = P(), t = K(), n = W(), r = G((e) => e.toolbar), i = (t) => {
|
|
3391
3448
|
X(e, { "line-height": t || null }), n(U({
|
|
3392
3449
|
...r,
|
|
@@ -3405,7 +3462,7 @@ function Wi() {
|
|
|
3405
3462
|
})
|
|
3406
3463
|
},
|
|
3407
3464
|
{ type: "divider" },
|
|
3408
|
-
...
|
|
3465
|
+
...en.map((e) => ({
|
|
3409
3466
|
key: e,
|
|
3410
3467
|
label: /* @__PURE__ */ M("button", {
|
|
3411
3468
|
className: "rj-editor-spacing-menu-item",
|
|
@@ -3421,13 +3478,13 @@ function Wi() {
|
|
|
3421
3478
|
className: r.lineHeight ? "is-active" : void 0,
|
|
3422
3479
|
title: t.toolbar.shortcuts.spacing,
|
|
3423
3480
|
type: "button",
|
|
3424
|
-
children: /* @__PURE__ */ M(
|
|
3481
|
+
children: /* @__PURE__ */ M(Ki, { "aria-hidden": "true" })
|
|
3425
3482
|
})
|
|
3426
3483
|
});
|
|
3427
3484
|
}
|
|
3428
3485
|
//#endregion
|
|
3429
3486
|
//#region src/assets/icons/PaletteIcon.tsx
|
|
3430
|
-
function
|
|
3487
|
+
function Yi(e) {
|
|
3431
3488
|
return /* @__PURE__ */ N("svg", {
|
|
3432
3489
|
width: "24",
|
|
3433
3490
|
height: "24",
|
|
@@ -3468,7 +3525,7 @@ function Gi(e) {
|
|
|
3468
3525
|
}
|
|
3469
3526
|
//#endregion
|
|
3470
3527
|
//#region src/components/toolbar/home/style-controls/background-color/BackgroundColorControl.tsx
|
|
3471
|
-
function
|
|
3528
|
+
function Xi() {
|
|
3472
3529
|
let [e] = P(), t = K(), [n, r] = A(!1), [i, a] = A(null), o = W(), s = G((e) => e.toolbar), c = s.backgroundColor, l = (t) => {
|
|
3473
3530
|
X(e, { "background-color": t || null }), o(U({
|
|
3474
3531
|
...s,
|
|
@@ -3545,14 +3602,14 @@ function Ki() {
|
|
|
3545
3602
|
children: /* @__PURE__ */ M("span", {
|
|
3546
3603
|
className: c ? "rj-editor-background-color-mark" : "rj-editor-background-color-mark is-none",
|
|
3547
3604
|
style: c ? { backgroundColor: c } : void 0,
|
|
3548
|
-
children: /* @__PURE__ */ M(
|
|
3605
|
+
children: /* @__PURE__ */ M(Yi, {})
|
|
3549
3606
|
})
|
|
3550
3607
|
})
|
|
3551
3608
|
});
|
|
3552
3609
|
}
|
|
3553
3610
|
//#endregion
|
|
3554
3611
|
//#region src/assets/icons/XCloseIcon.tsx
|
|
3555
|
-
function
|
|
3612
|
+
function Zi(e) {
|
|
3556
3613
|
return /* @__PURE__ */ M("svg", {
|
|
3557
3614
|
width: "24",
|
|
3558
3615
|
height: "24",
|
|
@@ -3570,12 +3627,12 @@ function qi(e) {
|
|
|
3570
3627
|
}
|
|
3571
3628
|
//#endregion
|
|
3572
3629
|
//#region src/components/toolbar/home/style-controls/clear-formatting/ClearFormattingControl.tsx
|
|
3573
|
-
function
|
|
3630
|
+
function Qi() {
|
|
3574
3631
|
let [e] = P(), t = K(), n = W();
|
|
3575
3632
|
return /* @__PURE__ */ M("button", {
|
|
3576
3633
|
"aria-label": t.toolbar.style.clearFormatting,
|
|
3577
3634
|
onClick: () => {
|
|
3578
|
-
|
|
3635
|
+
qi(e), n(Zn({
|
|
3579
3636
|
isBold: !1,
|
|
3580
3637
|
isCode: !1,
|
|
3581
3638
|
isItalic: !1,
|
|
@@ -3589,7 +3646,7 @@ function Ji() {
|
|
|
3589
3646
|
fontSize: B.fontSize,
|
|
3590
3647
|
lineHeight: B.lineHeight,
|
|
3591
3648
|
textColor: B.textColor
|
|
3592
|
-
})), n(
|
|
3649
|
+
})), n(Gn({
|
|
3593
3650
|
alignment: B.alignment,
|
|
3594
3651
|
listType: B.listType
|
|
3595
3652
|
}));
|
|
@@ -3597,12 +3654,12 @@ function Ji() {
|
|
|
3597
3654
|
title: L("MOD+\\", t.toolbar.shortcuts.clearFormatting),
|
|
3598
3655
|
type: "button",
|
|
3599
3656
|
className: "rj-editor-toolbar--clear-btn",
|
|
3600
|
-
children: /* @__PURE__ */ M(
|
|
3657
|
+
children: /* @__PURE__ */ M(Zi, {})
|
|
3601
3658
|
});
|
|
3602
3659
|
}
|
|
3603
3660
|
//#endregion
|
|
3604
3661
|
//#region src/components/toolbar/home/style-controls/font-family/FontFamilyControl.tsx
|
|
3605
|
-
function
|
|
3662
|
+
function $i() {
|
|
3606
3663
|
let [e] = P(), t = K(), n = W(), r = G((e) => e.toolbar);
|
|
3607
3664
|
return /* @__PURE__ */ M(E, {
|
|
3608
3665
|
"aria-label": t.toolbar.style.fontFamily,
|
|
@@ -3613,7 +3670,7 @@ function Yi() {
|
|
|
3613
3670
|
fontFamily: t
|
|
3614
3671
|
}));
|
|
3615
3672
|
},
|
|
3616
|
-
options:
|
|
3673
|
+
options: Jt.map((e) => ({
|
|
3617
3674
|
label: e,
|
|
3618
3675
|
value: e
|
|
3619
3676
|
})),
|
|
@@ -3622,16 +3679,16 @@ function Yi() {
|
|
|
3622
3679
|
size: "small",
|
|
3623
3680
|
title: t.toolbar.shortcuts.fontFamily,
|
|
3624
3681
|
value: r.fontFamily == "" ? void 0 : r.fontFamily,
|
|
3625
|
-
suffixIcon: /* @__PURE__ */ M(
|
|
3682
|
+
suffixIcon: /* @__PURE__ */ M(Ti, {})
|
|
3626
3683
|
});
|
|
3627
3684
|
}
|
|
3628
3685
|
//#endregion
|
|
3629
3686
|
//#region src/components/toolbar/home/style-controls/font-size/FontSizeControl.tsx
|
|
3630
|
-
function
|
|
3687
|
+
function ea(e) {
|
|
3631
3688
|
let t = Number.parseFloat(e);
|
|
3632
3689
|
return Number.isFinite(t) ? String(Number((t * 16).toFixed(2))) : e;
|
|
3633
3690
|
}
|
|
3634
|
-
function
|
|
3691
|
+
function ta() {
|
|
3635
3692
|
let [e] = P(), t = K(), n = W(), r = G((e) => e.toolbar);
|
|
3636
3693
|
return /* @__PURE__ */ M(E, {
|
|
3637
3694
|
"aria-label": t.toolbar.style.fontSize,
|
|
@@ -3642,8 +3699,8 @@ function Zi() {
|
|
|
3642
3699
|
fontSize: t
|
|
3643
3700
|
}));
|
|
3644
3701
|
},
|
|
3645
|
-
options:
|
|
3646
|
-
label:
|
|
3702
|
+
options: Yt.map((e) => ({
|
|
3703
|
+
label: ea(e),
|
|
3647
3704
|
value: e
|
|
3648
3705
|
})),
|
|
3649
3706
|
placeholder: t.toolbar.style.fontSizePlaceholder,
|
|
@@ -3651,12 +3708,12 @@ function Zi() {
|
|
|
3651
3708
|
size: "small",
|
|
3652
3709
|
title: t.toolbar.shortcuts.fontSize,
|
|
3653
3710
|
value: r.fontSize == "" ? void 0 : r.fontSize,
|
|
3654
|
-
suffixIcon: /* @__PURE__ */ M(
|
|
3711
|
+
suffixIcon: /* @__PURE__ */ M(Ti, {})
|
|
3655
3712
|
});
|
|
3656
3713
|
}
|
|
3657
3714
|
//#endregion
|
|
3658
3715
|
//#region src/components/toolbar/home/style-controls/text-color/TextColorControl.tsx
|
|
3659
|
-
function
|
|
3716
|
+
function na() {
|
|
3660
3717
|
let [e] = P(), t = K(), [n, r] = A(!1), [i, a] = A(null), o = W(), s = G((e) => e.toolbar), c = s.textColor, l = (t) => {
|
|
3661
3718
|
X(e, { color: t || null }), o(U({
|
|
3662
3719
|
...s,
|
|
@@ -3676,7 +3733,7 @@ function Qi() {
|
|
|
3676
3733
|
children: [/* @__PURE__ */ M("span", { className: "rj-editor-color-none" }), t.common.none]
|
|
3677
3734
|
})
|
|
3678
3735
|
},
|
|
3679
|
-
...
|
|
3736
|
+
...nn.map((e) => ({
|
|
3680
3737
|
key: e,
|
|
3681
3738
|
label: /* @__PURE__ */ N("button", {
|
|
3682
3739
|
className: "rj-editor-color-menu-item",
|
|
@@ -3700,7 +3757,7 @@ function Qi() {
|
|
|
3700
3757
|
children: [
|
|
3701
3758
|
/* @__PURE__ */ M("span", {
|
|
3702
3759
|
className: "rj-editor-color-swatch",
|
|
3703
|
-
style: { backgroundColor: c ||
|
|
3760
|
+
style: { backgroundColor: c || nn[0] }
|
|
3704
3761
|
}),
|
|
3705
3762
|
t.common.moreColors,
|
|
3706
3763
|
/* @__PURE__ */ M("input", {
|
|
@@ -3712,7 +3769,7 @@ function Qi() {
|
|
|
3712
3769
|
onClick: (e) => e.stopPropagation(),
|
|
3713
3770
|
onMouseDown: (e) => e.stopPropagation(),
|
|
3714
3771
|
type: "color",
|
|
3715
|
-
value: c ||
|
|
3772
|
+
value: c || nn[0]
|
|
3716
3773
|
})
|
|
3717
3774
|
]
|
|
3718
3775
|
})
|
|
@@ -3742,18 +3799,18 @@ function Qi() {
|
|
|
3742
3799
|
}
|
|
3743
3800
|
//#endregion
|
|
3744
3801
|
//#region src/components/toolbar/home/style-controls/StyleControls.tsx
|
|
3745
|
-
function
|
|
3802
|
+
function ra() {
|
|
3746
3803
|
return /* @__PURE__ */ N(j, { children: [
|
|
3747
|
-
/* @__PURE__ */ M(
|
|
3748
|
-
/* @__PURE__ */ M(
|
|
3749
|
-
/* @__PURE__ */ M(
|
|
3750
|
-
/* @__PURE__ */ M(
|
|
3751
|
-
/* @__PURE__ */ M(
|
|
3804
|
+
/* @__PURE__ */ M($i, {}),
|
|
3805
|
+
/* @__PURE__ */ M(ta, {}),
|
|
3806
|
+
/* @__PURE__ */ M(na, {}),
|
|
3807
|
+
/* @__PURE__ */ M(Xi, {}),
|
|
3808
|
+
/* @__PURE__ */ M(Qi, {})
|
|
3752
3809
|
] });
|
|
3753
3810
|
}
|
|
3754
3811
|
//#endregion
|
|
3755
3812
|
//#region src/assets/icons/StrikethroughIcon01.tsx
|
|
3756
|
-
function
|
|
3813
|
+
function ia(e) {
|
|
3757
3814
|
return /* @__PURE__ */ M("svg", {
|
|
3758
3815
|
width: "24",
|
|
3759
3816
|
height: "24",
|
|
@@ -3771,7 +3828,7 @@ function ea(e) {
|
|
|
3771
3828
|
}
|
|
3772
3829
|
//#endregion
|
|
3773
3830
|
//#region src/assets/icons/BoldIcon01.tsx
|
|
3774
|
-
function
|
|
3831
|
+
function aa(e) {
|
|
3775
3832
|
return /* @__PURE__ */ M("svg", {
|
|
3776
3833
|
width: "24",
|
|
3777
3834
|
height: "24",
|
|
@@ -3789,7 +3846,7 @@ function ta(e) {
|
|
|
3789
3846
|
}
|
|
3790
3847
|
//#endregion
|
|
3791
3848
|
//#region src/assets/icons/CodeSnippedIcon02.tsx
|
|
3792
|
-
function
|
|
3849
|
+
function oa(e) {
|
|
3793
3850
|
return /* @__PURE__ */ M("svg", {
|
|
3794
3851
|
width: "24",
|
|
3795
3852
|
height: "24",
|
|
@@ -3807,7 +3864,7 @@ function na(e) {
|
|
|
3807
3864
|
}
|
|
3808
3865
|
//#endregion
|
|
3809
3866
|
//#region src/assets/icons/ItalicIcon01.tsx
|
|
3810
|
-
function
|
|
3867
|
+
function sa(e) {
|
|
3811
3868
|
return /* @__PURE__ */ M("svg", {
|
|
3812
3869
|
width: "24",
|
|
3813
3870
|
height: "24",
|
|
@@ -3825,7 +3882,7 @@ function ra(e) {
|
|
|
3825
3882
|
}
|
|
3826
3883
|
//#endregion
|
|
3827
3884
|
//#region src/assets/icons/SubscriptIcon.tsx
|
|
3828
|
-
function
|
|
3885
|
+
function ca(e) {
|
|
3829
3886
|
return /* @__PURE__ */ M("svg", {
|
|
3830
3887
|
width: "24",
|
|
3831
3888
|
height: "24",
|
|
@@ -3843,7 +3900,7 @@ function ia(e) {
|
|
|
3843
3900
|
}
|
|
3844
3901
|
//#endregion
|
|
3845
3902
|
//#region src/assets/icons/SupscriptIcon.tsx
|
|
3846
|
-
function
|
|
3903
|
+
function la(e) {
|
|
3847
3904
|
return /* @__PURE__ */ N("svg", {
|
|
3848
3905
|
width: "24",
|
|
3849
3906
|
height: "24",
|
|
@@ -3866,7 +3923,7 @@ function aa(e) {
|
|
|
3866
3923
|
}
|
|
3867
3924
|
//#endregion
|
|
3868
3925
|
//#region src/assets/icons/UnderlineIcon01.tsx
|
|
3869
|
-
function
|
|
3926
|
+
function ua(e) {
|
|
3870
3927
|
return /* @__PURE__ */ M("svg", {
|
|
3871
3928
|
width: "24",
|
|
3872
3929
|
height: "24",
|
|
@@ -3884,7 +3941,7 @@ function oa(e) {
|
|
|
3884
3941
|
}
|
|
3885
3942
|
//#endregion
|
|
3886
3943
|
//#region src/components/toolbar/home/text-format/TextFormatControls.tsx
|
|
3887
|
-
function
|
|
3944
|
+
function da() {
|
|
3888
3945
|
let [e] = P(), t = K(), { isBold: n, isCode: r, isItalic: i, isStrikethrough: a, isSubscript: o, isSuperscript: s, isUnderline: c } = G((e) => e.toolbar);
|
|
3889
3946
|
return /* @__PURE__ */ N(j, { children: [
|
|
3890
3947
|
/* @__PURE__ */ M("button", {
|
|
@@ -3894,7 +3951,7 @@ function sa() {
|
|
|
3894
3951
|
onClick: () => e.dispatchCommand(S, "bold"),
|
|
3895
3952
|
title: L("MOD+B", t.toolbar.shortcuts.bold),
|
|
3896
3953
|
type: "button",
|
|
3897
|
-
children: /* @__PURE__ */ M(
|
|
3954
|
+
children: /* @__PURE__ */ M(aa, {})
|
|
3898
3955
|
}),
|
|
3899
3956
|
/* @__PURE__ */ M("button", {
|
|
3900
3957
|
"aria-label": t.toolbar.textFormat.italic,
|
|
@@ -3903,7 +3960,7 @@ function sa() {
|
|
|
3903
3960
|
onClick: () => e.dispatchCommand(S, "italic"),
|
|
3904
3961
|
title: L("MOD+I", t.toolbar.shortcuts.italic),
|
|
3905
3962
|
type: "button",
|
|
3906
|
-
children: /* @__PURE__ */ M(
|
|
3963
|
+
children: /* @__PURE__ */ M(sa, {})
|
|
3907
3964
|
}),
|
|
3908
3965
|
/* @__PURE__ */ M("button", {
|
|
3909
3966
|
"aria-label": t.toolbar.textFormat.underline,
|
|
@@ -3912,7 +3969,7 @@ function sa() {
|
|
|
3912
3969
|
onClick: () => e.dispatchCommand(S, "underline"),
|
|
3913
3970
|
title: L("MOD+U", t.toolbar.shortcuts.underline),
|
|
3914
3971
|
type: "button",
|
|
3915
|
-
children: /* @__PURE__ */ M(
|
|
3972
|
+
children: /* @__PURE__ */ M(ua, {})
|
|
3916
3973
|
}),
|
|
3917
3974
|
/* @__PURE__ */ M("button", {
|
|
3918
3975
|
"aria-label": t.toolbar.textFormat.strikethrough,
|
|
@@ -3921,7 +3978,7 @@ function sa() {
|
|
|
3921
3978
|
onClick: () => e.dispatchCommand(S, "strikethrough"),
|
|
3922
3979
|
title: L("MOD+SHIFT+X", t.toolbar.shortcuts.strikethrough),
|
|
3923
3980
|
type: "button",
|
|
3924
|
-
children: /* @__PURE__ */ M(
|
|
3981
|
+
children: /* @__PURE__ */ M(ia, { "aria-hidden": "true" })
|
|
3925
3982
|
}),
|
|
3926
3983
|
/* @__PURE__ */ M("button", {
|
|
3927
3984
|
"aria-label": t.toolbar.textFormat.code,
|
|
@@ -3930,7 +3987,7 @@ function sa() {
|
|
|
3930
3987
|
onClick: () => e.dispatchCommand(S, "code"),
|
|
3931
3988
|
title: t.toolbar.textFormat.code,
|
|
3932
3989
|
type: "button",
|
|
3933
|
-
children: /* @__PURE__ */ M(
|
|
3990
|
+
children: /* @__PURE__ */ M(oa, { "aria-hidden": "true" })
|
|
3934
3991
|
}),
|
|
3935
3992
|
/* @__PURE__ */ M("button", {
|
|
3936
3993
|
"aria-label": t.toolbar.textFormat.subscript,
|
|
@@ -3939,7 +3996,7 @@ function sa() {
|
|
|
3939
3996
|
onClick: () => e.dispatchCommand(S, "subscript"),
|
|
3940
3997
|
title: L("MOD+=", t.toolbar.shortcuts.subscript),
|
|
3941
3998
|
type: "button",
|
|
3942
|
-
children: /* @__PURE__ */ M(
|
|
3999
|
+
children: /* @__PURE__ */ M(ca, { "aria-hidden": "true" })
|
|
3943
4000
|
}),
|
|
3944
4001
|
/* @__PURE__ */ M("button", {
|
|
3945
4002
|
"aria-label": t.toolbar.textFormat.superscript,
|
|
@@ -3948,13 +4005,13 @@ function sa() {
|
|
|
3948
4005
|
onClick: () => e.dispatchCommand(S, "superscript"),
|
|
3949
4006
|
title: L("MOD+SHIFT+=", t.toolbar.shortcuts.superscript),
|
|
3950
4007
|
type: "button",
|
|
3951
|
-
children: /* @__PURE__ */ M(
|
|
4008
|
+
children: /* @__PURE__ */ M(la, { "aria-hidden": "true" })
|
|
3952
4009
|
})
|
|
3953
4010
|
] });
|
|
3954
4011
|
}
|
|
3955
4012
|
//#endregion
|
|
3956
4013
|
//#region src/components/toolbar/home/HomeToolbar.tsx
|
|
3957
|
-
function
|
|
4014
|
+
function fa({ editor: e }) {
|
|
3958
4015
|
return /* @__PURE__ */ N("div", {
|
|
3959
4016
|
className: "rj-editor-toolbar-panel rj-editor-toolbar-panel--home",
|
|
3960
4017
|
role: "tabpanel",
|
|
@@ -3963,19 +4020,19 @@ function ca({ editor: e }) {
|
|
|
3963
4020
|
children: [
|
|
3964
4021
|
/* @__PURE__ */ N("div", {
|
|
3965
4022
|
className: "rj-editor-toolbar-group",
|
|
3966
|
-
children: [/* @__PURE__ */ M(
|
|
4023
|
+
children: [/* @__PURE__ */ M(Ri, { editor: e }), /* @__PURE__ */ M(Fi, {})]
|
|
3967
4024
|
}),
|
|
3968
4025
|
/* @__PURE__ */ N("div", {
|
|
3969
4026
|
className: "rj-editor-toolbar-group",
|
|
3970
|
-
children: [/* @__PURE__ */ M(
|
|
4027
|
+
children: [/* @__PURE__ */ M(da, {}), /* @__PURE__ */ M(Fi, {})]
|
|
3971
4028
|
}),
|
|
3972
4029
|
/* @__PURE__ */ N("div", {
|
|
3973
4030
|
className: "rj-editor-toolbar-group",
|
|
3974
|
-
children: [/* @__PURE__ */ M(
|
|
4031
|
+
children: [/* @__PURE__ */ M(Ji, {}), /* @__PURE__ */ M(Fi, {})]
|
|
3975
4032
|
}),
|
|
3976
4033
|
/* @__PURE__ */ N("div", {
|
|
3977
4034
|
className: "rj-editor-toolbar-group",
|
|
3978
|
-
children: [/* @__PURE__ */ M(
|
|
4035
|
+
children: [/* @__PURE__ */ M(Pi, { editor: e }), /* @__PURE__ */ M(Fi, {})]
|
|
3979
4036
|
})
|
|
3980
4037
|
]
|
|
3981
4038
|
}), /* @__PURE__ */ N("div", {
|
|
@@ -3983,15 +4040,15 @@ function ca({ editor: e }) {
|
|
|
3983
4040
|
children: [
|
|
3984
4041
|
/* @__PURE__ */ N("div", {
|
|
3985
4042
|
className: "rj-editor-toolbar-group",
|
|
3986
|
-
children: [/* @__PURE__ */ M(
|
|
4043
|
+
children: [/* @__PURE__ */ M(ra, {}), /* @__PURE__ */ M(Fi, {})]
|
|
3987
4044
|
}),
|
|
3988
4045
|
/* @__PURE__ */ N("div", {
|
|
3989
4046
|
className: "rj-editor-toolbar-group",
|
|
3990
|
-
children: [/* @__PURE__ */ M(
|
|
4047
|
+
children: [/* @__PURE__ */ M(Gi, { editor: e }), /* @__PURE__ */ M(Fi, {})]
|
|
3991
4048
|
}),
|
|
3992
4049
|
/* @__PURE__ */ M("div", {
|
|
3993
4050
|
className: "rj-editor-toolbar-group",
|
|
3994
|
-
children: /* @__PURE__ */ M(
|
|
4051
|
+
children: /* @__PURE__ */ M(Vi, {})
|
|
3995
4052
|
})
|
|
3996
4053
|
]
|
|
3997
4054
|
})]
|
|
@@ -3999,7 +4056,7 @@ function ca({ editor: e }) {
|
|
|
3999
4056
|
}
|
|
4000
4057
|
//#endregion
|
|
4001
4058
|
//#region src/assets/icons/ImageIdentLeftIcon.tsx
|
|
4002
|
-
function
|
|
4059
|
+
function pa(e) {
|
|
4003
4060
|
return /* @__PURE__ */ M("svg", {
|
|
4004
4061
|
width: "24",
|
|
4005
4062
|
height: "24",
|
|
@@ -4017,7 +4074,7 @@ function la(e) {
|
|
|
4017
4074
|
}
|
|
4018
4075
|
//#endregion
|
|
4019
4076
|
//#region src/assets/icons/ImageWrapTopBottomIcon.tsx
|
|
4020
|
-
function
|
|
4077
|
+
function ma(e) {
|
|
4021
4078
|
return /* @__PURE__ */ N("svg", {
|
|
4022
4079
|
width: "24",
|
|
4023
4080
|
height: "24",
|
|
@@ -4049,7 +4106,7 @@ function ua(e) {
|
|
|
4049
4106
|
]
|
|
4050
4107
|
});
|
|
4051
4108
|
}
|
|
4052
|
-
var
|
|
4109
|
+
var ha = {
|
|
4053
4110
|
wrapper: "_wrapper_se0k7_1",
|
|
4054
4111
|
disabled: "_disabled_se0k7_23",
|
|
4055
4112
|
affix: "_affix_se0k7_28",
|
|
@@ -4058,9 +4115,9 @@ var da = {
|
|
|
4058
4115
|
};
|
|
4059
4116
|
//#endregion
|
|
4060
4117
|
//#region src/components/global/input-number/InputNumber.tsx
|
|
4061
|
-
function
|
|
4062
|
-
let p = O.useRef(null), m = typeof d == "number", [h, g] = O.useState(!1), [_, v] = O.useState(() =>
|
|
4063
|
-
let n =
|
|
4118
|
+
function ga({ className: e, decimalScale: t = 2, defaultValue: n, integerOnly: r = !1, locale: i = !1, max: a, min: o, onBlur: s, onChange: c, prefix: l, suffix: u, value: d, ...f }) {
|
|
4119
|
+
let p = O.useRef(null), m = typeof d == "number", [h, g] = O.useState(!1), [_, v] = O.useState(() => Dn(m ? d : n, i)), y = m && !h ? Dn(d, i) : _, b = (e) => {
|
|
4120
|
+
let n = Kt(e.target.value, t, r), s = Ft(n, i), l = Number(n);
|
|
4064
4121
|
v(s), n !== "" && n !== "." && Number.isFinite(l) && c?.(Tt(l, o, a));
|
|
4065
4122
|
}, x = (e) => {
|
|
4066
4123
|
g(!1);
|
|
@@ -4068,7 +4125,7 @@ function fa({ className: e, decimalScale: t = 2, defaultValue: n, integerOnly: r
|
|
|
4068
4125
|
if (t === "" || t === "." || !Number.isFinite(n)) v("");
|
|
4069
4126
|
else {
|
|
4070
4127
|
let e = Tt(n, o, a);
|
|
4071
|
-
v(
|
|
4128
|
+
v(Dn(e, i)), c?.(e);
|
|
4072
4129
|
}
|
|
4073
4130
|
s?.(e);
|
|
4074
4131
|
}, S = (e) => {
|
|
@@ -4080,8 +4137,8 @@ function fa({ className: e, decimalScale: t = 2, defaultValue: n, integerOnly: r
|
|
|
4080
4137
|
}, C = /* @__PURE__ */ M("input", {
|
|
4081
4138
|
...f,
|
|
4082
4139
|
className: [
|
|
4083
|
-
|
|
4084
|
-
l || u ?
|
|
4140
|
+
ha.input,
|
|
4141
|
+
l || u ? ha.inputAffix : "",
|
|
4085
4142
|
l || u ? "" : e
|
|
4086
4143
|
].filter(Boolean).join(" "),
|
|
4087
4144
|
inputMode: r ? "numeric" : "decimal",
|
|
@@ -4096,13 +4153,13 @@ function fa({ className: e, decimalScale: t = 2, defaultValue: n, integerOnly: r
|
|
|
4096
4153
|
});
|
|
4097
4154
|
return !l && !u ? C : /* @__PURE__ */ N("span", {
|
|
4098
4155
|
className: [
|
|
4099
|
-
|
|
4100
|
-
f.disabled ?
|
|
4156
|
+
ha.wrapper,
|
|
4157
|
+
f.disabled ? ha.disabled : "",
|
|
4101
4158
|
e
|
|
4102
4159
|
].filter(Boolean).join(" "),
|
|
4103
4160
|
children: [
|
|
4104
4161
|
l ? /* @__PURE__ */ M("span", {
|
|
4105
|
-
className:
|
|
4162
|
+
className: ha.affix,
|
|
4106
4163
|
onMouseDown: (e) => {
|
|
4107
4164
|
e.preventDefault(), S("start");
|
|
4108
4165
|
},
|
|
@@ -4110,7 +4167,7 @@ function fa({ className: e, decimalScale: t = 2, defaultValue: n, integerOnly: r
|
|
|
4110
4167
|
}) : null,
|
|
4111
4168
|
C,
|
|
4112
4169
|
u ? /* @__PURE__ */ M("span", {
|
|
4113
|
-
className:
|
|
4170
|
+
className: ha.affix,
|
|
4114
4171
|
onMouseDown: (e) => {
|
|
4115
4172
|
e.preventDefault(), S("end");
|
|
4116
4173
|
},
|
|
@@ -4133,8 +4190,8 @@ var Z = {
|
|
|
4133
4190
|
};
|
|
4134
4191
|
//#endregion
|
|
4135
4192
|
//#region src/components/global/modal/Modal.tsx
|
|
4136
|
-
function
|
|
4137
|
-
let c = K(), l =
|
|
4193
|
+
function _a({ cancelText: e, children: t, okText: n, onCancel: r, onOk: i, open: a, title: o, width: s = 420 }) {
|
|
4194
|
+
let c = K(), l = fr(), u = O.useRef(null), d = O.useRef({
|
|
4138
4195
|
x: 0,
|
|
4139
4196
|
y: 0
|
|
4140
4197
|
}), [f, p] = O.useState(null);
|
|
@@ -4208,7 +4265,7 @@ function pa({ cancelText: e, children: t, okText: n, onCancel: r, onOk: i, open:
|
|
|
4208
4265
|
e.stopPropagation();
|
|
4209
4266
|
},
|
|
4210
4267
|
type: "button",
|
|
4211
|
-
children: /* @__PURE__ */ M(
|
|
4268
|
+
children: /* @__PURE__ */ M(Zi, { "aria-hidden": "true" })
|
|
4212
4269
|
})]
|
|
4213
4270
|
}),
|
|
4214
4271
|
/* @__PURE__ */ M("div", {
|
|
@@ -4235,7 +4292,7 @@ function pa({ cancelText: e, children: t, okText: n, onCancel: r, onOk: i, open:
|
|
|
4235
4292
|
}
|
|
4236
4293
|
//#endregion
|
|
4237
4294
|
//#region src/components/toolbar/image/divider/ToolbarDivider.tsx
|
|
4238
|
-
function
|
|
4295
|
+
function va() {
|
|
4239
4296
|
return /* @__PURE__ */ M("span", {
|
|
4240
4297
|
className: "rj-editor-toolbar-divider",
|
|
4241
4298
|
"aria-hidden": "true"
|
|
@@ -4243,14 +4300,14 @@ function ma() {
|
|
|
4243
4300
|
}
|
|
4244
4301
|
//#endregion
|
|
4245
4302
|
//#region src/components/toolbar/image/utils.ts
|
|
4246
|
-
function
|
|
4303
|
+
function ya() {
|
|
4247
4304
|
let e = a();
|
|
4248
4305
|
if (!s(e)) return null;
|
|
4249
4306
|
let t = e.getNodes().find(Y);
|
|
4250
4307
|
return Y(t) ? t : null;
|
|
4251
4308
|
}
|
|
4252
|
-
function
|
|
4253
|
-
let e =
|
|
4309
|
+
function ba() {
|
|
4310
|
+
let e = ya();
|
|
4254
4311
|
return {
|
|
4255
4312
|
isImageSelected: !!e,
|
|
4256
4313
|
selectedImageAlignment: e?.getAlignment(),
|
|
@@ -4271,41 +4328,41 @@ function ga() {
|
|
|
4271
4328
|
}
|
|
4272
4329
|
function Q(e, t) {
|
|
4273
4330
|
e.update(() => {
|
|
4274
|
-
let e =
|
|
4331
|
+
let e = ya();
|
|
4275
4332
|
e && t(e);
|
|
4276
4333
|
}), e.focus();
|
|
4277
4334
|
}
|
|
4278
|
-
function
|
|
4335
|
+
function xa(e, t, n) {
|
|
4279
4336
|
e.update(() => {
|
|
4280
4337
|
let e = r(t);
|
|
4281
4338
|
Y(e) && n(e);
|
|
4282
4339
|
}), e.focus();
|
|
4283
4340
|
}
|
|
4284
|
-
function
|
|
4341
|
+
function Sa(e, t) {
|
|
4285
4342
|
Q(e, (e) => {
|
|
4286
4343
|
e.setAlignment(t);
|
|
4287
4344
|
});
|
|
4288
4345
|
}
|
|
4289
|
-
function
|
|
4346
|
+
function Ca(e, t) {
|
|
4290
4347
|
Q(e, (e) => {
|
|
4291
4348
|
e.setWidth(t);
|
|
4292
4349
|
});
|
|
4293
4350
|
}
|
|
4294
|
-
function
|
|
4351
|
+
function wa(e, t) {
|
|
4295
4352
|
Q(e, (e) => {
|
|
4296
4353
|
e.setTextWrap(t), t === "square" && e.getAlignment() === "center" && e.setAlignment("left");
|
|
4297
4354
|
let n = e.getParent();
|
|
4298
4355
|
n && !l(n) && n.insertBefore(e);
|
|
4299
4356
|
});
|
|
4300
4357
|
}
|
|
4301
|
-
function
|
|
4358
|
+
function Ta(e) {
|
|
4302
4359
|
Q(e, (e) => {
|
|
4303
4360
|
e.remove();
|
|
4304
4361
|
});
|
|
4305
4362
|
}
|
|
4306
4363
|
//#endregion
|
|
4307
4364
|
//#region src/assets/icons/BorderRadiusIcon.tsx
|
|
4308
|
-
function
|
|
4365
|
+
function Ea(e) {
|
|
4309
4366
|
return /* @__PURE__ */ M("svg", {
|
|
4310
4367
|
width: "24",
|
|
4311
4368
|
height: "24",
|
|
@@ -4322,7 +4379,7 @@ function Sa(e) {
|
|
|
4322
4379
|
}
|
|
4323
4380
|
//#endregion
|
|
4324
4381
|
//#region src/assets/icons/RefreshCcwIcon01.tsx
|
|
4325
|
-
function
|
|
4382
|
+
function Da(e) {
|
|
4326
4383
|
return /* @__PURE__ */ M("svg", {
|
|
4327
4384
|
width: "24",
|
|
4328
4385
|
height: "24",
|
|
@@ -4340,7 +4397,7 @@ function Ca(e) {
|
|
|
4340
4397
|
}
|
|
4341
4398
|
//#endregion
|
|
4342
4399
|
//#region src/assets/icons/RefreshCwIcon01.tsx
|
|
4343
|
-
function
|
|
4400
|
+
function Oa(e) {
|
|
4344
4401
|
return /* @__PURE__ */ M("svg", {
|
|
4345
4402
|
width: "24",
|
|
4346
4403
|
height: "24",
|
|
@@ -4358,7 +4415,7 @@ function wa(e) {
|
|
|
4358
4415
|
}
|
|
4359
4416
|
//#endregion
|
|
4360
4417
|
//#region src/components/toolbar/image/ImageToolbar.tsx
|
|
4361
|
-
function
|
|
4418
|
+
function ka() {
|
|
4362
4419
|
let [e] = P(), t = K(), n = O.useRef(null), { isImageSelected: r, selectedImageAlignment: i, selectedImageAltText: a, selectedImageBorderEnabled: o, selectedImageBorderRadius: s, selectedImageCaption: c, selectedImageKey: l, selectedImageLinkUrl: u, selectedImageObjectFit: d, selectedImageRotation: f, selectedImageShadowEnabled: p, selectedImageTextWrap: m, selectedImageWidth: h } = G((e) => e.toolbar), [g, _] = O.useState(null), [v, y] = O.useState(""), b = O.useMemo(() => [
|
|
4363
4420
|
{
|
|
4364
4421
|
label: t.toolbar.image.fitContain,
|
|
@@ -4412,40 +4469,40 @@ function Ta() {
|
|
|
4412
4469
|
"aria-label": t.toolbar.image.alignLeft,
|
|
4413
4470
|
className: i === "left" ? "is-active" : void 0,
|
|
4414
4471
|
disabled: !r,
|
|
4415
|
-
onClick: () =>
|
|
4472
|
+
onClick: () => Sa(e, "left"),
|
|
4416
4473
|
type: "button",
|
|
4417
|
-
children: /* @__PURE__ */ M(
|
|
4474
|
+
children: /* @__PURE__ */ M(Wr, { "aria-hidden": "true" })
|
|
4418
4475
|
}),
|
|
4419
4476
|
/* @__PURE__ */ M("button", {
|
|
4420
4477
|
"aria-label": t.toolbar.image.alignCenter,
|
|
4421
4478
|
className: i === "center" ? "is-active" : void 0,
|
|
4422
4479
|
disabled: !r,
|
|
4423
|
-
onClick: () =>
|
|
4480
|
+
onClick: () => Sa(e, "center"),
|
|
4424
4481
|
type: "button",
|
|
4425
|
-
children: /* @__PURE__ */ M(
|
|
4482
|
+
children: /* @__PURE__ */ M(Ur, { "aria-hidden": "true" })
|
|
4426
4483
|
}),
|
|
4427
4484
|
/* @__PURE__ */ M("button", {
|
|
4428
4485
|
"aria-label": t.toolbar.image.alignRight,
|
|
4429
4486
|
className: i === "right" ? "is-active" : void 0,
|
|
4430
4487
|
disabled: !r,
|
|
4431
|
-
onClick: () =>
|
|
4488
|
+
onClick: () => Sa(e, "right"),
|
|
4432
4489
|
type: "button",
|
|
4433
|
-
children: /* @__PURE__ */ M(
|
|
4490
|
+
children: /* @__PURE__ */ M(Gr, { "aria-hidden": "true" })
|
|
4434
4491
|
}),
|
|
4435
|
-
/* @__PURE__ */ M(
|
|
4492
|
+
/* @__PURE__ */ M(va, {})
|
|
4436
4493
|
]
|
|
4437
4494
|
}),
|
|
4438
4495
|
/* @__PURE__ */ N("div", {
|
|
4439
4496
|
className: "rj-editor-toolbar-group",
|
|
4440
4497
|
children: [
|
|
4441
|
-
/* @__PURE__ */ M(
|
|
4498
|
+
/* @__PURE__ */ M(ga, {
|
|
4442
4499
|
"aria-label": t.toolbar.image.width,
|
|
4443
4500
|
className: "rj-editor-image-width-input",
|
|
4444
4501
|
max: 100,
|
|
4445
4502
|
min: 10,
|
|
4446
4503
|
decimalScale: 3,
|
|
4447
4504
|
suffix: "%",
|
|
4448
|
-
onChange: (t) =>
|
|
4505
|
+
onChange: (t) => Ca(e, t),
|
|
4449
4506
|
value: h || 100
|
|
4450
4507
|
}),
|
|
4451
4508
|
[
|
|
@@ -4455,11 +4512,11 @@ function Ta() {
|
|
|
4455
4512
|
].map((t) => /* @__PURE__ */ N("button", {
|
|
4456
4513
|
className: h === t ? "is-active" : void 0,
|
|
4457
4514
|
disabled: !r,
|
|
4458
|
-
onClick: () =>
|
|
4515
|
+
onClick: () => Ca(e, t),
|
|
4459
4516
|
type: "button",
|
|
4460
4517
|
children: [t, "%"]
|
|
4461
4518
|
}, t)),
|
|
4462
|
-
/* @__PURE__ */ M(
|
|
4519
|
+
/* @__PURE__ */ M(va, {})
|
|
4463
4520
|
]
|
|
4464
4521
|
}),
|
|
4465
4522
|
/* @__PURE__ */ N("div", {
|
|
@@ -4485,7 +4542,7 @@ function Ta() {
|
|
|
4485
4542
|
type: "button",
|
|
4486
4543
|
children: t.toolbar.image.link
|
|
4487
4544
|
}),
|
|
4488
|
-
/* @__PURE__ */ M(
|
|
4545
|
+
/* @__PURE__ */ M(va, {})
|
|
4489
4546
|
]
|
|
4490
4547
|
})
|
|
4491
4548
|
]
|
|
@@ -4505,13 +4562,13 @@ function Ta() {
|
|
|
4505
4562
|
type: "button",
|
|
4506
4563
|
children: t.toolbar.image.border
|
|
4507
4564
|
}),
|
|
4508
|
-
/* @__PURE__ */ M(
|
|
4565
|
+
/* @__PURE__ */ M(ga, {
|
|
4509
4566
|
"aria-label": t.toolbar.image.borderRadius,
|
|
4510
4567
|
className: "rj-editor-image-border-radius-input",
|
|
4511
4568
|
integerOnly: !0,
|
|
4512
4569
|
max: 64,
|
|
4513
4570
|
min: 0,
|
|
4514
|
-
prefix: /* @__PURE__ */ M(
|
|
4571
|
+
prefix: /* @__PURE__ */ M(Ea, {}),
|
|
4515
4572
|
onChange: (t) => Q(e, (e) => e.setBorderRadius(t)),
|
|
4516
4573
|
value: s || 0
|
|
4517
4574
|
}),
|
|
@@ -4524,7 +4581,7 @@ function Ta() {
|
|
|
4524
4581
|
type: "button",
|
|
4525
4582
|
children: t.toolbar.image.shadow
|
|
4526
4583
|
}),
|
|
4527
|
-
/* @__PURE__ */ M(
|
|
4584
|
+
/* @__PURE__ */ M(va, {})
|
|
4528
4585
|
]
|
|
4529
4586
|
}),
|
|
4530
4587
|
/* @__PURE__ */ N("div", {
|
|
@@ -4537,42 +4594,42 @@ function Ta() {
|
|
|
4537
4594
|
onChange: (t) => Q(e, (e) => e.setObjectFit(t)),
|
|
4538
4595
|
options: b,
|
|
4539
4596
|
size: "small",
|
|
4540
|
-
suffixIcon: /* @__PURE__ */ M(
|
|
4597
|
+
suffixIcon: /* @__PURE__ */ M(Ti, {}),
|
|
4541
4598
|
value: d || "contain"
|
|
4542
4599
|
}),
|
|
4543
4600
|
/* @__PURE__ */ M("button", {
|
|
4544
4601
|
"aria-label": t.toolbar.image.topBottomWrap,
|
|
4545
4602
|
className: m === "top-bottom" ? "is-active" : void 0,
|
|
4546
4603
|
disabled: !r,
|
|
4547
|
-
onClick: () =>
|
|
4604
|
+
onClick: () => wa(e, "top-bottom"),
|
|
4548
4605
|
title: t.toolbar.image.topBottomWrap,
|
|
4549
4606
|
type: "button",
|
|
4550
|
-
children: /* @__PURE__ */ M(
|
|
4607
|
+
children: /* @__PURE__ */ M(ma, { "aria-hidden": "true" })
|
|
4551
4608
|
}),
|
|
4552
4609
|
/* @__PURE__ */ M("button", {
|
|
4553
4610
|
"aria-label": t.toolbar.image.squareWrap,
|
|
4554
4611
|
className: m === "square" ? "is-active" : void 0,
|
|
4555
4612
|
disabled: !r,
|
|
4556
|
-
onClick: () =>
|
|
4613
|
+
onClick: () => wa(e, "square"),
|
|
4557
4614
|
title: t.toolbar.image.squareWrap,
|
|
4558
4615
|
type: "button",
|
|
4559
|
-
children: /* @__PURE__ */ M(
|
|
4616
|
+
children: /* @__PURE__ */ M(pa, { "aria-hidden": "true" })
|
|
4560
4617
|
}),
|
|
4561
4618
|
/* @__PURE__ */ M("button", {
|
|
4562
4619
|
"aria-label": t.toolbar.image.rotateLeft,
|
|
4563
4620
|
disabled: !r,
|
|
4564
4621
|
onClick: () => Q(e, (e) => e.setRotation((f || 0) - 90)),
|
|
4565
4622
|
type: "button",
|
|
4566
|
-
children: /* @__PURE__ */ M(
|
|
4623
|
+
children: /* @__PURE__ */ M(Da, {})
|
|
4567
4624
|
}),
|
|
4568
4625
|
/* @__PURE__ */ M("button", {
|
|
4569
4626
|
"aria-label": t.toolbar.image.rotateRight,
|
|
4570
4627
|
disabled: !r,
|
|
4571
4628
|
onClick: () => Q(e, (e) => e.setRotation((f || 0) + 90)),
|
|
4572
4629
|
type: "button",
|
|
4573
|
-
children: /* @__PURE__ */ M(
|
|
4630
|
+
children: /* @__PURE__ */ M(Oa, {})
|
|
4574
4631
|
}),
|
|
4575
|
-
/* @__PURE__ */ M(
|
|
4632
|
+
/* @__PURE__ */ M(va, {})
|
|
4576
4633
|
]
|
|
4577
4634
|
}),
|
|
4578
4635
|
/* @__PURE__ */ N("div", {
|
|
@@ -4582,18 +4639,18 @@ function Ta() {
|
|
|
4582
4639
|
"aria-label": t.toolbar.image.replace,
|
|
4583
4640
|
disabled: !r,
|
|
4584
4641
|
onClick: () => {
|
|
4585
|
-
|
|
4642
|
+
Mn(n.current);
|
|
4586
4643
|
},
|
|
4587
4644
|
type: "button",
|
|
4588
|
-
children: /* @__PURE__ */ M(
|
|
4645
|
+
children: /* @__PURE__ */ M(qr, { "aria-hidden": "true" })
|
|
4589
4646
|
}),
|
|
4590
4647
|
/* @__PURE__ */ M("button", {
|
|
4591
4648
|
"aria-label": t.toolbar.image.delete,
|
|
4592
4649
|
className: "rj-editor-toolbar--clear-btn",
|
|
4593
4650
|
disabled: !r,
|
|
4594
|
-
onClick: () =>
|
|
4651
|
+
onClick: () => Ta(e),
|
|
4595
4652
|
type: "button",
|
|
4596
|
-
children: /* @__PURE__ */ M(
|
|
4653
|
+
children: /* @__PURE__ */ M(Kr, { "aria-hidden": "true" })
|
|
4597
4654
|
}),
|
|
4598
4655
|
/* @__PURE__ */ M("input", {
|
|
4599
4656
|
accept: "image/*",
|
|
@@ -4609,7 +4666,7 @@ function Ta() {
|
|
|
4609
4666
|
window.alert(t.alerts.imageSizeLimit);
|
|
4610
4667
|
return;
|
|
4611
4668
|
}
|
|
4612
|
-
let i = await
|
|
4669
|
+
let i = await Nn(r);
|
|
4613
4670
|
Q(e, (e) => {
|
|
4614
4671
|
e.setSrc(i), e.setAltText(r.name);
|
|
4615
4672
|
});
|
|
@@ -4621,7 +4678,7 @@ function Ta() {
|
|
|
4621
4678
|
})
|
|
4622
4679
|
]
|
|
4623
4680
|
}),
|
|
4624
|
-
/* @__PURE__ */ M(
|
|
4681
|
+
/* @__PURE__ */ M(_a, {
|
|
4625
4682
|
okText: t.common.save,
|
|
4626
4683
|
onCancel: C,
|
|
4627
4684
|
onOk: () => {
|
|
@@ -4630,7 +4687,7 @@ function Ta() {
|
|
|
4630
4687
|
return;
|
|
4631
4688
|
}
|
|
4632
4689
|
let t = v.trim();
|
|
4633
|
-
|
|
4690
|
+
xa(e, l, (e) => {
|
|
4634
4691
|
if (g === "alt") {
|
|
4635
4692
|
e.setAltText(t);
|
|
4636
4693
|
return;
|
|
@@ -4671,7 +4728,7 @@ function Ta() {
|
|
|
4671
4728
|
}
|
|
4672
4729
|
//#endregion
|
|
4673
4730
|
//#region src/components/toolbar/insert/divider/ToolbarDivider.tsx
|
|
4674
|
-
function
|
|
4731
|
+
function Aa() {
|
|
4675
4732
|
return /* @__PURE__ */ M("span", {
|
|
4676
4733
|
className: "rj-editor-toolbar-divider",
|
|
4677
4734
|
"aria-hidden": "true"
|
|
@@ -4679,7 +4736,7 @@ function Ea() {
|
|
|
4679
4736
|
}
|
|
4680
4737
|
//#endregion
|
|
4681
4738
|
//#region src/assets/icons/CodeSnippedIcon01.tsx
|
|
4682
|
-
function
|
|
4739
|
+
function ja(e) {
|
|
4683
4740
|
return /* @__PURE__ */ M("svg", {
|
|
4684
4741
|
width: "24",
|
|
4685
4742
|
height: "24",
|
|
@@ -4697,22 +4754,22 @@ function Da(e) {
|
|
|
4697
4754
|
}
|
|
4698
4755
|
//#endregion
|
|
4699
4756
|
//#region src/components/toolbar/insert/code-block/CodeBlockControl.tsx
|
|
4700
|
-
function
|
|
4757
|
+
function Ma() {
|
|
4701
4758
|
let [e] = P(), t = K();
|
|
4702
4759
|
return /* @__PURE__ */ M("button", {
|
|
4703
4760
|
"aria-label": t.toolbar.insert.codeBlock,
|
|
4704
4761
|
onClick: () => {
|
|
4705
|
-
e.dispatchCommand(
|
|
4762
|
+
e.dispatchCommand(Xt, { language: "plain" }), window.requestAnimationFrame(() => e.focus());
|
|
4706
4763
|
},
|
|
4707
4764
|
onMouseDown: (e) => e.preventDefault(),
|
|
4708
4765
|
title: t.toolbar.insert.codeBlock,
|
|
4709
4766
|
type: "button",
|
|
4710
|
-
children: /* @__PURE__ */ M(
|
|
4767
|
+
children: /* @__PURE__ */ M(ja, { "aria-hidden": "true" })
|
|
4711
4768
|
});
|
|
4712
4769
|
}
|
|
4713
4770
|
//#endregion
|
|
4714
4771
|
//#region src/assets/icons/ImageIcon03.tsx
|
|
4715
|
-
function
|
|
4772
|
+
function Na(e) {
|
|
4716
4773
|
return /* @__PURE__ */ M("svg", {
|
|
4717
4774
|
width: "24",
|
|
4718
4775
|
height: "24",
|
|
@@ -4730,19 +4787,19 @@ function ka(e) {
|
|
|
4730
4787
|
}
|
|
4731
4788
|
//#endregion
|
|
4732
4789
|
//#region src/components/toolbar/insert/image/ImageControl.tsx
|
|
4733
|
-
function
|
|
4790
|
+
function Pa() {
|
|
4734
4791
|
let [e] = P(), t = K(), n = O.useRef(null);
|
|
4735
4792
|
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("button", {
|
|
4736
4793
|
"aria-label": t.toolbar.insert.image,
|
|
4737
4794
|
onClick: () => {
|
|
4738
|
-
|
|
4795
|
+
Mn(n.current);
|
|
4739
4796
|
},
|
|
4740
4797
|
onMouseDown: (e) => {
|
|
4741
4798
|
e.preventDefault();
|
|
4742
4799
|
},
|
|
4743
4800
|
title: t.toolbar.insert.image,
|
|
4744
4801
|
type: "button",
|
|
4745
|
-
children: /* @__PURE__ */ M(
|
|
4802
|
+
children: /* @__PURE__ */ M(Na, {})
|
|
4746
4803
|
}), /* @__PURE__ */ M("input", {
|
|
4747
4804
|
accept: "image/*",
|
|
4748
4805
|
className: "rj-editor-hidden-file-input",
|
|
@@ -4760,8 +4817,8 @@ function Aa() {
|
|
|
4760
4817
|
window.alert(t.alerts.imageSizeLimit), e.focus();
|
|
4761
4818
|
return;
|
|
4762
4819
|
}
|
|
4763
|
-
let i = await
|
|
4764
|
-
e.dispatchCommand(
|
|
4820
|
+
let i = await Nn(r);
|
|
4821
|
+
e.dispatchCommand(Qt, {
|
|
4765
4822
|
altText: r.name,
|
|
4766
4823
|
src: i
|
|
4767
4824
|
}), e.focus();
|
|
@@ -4772,7 +4829,7 @@ function Aa() {
|
|
|
4772
4829
|
}
|
|
4773
4830
|
//#endregion
|
|
4774
4831
|
//#region src/assets/icons/AttachmentIcon01.tsx
|
|
4775
|
-
function
|
|
4832
|
+
function Fa(e) {
|
|
4776
4833
|
return /* @__PURE__ */ M("svg", {
|
|
4777
4834
|
width: "24",
|
|
4778
4835
|
height: "24",
|
|
@@ -4790,8 +4847,8 @@ function ja(e) {
|
|
|
4790
4847
|
}
|
|
4791
4848
|
//#endregion
|
|
4792
4849
|
//#region src/components/toolbar/insert/link/LinkControl.tsx
|
|
4793
|
-
var
|
|
4794
|
-
function
|
|
4850
|
+
var Ia = "noreferrer";
|
|
4851
|
+
function La({ enableShortcutListener: e = !0, showButton: t = !0 }) {
|
|
4795
4852
|
let [r] = P(), i = K(), [o, s] = O.useState(!1), [l, u] = O.useState(""), [d, f] = O.useState(""), [p, m] = O.useState(""), [h, g] = O.useState(!0), _ = O.useCallback(() => {
|
|
4796
4853
|
s(!1), r.focus();
|
|
4797
4854
|
}, [r]), v = O.useCallback(() => {
|
|
@@ -4804,8 +4861,8 @@ function Na({ enableShortcutListener: e = !0, showButton: t = !0 }) {
|
|
|
4804
4861
|
return O.useEffect(() => {
|
|
4805
4862
|
if (!e) return;
|
|
4806
4863
|
let t = () => v();
|
|
4807
|
-
return window.addEventListener(
|
|
4808
|
-
window.removeEventListener(
|
|
4864
|
+
return window.addEventListener(tn, t), () => {
|
|
4865
|
+
window.removeEventListener(tn, t);
|
|
4809
4866
|
};
|
|
4810
4867
|
}, [e, v]), /* @__PURE__ */ N(j, { children: [t ? /* @__PURE__ */ M("button", {
|
|
4811
4868
|
"aria-label": i.toolbar.insert.link,
|
|
@@ -4815,8 +4872,8 @@ function Na({ enableShortcutListener: e = !0, showButton: t = !0 }) {
|
|
|
4815
4872
|
},
|
|
4816
4873
|
title: L("MOD+K", i.toolbar.shortcuts.link),
|
|
4817
4874
|
type: "button",
|
|
4818
|
-
children: /* @__PURE__ */ M(
|
|
4819
|
-
}) : null, /* @__PURE__ */ M(
|
|
4875
|
+
children: /* @__PURE__ */ M(Fa, {})
|
|
4876
|
+
}) : null, /* @__PURE__ */ M(_a, {
|
|
4820
4877
|
okText: i.common.insert,
|
|
4821
4878
|
onCancel: _,
|
|
4822
4879
|
onOk: () => {
|
|
@@ -4826,7 +4883,7 @@ function Na({ enableShortcutListener: e = !0, showButton: t = !0 }) {
|
|
|
4826
4883
|
return;
|
|
4827
4884
|
}
|
|
4828
4885
|
let t = {
|
|
4829
|
-
rel:
|
|
4886
|
+
rel: Ia,
|
|
4830
4887
|
target: h ? "_blank" : null,
|
|
4831
4888
|
title: d.trim() || null,
|
|
4832
4889
|
url: we(e)
|
|
@@ -4908,7 +4965,7 @@ function Na({ enableShortcutListener: e = !0, showButton: t = !0 }) {
|
|
|
4908
4965
|
}
|
|
4909
4966
|
//#endregion
|
|
4910
4967
|
//#region src/assets/icons/LayoutGridIcon01.tsx
|
|
4911
|
-
function
|
|
4968
|
+
function Ra(e) {
|
|
4912
4969
|
return /* @__PURE__ */ M("svg", {
|
|
4913
4970
|
width: "24",
|
|
4914
4971
|
height: "24",
|
|
@@ -4926,8 +4983,8 @@ function Pa(e) {
|
|
|
4926
4983
|
}
|
|
4927
4984
|
//#endregion
|
|
4928
4985
|
//#region src/components/toolbar/insert/table/TableControl.tsx
|
|
4929
|
-
var
|
|
4930
|
-
function
|
|
4986
|
+
var za = 1, Ba = 20, Va = 8, Ha = 10;
|
|
4987
|
+
function Ua({ onTableInserted: e }) {
|
|
4931
4988
|
let [t] = P(), n = K(), r = O.useId(), i = O.useId(), [a, o] = O.useState(!1), [s, c] = O.useState(3), [l, u] = O.useState(3), [d, f] = O.useState(3), [p, m] = O.useState(3), [h, g] = O.useState(!0), _ = (n = s, r = l) => {
|
|
4932
4989
|
t.dispatchCommand(We, {
|
|
4933
4990
|
columns: String(r),
|
|
@@ -4951,7 +5008,7 @@ function za({ onTableInserted: e }) {
|
|
|
4951
5008
|
onMouseLeave: () => {
|
|
4952
5009
|
f(s), m(l);
|
|
4953
5010
|
},
|
|
4954
|
-
children: Array.from({ length:
|
|
5011
|
+
children: Array.from({ length: Va }).map((e, t) => /* @__PURE__ */ M(O.Fragment, { children: Array.from({ length: Ha }).map((e, r) => {
|
|
4955
5012
|
let i = t + 1, a = r + 1, o = i <= d && a <= p;
|
|
4956
5013
|
return /* @__PURE__ */ M("button", {
|
|
4957
5014
|
"aria-label": n.toolbar.table.insertTableSize.replace("{columns}", String(a)).replace("{rows}", String(i)),
|
|
@@ -4970,11 +5027,11 @@ function za({ onTableInserted: e }) {
|
|
|
4970
5027
|
children: [/* @__PURE__ */ M("label", {
|
|
4971
5028
|
htmlFor: r,
|
|
4972
5029
|
children: n.toolbar.table.rows
|
|
4973
|
-
}), /* @__PURE__ */ M(
|
|
5030
|
+
}), /* @__PURE__ */ M(ga, {
|
|
4974
5031
|
id: r,
|
|
4975
5032
|
integerOnly: !0,
|
|
4976
|
-
max:
|
|
4977
|
-
min:
|
|
5033
|
+
max: Ba,
|
|
5034
|
+
min: za,
|
|
4978
5035
|
onChange: c,
|
|
4979
5036
|
value: s
|
|
4980
5037
|
})]
|
|
@@ -4984,11 +5041,11 @@ function za({ onTableInserted: e }) {
|
|
|
4984
5041
|
children: [/* @__PURE__ */ M("label", {
|
|
4985
5042
|
htmlFor: i,
|
|
4986
5043
|
children: n.toolbar.table.columns
|
|
4987
|
-
}), /* @__PURE__ */ M(
|
|
5044
|
+
}), /* @__PURE__ */ M(ga, {
|
|
4988
5045
|
id: i,
|
|
4989
5046
|
integerOnly: !0,
|
|
4990
|
-
max:
|
|
4991
|
-
min:
|
|
5047
|
+
max: Ba,
|
|
5048
|
+
min: za,
|
|
4992
5049
|
onChange: u,
|
|
4993
5050
|
value: l
|
|
4994
5051
|
})]
|
|
@@ -5022,13 +5079,13 @@ function za({ onTableInserted: e }) {
|
|
|
5022
5079
|
},
|
|
5023
5080
|
title: n.toolbar.insert.table,
|
|
5024
5081
|
type: "button",
|
|
5025
|
-
children: /* @__PURE__ */ M(
|
|
5082
|
+
children: /* @__PURE__ */ M(Ra, {})
|
|
5026
5083
|
})
|
|
5027
5084
|
});
|
|
5028
5085
|
}
|
|
5029
5086
|
//#endregion
|
|
5030
5087
|
//#region src/assets/icons/YoutubeIcon.tsx
|
|
5031
|
-
function
|
|
5088
|
+
function Wa(e) {
|
|
5032
5089
|
return /* @__PURE__ */ N("svg", {
|
|
5033
5090
|
width: "24",
|
|
5034
5091
|
height: "24",
|
|
@@ -5052,7 +5109,7 @@ function Ba(e) {
|
|
|
5052
5109
|
}
|
|
5053
5110
|
//#endregion
|
|
5054
5111
|
//#region src/components/toolbar/insert/youtube/YouTubeControl.tsx
|
|
5055
|
-
function
|
|
5112
|
+
function Ga() {
|
|
5056
5113
|
let [e] = P(), t = K(), [n, r] = O.useState(!1), [i, a] = O.useState(""), [o, s] = O.useState(""), [c, l] = O.useState("");
|
|
5057
5114
|
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("button", {
|
|
5058
5115
|
"aria-label": t.toolbar.insert.youtube,
|
|
@@ -5064,19 +5121,19 @@ function Va() {
|
|
|
5064
5121
|
},
|
|
5065
5122
|
title: t.toolbar.insert.youtube,
|
|
5066
5123
|
type: "button",
|
|
5067
|
-
children: /* @__PURE__ */ M(
|
|
5068
|
-
}), /* @__PURE__ */ M(
|
|
5124
|
+
children: /* @__PURE__ */ M(Wa, { "aria-hidden": "true" })
|
|
5125
|
+
}), /* @__PURE__ */ M(_a, {
|
|
5069
5126
|
okText: t.common.insert,
|
|
5070
5127
|
onCancel: () => {
|
|
5071
5128
|
r(!1), l(""), e.focus();
|
|
5072
5129
|
},
|
|
5073
5130
|
onOk: () => {
|
|
5074
|
-
let n =
|
|
5131
|
+
let n = Rt(o);
|
|
5075
5132
|
if (!n) {
|
|
5076
5133
|
l(t.toolbar.youtube.invalidUrl);
|
|
5077
5134
|
return;
|
|
5078
5135
|
}
|
|
5079
|
-
e.dispatchCommand(
|
|
5136
|
+
e.dispatchCommand($t, {
|
|
5080
5137
|
title: i.trim(),
|
|
5081
5138
|
videoId: n
|
|
5082
5139
|
}), r(!1), l(""), e.focus();
|
|
@@ -5125,30 +5182,30 @@ function Va() {
|
|
|
5125
5182
|
}
|
|
5126
5183
|
//#endregion
|
|
5127
5184
|
//#region src/components/toolbar/insert/InsertToolbar.tsx
|
|
5128
|
-
function
|
|
5185
|
+
function Ka({ onTableInserted: e }) {
|
|
5129
5186
|
return /* @__PURE__ */ N("div", {
|
|
5130
5187
|
className: "rj-editor-toolbar-panel",
|
|
5131
5188
|
role: "tabpanel",
|
|
5132
5189
|
children: [/* @__PURE__ */ N("div", {
|
|
5133
5190
|
className: "rj-editor-toolbar-group",
|
|
5134
5191
|
children: [
|
|
5135
|
-
/* @__PURE__ */ M(
|
|
5136
|
-
/* @__PURE__ */ M(
|
|
5137
|
-
/* @__PURE__ */ M(
|
|
5192
|
+
/* @__PURE__ */ M(Ua, { onTableInserted: e }),
|
|
5193
|
+
/* @__PURE__ */ M(La, { enableShortcutListener: !1 }),
|
|
5194
|
+
/* @__PURE__ */ M(Aa, {})
|
|
5138
5195
|
]
|
|
5139
5196
|
}), /* @__PURE__ */ N("div", {
|
|
5140
5197
|
className: "rj-editor-toolbar-group",
|
|
5141
5198
|
children: [
|
|
5142
|
-
/* @__PURE__ */ M(
|
|
5143
|
-
/* @__PURE__ */ M(
|
|
5144
|
-
/* @__PURE__ */ M(
|
|
5199
|
+
/* @__PURE__ */ M(Pa, {}),
|
|
5200
|
+
/* @__PURE__ */ M(Ga, {}),
|
|
5201
|
+
/* @__PURE__ */ M(Ma, {})
|
|
5145
5202
|
]
|
|
5146
5203
|
})]
|
|
5147
5204
|
});
|
|
5148
5205
|
}
|
|
5149
5206
|
//#endregion
|
|
5150
5207
|
//#region src/components/toolbar/layout/LayoutToolbar.tsx
|
|
5151
|
-
function
|
|
5208
|
+
function qa() {
|
|
5152
5209
|
return /* @__PURE__ */ M("div", {
|
|
5153
5210
|
className: "rj-editor-toolbar-panel",
|
|
5154
5211
|
role: "tabpanel"
|
|
@@ -5156,7 +5213,7 @@ function Ua() {
|
|
|
5156
5213
|
}
|
|
5157
5214
|
//#endregion
|
|
5158
5215
|
//#region src/assets/icons/PaintPourIcon.tsx
|
|
5159
|
-
function
|
|
5216
|
+
function Ja(e) {
|
|
5160
5217
|
return /* @__PURE__ */ M("svg", {
|
|
5161
5218
|
width: "24",
|
|
5162
5219
|
height: "24",
|
|
@@ -5174,7 +5231,7 @@ function Wa(e) {
|
|
|
5174
5231
|
}
|
|
5175
5232
|
//#endregion
|
|
5176
5233
|
//#region src/assets/icons/VerticalAlignBottomIcon.tsx
|
|
5177
|
-
function
|
|
5234
|
+
function Ya(e) {
|
|
5178
5235
|
return /* @__PURE__ */ N("svg", {
|
|
5179
5236
|
width: "24",
|
|
5180
5237
|
height: "24",
|
|
@@ -5196,7 +5253,7 @@ function Ga(e) {
|
|
|
5196
5253
|
}
|
|
5197
5254
|
//#endregion
|
|
5198
5255
|
//#region src/assets/icons/VerticalAlignMiddleIcon.tsx
|
|
5199
|
-
function
|
|
5256
|
+
function Xa(e) {
|
|
5200
5257
|
return /* @__PURE__ */ N("svg", {
|
|
5201
5258
|
width: "24",
|
|
5202
5259
|
height: "24",
|
|
@@ -5218,7 +5275,7 @@ function Ka(e) {
|
|
|
5218
5275
|
}
|
|
5219
5276
|
//#endregion
|
|
5220
5277
|
//#region src/assets/icons/VerticalAlignTopIcon.tsx
|
|
5221
|
-
function
|
|
5278
|
+
function Za(e) {
|
|
5222
5279
|
return /* @__PURE__ */ N("svg", {
|
|
5223
5280
|
width: "24",
|
|
5224
5281
|
height: "24",
|
|
@@ -5240,30 +5297,30 @@ function qa(e) {
|
|
|
5240
5297
|
}
|
|
5241
5298
|
//#endregion
|
|
5242
5299
|
//#region src/components/toolbar/table/utils.ts
|
|
5243
|
-
function
|
|
5300
|
+
function Qa() {
|
|
5244
5301
|
let e = a();
|
|
5245
5302
|
return c(e) ? e.anchor.getNode() : Ve(e) ? r(e.anchor.key) : null;
|
|
5246
5303
|
}
|
|
5247
|
-
function
|
|
5304
|
+
function $a() {
|
|
5248
5305
|
let e = a();
|
|
5249
5306
|
if (Ve(e)) {
|
|
5250
5307
|
let t = e.getNodes().filter(ze);
|
|
5251
5308
|
return Array.from(new Map(t.map((e) => [e.getKey(), e])).values());
|
|
5252
5309
|
}
|
|
5253
|
-
let t =
|
|
5310
|
+
let t = Qa(), n = t ? mt(t, Ke) : null;
|
|
5254
5311
|
return n ? [n] : [];
|
|
5255
5312
|
}
|
|
5256
|
-
function
|
|
5313
|
+
function eo() {
|
|
5257
5314
|
let e = a();
|
|
5258
5315
|
if (Ve(e)) {
|
|
5259
5316
|
let t = r(e.tableKey);
|
|
5260
5317
|
return Be(t) ? t : null;
|
|
5261
5318
|
}
|
|
5262
|
-
let t =
|
|
5319
|
+
let t = Qa();
|
|
5263
5320
|
return t ? mt(t, qe) : null;
|
|
5264
5321
|
}
|
|
5265
|
-
function
|
|
5266
|
-
let e =
|
|
5322
|
+
function to() {
|
|
5323
|
+
let e = $a(), t = e[0];
|
|
5267
5324
|
return {
|
|
5268
5325
|
isInTable: e.length > 0,
|
|
5269
5326
|
selectedTableCellsCount: e.length,
|
|
@@ -5275,62 +5332,62 @@ function Za() {
|
|
|
5275
5332
|
function $(e, t) {
|
|
5276
5333
|
e.update(t), e.focus();
|
|
5277
5334
|
}
|
|
5278
|
-
function
|
|
5335
|
+
function no(e, t) {
|
|
5279
5336
|
$(e, () => {
|
|
5280
5337
|
Re(t);
|
|
5281
5338
|
});
|
|
5282
5339
|
}
|
|
5283
|
-
function
|
|
5340
|
+
function ro(e, t) {
|
|
5284
5341
|
$(e, () => {
|
|
5285
5342
|
Le(t);
|
|
5286
5343
|
});
|
|
5287
5344
|
}
|
|
5288
|
-
function
|
|
5345
|
+
function io(e) {
|
|
5289
5346
|
$(e, () => {
|
|
5290
5347
|
Pe();
|
|
5291
5348
|
});
|
|
5292
5349
|
}
|
|
5293
|
-
function
|
|
5350
|
+
function ao(e) {
|
|
5294
5351
|
$(e, () => {
|
|
5295
5352
|
Ne();
|
|
5296
5353
|
});
|
|
5297
5354
|
}
|
|
5298
|
-
function
|
|
5355
|
+
function oo(e) {
|
|
5299
5356
|
$(e, () => {
|
|
5300
|
-
let e =
|
|
5357
|
+
let e = eo();
|
|
5301
5358
|
if (!e) return;
|
|
5302
5359
|
let n = t();
|
|
5303
5360
|
e.insertAfter(n), e.remove(), n.select(), i().getChildrenSize() === 0 && i().append(t());
|
|
5304
5361
|
});
|
|
5305
5362
|
}
|
|
5306
|
-
function
|
|
5363
|
+
function so(e) {
|
|
5307
5364
|
$(e, () => {
|
|
5308
|
-
let e =
|
|
5365
|
+
let e = $a();
|
|
5309
5366
|
e.length > 1 && He(e);
|
|
5310
5367
|
});
|
|
5311
5368
|
}
|
|
5312
|
-
function
|
|
5369
|
+
function co(e) {
|
|
5313
5370
|
$(e, () => {
|
|
5314
5371
|
Ue();
|
|
5315
5372
|
});
|
|
5316
5373
|
}
|
|
5317
|
-
function
|
|
5374
|
+
function lo(e, t) {
|
|
5318
5375
|
$(e, () => {
|
|
5319
|
-
|
|
5376
|
+
$a().forEach((e) => {
|
|
5320
5377
|
e.setBackgroundColor(t);
|
|
5321
5378
|
});
|
|
5322
5379
|
});
|
|
5323
5380
|
}
|
|
5324
|
-
function
|
|
5381
|
+
function uo(e, t) {
|
|
5325
5382
|
$(e, () => {
|
|
5326
|
-
|
|
5383
|
+
$a().forEach((e) => {
|
|
5327
5384
|
e.setVerticalAlign(t);
|
|
5328
5385
|
});
|
|
5329
5386
|
});
|
|
5330
5387
|
}
|
|
5331
|
-
function
|
|
5388
|
+
function fo(e) {
|
|
5332
5389
|
$(e, () => {
|
|
5333
|
-
let e =
|
|
5390
|
+
let e = $a()[0];
|
|
5334
5391
|
if (!e) return;
|
|
5335
5392
|
let [, t] = Fe(e);
|
|
5336
5393
|
t.getChildren().forEach((e) => {
|
|
@@ -5338,9 +5395,9 @@ function so(e) {
|
|
|
5338
5395
|
});
|
|
5339
5396
|
});
|
|
5340
5397
|
}
|
|
5341
|
-
function
|
|
5398
|
+
function po(e) {
|
|
5342
5399
|
$(e, () => {
|
|
5343
|
-
let e =
|
|
5400
|
+
let e = $a()[0], t = eo(), n = e ? Ie(e) : null;
|
|
5344
5401
|
if (!e || !t || !n) return;
|
|
5345
5402
|
let [r] = Me(t, null, null), i = /* @__PURE__ */ new Set();
|
|
5346
5403
|
r.forEach((e) => {
|
|
@@ -5352,7 +5409,7 @@ function co(e) {
|
|
|
5352
5409
|
}
|
|
5353
5410
|
//#endregion
|
|
5354
5411
|
//#region src/components/toolbar/table/cell/CellControls.tsx
|
|
5355
|
-
function
|
|
5412
|
+
function mo() {
|
|
5356
5413
|
let [e] = P(), t = K(), [n, r] = A(!1), [i, a] = A(null), { isInTable: o, tableCellBackgroundColor: s, tableCellVerticalAlign: c } = G((e) => e.toolbar);
|
|
5357
5414
|
return /* @__PURE__ */ N(j, { children: [
|
|
5358
5415
|
/* @__PURE__ */ M(he, {
|
|
@@ -5363,7 +5420,7 @@ function lo() {
|
|
|
5363
5420
|
label: /* @__PURE__ */ N("button", {
|
|
5364
5421
|
className: "rj-editor-color-menu-item",
|
|
5365
5422
|
onClick: () => {
|
|
5366
|
-
|
|
5423
|
+
lo(e, null), r(!1);
|
|
5367
5424
|
},
|
|
5368
5425
|
type: "button",
|
|
5369
5426
|
children: [/* @__PURE__ */ M("span", { className: "rj-editor-color-none" }), t.common.none]
|
|
@@ -5375,7 +5432,7 @@ function lo() {
|
|
|
5375
5432
|
label: /* @__PURE__ */ N("button", {
|
|
5376
5433
|
className: "rj-editor-color-menu-item",
|
|
5377
5434
|
onClick: () => {
|
|
5378
|
-
|
|
5435
|
+
lo(e, t), r(!1);
|
|
5379
5436
|
},
|
|
5380
5437
|
type: "button",
|
|
5381
5438
|
children: [/* @__PURE__ */ M("span", {
|
|
@@ -5401,7 +5458,7 @@ function lo() {
|
|
|
5401
5458
|
"aria-label": t.common.moreColors,
|
|
5402
5459
|
className: "rj-editor-color-menu-input",
|
|
5403
5460
|
onChange: (t) => {
|
|
5404
|
-
|
|
5461
|
+
lo(e, t.target.value), a(t.target.value), r(!0);
|
|
5405
5462
|
},
|
|
5406
5463
|
onClick: (e) => e.stopPropagation(),
|
|
5407
5464
|
onMouseDown: (e) => e.stopPropagation(),
|
|
@@ -5414,7 +5471,7 @@ function lo() {
|
|
|
5414
5471
|
] },
|
|
5415
5472
|
onOpenChange: (t) => {
|
|
5416
5473
|
r(t), !t && i && (window.setTimeout(() => {
|
|
5417
|
-
|
|
5474
|
+
lo(e, i);
|
|
5418
5475
|
}), a(null));
|
|
5419
5476
|
},
|
|
5420
5477
|
open: n,
|
|
@@ -5427,66 +5484,66 @@ function lo() {
|
|
|
5427
5484
|
e.preventDefault();
|
|
5428
5485
|
},
|
|
5429
5486
|
type: "button",
|
|
5430
|
-
children: /* @__PURE__ */ M(
|
|
5487
|
+
children: /* @__PURE__ */ M(Ja, { "aria-hidden": "true" })
|
|
5431
5488
|
})
|
|
5432
5489
|
}),
|
|
5433
5490
|
/* @__PURE__ */ M("button", {
|
|
5434
5491
|
"aria-label": t.toolbar.table.alignTop,
|
|
5435
5492
|
className: c === "top" ? "is-active" : void 0,
|
|
5436
5493
|
disabled: !o,
|
|
5437
|
-
onClick: () =>
|
|
5494
|
+
onClick: () => uo(e, "top"),
|
|
5438
5495
|
type: "button",
|
|
5439
|
-
children: /* @__PURE__ */ M(
|
|
5496
|
+
children: /* @__PURE__ */ M(Za, { "aria-hidden": "true" })
|
|
5440
5497
|
}),
|
|
5441
5498
|
/* @__PURE__ */ M("button", {
|
|
5442
5499
|
"aria-label": t.toolbar.table.alignMiddle,
|
|
5443
5500
|
className: c === "middle" ? "is-active" : void 0,
|
|
5444
5501
|
disabled: !o,
|
|
5445
|
-
onClick: () =>
|
|
5502
|
+
onClick: () => uo(e, "middle"),
|
|
5446
5503
|
type: "button",
|
|
5447
|
-
children: /* @__PURE__ */ M(
|
|
5504
|
+
children: /* @__PURE__ */ M(Xa, { "aria-hidden": "true" })
|
|
5448
5505
|
}),
|
|
5449
5506
|
/* @__PURE__ */ M("button", {
|
|
5450
5507
|
"aria-label": t.toolbar.table.alignBottom,
|
|
5451
5508
|
className: c === "bottom" ? "is-active" : void 0,
|
|
5452
5509
|
disabled: !o,
|
|
5453
|
-
onClick: () =>
|
|
5510
|
+
onClick: () => uo(e, "bottom"),
|
|
5454
5511
|
type: "button",
|
|
5455
|
-
children: /* @__PURE__ */ M(
|
|
5512
|
+
children: /* @__PURE__ */ M(Ya, { "aria-hidden": "true" })
|
|
5456
5513
|
})
|
|
5457
5514
|
] });
|
|
5458
5515
|
}
|
|
5459
5516
|
//#endregion
|
|
5460
5517
|
//#region src/components/toolbar/table/columns/ColumnControls.tsx
|
|
5461
|
-
function
|
|
5518
|
+
function ho() {
|
|
5462
5519
|
let [e] = P(), t = K(), n = !G((e) => e.toolbar.isInTable);
|
|
5463
5520
|
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("button", {
|
|
5464
5521
|
"aria-label": t.toolbar.table.insertColumnLeft,
|
|
5465
5522
|
disabled: n,
|
|
5466
|
-
onClick: () =>
|
|
5523
|
+
onClick: () => ro(e, !1),
|
|
5467
5524
|
type: "button",
|
|
5468
5525
|
children: t.toolbar.table.columnLeft
|
|
5469
5526
|
}), /* @__PURE__ */ M("button", {
|
|
5470
5527
|
"aria-label": t.toolbar.table.insertColumnRight,
|
|
5471
5528
|
disabled: n,
|
|
5472
|
-
onClick: () =>
|
|
5529
|
+
onClick: () => ro(e, !0),
|
|
5473
5530
|
type: "button",
|
|
5474
5531
|
children: t.toolbar.table.columnRight
|
|
5475
5532
|
})] });
|
|
5476
5533
|
}
|
|
5477
5534
|
//#endregion
|
|
5478
5535
|
//#region src/components/toolbar/table/delete/DeleteTableControls.tsx
|
|
5479
|
-
function
|
|
5536
|
+
function go() {
|
|
5480
5537
|
let [e] = P(), t = K(), n = !G((e) => e.toolbar.isInTable);
|
|
5481
5538
|
return /* @__PURE__ */ N(j, { children: [
|
|
5482
5539
|
/* @__PURE__ */ N("button", {
|
|
5483
5540
|
"aria-label": t.toolbar.table.deleteRow,
|
|
5484
5541
|
className: "rj-editor-toolbar--clear-btn",
|
|
5485
5542
|
disabled: n,
|
|
5486
|
-
onClick: () =>
|
|
5543
|
+
onClick: () => io(e),
|
|
5487
5544
|
type: "button",
|
|
5488
5545
|
children: [
|
|
5489
|
-
/* @__PURE__ */ M(
|
|
5546
|
+
/* @__PURE__ */ M(Kr, { "aria-hidden": "true" }),
|
|
5490
5547
|
"\xA0",
|
|
5491
5548
|
t.toolbar.table.row
|
|
5492
5549
|
]
|
|
@@ -5495,10 +5552,10 @@ function fo() {
|
|
|
5495
5552
|
"aria-label": t.toolbar.table.deleteColumn,
|
|
5496
5553
|
className: "rj-editor-toolbar--clear-btn",
|
|
5497
5554
|
disabled: n,
|
|
5498
|
-
onClick: () =>
|
|
5555
|
+
onClick: () => ao(e),
|
|
5499
5556
|
type: "button",
|
|
5500
5557
|
children: [
|
|
5501
|
-
/* @__PURE__ */ M(
|
|
5558
|
+
/* @__PURE__ */ M(Kr, { "aria-hidden": "true" }),
|
|
5502
5559
|
"\xA0",
|
|
5503
5560
|
t.toolbar.table.column
|
|
5504
5561
|
]
|
|
@@ -5507,15 +5564,15 @@ function fo() {
|
|
|
5507
5564
|
"aria-label": t.toolbar.table.deleteTable,
|
|
5508
5565
|
className: "rj-editor-toolbar--clear-btn",
|
|
5509
5566
|
disabled: n,
|
|
5510
|
-
onClick: () =>
|
|
5567
|
+
onClick: () => oo(e),
|
|
5511
5568
|
type: "button",
|
|
5512
|
-
children: /* @__PURE__ */ M(
|
|
5569
|
+
children: /* @__PURE__ */ M(Kr, { "aria-hidden": "true" })
|
|
5513
5570
|
})
|
|
5514
5571
|
] });
|
|
5515
5572
|
}
|
|
5516
5573
|
//#endregion
|
|
5517
5574
|
//#region src/components/toolbar/table/divider/ToolbarDivider.tsx
|
|
5518
|
-
function
|
|
5575
|
+
function _o() {
|
|
5519
5576
|
return /* @__PURE__ */ M("span", {
|
|
5520
5577
|
className: "rj-editor-toolbar-divider",
|
|
5521
5578
|
"aria-hidden": "true"
|
|
@@ -5523,7 +5580,7 @@ function po() {
|
|
|
5523
5580
|
}
|
|
5524
5581
|
//#endregion
|
|
5525
5582
|
//#region src/assets/icons/ChevronSelectorHorizontalIcon.tsx
|
|
5526
|
-
function
|
|
5583
|
+
function vo(e) {
|
|
5527
5584
|
return /* @__PURE__ */ M("svg", {
|
|
5528
5585
|
width: "24",
|
|
5529
5586
|
height: "24",
|
|
@@ -5541,7 +5598,7 @@ function mo(e) {
|
|
|
5541
5598
|
}
|
|
5542
5599
|
//#endregion
|
|
5543
5600
|
//#region src/assets/icons/ChevronSelectorVerticalIcon.tsx
|
|
5544
|
-
function
|
|
5601
|
+
function yo(e) {
|
|
5545
5602
|
return /* @__PURE__ */ M("svg", {
|
|
5546
5603
|
width: "24",
|
|
5547
5604
|
height: "24",
|
|
@@ -5559,27 +5616,27 @@ function ho(e) {
|
|
|
5559
5616
|
}
|
|
5560
5617
|
//#endregion
|
|
5561
5618
|
//#region src/components/toolbar/table/header-cell/HeaderCellControls.tsx
|
|
5562
|
-
function
|
|
5619
|
+
function bo() {
|
|
5563
5620
|
let [e] = P(), t = K(), { isInTable: n } = G((e) => e.toolbar);
|
|
5564
5621
|
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N("button", {
|
|
5565
5622
|
"aria-label": t.toolbar.table.headerRow,
|
|
5566
5623
|
disabled: !n,
|
|
5567
|
-
onClick: () =>
|
|
5624
|
+
onClick: () => fo(e),
|
|
5568
5625
|
type: "button",
|
|
5569
5626
|
title: t.toolbar.table.headerRow,
|
|
5570
5627
|
children: [
|
|
5571
|
-
/* @__PURE__ */ M(
|
|
5628
|
+
/* @__PURE__ */ M(vo, {}),
|
|
5572
5629
|
" \xA0 ",
|
|
5573
5630
|
t.toolbar.table.header
|
|
5574
5631
|
]
|
|
5575
5632
|
}), /* @__PURE__ */ N("button", {
|
|
5576
5633
|
"aria-label": t.toolbar.table.header,
|
|
5577
5634
|
disabled: !n,
|
|
5578
|
-
onClick: () =>
|
|
5635
|
+
onClick: () => po(e),
|
|
5579
5636
|
type: "button",
|
|
5580
5637
|
title: t.toolbar.table.headerColumn,
|
|
5581
5638
|
children: [
|
|
5582
|
-
/* @__PURE__ */ M(
|
|
5639
|
+
/* @__PURE__ */ M(yo, {}),
|
|
5583
5640
|
" \xA0 ",
|
|
5584
5641
|
t.toolbar.table.header
|
|
5585
5642
|
]
|
|
@@ -5587,84 +5644,84 @@ function go() {
|
|
|
5587
5644
|
}
|
|
5588
5645
|
//#endregion
|
|
5589
5646
|
//#region src/components/toolbar/table/merge/MergeControls.tsx
|
|
5590
|
-
function
|
|
5647
|
+
function xo() {
|
|
5591
5648
|
let [e] = P(), t = K(), { isInTable: n, selectedTableCellsCount: r, tableHasMergedCell: i } = G((e) => e.toolbar);
|
|
5592
5649
|
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("button", {
|
|
5593
5650
|
"aria-label": t.toolbar.table.mergeCells,
|
|
5594
5651
|
disabled: !n || r < 2,
|
|
5595
|
-
onClick: () =>
|
|
5652
|
+
onClick: () => so(e),
|
|
5596
5653
|
type: "button",
|
|
5597
5654
|
children: t.toolbar.table.mergeCells
|
|
5598
5655
|
}), /* @__PURE__ */ M("button", {
|
|
5599
5656
|
"aria-label": t.toolbar.table.unmergeCell,
|
|
5600
5657
|
disabled: !n || !i,
|
|
5601
|
-
onClick: () =>
|
|
5658
|
+
onClick: () => co(e),
|
|
5602
5659
|
type: "button",
|
|
5603
5660
|
children: t.toolbar.table.unmergeCell
|
|
5604
5661
|
})] });
|
|
5605
5662
|
}
|
|
5606
5663
|
//#endregion
|
|
5607
5664
|
//#region src/components/toolbar/table/rows/RowControls.tsx
|
|
5608
|
-
function
|
|
5665
|
+
function So() {
|
|
5609
5666
|
let [e] = P(), t = K(), n = !G((e) => e.toolbar.isInTable);
|
|
5610
5667
|
return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("button", {
|
|
5611
5668
|
"aria-label": t.toolbar.table.insertRowAbove,
|
|
5612
5669
|
disabled: n,
|
|
5613
|
-
onClick: () =>
|
|
5670
|
+
onClick: () => no(e, !1),
|
|
5614
5671
|
type: "button",
|
|
5615
5672
|
children: t.toolbar.table.rowAbove
|
|
5616
5673
|
}), /* @__PURE__ */ M("button", {
|
|
5617
5674
|
"aria-label": t.toolbar.table.insertRowBelow,
|
|
5618
5675
|
disabled: n,
|
|
5619
|
-
onClick: () =>
|
|
5676
|
+
onClick: () => no(e, !0),
|
|
5620
5677
|
type: "button",
|
|
5621
5678
|
children: t.toolbar.table.rowBelow
|
|
5622
5679
|
})] });
|
|
5623
5680
|
}
|
|
5624
5681
|
//#endregion
|
|
5625
5682
|
//#region src/components/toolbar/table/TableToolbar.tsx
|
|
5626
|
-
function
|
|
5683
|
+
function Co() {
|
|
5627
5684
|
return /* @__PURE__ */ N("div", {
|
|
5628
5685
|
className: "rj-editor-toolbar-panel",
|
|
5629
5686
|
role: "tabpanel",
|
|
5630
5687
|
children: [
|
|
5631
5688
|
/* @__PURE__ */ N("div", {
|
|
5632
5689
|
className: "rj-editor-toolbar-group",
|
|
5633
|
-
children: [/* @__PURE__ */ M(
|
|
5690
|
+
children: [/* @__PURE__ */ M(So, {}), /* @__PURE__ */ M(_o, {})]
|
|
5634
5691
|
}),
|
|
5635
5692
|
/* @__PURE__ */ N("div", {
|
|
5636
5693
|
className: "rj-editor-toolbar-group",
|
|
5637
|
-
children: [/* @__PURE__ */ M(
|
|
5694
|
+
children: [/* @__PURE__ */ M(ho, {}), /* @__PURE__ */ M(_o, {})]
|
|
5638
5695
|
}),
|
|
5639
5696
|
/* @__PURE__ */ N("div", {
|
|
5640
5697
|
className: "rj-editor-toolbar-group",
|
|
5641
|
-
children: [/* @__PURE__ */ M(
|
|
5698
|
+
children: [/* @__PURE__ */ M(xo, {}), /* @__PURE__ */ M(_o, {})]
|
|
5642
5699
|
}),
|
|
5643
5700
|
/* @__PURE__ */ N("div", {
|
|
5644
5701
|
className: "rj-editor-toolbar-group",
|
|
5645
|
-
children: [/* @__PURE__ */ M(
|
|
5702
|
+
children: [/* @__PURE__ */ M(mo, {}), /* @__PURE__ */ M(_o, {})]
|
|
5646
5703
|
}),
|
|
5647
5704
|
/* @__PURE__ */ N("div", {
|
|
5648
5705
|
className: "rj-editor-toolbar-group",
|
|
5649
|
-
children: [/* @__PURE__ */ M(
|
|
5706
|
+
children: [/* @__PURE__ */ M(bo, {}), /* @__PURE__ */ M(_o, {})]
|
|
5650
5707
|
}),
|
|
5651
5708
|
/* @__PURE__ */ M("div", {
|
|
5652
5709
|
className: "rj-editor-toolbar-group",
|
|
5653
|
-
children: /* @__PURE__ */ M(
|
|
5710
|
+
children: /* @__PURE__ */ M(go, {})
|
|
5654
5711
|
})
|
|
5655
5712
|
]
|
|
5656
5713
|
});
|
|
5657
5714
|
}
|
|
5658
5715
|
//#endregion
|
|
5659
5716
|
//#region src/components/toolbar/equation/utils.ts
|
|
5660
|
-
function
|
|
5717
|
+
function wo() {
|
|
5661
5718
|
let e = a();
|
|
5662
5719
|
if (!s(e)) return null;
|
|
5663
|
-
let t = e.getNodes().find(
|
|
5664
|
-
return
|
|
5720
|
+
let t = e.getNodes().find(Pr);
|
|
5721
|
+
return Pr(t) ? t : null;
|
|
5665
5722
|
}
|
|
5666
|
-
function
|
|
5667
|
-
let e =
|
|
5723
|
+
function To() {
|
|
5724
|
+
let e = wo();
|
|
5668
5725
|
return {
|
|
5669
5726
|
isEquationSelected: !!e,
|
|
5670
5727
|
selectedEquation: e?.getEquation(),
|
|
@@ -5674,7 +5731,7 @@ function xo() {
|
|
|
5674
5731
|
}
|
|
5675
5732
|
//#endregion
|
|
5676
5733
|
//#region src/assets/icons/MaximizeIcon02.tsx
|
|
5677
|
-
function
|
|
5734
|
+
function Eo(e) {
|
|
5678
5735
|
return /* @__PURE__ */ M("svg", {
|
|
5679
5736
|
width: "24",
|
|
5680
5737
|
height: "24",
|
|
@@ -5692,7 +5749,7 @@ function So(e) {
|
|
|
5692
5749
|
}
|
|
5693
5750
|
//#endregion
|
|
5694
5751
|
//#region src/assets/icons/MinimizeIcon02.tsx
|
|
5695
|
-
function
|
|
5752
|
+
function Do(e) {
|
|
5696
5753
|
return /* @__PURE__ */ M("svg", {
|
|
5697
5754
|
width: "24",
|
|
5698
5755
|
height: "24",
|
|
@@ -5710,21 +5767,21 @@ function Co(e) {
|
|
|
5710
5767
|
}
|
|
5711
5768
|
//#endregion
|
|
5712
5769
|
//#region src/components/toolbar/Toolbar.tsx
|
|
5713
|
-
var
|
|
5770
|
+
var Oo = [
|
|
5714
5771
|
{ value: "home" },
|
|
5715
5772
|
{ value: "insert" },
|
|
5716
5773
|
{ value: "equation" },
|
|
5717
5774
|
{ value: "image" },
|
|
5718
5775
|
{ value: "table" }
|
|
5719
5776
|
];
|
|
5720
|
-
function
|
|
5721
|
-
let [n] = P(), r = K(), [i, o] = O.useState("home"), s = W(), l = G((e) => e.toolbar.isEquationSelected), u = G((e) => e.toolbar.isImageSelected), d = G((e) => e.toolbar.isInTable), f = l ? "equation" : u ? "image" : i === "table" && !d || i === "image" && !u || i === "equation" && !l ? "home" : i, h =
|
|
5777
|
+
function ko({ isFullscreen: e, onToggleFullscreen: t }) {
|
|
5778
|
+
let [n] = P(), r = K(), [i, o] = O.useState("home"), s = W(), l = G((e) => e.toolbar.isEquationSelected), u = G((e) => e.toolbar.isImageSelected), d = G((e) => e.toolbar.isInTable), f = l ? "equation" : u ? "image" : i === "table" && !d || i === "image" && !u || i === "equation" && !l ? "home" : i, h = Oo.filter((e) => (e.value !== "table" || d) && (e.value !== "equation" || l) && (e.value !== "image" || u));
|
|
5722
5779
|
return O.useEffect(() => {
|
|
5723
5780
|
let e = () => {
|
|
5724
|
-
let e = a(), t =
|
|
5725
|
-
if (s(
|
|
5781
|
+
let e = a(), t = To(), n = ba(), r = to();
|
|
5782
|
+
if (s(Jn(t)), s(Yn(n)), s(Xn(r)), !c(e)) return;
|
|
5726
5783
|
let i = e.anchor.getNode(), o = i.getTopLevelElementOrThrow(), l = mt(i, Ae);
|
|
5727
|
-
s(
|
|
5784
|
+
s(Zn({
|
|
5728
5785
|
isBold: e.hasFormat("bold"),
|
|
5729
5786
|
isCode: e.hasFormat("code"),
|
|
5730
5787
|
isItalic: e.hasFormat("italic"),
|
|
@@ -5734,17 +5791,17 @@ function To({ isFullscreen: e, onToggleFullscreen: t }) {
|
|
|
5734
5791
|
isUnderline: e.hasFormat("underline")
|
|
5735
5792
|
})), s(U({
|
|
5736
5793
|
backgroundColor: dt(e, "background-color", ""),
|
|
5737
|
-
fontFamily:
|
|
5738
|
-
fontSize:
|
|
5794
|
+
fontFamily: an(dt(e, "font-family", "")),
|
|
5795
|
+
fontSize: sn(dt(e, "font-size", "")),
|
|
5739
5796
|
lineHeight: dt(e, "line-height", "") || void 0,
|
|
5740
5797
|
textColor: dt(e, "color", "")
|
|
5741
|
-
})), s(
|
|
5798
|
+
})), s(Gn({
|
|
5742
5799
|
alignment: o.getFormatType(),
|
|
5743
5800
|
listType: Te(l) ? l.getListType() : void 0
|
|
5744
5801
|
}));
|
|
5745
5802
|
}, t = n.registerCommand(oe, () => (n.getEditorState().read(e), !1), _), r = n.registerUpdateListener(({ editorState: t }) => {
|
|
5746
5803
|
t.read(e);
|
|
5747
|
-
}), i = n.registerCommand(m, (e) => (s(
|
|
5804
|
+
}), i = n.registerCommand(m, (e) => (s(qn(e)), !1), _), o = n.registerCommand(p, (e) => (s(Kn(e)), !1), _);
|
|
5748
5805
|
return () => {
|
|
5749
5806
|
t(), r(), i(), o();
|
|
5750
5807
|
};
|
|
@@ -5777,24 +5834,24 @@ function To({ isFullscreen: e, onToggleFullscreen: t }) {
|
|
|
5777
5834
|
className: "rj-editor-toolbar-fullscreen",
|
|
5778
5835
|
onClick: t,
|
|
5779
5836
|
type: "button",
|
|
5780
|
-
children: M(e ?
|
|
5837
|
+
children: M(e ? Do : Eo, { "aria-hidden": "true" })
|
|
5781
5838
|
})]
|
|
5782
5839
|
}),
|
|
5783
|
-
f === "home" ? /* @__PURE__ */ M(
|
|
5784
|
-
f === "image" ? /* @__PURE__ */ M(
|
|
5785
|
-
f === "insert" ? /* @__PURE__ */ M(
|
|
5786
|
-
f === "table" ? /* @__PURE__ */ M(
|
|
5787
|
-
f === "layout" ? /* @__PURE__ */ M(
|
|
5788
|
-
/* @__PURE__ */ M(
|
|
5840
|
+
f === "home" ? /* @__PURE__ */ M(fa, { editor: n }) : null,
|
|
5841
|
+
f === "image" ? /* @__PURE__ */ M(ka, {}) : null,
|
|
5842
|
+
f === "insert" ? /* @__PURE__ */ M(Ka, { onTableInserted: () => o("table") }) : null,
|
|
5843
|
+
f === "table" ? /* @__PURE__ */ M(Co, {}) : null,
|
|
5844
|
+
f === "layout" ? /* @__PURE__ */ M(qa, {}) : null,
|
|
5845
|
+
/* @__PURE__ */ M(La, { showButton: !1 })
|
|
5789
5846
|
]
|
|
5790
5847
|
});
|
|
5791
5848
|
}
|
|
5792
5849
|
//#endregion
|
|
5793
5850
|
//#region src/plugins/EquationPlugin.tsx
|
|
5794
|
-
function
|
|
5851
|
+
function Ao() {
|
|
5795
5852
|
let [n] = P();
|
|
5796
|
-
return k(() => n.registerCommand(
|
|
5797
|
-
let r =
|
|
5853
|
+
return k(() => n.registerCommand(Zt, (n) => {
|
|
5854
|
+
let r = Nr(n);
|
|
5798
5855
|
ht(r), n.displayMode !== "inline" && r.insertAfter(t());
|
|
5799
5856
|
let i = e();
|
|
5800
5857
|
return i.add(r.getKey()), f(i), !0;
|
|
@@ -5802,10 +5859,10 @@ function Eo() {
|
|
|
5802
5859
|
}
|
|
5803
5860
|
//#endregion
|
|
5804
5861
|
//#region src/plugins/CodeBlockPlugin.tsx
|
|
5805
|
-
function
|
|
5862
|
+
function jo() {
|
|
5806
5863
|
let [e] = P();
|
|
5807
5864
|
return O.useEffect(() => {
|
|
5808
|
-
let r = et(e), a = e.registerCommand(
|
|
5865
|
+
let r = et(e), a = e.registerCommand(Xt, ({ code: e = "", language: r }) => {
|
|
5809
5866
|
let i = Ye(r);
|
|
5810
5867
|
return e && i.append(n(e)), ht(i), i.insertAfter(t()), i.selectEnd(), !0;
|
|
5811
5868
|
}, g), o = e.registerUpdateListener(({ editorState: n }) => {
|
|
@@ -5824,7 +5881,7 @@ function Do() {
|
|
|
5824
5881
|
}
|
|
5825
5882
|
//#endregion
|
|
5826
5883
|
//#region src/plugins/ImagePlugin.tsx
|
|
5827
|
-
function
|
|
5884
|
+
function Mo(e, t) {
|
|
5828
5885
|
let n = /* @__PURE__ */ new Map();
|
|
5829
5886
|
return Array.from(e || []).forEach((e) => {
|
|
5830
5887
|
e.type.startsWith("image/") && n.set(`${e.name}-${e.size}-${e.lastModified}`, e);
|
|
@@ -5834,31 +5891,31 @@ function Oo(e, t) {
|
|
|
5834
5891
|
t && n.set(`${t.name}-${t.size}-${t.lastModified}`, t);
|
|
5835
5892
|
}), Array.from(n.values());
|
|
5836
5893
|
}
|
|
5837
|
-
async function
|
|
5894
|
+
async function No(e, t) {
|
|
5838
5895
|
if (e.size > 5242880) return window.alert(t), null;
|
|
5839
|
-
let n = await
|
|
5896
|
+
let n = await Nn(e);
|
|
5840
5897
|
return {
|
|
5841
5898
|
altText: e.name,
|
|
5842
5899
|
src: n
|
|
5843
5900
|
};
|
|
5844
5901
|
}
|
|
5845
|
-
function
|
|
5902
|
+
function Po() {
|
|
5846
5903
|
let [e] = P(), n = K();
|
|
5847
5904
|
return k(() => {
|
|
5848
5905
|
let r = async (t) => {
|
|
5849
5906
|
for (let r of t) {
|
|
5850
|
-
let t = await
|
|
5851
|
-
t && e.dispatchCommand(
|
|
5907
|
+
let t = await No(r, n.alerts.imageSizeLimit);
|
|
5908
|
+
t && e.dispatchCommand(Qt, t);
|
|
5852
5909
|
}
|
|
5853
|
-
}, i = e.registerCommand(
|
|
5854
|
-
let n =
|
|
5910
|
+
}, i = e.registerCommand(Qt, (e) => {
|
|
5911
|
+
let n = hi(e);
|
|
5855
5912
|
return ht(n), n.insertAfter(t()), !0;
|
|
5856
5913
|
}, g), a = e.registerCommand(ie, (e) => {
|
|
5857
5914
|
if (!(e instanceof ClipboardEvent)) return !1;
|
|
5858
|
-
let t =
|
|
5915
|
+
let t = Mo(e.clipboardData?.files, e.clipboardData?.items);
|
|
5859
5916
|
return t.length === 0 ? !1 : (e.preventDefault(), r(t), !0);
|
|
5860
|
-
}, _), o = e.registerCommand(v, (e) =>
|
|
5861
|
-
let t =
|
|
5917
|
+
}, _), o = e.registerCommand(v, (e) => Mo(e.dataTransfer?.files, e.dataTransfer?.items).length === 0 ? !1 : (e.preventDefault(), !0), _), s = e.registerCommand(y, (e) => {
|
|
5918
|
+
let t = Mo(e.dataTransfer?.files, e.dataTransfer?.items);
|
|
5862
5919
|
return t.length === 0 ? !1 : (e.preventDefault(), r(t), !0);
|
|
5863
5920
|
}, _);
|
|
5864
5921
|
return () => {
|
|
@@ -5868,21 +5925,21 @@ function Ao() {
|
|
|
5868
5925
|
}
|
|
5869
5926
|
//#endregion
|
|
5870
5927
|
//#region src/plugins/KeyboardShortcutsPlugin.tsx
|
|
5871
|
-
function
|
|
5928
|
+
function Fo(e) {
|
|
5872
5929
|
return e.metaKey || e.ctrlKey;
|
|
5873
5930
|
}
|
|
5874
|
-
function
|
|
5931
|
+
function Io(e) {
|
|
5875
5932
|
return e instanceof HTMLElement ? [
|
|
5876
5933
|
"INPUT",
|
|
5877
5934
|
"SELECT",
|
|
5878
5935
|
"TEXTAREA"
|
|
5879
5936
|
].includes(e.tagName) : !1;
|
|
5880
5937
|
}
|
|
5881
|
-
function
|
|
5938
|
+
function Lo() {
|
|
5882
5939
|
let [e] = P(), t = W();
|
|
5883
5940
|
return k(() => {
|
|
5884
5941
|
let n = () => {
|
|
5885
|
-
|
|
5942
|
+
qi(e), t(Zn({
|
|
5886
5943
|
isBold: !1,
|
|
5887
5944
|
isCode: !1,
|
|
5888
5945
|
isItalic: !1,
|
|
@@ -5896,62 +5953,62 @@ function No() {
|
|
|
5896
5953
|
fontSize: B.fontSize,
|
|
5897
5954
|
lineHeight: B.lineHeight,
|
|
5898
5955
|
textColor: B.textColor
|
|
5899
|
-
})), t(
|
|
5956
|
+
})), t(Gn({
|
|
5900
5957
|
alignment: B.alignment,
|
|
5901
5958
|
listType: B.listType
|
|
5902
5959
|
}));
|
|
5903
5960
|
};
|
|
5904
5961
|
return e.registerCommand(ne, (t) => {
|
|
5905
|
-
if (!
|
|
5962
|
+
if (!Fo(t) || t.altKey || Io(t.target)) return !1;
|
|
5906
5963
|
let r = t.key.toLowerCase(), i = t.shiftKey;
|
|
5907
|
-
return r === "b" && !i ? (t.preventDefault(), e.dispatchCommand(S, "bold"), !0) : r === "i" && !i ? (t.preventDefault(), e.dispatchCommand(S, "italic"), !0) : r === "u" && !i ? (t.preventDefault(), e.dispatchCommand(S, "underline"), !0) : r === "x" && i ? (t.preventDefault(), e.dispatchCommand(S, "strikethrough"), !0) : t.key === "=" && !i ? (t.preventDefault(), e.dispatchCommand(S, "subscript"), !0) : (t.key === "=" || t.key === "+") && i ? (t.preventDefault(), e.dispatchCommand(S, "superscript"), !0) : r === "z" && !i ? (t.preventDefault(), e.dispatchCommand(ce, void 0), !0) : r === "z" && i || r === "y" ? (t.preventDefault(), e.dispatchCommand(ae, void 0), !0) : r === "k" && !i ? (t.preventDefault(), window.dispatchEvent(new CustomEvent(
|
|
5964
|
+
return r === "b" && !i ? (t.preventDefault(), e.dispatchCommand(S, "bold"), !0) : r === "i" && !i ? (t.preventDefault(), e.dispatchCommand(S, "italic"), !0) : r === "u" && !i ? (t.preventDefault(), e.dispatchCommand(S, "underline"), !0) : r === "x" && i ? (t.preventDefault(), e.dispatchCommand(S, "strikethrough"), !0) : t.key === "=" && !i ? (t.preventDefault(), e.dispatchCommand(S, "subscript"), !0) : (t.key === "=" || t.key === "+") && i ? (t.preventDefault(), e.dispatchCommand(S, "superscript"), !0) : r === "z" && !i ? (t.preventDefault(), e.dispatchCommand(ce, void 0), !0) : r === "z" && i || r === "y" ? (t.preventDefault(), e.dispatchCommand(ae, void 0), !0) : r === "k" && !i ? (t.preventDefault(), window.dispatchEvent(new CustomEvent(tn)), !0) : t.key === "7" && i ? (t.preventDefault(), e.dispatchCommand(De, void 0), !0) : t.key === "8" && i ? (t.preventDefault(), e.dispatchCommand(Oe, void 0), !0) : t.key === "[" && !i ? (t.preventDefault(), e.dispatchCommand(re, void 0), !0) : t.key === "]" && !i ? (t.preventDefault(), e.dispatchCommand(C, void 0), !0) : t.key === "\\" && !i ? (t.preventDefault(), n(), !0) : i ? r === "l" ? (t.preventDefault(), e.dispatchCommand(x, "left"), !0) : r === "c" ? (t.preventDefault(), e.dispatchCommand(x, "center"), !0) : r === "r" ? (t.preventDefault(), e.dispatchCommand(x, "right"), !0) : r === "j" ? (t.preventDefault(), e.dispatchCommand(x, "justify"), !0) : !1 : !1;
|
|
5908
5965
|
}, h);
|
|
5909
5966
|
}, [t, e]), null;
|
|
5910
5967
|
}
|
|
5911
5968
|
//#endregion
|
|
5912
5969
|
//#region src/plugins/TableBoundaryPlugin.tsx
|
|
5913
|
-
function
|
|
5914
|
-
return Be(e) || Y(e) ||
|
|
5970
|
+
function Ro(e) {
|
|
5971
|
+
return Be(e) || Y(e) || xi(e);
|
|
5915
5972
|
}
|
|
5916
|
-
function
|
|
5973
|
+
function zo() {
|
|
5917
5974
|
let [e] = P();
|
|
5918
5975
|
return k(() => e.registerUpdateListener(({ editorState: n }) => {
|
|
5919
5976
|
let r = !1, a = null;
|
|
5920
5977
|
n.read(() => {
|
|
5921
5978
|
let e = i().getChildren();
|
|
5922
|
-
r =
|
|
5923
|
-
for (let t = 0; t < e.length - 1; t += 1) if (
|
|
5979
|
+
r = Ro(e.at(-1));
|
|
5980
|
+
for (let t = 0; t < e.length - 1; t += 1) if (Ro(e[t]) && Ro(e[t + 1])) {
|
|
5924
5981
|
a = e[t].getKey();
|
|
5925
5982
|
break;
|
|
5926
5983
|
}
|
|
5927
5984
|
}), !(!r && !a) && e.update(() => {
|
|
5928
5985
|
if (a) {
|
|
5929
5986
|
let e = i().getChildren().find((e) => e.getKey() === a);
|
|
5930
|
-
if (
|
|
5987
|
+
if (Ro(e)) {
|
|
5931
5988
|
e.insertAfter(t());
|
|
5932
5989
|
return;
|
|
5933
5990
|
}
|
|
5934
5991
|
}
|
|
5935
5992
|
let e = i().getLastChild();
|
|
5936
|
-
|
|
5993
|
+
Ro(e) && e.insertAfter(t());
|
|
5937
5994
|
});
|
|
5938
5995
|
}), [e]), null;
|
|
5939
5996
|
}
|
|
5940
5997
|
//#endregion
|
|
5941
5998
|
//#region src/plugins/YouTubePlugin.tsx
|
|
5942
|
-
function
|
|
5999
|
+
function Bo() {
|
|
5943
6000
|
let [e] = P();
|
|
5944
6001
|
return k(() => {
|
|
5945
|
-
let n = e.registerCommand(
|
|
5946
|
-
let n =
|
|
6002
|
+
let n = e.registerCommand($t, (e) => {
|
|
6003
|
+
let n = bi(e), r = t();
|
|
5947
6004
|
return ht(n), n.insertAfter(r), r.select(), !0;
|
|
5948
6005
|
}, g), r = e.registerUpdateListener(({ editorState: n }) => {
|
|
5949
6006
|
let r = !1;
|
|
5950
6007
|
n.read(() => {
|
|
5951
|
-
r =
|
|
6008
|
+
r = xi(i().getLastChild());
|
|
5952
6009
|
}), r && e.update(() => {
|
|
5953
6010
|
let e = i().getLastChild();
|
|
5954
|
-
|
|
6011
|
+
xi(e) && e.insertAfter(t());
|
|
5955
6012
|
});
|
|
5956
6013
|
});
|
|
5957
6014
|
return () => {
|
|
@@ -5960,19 +6017,111 @@ function Io() {
|
|
|
5960
6017
|
}, [e]), null;
|
|
5961
6018
|
}
|
|
5962
6019
|
//#endregion
|
|
6020
|
+
//#region src/components/rj-text-editor/footer/EditorFooter.tsx
|
|
6021
|
+
var Vo = [
|
|
6022
|
+
"words",
|
|
6023
|
+
"characters",
|
|
6024
|
+
"selection",
|
|
6025
|
+
"language",
|
|
6026
|
+
"mode",
|
|
6027
|
+
"zoom"
|
|
6028
|
+
], Ho = {
|
|
6029
|
+
characters: 0,
|
|
6030
|
+
isSelectionCollapsed: !0,
|
|
6031
|
+
selectedCharacters: 0,
|
|
6032
|
+
selectedWords: 0,
|
|
6033
|
+
words: 0
|
|
6034
|
+
};
|
|
6035
|
+
function Uo(e, t) {
|
|
6036
|
+
return e.characters === t.characters && e.isSelectionCollapsed === t.isSelectionCollapsed && e.selectedCharacters === t.selectedCharacters && e.selectedWords === t.selectedWords && e.words === t.words;
|
|
6037
|
+
}
|
|
6038
|
+
function Wo(e, t, n) {
|
|
6039
|
+
return e === "words" ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("span", {
|
|
6040
|
+
className: "rj-editor-footer-item-value",
|
|
6041
|
+
children: t.words
|
|
6042
|
+
}), /* @__PURE__ */ M("span", { children: n.footer.words })] }) : e === "characters" ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("span", {
|
|
6043
|
+
className: "rj-editor-footer-item-value",
|
|
6044
|
+
children: t.characters
|
|
6045
|
+
}), /* @__PURE__ */ M("span", { children: n.footer.characters })] }) : e === "selection" ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("span", { children: n.footer.selected }), /* @__PURE__ */ N("span", {
|
|
6046
|
+
className: "rj-editor-footer-item-value",
|
|
6047
|
+
children: [
|
|
6048
|
+
t.selectedWords,
|
|
6049
|
+
"/",
|
|
6050
|
+
t.selectedCharacters
|
|
6051
|
+
]
|
|
6052
|
+
})] }) : e === "language" ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("span", { children: n.footer.language }), /* @__PURE__ */ M("span", {
|
|
6053
|
+
className: "rj-editor-footer-item-value",
|
|
6054
|
+
children: t.language
|
|
6055
|
+
})] }) : e === "mode" ? /* @__PURE__ */ M("span", {
|
|
6056
|
+
className: "rj-editor-footer-item-value",
|
|
6057
|
+
children: t.isFullscreen ? n.footer.fullscreen : t.isFocused ? n.footer.focus : n.footer.editing
|
|
6058
|
+
}) : /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("span", { children: n.footer.zoom }), /* @__PURE__ */ N("span", {
|
|
6059
|
+
className: "rj-editor-footer-item-value",
|
|
6060
|
+
children: [t.zoom, "%"]
|
|
6061
|
+
})] });
|
|
6062
|
+
}
|
|
6063
|
+
var Go = O.memo(function({ customFooter: e, isFocused: t, isFullscreen: n, items: r, language: o, zoom: s }) {
|
|
6064
|
+
let [l] = P(), u = K(), [d, f] = O.useState(Ho), p = O.useCallback(() => {
|
|
6065
|
+
l.getEditorState().read(() => {
|
|
6066
|
+
let e = i().getTextContent(), t = a(), n = c(t) ? t.getTextContent() : "", r = {
|
|
6067
|
+
characters: Dt(e),
|
|
6068
|
+
isSelectionCollapsed: !c(t) || t.isCollapsed(),
|
|
6069
|
+
selectedCharacters: Dt(n),
|
|
6070
|
+
selectedWords: Ot(n),
|
|
6071
|
+
words: Ot(e)
|
|
6072
|
+
};
|
|
6073
|
+
f((e) => Uo(e, r) ? e : r);
|
|
6074
|
+
});
|
|
6075
|
+
}, [l]);
|
|
6076
|
+
O.useEffect(() => (p(), l.registerUpdateListener(() => {
|
|
6077
|
+
p();
|
|
6078
|
+
})), [l, p]), O.useEffect(() => l.registerCommand(oe, () => (p(), !1), _), [l, p]);
|
|
6079
|
+
let m = O.useMemo(() => ({
|
|
6080
|
+
...d,
|
|
6081
|
+
isFocused: t,
|
|
6082
|
+
isFullscreen: n,
|
|
6083
|
+
language: o,
|
|
6084
|
+
zoom: s
|
|
6085
|
+
}), [
|
|
6086
|
+
t,
|
|
6087
|
+
n,
|
|
6088
|
+
o,
|
|
6089
|
+
d,
|
|
6090
|
+
s
|
|
6091
|
+
]);
|
|
6092
|
+
if (e) return /* @__PURE__ */ M("footer", {
|
|
6093
|
+
"aria-label": u.footer.statusBar,
|
|
6094
|
+
className: "rj-editor-footer",
|
|
6095
|
+
children: e(m)
|
|
6096
|
+
});
|
|
6097
|
+
let h = r?.length ? r : Vo;
|
|
6098
|
+
return /* @__PURE__ */ M("footer", {
|
|
6099
|
+
"aria-label": u.footer.statusBar,
|
|
6100
|
+
className: "rj-editor-footer",
|
|
6101
|
+
children: /* @__PURE__ */ M("div", {
|
|
6102
|
+
className: "rj-editor-footer-items",
|
|
6103
|
+
children: h.map((e, t) => /* @__PURE__ */ N(O.Fragment, { children: [t > 0 && e === "mode" ? /* @__PURE__ */ M("span", { className: "rj-editor-footer-spacer" }) : null, /* @__PURE__ */ M("span", {
|
|
6104
|
+
className: "rj-editor-footer-item",
|
|
6105
|
+
"data-rj-editor-footer-item": e,
|
|
6106
|
+
children: Wo(e, m, u)
|
|
6107
|
+
})] }, `${e}-${t}`))
|
|
6108
|
+
})
|
|
6109
|
+
});
|
|
6110
|
+
});
|
|
6111
|
+
//#endregion
|
|
5963
6112
|
//#region src/components/rj-text-editor/handleEditorChange.ts
|
|
5964
|
-
function
|
|
6113
|
+
function Ko(e, t, n) {
|
|
5965
6114
|
n && e.read(() => {
|
|
5966
|
-
n(
|
|
6115
|
+
n(En(le(t), t), JSON.stringify(e.toJSON()), e);
|
|
5967
6116
|
});
|
|
5968
6117
|
}
|
|
5969
6118
|
//#endregion
|
|
5970
6119
|
//#region src/components/rj-text-editor/HtmlValuePlugin.tsx
|
|
5971
|
-
function
|
|
6120
|
+
function qo({ lastHtmlRef: e, value: t }) {
|
|
5972
6121
|
let [n] = P();
|
|
5973
6122
|
return O.useEffect(() => {
|
|
5974
6123
|
t === void 0 || t === e.current || n.update(() => {
|
|
5975
|
-
|
|
6124
|
+
Un(n, t), e.current = t;
|
|
5976
6125
|
});
|
|
5977
6126
|
}, [
|
|
5978
6127
|
n,
|
|
@@ -5982,107 +6131,128 @@ function Ro({ lastHtmlRef: e, value: t }) {
|
|
|
5982
6131
|
}
|
|
5983
6132
|
//#endregion
|
|
5984
6133
|
//#region src/components/rj-text-editor/RJTextEditorContent.tsx
|
|
5985
|
-
function
|
|
5986
|
-
let
|
|
6134
|
+
function Jo({ autofocus: e, className: t, editorRef: n, footer: r, footerItems: i, footerLanguageLabel: a, footerZoom: o, id: s, isFullscreen: c, onBlur: l, onChange: u, onFocus: d, onToggleFullscreen: f, placeholder: p, showFooter: m, theme: h, value: g }) {
|
|
6135
|
+
let _ = K(), v = O.useRef(g), [y, b] = O.useState(!1);
|
|
5987
6136
|
return /* @__PURE__ */ N("div", {
|
|
5988
6137
|
className: [
|
|
5989
6138
|
"rj-editor",
|
|
5990
|
-
|
|
6139
|
+
c ? "rj-editor--fullscreen" : "",
|
|
5991
6140
|
t
|
|
5992
6141
|
].filter(Boolean).join(" "),
|
|
5993
|
-
"data-rj-editor-theme":
|
|
5994
|
-
id:
|
|
5995
|
-
onBlur:
|
|
5996
|
-
|
|
6142
|
+
"data-rj-editor-theme": h,
|
|
6143
|
+
id: s,
|
|
6144
|
+
onBlur: (e) => {
|
|
6145
|
+
let t = e.relatedTarget;
|
|
6146
|
+
e.currentTarget.contains(t) || b(!1), l?.(e);
|
|
6147
|
+
},
|
|
6148
|
+
onFocus: (e) => {
|
|
6149
|
+
b(!0), d?.(e);
|
|
6150
|
+
},
|
|
5997
6151
|
ref: n,
|
|
5998
|
-
children: [
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6152
|
+
children: [
|
|
6153
|
+
/* @__PURE__ */ M(ko, {
|
|
6154
|
+
isFullscreen: c,
|
|
6155
|
+
onToggleFullscreen: f
|
|
6156
|
+
}),
|
|
6157
|
+
/* @__PURE__ */ N("div", {
|
|
6158
|
+
className: "rj-editor-body",
|
|
6159
|
+
children: [
|
|
6160
|
+
/* @__PURE__ */ M(lt, {
|
|
6161
|
+
contentEditable: /* @__PURE__ */ M(rt, { className: "rj-editor-input" }),
|
|
6162
|
+
ErrorBoundary: it,
|
|
6163
|
+
placeholder: /* @__PURE__ */ M("div", {
|
|
6164
|
+
className: "rj-editor-placeholder",
|
|
6165
|
+
children: p === void 0 ? _.placeholders.editor : p
|
|
6166
|
+
})
|
|
6167
|
+
}),
|
|
6168
|
+
/* @__PURE__ */ M(at, {}),
|
|
6169
|
+
/* @__PURE__ */ M(jo, {}),
|
|
6170
|
+
/* @__PURE__ */ M(Ao, {}),
|
|
6171
|
+
/* @__PURE__ */ M(Po, {}),
|
|
6172
|
+
/* @__PURE__ */ M(Lo, {}),
|
|
6173
|
+
/* @__PURE__ */ M(Bo, {}),
|
|
6174
|
+
/* @__PURE__ */ M(ot, {}),
|
|
6175
|
+
/* @__PURE__ */ M(st, {}),
|
|
6176
|
+
/* @__PURE__ */ M(ut, {}),
|
|
6177
|
+
/* @__PURE__ */ M(zo, {}),
|
|
6178
|
+
/* @__PURE__ */ M(Mi, {}),
|
|
6179
|
+
/* @__PURE__ */ M(qo, {
|
|
6180
|
+
lastHtmlRef: v,
|
|
6181
|
+
value: g
|
|
6182
|
+
}),
|
|
6183
|
+
/* @__PURE__ */ M(ct, { onChange: (e, t) => {
|
|
6184
|
+
e.read(() => {
|
|
6185
|
+
v.current = En(le(t), t);
|
|
6186
|
+
}), Ko(e, t, u);
|
|
6187
|
+
} }),
|
|
6188
|
+
e ? /* @__PURE__ */ M(nt, {}) : null
|
|
6189
|
+
]
|
|
6190
|
+
}),
|
|
6191
|
+
m ? /* @__PURE__ */ M(Go, {
|
|
6192
|
+
customFooter: r,
|
|
6193
|
+
isFocused: y,
|
|
6194
|
+
isFullscreen: c,
|
|
6195
|
+
items: i,
|
|
6196
|
+
language: a,
|
|
6197
|
+
zoom: o
|
|
6198
|
+
}) : null
|
|
6199
|
+
]
|
|
6035
6200
|
});
|
|
6036
6201
|
}
|
|
6037
6202
|
//#endregion
|
|
6038
6203
|
//#region src/components/RJTextEditor.tsx
|
|
6039
|
-
function
|
|
6040
|
-
let
|
|
6204
|
+
function Yo({ autofocus: e = !1, className: t, defaultValue: n, footer: r, footerItems: i, footerLanguageLabel: a, footerZoom: o = 100, id: s, locale: c = "en", locales: l, namespace: u = "RJEditor", onBlur: d, onChange: f, onFocus: p, placeholder: m, showFooter: h = !1, translations: g, theme: _ = "auto", value: v }) {
|
|
6205
|
+
let y = O.useMemo(() => $n(), []), b = O.useRef(null), [x, S] = O.useState(!1), C = _r(_), ee = O.useMemo(() => ur(C), [C]), te = Ci({
|
|
6041
6206
|
defaultValue: n,
|
|
6042
|
-
namespace:
|
|
6043
|
-
value:
|
|
6207
|
+
namespace: u,
|
|
6208
|
+
value: v
|
|
6044
6209
|
});
|
|
6045
6210
|
O.useEffect(() => {
|
|
6046
6211
|
let e = () => {
|
|
6047
|
-
|
|
6212
|
+
S(document.fullscreenElement === b.current);
|
|
6048
6213
|
};
|
|
6049
6214
|
return document.addEventListener("fullscreenchange", e), () => {
|
|
6050
6215
|
document.removeEventListener("fullscreenchange", e);
|
|
6051
6216
|
};
|
|
6052
6217
|
}, []);
|
|
6053
|
-
let
|
|
6054
|
-
if (document.fullscreenElement ===
|
|
6218
|
+
let ne = async () => {
|
|
6219
|
+
if (document.fullscreenElement === b.current) {
|
|
6055
6220
|
await document.exitFullscreen();
|
|
6056
6221
|
return;
|
|
6057
6222
|
}
|
|
6058
|
-
await
|
|
6059
|
-
},
|
|
6223
|
+
await b.current?.requestFullscreen();
|
|
6224
|
+
}, re = O.useCallback((e) => document.fullscreenElement || b.current || e?.parentElement || document.body, []);
|
|
6060
6225
|
return /* @__PURE__ */ M(ge, {
|
|
6061
|
-
store:
|
|
6062
|
-
children: /* @__PURE__ */ M(
|
|
6063
|
-
locale:
|
|
6064
|
-
locales:
|
|
6065
|
-
translations:
|
|
6066
|
-
children: /* @__PURE__ */ M(
|
|
6067
|
-
value:
|
|
6226
|
+
store: y,
|
|
6227
|
+
children: /* @__PURE__ */ M(sr, {
|
|
6228
|
+
locale: c,
|
|
6229
|
+
locales: l,
|
|
6230
|
+
translations: g,
|
|
6231
|
+
children: /* @__PURE__ */ M(dr.Provider, {
|
|
6232
|
+
value: C,
|
|
6068
6233
|
children: /* @__PURE__ */ M(me, {
|
|
6069
|
-
getPopupContainer:
|
|
6070
|
-
theme:
|
|
6234
|
+
getPopupContainer: re,
|
|
6235
|
+
theme: ee,
|
|
6071
6236
|
children: /* @__PURE__ */ M(de, {
|
|
6072
|
-
initialConfig:
|
|
6073
|
-
children: /* @__PURE__ */ M(
|
|
6237
|
+
initialConfig: te,
|
|
6238
|
+
children: /* @__PURE__ */ M(Jo, {
|
|
6074
6239
|
autofocus: e,
|
|
6075
6240
|
className: t,
|
|
6076
|
-
editorRef:
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6241
|
+
editorRef: b,
|
|
6242
|
+
footer: r,
|
|
6243
|
+
footerItems: i,
|
|
6244
|
+
footerLanguageLabel: a || Xo(c),
|
|
6245
|
+
footerZoom: o,
|
|
6246
|
+
id: s,
|
|
6247
|
+
isFullscreen: x,
|
|
6248
|
+
onBlur: d,
|
|
6249
|
+
onChange: f,
|
|
6250
|
+
onFocus: p,
|
|
6251
|
+
onToggleFullscreen: ne,
|
|
6252
|
+
placeholder: m,
|
|
6253
|
+
showFooter: h,
|
|
6254
|
+
theme: C,
|
|
6255
|
+
value: v
|
|
6086
6256
|
})
|
|
6087
6257
|
})
|
|
6088
6258
|
})
|
|
@@ -6090,8 +6260,11 @@ function Bo({ autofocus: e = !1, className: t, defaultValue: n, id: r, locale: i
|
|
|
6090
6260
|
})
|
|
6091
6261
|
});
|
|
6092
6262
|
}
|
|
6263
|
+
function Xo(e) {
|
|
6264
|
+
return e === "uz" ? "O‘zbek" : e === "ru" ? "Русский" : e === "en" ? "English" : e;
|
|
6265
|
+
}
|
|
6093
6266
|
//#endregion
|
|
6094
6267
|
//#region src/index.ts
|
|
6095
|
-
|
|
6268
|
+
Fn();
|
|
6096
6269
|
//#endregion
|
|
6097
|
-
export {
|
|
6270
|
+
export { sr as RJEditorI18nProvider, Yo as RJTextEditor, er as enTranslations, nr as mergeTranslations, rr as ruTranslations, K as useRJEditorI18n, ir as uzTranslations };
|