@ckeditor/ckeditor5-source-editing-enhanced 48.2.0 → 48.3.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/augmentation.d.ts +20 -20
- package/dist/index.d.ts +10 -10
- package/dist/index.js +1 -1
- package/dist/replacesourcecommand.d.ts +23 -23
- package/dist/sourceeditingenhanced.d.ts +42 -42
- package/dist/sourceeditingenhancedconfig.d.ts +44 -44
- package/dist/sourceeditingenhancedui.d.ts +35 -35
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/dist/ui/codeeditorview.d.ts +46 -46
- package/dist/ui/editsourcecommand.d.ts +21 -21
- package/dist/utils/common-translations.d.ts +6 -6
- package/dist/utils/createcodemirroreditor.d.ts +54 -54
- package/dist/utils/format.d.ts +15 -15
- package/dist/utils/getactiverootname.d.ts +6 -6
- package/package.json +6 -6
package/dist/augmentation.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type { SourceEditingEnhanced, SourceEditingEnhancedConfig, ReplaceSourceCommand, EditSourceCommand } from
|
|
6
|
-
declare module
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import type { SourceEditingEnhanced, SourceEditingEnhancedConfig, ReplaceSourceCommand, EditSourceCommand } from "./index.js";
|
|
6
|
+
declare module "@ckeditor/ckeditor5-core" {
|
|
7
|
+
interface EditorConfig {
|
|
8
|
+
/**
|
|
9
|
+
* The configuration of the source editing enhanced feature.
|
|
10
|
+
*
|
|
11
|
+
* Read more in {@link module:source-editing-enhanced/sourceeditingenhancedconfig~SourceEditingEnhancedConfig}.
|
|
12
|
+
*/
|
|
13
|
+
sourceEditingEnhanced?: SourceEditingEnhancedConfig;
|
|
14
|
+
}
|
|
15
|
+
interface PluginsMap {
|
|
16
|
+
[SourceEditingEnhanced.pluginName]: SourceEditingEnhanced;
|
|
17
|
+
}
|
|
18
|
+
interface CommandsMap {
|
|
19
|
+
replaceSource: ReplaceSourceCommand;
|
|
20
|
+
editSource: EditSourceCommand;
|
|
21
|
+
}
|
|
22
22
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export { SourceEditingEnhanced } from
|
|
9
|
-
export { ReplaceSourceCommand } from
|
|
10
|
-
export { EditSourceCommand } from
|
|
11
|
-
export type { SourceEditingEnhancedConfig } from
|
|
12
|
-
import
|
|
6
|
+
* @module source-editing-enhanced
|
|
7
|
+
*/
|
|
8
|
+
export { SourceEditingEnhanced } from "./sourceeditingenhanced.js";
|
|
9
|
+
export { ReplaceSourceCommand } from "./replacesourcecommand.js";
|
|
10
|
+
export { EditSourceCommand } from "./ui/editsourcecommand.js";
|
|
11
|
+
export type { SourceEditingEnhancedConfig } from "./sourceeditingenhancedconfig.js";
|
|
12
|
+
import "./augmentation.js";
|
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0x1182fb,PendingActions as _0xeebced,Plugin as _0x58d2b0}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x53e78f,formatHtml as _0x33a828,env as _0xad5a55,uid as _0x2f8cb4}from'@ckeditor/ckeditor5-utils/dist/index.js';import{IconSource as _0x501248}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x1a0723,ButtonView as _0x509c98,MenuBarMenuListItemButtonView as _0x5c6a24}from'@ckeditor/ckeditor5-ui/dist/index.js';import{EditorView as _0x6e76b8,crosshairCursor as _0x4ef9cd,drawSelection as _0x389583,dropCursor as _0x24591c,lineNumbers as _0x39ae00,highlightActiveLine as _0x25db7b,highlightActiveLineGutter as _0x1834a1,highlightSpecialChars as _0x3da5d0,rectangularSelection as _0x91c7d7,keymap as _0x4fad84}from'@codemirror/view';import{Compartment as _0x27fe96,Transaction as _0x3d60f9}from'@codemirror/state';import{bracketMatching as _0x5d018f,foldGutter as _0x4e49fb,indentOnInput as _0x32d65f,syntaxHighlighting as _0x5c2dfa,defaultHighlightStyle as _0x4de87f,foldKeymap as _0x5d125a}from'@codemirror/language';import{toggleTabFocusMode as _0x1cce64,history as _0x4ddf5f,defaultKeymap as _0x3bd2cd,historyKeymap as _0xae9138,indentLess as _0x40f0a2,indentMore as _0x42620f,redo as _0x12ccb3,undo as _0x185e6a}from'@codemirror/commands';import{autocompletion as _0x1aa384,closeBrackets as _0x385083,closeBracketsKeymap as _0x2de8e3,completionKeymap as _0x1b46ae}from'@codemirror/autocomplete';import{html as _0x502124}from'@codemirror/lang-html';import{markdown as _0x243adb}from'@codemirror/lang-markdown';import{oneDark as _0x33e494}from'@codemirror/theme-one-dark';function q(_0x29f088,_0x234c02){const t=_0x29f088['t'];switch(_0x234c02){case'Edit\x20source\x20modal\x20label':return t({'string':'Edit\x20source','id':'Edit\x20source\x20modal\x20label'});case'Source':return t('Source');case'Source\x20Editing\x20Enhanced':return t('Source\x20Editing\x20Enhanced');case'Copy\x20line\x20down':return t('Copy\x20line\x20down');case'Copy\x20line\x20up':return t('Copy\x20line\x20up');case'Delete\x20line':return t('Delete\x20line');case'Indent\x20less':return t('Indent\x20less');case'Indent\x20more':return t('Indent\x20more');case'Fold\x20all':return t('Fold\x20all');case'Fold\x20code\x20(current\x20level)':return t('Fold\x20code\x20(current\x20level)');case'Move\x20line\x20down':return t('Move\x20line\x20down');case'Move\x20line\x20up':return t('Move\x20line\x20up');case'Redo\x20(keystroke)':return t({'id':'Redo\x20(keystroke)','string':'Redo'});case'Select\x20line':return t('Select\x20line');case'Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':return t('Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode');case'Toggle\x20block\x20comment':return t('Toggle\x20block\x20comment');case'Toggle\x20comment':return t('Toggle\x20comment');case'Undo\x20(keystroke)':return t({'id':'Undo\x20(keystroke)','string':'Undo'});case'Unfold\x20all':return t('Unfold\x20all');case'Unfold\x20code\x20(current\x20level)':return t('Unfold\x20code\x20(current\x20level)');case'Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':return t('Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.');case'Cancel':return t('Cancel');case'Save':return t('Save');default:return _0x234c02;}}function H(_0x8ad9a2){const _0x567d05=_0x8ad9a2['editing']['view']['document']['roots'],_0x3aee77=_0x567d05['length'];if(0x0===_0x3aee77)throw new _0x53e78f('source-editing-enhanced-editor-no-root',_0x8ad9a2);if(0x1===_0x3aee77)return _0x567d05['first']['rootName'];return Array['from'](_0x8ad9a2['editing']['view']['document']['selection']['getRanges']())[0x0]['root']['rootName'];}function Z(_0x43f273){return J(_0x43f273['replace'](/^[\n\s]*/g,''))?_0x43f273['replace'](/\s+/g,''):_0x43f273;}function J(_0x19d9a0){return _0x19d9a0['startsWith']('<');}function G(_0x23c430){const _0x44b07c=[_0x6e76b8['lineWrapping'],_0x1aa384(),_0x5d018f(),_0x385083(),_0x4ef9cd(),_0x389583(),_0x24591c(),_0x39ae00(),_0x4e49fb(),_0x25db7b(),_0x1834a1(),_0x3da5d0(),_0x4ddf5f(),_0x32d65f(),_0x91c7d7(),_0x5c2dfa(_0x4de87f,{'fallback':!0x0})],_0x5a6399=new _0x27fe96();_0x44b07c['push'](_0x5a6399['of'](_0x6e76b8['editable']['of'](!0x0))),'html'===_0x23c430['syntaxLanguage']?_0x44b07c['push'](_0x502124()):_0x44b07c['push'](_0x243adb());const _0x52bf45=function(_0x4c8f4a){if(_0x4c8f4a&&'default'!==_0x4c8f4a)return'dark'===_0x4c8f4a?_0x33e494:_0x4c8f4a;return null;}(_0x23c430['theme']);_0x52bf45&&_0x44b07c['push'](_0x52bf45),_0x44b07c['push'](_0x4fad84['of']([..._0x2de8e3,..._0x3bd2cd,..._0xae9138,..._0x5d125a,..._0x1b46ae,{'key':'Tab','run':_0x42620f,'shift':_0x40f0a2,'preventDefault':!0x0,'stopPropagation':!0x0},{'key':'Ctrl-y','mac':'Cmd-y','run':_0x12ccb3,'preventDefault':!0x0,'stopPropagation':!0x0},{'key':'Ctrl-Shift-z','mac':'Cmd-Shift-z','run':_0x12ccb3,'preventDefault':!0x0,'stopPropagation':!0x0},{'key':'Ctrl-z','mac':'Cmd-z','run':_0x185e6a,'preventDefault':!0x0,'stopPropagation':!0x0}]));const _0x2f69cc=new _0x6e76b8({'extensions':_0x44b07c,'parent':_0x23c430['parent']});return _0x1cce64(_0x2f69cc),{'focus':()=>{_0x2f69cc['dispatch']({'selection':{'anchor':0x0},'scrollIntoView':!0x0}),_0x2f69cc['focus']();},'getData':()=>_0x2f69cc['state']['doc']['toString'](),'setData':_0x57917d=>{_0x2f69cc['dispatch']({'changes':{'from':0x0,'to':_0x2f69cc['state']['doc']['length'],'insert':_0x57917d},'annotations':_0x3d60f9['addToHistory']['of'](!0x1)});},'setReadOnly':_0x5910a5=>{_0x2f69cc['dispatch']({'effects':[_0x5a6399['reconfigure'](_0x6e76b8['editable']['of'](!_0x5910a5))]});},'destroy':()=>{_0x2f69cc['destroy']();},'instance':_0x2f69cc};}class CodeEditorView extends _0x1a0723{['_codeEditorApi']=null;['_options'];constructor(_0x5a7f91,_0x13782c){super(_0x5a7f91),this['_options']=_0x13782c,this['set']('isReadOnly',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-code-editor'],'tabindex':-0x1}});}['render'](){super['render'](),this['_codeEditorApi']=G({'parent':this['element'],'syntaxLanguage':this['_options']['syntaxLanguage'],'theme':this['_options']['theme']}),this['on']('change:isReadOnly',(_0x5e7c88,_0x3df129,_0x2887d7)=>{this['setReadOnly'](_0x2887d7);});}['destroy'](){super['destroy'](),this['_codeEditorApi']['destroy'](),this['_codeEditorApi']=null;}['focus'](){this['isReadOnly']?this['element']['focus']():this['_codeEditorApi']['focus']();}['getData'](){return this['_codeEditorApi']['getData']();}['setData'](_0x1e8308){this['_codeEditorApi']['setData'](_0x1e8308);}['setReadOnly'](_0x642ee1){this['_codeEditorApi']['setReadOnly'](_0x642ee1);}}const Q='SourceEditingEnhancedMode';class EditSourceCommand extends _0x1182fb{constructor(_0x42b9fb){super(_0x42b9fb),this['affectsData']=!0x1,this['editor']['plugins']['get'](_0xeebced)['on']('change:hasAny',(_0x50b582,_0x2dc6dc,_0x5cef2e)=>{_0x5cef2e?this['forceDisabled']('pendingActions'):this['clearForceDisabled']('pendingActions');});}['_disableCommands'](){const _0x4a28f=this['editor'];for(const _0x45c8a1 of _0x4a28f['commands']['names']())['replaceSource','editSource']['includes'](_0x45c8a1)||_0x4a28f['commands']['get'](_0x45c8a1)['forceDisabled'](Q);}['_enableCommands'](){const _0x26cd71=this['editor'];for(const _0x5d7d32 of _0x26cd71['commands']['commands']())_0x5d7d32['clearForceDisabled'](Q);}['refresh'](){this['isEnabled']=!0x0;}['execute'](){const _0x290d04=this['editor'],_0x4a5e47=_0x290d04['locale'],_0x21a0b2=_0x290d04['plugins']['get']('Dialog'),_0x2f16cf=H(_0x290d04),_0x599d84=_0x290d04['data']['get']({'rootName':_0x2f16cf}),_0x27e2dc=J(_0x2e2032=_0x599d84)?_0x33a828(_0x2e2032):_0x2e2032;var _0x2e2032;const _0x3cee91=new CodeEditorView(_0x4a5e47,{'syntaxLanguage':_0x290d04['plugins']['has']('Markdown')?'markdown':'html','theme':_0x290d04['config']['get']('sourceEditingEnhanced.theme')});let _0x5be384=!0x0;const _0x1a56d1=_0x2223b6=>{if(!_0x5be384)return;return Z(_0x3cee91['getData']())!==Z(_0x27e2dc)?window['confirm'](q(_0x4a5e47,'Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.'))?void 0x0:_0x2223b6['stop']():void 0x0;};_0x21a0b2['show']({'id':'sourceEditingEnhanced','title':q(_0x4a5e47,'Edit\x20source\x20modal\x20label'),'isModal':!0x0,'className':'ck-source-editing-enhanced-dialog','content':_0x3cee91,'actionButtons':[{'label':q(_0x4a5e47,'Cancel'),'withText':!0x0,'onExecute':()=>{_0x21a0b2['hide']();}},{'label':q(_0x4a5e47,'Save'),'class':'ck-button-action','withText':!0x0,'onExecute':()=>{const _0x172221=Z(_0x3cee91['getData']())!==Z(_0x27e2dc);(_0x172221&&_0x290d04['execute']('replaceSource',_0x3cee91['getData']()),_0x5be384=!0x1,_0x21a0b2['hide'](),_0x172221&&'editables'in _0x290d04['ui']['view'])&&_0x290d04['ui']['view']['editables'][_0x2f16cf]['element']['focus']();},'onCreate':_0x2cff07=>{_0x2cff07['set']('isEnabled',!_0x290d04['isReadOnly']),_0x2cff07['bind']('isEnabled')['to'](_0x290d04,'isReadOnly',this,'isEnabled',(_0x45097,_0x46980f)=>!_0x45097&&_0x46980f);}}],'onHide':()=>{this['_enableCommands'](),_0x21a0b2['off']('hide',_0x1a56d1),_0x3cee91['destroy']();},'onShow':()=>{_0x3cee91['bind']('isReadOnly')['to'](_0x290d04,'isReadOnly',this,'isEnabled',(_0x28bb79,_0xe20804)=>_0x28bb79||!_0xe20804),_0x3cee91['setData'](_0x27e2dc),_0x3cee91['focus'](),_0x21a0b2['on']('hide',_0x1a56d1,{'priority':'highest'}),this['_disableCommands']();}});}}class SourceEditingEnhancedUI extends _0x58d2b0{static get['pluginName'](){return'SourceEditingEnhancedUI';}static get['requires'](){return[_0xeebced];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x4628e9=this['editor'],_0x1a5660=_0x4628e9['locale'],_0x2dbb45=new EditSourceCommand(_0x4628e9);_0x4628e9['commands']['add']('editSource',_0x2dbb45),_0x4628e9['ui']['componentFactory']['add']('sourceEditingEnhanced',()=>{const _0x266dc1=this['_createButton'](_0x509c98,_0x2dbb45);return _0x266dc1['set']({'label':q(_0x1a5660,'Source'),'icon':_0x501248,'tooltip':q(_0x1a5660,'Edit\x20source\x20modal\x20label'),'class':'ck-source-editing-enhanced-button'}),_0x266dc1;}),_0x4628e9['ui']['componentFactory']['add']('menuBar:sourceEditingEnhanced',()=>{const _0x11458d=this['_createButton'](_0x5c6a24,_0x2dbb45,!0x0);return _0x11458d['set']({'label':q(_0x1a5660,'Edit\x20source\x20modal\x20label'),'icon':_0x501248,'role':'menuitemcheckbox'}),_0x11458d;}),this['_registerKeybindings']();}['afterInit'](){!async function(_0x53129a){const _0xfc07ff=_0x28e351([0x4e,0x51,0x56,0x58,0x79,0x42,0x46,0x48,0x4a,0x7a,0x72,0x38,0x57,0x47,0x49,0x34,0x61,0x5a,0x6e,0x54,0x65,0x6f,0x55,0x78,0x36,0x70,0x39,0x6a,0x66,0x76,0x33,0x44,0x69,0x74,0x4c,0x77,0x75,0x63,0x6b,0x59,0x6c,0x68,0x64,0x4d,0x41,0x32,0x4b,0x35,0x53,0x37,0x6d,0x62,0x43,0x4f,0x50,0x45,0x73,0x31,0x71,0x67,0x52,0x30]),_0x3e2794=0x5dba9314,_0x32968f=0x5dbd18c4^_0x3e2794,_0x3ad3ba=window[_0x28e351([0x44,0x61,0x74,0x65])][_0x28e351([0x6e,0x6f,0x77])](),_0xfb4889=_0x53129a[_0x28e351([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1b2f09=new window[(_0x28e351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x245ae3=>{_0xfb4889[_0x28e351([0x6f,0x6e,0x63,0x65])](_0x28e351([0x72,0x65,0x61,0x64,0x79]),_0x245ae3);}),_0x3163c3={[_0x28e351([0x6b,0x74,0x79])]:_0x28e351([0x45,0x43]),[_0x28e351([0x75,0x73,0x65])]:_0x28e351([0x73,0x69,0x67]),[_0x28e351([0x63,0x72,0x76])]:_0x28e351([0x50,0x2d,0x32,0x35,0x36]),[_0x28e351([0x78])]:_0x28e351([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x28e351([0x79])]:_0x28e351([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x28e351([0x61,0x6c,0x67])]:_0x28e351([0x45,0x53,0x32,0x35,0x36])},_0x57ddbf=_0xfb4889[_0x28e351([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x28e351([0x67,0x65,0x74])](_0x28e351([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x126956(){let _0x26debb,_0x259792=null,_0x4f7604=null;try{if(_0x57ddbf==_0x28e351([0x47,0x50,0x4c]))return _0x28e351([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x26debb=_0x5acf06(),!_0x26debb)return _0x28e351([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x26debb[_0x28e351([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4f7604=_0x1d5dfe(_0x26debb[_0x28e351([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x26debb[_0x28e351([0x6a,0x74,0x69])])),await _0x39c8c7()?_0x528bfd()?_0x51e07e()?_0x28e351([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x524cc()?(_0x26debb[_0x28e351([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x28e351([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x259792=_0x1b13df(_0x28e351([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x400998()):_0x28e351([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x28e351([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x28e351([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x28e351([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x51e07e(){const _0x4c2977=[_0x28e351([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x28e351([0x74,0x72,0x69,0x61,0x6c])][_0x28e351([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26debb[_0x28e351([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3ad3ba/0x3e8:0xe10*_0x32968f;return _0x26debb[_0x28e351([0x65,0x78,0x70])]<_0x4c2977;}function _0x528bfd(){const _0xbb3236=_0x26debb[_0x28e351([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xbb3236&&(!!_0xbb3236[_0x28e351([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28e351([0x2a]))||!!_0xbb3236[_0x28e351([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28e351([0x53,0x45,0x45])));}function _0x524cc(){const _0x404e5f=_0x26debb[_0x28e351([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x404e5f||0x0==_0x404e5f[_0x28e351([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5e0154}=new URL(window[_0x28e351([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x404e5f[_0x28e351([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e0154))return!0x0;const _0xf450c6=_0x5e0154[_0x28e351([0x73,0x70,0x6c,0x69,0x74])](_0x28e351([0x2e]));return _0x404e5f[_0x28e351([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xba4f9e=>_0xba4f9e[_0x28e351([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28e351([0x2a])))[_0x28e351([0x6d,0x61,0x70])](_0x17acef=>_0x17acef[_0x28e351([0x73,0x70,0x6c,0x69,0x74])](_0x28e351([0x2e])))[_0x28e351([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x22914d=>_0x22914d[_0x28e351([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xf450c6[_0x28e351([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x28e351([0x6d,0x61,0x70])](_0x429836=>Array(_0xf450c6[_0x28e351([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x429836[_0x28e351([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x28e351([0x66,0x69,0x6c,0x6c])](_0x429836[0x0]===_0x28e351([0x2a])?_0x28e351([0x2a]):'')[_0x28e351([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x429836))[_0x28e351([0x73,0x6f,0x6d,0x65])](_0xc48547=>_0xf450c6[_0x28e351([0x65,0x76,0x65,0x72,0x79])]((_0x4bc18f,_0x2c25a1)=>_0xc48547[_0x2c25a1]===_0x4bc18f||_0xc48547[_0x2c25a1]===_0x28e351([0x2a])));}function _0x400998(){return _0x259792&&_0x4f7604?new window[(_0x28e351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x23f542,_0x46d3d5)=>{_0x259792[_0x28e351([0x74,0x68,0x65,0x6e])](_0x23f542,_0x46d3d5),_0x4f7604[_0x28e351([0x74,0x68,0x65,0x6e])](_0xe4aed5=>{_0xe4aed5!=_0x28e351([0x56,0x61,0x6c,0x69,0x64])&&_0x23f542(_0xe4aed5);},_0x46d3d5);}):_0x259792||_0x4f7604||_0x28e351([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1d5dfe(_0x5af360,_0x4d79da){return new window[(_0x28e351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x476f1f=>{if(_0x510b5f())return _0x476f1f(_0x28e351([0x56,0x61,0x6c,0x69,0x64]));_0xf5c80d(),_0xfb4889[_0x28e351([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x28e351([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xde9de2=!0x1;const _0x13bba1=_0x2f8cb4();function _0x1a9996(_0x5ce679){return!!_0x5ce679&&(typeof _0x5ce679===_0x28e351([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5ce679===_0x28e351([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5ce679[_0x28e351([0x74,0x68,0x65,0x6e])]===_0x28e351([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5ce679[_0x28e351([0x63,0x61,0x74,0x63,0x68])]===_0x28e351([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x30723e(_0x1df344){_0x5e77ee(_0x1df344)[_0x28e351([0x74,0x68,0x65,0x6e])](_0x50e010=>{if(!_0x50e010||_0x50e010[_0x28e351([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x28e351([0x6f,0x6b]))return _0x28e351([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x9ce240(_0x1e5854(_0x13bba1+_0x4d79da))!=_0x50e010[_0x28e351([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x28e351([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x28e351([0x56,0x61,0x6c,0x69,0x64]);})[_0x28e351([0x74,0x68,0x65,0x6e])](_0x12574e=>(_0xb97bd9(),_0x12574e),()=>{const _0x42e397=_0x51213c();return null==_0x42e397?(_0xb97bd9(),_0x28e351([0x56,0x61,0x6c,0x69,0x64])):_0x28e351(_0x3ad3ba-_0x42e397>(0x79b61714^_0x3e2794)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x28e351([0x74,0x68,0x65,0x6e])](_0x476f1f)[_0x28e351([0x63,0x61,0x74,0x63,0x68])](()=>{_0x476f1f(_0x28e351([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x38e1f9=0x5d8c7d94^_0x3e2794;function _0xb97bd9(){const _0x3f9de6=_0x28e351([0x6c,0x6c,0x63,0x74,0x2d])+_0x9ce240(_0x1e5854(_0x5af360)),_0x3d7a08=_0x191096(_0x9ce240(window[_0x28e351([0x4d,0x61,0x74,0x68])][_0x28e351([0x63,0x65,0x69,0x6c])](_0x3ad3ba/_0x38e1f9)));window[_0x28e351([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x28e351([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3f9de6,_0x3d7a08);}function _0x51213c(){const _0x12f0bd=_0x28e351([0x6c,0x6c,0x63,0x74,0x2d])+_0x9ce240(_0x1e5854(_0x5af360)),_0x23af53=window[_0x28e351([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x28e351([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x12f0bd);return _0x23af53?window[_0x28e351([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x191096(_0x23af53),0x10)*_0x38e1f9:null;}function _0x5e77ee(_0x31631a){return new window[(_0x28e351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x163f63,_0x23d7c6)=>{_0x31631a[_0x28e351([0x74,0x68,0x65,0x6e])](_0x163f63,_0x23d7c6),window[_0x28e351([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x23d7c6,0x5dbb47d4^_0x3e2794);});}}_0xfb4889[_0x28e351([0x6f,0x6e])](_0x28e351([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x57942b,_0xf3002)=>{if(_0xf3002[0x0]!=_0x5af360)return _0x476f1f(_0x28e351([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xf3002[0x1]={..._0xf3002[0x1],[_0x28e351([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x13bba1};},{[_0x28e351([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x28e351([0x68,0x69,0x67,0x68])}),_0xfb4889[_0x28e351([0x6f,0x6e])](_0x28e351([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x7a834=>{_0x1a9996(_0x7a834[_0x28e351([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xde9de2=!0x0,_0x30723e(_0x7a834[_0x28e351([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x28e351([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x28e351([0x6c,0x6f,0x77])}),_0x1b2f09[_0x28e351([0x74,0x68,0x65,0x6e])](()=>{_0xde9de2||_0x476f1f(_0x28e351([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x510b5f(){return _0xfb4889[_0x28e351([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x28e351([0x76,0x69,0x65,0x77])][_0x28e351([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x28e351([0x61,0x75,0x74,0x6f]);}function _0xf5c80d(){_0xfb4889[_0x28e351([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x28e351([0x76,0x69,0x65,0x77])][_0x28e351([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x28e351([0x61,0x75,0x74,0x6f]);}}function _0x1b13df(_0x1882fd){const _0x36951a=[new window[(_0x28e351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x448b10=>setTimeout(_0x448b10,0x5db3add8^_0x3e2794)),_0x1b2f09[_0x28e351([0x74,0x68,0x65,0x6e])](()=>new window[(_0x28e351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x369ae2=>{let _0x4c044b=0x0;_0xfb4889[_0x28e351([0x6d,0x6f,0x64,0x65,0x6c])][_0x28e351([0x6f,0x6e])](_0x28e351([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3c61a6,_0x283b6d)=>{_0x283b6d[0x0][_0x28e351([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4c044b++,_0x4c044b==(0x5dba96fc^_0x3e2794)&&(_0x369ae2(),_0x3c61a6[_0x28e351([0x6f,0x66,0x66])]());});}))];return window[_0x28e351([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x28e351([0x72,0x61,0x63,0x65])](_0x36951a)[_0x28e351([0x74,0x68,0x65,0x6e])](()=>_0x1882fd);}async function _0x1e40e0(){await _0x1b2f09,_0xfb4889[_0x28e351([0x6d,0x6f,0x64,0x65,0x6c])][_0x28e351([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x32a345,_0xfb4889[_0x28e351([0x6d,0x6f,0x64,0x65,0x6c])][_0x28e351([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x32a345,_0xfb4889[_0x28e351([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x28e351([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3bf3a0(_0x354a8a){const _0x1db448=_0xa9a349();_0xfb4889[_0x1db448]=_0x28e351([0x73,0x6f,0x75,0x72,0x63,0x65,0x45,0x64,0x69,0x74,0x69,0x6e,0x67,0x45,0x6e,0x68,0x61,0x6e,0x63,0x65,0x64,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x354a8a,_0x354a8a!=_0x28e351([0x56,0x61,0x6c,0x69,0x64])&&_0x1e40e0();}function _0xa9a349(){const _0x482446=window[_0x28e351([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x28e351([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x28e351([0x6e,0x6f,0x77])]())[_0x28e351([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x28e351([0x2e]),'');let _0x1b98c5=_0x28e351([0x4e]);for(let _0x4d653b=0x0;_0x4d653b<_0x482446[_0x28e351([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d653b+=0x2){let _0x5abee6=window[_0x28e351([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x482446[_0x28e351([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4d653b,_0x4d653b+0x2));_0x5abee6>=_0xfc07ff[_0x28e351([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5abee6-=_0xfc07ff[_0x28e351([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1b98c5+=_0xfc07ff[_0x5abee6];}return _0x1b98c5;}function _0x5acf06(){const _0x11b8a0=_0x57ddbf[_0x28e351([0x73,0x70,0x6c,0x69,0x74])](_0x28e351([0x2e]));if(0x3!=_0x11b8a0[_0x28e351([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x360192(_0x11b8a0[0x1]);function _0x360192(_0x315b5c){const _0x56ea88=_0x5dcaff(_0x315b5c);return _0x56ea88&&_0x2ca281()?_0x56ea88:null;function _0x2ca281(){const _0x1be68f=_0x56ea88[_0x28e351([0x6a,0x74,0x69])],_0x3ed751=window[_0x28e351([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1be68f[_0x28e351([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1be68f[_0x28e351([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3ae053={..._0x56ea88,[_0x28e351([0x6a,0x74,0x69])]:_0x1be68f[_0x28e351([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1be68f[_0x28e351([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3ae053[_0x28e351([0x76,0x63])],_0x1e5854(_0x3ae053)==_0x3ed751;}}}async function _0x39c8c7(){let _0x4a4857=!0x0;try{const _0x3bdb20=_0x57ddbf[_0x28e351([0x73,0x70,0x6c,0x69,0x74])](_0x28e351([0x2e])),[_0x49e41b,_0x27a687,_0x2f9cce]=_0x3bdb20;return _0x5b93db(_0x49e41b),await _0x538df5(_0x49e41b,_0x27a687,_0x2f9cce),_0x4a4857;}catch{return!0x1;}function _0x5b93db(_0x4c7418){const _0x5156c6=_0x5dcaff(_0x4c7418);_0x5156c6&&_0x5156c6[_0x28e351([0x61,0x6c,0x67])]==_0x28e351([0x45,0x53,0x32,0x35,0x36])||(_0x4a4857=!0x1);}async function _0x538df5(_0x5072fc,_0x30f650,_0x5b9878){const _0x44bb40=window[_0x28e351([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x28e351([0x66,0x72,0x6f,0x6d])](_0x5c0065(_0x5b9878),_0x258561=>_0x258561[_0x28e351([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x43d5d0=new window[(_0x28e351([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x28e351([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5072fc+_0x28e351([0x2e])+_0x30f650),_0x11df14=window[_0x28e351([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x28e351([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x11df14)return;const _0x38abd0=await _0x11df14[_0x28e351([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x28e351([0x6a,0x77,0x6b]),_0x3163c3,{[_0x28e351([0x6e,0x61,0x6d,0x65])]:_0x28e351([0x45,0x43,0x44,0x53,0x41]),[_0x28e351([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x28e351([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x28e351([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x11df14[_0x28e351([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x28e351([0x6e,0x61,0x6d,0x65])]:_0x28e351([0x45,0x43,0x44,0x53,0x41]),[_0x28e351([0x68,0x61,0x73,0x68])]:{[_0x28e351([0x6e,0x61,0x6d,0x65])]:_0x28e351([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x38abd0,_0x44bb40,_0x43d5d0)||(_0x4a4857=!0x1);}}function _0x5dcaff(_0x17872e){return _0x17872e[_0x28e351([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x28e351([0x65,0x79]))?JSON[_0x28e351([0x70,0x61,0x72,0x73,0x65])](_0x5c0065(_0x17872e)):null;}function _0x5c0065(_0x32d6db){return window[_0x28e351([0x61,0x74,0x6f,0x62])](_0x32d6db[_0x28e351([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x28e351([0x2b]))[_0x28e351([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x28e351([0x2f])));}function _0x1e5854(_0x5622b2){let _0x2a6eca=0x1505;function _0x1646b5(_0x3cc6d3){for(let _0x52a557=0x0;_0x52a557<_0x3cc6d3[_0x28e351([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x52a557++){const _0x540e48=_0x3cc6d3[_0x28e351([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x52a557);_0x2a6eca=(_0x2a6eca<<0x5)+_0x2a6eca+_0x540e48,_0x2a6eca&=_0x2a6eca;}}function _0x44f986(_0x510d05){Array[_0x28e351([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x510d05)?_0x510d05[_0x28e351([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x44f986):_0x510d05&&typeof _0x510d05==_0x28e351([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x28e351([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x510d05)[_0x28e351([0x73,0x6f,0x72,0x74])]()[_0x28e351([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x382059,_0xe2e9fd])=>{_0x1646b5(_0x382059),_0x44f986(_0xe2e9fd);}):_0x1646b5(window[_0x28e351([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x510d05));}return _0x44f986(_0x5622b2),_0x2a6eca>>>0x0;}function _0x9ce240(_0x157126){return _0x157126[_0x28e351([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x28e351([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x28e351([0x30]));}function _0x191096(_0xe8a82){return _0xe8a82[_0x28e351([0x73,0x70,0x6c,0x69,0x74])]('')[_0x28e351([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x28e351([0x6a,0x6f,0x69,0x6e])]('');}function _0x32a345(){}function _0x28e351(_0x1433d0){return _0x1433d0['map'](_0xb748c4=>String['fromCharCode'](_0xb748c4))['join']('');}_0x3bf3a0(await _0x126956());}(this);}['_createButton'](_0x7a2b28,_0x19ab98,_0x3d9742=!0x1){const _0x5d0816=new _0x7a2b28(this['editor']['locale']);return _0x5d0816['set']({'withText':_0x3d9742,'isToggleable':!0x1}),_0x5d0816['bind']('isEnabled')['to'](_0x19ab98,'isEnabled'),this['listenTo'](_0x5d0816,'execute',()=>_0x19ab98['execute']()),_0x5d0816;}['_registerKeybindings'](){const _0x417266=this['editor']['locale'];this['editor']['accessibility']['addKeystrokeInfoCategory']({'id':'sourceEditingEnhanced','label':q(_0x417266,'Source\x20Editing\x20Enhanced')});const _0x126051=_0xad5a55['isMac']||_0xad5a55['isiOS'];this['editor']['accessibility']['addKeystrokeInfos']({'categoryId':'sourceEditingEnhanced','keystrokes':[{'label':q(_0x417266,'Copy\x20line\x20down'),'keystroke':'Shift+Alt+ArrowDown'},{'label':q(_0x417266,'Copy\x20line\x20up'),'keystroke':'Shift+Alt+ArrowUp'},{'label':q(_0x417266,'Delete\x20line'),'keystroke':'Shift+Ctrl+K'},{'label':q(_0x417266,'Indent\x20less'),'keystroke':'Ctrl+['},{'label':q(_0x417266,'Indent\x20more'),'keystroke':'Ctrl+]'},{'label':q(_0x417266,'Fold\x20all'),'keystroke':'Ctrl!+Alt+['},{'label':q(_0x417266,'Fold\x20code\x20(current\x20level)'),'keystroke':_0x126051?'Cmd+Alt+[':'Ctrl+Shift+['},{'label':q(_0x417266,'Move\x20line\x20down'),'keystroke':'Alt+ArrowDown'},{'label':q(_0x417266,'Move\x20line\x20up'),'keystroke':'Alt+ArrowUp'},{'label':q(_0x417266,'Redo\x20(keystroke)'),'keystroke':[['Ctrl+Shift+Z'],['Ctrl+Y']]},{'label':q(_0x417266,'Select\x20line'),'keystroke':_0x126051?'Ctrl!+L':'Alt+L'},{'label':q(_0x417266,'Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode'),'keystroke':_0x126051?'Alt+Shift+M':'Ctrl+M'},{'label':q(_0x417266,'Toggle\x20block\x20comment'),'keystroke':'Shift+Alt+A'},{'label':q(_0x417266,'Toggle\x20comment'),'keystroke':'Ctrl+/'},{'label':q(_0x417266,'Undo\x20(keystroke)'),'keystroke':'Ctrl+Z'},{'label':q(_0x417266,'Unfold\x20all'),'keystroke':'Ctrl!+Alt+]'},{'label':q(_0x417266,'Unfold\x20code\x20(current\x20level)'),'keystroke':_0x126051?'Cmd+Alt+]':'Ctrl+Shift+]'}]});}}class ReplaceSourceCommand extends _0x1182fb{constructor(_0x479543){super(_0x479543),this['refresh']();}['refresh'](){this['isEnabled']=!this['editor']['isReadOnly'];}['execute'](_0x30274d,_0x2f25a2){const _0x545325=this['editor'],_0x20f000=_0x2f25a2?.['rootName']??H(_0x545325);_0x545325['data']['set']({[_0x20f000]:_0x30274d},{'batchType':{'isUndoable':!0x0},'suppressErrorInCollaboration':!0x0});}}class SourceEditingEnhanced extends _0x58d2b0{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'SourceEditingEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[SourceEditingEnhancedUI];}constructor(_0x26adb3){super(_0x26adb3),_0x26adb3['config']['define']('sourceEditingEnhanced.allowCollaborationFeatures',!0x1);}['init'](){this['_checkCompatibility'](),this['editor']['commands']['add']('replaceSource',new ReplaceSourceCommand(this['editor'])),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2facf1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x313d51;for(const _0x1696c5 in _0x2facf1){const _0x4c3fa8=_0x1696c5,_0x140cfb=_0x2facf1[_0x4c3fa8];if('sourceEditingEnhancedLicenseKeyValid'==_0x140cfb||'sourceEditingEnhancedLicenseKeyInvalid'==_0x140cfb||'sourceEditingEnhancedLicenseKeyExpired'==_0x140cfb||'sourceEditingEnhancedLicenseKeyDomainLimit'==_0x140cfb||'sourceEditingEnhancedLicenseKeyNotAllowed'==_0x140cfb||'sourceEditingEnhancedLicenseKeyEvaluationLimit'==_0x140cfb||'sourceEditingEnhancedLicenseKeyUsageLimit'==_0x140cfb){delete _0x2facf1[_0x4c3fa8],_0x313d51=_0x140cfb,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'sourceEditingEnhancedLicenseKeyInvalid'==_0x313d51&&_0x2facf1['_showLicenseError']('invalid'),'sourceEditingEnhancedLicenseKeyExpired'==_0x313d51&&_0x2facf1['_showLicenseError']('expired'),'sourceEditingEnhancedLicenseKeyDomainLimit'==_0x313d51&&_0x2facf1['_showLicenseError']('domainLimit'),'sourceEditingEnhancedLicenseKeyNotAllowed'==_0x313d51&&_0x2facf1['_showLicenseError']('featureNotAllowed','SourceEditingEnhanced'),'sourceEditingEnhancedLicenseKeyEvaluationLimit'==_0x313d51&&_0x2facf1['_showLicenseError']('evaluationLimit'),'sourceEditingEnhancedLicenseKeyUsageLimit'==_0x313d51&&_0x2facf1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_checkCompatibility'](){const _0x159df7=this['editor'],_0x2b4ea1=_0x159df7['config']['get']('sourceEditingEnhanced.allowCollaborationFeatures');if(!_0x2b4ea1&&_0x159df7['plugins']['has']('RealTimeCollaborativeEditing'))throw new _0x53e78f('source-editing-enhanced-incompatible-with-real-time-collaboration',null);!_0x2b4ea1&&['CommentsEditing','TrackChangesEditing','RevisionHistory']['some'](_0x10897d=>_0x159df7['plugins']['has'](_0x10897d))&&console['warn']('You\x20initialized\x20the\x20editor\x20with\x20the\x20source\x20editing\x20enhanced\x20feature\x20and\x20at\x20least\x20one\x20of\x20the\x20collaboration\x20features.\x20Please\x20be\x20advised\x20that\x20the\x20source\x20editing\x20feature\x20may\x20not\x20work,\x20and\x20be\x20careful\x20when\x20editing\x20document\x20source\x20that\x20contains\x20markers\x20created\x20by\x20the\x20collaboration\x20features.'),_0x159df7['plugins']['has']('RestrictedEditingModeEditing')&&console['warn']('You\x20initialized\x20the\x20editor\x20with\x20the\x20source\x20editing\x20enhanced\x20feature\x20and\x20restricted\x20editing\x20feature.\x20Please\x20be\x20advised\x20that\x20the\x20source\x20editing\x20enhanced\x20feature\x20may\x20not\x20work,\x20and\x20be\x20careful\x20when\x20editing\x20document\x20source\x20that\x20contains\x20markers\x20created\x20by\x20the\x20restricted\x20editing\x20feature.');}}export{EditSourceCommand,ReplaceSourceCommand,SourceEditingEnhanced};
|
|
23
|
+
import{Command as _0x53397,PendingActions as _0x354f62,Plugin as _0x35d64a}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x525cbe,env as _0x316111,formatHtml as _0x4857c8,uid as _0x140246}from'@ckeditor/ckeditor5-utils';import{IconSource as _0x1dc415}from'@ckeditor/ckeditor5-icons';import{ButtonView as _0x290fc6,MenuBarMenuListItemButtonView as _0x268d28,View as _0x317019}from'@ckeditor/ckeditor5-ui';import{EditorView as _0x129930,crosshairCursor as _0x502cc9,drawSelection as _0x3f15a1,dropCursor as _0x23c881,highlightActiveLine as _0x1a1c40,highlightActiveLineGutter as _0x3e6a2f,highlightSpecialChars as _0x8f26,keymap as _0x37b815,lineNumbers as _0x54c421,rectangularSelection as _0x196382}from'@codemirror/view';import{Compartment as _0xf3526e,Transaction as _0x2995b6}from'@codemirror/state';import{bracketMatching as _0x53de5a,defaultHighlightStyle as _0x860518,foldGutter as _0x1e7390,foldKeymap as _0x4681cd,indentOnInput as _0x4304dd,syntaxHighlighting as _0x22488e}from'@codemirror/language';import{defaultKeymap as _0x510ee3,history as _0x40402a,historyKeymap as _0x179b3f,indentLess as _0x18aea6,indentMore as _0x5f5191,redo as _0x36ac02,toggleTabFocusMode as _0x56278c,undo as _0x208238}from'@codemirror/commands';import{autocompletion as _0x261c75,closeBrackets as _0x4fae46,closeBracketsKeymap as _0x596ff2,completionKeymap as _0x188d7e}from'@codemirror/autocomplete';import{html as _0x2cdf5b}from'@codemirror/lang-html';import{markdown as _0x11d1e9}from'@codemirror/lang-markdown';import{oneDark as _0x5ce618}from'@codemirror/theme-one-dark';function Q(_0x1accaa,_0x577529){const t=_0x1accaa['t'];switch(_0x577529){case'Edit\x20source\x20modal\x20label':return t({'string':'Edit\x20source','id':'Edit\x20source\x20modal\x20label'});case'Source':return t('Source');case'Source\x20Editing\x20Enhanced':return t('Source\x20Editing\x20Enhanced');case'Copy\x20line\x20down':return t('Copy\x20line\x20down');case'Copy\x20line\x20up':return t('Copy\x20line\x20up');case'Delete\x20line':return t('Delete\x20line');case'Indent\x20less':return t('Indent\x20less');case'Indent\x20more':return t('Indent\x20more');case'Fold\x20all':return t('Fold\x20all');case'Fold\x20code\x20(current\x20level)':return t('Fold\x20code\x20(current\x20level)');case'Move\x20line\x20down':return t('Move\x20line\x20down');case'Move\x20line\x20up':return t('Move\x20line\x20up');case'Redo\x20(keystroke)':return t({'id':'Redo\x20(keystroke)','string':'Redo'});case'Select\x20line':return t('Select\x20line');case'Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':return t('Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode');case'Toggle\x20block\x20comment':return t('Toggle\x20block\x20comment');case'Toggle\x20comment':return t('Toggle\x20comment');case'Undo\x20(keystroke)':return t({'id':'Undo\x20(keystroke)','string':'Undo'});case'Unfold\x20all':return t('Unfold\x20all');case'Unfold\x20code\x20(current\x20level)':return t('Unfold\x20code\x20(current\x20level)');case'Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':return t('Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.');case'Cancel':return t('Cancel');case'Save':return t('Save');default:return _0x577529;}}function B(_0x30cbc4){const _0x38c124=_0x30cbc4['editing']['view']['document']['roots'],_0x4c2032=_0x38c124['length'];if(0x0===_0x4c2032)throw new _0x525cbe('source-editing-enhanced-editor-no-root',_0x30cbc4);return 0x1===_0x4c2032?_0x38c124['first']['rootName']:Array['from'](_0x30cbc4['editing']['view']['document']['selection']['getRanges']())[0x0]['root']['rootName'];}function Y(_0x56710f){return J(_0x56710f['replace'](/^[\n\s]*/g,''))?_0x56710f['replace'](/\s+/g,''):_0x56710f;}function J(_0x3cc1c3){return _0x3cc1c3['startsWith']('<');}function X(_0x392dbf){const _0x15d41f=[_0x129930['lineWrapping'],_0x261c75(),_0x53de5a(),_0x4fae46(),_0x502cc9(),_0x3f15a1(),_0x23c881(),_0x54c421(),_0x1e7390(),_0x1a1c40(),_0x3e6a2f(),_0x8f26(),_0x40402a(),_0x4304dd(),_0x196382(),_0x22488e(_0x860518,{'fallback':!0x0})],_0x426f0a=new _0xf3526e();_0x15d41f['push'](_0x426f0a['of'](_0x129930['editable']['of'](!0x0))),'html'===_0x392dbf['syntaxLanguage']?_0x15d41f['push'](_0x2cdf5b()):_0x15d41f['push'](_0x11d1e9());const _0x24dd6d=(_0x52d769=_0x392dbf['theme'])&&'default'!==_0x52d769?'dark'===_0x52d769?_0x5ce618:_0x52d769:null;var _0x52d769;_0x24dd6d&&_0x15d41f['push'](_0x24dd6d),_0x15d41f['push'](_0x37b815['of']([..._0x596ff2,..._0x510ee3,..._0x179b3f,..._0x4681cd,..._0x188d7e,{'key':'Tab','run':_0x5f5191,'shift':_0x18aea6,'preventDefault':!0x0,'stopPropagation':!0x0},{'key':'Ctrl-y','mac':'Cmd-y','run':_0x36ac02,'preventDefault':!0x0,'stopPropagation':!0x0},{'key':'Ctrl-Shift-z','mac':'Cmd-Shift-z','run':_0x36ac02,'preventDefault':!0x0,'stopPropagation':!0x0},{'key':'Ctrl-z','mac':'Cmd-z','run':_0x208238,'preventDefault':!0x0,'stopPropagation':!0x0}]));const _0xe4e296=new _0x129930({'extensions':_0x15d41f,'parent':_0x392dbf['parent']});return _0x56278c(_0xe4e296),{'focus':()=>{_0xe4e296['dispatch']({'selection':{'anchor':0x0},'scrollIntoView':!0x0}),_0xe4e296['focus']();},'getData':()=>_0xe4e296['state']['doc']['toString'](),'setData':_0x39ca70=>{_0xe4e296['dispatch']({'changes':{'from':0x0,'to':_0xe4e296['state']['doc']['length'],'insert':_0x39ca70},'annotations':_0x2995b6['addToHistory']['of'](!0x1)});},'setReadOnly':_0x1464c6=>{_0xe4e296['dispatch']({'effects':[_0x426f0a['reconfigure'](_0x129930['editable']['of'](!_0x1464c6))]});},'destroy':()=>{_0xe4e296['destroy']();},'instance':_0xe4e296};}var Z=class extends _0x317019{['_codeEditorApi']=null;['_options'];constructor(_0x4e224e,_0x59aa6c){super(_0x4e224e),this['_options']=_0x59aa6c,this['set']('isReadOnly',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-code-editor'],'tabindex':-0x1}});}['render'](){super['render'](),this['_codeEditorApi']=X({'parent':this['element'],'syntaxLanguage':this['_options']['syntaxLanguage'],'theme':this['_options']['theme']}),this['on']('change:isReadOnly',(_0x4acc7c,_0x2db643,_0x17380b)=>{this['setReadOnly'](_0x17380b);});}['destroy'](){super['destroy'](),this['_codeEditorApi']['destroy'](),this['_codeEditorApi']=null;}['focus'](){this['isReadOnly']?this['element']['focus']():this['_codeEditorApi']['focus']();}['getData'](){return this['_codeEditorApi']['getData']();}['setData'](_0x2fcf10){this['_codeEditorApi']['setData'](_0x2fcf10);}['setReadOnly'](_0x35716b){this['_codeEditorApi']['setReadOnly'](_0x35716b);}};const G='SourceEditingEnhancedMode';var W=class extends _0x53397{constructor(_0x5c7382){super(_0x5c7382),this['affectsData']=!0x1,this['editor']['plugins']['get'](_0x354f62)['on']('change:hasAny',(_0xbfbf27,_0x5f5948,_0x1d4991)=>{_0x1d4991?this['forceDisabled']('pendingActions'):this['clearForceDisabled']('pendingActions');});}['_disableCommands'](){const _0x173957=this['editor'];for(const _0x3b0b86 of _0x173957['commands']['names']())['replaceSource','editSource']['includes'](_0x3b0b86)||_0x173957['commands']['get'](_0x3b0b86)['forceDisabled'](G);}['_enableCommands'](){const _0x38ab24=this['editor'];for(const _0x1ab1a4 of _0x38ab24['commands']['commands']())_0x1ab1a4['clearForceDisabled'](G);}['refresh'](){this['isEnabled']=!0x0;}['execute'](){const _0x511137=this['editor'],_0x43be62=_0x511137['locale'],_0x358bb6=_0x511137['plugins']['get']('Dialog'),_0x521de6=B(_0x511137),_0x1e7abf=J(_0x353334=_0x511137['data']['get']({'rootName':_0x521de6}))?_0x4857c8(_0x353334):_0x353334;var _0x353334;const _0x164a89=new Z(_0x43be62,{'syntaxLanguage':_0x511137['plugins']['has']('Markdown')?'markdown':'html','theme':_0x511137['config']['get']('sourceEditingEnhanced.theme')});let _0x4dc209=!0x0;const _0x40bdca=_0x2760ac=>{if(_0x4dc209&&Y(_0x164a89['getData']())!==Y(_0x1e7abf))return window['confirm'](Q(_0x43be62,'Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.'))?void 0x0:_0x2760ac['stop']();};_0x358bb6['show']({'id':'sourceEditingEnhanced','title':Q(_0x43be62,'Edit\x20source\x20modal\x20label'),'isModal':!0x0,'className':'ck-source-editing-enhanced-dialog','content':_0x164a89,'actionButtons':[{'label':Q(_0x43be62,'Cancel'),'withText':!0x0,'onExecute':()=>{_0x358bb6['hide']();}},{'label':Q(_0x43be62,'Save'),'class':'ck-button-action','withText':!0x0,'onExecute':()=>{const _0x21e8f4=Y(_0x164a89['getData']())!==Y(_0x1e7abf);_0x21e8f4&&_0x511137['execute']('replaceSource',_0x164a89['getData']()),_0x4dc209=!0x1,_0x358bb6['hide'](),_0x21e8f4&&'editables'in _0x511137['ui']['view']&&_0x511137['ui']['view']['editables'][_0x521de6]['element']['focus']();},'onCreate':_0x26d053=>{_0x26d053['set']('isEnabled',!_0x511137['isReadOnly']),_0x26d053['bind']('isEnabled')['to'](_0x511137,'isReadOnly',this,'isEnabled',(_0x59ff9f,_0xa70fae)=>!_0x59ff9f&&_0xa70fae);}}],'onHide':()=>{this['_enableCommands'](),_0x358bb6['off']('hide',_0x40bdca),_0x164a89['destroy']();},'onShow':()=>{_0x164a89['bind']('isReadOnly')['to'](_0x511137,'isReadOnly',this,'isEnabled',(_0x1f262f,_0x5c4562)=>_0x1f262f||!_0x5c4562),_0x164a89['setData'](_0x1e7abf),_0x164a89['focus'](),_0x358bb6['on']('hide',_0x40bdca,{'priority':'highest'}),this['_disableCommands']();}});}},$=class extends _0x35d64a{static get['pluginName'](){return'SourceEditingEnhancedUI';}static get['requires'](){return[_0x354f62];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x436d7e=this['editor'],_0x1f6fd1=_0x436d7e['locale'],_0x58d47e=new W(_0x436d7e);_0x436d7e['commands']['add']('editSource',_0x58d47e),_0x436d7e['ui']['componentFactory']['add']('sourceEditingEnhanced',()=>{const _0x503c8d=this['_createButton'](_0x290fc6,_0x58d47e);return _0x503c8d['set']({'label':Q(_0x1f6fd1,'Source'),'icon':_0x1dc415,'tooltip':Q(_0x1f6fd1,'Edit\x20source\x20modal\x20label'),'class':'ck-source-editing-enhanced-button'}),_0x503c8d;}),_0x436d7e['ui']['componentFactory']['add']('menuBar:sourceEditingEnhanced',()=>{const _0x349924=this['_createButton'](_0x268d28,_0x58d47e,!0x0);return _0x349924['set']({'label':Q(_0x1f6fd1,'Edit\x20source\x20modal\x20label'),'icon':_0x1dc415,'role':'menuitemcheckbox'}),_0x349924;}),this['_registerKeybindings']();}['afterInit'](){!async function(_0xafa5c6){const _0x557dac='NQVXyBFHJzr8WGI4aZnTeoUx6p9jfv3DitLwuckYlhdMA2K5S7mbCOPEs1qgR0',_0x735d67=0x78de0,_0x480949=window['Date']['now'](),_0x5d184b=_0xafa5c6['editor'],_0x4cb4db=new window['Promise'](_0x46413a=>{_0x5d184b['once']('ready',_0x46413a);}),_0x112e19={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x5392be=_0x5d184b['config']['get']('licenseKey');async function _0x9af259(){let _0x3c553d,_0x718894=null,_0x282ac9=null;try{return'GPL'==_0x5392be?'NotAllowed':(_0x3c553d=_0xe2fd84(),_0x3c553d?(_0x3c553d['usageEndpoint']&&(_0x282ac9=_0xf821e9(_0x3c553d['usageEndpoint'],_0x3c553d['jti'])),await _0x3fbfcf()?_0x1bd836()?_0x1e2cb5()?'Expired':_0x39e22e()?('evaluation'==_0x3c553d['licenseType']&&(_0x718894=_0x78eefe('EvaluationLimit')),await _0x5cd842()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x1e2cb5(){const _0x11d691=['evaluation','trial']['includes'](_0x3c553d['licenseType'])?_0x480949/0x3e8:0xe10*_0x735d67;return _0x3c553d['exp']<_0x11d691;}function _0x1bd836(){const _0x57d882=_0x3c553d['features'];return!!_0x57d882&&(!!_0x57d882['includes']('*')||!!_0x57d882['includes']('SEE'));}function _0x39e22e(){const _0x3c2d72=_0x3c553d['licensedHosts'];if(!_0x3c2d72||0x0==_0x3c2d72['length'])return!0x0;const {hostname:_0x6c8756}=new URL(window['location']['href']);if(_0x3c2d72['includes'](_0x6c8756))return!0x0;const _0x43dd53=_0x6c8756['split']('.');return _0x3c2d72['filter'](_0x3f9d5d=>_0x3f9d5d['includes']('*'))['map'](_0xbd1913=>_0xbd1913['split']('.'))['filter'](_0x439541=>_0x439541['length']<=_0x43dd53['length'])['map'](_0x16766f=>Array(_0x43dd53['length']-_0x16766f['length'])['fill']('*'===_0x16766f[0x0]?'*':'')['concat'](_0x16766f))['some'](_0x871c91=>_0x43dd53['every']((_0xeeba81,_0xb53818)=>_0x871c91[_0xb53818]===_0xeeba81||'*'===_0x871c91[_0xb53818]));}function _0x5cd842(){return _0x718894&&_0x282ac9?new window['Promise']((_0x50f6a1,_0x47fc84)=>{_0x718894['then'](_0x50f6a1,_0x47fc84),_0x282ac9['then'](_0x9efd03=>{'Valid'!=_0x9efd03&&_0x50f6a1(_0x9efd03);},_0x47fc84);}):_0x718894||_0x282ac9||'Valid';}}function _0xf821e9(_0x1c2ba4,_0x30c3cb){return new window['Promise'](_0x13abd6=>{if(_0x5602bb())return _0x13abd6('Valid');_0x3061f8(),_0x5d184b['decorate']('_sendUsageRequest');let _0x3984cf=!0x1;const _0x5eb208=_0x140246();function _0x546b41(_0x59b28a){return!!_0x59b28a&&('object'==typeof _0x59b28a||'function'==typeof _0x59b28a)&&'function'==typeof _0x59b28a['then']&&'function'==typeof _0x59b28a['catch'];}function _0x431c99(_0xb6d882){_0x40919c(_0xb6d882)['then'](_0x397ea3=>_0x397ea3&&'ok'==_0x397ea3['status']?_0x4b5444(_0x5aa5c1(_0x5eb208+_0x30c3cb))!=_0x397ea3['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2ae233=>(_0xd1d490(),_0x2ae233),()=>{const _0x1d042c=_0xcaab2a();return null==_0x1d042c?(_0xd1d490(),'Valid'):_0x480949-_0x1d042c>0x240c8400?'UsageLimit':'Valid';})['then'](_0x13abd6)['catch'](()=>{_0x13abd6('UsageLimit');});const _0x4b5134=0x36ee80;function _0xd1d490(){const _0x5c2562='llct-'+_0x4b5444(_0x5aa5c1(_0x1c2ba4)),_0x475911=_0x1bdeba(_0x4b5444(window['Math']['ceil'](_0x480949/_0x4b5134)));window['localStorage']['setItem'](_0x5c2562,_0x475911);}function _0xcaab2a(){const _0x27a9c8='llct-'+_0x4b5444(_0x5aa5c1(_0x1c2ba4)),_0x2d07c2=window['localStorage']['getItem'](_0x27a9c8);return _0x2d07c2?window['parseInt'](_0x1bdeba(_0x2d07c2),0x10)*_0x4b5134:null;}function _0x40919c(_0x134411){return new window['Promise']((_0x57cb68,_0xd455f5)=>{_0x134411['then'](_0x57cb68,_0xd455f5),window['setTimeout'](_0xd455f5,0x1d4c0);});}}_0x5d184b['on']('_sendUsageRequest',(_0xa7e31a,_0x3216ad)=>{if(_0x3216ad[0x0]!=_0x1c2ba4)return _0x13abd6('UsageLimit');_0x3216ad[0x1]={..._0x3216ad[0x1],'requestId':_0x5eb208};},{'priority':'high'}),_0x5d184b['on']('_sendUsageRequest',_0x535849=>{_0x546b41(_0x535849['return'])&&(_0x3984cf=!0x0,_0x431c99(_0x535849['return']));},{'priority':'low'}),_0x4cb4db['then'](()=>{_0x3984cf||_0x13abd6('UsageLimit');});});function _0x5602bb(){return'auto'==_0x5d184b['editing']['view']['_overlayModeHint'];}function _0x3061f8(){_0x5d184b['editing']['view']['_overlayModeHint']='auto';}}function _0x78eefe(_0x4e7522){const _0x5ae973=[new window['Promise'](_0x111f27=>setTimeout(_0x111f27,0x93ecc)),_0x4cb4db['then'](()=>new window['Promise'](_0x200e26=>{let _0x545b61=0x0;_0x5d184b['model']['on']('applyOperation',(_0x5ce497,_0x386278)=>{_0x386278[0x0]['isDocumentOperation']&&_0x545b61++,0x5e8==_0x545b61&&(_0x200e26(),_0x5ce497['off']());});}))];return window['Promise']['race'](_0x5ae973)['then'](()=>_0x4e7522);}async function _0x220aa7(){await _0x4cb4db,_0x5d184b['model']['change']=_0x22871a,_0x5d184b['model']['enqueueChange']=_0x22871a,_0x5d184b['enableReadOnlyMode']('model');}function _0x3e217e(_0x4c8492){const _0x34e9e2=_0x583eb6();_0x5d184b[_0x34e9e2]='sourceEditingEnhancedLicenseKey'+_0x4c8492,'Valid'!=_0x4c8492&&_0x220aa7();}function _0x583eb6(){const _0x4a9334=window['String'](window['performance']['now']())['replace']('.','');let _0x253c15='N';for(let _0x4e0594=0x0;_0x4e0594<_0x4a9334['length'];_0x4e0594+=0x2){let _0x4d42e1=window['parseInt'](_0x4a9334['substring'](_0x4e0594,_0x4e0594+0x2));_0x4d42e1>=0x3e&&(_0x4d42e1-=0x3e),_0x253c15+=_0x557dac[_0x4d42e1];}return _0x253c15;}function _0xe2fd84(){const _0x1221bd=_0x5392be['split']('.');if(0x3!=_0x1221bd['length'])return null;return _0xff5768(_0x1221bd[0x1]);function _0xff5768(_0x314c11){const _0x45bd6d=_0x3ebe3f(_0x314c11);return _0x45bd6d&&_0x238e6b()?_0x45bd6d:null;function _0x238e6b(){const _0x4502c7=_0x45bd6d['jti'],_0x1f3dac=window['parseInt'](_0x4502c7['substring'](_0x4502c7['length']-0x8),0x10),_0x18fd1a={..._0x45bd6d,'jti':_0x4502c7['substring'](0x0,_0x4502c7['length']-0x8)};return delete _0x18fd1a['vc'],_0x5aa5c1(_0x18fd1a)==_0x1f3dac;}}}async function _0x3fbfcf(){let _0x5ca79e=!0x0;try{const [_0x1a0065,_0x4efcea,_0x43468c]=_0x5392be['split']('.');return _0x19f7dd(_0x1a0065),await _0x58c6b9(_0x1a0065,_0x4efcea,_0x43468c),_0x5ca79e;}catch{return!0x1;}function _0x19f7dd(_0x26066d){const _0x580e2a=_0x3ebe3f(_0x26066d);_0x580e2a&&'ES256'==_0x580e2a['alg']||(_0x5ca79e=!0x1);}async function _0x58c6b9(_0x221cd3,_0x1f5e43,_0x225bc7){const _0x4dad91=window['Uint8Array']['from'](_0x54fba7(_0x225bc7),_0xd6ce60=>_0xd6ce60['charCodeAt'](0x0)),_0x3ab3b6=new window['TextEncoder']()['encode'](_0x221cd3+'.'+_0x1f5e43),_0xaf1723=window['crypto']['subtle'];if(!_0xaf1723)return;const _0x35f8cf=await _0xaf1723['importKey']('jwk',_0x112e19,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0xaf1723['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x35f8cf,_0x4dad91,_0x3ab3b6)||(_0x5ca79e=!0x1);}}function _0x3ebe3f(_0x3c8f48){return _0x3c8f48['startsWith']('ey')?JSON['parse'](_0x54fba7(_0x3c8f48)):null;}function _0x54fba7(_0x49a8db){return window['atob'](_0x49a8db['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5aa5c1(_0x357bf6){let _0x1ca3f0=0x1505;function _0xd2ed9d(_0xa09e4a){for(let _0x590bb1=0x0;_0x590bb1<_0xa09e4a['length'];_0x590bb1++){const _0x3c55cb=_0xa09e4a['charCodeAt'](_0x590bb1);_0x1ca3f0=(_0x1ca3f0<<0x5)+_0x1ca3f0+_0x3c55cb,_0x1ca3f0&=_0x1ca3f0;}}function _0x35de73(_0x1ae45f){Array['isArray'](_0x1ae45f)?_0x1ae45f['forEach'](_0x35de73):_0x1ae45f&&'object'==typeof _0x1ae45f?Object['entries'](_0x1ae45f)['sort']()['forEach'](([_0x24ab1b,_0x4d9cfc])=>{_0xd2ed9d(_0x24ab1b),_0x35de73(_0x4d9cfc);}):_0xd2ed9d(window['String'](_0x1ae45f));}return _0x35de73(_0x357bf6),_0x1ca3f0>>>0x0;}function _0x4b5444(_0x32e6aa){return _0x32e6aa['toString'](0x10)['padStart'](0x8,'0');}function _0x1bdeba(_0xfcc3f7){return _0xfcc3f7['split']('')['reverse']()['join']('');}function _0x22871a(){}_0x3e217e(await _0x9af259());}(this);}['_createButton'](_0x512565,_0x1a5bc6,_0x3425b7=!0x1){const _0x2095ce=new _0x512565(this['editor']['locale']);return _0x2095ce['set']({'withText':_0x3425b7,'isToggleable':!0x1}),_0x2095ce['bind']('isEnabled')['to'](_0x1a5bc6,'isEnabled'),this['listenTo'](_0x2095ce,'execute',()=>_0x1a5bc6['execute']()),_0x2095ce;}['_registerKeybindings'](){const _0x59476e=this['editor']['locale'];this['editor']['accessibility']['addKeystrokeInfoCategory']({'id':'sourceEditingEnhanced','label':Q(_0x59476e,'Source\x20Editing\x20Enhanced')});const _0x411183=_0x316111['isMac']||_0x316111['isiOS'];this['editor']['accessibility']['addKeystrokeInfos']({'categoryId':'sourceEditingEnhanced','keystrokes':[{'label':Q(_0x59476e,'Copy\x20line\x20down'),'keystroke':'Shift+Alt+ArrowDown'},{'label':Q(_0x59476e,'Copy\x20line\x20up'),'keystroke':'Shift+Alt+ArrowUp'},{'label':Q(_0x59476e,'Delete\x20line'),'keystroke':'Shift+Ctrl+K'},{'label':Q(_0x59476e,'Indent\x20less'),'keystroke':'Ctrl+['},{'label':Q(_0x59476e,'Indent\x20more'),'keystroke':'Ctrl+]'},{'label':Q(_0x59476e,'Fold\x20all'),'keystroke':'Ctrl!+Alt+['},{'label':Q(_0x59476e,'Fold\x20code\x20(current\x20level)'),'keystroke':_0x411183?'Cmd+Alt+[':'Ctrl+Shift+['},{'label':Q(_0x59476e,'Move\x20line\x20down'),'keystroke':'Alt+ArrowDown'},{'label':Q(_0x59476e,'Move\x20line\x20up'),'keystroke':'Alt+ArrowUp'},{'label':Q(_0x59476e,'Redo\x20(keystroke)'),'keystroke':[['Ctrl+Shift+Z'],['Ctrl+Y']]},{'label':Q(_0x59476e,'Select\x20line'),'keystroke':_0x411183?'Ctrl!+L':'Alt+L'},{'label':Q(_0x59476e,'Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode'),'keystroke':_0x411183?'Alt+Shift+M':'Ctrl+M'},{'label':Q(_0x59476e,'Toggle\x20block\x20comment'),'keystroke':'Shift+Alt+A'},{'label':Q(_0x59476e,'Toggle\x20comment'),'keystroke':'Ctrl+/'},{'label':Q(_0x59476e,'Undo\x20(keystroke)'),'keystroke':'Ctrl+Z'},{'label':Q(_0x59476e,'Unfold\x20all'),'keystroke':'Ctrl!+Alt+]'},{'label':Q(_0x59476e,'Unfold\x20code\x20(current\x20level)'),'keystroke':_0x411183?'Cmd+Alt+]':'Ctrl+Shift+]'}]});}},ee=class extends _0x53397{constructor(_0x1d95bf){super(_0x1d95bf),this['refresh']();}['refresh'](){this['isEnabled']=!this['editor']['isReadOnly'];}['execute'](_0x42d7f5,_0x4970d0){const _0x10e7d8=this['editor'],_0x500811=_0x4970d0?.['rootName']??B(_0x10e7d8);_0x10e7d8['data']['set']({[_0x500811]:_0x42d7f5},{'batchType':{'isUndoable':!0x0},'suppressErrorInCollaboration':!0x0});}},te=class extends _0x35d64a{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'SourceEditingEnhanced';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[$];}constructor(_0x3c4d85){super(_0x3c4d85),_0x3c4d85['config']['define']('sourceEditingEnhanced.allowCollaborationFeatures',!0x1);}['init'](){this['_checkCompatibility'](),this['editor']['commands']['add']('replaceSource',new ee(this['editor'])),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xc4bbca=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xda0e41;for(const _0x42a693 in _0xc4bbca){const _0x323926=_0x42a693,_0x5d51e2=_0xc4bbca[_0x323926];if('sourceEditingEnhancedLicenseKeyValid'==_0x5d51e2||'sourceEditingEnhancedLicenseKeyInvalid'==_0x5d51e2||'sourceEditingEnhancedLicenseKeyExpired'==_0x5d51e2||'sourceEditingEnhancedLicenseKeyDomainLimit'==_0x5d51e2||'sourceEditingEnhancedLicenseKeyNotAllowed'==_0x5d51e2||'sourceEditingEnhancedLicenseKeyEvaluationLimit'==_0x5d51e2||'sourceEditingEnhancedLicenseKeyUsageLimit'==_0x5d51e2){delete _0xc4bbca[_0x323926],_0xda0e41=_0x5d51e2,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'sourceEditingEnhancedLicenseKeyInvalid'==_0xda0e41&&_0xc4bbca['_showLicenseError']('invalid'),'sourceEditingEnhancedLicenseKeyExpired'==_0xda0e41&&_0xc4bbca['_showLicenseError']('expired'),'sourceEditingEnhancedLicenseKeyDomainLimit'==_0xda0e41&&_0xc4bbca['_showLicenseError']('domainLimit'),'sourceEditingEnhancedLicenseKeyNotAllowed'==_0xda0e41&&_0xc4bbca['_showLicenseError']('featureNotAllowed','SourceEditingEnhanced'),'sourceEditingEnhancedLicenseKeyEvaluationLimit'==_0xda0e41&&_0xc4bbca['_showLicenseError']('evaluationLimit'),'sourceEditingEnhancedLicenseKeyUsageLimit'==_0xda0e41&&_0xc4bbca['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_checkCompatibility'](){const _0x486161=this['editor'],_0x42dce7=_0x486161['config']['get']('sourceEditingEnhanced.allowCollaborationFeatures');if(!_0x42dce7&&_0x486161['plugins']['has']('RealTimeCollaborativeEditing'))throw new _0x525cbe('source-editing-enhanced-incompatible-with-real-time-collaboration',null);!_0x42dce7&&['CommentsEditing','TrackChangesEditing','RevisionHistory']['some'](_0x5b51c9=>_0x486161['plugins']['has'](_0x5b51c9))&&console['warn']('You\x20initialized\x20the\x20editor\x20with\x20the\x20source\x20editing\x20enhanced\x20feature\x20and\x20at\x20least\x20one\x20of\x20the\x20collaboration\x20features.\x20Please\x20be\x20advised\x20that\x20the\x20source\x20editing\x20feature\x20may\x20not\x20work,\x20and\x20be\x20careful\x20when\x20editing\x20document\x20source\x20that\x20contains\x20markers\x20created\x20by\x20the\x20collaboration\x20features.'),_0x486161['plugins']['has']('RestrictedEditingModeEditing')&&console['warn']('You\x20initialized\x20the\x20editor\x20with\x20the\x20source\x20editing\x20enhanced\x20feature\x20and\x20restricted\x20editing\x20feature.\x20Please\x20be\x20advised\x20that\x20the\x20source\x20editing\x20enhanced\x20feature\x20may\x20not\x20work,\x20and\x20be\x20careful\x20when\x20editing\x20document\x20source\x20that\x20contains\x20markers\x20created\x20by\x20the\x20restricted\x20editing\x20feature.');}};export{W as EditSourceCommand,ee as ReplaceSourceCommand,te as SourceEditingEnhanced};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { Command, type Editor } from
|
|
6
|
+
* @module source-editing-enhanced/replacesourcecommand
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Command, type Editor } from "@ckeditor/ckeditor5-core";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* The command replaces editor active root content with the provided data.
|
|
12
|
+
*/
|
|
13
13
|
export declare class ReplaceSourceCommand extends Command {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
constructor(editor: Editor);
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
override refresh(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Executes the command.
|
|
24
|
+
*/
|
|
25
|
+
override execute(data: string, options?: {
|
|
26
|
+
rootName: string | null;
|
|
27
|
+
}): void;
|
|
28
28
|
}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { type Editor, Plugin } from
|
|
10
|
-
import { SourceEditingEnhancedUI } from
|
|
11
|
-
import
|
|
6
|
+
* @module source-editing-enhanced/sourceeditingenhanced
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { type Editor, Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
10
|
+
import { SourceEditingEnhancedUI } from "./sourceeditingenhancedui.js";
|
|
11
|
+
import "../theme/sourceeditingenhanced.css";
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
* The source editing enhanced feature.
|
|
14
|
+
*
|
|
15
|
+
* It provides the possibility to view and edit the source of the document in the modal window.
|
|
16
|
+
*
|
|
17
|
+
* For a detailed overview, check the
|
|
18
|
+
* {@glink features/source-editing/source-editing-enhanced source editing enhanced feature documentation} and the
|
|
19
|
+
* {@glink api/source-editing-enhanced package page}.
|
|
20
|
+
*/
|
|
21
21
|
export declare class SourceEditingEnhanced extends Plugin {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get pluginName(): "SourceEditingEnhanced";
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static override get isOfficialPlugin(): true;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
static override get isPremiumPlugin(): true;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
static get requires(): PluginDependenciesOf<[SourceEditingEnhancedUI]>;
|
|
38
|
+
/**
|
|
39
|
+
* @inheritDoc
|
|
40
|
+
*/
|
|
41
|
+
constructor(editor: Editor);
|
|
42
|
+
/**
|
|
43
|
+
* @inheritDoc
|
|
44
|
+
*/
|
|
45
|
+
init(): void;
|
|
46
|
+
override destroy(): void;
|
|
47
47
|
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import type { Extension } from
|
|
6
|
+
* @module source-editing-enhanced/sourceeditingenhancedconfig
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import type { Extension } from "@codemirror/state";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
* The configuration of the source editing enhanced feature.
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* ClassicEditor
|
|
15
|
+
* .create( {
|
|
16
|
+
* sourceEditingEnhanced: {
|
|
17
|
+
* allowCollaborationFeatures: true
|
|
18
|
+
* }
|
|
19
|
+
* } )
|
|
20
|
+
* .then( ... )
|
|
21
|
+
* .catch( ... );
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
25
|
+
*/
|
|
26
26
|
export interface SourceEditingEnhancedConfig {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Set to `true` to enable source editing feature for real-time collaboration.
|
|
29
|
+
*
|
|
30
|
+
* Please note that source editing feature is not fully compatible with real-time collaboration and using it may lead to data loss.
|
|
31
|
+
* {@glink features/source-editing/source-editing-enhanced#limitations-and-incompatibilities Read more}.
|
|
32
|
+
*
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
allowCollaborationFeatures?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The theme of the source editor.
|
|
38
|
+
*
|
|
39
|
+
* **Note:** Creating a custom theme via `Extension` is not supported when using
|
|
40
|
+
* {@glink getting-started/installation/cloud/quick-start#installing-ckeditor-5-from-cdn Using CDN},
|
|
41
|
+
* due to technical limitations. This option remains available in all other installation methods.
|
|
42
|
+
* The `'default'` and `'dark'` themes are fully supported in the CDN version.
|
|
43
|
+
*
|
|
44
|
+
* {@glink features/source-editing/source-editing-enhanced#themes Read more} about themes configuration.
|
|
45
|
+
*
|
|
46
|
+
* @default 'default'
|
|
47
|
+
*/
|
|
48
|
+
theme?: "default" | "dark" | Extension;
|
|
49
49
|
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin, PendingActions } from
|
|
9
|
-
import
|
|
6
|
+
* @module source-editing-enhanced/sourceeditingenhancedui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, PendingActions, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import "../theme/sourceeditingenhanced.css";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* The source editing enhanced UI feature.
|
|
12
|
+
*
|
|
13
|
+
* It introduces 'Source' button in toolbar and menu bar that opens a modal window with the source code of the document.
|
|
14
|
+
*/
|
|
15
15
|
export declare class SourceEditingEnhancedUI extends Plugin {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get pluginName(): "SourceEditingEnhancedUI";
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get requires(): PluginDependenciesOf<[PendingActions]>;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static override get isOfficialPlugin(): true;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static override get isPremiumPlugin(): true;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
init(): void;
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
afterInit(): void;
|
|
40
40
|
}
|
package/dist/translations/af.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export default{'af':{'dictionary':{'Edit\x20source\x20modal\x20label':'','Source\x20Editing\x20Enhanced':'','Copy\x20line\x20down':'','Copy\x20line\x20up':'','Delete\x20line':'','Indent\x20less':'','Indent\x20more':'','Fold\x20all':'','Fold\x20code\x20(current\x20level)':'','Move\x20line\x20down':'','Move\x20line\x20up':'','Redo\x20(keystroke)':'','Select\x20line':'','Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':'','Toggle\x20block\x20comment':'','Toggle\x20comment':'','Undo\x20(keystroke)':'','Unfold\x20all':'','Unfold\x20code\x20(current\x20level)':'','Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':''},'getPluralForm':
|
|
23
|
+
export default{'af':{'dictionary':{'Edit\x20source\x20modal\x20label':'','Source\x20Editing\x20Enhanced':'','Copy\x20line\x20down':'','Copy\x20line\x20up':'','Delete\x20line':'','Indent\x20less':'','Indent\x20more':'','Fold\x20all':'','Fold\x20code\x20(current\x20level)':'','Move\x20line\x20down':'','Move\x20line\x20up':'','Redo\x20(keystroke)':'','Select\x20line':'','Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':'','Toggle\x20block\x20comment':'','Toggle\x20comment':'','Undo\x20(keystroke)':'','Unfold\x20all':'','Unfold\x20code\x20(current\x20level)':'','Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':''},'getPluralForm':_0x53041e=>0x1!=_0x53041e}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x556811=>{const {af:{dictionary:_0x4807fc,getPluralForm:_0x43e693}}={'af':{'dictionary':{'Edit\x20source\x20modal\x20label':'','Source\x20Editing\x20Enhanced':'','Copy\x20line\x20down':'','Copy\x20line\x20up':'','Delete\x20line':'','Indent\x20less':'','Indent\x20more':'','Fold\x20all':'','Fold\x20code\x20(current\x20level)':'','Move\x20line\x20down':'','Move\x20line\x20up':'','Redo\x20(keystroke)':'','Select\x20line':'','Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':'','Toggle\x20block\x20comment':'','Toggle\x20comment':'','Undo\x20(keystroke)':'','Unfold\x20all':'','Unfold\x20code\x20(current\x20level)':'','Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':''},'getPluralForm':_0xed762=>0x1!=_0xed762}};_0x556811['af']||={'dictionary':{},'getPluralForm':null},_0x556811['af']['dictionary']=Object['assign'](_0x556811['af']['dictionary'],_0x4807fc),_0x556811['af']['getPluralForm']=_0x43e693;})(window['CKEDITOR_TRANSLATIONS']||={});
|
package/dist/translations/ar.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export default{'ar':{'dictionary':{'Edit\x20source\x20modal\x20label':'تحرير\x20المصدر','Source\x20Editing\x20Enhanced':'تم\x20تحسين\x20تحرير\x20المصدر','Copy\x20line\x20down':'نسخ\x20السطر\x20لأسفل','Copy\x20line\x20up':'نسخ\x20السطر\x20لأعلى','Delete\x20line':'حذف\x20السطر','Indent\x20less':'تقليل\x20المسافة\x20البادئة','Indent\x20more':'زيادة\x20المسافة\x20البادئة','Fold\x20all':'طي\x20الكل','Fold\x20code\x20(current\x20level)':'طي\x20الكود\x20(المستوى\x20الحالي)','Move\x20line\x20down':'تحريك\x20السطر\x20لأسفل','Move\x20line\x20up':'تحريك\x20السطر\x20لأعلى','Redo\x20(keystroke)':'إعادة','Select\x20line':'تحديد\x20السطر','Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':'التبديل\x20بين\x20وضعي\x20\x22التركيز\x20باستخدام\x20علامة\x20التبويب\x22\x20و\x22ضبط\x20المسافة\x20البادئة\x20باستخدام\x20علامة\x20التبويب\x22','Toggle\x20block\x20comment':'تبديل\x20تعليق\x20الكتلة','Toggle\x20comment':'تبديل\x20التعليق','Undo\x20(keystroke)':'التراجع','Unfold\x20all':'إظهار\x20الكل','Unfold\x20code\x20(current\x20level)':'إظهار\x20الكود\x20(المستوى\x20الحالي)','Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':'هل\x20متأكد\x20من\x20أنك\x20تود\x20تجاهل\x20التغييرات\x20التي\x20أجريتها؟\x20لا\x20يمكن\x20التراجع\x20عن\x20هذا\x20الإجراء.'},'getPluralForm':
|
|
23
|
+
export default{'ar':{'dictionary':{'Edit\x20source\x20modal\x20label':'تحرير\x20المصدر','Source\x20Editing\x20Enhanced':'تم\x20تحسين\x20تحرير\x20المصدر','Copy\x20line\x20down':'نسخ\x20السطر\x20لأسفل','Copy\x20line\x20up':'نسخ\x20السطر\x20لأعلى','Delete\x20line':'حذف\x20السطر','Indent\x20less':'تقليل\x20المسافة\x20البادئة','Indent\x20more':'زيادة\x20المسافة\x20البادئة','Fold\x20all':'طي\x20الكل','Fold\x20code\x20(current\x20level)':'طي\x20الكود\x20(المستوى\x20الحالي)','Move\x20line\x20down':'تحريك\x20السطر\x20لأسفل','Move\x20line\x20up':'تحريك\x20السطر\x20لأعلى','Redo\x20(keystroke)':'إعادة','Select\x20line':'تحديد\x20السطر','Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':'التبديل\x20بين\x20وضعي\x20\x22التركيز\x20باستخدام\x20علامة\x20التبويب\x22\x20و\x22ضبط\x20المسافة\x20البادئة\x20باستخدام\x20علامة\x20التبويب\x22','Toggle\x20block\x20comment':'تبديل\x20تعليق\x20الكتلة','Toggle\x20comment':'تبديل\x20التعليق','Undo\x20(keystroke)':'التراجع','Unfold\x20all':'إظهار\x20الكل','Unfold\x20code\x20(current\x20level)':'إظهار\x20الكود\x20(المستوى\x20الحالي)','Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':'هل\x20متأكد\x20من\x20أنك\x20تود\x20تجاهل\x20التغييرات\x20التي\x20أجريتها؟\x20لا\x20يمكن\x20التراجع\x20عن\x20هذا\x20الإجراء.'},'getPluralForm':_0x468639=>0x0==_0x468639?0x0:0x1==_0x468639?0x1:0x2==_0x468639?0x2:_0x468639%0x64>=0x3&&_0x468639%0x64<=0xa?0x3:_0x468639%0x64>=0xb?0x4:0x5}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x50412d=>{const {ar:{dictionary:_0x9888af,getPluralForm:_0x54eb23}}={'ar':{'dictionary':{'Edit\x20source\x20modal\x20label':'تحرير\x20المصدر','Source\x20Editing\x20Enhanced':'تم\x20تحسين\x20تحرير\x20المصدر','Copy\x20line\x20down':'نسخ\x20السطر\x20لأسفل','Copy\x20line\x20up':'نسخ\x20السطر\x20لأعلى','Delete\x20line':'حذف\x20السطر','Indent\x20less':'تقليل\x20المسافة\x20البادئة','Indent\x20more':'زيادة\x20المسافة\x20البادئة','Fold\x20all':'طي\x20الكل','Fold\x20code\x20(current\x20level)':'طي\x20الكود\x20(المستوى\x20الحالي)','Move\x20line\x20down':'تحريك\x20السطر\x20لأسفل','Move\x20line\x20up':'تحريك\x20السطر\x20لأعلى','Redo\x20(keystroke)':'إعادة','Select\x20line':'تحديد\x20السطر','Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':'التبديل\x20بين\x20وضعي\x20\x22التركيز\x20باستخدام\x20علامة\x20التبويب\x22\x20و\x22ضبط\x20المسافة\x20البادئة\x20باستخدام\x20علامة\x20التبويب\x22','Toggle\x20block\x20comment':'تبديل\x20تعليق\x20الكتلة','Toggle\x20comment':'تبديل\x20التعليق','Undo\x20(keystroke)':'التراجع','Unfold\x20all':'إظهار\x20الكل','Unfold\x20code\x20(current\x20level)':'إظهار\x20الكود\x20(المستوى\x20الحالي)','Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':'هل\x20متأكد\x20من\x20أنك\x20تود\x20تجاهل\x20التغييرات\x20التي\x20أجريتها؟\x20لا\x20يمكن\x20التراجع\x20عن\x20هذا\x20الإجراء.'},'getPluralForm':_0x4c9c74=>0x0==_0x4c9c74?0x0:0x1==_0x4c9c74?0x1:0x2==_0x4c9c74?0x2:_0x4c9c74%0x64>=0x3&&_0x4c9c74%0x64<=0xa?0x3:_0x4c9c74%0x64>=0xb?0x4:0x5}};_0x50412d['ar']||={'dictionary':{},'getPluralForm':null},_0x50412d['ar']['dictionary']=Object['assign'](_0x50412d['ar']['dictionary'],_0x9888af),_0x50412d['ar']['getPluralForm']=_0x54eb23;})(window['CKEDITOR_TRANSLATIONS']||={});
|
package/dist/translations/ast.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export default{'ast':{'dictionary':{'Edit\x20source\x20modal\x20label':'','Source\x20Editing\x20Enhanced':'','Copy\x20line\x20down':'','Copy\x20line\x20up':'','Delete\x20line':'','Indent\x20less':'','Indent\x20more':'','Fold\x20all':'','Fold\x20code\x20(current\x20level)':'','Move\x20line\x20down':'','Move\x20line\x20up':'','Redo\x20(keystroke)':'','Select\x20line':'','Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':'','Toggle\x20block\x20comment':'','Toggle\x20comment':'','Undo\x20(keystroke)':'','Unfold\x20all':'','Unfold\x20code\x20(current\x20level)':'','Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':''},'getPluralForm':
|
|
23
|
+
export default{'ast':{'dictionary':{'Edit\x20source\x20modal\x20label':'','Source\x20Editing\x20Enhanced':'','Copy\x20line\x20down':'','Copy\x20line\x20up':'','Delete\x20line':'','Indent\x20less':'','Indent\x20more':'','Fold\x20all':'','Fold\x20code\x20(current\x20level)':'','Move\x20line\x20down':'','Move\x20line\x20up':'','Redo\x20(keystroke)':'','Select\x20line':'','Switch\x20between\x20\x22focus\x20with\x20tab\x22\x20and\x20\x22indent\x20with\x20tab\x22\x20mode':'','Toggle\x20block\x20comment':'','Toggle\x20comment':'','Undo\x20(keystroke)':'','Unfold\x20all':'','Unfold\x20code\x20(current\x20level)':'','Are\x20you\x20sure\x20you\x20want\x20to\x20discard\x20your\x20changes?\x20This\x20action\x20cannot\x20be\x20undone.':''},'getPluralForm':_0x18a508=>0x1!=_0x18a508}};
|