@ckeditor/ckeditor5-ckbox 35.3.2 → 36.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/LICENSE.md CHANGED
@@ -2,7 +2,7 @@ Software License Agreement
2
2
  ==========================
3
3
 
4
4
  **CKEditor 5 CKBox feature** – https://github.com/ckeditor/ckeditor5-ckbox <br>
5
- Copyright (c) 2003-2022, [CKSource Holding sp. z o.o.](http://cksource.com) All rights reserved.
5
+ Copyright (c) 2003-2023, [CKSource Holding sp. z o.o.](http://cksource.com) All rights reserved.
6
6
 
7
7
  Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
8
8
 
package/build/ckbox.js CHANGED
@@ -1,5 +1,5 @@
1
1
  !function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Cannot determine a category for the uploaded file.":"Cannot determine a category for the uploaded file.","Open file manager":"Open file manager"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
2
2
  /*!
3
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
5
  */(()=>{var e={704:(e,t,i)=>{e.exports=i(79)("./src/core.js")},492:(e,t,i)=>{e.exports=i(79)("./src/engine.js")},273:(e,t,i)=>{e.exports=i(79)("./src/ui.js")},448:(e,t,i)=>{e.exports=i(79)("./src/upload.js")},209:(e,t,i)=>{e.exports=i(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,i),r.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";i.r(n),i.d(n,{CKBox:()=>I,CKBoxEditing:()=>f,CKBoxUI:()=>o});var e=i(704),t=i(273);class o extends e.Plugin{static get pluginName(){return"CKBoxUI"}afterInit(){const e=this.editor;if(!e.commands.get("ckbox"))return;const i=e.t;e.ui.componentFactory.add("ckbox",(n=>{const o=e.commands.get("ckbox"),r=new t.ButtonView(n);return r.set({label:i("Open file manager"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.627 16.5zm5.873-.196zm0-7.001V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6.027 6.027 0 0 0-1.5-1.228zM16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5H16z"/><path d="M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10zM15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1h-2z"/></svg>',tooltip:!0}),r.bind("isOn","isEnabled").to(o,"value","isEnabled"),r.on("execute",(()=>{e.execute("ckbox")})),r}))}}var r=i(492),s=i(209);function a({token:e,id:t,origin:i,width:n,extension:o}){const r=c(e),s=function(e){const t=[10*e/100,80],i=Math.floor(Math.max(...t)),n=[Math.min(e,4e3)];let o=n[0];for(;o-i>=i;)o-=i,n.unshift(o);return n}(n),a=function(e){if("bmp"===e||"tiff"===e||"jpg"===e)return"jpeg";return e}(o);return{imageFallbackUrl:d({environmentId:r,id:t,origin:i,width:n,extension:a}),imageSources:[{srcset:s.map((e=>`${d({environmentId:r,id:t,origin:i,width:e,extension:"webp"})} ${e}w`)).join(","),sizes:`(max-width: ${n}px) 100vw, ${n}px`,type:"image/webp"}]}}function c(e){const[,t]=e.value.split(".");return JSON.parse(atob(t)).aud}function d({environmentId:e,id:t,origin:i,width:n,extension:o}){return new URL(`${e}/assets/${t}/images/${n}.${o}`,i).toString()}class l extends e.Command{constructor(e){super(e),this._chosenAssets=new Set,this._wrapper=null,this._initListeners()}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){this.fire("ckbox:open")}_getValue(){return null!==this._wrapper}_checkEnabled(){const e=this.editor.commands.get("insertImage"),t=this.editor.commands.get("link");return!(!e.isEnabled&&!t.isEnabled)}_prepareOptions(){const e=this.editor.config.get("ckbox");return{theme:e.theme,language:e.language,tokenUrl:e.tokenUrl,serviceOrigin:e.serviceOrigin,assetsOrigin:e.assetsOrigin,dialog:{onClose:()=>this.fire("ckbox:close")},assets:{onChoose:e=>this.fire("ckbox:choose",e)}}}_initListeners(){const e=this.editor,t=e.model,i=!e.config.get("ckbox.ignoreDataId");this.on("ckbox",(()=>{this.refresh()}),{priority:"low"}),this.on("ckbox:open",(()=>{this.isEnabled&&!this.value&&(this._wrapper=(0,s.createElement)(document,"div",{class:"ck ckbox-wrapper"}),document.body.appendChild(this._wrapper),window.CKBox.mount(this._wrapper,this._prepareOptions()))})),this.on("ckbox:close",(()=>{this.value&&(this._wrapper.remove(),this._wrapper=null)})),this.on("ckbox:choose",((n,o)=>{if(!this.isEnabled)return;const r=e.commands.get("insertImage"),s=e.commands.get("link"),a=e.plugins.get("CKBoxEditing"),c=function({assets:e,origin:t,token:i,isImageAllowed:n,isLinkAllowed:o}){return e.map((e=>({id:e.data.id,type:g(e)?"image":"link",attributes:u(e,i,t)}))).filter((e=>"image"===e.type?n:o))}({assets:o,origin:e.config.get("ckbox.assetsOrigin"),token:a.getToken(),isImageAllowed:r.isEnabled,isLinkAllowed:s.isEnabled});0!==c.length&&t.change((e=>{for(const t of c){const n=t===c[c.length-1];this._insertAsset(t,n,e),i&&(setTimeout((()=>this._chosenAssets.delete(t)),1e3),this._chosenAssets.add(t))}}))})),this.listenTo(e,"destroy",(()=>{this.fire("ckbox:close"),this._chosenAssets.clear()}))}_insertAsset(e,t,i){const n=this.editor.model.document.selection;i.removeSelectionAttribute("linkHref"),"image"===e.type?this._insertImage(e):this._insertLink(e,i),t||i.setSelection(n.getLastPosition())}_insertImage(e){const t=this.editor,{imageFallbackUrl:i,imageSources:n,imageTextAlternative:o}=e.attributes;t.execute("insertImage",{source:{src:i,sources:n,alt:o}})}_insertLink(e,t){const i=this.editor,n=i.model,o=n.document.selection,{linkName:r,linkHref:a}=e.attributes;if(o.isCollapsed){const e=(0,s.toMap)(o.getAttributes()),i=t.createText(r,e),a=n.insertContent(i);t.setSelection(a)}i.execute("link",a)}}function u(e,t,i){if(g(e)){const{imageFallbackUrl:n,imageSources:o}=a({token:t,origin:i,id:e.data.id,width:e.data.metadata.width,extension:e.data.extension});return{imageFallbackUrl:n,imageSources:o,imageTextAlternative:e.data.metadata.description||""}}return{linkName:e.data.name,linkHref:m(e,t,i)}}function g(e){const t=e.data.metadata;return!!t&&(t.width&&t.height)}function m(e,t,i){const n=c(t),o=new URL(`${n}/assets/${e.data.id}/file`,i);return o.searchParams.set("download","true"),o.toString()}var h=i(448);class b extends e.Plugin{static get requires(){return["ImageUploadEditing","ImageUploadProgress",h.FileRepository,f]}static get pluginName(){return"CKBoxUploadAdapter"}async afterInit(){const e=this.editor,t=!!e.config.get("ckbox"),i=!!window.CKBox;if(!t&&!i)return;const n=e.plugins.get(h.FileRepository),o=e.plugins.get(f);n.createUploadAdapter=t=>new p(t,o.getToken(),e);const r=!e.config.get("ckbox.ignoreDataId"),s=e.plugins.get("ImageUploadEditing");r&&s.on("uploadComplete",((t,{imageElement:i,data:n})=>{e.model.change((e=>{e.setAttribute("ckboxImageId",n.ckboxImageId,i)}))}))}}class p{constructor(e,t,i){this.loader=e,this.token=t,this.editor=i,this.controller=new AbortController,this.serviceOrigin=i.config.get("ckbox.serviceOrigin"),this.assetsOrigin=i.config.get("ckbox.assetsOrigin")}async getAvailableCategories(e=0){const t=new URL("categories",this.serviceOrigin);return t.searchParams.set("limit",50..toString()),t.searchParams.set("offset",e.toString()),this._sendHttpRequest({url:t}).then((async t=>{if(t.totalCount-(e+50)>0){const i=await this.getAvailableCategories(e+50);return[...t.items,...i]}return t.items})).catch((()=>{this.controller.signal.throwIfAborted(),(0,s.logError)("ckbox-fetch-category-http-error")}))}async getCategoryIdForFile(e){const t=k(e.name),i=await this.getAvailableCategories();if(!i)return null;const n=this.editor.config.get("ckbox.defaultUploadCategories");if(n){const e=Object.keys(n).find((e=>n[e].includes(t)));if(e){const t=i.find((t=>t.id===e||t.name===e));return t?t.id:null}}const o=i.find((e=>e.extensions.includes(t)));return o?o.id:null}async upload(){const e=this.editor.t,t=e("Cannot determine a category for the uploaded file."),i=await this.loader.file,n=await this.getCategoryIdForFile(i);if(!n)return Promise.reject(t);const o=new URL("assets",this.serviceOrigin),r=new FormData;r.append("categoryId",n),r.append("file",i);const s={method:"POST",url:o,data:r,onUploadProgress:e=>{e.lengthComputable&&(this.loader.uploadTotal=e.total,this.loader.uploaded=e.loaded)}};return this._sendHttpRequest(s).then((async e=>{const t=await this._getImageWidth(),n=k(i.name),o=a({token:this.token,id:e.id,origin:this.assetsOrigin,width:t,extension:n});return{ckboxImageId:e.id,default:o.imageFallbackUrl,sources:o.imageSources}})).catch((()=>{const t=e("Cannot upload file:")+` ${i.name}.`;return Promise.reject(t)}))}abort(){this.controller.abort()}_sendHttpRequest(e){const{url:t,data:i,onUploadProgress:n}=e,o=e.method||"GET",r=this.controller.signal,s=new XMLHttpRequest;s.open(o,t.toString(),!0),s.setRequestHeader("Authorization",this.token.value),s.setRequestHeader("CKBox-Version","CKEditor 5"),s.responseType="json";const a=()=>{s.abort()};return new Promise(((e,t)=>{r.addEventListener("abort",a),s.addEventListener("loadstart",(()=>{r.addEventListener("abort",a)})),s.addEventListener("loadend",(()=>{r.removeEventListener("abort",a)})),s.addEventListener("error",(()=>{t()})),s.addEventListener("abort",(()=>{t()})),s.addEventListener("load",(async()=>{const i=s.response;return!i||i.statusCode>=400?t(i&&i.message):e(i)})),n&&s.upload.addEventListener("progress",(e=>{n(e)})),s.send(i)}))}_getImageWidth(){return new Promise((e=>{const t=new Image;t.onload=()=>{URL.revokeObjectURL(t.src),e(t.width)},t.src=this.loader.data}))}}function k(e){return e.match(/\.(?<ext>[^.]+)$/).groups.ext}class f extends e.Plugin{static get pluginName(){return"CKBoxEditing"}static get requires(){return["CloudServices","LinkEditing","PictureEditing",b]}async init(){const e=this.editor,t=!!e.config.get("ckbox"),i=!!window.CKBox;if(!t&&!i)return;this._initConfig();const n=e.plugins.get("CloudServicesCore"),o=e.config.get("ckbox.tokenUrl"),r=e.config.get("cloudServices.tokenUrl");this._token=o===r?e.plugins.get("CloudServices").token:await n.createToken(o).init(),e.config.get("ckbox.ignoreDataId")||(this._initSchema(),this._initConversion(),this._initFixers()),i&&e.commands.add("ckbox",new l(e))}getToken(){return this._token}_initConfig(){const e=this.editor;e.config.define("ckbox",{serviceOrigin:"https://api.ckbox.io",assetsOrigin:"https://ckbox.cloud",defaultUploadCategories:null,ignoreDataId:!1,language:e.locale.uiLanguage,theme:"default",tokenUrl:e.config.get("cloudServices.tokenUrl")});if(!e.config.get("ckbox.tokenUrl"))throw new s.CKEditorError("ckbox-plugin-missing-token-url",this);e.plugins.has("ImageBlockEditing")||e.plugins.has("ImageInlineEditing")||(0,s.logError)("ckbox-plugin-image-feature-missing",e)}_initSchema(){const e=this.editor.model.schema;e.extend("$text",{allowAttributes:"ckboxLinkId"}),e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),e.addAttributeCheck(((e,t)=>{if(!!!e.last.getAttribute("linkHref")&&"ckboxLinkId"===t)return!1}))}_initConversion(){const e=this.editor;e.conversion.for("downcast").add((e=>{e.on("attribute:ckboxLinkId:imageBlock",((e,t,i)=>{const{writer:n,mapper:o,consumable:r}=i;if(!r.consume(t.item,e.name))return;const s=[...o.toViewElement(t.item).getChildren()].find((e=>"a"===e.name));s&&(t.item.hasAttribute("ckboxLinkId")?n.setAttribute("data-ckbox-resource-id",t.item.getAttribute("ckboxLinkId"),s):n.removeAttribute("data-ckbox-resource-id",s))}),{priority:"low"}),e.on("attribute:ckboxLinkId",((e,t,i)=>{const{writer:n,mapper:o,consumable:r}=i;if(r.consume(t.item,e.name)){if(t.attributeOldValue){const e=w(n,t.attributeOldValue);n.unwrap(o.toViewRange(t.range),e)}if(t.attributeNewValue){const e=w(n,t.attributeNewValue);if(t.item.is("selection")){const t=n.document.selection;n.wrap(t.getFirstRange(),e)}else n.wrap(o.toViewRange(t.range),e)}}}),{priority:"low"})})),e.conversion.for("upcast").add((e=>{e.on("element:a",((e,t,i)=>{const{writer:n,consumable:o}=i;if(!t.viewItem.getAttribute("href"))return;if(!o.consume(t.viewItem,{attributes:["data-ckbox-resource-id"]}))return;const r=t.viewItem.getAttribute("data-ckbox-resource-id");if(r)if(t.modelRange)for(let e of t.modelRange.getItems())e.is("$textProxy")&&(e=e.textNode),v(e)&&n.setAttribute("ckboxLinkId",r,e);else{const e=t.modelCursor.nodeBefore||t.modelCursor.parent;n.setAttribute("ckboxLinkId",r,e)}}),{priority:"low"})})),e.conversion.for("downcast").attributeToAttribute({model:"ckboxImageId",view:"data-ckbox-resource-id"}),e.conversion.for("upcast").elementToAttribute({model:{key:"ckboxImageId",value:e=>e.getAttribute("data-ckbox-resource-id")},view:{attributes:{"data-ckbox-resource-id":/[\s\S]+/}}})}_initFixers(){const e=this.editor,t=e.model,i=t.document.selection;t.document.registerPostFixer(function(e){return t=>{let i=!1;const n=e.model,o=e.commands.get("ckbox");if(!o)return i;for(const e of n.document.differ.getChanges()){if("insert"!==e.type&&"attribute"!==e.type)continue;const n="insert"===e.type?new r.Range(e.position,e.position.getShiftedBy(e.length)):e.range,s="attribute"===e.type&&"linkHref"===e.attributeKey&&null===e.attributeNewValue;for(const e of n.getItems()){if(s&&e.hasAttribute("ckboxLinkId")){t.removeAttribute("ckboxLinkId",e),i=!0;continue}const n=x(e,o._chosenAssets);for(const o of n){const n="image"===o.type?"ckboxImageId":"ckboxLinkId";o.id!==e.getAttribute(n)&&(t.setAttribute(n,o.id,e),i=!0)}}}return i}}(e)),t.document.registerPostFixer(function(e){return t=>{!e.hasAttribute("linkHref")&&e.hasAttribute("ckboxLinkId")&&t.removeSelectionAttribute("ckboxLinkId")}}(i))}}function x(e,t){const i=e.is("element","imageInline")||e.is("element","imageBlock"),n=e.hasAttribute("linkHref");return[...t].filter((t=>"image"===t.type&&i?t.attributes.imageFallbackUrl===e.getAttribute("src"):"link"===t.type&&n?t.attributes.linkHref===e.getAttribute("linkHref"):void 0))}function w(e,t){const i=e.createAttributeElement("a",{"data-ckbox-resource-id":t},{priority:5});return e.setCustomProperty("link",!0,i),i}function v(e){return!!e.is("$text")||!(!e.is("element","imageInline")&&!e.is("element","imageBlock"))}class I extends e.Plugin{static get pluginName(){return"CKBox"}static get requires(){return[f,o]}}})(),(window.CKEditor5=window.CKEditor5||{}).ckbox=n})();
@@ -0,0 +1 @@
1
+ !function(n){const e=n.ug=n.ug||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot determine a category for the uploaded file.":"يۈكلەيدىغان ھۆججەتنىڭ تۈرىنى جەزملىيەلمىدى.","Open file manager":"ھۆججەت باشقۇرغۇچنى ئاچ"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1,25 @@
1
+ # Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Uyghur (https://www.transifex.com/ckeditor/teams/11143/ug/)\n"
16
+ "Language: ug\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+
19
+ msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgid "Open file manager"
21
+ msgstr "ھۆججەت باشقۇرغۇچنى ئاچ"
22
+
23
+ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with any of the categories defined in CKBox while uploading an asset."
24
+ msgid "Cannot determine a category for the uploaded file."
25
+ msgstr "يۈكلەيدىغان ھۆججەتنىڭ تۈرىنى جەزملىيەلمىدى."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-ckbox",
3
- "version": "35.3.2",
3
+ "version": "36.0.0",
4
4
  "description": "CKBox integration for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -12,23 +12,23 @@
12
12
  ],
13
13
  "main": "src/index.js",
14
14
  "dependencies": {
15
- "ckeditor5": "^35.3.2"
15
+ "ckeditor5": "^36.0.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@ckeditor/ckeditor5-basic-styles": "^35.3.2",
19
- "@ckeditor/ckeditor5-core": "^35.3.2",
20
- "@ckeditor/ckeditor5-clipboard": "^35.3.2",
21
- "@ckeditor/ckeditor5-cloud-services": "^35.3.2",
22
- "@ckeditor/ckeditor5-dev-utils": "^31.0.0",
23
- "@ckeditor/ckeditor5-editor-classic": "^35.3.2",
24
- "@ckeditor/ckeditor5-engine": "^35.3.2",
25
- "@ckeditor/ckeditor5-image": "^35.3.2",
26
- "@ckeditor/ckeditor5-link": "^35.3.2",
27
- "@ckeditor/ckeditor5-paragraph": "^35.3.2",
28
- "@ckeditor/ckeditor5-theme-lark": "^35.3.2",
29
- "@ckeditor/ckeditor5-ui": "^35.3.2",
30
- "@ckeditor/ckeditor5-upload": "^35.3.2",
31
- "@ckeditor/ckeditor5-utils": "^35.3.2",
18
+ "@ckeditor/ckeditor5-basic-styles": "^36.0.0",
19
+ "@ckeditor/ckeditor5-core": "^36.0.0",
20
+ "@ckeditor/ckeditor5-clipboard": "^36.0.0",
21
+ "@ckeditor/ckeditor5-cloud-services": "^36.0.0",
22
+ "@ckeditor/ckeditor5-dev-utils": "^32.0.0",
23
+ "@ckeditor/ckeditor5-editor-classic": "^36.0.0",
24
+ "@ckeditor/ckeditor5-engine": "^36.0.0",
25
+ "@ckeditor/ckeditor5-image": "^36.0.0",
26
+ "@ckeditor/ckeditor5-link": "^36.0.0",
27
+ "@ckeditor/ckeditor5-paragraph": "^36.0.0",
28
+ "@ckeditor/ckeditor5-theme-lark": "^36.0.0",
29
+ "@ckeditor/ckeditor5-ui": "^36.0.0",
30
+ "@ckeditor/ckeditor5-upload": "^36.0.0",
31
+ "@ckeditor/ckeditor5-utils": "^36.0.0",
32
32
  "webpack": "^5.58.1",
33
33
  "webpack-cli": "^4.9.0"
34
34
  },
package/src/ckbox.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
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
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
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
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
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
5
 
package/src/ckboxui.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
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
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
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
5
 
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
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
5
 
package/src/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
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
5
 
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack://CKEditor5.ckbox/./theme/icons/browse-files.svg","webpack://CKEditor5.ckbox/./src/ckbox.js","webpack://CKEditor5.ckbox/./src/ckboxcommand.js","webpack://CKEditor5.ckbox/./src/ckboxediting.js","webpack://CKEditor5.ckbox/./src/ckboxui.js","webpack://CKEditor5.ckbox/./src/ckboxuploadadapter.js","webpack://CKEditor5.ckbox/./src/utils.js","webpack://CKEditor5.ckbox/delegated \"./src/core.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.ckbox/delegated \"./src/engine.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.ckbox/delegated \"./src/ui.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.ckbox/delegated \"./src/upload.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.ckbox/delegated \"./src/utils.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.ckbox/external var \"CKEditor5.dll\"","webpack://CKEditor5.ckbox/webpack/bootstrap","webpack://CKEditor5.ckbox/webpack/runtime/define property getters","webpack://CKEditor5.ckbox/webpack/runtime/hasOwnProperty shorthand","webpack://CKEditor5.ckbox/webpack/runtime/make namespace object","webpack://CKEditor5.ckbox/./src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,iEAAe,odAAod;;;;;;;;;;;;;;;;;;ACAne;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;;AAEZ;AACU;;AAE1C;AACA;AACA;AACA;AACA;AACA,MAAM,6CAA6C;AACnD,MAAM,mCAAmC;AACzC;AACA,YAAY,6DAA6D;AACzE;AACA,kBAAkB,+DAA+D;AACjF;AACA;AACA;AACA;AACe,oBAAoB,sDAAM;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,qDAAY,EAAE,gDAAO;AAChC;AACA;;AAEA;AACA,6BAA6B,6CAA6C;AAC1E;AACA,iBAAiB,qCAAqC;AACtD;AACA,YAAY,gCAAgC;AAC5C;;AAEA;AACA,6BAA6B,6CAA6C;AAC1E;AACA;AACA,IAAI,sEAAsE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,QAAQ,sEAAsE;AAC9E;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,gBAAgB;AAC9B,cAAc;AACd,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,gBAAgB;AAC9B,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,gDAAgD;AAC9D,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,oDAAoD;AAClE;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;;;;;;;;;;;;;;;;;;;AClPA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAE6C;AACc;AACF;;AAEzD;AACA;AACA;AACA;;AAEA;AACA,yCAAyC,oEAAoE;AAC7G;AACA;AACA;AACA;AACA;AACA,mCAAmC,8EAA8E;AACjH,IAAI,6CAA6C;AACjD,iDAAiD,kDAAkD;AACnG,IAAI,yCAAyC;AAC7C;AACA;AACA;AACe,2BAA2B,uDAAO;AACjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,oDAAoD;AAC/F,MAAM,gFAAgF;AACtF;AACA;AACA;AACA;AACA;AACA,UAAU,+EAA+E;AACzF;AACA;AACA,cAAc,+CAA+C;AAC7D;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG,IAAI,kBAAkB;;AAEzB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,kEAAa,qBAAqB,4BAA4B;AACjF;;AAEA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;;AAEJ;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,SAAS;AACrB,YAAY,mCAAmC;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA,UAAU,uDAAuD;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,YAAY,yCAAyC;AACrD,YAAY,mCAAmC;AAC/C;AACA;AACA;AACA;AACA;AACA,UAAU,qBAAqB;;AAE/B;AACA;AACA,+BAA+B,0DAAK;AACpC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,oDAAoD;AAC/D,WAAW,QAAQ;AACnB,WAAW,mCAAmC;AAC9C,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa;AACb,0BAA0B,uDAAuD;AACjF;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,4CAA4C;AACvD,WAAW,mCAAmC;AAC9C,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA,UAAU,iCAAiC,EAAE,oDAAY;AACzD;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,4CAA4C;AACvD,aAAa;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,4CAA4C;AACvD,WAAW,mCAAmC;AAC9C,WAAW,QAAQ;AACnB,aAAa;AACb;AACA,uBAAuB,wDAAgB;AACvC,0BAA0B,eAAe,WAAW,eAAe;;AAEnE;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,oDAAoD;AAC/D;;;;;;;;;;;;;;;;;;;;;ACrZA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAE4C;AACC;AACiB;;AAEpB;AACY;;AAEtD;AACA,iDAAiD,4DAA4D;AAC7G,IAAI,8EAA8E;AAClF;AACA;AACA;AACe,2BAA2B,sDAAM;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6DAA6D,2DAAkB;AAC/E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qCAAqC,qDAAY;AACjD;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;;AAEA;AACA;AACA,WAAW,uEAAuE;AAClF,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,aAAa,8DAAa;AAC1B;;AAEA;AACA;AACA;AACA;AACA,SAAS,yCAAyC;AAClD,SAAS,2CAA2C;AACpD,SAAS,gCAAgC;AACzC;AACA;AACA;AACA;AACA,cAAc,kCAAkC;AAChD;AACA,GAAG,6DAAQ;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4BAA4B,iCAAiC;;AAE7D;AACA,kCAAkC,qDAAqD;AACvF;;AAEA;AACA,mCAAmC,qDAAqD;AACxF;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,6BAA6B;;AAEzC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI,IAAI,kBAAkB;;AAE1B;AACA,YAAY,6BAA6B;;AAEzC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,OAAO;AACP;AACA;AACA;AACA,IAAI,IAAI,kBAAkB;AAC1B,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,qBAAqB;;AAEjC;AACA;AACA;AACA;;AAEA,mCAAmC;;AAEnC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA,IAAI,IAAI,kBAAkB;AAC1B,IAAI;;AAEJ;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kCAAkC;AAC7C,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,uDAAK;AACb;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,yCAAyC;AACpD,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,kDAAkD;AAC7D,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA,2DAA2D,8BAA8B,IAAI,cAAc;;AAE3G;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;ACjdA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACE;;AAEgB;;AAE9D;AACA;AACA;AACA;AACA;AACe,sBAAsB,sDAAM;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,sBAAsB,wDAAU;;AAEhC;AACA;AACA,UAAU,qEAAe;AACzB;AACA,KAAK;;AAEL;;AAEA;AACA;AACA,KAAK;;AAEL;AACA,IAAI;AACJ;AACA;;;;;;;;;;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAE4C;AACU;AACP;AACL;AACH;;AAEvC;AACA;AACA,YAAY,0EAA0E;AACtF;AACA,oBAAoB,gCAAgC;AACpD;AACA,kBAAkB,wEAAwE;AAC1F;AACA;AACA;AACA;AACe,iCAAiC,sDAAM;AACtD;AACA;AACA;AACA;AACA,wDAAwD,gEAAc,EAAE,qDAAY;AACpF;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,6CAA6C,gEAAc;AAC3D,2CAA2C,qDAAY;;AAEvD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qDAAqD,qBAAqB;AAC1E;AACA;AACA,MAAM;AACN,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yCAAyC;AACrD,YAAY,mCAAmC;AAC/C,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA,cAAc,yCAAyC;AACvD;AACA;;AAEA;AACA;AACA;AACA,cAAc,mCAAmC;AACjD;AACA;;AAEA;AACA;AACA;AACA,cAAc,kCAAkC;AAChD;AACA;;AAEA;AACA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kCAAkC,mBAAmB;AACrD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI,6DAAQ;AACZ,KAAK;AACL;;AAEA;AACA;AACA;AACA,YAAY,MAAM;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,oDAAY;AAClC;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,2DAA2D,WAAW;;AAEtE;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB,YAAY,cAAc;AAC1B,YAAY,eAAe;AAC3B,YAAY,UAAU;AACtB,cAAc;AACd;AACA;AACA,UAAU,8BAA8B;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;AC1YA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,mCAAmC;AAC9C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACO,yBAAyB,sCAAsC;AACtE;AACA;AACA;AACA,mDAAmD,sEAAsE;AACzH;AACA,sDAAsD,uEAAuE;;AAE7H,aAAa,qBAAqB,GAAG,iBAAiB;AACtD,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,OAAO,cAAc,OAAO;AACrD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,aAAa;AACb;AACO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb,kCAAkC,8CAA8C;AAChF,sBAAsB,eAAe,WAAW,IAAI,WAAW,OAAO,IAAI,WAAW;;AAErF;AACA;;;;;;;;;;;ACrIA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE2C;AACc;AACV","file":"ckbox.js","sourcesContent":["export default \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M11.627 16.5zm5.873-.196zm0-7.001V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6.027 6.027 0 0 0-1.5-1.228zM16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5H16z\\\"/><path d=\\\"M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10zM15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1h-2z\\\"/></svg>\";","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module ckbox/ckbox\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\n\nimport CKBoxUI from './ckboxui';\nimport CKBoxEditing from './ckboxediting';\n\n/**\n * The CKBox feature, a bridge between the CKEditor 5 WYSIWYG editor and the CKBox file manager and uploader.\n *\n * This is a \"glue\" plugin which enables:\n *\n * * {@link module:ckbox/ckboxediting~CKBoxEditing},\n * * {@link module:ckbox/ckboxui~CKBoxUI},\n *\n * See the {@glink features/images/image-upload/ckbox CKBox integration} guide to learn how to configure and use this feature.\n *\n * Check out the {@glink features/images/image-upload/image-upload Image upload} guide to learn about other ways to upload\n * images into CKEditor 5.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class CKBox extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'CKBox';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ CKBoxEditing, CKBoxUI ];\n\t}\n}\n\n/**\n * The configuration of the {@link module:ckbox/ckbox~CKBox CKBox feature}.\n *\n * Read more in {@link module:ckbox/ckbox~CKBoxConfig}.\n *\n * @member {module:ckbox/ckbox~CKBoxConfig} module:core/editor/editorconfig~EditorConfig#ckbox\n */\n\n/**\n * The configuration of the {@link module:ckbox/ckbox~CKBox CKBox feature}.\n *\n * The minimal configuration for the CKBox feature requires providing the\n * {@link module:ckbox/ckbox~CKBoxConfig#tokenUrl `config.ckbox.tokenUrl`}:\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\tckbox: {\n *\t\t\t\t\ttokenUrl: 'https://example.com/cs-token-endpoint'\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * Hovewer, you can also adjust the feature to fit your needs:\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\tckbox: {\n *\t\t\t\t\tdefaultUploadCategories: {\n *\t\t\t\t\t\tBitmaps: [ 'bmp' ],\n *\t\t\t\t\t\tPictures: [ 'jpg', 'jpeg' ],\n *\t\t\t\t\t\tScans: [ 'png', 'tiff' ]\n *\t\t\t\t\t},\n *\t\t\t\t\tignoreDataId: true,\n *\t\t\t\t\tserviceOrigin: 'https://example.com/',\n *\t\t\t\t\tassetsOrigin: 'https://example.cloud/',\n *\t\t\t\t\ttokenUrl: 'https://example.com/cs-token-endpoint'\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.\n *\n * @interface CKBoxConfig\n */\n\n/**\n * The authentication token URL for CKBox feature.\n *\n * Defaults to {@link module:cloud-services/cloudservices~CloudServicesConfig#tokenUrl `config.cloudServices.tokenUrl`}\n *\n * @member {String} module:ckbox/ckbox~CKBoxConfig#tokenUrl\n */\n\n/**\n * Defines the categories to which the uploaded images will be assigned. If configured, it overrides the category mappings defined on the\n * cloud service. The value of this option should be an object, where the keys define categories and their values are the types of images\n * that will be uploaded to these categories. The categories might be referenced by their name or ID.\n *\n * Example:\n *\n *\t\tconst ckboxConfig = {\n *\t\t\tdefaultUploadCategories: {\n *\t\t\t\tBitmaps: [ 'bmp' ],\n *\t\t\t\tPictures: [ 'jpg', 'jpeg' ],\n *\t\t\t\tScans: [ 'png', 'tiff' ],\n *\t\t\t\t// The category below is referenced by its ID.\n *\t\t\t\t'fdf2a647-b67f-4a6c-b692-5ba1dc1ed87b': [ 'gif' ]\n *\t\t\t}\n *\t\t};\n *\n * @default null\n * @member {Object} [module:ckbox/ckbox~CKBoxConfig#defaultUploadCategories]\n */\n\n/**\n * Inserts the unique asset ID as the `data-ckbox-resource-id` attribute. To disable this behavior, set it to `true`.\n *\n * @default false\n * @member {Boolean} [module:ckbox/ckbox~CKBoxConfig#ignoreDataId]\n */\n\n/**\n * Configures the base URL of the API service. Required only in on-premises installations.\n *\n * @default 'https://api.ckbox.io'\n * @member {String} [module:ckbox/ckbox~CKBoxConfig#serviceOrigin]\n */\n\n/**\n * Configures the base URL for assets inserted into the editor. Required only in on-premises installations.\n *\n * @default 'https://ckbox.cloud'\n * @member {String} [module:ckbox/ckbox~CKBoxConfig#assetsOrigin]\n */\n\n/**\n * Configures the language for the CKBox dialog.\n *\n * Defaults to {@link module:utils/locale~Locale#uiLanguage `Locale#uiLanguage`}\n *\n * @member {String} [module:ckbox/ckbox~CKBoxConfig#language]\n */\n\n/**\n * Asset definition.\n *\n * The definition contains the unique `id`, asset `type` and an `attributes` definition.\n *\n * @typedef {Object} module:ckbox/ckbox~CKBoxAssetDefinition\n *\n * @property {String} id An unique asset id.\n * @property {'image'|'link'} type Asset type.\n * @property {module:ckbox/ckbox~CKBoxAssetImageAttributesDefinition|\n * module:ckbox/ckbox~CKBoxAssetLinkAttributesDefinition} attributes Asset attributes.\n */\n\n/**\n * Asset attributes definition for an image.\n *\n * The definition contains the `imageFallbackUrl`, an `imageSources` array with one image source definition object and the\n * `imageTextAlternative`.\n *\n *\t\t{\n *\t\t\timageFallbackUrl: 'https://example.com/assets/asset-id/images/1000.png',\n *\t\t\timageSources: [\n *\t\t\t\t{\n *\t\t\t\t\tsizes: '1000px',\n *\t\t\t\t\tsrcset:\n *\t\t\t\t\t\t'https://example.com/assets/asset-id/images/100.webp 100w,' +\n *\t\t\t\t\t\t'https://example.com/assets/asset-id/images/200.webp 200w,' +\n *\t\t\t\t\t\t'https://example.com/assets/asset-id/images/300.webp 300w,' +\n *\t\t\t\t\t\t'https://example.com/assets/asset-id/images/400.webp 400w,' +\n *\t\t\t\t\t\t'https://example.com/assets/asset-id/images/500.webp 500w,' +\n *\t\t\t\t\t\t'https://example.com/assets/asset-id/images/600.webp 600w,' +\n *\t\t\t\t\t\t'https://example.com/assets/asset-id/images/700.webp 700w,' +\n *\t\t\t\t\t\t'https://example.com/assets/asset-id/images/800.webp 800w,' +\n *\t\t\t\t\t\t'https://example.com/assets/asset-id/images/900.webp 900w,' +\n *\t\t\t\t\t\t'https://example.com/assets/asset-id/images/1000.webp 1000w',\n *\t\t\t\t\ttype: 'image/webp'\n *\t\t\t\t}\n *\t\t\t],\n *\t\t\timageTextAlternative: 'An alternative text for the image'\n *\t\t}\n *\n * @typedef {Object} module:ckbox/ckbox~CKBoxAssetImageAttributesDefinition\n *\n * @property {String} imageFallbackUrl A fallback URL for browsers that do not support the \"webp\" format.\n * @property {Array.<Object>} imageSources An array containing one image source definition object.\n * @property {String} imageTextAlternative An alternative text for an image.\n */\n\n/**\n * Asset attributes definition for a link.\n *\n * The definition contains the `linkName` and `linkHref` strings.\n *\n *\t\t{\n *\t\t\tlinkName: 'File name',\n *\t\t\tlinkHref: 'https://example.com/assets/asset-id/file.pdf'\n *\t\t}\n *\n * @typedef {Object} module:ckbox/ckbox~CKBoxAssetLinkAttributesDefinition\n *\n * @property {String} linkName A link name.\n * @property {String} linkHref An URL for the asset.\n */\n\n/**\n * Raw asset definition that is received from the CKBox feature.\n *\n * @typedef {Object} module:ckbox/ckbox~CKBoxRawAssetDefinition\n *\n * @property {module:ckbox/ckbox~CKBoxRawAssetDataDefinition} data A raw asset data definition.\n * @property {String} origin An asset origin URL.\n */\n\n/**\n * Part of raw asset data that is received from the CKBox feature.\n *\n * @typedef {Object} module:ckbox/ckbox~CKBoxRawAssetDataDefinition\n *\n * @property {String} id An unique asset id.\n * @property {String} extension An asset extension.\n * @property {String} name An asset name.\n * @property {module:ckbox/ckbox~CKBoxRawAssetMetadataDefinition} metadata A raw asset metadata definition.\n */\n\n/**\n * Part of raw asset data that is received from the CKBox feature. Properties are set only if the chosen asset is an image.\n *\n * @typedef {Object} module:ckbox/ckbox~CKBoxRawAssetMetadataDefinition\n *\n * @property {String} [description] Image description.\n * @property {Number} [width] Image width.\n * @property {Number} [height] Image height.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* global document, window, setTimeout, URL */\n\n/**\n * @module ckbox/ckboxcommand\n */\n\nimport { Command } from 'ckeditor5/src/core';\nimport { createElement, toMap } from 'ckeditor5/src/utils';\nimport { getEnvironmentId, getImageUrls } from './utils';\n\n// Defines the waiting time (in milliseconds) for inserting the chosen asset into the model. The chosen asset is temporarily stored in the\n// `CKBoxCommand#_chosenAssets` and it is removed from there automatically after this time. See `CKBoxCommand#_chosenAssets` for more\n// details.\nconst ASSET_INSERTION_WAIT_TIMEOUT = 1000;\n\n/**\n * The CKBox command. It is used by the {@link module:ckbox/ckboxediting~CKBoxEditing CKBox editing feature} to open the CKBox file manager.\n * The file manager allows inserting an image or a link to a file into the editor content.\n *\n *\t\teditor.execute( 'ckbox' );\n *\n * **Note:** This command uses other features to perform the following tasks:\n * - To insert images it uses the {@link module:image/image/insertimagecommand~InsertImageCommand 'insertImage'} command from the\n * {@link module:image/image~Image Image feature}.\n * - To insert links to other files it uses the {@link module:link/linkcommand~LinkCommand 'link'} command from the\n * {@link module:link/link~Link Link feature}.\n *\n * @extends module:core/command~Command\n */\nexport default class CKBoxCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\tsuper( editor );\n\n\t\t/**\n\t\t * A set of all chosen assets. They are stored temporarily and they are automatically removed 1 second after being chosen.\n\t\t * Chosen assets have to be \"remembered\" for a while to be able to map the given asset with the element inserted into the model.\n\t\t * This association map is then used to set the ID on the model element.\n\t\t *\n\t\t * All chosen assets are automatically removed after the timeout, because (theoretically) it may happen that they will never be\n\t\t * inserted into the model, even if the {@link module:link/linkcommand~LinkCommand `'link'`} command or the\n\t\t * {@link module:image/image/insertimagecommand~InsertImageCommand `'insertImage'`} command is enabled. Such a case may arise when\n\t\t * another plugin blocks the command execution. Then, in order not to keep the chosen (but not inserted) assets forever, we delete\n\t\t * them automatically to prevent memory leakage. The 1 second timeout is enough to insert the asset into the model and extract the\n\t\t * ID from the chosen asset.\n\t\t *\n\t\t * The assets are stored only if\n\t\t * the {@link module:ckbox/ckbox~CKBoxConfig#ignoreDataId `config.ckbox.ignoreDataId`} option is set to `false` (by default).\n\t\t *\n\t\t * @protected\n\t\t * @member {Set.<module:ckbox/ckbox~CKBoxAssetDefinition>} #_chosenAssets\n\t\t */\n\t\tthis._chosenAssets = new Set();\n\n\t\t/**\n\t\t * The DOM element that acts as a mounting point for the CKBox dialog.\n\t\t *\n\t\t * @private\n\t\t * @member {Element|null} #_wrapper\n\t\t */\n\t\tthis._wrapper = null;\n\n\t\tthis._initListeners();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\tthis.value = this._getValue();\n\t\tthis.isEnabled = this._checkEnabled();\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\texecute() {\n\t\tthis.fire( 'ckbox:open' );\n\t}\n\n\t/**\n\t * Indicates if the CKBox dialog is already opened.\n\t *\n\t * @protected\n\t * @returns {Boolean}\n\t */\n\t_getValue() {\n\t\treturn this._wrapper !== null;\n\t}\n\n\t/**\n\t * Checks whether the command can be enabled in the current context.\n\t *\n\t * @protected\n\t * @returns {Boolean}\n\t */\n\t_checkEnabled() {\n\t\tconst imageCommand = this.editor.commands.get( 'insertImage' );\n\t\tconst linkCommand = this.editor.commands.get( 'link' );\n\n\t\tif ( !imageCommand.isEnabled && !linkCommand.isEnabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Creates the options object for the CKBox dialog.\n\t *\n\t * @protected\n\t * @returns {Object} options\n\t * @returns {String} options.theme The theme for CKBox dialog.\n\t * @returns {String} options.language The language for CKBox dialog.\n\t * @returns {String} options.tokenUrl The token endpoint URL.\n\t * @returns {String} options.serviceOrigin The base URL of the API service.\n\t * @returns {String} options.assetsOrigin The base URL for assets inserted into the editor.\n\t * @returns {Object} options.dialog\n\t * @returns {Function} options.dialog.onClose The callback function invoked after closing the CKBox dialog.\n\t * @returns {Object} options.assets\n\t * @returns {Function} options.assets.onChoose The callback function invoked after choosing the assets.\n\t */\n\t_prepareOptions() {\n\t\tconst editor = this.editor;\n\t\tconst ckboxConfig = editor.config.get( 'ckbox' );\n\n\t\treturn {\n\t\t\ttheme: ckboxConfig.theme,\n\t\t\tlanguage: ckboxConfig.language,\n\t\t\ttokenUrl: ckboxConfig.tokenUrl,\n\t\t\tserviceOrigin: ckboxConfig.serviceOrigin,\n\t\t\tassetsOrigin: ckboxConfig.assetsOrigin,\n\t\t\tdialog: {\n\t\t\t\tonClose: () => this.fire( 'ckbox:close' )\n\t\t\t},\n\t\t\tassets: {\n\t\t\t\tonChoose: assets => this.fire( 'ckbox:choose', assets )\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Initializes various event listeners for the `ckbox:*` events, because all functionality of the `ckbox` command is event-based.\n\t *\n\t * @protected\n\t */\n\t_initListeners() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst shouldInsertDataId = !editor.config.get( 'ckbox.ignoreDataId' );\n\n\t\t// Refresh the command after firing the `ckbox:*` event.\n\t\tthis.on( 'ckbox', () => {\n\t\t\tthis.refresh();\n\t\t}, { priority: 'low' } );\n\n\t\t// Handle opening of the CKBox dialog.\n\t\tthis.on( 'ckbox:open', () => {\n\t\t\tif ( !this.isEnabled || this.value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._wrapper = createElement( document, 'div', { class: 'ck ckbox-wrapper' } );\n\t\t\tdocument.body.appendChild( this._wrapper );\n\n\t\t\twindow.CKBox.mount( this._wrapper, this._prepareOptions() );\n\t\t} );\n\n\t\t// Handle closing of the CKBox dialog.\n\t\tthis.on( 'ckbox:close', () => {\n\t\t\tif ( !this.value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._wrapper.remove();\n\t\t\tthis._wrapper = null;\n\t\t} );\n\n\t\t// Handle choosing the assets.\n\t\tthis.on( 'ckbox:choose', ( evt, assets ) => {\n\t\t\tif ( !this.isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst imageCommand = editor.commands.get( 'insertImage' );\n\t\t\tconst linkCommand = editor.commands.get( 'link' );\n\t\t\tconst ckboxEditing = editor.plugins.get( 'CKBoxEditing' );\n\t\t\tconst assetsOrigin = editor.config.get( 'ckbox.assetsOrigin' );\n\n\t\t\tconst assetsToProcess = prepareAssets( {\n\t\t\t\tassets,\n\t\t\t\torigin: assetsOrigin,\n\t\t\t\ttoken: ckboxEditing.getToken(),\n\t\t\t\tisImageAllowed: imageCommand.isEnabled,\n\t\t\t\tisLinkAllowed: linkCommand.isEnabled\n\t\t\t} );\n\n\t\t\tif ( assetsToProcess.length === 0 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// All assets are inserted in one undo step.\n\t\t\tmodel.change( writer => {\n\t\t\t\tfor ( const asset of assetsToProcess ) {\n\t\t\t\t\tconst isLastAsset = asset === assetsToProcess[ assetsToProcess.length - 1 ];\n\n\t\t\t\t\tthis._insertAsset( asset, isLastAsset, writer );\n\n\t\t\t\t\t// If asset ID must be set for the inserted model element, store the asset temporarily and remove it automatically\n\t\t\t\t\t// after the timeout.\n\t\t\t\t\tif ( shouldInsertDataId ) {\n\t\t\t\t\t\tsetTimeout( () => this._chosenAssets.delete( asset ), ASSET_INSERTION_WAIT_TIMEOUT );\n\n\t\t\t\t\t\tthis._chosenAssets.add( asset );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t// Clean up after the editor is destroyed.\n\t\tthis.listenTo( editor, 'destroy', () => {\n\t\t\tthis.fire( 'ckbox:close' );\n\t\t\tthis._chosenAssets.clear();\n\t\t} );\n\t}\n\n\t/**\n\t * Inserts the asset into the model.\n\t *\n\t * @protected\n\t * @param {Object} asset The asset to be inserted.\n\t * @param {Boolean} isLastAsset Indicates if the current asset is the last one from the chosen set.\n\t * @param {module:engine/model/writer~Writer} writer An instance of the model writer.\n\t */\n\t_insertAsset( asset, isLastAsset, writer ) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\n\t\t// Remove the `linkHref` attribute to not affect the asset to be inserted.\n\t\twriter.removeSelectionAttribute( 'linkHref' );\n\n\t\tif ( asset.type === 'image' ) {\n\t\t\tthis._insertImage( asset );\n\t\t} else {\n\t\t\tthis._insertLink( asset, writer );\n\t\t}\n\n\t\t// Except for the last chosen asset, move the selection to the end of the current range to avoid overwriting other, already\n\t\t// inserted assets.\n\t\tif ( !isLastAsset ) {\n\t\t\twriter.setSelection( selection.getLastPosition() );\n\t\t}\n\t}\n\n\t/**\n\t * Inserts the image by calling the `insertImage` command.\n\t *\n\t * @protected\n\t * @param {module:ckbox/ckbox~CKBoxAssetDefinition} asset The asset to be inserted.\n\t */\n\t_insertImage( asset ) {\n\t\tconst editor = this.editor;\n\t\tconst { imageFallbackUrl, imageSources, imageTextAlternative } = asset.attributes;\n\n\t\teditor.execute( 'insertImage', {\n\t\t\tsource: {\n\t\t\t\tsrc: imageFallbackUrl,\n\t\t\t\tsources: imageSources,\n\t\t\t\talt: imageTextAlternative\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Inserts the link to the asset by calling the `link` command.\n\t *\n\t * @protected\n\t * @param {module:ckbox/ckbox~CKBoxAssetDefinition} asset The asset to be inserted.\n\t * @param {module:engine/model/writer~Writer} writer An instance of the model writer.\n\t */\n\t_insertLink( asset, writer ) {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\t\tconst { linkName, linkHref } = asset.attributes;\n\n\t\t// If the selection is collapsed, insert the asset name as the link label and select it.\n\t\tif ( selection.isCollapsed ) {\n\t\t\tconst selectionAttributes = toMap( selection.getAttributes() );\n\t\t\tconst textNode = writer.createText( linkName, selectionAttributes );\n\t\t\tconst range = model.insertContent( textNode );\n\n\t\t\twriter.setSelection( range );\n\t\t}\n\n\t\teditor.execute( 'link', linkHref );\n\t}\n}\n\n// Parses the chosen assets into the internal data format. Filters out chosen assets that are not allowed.\n//\n// @private\n// @param {Object} data\n// @param {Array.<module:ckbox/ckbox~CKBoxRawAssetDefinition>} data.assets\n// @param {String} data.origin The base URL for assets inserted into the editor.\n// @param {module:cloud-services/token~Token} data.token\n// @param {Boolean} data.isImageAllowed\n// @param {Boolean} data.isLinkAllowed\n// @returns {Array.<module:ckbox/ckbox~CKBoxAssetDefinition>}\nfunction prepareAssets( { assets, origin, token, isImageAllowed, isLinkAllowed } ) {\n\treturn assets\n\t\t.map( asset => ( {\n\t\t\tid: asset.data.id,\n\t\t\ttype: isImage( asset ) ? 'image' : 'link',\n\t\t\tattributes: prepareAssetAttributes( asset, token, origin )\n\t\t} ) )\n\t\t.filter( asset => asset.type === 'image' ? isImageAllowed : isLinkAllowed );\n}\n\n// Parses the assets attributes into the internal data format.\n//\n// @private\n// @param {module:ckbox/ckbox~CKBoxRawAssetDefinition} asset\n// @param {module:cloud-services/token~Token} token\n// @param {String} origin The base URL for assets inserted into the editor.\n// @returns {module:ckbox/ckbox~CKBoxAssetImageAttributesDefinition|module:ckbox/ckbox~CKBoxAssetLinkAttributesDefinition}\nfunction prepareAssetAttributes( asset, token, origin ) {\n\tif ( isImage( asset ) ) {\n\t\tconst { imageFallbackUrl, imageSources } = getImageUrls( {\n\t\t\ttoken,\n\t\t\torigin,\n\t\t\tid: asset.data.id,\n\t\t\twidth: asset.data.metadata.width,\n\t\t\textension: asset.data.extension\n\t\t} );\n\n\t\treturn {\n\t\t\timageFallbackUrl,\n\t\t\timageSources,\n\t\t\timageTextAlternative: asset.data.metadata.description || ''\n\t\t};\n\t}\n\n\treturn {\n\t\tlinkName: asset.data.name,\n\t\tlinkHref: getAssetUrl( asset, token, origin )\n\t};\n}\n\n// Checks whether the asset is an image.\n//\n// @private\n// @param {module:ckbox/ckbox~CKBoxRawAssetDefinition} asset\n// @returns {Boolean}\nfunction isImage( asset ) {\n\tconst metadata = asset.data.metadata;\n\n\tif ( !metadata ) {\n\t\treturn false;\n\t}\n\n\treturn metadata.width && metadata.height;\n}\n\n// Creates the URL for the asset.\n//\n// @private\n// @param {module:ckbox/ckbox~CKBoxRawAssetDefinition} asset\n// @param {module:cloud-services/token~Token} token\n// @param {String} origin The base URL for assets inserted into the editor.\n// @returns {String}\nfunction getAssetUrl( asset, token, origin ) {\n\tconst environmentId = getEnvironmentId( token );\n\tconst url = new URL( `${ environmentId }/assets/${ asset.data.id }/file`, origin );\n\n\turl.searchParams.set( 'download', 'true' );\n\n\treturn url.toString();\n}\n\n/**\n * Fired when the command is executed.\n *\n * @event ckbox:open\n */\n\n/**\n * Fired when the CKBox dialog is closed.\n *\n * @event ckbox:close\n */\n\n/**\n * Fired after the assets are chosen.\n *\n * @event ckbox:choose\n * @param {Array.<module:ckbox/ckbox~CKBoxRawAssetDefinition>} assets Chosen assets.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* globals window */\n\n/**\n * @module ckbox/ckboxediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { Range } from 'ckeditor5/src/engine';\nimport { CKEditorError, logError } from 'ckeditor5/src/utils';\n\nimport CKBoxCommand from './ckboxcommand';\nimport CKBoxUploadAdapter from './ckboxuploadadapter';\n\n/**\n * The CKBox editing feature. It introduces the {@link module:ckbox/ckboxcommand~CKBoxCommand CKBox command} and\n * {@link module:ckbox/ckboxuploadadapter~CKBoxUploadAdapter CKBox upload adapter}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class CKBoxEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'CKBoxEditing';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ 'CloudServices', 'LinkEditing', 'PictureEditing', CKBoxUploadAdapter ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tasync init() {\n\t\tconst editor = this.editor;\n\t\tconst hasConfiguration = !!editor.config.get( 'ckbox' );\n\t\tconst isLibraryLoaded = !!window.CKBox;\n\n\t\t// Proceed with plugin initialization only when the integrator intentionally wants to use it, i.e. when the `config.ckbox` exists or\n\t\t// the CKBox JavaScript library is loaded.\n\t\tif ( !hasConfiguration && !isLibraryLoaded ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._initConfig();\n\n\t\tconst cloudServicesCore = editor.plugins.get( 'CloudServicesCore' );\n\t\tconst ckboxTokenUrl = editor.config.get( 'ckbox.tokenUrl' );\n\t\tconst cloudServicesTokenUrl = editor.config.get( 'cloudServices.tokenUrl' );\n\n\t\t// To avoid fetching the same token twice we need to compare the `ckbox.tokenUrl` and `cloudServices.tokenUrl` values.\n\t\t// If they are equal, it's enough to take the token generated by the `CloudServices` plugin.\n\t\tif ( ckboxTokenUrl === cloudServicesTokenUrl ) {\n\t\t\t/**\n\t\t\t * CKEditor Cloud Services access token.\n\t\t\t *\n\t\t\t * @protected\n\t\t\t * @member {module:cloud-services/token~Token} #_token\n\t\t\t */\n\t\t\tthis._token = editor.plugins.get( 'CloudServices' ).token;\n\t\t}\n\t\t// Otherwise, create a new token manually.\n\t\telse {\n\t\t\tthis._token = await cloudServicesCore.createToken( ckboxTokenUrl ).init();\n\t\t}\n\n\t\t// Extending the schema, registering converters and applying fixers only make sense if the configuration option to assign\n\t\t// the assets ID with the model elements is enabled.\n\t\tif ( !editor.config.get( 'ckbox.ignoreDataId' ) ) {\n\t\t\tthis._initSchema();\n\t\t\tthis._initConversion();\n\t\t\tthis._initFixers();\n\t\t}\n\n\t\t// Registering the `ckbox` command makes sense only if the CKBox library is loaded, as the `ckbox` command opens the CKBox dialog.\n\t\tif ( isLibraryLoaded ) {\n\t\t\teditor.commands.add( 'ckbox', new CKBoxCommand( editor ) );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a token used by the CKBox plugin for communication with the CKBox service.\n\t *\n\t * @returns {module:cloud-services/token~Token}\n\t */\n\tgetToken() {\n\t\treturn this._token;\n\t}\n\n\t/**\n\t * Initializes the `ckbox` editor configuration.\n\t *\n\t * @private\n\t */\n\t_initConfig() {\n\t\tconst editor = this.editor;\n\n\t\teditor.config.define( 'ckbox', {\n\t\t\tserviceOrigin: 'https://api.ckbox.io',\n\t\t\tassetsOrigin: 'https://ckbox.cloud',\n\t\t\tdefaultUploadCategories: null,\n\t\t\tignoreDataId: false,\n\t\t\tlanguage: editor.locale.uiLanguage,\n\t\t\ttheme: 'default',\n\t\t\ttokenUrl: editor.config.get( 'cloudServices.tokenUrl' )\n\t\t} );\n\n\t\tconst tokenUrl = editor.config.get( 'ckbox.tokenUrl' );\n\n\t\tif ( !tokenUrl ) {\n\t\t\t/**\n\t\t\t * The {@link module:ckbox/ckbox~CKBoxConfig#tokenUrl `config.ckbox.tokenUrl`} or the\n\t\t\t * {@link module:cloud-services/cloudservices~CloudServicesConfig#tokenUrl `config.cloudServices.tokenUrl`}\n\t\t\t * configuration is required for the CKBox plugin.\n\t\t\t *\n\t\t\t * \t\tClassicEditor.create( document.createElement( 'div' ), {\n\t\t\t * \t\t\tckbox: {\n\t\t\t * \t\t\t\ttokenUrl: \"YOUR_TOKEN_URL\"\n\t\t\t * \t\t\t\t// ...\n\t\t\t *\t\t\t}\n\t\t\t *\t\t\t// ...\n\t\t\t * \t\t} );\n\t\t\t *\n\t\t\t * @error ckbox-plugin-missing-token-url\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'ckbox-plugin-missing-token-url', this );\n\t\t}\n\n\t\tif ( !editor.plugins.has( 'ImageBlockEditing' ) && !editor.plugins.has( 'ImageInlineEditing' ) ) {\n\t\t\t/**\n\t\t\t * The CKBox feature requires one of the following plugins to be loaded to work correctly:\n\t\t\t *\n\t\t\t * * {@link module:image/imageblock~ImageBlock},\n\t\t\t * * {@link module:image/imageinline~ImageInline},\n\t\t\t * * {@link module:image/image~Image} (loads both `ImageBlock` and `ImageInline`)\n\t\t\t *\n\t\t\t * Please make sure your editor configuration is correct.\n\t\t\t *\n\t\t\t * @error ckbox-plugin-image-feature-missing\n\t\t\t * @param {module:core/editor/editor~Editor} editor\n\t\t\t */\n\t\t\tlogError( 'ckbox-plugin-image-feature-missing', editor );\n\t\t}\n\t}\n\n\t/**\n\t * Extends the schema to allow the `ckboxImageId` and `ckboxLinkId` attributes for links and images.\n\t *\n\t * @private\n\t */\n\t_initSchema() {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\n\t\tschema.extend( '$text', { allowAttributes: 'ckboxLinkId' } );\n\n\t\tif ( schema.isRegistered( 'imageBlock' ) ) {\n\t\t\tschema.extend( 'imageBlock', { allowAttributes: [ 'ckboxImageId', 'ckboxLinkId' ] } );\n\t\t}\n\n\t\tif ( schema.isRegistered( 'imageInline' ) ) {\n\t\t\tschema.extend( 'imageInline', { allowAttributes: [ 'ckboxImageId', 'ckboxLinkId' ] } );\n\t\t}\n\n\t\tschema.addAttributeCheck( ( context, attributeName ) => {\n\t\t\tconst isLink = !!context.last.getAttribute( 'linkHref' );\n\n\t\t\tif ( !isLink && attributeName === 'ckboxLinkId' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Configures the upcast and downcast conversions for the `ckboxImageId` and `ckboxLinkId` attributes.\n\t *\n\t * @private\n\t */\n\t_initConversion() {\n\t\tconst editor = this.editor;\n\n\t\t// Convert `ckboxLinkId` => `data-ckbox-resource-id`.\n\t\teditor.conversion.for( 'downcast' ).add( dispatcher => {\n\t\t\t// Due to custom converters for linked block images, handle the `ckboxLinkId` attribute manually.\n\t\t\tdispatcher.on( 'attribute:ckboxLinkId:imageBlock', ( evt, data, conversionApi ) => {\n\t\t\t\tconst { writer, mapper, consumable } = conversionApi;\n\n\t\t\t\tif ( !consumable.consume( data.item, evt.name ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst viewFigure = mapper.toViewElement( data.item );\n\t\t\t\tconst linkInImage = [ ...viewFigure.getChildren() ].find( child => child.name === 'a' );\n\n\t\t\t\t// No link inside an image - no conversion needed.\n\t\t\t\tif ( !linkInImage ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( data.item.hasAttribute( 'ckboxLinkId' ) ) {\n\t\t\t\t\twriter.setAttribute( 'data-ckbox-resource-id', data.item.getAttribute( 'ckboxLinkId' ), linkInImage );\n\t\t\t\t} else {\n\t\t\t\t\twriter.removeAttribute( 'data-ckbox-resource-id', linkInImage );\n\t\t\t\t}\n\t\t\t}, { priority: 'low' } );\n\n\t\t\tdispatcher.on( 'attribute:ckboxLinkId', ( evt, data, conversionApi ) => {\n\t\t\t\tconst { writer, mapper, consumable } = conversionApi;\n\n\t\t\t\tif ( !consumable.consume( data.item, evt.name ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Remove the previous attribute value if it was applied.\n\t\t\t\tif ( data.attributeOldValue ) {\n\t\t\t\t\tconst viewElement = createLinkElement( writer, data.attributeOldValue );\n\n\t\t\t\t\twriter.unwrap( mapper.toViewRange( data.range ), viewElement );\n\t\t\t\t}\n\n\t\t\t\t// Add the new attribute value if specified in a model element.\n\t\t\t\tif ( data.attributeNewValue ) {\n\t\t\t\t\tconst viewElement = createLinkElement( writer, data.attributeNewValue );\n\n\t\t\t\t\tif ( data.item.is( 'selection' ) ) {\n\t\t\t\t\t\tconst viewSelection = writer.document.selection;\n\n\t\t\t\t\t\twriter.wrap( viewSelection.getFirstRange(), viewElement );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twriter.wrap( mapper.toViewRange( data.range ), viewElement );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, { priority: 'low' } );\n\t\t} );\n\n\t\t// Convert `data-ckbox-resource-id` => `ckboxLinkId`.\n\t\t//\n\t\t// The helper conversion does not handle all cases, so take care of the `data-ckbox-resource-id` attribute manually for images\n\t\t// and links.\n\t\teditor.conversion.for( 'upcast' ).add( dispatcher => {\n\t\t\tdispatcher.on( 'element:a', ( evt, data, conversionApi ) => {\n\t\t\t\tconst { writer, consumable } = conversionApi;\n\n\t\t\t\t// Upcast the `data-ckbox-resource-id` attribute only for valid link elements.\n\t\t\t\tif ( !data.viewItem.getAttribute( 'href' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst consumableAttributes = { attributes: [ 'data-ckbox-resource-id' ] };\n\n\t\t\t\tif ( !consumable.consume( data.viewItem, consumableAttributes ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst attributeValue = data.viewItem.getAttribute( 'data-ckbox-resource-id' );\n\n\t\t\t\t// Missing the `data-ckbox-resource-id` attribute.\n\t\t\t\tif ( !attributeValue ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( data.modelRange ) {\n\t\t\t\t\t// If the `<a>` element contains more than single children (e.g. a linked image), set the `ckboxLinkId` for each\n\t\t\t\t\t// allowed child.\n\t\t\t\t\tfor ( let item of data.modelRange.getItems() ) {\n\t\t\t\t\t\tif ( item.is( '$textProxy' ) ) {\n\t\t\t\t\t\t\titem = item.textNode;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Do not copy the `ckboxLinkId` attribute when wrapping an element in a block element, e.g. when\n\t\t\t\t\t\t// auto-paragraphing.\n\t\t\t\t\t\tif ( shouldUpcastAttributeForNode( item ) ) {\n\t\t\t\t\t\t\twriter.setAttribute( 'ckboxLinkId', attributeValue, item );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Otherwise, just set the `ckboxLinkId` for the model element.\n\t\t\t\t\tconst modelElement = data.modelCursor.nodeBefore || data.modelCursor.parent;\n\n\t\t\t\t\twriter.setAttribute( 'ckboxLinkId', attributeValue, modelElement );\n\t\t\t\t}\n\t\t\t}, { priority: 'low' } );\n\t\t} );\n\n\t\t// Convert `ckboxImageId` => `data-ckbox-resource-id`.\n\t\teditor.conversion.for( 'downcast' ).attributeToAttribute( {\n\t\t\tmodel: 'ckboxImageId',\n\t\t\tview: 'data-ckbox-resource-id'\n\t\t} );\n\n\t\t// Convert `data-ckbox-resource-id` => `ckboxImageId`.\n\t\teditor.conversion.for( 'upcast' ).elementToAttribute( {\n\t\t\tmodel: {\n\t\t\t\tkey: 'ckboxImageId',\n\t\t\t\tvalue: viewElement => viewElement.getAttribute( 'data-ckbox-resource-id' )\n\t\t\t},\n\t\t\tview: {\n\t\t\t\tattributes: {\n\t\t\t\t\t'data-ckbox-resource-id': /[\\s\\S]+/\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Registers post-fixers that add or remove the `ckboxLinkId` and `ckboxImageId` attributes.\n\t *\n\t * @private\n\t */\n\t_initFixers() {\n\t\tconst editor = this.editor;\n\t\tconst model = editor.model;\n\t\tconst selection = model.document.selection;\n\n\t\t// Registers the post-fixer to sync the asset ID with the model elements.\n\t\tmodel.document.registerPostFixer( syncDataIdPostFixer( editor ) );\n\n\t\t// Registers the post-fixer to remove the `ckboxLinkId` attribute from the model selection.\n\t\tmodel.document.registerPostFixer( injectSelectionPostFixer( selection ) );\n\t}\n}\n\n// A post-fixer that synchronizes the asset ID with the model element.\n//\n// @private\n// @param {module:core/editor/editor~Editor} editor\n// @returns {Function}\nfunction syncDataIdPostFixer( editor ) {\n\treturn writer => {\n\t\tlet changed = false;\n\n\t\tconst model = editor.model;\n\t\tconst ckboxCommand = editor.commands.get( 'ckbox' );\n\n\t\t// The ID from chosen assets are stored in the `CKBoxCommand#_chosenAssets`. If there is no command, it makes no sense to check\n\t\t// for changes in the model.\n\t\tif ( !ckboxCommand ) {\n\t\t\treturn changed;\n\t\t}\n\n\t\tfor ( const entry of model.document.differ.getChanges() ) {\n\t\t\tif ( entry.type !== 'insert' && entry.type !== 'attribute' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst range = entry.type === 'insert' ?\n\t\t\t\tnew Range( entry.position, entry.position.getShiftedBy( entry.length ) ) :\n\t\t\t\tentry.range;\n\n\t\t\tconst isLinkHrefAttributeRemoval = entry.type === 'attribute' &&\n\t\t\t\tentry.attributeKey === 'linkHref' &&\n\t\t\t\tentry.attributeNewValue === null;\n\n\t\t\tfor ( const item of range.getItems() ) {\n\t\t\t\t// If the `linkHref` attribute has been removed, sync the change with the `ckboxLinkId` attribute.\n\t\t\t\tif ( isLinkHrefAttributeRemoval && item.hasAttribute( 'ckboxLinkId' ) ) {\n\t\t\t\t\twriter.removeAttribute( 'ckboxLinkId', item );\n\n\t\t\t\t\tchanged = true;\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Otherwise, the change concerns either a new model element or an attribute change. Try to find the assets for the modified\n\t\t\t\t// model element.\n\t\t\t\tconst assets = findAssetsForItem( item, ckboxCommand._chosenAssets );\n\n\t\t\t\tfor ( const asset of assets ) {\n\t\t\t\t\tconst attributeName = asset.type === 'image' ? 'ckboxImageId' : 'ckboxLinkId';\n\n\t\t\t\t\tif ( asset.id === item.getAttribute( attributeName ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\twriter.setAttribute( attributeName, asset.id, item );\n\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn changed;\n\t};\n}\n\n// A post-fixer that removes the `ckboxLinkId` from the selection if it does not represent a link anymore.\n//\n// @private\n// @param {module:engine/model/selection~Selection} selection\n// @returns {Function}\nfunction injectSelectionPostFixer( selection ) {\n\treturn writer => {\n\t\tconst shouldRemoveLinkIdAttribute = !selection.hasAttribute( 'linkHref' ) && selection.hasAttribute( 'ckboxLinkId' );\n\n\t\tif ( shouldRemoveLinkIdAttribute ) {\n\t\t\twriter.removeSelectionAttribute( 'ckboxLinkId' );\n\t\t}\n\t};\n}\n\n// Tries to find the asset that is associated with the model element by comparing the attributes:\n// - the image fallback URL with the `src` attribute for images,\n// - the link URL with the `href` attribute for links.\n//\n// For any model element, zero, one or more than one asset can be found (e.g. a linked image may be associated with the link asset and the\n// image asset).\n//\n// @private\n// @param {module:engine/model/item~Item} item\n// @param {Set.<module:ckbox/ckbox~CKBoxAssetDefinition>} assets\n// @returns {Array.<module:ckbox/ckbox~CKBoxAssetDefinition>}\nfunction findAssetsForItem( item, assets ) {\n\tconst isImageElement = item.is( 'element', 'imageInline' ) || item.is( 'element', 'imageBlock' );\n\tconst isLinkElement = item.hasAttribute( 'linkHref' );\n\n\treturn [ ...assets ].filter( asset => {\n\t\tif ( asset.type === 'image' && isImageElement ) {\n\t\t\treturn asset.attributes.imageFallbackUrl === item.getAttribute( 'src' );\n\t\t}\n\n\t\tif ( asset.type === 'link' && isLinkElement ) {\n\t\t\treturn asset.attributes.linkHref === item.getAttribute( 'linkHref' );\n\t\t}\n\t} );\n}\n\n// Creates view link element with the requested ID.\n//\n// @private\n// @param {module:engine/view/downcastwriter~DowncastWriter} writer\n// @param {String} id\n// @returns {module:engine/view/attributeelement~AttributeElement}\nfunction createLinkElement( writer, id ) {\n\t// Priority equal 5 is needed to merge adjacent `<a>` elements together.\n\tconst viewElement = writer.createAttributeElement( 'a', { 'data-ckbox-resource-id': id }, { priority: 5 } );\n\n\twriter.setCustomProperty( 'link', true, viewElement );\n\n\treturn viewElement;\n}\n\n// Checks if the model element may have the `ckboxLinkId` attribute.\n//\n// @private\n// @param {module:engine/model/node~Node} node\n// @returns {Boolean}\nfunction shouldUpcastAttributeForNode( node ) {\n\tif ( node.is( '$text' ) ) {\n\t\treturn true;\n\t}\n\n\tif ( node.is( 'element', 'imageInline' ) || node.is( 'element', 'imageBlock' ) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module ckbox/ckboxui\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { ButtonView } from 'ckeditor5/src/ui';\n\nimport browseFilesIcon from '../theme/icons/browse-files.svg';\n\n/**\n * The CKBoxUI plugin. It introduces the `'ckbox'` toolbar button.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class CKBoxUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'CKBoxUI';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tafterInit() {\n\t\tconst editor = this.editor;\n\n\t\t// Do not register the `ckbox` button if the command does not exist.\n\t\tif ( !editor.commands.get( 'ckbox' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst t = editor.t;\n\t\tconst componentFactory = editor.ui.componentFactory;\n\n\t\tcomponentFactory.add( 'ckbox', locale => {\n\t\t\tconst command = editor.commands.get( 'ckbox' );\n\n\t\t\tconst button = new ButtonView( locale );\n\n\t\t\tbutton.set( {\n\t\t\t\tlabel: t( 'Open file manager' ),\n\t\t\t\ticon: browseFilesIcon,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tbutton.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );\n\n\t\t\tbutton.on( 'execute', () => {\n\t\t\t\teditor.execute( 'ckbox' );\n\t\t\t} );\n\n\t\t\treturn button;\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* globals AbortController, FormData, URL, Image, XMLHttpRequest, window */\n\n/**\n * @module ckbox/ckboxuploadadapter\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { FileRepository } from 'ckeditor5/src/upload';\nimport { logError } from 'ckeditor5/src/utils';\nimport CKBoxEditing from './ckboxediting';\nimport { getImageUrls } from './utils';\n\n/**\n * A plugin that enables file uploads in CKEditor 5 using the CKBox server–side connector.\n * See the {@glink features/images/image-upload/ckbox CKBox file manager integration} guide to learn how to configure\n * and use this feature as well as find out more about the full integration with the file manager\n * provided by the {@link module:ckbox/ckbox~CKBox} plugin.\n *\n * Check out the {@glink features/images/image-upload/image-upload Image upload overview} guide to learn about\n * other ways to upload images into CKEditor 5.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class CKBoxUploadAdapter extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ 'ImageUploadEditing', 'ImageUploadProgress', FileRepository, CKBoxEditing ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'CKBoxUploadAdapter';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tasync afterInit() {\n\t\tconst editor = this.editor;\n\n\t\tconst hasConfiguration = !!editor.config.get( 'ckbox' );\n\t\tconst isLibraryLoaded = !!window.CKBox;\n\n\t\t// Editor supports only one upload adapter. Register the CKBox upload adapter (and potentially overwrite other one) only when the\n\t\t// integrator intentionally wants to use the CKBox plugin, i.e. when the `config.ckbox` exists or the CKBox JavaScript library is\n\t\t// loaded.\n\t\tif ( !hasConfiguration && !isLibraryLoaded ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst fileRepository = editor.plugins.get( FileRepository );\n\t\tconst ckboxEditing = editor.plugins.get( CKBoxEditing );\n\n\t\tfileRepository.createUploadAdapter = loader => {\n\t\t\treturn new Adapter( loader, ckboxEditing.getToken(), editor );\n\t\t};\n\n\t\tconst shouldInsertDataId = !editor.config.get( 'ckbox.ignoreDataId' );\n\t\tconst imageUploadEditing = editor.plugins.get( 'ImageUploadEditing' );\n\n\t\t// Mark uploaded assets with the `ckboxImageId` attribute. Its value represents an ID in CKBox.\n\t\tif ( shouldInsertDataId ) {\n\t\t\timageUploadEditing.on( 'uploadComplete', ( evt, { imageElement, data } ) => {\n\t\t\t\teditor.model.change( writer => {\n\t\t\t\t\twriter.setAttribute( 'ckboxImageId', data.ckboxImageId, imageElement );\n\t\t\t\t} );\n\t\t\t} );\n\t\t}\n\t}\n}\n\n/**\n * Upload adapter for CKBox.\n *\n * @private\n * @implements module:upload/filerepository~UploadAdapter\n */\nclass Adapter {\n\t/**\n\t * Creates a new adapter instance.\n\t *\n\t * @param {module:upload/filerepository~FileLoader} loader\n\t * @param {module:cloud-services/token~Token} token\n\t * @param {module:core/editor/editor~Editor} editor\n\t */\n\tconstructor( loader, token, editor ) {\n\t\t/**\n\t\t * FileLoader instance to use during the upload.\n\t\t *\n\t\t * @member {module:upload/filerepository~FileLoader} #loader\n\t\t */\n\t\tthis.loader = loader;\n\n\t\t/**\n\t\t * CKEditor Cloud Services access token.\n\t\t *\n\t\t * @member {module:cloud-services/token~Token} #token\n\t\t */\n\t\tthis.token = token;\n\n\t\t/**\n\t\t * The editor instance.\n\t\t *\n\t\t * @member {module:core/editor/editor~Editor} #editor\n\t\t */\n\t\tthis.editor = editor;\n\n\t\t/**\n\t\t * The abort controller for aborting asynchronous processes.\n\t\t *\n\t\t * @member {AbortController} #controller\n\t\t */\n\t\tthis.controller = new AbortController();\n\n\t\t/**\n\t\t * The base URL where all requests should be sent.\n\t\t *\n\t\t * @member {String} #serviceOrigin\n\t\t */\n\t\tthis.serviceOrigin = editor.config.get( 'ckbox.serviceOrigin' );\n\n\t\t/**\n\t\t * The base URL from where all assets are served.\n\t\t *\n\t\t * @member {String} #assetsOrigin\n\t\t */\n\t\tthis.assetsOrigin = editor.config.get( 'ckbox.assetsOrigin' );\n\t}\n\n\t/**\n\t * Resolves a promise with an array containing available categories with which the uploaded file can be associated.\n\t *\n\t * If the API returns limited results, the method will collect all items.\n\t *\n\t * @param {Number} [offset=0]\n\t * @returns {Promise.<Array>}\n\t */\n\tasync getAvailableCategories( offset = 0 ) {\n\t\tconst ITEMS_PER_REQUEST = 50;\n\t\tconst categoryUrl = new URL( 'categories', this.serviceOrigin );\n\n\t\tcategoryUrl.searchParams.set( 'limit', ITEMS_PER_REQUEST.toString() );\n\t\tcategoryUrl.searchParams.set( 'offset', offset.toString() );\n\n\t\treturn this._sendHttpRequest( { url: categoryUrl } )\n\t\t\t.then( async data => {\n\t\t\t\tconst remainingItems = data.totalCount - ( offset + ITEMS_PER_REQUEST );\n\n\t\t\t\tif ( remainingItems > 0 ) {\n\t\t\t\t\tconst offsetItems = await this.getAvailableCategories( offset + ITEMS_PER_REQUEST );\n\n\t\t\t\t\treturn [\n\t\t\t\t\t\t...data.items,\n\t\t\t\t\t\t...offsetItems\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\treturn data.items;\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tthis.controller.signal.throwIfAborted();\n\n\t\t\t\t/**\n\t\t\t\t * Fetching a list of available categories with which an uploaded file can be associated failed.\n\t\t\t\t *\n\t\t\t\t * @error ckbox-fetch-category-http-error\n\t\t\t\t */\n\t\t\t\tlogError( 'ckbox-fetch-category-http-error' );\n\t\t\t} );\n\t}\n\n\t/**\n\t * Resolves a promise with an object containing a category with which the uploaded file is associated or an error code.\n\t *\n\t * @param {File} file\n\t * @return {Promise.<String|null>}\n\t */\n\tasync getCategoryIdForFile( file ) {\n\t\tconst extension = getFileExtension( file.name );\n\t\tconst allCategories = await this.getAvailableCategories();\n\n\t\t// Couldn't fetch all categories. Perhaps the authorization token is invalid.\n\t\tif ( !allCategories ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// The plugin allows defining to which category the uploaded file should be assigned.\n\t\tconst defaultCategories = this.editor.config.get( 'ckbox.defaultUploadCategories' );\n\n\t\t// If a user specifies the plugin configuration, find the first category that accepts the uploaded file.\n\t\tif ( defaultCategories ) {\n\t\t\tconst userCategory = Object.keys( defaultCategories ).find( category => {\n\t\t\t\treturn defaultCategories[ category ].includes( extension );\n\t\t\t} );\n\n\t\t\t// If found, return its ID if the category exists on the server side.\n\t\t\tif ( userCategory ) {\n\t\t\t\tconst serverCategory = allCategories.find( category => category.id === userCategory || category.name === userCategory );\n\n\t\t\t\tif ( !serverCategory ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn serverCategory.id;\n\t\t\t}\n\t\t}\n\n\t\t// Otherwise, find the first category that accepts the uploaded file and returns its ID.\n\t\tconst category = allCategories.find( category => category.extensions.includes( extension ) );\n\n\t\tif ( !category ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn category.id;\n\t}\n\n\t/**\n\t * Starts the upload process.\n\t *\n\t * @see module:upload/filerepository~UploadAdapter#upload\n\t * @returns {Promise.<Object>}\n\t */\n\tasync upload() {\n\t\tconst t = this.editor.t;\n\t\tconst cannotFindCategoryError = t( 'Cannot determine a category for the uploaded file.' );\n\t\tconst file = await this.loader.file;\n\t\tconst category = await this.getCategoryIdForFile( file );\n\n\t\tif ( !category ) {\n\t\t\treturn Promise.reject( cannotFindCategoryError );\n\t\t}\n\n\t\tconst uploadUrl = new URL( 'assets', this.serviceOrigin );\n\t\tconst formData = new FormData();\n\n\t\tformData.append( 'categoryId', category );\n\t\tformData.append( 'file', file );\n\n\t\tconst requestConfig = {\n\t\t\tmethod: 'POST',\n\t\t\turl: uploadUrl,\n\t\t\tdata: formData,\n\t\t\tonUploadProgress: evt => {\n\t\t\t\t/* istanbul ignore else */\n\t\t\t\tif ( evt.lengthComputable ) {\n\t\t\t\t\tthis.loader.uploadTotal = evt.total;\n\t\t\t\t\tthis.loader.uploaded = evt.loaded;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\treturn this._sendHttpRequest( requestConfig )\n\t\t\t.then( async data => {\n\t\t\t\tconst width = await this._getImageWidth();\n\t\t\t\tconst extension = getFileExtension( file.name );\n\t\t\t\tconst imageUrls = getImageUrls( {\n\t\t\t\t\ttoken: this.token,\n\t\t\t\t\tid: data.id,\n\t\t\t\t\torigin: this.assetsOrigin,\n\t\t\t\t\twidth,\n\t\t\t\t\textension\n\t\t\t\t} );\n\n\t\t\t\treturn {\n\t\t\t\t\tckboxImageId: data.id,\n\t\t\t\t\tdefault: imageUrls.imageFallbackUrl,\n\t\t\t\t\tsources: imageUrls.imageSources\n\t\t\t\t};\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tconst genericError = t( 'Cannot upload file:' ) + ` ${ file.name }.`;\n\n\t\t\t\treturn Promise.reject( genericError );\n\t\t\t} );\n\t}\n\n\t/**\n\t * Aborts the upload process.\n\t *\n\t * @see module:upload/filerepository~UploadAdapter#abort\n\t */\n\tabort() {\n\t\tthis.controller.abort();\n\t}\n\n\t/**\n\t * Sends the HTTP request.\n\t *\n\t * @protected\n\t * @param {URL} config.url the URL where the request will be sent.\n\t * @param {'GET'|'POST'} [config.method='GET'] The HTTP method.\n\t * @param {FormData|null} [config.data] Additional data to send.\n\t * @param {Function} [config.onUploadProgress] A callback informing about the upload progress.\n\t * @returns {Promise}\n\t */\n\t_sendHttpRequest( config ) {\n\t\tconst { url, data, onUploadProgress } = config;\n\t\tconst method = config.method || 'GET';\n\t\tconst signal = this.controller.signal;\n\n\t\tconst xhr = new XMLHttpRequest();\n\t\txhr.open( method, url.toString(), true );\n\t\txhr.setRequestHeader( 'Authorization', this.token.value );\n\t\txhr.setRequestHeader( 'CKBox-Version', 'CKEditor 5' );\n\t\txhr.responseType = 'json';\n\n\t\t// The callback is attached to the `signal#abort` event.\n\t\tconst abortCallback = () => {\n\t\t\txhr.abort();\n\t\t};\n\n\t\treturn new Promise( ( resolve, reject ) => {\n\t\t\tsignal.addEventListener( 'abort', abortCallback );\n\n\t\t\txhr.addEventListener( 'loadstart', () => {\n\t\t\t\tsignal.addEventListener( 'abort', abortCallback );\n\t\t\t} );\n\n\t\t\txhr.addEventListener( 'loadend', () => {\n\t\t\t\tsignal.removeEventListener( 'abort', abortCallback );\n\t\t\t} );\n\n\t\t\txhr.addEventListener( 'error', () => {\n\t\t\t\treject();\n\t\t\t} );\n\n\t\t\txhr.addEventListener( 'abort', () => {\n\t\t\t\treject();\n\t\t\t} );\n\n\t\t\txhr.addEventListener( 'load', async () => {\n\t\t\t\tconst response = xhr.response;\n\n\t\t\t\tif ( !response || response.statusCode >= 400 ) {\n\t\t\t\t\treturn reject( response && response.message );\n\t\t\t\t}\n\n\t\t\t\treturn resolve( response );\n\t\t\t} );\n\n\t\t\t/* istanbul ignore else */\n\t\t\tif ( onUploadProgress ) {\n\t\t\t\txhr.upload.addEventListener( 'progress', evt => {\n\t\t\t\t\tonUploadProgress( evt );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Send the request.\n\t\t\txhr.send( data );\n\t\t} );\n\t}\n\n\t/**\n\t * Resolves a promise with a number representing the width of a given image file.\n\t *\n\t * @protected\n\t * @returns {Promise.<Number>}\n\t */\n\t_getImageWidth() {\n\t\treturn new Promise( resolve => {\n\t\t\tconst image = new Image();\n\n\t\t\timage.onload = () => {\n\t\t\t\t// Let the browser know that it should not keep the reference any longer to avoid memory leeks.\n\t\t\t\tURL.revokeObjectURL( image.src );\n\n\t\t\t\tresolve( image.width );\n\t\t\t};\n\n\t\t\timage.src = this.loader.data;\n\t\t} );\n\t}\n}\n\n// Returns an extension from the given value.\n//\n// @private\n// @param {String} value\n// @returns {String}\nfunction getFileExtension( value ) {\n\tconst extensionRegExp = /\\.(?<ext>[^.]+)$/;\n\tconst match = value.match( extensionRegExp );\n\n\treturn match.groups.ext;\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* global atob, URL */\n\n/**\n * @module ckbox/utils\n */\n\nconst IMAGE_BREAKPOINT_MAX_WIDTH = 4000;\nconst IMAGE_BREAKPOINT_PIXELS_THRESHOLD = 80;\nconst IMAGE_BREAKPOINT_PERCENTAGE_THRESHOLD = 10;\n\n/**\n * Creates URLs for the image:\n * - responsive URLs for the \"webp\" image format,\n * - one fallback URL for browsers that do not support the \"webp\" format.\n *\n * @param {Object} data\n * @param {module:cloud-services/token~Token} data.token\n * @param {String} data.id\n * @param {String} data.origin\n * @param {Number} data.width\n * @param {String} data.extension\n * @returns {Object}\n */\nexport function getImageUrls( { token, id, origin, width, extension } ) {\n\tconst environmentId = getEnvironmentId( token );\n\tconst imageBreakpoints = getImageBreakpoints( width );\n\tconst imageFallbackExtension = getImageFallbackExtension( extension );\n\tconst imageFallbackUrl = getResponsiveImageUrl( { environmentId, id, origin, width, extension: imageFallbackExtension } );\n\tconst imageResponsiveUrls = imageBreakpoints.map( imageBreakpoint => {\n\t\tconst responsiveImageUrl = getResponsiveImageUrl( { environmentId, id, origin, width: imageBreakpoint, extension: 'webp' } );\n\n\t\treturn `${ responsiveImageUrl } ${ imageBreakpoint }w`;\n\t} );\n\n\t// Create just one image source definition containing all calculated URLs for each image breakpoint. Additionally, limit this source\n\t// image width by defining two allowed slot sizes:\n\t// - If the viewport width is not greater than the image width, make the image occupy the whole slot.\n\t// - Otherwise, limit the slot width to be equal to the image width, to avoid enlarging the image beyond its width.\n\t//\n\t// This is a kind of a workaround. In a perfect world we could use `sizes=\"100vw\" width=\"real image width\"` on our single `<source>`\n\t// element, but at the time of writing this code the `width` attribute is not supported in the `<source>` element in Firefox yet.\n\tconst imageSources = [ {\n\t\tsrcset: imageResponsiveUrls.join( ',' ),\n\t\tsizes: `(max-width: ${ width }px) 100vw, ${ width }px`,\n\t\ttype: 'image/webp'\n\t} ];\n\n\treturn {\n\t\timageFallbackUrl,\n\t\timageSources\n\t};\n}\n\n/**\n * Returns an environment id from a token used for communication with the CKBox service.\n *\n * @param {module:cloud-services/token~Token} token\n * @returns {String}\n */\nexport function getEnvironmentId( token ) {\n\tconst [ , binaryTokenPayload ] = token.value.split( '.' );\n\tconst payload = JSON.parse( atob( binaryTokenPayload ) );\n\n\treturn payload.aud;\n}\n\n// Calculates the image breakpoints for the provided image width in the following way:\n//\n// 1) The breakpoint threshold (the breakpoint step in the calculations) should be equal to 10% of the image width, but not less than 80\n// pixels.\n//\n// 2) Set the max. allowed image breakpoint (4000px) or the image width (if it is smaller than 4000px) as the first calculated breakpoint.\n//\n// 3) From the last computed image breakpoint subtract the computed breakpoint threshold, as long as the calculated new breakpoint value is\n// greater than the threshold.\n//\n// @private\n// @param {Number} width\n// @returns {Array.<Number>}\nfunction getImageBreakpoints( width ) {\n\t// Step 1) - calculating the breakpoint threshold.\n\tconst imageBreakpointThresholds = [\n\t\twidth * IMAGE_BREAKPOINT_PERCENTAGE_THRESHOLD / 100,\n\t\tIMAGE_BREAKPOINT_PIXELS_THRESHOLD\n\t];\n\tconst imageBreakpointThreshold = Math.floor( Math.max( ...imageBreakpointThresholds ) );\n\n\t// Step 2) - set the first breakpoint.\n\tconst imageBreakpoints = [ Math.min( width, IMAGE_BREAKPOINT_MAX_WIDTH ) ];\n\n\t// Step 3) - calculate the next breakpoint as long as it is greater than the breakpoint threshold.\n\tlet lastBreakpoint = imageBreakpoints[ 0 ];\n\n\twhile ( lastBreakpoint - imageBreakpointThreshold >= imageBreakpointThreshold ) {\n\t\tlastBreakpoint -= imageBreakpointThreshold;\n\t\timageBreakpoints.unshift( lastBreakpoint );\n\t}\n\n\treturn imageBreakpoints;\n}\n\n// Returns the image extension for the fallback URL.\n//\n// @private\n// @param {String} extension\n// @returns {String}\nfunction getImageFallbackExtension( extension ) {\n\tif ( extension === 'bmp' || extension === 'tiff' || extension === 'jpg' ) {\n\t\treturn 'jpeg';\n\t}\n\n\treturn extension;\n}\n\n// Creates the URL for the given image.\n//\n// @private\n// @param {Object} options\n// @param {String} options.environmentId\n// @param {String} options.id\n// @param {String} options.origin\n// @param {Number} options.width\n// @param {String} options.extension\n// @returns {String}\nfunction getResponsiveImageUrl( { environmentId, id, origin, width, extension } ) {\n\tconst endpoint = `${ environmentId }/assets/${ id }/images/${ width }.${ extension }`;\n\n\treturn new URL( endpoint, origin ).toString();\n}\n","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/core.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/engine.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/ui.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/upload.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/utils.js\");","module.exports = CKEditor5.dll;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module ckbox\n */\n\nexport { default as CKBox } from './ckbox';\nexport { default as CKBoxEditing } from './ckboxediting';\nexport { default as CKBoxUI } from './ckboxui';\n"],"sourceRoot":""}