@ckeditor/ckeditor5-pagination 49.0.0-alpha.3 → 49.0.0-alpha.5

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 _0x36fc84}from'@ckeditor/ckeditor5-core';import{ButtonView as _0x408562,InputNumberView as _0x41ccf8,View as _0x4b6bbf}from'@ckeditor/ckeditor5-ui';import{Rect as _0x28c4f2,ResizeObserver as _0x471439,env as _0x3d02c4,findClosestScrollableAncestor as _0x1172bf,first as _0x2b15b6,getParentElement as _0x261bed,getParentNode as _0xebc1a5,getPositionedAncestor as _0x4ba23b,global as _0x1dbfac,keyCodes as _0x502e90,logWarning as _0x41a087,toUnit as _0x3adac8,uid as _0x513d17}from'@ckeditor/ckeditor5-utils';import{debounce as _0x46256f}from'es-toolkit/compat';import{IconArrowDown as _0x2e77e2,IconArrowUp as _0x2e76dc}from'@ckeditor/ckeditor5-icons';var v=class extends _0x36fc84{_recalculatePageBreaksDebounced=_0x46256f(()=>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 _0x41a087('pagination-config-not-found',this['editor']['config']);const _0x106b0f=this['editor']['plugins']['get']('PaginationEditing');this['bind']('isEnabled')['to'](_0x106b0f),this['editor']['ui']['once']('ready',()=>this['_onUiReady']()),this['on']('change:isEnabled',(_0x5623a6,_0x17e0a6,_0x1f8246)=>{_0x1f8246&&this['_recalculatePageBreaksDebounced']();});}afterInit(){!async function(_0x52610c){const _0xc00162='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x3a1147=0x79758,_0x15f1f5={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x950d77(_0x48a894){const _0x3da3cd=new window['Promise'](_0x376d6e=>{_0x48a894['once']('ready',_0x376d6e);}),_0x4ac539=window['Date']['now'](),_0x5400f3=_0x48a894['config']['get']('licenseKey');async function _0x571017(){let _0x27e2ba,_0x58a850=null,_0x1d128f=null;try{return'GPL'==_0x5400f3?'NotAllowed':(_0x27e2ba=_0x40f0a2(),_0x27e2ba?(_0x27e2ba['usageEndpoint']&&(_0x1d128f=_0x31094e(_0x27e2ba['usageEndpoint'],_0x27e2ba['jti'])),await _0x1bc54b()?_0x576fc2()?_0xb0a57f()?'Expired':_0x17cbe3()?('evaluation'==_0x27e2ba['licenseType']&&(_0x58a850=_0x52970f('EvaluationLimit')),await _0x3b15fb()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0xb0a57f(){const _0xca384=['evaluation','trial']['includes'](_0x27e2ba['licenseType'])?_0x4ac539/0x3e8:0xe10*_0x3a1147;return _0x27e2ba['exp']<_0xca384;}function _0x576fc2(){const _0x4e34b4=_0x27e2ba['features'];return!!_0x4e34b4&&(!!_0x4e34b4['includes']('*')||!!_0x4e34b4['includes']('PAG'));}function _0x17cbe3(){const _0xcd991e=_0x27e2ba['licensedHosts'];if(!_0xcd991e||0x0==_0xcd991e['length'])return!0x0;const {hostname:_0x39a712}=new URL(window['location']['href']);if(_0xcd991e['includes'](_0x39a712))return!0x0;const _0x517c33=_0x39a712['split']('.');return _0xcd991e['filter'](_0x4f00d=>_0x4f00d['includes']('*'))['map'](_0x3f8b9f=>_0x3f8b9f['split']('.'))['filter'](_0x26fe3c=>_0x26fe3c['length']<=_0x517c33['length'])['map'](_0x20cd5f=>Array(_0x517c33['length']-_0x20cd5f['length'])['fill']('*'===_0x20cd5f[0x0]?'*':'')['concat'](_0x20cd5f))['some'](_0xf34d9=>_0x517c33['every']((_0x37b851,_0x16abf4)=>_0xf34d9[_0x16abf4]===_0x37b851||'*'===_0xf34d9[_0x16abf4]));}function _0x3b15fb(){return _0x58a850&&_0x1d128f?new window['Promise']((_0x5960df,_0x325ff2)=>{_0x58a850['then'](_0x5960df,_0x325ff2),_0x1d128f['then'](_0x2e855b=>{'Valid'!=_0x2e855b&&_0x5960df(_0x2e855b);},_0x325ff2);}):_0x58a850||_0x1d128f||'Valid';}}function _0x31094e(_0x5bb19e,_0x15794f){return new window['Promise'](_0x13f0d9=>{if(_0x74751())return _0x13f0d9('Valid');_0x2cdc5f(),_0x48a894['decorate']('_sendUsageRequest');let _0x340349=!0x1;const _0x3d221f=_0x513d17();function _0x1dfa85(_0x1c2427){return!!_0x1c2427&&('object'==typeof _0x1c2427||'function'==typeof _0x1c2427)&&'function'==typeof _0x1c2427['then']&&'function'==typeof _0x1c2427['catch'];}function _0x13d9b4(_0x598095){_0x23e406(_0x598095)['then'](_0xba52d3=>_0xba52d3&&'ok'==_0xba52d3['status']?_0x1c9e8c(_0x1a098a(_0x3d221f+_0x15794f))!=_0xba52d3['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x100f21=>(_0x134dce(),_0x100f21),()=>{const _0x1fdd4c=_0x1c6c1e();return null==_0x1fdd4c?(_0x134dce(),'Valid'):_0x4ac539-_0x1fdd4c>0x240c8400?'UsageLimit':'Valid';})['then'](_0x13f0d9)['catch'](()=>{_0x13f0d9('UsageLimit');});const _0x45a148=0x36ee80;function _0x134dce(){const _0x3490f4='llct-'+_0x1c9e8c(_0x1a098a(_0x5bb19e)),_0x430ff1=_0x46c9a9(_0x1c9e8c(window['Math']['ceil'](_0x4ac539/_0x45a148)));window['localStorage']['setItem'](_0x3490f4,_0x430ff1);}function _0x1c6c1e(){const _0x4fd89a='llct-'+_0x1c9e8c(_0x1a098a(_0x5bb19e)),_0x34acd2=window['localStorage']['getItem'](_0x4fd89a);return _0x34acd2?window['parseInt'](_0x46c9a9(_0x34acd2),0x10)*_0x45a148:null;}function _0x23e406(_0x4df195){return new window['Promise']((_0x4be6b5,_0x54cf3f)=>{_0x4df195['then'](_0x4be6b5,_0x54cf3f),window['setTimeout'](_0x54cf3f,0x1d4c0);});}}_0x48a894['on']('_sendUsageRequest',(_0x45a98c,_0x2143d2)=>{if(_0x2143d2[0x0]!=_0x5bb19e)return _0x13f0d9('UsageLimit');_0x2143d2[0x1]={..._0x2143d2[0x1],'requestId':_0x3d221f};},{'priority':'high'}),_0x48a894['on']('_sendUsageRequest',_0x2d7172=>{_0x1dfa85(_0x2d7172['return'])&&(_0x340349=!0x0,_0x13d9b4(_0x2d7172['return']));},{'priority':'low'}),_0x3da3cd['then'](()=>{_0x340349||_0x13f0d9('UsageLimit');});});function _0x74751(){return'auto'==_0x48a894['editing']['view']['_overlayModeHint'];}function _0x2cdc5f(){_0x48a894['editing']['view']['_overlayModeHint']='auto';}}function _0x52970f(_0x397fa0){const _0x4669dd=[new window['Promise'](_0x4fd666=>setTimeout(_0x4fd666,0x93ecc)),_0x3da3cd['then'](()=>new window['Promise'](_0x338eee=>{let _0x20d67e=0x0;_0x48a894['model']['on']('applyOperation',(_0x1b84f6,_0x44d164)=>{_0x44d164[0x0]['isDocumentOperation']&&_0x20d67e++,0x5e8==_0x20d67e&&(_0x338eee(),_0x1b84f6['off']());});}))];return window['Promise']['race'](_0x4669dd)['then'](()=>_0x397fa0);}async function _0x5808f5(){await _0x3da3cd,_0x48a894['model']['change']=_0x163b5f,_0x48a894['model']['enqueueChange']=_0x163b5f,_0x48a894['enableReadOnlyMode']('model');}function _0xcc1d06(_0x4d4cf3){const _0x454352=_0x485d0f();_0x48a894[_0x454352]='paginationLicenseKey'+_0x4d4cf3,'Valid'!=_0x4d4cf3&&_0x5808f5();}function _0x485d0f(){const _0x28188c=window['String'](window['performance']['now']())['replace']('.','');let _0x1be040='v';for(let _0x49d51c=0x0;_0x49d51c<_0x28188c['length'];_0x49d51c+=0x2){let _0x5b8f43=window['parseInt'](_0x28188c['substring'](_0x49d51c,_0x49d51c+0x2));_0x5b8f43>=0x3e&&(_0x5b8f43-=0x3e),_0x1be040+=_0xc00162[_0x5b8f43];}return _0x1be040;}function _0x40f0a2(){const _0x58477e=_0x5400f3['split']('.');if(0x3!=_0x58477e['length'])return null;return _0x4fa90e(_0x58477e[0x1]);function _0x4fa90e(_0x1b5c4d){const _0x47d1ab=_0x5a7da2(_0x1b5c4d);return _0x47d1ab&&_0x254a6e()?_0x47d1ab:null;function _0x254a6e(){const _0xa523cf=_0x47d1ab['jti'],_0x359080=window['parseInt'](_0xa523cf['substring'](_0xa523cf['length']-0x8),0x10),_0x26230a={..._0x47d1ab,'jti':_0xa523cf['substring'](0x0,_0xa523cf['length']-0x8)};return delete _0x26230a['vc'],_0x1a098a(_0x26230a)==_0x359080;}}}async function _0x1bc54b(){let _0x28abd3=!0x0;try{const [_0x2df935,_0x51bf02,_0x55ada6]=_0x5400f3['split']('.');return _0x3c254e(_0x2df935),await _0x5091dc(_0x2df935,_0x51bf02,_0x55ada6),_0x28abd3;}catch{return!0x1;}function _0x3c254e(_0x174dee){const _0x4add1f=_0x5a7da2(_0x174dee);_0x4add1f&&'ES256'==_0x4add1f['alg']||(_0x28abd3=!0x1);}async function _0x5091dc(_0xa06246,_0x4f2f48,_0x1e89a3){const _0x51f3c5=window['Uint8Array']['from'](_0x4739e5(_0x1e89a3),_0x53d9b6=>_0x53d9b6['charCodeAt'](0x0)),_0x324bfd=new window['TextEncoder']()['encode'](_0xa06246+'.'+_0x4f2f48),_0x3b058d=window['crypto']['subtle'];if(!_0x3b058d)return;const _0x43e883=await _0x3b058d['importKey']('jwk',_0x15f1f5,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3b058d['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x43e883,_0x51f3c5,_0x324bfd)||(_0x28abd3=!0x1);}}function _0x5a7da2(_0x22d9d4){return _0x22d9d4['startsWith']('ey')?JSON['parse'](_0x4739e5(_0x22d9d4)):null;}function _0x4739e5(_0x2c7e1c){return window['atob'](_0x2c7e1c['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1a098a(_0x2fac28){let _0x19b7ef=0x1505;function _0x3f52d1(_0x4c3437){for(let _0x5e74b8=0x0;_0x5e74b8<_0x4c3437['length'];_0x5e74b8++){const _0x36d2ac=_0x4c3437['charCodeAt'](_0x5e74b8);_0x19b7ef=(_0x19b7ef<<0x5)+_0x19b7ef+_0x36d2ac,_0x19b7ef&=_0x19b7ef;}}function _0x3a0006(_0x121e9a){Array['isArray'](_0x121e9a)?_0x121e9a['forEach'](_0x3a0006):_0x121e9a&&'object'==typeof _0x121e9a?Object['entries'](_0x121e9a)['sort']()['forEach'](([_0x37f823,_0x1127d2])=>{_0x3f52d1(_0x37f823),_0x3a0006(_0x1127d2);}):_0x3f52d1(window['String'](_0x121e9a));}return _0x3a0006(_0x2fac28),_0x19b7ef>>>0x0;}function _0x1c9e8c(_0x3bc64){return _0x3bc64['toString'](0x10)['padStart'](0x8,'0');}function _0x46c9a9(_0x5dc29c){return _0x5dc29c['split']('')['reverse']()['join']('');}function _0x163b5f(){}_0xcc1d06(await _0x571017());}_0x950d77(_0x52610c['editor']);}(this);}destroy(){super['destroy'](),this['_recalculatePageBreaksDebounced']['cancel'](),this['_pagesContainer']&&(this['_pagesContainer']['destroy'](),this['_pagesContainer']['element']['remove']());}['_onUiReady'](){const _0x57f1e1=this['editor'],_0x4f439c=_0x57f1e1['editing']['view'],_0x39344d=this['_getAttachedDomRoot']();if(!_0x39344d||!_0x39344d['hasChildNodes']())return void _0x57f1e1['ui']['once']('update',()=>this['_onUiReady']());const {pageWidth:_0x324209,pageHeight:_0x340dba}=_0x57f1e1['config']['get']('pagination'),{top:_0x56b866,left:_0x4196e6,bottom:_0x595f73,right:_0x1a107c}=this['_configuredPaddings'];this['_pagesContainer']=new _0x4b6bbf(_0x57f1e1['locale']);const _0x3b8e74=this['_pagesContainer'];_0x3b8e74['set']('class',''),_0x3b8e74['setTemplate']({'tag':'div','attributes':{'style':{'columnWidth':_0x324209,'width':_0x324209,'height':'calc(\x20'+_0x340dba+'\x20-\x20'+_0x56b866+'\x20-\x20'+_0x595f73+'\x20+\x200.5mm\x20)','minWidth':'auto','minHeight':'auto','padding':'0\x20'+_0x1a107c+'\x200\x20'+_0x4196e6,'columnGap':'calc('+_0x4196e6+'\x20+\x20'+_0x1a107c+'\x20+\x20100px)','border':0x0,'boxSizing':'border-box','columnCount':'auto','columnFill':'auto','overflow':'hidden','position':'absolute','top':'-99999px','left':'-99999px'},'class':_0x3b8e74['bindTemplate']['to']('class')}}),_0x3b8e74['render'](),_0xebc1a5(_0x39344d)['insertBefore'](_0x3b8e74['element'],_0x39344d['nextSibling']),this['listenTo'](_0x4f439c,'render',()=>this['_recalculatePageBreaksDebounced'](),{'priority':'low'}),this['_recalculatePageBreaksDebounced']();}_getAttachedDomRoot(){for(const _0x395aa6 of this['editor']['editing']['view']['domRoots']['values']())if(_0x395aa6['isConnected'])return _0x395aa6;return null;}_recalculatePageBreaks(){if(!this['isEnabled'])return Promise['resolve']();const _0x2e5edd=this['editor']['editing']['view'],_0x1b930e=this['_pagesContainer'],_0x597912=this['_getAttachedDomRoot']();if(!_0x597912||!_0x1b930e)return Promise['resolve']();for(_0x1b930e['class']=['ck-reset','ck-pagination-view',..._0x597912['classList']]['join']('\x20');_0x1b930e['element']['firstChild'];)_0x1b930e['element']['firstChild']['remove']();const _0x1d6e02=Array['from'](_0x2e5edd['domRoots']);_0x1d6e02['sort'](([,_0xdb215d],[,_0x5d97cb])=>_0xdb215d['compareDocumentPosition'](_0x5d97cb)==Node['DOCUMENT_POSITION_PRECEDING']?0x1:-0x1);for(const [_0x5650f4,_0x53fb80]of _0x1d6e02){const _0xed074c=_0x53fb80['cloneNode'](!0x0);'attributeStyleMap'in _0xed074c&&_0xed074c['attributeStyleMap']['clear'](),_0xed074c['dataset']['rootName']=_0x5650f4,_0xed074c['className']='ck-content\x20ck-pagination_enabled',_0xed074c['removeAttribute']('id'),_0xed074c['tabIndex']=-0x1,_0x1b930e['element']['append'](_0xed074c);}const _0x461794=Array['from'](_0x1b930e['element']['querySelectorAll']('img'));return function(_0x274542){return Promise['all'](_0x274542['map'](_0x132836=>Promise['race']([N(_0x132836),_(0x3e8)])));}(_0x461794)['then'](()=>{for(const _0x433473 of _0x461794['filter'](_0x51ff14=>!_0x51ff14['closest']('table')))if(_0x433473['offsetParent']){const _0x3e845c=_0x1dbfac['window']['getComputedStyle'](_0x433473),_0x5534d7=_0x1dbfac['document']['createElement']('span');for(const _0x39ec3f of _0x3e845c)_0x5534d7['style']['setProperty'](_0x39ec3f,_0x3e845c[_0x39ec3f]);_0x5534d7['style']['backgroundImage']='url(\x20'+_0x433473['src']+'\x20)',_0x5534d7['style']['breakInside']='avoid','PICTURE'==_0x433473['parentElement']?.['tagName']?_0x433473['parentElement']['replaceWith'](_0x5534d7):_0x433473['replaceWith'](_0x5534d7);}return new Promise(_0x18f438=>_0x1dbfac['window']['requestAnimationFrame'](()=>_0x18f438()));})['then'](()=>{this['_updatePageBreaksData']();});}_updatePageBreaksData(){const _0x2c0e45=this['_pagesContainer']['element'];if(!_0x2c0e45['isConnected'])return;const _0x2d287c=new _0x28c4f2(_0x2c0e45)['excludeScrollbarsAndBorders'](),_0x4a6f6a=Math['floor'](_0x2d287c['width']+0x64),_0x2b4fe7=I(_0x2c0e45,Math['floor'](_0x2d287c['left']-_0x2c0e45['scrollLeft']),_0x4a6f6a,_0x2d287c['height'])['map'](_0x258586=>this['_mapPageStarterInfoToPageBreakInfo'](_0x258586))['filter'](_0x2cacf0=>!0x1!==_0x2cacf0);_0x2b4fe7['every'](_0x28c7c6=>!!_0x28c7c6)&&(this['pageBreaks']=_0x2b4fe7);}_mapPageStarterInfoToPageBreakInfo(_0x2ea9fc){const _0x37b610=this['editor']['editing']['view'],_0x566244=this['editor']['editing']['mapper'],_0x4482d7=_0x37b610['domConverter'],_0x275b6e=_0x2ea9fc['path']['shift'](),_0x3ef506=this['_pagesContainer']['element']['childNodes'][_0x275b6e]['dataset']['rootName'],_0x25ec28=_0x37b610['getDomRoot'](_0x3ef506);if(!_0x25ec28)return null;const _0x287251=function(_0x32d4b4,_0x39c00a){let _0x5c733c=_0x32d4b4;for(const _0x17f2b of _0x39c00a['path']){if(!_0x5c733c)return null;_0x5c733c=_0x5c733c['childNodes'][_0x17f2b];}return _0x5c733c;}(_0x25ec28,_0x2ea9fc);if(!_0x287251)return null;const _0x29f356=_0x4482d7['domPositionToView'](_0x287251,_0x2ea9fc['textOffset']||0x0);return _0x29f356?'manual'==_0x2ea9fc['type']?this['_mapManualPageStarterInfoToPageBreakInfo'](_0x29f356,_0x287251):'text'==_0x2ea9fc['type']&&_0x566244['toModelPosition'](_0x29f356)['offset']?this['_mapTextPageStarterInfoToPageBreakInfo'](_0x29f356,_0x287251,_0x2ea9fc['textOffset']):this['_mapElementPageStarterInfoToPageBreakInfo'](_0x29f356,_0x287251,_0x2ea9fc['offset']):null;}_mapManualPageStarterInfoToPageBreakInfo(_0x5f0b41,_0x41b916){const _0x3be512=this['editor']['model'],_0x42423a=this['editor']['editing']['mapper']['toModelElement'](_0x5f0b41['parent']),_0x339042=_0x3be512['createRangeOn'](_0x42423a);return new k({'type':'manual','modelRange':_0x339042,'domNode':_0x41b916,'offset':0x0});}_mapTextPageStarterInfoToPageBreakInfo(_0xc82eb2,_0x293bb3,_0x4df9c3){const _0x48db0b=this['editor']['model'],_0xa62035=this['editor']['editing']['mapper'],_0x2be015=this['editor']['editing']['view']['domConverter'];if(_0x4df9c3>=_0x293bb3['length'])return null;const _0x2c4e4b=_0xa62035['toModelPosition'](_0xc82eb2),_0x153ca7=_0x48db0b['createRange'](_0x2c4e4b),_0x4381b6=_0xa62035['findMappedViewAncestor'](_0xc82eb2),_0xb65685=_0x2be015['mapViewToDom'](_0x4381b6);return new k({'type':'text','modelRange':_0x153ca7,'domNode':_0x293bb3,'offset':L(_0x293bb3,_0x4df9c3,_0xb65685)});}_mapElementPageStarterInfoToPageBreakInfo(_0x3f8307,_0x5261e7,_0x340f2d){const _0xd485e1=this['editor']['model'],_0x418b9e=this['editor']['editing'],_0x11daef=_0x418b9e['mapper'],_0x15b950=_0x418b9e['view']['domConverter'],_0x29c3aa=_0x11daef['findMappedViewAncestor'](_0x3f8307),_0x4cf7f4=_0x11daef['toModelElement'](_0x29c3aa);if(!_0x4cf7f4||_0x4cf7f4['is']('rootElement'))return!0x1;const _0x5f4f97=function(_0x27a6b3){const _0x2f22f6=_0x27a6b3['parent'],_0x2c19ad=_0x2f22f6['root']['document']['model'],_0x34a38f=_0x2f22f6['getAncestors']({'parentFirst':!0x0,'includeSelf':!0x0});let _0x928c05=null;for(const _0x3e5992 of _0x34a38f){if(_0x3e5992['is']('rootElement'))return _0x928c05;if(!_0x2c19ad['createPositionBefore'](_0x3e5992)['isTouching'](_0x27a6b3))return _0x928c05;_0x928c05=_0x3e5992;}}(_0xd485e1['createPositionBefore'](_0x4cf7f4))||_0x4cf7f4;let _0x19ad5c=_0x11daef['toViewElement'](_0x5f4f97),_0x1f011a=_0xd485e1['createRangeOn'](_0x5f4f97);const _0x3895fa=_0xd485e1['createPositionBefore'](_0x5f4f97)['nodeBefore'];if(_0x3895fa&&_0x3895fa['is']('element','imageBlock')){const _0xdc016=_0x11daef['toViewElement'](_0x3895fa),_0x5c15f0=_0x15b950['mapViewToDom'](_0xdc016),_0x52701e=_0x1dbfac['window']['getComputedStyle'](_0x5c15f0)['float'];'left'!=_0x52701e&&'right'!=_0x52701e||(_0x1f011a=_0xd485e1['createRangeOn'](_0x3895fa));}for(;_0x19ad5c['parent']!==_0x19ad5c['root']&&0x0===_0x19ad5c['index'];)_0x19ad5c=_0x19ad5c['parent'];const _0x2d519c=new _0x28c4f2(C(_0x5261e7)?_0x5261e7:E(_0x5261e7)),_0x199fcd=_0x340f2d?_0x2d519c['height']-_0x340f2d:0x0,_0x2dd93b=_0x15b950['mapViewToDom'](_0x19ad5c),_0x2bcdc6=new _0x28c4f2(_0x2dd93b);return new k({'type':'element','modelRange':_0x1f011a,'domNode':_0x2dd93b,'offset':Math['round'](_0x199fcd)||_0x29c3aa!=x(_0x3f8307)?_0x199fcd+_0x2d519c['top']-_0x2bcdc6['top']:0x0});}get['_configuredPaddings'](){const _0x3196e2=this['editor']['config']['get']('pagination.pageMargins');return Object['assign']({'top':'10mm','bottom':'10mm','left':'10mm','right':'10mm'},_0x3196e2);}static _findPageStarterInfos(_0x43a5e5,_0x4dec19,_0x28656b,_0x53f3c2,_0x20c8f6){return I(_0x43a5e5,_0x4dec19,_0x28656b,_0x53f3c2,_0x20c8f6);}},k=class{type;['modelRange'];['_domNode'];_offset;constructor({type:_0x1141f5,modelRange:_0x4e0c8f,domNode:_0x285cc0,offset:_0x3e6229}){this['type']=_0x1141f5,this['modelRange']=_0x4e0c8f,this['_domNode']=_0x285cc0,this['_offset']=_0x3e6229;}get offset(){if(!this['_domNode']['isConnected'])return 0x0;const _0x375901=new _0x28c4f2(C(this['_domNode'])?this['_domNode']:E(this['_domNode']));return'manual'==this['type']?_0x375901['top']+_0x375901['height']/0x2:_0x375901['top']+this['_offset'];}};function L(_0x4aecbf,_0x58129c,_0x1afe1a){const _0x4101ae=E(_0x4aecbf),_0x5b3c2a=function(_0x2d98a5){const _0x3f0f2b=_0x1dbfac['document']['createRange']();return _0x3f0f2b['selectNodeContents'](_0x2d98a5),_0x3f0f2b;}(_0x1afe1a);let _0x18cb8d;if(0x0==_0x58129c){const _0x534c0f=_0xebc1a5(_0x4aecbf);_0x18cb8d=R(_0x5b3c2a['startContainer'],_0x5b3c2a['startOffset'],_0x534c0f,Array['from'](_0x534c0f['childNodes'])['indexOf'](_0x4aecbf));}else _0x18cb8d=R(_0x5b3c2a['startContainer'],_0x5b3c2a['startOffset'],_0x4aecbf,_0x58129c);const _0x59659b=R(_0x4aecbf,_0x58129c,_0x5b3c2a['endContainer'],_0x5b3c2a['endOffset']),_0x1c9aa0=new _0x28c4f2(_0x18cb8d)['bottom'];return(new _0x28c4f2(_0x59659b)['top']+_0x1c9aa0)/0x2-new _0x28c4f2(_0x4101ae)['top'];}function x(_0x498b90){let _0x12e275=_0x498b90['parent'];for(;_0x12e275['is']('$text')||_0x12e275['is']('attributeElement');)_0x12e275=_0x12e275['parent'];return _0x12e275;}function N(_0x5eded9){return _0x5eded9['hasAttribute']('width')&&_0x5eded9['hasAttribute']('height')?Promise['resolve']():new Promise(_0x343764=>{function _0x1c36f0(){_0x5eded9['removeEventListener']('load',_0x1c36f0),_0x5eded9['removeEventListener']('error',_0x1c36f0),_0x343764();}_0x5eded9['complete']?_0x343764():(_0x5eded9['addEventListener']('load',_0x1c36f0),_0x5eded9['addEventListener']('error',_0x1c36f0));});}function _(_0x28cc63){return new Promise(_0x55dfd0=>setTimeout(_0x55dfd0,_0x28cc63));}function E(_0x4d6d7e){const _0x515a06=_0x1dbfac['document']['createRange']();return _0x515a06['selectNode'](_0x4d6d7e),_0x515a06;}function S(_0x3b279d,_0x5c571d,_0x34cbfa){const _0x5de5d2=_0x1dbfac['document']['createRange']();return _0x5de5d2['setStart'](_0x3b279d,_0x5c571d),_0x5de5d2['setEnd'](_0x3b279d,_0x34cbfa),_0x5de5d2;}function R(_0xe299d0,_0x595b09,_0x4d6cdc,_0x4aee1c){const _0x4aa4a1=_0x1dbfac['document']['createRange']();return _0x4aa4a1['setStart'](_0xe299d0,_0x595b09),_0x4aa4a1['setEnd'](_0x4d6cdc,_0x4aee1c),_0x4aa4a1;}function I(_0x103e1d,_0x264989,_0x7e69a3,_0x22b0fa,_0x1ba3c0){const _0x190da6=[];for(const [_0x42aaf3,_0x112928]of _0x103e1d['childNodes']['entries']()){let _0xbf35fe=[];C(_0x112928)&&_0x112928['offsetParent']&&['static','relative']['includes'](_0x1dbfac['window']['getComputedStyle'](_0x112928)['position'])?_0xbf35fe=K(_0x112928,_0x42aaf3,_0x264989,_0x7e69a3,_0x22b0fa,_0x1ba3c0):D(_0x112928)&&(_0xbf35fe=A(_0x112928,_0x42aaf3,_0x264989,_0x7e69a3,_0x1ba3c0)),_0xbf35fe['length']&&(_0x190da6['push'](..._0xbf35fe),_0x264989+=_0xbf35fe['length']*_0x7e69a3,_0x1ba3c0=!0x1);}return _0x190da6;}function K(_0x4f16f1,_0x11e262,_0x3c9a7a,_0x2dda2e,_0x551010,_0x20311b){const _0x333cc3=[];var _0x4049e5;if((_0x4049e5=_0x4f16f1['previousSibling'])&&C(_0x4049e5)&&Boolean(_0x4049e5['classList']['contains']('page-break')||_0x4049e5['closest']('.page-break'))&&(_0x333cc3['push']({'type':'manual','offset':0x0,'path':[_0x11e262-0x1]}),_0x20311b=!0x0),'table-row'==_0x1dbfac['window']['getComputedStyle'](_0x4f16f1)['display']){let _0x20b16e=0x0,_0x20a569=!0x1;for(const _0xf6c12a of _0x4f16f1['getClientRects']())_0x20b16e+=_0xf6c12a['height'],_0xf6c12a['left']>=_0x3c9a7a&&(_0x20a569=!0x0);if(_0x20b16e<_0x551010&&_0x20a569)return _0x20311b||_0x333cc3['push']({'type':'element','offset':0x0,'path':[_0x11e262]}),_0x333cc3;}const _0x27a8d2=_0x4f16f1['closest']('figure.image');if(_0x27a8d2&&function(_0x58dc10){let _0x5de178=!0x1;const _0x2b04ef=_0x261bed(_0x58dc10)['dataset']['rootName'],_0x43fb60=_0x58dc10['nextElementSibling'],_0x53c5b0=_0x58dc10['previousElementSibling'],_0x3c330d=_0x43fb60&&_0x1dbfac['window']['getComputedStyle'](_0x43fb60)['float'],_0x5390d1=_0x43fb60&&'ck-fake-selection-container'===_0x43fb60['className'];return!_0x2b04ef||_0x43fb60||_0x53c5b0||(_0x5de178=!0x0),_0x2b04ef&&!_0x53c5b0&&_0x5390d1&&(_0x5de178=!0x0),_0x2b04ef&&!_0x53c5b0&&'none'!==_0x3c330d&&(_0x5de178=!0x0),!_0x5de178;}(_0x27a8d2)){const _0x465e4e=_0x1dbfac['window']['getComputedStyle'](_0x27a8d2)['float'];if('left'==_0x465e4e||'right'==_0x465e4e)return _0x333cc3;}const _0x4f133f=I(_0x4f16f1,_0x3c9a7a,_0x2dda2e,_0x551010,_0x20311b);if(_0x4f133f['length']){for(const _0x1da14f of _0x4f133f)_0x333cc3['push']({'type':_0x1da14f['type'],'offset':_0x1da14f['offset'],'textOffset':_0x1da14f['textOffset'],'path':[_0x11e262,..._0x1da14f['path']]}),_0x3c9a7a+=_0x2dda2e;return _0x333cc3;}return _0x333cc3['push'](...function(_0x4aeb02,_0x2480bf,_0x18101,_0x8f9bd2,_0x5e3ab7){const _0x211594=[];if('table-cell'==_0x1dbfac['window']['getComputedStyle'](_0x4aeb02)['display'])return[];const _0x19c7c9=[];for(const _0x3014b0 of _0x4aeb02['getClientRects']())if(_0x3014b0['left']>=_0x18101){for(const _0x1f2b4b of _0x19c7c9)_0x1f2b4b['height']+=_0x3014b0['height'];_0x19c7c9['push']({'height':_0x3014b0['height']}),_0x18101+=_0x8f9bd2;}for(const _0x3625b1 of _0x19c7c9)_0x5e3ab7||_0x211594['push']({'type':'element','offset':_0x3625b1['height'],'textOffset':0x0,'path':[_0x2480bf]}),_0x5e3ab7=!0x1;return _0x211594;}(_0x4f16f1,_0x11e262,_0x3c9a7a,_0x2dda2e,_0x20311b)),_0x333cc3;}function A(_0x5eb435,_0x3e0bfc,_0x17f9a5,_0x5e28cb,_0x904b63){const _0x14e79b=E(_0x5eb435),_0x3c30a3=[];let _0x53454a=0x0;for(const _0x1503f9 of _0x14e79b['getClientRects']())if(_0x1503f9['left']>=_0x17f9a5){const _0x151028=O(_0x5eb435,_0x53454a,_0x17f9a5,_0x5e28cb);_0x904b63||_0x3c30a3['push']({'type':'text','path':[_0x3e0bfc],'textOffset':_0x151028}),_0x53454a=_0x151028,_0x17f9a5+=_0x5e28cb,_0x904b63=!0x1;}return _0x3c30a3;}function O(_0x5d80a4,_0x423cb3,_0x57887f,_0x10759c){let _0x4939ff=_0x423cb3,_0x209241=_0x5d80a4['length'];for(;_0x209241-_0x4939ff>0x1;){const _0x5a5f37=Math['ceil']((_0x4939ff+_0x209241)/0x2);U(S(_0x5d80a4,_0x4939ff,_0x5a5f37),_0x57887f,_0x10759c)?_0x209241=_0x5a5f37:_0x4939ff=_0x5a5f37;}return _0x4939ff;}function U(_0x37fce7,_0x3d0528,_0x38dcf0){for(const _0x3cc1bc of _0x37fce7['getClientRects']())if(_0x3cc1bc['left']>=_0x3d0528&&_0x3cc1bc['left']<_0x3d0528+_0x38dcf0)return!0x0;return!0x1;}function C(_0x5a677c){return _0x5a677c['nodeType']==Node['ELEMENT_NODE'];}function D(_0x4556e3){return _0x4556e3['nodeType']==Node['TEXT_NODE'];}const T=/* #__PURE__ -- @preserve */
24
- _0x3adac8('px');var B=class extends _0x4b6bbf{constructor(){super();const _0x542bea=this['bindTemplate'];this['set']({'isVisible':!0x1,'left':null,'top':null,'width':null,'pageNumber':null}),this['setTemplate']({'tag':'div','attributes':{'data-page-number':_0x542bea['to']('pageNumber'),'class':['ck','ck-pagination-view-line',_0x542bea['if']('isVisible','ck-hidden',_0x29e352=>!_0x29e352)],'style':{'left':_0x542bea['to']('left',_0x37483e=>T(_0x37483e)),'top':_0x542bea['to']('top',_0x1eb7b3=>T(_0x1eb7b3)),'width':_0x542bea['to']('width',_0x435eef=>T(_0x435eef))}}});}},G=class{_viewCollection;['_visibleLines']=new Set();['_hiddenLines']=new Set();constructor(_0x1ba25d){this['_viewCollection']=_0x1ba25d['ui']['view']['body'];}get containerElement(){return this['_viewCollection']['bodyCollectionContainer'];}destroy(){for(const _0x3cd0f7 of this['_hiddenLines'])_0x3cd0f7['destroy']();}['cleanLines'](){for(const _0xbfea6 of this['_visibleLines'])_0xbfea6['isVisible']=!0x1,this['_hiddenLines']['add'](_0xbfea6);this['_visibleLines']['clear']();}['showLine'](_0x414170,_0x3e1be0,_0x2d7d43,_0x4b3394){let _0x51508a;this['_hiddenLines']['size']?(_0x51508a=_0x2b15b6(this['_hiddenLines']['values']()),this['_hiddenLines']['delete'](_0x51508a)):_0x51508a=new B(),_0x51508a['set']({'pageNumber':_0x4b3394,'left':_0x414170,'top':_0x3e1be0,'width':_0x2d7d43}),_0x51508a['isVisible']=!0x0,this['_viewCollection']['has'](_0x51508a)||this['_viewCollection']['add'](_0x51508a),this['_visibleLines']['add'](_0x51508a);}setViewCollection(_0x5c5080){for(const _0x1f47c8 of[...this['_visibleLines'],...this['_hiddenLines']])this['_viewCollection']['has'](_0x1f47c8)&&this['_viewCollection']['remove'](_0x1f47c8);this['_viewCollection']=_0x5c5080;}};const V='ck-pagination_enabled';var M=class extends _0x36fc84{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 G(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'](V),this['on']('change:isEnabled',(_0x5edeb0,_0x1a420e,_0x54fd9c)=>{_0x54fd9c||this['linesRepository']['cleanLines'](),this['_toggleEditingRootsClass'](V,_0x54fd9c);});}destroy(){this['_toggleEditingRootsClass'](V,!0x1),this['linesRepository']['destroy'](),this['_scrollableEditingRootDomAncestor']=null,this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['scrollToPage'](_0x56770f){if(!this['isEnabled'])return;const _0x5d341e=_0x56770f>0x1?this['_getPageBreakLineOffset'](_0x56770f-0x1):0x0;this['_scrollableEditingRootDomAncestor']['scrollTo']({'top':_0x5d341e-0xa,'left':this['_scrollableEditingRootDomAncestor']['scrollLeft'],'behavior':_0x3d02c4['isMotionReduced']?'instant':'smooth'});}setupScrollableAncestor(){const _0x40f7ec=this['editor'],_0xfa6ecb=this['_getAttachedDomRoot']();_0xfa6ecb?(this['_scrollableEditingRootDomAncestor']&&_0x40f7ec['ui']['view']['stopListening'](this['_scrollableEditingRootDomAncestor'],'scroll'),this['_scrollableEditingRootDomAncestor']=_0x1172bf(_0xfa6ecb),_0x40f7ec['ui']['view']['listenTo'](this['_scrollableEditingRootDomAncestor'],'scroll',()=>{this['_updatePageBreakLines']();},{'usePassive':!0x0}),this['_resizeObserver']&&this['_resizeObserver']['destroy'](),this['_resizeObserver']=new _0x471439(this['_scrollableEditingRootDomAncestor'],()=>{this['_updatePageBreakLines']();})):_0x40f7ec['ui']['once']('update',()=>this['setupScrollableAncestor']());}['_onUiReady'](){const _0x466dc5=this['editor'];this['_getAttachedDomRoot']()?(this['setupScrollableAncestor'](),_0x466dc5['ui']['view']['listenTo'](_0x1dbfac['window'],'resize',()=>this['_updatePageBreakLines']()),this['listenTo'](this['_paginationLookupPlugin'],'change:pageBreaks',()=>this['_updatePageBreakLines']())):_0x466dc5['ui']['once']('update',()=>this['_onUiReady']());}_getAttachedDomRoot(){for(const _0x20fd00 of this['editor']['editing']['view']['domRoots']['values']())if(_0x20fd00['isConnected'])return _0x20fd00;return null;}_updatePageBreakLines(){if(!this['isEnabled'])return;const _0x2a783e=this['_getAttachedDomRoot'](),_0x496a5f=this['_paginationLookupPlugin']['pageBreaks'];if(this['linesRepository']['cleanLines'](),!_0x2a783e||0x1==_0x496a5f['length'])return void(this['pageNumber']=0x1);const _0x1c08ad=new _0x28c4f2(_0x2a783e)['excludeScrollbarsAndBorders'](),_0x405ac3=new _0x28c4f2(this['_scrollableEditingRootDomAncestor'])['excludeScrollbarsAndBorders'](),_0x5d0d0a=_0x405ac3['top']+_0x405ac3['height']/0x3;let _0x5bddf2=!0x1;const _0x5b51ae=[];for(let _0x132493=0x1;_0x132493<_0x496a5f['length'];_0x132493++){const _0xb32162=this['_getPageBreakLineOffset'](_0x132493,_0x405ac3);if(!_0xb32162)continue;const _0xee9d4e=_0x405ac3['top']+_0xb32162-this['_scrollableEditingRootDomAncestor']['scrollTop'];_0x5b51ae['push']({'pageOffsetTop':_0xee9d4e,'domRootRect':_0x1c08ad,'domScrollableRect':_0x405ac3,'pageNumber':_0x132493}),_0xee9d4e>_0x5d0d0a&&!_0x5bddf2&&(this['pageNumber']=_0x132493,_0x5bddf2=!0x0);}this['_renderPageBreakLines'](_0x5b51ae),_0x5bddf2||(this['pageNumber']=_0x496a5f['length']);}['_renderPageBreakLines'](_0x54d1aa){if(!_0x54d1aa['length'])return;const {scrollX:_0x356c5e,scrollY:_0x4678ca}=_0x1dbfac['window'],_0x49e62d=_0x4ba23b(this['linesRepository']['containerElement']);let _0x4e3293,_0x1803f5;if(_0x49e62d){const _0x298f9d=new _0x28c4f2(_0x49e62d);_0x4e3293=_0x298f9d['top']+_0x49e62d['clientTop']-_0x49e62d['scrollTop'],_0x1803f5=_0x298f9d['left']+_0x49e62d['clientLeft']-_0x49e62d['scrollLeft'];}else _0x4e3293=-_0x4678ca,_0x1803f5=-_0x356c5e;for(const {domScrollableRect:_0x2db0f0,pageOffsetTop:_0xd37ea9,domRootRect:_0xebab6,pageNumber:_0x1002ab}of _0x54d1aa)_0x2db0f0['top']<_0xd37ea9&&_0xd37ea9<_0x2db0f0['bottom']&&this['linesRepository']['showLine'](_0xebab6['left']-_0x1803f5,_0xd37ea9-_0x4e3293,_0xebab6['width'],_0x1002ab+0x1);}_getPageBreakLineOffset(_0x2f4424,_0x291ace=null){const _0x5aaf81=this['_paginationLookupPlugin']['pageBreaks'][_0x2f4424]['offset'];return _0x5aaf81?(_0x291ace||(_0x291ace=new _0x28c4f2(this['_scrollableEditingRootDomAncestor'])['excludeScrollbarsAndBorders']()),_0x5aaf81-_0x291ace['top']+this['_scrollableEditingRootDomAncestor']['scrollTop']):0x0;}_toggleEditingRootsClass(_0x12ed88,_0x5e220b=!0x0){const _0x2e9a6f=this['editor']['editing']['view'];_0x2e9a6f['change'](_0x37985f=>{for(const _0x1e3a54 of _0x2e9a6f['document']['roots'])_0x5e220b?_0x37985f['addClass'](_0x12ed88,_0x1e3a54):_0x37985f['removeClass'](_0x12ed88,_0x1e3a54);});}};function $(_0x23c821,_0x35fb7e,..._0x3ee562){const t=_0x23c821['t'];switch(_0x35fb7e){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)',..._0x3ee562);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 _0x35fb7e;}}var j=class extends _0x36fc84{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'PaginationEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[v,M];}init(){this['set']({'pageNumber':0x1,'totalPages':0x1});const _0x2e98a5=this['editor']['plugins']['get']('Pagination'),_0x4ee7ac=this['editor']['plugins']['get'](v),_0x42bc7f=this['editor']['plugins']['get'](M);this['bind']('isEnabled')['to'](_0x2e98a5),this['_setUpDataDowncastConversion'](),this['bind']('pageNumber')['to'](_0x42bc7f),this['listenTo'](_0x4ee7ac,'change:pageBreaks',(_0x1eefd2,_0x3c9c00,_0x511527,_0x2c322b)=>{this['totalPages']=_0x511527['length'],this['_updatePageBreakMarkers'](_0x511527,_0x2c322b);}),this['_setupKeystrokes'](),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x208ebe=[this['editor']];for(const _0x1a3cd8 of _0x208ebe){let _0xc796f9;for(const _0xcea8ef in _0x1a3cd8){const _0x2ce6a4=_0xcea8ef,_0x26efda=_0x1a3cd8[_0x2ce6a4];if('paginationLicenseKeyValid'==_0x26efda||'paginationLicenseKeyInvalid'==_0x26efda||'paginationLicenseKeyExpired'==_0x26efda||'paginationLicenseKeyDomainLimit'==_0x26efda||'paginationLicenseKeyNotAllowed'==_0x26efda||'paginationLicenseKeyEvaluationLimit'==_0x26efda||'paginationLicenseKeyUsageLimit'==_0x26efda){delete _0x1a3cd8[_0x2ce6a4],_0xc796f9=_0x26efda,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'paginationLicenseKeyInvalid'==_0xc796f9&&_0x1a3cd8['_showLicenseError']('invalid'),'paginationLicenseKeyExpired'==_0xc796f9&&_0x1a3cd8['_showLicenseError']('expired'),'paginationLicenseKeyDomainLimit'==_0xc796f9&&_0x1a3cd8['_showLicenseError']('domainLimit'),'paginationLicenseKeyNotAllowed'==_0xc796f9&&_0x1a3cd8['_showLicenseError']('featureNotAllowed','Pagination'),'paginationLicenseKeyEvaluationLimit'==_0xc796f9&&_0x1a3cd8['_showLicenseError']('evaluationLimit'),'paginationLicenseKeyUsageLimit'==_0xc796f9&&_0x1a3cd8['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['scrollToPage'](_0x231b6c){this['isEnabled']&&this['editor']['plugins']['get'](M)['scrollToPage'](this['_validatePageNumber'](_0x231b6c));}moveSelectionToPage(_0x2c0443){if(!this['isEnabled'])return;const _0x57114c=this['editor'],_0x9e950b=this['editor']['plugins']['get'](v)['pageBreaks'][_0x2c0443-0x1];_0x9e950b&&_0x57114c['model']['change'](_0x170bb8=>{switch(_0x9e950b['type']){case'manual':{const _0x25293b=_0x57114c['model']['schema']['getNearestSelectionRange'](_0x9e950b['modelRange']['end'],'forward');_0x170bb8['setSelection'](_0x25293b);break;}case'element':{const _0x38e1bd=_0x57114c['model']['schema']['getNearestSelectionRange'](_0x9e950b['modelRange']['start'],'forward');_0x170bb8['setSelection'](_0x38e1bd);break;}case'text':{const _0x2798df=_0x9e950b['modelRange']['start'];if(_0x2798df['textNode']&&'\x20'===_0x2798df['textNode']['data'][_0x2798df['offset']]){const _0x499f47=_0x170bb8['createPositionAt'](_0x2798df['parent'],_0x2798df['offset']+0x1);_0x170bb8['setSelection'](_0x499f47);}else _0x170bb8['setSelection'](_0x9e950b['modelRange']);}}_0x57114c['editing']['view']['focus']();});}goToNextPage(){const _0x1f41be=this['_validatePageNumber'](this['pageNumber']+0x1);this['moveSelectionToPage'](_0x1f41be),this['scrollToPage'](_0x1f41be);}['goToPreviousPage'](){const _0x3cb1d6=this['_validatePageNumber'](this['pageNumber']-0x1);this['moveSelectionToPage'](_0x3cb1d6),this['scrollToPage'](_0x3cb1d6);}_updatePageBreakMarkers(_0x4e4121,_0x4b5fdc){const _0x39be0c=this['editor']['model'];this['isEnabled']&&_0x39be0c['change'](_0x2140af=>{for(let _0x4333b1=0x1;_0x4333b1<_0x4e4121['length'];_0x4333b1++){const _0x2d5383=_0x4e4121[_0x4333b1]['modelRange'],_0x7e3d6e='pagination:'+(_0x4333b1+0x1);_0x39be0c['markers']['has'](_0x7e3d6e)?_0x2140af['updateMarker'](_0x7e3d6e,{'range':_0x2d5383}):_0x2140af['addMarker'](_0x7e3d6e,{'range':_0x2d5383,'usingOperation':!0x1,'affectsData':!0x0});}for(let _0x5ef496=_0x4e4121['length'];_0x5ef496<_0x4b5fdc['length'];_0x5ef496++){const _0x5d9f61='pagination:'+(_0x5ef496+0x1);_0x39be0c['markers']['has'](_0x5d9f61)&&_0x2140af['removeMarker'](_0x5d9f61);}});}_setUpDataDowncastConversion(){this['editor']['conversion']['for']('dataDowncast')['add'](_0x5e3446=>{_0x5e3446['on']('addMarker:pagination',(_0x41ac39,{markerRange:_0x5ae779,markerName:_0x2fea7a},_0x42b55b)=>{if(!_0x42b55b['options']['pagination'])return;if(!_0x42b55b['consumable']['consume'](_0x5ae779,_0x41ac39['name']))return;const _0x5c6c1d=_0x5ae779['getContainedElement']();let _0x526db3=_0x5c6c1d?_0x42b55b['mapper']['toViewElement'](_0x5c6c1d):null;if(!_0x526db3){const _0x31c225=_0x5ae779['start'];if(_0x42b55b['schema']['checkChild'](_0x31c225,'$text')){const _0x117321=_0x42b55b['mapper']['toViewPosition'](_0x31c225);_0x526db3=_0x42b55b['writer']['createContainerElement']('span'),_0x526db3['getFillerOffset']=()=>null,_0x42b55b['writer']['insert'](_0x117321,_0x526db3);}else{const _0xdbd54f=_0x31c225['nodeAfter'];_0x526db3=_0x42b55b['mapper']['toViewElement'](_0xdbd54f);}}for(;_0x526db3['parent']!==_0x526db3['root']&&0x0===_0x526db3['index'];)_0x526db3=_0x526db3['parent'];const _0x14af58=_0x2fea7a['substring'](0xb);_0x526db3['hasClass']('page-break')||(_0x42b55b['writer']['setStyle']('page-break-before','always',_0x526db3),_0x42b55b['writer']['setAttribute']('data-pagination-page',_0x14af58,_0x526db3),_0x42b55b['mapper']['bindElementToMarker'](_0x526db3,_0x2fea7a)),_0x41ac39['stop']();});});}_setupKeystrokes(){const _0x5832ba=this['editor'];_0x5832ba['keystrokes']['set']('Shift+Pageup',(_0x3dbda6,_0x256f44)=>{this['goToPreviousPage'](),_0x256f44();}),_0x5832ba['keystrokes']['set']('Shift+Pagedown',(_0x163367,_0x184b0e)=>{this['goToNextPage'](),_0x184b0e();}),_0x5832ba['accessibility']['addKeystrokeInfoGroup']({'id':'pagination','label':$(_0x5832ba['locale'],'Keystrokes\x20for\x20navigating\x20through\x20documents'),'keystrokes':[{'label':$(_0x5832ba['locale'],'Go\x20to\x20the\x20previous\x20page\x20(also\x20move\x20selection)'),'keystroke':'Shift+Pageup','mayRequireFn':!0x0},{'label':$(_0x5832ba['locale'],'Go\x20to\x20the\x20next\x20page\x20(also\x20move\x20selection)'),'keystroke':'Shift+Pagedown','mayRequireFn':!0x0}]});}_validatePageNumber(_0x462a0d){return _0x462a0d<0x1&&(_0x462a0d=0x1),_0x462a0d>this['totalPages']&&(_0x462a0d=this['totalPages']),_0x462a0d;}},q=class extends _0x4b6bbf{['pageNumberView'];constructor(_0x3c97b6){super(_0x3c97b6);const _0x72ecb4=this['bindTemplate'];this['set']({'pageNumber':0x1,'totalPages':0x1,'isEnabled':!0x0}),this['pageNumberView']=new _0x41ccf8(_0x3c97b6,{'min':0x1,'step':0x1}),this['pageNumberView']['set']({'inputMode':'numeric','tabIndex':-0x1}),this['pageNumberView']['bind']('ariaLabel')['to'](this,'totalPages',_0x7ec8e8=>$(_0x3c97b6,'Current\x20page\x20number\x20(from\x201\x20to\x20%0)',_0x7ec8e8)),this['pageNumberView']['bind']('max')['to'](this,'totalPages'),this['pageNumberView']['bind']('isReadOnly')['to'](this,'isEnabled',_0x545cbd=>!_0x545cbd),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-page-navigator',_0x72ecb4['if']('isEnabled','ck-disabled',_0x2f18c8=>!_0x2f18c8)]},'children':[this['pageNumberView'],{'tag':'span','children':[{'text':_0x72ecb4['to']('totalPages')}]}]});}['render'](){super['render']();const _0x21a7de=this['pageNumberView']['element'],_0x16c8cb=_0x4c04c2=>{this['pageNumberView']['element']['value']=String(_0x4c04c2);};_0x16c8cb(this['pageNumber']),this['on']('change:pageNumber',(_0x5eab45,_0x4303bd,_0x319318)=>{_0x16c8cb(_0x319318);}),this['listenTo'](_0x21a7de,'keydown',(_0x29b82a,_0x2e977e)=>{if('ArrowUp'===_0x2e977e['key']||'ArrowDown'===_0x2e977e['key'])return void _0x2e977e['stopPropagation']();if(_0x2e977e['keyCode']!==_0x502e90['enter'])return;_0x2e977e['preventDefault']();const _0x1bc8e4=_0x21a7de['valueAsNumber'];Number['isNaN'](_0x1bc8e4)?_0x21a7de['value']=String(this['pageNumber']):(_0x21a7de['checkValidity']()?this['pageNumber']=_0x1bc8e4:_0x1bc8e4>this['totalPages']?(this['pageNumber']=this['totalPages'],_0x21a7de['value']=String(this['totalPages'])):(this['pageNumber']=0x1,_0x21a7de['value']='1'),this['fire']('navigation',this['pageNumber']));}),this['listenTo'](_0x21a7de,'blur',()=>{_0x21a7de['value']=String(this['pageNumber']);}),this['listenTo'](_0x21a7de,'focus',()=>{this['pageNumberView']['select']();});}['focus'](){this['pageNumberView']['element']['focus']();}},F=class extends _0x36fc84{static get['pluginName'](){return'PaginationUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x1a3d7c=this['editor'],_0x4f9574=_0x1a3d7c['plugins']['get']('PaginationEditing');_0x1a3d7c['ui']['componentFactory']['add']('pageNavigation',_0x3d5255=>{const _0x462b55=new q(_0x3d5255);return _0x462b55['bind']('pageNumber')['to'](_0x4f9574),_0x462b55['bind']('totalPages')['to'](_0x4f9574),_0x462b55['bind']('isEnabled')['to'](_0x4f9574),_0x462b55['on']('navigation',(_0x1f59ed,_0x567025)=>{_0x4f9574['moveSelectionToPage'](_0x567025),_0x4f9574['scrollToPage'](_0x567025);}),_0x462b55;}),_0x1a3d7c['ui']['componentFactory']['add']('nextPage',_0x3fae08=>{const _0xef12a4=new _0x408562(_0x3fae08);return _0xef12a4['isEnabled']=!0x0,_0xef12a4['label']=$(_0x1a3d7c['locale'],'Go\x20to\x20next\x20page'),_0xef12a4['icon']=_0x2e77e2,_0xef12a4['tooltip']=!0x0,_0xef12a4['keystroke']='Shift+PageDown',_0xef12a4['bind']('isEnabled')['to'](_0x4f9574),this['listenTo'](_0xef12a4,'execute',()=>{_0x4f9574['goToNextPage']();}),_0xef12a4;}),_0x1a3d7c['ui']['componentFactory']['add']('previousPage',_0x598920=>{const _0x31a006=new _0x408562(_0x598920);return _0x31a006['isEnabled']=!0x0,_0x31a006['label']=$(_0x1a3d7c['locale'],'Go\x20to\x20previous\x20page'),_0x31a006['icon']=_0x2e76dc,_0x31a006['tooltip']=!0x0,_0x31a006['keystroke']='Shift+PageUp',_0x31a006['bind']('isEnabled')['to'](_0x4f9574),this['listenTo'](_0x31a006,'execute',()=>{_0x4f9574['goToPreviousPage']();}),_0x31a006;});}},H=class extends _0x36fc84{static get['pluginName'](){return'Pagination';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[j,F];}constructor(_0x4a984a){super(_0x4a984a),this['isEnabled']=!0x1;}init(){this['set']({'pageNumber':0x1,'totalPages':0x1});const _0x3d9f4d=this['editor']['plugins']['get'](j);this['bind']('pageNumber')['to'](_0x3d9f4d),this['bind']('totalPages')['to'](_0x3d9f4d),_0x3d02c4['isBlink']||this['editor']['config']['get']('pagination.enableOnUnsupportedBrowsers')?this['editor']['on']('ready',()=>{this['isEnabled']=!0x0;}):this['forceDisabled']('browserCheck');}['scrollToPage'](_0x241bdc){this['editor']['plugins']['get'](j)['scrollToPage'](_0x241bdc);}};export{H as Pagination,M as PaginationRenderer};
23
+ import{Plugin as _0x27e762}from'@ckeditor/ckeditor5-core';import{ButtonView as _0x46239a,InputNumberView as _0x3ac860,View as _0x3afe1c}from'@ckeditor/ckeditor5-ui';import{Rect as _0x1200ae,ResizeObserver as _0x325303,env as _0x5b1b95,findClosestScrollableAncestor as _0x2b1bd5,first as _0x18e51a,getParentElement as _0xd9649c,getParentNode as _0x3ad0b5,getPositionedAncestor as _0x34fde7,global as _0x4e80eb,keyCodes as _0x1262af,logWarning as _0x584043,toUnit as _0x1c63ad,uid as _0x1d1587}from'@ckeditor/ckeditor5-utils';import{debounce as _0x5398e4}from'es-toolkit/compat';import{IconArrowDown as _0x203d95,IconArrowUp as _0x591476}from'@ckeditor/ckeditor5-icons';var v=class extends _0x27e762{_recalculatePageBreaksDebounced=_0x5398e4(()=>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 _0x584043('pagination-config-not-found',this['editor']['config']);const _0x548a43=this['editor']['plugins']['get']('PaginationEditing');this['bind']('isEnabled')['to'](_0x548a43),this['editor']['ui']['once']('ready',()=>this['_onUiReady']()),this['on']('change:isEnabled',(_0x2b61e8,_0x2b2ba2,_0x126bea)=>{_0x126bea&&this['_recalculatePageBreaksDebounced']();});}afterInit(){!async function(_0x39ce02){const _0x4b0e43='vsmL4TPpuR53MlqSj2VXwH9oEAN8FxJtGUOdbDCZ01ihyfkBQY6acgz7rIeWKn',_0x1ed2c0=0x79788,_0x25b032={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x9ab7bd(_0x26c3b4){const _0x56d730=new window['Promise'](_0x26b237=>{_0x26c3b4['once']('ready',_0x26b237);}),_0x469b7e=window['Date']['now'](),_0x156fa8=_0x26c3b4['config']['get']('licenseKey');async function _0x70c90c(){let _0x21cd06,_0x24eecc=null,_0x53474b=null;try{return'GPL'==_0x156fa8?'NotAllowed':(_0x21cd06=_0x2eacc7(),_0x21cd06?(_0x21cd06['usageEndpoint']&&(_0x53474b=_0x306a24(_0x21cd06['usageEndpoint'],_0x21cd06['jti'])),await _0x155c39()?_0x5afa55()?_0x372fc1()?'Expired':_0x2e356a()?('evaluation'==_0x21cd06['licenseType']&&(_0x24eecc=_0x177fc9('EvaluationLimit')),await _0x5e013f()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x372fc1(){const _0x76f757=['evaluation','trial']['includes'](_0x21cd06['licenseType'])?_0x469b7e/0x3e8:0xe10*_0x1ed2c0;return _0x21cd06['exp']<_0x76f757;}function _0x5afa55(){const _0x2b8c6e=_0x21cd06['features'];return!!_0x2b8c6e&&(!!_0x2b8c6e['includes']('*')||!!_0x2b8c6e['includes']('PAG'));}function _0x2e356a(){const _0x32d55e=_0x21cd06['licensedHosts'];if(!_0x32d55e||0x0==_0x32d55e['length'])return!0x0;const {hostname:_0x92f070}=new URL(window['location']['href']);if(_0x32d55e['includes'](_0x92f070))return!0x0;const _0x1f9ac0=_0x92f070['split']('.');return _0x32d55e['filter'](_0x2fe2ad=>_0x2fe2ad['includes']('*'))['map'](_0x2d7644=>_0x2d7644['split']('.'))['filter'](_0x407916=>_0x407916['length']<=_0x1f9ac0['length'])['map'](_0x125449=>Array(_0x1f9ac0['length']-_0x125449['length'])['fill']('*'===_0x125449[0x0]?'*':'')['concat'](_0x125449))['some'](_0x4a3d42=>_0x1f9ac0['every']((_0x4fea56,_0x267983)=>_0x4a3d42[_0x267983]===_0x4fea56||'*'===_0x4a3d42[_0x267983]));}function _0x5e013f(){return _0x24eecc&&_0x53474b?new window['Promise']((_0x378fae,_0x1c2c2d)=>{_0x24eecc['then'](_0x378fae,_0x1c2c2d),_0x53474b['then'](_0x304cdf=>{'Valid'!=_0x304cdf&&_0x378fae(_0x304cdf);},_0x1c2c2d);}):_0x24eecc||_0x53474b||'Valid';}}function _0x306a24(_0x43be63,_0x49cbb1){return new window['Promise'](_0x448178=>{if(_0x486991())return _0x448178('Valid');_0x259656(),_0x26c3b4['decorate']('_sendUsageRequest');let _0x57b8c9=!0x1;const _0x3b8d6b=_0x1d1587();function _0x453284(_0x1017fa){return!!_0x1017fa&&('object'==typeof _0x1017fa||'function'==typeof _0x1017fa)&&'function'==typeof _0x1017fa['then']&&'function'==typeof _0x1017fa['catch'];}function _0xe43e14(_0x1b90c7){_0x58fea2(_0x1b90c7)['then'](_0x5df869=>_0x5df869&&'ok'==_0x5df869['status']?_0x4eff44(_0x4c289b(_0x3b8d6b+_0x49cbb1))!=_0x5df869['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x48c1c9=>(_0x1ffbaa(),_0x48c1c9),()=>{const _0x469328=_0x4776cf();return null==_0x469328?(_0x1ffbaa(),'Valid'):_0x469b7e-_0x469328>0x240c8400?'UsageLimit':'Valid';})['then'](_0x448178)['catch'](()=>{_0x448178('UsageLimit');});const _0x195e46=0x36ee80;function _0x1ffbaa(){const _0x590dd6='llct-'+_0x4eff44(_0x4c289b(_0x43be63)),_0x33cec3=_0xf7b5ed(_0x4eff44(window['Math']['ceil'](_0x469b7e/_0x195e46)));window['localStorage']['setItem'](_0x590dd6,_0x33cec3);}function _0x4776cf(){const _0x1ec498='llct-'+_0x4eff44(_0x4c289b(_0x43be63)),_0x387b70=window['localStorage']['getItem'](_0x1ec498);return _0x387b70?window['parseInt'](_0xf7b5ed(_0x387b70),0x10)*_0x195e46:null;}function _0x58fea2(_0x510fef){return new window['Promise']((_0x2fbb36,_0x3f4636)=>{_0x510fef['then'](_0x2fbb36,_0x3f4636),window['setTimeout'](_0x3f4636,0x1d4c0);});}}_0x26c3b4['on']('_sendUsageRequest',(_0x2a9934,_0x94e9f5)=>{if(_0x94e9f5[0x0]!=_0x43be63)return _0x448178('UsageLimit');_0x94e9f5[0x1]={..._0x94e9f5[0x1],'requestId':_0x3b8d6b};},{'priority':'high'}),_0x26c3b4['on']('_sendUsageRequest',_0x325cfb=>{_0x453284(_0x325cfb['return'])&&(_0x57b8c9=!0x0,_0xe43e14(_0x325cfb['return']));},{'priority':'low'}),_0x56d730['then'](()=>{_0x57b8c9||_0x448178('UsageLimit');});});function _0x486991(){return'auto'==_0x26c3b4['editing']['view']['_overlayModeHint'];}function _0x259656(){_0x26c3b4['editing']['view']['_overlayModeHint']='auto';}}function _0x177fc9(_0x543d84){const _0x52f186=[new window['Promise'](_0x145580=>setTimeout(_0x145580,0x93ecc)),_0x56d730['then'](()=>new window['Promise'](_0x20f2bd=>{let _0xb981bd=0x0;_0x26c3b4['model']['on']('applyOperation',(_0x40bd19,_0x24bf8b)=>{_0x24bf8b[0x0]['isDocumentOperation']&&_0xb981bd++,0x5e8==_0xb981bd&&(_0x20f2bd(),_0x40bd19['off']());});}))];return window['Promise']['race'](_0x52f186)['then'](()=>_0x543d84);}async function _0x5a599e(){await _0x56d730,_0x26c3b4['model']['change']=_0x2c49f5,_0x26c3b4['model']['enqueueChange']=_0x2c49f5,_0x26c3b4['enableReadOnlyMode']('model');}function _0x251554(_0x1d3182){const _0x2767af=_0x55b37a();_0x26c3b4[_0x2767af]='paginationLicenseKey'+_0x1d3182,'Valid'!=_0x1d3182&&_0x5a599e();}function _0x55b37a(){const _0x234580=window['String'](window['performance']['now']())['replace']('.','');let _0x1ec548='v';for(let _0x448b17=0x0;_0x448b17<_0x234580['length'];_0x448b17+=0x2){let _0x2f39cb=window['parseInt'](_0x234580['substring'](_0x448b17,_0x448b17+0x2));_0x2f39cb>=0x3e&&(_0x2f39cb-=0x3e),_0x1ec548+=_0x4b0e43[_0x2f39cb];}return _0x1ec548;}function _0x2eacc7(){const _0x5828cf=_0x156fa8['split']('.');if(0x3!=_0x5828cf['length'])return null;return _0x3b9ab6(_0x5828cf[0x1]);function _0x3b9ab6(_0x3c6ccd){const _0x4445e2=_0x2a8e35(_0x3c6ccd);return _0x4445e2&&_0x224616()?_0x4445e2:null;function _0x224616(){const _0xb0f119=_0x4445e2['jti'],_0x31f74e=window['parseInt'](_0xb0f119['substring'](_0xb0f119['length']-0x8),0x10),_0x3b40ab={..._0x4445e2,'jti':_0xb0f119['substring'](0x0,_0xb0f119['length']-0x8)};return delete _0x3b40ab['vc'],_0x4c289b(_0x3b40ab)==_0x31f74e;}}}async function _0x155c39(){let _0x3f1d11=!0x0;try{const [_0x387a32,_0x45ec47,_0x3d6888]=_0x156fa8['split']('.');return _0x263573(_0x387a32),await _0x2b204d(_0x387a32,_0x45ec47,_0x3d6888),_0x3f1d11;}catch{return!0x1;}function _0x263573(_0x10d251){const _0x2d5b6e=_0x2a8e35(_0x10d251);_0x2d5b6e&&'ES256'==_0x2d5b6e['alg']||(_0x3f1d11=!0x1);}async function _0x2b204d(_0x17dd22,_0x50b85c,_0x21a487){const _0x569b69=window['Uint8Array']['from'](_0x2ea837(_0x21a487),_0x43d166=>_0x43d166['charCodeAt'](0x0)),_0x5f1227=new window['TextEncoder']()['encode'](_0x17dd22+'.'+_0x50b85c),_0x4baa75=window['crypto']['subtle'];if(!_0x4baa75)return;const _0x3f246c=await _0x4baa75['importKey']('jwk',_0x25b032,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4baa75['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3f246c,_0x569b69,_0x5f1227)||(_0x3f1d11=!0x1);}}function _0x2a8e35(_0x5198a2){return _0x5198a2['startsWith']('ey')?JSON['parse'](_0x2ea837(_0x5198a2)):null;}function _0x2ea837(_0x553f01){return window['atob'](_0x553f01['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4c289b(_0x2e0921){let _0x3ae23a=0x1505;function _0x42e18a(_0x1b6510){for(let _0x1cacad=0x0;_0x1cacad<_0x1b6510['length'];_0x1cacad++){const _0x3e046b=_0x1b6510['charCodeAt'](_0x1cacad);_0x3ae23a=(_0x3ae23a<<0x5)+_0x3ae23a+_0x3e046b,_0x3ae23a&=_0x3ae23a;}}function _0x83f4c9(_0x35b6d5){Array['isArray'](_0x35b6d5)?_0x35b6d5['forEach'](_0x83f4c9):_0x35b6d5&&'object'==typeof _0x35b6d5?Object['entries'](_0x35b6d5)['sort']()['forEach'](([_0x1e3c06,_0x5614c2])=>{_0x42e18a(_0x1e3c06),_0x83f4c9(_0x5614c2);}):_0x42e18a(window['String'](_0x35b6d5));}return _0x83f4c9(_0x2e0921),_0x3ae23a>>>0x0;}function _0x4eff44(_0x1e0947){return _0x1e0947['toString'](0x10)['padStart'](0x8,'0');}function _0xf7b5ed(_0x2d3b75){return _0x2d3b75['split']('')['reverse']()['join']('');}function _0x2c49f5(){}_0x251554(await _0x70c90c());}_0x9ab7bd(_0x39ce02['editor']);}(this);}destroy(){super['destroy'](),this['_recalculatePageBreaksDebounced']['cancel'](),this['_pagesContainer']&&(this['_pagesContainer']['destroy'](),this['_pagesContainer']['element']['remove']());}['_onUiReady'](){const _0x5eaede=this['editor'],_0x41ea89=_0x5eaede['editing']['view'],_0x55a531=this['_getAttachedDomRoot']();if(!_0x55a531||!_0x55a531['hasChildNodes']())return void _0x5eaede['ui']['once']('update',()=>this['_onUiReady']());const {pageWidth:_0x34b471,pageHeight:_0x2e8447}=_0x5eaede['config']['get']('pagination'),{top:_0x1d385a,left:_0x116d22,bottom:_0x571fca,right:_0x41ec53}=this['_configuredPaddings'];this['_pagesContainer']=new _0x3afe1c(_0x5eaede['locale']);const _0x113abb=this['_pagesContainer'];_0x113abb['set']('class',''),_0x113abb['setTemplate']({'tag':'div','attributes':{'style':{'columnWidth':_0x34b471,'width':_0x34b471,'height':'calc(\x20'+_0x2e8447+'\x20-\x20'+_0x1d385a+'\x20-\x20'+_0x571fca+'\x20+\x200.5mm\x20)','minWidth':'auto','minHeight':'auto','padding':'0\x20'+_0x41ec53+'\x200\x20'+_0x116d22,'columnGap':'calc('+_0x116d22+'\x20+\x20'+_0x41ec53+'\x20+\x20100px)','border':0x0,'boxSizing':'border-box','columnCount':'auto','columnFill':'auto','overflow':'hidden','position':'absolute','top':'-99999px','left':'-99999px'},'class':_0x113abb['bindTemplate']['to']('class')}}),_0x113abb['render'](),_0x3ad0b5(_0x55a531)['insertBefore'](_0x113abb['element'],_0x55a531['nextSibling']),this['listenTo'](_0x41ea89,'render',()=>this['_recalculatePageBreaksDebounced'](),{'priority':'low'}),this['_recalculatePageBreaksDebounced']();}_getAttachedDomRoot(){for(const _0x39a57b of this['editor']['editing']['view']['domRoots']['values']())if(_0x39a57b['isConnected'])return _0x39a57b;return null;}_recalculatePageBreaks(){if(!this['isEnabled'])return Promise['resolve']();const _0x56c356=this['editor']['editing']['view'],_0x3a9427=this['_pagesContainer'],_0x241858=this['_getAttachedDomRoot']();if(!_0x241858||!_0x3a9427)return Promise['resolve']();for(_0x3a9427['class']=['ck-reset','ck-pagination-view',..._0x241858['classList']]['join']('\x20');_0x3a9427['element']['firstChild'];)_0x3a9427['element']['firstChild']['remove']();const _0x13be81=Array['from'](_0x56c356['domRoots']);_0x13be81['sort'](([,_0x389324],[,_0xf66fb4])=>_0x389324['compareDocumentPosition'](_0xf66fb4)==Node['DOCUMENT_POSITION_PRECEDING']?0x1:-0x1);for(const [_0x466eb3,_0x506880]of _0x13be81){const _0x2e3c6f=_0x506880['cloneNode'](!0x0);'attributeStyleMap'in _0x2e3c6f&&_0x2e3c6f['attributeStyleMap']['clear'](),_0x2e3c6f['dataset']['rootName']=_0x466eb3,_0x2e3c6f['className']='ck-content\x20ck-pagination_enabled',_0x2e3c6f['removeAttribute']('id'),_0x2e3c6f['tabIndex']=-0x1,_0x3a9427['element']['append'](_0x2e3c6f);}const _0x39bd6b=Array['from'](_0x3a9427['element']['querySelectorAll']('img'));return function(_0x3f489a){return Promise['all'](_0x3f489a['map'](_0x6b2a55=>Promise['race']([N(_0x6b2a55),_(0x3e8)])));}(_0x39bd6b)['then'](()=>{for(const _0x22549c of _0x39bd6b['filter'](_0x2b4b88=>!_0x2b4b88['closest']('table')))if(_0x22549c['offsetParent']){const _0xcc23ee=_0x4e80eb['window']['getComputedStyle'](_0x22549c),_0x52d19e=_0x4e80eb['document']['createElement']('span');for(const _0x25a20d of _0xcc23ee)_0x52d19e['style']['setProperty'](_0x25a20d,_0xcc23ee[_0x25a20d]);_0x52d19e['style']['backgroundImage']='url(\x20'+_0x22549c['src']+'\x20)',_0x52d19e['style']['breakInside']='avoid','PICTURE'==_0x22549c['parentElement']?.['tagName']?_0x22549c['parentElement']['replaceWith'](_0x52d19e):_0x22549c['replaceWith'](_0x52d19e);}return new Promise(_0x5b6683=>_0x4e80eb['window']['requestAnimationFrame'](()=>_0x5b6683()));})['then'](()=>{this['_updatePageBreaksData']();});}_updatePageBreaksData(){const _0x450140=this['_pagesContainer']['element'];if(!_0x450140['isConnected'])return;const _0x58bcee=new _0x1200ae(_0x450140)['excludeScrollbarsAndBorders'](),_0x54bc02=Math['floor'](_0x58bcee['width']+0x64),_0x3915d8=I(_0x450140,Math['floor'](_0x58bcee['left']-_0x450140['scrollLeft']),_0x54bc02,_0x58bcee['height'])['map'](_0x5cb323=>this['_mapPageStarterInfoToPageBreakInfo'](_0x5cb323))['filter'](_0x152458=>!0x1!==_0x152458);_0x3915d8['every'](_0x456431=>!!_0x456431)&&(this['pageBreaks']=_0x3915d8);}_mapPageStarterInfoToPageBreakInfo(_0x8aec18){const _0x515354=this['editor']['editing']['view'],_0x5d1ec5=this['editor']['editing']['mapper'],_0x2c3bbb=_0x515354['domConverter'],_0x2bba90=_0x8aec18['path']['shift'](),_0x4e6a42=this['_pagesContainer']['element']['childNodes'][_0x2bba90]['dataset']['rootName'],_0x4ff50b=_0x515354['getDomRoot'](_0x4e6a42);if(!_0x4ff50b)return null;const _0xfed17e=function(_0x42fdac,_0x48cec4){let _0x4caee0=_0x42fdac;for(const _0x2cbffa of _0x48cec4['path']){if(!_0x4caee0)return null;_0x4caee0=_0x4caee0['childNodes'][_0x2cbffa];}return _0x4caee0;}(_0x4ff50b,_0x8aec18);if(!_0xfed17e)return null;const _0x255cd4=_0x2c3bbb['domPositionToView'](_0xfed17e,_0x8aec18['textOffset']||0x0);return _0x255cd4?'manual'==_0x8aec18['type']?this['_mapManualPageStarterInfoToPageBreakInfo'](_0x255cd4,_0xfed17e):'text'==_0x8aec18['type']&&_0x5d1ec5['toModelPosition'](_0x255cd4)['offset']?this['_mapTextPageStarterInfoToPageBreakInfo'](_0x255cd4,_0xfed17e,_0x8aec18['textOffset']):this['_mapElementPageStarterInfoToPageBreakInfo'](_0x255cd4,_0xfed17e,_0x8aec18['offset']):null;}_mapManualPageStarterInfoToPageBreakInfo(_0x27e58d,_0x7770ac){const _0x206554=this['editor']['model'],_0x2d28b8=this['editor']['editing']['mapper']['toModelElement'](_0x27e58d['parent']),_0x9325ea=_0x206554['createRangeOn'](_0x2d28b8);return new k({'type':'manual','modelRange':_0x9325ea,'domNode':_0x7770ac,'offset':0x0});}_mapTextPageStarterInfoToPageBreakInfo(_0xad0663,_0x6b2331,_0x549c61){const _0x140c00=this['editor']['model'],_0x2a9fc3=this['editor']['editing']['mapper'],_0x1fccab=this['editor']['editing']['view']['domConverter'];if(_0x549c61>=_0x6b2331['length'])return null;const _0x1ed83b=_0x2a9fc3['toModelPosition'](_0xad0663),_0x286bea=_0x140c00['createRange'](_0x1ed83b),_0x48cf90=_0x2a9fc3['findMappedViewAncestor'](_0xad0663),_0x3262ad=_0x1fccab['mapViewToDom'](_0x48cf90);return new k({'type':'text','modelRange':_0x286bea,'domNode':_0x6b2331,'offset':L(_0x6b2331,_0x549c61,_0x3262ad)});}_mapElementPageStarterInfoToPageBreakInfo(_0xc264d1,_0xbcce81,_0x26a9e6){const _0x39cfc1=this['editor']['model'],_0xd20988=this['editor']['editing'],_0xfa37ee=_0xd20988['mapper'],_0x335c12=_0xd20988['view']['domConverter'],_0x4905d1=_0xfa37ee['findMappedViewAncestor'](_0xc264d1),_0x4881a2=_0xfa37ee['toModelElement'](_0x4905d1);if(!_0x4881a2||_0x4881a2['is']('rootElement'))return!0x1;const _0x2d0686=function(_0x53892a){const _0x437944=_0x53892a['parent'],_0x323b46=_0x437944['root']['document']['model'],_0xc53fba=_0x437944['getAncestors']({'parentFirst':!0x0,'includeSelf':!0x0});let _0x281719=null;for(const _0x13cff6 of _0xc53fba){if(_0x13cff6['is']('rootElement'))return _0x281719;if(!_0x323b46['createPositionBefore'](_0x13cff6)['isTouching'](_0x53892a))return _0x281719;_0x281719=_0x13cff6;}}(_0x39cfc1['createPositionBefore'](_0x4881a2))||_0x4881a2;let _0x228521=_0xfa37ee['toViewElement'](_0x2d0686),_0x2f4a52=_0x39cfc1['createRangeOn'](_0x2d0686);const _0x4374c2=_0x39cfc1['createPositionBefore'](_0x2d0686)['nodeBefore'];if(_0x4374c2&&_0x4374c2['is']('element','imageBlock')){const _0x2186bc=_0xfa37ee['toViewElement'](_0x4374c2),_0x467f6e=_0x335c12['mapViewToDom'](_0x2186bc),_0x1f1405=_0x4e80eb['window']['getComputedStyle'](_0x467f6e)['float'];'left'!=_0x1f1405&&'right'!=_0x1f1405||(_0x2f4a52=_0x39cfc1['createRangeOn'](_0x4374c2));}for(;_0x228521['parent']!==_0x228521['root']&&0x0===_0x228521['index'];)_0x228521=_0x228521['parent'];const _0x38e21f=new _0x1200ae(C(_0xbcce81)?_0xbcce81:E(_0xbcce81)),_0xe3b785=_0x26a9e6?_0x38e21f['height']-_0x26a9e6:0x0,_0x26a130=_0x335c12['mapViewToDom'](_0x228521),_0x165269=new _0x1200ae(_0x26a130);return new k({'type':'element','modelRange':_0x2f4a52,'domNode':_0x26a130,'offset':Math['round'](_0xe3b785)||_0x4905d1!=x(_0xc264d1)?_0xe3b785+_0x38e21f['top']-_0x165269['top']:0x0});}get['_configuredPaddings'](){const _0x1b9f77=this['editor']['config']['get']('pagination.pageMargins');return Object['assign']({'top':'10mm','bottom':'10mm','left':'10mm','right':'10mm'},_0x1b9f77);}static _findPageStarterInfos(_0x198a56,_0x27cf73,_0x2b5b75,_0x2d8bbd,_0x319af5){return I(_0x198a56,_0x27cf73,_0x2b5b75,_0x2d8bbd,_0x319af5);}},k=class{type;['modelRange'];['_domNode'];_offset;constructor({type:_0x419b95,modelRange:_0x5885cc,domNode:_0xda2b5a,offset:_0x5d5467}){this['type']=_0x419b95,this['modelRange']=_0x5885cc,this['_domNode']=_0xda2b5a,this['_offset']=_0x5d5467;}get offset(){if(!this['_domNode']['isConnected'])return 0x0;const _0x17f166=new _0x1200ae(C(this['_domNode'])?this['_domNode']:E(this['_domNode']));return'manual'==this['type']?_0x17f166['top']+_0x17f166['height']/0x2:_0x17f166['top']+this['_offset'];}};function L(_0x513ed9,_0x386b92,_0x19a529){const _0x573f8c=E(_0x513ed9),_0x1212bf=function(_0xf2e84d){const _0x469a93=_0x4e80eb['document']['createRange']();return _0x469a93['selectNodeContents'](_0xf2e84d),_0x469a93;}(_0x19a529);let _0x1bf9d3;if(0x0==_0x386b92){const _0x2a6230=_0x3ad0b5(_0x513ed9);_0x1bf9d3=R(_0x1212bf['startContainer'],_0x1212bf['startOffset'],_0x2a6230,Array['from'](_0x2a6230['childNodes'])['indexOf'](_0x513ed9));}else _0x1bf9d3=R(_0x1212bf['startContainer'],_0x1212bf['startOffset'],_0x513ed9,_0x386b92);const _0x3ef78b=R(_0x513ed9,_0x386b92,_0x1212bf['endContainer'],_0x1212bf['endOffset']),_0x200e3f=new _0x1200ae(_0x1bf9d3)['bottom'];return(new _0x1200ae(_0x3ef78b)['top']+_0x200e3f)/0x2-new _0x1200ae(_0x573f8c)['top'];}function x(_0x28be93){let _0x1ee3d7=_0x28be93['parent'];for(;_0x1ee3d7['is']('$text')||_0x1ee3d7['is']('attributeElement');)_0x1ee3d7=_0x1ee3d7['parent'];return _0x1ee3d7;}function N(_0x2e99ca){return _0x2e99ca['hasAttribute']('width')&&_0x2e99ca['hasAttribute']('height')?Promise['resolve']():new Promise(_0x16046d=>{function _0x19c2bf(){_0x2e99ca['removeEventListener']('load',_0x19c2bf),_0x2e99ca['removeEventListener']('error',_0x19c2bf),_0x16046d();}_0x2e99ca['complete']?_0x16046d():(_0x2e99ca['addEventListener']('load',_0x19c2bf),_0x2e99ca['addEventListener']('error',_0x19c2bf));});}function _(_0x5187c4){return new Promise(_0x1c8641=>setTimeout(_0x1c8641,_0x5187c4));}function E(_0x45554f){const _0x5aec63=_0x4e80eb['document']['createRange']();return _0x5aec63['selectNode'](_0x45554f),_0x5aec63;}function S(_0x12d486,_0x16c299,_0x4ea6f){const _0x2a2c74=_0x4e80eb['document']['createRange']();return _0x2a2c74['setStart'](_0x12d486,_0x16c299),_0x2a2c74['setEnd'](_0x12d486,_0x4ea6f),_0x2a2c74;}function R(_0x580f89,_0xbf2c4f,_0x25fcc1,_0x45b280){const _0x55f518=_0x4e80eb['document']['createRange']();return _0x55f518['setStart'](_0x580f89,_0xbf2c4f),_0x55f518['setEnd'](_0x25fcc1,_0x45b280),_0x55f518;}function I(_0x414d3d,_0xe944cf,_0x246007,_0x5b9864,_0x1f84a4){const _0x4c5789=[];for(const [_0x792b13,_0x704cb4]of _0x414d3d['childNodes']['entries']()){let _0x52ef57=[];C(_0x704cb4)&&_0x704cb4['offsetParent']&&['static','relative']['includes'](_0x4e80eb['window']['getComputedStyle'](_0x704cb4)['position'])?_0x52ef57=K(_0x704cb4,_0x792b13,_0xe944cf,_0x246007,_0x5b9864,_0x1f84a4):D(_0x704cb4)&&(_0x52ef57=A(_0x704cb4,_0x792b13,_0xe944cf,_0x246007,_0x1f84a4)),_0x52ef57['length']&&(_0x4c5789['push'](..._0x52ef57),_0xe944cf+=_0x52ef57['length']*_0x246007,_0x1f84a4=!0x1);}return _0x4c5789;}function K(_0x49feac,_0xdbeb2e,_0x2b341d,_0x17c3cb,_0x1df968,_0x33fd74){const _0x19dbbd=[];var _0x5ae66c;if((_0x5ae66c=_0x49feac['previousSibling'])&&C(_0x5ae66c)&&Boolean(_0x5ae66c['classList']['contains']('page-break')||_0x5ae66c['closest']('.page-break'))&&(_0x19dbbd['push']({'type':'manual','offset':0x0,'path':[_0xdbeb2e-0x1]}),_0x33fd74=!0x0),'table-row'==_0x4e80eb['window']['getComputedStyle'](_0x49feac)['display']){let _0x2434b8=0x0,_0x3662d5=!0x1;for(const _0xa78d46 of _0x49feac['getClientRects']())_0x2434b8+=_0xa78d46['height'],_0xa78d46['left']>=_0x2b341d&&(_0x3662d5=!0x0);if(_0x2434b8<_0x1df968&&_0x3662d5)return _0x33fd74||_0x19dbbd['push']({'type':'element','offset':0x0,'path':[_0xdbeb2e]}),_0x19dbbd;}const _0x47c23e=_0x49feac['closest']('figure.image');if(_0x47c23e&&function(_0x21efc6){let _0x372d88=!0x1;const _0x2ad14d=_0xd9649c(_0x21efc6)['dataset']['rootName'],_0x1b6797=_0x21efc6['nextElementSibling'],_0x26a4a6=_0x21efc6['previousElementSibling'],_0x5e33a2=_0x1b6797&&_0x4e80eb['window']['getComputedStyle'](_0x1b6797)['float'],_0x402b53=_0x1b6797&&'ck-fake-selection-container'===_0x1b6797['className'];return!_0x2ad14d||_0x1b6797||_0x26a4a6||(_0x372d88=!0x0),_0x2ad14d&&!_0x26a4a6&&_0x402b53&&(_0x372d88=!0x0),_0x2ad14d&&!_0x26a4a6&&'none'!==_0x5e33a2&&(_0x372d88=!0x0),!_0x372d88;}(_0x47c23e)){const _0x56c051=_0x4e80eb['window']['getComputedStyle'](_0x47c23e)['float'];if('left'==_0x56c051||'right'==_0x56c051)return _0x19dbbd;}const _0x49ce9f=I(_0x49feac,_0x2b341d,_0x17c3cb,_0x1df968,_0x33fd74);if(_0x49ce9f['length']){for(const _0x367f0d of _0x49ce9f)_0x19dbbd['push']({'type':_0x367f0d['type'],'offset':_0x367f0d['offset'],'textOffset':_0x367f0d['textOffset'],'path':[_0xdbeb2e,..._0x367f0d['path']]}),_0x2b341d+=_0x17c3cb;return _0x19dbbd;}return _0x19dbbd['push'](...function(_0x25a863,_0x123c3e,_0x323176,_0x2db837,_0xe4c34b){const _0x5c16fe=[];if('table-cell'==_0x4e80eb['window']['getComputedStyle'](_0x25a863)['display'])return[];const _0x406ee4=[];for(const _0x2e3122 of _0x25a863['getClientRects']())if(_0x2e3122['left']>=_0x323176){for(const _0x278ada of _0x406ee4)_0x278ada['height']+=_0x2e3122['height'];_0x406ee4['push']({'height':_0x2e3122['height']}),_0x323176+=_0x2db837;}for(const _0x35ebce of _0x406ee4)_0xe4c34b||_0x5c16fe['push']({'type':'element','offset':_0x35ebce['height'],'textOffset':0x0,'path':[_0x123c3e]}),_0xe4c34b=!0x1;return _0x5c16fe;}(_0x49feac,_0xdbeb2e,_0x2b341d,_0x17c3cb,_0x33fd74)),_0x19dbbd;}function A(_0x22bbec,_0x42f37e,_0x10d907,_0x51354e,_0x553e38){const _0x3bbb6a=E(_0x22bbec),_0x373e2f=[];let _0x4c7510=0x0;for(const _0x34be71 of _0x3bbb6a['getClientRects']())if(_0x34be71['left']>=_0x10d907){const _0x3bbf04=O(_0x22bbec,_0x4c7510,_0x10d907,_0x51354e);_0x553e38||_0x373e2f['push']({'type':'text','path':[_0x42f37e],'textOffset':_0x3bbf04}),_0x4c7510=_0x3bbf04,_0x10d907+=_0x51354e,_0x553e38=!0x1;}return _0x373e2f;}function O(_0x329d47,_0x15d08a,_0x2a2099,_0x538dfa){let _0x241069=_0x15d08a,_0x3a2690=_0x329d47['length'];for(;_0x3a2690-_0x241069>0x1;){const _0x1d5385=Math['ceil']((_0x241069+_0x3a2690)/0x2);U(S(_0x329d47,_0x241069,_0x1d5385),_0x2a2099,_0x538dfa)?_0x3a2690=_0x1d5385:_0x241069=_0x1d5385;}return _0x241069;}function U(_0x5a5abd,_0x82c804,_0xc5be00){for(const _0x11dcbd of _0x5a5abd['getClientRects']())if(_0x11dcbd['left']>=_0x82c804&&_0x11dcbd['left']<_0x82c804+_0xc5be00)return!0x0;return!0x1;}function C(_0x2e4e94){return _0x2e4e94['nodeType']==Node['ELEMENT_NODE'];}function D(_0x5e4af0){return _0x5e4af0['nodeType']==Node['TEXT_NODE'];}const T=/* #__PURE__ -- @preserve */
24
+ _0x1c63ad('px');var B=class extends _0x3afe1c{constructor(){super();const _0x129db5=this['bindTemplate'];this['set']({'isVisible':!0x1,'left':null,'top':null,'width':null,'pageNumber':null}),this['setTemplate']({'tag':'div','attributes':{'data-page-number':_0x129db5['to']('pageNumber'),'class':['ck','ck-pagination-view-line',_0x129db5['if']('isVisible','ck-hidden',_0x1d0ac4=>!_0x1d0ac4)],'style':{'left':_0x129db5['to']('left',_0x290fbb=>T(_0x290fbb)),'top':_0x129db5['to']('top',_0x1fbbfd=>T(_0x1fbbfd)),'width':_0x129db5['to']('width',_0x1f5f36=>T(_0x1f5f36))}}});}},G=class{_viewCollection;['_visibleLines']=new Set();['_hiddenLines']=new Set();constructor(_0x32cdc5){this['_viewCollection']=_0x32cdc5['ui']['view']['body'];}get containerElement(){return this['_viewCollection']['bodyCollectionContainer'];}destroy(){for(const _0x36e0b9 of this['_hiddenLines'])_0x36e0b9['destroy']();}['cleanLines'](){for(const _0x4b6193 of this['_visibleLines'])_0x4b6193['isVisible']=!0x1,this['_hiddenLines']['add'](_0x4b6193);this['_visibleLines']['clear']();}['showLine'](_0x491c00,_0x308d3a,_0x21f955,_0x19ea58){let _0x4d8ea4;this['_hiddenLines']['size']?(_0x4d8ea4=_0x18e51a(this['_hiddenLines']['values']()),this['_hiddenLines']['delete'](_0x4d8ea4)):_0x4d8ea4=new B(),_0x4d8ea4['set']({'pageNumber':_0x19ea58,'left':_0x491c00,'top':_0x308d3a,'width':_0x21f955}),_0x4d8ea4['isVisible']=!0x0,this['_viewCollection']['has'](_0x4d8ea4)||this['_viewCollection']['add'](_0x4d8ea4),this['_visibleLines']['add'](_0x4d8ea4);}setViewCollection(_0x2dc11a){for(const _0x4a9f5a of[...this['_visibleLines'],...this['_hiddenLines']])this['_viewCollection']['has'](_0x4a9f5a)&&this['_viewCollection']['remove'](_0x4a9f5a);this['_viewCollection']=_0x2dc11a;}};const V='ck-pagination_enabled';var M=class extends _0x27e762{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 G(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'](V),this['on']('change:isEnabled',(_0x3e038c,_0x2f73fa,_0x259bac)=>{_0x259bac||this['linesRepository']['cleanLines'](),this['_toggleEditingRootsClass'](V,_0x259bac);});}destroy(){this['_toggleEditingRootsClass'](V,!0x1),this['linesRepository']['destroy'](),this['_scrollableEditingRootDomAncestor']=null,this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['scrollToPage'](_0x2ae5d9){if(!this['isEnabled'])return;const _0x2cc30e=_0x2ae5d9>0x1?this['_getPageBreakLineOffset'](_0x2ae5d9-0x1):0x0;this['_scrollableEditingRootDomAncestor']['scrollTo']({'top':_0x2cc30e-0xa,'left':this['_scrollableEditingRootDomAncestor']['scrollLeft'],'behavior':_0x5b1b95['isMotionReduced']?'instant':'smooth'});}setupScrollableAncestor(){const _0x4ef34d=this['editor'],_0x181e45=this['_getAttachedDomRoot']();_0x181e45?(this['_scrollableEditingRootDomAncestor']&&_0x4ef34d['ui']['view']['stopListening'](this['_scrollableEditingRootDomAncestor'],'scroll'),this['_scrollableEditingRootDomAncestor']=_0x2b1bd5(_0x181e45),_0x4ef34d['ui']['view']['listenTo'](this['_scrollableEditingRootDomAncestor'],'scroll',()=>{this['_updatePageBreakLines']();},{'usePassive':!0x0}),this['_resizeObserver']&&this['_resizeObserver']['destroy'](),this['_resizeObserver']=new _0x325303(this['_scrollableEditingRootDomAncestor'],()=>{this['_updatePageBreakLines']();})):_0x4ef34d['ui']['once']('update',()=>this['setupScrollableAncestor']());}['_onUiReady'](){const _0x43d037=this['editor'];this['_getAttachedDomRoot']()?(this['setupScrollableAncestor'](),_0x43d037['ui']['view']['listenTo'](_0x4e80eb['window'],'resize',()=>this['_updatePageBreakLines']()),this['listenTo'](this['_paginationLookupPlugin'],'change:pageBreaks',()=>this['_updatePageBreakLines']())):_0x43d037['ui']['once']('update',()=>this['_onUiReady']());}_getAttachedDomRoot(){for(const _0x5efb36 of this['editor']['editing']['view']['domRoots']['values']())if(_0x5efb36['isConnected'])return _0x5efb36;return null;}_updatePageBreakLines(){if(!this['isEnabled'])return;const _0x1c5c7b=this['_getAttachedDomRoot'](),_0x1fb36e=this['_paginationLookupPlugin']['pageBreaks'];if(this['linesRepository']['cleanLines'](),!_0x1c5c7b||0x1==_0x1fb36e['length'])return void(this['pageNumber']=0x1);const _0x58ea45=new _0x1200ae(_0x1c5c7b)['excludeScrollbarsAndBorders'](),_0x2c3df0=new _0x1200ae(this['_scrollableEditingRootDomAncestor'])['excludeScrollbarsAndBorders'](),_0x36d193=_0x2c3df0['top']+_0x2c3df0['height']/0x3;let _0x1bbf4a=!0x1;const _0x2feec6=[];for(let _0x185395=0x1;_0x185395<_0x1fb36e['length'];_0x185395++){const _0x160176=this['_getPageBreakLineOffset'](_0x185395,_0x2c3df0);if(!_0x160176)continue;const _0xab582b=_0x2c3df0['top']+_0x160176-this['_scrollableEditingRootDomAncestor']['scrollTop'];_0x2feec6['push']({'pageOffsetTop':_0xab582b,'domRootRect':_0x58ea45,'domScrollableRect':_0x2c3df0,'pageNumber':_0x185395}),_0xab582b>_0x36d193&&!_0x1bbf4a&&(this['pageNumber']=_0x185395,_0x1bbf4a=!0x0);}this['_renderPageBreakLines'](_0x2feec6),_0x1bbf4a||(this['pageNumber']=_0x1fb36e['length']);}['_renderPageBreakLines'](_0x10875c){if(!_0x10875c['length'])return;const {scrollX:_0x2457fb,scrollY:_0x431f5a}=_0x4e80eb['window'],_0x2892f4=_0x34fde7(this['linesRepository']['containerElement']);let _0x10b7c5,_0x1823df;if(_0x2892f4){const _0x4b5ed7=new _0x1200ae(_0x2892f4);_0x10b7c5=_0x4b5ed7['top']+_0x2892f4['clientTop']-_0x2892f4['scrollTop'],_0x1823df=_0x4b5ed7['left']+_0x2892f4['clientLeft']-_0x2892f4['scrollLeft'];}else _0x10b7c5=-_0x431f5a,_0x1823df=-_0x2457fb;for(const {domScrollableRect:_0x5cfc67,pageOffsetTop:_0x38542c,domRootRect:_0x5810a6,pageNumber:_0x4b7367}of _0x10875c)_0x5cfc67['top']<_0x38542c&&_0x38542c<_0x5cfc67['bottom']&&this['linesRepository']['showLine'](_0x5810a6['left']-_0x1823df,_0x38542c-_0x10b7c5,_0x5810a6['width'],_0x4b7367+0x1);}_getPageBreakLineOffset(_0x36c754,_0x28bf2e=null){const _0x3d116b=this['_paginationLookupPlugin']['pageBreaks'][_0x36c754]['offset'];return _0x3d116b?(_0x28bf2e||(_0x28bf2e=new _0x1200ae(this['_scrollableEditingRootDomAncestor'])['excludeScrollbarsAndBorders']()),_0x3d116b-_0x28bf2e['top']+this['_scrollableEditingRootDomAncestor']['scrollTop']):0x0;}_toggleEditingRootsClass(_0x12c7a3,_0x3c3bed=!0x0){const _0x2f6f8e=this['editor']['editing']['view'];_0x2f6f8e['change'](_0x40ee71=>{for(const _0x377f44 of _0x2f6f8e['document']['roots'])_0x3c3bed?_0x40ee71['addClass'](_0x12c7a3,_0x377f44):_0x40ee71['removeClass'](_0x12c7a3,_0x377f44);});}};function $(_0x2c4c9f,_0x38c007,..._0x9453fb){const t=_0x2c4c9f['t'];switch(_0x38c007){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)',..._0x9453fb);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 _0x38c007;}}var j=class extends _0x27e762{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'PaginationEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[v,M];}init(){this['set']({'pageNumber':0x1,'totalPages':0x1});const _0x1e416e=this['editor']['plugins']['get']('Pagination'),_0xf7cc11=this['editor']['plugins']['get'](v),_0x4a8508=this['editor']['plugins']['get'](M);this['bind']('isEnabled')['to'](_0x1e416e),this['_setUpDataDowncastConversion'](),this['bind']('pageNumber')['to'](_0x4a8508),this['listenTo'](_0xf7cc11,'change:pageBreaks',(_0x1e7617,_0x2e4eb2,_0xa1eda3,_0x20c07e)=>{this['totalPages']=_0xa1eda3['length'],this['_updatePageBreakMarkers'](_0xa1eda3,_0x20c07e);}),this['_setupKeystrokes'](),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x1bc1ed=[this['editor']];for(const _0x5e1ea4 of _0x1bc1ed){let _0x2d1f5a;for(const _0x2d9c44 in _0x5e1ea4){const _0x371935=_0x2d9c44,_0x49922d=_0x5e1ea4[_0x371935];if('paginationLicenseKeyValid'==_0x49922d||'paginationLicenseKeyInvalid'==_0x49922d||'paginationLicenseKeyExpired'==_0x49922d||'paginationLicenseKeyDomainLimit'==_0x49922d||'paginationLicenseKeyNotAllowed'==_0x49922d||'paginationLicenseKeyEvaluationLimit'==_0x49922d||'paginationLicenseKeyUsageLimit'==_0x49922d){delete _0x5e1ea4[_0x371935],_0x2d1f5a=_0x49922d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'paginationLicenseKeyInvalid'==_0x2d1f5a&&_0x5e1ea4['_showLicenseError']('invalid'),'paginationLicenseKeyExpired'==_0x2d1f5a&&_0x5e1ea4['_showLicenseError']('expired'),'paginationLicenseKeyDomainLimit'==_0x2d1f5a&&_0x5e1ea4['_showLicenseError']('domainLimit'),'paginationLicenseKeyNotAllowed'==_0x2d1f5a&&_0x5e1ea4['_showLicenseError']('featureNotAllowed','Pagination'),'paginationLicenseKeyEvaluationLimit'==_0x2d1f5a&&_0x5e1ea4['_showLicenseError']('evaluationLimit'),'paginationLicenseKeyUsageLimit'==_0x2d1f5a&&_0x5e1ea4['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['scrollToPage'](_0x1febec){this['isEnabled']&&this['editor']['plugins']['get'](M)['scrollToPage'](this['_validatePageNumber'](_0x1febec));}moveSelectionToPage(_0x4f983c){if(!this['isEnabled'])return;const _0x47d770=this['editor'],_0x219570=this['editor']['plugins']['get'](v)['pageBreaks'][_0x4f983c-0x1];_0x219570&&_0x47d770['model']['change'](_0x4fa17c=>{switch(_0x219570['type']){case'manual':{const _0x2a960c=_0x47d770['model']['schema']['getNearestSelectionRange'](_0x219570['modelRange']['end'],'forward');_0x4fa17c['setSelection'](_0x2a960c);break;}case'element':{const _0x188911=_0x47d770['model']['schema']['getNearestSelectionRange'](_0x219570['modelRange']['start'],'forward');_0x4fa17c['setSelection'](_0x188911);break;}case'text':{const _0x1808b4=_0x219570['modelRange']['start'];if(_0x1808b4['textNode']&&'\x20'===_0x1808b4['textNode']['data'][_0x1808b4['offset']]){const _0x910420=_0x4fa17c['createPositionAt'](_0x1808b4['parent'],_0x1808b4['offset']+0x1);_0x4fa17c['setSelection'](_0x910420);}else _0x4fa17c['setSelection'](_0x219570['modelRange']);}}_0x47d770['editing']['view']['focus']();});}goToNextPage(){const _0x34ddf6=this['_validatePageNumber'](this['pageNumber']+0x1);this['moveSelectionToPage'](_0x34ddf6),this['scrollToPage'](_0x34ddf6);}['goToPreviousPage'](){const _0x3d23a3=this['_validatePageNumber'](this['pageNumber']-0x1);this['moveSelectionToPage'](_0x3d23a3),this['scrollToPage'](_0x3d23a3);}_updatePageBreakMarkers(_0x2d65e9,_0x510cf2){const _0x387af3=this['editor']['model'];this['isEnabled']&&_0x387af3['change'](_0x20eeac=>{for(let _0x1329da=0x1;_0x1329da<_0x2d65e9['length'];_0x1329da++){const _0x31dbd5=_0x2d65e9[_0x1329da]['modelRange'],_0x20c120='pagination:'+(_0x1329da+0x1);_0x387af3['markers']['has'](_0x20c120)?_0x20eeac['updateMarker'](_0x20c120,{'range':_0x31dbd5}):_0x20eeac['addMarker'](_0x20c120,{'range':_0x31dbd5,'usingOperation':!0x1,'affectsData':!0x0});}for(let _0x43108f=_0x2d65e9['length'];_0x43108f<_0x510cf2['length'];_0x43108f++){const _0x19e03b='pagination:'+(_0x43108f+0x1);_0x387af3['markers']['has'](_0x19e03b)&&_0x20eeac['removeMarker'](_0x19e03b);}});}_setUpDataDowncastConversion(){this['editor']['conversion']['for']('dataDowncast')['add'](_0x35bcf6=>{_0x35bcf6['on']('addMarker:pagination',(_0x2d74fc,{markerRange:_0x42802c,markerName:_0x14311b},_0x572ad2)=>{if(!_0x572ad2['options']['pagination'])return;if(!_0x572ad2['consumable']['consume'](_0x42802c,_0x2d74fc['name']))return;const _0x235983=_0x42802c['getContainedElement']();let _0x599308=_0x235983?_0x572ad2['mapper']['toViewElement'](_0x235983):null;if(!_0x599308){const _0x11698a=_0x42802c['start'];if(_0x572ad2['schema']['checkChild'](_0x11698a,'$text')){const _0xe282b=_0x572ad2['mapper']['toViewPosition'](_0x11698a);_0x599308=_0x572ad2['writer']['createContainerElement']('span'),_0x599308['getFillerOffset']=()=>null,_0x572ad2['writer']['insert'](_0xe282b,_0x599308);}else{const _0x2a6768=_0x11698a['nodeAfter'];_0x599308=_0x572ad2['mapper']['toViewElement'](_0x2a6768);}}for(;_0x599308['parent']!==_0x599308['root']&&0x0===_0x599308['index'];)_0x599308=_0x599308['parent'];const _0x272995=_0x14311b['substring'](0xb);_0x599308['hasClass']('page-break')||(_0x572ad2['writer']['setStyle']('page-break-before','always',_0x599308),_0x572ad2['writer']['setAttribute']('data-pagination-page',_0x272995,_0x599308),_0x572ad2['mapper']['bindElementToMarker'](_0x599308,_0x14311b)),_0x2d74fc['stop']();});});}_setupKeystrokes(){const _0x449d72=this['editor'];_0x449d72['keystrokes']['set']('Shift+Pageup',(_0x32d4c9,_0x5dac24)=>{this['goToPreviousPage'](),_0x5dac24();}),_0x449d72['keystrokes']['set']('Shift+Pagedown',(_0x2b267e,_0x4324ed)=>{this['goToNextPage'](),_0x4324ed();}),_0x449d72['accessibility']['addKeystrokeInfoGroup']({'id':'pagination','label':$(_0x449d72['locale'],'Keystrokes\x20for\x20navigating\x20through\x20documents'),'keystrokes':[{'label':$(_0x449d72['locale'],'Go\x20to\x20the\x20previous\x20page\x20(also\x20move\x20selection)'),'keystroke':'Shift+Pageup','mayRequireFn':!0x0},{'label':$(_0x449d72['locale'],'Go\x20to\x20the\x20next\x20page\x20(also\x20move\x20selection)'),'keystroke':'Shift+Pagedown','mayRequireFn':!0x0}]});}_validatePageNumber(_0x4b92b2){return _0x4b92b2<0x1&&(_0x4b92b2=0x1),_0x4b92b2>this['totalPages']&&(_0x4b92b2=this['totalPages']),_0x4b92b2;}},q=class extends _0x3afe1c{['pageNumberView'];constructor(_0x5912a5){super(_0x5912a5);const _0x460c25=this['bindTemplate'];this['set']({'pageNumber':0x1,'totalPages':0x1,'isEnabled':!0x0}),this['pageNumberView']=new _0x3ac860(_0x5912a5,{'min':0x1,'step':0x1}),this['pageNumberView']['set']({'inputMode':'numeric','tabIndex':-0x1}),this['pageNumberView']['bind']('ariaLabel')['to'](this,'totalPages',_0x4da6d9=>$(_0x5912a5,'Current\x20page\x20number\x20(from\x201\x20to\x20%0)',_0x4da6d9)),this['pageNumberView']['bind']('max')['to'](this,'totalPages'),this['pageNumberView']['bind']('isReadOnly')['to'](this,'isEnabled',_0x531d20=>!_0x531d20),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-page-navigator',_0x460c25['if']('isEnabled','ck-disabled',_0x1e29e6=>!_0x1e29e6)]},'children':[this['pageNumberView'],{'tag':'span','children':[{'text':_0x460c25['to']('totalPages')}]}]});}['render'](){super['render']();const _0x526b47=this['pageNumberView']['element'],_0x2d3fcb=_0x55a266=>{this['pageNumberView']['element']['value']=String(_0x55a266);};_0x2d3fcb(this['pageNumber']),this['on']('change:pageNumber',(_0x49e76c,_0x1d0d75,_0x3a0831)=>{_0x2d3fcb(_0x3a0831);}),this['listenTo'](_0x526b47,'keydown',(_0x933abc,_0x23d23d)=>{if('ArrowUp'===_0x23d23d['key']||'ArrowDown'===_0x23d23d['key'])return void _0x23d23d['stopPropagation']();if(_0x23d23d['keyCode']!==_0x1262af['enter'])return;_0x23d23d['preventDefault']();const _0x1dea5b=_0x526b47['valueAsNumber'];Number['isNaN'](_0x1dea5b)?_0x526b47['value']=String(this['pageNumber']):(_0x526b47['checkValidity']()?this['pageNumber']=_0x1dea5b:_0x1dea5b>this['totalPages']?(this['pageNumber']=this['totalPages'],_0x526b47['value']=String(this['totalPages'])):(this['pageNumber']=0x1,_0x526b47['value']='1'),this['fire']('navigation',this['pageNumber']));}),this['listenTo'](_0x526b47,'blur',()=>{_0x526b47['value']=String(this['pageNumber']);}),this['listenTo'](_0x526b47,'focus',()=>{this['pageNumberView']['select']();});}['focus'](){this['pageNumberView']['element']['focus']();}},F=class extends _0x27e762{static get['pluginName'](){return'PaginationUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x2cac0c=this['editor'],_0x25cb64=_0x2cac0c['plugins']['get']('PaginationEditing');_0x2cac0c['ui']['componentFactory']['add']('pageNavigation',_0x41f0a3=>{const _0x3d1bec=new q(_0x41f0a3);return _0x3d1bec['bind']('pageNumber')['to'](_0x25cb64),_0x3d1bec['bind']('totalPages')['to'](_0x25cb64),_0x3d1bec['bind']('isEnabled')['to'](_0x25cb64),_0x3d1bec['on']('navigation',(_0x221184,_0x4360c6)=>{_0x25cb64['moveSelectionToPage'](_0x4360c6),_0x25cb64['scrollToPage'](_0x4360c6);}),_0x3d1bec;}),_0x2cac0c['ui']['componentFactory']['add']('nextPage',_0xed5f0e=>{const _0x1bc2c2=new _0x46239a(_0xed5f0e);return _0x1bc2c2['isEnabled']=!0x0,_0x1bc2c2['label']=$(_0x2cac0c['locale'],'Go\x20to\x20next\x20page'),_0x1bc2c2['icon']=_0x203d95,_0x1bc2c2['tooltip']=!0x0,_0x1bc2c2['keystroke']='Shift+PageDown',_0x1bc2c2['bind']('isEnabled')['to'](_0x25cb64),this['listenTo'](_0x1bc2c2,'execute',()=>{_0x25cb64['goToNextPage']();}),_0x1bc2c2;}),_0x2cac0c['ui']['componentFactory']['add']('previousPage',_0x47bad3=>{const _0x30e68d=new _0x46239a(_0x47bad3);return _0x30e68d['isEnabled']=!0x0,_0x30e68d['label']=$(_0x2cac0c['locale'],'Go\x20to\x20previous\x20page'),_0x30e68d['icon']=_0x591476,_0x30e68d['tooltip']=!0x0,_0x30e68d['keystroke']='Shift+PageUp',_0x30e68d['bind']('isEnabled')['to'](_0x25cb64),this['listenTo'](_0x30e68d,'execute',()=>{_0x25cb64['goToPreviousPage']();}),_0x30e68d;});}},H=class extends _0x27e762{static get['pluginName'](){return'Pagination';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[j,F];}constructor(_0x50ddcf){super(_0x50ddcf),this['isEnabled']=!0x1;}init(){this['set']({'pageNumber':0x1,'totalPages':0x1});const _0x4f70e2=this['editor']['plugins']['get'](j);this['bind']('pageNumber')['to'](_0x4f70e2),this['bind']('totalPages')['to'](_0x4f70e2),_0x5b1b95['isBlink']||this['editor']['config']['get']('pagination.enableOnUnsupportedBrowsers')?this['editor']['on']('ready',()=>{this['isEnabled']=!0x0;}):this['forceDisabled']('browserCheck');}['scrollToPage'](_0x2bfcc0){this['editor']['plugins']['get'](j)['scrollToPage'](_0x2bfcc0);}};export{H as Pagination,M as PaginationRenderer};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-pagination",
3
- "version": "49.0.0-alpha.3",
3
+ "version": "49.0.0-alpha.5",
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": "49.0.0-alpha.3",
25
- "@ckeditor/ckeditor5-engine": "49.0.0-alpha.3",
26
- "@ckeditor/ckeditor5-icons": "49.0.0-alpha.3",
27
- "@ckeditor/ckeditor5-ui": "49.0.0-alpha.3",
28
- "@ckeditor/ckeditor5-utils": "49.0.0-alpha.3",
24
+ "@ckeditor/ckeditor5-core": "49.0.0-alpha.5",
25
+ "@ckeditor/ckeditor5-engine": "49.0.0-alpha.5",
26
+ "@ckeditor/ckeditor5-icons": "49.0.0-alpha.5",
27
+ "@ckeditor/ckeditor5-ui": "49.0.0-alpha.5",
28
+ "@ckeditor/ckeditor5-utils": "49.0.0-alpha.5",
29
29
  "es-toolkit": "1.52.0"
30
30
  },
31
31
  "files": [