@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240226.0 → 0.0.0-nightly-20240227.0

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.
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var t={331:(t,e,r)=>{t.exports=r(237)("./src/clipboard.js")},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},783:(t,e,r)=>{t.exports=r(237)("./src/engine.js")},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},260:(t,e,r)=>{t.exports=r(237)("./src/upload.js")},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{ImportWord:()=>I,ImportWordEditing:()=>h,ImportWordUI:()=>i});var t=r(782),e=r(311),o=r(260);class i extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor,r=t.t;t.ui.componentFactory.add("importWord",(n=>{const i=t.commands.get("importWord"),s=new o.FileDialogButtonView(n),a=new e.SpinnerView;return s.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),s.buttonView.set({label:r("Import from Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M10.74 18a2.76 2.76 0 0 1-.469-.5H3V19h9.25v-.374A2.737 2.737 0 0 1 10.74 18Z"/><path d="M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6h7ZM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001ZM11.674 15.407a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0l-2.346 2.815Z"/></svg>\n',tooltip:!0}),s.buttonView.bind("isOn","isEnabled").to(i,"isBusy","isEnabled"),a.bind("isVisible").to(i,"isBusy"),s.buttonView.iconView.bind("isVisible").to(i,"isBusy",(t=>!t)),s.buttonView.children.add(a),s.on("done",((e,r)=>{t.execute("importWord",r[0],{}),t.editing.view.focus()})),s}))}}var s=r(331),a=r(783),c=r(584);class p extends t.Command{constructor(t){super(t),this.set("isBusy",!1),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.on("dataInsert",((e,r)=>{const n=new DataTransfer;n.setData("text/html",r.html);const o=this._importMarker.getRange();this.editor.model.enqueueChange(this._undoStepBatch,(e=>{this._importMarker.stopListening(),e.setSelection(o),t.editing.view.document.fire("clipboardInput",{dataTransfer:n})}))}),{priority:"low"})}refresh(){this.isEnabled=this._checkEnabled()}execute(t,e={}){if(this.isBusy)return Promise.resolve();const r=this.editor.config.get("importWord"),n={url:r.converterUrl,file:t,serviceConfig:{...e,formatting:r.formatting}};return this._prepareForImport(),this._sendImportRequest(n).then(this._handleImportResponse.bind(this)).catch(this._handleImportFailure.bind(this)).finally(this._cleanUpAfterImport.bind(this))}_checkEnabled(){if(this.isBusy)return!1;const t=this.editor.model,e=t.schema,r=t.document.selection,n=(0,c.first)(r.getSelectedBlocks());return!!n&&e.checkChild(n.parent,"paragraph")}_prepareForImport(){const t=this.editor,e=t.model,r=e.document.selection;this._abortController=new AbortController,this._undoStepBatch=t.model.createBatch({isUndoable:!0}),e.enqueueChange(this._undoStepBatch,(t=>{r.isCollapsed||e.deleteContent(r,{leaveUnmerged:!0});const n=r.getFirstPosition(),o=(0,c.first)(r.getSelectedBlocks());let i;i=o.is("element","paragraph")&&o.isEmpty?n:n.isAtStart?e.createPositionBefore(o):n.isAtEnd?e.createPositionAfter(o):t.split(n).position,this._importMarker=t.addMarker("importWord:"+(0,c.uid)(),{usingOperation:!1,affectsData:!1,range:new a.Range(i)}),this._importMarker.on("change:range",(()=>{"$graveyard"===this._importMarker.getRange().root.rootName&&this._abortController.abort()}))})),this.isBusy=!0,this.refresh()}_cleanUpAfterImport(){const t=this.editor.model;t.markers.has(this._importMarker)&&t.enqueueChange(this._undoStepBatch,(t=>{t.removeMarker(this._importMarker)})),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.isBusy=!1,this.refresh()}_sendImportRequest({url:t,file:e,serviceConfig:r}){const n=this.editor.plugins.get("ImportWordEditing").getToken(),o=new FormData;o.set("config",JSON.stringify(r)),o.set("file",e);const i={method:"POST",headers:{},body:o,signal:this._abortController.signal};return n&&(i.headers.Authorization=n.value),fetch(t,i)}_handleImportResponse(t){return t.ok?t.json().then((t=>{this.editor.model.markers.has(this._importMarker)&&"$graveyard"!==this._importMarker.getRange().root.rootName&&this.fire("dataInsert",t)})):Promise.reject()}_handleImportFailure(){if(this._abortController.signal.aborted)return void(0,c.logWarning)("import-word-plugin-import-cancelled");const t=this.editor,e=(0,t.t)("An error occurred while importing the Word file.");t.plugins.get("Notification").showWarning(e),(0,c.logError)("import-word-plugin-conversion-failed")}}const l=u;function d(){const t=["tokenUrl","get","CloudServices","pluginName","token","importWord","init","2vJpKsN","config","5oOMFKq","1144866PmhSaU","10Fllcga","registerTokenUrl","11fUmfnq","none","2307HonMIM","32075736ENlObP","plugins","commands","9706543XZYduK","2658456ayBhfI","ImportWordEditing","inline","cloudServices","5180103BEhrah","editor","getToken","1064161QIsQsV","3072lXnmjv","define","https://docx-converter.cke-cs.com/v2/convert/docx-html","requires","_token","add"];return(d=function(){return t})()}function u(t,e){const r=d();return(u=function(t,e){return r[t-=451]})(t,e)}!function(t,e){const r=u,n=t();for(;;)try{if(760311===parseInt(r(467))/1*(-parseInt(r(481))/2)+parseInt(r(455))/3*(parseInt(r(468))/4)+parseInt(r(483))/5*(parseInt(r(484))/6)+-parseInt(r(459))/7+parseInt(r(460))/8+-parseInt(r(464))/9*(parseInt(r(451))/10)+parseInt(r(453))/11*(parseInt(r(456))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(d);class h extends t.Plugin{static get[l(477)](){return l(461)}static get[l(471)](){const t=l;return[e.Notification,s.ClipboardPipeline,t(476)]}constructor(t){const e=l;super(t),this[e(472)]=null}async[l(480)](){const t=l,e=this[t(465)];e[t(482)][t(469)](t(479),{converterUrl:t(470),tokenUrl:(e[t(482)][t(475)](t(463))||{})[t(474)],formatting:{resets:t(454),defaults:t(454),styles:t(462)}}),e[t(458)][t(473)](t(479),new p(e));const{tokenUrl:r}=e[t(482)][t(475)](t(479));if(r){const{tokenUrl:n}=e[t(482)][t(475)](t(463))||{};this[t(472)]=r===n?e[t(457)][t(475)](t(476))[t(478)]:await e[t(457)][t(475)](t(476))[t(452)](r)}}[l(466)](){return this[l(472)]}}var m=f;function f(t,e){var r=g();return(f=function(t,e){return r[t-=272]})(t,e)}function g(){var t=["656VclHcj","ImportWord","16056140xGpUbf","3927848cIqDfz","pluginName","3465792yAsaiK","36655xjeYho","requires","51118meCvCw","55smarYc","6086892IdTMHg","98gcnnec","481398vCpAVC","9OcAgaI","26EyXrZe"];return(g=function(){return t})()}!function(t,e){for(var r=f,n=t();;)try{if(851820===parseInt(r(273))/1*(parseInt(r(279))/2)+-parseInt(r(285))/3+parseInt(r(280))/4*(-parseInt(r(286))/5)+-parseInt(r(277))/6*(-parseInt(r(276))/7)+-parseInt(r(283))/8*(-parseInt(r(278))/9)+-parseInt(r(282))/10+parseInt(r(274))/11*(parseInt(r(275))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(g);class I extends t.Plugin{static get[m(284)](){return m(281)}static get[m(272)](){return[h,i]}}function v(t,e){var r=b();return(v=function(t,e){return r[t-=259]})(t,e)}function b(){var t=["355125DcHnty","1116592LBevnV","8qnsMRg","742818eFcoHX","1220040kyYnlS","54yiHvep","7SPYJRx","19550070fukHbr","4834888USQCrl","1291084ogyFvw"];return(b=function(){return t})()}!function(t,e){for(var r=v,n=t();;)try{if(633246===-parseInt(r(264))/1+-parseInt(r(265))/2*(parseInt(r(266))/3)+-parseInt(r(262))/4+-parseInt(r(263))/5*(-parseInt(r(268))/6)+parseInt(r(259))/7*(parseInt(r(261))/8)+-parseInt(r(267))/9+parseInt(r(260))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(b)})(),(window.CKEditor5=window.CKEditor5||{}).importWord=n})();
5
+ */(()=>{var t={331:(t,e,r)=>{t.exports=r(237)("./src/clipboard.js")},782:(t,e,r)=>{t.exports=r(237)("./src/core.js")},783:(t,e,r)=>{t.exports=r(237)("./src/engine.js")},311:(t,e,r)=>{t.exports=r(237)("./src/ui.js")},260:(t,e,r)=>{t.exports=r(237)("./src/upload.js")},584:(t,e,r)=>{t.exports=r(237)("./src/utils.js")},237:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";r.r(o),r.d(o,{ImportWord:()=>I,ImportWordEditing:()=>h,ImportWordUI:()=>i});var t=r(782),e=r(311),n=r(260);class i extends t.Plugin{static get pluginName(){return"ImportWordUI"}init(){const t=this.editor,r=t.t;t.ui.componentFactory.add("importWord",(o=>{const i=t.commands.get("importWord"),s=new n.FileDialogButtonView(o),a=new e.SpinnerView;return s.set({acceptedType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template"}),s.buttonView.set({label:r("Import from Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14 0 5 4.5v8.892l-1.5-1.8V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M10.74 18a2.76 2.76 0 0 1-.469-.5H3V19h9.25v-.374A2.737 2.737 0 0 1 10.74 18Z"/><path d="M8.5 6a1.5 1.5 0 0 1 1.493 1.356L10 7.5v7a1.5 1.5 0 0 1-1.356 1.493L8.5 16h-7a1.5 1.5 0 0 1-1.493-1.356L0 14.5v-7a1.5 1.5 0 0 1 1.356-1.493L1.5 6h7ZM7.483 8.795l-.042.088-.986 2.534-.947-2.528-.043-.092a.601.601 0 0 0-1.042.008l-.042.093-.883 2.465-.937-2.475-.042-.089a.6.6 0 0 0-1.107.42l.027.093 1.514 4 .044.092a.6.6 0 0 0 1.041-.01l.041-.092.88-2.458.925 2.467.046.096a.602.602 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001ZM11.674 15.407a.75.75 0 1 0 1.152.96L14 14.96V20h1.5v-5.04l1.174 1.408a.75.75 0 1 0 1.152-.96l-2.346-2.816a.95.95 0 0 0-1.46 0l-2.346 2.815Z"/></svg>\n',tooltip:!0}),s.buttonView.bind("isOn","isEnabled").to(i,"isBusy","isEnabled"),a.bind("isVisible").to(i,"isBusy"),s.buttonView.iconView.bind("isVisible").to(i,"isBusy",(t=>!t)),s.buttonView.children.add(a),s.on("done",((e,r)=>{t.execute("importWord",r[0],{}),t.editing.view.focus()})),s}))}}var s=r(331),a=r(783),p=r(584);class c extends t.Command{constructor(t){super(t),this.set("isBusy",!1),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.on("dataInsert",((e,r)=>{const o=new DataTransfer;o.setData("text/html",r.html);const n=this._importMarker.getRange();this.editor.model.enqueueChange(this._undoStepBatch,(e=>{this._importMarker.stopListening(),e.setSelection(n),t.editing.view.document.fire("clipboardInput",{dataTransfer:o})}))}),{priority:"low"})}refresh(){this.isEnabled=this._checkEnabled()}execute(t,e={}){if(this.isBusy)return Promise.resolve();const r=this.editor.config.get("importWord"),o={url:r.converterUrl,file:t,serviceConfig:{...e,formatting:r.formatting}};return this._prepareForImport(),this._sendImportRequest(o).then(this._handleImportResponse.bind(this)).catch(this._handleImportFailure.bind(this)).finally(this._cleanUpAfterImport.bind(this))}_checkEnabled(){if(this.isBusy)return!1;const t=this.editor.model,e=t.schema,r=t.document.selection,o=(0,p.first)(r.getSelectedBlocks());return!!o&&e.checkChild(o.parent,"paragraph")}_prepareForImport(){const t=this.editor,e=t.model,r=e.document.selection;this._abortController=new AbortController,this._undoStepBatch=t.model.createBatch({isUndoable:!0}),e.enqueueChange(this._undoStepBatch,(t=>{r.isCollapsed||e.deleteContent(r,{leaveUnmerged:!0});const o=r.getFirstPosition(),n=(0,p.first)(r.getSelectedBlocks());let i;i=n.is("element","paragraph")&&n.isEmpty?o:o.isAtStart?e.createPositionBefore(n):o.isAtEnd?e.createPositionAfter(n):t.split(o).position,this._importMarker=t.addMarker("importWord:"+(0,p.uid)(),{usingOperation:!1,affectsData:!1,range:new a.Range(i)}),this._importMarker.on("change:range",(()=>{"$graveyard"===this._importMarker.getRange().root.rootName&&this._abortController.abort()}))})),this.isBusy=!0,this.refresh()}_cleanUpAfterImport(){const t=this.editor.model;t.markers.has(this._importMarker)&&t.enqueueChange(this._undoStepBatch,(t=>{t.removeMarker(this._importMarker)})),this._importMarker=null,this._undoStepBatch=null,this._abortController=null,this.isBusy=!1,this.refresh()}_sendImportRequest({url:t,file:e,serviceConfig:r}){const o=this.editor.plugins.get("ImportWordEditing").getToken(),n=new FormData;n.set("config",JSON.stringify(r)),n.set("file",e);const i={method:"POST",headers:{},body:n,signal:this._abortController.signal};return o&&(i.headers.Authorization=o.value),fetch(t,i)}_handleImportResponse(t){return t.ok?t.json().then((t=>{this.editor.model.markers.has(this._importMarker)&&"$graveyard"!==this._importMarker.getRange().root.rootName&&this.fire("dataInsert",t)})):Promise.reject()}_handleImportFailure(){if(this._abortController.signal.aborted)return void(0,p.logWarning)("import-word-plugin-import-cancelled");const t=this.editor,e=(0,t.t)("An error occurred while importing the Word file.");t.plugins.get("Notification").showWarning(e),(0,p.logError)("import-word-plugin-conversion-failed")}}const l=u;function d(){const t=["1203996xQzHpY","registerTokenUrl","36812jeibte","cloudServices","add","inline","285366QBWHty","plugins","define","get","pluginName","10703312gpIgVY","none","init","commands","CloudServices","token","https://docx-converter.cke-cs.com/v2/convert/docx-html","_token","275rVcvCL","requires","tokenUrl","ImportWordEditing","editor","1199086oLVhBB","getToken","config","88005vUeKix","importWord","499544esgmWu"];return(d=function(){return t})()}function u(t,e){const r=d();return(u=function(t,e){return r[t-=256]})(t,e)}!function(t,e){const r=u,o=t();for(;;)try{if(364195===parseInt(r(278))/1+parseInt(r(279))/2+-parseInt(r(276))/3+parseInt(r(281))/4*(parseInt(r(268))/5)+-parseInt(r(285))/6+parseInt(r(273))/7+-parseInt(r(260))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(d);class h extends t.Plugin{static get[l(259)](){return l(271)}static get[l(269)](){const t=l;return[e.Notification,s.ClipboardPipeline,t(264)]}constructor(t){const e=l;super(t),this[e(267)]=null}async[l(262)](){const t=l,e=this[t(272)];e[t(275)][t(257)](t(277),{converterUrl:t(266),tokenUrl:(e[t(275)][t(258)](t(282))||{})[t(270)],formatting:{resets:t(261),defaults:t(261),styles:t(284)}}),e[t(263)][t(283)](t(277),new c(e));const{tokenUrl:r}=e[t(275)][t(258)](t(277));if(r){const{tokenUrl:o}=e[t(275)][t(258)](t(282))||{};this[t(267)]=r===o?e[t(256)][t(258)](t(264))[t(265)]:await e[t(256)][t(258)](t(264))[t(280)](r)}}[l(274)](){return this[l(267)]}}var m=f;function g(){var t=["ImportWord","6rUemYM","127806pJVQpl","pluginName","24VmFtQz","111056rhJNAg","1087560zXQJFu","35384OjTqPQ","403215rCeFRH","631659fMdTTo","844860HauJNq","requires"];return(g=function(){return t})()}function f(t,e){var r=g();return(f=function(t,e){return r[t-=246]})(t,e)}!function(t,e){for(var r=f,o=t();;)try{if(145367===parseInt(r(254))/1+-parseInt(r(252))/2+parseInt(r(256))/3+parseInt(r(257))/4+parseInt(r(255))/5*(-parseInt(r(248))/6)+-parseInt(r(249))/7*(parseInt(r(251))/8)+-parseInt(r(253))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(g);class I extends t.Plugin{static get[m(250)](){return m(247)}static get[m(246)](){return[h,i]}}function v(t,e){var r=b();return(v=function(t,e){return r[t-=486]})(t,e)}function b(){var t=["350952vqxQQW","2LTirXH","24585phHKAh","524302jvxNTW","3766016JACQeu","5700ICcKHP","9220omFPvm","145UyPEWO","18KgaCSz","2456AENSfe","920129sqvgEe","2673jeAYnz"];return(b=function(){return t})()}!function(t,e){for(var r=v,o=t();;)try{if(286256===parseInt(r(487))/1*(-parseInt(r(497))/2)+parseInt(r(496))/3+parseInt(r(493))/4*(-parseInt(r(491))/5)+parseInt(r(492))/6*(parseInt(r(494))/7)+-parseInt(r(488))/8+parseInt(r(495))/9*(-parseInt(r(490))/10)+-parseInt(r(486))/11*(-parseInt(r(489))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(b)})(),(window.CKEditor5=window.CKEditor5||{}).importWord=o})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-import-word",
3
- "version": "0.0.0-nightly-20240226.0",
3
+ "version": "0.0.0-nightly-20240227.0",
4
4
  "description": "Import from Word feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -30,7 +30,7 @@
30
30
  "type": "module",
31
31
  "main": "src/index.js",
32
32
  "dependencies": {
33
- "ckeditor5": "0.0.0-nightly-20240226.0"
33
+ "ckeditor5": "0.0.0-nightly-20240227.0"
34
34
  },
35
35
  "license": "SEE LICENSE IN LICENSE.md",
36
36
  "author": "CKSource (https://cksource.com/)",
package/src/importword.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x35ea43=_0x5563;function _0x5563(_0x170a81,_0x30587c){var _0x309739=_0x3097();return _0x5563=function(_0x5563b5,_0x32eae7){_0x5563b5=_0x5563b5-0x110;var _0x29396e=_0x309739[_0x5563b5];return _0x29396e;},_0x5563(_0x170a81,_0x30587c);}(function(_0x31f753,_0x4f06d7){var _0x34d916=_0x5563,_0x24533a=_0x31f753();while(!![]){try{var _0x40ab8c=parseInt(_0x34d916(0x111))/0x1*(parseInt(_0x34d916(0x117))/0x2)+-parseInt(_0x34d916(0x11d))/0x3+parseInt(_0x34d916(0x118))/0x4*(-parseInt(_0x34d916(0x11e))/0x5)+-parseInt(_0x34d916(0x115))/0x6*(-parseInt(_0x34d916(0x114))/0x7)+-parseInt(_0x34d916(0x11b))/0x8*(-parseInt(_0x34d916(0x116))/0x9)+-parseInt(_0x34d916(0x11a))/0xa+parseInt(_0x34d916(0x112))/0xb*(parseInt(_0x34d916(0x113))/0xc);if(_0x40ab8c===_0x4f06d7)break;else _0x24533a['push'](_0x24533a['shift']());}catch(_0x3d5a6c){_0x24533a['push'](_0x24533a['shift']());}}}(_0x3097,0xcff6c));function _0x3097(){var _0x2c9ebe=['656VclHcj','ImportWord','16056140xGpUbf','3927848cIqDfz','pluginName','3465792yAsaiK','36655xjeYho','requires','51118meCvCw','55smarYc','6086892IdTMHg','98gcnnec','481398vCpAVC','9OcAgaI','26EyXrZe'];_0x3097=function(){return _0x2c9ebe;};return _0x3097();}import{Plugin as _0x1b08f7}from'ckeditor5/src/core.js';import _0x27709e from'./importwordui.js';import _0x325e14 from'./importwordediting.js';export default class i extends _0x1b08f7{static get[_0x35ea43(0x11c)](){var _0x436610=_0x35ea43;return _0x436610(0x119);}static get[_0x35ea43(0x110)](){return[_0x325e14,_0x27709e];}}
23
+ var _0x2f74d4=_0x2e54;(function(_0x4e254b,_0x13fa98){var _0x95a85b=_0x2e54,_0x4e77df=_0x4e254b();while(!![]){try{var _0x10e0c1=parseInt(_0x95a85b(0xfe))/0x1+-parseInt(_0x95a85b(0xfc))/0x2+parseInt(_0x95a85b(0x100))/0x3+parseInt(_0x95a85b(0x101))/0x4+parseInt(_0x95a85b(0xff))/0x5*(-parseInt(_0x95a85b(0xf8))/0x6)+-parseInt(_0x95a85b(0xf9))/0x7*(parseInt(_0x95a85b(0xfb))/0x8)+-parseInt(_0x95a85b(0xfd))/0x9;if(_0x10e0c1===_0x13fa98)break;else _0x4e77df['push'](_0x4e77df['shift']());}catch(_0x5ebcb){_0x4e77df['push'](_0x4e77df['shift']());}}}(_0x4e2c,0x237d7));import{Plugin as _0x317f12}from'ckeditor5/src/core.js';import _0x3ef547 from'./importwordui.js';function _0x4e2c(){var _0x5dcfdf=['ImportWord','6rUemYM','127806pJVQpl','pluginName','24VmFtQz','111056rhJNAg','1087560zXQJFu','35384OjTqPQ','403215rCeFRH','631659fMdTTo','844860HauJNq','requires'];_0x4e2c=function(){return _0x5dcfdf;};return _0x4e2c();}import _0x5b2f5c from'./importwordediting.js';function _0x2e54(_0x3a1b45,_0x1d2a7c){var _0x4e2cd1=_0x4e2c();return _0x2e54=function(_0x2e54b5,_0x3f9cd6){_0x2e54b5=_0x2e54b5-0xf6;var _0x4e616b=_0x4e2cd1[_0x2e54b5];return _0x4e616b;},_0x2e54(_0x3a1b45,_0x1d2a7c);}export default class i extends _0x317f12{static get[_0x2f74d4(0xfa)](){var _0x198bea=_0x2f74d4;return _0x198bea(0xf7);}static get[_0x2f74d4(0xf6)](){return[_0x5b2f5c,_0x3ef547];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x1f6e76}from'ckeditor5/src/core.js';import{Range as _0x14e386}from'ckeditor5/src/engine.js';import{logWarning as _0x46d9a5,logError as _0x479354,first as _0x12952d,uid as _0x42eeb6}from'ckeditor5/src/utils.js';export default class d extends _0x1f6e76{constructor(_0x4ffa17){super(_0x4ffa17),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x54793a,_0x291cbc)=>{const _0x1298ad=new DataTransfer();_0x1298ad['setData']('text/html',_0x291cbc['html']);const _0x39f358=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x5883b3=>{this['_importMarker']['stopListening'](),_0x5883b3['setSelection'](_0x39f358),_0x4ffa17['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x1298ad});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x133cb1,_0x4a8108={}){if(this['isBusy'])return Promise['resolve']();const _0x1627e0=this['editor']['config']['get']('importWord'),_0x372b43={'url':_0x1627e0['converterUrl'],'file':_0x133cb1,'serviceConfig':{..._0x4a8108,'formatting':_0x1627e0['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x372b43)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x6f8c7e=this['editor']['model'],_0x1fd9a1=_0x6f8c7e['schema'],_0x45b0dc=_0x6f8c7e['document']['selection'],_0x2f1bed=_0x12952d(_0x45b0dc['getSelectedBlocks']());return!!_0x2f1bed&&_0x1fd9a1['checkChild'](_0x2f1bed['parent'],'paragraph');}['_prepareForImport'](){const _0x2bd168=this['editor'],_0x2ab34d=_0x2bd168['model'],_0x221ead=_0x2ab34d['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x2bd168['model']['createBatch']({'isUndoable':!0x0}),_0x2ab34d['enqueueChange'](this['_undoStepBatch'],_0x2b3b57=>{_0x221ead['isCollapsed']||_0x2ab34d['deleteContent'](_0x221ead,{'leaveUnmerged':!0x0});const _0x357daf=_0x221ead['getFirstPosition'](),_0x642151=_0x12952d(_0x221ead['getSelectedBlocks']());let _0x565c58;_0x565c58=_0x642151['is']('element','paragraph')&&_0x642151['isEmpty']?_0x357daf:_0x357daf['isAtStart']?_0x2ab34d['createPositionBefore'](_0x642151):_0x357daf['isAtEnd']?_0x2ab34d['createPositionAfter'](_0x642151):_0x2b3b57['split'](_0x357daf)['position'],this['_importMarker']=_0x2b3b57['addMarker']('importWord:'+_0x42eeb6(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x14e386(_0x565c58)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0xf83c03=this['editor']['model'];_0xf83c03['markers']['has'](this['_importMarker'])&&_0xf83c03['enqueueChange'](this['_undoStepBatch'],_0x34bbe1=>{_0x34bbe1['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x4f75b6,file:_0x1a7aaf,serviceConfig:_0x28876a}){const _0x2f1b4f=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x2592bf=new FormData();_0x2592bf['set']('config',JSON['stringify'](_0x28876a)),_0x2592bf['set']('file',_0x1a7aaf);const _0x3a473d={'method':'POST','headers':{},'body':_0x2592bf,'signal':this['_abortController']['signal']};return _0x2f1b4f&&(_0x3a473d['headers']['Authorization']=_0x2f1b4f['value']),fetch(_0x4f75b6,_0x3a473d);}['_handleImportResponse'](_0x43dd1c){return _0x43dd1c['ok']?_0x43dd1c['json']()['then'](_0x18755c=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x18755c);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x46d9a5('import-word-plugin-import-cancelled');const _0x3e04f4=this['editor'],_0x47f5ed=(0x0,_0x3e04f4['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x3e04f4['plugins']['get']('Notification')['showWarning'](_0x47f5ed),_0x479354('import-word-plugin-conversion-failed');}}
23
+ import{Command as _0x280331}from'ckeditor5/src/core.js';import{Range as _0x3a2a0f}from'ckeditor5/src/engine.js';import{logWarning as _0x5aa5c8,logError as _0x48f090,first as _0x1bef25,uid as _0x3d355}from'ckeditor5/src/utils.js';export default class d extends _0x280331{constructor(_0x424d58){super(_0x424d58),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0xea595f,_0x312517)=>{const _0x193d02=new DataTransfer();_0x193d02['setData']('text/html',_0x312517['html']);const _0x3242e7=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x4da4f8=>{this['_importMarker']['stopListening'](),_0x4da4f8['setSelection'](_0x3242e7),_0x424d58['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x193d02});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x34528b,_0x4dca7e={}){if(this['isBusy'])return Promise['resolve']();const _0x421a16=this['editor']['config']['get']('importWord'),_0x11196d={'url':_0x421a16['converterUrl'],'file':_0x34528b,'serviceConfig':{..._0x4dca7e,'formatting':_0x421a16['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x11196d)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x52237c=this['editor']['model'],_0x1ae0da=_0x52237c['schema'],_0x2a30c2=_0x52237c['document']['selection'],_0x5a0057=_0x1bef25(_0x2a30c2['getSelectedBlocks']());return!!_0x5a0057&&_0x1ae0da['checkChild'](_0x5a0057['parent'],'paragraph');}['_prepareForImport'](){const _0x5f0bac=this['editor'],_0xdfa71c=_0x5f0bac['model'],_0x3ae6f9=_0xdfa71c['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x5f0bac['model']['createBatch']({'isUndoable':!0x0}),_0xdfa71c['enqueueChange'](this['_undoStepBatch'],_0x74b089=>{_0x3ae6f9['isCollapsed']||_0xdfa71c['deleteContent'](_0x3ae6f9,{'leaveUnmerged':!0x0});const _0x5ed353=_0x3ae6f9['getFirstPosition'](),_0x17de8a=_0x1bef25(_0x3ae6f9['getSelectedBlocks']());let _0x271872;_0x271872=_0x17de8a['is']('element','paragraph')&&_0x17de8a['isEmpty']?_0x5ed353:_0x5ed353['isAtStart']?_0xdfa71c['createPositionBefore'](_0x17de8a):_0x5ed353['isAtEnd']?_0xdfa71c['createPositionAfter'](_0x17de8a):_0x74b089['split'](_0x5ed353)['position'],this['_importMarker']=_0x74b089['addMarker']('importWord:'+_0x3d355(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x3a2a0f(_0x271872)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x39b50c=this['editor']['model'];_0x39b50c['markers']['has'](this['_importMarker'])&&_0x39b50c['enqueueChange'](this['_undoStepBatch'],_0xfe662e=>{_0xfe662e['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0xaa4228,file:_0x39e337,serviceConfig:_0x3ccba3}){const _0x4b395a=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x2f7648=new FormData();_0x2f7648['set']('config',JSON['stringify'](_0x3ccba3)),_0x2f7648['set']('file',_0x39e337);const _0x33b507={'method':'POST','headers':{},'body':_0x2f7648,'signal':this['_abortController']['signal']};return _0x4b395a&&(_0x33b507['headers']['Authorization']=_0x4b395a['value']),fetch(_0xaa4228,_0x33b507);}['_handleImportResponse'](_0x614591){return _0x614591['ok']?_0x614591['json']()['then'](_0x2cc815=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x2cc815);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x5aa5c8('import-word-plugin-import-cancelled');const _0x1275cd=this['editor'],_0x38a1b0=(0x0,_0x1275cd['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x1275cd['plugins']['get']('Notification')['showWarning'](_0x38a1b0),_0x48f090('import-word-plugin-conversion-failed');}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xc5196e=_0x7964;(function(_0x5966fc,_0x192306){const _0x5b8c55=_0x7964,_0x4a7bef=_0x5966fc();while(!![]){try{const _0x1b56be=parseInt(_0x5b8c55(0x1d3))/0x1*(-parseInt(_0x5b8c55(0x1e1))/0x2)+parseInt(_0x5b8c55(0x1c7))/0x3*(parseInt(_0x5b8c55(0x1d4))/0x4)+parseInt(_0x5b8c55(0x1e3))/0x5*(parseInt(_0x5b8c55(0x1e4))/0x6)+-parseInt(_0x5b8c55(0x1cb))/0x7+parseInt(_0x5b8c55(0x1cc))/0x8+-parseInt(_0x5b8c55(0x1d0))/0x9*(parseInt(_0x5b8c55(0x1c3))/0xa)+parseInt(_0x5b8c55(0x1c5))/0xb*(parseInt(_0x5b8c55(0x1c8))/0xc);if(_0x1b56be===_0x192306)break;else _0x4a7bef['push'](_0x4a7bef['shift']());}catch(_0x479836){_0x4a7bef['push'](_0x4a7bef['shift']());}}}(_0x6ee8,0xb99f7));import{Plugin as _0x6ecf16}from'ckeditor5/src/core.js';function _0x6ee8(){const _0x27a78a=['tokenUrl','get','CloudServices','pluginName','token','importWord','init','2vJpKsN','config','5oOMFKq','1144866PmhSaU','10Fllcga','registerTokenUrl','11fUmfnq','none','2307HonMIM','32075736ENlObP','plugins','commands','9706543XZYduK','2658456ayBhfI','ImportWordEditing','inline','cloudServices','5180103BEhrah','editor','getToken','1064161QIsQsV','3072lXnmjv','define','https://docx-converter.cke-cs.com/v2/convert/docx-html','requires','_token','add'];_0x6ee8=function(){return _0x27a78a;};return _0x6ee8();}import{Notification as _0x3db17a}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x7b8d1b}from'ckeditor5/src/clipboard.js';function _0x7964(_0x3ea8b6,_0x45ba9e){const _0x6ee843=_0x6ee8();return _0x7964=function(_0x796451,_0x2d6959){_0x796451=_0x796451-0x1c3;let _0xfbff5c=_0x6ee843[_0x796451];return _0xfbff5c;},_0x7964(_0x3ea8b6,_0x45ba9e);}import _0x44c7b1 from'./importwordcommand.js';export default class e extends _0x6ecf16{static get[_0xc5196e(0x1dd)](){const _0x5454f1=_0xc5196e;return _0x5454f1(0x1cd);}static get[_0xc5196e(0x1d7)](){const _0x21633c=_0xc5196e;return[_0x3db17a,_0x7b8d1b,_0x21633c(0x1dc)];}constructor(_0x3a47d1){const _0x3e9806=_0xc5196e;super(_0x3a47d1),this[_0x3e9806(0x1d8)]=null;}async[_0xc5196e(0x1e0)](){const _0x163d1e=_0xc5196e,_0x28bb07=this[_0x163d1e(0x1d1)];_0x28bb07[_0x163d1e(0x1e2)][_0x163d1e(0x1d5)](_0x163d1e(0x1df),{'converterUrl':_0x163d1e(0x1d6),'tokenUrl':(_0x28bb07[_0x163d1e(0x1e2)][_0x163d1e(0x1db)](_0x163d1e(0x1cf))||{})[_0x163d1e(0x1da)],'formatting':{'resets':_0x163d1e(0x1c6),'defaults':_0x163d1e(0x1c6),'styles':_0x163d1e(0x1ce)}}),_0x28bb07[_0x163d1e(0x1ca)][_0x163d1e(0x1d9)](_0x163d1e(0x1df),new _0x44c7b1(_0x28bb07));const {tokenUrl:_0xa495ec}=_0x28bb07[_0x163d1e(0x1e2)][_0x163d1e(0x1db)](_0x163d1e(0x1df));if(_0xa495ec){const {tokenUrl:_0x2111ee}=_0x28bb07[_0x163d1e(0x1e2)][_0x163d1e(0x1db)](_0x163d1e(0x1cf))||{};this[_0x163d1e(0x1d8)]=_0xa495ec===_0x2111ee?_0x28bb07[_0x163d1e(0x1c9)][_0x163d1e(0x1db)](_0x163d1e(0x1dc))[_0x163d1e(0x1de)]:await _0x28bb07[_0x163d1e(0x1c9)][_0x163d1e(0x1db)](_0x163d1e(0x1dc))[_0x163d1e(0x1c4)](_0xa495ec);}}[_0xc5196e(0x1d2)](){const _0x58d02d=_0xc5196e;return this[_0x58d02d(0x1d8)];}}
23
+ const _0x1f7192=_0x3de7;(function(_0x32a191,_0x1d1e87){const _0x487b34=_0x3de7,_0x2ed269=_0x32a191();while(!![]){try{const _0x22ced3=parseInt(_0x487b34(0x116))/0x1+parseInt(_0x487b34(0x117))/0x2+-parseInt(_0x487b34(0x114))/0x3+parseInt(_0x487b34(0x119))/0x4*(parseInt(_0x487b34(0x10c))/0x5)+-parseInt(_0x487b34(0x11d))/0x6+parseInt(_0x487b34(0x111))/0x7+-parseInt(_0x487b34(0x104))/0x8;if(_0x22ced3===_0x1d1e87)break;else _0x2ed269['push'](_0x2ed269['shift']());}catch(_0x45fc38){_0x2ed269['push'](_0x2ed269['shift']());}}}(_0x4df1,0x58ea3));function _0x4df1(){const _0x5eb89e=['1203996xQzHpY','registerTokenUrl','36812jeibte','cloudServices','add','inline','285366QBWHty','plugins','define','get','pluginName','10703312gpIgVY','none','init','commands','CloudServices','token','https://docx-converter.cke-cs.com/v2/convert/docx-html','_token','275rVcvCL','requires','tokenUrl','ImportWordEditing','editor','1199086oLVhBB','getToken','config','88005vUeKix','importWord','499544esgmWu'];_0x4df1=function(){return _0x5eb89e;};return _0x4df1();}function _0x3de7(_0x318d73,_0x1a6884){const _0x4df122=_0x4df1();return _0x3de7=function(_0x3de741,_0x5f46d7){_0x3de741=_0x3de741-0x100;let _0x2bd6a9=_0x4df122[_0x3de741];return _0x2bd6a9;},_0x3de7(_0x318d73,_0x1a6884);}import{Plugin as _0x1f47bd}from'ckeditor5/src/core.js';import{Notification as _0x1c26fd}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x1ec82e}from'ckeditor5/src/clipboard.js';import _0x2f9607 from'./importwordcommand.js';export default class e extends _0x1f47bd{static get[_0x1f7192(0x103)](){const _0x37ffc4=_0x1f7192;return _0x37ffc4(0x10f);}static get[_0x1f7192(0x10d)](){const _0x53d946=_0x1f7192;return[_0x1c26fd,_0x1ec82e,_0x53d946(0x108)];}constructor(_0x2feeeb){const _0x309ef4=_0x1f7192;super(_0x2feeeb),this[_0x309ef4(0x10b)]=null;}async[_0x1f7192(0x106)](){const _0xf5347=_0x1f7192,_0x4bfc1d=this[_0xf5347(0x110)];_0x4bfc1d[_0xf5347(0x113)][_0xf5347(0x101)](_0xf5347(0x115),{'converterUrl':_0xf5347(0x10a),'tokenUrl':(_0x4bfc1d[_0xf5347(0x113)][_0xf5347(0x102)](_0xf5347(0x11a))||{})[_0xf5347(0x10e)],'formatting':{'resets':_0xf5347(0x105),'defaults':_0xf5347(0x105),'styles':_0xf5347(0x11c)}}),_0x4bfc1d[_0xf5347(0x107)][_0xf5347(0x11b)](_0xf5347(0x115),new _0x2f9607(_0x4bfc1d));const {tokenUrl:_0x595d0d}=_0x4bfc1d[_0xf5347(0x113)][_0xf5347(0x102)](_0xf5347(0x115));if(_0x595d0d){const {tokenUrl:_0x33eabc}=_0x4bfc1d[_0xf5347(0x113)][_0xf5347(0x102)](_0xf5347(0x11a))||{};this[_0xf5347(0x10b)]=_0x595d0d===_0x33eabc?_0x4bfc1d[_0xf5347(0x100)][_0xf5347(0x102)](_0xf5347(0x108))[_0xf5347(0x109)]:await _0x4bfc1d[_0xf5347(0x100)][_0xf5347(0x102)](_0xf5347(0x108))[_0xf5347(0x118)](_0x595d0d);}}[_0x1f7192(0x112)](){const _0x1daf34=_0x1f7192;return this[_0x1daf34(0x10b)];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x5b2f02}from'ckeditor5/src/core.js';import{SpinnerView as _0x1ecdf7}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x5d7cb3}from'ckeditor5/src/upload.js';import _0x406def from'../theme/icons/importword.svg';export default class o extends _0x5b2f02{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0xfb94b2=this['editor'],t=_0xfb94b2['t'];_0xfb94b2['ui']['componentFactory']['add']('importWord',_0x25041f=>{const _0xa3ba94=_0xfb94b2['commands']['get']('importWord'),_0x4a40fb=new _0x5d7cb3(_0x25041f),_0x31a15d=new _0x1ecdf7();return _0x4a40fb['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x4a40fb['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x406def,'tooltip':!0x0}),_0x4a40fb['buttonView']['bind']('isOn','isEnabled')['to'](_0xa3ba94,'isBusy','isEnabled'),_0x31a15d['bind']('isVisible')['to'](_0xa3ba94,'isBusy'),_0x4a40fb['buttonView']['iconView']['bind']('isVisible')['to'](_0xa3ba94,'isBusy',_0x4b9ad3=>!_0x4b9ad3),_0x4a40fb['buttonView']['children']['add'](_0x31a15d),_0x4a40fb['on']('done',(_0x5bec13,_0x50896a)=>{_0xfb94b2['execute']('importWord',_0x50896a[0x0],{}),_0xfb94b2['editing']['view']['focus']();}),_0x4a40fb;});}}
23
+ import{Plugin as _0x4467cf}from'ckeditor5/src/core.js';import{SpinnerView as _0x25e1f5}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x92da07}from'ckeditor5/src/upload.js';import _0x193707 from'../theme/icons/importword.svg';export default class o extends _0x4467cf{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x5a937f=this['editor'],t=_0x5a937f['t'];_0x5a937f['ui']['componentFactory']['add']('importWord',_0x2bd25f=>{const _0x5d5a1a=_0x5a937f['commands']['get']('importWord'),_0x2c732c=new _0x92da07(_0x2bd25f),_0x1e6d44=new _0x25e1f5();return _0x2c732c['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x2c732c['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x193707,'tooltip':!0x0}),_0x2c732c['buttonView']['bind']('isOn','isEnabled')['to'](_0x5d5a1a,'isBusy','isEnabled'),_0x1e6d44['bind']('isVisible')['to'](_0x5d5a1a,'isBusy'),_0x2c732c['buttonView']['iconView']['bind']('isVisible')['to'](_0x5d5a1a,'isBusy',_0x2b09e0=>!_0x2b09e0),_0x2c732c['buttonView']['children']['add'](_0x1e6d44),_0x2c732c['on']('done',(_0x15c486,_0x1dff8a)=>{_0x5a937f['execute']('importWord',_0x1dff8a[0x0],{}),_0x5a937f['editing']['view']['focus']();}),_0x2c732c;});}}
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x311f(_0x1b2386,_0x25cc01){var _0x3b7d17=_0x3b7d();return _0x311f=function(_0x311f79,_0x252b12){_0x311f79=_0x311f79-0x103;var _0x102aec=_0x3b7d17[_0x311f79];return _0x102aec;},_0x311f(_0x1b2386,_0x25cc01);}(function(_0x2c3f16,_0x2d2de0){var _0x477b2d=_0x311f,_0x452459=_0x2c3f16();while(!![]){try{var _0x5958ba=-parseInt(_0x477b2d(0x108))/0x1+-parseInt(_0x477b2d(0x109))/0x2*(parseInt(_0x477b2d(0x10a))/0x3)+-parseInt(_0x477b2d(0x106))/0x4+-parseInt(_0x477b2d(0x107))/0x5*(-parseInt(_0x477b2d(0x10c))/0x6)+parseInt(_0x477b2d(0x103))/0x7*(parseInt(_0x477b2d(0x105))/0x8)+-parseInt(_0x477b2d(0x10b))/0x9+parseInt(_0x477b2d(0x104))/0xa;if(_0x5958ba===_0x2d2de0)break;else _0x452459['push'](_0x452459['shift']());}catch(_0x22f0e2){_0x452459['push'](_0x452459['shift']());}}}(_0x3b7d,0x9a99e));export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';function _0x3b7d(){var _0x1cbd35=['355125DcHnty','1116592LBevnV','8qnsMRg','742818eFcoHX','1220040kyYnlS','54yiHvep','7SPYJRx','19550070fukHbr','4834888USQCrl','1291084ogyFvw'];_0x3b7d=function(){return _0x1cbd35;};return _0x3b7d();}
23
+ (function(_0x11189d,_0x40e987){var _0x2ede9b=_0x5111,_0x2991a1=_0x11189d();while(!![]){try{var _0x4e96ac=parseInt(_0x2ede9b(0x1e7))/0x1*(-parseInt(_0x2ede9b(0x1f1))/0x2)+parseInt(_0x2ede9b(0x1f0))/0x3+parseInt(_0x2ede9b(0x1ed))/0x4*(-parseInt(_0x2ede9b(0x1eb))/0x5)+parseInt(_0x2ede9b(0x1ec))/0x6*(parseInt(_0x2ede9b(0x1ee))/0x7)+-parseInt(_0x2ede9b(0x1e8))/0x8+parseInt(_0x2ede9b(0x1ef))/0x9*(-parseInt(_0x2ede9b(0x1ea))/0xa)+-parseInt(_0x2ede9b(0x1e6))/0xb*(-parseInt(_0x2ede9b(0x1e9))/0xc);if(_0x4e96ac===_0x40e987)break;else _0x2991a1['push'](_0x2991a1['shift']());}catch(_0x90a08b){_0x2991a1['push'](_0x2991a1['shift']());}}}(_0x2ea4,0x45e30));export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';function _0x5111(_0x54c7be,_0x179a12){var _0x2ea49d=_0x2ea4();return _0x5111=function(_0x511153,_0x5b6ed6){_0x511153=_0x511153-0x1e6;var _0x3b03de=_0x2ea49d[_0x511153];return _0x3b03de;},_0x5111(_0x54c7be,_0x179a12);}function _0x2ea4(){var _0x26079f=['350952vqxQQW','2LTirXH','24585phHKAh','524302jvxNTW','3766016JACQeu','5700ICcKHP','9220omFPvm','145UyPEWO','18KgaCSz','2456AENSfe','920129sqvgEe','2673jeAYnz'];_0x2ea4=function(){return _0x26079f;};return _0x2ea4();}import'./augmentation.js';