@ckeditor/ckeditor5-import-word 0.0.0-nightly-20240314.0 → 0.0.0-nightly-20240316.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(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),c=r(584);class l 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,c.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,c.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,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 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,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 p=u;function d(){const t=["https://docx-converter.cke-cs.com/v2/convert/docx-html","611079GXsTUU","1328796YZmPNk","_token","inline","pluginName","186722gJfAwD","requires","tokenUrl","8obLWab","CloudServices","get","cloudServices","plugins","define","3092964LFOUKN","972468AUtRhE","registerTokenUrl","editor","config","getToken","importWord","876140IQmsbM","none","init","ImportWordEditing","6469928dfZgsV","token","add","commands"];return(d=function(){return t})()}function u(t,e){const r=d();return(u=function(t,e){return r[t-=198]})(t,e)}!function(t,e){const r=u,o=t();for(;;)try{if(378681===parseInt(r(222))/1+-parseInt(r(218))/2+-parseInt(r(217))/3*(parseInt(r(225))/4)+parseInt(r(208))/5+-parseInt(r(202))/6+parseInt(r(201))/7+parseInt(r(212))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(d);class h extends t.Plugin{static get[p(221)](){return p(211)}static get[p(223)](){const t=p;return[e.Notification,s.ClipboardPipeline,t(226)]}constructor(t){const e=p;super(t),this[e(219)]=null}async[p(210)](){const t=p,e=this[t(204)];e[t(205)][t(200)](t(207),{converterUrl:t(216),tokenUrl:(e[t(205)][t(227)](t(198))||{})[t(224)],formatting:{resets:t(209),defaults:t(209),styles:t(220)}}),e[t(215)][t(214)](t(207),new l(e));const{tokenUrl:r}=e[t(205)][t(227)](t(207));if(r){const{tokenUrl:o}=e[t(205)][t(227)](t(198))||{};this[t(219)]=r===o?e[t(199)][t(227)](t(226))[t(213)]:await e[t(199)][t(227)](t(226))[t(203)](r)}}[p(206)](){return this[p(219)]}}var m=f;function f(t,e){var r=g();return(f=function(t,e){return r[t-=392]})(t,e)}function g(){var t=["10MMeQUI","311490FYKqNX","24VvzRwW","1280180pRVbUf","pluginName","requires","2198qTtozs","51024ExkBTi","5020452pmXgUQ","ImportWord","2118lIOwxF","5lWjkqR","830604YThgeo","1665174KeeBNb"];return(g=function(){return t})()}!function(t,e){for(var r=f,o=t();;)try{if(576156===-parseInt(r(402))/1+-parseInt(r(393))/2*(-parseInt(r(397))/3)+parseInt(r(394))/4*(parseInt(r(398))/5)+parseInt(r(399))/6+-parseInt(r(400))/7*(parseInt(r(403))/8)+-parseInt(r(395))/9*(-parseInt(r(401))/10)+parseInt(r(404))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(g);class I extends t.Plugin{static get[m(405)](){return m(396)}static get[m(392)](){return[h,i]}}function v(t,e){var r=b();return(v=function(t,e){return r[t-=419]})(t,e)}function b(){var t=["7448MbNGgj","857772KfvVqG","7159935MmquRa","3857350EvNPOc","8734206HwpaZl","1595156kIgtJr","519PLtXZO","184XTupVZ","1081332ejdbLO"];return(b=function(){return t})()}!function(t,e){for(var r=v,o=t();;)try{if(877719===parseInt(r(419))/1+-parseInt(r(420))/2*(-parseInt(r(426))/3)+parseInt(r(425))/4+-parseInt(r(422))/5+-parseInt(r(424))/6+-parseInt(r(423))/7+-parseInt(r(427))/8*(-parseInt(r(421))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(b)})(),(window.CKEditor5=window.CKEditor5||{}).importWord=o})();
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),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 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,p.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,p.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,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 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,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")}}function l(){const t=["99465dZJLCz","define","none","init","registerTokenUrl","commands","inline","CloudServices","cloudServices","requires","10HyDAIp","6pmuJNP","34554LFXgvL","config","https://docx-converter.cke-cs.com/v2/convert/docx-html","editor","63xeTsBp","tokenUrl","56101232cpXeFU","232pegquX","ImportWordEditing","10569726AwlOyt","plugins","1589448LhoybH","_token","add","get","token","4774145HpQZEi","5415288PJBVTA","getToken","pluginName","importWord"];return(l=function(){return t})()}const d=u;function u(t,e){const r=l();return(u=function(t,e){return r[t-=262]})(t,e)}!function(t,e){const r=u,n=t();for(;;)try{if(941123===parseInt(r(276))/1+parseInt(r(262))/2*(-parseInt(r(288))/3)+-parseInt(r(272))/4+-parseInt(r(271))/5*(parseInt(r(287))/6)+-parseInt(r(292))/7*(parseInt(r(266))/8)+parseInt(r(264))/9*(parseInt(r(286))/10)+parseInt(r(294))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(l);class h extends t.Plugin{static get[d(274)](){return d(263)}static get[d(285)](){const t=d;return[e.Notification,s.ClipboardPipeline,t(283)]}constructor(t){const e=d;super(t),this[e(267)]=null}async[d(279)](){const t=d,e=this[t(291)];e[t(289)][t(277)](t(275),{converterUrl:t(290),tokenUrl:(e[t(289)][t(269)](t(284))||{})[t(293)],formatting:{resets:t(278),defaults:t(278),styles:t(282)}}),e[t(281)][t(268)](t(275),new c(e));const{tokenUrl:r}=e[t(289)][t(269)](t(275));if(r){const{tokenUrl:n}=e[t(289)][t(269)](t(284))||{};this[t(267)]=r===n?e[t(265)][t(269)](t(283))[t(270)]:await e[t(265)][t(269)](t(283))[t(280)](r)}}[d(273)](){return this[d(267)]}}function m(t,e){var r=f();return(m=function(t,e){return r[t-=178]})(t,e)}var g=m;function f(){var t=["pluginName","8bdbFIt","11922eJnVHa","ImportWord","33fRTTYD","13567024tjptJr","2435949soZjYf","84399mRfiJk","695885gfMAUZ","requires","15595090JjdxgW","401040DGMFGy","126qpPpwe","94BiXlAJ"];return(f=function(){return t})()}!function(t,e){for(var r=m,n=t();;)try{if(867809===-parseInt(r(188))/1*(parseInt(r(185))/2)+parseInt(r(178))/3*(-parseInt(r(187))/4)+-parseInt(r(180))/5+parseInt(r(184))/6*(parseInt(r(179))/7)+-parseInt(r(191))/8+-parseInt(r(183))/9+-parseInt(r(182))/10*(-parseInt(r(190))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(f);class I extends t.Plugin{static get[g(186)](){return g(189)}static get[g(181)](){return[h,i]}}function v(t,e){var r=b();return(v=function(t,e){return r[t-=305]})(t,e)}function b(){var t=["2965886WbWlzH","13811afFrhg","112chgIxr","10bawuWI","2826BQPaez","39nGzFhJ","147678CIADgz","128396MvWpme","13739ErqZzY","10360OJmqOv","9144cKWnpH","5ZVgjMK","3464jHqIKT","6558792WhMsyF"];return(b=function(){return t})()}!function(t,e){for(var r=v,n=t();;)try{if(701496===-parseInt(r(309))/1*(parseInt(r(313))/2)+parseInt(r(312))/3*(parseInt(r(308))/4)+parseInt(r(317))/5*(-parseInt(r(305))/6)+-parseInt(r(307))/7*(parseInt(r(318))/8)+parseInt(r(310))/9*(parseInt(r(315))/10)+parseInt(r(314))/11*(parseInt(r(316))/12)+-parseInt(r(311))/13*(-parseInt(r(306))/14))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(b)})(),(window.CKEditor5=window.CKEditor5||{}).importWord=n})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-import-word",
3
- "version": "0.0.0-nightly-20240314.0",
3
+ "version": "0.0.0-nightly-20240316.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-20240314.0"
33
+ "ckeditor5": "0.0.0-nightly-20240316.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 _0x16c5b7=_0x5167;(function(_0x56e5fb,_0x481487){var _0x312635=_0x5167,_0x32f94b=_0x56e5fb();while(!![]){try{var _0x3ba2b6=-parseInt(_0x312635(0x192))/0x1+-parseInt(_0x312635(0x189))/0x2*(-parseInt(_0x312635(0x18d))/0x3)+parseInt(_0x312635(0x18a))/0x4*(parseInt(_0x312635(0x18e))/0x5)+parseInt(_0x312635(0x18f))/0x6+-parseInt(_0x312635(0x190))/0x7*(parseInt(_0x312635(0x193))/0x8)+-parseInt(_0x312635(0x18b))/0x9*(-parseInt(_0x312635(0x191))/0xa)+parseInt(_0x312635(0x194))/0xb;if(_0x3ba2b6===_0x481487)break;else _0x32f94b['push'](_0x32f94b['shift']());}catch(_0x15f9bc){_0x32f94b['push'](_0x32f94b['shift']());}}}(_0x2a44,0x8ca9c));import{Plugin as _0x984eb3}from'ckeditor5/src/core.js';function _0x5167(_0x530746,_0x3f008b){var _0x2a446d=_0x2a44();return _0x5167=function(_0x516752,_0x590407){_0x516752=_0x516752-0x188;var _0x363598=_0x2a446d[_0x516752];return _0x363598;},_0x5167(_0x530746,_0x3f008b);}import _0x3b02ae from'./importwordui.js';function _0x2a44(){var _0x39b201=['10MMeQUI','311490FYKqNX','24VvzRwW','1280180pRVbUf','pluginName','requires','2198qTtozs','51024ExkBTi','5020452pmXgUQ','ImportWord','2118lIOwxF','5lWjkqR','830604YThgeo','1665174KeeBNb'];_0x2a44=function(){return _0x39b201;};return _0x2a44();}import _0xf12bb2 from'./importwordediting.js';export default class i extends _0x984eb3{static get[_0x16c5b7(0x195)](){var _0x5470ef=_0x16c5b7;return _0x5470ef(0x18c);}static get[_0x16c5b7(0x188)](){return[_0xf12bb2,_0x3b02ae];}}
23
+ function _0x30fa(_0x471ed6,_0x5bfaf2){var _0x15d385=_0x15d3();return _0x30fa=function(_0x30fa8b,_0x18dcb4){_0x30fa8b=_0x30fa8b-0xb2;var _0x4b53f6=_0x15d385[_0x30fa8b];return _0x4b53f6;},_0x30fa(_0x471ed6,_0x5bfaf2);}var _0x5b9cda=_0x30fa;(function(_0x2e382f,_0x40d254){var _0x2b73c7=_0x30fa,_0x2afe74=_0x2e382f();while(!![]){try{var _0x5ea7a4=-parseInt(_0x2b73c7(0xbc))/0x1*(parseInt(_0x2b73c7(0xb9))/0x2)+parseInt(_0x2b73c7(0xb2))/0x3*(-parseInt(_0x2b73c7(0xbb))/0x4)+-parseInt(_0x2b73c7(0xb4))/0x5+parseInt(_0x2b73c7(0xb8))/0x6*(parseInt(_0x2b73c7(0xb3))/0x7)+-parseInt(_0x2b73c7(0xbf))/0x8+-parseInt(_0x2b73c7(0xb7))/0x9+-parseInt(_0x2b73c7(0xb6))/0xa*(-parseInt(_0x2b73c7(0xbe))/0xb);if(_0x5ea7a4===_0x40d254)break;else _0x2afe74['push'](_0x2afe74['shift']());}catch(_0x4d1fd7){_0x2afe74['push'](_0x2afe74['shift']());}}}(_0x15d3,0xd3de1));function _0x15d3(){var _0x16e75d=['pluginName','8bdbFIt','11922eJnVHa','ImportWord','33fRTTYD','13567024tjptJr','2435949soZjYf','84399mRfiJk','695885gfMAUZ','requires','15595090JjdxgW','401040DGMFGy','126qpPpwe','94BiXlAJ'];_0x15d3=function(){return _0x16e75d;};return _0x15d3();}import{Plugin as _0x1c72d0}from'ckeditor5/src/core.js';import _0x59d634 from'./importwordui.js';import _0x19dd14 from'./importwordediting.js';export default class i extends _0x1c72d0{static get[_0x5b9cda(0xba)](){var _0x1b6725=_0x5b9cda;return _0x1b6725(0xbd);}static get[_0x5b9cda(0xb5)](){return[_0x19dd14,_0x59d634];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x228839}from'ckeditor5/src/core.js';import{Range as _0x4b0c2c}from'ckeditor5/src/engine.js';import{logWarning as _0x1a2d13,logError as _0x3196ce,first as _0x1b8af1,uid as _0x1ba865}from'ckeditor5/src/utils.js';export default class d extends _0x228839{constructor(_0x466f2b){super(_0x466f2b),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x250b5c,_0x4e444a)=>{const _0x2d9642=new DataTransfer();_0x2d9642['setData']('text/html',_0x4e444a['html']);const _0x4cc7fe=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x430abf=>{this['_importMarker']['stopListening'](),_0x430abf['setSelection'](_0x4cc7fe),_0x466f2b['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x2d9642});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x53f40a,_0x3367da={}){if(this['isBusy'])return Promise['resolve']();const _0x88602e=this['editor']['config']['get']('importWord'),_0x115996={'url':_0x88602e['converterUrl'],'file':_0x53f40a,'serviceConfig':{..._0x3367da,'formatting':_0x88602e['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x115996)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x4429e4=this['editor']['model'],_0x1eef51=_0x4429e4['schema'],_0x53afcc=_0x4429e4['document']['selection'],_0x43d590=_0x1b8af1(_0x53afcc['getSelectedBlocks']());return!!_0x43d590&&_0x1eef51['checkChild'](_0x43d590['parent'],'paragraph');}['_prepareForImport'](){const _0x103675=this['editor'],_0x55bc49=_0x103675['model'],_0x79f695=_0x55bc49['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x103675['model']['createBatch']({'isUndoable':!0x0}),_0x55bc49['enqueueChange'](this['_undoStepBatch'],_0x444322=>{_0x79f695['isCollapsed']||_0x55bc49['deleteContent'](_0x79f695,{'leaveUnmerged':!0x0});const _0x52b479=_0x79f695['getFirstPosition'](),_0x4d6e2f=_0x1b8af1(_0x79f695['getSelectedBlocks']());let _0x33543f;_0x33543f=_0x4d6e2f['is']('element','paragraph')&&_0x4d6e2f['isEmpty']?_0x52b479:_0x52b479['isAtStart']?_0x55bc49['createPositionBefore'](_0x4d6e2f):_0x52b479['isAtEnd']?_0x55bc49['createPositionAfter'](_0x4d6e2f):_0x444322['split'](_0x52b479)['position'],this['_importMarker']=_0x444322['addMarker']('importWord:'+_0x1ba865(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x4b0c2c(_0x33543f)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x189447=this['editor']['model'];_0x189447['markers']['has'](this['_importMarker'])&&_0x189447['enqueueChange'](this['_undoStepBatch'],_0x317657=>{_0x317657['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x41d24a,file:_0x5d5f4e,serviceConfig:_0x178513}){const _0x15ffb3=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x596427=new FormData();_0x596427['set']('config',JSON['stringify'](_0x178513)),_0x596427['set']('file',_0x5d5f4e);const _0x27a6fd={'method':'POST','headers':{},'body':_0x596427,'signal':this['_abortController']['signal']};return _0x15ffb3&&(_0x27a6fd['headers']['Authorization']=_0x15ffb3['value']),fetch(_0x41d24a,_0x27a6fd);}['_handleImportResponse'](_0x475bef){return _0x475bef['ok']?_0x475bef['json']()['then'](_0x20bef1=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x20bef1);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x1a2d13('import-word-plugin-import-cancelled');const _0x26dcd3=this['editor'],_0x5367a0=(0x0,_0x26dcd3['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x26dcd3['plugins']['get']('Notification')['showWarning'](_0x5367a0),_0x3196ce('import-word-plugin-conversion-failed');}}
23
+ import{Command as _0x1ae816}from'ckeditor5/src/core.js';import{Range as _0x288890}from'ckeditor5/src/engine.js';import{logWarning as _0x128b22,logError as _0x1cebe0,first as _0x84fb68,uid as _0x2d8233}from'ckeditor5/src/utils.js';export default class d extends _0x1ae816{constructor(_0x20b13c){super(_0x20b13c),this['set']('isBusy',!0x1),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['on']('dataInsert',(_0x578103,_0x543b0c)=>{const _0x414c82=new DataTransfer();_0x414c82['setData']('text/html',_0x543b0c['html']);const _0x2b1b9a=this['_importMarker']['getRange']();this['editor']['model']['enqueueChange'](this['_undoStepBatch'],_0x45ee11=>{this['_importMarker']['stopListening'](),_0x45ee11['setSelection'](_0x2b1b9a),_0x20b13c['editing']['view']['document']['fire']('clipboardInput',{'dataTransfer':_0x414c82});});},{'priority':'low'});}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x4098a5,_0x32319c={}){if(this['isBusy'])return Promise['resolve']();const _0x15550d=this['editor']['config']['get']('importWord'),_0x9451c3={'url':_0x15550d['converterUrl'],'file':_0x4098a5,'serviceConfig':{..._0x32319c,'formatting':_0x15550d['formatting']}};return this['_prepareForImport'](),this['_sendImportRequest'](_0x9451c3)['then'](this['_handleImportResponse']['bind'](this))['catch'](this['_handleImportFailure']['bind'](this))['finally'](this['_cleanUpAfterImport']['bind'](this));}['_checkEnabled'](){if(this['isBusy'])return!0x1;const _0x87d6df=this['editor']['model'],_0x50fa44=_0x87d6df['schema'],_0x2f561c=_0x87d6df['document']['selection'],_0x38f90b=_0x84fb68(_0x2f561c['getSelectedBlocks']());return!!_0x38f90b&&_0x50fa44['checkChild'](_0x38f90b['parent'],'paragraph');}['_prepareForImport'](){const _0x9bc89d=this['editor'],_0x572a73=_0x9bc89d['model'],_0x111c54=_0x572a73['document']['selection'];this['_abortController']=new AbortController(),this['_undoStepBatch']=_0x9bc89d['model']['createBatch']({'isUndoable':!0x0}),_0x572a73['enqueueChange'](this['_undoStepBatch'],_0x364460=>{_0x111c54['isCollapsed']||_0x572a73['deleteContent'](_0x111c54,{'leaveUnmerged':!0x0});const _0x3574db=_0x111c54['getFirstPosition'](),_0x3c7be5=_0x84fb68(_0x111c54['getSelectedBlocks']());let _0x486106;_0x486106=_0x3c7be5['is']('element','paragraph')&&_0x3c7be5['isEmpty']?_0x3574db:_0x3574db['isAtStart']?_0x572a73['createPositionBefore'](_0x3c7be5):_0x3574db['isAtEnd']?_0x572a73['createPositionAfter'](_0x3c7be5):_0x364460['split'](_0x3574db)['position'],this['_importMarker']=_0x364460['addMarker']('importWord:'+_0x2d8233(),{'usingOperation':!0x1,'affectsData':!0x1,'range':new _0x288890(_0x486106)}),this['_importMarker']['on']('change:range',()=>{'$graveyard'===this['_importMarker']['getRange']()['root']['rootName']&&this['_abortController']['abort']();});}),this['isBusy']=!0x0,this['refresh']();}['_cleanUpAfterImport'](){const _0x4e386f=this['editor']['model'];_0x4e386f['markers']['has'](this['_importMarker'])&&_0x4e386f['enqueueChange'](this['_undoStepBatch'],_0x454888=>{_0x454888['removeMarker'](this['_importMarker']);}),this['_importMarker']=null,this['_undoStepBatch']=null,this['_abortController']=null,this['isBusy']=!0x1,this['refresh']();}['_sendImportRequest']({url:_0x7de663,file:_0xba585a,serviceConfig:_0x491824}){const _0x34b7d7=this['editor']['plugins']['get']('ImportWordEditing')['getToken'](),_0x341ff5=new FormData();_0x341ff5['set']('config',JSON['stringify'](_0x491824)),_0x341ff5['set']('file',_0xba585a);const _0x223b7f={'method':'POST','headers':{},'body':_0x341ff5,'signal':this['_abortController']['signal']};return _0x34b7d7&&(_0x223b7f['headers']['Authorization']=_0x34b7d7['value']),fetch(_0x7de663,_0x223b7f);}['_handleImportResponse'](_0x5ef041){return _0x5ef041['ok']?_0x5ef041['json']()['then'](_0x374330=>{if(!this['editor']['model']['markers']['has'](this['_importMarker']))return;'$graveyard'!==this['_importMarker']['getRange']()['root']['rootName']&&this['fire']('dataInsert',_0x374330);}):Promise['reject']();}['_handleImportFailure'](){if(this['_abortController']['signal']['aborted'])return void _0x128b22('import-word-plugin-import-cancelled');const _0x441624=this['editor'],_0x16a885=(0x0,_0x441624['t'])('An\x20error\x20occurred\x20while\x20importing\x20the\x20Word\x20file.');_0x441624['plugins']['get']('Notification')['showWarning'](_0x16a885),_0x1cebe0('import-word-plugin-conversion-failed');}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x19faa0=_0x4451;(function(_0xace3f4,_0x17521d){const _0x35db70=_0x4451,_0x73cbcc=_0xace3f4();while(!![]){try{const _0x35da5f=parseInt(_0x35db70(0xde))/0x1+-parseInt(_0x35db70(0xda))/0x2+-parseInt(_0x35db70(0xd9))/0x3*(parseInt(_0x35db70(0xe1))/0x4)+parseInt(_0x35db70(0xd0))/0x5+-parseInt(_0x35db70(0xca))/0x6+parseInt(_0x35db70(0xc9))/0x7+parseInt(_0x35db70(0xd4))/0x8;if(_0x35da5f===_0x17521d)break;else _0x73cbcc['push'](_0x73cbcc['shift']());}catch(_0x18a586){_0x73cbcc['push'](_0x73cbcc['shift']());}}}(_0x2caa,0x5c739));function _0x2caa(){const _0x24e667=['https://docx-converter.cke-cs.com/v2/convert/docx-html','611079GXsTUU','1328796YZmPNk','_token','inline','pluginName','186722gJfAwD','requires','tokenUrl','8obLWab','CloudServices','get','cloudServices','plugins','define','3092964LFOUKN','972468AUtRhE','registerTokenUrl','editor','config','getToken','importWord','876140IQmsbM','none','init','ImportWordEditing','6469928dfZgsV','token','add','commands'];_0x2caa=function(){return _0x24e667;};return _0x2caa();}import{Plugin as _0x167f3d}from'ckeditor5/src/core.js';import{Notification as _0x26ba51}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x317a9d}from'ckeditor5/src/clipboard.js';function _0x4451(_0x1ed65f,_0x2167fc){const _0x2caae8=_0x2caa();return _0x4451=function(_0x445185,_0x50ee39){_0x445185=_0x445185-0xc6;let _0x560d7c=_0x2caae8[_0x445185];return _0x560d7c;},_0x4451(_0x1ed65f,_0x2167fc);}import _0x5cfa9b from'./importwordcommand.js';export default class e extends _0x167f3d{static get[_0x19faa0(0xdd)](){const _0x4f0fa0=_0x19faa0;return _0x4f0fa0(0xd3);}static get[_0x19faa0(0xdf)](){const _0x2b0644=_0x19faa0;return[_0x26ba51,_0x317a9d,_0x2b0644(0xe2)];}constructor(_0x5afa19){const _0x3037f8=_0x19faa0;super(_0x5afa19),this[_0x3037f8(0xdb)]=null;}async[_0x19faa0(0xd2)](){const _0x4ade7b=_0x19faa0,_0x49108c=this[_0x4ade7b(0xcc)];_0x49108c[_0x4ade7b(0xcd)][_0x4ade7b(0xc8)](_0x4ade7b(0xcf),{'converterUrl':_0x4ade7b(0xd8),'tokenUrl':(_0x49108c[_0x4ade7b(0xcd)][_0x4ade7b(0xe3)](_0x4ade7b(0xc6))||{})[_0x4ade7b(0xe0)],'formatting':{'resets':_0x4ade7b(0xd1),'defaults':_0x4ade7b(0xd1),'styles':_0x4ade7b(0xdc)}}),_0x49108c[_0x4ade7b(0xd7)][_0x4ade7b(0xd6)](_0x4ade7b(0xcf),new _0x5cfa9b(_0x49108c));const {tokenUrl:_0x3c1c0d}=_0x49108c[_0x4ade7b(0xcd)][_0x4ade7b(0xe3)](_0x4ade7b(0xcf));if(_0x3c1c0d){const {tokenUrl:_0x285f67}=_0x49108c[_0x4ade7b(0xcd)][_0x4ade7b(0xe3)](_0x4ade7b(0xc6))||{};this[_0x4ade7b(0xdb)]=_0x3c1c0d===_0x285f67?_0x49108c[_0x4ade7b(0xc7)][_0x4ade7b(0xe3)](_0x4ade7b(0xe2))[_0x4ade7b(0xd5)]:await _0x49108c[_0x4ade7b(0xc7)][_0x4ade7b(0xe3)](_0x4ade7b(0xe2))[_0x4ade7b(0xcb)](_0x3c1c0d);}}[_0x19faa0(0xce)](){const _0x5d549c=_0x19faa0;return this[_0x5d549c(0xdb)];}}
23
+ function _0x3485(){const _0x5cd9f0=['99465dZJLCz','define','none','init','registerTokenUrl','commands','inline','CloudServices','cloudServices','requires','10HyDAIp','6pmuJNP','34554LFXgvL','config','https://docx-converter.cke-cs.com/v2/convert/docx-html','editor','63xeTsBp','tokenUrl','56101232cpXeFU','232pegquX','ImportWordEditing','10569726AwlOyt','plugins','1589448LhoybH','_token','add','get','token','4774145HpQZEi','5415288PJBVTA','getToken','pluginName','importWord'];_0x3485=function(){return _0x5cd9f0;};return _0x3485();}const _0x56018b=_0x4ec5;(function(_0x2281a8,_0x3245a4){const _0x14c258=_0x4ec5,_0x1e3f84=_0x2281a8();while(!![]){try{const _0x4f752d=parseInt(_0x14c258(0x114))/0x1+parseInt(_0x14c258(0x106))/0x2*(-parseInt(_0x14c258(0x120))/0x3)+-parseInt(_0x14c258(0x110))/0x4+-parseInt(_0x14c258(0x10f))/0x5*(parseInt(_0x14c258(0x11f))/0x6)+-parseInt(_0x14c258(0x124))/0x7*(parseInt(_0x14c258(0x10a))/0x8)+parseInt(_0x14c258(0x108))/0x9*(parseInt(_0x14c258(0x11e))/0xa)+parseInt(_0x14c258(0x126))/0xb;if(_0x4f752d===_0x3245a4)break;else _0x1e3f84['push'](_0x1e3f84['shift']());}catch(_0x774470){_0x1e3f84['push'](_0x1e3f84['shift']());}}}(_0x3485,0xe5c43));import{Plugin as _0x5ba523}from'ckeditor5/src/core.js';function _0x4ec5(_0x14139b,_0x48e628){const _0x3485aa=_0x3485();return _0x4ec5=function(_0x4ec544,_0xe2bf54){_0x4ec544=_0x4ec544-0x106;let _0x3919e6=_0x3485aa[_0x4ec544];return _0x3919e6;},_0x4ec5(_0x14139b,_0x48e628);}import{Notification as _0x4091ae}from'ckeditor5/src/ui.js';import{ClipboardPipeline as _0x1abcb9}from'ckeditor5/src/clipboard.js';import _0x214b84 from'./importwordcommand.js';export default class e extends _0x5ba523{static get[_0x56018b(0x112)](){const _0x5dd505=_0x56018b;return _0x5dd505(0x107);}static get[_0x56018b(0x11d)](){const _0x2c208c=_0x56018b;return[_0x4091ae,_0x1abcb9,_0x2c208c(0x11b)];}constructor(_0x5f5321){const _0x535514=_0x56018b;super(_0x5f5321),this[_0x535514(0x10b)]=null;}async[_0x56018b(0x117)](){const _0x1b5a9f=_0x56018b,_0x6b44b7=this[_0x1b5a9f(0x123)];_0x6b44b7[_0x1b5a9f(0x121)][_0x1b5a9f(0x115)](_0x1b5a9f(0x113),{'converterUrl':_0x1b5a9f(0x122),'tokenUrl':(_0x6b44b7[_0x1b5a9f(0x121)][_0x1b5a9f(0x10d)](_0x1b5a9f(0x11c))||{})[_0x1b5a9f(0x125)],'formatting':{'resets':_0x1b5a9f(0x116),'defaults':_0x1b5a9f(0x116),'styles':_0x1b5a9f(0x11a)}}),_0x6b44b7[_0x1b5a9f(0x119)][_0x1b5a9f(0x10c)](_0x1b5a9f(0x113),new _0x214b84(_0x6b44b7));const {tokenUrl:_0x69bd75}=_0x6b44b7[_0x1b5a9f(0x121)][_0x1b5a9f(0x10d)](_0x1b5a9f(0x113));if(_0x69bd75){const {tokenUrl:_0x1c6d9c}=_0x6b44b7[_0x1b5a9f(0x121)][_0x1b5a9f(0x10d)](_0x1b5a9f(0x11c))||{};this[_0x1b5a9f(0x10b)]=_0x69bd75===_0x1c6d9c?_0x6b44b7[_0x1b5a9f(0x109)][_0x1b5a9f(0x10d)](_0x1b5a9f(0x11b))[_0x1b5a9f(0x10e)]:await _0x6b44b7[_0x1b5a9f(0x109)][_0x1b5a9f(0x10d)](_0x1b5a9f(0x11b))[_0x1b5a9f(0x118)](_0x69bd75);}}[_0x56018b(0x111)](){const _0x3555ac=_0x56018b;return this[_0x3555ac(0x10b)];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x23f24c}from'ckeditor5/src/core.js';import{SpinnerView as _0x41f945}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x28a4df}from'ckeditor5/src/upload.js';import _0x464dd0 from'../theme/icons/importword.svg';export default class o extends _0x23f24c{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x5dfb72=this['editor'],t=_0x5dfb72['t'];_0x5dfb72['ui']['componentFactory']['add']('importWord',_0x5cbadc=>{const _0x4b6d33=_0x5dfb72['commands']['get']('importWord'),_0x47eace=new _0x28a4df(_0x5cbadc),_0x80e74=new _0x41f945();return _0x47eace['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x47eace['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x464dd0,'tooltip':!0x0}),_0x47eace['buttonView']['bind']('isOn','isEnabled')['to'](_0x4b6d33,'isBusy','isEnabled'),_0x80e74['bind']('isVisible')['to'](_0x4b6d33,'isBusy'),_0x47eace['buttonView']['iconView']['bind']('isVisible')['to'](_0x4b6d33,'isBusy',_0x443be9=>!_0x443be9),_0x47eace['buttonView']['children']['add'](_0x80e74),_0x47eace['on']('done',(_0x5ba956,_0x3ff329)=>{_0x5dfb72['execute']('importWord',_0x3ff329[0x0],{}),_0x5dfb72['editing']['view']['focus']();}),_0x47eace;});}}
23
+ import{Plugin as _0x5f3dd8}from'ckeditor5/src/core.js';import{SpinnerView as _0x1f20d9}from'ckeditor5/src/ui.js';import{FileDialogButtonView as _0x32f5f2}from'ckeditor5/src/upload.js';import _0x2b0456 from'../theme/icons/importword.svg';export default class o extends _0x5f3dd8{static get['pluginName'](){return'ImportWordUI';}['init'](){const _0x14fd08=this['editor'],t=_0x14fd08['t'];_0x14fd08['ui']['componentFactory']['add']('importWord',_0x1b27ae=>{const _0x3d7c17=_0x14fd08['commands']['get']('importWord'),_0x482397=new _0x32f5f2(_0x1b27ae),_0x1a90e7=new _0x1f20d9();return _0x482397['set']({'acceptedType':'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template'}),_0x482397['buttonView']['set']({'label':t('Import\x20from\x20Word'),'icon':_0x2b0456,'tooltip':!0x0}),_0x482397['buttonView']['bind']('isOn','isEnabled')['to'](_0x3d7c17,'isBusy','isEnabled'),_0x1a90e7['bind']('isVisible')['to'](_0x3d7c17,'isBusy'),_0x482397['buttonView']['iconView']['bind']('isVisible')['to'](_0x3d7c17,'isBusy',_0x91acbd=>!_0x91acbd),_0x482397['buttonView']['children']['add'](_0x1a90e7),_0x482397['on']('done',(_0x34c292,_0x46450a)=>{_0x14fd08['execute']('importWord',_0x46450a[0x0],{}),_0x14fd08['editing']['view']['focus']();}),_0x482397;});}}
package/src/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x9e8f(_0x3a6563,_0x3ad2f2){var _0x166fca=_0x166f();return _0x9e8f=function(_0x9e8f8a,_0x25d94c){_0x9e8f8a=_0x9e8f8a-0x1a3;var _0x2331ba=_0x166fca[_0x9e8f8a];return _0x2331ba;},_0x9e8f(_0x3a6563,_0x3ad2f2);}(function(_0x3e3b11,_0x2538ee){var _0x2e83a9=_0x9e8f,_0x5841ea=_0x3e3b11();while(!![]){try{var _0x3de4a0=parseInt(_0x2e83a9(0x1a3))/0x1+-parseInt(_0x2e83a9(0x1a4))/0x2*(-parseInt(_0x2e83a9(0x1aa))/0x3)+parseInt(_0x2e83a9(0x1a9))/0x4+-parseInt(_0x2e83a9(0x1a6))/0x5+-parseInt(_0x2e83a9(0x1a8))/0x6+-parseInt(_0x2e83a9(0x1a7))/0x7+-parseInt(_0x2e83a9(0x1ab))/0x8*(-parseInt(_0x2e83a9(0x1a5))/0x9);if(_0x3de4a0===_0x2538ee)break;else _0x5841ea['push'](_0x5841ea['shift']());}catch(_0x418e25){_0x5841ea['push'](_0x5841ea['shift']());}}}(_0x166f,0xd6497));export{default as ImportWord}from'./importword.js';function _0x166f(){var _0x4b37d4=['7448MbNGgj','857772KfvVqG','7159935MmquRa','3857350EvNPOc','8734206HwpaZl','1595156kIgtJr','519PLtXZO','184XTupVZ','1081332ejdbLO'];_0x166f=function(){return _0x4b37d4;};return _0x166f();}export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';
23
+ function _0x40b7(_0x1f58b7,_0x2038de){var _0x3d12fb=_0x3d12();return _0x40b7=function(_0x40b744,_0xe34e7){_0x40b744=_0x40b744-0x131;var _0x19c9e6=_0x3d12fb[_0x40b744];return _0x19c9e6;},_0x40b7(_0x1f58b7,_0x2038de);}(function(_0x1c06c1,_0x42f7cb){var _0x523a59=_0x40b7,_0x515530=_0x1c06c1();while(!![]){try{var _0x2bf824=-parseInt(_0x523a59(0x135))/0x1*(parseInt(_0x523a59(0x139))/0x2)+parseInt(_0x523a59(0x138))/0x3*(parseInt(_0x523a59(0x134))/0x4)+parseInt(_0x523a59(0x13d))/0x5*(-parseInt(_0x523a59(0x131))/0x6)+-parseInt(_0x523a59(0x133))/0x7*(parseInt(_0x523a59(0x13e))/0x8)+parseInt(_0x523a59(0x136))/0x9*(parseInt(_0x523a59(0x13b))/0xa)+parseInt(_0x523a59(0x13a))/0xb*(parseInt(_0x523a59(0x13c))/0xc)+-parseInt(_0x523a59(0x137))/0xd*(-parseInt(_0x523a59(0x132))/0xe);if(_0x2bf824===_0x42f7cb)break;else _0x515530['push'](_0x515530['shift']());}catch(_0x391573){_0x515530['push'](_0x515530['shift']());}}}(_0x3d12,0xab438));function _0x3d12(){var _0x122050=['2965886WbWlzH','13811afFrhg','112chgIxr','10bawuWI','2826BQPaez','39nGzFhJ','147678CIADgz','128396MvWpme','13739ErqZzY','10360OJmqOv','9144cKWnpH','5ZVgjMK','3464jHqIKT','6558792WhMsyF'];_0x3d12=function(){return _0x122050;};return _0x3d12();}export{default as ImportWord}from'./importword.js';export{default as ImportWordEditing}from'./importwordediting.js';export{default as ImportWordUI}from'./importwordui.js';import'./augmentation.js';