@ckeditor/ckeditor5-ai
Version:
AI features for CKEditor 5.
23 lines • 17.7 kB
JavaScript
/*
* 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 _0x3a6e57=_0x10a2;function _0x10a2(_0x498731,_0x533df0){const _0x177d5f=_0x177d();return _0x10a2=function(_0x10a255,_0x16b73e){_0x10a255=_0x10a255-0x1d9;let _0x403028=_0x177d5f[_0x10a255];return _0x403028;},_0x10a2(_0x498731,_0x533df0);}(function(_0x8e3836,_0x501c56){const _0x73237e=_0x10a2,_0x570288=_0x8e3836();while(!![]){try{const _0x4413d7=-parseInt(_0x73237e(0x1f3))/0x1*(parseInt(_0x73237e(0x24d))/0x2)+parseInt(_0x73237e(0x1ec))/0x3*(-parseInt(_0x73237e(0x234))/0x4)+parseInt(_0x73237e(0x1f9))/0x5+parseInt(_0x73237e(0x211))/0x6+-parseInt(_0x73237e(0x262))/0x7*(-parseInt(_0x73237e(0x25d))/0x8)+-parseInt(_0x73237e(0x20e))/0x9+-parseInt(_0x73237e(0x1db))/0xa;if(_0x4413d7===_0x501c56)break;else _0x570288['push'](_0x570288['shift']());}catch(_0x394644){_0x570288['push'](_0x570288['shift']());}}}(_0x177d,0xe4d09));import{createParser as _0x35f40b}from'eventsource-parser';function _0x177d(){const _0x57e975=['deleteDocument','117974tiIbRt','/documents','/calls/','/actions/custom/calls','/documents/','_apiUrl','deleteConversation','updateConversation','AbortError','/models/1','MAKE_SHORTER','push','excludeEmpty','feed','AIConnector','Content-Type','247096fKtrpj','_handleError','/files','items','/reviews/custom/calls/','217ASgtIo','message','parse','abortController','data','/web-resources/','FIX_GRAMMAR','https://ai.cke-cs.com/v1','executeAction','/conversations?','5996650wpDMCQ','getReader','PUT','uploadDocument','releaseLock','positiveCount','IMPROVE_WRITING','fetchConversationMessages','application/json','upsertCustomAIActionRating','upsertAIActionRating','getModels','decode','DELETE','fetchConversation','MAKE_TONE_FORMAL','upsertAIReviewRating','84PGtikV','code','POST','body','request','search','limit','13oAiSPD','fix-grammar','callCustomReview','improve-writing','MAKE_TONE_CASUAL','ai-request-aborted','4244125CEnket','Bearer\x20','read','/messages','make-longer','upsertCustomAIReviewRating','CONTINUE','signal','make-tone-casual','statusText','get','true','json','GET','attributes','executeCustomAction','fetchDocument','define','_getStreamReader','ai.serviceUrl','plugins','3370023yXxqGe','/files/','/web-resources','8401068sWAmTw','translate','deleteWebResource','modificationId','deleteFile','callSystemReview','append','/ratings','startConversation','value','pluginName','CloudServices','group','status','init','context','/reviews/system/','continue','totalCount','100','fetchConversations','token','ai-missing-token','make-tone-formal','text','PATCH','isOfficialPlugin','keys','/conversations','catch','_decoder','name','length','/messages/','/reviews/custom/calls','75476vQaVnO','toString','/calls','make-shorter','then','requires','MAKE_LONGER','uploadUrl','_token','stringify','file','queryAssistant','TRANSLATE','/actions/system/','config','upsertAIChatRating','traceId','/actions/custom/calls/','isPremiumPlugin','_sendApiRequest','/conversations/','uploadFile','ai-request-failed','reset'];_0x177d=function(){return _0x57e975;};return _0x177d();}import{ContextPlugin as _0x2d5a08}from'ckeditor5/src/core.js';import{CKEditorError as _0x43d357}from'ckeditor5/src/utils.js';export var AIActionsNames;!function(_0x375b51){const _0x4eb5ba=_0x10a2;_0x375b51[_0x4eb5ba(0x1ff)]=_0x4eb5ba(0x222),_0x375b51[_0x4eb5ba(0x268)]=_0x4eb5ba(0x1f4),_0x375b51[_0x4eb5ba(0x1e1)]=_0x4eb5ba(0x1f6),_0x375b51[_0x4eb5ba(0x23a)]=_0x4eb5ba(0x1fd),_0x375b51[_0x4eb5ba(0x257)]=_0x4eb5ba(0x237),_0x375b51[_0x4eb5ba(0x1f7)]=_0x4eb5ba(0x201),_0x375b51[_0x4eb5ba(0x1ea)]=_0x4eb5ba(0x228),_0x375b51[_0x4eb5ba(0x240)]=_0x4eb5ba(0x212);}(AIActionsNames||(AIActionsNames={}));export class AIConnector extends _0x2d5a08{[_0x3a6e57(0x252)];[_0x3a6e57(0x23c)];[_0x3a6e57(0x22f)];static get[_0x3a6e57(0x239)](){const _0x216a0c=_0x3a6e57;return[_0x216a0c(0x21c)];}static get[_0x3a6e57(0x21b)](){const _0x17f151=_0x3a6e57;return _0x17f151(0x25b);}static get[_0x3a6e57(0x22b)](){return!0x0;}static get[_0x3a6e57(0x246)](){return!0x0;}constructor(_0x4b9a64){const _0x2a2f01=_0x3a6e57;super(_0x4b9a64),this[_0x2a2f01(0x220)][_0x2a2f01(0x242)][_0x2a2f01(0x20a)](_0x2a2f01(0x20c),_0x2a2f01(0x269)),this[_0x2a2f01(0x252)]=this[_0x2a2f01(0x220)][_0x2a2f01(0x242)][_0x2a2f01(0x203)](_0x2a2f01(0x20c)),this[_0x2a2f01(0x23c)]=null,this[_0x2a2f01(0x22f)]=new TextDecoder();}[_0x3a6e57(0x21f)](){const _0x1ecda1=_0x3a6e57,_0x3043c1=this[_0x1ecda1(0x220)][_0x1ecda1(0x20d)][_0x1ecda1(0x203)](_0x1ecda1(0x21c));if(!_0x3043c1[_0x1ecda1(0x226)])throw new _0x43d357(_0x1ecda1(0x227),this);this[_0x1ecda1(0x23c)]=_0x3043c1[_0x1ecda1(0x226)];}[_0x3a6e57(0x219)](_0x2caa8f,_0x37f2ec){const _0x63c7ac=_0x3a6e57,_0x51916c=this[_0x63c7ac(0x247)](_0x63c7ac(0x22d),_0x63c7ac(0x1ee),{'id':_0x2caa8f,'group':_0x37f2ec});return{'getConversation':async()=>(await _0x51916c[_0x63c7ac(0x1f0)])[_0x63c7ac(0x205)](),'abortController':_0x51916c[_0x63c7ac(0x265)]};}[_0x3a6e57(0x23f)]({message:_0x104094,conversationId:_0x386b57,parts:_0x147ce2,capabilities:_0xb82247,model:_0x193ce1,quickActionData:_0x1d4c1d}){const _0x4b929a=_0x3a6e57,_0x129b18={..._0x1d4c1d&&{'quickActionData':_0x1d4c1d}},_0x10bd5f={'prompt':_0x104094,'content':_0x147ce2,'model':_0x193ce1,..._0xb82247&&{'capabilities':_0xb82247},...Object[_0x4b929a(0x22c)](_0x129b18)[_0x4b929a(0x231)]>0x0&&{'attributes':_0x129b18}},_0x5b0b92=this[_0x4b929a(0x247)](_0x4b929a(0x248)+_0x386b57+_0x4b929a(0x1fc),_0x4b929a(0x1ee),_0x10bd5f);return{'getStream':async()=>{const _0x247116=_0x4b929a,_0x533daa=(await _0x5b0b92[_0x247116(0x1f0)])[_0x247116(0x1ef)];return this[_0x247116(0x20b)](_0x533daa);},'abortController':_0x5b0b92[_0x4b929a(0x265)]};}[_0x3a6e57(0x208)]({content:_0x5797d5,message:_0x29bd7e,model:_0x501e4d,outputFormat:_0x11b565}){const _0x22280b=_0x3a6e57,_0x61a535={'content':[{'type':_0x22280b(0x229),'content':_0x5797d5}],'prompt':_0x29bd7e,'model':_0x501e4d,'outputFormat':_0x11b565},_0xd5d285=this[_0x22280b(0x247)](_0x22280b(0x250),_0x22280b(0x1ee),_0x61a535);return{'getStream':async()=>{const _0xcaa84c=_0x22280b,_0x337b39=(await _0xd5d285[_0xcaa84c(0x1f0)])[_0xcaa84c(0x1ef)];return this[_0xcaa84c(0x20b)](_0x337b39);},'abortController':_0xd5d285[_0x22280b(0x265)]};}[_0x3a6e57(0x1d9)]({actionName:_0x5fc5a4,content:_0x14c8af,args:_0x48f4a2}){const _0x4b58c1=_0x3a6e57,_0x4c75d0={'content':[{'type':_0x4b58c1(0x229),'content':_0x14c8af}],'args':_0x48f4a2},_0xf92de8=this[_0x4b58c1(0x247)](_0x4b58c1(0x241)+_0x5fc5a4+_0x4b58c1(0x236),_0x4b58c1(0x1ee),_0x4c75d0);return{'getStream':async()=>{const _0x4ef0df=_0x4b58c1,_0x4e885d=(await _0xf92de8[_0x4ef0df(0x1f0)])[_0x4ef0df(0x1ef)];return this[_0x4ef0df(0x20b)](_0x4e885d);},'abortController':_0xf92de8[_0x4b58c1(0x265)]};}[_0x3a6e57(0x249)](_0x5eaa4e,_0x340c78,_0x249869){const _0x20be20=_0x3a6e57,_0x483d04=new FormData();_0x483d04[_0x20be20(0x217)](_0x20be20(0x23e),_0x340c78,_0x340c78[_0x20be20(0x230)]),_0x249869&&_0x483d04[_0x20be20(0x217)](_0x20be20(0x207),JSON[_0x20be20(0x23d)](_0x249869));const _0x11434e=this[_0x20be20(0x247)](_0x20be20(0x248)+_0x5eaa4e+_0x20be20(0x25f),_0x20be20(0x1ee),_0x483d04);return{'getId':async()=>(await _0x11434e[_0x20be20(0x1f0)])[_0x20be20(0x205)](),'abortController':_0x11434e[_0x20be20(0x265)]};}[_0x3a6e57(0x209)](_0x34035b,_0x28490a){const _0x36a517=_0x3a6e57,_0x359000=this[_0x36a517(0x247)](_0x36a517(0x248)+_0x34035b+_0x36a517(0x251)+_0x28490a,_0x36a517(0x206));return{'getDocument':async()=>(await _0x359000[_0x36a517(0x1f0)])[_0x36a517(0x205)](),'abortController':_0x359000[_0x36a517(0x265)]};}[_0x3a6e57(0x1de)](_0x3fa52b,_0x1f9b7d,_0x56a961){const _0x3e262b=_0x3a6e57,_0x1295bf={'content':_0x1f9b7d};_0x56a961&&(_0x1295bf[_0x3e262b(0x207)]=_0x56a961);const _0x105dd8=this[_0x3e262b(0x247)](_0x3e262b(0x248)+_0x3fa52b+_0x3e262b(0x24e),_0x3e262b(0x1ee),_0x1295bf);return{'getId':async()=>(await _0x105dd8[_0x3e262b(0x1f0)])[_0x3e262b(0x205)](),'abortController':_0x105dd8[_0x3e262b(0x265)]};}[_0x3a6e57(0x225)](_0x112636,_0x3e7ad7){const _0x24d7d9=_0x3a6e57,_0x35e20b=new URLSearchParams();_0x35e20b[_0x24d7d9(0x217)](_0x24d7d9(0x259),_0x24d7d9(0x204)),_0x35e20b[_0x24d7d9(0x217)](_0x24d7d9(0x1f2),_0x24d7d9(0x224)),_0x35e20b[_0x24d7d9(0x217)](_0x24d7d9(0x21d),_0x112636),_0x3e7ad7&&_0x35e20b[_0x24d7d9(0x217)](_0x24d7d9(0x1f1),_0x3e7ad7);const _0x162f1b=this[_0x24d7d9(0x247)](_0x24d7d9(0x1da)+_0x35e20b[_0x24d7d9(0x235)](),_0x24d7d9(0x206));return{'getConversations':async()=>{const _0x2de69d=_0x24d7d9,_0x58f5e0=await _0x162f1b[_0x2de69d(0x1f0)];return(await _0x58f5e0[_0x2de69d(0x205)]())[_0x2de69d(0x260)];},'abortController':_0x162f1b[_0x24d7d9(0x265)]};}[_0x3a6e57(0x253)](_0x47cd7b){const _0x1bd96f=_0x3a6e57,_0x3ece06=this[_0x1bd96f(0x247)](_0x1bd96f(0x248)+_0x47cd7b,_0x1bd96f(0x1e8));return{'execute':async()=>{const _0x137354=_0x1bd96f;await _0x3ece06[_0x137354(0x1f0)];},'abortController':_0x3ece06[_0x1bd96f(0x265)]};}[_0x3a6e57(0x254)](_0x3047bc,_0xceff9c){const _0x272092=_0x3a6e57,_0xe29010=this[_0x272092(0x247)](_0x272092(0x248)+_0x3047bc,_0x272092(0x22a),_0xceff9c);return{'getResult':async()=>(await _0xe29010[_0x272092(0x1f0)],_0xceff9c),'abortController':_0xe29010[_0x272092(0x265)]};}[_0x3a6e57(0x1e9)](_0xf7c655){const _0x25073a=_0x3a6e57,_0x2dbefb=this[_0x25073a(0x247)](_0x25073a(0x248)+_0xf7c655,_0x25073a(0x206));return{'getConversation':async()=>(await _0x2dbefb[_0x25073a(0x1f0)])[_0x25073a(0x205)](),'abortController':_0x2dbefb[_0x25073a(0x265)]};}[_0x3a6e57(0x1e2)](_0x2bacee){const _0x3e2299=_0x3a6e57,_0x4627d5=this[_0x3e2299(0x247)](_0x3e2299(0x248)+_0x2bacee+_0x3e2299(0x1fc),_0x3e2299(0x206));return{'getMessages':async()=>{const _0x4fd037=_0x3e2299,_0x5b7349=await _0x4627d5[_0x4fd037(0x1f0)];return(await _0x5b7349[_0x4fd037(0x205)]())[_0x4fd037(0x260)];},'abortController':_0x4627d5[_0x3e2299(0x265)]};}[_0x3a6e57(0x23b)](_0xd8ddc6,_0x572f93,_0x1ac859){const _0x566aab=_0x3a6e57,_0x4a4dbb=this[_0x566aab(0x247)](_0x566aab(0x248)+_0xd8ddc6+_0x566aab(0x210),_0x566aab(0x1ee),{'url':_0x572f93,'attributes':_0x1ac859});return{'getId':async()=>(await _0x4a4dbb[_0x566aab(0x1f0)])[_0x566aab(0x205)](),'abortController':_0x4a4dbb[_0x566aab(0x265)]};}[_0x3a6e57(0x1e6)](){const _0x5b8b42=_0x3a6e57,_0x2e2174=this[_0x5b8b42(0x247)](_0x5b8b42(0x256),_0x5b8b42(0x206));return{'list':async()=>await(await _0x2e2174[_0x5b8b42(0x1f0)])[_0x5b8b42(0x205)](),'abortController':_0x2e2174[_0x5b8b42(0x265)]};}[_0x3a6e57(0x215)](_0x430a8,_0x14066e){const _0x3e271a=_0x3a6e57,_0x12899d=this[_0x3e271a(0x247)](_0x3e271a(0x248)+_0x430a8+_0x3e271a(0x20f)+_0x14066e,_0x3e271a(0x1e8));return{'execute':async()=>{const _0x66d0cc=_0x3e271a;await _0x12899d[_0x66d0cc(0x1f0)];},'abortController':_0x12899d[_0x3e271a(0x265)]};}[_0x3a6e57(0x24c)](_0x43aa15,_0x538423){const _0x5e5385=_0x3a6e57,_0x1bb8c6=this[_0x5e5385(0x247)](_0x5e5385(0x248)+_0x43aa15+_0x5e5385(0x251)+_0x538423,_0x5e5385(0x1e8));return{'execute':async()=>{const _0x4dd3df=_0x5e5385;await _0x1bb8c6[_0x4dd3df(0x1f0)];},'abortController':_0x1bb8c6[_0x5e5385(0x265)]};}[_0x3a6e57(0x213)](_0x246eaf,_0x6a2907){const _0x3a9fb6=_0x3a6e57,_0x3e17de=this[_0x3a9fb6(0x247)](_0x3a9fb6(0x248)+_0x246eaf+_0x3a9fb6(0x267)+_0x6a2907,_0x3a9fb6(0x1e8));return{'execute':async()=>{const _0x3e6bad=_0x3a9fb6;await _0x3e17de[_0x3e6bad(0x1f0)];},'abortController':_0x3e17de[_0x3a9fb6(0x265)]};}[_0x3a6e57(0x216)]({reviewName:_0x16b83f,content:_0x543a7f,args:_0x4d544a}){const _0x3805a5=_0x3a6e57,_0x3b5a55=this[_0x3805a5(0x247)](_0x3805a5(0x221)+_0x16b83f+_0x3805a5(0x236),_0x3805a5(0x1ee),{'content':[{'type':_0x3805a5(0x229),'content':_0x543a7f}],'args':_0x4d544a});return{'getStream':async()=>{const _0x4437b9=_0x3805a5,_0x667535=(await _0x3b5a55[_0x4437b9(0x1f0)])[_0x4437b9(0x1ef)];return this[_0x4437b9(0x20b)](_0x667535);},'abortController':_0x3b5a55[_0x3805a5(0x265)]};}[_0x3a6e57(0x1f5)]({content:_0x1fbfbb,prompt:_0x3ed9ae,model:_0x5f3f04}){const _0x192bfc=_0x3a6e57,_0x8e223c=this[_0x192bfc(0x247)](_0x192bfc(0x233),_0x192bfc(0x1ee),{'content':[{'type':_0x192bfc(0x229),'content':_0x1fbfbb}],'prompt':_0x3ed9ae,'model':_0x5f3f04});return{'getStream':async()=>{const _0x21caf3=_0x192bfc,_0x41d14d=(await _0x8e223c[_0x21caf3(0x1f0)])[_0x21caf3(0x1ef)];return this[_0x21caf3(0x20b)](_0x41d14d);},'abortController':_0x8e223c[_0x192bfc(0x265)]};}[_0x3a6e57(0x243)](_0x3282e6,_0x5e70e8,_0x4f1e0f){const _0x23dcd7=_0x3a6e57,_0x1d1e6c=this[_0x23dcd7(0x247)](_0x23dcd7(0x248)+_0x3282e6+_0x23dcd7(0x232)+_0x5e70e8+_0x23dcd7(0x218),_0x23dcd7(0x1dd),{'positiveCount':_0x4f1e0f[_0x23dcd7(0x1e0)],'totalCount':_0x4f1e0f[_0x23dcd7(0x223)],'modificationId':_0x4f1e0f[_0x23dcd7(0x214)]});return{'execute':async()=>{const _0x4cad4b=_0x23dcd7;await _0x1d1e6c[_0x4cad4b(0x1f0)];},'abortController':_0x1d1e6c[_0x23dcd7(0x265)]};}[_0x3a6e57(0x1e5)](_0x46f45c,_0x6e28a2,_0x4cceda){const _0x4a38a5=_0x3a6e57,_0x38672e=this[_0x4a38a5(0x247)](_0x4a38a5(0x241)+_0x46f45c+_0x4a38a5(0x24f)+_0x6e28a2+_0x4a38a5(0x218),_0x4a38a5(0x1dd),{'positiveCount':_0x4cceda[_0x4a38a5(0x1e0)],'totalCount':_0x4cceda[_0x4a38a5(0x223)]});return{'execute':async()=>{const _0x5444a4=_0x4a38a5;await _0x38672e[_0x5444a4(0x1f0)];},'abortController':_0x38672e[_0x4a38a5(0x265)]};}[_0x3a6e57(0x1e4)](_0x22035a,_0x1d2ace){const _0x4b8033=_0x3a6e57,_0x813976=this[_0x4b8033(0x247)](_0x4b8033(0x245)+_0x22035a+_0x4b8033(0x218),_0x4b8033(0x1dd),{'positiveCount':_0x1d2ace[_0x4b8033(0x1e0)],'totalCount':_0x1d2ace[_0x4b8033(0x223)]});return{'execute':async()=>{const _0x3eaa29=_0x4b8033;await _0x813976[_0x3eaa29(0x1f0)];},'abortController':_0x813976[_0x4b8033(0x265)]};}[_0x3a6e57(0x1eb)](_0x14b13b,_0x1df089,_0x4b8044,_0xa84aa1){const _0x3cf59b=_0x3a6e57,_0x5495cd=this[_0x3cf59b(0x247)](_0x3cf59b(0x221)+_0x14b13b+_0x3cf59b(0x24f)+_0x1df089+_0x3cf59b(0x218),_0x3cf59b(0x1dd),{'positiveCount':_0x4b8044[_0x3cf59b(0x1e0)],'totalCount':_0x4b8044[_0x3cf59b(0x223)],'dataId':_0xa84aa1});return{'execute':async()=>{const _0x3fa4d6=_0x3cf59b;await _0x5495cd[_0x3fa4d6(0x1f0)];},'abortController':_0x5495cd[_0x3cf59b(0x265)]};}[_0x3a6e57(0x1fe)](_0x3105bc,_0x1e392a,_0x57d385){const _0x2bdc28=_0x3a6e57,_0x379fc8=this[_0x2bdc28(0x247)](_0x2bdc28(0x261)+_0x3105bc+_0x2bdc28(0x218),_0x2bdc28(0x1dd),{'positiveCount':_0x1e392a[_0x2bdc28(0x1e0)],'totalCount':_0x1e392a[_0x2bdc28(0x223)],'dataId':_0x57d385});return{'execute':async()=>{const _0x539f05=_0x2bdc28;await _0x379fc8[_0x539f05(0x1f0)];},'abortController':_0x379fc8[_0x2bdc28(0x265)]};}[_0x3a6e57(0x247)](_0x30096f,_0x2a1dec,_0x101571){const _0x432ff1=_0x3a6e57,_0x40c080=new AbortController(),_0x1356c9=_0x101571 instanceof FormData,_0x17185e={'Authorization':_0x432ff1(0x1fa)+this[_0x432ff1(0x23c)]?.[_0x432ff1(0x21a)]};_0x101571&&!_0x1356c9&&(_0x17185e[_0x432ff1(0x25c)]=_0x432ff1(0x1e3));const _0x331091={'method':_0x2a1dec,'headers':_0x17185e,'signal':_0x40c080[_0x432ff1(0x200)]};return _0x101571&&(_0x331091[_0x432ff1(0x1ef)]=_0x1356c9?_0x101571:JSON[_0x432ff1(0x23d)](_0x101571)),{'request':fetch(''+this[_0x432ff1(0x252)]+_0x30096f,_0x331091)[_0x432ff1(0x22e)](_0x475785=>{const _0x235e59=_0x432ff1;this[_0x235e59(0x25e)](_0x475785);})[_0x432ff1(0x238)](_0x1c7740=>_0x1c7740['ok']?_0x1c7740:_0x1c7740[_0x432ff1(0x205)]()[_0x432ff1(0x238)](_0x51bac8=>{const _0x4d209a=_0x432ff1;throw{'url':this[_0x4d209a(0x252)],'path':_0x30096f,'method':_0x2a1dec,'body':_0x101571,'status':(_0x1c7740||{})[_0x4d209a(0x21e)],'statusText':(_0x1c7740||{})[_0x4d209a(0x202)],'code':_0x51bac8[_0x4d209a(0x1ed)],'message':_0x51bac8[_0x4d209a(0x263)],'traceId':_0x51bac8[_0x4d209a(0x244)]};})),'abortController':_0x40c080};}async*[_0x3a6e57(0x20b)](_0x5c07a1){const _0x3194e5=_0x3a6e57,_0x9605b5=[],_0x2b6e6b=_0x5c07a1[_0x3194e5(0x1dc)](),_0x15b54e=_0x35f40b({'onError':_0x4f2498=>{const _0x538394=_0x3194e5;this[_0x538394(0x25e)](_0x4f2498);},'onEvent':_0x3478e5=>{const _0x43eb03=_0x3194e5;_0x3478e5[_0x43eb03(0x266)]=JSON[_0x43eb03(0x264)](_0x3478e5[_0x43eb03(0x266)]),_0x9605b5[_0x43eb03(0x258)](_0x3478e5);}});try{let _0x17b6de=!0x1;for(;!_0x17b6de;){const {done:_0xc5ca72,value:_0x42872f}=await _0x2b6e6b[_0x3194e5(0x1fb)]();_0xc5ca72&&(_0x17b6de=!0x0),_0x15b54e[_0x3194e5(0x25a)](this[_0x3194e5(0x22f)][_0x3194e5(0x1e7)](_0x42872f,{'stream':!0x0})),yield*_0x9605b5,_0x9605b5[_0x3194e5(0x231)]=0x0;}}catch(_0x4f6675){this[_0x3194e5(0x25e)](_0x4f6675);}finally{_0x2b6e6b[_0x3194e5(0x1df)](),_0x15b54e[_0x3194e5(0x24b)]();}}[_0x3a6e57(0x25e)](_0x3ab467){const _0x53f89b=_0x3a6e57;if(_0x3ab467 instanceof _0x43d357)throw _0x3ab467;if(_0x3ab467 instanceof Error&&_0x53f89b(0x255)===_0x3ab467[_0x53f89b(0x230)])throw new _0x43d357(_0x53f89b(0x1f8),this,{'originalError':_0x3ab467});throw new _0x43d357(_0x53f89b(0x24a),this,{'originalError':_0x3ab467});}}