@ckeditor/ckeditor5-track-changes 32.0.0 → 33.0.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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/build/track-changes.js +5 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +3 -0
- package/lang/translations/cs.po +3 -3
- package/lang/translations/da.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +387 -0
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/es.po +35 -35
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sr-latn.po +3 -3
- package/lang/translations/sr.po +3 -3
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/package.json +4 -7
- package/src/commands/acceptallsuggestionscommand.js +1 -1
- package/src/commands/acceptselectedsuggestionscommand.js +1 -1
- package/src/commands/acceptsuggestioncommand.js +1 -1
- package/src/commands/discardallsuggestionscommand.js +1 -1
- package/src/commands/discardselectedsuggestionscommand.js +1 -1
- package/src/commands/discardsuggestioncommand.js +1 -1
- package/src/commands/trackchangescommand.js +1 -1
- package/src/index.js +23 -0
- package/src/integrations/alignment.js +1 -1
- package/src/integrations/basicstyles.js +1 -1
- package/src/integrations/blockquote.js +1 -1
- package/src/integrations/codeblock.js +1 -1
- package/src/integrations/comments.js +1 -1
- package/src/integrations/deletecommand.js +1 -1
- package/src/integrations/entercommand.js +1 -1
- package/src/integrations/font.js +1 -1
- package/src/integrations/heading.js +1 -1
- package/src/integrations/highlight.js +1 -1
- package/src/integrations/horizontalline.js +1 -1
- package/src/integrations/image.js +1 -1
- package/src/integrations/indent.js +1 -1
- package/src/integrations/inputcommand.js +1 -1
- package/src/integrations/link.js +1 -1
- package/src/integrations/list.js +1 -1
- package/src/integrations/mediaembed.js +1 -1
- package/src/integrations/mention.js +1 -1
- package/src/integrations/pagebreak.js +1 -1
- package/src/integrations/paragraph.js +1 -1
- package/src/integrations/removeformat.js +1 -1
- package/src/integrations/restrictededitingmode.js +1 -1
- package/src/integrations/shiftentercommand.js +1 -1
- package/src/integrations/standardeditingmode.js +1 -1
- package/src/integrations/table.js +1 -1
- package/src/integrations/tableclipboard.js +1 -1
- package/src/integrations/tableheadings.js +1 -1
- package/src/integrations/tablemergesplit.js +1 -1
- package/src/integrations/title.js +1 -1
- package/src/integrations/undo.js +1 -1
- package/src/integrations/utils.js +1 -1
- package/src/suggestion.js +1 -1
- package/src/suggestiondescriptionfactory.js +1 -1
- package/src/trackchanges.js +1 -1
- package/src/trackchangesdata.js +1 -1
- package/src/trackchangesediting.js +1 -1
- package/src/trackchangesui.js +1 -1
- package/src/ui/suggestioncontroller.js +1 -1
- package/src/ui/view/basesuggestionthreadview.js +1 -1
- package/src/ui/view/suggestionthreadview.js +1 -1
- package/src/utils/getselectedsuggestions.js +1 -1
- package/src/utils/hashobject.js +1 -1
- package/src/utils/normalizedescription.js +1 -1
- package/src/utils/sortsuggestions.js +1 -1
- package/theme/icons/track-changes-accept.svg +1 -1
- package/theme/icons/track-changes-discard.svg +1 -1
- package/theme/icons/track-changes.svg +1 -1
- package/theme/suggestionmarker.css +1 -1
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x5d08a4}from'ckeditor5/src/core';export default class J extends _0x5d08a4{['afterInit'](){const _0x41e3e4=this['editor'],_0x1ea323=_0x41e3e4['plugins']['get']('TrackChangesEditing');_0x41e3e4['plugins']['has']('IndentEditing')&&(_0x1ea323['enableCommand']('indent'),_0x1ea323['enableCommand']('outdent'));const {t:t}=_0x41e3e4['locale'];if(_0x41e3e4['plugins']['has']('IndentBlock')){for(const _0x529d7a of['indentBlock','outdentBlock'])_0x1ea323['enableCommand'](_0x529d7a,()=>{const _0x5a0bcf=Array['from'](this['editor']['model']['document']['selection']['getSelectedBlocks']())['filter'](_0x156a07=>this['editor']['model']['schema']['checkAttribute'](_0x156a07,'blockIndent'));_0x41e3e4['model']['change'](()=>{for(const _0x42eac0 of _0x5a0bcf)_0x1ea323['markBlockFormat'](_0x42eac0,{'commandName':_0x529d7a,'commandParams':[{'value':''}],'formatGroupId':'indentBlock'});});});_0x1ea323['_descriptionFactory']['registerDescriptionCallback'](_0x16aa40=>{const {data:_0x3be956}=_0x16aa40;if(!_0x3be956)return;if('indentBlock'!=_0x3be956['commandName']&&'outdentBlock'!=_0x3be956['commandName'])return;const _0x241c11=_0x16aa40['getItems']()[0x0],_0x17426=_0x1ea323['_descriptionFactory']['getItemLabel'](_0x241c11['name']);return'indentBlock'==_0x3be956['commandName']?{'type':'format','content':t('*Indent:*\x20%0',_0x17426)}:'outdentBlock'==_0x3be956['commandName']?{'type':'format','content':t('*Outdent:*\x20%0',_0x17426)}:void 0x0;});}}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x16a8=['requires','TrackChangesEditing','get','enableCommand','editor','plugins'];(function(_0x58ee30,_0x16a871){var _0x429c48=function(_0x5de3d8){while(--_0x5de3d8){_0x58ee30['push'](_0x58ee30['shift']());}};_0x429c48(++_0x16a871);}(_0x16a8,0x1d9));var _0x429c=function(_0x58ee30,_0x16a871){_0x58ee30=_0x58ee30-0x0;var _0x429c48=_0x16a8[_0x58ee30];return _0x429c48;};import{Plugin as _0x81c938}from'ckeditor5/src/core';import{Input as _0x85beb8}from'ckeditor5/src/typing';export default class K extends _0x81c938{static get[_0x429c('0x1')](){return[_0x85beb8];}['init'](){this[_0x429c('0x5')][_0x429c('0x0')][_0x429c('0x3')](_0x429c('0x2'))[_0x429c('0x4')]('input');}}
|
package/src/integrations/link.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x17adc8}from'ckeditor5/src/core';import{findAttributeRange as _0x5bbb73}from'ckeditor5/src/typing';import{getRangesWithAttribute as Rt}from'./utils';export default class Q extends _0x17adc8{['afterInit'](){const _0x225166=this['editor'];if(!_0x225166['plugins']['has']('LinkEditing'))return;const _0x4227ca=_0x225166['plugins']['get']('TrackChangesEditing');_0x4227ca['enableCommand']('link',(_0x328d87,_0x316041)=>{const _0x3810c5=_0x225166['model']['document']['selection'];let _0x5c4cd9=[];if(_0x3810c5['isCollapsed']){if(!_0x3810c5['hasAttribute']('linkHref'))return void _0x328d87(_0x316041);{const _0x5d3b10=_0x5bbb73(_0x3810c5['getFirstPosition'](),'linkHref',_0x3810c5['getAttribute']('linkHref'),_0x225166['model']);_0x5c4cd9=[_0x5d3b10];}}else _0x5c4cd9=Array['from'](_0x3810c5['getRanges']());_0x225166['model']['change'](()=>{for(const _0x9a9e9d of _0x5c4cd9)_0x4227ca['markInlineFormat'](_0x9a9e9d,{'commandName':'link','commandParams':[_0x316041]});});}),_0x4227ca['enableCommand']('unlink',()=>{const _0x410285=this['editor']['model'],_0x3b5131=_0x410285['document']['selection'];_0x410285['change'](()=>{let _0x22afc6=[];if(_0x3b5131['isCollapsed'])_0x22afc6=[_0x5bbb73(_0x3b5131['getFirstPosition'](),'linkHref',_0x3b5131['getAttribute']('linkHref'),_0x225166['model'])];else _0x22afc6=Rt('linkHref',_0x3b5131['getFirstRange'](),_0x225166['model']);for(const _0x5e7a51 of _0x22afc6)_0x4227ca['markInlineFormat'](_0x5e7a51,{'commandName':'unlink','commandParams':[]});});}),_0x4227ca['_descriptionFactory']['registerDescriptionCallback'](_0x2707db=>{const {data:_0x3697d3}=_0x2707db,{t:t}=_0x225166['locale'];if(_0x3697d3){if('link'==_0x3697d3['commandName'])return{'type':'format','content':t('*Set\x20link:*\x20%0','\x22'+_0x3697d3['commandParams'][0x0]+'\x22')};return'unlink'==_0x3697d3['commandName']?{'type':'format','content':t('*Remove\x20link*')}:void 0x0;}});}}
|
package/src/integrations/list.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x3edc22}from'ckeditor5/src/core';export default class V extends _0x3edc22{['afterInit'](){const _0x827eca=this['editor'];if(!_0x827eca['plugins']['has']('ListEditing'))return;const _0x1fb391=_0x827eca['plugins']['get']('TrackChangesEditing'),_0x5368fd=_0x827eca['plugins']['has']('TodoListEditing');function _0x1a2e62(_0x84755){return()=>{const _0x6ff246=_0x827eca['model']['document']['selection'],_0x338216=_0x827eca['commands']['get'](_0x84755);if(_0x338216['value'])return void _0x827eca['execute']('paragraph',{});const _0x480c89=_0x84755['slice'](0x0,-0x4),_0x2851f9=function(_0x3ddf2d,_0xf7a7e8,_0x505be7){let _0x1529a6=Array['from'](_0x3ddf2d)['filter'](_0x3ce4f6=>function(_0x4cf72b,_0x4154c4){return _0x4154c4['checkChild'](_0x4cf72b['parent'],'listItem')&&!_0x4154c4['isObject'](_0x4cf72b);}(_0x3ce4f6,_0x505be7));_0x1529a6=_0x1529a6['filter'](_0x3cd688=>!_0x3cd688['is']('element','listItem')||_0x3cd688['getAttribute']('listType')!=_0xf7a7e8);const _0x432ee6=new Set();for(const _0x397959 of _0x1529a6)_0x397959['is']('element','listItem')?_0x432ee6['add'](Mt(_0x397959)):_0x432ee6['add'](_0x397959);return Array['from'](_0x432ee6);}(_0x6ff246['getSelectedBlocks'](),_0x480c89,_0x827eca['model']['schema']);_0x827eca['model']['change'](()=>{for(const _0x5f319e of _0x2851f9)_0x1fb391['markBlockFormat'](_0x5f319e,{'commandName':_0x84755,'commandParams':[{'forceValue':!_0x338216['value']}],'formatGroupId':'blockName'},Pt(_0x5f319e));});};}function _0x53b71c(_0x5c4a9c){return()=>{const _0x1ef156=function(_0x1c5d1d){const _0x5ad4c3=(_0x1c5d1d=Array['from'](_0x1c5d1d))['findIndex'](_0x2123e7=>'listItem'!=_0x2123e7['name']);return _0x5ad4c3>-0x1&&(_0x1c5d1d=_0x1c5d1d['slice'](0x0,_0x5ad4c3)),_0x1c5d1d;}(_0x827eca['model']['document']['selection']['getSelectedBlocks']()),_0xae686b=_0x827eca['model']['createRange'](_0x827eca['model']['createPositionAt'](_0x1ef156[0x0],'before'),_0x827eca['model']['createPositionAt'](_0x1ef156[_0x1ef156['length']-0x1],'end'));_0x827eca['model']['change'](()=>{_0x1fb391['markBlockFormat'](_0xae686b,{'commandName':_0x5c4a9c,'commandParams':[],'formatGroupId':'listIndent'},function(_0x547f5b){const _0x437d38=new Set();for(const _0x11cda6 of _0x547f5b){let _0x5bff78=_0x11cda6['nextSibling'];for(;_0x5bff78&&_0x5bff78['getAttribute']('listIndent')>_0x11cda6['getAttribute']('listIndent');)_0x437d38['add'](_0x5bff78),_0x5bff78=_0x5bff78['nextSibling'];}return Array['from'](_0x437d38);}(_0x1ef156));});};}_0x1fb391['enableCommand']('numberedList',_0x1a2e62('numberedList')),_0x1fb391['enableCommand']('bulletedList',_0x1a2e62('bulletedList')),_0x5368fd&&_0x1fb391['enableCommand']('todoList',_0x1a2e62('todoList')),_0x1fb391['enableCommand']('indentList',_0x53b71c('indentList')),_0x1fb391['enableCommand']('outdentList',_0x53b71c('outdentList')),_0x5368fd&&_0x1fb391['enableCommand']('checkTodoList',()=>{const _0xeca569=_0x827eca['commands']['get']('checkTodoList'),_0x58b7d7=Array['from'](_0xeca569['_selectedElements']);_0x58b7d7['filter'](_0xe7483e=>_0xe7483e['getAttribute']('todoListChecked')!=_0xeca569['value']),_0x827eca['model']['change'](()=>{for(const _0x547400 of _0x58b7d7)_0x1fb391['markBlockFormat'](_0x547400,{'commandName':'checkTodoList','commandParams':[{'forceValue':!_0xeca569['value']}]});});});const {t:t}=_0x827eca['locale'];_0x1fb391['_descriptionFactory']['registerElementLabel']('listItem',_0x32d9c2=>t({'string':'list\x20item','plural':'%0\x20list\x20items','id':'ELEMENT_LIST_ITEM'},_0x32d9c2)),_0x1fb391['_descriptionFactory']['registerDescriptionCallback'](_0x6d89ed=>{const {data:_0x51f576}=_0x6d89ed;if(_0x51f576){if('numberedList'==_0x51f576['commandName']||'bulletedList'==_0x51f576['commandName']||'todoList'==_0x51f576['commandName'])switch(_0x51f576['commandName']['replace']('List','')){case'bulleted':return _0x13677b(t({'string':'bulleted\x20list','id':'ELEMENT_BULLETED_LIST'}));case'numbered':return _0x13677b(t({'string':'numbered\x20list','id':'ELEMENT_NUMBERED_LIST'}));case'todo':return _0x13677b(t({'string':'to-do\x20list','id':'ELEMENT_TODO_LIST'}));}if('indentList'==_0x51f576['commandName'])return{'type':'format','content':t('*Indent:*\x20%0',t({'string':'list\x20item','id':'ELEMENT_LIST_ITEM'}))};if('outdentList'==_0x51f576['commandName'])return{'type':'format','content':t('*Outdent:*\x20%0',t({'string':'list\x20item','id':'ELEMENT_LIST_ITEM'}))};if('checkTodoList'==_0x51f576['commandName'])return _0x51f576['commandParams'][0x0]['forceValue']?{'type':'format','content':t('*Check\x20item*')}:{'type':'format','content':t('*Uncheck\x20item*')};}function _0x13677b(_0x4b7866){return{'type':'format','content':t('*Change\x20to:*\x20%0',_0x4b7866)};}});}}function Mt(_0x9c049d){const _0x7e733e=_0x9c049d['getAttribute']('listIndent');if(0x0==_0x7e733e)return _0x9c049d;let _0xdf7783=_0x9c049d;for(;_0x9c049d['previousSibling']&&_0x9c049d['previousSibling']['is']('element','listItem');){const _0x1b1990=_0x9c049d['previousSibling']['getAttribute']('listIndent');if(_0x1b1990==_0x7e733e)_0xdf7783=_0x9c049d['previousSibling'];else{if(_0x1b1990<_0x7e733e)break;}_0x9c049d=_0x9c049d['previousSibling'];}return _0xdf7783;}function Pt(_0x518fc9){const _0x26baa5=[];if(_0x518fc9['is']('element','listItem')&&_0x518fc9['getAttribute']('listIndent')>0x0){let _0x51ef4f=_0x518fc9['nextSibling'];for(;_0x51ef4f&&'listItem'==_0x51ef4f['name']&&_0x51ef4f['getAttribute']('listIndent')==_0x518fc9['getAttribute']('listIndent');)_0x26baa5['push'](_0x51ef4f),_0x51ef4f=_0x51ef4f['nextSibling'];}return _0x26baa5;}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x1bc967}from'ckeditor5/src/core';import'../../theme/integrations/mediaembed.css';export default class X extends _0x1bc967{['afterInit'](){const _0xfe8941=this['editor'];if(!_0xfe8941['plugins']['has']('MediaEmbedEditing'))return;const _0x25f2b9=_0xfe8941['plugins']['get']('TrackChangesEditing'),{t:t}=_0xfe8941['locale'];_0x25f2b9['enableCommand']('mediaEmbed'),_0x25f2b9['_descriptionFactory']['registerElementLabel']('media',_0x126c5e=>t({'string':'media\x20item','plural':'%0\x20media\x20items','id':'ELEMENT_MEDIA'},_0x126c5e)),_0xfe8941['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1a0db8,{writer:_0x567a54,options:_0x3ca8e8})=>{if(_0x3ca8e8['showSuggestionHighlights'])return _0x567a54['createEmptyElement']('div');},'converterPriority':'high'}),_0xfe8941['data']['downcastDispatcher']['on']('attribute:url:media',(_0x46ead7,_0xdd7e45,_0x8d9736)=>{_0x8d9736['options']['showSuggestionHighlights']&&_0x46ead7['stop']();},{'priority':'high'});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4d67=['MentionEditing','mention','get','plugins','has','afterInit'];(function(_0x383606,_0x4d6744){const _0x8c3b9c=function(_0x5bb80a){while(--_0x5bb80a){_0x383606['push'](_0x383606['shift']());}};_0x8c3b9c(++_0x4d6744);}(_0x4d67,0x150));const _0x8c3b=function(_0x383606,_0x4d6744){_0x383606=_0x383606-0x0;let _0x8c3b9c=_0x4d67[_0x383606];return _0x8c3b9c;};import{Plugin as _0x2fb231}from'ckeditor5/src/core';export default class Y extends _0x2fb231{[_0x8c3b('0x5')](){const _0x43a8de=this['editor'];_0x43a8de[_0x8c3b('0x3')][_0x8c3b('0x4')](_0x8c3b('0x0'))&&_0x43a8de['plugins'][_0x8c3b('0x2')]('TrackChangesEditing')['enableCommand'](_0x8c3b('0x1'));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x5957c5}from'ckeditor5/src/core';import'../../theme/integrations/pagebreak.css';export default class Z extends _0x5957c5{['afterInit'](){const _0x25337c=this['editor'];if(!_0x25337c['plugins']['has']('PageBreakEditing'))return;_0x25337c['plugins']['get']('TrackChangesEditing')['enableCommand']('pageBreak');const _0x23d308=_0x25337c['plugins']['get']('TrackChangesEditing'),{t:t}=_0x25337c['locale'];_0x23d308['_descriptionFactory']['registerElementLabel']('pageBreak',_0x431d5a=>t({'string':'page\x20break','plural':'%0\x20page\x20breaks','id':'ELEMENT_PAGE_BREAK'},_0x431d5a));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x4a95c8}from'ckeditor5/src/core';import{getElementsAffectedByListItemRename as _0xe09e35}from'./utils';export default class tt extends _0x4a95c8{['afterInit'](){const _0x3b3dbb=this['editor'];if(!_0x3b3dbb['plugins']['has']('Paragraph'))return;const {t:t}=_0x3b3dbb['locale'],_0x30a48f=_0x3b3dbb['plugins']['get']('TrackChangesEditing');_0x30a48f['_descriptionFactory']['registerElementLabel']('paragraph',_0x2dbb79=>t({'string':'paragraph','plural':'%0\x20paragraphs','id':'ELEMENT_PARAGRAPH'},_0x2dbb79)),_0x30a48f['enableCommand']('paragraph',(_0x48d0c8,_0x35c392={})=>{const _0x3b9bcb=_0x3b3dbb['model']['document'],_0x5673f9=_0x35c392['selection']||_0x3b9bcb['selection'],_0x16bec7=Array['from'](_0x5673f9['getSelectedBlocks']())['filter'](_0x34652b=>function(_0x3490f1,_0x205da1){return _0x205da1['checkChild'](_0x3490f1['parent'],'paragraph')&&!_0x205da1['isObject'](_0x3490f1)&&'paragraph'!=_0x3490f1['name'];}(_0x34652b,this['editor']['model']['schema']));_0x3b3dbb['model']['change'](()=>{for(const _0x245747 of _0x16bec7)_0x30a48f['markBlockFormat'](_0x245747,{'commandName':'paragraph','commandParams':[],'formatGroupId':'blockName'},_0xe09e35(_0x245747));});}),_0x30a48f['_descriptionFactory']['registerDescriptionCallback'](_0x2d47d7=>{const {data:_0x15bcd4}=_0x2d47d7;if(_0x15bcd4&&'paragraph'==_0x15bcd4['commandName'])return{'type':'format','content':t('*Change\x20to:*\x20%0',t({'string':'paragraph','plural':'%0\x20paragraphs','id':'ELEMENT_PARAGRAPH'}))};}),_0x30a48f['enableCommand']('insertParagraph'),_0x3b3dbb['editing']['downcastDispatcher']['on']('addMarker:suggestion:insertion',tr(_0x3b3dbb),{'priority':'highest'}),_0x3b3dbb['data']['downcastDispatcher']['on']('addMarker:suggestion:insertion',(_0x10c971,_0x2c93b8,_0x3cef09)=>{_0x3cef09['options']['showSuggestionHighlights']&&tr(_0x3b3dbb,{'showActiveMarker':!0x1})(_0x10c971,_0x2c93b8,_0x3cef09);},{'priority':'highest'});const _0x18c0f7=_0x30a48f['_descriptionFactory'];_0x18c0f7['registerDescriptionCallback'](_0x44201e=>{if('insertion'!==_0x44201e['type'])return;const {start:_0x3a9ede,end:_0x40632d}=_0x44201e['getFirstRange']();if(!_0x3a9ede['isTouching'](_0x40632d)||!_0x3a9ede['nodeAfter'])return;const _0x46eea8=_0x3b3dbb['model']['schema'],_0x51a5ed=_0x3a9ede['nodeAfter'];return _0x46eea8['isBlock'](_0x51a5ed)&&!_0x46eea8['isLimit'](_0x51a5ed)&&_0x46eea8['checkChild'](_0x51a5ed,'$text')?{'type':'insertion','content':t('*Insert:*\x20%0',_0x18c0f7['getItemLabel'](_0x51a5ed['name'],0x1))}:void 0x0;});}}function tr(_0xe15217,{showActiveMarker:_0x55860c=!0x0}={}){return(_0x4cf846,_0x4564c9,_0x4b7e32)=>{const _0x384ebe=_0xe15217['plugins']['get']('TrackChangesEditing'),_0x3a7cf4=_0x4564c9['markerRange']['start'],_0x14f593=_0x4564c9['markerRange']['end'],_0x34987d=_0xe15217['model']['schema'];if(!_0x3a7cf4['isTouching'](_0x14f593)||!_0x3a7cf4['nodeAfter'])return;const _0xc0ed5d=_0x3a7cf4['nodeAfter'];if(_0x34987d['isBlock'](_0xc0ed5d)&&!_0x34987d['isLimit'](_0xc0ed5d)&&_0x34987d['checkChild'](_0xc0ed5d,'$text')){if(!_0x4b7e32['consumable']['consume'](_0x4564c9['markerRange'],_0x4cf846['name']))return;const _0x6566be=_0x4b7e32['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-split'}),_0x854095=_0x4b7e32['mapper']['toViewPosition'](_0x14f593);_0x55860c&&_0x384ebe['activeMarkers']['includes'](_0x4564c9['markerName'])&&_0x4b7e32['writer']['addClass']('ck-suggestion-marker--active',_0x6566be),_0x4b7e32['writer']['insert'](_0x854095,_0x6566be),_0x4b7e32['mapper']['bindElementToMarker'](_0x6566be,_0x4564c9['markerName']);}};}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x51e377}from'ckeditor5/src/core';export default class it extends _0x51e377{['afterInit'](){const _0x49314b=this['editor'];if(!_0x49314b['plugins']['has']('RemoveFormatEditing'))return;const _0x360a26=_0x49314b['plugins']['get']('TrackChangesEditing');_0x360a26['enableCommand']('removeFormat',_0x2bf6de=>{const _0x586360=_0x49314b['model']['document']['selection'];_0x586360['isCollapsed']?_0x2bf6de():_0x49314b['model']['change'](()=>{const _0xcd8e0f=Array['from'](_0x586360['getRanges']());for(const _0x419892 of _0xcd8e0f)for(const _0x1db8aa of _0x419892['getItems']())Gt(_0x1db8aa,_0x49314b['model']['schema'])&&_0x360a26['markInlineFormat'](_0x49314b['model']['createRangeOn'](_0x1db8aa),{'commandName':'removeFormat','commandParams':[]});});});const {t:t}=_0x49314b['locale'];_0x360a26['_descriptionFactory']['registerDescriptionCallback'](_0x3a31da=>{const {data:_0xb111ef}=_0x3a31da;if(_0xb111ef&&'removeFormat'==_0xb111ef['commandName'])return{'type':'format','content':t('*Remove\x20all\x20formatting*')};});}}function Gt(_0x52d0e2,_0x595509){for(const [_0x15d117]of _0x52d0e2['getAttributes']()){const _0x54c91e=_0x595509['getAttributeProperties'](_0x15d117);if(_0x54c91e&&_0x54c91e['isFormatting'])return!0x0;}return!0x1;}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x552f=['discardAllSuggestions','goToPreviousRestrictedEditingException','acceptAllSuggestions','discardSuggestion','discardSelectedSuggestions','get','goToNextRestrictedEditingException','trackChanges','enableCommand','plugins','RestrictedEditingModeEditing','editor'];(function(_0x1e8cc2,_0x552f7d){const _0x4ad8e3=function(_0xc702f4){while(--_0xc702f4){_0x1e8cc2['push'](_0x1e8cc2['shift']());}};_0x4ad8e3(++_0x552f7d);}(_0x552f,0xe4));const _0x4ad8=function(_0x1e8cc2,_0x552f7d){_0x1e8cc2=_0x1e8cc2-0x0;let _0x4ad8e3=_0x552f[_0x1e8cc2];return _0x4ad8e3;};import{Plugin as _0x38cad1}from'ckeditor5/src/core';export default class st extends _0x38cad1{['afterInit'](){const _0x4e0eea=this[_0x4ad8('0xb')];if(!_0x4e0eea[_0x4ad8('0x9')]['has'](_0x4ad8('0xa')))return;const _0x581b24=_0x4e0eea[_0x4ad8('0x9')][_0x4ad8('0x5')]('TrackChangesEditing');_0x581b24['enableCommand'](_0x4ad8('0x1')),_0x581b24[_0x4ad8('0x8')](_0x4ad8('0x6'));const _0x1c0d7c=_0x4e0eea['plugins'][_0x4ad8('0x5')]('RestrictedEditingModeEditing');_0x1c0d7c[_0x4ad8('0x8')](_0x4ad8('0x7')),_0x1c0d7c['enableCommand']('acceptSuggestion'),_0x1c0d7c[_0x4ad8('0x8')](_0x4ad8('0x3')),_0x1c0d7c[_0x4ad8('0x8')](_0x4ad8('0x2')),_0x1c0d7c['enableCommand'](_0x4ad8('0x0')),_0x1c0d7c[_0x4ad8('0x8')]('acceptSelectedSuggestions'),_0x1c0d7c['enableCommand'](_0x4ad8('0x4'));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x4014d1}from'ckeditor5/src/core';import{ShiftEnter as _0x5a01cd}from'ckeditor5/src/enter';export default class nt extends _0x4014d1{static get['requires'](){return[_0x5a01cd];}['init'](){const _0x47cad0=this['editor'],_0x50b24a=_0x47cad0['plugins']['get']('TrackChangesEditing'),t=_0x47cad0['t'];_0x50b24a['enableCommand']('shiftEnter'),_0x47cad0['editing']['downcastDispatcher']['on']('addMarker:suggestion:insertion',re(_0x47cad0),{'priority':'high'}),_0x47cad0['editing']['downcastDispatcher']['on']('addMarker:suggestion:deletion',re(_0x47cad0),{'priority':'high'}),_0x47cad0['data']['downcastDispatcher']['on']('addMarker:suggestion',(_0x10ecd4,_0x1f9819,_0x7f485a)=>{_0x7f485a['options']['showSuggestionHighlights']&&re(_0x47cad0,{'showActiveMarker':!0x1})(_0x10ecd4,_0x1f9819,_0x7f485a);}),_0x50b24a['_descriptionFactory']['registerElementLabel']('softBreak',_0x3248e1=>t({'id':'ELEMENT_LINE_BREAK','string':'line\x20break','plural':'%0\x20line\x20breaks'},_0x3248e1));}}function re(_0x4d2a80,{showActiveMarker:_0x246b12=!0x0}={}){return(_0x3a1f76,_0x2e612e,_0x59b8ca)=>{const _0xbccc92=_0x4d2a80['plugins']['get']('TrackChangesEditing');if(!_0x59b8ca['consumable']['test'](_0x2e612e['markerRange'],_0x3a1f76['name']))return;const _0x5e31b6=_0x4d2a80['model'];for(const _0x237ade of _0x2e612e['markerRange']['getItems']()){if(!_0x237ade['is']('element','softBreak'))continue;const _0xa9432b='deletion'==_0x2e612e['markerName']['split'](':')[0x1]?'merge':'split',_0x21e8fd=_0x59b8ca['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xa9432b}),_0x4016f4=_0x59b8ca['mapper']['toViewPosition'](_0x5e31b6['createPositionBefore'](_0x237ade));_0x246b12&&_0xbccc92['activeMarkers']['includes'](_0x2e612e['markerName'])&&_0x59b8ca['writer']['addClass']('ck-suggestion-marker--active',_0x21e8fd),_0x59b8ca['writer']['insert'](_0x4016f4,_0x21e8fd),_0x59b8ca['mapper']['bindElementToMarker'](_0x21e8fd,_0x2e612e['markerName']);}};}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x5d62f3}from'ckeditor5/src/core';import{getRangesWithAttribute as Rt}from'./utils';export default class et extends _0x5d62f3{['afterInit'](){const _0x4a0cab=this['editor'],_0x20e217=_0x4a0cab['model'];if(!_0x4a0cab['plugins']['has']('StandardEditingModeEditing'))return;const _0x9e381f=_0x4a0cab['plugins']['get']('TrackChangesEditing'),_0x26fa23='restrictedEditingException',_0xa3aaab=_0x4a0cab['commands']['get'](_0x26fa23);_0x9e381f['enableCommand'](_0x26fa23,(_0x107275,_0x4048d6={})=>{const _0x4f11f5=_0x20e217['document']['selection'];if(_0x4f11f5['isCollapsed'])return void _0x107275(_0x4048d6);const _0x5c585a=void 0x0!==_0x4048d6['forceValue']?_0x4048d6['forceValue']:!_0xa3aaab['value'];_0x20e217['change'](()=>{const _0x103c91=Array['from'](_0x4f11f5['getRanges']());for(const _0x4d7503 of _0x103c91){const _0x14a779=_0x5c585a?[_0x4d7503]:Rt(_0x26fa23,_0x4d7503,_0x20e217);for(const _0x1b7d0e of _0x14a779)_0x9e381f['markInlineFormat'](_0x1b7d0e,{'commandName':_0x26fa23,'commandParams':[{'forceValue':_0x5c585a}]});}});});const t=_0x4a0cab['t'];_0x9e381f['_descriptionFactory']['registerDescriptionCallback'](_0x4a257f=>{const {data:_0x2fcce3}=_0x4a257f;if(_0x2fcce3&&_0x2fcce3['commandName']==_0x26fa23)return _0x2fcce3['commandParams'][0x0]['forceValue']?{'type':'format','content':t({'string':'*Enable\x20in\x20restricted\x20editing\x20mode*','id':'FORMAT_RESTRICTED_ENABLED'})}:{'type':'format','content':t({'string':'*Disable\x20in\x20restricted\x20editing\x20mode*','id':'FORMAT_RESTRICTED_DISABLED'})};});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x166ddd}from'ckeditor5/src/core';import _0x1144db from'@ckeditor/ckeditor5-table/src/tablewalker';import{LiveRange as _0x295863}from'ckeditor5/src/engine';import{getColumnIndexes as _0x234236,getRowIndexes as _0x6f79a5,getSelectionAffectedTableCells as _0x546698}from'@ckeditor/ckeditor5-table/src/utils/selection';import'../../theme/integrations/table.css';import{setHighlightHandling as _0x28d33c}from'ckeditor5/src/widget';export default class ht extends _0x166ddd{constructor(_0x2d2515){super(_0x2d2515),this['_tablePostFixingSubtypes']=['tableRow','tableColumn'];}['afterInit'](){const _0x3225cc=this['editor'],_0x5dcc81=_0x3225cc['model']['document']['selection'];if(!_0x3225cc['plugins']['has']('TableEditing'))return;const {t:t}=_0x3225cc['locale'],_0x58baf8=_0x3225cc['plugins']['get']('TrackChangesEditing'),_0x243a18=_0x3225cc['plugins']['get']('TableUtils');_0x58baf8['_descriptionFactory']['registerElementLabel']('table',_0x1d8801=>t({'string':'table','plural':'%0\x20tables','id':'ELEMENT_TABLE'},_0x1d8801)),this['_setupColumnsRowsFixing'](),_0x58baf8['enableCommand']('insertTable'),_0x58baf8['enableCommand']('selectTableRow'),_0x58baf8['enableCommand']('selectTableColumn');for(const _0x28c6e1 of['insertTableRowAbove','insertTableRowBelow']){const _0x10e105=_0x3225cc['commands']['get'](_0x28c6e1);_0x58baf8['enableCommand'](_0x28c6e1,_0x3f2e73=>{_0x3225cc['model']['change'](_0x334c2e=>{_0x3f2e73();const _0x4e3657='above'===_0x10e105['order'],_0x1418cd=_0x546698(_0x5dcc81),_0x29f64c=_0x6f79a5(_0x1418cd),_0x11fa04=_0x4e3657?_0x29f64c['first']-0x1:_0x29f64c['last']+0x1,_0x3f471a=_0x1418cd[0x0]['findAncestor']('table'),_0x4adc21=new _0x1144db(_0x3f471a,{'startRow':_0x11fa04,'endRow':_0x11fa04}),_0x51bc0d=Array['from'](_0x4adc21)['map'](_0xe1ec8f=>_0x334c2e['createRangeOn'](_0xe1ec8f['cell']));_0x58baf8['markMultiRangeInsertion'](_0x51bc0d,'tableRow');});});}for(const _0x54f864 of['insertTableColumnLeft','insertTableColumnRight']){const _0x3ac271=_0x3225cc['commands']['get'](_0x54f864);_0x58baf8['enableCommand'](_0x54f864,_0x8da484=>{_0x3225cc['model']['change'](_0x3cd426=>{_0x8da484();const _0x1b8fb4='left'===_0x3ac271['order'],_0x45ba69=_0x546698(_0x5dcc81),_0x4fb9bb=_0x234236(_0x45ba69),_0x247110=_0x1b8fb4?_0x4fb9bb['first']-0x1:_0x4fb9bb['last']+0x1,_0x37a320=_0x45ba69[0x0]['findAncestor']('table'),_0x322e7a=new _0x1144db(_0x37a320,{'startRow':0x0,'column':_0x247110,'includeAllSlots':!0x1}),_0x551700=Array['from'](_0x322e7a)['map'](_0x1ed9c8=>_0x3cd426['createRangeOn'](_0x1ed9c8['cell']));_0x58baf8['markMultiRangeInsertion'](_0x551700,'tableColumn');});});}for(const _0x592407 of['removeTableRow','removeTableColumn']){const _0x3ea9a8=_0x592407['substr'](0xb),_0x2bfd90=_0x3ea9a8['toLowerCase'](),_0x31de02=_0x2bfd90['substr'](0x0,0x3)+'span',_0x59f3ec='table'+_0x3ea9a8,_0x44dd49='min'+_0x3ea9a8,_0x4e90d7='max'+_0x3ea9a8;_0x58baf8['enableCommand'](_0x592407,()=>{_0x3225cc['model']['change'](_0x14ce30=>{const _0xf73078=_0x546698(_0x5dcc81),_0xb77d85=_0xf73078[0x0]['findAncestor']('table');let _0x3ad7d4;if('removeTableRow'==_0x592407){const _0x41bba5=_0x6f79a5(_0xf73078);_0x3ad7d4={'startRow':_0x41bba5['first'],'endRow':_0x41bba5['last'],'includeAllSlots':!0x0};}else{const _0x2cddbc=_0x234236(_0xf73078);_0x3ad7d4={'startColumn':_0x2cddbc['first'],'endColumn':_0x2cddbc['last'],'includeAllSlots':!0x0};}const _0x2415e6=new _0x1144db(_0xb77d85,_0x3ad7d4),_0x13b458=Array['from'](_0x2415e6)['map'](({cell:_0x26e51d})=>_0x26e51d),_0xcc3eae=ue(_0x13b458['filter'](_0x278df6=>_0x278df6['hasAttribute'](_0x31de02))),_0x348dfb=ue(_0x13b458['filter'](_0xdf941f=>!_0xdf941f['hasAttribute'](_0x31de02)))['map'](_0x2a9023=>_0x14ce30['createRangeOn'](_0x2a9023)),_0x382db4=_0x58baf8['markMultiRangeDeletion'](_0x348dfb,_0x59f3ec);if(_0x382db4&&('tableRow'==_0x382db4['subType']||'tableColumn'==_0x382db4['subType'])){const _0x5c1151=this['_getSuggestionCoords'](_0x382db4);for(const _0x147b34 of _0xcc3eae){const _0x5aa6d1=_0x14ce30['createRangeOn'](_0x147b34),_0x1bdeac=_0x243a18['getCellLocation'](_0x147b34),_0x14d4f4=_0x147b34['getAttribute'](_0x31de02)-0x1,_0x2e6f17=_0x5c1151[_0x44dd49],_0x5ca9a9=_0x5c1151[_0x4e90d7];_0x2e6f17<=_0x1bdeac[_0x2bfd90]&&_0x1bdeac[_0x2bfd90]+_0x14d4f4<=_0x5ca9a9&&_0x382db4['addRange'](_0x5aa6d1);}}});});}function _0x1d6c37(_0x32ad){const _0x485108=Array['from'](_0x5dcc81['getRanges']())['map'](_0x164247=>_0x295863['fromRange'](_0x164247));_0x3225cc['model']['change'](_0xaf2d3a=>{const _0x118d16=_0xaf2d3a['batch'];_0x32ad=_0x32ad['filter'](_0x5b24e3=>'$graveyard'!=_0x5b24e3['root']['rootName']),_0xaf2d3a['setSelection'](_0x32ad),_0x3225cc['commands']['get']('removeTableRow')['refresh'](),_0x3225cc['execute']('removeTableRow',{'forceDefaultExecution':!0x0}),_0x3225cc['model']['enqueueChange'](()=>{_0x3225cc['model']['enqueueChange'](_0x118d16,_0x31d060=>{const _0x53942f=_0x485108['filter'](_0x3d74df=>'$graveyard'!=_0x3d74df['root']['rootName']);_0x53942f['length']>0x0&&_0x31d060['setSelection'](_0x53942f);for(const _0x108f19 of _0x485108)_0x108f19['detach']();});});});}function _0x4d7134(_0x1517cb){_0x3225cc['model']['change'](_0x4b114f=>{const _0x58f230=Array['from'](_0x5dcc81['getRanges']())['map'](_0x21f5c0=>_0x295863['fromRange'](_0x21f5c0)),_0x16e098=[];for(const _0x56e16d of _0x1517cb)for(const _0x35283f of _0x56e16d['getItems']({'shallow':!0x0}))_0x16e098['push'](_0x35283f);for(const _0x33250e of _0x16e098)'$graveyard'!=_0x33250e['root']['rootName']&&(_0x4b114f['setSelection'](_0x4b114f['createPositionAt'](_0x33250e,0x0)),_0x3225cc['commands']['get']('removeTableColumn')['refresh'](),_0x3225cc['execute']('removeTableColumn',{'forceDefaultExecution':!0x0}));const _0x2d0879=_0x58f230['filter'](_0x4f80fc=>'$graveyard'!=_0x4f80fc['root']['rootName']);_0x2d0879['length']>0x0&&_0x4b114f['setSelection'](_0x2d0879);for(const _0x342178 of _0x58f230)_0x342178['detach']();});}function _0x2be687(_0x3defc6,_0x5bffd0){return _0x5bffd0['every'](_0x290084=>_0x3defc6['some'](_0x1990be=>_0x1990be['end']['isEqual'](_0x290084['start'])||_0x290084['end']['isEqual'](_0x1990be['start'])));}function _0x1b0e0b(_0x5df0b8,_0x20a796){return _0x5df0b8['some'](_0x57d707=>_0x20a796['some'](_0xc6a8e6=>_0x57d707['end']['isTouching'](_0xc6a8e6['start'])));}_0x3225cc['data']['downcastDispatcher']['on']('addMarker:suggestion',(_0x19b258,_0x30a3d9,_0x4fd03b)=>{if(!_0x4fd03b['options']['showSuggestionHighlights'])return;const _0x133061=_0x30a3d9['item'];if(!_0x133061)return;const _0x530b2a=_0x4fd03b['mapper']['toViewElement'](_0x133061);function _0x18175b(_0x507e05){return Array['isArray'](_0x507e05)?_0x507e05:[_0x507e05];}_0x530b2a&&'tableCell'===_0x133061['name']&&_0x28d33c(_0x530b2a,_0x4fd03b['writer'],(_0xb2ff7e,_0x5a3e10,_0x3f44ce)=>_0x3f44ce['addClass'](_0x18175b(_0x5a3e10['classes']),_0xb2ff7e),(_0x2c33f9,_0x2e682f,_0x9fcff3)=>_0x9fcff3['removeClass'](_0x18175b(_0x2e682f['classes']),_0x2c33f9));},{'priority':'highest'}),_0x58baf8['_descriptionFactory']['registerDescriptionCallback'](_0x38f62e=>{if('insertion'!=_0x38f62e['type']&&'deletion'!=_0x38f62e['type'])return;const _0x51e631=_0x38f62e['getContainedElement']();if(null!=_0x51e631&&_0x51e631['is']('element','table')){if('insertion'==_0x38f62e['type']){const _0x2e9ee7=_0x38f62e['getItems']()['filter'](_0x5279b0=>_0x5279b0['is']('textProxy'))['map'](_0x32c628=>_0x32c628['data']);if(_0x2e9ee7['length'])return{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20*with\x20text*\x20%0','id':'ELEMENT_TABLE_WITH_TEXT'},'\x22'+_0x2e9ee7['join']('\x20')+'\x22'))};}if('deletion'==_0x38f62e['type']){const _0x1bb431=_0x38f62e['getItems']()['filter'](_0xb2fc6d=>_0xb2fc6d['is']('textProxy'))['map'](_0x593a53=>_0x593a53['data']);if(_0x1bb431['length'])return{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20*with\x20text*\x20%0','id':'ELEMENT_TABLE_WITH_TEXT'},'\x22'+_0x1bb431['join']('\x20')+'\x22'))};}}}),_0x58baf8['_descriptionFactory']['registerDescriptionCallback'](_0x4ef1c7=>{if('tableRow'==_0x4ef1c7['subType']){const _0x552851=_0x4ef1c7['getItems']()['filter'](_0xdf80ab=>_0xdf80ab['is']('textProxy'))['map'](_0x4bb622=>_0x4bb622['data']),_0x4dc7f8=this['_getSuggestionCoords'](_0x4ef1c7),_0x1d669f=_0x4dc7f8['maxRow']-_0x4dc7f8['minRow']+0x1;if('insertion'==_0x4ef1c7['type'])return _0x552851['length']?{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20row\x20*with\x20text*\x20%1','plural':'%0\x20table\x20rows\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_ROW_WITH_TEXT'},[_0x1d669f,'\x22'+_0x552851['join']('\x20')+'\x22']))}:{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20row','plural':'%0\x20table\x20rows','id':'ELEMENT_TABLE_ROW'},_0x1d669f))};if('deletion'==_0x4ef1c7['type'])return _0x552851['length']?{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20row\x20*with\x20text*\x20%1','plural':'%0\x20table\x20rows\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_ROW_WITH_TEXT'},[_0x1d669f,'\x22'+_0x552851['join']('\x20')+'\x22']))}:{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20row','plural':'%0\x20table\x20rows','id':'ELEMENT_TABLE_ROW'},_0x1d669f))};}if('tableColumn'==_0x4ef1c7['subType']){const _0x4f89cf=_0x4ef1c7['getItems']()['filter'](_0x559738=>_0x559738['is']('textProxy'))['map'](_0x2f3108=>_0x2f3108['data']),_0x5edb3b=this['_getSuggestionCoords'](_0x4ef1c7),_0x173e5b=_0x5edb3b['maxColumn']-_0x5edb3b['minColumn']+0x1;if('insertion'==_0x4ef1c7['type'])return _0x4f89cf['length']?{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20column\x20*with\x20text*\x20%1','plural':'%0\x20table\x20columns\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_COLUMN_WITH_TEXT'},[_0x173e5b,'\x22'+_0x4f89cf['join']('\x20')+'\x22']))}:{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20column','plural':'%0\x20table\x20columns','id':'ELEMENT_TABLE_COLUMN'},_0x173e5b))};if('deletion'==_0x4ef1c7['type'])return _0x4f89cf['length']?{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20column\x20*with\x20text*\x20%1','plural':'%0\x20table\x20columns\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_COLUMN_WITH_TEXT'},[_0x173e5b,'\x22'+_0x4f89cf['join']('\x20')+'\x22']))}:{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20column','plural':'%0\x20table\x20columns','id':'ELEMENT_TABLE_COLUMN'},_0x173e5b))};}}),_0x58baf8['_suggestionFactory']['registerCustomCallback']('insertion','tableRow','discard',_0x1d6c37),_0x58baf8['_suggestionFactory']['registerCustomCallback']('deletion','tableRow','accept',_0x1d6c37),_0x58baf8['_suggestionFactory']['registerCustomCallback']('insertion','tableColumn','discard',_0x4d7134),_0x58baf8['_suggestionFactory']['registerCustomCallback']('deletion','tableColumn','accept',_0x4d7134),_0x58baf8['_suggestionFactory']['registerCustomCallback']('insertion','tableColumn','join',_0x2be687),_0x58baf8['_suggestionFactory']['registerCustomCallback']('deletion','tableColumn','join',_0x2be687),_0x58baf8['_suggestionFactory']['registerCustomCallback']('insertion','tableRow','join',_0x1b0e0b),_0x58baf8['_suggestionFactory']['registerCustomCallback']('deletion','tableRow','join',_0x1b0e0b);}['_acceptFormatSuggestionCallbackFactory'](){const _0x1acda7=this['editor'],_0x2d3bfa=_0x1acda7['model']['document']['selection'];return(_0x1d6c64,_0x5a49b1)=>{_0x1acda7['model']['change'](_0x224048=>{const {commandName:_0x50e33a,commandParams:_0x247ee2}=_0x5a49b1;let _0x37f954=_0x1d6c64[0x0]['end']['nodeBefore'];_0x247ee2&&_0x247ee2[0x0]&&!0x1===_0x247ee2[0x0]['forceValue']&&(_0x37f954=_0x1d6c64[0x0]['start']['nodeAfter']);const _0x24657a=_0x224048['createRangeIn'](_0x37f954);if('$graveyard'==_0x24657a['root']['rootName'])return;const _0x10b325=Array['from'](_0x2d3bfa['getRanges']())['map'](_0x1a47f1=>_0x295863['fromRange'](_0x1a47f1));_0x224048['setSelection'](_0x24657a),_0x1acda7['commands']['get'](_0x50e33a)['refresh'](),_0x247ee2['push']({'forceDefaultExecution':!0x0}),_0x1acda7['execute'](_0x50e33a,..._0x247ee2);const _0x121d97=_0x10b325['filter'](_0x408a99=>'$graveyard'!=_0x408a99['root']['rootName']);_0x121d97['length']>0x0&&_0x224048['setSelection'](_0x121d97);for(const _0x4b1e9e of _0x10b325)_0x4b1e9e['detach']();});};}['_getCoordsForCells'](_0x16c38b){const _0x2d24f6=this['editor']['plugins']['get']('TableUtils');let _0x525162=Number['MAX_SAFE_INTEGER'],_0x417a4f=Number['MIN_SAFE_INTEGER'],_0x1c92c3=Number['MAX_SAFE_INTEGER'],_0x31fad8=Number['MIN_SAFE_INTEGER'];for(const _0x17a332 of _0x16c38b){if('$graveyard'==_0x17a332['root']['rootName'])continue;const {row:_0x557236,column:_0x5cb1c0}=_0x2d24f6['getCellLocation'](_0x17a332),_0x3cbcf1=_0x17a332['hasAttribute']('rowspan')?_0x17a332['getAttribute']('rowspan')-0x1:0x0,_0x2d841d=_0x17a332['hasAttribute']('colspan')?_0x17a332['getAttribute']('colspan')-0x1:0x0;_0x525162=_0x557236<_0x525162?_0x557236:_0x525162,_0x417a4f=_0x557236+_0x3cbcf1>_0x417a4f?_0x557236+_0x3cbcf1:_0x417a4f,_0x1c92c3=_0x5cb1c0<_0x1c92c3?_0x5cb1c0:_0x1c92c3,_0x31fad8=_0x5cb1c0+_0x2d841d>_0x31fad8?_0x5cb1c0+_0x2d841d:_0x31fad8;}return{'minRow':_0x525162,'maxRow':_0x417a4f,'minColumn':_0x1c92c3,'maxColumn':_0x31fad8};}['_setupColumnsRowsFixing'](){const _0x4037c1=this['editor'],_0x4d8c08=_0x4037c1['plugins']['get']('TrackChangesEditing'),_0x3bef89=_0x4037c1['plugins']['get']('TableUtils');this['_tableSuggestions']=new Set(),_0x4037c1['model']['document']['on']('change:data',()=>{const _0x25ed5e=Array['from'](_0x4037c1['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x3a38b8,data:_0xa2d3f9}of _0x25ed5e){const {group:_0x244bc6,id:_0x369bf6,subType:_0x2af43c}=_0x4d8c08['_splitMarkerName'](_0x3a38b8);if('suggestion'!=_0x244bc6)continue;if(null!=_0xa2d3f9['oldRange'])continue;const _0x5ddb6a=_0x4d8c08['getSuggestion'](_0x369bf6);this['_tablePostFixingSubtypes']['includes'](_0x2af43c)&&this['_tableSuggestions']['add'](_0x5ddb6a);}},{'priority':'low'});const _0x374c4e=(_0x280ab9,_0xb261ff)=>{let _0x1a8c71=!0x1;const _0x1a484c=_0xb261ff['createRangeOn'](_0x280ab9),_0xa6483c=_0x280ab9['findAncestor']('table'),_0x39fb2b=_0x3bef89['getCellLocation'](_0x280ab9);for(const _0x596ca8 of this['_tableSuggestions']){const _0x130b2e=_0x596ca8['subType'],_0x385c9e=_0x130b2e['startsWith']('tablePaste'),_0x1a820e=_0x130b2e['substr'](_0x385c9e?0xa:0x5),_0x47f65d=_0x1a820e['toLowerCase'](),_0x23423c=_0x47f65d['substr'](0x0,0x3)+'span',_0x2365d8='min'+_0x1a820e,_0x5d8ce7='max'+_0x1a820e;if(!_0x596ca8['isInContent'])continue;if(_0xa6483c!=_0x596ca8['getFirstRange']()['start']['findAncestor']('table'))continue;if(_0x596ca8['isIntersectingWithRange'](_0x1a484c))continue;const _0x3036f3=_0x280ab9['hasAttribute'](_0x23423c)?_0x280ab9['getAttribute'](_0x23423c)-0x1:0x0,_0x277195=this['_getSuggestionCoords'](_0x596ca8),_0x14eabd=_0x277195[_0x2365d8],_0x2b13d0=_0x277195[_0x5d8ce7];_0x14eabd<=_0x39fb2b[_0x47f65d]&&_0x39fb2b[_0x47f65d]+_0x3036f3<=_0x2b13d0&&(_0x596ca8['addRange'](_0x1a484c),_0x1a8c71=!0x0);}return _0x1a8c71;};_0x4037c1['model']['document']['registerPostFixer'](_0x519d9b=>{let _0x1d733d=!0x1;for(const _0x2551d5 of _0x4037c1['model']['document']['differ']['getChanges']())if('insert'==_0x2551d5['type']){if('tableRow'==_0x2551d5['name'])for(const _0x5071c4 of _0x2551d5['position']['nodeAfter']['getChildren']())_0x1d733d=_0x1d733d||_0x374c4e(_0x5071c4,_0x519d9b);else'tableCell'==_0x2551d5['name']&&(_0x1d733d=_0x1d733d||_0x374c4e(_0x2551d5['position']['nodeAfter'],_0x519d9b));}return _0x1d733d;});}['_getSuggestionCoords'](_0x1ab128){return this['_getCoordsForCells'](_0x1ab128['getRanges']()['map'](_0x33775f=>_0x33775f['start']['nodeAfter']));}}function ue(_0x3a281e){return Array['from'](new Set(_0x3a281e)['values']());}
|
|
23
|
+
import{Plugin as _0x441c69}from'ckeditor5/src/core';import{LiveRange as _0x3420fa}from'ckeditor5/src/engine';import'../../theme/integrations/table.css';import{setHighlightHandling as $t}from'ckeditor5/src/widget';export default class ot extends _0x441c69{constructor(_0x37c9e1){super(_0x37c9e1),this['_tablePostFixingSubtypes']=['tableRow','tableColumn'];}['afterInit'](){const _0x4a455f=this['editor'],_0x22750b=_0x4a455f['model']['document']['selection'];if(!_0x4a455f['plugins']['has']('TableEditing'))return;const {t:t}=_0x4a455f['locale'],_0x479bd0=_0x4a455f['plugins']['get']('TrackChangesEditing'),_0x439a96=_0x4a455f['plugins']['get']('TableUtils');_0x479bd0['_descriptionFactory']['registerElementLabel']('table',_0x4cab17=>t({'string':'table','plural':'%0\x20tables','id':'ELEMENT_TABLE'},_0x4cab17)),this['_setupColumnsRowsFixing'](),_0x479bd0['enableCommand']('insertTable'),_0x479bd0['enableCommand']('selectTableRow'),_0x479bd0['enableCommand']('selectTableColumn');for(const _0x137f0a of['insertTableRowAbove','insertTableRowBelow']){const _0x46a23d=_0x4a455f['commands']['get'](_0x137f0a);_0x479bd0['enableCommand'](_0x137f0a,_0x3cf2d2=>{_0x4a455f['model']['change'](_0x2938e8=>{_0x3cf2d2();const _0x5854d6='above'===_0x46a23d['order'],_0x9ae4ac=_0x439a96['getSelectionAffectedTableCells'](_0x22750b),_0xc5ac5a=_0x439a96['getRowIndexes'](_0x9ae4ac),_0x9211b=_0x5854d6?_0xc5ac5a['first']-0x1:_0xc5ac5a['last']+0x1,_0x3edfcb=_0x9ae4ac[0x0]['findAncestor']('table'),_0x5842bc=_0x439a96['createTableWalker'](_0x3edfcb,{'startRow':_0x9211b,'endRow':_0x9211b}),_0x137502=Array['from'](_0x5842bc)['map'](_0x15c408=>_0x2938e8['createRangeOn'](_0x15c408['cell']));_0x479bd0['markMultiRangeInsertion'](_0x137502,'tableRow');});});}for(const _0x316480 of['insertTableColumnLeft','insertTableColumnRight']){const _0x48baa6=_0x4a455f['commands']['get'](_0x316480);_0x479bd0['enableCommand'](_0x316480,_0x39cf31=>{_0x4a455f['model']['change'](_0x502fb1=>{_0x39cf31();const _0x194f6f='left'===_0x48baa6['order'],_0x508552=_0x439a96['getSelectionAffectedTableCells'](_0x22750b),_0x3b0b1d=_0x439a96['getColumnIndexes'](_0x508552),_0x2ff4a6=_0x194f6f?_0x3b0b1d['first']-0x1:_0x3b0b1d['last']+0x1,_0xf9352d=_0x508552[0x0]['findAncestor']('table'),_0x592e3e=_0x439a96['createTableWalker'](_0xf9352d,{'startRow':0x0,'column':_0x2ff4a6,'includeAllSlots':!0x1}),_0x3b6f94=Array['from'](_0x592e3e)['map'](_0x1eb6c3=>_0x502fb1['createRangeOn'](_0x1eb6c3['cell']));_0x479bd0['markMultiRangeInsertion'](_0x3b6f94,'tableColumn');});});}for(const _0x2e0fb5 of['removeTableRow','removeTableColumn']){const _0x4ab4d9=_0x2e0fb5['substr'](0xb),_0x1f2bac=_0x4ab4d9['toLowerCase'](),_0x3f8d06=_0x1f2bac['substr'](0x0,0x3)+'span',_0x1ed864='table'+_0x4ab4d9,_0x31fcca='min'+_0x4ab4d9,_0x261c94='max'+_0x4ab4d9;_0x479bd0['enableCommand'](_0x2e0fb5,()=>{_0x4a455f['model']['change'](_0x468257=>{const _0x540d68=_0x439a96['getSelectionAffectedTableCells'](_0x22750b),_0x57e0bf=_0x540d68[0x0]['findAncestor']('table');let _0x4f834c;if('removeTableRow'==_0x2e0fb5){const _0x1a19cf=_0x439a96['getRowIndexes'](_0x540d68);_0x4f834c={'startRow':_0x1a19cf['first'],'endRow':_0x1a19cf['last'],'includeAllSlots':!0x0};}else{const _0x3413a4=_0x439a96['getColumnIndexes'](_0x540d68);_0x4f834c={'startColumn':_0x3413a4['first'],'endColumn':_0x3413a4['last'],'includeAllSlots':!0x0};}const _0x48dac5=_0x439a96['createTableWalker'](_0x57e0bf,_0x4f834c),_0x241fc6=Array['from'](_0x48dac5)['map'](({cell:_0x3f4797})=>_0x3f4797),_0x4f9322=Wt(_0x241fc6['filter'](_0x2adbe0=>_0x2adbe0['hasAttribute'](_0x3f8d06))),_0x42fce6=Wt(_0x241fc6['filter'](_0x3ce684=>!_0x3ce684['hasAttribute'](_0x3f8d06)))['map'](_0x43b665=>_0x468257['createRangeOn'](_0x43b665)),_0x27acf2=_0x479bd0['markMultiRangeDeletion'](_0x42fce6,_0x1ed864);if(_0x27acf2&&('tableRow'==_0x27acf2['subType']||'tableColumn'==_0x27acf2['subType'])){const _0x4129e7=this['_getSuggestionCoords'](_0x27acf2);for(const _0x1a4319 of _0x4f9322){const _0x5dbdb7=_0x468257['createRangeOn'](_0x1a4319),_0x341905=_0x439a96['getCellLocation'](_0x1a4319),_0x4ae511=_0x1a4319['getAttribute'](_0x3f8d06)-0x1,_0x4f5d31=_0x4129e7[_0x31fcca],_0x15cd3c=_0x4129e7[_0x261c94];_0x4f5d31<=_0x341905[_0x1f2bac]&&_0x341905[_0x1f2bac]+_0x4ae511<=_0x15cd3c&&_0x27acf2['addRange'](_0x5dbdb7);}}});});}function _0x53c58a(_0x2cdad1){const _0x113862=Array['from'](_0x22750b['getRanges']())['map'](_0x547fce=>_0x3420fa['fromRange'](_0x547fce));_0x4a455f['model']['change'](_0x51107f=>{const _0x963c81=_0x51107f['batch'];_0x2cdad1=_0x2cdad1['filter'](_0x491565=>'$graveyard'!=_0x491565['root']['rootName']),_0x51107f['setSelection'](_0x2cdad1),_0x4a455f['commands']['get']('removeTableRow')['refresh'](),_0x4a455f['execute']('removeTableRow',{'forceDefaultExecution':!0x0}),_0x4a455f['model']['enqueueChange'](()=>{_0x4a455f['model']['enqueueChange'](_0x963c81,_0x5f131f=>{const _0x79238a=_0x113862['filter'](_0x23d8cd=>'$graveyard'!=_0x23d8cd['root']['rootName']);_0x79238a['length']>0x0&&_0x5f131f['setSelection'](_0x79238a);for(const _0x1af0c6 of _0x113862)_0x1af0c6['detach']();});});});}function _0xf5b8a5(_0x2405fb){_0x4a455f['model']['change'](_0xd94c94=>{const _0x48bb90=Array['from'](_0x22750b['getRanges']())['map'](_0x289e1b=>_0x3420fa['fromRange'](_0x289e1b)),_0x8d2dc0=[];for(const _0x8f63af of _0x2405fb)for(const _0x6d4bed of _0x8f63af['getItems']({'shallow':!0x0}))_0x8d2dc0['push'](_0x6d4bed);for(const _0xb2c6ea of _0x8d2dc0)'$graveyard'!=_0xb2c6ea['root']['rootName']&&(_0xd94c94['setSelection'](_0xd94c94['createPositionAt'](_0xb2c6ea,0x0)),_0x4a455f['commands']['get']('removeTableColumn')['refresh'](),_0x4a455f['execute']('removeTableColumn',{'forceDefaultExecution':!0x0}));const _0x48e4d9=_0x48bb90['filter'](_0x2be7aa=>'$graveyard'!=_0x2be7aa['root']['rootName']);_0x48e4d9['length']>0x0&&_0xd94c94['setSelection'](_0x48e4d9);for(const _0x3d762a of _0x48bb90)_0x3d762a['detach']();});}function _0x956b5b(_0x432419,_0x445ce5){return _0x445ce5['every'](_0x3ab399=>_0x432419['some'](_0x41bb3c=>_0x41bb3c['end']['isEqual'](_0x3ab399['start'])||_0x3ab399['end']['isEqual'](_0x41bb3c['start'])));}function _0x1dc2a9(_0x539ac7,_0x1df285){return _0x539ac7['some'](_0x43e52d=>_0x1df285['some'](_0x2b0254=>_0x43e52d['end']['isTouching'](_0x2b0254['start'])));}_0x4a455f['data']['downcastDispatcher']['on']('addMarker:suggestion',(_0x4b428c,_0x98c48f,_0x55edf7)=>{if(!_0x55edf7['options']['showSuggestionHighlights'])return;const _0x5d8979=_0x98c48f['item'];if(!_0x5d8979)return;const _0x3e7a8d=_0x55edf7['mapper']['toViewElement'](_0x5d8979);function _0x32d84b(_0x5c0206){return Array['isArray'](_0x5c0206)?_0x5c0206:[_0x5c0206];}_0x3e7a8d&&'tableCell'===_0x5d8979['name']&&$t(_0x3e7a8d,_0x55edf7['writer'],(_0x44ceea,_0x249850,_0x12dee9)=>_0x12dee9['addClass'](_0x32d84b(_0x249850['classes']),_0x44ceea),(_0x3027b9,_0xa4aa68,_0x2bacf2)=>_0x2bacf2['removeClass'](_0x32d84b(_0xa4aa68['classes']),_0x3027b9));},{'priority':'highest'}),_0x479bd0['_descriptionFactory']['registerDescriptionCallback'](_0x406610=>{if('insertion'!=_0x406610['type']&&'deletion'!=_0x406610['type'])return;const _0x3c49a0=_0x406610['getContainedElement']();if(null!=_0x3c49a0&&_0x3c49a0['is']('element','table')){if('insertion'==_0x406610['type']){const _0x547ad6=_0x406610['getItems']()['filter'](_0x5d5b12=>_0x5d5b12['is']('textProxy'))['map'](_0x52f99d=>_0x52f99d['data']);if(_0x547ad6['length'])return{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20*with\x20text*\x20%0','id':'ELEMENT_TABLE_WITH_TEXT'},'\x22'+_0x547ad6['join']('\x20')+'\x22'))};}if('deletion'==_0x406610['type']){const _0x3f3122=_0x406610['getItems']()['filter'](_0x2795fb=>_0x2795fb['is']('textProxy'))['map'](_0x1c224a=>_0x1c224a['data']);if(_0x3f3122['length'])return{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20*with\x20text*\x20%0','id':'ELEMENT_TABLE_WITH_TEXT'},'\x22'+_0x3f3122['join']('\x20')+'\x22'))};}}}),_0x479bd0['_descriptionFactory']['registerDescriptionCallback'](_0x454c5e=>{if('tableRow'==_0x454c5e['subType']){const _0x5ea154=_0x454c5e['getItems']()['filter'](_0x2915fa=>_0x2915fa['is']('textProxy'))['map'](_0x391cb7=>_0x391cb7['data']),_0x4abccd=this['_getSuggestionCoords'](_0x454c5e),_0x464c5a=_0x4abccd['maxRow']-_0x4abccd['minRow']+0x1;if('insertion'==_0x454c5e['type'])return _0x5ea154['length']?{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20row\x20*with\x20text*\x20%1','plural':'%0\x20table\x20rows\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_ROW_WITH_TEXT'},[_0x464c5a,'\x22'+_0x5ea154['join']('\x20')+'\x22']))}:{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20row','plural':'%0\x20table\x20rows','id':'ELEMENT_TABLE_ROW'},_0x464c5a))};if('deletion'==_0x454c5e['type'])return _0x5ea154['length']?{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20row\x20*with\x20text*\x20%1','plural':'%0\x20table\x20rows\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_ROW_WITH_TEXT'},[_0x464c5a,'\x22'+_0x5ea154['join']('\x20')+'\x22']))}:{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20row','plural':'%0\x20table\x20rows','id':'ELEMENT_TABLE_ROW'},_0x464c5a))};}if('tableColumn'==_0x454c5e['subType']){const _0x417f69=_0x454c5e['getItems']()['filter'](_0x41735d=>_0x41735d['is']('textProxy'))['map'](_0x28c5a5=>_0x28c5a5['data']),_0x5d5f71=this['_getSuggestionCoords'](_0x454c5e),_0x5e1d12=_0x5d5f71['maxColumn']-_0x5d5f71['minColumn']+0x1;if('insertion'==_0x454c5e['type'])return _0x417f69['length']?{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20column\x20*with\x20text*\x20%1','plural':'%0\x20table\x20columns\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_COLUMN_WITH_TEXT'},[_0x5e1d12,'\x22'+_0x417f69['join']('\x20')+'\x22']))}:{'type':'insertion','content':t('*Insert:*\x20%0',t({'string':'table\x20column','plural':'%0\x20table\x20columns','id':'ELEMENT_TABLE_COLUMN'},_0x5e1d12))};if('deletion'==_0x454c5e['type'])return _0x417f69['length']?{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20column\x20*with\x20text*\x20%1','plural':'%0\x20table\x20columns\x20*with\x20text*\x20%1','id':'ELEMENT_TABLE_COLUMN_WITH_TEXT'},[_0x5e1d12,'\x22'+_0x417f69['join']('\x20')+'\x22']))}:{'type':'deletion','content':t('*Remove:*\x20%0',t({'string':'table\x20column','plural':'%0\x20table\x20columns','id':'ELEMENT_TABLE_COLUMN'},_0x5e1d12))};}}),_0x479bd0['_suggestionFactory']['registerCustomCallback']('insertion','tableRow','discard',_0x53c58a),_0x479bd0['_suggestionFactory']['registerCustomCallback']('deletion','tableRow','accept',_0x53c58a),_0x479bd0['_suggestionFactory']['registerCustomCallback']('insertion','tableColumn','discard',_0xf5b8a5),_0x479bd0['_suggestionFactory']['registerCustomCallback']('deletion','tableColumn','accept',_0xf5b8a5),_0x479bd0['_suggestionFactory']['registerCustomCallback']('insertion','tableColumn','join',_0x956b5b),_0x479bd0['_suggestionFactory']['registerCustomCallback']('deletion','tableColumn','join',_0x956b5b),_0x479bd0['_suggestionFactory']['registerCustomCallback']('insertion','tableRow','join',_0x1dc2a9),_0x479bd0['_suggestionFactory']['registerCustomCallback']('deletion','tableRow','join',_0x1dc2a9);}['_acceptFormatSuggestionCallbackFactory'](){const _0x3e1988=this['editor'],_0x279260=_0x3e1988['model']['document']['selection'];return(_0x38c3c0,_0x25f032)=>{_0x3e1988['model']['change'](_0x3e582f=>{const {commandName:_0x43e1bd,commandParams:_0x5ed5e8}=_0x25f032;let _0x3e4f26=_0x38c3c0[0x0]['end']['nodeBefore'];_0x5ed5e8&&_0x5ed5e8[0x0]&&!0x1===_0x5ed5e8[0x0]['forceValue']&&(_0x3e4f26=_0x38c3c0[0x0]['start']['nodeAfter']);const _0x35c865=_0x3e582f['createRangeIn'](_0x3e4f26);if('$graveyard'==_0x35c865['root']['rootName'])return;const _0x5c6f54=Array['from'](_0x279260['getRanges']())['map'](_0x3e17cb=>_0x3420fa['fromRange'](_0x3e17cb));_0x3e582f['setSelection'](_0x35c865),_0x3e1988['commands']['get'](_0x43e1bd)['refresh'](),_0x5ed5e8['push']({'forceDefaultExecution':!0x0}),_0x3e1988['execute'](_0x43e1bd,..._0x5ed5e8);const _0xa1e130=_0x5c6f54['filter'](_0x5eb83d=>'$graveyard'!=_0x5eb83d['root']['rootName']);_0xa1e130['length']>0x0&&_0x3e582f['setSelection'](_0xa1e130);for(const _0x42eea5 of _0x5c6f54)_0x42eea5['detach']();});};}['_getCoordsForCells'](_0x560cc9){const _0x9e629=this['editor']['plugins']['get']('TableUtils');let _0x449b87=Number['MAX_SAFE_INTEGER'],_0x187b5c=Number['MIN_SAFE_INTEGER'],_0x55564e=Number['MAX_SAFE_INTEGER'],_0x5f5cd5=Number['MIN_SAFE_INTEGER'];for(const _0x5ba4bd of _0x560cc9){if('$graveyard'==_0x5ba4bd['root']['rootName'])continue;const {row:_0x5f420b,column:_0x1796c5}=_0x9e629['getCellLocation'](_0x5ba4bd),_0x377c7a=_0x5ba4bd['hasAttribute']('rowspan')?_0x5ba4bd['getAttribute']('rowspan')-0x1:0x0,_0x14e755=_0x5ba4bd['hasAttribute']('colspan')?_0x5ba4bd['getAttribute']('colspan')-0x1:0x0;_0x449b87=_0x5f420b<_0x449b87?_0x5f420b:_0x449b87,_0x187b5c=_0x5f420b+_0x377c7a>_0x187b5c?_0x5f420b+_0x377c7a:_0x187b5c,_0x55564e=_0x1796c5<_0x55564e?_0x1796c5:_0x55564e,_0x5f5cd5=_0x1796c5+_0x14e755>_0x5f5cd5?_0x1796c5+_0x14e755:_0x5f5cd5;}return{'minRow':_0x449b87,'maxRow':_0x187b5c,'minColumn':_0x55564e,'maxColumn':_0x5f5cd5};}['_setupColumnsRowsFixing'](){const _0x16750b=this['editor'],_0x2743cc=_0x16750b['plugins']['get']('TrackChangesEditing'),_0x23c4c4=_0x16750b['plugins']['get']('TableUtils');this['_tableSuggestions']=new Set(),_0x16750b['model']['document']['on']('change:data',()=>{const _0x3a31bc=Array['from'](_0x16750b['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x7631a4,data:_0x1afa0d}of _0x3a31bc){const {group:_0x3c53ca,id:_0x46ad27,subType:_0x3ae89d}=_0x2743cc['_splitMarkerName'](_0x7631a4);if('suggestion'!=_0x3c53ca)continue;if(null!=_0x1afa0d['oldRange'])continue;const _0x632d55=_0x2743cc['getSuggestion'](_0x46ad27);this['_tablePostFixingSubtypes']['includes'](_0x3ae89d)&&this['_tableSuggestions']['add'](_0x632d55);}},{'priority':'low'});const _0x387cc8=(_0x4d8d82,_0x3722df)=>{let _0x5072ac=!0x1;const _0x598ea6=_0x3722df['createRangeOn'](_0x4d8d82),_0x2524b6=_0x4d8d82['findAncestor']('table'),_0xe8f547=_0x23c4c4['getCellLocation'](_0x4d8d82);for(const _0x164120 of this['_tableSuggestions']){const _0x5f1adf=_0x164120['subType'],_0x101999=_0x5f1adf['startsWith']('tablePaste'),_0x165cd1=_0x5f1adf['substr'](_0x101999?0xa:0x5),_0xb94b1e=_0x165cd1['toLowerCase'](),_0x5f3b7d=_0xb94b1e['substr'](0x0,0x3)+'span',_0x277001='min'+_0x165cd1,_0x218f56='max'+_0x165cd1;if(!_0x164120['isInContent'])continue;if(_0x2524b6!=_0x164120['getFirstRange']()['start']['findAncestor']('table'))continue;if(_0x164120['isIntersectingWithRange'](_0x598ea6))continue;const _0x4c9194=_0x4d8d82['hasAttribute'](_0x5f3b7d)?_0x4d8d82['getAttribute'](_0x5f3b7d)-0x1:0x0,_0x24ee45=this['_getSuggestionCoords'](_0x164120),_0x2fe620=_0x24ee45[_0x277001],_0x301973=_0x24ee45[_0x218f56];_0x2fe620<=_0xe8f547[_0xb94b1e]&&_0xe8f547[_0xb94b1e]+_0x4c9194<=_0x301973&&(_0x164120['addRange'](_0x598ea6),_0x5072ac=!0x0);}return _0x5072ac;};_0x16750b['model']['document']['registerPostFixer'](_0x13cf8d=>{let _0x3bf694=!0x1;for(const _0x479be5 of _0x16750b['model']['document']['differ']['getChanges']())if('insert'==_0x479be5['type']){if('tableRow'==_0x479be5['name'])for(const _0x4b9a1d of _0x479be5['position']['nodeAfter']['getChildren']())_0x3bf694=_0x3bf694||_0x387cc8(_0x4b9a1d,_0x13cf8d);else'tableCell'==_0x479be5['name']&&(_0x3bf694=_0x3bf694||_0x387cc8(_0x479be5['position']['nodeAfter'],_0x13cf8d));}return _0x3bf694;});}['_getSuggestionCoords'](_0x4cebf8){return this['_getCoordsForCells'](_0x4cebf8['getRanges']()['map'](_0x527ebd=>_0x527ebd['start']['nodeAfter']));}}function Wt(_0x3ab41c){return Array['from'](new Set(_0x3ab41c)['values']());}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x489861}from'ckeditor5/src/core';import _0x3b8c6a from'@ckeditor/ckeditor5-table/src/tablewalker';import ht from'./table';import{uid as _0x1632d3,priorities as _0x3cbb11}from'ckeditor5/src/utils';import{getTableIfOnlyTableInContent as _0x44ceb2}from'@ckeditor/ckeditor5-table/src/tableclipboard';import{getColumnIndexes as _0x53c13c,getRowIndexes as _0x1f87b5,getSelectionAffectedTableCells as _0x339d04}from'@ckeditor/ckeditor5-table/src/utils/selection';const be=['tableCellBorderWidth','tableCellBorderColor','tableCellBorderStyle','tableCellHorizontalAlignment','tableCellVerticalAlignment','tableCellBackgroundColor','tableCellPadding'],de=Object['fromEntries'](be['map'](_0x26d6db=>[_0x26d6db,null]));export default class gt extends _0x489861{static get['requires'](){return[ht];}['afterInit'](){const _0xed8e87=this['editor'];if(!_0xed8e87['plugins']['has']('TableClipboard'))return;const {t:t}=_0xed8e87['locale'],_0x591d37=_0xed8e87['plugins']['get']('TrackChangesEditing'),_0x2525e5=_0xed8e87['plugins']['get']('TableUtils'),_0x3cdc40=_0xed8e87['plugins']['get'](ht);_0x3cdc40['_tablePostFixingSubtypes']['push']('tablePasteRow','tablePasteColumn'),_0xed8e87['model']['schema']['register']('tableCellSuggestion',{'allowIn':'tableCell','allowContentOf':'tableCell','isLimit':!0x0}),_0xed8e87['conversion']['elementToElement']({'model':'tableCellSuggestion','view':'suggestion-td'});let _0x11798a=null;_0xed8e87['model']['on']('insertContent',(_0x18dbd7,_0x1f7d3f)=>{const [_0xe427aa,_0x42e8bb]=_0x1f7d3f,_0x418568=_0x1f7d3f[_0x1f7d3f['length']-0x1];_0x418568&&_0x418568['forceDefaultExecution']||_0x591d37['_isForcedDefaultExecutionBlock']||this['editor']['commands']['get']('trackChanges')['value']&&function(_0x4b5269,_0xe82608,_0x4fdf83,_0x6fd4b8){if(_0xe82608&&!_0xe82608['is']('documentSelection'))return!0x1;const _0x173ea7=_0x44ceb2(_0x4b5269,_0x4fdf83);if(!_0x173ea7||!me(_0x173ea7))return!0x1;const _0x45bfa5=_0x339d04(_0x4fdf83['document']['selection']);if(!_0x45bfa5['length'])return!0x1;const _0x592558=_0x45bfa5[0x0]['findAncestor']('table'),_0x4eddbf=_0x1f87b5(_0x45bfa5),_0xa2b39e=_0x53c13c(_0x45bfa5),_0xcbb8eb={'startRow':_0x4eddbf['first'],'endRow':_0x4eddbf['last'],'startColumn':_0xa2b39e['first'],'endColumn':_0xa2b39e['last']};return 0x1==_0x45bfa5['length']&&(_0xcbb8eb['endRow']+=_0x6fd4b8['getRows'](_0x173ea7)-0x1,_0xcbb8eb['endColumn']+=_0x6fd4b8['getColumns'](_0x173ea7)-0x1),me(_0x592558,_0xcbb8eb);}(_0xe427aa,_0x42e8bb,_0xed8e87['model'],_0x2525e5)&&(_0x18dbd7['stop'](),_0x11798a={'cells':[],'insertionRanges':[],'deletionRanges':[],'rowInsertionRanges':[],'rowInsertionIndexes':[],'columnInsertionRanges':[],'columnInsertionIndexes':[]},_0xed8e87['model']['change'](()=>{_0xed8e87['model']['insertContent'](_0x1f7d3f[0x0],_0x1f7d3f[0x1],_0x1f7d3f[0x2],_0x1f7d3f[0x3],{'forceDefaultExecution':!0x0});const _0x4aed5d=_0x1632d3(),{rowInsertionRanges:_0x3f6b8e,columnInsertionRanges:_0x2d71be,insertionRanges:_0x1c7ce9,deletionRanges:_0x4d4252,cells:_0x597b40}=_0x11798a;_0x3f6b8e['length']&&_0x591d37['markMultiRangeInsertion'](_0x3f6b8e,'tablePasteRow',{'tablePasteChainId':_0x4aed5d}),_0x2d71be['length']&&_0x591d37['markMultiRangeInsertion'](_0x2d71be,'tablePasteColumn',{'tablePasteChainId':_0x4aed5d}),_0x1c7ce9['length']&&_0x591d37['markMultiRangeInsertion'](_0x1c7ce9,'tablePaste',{'tablePasteChainId':_0x4aed5d,'skipNestingCheck':!0x0}),_0x4d4252['length']&&_0x591d37['markMultiRangeDeletion'](_0x4d4252,'tablePaste',{'tablePasteChainId':_0x4aed5d,'skipNestingCheck':!0x0});const _0xa19eb5=_0x591d37['markMultiRangeBlockFormat'](_0x597b40['map'](({element:_0x4725d6})=>_0x4725d6),{'formatGroupId':_0x1632d3()},[],'tablePasteCell',{'tablePasteChainId':_0x4aed5d});if(_0xa19eb5){const _0x51fdcb=_0xa19eb5['getMarkers'](),_0x1d577e=[];for(const {element:_0x481009,attributes:_0x1b643a}of _0x597b40){if(!_0x1b643a)continue;const _0x38752a=_0xed8e87['model']['createRangeOn'](_0x481009),_0x505260=_0x51fdcb['find'](_0x10ea01=>_0x10ea01['getRange']()['isEqual'](_0x38752a));_0x505260&&_0x1d577e['push']([_0x505260['name'],_0x1b643a]);}_0x1d577e['length']&&_0xa19eb5['setAttribute']('markerAttributes',Object['fromEntries'](_0x1d577e));}_0x11798a=null;}));},{'priority':_0x3cbb11['high']+0xa}),_0xed8e87['plugins']['get']('TableClipboard')['on']('_replaceTableSlotCell',(_0x111088,_0xc34ac)=>{const [_0x2b53a4,_0x477e3c,,_0x5c5718]=_0xc34ac;if(!_0x11798a)return;_0x111088['stop']();const _0x444579=_0x2b53a4['cell'],_0x174b89=_0x477e3c,_0x4df303=ge(_0x444579),_0x2e0b65=ge(_0x174b89);_0x111088['return']=_0x444579;let _0x32682a=null,_0x3f09ca=null;if(_0x2e0b65||_0x4df303){if(_0x4df303&&!_0x2e0b65){_0x5c5718['remove'](_0x444579['getChild'](0x0));for(const _0x17aec0 of Array['from'](_0x174b89['getChildren']()))_0x5c5718['insert'](_0x17aec0,_0x444579,'end');const _0x4f61d6=_0x11798a['rowInsertionIndexes']['includes'](_0x2b53a4['row']),_0x21e10a=_0x11798a['columnInsertionIndexes']['includes'](_0x2b53a4['column']);_0x4f61d6||_0x21e10a||(_0x32682a=_0x5c5718['createRangeIn'](_0x444579));}else _0x2e0b65&&!_0x4df303&&(_0x3f09ca=_0x5c5718['createRangeIn'](_0x444579));}else{const _0x2f4fec=_0x5c5718['createElement']('tableCellSuggestion'),_0x57bcb5=_0x5c5718['createElement']('tableCellSuggestion');_0x5c5718['wrap'](_0x5c5718['createRangeIn'](_0x444579),_0x57bcb5),_0x5c5718['insert'](_0x2f4fec,_0x444579,0x0);for(const _0x53bb05 of Array['from'](_0x174b89['getChildren']()))_0x5c5718['insert'](_0x53bb05,_0x2f4fec,'end');_0x32682a=_0x5c5718['createRangeOn'](_0x2f4fec),_0x3f09ca=_0x5c5718['createRangeOn'](_0x57bcb5);}const _0x5b39cf=Array['from'](_0x174b89['getAttributes']())['filter'](([_0x223841])=>be['includes'](_0x223841));_0x11798a['cells']['push']({'element':_0x444579,'attributes':_0x5b39cf['length']?Object['fromEntries'](_0x5b39cf):null}),_0x32682a&&_0x11798a['insertionRanges']['push'](_0x32682a),_0x3f09ca&&_0x11798a['deletionRanges']['push'](_0x3f09ca);},{'priority':'high'}),_0x2525e5['on']('insertColumns',(_0x3344b6,_0x330711)=>{const [_0x4968b5,_0x13a802={}]=_0x330711;if(!_0x11798a)return;const _0x466290=_0x13a802['at']||0x0,_0x4e417b=_0x13a802['columns']||0x1;_0x11798a['columnInsertionIndexes']=new Array(_0x4e417b)['fill'](_0x466290)['map']((_0x233de8,_0x203917)=>_0x233de8+_0x203917);for(const {cell:_0x122bbd}of new _0x3b8c6a(_0x4968b5,{'startColumn':_0x466290,'endColumn':_0x466290+_0x4e417b-0x1}))_0x11798a['columnInsertionRanges']['push'](_0xed8e87['model']['createRangeOn'](_0x122bbd));},{'priority':'low'}),_0x2525e5['on']('insertRows',(_0x272872,_0x17f41b)=>{const [_0x893428,_0x3cd155={}]=_0x17f41b;if(!_0x11798a)return;const _0x4aa84e=_0x3cd155['at']||0x0,_0x1c87af=_0x3cd155['rows']||0x1;_0x11798a['rowInsertionIndexes']=new Array(_0x1c87af)['fill'](_0x4aa84e)['map']((_0x37f083,_0x3af75a)=>_0x37f083+_0x3af75a);for(const {cell:_0x1efa46}of new _0x3b8c6a(_0x893428,{'startRow':_0x4aa84e,'endRow':_0x4aa84e+_0x1c87af-0x1}))_0x11798a['rowInsertionRanges']['push'](_0xed8e87['model']['createRangeOn'](_0x1efa46));},{'priority':'low'}),_0x591d37['_descriptionFactory']['registerDescriptionCallback'](_0x2b899e=>{if(_0x2b899e['subType']&&_0x2b899e['subType']['startsWith']('tablePaste'))return _0x2b899e['previous']?{}:{'type':'insertion','content':t('*Replace\x20table\x20cells*')};});const _0x5cee2f=()=>{};for(const _0xe82847 of['tablePaste','tablePasteColumn','tablePasteRow','tablePasteCell'])_0x591d37['_suggestionFactory']['registerCustomCallback']('insertion',_0xe82847,'join',_0x5cee2f),_0x591d37['_suggestionFactory']['registerCustomCallback']('deletion',_0xe82847,'join',_0x5cee2f);_0x591d37['_suggestionFactory']['registerCustomCallback']('formatBlock','tablePasteCell','discard',_0x5cee2f),_0x591d37['_suggestionFactory']['registerCustomCallback']('formatBlock','tablePasteCell','accept',(_0x2afcee,_0x2cc6ac,_0x5131ce)=>{const _0x4813f6=_0x2afcee['map'](_0xc53010=>_0xc53010['getContainedElement']())['filter'](_0x10064d=>_0x10064d),_0x35c9e4=new Map(_0x4813f6['map'](_0x25a2f7=>[_0x25a2f7,null]));if(_0x11798a)for(const {element:_0xd74827,attributes:_0x50be4d}of _0x11798a['cells'])_0x50be4d&&_0x35c9e4['set'](_0xd74827,_0x50be4d);else{if(_0x5131ce&&_0x5131ce['markerAttributes'])for(const [_0x2d5285,_0x35babd]of Object['entries'](_0x5131ce['markerAttributes'])){const _0x271c6b=_0xed8e87['model']['markers']['get'](_0x2d5285),_0x1d273b=_0x271c6b?_0x271c6b['getRange']()['getContainedElement']():null;_0x1d273b&&_0x35c9e4['set'](_0x1d273b,_0x35babd);}}_0xed8e87['model']['change'](_0x1988ac=>{for(const [_0xc69273,_0x283929]of _0x35c9e4)_0x1988ac['setAttributes']({...de,..._0x283929},_0xc69273);});});const _0x4a14b9=(_0x3d1940,_0x3e83c5)=>{_0x591d37['_suggestionFactory']['registerCustomCallback'](_0x3d1940,'tablePaste',_0x3e83c5,(_0x3ab65c,_0xc7facf,_0x412bc4)=>{_0xed8e87['model']['change'](_0x12ac50=>{const _0x49683a=[];for(const _0x1229f8 of _0x3ab65c){const _0x303963=_0x1229f8['start']['nodeAfter'];_0x303963['is']('element','tableCellSuggestion')&&_0x49683a['push'](_0x303963);}_0x591d37['_suggestionFactory']['getSuggestionCallback'](_0x3d1940,null,_0x3e83c5)(_0x3ab65c,_0xc7facf,_0x412bc4);for(const _0x194efa of _0x49683a)'$graveyard'!=_0x194efa['root']['rootName']&&_0x12ac50['unwrap'](_0x194efa);});});};_0x4a14b9('insertion','accept'),_0x4a14b9('insertion','discard'),_0x4a14b9('deletion','accept'),_0x4a14b9('deletion','discard'),_0x591d37['_suggestionFactory']['registerCustomCallback']('insertion','tablePasteRow','discard',_0x1b5844=>{const _0x6d2580=_0x1b5844['map'](_0x62568c=>_0x62568c['getContainedElement']()),_0x5f0c21=_0x6d2580[0x0]['findAncestor']('table'),{minRow:_0x5ef59e,maxRow:_0x33b72f}=_0x3cdc40['_getCoordsForCells'](_0x6d2580);_0x2525e5['removeRows'](_0x5f0c21,{'at':_0x5ef59e,'rows':_0x33b72f-_0x5ef59e+0x1});}),_0x591d37['_suggestionFactory']['registerCustomCallback']('insertion','tablePasteColumn','discard',_0x39bde0=>{const _0x378884=_0x39bde0['map'](_0x344f7f=>_0x344f7f['getContainedElement']()),_0x495d80=_0x378884[0x0]['findAncestor']('table'),{minColumn:_0xca3be4,maxColumn:_0x2ee3bb}=_0x3cdc40['_getCoordsForCells'](_0x378884);_0x2525e5['removeColumns'](_0x495d80,{'at':_0xca3be4,'columns':_0x2ee3bb-_0xca3be4+0x1});});const _0x1bcbb7=(_0x10a9d7,_0x7e8747)=>{if(!_0x7e8747['subType']||!_0x7e8747['subType']['startsWith']('tablePaste'))return;const _0x4f5303=_0x7e8747['attributes']['tablePasteChainId'],_0x3852a9=_0x591d37['getSuggestions']()['filter'](_0x4e460b=>_0x4e460b['isInContent']&&_0x4e460b['attributes']&&_0x4e460b['attributes']['tablePasteChainId']==_0x4f5303);_0x3852a9['length']&&_0x7e8747['getAllAdjacentSuggestions']()['length']!=_0x3852a9['length']&&_0x3852a9['reduce']((_0x4f8145,_0x213448)=>(_0x4f8145['next']=_0x213448,_0x213448['previous']=_0x4f8145,_0x213448));};function _0x16cf53(_0x73280,{showActiveMarker:_0x596836=!0x0}={}){const {id:_0x154989}=_0x591d37['_splitMarkerName'](_0x73280['markerName']),_0x2264dc=['ck-suggestion-marker','ck-suggestion-marker-insertion'],_0x49bb8c=_0x591d37['activeMarkers']['includes'](_0x73280['markerName']);return _0x49bb8c&&_0x2264dc['push']('ck-suggestion-marker--active'),{'classes':_0x2264dc,'attributes':{'data-suggestion':_0x154989},'priority':_0x49bb8c&&_0x596836?0xbc2:0xbb8};}_0x591d37['on']('suggestionLoaded',_0x1bcbb7,{'priority':'high'}),_0x591d37['on']('suggestionUnloaded',_0x1bcbb7,{'priority':'high'}),_0xed8e87['model']['document']['registerPostFixer'](()=>{let _0x4f2280=!0x1;const _0x31497f=Array['from'](_0xed8e87['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x4875d2,data:_0x198bff}of _0x31497f){const {group:_0x5af347,type:_0x374646,id:_0x3b1723}=_0x591d37['_splitMarkerName'](_0x4875d2);if('suggestion'!=_0x5af347||'deletion'!=_0x374646||_0x198bff['oldRange'])continue;if(!_0x591d37['hasSuggestion'](_0x3b1723))continue;const _0x5df84f=_0x591d37['getSuggestion'](_0x3b1723)['getRanges'](),_0x3ed323=_0xed8e87['plugins']['get']('Users')['me'];for(const _0x12157 of _0x591d37['getSuggestions']()){if(!_0x12157['isInContent']||_0x12157['author']!=_0x3ed323)continue;if('formatBlock'!=_0x12157['type']||'tablePasteCell'!=_0x12157['subType'])continue;if(_0x12157['getRanges']()['every'](_0x1e94f0=>_0x5df84f['some'](_0x4198c0=>_0x4198c0['containsRange'](_0x1e94f0,!0x0))))for(const _0x53121e of _0x12157['getAllAdjacentSuggestions']())_0x53121e['isInContent']&&(_0x53121e['discard'](),_0x4f2280=!0x0);}}return _0x4f2280;}),_0xed8e87['model']['document']['registerPostFixer'](_0x39886f=>{const _0x4594da=_0xed8e87['commands']['get']('redo');if(!_0x4594da||!_0x4594da['_createdBatches']['has'](_0x39886f['batch']))return!0x1;let _0x3d0753=!0x1;const _0x382327=_0xed8e87['plugins']['get']('Users')['me'],_0x5dc80e=_0xed8e87['model']['document']['differ']['getChanges'](),_0x5e8707=Array['from'](_0xed8e87['model']['document']['differ']['getChangedMarkers']())['filter'](({name:_0x2614c2,data:_0x455be9})=>{const {group:_0x10049c,subType:_0x1470dd,authorId:_0x4712bb}=_0x591d37['_splitMarkerName'](_0x2614c2);return'suggestion'==_0x10049c&&'tablePaste'==_0x1470dd&&_0x4712bb==_0x382327['id']&&!_0x455be9['oldRange'];});for(const _0x2b155d of _0x5dc80e){if('insert'!=_0x2b155d['type']||'tableCellSuggestion'!=_0x2b155d['name']||0x1!=_0x2b155d['length'])continue;const _0x181953=_0x39886f['createRange'](_0x2b155d['position'],_0x2b155d['position']['getShiftedBy'](0x1));if(!_0x5e8707['find'](({data:_0x4e924e})=>_0x4e924e['newRange']['isEqual'](_0x181953)))for(const {name:_0x1fc92a,data:_0x571f0f}of _0x5e8707)if(_0x181953['containsRange'](_0x571f0f['newRange'])){_0x39886f['updateMarker'](_0x1fc92a,{'range':_0x181953}),_0x3d0753=!0x0;break;}}return _0x3d0753;}),_0xed8e87['model']['document']['registerPostFixer'](_0x4ec04a=>{let _0x304e10=!0x1;const _0x356673=_0xed8e87['plugins']['get']('Users')['me'],_0x2653f4=_0x591d37['getSuggestions']()['filter'](_0x4fab36=>_0x4fab36['isInContent']&&_0x4fab36['author']==_0x356673),_0x37b75f=new Set(),_0x1c4e5d=new Set();for(const _0xf523e4 of _0x2653f4)if('tablePaste'==_0xf523e4['subType'])for(const _0x1791ba of _0xf523e4['getMarkers']()){const _0x3bd543=_0x1791ba['getRange']()['getContainedElement']();if(_0x3bd543){if(_0x3bd543['is']('element','tableCellSuggestion')&&ge(_0x3bd543)){_0xf523e4['removeMarker'](_0x1791ba['name']),_0x37b75f['add'](_0x3bd543),_0x304e10=!0x0;const _0x3e7cea=_0x3bd543['nextSibling'],_0x16ede1=_0x3bd543['previousSibling'],_0xe5010e=_0x3e7cea&&_0x3e7cea['is']('element','tableCellSuggestion'),_0x2d075c=_0x16ede1&&_0x16ede1['is']('element','tableCellSuggestion');_0xe5010e&&!_0x37b75f['has'](_0x3e7cea)&&_0x1c4e5d['add'](_0x3e7cea),_0x2d075c&&!_0x37b75f['has'](_0x16ede1)&&_0x1c4e5d['add'](_0x16ede1);}else _0x3bd543['is']('element','paragraph')&&_0x3bd543['isEmpty']&&(_0xf523e4['removeMarker'](_0x1791ba['name']),_0x304e10=!0x0);}}else{if('tablePasteCell'==_0xf523e4['subType']){if(!_0xf523e4['attributes']||!_0xf523e4['attributes']['tablePasteChainId'])continue;const _0x2e563e=_0xf523e4['attributes']['markerAttributes'];if(_0x2e563e&&Object['keys'](_0x2e563e)['length'])continue;const _0x17629c=_0xf523e4['attributes']['tablePasteChainId'];let _0x133708=!0x0,_0x4b3413=!0x0;for(const _0x3e2ccb of _0x2653f4)if(_0x3e2ccb['subType']&&_0x3e2ccb['subType']['startsWith']('tablePaste')){if(!_0x3e2ccb['attributes']['tablePasteChainId']){_0x4b3413=!0x1;break;}if(_0x3e2ccb['id']!=_0xf523e4['id']&&_0x3e2ccb['attributes']['tablePasteChainId']==_0x17629c){_0x133708=!0x1;break;}}_0x4b3413&&_0x133708&&(_0xf523e4['removeMarkers'](),_0x304e10=!0x0);}}for(const _0x4ad6f8 of _0x37b75f)_0x4ec04a['remove'](_0x4ad6f8);for(const _0x26bcd2 of _0x1c4e5d)_0x4ec04a['unwrap'](_0x26bcd2);return _0x304e10;}),_0xed8e87['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion:formatBlock:tablePasteCell','view':_0x16cf53,'converterPriority':'high'}),_0xed8e87['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion:formatBlock:tablePasteCell','view':(_0x465007,_0x5c8f0c)=>{if(_0x5c8f0c['options']['showSuggestionHighlights'])return _0x16cf53(_0x465007,{'showActiveMarker':!0x1});},'converterPriority':'high'});const _0x1a5949=_0xed8e87['editing']['view'];this['listenTo'](_0x1a5949['document'],'clipboardOutput',(_0x341a50,_0x29554b)=>{const _0x287b0f=[];for(const _0x368a47 of _0x1a5949['createRangeIn'](_0x29554b['content'])['getItems']())_0x368a47['is']('element','suggestion-td')&&_0x287b0f['push'](_0x368a47);_0x1a5949['change'](_0x88dafe=>{for(const _0x3189b2 of _0x287b0f)_0x88dafe['move'](_0x88dafe['createRangeIn'](_0x3189b2),_0x88dafe['createPositionBefore'](_0x3189b2)),_0x88dafe['remove'](_0x3189b2);});});}}function ge(_0x10aceb){if(_0x10aceb['isEmpty'])return!0x0;const _0x185845=_0x10aceb['getChild'](0x0);return _0x185845['is']('element','paragraph')&&_0x185845['isEmpty'];}function me(_0x25b4f7,_0x51fa16={}){for(const {isAnchor:_0x345af1,cellHeight:_0xae710c,cellWidth:_0x79909a}of new _0x3b8c6a(_0x25b4f7,{'includeAllSlots':!0x0,..._0x51fa16}))if(!_0x345af1||0x1!=_0xae710c||0x1!=_0x79909a)return!0x1;return!0x0;}
|
|
23
|
+
import{Plugin as _0x873171}from'ckeditor5/src/core';import ot from'./table';import{uid as _0x1df8a3,priorities as _0x3afe6b}from'ckeditor5/src/utils';const ne=['tableCellBorderWidth','tableCellBorderColor','tableCellBorderStyle','tableCellHorizontalAlignment','tableCellVerticalAlignment','tableCellBackgroundColor','tableCellPadding'],oe=Object['fromEntries'](ne['map'](_0x5e911d=>[_0x5e911d,null]));export default class ct extends _0x873171{static get['requires'](){return[ot];}['afterInit'](){const _0x4aff23=this['editor'];if(!_0x4aff23['plugins']['has']('TableClipboard'))return;const {t:t}=_0x4aff23['locale'],_0x34ad30=_0x4aff23['plugins']['get']('TrackChangesEditing'),_0x40b1be=_0x4aff23['plugins']['get']('TableUtils'),_0x327215=_0x4aff23['plugins']['get'](ot),_0xcb56c7=_0x4aff23['plugins']['get']('TableClipboard');_0x327215['_tablePostFixingSubtypes']['push']('tablePasteRow','tablePasteColumn'),_0x4aff23['model']['schema']['register']('tableCellSuggestion',{'allowIn':'tableCell','allowContentOf':'tableCell','isLimit':!0x0}),_0x4aff23['conversion']['elementToElement']({'model':'tableCellSuggestion','view':'suggestion-td'});let _0x315a63=null;_0x4aff23['model']['on']('insertContent',(_0xfd1764,_0x3e8ffc)=>{const [_0x27baf6,_0x62b2e8]=_0x3e8ffc,_0xa7c9c7=_0x3e8ffc[_0x3e8ffc['length']-0x1];_0xa7c9c7&&_0xa7c9c7['forceDefaultExecution']||_0x34ad30['_isForcedDefaultExecutionBlock']||this['editor']['commands']['get']('trackChanges')['value']&&function(_0x455848,_0x1ed957,_0x3dc540,_0xfd29ea,_0xd93403){if(_0x1ed957&&!_0x1ed957['is']('documentSelection'))return!0x1;const _0x239ace=_0xd93403['getTableIfOnlyTableInContent'](_0x455848,_0x3dc540);if(!_0x239ace||!se(_0x239ace,null,_0xfd29ea))return!0x1;const _0x3d97b2=_0xfd29ea['getSelectionAffectedTableCells'](_0x3dc540['document']['selection']);if(!_0x3d97b2['length'])return!0x1;const _0x40bf32=_0x3d97b2[0x0]['findAncestor']('table'),_0x4ec88e=_0xfd29ea['getRowIndexes'](_0x3d97b2),_0x177ff9=_0xfd29ea['getColumnIndexes'](_0x3d97b2),_0x1c903a={'startRow':_0x4ec88e['first'],'endRow':_0x4ec88e['last'],'startColumn':_0x177ff9['first'],'endColumn':_0x177ff9['last']};return 0x1==_0x3d97b2['length']&&(_0x1c903a['endRow']+=_0xfd29ea['getRows'](_0x239ace)-0x1,_0x1c903a['endColumn']+=_0xfd29ea['getColumns'](_0x239ace)-0x1),se(_0x40bf32,_0x1c903a,_0xfd29ea);}(_0x27baf6,_0x62b2e8,_0x4aff23['model'],_0x40b1be,_0xcb56c7)&&(_0xfd1764['stop'](),_0x315a63={'cells':[],'insertionRanges':[],'deletionRanges':[],'rowInsertionRanges':[],'rowInsertionIndexes':[],'columnInsertionRanges':[],'columnInsertionIndexes':[]},_0x4aff23['model']['change'](()=>{_0x4aff23['model']['insertContent'](_0x3e8ffc[0x0],_0x3e8ffc[0x1],_0x3e8ffc[0x2],_0x3e8ffc[0x3],{'forceDefaultExecution':!0x0});const _0x596bf2=_0x1df8a3(),{rowInsertionRanges:_0x36ae3a,columnInsertionRanges:_0x218cc9,insertionRanges:_0x15483b,deletionRanges:_0xb189c0,cells:_0x5568fb}=_0x315a63;_0x36ae3a['length']&&_0x34ad30['markMultiRangeInsertion'](_0x36ae3a,'tablePasteRow',{'tablePasteChainId':_0x596bf2}),_0x218cc9['length']&&_0x34ad30['markMultiRangeInsertion'](_0x218cc9,'tablePasteColumn',{'tablePasteChainId':_0x596bf2}),_0x15483b['length']&&_0x34ad30['markMultiRangeInsertion'](_0x15483b,'tablePaste',{'tablePasteChainId':_0x596bf2,'skipNestingCheck':!0x0}),_0xb189c0['length']&&_0x34ad30['markMultiRangeDeletion'](_0xb189c0,'tablePaste',{'tablePasteChainId':_0x596bf2,'skipNestingCheck':!0x0});const _0x417c92=_0x34ad30['markMultiRangeBlockFormat'](_0x5568fb['map'](({element:_0x12f042})=>_0x12f042),{'formatGroupId':_0x1df8a3()},[],'tablePasteCell',{'tablePasteChainId':_0x596bf2});if(_0x417c92){const _0x54b5bb=_0x417c92['getMarkers'](),_0x17f76a=[];for(const {element:_0x234dba,attributes:_0x65e824}of _0x5568fb){if(!_0x65e824)continue;const _0x565863=_0x4aff23['model']['createRangeOn'](_0x234dba),_0x5f3282=_0x54b5bb['find'](_0x1bce5d=>_0x1bce5d['getRange']()['isEqual'](_0x565863));_0x5f3282&&_0x17f76a['push']([_0x5f3282['name'],_0x65e824]);}_0x17f76a['length']&&_0x417c92['setAttribute']('markerAttributes',Object['fromEntries'](_0x17f76a));}_0x315a63=null;}));},{'priority':_0x3afe6b['high']+0xa}),_0x4aff23['plugins']['get']('TableClipboard')['on']('_replaceTableSlotCell',(_0x470bca,_0x4a5fd8)=>{const [_0xceef4b,_0x34d525,,_0x4ffd34]=_0x4a5fd8;if(!_0x315a63)return;_0x470bca['stop']();const _0x4246a1=_0xceef4b['cell'],_0x18106f=_0x34d525,_0xe0bec2=le(_0x4246a1),_0x23574b=le(_0x18106f);_0x470bca['return']=_0x4246a1;let _0x23e76b=null,_0x261b2f=null;if(_0x23574b||_0xe0bec2){if(_0xe0bec2&&!_0x23574b){_0x4ffd34['remove'](_0x4246a1['getChild'](0x0));for(const _0x301d02 of Array['from'](_0x18106f['getChildren']()))_0x4ffd34['insert'](_0x301d02,_0x4246a1,'end');const _0x451063=_0x315a63['rowInsertionIndexes']['includes'](_0xceef4b['row']),_0x2a4a4d=_0x315a63['columnInsertionIndexes']['includes'](_0xceef4b['column']);_0x451063||_0x2a4a4d||(_0x23e76b=_0x4ffd34['createRangeIn'](_0x4246a1));}else _0x23574b&&!_0xe0bec2&&(_0x261b2f=_0x4ffd34['createRangeIn'](_0x4246a1));}else{const _0x30bf14=_0x4ffd34['createElement']('tableCellSuggestion'),_0x434afe=_0x4ffd34['createElement']('tableCellSuggestion');_0x4ffd34['wrap'](_0x4ffd34['createRangeIn'](_0x4246a1),_0x434afe),_0x4ffd34['insert'](_0x30bf14,_0x4246a1,0x0);for(const _0x50afe4 of Array['from'](_0x18106f['getChildren']()))_0x4ffd34['insert'](_0x50afe4,_0x30bf14,'end');_0x23e76b=_0x4ffd34['createRangeOn'](_0x30bf14),_0x261b2f=_0x4ffd34['createRangeOn'](_0x434afe);}const _0x16c76e=Array['from'](_0x18106f['getAttributes']())['filter'](([_0xe802d6])=>ne['includes'](_0xe802d6));_0x315a63['cells']['push']({'element':_0x4246a1,'attributes':_0x16c76e['length']?Object['fromEntries'](_0x16c76e):null}),_0x23e76b&&_0x315a63['insertionRanges']['push'](_0x23e76b),_0x261b2f&&_0x315a63['deletionRanges']['push'](_0x261b2f);},{'priority':'high'}),_0x40b1be['on']('insertColumns',(_0x31c160,_0x1600dc)=>{const [_0x41f5cf,_0x36c22d={}]=_0x1600dc;if(!_0x315a63)return;const _0x45eb85=_0x36c22d['at']||0x0,_0x42478=_0x36c22d['columns']||0x1;_0x315a63['columnInsertionIndexes']=new Array(_0x42478)['fill'](_0x45eb85)['map']((_0x200bcd,_0x2f5c3b)=>_0x200bcd+_0x2f5c3b);for(const {cell:_0x13ab13}of _0x40b1be['createTableWalker'](_0x41f5cf,{'startColumn':_0x45eb85,'endColumn':_0x45eb85+_0x42478-0x1}))_0x315a63['columnInsertionRanges']['push'](_0x4aff23['model']['createRangeOn'](_0x13ab13));},{'priority':'low'}),_0x40b1be['on']('insertRows',(_0x53e7d8,_0xdc77e9)=>{const [_0x59e66b,_0x3b89ee={}]=_0xdc77e9;if(!_0x315a63)return;const _0x16c052=_0x3b89ee['at']||0x0,_0x4e8cd7=_0x3b89ee['rows']||0x1;_0x315a63['rowInsertionIndexes']=new Array(_0x4e8cd7)['fill'](_0x16c052)['map']((_0x130e1f,_0x2e4f9f)=>_0x130e1f+_0x2e4f9f);for(const {cell:_0x126553}of _0x40b1be['createTableWalker'](_0x59e66b,{'startRow':_0x16c052,'endRow':_0x16c052+_0x4e8cd7-0x1}))_0x315a63['rowInsertionRanges']['push'](_0x4aff23['model']['createRangeOn'](_0x126553));},{'priority':'low'}),_0x34ad30['_descriptionFactory']['registerDescriptionCallback'](_0x337a77=>{if(_0x337a77['subType']&&_0x337a77['subType']['startsWith']('tablePaste'))return _0x337a77['previous']?{}:{'type':'insertion','content':t('*Replace\x20table\x20cells*')};});const _0x47fcfe=()=>{};for(const _0x178fb4 of['tablePaste','tablePasteColumn','tablePasteRow','tablePasteCell'])_0x34ad30['_suggestionFactory']['registerCustomCallback']('insertion',_0x178fb4,'join',_0x47fcfe),_0x34ad30['_suggestionFactory']['registerCustomCallback']('deletion',_0x178fb4,'join',_0x47fcfe);_0x34ad30['_suggestionFactory']['registerCustomCallback']('formatBlock','tablePasteCell','discard',_0x47fcfe),_0x34ad30['_suggestionFactory']['registerCustomCallback']('formatBlock','tablePasteCell','accept',(_0x4ab348,_0x47c56b,_0x548032)=>{const _0xabd3b4=_0x4ab348['map'](_0xf874b6=>_0xf874b6['getContainedElement']())['filter'](_0x1fe92b=>_0x1fe92b),_0x9463dd=new Map(_0xabd3b4['map'](_0x55b2a8=>[_0x55b2a8,null]));if(_0x315a63)for(const {element:_0x4cf3e0,attributes:_0x515d7f}of _0x315a63['cells'])_0x515d7f&&_0x9463dd['set'](_0x4cf3e0,_0x515d7f);else{if(_0x548032&&_0x548032['markerAttributes'])for(const [_0x48889f,_0x55f7e4]of Object['entries'](_0x548032['markerAttributes'])){const _0x2236d3=_0x4aff23['model']['markers']['get'](_0x48889f),_0x465f23=_0x2236d3?_0x2236d3['getRange']()['getContainedElement']():null;_0x465f23&&_0x9463dd['set'](_0x465f23,_0x55f7e4);}}_0x4aff23['model']['change'](_0x3564ab=>{for(const [_0x439532,_0x25ae67]of _0x9463dd)_0x3564ab['setAttributes']({...oe,..._0x25ae67},_0x439532);});});const _0x119c65=(_0x1d80df,_0x17ce9a)=>{_0x34ad30['_suggestionFactory']['registerCustomCallback'](_0x1d80df,'tablePaste',_0x17ce9a,(_0x447c17,_0x4ef058,_0x4e5796)=>{_0x4aff23['model']['change'](_0x32030b=>{const _0x38a81b=[];for(const _0x1a31c6 of _0x447c17){const _0x4580bb=_0x1a31c6['start']['nodeAfter'];_0x4580bb['is']('element','tableCellSuggestion')&&_0x38a81b['push'](_0x4580bb);}_0x34ad30['_suggestionFactory']['getSuggestionCallback'](_0x1d80df,null,_0x17ce9a)(_0x447c17,_0x4ef058,_0x4e5796);for(const _0x7185f9 of _0x38a81b)'$graveyard'!=_0x7185f9['root']['rootName']&&_0x32030b['unwrap'](_0x7185f9);});});};_0x119c65('insertion','accept'),_0x119c65('insertion','discard'),_0x119c65('deletion','accept'),_0x119c65('deletion','discard'),_0x34ad30['_suggestionFactory']['registerCustomCallback']('insertion','tablePasteRow','discard',_0x5d5b87=>{const _0xdd8eb0=_0x5d5b87['map'](_0x264137=>_0x264137['getContainedElement']()),_0x3802c9=_0xdd8eb0[0x0]['findAncestor']('table'),{minRow:_0x58f013,maxRow:_0x4f497d}=_0x327215['_getCoordsForCells'](_0xdd8eb0);_0x40b1be['removeRows'](_0x3802c9,{'at':_0x58f013,'rows':_0x4f497d-_0x58f013+0x1});}),_0x34ad30['_suggestionFactory']['registerCustomCallback']('insertion','tablePasteColumn','discard',_0x32874f=>{const _0x492d73=_0x32874f['map'](_0x3eeaab=>_0x3eeaab['getContainedElement']()),_0x15391a=_0x492d73[0x0]['findAncestor']('table'),{minColumn:_0x997a5c,maxColumn:_0x343ef4}=_0x327215['_getCoordsForCells'](_0x492d73);_0x40b1be['removeColumns'](_0x15391a,{'at':_0x997a5c,'columns':_0x343ef4-_0x997a5c+0x1});});const _0x43ae45=(_0x43bd92,_0x97793f)=>{if(!_0x97793f['subType']||!_0x97793f['subType']['startsWith']('tablePaste'))return;const _0x33c5e5=_0x97793f['attributes']['tablePasteChainId'],_0x5886f4=_0x34ad30['getSuggestions']()['filter'](_0x42c26c=>_0x42c26c['isInContent']&&_0x42c26c['attributes']&&_0x42c26c['attributes']['tablePasteChainId']==_0x33c5e5);_0x5886f4['length']&&_0x97793f['getAllAdjacentSuggestions']()['length']!=_0x5886f4['length']&&_0x5886f4['reduce']((_0x574487,_0x299227)=>(_0x574487['next']=_0x299227,_0x299227['previous']=_0x574487,_0x299227));};function _0x575b4a(_0x1f5a68,{showActiveMarker:_0x34b095=!0x0}={}){const {id:_0x53660d}=_0x34ad30['_splitMarkerName'](_0x1f5a68['markerName']),_0x2c9a9c=['ck-suggestion-marker','ck-suggestion-marker-insertion'],_0x49fa49=_0x34ad30['activeMarkers']['includes'](_0x1f5a68['markerName']);return _0x49fa49&&_0x2c9a9c['push']('ck-suggestion-marker--active'),{'classes':_0x2c9a9c,'attributes':{'data-suggestion':_0x53660d},'priority':_0x49fa49&&_0x34b095?0xbc2:0xbb8};}_0x34ad30['on']('suggestionLoaded',_0x43ae45,{'priority':'high'}),_0x34ad30['on']('suggestionUnloaded',_0x43ae45,{'priority':'high'}),_0x4aff23['model']['document']['registerPostFixer'](()=>{let _0x19f820=!0x1;const _0x275c00=Array['from'](_0x4aff23['model']['document']['differ']['getChangedMarkers']());for(const {name:_0x2ac97a,data:_0x4322b6}of _0x275c00){const {group:_0x307035,type:_0x46471e,id:_0x3314c6}=_0x34ad30['_splitMarkerName'](_0x2ac97a);if('suggestion'!=_0x307035||'deletion'!=_0x46471e||_0x4322b6['oldRange'])continue;if(!_0x34ad30['hasSuggestion'](_0x3314c6))continue;const _0xc2e0f5=_0x34ad30['getSuggestion'](_0x3314c6)['getRanges'](),_0x97e881=_0x4aff23['plugins']['get']('Users')['me'];for(const _0x31caca of _0x34ad30['getSuggestions']()){if(!_0x31caca['isInContent']||_0x31caca['author']!=_0x97e881)continue;if('formatBlock'!=_0x31caca['type']||'tablePasteCell'!=_0x31caca['subType'])continue;if(_0x31caca['getRanges']()['every'](_0x642453=>_0xc2e0f5['some'](_0x3f84e2=>_0x3f84e2['containsRange'](_0x642453,!0x0))))for(const _0x1249a8 of _0x31caca['getAllAdjacentSuggestions']())_0x1249a8['isInContent']&&(_0x1249a8['discard'](),_0x19f820=!0x0);}}return _0x19f820;}),_0x4aff23['model']['document']['registerPostFixer'](_0x1ce973=>{const _0x52d507=_0x4aff23['commands']['get']('redo');if(!_0x52d507||!_0x52d507['_createdBatches']['has'](_0x1ce973['batch']))return!0x1;let _0x15e4a3=!0x1;const _0x48c6d0=_0x4aff23['plugins']['get']('Users')['me'],_0x84e077=_0x4aff23['model']['document']['differ']['getChanges'](),_0x3bcdd7=Array['from'](_0x4aff23['model']['document']['differ']['getChangedMarkers']())['filter'](({name:_0x23c0a1,data:_0x194978})=>{const {group:_0x290ba5,subType:_0x33f453,authorId:_0x45b10e}=_0x34ad30['_splitMarkerName'](_0x23c0a1);return'suggestion'==_0x290ba5&&'tablePaste'==_0x33f453&&_0x45b10e==_0x48c6d0['id']&&!_0x194978['oldRange'];});for(const _0x5998c6 of _0x84e077){if('insert'!=_0x5998c6['type']||'tableCellSuggestion'!=_0x5998c6['name']||0x1!=_0x5998c6['length'])continue;const _0x17db2e=_0x1ce973['createRange'](_0x5998c6['position'],_0x5998c6['position']['getShiftedBy'](0x1));if(!_0x3bcdd7['find'](({data:_0x2e813a})=>_0x2e813a['newRange']['isEqual'](_0x17db2e)))for(const {name:_0xa9ab4d,data:_0x305876}of _0x3bcdd7)if(_0x17db2e['containsRange'](_0x305876['newRange'])){_0x1ce973['updateMarker'](_0xa9ab4d,{'range':_0x17db2e}),_0x15e4a3=!0x0;break;}}return _0x15e4a3;}),_0x4aff23['model']['document']['registerPostFixer'](_0x333e1f=>{let _0x64ed52=!0x1;const _0x4d24fe=_0x4aff23['plugins']['get']('Users')['me'],_0x17026d=_0x34ad30['getSuggestions']()['filter'](_0x5370d3=>_0x5370d3['isInContent']&&_0x5370d3['author']==_0x4d24fe),_0x4d6ee3=new Set(),_0x3cac06=new Set();for(const _0x351edd of _0x17026d)if('tablePaste'==_0x351edd['subType'])for(const _0x2e608e of _0x351edd['getMarkers']()){const _0x3eaaa6=_0x2e608e['getRange']()['getContainedElement']();if(_0x3eaaa6){if(_0x3eaaa6['is']('element','tableCellSuggestion')&&le(_0x3eaaa6)){_0x351edd['removeMarker'](_0x2e608e['name']),_0x4d6ee3['add'](_0x3eaaa6),_0x64ed52=!0x0;const _0x1fd815=_0x3eaaa6['nextSibling'],_0x2ed523=_0x3eaaa6['previousSibling'],_0xb395d4=_0x1fd815&&_0x1fd815['is']('element','tableCellSuggestion'),_0x121c42=_0x2ed523&&_0x2ed523['is']('element','tableCellSuggestion');_0xb395d4&&!_0x4d6ee3['has'](_0x1fd815)&&_0x3cac06['add'](_0x1fd815),_0x121c42&&!_0x4d6ee3['has'](_0x2ed523)&&_0x3cac06['add'](_0x2ed523);}else _0x3eaaa6['is']('element','paragraph')&&_0x3eaaa6['isEmpty']&&(_0x351edd['removeMarker'](_0x2e608e['name']),_0x64ed52=!0x0);}}else{if('tablePasteCell'==_0x351edd['subType']){if(!_0x351edd['attributes']||!_0x351edd['attributes']['tablePasteChainId'])continue;const _0x5c002c=_0x351edd['attributes']['markerAttributes'];if(_0x5c002c&&Object['keys'](_0x5c002c)['length'])continue;const _0x2db8e9=_0x351edd['attributes']['tablePasteChainId'];let _0x1482ab=!0x0,_0x24f2e6=!0x0;for(const _0x39643d of _0x17026d)if(_0x39643d['subType']&&_0x39643d['subType']['startsWith']('tablePaste')){if(!_0x39643d['attributes']['tablePasteChainId']){_0x24f2e6=!0x1;break;}if(_0x39643d['id']!=_0x351edd['id']&&_0x39643d['attributes']['tablePasteChainId']==_0x2db8e9){_0x1482ab=!0x1;break;}}_0x24f2e6&&_0x1482ab&&(_0x351edd['removeMarkers'](),_0x64ed52=!0x0);}}for(const _0xfc2b48 of _0x4d6ee3)_0x333e1f['remove'](_0xfc2b48);for(const _0x16ecd1 of _0x3cac06)_0x333e1f['unwrap'](_0x16ecd1);return _0x64ed52;}),_0x4aff23['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'suggestion:formatBlock:tablePasteCell','view':_0x575b4a,'converterPriority':'high'}),_0x4aff23['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'suggestion:formatBlock:tablePasteCell','view':(_0x5304f2,_0x3afae0)=>{if(_0x3afae0['options']['showSuggestionHighlights'])return _0x575b4a(_0x5304f2,{'showActiveMarker':!0x1});},'converterPriority':'high'});const _0xcde25e=_0x4aff23['editing']['view'];this['listenTo'](_0xcde25e['document'],'clipboardOutput',(_0x51dbc0,_0x2c1949)=>{const _0x1074ad=[];for(const _0x3ebc67 of _0xcde25e['createRangeIn'](_0x2c1949['content'])['getItems']())_0x3ebc67['is']('element','suggestion-td')&&_0x1074ad['push'](_0x3ebc67);_0xcde25e['change'](_0x379ff7=>{for(const _0x3cec10 of _0x1074ad)_0x379ff7['move'](_0x379ff7['createRangeIn'](_0x3cec10),_0x379ff7['createPositionBefore'](_0x3cec10)),_0x379ff7['remove'](_0x3cec10);});});}}function le(_0x174f40){if(_0x174f40['isEmpty'])return!0x0;const _0x205844=_0x174f40['getChild'](0x0);return _0x205844['is']('element','paragraph')&&_0x205844['isEmpty'];}function se(_0x33f428,_0x38d1ae={},_0x1ba8a6){for(const {isAnchor:_0x21a760,cellHeight:_0x3f597d,cellWidth:_0x1b669b}of _0x1ba8a6['createTableWalker'](_0x33f428,{'includeAllSlots':!0x0,..._0x38d1ae}))if(!_0x21a760||0x1!=_0x3f597d||0x1!=_0x1b669b)return!0x1;return!0x0;}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0xba374f}from'ckeditor5/src/core';import ot from'./table';export default class at extends _0xba374f{static get['requires'](){return[ot];}['afterInit'](){const _0x30bc5b=this['editor'];if(!_0x30bc5b['plugins']['has']('TableEditing'))return;const {t:t}=_0x30bc5b['locale'],_0xf6801=_0x30bc5b['plugins']['get']('TrackChangesEditing'),_0x401431=_0x30bc5b['plugins']['get']('TableUtils'),_0x603fe2=_0x30bc5b['plugins']['get'](ot);function _0x1c2a83({showActiveMarker:_0x25de6b=!0x0,setDataAttribute:_0x55714e=!0x0}={}){return(_0x441622,_0x43ba9f,_0x3b8d34)=>{const {type:_0x4f1a65,id:_0x4f3270}=_0xf6801['_splitMarkerName'](_0x43ba9f['markerName']),_0x3ec9d7=_0xf6801['getSuggestion'](_0x4f3270);if(!_0x3ec9d7['data']||'setTableColumnHeader'!=_0x3ec9d7['data']['commandName'])return;if(_0x43ba9f['item'])return void _0x441622['stop']();if(!_0x3b8d34['consumable']['consume'](_0x43ba9f['markerRange'],_0x441622['name']))return;const _0x1892f8=_0x43ba9f['markerRange']['start']['nodeAfter'],_0x2f8981=_0x43ba9f['markerRange']['end']['nodeBefore'],_0x3b4734=_0x1892f8['parent']['parent'],{column:_0x3b36bb}=_0x401431['getCellLocation'](_0x1892f8),{column:_0x35a755}=_0x401431['getCellLocation'](_0x2f8981);for(let _0x1861c8=_0x3b36bb;_0x1861c8<=_0x35a755;_0x1861c8++){const _0x444e03=_0x401431['createTableWalker'](_0x3b4734,{'column':_0x1861c8,'includeAllSlots':!0x1});for(const _0x52f428 of _0x444e03){const _0x3a0ce0=_0x52f428['cell'],_0x4ee527=_0x3b8d34['mapper']['toViewElement'](_0x3a0ce0);_0x3b8d34['writer']['addClass']('ck-suggestion-marker-'+_0x4f1a65,_0x4ee527),_0x55714e&&_0x3b8d34['writer']['setAttribute']('data-suggestion',_0x4f3270,_0x4ee527),_0x3b8d34['mapper']['bindElementToMarker'](_0x4ee527,_0x43ba9f['markerName']),_0x25de6b&&(_0xf6801['activeMarkers']['includes'](_0x43ba9f['markerName'])?_0x3b8d34['writer']['addClass']('ck-suggestion-marker--active',_0x4ee527):_0x3b8d34['writer']['removeClass']('ck-suggestion-marker--active',_0x4ee527));}}};}_0xf6801['enableCommand']('setTableRowHeader',(_0x291e6d,_0x5b31cf)=>{const _0xd67218=_0x401431['getSelectionAffectedTableCells'](_0x30bc5b['model']['document']['selection']),_0x4f5338=_0x401431['getRowIndexes'](_0xd67218),_0x2dbb9b=_0xd67218[0x0]['findAncestor']('table'),_0x121f91=_0x2dbb9b['getAttribute']('headingRows')||0x0,_0x2eab2b=_0x5b31cf&&null!==_0x5b31cf['forceValue']?_0x5b31cf['forceValue']:!_0x30bc5b['commands']['get']('setTableRowHeader')['value'],_0x12f91f=_0x2eab2b?_0x4f5338['last']:_0x4f5338['first'],_0x382708=_0x2dbb9b['getChild'](_0x12f91f);let _0x41bf1d;if(_0x2eab2b){const _0x109a37=_0x2dbb9b['getChild'](_0x121f91);if(_0x382708['index']<_0x109a37['index'])return;_0x41bf1d=_0x30bc5b['model']['createRange'](_0x30bc5b['model']['createPositionBefore'](_0x109a37['getChild'](0x0)),_0x30bc5b['model']['createPositionAfter'](_0x382708['getChild'](_0x382708['childCount']-0x1)));}else{const _0x360be8=_0x2dbb9b['getChild'](_0x121f91-0x1);if(!_0x360be8)return;_0x41bf1d=_0x30bc5b['model']['createRange'](_0x30bc5b['model']['createPositionBefore'](_0x382708['getChild'](0x0)),_0x30bc5b['model']['createPositionAfter'](_0x360be8['getChild'](_0x360be8['childCount']-0x1)));}_0x30bc5b['model']['change'](()=>{_0xf6801['markBlockFormat'](_0x41bf1d,{'commandName':'setTableRowHeader','commandParams':[{'forceValue':_0x2eab2b}]},[],'setTableRowHeader');});}),_0xf6801['enableCommand']('setTableColumnHeader',(_0x2e7309,_0x3770b0)=>{const _0x3adc61=_0x30bc5b['plugins']['get']('TableUtils'),_0x1e339c=_0x3adc61['getSelectionAffectedTableCells'](_0x30bc5b['model']['document']['selection']),_0x137eb9=_0x3adc61['getColumnIndexes'](_0x1e339c),_0x27f736=_0x1e339c[0x0]['findAncestor']('table'),_0x5281d3=_0x27f736['getAttribute']('headingColumns')||0x0,_0xc4f235=_0x3770b0&&null!==_0x3770b0['forceValue']?_0x3770b0['forceValue']:!_0x30bc5b['commands']['get']('setTableColumnHeader')['value'];let _0x5326d6;const _0x5da52b=_0x27f736['getChild'](0x0),_0x19c19a=_0xc4f235?_0x137eb9['last']:_0x137eb9['first'],_0x2ba10e=_0x3adc61['createTableWalker'](_0x27f736,{'startRow':0x0,'column':_0x19c19a,'includeAllSlots':!0x1}),_0x779332=Array['from'](_0x2ba10e)[0x0]['cell'];if(_0xc4f235){const _0x167e4f=_0x5da52b['getChild'](_0x5281d3);if(_0x779332['isBefore'](_0x167e4f))return;_0x5326d6=_0x30bc5b['model']['createRange'](_0x30bc5b['model']['createPositionBefore'](_0x167e4f),_0x30bc5b['model']['createPositionAfter'](_0x779332));}else{const _0x295a0d=_0x5da52b['getChild'](_0x5281d3-0x1);if(!_0x295a0d)return;_0x5326d6=_0x30bc5b['model']['createRange'](_0x30bc5b['model']['createPositionBefore'](_0x779332),_0x30bc5b['model']['createPositionAfter'](_0x295a0d));}_0x30bc5b['model']['change'](()=>{_0xf6801['markBlockFormat'](_0x5326d6,{'commandName':'setTableColumnHeader','commandParams':[{'forceValue':_0xc4f235}]},[],'setTableColumnHeader');});}),_0x30bc5b['editing']['downcastDispatcher']['on']('addMarker:suggestion',_0x1c2a83(),{'priority':'highest'}),_0x30bc5b['data']['downcastDispatcher']['on']('addMarker:suggestion',(_0x3b9be9,_0x14a83d,_0x4829b6)=>{_0x4829b6['options']['showSuggestionHighlights']&&_0x1c2a83({'showActiveMarker':!0x1,'setDataAttribute':!0x1})(_0x3b9be9,_0x14a83d,_0x4829b6);},{'priority':'highest'}),_0x30bc5b['editing']['downcastDispatcher']['on']('removeMarker:suggestion',(_0x2fae60,_0x4cc4fa,_0x4051bb)=>{const {type:_0x2d87b3,id:_0x652af1}=_0xf6801['_splitMarkerName'](_0x4cc4fa['markerName']),_0x235671=_0xf6801['getSuggestion'](_0x652af1);if(!_0x235671['data']||'setTableColumnHeader'!=_0x235671['data']['commandName'])return;const _0x2f8332=_0x4051bb['mapper']['markerNameToElements'](_0x4cc4fa['markerName']);if(_0x2f8332)for(const _0x4fcf4 of _0x2f8332)_0x4051bb['writer']['removeClass']('ck-suggestion-marker-'+_0x2d87b3,_0x4fcf4),_0x4051bb['writer']['removeClass']('ck-suggestion-marker--active',_0x4fcf4),_0x4051bb['writer']['removeAttribute']('data-suggestion',_0x4fcf4),_0x4051bb['mapper']['unbindElementFromMarkerName'](_0x4fcf4,_0x4cc4fa['markerName']);},{'priority':'highest'}),_0xf6801['_descriptionFactory']['registerDescriptionCallback'](_0xce5417=>{const {data:_0x3de690}=_0xce5417;if(_0x3de690){if('setTableRowHeader'==_0x3de690['commandName']){const _0x19a937=_0x3de690['commandParams'][0x0]['forceValue'];return _0x211ef9(t(_0x19a937?{'string':'header\x20row','id':'FORMAT_HEADER_ROW'}:{'string':'regular\x20row','id':'FORMAT_REGULAR_ROW'}));}if('setTableColumnHeader'==_0x3de690['commandName']){const _0xa3a77e=_0x3de690['commandParams'][0x0]['forceValue'];return _0x211ef9(t(_0xa3a77e?{'string':'header\x20column','id':'FORMAT_HEADER_COLUMN'}:{'string':'regular\x20column','id':'FORMAT_REGULAR_COLUMN'}));}}function _0x211ef9(_0x7eba0e){return{'type':'format','content':t('*Format:*\x20%0',_0x7eba0e)};}});const _0x2555b6=_0x603fe2['_acceptFormatSuggestionCallbackFactory']();_0xf6801['_suggestionFactory']['registerCustomCallback']('formatBlock','setTableRowHeader','accept',_0x2555b6),_0xf6801['_suggestionFactory']['registerCustomCallback']('formatBlock','setTableColumnHeader','accept',_0x2555b6);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x204f90}from'ckeditor5/src/core';import ot from'./table';import{LiveRange as _0x1ec843}from'ckeditor5/src/engine';export default class rt extends _0x204f90{static get['requires'](){return[ot];}['afterInit'](){const _0x2b2fc1=this['editor'],_0x37c4bd=_0x2b2fc1['model']['document']['selection'];if(!_0x2b2fc1['plugins']['has']('TableEditing'))return;const {t:t}=_0x2b2fc1['locale'],_0x2efc0a=_0x2b2fc1['plugins']['get']('TrackChangesEditing'),_0x534312=_0x2b2fc1['plugins']['get']('TableUtils'),_0x37ac0e=_0x2b2fc1['plugins']['get'](ot);_0x37ac0e['_tablePostFixingSubtypes']['push']('mergeTableCells'),_0x2efc0a['enableCommand']('mergeTableCells',()=>{const _0x2ece99=_0x534312['getSelectionAffectedTableCells'](_0x2b2fc1['model']['document']['selection']);_0x2b2fc1['model']['change'](()=>{_0x2efc0a['markMultiRangeBlockFormat'](_0x2ece99,{'commandName':'mergeTableCells','commandParams':[]},[],'mergeTableCells');});}),_0x2b2fc1['commands']['get']('mergeTableCells')['on']('execute',(_0x4be5ae,_0x35cd8f)=>{_0x2b2fc1['commands']['get']('trackChanges')['value']&&(_0x35cd8f['length']>0x0&&_0x35cd8f[_0x35cd8f['length']-0x1]&&_0x35cd8f[_0x35cd8f['length']-0x1]['forceDefaultExecution']||_0x2efc0a['_isForcedDefaultExecutionBlock']||this['_areSelectedCellsMergable']()||_0x4be5ae['stop']());},{'priority':'highest'});for(const _0x4f6540 of['mergeTableCellUp','mergeTableCellRight','mergeTableCellDown','mergeTableCellLeft']){const _0x4f0e3f=_0x2b2fc1['commands']['get'](_0x4f6540);_0x2efc0a['enableCommand'](_0x4f6540,()=>{const _0x40a68e=_0x2b2fc1['model']['document']['selection']['getFirstPosition']()['getAncestors']()['find'](_0x2f85f8=>_0x2f85f8['is']('element','tableCell')),_0x25e2ed=_0x4f0e3f['value'];_0x2b2fc1['model']['change'](()=>{_0x2efc0a['markMultiRangeBlockFormat']([_0x40a68e,_0x25e2ed],{'commandName':'mergeTableCells','commandParams':[]},[],'mergeTableCells');});});}for(const _0x1815cb of['splitTableCellVertically','splitTableCellHorizontally']){const _0x105f94=_0x2b2fc1['commands']['get'](_0x1815cb);_0x2efc0a['enableCommand'](_0x1815cb,()=>{const _0x23a432=_0x534312['getSelectionAffectedTableCells'](_0x2b2fc1['model']['document']['selection'])[0x0],_0x5a33e8=_0x23a432['findAncestor']('table'),{column:_0x1c2bfd,row:_0x5f438d}=_0x534312['getCellLocation'](_0x23a432);let _0x21cd76=[];if('horizontally'==_0x105f94['direction']){const _0x55f591=_0x534312['createTableWalker'](_0x5a33e8,{'startRow':_0x5f438d,'endRow':_0x5f438d,'includeAllSlots':!0x0});_0x21cd76=Array['from'](_0x55f591)['map'](_0x46e34c=>_0x46e34c['cell']);}else{const _0x57a413=_0x534312['createTableWalker'](_0x5a33e8,{'column':_0x1c2bfd,'includeAllSlots':!0x0});_0x21cd76=Array['from'](_0x57a413)['map'](_0x30a234=>_0x30a234['cell']);}_0x2b2fc1['model']['change'](_0x4336c7=>{_0x2efc0a['markBlockFormat'](_0x4336c7['createRangeOn'](_0x23a432),{'commandName':_0x1815cb,'commandParams':[]},_0x21cd76,_0x1815cb);});});}_0x2efc0a['_descriptionFactory']['registerDescriptionCallback'](_0xf37040=>{const {data:_0x26f6db}=_0xf37040;if(_0x26f6db)return'mergeTableCells'==_0x26f6db['commandName']?{'type':'format','content':t('*Merge\x20cells*')}:void 0x0;}),_0x2efc0a['_descriptionFactory']['registerDescriptionCallback'](_0x59eec8=>{const {data:_0x96315c}=_0x59eec8;if(_0x96315c)return'splitTableCellVertically'==_0x96315c['commandName']?{'type':'format','content':t('*Split\x20cell:*\x20vertically')}:'splitTableCellHorizontally'==_0x96315c['commandName']?{'type':'format','content':t('*Split\x20cell:*\x20horizontally')}:void 0x0;});const _0x38e2fb=_0x37ac0e['_acceptFormatSuggestionCallbackFactory']();for(const _0x480bf9 of['mergeTableCellUp','mergeTableCellRight','mergeTableCellDown','mergeTableCellLeft'])_0x2efc0a['_suggestionFactory']['registerCustomCallback']('formatBlock',_0x480bf9,'accept',_0x38e2fb);for(const _0x2a6615 of['splitTableCellVertically','splitTableCellHorizontally'])_0x2efc0a['_suggestionFactory']['registerCustomCallback']('formatBlock',_0x2a6615,'accept',_0x38e2fb);_0x2efc0a['_suggestionFactory']['registerCustomCallback']('formatBlock','mergeTableCells','accept',_0xfeba5e=>{_0x2b2fc1['model']['change'](_0xc3bb17=>{const _0x393913=Array['from'](_0x37c4bd['getRanges']())['map'](_0x1afc47=>_0x1ec843['fromRange'](_0x1afc47));_0xc3bb17['setSelection'](_0xfeba5e),_0x2b2fc1['commands']['get']('mergeTableCells')['refresh'](),_0x2b2fc1['execute']('mergeTableCells',{'forceDefaultExecution':!0x0});const _0x234ce2=_0x393913['filter'](_0x555b58=>'$graveyard'!=_0x555b58['root']['rootName']);_0x234ce2['length']>0x0&&_0xc3bb17['setSelection'](_0x234ce2);for(const _0x24a47f of _0x393913)_0x24a47f['detach']();});});for(const _0x140c9c of['mergeTableCellUp','mergeTableCellDown','mergeTableCellLeft','mergeTableCellRight']){const _0x2eaa98=_0x2b2fc1['commands']['get'](_0x140c9c);_0x2eaa98['on']('set:isEnabled',(_0x5f376e,_0x4a38f0,_0x6e7a60)=>{if(_0x6e7a60){const _0x4f7c11=_0x2b2fc1['model']['document']['selection']['getFirstPosition']()['getAncestors']()['find'](_0xeb0075=>_0xeb0075['is']('element','tableCell'));this['_areMergableCells'](_0x2eaa98['value'],_0x4f7c11)||(_0x5f376e['return']=!0x1,_0x5f376e['stop']());}},{'priority':'low'});}}['_areSelectedCellsMergable'](){const _0x393f14=this['editor']['commands']['get']('mergeTableCells'),_0x560c85=this['editor']['plugins']['get']('TableUtils');if(!_0x393f14['isEnabled'])return!0x1;const _0x4b877c=_0x560c85['getSelectionAffectedTableCells'](this['editor']['model']['document']['selection']);for(const _0x560561 of _0x4b877c)for(const _0x3d78f1 of _0x4b877c)if(_0x560561!=_0x3d78f1&&!this['_areMergableCells'](_0x560561,_0x3d78f1))return!0x1;return!0x0;}['_areMergableCells'](_0x4aa302,_0x34ac1c){const _0x5ea919=this['editor']['plugins']['get']('TrackChangesEditing'),_0x1e05c9=this['editor']['model']['createRangeOn'](_0x4aa302),_0x4fdf53=this['editor']['model']['createRangeOn'](_0x34ac1c),_0x21a2d0=new Set(),_0x140007=new Set();for(const _0x5d8c8c of _0x5ea919['getSuggestions']())if(('insertion'==_0x5d8c8c['type']||'deletion'==_0x5d8c8c['type']||'mergeTableCells'==_0x5d8c8c['subType'])&&_0x5d8c8c['isInContent'])for(const _0x5e1adc of _0x5d8c8c['getRanges']())_0x5e1adc['containsRange'](_0x1e05c9,!0x0)&&_0x21a2d0['add'](_0x5d8c8c['type']+':'+_0x5d8c8c['author']['id']),_0x5e1adc['containsRange'](_0x4fdf53,!0x0)&&_0x140007['add'](_0x5d8c8c['type']+':'+_0x5d8c8c['author']['id']);if(_0x21a2d0['size']!=_0x140007['size'])return!0x1;for(const _0x23d93a of _0x21a2d0)if(!_0x140007['has'](_0x23d93a))return!0x1;return!0x0;}}
|