UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines 4.22 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ function _0x4640(){const _0x3641a1=['127494dhtrfN','2238475vbGhWC','_queueEmpty','reject','4922870cZyypH','callback','40yQePjd','shift','resolve','1667498bLfCMX','_processQueue','queue','_abortController','12poXrOC','12515151DxKhvT','19951YiaVLe','6ZXwxDQ','fire','isProcessing','createTask','length','signal','8wRXMsH','242973sISCRc','push','once','abort','queueEmptyPromise','enqueue','completePromise'];_0x4640=function(){return _0x3641a1;};return _0x4640();}const _0x34148e=_0x3fb5;(function(_0x41f5b1,_0x319120){const _0x32d808=_0x3fb5,_0x43e780=_0x41f5b1();while(!![]){try{const _0x157cfa=parseInt(_0x32d808(0x199))/0x1*(-parseInt(_0x32d808(0x197))/0x2)+-parseInt(_0x32d808(0x1a1))/0x3*(parseInt(_0x32d808(0x190))/0x4)+parseInt(_0x32d808(0x18b))/0x5+parseInt(_0x32d808(0x19a))/0x6*(parseInt(_0x32d808(0x193))/0x7)+-parseInt(_0x32d808(0x1a0))/0x8*(-parseInt(_0x32d808(0x18a))/0x9)+-parseInt(_0x32d808(0x18e))/0xa+parseInt(_0x32d808(0x198))/0xb;if(_0x157cfa===_0x319120)break;else _0x43e780['push'](_0x43e780['shift']());}catch(_0x1608bc){_0x43e780['push'](_0x43e780['shift']());}}}(_0x4640,0x658a9));import{EmitterMixin as _0xb8738b}from'ckeditor5/src/utils.js';function _0x3fb5(_0x41f0be,_0x2bedb6){const _0x464003=_0x4640();return _0x3fb5=function(_0x3fb503,_0x161277){_0x3fb503=_0x3fb503-0x189;let _0x5ca309=_0x464003[_0x3fb503];return _0x5ca309;},_0x3fb5(_0x41f0be,_0x2bedb6);}export class PromiseQueue extends _0xb8738b(){[_0x34148e(0x195)]=[];[_0x34148e(0x19c)]=!0x1;[_0x34148e(0x196)];async[_0x34148e(0x1a6)](_0x5d6507){const _0x458ace=_0x34148e,_0x23414b=this[_0x458ace(0x19d)](_0x5d6507);return this[_0x458ace(0x195)][_0x458ace(0x1a2)](_0x23414b),this[_0x458ace(0x194)](),_0x23414b[_0x458ace(0x189)];}[_0x34148e(0x1a4)](){const _0x23163c=_0x34148e;this[_0x23163c(0x19c)]&&(this[_0x23163c(0x196)][_0x23163c(0x1a4)](),this[_0x23163c(0x196)]=void 0x0,this[_0x23163c(0x195)]=[],this[_0x23163c(0x19b)](_0x23163c(0x18c)),this[_0x23163c(0x19c)]=!0x1);}get[_0x34148e(0x1a5)](){const _0x1bb632=_0x34148e;return this[_0x1bb632(0x195)][_0x1bb632(0x19e)]||this[_0x1bb632(0x19c)]?new Promise(_0x3201d9=>{const _0x38a0b5=_0x1bb632;this[_0x38a0b5(0x1a3)](_0x38a0b5(0x18c),()=>{_0x3201d9();});}):Promise[_0x1bb632(0x192)]();}async[_0x34148e(0x194)](){const _0x1f1d04=_0x34148e;if(!this[_0x1f1d04(0x19c)]){this[_0x1f1d04(0x196)]=new AbortController(),this[_0x1f1d04(0x19c)]=!0x0;try{for(;this[_0x1f1d04(0x195)][_0x1f1d04(0x19e)]&&this[_0x1f1d04(0x19c)];){const _0x573793=this[_0x1f1d04(0x195)][_0x1f1d04(0x191)]();try{await _0x573793[_0x1f1d04(0x18f)](this[_0x1f1d04(0x196)][_0x1f1d04(0x19f)]),_0x573793[_0x1f1d04(0x192)]();}catch(_0xcdc3df){_0x573793[_0x1f1d04(0x18d)](_0xcdc3df);}}}finally{this[_0x1f1d04(0x19c)]=!0x1,this[_0x1f1d04(0x196)]=void 0x0;}this[_0x1f1d04(0x19b)](_0x1f1d04(0x18c));}}[_0x34148e(0x19d)](_0x3678b1){let _0x503a27,_0x4cf658;const _0x5aa598=new Promise((_0x4bf3eb,_0x2d6389)=>{_0x503a27=_0x4bf3eb,_0x4cf658=_0x2d6389;});return{'callback':_0x3678b1,'resolve':_0x503a27,'reject':_0x4cf658,'completePromise':_0x5aa598};}}