@ckeditor/ckeditor5-pagination 48.3.1-alpha.0 → 48.3.1-alpha.1

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x5a3c63}from'@ckeditor/ckeditor5-core';import{ButtonView as _0x2180a6,InputNumberView as _0x337753,View as _0x28b334}from'@ckeditor/ckeditor5-ui';import{Rect as _0x2df58b,ResizeObserver as _0xac6890,env as _0x2c65d5,first as _0x3c44ca,global as _0x507f06,keyCodes as _0x2b37f5,logWarning as _0x361bc4,toUnit as _0x54bc05,uid as _0x6acf92}from'@ckeditor/ckeditor5-utils';import{debounce as _0x4248e1}from'es-toolkit/compat';import{IconArrowDown as _0x1cdb9f,IconArrowUp as _0x3cd793}from'@ckeditor/ckeditor5-icons';var w=class extends _0x5a3c63{['_recalculatePageBreaksDebounced']=_0x4248e1(()=>this['_recalculatePageBreaks'](),0xc8);['_pagesContainer']=null;static get['pluginName'](){return'PaginationLookup';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){if(this['set']({'pageBreaks':[]}),!this['editor']['config']['get']('pagination'))return void _0x361bc4('pagination-config-not-found',this['editor']['config']);const _0x4a62f3=this['editor']['plugins']['get']('PaginationEditing');this['bind']('isEnabled')['to'](_0x4a62f3),this['editor']['ui']['once']('ready',()=>this['_onUiReady']()),this['on']('change:isEnabled',(_0x172dcb,_0x2d861a,_0x651413)=>{_0x651413&&this['_recalculatePageBreaksDebounced']();});}['afterInit'](){!async function(_0x44aae8){const _0x7c7fc2='I9sCmg3DJiG5LFMuQjwhT0XBYyxSqvdPO46NZAcVzb71RWkfe8oKptnrUEal2H',_0x5d2802=0x78fa8,_0x2e2b3d=window['Date']['now'](),_0x12bd4e=_0x44aae8['editor'],_0x1c33e3=new window['Promise'](_0x5be359=>{_0x12bd4e['once']('ready',_0x5be359);}),_0x23ed31={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x5baef3=_0x12bd4e['config']['get']('licenseKey');async function _0x3fa3c3(){let _0x52f79,_0xf45b67=null,_0x58e90b=null;try{return'GPL'==_0x5baef3?'NotAllowed':(_0x52f79=_0x388c9e(),_0x52f79?(_0x52f79['usageEndpoint']&&(_0x58e90b=_0x1f79fc(_0x52f79['usageEndpoint'],_0x52f79['jti'])),await _0x4b449f()?_0x1f79ae()?_0x4ccdf3()?'Expired':_0x152ca8()?('evaluation'==_0x52f79['licenseType']&&(_0xf45b67=_0x701326('EvaluationLimit')),await _0x597e09()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x4ccdf3(){const _0x45cfdb=['evaluation','trial']['includes'](_0x52f79['licenseType'])?_0x2e2b3d/0x3e8:0xe10*_0x5d2802;return _0x52f79['exp']<_0x45cfdb;}function _0x1f79ae(){const _0x34ec6e=_0x52f79['features'];return!!_0x34ec6e&&(!!_0x34ec6e['includes']('*')||!!_0x34ec6e['includes']('PAG'));}function _0x152ca8(){const _0x499cc8=_0x52f79['licensedHosts'];if(!_0x499cc8||0x0==_0x499cc8['length'])return!0x0;const {hostname:_0x605d0a}=new URL(window['location']['href']);if(_0x499cc8['includes'](_0x605d0a))return!0x0;const _0x46af87=_0x605d0a['split']('.');return _0x499cc8['filter'](_0x74fc52=>_0x74fc52['includes']('*'))['map'](_0x5d19ad=>_0x5d19ad['split']('.'))['filter'](_0x245a07=>_0x245a07['length']<=_0x46af87['length'])['map'](_0x566fd1=>Array(_0x46af87['length']-_0x566fd1['length'])['fill']('*'===_0x566fd1[0x0]?'*':'')['concat'](_0x566fd1))['some'](_0x101830=>_0x46af87['every']((_0x19896,_0x555163)=>_0x101830[_0x555163]===_0x19896||'*'===_0x101830[_0x555163]));}function _0x597e09(){return _0xf45b67&&_0x58e90b?new window['Promise']((_0x40fa65,_0x4bfa88)=>{_0xf45b67['then'](_0x40fa65,_0x4bfa88),_0x58e90b['then'](_0x1d2971=>{'Valid'!=_0x1d2971&&_0x40fa65(_0x1d2971);},_0x4bfa88);}):_0xf45b67||_0x58e90b||'Valid';}}function _0x1f79fc(_0x115c45,_0x2f874d){return new window['Promise'](_0x5b0520=>{if(_0x6d7ab2())return _0x5b0520('Valid');_0x4fb2a8(),_0x12bd4e['decorate']('_sendUsageRequest');let _0x4f9aba=!0x1;const _0x5aeede=_0x6acf92();function _0x4613fd(_0x46dbda){return!!_0x46dbda&&('object'==typeof _0x46dbda||'function'==typeof _0x46dbda)&&'function'==typeof _0x46dbda['then']&&'function'==typeof _0x46dbda['catch'];}function _0x56f96a(_0x3e8ea8){_0x747b1b(_0x3e8ea8)['then'](_0x5c4d0b=>_0x5c4d0b&&'ok'==_0x5c4d0b['status']?_0x48bc4c(_0x7a6f09(_0x5aeede+_0x2f874d))!=_0x5c4d0b['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x74f119=>(_0x5dc31e(),_0x74f119),()=>{const _0x4b8a42=_0x458de0();return null==_0x4b8a42?(_0x5dc31e(),'Valid'):_0x2e2b3d-_0x4b8a42>0x240c8400?'UsageLimit':'Valid';})['then'](_0x5b0520)['catch'](()=>{_0x5b0520('UsageLimit');});const _0x35c384=0x36ee80;function _0x5dc31e(){const _0x49edac='llct-'+_0x48bc4c(_0x7a6f09(_0x115c45)),_0x49aa99=_0x35468f(_0x48bc4c(window['Math']['ceil'](_0x2e2b3d/_0x35c384)));window['localStorage']['setItem'](_0x49edac,_0x49aa99);}function _0x458de0(){const _0x1293dc='llct-'+_0x48bc4c(_0x7a6f09(_0x115c45)),_0x42be34=window['localStorage']['getItem'](_0x1293dc);return _0x42be34?window['parseInt'](_0x35468f(_0x42be34),0x10)*_0x35c384:null;}function _0x747b1b(_0x36d614){return new window['Promise']((_0x2d78a2,_0x3e040c)=>{_0x36d614['then'](_0x2d78a2,_0x3e040c),window['setTimeout'](_0x3e040c,0x1d4c0);});}}_0x12bd4e['on']('_sendUsageRequest',(_0x196620,_0x1edc59)=>{if(_0x1edc59[0x0]!=_0x115c45)return _0x5b0520('UsageLimit');_0x1edc59[0x1]={..._0x1edc59[0x1],'requestId':_0x5aeede};},{'priority':'high'}),_0x12bd4e['on']('_sendUsageRequest',_0x481203=>{_0x4613fd(_0x481203['return'])&&(_0x4f9aba=!0x0,_0x56f96a(_0x481203['return']));},{'priority':'low'}),_0x1c33e3['then'](()=>{_0x4f9aba||_0x5b0520('UsageLimit');});});function _0x6d7ab2(){return'auto'==_0x12bd4e['editing']['view']['_overlayModeHint'];}function _0x4fb2a8(){_0x12bd4e['editing']['view']['_overlayModeHint']='auto';}}function _0x701326(_0x3010e5){const _0xbd4ad8=[new window['Promise'](_0x360bc6=>setTimeout(_0x360bc6,0x93ecc)),_0x1c33e3['then'](()=>new window['Promise'](_0x46031b=>{let _0x72c7f4=0x0;_0x12bd4e['model']['on']('applyOperation',(_0xaa5174,_0x96893d)=>{_0x96893d[0x0]['isDocumentOperation']&&_0x72c7f4++,0x5e8==_0x72c7f4&&(_0x46031b(),_0xaa5174['off']());});}))];return window['Promise']['race'](_0xbd4ad8)['then'](()=>_0x3010e5);}async function _0x2f919c(){await _0x1c33e3,_0x12bd4e['model']['change']=_0x21d3bc,_0x12bd4e['model']['enqueueChange']=_0x21d3bc,_0x12bd4e['enableReadOnlyMode']('model');}function _0x4ffcc1(_0x5c4c0d){const _0x18cbb6=_0x290755();_0x12bd4e[_0x18cbb6]='paginationLicenseKey'+_0x5c4c0d,'Valid'!=_0x5c4c0d&&_0x2f919c();}function _0x290755(){const _0x3ec611=window['String'](window['performance']['now']())['replace']('.','');let _0x453f0c='I';for(let _0x1e1232=0x0;_0x1e1232<_0x3ec611['length'];_0x1e1232+=0x2){let _0x51da99=window['parseInt'](_0x3ec611['substring'](_0x1e1232,_0x1e1232+0x2));_0x51da99>=0x3e&&(_0x51da99-=0x3e),_0x453f0c+=_0x7c7fc2[_0x51da99];}return _0x453f0c;}function _0x388c9e(){const _0x30dc92=_0x5baef3['split']('.');if(0x3!=_0x30dc92['length'])return null;return _0x5e6e2e(_0x30dc92[0x1]);function _0x5e6e2e(_0x3628c7){const _0x2526ba=_0x4e5612(_0x3628c7);return _0x2526ba&&_0xf60061()?_0x2526ba:null;function _0xf60061(){const _0x164103=_0x2526ba['jti'],_0x264f00=window['parseInt'](_0x164103['substring'](_0x164103['length']-0x8),0x10),_0xb1557d={..._0x2526ba,'jti':_0x164103['substring'](0x0,_0x164103['length']-0x8)};return delete _0xb1557d['vc'],_0x7a6f09(_0xb1557d)==_0x264f00;}}}async function _0x4b449f(){let _0x5a5a50=!0x0;try{const [_0x13288b,_0xd4a06e,_0x3f4290]=_0x5baef3['split']('.');return _0x586f05(_0x13288b),await _0x2fb62e(_0x13288b,_0xd4a06e,_0x3f4290),_0x5a5a50;}catch{return!0x1;}function _0x586f05(_0x394859){const _0x8220fc=_0x4e5612(_0x394859);_0x8220fc&&'ES256'==_0x8220fc['alg']||(_0x5a5a50=!0x1);}async function _0x2fb62e(_0x366b1f,_0x356b62,_0x5e6407){const _0x56ba7c=window['Uint8Array']['from'](_0x1794ec(_0x5e6407),_0x2ffcd7=>_0x2ffcd7['charCodeAt'](0x0)),_0xc86e55=new window['TextEncoder']()['encode'](_0x366b1f+'.'+_0x356b62),_0x404cda=window['crypto']['subtle'];if(!_0x404cda)return;const _0x3385ee=await _0x404cda['importKey']('jwk',_0x23ed31,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x404cda['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3385ee,_0x56ba7c,_0xc86e55)||(_0x5a5a50=!0x1);}}function _0x4e5612(_0x57629f){return _0x57629f['startsWith']('ey')?JSON['parse'](_0x1794ec(_0x57629f)):null;}function _0x1794ec(_0x5839a3){return window['atob'](_0x5839a3['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x7a6f09(_0x3a4d52){let _0x7c2228=0x1505;function _0x1f41cf(_0x7a10ab){for(let _0x12567e=0x0;_0x12567e<_0x7a10ab['length'];_0x12567e++){const _0x20a1b7=_0x7a10ab['charCodeAt'](_0x12567e);_0x7c2228=(_0x7c2228<<0x5)+_0x7c2228+_0x20a1b7,_0x7c2228&=_0x7c2228;}}function _0x57742c(_0x56358f){Array['isArray'](_0x56358f)?_0x56358f['forEach'](_0x57742c):_0x56358f&&'object'==typeof _0x56358f?Object['entries'](_0x56358f)['sort']()['forEach'](([_0x96417a,_0x24ab40])=>{_0x1f41cf(_0x96417a),_0x57742c(_0x24ab40);}):_0x1f41cf(window['String'](_0x56358f));}return _0x57742c(_0x3a4d52),_0x7c2228>>>0x0;}function _0x48bc4c(_0x5cf8d8){return _0x5cf8d8['toString'](0x10)['padStart'](0x8,'0');}function _0x35468f(_0x22341c){return _0x22341c['split']('')['reverse']()['join']('');}function _0x21d3bc(){}_0x4ffcc1(await _0x3fa3c3());}(this);}['destroy'](){super['destroy'](),this['_recalculatePageBreaksDebounced']['cancel'](),this['_pagesContainer']&&(this['_pagesContainer']['destroy'](),this['_pagesContainer']['element']['remove']());}['_onUiReady'](){const _0x7e5cb3=this['editor'],_0xc1a886=_0x7e5cb3['editing']['view'],_0x3a3ae1=this['_getAttachedDomRoot']();if(!_0x3a3ae1||!_0x3a3ae1['hasChildNodes']())return void _0x7e5cb3['ui']['once']('update',()=>this['_onUiReady']());const {pageWidth:_0x53ffb2,pageHeight:_0x3e7209}=_0x7e5cb3['config']['get']('pagination'),{top:_0x4d0a8d,left:_0xe21a5,bottom:_0x4c4b0b,right:_0x356749}=this['_configuredPaddings'];this['_pagesContainer']=new _0x28b334(_0x7e5cb3['locale']);const _0x2e2465=this['_pagesContainer'];_0x2e2465['set']('class',''),_0x2e2465['setTemplate']({'tag':'div','attributes':{'style':{'columnWidth':_0x53ffb2,'width':_0x53ffb2,'height':'calc(\x20'+_0x3e7209+'\x20-\x20'+_0x4d0a8d+'\x20-\x20'+_0x4c4b0b+'\x20+\x200.5mm\x20)','minWidth':'auto','minHeight':'auto','padding':'0\x20'+_0x356749+'\x200\x20'+_0xe21a5,'columnGap':'calc('+_0xe21a5+'\x20+\x20'+_0x356749+'\x20+\x20100px)','border':0x0,'boxSizing':'border-box','columnCount':'auto','columnFill':'auto','overflow':'hidden','position':'absolute','top':'-99999px','left':'-99999px'},'class':_0x2e2465['bindTemplate']['to']('class')}}),_0x2e2465['render'](),_0x3a3ae1['parentNode']['insertBefore'](_0x2e2465['element'],_0x3a3ae1['nextSibling']),this['listenTo'](_0xc1a886,'render',()=>this['_recalculatePageBreaksDebounced'](),{'priority':'low'}),this['_recalculatePageBreaksDebounced']();}['_getAttachedDomRoot'](){for(const _0x79d277 of this['editor']['editing']['view']['domRoots']['values']())if(_0x79d277['ownerDocument']['body']['contains'](_0x79d277))return _0x79d277;return null;}['_recalculatePageBreaks'](){if(!this['isEnabled'])return Promise['resolve']();const _0x532188=this['editor']['editing']['view'],_0x5e56cd=this['_pagesContainer'],_0xff8e41=this['_getAttachedDomRoot']();if(!_0xff8e41||!_0x5e56cd)return Promise['resolve']();for(_0x5e56cd['class']=['ck-reset','ck-pagination-view',..._0xff8e41['classList']]['join']('\x20');_0x5e56cd['element']['firstChild'];)_0x5e56cd['element']['firstChild']['remove']();const _0x313298=Array['from'](_0x532188['domRoots']);_0x313298['sort'](([,_0x3ccf2d],[,_0x493a45])=>_0x3ccf2d['compareDocumentPosition'](_0x493a45)==Node['DOCUMENT_POSITION_PRECEDING']?0x1:-0x1);for(const [_0x3fe9b7,_0x21c143]of _0x313298){const _0x2189c8=_0x21c143['cloneNode'](!0x0);'attributeStyleMap'in _0x2189c8&&_0x2189c8['attributeStyleMap']['clear'](),_0x2189c8['dataset']['rootName']=_0x3fe9b7,_0x2189c8['className']='ck-content\x20ck-pagination_enabled',_0x2189c8['removeAttribute']('id'),_0x2189c8['tabIndex']=-0x1,_0x5e56cd['element']['append'](_0x2189c8);}const _0x2593d0=Array['from'](_0x5e56cd['element']['querySelectorAll']('img'));return function(_0x2cc308){return Promise['all'](_0x2cc308['map'](_0x2886aa=>Promise['race']([k(_0x2886aa),v(0x3e8)])));}(_0x2593d0)['then'](()=>{for(const _0x4f9e53 of _0x2593d0['filter'](_0x55ce99=>!_0x55ce99['closest']('table')))if(_0x4f9e53['offsetParent']){const _0x518222=_0x507f06['window']['getComputedStyle'](_0x4f9e53),_0x4814c0=_0x507f06['document']['createElement']('span');for(const _0x5ba19f of _0x518222)_0x4814c0['style']['setProperty'](_0x5ba19f,_0x518222[_0x5ba19f]);_0x4814c0['style']['backgroundImage']='url(\x20'+_0x4f9e53['src']+'\x20)',_0x4814c0['style']['breakInside']='avoid','PICTURE'==_0x4f9e53['parentElement']?.['tagName']?_0x4f9e53['parentElement']['replaceWith'](_0x4814c0):_0x4f9e53['replaceWith'](_0x4814c0);}return new Promise(_0x41b81d=>_0x507f06['window']['requestAnimationFrame'](()=>_0x41b81d()));})['then'](()=>{this['_updatePageBreaksData']();});}['_updatePageBreaksData'](){const _0x4852d5=this['_pagesContainer']['element'];if(!_0x4852d5['ownerDocument']['body']['contains'](_0x4852d5))return;const _0xa9a18f=new _0x2df58b(_0x4852d5)['excludeScrollbarsAndBorders'](),_0x1981d8=Math['floor'](_0xa9a18f['width']+0x64),_0x583210=_(_0x4852d5,Math['floor'](_0xa9a18f['left']-_0x4852d5['scrollLeft']),_0x1981d8,_0xa9a18f['height'])['map'](_0x429c88=>this['_mapPageStarterInfoToPageBreakInfo'](_0x429c88))['filter'](_0x19ac70=>!0x1!==_0x19ac70);_0x583210['every'](_0x87be7d=>!!_0x87be7d)&&(this['pageBreaks']=_0x583210);}['_mapPageStarterInfoToPageBreakInfo'](_0x43387a){const _0x2e1ebf=this['editor']['editing']['view'],_0x1d716d=this['editor']['editing']['mapper'],_0x42ae56=_0x2e1ebf['domConverter'],_0x404ff6=_0x43387a['path']['shift'](),_0x581812=this['_pagesContainer']['element']['childNodes'][_0x404ff6]['dataset']['rootName'],_0x4d13d0=_0x2e1ebf['getDomRoot'](_0x581812);if(!_0x4d13d0)return null;const _0x49a15c=function(_0x2eb871,_0x2e313e){let _0x40bac8=_0x2eb871;for(const _0xe07820 of _0x2e313e['path']){if(!_0x40bac8)return null;_0x40bac8=_0x40bac8['childNodes'][_0xe07820];}return _0x40bac8;}(_0x4d13d0,_0x43387a);if(!_0x49a15c)return null;const _0x464a57=_0x42ae56['domPositionToView'](_0x49a15c,_0x43387a['textOffset']||0x0);return _0x464a57?'manual'==_0x43387a['type']?this['_mapManualPageStarterInfoToPageBreakInfo'](_0x464a57,_0x49a15c):'text'==_0x43387a['type']&&_0x1d716d['toModelPosition'](_0x464a57)['offset']?this['_mapTextPageStarterInfoToPageBreakInfo'](_0x464a57,_0x49a15c,_0x43387a['textOffset']):this['_mapElementPageStarterInfoToPageBreakInfo'](_0x464a57,_0x49a15c,_0x43387a['offset']):null;}['_mapManualPageStarterInfoToPageBreakInfo'](_0x3f9490,_0xa87246){const _0x5239db=this['editor']['model'],_0x559c70=this['editor']['editing']['mapper']['toModelElement'](_0x3f9490['parent']);return new P({'type':'manual','modelRange':_0x5239db['createRangeOn'](_0x559c70),'domNode':_0xa87246,'offset':0x0});}['_mapTextPageStarterInfoToPageBreakInfo'](_0x46311d,_0x1a6668,_0x590a74){const _0x1b5fe0=this['editor']['model'],_0x3a2988=this['editor']['editing']['mapper'],_0x33a2bc=this['editor']['editing']['view']['domConverter'];if(_0x590a74>=_0x1a6668['length'])return null;const _0x3293eb=_0x3a2988['toModelPosition'](_0x46311d),_0x20034c=_0x1b5fe0['createRange'](_0x3293eb),_0x320e1e=_0x3a2988['findMappedViewAncestor'](_0x46311d);return new P({'type':'text','modelRange':_0x20034c,'domNode':_0x1a6668,'offset':y(_0x1a6668,_0x590a74,_0x33a2bc['mapViewToDom'](_0x320e1e))});}['_mapElementPageStarterInfoToPageBreakInfo'](_0x94f073,_0x2c9786,_0x1f229d){const _0x1195e3=this['editor']['model'],_0x44a413=this['editor']['editing'],_0x3dd39e=_0x44a413['mapper'],_0x53dcf7=_0x44a413['view']['domConverter'],_0x5c4369=_0x3dd39e['findMappedViewAncestor'](_0x94f073),_0x5004dd=_0x3dd39e['toModelElement'](_0x5c4369);if(!_0x5004dd||_0x5004dd['is']('rootElement'))return!0x1;const _0x1a6c70=function(_0x15b3b0){const _0x5d46bf=_0x15b3b0['parent'],_0x69d7c9=_0x5d46bf['root']['document']['model'],_0x4c7c2c=_0x5d46bf['getAncestors']({'parentFirst':!0x0,'includeSelf':!0x0});let _0xe0e260=null;for(const _0x25fb38 of _0x4c7c2c){if(_0x25fb38['is']('rootElement'))return _0xe0e260;if(!_0x69d7c9['createPositionBefore'](_0x25fb38)['isTouching'](_0x15b3b0))return _0xe0e260;_0xe0e260=_0x25fb38;}}(_0x1195e3['createPositionBefore'](_0x5004dd))||_0x5004dd;let _0x42d4c4=_0x3dd39e['toViewElement'](_0x1a6c70),_0xf722f0=_0x1195e3['createRangeOn'](_0x1a6c70);const _0x5238a8=_0x1195e3['createPositionBefore'](_0x1a6c70)['nodeBefore'];if(_0x5238a8&&_0x5238a8['is']('element','imageBlock')){const _0x3b37fb=_0x3dd39e['toViewElement'](_0x5238a8),_0x45fb11=_0x53dcf7['mapViewToDom'](_0x3b37fb),_0x13d634=_0x507f06['window']['getComputedStyle'](_0x45fb11)['float'];'left'!=_0x13d634&&'right'!=_0x13d634||(_0xf722f0=_0x1195e3['createRangeOn'](_0x5238a8));}for(;_0x42d4c4['parent']!==_0x42d4c4['root']&&0x0===_0x42d4c4['index'];)_0x42d4c4=_0x42d4c4['parent'];const _0x80880=new _0x2df58b(K(_0x2c9786)?_0x2c9786:L(_0x2c9786)),_0x1025fe=_0x1f229d?_0x80880['height']-_0x1f229d:0x0,_0x1b0f0c=_0x53dcf7['mapViewToDom'](_0x42d4c4),_0x5ae3a0=new _0x2df58b(_0x1b0f0c);return new P({'type':'element','modelRange':_0xf722f0,'domNode':_0x1b0f0c,'offset':Math['round'](_0x1025fe)||_0x5c4369!=b(_0x94f073)?_0x1025fe+_0x80880['top']-_0x5ae3a0['top']:0x0});}get['_configuredPaddings'](){const _0x22c6c0=this['editor']['config']['get']('pagination.pageMargins');return Object['assign']({'top':'10mm','bottom':'10mm','left':'10mm','right':'10mm'},_0x22c6c0);}static['_findPageStarterInfos'](_0x21c6e9,_0x1ca62c,_0x5bf399,_0xd24467,_0x25ffe2){return _(_0x21c6e9,_0x1ca62c,_0x5bf399,_0xd24467,_0x25ffe2);}},P=class{['type'];['modelRange'];['_domNode'];['_offset'];constructor({type:_0x3fe2eb,modelRange:_0x3f792d,domNode:_0x2be88b,offset:_0x49e74a}){this['type']=_0x3fe2eb,this['modelRange']=_0x3f792d,this['_domNode']=_0x2be88b,this['_offset']=_0x49e74a;}get['offset'](){if(!this['_domNode']['ownerDocument']['body']['contains'](this['_domNode']))return 0x0;const _0x398e67=new _0x2df58b(K(this['_domNode'])?this['_domNode']:L(this['_domNode']));return'manual'==this['type']?_0x398e67['top']+_0x398e67['height']/0x2:_0x398e67['top']+this['_offset'];}};function y(_0x35e9b8,_0x2f71c9,_0x5e4da2){const _0x569f0d=L(_0x35e9b8),_0x1510a9=function(_0x54968c){const _0x493b06=_0x507f06['document']['createRange']();return _0x493b06['selectNodeContents'](_0x54968c),_0x493b06;}(_0x5e4da2);let _0xaaa43a;_0xaaa43a=0x0==_0x2f71c9?N(_0x1510a9['startContainer'],_0x1510a9['startOffset'],_0x35e9b8['parentNode'],Array['from'](_0x35e9b8['parentNode']['childNodes'])['indexOf'](_0x35e9b8)):N(_0x1510a9['startContainer'],_0x1510a9['startOffset'],_0x35e9b8,_0x2f71c9);const _0x4c7393=N(_0x35e9b8,_0x2f71c9,_0x1510a9['endContainer'],_0x1510a9['endOffset']),_0x1b9d00=new _0x2df58b(_0xaaa43a)['bottom'];return(new _0x2df58b(_0x4c7393)['top']+_0x1b9d00)/0x2-new _0x2df58b(_0x569f0d)['top'];}function b(_0x5719c0){let _0x180360=_0x5719c0['parent'];for(;_0x180360['is']('$text')||_0x180360['is']('attributeElement');)_0x180360=_0x180360['parent'];return _0x180360;}function k(_0x1610a4){return _0x1610a4['hasAttribute']('width')&&_0x1610a4['hasAttribute']('height')?Promise['resolve']():new Promise(_0x5cd2d8=>{function _0x11971f(){_0x1610a4['removeEventListener']('load',_0x11971f),_0x1610a4['removeEventListener']('error',_0x11971f),_0x5cd2d8();}_0x1610a4['complete']?_0x5cd2d8():(_0x1610a4['addEventListener']('load',_0x11971f),_0x1610a4['addEventListener']('error',_0x11971f));});}function v(_0x1a8777){return new Promise(_0x5b4ad0=>setTimeout(_0x5b4ad0,_0x1a8777));}function L(_0x4268f5){const _0x5257f7=_0x507f06['document']['createRange']();return _0x5257f7['selectNode'](_0x4268f5),_0x5257f7;}function x(_0x45b1cc,_0x1f4e2a,_0x8a5bd8){const _0x264abd=_0x507f06['document']['createRange']();return _0x264abd['setStart'](_0x45b1cc,_0x1f4e2a),_0x264abd['setEnd'](_0x45b1cc,_0x8a5bd8),_0x264abd;}function N(_0x154ebb,_0x1f04cf,_0xbb335,_0x501e09){const _0x4e8995=_0x507f06['document']['createRange']();return _0x4e8995['setStart'](_0x154ebb,_0x1f04cf),_0x4e8995['setEnd'](_0xbb335,_0x501e09),_0x4e8995;}function _(_0x344a98,_0x424161,_0x271837,_0x27a04d,_0x4eb935){const _0x55ddd5=[];for(const [_0x6a0ed8,_0x4f16c3]of _0x344a98['childNodes']['entries']()){let _0x505f6d=[];K(_0x4f16c3)&&_0x4f16c3['offsetParent']&&['static','relative']['includes'](_0x507f06['window']['getComputedStyle'](_0x4f16c3)['position'])?_0x505f6d=E(_0x4f16c3,_0x6a0ed8,_0x424161,_0x271837,_0x27a04d,_0x4eb935):O(_0x4f16c3)&&(_0x505f6d=S(_0x4f16c3,_0x6a0ed8,_0x424161,_0x271837,_0x4eb935)),_0x505f6d['length']&&(_0x55ddd5['push'](..._0x505f6d),_0x424161+=_0x505f6d['length']*_0x271837,_0x4eb935=!0x1);}return _0x55ddd5;}function E(_0xd3781f,_0x7b98c7,_0x369b41,_0x3d66e2,_0x52e63e,_0x5f021c){const _0x14f793=[];var _0x44688b;if((_0x44688b=_0xd3781f['previousSibling'])&&K(_0x44688b)&&Boolean(_0x44688b['classList']['contains']('page-break')||_0x44688b['closest']('.page-break'))&&(_0x14f793['push']({'type':'manual','offset':0x0,'path':[_0x7b98c7-0x1]}),_0x5f021c=!0x0),'table-row'==_0x507f06['window']['getComputedStyle'](_0xd3781f)['display']){let _0x499b19=0x0,_0x3100be=!0x1;for(const _0x32fe5a of _0xd3781f['getClientRects']())_0x499b19+=_0x32fe5a['height'],_0x32fe5a['left']>=_0x369b41&&(_0x3100be=!0x0);if(_0x499b19<_0x52e63e&&_0x3100be)return _0x5f021c||_0x14f793['push']({'type':'element','offset':0x0,'path':[_0x7b98c7]}),_0x14f793;}const _0x3d6e88=_0xd3781f['closest']('figure.image');if(_0x3d6e88&&function(_0x374dca){let _0x4846bc=!0x1;const _0x1a91be=_0x374dca['parentElement']['dataset']['rootName'],_0x29b64a=_0x374dca['nextElementSibling'],_0x13ca20=_0x374dca['previousElementSibling'],_0x3e76ac=_0x29b64a&&_0x507f06['window']['getComputedStyle'](_0x29b64a)['float'],_0x249cb8=_0x29b64a&&'ck-fake-selection-container'===_0x29b64a['className'];return!_0x1a91be||_0x29b64a||_0x13ca20||(_0x4846bc=!0x0),_0x1a91be&&!_0x13ca20&&_0x249cb8&&(_0x4846bc=!0x0),_0x1a91be&&!_0x13ca20&&'none'!==_0x3e76ac&&(_0x4846bc=!0x0),!_0x4846bc;}(_0x3d6e88)){const _0x4a4233=_0x507f06['window']['getComputedStyle'](_0x3d6e88)['float'];if('left'==_0x4a4233||'right'==_0x4a4233)return _0x14f793;}const _0x3914b2=_(_0xd3781f,_0x369b41,_0x3d66e2,_0x52e63e,_0x5f021c);if(_0x3914b2['length']){for(const _0x4b87e5 of _0x3914b2)_0x14f793['push']({'type':_0x4b87e5['type'],'offset':_0x4b87e5['offset'],'textOffset':_0x4b87e5['textOffset'],'path':[_0x7b98c7,..._0x4b87e5['path']]}),_0x369b41+=_0x3d66e2,_0x5f021c=!0x1;return _0x14f793;}return _0x14f793['push'](...function(_0x5c4ed5,_0x1dd90d,_0x56a4a1,_0x2c2cf1,_0x9da8cc){const _0x1350a5=[];if('table-cell'==_0x507f06['window']['getComputedStyle'](_0x5c4ed5)['display'])return[];const _0x7c1bb3=[];for(const _0x3dd5cd of _0x5c4ed5['getClientRects']())if(_0x3dd5cd['left']>=_0x56a4a1){for(const _0x33388e of _0x7c1bb3)_0x33388e['height']+=_0x3dd5cd['height'];_0x7c1bb3['push']({'height':_0x3dd5cd['height']}),_0x56a4a1+=_0x2c2cf1;}for(const _0x261369 of _0x7c1bb3)_0x9da8cc||_0x1350a5['push']({'type':'element','offset':_0x261369['height'],'textOffset':0x0,'path':[_0x1dd90d]}),_0x9da8cc=!0x1;return _0x1350a5;}(_0xd3781f,_0x7b98c7,_0x369b41,_0x3d66e2,_0x5f021c)),_0x14f793;}function S(_0x39fd89,_0x352090,_0x28aad0,_0x8f1850,_0x27f681){const _0x29c4f2=L(_0x39fd89),_0x3dacf9=[];let _0x524055=0x0;for(const _0x57bb30 of _0x29c4f2['getClientRects']())if(_0x57bb30['left']>=_0x28aad0){const _0x377796=R(_0x39fd89,_0x524055,_0x28aad0,_0x8f1850);_0x27f681||_0x3dacf9['push']({'type':'text','path':[_0x352090],'textOffset':_0x377796}),_0x524055=_0x377796,_0x28aad0+=_0x8f1850,_0x27f681=!0x1;}return _0x3dacf9;}function R(_0x5da727,_0xd96009,_0x3b8c6d,_0x360509){let _0x18de31=_0xd96009,_0x51b366=_0x5da727['length'];for(;_0x51b366-_0x18de31>0x1;){const _0x29896f=Math['ceil']((_0x18de31+_0x51b366)/0x2);I(x(_0x5da727,_0x18de31,_0x29896f),_0x3b8c6d,_0x360509)?_0x51b366=_0x29896f:_0x18de31=_0x29896f;}return _0x18de31;}function I(_0x4ab615,_0x29dc3b,_0x774307){for(const _0x3f0fd4 of _0x4ab615['getClientRects']())if(_0x3f0fd4['left']>=_0x29dc3b&&_0x3f0fd4['left']<_0x29dc3b+_0x774307)return!0x0;return!0x1;}function K(_0x32addf){return _0x32addf['nodeType']==Node['ELEMENT_NODE'];}function O(_0x578b5f){return _0x578b5f['nodeType']==Node['TEXT_NODE'];}const A=/* #__PURE__ -- @preserve */
24
- _0x54bc05('px');var U=class extends _0x28b334{constructor(){super();const _0x447151=this['bindTemplate'];this['set']({'isVisible':!0x1,'left':null,'top':null,'width':null,'pageNumber':null}),this['setTemplate']({'tag':'div','attributes':{'data-page-number':_0x447151['to']('pageNumber'),'class':['ck','ck-pagination-view-line',_0x447151['if']('isVisible','ck-hidden',_0x702e86=>!_0x702e86)],'style':{'left':_0x447151['to']('left',_0x1de136=>A(_0x1de136)),'top':_0x447151['to']('top',_0x45f4fd=>A(_0x45f4fd)),'width':_0x447151['to']('width',_0xbe43ff=>A(_0xbe43ff))}}});}},C=class{['_viewCollection'];['_visibleLines']=new Set();['_hiddenLines']=new Set();constructor(_0x53dc8f){this['_viewCollection']=_0x53dc8f['ui']['view']['body'];}['destroy'](){for(const _0x558f81 of this['_hiddenLines'])_0x558f81['destroy']();}['cleanLines'](){for(const _0x583f52 of this['_visibleLines'])_0x583f52['isVisible']=!0x1,this['_hiddenLines']['add'](_0x583f52);this['_visibleLines']['clear']();}['showLine'](_0x1f9e31,_0x4f5a8c,_0x220c4f,_0x759ae4){let _0x3bf299;this['_hiddenLines']['size']?(_0x3bf299=_0x3c44ca(this['_hiddenLines']['values']()),this['_hiddenLines']['delete'](_0x3bf299)):_0x3bf299=new U(),_0x3bf299['set']({'pageNumber':_0x759ae4,'left':_0x1f9e31,'top':_0x4f5a8c,'width':_0x220c4f}),_0x3bf299['isVisible']=!0x0,this['_viewCollection']['has'](_0x3bf299)||this['_viewCollection']['add'](_0x3bf299),this['_visibleLines']['add'](_0x3bf299);}['setViewCollection'](_0x187594){for(const _0x2af777 of[...this['_visibleLines'],...this['_hiddenLines']])this['_viewCollection']['has'](_0x2af777)&&this['_viewCollection']['remove'](_0x2af777);this['_viewCollection']=_0x187594;}};const D='ck-pagination_enabled';var B=class extends _0x5a3c63{['linesRepository'];['_scrollableEditingRootDomAncestor']=null;['_resizeObserver']=null;['_paginationLookupPlugin'];static get['pluginName'](){return'PaginationRenderer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['set']({'pageNumber':0x1}),this['linesRepository']=new C(this['editor']),this['_scrollableEditingRootDomAncestor']=null,this['_resizeObserver']=null,this['_paginationLookupPlugin']=this['editor']['plugins']['get']('PaginationLookup'),this['bind']('isEnabled')['to'](this['editor']['plugins']['get']('PaginationEditing')),this['editor']['ui']['once']('ready',()=>this['_onUiReady']()),this['_toggleEditingRootsClass'](D),this['on']('change:isEnabled',(_0x4c5c0b,_0x3b1701,_0x44641c)=>{_0x44641c||this['linesRepository']['cleanLines'](),this['_toggleEditingRootsClass'](D,_0x44641c);});}['destroy'](){this['_toggleEditingRootsClass'](D,!0x1),this['linesRepository']['destroy'](),this['_scrollableEditingRootDomAncestor']=null,this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['scrollToPage'](_0x3eb951){if(!this['isEnabled'])return;const _0x12cde3=_0x3eb951>0x1?this['_getPageBreakLineOffset'](_0x3eb951-0x1):0x0;this['_scrollableEditingRootDomAncestor']['scrollTo']({'top':_0x12cde3-0xa,'left':this['_scrollableEditingRootDomAncestor']['scrollLeft'],'behavior':_0x2c65d5['isMotionReduced']?'instant':'smooth'});}['setupScrollableAncestor'](){const _0x22ad1a=this['editor'],_0x4366b0=this['_getAttachedDomRoot']();_0x4366b0?(this['_scrollableEditingRootDomAncestor']&&_0x22ad1a['ui']['view']['stopListening'](this['_scrollableEditingRootDomAncestor'],'scroll'),this['_scrollableEditingRootDomAncestor']=function(_0x108172){let _0x4639c4=_0x108172;do{_0x4639c4=_0x4639c4['parentElement'];const _0x165077=_0x507f06['window']['getComputedStyle'](_0x4639c4)['overflowY'];if('auto'==_0x165077||'scroll'==_0x165077)break;}while('BODY'!=_0x4639c4['tagName']);return _0x4639c4;}(_0x4366b0),_0x22ad1a['ui']['view']['listenTo'](this['_scrollableEditingRootDomAncestor'],'scroll',()=>{this['_updatePageBreakLines']();},{'usePassive':!0x0}),this['_resizeObserver']&&this['_resizeObserver']['destroy'](),this['_resizeObserver']=new _0xac6890(this['_scrollableEditingRootDomAncestor'],()=>{this['_updatePageBreakLines']();})):_0x22ad1a['ui']['once']('update',()=>this['setupScrollableAncestor']());}['_onUiReady'](){const _0x203e9b=this['editor'];this['_getAttachedDomRoot']()?(this['setupScrollableAncestor'](),_0x203e9b['ui']['view']['listenTo'](_0x507f06['window'],'resize',()=>this['_updatePageBreakLines']()),this['listenTo'](this['_paginationLookupPlugin'],'change:pageBreaks',()=>this['_updatePageBreakLines']())):_0x203e9b['ui']['once']('update',()=>this['_onUiReady']());}['_getAttachedDomRoot'](){for(const _0xb4899e of this['editor']['editing']['view']['domRoots']['values']())if(_0xb4899e['ownerDocument']['body']['contains'](_0xb4899e))return _0xb4899e;return null;}['_updatePageBreakLines'](){if(!this['isEnabled'])return;const _0x37a310=this['_getAttachedDomRoot'](),_0x3966b9=this['_paginationLookupPlugin']['pageBreaks'];if(this['linesRepository']['cleanLines'](),!_0x37a310||0x1==_0x3966b9['length'])return void(this['pageNumber']=0x1);const _0x3d63ab=new _0x2df58b(_0x37a310)['excludeScrollbarsAndBorders'](),_0x26b23d=new _0x2df58b(this['_scrollableEditingRootDomAncestor'])['excludeScrollbarsAndBorders'](),_0xada948=_0x26b23d['top']+_0x26b23d['height']/0x3;let _0x151498=!0x1;const _0x230050=[];for(let _0x520166=0x1;_0x520166<_0x3966b9['length'];_0x520166++){const _0x59ee89=this['_getPageBreakLineOffset'](_0x520166,_0x26b23d);if(!_0x59ee89)continue;const _0x28ee31=_0x26b23d['top']+_0x59ee89-this['_scrollableEditingRootDomAncestor']['scrollTop'];_0x230050['push']({'pageOffsetTop':_0x28ee31,'domRootRect':_0x3d63ab,'domScrollableRect':_0x26b23d,'pageNumber':_0x520166}),_0x28ee31>_0xada948&&!_0x151498&&(this['pageNumber']=_0x520166,_0x151498=!0x0);}this['_renderPageBreakLines'](_0x230050),_0x151498||(this['pageNumber']=_0x3966b9['length']);}['_renderPageBreakLines'](_0x25fb6a){const {scrollX:_0x31a350,scrollY:_0xa0c04e}=_0x507f06['window'];if(_0x25fb6a['length']){for(const {domScrollableRect:_0x1a4bb0,pageOffsetTop:_0x4a0bb5,domRootRect:_0x49a5b5,pageNumber:_0x2a1163}of _0x25fb6a)_0x1a4bb0['top']<_0x4a0bb5&&_0x4a0bb5<_0x1a4bb0['bottom']&&this['linesRepository']['showLine'](_0x49a5b5['left']+_0x31a350,_0x4a0bb5+_0xa0c04e,_0x49a5b5['width'],_0x2a1163+0x1);}}['_getPageBreakLineOffset'](_0x4bc3dc,_0x2e7d70=null){const _0x2be2f2=this['_paginationLookupPlugin']['pageBreaks'][_0x4bc3dc]['offset'];return _0x2be2f2?(_0x2e7d70||(_0x2e7d70=new _0x2df58b(this['_scrollableEditingRootDomAncestor'])['excludeScrollbarsAndBorders']()),_0x2be2f2-_0x2e7d70['top']+this['_scrollableEditingRootDomAncestor']['scrollTop']):0x0;}['_toggleEditingRootsClass'](_0x2206a6,_0x1b6a82=!0x0){const _0x5f1995=this['editor']['editing']['view'];_0x5f1995['change'](_0x2fa732=>{for(const _0x3458ec of _0x5f1995['document']['roots'])_0x1b6a82?_0x2fa732['addClass'](_0x2206a6,_0x3458ec):_0x2fa732['removeClass'](_0x2206a6,_0x3458ec);});}};function T(_0x188176,_0x31b0cf,..._0xff732c){const t=_0x188176['t'];switch(_0x31b0cf){case'Go\x20to\x20next\x20page':return t('Go\x20to\x20next\x20page');case'Go\x20to\x20previous\x20page':return t('Go\x20to\x20previous\x20page');case'Current\x20page\x20number\x20(from\x201\x20to\x20%0)':return t('Current\x20page\x20number\x20(from\x201\x20to\x20%0)',..._0xff732c);case'Keystrokes\x20for\x20navigating\x20through\x20documents':return t('Keystrokes\x20for\x20navigating\x20through\x20documents');case'Go\x20to\x20the\x20previous\x20page\x20(also\x20move\x20selection)':return t('Go\x20to\x20the\x20previous\x20page\x20(also\x20move\x20selection)');case'Go\x20to\x20the\x20next\x20page\x20(also\x20move\x20selection)':return t('Go\x20to\x20the\x20next\x20page\x20(also\x20move\x20selection)');default:return _0x31b0cf;}}var G=class extends _0x5a3c63{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'PaginationEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[w,B];}['init'](){this['set']({'pageNumber':0x1,'totalPages':0x1});const _0x3c33ea=this['editor']['plugins']['get']('Pagination'),_0x2acdec=this['editor']['plugins']['get'](w),_0x1e9586=this['editor']['plugins']['get'](B);this['bind']('isEnabled')['to'](_0x3c33ea),this['_setUpDataDowncastConversion'](),this['bind']('pageNumber')['to'](_0x1e9586),this['listenTo'](_0x2acdec,'change:pageBreaks',(_0x44c5a4,_0x586113,_0x5c0cdb,_0x42496b)=>{this['totalPages']=_0x5c0cdb['length'],this['_updatePageBreakMarkers'](_0x5c0cdb,_0x42496b);}),this['_setupKeystrokes'](),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x13d01b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x236930;for(const _0x1194a0 in _0x13d01b){const _0x37e7d6=_0x1194a0,_0xc0a08d=_0x13d01b[_0x37e7d6];if('paginationLicenseKeyValid'==_0xc0a08d||'paginationLicenseKeyInvalid'==_0xc0a08d||'paginationLicenseKeyExpired'==_0xc0a08d||'paginationLicenseKeyDomainLimit'==_0xc0a08d||'paginationLicenseKeyNotAllowed'==_0xc0a08d||'paginationLicenseKeyEvaluationLimit'==_0xc0a08d||'paginationLicenseKeyUsageLimit'==_0xc0a08d){delete _0x13d01b[_0x37e7d6],_0x236930=_0xc0a08d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'paginationLicenseKeyInvalid'==_0x236930&&_0x13d01b['_showLicenseError']('invalid'),'paginationLicenseKeyExpired'==_0x236930&&_0x13d01b['_showLicenseError']('expired'),'paginationLicenseKeyDomainLimit'==_0x236930&&_0x13d01b['_showLicenseError']('domainLimit'),'paginationLicenseKeyNotAllowed'==_0x236930&&_0x13d01b['_showLicenseError']('featureNotAllowed','Pagination'),'paginationLicenseKeyEvaluationLimit'==_0x236930&&_0x13d01b['_showLicenseError']('evaluationLimit'),'paginationLicenseKeyUsageLimit'==_0x236930&&_0x13d01b['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['scrollToPage'](_0x421843){this['isEnabled']&&this['editor']['plugins']['get'](B)['scrollToPage'](this['_validatePageNumber'](_0x421843));}['moveSelectionToPage'](_0x5a19f3){if(!this['isEnabled'])return;const _0x478060=this['editor'],_0x6938da=this['editor']['plugins']['get'](w)['pageBreaks'][_0x5a19f3-0x1];_0x6938da&&_0x478060['model']['change'](_0x3b8593=>{switch(_0x6938da['type']){case'manual':{const _0x546b8e=_0x478060['model']['schema']['getNearestSelectionRange'](_0x6938da['modelRange']['end'],'forward');_0x3b8593['setSelection'](_0x546b8e);break;}case'element':{const _0x408f89=_0x478060['model']['schema']['getNearestSelectionRange'](_0x6938da['modelRange']['start'],'forward');_0x3b8593['setSelection'](_0x408f89);break;}case'text':{const _0x3ffde4=_0x6938da['modelRange']['start'];if(_0x3ffde4['textNode']&&'\x20'===_0x3ffde4['textNode']['data'][_0x3ffde4['offset']]){const _0x41ef15=_0x3b8593['createPositionAt'](_0x3ffde4['parent'],_0x3ffde4['offset']+0x1);_0x3b8593['setSelection'](_0x41ef15);}else _0x3b8593['setSelection'](_0x6938da['modelRange']);}}_0x478060['editing']['view']['focus']();});}['goToNextPage'](){const _0x209196=this['_validatePageNumber'](this['pageNumber']+0x1);this['moveSelectionToPage'](_0x209196),this['scrollToPage'](_0x209196);}['goToPreviousPage'](){const _0x28f42f=this['_validatePageNumber'](this['pageNumber']-0x1);this['moveSelectionToPage'](_0x28f42f),this['scrollToPage'](_0x28f42f);}['_updatePageBreakMarkers'](_0x4e0411,_0x3c7498){const _0x109dc4=this['editor']['model'];this['isEnabled']&&_0x109dc4['change'](_0x4bf536=>{for(let _0x401155=0x1;_0x401155<_0x4e0411['length'];_0x401155++){const _0x3c1a89=_0x4e0411[_0x401155]['modelRange'],_0x2fec2b='pagination:'+(_0x401155+0x1);_0x109dc4['markers']['has'](_0x2fec2b)?_0x4bf536['updateMarker'](_0x2fec2b,{'range':_0x3c1a89}):_0x4bf536['addMarker'](_0x2fec2b,{'range':_0x3c1a89,'usingOperation':!0x1,'affectsData':!0x0});}for(let _0x4e38ff=_0x4e0411['length'];_0x4e38ff<_0x3c7498['length'];_0x4e38ff++){const _0x51a630='pagination:'+(_0x4e38ff+0x1);_0x109dc4['markers']['has'](_0x51a630)&&_0x4bf536['removeMarker'](_0x51a630);}});}['_setUpDataDowncastConversion'](){this['editor']['conversion']['for']('dataDowncast')['add'](_0x4d3981=>{_0x4d3981['on']('addMarker:pagination',(_0x2cca4f,{markerRange:_0x2decc8,markerName:_0x24e0d5},_0x3b20ce)=>{if(!_0x3b20ce['options']['pagination'])return;if(!_0x3b20ce['consumable']['consume'](_0x2decc8,_0x2cca4f['name']))return;const _0x41d765=_0x2decc8['getContainedElement']();let _0x4cf922=_0x41d765?_0x3b20ce['mapper']['toViewElement'](_0x41d765):null;if(!_0x4cf922){const _0x1c3da6=_0x2decc8['start'];if(_0x3b20ce['schema']['checkChild'](_0x1c3da6,'$text')){const _0x1a58bd=_0x3b20ce['mapper']['toViewPosition'](_0x1c3da6);_0x4cf922=_0x3b20ce['writer']['createContainerElement']('span'),_0x4cf922['getFillerOffset']=()=>null,_0x3b20ce['writer']['insert'](_0x1a58bd,_0x4cf922);}else{const _0x3c9cb5=_0x1c3da6['nodeAfter'];_0x4cf922=_0x3b20ce['mapper']['toViewElement'](_0x3c9cb5);}}for(;_0x4cf922['parent']!==_0x4cf922['root']&&0x0===_0x4cf922['index'];)_0x4cf922=_0x4cf922['parent'];const _0x14691b=_0x24e0d5['substring'](0xb);_0x4cf922['hasClass']('page-break')||(_0x3b20ce['writer']['setStyle']('page-break-before','always',_0x4cf922),_0x3b20ce['writer']['setAttribute']('data-pagination-page',_0x14691b,_0x4cf922),_0x3b20ce['mapper']['bindElementToMarker'](_0x4cf922,_0x24e0d5)),_0x2cca4f['stop']();});});}['_setupKeystrokes'](){const _0x296ce6=this['editor'];_0x296ce6['keystrokes']['set']('Shift+Pageup',(_0x1668c6,_0xd25970)=>{this['goToPreviousPage'](),_0xd25970();}),_0x296ce6['keystrokes']['set']('Shift+Pagedown',(_0x5570bb,_0xbf58ff)=>{this['goToNextPage'](),_0xbf58ff();}),_0x296ce6['accessibility']['addKeystrokeInfoGroup']({'id':'pagination','label':T(_0x296ce6['locale'],'Keystrokes\x20for\x20navigating\x20through\x20documents'),'keystrokes':[{'label':T(_0x296ce6['locale'],'Go\x20to\x20the\x20previous\x20page\x20(also\x20move\x20selection)'),'keystroke':'Shift+Pageup','mayRequireFn':!0x0},{'label':T(_0x296ce6['locale'],'Go\x20to\x20the\x20next\x20page\x20(also\x20move\x20selection)'),'keystroke':'Shift+Pagedown','mayRequireFn':!0x0}]});}['_validatePageNumber'](_0x172921){return _0x172921<0x1&&(_0x172921=0x1),_0x172921>this['totalPages']&&(_0x172921=this['totalPages']),_0x172921;}},V=class extends _0x28b334{['pageNumberView'];constructor(_0x19a04a){super(_0x19a04a);const _0x461eea=this['bindTemplate'];this['set']({'pageNumber':0x1,'totalPages':0x1,'isEnabled':!0x0}),this['pageNumberView']=new _0x337753(_0x19a04a,{'min':0x1,'step':0x1}),this['pageNumberView']['set']({'inputMode':'numeric','tabIndex':-0x1}),this['pageNumberView']['bind']('ariaLabel')['to'](this,'totalPages',_0xe2bb8f=>T(_0x19a04a,'Current\x20page\x20number\x20(from\x201\x20to\x20%0)',_0xe2bb8f)),this['pageNumberView']['bind']('max')['to'](this,'totalPages'),this['pageNumberView']['bind']('isReadOnly')['to'](this,'isEnabled',_0xee313b=>!_0xee313b),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-page-navigator',_0x461eea['if']('isEnabled','ck-disabled',_0x1e0231=>!_0x1e0231)]},'children':[this['pageNumberView'],{'tag':'span','children':[{'text':_0x461eea['to']('totalPages')}]}]});}['render'](){super['render']();const _0x35148f=this['pageNumberView']['element'],_0x207e4f=_0x392496=>{this['pageNumberView']['element']['value']=String(_0x392496);};_0x207e4f(this['pageNumber']),this['on']('change:pageNumber',(_0x32118d,_0x43579f,_0x81f715)=>{_0x207e4f(_0x81f715);}),this['listenTo'](_0x35148f,'keydown',(_0x29f99d,_0x9df87b)=>{if('ArrowUp'===_0x9df87b['key']||'ArrowDown'===_0x9df87b['key'])return void _0x9df87b['stopPropagation']();if(_0x9df87b['keyCode']!==_0x2b37f5['enter'])return;_0x9df87b['preventDefault']();const _0x16e183=_0x35148f['valueAsNumber'];Number['isNaN'](_0x16e183)?_0x35148f['value']=String(this['pageNumber']):(_0x35148f['checkValidity']()?this['pageNumber']=_0x16e183:_0x16e183>this['totalPages']?(this['pageNumber']=this['totalPages'],_0x35148f['value']=String(this['totalPages'])):(this['pageNumber']=0x1,_0x35148f['value']='1'),this['fire']('navigation',this['pageNumber']));}),this['listenTo'](_0x35148f,'blur',()=>{_0x35148f['value']=String(this['pageNumber']);}),this['listenTo'](_0x35148f,'focus',()=>{this['pageNumberView']['select']();});}['focus'](){this['pageNumberView']['element']['focus']();}},M=class extends _0x5a3c63{static get['pluginName'](){return'PaginationUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x4c4aa5=this['editor'],_0x1d6521=_0x4c4aa5['plugins']['get']('PaginationEditing');_0x4c4aa5['ui']['componentFactory']['add']('pageNavigation',_0x146656=>{const _0x479043=new V(_0x146656);return _0x479043['bind']('pageNumber')['to'](_0x1d6521),_0x479043['bind']('totalPages')['to'](_0x1d6521),_0x479043['bind']('isEnabled')['to'](_0x1d6521),_0x479043['on']('navigation',(_0x452768,_0x2f9c10)=>{_0x1d6521['moveSelectionToPage'](_0x2f9c10),_0x1d6521['scrollToPage'](_0x2f9c10);}),_0x479043;}),_0x4c4aa5['ui']['componentFactory']['add']('nextPage',_0x1b3ff6=>{const _0x5371df=new _0x2180a6(_0x1b3ff6);return _0x5371df['isEnabled']=!0x0,_0x5371df['label']=T(_0x4c4aa5['locale'],'Go\x20to\x20next\x20page'),_0x5371df['icon']=_0x1cdb9f,_0x5371df['tooltip']=!0x0,_0x5371df['keystroke']='Shift+PageDown',_0x5371df['bind']('isEnabled')['to'](_0x1d6521),this['listenTo'](_0x5371df,'execute',()=>{_0x1d6521['goToNextPage']();}),_0x5371df;}),_0x4c4aa5['ui']['componentFactory']['add']('previousPage',_0x5daa12=>{const _0xffa32c=new _0x2180a6(_0x5daa12);return _0xffa32c['isEnabled']=!0x0,_0xffa32c['label']=T(_0x4c4aa5['locale'],'Go\x20to\x20previous\x20page'),_0xffa32c['icon']=_0x3cd793,_0xffa32c['tooltip']=!0x0,_0xffa32c['keystroke']='Shift+PageUp',_0xffa32c['bind']('isEnabled')['to'](_0x1d6521),this['listenTo'](_0xffa32c,'execute',()=>{_0x1d6521['goToPreviousPage']();}),_0xffa32c;});}},$=class extends _0x5a3c63{static get['pluginName'](){return'Pagination';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[G,M];}constructor(_0x4e5ec6){super(_0x4e5ec6),this['isEnabled']=!0x1;}['init'](){this['set']({'pageNumber':0x1,'totalPages':0x1});const _0xad5b30=this['editor']['plugins']['get'](G);this['bind']('pageNumber')['to'](_0xad5b30),this['bind']('totalPages')['to'](_0xad5b30),_0x2c65d5['isBlink']||this['editor']['config']['get']('pagination.enableOnUnsupportedBrowsers')?this['editor']['on']('ready',()=>{this['isEnabled']=!0x0;}):this['forceDisabled']('browserCheck');}['scrollToPage'](_0x21b236){this['editor']['plugins']['get'](G)['scrollToPage'](_0x21b236);}};export{$ as Pagination,B as PaginationRenderer};
23
+ import{Plugin as _0x34bff7}from'@ckeditor/ckeditor5-core';import{ButtonView as _0x29c03f,InputNumberView as _0x58e9d5,View as _0x4c0557}from'@ckeditor/ckeditor5-ui';import{Rect as _0x23c07e,ResizeObserver as _0x472e22,env as _0x2c2632,first as _0x4cb9db,global as _0x271011,keyCodes as _0x4a42d1,logWarning as _0x2b64fe,toUnit as _0xcae897,uid as _0x1da3f8}from'@ckeditor/ckeditor5-utils';import{debounce as _0x137e8a}from'es-toolkit/compat';import{IconArrowDown as _0x4d9514,IconArrowUp as _0x45e428}from'@ckeditor/ckeditor5-icons';var w=class extends _0x34bff7{['_recalculatePageBreaksDebounced']=_0x137e8a(()=>this['_recalculatePageBreaks'](),0xc8);['_pagesContainer']=null;static get['pluginName'](){return'PaginationLookup';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){if(this['set']({'pageBreaks':[]}),!this['editor']['config']['get']('pagination'))return void _0x2b64fe('pagination-config-not-found',this['editor']['config']);const _0x1caf1a=this['editor']['plugins']['get']('PaginationEditing');this['bind']('isEnabled')['to'](_0x1caf1a),this['editor']['ui']['once']('ready',()=>this['_onUiReady']()),this['on']('change:isEnabled',(_0x2dd499,_0x40291d,_0x1f0e5e)=>{_0x1f0e5e&&this['_recalculatePageBreaksDebounced']();});}['afterInit'](){!async function(_0x132329){const _0x508529='I9sCmg3DJiG5LFMuQjwhT0XBYyxSqvdPO46NZAcVzb71RWkfe8oKptnrUEal2H',_0x1b844e=0x78fc0,_0x45b2a9=window['Date']['now'](),_0x4418c4=_0x132329['editor'],_0x1690bd=new window['Promise'](_0x57aa2e=>{_0x4418c4['once']('ready',_0x57aa2e);}),_0x12ebe0={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x19868e=_0x4418c4['config']['get']('licenseKey');async function _0x3c21d9(){let _0xdf1ff4,_0x27136b=null,_0x233f37=null;try{return'GPL'==_0x19868e?'NotAllowed':(_0xdf1ff4=_0x1d9c55(),_0xdf1ff4?(_0xdf1ff4['usageEndpoint']&&(_0x233f37=_0x269a1d(_0xdf1ff4['usageEndpoint'],_0xdf1ff4['jti'])),await _0x214037()?_0x1ffe53()?_0x3f3562()?'Expired':_0x22292b()?('evaluation'==_0xdf1ff4['licenseType']&&(_0x27136b=_0x4fd2e0('EvaluationLimit')),await _0x57ae70()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x3f3562(){const _0x1670d0=['evaluation','trial']['includes'](_0xdf1ff4['licenseType'])?_0x45b2a9/0x3e8:0xe10*_0x1b844e;return _0xdf1ff4['exp']<_0x1670d0;}function _0x1ffe53(){const _0x2fae67=_0xdf1ff4['features'];return!!_0x2fae67&&(!!_0x2fae67['includes']('*')||!!_0x2fae67['includes']('PAG'));}function _0x22292b(){const _0x17c1cd=_0xdf1ff4['licensedHosts'];if(!_0x17c1cd||0x0==_0x17c1cd['length'])return!0x0;const {hostname:_0x3da6f3}=new URL(window['location']['href']);if(_0x17c1cd['includes'](_0x3da6f3))return!0x0;const _0x1d8575=_0x3da6f3['split']('.');return _0x17c1cd['filter'](_0x1bb241=>_0x1bb241['includes']('*'))['map'](_0x100f21=>_0x100f21['split']('.'))['filter'](_0x2687b3=>_0x2687b3['length']<=_0x1d8575['length'])['map'](_0x3b9067=>Array(_0x1d8575['length']-_0x3b9067['length'])['fill']('*'===_0x3b9067[0x0]?'*':'')['concat'](_0x3b9067))['some'](_0x34b0e5=>_0x1d8575['every']((_0x1db82a,_0x56116b)=>_0x34b0e5[_0x56116b]===_0x1db82a||'*'===_0x34b0e5[_0x56116b]));}function _0x57ae70(){return _0x27136b&&_0x233f37?new window['Promise']((_0x2f7e6c,_0x36a165)=>{_0x27136b['then'](_0x2f7e6c,_0x36a165),_0x233f37['then'](_0x1c8411=>{'Valid'!=_0x1c8411&&_0x2f7e6c(_0x1c8411);},_0x36a165);}):_0x27136b||_0x233f37||'Valid';}}function _0x269a1d(_0x1102c9,_0x3a2173){return new window['Promise'](_0x7b4408=>{if(_0x37acc4())return _0x7b4408('Valid');_0x404984(),_0x4418c4['decorate']('_sendUsageRequest');let _0x5484ec=!0x1;const _0x1474d2=_0x1da3f8();function _0x5a97e0(_0xfe2ccc){return!!_0xfe2ccc&&('object'==typeof _0xfe2ccc||'function'==typeof _0xfe2ccc)&&'function'==typeof _0xfe2ccc['then']&&'function'==typeof _0xfe2ccc['catch'];}function _0x18e344(_0x557d2f){_0x26f907(_0x557d2f)['then'](_0x18711e=>_0x18711e&&'ok'==_0x18711e['status']?_0x3c303c(_0x266bb0(_0x1474d2+_0x3a2173))!=_0x18711e['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x44e96c=>(_0x300d87(),_0x44e96c),()=>{const _0x4f42d1=_0x499d7c();return null==_0x4f42d1?(_0x300d87(),'Valid'):_0x45b2a9-_0x4f42d1>0x240c8400?'UsageLimit':'Valid';})['then'](_0x7b4408)['catch'](()=>{_0x7b4408('UsageLimit');});const _0x3998cc=0x36ee80;function _0x300d87(){const _0x5de839='llct-'+_0x3c303c(_0x266bb0(_0x1102c9)),_0x209d69=_0x10e1ce(_0x3c303c(window['Math']['ceil'](_0x45b2a9/_0x3998cc)));window['localStorage']['setItem'](_0x5de839,_0x209d69);}function _0x499d7c(){const _0x4b301f='llct-'+_0x3c303c(_0x266bb0(_0x1102c9)),_0x3c01a7=window['localStorage']['getItem'](_0x4b301f);return _0x3c01a7?window['parseInt'](_0x10e1ce(_0x3c01a7),0x10)*_0x3998cc:null;}function _0x26f907(_0x58e680){return new window['Promise']((_0x1a46eb,_0x4dbe7a)=>{_0x58e680['then'](_0x1a46eb,_0x4dbe7a),window['setTimeout'](_0x4dbe7a,0x1d4c0);});}}_0x4418c4['on']('_sendUsageRequest',(_0xde9a8e,_0x58a234)=>{if(_0x58a234[0x0]!=_0x1102c9)return _0x7b4408('UsageLimit');_0x58a234[0x1]={..._0x58a234[0x1],'requestId':_0x1474d2};},{'priority':'high'}),_0x4418c4['on']('_sendUsageRequest',_0x316744=>{_0x5a97e0(_0x316744['return'])&&(_0x5484ec=!0x0,_0x18e344(_0x316744['return']));},{'priority':'low'}),_0x1690bd['then'](()=>{_0x5484ec||_0x7b4408('UsageLimit');});});function _0x37acc4(){return'auto'==_0x4418c4['editing']['view']['_overlayModeHint'];}function _0x404984(){_0x4418c4['editing']['view']['_overlayModeHint']='auto';}}function _0x4fd2e0(_0x5603){const _0x254a74=[new window['Promise'](_0x4505bb=>setTimeout(_0x4505bb,0x93ecc)),_0x1690bd['then'](()=>new window['Promise'](_0x56d2e9=>{let _0x5eb622=0x0;_0x4418c4['model']['on']('applyOperation',(_0x49a13c,_0xcdbcd4)=>{_0xcdbcd4[0x0]['isDocumentOperation']&&_0x5eb622++,0x5e8==_0x5eb622&&(_0x56d2e9(),_0x49a13c['off']());});}))];return window['Promise']['race'](_0x254a74)['then'](()=>_0x5603);}async function _0x56e701(){await _0x1690bd,_0x4418c4['model']['change']=_0x59a681,_0x4418c4['model']['enqueueChange']=_0x59a681,_0x4418c4['enableReadOnlyMode']('model');}function _0x35cc58(_0x2a7a13){const _0x34c5c9=_0x412c00();_0x4418c4[_0x34c5c9]='paginationLicenseKey'+_0x2a7a13,'Valid'!=_0x2a7a13&&_0x56e701();}function _0x412c00(){const _0x24b992=window['String'](window['performance']['now']())['replace']('.','');let _0xbf5cb8='I';for(let _0x37450e=0x0;_0x37450e<_0x24b992['length'];_0x37450e+=0x2){let _0x50babf=window['parseInt'](_0x24b992['substring'](_0x37450e,_0x37450e+0x2));_0x50babf>=0x3e&&(_0x50babf-=0x3e),_0xbf5cb8+=_0x508529[_0x50babf];}return _0xbf5cb8;}function _0x1d9c55(){const _0x4fdd52=_0x19868e['split']('.');if(0x3!=_0x4fdd52['length'])return null;return _0x888b7f(_0x4fdd52[0x1]);function _0x888b7f(_0x5deff2){const _0x450da3=_0x517e66(_0x5deff2);return _0x450da3&&_0x56f67b()?_0x450da3:null;function _0x56f67b(){const _0x4afd32=_0x450da3['jti'],_0xf1e2f3=window['parseInt'](_0x4afd32['substring'](_0x4afd32['length']-0x8),0x10),_0xc3dd44={..._0x450da3,'jti':_0x4afd32['substring'](0x0,_0x4afd32['length']-0x8)};return delete _0xc3dd44['vc'],_0x266bb0(_0xc3dd44)==_0xf1e2f3;}}}async function _0x214037(){let _0x342074=!0x0;try{const [_0x49b9cf,_0x26c1fd,_0x2a2310]=_0x19868e['split']('.');return _0x3fc169(_0x49b9cf),await _0x4f45a5(_0x49b9cf,_0x26c1fd,_0x2a2310),_0x342074;}catch{return!0x1;}function _0x3fc169(_0x6f4e7b){const _0x2aba4b=_0x517e66(_0x6f4e7b);_0x2aba4b&&'ES256'==_0x2aba4b['alg']||(_0x342074=!0x1);}async function _0x4f45a5(_0x37f5c2,_0x20f868,_0x46d940){const _0x2de38c=window['Uint8Array']['from'](_0x45e5b6(_0x46d940),_0x2af334=>_0x2af334['charCodeAt'](0x0)),_0x1bc24f=new window['TextEncoder']()['encode'](_0x37f5c2+'.'+_0x20f868),_0x10244f=window['crypto']['subtle'];if(!_0x10244f)return;const _0x2dba87=await _0x10244f['importKey']('jwk',_0x12ebe0,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x10244f['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2dba87,_0x2de38c,_0x1bc24f)||(_0x342074=!0x1);}}function _0x517e66(_0x19ffe2){return _0x19ffe2['startsWith']('ey')?JSON['parse'](_0x45e5b6(_0x19ffe2)):null;}function _0x45e5b6(_0x595cba){return window['atob'](_0x595cba['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x266bb0(_0x10b11d){let _0x2f11bf=0x1505;function _0x34f853(_0x12d6b0){for(let _0x2f8ab9=0x0;_0x2f8ab9<_0x12d6b0['length'];_0x2f8ab9++){const _0x3d94ea=_0x12d6b0['charCodeAt'](_0x2f8ab9);_0x2f11bf=(_0x2f11bf<<0x5)+_0x2f11bf+_0x3d94ea,_0x2f11bf&=_0x2f11bf;}}function _0x13cd24(_0x43a472){Array['isArray'](_0x43a472)?_0x43a472['forEach'](_0x13cd24):_0x43a472&&'object'==typeof _0x43a472?Object['entries'](_0x43a472)['sort']()['forEach'](([_0x3d0c47,_0x2400e1])=>{_0x34f853(_0x3d0c47),_0x13cd24(_0x2400e1);}):_0x34f853(window['String'](_0x43a472));}return _0x13cd24(_0x10b11d),_0x2f11bf>>>0x0;}function _0x3c303c(_0x54af41){return _0x54af41['toString'](0x10)['padStart'](0x8,'0');}function _0x10e1ce(_0x1a6640){return _0x1a6640['split']('')['reverse']()['join']('');}function _0x59a681(){}_0x35cc58(await _0x3c21d9());}(this);}['destroy'](){super['destroy'](),this['_recalculatePageBreaksDebounced']['cancel'](),this['_pagesContainer']&&(this['_pagesContainer']['destroy'](),this['_pagesContainer']['element']['remove']());}['_onUiReady'](){const _0x48df70=this['editor'],_0xe91935=_0x48df70['editing']['view'],_0x302aa4=this['_getAttachedDomRoot']();if(!_0x302aa4||!_0x302aa4['hasChildNodes']())return void _0x48df70['ui']['once']('update',()=>this['_onUiReady']());const {pageWidth:_0x4a0439,pageHeight:_0x4c3d44}=_0x48df70['config']['get']('pagination'),{top:_0x27eeb4,left:_0xa40920,bottom:_0x5a6edf,right:_0xf9500}=this['_configuredPaddings'];this['_pagesContainer']=new _0x4c0557(_0x48df70['locale']);const _0xe74342=this['_pagesContainer'];_0xe74342['set']('class',''),_0xe74342['setTemplate']({'tag':'div','attributes':{'style':{'columnWidth':_0x4a0439,'width':_0x4a0439,'height':'calc(\x20'+_0x4c3d44+'\x20-\x20'+_0x27eeb4+'\x20-\x20'+_0x5a6edf+'\x20+\x200.5mm\x20)','minWidth':'auto','minHeight':'auto','padding':'0\x20'+_0xf9500+'\x200\x20'+_0xa40920,'columnGap':'calc('+_0xa40920+'\x20+\x20'+_0xf9500+'\x20+\x20100px)','border':0x0,'boxSizing':'border-box','columnCount':'auto','columnFill':'auto','overflow':'hidden','position':'absolute','top':'-99999px','left':'-99999px'},'class':_0xe74342['bindTemplate']['to']('class')}}),_0xe74342['render'](),_0x302aa4['parentNode']['insertBefore'](_0xe74342['element'],_0x302aa4['nextSibling']),this['listenTo'](_0xe91935,'render',()=>this['_recalculatePageBreaksDebounced'](),{'priority':'low'}),this['_recalculatePageBreaksDebounced']();}['_getAttachedDomRoot'](){for(const _0x4dec24 of this['editor']['editing']['view']['domRoots']['values']())if(_0x4dec24['ownerDocument']['body']['contains'](_0x4dec24))return _0x4dec24;return null;}['_recalculatePageBreaks'](){if(!this['isEnabled'])return Promise['resolve']();const _0x1e664a=this['editor']['editing']['view'],_0x5f009c=this['_pagesContainer'],_0x33ab5d=this['_getAttachedDomRoot']();if(!_0x33ab5d||!_0x5f009c)return Promise['resolve']();for(_0x5f009c['class']=['ck-reset','ck-pagination-view',..._0x33ab5d['classList']]['join']('\x20');_0x5f009c['element']['firstChild'];)_0x5f009c['element']['firstChild']['remove']();const _0x236a2c=Array['from'](_0x1e664a['domRoots']);_0x236a2c['sort'](([,_0x3bebc2],[,_0x2a6fbd])=>_0x3bebc2['compareDocumentPosition'](_0x2a6fbd)==Node['DOCUMENT_POSITION_PRECEDING']?0x1:-0x1);for(const [_0x3cb8f3,_0x18c589]of _0x236a2c){const _0x4954e4=_0x18c589['cloneNode'](!0x0);'attributeStyleMap'in _0x4954e4&&_0x4954e4['attributeStyleMap']['clear'](),_0x4954e4['dataset']['rootName']=_0x3cb8f3,_0x4954e4['className']='ck-content\x20ck-pagination_enabled',_0x4954e4['removeAttribute']('id'),_0x4954e4['tabIndex']=-0x1,_0x5f009c['element']['append'](_0x4954e4);}const _0xbb9a52=Array['from'](_0x5f009c['element']['querySelectorAll']('img'));return function(_0x521e59){return Promise['all'](_0x521e59['map'](_0x515cb6=>Promise['race']([k(_0x515cb6),v(0x3e8)])));}(_0xbb9a52)['then'](()=>{for(const _0x1c70ac of _0xbb9a52['filter'](_0x44d0e4=>!_0x44d0e4['closest']('table')))if(_0x1c70ac['offsetParent']){const _0x5da33e=_0x271011['window']['getComputedStyle'](_0x1c70ac),_0x9a812b=_0x271011['document']['createElement']('span');for(const _0x353d83 of _0x5da33e)_0x9a812b['style']['setProperty'](_0x353d83,_0x5da33e[_0x353d83]);_0x9a812b['style']['backgroundImage']='url(\x20'+_0x1c70ac['src']+'\x20)',_0x9a812b['style']['breakInside']='avoid','PICTURE'==_0x1c70ac['parentElement']?.['tagName']?_0x1c70ac['parentElement']['replaceWith'](_0x9a812b):_0x1c70ac['replaceWith'](_0x9a812b);}return new Promise(_0x5b1f33=>_0x271011['window']['requestAnimationFrame'](()=>_0x5b1f33()));})['then'](()=>{this['_updatePageBreaksData']();});}['_updatePageBreaksData'](){const _0x3453c3=this['_pagesContainer']['element'];if(!_0x3453c3['ownerDocument']['body']['contains'](_0x3453c3))return;const _0x98bb74=new _0x23c07e(_0x3453c3)['excludeScrollbarsAndBorders'](),_0x5787c7=Math['floor'](_0x98bb74['width']+0x64),_0x4f4952=_(_0x3453c3,Math['floor'](_0x98bb74['left']-_0x3453c3['scrollLeft']),_0x5787c7,_0x98bb74['height'])['map'](_0x508345=>this['_mapPageStarterInfoToPageBreakInfo'](_0x508345))['filter'](_0x1a65dc=>!0x1!==_0x1a65dc);_0x4f4952['every'](_0x465ac1=>!!_0x465ac1)&&(this['pageBreaks']=_0x4f4952);}['_mapPageStarterInfoToPageBreakInfo'](_0x5a707c){const _0x577f33=this['editor']['editing']['view'],_0x3030b6=this['editor']['editing']['mapper'],_0x3df8da=_0x577f33['domConverter'],_0x56a78a=_0x5a707c['path']['shift'](),_0x22b24f=this['_pagesContainer']['element']['childNodes'][_0x56a78a]['dataset']['rootName'],_0x4b1e65=_0x577f33['getDomRoot'](_0x22b24f);if(!_0x4b1e65)return null;const _0x5cb710=function(_0x51dcf4,_0x25ad26){let _0x45b68b=_0x51dcf4;for(const _0xbb5da8 of _0x25ad26['path']){if(!_0x45b68b)return null;_0x45b68b=_0x45b68b['childNodes'][_0xbb5da8];}return _0x45b68b;}(_0x4b1e65,_0x5a707c);if(!_0x5cb710)return null;const _0x52b7cb=_0x3df8da['domPositionToView'](_0x5cb710,_0x5a707c['textOffset']||0x0);return _0x52b7cb?'manual'==_0x5a707c['type']?this['_mapManualPageStarterInfoToPageBreakInfo'](_0x52b7cb,_0x5cb710):'text'==_0x5a707c['type']&&_0x3030b6['toModelPosition'](_0x52b7cb)['offset']?this['_mapTextPageStarterInfoToPageBreakInfo'](_0x52b7cb,_0x5cb710,_0x5a707c['textOffset']):this['_mapElementPageStarterInfoToPageBreakInfo'](_0x52b7cb,_0x5cb710,_0x5a707c['offset']):null;}['_mapManualPageStarterInfoToPageBreakInfo'](_0x3cab39,_0x2adc5d){const _0x1bba0=this['editor']['model'],_0x479f1e=this['editor']['editing']['mapper']['toModelElement'](_0x3cab39['parent']);return new P({'type':'manual','modelRange':_0x1bba0['createRangeOn'](_0x479f1e),'domNode':_0x2adc5d,'offset':0x0});}['_mapTextPageStarterInfoToPageBreakInfo'](_0x2a5ef5,_0x36bc71,_0x45102d){const _0x324da6=this['editor']['model'],_0x4e8436=this['editor']['editing']['mapper'],_0xd6e17f=this['editor']['editing']['view']['domConverter'];if(_0x45102d>=_0x36bc71['length'])return null;const _0x370be0=_0x4e8436['toModelPosition'](_0x2a5ef5),_0x371bb8=_0x324da6['createRange'](_0x370be0),_0x1bd0fc=_0x4e8436['findMappedViewAncestor'](_0x2a5ef5);return new P({'type':'text','modelRange':_0x371bb8,'domNode':_0x36bc71,'offset':y(_0x36bc71,_0x45102d,_0xd6e17f['mapViewToDom'](_0x1bd0fc))});}['_mapElementPageStarterInfoToPageBreakInfo'](_0x3de9c7,_0x27db10,_0x620c51){const _0x5a68f7=this['editor']['model'],_0x147ea6=this['editor']['editing'],_0x75fe60=_0x147ea6['mapper'],_0x41ecb1=_0x147ea6['view']['domConverter'],_0x3695f8=_0x75fe60['findMappedViewAncestor'](_0x3de9c7),_0x4151a0=_0x75fe60['toModelElement'](_0x3695f8);if(!_0x4151a0||_0x4151a0['is']('rootElement'))return!0x1;const _0x498e78=function(_0xb4e2fc){const _0xfdcdc3=_0xb4e2fc['parent'],_0x437113=_0xfdcdc3['root']['document']['model'],_0x5485e6=_0xfdcdc3['getAncestors']({'parentFirst':!0x0,'includeSelf':!0x0});let _0x4a3fca=null;for(const _0x36b5a7 of _0x5485e6){if(_0x36b5a7['is']('rootElement'))return _0x4a3fca;if(!_0x437113['createPositionBefore'](_0x36b5a7)['isTouching'](_0xb4e2fc))return _0x4a3fca;_0x4a3fca=_0x36b5a7;}}(_0x5a68f7['createPositionBefore'](_0x4151a0))||_0x4151a0;let _0xcdbf=_0x75fe60['toViewElement'](_0x498e78),_0x24ccee=_0x5a68f7['createRangeOn'](_0x498e78);const _0x557a81=_0x5a68f7['createPositionBefore'](_0x498e78)['nodeBefore'];if(_0x557a81&&_0x557a81['is']('element','imageBlock')){const _0x3cf337=_0x75fe60['toViewElement'](_0x557a81),_0x55d36e=_0x41ecb1['mapViewToDom'](_0x3cf337),_0x394d11=_0x271011['window']['getComputedStyle'](_0x55d36e)['float'];'left'!=_0x394d11&&'right'!=_0x394d11||(_0x24ccee=_0x5a68f7['createRangeOn'](_0x557a81));}for(;_0xcdbf['parent']!==_0xcdbf['root']&&0x0===_0xcdbf['index'];)_0xcdbf=_0xcdbf['parent'];const _0x3eccbe=new _0x23c07e(K(_0x27db10)?_0x27db10:L(_0x27db10)),_0x12c364=_0x620c51?_0x3eccbe['height']-_0x620c51:0x0,_0x3035de=_0x41ecb1['mapViewToDom'](_0xcdbf),_0x2436e7=new _0x23c07e(_0x3035de);return new P({'type':'element','modelRange':_0x24ccee,'domNode':_0x3035de,'offset':Math['round'](_0x12c364)||_0x3695f8!=b(_0x3de9c7)?_0x12c364+_0x3eccbe['top']-_0x2436e7['top']:0x0});}get['_configuredPaddings'](){const _0x3fc7e3=this['editor']['config']['get']('pagination.pageMargins');return Object['assign']({'top':'10mm','bottom':'10mm','left':'10mm','right':'10mm'},_0x3fc7e3);}static['_findPageStarterInfos'](_0x509317,_0x3c8ddf,_0x32cad9,_0x7c1fbd,_0x195d61){return _(_0x509317,_0x3c8ddf,_0x32cad9,_0x7c1fbd,_0x195d61);}},P=class{['type'];['modelRange'];['_domNode'];['_offset'];constructor({type:_0x56c284,modelRange:_0xccf2b1,domNode:_0x4a3fee,offset:_0x4564e6}){this['type']=_0x56c284,this['modelRange']=_0xccf2b1,this['_domNode']=_0x4a3fee,this['_offset']=_0x4564e6;}get['offset'](){if(!this['_domNode']['ownerDocument']['body']['contains'](this['_domNode']))return 0x0;const _0x13c54e=new _0x23c07e(K(this['_domNode'])?this['_domNode']:L(this['_domNode']));return'manual'==this['type']?_0x13c54e['top']+_0x13c54e['height']/0x2:_0x13c54e['top']+this['_offset'];}};function y(_0x32978f,_0xf5bbde,_0x50f541){const _0x2c9de8=L(_0x32978f),_0x8e450c=function(_0x3e6900){const _0x428bf4=_0x271011['document']['createRange']();return _0x428bf4['selectNodeContents'](_0x3e6900),_0x428bf4;}(_0x50f541);let _0x281ec6;_0x281ec6=0x0==_0xf5bbde?N(_0x8e450c['startContainer'],_0x8e450c['startOffset'],_0x32978f['parentNode'],Array['from'](_0x32978f['parentNode']['childNodes'])['indexOf'](_0x32978f)):N(_0x8e450c['startContainer'],_0x8e450c['startOffset'],_0x32978f,_0xf5bbde);const _0x2a84ff=N(_0x32978f,_0xf5bbde,_0x8e450c['endContainer'],_0x8e450c['endOffset']),_0x49cb6b=new _0x23c07e(_0x281ec6)['bottom'];return(new _0x23c07e(_0x2a84ff)['top']+_0x49cb6b)/0x2-new _0x23c07e(_0x2c9de8)['top'];}function b(_0x31d0b0){let _0x2ba565=_0x31d0b0['parent'];for(;_0x2ba565['is']('$text')||_0x2ba565['is']('attributeElement');)_0x2ba565=_0x2ba565['parent'];return _0x2ba565;}function k(_0x27710d){return _0x27710d['hasAttribute']('width')&&_0x27710d['hasAttribute']('height')?Promise['resolve']():new Promise(_0x3c46e4=>{function _0x2ef870(){_0x27710d['removeEventListener']('load',_0x2ef870),_0x27710d['removeEventListener']('error',_0x2ef870),_0x3c46e4();}_0x27710d['complete']?_0x3c46e4():(_0x27710d['addEventListener']('load',_0x2ef870),_0x27710d['addEventListener']('error',_0x2ef870));});}function v(_0x373986){return new Promise(_0x5f0e74=>setTimeout(_0x5f0e74,_0x373986));}function L(_0x1ef34d){const _0x139ab2=_0x271011['document']['createRange']();return _0x139ab2['selectNode'](_0x1ef34d),_0x139ab2;}function x(_0x545d97,_0x5db729,_0x2149b9){const _0x22ba60=_0x271011['document']['createRange']();return _0x22ba60['setStart'](_0x545d97,_0x5db729),_0x22ba60['setEnd'](_0x545d97,_0x2149b9),_0x22ba60;}function N(_0x1df9db,_0x27105c,_0x39b56b,_0x327235){const _0x5bade1=_0x271011['document']['createRange']();return _0x5bade1['setStart'](_0x1df9db,_0x27105c),_0x5bade1['setEnd'](_0x39b56b,_0x327235),_0x5bade1;}function _(_0x32f00e,_0x3f90f8,_0x1685df,_0xfc6a5b,_0x5211c8){const _0x745d91=[];for(const [_0x49b564,_0x34f0c0]of _0x32f00e['childNodes']['entries']()){let _0x2a99ff=[];K(_0x34f0c0)&&_0x34f0c0['offsetParent']&&['static','relative']['includes'](_0x271011['window']['getComputedStyle'](_0x34f0c0)['position'])?_0x2a99ff=E(_0x34f0c0,_0x49b564,_0x3f90f8,_0x1685df,_0xfc6a5b,_0x5211c8):O(_0x34f0c0)&&(_0x2a99ff=S(_0x34f0c0,_0x49b564,_0x3f90f8,_0x1685df,_0x5211c8)),_0x2a99ff['length']&&(_0x745d91['push'](..._0x2a99ff),_0x3f90f8+=_0x2a99ff['length']*_0x1685df,_0x5211c8=!0x1);}return _0x745d91;}function E(_0x329235,_0x5c434d,_0x35b32a,_0x4cae60,_0x36260c,_0x4d7955){const _0x39c66c=[];var _0x45cda4;if((_0x45cda4=_0x329235['previousSibling'])&&K(_0x45cda4)&&Boolean(_0x45cda4['classList']['contains']('page-break')||_0x45cda4['closest']('.page-break'))&&(_0x39c66c['push']({'type':'manual','offset':0x0,'path':[_0x5c434d-0x1]}),_0x4d7955=!0x0),'table-row'==_0x271011['window']['getComputedStyle'](_0x329235)['display']){let _0x24d23b=0x0,_0x2ae2db=!0x1;for(const _0x59152d of _0x329235['getClientRects']())_0x24d23b+=_0x59152d['height'],_0x59152d['left']>=_0x35b32a&&(_0x2ae2db=!0x0);if(_0x24d23b<_0x36260c&&_0x2ae2db)return _0x4d7955||_0x39c66c['push']({'type':'element','offset':0x0,'path':[_0x5c434d]}),_0x39c66c;}const _0x5f244f=_0x329235['closest']('figure.image');if(_0x5f244f&&function(_0x13b7d7){let _0xa7dd35=!0x1;const _0x2fb99f=_0x13b7d7['parentElement']['dataset']['rootName'],_0x1dbb6c=_0x13b7d7['nextElementSibling'],_0x27a2df=_0x13b7d7['previousElementSibling'],_0x49452c=_0x1dbb6c&&_0x271011['window']['getComputedStyle'](_0x1dbb6c)['float'],_0x2c42f5=_0x1dbb6c&&'ck-fake-selection-container'===_0x1dbb6c['className'];return!_0x2fb99f||_0x1dbb6c||_0x27a2df||(_0xa7dd35=!0x0),_0x2fb99f&&!_0x27a2df&&_0x2c42f5&&(_0xa7dd35=!0x0),_0x2fb99f&&!_0x27a2df&&'none'!==_0x49452c&&(_0xa7dd35=!0x0),!_0xa7dd35;}(_0x5f244f)){const _0x315904=_0x271011['window']['getComputedStyle'](_0x5f244f)['float'];if('left'==_0x315904||'right'==_0x315904)return _0x39c66c;}const _0x2810df=_(_0x329235,_0x35b32a,_0x4cae60,_0x36260c,_0x4d7955);if(_0x2810df['length']){for(const _0x4c4c3d of _0x2810df)_0x39c66c['push']({'type':_0x4c4c3d['type'],'offset':_0x4c4c3d['offset'],'textOffset':_0x4c4c3d['textOffset'],'path':[_0x5c434d,..._0x4c4c3d['path']]}),_0x35b32a+=_0x4cae60,_0x4d7955=!0x1;return _0x39c66c;}return _0x39c66c['push'](...function(_0x3718f7,_0x2d6bfe,_0x2dda5a,_0x5de435,_0x350df2){const _0x239bbf=[];if('table-cell'==_0x271011['window']['getComputedStyle'](_0x3718f7)['display'])return[];const _0x2d835e=[];for(const _0x184e9e of _0x3718f7['getClientRects']())if(_0x184e9e['left']>=_0x2dda5a){for(const _0x28e44e of _0x2d835e)_0x28e44e['height']+=_0x184e9e['height'];_0x2d835e['push']({'height':_0x184e9e['height']}),_0x2dda5a+=_0x5de435;}for(const _0x36f71a of _0x2d835e)_0x350df2||_0x239bbf['push']({'type':'element','offset':_0x36f71a['height'],'textOffset':0x0,'path':[_0x2d6bfe]}),_0x350df2=!0x1;return _0x239bbf;}(_0x329235,_0x5c434d,_0x35b32a,_0x4cae60,_0x4d7955)),_0x39c66c;}function S(_0x126d77,_0x420a51,_0x52ec8c,_0x526ac6,_0x1cc478){const _0x267325=L(_0x126d77),_0x23a1cd=[];let _0x85b6b5=0x0;for(const _0x2372e3 of _0x267325['getClientRects']())if(_0x2372e3['left']>=_0x52ec8c){const _0x1b3bd3=R(_0x126d77,_0x85b6b5,_0x52ec8c,_0x526ac6);_0x1cc478||_0x23a1cd['push']({'type':'text','path':[_0x420a51],'textOffset':_0x1b3bd3}),_0x85b6b5=_0x1b3bd3,_0x52ec8c+=_0x526ac6,_0x1cc478=!0x1;}return _0x23a1cd;}function R(_0x383930,_0x309eb5,_0x44293,_0x327863){let _0xcd893=_0x309eb5,_0x4394b0=_0x383930['length'];for(;_0x4394b0-_0xcd893>0x1;){const _0x1ecb00=Math['ceil']((_0xcd893+_0x4394b0)/0x2);I(x(_0x383930,_0xcd893,_0x1ecb00),_0x44293,_0x327863)?_0x4394b0=_0x1ecb00:_0xcd893=_0x1ecb00;}return _0xcd893;}function I(_0x55ff62,_0x3d44ee,_0xb7eb0a){for(const _0xa5dd2f of _0x55ff62['getClientRects']())if(_0xa5dd2f['left']>=_0x3d44ee&&_0xa5dd2f['left']<_0x3d44ee+_0xb7eb0a)return!0x0;return!0x1;}function K(_0x34e3fc){return _0x34e3fc['nodeType']==Node['ELEMENT_NODE'];}function O(_0xdb0169){return _0xdb0169['nodeType']==Node['TEXT_NODE'];}const A=/* #__PURE__ -- @preserve */
24
+ _0xcae897('px');var U=class extends _0x4c0557{constructor(){super();const _0x1bb9de=this['bindTemplate'];this['set']({'isVisible':!0x1,'left':null,'top':null,'width':null,'pageNumber':null}),this['setTemplate']({'tag':'div','attributes':{'data-page-number':_0x1bb9de['to']('pageNumber'),'class':['ck','ck-pagination-view-line',_0x1bb9de['if']('isVisible','ck-hidden',_0x59be33=>!_0x59be33)],'style':{'left':_0x1bb9de['to']('left',_0x5c22f4=>A(_0x5c22f4)),'top':_0x1bb9de['to']('top',_0x30844a=>A(_0x30844a)),'width':_0x1bb9de['to']('width',_0x45165b=>A(_0x45165b))}}});}},C=class{['_viewCollection'];['_visibleLines']=new Set();['_hiddenLines']=new Set();constructor(_0x1a1e0f){this['_viewCollection']=_0x1a1e0f['ui']['view']['body'];}['destroy'](){for(const _0x19e216 of this['_hiddenLines'])_0x19e216['destroy']();}['cleanLines'](){for(const _0x4c49b0 of this['_visibleLines'])_0x4c49b0['isVisible']=!0x1,this['_hiddenLines']['add'](_0x4c49b0);this['_visibleLines']['clear']();}['showLine'](_0x2cf333,_0x5c4867,_0x345762,_0x207031){let _0x4d7086;this['_hiddenLines']['size']?(_0x4d7086=_0x4cb9db(this['_hiddenLines']['values']()),this['_hiddenLines']['delete'](_0x4d7086)):_0x4d7086=new U(),_0x4d7086['set']({'pageNumber':_0x207031,'left':_0x2cf333,'top':_0x5c4867,'width':_0x345762}),_0x4d7086['isVisible']=!0x0,this['_viewCollection']['has'](_0x4d7086)||this['_viewCollection']['add'](_0x4d7086),this['_visibleLines']['add'](_0x4d7086);}['setViewCollection'](_0x2d3b00){for(const _0x427c03 of[...this['_visibleLines'],...this['_hiddenLines']])this['_viewCollection']['has'](_0x427c03)&&this['_viewCollection']['remove'](_0x427c03);this['_viewCollection']=_0x2d3b00;}};const D='ck-pagination_enabled';var B=class extends _0x34bff7{['linesRepository'];['_scrollableEditingRootDomAncestor']=null;['_resizeObserver']=null;['_paginationLookupPlugin'];static get['pluginName'](){return'PaginationRenderer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['set']({'pageNumber':0x1}),this['linesRepository']=new C(this['editor']),this['_scrollableEditingRootDomAncestor']=null,this['_resizeObserver']=null,this['_paginationLookupPlugin']=this['editor']['plugins']['get']('PaginationLookup'),this['bind']('isEnabled')['to'](this['editor']['plugins']['get']('PaginationEditing')),this['editor']['ui']['once']('ready',()=>this['_onUiReady']()),this['_toggleEditingRootsClass'](D),this['on']('change:isEnabled',(_0x451e88,_0x94e143,_0x4ff952)=>{_0x4ff952||this['linesRepository']['cleanLines'](),this['_toggleEditingRootsClass'](D,_0x4ff952);});}['destroy'](){this['_toggleEditingRootsClass'](D,!0x1),this['linesRepository']['destroy'](),this['_scrollableEditingRootDomAncestor']=null,this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['scrollToPage'](_0x553b0d){if(!this['isEnabled'])return;const _0xf5ae76=_0x553b0d>0x1?this['_getPageBreakLineOffset'](_0x553b0d-0x1):0x0;this['_scrollableEditingRootDomAncestor']['scrollTo']({'top':_0xf5ae76-0xa,'left':this['_scrollableEditingRootDomAncestor']['scrollLeft'],'behavior':_0x2c2632['isMotionReduced']?'instant':'smooth'});}['setupScrollableAncestor'](){const _0x12c8e6=this['editor'],_0x1e6c76=this['_getAttachedDomRoot']();_0x1e6c76?(this['_scrollableEditingRootDomAncestor']&&_0x12c8e6['ui']['view']['stopListening'](this['_scrollableEditingRootDomAncestor'],'scroll'),this['_scrollableEditingRootDomAncestor']=function(_0x30aba3){let _0x2efa99=_0x30aba3;do{_0x2efa99=_0x2efa99['parentElement'];const _0x27a443=_0x271011['window']['getComputedStyle'](_0x2efa99)['overflowY'];if('auto'==_0x27a443||'scroll'==_0x27a443)break;}while('BODY'!=_0x2efa99['tagName']);return _0x2efa99;}(_0x1e6c76),_0x12c8e6['ui']['view']['listenTo'](this['_scrollableEditingRootDomAncestor'],'scroll',()=>{this['_updatePageBreakLines']();},{'usePassive':!0x0}),this['_resizeObserver']&&this['_resizeObserver']['destroy'](),this['_resizeObserver']=new _0x472e22(this['_scrollableEditingRootDomAncestor'],()=>{this['_updatePageBreakLines']();})):_0x12c8e6['ui']['once']('update',()=>this['setupScrollableAncestor']());}['_onUiReady'](){const _0x2d4475=this['editor'];this['_getAttachedDomRoot']()?(this['setupScrollableAncestor'](),_0x2d4475['ui']['view']['listenTo'](_0x271011['window'],'resize',()=>this['_updatePageBreakLines']()),this['listenTo'](this['_paginationLookupPlugin'],'change:pageBreaks',()=>this['_updatePageBreakLines']())):_0x2d4475['ui']['once']('update',()=>this['_onUiReady']());}['_getAttachedDomRoot'](){for(const _0x22a92a of this['editor']['editing']['view']['domRoots']['values']())if(_0x22a92a['ownerDocument']['body']['contains'](_0x22a92a))return _0x22a92a;return null;}['_updatePageBreakLines'](){if(!this['isEnabled'])return;const _0x483ddd=this['_getAttachedDomRoot'](),_0x23a7e3=this['_paginationLookupPlugin']['pageBreaks'];if(this['linesRepository']['cleanLines'](),!_0x483ddd||0x1==_0x23a7e3['length'])return void(this['pageNumber']=0x1);const _0x505a1c=new _0x23c07e(_0x483ddd)['excludeScrollbarsAndBorders'](),_0x3b3fbb=new _0x23c07e(this['_scrollableEditingRootDomAncestor'])['excludeScrollbarsAndBorders'](),_0x1fe030=_0x3b3fbb['top']+_0x3b3fbb['height']/0x3;let _0x40ff15=!0x1;const _0xdd1e2d=[];for(let _0x202372=0x1;_0x202372<_0x23a7e3['length'];_0x202372++){const _0x5689cd=this['_getPageBreakLineOffset'](_0x202372,_0x3b3fbb);if(!_0x5689cd)continue;const _0x27faa4=_0x3b3fbb['top']+_0x5689cd-this['_scrollableEditingRootDomAncestor']['scrollTop'];_0xdd1e2d['push']({'pageOffsetTop':_0x27faa4,'domRootRect':_0x505a1c,'domScrollableRect':_0x3b3fbb,'pageNumber':_0x202372}),_0x27faa4>_0x1fe030&&!_0x40ff15&&(this['pageNumber']=_0x202372,_0x40ff15=!0x0);}this['_renderPageBreakLines'](_0xdd1e2d),_0x40ff15||(this['pageNumber']=_0x23a7e3['length']);}['_renderPageBreakLines'](_0x2ada27){const {scrollX:_0x1c7a83,scrollY:_0xcdf08d}=_0x271011['window'];if(_0x2ada27['length']){for(const {domScrollableRect:_0x4db74d,pageOffsetTop:_0x2e5896,domRootRect:_0x537ec5,pageNumber:_0x1a6b5d}of _0x2ada27)_0x4db74d['top']<_0x2e5896&&_0x2e5896<_0x4db74d['bottom']&&this['linesRepository']['showLine'](_0x537ec5['left']+_0x1c7a83,_0x2e5896+_0xcdf08d,_0x537ec5['width'],_0x1a6b5d+0x1);}}['_getPageBreakLineOffset'](_0x511e27,_0x57f43a=null){const _0x9e3650=this['_paginationLookupPlugin']['pageBreaks'][_0x511e27]['offset'];return _0x9e3650?(_0x57f43a||(_0x57f43a=new _0x23c07e(this['_scrollableEditingRootDomAncestor'])['excludeScrollbarsAndBorders']()),_0x9e3650-_0x57f43a['top']+this['_scrollableEditingRootDomAncestor']['scrollTop']):0x0;}['_toggleEditingRootsClass'](_0x37c667,_0x3315ff=!0x0){const _0xa86848=this['editor']['editing']['view'];_0xa86848['change'](_0x57ff00=>{for(const _0x53a0a8 of _0xa86848['document']['roots'])_0x3315ff?_0x57ff00['addClass'](_0x37c667,_0x53a0a8):_0x57ff00['removeClass'](_0x37c667,_0x53a0a8);});}};function T(_0x12768f,_0xd949e3,..._0x377852){const t=_0x12768f['t'];switch(_0xd949e3){case'Go\x20to\x20next\x20page':return t('Go\x20to\x20next\x20page');case'Go\x20to\x20previous\x20page':return t('Go\x20to\x20previous\x20page');case'Current\x20page\x20number\x20(from\x201\x20to\x20%0)':return t('Current\x20page\x20number\x20(from\x201\x20to\x20%0)',..._0x377852);case'Keystrokes\x20for\x20navigating\x20through\x20documents':return t('Keystrokes\x20for\x20navigating\x20through\x20documents');case'Go\x20to\x20the\x20previous\x20page\x20(also\x20move\x20selection)':return t('Go\x20to\x20the\x20previous\x20page\x20(also\x20move\x20selection)');case'Go\x20to\x20the\x20next\x20page\x20(also\x20move\x20selection)':return t('Go\x20to\x20the\x20next\x20page\x20(also\x20move\x20selection)');default:return _0xd949e3;}}var G=class extends _0x34bff7{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'PaginationEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[w,B];}['init'](){this['set']({'pageNumber':0x1,'totalPages':0x1});const _0x158470=this['editor']['plugins']['get']('Pagination'),_0x27dba9=this['editor']['plugins']['get'](w),_0x4aa395=this['editor']['plugins']['get'](B);this['bind']('isEnabled')['to'](_0x158470),this['_setUpDataDowncastConversion'](),this['bind']('pageNumber')['to'](_0x4aa395),this['listenTo'](_0x27dba9,'change:pageBreaks',(_0x7a64fe,_0x4148e4,_0x48bf6c,_0x3635ad)=>{this['totalPages']=_0x48bf6c['length'],this['_updatePageBreakMarkers'](_0x48bf6c,_0x3635ad);}),this['_setupKeystrokes'](),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2635ac=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1c842b;for(const _0x376bb1 in _0x2635ac){const _0x26bed1=_0x376bb1,_0x1e0db4=_0x2635ac[_0x26bed1];if('paginationLicenseKeyValid'==_0x1e0db4||'paginationLicenseKeyInvalid'==_0x1e0db4||'paginationLicenseKeyExpired'==_0x1e0db4||'paginationLicenseKeyDomainLimit'==_0x1e0db4||'paginationLicenseKeyNotAllowed'==_0x1e0db4||'paginationLicenseKeyEvaluationLimit'==_0x1e0db4||'paginationLicenseKeyUsageLimit'==_0x1e0db4){delete _0x2635ac[_0x26bed1],_0x1c842b=_0x1e0db4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'paginationLicenseKeyInvalid'==_0x1c842b&&_0x2635ac['_showLicenseError']('invalid'),'paginationLicenseKeyExpired'==_0x1c842b&&_0x2635ac['_showLicenseError']('expired'),'paginationLicenseKeyDomainLimit'==_0x1c842b&&_0x2635ac['_showLicenseError']('domainLimit'),'paginationLicenseKeyNotAllowed'==_0x1c842b&&_0x2635ac['_showLicenseError']('featureNotAllowed','Pagination'),'paginationLicenseKeyEvaluationLimit'==_0x1c842b&&_0x2635ac['_showLicenseError']('evaluationLimit'),'paginationLicenseKeyUsageLimit'==_0x1c842b&&_0x2635ac['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['scrollToPage'](_0x2a8a8c){this['isEnabled']&&this['editor']['plugins']['get'](B)['scrollToPage'](this['_validatePageNumber'](_0x2a8a8c));}['moveSelectionToPage'](_0x2faaea){if(!this['isEnabled'])return;const _0x4b5f9e=this['editor'],_0x5b59c2=this['editor']['plugins']['get'](w)['pageBreaks'][_0x2faaea-0x1];_0x5b59c2&&_0x4b5f9e['model']['change'](_0x2c3d61=>{switch(_0x5b59c2['type']){case'manual':{const _0x5e4bed=_0x4b5f9e['model']['schema']['getNearestSelectionRange'](_0x5b59c2['modelRange']['end'],'forward');_0x2c3d61['setSelection'](_0x5e4bed);break;}case'element':{const _0x4c515c=_0x4b5f9e['model']['schema']['getNearestSelectionRange'](_0x5b59c2['modelRange']['start'],'forward');_0x2c3d61['setSelection'](_0x4c515c);break;}case'text':{const _0x9675bd=_0x5b59c2['modelRange']['start'];if(_0x9675bd['textNode']&&'\x20'===_0x9675bd['textNode']['data'][_0x9675bd['offset']]){const _0x1a4e30=_0x2c3d61['createPositionAt'](_0x9675bd['parent'],_0x9675bd['offset']+0x1);_0x2c3d61['setSelection'](_0x1a4e30);}else _0x2c3d61['setSelection'](_0x5b59c2['modelRange']);}}_0x4b5f9e['editing']['view']['focus']();});}['goToNextPage'](){const _0x70b452=this['_validatePageNumber'](this['pageNumber']+0x1);this['moveSelectionToPage'](_0x70b452),this['scrollToPage'](_0x70b452);}['goToPreviousPage'](){const _0x2ac8bf=this['_validatePageNumber'](this['pageNumber']-0x1);this['moveSelectionToPage'](_0x2ac8bf),this['scrollToPage'](_0x2ac8bf);}['_updatePageBreakMarkers'](_0x237a32,_0x376350){const _0x37d422=this['editor']['model'];this['isEnabled']&&_0x37d422['change'](_0x1cf50d=>{for(let _0x4724a3=0x1;_0x4724a3<_0x237a32['length'];_0x4724a3++){const _0x455010=_0x237a32[_0x4724a3]['modelRange'],_0x2eb01a='pagination:'+(_0x4724a3+0x1);_0x37d422['markers']['has'](_0x2eb01a)?_0x1cf50d['updateMarker'](_0x2eb01a,{'range':_0x455010}):_0x1cf50d['addMarker'](_0x2eb01a,{'range':_0x455010,'usingOperation':!0x1,'affectsData':!0x0});}for(let _0x4f8881=_0x237a32['length'];_0x4f8881<_0x376350['length'];_0x4f8881++){const _0x167c2b='pagination:'+(_0x4f8881+0x1);_0x37d422['markers']['has'](_0x167c2b)&&_0x1cf50d['removeMarker'](_0x167c2b);}});}['_setUpDataDowncastConversion'](){this['editor']['conversion']['for']('dataDowncast')['add'](_0x5c42e2=>{_0x5c42e2['on']('addMarker:pagination',(_0x53f7c3,{markerRange:_0x3d0e17,markerName:_0x495a8e},_0xa3bd5d)=>{if(!_0xa3bd5d['options']['pagination'])return;if(!_0xa3bd5d['consumable']['consume'](_0x3d0e17,_0x53f7c3['name']))return;const _0x4762b4=_0x3d0e17['getContainedElement']();let _0x25382b=_0x4762b4?_0xa3bd5d['mapper']['toViewElement'](_0x4762b4):null;if(!_0x25382b){const _0xd55de7=_0x3d0e17['start'];if(_0xa3bd5d['schema']['checkChild'](_0xd55de7,'$text')){const _0x2d05bc=_0xa3bd5d['mapper']['toViewPosition'](_0xd55de7);_0x25382b=_0xa3bd5d['writer']['createContainerElement']('span'),_0x25382b['getFillerOffset']=()=>null,_0xa3bd5d['writer']['insert'](_0x2d05bc,_0x25382b);}else{const _0x44d00e=_0xd55de7['nodeAfter'];_0x25382b=_0xa3bd5d['mapper']['toViewElement'](_0x44d00e);}}for(;_0x25382b['parent']!==_0x25382b['root']&&0x0===_0x25382b['index'];)_0x25382b=_0x25382b['parent'];const _0x714828=_0x495a8e['substring'](0xb);_0x25382b['hasClass']('page-break')||(_0xa3bd5d['writer']['setStyle']('page-break-before','always',_0x25382b),_0xa3bd5d['writer']['setAttribute']('data-pagination-page',_0x714828,_0x25382b),_0xa3bd5d['mapper']['bindElementToMarker'](_0x25382b,_0x495a8e)),_0x53f7c3['stop']();});});}['_setupKeystrokes'](){const _0x349ef4=this['editor'];_0x349ef4['keystrokes']['set']('Shift+Pageup',(_0x486b1b,_0x33deff)=>{this['goToPreviousPage'](),_0x33deff();}),_0x349ef4['keystrokes']['set']('Shift+Pagedown',(_0x234fad,_0x5831bd)=>{this['goToNextPage'](),_0x5831bd();}),_0x349ef4['accessibility']['addKeystrokeInfoGroup']({'id':'pagination','label':T(_0x349ef4['locale'],'Keystrokes\x20for\x20navigating\x20through\x20documents'),'keystrokes':[{'label':T(_0x349ef4['locale'],'Go\x20to\x20the\x20previous\x20page\x20(also\x20move\x20selection)'),'keystroke':'Shift+Pageup','mayRequireFn':!0x0},{'label':T(_0x349ef4['locale'],'Go\x20to\x20the\x20next\x20page\x20(also\x20move\x20selection)'),'keystroke':'Shift+Pagedown','mayRequireFn':!0x0}]});}['_validatePageNumber'](_0x5b89d0){return _0x5b89d0<0x1&&(_0x5b89d0=0x1),_0x5b89d0>this['totalPages']&&(_0x5b89d0=this['totalPages']),_0x5b89d0;}},V=class extends _0x4c0557{['pageNumberView'];constructor(_0x300318){super(_0x300318);const _0x19e404=this['bindTemplate'];this['set']({'pageNumber':0x1,'totalPages':0x1,'isEnabled':!0x0}),this['pageNumberView']=new _0x58e9d5(_0x300318,{'min':0x1,'step':0x1}),this['pageNumberView']['set']({'inputMode':'numeric','tabIndex':-0x1}),this['pageNumberView']['bind']('ariaLabel')['to'](this,'totalPages',_0x58e319=>T(_0x300318,'Current\x20page\x20number\x20(from\x201\x20to\x20%0)',_0x58e319)),this['pageNumberView']['bind']('max')['to'](this,'totalPages'),this['pageNumberView']['bind']('isReadOnly')['to'](this,'isEnabled',_0x26512f=>!_0x26512f),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-page-navigator',_0x19e404['if']('isEnabled','ck-disabled',_0x13b68b=>!_0x13b68b)]},'children':[this['pageNumberView'],{'tag':'span','children':[{'text':_0x19e404['to']('totalPages')}]}]});}['render'](){super['render']();const _0x3c4ee8=this['pageNumberView']['element'],_0x53e507=_0x30ef63=>{this['pageNumberView']['element']['value']=String(_0x30ef63);};_0x53e507(this['pageNumber']),this['on']('change:pageNumber',(_0x19f779,_0x348ebf,_0x23a4b1)=>{_0x53e507(_0x23a4b1);}),this['listenTo'](_0x3c4ee8,'keydown',(_0x5bc872,_0x423650)=>{if('ArrowUp'===_0x423650['key']||'ArrowDown'===_0x423650['key'])return void _0x423650['stopPropagation']();if(_0x423650['keyCode']!==_0x4a42d1['enter'])return;_0x423650['preventDefault']();const _0x11b05a=_0x3c4ee8['valueAsNumber'];Number['isNaN'](_0x11b05a)?_0x3c4ee8['value']=String(this['pageNumber']):(_0x3c4ee8['checkValidity']()?this['pageNumber']=_0x11b05a:_0x11b05a>this['totalPages']?(this['pageNumber']=this['totalPages'],_0x3c4ee8['value']=String(this['totalPages'])):(this['pageNumber']=0x1,_0x3c4ee8['value']='1'),this['fire']('navigation',this['pageNumber']));}),this['listenTo'](_0x3c4ee8,'blur',()=>{_0x3c4ee8['value']=String(this['pageNumber']);}),this['listenTo'](_0x3c4ee8,'focus',()=>{this['pageNumberView']['select']();});}['focus'](){this['pageNumberView']['element']['focus']();}},M=class extends _0x34bff7{static get['pluginName'](){return'PaginationUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x1749ec=this['editor'],_0x423d9d=_0x1749ec['plugins']['get']('PaginationEditing');_0x1749ec['ui']['componentFactory']['add']('pageNavigation',_0x55fd62=>{const _0x16d8b9=new V(_0x55fd62);return _0x16d8b9['bind']('pageNumber')['to'](_0x423d9d),_0x16d8b9['bind']('totalPages')['to'](_0x423d9d),_0x16d8b9['bind']('isEnabled')['to'](_0x423d9d),_0x16d8b9['on']('navigation',(_0x59783e,_0x2f70dd)=>{_0x423d9d['moveSelectionToPage'](_0x2f70dd),_0x423d9d['scrollToPage'](_0x2f70dd);}),_0x16d8b9;}),_0x1749ec['ui']['componentFactory']['add']('nextPage',_0x3c5875=>{const _0x329400=new _0x29c03f(_0x3c5875);return _0x329400['isEnabled']=!0x0,_0x329400['label']=T(_0x1749ec['locale'],'Go\x20to\x20next\x20page'),_0x329400['icon']=_0x4d9514,_0x329400['tooltip']=!0x0,_0x329400['keystroke']='Shift+PageDown',_0x329400['bind']('isEnabled')['to'](_0x423d9d),this['listenTo'](_0x329400,'execute',()=>{_0x423d9d['goToNextPage']();}),_0x329400;}),_0x1749ec['ui']['componentFactory']['add']('previousPage',_0x52270=>{const _0x3ee55c=new _0x29c03f(_0x52270);return _0x3ee55c['isEnabled']=!0x0,_0x3ee55c['label']=T(_0x1749ec['locale'],'Go\x20to\x20previous\x20page'),_0x3ee55c['icon']=_0x45e428,_0x3ee55c['tooltip']=!0x0,_0x3ee55c['keystroke']='Shift+PageUp',_0x3ee55c['bind']('isEnabled')['to'](_0x423d9d),this['listenTo'](_0x3ee55c,'execute',()=>{_0x423d9d['goToPreviousPage']();}),_0x3ee55c;});}},$=class extends _0x34bff7{static get['pluginName'](){return'Pagination';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[G,M];}constructor(_0x510c32){super(_0x510c32),this['isEnabled']=!0x1;}['init'](){this['set']({'pageNumber':0x1,'totalPages':0x1});const _0x4024bc=this['editor']['plugins']['get'](G);this['bind']('pageNumber')['to'](_0x4024bc),this['bind']('totalPages')['to'](_0x4024bc),_0x2c2632['isBlink']||this['editor']['config']['get']('pagination.enableOnUnsupportedBrowsers')?this['editor']['on']('ready',()=>{this['isEnabled']=!0x0;}):this['forceDisabled']('browserCheck');}['scrollToPage'](_0x469c0e){this['editor']['plugins']['get'](G)['scrollToPage'](_0x469c0e);}};export{$ as Pagination,B as PaginationRenderer};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-pagination",
3
- "version": "48.3.1-alpha.0",
3
+ "version": "48.3.1-alpha.1",
4
4
  "description": "Pagination feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -21,11 +21,11 @@
21
21
  "./package.json": "./package.json"
22
22
  },
23
23
  "dependencies": {
24
- "@ckeditor/ckeditor5-core": "48.3.1-alpha.0",
25
- "@ckeditor/ckeditor5-engine": "48.3.1-alpha.0",
26
- "@ckeditor/ckeditor5-icons": "48.3.1-alpha.0",
27
- "@ckeditor/ckeditor5-ui": "48.3.1-alpha.0",
28
- "@ckeditor/ckeditor5-utils": "48.3.1-alpha.0",
24
+ "@ckeditor/ckeditor5-core": "48.3.1-alpha.1",
25
+ "@ckeditor/ckeditor5-engine": "48.3.1-alpha.1",
26
+ "@ckeditor/ckeditor5-icons": "48.3.1-alpha.1",
27
+ "@ckeditor/ckeditor5-ui": "48.3.1-alpha.1",
28
+ "@ckeditor/ckeditor5-utils": "48.3.1-alpha.1",
29
29
  "es-toolkit": "1.45.1"
30
30
  },
31
31
  "files": [