UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 8.73 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x11b1ed=_0x39d1;(function(_0x12ca86,_0x4a6345){const _0x118834=_0x39d1,_0x5ef45c=_0x12ca86();while(!![]){try{const _0x1dfeb0=parseInt(_0x118834(0x121))/0x1+parseInt(_0x118834(0x140))/0x2+parseInt(_0x118834(0x12b))/0x3*(-parseInt(_0x118834(0x109))/0x4)+parseInt(_0x118834(0x151))/0x5+-parseInt(_0x118834(0x131))/0x6*(-parseInt(_0x118834(0x14d))/0x7)+parseInt(_0x118834(0x156))/0x8*(-parseInt(_0x118834(0x124))/0x9)+-parseInt(_0x118834(0x11c))/0xa;if(_0x1dfeb0===_0x4a6345)break;else _0x5ef45c['push'](_0x5ef45c['shift']());}catch(_0x2f07de){_0x5ef45c['push'](_0x5ef45c['shift']());}}}(_0x5e43,0x5e95e));function _0x39d1(_0x46b08c,_0x41d625){const _0x5e436e=_0x5e43();return _0x39d1=function(_0x39d1f7,_0x3b77b6){_0x39d1f7=_0x39d1f7-0x105;let _0x4efafa=_0x5e436e[_0x39d1f7];return _0x4efafa;},_0x39d1(_0x46b08c,_0x41d625);}import{View as _0x1974db,FocusCycler as _0x303b58,ButtonView as _0x55a6d2}from'ckeditor5/src/ui.js';import{FocusTracker as _0x5521ee,KeystrokeHandler as _0x1bc2c8}from'ckeditor5/src/utils.js';import{CommentEditor as _0x570723}from'../commenteditor/commenteditor.js';import{getTranslation as _0x305518}from'../../../utils/common-translations.js';function _0x5e43(){const _0x3a4109=['view','execute','Reply','create','from','ck-comment__input-wrapper','initialData','trim','placeholder','Reply...','keystrokes','focusFirst','listenTo','_createCancelButton','model','_createSubmitButton','isEnabled','ck-comment__input-actions--cancel','5314880bSSWVO','submit','forEach','fire','stop','276128uTCUgf','focusCycler','ck-comment__input-actions','116829eRqxmX','added','cancel','add','setData','value','cancelButtonView','23274ncwhlp','focusLast','editorReady','then','set','submitLabel','1866GEzKfM','setTemplate','createEditor','focus','withText','high','label','_setupKeyboardNavigation','_editorConfig','length','TOO_LONG_COMMENT_ALERT','shift+tab','_isDestroyed','getData','ck-comment__input-actions--active','701420VJoArU','_editorCreationPromise','editorDestroyed','document','render','tab','disabledSubmit','change','focusables','insertBefore','bind','Cancel','focusTracker','5299FoDbRs','editor','element','Esc','3361840DvoOUR','ck-comment__input-actions--submit','firstChild','extendTemplate','bindTemplate','40rDgRww','div','submitButtonView','Ctrl+Enter','showButtons','createCollection','destroy','reverse','284FjQZsV'];_0x5e43=function(){return _0x3a4109;};return _0x5e43();}export class CommentInputView extends _0x1974db{[_0x11b1ed(0x114)];[_0x11b1ed(0x14c)];[_0x11b1ed(0x148)];[_0x11b1ed(0x122)];[_0x11b1ed(0x158)];[_0x11b1ed(0x12a)];[_0x11b1ed(0x139)];constructor(_0x59d754,_0x535360={}){const _0x38023b=_0x11b1ed;super(_0x59d754),this[_0x38023b(0x14e)]=null,this[_0x38023b(0x139)]=_0x535360,this[_0x38023b(0x12f)](_0x38023b(0x129),_0x535360[_0x38023b(0x110)]||''),this[_0x38023b(0x12f)](_0x38023b(0x146),!0x1),this[_0x38023b(0x12f)](_0x38023b(0x105),!0x0),this[_0x38023b(0x12f)](_0x38023b(0x112),_0x305518(_0x59d754,_0x38023b(0x113))),this[_0x38023b(0x12f)](_0x38023b(0x130),_0x305518(_0x59d754,_0x38023b(0x10c))),this[_0x38023b(0x158)]=this[_0x38023b(0x119)](),this[_0x38023b(0x12a)]=this[_0x38023b(0x117)](),this[_0x38023b(0x148)]=this[_0x38023b(0x106)]([this[_0x38023b(0x158)],this[_0x38023b(0x12a)]]),this[_0x38023b(0x114)]=new _0x1bc2c8(),this[_0x38023b(0x14c)]=new _0x5521ee(),this[_0x38023b(0x122)]=new _0x303b58({'focusables':this[_0x38023b(0x148)],'focusTracker':this[_0x38023b(0x14c)],'keystrokeHandler':this[_0x38023b(0x114)],'actions':{'focusPrevious':_0x38023b(0x13c),'focusNext':_0x38023b(0x145)}}),this[_0x38023b(0x132)]({'tag':_0x38023b(0x157),'attributes':{'class':[_0x38023b(0x10f)]},'children':[{'tag':_0x38023b(0x157),'attributes':{'class':[_0x38023b(0x123),this[_0x38023b(0x155)]['if'](_0x38023b(0x105),_0x38023b(0x13f))]},'children':[this[_0x38023b(0x158)],this[_0x38023b(0x12a)]]}]}),this[_0x38023b(0x114)][_0x38023b(0x12f)](_0x38023b(0x150),(_0x48c322,_0x165dd4)=>{const _0x4922ee=_0x38023b;this[_0x4922ee(0x12a)][_0x4922ee(0x11f)](_0x4922ee(0x10b)),_0x165dd4();}),this[_0x38023b(0x114)][_0x38023b(0x12f)](_0x38023b(0x159),(_0x15e3a0,_0x18c4a6)=>{const _0x1c058a=_0x38023b;this[_0x1c058a(0x158)][_0x1c058a(0x11a)]&&(this[_0x1c058a(0x158)][_0x1c058a(0x11f)](_0x1c058a(0x10b)),_0x18c4a6());}),this['on'](_0x38023b(0x11d),(_0x4f5057,_0x1e17f8)=>{const _0x42e24f=_0x38023b;_0x1e17f8[_0x42e24f(0x13a)]>0xfde8?(alert(_0x305518(_0x59d754,_0x42e24f(0x13b),[_0x1e17f8[_0x42e24f(0x13a)],0xfde8])),_0x4f5057[_0x42e24f(0x120)]()):this[_0x42e24f(0x14e)][_0x42e24f(0x128)]('');},{'priority':_0x38023b(0x136)});}[_0x11b1ed(0x144)](){const _0x35bb59=_0x11b1ed;super[_0x35bb59(0x144)](),this[_0x35bb59(0x138)]();}[_0x11b1ed(0x133)](){const _0x2300c9=_0x11b1ed;return this[_0x2300c9(0x14e)]||(this[_0x2300c9(0x14e)]=new _0x570723(this[_0x2300c9(0x139)]),this[_0x2300c9(0x141)]=this[_0x2300c9(0x14e)][_0x2300c9(0x10d)]()[_0x2300c9(0x12e)](()=>{const _0x55639e=_0x2300c9;if(this[_0x55639e(0x13d)])return;const _0x1161ca=this[_0x55639e(0x14e)];this[_0x55639e(0x14f)][_0x55639e(0x149)](_0x1161ca['ui'][_0x55639e(0x14f)],this[_0x55639e(0x14f)][_0x55639e(0x153)]),_0x1161ca[_0x55639e(0x118)][_0x55639e(0x143)]['on'](_0x55639e(0x147),()=>this[_0x55639e(0x129)]=_0x1161ca[_0x55639e(0x13e)]()),_0x1161ca[_0x55639e(0x14a)](_0x55639e(0x112))['to'](this),this[_0x55639e(0x148)][_0x55639e(0x127)](_0x1161ca['ui'][_0x55639e(0x10a)],0x0),this[_0x55639e(0x11f)](_0x55639e(0x12d),this[_0x55639e(0x14e)]);})),this[_0x2300c9(0x141)];}[_0x11b1ed(0x134)](_0x5e88b2){const _0x4d4aa2=_0x11b1ed;-0x1===_0x5e88b2?(this[_0x4d4aa2(0x122)][_0x4d4aa2(0x115)](),this[_0x4d4aa2(0x122)][_0x4d4aa2(0x12c)]()):this[_0x4d4aa2(0x122)][_0x4d4aa2(0x115)]();}async[_0x11b1ed(0x107)](){const _0x115d59=_0x11b1ed;this[_0x115d59(0x13d)]||(this[_0x115d59(0x13d)]=!0x0,this[_0x115d59(0x14e)]&&(await this[_0x115d59(0x141)],await this[_0x115d59(0x14e)][_0x115d59(0x107)](),this[_0x115d59(0x11f)](_0x115d59(0x142),this[_0x115d59(0x14e)])),await super[_0x115d59(0x107)]());}[_0x11b1ed(0x119)](){const _0xc620c4=_0x11b1ed,{locale:_0x3084bc}=this,_0xd21c58=new _0x55a6d2(_0x3084bc);return _0xd21c58[_0xc620c4(0x154)]({'attributes':{'class':[_0xc620c4(0x152)]}}),_0xd21c58[_0xc620c4(0x135)]=!0x0,_0xd21c58[_0xc620c4(0x14a)](_0xc620c4(0x137))['to'](this,_0xc620c4(0x130)),_0xd21c58['on'](_0xc620c4(0x10b),()=>{const _0x11f178=_0xc620c4;this[_0x11f178(0x11f)](_0x11f178(0x11d),this[_0x11f178(0x129)]);}),_0xd21c58[_0xc620c4(0x14a)](_0xc620c4(0x11a))['to'](this,_0xc620c4(0x129),this,_0xc620c4(0x146),(_0x6f2eba,_0x121284)=>!_0x121284&&!!_0x6f2eba[_0xc620c4(0x111)]()),_0xd21c58;}[_0x11b1ed(0x117)](){const _0x2593c6=_0x11b1ed,{locale:_0x202354}=this,_0x4ffa82=new _0x55a6d2(_0x202354);return _0x4ffa82[_0x2593c6(0x154)]({'attributes':{'class':[_0x2593c6(0x11b)]}}),_0x4ffa82[_0x2593c6(0x137)]=_0x305518(_0x202354,_0x2593c6(0x14b)),_0x4ffa82[_0x2593c6(0x135)]=!0x0,_0x4ffa82['on'](_0x2593c6(0x10b),()=>{const _0x506518=_0x2593c6;this[_0x506518(0x14e)][_0x506518(0x128)](''),this[_0x506518(0x11f)](_0x506518(0x126));}),_0x4ffa82;}[_0x11b1ed(0x138)](){const _0x1078a1=_0x11b1ed;this[_0x1078a1(0x114)][_0x1078a1(0x116)](this[_0x1078a1(0x14f)]),this[_0x1078a1(0x148)][_0x1078a1(0x11e)](_0x2f7ab9=>{const _0x4cb097=_0x1078a1;this[_0x4cb097(0x14c)][_0x4cb097(0x127)](_0x2f7ab9[_0x4cb097(0x14f)]);}),this[_0x1078a1(0x148)]['on'](_0x1078a1(0x147),(_0x4a439d,_0x4e8a25)=>{const _0x1d5eb2=_0x1078a1;for(const _0x1dee69 of Array[_0x1d5eb2(0x10e)](_0x4e8a25[_0x1d5eb2(0x125)])[_0x1d5eb2(0x108)]())this[_0x1d5eb2(0x14c)][_0x1d5eb2(0x127)](_0x1dee69[_0x1d5eb2(0x14f)]);});}}