UNPKG

@ckeditor/ckeditor5-ai

Version:

AI Assistant feature for CKEditor 5.

23 lines • 21.2 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 _0xef5b2a=_0x105c;(function(_0x30d3b8,_0x28da89){const _0x24e9cc=_0x105c,_0x1ac582=_0x30d3b8();while(!![]){try{const _0x28802d=parseInt(_0x24e9cc(0xfe))/0x1*(-parseInt(_0x24e9cc(0x112))/0x2)+parseInt(_0x24e9cc(0x11c))/0x3*(parseInt(_0x24e9cc(0x18e))/0x4)+parseInt(_0x24e9cc(0x107))/0x5+parseInt(_0x24e9cc(0x186))/0x6*(parseInt(_0x24e9cc(0x16b))/0x7)+-parseInt(_0x24e9cc(0x16c))/0x8*(parseInt(_0x24e9cc(0xfd))/0x9)+parseInt(_0x24e9cc(0x16a))/0xa*(-parseInt(_0x24e9cc(0x166))/0xb)+-parseInt(_0x24e9cc(0xe2))/0xc*(-parseInt(_0x24e9cc(0x177))/0xd);if(_0x28802d===_0x28da89)break;else _0x1ac582['push'](_0x1ac582['shift']());}catch(_0x234f75){_0x1ac582['push'](_0x1ac582['shift']());}}}(_0x1882,0x82e67));import{Plugin as _0x5f42e9}from'ckeditor5/src/core.js';import{first as _0x3dce99,CKEditorError as _0xba9ec}from'ckeditor5/src/utils.js';import{createDropdown as _0x36039a,addMenuToDropdown as _0x50bea7,ButtonView as _0x40ddd1,MenuBarMenuListItemButtonView as _0x22e850,Dialog as _0x2e65d7,DialogViewPosition as _0x25bd09,MenuBarMenuView as _0x4dc7d1,MenuBarMenuListView as _0x1e5ffb,MenuBarMenuListItemView as _0x18da74}from'ckeditor5/src/ui.js';import{icons as _0x5179d2}from'ckeditor5-collaboration/src/collaboration-core.js';function _0x1882(){const _0x5862c2=['showAIAssistant','ai.aiAssistant.disabledElements','queryView','hideUI','381XgUvco','pluginName','getSelectedBlocks','forEach','isEnabled','replace','change:enabledCommandsIds','get','AI\x20Commands','aiLicenseKeyTrialLimit','isOn','execute','children','text/html','getSelectedElement','media','trialLimit','ck-ai-assistant-ui','expired','update','EDITOR_TOP_SIDE','bind','isFlat','change:value','textAdapter','AI\x20is\x20writing','aiLicenseKeyUsageLimit','selection','custom','push','enabledCommandsIds','showUI','change','show','filter','focus','INSERT','_licenseKeyCheckInterval','updateView','listenTo','_initAriaAiStatusChangeAnnouncements','_aiAdapter','licenseKey','ai-commands-config-order-collision','menuBar:aiCommands','_populateMenuBarMenu','aiCommands','reset','isOfficialPlugin','componentFactory','Error\x20during\x20AI\x20content\x20generation:\x20%0','aiLicenseKeyDomainLimit','splice','\x20ck-ai-assistant-ui_theme','ai.aiAssistant.commands','addMany','locale','_showLicenseError','requiresContent','contentArea','_aiAssistantController','add','buttons','AI\x20Assistant','replaceContent','copy','config','REPLACE','map','plugins','define','requires','_onExecute','hide','1265xUYigk','menuBar:aiAssistant','change:isError','editor','48090refGKb','6846469DeBBQY','1508216FtbeQd','menuPanelClass','errorView','ck-ai-assistant-button\x20','menuitemcheckbox','includes','init','menuView','featureNotAllowed','render','items','1402258fbjiFc','order','AIAssistant','_commandDefinitions','ai.aiAssistant.contentAreaCssClass','schema','groupId','aiAssistant','polite','</p>','getRanges','robotPencil','showFakeVisualSelection','aiLicenseKeyNotAllowed','evaluationLimit','6ZHyCuz','trim','model','length','body','comment','text','fieldView','17984XgVOMr','domainLimit','isCollapsed','groupLabel','change:isProcessing','promptView','insertContent','aiLicenseKeyEvaluationLimit','132VvEoEJ','_initView','values','delegate','currentContext','once','AIAssistantUI','ck-ai-commands-dropdown\x20','ai.useTheme','_dialog','updatePosition','view','buttonView','_getResolvedCommandsDefinitions','rawHtml','invalid','usageLimit','set','prompt','aiLicenseKeyExpired','getLimitElement','DataTransfer','insertContentBelow','wasMoved','<p>','setSelection','announce','45ZKkpTm','249kOKTko','editing','command:','tableOfContents','getData','sort','_uiCssClasses','Generated\x20content:\x20%0','from','622130fcRKLY','hideFakeVisualSelection','fire','commands','label','_getMenuBarGroupButtons','_formView','_forceMarkersCopy','destroy','isPremiumPlugin','_createAIAssistantUIButton','6652jjVnrU','panelView','document','source','aiLicenseKeyInvalid','aiLicenseKeyValid'];_0x1882=function(){return _0x5862c2;};return _0x1882();}import{normalizeCommandsConfig as _0x33fa0f,UNGROUPED_COMMANDS_GROUP_ID as _0x5e0872}from'./utils/normalizecommandsconfig.js';import _0x568730 from'./aiassistantediting.js';import _0x8df8c7 from'./adapters/aiadapter.js';import{getTranslation as _0x5c91af}from'./utils/common-translations.js';import _0x5cb034 from'./ui/showaiassistantcommand.js';import _0x3ec060 from'./ui/aiassistantcontroller.js';import _0x2a31d5 from'./ui/form/aiformview.js';import{AIFormToolbarViewMainActionLabel as _0x287588}from'./ui/form/aiformtoolbarview.js';import _0x41f294 from'../theme/icons/magic-wand.svg';import'../theme/ai.css';import'../theme/ai-dropdown.css';import'../theme/ai-form.css';const w=globalThis[_0xef5b2a(0xf7)];import{ClipboardMarkersUtils as _0x194d33}from'ckeditor5/src/clipboard.js';function _0x105c(_0x2db341,_0x1cefe5){const _0x1882cb=_0x1882();return _0x105c=function(_0x105c25,_0x1ebd17){_0x105c25=_0x105c25-0xe0;let _0x13f77b=_0x1882cb[_0x105c25];return _0x13f77b;},_0x105c(_0x2db341,_0x1cefe5);}import{DomEventData as _0x5a0d4d,DataTransfer as _0x4ac3df}from'ckeditor5/src/engine.js';export default class n extends _0x5f42e9{static get[_0xef5b2a(0x11d)](){const _0x54b9b8=_0xef5b2a;return _0x54b9b8(0xe8);}static get[_0xef5b2a(0x14c)](){return!0x0;}static get[_0xef5b2a(0x110)](){return!0x0;}static get[_0xef5b2a(0x163)](){return[_0x194d33,_0x568730,_0x8df8c7,_0x2e65d7];}constructor(_0xc723bf){const _0x4c26a1=_0xef5b2a;super(_0xc723bf),this[_0x4c26a1(0x104)]='',_0xc723bf[_0x4c26a1(0x15e)][_0x4c26a1(0x162)](_0x4c26a1(0x119),[_0x4c26a1(0x12b),_0x4c26a1(0xf0),_0x4c26a1(0x101)]),_0xc723bf[_0x4c26a1(0x15e)][_0x4c26a1(0x162)](_0x4c26a1(0x17b),''),_0xc723bf[_0x4c26a1(0x15e)][_0x4c26a1(0x162)](_0x4c26a1(0xea),!0x0),this[_0x4c26a1(0x104)]=_0x4c26a1(0x12d)+(_0xc723bf[_0x4c26a1(0x15e)][_0x4c26a1(0x123)](_0x4c26a1(0xea))?_0x4c26a1(0x151):'');}[_0xef5b2a(0x172)](){const _0x528931=_0xef5b2a,{editor:_0xe41764}=this;this[_0x528931(0x145)]=_0xe41764[_0x528931(0x161)][_0x528931(0x123)](_0x8df8c7),this[_0x528931(0xeb)]=_0xe41764[_0x528931(0x161)][_0x528931(0x123)](_0x2e65d7),this[_0x528931(0x10d)]=null,this[_0x528931(0x17a)]=this[_0x528931(0xef)]();const _0x32e7e3=new _0x5cb034(_0xe41764,Array[_0x528931(0x106)](this[_0x528931(0x17a)][_0x528931(0xe4)]()));_0xe41764[_0x528931(0x10a)][_0x528931(0x159)](_0x528931(0x118),_0x32e7e3),_0xe41764['ui'][_0x528931(0x14d)][_0x528931(0x159)](_0x528931(0x14a),_0x313f87=>{const _0x52ec02=_0x528931,_0x4039e3=_0x36039a(_0x313f87);return _0x4039e3[_0x52ec02(0xf3)]({'class':_0x52ec02(0xe9)+this[_0x52ec02(0x104)]}),_0x4039e3[_0x52ec02(0xee)][_0x52ec02(0xf3)]({'label':_0x5c91af(_0x313f87,_0x52ec02(0x124)),'icon':_0x41f294,'tooltip':!0x0}),_0x4039e3['on'](_0x52ec02(0x127),_0x2ac06f=>this[_0x52ec02(0x164)](_0x2ac06f[_0x52ec02(0x115)]['id'])),_0x50bea7(_0x4039e3,_0xe41764['ui'][_0x52ec02(0xed)][_0x52ec02(0x18a)],function(_0xdb842f){const _0x3b730f=_0x52ec02,_0x3799d7=_0x33fa0f(_0xdb842f[_0x3b730f(0x15e)][_0x3b730f(0x123)](_0x3b730f(0x152)),_0xdb842f[_0x3b730f(0x154)]),_0x5e3c9d=U(_0xdb842f,_0x3799d7)[_0x3b730f(0x13e)](_0x631f60=>_0x631f60[_0x3b730f(0x10a)][_0x3b730f(0x189)]);if(0x1===_0x5e3c9d[_0x3b730f(0x189)])return U(_0xdb842f,_0x5e3c9d[0x0][_0x3b730f(0x10a)])[_0x3b730f(0x160)](_0x174074=>({'id':_0x174074['id'],'label':_0x174074[_0x3b730f(0x10b)]}));return _0x5e3c9d[_0x3b730f(0x160)](_0x1eaed4=>{const _0x220ee2=_0x3b730f,{groupId:_0x435aff,groupLabel:_0x300ab8,commands:_0x205941}=_0x1eaed4,_0x11a217=U(_0xdb842f,_0x205941)[_0x220ee2(0x160)](_0x43c8f0=>({'id':_0x43c8f0['id'],'label':_0x43c8f0[_0x220ee2(0x10b)]}));return{'id':_0x435aff,'menu':_0x300ab8||_0x435aff,'children':_0x11a217};});}(_0xe41764),{'ariaLabel':_0x5c91af(_0x313f87,_0x52ec02(0x124))}),_0x4039e3[_0x52ec02(0x173)][_0x52ec02(0x16d)]=_0x52ec02(0xe9)+this[_0x52ec02(0x104)],_0x32e7e3['on'](_0x52ec02(0x122),_0xbb7801),_0x4039e3[_0x52ec02(0x173)][_0x52ec02(0xe7)](_0x52ec02(0x175),_0xbb7801),_0x4039e3;function _0xbb7801(){const _0x4e5542=_0x52ec02;_0x4039e3[_0x4e5542(0x120)]=_0x32e7e3[_0x4e5542(0x13a)][_0x4e5542(0x189)]>0x0;for(const _0x4fdb2c of _0x4039e3[_0x4e5542(0x173)][_0x4e5542(0x15a)])_0x4fdb2c[_0x4e5542(0x120)]=_0x32e7e3[_0x4e5542(0x13a)][_0x4e5542(0x171)](_0x4fdb2c['id']);}}),_0xe41764['ui'][_0x528931(0x14d)][_0x528931(0x159)](_0x528931(0x148),_0x3fe951=>{const _0x45b4e3=_0x528931,_0x359e96=new _0x4dc7d1(_0x3fe951);_0x359e96[_0x45b4e3(0xee)][_0x45b4e3(0xf3)]({'label':_0x5c91af(_0x3fe951,_0x45b4e3(0x124)),'icon':_0x41f294}),_0x359e96[_0x45b4e3(0x131)](_0x45b4e3(0x120))['to'](_0x32e7e3,_0x45b4e3(0x13a),_0x1c220b=>_0x1c220b[_0x45b4e3(0x189)]>0x0);const _0x3b4d88=_0x33fa0f(_0xe41764[_0x45b4e3(0x15e)][_0x45b4e3(0x123)](_0x45b4e3(0x152)),_0x3fe951);return this[_0x45b4e3(0x149)](_0x32e7e3,_0x359e96,_0x3b4d88,_0x31402b=>this[_0x45b4e3(0x164)](_0x31402b)),_0x359e96;}),_0xe41764['ui'][_0x528931(0x14d)][_0x528931(0x159)](_0x528931(0x17e),()=>{const _0x17e5a5=_0x528931,_0x1cdcac=this[_0x17e5a5(0x111)](_0x40ddd1);return _0x1cdcac[_0x17e5a5(0xf3)]({'tooltip':!0x0,'class':_0x17e5a5(0x16f)+this[_0x17e5a5(0x104)]}),_0x1cdcac;}),_0xe41764['ui'][_0x528931(0x14d)][_0x528931(0x159)](_0x528931(0x167),()=>{const _0x537d6f=_0x528931,_0x5e4a09=this[_0x537d6f(0x111)](_0x22e850);return _0x5e4a09[_0x537d6f(0xf3)]({'role':_0x537d6f(0x170)}),_0x5e4a09;}),this[_0x528931(0x146)]=this[_0x528931(0x169)][_0x528931(0x15e)][_0x528931(0x123)](_0x528931(0x146));const _0x1cd8a1=this[_0x528931(0x169)];this[_0x528931(0x141)]=setInterval(()=>{const _0xacfb69=_0x528931;let _0x3b0a89;for(const _0x43c101 in _0x1cd8a1){const _0x3a5669=_0x43c101,_0x5c301b=_0x1cd8a1[_0x3a5669];if(_0xacfb69(0x117)==_0x5c301b||_0xacfb69(0x116)==_0x5c301b||_0xacfb69(0xf5)==_0x5c301b||_0xacfb69(0x14f)==_0x5c301b||_0xacfb69(0x184)==_0x5c301b||_0xacfb69(0xe1)==_0x5c301b||_0xacfb69(0x125)==_0x5c301b||_0xacfb69(0x136)==_0x5c301b){delete _0x1cd8a1[_0x3a5669],_0x3b0a89=_0x5c301b,clearInterval(this[_0xacfb69(0x141)]),this[_0xacfb69(0x141)]=void 0x0;break;}}_0xacfb69(0x116)==_0x3b0a89&&_0x1cd8a1[_0xacfb69(0x155)](_0xacfb69(0xf1)),_0xacfb69(0xf5)==_0x3b0a89&&_0x1cd8a1[_0xacfb69(0x155)](_0xacfb69(0x12e)),_0xacfb69(0x14f)==_0x3b0a89&&_0x1cd8a1[_0xacfb69(0x155)](_0xacfb69(0x18f)),_0xacfb69(0x184)==_0x3b0a89&&_0x1cd8a1[_0xacfb69(0x155)](_0xacfb69(0x174),_0xacfb69(0x179)),_0xacfb69(0xe1)==_0x3b0a89&&_0x1cd8a1[_0xacfb69(0x155)](_0xacfb69(0x185)),_0xacfb69(0x125)==_0x3b0a89&&_0x1cd8a1[_0xacfb69(0x155)](_0xacfb69(0x12c)),_0xacfb69(0x136)==_0x3b0a89&&_0x1cd8a1[_0xacfb69(0x155)](_0xacfb69(0xf2));},0x3e8);}[_0xef5b2a(0x10f)](){const _0x1433ef=_0xef5b2a;super[_0x1433ef(0x10f)](),this[_0x1433ef(0x141)]&&clearInterval(this[_0x1433ef(0x141)]);}[_0xef5b2a(0x13b)](_0x8b0a76='',_0x10305c='',_0x1fa117=_0xef5b2a(0x138)){const _0x2a1243=_0xef5b2a,_0x3e383b=this[_0x2a1243(0x169)],_0x3980f9=_0x3e383b[_0x2a1243(0xff)][_0x2a1243(0xed)],_0x4bb24c=_0x3e383b[_0x2a1243(0x161)][_0x2a1243(0x123)](_0x568730),_0x9029b3=_0x3e383b[_0x2a1243(0x161)][_0x2a1243(0x123)](_0x194d33);_0x4bb24c[_0x2a1243(0x183)]();const _0x4663bd=new w(),_0x4d1fff=new ClipboardEvent(_0x2a1243(0x15d),{'clipboardData':_0x4663bd}),_0x495149=new _0x4ac3df(_0x4663bd),_0x2fac2c=new _0x5a0d4d(_0x3980f9,_0x4d1fff,{'dataTransfer':_0x495149});_0x9029b3[_0x2a1243(0x10e)](_0x2a1243(0x18b),()=>{const _0x74d88=_0x2a1243;_0x3980f9[_0x74d88(0x114)][_0x74d88(0x109)](_0x74d88(0x15d),_0x2fac2c);}),this[_0x2a1243(0x10d)]||(this[_0x2a1243(0xe3)](),this[_0x2a1243(0x158)]=new _0x3ec060(_0x3e383b,this[_0x2a1243(0x145)][_0x2a1243(0x134)],this[_0x2a1243(0x10d)]));let _0x3e707b=_0x495149[_0x2a1243(0x102)](_0x2a1243(0x129));const _0x2049ff=_0x3e383b[_0x2a1243(0x188)][_0x2a1243(0x114)][_0x2a1243(0x137)],_0x57a72f=Array[_0x2a1243(0x106)](_0x2049ff[_0x2a1243(0x181)]());0x1===_0x57a72f[_0x2a1243(0x189)]&&_0x57a72f[0x0][_0x2a1243(0x132)]&&!_0x2049ff[_0x2a1243(0x12a)]()&&''!==_0x3e707b[_0x2a1243(0x121)](/&nbsp;/g,'')[_0x2a1243(0x187)]()&&(_0x3e707b=_0x2a1243(0xfa)+_0x3e707b+_0x2a1243(0x180)),this[_0x2a1243(0x158)][_0x2a1243(0x142)]({'actionId':_0x1fa117,'query':_0x8b0a76,'htmlContent':_0x3e707b,'label':_0x10305c,'mainActionLabel':_0x287588[_0x3e383b[_0x2a1243(0x188)][_0x2a1243(0x114)][_0x2a1243(0x137)][_0x2a1243(0x190)]?_0x2a1243(0x140):_0x2a1243(0x15f)]}),_0x2a1243(0x17e)!==this[_0x2a1243(0xeb)]['id']?this[_0x2a1243(0xeb)][_0x2a1243(0x13d)]({'id':_0x2a1243(0x17e),'icon':_0x5179d2[_0x2a1243(0x182)],'title':_0x5c91af(this[_0x2a1243(0x169)][_0x2a1243(0x154)],_0x2a1243(0x15b)),'content':this[_0x2a1243(0x10d)],'position':_0x25bd09[_0x2a1243(0x130)],'onShow':()=>{const _0x3f4a8c=_0x2a1243;this[_0x3f4a8c(0x10d)][_0x3f4a8c(0x13f)]();},'onHide':()=>{const _0x296a9c=_0x2a1243;this[_0x296a9c(0x158)][_0x296a9c(0x14b)](),_0x4bb24c[_0x296a9c(0x108)]();}}):this[_0x2a1243(0xeb)][_0x2a1243(0xed)][_0x2a1243(0xf9)]||this[_0x2a1243(0xeb)][_0x2a1243(0xed)][_0x2a1243(0xec)]();}[_0xef5b2a(0x11b)](){const _0x4dfbb6=_0xef5b2a;this[_0x4dfbb6(0xeb)][_0x4dfbb6(0x165)]();}[_0xef5b2a(0xef)](){const _0x2fc14e=_0xef5b2a,_0x19748a=new Map(),_0x1c81af=_0x33fa0f(this[_0x2fc14e(0x169)][_0x2fc14e(0x15e)][_0x2fc14e(0x123)](_0x2fc14e(0x152)),this[_0x2fc14e(0x169)][_0x2fc14e(0x154)]);for(const _0x3ab241 of _0x1c81af)for(const _0x3c43fe of _0x3ab241[_0x2fc14e(0x10a)])_0x19748a[_0x2fc14e(0xf3)](_0x3c43fe['id'],{..._0x3c43fe,'groupId':_0x3ab241[_0x2fc14e(0x17d)],'groupLabel':_0x3ab241[_0x2fc14e(0x191)]||_0x3ab241[_0x2fc14e(0x17d)]});return _0x19748a;}[_0xef5b2a(0x111)](_0x3a5907){const _0x133753=_0xef5b2a,_0x2cba2e=this[_0x133753(0x169)],_0x4488eb=_0x2cba2e[_0x133753(0x10a)][_0x133753(0x123)](_0x133753(0x118)),_0x5d4063=new _0x3a5907(_0x2cba2e[_0x133753(0x154)]);return _0x5d4063[_0x133753(0xf3)]({'label':_0x5c91af(_0x2cba2e[_0x133753(0x154)],_0x133753(0x15b)),'icon':_0x5179d2[_0x133753(0x182)],'isToggleable':!0x0}),_0x5d4063[_0x133753(0x131)](_0x133753(0x120))['to'](_0x4488eb),_0x5d4063[_0x133753(0x131)](_0x133753(0x126))['to'](this[_0x133753(0xeb)],'id',_0x2198b6=>_0x133753(0x17e)===_0x2198b6),this[_0x133753(0x143)](_0x5d4063,_0x133753(0x127),()=>{const _0x218280=_0x133753;_0x5d4063[_0x218280(0x126)]?this[_0x218280(0x11b)]():_0x4488eb[_0x218280(0x127)]();}),_0x5d4063;}[_0xef5b2a(0xe3)](){const _0x36a926=_0xef5b2a,_0x23b0c1=this[_0x36a926(0x169)][_0x36a926(0x161)][_0x36a926(0x123)](_0x568730);this[_0x36a926(0x10d)]=new _0x2a31d5(this[_0x36a926(0x169)][_0x36a926(0x154)],this[_0x36a926(0x104)],this[_0x36a926(0x169)][_0x36a926(0x15e)][_0x36a926(0x123)](_0x36a926(0x17b))),this[_0x36a926(0x10d)]['on'](_0x36a926(0x133),()=>{const _0x1bcc1e=_0x36a926;this[_0x1bcc1e(0xeb)][_0x1bcc1e(0xed)][_0x1bcc1e(0xf9)]||this[_0x1bcc1e(0xeb)][_0x1bcc1e(0xed)][_0x1bcc1e(0xec)]();}),this[_0x36a926(0x10d)][_0x36a926(0x193)][_0x36a926(0x11a)][_0x36a926(0x18d)]['on'](_0x36a926(0x12f),()=>{const _0x3eed02=_0x36a926;this[_0x3eed02(0xeb)][_0x3eed02(0xed)][_0x3eed02(0xf9)]||this[_0x3eed02(0xeb)][_0x3eed02(0xed)][_0x3eed02(0xec)]();}),this[_0x36a926(0x143)](this[_0x36a926(0x10d)],_0x36a926(0x15c),()=>{const _0x32bf4f=_0x36a926;_0x23b0c1[_0x32bf4f(0xe0)](this[_0x32bf4f(0x158)][_0x32bf4f(0xe6)]),this[_0x32bf4f(0x11b)]();}),this[_0x36a926(0x143)](this[_0x36a926(0x10d)],_0x36a926(0xf8),()=>{const _0x3cd333=_0x36a926;_0x23b0c1[_0x3cd333(0xf8)](this[_0x3cd333(0x158)][_0x3cd333(0xe6)]),this[_0x3cd333(0x11b)]();}),this[_0x36a926(0x144)]();}[_0xef5b2a(0x144)](){const _0x4175cb=_0xef5b2a,{locale:_0x3ce1ee,ui:{ariaLiveAnnouncer:_0x45d41d}}=this[_0x4175cb(0x169)];this[_0x4175cb(0x10d)][_0x4175cb(0x157)]['on'](_0x4175cb(0x192),(_0x525460,_0x24fa6b,_0x33f613)=>{const _0x13be70=_0x4175cb,_0x186fd6=this[_0x13be70(0x158)][_0x13be70(0xe6)];_0x33f613?_0x45d41d[_0x13be70(0xfc)](_0x5c91af(_0x3ce1ee,_0x13be70(0x135))):_0x186fd6&&_0x45d41d[_0x13be70(0xfc)](_0x5c91af(_0x3ce1ee,_0x13be70(0x105),_0x186fd6),{'politeness':_0x13be70(0x17f),'isUnsafeHTML':!0x0});}),this[_0x4175cb(0x10d)]['on'](_0x4175cb(0x168),(_0x46bd4e,_0x31cd36,_0x222f9f)=>{const _0x589c2d=_0x4175cb;if(_0x222f9f){const _0x575cff=this[_0x589c2d(0x10d)][_0x589c2d(0x16e)][_0x589c2d(0x18c)];_0x45d41d[_0x589c2d(0xfc)](_0x5c91af(_0x3ce1ee,_0x589c2d(0x14e),_0x575cff));}});}[_0xef5b2a(0x164)](_0x267850){const _0x792e20=_0xef5b2a,_0x3e41eb=this[_0x792e20(0x17a)][_0x792e20(0x123)](_0x267850),_0x10dd47=this[_0x792e20(0x169)],_0x51eee9=_0x10dd47[_0x792e20(0x188)][_0x792e20(0x114)][_0x792e20(0x137)],_0x5520ef=_0x10dd47[_0x792e20(0x10a)][_0x792e20(0x123)](_0x792e20(0x118)),_0xc6d77b=_0x10dd47[_0x792e20(0x161)][_0x792e20(0x123)](_0x568730),_0x21a10b=''+(_0x3e41eb[_0x792e20(0x17d)]!==_0x5e0872?_0x3e41eb[_0x792e20(0x191)]+':\x20':'')+_0x3e41eb[_0x792e20(0x10b)];if(!0x1!==_0x3e41eb[_0x792e20(0x156)]&&_0x51eee9[_0x792e20(0x190)]){const _0x27751e=_0x3dce99(_0x51eee9[_0x792e20(0x11e)]())||_0x10dd47[_0x792e20(0x188)][_0x792e20(0x17c)][_0x792e20(0xf6)](_0x51eee9);_0x10dd47[_0x792e20(0x188)][_0x792e20(0x13c)](_0x161293=>{const _0x5e93df=_0x792e20;_0x161293[_0x5e93df(0xfb)](_0x27751e,'in');});}_0xc6d77b[_0x792e20(0x183)](),_0x5520ef[_0x792e20(0x127)](_0x3e41eb[_0x792e20(0xf4)],_0x21a10b,_0x792e20(0x100)+_0x267850);}[_0xef5b2a(0x149)](_0x535580,_0x11a730,_0x2c9948,_0x2beaac){const _0x2cb79d=_0xef5b2a,_0x1e494f=this[_0x2cb79d(0x169)],_0x1e74b3=_0x1e494f[_0x2cb79d(0x154)],_0x323440=new _0x1e5ffb(_0x1e74b3),_0x23ddcc=U(_0x1e494f,_0x2c9948)[_0x2cb79d(0x13e)](_0x331cfe=>_0x331cfe[_0x2cb79d(0x10a)][_0x2cb79d(0x189)]);0x1===_0x23ddcc[_0x2cb79d(0x189)]?this[_0x2cb79d(0x10c)]({'command':_0x535580,'commands':_0x23ddcc[0x0][_0x2cb79d(0x10a)],'parentMenuView':_0x11a730,'onExecute':_0x2beaac})[_0x2cb79d(0x11f)](_0x17ff48=>_0x323440[_0x2cb79d(0x176)][_0x2cb79d(0x159)](_0x17ff48)):_0x23ddcc[_0x2cb79d(0x11f)](({groupId:_0x2e60a2,groupLabel:_0x274342,commands:_0x3a1893})=>{const _0x51e939=_0x2cb79d,_0x4f6413=new _0x18da74(_0x1e74b3,_0x11a730),_0xc15809=new _0x4dc7d1(_0x1e74b3),_0x41ab98=new _0x1e5ffb(_0x1e74b3),_0x3fd725=this[_0x51e939(0x10c)]({'command':_0x535580,'commands':_0x3a1893,'parentMenuView':_0xc15809,'onExecute':_0x2beaac});_0xc15809[_0x51e939(0xee)][_0x51e939(0xf3)]({'label':_0x274342||_0x2e60a2}),_0xc15809[_0x51e939(0xe5)](_0x51e939(0x127))['to'](_0x11a730),_0x41ab98[_0x51e939(0x176)][_0x51e939(0x153)](_0x3fd725),_0xc15809[_0x51e939(0x113)][_0x51e939(0x128)][_0x51e939(0x159)](_0x41ab98),_0x4f6413[_0x51e939(0x128)][_0x51e939(0x159)](_0xc15809),_0x323440[_0x51e939(0x176)][_0x51e939(0x159)](_0x4f6413);}),_0x11a730[_0x2cb79d(0x113)][_0x2cb79d(0x128)][_0x2cb79d(0x159)](_0x323440);}[_0xef5b2a(0x10c)]({command:_0x2d416f,commands:_0x3d7254,parentMenuView:_0x3e8cbc,onExecute:_0x5d9a4b}){const _0x16e405=_0xef5b2a,_0x1671ec=this[_0x16e405(0x169)],_0x3e33f4=_0x1671ec[_0x16e405(0x154)];return U(_0x1671ec,_0x3d7254)[_0x16e405(0x160)](_0x371db8=>{const _0x3119d5=_0x16e405,_0x2e4898=new _0x18da74(_0x3e33f4,_0x3e8cbc),_0x139941=new _0x22e850(_0x3e33f4);return _0x139941[_0x3119d5(0xf3)]({'label':_0x371db8[_0x3119d5(0x10b)]}),_0x139941[_0x3119d5(0xe5)](_0x3119d5(0x127))['to'](_0x3e8cbc),_0x139941['on'](_0x3119d5(0x127),()=>_0x5d9a4b(_0x371db8['id'])),_0x139941[_0x3119d5(0x131)](_0x3119d5(0x120))['to'](_0x2d416f,_0x3119d5(0x13a),_0x1f2da0=>_0x1f2da0[_0x3119d5(0x171)](_0x371db8['id'])),_0x2e4898[_0x3119d5(0x128)][_0x3119d5(0x159)](_0x139941),_0x2e4898;});}}function B(_0x3ddb98,_0x59dad2){const _0x35bc01=_0xef5b2a;return void 0x0!==_0x3ddb98[_0x35bc01(0x178)]&&void 0x0===_0x59dad2[_0x35bc01(0x178)]?0x1:void 0x0===_0x3ddb98[_0x35bc01(0x178)]&&void 0x0!==_0x59dad2[_0x35bc01(0x178)]?-0x1:void 0x0!==_0x3ddb98[_0x35bc01(0x178)]&&void 0x0!==_0x59dad2[_0x35bc01(0x178)]?_0x3ddb98[_0x35bc01(0x178)]-_0x59dad2[_0x35bc01(0x178)]:0x0;}function U(_0x2af58b,_0x88c782){const _0x556eba=_0xef5b2a;_0x88c782[_0x556eba(0x103)](B);const _0x253839={},_0x2bec64=[];for(const _0x100c59 of _0x88c782)if(void 0x0!==_0x100c59[_0x556eba(0x178)]){if(_0x100c59[_0x556eba(0x178)]in _0x253839)throw new _0xba9ec(_0x556eba(0x147),_0x2af58b,{'conflictingDefinitions':[_0x100c59,_0x253839[_0x100c59[_0x556eba(0x178)]]]});_0x253839[_0x100c59[_0x556eba(0x178)]]=_0x100c59,_0x2bec64[_0x556eba(0x150)](_0x100c59[_0x556eba(0x178)],0x0,_0x100c59);}else _0x2bec64[_0x556eba(0x139)](_0x100c59);return _0x2bec64;}