@ckeditor/ckeditor5-export-word 0.0.0-nightly-20231215.0 → 0.0.0-nightly-20231217.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.
- package/build/export-word.js +1 -1
- package/package.json +3 -2
- package/src/augmentation.d.ts +1 -1
- package/src/exportword.d.ts +2 -2
- package/src/exportword.js +1 -1
- package/src/exportwordcommand.d.ts +2 -2
- package/src/exportwordcommand.js +1 -1
- package/src/index.d.ts +3 -3
- package/src/index.js +1 -1
- package/src/utils.d.ts +3 -3
- package/src/utils.js +1 -1
package/build/export-word.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var e={704:(e,t,o)=>{e.exports=o(79)("./src/core.js")},273:(e,t,o)=>{e.exports=o(79)("./src/ui.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,o),s.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{ExportWord:()=>u});var e=o(704),t=o(273);const r=["
|
|
5
|
+
*/(()=>{var e={704:(e,t,o)=>{e.exports=o(79)("./src/core.js")},273:(e,t,o)=>{e.exports=o(79)("./src/ui.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,o),s.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{ExportWord:()=>u});var e=o(704),t=o(273);const r=["cssText","has","indexOf","plugins","ownerNode","keys",":root","then","DateTimeFormat","get","timezone",".ck-content","data-cke","timeZone","styleSheets","getSuggestions","Users","trim","TrackChanges","map","isResolved","name","EDITOR_STYLES","authorId","length","resolvedOptions","suggestions","getCommentThreads","users","The editor stylesheet could not be found in the document. Check your webpack config – style-loader should use data-cke=true attribute for the editor stylesheet.","join","text","createdAt","comments","from","push","author","CommentsRepository"];var s,i;s=r,i=256,function(e){for(;--e;)s.push(s.shift())}(++i);const a=function(e,t){return r[e-=0]};function c(){const e=[],t=[];for(const o of Array[a("0x6")](document[a("0x18")]))if(o[a("0xe")].hasAttribute(a("0x16")))for(const n of Array[a("0x6")](o.cssRules))-1!==n[a("0xa")][a("0xc")](a("0x15"))?e[a("0x7")](n.cssText):-1!==n.cssText[a("0xc")](a("0x10"))&&t[a("0x7")](n.cssText);return e[a("0x22")]||console.warn(a("0x1")),[...t,...e][a("0x2")](" ")[a("0x1b")]()}function d(e){const t=e[a("0xd")][a("0xb")](a("0x1a")),o=e.plugins.has(a("0x9")),n=e[a("0xd")].has(a("0x1c")),r={};if(t&&o){const t=function(e){const t={};if(!e.length)return t;for(const o of e)o[a("0x5")][a("0x1d")]((e=>{void 0===t[o.id]&&(t[o.id]=[]),t[o.id][a("0x7")]({author:e[a("0x8")].name,content:e.content,created:e[a("0x4")],is_resolved:o[a("0x1e")]})}));return t}(e[a("0xd")][a("0x13")](a("0x9"))[a("0x25")]({skipNotAttached:!0,skipEmpty:!0}));Object[a("0xf")](t).length&&(r[a("0x5")]=t)}if(t&&n){const t=e.plugins[a("0x13")](a("0x1c")),o=e[a("0xd")].get(a("0x1a")),n=function(e,t){const o={};if(!e[a("0x22")]||!t[a("0x22")])return o;for(const n of e)o[n.id]={author:t[a("0x13")](n[a("0x21")])[a("0x1f")],created:n[a("0x4")]};return o}(t[a("0x19")]({toJSON:!0}),o[a("0x0")]);Object.keys(n)[a("0x22")]&&(r[a("0x24")]=n)}return(r[a("0x24")]||r[a("0x5")])&&(r[a("0x14")]=(new(Intl[a("0x12")]))[a("0x23")]()[a("0x17")]),r}class l extends e.Command{constructor(e){super(e),this.set("isBusy",!1),this.affectsData=!1}refresh(){this.isEnabled=!this.isBusy,this.value=this.isBusy?"pending":void 0}execute(e={}){const t=this.editor,o=t.t,n=e.converterUrl||"https://docx-converter.cke-cs.com/v1/convert",r=e.converterOptions||{},s=t.plugins.get("ExportWord"),i=e.token||s._token,l=!1!==r.auto_pagination,u=e.dataCallback||(e=>e.data.get({pagination:l}));return this.isBusy=!0,this.refresh(),function(e){if(!e)return new Promise((e=>e("")));const t=[];for(const o of e)a("0x20")!==o?t[a("0x7")](window.fetch(o)[a("0x11")]((e=>e[a("0x3")]()))):t[a("0x7")](c());return Promise.all(t)[a("0x11")]((e=>e[a("0x2")](" ")[a("0x1b")]()))}(e.stylesheets||["EDITOR_STYLES"]).then((async o=>{const s=await u(t),a=this._replaceSuggestionTypes(s),c={html:'<div class="ck-content" dir="'+t.locale.contentLanguageDirection+'">'+a+"</div>",css:o,options:{...r,...d(t)}},l={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/docx",...i?{Authorization:i.value}:null},body:JSON.stringify(c)};return window.fetch(n,l).then((e=>{if(200!==e.status)throw e;return e.blob()})).then((t=>{const o="function"==typeof e.fileName?e.fileName():e.fileName;this._downloadFile(t,o||"document.docx")}))})).catch((e=>{throw t.plugins.get("Notification").showWarning(o("An error occurred while generating the Word file.")),e})).finally((()=>{this.isBusy=!1,this.refresh()}))}_replaceSuggestionTypes(e){if(!e)return e;const t=(e,t,o)=>"attribute"===o?t+"formatInline:":e;return e.replace(/<suggestion-(start|end) name="(.*?):/g,((e,o,n)=>t(e,"<suggestion-"+o+' name="',n))).replace(/data-suggestion-(start|end)-(before|after)="(.*?):/g,((e,o,n,r)=>t(e,"data-suggestion-"+o+"-"+n+'="',r)))}_downloadFile(e,t){const o=document.createElement("a");o.href=window.URL.createObjectURL(e),o.download=t,o.click(),o.remove()}}class u extends e.Plugin{static get pluginName(){return"ExportWord"}static get requires(){return["CloudServices",t.Notification]}init(){const e=this.editor,o=e.t,n=e.config.get("exportWord")||{};e.commands.add("exportWord",new l(e)),e.ui.componentFactory.add("exportWord",(r=>{const s=e.commands.get("exportWord"),i=new t.ButtonView(r),a=new t.SpinnerView;return i.set({label:o("Export to Word"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M17.826 16.843a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0l2.346-2.815Z"/><path d="m14 0 5 4.5v9.741a2.737 2.737 0 0 0-1.5-.617V6.5h-5v-5h-8v3H3V0h11Zm0 2v3h3.3L14 2Z"/><path d="M3 17.5h6.746c.1.22.23.429.391.623l.731.877H3v-1.5Z"/><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.6.6 0 0 0 1.032 0l.043-.09 1.554-4 .028-.093a.6.6 0 0 0-1.104-.43v.001Z"/></svg>\n',tooltip:!0}),i.children.add(a),i.bind("isOn","isEnabled").to(s,"isBusy","isEnabled"),a.bind("isVisible").to(s,"isBusy"),i.iconView.bind("isVisible").to(s,"isBusy",(e=>!e)),this.listenTo(i,"execute",(()=>{e.execute("exportWord",n),e.editing.view.focus()})),i}));const r=e.plugins.get("CloudServices");!1===n.tokenUrl?this._token=null:n.tokenUrl?r.registerTokenUrl(n.tokenUrl).then((e=>{this._token=e})):this._token=r.token}}})(),(window.CKEditor5=window.CKEditor5||{}).exportWord=n})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-export-word",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20231217.0",
|
|
4
4
|
"description": "Export to Word feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -27,9 +27,10 @@
|
|
|
27
27
|
"Word converter",
|
|
28
28
|
"HTML to Word"
|
|
29
29
|
],
|
|
30
|
+
"type": "module",
|
|
30
31
|
"main": "src/index.js",
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"ckeditor5": "0.0.0-nightly-
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20231217.0"
|
|
33
34
|
},
|
|
34
35
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
35
36
|
"author": "CKSource (https://cksource.com/)",
|
package/src/augmentation.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { ExportWordConfig, ExportWord, ExportWordCommand } from './index';
|
|
5
|
+
import type { ExportWordConfig, ExportWord, ExportWordCommand } from './index.js';
|
|
6
6
|
declare module '@ckeditor/ckeditor5-core' {
|
|
7
7
|
interface EditorConfig {
|
|
8
8
|
/**
|
package/src/exportword.d.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @module export-word/exportword
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
10
|
-
import { Notification } from 'ckeditor5/src/ui';
|
|
9
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import { Notification } from 'ckeditor5/src/ui.js';
|
|
11
11
|
import type { InitializedToken, TokenUrl } from '@ckeditor/ckeditor5-cloud-services';
|
|
12
12
|
/**
|
|
13
13
|
* The export to Word feature.
|
package/src/exportword.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x58b249}from'ckeditor5/src/core.js';import{ButtonView as _0xa5f150,Notification as _0x52e9dd,SpinnerView as _0x7eba2b}from'ckeditor5/src/ui.js';import _0xa53291 from'./exportwordcommand.js';import _0x8f10fa from'../theme/icons/exportword.svg';export default class d extends _0x58b249{static get['pluginName'](){return'ExportWord';}static get['requires'](){return['CloudServices',_0x52e9dd];}['init'](){const _0x35b23b=this['editor'],t=_0x35b23b['t'],_0x36586c=_0x35b23b['config']['get']('exportWord')||{};_0x35b23b['commands']['add']('exportWord',new _0xa53291(_0x35b23b)),_0x35b23b['ui']['componentFactory']['add']('exportWord',_0x3ec015=>{const _0x11f18d=_0x35b23b['commands']['get']('exportWord'),_0x3bb5df=new _0xa5f150(_0x3ec015),_0x1bf0b4=new _0x7eba2b();return _0x3bb5df['set']({'label':t('Export\x20to\x20Word'),'icon':_0x8f10fa,'tooltip':!0x0}),_0x3bb5df['children']['add'](_0x1bf0b4),_0x3bb5df['bind']('isOn','isEnabled')['to'](_0x11f18d,'isBusy','isEnabled'),_0x1bf0b4['bind']('isVisible')['to'](_0x11f18d,'isBusy'),_0x3bb5df['iconView']['bind']('isVisible')['to'](_0x11f18d,'isBusy',_0x4c0155=>!_0x4c0155),this['listenTo'](_0x3bb5df,'execute',()=>{_0x35b23b['execute']('exportWord',_0x36586c),_0x35b23b['editing']['view']['focus']();}),_0x3bb5df;});const _0x5764fe=_0x35b23b['plugins']['get']('CloudServices');!0x1===_0x36586c['tokenUrl']?this['_token']=null:_0x36586c['tokenUrl']?_0x5764fe['registerTokenUrl'](_0x36586c['tokenUrl'])['then'](_0x2a8ef5=>{this['_token']=_0x2a8ef5;}):this['_token']=_0x5764fe['token'];}}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @module export-word/exportwordcommand
|
|
7
7
|
* @publicApi
|
|
8
8
|
*/
|
|
9
|
-
import { Command, type Editor } from 'ckeditor5/src/core';
|
|
10
|
-
import { type ExportWordConfig } from './exportword';
|
|
9
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import { type ExportWordConfig } from './exportword.js';
|
|
11
11
|
/**
|
|
12
12
|
* The export to Word command.
|
|
13
13
|
*
|
package/src/exportwordcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x433cb3}from'ckeditor5/src/core.js';import{getConverterOptions as _0x9d9788,getStyles as _0x4b6428}from'./utils.js';export default class i extends _0x433cb3{constructor(_0x15b6d5){super(_0x15b6d5),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x44fedf={}){const _0xceb542=this['editor'],t=_0xceb542['t'],_0x2e7390=_0x44fedf['converterUrl']||'https://docx-converter.cke-cs.com/v1/convert',_0x1f2aed=_0x44fedf['converterOptions']||{},_0x223957=_0xceb542['plugins']['get']('ExportWord'),_0x3ca757=_0x44fedf['token']||_0x223957['_token'],_0x1be2f7=!0x1!==_0x1f2aed['auto_pagination'],_0x1fcda3=_0x44fedf['dataCallback']||(_0x454adc=>_0x454adc['data']['get']({'pagination':_0x1be2f7}));return this['isBusy']=!0x0,this['refresh'](),_0x4b6428(_0x44fedf['stylesheets']||['EDITOR_STYLES'])['then'](async _0x3c52b8=>{const _0x218866=await _0x1fcda3(_0xceb542),_0x294bd0=this['_replaceSuggestionTypes'](_0x218866),_0x4fea91={'html':'<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0xceb542['locale']['contentLanguageDirection']+'\x22>'+_0x294bd0+'</div>','css':_0x3c52b8,'options':{..._0x1f2aed,..._0x9d9788(_0xceb542)}},_0x361ce4={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/docx',..._0x3ca757?{'Authorization':_0x3ca757['value']}:null},'body':JSON['stringify'](_0x4fea91)};return window['fetch'](_0x2e7390,_0x361ce4)['then'](_0x5de43e=>{if(0xc8!==_0x5de43e['status'])throw _0x5de43e;return _0x5de43e['blob']();})['then'](_0x36bc94=>{const _0x2d96bd='function'==typeof _0x44fedf['fileName']?_0x44fedf['fileName']():_0x44fedf['fileName'];this['_downloadFile'](_0x36bc94,_0x2d96bd||'document.docx');});})['catch'](_0x780f9=>{throw _0xceb542['plugins']['get']('Notification')['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20Word\x20file.')),_0x780f9;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['_replaceSuggestionTypes'](_0x3abae1){if(!_0x3abae1)return _0x3abae1;const _0x39ea9f=(_0x102980,_0x523662,_0x521f59)=>'attribute'===_0x521f59?_0x523662+'formatInline:':_0x102980;return _0x3abae1['replace'](/<suggestion-(start|end) name="(.*?):/g,(_0x3c7aa2,_0x29a3a9,_0x4d2289)=>_0x39ea9f(_0x3c7aa2,'<suggestion-'+_0x29a3a9+'\x20name=\x22',_0x4d2289))['replace'](/data-suggestion-(start|end)-(before|after)="(.*?):/g,(_0x39f386,_0x445b07,_0x1956f9,_0x2f39e8)=>_0x39ea9f(_0x39f386,'data-suggestion-'+_0x445b07+'-'+_0x1956f9+'=\x22',_0x2f39e8));}['_downloadFile'](_0x2d5015,_0x19aacd){const _0x5ba72e=document['createElement']('a');_0x5ba72e['href']=window['URL']['createObjectURL'](_0x2d5015),_0x5ba72e['download']=_0x19aacd,_0x5ba72e['click'](),_0x5ba72e['remove']();}}
|
package/src/index.d.ts
CHANGED
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module export-word
|
|
7
7
|
*/
|
|
8
|
-
export { default as ExportWord, type ExportWordConfig } from './exportword';
|
|
9
|
-
export type { default as ExportWordCommand } from './exportwordcommand';
|
|
10
|
-
import './augmentation';
|
|
8
|
+
export { default as ExportWord, type ExportWordConfig } from './exportword.js';
|
|
9
|
+
export type { default as ExportWordCommand } from './exportwordcommand.js';
|
|
10
|
+
import './augmentation.js';
|
package/src/index.js
CHANGED
package/src/utils.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { Editor } from 'ckeditor5/src/core';
|
|
6
|
-
import type { Collection } from 'ckeditor5/src/utils';
|
|
7
|
-
import type { ExportWordConverterOptions, ExportWordConverterCommentsOption, ExportWordConverterSuggestionsOption } from './exportword';
|
|
5
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import type { Collection } from 'ckeditor5/src/utils.js';
|
|
7
|
+
import type { ExportWordConverterOptions, ExportWordConverterCommentsOption, ExportWordConverterSuggestionsOption } from './exportword.js';
|
|
8
8
|
import type { CommentThread } from '@ckeditor/ckeditor5-comments';
|
|
9
9
|
import type { SuggestionJSON } from '@ckeditor/ckeditor5-track-changes';
|
|
10
10
|
import type { User } from '@ckeditor/ckeditor5-collaboration-core';
|
package/src/utils.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2857=['cssText','has','indexOf','plugins','ownerNode','keys',':root','then','DateTimeFormat','get','timezone','.ck-content','data-cke','timeZone','styleSheets','getSuggestions','Users','trim','TrackChanges','map','isResolved','name','EDITOR_STYLES','authorId','length','resolvedOptions','suggestions','getCommentThreads','users','The\x20editor\x20stylesheet\x20could\x20not\x20be\x20found\x20in\x20the\x20document.\x20Check\x20your\x20webpack\x20config\x20–\x20style-loader\x20should\x20use\x20data-cke=true\x20attribute\x20for\x20the\x20editor\x20stylesheet.','join','text','createdAt','comments','from','push','author','CommentsRepository'];(function(_0x252838,_0x285713){const _0x48f33e=function(_0xb173e0){while(--_0xb173e0){_0x252838['push'](_0x252838['shift']());}};_0x48f33e(++_0x285713);}(_0x2857,0x100));const _0x48f3=function(_0x252838,_0x285713){_0x252838=_0x252838-0x0;let _0x48f33e=_0x2857[_0x252838];return _0x48f33e;};export function getStyles(_0x37fa57){if(!_0x37fa57)return new Promise(_0x4f4f06=>_0x4f4f06(''));const _0x4ccdca=[];for(const _0x2a5e29 of _0x37fa57)_0x48f3('0x20')!==_0x2a5e29?_0x4ccdca[_0x48f3('0x7')](window['fetch'](_0x2a5e29)[_0x48f3('0x11')](_0x5bea2c=>_0x5bea2c[_0x48f3('0x3')]())):_0x4ccdca[_0x48f3('0x7')](u());return Promise['all'](_0x4ccdca)[_0x48f3('0x11')](_0xda59b9=>_0xda59b9[_0x48f3('0x2')]('\x20')[_0x48f3('0x1b')]());}function u(){const _0x1005e1=[],_0x24a1a6=[];for(const _0x331b75 of Array[_0x48f3('0x6')](document[_0x48f3('0x18')])){if(_0x331b75[_0x48f3('0xe')]['hasAttribute'](_0x48f3('0x16')))for(const _0x30a62f of Array[_0x48f3('0x6')](_0x331b75['cssRules']))-0x1!==_0x30a62f[_0x48f3('0xa')][_0x48f3('0xc')](_0x48f3('0x15'))?_0x1005e1[_0x48f3('0x7')](_0x30a62f['cssText']):-0x1!==_0x30a62f['cssText'][_0x48f3('0xc')](_0x48f3('0x10'))&&_0x24a1a6[_0x48f3('0x7')](_0x30a62f['cssText']);}return _0x1005e1[_0x48f3('0x22')]||console['warn'](_0x48f3('0x1')),[..._0x24a1a6,..._0x1005e1][_0x48f3('0x2')]('\x20')[_0x48f3('0x1b')]();}export function getConverterOptions(_0x324a72){const _0x40b907=_0x324a72[_0x48f3('0xd')][_0x48f3('0xb')](_0x48f3('0x1a')),_0x212312=_0x324a72['plugins']['has'](_0x48f3('0x9')),_0x2a28f5=_0x324a72[_0x48f3('0xd')]['has'](_0x48f3('0x1c')),_0x53026f={};if(_0x40b907&&_0x212312){const _0x3f6454=getComments(_0x324a72[_0x48f3('0xd')][_0x48f3('0x13')](_0x48f3('0x9'))[_0x48f3('0x25')]({'skipNotAttached':!0x0,'skipEmpty':!0x0}));Object[_0x48f3('0xf')](_0x3f6454)['length']&&(_0x53026f[_0x48f3('0x5')]=_0x3f6454);}if(_0x40b907&&_0x2a28f5){const _0x3d404d=_0x324a72['plugins'][_0x48f3('0x13')](_0x48f3('0x1c')),_0x2b02e4=_0x324a72[_0x48f3('0xd')]['get'](_0x48f3('0x1a')),_0x50a1ab=getSuggestions(_0x3d404d[_0x48f3('0x19')]({'toJSON':!0x0}),_0x2b02e4[_0x48f3('0x0')]);Object['keys'](_0x50a1ab)[_0x48f3('0x22')]&&(_0x53026f[_0x48f3('0x24')]=_0x50a1ab);}return(_0x53026f[_0x48f3('0x24')]||_0x53026f[_0x48f3('0x5')])&&(_0x53026f[_0x48f3('0x14')]=new Intl[(_0x48f3('0x12'))]()[_0x48f3('0x23')]()[_0x48f3('0x17')]),_0x53026f;}export function getComments(_0x5b448c){const _0x1155a4={};if(!_0x5b448c['length'])return _0x1155a4;for(const _0x53978d of _0x5b448c)_0x53978d[_0x48f3('0x5')][_0x48f3('0x1d')](_0x441cc9=>{void 0x0===_0x1155a4[_0x53978d['id']]&&(_0x1155a4[_0x53978d['id']]=[]),_0x1155a4[_0x53978d['id']][_0x48f3('0x7')]({'author':_0x441cc9[_0x48f3('0x8')]['name'],'content':_0x441cc9['content'],'created':_0x441cc9[_0x48f3('0x4')],'is_resolved':_0x53978d[_0x48f3('0x1e')]});});return _0x1155a4;}export function getSuggestions(_0x17397a,_0x44479f){const _0x1ff5af={};if(!_0x17397a[_0x48f3('0x22')]||!_0x44479f[_0x48f3('0x22')])return _0x1ff5af;for(const _0x440f44 of _0x17397a)_0x1ff5af[_0x440f44['id']]={'author':_0x44479f[_0x48f3('0x13')](_0x440f44[_0x48f3('0x21')])[_0x48f3('0x1f')],'created':_0x440f44[_0x48f3('0x4')]};return _0x1ff5af;}
|